about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries')
-rw-r--r--nixpkgs/pkgs/development/libraries/AntTweakBar/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/CGAL/4.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/CGAL/cgal_path.patch15
-rw-r--r--nixpkgs/pkgs/development/libraries/CGAL/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/CoinMP/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/LAStools/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/LAStools/drop-64-suffix.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/LASzip/LASzip2.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/LASzip/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/SDL/default.nix135
-rw-r--r--nixpkgs/pkgs/development/libraries/SDL/find-headers.patch26
-rw-r--r--nixpkgs/pkgs/development/libraries/SDL/setup-hook.sh10
-rw-r--r--nixpkgs/pkgs/development/libraries/SDL2/default.nix190
-rw-r--r--nixpkgs/pkgs/development/libraries/SDL2/find-headers.patch32
-rw-r--r--nixpkgs/pkgs/development/libraries/SDL2/setup-hook.sh7
-rw-r--r--nixpkgs/pkgs/development/libraries/SDL2_gfx/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/SDL2_image/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/SDL2_mixer/2_0.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/SDL2_mixer/SDL_mixer-2.0-incompatible-pointer-comparison-fix.patch26
-rw-r--r--nixpkgs/pkgs/development/libraries/SDL2_mixer/default.nix74
-rw-r--r--nixpkgs/pkgs/development/libraries/SDL2_net/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/SDL2_sound/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/SDL2_ttf/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/SDL_Pango/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/SDL_Pango/fixes.patch148
-rw-r--r--nixpkgs/pkgs/development/libraries/SDL_audiolib/default.nix53
-rw-r--r--nixpkgs/pkgs/development/libraries/SDL_compat/default.nix61
-rw-r--r--nixpkgs/pkgs/development/libraries/SDL_gfx/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/SDL_gpu/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/SDL_image/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/SDL_mixer/default.nix68
-rw-r--r--nixpkgs/pkgs/development/libraries/SDL_net/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/SDL_sixel/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/SDL_sound/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/SDL_stretch/default.nix20
-rw-r--r--nixpkgs/pkgs/development/libraries/SDL_ttf/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/Xaw3d/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/a52dec/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/aalib/clang.patch74
-rw-r--r--nixpkgs/pkgs/development/libraries/aalib/darwin.patch106
-rw-r--r--nixpkgs/pkgs/development/libraries/aalib/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/abseil-cpp/202103.nix63
-rw-r--r--nixpkgs/pkgs/development/libraries/abseil-cpp/202111.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/abseil-cpp/202206.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/abseil-cpp/202301.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/abseil-cpp/202308.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/abseil-cpp/202401.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/abseil-cpp/cmake-core-foundation.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/accounts-qml-module/default.nix88
-rw-r--r--nixpkgs/pkgs/development/libraries/accounts-qt/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/accountsservice/Disable-methods-that-change-files-in-etc.patch127
-rw-r--r--nixpkgs/pkgs/development/libraries/accountsservice/default.nix95
-rw-r--r--nixpkgs/pkgs/development/libraries/accountsservice/drop-prefix-check-extensions.patch21
-rw-r--r--nixpkgs/pkgs/development/libraries/accountsservice/fix-paths.patch143
-rw-r--r--nixpkgs/pkgs/development/libraries/accountsservice/get-dm-type-from-config.patch15
-rw-r--r--nixpkgs/pkgs/development/libraries/accountsservice/no-create-dirs.patch17
-rw-r--r--nixpkgs/pkgs/development/libraries/ace/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/acl/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/ada/gnatcoll/bindings.nix89
-rw-r--r--nixpkgs/pkgs/development/libraries/ada/gnatcoll/core.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/ada/gnatcoll/db.nix107
-rw-r--r--nixpkgs/pkgs/development/libraries/ada/spark2014/default.nix67
-rw-r--r--nixpkgs/pkgs/development/libraries/ada/xmlada/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/adns/default.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/adslib/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/aemu/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/afflib/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/aften/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/aften/simd-fallback.patch25
-rw-r--r--nixpkgs/pkgs/development/libraries/agda/1lab/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/agda/agda-categories/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/agda/agda-prelude/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/agda/agdarsec/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/agda/cubical/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/agda/functional-linear-algebra/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/agda/generic/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/agda/iowa-stdlib/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/agda/standard-library/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/agg/default.nix64
-rw-r--r--nixpkgs/pkgs/development/libraries/aixlog/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/alembic/default.nix62
-rw-r--r--nixpkgs/pkgs/development/libraries/alglib/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/alglib/patch-alglib-CMakeLists.patch23
-rw-r--r--nixpkgs/pkgs/development/libraries/alkimia/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/allegro/5.nix108
-rw-r--r--nixpkgs/pkgs/development/libraries/allegro/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/allegro/encoding.patch10
-rw-r--r--nixpkgs/pkgs/development/libraries/allegro/nix-unstable-sandbox-fix.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/alure/default.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/alure2/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/amdvlk/default.nix117
-rw-r--r--nixpkgs/pkgs/development/libraries/amdvlk/test.nix49
-rw-r--r--nixpkgs/pkgs/development/libraries/amf-headers/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/aml/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/amrnb/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/amrwb/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/antic/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/apache-activemq/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/appindicator-sharp/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/applet-window-appmenu/default.nix54
-rw-r--r--nixpkgs/pkgs/development/libraries/applet-window-buttons/default.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/appstream-glib/default.nix95
-rw-r--r--nixpkgs/pkgs/development/libraries/appstream-glib/paths.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/appstream/default.nix119
-rw-r--r--nixpkgs/pkgs/development/libraries/appstream/fix-paths.patch17
-rw-r--r--nixpkgs/pkgs/development/libraries/appstream/installed-tests-path.patch27
-rw-r--r--nixpkgs/pkgs/development/libraries/appstream/qt.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/apr-util/clang-bdb.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/apr-util/default.nix89
-rw-r--r--nixpkgs/pkgs/development/libraries/apr-util/fix-libxcrypt-build.patch14
-rw-r--r--nixpkgs/pkgs/development/libraries/apr-util/include-static-dependencies.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/apr/cross-assume-dev-zero-mmappable.patch14
-rw-r--r--nixpkgs/pkgs/development/libraries/apr/default.nix73
-rw-r--r--nixpkgs/pkgs/development/libraries/aptdec/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/aqbanking/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/aqbanking/gwenhywfar.nix69
-rw-r--r--nixpkgs/pkgs/development/libraries/aqbanking/libchipcard.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/aqbanking/sources.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/aravis/default.nix77
-rw-r--r--nixpkgs/pkgs/development/libraries/arb/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/argp-standalone/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/argparse/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/arguments/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/aribb25/default.nix58
-rw-r--r--nixpkgs/pkgs/development/libraries/armadillo/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/armadillo/use-unix-config-on-OS-X.patch10
-rw-r--r--nixpkgs/pkgs/development/libraries/arpa2common/default.nix60
-rw-r--r--nixpkgs/pkgs/development/libraries/arrayfire/default.nix225
-rw-r--r--nixpkgs/pkgs/development/libraries/arrayfire/no-assets.patch35
-rw-r--r--nixpkgs/pkgs/development/libraries/arrayfire/no-download.patch31
-rw-r--r--nixpkgs/pkgs/development/libraries/arrow-glib/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/asio/1.10.nix6
-rw-r--r--nixpkgs/pkgs/development/libraries/asio/default.nix6
-rw-r--r--nixpkgs/pkgs/development/libraries/asio/generic.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/asmjit/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/aspell/aspell-with-dicts.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/aspell/clang.patch18
-rw-r--r--nixpkgs/pkgs/development/libraries/aspell/data-dirs-from-nix-profiles.patch38
-rw-r--r--nixpkgs/pkgs/development/libraries/aspell/default.nix75
-rw-r--r--nixpkgs/pkgs/development/libraries/aspell/dictionaries.nix972
-rw-r--r--nixpkgs/pkgs/development/libraries/assimp/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/at-spi2-core/default.nix101
-rw-r--r--nixpkgs/pkgs/development/libraries/atkmm/2.36.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/atkmm/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/attr/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/aubio/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/audiality2/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/audio/cubeb/default.nix68
-rw-r--r--nixpkgs/pkgs/development/libraries/audio/game-music-emu/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/audio/libbass/default.nix68
-rw-r--r--nixpkgs/pkgs/development/libraries/audio/libbs2b/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/audio/libinstpatch/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/audio/libkeyfinder/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/audio/libmysofa/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/audio/libopenmpt-modplug/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/audio/libopenmpt/default.nix70
-rwxr-xr-xnixpkgs/pkgs/development/libraries/audio/libopenmpt/update.sh31
-rw-r--r--nixpkgs/pkgs/development/libraries/audio/libsmf/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/audio/libspecbleach/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/audio/lilv/default.nix57
-rw-r--r--nixpkgs/pkgs/development/libraries/audio/lv2/default.nix66
-rw-r--r--nixpkgs/pkgs/development/libraries/audio/lvtk/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/audio/mbelib/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/audio/ntk/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/audio/qm-dsp/default.nix58
-rw-r--r--nixpkgs/pkgs/development/libraries/audio/raul/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/audio/roc-toolkit/default.nix71
-rw-r--r--nixpkgs/pkgs/development/libraries/audio/rtaudio/default.nix49
-rw-r--r--nixpkgs/pkgs/development/libraries/audio/rtmidi/default.nix62
-rw-r--r--nixpkgs/pkgs/development/libraries/audio/sratom/default.nix68
-rw-r--r--nixpkgs/pkgs/development/libraries/audio/suil/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/audio/vamp-plugin-sdk/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/audio/zita-alsa-pcmi/default.nix64
-rw-r--r--nixpkgs/pkgs/development/libraries/audio/zita-convolver/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/audio/zita-resampler/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/audio/zix/default.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/audiofile/CVE-2015-7747.patch161
-rw-r--r--nixpkgs/pkgs/development/libraries/audiofile/default.nix97
-rw-r--r--nixpkgs/pkgs/development/libraries/audiofile/gcc-6.patch30
-rw-r--r--nixpkgs/pkgs/development/libraries/avahi/CVE-2023-38469.patch102
-rw-r--r--nixpkgs/pkgs/development/libraries/avahi/CVE-2023-38471-2.patch47
-rw-r--r--nixpkgs/pkgs/development/libraries/avahi/default.nix184
-rw-r--r--nixpkgs/pkgs/development/libraries/avro-c++/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/avro-c/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/aws-c-auth/default.nix58
-rw-r--r--nixpkgs/pkgs/development/libraries/aws-c-cal/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/aws-c-common/default.nix57
-rw-r--r--nixpkgs/pkgs/development/libraries/aws-c-common/setup-hook.sh5
-rw-r--r--nixpkgs/pkgs/development/libraries/aws-c-compression/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/aws-c-event-stream/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/aws-c-http/default.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/aws-c-io/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/aws-c-mqtt/default.nix53
-rw-r--r--nixpkgs/pkgs/development/libraries/aws-c-s3/default.nix57
-rw-r--r--nixpkgs/pkgs/development/libraries/aws-c-sdkutils/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/aws-checksums/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/aws-crt-cpp/0001-build-Make-includedir-properly-overrideable.patch59
-rw-r--r--nixpkgs/pkgs/development/libraries/aws-crt-cpp/default.nix80
-rw-r--r--nixpkgs/pkgs/development/libraries/aws-sdk-cpp/default.nix154
-rw-r--r--nixpkgs/pkgs/development/libraries/ayatana-ido/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/azmq/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/babl/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/backward-cpp/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/bamf/default.nix96
-rw-r--r--nixpkgs/pkgs/development/libraries/bash/bash-preexec/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/bashup-events/3.2.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/bashup-events/4.4.nix20
-rw-r--r--nixpkgs/pkgs/development/libraries/bashup-events/default.nix6
-rw-r--r--nixpkgs/pkgs/development/libraries/bashup-events/generic.nix86
-rw-r--r--nixpkgs/pkgs/development/libraries/basu/default.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/bc-decaf/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/bcg729/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/bctoolbox/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/bearssl/default.nix62
-rw-r--r--nixpkgs/pkgs/development/libraries/beecrypt/default.nix18
-rw-r--r--nixpkgs/pkgs/development/libraries/belcard/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/belle-sip/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/belr/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/bencode/default.nix57
-rw-r--r--nixpkgs/pkgs/development/libraries/bencodetools/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/biblesync/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/blaze/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/blitz/default.nix81
-rw-r--r--nixpkgs/pkgs/development/libraries/blst/default.nix77
-rw-r--r--nixpkgs/pkgs/development/libraries/boca/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/boehm-gc/default.nix85
-rw-r--r--nixpkgs/pkgs/development/libraries/boolstuff/default.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/boost-ext/boost-sml/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/boost-process/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/boost/1.75.nix15
-rw-r--r--nixpkgs/pkgs/development/libraries/boost/1.77.nix15
-rw-r--r--nixpkgs/pkgs/development/libraries/boost/1.78.nix15
-rw-r--r--nixpkgs/pkgs/development/libraries/boost/1.79.nix14
-rw-r--r--nixpkgs/pkgs/development/libraries/boost/1.80.nix14
-rw-r--r--nixpkgs/pkgs/development/libraries/boost/1.81.nix14
-rw-r--r--nixpkgs/pkgs/development/libraries/boost/1.82.nix14
-rw-r--r--nixpkgs/pkgs/development/libraries/boost/1.83.nix14
-rw-r--r--nixpkgs/pkgs/development/libraries/boost/1.84.nix14
-rw-r--r--nixpkgs/pkgs/development/libraries/boost/cmake-paths-173.patch22
-rw-r--r--nixpkgs/pkgs/development/libraries/boost/darwin-no-system-python.patch45
-rw-r--r--nixpkgs/pkgs/development/libraries/boost/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/boost/generic.nix267
-rw-r--r--nixpkgs/pkgs/development/libraries/bootil/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/boringssl/default.nix66
-rw-r--r--nixpkgs/pkgs/development/libraries/botan/2.0.nix7
-rw-r--r--nixpkgs/pkgs/development/libraries/botan/3.0.nix7
-rw-r--r--nixpkgs/pkgs/development/libraries/botan/generic.nix66
-rw-r--r--nixpkgs/pkgs/development/libraries/box2d/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/boxfort/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/brigand/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/brunsli/default.nix56
-rw-r--r--nixpkgs/pkgs/development/libraries/buddy/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/buddy/gcc-4.3.3-fixes.patch22
-rw-r--r--nixpkgs/pkgs/development/libraries/bullet/default.nix64
-rw-r--r--nixpkgs/pkgs/development/libraries/bullet/gwen-narrowing.patch22
-rw-r--r--nixpkgs/pkgs/development/libraries/bullet/roboschool-fork.nix58
-rw-r--r--nixpkgs/pkgs/development/libraries/bulletml/default.nix77
-rw-r--r--nixpkgs/pkgs/development/libraries/bwidget/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/bzrtp/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/c-ares/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/c-blosc/1.nix69
-rw-r--r--nixpkgs/pkgs/development/libraries/c-blosc/2.nix71
-rw-r--r--nixpkgs/pkgs/development/libraries/c-blosc/default.nix4
-rw-r--r--nixpkgs/pkgs/development/libraries/caf/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/cairo/0001-test-don-t-always-build-FreeType-dependent-test.patch34
-rw-r--r--nixpkgs/pkgs/development/libraries/cairo/0002-gl-don-t-implicitly-include-X11-headers.patch40
-rw-r--r--nixpkgs/pkgs/development/libraries/cairo/0003-test-only-build-GL-tests-when-Xlib-is-enabled.patch41
-rw-r--r--nixpkgs/pkgs/development/libraries/cairo/0004-util-don-t-build-cairo-sphinx-unless-PNG-enabled.patch32
-rw-r--r--nixpkgs/pkgs/development/libraries/cairo/default.nix115
-rw-r--r--nixpkgs/pkgs/development/libraries/cairomm/1.16.nix62
-rw-r--r--nixpkgs/pkgs/development/libraries/cairomm/default.nix60
-rw-r--r--nixpkgs/pkgs/development/libraries/calcium/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/capnproto/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/capstone/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/caroline/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/cassandra-cpp-driver/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/catboost/default.nix113
-rw-r--r--nixpkgs/pkgs/development/libraries/catboost/remove-conan.patch34
-rw-r--r--nixpkgs/pkgs/development/libraries/catch/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/catch2/3.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/catch2/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/ccrtp/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/cctag/cmake-install-include-dir.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/cctag/default.nix66
-rw-r--r--nixpkgs/pkgs/development/libraries/cctz/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/cddlib/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/cdo/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/cegui/default.nix58
-rw-r--r--nixpkgs/pkgs/development/libraries/celt/0.5.1.nix17
-rw-r--r--nixpkgs/pkgs/development/libraries/celt/0.7.nix10
-rw-r--r--nixpkgs/pkgs/development/libraries/celt/default.nix10
-rw-r--r--nixpkgs/pkgs/development/libraries/celt/generic.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/cereal/1.3.0.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/cereal/1.3.2.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/ceres-solver/default.nix57
-rw-r--r--nixpkgs/pkgs/development/libraries/cglm/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/cgreen/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/cgui/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/charls/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/check/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/chipmunk/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/chmlib/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/chromaprint/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/cista/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/civetweb/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/cjose/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/cjson/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/cl/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/clanlib/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/clap/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/classads/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/clfft/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/clipp/clipp.pc9
-rw-r--r--nixpkgs/pkgs/development/libraries/clipp/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/clipper/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/clipper2/0001-fix-pc-paths.patch14
-rw-r--r--nixpkgs/pkgs/development/libraries/clipper2/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/cln/default.nix20
-rw-r--r--nixpkgs/pkgs/development/libraries/cloog-ppl/default.nix71
-rw-r--r--nixpkgs/pkgs/development/libraries/cloog-ppl/fix-ppl-version.patch16
-rw-r--r--nixpkgs/pkgs/development/libraries/cloog/0.18.0.nix64
-rw-r--r--nixpkgs/pkgs/development/libraries/cloog/default.nix66
-rw-r--r--nixpkgs/pkgs/development/libraries/clucene-core/2.x.nix81
-rw-r--r--nixpkgs/pkgs/development/libraries/clucene-core/Fix-pkgconfig-file-by-adding-clucene-shared-library.patch19
-rw-r--r--nixpkgs/pkgs/development/libraries/clucene-core/Fixing_ZLIB_configuration_in_shared_CMakeLists.patch20
-rw-r--r--nixpkgs/pkgs/development/libraries/clucene-core/Install-contribs-lib.patch49
-rw-r--r--nixpkgs/pkgs/development/libraries/clucene-core/fix-darwin.patch62
-rw-r--r--nixpkgs/pkgs/development/libraries/clucene-core/fix-missing-include-time.patch49
-rw-r--r--nixpkgs/pkgs/development/libraries/clucene-core/pthread-include.patch14
-rw-r--r--nixpkgs/pkgs/development/libraries/clutter-gst/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/clutter-gtk/default.nix53
-rw-r--r--nixpkgs/pkgs/development/libraries/clutter/default.nix108
-rw-r--r--nixpkgs/pkgs/development/libraries/cm256cc/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/cmark-gfm/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/cmark/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/cminpack/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/cmocka/default.nix56
-rw-r--r--nixpkgs/pkgs/development/libraries/cmocka/uintptr_t.patch16
-rw-r--r--nixpkgs/pkgs/development/libraries/cmrt/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/codec2/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/coeurl/default.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/cogl/default.nix121
-rw-r--r--nixpkgs/pkgs/development/libraries/cogl/patches/gnome_bugzilla_787443_359589_deepin.patch93
-rw-r--r--nixpkgs/pkgs/development/libraries/cogl/patches/gnome_bugzilla_787443_361056_deepin.patch368
-rw-r--r--nixpkgs/pkgs/development/libraries/coin3d/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/collada-dom/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/comedilib/default.nix56
-rw-r--r--nixpkgs/pkgs/development/libraries/console-bridge/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/coordgenlibs/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/coost/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/cpp-hocon/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/cpp-ipfs-http-client/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/cpp-ipfs-http-client/unvendor-nlohmann-json.patch27
-rw-r--r--nixpkgs/pkgs/development/libraries/cpp-jwt/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/cpp-jwt/fix-version.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/cpp-netlib/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/cpp-utilities/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/cppcms/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/cppcodec/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/cppdb/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/cpptest/default.nix19
-rw-r--r--nixpkgs/pkgs/development/libraries/cpptoml/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/cppunit/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/cpputest/default.nix19
-rw-r--r--nixpkgs/pkgs/development/libraries/cppzmq/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/cracklib/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/crc32c/default.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/crcpp/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/cre2/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/criterion/default.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/croaring/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/crocoddyl/default.nix65
-rw-r--r--nixpkgs/pkgs/development/libraries/crossguid/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/crypto++/default.nix64
-rw-r--r--nixpkgs/pkgs/development/libraries/csfml/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/ctpl/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/ctpp2/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/ctranslate2/default.nix95
-rw-r--r--nixpkgs/pkgs/development/libraries/ctre/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/ctypes_sh/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/cudd/cudd.patch14
-rw-r--r--nixpkgs/pkgs/development/libraries/cudd/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/curlpp/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/cutee/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/cwiid/default.nix61
-rw-r--r--nixpkgs/pkgs/development/libraries/cwiid/fix-ar.diff26
-rw-r--r--nixpkgs/pkgs/development/libraries/cxx-prettyprint/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/cxx-rs/Cargo.lock427
-rw-r--r--nixpkgs/pkgs/development/libraries/cxx-rs/default.nix54
-rw-r--r--nixpkgs/pkgs/development/libraries/cxxopts/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/cxxtest/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/cxxtools/default.nix54
-rw-r--r--nixpkgs/pkgs/development/libraries/cyclonedds/0001-Use-full-path-in-pkgconfig.patch26
-rw-r--r--nixpkgs/pkgs/development/libraries/cyclonedds/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/cyrus-sasl-xoauth2/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/cyrus-sasl/cyrus-sasl-ac-try-run-fix.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/cyrus-sasl/default.nix58
-rw-r--r--nixpkgs/pkgs/development/libraries/czmq/default.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/dab_lib/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/dav1d/default.nix77
-rw-r--r--nixpkgs/pkgs/development/libraries/db/CVE-2017-10140-4.8-cwd-db_config.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/db/CVE-2017-10140-cwd-db_config.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/db/clang-4.8.patch205
-rw-r--r--nixpkgs/pkgs/development/libraries/db/clang-5.3.patch249
-rw-r--r--nixpkgs/pkgs/development/libraries/db/clang-6.0.patch123
-rw-r--r--nixpkgs/pkgs/development/libraries/db/darwin-mutexes-4.8.patch55
-rw-r--r--nixpkgs/pkgs/development/libraries/db/darwin-mutexes.patch42
-rw-r--r--nixpkgs/pkgs/development/libraries/db/db-4.8.nix14
-rw-r--r--nixpkgs/pkgs/development/libraries/db/db-5.3.nix11
-rw-r--r--nixpkgs/pkgs/development/libraries/db/db-6.0.nix12
-rw-r--r--nixpkgs/pkgs/development/libraries/db/db-6.2.nix12
-rw-r--r--nixpkgs/pkgs/development/libraries/db/generic.nix95
-rw-r--r--nixpkgs/pkgs/development/libraries/dbus-cplusplus/default.nix64
-rw-r--r--nixpkgs/pkgs/development/libraries/dbus-glib/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/dbus-sharp-glib/dbus-sharp-glib-1.0.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/dbus-sharp-glib/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/dbus-sharp/dbus-sharp-1.0.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/dbus-sharp/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/dbus/default.nix124
-rw-r--r--nixpkgs/pkgs/development/libraries/dbus/implement-getgrouplist.patch108
-rw-r--r--nixpkgs/pkgs/development/libraries/dbus/make-dbus-conf.nix49
-rw-r--r--nixpkgs/pkgs/development/libraries/dbus/make-session-conf.xsl36
-rw-r--r--nixpkgs/pkgs/development/libraries/dbus/make-system-conf.xsl39
-rw-r--r--nixpkgs/pkgs/development/libraries/dbxml/cxx11.patch59
-rw-r--r--nixpkgs/pkgs/development/libraries/dbxml/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/dbxml/incorrect-optimization.patch34
-rw-r--r--nixpkgs/pkgs/development/libraries/dclib/default.nix20
-rw-r--r--nixpkgs/pkgs/development/libraries/dclxvi/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/dconf/default.nix85
-rw-r--r--nixpkgs/pkgs/development/libraries/dee/0001-Fix-build-with-Vala-0.54.patch29
-rw-r--r--nixpkgs/pkgs/development/libraries/dee/default.nix72
-rw-r--r--nixpkgs/pkgs/development/libraries/directfb/default.nix105
-rw-r--r--nixpkgs/pkgs/development/libraries/directx-headers/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/discord-gamesdk/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/discord-rpc/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/dleyna-connector-dbus/default.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/dleyna-core/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/dleyna-core/setup-hook.sh8
-rw-r--r--nixpkgs/pkgs/development/libraries/dleyna-renderer/default.nix75
-rw-r--r--nixpkgs/pkgs/development/libraries/dleyna-server/default.nix69
-rw-r--r--nixpkgs/pkgs/development/libraries/dlib/default.nix90
-rw-r--r--nixpkgs/pkgs/development/libraries/docopt_cpp/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/doctest/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/dotconf/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/dotnetfx35/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/dotnetfx40/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/double-conversion/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/dqlite/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/draco/default.nix67
-rw-r--r--nixpkgs/pkgs/development/libraries/draco/tinygltf.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/drogon/default.nix67
-rw-r--r--nixpkgs/pkgs/development/libraries/drogon/fix_find_package.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/drumstick/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/drumstick/drumstick-plugins.patch14
-rw-r--r--nixpkgs/pkgs/development/libraries/dsdcc/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/dssi/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/duckdb/default.nix117
-rw-r--r--nixpkgs/pkgs/development/libraries/duckdb/version.patch58
-rw-r--r--nixpkgs/pkgs/development/libraries/dxflib/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/dyncall/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/easyloggingpp/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/eccodes/default.nix76
-rw-r--r--nixpkgs/pkgs/development/libraries/eclib/default.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/edencommon/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/editline/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/egl-wayland/default.nix66
-rw-r--r--nixpkgs/pkgs/development/libraries/eglexternalplatform/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/eigen/2.0.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/eigen/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/eigen/include-dir.patch57
-rw-r--r--nixpkgs/pkgs/development/libraries/elf-header/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/elfio/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/elpa/default.nix105
-rw-r--r--nixpkgs/pkgs/development/libraries/elpa/pkg-config.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/embree/2.x.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/embree/default.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/enchant/2.x.nix67
-rw-r--r--nixpkgs/pkgs/development/libraries/enet/default.nix19
-rw-r--r--nixpkgs/pkgs/development/libraries/entt/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/epoll-shim/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/ethash/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/eventlog/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/example-robot-data/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/exempi/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/exiv2/default.nix105
-rw-r--r--nixpkgs/pkgs/development/libraries/exosip/default.nix20
-rw-r--r--nixpkgs/pkgs/development/libraries/expat/default.nix65
-rw-r--r--nixpkgs/pkgs/development/libraries/expected-lite/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/exprtk/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/faac/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/faad2/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/farbfeld/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/farstream/default.nix63
-rw-r--r--nixpkgs/pkgs/development/libraries/fast-cpp-csv-parser/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/fast-cpp-csv-parser/fast-cpp-csv-parser.pc.in8
-rw-r--r--nixpkgs/pkgs/development/libraries/fastcdr/0001-Do-not-require-wget-and-unzip.patch34
-rw-r--r--nixpkgs/pkgs/development/libraries/fastcdr/default.nix64
-rw-r--r--nixpkgs/pkgs/development/libraries/fastjson/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/fastpbkdf2/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/faudio/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/fb303/default.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/fbjni/default.nix62
-rw-r--r--nixpkgs/pkgs/development/libraries/fbthrift/default.nix68
-rw-r--r--nixpkgs/pkgs/development/libraries/fcft/default.nix62
-rw-r--r--nixpkgs/pkgs/development/libraries/fcgi/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/fcgi/gcc-4.4.diff12
-rw-r--r--nixpkgs/pkgs/development/libraries/fcl/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/fcppt/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/fdk-aac/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/febio/default.nix61
-rw-r--r--nixpkgs/pkgs/development/libraries/febio/fix-cmake.patch26
-rw-r--r--nixpkgs/pkgs/development/libraries/fflas-ffpack/default.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/ffmpeg/4.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/ffmpeg/5.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/ffmpeg/6.nix4
-rw-r--r--nixpkgs/pkgs/development/libraries/ffmpeg/generic.nix732
-rw-r--r--nixpkgs/pkgs/development/libraries/ffmpegthumbnailer/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/ffms/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/fftw/default.nix89
-rw-r--r--nixpkgs/pkgs/development/libraries/filter-audio/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/fizz/default.nix66
-rw-r--r--nixpkgs/pkgs/development/libraries/flann/default.nix79
-rw-r--r--nixpkgs/pkgs/development/libraries/flatbuffers/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/flatcc/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/flatpak/binary-path.patch29
-rw-r--r--nixpkgs/pkgs/development/libraries/flatpak/default.nix207
-rw-r--r--nixpkgs/pkgs/development/libraries/flatpak/fix-icon-validation.patch31
-rw-r--r--nixpkgs/pkgs/development/libraries/flatpak/fix-paths.patch22
-rw-r--r--nixpkgs/pkgs/development/libraries/flatpak/fix-test-paths.patch212
-rw-r--r--nixpkgs/pkgs/development/libraries/flatpak/respect-xml-catalog-files-var.patch15
-rw-r--r--nixpkgs/pkgs/development/libraries/flatpak/unset-env-vars.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/flint/3.nix71
-rw-r--r--nixpkgs/pkgs/development/libraries/flint/default.nix57
-rw-r--r--nixpkgs/pkgs/development/libraries/flite/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/fltk/1.4.nix5
-rw-r--r--nixpkgs/pkgs/development/libraries/fltk/common.nix202
-rw-r--r--nixpkgs/pkgs/development/libraries/fltk/default.nix5
-rw-r--r--nixpkgs/pkgs/development/libraries/fltk/nsosv.patch20
-rw-r--r--nixpkgs/pkgs/development/libraries/fmt/default.nix73
-rw-r--r--nixpkgs/pkgs/development/libraries/folks/default.nix118
-rw-r--r--nixpkgs/pkgs/development/libraries/folly/default.nix98
-rw-r--r--nixpkgs/pkgs/development/libraries/fontconfig/default.nix87
-rw-r--r--nixpkgs/pkgs/development/libraries/fontconfig/make-fonts-cache.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/fontconfig/make-fonts-conf.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/fontconfig/make-fonts-conf.xsl60
-rw-r--r--nixpkgs/pkgs/development/libraries/forge/default.nix82
-rw-r--r--nixpkgs/pkgs/development/libraries/forge/no-download-glad.patch31
-rw-r--r--nixpkgs/pkgs/development/libraries/fortify-headers/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/fortify-headers/restore-macros.patch283
-rw-r--r--nixpkgs/pkgs/development/libraries/fortify-headers/wchar-imports-skip.patch41
-rw-r--r--nixpkgs/pkgs/development/libraries/fox/default.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/fox/fox-1.6.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/fpattern/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/fplll/20160331.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/fplll/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/frame/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/freealut/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/freeglut/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/freeimage/default.nix78
-rw-r--r--nixpkgs/pkgs/development/libraries/freeimage/libtiff-4.4.0.diff15
-rw-r--r--nixpkgs/pkgs/development/libraries/freeimage/unbundle.diff584
-rw-r--r--nixpkgs/pkgs/development/libraries/freenect/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/freetds/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/freetts/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/freetype/default.nix121
-rw-r--r--nixpkgs/pkgs/development/libraries/freetype/enable-subpixel-rendering.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/freetype/enable-table-validation.patch20
-rw-r--r--nixpkgs/pkgs/development/libraries/freexl/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/frei0r/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/fribidi/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/frozen/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/frozen/meson.build19
-rw-r--r--nixpkgs/pkgs/development/libraries/frugally-deep/default.nix53
-rw-r--r--nixpkgs/pkgs/development/libraries/fstrcmp/cross.patch24
-rw-r--r--nixpkgs/pkgs/development/libraries/fstrcmp/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/fstrm/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/ftgl/default.nix76
-rw-r--r--nixpkgs/pkgs/development/libraries/ftxui/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/funambol/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/functionalplus/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/futuresql/default.nix17
-rw-r--r--nixpkgs/pkgs/development/libraries/fuzzylite/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/g2o/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/g2o/remove-compiler-reference.patch25
-rw-r--r--nixpkgs/pkgs/development/libraries/galario/default.nix83
-rw-r--r--nixpkgs/pkgs/development/libraries/gamenetworkingsockets/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/gamin/abstract-socket-namespace.patch73
-rw-r--r--nixpkgs/pkgs/development/libraries/gamin/deadlock.patch68
-rw-r--r--nixpkgs/pkgs/development/libraries/gamin/debian-patches.nix10
-rw-r--r--nixpkgs/pkgs/development/libraries/gamin/debian-patches.txt2
-rw-r--r--nixpkgs/pkgs/development/libraries/gamin/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/gamin/returnval.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/ganv/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/garmintools/default.nix19
-rw-r--r--nixpkgs/pkgs/development/libraries/gbenchmark/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/gcab/default.nix81
-rw-r--r--nixpkgs/pkgs/development/libraries/gcab/installed-tests-path.patch21
-rw-r--r--nixpkgs/pkgs/development/libraries/gcc/libgcc/default.nix141
-rw-r--r--nixpkgs/pkgs/development/libraries/gcc/libstdc++/5.nix119
-rw-r--r--nixpkgs/pkgs/development/libraries/gcc/libstdc++/no-sys-dirs.patch53
-rw-r--r--nixpkgs/pkgs/development/libraries/gcc/libstdc++/struct-ucontext.patch61
-rw-r--r--nixpkgs/pkgs/development/libraries/gcr/4.nix113
-rw-r--r--nixpkgs/pkgs/development/libraries/gcr/default.nix121
-rw-r--r--nixpkgs/pkgs/development/libraries/gd/default.nix67
-rw-r--r--nixpkgs/pkgs/development/libraries/gdal/default.nix287
-rw-r--r--nixpkgs/pkgs/development/libraries/gdal/tests.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/gdbm/default.nix67
-rw-r--r--nixpkgs/pkgs/development/libraries/gdcm/default.nix103
-rw-r--r--nixpkgs/pkgs/development/libraries/gdk-pixbuf/default.nix160
-rw-r--r--nixpkgs/pkgs/development/libraries/gdk-pixbuf/installed-tests-path.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/gdk-pixbuf/setup-hook.sh17
-rw-r--r--nixpkgs/pkgs/development/libraries/gdk-pixbuf/xlib.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/gdl/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/gdome2/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/gdome2/fno-common.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/gdome2/xml-document.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/gecode/3.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/gecode/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/gecode/fix-const-weights-clang-patch.nix7
-rw-r--r--nixpkgs/pkgs/development/libraries/gegl/default.nix132
-rw-r--r--nixpkgs/pkgs/development/libraries/geis/default.nix56
-rw-r--r--nixpkgs/pkgs/development/libraries/genann/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/gensio/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/geoclue/add-option-for-installation-sysconfdir.patch92
-rw-r--r--nixpkgs/pkgs/development/libraries/geoclue/default.nix107
-rw-r--r--nixpkgs/pkgs/development/libraries/geocode-glib/default.nix72
-rw-r--r--nixpkgs/pkgs/development/libraries/geocode-glib/installed-tests-path.patch26
-rw-r--r--nixpkgs/pkgs/development/libraries/geogram/default.nix128
-rw-r--r--nixpkgs/pkgs/development/libraries/geogram/replace-bundled-zlib.patch46
-rw-r--r--nixpkgs/pkgs/development/libraries/geographiclib/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/geoip/default.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/geos/3.11.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/geos/3.9.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/geos/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/geos/tests.nix15
-rw-r--r--nixpkgs/pkgs/development/libraries/getdata/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/getdns/default.nix92
-rw-r--r--nixpkgs/pkgs/development/libraries/gettext/0001-msginit-Do-not-use-POT-Creation-Date.patch32
-rw-r--r--nixpkgs/pkgs/development/libraries/gettext/absolute-paths.diff21
-rw-r--r--nixpkgs/pkgs/development/libraries/gettext/default.nix113
-rw-r--r--nixpkgs/pkgs/development/libraries/gettext/gettext-setup-hook.sh17
-rw-r--r--nixpkgs/pkgs/development/libraries/gexiv2/default.nix84
-rw-r--r--nixpkgs/pkgs/development/libraries/gf2x/default.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/gfbgraph/default.nix67
-rw-r--r--nixpkgs/pkgs/development/libraries/gflags/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/gfxstream/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/ggz_base_libs/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/ghc_filesystem/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/giflib/4.1.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/giflib/default.nix71
-rw-r--r--nixpkgs/pkgs/development/libraries/giflib/mingw-install-exes.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/gio-sharp/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/git2-cpp/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/givaro/3.7.nix17
-rw-r--r--nixpkgs/pkgs/development/libraries/givaro/3.nix17
-rw-r--r--nixpkgs/pkgs/development/libraries/givaro/default.nix62
-rw-r--r--nixpkgs/pkgs/development/libraries/gjs/default.nix149
-rw-r--r--nixpkgs/pkgs/development/libraries/gjs/fix-paths.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/gjs/installed-tests-path.patch37
-rw-r--r--nixpkgs/pkgs/development/libraries/gl2ps/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/gl3w/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/glbinding/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/gle/default.nix19
-rw-r--r--nixpkgs/pkgs/development/libraries/glew/1.10.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/glew/default.nix66
-rw-r--r--nixpkgs/pkgs/development/libraries/glfw/2.x.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/glfw/3.x-wayland-minecraft.nix64
-rw-r--r--nixpkgs/pkgs/development/libraries/glfw/3.x.nix56
-rw-r--r--nixpkgs/pkgs/development/libraries/glfw/wayland.patch25
-rw-r--r--nixpkgs/pkgs/development/libraries/glfw/x11.patch18
-rw-r--r--nixpkgs/pkgs/development/libraries/glib-networking/default.nix93
-rw-r--r--nixpkgs/pkgs/development/libraries/glib-networking/hardcode-gsettings.patch341
-rw-r--r--nixpkgs/pkgs/development/libraries/glib-networking/installed-tests-path.patch27
-rw-r--r--nixpkgs/pkgs/development/libraries/glib-testing/default.nix63
-rw-r--r--nixpkgs/pkgs/development/libraries/glib-testing/installed-tests-path.patch32
-rw-r--r--nixpkgs/pkgs/development/libraries/glib/darwin-compilation.patch24
-rw-r--r--nixpkgs/pkgs/development/libraries/glib/default.nix292
-rw-r--r--nixpkgs/pkgs/development/libraries/glib/elementary-terminal-support.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/glib/glib-appinfo-watch.patch102
-rw-r--r--nixpkgs/pkgs/development/libraries/glib/gobject_init_on_demand.patch87
-rw-r--r--nixpkgs/pkgs/development/libraries/glib/quark_init_on_demand.patch33
-rw-r--r--nixpkgs/pkgs/development/libraries/glib/schema-override-variable.patch14
-rw-r--r--nixpkgs/pkgs/development/libraries/glib/setup-hook.sh34
-rw-r--r--nixpkgs/pkgs/development/libraries/glib/skip-timer-test.patch17
-rw-r--r--nixpkgs/pkgs/development/libraries/glib/split-dev-programs.patch214
-rw-r--r--nixpkgs/pkgs/development/libraries/glibc/0001-Revert-Remove-all-usage-of-BASH-or-BASH-in-installed.patch134
-rw-r--r--nixpkgs/pkgs/development/libraries/glibc/0001-aarch64-math-vector.h-add-NVCC-include-guard.patch37
-rw-r--r--nixpkgs/pkgs/development/libraries/glibc/2.38-master.patch.gzbin0 -> 55343 bytes
-rw-r--r--nixpkgs/pkgs/development/libraries/glibc/common.nix299
-rw-r--r--nixpkgs/pkgs/development/libraries/glibc/darwin-cross-build.patch77
-rw-r--r--nixpkgs/pkgs/development/libraries/glibc/default.nix187
-rw-r--r--nixpkgs/pkgs/development/libraries/glibc/dont-use-system-ld-so-cache.patch64
-rw-r--r--nixpkgs/pkgs/development/libraries/glibc/dont-use-system-ld-so-preload.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/glibc/fix-rpc-types-musl-conflicts.patch38
-rw-r--r--nixpkgs/pkgs/development/libraries/glibc/fix-x64-abi.patch35
-rw-r--r--nixpkgs/pkgs/development/libraries/glibc/fix_path_attribute_in_getconf.patch6
-rw-r--r--nixpkgs/pkgs/development/libraries/glibc/info.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/glibc/local-qsort-memory-corruption.patch14
-rw-r--r--nixpkgs/pkgs/development/libraries/glibc/locales-builder.sh18
-rw-r--r--nixpkgs/pkgs/development/libraries/glibc/locales.nix86
-rw-r--r--nixpkgs/pkgs/development/libraries/glibc/mtrace.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/glibc/multi.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/glibc/nix-locale-archive.patch121
-rw-r--r--nixpkgs/pkgs/development/libraries/glibc/nix-nss-open-files.patch51
-rw-r--r--nixpkgs/pkgs/development/libraries/glibc/reenable_DT_HASH.patch28
-rw-r--r--nixpkgs/pkgs/development/libraries/glibmm/2.68.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/glibmm/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/glm/default.nix84
-rw-r--r--nixpkgs/pkgs/development/libraries/glm/glm.pc.in7
-rw-r--r--nixpkgs/pkgs/development/libraries/globalarrays/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/glog/default.nix74
-rw-r--r--nixpkgs/pkgs/development/libraries/gloox/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/glpk/default.nix79
-rw-r--r--nixpkgs/pkgs/development/libraries/glpng/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/glui/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/gmime/2.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/gmime/3.nix54
-rw-r--r--nixpkgs/pkgs/development/libraries/gmime/iconv-detect.h6
-rw-r--r--nixpkgs/pkgs/development/libraries/gmime/musl-iconv-detect.h6
-rw-r--r--nixpkgs/pkgs/development/libraries/gmm/default.nix18
-rw-r--r--nixpkgs/pkgs/development/libraries/gmp/4.3.2.nix78
-rw-r--r--nixpkgs/pkgs/development/libraries/gmp/5.1.3-CVE-2021-43618.patch20
-rw-r--r--nixpkgs/pkgs/development/libraries/gmp/5.1.x.nix87
-rw-r--r--nixpkgs/pkgs/development/libraries/gmp/6.x.nix93
-rw-r--r--nixpkgs/pkgs/development/libraries/gmp/need-size-t.patch18
-rw-r--r--nixpkgs/pkgs/development/libraries/gmtk/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/gmtk/fix-paths.patch20
-rw-r--r--nixpkgs/pkgs/development/libraries/gnet/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/gnome-desktop/bubblewrap-paths.patch17
-rw-r--r--nixpkgs/pkgs/development/libraries/gnome-desktop/default.nix101
-rw-r--r--nixpkgs/pkgs/development/libraries/gnome-menus/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/gnome-online-accounts/default.nix105
-rw-r--r--nixpkgs/pkgs/development/libraries/gnome-video-effects/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/gnu-config/default.nix64
-rw-r--r--nixpkgs/pkgs/development/libraries/gnu-efi/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/gnutls/default.nix142
-rw-r--r--nixpkgs/pkgs/development/libraries/gnutls/dummy.crt45
-rw-r--r--nixpkgs/pkgs/development/libraries/gnutls/nix-ssl-cert-file.patch17
-rw-r--r--nixpkgs/pkgs/development/libraries/gobject-introspection/absolute_gir_path.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/gobject-introspection/absolute_shlib_path.patch192
-rw-r--r--nixpkgs/pkgs/development/libraries/gobject-introspection/default.nix172
-rw-r--r--nixpkgs/pkgs/development/libraries/gobject-introspection/setup-hook.sh34
-rw-r--r--nixpkgs/pkgs/development/libraries/gobject-introspection/wrapper.nix105
-rw-r--r--nixpkgs/pkgs/development/libraries/gobject-introspection/wrappers/g-ir-compiler.sh4
-rw-r--r--nixpkgs/pkgs/development/libraries/gobject-introspection/wrappers/g-ir-scanner-lddwrapper.sh4
-rw-r--r--nixpkgs/pkgs/development/libraries/gobject-introspection/wrappers/g-ir-scanner-qemuwrapper.sh23
-rw-r--r--nixpkgs/pkgs/development/libraries/gobject-introspection/wrappers/g-ir-scanner.sh7
-rw-r--r--nixpkgs/pkgs/development/libraries/goffice/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/gom/default.nix64
-rw-r--r--nixpkgs/pkgs/development/libraries/gom/longer-stress-timeout.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/goocanvas/2.x.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/goocanvas/3.x.nix58
-rw-r--r--nixpkgs/pkgs/development/libraries/goocanvas/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/goocanvasmm/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/google-cloud-cpp/default.nix147
-rw-r--r--nixpkgs/pkgs/development/libraries/google-cloud-cpp/skipped_tests.toml139
-rw-r--r--nixpkgs/pkgs/development/libraries/gperftools/default.nix61
-rw-r--r--nixpkgs/pkgs/development/libraries/gpgme/default.nix131
-rw-r--r--nixpkgs/pkgs/development/libraries/gpgme/python-310-detection-without-distutils.patch273
-rw-r--r--nixpkgs/pkgs/development/libraries/gpgme/test_t-verify_double-plaintext.patch31
-rw-r--r--nixpkgs/pkgs/development/libraries/gr-framework/Use-the-module-mode-to-search-for-the-LibXml2-package.patch25
-rw-r--r--nixpkgs/pkgs/development/libraries/gr-framework/default.nix71
-rw-r--r--nixpkgs/pkgs/development/libraries/grail/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/grantlee/5/default.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/grantlee/5/grantlee-nix-profiles.patch19
-rw-r--r--nixpkgs/pkgs/development/libraries/grantlee/5/grantlee-no-canonicalize-filepath.patch27
-rw-r--r--nixpkgs/pkgs/development/libraries/grantlee/5/setup-hook.sh13
-rw-r--r--nixpkgs/pkgs/development/libraries/grantlee/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/graphene-hardened-malloc/default.nix95
-rw-r--r--nixpkgs/pkgs/development/libraries/graphene/0001-meson-add-options-for-tests-installation-dirs.patch51
-rw-r--r--nixpkgs/pkgs/development/libraries/graphene/default.nix124
-rw-r--r--nixpkgs/pkgs/development/libraries/grilo-plugins/chromaprint-gst-plugins.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/grilo-plugins/default.nix101
-rw-r--r--nixpkgs/pkgs/development/libraries/grilo/default.nix80
-rw-r--r--nixpkgs/pkgs/development/libraries/grilo/setup-hook.sh7
-rw-r--r--nixpkgs/pkgs/development/libraries/grpc/default.nix120
-rw-r--r--nixpkgs/pkgs/development/libraries/gsasl/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/gsasl/gsasl.patch21
-rw-r--r--nixpkgs/pkgs/development/libraries/gsettings-desktop-schemas/default.nix70
-rw-r--r--nixpkgs/pkgs/development/libraries/gsettings-qt/default.nix69
-rw-r--r--nixpkgs/pkgs/development/libraries/gsignond/conf.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/gsignond/default.nix67
-rw-r--r--nixpkgs/pkgs/development/libraries/gsignond/plugin-load-env.patch35
-rw-r--r--nixpkgs/pkgs/development/libraries/gsignond/plugins/lastfm.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/gsignond/plugins/mail.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/gsignond/plugins/oauth.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/gsignond/plugins/sasl.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/gsignond/wrapper.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/gsl-lite/default.nix60
-rw-r--r--nixpkgs/pkgs/development/libraries/gsl/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/gsm/default.nix56
-rw-r--r--nixpkgs/pkgs/development/libraries/gsmlib/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/gsoap/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/gsound/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/gspell/0001-Darwin-build-fix.patch29
-rw-r--r--nixpkgs/pkgs/development/libraries/gspell/default.nix79
-rw-r--r--nixpkgs/pkgs/development/libraries/gss/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/gssdp/1.6.nix87
-rw-r--r--nixpkgs/pkgs/development/libraries/gssdp/default.nix82
-rw-r--r--nixpkgs/pkgs/development/libraries/gssdp/standalone-tools.patch42
-rw-r--r--nixpkgs/pkgs/development/libraries/gssdp/tools.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/gstreamer/bad/default.nix368
-rw-r--r--nixpkgs/pkgs/development/libraries/gstreamer/bad/fix-paths.patch48
-rw-r--r--nixpkgs/pkgs/development/libraries/gstreamer/base/default.nix172
-rw-r--r--nixpkgs/pkgs/development/libraries/gstreamer/core/default.nix124
-rw-r--r--nixpkgs/pkgs/development/libraries/gstreamer/core/setup-hook.sh9
-rw-r--r--nixpkgs/pkgs/development/libraries/gstreamer/default.nix56
-rw-r--r--nixpkgs/pkgs/development/libraries/gstreamer/devtools/default.nix69
-rw-r--r--nixpkgs/pkgs/development/libraries/gstreamer/ges/default.nix73
-rw-r--r--nixpkgs/pkgs/development/libraries/gstreamer/good/default.nix202
-rw-r--r--nixpkgs/pkgs/development/libraries/gstreamer/gstreamermm/default.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/gstreamer/icamerasrc/default.nix60
-rw-r--r--nixpkgs/pkgs/development/libraries/gstreamer/libav/default.nix62
-rw-r--r--nixpkgs/pkgs/development/libraries/gstreamer/rs/Cargo.lock6446
-rw-r--r--nixpkgs/pkgs/development/libraries/gstreamer/rs/default.nix256
-rw-r--r--nixpkgs/pkgs/development/libraries/gstreamer/rtsp-server/default.nix66
-rw-r--r--nixpkgs/pkgs/development/libraries/gstreamer/ugly/default.nix98
-rw-r--r--nixpkgs/pkgs/development/libraries/gstreamer/vaapi/default.nix91
-rw-r--r--nixpkgs/pkgs/development/libraries/gstreamer/viperfx/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/gtdialog/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/gtest/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/gtest/fix-cmake-config-includedir.patch34
-rw-r--r--nixpkgs/pkgs/development/libraries/gthree/default.nix74
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk-engine-bluecurve/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk-engine-murrine/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk-engines/default.nix20
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk-frdp/default.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk-layer-shell/default.nix66
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk-mac-integration/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk-sharp-beans/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk-sharp/2.0.nix71
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk-sharp/3.0.nix56
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk-sharp/builder.sh12
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk/2.x.nix158
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk/3.x.nix269
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk/4.x.nix281
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk/hooks/clean-immodules-cache.sh15
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk/hooks/drop-icon-theme-cache.sh19
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk/patches/2.0-clang.patch49
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk/patches/2.0-darwin-x11.patch22
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk/patches/2.0-gnome_bugzilla_557780_306776_freeciv_darwin.patch54
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk/patches/2.0-immodules.cache.patch27
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk/patches/3.0-Xft-setting-fallback-compute-DPI-properly.patch34
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk/patches/3.0-darwin-x11.patch28
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk/patches/3.0-immodules.cache.patch27
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk/patches/4.0-fix-darwin-build.patch31
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk/patches/gtk2-theme-paths.patch40
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk4-layer-shell/default.nix65
-rw-r--r--nixpkgs/pkgs/development/libraries/gtkd/default.nix132
-rw-r--r--nixpkgs/pkgs/development/libraries/gtkd/paths.d142
-rw-r--r--nixpkgs/pkgs/development/libraries/gtkdatabox/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/gtkextra/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/gtkimageview/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/gtkmm/2.x.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/gtkmm/3.x.nix58
-rw-r--r--nixpkgs/pkgs/development/libraries/gtkmm/4.x.nix93
-rw-r--r--nixpkgs/pkgs/development/libraries/gtksourceview/3.x-nix_share_path.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/gtksourceview/3.x.nix58
-rw-r--r--nixpkgs/pkgs/development/libraries/gtksourceview/4.x-nix_share_path.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/gtksourceview/4.x.nix131
-rw-r--r--nixpkgs/pkgs/development/libraries/gtksourceview/5.x.nix119
-rw-r--r--nixpkgs/pkgs/development/libraries/gtksourceviewmm/4.x.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/gtksourceviewmm/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/gtkspell/3.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/gtkspell/default.nix53
-rw-r--r--nixpkgs/pkgs/development/libraries/gtkspellmm/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/gts/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/gumbo/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/gupnp-av/default.nix67
-rw-r--r--nixpkgs/pkgs/development/libraries/gupnp-dlna/default.nix68
-rw-r--r--nixpkgs/pkgs/development/libraries/gupnp-igd/default.nix71
-rw-r--r--nixpkgs/pkgs/development/libraries/gupnp/0001-pkg-config-Declare-header-dependencies-as-public.patch55
-rw-r--r--nixpkgs/pkgs/development/libraries/gupnp/1.6.nix72
-rw-r--r--nixpkgs/pkgs/development/libraries/gupnp/default.nix102
-rw-r--r--nixpkgs/pkgs/development/libraries/gusb/default.nix90
-rw-r--r--nixpkgs/pkgs/development/libraries/gusb/fix-python-path.patch14
-rw-r--r--nixpkgs/pkgs/development/libraries/gvfs/default.nix154
-rw-r--r--nixpkgs/pkgs/development/libraries/gvfs/hardcode-ssh-path.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/gvm-libs/default.nix74
-rw-r--r--nixpkgs/pkgs/development/libraries/half/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/hamlib/4.nix64
-rw-r--r--nixpkgs/pkgs/development/libraries/hamlib/default.nix71
-rw-r--r--nixpkgs/pkgs/development/libraries/harfbuzz/default.nix125
-rw-r--r--nixpkgs/pkgs/development/libraries/hawknl/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/hax11/default.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/hdf5-blosc/blosc_filter.pc.in13
-rw-r--r--nixpkgs/pkgs/development/libraries/hdf5-blosc/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/hdf5-blosc/no-external-blosc.patch26
-rw-r--r--nixpkgs/pkgs/development/libraries/herqq/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/hfst-ospell/default.nix56
-rw-r--r--nixpkgs/pkgs/development/libraries/hfst/default.nix53
-rw-r--r--nixpkgs/pkgs/development/libraries/hidapi/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/highfive/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/hiredis-vip/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/hiredis/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/hivex/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/hivex/hivex-syms.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/hmat-oss/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/hnswlib/default.nix66
-rw-r--r--nixpkgs/pkgs/development/libraries/hotpatch/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/hotpatch/no-loader-test.patch25
-rw-r--r--nixpkgs/pkgs/development/libraries/howard-hinnant-date/default.nix64
-rw-r--r--nixpkgs/pkgs/development/libraries/howard-hinnant-date/make-zoneinfo-available.diff13
-rw-r--r--nixpkgs/pkgs/development/libraries/hpp-fcl/default.nix63
-rw-r--r--nixpkgs/pkgs/development/libraries/hpx/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/hspell/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/hspell/dicts.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/htmlcxx/c++17.patch24
-rw-r--r--nixpkgs/pkgs/development/libraries/htmlcxx/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/htmlcxx/ptrdiff.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/http-parser/default.nix67
-rw-r--r--nixpkgs/pkgs/development/libraries/http-parser/enable-static-shared.patch93
-rw-r--r--nixpkgs/pkgs/development/libraries/httplib/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/hunspell/0001-Make-hunspell-look-in-XDG_DATA_DIRS-for-dictionaries.patch37
-rw-r--r--nixpkgs/pkgs/development/libraries/hunspell/default.nix60
-rw-r--r--nixpkgs/pkgs/development/libraries/hunspell/dictionaries-chromium.nix70
-rw-r--r--nixpkgs/pkgs/development/libraries/hunspell/dictionaries.nix970
-rwxr-xr-xnixpkgs/pkgs/development/libraries/hunspell/update-chromium-dictionaries.py77
-rw-r--r--nixpkgs/pkgs/development/libraries/hunspell/wrapper.nix12
-rw-r--r--nixpkgs/pkgs/development/libraries/hwloc/default.nix79
-rw-r--r--nixpkgs/pkgs/development/libraries/hyena/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/hyperscan/default.nix84
-rw-r--r--nixpkgs/pkgs/development/libraries/hyphen/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/icu/58.nix14
-rw-r--r--nixpkgs/pkgs/development/libraries/icu/60.nix4
-rw-r--r--nixpkgs/pkgs/development/libraries/icu/63.nix16
-rw-r--r--nixpkgs/pkgs/development/libraries/icu/64.nix4
-rw-r--r--nixpkgs/pkgs/development/libraries/icu/66.nix4
-rw-r--r--nixpkgs/pkgs/development/libraries/icu/67.nix4
-rw-r--r--nixpkgs/pkgs/development/libraries/icu/68.nix4
-rw-r--r--nixpkgs/pkgs/development/libraries/icu/69.nix4
-rw-r--r--nixpkgs/pkgs/development/libraries/icu/70.nix4
-rw-r--r--nixpkgs/pkgs/development/libraries/icu/71.nix4
-rw-r--r--nixpkgs/pkgs/development/libraries/icu/72.nix4
-rw-r--r--nixpkgs/pkgs/development/libraries/icu/73.nix4
-rw-r--r--nixpkgs/pkgs/development/libraries/icu/base.nix108
-rw-r--r--nixpkgs/pkgs/development/libraries/id3lib/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/id3lib/id3lib-3.8.3-gcc43-1.patch104
-rw-r--r--nixpkgs/pkgs/development/libraries/id3lib/patch_id3lib_3.8.3_UTF16_writing_bug.diff39
-rw-r--r--nixpkgs/pkgs/development/libraries/idnkit/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/igraph/default.nix110
-rw-r--r--nixpkgs/pkgs/development/libraries/ijs/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/iksemel/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/ilbc/CMakeLists.txt11
-rw-r--r--nixpkgs/pkgs/development/libraries/ilbc/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/ilbc/extract-cfile.awk24
-rw-r--r--nixpkgs/pkgs/development/libraries/ilmbase/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/imath/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/imgui/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/iml/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/imlib2/default.nix101
-rw-r--r--nixpkgs/pkgs/development/libraries/immer/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/impy/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/imtui/default.nix64
-rw-r--r--nixpkgs/pkgs/development/libraries/inchi/default.nix74
-rw-r--r--nixpkgs/pkgs/development/libraries/incrtcl/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/indicator-application/gtk2.nix53
-rw-r--r--nixpkgs/pkgs/development/libraries/indicator-application/gtk3.nix57
-rw-r--r--nixpkgs/pkgs/development/libraries/inih/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/iniparser/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/iniparser/iniparser.pc.in12
-rw-r--r--nixpkgs/pkgs/development/libraries/iniparser/no-usr.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/intel-gmmlib/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/intel-media-driver/default.nix75
-rw-r--r--nixpkgs/pkgs/development/libraries/intel-media-sdk/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/intel-vaapi-driver/default.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/iodash/0001-Add-cmake-install-directives.patch44
-rw-r--r--nixpkgs/pkgs/development/libraries/iodash/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/ip2location-c/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/ipu6-camera-hal/default.nix88
-rw-r--r--nixpkgs/pkgs/development/libraries/iqueue/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/irrlicht/common.nix11
-rw-r--r--nixpkgs/pkgs/development/libraries/irrlicht/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/irrlicht/mac.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/irrlicht/mac_device.patch38
-rw-r--r--nixpkgs/pkgs/development/libraries/irrlichtmt/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/isa-l/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/isl/0.11.1.nix8
-rw-r--r--nixpkgs/pkgs/development/libraries/isl/0.14.1.nix8
-rw-r--r--nixpkgs/pkgs/development/libraries/isl/0.17.1.nix8
-rw-r--r--nixpkgs/pkgs/development/libraries/isl/0.20.0.nix11
-rw-r--r--nixpkgs/pkgs/development/libraries/isl/0.24.0.nix11
-rw-r--r--nixpkgs/pkgs/development/libraries/isl/fix-gcc-build.diff12
-rw-r--r--nixpkgs/pkgs/development/libraries/isl/generic.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/iso-codes/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/itk/5.2.x.nix5
-rw-r--r--nixpkgs/pkgs/development/libraries/itk/5.x.nix5
-rw-r--r--nixpkgs/pkgs/development/libraries/itk/generic.nix116
-rw-r--r--nixpkgs/pkgs/development/libraries/itktcl/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/jabcode/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/jama/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/jansson/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/jarowinkler-cpp/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/java/commons/bcel/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/java/commons/bsf/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/java/commons/compress/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/java/commons/daemon/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/java/commons/fileupload/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/java/commons/io/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/java/commons/lang/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/java/commons/logging/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/java/commons/math/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/java/cup/default.nix56
-rw-r--r--nixpkgs/pkgs/development/libraries/java/cup/javacup-0.11b_beta20160615-build-xml-git.patch38
-rw-r--r--nixpkgs/pkgs/development/libraries/java/dbus-java/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/java/geoipjava/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/java/hsqldb/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/java/httpunit/default.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/java/hydra-ant-logger/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/java/jdom/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/java/jffi/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/java/jflex/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/java/libmatthew-java/default.nix20
-rw-r--r--nixpkgs/pkgs/development/libraries/java/lombok/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/java/lucene/default.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/java/mockobjects/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/java/rhino/default.nix58
-rw-r--r--nixpkgs/pkgs/development/libraries/java/rhino/gcj-type-mismatch.patch103
-rw-r--r--nixpkgs/pkgs/development/libraries/java/saxon/default.nix98
-rw-r--r--nixpkgs/pkgs/development/libraries/java/smack/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/java/swt/awt-libs.patch8
-rw-r--r--nixpkgs/pkgs/development/libraries/java/swt/default.nix158
-rw-r--r--nixpkgs/pkgs/development/libraries/java/swt/gtk-libs.patch14
-rw-r--r--nixpkgs/pkgs/development/libraries/jbig2dec/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/jbig2enc/default.nix68
-rw-r--r--nixpkgs/pkgs/development/libraries/jbigkit/default.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/jcal/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/jellyfin-ffmpeg/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/jemalloc/default.nix68
-rw-r--r--nixpkgs/pkgs/development/libraries/jemalloc/rust.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/jitterentropy/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/jose/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/jpcre2/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/json-c/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/json-fortran/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/json-glib/default.nix106
-rw-r--r--nixpkgs/pkgs/development/libraries/json-glib/meson-add-installed-tests-prefix-option.patch27
-rw-r--r--nixpkgs/pkgs/development/libraries/jsoncpp/default.nix58
-rw-r--r--nixpkgs/pkgs/development/libraries/jsonrpc-glib/default.nix67
-rw-r--r--nixpkgs/pkgs/development/libraries/judy/cross.patch22
-rw-r--r--nixpkgs/pkgs/development/libraries/judy/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/jxrlib/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/kcolorpicker/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/kcp/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/kdb/default.nix49
-rw-r--r--nixpkgs/pkgs/development/libraries/kddockwidgets/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/attica.nix8
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/baloo.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/bluez-qt.nix16
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/breeze-icons.nix16
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/default.nix191
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/extra-cmake-modules/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/extra-cmake-modules/setup-hook.sh117
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/fetch.sh1
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/frameworkintegration.nix16
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kactivities-stats.nix14
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kactivities.nix14
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kapidox.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/karchive.nix13
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kauth/cmake-install-paths.patch17
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kauth/default.nix19
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kbookmarks.nix16
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kcalendarcore.nix13
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kcmutils.nix16
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kcodecs.nix9
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kcompletion.nix13
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kconfig.nix8
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kconfigwidgets.nix16
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kcontacts.nix18
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kcoreaddons.nix12
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kcrash.nix13
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kdav.nix15
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kdbusaddons.nix12
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kdeclarative.nix15
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kded.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kdelibs4support/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kdelibs4support/nix-kde-include-dir.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kdelibs4support/setup-hook.sh1
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kdesignerplugin.nix16
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kdesu/default.nix17
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kdesu/kdesu-search-for-wrapped-daemon-first.patch38
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kdnssd.nix13
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kdoctools/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kdoctools/kdoctools-no-find-docbook-xml.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kdoctools/setup-hook.sh5
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kemoticons.nix12
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kfilemetadata/cmake-install-paths.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kfilemetadata/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kglobalaccel.nix17
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kguiaddons.nix16
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kholidays.nix16
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/khtml.nix18
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/ki18n.nix12
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kiconthemes/default-theme-breeze.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kiconthemes/default.nix18
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kidletime.nix13
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kimageformats.nix19
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kinit/0002-start_kdeinit-path.patch25
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kinit/0003-kdeinit-extra-libs.patch59
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kinit/0004-start_kdeinit-environ-hard-limit.patch29
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kinit/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kio/0001-Remove-impure-smbd-search-path.patch25
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kio/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kirigami2.nix8
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kitemmodels.nix12
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kitemviews.nix13
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kjobwidgets.nix11
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kjs.nix11
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kjsembed.nix12
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kmediaplayer.nix11
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/knewstuff/0001-Delay-resolving-knsrcdir.patch25
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/knewstuff/default.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/knotifications.nix17
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/knotifyconfig.nix13
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kpackage/0001-Allow-external-paths-default.patch25
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kpackage/0002-QDirIterator-follow-symlinks.patch25
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kpackage/default.nix15
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kparts.nix16
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kpeople.nix15
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kplotting.nix10
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kpty.nix8
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kquickcharts.nix12
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kross.nix13
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/krunner.nix18
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kservice/default.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kservice/no-canonicalize-path.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kservice/qdiriterator-follow-symlinks.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/ktexteditor.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/ktextwidgets.nix15
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kunitconversion.nix8
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kwallet.nix18
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kwayland.nix14
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kwidgetsaddons.nix13
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kwindowsystem/default.nix14
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kxmlgui.nix16
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/kxmlrpcclient.nix9
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/modemmanager-qt.nix13
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/networkmanager-qt.nix14
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/oxygen-icons.nix13
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/plasma-framework.nix20
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/prison.nix13
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/purpose.nix14
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/qqc2-desktop-style.nix14
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/solid/default.nix15
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/solid/fix-search-path.patch17
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/sonnet.nix11
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/srcs.nix670
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/syndication.nix11
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/syntax-highlighting.nix10
-rw-r--r--nixpkgs/pkgs/development/libraries/kde-frameworks/threadweaver.nix12
-rw-r--r--nixpkgs/pkgs/development/libraries/kdiagram/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/kdsoap/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/kerberos/heimdal.nix178
-rw-r--r--nixpkgs/pkgs/development/libraries/kerberos/krb5.nix124
-rw-r--r--nixpkgs/pkgs/development/libraries/keybinder/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/keybinder3/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/keystone/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/kf5gpgmepp/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/khronos-ocl-icd-loader/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/kimageannotator/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/kirigami-addons/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/kissfft/0001-pkgconfig-darwin.patch48
-rw-r--r--nixpkgs/pkgs/development/libraries/kissfft/default.nix85
-rw-r--r--nixpkgs/pkgs/development/libraries/kmsxx/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/kompute/default.nix60
-rw-r--r--nixpkgs/pkgs/development/libraries/kpeoplevcard/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/kproperty/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/kquickimageedit/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/kreport/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/kronosnet/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/ktextaddons/default.nix20
-rw-r--r--nixpkgs/pkgs/development/libraries/kuserfeedback/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/kweathercore/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/kyotocabinet/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/l-smash/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/lame/default.nix62
-rw-r--r--nixpkgs/pkgs/development/libraries/languagemachines/frog.nix54
-rw-r--r--nixpkgs/pkgs/development/libraries/languagemachines/frogdata.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/languagemachines/libfolia.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/languagemachines/mbt-add-libxml2-dep.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/languagemachines/mbt.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/languagemachines/packages.nix18
-rw-r--r--nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-frog.json5
-rw-r--r--nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-frogdata.json5
-rw-r--r--nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-libfolia.json5
-rw-r--r--nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-mbt.json5
-rw-r--r--nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-ticcutils.json5
-rw-r--r--nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-timbl.json5
-rw-r--r--nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-timblserver.json5
-rw-r--r--nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-ucto.json5
-rw-r--r--nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-uctodata.json5
-rw-r--r--nixpkgs/pkgs/development/libraries/languagemachines/test.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/languagemachines/ticcutils.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/languagemachines/timbl.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/languagemachines/timblserver.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/languagemachines/ucto.nix49
-rw-r--r--nixpkgs/pkgs/development/libraries/languagemachines/uctodata.nix32
-rwxr-xr-xnixpkgs/pkgs/development/libraries/languagemachines/update79
-rw-r--r--nixpkgs/pkgs/development/libraries/lasem/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/lasso/default.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/lcm/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/lcms/cve-2013-4276.patch62
-rw-r--r--nixpkgs/pkgs/development/libraries/lcms/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/lcms2/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/lcrq/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/ldacbt/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/ldb/default.nix80
-rw-r--r--nixpkgs/pkgs/development/libraries/ldns/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/ldutils/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/leatherman/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/lemon-graph/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/lemon-graph/remove-register.patch15
-rw-r--r--nixpkgs/pkgs/development/libraries/lensfun/default.nix63
-rw-r--r--nixpkgs/pkgs/development/libraries/leptonica/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/lerc/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/lesstif/c-missing_xm_h.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/lesstif/c-render_table_crash.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/lesstif/c-xpmpipethrough.patch381
-rw-r--r--nixpkgs/pkgs/development/libraries/lesstif/default.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/level-zero/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/leveldb/default.nix62
-rw-r--r--nixpkgs/pkgs/development/libraries/levmar/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/lib2geom/default.nix104
-rw-r--r--nixpkgs/pkgs/development/libraries/lib3ds/default.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/lib3mf/default.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/libAfterImage/default.nix98
-rw-r--r--nixpkgs/pkgs/development/libraries/libHX/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/libLAS/default.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/libaacs/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/libaal/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/libabigail/default.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/libabw/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/libaccounts-glib/default.nix57
-rw-r--r--nixpkgs/pkgs/development/libraries/libad9361/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/libadwaita/default.nix121
-rw-r--r--nixpkgs/pkgs/development/libraries/libaec/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/libagar/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/libagar/libagar_test.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/libajantv2/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/libamqpcpp/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/libamqpcpp/libamqpcpp-darwin.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/libantlr3c/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/libao/default.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/libaom/default.nix86
-rw-r--r--nixpkgs/pkgs/development/libraries/libaom/outputs.patch69
-rw-r--r--nixpkgs/pkgs/development/libraries/libaosd/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/libappindicator/default.nix83
-rw-r--r--nixpkgs/pkgs/development/libraries/libarchive-qt/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/libarchive/default.nix127
-rw-r--r--nixpkgs/pkgs/development/libraries/libargon2/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/libargs/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/libasr/default.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/libass/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/libassuan/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/libast/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/libasyncns/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/libatomic_ops/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/libaudclient/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/libaudec/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/libav/default.nix137
-rw-r--r--nixpkgs/pkgs/development/libraries/libav/vpx-12.3-libvpx-1.8.patch46
-rw-r--r--nixpkgs/pkgs/development/libraries/libav/vpxenc-0.8.17-libvpx-1.5.patch22
-rw-r--r--nixpkgs/pkgs/development/libraries/libavc1394/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/libavif/default.nix94
-rw-r--r--nixpkgs/pkgs/development/libraries/libax25/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/libayatana-appindicator/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/libayatana-common/default.nix79
-rw-r--r--nixpkgs/pkgs/development/libraries/libayatana-indicator/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/libb2/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/libb64/default.nix62
-rw-r--r--nixpkgs/pkgs/development/libraries/libbacktrace/0001-libbacktrace-avoid-libtool-wrapping-tests.patch201
-rw-r--r--nixpkgs/pkgs/development/libraries/libbacktrace/0002-libbacktrace-Allow-configuring-debug-dir.patch108
-rw-r--r--nixpkgs/pkgs/development/libraries/libbacktrace/0003-libbacktrace-Support-multiple-build-id-directories.patch101
-rw-r--r--nixpkgs/pkgs/development/libraries/libbacktrace/0004-libbacktrace-Support-NIX_DEBUG_INFO_DIRS-environment.patch42
-rw-r--r--nixpkgs/pkgs/development/libraries/libbacktrace/default.nix56
-rw-r--r--nixpkgs/pkgs/development/libraries/libbap/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/libbaseencode/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/libbde/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/libbdplus/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/libbladeRF/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/libblockdev/default.nix94
-rw-r--r--nixpkgs/pkgs/development/libraries/libblocksruntime/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/libbluray/default.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/libbpkg/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/libbsd/darwin-fix-libbsd.sym.patch15
-rw-r--r--nixpkgs/pkgs/development/libraries/libbsd/default.nix66
-rw-r--r--nixpkgs/pkgs/development/libraries/libbson/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/libbtbb/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/libbutl/default.nix62
-rw-r--r--nixpkgs/pkgs/development/libraries/libbutl/install-h-files.patch22
-rw-r--r--nixpkgs/pkgs/development/libraries/libbytesize/default.nix56
-rw-r--r--nixpkgs/pkgs/development/libraries/libcaca/default.nix74
-rw-r--r--nixpkgs/pkgs/development/libraries/libcacard/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/libcanberra/default.nix75
-rw-r--r--nixpkgs/pkgs/development/libraries/libcangjie/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/libcaption/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/libcbor/default.nix71
-rw-r--r--nixpkgs/pkgs/development/libraries/libccd/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/libcdada/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/libcdaudio/default.nix18
-rw-r--r--nixpkgs/pkgs/development/libraries/libcddb/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/libcdio-paranoia/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/libcdio/default.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/libcdr/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/libcec/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/libcec/platform.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/libcef/default.nix125
-rwxr-xr-xnixpkgs/pkgs/development/libraries/libcef/update.sh25
-rw-r--r--nixpkgs/pkgs/development/libraries/libcello/default.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/libcerf/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/libchamplain/default.nix89
-rw-r--r--nixpkgs/pkgs/development/libraries/libchardet/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/libchewing/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/libchop/0001-Fix-RPC-compilation-when-using-libtirpc-rather-than-.patch41
-rw-r--r--nixpkgs/pkgs/development/libraries/libchop/default.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/libchop/gets-undeclared.patch71
-rw-r--r--nixpkgs/pkgs/development/libraries/libchop/size_t.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/libcifpp/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/libcint/default.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/libck/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/libcli/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/libcloudproviders/default.nix61
-rw-r--r--nixpkgs/pkgs/development/libraries/libclthreads/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/libclxclient/default.nix49
-rw-r--r--nixpkgs/pkgs/development/libraries/libcmis/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/libcollectdclient/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/libcommuni/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/libconfig/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/libconfuse/default.nix62
-rw-r--r--nixpkgs/pkgs/development/libraries/libcork/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/libcotp/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/libcouchbase/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/libcpr/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/libcrafter/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/libcredis/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/libcrossguid/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/libcryptui/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/libcryptui/fix-latest-gnupg.patch26
-rw-r--r--nixpkgs/pkgs/development/libraries/libcs50/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/libcsptr/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/libctb/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/libctb/include-kbhit.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/libctemplate/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/libctl/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/libcue/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/libcutl/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/libcxxrt/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/libcyaml/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/libdaemon/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/libdaemon/fix-includes.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/libdatachannel/default.nix61
-rw-r--r--nixpkgs/pkgs/development/libraries/libdatovka/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/libdatovka/libdatovka-deprecated-fn-curl.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/libdatrie/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/libdazzle/default.nix88
-rw-r--r--nixpkgs/pkgs/development/libraries/libdbi-drivers/default.nix64
-rw-r--r--nixpkgs/pkgs/development/libraries/libdbi/default.nix18
-rw-r--r--nixpkgs/pkgs/development/libraries/libdbusmenu-qt/qt-5.5.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/libdbusmenu/default.nix77
-rw-r--r--nixpkgs/pkgs/development/libraries/libdbusmenu/requires-glib.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/libdc1394/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/libde265/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/libde265/test-corpus-decode.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/libdecor/default.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/libdeflate/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/libdeltachat/Cargo.lock5717
-rw-r--r--nixpkgs/pkgs/development/libraries/libdeltachat/default.nix99
-rw-r--r--nixpkgs/pkgs/development/libraries/libdeltachat/no-static-lib.patch38
-rw-r--r--nixpkgs/pkgs/development/libraries/libdevil/default.nix77
-rw-r--r--nixpkgs/pkgs/development/libraries/libdevil/ftbfs-libpng15.patch31
-rw-r--r--nixpkgs/pkgs/development/libraries/libdevil/il_endian.h.patch27
-rw-r--r--nixpkgs/pkgs/development/libraries/libdex/default.nix66
-rw-r--r--nixpkgs/pkgs/development/libraries/libdicom/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/libdigidocpp/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/libdiscid/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/libdisplay-info/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/libdivecomputer/default.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/libdivsufsort/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/libdmapsharing/default.nix79
-rw-r--r--nixpkgs/pkgs/development/libraries/libdmtx/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/libdnet/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/libdovi/Cargo.lock704
-rw-r--r--nixpkgs/pkgs/development/libraries/libdovi/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/libdrm/default.nix63
-rw-r--r--nixpkgs/pkgs/development/libraries/libdv/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/libdvbcsa/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/libdvbpsi/default.nix19
-rw-r--r--nixpkgs/pkgs/development/libraries/libdvdcss/default.nix20
-rw-r--r--nixpkgs/pkgs/development/libraries/libdvdnav/4.2.1.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/libdvdnav/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/libdvdread/4.9.9.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/libdvdread/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/libdwarf/20210528.nix8
-rw-r--r--nixpkgs/pkgs/development/libraries/libdwarf/common.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/libdwarf/default.nix12
-rw-r--r--nixpkgs/pkgs/development/libraries/libdwg/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/libdynd/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/libe-book/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/libe57format/default.nix73
-rw-r--r--nixpkgs/pkgs/development/libraries/libeatmydata/default.nix53
-rw-r--r--nixpkgs/pkgs/development/libraries/libeb/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/libebml/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/libebur128/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/libedit/01-cygwin.patch25
-rw-r--r--nixpkgs/pkgs/development/libraries/libedit/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/libee/default.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/libei/default.nix69
-rw-r--r--nixpkgs/pkgs/development/libraries/libelf/default.nix65
-rw-r--r--nixpkgs/pkgs/development/libraries/libelf/dont-hardcode-ar.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/libelf/fix-configure-main.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/libelf/preprocessor-warnings.patch264
-rw-r--r--nixpkgs/pkgs/development/libraries/libelfin/0001-Don-t-detect-package-version-with-Git.patch72
-rw-r--r--nixpkgs/pkgs/development/libraries/libelfin/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/libemf2svg/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/libepc/default.nix69
-rw-r--r--nixpkgs/pkgs/development/libraries/libepc/no-avahi-ui.patch36
-rw-r--r--nixpkgs/pkgs/development/libraries/libepoxy/default.nix77
-rw-r--r--nixpkgs/pkgs/development/libraries/libepoxy/libgl-path.patch24
-rw-r--r--nixpkgs/pkgs/development/libraries/liberfa/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/liberio/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/libesmtp/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/libestr/default.nix18
-rw-r--r--nixpkgs/pkgs/development/libraries/libetpan/default.nix100
-rw-r--r--nixpkgs/pkgs/development/libraries/libev/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/libevdev/default.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/libevdevplus/0001-Add-cmake-install-directives.patch41
-rw-r--r--nixpkgs/pkgs/development/libraries/libevdevplus/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/libevent/default.nix72
-rw-r--r--nixpkgs/pkgs/development/libraries/libewf/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/libexecinfo/30-linux-makefile.patch44
-rw-r--r--nixpkgs/pkgs/development/libraries/libexecinfo/default.nix53
-rw-r--r--nixpkgs/pkgs/development/libraries/libexif/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/libexsid/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/libextractor/default.nix105
-rw-r--r--nixpkgs/pkgs/development/libraries/libextractor/gst-hardcode-plugins.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/libexttextcat/default.nix19
-rw-r--r--nixpkgs/pkgs/development/libraries/libf2c/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/libfabric/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/libfakekey/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/libfaketime/0001-Remove-unsupported-clang-flags.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/libfaketime/default.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/libfaketime/nix-store-date.patch29
-rw-r--r--nixpkgs/pkgs/development/libraries/libfann/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/libff/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/libffcall/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/libffi/3.3.nix69
-rw-r--r--nixpkgs/pkgs/development/libraries/libffi/default.nix79
-rw-r--r--nixpkgs/pkgs/development/libraries/libffi/fix-implicit-fun-decl.patch46
-rw-r--r--nixpkgs/pkgs/development/libraries/libfido2/default.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/libfilezilla/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/libfishsound/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/libfive/default.nix105
-rw-r--r--nixpkgs/pkgs/development/libraries/libfixposix/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/libfm/default.nix54
-rw-r--r--nixpkgs/pkgs/development/libraries/libfprint-2-tod1-elan/default.nix53
-rw-r--r--nixpkgs/pkgs/development/libraries/libfprint-2-tod1-goodix-550a/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/libfprint-2-tod1-goodix/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/libfprint-2-tod1-vfs0090/0001-vfs0090-add-missing-explicit-dependencies-in-meson.b.patch28
-rw-r--r--nixpkgs/pkgs/development/libraries/libfprint-2-tod1-vfs0090/0002-vfs0090-add-missing-linux-limits.h-include.patch26
-rw-r--r--nixpkgs/pkgs/development/libraries/libfprint-2-tod1-vfs0090/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/libfprint-tod/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/libfprint/default.nix93
-rw-r--r--nixpkgs/pkgs/development/libraries/libfpx/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/libfreeaptx/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/libfreefare/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/libfsm/default.nix62
-rw-r--r--nixpkgs/pkgs/development/libraries/libftdi/1.x.nix77
-rw-r--r--nixpkgs/pkgs/development/libraries/libftdi/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/libfyaml/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/libgadu/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/libgaminggear/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/libgbinder/default.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/libgcrypt/1.8.nix75
-rw-r--r--nixpkgs/pkgs/development/libraries/libgcrypt/default.nix85
-rw-r--r--nixpkgs/pkgs/development/libraries/libgda/6.x.nix114
-rw-r--r--nixpkgs/pkgs/development/libraries/libgda/default.nix109
-rw-r--r--nixpkgs/pkgs/development/libraries/libgdamm/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/libgdata/default.nix86
-rw-r--r--nixpkgs/pkgs/development/libraries/libgdata/installed-tests-path.patch94
-rw-r--r--nixpkgs/pkgs/development/libraries/libgdiplus/configure-pkg-config.patch17
-rw-r--r--nixpkgs/pkgs/development/libraries/libgdiplus/default.nix53
-rw-r--r--nixpkgs/pkgs/development/libraries/libgee/default.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/libgeotiff/default.nix49
-rw-r--r--nixpkgs/pkgs/development/libraries/libgepub/default.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/libgflow/default.nix49
-rw-r--r--nixpkgs/pkgs/development/libraries/libgig/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/libgit2-glib/default.nix73
-rw-r--r--nixpkgs/pkgs/development/libraries/libgit2/default.nix82
-rw-r--r--nixpkgs/pkgs/development/libraries/libglibutil/default.nix49
-rw-r--r--nixpkgs/pkgs/development/libraries/libglvnd/default.nix87
-rw-r--r--nixpkgs/pkgs/development/libraries/libgmpris/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/libgnome-games-support/2.0.nix61
-rw-r--r--nixpkgs/pkgs/development/libraries/libgnome-games-support/default.nix58
-rw-r--r--nixpkgs/pkgs/development/libraries/libgnome-keyring/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/libgnomekbd/default.nix60
-rw-r--r--nixpkgs/pkgs/development/libraries/libgnt/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/libgnurl/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/libgourou/default.nix56
-rw-r--r--nixpkgs/pkgs/development/libraries/libgpg-error/default.nix79
-rw-r--r--nixpkgs/pkgs/development/libraries/libgphoto2/default.nix83
-rw-r--r--nixpkgs/pkgs/development/libraries/libgpiod/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/libgpod/default.nix78
-rw-r--r--nixpkgs/pkgs/development/libraries/libgringotts/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/libgrss/default.nix66
-rw-r--r--nixpkgs/pkgs/development/libraries/libgsf/default.nix101
-rw-r--r--nixpkgs/pkgs/development/libraries/libgssglue/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/libgtkflow3/default.nix54
-rw-r--r--nixpkgs/pkgs/development/libraries/libgtkflow4/default.nix54
-rw-r--r--nixpkgs/pkgs/development/libraries/libgtop/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/libgudev/default.nix77
-rw-r--r--nixpkgs/pkgs/development/libraries/libgudev/tests-skip-double-test-on-stub-locale-impls.patch41
-rw-r--r--nixpkgs/pkgs/development/libraries/libguestfs/appliance.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/libguestfs/default.nix168
-rw-r--r--nixpkgs/pkgs/development/libraries/libguestfs/libguestfs-syms.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/libgumath/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/libgweather/default.nix109
-rw-r--r--nixpkgs/pkgs/development/libraries/libgweather/fix-pkgconfig.patch14
-rw-r--r--nixpkgs/pkgs/development/libraries/libgxps/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/libhandy/0.x.nix53
-rw-r--r--nixpkgs/pkgs/development/libraries/libhandy/default.nix140
-rw-r--r--nixpkgs/pkgs/development/libraries/libhangul/default.nix19
-rw-r--r--nixpkgs/pkgs/development/libraries/libharu/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/libhdhomerun/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/libhdhomerun/nixos-darwin-no-fat-dylib.patch52
-rw-r--r--nixpkgs/pkgs/development/libraries/libheif/default.nix68
-rw-r--r--nixpkgs/pkgs/development/libraries/libhsts/default.nix40
-rwxr-xr-xnixpkgs/pkgs/development/libraries/libhsts/update.sh13
-rw-r--r--nixpkgs/pkgs/development/libraries/libhttpseverywhere/default.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/libhugetlbfs/default.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/libhv/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/libhwy/default.nix73
-rw-r--r--nixpkgs/pkgs/development/libraries/libiberty/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/libibmad/default.nix19
-rw-r--r--nixpkgs/pkgs/development/libraries/libibumad/default.nix17
-rw-r--r--nixpkgs/pkgs/development/libraries/libical/default.nix112
-rw-r--r--nixpkgs/pkgs/development/libraries/libical/respect-env-tzdir.patch29
-rw-r--r--nixpkgs/pkgs/development/libraries/libicns/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/libiconv/default.nix88
-rw-r--r--nixpkgs/pkgs/development/libraries/libiconv/setup-hook.sh8
-rw-r--r--nixpkgs/pkgs/development/libraries/libid3tag/CVE-2017-11550-and-CVE-2017-11551.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/libid3tag/debian-patches.patch89
-rw-r--r--nixpkgs/pkgs/development/libraries/libid3tag/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/libid3tag/id3tag.pc11
-rw-r--r--nixpkgs/pkgs/development/libraries/libidn/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/libidn2/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/libidn2/no-bootstrap-reference.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/libiec61883/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/libieee1284/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/libiio/cmake-fix-libxml2-find-package.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/libiio/default.nix85
-rw-r--r--nixpkgs/pkgs/development/libraries/libiio/hardcode-library-path.patch38
-rw-r--r--nixpkgs/pkgs/development/libraries/libimagequant/Cargo.lock285
-rw-r--r--nixpkgs/pkgs/development/libraries/libimagequant/default.nix67
-rw-r--r--nixpkgs/pkgs/development/libraries/libime/default.nix67
-rw-r--r--nixpkgs/pkgs/development/libraries/libimobiledevice-glue/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/libimobiledevice/default.nix82
-rw-r--r--nixpkgs/pkgs/development/libraries/libindicator/default.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/libinfinity/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/libinjection/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/libinklevel/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/libinotify-kqueue/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/libinput/default.nix137
-rw-r--r--nixpkgs/pkgs/development/libraries/libinput/udev-absolute-path.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/libinsane/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/libint/default.nix228
-rw-r--r--nixpkgs/pkgs/development/libraries/libiodbc/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/libipfix/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/libipt/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/libiptcdata/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/libirc/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/libircclient/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/libirecovery/default.nix60
-rw-r--r--nixpkgs/pkgs/development/libraries/libiscsi/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/libisds/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/libite/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/libivykis/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/libixp/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/libjaylink/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/libjcat/default.nix78
-rw-r--r--nixpkgs/pkgs/development/libraries/libjcat/installed-tests-path.patch24
-rw-r--r--nixpkgs/pkgs/development/libraries/libjodycode/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/libjpeg-turbo/0001-Compile-transupp.c-as-part-of-the-library.patch34
-rw-r--r--nixpkgs/pkgs/development/libraries/libjpeg-turbo/0002-Make-exported-symbols-in-transupp.c-weak.patch81
-rw-r--r--nixpkgs/pkgs/development/libraries/libjpeg-turbo/default.nix117
-rw-r--r--nixpkgs/pkgs/development/libraries/libjpeg-turbo/mingw-boolean.patch19
-rw-r--r--nixpkgs/pkgs/development/libraries/libjpeg/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/libjson-rpc-cpp/default.nix101
-rw-r--r--nixpkgs/pkgs/development/libraries/libjson/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/libjson/install-fix.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/libjwt/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/libjxl/default.nix121
-rw-r--r--nixpkgs/pkgs/development/libraries/libkate/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/libkcapi/default.nix53
-rw-r--r--nixpkgs/pkgs/development/libraries/libkqueue/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/libkrun/default.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/libkrunfw/default.nix61
-rw-r--r--nixpkgs/pkgs/development/libraries/libks/default.nix56
-rw-r--r--nixpkgs/pkgs/development/libraries/libksba/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/libksi/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/liblangtag/default.nix63
-rw-r--r--nixpkgs/pkgs/development/libraries/liblastfm/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/liblastfmSF/default.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/liblaxjson/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/liblc3/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/liblcf/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/libliftoff/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/liblinear/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/liblinphone/backport-cpp17.patch98
-rw-r--r--nixpkgs/pkgs/development/libraries/liblinphone/default.nix91
-rw-r--r--nixpkgs/pkgs/development/libraries/liblo/default.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/liblockfile/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/liblogging/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/liblognorm/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/liblouis/default.nix77
-rw-r--r--nixpkgs/pkgs/development/libraries/liblqr-1/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/liblscp/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/libltc/default.nix18
-rw-r--r--nixpkgs/pkgs/development/libraries/liblxi/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/libmad/default.nix84
-rw-r--r--nixpkgs/pkgs/development/libraries/libmanette/default.nix76
-rw-r--r--nixpkgs/pkgs/development/libraries/libmatchbox/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/libmatheval/default.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/libmatroska/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/libmaxminddb/default.nix20
-rw-r--r--nixpkgs/pkgs/development/libraries/libmbim/default.nix75
-rw-r--r--nixpkgs/pkgs/development/libraries/libmcfp/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/libmcrypt/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/libmd/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/libmediaart/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/libmediainfo/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/libmemcached/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/libmemcached/libmemcached-fix-linking-with-libpthread.patch19
-rw-r--r--nixpkgs/pkgs/development/libraries/libmemcached/musl-fixes.patch58
-rw-r--r--nixpkgs/pkgs/development/libraries/libmesode/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/libmhash/autotools-define-conflict-debian-fix.patch78
-rw-r--r--nixpkgs/pkgs/development/libraries/libmhash/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/libmicrodns/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/libmicrohttpd/0.9.69.nix10
-rw-r--r--nixpkgs/pkgs/development/libraries/libmicrohttpd/0.9.71.nix10
-rw-r--r--nixpkgs/pkgs/development/libraries/libmicrohttpd/0.9.72.nix10
-rw-r--r--nixpkgs/pkgs/development/libraries/libmicrohttpd/0.9.74.nix10
-rw-r--r--nixpkgs/pkgs/development/libraries/libmicrohttpd/generic.nix49
-rw-r--r--nixpkgs/pkgs/development/libraries/libmikmod/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/libmilter/darwin.patch28
-rw-r--r--nixpkgs/pkgs/development/libraries/libmilter/default.nix49
-rw-r--r--nixpkgs/pkgs/development/libraries/libmilter/install.patch42
-rw-r--r--nixpkgs/pkgs/development/libraries/libmilter/sharedlib.patch56
-rw-r--r--nixpkgs/pkgs/development/libraries/libminc/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/libmkv/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/libmms/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/libmng/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/libmnl/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/libmodbus/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/libmodplug/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/libmodule/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/libmodulemd/default.nix73
-rw-r--r--nixpkgs/pkgs/development/libraries/libmodulemd/glib-devdoc.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/libmongocrypt/default.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/libmowgli/default.nix20
-rw-r--r--nixpkgs/pkgs/development/libraries/libmp3splt/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/libmpack/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/libmpc/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/libmpcdec/default.nix17
-rw-r--r--nixpkgs/pkgs/development/libraries/libmpeg2/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/libmrss/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/libmspack/default.nix18
-rw-r--r--nixpkgs/pkgs/development/libraries/libmtp/default.nix72
-rw-r--r--nixpkgs/pkgs/development/libraries/libmusicbrainz/5.x.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/libmusicbrainz/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/libmusicbrainz/v3-darwin.patch22
-rw-r--r--nixpkgs/pkgs/development/libraries/libmwaw/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/libmx/default.nix62
-rw-r--r--nixpkgs/pkgs/development/libraries/libmypaint/default.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/libmysqlconnectorcpp/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/libnabo/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/libnatpmp/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/libnats-c/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/libnatspec/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/libnbd/default.nix63
-rw-r--r--nixpkgs/pkgs/development/libraries/libndctl/default.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/libndp/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/libndtypes/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/libnest2d/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/libnet/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/libnetfilter_acct/default.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/libnetfilter_conntrack/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/libnetfilter_cthelper/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/libnetfilter_cttimeout/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/libnetfilter_log/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/libnetfilter_queue/default.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/libnfc/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/libnfnetlink/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/libnfs/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/libnftnl/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/libngspice/default.nix49
-rw-r--r--nixpkgs/pkgs/development/libraries/libnice/default.nix89
-rw-r--r--nixpkgs/pkgs/development/libraries/libnitrokey/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/libnixxml/default.nix61
-rw-r--r--nixpkgs/pkgs/development/libraries/libnotify/default.nix68
-rw-r--r--nixpkgs/pkgs/development/libraries/libnsl/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/libnut/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/libnxml/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/liboauth/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/libodb-sqlite/default.nix57
-rw-r--r--nixpkgs/pkgs/development/libraries/libodb/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/libodfgen/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/libofa/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/libofx/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/libogg/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/liboggz/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/liboil/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/liboil/x86_64-cpuid.patch38
-rw-r--r--nixpkgs/pkgs/development/libraries/libomxil-bellagio/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/libomxil-bellagio/fedora-fixes.patch199
-rw-r--r--nixpkgs/pkgs/development/libraries/libomxil-bellagio/fno-common.patch32
-rw-r--r--nixpkgs/pkgs/development/libraries/liboop/default.nix18
-rw-r--r--nixpkgs/pkgs/development/libraries/libopenaptx/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/libopenglrecorder/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/libopenshot-audio/0001-undef-fpret-on-aarch64-darwin.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/libopenshot-audio/default.nix77
-rw-r--r--nixpkgs/pkgs/development/libraries/libopenshot/0001-link-magickcore.diff12
-rw-r--r--nixpkgs/pkgs/development/libraries/libopenshot/default.nix87
-rw-r--r--nixpkgs/pkgs/development/libraries/liboping/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/liboping/ncurses-6.3.patch21
-rw-r--r--nixpkgs/pkgs/development/libraries/libopus/default.nix73
-rw-r--r--nixpkgs/pkgs/development/libraries/libopus/fix-pkg-config-paths.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/libopus/test-timeout.patch16
-rw-r--r--nixpkgs/pkgs/development/libraries/libopusenc/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/liboqs/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/liboqs/fix-openssl-detection.patch36
-rw-r--r--nixpkgs/pkgs/development/libraries/libosinfo/default.nix92
-rw-r--r--nixpkgs/pkgs/development/libraries/libosinfo/osinfo-db-data-dir.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/libosmium/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/libosmscout/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/libossp-uuid/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/libossp-uuid/shtool.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/libotr/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/libotr/fix-regtest-client.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/libow/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/libowfat/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/libowlevelzs/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/libp11/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/libpam-wrapper/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/libpanel/default.nix65
-rw-r--r--nixpkgs/pkgs/development/libraries/libpaper/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/libpar2/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/libpar2/libpar2-0.4-external-verification.patch16
-rw-r--r--nixpkgs/pkgs/development/libraries/libpcap/default.nix70
-rw-r--r--nixpkgs/pkgs/development/libraries/libpeas/2.x.nix97
-rw-r--r--nixpkgs/pkgs/development/libraries/libpeas/default.nix91
-rw-r--r--nixpkgs/pkgs/development/libraries/libpeas/fix-paths.patch14
-rw-r--r--nixpkgs/pkgs/development/libraries/libpfm/default.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/libpfm/fix-windows.patch18
-rw-r--r--nixpkgs/pkgs/development/libraries/libpg_query/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/libpgf/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/libphonenumber/build-reproducibility.patch28
-rw-r--r--nixpkgs/pkgs/development/libraries/libphonenumber/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/libpinyin/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/libpipeline/default.nix20
-rw-r--r--nixpkgs/pkgs/development/libraries/libpipeline/fix-on-osx.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/libplacebo/default.nix82
-rw-r--r--nixpkgs/pkgs/development/libraries/libplctag/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/libplist/default.nix58
-rw-r--r--nixpkgs/pkgs/development/libraries/libpng/12.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/libpng/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/libpointmatcher/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/libportal/default.nix82
-rw-r--r--nixpkgs/pkgs/development/libraries/libpostal/0001-test-adding-header-to-fix-warning.patch24
-rw-r--r--nixpkgs/pkgs/development/libraries/libpostal/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/libpqxx/6.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/libpqxx/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/libproxy/default.nix82
-rw-r--r--nixpkgs/pkgs/development/libraries/libpseudo/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/libpsl/default.nix84
-rw-r--r--nixpkgs/pkgs/development/libraries/libpst/default.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/libptytty/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/libpulsar/default.nix102
-rw-r--r--nixpkgs/pkgs/development/libraries/libpwquality/default.nix57
-rw-r--r--nixpkgs/pkgs/development/libraries/libpwquality/python-binding-prefix.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/libqaccessibilityclient/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/libqalculate/default.nix82
-rw-r--r--nixpkgs/pkgs/development/libraries/libqb/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/libqglviewer/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/libqmi/default.nix97
-rw-r--r--nixpkgs/pkgs/development/libraries/libqofono/0001-NixOS-Skip-tests-they-re-shock-full-of-hardcoded-FHS.patch29
-rw-r--r--nixpkgs/pkgs/development/libraries/libqofono/0001-NixOS-provide-mobile-broadband-provider-info-path.patch34
-rw-r--r--nixpkgs/pkgs/development/libraries/libqofono/default.nix58
-rw-r--r--nixpkgs/pkgs/development/libraries/libqrtr-glib/default.nix58
-rw-r--r--nixpkgs/pkgs/development/libraries/libqtav/default.nix71
-rw-r--r--nixpkgs/pkgs/development/libraries/libqtdbusmock/default.nix93
-rw-r--r--nixpkgs/pkgs/development/libraries/libqtdbustest/default.nix102
-rw-r--r--nixpkgs/pkgs/development/libraries/libqtdbustest/less-pedantic-process-finding.patch86
-rw-r--r--nixpkgs/pkgs/development/libraries/libquotient/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/libr3/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/libraqm/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/libraspberrypi/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/librasterlite2/default.nix90
-rw-r--r--nixpkgs/pkgs/development/libraries/libraw/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/libraw1394/default.nix18
-rw-r--r--nixpkgs/pkgs/development/libraries/librclone/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/librdf/raptor.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/librdf/raptor2.nix57
-rw-r--r--nixpkgs/pkgs/development/libraries/librdf/rasqal.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/librdf/redland.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/libre/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/librealsense/default.nix89
-rw-r--r--nixpkgs/pkgs/development/libraries/librealsense/install-presets.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/librealsense/py_pybind11_no_external_download.patch15
-rw-r--r--nixpkgs/pkgs/development/libraries/librecast/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/libredwg/default.nix80
-rw-r--r--nixpkgs/pkgs/development/libraries/librelp/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/librem/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/libremidi/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/librep/default.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/librep/setup-hook.sh5
-rw-r--r--nixpkgs/pkgs/development/libraries/libresample/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/libressl/default.nix117
-rw-r--r--nixpkgs/pkgs/development/libraries/librest/1.0.nix99
-rw-r--r--nixpkgs/pkgs/development/libraries/librest/default.nix63
-rw-r--r--nixpkgs/pkgs/development/libraries/librevenge/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/librime/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/librist/darwin.patch16
-rw-r--r--nixpkgs/pkgs/development/libraries/librist/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/libroxml/default.nix20
-rw-r--r--nixpkgs/pkgs/development/libraries/librsb/default.nix88
-rw-r--r--nixpkgs/pkgs/development/libraries/librseq/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/librsvg/default.nix226
-rw-r--r--nixpkgs/pkgs/development/libraries/librsync/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/librtprocess/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/librttopo/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/libs3/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/libsamplerate/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/libsass/default.nix57
-rw-r--r--nixpkgs/pkgs/development/libraries/libsbsms/common.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/libsbsms/configure.patch22
-rw-r--r--nixpkgs/pkgs/development/libraries/libsbsms/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/libschrift/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/libsciter/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/libscrypt/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/libsearpc/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/libseccomp/default.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/libsecret/default.nix129
-rw-r--r--nixpkgs/pkgs/development/libraries/libsegfault/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/libserdes/default.nix70
-rw-r--r--nixpkgs/pkgs/development/libraries/libserialport/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/libshout/default.nix49
-rw-r--r--nixpkgs/pkgs/development/libraries/libshumate/default.nix92
-rw-r--r--nixpkgs/pkgs/development/libraries/libsidplayfp/default.nix114
-rw-r--r--nixpkgs/pkgs/development/libraries/libsieve/default.nix17
-rw-r--r--nixpkgs/pkgs/development/libraries/libsigcxx/3.0.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/libsigcxx/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/libsignal-protocol-c/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/libsignon-glib/default.nix57
-rw-r--r--nixpkgs/pkgs/development/libraries/libsigsegv/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/libsigsegv/sigbus_fix.patch8
-rw-r--r--nixpkgs/pkgs/development/libraries/libsixel/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/libskk/default.nix49
-rw-r--r--nixpkgs/pkgs/development/libraries/libslirp/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/libsmartcols/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/libsmi/default.nix20
-rw-r--r--nixpkgs/pkgs/development/libraries/libsnark/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/libsndfile/default.nix96
-rw-r--r--nixpkgs/pkgs/development/libraries/libsodium/default.nix49
-rw-r--r--nixpkgs/pkgs/development/libraries/libsolv/default.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/libsoundio/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/libsoup/3.x.nix108
-rw-r--r--nixpkgs/pkgs/development/libraries/libsoup/default.nix104
-rw-r--r--nixpkgs/pkgs/development/libraries/libspatialaudio/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/libspatialindex/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/libspatialite/default.nix69
-rw-r--r--nixpkgs/pkgs/development/libraries/libspectre/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/libspectrum/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/libspelling/default.nix63
-rw-r--r--nixpkgs/pkgs/development/libraries/libspf2/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/libspiro/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/libspnav/configure-socket-path.patch47
-rw-r--r--nixpkgs/pkgs/development/libraries/libspnav/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/libspng/default.nix57
-rw-r--r--nixpkgs/pkgs/development/libraries/libsrs2/default.nix18
-rw-r--r--nixpkgs/pkgs/development/libraries/libssh/default.nix58
-rw-r--r--nixpkgs/pkgs/development/libraries/libssh2/CVE-2023-48795.patch459
-rw-r--r--nixpkgs/pkgs/development/libraries/libssh2/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/libstatgrab/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/libstemmer/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/libstroke/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/libstrophe/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/libsurvive/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/libsv/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/libsvm/default.nix56
-rw-r--r--nixpkgs/pkgs/development/libraries/libsvm/openmp.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/libsystemtap/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/libtap/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/libtar/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/libtasn1/default.nix57
-rw-r--r--nixpkgs/pkgs/development/libraries/libtcod/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/libtelnet/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/libtermkey/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/libthai/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/libtheora/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/libtheora/mingw-remove-export.patch18
-rw-r--r--nixpkgs/pkgs/development/libraries/libthreadar/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/libticables2/default.nix74
-rw-r--r--nixpkgs/pkgs/development/libraries/libticalcs2/default.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/libtickit/001-skip-test-18term-builder-on-macos.patch27
-rw-r--r--nixpkgs/pkgs/development/libraries/libtickit/default.nix65
-rw-r--r--nixpkgs/pkgs/development/libraries/libticonv/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/libtiff/4.5.nix86
-rw-r--r--nixpkgs/pkgs/development/libraries/libtiff/default.nix91
-rw-r--r--nixpkgs/pkgs/development/libraries/libtiff/headers-4.5.patch16
-rw-r--r--nixpkgs/pkgs/development/libraries/libtiff/headers.patch16
-rw-r--r--nixpkgs/pkgs/development/libraries/libtiff/rename-version-4.5.patch21
-rw-r--r--nixpkgs/pkgs/development/libraries/libtiff/rename-version.patch21
-rw-r--r--nixpkgs/pkgs/development/libraries/libtifiles2/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/libtiger/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/libtiger/pkg-config.patch37
-rw-r--r--nixpkgs/pkgs/development/libraries/libtins/default.nix54
-rw-r--r--nixpkgs/pkgs/development/libraries/libtomcrypt/default.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/libtommath/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/libtorrent-rasterbar/1.2.nix54
-rw-r--r--nixpkgs/pkgs/development/libraries/libtorrent-rasterbar/default.nix63
-rw-r--r--nixpkgs/pkgs/development/libraries/libtoxcore/default.nix61
-rw-r--r--nixpkgs/pkgs/development/libraries/libtsm/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/libu2f-host/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/libu2f-server/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/libubox/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/libuchardet/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/libucl/default.nix58
-rw-r--r--nixpkgs/pkgs/development/libraries/libucontext/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/libudev-zero/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/libudfread/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/libuecc/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/libuev/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/libui/default.nix53
-rw-r--r--nixpkgs/pkgs/development/libraries/libui/libui.pc11
-rw-r--r--nixpkgs/pkgs/development/libraries/libuinputplus/0001-Add-cmake-install-directives.patch40
-rw-r--r--nixpkgs/pkgs/development/libraries/libuinputplus/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/libuiohook/default.nix71
-rw-r--r--nixpkgs/pkgs/development/libraries/libuldaq/0001-uldaq.patch28
-rw-r--r--nixpkgs/pkgs/development/libraries/libuldaq/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/libunarr/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/libunibreak/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/libunicode/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/libunicode/remove-target-properties.diff19
-rw-r--r--nixpkgs/pkgs/development/libraries/libuninameslist/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/libunique/1.1.6-G_CONST_RETURN.patch143
-rw-r--r--nixpkgs/pkgs/development/libraries/libunique/1.1.6-compiler-warnings.patch50
-rw-r--r--nixpkgs/pkgs/development/libraries/libunique/1.1.6-fix-test.patch26
-rw-r--r--nixpkgs/pkgs/development/libraries/libunique/1.1.6-include-terminator.patch37
-rw-r--r--nixpkgs/pkgs/development/libraries/libunique/3.x.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/libunique/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/libunique/gcc7-bug.patch18
-rw-r--r--nixpkgs/pkgs/development/libraries/libunistring/default.nix74
-rw-r--r--nixpkgs/pkgs/development/libraries/libunity/default.nix70
-rw-r--r--nixpkgs/pkgs/development/libraries/libunity/fix-vala.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/libunwind/default.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/liburcu/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/liburing/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/libusb-compat/0.1.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/libusb-compat/fix-headers.patch10
-rw-r--r--nixpkgs/pkgs/development/libraries/libusb1/default.nix63
-rw-r--r--nixpkgs/pkgs/development/libraries/libusbgx/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/libusbmuxd/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/libusbsio/default.nix58
-rw-r--r--nixpkgs/pkgs/development/libraries/libutempter/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/libutempter/exec_path.patch32
-rw-r--r--nixpkgs/pkgs/development/libraries/libuv/default.nix126
-rw-r--r--nixpkgs/pkgs/development/libraries/libuvc/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/libva/1.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/libva/default.nix65
-rw-r--r--nixpkgs/pkgs/development/libraries/libva/utils.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/libvarlink/default.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/libvdpau-va-gl/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/libvdpau/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/libvdpau/installdir.patch9
-rw-r--r--nixpkgs/pkgs/development/libraries/libversion/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/libverto/default.nix54
-rw-r--r--nixpkgs/pkgs/development/libraries/libvgm/default.nix122
-rw-r--r--nixpkgs/pkgs/development/libraries/libviper/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/libviperfx/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/libvirt-glib/default.nix77
-rw-r--r--nixpkgs/pkgs/development/libraries/libvirt/0001-meson-patch-in-an-install-prefix-for-building-on-nix.patch473
-rw-r--r--nixpkgs/pkgs/development/libraries/libvirt/0002-substitute-zfs-and-zpool-commands.patch27
-rw-r--r--nixpkgs/pkgs/development/libraries/libvirt/default.nix386
-rw-r--r--nixpkgs/pkgs/development/libraries/libvisio/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/libvisio2svg/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/libvisual/default.nix58
-rw-r--r--nixpkgs/pkgs/development/libraries/libvmaf/default.nix53
-rw-r--r--nixpkgs/pkgs/development/libraries/libvmi/default.nix49
-rw-r--r--nixpkgs/pkgs/development/libraries/libvncserver/default.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/libvoikko/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/libvorbis/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/libvori/default.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/libvpx/1_8.nix185
-rw-r--r--nixpkgs/pkgs/development/libraries/libvpx/default.nix195
-rw-r--r--nixpkgs/pkgs/development/libraries/libvterm-neovim/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/libvterm/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/libwacom/default.nix77
-rw-r--r--nixpkgs/pkgs/development/libraries/libwacom/surface.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/libwbxml/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/libwebp/default.nix77
-rw-r--r--nixpkgs/pkgs/development/libraries/libwebsockets/default.nix73
-rw-r--r--nixpkgs/pkgs/development/libraries/libwhereami/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/libwmf/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/libwnck/2.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/libwnck/default.nix87
-rw-r--r--nixpkgs/pkgs/development/libraries/libwpd/0.8.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/libwpd/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/libwpd/gcc-0.8.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/libwpd/gcc-1.0.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/libwpe/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/libwpe/fdo.nix54
-rw-r--r--nixpkgs/pkgs/development/libraries/libwpg/default.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/libwps/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/libwtk-sdl2/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/libx86/constants.patch20
-rw-r--r--nixpkgs/pkgs/development/libraries/libx86/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/libx86/non-x86.patch38
-rw-r--r--nixpkgs/pkgs/development/libraries/libx86/src-for-default.nix7
-rw-r--r--nixpkgs/pkgs/development/libraries/libx86/src-info-for-default.nix4
-rw-r--r--nixpkgs/pkgs/development/libraries/libx86emu/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/libxc/default.nix49
-rw-r--r--nixpkgs/pkgs/development/libraries/libxcomp/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/libxcrypt/check_passthru_matches.py70
-rw-r--r--nixpkgs/pkgs/development/libraries/libxcrypt/default.nix71
-rw-r--r--nixpkgs/pkgs/development/libraries/libxdg-basedir/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/libxkbcommon/default.nix72
-rw-r--r--nixpkgs/pkgs/development/libraries/libxklavier/default.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/libxklavier/honor-XKB_CONFIG_ROOT.patch89
-rw-r--r--nixpkgs/pkgs/development/libraries/libxl/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/libxls/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/libxlsxwriter/default.nix49
-rw-r--r--nixpkgs/pkgs/development/libraries/libxmi/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/libxml2/default.nix146
-rw-r--r--nixpkgs/pkgs/development/libraries/libxmlb/default.nix79
-rw-r--r--nixpkgs/pkgs/development/libraries/libxmlb/installed-tests-path.patch20
-rw-r--r--nixpkgs/pkgs/development/libraries/libxmlxx/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/libxmlxx/v3.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/libxmp/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/libxnd/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/libxslt/default.nix91
-rw-r--r--nixpkgs/pkgs/development/libraries/libxsmm/default.nix57
-rw-r--r--nixpkgs/pkgs/development/libraries/libyaml/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/libyang/default.nix57
-rw-r--r--nixpkgs/pkgs/development/libraries/libykclient/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/libykneomgr/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/libytnef/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/libyubikey/default.nix18
-rw-r--r--nixpkgs/pkgs/development/libraries/libyuv/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/libyuv/link-library-against-libjpeg.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/libyuv/yuv.pc13
-rw-r--r--nixpkgs/pkgs/development/libraries/libz/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/libzapojit/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/libzdb/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/libzen/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/libzim/default.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/libzip/default.nix65
-rw-r--r--nixpkgs/pkgs/development/libraries/libzmf/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/libzra/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/libzra/fix-pkg-config.patch150
-rw-r--r--nixpkgs/pkgs/development/libraries/lief/default.nix57
-rw-r--r--nixpkgs/pkgs/development/libraries/lightgbm/default.nix150
-rw-r--r--nixpkgs/pkgs/development/libraries/lightning/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/lime/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/linbox/default.nix69
-rw-r--r--nixpkgs/pkgs/development/libraries/linenoise-ng/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/linenoise/default.nix49
-rw-r--r--nixpkgs/pkgs/development/libraries/linenoise/linenoise.pc.in10
-rw-r--r--nixpkgs/pkgs/development/libraries/liquid-dsp/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/liquidfun/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/lirc/default.nix97
-rw-r--r--nixpkgs/pkgs/development/libraries/lirc/linux-headers-5.18.patch35
-rw-r--r--nixpkgs/pkgs/development/libraries/litehtml/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/llhttp/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/lmdb/bin-ext.patch21
-rw-r--r--nixpkgs/pkgs/development/libraries/lmdb/default.nix74
-rw-r--r--nixpkgs/pkgs/development/libraries/lmdb/hardcoded-compiler.patch26
-rw-r--r--nixpkgs/pkgs/development/libraries/lmdbxx/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/log4cplus/default.nix18
-rw-r--r--nixpkgs/pkgs/development/libraries/log4cpp/default.nix20
-rw-r--r--nixpkgs/pkgs/development/libraries/log4cxx/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/log4shib/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/loki/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/loudmouth/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/lpcnetfreedv/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/lrdf/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/luabind/0.9.1-discover-luajit.patch22
-rw-r--r--nixpkgs/pkgs/development/libraries/luabind/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/luabridge/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/lucene++/default.nix57
-rw-r--r--nixpkgs/pkgs/development/libraries/luksmeta/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/lyra/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/lzo/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/mac/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/maeparser/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/magic-enum/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/mailcore2/default.nix72
-rw-r--r--nixpkgs/pkgs/development/libraries/malcontent/better-separation.patch61
-rw-r--r--nixpkgs/pkgs/development/libraries/malcontent/default.nix104
-rw-r--r--nixpkgs/pkgs/development/libraries/malcontent/installed-tests-path.patch56
-rw-r--r--nixpkgs/pkgs/development/libraries/malcontent/ui.nix76
-rw-r--r--nixpkgs/pkgs/development/libraries/mapbox-gl-native/default.nix69
-rw-r--r--nixpkgs/pkgs/development/libraries/mapbox-gl-qml/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/maplibre-gl-native/default.nix77
-rw-r--r--nixpkgs/pkgs/development/libraries/mapnik/catch2-src.patch14
-rw-r--r--nixpkgs/pkgs/development/libraries/mapnik/cmake-harfbuzz.patch26
-rw-r--r--nixpkgs/pkgs/development/libraries/mapnik/datasource-ogr-test-should-fail.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/mapnik/default.nix116
-rw-r--r--nixpkgs/pkgs/development/libraries/mapnik/export-pkg-config-full-paths.patch15
-rw-r--r--nixpkgs/pkgs/development/libraries/marisa/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/marl/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/mathgl/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/matio/default.nix18
-rw-r--r--nixpkgs/pkgs/development/libraries/matrix-sdk-crypto-nodejs/Cargo-beta.3.lock5564
-rw-r--r--nixpkgs/pkgs/development/libraries/matrix-sdk-crypto-nodejs/Cargo-beta.6.lock6253
-rw-r--r--nixpkgs/pkgs/development/libraries/matrix-sdk-crypto-nodejs/beta3.nix13
-rw-r--r--nixpkgs/pkgs/development/libraries/matrix-sdk-crypto-nodejs/default.nix11
-rw-r--r--nixpkgs/pkgs/development/libraries/matrix-sdk-crypto-nodejs/generic.nix60
-rw-r--r--nixpkgs/pkgs/development/libraries/matrix-sdk-crypto-nodejs/remove-duplicate-dependency.patch55
-rw-r--r--nixpkgs/pkgs/development/libraries/maui-core/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/maxflow/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/mbedtls/2.nix6
-rw-r--r--nixpkgs/pkgs/development/libraries/mbedtls/3.nix6
-rw-r--r--nixpkgs/pkgs/development/libraries/mbedtls/generic.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/mdds/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/mdk-sdk/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/medfile/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/medfile/hdf5-1.14.patch86
-rw-r--r--nixpkgs/pkgs/development/libraries/mediastreamer/default.nix95
-rw-r--r--nixpkgs/pkgs/development/libraries/mediastreamer/msopenh264.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/mediastreamer/plugins_dir.patch18
-rw-r--r--nixpkgs/pkgs/development/libraries/memorymapping/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/memorymapping/setup-hook.sh6
-rw-r--r--nixpkgs/pkgs/development/libraries/memstream/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/memstream/setup-hook.sh6
-rw-r--r--nixpkgs/pkgs/development/libraries/menu-cache/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/mesa-glu/default.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/mesa/backports/0001-dri-added-build-dependencies-for-systems-using-non-s.patch56
-rw-r--r--nixpkgs/pkgs/development/libraries/mesa/backports/0002-util-Update-util-libdrm.h-stubs-to-allow-loader.c-to.patch103
-rw-r--r--nixpkgs/pkgs/development/libraries/mesa/backports/0003-glx-fix-automatic-zink-fallback-loading-between-hw-a.patch53
-rw-r--r--nixpkgs/pkgs/development/libraries/mesa/default.nix395
-rw-r--r--nixpkgs/pkgs/development/libraries/mesa/musl.patch59
-rw-r--r--nixpkgs/pkgs/development/libraries/mesa/opencl.patch66
-rw-r--r--nixpkgs/pkgs/development/libraries/mesa/stubs.nix87
-rw-r--r--nixpkgs/pkgs/development/libraries/meshoptimizer/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/microsoft-gsl/default.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/mimalloc/default.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/mimetic/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/mimetic/narrowing.patch32
-rw-r--r--nixpkgs/pkgs/development/libraries/miniaudio/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/miniball/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/minilibx/default.nix62
-rw-r--r--nixpkgs/pkgs/development/libraries/minixml/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/miniz/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/minizip-ng/default.nix63
-rw-r--r--nixpkgs/pkgs/development/libraries/minizip/default.nix19
-rw-r--r--nixpkgs/pkgs/development/libraries/mitama-cpp-result/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/mlib/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/mlt/default.nix139
-rw-r--r--nixpkgs/pkgs/development/libraries/mm-common/default.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/mongoc/default.nix62
-rw-r--r--nixpkgs/pkgs/development/libraries/mongocxx/default.nix57
-rw-r--r--nixpkgs/pkgs/development/libraries/mono-addins/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/monocypher/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/motif/Add-X.Org-to-bindings-file.patch7
-rw-r--r--nixpkgs/pkgs/development/libraries/motif/Remove-unsupported-weak-refs-on-darwin.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/motif/default.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/movit/default.nix57
-rw-r--r--nixpkgs/pkgs/development/libraries/mp4v2/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/mpdecimal/default.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/mpfi/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/mpfr/default.nix78
-rw-r--r--nixpkgs/pkgs/development/libraries/mpich/default.nix78
-rw-r--r--nixpkgs/pkgs/development/libraries/mpir/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/mps/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/mqtt_cpp/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/msgpack-c/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/msgpack-cxx/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/msgpack/default.nix12
-rw-r--r--nixpkgs/pkgs/development/libraries/msgpack/generic.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/msgpuck/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/msilbc/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/mtdev/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/mtxclient/default.nix66
-rw-r--r--nixpkgs/pkgs/development/libraries/multipart-parser-c/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/muparserx/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/mustache-hpp/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/mustache-tcl/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/mutest/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/mvapich/default.nix75
-rw-r--r--nixpkgs/pkgs/development/libraries/mygui/default.nix70
-rw-r--r--nixpkgs/pkgs/development/libraries/mygui/disable-framework.patch20
-rw-r--r--nixpkgs/pkgs/development/libraries/mypaint-brushes/1.0.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/mypaint-brushes/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/mythes/default.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/nanodbc/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/nanoflann/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/nanomsg/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/nanopb/default.nix76
-rw-r--r--nixpkgs/pkgs/development/libraries/nanopb/test-message-with-annotations/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/nanopb/test-message-with-annotations/withannotations.proto7
-rw-r--r--nixpkgs/pkgs/development/libraries/nanopb/test-message-with-options/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/nanopb/test-message-with-options/withoptions.options1
-rw-r--r--nixpkgs/pkgs/development/libraries/nanopb/test-message-with-options/withoptions.proto5
-rw-r--r--nixpkgs/pkgs/development/libraries/nanopb/test-simple-proto2/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/nanopb/test-simple-proto2/simple.proto5
-rw-r--r--nixpkgs/pkgs/development/libraries/nanopb/test-simple-proto3/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/nanopb/test-simple-proto3/simple.proto5
-rw-r--r--nixpkgs/pkgs/development/libraries/nanosvg/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/ncnn/cmakelists.patch35
-rw-r--r--nixpkgs/pkgs/development/libraries/ncnn/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/nco/default.nix62
-rw-r--r--nixpkgs/pkgs/development/libraries/ncurses/default.nix203
-rw-r--r--nixpkgs/pkgs/development/libraries/ndi/default.nix77
-rwxr-xr-xnixpkgs/pkgs/development/libraries/ndi/update.py77
-rw-r--r--nixpkgs/pkgs/development/libraries/ndi/version.json1
-rw-r--r--nixpkgs/pkgs/development/libraries/ndn-cxx/default.nix63
-rw-r--r--nixpkgs/pkgs/development/libraries/ndpi/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/neardal/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/neatvnc/default.nix66
-rw-r--r--nixpkgs/pkgs/development/libraries/nemo-qml-plugin-dbus/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/neon/darwin-fix-configure.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/neon/default.nix54
-rw-r--r--nixpkgs/pkgs/development/libraries/netcdf-cxx4/cmake-h5free.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/netcdf-cxx4/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/netcdf-fortran/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/netcdf/default.nix86
-rw-r--r--nixpkgs/pkgs/development/libraries/nettle/cygwin.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/nettle/default.nix10
-rw-r--r--nixpkgs/pkgs/development/libraries/nettle/generic.nix68
-rw-r--r--nixpkgs/pkgs/development/libraries/networking-ts-cxx/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/networking-ts-cxx/networking_ts.pc.in8
-rw-r--r--nixpkgs/pkgs/development/libraries/newt/default.nix60
-rw-r--r--nixpkgs/pkgs/development/libraries/nghttp2/default.nix103
-rw-r--r--nixpkgs/pkgs/development/libraries/nghttp3/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/ngt/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/ngtcp2/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/ngtcp2/gnutls.nix53
-rw-r--r--nixpkgs/pkgs/development/libraries/nix-plugins/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/nlohmann_json/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/nlopt/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/nng/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/notcurses/default.nix79
-rw-r--r--nixpkgs/pkgs/development/libraries/notify-sharp/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/npapi-sdk/default.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/npth/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/nrf5-sdk/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/nspr/0001-Makefile-use-SOURCE_DATE_EPOCH-for-reproducibility.patch84
-rw-r--r--nixpkgs/pkgs/development/libraries/nspr/default.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/nss/85_security_load_3.85+.patch76
-rw-r--r--nixpkgs/pkgs/development/libraries/nss/esr.nix4
-rw-r--r--nixpkgs/pkgs/development/libraries/nss/fix-cross-compilation.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/nss/generic.nix196
-rw-r--r--nixpkgs/pkgs/development/libraries/nss/latest.nix10
-rw-r--r--nixpkgs/pkgs/development/libraries/nss/remove-c25519-support.patch69
-rwxr-xr-xnixpkgs/pkgs/development/libraries/nss/update.sh10
-rw-r--r--nixpkgs/pkgs/development/libraries/nss_wrapper/default.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/nsync/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/ntbtls/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/ntirpc/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/ntl/default.nix81
-rw-r--r--nixpkgs/pkgs/development/libraries/numcpp/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/nuraft/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/nuspell/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/nuspell/wrapper.nix13
-rw-r--r--nixpkgs/pkgs/development/libraries/nv-codec-headers/10_x.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/nv-codec-headers/11_x.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/nv-codec-headers/12_x.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/nv-codec-headers/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/nvidia-optical-flow-sdk/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/nvidia-vaapi-driver/0001-hardcode-install_dir.patch34
-rw-r--r--nixpkgs/pkgs/development/libraries/nvidia-vaapi-driver/default.nix57
-rw-r--r--nixpkgs/pkgs/development/libraries/oatpp/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/ocl-icd/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/octomap/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/ode/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/odpic/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/ogdf/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/ogre/default.nix109
-rw-r--r--nixpkgs/pkgs/development/libraries/ois/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/okapi/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/olm/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/omorfi/default.nix92
-rw-r--r--nixpkgs/pkgs/development/libraries/oneDNN/2.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/oneDNN/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/oniguruma/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/onnxruntime/0001-eigen-allow-dependency-injection.patch45
-rw-r--r--nixpkgs/pkgs/development/libraries/onnxruntime/default.nix261
-rw-r--r--nixpkgs/pkgs/development/libraries/onnxruntime/nvcc-gsl.patch32
-rw-r--r--nixpkgs/pkgs/development/libraries/opae/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/open62541/default.nix163
-rw-r--r--nixpkgs/pkgs/development/libraries/openal-soft/default.nix60
-rw-r--r--nixpkgs/pkgs/development/libraries/openal-soft/search-out.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/openbabel/2.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/openbabel/default.nix49
-rw-r--r--nixpkgs/pkgs/development/libraries/openbsm/bsm-add-audit_token_to_pid.patch24
-rw-r--r--nixpkgs/pkgs/development/libraries/openbsm/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/opencascade-occt/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/opencl-clang/default.nix119
-rw-r--r--nixpkgs/pkgs/development/libraries/opencl-clang/opencl-headers-dir.patch25
-rw-r--r--nixpkgs/pkgs/development/libraries/opencl-clhpp/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/opencl-headers/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/opencollada/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/opencollada/pcre.patch14
-rw-r--r--nixpkgs/pkgs/development/libraries/opencolorio/1.x.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/opencolorio/broken-cmake-zlib-version.patch17
-rw-r--r--nixpkgs/pkgs/development/libraries/opencolorio/default.nix94
-rw-r--r--nixpkgs/pkgs/development/libraries/opencomposite/default.nix65
-rw-r--r--nixpkgs/pkgs/development/libraries/opencomposite/helper.nix18
-rw-r--r--nixpkgs/pkgs/development/libraries/opencore-amr/default.nix18
-rw-r--r--nixpkgs/pkgs/development/libraries/opencsg/default.nix54
-rw-r--r--nixpkgs/pkgs/development/libraries/opencsg/fix-pro-files.patch21
-rw-r--r--nixpkgs/pkgs/development/libraries/openct/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/opencv/3.x.nix303
-rw-r--r--nixpkgs/pkgs/development/libraries/opencv/4.x.nix525
-rw-r--r--nixpkgs/pkgs/development/libraries/opencv/cmake-don-t-use-OpenCVFindOpenEXR.patch31
-rw-r--r--nixpkgs/pkgs/development/libraries/opencv/cuda_opt_flow.patch27
-rw-r--r--nixpkgs/pkgs/development/libraries/opencv/default.nix84
-rw-r--r--nixpkgs/pkgs/development/libraries/opencv/libstdcxx-test.nix17
-rw-r--r--nixpkgs/pkgs/development/libraries/opencv/no-build-info.patch14
-rw-r--r--nixpkgs/pkgs/development/libraries/opencv/tests.nix70
-rw-r--r--nixpkgs/pkgs/development/libraries/opendbx/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/opendht/default.nix78
-rw-r--r--nixpkgs/pkgs/development/libraries/opendkim/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/opendmarc/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/openexr/3.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/openexr/default.nix69
-rw-r--r--nixpkgs/pkgs/development/libraries/openexr/disable-iex-test.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/openexr/gcc-13.patch25
-rw-r--r--nixpkgs/pkgs/development/libraries/openexrid-unstable/default.nix54
-rw-r--r--nixpkgs/pkgs/development/libraries/openexrid-unstable/openexrid.patch35
-rw-r--r--nixpkgs/pkgs/development/libraries/openfec/default.nix53
-rw-r--r--nixpkgs/pkgs/development/libraries/openfst/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/openfx/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/opengrm-ngram/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/openh264/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/openhmd/default.nix64
-rw-r--r--nixpkgs/pkgs/development/libraries/openimagedenoise/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/openimageio/default.nix76
-rw-r--r--nixpkgs/pkgs/development/libraries/openjpeg/default.nix82
-rw-r--r--nixpkgs/pkgs/development/libraries/openldap/default.nix141
-rw-r--r--nixpkgs/pkgs/development/libraries/openmpi/default.nix136
-rw-r--r--nixpkgs/pkgs/development/libraries/openpa/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/openpam/default.nix19
-rw-r--r--nixpkgs/pkgs/development/libraries/opensaml-cpp/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/openscenegraph/default.nix93
-rw-r--r--nixpkgs/pkgs/development/libraries/openslide/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/openslp/CVE-2016-4912.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/openslp/CVE-2019-5544.patch165
-rw-r--r--nixpkgs/pkgs/development/libraries/openslp/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/openssl/1.1/nix-ssl-cert-file.patch15
-rw-r--r--nixpkgs/pkgs/development/libraries/openssl/3.0/legacy.cnf395
-rw-r--r--nixpkgs/pkgs/development/libraries/openssl/3.0/nix-ssl-cert-file.patch15
-rw-r--r--nixpkgs/pkgs/development/libraries/openssl/3.0/openssl-disable-kernel-detection.patch25
-rw-r--r--nixpkgs/pkgs/development/libraries/openssl/3.2/use-etc-ssl-certs-darwin.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/openssl/3.2/use-etc-ssl-certs.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/openssl/default.nix311
-rw-r--r--nixpkgs/pkgs/development/libraries/openssl/use-etc-ssl-certs-darwin.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/openssl/use-etc-ssl-certs.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/opensubdiv/default.nix88
-rw-r--r--nixpkgs/pkgs/development/libraries/opentracing-cpp/default.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/openturns/default.nix82
-rw-r--r--nixpkgs/pkgs/development/libraries/openvdb/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/openvino/default.nix195
-rw-r--r--nixpkgs/pkgs/development/libraries/openvr/default.nix67
-rw-r--r--nixpkgs/pkgs/development/libraries/openwsman/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/openxr-loader/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/openzwave/default.nix58
-rw-r--r--nixpkgs/pkgs/development/libraries/oracle-instantclient/default.nix149
-rw-r--r--nixpkgs/pkgs/development/libraries/orcania/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/orocos-kdl/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/ortp/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/osip/default.nix17
-rw-r--r--nixpkgs/pkgs/development/libraries/osm-gps-map/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/p11-kit/default.nix98
-rw-r--r--nixpkgs/pkgs/development/libraries/packr/default.nix76
-rw-r--r--nixpkgs/pkgs/development/libraries/pagmo2/default.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/paho-mqtt-c/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/paho-mqtt-cpp/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/pango/default.nix128
-rw-r--r--nixpkgs/pkgs/development/libraries/pangolin/default.nix54
-rw-r--r--nixpkgs/pkgs/development/libraries/pangomm/2.42.2-add-missing-include-attrlist.cc.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/pangomm/2.42.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/pangomm/2.48.nix65
-rw-r--r--nixpkgs/pkgs/development/libraries/pangomm/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/parquet-cpp/api.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/parson/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/partio/default.nix63
-rw-r--r--nixpkgs/pkgs/development/libraries/pc-ble-driver/default.nix54
-rw-r--r--nixpkgs/pkgs/development/libraries/pcaudiolib/default.nix56
-rw-r--r--nixpkgs/pkgs/development/libraries/pcg-c/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/pcg-c/prefix-variable.patch15
-rw-r--r--nixpkgs/pkgs/development/libraries/pcl/default.nix78
-rw-r--r--nixpkgs/pkgs/development/libraries/pcmsolver/default.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/pcre/default.nix65
-rw-r--r--nixpkgs/pkgs/development/libraries/pcre/stacksize-detection.patch16
-rw-r--r--nixpkgs/pkgs/development/libraries/pcre2/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/pdal/default.nix146
-rw-r--r--nixpkgs/pkgs/development/libraries/pdal/tests.nix10
-rw-r--r--nixpkgs/pkgs/development/libraries/pdfhummus/default.nix56
-rw-r--r--nixpkgs/pkgs/development/libraries/pe-parse/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/pffft/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/phash/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/phonetisaurus/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/phonon/backends/gst-plugin-paths.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/phonon/backends/gstreamer.nix70
-rw-r--r--nixpkgs/pkgs/development/libraries/phonon/backends/vlc.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/phonon/default.nix90
-rw-r--r--nixpkgs/pkgs/development/libraries/physfs/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/apfel/cmake.patch14
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/apfel/default.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/apfelgrid/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/applgrid/bad_code.patch50
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/applgrid/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/cernlib/0001-Use-strerror-rather-than-sys_errlist-to-fix-compilat.patch94
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/cernlib/default.nix103
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/cernlib/patch.patch186
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/cernlib/setup-hook.sh3
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/clhep/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/fastjet-contrib/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/fastjet/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/fastnlo-toolkit/default.nix81
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/geant4/datasets-hook.sh5
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/geant4/datasets.nix119
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/geant4/default.nix143
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/geant4/geant4-hook.sh1
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/geant4/tests.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/hepmc2/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/hepmc3/default.nix63
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/herwig/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/hoppet/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/lhapdf/default.nix45
-rwxr-xr-xnixpkgs/pkgs/development/libraries/physics/lhapdf/maintainer.sh13
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/lhapdf/pdf_sets.nix1369
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/lhapdf/pdfset-hook.sh5
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/mela/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/nlojet/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/nlojet/nlojet_clang_fix.patch30
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/pythia/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/qcdnum/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/rivet/default.nix81
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/thepeg/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/physics/yoda/default.nix68
-rw-r--r--nixpkgs/pkgs/development/libraries/pico-sdk/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/pinocchio/default.nix70
-rw-r--r--nixpkgs/pkgs/development/libraries/piper-phonemize/default.nix70
-rw-r--r--nixpkgs/pkgs/development/libraries/piper-phonemize/espeak-mbrola.patch26
-rw-r--r--nixpkgs/pkgs/development/libraries/pipewire/0.2.nix54
-rw-r--r--nixpkgs/pkgs/development/libraries/pipewire/0060-libjack-path.patch26
-rw-r--r--nixpkgs/pkgs/development/libraries/pipewire/0070-installed-tests-path.patch29
-rw-r--r--nixpkgs/pkgs/development/libraries/pipewire/default.nix213
-rw-r--r--nixpkgs/pkgs/development/libraries/pipewire/wireplumber.nix81
-rw-r--r--nixpkgs/pkgs/development/libraries/pixman/default.nix76
-rw-r--r--nixpkgs/pkgs/development/libraries/pkcs11helper/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/pkger/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/plasma-wayland-protocols/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/platform-folders/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/plib/default.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/plog/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/plplot/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/pmix/default.nix88
-rw-r--r--nixpkgs/pkgs/development/libraries/png++/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/poco/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/podofo/0.10.x.nix67
-rw-r--r--nixpkgs/pkgs/development/libraries/podofo/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/polkit-qt-1/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/polkit/default.nix184
-rw-r--r--nixpkgs/pkgs/development/libraries/polkit/system_bus.conf58
-rw-r--r--nixpkgs/pkgs/development/libraries/poly2tri-c/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/popl/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/poppler/default.nix150
-rw-r--r--nixpkgs/pkgs/development/libraries/popt/1.16-cygwin.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/popt/1.16-vpath.patch34
-rw-r--r--nixpkgs/pkgs/development/libraries/popt/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/portaudio/default.nix67
-rw-r--r--nixpkgs/pkgs/development/libraries/portmidi/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/portmidi/missing-header.diff12
-rw-r--r--nixpkgs/pkgs/development/libraries/ppl/default.nix68
-rw-r--r--nixpkgs/pkgs/development/libraries/pplite/default.nix19
-rw-r--r--nixpkgs/pkgs/development/libraries/precice/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/presage/default.nix76
-rw-r--r--nixpkgs/pkgs/development/libraries/presage/fixed-cppunit-detection.patch46
-rw-r--r--nixpkgs/pkgs/development/libraries/prime-server/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/process-cpp/default.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/proj-datumgrid/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/proj/7.nix63
-rw-r--r--nixpkgs/pkgs/development/libraries/proj/default.nix78
-rw-r--r--nixpkgs/pkgs/development/libraries/proj/only-add-curl-for-static-builds.patch37
-rw-r--r--nixpkgs/pkgs/development/libraries/proj/tests-sqlite-3.39.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/proj/tests.nix11
-rw-r--r--nixpkgs/pkgs/development/libraries/prometheus-client-c/default.nix78
-rw-r--r--nixpkgs/pkgs/development/libraries/prometheus-cpp/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/prometheus-cpp/prometheus-cpp.pc.in10
-rw-r--r--nixpkgs/pkgs/development/libraries/properties-cpp/default.nix63
-rw-r--r--nixpkgs/pkgs/development/libraries/protobuf/21.nix6
-rw-r--r--nixpkgs/pkgs/development/libraries/protobuf/23.nix6
-rw-r--r--nixpkgs/pkgs/development/libraries/protobuf/24.nix6
-rw-r--r--nixpkgs/pkgs/development/libraries/protobuf/25.nix6
-rw-r--r--nixpkgs/pkgs/development/libraries/protobuf/3.20.nix6
-rw-r--r--nixpkgs/pkgs/development/libraries/protobuf/generic-v3.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/protobuf/generic.nix114
-rw-r--r--nixpkgs/pkgs/development/libraries/protobuf/static-executables-have-no-rpath.patch18
-rw-r--r--nixpkgs/pkgs/development/libraries/protobufc/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/protolock/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/prototypejs/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/protozero/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/pslib/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/psol/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/psqlodbc/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/pstreams/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/ptex/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/pth/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/pugixml/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/pulseaudio-qt/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/pupnp/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/pxlib/default.nix20
-rw-r--r--nixpkgs/pkgs/development/libraries/py3c/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/pyotherside/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/pyotherside/qml-path.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/pystring/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/python-qt/default.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/qca/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/qcoro/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/qdjango/default.nix73
-rw-r--r--nixpkgs/pkgs/development/libraries/qgnomeplatform/default.nix79
-rw-r--r--nixpkgs/pkgs/development/libraries/qgnomeplatform/hardcode-gsettings.patch25
-rw-r--r--nixpkgs/pkgs/development/libraries/qgnomeplatform/qt6-cursor-fix.patch53
-rw-r--r--nixpkgs/pkgs/development/libraries/qhull/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/qjson/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/qmarkdowntextedit/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/qmenumodel/default.nix99
-rw-r--r--nixpkgs/pkgs/development/libraries/qmlbox2d/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/qmltermwidget/default.nix67
-rw-r--r--nixpkgs/pkgs/development/libraries/qmltermwidget/do-not-copy-artifacts-twice.patch10
-rw-r--r--nixpkgs/pkgs/development/libraries/qoauth/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/qoi/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/qpdf/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/qrcodegen/default.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/qrencode/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/qrupdate/default.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/qscintilla/default.nix76
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/default.nix387
-rwxr-xr-xnixpkgs/pkgs/development/libraries/qt-5/5.15/fetch.sh17
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/modules40
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0001-qtbase-mkspecs-mac.patch485
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0003-qtbase-mkspecs.patch490
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0004-qtbase-replace-libdir.patch68
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0005-qtbase-cmake.patch194
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0006-qtbase-gtk3.patch48
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0007-qtbase-xcursor.patch29
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0008-qtbase-tzdir.patch64
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0009-qtbase-qtpluginpath.patch33
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0010-qtbase-assert.patch32
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0011-fix-header_module.patch22
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0012-qtbase-tbd-frameworks.patch15
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0014-aarch64-darwin.patch275
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/qtdeclarative-default-disable-qmlcache.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/qtdeclarative-qml-paths.patch33
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/qtdeclarative.patch114
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/qtscript.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/qtserialport.patch22
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/qttools.patch15
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebengine-darwin-checks.patch29
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebengine-darwin-no-platform-check.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebengine-link-pulseaudio.patch8
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebengine-mac-dont-set-dsymutil-path.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebkit-cstdint.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebkit-darwin-no-qos-classes.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebkit-darwin-no-readline.patch30
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebkit-icu68.patch170
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebkit.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/srcs-generated.json202
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/srcs.nix94
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/README.md81
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/hooks/fix-qmake-libtool.sh25
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/hooks/fix-qt-builtin-paths.sh64
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/hooks/fix-qt-module-paths.sh36
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/hooks/move-qt-dev-tools.sh34
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/hooks/qmake-hook.sh54
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/hooks/qtbase-setup-hook.sh112
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/hooks/qttools-setup-hook.sh1
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/hooks/wrap-qt-apps-hook.sh107
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/mkDerivation.nix15
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qt3d.nix9
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtbase.nix425
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtcharts.nix7
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtconnectivity.nix13
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtdatavis3d.nix9
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtdeclarative.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtdoc.nix7
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtgamepad.nix10
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtgraphicaleffects.nix7
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtimageformats.nix20
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtlocation.nix13
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtlottie.nix9
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtmacextras.nix10
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtmultimedia.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtnetworkauth.nix6
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtpim.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtpositioning.nix14
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtquickcontrols.nix6
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtquickcontrols2.nix7
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtremoteobjects.nix8
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtscript.nix6
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtscxml.nix7
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtsensors.nix7
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtserialbus.nix6
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtserialport.nix7
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtspeech.nix9
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtsvg.nix7
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtsystems.nix54
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qttools.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qttranslations.nix7
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtvirtualkeyboard.nix6
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtwayland-app_id.patch36
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtwayland.nix15
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtwebchannel.nix12
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtwebengine.nix327
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtwebglplugin.nix6
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtwebkit.nix63
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtwebsockets.nix7
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtwebview.nix12
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtx11extras.nix6
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtxmlpatterns.nix7
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/qt-env.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/qtModule.nix94
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/default.nix214
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/fetch.sh1
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/hooks/fix-qmake-libtool.sh25
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/hooks/fix-qt-builtin-paths.sh63
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/hooks/fix-qt-module-paths.sh27
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/hooks/qmake-hook.sh53
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh105
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/hooks/wrap-qt-apps-hook.sh99
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qt3d.nix11
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qt5compat.nix13
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtbase.nix265
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtcharts.nix9
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtconnectivity.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtdatavis3d.nix9
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix18
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtdoc.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtgraphs.nix16
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtgrpc.nix12
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qthttpserver.nix9
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtimageformats.nix13
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtlanguageserver.nix11
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtlocation.nix10
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtlottie.nix9
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtmqtt.nix18
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtmultimedia.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtnetworkauth.nix6
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtpositioning.nix14
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtquick3d.nix11
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtquick3dphysics.nix13
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtquickeffectmaker.nix9
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtquicktimeline.nix9
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtremoteobjects.nix9
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtscxml.nix6
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtsensors.nix10
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtserialbus.nix6
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtserialport.nix13
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtshadertools.nix8
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtspeech.nix19
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtsvg.nix15
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qttools.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qttranslations.nix9
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtvirtualkeyboard.nix13
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtwayland.nix14
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebchannel.nix12
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebengine.nix323
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebsockets.nix11
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebview.nix14
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch50
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch485
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/patches/0003-qtbase-qmake-fix-includedir-in-generated-pkg-config.patch26
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/patches/0004-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch26
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/patches/0005-qtbase-qt-cmake-always-use-cmake-from-path.patch32
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/patches/0006-qtbase-find-tools-in-PATH.patch45
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/patches/0007-qtbase-pass-to-qmlimportscanner-the-QML2_IMPORT_PATH.patch30
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/patches/0008-qtbase-allow-translations-outside-prefix.patch22
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/patches/0009-qtbase-find-qmlimportscanner-in-macdeployqt-via-envi.patch36
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/patches/0010-qtbase-check-in-the-QML-folder-of-this-library-does-.patch35
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/patches/0011-qtbase-derive-plugin-load-path-from-PATH.patch33
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/patches/qtdeclarative-default-disable-qmlcache.patch29
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/patches/qtdeclarative-qml-paths.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/patches/qttools-paths.patch27
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-copy-certificate-chain.patch16
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-low-latency-flag.patch61
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-link-pulseaudio.patch24
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-locales-path.patch41
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-xkb-includes.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/qt-env.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/qtModule.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/srcs.nix318
-rw-r--r--nixpkgs/pkgs/development/libraries/qtdbusextended/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/qtfeedback/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/qtforkawesome/default.nix61
-rw-r--r--nixpkgs/pkgs/development/libraries/qtinstaller/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/qtkeychain/default.nix64
-rw-r--r--nixpkgs/pkgs/development/libraries/qtmpris/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/qtpbfimageplugin/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/qtstyleplugin-kvantum/default.nix81
-rw-r--r--nixpkgs/pkgs/development/libraries/qtstyleplugins/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/qtutilities/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/qtwebkit-plugins/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/quantlib/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/quarto/default.nix90
-rw-r--r--nixpkgs/pkgs/development/libraries/quarto/fix-deno-path.patch8
-rw-r--r--nixpkgs/pkgs/development/libraries/quazip/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/quesoglc/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/quickder/default.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/quickfix/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/quickfix/disableUnitTests.patch65
-rw-r--r--nixpkgs/pkgs/development/libraries/quickflux/default.nix64
-rw-r--r--nixpkgs/pkgs/development/libraries/quickmem/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/quictls/default.nix186
-rw-r--r--nixpkgs/pkgs/development/libraries/qwlroots/default.nix69
-rw-r--r--nixpkgs/pkgs/development/libraries/qwt/6_1.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/qwt/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/qxlsx/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/qxmpp/default.nix54
-rw-r--r--nixpkgs/pkgs/development/libraries/qzxing/default.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/rabbitmq-c/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/rabbitmq-java-client/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/raft-canonical/default.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/raft-canonical/disable-missing-dir-test.patch23
-rw-r--r--nixpkgs/pkgs/development/libraries/raft-canonical/disable-net-tests.patch16
-rw-r--r--nixpkgs/pkgs/development/libraries/randomx/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/rang/default.nix19
-rw-r--r--nixpkgs/pkgs/development/libraries/range-v3/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/rapidcheck/default.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/rapidfuzz-cpp/default.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/rapidjson/0000-unstable-use-nixpkgs-gtest.patch35
-rw-r--r--nixpkgs/pkgs/development/libraries/rapidjson/0001-unstable-valgrind-suppress-failures.patch36
-rw-r--r--nixpkgs/pkgs/development/libraries/rapidjson/default.nix58
-rw-r--r--nixpkgs/pkgs/development/libraries/rapidjson/test-skip-valgrind.diff7
-rw-r--r--nixpkgs/pkgs/development/libraries/rapidjson/unstable.nix82
-rw-r--r--nixpkgs/pkgs/development/libraries/rapidxml/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/rapidyaml/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/raylib/default.nix81
-rw-r--r--nixpkgs/pkgs/development/libraries/rdkafka/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/re2/default.nix74
-rw-r--r--nixpkgs/pkgs/development/libraries/readline/6.3.nix68
-rw-r--r--nixpkgs/pkgs/development/libraries/readline/7.0.nix63
-rw-r--r--nixpkgs/pkgs/development/libraries/readline/8.2.nix96
-rw-r--r--nixpkgs/pkgs/development/libraries/readline/android.patch16
-rw-r--r--nixpkgs/pkgs/development/libraries/readline/link-against-ncurses.patch18
-rw-r--r--nixpkgs/pkgs/development/libraries/readline/no-arch_only-6.3.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/readline/no-arch_only-8.2.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/readline/readline-6.3-patches.nix12
-rw-r--r--nixpkgs/pkgs/development/libraries/readline/readline-7.0-patches.nix9
-rw-r--r--nixpkgs/pkgs/development/libraries/readline/readline-8.2-patches.nix14
l---------nixpkgs/pkgs/development/libraries/readline/update-patch-set.sh1
-rw-r--r--nixpkgs/pkgs/development/libraries/readosm/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/recastnavigation/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/redis-plus-plus/0001-Fix-pkg-config-paths.patch14
-rw-r--r--nixpkgs/pkgs/development/libraries/redis-plus-plus/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/relibc/Cargo.lock600
-rw-r--r--nixpkgs/pkgs/development/libraries/relibc/default.nix85
-rw-r--r--nixpkgs/pkgs/development/libraries/rep-gtk/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/rep-gtk/setup-hook.sh5
-rw-r--r--nixpkgs/pkgs/development/libraries/reproc/default.nix53
-rw-r--r--nixpkgs/pkgs/development/libraries/resolv_wrapper/default.nix20
-rw-r--r--nixpkgs/pkgs/development/libraries/retro-gtk/default.nix77
-rw-r--r--nixpkgs/pkgs/development/libraries/retro-gtk/gio-unix.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/rinutils/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/rlog/default.nix18
-rw-r--r--nixpkgs/pkgs/development/libraries/rlottie-qml/default.nix73
-rw-r--r--nixpkgs/pkgs/development/libraries/rlottie/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/rnnoise-plugin/default.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/rnnoise-plugin/disable-ubsan.patch14
-rw-r--r--nixpkgs/pkgs/development/libraries/rnnoise/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/robin-map/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/rocksdb/default.nix105
-rw-r--r--nixpkgs/pkgs/development/libraries/rote/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/rtlcss/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/rtrlib/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/rttr/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/rubberband/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/rure/Cargo.lock61
-rw-r--r--nixpkgs/pkgs/development/libraries/rure/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/rure/pin.json5
-rwxr-xr-xnixpkgs/pkgs/development/libraries/rure/update.sh51
-rw-r--r--nixpkgs/pkgs/development/libraries/rustc-demangle/Cargo.lock67
-rw-r--r--nixpkgs/pkgs/development/libraries/rustc-demangle/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/rustls-ffi/Cargo.lock369
-rw-r--r--nixpkgs/pkgs/development/libraries/rustls-ffi/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/rutabaga_gfx/default.nix63
-rw-r--r--nixpkgs/pkgs/development/libraries/s2geometry/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/s2n-tls/default.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/safefile/default.nix18
-rw-r--r--nixpkgs/pkgs/development/libraries/sbc/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/sblim-sfcc/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/schroedinger/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/science/astronomy/cfitsio/darwin-rpath-universal.patch21
-rw-r--r--nixpkgs/pkgs/development/libraries/science/astronomy/cfitsio/default.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/science/astronomy/indilib/default.nix87
-rw-r--r--nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-3rdparty.nix100
-rw-r--r--nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-firmware.nix82
-rw-r--r--nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-full.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-with-drivers.nix18
-rw-r--r--nixpkgs/pkgs/development/libraries/science/astronomy/libnova/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/science/astronomy/libxisf/0001-Fix-pkg-config-paths.patch23
-rw-r--r--nixpkgs/pkgs/development/libraries/science/astronomy/libxisf/default.nix53
-rw-r--r--nixpkgs/pkgs/development/libraries/science/astronomy/stellarsolver/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/science/astronomy/wcslib/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/science/benchmark/papi/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/science/biology/bicgl/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/science/biology/bicpl/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/science/biology/bpp-core/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/science/biology/bpp-phyl/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/science/biology/bpp-popgen/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/science/biology/bpp-seq/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/science/biology/ciftilib/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/science/biology/edlib/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/science/biology/elastix/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/science/biology/gifticlib/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/science/biology/htslib/default.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/science/biology/mirtk/default.nix72
-rw-r--r--nixpkgs/pkgs/development/libraries/science/biology/nifticlib/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/science/biology/oobicpl/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/science/chemistry/avogadrolibs/default.nix72
-rw-r--r--nixpkgs/pkgs/development/libraries/science/chemistry/cppe/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/science/chemistry/dftd4/default.nix54
-rw-r--r--nixpkgs/pkgs/development/libraries/science/chemistry/harminv/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/science/chemistry/libGDSII/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/science/chemistry/libmsym/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/science/chemistry/libvdwxc/default.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/science/chemistry/mctc-lib/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/science/chemistry/mmtf-cpp/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/science/chemistry/molequeue/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/science/chemistry/mstore/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/science/chemistry/multicharge/default.nix53
-rw-r--r--nixpkgs/pkgs/development/libraries/science/chemistry/openmm/default.nix108
-rw-r--r--nixpkgs/pkgs/development/libraries/science/chemistry/plumed/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/science/chemistry/simple-dftd3/default.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/science/chemistry/simple-dftd3/python.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/science/chemistry/tblite/0001-fix-multicharge-dep-needed-for-static-compilation.patch31
-rw-r--r--nixpkgs/pkgs/development/libraries/science/chemistry/tblite/default.nix75
-rw-r--r--nixpkgs/pkgs/development/libraries/science/chemistry/tblite/python.nix61
-rw-r--r--nixpkgs/pkgs/development/libraries/science/chemistry/xcfun/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/science/electronics/coloquinte/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/science/electronics/qcsxcad/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/QuadProgpp/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/amd-blis/default.nix72
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/amd-libflame/default.nix62
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/arpack/default.nix68
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/blas/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/blis/default.nix64
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/bonmin/default.nix53
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/brial/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/cholmod-extra/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/clblas/default.nix68
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/clblas/platform.patch34
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/clblast/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/cliquer/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/clmagma/default.nix73
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/coin-utils/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/dbcsr/default.nix81
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/ecos/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/faiss/default.nix153
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/faiss/tests.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/flintqs/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/ipopt/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/itpp/default.nix53
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/latte-integrale/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/lcalc/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/libamplsolver/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/libamplsolver/libamplsolver-sharedlib.patch39
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/libbraiding/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/libhomfly/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/liblapack/default.nix83
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/liblbfgs/default.nix19
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/libtorch/bin.nix104
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/libtorch/binary-hashes.nix19
-rwxr-xr-xnixpkgs/pkgs/development/libraries/science/math/libtorch/prefetch.sh38
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/libtorch/test/CMakeLists.txt5
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/libtorch/test/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/libtorch/test/test.cpp20
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/lrs/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/m4ri/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/m4rie/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/magma/default.nix53
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/magma/generic.nix173
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/magma/releases.nix69
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/metis/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/mkl/default.nix186
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/mkl/test/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/mkl/test/test.c12
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/mongoose/default.nix69
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/openblas/default.nix269
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/openlibm/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/openspecfun/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/or-tools/default.nix126
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/or-tools/fix-stringview-compile.patch36
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/osi/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/osqp/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/p4est-sc/default.nix72
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/p4est/default.nix64
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/p4est/p4est-metis.patch26
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/parmetis/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/petsc/default.nix96
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/petsc/filter_mpi_warnings.patch100
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/planarity/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/rankwidth/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/rubiks/default.nix81
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/scalapack/default.nix75
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/scs/default.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/spooles/allocate.patch38
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/spooles/default.nix56
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/spooles/spooles.patch188
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/spooles/transform.patch43
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/suitesparse-graphblas/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/suitesparse/4.2.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/suitesparse/4.4.nix99
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/suitesparse/default.nix94
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/superlu/add-superlu-lib-as-dependency-for-the-unit-tests.patch7
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/superlu/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/sympow/clean-extra-logfile-output-from-pari.patch39
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/sympow/default.nix84
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/tensorflow-lite/default.nix108
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/tensorrt/extension.nix156
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/tiny-cuda-nn/default.nix163
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/trilinos/default.nix102
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/wcpg/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/science/math/zn_poly/default.nix64
-rw-r--r--nixpkgs/pkgs/development/libraries/science/networking/ns-3/default.nix143
-rw-r--r--nixpkgs/pkgs/development/libraries/science/robotics/edgetpu-compiler/default.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/science/robotics/ispike/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/scmccid/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/scope-lite/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/scriptaculous/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/sdbus-cpp/default.nix53
-rw-r--r--nixpkgs/pkgs/development/libraries/sealcurses/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/seasocks/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/sentencepiece/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/sentry-native/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/serd/default.nix62
-rw-r--r--nixpkgs/pkgs/development/libraries/serf/default.nix58
-rw-r--r--nixpkgs/pkgs/development/libraries/serf/scons.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/serialdv/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/sexpp/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/sfml/default.nix71
-rw-r--r--nixpkgs/pkgs/development/libraries/sfsexp/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/sgp4/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/shapelib/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/sharness/default.nix53
-rw-r--r--nixpkgs/pkgs/development/libraries/shhmsg/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/shhopt/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/shibboleth-sp/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/shine/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/signond/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/sigslot/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/silgraphite/graphite2.nix57
-rw-r--r--nixpkgs/pkgs/development/libraries/silgraphite/macosx.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/simdjson/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/simgear/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/simpleitk/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/slang/default.nix102
-rw-r--r--nixpkgs/pkgs/development/libraries/slib/catalog-in-library-vicinity.patch29
-rw-r--r--nixpkgs/pkgs/development/libraries/slib/default.nix64
-rw-r--r--nixpkgs/pkgs/development/libraries/slib/setup-hook.sh13
-rw-r--r--nixpkgs/pkgs/development/libraries/smarty3-i18n/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/smarty3/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/smooth/default.nix60
-rw-r--r--nixpkgs/pkgs/development/libraries/smpeg/default.nix73
-rw-r--r--nixpkgs/pkgs/development/libraries/smpeg/format.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/smpeg/gcc6.patch33
-rw-r--r--nixpkgs/pkgs/development/libraries/smpeg/gtk.patch15
-rw-r--r--nixpkgs/pkgs/development/libraries/smpeg/libx11.patch25
-rw-r--r--nixpkgs/pkgs/development/libraries/smpeg2/default.nix49
-rw-r--r--nixpkgs/pkgs/development/libraries/snap7/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/snappy/default.nix68
-rw-r--r--nixpkgs/pkgs/development/libraries/soci/bc-soci.nix53
-rw-r--r--nixpkgs/pkgs/development/libraries/soci/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/socket_wrapper/default.nix20
-rw-r--r--nixpkgs/pkgs/development/libraries/sofia-sip/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/soil/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/sokol/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/sol2/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/sonic/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/sonivox/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/sope/default.nix64
-rw-r--r--nixpkgs/pkgs/development/libraries/soqt/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/sord/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/soundtouch/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/soxt/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/span-lite/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/spandsp/3.nix20
-rw-r--r--nixpkgs/pkgs/development/libraries/spandsp/common.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/spandsp/default.nix18
-rw-r--r--nixpkgs/pkgs/development/libraries/sparrow3d/default.nix98
-rw-r--r--nixpkgs/pkgs/development/libraries/sparrow3d/sparrow3d.pc.in16
-rw-r--r--nixpkgs/pkgs/development/libraries/sparsehash/default.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/spdk/0001-fix-setuptools-installation.patch29
-rw-r--r--nixpkgs/pkgs/development/libraries/spdk/default.nix89
-rw-r--r--nixpkgs/pkgs/development/libraries/spdk/setuptools.patch25
-rw-r--r--nixpkgs/pkgs/development/libraries/spdlog/default.nix67
-rw-r--r--nixpkgs/pkgs/development/libraries/spectra/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/speech-tools/default.nix81
-rw-r--r--nixpkgs/pkgs/development/libraries/speechd/default.nix120
-rw-r--r--nixpkgs/pkgs/development/libraries/speechd/fix-mbrola-paths.patch21
-rw-r--r--nixpkgs/pkgs/development/libraries/speechd/fix-paths.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/speex/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/speexdsp/build-fix.patch24
-rw-r--r--nixpkgs/pkgs/development/libraries/speexdsp/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/spglib/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/spice-gtk/default.nix168
-rw-r--r--nixpkgs/pkgs/development/libraries/spice-protocol/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/spice/default.nix108
-rw-r--r--nixpkgs/pkgs/development/libraries/spice/remove-rt-on-darwin.patch18
-rw-r--r--nixpkgs/pkgs/development/libraries/spirv-headers/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/sptk/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/sqlcipher/default.nix68
-rw-r--r--nixpkgs/pkgs/development/libraries/sqlite/archive-version.nix9
-rw-r--r--nixpkgs/pkgs/development/libraries/sqlite/default.nix112
-rw-r--r--nixpkgs/pkgs/development/libraries/sqlite/sqlar.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/sqlite/tools.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/sqlitecpp/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/sregex/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/srt/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/srt/no-msvc-compat-headers.patch10
-rw-r--r--nixpkgs/pkgs/development/libraries/srtp/default.nix57
-rw-r--r--nixpkgs/pkgs/development/libraries/stargate-libcds/Makefile.patch19
-rw-r--r--nixpkgs/pkgs/development/libraries/stargate-libcds/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/startup-notification/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/stb/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/stduuid/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/stfl/default.nix56
-rw-r--r--nixpkgs/pkgs/development/libraries/stxxl/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/subunit/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/sundials/default.nix74
-rw-r--r--nixpkgs/pkgs/development/libraries/svrcore/default.nix20
-rw-r--r--nixpkgs/pkgs/development/libraries/swiften/build-fix.patch42
-rw-r--r--nixpkgs/pkgs/development/libraries/swiften/default.nix89
-rw-r--r--nixpkgs/pkgs/development/libraries/swiften/scons.patch9
-rw-r--r--nixpkgs/pkgs/development/libraries/swiftshader/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/sword/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/sycl-info/default.nix57
-rw-r--r--nixpkgs/pkgs/development/libraries/symengine/default.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/szip/default.nix16
-rw-r--r--nixpkgs/pkgs/development/libraries/t1lib/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/ta-lib/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/tachyon/default.nix77
-rw-r--r--nixpkgs/pkgs/development/libraries/tachyon/make-archs.patch37
-rw-r--r--nixpkgs/pkgs/development/libraries/tachyon/no-absolute-paths.patch60
-rw-r--r--nixpkgs/pkgs/development/libraries/taco/default.nix54
-rw-r--r--nixpkgs/pkgs/development/libraries/taco/taco.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/taglib-extras/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/taglib-sharp/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/taglib/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/tagparser/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/talloc/default.nix76
-rw-r--r--nixpkgs/pkgs/development/libraries/taskflow/default.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/taskflow/unvendor-doctest.patch21
-rw-r--r--nixpkgs/pkgs/development/libraries/tbb/2020_3.nix107
-rw-r--r--nixpkgs/pkgs/development/libraries/tbb/default.nix80
-rw-r--r--nixpkgs/pkgs/development/libraries/tbox/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/tbox/libtbox.pc.in10
-rw-r--r--nixpkgs/pkgs/development/libraries/tcl-fcgi/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/tclap/1.2.nix18
-rw-r--r--nixpkgs/pkgs/development/libraries/tclap/1.4.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/tcllib/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/tcltls/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/tclx/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/tdb/default.nix72
-rw-r--r--nixpkgs/pkgs/development/libraries/tdlib/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/telepathy/farstream/default.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/telepathy/glib/default.nix60
-rw-r--r--nixpkgs/pkgs/development/libraries/telepathy/qt/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/template-glib/default.nix69
-rw-r--r--nixpkgs/pkgs/development/libraries/tepl/default.nix70
-rw-r--r--nixpkgs/pkgs/development/libraries/termbench-pro/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/termbox/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/termcolor/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/test-drive/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/tevent/default.nix68
-rw-r--r--nixpkgs/pkgs/development/libraries/text-engine/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/tezos-rust-libs/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/the-foundation/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/theft/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/thrift/0.10.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/thrift/default.nix139
-rw-r--r--nixpkgs/pkgs/development/libraries/thrift/disable-failing-test.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/ti-rpc/default.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/ticpp/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/tidyp/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/tiledb/FindMagic_EP.cmake.patch14
-rw-r--r--nixpkgs/pkgs/development/libraries/tiledb/default.nix122
-rw-r--r--nixpkgs/pkgs/development/libraries/timezonemap/default.nix76
-rw-r--r--nixpkgs/pkgs/development/libraries/tinycbor/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/tinycdb/default.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/tinyobjloader/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/tinyxml/2.6.2-add-pkgconfig.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/tinyxml/2.6.2-cxx.patch17
-rw-r--r--nixpkgs/pkgs/development/libraries/tinyxml/2.6.2-entity.patch64
-rw-r--r--nixpkgs/pkgs/development/libraries/tinyxml/2.6.2.nix91
-rw-r--r--nixpkgs/pkgs/development/libraries/tix/default.nix65
-rw-r--r--nixpkgs/pkgs/development/libraries/tix/duplicated-xlowerwindow.patch49
-rw-r--r--nixpkgs/pkgs/development/libraries/tix/fix-clang16.patch215
-rw-r--r--nixpkgs/pkgs/development/libraries/tk/8.5.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/tk/8.6.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/tk/generic.nix74
-rw-r--r--nixpkgs/pkgs/development/libraries/tk/tk-8_6_13-find-library.patch25
-rw-r--r--nixpkgs/pkgs/development/libraries/tkimg/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/tkrzw/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/tl-expected/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/tllist/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/tnt/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/tntdb/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/tntnet/default.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/tokyo-cabinet/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/tokyo-tyrant/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/toml-f/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/toml11/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/tomlc99/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/tomlcpp/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/tomlplusplus/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/totem-pl-parser/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/tpm2-tss/default.nix98
-rw-r--r--nixpkgs/pkgs/development/libraries/tpm2-tss/no-dynamic-loader-path.patch234
-rw-r--r--nixpkgs/pkgs/development/libraries/tracker-miners/default.nix144
-rw-r--r--nixpkgs/pkgs/development/libraries/tracker/default.nix176
-rw-r--r--nixpkgs/pkgs/development/libraries/tre/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/tremor/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/trompeloeil/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/tsocks/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/tsocks/poll.patch26
-rw-r--r--nixpkgs/pkgs/development/libraries/tweeny/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/twolame/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/ubus/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/ucc/default.nix65
-rw-r--r--nixpkgs/pkgs/development/libraries/uci/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/ucl/default.nix21
-rw-r--r--nixpkgs/pkgs/development/libraries/uclient/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/ucommon/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/ucx/default.nix86
-rw-r--r--nixpkgs/pkgs/development/libraries/udns/default.nix56
-rw-r--r--nixpkgs/pkgs/development/libraries/udunits/default.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/uhttpmock/default.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/uid_wrapper/default.nix20
-rw-r--r--nixpkgs/pkgs/development/libraries/umockdev/default.nix126
-rw-r--r--nixpkgs/pkgs/development/libraries/umockdev/hardcode-paths.patch69
-rw-r--r--nixpkgs/pkgs/development/libraries/umockdev/substitute-udevadm.patch41
-rw-r--r--nixpkgs/pkgs/development/libraries/unibilium/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/unicap/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/unicorn/default.nix49
-rw-r--r--nixpkgs/pkgs/development/libraries/unittest-cpp/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/unixODBC/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/unixODBCDrivers/default.nix338
-rw-r--r--nixpkgs/pkgs/development/libraries/unixODBCDrivers/mariadb-connector-odbc-unistd.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/unqlite/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/updfparser/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/urdfdom-headers/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/urdfdom/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/uri/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/uriparser/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/usbredir/default.nix53
-rw-r--r--nixpkgs/pkgs/development/libraries/usrsctp/clang-fix-build.patch183
-rw-r--r--nixpkgs/pkgs/development/libraries/usrsctp/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/ustr/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/ustr/va_args.patch23
-rw-r--r--nixpkgs/pkgs/development/libraries/ustream-ssl/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/utf8cpp/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/utf8proc/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/uthash/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/uthenticode/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/v8/darwin.patch22
-rw-r--r--nixpkgs/pkgs/development/libraries/v8/default.nix181
-rwxr-xr-xnixpkgs/pkgs/development/libraries/v8/update.sh62
-rw-r--r--nixpkgs/pkgs/development/libraries/vaapi-intel-hybrid/default.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/vaapi-vdpau/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/valhalla/default.nix102
-rw-r--r--nixpkgs/pkgs/development/libraries/vapoursynth-mvtools/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/vapoursynth/0001-Call-weak-function-to-allow-adding-preloaded-plugins.patch74
-rw-r--r--nixpkgs/pkgs/development/libraries/vapoursynth/default.nix67
-rw-r--r--nixpkgs/pkgs/development/libraries/vapoursynth/editor.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/vapoursynth/plugin-interface.nix114
-rw-r--r--nixpkgs/pkgs/development/libraries/vc/0.7.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/vc/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/vc/vc_0_7_clang_fix.patch28
-rw-r--r--nixpkgs/pkgs/development/libraries/vcdimager/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/vcg/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/vectorscan/default.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/vid-stab/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/vigra/default.nix60
-rw-r--r--nixpkgs/pkgs/development/libraries/virglrenderer/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/virtualpg/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/vk-bootstrap/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/vkd3d-proton/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/vkd3d/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/vmime/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/vmmlib/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/vmmlib/disable-cpack.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/vo-aacenc/default.nix19
-rw-r--r--nixpkgs/pkgs/development/libraries/vo-amrwbenc/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/volk/2.5.0.nix60
-rw-r--r--nixpkgs/pkgs/development/libraries/volk/default.nix58
-rw-r--r--nixpkgs/pkgs/development/libraries/volume-key/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/vrb/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/vrb/removed_options.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/vrb/unused-but-set-variable.patch19
-rw-r--r--nixpkgs/pkgs/development/libraries/vrpn/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/vsqlite/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/vte/default.nix139
-rw-r--r--nixpkgs/pkgs/development/libraries/vtk/9.x.nix5
-rw-r--r--nixpkgs/pkgs/development/libraries/vtk/generic.nix116
-rw-r--r--nixpkgs/pkgs/development/libraries/vtk/vtk.egg-info5
-rw-r--r--nixpkgs/pkgs/development/libraries/vulkan-headers/default.nix24
-rwxr-xr-xnixpkgs/pkgs/development/libraries/vulkan-headers/update.sh24
-rw-r--r--nixpkgs/pkgs/development/libraries/vulkan-loader/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/vulkan-loader/fix-pkgconfig.patch14
-rw-r--r--nixpkgs/pkgs/development/libraries/vulkan-utility-libraries/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/vxl/default.nix50
-rw-r--r--nixpkgs/pkgs/development/libraries/waffle/default.nix71
-rw-r--r--nixpkgs/pkgs/development/libraries/wangle/default.nix68
-rw-r--r--nixpkgs/pkgs/development/libraries/wapp/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/wasilibc/default.nix68
-rw-r--r--nixpkgs/pkgs/development/libraries/wavpack/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/wayland/darwin.patch74
-rw-r--r--nixpkgs/pkgs/development/libraries/wayland/default.nix126
-rw-r--r--nixpkgs/pkgs/development/libraries/wayland/protocols.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/waylandpp/default.nix65
-rw-r--r--nixpkgs/pkgs/development/libraries/waylib/default.nix74
-rw-r--r--nixpkgs/pkgs/development/libraries/wayqt/default.nix61
-rw-r--r--nixpkgs/pkgs/development/libraries/wayqt/fix-qtwayland-header-path.diff16
-rw-r--r--nixpkgs/pkgs/development/libraries/webkit2-sharp/default.nix57
-rw-r--r--nixpkgs/pkgs/development/libraries/webkitgtk/default.nix249
-rw-r--r--nixpkgs/pkgs/development/libraries/webkitgtk/fdo-backend-path.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/webkitgtk/fix-bubblewrap-paths.patch17
-rw-r--r--nixpkgs/pkgs/development/libraries/webp-pixbuf-loader/default.nix69
-rw-r--r--nixpkgs/pkgs/development/libraries/webrtc-audio-processing/0.3.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/webrtc-audio-processing/default.nix55
-rw-r--r--nixpkgs/pkgs/development/libraries/webrtc-audio-processing/enable-powerpc.patch37
-rw-r--r--nixpkgs/pkgs/development/libraries/webrtc-audio-processing/enable-riscv.patch18
-rw-r--r--nixpkgs/pkgs/development/libraries/websocket++/default.nix23
-rw-r--r--nixpkgs/pkgs/development/libraries/wfa2-lib/default.nix37
-rw-r--r--nixpkgs/pkgs/development/libraries/whereami/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/wiiuse/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/wildmidi/default.nix61
-rw-r--r--nixpkgs/pkgs/development/libraries/wiredtiger/default.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/wlroots/default.nix148
-rw-r--r--nixpkgs/pkgs/development/libraries/wlroots/protocols.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/wolfssl/default.nix106
-rw-r--r--nixpkgs/pkgs/development/libraries/wt/default.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/wtk/builder.sh28
-rw-r--r--nixpkgs/pkgs/development/libraries/wtk/default.nix26
-rw-r--r--nixpkgs/pkgs/development/libraries/wxSVG/default.nix58
-rw-r--r--nixpkgs/pkgs/development/libraries/wxsqlite3/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/wxsqliteplus/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/wxwidgets/patches/0001-fix-assertion-using-hide-in-destroy.patch43
-rw-r--r--nixpkgs/pkgs/development/libraries/wxwidgets/wxGTK31.nix149
-rw-r--r--nixpkgs/pkgs/development/libraries/wxwidgets/wxGTK32.nix165
-rw-r--r--nixpkgs/pkgs/development/libraries/x264/default.nix65
-rw-r--r--nixpkgs/pkgs/development/libraries/x264/disable-arm-neon-default.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/x265/default.nix156
-rw-r--r--nixpkgs/pkgs/development/libraries/x265/fix-neon-detection.patch28
-rw-r--r--nixpkgs/pkgs/development/libraries/xalanc/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/xapian/default.nix63
-rw-r--r--nixpkgs/pkgs/development/libraries/xapian/tools/omega/default.nix22
-rw-r--r--nixpkgs/pkgs/development/libraries/xavs/default.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/xbase/default.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/xbase/xbase-fixes.patch34
-rw-r--r--nixpkgs/pkgs/development/libraries/xcb-imdkit/default.nix41
-rw-r--r--nixpkgs/pkgs/development/libraries/xcb-util-cursor/HEAD.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/xcb-util-cursor/m4/ax_compare_version.m4174
-rw-r--r--nixpkgs/pkgs/development/libraries/xcb-util-cursor/m4/xcb_util_common.m444
-rw-r--r--nixpkgs/pkgs/development/libraries/xcb-util-cursor/m4/xcb_util_m4_with_include_path.m424
-rw-r--r--nixpkgs/pkgs/development/libraries/xdg-dbus-proxy/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/xdg-desktop-portal-gnome/default.nix76
-rw-r--r--nixpkgs/pkgs/development/libraries/xdg-desktop-portal-gtk/default.nix58
-rw-r--r--nixpkgs/pkgs/development/libraries/xdg-desktop-portal-wlr/default.nix53
-rw-r--r--nixpkgs/pkgs/development/libraries/xdg-desktop-portal-xapp/default.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/xdg-desktop-portal/default.nix145
-rw-r--r--nixpkgs/pkgs/development/libraries/xdg-desktop-portal/installed-tests-path.patch30
-rw-r--r--nixpkgs/pkgs/development/libraries/xdg-desktop-portal/nix-pkgdatadir-env.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/xed/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/xercesc/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/xeus-zmq/default.nix45
-rw-r--r--nixpkgs/pkgs/development/libraries/xeus/default.nix47
-rw-r--r--nixpkgs/pkgs/development/libraries/xgboost/default.nix149
-rw-r--r--nixpkgs/pkgs/development/libraries/xlslib/default.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/xmake-core-sv/default.nix30
-rw-r--r--nixpkgs/pkgs/development/libraries/xml-security-c/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/xml-tooling-c/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/xmlrpc-c/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/xmlsec/default.nix91
-rw-r--r--nixpkgs/pkgs/development/libraries/xmlsec/lt_dladdsearchdir.patch16
-rw-r--r--nixpkgs/pkgs/development/libraries/xmlsec/remove_bsd_base64_decode_flag.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/xsd/default.nix39
-rw-r--r--nixpkgs/pkgs/development/libraries/xsd/xsdcxx.patch126
-rw-r--r--nixpkgs/pkgs/development/libraries/xsimd/default.nix60
-rw-r--r--nixpkgs/pkgs/development/libraries/xsimd/disable-exp10-test.patch36
-rw-r--r--nixpkgs/pkgs/development/libraries/xsimd/disable-polar-test.patch38
-rw-r--r--nixpkgs/pkgs/development/libraries/xsimd/disable-test_error_gamma-test.patch36
-rw-r--r--nixpkgs/pkgs/development/libraries/xsimd/fix-atan-test.patch19
-rw-r--r--nixpkgs/pkgs/development/libraries/xsimd/fix-darwin-exp10-implementation.patch22
-rw-r--r--nixpkgs/pkgs/development/libraries/xtensor/default.nix68
-rw-r--r--nixpkgs/pkgs/development/libraries/xtensor/remove-failing-test_xinfo.patch12
-rw-r--r--nixpkgs/pkgs/development/libraries/xtl/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/xvidcore/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/xxHash/default.nix44
-rw-r--r--nixpkgs/pkgs/development/libraries/xylib/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/yajl/cmake-shared-static-fix.patch89
-rw-r--r--nixpkgs/pkgs/development/libraries/yajl/default.nix40
-rw-r--r--nixpkgs/pkgs/development/libraries/yaml-cpp/0.3.0.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/yaml-cpp/default.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/yas/default.nix28
-rw-r--r--nixpkgs/pkgs/development/libraries/yascreen/default.nix31
-rw-r--r--nixpkgs/pkgs/development/libraries/yder/default.nix49
-rw-r--r--nixpkgs/pkgs/development/libraries/yder/fix-pkgconfig.patch13
-rw-r--r--nixpkgs/pkgs/development/libraries/yojimbo/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/yubico-pam/default.nix34
-rw-r--r--nixpkgs/pkgs/development/libraries/yyjson/default.nix29
-rw-r--r--nixpkgs/pkgs/development/libraries/zchunk/default.nix51
-rw-r--r--nixpkgs/pkgs/development/libraries/zeitgeist/default.nix81
-rw-r--r--nixpkgs/pkgs/development/libraries/zeroc-ice/default.nix83
-rw-r--r--nixpkgs/pkgs/development/libraries/zeromq/4.x.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/zimg/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/zimlib/default.nix63
-rw-r--r--nixpkgs/pkgs/development/libraries/zint/default.nix58
-rw-r--r--nixpkgs/pkgs/development/libraries/zlib-ng/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/zlib/default.nix145
-rw-r--r--nixpkgs/pkgs/development/libraries/zlog/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/zmqpp/default.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/zmusic/default.nix69
-rw-r--r--nixpkgs/pkgs/development/libraries/zookeeper_mt/default.nix56
-rw-r--r--nixpkgs/pkgs/development/libraries/zxcvbn-c/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/zxing-cpp/default.nix56
-rw-r--r--nixpkgs/pkgs/development/libraries/zydis/default.nix43
-rw-r--r--nixpkgs/pkgs/development/libraries/zydis/zycore.nix25
-rw-r--r--nixpkgs/pkgs/development/libraries/zziplib/default.nix86
3332 files changed, 189417 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/AntTweakBar/default.nix b/nixpkgs/pkgs/development/libraries/AntTweakBar/default.nix
new file mode 100644
index 000000000000..6c1eeff94118
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/AntTweakBar/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchurl, unzip, xorg, libGLU, libGL }:
+
+stdenv.mkDerivation rec {
+  pname = "AntTweakBar";
+  version = "1.16";
+
+  nativeBuildInputs = [ unzip ];
+  buildInputs = [ xorg.libX11 libGLU libGL ];
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/anttweakbar/AntTweakBar_${lib.replaceStrings ["."] [""] version}.zip";
+    sha256 = "0z3frxpzf54cjs07m6kg09p7nljhr7140f4pznwi7srwq4cvgkpv";
+  };
+
+  postPatch = "cd src";
+  installPhase = ''
+    mkdir -p $out/lib/
+    cp ../lib/{libAntTweakBar.so,libAntTweakBar.so.1,libAntTweakBar.a} $out/lib/
+    cp -r ../include $out/
+  '';
+
+  meta = {
+    description = "Add a light/intuitive GUI to OpenGL applications";
+    longDescription = ''
+      A small and easy-to-use C/C++ library that allows to quickly add a light
+      and intuitive graphical user interface into graphic applications based on OpenGL
+      (compatibility and core profiles), DirectX 9, DirectX 10 or DirectX 11
+      to interactively tweak parameters on-screen
+    '';
+    homepage = "https://anttweakbar.sourceforge.net/";
+    license = lib.licenses.zlib;
+    maintainers = [ lib.maintainers.razvan ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/CGAL/4.nix b/nixpkgs/pkgs/development/libraries/CGAL/4.nix
new file mode 100644
index 000000000000..d04a7bccded6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/CGAL/4.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, fetchurl, fetchpatch, cmake, boost, gmp, mpfr }:
+
+stdenv.mkDerivation rec {
+  version = "4.14.3";
+  pname = "cgal";
+
+  src = fetchurl {
+    url = "https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-${version}/CGAL-${version}.tar.xz";
+    hash = "sha256-W6/nq+hDW+yhehCCBi02M2jsHj8NZYG7DaiwEPs4n+Q=";
+  };
+
+  patches = [
+    ./cgal_path.patch
+
+    # Pull upstream fix for c++17 (gcc-12):
+    #  https://github.com/CGAL/cgal/pull/6109
+    (fetchpatch {
+      name = "gcc-12-prereq.patch";
+      url = "https://github.com/CGAL/cgal/commit/4581f1b7a8e97d1a136830e64b77cdae3546c4bf.patch";
+      relative = "CGAL_Core"; # Upstream slightly reordered directory structure since.
+      sha256 = "sha256-4+7mzGSBwAv5RHBQPAecPPKNN/LQBgvYq5mq+fHAteo=";
+    })
+    (fetchpatch {
+      name = "gcc-12.patch";
+      url = "https://github.com/CGAL/cgal/commit/6680a6e6f994b2c5b9f068eb3014d12ee1134d53.patch";
+      relative = "CGAL_Core"; # Upstream slightly reordered directory structure since.
+      sha256 = "sha256-8kxJDT47jXI9kQNFI/ARWl9JBNS4AfU57/D0tYlgW0M=";
+    })
+  ];
+
+  # note: optional component libCGAL_ImageIO would need zlib and opengl;
+  #   there are also libCGAL_Qt{3,4} omitted ATM
+  buildInputs = [ boost gmp mpfr ];
+  nativeBuildInputs = [ cmake ];
+
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Computational Geometry Algorithms Library";
+    homepage = "http://cgal.org";
+    license = with licenses; [ gpl3Plus lgpl3Plus];
+    platforms = platforms.all;
+    maintainers = [ maintainers.raskin ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/CGAL/cgal_path.patch b/nixpkgs/pkgs/development/libraries/CGAL/cgal_path.patch
new file mode 100644
index 000000000000..68eec5fbb21f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/CGAL/cgal_path.patch
@@ -0,0 +1,15 @@
+--- Installation/cmake/modules/CGALConfig_install.cmake.in.original	2019-07-10 10:39:12.377022659 -0700
++++ Installation/cmake/modules/CGALConfig_install.cmake.in	2019-07-10 10:47:24.310154928 -0700
+@@ -45,9 +45,9 @@
+ set(CGAL_SHARED_LINKER_FLAGS_DEBUG_INIT   "@CMAKE_SHARED_LINKER_FLAGS_DEBUG@" )
+ set(CGAL_BUILD_TYPE_INIT                  "@CMAKE_BUILD_TYPE@" )
+
+-set(CGAL_INCLUDE_DIRS  "${CGAL_INSTALL_PREFIX}/@CGAL_INSTALL_INC_DIR@" )
+-set(CGAL_MODULES_DIR   "${CGAL_INSTALL_PREFIX}/@CGAL_INSTALL_CMAKE_DIR@" )
+-set(CGAL_LIBRARIES_DIR "${CGAL_INSTALL_PREFIX}/@CGAL_INSTALL_LIB_DIR@" )
++set(CGAL_INCLUDE_DIRS  "@CGAL_INSTALL_INC_DIR@" )
++set(CGAL_MODULES_DIR   "@CGAL_INSTALL_CMAKE_DIR@" )
++set(CGAL_LIBRARIES_DIR "@CGAL_INSTALL_LIB_DIR@" )
+
+ # If CGAL_ImageIO is built, tell if it was linked with Zlib.
+ set(CGAL_ImageIO_USE_ZLIB                 "@CGAL_ImageIO_USE_ZLIB@" )
diff --git a/nixpkgs/pkgs/development/libraries/CGAL/default.nix b/nixpkgs/pkgs/development/libraries/CGAL/default.nix
new file mode 100644
index 000000000000..672facdc230c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/CGAL/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv
+, fetchurl
+, cmake
+, boost
+, gmp
+, mpfr
+}:
+
+stdenv.mkDerivation rec {
+  pname = "cgal";
+  version = "5.5.3";
+
+  src = fetchurl {
+    url = "https://github.com/CGAL/cgal/releases/download/v${version}/CGAL-${version}.tar.xz";
+    hash = "sha256-CgT2YmkyVjKLBbq/q7XjpbfbL1pY1S48Ug350IKN3XM=";
+  };
+
+  # note: optional component libCGAL_ImageIO would need zlib and opengl;
+  #   there are also libCGAL_Qt{3,4} omitted ATM
+  buildInputs = [ boost gmp mpfr ];
+  nativeBuildInputs = [ cmake ];
+
+  patches = [ ./cgal_path.patch ];
+
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Computational Geometry Algorithms Library";
+    homepage = "http://cgal.org";
+    license = with licenses; [ gpl3Plus lgpl3Plus];
+    platforms = platforms.all;
+    maintainers = [ maintainers.raskin ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/CoinMP/default.nix b/nixpkgs/pkgs/development/libraries/CoinMP/default.nix
new file mode 100644
index 000000000000..0a2954f4a7dd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/CoinMP/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "CoinMP";
+  version = "1.8.4";
+
+  src = fetchurl {
+    url = "https://www.coin-or.org/download/source/CoinMP/${pname}-${version}.tgz";
+    sha256 = "13d3j1sdcjzpijp4qks3n0zibk649ac3hhv88hkk8ffxrc6gnn9l";
+  };
+
+  enableParallelBuilding = true;
+
+  env = lib.optionalAttrs stdenv.cc.isClang {
+    CXXFLAGS = "-std=c++14";
+  };
+
+  hardeningDisable = [ "format" ];
+
+  meta = with lib; {
+    homepage = "https://projects.coin-or.org/CoinMP/";
+    description = "COIN-OR lightweight API for COIN-OR libraries CLP, CBC, and CGL";
+    platforms = platforms.unix;
+    license = licenses.epl10;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/LAStools/default.nix b/nixpkgs/pkgs/development/libraries/LAStools/default.nix
new file mode 100644
index 000000000000..2f2b3b23ae31
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/LAStools/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "LAStools";
+  version = "2.0.2";
+
+  src = fetchFromGitHub {
+    owner = "LAStools";
+    repo = "LAStools";
+    rev = "v${version}";
+    sha256 = "sha256-HL64koe0GNzJzyA0QP4I0M1y2HSxigsZTqOw67RCwNc=";
+  };
+
+  patches = [
+    ./drop-64-suffix.patch # necessary to prevent '64' from being appended to the names of the executables
+  ];
+
+  hardeningDisable = [
+    "format"
+  ];
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  meta = with lib; {
+    description = "Software for rapid LiDAR processing";
+    homepage = "http://lastools.org/";
+    license = licenses.unfree;
+    maintainers = with maintainers; [ stephenwithph ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/LAStools/drop-64-suffix.patch b/nixpkgs/pkgs/development/libraries/LAStools/drop-64-suffix.patch
new file mode 100644
index 000000000000..2090baeb3b2b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/LAStools/drop-64-suffix.patch
@@ -0,0 +1,13 @@
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -32,6 +32,6 @@ endforeach(TARGET)
+ foreach(TARGET ${ALL_TARGETS})
+ 	target_link_libraries(${TARGET} LASlib)
+ 	set_target_properties(${TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../bin64)
+-	set_target_properties(${TARGET} PROPERTIES OUTPUT_NAME ${TARGET}64)
++	set_target_properties(${TARGET} PROPERTIES OUTPUT_NAME ${TARGET})
+ 	install(TARGETS ${TARGET} RUNTIME DESTINATION bin)
+ endforeach(TARGET)
+-- 
+2.28.0
+
diff --git a/nixpkgs/pkgs/development/libraries/LASzip/LASzip2.nix b/nixpkgs/pkgs/development/libraries/LASzip/LASzip2.nix
new file mode 100644
index 000000000000..4f63dfe8059c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/LASzip/LASzip2.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  version = "2.2.0";
+  pname = "LASzip";
+
+  src = fetchFromGitHub {
+    owner = "LASzip";
+    repo = "LASzip";
+    rev = "v${version}";
+    sha256 = "sha256-TXzse4oLjNX5R2xDR721iV+gW/rP5z3Zciv4OgxfeqA=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "Turn quickly bulky LAS files into compact LAZ files without information loss";
+    homepage = "https://laszip.org";
+    license = licenses.lgpl2;
+    maintainers = [ maintainers.michelk ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/LASzip/default.nix b/nixpkgs/pkgs/development/libraries/LASzip/default.nix
new file mode 100644
index 000000000000..ee6e74aa7bc2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/LASzip/default.nix
@@ -0,0 +1,33 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, fixDarwinDylibNames
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  version = "3.4.3";
+  pname = "LASzip";
+
+  src = fetchFromGitHub {
+    owner = "LASzip";
+    repo = "LASzip";
+    rev = finalAttrs.version;
+    hash = "sha256-9fzal54YaocONtguOCxnP7h1LejQPQ0dKFiCzfvTjCY=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ] ++ lib.optionals stdenv.isDarwin [
+    fixDarwinDylibNames
+  ];
+
+  meta = {
+    description = "Turn quickly bulky LAS files into compact LAZ files without information loss";
+    homepage = "https://laszip.org";
+    changelog = "https://github.com/LASzip/LASzip/releases/tag/${finalAttrs.src.rev}";
+    license = lib.licenses.lgpl2;
+    maintainers = [ lib.maintainers.michelk ];
+    platforms = lib.platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/SDL/default.nix b/nixpkgs/pkgs/development/libraries/SDL/default.nix
new file mode 100644
index 000000000000..fa816c0add0f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/SDL/default.nix
@@ -0,0 +1,135 @@
+{ lib, stdenv, config, fetchurl, fetchpatch, pkg-config, audiofile, libcap, libiconv
+, libGLSupported ? lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms
+, openglSupport ? libGLSupported, libGL, libGLU
+, alsaSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid, alsa-lib
+, x11Support ? !stdenv.isCygwin && !stdenv.hostPlatform.isAndroid
+, libXext, libICE, libXrandr
+, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux && !stdenv.hostPlatform.isAndroid, libpulseaudio
+, OpenGL, GLUT, CoreAudio, CoreServices, AudioUnit, Kernel, Cocoa
+}:
+
+# NOTE: When editing this expression see if the same change applies to
+# SDL2 expression too
+
+let
+  extraPropagatedBuildInputs = [ ]
+    ++ lib.optionals x11Support [ libXext libICE libXrandr ]
+    ++ lib.optionals (openglSupport && stdenv.isLinux) [ libGL libGLU ]
+    ++ lib.optionals (openglSupport && stdenv.isDarwin) [ OpenGL GLUT ]
+    ++ lib.optional alsaSupport alsa-lib
+    ++ lib.optional pulseaudioSupport libpulseaudio
+    ++ lib.optional stdenv.isDarwin Cocoa;
+  rpath = lib.makeLibraryPath extraPropagatedBuildInputs;
+in
+
+stdenv.mkDerivation rec {
+  pname = "SDL";
+  version = "1.2.15";
+
+  src = fetchurl {
+    url    = "https://www.libsdl.org/release/${pname}-${version}.tar.gz";
+    sha256 = "005d993xcac8236fpvd1iawkz4wqjybkpn8dbwaliqz5jfkidlyn";
+  };
+
+  outputs = [ "out" "dev" ];
+  outputBin = "dev"; # sdl-config
+
+  nativeBuildInputs = [ pkg-config ]
+    ++ lib.optional stdenv.isLinux libcap;
+
+  propagatedBuildInputs = [ libiconv ] ++ extraPropagatedBuildInputs;
+
+  buildInputs = [ ]
+    ++ lib.optional (!stdenv.hostPlatform.isMinGW && alsaSupport) audiofile
+    ++ lib.optionals stdenv.isDarwin [ AudioUnit CoreAudio CoreServices Kernel OpenGL ];
+
+  configureFlags = [
+    "--disable-oss"
+    "--disable-video-x11-xme"
+    "--enable-rpath"
+  # Building without this fails on Darwin with
+  #
+  #   ./src/video/x11/SDL_x11sym.h:168:17: error: conflicting types for '_XData32'
+  #   SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return)
+  #
+  # Please try revert the change that introduced this comment when updating SDL.
+  ] ++ lib.optional stdenv.isDarwin "--disable-x11-shared"
+    ++ lib.optional (!x11Support) "--without-x"
+    ++ lib.optional alsaSupport "--with-alsa-prefix=${alsa-lib.out}/lib";
+
+  patches = [
+    ./find-headers.patch
+
+    # Fix window resizing issues, e.g. for xmonad
+    # Ticket: http://bugzilla.libsdl.org/show_bug.cgi?id=1430
+    (fetchpatch {
+      name = "fix_window_resizing.diff";
+      url = "https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=10;filename=fix_window_resizing.diff;att=2;bug=665779";
+      sha256 = "1z35azc73vvi19pzi6byck31132a8w1vzrghp1x3hy4a4f9z4gc6";
+    })
+    # Fix drops of keyboard events for SDL_EnableUNICODE
+    (fetchpatch {
+      url = "https://github.com/libsdl-org/SDL-1.2/commit/0332e2bb18dc68d6892c3b653b2547afe323854b.patch";
+      sha256 = "0g458iv6pp9sikdch6ms8svz60lf5ks2q5wgid8s9rydhk98lpp5";
+    })
+    # Ignore insane joystick axis events
+    (fetchpatch {
+      url = "https://github.com/libsdl-org/SDL-1.2/commit/ab99cc82b0a898ad528d46fa128b649a220a94f4.patch";
+      sha256 = "1b3473sawfdbkkxaqf1hg0vn37yk8hf655jhnjwdk296z4gclazh";
+    })
+    # https://bugzilla.libsdl.org/show_bug.cgi?id=1769
+    (fetchpatch {
+      url = "https://github.com/libsdl-org/SDL-1.2/commit/5d79977ec7a6b58afa6e4817035aaaba186f7e9f.patch";
+      sha256 = "1k7y57b1zy5afib1g7w3in36n8cswbcrzdbrjpn5cb105rnb9vmp";
+    })
+    # Workaround X11 bug to allow changing gamma
+    # Ticket: https://bugs.freedesktop.org/show_bug.cgi?id=27222
+    (fetchpatch {
+      name = "SDL_SetGamma.patch";
+      url = "https://src.fedoraproject.org/rpms/SDL/raw/7a07323e5cec08bea6f390526f86a1ce5341596d/f/SDL-1.2.15-x11-Bypass-SetGammaRamp-when-changing-gamma.patch";
+      sha256 = "0x52s4328kilyq43i7psqkqg7chsfwh0aawr50j566nzd7j51dlv";
+    })
+    # Fix a build failure on OS X Mavericks
+    # Ticket: https://bugzilla.libsdl.org/show_bug.cgi?id=2085
+    (fetchpatch {
+      url = "https://github.com/libsdl-org/SDL-1.2/commit/19039324be71738d8990e91b9ba341b2ea068445.patch";
+      sha256 = "0ckwling2ad27c9vxgp97ndjd098d6zbrydza8b9l77k8airj98c";
+    })
+    (fetchpatch {
+      url = "https://github.com/libsdl-org/SDL-1.2/commit/7933032ad4d57c24f2230db29f67eb7d21bb5654.patch";
+      sha256 = "1by16firaxyr0hjvn35whsgcmq6bl0nwhnpjf75grjzsw9qvwyia";
+    })
+    (fetchpatch {
+      name = "CVE-2022-34568.patch";
+      url = "https://github.com/libsdl-org/SDL-1.2/commit/d7e00208738a0bc6af302723fe64908ac35b777b.patch";
+      sha256 = "sha256-fuxXsqZW94/C8CKu9LakppCU4zHupj66O2MngQ4BO9o=";
+    })
+  ];
+
+  postInstall = ''
+    moveToOutput share/aclocal "$dev"
+  '';
+
+  # See the same place in the expression for SDL2
+  postFixup = ''
+    for lib in $out/lib/*.so* ; do
+      if [[ -L "$lib" ]]; then
+        patchelf --set-rpath "$(patchelf --print-rpath $lib):${rpath}" "$lib"
+      fi
+    done
+  '';
+
+  setupHook = ./setup-hook.sh;
+
+  passthru = { inherit openglSupport; };
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "A cross-platform multimedia library";
+    homepage    = "http://www.libsdl.org/";
+    maintainers = with maintainers; [ lovek323 ];
+    platforms   = platforms.unix;
+    license     = licenses.lgpl21;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/SDL/find-headers.patch b/nixpkgs/pkgs/development/libraries/SDL/find-headers.patch
new file mode 100644
index 000000000000..fd498117fd64
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/SDL/find-headers.patch
@@ -0,0 +1,26 @@
+diff --git a/sdl-config.in b/sdl-config.in
+index e0fcc0c..bf7928a 100644
+--- a/sdl-config.in
++++ b/sdl-config.in
+@@ -42,14 +42,18 @@ while test $# -gt 0; do
+       echo @SDL_VERSION@
+       ;;
+     --cflags)
+-      echo -I@includedir@/SDL @SDL_CFLAGS@
++      SDL_CFLAGS=""
++      for i in @includedir@/SDL $SDL_PATH; do
++        SDL_CFLAGS="$SDL_CFLAGS -I$i"
++      done
++      echo $SDL_CFLAGS @SDL_CFLAGS@
+       ;;
+ @ENABLE_SHARED_TRUE@    --libs)
+-@ENABLE_SHARED_TRUE@      echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@
++@ENABLE_SHARED_TRUE@      echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@ $SDL_LIB_PATH
+ @ENABLE_SHARED_TRUE@      ;;
+ @ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@    --static-libs)
+ @ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@    --libs|--static-libs)
+-@ENABLE_STATIC_TRUE@      echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_STATIC_LIBS@
++@ENABLE_STATIC_TRUE@      echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_STATIC_LIBS@ $SDL_LIB_PATH
+ @ENABLE_STATIC_TRUE@      ;;
+     *)
+       echo "${usage}" 1>&2
diff --git a/nixpkgs/pkgs/development/libraries/SDL/setup-hook.sh b/nixpkgs/pkgs/development/libraries/SDL/setup-hook.sh
new file mode 100644
index 000000000000..553e8553a77f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/SDL/setup-hook.sh
@@ -0,0 +1,10 @@
+addSDLPath () {
+  if [ -e "$1/include/SDL" ]; then
+    export SDL_PATH="${SDL_PATH-}${SDL_PATH:+ }$1/include/SDL"
+  fi
+  if [ -e "$1/lib" ]; then
+    export SDL_LIB_PATH="${SDL_LIB_PATH-}${SDL_LIB_PATH:+ }-L$1/lib"
+  fi
+}
+
+addEnvHooks "$hostOffset" addSDLPath
diff --git a/nixpkgs/pkgs/development/libraries/SDL2/default.nix b/nixpkgs/pkgs/development/libraries/SDL2/default.nix
new file mode 100644
index 000000000000..2532bab798bc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/SDL2/default.nix
@@ -0,0 +1,190 @@
+{ lib
+, stdenv
+, config
+, fetchFromGitHub
+, nix-update-script
+, pkg-config
+, libGLSupported ? lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms
+, openglSupport ? libGLSupported
+, libGL
+, alsaSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid
+, alsa-lib
+, x11Support ? !stdenv.hostPlatform.isWindows && !stdenv.hostPlatform.isAndroid
+, libX11
+, xorgproto
+, libICE
+, libXi
+, libXScrnSaver
+, libXcursor
+, libXinerama
+, libXext
+, libXxf86vm
+, libXrandr
+, waylandSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid
+, wayland
+, wayland-protocols
+, wayland-scanner
+, drmSupport ? false
+, libdrm
+, mesa
+, libxkbcommon
+, dbusSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid
+, dbus
+, udevSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid
+, udev
+, ibusSupport ? false
+, ibus
+, libdecorSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid
+, libdecor
+, pipewireSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid
+, pipewire # NOTE: must be built with SDL2 without pipewire support
+, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux && !stdenv.hostPlatform.isAndroid
+, libpulseaudio
+, AudioUnit
+, Cocoa
+, CoreAudio
+, CoreServices
+, ForceFeedback
+, OpenGL
+, audiofile
+, libiconv
+, withStatic ? false
+# passthru.tests
+, testers
+}:
+
+# NOTE: When editing this expression see if the same change applies to
+# SDL expression too
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "SDL2";
+  version = "2.28.5";
+
+  src = fetchFromGitHub {
+    owner = "libsdl-org";
+    repo = "SDL";
+    rev = "release-${finalAttrs.version}";
+    hash = "sha256-YcM7bfLo+KkWx8LdtG4z2UwJvzlEkvIkm+M5aMSztwU=";
+  };
+  dontDisableStatic = if withStatic then 1 else 0;
+  outputs = [ "out" "dev" ];
+  outputBin = "dev"; # sdl-config
+
+  patches = [
+    # `sdl2-config --cflags` from Nixpkgs returns include path to just SDL2.
+    # On a normal distro this is enough for includes from all SDL2* packages to work,
+    # but on NixOS they're spread across different paths.
+    # This patch + the setup-hook will ensure that `sdl2-config --cflags` works correctly.
+    ./find-headers.patch
+  ];
+
+  postPatch = ''
+    # Fix running wayland-scanner for the build platform when cross-compiling.
+    # See comment here: https://github.com/libsdl-org/SDL/issues/4860#issuecomment-1119003545
+    substituteInPlace configure \
+      --replace '$(WAYLAND_SCANNER)' 'wayland-scanner'
+  '';
+
+  strictDeps = true;
+
+  depsBuildBuild = [ pkg-config ];
+
+  nativeBuildInputs = [ pkg-config ] ++ lib.optionals waylandSupport [ wayland wayland-scanner ];
+
+  dlopenPropagatedBuildInputs = [ ]
+    # Propagated for #include <GLES/gl.h> in SDL_opengles.h.
+    ++ lib.optional (openglSupport && !stdenv.isDarwin) libGL
+    # Propagated for #include <X11/Xlib.h> and <X11/Xatom.h> in SDL_syswm.h.
+    ++ lib.optionals x11Support [ libX11 ];
+
+  propagatedBuildInputs = lib.optionals x11Support [ xorgproto ]
+    ++ finalAttrs.dlopenPropagatedBuildInputs;
+
+  dlopenBuildInputs = lib.optionals alsaSupport [ alsa-lib audiofile ]
+    ++ lib.optional dbusSupport dbus
+    ++ lib.optional libdecorSupport libdecor
+    ++ lib.optional pipewireSupport pipewire
+    ++ lib.optional pulseaudioSupport libpulseaudio
+    ++ lib.optional udevSupport udev
+    ++ lib.optionals waylandSupport [ wayland libxkbcommon ]
+    ++ lib.optionals x11Support [ libICE libXi libXScrnSaver libXcursor libXinerama libXext libXrandr libXxf86vm ]
+    ++ lib.optionals drmSupport [ libdrm mesa ];
+
+  buildInputs = [ libiconv ]
+    ++ finalAttrs.dlopenBuildInputs
+    ++ lib.optional ibusSupport ibus
+    ++ lib.optionals waylandSupport [ wayland-protocols ]
+    ++ lib.optionals stdenv.isDarwin [ AudioUnit Cocoa CoreAudio CoreServices ForceFeedback OpenGL ];
+
+  enableParallelBuilding = true;
+
+  configureFlags = [
+    "--disable-oss"
+  ] ++ lib.optional (!x11Support) "--without-x"
+  ++ lib.optional alsaSupport "--with-alsa-prefix=${alsa-lib.out}/lib"
+  ++ lib.optional stdenv.hostPlatform.isWindows "--disable-video-opengles"
+  ++ lib.optional stdenv.isDarwin "--disable-sdltest";
+
+  # We remove libtool .la files when static libs are requested,
+  # because they make the builds of downstream libs like `SDL_tff`
+  # fail with `cannot find -lXext, `-lXcursor` etc. linker errors
+  # because the `.la` files are not pruned if static libs exist
+  # (see https://github.com/NixOS/nixpkgs/commit/fd97db43bcb05e37f6bb77f363f1e1e239d9de53)
+  # and they also don't carry the necessary `-L` paths of their
+  # X11 dependencies.
+  # For static linking, it is better to rely on `pkg-config` `.pc`
+  # files.
+  postInstall = ''
+    if [ "$dontDisableStatic" -eq "1" ]; then
+      rm $out/lib/*.la
+    else
+      rm $out/lib/*.a
+    fi
+    moveToOutput bin/sdl2-config "$dev"
+  '';
+
+  # SDL is weird in that instead of just dynamically linking with
+  # libraries when you `--enable-*` (or when `configure` finds) them
+  # it `dlopen`s them at runtime. In principle, this means it can
+  # ignore any missing optional dependencies like alsa, pulseaudio,
+  # some x11 libs, wayland, etc if they are missing on the system
+  # and/or work with wide array of versions of said libraries. In
+  # nixpkgs, however, we don't need any of that. Moreover, since we
+  # don't have a global ld-cache we have to stuff all the propagated
+  # libraries into rpath by hand or else some applications that use
+  # SDL API that requires said libraries will fail to start.
+  #
+  # You can grep SDL sources with `grep -rE 'SDL_(NAME|.*_SYM)'` to
+  # list the symbols used in this way.
+  postFixup =
+    let
+      rpath = lib.makeLibraryPath (finalAttrs.dlopenPropagatedBuildInputs ++ finalAttrs.dlopenBuildInputs);
+    in
+    lib.optionalString (stdenv.hostPlatform.extensions.sharedLibrary == ".so") ''
+      for lib in $out/lib/*.so* ; do
+        if ! [[ -L "$lib" ]]; then
+          patchelf --set-rpath "$(patchelf --print-rpath $lib):${rpath}" "$lib"
+        fi
+      done
+    '';
+
+  setupHook = ./setup-hook.sh;
+
+  passthru = {
+    inherit openglSupport;
+    updateScript = nix-update-script { extraArgs = ["--version-regex" "release-(.*)"]; };
+    tests.pkg-config = testers.hasPkgConfigModules {
+      package = finalAttrs.finalPackage;
+    };
+  };
+
+  meta = with lib; {
+    description = "A cross-platform multimedia library";
+    homepage = "http://www.libsdl.org/";
+    changelog = "https://github.com/libsdl-org/SDL/releases/tag/release-${version}";
+    license = licenses.zlib;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ cpages ];
+    pkgConfigModules = [ "sdl2" ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/SDL2/find-headers.patch b/nixpkgs/pkgs/development/libraries/SDL2/find-headers.patch
new file mode 100644
index 000000000000..8739da91eac1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/SDL2/find-headers.patch
@@ -0,0 +1,32 @@
+diff --git a/sdl2-config.cmake.in b/sdl2-config.cmake.in
+index db864aab9..b94e16043 100644
+--- a/sdl2-config.cmake.in
++++ b/sdl2-config.cmake.in
+@@ -26,7 +26,9 @@ set_and_check(SDL2_EXEC_PREFIX    "${exec_prefix}")
+ set_and_check(SDL2_BINDIR         "${bindir}")
+ set_and_check(SDL2_INCLUDE_DIR    "${includedir}/SDL2")
+ set_and_check(SDL2_LIBDIR         "${libdir}")
+-set(SDL2_INCLUDE_DIRS             "${includedir};${SDL2_INCLUDE_DIR}")
++
++set(SDL2_INCLUDE_DIRS "${includedir};${SDL2_INCLUDE_DIR}" $ENV{SDL2_PATH})
++separate_arguments(SDL2_INCLUDE_DIRS)
+ 
+ set(SDL2_LIBRARIES SDL2::SDL2)
+ set(SDL2_STATIC_LIBRARIES SDL2::SDL2-static)
+diff --git a/sdl2-config.in b/sdl2-config.in
+index f6eca7668..c0cd94590 100644
+--- a/sdl2-config.in
++++ b/sdl2-config.in
+@@ -46,7 +46,11 @@ while test $# -gt 0; do
+       echo @SDL_VERSION@
+       ;;
+     --cflags)
+-      echo -I@includedir@/SDL2 @SDL_CFLAGS@
++      SDL_CFLAGS=""
++      for i in @includedir@/SDL2 $SDL2_PATH; do
++        SDL_CFLAGS="$SDL_CFLAGS -I$i"
++      done
++      echo $SDL_CFLAGS @SDL_CFLAGS@
+       ;;
+ @ENABLE_SHARED_TRUE@    --libs)
+ @ENABLE_SHARED_TRUE@      echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@
diff --git a/nixpkgs/pkgs/development/libraries/SDL2/setup-hook.sh b/nixpkgs/pkgs/development/libraries/SDL2/setup-hook.sh
new file mode 100644
index 000000000000..0119926491af
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/SDL2/setup-hook.sh
@@ -0,0 +1,7 @@
+addSDL2Path () {
+  if [ -e "$1/include/SDL2" ]; then
+    export SDL2_PATH="${SDL2_PATH-}${SDL2_PATH:+ }$1/include/SDL2"
+  fi
+}
+
+addEnvHooks "$hostOffset" addSDL2Path
diff --git a/nixpkgs/pkgs/development/libraries/SDL2_gfx/default.nix b/nixpkgs/pkgs/development/libraries/SDL2_gfx/default.nix
new file mode 100644
index 000000000000..83b57b42c7cd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/SDL2_gfx/default.nix
@@ -0,0 +1,51 @@
+{ lib, stdenv, darwin, fetchurl, pkg-config, SDL2, testers }:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "SDL2_gfx";
+  version = "1.0.4";
+
+  src = fetchurl {
+    url = "http://www.ferzkopp.net/Software/${finalAttrs.pname}/${finalAttrs.pname}-${finalAttrs.version}.tar.gz";
+    sha256 = "0qk2ax7f7grlxb13ba0ll3zlm8780s7j8fmrhlpxzjgdvldf1q33";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ SDL2 ]
+    ++ lib.optional stdenv.isDarwin darwin.libobjc;
+
+  configureFlags = [(if stdenv.hostPlatform.isx86 then "--enable-mmx" else "--disable-mmx")]
+     ++ lib.optional stdenv.isDarwin "--disable-sdltest";
+
+  passthru.tests.pkg-config = testers.hasPkgConfigModules {
+    package = finalAttrs.finalPackage;
+  };
+
+  meta = with lib; {
+    description = "SDL graphics drawing primitives and support functions";
+
+    longDescription = ''
+      The SDL_gfx library evolved out of the SDL_gfxPrimitives code
+      which provided basic drawing routines such as lines, circles or
+      polygons and SDL_rotozoom which implemented a interpolating
+      rotozoomer for SDL surfaces.
+
+      The current components of the SDL_gfx library are:
+
+          * Graphic Primitives (SDL_gfxPrimitves.h)
+          * Rotozoomer (SDL_rotozoom.h)
+          * Framerate control (SDL_framerate.h)
+          * MMX image filters (SDL_imageFilter.h)
+          * Custom Blit functions (SDL_gfxBlitFunc.h)
+
+      The library is backwards compatible to the above mentioned
+      code. Its is written in plain C and can be used in C++ code.
+    '';
+
+    homepage = "http://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx/";
+    license = licenses.zlib;
+    maintainers = with maintainers; [ cpages ];
+    platforms = platforms.unix;
+    pkgConfigModules = [ "SDL2_gfx" ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/SDL2_image/default.nix b/nixpkgs/pkgs/development/libraries/SDL2_image/default.nix
new file mode 100644
index 000000000000..03b3f146ca93
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/SDL2_image/default.nix
@@ -0,0 +1,42 @@
+{ lib, stdenv, fetchurl
+, pkg-config
+, SDL2, libpng, libjpeg, libtiff, giflib, libwebp, libXpm, zlib, Foundation
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "SDL2_image";
+  version = "2.8.2";
+
+  src = fetchurl {
+    url = "https://www.libsdl.org/projects/SDL_image/release/SDL2_image-${finalAttrs.version}.tar.gz";
+    hash = "sha256-j0hrv7z4Rk3VjJ5dkzlKsCVc5otRxalmqRgkSCCnbdw=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ SDL2 libpng libjpeg libtiff giflib libwebp libXpm zlib ]
+    ++ lib.optional stdenv.isDarwin Foundation;
+
+  configureFlags = [
+    # Disable dynamically loaded dependencies
+    "--disable-jpg-shared"
+    "--disable-png-shared"
+    "--disable-tif-shared"
+    "--disable-webp-shared"
+  ] ++ lib.optionals stdenv.isDarwin [
+    # Darwin headless will hang when trying to run the SDL test program
+    "--disable-sdltest"
+    # Don't use native macOS frameworks
+    "--disable-imageio"
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "SDL image library";
+    homepage = "http://www.libsdl.org/projects/SDL_image/";
+    platforms = platforms.unix;
+    license = licenses.zlib;
+    maintainers = with maintainers; [ cpages ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/SDL2_mixer/2_0.nix b/nixpkgs/pkgs/development/libraries/SDL2_mixer/2_0.nix
new file mode 100644
index 000000000000..e75e0c9c5cc0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/SDL2_mixer/2_0.nix
@@ -0,0 +1,34 @@
+{ fetchurl
+, fetchpatch
+, lzwolf
+, SDL2_mixer
+, timidity
+}:
+
+SDL2_mixer.overrideAttrs(oa: rec {
+  version = "2.0.4";
+
+  src = fetchurl {
+    url = "https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-${version}.tar.gz";
+    sha256 = "0694vsz5bjkcdgfdra6x9fq8vpzrl8m6q96gh58df7065hw5mkxl";
+  };
+
+  patches = [
+    # These patches fix incompatible function pointer conversion errors with clang 16.
+    (fetchpatch {
+      url = "https://github.com/libsdl-org/SDL_mixer/commit/4119ec3fe838d38d2433f4432cd18926bda5d093.patch";
+      stripLen = 2;
+      hash = "sha256-Ug1EEZIRcV8+e1MeMsGHuTW7Zn6j4szqujP8IkIq2VM=";
+    })
+    # Based on https://github.com/libsdl-org/SDL_mixer/commit/64ab759111ddb1b033bcce64e1a04e0cba6e498f
+    ./SDL_mixer-2.0-incompatible-pointer-comparison-fix.patch
+  ];
+
+  # fix default path to timidity.cfg so MIDI files could be played
+  postPatch = ''
+    substituteInPlace timidity/options.h \
+      --replace "/usr/share/timidity" "${timidity}/share/timidity"
+  '';
+
+  passthru.tests.lzwolf = lzwolf;
+})
diff --git a/nixpkgs/pkgs/development/libraries/SDL2_mixer/SDL_mixer-2.0-incompatible-pointer-comparison-fix.patch b/nixpkgs/pkgs/development/libraries/SDL2_mixer/SDL_mixer-2.0-incompatible-pointer-comparison-fix.patch
new file mode 100644
index 000000000000..76fff3fa63e2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/SDL2_mixer/SDL_mixer-2.0-incompatible-pointer-comparison-fix.patch
@@ -0,0 +1,26 @@
+--- a/music_mpg123.c	2018-10-31 10:59:00.000000000 -0400
++++ b/music_mpg123.c	2023-09-05 21:31:51.529191521 -0400
+@@ -48,7 +48,11 @@
+     int (*mpg123_open_handle)(mpg123_handle *mh, void *iohandle);
+     const char* (*mpg123_plain_strerror)(int errcode);
+     void (*mpg123_rates)(const long **list, size_t *number);
++#if (MPG123_API_VERSION >= 45) /* api (but not abi) change as of mpg123-1.26.0 */
++    int (*mpg123_read)(mpg123_handle *mh, void *outmemory, size_t outmemsize, size_t *done );
++#else
+     int (*mpg123_read)(mpg123_handle *mh, unsigned char *outmemory, size_t outmemsize, size_t *done );
++#endif
+     int (*mpg123_replace_reader_handle)( mpg123_handle *mh, ssize_t (*r_read) (void *, void *, size_t), off_t (*r_lseek)(void *, off_t, int), void (*cleanup)(void*) );
+     off_t (*mpg123_seek)( mpg123_handle *mh, off_t sampleoff, int whence );
+     const char* (*mpg123_strerror)(mpg123_handle *mh);
+@@ -95,7 +99,11 @@
+         FUNCTION_LOADER(mpg123_open_handle, int (*)(mpg123_handle *mh, void *iohandle))
+         FUNCTION_LOADER(mpg123_plain_strerror, const char* (*)(int errcode))
+         FUNCTION_LOADER(mpg123_rates, void (*)(const long **list, size_t *number));
++#if (MPG123_API_VERSION >= 45) /* api (but not abi) change as of mpg123-1.26.0 */
++        FUNCTION_LOADER(mpg123_read, int (*)(mpg123_handle *mh, void *outmemory, size_t outmemsize, size_t *done ))
++#else
+         FUNCTION_LOADER(mpg123_read, int (*)(mpg123_handle *mh, unsigned char *outmemory, size_t outmemsize, size_t *done ))
++#endif
+         FUNCTION_LOADER(mpg123_replace_reader_handle, int (*)( mpg123_handle *mh, ssize_t (*r_read) (void *, void *, size_t), off_t (*r_lseek)(void *, off_t, int), void (*cleanup)(void*) ))
+         FUNCTION_LOADER(mpg123_seek, off_t (*)( mpg123_handle *mh, off_t sampleoff, int whence ))
+         FUNCTION_LOADER(mpg123_strerror, const char* (*)(mpg123_handle *mh))
diff --git a/nixpkgs/pkgs/development/libraries/SDL2_mixer/default.nix b/nixpkgs/pkgs/development/libraries/SDL2_mixer/default.nix
new file mode 100644
index 000000000000..b412e22b8f0c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/SDL2_mixer/default.nix
@@ -0,0 +1,74 @@
+{ lib, stdenv
+, fetchurl
+, pkg-config
+, AudioToolbox
+, AudioUnit
+, CoreServices
+, SDL2
+, flac
+, fluidsynth
+, libmodplug
+, libogg
+, libvorbis
+, mpg123
+, opusfile
+, smpeg2
+, timidity
+}:
+
+stdenv.mkDerivation rec {
+  pname = "SDL2_mixer";
+  version = "2.6.3";
+
+  src = fetchurl {
+    url = "https://www.libsdl.org/projects/SDL_mixer/release/${pname}-${version}.tar.gz";
+    sha256 = "sha256-emuoakeGSM5hfjpekncYG8Z/fOmHZgXupq/9Sg1u6o8=";
+  };
+
+  configureFlags = [
+    "--disable-music-ogg-shared"
+    "--disable-music-flac-shared"
+    "--disable-music-mod-modplug-shared"
+    "--disable-music-mp3-mpg123-shared"
+    "--disable-music-opus-shared"
+    "--disable-music-midi-fluidsynth-shared"
+
+    # override default path to allow MIDI files to be played
+    "--with-timidity-cfg=${timidity}/share/timidity/timidity.cfg"
+  ] ++ lib.optionals stdenv.isDarwin [
+    "--disable-sdltest"
+    "--disable-smpegtest"
+  ];
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = lib.optionals stdenv.isDarwin [
+    AudioToolbox
+    AudioUnit
+    CoreServices
+  ];
+
+  propagatedBuildInputs = [
+    SDL2
+    flac
+    fluidsynth
+    libmodplug
+    libogg
+    libvorbis
+    mpg123
+    opusfile
+    smpeg2
+    # MIDI patterns
+    timidity
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  meta = with lib; {
+    description = "SDL multi-channel audio mixer library";
+    platforms = platforms.unix;
+    homepage = "https://github.com/libsdl-org/SDL_mixer";
+    maintainers = with maintainers; [ MP2E ];
+    license = licenses.zlib;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/SDL2_net/default.nix b/nixpkgs/pkgs/development/libraries/SDL2_net/default.nix
new file mode 100644
index 000000000000..b07d860cf0c3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/SDL2_net/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, pkg-config, darwin, fetchurl, SDL2 }:
+
+stdenv.mkDerivation rec {
+  pname = "SDL2_net";
+  version = "2.2.0";
+
+  src = fetchurl {
+    url = "https://www.libsdl.org/projects/SDL_net/release/${pname}-${version}.tar.gz";
+    sha256 = "sha256-TkqJGYgxYnGXT/TpWF7R73KaEj0iwIvUcxKRedyFf+s=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = lib.optional stdenv.isDarwin darwin.libobjc;
+
+  configureFlags = [ "--disable-examples" ]
+  ++ lib.optional stdenv.isDarwin "--disable-sdltest";
+
+  propagatedBuildInputs = [ SDL2 ];
+
+  meta = with lib; {
+    description = "SDL multiplatform networking library";
+    homepage = "https://www.libsdl.org/projects/SDL_net";
+    license = licenses.zlib;
+    maintainers = with maintainers; [ MP2E ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/SDL2_sound/default.nix b/nixpkgs/pkgs/development/libraries/SDL2_sound/default.nix
new file mode 100644
index 000000000000..3a2d05c31a10
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/SDL2_sound/default.nix
@@ -0,0 +1,48 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, SDL2
+, flac
+, libmikmod
+, libvorbis
+, timidity
+, AudioToolbox
+, CoreAudio
+}:
+
+stdenv.mkDerivation rec {
+  pname = "SDL2_sound";
+  version = "2.0.1";
+
+  src = fetchFromGitHub {
+    owner = "icculus";
+    repo = "SDL_sound";
+    rev = "v${version}";
+    sha256 = "sha256-N2znqy58tMHgYa07vEsSedWLRhoJzDoINcsUu0UYLnA=";
+  };
+
+  patches = [
+    (fetchpatch {
+      # https://github.com/icculus/SDL_sound/pull/32 - fix build on darwin
+      # can be dropped on the next update
+      url = "https://github.com/icculus/SDL_sound/commit/c15d75b7720113b28639baad284f45f943846294.patch";
+      sha256 = "sha256-4GL8unsZ7eNkzjLXq9QdaxFQMzX2tdP0cBR1jTaRLc0=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [ "-DSDLSOUND_DECODER_MIDI=1" ];
+
+  buildInputs = [ SDL2 flac libmikmod libvorbis timidity ]
+    ++ lib.optionals stdenv.isDarwin [ AudioToolbox CoreAudio ];
+
+  meta = with lib; {
+    description = "SDL2 sound library";
+    platforms = platforms.unix;
+    license = licenses.zlib;
+    homepage = "https://www.icculus.org/SDL_sound/";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/SDL2_ttf/default.nix b/nixpkgs/pkgs/development/libraries/SDL2_ttf/default.nix
new file mode 100644
index 000000000000..e46b9d9c537a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/SDL2_ttf/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, pkg-config, darwin, fetchurl, SDL2, freetype, harfbuzz, libGL, testers }:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "SDL2_ttf";
+  version = "2.20.2";
+
+  src = fetchurl {
+    url = "https://www.libsdl.org/projects/SDL_ttf/release/${finalAttrs.pname}-${finalAttrs.version}.tar.gz";
+    sha256 = "sha256-ncce2TSHUhsQeixKnKa/Q/ti9r3dXCawVea5FBiiIFM=";
+  };
+
+  configureFlags = [ "--disable-harfbuzz-builtin" ]
+    ++ lib.optionals stdenv.isDarwin [ "--disable-sdltest" ];
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ SDL2 freetype harfbuzz ]
+    ++ lib.optional (!stdenv.isDarwin) libGL
+    ++ lib.optional stdenv.isDarwin darwin.libobjc;
+
+  passthru.tests.pkg-config = testers.hasPkgConfigModules {
+    package = finalAttrs.finalPackage;
+  };
+
+  meta = with lib; {
+    description = "Support for TrueType (.ttf) font files with Simple Directmedia Layer";
+    platforms = platforms.unix;
+    license = licenses.zlib;
+    homepage = "https://github.com/libsdl-org/SDL_ttf";
+    pkgConfigModules = [ "SDL2_ttf" ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/SDL_Pango/default.nix b/nixpkgs/pkgs/development/libraries/SDL_Pango/default.nix
new file mode 100644
index 000000000000..e24af838c65e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/SDL_Pango/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchpatch, fetchurl, SDL, autoreconfHook, pango, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "SDL_Pango";
+  version = "0.1.2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/sdlpango/${pname}-${version}.tar.gz";
+    sha256 = "197baw1dsg0p4pljs5k0fshbyki00r4l49m1drlpqw6ggawx6xbz";
+  };
+
+  patches = [
+    (fetchpatch {
+      url = "https://sources.debian.org/data/main/s/sdlpango/0.1.2-6/debian/patches/api_additions.patch";
+      sha256 = "00p5ry5gd3ixm257p9i2c4jg0qj8ipk8nf56l7c9fma8id3zxyld";
+    })
+    ./fixes.patch
+  ];
+
+  preConfigure = "autoreconf -i -f";
+  configureFlags = lib.optional stdenv.isDarwin "--disable-sdltest";
+
+  nativeBuildInputs = [ pkg-config autoreconfHook ];
+  buildInputs = [ SDL pango ];
+
+  meta = with lib; {
+    description = "Connects the Pango rendering engine to SDL";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.all;
+    homepage = "https://sdlpango.sourceforge.net/";
+    maintainers = with maintainers; [ puckipedia ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/SDL_Pango/fixes.patch b/nixpkgs/pkgs/development/libraries/SDL_Pango/fixes.patch
new file mode 100644
index 000000000000..9703c0d4918f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/SDL_Pango/fixes.patch
@@ -0,0 +1,148 @@
+diff --git a/SDL_Pango.pc.in b/SDL_Pango.pc.in
+index 750d091..3af38ff 100644
+--- a/SDL_Pango.pc.in
++++ b/SDL_Pango.pc.in
+@@ -6,6 +6,6 @@ includedir=@includedir@
+ Name: SDL_Pango

+ Description: SDL library for internationalized text rendering

+ Version: @VERSION@

+-Requires: pango

++Requires: pango pangoft2
+ Libs: -L${libdir} -lSDL_Pango

+ Cflags: -I${includedir}
+\ No newline at end of file
+diff --git a/src/SDL_Pango.c b/src/SDL_Pango.c
+index b969bc1..cc2c3f5 100644
+--- a/src/SDL_Pango.c
++++ b/src/SDL_Pango.c
+@@ -231,6 +231,41 @@
+ 

+ #include "SDL_Pango.h"

+ 

++const SDLPango_Matrix _MATRIX_WHITE_BACK
++    = {255, 0, 0, 0,
++       255, 0, 0, 0,
++       255, 0, 0, 0,
++       255, 255, 0, 0,};
++const SDLPango_Matrix *MATRIX_WHITE_BACK = &_MATRIX_WHITE_BACK;
++
++const SDLPango_Matrix _MATRIX_BLACK_BACK
++    = {0, 255, 0, 0,
++       0, 255, 0, 0,
++       0, 255, 0, 0,
++       255, 255, 0, 0,};
++const SDLPango_Matrix *MATRIX_BLACK_BACK = &_MATRIX_BLACK_BACK;
++
++const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_BLACK_LETTER
++    = {0, 0, 0, 0,
++       0, 0, 0, 0,
++       0, 0, 0, 0,
++       0, 255, 0, 0,};
++const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER = &_MATRIX_TRANSPARENT_BACK_BLACK_LETTER;
++
++const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_WHITE_LETTER
++    = {255, 255, 0, 0,
++       255, 255, 0, 0,
++       255, 255, 0, 0,
++       0, 255, 0, 0,};
++const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER = &_MATRIX_TRANSPARENT_BACK_WHITE_LETTER;
++
++const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER
++    = {255, 255, 0, 0,
++       255, 255, 0, 0,
++       255, 255, 0, 0,
++       0, 0, 0, 0,};
++const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER = &_MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER;
++
+ //! non-zero if initialized

+ static int IS_INITIALIZED = 0;

+ 

+diff --git a/src/SDL_Pango.h b/src/SDL_Pango.h
+index 6ebdf78..b7e5e58 100644
+--- a/src/SDL_Pango.h
++++ b/src/SDL_Pango.h
+@@ -47,57 +47,32 @@ typedef struct _SDLPango_Matrix {
+     Uint8 m[4][4];  /*! Matrix variables */

+ } SDLPango_Matrix;

+ 

+-const SDLPango_Matrix _MATRIX_WHITE_BACK

+-    = {255, 0, 0, 0,

+-       255, 0, 0, 0,

+-       255, 0, 0, 0,

+-       255, 255, 0, 0,};

+ 

+ /*!

+     Specifies white back and black letter.

+ */

+-const SDLPango_Matrix *MATRIX_WHITE_BACK = &_MATRIX_WHITE_BACK;

++extern const SDLPango_Matrix *MATRIX_WHITE_BACK;
+ 

+-const SDLPango_Matrix _MATRIX_BLACK_BACK

+-    = {0, 255, 0, 0,

+-       0, 255, 0, 0,

+-       0, 255, 0, 0,

+-       255, 255, 0, 0,};

+ /*!

+     Specifies black back and white letter.

+ */

+-const SDLPango_Matrix *MATRIX_BLACK_BACK = &_MATRIX_BLACK_BACK;

++extern const SDLPango_Matrix *MATRIX_BLACK_BACK;
+ 

+-const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_BLACK_LETTER

+-    = {0, 0, 0, 0,

+-       0, 0, 0, 0,

+-       0, 0, 0, 0,

+-       0, 255, 0, 0,};

+ /*!

+     Specifies transparent back and black letter.

+ */

+-const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER = &_MATRIX_TRANSPARENT_BACK_BLACK_LETTER;

++extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER;
+ 

+-const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_WHITE_LETTER

+-    = {255, 255, 0, 0,

+-       255, 255, 0, 0,

+-       255, 255, 0, 0,

+-       0, 255, 0, 0,};

+ /*!

+     Specifies transparent back and white letter.

+ */

+-const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER = &_MATRIX_TRANSPARENT_BACK_WHITE_LETTER;

++extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER;
+ 

+-const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER

+-    = {255, 255, 0, 0,

+-       255, 255, 0, 0,

+-       255, 255, 0, 0,

+-       0, 0, 0, 0,};

+ /*!

+     Specifies transparent back and transparent letter.

+     This is useful for KARAOKE like rendering.

+ */

+-const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER = &_MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER;

++extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER;
+ 

+ /*!

+     Specifies direction of text. See Pango reference for detail

+@@ -186,7 +161,8 @@ extern DECLSPEC void SDLCALL SDLPango_SetBaseDirection(
+     SDLPango_Direction direction);

+ 

+ 

+-#ifdef __FT2_BUILD_UNIX_H__

++

++#ifdef __PANGO_H__

+ 

+ extern DECLSPEC void SDLCALL SDLPango_CopyFTBitmapToSurface(

+     const FT_Bitmap *bitmap,

+@@ -194,11 +170,8 @@ extern DECLSPEC void SDLCALL SDLPango_CopyFTBitmapToSurface(
+     const SDLPango_Matrix *matrix,

+     SDL_Rect *rect);

+ 

+-#endif	/* __FT2_BUILD_UNIX_H__ */

+ 

+ 

+-#ifdef __PANGO_H__

+-

+ extern DECLSPEC PangoFontMap* SDLCALL SDLPango_GetPangoFontMap(

+     SDLPango_Context *context);

+ 

diff --git a/nixpkgs/pkgs/development/libraries/SDL_audiolib/default.nix b/nixpkgs/pkgs/development/libraries/SDL_audiolib/default.nix
new file mode 100644
index 000000000000..9b8a163b206c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/SDL_audiolib/default.nix
@@ -0,0 +1,53 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, SDL2
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "SDL_audiolib";
+  version = "unstable-2022-04-17";
+
+  src = fetchFromGitHub {
+    owner = "realnc";
+    repo = "SDL_audiolib";
+    rev = "908214606387ef8e49aeacf89ce848fb36f694fc";
+    sha256 = "sha256-11KkwIhG1rX7yDFSj92NJRO9L2e7XZGq2gOJ54+sN/A=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    SDL2
+  ];
+
+  cmakeFlags = [
+    "-DUSE_RESAMP_SRC=OFF"
+    "-DUSE_RESAMP_SOXR=OFF"
+    "-DUSE_DEC_DRFLAC=OFF"
+    "-DUSE_DEC_OPENMPT=OFF"
+    "-DUSE_DEC_XMP=OFF"
+    "-DUSE_DEC_MODPLUG=OFF"
+    "-DUSE_DEC_MPG123=OFF"
+    "-DUSE_DEC_SNDFILE=OFF"
+    "-DUSE_DEC_LIBVORBIS=OFF"
+    "-DUSE_DEC_LIBOPUSFILE=OFF"
+    "-DUSE_DEC_MUSEPACK=OFF"
+    "-DUSE_DEC_FLUIDSYNTH=OFF"
+    "-DUSE_DEC_BASSMIDI=OFF"
+    "-DUSE_DEC_WILDMIDI=OFF"
+    "-DUSE_DEC_ADLMIDI=OFF"
+  ];
+
+  meta = with lib; {
+    description = "Audio decoding, resampling and mixing library for SDL";
+    homepage = "https://github.com/realnc/SDL_audiolib";
+    license = licenses.lgpl3Plus;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/SDL_compat/default.nix b/nixpkgs/pkgs/development/libraries/SDL_compat/default.nix
new file mode 100644
index 000000000000..3f3521de60a1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/SDL_compat/default.nix
@@ -0,0 +1,61 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, SDL2
+, libiconv
+, Cocoa
+, autoSignDarwinBinariesHook
+, libGLSupported ? lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms
+, openglSupport ? libGLSupported
+, libGL
+, libGLU
+}:
+
+let
+  inherit (lib) optionals makeLibraryPath;
+
+in
+stdenv.mkDerivation rec {
+  pname = "SDL_compat";
+  version = "1.2.68";
+
+  src = fetchFromGitHub {
+    owner = "libsdl-org";
+    repo = "sdl12-compat";
+    rev = "release-" + version;
+    hash = "sha256-f2dl3L7/qoYNl4sjik1npcW/W09zsEumiV9jHuKnUmM=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ]
+    ++ optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ];
+
+  propagatedBuildInputs = [ SDL2 ]
+    ++ optionals stdenv.hostPlatform.isDarwin [ libiconv Cocoa ]
+    ++ optionals openglSupport [ libGL libGLU ];
+
+  enableParallelBuilding = true;
+
+  setupHook = ../SDL/setup-hook.sh;
+
+  postFixup = ''
+    for lib in $out/lib/*${stdenv.hostPlatform.extensions.sharedLibrary}* ; do
+      if [[ -L "$lib" ]]; then
+        ${if stdenv.hostPlatform.isDarwin then ''
+          install_name_tool ${lib.strings.concatMapStrings (x: " -add_rpath ${makeLibraryPath [x]} ") propagatedBuildInputs} "$lib"
+        '' else ''
+          patchelf --set-rpath "$(patchelf --print-rpath $lib):${makeLibraryPath propagatedBuildInputs}" "$lib"
+        ''}
+      fi
+    done
+  '';
+
+  meta = with lib; {
+    description = "A cross-platform multimedia library - build SDL 1.2 applications against 2.0";
+    homepage = "https://www.libsdl.org/";
+    license = licenses.zlib;
+    maintainers = with maintainers; [ peterhoeg ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/SDL_gfx/default.nix b/nixpkgs/pkgs/development/libraries/SDL_gfx/default.nix
new file mode 100644
index 000000000000..bccc11f43d41
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/SDL_gfx/default.nix
@@ -0,0 +1,46 @@
+{ lib, stdenv, fetchurl, SDL }:
+
+stdenv.mkDerivation rec {
+  pname = "SDL_gfx";
+  version = "2.0.27";
+
+  src = fetchurl {
+    url = "https://www.ferzkopp.net/Software/SDL_gfx-2.0/${pname}-${version}.tar.gz";
+    sha256 = "sha256-37FaxfjOeklS3BLSrtl0dRjF5rM1wOMWNtI/k8Yw9Bk=";
+  };
+
+  # SDL_gfx.pc refers to sdl.pc and some SDL_gfx headers import SDL.h
+  propagatedBuildInputs = [ SDL ];
+  buildInputs = [ SDL ] ;
+
+  configureFlags = [ "--disable-mmx" ]
+    ++ lib.optional stdenv.isDarwin "--disable-sdltest";
+
+  meta = with lib; {
+    description = "SDL graphics drawing primitives and support functions";
+
+    longDescription = ''
+      The SDL_gfx library evolved out of the SDL_gfxPrimitives code
+      which provided basic drawing routines such as lines, circles or
+      polygons and SDL_rotozoom which implemented a interpolating
+      rotozoomer for SDL surfaces.
+
+      The current components of the SDL_gfx library are:
+
+        * Graphic Primitives (SDL_gfxPrimitves.h)
+        * Rotozoomer (SDL_rotozoom.h)
+        * Framerate control (SDL_framerate.h)
+        * MMX image filters (SDL_imageFilter.h)
+        * Custom Blit functions (SDL_gfxBlitFunc.h)
+
+      The library is backwards compatible to the above mentioned
+      code. Its is written in plain C and can be used in C++ code.
+    '';
+
+    homepage = "https://sourceforge.net/projects/sdlgfx/";
+    license = licenses.zlib;
+
+    maintainers = with maintainers; [ ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/SDL_gpu/default.nix b/nixpkgs/pkgs/development/libraries/SDL_gpu/default.nix
new file mode 100644
index 000000000000..dc52e6afeea7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/SDL_gpu/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchFromGitHub, cmake, SDL2, libGLU }:
+
+stdenv.mkDerivation {
+  pname = "SDL_gpu-unstable";
+  version = "2019-01-24";
+
+  src = fetchFromGitHub {
+    owner = "grimfang4";
+    repo = "sdl-gpu";
+    rev = "e3d350b325a0e0d0b3007f69ede62313df46c6ef";
+    sha256 = "0kibcaim01inb6xxn4mr6affn4hm50vz9kahb5k9iz8dmdsrhxy1";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ SDL2 libGLU ];
+
+  cmakeFlags = [
+    "-DSDL_gpu_BUILD_DEMOS=OFF"
+    "-DSDL_gpu_BUILD_TOOLS=OFF"
+    "-DSDL_gpu_BUILD_VIDEO_TEST=OFF"
+    "-DSDL_gpu_BUILD_TESTS=OFF"
+  ];
+
+  patchPhase = ''
+    sed -ie '210s#''${OUTPUT_DIR}/lib#''${CMAKE_INSTALL_LIBDIR}#' src/CMakeLists.txt
+    sed -ie '213s#''${OUTPUT_DIR}/lib#''${CMAKE_INSTALL_LIBDIR}#' src/CMakeLists.txt
+  '';
+
+  meta = with lib; {
+    description = "A library for high-performance, modern 2D graphics with SDL written in C";
+    homepage = "https://github.com/grimfang4/sdl-gpu";
+    license = licenses.mit;
+    maintainers = with maintainers; [ pmiddend ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/SDL_image/default.nix b/nixpkgs/pkgs/development/libraries/SDL_image/default.nix
new file mode 100644
index 000000000000..30f71bd3e520
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/SDL_image/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchurl, fetchpatch, SDL, libpng, libjpeg, libtiff, giflib, libXpm, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "SDL_image";
+  version = "1.2.12";
+
+  src = fetchurl {
+    url    = "https://www.libsdl.org/projects/SDL_image/release/${pname}-${version}.tar.gz";
+    sha256 = "16an9slbb8ci7d89wakkmyfvp7c0cval8xw4hkg0842nhhlp540b";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "CVE-2017-2887";
+      url = "https://github.com/libsdl-org/SDL_image/commit/e7723676825cd2b2ffef3316ec1879d7726618f2.patch";
+      includes = [ "IMG_xcf.c" ];
+      sha256 = "174ka2r95i29nlshzgp6x5vc68v7pi8lhzf33and2b1ms49g4jb7";
+    })
+  ];
+
+  configureFlags = [
+    # Disable its dynamic loading or dlopen will fail because of no proper rpath
+    "--disable-jpg-shared"
+    "--disable-png-shared"
+    "--disable-tif-shared"
+  ] ++ lib.optional stdenv.isDarwin "--disable-sdltest";
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ SDL libpng libjpeg libtiff giflib libXpm ];
+
+  meta = with lib; {
+    description = "SDL image library";
+    homepage    = "http://www.libsdl.org/projects/SDL_image/";
+    maintainers = with maintainers; [ lovek323 ];
+    platforms   = platforms.unix;
+    license     = licenses.zlib;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/SDL_mixer/default.nix b/nixpkgs/pkgs/development/libraries/SDL_mixer/default.nix
new file mode 100644
index 000000000000..12b50cd476ba
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/SDL_mixer/default.nix
@@ -0,0 +1,68 @@
+{ stdenv, lib, fetchurl, fetchpatch
+, SDL, libogg, libvorbis, smpeg, libmikmod
+, fluidsynth, pkg-config
+, enableNativeMidi ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname   = "SDL_mixer";
+  version = "1.2.12";
+
+  src = fetchurl {
+    url    = "http://www.libsdl.org/projects/${pname}/release/${pname}-${version}.tar.gz";
+    sha256 = "0alrhqgm40p4c92s26mimg9cm1y7rzr6m0p49687jxd9g6130i0n";
+  };
+
+  patches = [
+    # Fixes implicit declaration of `Mix_QuitFluidSynth`, which causes build failures with clang.
+    # https://github.com/libsdl-org/SDL_mixer/issues/287
+    (fetchpatch {
+      name = "fluidsynth-fix-implicit-declaration.patch";
+      url = "https://github.com/libsdl-org/SDL_mixer/commit/05b12a3c22c0746c29dc5478f5b7fbd8a51a1303.patch";
+      hash = "sha256-MDuViLD1w1tAVLoX2yFeJ865v21S2roi0x7Yi7GYRVU=";
+    })
+    # Backport of 2.0 fixes for incompatible function pointer conversions, fixing builds with clang.
+    (fetchpatch {
+      name = "fluidsynth-fix-function-pointer-conversions.patch";
+      url = "https://github.com/libsdl-org/SDL_mixer/commit/0c504159d212b710a47cb25c669b21730fc78edd.patch";
+      hash = "sha256-FSj7JLE2MbGVYCspoq3trXP5Ho+lAtnro2IUOHkto/U";
+    })
+    # Backport of MikMod fixes, which includes incompatible function pointer conversions.
+    (fetchpatch {
+      name = "mikmod-fixes.patch";
+      url = "https://github.com/libsdl-org/SDL_mixer/commit/a3e5ff8142cf3530cddcb27b58f871f387796ab6.patch";
+      hash = "sha256-dqD8hxx6U2HaelUx0WsGPiWuso++LjwasaAeTTGqdbk";
+    })
+    # More incompatible function pointer conversion fixes (this time in Vorbis-decoding code).
+    (fetchpatch {
+      name = "vorbis-fix-function-pointer-conversion.patch";
+      url = "https://github.com/libsdl-org/SDL_mixer/commit/9e6d7b67a00656a68ea0c2eace75c587871549b9.patch";
+      hash = "sha256-rZI3bFb/KxnduTkA/9CISccKHUgrX22KXg69sl/uXvU=";
+    })
+    (fetchpatch {
+      name = "vorbis-fix-function-pointer-conversion-header-part.patch";
+      url = "https://github.com/libsdl-org/SDL_mixer/commit/03bd4ca6aa38c1a382c892cef86296cd621ecc1d.patch";
+      hash = "sha256-7HrSHYFYVgpamP7Q9znrFZMZ72jvz5wYpJEPqWev/I4=";
+    })
+    (fetchpatch {
+      name = "vorbis-fix-function-pointer-signature.patch";
+      url = "https://github.com/libsdl-org/SDL_mixer/commit/d28cbc34d63dd20b256103c3fe506ecf3d34d379.patch";
+      hash = "sha256-sGbtF+Tcjf+6a28nJgawefeeKXnhcwu7G55e94oS9AU=";
+    })
+  ];
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ SDL libogg libvorbis fluidsynth smpeg libmikmod ];
+
+  configureFlags = [ "--disable-music-ogg-shared" "--disable-music-mod-shared" ]
+    ++ lib.optional enableNativeMidi " --enable-music-native-midi-gpl"
+    ++ lib.optionals stdenv.isDarwin [ "--disable-sdltest" "--disable-smpegtest" ];
+
+  meta = with lib; {
+    description = "SDL multi-channel audio mixer library";
+    homepage    = "http://www.libsdl.org/projects/SDL_mixer/";
+    maintainers = with maintainers; [ lovek323 ];
+    platforms   = platforms.unix;
+    license     = licenses.zlib;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/SDL_net/default.nix b/nixpkgs/pkgs/development/libraries/SDL_net/default.nix
new file mode 100644
index 000000000000..e902213c9710
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/SDL_net/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchurl, SDL, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "SDL_net";
+  version = "1.2.8";
+
+  src = fetchurl {
+    url = "http://www.libsdl.org/projects/SDL_net/release/${pname}-${version}.tar.gz";
+    sha256 = "1d5c9xqlf4s1c01gzv6cxmg0r621pq9kfgxcg3197xw4p25pljjz";
+  };
+
+  configureFlags = lib.optional stdenv.isDarwin "--disable-sdltest";
+
+  nativeBuildInputs = [ pkg-config ];
+  propagatedBuildInputs = [ SDL ];
+
+  meta = with lib; {
+    description = "SDL networking library";
+    platforms = platforms.unix;
+    license = licenses.zlib;
+    homepage = "https://www.libsdl.org/projects/SDL_net/release-1.2.html";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/SDL_sixel/default.nix b/nixpkgs/pkgs/development/libraries/SDL_sixel/default.nix
new file mode 100644
index 000000000000..1bc4c8ba35c0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/SDL_sixel/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, libsixel }:
+
+stdenv.mkDerivation {
+  pname = "SDL_sixel";
+  version = "1.2-nightly";
+
+  src = fetchFromGitHub {
+    owner = "saitoha";
+    repo = "SDL1.2-SIXEL";
+    rev = "ab3fccac6e34260a617be511bd8c2b2beae41952";
+    sha256 = "0gm2vngdac17lzw9azkhzazmfq3byjddms14gqjk18vnynfqp5wp";
+  };
+
+  configureFlags = [ "--enable-video-sixel" ];
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libsixel ];
+
+  meta = with lib; {
+    description = "A cross-platform multimedia library, that supports sixel graphics on consoles";
+    homepage    = "https://github.com/saitoha/SDL1.2-SIXEL";
+    maintainers = with maintainers; [ vrthra ];
+    platforms   = platforms.linux;
+    license     = licenses.lgpl21;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/SDL_sound/default.nix b/nixpkgs/pkgs/development/libraries/SDL_sound/default.nix
new file mode 100644
index 000000000000..bdc97e98f341
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/SDL_sound/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, lib, fetchurl, SDL, libvorbis, flac, libmikmod }:
+
+stdenv.mkDerivation rec {
+  pname = "SDL_sound";
+  version = "1.0.3";
+
+  src = fetchurl {
+    url = "https://icculus.org/SDL_sound/downloads/${pname}-${version}.tar.gz";
+    sha256 = "1pz6g56gcy7pmmz3hhych3iq9jvinml2yjz15fjqjlj8pc5zv69r";
+  };
+
+  buildInputs = [ SDL libvorbis flac libmikmod ];
+
+  configureFlags = lib.optional stdenv.isDarwin "--disable-sdltest";
+
+  meta = with lib; {
+    description = "SDL sound library";
+    platforms = platforms.unix;
+    license = licenses.lgpl21;
+    homepage = "https://www.icculus.org/SDL_sound/";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/SDL_stretch/default.nix b/nixpkgs/pkgs/development/libraries/SDL_stretch/default.nix
new file mode 100644
index 000000000000..99f86dd258b3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/SDL_stretch/default.nix
@@ -0,0 +1,20 @@
+{ lib, stdenv, fetchurl, SDL }:
+
+stdenv.mkDerivation rec {
+  pname = "SDL_stretch";
+  version = "0.3.1";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/sdl-stretch/${version}/${pname}-${version}.tar.bz2";
+    sha256 = "1mzw68sn4yxbp8429jg2h23h8xw2qjid51z1f5pdsghcn3x0pgvw";
+  };
+
+  buildInputs = [ SDL ];
+
+  meta = with lib; {
+     description = "Stretch Functions For SDL";
+     homepage = "https://sdl-stretch.sourceforge.net/";
+     license = licenses.lgpl2;
+     platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/SDL_ttf/default.nix b/nixpkgs/pkgs/development/libraries/SDL_ttf/default.nix
new file mode 100644
index 000000000000..5d353e3a6c0d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/SDL_ttf/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchurl, fetchpatch, SDL, freetype }:
+
+stdenv.mkDerivation rec {
+  pname = "SDL_ttf";
+  version = "2.0.11";
+
+  src = fetchurl {
+    url = "https://www.libsdl.org/projects/SDL_ttf/release/${pname}-${version}.tar.gz";
+    sha256 = "1dydxd4f5kb1288i5n5568kdk2q7f8mqjr7i7sd33nplxjaxhk3j";
+  };
+
+  patches = [
+    # Bug #830: TTF_RenderGlyph_Shaded is broken
+    (fetchpatch {
+      url = "https://bugzilla-attachments.libsdl.org/attachment.cgi?id=830";
+      sha256 = "0cfznfzg1hs10wl349z9n8chw80i5adl3iwhq4y102g0xrjyb72d";
+    })
+  ];
+
+  patchFlags = [ "-p0" ];
+
+  buildInputs = [ SDL freetype ];
+
+  configureFlags = lib.optional stdenv.isDarwin "--disable-sdltest";
+
+  meta = with lib; {
+    description = "SDL TrueType library";
+    license = licenses.zlib;
+    platforms = platforms.all;
+    homepage = "https://www.libsdl.org/projects/SDL_ttf/release-1.2.html";
+    maintainers = with maintainers; [ abbradar ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/Xaw3d/default.nix b/nixpkgs/pkgs/development/libraries/Xaw3d/default.nix
new file mode 100644
index 000000000000..f90be3a751e3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/Xaw3d/default.nix
@@ -0,0 +1,35 @@
+{ lib
+, stdenv
+, fetchurl
+, imake
+, gccmakedep
+, bison
+, flex
+, pkg-config
+, libXext
+, libXmu
+, libXpm
+, libXp
+, libXt
+, xorgproto
+}:
+
+stdenv.mkDerivation rec {
+  pname = "Xaw3d";
+  version = "1.6.5";
+
+  src = fetchurl {
+    url = "https://www.x.org/releases/individual/lib/libXaw3d-${version}.tar.xz";
+    sha256 = "sha256-NIHuS2dTuI4YhW6iZcuE8rAznujDu+yWaxVrOLWEGDM=";
+  };
+  dontUseImakeConfigure = true;
+  nativeBuildInputs = [ pkg-config bison flex imake gccmakedep ];
+  buildInputs = [ libXext libXpm libXp ];
+  propagatedBuildInputs = [ libXmu libXt xorgproto ];
+
+  meta = with lib; {
+    description = "3D widget set based on the Athena Widget set";
+    platforms = lib.platforms.unix;
+    license = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/a52dec/default.nix b/nixpkgs/pkgs/development/libraries/a52dec/default.nix
new file mode 100644
index 000000000000..fdb309c634da
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/a52dec/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "a52dec";
+  version = "0.7.4";
+
+  src = fetchurl {
+    url = "https://liba52.sourceforge.io/files/${pname}-${version}.tar.gz";
+    sha256 = "oh1ySrOzkzMwGUNTaH34LEdbXfuZdRPu9MJd5shl7DM=";
+  };
+
+  configureFlags = [
+    "--enable-shared"
+    # Define inline as __attribute__ ((__always_inline__))
+    "ac_cv_c_inline=yes"
+  ];
+
+  makeFlags = [
+    "AR=${stdenv.cc.targetPrefix}ar"
+  ];
+
+  # fails 1 out of 1 tests with "BAD GLOBAL SYMBOLS" on i686
+  # which can also be fixed with
+  # hardeningDisable = lib.optional stdenv.isi686 "pic";
+  # but it's better to disable tests than loose ASLR on i686
+  doCheck = !stdenv.isi686;
+
+  meta = with lib; {
+    description = "ATSC A/52 stream decoder";
+    homepage = "https://liba52.sourceforge.io/";
+    platforms = platforms.unix;
+    license = licenses.gpl2Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aalib/clang.patch b/nixpkgs/pkgs/development/libraries/aalib/clang.patch
new file mode 100644
index 000000000000..5f8fa80f387d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aalib/clang.patch
@@ -0,0 +1,74 @@
+diff -ur a/configure b/configure
+--- a/configure	2001-04-26 10:44:54.000000000 -0400
++++ b/configure	2023-10-21 23:19:52.941161475 -0400
+@@ -1005,7 +1005,7 @@
+ #line 1006 "configure"
+ #include "confdefs.h"
+ 
+-main(){return(0);}
++int main(){return(0);}
+ EOF
+ if { (eval echo configure:1011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   ac_cv_prog_cc_works=yes
+diff -ur a/src/aafire.c b/src/aafire.c
+--- a/src/aafire.c	2001-04-26 11:30:03.000000000 -0400
++++ b/src/aafire.c	2023-10-21 23:46:54.478750904 -0400
+@@ -1,3 +1,4 @@
++#include <stdlib.h>
+ #include <stdio.h>
+ #include "aalib.h"
+ 
+diff -ur a/src/aainfo.c b/src/aainfo.c
+--- a/src/aainfo.c	2001-04-26 10:37:31.000000000 -0400
++++ b/src/aainfo.c	2023-10-21 23:31:54.141133353 -0400
+@@ -1,4 +1,4 @@
+-
++#include <stdlib.h>
+ #include "aalib.h"
+ #include "aaint.h"
+ int main(int argc, char **argv)
+diff -ur a/src/aakbdreg.c b/src/aakbdreg.c
+--- a/src/aakbdreg.c	2023-10-21 23:19:00.787207960 -0400
++++ b/src/aakbdreg.c	2023-10-21 23:23:49.667253541 -0400
+@@ -1,4 +1,5 @@
+ #include <malloc.h>
++#include <string.h>
+ #include "config.h"
+ #include "aalib.h"
+ #include "aaint.h"
+diff -ur a/src/aamoureg.c b/src/aamoureg.c
+--- a/src/aamoureg.c	2023-10-21 23:19:00.787725591 -0400
++++ b/src/aamoureg.c	2023-10-21 23:26:51.821477807 -0400
+@@ -1,4 +1,5 @@
+ #include <malloc.h>
++#include <string.h>
+ #include "config.h"
+ #include "aalib.h"
+ #include "aaint.h"
+diff -ur a/src/aaregist.c b/src/aaregist.c
+--- a/src/aaregist.c	2023-10-21 23:19:00.788130179 -0400
++++ b/src/aaregist.c	2023-10-21 23:19:38.929729034 -0400
+@@ -1,4 +1,5 @@
+ #include <malloc.h>
++#include <string.h>
+ #include "config.h"
+ #include "aalib.h"
+ #include "aaint.h"
+diff -ur a/src/aasavefont.c b/src/aasavefont.c
+--- a/src/aasavefont.c	2001-04-26 10:37:31.000000000 -0400
++++ b/src/aasavefont.c	2023-10-21 23:51:09.216521714 -0400
+@@ -1,3 +1,5 @@
++#include <stdlib.h>
++#include <stdio.h>
+ #include "aalib.h"
+ int main(int argc, char **argv)
+ {
+diff -ur a/src/aatest.c b/src/aatest.c
+--- a/src/aatest.c	2001-04-26 10:37:31.000000000 -0400
++++ b/src/aatest.c	2023-10-21 23:43:16.758422704 -0400
+@@ -1,3 +1,5 @@
++#include <stdlib.h>
++#include <string.h>
+ #include "aalib.h"
+ int main(int argc, char **argv)
+ {
diff --git a/nixpkgs/pkgs/development/libraries/aalib/darwin.patch b/nixpkgs/pkgs/development/libraries/aalib/darwin.patch
new file mode 100644
index 000000000000..94b548b35c16
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aalib/darwin.patch
@@ -0,0 +1,106 @@
+diff --git a/src/aaedit.c b/src/aaedit.c
+index 09534d2..2ea52f9 100644
+--- a/src/aaedit.c
++++ b/src/aaedit.c
+@@ -1,6 +1,6 @@
+ #include <string.h>
+ #include <ctype.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ #include "aalib.h"
+ #include "aaint.h"
+ static void aa_editdisplay(struct aa_edit *e)
+ 
+diff --git a/src/aakbdreg.c b/src/aakbdreg.c
+index def65fe..f4f8efb 100644
+--- a/src/aakbdreg.c
++++ b/src/aakbdreg.c
+@@ -1,4 +1,4 @@
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include "config.h"
+ #include "aalib.h"
+diff --git a/src/aalib.c b/src/aalib.c
+index 11fecc8..e3063b4 100644
+--- a/src/aalib.c
++++ b/src/aalib.c
+@@ -1,6 +1,6 @@
+ #include <stdio.h>
+ #include <string.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ #include "aalib.h"
+ #include "aaint.h"
+ 
+diff --git a/src/aamoureg.c b/src/aamoureg.c
+index 0380828..bb55fe3 100644
+--- a/src/aamoureg.c
++++ b/src/aamoureg.c
+@@ -1,4 +1,4 @@
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include "config.h"
+ #include "aalib.h"
+diff --git a/src/aarec.c b/src/aarec.c
+index 70f4ebc..ee43e8a 100644
+--- a/src/aarec.c
++++ b/src/aarec.c
+@@ -1,5 +1,5 @@
+ #include <string.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ #include "aalib.h"
+ #include "aaint.h"
+ aa_linkedlist *aa_kbdrecommended = NULL, *aa_mouserecommended = NULL,
+diff --git a/src/aaregist.c b/src/aaregist.c
+index 54abec0..765155e 100644
+--- a/src/aaregist.c
++++ b/src/aaregist.c
+@@ -1,4 +1,4 @@
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include "config.h"
+ #include "aalib.h"
+diff --git a/src/aax.c b/src/aax.c
+index adcbd82..36e3294 100644
+--- a/src/aax.c
++++ b/src/aax.c
+@@ -1,4 +1,3 @@
+-#include <malloc.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <stdio.h>
+diff --git a/src/aaxkbd.c b/src/aaxkbd.c
+index 30d5903..da2248d 100644
+--- a/src/aaxkbd.c
++++ b/src/aaxkbd.c
+@@ -1,4 +1,3 @@
+-#include <malloc.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <stdio.h>
+diff --git a/src/aaxmouse.c b/src/aaxmouse.c
+index 9935b03..7e725ad 100644
+--- a/src/aaxmouse.c
++++ b/src/aaxmouse.c
+@@ -1,4 +1,3 @@
+-#include <malloc.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <stdio.h>
+diff --git a/aalib.m4 b/aalib.m4
+index c40b8db..991fbda 100644
+--- a/aalib.m4
++++ b/aalib.m4
+@@ -9,7 +9,7 @@
+ dnl AM_PATH_AALIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+ dnl Test for AALIB, and define AALIB_CFLAGS and AALIB_LIBS
+ dnl
+-AC_DEFUN(AM_PATH_AALIB,
++AC_DEFUN([AM_PATH_AALIB],
+ [dnl 
+ dnl Get the cflags and libraries from the aalib-config script
+ dnl
diff --git a/nixpkgs/pkgs/development/libraries/aalib/default.nix b/nixpkgs/pkgs/development/libraries/aalib/default.nix
new file mode 100644
index 000000000000..903364ea27f6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aalib/default.nix
@@ -0,0 +1,43 @@
+{lib, stdenv, fetchurl, ncurses, automake}:
+
+stdenv.mkDerivation rec {
+  pname = "aalib";
+  version = "1.4rc5";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/aa-project/aalib-${version}.tar.gz";
+    sha256 = "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv";
+  };
+
+  outputs = [ "bin" "dev" "out" "man" "info" ];
+  setOutputFlags = false; # Doesn't support all the flags
+
+  patches = [ ./clang.patch ] # Fix implicit `int` on `main` error with newer versions of clang
+    ++ lib.optionals stdenv.isDarwin [ ./darwin.patch ];
+
+  # The fuloong2f is not supported by aalib still
+  preConfigure = ''
+    cp ${automake}/share/automake*/config.{sub,guess} .
+    configureFlagsArray+=(
+      "--bindir=$bin/bin"
+      "--includedir=$dev/include"
+      "--libdir=$out/lib"
+    )
+  '';
+
+  buildInputs = [ ncurses ];
+
+  configureFlags = [ "--without-x" "--with-ncurses=${ncurses.dev}" ];
+
+  postInstall = ''
+    mkdir -p $dev/bin
+    mv $bin/bin/aalib-config $dev/bin/aalib-config
+    substituteInPlace $out/lib/libaa.la --replace "${ncurses.dev}/lib" "${ncurses.out}/lib"
+  '';
+
+  meta = {
+    description = "ASCII art graphics library";
+    platforms = lib.platforms.unix;
+    license = lib.licenses.lgpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/abseil-cpp/202103.nix b/nixpkgs/pkgs/development/libraries/abseil-cpp/202103.nix
new file mode 100644
index 000000000000..59294496f80a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/abseil-cpp/202103.nix
@@ -0,0 +1,63 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, static ? stdenv.hostPlatform.isStatic
+, cxxStandard ? null
+}:
+
+stdenv.mkDerivation rec {
+  pname = "abseil-cpp";
+  version = "20210324.2";
+
+  src = fetchFromGitHub {
+    owner = "abseil";
+    repo = "abseil-cpp";
+    rev = version;
+    sha256 = "sha256-fcxPhuI2eL/fnd6nT11p8DpUNwGNaXZmd03yOiZcOT0=";
+  };
+
+  patches = [
+    # Use CMAKE_INSTALL_FULL_{LIBDIR,INCLUDEDIR}
+    # https://github.com/abseil/abseil-cpp/pull/963
+    (fetchpatch {
+      url = "https://github.com/abseil/abseil-cpp/commit/5bfa70c75e621c5d5ec095c8c4c0c050dcb2957e.patch";
+      sha256 = "0nhjxqfxpi2pkfinnqvd5m4npf9l1kg39mjx9l3087ajhadaywl5";
+    })
+
+    # Bacport gcc-13 fix:
+    #   https://github.com/abseil/abseil-cpp/pull/1187
+    (fetchpatch {
+      name = "gcc-13.patch";
+      url = "https://github.com/abseil/abseil-cpp/commit/36a4b073f1e7e02ed7d1ac140767e36f82f09b7c.patch";
+      hash = "sha256-aA7mwGEtv/cQINcawjkukmCvfNuqwUeDFssSiNKPdgg=";
+    })
+  ] ++ lib.optionals stdenv.hostPlatform.isLoongArch64 [
+    # https://github.com/abseil/abseil-cpp/pull/1110
+    (fetchpatch {
+      url = "https://github.com/abseil/abseil-cpp/commit/808bc202fc13e85a7948db0d7fb58f0f051200b1.patch";
+      sha256 = "sha256-ayY/aV/xWOdEyFSDqV7B5WDGvZ0ASr/aeBeYwP5RZVc=";
+    })
+  ] ++ lib.optionals stdenv.isDarwin [
+    # Don’t propagate the path to CoreFoundation. Otherwise, it’s impossible to build packages
+    # that require a different SDK other than the default one.
+    ./cmake-core-foundation.patch
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
+  ] ++ lib.optionals (cxxStandard != null) [
+    "-DCMAKE_CXX_STANDARD=${cxxStandard}"
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "An open-source collection of C++ code designed to augment the C++ standard library";
+    homepage = "https://abseil.io/";
+    license = licenses.asl20;
+    platforms = platforms.all;
+    maintainers = [ maintainers.andersk ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/abseil-cpp/202111.nix b/nixpkgs/pkgs/development/libraries/abseil-cpp/202111.nix
new file mode 100644
index 000000000000..0c1a173eca44
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/abseil-cpp/202111.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, static ? stdenv.hostPlatform.isStatic
+, cxxStandard ? null
+}:
+
+stdenv.mkDerivation rec {
+  pname = "abseil-cpp";
+  version = "20211102.0";
+
+  src = fetchFromGitHub {
+    owner = "abseil";
+    repo = "abseil-cpp";
+    rev = version;
+    sha256 = "sha256-sSXT6D4JSrk3dA7kVaxfKkzOMBpqXQb0WbMYWG+nGwk=";
+  };
+
+  patches = lib.optionals stdenv.isDarwin [
+    # Don’t propagate the path to CoreFoundation. Otherwise, it’s impossible to build packages
+    # that require a different SDK other than the default one.
+    ./cmake-core-foundation.patch
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
+  ] ++ lib.optionals (cxxStandard != null) [
+    "-DCMAKE_CXX_STANDARD=${cxxStandard}"
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "An open-source collection of C++ code designed to augment the C++ standard library";
+    homepage = "https://abseil.io/";
+    license = licenses.asl20;
+    platforms = platforms.all;
+    maintainers = [ maintainers.andersk ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/abseil-cpp/202206.nix b/nixpkgs/pkgs/development/libraries/abseil-cpp/202206.nix
new file mode 100644
index 000000000000..5dda078a3a90
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/abseil-cpp/202206.nix
@@ -0,0 +1,41 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, static ? stdenv.hostPlatform.isStatic
+, cxxStandard ? null
+}:
+
+stdenv.mkDerivation rec {
+  pname = "abseil-cpp";
+  version = "20220623.2";
+
+  src = fetchFromGitHub {
+    owner = "abseil";
+    repo = "abseil-cpp";
+    rev = "refs/tags/${version}";
+    hash = "sha256-ma8QJfSySsk2XVLA0rhwYJMQx+6HxMFgub6gi5mDrLI=";
+  };
+
+  patches = lib.optionals stdenv.isDarwin [
+    # Don’t propagate the path to CoreFoundation. Otherwise, it’s impossible to build packages
+    # that require a different SDK other than the default one.
+    ./cmake-core-foundation.patch
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
+  ] ++ lib.optionals (cxxStandard != null) [
+    "-DCMAKE_CXX_STANDARD=${cxxStandard}"
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "An open-source collection of C++ code designed to augment the C++ standard library";
+    homepage = "https://abseil.io/";
+    license = licenses.asl20;
+    platforms = platforms.all;
+    maintainers = [ maintainers.andersk ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/abseil-cpp/202301.nix b/nixpkgs/pkgs/development/libraries/abseil-cpp/202301.nix
new file mode 100644
index 000000000000..b2d4f437473f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/abseil-cpp/202301.nix
@@ -0,0 +1,48 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, gtest
+, static ? stdenv.hostPlatform.isStatic
+, cxxStandard ? null
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "abseil-cpp";
+  version = "20230125.4";
+
+  src = fetchFromGitHub {
+    owner = "abseil";
+    repo = "abseil-cpp";
+    rev = "refs/tags/${finalAttrs.version}";
+    hash = "sha256-7C/QIXYRyUyNVVE0tqmv8b5g/uWc58iBI5jzdtddQ+U=";
+  };
+
+  patches = lib.optionals stdenv.isDarwin [
+    # Don’t propagate the path to CoreFoundation. Otherwise, it’s impossible to build packages
+    # that require a different SDK other than the default one.
+    ./cmake-core-foundation.patch
+  ];
+
+  cmakeFlags = [
+    "-DABSL_BUILD_TEST_HELPERS=ON"
+    "-DABSL_USE_EXTERNAL_GOOGLETEST=ON"
+    "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
+  ] ++ lib.optionals (cxxStandard != null) [
+    "-DCMAKE_CXX_STANDARD=${cxxStandard}"
+  ];
+
+  strictDeps = true;
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ gtest ];
+
+  meta = with lib; {
+    description = "An open-source collection of C++ code designed to augment the C++ standard library";
+    homepage = "https://abseil.io/";
+    license = licenses.asl20;
+    platforms = platforms.all;
+    maintainers = [ maintainers.andersk ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/abseil-cpp/202308.nix b/nixpkgs/pkgs/development/libraries/abseil-cpp/202308.nix
new file mode 100644
index 000000000000..f3aac7d1388b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/abseil-cpp/202308.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, gtest
+, static ? stdenv.hostPlatform.isStatic
+, cxxStandard ? null
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "abseil-cpp";
+  version = "20230802.2";
+
+  src = fetchFromGitHub {
+    owner = "abseil";
+    repo = "abseil-cpp";
+    rev = "refs/tags/${finalAttrs.version}";
+    hash = "sha256-wW7dCqiiHyBHiizyV0+M6p17itwTpzHv/T0/mcXyYWE=";
+  };
+
+  cmakeFlags = [
+    "-DABSL_BUILD_TEST_HELPERS=ON"
+    "-DABSL_USE_EXTERNAL_GOOGLETEST=ON"
+    "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
+  ] ++ lib.optionals (cxxStandard != null) [
+    "-DCMAKE_CXX_STANDARD=${cxxStandard}"
+  ];
+
+  strictDeps = true;
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ gtest ];
+
+  meta = with lib; {
+    description = "An open-source collection of C++ code designed to augment the C++ standard library";
+    homepage = "https://abseil.io/";
+    license = licenses.asl20;
+    platforms = platforms.all;
+    maintainers = [ maintainers.andersk ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/abseil-cpp/202401.nix b/nixpkgs/pkgs/development/libraries/abseil-cpp/202401.nix
new file mode 100644
index 000000000000..f540a7f8260a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/abseil-cpp/202401.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, gtest
+, static ? stdenv.hostPlatform.isStatic
+, cxxStandard ? null
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "abseil-cpp";
+  version = "20240116.0";
+
+  src = fetchFromGitHub {
+    owner = "abseil";
+    repo = "abseil-cpp";
+    rev = "refs/tags/${finalAttrs.version}";
+    hash = "sha256-HtJh2oYGx87bNT6Ll3WLeYPPxH1f9JwVqCXGErykGnE=";
+  };
+
+  cmakeFlags = [
+    "-DABSL_BUILD_TEST_HELPERS=ON"
+    "-DABSL_USE_EXTERNAL_GOOGLETEST=ON"
+    "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
+  ] ++ lib.optionals (cxxStandard != null) [
+    "-DCMAKE_CXX_STANDARD=${cxxStandard}"
+  ];
+
+  strictDeps = true;
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ gtest ];
+
+  meta = with lib; {
+    description = "An open-source collection of C++ code designed to augment the C++ standard library";
+    homepage = "https://abseil.io/";
+    license = licenses.asl20;
+    platforms = platforms.all;
+    maintainers = [ maintainers.GaetanLepage ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/abseil-cpp/cmake-core-foundation.patch b/nixpkgs/pkgs/development/libraries/abseil-cpp/cmake-core-foundation.patch
new file mode 100644
index 000000000000..61b57456b3fc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/abseil-cpp/cmake-core-foundation.patch
@@ -0,0 +1,12 @@
+diff -ur a/absl/time/CMakeLists.txt b/absl/time/CMakeLists.txt
+--- a/absl/time/CMakeLists.txt	1969-12-31 19:00:01.000000000 -0500
++++ b/absl/time/CMakeLists.txt	2023-10-30 21:50:32.639061785 -0400
+@@ -55,7 +55,7 @@
+ )
+ 
+ if(APPLE)
+-  find_library(CoreFoundation CoreFoundation)
++  set(CoreFoundation "-framework CoreFoundation")
+ endif()
+ 
+ absl_cc_library(
diff --git a/nixpkgs/pkgs/development/libraries/accounts-qml-module/default.nix b/nixpkgs/pkgs/development/libraries/accounts-qml-module/default.nix
new file mode 100644
index 000000000000..aa68cb105af3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/accounts-qml-module/default.nix
@@ -0,0 +1,88 @@
+{ stdenv
+, lib
+, fetchFromGitLab
+, accounts-qt
+, dbus-test-runner
+, pkg-config
+, qmake
+, qtbase
+, qtdeclarative
+, signond
+, xvfb-run
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "accounts-qml-module";
+  version = "0.7-unstable-2022-10-28";
+
+  src = fetchFromGitLab {
+    owner = "accounts-sso";
+    repo = "accounts-qml-module";
+    rev = "05e79ebbbf3784a87f72b7be571070125c10dfe3";
+    hash = "sha256-ZpnkZauowLPBnO3DDDtG/x07XoQGVNqEF8AQB5TZK84=";
+  };
+
+  postPatch = ''
+    substituteInPlace src/src.pro \
+      --replace '$$[QT_INSTALL_BINS]/qmlplugindump' 'qmlplugindump' \
+      --replace '$$[QT_INSTALL_QML]' '${placeholder "out"}/${qtbase.qtQmlPrefix}'
+
+    # Don't install test binary
+    sed -i tests/tst_plugin.pro \
+      -e '/TARGET = tst_plugin/a INSTALLS -= target'
+  '' + lib.optionalString (!finalAttrs.doCheck) ''
+    sed -i accounts-qml-module.pro -e '/tests/d'
+  '';
+
+  # QMake can't find Qt modules in buildInputs
+  strictDeps = false;
+
+  nativeBuildInputs = [
+    pkg-config
+    qmake
+    qtdeclarative # qmlplugindump
+  ];
+
+  buildInputs = [
+    accounts-qt
+    qtbase
+    qtdeclarative
+    signond
+  ];
+
+  nativeCheckInputs = [
+    dbus-test-runner
+    xvfb-run
+  ];
+
+  dontWrapQtApps = true;
+
+  qmakeFlags = [
+    # Needs qdoc, https://github.com/NixOS/nixpkgs/pull/245379
+    "CONFIG+=no_docs"
+  ];
+
+  postConfigure = ''
+    make qmake_all
+  '';
+
+  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
+
+  preCheck = ''
+    # Needs xcb platform plugin
+    export QT_PLUGIN_PATH=${lib.getBin qtbase}/${qtbase.qtPluginPrefix}
+  '';
+
+  preInstall = ''
+    # Same plugin needed here, re-export in case checks are disabled
+    export QT_PLUGIN_PATH=${lib.getBin qtbase}/${qtbase.qtPluginPrefix}
+  '';
+
+  meta = with lib; {
+    description = "QML bindings for libaccounts-qt + libsignon-qt";
+    homepage = "https://gitlab.com/accounts-sso/accounts-qml-module";
+    license = licenses.lgpl21Only;
+    maintainers = with maintainers; [ OPNA2608 ];
+    platforms = platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/accounts-qt/default.nix b/nixpkgs/pkgs/development/libraries/accounts-qt/default.nix
new file mode 100644
index 000000000000..7549f02fc56c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/accounts-qt/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, lib, fetchFromGitLab, doxygen, glib, libaccounts-glib, pkg-config, qmake, qtbase, wrapQtAppsHook }:
+
+stdenv.mkDerivation rec {
+  pname = "accounts-qt";
+  version = "1.16";
+
+  src = fetchFromGitLab {
+    sha256 = "1vmpjvysm0ld8dqnx8msa15hlhrkny02cqycsh4k2azrnijg0xjz";
+    rev = "VERSION_${version}";
+    repo = "libaccounts-qt";
+    owner = "accounts-sso";
+  };
+
+  propagatedBuildInputs = [ glib libaccounts-glib ];
+  buildInputs = [ qtbase ];
+  nativeBuildInputs = [ doxygen pkg-config qmake wrapQtAppsHook ];
+
+  # remove forbidden references to /build
+  preFixup = ''
+    patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$out"/bin/*
+  '';
+
+  meta = with lib; {
+    description = "Qt library for accessing the online accounts database";
+    homepage = "https://gitlab.com/accounts-sso";
+    license = licenses.lgpl21;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/accountsservice/Disable-methods-that-change-files-in-etc.patch b/nixpkgs/pkgs/development/libraries/accountsservice/Disable-methods-that-change-files-in-etc.patch
new file mode 100644
index 000000000000..23e1de95fdff
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/accountsservice/Disable-methods-that-change-files-in-etc.patch
@@ -0,0 +1,127 @@
+From 6f172007452b39bfda5062fc29ea5382671ac16e Mon Sep 17 00:00:00 2001
+From: Alexander Ried <ried@mytum.de>
+Date: Thu, 26 May 2016 19:54:21 +0200
+Subject: [PATCH] Disable methods that change files in /etc
+
+Only if environment variable NIXOS_USERS_PURE is set.
+---
+ src/daemon.c | 10 ++++++++++
+ src/user.c   | 35 +++++++++++++++++++++++++++++++++++
+ 2 files changed, 45 insertions(+)
+
+diff --git a/src/daemon.c b/src/daemon.c
+index 861430f..aefaf2d 100644
+--- a/src/daemon.c
++++ b/src/daemon.c
+@@ -1378,6 +1378,11 @@ daemon_create_user (AccountsAccounts      *accounts,
+                     const gchar           *real_name,
+                     gint                   account_type)
+ {
++        if (getenv("NIXOS_USERS_PURE")) {
++                throw_error (context, ERROR_NOT_SUPPORTED, "Modifying users not supported without users.mutableUsers");
++                return;
++        }
++
+         Daemon *daemon = (Daemon *) accounts;
+         CreateUserData *data;
+ 
+@@ -1581,6 +1586,11 @@ daemon_delete_user (AccountsAccounts      *accounts,
+                     gint64                 uid,
+                     gboolean               remove_files)
+ {
++        if (getenv("NIXOS_USERS_PURE")) {
++                throw_error (context, ERROR_NOT_SUPPORTED, "Modifying users not supported without users.mutableUsers");
++                return;
++        }
++
+         Daemon *daemon = (Daemon *) accounts;
+         DeleteUserData *data;
+ 
+diff --git a/src/user.c b/src/user.c
+index 28170db..df947a1 100644
+--- a/src/user.c
++++ b/src/user.c
+@@ -1216,6 +1216,11 @@ user_set_real_name (AccountsUser          *auser,
+                     GDBusMethodInvocation *context,
+                     const gchar           *real_name)
+ {
++        if (getenv("NIXOS_USERS_PURE")) {
++                throw_error (context, ERROR_NOT_SUPPORTED, "Modifying users not supported without users.mutableUsers");
++                return;
++        }
++
+         User *user = (User *) auser;
+         int uid;
+         const gchar *action_id;
+@@ -1293,6 +1298,11 @@ user_set_user_name (AccountsUser          *auser,
+                     GDBusMethodInvocation *context,
+                     const gchar           *user_name)
+ {
++        if (getenv("NIXOS_USERS_PURE")) {
++                throw_error (context, ERROR_NOT_SUPPORTED, "Modifying users not supported without users.mutableUsers");
++                return;
++        }
++
+         User *user = (User *) auser;
+ 
+         daemon_local_check_auth (user->daemon,
+@@ -1945,6 +1955,11 @@ user_set_home_directory (AccountsUser          *auser,
+                          GDBusMethodInvocation *context,
+                          const gchar           *home_dir)
+ {
++        if (getenv("NIXOS_USERS_PURE")) {
++                throw_error (context, ERROR_NOT_SUPPORTED, "Modifying users not supported without users.mutableUsers");
++                return;
++        }
++
+         User *user = (User *) auser;
+ 
+         daemon_local_check_auth (user->daemon,
+@@ -2000,6 +2015,11 @@ user_set_shell (AccountsUser          *auser,
+                 GDBusMethodInvocation *context,
+                 const gchar           *shell)
+ {
++        if (getenv("NIXOS_USERS_PURE")) {
++                throw_error (context, ERROR_NOT_SUPPORTED, "Modifying users not supported without users.mutableUsers");
++                return;
++        }
++
+         User *user = (User *) auser;
+ 
+         daemon_local_check_auth (user->daemon,
+@@ -2249,6 +2269,11 @@ user_set_locked (AccountsUser          *auser,
+                  GDBusMethodInvocation *context,
+                  gboolean               locked)
+ {
++        if (getenv("NIXOS_USERS_PURE")) {
++                throw_error (context, ERROR_NOT_SUPPORTED, "Modifying users not supported without users.mutableUsers");
++                return;
++        }
++
+         User *user = (User *) auser;
+ 
+         daemon_local_check_auth (user->daemon,
+@@ -2457,6 +2482,11 @@ user_set_password_mode (AccountsUser          *auser,
+                         GDBusMethodInvocation *context,
+                         gint                   mode)
+ {
++        if (getenv("NIXOS_USERS_PURE")) {
++                throw_error (context, ERROR_NOT_SUPPORTED, "Modifying users not supported without users.mutableUsers");
++                return;
++        }
++
+         User *user = (User *) auser;
+         const gchar *action_id;
+         gint uid;
+@@ -2550,6 +2580,11 @@ user_set_password (AccountsUser          *auser,
+                    const gchar           *password,
+                    const gchar           *hint)
+ {
++        if (getenv("NIXOS_USERS_PURE")) {
++                throw_error (context, ERROR_NOT_SUPPORTED, "Modifying users not supported without users.mutableUsers");
++                return;
++        }
++
+         User *user = (User *) auser;
+         gchar **data;
+         const gchar *action_id;
diff --git a/nixpkgs/pkgs/development/libraries/accountsservice/default.nix b/nixpkgs/pkgs/development/libraries/accountsservice/default.nix
new file mode 100644
index 000000000000..1a5f03f635bc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/accountsservice/default.nix
@@ -0,0 +1,95 @@
+{ lib
+, stdenv
+, fetchurl
+, substituteAll
+, pkg-config
+, glib
+, shadow
+, gobject-introspection
+, polkit
+, systemd
+, coreutils
+, meson
+, mesonEmulatorHook
+, dbus
+, ninja
+, python3
+, vala
+, gettext
+, libxcrypt
+}:
+
+stdenv.mkDerivation rec {
+  pname = "accountsservice";
+  version = "23.13.9";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "https://www.freedesktop.org/software/accountsservice/accountsservice-${version}.tar.xz";
+    sha256 = "rdpM3q4k+gmS598///nv+nCQvjrCM6Pt/fadWpybkk8=";
+  };
+
+  patches = [
+    # Hardcode dependency paths.
+    (substituteAll {
+      src = ./fix-paths.patch;
+      inherit shadow coreutils;
+    })
+
+    # Do not try to create directories in /var, that will not work in Nix sandbox.
+    ./no-create-dirs.patch
+
+    # Disable mutating D-Bus methods with immutable /etc.
+    ./Disable-methods-that-change-files-in-etc.patch
+
+    # Do not ignore third-party (e.g Pantheon) extensions not matching FHS path scheme.
+    # Fixes https://github.com/NixOS/nixpkgs/issues/72396
+    ./drop-prefix-check-extensions.patch
+
+    # Detect DM type from config file.
+    # `readlink display-manager.service` won't return any of the candidates.
+    ./get-dm-type-from-config.patch
+  ];
+
+  nativeBuildInputs = [
+    gettext
+    gobject-introspection
+    meson
+    ninja
+    pkg-config
+    python3
+    vala
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    #  meson.build:88:2: ERROR: Can not run test applications in this cross environment.
+    mesonEmulatorHook
+  ];
+
+  buildInputs = [
+    dbus
+    gettext
+    glib
+    polkit
+    systemd
+    libxcrypt
+  ];
+
+  mesonFlags = [
+    "-Dadmin_group=wheel"
+    "-Dlocalstatedir=/var"
+    "-Dsystemdsystemunitdir=${placeholder "out"}/etc/systemd/system"
+  ];
+
+  postPatch = ''
+    chmod +x meson_post_install.py
+    patchShebangs meson_post_install.py
+  '';
+
+  meta = with lib; {
+    description = "D-Bus interface for user account query and manipulation";
+    homepage = "https://www.freedesktop.org/wiki/Software/AccountsService";
+    license = licenses.gpl3Plus;
+    maintainers = teams.freedesktop.members ++ (with maintainers; [ pSub ]);
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/accountsservice/drop-prefix-check-extensions.patch b/nixpkgs/pkgs/development/libraries/accountsservice/drop-prefix-check-extensions.patch
new file mode 100644
index 000000000000..d4b7eac1cb31
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/accountsservice/drop-prefix-check-extensions.patch
@@ -0,0 +1,21 @@
+diff --git a/src/extensions.c b/src/extensions.c
+index 354f476..8d020a6 100644
+--- a/src/extensions.c
++++ b/src/extensions.c
+@@ -122,15 +122,7 @@ daemon_read_extension_directory (GHashTable  *ifaces,
+                         continue;
+                 }
+ 
+-                /* Ensure it looks like "../../dbus-1/interfaces/${name}" */
+-                const gchar * const prefix = "../../dbus-1/interfaces/";
+-                if (g_str_has_prefix (symlink, prefix) && g_str_equal (symlink + strlen (prefix), name)) {
+-                        daemon_read_extension_file (ifaces, filename);
+-                } else {
+-                        g_warning ("Found accounts service vendor extension symlink %s, but it must be exactly "
+-                                   "equal to '../../dbus-1/interfaces/%s' for forwards-compatibility reasons.",
+-                                   filename, name);
+-                }
++                daemon_read_extension_file (ifaces, filename);
+         }
+ 
+         g_dir_close (dir);
diff --git a/nixpkgs/pkgs/development/libraries/accountsservice/fix-paths.patch b/nixpkgs/pkgs/development/libraries/accountsservice/fix-paths.patch
new file mode 100644
index 000000000000..d4b48e882e53
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/accountsservice/fix-paths.patch
@@ -0,0 +1,143 @@
+diff --git a/src/daemon.c b/src/daemon.c
+index aa9d050..861430f 100644
+--- a/src/daemon.c
++++ b/src/daemon.c
+@@ -1319,7 +1319,7 @@ daemon_create_user_authorized_cb (Daemon                *daemon,
+ 
+         sys_log (context, "create user '%s'", cd->user_name);
+ 
+-        argv[0] = "/usr/sbin/useradd";
++        argv[0] = "@shadow@/bin/useradd";
+         argv[1] = "-m";
+         argv[2] = "-c";
+         argv[3] = cd->real_name;
+@@ -1552,7 +1552,7 @@ daemon_delete_user_authorized_cb (Daemon                *daemon,
+         }
+         free (resolved_homedir);
+ 
+-        argv[0] = "/usr/sbin/userdel";
++        argv[0] = "@shadow@/bin/userdel";
+         if (ud->remove_files) {
+                 argv[1] = "-f";
+                 argv[2] = "-r";
+diff --git a/src/user.c b/src/user.c
+index 917d427..28170db 100644
+--- a/src/user.c
++++ b/src/user.c
+@@ -1193,7 +1193,7 @@ user_change_real_name_authorized_cb (Daemon                *daemon,
+                         new_gecos = g_strdup (name);
+                 }
+ 
+-                argv[0] = "/usr/sbin/usermod";
++                argv[0] = "@shadow@/bin/usermod";
+                 argv[1] = "-c";
+                 argv[2] = new_gecos;
+                 argv[3] = "--";
+@@ -1267,7 +1267,7 @@ user_change_user_name_authorized_cb (Daemon                *daemon,
+                          accounts_user_get_uid (ACCOUNTS_USER (user)),
+                          name);
+ 
+-                argv[0] = "/usr/sbin/usermod";
++                argv[0] = "@shadow@/bin/usermod";
+                 argv[1] = "-l";
+                 argv[2] = name;
+                 argv[3] = "--";
+@@ -1718,7 +1718,7 @@ user_set_password_expiration_policy_authorized_cb (Daemon                *daemon
+                  accounts_user_get_uid (ACCOUNTS_USER (user)));
+ 
+         g_object_freeze_notify (G_OBJECT (user));
+-        argv[0] = "/usr/bin/chage";
++        argv[0] = "@shadow@/bin/chage";
+         argv[1] = "-m";
+         argv[2] = pwd_expiration->min_days_between_changes;
+         argv[3] = "-M";
+@@ -1806,7 +1806,7 @@ user_set_user_expiration_policy_authorized_cb (Daemon                *daemon,
+         } else {
+                 expiration_time = g_strdup ("-1");
+         }
+-        argv[0] = "/usr/bin/chage";
++        argv[0] = "@shadow@/bin/chage";
+         argv[1] = "-E";
+         argv[2] = expiration_time;
+         argv[3] = accounts_user_get_user_name (ACCOUNTS_USER (user));
+@@ -1919,7 +1919,7 @@ user_change_home_dir_authorized_cb (Daemon                *daemon,
+                          accounts_user_get_uid (ACCOUNTS_USER (user)),
+                          home_dir);
+ 
+-                argv[0] = "/usr/sbin/usermod";
++                argv[0] = "@shadow@/bin/usermod";
+                 argv[1] = "-m";
+                 argv[2] = "-d";
+                 argv[3] = home_dir;
+@@ -1977,7 +1977,7 @@ user_change_shell_authorized_cb (Daemon                *daemon,
+                          accounts_user_get_uid (ACCOUNTS_USER (user)),
+                          shell);
+ 
+-                argv[0] = "/usr/sbin/usermod";
++                argv[0] = "@shadow@/bin/usermod";
+                 argv[1] = "-s";
+                 argv[2] = shell;
+                 argv[3] = "--";
+@@ -2120,7 +2120,7 @@ user_change_icon_file_authorized_cb (Daemon                *daemon,
+                         return;
+                 }
+ 
+-                argv[0] = "/bin/cat";
++                argv[0] = "@coreutils@/bin/cat";
+                 argv[1] = filename;
+                 argv[2] = NULL;
+ 
+@@ -2201,7 +2201,7 @@ user_change_locked_authorized_cb (Daemon                *daemon,
+                          locked ? "locking" : "unlocking",
+                          accounts_user_get_user_name (ACCOUNTS_USER (user)),
+                          accounts_user_get_uid (ACCOUNTS_USER (user)));
+-                argv[0] = "/usr/sbin/usermod";
++                argv[0] = "@shadow@/bin/usermod";
+                 argv[1] = locked ? "-L" : "-U";
+                 argv[2] = "--";
+                 argv[3] = accounts_user_get_user_name (ACCOUNTS_USER (user));
+@@ -2328,7 +2328,7 @@ user_change_account_type_authorized_cb (Daemon                *daemon,
+ 
+                 g_free (groups);
+ 
+-                argv[0] = "/usr/sbin/usermod";
++                argv[0] = "@shadow@/bin/usermod";
+                 argv[1] = "-G";
+                 argv[2] = str->str;
+                 argv[3] = "--";
+@@ -2396,7 +2396,7 @@ user_change_password_mode_authorized_cb (Daemon                *daemon,
+ 
+                 if (mode == PASSWORD_MODE_SET_AT_LOGIN ||
+                     mode == PASSWORD_MODE_NONE) {
+-                        argv[0] = "/usr/bin/passwd";
++                        argv[0] = "/run/wrappers/bin/passwd";
+                         argv[1] = "-d";
+                         argv[2] = "--";
+                         argv[3] = accounts_user_get_user_name (ACCOUNTS_USER (user));
+@@ -2408,7 +2408,7 @@ user_change_password_mode_authorized_cb (Daemon                *daemon,
+                         }
+ 
+                         if (mode == PASSWORD_MODE_SET_AT_LOGIN) {
+-                                argv[0] = "/usr/bin/chage";
++                                argv[0] = "@shadow@/bin/chage";
+                                 argv[1] = "-d";
+                                 argv[2] = "0";
+                                 argv[3] = "--";
+@@ -2428,7 +2428,7 @@ user_change_password_mode_authorized_cb (Daemon                *daemon,
+                          */
+                         accounts_user_set_locked (ACCOUNTS_USER (user), FALSE);
+                 } else if (accounts_user_get_locked (ACCOUNTS_USER (user))) {
+-                        argv[0] = "/usr/sbin/usermod";
++                        argv[0] = "@shadow@/bin/usermod";
+                         argv[1] = "-U";
+                         argv[2] = "--";
+                         argv[3] = accounts_user_get_user_name (ACCOUNTS_USER (user));
+@@ -2505,7 +2505,7 @@ user_change_password_authorized_cb (Daemon                *daemon,
+ 
+         g_autoptr (GError) error = NULL;
+         g_autoptr (GSubprocess) process = NULL;
+-        const char *argv[] = { "/usr/sbin/chpasswd", "-e", NULL };
++        const char *argv[] = { "@shadow@/bin/chpasswd", "-e", NULL };
+ 
+         sys_log (context,
+                  "set password and hint of user '%s' (%" G_GUINT64_FORMAT ")",
diff --git a/nixpkgs/pkgs/development/libraries/accountsservice/get-dm-type-from-config.patch b/nixpkgs/pkgs/development/libraries/accountsservice/get-dm-type-from-config.patch
new file mode 100644
index 000000000000..3d4398ab303a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/accountsservice/get-dm-type-from-config.patch
@@ -0,0 +1,15 @@
+diff --git a/src/daemon.c b/src/daemon.c
+index aefaf2d..7c004d0 100644
+--- a/src/daemon.c
++++ b/src/daemon.c
+@@ -193,9 +193,9 @@ get_current_system_dm_type (void)
+                 basename = g_file_get_basename (file);
+                 g_object_unref (file);
+ 
+-                if (g_strcmp0 (basename, "lightdm.service") == 0)
++                if (g_file_test (PATH_LIGHTDM_CONF, G_FILE_TEST_EXISTS))
+                         return DISPLAY_MANAGER_TYPE_LIGHTDM;
+-                else if (g_strcmp0 (basename, "gdm.service") == 0)
++                else if (g_file_test (PATH_GDM_CUSTOM, G_FILE_TEST_EXISTS))
+                         return DISPLAY_MANAGER_TYPE_GDM;
+         }
diff --git a/nixpkgs/pkgs/development/libraries/accountsservice/no-create-dirs.patch b/nixpkgs/pkgs/development/libraries/accountsservice/no-create-dirs.patch
new file mode 100644
index 000000000000..9fbba4599c9f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/accountsservice/no-create-dirs.patch
@@ -0,0 +1,17 @@
+diff --git a/meson_post_install.py b/meson_post_install.py
+index d8c3dd1..620f714 100644
+--- a/meson_post_install.py
++++ b/meson_post_install.py
+@@ -9,9 +9,9 @@
+ # FIXME: meson will not track the creation of these directories
+ #        https://github.com/mesonbuild/meson/blob/master/mesonbuild/scripts/uninstall.py#L39
+ dst_dirs = [
+-  (os.path.join(localstatedir, 'lib'), 0o755),
+-  (os.path.join(localstatedir, 'lib', 'AccountsService', 'icons'), 0o775),
+-  (os.path.join(localstatedir, 'lib', 'AccountsService', 'users'), 0o700),
++  # (os.path.join(localstatedir, 'lib'), 0o755),
++  # (os.path.join(localstatedir, 'lib', 'AccountsService', 'icons'), 0o775),
++  # (os.path.join(localstatedir, 'lib', 'AccountsService', 'users'), 0o700),
+ ]
+ 
+ for (dst_dir, dst_dir_mode) in dst_dirs:
diff --git a/nixpkgs/pkgs/development/libraries/ace/default.nix b/nixpkgs/pkgs/development/libraries/ace/default.nix
new file mode 100644
index 000000000000..bae0401a781a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ace/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv, fetchurl, pkg-config, libtool, perl }:
+
+stdenv.mkDerivation rec {
+  pname = "ace";
+  version = "7.0.11";
+
+  src = fetchurl {
+    url = "https://download.dre.vanderbilt.edu/previous_versions/ACE-${version}.tar.bz2";
+    sha256 = "sha256-r+LRiu/u1qMcbrjkSr8ErnemX6zvhgvc5cLWu8AQhww=";
+  };
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ pkg-config libtool ];
+  buildInputs = [ perl ];
+
+  env.NIX_CFLAGS_COMPILE = toString [
+    "-Wno-error=format-security"
+  ];
+
+  postPatch = ''
+    patchShebangs ./MPC/prj_install.pl
+  '';
+
+  preConfigure = ''
+    export INSTALL_PREFIX=$out
+    export ACE_ROOT=$(pwd)
+    export LD_LIBRARY_PATH="$ACE_ROOT/ace:$ACE_ROOT/lib"
+    echo '#include "ace/config-linux.h"' > ace/config.h
+    echo 'include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU'\
+    > include/makeinclude/platform_macros.GNU
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.dre.vanderbilt.edu/~schmidt/ACE.html";
+    description = "ADAPTIVE Communication Environment";
+    license = licenses.doc;
+    maintainers = with maintainers; [ nico202 ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/acl/default.nix b/nixpkgs/pkgs/development/libraries/acl/default.nix
new file mode 100644
index 000000000000..7d8a04a2f0a9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/acl/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchurl, gettext, attr }:
+
+# Note: this package is used for bootstrapping fetchurl, and thus
+# cannot use fetchpatch! All mutable patches (generated by GitHub or
+# cgit) that are needed here should be included directly in Nixpkgs as
+# files.
+
+stdenv.mkDerivation rec {
+  pname = "acl";
+  version = "2.3.2";
+
+  src = fetchurl {
+    url = "mirror://savannah/acl/acl-${version}.tar.gz";
+    hash = "sha256-XyvbrWKXB6p9hcYj+ZSqih0t7FWnPeUgW6wL9gWKL3w=";
+  };
+
+  outputs = [ "bin" "dev" "out" "man" "doc" ];
+
+  nativeBuildInputs = [ gettext ];
+  buildInputs = [ attr ];
+
+  postPatch = ''
+    patchShebangs .
+  '';
+
+  meta = with lib; {
+    homepage = "https://savannah.nongnu.org/projects/acl";
+    description = "Library and tools for manipulating access control lists";
+    platforms = platforms.linux;
+    license = licenses.gpl2Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ada/gnatcoll/bindings.nix b/nixpkgs/pkgs/development/libraries/ada/gnatcoll/bindings.nix
new file mode 100644
index 000000000000..c8896c14c32f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ada/gnatcoll/bindings.nix
@@ -0,0 +1,89 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, gnat
+, gprbuild
+, gnatcoll-core
+, component
+# component dependencies
+, gmp
+, libiconv
+, xz
+, gcc-unwrapped
+, readline
+, zlib
+, python3
+, ncurses
+, darwin
+}:
+
+let
+  # omit python (2.7), no need to introduce a
+  # dependency on an EOL package for no reason
+  libsFor = {
+    iconv = [ libiconv ];
+    gmp = [ gmp ];
+    lzma = [ xz ];
+    readline = [ readline ];
+    python3 = [ python3 ncurses ];
+    syslog = [ ];
+    zlib = [ zlib ];
+  };
+in
+
+
+stdenv.mkDerivation rec {
+  pname = "gnatcoll-${component}";
+  version = "24.0.0";
+
+  src = fetchFromGitHub {
+    owner = "AdaCore";
+    repo = "gnatcoll-bindings";
+    rev = "v${version}";
+    sha256 = "00aakpmr67r72l1h3jpkaw83p1a2mjjvfk635yy5c1nss3ji1qjm";
+  };
+
+  nativeBuildInputs = [
+    gprbuild
+    gnat
+    python3
+  ];
+
+  buildInputs = lib.optionals stdenv.isDarwin [
+    darwin.apple_sdk.frameworks.CoreFoundation
+  ];
+
+  # propagate since gprbuild needs to find referenced .gpr files
+  # and all dependency C libraries when statically linking a
+  # downstream executable.
+  propagatedBuildInputs = [
+    gnatcoll-core
+  ] ++ libsFor."${component}" or [];
+
+  # explicit flag for GPL acceptance because upstreams
+  # allows a gcc runtime exception for all bindings
+  # except for readline (since it is GPL w/o exceptions)
+  buildFlags = lib.optionals (component == "readline") [
+    "--accept-gpl"
+  ];
+
+  buildPhase = ''
+    runHook preBuild
+    ${python3.interpreter} ${component}/setup.py build --prefix $out $buildFlags
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    ${python3.interpreter} ${component}/setup.py install --prefix $out
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "GNAT Components Collection - Bindings to C libraries";
+    homepage = "https://github.com/AdaCore/gnatcoll-bindings";
+    license = licenses.gpl3Plus;
+    platforms = platforms.all;
+    maintainers = [ maintainers.sternenseemann ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ada/gnatcoll/core.nix b/nixpkgs/pkgs/development/libraries/ada/gnatcoll/core.nix
new file mode 100644
index 000000000000..7fdd4e99d550
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ada/gnatcoll/core.nix
@@ -0,0 +1,47 @@
+{ stdenv
+, lib
+, gnat
+, gprbuild
+, fetchFromGitHub
+, xmlada
+, which
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gnatcoll-core";
+  version = "24.0.0";
+
+  src = fetchFromGitHub {
+    owner = "AdaCore";
+    repo = "gnatcoll-core";
+    rev = "v${version}";
+    sha256 = "1cks2w0inj9hvamsdxjriwxnx1igmx2khhr6kwxshsl30rs8nzvb";
+  };
+
+  nativeBuildInputs = [
+    gprbuild
+    which
+    gnat
+  ];
+
+  # propagate since gprbuild needs to find
+  # referenced GPR project definitions
+  propagatedBuildInputs = [
+    gprbuild # libgpr
+  ];
+
+  makeFlags = [
+    "prefix=${placeholder "out"}"
+    "PROCESSORS=$(NIX_BUILD_CORES)"
+    # confusingly, for gprbuild --target is autoconf --host
+    "TARGET=${stdenv.hostPlatform.config}"
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/AdaCore/gnatcoll-core";
+    description = "GNAT Components Collection - Core packages";
+    license = licenses.gpl3Plus;
+    maintainers = [ maintainers.sternenseemann ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ada/gnatcoll/db.nix b/nixpkgs/pkgs/development/libraries/ada/gnatcoll/db.nix
new file mode 100644
index 000000000000..6eacff1ddb82
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ada/gnatcoll/db.nix
@@ -0,0 +1,107 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, gnat
+, gprbuild
+, which
+, gnatcoll-core
+, xmlada
+, component
+# components built by this derivation other components depend on
+, gnatcoll-sql
+, gnatcoll-sqlite
+, gnatcoll-xref
+# component specific extra dependencies
+, gnatcoll-iconv
+, gnatcoll-readline
+, sqlite
+, postgresql
+}:
+
+let
+  libsFor = {
+    gnatcoll_db2ada = [
+      gnatcoll-sql
+    ];
+    gnatinspect = [
+      gnatcoll-sqlite
+      gnatcoll-readline
+      gnatcoll-xref
+    ];
+    postgres = [
+      gnatcoll-sql
+      postgresql
+    ];
+    sqlite = [
+      gnatcoll-sql
+      sqlite
+    ];
+    xref = [
+      gnatcoll-iconv
+      gnatcoll-sqlite
+    ];
+  };
+
+  # These components are just tools and don't install a library
+  onlyExecutable = builtins.elem component [
+    "gnatcoll_db2ada"
+    "gnatinspect"
+  ];
+in
+
+stdenv.mkDerivation rec {
+  # executables don't adhere to the string gnatcoll-* scheme
+  pname =
+    if onlyExecutable
+    then builtins.replaceStrings [ "_" ] [ "-" ] component
+    else "gnatcoll-${component}";
+  version = "24.0.0";
+
+  src = fetchFromGitHub {
+    owner = "AdaCore";
+    repo = "gnatcoll-db";
+    rev = "v${version}";
+    sha256 = "0jq76s4s7q2x93jh8la6r0i3jkpvgsfj12vbbaqabh410xccyr3p";
+  };
+
+  # Link executables dynamically unless specified by the platform,
+  # as we usually do in nixpkgs where possible
+  postPatch = lib.optionalString (!stdenv.hostPlatform.isStatic) ''
+    for f in gnatcoll_db2ada/Makefile gnatinspect/Makefile; do
+      substituteInPlace "$f" --replace "=static" "=relocatable"
+    done
+  '';
+
+  nativeBuildInputs = [
+    gnat
+    gprbuild
+    which
+  ];
+
+  # Propagate since GPRbuild needs to find referenced .gpr files
+  # and other libraries to link against when static linking is used.
+  # For executables this is of course not relevant and we can reduce
+  # the closure size dramatically
+  ${if onlyExecutable then "buildInputs" else "propagatedBuildInputs"} = [
+    gnatcoll-core
+  ] ++ libsFor."${component}" or [];
+
+  makeFlags = [
+    "-C" component
+    "PROCESSORS=$(NIX_BUILD_CORES)"
+    # confusingly, for gprbuild --target is autoconf --host
+    "TARGET=${stdenv.hostPlatform.config}"
+    "prefix=${placeholder "out"}"
+  ] ++ lib.optionals (component == "sqlite") [
+    # link against packaged, not vendored libsqlite3
+    "GNATCOLL_SQLITE=external"
+  ];
+
+  meta = with lib; {
+    description = "GNAT Components Collection - Database packages";
+    homepage = "https://github.com/AdaCore/gnatcoll-db";
+    license = licenses.gpl3Plus;
+    maintainers = [ maintainers.sternenseemann ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ada/spark2014/default.nix b/nixpkgs/pkgs/development/libraries/ada/spark2014/default.nix
new file mode 100644
index 000000000000..a52a5ac63f71
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ada/spark2014/default.nix
@@ -0,0 +1,67 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, gnat12
+, gnatcoll-core
+, gprbuild
+, python3
+, ocamlPackages
+, makeWrapper
+}:
+
+stdenv.mkDerivation rec {
+  pname = "spark2014";
+  version = "unstable-2022-05-25";
+
+  src = fetchFromGitHub {
+    owner = "AdaCore";
+    repo = "spark2014";
+    # commit on fsf-12 branch
+    rev = "ab34e07080a769b63beacc141707b5885c49d375";
+    sha256 = "sha256-7pe3eWitpxmqzjW6qEIEuN0qr2IR+kJ7Ssc9pTBcCD8=";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [
+    gnat12
+    gprbuild
+    python3
+    ocamlPackages.ocaml
+    makeWrapper
+  ];
+
+  buildInputs = [
+    gnatcoll-core
+    ocamlPackages.camlzip
+    ocamlPackages.findlib
+    ocamlPackages.menhir
+    ocamlPackages.menhirLib
+    ocamlPackages.num
+    ocamlPackages.yojson
+    ocamlPackages.zarith
+  ];
+
+  postPatch = ''
+    # gnat2why/gnat_src points to the GNAT sources
+    tar xf ${gnat12.cc.src} gcc-${gnat12.cc.version}/gcc/ada
+    mv gcc-${gnat12.cc.version}/gcc/ada gnat2why/gnat_src
+  '';
+
+  configurePhase = ''
+    make setup
+  '';
+
+  installPhase = ''
+    make install-all
+    cp -a ./install/. $out
+  '';
+
+  meta = with lib; {
+    description = "a software development technology specifically designed for engineering high-reliability applications";
+    homepage = "https://github.com/AdaCore/spark2014";
+    maintainers = [ maintainers.jiegec ];
+    license = licenses.gpl3;
+    platforms = platforms.all;
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/ada/xmlada/default.nix b/nixpkgs/pkgs/development/libraries/ada/xmlada/default.nix
new file mode 100644
index 000000000000..77e8094277a7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ada/xmlada/default.nix
@@ -0,0 +1,35 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, gnat
+# use gprbuild-boot since gprbuild proper depends
+# on this xmlada derivation.
+, gprbuild-boot
+}:
+
+stdenv.mkDerivation rec {
+  pname = "xmlada";
+  version = "24.0.0";
+
+  src = fetchFromGitHub {
+    name = "xmlada-${version}-src";
+    owner = "AdaCore";
+    repo = "xmlada";
+    rev = "v${version}";
+    sha256 = "sha256-vvM7bdf3dAa3zKgxbGeAGlBT6fvafzmleimJHyRdlvc=";
+  };
+
+  nativeBuildInputs = [
+    gnat
+    gprbuild-boot
+  ];
+
+  meta = with lib; {
+    description = "XML/Ada: An XML parser for Ada";
+    homepage = "https://github.com/AdaCore/xmlada";
+    maintainers = [ maintainers.sternenseemann ];
+    license = licenses.gpl3Plus;
+    platforms = platforms.all;
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/adns/default.nix b/nixpkgs/pkgs/development/libraries/adns/default.nix
new file mode 100644
index 000000000000..50483758beb5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/adns/default.nix
@@ -0,0 +1,52 @@
+{ stdenv, lib, fetchurl, gnum4 }:
+
+stdenv.mkDerivation rec {
+  pname = "adns";
+  version = "1.6.0";
+
+  src = fetchurl {
+    urls = [
+      "https://www.chiark.greenend.org.uk/~ian/adns/ftp/adns-${version}.tar.gz"
+      "ftp://ftp.chiark.greenend.org.uk/users/ian/adns/adns-${version}.tar.gz"
+      "mirror://gnu/adns/adns-${version}.tar.gz"
+    ];
+    sha256 = "1pi0xl07pav4zm2jrbrfpv43s1r1q1y12awgak8k7q41m5jp4hpv";
+  };
+
+  nativeBuildInputs = [ gnum4 ];
+
+  configureFlags = lib.optional stdenv.hostPlatform.isStatic "--disable-dynamic";
+
+  preConfigure =
+    lib.optionalString stdenv.isDarwin "sed -i -e 's|-Wl,-soname=$(SHLIBSONAME)||' configure";
+
+  # Autogenerated headers miss interdependencies in Makefile, fail parallel build:
+  #  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=51329
+  enableParallelBuilding = false;
+
+  # https://www.mail-archive.com/nix-dev@cs.uu.nl/msg01347.html for details.
+  doCheck = false;
+
+  postInstall = let suffix = lib.versions.majorMinor version;
+  in lib.optionalString stdenv.isDarwin ''
+    install_name_tool -id $out/lib/libadns.so.${suffix} $out/lib/libadns.so.${suffix}
+  '';
+
+  # darwin executables fail, but I don't want to fail the 100-500 packages depending on this lib
+  doInstallCheck = !stdenv.isDarwin;
+  installCheckPhase = ''
+    set -eo pipefail
+
+    for prog in $out/bin/*; do
+      $prog --help > /dev/null && echo $(basename $prog) shows usage
+    done
+  '';
+
+  meta = with lib; {
+    homepage = "http://www.chiark.greenend.org.uk/~ian/adns/";
+    description = "Asynchronous DNS Resolver Library";
+    license = licenses.lgpl2;
+
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/adslib/default.nix b/nixpkgs/pkgs/development/libraries/adslib/default.nix
new file mode 100644
index 000000000000..49b54960b7e6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/adslib/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "adslib";
+  version = "unstable-2020-08-28";
+
+  src = fetchFromGitHub {
+    owner = "stlehmann";
+    repo = "ADS";
+    rev = "c457b60d61d73325837ca50be2cc997c4792d481";
+    sha256 = "11r86xa8fr4z957hd0abn8x7182nz30a198d02y7gzpbhpi3z43k";
+  };
+
+  installPhase = ''
+    mkdir -p $out/lib
+    cp adslib.so $out/lib/adslib.so
+  '';
+
+  meta = with lib; {
+    description = "Beckhoff protocol to communicate with TwinCAT devices";
+    homepage = "https://github.com/stlehmann/ADS";
+    license = licenses.mit;
+    maintainers = with maintainers; [ jamiemagee ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aemu/default.nix b/nixpkgs/pkgs/development/libraries/aemu/default.nix
new file mode 100644
index 000000000000..e2ea8e5b1cd5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aemu/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitiles, cmake, darwin }:
+
+stdenv.mkDerivation {
+  pname = "aemu";
+  version = "0.1.2";
+
+  src = fetchFromGitiles {
+    url = "https://android.googlesource.com/platform/hardware/google/aemu";
+    rev = "07ccc3ded3357e67e39104f18f35feaf8b3b6a0e";
+    hash = "sha256-H3IU9aTFSzUAqYgrtHd4F18hbhZsbOJGC4K5JwMQOOw=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = lib.optionals stdenv.isDarwin [
+    darwin.apple_sdk.frameworks.Cocoa
+  ];
+
+  cmakeFlags = [
+    "-DAEMU_COMMON_GEN_PKGCONFIG=ON"
+    "-DAEMU_COMMON_BUILD_CONFIG=gfxstream"
+    # "-DENABLE_VKCEREAL_TESTS=OFF"
+  ];
+
+  meta = with lib; {
+    homepage = "https://android.googlesource.com/platform/hardware/google/aemu";
+    description = "Android emulation utilities library";
+    maintainers = with maintainers; [ qyliss ];
+    # The BSD license comes from host-common/VpxFrameParser.cpp, which
+    # incorporates some code from libvpx, which uses the 3-clause BSD license.
+    license = with licenses; [ asl20 mit bsd3 ];
+    # See base/include/aemu/base/synchronization/Lock.h
+    platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/afflib/default.nix b/nixpkgs/pkgs/development/libraries/afflib/default.nix
new file mode 100644
index 000000000000..e82c3c8dfe77
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/afflib/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchFromGitHub, zlib, curl, expat, fuse, openssl
+, autoreconfHook, python3, libiconv
+}:
+
+stdenv.mkDerivation rec {
+  version = "3.7.20";
+  pname = "afflib";
+
+  src = fetchFromGitHub {
+    owner = "sshock";
+    repo = "AFFLIBv3";
+    rev = "v${version}";
+    sha256 = "sha256-xkqBfTftzn+rgeuoaKfHP7vQmy4VZuaCq8VFlfZTUE4=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ zlib curl expat openssl python3 ]
+    ++ lib.optionals (with stdenv; isLinux || isDarwin) [ fuse ]
+    ++ lib.optionals stdenv.isDarwin [ libiconv ];
+
+  meta = {
+    homepage = "http://afflib.sourceforge.net/";
+    description = "Advanced forensic format library";
+    platforms = lib.platforms.unix;
+    license = lib.licenses.bsdOriginal;
+    maintainers = [ lib.maintainers.raskin ];
+    downloadPage = "https://github.com/sshock/AFFLIBv3/tags";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aften/default.nix b/nixpkgs/pkgs/development/libraries/aften/default.nix
new file mode 100644
index 000000000000..97b2230f0311
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aften/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "aften";
+  version = "0.0.8";
+  src = fetchurl {
+    url = "mirror://sourceforge/aften/${pname}-${version}.tar.bz2";
+    sha256 = "02hc5x9vkgng1v9bzvza9985ifrjd7fjr7nlpvazp4mv6dr89k47";
+  };
+
+  patches = [
+    # Add fallback for missing SIMD functions on ARM
+    # Source https://github.com/Homebrew/homebrew-core/blob/cad412c7fb4b64925f821fcc9ac5f16a2c40f32d/Formula/aften.rb
+    ./simd-fallback.patch
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [ "-DSHARED=ON" ];
+
+  meta = with lib; {
+    description = "An audio encoder which generates compressed audio streams based on ATSC A/52 specification";
+    homepage = "https://aften.sourceforge.net/";
+    license = licenses.lgpl21Only;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ emilytrau ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aften/simd-fallback.patch b/nixpkgs/pkgs/development/libraries/aften/simd-fallback.patch
new file mode 100644
index 000000000000..cdc961a7f5df
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aften/simd-fallback.patch
@@ -0,0 +1,25 @@
+From dca9c03930d669233258c114e914a01f7c0aeb05 Mon Sep 17 00:00:00 2001
+From: jbr79 <jbr79@ef0d8562-5c19-0410-972e-841db63a069c>
+Date: Wed, 24 Sep 2008 22:02:59 +0000
+Subject: [PATCH] add fallback function for apply_simd_restrictions() on
+ non-x86/ppc
+
+git-svn-id: https://aften.svn.sourceforge.net/svnroot/aften@766 ef0d8562-5c19-0410-972e-841db63a069c
+---
+ libaften/cpu_caps.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libaften/cpu_caps.h b/libaften/cpu_caps.h
+index b7c6159..4db11f7 100644
+--- a/libaften/cpu_caps.h
++++ b/libaften/cpu_caps.h
+@@ -26,6 +26,7 @@
+ #include "ppc_cpu_caps.h"
+ #else
+ static inline void cpu_caps_detect(void){}
++static inline void apply_simd_restrictions(AftenSimdInstructions *simd_instructions){}
+ #endif
+
+ #endif /* CPU_CAPS_H */
+--
+2.24.3 (Apple Git-128)
\ No newline at end of file
diff --git a/nixpkgs/pkgs/development/libraries/agda/1lab/default.nix b/nixpkgs/pkgs/development/libraries/agda/1lab/default.nix
new file mode 100644
index 000000000000..89b0fb60c365
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/agda/1lab/default.nix
@@ -0,0 +1,35 @@
+{ lib, mkDerivation, fetchFromGitHub }:
+
+mkDerivation rec {
+  pname = "1lab";
+  version = "unstable-2023-12-04";
+
+  src = fetchFromGitHub {
+    owner = "plt-amy";
+    repo = pname;
+    rev = "47c2a96220b4d14419e5ddb973bc1fa06933e723";
+    hash = "sha256-0U6s6sXdynk2IWRBDXBJCf7Gc+gE8AhR1PXZl0DS4yU=";
+  };
+
+  postPatch = ''
+    # We don't need anything in support; avoid installing LICENSE.agda
+    rm -rf support
+
+    # Remove verbosity options as they make Agda take longer and use more memory.
+    shopt -s globstar extglob
+    sed -Ei '/OPTIONS/s/ -v ?[^ #]+//g' src/**/*.@(agda|lagda.md)
+  '';
+
+  libraryName = "1lab";
+  libraryFile = "1lab.agda-lib";
+  everythingFile = "src/index.lagda.md";
+
+  meta = with lib; {
+    description =
+      "A formalised, cross-linked reference resource for mathematics done in Homotopy Type Theory ";
+    homepage = src.meta.homepage;
+    license = licenses.agpl3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ ncfavier ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/agda/agda-categories/default.nix b/nixpkgs/pkgs/development/libraries/agda/agda-categories/default.nix
new file mode 100644
index 000000000000..11c129badd64
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/agda/agda-categories/default.nix
@@ -0,0 +1,42 @@
+{ lib, mkDerivation, fetchFromGitHub, standard-library }:
+
+mkDerivation rec {
+  version = "0.2.0";
+  pname = "agda-categories";
+
+  src = fetchFromGitHub {
+    owner = "agda";
+    repo = "agda-categories";
+    rev = "v${version}";
+    sha256 = "sha256-GQuQxzYSQxAIVSJ1vf0blRC0juoxAqD1AHW66H/6NSk=";
+  };
+
+  postPatch = ''
+    # Remove this once agda-categories incorporates this fix or once Agda's
+    # versioning system gets an overhaul in general. Right now there is no middle
+    # ground between "no version constraint" and "exact match down to patch". We
+    # do not want to need to change this postPatch directive on each minor
+    # version update of the stdlib, so we get rid of the version constraint
+    # altogether.
+    sed -Ei 's/standard-library-[0-9.]+/standard-library/' agda-categories.agda-lib
+
+    # The Makefile of agda-categories uses git(1) instead of find(1) to
+    # determine the list of source files. We cannot use git, as $PWD will not
+    # be a valid Git working directory.
+    find src -name '*.agda' | sed -e 's|^src/[/]*|import |' -e 's|/|.|g' -e 's/.agda//' -e '/import Everything/d' | LC_COLLATE='C' sort > Everything.agda
+  '';
+
+  # agda: Heap exhausted;
+  # agda: Current maximum heap size is 4294967296 bytes (4096 MB).
+  GHCRTS = "-M5G";
+
+  buildInputs = [ standard-library ];
+
+  meta = with lib; {
+    inherit (src.meta) homepage;
+    description = "A new Categories library";
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ alexarice turion ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/agda/agda-prelude/default.nix b/nixpkgs/pkgs/development/libraries/agda/agda-prelude/default.nix
new file mode 100644
index 000000000000..fcc100e7a7bb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/agda/agda-prelude/default.nix
@@ -0,0 +1,28 @@
+{ lib, mkDerivation, fetchFromGitHub }:
+
+mkDerivation rec {
+  version = "unstable-2023-10-04";
+  pname = "agda-prelude";
+
+  src = fetchFromGitHub {
+    owner = "UlfNorell";
+    repo = "agda-prelude";
+    rev = "ff3b13253612caf0784a06e2d7d0f30be16c32e4";
+    hash = "sha256-A05uDv3fJqKncea9AL6eQa0XAskLZwAIUl1OAOVeP8I=";
+  };
+
+  preConfigure = ''
+    cd test
+    make everything
+    mv Everything.agda ..
+    cd ..
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/UlfNorell/agda-prelude";
+    description = "Programming library for Agda";
+    license = lib.licenses.mit;
+    platforms = lib.platforms.unix;
+    maintainers = with maintainers; [ mudri alexarice turion ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/agda/agdarsec/default.nix b/nixpkgs/pkgs/development/libraries/agda/agdarsec/default.nix
new file mode 100644
index 000000000000..34730ae17f4e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/agda/agdarsec/default.nix
@@ -0,0 +1,29 @@
+{ lib, mkDerivation, fetchFromGitHub
+, standard-library }:
+
+mkDerivation rec {
+  pname = "agdarsec";
+  version = "0.4.1";
+
+  src = fetchFromGitHub {
+    owner = "gallais";
+    repo = "agdarsec";
+    rev = "v${version}";
+    sha256 = "02fqkycvicw6m2xsz8p01aq8n3gj2d2gyx8sgj15l46f8434fy0x";
+  };
+
+  everythingFile = "./index.agda";
+
+  includePaths = [ "src" "examples" ];
+
+  buildInputs = [ standard-library ];
+
+  meta = with lib; {
+    homepage = "https://gallais.github.io/agdarsec/";
+    description = "Total Parser Combinators in Agda";
+    license = licenses.gpl3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ turion ];
+    broken = true;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/agda/cubical/default.nix b/nixpkgs/pkgs/development/libraries/agda/cubical/default.nix
new file mode 100644
index 000000000000..3747535bec9d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/agda/cubical/default.nix
@@ -0,0 +1,31 @@
+{ lib, mkDerivation, fetchFromGitHub, ghc }:
+
+mkDerivation rec {
+  pname = "cubical";
+  version = "0.7";
+
+  src = fetchFromGitHub {
+    repo = pname;
+    owner = "agda";
+    rev = "v${version}";
+    hash = "sha256-oLpKRWfQqb6CIscC2XM0ia9HJ8edJFHoPeql3kfvyrA=";
+  };
+
+  # The cubical library has several `Everything.agda` files, which are
+  # compiled through the make file they provide.
+  nativeBuildInputs = [ ghc ];
+  buildPhase = ''
+    runHook preBuild
+    make
+    runHook postBuild
+  '';
+
+  meta = with lib; {
+    description =
+      "A cubical type theory library for use with the Agda compiler";
+    homepage = src.meta.homepage;
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ alexarice ryanorendorff ncfavier phijor ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/agda/functional-linear-algebra/default.nix b/nixpkgs/pkgs/development/libraries/agda/functional-linear-algebra/default.nix
new file mode 100644
index 000000000000..c91896993ce5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/agda/functional-linear-algebra/default.nix
@@ -0,0 +1,30 @@
+{ fetchFromGitHub, lib, mkDerivation, standard-library }:
+
+mkDerivation rec {
+  version = "0.5.0";
+  pname = "functional-linear-algebra";
+
+  buildInputs = [ standard-library ];
+
+  src = fetchFromGitHub {
+    repo = "functional-linear-algebra";
+    owner = "ryanorendorff";
+    rev = "v${version}";
+    sha256 = "sha256-3nme/eH4pY6bD0DkhL4Dj/Vp/WnZqkQtZTNk+n1oAyY=";
+  };
+
+  preConfigure = ''
+    sh generate-everything.sh
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/ryanorendorff/functional-linear-algebra";
+    description = ''
+      Formalizing linear algebra in Agda by representing matrices as functions
+      from one vector space to another.
+    '';
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ ryanorendorff ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/agda/generic/default.nix b/nixpkgs/pkgs/development/libraries/agda/generic/default.nix
new file mode 100644
index 000000000000..855dd0f33c51
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/agda/generic/default.nix
@@ -0,0 +1,33 @@
+{ lib, mkDerivation, fetchFromGitHub, standard-library }:
+
+mkDerivation rec {
+  pname = "generic";
+  version = "0.1.0.2";
+
+  src = fetchFromGitHub {
+    owner = "effectfully";
+    repo = "Generic";
+    rev = "v${version}";
+    sha256 = "05igsd2gaj6h9bkqwp8llhvn4qvc5gmi03x4fnz096ba8m6x8s3n";
+  };
+
+  buildInputs = [
+    standard-library
+  ];
+
+  preBuild = ''
+    echo "module Everything where" > Everything.agda
+    find src -name '*.agda' | sed -e 's/src\///;s/\//./g;s/\.agda$//;s/^/import /' >> Everything.agda
+  '';
+
+  meta = with lib; {
+    # Remove if a version compatible with agda 2.6.2 is made
+    broken = true;
+    description =
+      "A library for doing generic programming in Agda";
+    homepage = src.meta.homepage;
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ alexarice turion ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/agda/iowa-stdlib/default.nix b/nixpkgs/pkgs/development/libraries/agda/iowa-stdlib/default.nix
new file mode 100644
index 000000000000..1383cff9e55a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/agda/iowa-stdlib/default.nix
@@ -0,0 +1,31 @@
+{ lib, mkDerivation, fetchFromGitHub }:
+
+mkDerivation (rec {
+  version = "1.5.0";
+  pname = "iowa-stdlib";
+
+  src = fetchFromGitHub {
+    owner = "cedille";
+    repo  = "ial";
+    rev = "v${version}";
+    sha256 = "0dlis6v6nzbscf713cmwlx8h9n2gxghci8y21qak3hp18gkxdp0g";
+  };
+
+  libraryFile = "";
+  libraryName = "IAL-1.3";
+
+  buildPhase = ''
+    patchShebangs find-deps.sh
+    make
+  '';
+
+  meta = {
+    homepage = "https://github.com/cedille/ial";
+    description = "Agda standard library developed at Iowa";
+    license = lib.licenses.free;
+    platforms = lib.platforms.unix;
+    # broken since Agda 2.6.1
+    broken = true;
+    maintainers = with lib.maintainers; [ alexarice turion ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/agda/standard-library/default.nix b/nixpkgs/pkgs/development/libraries/agda/standard-library/default.nix
new file mode 100644
index 000000000000..d7b49893b96f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/agda/standard-library/default.nix
@@ -0,0 +1,30 @@
+{ lib, mkDerivation, fetchFromGitHub, ghcWithPackages, nixosTests }:
+
+mkDerivation rec {
+  pname = "standard-library";
+  version = "2.0";
+
+  src = fetchFromGitHub {
+    repo = "agda-stdlib";
+    owner = "agda";
+    rev = "v${version}";
+    hash = "sha256-TjGvY3eqpF+DDwatT7A78flyPcTkcLHQ1xcg+MKgCoE=";
+  };
+
+  nativeBuildInputs = [ (ghcWithPackages (self : [ self.filemanip ])) ];
+  preConfigure = ''
+    runhaskell GenerateEverything.hs --include-deprecated
+    # We will only build/consider Everything.agda, in particular we don't want Everything*.agda
+    # do be copied to the store.
+    rm EverythingSafe.agda
+  '';
+
+  passthru.tests = { inherit (nixosTests) agda; };
+  meta = with lib; {
+    homepage = "https://wiki.portal.chalmers.se/agda/pmwiki.php?n=Libraries.StandardLibrary";
+    description = "A standard library for use with the Agda compiler";
+    license = lib.licenses.mit;
+    platforms = lib.platforms.unix;
+    maintainers = with maintainers; [ jwiegley mudri alexarice turion ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/agg/default.nix b/nixpkgs/pkgs/development/libraries/agg/default.nix
new file mode 100644
index 000000000000..bfa7449b04c6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/agg/default.nix
@@ -0,0 +1,64 @@
+{ lib, stdenv, fetchurl, autoconf, automake, libtool, pkg-config
+, freetype, SDL, libX11 }:
+
+stdenv.mkDerivation rec {
+  pname = "agg";
+  version = "2.5";
+  src = fetchurl {
+    url = "https://www.antigrain.com/${pname}-${version}.tar.gz";
+    sha256 = "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb";
+  };
+  nativeBuildInputs = [
+    pkg-config
+    autoconf
+    automake
+    libtool
+  ];
+  buildInputs = [
+    freetype
+    SDL
+  ] ++ lib.optionals stdenv.isLinux [
+    libX11
+  ];
+
+  postPatch = ''
+    substituteInPlace include/agg_renderer_outline_aa.h \
+      --replace 'line_profile_aa& profile() {' 'const line_profile_aa& profile() {'
+  '';
+
+  # fix build with new automake, from Gentoo ebuild
+  preConfigure = ''
+    sed -i '/^AM_C_PROTOTYPES/d' configure.in
+    sh autogen.sh
+  '';
+
+  configureFlags = [
+    (lib.strings.enableFeature stdenv.isLinux "platform")
+    "--enable-examples=no"
+  ] ++ lib.optionals stdenv.isLinux [
+    "--x-includes=${lib.getDev libX11}/include"
+    "--x-libraries=${lib.getLib libX11}/lib"
+  ];
+
+  # libtool --tag=CXX --mode=link g++ -g -O2 libexamples.la ../src/platform/X11/libaggplatformX11.la ../src/libagg.la -o alpha_mask2 alpha_mask2.o
+  # libtool: error: cannot find the library 'libexamples.la'
+  enableParallelBuilding = false;
+
+  meta = {
+    description = "High quality rendering engine for C++";
+
+    longDescription = ''
+      Anti-Grain Geometry (AGG) is an Open Source, free of charge
+      graphic library, written in industrially standard C++.  The
+      terms and conditions of use AGG are described on The License
+      page.  AGG doesn't depend on any graphic API or technology.
+      Basically, you can think of AGG as of a rendering engine that
+      produces pixel images in memory from some vectorial data.  But
+      of course, AGG can do much more than that.
+    '';
+
+    license = lib.licenses.gpl2Plus;
+    homepage = "http://www.antigrain.com/";
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aixlog/default.nix b/nixpkgs/pkgs/development/libraries/aixlog/default.nix
new file mode 100644
index 000000000000..282b62702c75
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aixlog/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, stdenvNoCC
+, fetchFromGitHub
+}:
+
+stdenvNoCC.mkDerivation rec {
+  pname = "aixlog";
+  version = "1.5.0";
+
+  src = fetchFromGitHub {
+    owner = "badaix";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-Xhle7SODRZlHT3798mYIzBi1Mqjz8ai74/UnbVWetiY=";
+  };
+
+  dontConfigure = true;
+  dontBuild = true;
+  dontFixup = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dm644 $src/include/aixlog.hpp $out/include/aixlog.hpp
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Header-only C++ logging library";
+    homepage = "https://github.com/badaix/aixlog";
+    changelog = "https://github.com/badaix/aixlog/releases/tag/${src.rev}";
+    license = licenses.mit;
+    maintainers = with maintainers; [ azahi ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/alembic/default.nix b/nixpkgs/pkgs/development/libraries/alembic/default.nix
new file mode 100644
index 000000000000..6f73c47f49d1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/alembic/default.nix
@@ -0,0 +1,62 @@
+{ lib, stdenv, fetchFromGitHub, cmake, openexr, hdf5-threadsafe }:
+
+stdenv.mkDerivation rec
+{
+  pname = "alembic";
+  version = "1.8.6";
+
+  src = fetchFromGitHub {
+    owner = "alembic";
+    repo = "alembic";
+    rev = version;
+    sha256 = "sha256-MND1GtnIGUtRrtyUX1eR9UoGGtuTPtVEIIET3QQ6blA=";
+  };
+
+  # note: out is unused (but required for outputDoc anyway)
+  outputs = [ "bin" "dev" "out" "lib" ];
+
+  # Prevent cycle between bin and dev (only occurs on Darwin for some reason)
+  propagatedBuildOutputs = [ "lib" ];
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ openexr hdf5-threadsafe ];
+
+  # These flags along with the postPatch step ensure that all artifacts end up
+  # in the correct output without needing to move anything
+  #
+  # - bin: Uses CMAKE_INSTALL_BINDIR (set via CMake setup hooK)
+  # - lib (contains shared libraries): Uses ALEMBIC_LIB_INSTALL_DIR
+  # - dev (headers): Uses CMAKE_INSTALL_PREFIX
+  #   (this works because every other install rule uses an absolute DESTINATION)
+  # - dev (CMake files): Uses ConfigPackageLocation
+
+  cmakeFlags = [
+    "-DUSE_HDF5=ON"
+    "-DUSE_TESTS=ON"
+    "-DALEMBIC_LIB_INSTALL_DIR=${placeholder "lib"}/lib"
+    "-DConfigPackageLocation=${placeholder "dev"}/lib/cmake/Alembic"
+    "-DCMAKE_INSTALL_PREFIX=${placeholder "dev"}"
+    "-DQUIET=ON"
+  ];
+
+  postPatch = ''
+    find bin/ -type f -name CMakeLists.txt -print -exec \
+      sed -i 's/INSTALL(TARGETS \([a-zA-Z ]*\) DESTINATION bin)/INSTALL(TARGETS \1)/' {} \;
+  '';
+
+  doCheck = true;
+  checkPhase = ''
+    runHook preCheck
+    ctest -j 1
+    runHook postCheck
+  '';
+
+  meta = with lib; {
+    description = "An open framework for storing and sharing scene data";
+    homepage = "http://alembic.io/";
+    license = licenses.bsd3;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ guibou tmarkus ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/alglib/default.nix b/nixpkgs/pkgs/development/libraries/alglib/default.nix
new file mode 100644
index 000000000000..1ff34a8d1f16
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/alglib/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchurl, cmake, clang }:
+
+stdenv.mkDerivation rec {
+  pname = "alglib3";
+  version = "3.18.0";
+
+  src = fetchurl {
+    url = "https://www.alglib.net/translator/re/alglib-${version}.cpp.gpl.tgz";
+    sha256 = "0ag8dvcxzzp9riqvk4lhcbwhvh0lq54lbdnsbyr107rjfi2p1vlq";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    clang
+  ];
+
+  patches = [
+    ./patch-alglib-CMakeLists.patch
+  ];
+
+  meta = with lib; {
+    description = "Numerical analysis and data processing library";
+    homepage = "https://www.alglib.net/";
+    license = lib.licenses.gpl2Plus;
+    maintainers = [ maintainers.paperdigits ];
+    longDescription = ''
+      ALGLIB is a cross-platform numerical analysis and data processing library. It supports several programming languages (C++, C#, Delphi) and several operating systems (Windows and POSIX, including Linux). ALGLIB features include:
+
+      * Data analysis (classification/regression, statistics)
+      * Optimization and nonlinear solvers
+      * Interpolation and linear/nonlinear least-squares fitting
+      * Linear algebra (direct algorithms, EVD/SVD), direct and iterative linear solvers
+      * Fast Fourier Transform and many other algorithms
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/alglib/patch-alglib-CMakeLists.patch b/nixpkgs/pkgs/development/libraries/alglib/patch-alglib-CMakeLists.patch
new file mode 100644
index 000000000000..b91a0c0aefd6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/alglib/patch-alglib-CMakeLists.patch
@@ -0,0 +1,23 @@
+--- /dev/null
++++ b/CMakeLists.txt
+@@ -0,0 +1,20 @@
++cmake_minimum_required(VERSION 2.8)
++
++project(alglib3 CXX)
++
++file(GLOB_RECURSE sources src/*.cpp)
++file(GLOB_RECURSE headers src/*.h)
++
++add_library(${PROJECT_NAME} STATIC ${sources} ${headers})
++
++install(
++  TARGETS ${PROJECT_NAME}
++  RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
++  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++  ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++)
++
++install(
++  FILES ${headers}
++  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alglib
++)
diff --git a/nixpkgs/pkgs/development/libraries/alkimia/default.nix b/nixpkgs/pkgs/development/libraries/alkimia/default.nix
new file mode 100644
index 000000000000..b6fb92ae62dd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/alkimia/default.nix
@@ -0,0 +1,35 @@
+{ mkDerivation, fetchurl, lib
+, extra-cmake-modules, doxygen, graphviz, qtbase, qtwebengine, mpir
+, kdelibs4support, plasma-framework, knewstuff, kpackage
+}:
+
+mkDerivation rec {
+  pname = "alkimia";
+  version = "8.1.2";
+
+  src = fetchurl {
+    url = "mirror://kde/stable/alkimia/${version}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-z4Ru6HucxjD1jgvdIzNCloELo7zBdR/i9HIhYYl+4zo=";
+  };
+
+  nativeBuildInputs = [ extra-cmake-modules doxygen graphviz ];
+
+  # qtwebengine is not a mandatory dependency, but it adds some features
+  # we might need for alkimia's dependents. See:
+  # https://github.com/KDE/alkimia/blob/v8.1.2/CMakeLists.txt#L124
+  buildInputs = [ qtbase qtwebengine kdelibs4support plasma-framework knewstuff kpackage ];
+  propagatedBuildInputs = [ mpir ];
+
+  meta = {
+    description = "Library used by KDE finance applications";
+    longDescription = ''
+      Alkimia is the infrastructure for common storage and business
+      logic that will be used by all financial applications in KDE.
+
+      The target is to share financial related information over
+      application boundaries.
+    '';
+    license = lib.licenses.lgpl21Plus;
+    platforms = qtbase.meta.platforms;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/allegro/5.nix b/nixpkgs/pkgs/development/libraries/allegro/5.nix
new file mode 100644
index 000000000000..eaf227fa60d1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/allegro/5.nix
@@ -0,0 +1,108 @@
+{ lib
+, alsa-lib
+, cmake
+, enet
+, fetchFromGitHub
+, fetchpatch
+, flac
+, freetype
+, gtk3
+, libGL
+, libGLU
+, libjpeg
+, libopus
+, libpng
+, libpthreadstubs
+, libpulseaudio
+, libtheora
+, libvorbis
+, libwebp
+, libX11
+, libXcursor
+, libXdmcp
+, libXext
+, libXfixes
+, libXi
+, libXpm
+, libXt
+, libXxf86dga
+, libXxf86misc
+, libXxf86vm
+, openal
+, pcre
+, physfs
+, pkg-config
+, stdenv
+, texinfo
+, xorgproto
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "allegro";
+  version = "5.2.9.1";
+
+  src = fetchFromGitHub {
+    owner = "liballeg";
+    repo = "allegro5";
+    rev = version;
+    sha256 = "sha256-n2OCmZmAqeXjtnCTqJgQ5q4j8/lnPfH+5tpWKIFKle0=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    enet
+    flac
+    freetype
+    gtk3
+    libGL
+    libGLU
+    libjpeg
+    libopus
+    libpng
+    libtheora
+    libvorbis
+    libwebp
+    openal
+    pcre
+    physfs
+    texinfo
+    zlib
+  ] ++ lib.optionals stdenv.isLinux [
+    alsa-lib
+    libpthreadstubs
+    libpulseaudio
+    libX11
+    libXcursor
+    libXdmcp
+    libXext
+    libXfixes
+    libXi
+    libXpm
+    libXt
+    libXxf86dga
+    libXxf86misc
+    libXxf86vm
+    xorgproto
+  ];
+
+  postPatch = ''
+    sed -e 's@/XInput2.h@/XI2.h@g' -i CMakeLists.txt "src/"*.c
+    sed -e 's@Kernel/IOKit/hidsystem/IOHIDUsageTables.h@IOKit/hid/IOHIDUsageTables.h@g' -i include/allegro5/platform/alosx.h
+    sed -e 's@OpenAL/@AL/@g' -i addons/audio/openal.c
+  '';
+
+  cmakeFlags = [ "-DCMAKE_SKIP_RPATH=ON" ];
+
+  meta = with lib; {
+    description = "A game programming library";
+    homepage = "https://liballeg.org/";
+    license = licenses.zlib;
+    maintainers = [ maintainers.raskin ];
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/allegro/default.nix b/nixpkgs/pkgs/development/libraries/allegro/default.nix
new file mode 100644
index 000000000000..d9c862443653
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/allegro/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchurl, texinfo6_5, libXext, xorgproto, libX11
+, libXpm, libXt, libXcursor, alsa-lib, cmake, zlib, libpng, libvorbis
+, libXxf86dga, libXxf86misc
+, libXxf86vm, openal, libGLU, libGL }:
+
+stdenv.mkDerivation rec {
+  pname = "allegro";
+  version="4.4.3.1";
+
+  src = fetchurl {
+    url = "https://github.com/liballeg/allegro5/releases/download/${version}/${pname}-${version}.tar.gz";
+    sha256 = "1m6lz35nk07dli26kkwz3wa50jsrxs1kb6w1nj14a911l34xn6gc";
+  };
+
+  patches = [
+    ./nix-unstable-sandbox-fix.patch
+    ./encoding.patch
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [
+    texinfo6_5 libXext xorgproto libX11 libXpm libXt libXcursor
+    alsa-lib zlib libpng libvorbis libXxf86dga libXxf86misc
+    libXxf86vm openal libGLU libGL
+  ];
+
+  hardeningDisable = [ "format" ];
+
+  cmakeFlags = [ "-DCMAKE_SKIP_RPATH=ON" ];
+
+  meta = with lib; {
+    description = "A game programming library";
+    homepage = "https://liballeg.org/";
+    license = licenses.free; # giftware
+    maintainers = [ maintainers.raskin ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/allegro/encoding.patch b/nixpkgs/pkgs/development/libraries/allegro/encoding.patch
new file mode 100644
index 000000000000..1dca94752801
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/allegro/encoding.patch
@@ -0,0 +1,10 @@
+--- allegro-4.4.3/docs/src/allegro._tx.orig     2019-02-02 20:28:46.000000000 +0100
++++ allegro-4.4.3/docs/src/allegro._tx  2019-11-04 11:12:39.352699777 +0100
+@@ -23,6 +23,7 @@
+ @man_shortdesc_force1=allegro
+ @man_shortdesc_force2=Allegro game programming library.
+ @$\input texinfo
++@$@documentencoding ISO-8859-1
+ @$@setfilename allegro.inf
+ @$@settitle Allegro Manual
+ @$@setchapternewpage odd
\ No newline at end of file
diff --git a/nixpkgs/pkgs/development/libraries/allegro/nix-unstable-sandbox-fix.patch b/nixpkgs/pkgs/development/libraries/allegro/nix-unstable-sandbox-fix.patch
new file mode 100644
index 000000000000..a227cea1ce7b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/allegro/nix-unstable-sandbox-fix.patch
@@ -0,0 +1,13 @@
+diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
+index 32ed053..73ba87f 100644
+--- a/docs/CMakeLists.txt
++++ b/docs/CMakeLists.txt
+@@ -72,7 +72,7 @@ foreach(page ${DOC_SRCS})
+     string(REPLACE "._tx" "" basename ${basename})
+ 
+     set(page ${CMAKE_CURRENT_SOURCE_DIR}/${page})
+-    if(${page} MATCHES "/build/")
++    if(${page} MATCHES ".+/build/")
+         set(txt_out ${CMAKE_CURRENT_BINARY_DIR}/build/${basename}.txt)
+         set(html_out ${CMAKE_CURRENT_BINARY_DIR}/build/${basename}.html)
+     else()
diff --git a/nixpkgs/pkgs/development/libraries/alure/default.nix b/nixpkgs/pkgs/development/libraries/alure/default.nix
new file mode 100644
index 000000000000..a1bb5798b0e9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/alure/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl, cmake, openal }:
+
+stdenv.mkDerivation rec {
+  pname = "alure";
+  version = "1.2";
+
+  src = fetchurl {
+    url = "http://kcat.strangesoft.net/alure-releases/alure-${version}.tar.bz2";
+    sha256 = "0w8gsyqki21s1qb2s5ac1kj08i6nc937c0rr08xbw9w9wvd6lpj6";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ openal ];
+
+  meta = with lib; {
+    description = "A utility library to help manage common tasks with OpenAL applications";
+    homepage = "https://github.com/kcat/alure";
+    license = licenses.mit;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/alure2/default.nix b/nixpkgs/pkgs/development/libraries/alure2/default.nix
new file mode 100644
index 000000000000..fa42c4fd53a3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/alure2/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchFromGitHub, cmake, openal, libvorbis, opusfile, libsndfile }:
+
+stdenv.mkDerivation rec {
+  pname = "alure2";
+  version = "unstable-2020-02-06";
+
+  src = fetchFromGitHub {
+    owner = "kcat";
+    repo = "alure";
+    rev = "50f92fe528e77da82197fd947d1cf9b0a82a0c7d";
+    sha256 = "1gmc1yfhwaj6lik0vn7zv8y23i05f4rw25v2jg34n856jcs02svx";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ openal libvorbis opusfile libsndfile ];
+
+  meta = with lib; {
+    description = "A utility library for OpenAL, providing a C++ API and managing common tasks that include file loading, caching, and streaming";
+    homepage = "https://github.com/kcat/alure";
+    license = licenses.zlib;
+    platforms = platforms.linux;
+    maintainers  = with maintainers; [ McSinyx ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/amdvlk/default.nix b/nixpkgs/pkgs/development/libraries/amdvlk/default.nix
new file mode 100644
index 000000000000..74e4958671c7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/amdvlk/default.nix
@@ -0,0 +1,117 @@
+{ stdenv
+, callPackage
+, lib
+, fetchRepoProject
+, writeScript
+, cmake
+, directx-shader-compiler
+, glslang
+, ninja
+, patchelf
+, perl
+, pkg-config
+, python3
+, expat
+, libdrm
+, ncurses
+, openssl
+, wayland
+, xorg
+, zlib
+}:
+let
+
+  suffix = if stdenv.system == "x86_64-linux" then "64" else "32";
+
+in stdenv.mkDerivation rec {
+  pname = "amdvlk";
+  version = "2023.Q4.2";
+
+  src = fetchRepoProject {
+    name = "${pname}-src";
+    manifest = "https://github.com/GPUOpen-Drivers/AMDVLK.git";
+    rev = "refs/tags/v-${version}";
+    sha256 = "CmlFqHxP6WM4b/MnXbRhd2TvV3qhMiC6rHrn/SHtRdc=";
+  };
+
+  buildInputs = [
+    expat
+    libdrm
+    ncurses
+    openssl
+    wayland
+    xorg.libX11
+    xorg.libxcb
+    xorg.xcbproto
+    xorg.libXext
+    xorg.libXrandr
+    xorg.libXft
+    xorg.libxshmfence
+    zlib
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    directx-shader-compiler
+    glslang
+    ninja
+    patchelf
+    perl
+    pkg-config
+    python3
+  ];
+
+  rpath = lib.makeLibraryPath [
+    libdrm
+    openssl
+    stdenv.cc.cc.lib
+    xorg.libX11
+    xorg.libxcb
+    xorg.libxshmfence
+    zlib
+  ];
+
+  cmakeDir = "../drivers/xgl";
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dm755 -t $out/lib icd/amdvlk${suffix}.so
+    install -Dm644 -t $out/share/vulkan/icd.d icd/amd_icd${suffix}.json
+    install -Dm644 -t $out/share/vulkan/implicit_layer.d icd/amd_icd${suffix}.json
+
+    patchelf --set-rpath "$rpath" $out/lib/amdvlk${suffix}.so
+
+    runHook postInstall
+  '';
+
+  # Keep the rpath, otherwise vulkaninfo and vkcube segfault
+  dontPatchELF = true;
+
+  passthru.updateScript = writeScript "update.sh" ''
+    #!/usr/bin/env nix-shell
+    #!nix-shell -i bash -p coreutils curl gnused jq common-updater-scripts
+
+    function setHash() {
+      sed -i "pkgs/development/libraries/amdvlk/default.nix" -e 's,sha256 = "[^'"'"'"]*",sha256 = "'"$1"'",'
+    }
+
+    version="$(curl -sL "https://api.github.com/repos/GPUOpen-Drivers/AMDVLK/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
+    sed -i "pkgs/development/libraries/amdvlk/default.nix" -e 's/version = "[^'"'"'"]*"/version = "'"$version"'"/'
+
+    setHash "$(nix-instantiate --eval -A lib.fakeSha256 | xargs echo)"
+    hash="$(nix to-base64 $(nix-build -A amdvlk 2>&1 | tail -n3 | grep 'got:' | cut -d: -f2- | xargs echo || true))"
+    setHash "$hash"
+  '';
+
+  passthru.impureTests = { amdvlk = callPackage ./test.nix {}; };
+
+  meta = with lib; {
+    description = "AMD Open Source Driver For Vulkan";
+    homepage = "https://github.com/GPUOpen-Drivers/AMDVLK";
+    changelog = "https://github.com/GPUOpen-Drivers/AMDVLK/releases/tag/v-${version}";
+    license = licenses.mit;
+    platforms = [ "x86_64-linux" "i686-linux" ];
+    maintainers = with maintainers; [ Flakebi ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/amdvlk/test.nix b/nixpkgs/pkgs/development/libraries/amdvlk/test.nix
new file mode 100644
index 000000000000..e76e6dce9eaf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/amdvlk/test.nix
@@ -0,0 +1,49 @@
+{ lib, makeImpureTest, coreutils, amdvlk, vulkan-tools }:
+makeImpureTest {
+  name = "amdvlk";
+  testedPackage = "amdvlk";
+
+  sandboxPaths = [ "/sys" "/dev/dri" ];
+
+  nativeBuildInputs = [ vulkan-tools ];
+
+  VK_ICD_FILENAMES = "${amdvlk}/share/vulkan/icd.d/amd_icd64.json";
+  XDG_RUNTIME_DIR = "/tmp";
+
+  # AMDVLK needs access to /dev/dri/card0 (or another card), but normally it is rw-rw----
+  # Change the permissions to be rw for everyone
+  prepareRunCommands = ''
+    function reset_perms()
+    {
+      # Reset permissions to previous state
+      for card in /dev/dri/card*; do
+        sudo ${coreutils}/bin/chmod "0''${cardPerms[$card]}" $card
+      done
+    }
+
+    # Save permissions on /dev/dri/card*
+    declare -A cardPerms
+    for card in /dev/dri/card*; do
+      cardPerms[$card]=$(stat -c "%a" $card)
+    done
+
+    sudo ${coreutils}/bin/chmod o+rw /dev/dri/card*
+    trap reset_perms EXIT
+  '';
+
+  testScript = ''
+    # Check that there is at least one card with write-access
+    if ! ls -l /dev/dri/card* | cut -b8-9 | grep -q rw; then
+      echo 'AMDVLK needs rw access to /dev/dri/card0 or a fitting card, please run `sudo chmod o+rw /dev/dri/card*`'
+      exit 1
+    fi
+
+    vulkaninfo --summary
+    echo "Checking version"
+    vulkaninfo --summary | grep '= ${amdvlk.version}'
+  '';
+
+  meta = with lib.maintainers; {
+    maintainers = [ Flakebi ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/amf-headers/default.nix b/nixpkgs/pkgs/development/libraries/amf-headers/default.nix
new file mode 100644
index 000000000000..07a76fcdfb12
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/amf-headers/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "amf-headers";
+  version = "1.4.33";
+
+  src = fetchFromGitHub {
+    owner = "GPUOpen-LibrariesAndSDKs";
+    repo = "AMF";
+    rev = "v${version}";
+    sha256 = "sha256-oho1EonWxgBmsQiX3wPhs0jQjLFwLe49C7/SOEptYiw=";
+  };
+
+  installPhase = ''
+    mkdir -p $out/include/AMF
+    cp -r amf/public/include/* $out/include/AMF
+  '';
+
+  meta = with lib; {
+    description = "Headers for The Advanced Media Framework (AMF)";
+    homepage = "https://github.com/GPUOpen-LibrariesAndSDKs/AMF";
+    license = licenses.mit;
+    maintainers = with maintainers; [ devusb ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aml/default.nix b/nixpkgs/pkgs/development/libraries/aml/default.nix
new file mode 100644
index 000000000000..1a6900d298c6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aml/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchFromGitHub, meson, pkg-config, ninja }:
+
+stdenv.mkDerivation rec {
+  pname = "aml";
+  version = "0.3.0";
+
+  src = fetchFromGitHub {
+    owner = "any1";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-BX+MRqvnwwLPhz22m0gfJ2EkW31KQEi/YTgOCMcQk2Q=";
+  };
+
+  nativeBuildInputs = [ meson pkg-config ninja ];
+
+  meta = with lib; {
+    description = "Another main loop";
+    inherit (src.meta) homepage;
+    license = licenses.isc;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ primeos ];
+    broken = stdenv.isDarwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/amrnb/default.nix b/nixpkgs/pkgs/development/libraries/amrnb/default.nix
new file mode 100644
index 000000000000..4e325932b5e8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/amrnb/default.nix
@@ -0,0 +1,32 @@
+{lib, stdenv, fetchurl, unzip}:
+
+stdenv.mkDerivation {
+  pname = "amrnb";
+  version = "11.0.0.0";
+  srcAmr = fetchurl {
+    url = "https://www.3gpp.org/ftp/Specs/latest/Rel-11/26_series/26104-b00.zip";
+    sha256 = "1wf8ih0hk7w20vdlnw7jb7w73v15hbxgbvmq4wq7h2ghn0j8ppr3";
+  };
+
+  src = fetchurl {
+    url = "http://www.penguin.cz/~utx/ftp/amr/amrnb-11.0.0.0.tar.bz2";
+    sha256 = "1qgiw02n2a6r32pimnd97v2jkvnw449xrqmaxiivjy2jcr5h141q";
+  };
+
+  nativeBuildInputs = [ unzip ];
+
+  configureFlags = [ "--cache-file=config.cache" "--with-downloader=true" ];
+
+  postConfigure = ''
+    cp $srcAmr 26104-b00.zip
+  '';
+
+  meta = {
+    homepage = "http://www.penguin.cz/~utx/amr";
+    description = "AMR Narrow-Band Codec";
+    # The wrapper code is free, but not the libraries from 3gpp.
+    # It's a source code reference implementation with patents and licenses on
+    # some countries, not redistributable.
+    license = lib.licenses.unfree;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/amrwb/default.nix b/nixpkgs/pkgs/development/libraries/amrwb/default.nix
new file mode 100644
index 000000000000..81938bb4cba7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/amrwb/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchurl, unzip }:
+
+stdenv.mkDerivation rec {
+  pname = "amrwb";
+  version = "11.0.0.0";
+
+  srcAmr = fetchurl {
+    url = "http://www.3gpp.org/ftp/Specs/archive/26_series/26.204/26204-b00.zip";
+    sha256 = "1v4zhs6f1mf1xkrzhljh05890in0rpr5d5pcak9h4igxhd2c91f8";
+  };
+
+  src = fetchurl {
+    url = "http://www.penguin.cz/~utx/ftp/amr/amrwb-${version}.tar.bz2";
+    sha256 = "1p6m9nd08mv525w14py9qzs9zwsa5i3vxf5bgcmcvc408jqmkbsw";
+  };
+
+  nativeBuildInputs = [ unzip ];
+
+  configureFlags = [ "--cache-file=config.cache" "--with-downloader=true" ];
+
+  postConfigure = ''
+    cp $srcAmr 26204-b00.zip
+  '';
+
+  meta = {
+    homepage = "http://www.penguin.cz/~utx/amr";
+    description = "AMR Wide-Band Codec";
+    # The wrapper code is free, but not the libraries from 3gpp.
+    # It's a source code reference implementation with patents and licenses on
+    # some countries, not redistributable.
+    license = lib.licenses.unfree;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/antic/default.nix b/nixpkgs/pkgs/development/libraries/antic/default.nix
new file mode 100644
index 000000000000..5a8e00d90f5a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/antic/default.nix
@@ -0,0 +1,41 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, mpir
+, gmp
+, mpfr
+, flint
+}:
+
+stdenv.mkDerivation rec {
+  pname = "antic";
+  version = "0.2.5";
+
+  src = fetchFromGitHub {
+    owner = "flintlib";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-bQ2VvCS+lGro5qxs+qBz3RpUenxQTmTr+lm9BFZWYts=";
+  };
+
+  buildInputs = [ mpir gmp mpfr flint ];
+
+  configureFlags = [
+    "--with-gmp=${gmp}"
+    "--with-mpir=${mpir}"
+    "--with-mpfr=${mpfr}"
+    "--with-flint=${flint}"
+  ];
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "An algebraic number theory library";
+    homepage = "https://github.com/flintlib/antic";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ smasher164 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/apache-activemq/default.nix b/nixpkgs/pkgs/development/libraries/apache-activemq/default.nix
new file mode 100644
index 000000000000..609d29ed6909
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/apache-activemq/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "apache-activemq";
+  version = "5.18.3";
+
+  src = fetchurl {
+    sha256 = "sha256-lDOBqm00BwfebELq2/e0G3/fk99gQVbZctUMTaeDVE8=";
+    url = "mirror://apache/activemq/${version}/${pname}-${version}-bin.tar.gz";
+  };
+
+  installPhase = ''
+    mkdir -p $out
+    mv * $out/
+    for j in `find $out/lib -name "*.jar"`; do
+      cp="''${cp:+"$cp:"}$j";
+    done
+    echo "CLASSPATH=$cp" > $out/lib/classpath.env
+  '';
+
+  meta = {
+    homepage = "https://activemq.apache.org/";
+    description = "Messaging and Integration Patterns server written in Java";
+    sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
+    license = lib.licenses.asl20;
+    platforms = lib.platforms.unix;
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/appindicator-sharp/default.nix b/nixpkgs/pkgs/development/libraries/appindicator-sharp/default.nix
new file mode 100644
index 000000000000..9eff4e3895ba
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/appindicator-sharp/default.nix
@@ -0,0 +1,43 @@
+{
+  autoreconfHook,
+  fetchFromGitHub,
+  lib,
+  libappindicator,
+  mono,
+  gtk-sharp-3_0,
+  pkg-config,
+  stdenv,
+}:
+
+stdenv.mkDerivation rec {
+  pname = "appindicator-sharp";
+  version = "5a79cde93da6d68a4b1373f1ce5796c3c5fe1b37";
+
+  src = fetchFromGitHub {
+    owner = "stsundermann";
+    repo = "appindicator-sharp";
+    rev = version;
+    sha256 = "sha256:1i0vqbp05l29f5v9ygp7flm4s05pcnn5ivl578mxmhb51s7ncw6l";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    mono
+    pkg-config
+  ];
+
+  buildInputs = [
+    gtk-sharp-3_0
+    libappindicator
+  ];
+
+  ac_cv_path_MDOC = "no";
+  installFlagsArray = ["GAPIXMLDIR=/tmp/gapixml"];
+
+  meta = {
+    description = "Bindings for appindicator using gobject-introspection";
+    homepage = "https://github.com/stsundermann/appindicator-sharp";
+    license = lib.licenses.lgpl3Only;
+    maintainers = with lib.maintainers; [ kevincox ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/applet-window-appmenu/default.nix b/nixpkgs/pkgs/development/libraries/applet-window-appmenu/default.nix
new file mode 100644
index 000000000000..09185bfb3c26
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/applet-window-appmenu/default.nix
@@ -0,0 +1,54 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, extra-cmake-modules
+, kcoreaddons
+, kdeclarative
+, kdecoration
+, plasma-framework
+, plasma-workspace
+, libSM
+, qtx11extras
+, kwindowsystem
+, libdbusmenu
+, wrapQtAppsHook
+}:
+
+stdenv.mkDerivation {
+  pname = "applet-window-appmenu";
+  version = "unstable-2022-06-27";
+
+  src = fetchFromGitHub {
+    owner = "psifidotos";
+    repo = "applet-window-appmenu";
+    rev = "1de99c93b0004b80898081a1acfd1e0be807326a";
+    hash = "sha256-PLlZ2qgdge8o1mZOiPOXSmTQv1r34IUmWTmYFGEzNTI=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    extra-cmake-modules
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    kcoreaddons
+    kdeclarative
+    kdecoration
+    kwindowsystem
+    plasma-framework
+    plasma-workspace
+    libSM
+    qtx11extras
+    libdbusmenu
+  ];
+
+  meta = with lib; {
+    description = "Plasma 5 applet in order to show window menu in your panels";
+    homepage = "https://github.com/psifidotos/applet-window-appmenu";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ greydot ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/applet-window-buttons/default.nix b/nixpkgs/pkgs/development/libraries/applet-window-buttons/default.nix
new file mode 100644
index 000000000000..4f605b8af98b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/applet-window-buttons/default.nix
@@ -0,0 +1,50 @@
+{ lib
+, mkDerivation
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, extra-cmake-modules
+, kcoreaddons
+, kdeclarative
+, kdecoration
+, plasma-framework
+}:
+
+mkDerivation rec {
+  pname = "applet-window-buttons";
+  version = "0.11.1";
+
+  src = fetchFromGitHub {
+    owner = "psifidotos";
+    repo = "applet-window-buttons";
+    rev = version;
+    hash = "sha256-Qww/22bEmjuq+R3o0UDcS6U+34qjaeSEy+g681/hcfE=";
+  };
+
+  patches = [
+    # FIXME: cherry-pick Plasma 5.27 build fix, remove for next release
+    (fetchpatch {
+      url = "https://github.com/psifidotos/applet-window-buttons/commit/924994e10402921bf22fefc099bca2914989081c.diff";
+      hash = "sha256-4ErqmkIbkvKwns50LhI8Et1EMyvrXYcNRL1rXCxau2w=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    extra-cmake-modules
+  ];
+
+  buildInputs = [
+    kcoreaddons
+    kdeclarative
+    kdecoration
+    plasma-framework
+  ];
+
+  meta = with lib; {
+    description = "Plasma 5 applet in order to show window buttons in your panels";
+    homepage = "https://github.com/psifidotos/applet-window-buttons";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ dotlambda ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/appstream-glib/default.nix b/nixpkgs/pkgs/development/libraries/appstream-glib/default.nix
new file mode 100644
index 000000000000..7b3e4516bf6b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/appstream-glib/default.nix
@@ -0,0 +1,95 @@
+{ lib, stdenv
+, fetchFromGitHub
+, substituteAll
+, docbook_xml_dtd_42
+, docbook_xsl
+, fontconfig
+, freetype
+, gdk-pixbuf
+, gettext
+, glib
+, gobject-introspection
+, gperf
+, gtk-doc
+, gtk3
+, json-glib
+, libarchive
+, curl
+, libuuid
+, libxslt
+, meson
+, ninja
+, pkg-config
+, pngquant
+}:
+stdenv.mkDerivation rec {
+  pname = "appstream-glib";
+  version = "0.8.2";
+
+  outputs = [ "out" "dev" "man" "installedTests" ];
+  outputBin = "dev";
+
+  src = fetchFromGitHub {
+    owner = "hughsie";
+    repo = "appstream-glib";
+    rev = "${lib.replaceStrings ["-"] ["_"] pname}_${lib.replaceStrings ["."] ["_"] version}";
+    sha256 = "sha256-3QFiOJ38talA0GGL++n+DaA/AN7l4LOZQ7BJV6o8ius=";
+  };
+
+  nativeBuildInputs = [
+    docbook_xml_dtd_42
+    docbook_xsl
+    gettext
+    gobject-introspection
+    gperf
+    gtk-doc
+    libxslt
+    meson
+    ninja
+    pkg-config
+  ];
+
+  buildInputs = [
+    fontconfig
+    freetype
+    gdk-pixbuf
+    glib
+    gtk3
+    json-glib
+    libarchive
+    curl
+    libuuid
+  ];
+
+  propagatedBuildInputs = [
+    glib
+    gdk-pixbuf
+  ];
+
+  patches = [
+    (substituteAll {
+      src = ./paths.patch;
+      pngquant = "${pngquant}/bin/pngquant";
+    })
+  ];
+
+  mesonFlags = [
+    "-Drpm=false"
+    "-Dstemmer=false"
+    "-Ddep11=false"
+  ];
+
+  doCheck = false; # fails at least 1 test
+
+  postInstall = ''
+    moveToOutput "share/installed-tests" "$installedTests"
+  '';
+
+  meta = with lib; {
+    description = "Objects and helper methods to read and write AppStream metadata";
+    homepage = "https://people.freedesktop.org/~hughsient/appstream-glib/";
+    license = licenses.lgpl2Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ matthewbauer ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/appstream-glib/paths.patch b/nixpkgs/pkgs/development/libraries/appstream-glib/paths.patch
new file mode 100644
index 000000000000..5c6396988a17
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/appstream-glib/paths.patch
@@ -0,0 +1,11 @@
+--- a/libappstream-builder/asb-utils.c
++++ b/libappstream-builder/asb-utils.c
+@@ -294,7 +294,7 @@
+ {
+ 	g_autofree gchar *standard_error = NULL;
+ 	gint exit_status = 0;
+-	const gchar *argv[] = { "/usr/bin/pngquant", "--skip-if-larger",
++	const gchar *argv[] = { "@pngquant@", "--skip-if-larger",
+ 				"--strip", "--ext", ".png",
+ 				"--force", "--speed", "1", filename, NULL };
+ 	if (!g_file_test (argv[0], G_FILE_TEST_IS_EXECUTABLE))
diff --git a/nixpkgs/pkgs/development/libraries/appstream/default.nix b/nixpkgs/pkgs/development/libraries/appstream/default.nix
new file mode 100644
index 000000000000..c5fb2036d324
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/appstream/default.nix
@@ -0,0 +1,119 @@
+{ lib
+, stdenv
+, substituteAll
+, fetchFromGitHub
+, meson
+, mesonEmulatorHook
+, ninja
+, pkg-config
+, gettext
+, xmlto
+, docbook-xsl-nons
+, docbook_xml_dtd_45
+, libxslt
+, libstemmer
+, glib
+, xapian
+, libxml2
+, libxmlb
+, libyaml
+, gobject-introspection
+, pcre
+, itstool
+, gperf
+, vala
+, curl
+, systemd
+, nixosTests
+, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
+}:
+
+stdenv.mkDerivation rec {
+  pname = "appstream";
+  version = "1.0.1";
+
+  outputs = [ "out" "dev" "installedTests" ];
+
+  src = fetchFromGitHub {
+    owner = "ximion";
+    repo = "appstream";
+    rev = "v${version}";
+    sha256 = "sha256-ULqRHepWVuAluXsXJUoqxqJfrN168MGlwdVkoLLwSN0=";
+  };
+
+  patches = [
+    # Fix hardcoded paths
+    (substituteAll {
+      src = ./fix-paths.patch;
+      libstemmer_includedir = "${lib.getDev libstemmer}/include";
+    })
+
+    # Allow installing installed tests to a separate output.
+    ./installed-tests-path.patch
+  ];
+
+  strictDeps = true;
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gettext
+    libxslt
+    xmlto
+    docbook-xsl-nons
+    docbook_xml_dtd_45
+    gobject-introspection
+    itstool
+    vala
+    gperf
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
+  ];
+
+  buildInputs = [
+    libstemmer
+    pcre
+    glib
+    xapian
+    libxml2
+    libxmlb
+    libyaml
+    curl
+  ] ++ lib.optionals withSystemd [
+    systemd
+  ];
+
+  mesonFlags = [
+    "-Dapidocs=false"
+    "-Ddocs=false"
+    "-Dvapi=true"
+    "-Dinstalled_test_prefix=${placeholder "installedTests"}"
+  ] ++ lib.optionals (!withSystemd) [
+    "-Dsystemd=false"
+  ];
+
+  passthru = {
+    tests = {
+      installed-tests = nixosTests.installed-tests.appstream;
+    };
+  };
+
+  meta = with lib; {
+    description = "Software metadata handling library";
+    longDescription = ''
+      AppStream is a cross-distro effort for building Software-Center applications
+      and enhancing metadata provided by software components.  It provides
+      specifications for meta-information which is shipped by upstream projects and
+      can be consumed by other software.
+    '';
+    homepage = "https://www.freedesktop.org/wiki/Distributions/AppStream/";
+    license = licenses.lgpl21Plus;
+    mainProgram = "appstreamcli";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/appstream/fix-paths.patch b/nixpkgs/pkgs/development/libraries/appstream/fix-paths.patch
new file mode 100644
index 000000000000..8ad11abecada
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/appstream/fix-paths.patch
@@ -0,0 +1,17 @@
+diff --git a/meson.build b/meson.build
+index 5e7f57d5..3fe89e8c 100644
+--- a/meson.build
++++ b/meson.build
+@@ -171,10 +171,10 @@ endif
+ stemmer_inc_dirs = include_directories()
+ if get_option('stemming')
+     stemmer_lib = cc.find_library('stemmer', required: true)
+-    stemmer_inc_dirs = include_directories(['/usr/include'])
++    stemmer_inc_dirs = include_directories(['@libstemmer_includedir@'])
+     if not cc.has_header('libstemmer.h')
+         if cc.has_header('libstemmer/libstemmer.h')
+-            stemmer_inc_dirs = include_directories('/usr/include/libstemmer')
++            stemmer_inc_dirs = include_directories('@libstemmer_includedir@/libstemmer')
+         else
+             error('Unable to find Snowball header "libstemmer.h". Please ensure libstemmer/Snowball is installed properly in order to continue.')
+         endif
diff --git a/nixpkgs/pkgs/development/libraries/appstream/installed-tests-path.patch b/nixpkgs/pkgs/development/libraries/appstream/installed-tests-path.patch
new file mode 100644
index 000000000000..188c1e525890
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/appstream/installed-tests-path.patch
@@ -0,0 +1,27 @@
+diff --git a/meson_options.txt b/meson_options.txt
+index 8dd8e0c7..e2a30b06 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -44,6 +44,11 @@ option('install-docs',
+        value : true,
+        description : 'Install documentation for API and specification'
+ )
++option('installed_test_prefix',
++       type : 'string',
++       value : '',
++       description : 'Prefix for installed tests'
++)
+ 
+ #
+ # For development
+diff --git a/tests/installed-tests/meson.build b/tests/installed-tests/meson.build
+index 405820ce..f592a753 100644
+--- a/tests/installed-tests/meson.build
++++ b/tests/installed-tests/meson.build
+@@ -10,5 +10,5 @@ configure_file(
+     output : 'metainfo-validate.test',
+     configuration : itconf,
+     install: true,
+-    install_dir: join_paths('share', 'installed-tests', 'appstream'),
++    install_dir: join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests', 'appstream'),
+ )
diff --git a/nixpkgs/pkgs/development/libraries/appstream/qt.nix b/nixpkgs/pkgs/development/libraries/appstream/qt.nix
new file mode 100644
index 000000000000..492037d721ed
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/appstream/qt.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, appstream, qtbase, qttools, nixosTests }:
+
+# TODO: look into using the libraries from the regular appstream derivation as we keep duplicates here
+
+let
+  qtSuffix = lib.optionalString (lib.versions.major qtbase.version == "5") "5";
+in
+stdenv.mkDerivation {
+  pname = "appstream-qt";
+  inherit (appstream) version src;
+
+  outputs = [ "out" "dev" "installedTests" ];
+
+  buildInputs = appstream.buildInputs ++ [ appstream qtbase ];
+
+  nativeBuildInputs = appstream.nativeBuildInputs ++ [ qttools ];
+
+  mesonFlags = appstream.mesonFlags ++ [ "-Dqt${qtSuffix}=true" ];
+
+  patches = appstream.patches;
+
+  dontWrapQtApps = true;
+
+  postFixup = ''
+    sed -i "$dev/lib/cmake/AppStreamQt${qtSuffix}/AppStreamQt${qtSuffix}Config.cmake" \
+      -e "/INTERFACE_INCLUDE_DIRECTORIES/ s@\''${PACKAGE_PREFIX_DIR}@$dev@"
+  '';
+
+  passthru = appstream.passthru // {
+    tests = {
+      installed-tests = nixosTests.installed-tests.appstream-qt;
+    };
+  };
+
+  meta = appstream.meta // {
+    description = "Software metadata handling library - Qt";
+ };
+}
diff --git a/nixpkgs/pkgs/development/libraries/apr-util/clang-bdb.patch b/nixpkgs/pkgs/development/libraries/apr-util/clang-bdb.patch
new file mode 100644
index 000000000000..02e9c8378c63
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/apr-util/clang-bdb.patch
@@ -0,0 +1,12 @@
+diff -ur a/build/dbm.m4 b/build/dbm.m4
+--- a/build/dbm.m4	2013-11-23 13:00:53.000000000 -0500
++++ b/build/dbm.m4	2023-10-22 20:16:37.764571446 -0400
+@@ -235,7 +235,7 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <$apu_try_berkeley_db_header>
+-main ()
++int main ()
+ {
+   int major, minor, patch;
+ 
diff --git a/nixpkgs/pkgs/development/libraries/apr-util/default.nix b/nixpkgs/pkgs/development/libraries/apr-util/default.nix
new file mode 100644
index 000000000000..a1cbbc5e6642
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/apr-util/default.nix
@@ -0,0 +1,89 @@
+{ lib, stdenv, fetchurl, makeWrapper, apr, expat, gnused
+, sslSupport ? true, openssl
+, bdbSupport ? true, db
+, ldapSupport ? !stdenv.isCygwin, openldap
+, libiconv, libxcrypt
+, cyrus_sasl, autoreconfHook
+}:
+
+assert sslSupport -> openssl != null;
+assert bdbSupport -> db != null;
+assert ldapSupport -> openldap != null;
+
+stdenv.mkDerivation rec {
+  pname = "apr-util";
+  version = "1.6.3";
+
+  src = fetchurl {
+    url = "mirror://apache/apr/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-pBB243EHRjJsOUUEKZStmk/KwM4Cd92P6gdv7DyXcrU=";
+  };
+
+  patches = [
+    ./fix-libxcrypt-build.patch
+    # Fix incorrect Berkeley DB detection with newer versions of clang due to implicit `int` on main errors.
+    ./clang-bdb.patch
+  ] ++ lib.optional stdenv.isFreeBSD ./include-static-dependencies.patch;
+
+  NIX_CFLAGS_LINK = [ "-lcrypt" ];
+
+  outputs = [ "out" "dev" ];
+  outputBin = "dev";
+
+  nativeBuildInputs = [ makeWrapper autoreconfHook ];
+
+  configureFlags = [ "--with-apr=${apr.dev}" "--with-expat=${expat.dev}" ]
+    ++ lib.optional (!stdenv.isCygwin) "--with-crypto"
+    ++ lib.optional sslSupport "--with-openssl=${openssl.dev}"
+    ++ lib.optional bdbSupport "--with-berkeley-db=${db.dev}"
+    ++ lib.optional ldapSupport "--with-ldap=ldap"
+    ++ lib.optionals stdenv.isCygwin
+      [ "--without-pgsql" "--without-sqlite2" "--without-sqlite3"
+        "--without-freetds" "--without-berkeley-db" "--without-crypto" ]
+    ;
+
+  postConfigure = ''
+    echo '#define APR_HAVE_CRYPT_H 1' >> confdefs.h
+  '' +
+    # For some reason, db version 6.9 is selected when cross-compiling.
+    # It's unclear as to why, it requires someone with more autotools / configure knowledge to go deeper into that.
+    # Always replacing the link flag with a generic link flag seems to help though, so let's do that for now.
+    lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
+      substituteInPlace Makefile \
+        --replace "-ldb-6.9" "-ldb"
+      substituteInPlace apu-1-config \
+        --replace "-ldb-6.9" "-ldb"
+  '';
+
+  propagatedBuildInputs = [ apr expat libiconv libxcrypt ]
+    ++ lib.optional sslSupport openssl
+    ++ lib.optional bdbSupport db
+    ++ lib.optional ldapSupport openldap
+    ++ lib.optional stdenv.isFreeBSD cyrus_sasl;
+
+  postInstall = ''
+    for f in $out/lib/*.la $out/lib/apr-util-1/*.la $dev/bin/apu-1-config; do
+      substituteInPlace $f \
+        --replace "${expat.dev}/lib" "${expat.out}/lib" \
+        --replace "${db.dev}/lib" "${db.out}/lib" \
+        --replace "${openssl.dev}/lib" "${lib.getLib openssl}/lib"
+    done
+
+    # Give apr1 access to sed for runtime invocations.
+    wrapProgram $dev/bin/apu-1-config --prefix PATH : "${gnused}/bin"
+  '';
+
+  enableParallelBuilding = true;
+
+  passthru = {
+    inherit sslSupport bdbSupport ldapSupport;
+  };
+
+  meta = with lib; {
+    homepage = "https://apr.apache.org/";
+    description = "A companion library to APR, the Apache Portable Runtime";
+    maintainers = [ maintainers.eelco ];
+    platforms = platforms.unix;
+    license = licenses.asl20;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/apr-util/fix-libxcrypt-build.patch b/nixpkgs/pkgs/development/libraries/apr-util/fix-libxcrypt-build.patch
new file mode 100644
index 000000000000..2994e5de0f78
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/apr-util/fix-libxcrypt-build.patch
@@ -0,0 +1,14 @@
+diff --git a/crypto/apr_passwd.c b/crypto/apr_passwd.c
+index c961de2..a397f27 100644
+--- a/crypto/apr_passwd.c
++++ b/crypto/apr_passwd.c
+@@ -24,9 +24,7 @@
+ #if APR_HAVE_STRING_H
+ #include <string.h>
+ #endif
+-#if APR_HAVE_CRYPT_H
+ #include <crypt.h>
+-#endif
+ #if APR_HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif
diff --git a/nixpkgs/pkgs/development/libraries/apr-util/include-static-dependencies.patch b/nixpkgs/pkgs/development/libraries/apr-util/include-static-dependencies.patch
new file mode 100644
index 000000000000..1813c7217810
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/apr-util/include-static-dependencies.patch
@@ -0,0 +1,12 @@
+diff --git a/build/apu-conf.m4 b/build/apu-conf.m4
+index 8943f10..aa44305 100644
+--- a/build/apu-conf.m4
++++ b/build/apu-conf.m4
+@@ -279,6 +279,7 @@ AC_ARG_WITH(ldap,[  --with-ldap=library     ldap library to use],
+         APU_FIND_LDAPLIB("ldap", "-llber -lresolv -lsocket -lnsl")
+         APU_FIND_LDAPLIB("ldap", "-ldl -lpthread")
+       else
++        APU_FIND_LDAPLIB($LIBLDAP, "-llber -lcrypto -lssl -lsasl2")
+         APU_FIND_LDAPLIB($LIBLDAP)
+         APU_FIND_LDAPLIB($LIBLDAP, "-lresolv")
+         APU_FIND_LDAPLIB($LIBLDAP, "-lresolv -lsocket -lnsl")
diff --git a/nixpkgs/pkgs/development/libraries/apr/cross-assume-dev-zero-mmappable.patch b/nixpkgs/pkgs/development/libraries/apr/cross-assume-dev-zero-mmappable.patch
new file mode 100644
index 000000000000..4bacb891f221
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/apr/cross-assume-dev-zero-mmappable.patch
@@ -0,0 +1,14 @@
+based onhttps://830833.bugs.gentoo.org/attachment.cgi?id=761676,
+adjusted for 1.7.2
+
+--- a/configure.in	2022-01-09 00:31:05.552582255 -0800
++++ b/configure.in	2022-01-09 00:31:19.824582533 -0800
+@@ -1329,7 +1329,7 @@
+             return 3;
+         }
+         return 0;
+-    }], [], [ac_cv_file__dev_zero=no], [ac_cv_file__dev_zero=no])])
++    }], [], [ac_cv_file__dev_zero=no], [:])])
+ fi
+ 
+ # Now we determine which one is our anonymous shmem preference.
diff --git a/nixpkgs/pkgs/development/libraries/apr/default.nix b/nixpkgs/pkgs/development/libraries/apr/default.nix
new file mode 100644
index 000000000000..b0809829c541
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/apr/default.nix
@@ -0,0 +1,73 @@
+{ lib, stdenv, fetchurl, fetchpatch, buildPackages, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "apr";
+  version = "1.7.4";
+
+  src = fetchurl {
+    url = "mirror://apache/apr/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-/GSN6YPzoqbJ543qHxgGOb0vrWwG1VbUNnpwH+XDVXc=";
+  };
+
+  patches = [
+    ./cross-assume-dev-zero-mmappable.patch
+  ];
+
+  # This test needs the net
+  postPatch = ''
+    rm test/testsock.*
+  '';
+
+  outputs = [ "out" "dev" ];
+  outputBin = "dev";
+
+  preConfigure =
+    ''
+      configureFlagsArray+=("--with-installbuilddir=$dev/share/build")
+    '';
+
+  configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    # For cross builds, provide answers to the configure time tests.
+    # These answers are valid on x86_64-linux and aarch64-linux.
+    "ac_cv_file__dev_zero=yes"
+    "ac_cv_func_setpgrp_void=yes"
+    "apr_cv_tcp_nodelay_with_cork=yes"
+    "ac_cv_define_PTHREAD_PROCESS_SHARED=yes"
+    "apr_cv_process_shared_works=yes"
+    "apr_cv_mutex_robust_shared=yes"
+    "ap_cv_atomic_builtins=yes"
+    "apr_cv_mutex_recursive=yes"
+    "apr_cv_epoll=yes"
+    "apr_cv_epoll_create1=yes"
+    "apr_cv_dup3=yes"
+    "apr_cv_accept4=yes"
+    "apr_cv_sock_cloexec=yes"
+    "ac_cv_struct_rlimit=yes"
+    "ac_cv_func_sem_open=yes"
+    "ac_cv_negative_eai=yes"
+    "apr_cv_gai_addrconfig=yes"
+    "ac_cv_o_nonblock_inherited=no"
+    "apr_cv_pthreads_lib=-lpthread"
+    "CC_FOR_BUILD=${buildPackages.stdenv.cc}/bin/cc"
+  ] ++ lib.optionals (stdenv.hostPlatform.system == "i686-cygwin") [
+    # Including the Windows headers breaks unistd.h.
+    # Based on ftp://sourceware.org/pub/cygwin/release/libapr1/libapr1-1.3.8-2-src.tar.bz2
+    "ac_cv_header_windows_h=no"
+  ];
+
+  # - Update libtool for macOS 11 support
+  # - Regenerate for cross fix patch
+  nativeBuildInputs = [ autoreconfHook ];
+
+  doCheck = true;
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://apr.apache.org/";
+    description = "The Apache Portable Runtime library";
+    platforms = platforms.all;
+    license = licenses.asl20;
+    maintainers = [ maintainers.eelco ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aptdec/default.nix b/nixpkgs/pkgs/development/libraries/aptdec/default.nix
new file mode 100644
index 000000000000..f969f0d66ada
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aptdec/default.nix
@@ -0,0 +1,32 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, libpng
+, libsndfile
+}:
+
+stdenv.mkDerivation rec {
+  pname = "aptdec";
+  version = "1.8.0";
+
+  src = fetchFromGitHub {
+    owner = "Xerbo";
+    repo = "aptdec";
+    rev = "v${version}";
+    hash = "sha256-5Pr2PlCPSEIWnThJXKcQEudmxhLJC2sVa9BfAOEKHB4=";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ libpng libsndfile ];
+
+  meta = with lib; {
+    description = "NOAA APT satellite imagery decoding library";
+    homepage = "https://github.com/Xerbo/aptdec";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ alexwinter ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aqbanking/default.nix b/nixpkgs/pkgs/development/libraries/aqbanking/default.nix
new file mode 100644
index 000000000000..102703107c48
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aqbanking/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchurl, gmp, gwenhywfar, libtool, libxml2, libxslt
+, pkg-config, gettext, xmlsec, zlib
+}:
+
+let
+  inherit ((import ./sources.nix).aqbanking) hash releaseId version;
+in stdenv.mkDerivation rec {
+  pname = "aqbanking";
+  inherit version;
+
+  src = fetchurl {
+    url = "https://www.aquamaniac.de/rdm/attachments/download/${releaseId}/${pname}-${version}.tar.gz";
+    inherit hash;
+  };
+
+  # Set the include dir explicitly, this fixes a build error when building
+  # kmymoney because otherwise the includedir is overwritten by gwenhywfar's
+  # cmake file
+  postPatch = ''
+    sed -i '/^set_and_check(AQBANKING_INCLUDE_DIRS "@aqbanking_headerdir@")/i set_and_check(includedir "@includedir@")' aqbanking-config.cmake.in
+    sed -i -e '/^aqbanking_plugindir=/ {
+      c aqbanking_plugindir="\''${libdir}/gwenhywfar/plugins"
+    }' configure
+  '';
+
+  buildInputs = [ gmp gwenhywfar libtool libxml2 libxslt xmlsec zlib ];
+
+  nativeBuildInputs = [ pkg-config gettext ];
+
+  meta = with lib; {
+    description = "An interface to banking tasks, file formats and country information";
+    homepage = "https://www.aquamaniac.de/rdm/";
+    hydraPlatforms = [];
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ goibhniu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aqbanking/gwenhywfar.nix b/nixpkgs/pkgs/development/libraries/aqbanking/gwenhywfar.nix
new file mode 100644
index 000000000000..4f2326b007a5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aqbanking/gwenhywfar.nix
@@ -0,0 +1,69 @@
+{ lib, stdenv, fetchurl, gnutls, openssl, libgcrypt, libgpg-error, pkg-config, gettext
+, which
+
+# GUI support
+, gtk3, qt5
+
+, pluginSearchPaths ? [
+    "/run/current-system/sw/lib/gwenhywfar/plugins"
+    ".nix-profile/lib/gwenhywfar/plugins"
+  ]
+}:
+
+let
+  inherit ((import ./sources.nix).gwenhywfar) hash releaseId version;
+in stdenv.mkDerivation rec {
+  pname = "gwenhywfar";
+  inherit version;
+
+  src = fetchurl {
+    url = "https://www.aquamaniac.de/rdm/attachments/download/${releaseId}/${pname}-${version}.tar.gz";
+    inherit hash;
+  };
+
+  configureFlags = [
+    "--with-openssl-includes=${openssl.dev}/include"
+    "--with-openssl-libs=${lib.getLib openssl}/lib"
+  ];
+
+  preConfigure = ''
+    configureFlagsArray+=("--with-guis=gtk3 qt5")
+  '';
+
+  postPatch = let
+    isRelative = path: builtins.substring 0 1 path != "/";
+    mkSearchPath = path: ''
+      p; g; s,\<PLUGINDIR\>,"${path}",g;
+    '' + lib.optionalString (isRelative path) ''
+      s/AddPath(\(.*\));/AddRelPath(\1, GWEN_PathManager_RelModeHome);/g
+    '';
+
+  in ''
+    sed -i -e '/GWEN_PathManager_DefinePath.*GWEN_PM_PLUGINDIR/,/^#endif/ {
+      /^#if/,/^#endif/ {
+        H; /^#endif/ {
+          ${lib.concatMapStrings mkSearchPath pluginSearchPaths}
+        }
+      }
+    }' src/gwenhywfar.c
+
+    # Strip off the effective SO version from the path so that for example
+    # "lib/gwenhywfar/plugins/60" becomes just "lib/gwenhywfar/plugins".
+    sed -i -e '/^gwenhywfar_plugindir=/s,/\''${GWENHYWFAR_SO_EFFECTIVE},,' \
+      configure
+  '';
+
+  nativeBuildInputs = [ pkg-config gettext which ];
+
+  buildInputs = [ gtk3 qt5.qtbase gnutls openssl libgcrypt libgpg-error ];
+
+  dontWrapQtApps = true;
+
+  meta = with lib; {
+    description = "OS abstraction functions used by aqbanking and related tools";
+    homepage = "https://www.aquamaniac.de/rdm/projects/gwenhywfar";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ goibhniu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aqbanking/libchipcard.nix b/nixpkgs/pkgs/development/libraries/aqbanking/libchipcard.nix
new file mode 100644
index 000000000000..9190e1ad9b79
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aqbanking/libchipcard.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchurl, pkg-config, gwenhywfar, pcsclite, zlib }:
+
+let
+  inherit ((import ./sources.nix).libchipcard) hash releaseId version;
+in stdenv.mkDerivation rec {
+  pname = "libchipcard";
+  inherit version;
+
+  src = fetchurl {
+    url = "https://www.aquamaniac.de/rdm/attachments/download/${releaseId}/${pname}-${version}.tar.gz";
+    inherit hash;
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ gwenhywfar pcsclite zlib ];
+
+  makeFlags = [ "crypttokenplugindir=$(out)/lib/gwenhywfar/plugins/ct" ];
+
+  meta = with lib; {
+    description = "Library for access to chipcards";
+    homepage = "https://www.aquamaniac.de/rdm/projects/libchipcard";
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ aszlig ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aqbanking/sources.nix b/nixpkgs/pkgs/development/libraries/aqbanking/sources.nix
new file mode 100644
index 000000000000..61632662122d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aqbanking/sources.nix
@@ -0,0 +1,22 @@
+{
+  # https://www.aquamaniac.de/rdm/projects/gwenhywfar/files
+  gwenhywfar = {
+    version = "5.10.1";
+    hash = "sha256-ovYKnd5don5X4OXvX4kx9JXB1UGtkKhB4rYjFWVUcWA=";
+    releaseId = "465";
+  };
+
+  # https://www.aquamaniac.de/rdm/projects/libchipcard/files
+  libchipcard = {
+    version = "5.1.6";
+    hash = "sha256-bAf1J0F/dWIHT5kBLaTRHrTbr9M/SeZrRCzNbjuM/SA=";
+    releaseId = "382";
+  };
+
+  # https://www.aquamaniac.de/rdm/projects/aqbanking/files
+  aqbanking = {
+    version = "6.5.4";
+    hash = "sha256-DRbOrnbwcY5GZjj0VHqLFJJ/HY2YMiB5zWSBrd4wrJk=";
+    releaseId = "499";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aravis/default.nix b/nixpkgs/pkgs/development/libraries/aravis/default.nix
new file mode 100644
index 000000000000..8baf539b26ef
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aravis/default.nix
@@ -0,0 +1,77 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, meson
+, ninja
+, pkg-config
+, gi-docgen
+, glib
+, libxml2
+, gobject-introspection
+
+, enableGstPlugin ? true
+, enableViewer ? true
+, gst_all_1
+, gtk3
+, wrapGAppsHook
+
+, enableUsb ? true
+, libusb1
+
+, enablePacketSocket ? true
+, enableFastHeartbeat ? false
+}:
+
+assert enableGstPlugin -> gst_all_1 != null;
+assert enableViewer -> enableGstPlugin;
+assert enableViewer -> gtk3 != null;
+assert enableViewer -> wrapGAppsHook != null;
+
+stdenv.mkDerivation rec {
+  pname = "aravis";
+  version = "0.8.30";
+
+  src = fetchFromGitHub {
+    owner = "AravisProject";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-1OxvLpzEKxIXiLJIUr+hCx+sxnH9Z5dBM5Lug1acCok=";
+  };
+
+  outputs = [ "bin" "dev" "out" "lib" ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gi-docgen
+    gobject-introspection
+  ] ++ lib.optional enableViewer wrapGAppsHook;
+
+  buildInputs =
+    [ glib libxml2 ]
+    ++ lib.optional enableUsb libusb1
+    ++ lib.optionals (enableViewer || enableGstPlugin) (with gst_all_1; [ gstreamer gst-plugins-base (gst-plugins-good.override { gtkSupport = true; }) gst-plugins-bad ])
+    ++ lib.optionals (enableViewer) [ gtk3 ];
+
+  mesonFlags = [
+  ] ++ lib.optional enableFastHeartbeat "-Dfast-heartbeat=enabled"
+  ++ lib.optional (!enableGstPlugin) "-Dgst-plugin=disabled"
+  ++ lib.optional (!enableViewer) "-Dviewer=disabled"
+  ++ lib.optional (!enableUsb) "-Dviewer=disabled"
+  ++ lib.optional (!enablePacketSocket) "-Dpacket-socket=disabled";
+
+  doCheck = true;
+
+  meta = {
+    description = "Library for video acquisition using GenICam cameras";
+    longDescription = ''
+      Implements the gigabit ethernet and USB3 protocols used by industrial cameras.
+    '';
+    # the documentation is the best working homepage that's not the Github repo
+    homepage = "https://aravisproject.github.io/docs/aravis-0.8";
+    license = lib.licenses.lgpl2;
+    maintainers = with lib.maintainers; [ tpw_rules ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/arb/default.nix b/nixpkgs/pkgs/development/libraries/arb/default.nix
new file mode 100644
index 000000000000..2ab8339b00a7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/arb/default.nix
@@ -0,0 +1,41 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, mpir
+, gmp
+, mpfr
+, flint
+}:
+
+stdenv.mkDerivation rec {
+  pname = "arb";
+  version = "2.23.0";
+
+  src = fetchFromGitHub {
+    owner = "fredrik-johansson";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-dt9PZ3Xfn60rhmnxYo7CEzNTEUN/wMVAXe8U5PzUO9U=";
+  };
+
+  buildInputs = [ mpir gmp mpfr flint ];
+
+  configureFlags = [
+    "--with-gmp=${gmp}"
+    "--with-mpir=${mpir}"
+    "--with-mpfr=${mpfr}"
+    "--with-flint=${flint}"
+  ];
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "A library for arbitrary-precision interval arithmetic";
+    homepage = "https://arblib.org/";
+    license = licenses.lgpl21Plus;
+    maintainers = teams.sage.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/argp-standalone/default.nix b/nixpkgs/pkgs/development/libraries/argp-standalone/default.nix
new file mode 100644
index 000000000000..f4fc2101e72b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/argp-standalone/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, meson, ninja }:
+
+stdenv.mkDerivation rec {
+  pname = "argp-standalone";
+  version = "1.5.0";
+
+  src = fetchFromGitHub {
+    owner = "argp-standalone";
+    repo = "argp-standalone";
+    rev = version;
+    sha256 = "jWnoWVnUVDQlsC9ru7oB9PdtZuyCCNqGnMqF/f2m0ZY=";
+  };
+
+  nativeBuildInputs = [ meson ninja ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/argp-standalone/argp-standalone";
+    description = "Standalone version of arguments parsing functions from Glibc";
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ amar1729 ];
+    license = licenses.lgpl21Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/argparse/default.nix b/nixpkgs/pkgs/development/libraries/argparse/default.nix
new file mode 100644
index 000000000000..16a4f3b7a21e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/argparse/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "argparse";
+  version = "3.0";
+
+  src = fetchFromGitHub {
+    owner = "p-ranav";
+    repo = "argparse";
+    rev = "v${version}";
+    sha256 = "sha256-0fgMy7Q9BiQ/C1tmhuNpQgad8yzaLYxh5f6Ps38f2mk=";
+  };
+
+  postPatch = ''
+    substituteInPlace CMakeLists.txt \
+      --replace '$'{CMAKE_INSTALL_LIBDIR_ARCHIND} '$'{CMAKE_INSTALL_LIBDIR}
+    substituteInPlace packaging/pkgconfig.pc.in \
+      --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
+  '';
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  meta = with lib; {
+    description = "Argument Parser for Modern C++";
+    homepage    = "https://github.com/p-ranav/argparse";
+    maintainers = with maintainers; [ _2gn ];
+    platforms   = platforms.unix;
+    license = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/arguments/default.nix b/nixpkgs/pkgs/development/libraries/arguments/default.nix
new file mode 100644
index 000000000000..bacb7662386e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/arguments/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "arguments";
+  version = "unstable-2015-11-30";
+
+  owner = "BIC-MNI";
+
+  src = fetchFromGitHub {
+    inherit owner;
+    repo   = pname;
+    rev    = "b3aad97f6b6892cb8733455d0d448649a48fa108";
+    sha256 = "1ar8lm1w1jflz3vdmjr5c4x6y7rscvrj78b8gmrv79y95qrgzv6s";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ ];
+
+  #cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib" "-DBICPL_DIR=${bicpl}/lib" ];
+
+  doCheck = false;
+  # internal_volume_io.h: No such file or directory
+
+  meta = with lib; {
+    homepage = "https://github.com/${owner}/${pname}";
+    description = "Library for argument handling for MINC programs";
+    maintainers = with maintainers; [ bcdarwin ];
+    platforms = platforms.unix;
+    license   = licenses.free;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aribb25/default.nix b/nixpkgs/pkgs/development/libraries/aribb25/default.nix
new file mode 100644
index 000000000000..743850c5fdc3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aribb25/default.nix
@@ -0,0 +1,58 @@
+{ stdenv
+, lib
+, fetchFromGitLab
+, fetchpatch
+, autoreconfHook
+, pkg-config
+, pcsclite
+, PCSC
+, xcbuild
+}:
+
+stdenv.mkDerivation rec {
+  pname = "aribb25";
+  # FIXME: change the rev for fetchFromGitLab in next release
+  version = "0.2.7";
+
+  src = fetchFromGitLab {
+    domain = "code.videolan.org";
+    owner = "videolan";
+    repo = pname;
+    # rev = version; FIXME: uncomment in next release
+    rev = "c14938692b313b5ba953543fd94fd1cad0eeef18"; # 0.2.7 with build fixes
+    sha256 = "1kb9crfqib0npiyjk4zb63zqlzbhqm35nz8nafsvdjd71qbd2amp";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ] ++ lib.optional stdenv.isDarwin xcbuild;
+  buildInputs = if stdenv.isDarwin then [ PCSC ] else [ pcsclite ];
+
+  patches = let
+    url = commit: "https://code.videolan.org/videolan/${pname}/-/commit/${commit}.diff";
+  in [
+    (fetchpatch {
+      name = "make-cli-pipes-work-1.patch";
+      url = url "0425184dbf3fdaf59854af5f530da88b2196a57b";
+      sha256 = "0ysm2jivpnqxz71vw1102616qxww2gx005i0c5lhi6jbajqsa1cd";
+    })
+    (fetchpatch {
+      name = "make-cli-pipes-work-2.patch";
+      url = url "cebabeab2bda065dca1c9f033b42d391be866d86";
+      sha256 = "1283kqv1r4rbaba0sv2hphkhcxgjkmh8ndlcd24fhx43nn63hd28";
+    })
+  ];
+
+  buildFlags =
+    lib.optional stdenv.isDarwin "pcsclite_CFLAGS=-I${PCSC}/Library/Frameworks/PCSC.framework/Headers";
+
+  meta = with lib; {
+    description = "Sample implementation of the ARIB STD-B25 standard";
+    homepage = "https://code.videolan.org/videolan/aribb25";
+    license = licenses.isc;
+    maintainers = with maintainers; [ midchildan ];
+    mainProgram = "b25";
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/armadillo/default.nix b/nixpkgs/pkgs/development/libraries/armadillo/default.nix
new file mode 100644
index 000000000000..412052c2e3df
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/armadillo/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl, cmake, blas, lapack, superlu, hdf5 }:
+
+stdenv.mkDerivation rec {
+  pname = "armadillo";
+  version = "12.8.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/arma/armadillo-${version}.tar.xz";
+    hash = "sha256-qJu2/s5c6f3R0BpLwUXPfMC5OcV3fMpG3mnC9eNBLPA=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ blas lapack superlu hdf5 ];
+
+  cmakeFlags = [
+    "-DLAPACK_LIBRARY=${lapack}/lib/liblapack${stdenv.hostPlatform.extensions.sharedLibrary}"
+    "-DDETECT_HDF5=ON"
+  ];
+
+  patches = [ ./use-unix-config-on-OS-X.patch ];
+
+  meta = with lib; {
+    description = "C++ linear algebra library";
+    homepage = "https://arma.sourceforge.net";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ juliendehos knedlsepp ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/armadillo/use-unix-config-on-OS-X.patch b/nixpkgs/pkgs/development/libraries/armadillo/use-unix-config-on-OS-X.patch
new file mode 100644
index 000000000000..a1442d141193
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/armadillo/use-unix-config-on-OS-X.patch
@@ -0,0 +1,10 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -152,6 +152,7 @@ message(STATUS "DETECT_HDF5                = ${DETECT_HDF5}"               )
+
+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake_aux/Modules/")
+
++set(APPLE false)
+ if(APPLE)
+   
+   set(ARMA_OS macos)
diff --git a/nixpkgs/pkgs/development/libraries/arpa2common/default.nix b/nixpkgs/pkgs/development/libraries/arpa2common/default.nix
new file mode 100644
index 000000000000..0ada354ce1e6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/arpa2common/default.nix
@@ -0,0 +1,60 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, cmake
+
+, arpa2cm
+, doxygen
+, e2fsprogs
+, graphviz
+, lmdb
+, openssl
+, pkg-config
+, ragel
+}:
+
+stdenv.mkDerivation rec {
+  pname = "arpa2common";
+  version = "2.2.18";
+
+  src = fetchFromGitLab {
+    owner = "arpa2";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-UpAVyDXCe07ZwjD307t6G9f/Nny4QYXxGxft1KsiYYg=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    arpa2cm
+    doxygen
+    graphviz
+    pkg-config
+  ];
+
+  propagatedBuildInputs = [
+    e2fsprogs
+    lmdb
+    openssl
+    ragel
+  ];
+
+  # the project uses single argument `printf` throughout the program
+  hardeningDisable = [ "format" ];
+
+  meta = {
+    description =
+      "ARPA2 ID and ACL libraries and other core data structures for ARPA2";
+    longDescription = ''
+      The ARPA2 Common Library package offers elementary services that can
+      benefit many software packages.  They are designed to be easy to
+      include, with a minimum of dependencies.  At the same time, they were
+      designed with the InternetWide Architecture in mind, thus helping to
+      liberate users.
+    '';
+    homepage = "https://gitlab.com/arpa2/arpa2common";
+    license = with lib.licenses; [ bsd2 cc-by-sa-40 cc0 isc ];
+    maintainers = with lib.maintainers; [ fufexan ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/arrayfire/default.nix b/nixpkgs/pkgs/development/libraries/arrayfire/default.nix
new file mode 100644
index 000000000000..5c4336572b8f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/arrayfire/default.nix
@@ -0,0 +1,225 @@
+{ blas
+, boost
+, clblast
+, cmake
+, config
+, cudaPackages
+, fetchFromGitHub
+, fftw
+, fftwFloat
+, fmt_9
+, forge
+, freeimage
+, gtest
+, lapack
+, lib
+, libGL
+, mesa
+, ocl-icd
+, opencl-clhpp
+, pkg-config
+, python3
+, span-lite
+, stdenv
+  # NOTE: We disable tests by default, because they cannot be run easily on
+  # non-NixOS systems when either CUDA or OpenCL support is enabled (CUDA and
+  # OpenCL need access to drivers that are installed outside of Nix on
+  # non-NixOS systems).
+, doCheck ? false
+, cpuSupport ? true
+, cudaSupport ? config.cudaSupport
+  # OpenCL needs mesa which is broken on Darwin
+, openclSupport ? !stdenv.isDarwin
+  # This argument lets one run CUDA & OpenCL tests on non-NixOS systems by
+  # telling Nix where to find the drivers. If you know the version of the
+  # NVidia driver that is installed on your system, you can do:
+  #
+  # arrayfire.override {
+  #   nvidiaComputeDrivers =
+  #     callPackage
+  #       (prev.linuxPackages.nvidiaPackages.mkDriver {
+  #         version = cudaVersion; # our driver version
+  #         sha256_64bit = cudaHash; # sha256 of the .run binary
+  #         useGLVND = false;
+  #         useProfiles = false;
+  #         useSettings = false;
+  #         usePersistenced = false;
+  #         ...
+  #       })
+  #       { libsOnly = true; };
+  # }
+, nvidiaComputeDrivers ? null
+}:
+
+# ArrayFire compiles with 64-bit BLAS, but some tests segfault or throw
+# exceptions, which means that it isn't really supported yet...
+assert blas.isILP64 == false;
+
+stdenv.mkDerivation rec {
+  pname = "arrayfire";
+  version = "3.9.0";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = "v3.9.0";
+    hash = "sha256-80fxdkaeAQ5u0X/UGPaI/900cdkZ/vXNcOn5tkZ+C3Y=";
+  };
+
+  # We cannot use the clfft from Nixpkgs because ArrayFire maintain a fork
+  # of clfft where they've modified the CMake build system, and the
+  # CMakeLists.txt of ArrayFire assumes that we're using that fork.
+  #
+  # This can be removed once ArrayFire upstream their changes.
+  clfft = fetchFromGitHub {
+    owner = pname;
+    repo = "clfft";
+    rev = "760096b37dcc4f18ccd1aac53f3501a83b83449c";
+    sha256 = "sha256-vJo1YfC2AJIbbRj/zTfcOUmi0Oj9v64NfA9MfK8ecoY=";
+  };
+  glad = fetchFromGitHub {
+    owner = pname;
+    repo = "glad";
+    rev = "ef8c5508e72456b714820c98e034d9a55b970650";
+    sha256 = "sha256-u9Vec7XLhE3xW9vzM7uuf+b18wZsh/VMtGbB6nMVlno=";
+  };
+  threads = fetchFromGitHub {
+    owner = pname;
+    repo = "threads";
+    rev = "4d4a4f0384d1ac2f25b2c4fc1d57b9e25f4d6818";
+    sha256 = "sha256-qqsT9woJDtQvzuV323OYXm68pExygYs/+zZNmg2sN34=";
+  };
+  test-data = fetchFromGitHub {
+    owner = pname;
+    repo = "arrayfire-data";
+    rev = "a5f533d7b864a4d8f0dd7c9aaad5ff06018c4867";
+    sha256 = "sha256-AWzhsrDXyZrQN2bd0Ng/XlE8v02x7QWTiFTyaAuRXSw=";
+  };
+  # ArrayFire fails to compile with newer versions of spdlog, so we can't use
+  # the one in Nixpkgs. Once they upgrade, we can switch to using spdlog from
+  # Nixpkgs.
+  spdlog = fetchFromGitHub {
+    owner = "gabime";
+    repo = "spdlog";
+    rev = "v1.9.2";
+    hash = "sha256-GSUdHtvV/97RyDKy8i+ticnSlQCubGGWHg4Oo+YAr8Y=";
+  };
+
+  cmakeFlags = [
+    "-DBUILD_TESTING=ON"
+    # We do not build examples, because building tests already takes long enough...
+    "-DAF_BUILD_EXAMPLES=OFF"
+    # No need to build forge, because it's a separate package
+    "-DAF_BUILD_FORGE=OFF"
+    "-DAF_COMPUTE_LIBRARY='FFTW/LAPACK/BLAS'"
+    # Prevent ArrayFire from trying to download some matrices from the Internet
+    "-DAF_TEST_WITH_MTX_FILES=OFF"
+    # Have to use the header-only version, because we're not using the version
+    # from Nixpkgs. Otherwise, libaf.so won't be able to find the shared
+    # library, because ArrayFire's CMake files do not run the install step of
+    # spdlog.
+    "-DAF_WITH_SPDLOG_HEADER_ONLY=ON"
+    (if cpuSupport then "-DAF_BUILD_CPU=ON" else "-DAF_BUILD_CPU=OFF")
+    (if openclSupport then "-DAF_BUILD_OPENCL=ON" else "-DAF_BUILD_OPENCL=OFF")
+    (if cudaSupport then "-DAF_BUILD_CUDA=ON" else "-DAF_BUILD_CUDA=OFF")
+  ] ++ lib.optionals cudaSupport [
+    # ArrayFire use deprecated FindCUDA in their CMake files, so we help CMake
+    # locate cudatoolkit.
+    "-DCUDA_LIBRARIES_PATH=${cudaPackages.cudatoolkit}/lib"
+  ];
+
+  # ArrayFire have a repo with assets for the examples. Since we don't build
+  # the examples anyway, remove the dependency on assets.
+  patches = [ ./no-assets.patch ./no-download.patch ];
+
+  postPatch = ''
+    mkdir -p ./extern/af_glad-src
+    mkdir -p ./extern/af_threads-src
+    mkdir -p ./extern/af_test_data-src
+    mkdir -p ./extern/ocl_clfft-src
+    mkdir -p ./extern/spdlog-src
+    cp -R --no-preserve=mode,ownership ${glad}/* ./extern/af_glad-src/
+    cp -R --no-preserve=mode,ownership ${threads}/* ./extern/af_threads-src/
+    cp -R --no-preserve=mode,ownership ${test-data}/* ./extern/af_test_data-src/
+    cp -R --no-preserve=mode,ownership ${clfft}/* ./extern/ocl_clfft-src/
+    cp -R --no-preserve=mode,ownership ${spdlog}/* ./extern/spdlog-src/
+
+    # libaf.so (the unified backend) tries to load the right shared library at
+    # runtime, and the search paths are hard-coded... We tweak them to point to
+    # the installation directory in the Nix store.
+    substituteInPlace src/api/unified/symbol_manager.cpp \
+      --replace '"/opt/arrayfire-3/lib/",' \
+                "\"$out/lib/\", \"/opt/arrayfire-3/lib/\","
+  '';
+
+  inherit doCheck;
+  checkPhase =
+    let
+      LD_LIBRARY_PATH = builtins.concatStringsSep ":" (
+        [ "${forge}/lib" "${freeimage}/lib" ]
+        ++ lib.optional cudaSupport "${cudaPackages.cudatoolkit}/lib64"
+        # On non-NixOS systems, help the tests find Nvidia drivers
+        ++ lib.optional (nvidiaComputeDrivers != null) "${nvidiaComputeDrivers}/lib"
+      );
+      ctestFlags = builtins.concatStringsSep " " (
+        # We have to run with "-j1" otherwise various segfaults occur on non-NixOS systems.
+        [ "--output-on-errors" "-j1" ]
+        # See https://github.com/arrayfire/arrayfire/issues/3484
+        ++ lib.optional openclSupport "-E '(inverse_dense|cholesky_dense)'"
+      );
+    in
+    ''
+      export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
+    '' +
+    # On non-NixOS systems, help the tests find Nvidia drivers
+    lib.optionalString (openclSupport && nvidiaComputeDrivers != null) ''
+      export OCL_ICD_VENDORS=${nvidiaComputeDrivers}/etc/OpenCL/vendors
+    '' + ''
+      # Note: for debugging, enable AF_TRACE=all
+      AF_PRINT_ERRORS=1 ctest ${ctestFlags}
+    '';
+
+  buildInputs = [
+    blas
+    boost.dev
+    boost.out
+    clblast
+    fftw
+    fftwFloat
+    # We need fmt_9 because ArrayFire fails to compile with newer versions.
+    fmt_9
+    forge
+    freeimage
+    gtest
+    lapack
+    libGL
+    ocl-icd
+    opencl-clhpp
+    span-lite
+  ]
+  ++ lib.optionals cudaSupport [
+    cudaPackages.cudatoolkit
+    cudaPackages.cudnn
+    cudaPackages.cuda_cccl
+  ]
+  ++ lib.optionals openclSupport [
+    mesa
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    python3
+  ];
+
+  meta = with lib; {
+    description = "A general-purpose library for parallel and massively-parallel computations";
+    longDescription = ''
+      A general-purpose library that simplifies the process of developing software that targets parallel and massively-parallel architectures including CPUs, GPUs, and other hardware acceleration devices.";
+    '';
+    license = licenses.bsd3;
+    homepage = "https://arrayfire.com/";
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ chessai twesterhout ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/arrayfire/no-assets.patch b/nixpkgs/pkgs/development/libraries/arrayfire/no-assets.patch
new file mode 100644
index 000000000000..b8820f8aa55b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/arrayfire/no-assets.patch
@@ -0,0 +1,35 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 12d6e557c..cc004555d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -321,11 +321,6 @@ if(NOT TARGET nonstd::span-lite)
+ 
+ endif()
+ 
+-af_dep_check_and_populate(${assets_prefix}
+-  URI https://github.com/arrayfire/assets.git
+-  REF master
+-)
+-set(ASSETS_DIR ${${assets_prefix}_SOURCE_DIR})
+ 
+ # when crosscompiling use the bin2cpp file from the native bin directory
+ if(CMAKE_CROSSCOMPILING)
+@@ -473,18 +468,6 @@ install(FILES ${ArrayFire_BINARY_DIR}/include/af/version.h
+         DESTINATION "${AF_INSTALL_INC_DIR}/af/"
+         COMPONENT headers)
+ 
+-# install the examples irrespective of the AF_BUILD_EXAMPLES value
+-# only the examples source files are installed, so the installation of these
+-# source files does not depend on AF_BUILD_EXAMPLES
+-# when AF_BUILD_EXAMPLES is OFF, the examples source is installed without
+-# building the example executables
+-install(DIRECTORY examples/ #NOTE The slash at the end is important
+-    DESTINATION ${AF_INSTALL_EXAMPLE_DIR}
+-    COMPONENT examples)
+-
+-install(DIRECTORY ${ASSETS_DIR}/examples/ #NOTE The slash at the end is important
+-    DESTINATION ${AF_INSTALL_EXAMPLE_DIR}
+-    COMPONENT examples)
+ 
+ install(DIRECTORY "${ArrayFire_SOURCE_DIR}/LICENSES/"
+     DESTINATION LICENSES
diff --git a/nixpkgs/pkgs/development/libraries/arrayfire/no-download.patch b/nixpkgs/pkgs/development/libraries/arrayfire/no-download.patch
new file mode 100644
index 000000000000..f7903e74112d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/arrayfire/no-download.patch
@@ -0,0 +1,31 @@
+diff --git a/CMakeModules/AFconfigure_deps_vars.cmake b/CMakeModules/AFconfigure_deps_vars.cmake
+index aac332f5a..e9e711159 100644
+--- a/CMakeModules/AFconfigure_deps_vars.cmake
++++ b/CMakeModules/AFconfigure_deps_vars.cmake
+@@ -94,7 +94,7 @@ macro(af_dep_check_and_populate dep_prefix)
+         URL            ${adcp_args_URI}
+         URL_HASH       ${adcp_args_REF}
+         DOWNLOAD_COMMAND \"\"
+-        UPDATE_DISCONNECTED ON
++        UPDATE_COMMAND \"\"
+         SOURCE_DIR     "${ArrayFire_SOURCE_DIR}/extern/${dep_prefix}-src"
+         BINARY_DIR     "${ArrayFire_BINARY_DIR}/extern/${dep_prefix}-build"
+         SUBBUILD_DIR   "${ArrayFire_BINARY_DIR}/extern/${dep_prefix}-subbuild"
+@@ -104,7 +104,7 @@ macro(af_dep_check_and_populate dep_prefix)
+         QUIET
+         URL            ${adcp_args_URI}
+         DOWNLOAD_COMMAND \"\"
+-        UPDATE_DISCONNECTED ON
++        UPDATE_COMMAND \"\"
+         SOURCE_DIR     "${ArrayFire_SOURCE_DIR}/extern/${dep_prefix}-src"
+         BINARY_DIR     "${ArrayFire_BINARY_DIR}/extern/${dep_prefix}-build"
+         SUBBUILD_DIR   "${ArrayFire_BINARY_DIR}/extern/${dep_prefix}-subbuild"
+@@ -116,7 +116,7 @@ macro(af_dep_check_and_populate dep_prefix)
+         GIT_REPOSITORY ${adcp_args_URI}
+         GIT_TAG        ${adcp_args_REF}
+         DOWNLOAD_COMMAND \"\"
+-        UPDATE_DISCONNECTED ON
++        UPDATE_COMMAND \"\"
+         SOURCE_DIR     "${ArrayFire_SOURCE_DIR}/extern/${dep_prefix}-src"
+         BINARY_DIR     "${ArrayFire_BINARY_DIR}/extern/${dep_prefix}-build"
+         SUBBUILD_DIR   "${ArrayFire_BINARY_DIR}/extern/${dep_prefix}-subbuild"
diff --git a/nixpkgs/pkgs/development/libraries/arrow-glib/default.nix b/nixpkgs/pkgs/development/libraries/arrow-glib/default.nix
new file mode 100644
index 000000000000..2e283d3c52ef
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/arrow-glib/default.nix
@@ -0,0 +1,35 @@
+{ stdenv
+, arrow-cpp
+, fetchurl
+, glib
+, gobject-introspection
+, lib
+, meson
+, ninja
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "arrow-glib";
+  inherit (arrow-cpp) src version;
+  sourceRoot = "apache-arrow-${version}/c_glib";
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gobject-introspection
+  ];
+
+  buildInputs = [
+    arrow-cpp
+    glib
+  ];
+
+  meta = with lib; {
+    inherit (arrow-cpp.meta) license platforms;
+    description = "GLib bindings for Apache Arrow";
+    homepage = "https://arrow.apache.org/docs/c_glib/";
+    maintainers = with maintainers; [ amarshall ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/asio/1.10.nix b/nixpkgs/pkgs/development/libraries/asio/1.10.nix
new file mode 100644
index 000000000000..f63fbbd495cb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/asio/1.10.nix
@@ -0,0 +1,6 @@
+{callPackage, ... } @ args:
+
+callPackage ./generic.nix (args // {
+  version = "1.10.8";
+  sha256 = "0jgdl4fxw0hwy768rl3lhdc0czz7ak7czf3dg10j21pdpfpfvpi6";
+})
diff --git a/nixpkgs/pkgs/development/libraries/asio/default.nix b/nixpkgs/pkgs/development/libraries/asio/default.nix
new file mode 100644
index 000000000000..4df73c752e5d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/asio/default.nix
@@ -0,0 +1,6 @@
+{callPackage, ... } @ args:
+
+callPackage ./generic.nix (args // {
+  version = "1.24.0";
+  sha256 = "sha256-iXaBLCShGGAPb88HGiBgZjCmmv5MCr7jsN6lKOaCxYU=";
+})
diff --git a/nixpkgs/pkgs/development/libraries/asio/generic.nix b/nixpkgs/pkgs/development/libraries/asio/generic.nix
new file mode 100644
index 000000000000..cb9f1eb30246
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/asio/generic.nix
@@ -0,0 +1,25 @@
+{lib, stdenv, fetchurl, boost, openssl
+, version, sha256, ...
+}:
+
+stdenv.mkDerivation {
+  pname = "asio";
+  inherit version;
+
+  src = fetchurl {
+    url = "mirror://sourceforge/asio/asio-${version}.tar.bz2";
+    inherit sha256;
+  };
+
+  propagatedBuildInputs = [ boost ];
+
+  buildInputs = [ openssl ];
+
+  meta = with lib; {
+    homepage = "http://asio.sourceforge.net/";
+    description = "Cross-platform C++ library for network and low-level I/O programming";
+    license = licenses.boost;
+    broken = stdenv.isDarwin && lib.versionOlder version "1.16.1";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/asmjit/default.nix b/nixpkgs/pkgs/development/libraries/asmjit/default.nix
new file mode 100644
index 000000000000..7edc7c666a9c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/asmjit/default.nix
@@ -0,0 +1,38 @@
+{ stdenv
+, fetchFromGitHub
+, cmake
+, ninja
+, lib
+}:
+
+stdenv.mkDerivation {
+  pname = "asmjit";
+  version = "unstable-2023-04-28";
+
+  src = fetchFromGitHub {
+    owner = "asmjit";
+    repo = "asmjit";
+    rev = "3577608cab0bc509f856ebf6e41b2f9d9f71acc4";
+    hash = "sha256-EIfSruaM2Z64XOYAeEaf/wFy6/7UO6Sth487R1Q0yhI=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    ninja
+  ];
+
+  strictDeps = true;
+
+  meta = with lib; {
+    description = "Machine code generation for C++";
+    longDescription = ''
+      AsmJit is a lightweight library for machine code generation written in
+      C++ language. It can generate machine code for X86, X86_64, and AArch64
+      architectures and supports baseline instructions and all recent
+      extensions.
+    '';
+    homepage = "https://asmjit.com/";
+    license = licenses.zlib;
+    maintainers = with maintainers; [ nikstur ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aspell/aspell-with-dicts.nix b/nixpkgs/pkgs/development/libraries/aspell/aspell-with-dicts.nix
new file mode 100644
index 000000000000..fae94dbf08d2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aspell/aspell-with-dicts.nix
@@ -0,0 +1,36 @@
+# Create a derivation that contains aspell and selected dictionaries.
+# Composition is done using `pkgs.buildEnv`.
+# Beware of that `ASPELL_CONF` used by this derivation is not always
+# respected by libaspell (#28815) and in some cases, when used as
+# dependency by another derivation, the passed dictionaries will be
+# missing. However, invoking aspell directly should be fine.
+
+{ aspell
+, aspellDicts
+, makeWrapper
+, buildEnv
+}:
+
+f:
+
+let
+  # Dictionaries we want
+  dicts = f aspellDicts;
+
+in buildEnv {
+  name = "aspell-env";
+  nativeBuildInputs = [ makeWrapper ];
+  paths = [ aspell ] ++ dicts;
+  postBuild = ''
+    # Construct wrappers in /bin
+    unlink "$out/bin"
+    mkdir -p "$out/bin"
+    pushd "${aspell}/bin"
+    for prg in *; do
+      if [ -f "$prg" ]; then
+        makeWrapper "${aspell}/bin/$prg" "$out/bin/$prg" --set ASPELL_CONF "dict-dir $out/lib/aspell"
+      fi
+    done
+    popd
+  '';
+}
diff --git a/nixpkgs/pkgs/development/libraries/aspell/clang.patch b/nixpkgs/pkgs/development/libraries/aspell/clang.patch
new file mode 100644
index 000000000000..c4cfa426588c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aspell/clang.patch
@@ -0,0 +1,18 @@
+--- interfaces/cc/aspell.h	2013-10-13 20:29:33.000000000 +0200
++++ interfaces/cc/aspell.h	2013-10-13 20:30:01.000000000 +0200
+@@ -237,6 +237,7 @@
+ /******************************** errors ********************************/
+ 
+ 
++#ifndef __cplusplus
+ extern const struct AspellErrorInfo * const aerror_other;
+ extern const struct AspellErrorInfo * const aerror_operation_not_supported;
+ extern const struct AspellErrorInfo * const   aerror_cant_copy;
+@@ -322,6 +323,7 @@
+ extern const struct AspellErrorInfo * const   aerror_bad_magic;
+ extern const struct AspellErrorInfo * const aerror_expression;
+ extern const struct AspellErrorInfo * const   aerror_invalid_expression;
++#endif
+ 
+ 
+ /******************************* speller *******************************/
diff --git a/nixpkgs/pkgs/development/libraries/aspell/data-dirs-from-nix-profiles.patch b/nixpkgs/pkgs/development/libraries/aspell/data-dirs-from-nix-profiles.patch
new file mode 100644
index 000000000000..c19827ba93e4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aspell/data-dirs-from-nix-profiles.patch
@@ -0,0 +1,38 @@
+diff --git a/common/info.cpp b/common/info.cpp
+index 8291cc7..6216326 100644
+--- a/common/info.cpp
++++ b/common/info.cpp
+@@ -36,6 +36,7 @@
+ #include "strtonum.hpp"
+ #include "lock.hpp"
+ #include "string_map.hpp"
++#include "file_util.hpp"
+ 
+ #include "gettext.h"
+ 
+@@ -495,6 +496,25 @@ namespace acommon {
+     lst.clear();
+     lst.add(config->retrieve("data-dir"));
+     lst.add(config->retrieve("dict-dir"));
++    if (config->lookup("data-dir") == NULL && config->lookup("dict-dir") == NULL) {
++        const char* cprofiles = getenv("NIX_PROFILES");
++        if (cprofiles != NULL) {
++            char* profiles = strdup(cprofiles);
++            char* profile = profiles;
++            char* end = profile;
++            while (*end != '\0') {
++                if (*end == ' ') {
++                    *end = '\0';
++                    lst.add(add_possible_dir(profile, "lib/aspell"));
++                    profile = ++end;
++                } else {
++                    ++end;
++                }
++            }
++            lst.add(add_possible_dir(profile, "lib/aspell"));
++            free(profiles);
++        }
++    }
+   }
+ 
+   DictExt::DictExt(ModuleInfo * m, const char * e)
diff --git a/nixpkgs/pkgs/development/libraries/aspell/default.nix b/nixpkgs/pkgs/development/libraries/aspell/default.nix
new file mode 100644
index 000000000000..8c152d32ef6c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aspell/default.nix
@@ -0,0 +1,75 @@
+{ lib, stdenv, fetchurl, fetchzip, perl, ncurses
+
+  # for tests
+, aspell, glibc, runCommand
+
+, searchNixProfiles ? true
+}:
+
+let
+
+  # Source for u-deva.cmap and u-deva.cset: use the Marathi
+  # dictionary like Debian does.
+  devaMapsSource = fetchzip {
+    name = "aspell-u-deva";
+    url = "https://ftp.gnu.org/gnu/aspell/dict/mr/aspell6-mr-0.10-0.tar.bz2";
+    sha256 = "1v8cdl8x2j1d4vbvsq1xrqys69bbccd6mi03fywrhkrrljviyri1";
+  };
+
+in
+
+stdenv.mkDerivation rec {
+  pname = "aspell";
+  version = "0.60.8.1";
+
+  src = fetchurl {
+    url = "mirror://gnu/aspell/aspell-${version}.tar.gz";
+    hash = "sha256-1toSs01C1Ff6YE5DWtSEp0su/80SD/QKzWuz+yiH0hs=";
+  };
+
+  patches = lib.optional searchNixProfiles ./data-dirs-from-nix-profiles.patch;
+
+  postPatch = ''
+    patch interfaces/cc/aspell.h < ${./clang.patch}
+  '';
+
+  nativeBuildInputs = [ perl ];
+  buildInputs = [ ncurses perl ];
+
+  doCheck = true;
+
+  preConfigure = ''
+    configureFlagsArray=(
+      --enable-pkglibdir=$out/lib/aspell
+      --enable-pkgdatadir=$out/lib/aspell
+    );
+  '';
+
+  # Include u-deva.cmap and u-deva.cset in the aspell package
+  # to avoid conflict between 'mr' and 'hi' dictionaries as they
+  # both include those files.
+  postInstall = ''
+    cp ${devaMapsSource}/u-deva.{cmap,cset} $out/lib/aspell/
+  '';
+
+  passthru.tests = {
+    uses-curses = runCommand "${pname}-curses" {
+      buildInputs = [ glibc ];
+    } ''
+      if ! ldd ${aspell}/bin/aspell | grep -q ${ncurses}
+      then
+        echo "Test failure: It does not look like aspell picked up the curses dependency."
+        exit 1
+      fi
+      touch $out
+    '';
+  };
+
+  meta = {
+    description = "Spell checker for many languages";
+    homepage = "http://aspell.net/";
+    license = lib.licenses.lgpl2Plus;
+    maintainers = [ ];
+    platforms = with lib.platforms; all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aspell/dictionaries.nix b/nixpkgs/pkgs/development/libraries/aspell/dictionaries.nix
new file mode 100644
index 000000000000..ea8a2133c82b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aspell/dictionaries.nix
@@ -0,0 +1,972 @@
+{lib, stdenv, fetchurl, aspell, which, writeScript}:
+
+/* HOWTO:
+
+   * Add some of these to your profile or systemPackages.
+
+     ~~~~
+     environment.systemPackages = [
+       aspell
+       aspellDicts.en
+       aspellDicts.en-computers
+       aspellDicts.en-science
+     ];
+     ~~~~
+
+   * Rebuild and switch to the new profile.
+   * Add something like
+
+     ~~~~
+     master en_US
+     extra-dicts en-computers.rws
+     add-extra-dicts en_US-science.rws
+     ~~~~
+
+     to `/etc/aspell.conf` or `~/.aspell.conf`.
+   * Check that `aspell -a` starts without errors.
+   * (optional) Check your config with `aspell dump config | grep -vE '^(#|$)'`.
+   * Enjoy.
+
+*/
+
+let
+
+  /* Function to compile an Aspell dictionary.  Fortunately, they all
+     build in the exact same way. */
+  buildDict =
+    {shortName, fullName, ...}@args:
+
+    stdenv.mkDerivation ({
+      name = "aspell-dict-${shortName}";
+
+      strictDeps = true;
+
+      nativeBuildInputs = [ aspell which ];
+
+      dontAddPrefix = true;
+
+      configurePlatforms = [ ];
+
+      preBuild = "makeFlagsArray=(dictdir=$out/lib/aspell datadir=$out/lib/aspell)";
+
+      meta = {
+        description = "Aspell dictionary for ${fullName}";
+        platforms = lib.platforms.all;
+      } // (args.meta or {});
+    } // removeAttrs args [ "meta" ]);
+
+
+  buildOfficialDict =
+    {language, version, filename, fullName, sha256, ...}@args:
+    let buildArgs = {
+      shortName = "${language}-${version}";
+
+      src = fetchurl {
+        url = "mirror://gnu/aspell/dict/${language}/${filename}-${language}-${version}.tar.bz2";
+        inherit sha256;
+      };
+
+      /* Remove any instances of u-deva.cmap and u-deva.cset since
+         they are included in the main aspell package and can
+         cause conflicts otherwise. */
+      postInstall = ''
+        rm -f $out/lib/aspell/u-deva.{cmap,cset}
+      '';
+
+      passthru.updateScript = writeScript "update-aspellDict-${language}" ''
+        #!/usr/bin/env nix-shell
+        #!nix-shell -i bash -p nix curl gnused common-updater-scripts
+        set -eu -o pipefail
+
+        # List tarballs in the dictionary's subdirectory via HTTPS and
+        # the simple list method of Apache's mod_autoindex.
+        #
+        # Catalan dictionary has an exception where an earlier version
+        # compares as newer because the versioning scheme has changed.
+        versions=$(
+            echo '[';
+            curl -s 'https://ftp.gnu.org/gnu/aspell/dict/${language}/?F=0' | \
+                sed -r 's/.* href="${filename}-${language}-([A-Za-z0-9_+.-]+)\.tar\.bz2".*/"\1"/;t;d' | \
+                if [ '${language}' = "ca" ]; then grep -v 20040130-1; else cat; fi; \
+            echo ']')
+
+        # Sort versions in descending order using Nix's and take the first as the latest.
+        sortVersions="(with builtins; head (sort (a: b: compareVersions a b > 0) $versions))"
+        # nix-instantiate outputs Nix strings (with quotes), so remove them to get
+        # a result similar to `nix eval --raw`.
+        latestVersion=$(nix-instantiate --eval --expr "$sortVersions" | tr -d '"')
+
+        update-source-version aspellDicts.${language} "$latestVersion"
+      '';
+
+      meta = {
+        homepage = "http://ftp.gnu.org/gnu/aspell/dict/0index.html";
+      } // (args.meta or {});
+
+    } // lib.optionalAttrs (stdenv.isDarwin && lib.elem language [ "is" "nb" ]) {
+      # tar: Cannot open: Illegal byte sequence
+      unpackPhase = ''
+        runHook preUnpack
+
+        tar -xf $src --strip-components=1 || true
+
+        runHook postUnpack
+      '';
+
+      postPatch = lib.getAttr language {
+        is = ''
+          cp icelandic.alias íslenska.alias
+          sed -i 's/ .slenska\.alias/ íslenska.alias/g' Makefile.pre
+        '';
+        nb = ''
+          cp bokmal.alias bokmål.alias
+          sed -i 's/ bokm.l\.alias/ bokmål.alias/g' Makefile.pre
+        '';
+      };
+    } // removeAttrs args [ "language" "filename" "sha256" "meta" ];
+    in buildDict buildArgs;
+
+  /* Function to compile txt dict files into Aspell dictionaries. */
+  buildTxtDict =
+    {langInputs ? [], ...}@args:
+    buildDict ({
+      propagatedUserEnvPackages = langInputs;
+
+      preBuild = ''
+        # Aspell can't handle multiple data-dirs
+        # Copy everything we might possibly need
+        ${lib.concatMapStringsSep "\n" (p: ''
+          cp -a ${p}/lib/aspell/* .
+        '') ([ aspell ] ++ langInputs)}
+        export ASPELL_CONF="data-dir $(pwd)"
+
+        aspell-create() {
+          target=$1
+          shift
+          echo building $target
+          aspell create "$@" master ./$target.rws
+        }
+
+        words-only() {
+          awk -F'\t' '{print $1}' | sort | uniq
+        }
+
+        # drop comments
+        aspell-affix() {
+          words-only \
+            | grep -a -v '#' \
+            | aspell-create "$@"
+        }
+
+        # Hack: drop comments and words with affixes
+        aspell-plain() {
+          words-only \
+            | grep -a -v '#' \
+            | grep -a -v '/' \
+            | aspell-create "$@"
+        }
+
+        aspell-install() {
+          install -d $out/lib/aspell
+          for a in "$@"; do
+            echo installing $a
+            install -t $out/lib/aspell $a.rws
+          done
+        }
+      '';
+
+      dontUnpack = true;
+    } // args);
+
+in rec {
+
+  ### Languages
+
+  af = buildOfficialDict {
+    language = "af";
+    version = "0.50-0";
+    fullName = "Afrikaans";
+    filename = "aspell";
+    sha256 = "00p6k2ndi0gzfr5fkbvx4hkcpj223pidjvmxg0r384arrap00q4x";
+  };
+
+  am = buildOfficialDict {
+    language = "am";
+    version = "0.03-1";
+    fullName = "Amharic";
+    filename = "aspell6";
+    sha256 = "11ylp7gjq94wfacyawvp391lsq26rl1b84f268rjn7l7z0hxs9xz";
+  };
+
+  ar = buildOfficialDict {
+    language = "ar";
+    version = "1.2-0";
+    fullName = "Arabic";
+    filename = "aspell6";
+    sha256 = "1avw40bp8yi5bnkq64ihm2rldgw34lk89yz281q9bmndh95a47h4";
+  };
+
+  ast = buildOfficialDict {
+    language = "ast";
+    version = "0.01";
+    fullName = "Asturian";
+    filename = "aspell6";
+    sha256 = "14hg85mxcyvdigf96yvslk7f3v9ngdsxn85qpgwkg31k3k83xwj3";
+  };
+
+  az = buildOfficialDict {
+    language = "az";
+    version = "0.02-0";
+    fullName = "Azerbaijani";
+    filename = "aspell6";
+    sha256 = "1hs4h1jscpxf9f9iyk6mvjqsnhkf0yslkbjhjkasqqcx8pn7cc86";
+  };
+
+  be = buildOfficialDict {
+    language = "be";
+    version = "0.01";
+    fullName = "Belarusian";
+    filename = "aspell5";
+    sha256 = "1svls9p7rsfi3hs0afh0cssj006qb4v1ik2yzqgj8hm10c6as2sm";
+  };
+
+  bg = buildOfficialDict {
+    language = "bg";
+    version = "4.1-0";
+    fullName = "Bulgarian";
+    filename = "aspell6";
+    sha256 = "1alacmgpfk0yrgq83y23d16fhav1bxmb98kg8d2a5r9bvh2h0mvl";
+  };
+
+  bn = buildOfficialDict {
+    language = "bn";
+    version = "0.01.1-1";
+    fullName = "Bengali";
+    filename = "aspell6";
+    sha256 = "1nc02jd67iggirwxnhdvlvaqm0xfyks35c4psszzj3dhzv29qgxh";
+  };
+
+  br = buildOfficialDict {
+    language = "br";
+    version = "0.50-2";
+    fullName = "Breton";
+    filename = "aspell";
+    sha256 = "0fradnm8424bkq9a9zhpl2132dk7y95xmw45sy1c0lx6rinjl4n2";
+  };
+
+  ca = buildOfficialDict {
+    language = "ca";
+    version = "2.1.5-1";
+    fullName = "Catalan";
+    filename = "aspell6";
+    sha256 = "1fb5y5kgvk25nlsfvc8cai978hg66x3pbp9py56pldc7vxzf9npb";
+  };
+
+  cs = buildOfficialDict {
+    language = "cs";
+    version = "20040614-1";
+    fullName = "Czech";
+    filename = "aspell6";
+    sha256 = "0rihj4hsw96pd9casvmpvw3r8040pfa28p1h73x4vyn20zwr3h01";
+  };
+
+  csb = buildOfficialDict {
+    language = "csb";
+    version = "0.02-0";
+    fullName = "Kashubian";
+    filename = "aspell6";
+    sha256 = "1612ypkm684wjvc7n081i87mlrrzif9simc7kyn177hfsl3ssrn1";
+  };
+
+  cy = buildOfficialDict {
+    language = "cy";
+    version = "0.50-3";
+    fullName = "Welsh";
+    filename = "aspell";
+    sha256 = "15vq601lzz1gi311xym4bv9lv1k21xcfn50jmzamw7h6f36rsffm";
+  };
+
+  da = buildOfficialDict {
+    language = "da";
+    version = "1.4.42-1";
+    fullName = "Danish";
+    filename = "aspell5";
+    sha256 = "1hfkmiyhgrx5lgrb2mffjbdn1hivrm73wcg7x0iid74p2yb0fjpp";
+  };
+
+  de = buildOfficialDict {
+    language = "de";
+    version = "20161207-7-0";
+    fullName = "German";
+    filename = "aspell6";
+    sha256 = "0wamclvp66xfmv5wff96v6gdlnfv4y8lx3f8wvxyzm5imwgms4n2";
+  };
+
+  de-alt = buildOfficialDict {
+    language = "de-alt";
+    version = "2.1-1";
+    fullName = "German - Old Spelling";
+    filename = "aspell6";
+    sha256 = "0wwc2l29svv3fv041fh6vfa5m3hi9q9pkbxibzq1ysrsfin3rl9n";
+  };
+
+  el = buildOfficialDict {
+    language = "el";
+    version = "0.08-0";
+    fullName = "Greek";
+    filename = "aspell6";
+    sha256 = "1ljcc30zg2v2h3w5h5jr5im41mw8jbsgvvhdd2cii2yzi8d0zxja";
+  };
+
+  en = buildOfficialDict {
+    language = "en";
+    version = "2020.12.07-0";
+    fullName = "English";
+    filename = "aspell6";
+    sha256 = "1cwzqkm8gr1w51rpckwlvb43sb0b5nbwy7s8ns5vi250515773sc";
+  };
+
+  eo = buildOfficialDict {
+    language = "eo";
+    version = "2.1.20000225a-2";
+    fullName = "Esperanto";
+    filename = "aspell6";
+    sha256 = "09vf0mbiicbmyb4bwb7v7lgpabnylg0wy7m3hlhl5rjdda6x3lj1";
+  };
+
+  es = buildOfficialDict {
+    language = "es";
+    version = "1.11-2";
+    fullName = "Spanish";
+    filename = "aspell6";
+    sha256 = "1k5g328ac1hdpp6fsg57d8md6i0aqcwlszp3gbmp5706wyhpydmd";
+  };
+
+  et = buildOfficialDict {
+    language = "et";
+    version = "0.1.21-1";
+    fullName = "Estonian";
+    filename = "aspell6";
+    sha256 = "0jdjfa2fskirhnb70fy86xryp9r6gkl729ib8qcjmsma7nm5gs5i";
+  };
+
+  fa = buildOfficialDict {
+    language = "fa";
+    version = "0.11-0";
+    fullName = "Persian";
+    filename = "aspell6";
+    sha256 = "0nz1ybwv56q7nl9ip12hfmdch1vyyq2j55bkjcns13lshzm2cba8";
+  };
+
+  fi = buildOfficialDict {
+    language = "fi";
+    version = "0.7-0";
+    fullName = "Finnish";
+    filename = "aspell6";
+    sha256 = "07d5s08ba4dd89cmwy9icc01i6fjdykxlb9ravmhdrhi8mxz1mzq";
+  };
+
+  fo = buildOfficialDict {
+    language = "fo";
+    version = "0.2.16-1";
+    fullName = "Faroese";
+    filename = "aspell5";
+    sha256 = "022yz5lll20xrzizcyb7wksm3fgwklnvgnir5la5qkxv770dvq7p";
+  };
+
+  fr = buildOfficialDict {
+    language = "fr";
+    version = "0.50-3";
+    fullName = "French";
+    filename = "aspell";
+    sha256 = "14ffy9mn5jqqpp437kannc3559bfdrpk7r36ljkzjalxa53i0hpr";
+  };
+
+  fy = buildOfficialDict {
+    language = "fy";
+    version = "0.12-0";
+    fullName = "Frisian";
+    filename = "aspell6";
+    sha256 = "1almi6n4ni91d0rzrk8ig0473m9ypbwqmg56hchz76j51slwyirl";
+  };
+
+  ga = buildOfficialDict {
+    language = "ga";
+    version = "4.5-0";
+    fullName = "Irish";
+    filename = "aspell5";
+    sha256 = "0y869mmvfb3bzadfgajwa2rfb0xfhi6m9ydwgxkb9v2claydnps5";
+  };
+
+  gd = buildOfficialDict {
+    language = "gd";
+    version = "0.1.1-1";
+    fullName = "Scottish Gaelic";
+    filename = "aspell5";
+    sha256 = "0a89irv5d65j5m9sb0k36851x5rs0wij12gb2m6hv2nsfn5a05p3";
+  };
+
+  gl = buildOfficialDict {
+    language = "gl";
+    version = "0.5a-2";
+    fullName = "Galician";
+    filename = "aspell6";
+    sha256 = "12pwghmy18fcdvf9hvhb4q6shi339hb1kwxpkz0bhw0yjxjwzkdk";
+  };
+
+  grc = buildOfficialDict {
+    language = "grc";
+    version = "0.02-0";
+    fullName = "Ancient Greek";
+    filename = "aspell6";
+    sha256 = "1zxr8958v37v260fkqd4pg37ns5h5kyqm54hn1hg70wq5cz8h512";
+  };
+
+  gu = buildOfficialDict {
+    language = "gu";
+    version = "0.03-0";
+    fullName = "Gujarati";
+    filename = "aspell6";
+    sha256 = "04c38jnl74lpj2jhjz4zpqbs2623vwc71m6wc5h4b1karid14b23";
+  };
+
+  gv = buildOfficialDict {
+    language = "gv";
+    version = "0.50-0";
+    fullName = "Manx Gaelic";
+    filename = "aspell";
+    sha256 = "1rknf4yaw9s29c77sdzg98nhnmjwpicdb69igmz1n768npz2drmv";
+  };
+
+  he = buildOfficialDict {
+    language = "he";
+    version = "1.0-0";
+    fullName = "Hebrew";
+    filename = "aspell6";
+    sha256 = "13bhbghx5b8g0119g3wxd4n8mlf707y41vlf59irxjj0kynankfn";
+  };
+
+  hi = buildOfficialDict {
+    language = "hi";
+    version = "0.02-0";
+    fullName = "Hindi";
+    filename = "aspell6";
+    sha256 = "0drs374qz4419zx1lf2k281ydxf2750jk5ailafj1x0ncz27h1ys";
+  };
+
+  hil = buildOfficialDict {
+    language = "hil";
+    version = "0.11-0";
+    fullName = "Hiligaynon";
+    filename = "aspell5";
+    sha256 = "1s482fsfhzic9qa80al4418q3ni3gfn2bkwkd2y46ydrs17kf2jp";
+  };
+
+  hr = buildOfficialDict {
+    language = "hr";
+    version = "0.51-0";
+    fullName = "Croatian";
+    filename = "aspell";
+    sha256 = "09aafyf1vqhaxvcf3jfzf365k394b5pf0iivsr2ix5npah1h7i1a";
+  };
+
+  hsb = buildOfficialDict {
+    language = "hsb";
+    version = "0.02-0";
+    fullName = "Upper Sorbian";
+    filename = "aspell6";
+    sha256 = "0bi2vhz7n1vmg43wbbh935pmzihv80iyz9z65j94lxf753j2m7wd";
+  };
+
+  hu = buildOfficialDict {
+    language = "hu";
+    version = "0.99.4.2-0";
+    fullName = "Hungarian";
+    filename = "aspell6";
+    sha256 = "1d9nybip2k1dz69zly3iv0npbi3yxgfznh1py364nxzrbjsafd9k";
+  };
+
+  hus = buildOfficialDict {
+    language = "hus";
+    version = "0.03-1";
+    fullName = "Huastec";
+    filename = "aspell6";
+    sha256 = "09glipfpkz9xch17z11zw1yn2z7jx1f2svfmjn9l6wm1s5qz6a3d";
+  };
+
+  hy = buildOfficialDict {
+    language = "hy";
+    version = "0.10.0-0";
+    fullName = "Armenian";
+    filename = "aspell6";
+    sha256 = "1w5wq8lfl2xp1nid30b1j5qmya4vjyidq0vpr4y3gf53jc08vsid";
+  };
+
+  ia = buildOfficialDict {
+    language = "ia";
+    version = "0.50-1";
+    fullName = "Interlingua";
+    filename = "aspell";
+    sha256 = "0bqcpgsa72pga24fv4fkw38b4qqdvqsw97jvzvw7q03dc1cwp5sp";
+  };
+
+  id = buildOfficialDict {
+    language = "id";
+    version = "1.2-0";
+    fullName = "Indonesian";
+    filename = "aspell5";
+    sha256 = "023knfg0q03f7y5w6xnwa1kspnrcvcnky8xvdms93n2850414faj";
+  };
+
+  is = buildOfficialDict {
+    language = "is";
+    version = "0.51.1-0";
+    fullName = "Icelandic";
+    filename = "aspell";
+    sha256 = "1mp3248lhbr13cj7iq9zs7h5ix0dcwlprp5cwrkcwafrv8lvsd9h";
+  };
+
+  it = buildOfficialDict {
+    language = "it";
+    version = "2.2_20050523-0";
+    fullName = "Italian";
+    filename = "aspell6";
+    sha256 = "1gdf7bc1a0kmxsmphdqq8pl01h667mjsj6hihy6kqy14k5qdq69v";
+  };
+
+  kn = buildOfficialDict {
+    language = "kn";
+    version = "0.01-1";
+    fullName = "Kannada";
+    filename = "aspell6";
+    sha256 = "10sk0wx4x4ds1403kf9dqxv9yjvh06w8qqf4agx57y0jlws0n0fb";
+  };
+
+  ku = buildOfficialDict {
+    language = "ku";
+    version = "0.20-1";
+    fullName = "Kurdi";
+    filename = "aspell5";
+    sha256 = "09va98krfbgdaxl101nmd85j3ysqgg88qgfcl42c07crii0pd3wn";
+  };
+
+  ky = buildOfficialDict {
+    language = "ky";
+    version = "0.01-0";
+    fullName = "Kirghiz";
+    filename = "aspell6";
+    sha256 = "0kzv2syjnnn6pnwx0d578n46hg2l0j62977al47y6wabnhjjy3z1";
+  };
+
+  la = buildOfficialDict {
+    language = "la";
+    version = "20020503-0";
+    fullName = "Latin";
+    filename = "aspell6";
+    sha256 = "1199inwi16dznzl087v4skn66fl7h555hi2palx6s1f3s54b11nl";
+  };
+
+  lt = buildOfficialDict {
+    language = "lt";
+    version = "1.2.1-0";
+    fullName = "Lithuanian";
+    filename = "aspell6";
+    sha256 = "1asjck911l96q26zj36lmz0jp4b6pivvrf3h38zgc8lc85p3pxgn";
+  };
+
+  lv = buildOfficialDict {
+    language = "lv";
+    version = "0.5.5-1";
+    fullName = "Latvian";
+    filename = "aspell6";
+    sha256 = "12pvs584a6437ijndggdqpp5s7d0w607cimpkxsjwasnx83f4c1w";
+  };
+
+  mg = buildOfficialDict {
+    language = "mg";
+    version = "0.03-0";
+    fullName = "Malagasy";
+    filename = "aspell5";
+    sha256 = "0hdhbk9b5immjp8l5h4cy82gwgsqzcqbb0qsf7syw333w4rgi0ji";
+  };
+
+  mi = buildOfficialDict {
+    language = "mi";
+    version = "0.50-0";
+    fullName = "Maori";
+    filename = "aspell";
+    sha256 = "12bxplpd348yx8d2q8qvahi9dlp7qf28qmanzhziwc7np8rixvmy";
+  };
+
+  mk = buildOfficialDict {
+    language = "mk";
+    version = "0.50-0";
+    fullName = "Macedonian";
+    filename = "aspell";
+    sha256 = "0wcr9n882xi5b7a7ln1hnhq4vfqd5gpqqp87v01j0gb7zf027z0m";
+  };
+
+  ml = buildOfficialDict {
+    language = "ml";
+    version = "0.03-1";
+    fullName = "Malayalam";
+    filename = "aspell6";
+    sha256 = "1zcn4114gwia085fkz77qk13z29xrbp53q2qvgj2cvcbalg5bkg4";
+  };
+
+  mn = buildOfficialDict {
+    language = "mn";
+    version = "0.06-2";
+    fullName = "Mongolian";
+    filename = "aspell6";
+    sha256 = "150j9y5c9pw80fwp5rzl5q31q9vjbxixaqljkfwxjb5q93fnw6rg";
+  };
+
+  mr = buildOfficialDict {
+    language = "mr";
+    version = "0.10-0";
+    fullName = "Marathi";
+    filename = "aspell6";
+    sha256 = "0cvgb2l40sppqbi842ivpznsh2xzp1d4hxc371dll8z0pr05m8yk";
+  };
+
+  ms = buildOfficialDict {
+    language = "ms";
+    version = "0.50-0";
+    fullName = "Malay";
+    filename = "aspell";
+    sha256 = "0vr4vhipcfhsxqfs8dim2ph7iiixn22gmlmlb375bx5hgd9y7i1w";
+  };
+
+  mt = buildOfficialDict {
+    language = "mt";
+    version = "0.50-0";
+    fullName = "Maltese";
+    filename = "aspell";
+    sha256 = "1d2rl1nlfjq6rfywblvx8m88cyy2x0mzc0mshzbgw359c2nwl3z0";
+  };
+
+  nb = buildOfficialDict {
+    language = "nb";
+    version = "0.50.1-0";
+    fullName = "Norwegian Bokmal";
+    filename = "aspell";
+    sha256 = "12i2bmgdnlkzfinb20j2a0j4a20q91a9j8qpq5vgabbvc65nwx77";
+  };
+
+  nds = buildOfficialDict {
+    language = "nds";
+    version = "0.01-0";
+    fullName = "Low Saxon";
+    filename = "aspell6";
+    sha256 = "1nkjhwzn45dizi89d19q4bqyd87cim8xyrgr655fampgkn31wf6f";
+  };
+
+  nl = buildOfficialDict {
+    language = "nl";
+    version = "0.50-2";
+    fullName = "Dutch";
+    filename = "aspell";
+    sha256 = "0ffb87yjsh211hllpc4b9khqqrblial4pzi1h9r3v465z1yhn3j4";
+    # Emacs expects a language called "nederlands".
+    postInstall = ''
+      echo "add nl.rws" > $out/lib/aspell/nederlands.multi
+    '';
+  };
+
+  nn = buildOfficialDict {
+    language = "nn";
+    version = "0.50.1-1";
+    fullName = "Norwegian Nynorsk";
+    filename = "aspell";
+    sha256 = "0w2k5l5rbqpliripgqwiqixz5ghnjf7i9ggbrc4ly4vy1ia10rmc";
+  };
+
+  ny = buildOfficialDict {
+    language = "ny";
+    version = "0.01-0";
+    fullName = "Chichewa";
+    filename = "aspell5";
+    sha256 = "0gjb92vcg60sfgvrm2f6i89sfkgb179ahvwlgs649fx3dc7rfvqp";
+  };
+
+  or = buildOfficialDict {
+    language = "or";
+    version = "0.03-1";
+    fullName = "Oriya";
+    filename = "aspell6";
+    sha256 = "0kzj9q225z0ccrlbkijsrafy005pbjy14qcnxb6p93ciz1ls7zyn";
+  };
+
+  pa = buildOfficialDict {
+    language = "pa";
+    version = "0.01-1";
+    fullName = "Punjabi";
+    filename = "aspell6";
+    sha256 = "0if93zk10pyrs38wwj3vpcdm01h51m5z9gm85h3jxrpgqnqspwy7";
+  };
+
+  pl = buildOfficialDict {
+    language = "pl";
+    version = "6.0_20061121-0";
+    fullName = "Polish";
+    filename = "aspell6";
+    sha256 = "0kap4kh6bqbb22ypja1m5z3krc06vv4n0hakiiqmv20anzy42xq1";
+  };
+
+  pt_BR = buildOfficialDict {
+    language = "pt_BR";
+    version = "20131030-12-0";
+    fullName = "Brazilian Portuguese";
+    filename = "aspell6";
+    sha256 = "1xqlpk21s93c6blkdnpk7l62q9fxjvzdv2x86chl8p2x1gdrj3gb";
+  };
+
+  pt_PT = buildOfficialDict {
+    language = "pt_PT";
+    version = "20190329-1-0";
+    fullName = "Portuguese";
+    filename = "aspell6";
+    sha256 = "0ld0d0ily4jqifjfsxfv4shbicz6ymm2gk56fq9gbzra1j4qnw75";
+  };
+
+  qu = buildOfficialDict {
+    language = "qu";
+    version = "0.02-0";
+    fullName = "Quechua";
+    filename = "aspell6";
+    sha256 = "009z0zsvzq7r3z3m30clyibs94v77b92h5lmzmzxlns2p0lpd5w0";
+  };
+
+  ro = buildOfficialDict {
+    language = "ro";
+    version = "3.3-2";
+    fullName = "Romanian";
+    filename = "aspell5";
+    sha256 = "0gb8j9iy1acdl11jq76idgc2lbc1rq3w04favn8cyh55d1v8phsk";
+  };
+
+  ru = buildOfficialDict {
+    language = "ru";
+    version = "0.99f7-1";
+    fullName = "Russian";
+    filename = "aspell6";
+    sha256 = "0ip6nq43hcr7vvzbv4lwwmlwgfa60hrhsldh9xy3zg2prv6bcaaw";
+  };
+
+  rw = buildOfficialDict {
+    language = "rw";
+    version = "0.50-0";
+    fullName = "Kinyarwanda";
+    filename = "aspell";
+    sha256 = "10gh8g747jbrvfk2fn3pjxy1nhcfdpwgmnvkmrp4nd1k1qp101il";
+  };
+
+  sc = buildOfficialDict {
+    language = "sc";
+    version = "1.0";
+    fullName = "Sardinian";
+    filename = "aspell5";
+    sha256 = "0hl7prh5rccsyljwrv3m1hjcsphyrrywk2qvnj122irbf4py46jr";
+  };
+
+  sk = buildOfficialDict {
+    language = "sk";
+    version = "2.01-2";
+    fullName = "Slovak";
+    filename = "aspell6";
+    sha256 = "19k0m1v5pcf7xr4lxgjkzqkdlks8nyb13bvi1n7521f3i4lhma66";
+  };
+
+  sl = buildOfficialDict {
+    language = "sl";
+    version = "0.50-0";
+    fullName = "Slovenian";
+    filename = "aspell";
+    sha256 = "1l9kc5g35flq8kw9jhn2n0bjb4sipjs4qkqzgggs438kywkx2rp5";
+  };
+
+  sr = buildOfficialDict {
+    language = "sr";
+    version = "0.02";
+    fullName = "Serbian";
+    filename = "aspell6";
+    sha256 = "12cj01p4nj80cpf7m3s4jsaf0rsfng7s295j9jfchcq677xmhpkh";
+  };
+
+  sv = buildOfficialDict {
+    language = "sv";
+    version = "0.51-0";
+    fullName = "Swedish";
+    filename = "aspell";
+    sha256 = "02jwkjhr32kvyibnyzgx3smbnm576jwdzg3avdf6zxwckhy5fw4v";
+  };
+
+  sw = buildOfficialDict {
+    language = "sw";
+    version = "0.50-0";
+    fullName = "Swahili";
+    filename = "aspell";
+    sha256 = "15zjh7hdj2b4dgm5bc12w1ims9q357p1q3gjalspnyn5gl81zmby";
+  };
+
+  ta = buildOfficialDict {
+    language = "ta";
+    version = "20040424-1";
+    fullName = "Tamil";
+    filename = "aspell6";
+    sha256 = "0sj8ygjsyvnr93cs6324y7az7k2vyw7rjxdc9vnm7z60lbqm5xaj";
+  };
+
+  te = buildOfficialDict {
+    language = "te";
+    version = "0.01-2";
+    fullName = "Telugu";
+    filename = "aspell6";
+    sha256 = "0pgcgxz7dz34zxp9sb85jjzbg3ky6il5wmhffz6ayrbsfn5670in";
+  };
+
+  tet = buildOfficialDict {
+    language = "tet";
+    version = "0.1.1";
+    fullName = "Tetum";
+    filename = "aspell5";
+    sha256 = "17n0y4fhjak47j9qnqf4m4z6zra6dn72rwhp7ig0hhlgqk4ldmcx";
+  };
+
+  tk = buildOfficialDict {
+    language = "tk";
+    version = "0.01-0";
+    fullName = "Turkmen";
+    filename = "aspell5";
+    sha256 = "02vad4jqhr0xpzqi5q5z7z0xxqccbn8j0c5dhpnm86mnr84l5wl6";
+  };
+
+  tl = buildOfficialDict {
+    language = "tl";
+    version = "0.02-1";
+    fullName = "Tagalog";
+    filename = "aspell5";
+    sha256 = "1kca6k7qnpfvvwjnq5r1n242payqsjy96skmw78m7ww6d0n5vdj8";
+  };
+
+  tn = buildOfficialDict {
+    language = "tn";
+    version = "1.0.1-0";
+    fullName = "Setswana";
+    filename = "aspell5";
+    sha256 = "0q5x7c6z88cn0kkpk7q1craq34g4g03v8x3xcj5a5jia3l7c5821";
+  };
+
+  tr = buildOfficialDict {
+    language = "tr";
+    version = "0.50-0";
+    fullName = "Turkish";
+    filename = "aspell";
+    sha256 = "0jpvpm96ga7s7rmsm6rbyrrr22b2dicxv2hy7ysv5y7bbq757ihb";
+  };
+
+  uk = buildOfficialDict {
+    language = "uk";
+    version = "1.4.0-0";
+    fullName = "Ukrainian";
+    filename = "aspell6";
+    sha256 = "137i4njvnslab6l4s291s11xijr5jsy75lbdph32f9y183lagy9m";
+  };
+
+  uz = buildOfficialDict {
+    language = "uz";
+    version = "0.6-0";
+    fullName = "Uzbek";
+    filename = "aspell6";
+    sha256 = "0sg3wlyply1idpq5ypyj7kgnaadaiskci1sqs811yhg2gzyc3092";
+  };
+
+  vi = buildOfficialDict {
+    language = "vi";
+    version = "0.01.1-1";
+    fullName = "Vietnamese";
+    filename = "aspell6";
+    sha256 = "05vwgvf1cj45azhflywx69javqdvqd1f20swrc2d3c32pd9mvn1w";
+  };
+
+  wa = buildOfficialDict {
+    language = "wa";
+    version = "0.50-0";
+    fullName = "Walloon";
+    filename = "aspell";
+    sha256 = "1r1zwz7xkx40dga9vf5wc9ja3jwk1dkpcr1kaa7wryvslf5al5ss";
+  };
+
+  yi = buildOfficialDict {
+    language = "yi";
+    version = "0.01.1-1";
+    fullName = "Yiddish";
+    filename = "aspell6";
+    sha256 = "0mi842l4038bx3ll2wx9nz44nqrg1x46h5b02zigi1hbbddd6ycq";
+  };
+
+  zu = buildOfficialDict {
+    language = "zu";
+    version = "0.50-0";
+    fullName = "Zulu";
+    filename = "aspell";
+    sha256 = "15k7gaxrnqnssdyk9l6g27dq317dqp9jz5yzafd25ri01g6mb8iz";
+  };
+
+  ### Jargons
+
+  en-computers = buildTxtDict {
+    shortName = "en-computers";
+    fullName = "English Computer Jargon";
+
+    src = fetchurl {
+      url = "https://mrsatterly.com/computer.dic";
+      sha256 = "1vzk7cdvcm9r1c6mgxpabrdcpvghdv9mjmnf6iq5wllcif5nsw2b";
+    };
+
+    langInputs = [ en ];
+
+    buildPhase = ''
+      runHook preBuild
+      cat $src | aspell-affix en-computers --dont-validate-words --lang=en
+      runHook postBuild
+    '';
+    installPhase = "aspell-install en-computers";
+
+    meta = {
+      homepage = "https://mrsatterly.com/spelling.html";
+    };
+  };
+
+  en-science = buildTxtDict {
+    shortName = "en-science";
+    fullName = "English Scientific Jargon";
+
+    src1 = fetchurl {
+      url = "http://jpetrie.net/wp-content/uploads/custom_scientific_US.txt";
+      sha256 = "1nf4py2mg0mlv9s5a7had2wn29z2v6bcca0fs6rbpdn4nqc4s7dm";
+    };
+
+    src2 = fetchurl {
+      url = "http://jpetrie.net/wp-content/uploads/custom_scientific_UK.txt";
+      sha256 = "0f88il1ds6qazy1ghxviqcwsywrbf6pzl2lmzf4f3qvhdfb6f1y0";
+    };
+
+    langInputs = [ en ];
+
+    buildPhase = ''
+      runHook preBuild
+      cat $src1 | aspell-plain en_US-science --dont-validate-words --lang=en
+      cat $src2 | aspell-plain en_GB-science --dont-validate-words --lang=en
+      runHook postBuild
+    '';
+    installPhase = "aspell-install en_US-science en_GB-science";
+
+    meta = {
+      homepage = "http://www.jpetrie.net/scientific-word-list-for-spell-checkersspelling-dictionaries/";
+    };
+
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/assimp/default.nix b/nixpkgs/pkgs/development/libraries/assimp/default.nix
new file mode 100644
index 000000000000..ec2d5561570e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/assimp/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, boost
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "assimp";
+  version = "5.3.1";
+  outputs = [ "out" "lib" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "assimp";
+    repo = "assimp";
+    rev = "v${version}";
+    hash = "sha256-/1A8n7oe9WsF3FpbLZxhifzrdj38t9l5Kc8Q5jfDoyY=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ boost zlib ];
+
+  cmakeFlags = [ "-DASSIMP_BUILD_ASSIMP_TOOLS=ON" ];
+
+  env.NIX_CFLAGS_COMPILE = toString ([
+    # Needed with GCC 12
+    "-Wno-error=array-bounds"
+  ] ++ lib.optionals stdenv.hostPlatform.isRiscV [
+    "-Wno-error=free-nonheap-object"
+  ]);
+
+  meta = with lib; {
+    description = "A library to import various 3D model formats";
+    homepage = "https://www.assimp.org/";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ ehmry ];
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/at-spi2-core/default.nix b/nixpkgs/pkgs/development/libraries/at-spi2-core/default.nix
new file mode 100644
index 000000000000..271c54ea97fa
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/at-spi2-core/default.nix
@@ -0,0 +1,101 @@
+{ lib
+, stdenv
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, gobject-introspection
+, buildPackages
+, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
+, gsettings-desktop-schemas
+, makeWrapper
+, dbus
+, glib
+, dconf
+, libX11
+, libxml2
+, libXtst
+, libXi
+, libXext
+, gnome
+, systemd
+}:
+
+stdenv.mkDerivation rec {
+  pname = "at-spi2-core";
+  version = "2.50.0";
+
+  outputs = [ "out" "dev" ];
+  separateDebugInfo = true;
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "6fWoyCNcndljshcd6RIDARKcZ33ekzlV4d9hi5ScStw=";
+  };
+
+  nativeBuildInputs = [
+    glib
+    meson
+    ninja
+    pkg-config
+    makeWrapper
+  ] ++ lib.optionals withIntrospection [
+    gobject-introspection
+  ];
+
+  buildInputs = [
+    libX11
+    libxml2
+    # at-spi2-core can be build without X support, but due it is a client-side library, GUI-less usage is a very rare case
+    libXtst
+    libXi
+    # libXext is a transitive dependency of libXi
+    libXext
+  ] ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform systemd) [
+    # libsystemd is a needed for dbus-broker support
+    systemd
+  ];
+
+  # In atspi-2.pc dbus-1 glib-2.0
+  # In atk.pc gobject-2.0
+  propagatedBuildInputs = [
+    dbus
+    glib
+  ];
+
+  # fails with "AT-SPI: Couldn't connect to accessibility bus. Is at-spi-bus-launcher running?"
+  doCheck = false;
+
+  mesonFlags = [
+    # Provide dbus-daemon fallback when it is not already running when
+    # at-spi2-bus-launcher is executed. This allows us to avoid
+    # including the entire dbus closure in libraries linked with
+    # the at-spi2-core libraries.
+    "-Ddbus_daemon=/run/current-system/sw/bin/dbus-daemon"
+  ] ++ lib.optionals stdenv.hostPlatform.isLinux [
+    # Same as the above, but for dbus-broker
+    "-Ddbus_broker=/run/current-system/sw/bin/dbus-broker-launch"
+  ];
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  postFixup = ''
+    # Cannot use wrapGAppsHook'due to a dependency cycle
+    wrapProgram $out/libexec/at-spi-bus-launcher \
+      --prefix GIO_EXTRA_MODULES : "${lib.getLib dconf}/lib/gio/modules" \
+      --prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}
+  '';
+
+  meta = with lib; {
+    description = "Assistive Technology Service Provider Interface protocol definitions and daemon for D-Bus";
+    homepage = "https://gitlab.gnome.org/GNOME/at-spi2-core";
+    license = licenses.lgpl21Plus;
+    maintainers = teams.gnome.members ++ (with maintainers; [ raskin ]);
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/atkmm/2.36.nix b/nixpkgs/pkgs/development/libraries/atkmm/2.36.nix
new file mode 100644
index 000000000000..600ae449fd32
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/atkmm/2.36.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchurl, atk, glibmm_2_68, pkg-config, gnome, meson, ninja, python3 }:
+
+stdenv.mkDerivation rec {
+  pname = "atkmm";
+  version = "2.36.3";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-bsJk6qDE3grbcgLGABcL3pp/vk1Ga/vpQOr3+qpsWXQ=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  propagatedBuildInputs = [ atk glibmm_2_68 ];
+
+  nativeBuildInputs = [ pkg-config meson ninja python3 ];
+
+  doCheck = true;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      attrPath = "atkmm_2_36";
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = {
+    description = "C++ wrappers for ATK accessibility toolkit";
+    license = lib.licenses.lgpl21Plus;
+    homepage = "https://gtkmm.org";
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/atkmm/default.nix b/nixpkgs/pkgs/development/libraries/atkmm/default.nix
new file mode 100644
index 000000000000..a22e3fec16a6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/atkmm/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchurl, atk, glibmm, pkg-config, gnome, meson, ninja, python3 }:
+
+stdenv.mkDerivation rec {
+  pname = "atkmm";
+  version = "2.28.4";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-ChQqgSj4PAAe+4AU7kY+mnZgVO+EaGr5UxNeBNKP2rM=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  propagatedBuildInputs = [ atk glibmm ];
+
+  nativeBuildInputs = [ pkg-config meson python3 ninja ];
+
+  doCheck = true;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+      freeze = true;
+    };
+  };
+
+  meta = {
+    description = "C++ wrappers for ATK accessibility toolkit";
+    license = lib.licenses.lgpl21Plus;
+    homepage = "https://gtkmm.org";
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/attr/default.nix b/nixpkgs/pkgs/development/libraries/attr/default.nix
new file mode 100644
index 000000000000..4815497da14f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/attr/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchurl, gettext }:
+
+# Note: this package is used for bootstrapping fetchurl, and thus
+# cannot use fetchpatch! All mutable patches (generated by GitHub or
+# cgit) that are needed here should be included directly in Nixpkgs as
+# files.
+
+stdenv.mkDerivation rec {
+  pname = "attr";
+  version = "2.5.2";
+
+  src = fetchurl {
+    url = "mirror://savannah/attr/${pname}-${version}.tar.gz";
+    sha256 = "sha256-Ob9nRS+kHQlIwhl2AQU/SLPXigKTiXNDMqYwmmgMbIc=";
+  };
+
+  outputs = [ "bin" "dev" "out" "man" "doc" ];
+
+  nativeBuildInputs = [ gettext ];
+
+  postPatch = ''
+    for script in install-sh include/install-sh; do
+      patchShebangs $script
+    done
+  '';
+
+  meta = with lib; {
+    homepage = "https://savannah.nongnu.org/projects/attr/";
+    description = "Library and tools for manipulating extended attributes";
+    platforms = platforms.linux;
+    license = licenses.gpl2Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aubio/default.nix b/nixpkgs/pkgs/development/libraries/aubio/default.nix
new file mode 100644
index 000000000000..89f81e26de40
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aubio/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchurl, alsa-lib, fftw, libjack2, libsamplerate
+, libsndfile, pkg-config, python3, wafHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "aubio";
+  version = "0.4.9";
+
+  src = fetchurl {
+    url = "https://aubio.org/pub/aubio-${version}.tar.bz2";
+    sha256 = "1npks71ljc48w6858l9bq30kaf5nph8z0v61jkfb70xb9np850nl";
+  };
+
+  nativeBuildInputs = [ pkg-config python3 wafHook ];
+  buildInputs = [ alsa-lib fftw libjack2 libsamplerate libsndfile ];
+
+  strictDeps = true;
+  dontAddWafCrossFlags = true;
+  wafFlags = lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "--disable-tests";
+
+  postPatch = ''
+    # U was removed in python 3.11 because it had no effect
+    substituteInPlace waflib/*.py \
+      --replace "m='rU" "m='r" \
+      --replace "'rU'" "'r'"
+  '';
+
+  meta = with lib; {
+    description = "Library for audio labelling";
+    homepage = "https://aubio.org/";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ goibhniu marcweber fpletz ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/audiality2/default.nix b/nixpkgs/pkgs/development/libraries/audiality2/default.nix
new file mode 100644
index 000000000000..e0ab0accdfde
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audiality2/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+# The two audio backends:
+, SDL2
+, jack2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "audiality2";
+  version = "1.9.4";
+
+  src = fetchFromGitHub {
+    owner = "olofson";
+    repo = "audiality2";
+    rev = "v${version}";
+    sha256 = "0ipqna7a9mxqm0fl9ggwhbc7i9yxz3jfyi0w3dymjp40v7jw1n20";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    SDL2
+    jack2
+  ];
+
+  meta = with lib; {
+    description = "A realtime scripted modular audio engine for video games and musical applications";
+    homepage = "http://audiality.org";
+    license = licenses.zlib;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ fgaz ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/audio/cubeb/default.nix b/nixpkgs/pkgs/development/libraries/audio/cubeb/default.nix
new file mode 100644
index 000000000000..baad8a1efd64
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audio/cubeb/default.nix
@@ -0,0 +1,68 @@
+{ lib, stdenv, fetchFromGitHub
+, cmake
+, pkg-config
+, alsa-lib
+, jack2
+, libpulseaudio
+, sndio
+, speexdsp
+, AudioUnit
+, CoreAudio
+, CoreServices
+, lazyLoad ? !stdenv.isDarwin
+}:
+
+assert lib.assertMsg (stdenv.isDarwin -> !lazyLoad) "cubeb: lazyLoad is inert on Darwin";
+
+let
+  backendLibs = [
+    alsa-lib
+    jack2
+    libpulseaudio
+    sndio
+  ];
+
+in stdenv.mkDerivation {
+  pname = "cubeb";
+  version = "unstable-2022-10-18";
+
+  src = fetchFromGitHub {
+    owner = "mozilla";
+    repo = "cubeb";
+    rev = "27d2a102b0b75d9e49d43bc1ea516233fb87d778";
+    hash = "sha256-q+uz1dGU4LdlPogL1nwCR/KuOX4Oy3HhMdA6aJylBRk=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [ speexdsp ] ++ (
+    if stdenv.isDarwin then [ AudioUnit CoreAudio CoreServices ]
+    else backendLibs
+  );
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+    "-DBUILD_TESTS=OFF" # tests require an audio server
+    "-DBUNDLE_SPEEX=OFF"
+    "-DUSE_SANITIZERS=OFF"
+
+    # Whether to lazily load libraries with dlopen()
+    "-DLAZY_LOAD_LIBS=${if lazyLoad then "ON" else "OFF"}"
+  ];
+
+  passthru = {
+    # For downstream users when lazyLoad is true
+    backendLibs = lib.optionals lazyLoad backendLibs;
+  };
+
+  meta = with lib; {
+    description = "Cross platform audio library";
+    homepage = "https://github.com/mozilla/cubeb";
+    license = licenses.isc;
+    platforms = platforms.linux ++ platforms.darwin;
+    maintainers = with maintainers; [ zhaofengli ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/audio/game-music-emu/default.nix b/nixpkgs/pkgs/development/libraries/audio/game-music-emu/default.nix
new file mode 100644
index 000000000000..0f420745baef
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audio/game-music-emu/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl, cmake, removeReferencesTo, zlib }:
+
+stdenv.mkDerivation rec {
+  version = "0.6.3";
+  pname = "game-music-emu";
+
+  src = fetchurl {
+    url = "https://bitbucket.org/mpyne/game-music-emu/downloads/${pname}-${version}.tar.xz";
+    sha256 = "07857vdkak306d9s5g6fhmjyxk7vijzjhkmqb15s7ihfxx9lx8xb";
+  };
+  cmakeFlags = [ "-DENABLE_UBSAN=OFF" ];
+  nativeBuildInputs = [ cmake removeReferencesTo ];
+  buildInputs = [ zlib ];
+
+  # It used to reference it, in the past, but thanks to the postFixup hook, now
+  # it doesn't.
+  disallowedReferences = [ stdenv.cc.cc ];
+
+  postFixup = lib.optionalString stdenv.isLinux ''
+    remove-references-to -t ${stdenv.cc.cc} "$(readlink -f $out/lib/libgme.so)"
+  '';
+
+  meta = with lib; {
+    homepage = "https://bitbucket.org/mpyne/game-music-emu/wiki/Home";
+    description = "A collection of video game music file emulators";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ luc65r lheckemann ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/audio/libbass/default.nix b/nixpkgs/pkgs/development/libraries/audio/libbass/default.nix
new file mode 100644
index 000000000000..a8648a1a1c7b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audio/libbass/default.nix
@@ -0,0 +1,68 @@
+{ lib, stdenv, unzip, fetchurl }:
+
+# Upstream changes files in-place, to update:
+# 1. Check latest version at http://www.un4seen.com/
+# 2. Update `version`s and `sha256` sums.
+# See also http://www.un4seen.com/forum/?topic=18614.0
+
+let
+  allBass = {
+    bass = {
+      h = "bass.h";
+      version = "2.4.15";
+      so = {
+        i686_linux = "libbass.so";
+        x86_64-linux = "x64/libbass.so";
+      };
+      urlpath = "bass24-linux.zip";
+      sha256 = "1lmysxfhy727zskavml3ibg5w876ir88923bm17c21s59w5lh7l8";
+    };
+
+    bass_fx = {
+      h = "C/bass_fx.h";
+      version = "2.4.12.1";
+      so = {
+        i686_linux = "libbass_fx.so";
+        x86_64-linux = "x64/libbass_fx.so";
+      };
+      urlpath = "z/0/bass_fx24-linux.zip";
+      sha256 = "1q0g74z7iyhxqps5b3gnnbic8v2jji1r0mkvais57lsx8y21sbin";
+    };
+  };
+
+  dropBass = name: bass: stdenv.mkDerivation {
+    pname = "lib${name}";
+    inherit (bass) version;
+
+    src = fetchurl {
+      url = "https://www.un4seen.com/files/${bass.urlpath}";
+      inherit (bass) sha256;
+    };
+    unpackCmd = ''
+      mkdir out
+      ${unzip}/bin/unzip $curSrc -d out
+    '';
+
+    lpropagatedBuildInputs = [ unzip ];
+    dontBuild = true;
+    installPhase =
+      let so =
+            if bass.so ? ${stdenv.hostPlatform.system} then bass.so.${stdenv.hostPlatform.system}
+            else throw "${name} not packaged for ${stdenv.hostPlatform.system} (yet).";
+      in ''
+        mkdir -p $out/{lib,include}
+        install -m644 -t $out/lib/ ${so}
+        install -m644 -t $out/include/ ${bass.h}
+      '';
+
+    meta = with lib; {
+      description = "Shareware audio library";
+      homepage = "https://www.un4seen.com/";
+      license = licenses.unfreeRedistributable;
+      platforms = builtins.attrNames bass.so;
+      # until upstream has stable URLs, this package is prone to always being broken
+      broken = true;
+    };
+  };
+
+in lib.mapAttrs dropBass allBass
diff --git a/nixpkgs/pkgs/development/libraries/audio/libbs2b/default.nix b/nixpkgs/pkgs/development/libraries/audio/libbs2b/default.nix
new file mode 100644
index 000000000000..fa390eaaa588
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audio/libbs2b/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl, pkg-config, libsndfile }:
+
+stdenv.mkDerivation rec {
+  pname = "libbs2b";
+  version = "3.1.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/bs2b/${pname}-${version}.tar.bz2";
+    sha256 = "0vz442kkjn2h0dlxppzi4m5zx8qfyrivq581n06xzvnyxi5rg6a7";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libsndfile ];
+
+  configureFlags = [
+    # Required for cross-compilation.
+    # Prevents linking error with 'undefined reference to rpl_malloc'.
+    # I think it's safe to assume that most libcs will properly handle
+    # realloc(NULL, size) and treat it like malloc(size).
+    "ac_cv_func_malloc_0_nonnull=yes"
+  ];
+  hardeningDisable = [ "format" ];
+
+  meta = {
+    homepage = "https://bs2b.sourceforge.net/";
+    description = "Bauer stereophonic-to-binaural DSP library";
+    license = lib.licenses.mit;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/audio/libinstpatch/default.nix b/nixpkgs/pkgs/development/libraries/audio/libinstpatch/default.nix
new file mode 100644
index 000000000000..670dee26b2bf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audio/libinstpatch/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, glib, libsndfile }:
+
+stdenv.mkDerivation rec {
+  pname = "libinstpatch";
+  version = "1.1.6";
+
+  src = fetchFromGitHub {
+    owner = "swami";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-OU6/slrPDgzn9tvXZJKSWbcFbpS/EAsOi52FtjeYdvA=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  propagatedBuildInputs = [ glib libsndfile ]; # Both are needed for includes.
+
+  cmakeFlags = [
+    "-DLIB_SUFFIX=" # Install in $out/lib.
+  ];
+
+  meta = with lib; {
+    homepage = "http://www.swamiproject.org/";
+    description = "MIDI instrument patch files support library";
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ orivej ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/audio/libkeyfinder/default.nix b/nixpkgs/pkgs/development/libraries/audio/libkeyfinder/default.nix
new file mode 100644
index 000000000000..0742297cb69f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audio/libkeyfinder/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchpatch, fetchFromGitHub, cmake, fftw, catch2 }:
+
+stdenv.mkDerivation rec {
+  pname = "libkeyfinder";
+  version = "2.2.6";
+
+  src = fetchFromGitHub {
+    owner = "mixxxdj";
+    repo = "libkeyfinder";
+    rev = "v${version}";
+    sha256 = "sha256-7w/Wc9ncLinbnM2q3yv5DBtFoJFAM2e9xAUTsqvE9mg=";
+  };
+
+  # in main post 2.2.6, see https://github.com/mixxxdj/libkeyfinder/issues/21
+  patches = [
+    (fetchpatch {
+      name = "fix-pkg-config";
+      url = "https://github.com/mixxxdj/libkeyfinder/commit/4e1a5022d4c91e3ecfe9be5c3ac7cc488093bd2e.patch";
+      sha256 = "08llmgp6r11bq5s820j3fs9bgriaibkhq8r3v2av064w66mwp48x";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ fftw ];
+
+  nativeCheckInputs = [ catch2 ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Musical key detection for digital audio (C++ library)";
+    homepage = "https://mixxxdj.github.io/libkeyfinder/";
+    license = licenses.gpl3Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/audio/libmysofa/default.nix b/nixpkgs/pkgs/development/libraries/audio/libmysofa/default.nix
new file mode 100644
index 000000000000..3b5224c97f93
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audio/libmysofa/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, cmake, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "libmysofa";
+  version = "1.3.2";
+
+  src = fetchFromGitHub {
+    owner = "hoene";
+    repo = "libmysofa";
+    rev = "v${version}";
+    hash = "sha256-eXMGwa6lOtKoUCcHR9BM2S3NWAZkGyZzF3FAjYaWTvg=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ zlib ];
+
+  cmakeFlags = [ "-DBUILD_TESTS=OFF" "-DCODE_COVERAGE=OFF" ];
+
+  meta = with lib; {
+    description = "Reader for AES SOFA files to get better HRTFs";
+    homepage = "https://github.com/hoene/libmysofa";
+    license = licenses.bsd3;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/audio/libopenmpt-modplug/default.nix b/nixpkgs/pkgs/development/libraries/audio/libopenmpt-modplug/default.nix
new file mode 100644
index 000000000000..8d5ef86a8967
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audio/libopenmpt-modplug/default.nix
@@ -0,0 +1,42 @@
+{ stdenv
+, lib
+, fetchurl
+, autoreconfHook
+, pkg-config
+, libopenmpt
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libopenmpt-modplug";
+  version = "0.8.9.0-openmpt1";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "https://lib.openmpt.org/files/libopenmpt-modplug/libopenmpt-modplug-${version}.tar.gz";
+    sha256 = "sha256-7M4aDuz9sLWCTKuJwnDc5ZWWKVosF8KwQyFez018T/c=";
+  };
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ];
+
+  buildInputs = [
+    libopenmpt
+  ];
+
+  configureFlags = [
+    "--enable-libmodplug"
+  ];
+
+  meta = with lib; {
+    description = "A libmodplug emulation layer based on libopenmpt";
+    homepage = "https://lib.openmpt.org/libopenmpt/";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ OPNA2608 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/audio/libopenmpt/default.nix b/nixpkgs/pkgs/development/libraries/audio/libopenmpt/default.nix
new file mode 100644
index 000000000000..b8b89abc8ea7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audio/libopenmpt/default.nix
@@ -0,0 +1,70 @@
+{ 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.7.3";
+
+  outputs = [ "out" "dev" "bin" ];
+
+  src = fetchurl {
+    url = "https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-${version}+release.autotools.tar.gz";
+    hash = "sha256-LPg2m3kWsJJk8/FLn7bO81pum+4DKN7E9J2YIRzP1yI=";
+  };
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [
+    pkg-config
+  ];
+
+  buildInputs = [
+    zlib
+    mpg123
+    libogg
+    libvorbis
+    portaudio
+    libsndfile
+    flac
+  ] ++ lib.optionals usePulseAudio [
+    libpulseaudio
+  ];
+
+  configureFlags = [
+    (lib.strings.withFeature usePulseAudio "pulseaudio")
+  ];
+
+  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
+
+  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/nixpkgs/pkgs/development/libraries/audio/libopenmpt/update.sh b/nixpkgs/pkgs/development/libraries/audio/libopenmpt/update.sh
new file mode 100755
index 000000000000..2d4e5afac0b7
--- /dev/null
+++ b/nixpkgs/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/nixpkgs/pkgs/development/libraries/audio/libsmf/default.nix b/nixpkgs/pkgs/development/libraries/audio/libsmf/default.nix
new file mode 100644
index 000000000000..6737d76538e0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audio/libsmf/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, glib, pkg-config }:
+
+stdenv.mkDerivation rec {
+  version = "1.3";
+  pname = "libsmf";
+
+  src = fetchFromGitHub {
+    owner = "stump";
+    repo = "libsmf";
+    rev = "libsmf-${version}";
+    sha256 = "sha256-OJXJkXvbM2GQNInZXU2ldObquKHhqkdu1zqUDnVZN0Y=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ glib ];
+
+  meta = with lib; {
+    description = "A C library for reading and writing Standard MIDI Files";
+    homepage = "https://github.com/stump/libsmf";
+    license = licenses.bsd2;
+    maintainers = [ maintainers.goibhniu ];
+    mainProgram = "smfsh";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/audio/libspecbleach/default.nix b/nixpkgs/pkgs/development/libraries/audio/libspecbleach/default.nix
new file mode 100644
index 000000000000..b1065561e1c6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audio/libspecbleach/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, fftwFloat}:
+
+stdenv.mkDerivation rec {
+  pname = "libspecbleach";
+  version = "0.1.6";
+
+  src = fetchFromGitHub {
+    owner = "lucianodato";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-Tw5nrGVAeoiMH00efJwcU+QLmKDZZTXHQPSV9x789TM=";
+  };
+
+  nativeBuildInputs = [ meson ninja pkg-config ];
+  buildInputs = [
+    fftwFloat
+  ];
+
+  meta = with lib; {
+    description = "C library for audio noise reduction";
+    homepage    = "https://github.com/lucianodato/libspecbleach";
+    license     = licenses.lgpl2;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/audio/lilv/default.nix b/nixpkgs/pkgs/development/libraries/audio/lilv/default.nix
new file mode 100644
index 000000000000..c17b27a7aa6f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audio/lilv/default.nix
@@ -0,0 +1,57 @@
+{ lib
+, stdenv
+, fetchurl
+, lv2
+, meson
+, ninja
+, pkg-config
+, python3
+, libsndfile
+, serd
+, sord
+, sratom
+, gitUpdater
+
+# test derivations
+, pipewire
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lilv";
+  version = "0.24.24";
+
+  outputs = [ "out" "dev" "man" ];
+
+  src = fetchurl {
+    url = "https://download.drobilla.net/${pname}-${version}.tar.xz";
+    hash = "sha256-a7a+n4hQQXbQZC8S3oCbK54txVYhporbjH7bma76u08=";
+  };
+
+  nativeBuildInputs = [ meson ninja pkg-config python3 ];
+  buildInputs = [ libsndfile serd sord sratom ];
+  propagatedBuildInputs = [ lv2 ];
+
+  mesonFlags = [
+    "-Ddocs=disabled"
+    # Tests require building a shared library.
+    (lib.mesonEnable "tests" (!stdenv.hostPlatform.isStatic))
+  ];
+
+  passthru = {
+    tests = {
+      inherit pipewire;
+    };
+    updateScript = gitUpdater {
+      url = "https://gitlab.com/lv2/lilv.git";
+      rev-prefix = "v";
+    };
+  };
+
+  meta = with lib; {
+    homepage = "http://drobilla.net/software/lilv";
+    description = "A C library to make the use of LV2 plugins";
+    license = licenses.mit;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/audio/lv2/default.nix b/nixpkgs/pkgs/development/libraries/audio/lv2/default.nix
new file mode 100644
index 000000000000..d0f85c95a077
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audio/lv2/default.nix
@@ -0,0 +1,66 @@
+{ stdenv
+, lib
+, fetchurl
+, meson
+, ninja
+
+, pipewire
+, gitUpdater
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lv2";
+  version = "1.18.10";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "https://lv2plug.in/spec/${pname}-${version}.tar.xz";
+    hash = "sha256-eMUbzyG1Tli7Yymsy7Ta4Dsu15tSD5oB5zS9neUwlT8=";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    meson
+    ninja
+  ];
+
+  buildInputs = [ ];
+
+  mesonFlags = [
+    # install validators to $dev
+    "--bindir=${placeholder "dev"}/bin"
+
+    # These are just example plugins. They pull in outdated gtk-2
+    # dependency and many other things. Upstream would like to
+    # eventually move them of the project:
+    #   https://gitlab.com/lv2/lv2/-/issues/57#note_1096060029
+    "-Dplugins=disabled"
+    # Pulls in spell checkers among other things.
+    "-Dtests=disabled"
+    # Avoid heavyweight python dependencies.
+    "-Ddocs=disabled"
+  ] ++ lib.optionals stdenv.isDarwin [
+    "-Dlv2dir=${placeholder "out"}/lib/lv2"
+  ];
+
+  passthru = {
+    tests = {
+      inherit pipewire;
+    };
+    updateScript = gitUpdater {
+      # No nicer place to find latest release.
+      url = "https://gitlab.com/lv2/lv2.git";
+      rev-prefix = "v";
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://lv2plug.in";
+    description = "A plugin standard for audio systems";
+    license = licenses.mit;
+    maintainers = with maintainers; [ goibhniu ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/audio/lvtk/default.nix b/nixpkgs/pkgs/development/libraries/audio/lvtk/default.nix
new file mode 100644
index 000000000000..9822640f8d67
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audio/lvtk/default.nix
@@ -0,0 +1,42 @@
+{ lib, stdenv, fetchFromGitHub, boost, gtkmm2, lv2, pkg-config, python3, wafHook }:
+
+stdenv.mkDerivation rec {
+  pname = "lvtk";
+  version = "1.2.0";
+
+  src = fetchFromGitHub {
+    owner = "lvtk";
+    repo = "lvtk";
+    rev = version;
+    sha256 = "sha256-6IoyhBig3Nvc4Y8F0w8b1up6sn8O2RmoUVaBQ//+Aaw=";
+  };
+
+  nativeBuildInputs = [ pkg-config python3 wafHook ];
+  buildInputs = [ boost gtkmm2 lv2 ];
+
+  enableParallelBuilding = true;
+
+  postPatch = ''
+    # Fix including the boost libraries during linking
+    sed -i '/target[ ]*= "ttl2c"/ ilib=["boost_system"],' tools/wscript_build
+
+    # don't use bundled waf
+    rm waf
+
+    # remove (useless) python2 based print
+    sed -e '/print/d' -i wscript
+  '';
+
+  wafConfigureFlags = [
+    "--boost-includes=${boost.dev}/include"
+    "--boost-libs=${boost.out}/lib"
+  ];
+
+  meta = with lib; {
+    description = "A set C++ wrappers around the LV2 C API";
+    homepage = "https://lvtk.org/";
+    license = licenses.gpl3;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/audio/mbelib/default.nix b/nixpkgs/pkgs/development/libraries/audio/mbelib/default.nix
new file mode 100644
index 000000000000..dccb738a30f4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audio/mbelib/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "mbelib";
+  version = "1.3.0";
+
+  src = fetchFromGitHub {
+    owner = "szechyjs";
+    repo = "mbelib";
+    rev = "v${version}";
+    sha256 = "0v6b7nf8fgxy7vzgcwffqyql5zhldrz30c88k1ylbjp78hwh4rif";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "P25 Phase 1 and ProVoice vocoder";
+    homepage = "https://github.com/szechyjs/mbelib";
+    license = licenses.isc;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ andrew-d ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/audio/ntk/default.nix b/nixpkgs/pkgs/development/libraries/audio/ntk/default.nix
new file mode 100644
index 000000000000..d101e2a960c6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audio/ntk/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, cairo, libjpeg, libXft, pkg-config, python3, wafHook }:
+
+stdenv.mkDerivation rec {
+  pname = "ntk";
+  version = "1.3.1001";
+  src = fetchFromGitHub {
+    owner = "linuxaudio";
+    repo = "ntk";
+    rev = "v${version}";
+    sha256 = "sha256-NyEdg6e+9CI9V+TIgdpPyH1ei+Vq8pUxD3wPzWY5fEU=";
+  };
+
+  nativeBuildInputs = [ pkg-config wafHook ];
+  buildInputs = [
+    cairo libjpeg libXft python3
+  ];
+
+  meta = {
+    description = "Fork of FLTK 1.3.0 with additional functionality";
+    version = version;
+    homepage = "http://non.tuxfamily.org/";
+    license = lib.licenses.lgpl21;
+    maintainers = with lib.maintainers; [ magnetophon nico202 ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/audio/qm-dsp/default.nix b/nixpkgs/pkgs/development/libraries/audio/qm-dsp/default.nix
new file mode 100644
index 000000000000..01a3933fe2b3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audio/qm-dsp/default.nix
@@ -0,0 +1,58 @@
+{ lib, stdenv
+, fetchFromGitHub
+, fetchpatch
+, kissfft
+}:
+
+stdenv.mkDerivation rec {
+  pname = "qm-dsp";
+  version = "1.7.1";
+
+  src = fetchFromGitHub {
+    owner = "c4dm";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1vkb1xr2hjcaw88gig7rknlwsx01lm0w94d2z0rk5vz9ih4fslvv";
+  };
+
+  patches = [
+    # Make installable
+    (fetchpatch {
+      url = "https://src.fedoraproject.org/rpms/qm-dsp/raw/6eb385e2f970c4150f9c8eba73b558318475ed15/f/qm-dsp-install.patch";
+      sha256 = "071g30p17ya0pknzqa950pb93vrgp2024ray8axn22c44gvy147c";
+    })
+    (fetchpatch {
+      url = "https://src.fedoraproject.org/rpms/qm-dsp/raw/6eb385e2f970c4150f9c8eba73b558318475ed15/f/qm-dsp-flags.patch";
+      sha256 = "127n6j5bsp94kf2m1zqfvkf4iqk1h5f7w778bk7w02vi45nm4x6q";
+      postFetch = ''
+        sed -i 's~/Makefile~/build/linux/Makefile.linux32~g' "$out"
+      '';
+    })
+  ];
+
+  buildInputs = [
+    kissfft
+  ];
+
+  makefile = "build/linux/Makefile.linux32";
+
+  makeFlags = [
+    "PREFIX=${placeholder "out"}"
+    "LIBDIR=${placeholder "out"}/lib"
+  ];
+
+  postInstall = ''
+    mv $out/include/qm-dsp/* $out/include
+    rmdir $out/include/qm-dsp
+  '';
+
+  env.NIX_CFLAGS_COMPILE = "-I${kissfft}/include/kissfft";
+
+  meta = with lib; {
+    description = "A C++ library of functions for DSP and Music Informatics purposes";
+    homepage = "https://code.soundsoftware.ac.uk/projects/qm-dsp";
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/audio/raul/default.nix b/nixpkgs/pkgs/development/libraries/audio/raul/default.nix
new file mode 100644
index 000000000000..c200d4ab79c5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audio/raul/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchgit, boost, gtk2, pkg-config, python3, wafHook }:
+
+stdenv.mkDerivation rec {
+  pname = "raul";
+  version = "unstable-2019-12-09";
+  name = "${pname}-${version}";
+
+  src = fetchgit {
+    url = "https://gitlab.com/drobilla/raul.git";
+    fetchSubmodules = true;
+    rev = "e87bb398f025912fb989a09f1450b838b251aea1";
+    sha256 = "1z37jb6ghc13b8nv8a8hcg669gl8vh4ni9djvfgga9vcz8rmcg8l";
+  };
+
+  nativeBuildInputs = [ pkg-config wafHook python3 ];
+  buildInputs = [ boost gtk2 ];
+
+  strictDeps = true;
+
+  meta = with lib; {
+    description = "A C++ utility library primarily aimed at audio/musical applications";
+    homepage = "http://drobilla.net/software/raul";
+    license = licenses.gpl3;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/audio/roc-toolkit/default.nix b/nixpkgs/pkgs/development/libraries/audio/roc-toolkit/default.nix
new file mode 100644
index 000000000000..cbb580413c2b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audio/roc-toolkit/default.nix
@@ -0,0 +1,71 @@
+{ stdenv,
+  lib,
+  fetchFromGitHub,
+  scons,
+  ragel,
+  gengetopt,
+  pkg-config,
+  libuv,
+  openfecSupport ? true,
+  openfec,
+  speexdsp,
+  libunwindSupport ? true,
+  libunwind,
+  pulseaudioSupport ? true,
+  libpulseaudio,
+  opensslSupport ? true,
+  openssl,
+  soxSupport ? true,
+  sox
+}:
+
+stdenv.mkDerivation rec {
+  pname = "roc-toolkit";
+  version = "0.3.0";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "roc-streaming";
+    repo = "roc-toolkit";
+    rev = "v${version}";
+    hash = "sha256-tC0rjb3eDtEciUk0NmVye+N//Y/RFsi5d3kFS031y8I=";
+  };
+
+  nativeBuildInputs = [
+    scons
+    ragel
+    gengetopt
+    pkg-config
+  ];
+
+  propagatedBuildInputs = [
+    libuv
+    speexdsp
+  ] ++ lib.optional openfecSupport openfec
+    ++ lib.optional libunwindSupport libunwind
+    ++ lib.optional pulseaudioSupport libpulseaudio
+    ++ lib.optional opensslSupport openssl
+    ++ lib.optional soxSupport sox;
+
+  sconsFlags =
+    [ "--build=${stdenv.buildPlatform.config}"
+      "--host=${stdenv.hostPlatform.config}"
+      "--prefix=${placeholder "out"}" ] ++
+    lib.optional (!opensslSupport) "--disable-openssl" ++
+    lib.optional (!soxSupport) "--disable-sox" ++
+    lib.optional (!libunwindSupport) "--disable-libunwind" ++
+    lib.optional (!pulseaudioSupport) "--disable-pulseaudio" ++
+    (if (!openfecSupport)
+       then ["--disable-openfec"]
+       else [ "--with-libraries=${openfec}/lib"
+              "--with-openfec-includes=${openfec.dev}/include" ]);
+
+  meta = with lib; {
+    description = "Roc is a toolkit for real-time audio streaming over the network";
+    homepage = "https://github.com/roc-streaming/roc-toolkit";
+    license = licenses.mpl20;
+    maintainers = with maintainers; [ bgamari ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/audio/rtaudio/default.nix b/nixpkgs/pkgs/development/libraries/audio/rtaudio/default.nix
new file mode 100644
index 000000000000..11305b3735be
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audio/rtaudio/default.nix
@@ -0,0 +1,49 @@
+{ stdenv
+, lib
+, config
+, fetchFromGitHub
+, cmake
+, pkg-config
+, alsaSupport ? stdenv.hostPlatform.isLinux
+, alsa-lib
+, pulseaudioSupport ? config.pulseaudio or stdenv.hostPlatform.isLinux
+, libpulseaudio
+, jackSupport ? true
+, jack
+, coreaudioSupport ? stdenv.hostPlatform.isDarwin
+, CoreAudio
+}:
+
+stdenv.mkDerivation rec {
+  pname = "rtaudio";
+  version = "5.2.0";
+
+  src = fetchFromGitHub {
+    owner = "thestk";
+    repo = "rtaudio";
+    rev = version;
+    sha256 = "0xvahlfj3ysgsjsp53q81hayzw7f99n1g214gh7dwdr52kv2l987";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = lib.optional alsaSupport alsa-lib
+    ++ lib.optional pulseaudioSupport libpulseaudio
+    ++ lib.optional jackSupport jack
+    ++ lib.optional coreaudioSupport CoreAudio;
+
+  cmakeFlags = [
+    "-DRTAUDIO_API_ALSA=${if alsaSupport then "ON" else "OFF"}"
+    "-DRTAUDIO_API_PULSE=${if pulseaudioSupport then "ON" else "OFF"}"
+    "-DRTAUDIO_API_JACK=${if jackSupport then "ON" else "OFF"}"
+    "-DRTAUDIO_API_CORE=${if coreaudioSupport then "ON" else "OFF"}"
+  ];
+
+  meta = with lib; {
+    description = "A set of C++ classes that provide a cross platform API for realtime audio input/output";
+    homepage = "https://www.music.mcgill.ca/~gary/rtaudio/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ magnetophon ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/audio/rtmidi/default.nix b/nixpkgs/pkgs/development/libraries/audio/rtmidi/default.nix
new file mode 100644
index 000000000000..0780d2978805
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audio/rtmidi/default.nix
@@ -0,0 +1,62 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, pkg-config
+, alsaSupport ? stdenv.hostPlatform.isLinux
+, alsa-lib
+, jackSupport ? true
+, jack
+, coremidiSupport ? stdenv.hostPlatform.isDarwin
+, CoreMIDI
+, CoreAudio
+, CoreServices
+}:
+
+stdenv.mkDerivation rec {
+  pname = "rtmidi";
+  version = "5.0.0";
+
+  src = fetchFromGitHub {
+    owner = "thestk";
+    repo = "rtmidi";
+    rev = version;
+    sha256 = "1r1sqmdi499zfh6z6kjkab6d4a7kz3il5kkcdfz9saa6ry992211";
+  };
+
+  patches = [
+    # Remove when https://github.com/thestk/rtmidi/pull/278 merged
+    (fetchpatch {
+      name = "0001-rtmidi-Use-posix-sched_yield-instead-of-pthread_yield.patch";
+      url = "https://github.com/thestk/rtmidi/pull/278/commits/cfe34c02112c256235b62b45895fc2c401fd874d.patch";
+      sha256 = "0yzq7zbdkl5r4i0r6vy2kq986cqdxz2cpzb7s977mvh09kdikrw1";
+    })
+    # Remove when https://github.com/thestk/rtmidi/pull/277 merged
+    (fetchpatch {
+      name = "0002-rtmidi-include-TargetConditionals.h-on-Apple-platforms.patch";
+      url = "https://github.com/thestk/rtmidi/pull/277/commits/9d863beb28f03ec53f3e4c22cc0d3c34a1e1789b.patch";
+      sha256 = "1hlrg23c1ycnwdvxpic8wvypiril04rlph0g820qn1naf92imfjg";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = lib.optional alsaSupport alsa-lib
+    ++ lib.optional jackSupport jack
+    ++ lib.optionals coremidiSupport [ CoreMIDI CoreAudio CoreServices ];
+
+  cmakeFlags = [
+    "-DRTMIDI_API_ALSA=${if alsaSupport then "ON" else "OFF"}"
+    "-DRTMIDI_API_JACK=${if jackSupport then "ON" else "OFF"}"
+    "-DRTMIDI_API_CORE=${if coremidiSupport then "ON" else "OFF"}"
+  ];
+
+  meta = with lib; {
+    description = "A set of C++ classes that provide a cross platform API for realtime MIDI input/output";
+    homepage = "https://www.music.mcgill.ca/~gary/rtmidi/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ magnetophon ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/audio/sratom/default.nix b/nixpkgs/pkgs/development/libraries/audio/sratom/default.nix
new file mode 100644
index 000000000000..26a55efd786a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audio/sratom/default.nix
@@ -0,0 +1,68 @@
+{ lib
+, stdenv
+, fetchurl
+, lv2
+, meson
+, ninja
+, pkg-config
+, serd
+, sord
+, writeScript
+}:
+
+stdenv.mkDerivation rec {
+  pname = "sratom";
+  version = "0.6.16";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "https://download.drobilla.net/${pname}-${version}.tar.xz";
+    hash = "sha256-ccFXmRGD5T0FVTk7tCccdcm19dq3Sl7yLyCLsi3jIsQ=";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+  ];
+
+  buildInputs = [
+    lv2
+    serd
+    sord
+  ];
+
+  postPatch = ''
+    patchShebangs --build scripts/dox_to_sphinx.py
+  '';
+
+  mesonFlags = [
+    "-Ddocs=disabled"
+  ];
+
+  passthru = {
+    updateScript = writeScript "update-sratom" ''
+      #!/usr/bin/env nix-shell
+      #!nix-shell -i bash -p curl pcre common-updater-scripts
+
+      set -eu -o pipefail
+
+      # Expect the text in format of 'download.drobilla.net/sratom-0.30.16.tar.xz">'
+      new_version="$(curl -s https://drobilla.net/category/sratom/ |
+          pcregrep -o1 'download.drobilla.net/sratom-([0-9.]+).tar.xz' |
+          head -n1)"
+      update-source-version ${pname} "$new_version"
+    '';
+  };
+
+  meta = with lib; {
+    homepage = "https://drobilla.net/software/sratom";
+    description = "A library for serialising LV2 atoms to/from RDF";
+    license = licenses.mit;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/audio/suil/default.nix b/nixpkgs/pkgs/development/libraries/audio/suil/default.nix
new file mode 100644
index 000000000000..3dc3bb5dacdc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audio/suil/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, lib, fetchurl, gtk2, lv2, pkg-config, python3, serd, sord, sratom
+, wafHook
+, withQt5 ? true, qt5 ? null
+}:
+
+stdenv.mkDerivation rec {
+  pname = "suil";
+  version = "0.10.6";
+
+  src = fetchurl {
+    url = "https://download.drobilla.net/${pname}-${version}.tar.bz2";
+    sha256 = "0z4v01pjw4wh65x38w6icn28wdwxz13ayl8hvn4p1g9kmamp1z06";
+  };
+
+  nativeBuildInputs = [ pkg-config wafHook python3 ];
+  buildInputs = [ gtk2 lv2 serd sord sratom ]
+    ++ lib.optionals withQt5 (with qt5; [ qtbase qttools ]);
+
+  dontWrapQtApps = true;
+
+  strictDeps = true;
+
+  meta = with lib; {
+    homepage = "http://drobilla.net/software/suil";
+    description = "A lightweight C library for loading and wrapping LV2 plugin UIs";
+    license = licenses.mit;
+    maintainers = with maintainers; [ goibhniu ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/audio/vamp-plugin-sdk/default.nix b/nixpkgs/pkgs/development/libraries/audio/vamp-plugin-sdk/default.nix
new file mode 100644
index 000000000000..65ce6580dcec
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audio/vamp-plugin-sdk/default.nix
@@ -0,0 +1,33 @@
+# set VAMP_PATH ?
+# plugins availible on sourceforge and http://www.vamp-plugins.org/download.html (various licenses)
+
+{ lib, stdenv, fetchFromGitHub, pkg-config, libsndfile }:
+
+stdenv.mkDerivation rec {
+  pname = "vamp-plugin-sdk";
+  version = "2.10";
+
+  src = fetchFromGitHub {
+    owner = "c4dm";
+    repo = "vamp-plugin-sdk";
+    rev = "vamp-plugin-sdk-v${version}";
+    sha256 = "1lhmskcyk7qqfikmasiw7wjry74gc8g5q6a3j1iya84yd7ll0cz6";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libsndfile ];
+
+  enableParallelBuilding = true;
+  makeFlags = [
+    "AR:=$(AR)"
+    "RANLIB:=$(RANLIB)"
+  ] ++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "-o test";
+
+  meta = with lib; {
+    description = "Audio processing plugin system for plugins that extract descriptive information from audio data";
+    homepage = "https://vamp-plugins.org/";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.goibhniu maintainers.marcweber ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/audio/zita-alsa-pcmi/default.nix b/nixpkgs/pkgs/development/libraries/audio/zita-alsa-pcmi/default.nix
new file mode 100644
index 000000000000..fc5162b34e8d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audio/zita-alsa-pcmi/default.nix
@@ -0,0 +1,64 @@
+{ lib, stdenv, fetchurl , alsa-lib, }:
+
+stdenv.mkDerivation rec {
+  pname = "zita-alsa-pcmi";
+  version = "0.6.1";
+  src = fetchurl {
+    url = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-iil6zj16R0Ex7T+jIQacExM3eFtWojfW8WjIXueW1Ww=";
+  };
+
+  buildInputs = [ alsa-lib ];
+
+  buildPhase = ''
+    cd source
+    make PREFIX="$out"
+
+    # create lib link for building apps
+    ln -s libzita-alsa-pcmi.so.$version libzita-alsa-pcmi.so
+
+    # apps
+    cd ../apps
+    CXXFLAGS+=" -I../source" \
+    LDFLAGS+=" -L../source" \
+    make PREFIX="$out"
+  '';
+
+  installPhase = ''
+    mkdir "$out"
+    mkdir "$out/lib"
+    mkdir "$out/include"
+    mkdir "$out/bin"
+
+    cd ../source
+
+    # source
+    install -Dm755 libzita-alsa-pcmi.so.$version \
+      "$out/lib/libzita-alsa-pcmi.so.$version"
+
+    # link
+    ln -s libzita-alsa-pcmi.so.$version \
+      "$out/lib/libzita-alsa-pcmi.so"
+    ln -s libzita-alsa-pcmi.so.$version \
+      "$out/lib/libzita-alsa-pcmi.so.0"
+
+    # header
+    install -Dm644 zita-alsa-pcmi.h \
+      "$out/include/zita-alsa-pcmi.h"
+
+    # apps
+    install -Dm755 ../apps/alsa_delay \
+      "$out/bin/alsa_delay"
+    install -Dm755 ../apps/alsa_loopback \
+      "$out/bin/alsa_loopback"
+  '';
+
+  meta = {
+    description = "The successor of clalsadrv, provides easy access to ALSA PCM devices";
+    version = version;
+    homepage = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/index.html";
+    license = lib.licenses.gpl3;
+    maintainers = [ lib.maintainers.magnetophon ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/audio/zita-convolver/default.nix b/nixpkgs/pkgs/development/libraries/audio/zita-convolver/default.nix
new file mode 100644
index 000000000000..3b77bf549ca6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audio/zita-convolver/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchurl, fftwFloat }:
+
+stdenv.mkDerivation rec {
+  pname = "zita-convolver";
+  version = "4.0.3";
+  src = fetchurl {
+    url = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2";
+    sha256 = "0prji66p86z2bzminywkwchr5bfgxcg2i8y803pydd1hzf2198cs";
+  };
+
+  buildInputs = [ fftwFloat ];
+
+  patchPhase = ''
+    cd source
+    sed -e "s@ldconfig@@" -i Makefile
+  '';
+
+  makeFlags = [
+    "PREFIX=$(out)"
+    "SUFFIX="
+  ];
+
+  postInstall = ''
+    # create lib link for building apps
+    ln -s $out/lib/libzita-convolver.so.${version} $out/lib/libzita-convolver.so.${lib.versions.major version}
+  '';
+
+  meta = {
+    description = "Convolution library by Fons Adriaensen";
+    version = version;
+    homepage = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/index.html";
+    license = lib.licenses.gpl2;
+    maintainers = [ lib.maintainers.magnetophon ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/audio/zita-resampler/default.nix b/nixpkgs/pkgs/development/libraries/audio/zita-resampler/default.nix
new file mode 100644
index 000000000000..70054134767a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audio/zita-resampler/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "zita-resampler";
+  version = "1.8.0";
+
+  src = fetchurl {
+    url = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-5XRPI8VN0Vs/eDpoe9h57uKmkKRUWhW0nEzwN6pGSqI=";
+  };
+
+  makeFlags = [
+    "PREFIX=$(out)"
+    "SUFFIX="
+  ];
+
+  postPatch = ''
+    cd source
+    substituteInPlace Makefile \
+      --replace 'ldconfig' ""
+  '' + lib.optionalString (!stdenv.hostPlatform.isx86_64) ''
+    substituteInPlace Makefile \
+      --replace '-DENABLE_SSE2' ""
+  '';
+
+  fixupPhase = ''
+    ln -s $out/lib/libzita-resampler.so.$version $out/lib/libzita-resampler.so.1
+  '';
+
+  meta = {
+    description = "Resample library by Fons Adriaensen";
+    version = version;
+    homepage = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/index.html";
+    license = lib.licenses.gpl2;
+    maintainers = [ lib.maintainers.magnetophon ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/audio/zix/default.nix b/nixpkgs/pkgs/development/libraries/audio/zix/default.nix
new file mode 100644
index 000000000000..0fc0635747e5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audio/zix/default.nix
@@ -0,0 +1,55 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, fetchpatch
+, meson
+, ninja
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "zix";
+  version = "0.4.2";
+
+  src = fetchFromGitLab {
+    owner = "drobilla";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-nMm3Mdqc4ncCae8SoyGxZYURzmXLNcp1GjsSExfB6x4=";
+  };
+
+  patches = [
+    # clang-16 support on Darwin:
+    #   https://gitlab.com/drobilla/zix/-/issues/3
+    (fetchpatch {
+      name = "darwin-sync.patch";
+      url = "https://gitlab.com/drobilla/zix/-/commit/a6f804073de1f1e626464a9dd0a169fd3f69fdff.patch";
+      hash = "sha256-ZkDPjtUzIyqnYarQR+7aCj7S/gSngbd6d75aRT+h7Ww=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+  ];
+
+  mesonFlags = [
+    "-Dbenchmarks=disabled"
+    "-Ddocs=disabled"
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "A lightweight C99 portability and data structure library";
+    homepage = "https://gitlab.com/drobilla/zix";
+    changelog = "https://gitlab.com/drobilla/zix/-/blob/${src.rev}/NEWS";
+    license = licenses.isc;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [
+      fogti
+      yuu
+    ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/audiofile/CVE-2015-7747.patch b/nixpkgs/pkgs/development/libraries/audiofile/CVE-2015-7747.patch
new file mode 100644
index 000000000000..a01aaa14dcee
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audiofile/CVE-2015-7747.patch
@@ -0,0 +1,161 @@
+Description: fix buffer overflow when changing both sample format and
+ number of channels
+Origin: backport, https://github.com/mpruett/audiofile/pull/25
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/audiofile/+bug/1502721
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=801102
+
+Index: audiofile-0.3.6/libaudiofile/modules/ModuleState.cpp
+===================================================================
+--- audiofile-0.3.6.orig/libaudiofile/modules/ModuleState.cpp	2015-10-20 08:00:58.036128202 -0400
++++ audiofile-0.3.6/libaudiofile/modules/ModuleState.cpp	2015-10-20 08:00:58.036128202 -0400
+@@ -402,7 +402,7 @@
+		addModule(new Transform(outfc, in.pcm, out.pcm));
+
+	if (in.channelCount != out.channelCount)
+-		addModule(new ApplyChannelMatrix(infc, isReading,
++		addModule(new ApplyChannelMatrix(outfc, isReading,
+			in.channelCount, out.channelCount,
+			in.pcm.minClip, in.pcm.maxClip,
+			track->channelMatrix));
+Index: audiofile-0.3.6/test/Makefile.am
+===================================================================
+--- audiofile-0.3.6.orig/test/Makefile.am	2015-10-20 08:00:58.036128202 -0400
++++ audiofile-0.3.6/test/Makefile.am	2015-10-20 08:00:58.036128202 -0400
+@@ -26,6 +26,7 @@
+	VirtualFile \
+	floatto24 \
+	query2 \
++	sixteen-stereo-to-eight-mono \
+	sixteen-to-eight \
+	testchannelmatrix \
+	testdouble \
+@@ -139,6 +140,7 @@
+ printmarkers_LDADD = $(LIBAUDIOFILE) -lm
+
+ sixteen_to_eight_SOURCES = sixteen-to-eight.c TestUtilities.cpp TestUtilities.h
++sixteen_stereo_to_eight_mono_SOURCES = sixteen-stereo-to-eight-mono.c TestUtilities.cpp TestUtilities.h
+
+ testchannelmatrix_SOURCES = testchannelmatrix.c TestUtilities.cpp TestUtilities.h
+
+Index: audiofile-0.3.6/test/sixteen-stereo-to-eight-mono.c
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ audiofile-0.3.6/test/sixteen-stereo-to-eight-mono.c	2015-10-20 08:33:57.512286416 -0400
+@@ -0,0 +1,117 @@
++/*
++	Audio File Library
++
++	Copyright 2000, Silicon Graphics, Inc.
++
++	This program is free software; you can redistribute it and/or modify
++	it under the terms of the GNU General Public License as published by
++	the Free Software Foundation; either version 2 of the License, or
++	(at your option) any later version.
++
++	This program is distributed in the hope that it will be useful,
++	but WITHOUT ANY WARRANTY; without even the implied warranty of
++	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++	GNU General Public License for more details.
++
++	You should have received a copy of the GNU General Public License along
++	with this program; if not, write to the Free Software Foundation, Inc.,
++	51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
++*/
++
++/*
++	sixteen-stereo-to-eight-mono.c
++
++	This program tests the conversion from 2-channel 16-bit integers to
++	1-channel 8-bit	integers.
++*/
++
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#endif
++
++#include <stdint.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
++#include <limits.h>
++
++#include <audiofile.h>
++
++#include "TestUtilities.h"
++
++int main (int argc, char **argv)
++{
++	AFfilehandle file;
++	AFfilesetup setup;
++	int16_t frames16[] = {14298, 392, 3923, -683, 958, -1921};
++	int8_t frames8[] = {28, 6, -2};
++	int i, frameCount = 3;
++	int8_t byte;
++	AFframecount result;
++
++	setup = afNewFileSetup();
++
++	afInitFileFormat(setup, AF_FILE_WAVE);
++
++	afInitSampleFormat(setup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
++	afInitChannels(setup, AF_DEFAULT_TRACK, 2);
++
++	char testFileName[PATH_MAX];
++	if (!createTemporaryFile("sixteen-to-eight", testFileName))
++	{
++		fprintf(stderr, "Could not create temporary file.\n");
++		exit(EXIT_FAILURE);
++	}
++
++	file = afOpenFile(testFileName, "w", setup);
++	if (file == AF_NULL_FILEHANDLE)
++	{
++		fprintf(stderr, "could not open file for writing\n");
++		exit(EXIT_FAILURE);
++	}
++
++	afFreeFileSetup(setup);
++
++	afWriteFrames(file, AF_DEFAULT_TRACK, frames16, frameCount);
++
++	afCloseFile(file);
++
++	file = afOpenFile(testFileName, "r", AF_NULL_FILESETUP);
++	if (file == AF_NULL_FILEHANDLE)
++	{
++		fprintf(stderr, "could not open file for reading\n");
++		exit(EXIT_FAILURE);
++	}
++
++	afSetVirtualSampleFormat(file, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 8);
++	afSetVirtualChannels(file, AF_DEFAULT_TRACK, 1);
++
++	for (i=0; i<frameCount; i++)
++	{
++		/* Read one frame. */
++		result = afReadFrames(file, AF_DEFAULT_TRACK, &byte, 1);
++
++		if (result != 1)
++			break;
++
++		/* Compare the byte read with its precalculated value. */
++		if (memcmp(&byte, &frames8[i], 1) != 0)
++		{
++			printf("error\n");
++			printf("expected %d, got %d\n", frames8[i], byte);
++			exit(EXIT_FAILURE);
++		}
++		else
++		{
++#ifdef DEBUG
++			printf("got what was expected: %d\n", byte);
++#endif
++		}
++	}
++
++	afCloseFile(file);
++	unlink(testFileName);
++
++	exit(EXIT_SUCCESS);
++}
diff --git a/nixpkgs/pkgs/development/libraries/audiofile/default.nix b/nixpkgs/pkgs/development/libraries/audiofile/default.nix
new file mode 100644
index 000000000000..f9974e2ca253
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audiofile/default.nix
@@ -0,0 +1,97 @@
+{ stdenv, lib, fetchurl, fetchpatch, alsa-lib, AudioUnit, CoreServices }:
+
+let
+
+  fetchDebianPatch = { name, debname, sha256 }:
+    fetchpatch {
+      inherit sha256 name;
+      url = "https://salsa.debian.org/multimedia-team/audiofile/raw/debian/0.3.6-4/debian/patches/${debname}";
+    };
+
+in
+
+stdenv.mkDerivation rec {
+  pname = "audiofile";
+  version = "0.3.6";
+
+  buildInputs =
+    lib.optionals stdenv.isLinux [
+      alsa-lib
+    ] ++ lib.optionals stdenv.isDarwin [
+      CoreServices AudioUnit
+    ];
+
+  src = fetchurl {
+    url = "https://audiofile.68k.org/audiofile-${version}.tar.gz";
+    sha256 = "0rb927zknk9kmhprd8rdr4azql4gn2dp75a36iazx2xhkbqhvind";
+  };
+
+  outputs = [ "out" "dev" "man" ];
+
+  # std::unary_function has been removed in c++17
+  makeFlags = [ "CXXFLAGS=-std=c++11" ];
+
+  # Even when statically linking, libstdc++.la is put in dependency_libs here,
+  # and hence libstdc++.so passed to the linker, just pass -lstdc++ and let the
+  # compiler do what it does best.  (libaudiofile.la is a generated file, so we
+  # have to run `make` that far first).
+  #
+  # Without this, the executables in this package (sfcommands and examples)
+  # fail to build: https://github.com/NixOS/nixpkgs/issues/103215
+  #
+  # There might be a more sensible way to do this with autotools, but I am not
+  # smart enough to discover it.
+  preBuild = lib.optionalString stdenv.hostPlatform.isStatic ''
+    make -C libaudiofile $makeFlags
+    sed -i "s/dependency_libs=.*/dependency_libs=' -lstdc++'/" libaudiofile/libaudiofile.la
+  '';
+
+  patches = [
+    ./gcc-6.patch
+    ./CVE-2015-7747.patch
+
+    (fetchDebianPatch {
+      name = "CVE-2017-6829.patch";
+      debname = "04_clamp-index-values-to-fix-index-overflow-in-IMA.cpp.patch";
+      sha256 = "04qxl51i64c53v69q2kx61qdq474f4vapk8rq97cipj7yrar392m";
+    })
+    (fetchDebianPatch {
+      name = "CVE-2017-6827+CVE-2017-6828+CVE-2017-6832+CVE-2017-6835+CVE-2017-6837.patch";
+      debname = "05_Always-check-the-number-of-coefficients.patch";
+      sha256 = "1ih03kfkabffi6ymp6832q470i28rsds78941vzqlshnqjb2nnxw";
+    })
+    (fetchDebianPatch {
+      name = "CVE-2017-6839.patch";
+      debname = "06_Check-for-multiplication-overflow-in-MSADPCM-decodeSam.patch";
+      sha256 = "0a8s2z8rljlj03p7l1is9s4fml8vyzvyvfrh1m6xj5a8vbi635d0";
+    })
+    (fetchDebianPatch {
+      name = "CVE-2017-6830+CVE-2017-6834+CVE-2017-6836+CVE-2017-6838.patch";
+      debname = "07_Check-for-multiplication-overflow-in-sfconvert.patch";
+      sha256 = "0rfba8rkasl5ycvc0kqlzinkl3rvyrrjvjhpc45h423wmjk2za2l";
+    })
+    (fetchDebianPatch {
+      name = "audiofile-fix-multiplyCheckOverflow-signature.patch";
+      debname = "08_Fix-signature-of-multiplyCheckOverflow.-It-returns-a-b.patch";
+      sha256 = "032p5jqp7q7jgc5axdnazz00zm7hd26z6m5j55ifs0sykr5lwldb";
+    })
+    (fetchDebianPatch {
+      name = "CVE-2017-6831.patch";
+      debname = "09_Actually-fail-when-error-occurs-in-parseFormat.patch";
+      sha256 = "0csikmj8cbiy6cigg0rmh67jrr0sgm56dfrnrxnac3m9635nxlac";
+    })
+    (fetchDebianPatch {
+      name = "CVE-2017-6833.patch";
+      debname = "10_Check-for-division-by-zero-in-BlockCodec-runPull.patch";
+      sha256 = "1rlislkjawq98bbcf1dgl741zd508wwsg85r37ca7pfdf6wgl6z7";
+    })
+  ];
+
+  meta = with lib; {
+    description = "Library for reading and writing audio files in various formats";
+    homepage    = "http://www.68k.org/~michael/audiofile/";
+    license     = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ lovek323 ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/audiofile/gcc-6.patch b/nixpkgs/pkgs/development/libraries/audiofile/gcc-6.patch
new file mode 100644
index 000000000000..1a7edd5af9a1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/audiofile/gcc-6.patch
@@ -0,0 +1,30 @@
+http://patchwork.ozlabs.org/patch/630200/
+
+From 28cfdbbcb96a69087c3d21faf69b5eae7bcf6d69 Mon Sep 17 00:00:00 2001
+From: Hodorgasm <nsane457@gmail.com>
+Date: Wed, 11 May 2016 21:42:07 -0400
+Subject: [PATCH] Cast to unsigned while left bit-shifting
+
+GCC-6 now treats the left bitwise-shift of a negative integer as nonconformant so explicitly cast to an unsigned int while bit-shifting.
+
+Downloaded from upstream PR:
+https://github.com/mpruett/audiofile/pull/28
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+---
+ libaudiofile/modules/SimpleModule.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libaudiofile/modules/SimpleModule.h b/libaudiofile/modules/SimpleModule.h
+index 03c6c69..4014fb2 100644
+--- a/libaudiofile/modules/SimpleModule.h
++++ b/libaudiofile/modules/SimpleModule.h
+@@ -123,7 +123,7 @@ struct signConverter
+ 	typedef typename IntTypes<Format>::UnsignedType UnsignedType;
+ 
+ 	static const int kScaleBits = (Format + 1) * CHAR_BIT - 1;
+-	static const int kMinSignedValue = -1 << kScaleBits;
++	static const int kMinSignedValue = static_cast<signed>(static_cast<unsigned>(-1) << kScaleBits);;
+ 
+ 	struct signedToUnsigned : public std::unary_function<SignedType, UnsignedType>
+ 	{
diff --git a/nixpkgs/pkgs/development/libraries/avahi/CVE-2023-38469.patch b/nixpkgs/pkgs/development/libraries/avahi/CVE-2023-38469.patch
new file mode 100644
index 000000000000..ff6cd65de0f4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/avahi/CVE-2023-38469.patch
@@ -0,0 +1,102 @@
+From a337a1ba7d15853fb56deef1f464529af6e3a1cf Mon Sep 17 00:00:00 2001
+From: Evgeny Vereshchagin <evvers@ya.ru>
+Date: Mon, 23 Oct 2023 20:29:31 +0000
+Subject: [PATCH 1/2] core: reject overly long TXT resource records
+
+Closes https://github.com/lathiat/avahi/issues/455
+
+CVE-2023-38469
+---
+ avahi-core/rr.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/avahi-core/rr.c b/avahi-core/rr.c
+index 2bb89244..9c04ebbd 100644
+--- a/avahi-core/rr.c
++++ b/avahi-core/rr.c
+@@ -32,6 +32,7 @@
+ #include <avahi-common/malloc.h>
+ #include <avahi-common/defs.h>
+ 
++#include "dns.h"
+ #include "rr.h"
+ #include "log.h"
+ #include "util.h"
+@@ -689,11 +690,17 @@ int avahi_record_is_valid(AvahiRecord *r) {
+         case AVAHI_DNS_TYPE_TXT: {
+ 
+             AvahiStringList *strlst;
++            size_t used = 0;
+ 
+-            for (strlst = r->data.txt.string_list; strlst; strlst = strlst->next)
++            for (strlst = r->data.txt.string_list; strlst; strlst = strlst->next) {
+                 if (strlst->size > 255 || strlst->size <= 0)
+                     return 0;
+ 
++                used += 1+strlst->size;
++                if (used > AVAHI_DNS_RDATA_MAX)
++                    return 0;
++            }
++
+             return 1;
+         }
+     }
+
+From c6cab87df290448a63323c8ca759baa516166237 Mon Sep 17 00:00:00 2001
+From: Evgeny Vereshchagin <evvers@ya.ru>
+Date: Wed, 25 Oct 2023 18:15:42 +0000
+Subject: [PATCH 2/2] tests: pass overly long TXT resource records
+
+to make sure they don't crash avahi any more.
+
+It reproduces https://github.com/lathiat/avahi/issues/455
+---
+ avahi-client/client-test.c       | 14 ++++++++++++++
+ 2 files changed, 20 insertions(+)
+
+diff --git a/avahi-client/client-test.c b/avahi-client/client-test.c
+index ba979988..da0e43ad 100644
+--- a/avahi-client/client-test.c
++++ b/avahi-client/client-test.c
+@@ -22,6 +22,7 @@
+ #endif
+ 
+ #include <stdio.h>
++#include <string.h>
+ #include <assert.h>
+ 
+ #include <avahi-client/client.h>
+@@ -33,6 +34,8 @@
+ #include <avahi-common/malloc.h>
+ #include <avahi-common/timeval.h>
+ 
++#include <avahi-core/dns.h>
++
+ static const AvahiPoll *poll_api = NULL;
+ static AvahiSimplePoll *simple_poll = NULL;
+ 
+@@ -222,6 +225,9 @@ int main (AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+     uint32_t cookie;
+     struct timeval tv;
+     AvahiAddress a;
++    uint8_t rdata[AVAHI_DNS_RDATA_MAX+1];
++    AvahiStringList *txt = NULL;
++    int r;
+ 
+     simple_poll = avahi_simple_poll_new();
+     poll_api = avahi_simple_poll_get(simple_poll);
+@@ -261,6 +267,14 @@ int main (AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+     error = avahi_entry_group_add_record (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", 0x01, 0x10, 120, "", 0);
+     assert(error != AVAHI_OK);
+ 
++    memset(rdata, 1, sizeof(rdata));
++    r = avahi_string_list_parse(rdata, sizeof(rdata), &txt);
++    assert(r >= 0);
++    assert(avahi_string_list_serialize(txt, NULL, 0) == sizeof(rdata));
++    error = avahi_entry_group_add_service_strlst(group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", "_qotd._tcp", NULL, NULL, 123, txt);
++    assert(error == AVAHI_ERR_INVALID_RECORD);
++    avahi_string_list_free(txt);
++
+     avahi_entry_group_commit (group);
+ 
+     domain = avahi_domain_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, AVAHI_DOMAIN_BROWSER_BROWSE, 0, avahi_domain_browser_callback, (char*) "omghai3u");
diff --git a/nixpkgs/pkgs/development/libraries/avahi/CVE-2023-38471-2.patch b/nixpkgs/pkgs/development/libraries/avahi/CVE-2023-38471-2.patch
new file mode 100644
index 000000000000..be0faddbfef5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/avahi/CVE-2023-38471-2.patch
@@ -0,0 +1,47 @@
+From 04ac71fd56a16365360f14bd4691219913e22f21 Mon Sep 17 00:00:00 2001
+From: Evgeny Vereshchagin <evvers@ya.ru>
+Date: Tue, 24 Oct 2023 21:57:32 +0000
+Subject: [PATCH 1/2] smoke-test: call SetHostName with unusual names
+
+It's prompted by https://github.com/lathiat/avahi/issues/453
+---
+ avahi-core/server.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/avahi-core/server.c b/avahi-core/server.c
+index f6a21bb7..84df6b5d 100644
+--- a/avahi-core/server.c
++++ b/avahi-core/server.c
+@@ -1309,10 +1309,13 @@ int avahi_server_set_host_name(AvahiServer *s, const char *host_name) {
+     else
+         hn = avahi_normalize_name_strdup(host_name);
+ 
++    if (!hn)
++        return avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY);
++
+     h = hn;
+     if (!avahi_unescape_label((const char **)&hn, label, sizeof(label))) {
+         avahi_free(h);
+-        return AVAHI_ERR_INVALID_HOST_NAME;
++        return avahi_server_set_errno(s, AVAHI_ERR_INVALID_HOST_NAME);
+     }
+ 
+     avahi_free(h);
+@@ -1320,7 +1323,7 @@ int avahi_server_set_host_name(AvahiServer *s, const char *host_name) {
+     h = label_escaped;
+     len = sizeof(label_escaped);
+     if (!avahi_escape_label(label, strlen(label), &h, &len))
+-        return AVAHI_ERR_INVALID_HOST_NAME;
++        return avahi_server_set_errno(s, AVAHI_ERR_INVALID_HOST_NAME);
+ 
+     if (avahi_domain_equal(s->host_name, label_escaped) && s->state != AVAHI_SERVER_COLLISION)
+         return avahi_server_set_errno(s, AVAHI_ERR_NO_CHANGE);
+@@ -1330,7 +1333,7 @@ int avahi_server_set_host_name(AvahiServer *s, const char *host_name) {
+     avahi_free(s->host_name);
+     s->host_name = avahi_strdup(label_escaped);
+     if (!s->host_name)
+-        return AVAHI_ERR_NO_MEMORY;
++        return avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY);
+ 
+     update_fqdn(s);
+ 
diff --git a/nixpkgs/pkgs/development/libraries/avahi/default.nix b/nixpkgs/pkgs/development/libraries/avahi/default.nix
new file mode 100644
index 000000000000..df3d113dfd2c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/avahi/default.nix
@@ -0,0 +1,184 @@
+{ fetchurl
+, fetchpatch
+, lib
+, stdenv
+, pkg-config
+, libdaemon
+, dbus
+, perlPackages
+, libpcap
+, expat
+, gettext
+, glib
+, libiconv
+, libevent
+, nixosTests
+, gtk3Support ? false
+, gtk3
+, qt5
+, qt5Support ? false
+, withLibdnssdCompat ? false
+, python ? null
+, withPython ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "avahi${lib.optionalString withLibdnssdCompat "-compat"}";
+  version = "0.8";
+
+  src = fetchurl {
+    url = "https://github.com/lathiat/avahi/releases/download/v${version}/avahi-${version}.tar.gz";
+    sha256 = "1npdixwxxn3s9q1f365x9n9rc5xgfz39hxf23faqvlrklgbhj0q6";
+  };
+
+  outputs = [ "out" "dev" "man" ];
+
+  patches = [
+    # CVE-2021-36217 / CVE-2021-3502
+    (fetchpatch {
+      name = "CVE-2021-3502.patch";
+      url = "https://github.com/lathiat/avahi/commit/9d31939e55280a733d930b15ac9e4dda4497680c.patch";
+      sha256 = "sha256-BXWmrLWUvDxKPoIPRFBpMS3T4gijRw0J+rndp6iDybU=";
+    })
+    # CVE-2021-3468
+    (fetchpatch {
+      name = "CVE-2021-3468.patch";
+      url = "https://github.com/lathiat/avahi/commit/447affe29991ee99c6b9732fc5f2c1048a611d3b.patch";
+      sha256 = "sha256-qWaCU1ZkCg2PmijNto7t8E3pYRN/36/9FrG8okd6Gu8=";
+    })
+    (fetchpatch {
+      name = "CVE-2023-1981.patch";
+      url = "https://github.com/lathiat/avahi/commit/a2696da2f2c50ac43b6c4903f72290d5c3fa9f6f.patch";
+      sha256 = "sha256-BEYFGCnQngp+OpiKIY/oaKygX7isAnxJpUPCUvg+efc=";
+    })
+    # CVE-2023-38470
+    # https://github.com/lathiat/avahi/pull/457 merged Sep 19
+    (fetchpatch {
+      name = "CVE-2023-38470.patch";
+      url = "https://github.com/lathiat/avahi/commit/94cb6489114636940ac683515417990b55b5d66c.patch";
+      sha256 = "sha256-Fanh9bvz+uknr5pAmltqijuUAZIG39JR2Lyq5zGKJ58=";
+    })
+    # CVE-2023-38473
+    # https://github.com/lathiat/avahi/pull/486 merged Oct 18
+    (fetchpatch {
+      name = "CVE-2023-38473.patch";
+      url = "https://github.com/lathiat/avahi/commit/b448c9f771bada14ae8de175695a9729f8646797.patch";
+      sha256 = "sha256-/ZVhsBkf70vjDWWG5KXxvGXIpLOZUXdRkn3413iSlnI=";
+    })
+    # CVE-2023-38472
+    # https://github.com/lathiat/avahi/pull/490 merged Oct 19
+    (fetchpatch {
+      name = "CVE-2023-38472.patch";
+      url = "https://github.com/lathiat/avahi/commit/b024ae5749f4aeba03478e6391687c3c9c8dee40.patch";
+      sha256 = "sha256-FjR8fmhevgdxR9JQ5iBLFXK0ILp2OZQ8Oo9IKjefCqk=";
+    })
+    # CVE-2023-38471
+    # https://github.com/lathiat/avahi/pull/494 merged Oct 24
+    (fetchpatch {
+      name = "CVE-2023-38471.patch";
+      url = "https://github.com/lathiat/avahi/commit/894f085f402e023a98cbb6f5a3d117bd88d93b09.patch";
+      sha256 = "sha256-4dG+5ZHDa+A4/CszYS8uXWlpmA89m7/jhbZ7rheMs7U=";
+    })
+    # https://github.com/lathiat/avahi/pull/499 merged Oct 25
+    # (but with the changes to '.github/workflows/smoke-tests.sh removed)
+    ./CVE-2023-38471-2.patch
+    # CVE-2023-38469
+    # https://github.com/lathiat/avahi/pull/500 merged Oct 25
+    # (but with the changes to '.github/workflows/smoke-tests.sh removed)
+    ./CVE-2023-38469.patch
+  ];
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+    gettext
+    glib
+  ];
+
+  buildInputs = [
+    libdaemon
+    dbus
+    glib
+    expat
+    libiconv
+    libevent
+  ] ++ (with perlPackages; [
+    perl
+    XMLParser
+  ]) ++ lib.optionals stdenv.isFreeBSD [
+    libpcap
+  ] ++ lib.optionals gtk3Support [
+    gtk3
+  ] ++ lib.optionals qt5Support [
+    qt5
+  ];
+
+  propagatedBuildInputs = lib.optionals withPython (with python.pkgs; [
+    python
+    pygobject3
+    dbus-python
+  ]);
+
+  configureFlags = [
+    "--disable-gdbm"
+    "--disable-mono"
+    # Use non-deprecated path https://github.com/lathiat/avahi/pull/376
+    "--with-dbus-sys=${placeholder "out"}/share/dbus-1/system.d"
+    (lib.enableFeature gtk3Support "gtk3")
+    (lib.enableFeature qt5Support "qt5")
+    (lib.enableFeature withPython "python")
+    "--localstatedir=/var"
+    "--runstatedir=/run"
+    "--sysconfdir=/etc"
+    "--with-distro=${with stdenv.hostPlatform; if isBSD then parsed.kernel.name else "none"}"
+    # A systemd unit is provided by the avahi-daemon NixOS module
+    "--with-systemdsystemunitdir=no"
+  ] ++ lib.optionals withLibdnssdCompat [
+    "--enable-compat-libdns_sd"
+  ] ++ lib.optionals stdenv.isDarwin [
+    # autoipd won't build on darwin
+    "--disable-autoipd"
+  ];
+
+  installFlags = [
+    # Override directories to install into the package.
+    # Replace with runstatedir once is merged https://github.com/lathiat/avahi/pull/377
+    "avahi_runtime_dir=${placeholder "out"}/run"
+    "sysconfdir=${placeholder "out"}/etc"
+  ];
+
+  preBuild = lib.optionalString stdenv.isDarwin ''
+    sed -i '20 i\
+    #define __APPLE_USE_RFC_2292' \
+    avahi-core/socket.c
+  '';
+
+  postInstall =
+    # Maintain compat for mdnsresponder
+    lib.optionalString withLibdnssdCompat ''
+      ln -s avahi-compat-libdns_sd/dns_sd.h "$dev/include/dns_sd.h"
+    '';
+
+  passthru.tests = {
+    smoke-test = nixosTests.avahi;
+    smoke-test-resolved = nixosTests.avahi-with-resolved;
+  };
+
+  meta = with lib; {
+    description = "mDNS/DNS-SD implementation";
+    homepage = "http://avahi.org";
+    license = licenses.lgpl2Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ lovek323 globin ];
+
+    longDescription = ''
+      Avahi is a system which facilitates service discovery on a local
+      network.  It is an implementation of the mDNS (for "Multicast
+      DNS") and DNS-SD (for "DNS-Based Service Discovery")
+      protocols.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/avro-c++/default.nix b/nixpkgs/pkgs/development/libraries/avro-c++/default.nix
new file mode 100644
index 000000000000..57070c8f442e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/avro-c++/default.nix
@@ -0,0 +1,44 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, cmake
+, boost
+, python3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "avro-c++";
+  version = "1.11.3";
+
+  src = fetchurl {
+    url = "mirror://apache/avro/avro-${version}/cpp/avro-cpp-${version}.tar.gz";
+    hash = "sha256-+6JCrvd+yBnQdWH8upN1FyGVbejQyujh8vMAtUszG64=";
+  };
+  patches = [
+    # This patch fixes boost compatibility and can be removed when
+    # upgrading beyond 1.11.3 https://github.com/apache/avro/pull/1920
+    (fetchpatch {
+      name = "fix-boost-compatibility.patch";
+      url = "https://github.com/apache/avro/commit/016323828f147f185d03f50d2223a2f50bfafce1.patch";
+      hash = "sha256-hP/5J2JzSplMvg8EjEk98Vim8DfTyZ4hZ/WGiVwvM1A=";
+    })
+  ];
+  patchFlags = [ "-p3" ];
+
+  nativeBuildInputs = [ cmake python3 ];
+  buildInputs = [ boost ];
+
+  preConfigure = ''
+    substituteInPlace test/SchemaTests.cc --replace "BOOST_CHECKPOINT" "BOOST_TEST_CHECKPOINT"
+    substituteInPlace test/buffertest.cc --replace "BOOST_MESSAGE" "BOOST_TEST_MESSAGE"
+  '';
+
+  meta = {
+    description = "A C++ library which implements parts of the Avro Specification";
+    homepage = "https://avro.apache.org/";
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ rasendubi ];
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/avro-c/default.nix b/nixpkgs/pkgs/development/libraries/avro-c/default.nix
new file mode 100644
index 000000000000..944182e14124
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/avro-c/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, cmake, fetchurl, pkg-config, jansson, snappy, xz, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "avro-c";
+  version = "1.11.3";
+
+  src = fetchurl {
+    url = "mirror://apache/avro/avro-${version}/c/avro-c-${version}.tar.gz";
+    sha256 = "sha256-chfKrPt9XzRhF2ZHOmbC4nm8e/rxuimMfwSzsvulc2U=";
+  };
+
+  postPatch = ''
+    patchShebangs .
+  '';
+
+  nativeBuildInputs = [ pkg-config cmake ];
+
+  buildInputs = [ jansson snappy xz zlib ];
+
+  meta = with lib; {
+    description = "A C library which implements parts of the Avro Specification";
+    homepage = "https://avro.apache.org/";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ lblasc ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aws-c-auth/default.nix b/nixpkgs/pkgs/development/libraries/aws-c-auth/default.nix
new file mode 100644
index 000000000000..f818e35c458e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aws-c-auth/default.nix
@@ -0,0 +1,58 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, aws-c-cal
+, aws-c-common
+, aws-c-compression
+, aws-c-http
+, aws-c-io
+, aws-c-sdkutils
+, cmake
+, nix
+, s2n-tls
+}:
+
+stdenv.mkDerivation rec {
+  pname = "aws-c-auth";
+  version = "0.7.10";
+
+  src = fetchFromGitHub {
+    owner = "awslabs";
+    repo = "aws-c-auth";
+    rev = "v${version}";
+    hash = "sha256-yJ0sgw0y9tIiIHgTPVnfYd8zAGjO83qfeeEzstGH9CE=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = [
+    aws-c-cal
+    aws-c-common
+    aws-c-compression
+    aws-c-http
+    aws-c-io
+    s2n-tls
+  ];
+
+  propagatedBuildInputs = [
+    aws-c-sdkutils
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+  ];
+
+  passthru.tests = {
+    inherit nix;
+  };
+
+  meta = with lib; {
+    description = "C99 library implementation of AWS client-side authentication";
+    homepage = "https://github.com/awslabs/aws-c-auth";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ r-burns ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aws-c-cal/default.nix b/nixpkgs/pkgs/development/libraries/aws-c-cal/default.nix
new file mode 100644
index 000000000000..6340545e3667
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aws-c-cal/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub, cmake, aws-c-common, nix, openssl, Security }:
+
+stdenv.mkDerivation rec {
+  pname = "aws-c-cal";
+  version = "0.6.9";
+
+  src = fetchFromGitHub {
+    owner = "awslabs";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-m/RwGXeSjYOJQwCxfPyL4TdJ3gV66zHgVkWd3bpSaJE=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ aws-c-common openssl ];
+
+  propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+  ];
+
+  passthru.tests = {
+    inherit nix;
+  };
+
+  meta = with lib; {
+    description = "AWS Crypto Abstraction Layer ";
+    homepage = "https://github.com/awslabs/aws-c-cal";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ orivej ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aws-c-common/default.nix b/nixpkgs/pkgs/development/libraries/aws-c-common/default.nix
new file mode 100644
index 000000000000..5c3abbc58087
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aws-c-common/default.nix
@@ -0,0 +1,57 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, nix
+}:
+
+stdenv.mkDerivation rec {
+  pname = "aws-c-common";
+  version = "0.9.10";
+
+  src = fetchFromGitHub {
+    owner = "awslabs";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-xqNqyVtibR8oSMvl5RTU166FIxcbvGjZJOjJ9j6fU78=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+  ] ++ lib.optionals stdenv.hostPlatform.isRiscV [
+    "-DCMAKE_C_FLAGS=-fasynchronous-unwind-tables"
+  ];
+
+  # aws-c-common misuses cmake modules, so we need
+  # to manually add a MODULE_PATH to its consumers
+  setupHook = ./setup-hook.sh;
+
+  # Prevent the execution of tests known to be flaky.
+  preCheck = let
+    ignoreTests = [
+      "promise_test_multiple_waiters"
+    ] ++ lib.optionals stdenv.hostPlatform.isMusl [
+      "sba_metrics" # https://github.com/awslabs/aws-c-common/issues/839
+    ];
+  in ''
+    cat <<EOW >CTestCustom.cmake
+    SET(CTEST_CUSTOM_TESTS_IGNORE ${toString ignoreTests})
+    EOW
+  '';
+
+  doCheck = true;
+
+  passthru.tests = {
+    inherit nix;
+  };
+
+  meta = with lib; {
+    description = "AWS SDK for C common core";
+    homepage = "https://github.com/awslabs/aws-c-common";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ orivej eelco r-burns ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aws-c-common/setup-hook.sh b/nixpkgs/pkgs/development/libraries/aws-c-common/setup-hook.sh
new file mode 100644
index 000000000000..e670f7cf8529
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aws-c-common/setup-hook.sh
@@ -0,0 +1,5 @@
+addAwsCCommonModuleDir() {
+    cmakeFlags="-DCMAKE_MODULE_PATH=@out@/lib/cmake ${cmakeFlags:-}"
+}
+
+postHooks+=(addAwsCCommonModuleDir)
diff --git a/nixpkgs/pkgs/development/libraries/aws-c-compression/default.nix b/nixpkgs/pkgs/development/libraries/aws-c-compression/default.nix
new file mode 100644
index 000000000000..cc486bc3e6d7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aws-c-compression/default.nix
@@ -0,0 +1,42 @@
+{ lib, stdenv
+, fetchFromGitHub
+, aws-c-common
+, cmake
+, nix
+}:
+
+stdenv.mkDerivation rec {
+  pname = "aws-c-compression";
+  version = "0.2.17";
+
+  src = fetchFromGitHub {
+    owner = "awslabs";
+    repo = "aws-c-compression";
+    rev = "v${version}";
+    sha256 = "sha256-XtmSThfz4Cu7CygYrLNQifDCQ6l/c/0OR0lX+OxCYJM=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = [
+    aws-c-common
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+  ];
+
+  passthru.tests = {
+    inherit nix;
+  };
+
+  meta = with lib; {
+    description = "C99 implementation of huffman encoding/decoding";
+    homepage = "https://github.com/awslabs/aws-c-compression";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ r-burns ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aws-c-event-stream/default.nix b/nixpkgs/pkgs/development/libraries/aws-c-event-stream/default.nix
new file mode 100644
index 000000000000..7f273ac80fa0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aws-c-event-stream/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub, cmake, aws-c-cal, aws-c-common, aws-c-io, aws-checksums, nix, s2n-tls, libexecinfo }:
+
+stdenv.mkDerivation rec {
+  pname = "aws-c-event-stream";
+  version = "0.3.2";
+
+  src = fetchFromGitHub {
+    owner = "awslabs";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-uKprdBJn9yHDm2HCBOiuanizCtLi/VKrvUUScNv6OPY=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ aws-c-cal aws-c-common aws-c-io aws-checksums s2n-tls ]
+    ++ lib.optional stdenv.hostPlatform.isMusl libexecinfo;
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS:BOOL=ON"
+  ];
+
+  passthru.tests = {
+    inherit nix;
+  };
+
+  meta = with lib; {
+    description = "C99 implementation of the vnd.amazon.eventstream content-type";
+    homepage = "https://github.com/awslabs/aws-c-event-stream";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ orivej eelco ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aws-c-http/default.nix b/nixpkgs/pkgs/development/libraries/aws-c-http/default.nix
new file mode 100644
index 000000000000..52d3507b5570
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aws-c-http/default.nix
@@ -0,0 +1,50 @@
+{ lib, stdenv
+, fetchFromGitHub
+, aws-c-cal
+, aws-c-common
+, aws-c-compression
+, aws-c-io
+, cmake
+, nix
+, s2n-tls
+}:
+
+stdenv.mkDerivation rec {
+  pname = "aws-c-http";
+  version = "0.7.14";
+
+  src = fetchFromGitHub {
+    owner = "awslabs";
+    repo = "aws-c-http";
+    rev = "v${version}";
+    sha256 = "sha256-HrNdePWNw/5tDBeybnUjK3LgftnGQ4CBXPG0URaxIeU=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = [
+    aws-c-cal
+    aws-c-common
+    aws-c-compression
+    aws-c-io
+    s2n-tls
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+  ];
+
+  passthru.tests = {
+    inherit nix;
+  };
+
+  meta = with lib; {
+    description = "C99 implementation of the HTTP/1.1 and HTTP/2 specifications";
+    homepage = "https://github.com/awslabs/aws-c-http";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ r-burns ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aws-c-io/default.nix b/nixpkgs/pkgs/development/libraries/aws-c-io/default.nix
new file mode 100644
index 000000000000..abb51d0df417
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aws-c-io/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub, cmake, aws-c-cal, aws-c-common, nix, s2n-tls, Security }:
+
+stdenv.mkDerivation rec {
+  pname = "aws-c-io";
+  version = "0.13.36";
+
+  src = fetchFromGitHub {
+    owner = "awslabs";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-TwPcsTMBOE1uIInH6/eQdUMV6uD7d60773THzc1/G9Y=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ aws-c-cal aws-c-common s2n-tls ];
+  propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+  ];
+
+  passthru.tests = {
+    inherit nix;
+  };
+
+  meta = with lib; {
+    description = "AWS SDK for C module for IO and TLS";
+    homepage = "https://github.com/awslabs/aws-c-io";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ orivej ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aws-c-mqtt/default.nix b/nixpkgs/pkgs/development/libraries/aws-c-mqtt/default.nix
new file mode 100644
index 000000000000..eb20be82f353
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aws-c-mqtt/default.nix
@@ -0,0 +1,53 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, aws-c-cal
+, aws-c-common
+, aws-c-compression
+, aws-c-http
+, aws-c-io
+, cmake
+, nix
+, s2n-tls
+}:
+
+stdenv.mkDerivation rec {
+  pname = "aws-c-mqtt";
+  version = "0.9.10";
+
+  src = fetchFromGitHub {
+    owner = "awslabs";
+    repo = "aws-c-mqtt";
+    rev = "v${version}";
+    sha256 = "sha256-hxisqBUARJLtmZniXaZ2th0hqWiKn4XQIy6I0Oz/kUs=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = [
+    aws-c-cal
+    aws-c-common
+    aws-c-compression
+    aws-c-http
+    aws-c-io
+    s2n-tls
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+  ];
+
+  passthru.tests = {
+    inherit nix;
+  };
+
+  meta = with lib; {
+    description = "C99 implementation of the MQTT 3.1.1 specification";
+    homepage = "https://github.com/awslabs/aws-c-mqtt";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ r-burns ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aws-c-s3/default.nix b/nixpkgs/pkgs/development/libraries/aws-c-s3/default.nix
new file mode 100644
index 000000000000..b3051916fbb8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aws-c-s3/default.nix
@@ -0,0 +1,57 @@
+{ lib, stdenv
+, fetchFromGitHub
+, aws-c-auth
+, aws-c-cal
+, aws-c-common
+, aws-c-compression
+, aws-c-http
+, aws-c-io
+, aws-checksums
+, cmake
+, nix
+, s2n-tls
+}:
+
+stdenv.mkDerivation rec {
+  pname = "aws-c-s3";
+  version = "0.4.0";
+
+  src = fetchFromGitHub {
+    owner = "awslabs";
+    repo = "aws-c-s3";
+    rev = "v${version}";
+    sha256 = "sha256-tb9h78Gd4N11DPB2ETq241lvDQqHIy2HYBsJrBlLpxA=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = [
+    aws-c-auth
+    aws-c-cal
+    aws-c-common
+    aws-c-compression
+    aws-c-http
+    aws-c-io
+    aws-checksums
+    s2n-tls
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+  ];
+
+  passthru.tests = {
+    inherit nix;
+  };
+
+  meta = with lib; {
+    description = "C99 library implementation for communicating with the S3 service";
+    homepage = "https://github.com/awslabs/aws-c-s3";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ r-burns ];
+    mainProgram = "s3";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aws-c-sdkutils/default.nix b/nixpkgs/pkgs/development/libraries/aws-c-sdkutils/default.nix
new file mode 100644
index 000000000000..2c76371955cb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aws-c-sdkutils/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv
+, fetchFromGitHub
+, aws-c-common
+, cmake
+, nix
+}:
+
+stdenv.mkDerivation rec {
+  pname = "aws-c-sdkutils";
+  version = "0.1.12";
+
+  src = fetchFromGitHub {
+    owner = "awslabs";
+    repo = "aws-c-sdkutils";
+    rev = "v${version}";
+    sha256 = "sha256-4YuOC90FBcuNYGBsqw3wKYNGkg3MssezvR8bu6BNGeM=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = [
+    aws-c-common
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+  ];
+
+  doCheck = true;
+
+  passthru.tests = {
+    inherit nix;
+  };
+
+  meta = with lib; {
+    description = "AWS SDK utility library";
+    homepage = "https://github.com/awslabs/aws-c-sdkutils";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ r-burns ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aws-checksums/default.nix b/nixpkgs/pkgs/development/libraries/aws-checksums/default.nix
new file mode 100644
index 000000000000..722c77f32de6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aws-checksums/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, cmake, aws-c-common, nix }:
+
+stdenv.mkDerivation rec {
+  pname = "aws-checksums";
+  version = "0.1.17";
+
+  src = fetchFromGitHub {
+    owner = "awslabs";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-OoEwubEEkLJmlqmQR4/rp4+b1WYJEbcjYDSdXXHleZQ=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ aws-c-common ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+  ];
+
+  passthru.tests = {
+    inherit nix;
+  };
+
+  meta = with lib; {
+    description = "HW accelerated CRC32c and CRC32";
+    homepage = "https://github.com/awslabs/aws-checksums";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ orivej eelco ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aws-crt-cpp/0001-build-Make-includedir-properly-overrideable.patch b/nixpkgs/pkgs/development/libraries/aws-crt-cpp/0001-build-Make-includedir-properly-overrideable.patch
new file mode 100644
index 000000000000..2b06ce0aec63
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aws-crt-cpp/0001-build-Make-includedir-properly-overrideable.patch
@@ -0,0 +1,59 @@
+From fd3f3a28e7fce7fe4e10ed2d7edc4bfda8ab27df Mon Sep 17 00:00:00 2001
+From: Jan Tojnar <jtojnar@gmail.com>
+Date: Sun, 9 Jan 2022 01:57:18 +0100
+Subject: [PATCH] build: Make includedir properly overrideable
+
+This is required by some package managers like Nix.
+---
+ CMakeLists.txt | 22 +++++++++++++---------
+ 1 file changed, 13 insertions(+), 9 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ec6d172..6514c23 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -49,6 +49,10 @@ if(${CMAKE_INSTALL_LIBDIR} STREQUAL "lib64")
+     set(FIND_LIBRARY_USE_LIB64_PATHS true)
+ endif()
+ 
++if(NOT DEFINED CMAKE_INSTALL_INCLUDEDIR)
++    set(CMAKE_INSTALL_INCLUDEDIR "include")
++endif()
++
+ if(NOT CMAKE_CXX_STANDARD)
+     set(CMAKE_CXX_STANDARD 11)
+ endif()
+@@ -307,7 +311,7 @@ endif()
+ target_include_directories(${PROJECT_NAME} PUBLIC
+     $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+     $<BUILD_INTERFACE:${GENERATED_INCLUDE_DIR}>
+-    $<INSTALL_INTERFACE:include>)
++    $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
+ 
+ aws_use_package(aws-c-http)
+ aws_use_package(aws-c-mqtt)
+@@ -324,14 +328,14 @@ aws_add_sanitizers(${PROJECT_NAME})
+ 
+ target_link_libraries(${PROJECT_NAME} PUBLIC ${DEP_AWS_LIBS})
+ 
+-install(FILES ${AWS_CRT_HEADERS} DESTINATION "include/aws/crt" COMPONENT Development)
+-install(FILES ${AWS_CRT_AUTH_HEADERS} DESTINATION "include/aws/crt/auth" COMPONENT Development)
+-install(FILES ${AWS_CRT_CRYPTO_HEADERS} DESTINATION "include/aws/crt/crypto" COMPONENT Development)
+-install(FILES ${AWS_CRT_IO_HEADERS} DESTINATION "include/aws/crt/io" COMPONENT Development)
+-install(FILES ${AWS_CRT_IOT_HEADERS} DESTINATION "include/aws/iot" COMPONENT Development)
+-install(FILES ${AWS_CRT_MQTT_HEADERS} DESTINATION "include/aws/crt/mqtt" COMPONENT Development)
+-install(FILES ${AWS_CRT_HTTP_HEADERS} DESTINATION "include/aws/crt/http" COMPONENT Development)
+-install(FILES ${AWS_CRT_ENDPOINT_HEADERS} DESTINATION "include/aws/crt/endpoints" COMPONENT Development)
++install(FILES ${AWS_CRT_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt" COMPONENT Development)
++install(FILES ${AWS_CRT_AUTH_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/auth" COMPONENT Development)
++install(FILES ${AWS_CRT_CRYPTO_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/crypto" COMPONENT Development)
++install(FILES ${AWS_CRT_IO_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/io" COMPONENT Development)
++install(FILES ${AWS_CRT_IOT_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/iot" COMPONENT Development)
++install(FILES ${AWS_CRT_MQTT_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/mqtt" COMPONENT Development)
++install(FILES ${AWS_CRT_HTTP_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/http" COMPONENT Development)
++install(FILES ${AWS_CRT_ENDPOINT_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/endpoints" COMPONENT Development)
+ 
+ install(
+     TARGETS ${PROJECT_NAME}
+-- 
+2.42.0
diff --git a/nixpkgs/pkgs/development/libraries/aws-crt-cpp/default.nix b/nixpkgs/pkgs/development/libraries/aws-crt-cpp/default.nix
new file mode 100644
index 000000000000..0cd6e4940c4d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aws-crt-cpp/default.nix
@@ -0,0 +1,80 @@
+{ lib, stdenv
+, fetchFromGitHub
+, aws-c-auth
+, aws-c-cal
+, aws-c-common
+, aws-c-compression
+, aws-c-event-stream
+, aws-c-http
+, aws-c-io
+, aws-c-mqtt
+, aws-c-s3
+, aws-checksums
+, cmake
+, s2n-tls
+, nix
+}:
+
+stdenv.mkDerivation rec {
+  pname = "aws-crt-cpp";
+  version = "0.24.7";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "awslabs";
+    repo = "aws-crt-cpp";
+    rev = "v${version}";
+    sha256 = "sha256-AYO0ckqEx2jG7HduvaxASQMOsxuHGkRkyVsUP5WOs98=";
+  };
+
+  patches = [
+    # Correct include path for split outputs.
+    # https://github.com/awslabs/aws-crt-cpp/pull/325
+    ./0001-build-Make-includedir-properly-overrideable.patch
+  ];
+
+  postPatch = ''
+    substituteInPlace CMakeLists.txt --replace '-Werror' ""
+  '';
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  propagatedBuildInputs = [
+    aws-c-auth
+    aws-c-cal
+    aws-c-common
+    aws-c-compression
+    aws-c-event-stream
+    aws-c-http
+    aws-c-io
+    aws-c-mqtt
+    aws-c-s3
+    aws-checksums
+    s2n-tls
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_DEPS=OFF"
+    "-DBUILD_SHARED_LIBS=ON"
+  ];
+
+  postInstall = ''
+    # Prevent dependency cycle.
+    moveToOutput lib/aws-crt-cpp/cmake "$dev"
+  '';
+
+  passthru.tests = {
+    inherit nix;
+  };
+
+  meta = with lib; {
+    description = "C++ wrapper around the aws-c-* libraries";
+    homepage = "https://github.com/awslabs/aws-crt-cpp";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ r-burns ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/aws-sdk-cpp/default.nix b/nixpkgs/pkgs/development/libraries/aws-sdk-cpp/default.nix
new file mode 100644
index 000000000000..448139358e65
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aws-sdk-cpp/default.nix
@@ -0,0 +1,154 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, curl
+, openssl
+, zlib
+, aws-crt-cpp
+, CoreAudio
+, AudioToolbox
+, nix
+, arrow-cpp
+, aws-sdk-cpp
+, # Allow building a limited set of APIs, e.g. ["s3" "ec2"].
+  apis ? ["*"]
+, # Whether to enable AWS' custom memory management.
+  customMemoryManagement ? true
+}:
+
+let
+  host_os = if stdenv.hostPlatform.isDarwin then "APPLE"
+       else if stdenv.hostPlatform.isAndroid then "ANDROID"
+       else if stdenv.hostPlatform.isWindows then "WINDOWS"
+       else if stdenv.hostPlatform.isLinux then "LINUX"
+       else throw "Unknown host OS";
+in
+
+stdenv.mkDerivation rec {
+  pname = "aws-sdk-cpp";
+  version = "1.11.207";
+
+  src = fetchFromGitHub {
+    owner = "aws";
+    repo = "aws-sdk-cpp";
+    rev = version;
+    sha256 = "sha256-IsPDQJo+TZ2noLefroiWl/Jx8fXmrmY73WHNRO41sik=";
+  };
+
+  postPatch = ''
+    # Append the dev output to path hints in finding Aws.h to avoid
+    # having to pass `AWS_CORE_HEADER_FILE` explicitly to cmake configure
+    # when using find_package(AWSSDK CONFIG)
+    substituteInPlace cmake/AWSSDKConfig.cmake \
+      --replace 'C:/AWSSDK/''${AWSSDK_INSTALL_INCLUDEDIR}/aws/core' \
+        'C:/AWSSDK/''${AWSSDK_INSTALL_INCLUDEDIR}/aws/core"
+            "${placeholder "dev"}/include/aws/core'
+
+    # Avoid blanket -Werror to evade build failures on less
+    # tested compilers.
+    substituteInPlace cmake/compiler_settings.cmake \
+      --replace '"-Werror"' ' '
+
+    # Flaky on Hydra
+    rm tests/aws-cpp-sdk-core-tests/aws/auth/AWSCredentialsProviderTest.cpp
+    rm tests/aws-cpp-sdk-core-tests/aws/client/AWSClientTest.cpp
+    rm tests/aws-cpp-sdk-core-tests/aws/client/AwsConfigTest.cpp
+    # Includes aws-c-auth private headers, so only works with submodule build
+    rm tests/aws-cpp-sdk-core-tests/aws/auth/AWSAuthSignerTest.cpp
+    # TestRandomURLMultiThreaded fails
+    rm tests/aws-cpp-sdk-core-tests/http/HttpClientTest.cpp
+  '' + lib.optionalString stdenv.isi686 ''
+    # EPSILON is exceeded
+    rm tests/aws-cpp-sdk-core-tests/aws/client/AdaptiveRetryStrategyTest.cpp
+  '';
+
+  # FIXME: might be nice to put different APIs in different outputs
+  # (e.g. libaws-cpp-sdk-s3.so in output "s3").
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake curl ];
+
+  buildInputs = [
+    curl openssl zlib
+  ] ++ lib.optionals (stdenv.isDarwin &&
+                        ((builtins.elem "text-to-speech" apis) ||
+                         (builtins.elem "*" apis)))
+         [ CoreAudio AudioToolbox ];
+
+  # propagation is needed for Security.framework to be available when linking
+  propagatedBuildInputs = [ aws-crt-cpp ];
+
+  cmakeFlags = [
+    "-DBUILD_DEPS=OFF"
+  ] ++ lib.optional (!customMemoryManagement) "-DCUSTOM_MEMORY_MANAGEMENT=0"
+  ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
+    "-DENABLE_TESTING=OFF"
+    "-DCURL_HAS_H2=1"
+    "-DCURL_HAS_TLS_PROXY=1"
+    "-DTARGET_ARCH=${host_os}"
+  ] ++ lib.optional (apis != ["*"])
+    "-DBUILD_ONLY=${lib.concatStringsSep ";" apis}";
+
+  env.NIX_CFLAGS_COMPILE = toString [
+    # openssl 3 generates several deprecation warnings
+    "-Wno-error=deprecated-declarations"
+  ];
+
+  postFixupHooks = [
+    # This bodge is necessary so that the file that the generated -config.cmake file
+    # points to an existing directory.
+    "mkdir -p $out/include"
+  ];
+
+  __darwinAllowLocalNetworking = true;
+
+  # Builds in 2+h with 2 cores, and ~10m with a big-parallel builder.
+  requiredSystemFeatures = [ "big-parallel" ];
+
+  passthru = {
+    tests = {
+      inherit nix arrow-cpp;
+      cmake-find-package = stdenv.mkDerivation {
+        pname = "aws-sdk-cpp-cmake-find-package-test";
+        version = "0";
+        dontUnpack = true;
+        nativeBuildInputs = [ cmake ];
+        buildInputs = [ aws-sdk-cpp ];
+        buildCommand = ''
+          cat > CMakeLists.txt <<'EOF'
+          find_package(AWSSDK)
+          EOF
+
+          # Intentionally not using 'cmakeConfigurePhase' to test that find_package works without it.
+          mkdir build && cd build
+          if output=$(cmake -Wno-dev .. 2>&1); then
+            if grep -Fw -- "Found AWS" - <<< "$output"; then
+              touch "$out"
+            else
+              echo "'Found AWS' not found in the cmake output!" >&2
+              echo "The output was:" >&2
+              echo "$output" >&2
+              exit 1
+            fi
+          else
+            echo -n "'cmake -Wno-dev ..'" >&2
+            echo " returned a non-zero exit code." >&2
+            echo "$output" >&2
+            exit 1
+          fi
+        '';
+      };
+    };
+  };
+
+  meta = with lib; {
+    description = "A C++ interface for Amazon Web Services";
+    homepage = "https://github.com/aws/aws-sdk-cpp";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ eelco orivej ];
+    # building ec2 runs out of memory: cc1plus: out of memory allocating 33554372 bytes after a total of 74424320 bytes
+    broken = stdenv.buildPlatform.is32bit && ((builtins.elem "ec2" apis) || (builtins.elem "*" apis));
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ayatana-ido/default.nix b/nixpkgs/pkgs/development/libraries/ayatana-ido/default.nix
new file mode 100644
index 000000000000..85c785be3cb3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ayatana-ido/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchFromGitHub
+, pkg-config, cmake
+, gtk3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ayatana-ido";
+  version = "0.10.1";
+
+  src = fetchFromGitHub {
+    owner = "AyatanaIndicators";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-uecUyqSL02SRdlLbWIy0luHACTFoyMXQ6rOIYuisZsw=";
+  };
+
+  nativeBuildInputs = [ pkg-config cmake ];
+
+  buildInputs = [ gtk3 ];
+
+  meta = with lib; {
+    description = "Ayatana Display Indicator Objects";
+    homepage = "https://github.com/AyatanaIndicators/ayatana-ido";
+    changelog = "https://github.com/AyatanaIndicators/ayatana-ido/blob/${version}/ChangeLog";
+    license = [ licenses.lgpl3Plus licenses.lgpl21Plus ];
+    maintainers = [ maintainers.nickhu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/azmq/default.nix b/nixpkgs/pkgs/development/libraries/azmq/default.nix
new file mode 100644
index 000000000000..7317c51aabde
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/azmq/default.nix
@@ -0,0 +1,43 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, boost
+, cmake
+, ninja
+, zeromq
+, catch2
+}:
+
+stdenv.mkDerivation {
+  pname = "azmq";
+  version = "unstable-2023-03-23";
+
+  src = fetchFromGitHub {
+    owner = "zeromq";
+    repo = "azmq";
+    rev = "2c1adac46bced4eb74ed9be7c74563bb113eaacf";
+    hash = "sha256-4o1CHlg9kociIL6QN/kU2cojPvFRhtjFmKIAz0dapUM=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    ninja
+  ];
+
+  buildInputs = [
+    boost
+    catch2
+    zeromq
+  ];
+
+  # Broken for some reason on this platform.
+  doCheck = !(stdenv.isAarch64 && stdenv.isLinux);
+
+  meta = with lib; {
+    homepage = "https://github.com/zeromq/azmq";
+    license = licenses.boost;
+    description = "C++ language binding library integrating ZeroMQ with Boost Asio";
+    maintainers = with maintainers; [ azahi ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/babl/default.nix b/nixpkgs/pkgs/development/libraries/babl/default.nix
new file mode 100644
index 000000000000..12dcbd12b9dd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/babl/default.nix
@@ -0,0 +1,44 @@
+{ stdenv
+, lib
+, fetchpatch
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, gobject-introspection
+, lcms2
+, vala
+}:
+
+stdenv.mkDerivation rec {
+  pname = "babl";
+  version = "0.1.106";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "https://download.gimp.org/pub/babl/${lib.versions.majorMinor version}/babl-${version}.tar.xz";
+    hash = "sha256-0yUTXTME8IjBNMxiABOs8DXeLl0SWlCi2RBU5zd8QV8=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gobject-introspection
+    vala
+  ];
+
+  buildInputs = [
+    lcms2
+  ];
+
+  meta = with lib; {
+    description = "Image pixel format conversion library";
+    homepage = "https://gegl.org/babl/";
+    changelog = "https://gitlab.gnome.org/GNOME/babl/-/blob/BABL_${lib.replaceStrings [ "." ] [ "_" ] version}/NEWS";
+    license = licenses.lgpl3Plus;
+    maintainers = with maintainers; [ jtojnar ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/backward-cpp/default.nix b/nixpkgs/pkgs/development/libraries/backward-cpp/default.nix
new file mode 100644
index 000000000000..15556a4108c6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/backward-cpp/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, lib, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "backward";
+  version = "1.6";
+
+  src = fetchFromGitHub {
+    owner = "bombela";
+    repo = "backward-cpp";
+    rev = "v${version}";
+    sha256 = "sha256-2k5PjwFxgA/2XPqJrPHxgSInM61FBEcieppBx+MAUKw=";
+  };
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/include
+    cp backward.hpp $out/include
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Beautiful stack trace pretty printer for C++";
+    homepage = "https://github.com/bombela/backward-cpp";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/bamf/default.nix b/nixpkgs/pkgs/development/libraries/bamf/default.nix
new file mode 100644
index 000000000000..99c1df8e0a39
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/bamf/default.nix
@@ -0,0 +1,96 @@
+{ stdenv
+, lib
+, autoreconfHook
+, gitUpdater
+, gnome
+, which
+, fetchgit
+, libgtop
+, libwnck
+, glib
+, vala
+, pkg-config
+, libstartup_notification
+, gobject-introspection
+, gtk-doc
+, docbook_xsl
+, xorgserver
+, dbus
+, python3
+, wrapGAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "bamf";
+  version = "0.5.6";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchgit {
+    url = "https://git.launchpad.net/~unity-team/bamf";
+    rev = version;
+    sha256 = "7U+2GcuDjPU8quZjkd8bLADGlG++tl6wSo0mUQkjAXQ=";
+  };
+
+  nativeBuildInputs = [
+    (python3.withPackages (ps: with ps; [ lxml ])) # Tests
+    autoreconfHook
+    dbus
+    docbook_xsl
+    gnome.gnome-common
+    gobject-introspection
+    gtk-doc
+    pkg-config
+    vala
+    which
+    wrapGAppsHook
+    xorgserver
+  ];
+
+  buildInputs = [
+    glib
+    libgtop
+    libstartup_notification
+    libwnck
+  ];
+
+  # Fix hard-coded path
+  # https://bugs.launchpad.net/bamf/+bug/1780557
+  postPatch = ''
+    substituteInPlace data/Makefile.am \
+      --replace '/usr/lib/systemd/user' '@prefix@/lib/systemd/user'
+  '';
+
+  configureFlags = [
+    "--enable-gtk-doc"
+    "--enable-headless-tests"
+  ];
+
+  # Fix paths
+  makeFlags = [
+    "INTROSPECTION_GIRDIR=${placeholder "dev"}/share/gir-1.0/"
+    "INTROSPECTION_TYPELIBDIR=${placeholder "out"}/lib/girepository-1.0"
+  ];
+
+  # TODO: Requires /etc/machine-id
+  doCheck = false;
+
+  # Ignore deprecation errors
+  env.NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS";
+
+  passthru.updateScript = gitUpdater {
+    ignoredVersions = ".ubuntu.*";
+  };
+
+  meta = with lib; {
+    description = "Application matching framework";
+    longDescription = ''
+      Removes the headache of applications matching
+      into a simple DBus daemon and c wrapper library.
+    '';
+    homepage = "https://launchpad.net/bamf";
+    license = licenses.lgpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ davidak ] ++ teams.pantheon.members;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/bash/bash-preexec/default.nix b/nixpkgs/pkgs/development/libraries/bash/bash-preexec/default.nix
new file mode 100644
index 000000000000..166b73b1daf6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/bash/bash-preexec/default.nix
@@ -0,0 +1,45 @@
+{ stdenvNoCC, lib, fetchFromGitHub, bats }:
+
+let version = "0.5.0";
+in stdenvNoCC.mkDerivation {
+  pname = "bash-preexec";
+  inherit version;
+
+  src = fetchFromGitHub {
+    owner = "rcaloras";
+    repo = "bash-preexec";
+    rev = version;
+    sha256 = "sha256-+FU5n7EkY78X5nUiW3WN9+6Bf6oiPjsG2MSRCleooFs=";
+  };
+
+  nativeCheckInputs = [ bats ];
+
+  dontConfigure = true;
+  doCheck = true;
+  dontBuild = true;
+
+  patchPhase = ''
+    # Needed since the tests expect that HISTCONTROL is set.
+    sed -i '/setup()/a HISTCONTROL=""' test/bash-preexec.bats
+
+    # Skip tests failing with Bats 1.5.0.
+    # See https://github.com/rcaloras/bash-preexec/issues/121
+    sed -i '/^@test.*IFS/,/^}/d' test/bash-preexec.bats
+  '';
+
+  checkPhase = ''
+    bats test
+  '';
+
+  installPhase = ''
+    install -Dm755 $src/bash-preexec.sh $out/share/bash/bash-preexec.sh
+  '';
+
+  meta = with lib; {
+    description = "preexec and precmd functions for Bash just like Zsh";
+    license = licenses.mit;
+    homepage = "https://github.com/rcaloras/bash-preexec";
+    maintainers = [ maintainers.hawkw maintainers.rycee ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/bashup-events/3.2.nix b/nixpkgs/pkgs/development/libraries/bashup-events/3.2.nix
new file mode 100644
index 000000000000..f7e88c382511
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/bashup-events/3.2.nix
@@ -0,0 +1,26 @@
+{ callPackage, fetchFromGitHub }:
+
+callPackage ./generic.nix {
+  variant = "3.2";
+  version = "2019-07-27";
+  branch = "master";
+  src = fetchFromGitHub {
+    owner = "bashup";
+    repo = "events";
+    rev = "83744c21bf720afb8325343674c62ab46a8f3d94";
+    hash = "sha256-0VDjd+1T1JBmSDGovWOOecUZmNztlwG32UcstfdigbI=";
+  };
+  fake = {
+    # Note: __ev.encode is actually defined, but it happens in a
+    # quoted arg to eval, which resholve currently doesn't (and may
+    # never) parse into. See abathur/resholve/issues/2.
+    function = [ "__ev.encode" ];
+  };
+  keep = {
+    # allow vars in eval
+    eval = [ "e" "f" "q" "r" ];
+    # allow vars executed as commands
+    "$f" = true;
+    "$n" = true;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/bashup-events/4.4.nix b/nixpkgs/pkgs/development/libraries/bashup-events/4.4.nix
new file mode 100644
index 000000000000..f880009ea71a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/bashup-events/4.4.nix
@@ -0,0 +1,20 @@
+{ callPackage, fetchFromGitHub }:
+
+callPackage ./generic.nix {
+  variant = "4.4";
+  version = "2020-04-04";
+  branch = "bash44";
+  src = fetchFromGitHub {
+    owner = "bashup";
+    repo = "events";
+    rev = "e97654f5602fc4e31083b27afa18dcc89b3e8296";
+    hash = "sha256-51OSIod3mEg3MKs4rrMgRcOimDGC+3UIr4Bl/cTRyGM=";
+  };
+  keep = {
+    # allow vars in eval
+    eval = [ "e" "bashup_ev" "n" ];
+    # allow vars executed as commands
+    "$f" = true;
+    "$n" = true;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/bashup-events/default.nix b/nixpkgs/pkgs/development/libraries/bashup-events/default.nix
new file mode 100644
index 000000000000..bcefdd0fcacf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/bashup-events/default.nix
@@ -0,0 +1,6 @@
+{ callPackage }:
+
+{
+  bashup-events32 = callPackage ./3.2.nix { };
+  bashup-events44 = callPackage ./4.4.nix { };
+}
diff --git a/nixpkgs/pkgs/development/libraries/bashup-events/generic.nix b/nixpkgs/pkgs/development/libraries/bashup-events/generic.nix
new file mode 100644
index 000000000000..f8a17f3bb11e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/bashup-events/generic.nix
@@ -0,0 +1,86 @@
+{
+  # general
+  lib
+, resholve
+, bash
+, doCheck ? true
+, doInstallCheck ? true
+  # variant-specific
+, variant
+, version
+, branch
+, src
+, fake ? false
+, keep
+}:
+let
+  # extracting this so that it's trivial to test in other shells
+  installCheck = shell:
+    ''
+      echo "testing bashup.events in ${shell}"
+      ${shell} <<'EOF'
+      source $out/bin/bashup.events
+      neat(){
+        echo $0: Hi from event \'test event\'. I can have both $1 and $2 arguments.
+        exit 0
+      }
+      event on "test event" @2 neat curried
+      echo event registered
+      event emit "test event" runtime
+      exit 1 # fail if emitting event didn't exit clean
+      EOF
+    '';
+
+in
+resholve.mkDerivation rec {
+  # bashup.events doesn't version yet but it has two variants with
+  # differing features/performance characteristics:
+  # - branch master: a variant for bash 3.2+
+  # - branch bash44: a variant for bash 4.4+
+  pname = "bashup-events${variant}-unstable";
+  # should be YYYY-MM-DD
+  inherit version;
+  inherit src;
+
+  installPhase = ''
+    runHook preInstall
+    install -Dt $out/bin bashup.events
+    runHook postInstall
+  '';
+
+  inherit doCheck;
+  nativeCheckInputs = [ bash ];
+
+  checkPhase = ''
+    runHook preCheck
+    ${bash}/bin/bash -n ./bashup.events
+    ${bash}/bin/bash ./bashup.events
+    runHook postCheck
+  '';
+
+  solutions = {
+    events = {
+      inputs = [ ];
+      interpreter = "none";
+      scripts = [ "bin/bashup.events" ];
+      inherit keep;
+    } // lib.optionalAttrs (lib.isAttrs fake) { inherit fake; };
+  };
+
+  inherit doInstallCheck;
+  nativeInstallCheckInputs = [ bash ];
+  installCheckPhase = ''
+    runHook preInstallCheck
+    ${installCheck "${bash}/bin/bash"}
+    runHook postInstallCheck
+  '';
+
+  meta = with lib; {
+    inherit branch;
+    description = "An event listener/callback API for creating extensible bash programs";
+    homepage = "https://github.com/bashup/events";
+    license = licenses.cc0;
+    maintainers = with maintainers; [ abathur ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/basu/default.nix b/nixpkgs/pkgs/development/libraries/basu/default.nix
new file mode 100644
index 000000000000..25e5adf65771
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/basu/default.nix
@@ -0,0 +1,55 @@
+{ lib
+, stdenv
+, fetchFromSourcehut
+, audit
+, pkg-config
+, libcap
+, gperf
+, meson
+, ninja
+, python3
+, getent
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "basu";
+  version = "0.2.1";
+
+  src = fetchFromSourcehut {
+    owner = "~emersion";
+    repo = "basu";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-zIaEIIo8lJeas2gVjMezO2hr8RnMIT7iiCBilZx5lRQ=";
+  };
+
+  outputs = [ "out" "dev" "lib" ];
+
+  buildInputs = [
+    audit
+    gperf
+    libcap
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+    meson
+    ninja
+    python3
+    getent
+  ];
+
+  preConfigure = ''
+    pushd src/basic
+    patchShebangs \
+      generate-cap-list.sh generate-errno-list.sh generate-gperfs.py
+    popd
+  '';
+
+  meta = {
+    homepage = "https://sr.ht/~emersion/basu";
+    description = "The sd-bus library, extracted from systemd";
+    license = lib.licenses.lgpl21Only;
+    maintainers = with lib.maintainers; [ AndersonTorres ];
+    platforms = lib.platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/bc-decaf/default.nix b/nixpkgs/pkgs/development/libraries/bc-decaf/default.nix
new file mode 100644
index 000000000000..c73f28e4e93a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/bc-decaf/default.nix
@@ -0,0 +1,36 @@
+{ cmake
+, fetchFromGitLab
+, lib
+, python3
+, stdenv
+}:
+
+stdenv.mkDerivation rec {
+  pname = "bc-decaf";
+  version = "unstable-2022-07-20";
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [
+    python3
+  ];
+
+  src = fetchFromGitLab {
+    domain = "gitlab.linphone.org";
+    group = "BC";
+    owner = "public/external";
+    repo = "decaf";
+    rev = "876ddb4d465c94f97beba1be450e8538d866cc5d";
+    sha256 = "sha256-QFOAgLiPbG2ZdwKoCOrVD5/sPq9IH4rtAWnnk/rZWcs=";
+  };
+
+  # Do not build static libraries and do not enable -Werror
+  cmakeFlags = [ "-DENABLE_STATIC=NO" "-DENABLE_STRICT=NO" ];
+
+  meta = with lib; {
+    description = "Elliptic curve library supporting Ed448-Goldilocks and Curve25519. Belledonne Communications' fork for Linphone.";
+    homepage = "https://gitlab.linphone.org/BC/public/bctoolbox";
+    license = licenses.mit;
+    maintainers = with maintainers; [ thibaultlemaire ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/bcg729/default.nix b/nixpkgs/pkgs/development/libraries/bcg729/default.nix
new file mode 100644
index 000000000000..ff5840b8373f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/bcg729/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv
+, fetchFromGitLab
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "bcg729";
+  version = "1.1.1";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.linphone.org";
+    owner = "public";
+    group = "BC";
+    repo = pname;
+    rev = version;
+    sha256 = "1hal6b3w6f8y5r1wa0xzj8sj2jjndypaxyw62q50p63garp2h739";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  postPatch = ''
+    substituteInPlace CMakeLists.txt \
+      --replace '\$'{exec_prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR}
+  '';
+
+  meta = with lib; {
+    description = "Opensource implementation of both encoder and decoder of the ITU G729 Annex A/B speech codec";
+    homepage = "https://linphone.org/technical-corner/bcg729";
+    changelog = "https://gitlab.linphone.org/BC/public/bcg729/raw/${version}/NEWS";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ c0bw3b ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/bctoolbox/default.nix b/nixpkgs/pkgs/development/libraries/bctoolbox/default.nix
new file mode 100644
index 000000000000..e473fa97a0ea
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/bctoolbox/default.nix
@@ -0,0 +1,48 @@
+{ bcunit
+, cmake
+, bc-decaf
+, fetchFromGitLab
+, mbedtls_2
+, lib
+, stdenv
+}:
+
+stdenv.mkDerivation rec {
+  pname = "bctoolbox";
+  version = "5.2.109";
+
+  nativeBuildInputs = [
+    cmake
+  ];
+  buildInputs = [
+    # Made by BC
+    bcunit
+
+    # Vendored by BC
+    bc-decaf
+
+    mbedtls_2
+  ];
+
+  src = fetchFromGitLab {
+    domain = "gitlab.linphone.org";
+    owner = "public";
+    group = "BC";
+    repo = pname;
+    rev = version;
+    hash = "sha256-OwwSGzMFwR2ajUUgAy7ea/Q2pWxn3DO72W7ukcjBJnU=";
+  };
+
+  # Do not build static libraries
+  cmakeFlags = [ "-DENABLE_STATIC=NO" "-DENABLE_STRICT=NO" ];
+
+  strictDeps = true;
+
+  meta = with lib; {
+    description = "Utilities library for Linphone";
+    homepage = "https://gitlab.linphone.org/BC/public/bctoolbox";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ raskin jluttine ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/bearssl/default.nix b/nixpkgs/pkgs/development/libraries/bearssl/default.nix
new file mode 100644
index 000000000000..b8dc2e1e1806
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/bearssl/default.nix
@@ -0,0 +1,62 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "bearssl";
+  version = "0.6";
+
+  src = fetchurl {
+    url = "https://www.bearssl.org/bearssl-${version}.tar.gz";
+    sha256 = "057zhgy9w4y8z2996r0pq5k2k39lpvmmvz4df8db8qa9f6hvn1b7";
+  };
+
+  outputs = [ "bin" "lib" "dev" "out" ];
+
+  enableParallelBuilding = true;
+
+  makeFlags = [
+    "AR=${stdenv.cc.targetPrefix}ar"
+    "CC=${stdenv.cc.targetPrefix}cc"
+    "LD=${stdenv.cc.targetPrefix}cc"
+    "LDDLL=${stdenv.cc.targetPrefix}cc"
+  ] ++ lib.optional stdenv.hostPlatform.isStatic "DLL=no";
+
+  installPhase = ''
+    runHook preInstall
+    install -D build/brssl $bin/brssl
+    install -D build/testcrypto $bin/testcrypto
+    install -Dm644 -t $lib/lib build/libbearssl.*
+    install -Dm644 -t $dev/include inc/*.h
+    touch $out
+    runHook postInstall
+  '';
+
+  meta = {
+    homepage = "https://www.bearssl.org/";
+    description = "An implementation of the SSL/TLS protocol written in C";
+    longDescription = ''
+      BearSSL is an implementation of the SSL/TLS protocol (RFC 5246)
+      written in C. It aims at offering the following features:
+
+      * Be correct and secure. In particular, insecure protocol versions and
+        choices of algorithms are not supported, by design; cryptographic
+        algorithm implementations are constant-time by default.
+
+      * Be small, both in RAM and code footprint. For instance, a minimal
+        server implementation may fit in about 20 kilobytes of compiled code
+        and 25 kilobytes of RAM.
+
+      * Be highly portable. BearSSL targets not only “big” operating systems
+        like Linux and Windows, but also small embedded systems and even
+        special contexts like bootstrap code.
+
+      * Be feature-rich and extensible. SSL/TLS has many defined cipher
+        suites and extensions; BearSSL should implement most of them, and
+        allow extra algorithm implementations to be added afterwards,
+        possibly from third parties.
+    '';
+    license = lib.licenses.mit;
+    platforms = lib.platforms.all;
+    maintainers = [ ];
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/beecrypt/default.nix b/nixpkgs/pkgs/development/libraries/beecrypt/default.nix
new file mode 100644
index 000000000000..f6c61254c101
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/beecrypt/default.nix
@@ -0,0 +1,18 @@
+{lib, stdenv, fetchurl, m4}:
+
+stdenv.mkDerivation rec {
+  pname = "beecrypt";
+  version = "4.2.1";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/beecrypt/beecrypt-${version}.tar.gz";
+    sha256 = "0pf5k1c4nsj77jfq5ip0ra1gzx2q47xaa0s008fnn6hd11b1yvr8";
+  };
+  buildInputs = [ m4 ];
+  configureFlags = [ "--disable-optimized" "--enable-static" ];
+
+  meta = {
+    platforms = lib.platforms.linux;
+    license = lib.licenses.lgpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/belcard/default.nix b/nixpkgs/pkgs/development/libraries/belcard/default.nix
new file mode 100644
index 000000000000..0b6cd66cae38
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/belcard/default.nix
@@ -0,0 +1,37 @@
+{ bctoolbox
+, belr
+, cmake
+, fetchFromGitLab
+, lib
+, stdenv
+}:
+
+stdenv.mkDerivation rec {
+  pname = "belcard";
+  version = "5.2.98";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.linphone.org";
+    owner = "public";
+    group = "BC";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-pRNJ1bDS2v0Cn+6cxMeFa0JQ27UZR6kCI9P6gQ5W2GA=";
+  };
+
+  buildInputs = [ bctoolbox belr ];
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [
+    "-DENABLE_STATIC=NO" # Do not build static libraries
+    "-DENABLE_UNIT_TESTS=NO" # Do not build test executables
+  ];
+
+  meta = with lib; {
+    description = "C++ library to manipulate VCard standard format. Part of the Linphone project.";
+    homepage = "https://gitlab.linphone.org/BC/public/belcard";
+    license = licenses.gpl3Plus;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ jluttine ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/belle-sip/default.nix b/nixpkgs/pkgs/development/libraries/belle-sip/default.nix
new file mode 100644
index 000000000000..338b0082be5e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/belle-sip/default.nix
@@ -0,0 +1,51 @@
+{ bctoolbox
+, belr
+, cmake
+, fetchFromGitLab
+, lib
+, libantlr3c
+, mbedtls_2
+, stdenv
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "belle-sip";
+  version = "5.2.98";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.linphone.org";
+    owner = "public";
+    group = "BC";
+    repo = pname;
+    rev = version;
+    hash = "sha256-PZnAB+LOlwkiJO0ICqYqn0TgqQY2KdUbgGJRFSzGxdE=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ zlib ];
+
+  # Do not build static libraries
+  cmakeFlags = [ "-DENABLE_STATIC=NO" ];
+
+  env.NIX_CFLAGS_COMPILE = toString ([
+    "-Wno-error=cast-function-type"
+    "-Wno-error=deprecated-declarations"
+    "-Wno-error=format-truncation"
+    "-Wno-error=stringop-overflow"
+  ] ++ lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [
+    # Needed with GCC 12 but problematic with some old GCCs and probably clang
+    "-Wno-error=use-after-free"
+  ]);
+
+  propagatedBuildInputs = [ libantlr3c mbedtls_2 bctoolbox belr ];
+
+  meta = with lib; {
+    homepage = "https://linphone.org/technical-corner/belle-sip";
+    description = "Modern library implementing SIP (RFC 3261) transport, transaction and dialog layers. Part of the Linphone project.";
+    license = licenses.gpl3Plus;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ jluttine ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/belr/default.nix b/nixpkgs/pkgs/development/libraries/belr/default.nix
new file mode 100644
index 000000000000..7296a9d95275
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/belr/default.nix
@@ -0,0 +1,34 @@
+{ bctoolbox
+, cmake
+, fetchFromGitLab
+, lib
+, stdenv
+}:
+
+stdenv.mkDerivation rec {
+  pname = "belr";
+  version = "5.2.98";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.linphone.org";
+    owner = "public";
+    group = "BC";
+    repo = pname;
+    rev = version;
+    hash = "sha256-4keVUAsTs1DAhOfV71VD28I0PEHnyvW95blplY690LY=";
+  };
+
+  buildInputs = [ bctoolbox ];
+  nativeBuildInputs = [ cmake ];
+
+  # Do not build static libraries
+  cmakeFlags = [ "-DENABLE_STATIC=NO" ];
+
+  meta = with lib; {
+    description = "Belledonne Communications' language recognition library. Part of the Linphone project.";
+    homepage = "https://gitlab.linphone.org/BC/public/belr";
+    license = licenses.gpl3Plus;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ jluttine ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/bencode/default.nix b/nixpkgs/pkgs/development/libraries/bencode/default.nix
new file mode 100644
index 000000000000..478f7306a59d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/bencode/default.nix
@@ -0,0 +1,57 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, catch2
+, cmake
+, expected-lite
+, fmt
+, gsl-lite
+, ninja
+}:
+
+stdenv.mkDerivation rec {
+  pname = "bencode";
+  version = "1.0.1";
+
+  src = fetchFromGitHub {
+    owner = "fbdtemme";
+    repo = "bencode";
+    rev = version;
+    hash = "sha256-zpxvADZfYTUdlNLMZJSCanPL40EGl9BBCxR7oDhvOTw=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    ninja
+  ];
+
+  buildInputs = [
+    catch2
+    expected-lite
+    fmt
+    gsl-lite
+  ];
+
+  postPatch = ''
+    # Disable a test that requires an internet connection.
+    substituteInPlace tests/CMakeLists.txt \
+      --replace "add_subdirectory(cmake_fetch_content)" ""
+  '';
+
+  doCheck = true;
+
+  postInstall = ''
+    rm -rf $out/lib64
+  '';
+
+  meta = with lib; {
+    description = "A header-only C++20 bencode serialization/deserialization library";
+    homepage = "https://github.com/fbdtemme/bencode";
+    changelog = "https://github.com/fbdtemme/bencode/blob/${src.rev}/CHANGELOG.md";
+    license = licenses.mit;
+    maintainers = with maintainers; [ azahi ];
+    platforms = platforms.unix;
+    # Broken because the default stdenv on these targets doesn't support C++20.
+    broken = with stdenv; isDarwin || (isLinux && isAarch64);
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/bencodetools/default.nix b/nixpkgs/pkgs/development/libraries/bencodetools/default.nix
new file mode 100644
index 000000000000..0a9694367340
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/bencodetools/default.nix
@@ -0,0 +1,42 @@
+{ stdenv
+, lib
+, fetchFromGitLab
+, python3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "bencodetools";
+  version = "unstable-2022-05-11";
+
+  src = fetchFromGitLab {
+    owner = "heikkiorsila";
+    repo = "bencodetools";
+    rev = "384d78d297a561dddbbd0f4632f0c74c0db41577";
+    sha256 = "1d699q9r33hkmmqkbh92ax54mcdf9smscmc0dza2gp4srkhr83qm";
+  };
+
+  postPatch = ''
+    patchShebangs configure
+    substituteInPlace configure \
+      --replace 'python_install_option=""' 'python_install_option="--prefix=$out"'
+  '';
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [
+    python3
+  ];
+
+  # installCheck instead of check due to -install_name'd library on Darwin
+  doInstallCheck = stdenv.buildPlatform == stdenv.hostPlatform;
+  installCheckTarget = "check";
+
+  meta = with lib; {
+    description = "Collection of tools for manipulating bencoded data";
+    homepage = "https://gitlab.com/heikkiorsila/bencodetools";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ OPNA2608 ];
+    mainProgram = "bencat";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/biblesync/default.nix b/nixpkgs/pkgs/development/libraries/biblesync/default.nix
new file mode 100644
index 000000000000..74a938cf2a5c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/biblesync/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, cmake, libuuid }:
+
+stdenv.mkDerivation rec {
+
+  pname = "biblesync";
+  version = "2.1.0";
+
+  src = fetchFromGitHub {
+    owner = "karlkleinpaste";
+    repo = "biblesync";
+    rev = version;
+    sha256 = "0prmd12jq2cjdhsph5v89y38j7hhd51dr3r1hivgkhczr3m5hf4s";
+  };
+
+  nativeBuildInputs = [ pkg-config cmake ];
+  buildInputs = [ libuuid ];
+
+  meta = with lib; {
+    homepage = "https://wiki.crosswire.org/BibleSync";
+    description = "A multicast protocol to Bible software shared conavigation";
+    longDescription = ''
+      BibleSync is a multicast protocol to support Bible software shared
+      co-navigation. It uses LAN multicast in either a personal/small team
+      mutual navigation motif or in a classroom environment where there are
+      Speakers plus the Audience. The library implementing the protocol is a
+      single C++ class providing a complete yet minimal public interface to
+      support mode setting, setup for packet reception, transmit on local
+      navigation, and handling of incoming packets.
+    '';
+    license = licenses.publicDomain;
+    maintainers = [ maintainers.AndersonTorres ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/blaze/default.nix b/nixpkgs/pkgs/development/libraries/blaze/default.nix
new file mode 100644
index 000000000000..ad68b6df4d59
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/blaze/default.nix
@@ -0,0 +1,35 @@
+{ lib
+, stdenv
+, fetchFromBitbucket
+, cmake
+, blas
+, lapack-reference
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "blaze";
+  version = "3.8.2";
+
+  src = fetchFromBitbucket {
+    owner = "blaze-lib";
+    repo = finalAttrs.pname;
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-Jl9ZWFqBvLgQwCoMNX3g7z02yc7oYx+d6mbyLBzBJOs=";
+  };
+
+  strictDeps = true;
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [
+    blas
+    lapack-reference
+  ];
+
+  meta = with lib; {
+    description = "high performance C++ math library";
+    homepage = "https://bitbucket.org/blaze-lib/blaze";
+    license = with licenses; [ bsd3 ];
+    maintainers = with maintainers; [ Madouura ];
+    platforms = platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/blitz/default.nix b/nixpkgs/pkgs/development/libraries/blitz/default.nix
new file mode 100644
index 000000000000..d48669845485
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/blitz/default.nix
@@ -0,0 +1,81 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, pkg-config
+, gfortran
+, texinfo
+, python3
+, boost
+  # Select SIMD alignment width (in bytes) for vectorization.
+, simdWidth ? 1
+  # Pad arrays to simdWidth by default?
+  # Note: Only useful if simdWidth > 1
+, enablePadding ? false
+  # Activate serialization through Boost.Serialize?
+, enableSerialization ? true
+  # Activate test-suite?
+  # WARNING: Some of the tests require up to 1700MB of memory to compile.
+, doCheck ? true
+}:
+
+let
+  inherit (lib) optional optionals;
+in
+stdenv.mkDerivation rec {
+  pname = "blitz++";
+  version = "1.0.2";
+
+  src = fetchFromGitHub {
+    owner = "blitzpp";
+    repo = "blitz";
+    rev = version;
+    hash = "sha256-wZDg+4lCd9iHvxuQQE/qs58NorkxZ0+mf+8PKQ57CDE=";
+  };
+
+  patches = [
+    # https://github.com/blitzpp/blitz/pull/180
+    (fetchpatch {
+      name = "use-cmake-install-full-dir.patch";
+      url = "https://github.com/blitzpp/blitz/commit/020f1d768c7fa3265cec244dc28f3dc8572719c5.patch";
+      hash = "sha256-8hYFNyWrejjIWPN/HzIOphD4Aq6Soe0FFUBmwV4tpWQ=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    python3
+    texinfo
+  ];
+
+  buildInputs = [ gfortran texinfo boost ];
+
+  cmakeFlags = optional enablePadding "-DARRAY_LENGTH_PADDING=ON"
+    ++ optional enableSerialization "-DENABLE_SERIALISATION=ON"
+    ++ optional stdenv.is64bit "-DBZ_FULLY64BIT=ON";
+    # FIXME ++ optional doCheck "-DBUILD_TESTING=ON";
+
+  # skip broken library name detection
+  ax_boost_user_serialization_lib = lib.optionalString stdenv.isDarwin "boost_serialization";
+
+  enableParallelBuilding = true;
+
+  inherit doCheck;
+
+  meta = with lib; {
+    description = "Fast multi-dimensional array library for C++";
+    homepage = "https://sourceforge.net/projects/blitz/";
+    license = with licenses; [ artistic2 /* or */ bsd3 /* or */ lgpl3Plus ];
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ ToxicFrog ];
+    longDescription = ''
+      Blitz++ is a C++ class library for scientific computing which provides
+      performance on par with Fortran 77/90. It uses template techniques to
+      achieve high performance. Blitz++ provides dense arrays and vectors,
+      random number generators, and small vectors (useful for representing
+      multicomponent or vector fields).
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/blst/default.nix b/nixpkgs/pkgs/development/libraries/blst/default.nix
new file mode 100644
index 000000000000..48865cf83564
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/blst/default.nix
@@ -0,0 +1,77 @@
+{ stdenv, lib, fetchFromGitHub, autoreconfHook }:
+
+stdenv.mkDerivation ( finalAttrs: {
+  pname = "blst";
+  version = "0.3.11";
+
+  src = fetchFromGitHub {
+    owner = "supranational";
+    repo = "blst";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-oqljy+ZXJAXEB/fJtmB8rlAr4UXM+Z2OkDa20gpILNA=";
+  };
+
+  buildPhase = ''
+    runHook preBuild
+
+    ./build.sh ${lib.optionalString stdenv.hostPlatform.isWindows "flavour=mingw64"}
+    ./build.sh -shared ${lib.optionalString stdenv.hostPlatform.isWindows "flavour=mingw64"}
+
+    runHook postBuild
+  '';
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/{lib,include}
+    for lib in libblst.{a,so,dylib}; do
+      if [ -f $lib ]; then
+        cp $lib $out/lib/
+      fi
+    done
+    cp bindings/{blst.h,blst_aux.h} $out/include
+
+    for lib in blst.dll; do
+      if [ -f $lib ]; then
+        mkdir -p $out/bin
+        cp $lib $out/bin/
+      fi
+    done
+
+    mkdir -p $out/lib/pkgconfig
+    cat <<EOF > $out/lib/pkgconfig/libblst.pc
+    prefix=$out
+    exec_prefix=''\\''${prefix}
+    libdir=''\\''${exec_prefix}/lib
+    includedir=''\\''${prefix}/include
+
+    Name: libblst
+    Description: ${finalAttrs.meta.description}
+    URL: ${finalAttrs.meta.homepage}
+    Version: ${finalAttrs.version}
+
+    Cflags: -I''\\''${includedir}
+    Libs: -L''\\''${libdir} -lblst
+    Libs.private:
+    EOF
+
+    runHook postInstall
+  '';
+
+  # ensure we have the right install id set.  Otherwise the library
+  # wouldn't be found during install.  The alternative would be to work
+  # lib.optional stdenv.isDarwin "LDFLAGS=-Wl,-install_name,$(out)/lib/libblst.dylib";
+  # into the setup.sh
+  postFixup = lib.optionalString stdenv.isDarwin ''
+    install_name_tool -id $out/lib/libblst.dylib $out/lib/libblst.dylib
+  '';
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Multilingual BLS12-381 signature library";
+    homepage = "https://github.com/supranational/blst";
+    license = licenses.isc;
+    maintainers = with maintainers; [ iquerejeta yvan-sraka ];
+    platforms = platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/boca/default.nix b/nixpkgs/pkgs/development/libraries/boca/default.nix
new file mode 100644
index 000000000000..50023491d3a0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/boca/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, pkg-config
+
+, expat
+, libcdio
+, libcdio-paranoia
+, libpulseaudio
+, smooth
+, uriparser
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "BoCA";
+  version = "1.0.7";
+
+  src = fetchFromGitHub {
+    owner = "enzo1982";
+    repo = "boca";
+    rev = "v${version}";
+    sha256 = "sha256-HIYUMFj5yiEC+liZLMXD9otPyoEb1sxHlECTYtYXc2I=";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+  ];
+
+  buildInputs = [
+    expat
+    libcdio
+    libcdio-paranoia
+    libpulseaudio
+    smooth
+    uriparser
+    zlib
+  ];
+
+  makeFlags = [
+    "prefix=$(out)"
+  ];
+
+  meta = with lib; {
+    description = "A component library used by the fre:ac audio converter";
+    license = licenses.gpl2Plus;
+    homepage = "https://github.com/enzo1982/boca";
+    maintainers = with maintainers; [ shamilton ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/boehm-gc/default.nix b/nixpkgs/pkgs/development/libraries/boehm-gc/default.nix
new file mode 100644
index 000000000000..6da88ee8258f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/boehm-gc/default.nix
@@ -0,0 +1,85 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+# doc: https://github.com/ivmai/bdwgc/blob/v8.2.4/doc/README.macros (LARGE_CONFIG)
+, enableLargeConfig ? false
+, enableMmap ? true
+, enableStatic ? false
+, nixVersions
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "boehm-gc";
+  version = "8.2.4";
+
+  src = fetchFromGitHub {
+    owner = "ivmai";
+    repo = "bdwgc";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-KHijT4BBKfDvTpHpwognN+3ZXoC6JabBTFSYFyOUT9o=";
+  };
+
+  outputs = [ "out" "dev" "doc" ];
+  separateDebugInfo = stdenv.isLinux && stdenv.hostPlatform.libc != "musl";
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  configureFlags = [
+    "--enable-cplusplus"
+    "--with-libatomic-ops=none"
+  ]
+  ++ lib.optional enableStatic "--enable-static"
+  ++ lib.optional enableMmap "--enable-mmap"
+  ++ lib.optional enableLargeConfig "--enable-large-config";
+
+  # This stanza can be dropped when a release fixes this issue:
+  #   https://github.com/ivmai/bdwgc/issues/376
+  # The version is checked with == instead of versionAtLeast so we
+  # don't forget to disable the fix (and if the next release does
+  # not fix the problem the test failure will be a reminder to
+  # extend the set of versions requiring the workaround).
+  makeFlags = lib.optionals (stdenv.hostPlatform.isPower64 &&
+                  finalAttrs.version == "8.2.4")
+    [
+      # do not use /proc primitives to track dirty bits; see:
+      # https://github.com/ivmai/bdwgc/issues/479#issuecomment-1279687537
+      # https://github.com/ivmai/bdwgc/blob/54522af853de28f45195044dadfd795c4e5942aa/include/private/gcconfig.h#L741
+      "CFLAGS_EXTRA=-DNO_SOFT_VDB"
+    ];
+
+  # `gctest` fails under emulation on aarch64-darwin
+  doCheck = !(stdenv.isDarwin && stdenv.isx86_64);
+
+  enableParallelBuilding = true;
+
+  passthru.tests = nixVersions;
+
+  meta = with lib; {
+    homepage = "https://hboehm.info/gc/";
+    description = "The Boehm-Demers-Weiser conservative garbage collector for C and C++";
+    longDescription = ''
+      The Boehm-Demers-Weiser conservative garbage collector can be used as a
+      garbage collecting replacement for C malloc or C++ new.  It allows you
+      to allocate memory basically as you normally would, without explicitly
+      deallocating memory that is no longer useful.  The collector
+      automatically recycles memory when it determines that it can no longer
+      be otherwise accessed.
+
+      The collector is also used by a number of programming language
+      implementations that either use C as intermediate code, want to
+      facilitate easier interoperation with C libraries, or just prefer the
+      simple collector interface.
+
+      Alternatively, the garbage collector may be used as a leak detector for
+      C or C++ programs, though that is not its primary goal.
+    '';
+    # non-copyleft, X11-style license
+    changelog = "https://github.com/ivmai/bdwgc/blob/v${finalAttrs.version}/ChangeLog";
+    license = "https://hboehm.info/gc/license.txt";
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/boolstuff/default.nix b/nixpkgs/pkgs/development/libraries/boolstuff/default.nix
new file mode 100644
index 000000000000..c54cffb52851
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/boolstuff/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl, pkg-config }:
+stdenv.mkDerivation rec {
+  pname = "boolstuff";
+  version = "0.1.17";
+
+  src = fetchurl {
+    url = "http://perso.b2b2c.ca/~sarrazip/dev/${pname}-${version}.tar.gz";
+    hash = "sha256-WPFUoTUofigPxTRo6vUbVTEVWMeEPDWszCA05toOX0I=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  meta = {
+    description = "Library for operations on boolean expression binary trees";
+    homepage = "http://perso.b2b2c.ca/~sarrazip/dev/boolstuff.html";
+    license = "GPL";
+    maintainers = [ lib.maintainers.marcweber ];
+    mainProgram = "booldnf";
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/boost-ext/boost-sml/default.nix b/nixpkgs/pkgs/development/libraries/boost-ext/boost-sml/default.nix
new file mode 100644
index 000000000000..0383adca64a4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/boost-ext/boost-sml/default.nix
@@ -0,0 +1,39 @@
+{ stdenv
+, lib
+, cmake
+, fetchFromGitHub
+, boost
+}:
+
+stdenv.mkDerivation rec {
+  pname = "boost-sml";
+  version = "1.1.9";
+
+  src = fetchFromGitHub {
+    owner = "boost-ext";
+    repo = "sml";
+    rev = "v${version}";
+    hash = "sha256-RYgSpnsmgZybpkJALIzxpkDRfe9QF2FHG+nA3msFaK0=";
+  };
+
+  buildInputs = [ boost ];
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [
+    "-DSML_BUILD_BENCHMARKS=OFF"
+    "-DSML_BUILD_EXAMPLES=OFF"
+    "-DSML_BUILD_TESTS=ON"
+    "-DSML_USE_EXCEPTIONS=ON"
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Header only state machine library with no dependencies";
+    homepage = "https://github.com/boost-ext/sml";
+    license = licenses.boost;
+    maintainers = with maintainers; [ prtzl ];
+    platforms = platforms.all;
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/boost-process/default.nix b/nixpkgs/pkgs/development/libraries/boost-process/default.nix
new file mode 100644
index 000000000000..551c1247949e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/boost-process/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchurl, unzip }:
+
+stdenv.mkDerivation rec {
+  pname = "boost-process";
+  version = "0.5";
+
+  src = fetchurl {
+    url = "http://www.highscore.de/boost/process${version}/process.zip";
+    sha256 = "1v9y9pffb2b7p642kp9ic4z6kg42ziizmyvbgrqd1ci0i4gn0831";
+  };
+
+  nativeBuildInputs = [ unzip ];
+
+  unpackPhase = ''
+    mkdir boost-process-$version
+    cd boost-process-$version
+    unzip $src
+  '';
+
+  installPhase = ''
+    mkdir -p $out/include
+    cp -r boost $out/include
+  '';
+
+  meta = with lib; {
+    homepage = "http://www.highscore.de/boost/process0.5/";
+    description = "Library to manage system processes";
+    license = licenses.boost;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ abbradar ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/boost/1.75.nix b/nixpkgs/pkgs/development/libraries/boost/1.75.nix
new file mode 100644
index 000000000000..ec77070c932c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/boost/1.75.nix
@@ -0,0 +1,15 @@
+{ callPackage, fetchurl, fetchpatch, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  version = "1.75.0";
+
+  src = fetchurl {
+    urls = [
+      "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"
+      "https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"
+    ];
+    # SHA256 from http://www.boost.org/users/history/version_1_75_0.html
+    sha256 = "953db31e016db7bb207f11432bef7df100516eeb746843fa0486a222e3fd49cb";
+  };
+})
+
diff --git a/nixpkgs/pkgs/development/libraries/boost/1.77.nix b/nixpkgs/pkgs/development/libraries/boost/1.77.nix
new file mode 100644
index 000000000000..3da1a455ead4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/boost/1.77.nix
@@ -0,0 +1,15 @@
+{ callPackage, fetchurl, fetchpatch, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  version = "1.77.0";
+
+  src = fetchurl {
+    urls = [
+      "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"
+      "https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"
+    ];
+    # SHA256 from http://www.boost.org/users/history/version_1_77_0.html
+    sha256 = "sha256-/J+F/AMOIzFCkIJBr3qEbmBjCqc4jeml+vsfOiaECFQ=";
+  };
+})
+
diff --git a/nixpkgs/pkgs/development/libraries/boost/1.78.nix b/nixpkgs/pkgs/development/libraries/boost/1.78.nix
new file mode 100644
index 000000000000..2cc818e63ce0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/boost/1.78.nix
@@ -0,0 +1,15 @@
+{ callPackage, fetchurl, fetchpatch, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  version = "1.78.0";
+
+  src = fetchurl {
+    urls = [
+      "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"
+      "https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"
+    ];
+    # SHA256 from http://www.boost.org/users/history/version_1_78_0.html
+    sha256 = "8681f175d4bdb26c52222665793eef08490d7758529330f98d3b29dd0735bccc";
+  };
+})
+
diff --git a/nixpkgs/pkgs/development/libraries/boost/1.79.nix b/nixpkgs/pkgs/development/libraries/boost/1.79.nix
new file mode 100644
index 000000000000..87975e2846d3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/boost/1.79.nix
@@ -0,0 +1,14 @@
+{ callPackage, fetchurl, fetchpatch, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  version = "1.79.0";
+
+  src = fetchurl {
+    urls = [
+      "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"
+      "https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"
+    ];
+    # SHA256 from http://www.boost.org/users/history/version_1_79_0.html
+    sha256 = "475d589d51a7f8b3ba2ba4eda022b170e562ca3b760ee922c146b6c65856ef39";
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/boost/1.80.nix b/nixpkgs/pkgs/development/libraries/boost/1.80.nix
new file mode 100644
index 000000000000..1aab51af78a7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/boost/1.80.nix
@@ -0,0 +1,14 @@
+{ callPackage, fetchurl, fetchpatch, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  version = "1.80.0";
+
+  src = fetchurl {
+    urls = [
+      "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"
+      "https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"
+    ];
+    # SHA256 from http://www.boost.org/users/history/version_1_80_0.html
+    sha256 = "1e19565d82e43bc59209a168f5ac899d3ba471d55c7610c677d4ccf2c9c500c0";
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/boost/1.81.nix b/nixpkgs/pkgs/development/libraries/boost/1.81.nix
new file mode 100644
index 000000000000..2376255303e2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/boost/1.81.nix
@@ -0,0 +1,14 @@
+{ callPackage, fetchurl, fetchpatch, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  version = "1.81.0";
+
+  src = fetchurl {
+    urls = [
+      "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"
+      "https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"
+    ];
+    # SHA256 from http://www.boost.org/users/history/version_1_81_0.html
+    sha256 = "71feeed900fbccca04a3b4f2f84a7c217186f28a940ed8b7ed4725986baf99fa";
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/boost/1.82.nix b/nixpkgs/pkgs/development/libraries/boost/1.82.nix
new file mode 100644
index 000000000000..193d07ef7562
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/boost/1.82.nix
@@ -0,0 +1,14 @@
+{ callPackage, fetchurl, fetchpatch, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  version = "1.82.0";
+
+  src = fetchurl {
+    urls = [
+      "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"
+      "https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"
+    ];
+    # SHA256 from http://www.boost.org/users/history/version_1_82_0.html
+    sha256 = "a6e1ab9b0860e6a2881dd7b21fe9f737a095e5f33a3a874afc6a345228597ee6";
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/boost/1.83.nix b/nixpkgs/pkgs/development/libraries/boost/1.83.nix
new file mode 100644
index 000000000000..df5c5a5bbd31
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/boost/1.83.nix
@@ -0,0 +1,14 @@
+{ callPackage, fetchurl, fetchpatch, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  version = "1.83.0";
+
+  src = fetchurl {
+    urls = [
+      "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"
+      "https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"
+    ];
+    # SHA256 from http://www.boost.org/users/history/version_1_83_0.html
+    sha256 = "6478edfe2f3305127cffe8caf73ea0176c53769f4bf1585be237eb30798c3b8e";
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/boost/1.84.nix b/nixpkgs/pkgs/development/libraries/boost/1.84.nix
new file mode 100644
index 000000000000..a55f55afaae0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/boost/1.84.nix
@@ -0,0 +1,14 @@
+{ callPackage, fetchurl, fetchpatch, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  version = "1.84.0";
+
+  src = fetchurl {
+    urls = [
+      "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"
+      "https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"
+    ];
+    # SHA256 from http://www.boost.org/users/history/version_1_84_0.html
+    sha256 = "cc4b893acf645c9d4b698e9a0f08ca8846aa5d6c68275c14c3e7949c24109454";
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/boost/cmake-paths-173.patch b/nixpkgs/pkgs/development/libraries/boost/cmake-paths-173.patch
new file mode 100644
index 000000000000..7b88da0e42a9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/boost/cmake-paths-173.patch
@@ -0,0 +1,22 @@
+diff --git a/tools/boost_install/boost-install.jam b/tools/boost_install/boost-install.jam
+index 4238f921e..8fc1ea269 100644
+--- a/tools/boost_install/boost-install.jam
++++ b/tools/boost_install/boost-install.jam
+@@ -649,7 +649,7 @@ rule generate-cmake-config- ( target : sources * : properties * )
+         ""
+         "# Compute the include and library directories relative to this file."
+         ""
+-        "get_filename_component(_BOOST_CMAKEDIR \"${CMAKE_CURRENT_LIST_DIR}/../\" REALPATH)"
++        "get_filename_component(_BOOST_REAL_CMAKEDIR \"${CMAKE_CURRENT_LIST_DIR}/../\" REALPATH)"
+         : true ;
+ 
+     if [ path.is-rooted $(cmakedir) ]
+@@ -668,6 +668,8 @@ rule generate-cmake-config- ( target : sources * : properties * )
+             "  unset(_BOOST_CMAKEDIR_ORIGINAL)"
+             "endif()"
+             ""
++	    "# Assume that the installer actually did know where the libs were to be installed"
++            "get_filename_component(_BOOST_CMAKEDIR \"$(cmakedir-native)\" REALPATH)"
+             : true ;
+     }
+ 
diff --git a/nixpkgs/pkgs/development/libraries/boost/darwin-no-system-python.patch b/nixpkgs/pkgs/development/libraries/boost/darwin-no-system-python.patch
new file mode 100644
index 000000000000..73e0910336a1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/boost/darwin-no-system-python.patch
@@ -0,0 +1,45 @@
+diff --git a/tools/build/src/tools/python.jam b/tools/build/src/tools/python.jam
+index 273b28a..2d2031e 100644
+--- a/tools/build/src/tools/python.jam
++++ b/tools/build/src/tools/python.jam
+@@ -428,13 +428,7 @@ local rule windows-installed-pythons ( version ? )
+ 
+ local rule darwin-installed-pythons ( version ? )
+ {
+-    version ?= $(.version-countdown) ;
+-
+-    local prefix
+-      = [ GLOB /System/Library/Frameworks /Library/Frameworks
+-          : Python.framework ] ;
+-
+-    return $(prefix)/Versions/$(version)/bin/python ;
++    return ;
+ }
+ 
+ 
+@@ -890,25 +884,6 @@ local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? :
+ 
+     # See if we can find a framework directory on darwin.
+     local framework-directory ;
+-    if $(target-os) = darwin
+-    {
+-        # Search upward for the framework directory.
+-        local framework-directory = $(libraries[-1]) ;
+-        while $(framework-directory:D=) && $(framework-directory:D=) != Python.framework
+-        {
+-            framework-directory = $(framework-directory:D) ;
+-        }
+-
+-        if $(framework-directory:D=) = Python.framework
+-        {
+-            debug-message framework directory is \"$(framework-directory)\" ;
+-        }
+-        else
+-        {
+-            debug-message "no framework directory found; using library path" ;
+-            framework-directory = ;
+-        }
+-    }
+ 
+     local dll-path = $(libraries) ;
+ 
diff --git a/nixpkgs/pkgs/development/libraries/boost/default.nix b/nixpkgs/pkgs/development/libraries/boost/default.nix
new file mode 100644
index 000000000000..6434c6d19699
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/boost/default.nix
@@ -0,0 +1,28 @@
+{ lib
+, callPackage
+, boost-build
+, fetchurl
+}:
+
+let
+  makeBoost = file:
+    lib.fix (self:
+      callPackage file {
+        boost-build = boost-build.override {
+          # useBoost allows us passing in src and version from
+          # the derivation we are building to get a matching b2 version.
+          useBoost = self;
+        };
+      }
+    );
+in {
+  boost175 = makeBoost ./1.75.nix;
+  boost177 = makeBoost ./1.77.nix;
+  boost178 = makeBoost ./1.78.nix;
+  boost179 = makeBoost ./1.79.nix;
+  boost180 = makeBoost ./1.80.nix;
+  boost181 = makeBoost ./1.81.nix;
+  boost182 = makeBoost ./1.82.nix;
+  boost183 = makeBoost ./1.83.nix;
+  boost184 = makeBoost ./1.84.nix;
+}
diff --git a/nixpkgs/pkgs/development/libraries/boost/generic.nix b/nixpkgs/pkgs/development/libraries/boost/generic.nix
new file mode 100644
index 000000000000..3db9b77bf05d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/boost/generic.nix
@@ -0,0 +1,267 @@
+{ lib, stdenv, icu, expat, zlib, bzip2, zstd, xz, python ? null, fixDarwinDylibNames, libiconv, libxcrypt
+, boost-build
+, fetchpatch
+, which
+, toolset ? /**/ if stdenv.cc.isClang  then "clang"
+            else if stdenv.cc.isGNU    then "gcc"
+            else null
+, enableRelease ? true
+, enableDebug ? false
+, enableSingleThreaded ? false
+, enableMultiThreaded ? true
+, enableShared ? !(with stdenv.hostPlatform; isStatic || isMinGW) # problems for now
+, enableStatic ? !enableShared
+, enablePython ? false
+, enableNumpy ? false
+, enableIcu ? stdenv.hostPlatform == stdenv.buildPlatform
+, taggedLayout ? ((enableRelease && enableDebug) || (enableSingleThreaded && enableMultiThreaded) || (enableShared && enableStatic))
+, patches ? []
+, boostBuildPatches ? []
+, useMpi ? false
+, mpi
+, extraB2Args ? []
+
+# Attributes inherit from specific versions
+, version, src
+, ...
+}:
+
+# We must build at least one type of libraries
+assert enableShared || enableStatic;
+
+assert enableNumpy -> enablePython;
+
+let
+
+  variant = lib.concatStringsSep ","
+    (lib.optional enableRelease "release" ++
+     lib.optional enableDebug "debug");
+
+  threading = lib.concatStringsSep ","
+    (lib.optional enableSingleThreaded "single" ++
+     lib.optional enableMultiThreaded "multi");
+
+  link = lib.concatStringsSep ","
+    (lib.optional enableShared "shared" ++
+     lib.optional enableStatic "static");
+
+  runtime-link = if enableShared then "shared" else "static";
+
+  # To avoid library name collisions
+  layout = if taggedLayout then "tagged" else "system";
+
+  needUserConfig = stdenv.hostPlatform != stdenv.buildPlatform || useMpi || (stdenv.isDarwin && enableShared);
+
+  b2Args = lib.concatStringsSep " " ([
+    "--includedir=$dev/include"
+    "--libdir=$out/lib"
+    "-j$NIX_BUILD_CORES"
+    "--layout=${layout}"
+    "variant=${variant}"
+    "threading=${threading}"
+    "link=${link}"
+    "-sEXPAT_INCLUDE=${expat.dev}/include"
+    "-sEXPAT_LIBPATH=${expat.out}/lib"
+
+    # TODO: make this unconditional
+  ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform ||
+                  # required on mips; see 61d9f201baeef4c4bb91ad8a8f5f89b747e0dfe4
+                  (stdenv.hostPlatform.isMips && lib.versionAtLeast version "1.79")) [
+    "address-model=${toString stdenv.hostPlatform.parsed.cpu.bits}"
+    "architecture=${if stdenv.hostPlatform.isMips64
+                    then if lib.versionOlder version "1.78" then "mips1" else "mips"
+                    else if stdenv.hostPlatform.parsed.cpu.name == "s390x" then "s390x"
+                    else toString stdenv.hostPlatform.parsed.cpu.family}"
+    # env in host triplet for Mach-O is "macho", but boost binary format for Mach-O is "mach-o"
+    "binary-format=${if stdenv.hostPlatform.isMacho then "mach-o"
+                     else toString stdenv.hostPlatform.parsed.kernel.execFormat.name}"
+    "target-os=${toString stdenv.hostPlatform.parsed.kernel.name}"
+
+    # adapted from table in boost manual
+    # https://www.boost.org/doc/libs/1_66_0/libs/context/doc/html/context/architectures.html
+    "abi=${if stdenv.hostPlatform.parsed.cpu.family == "arm" then "aapcs"
+           else if stdenv.hostPlatform.isWindows then "ms"
+           else if stdenv.hostPlatform.isMips32 then "o32"
+           else if stdenv.hostPlatform.isMips64n64 then "n64"
+           else "sysv"}"
+  ] ++ lib.optional (link != "static") "runtime-link=${runtime-link}"
+    ++ lib.optional (variant == "release") "debug-symbols=off"
+    ++ lib.optional (toolset != null) "toolset=${toolset}"
+    ++ lib.optional (!enablePython) "--without-python"
+    ++ lib.optional needUserConfig "--user-config=user-config.jam"
+    ++ lib.optional (stdenv.buildPlatform.isDarwin && stdenv.hostPlatform.isLinux) "pch=off"
+    ++ lib.optionals stdenv.hostPlatform.isMinGW [
+    "threadapi=win32"
+  ] ++ extraB2Args
+  );
+
+in
+
+stdenv.mkDerivation {
+  pname = "boost";
+
+  inherit src version;
+
+  patchFlags = [];
+
+  patches = patches
+  ++ lib.optional stdenv.isDarwin ./darwin-no-system-python.patch
+  ++ [ ./cmake-paths-173.patch ]
+  ++ lib.optional (version == "1.77.0") (fetchpatch {
+    url = "https://github.com/boostorg/math/commit/7d482f6ebc356e6ec455ccb5f51a23971bf6ce5b.patch";
+    relative = "include";
+    sha256 = "sha256-KlmIbixcds6GyKYt1fx5BxDIrU7msrgDdYo9Va/KJR4=";
+  })
+  # Fixes ABI detection
+  ++ lib.optional (version == "1.83.0") (fetchpatch {
+    url = "https://github.com/boostorg/context/commit/6fa6d5c50d120e69b2d8a1c0d2256ee933e94b3b.patch";
+    stripLen = 1;
+    extraPrefix = "libs/context/";
+    sha256 = "sha256-bCfLL7bD1Rn4Ie/P3X+nIcgTkbXdCX6FW7B9lHsmVW8=";
+  })
+  # This fixes another issue regarding ill-formed constant expressions, which is a default error
+  # in clang 16 and will be a hard error in clang 17.
+  ++ lib.optional (lib.versionOlder version "1.80") (fetchpatch {
+    url = "https://github.com/boostorg/log/commit/77f1e20bd69c2e7a9e25e6a9818ae6105f7d070c.patch";
+    relative = "include";
+    hash = "sha256-6qOiGJASm33XzwoxVZfKJd7sTlQ5yd+MMFQzegXm5RI=";
+  })
+  ++ lib.optionals (lib.versionOlder version "1.81") [
+    # libc++ 15 dropped support for `std::unary_function` and `std::binary_function` in C++17+.
+    # C++17 is the default for clang 16, but clang 15 is also affected in that language mode.
+    # This patch is for Boost 1.80, but it also applies to earlier versions.
+    (fetchpatch {
+      url = "https://www.boost.org/patches/1_80_0/0005-config-libcpp15.patch";
+      hash = "sha256-ULFMzKphv70unvPZ3o4vSP/01/xbSM9a2TlIV67eXDQ=";
+    })
+    # This fixes another ill-formed contant expressions issue flagged by clang 16.
+    (fetchpatch {
+      url = "https://github.com/boostorg/numeric_conversion/commit/50a1eae942effb0a9b90724323ef8f2a67e7984a.patch";
+      relative = "include";
+      hash = "sha256-dq4SVgxkPJSC7Fvr59VGnXkM4Lb09kYDaBksCHo9C0s=";
+    })
+    # This fixes an issue in Python 3.11 about Py_TPFLAGS_HAVE_GC
+    (fetchpatch {
+      name = "python311-compatibility.patch";
+      url = "https://github.com/boostorg/python/commit/a218babc8daee904a83f550fb66e5cb3f1cb3013.patch";
+      hash = "sha256-IHxLtJBx0xSy7QEr8FbCPofsjcPuSYzgtPwDlx1JM+4=";
+      stripLen = 1;
+      extraPrefix = "libs/python/";
+    })
+  ];
+
+  meta = with lib; {
+    homepage = "http://boost.org/";
+    description = "Collection of C++ libraries";
+    license = licenses.boost;
+    platforms = platforms.unix ++ platforms.windows;
+    # boost-context lacks support for the N32 ABI on mips64.  The build
+    # will succeed, but packages depending on boost-context will fail with
+    # a very cryptic error message.
+    badPlatforms = [ lib.systems.inspect.patterns.isMips64n32 ];
+    maintainers = with maintainers; [ hjones2199 ];
+  };
+
+  passthru = {
+    inherit boostBuildPatches;
+  };
+
+  preConfigure = lib.optionalString useMpi ''
+    cat << EOF >> user-config.jam
+    using mpi : ${lib.getDev mpi}/bin/mpiCC ;
+    EOF
+  ''
+  # On darwin we need to add the `$out/lib` to the libraries' rpath explicitly,
+  # otherwise the dynamic linker is unable to resolve the reference to @rpath
+  # when the boost libraries want to load each other at runtime.
+  + lib.optionalString (stdenv.isDarwin && enableShared) ''
+    cat << EOF >> user-config.jam
+    using clang-darwin : : ${stdenv.cc.targetPrefix}c++
+      : <linkflags>"-rpath $out/lib/"
+      ;
+    EOF
+  ''
+  # b2 has trouble finding the correct compiler and tools for cross compilation
+  # since it apparently ignores $CC, $AR etc. Thus we need to set everything
+  # in user-config.jam. To keep things simple we just set everything in an
+  # uniform way for clang and gcc (which works thanks to our cc-wrapper).
+  # We pass toolset later which will make b2 invoke everything in the right
+  # way -- the other toolset in user-config.jam will be ignored.
+  + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
+    cat << EOF >> user-config.jam
+    using gcc : cross : ${stdenv.cc.targetPrefix}c++
+      : <archiver>$AR
+        <ranlib>$RANLIB
+      ;
+
+    using clang : cross : ${stdenv.cc.targetPrefix}c++
+      : <archiver>$AR
+        <ranlib>$RANLIB
+      ;
+    EOF
+  ''
+  # b2 needs to be explicitly told how to find Python when cross-compiling
+  + lib.optionalString enablePython ''
+    cat << EOF >> user-config.jam
+    using python : : ${python.interpreter}
+      : ${python}/include/python${python.pythonVersion}
+      : ${python}/lib
+      ;
+    EOF
+  '';
+
+  NIX_CFLAGS_LINK = lib.optionalString stdenv.isDarwin
+                      "-headerpad_max_install_names";
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ which boost-build ]
+    ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
+  buildInputs = [ expat zlib bzip2 libiconv ]
+    ++ lib.optional (lib.versionAtLeast version "1.69") zstd
+    ++ [ xz ]
+    ++ lib.optional enableIcu icu
+    ++ lib.optionals enablePython [ libxcrypt python ]
+    ++ lib.optional enableNumpy python.pkgs.numpy;
+
+  configureScript = "./bootstrap.sh";
+  configurePlatforms = [];
+  dontDisableStatic = true;
+  dontAddStaticConfigureFlags = true;
+  configureFlags = [
+    "--includedir=$(dev)/include"
+    "--libdir=$(out)/lib"
+    "--with-bjam=b2" # prevent bootstrapping b2 in configurePhase
+  ] ++ lib.optional (toolset != null) "--with-toolset=${toolset}"
+    ++ [ (if enableIcu then "--with-icu=${icu.dev}" else "--without-icu") ];
+
+  buildPhase = ''
+    runHook preBuild
+    b2 ${b2Args}
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    # boostbook is needed by some applications
+    mkdir -p $dev/share/boostbook
+    cp -a tools/boostbook/{xsl,dtd} $dev/share/boostbook/
+
+    # Let boost install everything else
+    b2 ${b2Args} install
+
+    runHook postInstall
+  '';
+
+  postFixup = ''
+    # Make boost header paths relative so that they are not runtime dependencies
+    cd "$dev" && find include \( -name '*.hpp' -or -name '*.h' -or -name '*.ipp' \) \
+      -exec sed '1s/^\xef\xbb\xbf//;1i#line 1 "{}"' -i '{}' \;
+  '' + lib.optionalString stdenv.hostPlatform.isMinGW ''
+    $RANLIB "$out/lib/"*.a
+  '';
+
+  outputs = [ "out" "dev" ];
+  setOutputFlags = false;
+}
diff --git a/nixpkgs/pkgs/development/libraries/bootil/default.nix b/nixpkgs/pkgs/development/libraries/bootil/default.nix
new file mode 100644
index 000000000000..dab559afdace
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/bootil/default.nix
@@ -0,0 +1,45 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, premake4
+}:
+
+stdenv.mkDerivation {
+  pname = "bootil";
+  version = "unstable-2019-11-18";
+
+  src = fetchFromGitHub {
+    owner = "garrynewman";
+    repo = "bootil";
+    rev = "beb4cec8ad29533965491b767b177dc549e62d23";
+    sha256 = "1njdj6nvmwf7j2fwqbyvd1cf5l52797vk2wnsliylqdzqcjmfpij";
+  };
+
+  # Avoid guessing where files end up. Just use current directory.
+  postPatch = ''
+    substituteInPlace projects/premake4.lua \
+      --replace 'location ( os.get() .. "/" .. _ACTION )' 'location ( ".." )'
+    substituteInPlace projects/bootil.lua \
+      --replace 'targetdir ( "../lib/" .. os.get() .. "/" .. _ACTION )' 'targetdir ( ".." )'
+  '';
+
+  nativeBuildInputs = [ premake4 ];
+
+  premakefile = "projects/premake4.lua";
+
+  installPhase = ''
+    install -D libbootil_static.a $out/lib/libbootil_static.a
+    cp -r include $out
+  '';
+
+  meta = with lib; {
+    description = "Garry Newman's personal utility library";
+    homepage = "https://github.com/garrynewman/bootil";
+    # License unsure - see https://github.com/garrynewman/bootil/issues/21
+    license = licenses.free;
+    maintainers = with maintainers; [ abigailbuccaneer ];
+    # Build uses `-msse` and `-mfpmath=sse`
+    platforms = platforms.all;
+    badPlatforms = [ "aarch64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/boringssl/default.nix b/nixpkgs/pkgs/development/libraries/boringssl/default.nix
new file mode 100644
index 000000000000..3e8908416185
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/boringssl/default.nix
@@ -0,0 +1,66 @@
+{ lib
+, stdenv
+, fetchgit
+, cmake
+, ninja
+, perl
+, buildGoModule
+}:
+
+# reference: https://boringssl.googlesource.com/boringssl/+/2661/BUILDING.md
+buildGoModule {
+  pname = "boringssl";
+  version = "unstable-2024-02-15";
+
+  src = fetchgit {
+    url = "https://boringssl.googlesource.com/boringssl";
+    rev = "5a1a5fbdb865fa58f1da0fd8bf6426f801ea37ac";
+    hash = "sha256-nu+5TeWEAVLGhTE15kxmTWZxo0V2elNUy67gdaU3Y+I=";
+  };
+
+  nativeBuildInputs = [ cmake ninja perl ];
+
+  vendorHash = "sha256-McSmG+fMO8/T/bJR6YAJDYw9pxsWJoj1hcSTPv/wMsI=";
+  proxyVendor = true;
+
+  # hack to get both go and cmake configure phase
+  # (if we use postConfigure then cmake will loop runHook postConfigure)
+  preBuild = ''
+    cmakeConfigurePhase
+  '' + lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
+    export GOARCH=$(go env GOHOSTARCH)
+  '';
+
+  env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isGNU [
+    # Needed with GCC 12 but breaks on darwin (with clang)
+    "-Wno-error=stringop-overflow"
+  ]);
+
+  buildPhase = ''
+    ninjaBuildPhase
+  '';
+
+  # CMAKE_OSX_ARCHITECTURES is set to x86_64 by Nix, but it confuses boringssl on aarch64-linux.
+  cmakeFlags = [ "-GNinja" ] ++ lib.optionals (stdenv.isLinux) [ "-DCMAKE_OSX_ARCHITECTURES=" ];
+
+  installPhase = ''
+    mkdir -p $bin/bin $dev $out/lib
+
+    mv tool/bssl $bin/bin
+
+    mv ssl/libssl.a           $out/lib
+    mv crypto/libcrypto.a     $out/lib
+    mv decrepit/libdecrepit.a $out/lib
+
+    mv ../include $dev
+  '';
+
+  outputs = [ "out" "bin" "dev" ];
+
+  meta = with lib; {
+    description = "Free TLS/SSL implementation";
+    homepage    = "https://boringssl.googlesource.com";
+    maintainers = [ maintainers.thoughtpolice ];
+    license = with licenses; [ openssl isc mit bsd3 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/botan/2.0.nix b/nixpkgs/pkgs/development/libraries/botan/2.0.nix
new file mode 100644
index 000000000000..53b4e167a7d9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/botan/2.0.nix
@@ -0,0 +1,7 @@
+{ callPackage, ... } @ args:
+
+callPackage ./generic.nix (args // {
+  baseVersion = "2.19";
+  revision = "3";
+  hash = "sha256-2uBH85nFpH8IfbXT2dno8RrkmF0UySjXHaGv+AGALVU=";
+})
diff --git a/nixpkgs/pkgs/development/libraries/botan/3.0.nix b/nixpkgs/pkgs/development/libraries/botan/3.0.nix
new file mode 100644
index 000000000000..4c0eae63493a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/botan/3.0.nix
@@ -0,0 +1,7 @@
+{ callPackage, ... } @ args:
+
+callPackage ./generic.nix (args // {
+  baseVersion = "3.2";
+  revision = "0";
+  hash = "sha256-BJyEeDX89u86niBrM94F3TiZnDJeJHSCdypVmNnl7OM=";
+})
diff --git a/nixpkgs/pkgs/development/libraries/botan/generic.nix b/nixpkgs/pkgs/development/libraries/botan/generic.nix
new file mode 100644
index 000000000000..8e053581e88b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/botan/generic.nix
@@ -0,0 +1,66 @@
+{ lib, stdenv, fetchurl, python3, bzip2, zlib, gmp, boost
+# Passed by version specific builders
+, baseVersion, revision, hash
+, sourceExtension ? "tar.xz"
+, extraConfigureFlags ? ""
+, extraPatches ? [ ]
+, badPlatforms ? [ ]
+, postPatch ? null
+, knownVulnerabilities ? [ ]
+, CoreServices ? null
+, Security ? null
+, ...
+}:
+
+stdenv.mkDerivation rec {
+  pname = "botan";
+  version = "${baseVersion}.${revision}";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    name = "Botan-${version}.${sourceExtension}";
+    urls = [
+       "http://files.randombit.net/botan/v${baseVersion}/Botan-${version}.${sourceExtension}"
+       "http://botan.randombit.net/releases/Botan-${version}.${sourceExtension}"
+    ];
+    inherit hash;
+  };
+  patches = extraPatches;
+  inherit postPatch;
+
+  nativeBuildInputs = [ python3 ];
+  buildInputs = [ bzip2 zlib gmp boost ]
+    ++ lib.optionals stdenv.isDarwin [ CoreServices Security ];
+
+  configurePhase = ''
+    runHook preConfigure
+    python configure.py --prefix=$out --with-bzip2 --with-zlib ${extraConfigureFlags}${lib.optionalString stdenv.cc.isClang " --cc=clang"} ${lib.optionalString stdenv.hostPlatform.isAarch64 " --cpu=aarch64"}
+    runHook postConfigure
+  '';
+
+  enableParallelBuilding = true;
+
+  preInstall = ''
+    if [ -d src/scripts ]; then
+      patchShebangs src/scripts
+    fi
+  '';
+
+  postInstall = ''
+    cd "$out"/lib/pkgconfig
+    ln -s botan-*.pc botan.pc || true
+  '';
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Cryptographic algorithms library";
+    maintainers = with maintainers; [ raskin thillux ];
+    platforms = platforms.unix;
+    license = licenses.bsd2;
+    inherit badPlatforms;
+    inherit knownVulnerabilities;
+  };
+  passthru.updateInfo.downloadPage = "http://files.randombit.net/botan/";
+}
diff --git a/nixpkgs/pkgs/development/libraries/box2d/default.nix b/nixpkgs/pkgs/development/libraries/box2d/default.nix
new file mode 100644
index 000000000000..84e2dbc05644
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/box2d/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchFromGitHub, cmake, libGLU, libGL, freeglut, libX11, xorgproto
+, libXi, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "box2d";
+  version = "2.3.1";
+
+  src = fetchFromGitHub {
+    owner = "erincatto";
+    repo = "box2d";
+    rev = "v${version}";
+    sha256 = "sha256-Z2J17YMzQNZqABIa5eyJDT7BWfXveymzs+DWsrklPIs=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ libGLU libGL freeglut libX11 xorgproto libXi ];
+
+  cmakeFlags = [
+    "-DBOX2D_INSTALL=ON"
+    "-DBOX2D_BUILD_SHARED=ON"
+    "-DBOX2D_BUILD_EXAMPLES=OFF"
+  ];
+
+  prePatch = ''
+    cd Box2D
+    substituteInPlace Box2D/Common/b2Settings.h \
+      --replace 'b2_maxPolygonVertices	8' 'b2_maxPolygonVertices	15'
+  '';
+
+  meta = with lib; {
+    description = "2D physics engine";
+    homepage = "https://box2d.org/";
+    maintainers = [ maintainers.raskin ];
+    platforms = platforms.unix;
+    license = licenses.zlib;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/boxfort/default.nix b/nixpkgs/pkgs/development/libraries/boxfort/default.nix
new file mode 100644
index 000000000000..855f86a3c36f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/boxfort/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, meson, ninja, python3Packages }:
+
+stdenv.mkDerivation rec {
+  pname = "boxfort";
+  version = "0.1.4";
+
+  src = fetchFromGitHub {
+    owner = "Snaipe";
+    repo = "BoxFort";
+    rev = "v${version}";
+    sha256 = "jmtWTOkOlqVZ7tFya3IrQjr714Y8TzAVY5Cq+RzDuRs=";
+  };
+
+  nativeBuildInputs = [ meson ninja ];
+
+  preConfigure = ''
+    patchShebangs ci/isdir.py
+  '';
+
+  nativeCheckInputs = with python3Packages; [ cram ];
+
+  doCheck = true;
+
+  outputs = [ "dev" "out" ];
+
+  meta = with lib; {
+    description = "Convenient & cross-platform sandboxing C library";
+    homepage = "https://github.com/Snaipe/BoxFort";
+    license = licenses.mit;
+    maintainers = with maintainers; [ thesola10 Yumasi ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/brigand/default.nix b/nixpkgs/pkgs/development/libraries/brigand/default.nix
new file mode 100644
index 000000000000..3c0778de1d30
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/brigand/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation {
+  pname = "brigand";
+  version = "1.3.0";
+
+  src = fetchFromGitHub {
+    owner = "edouarda";
+    repo = "brigand";
+    rev = "4db9f665b4ece31b51aaf35b499b2c8e5811efa3";
+    sha256 = "14b8r3s24zq0l3addy3irzxs5cyqn3763y5s310lmzzswgj1v7r4";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "Instant compile time C++ 11 metaprogramming library";
+    longDescription = ''
+      Brigand is a light-weight, fully functional, instant-compile time C++ 11 meta-programming library.
+      Everything you were doing with Boost.MPL can be done with Brigand. And if that's not the case, open an issue!'';
+    homepage = "https://github.com/edouarda/brigand";
+    license = licenses.boost;
+    maintainers = with maintainers; [ pmiddend ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/brunsli/default.nix b/nixpkgs/pkgs/development/libraries/brunsli/default.nix
new file mode 100644
index 000000000000..03c9b02f7f9f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/brunsli/default.nix
@@ -0,0 +1,56 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, brotli
+}:
+
+stdenv.mkDerivation rec {
+  pname = "brunsli";
+  version = "0.1";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "brunsli";
+    rev = "v${version}";
+    hash = "sha256-ZcrRz2xSoRepgG8KZYY/JzgONerItW0e6mH1PYsko98=";
+  };
+
+  patches = [
+    # unvendor brotli
+    (fetchpatch {
+      url = "https://cgit.freebsd.org/ports/plain/graphics/brunsli/files/patch-CMakeLists.txt";
+      extraPrefix = "";
+      hash = "sha256-/WPOG9OcEDj9ObBSXEM8Luq4Rix+PS2MvsYyHhK5mns=";
+    })
+    (fetchpatch {
+      url = "https://cgit.freebsd.org/ports/plain/graphics/brunsli/files/patch-brunsli.cmake";
+      extraPrefix = "";
+      hash = "sha256-+HXA9Tin+l2St7rRUEBM0AfhAjSoFxz8UX7hsg12aFg=";
+    })
+  ];
+
+  postPatch = ''
+    rm -r third_party
+  '' + lib.optionalString stdenv.isDarwin ''
+    rm -r build
+  '';
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = [
+    brotli
+  ];
+
+  meta = {
+    description = "Lossless JPEG repacking library";
+    homepage = "https://github.com/google/brunsli";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ dotlambda ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/buddy/default.nix b/nixpkgs/pkgs/development/libraries/buddy/default.nix
new file mode 100644
index 000000000000..eb9d146291d9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/buddy/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl, bison }:
+
+stdenv.mkDerivation rec {
+  pname = "buddy";
+  version = "2.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/buddy/${pname}-${version}.tar.gz";
+    sha256 = "0dl86l9xkl33wnkz684xa9axhcxx2zzi4q5lii0axnb9lsk81pyk";
+  };
+
+  buildInputs = [ bison ];
+  patches = [ ./gcc-4.3.3-fixes.patch ];
+  configureFlags = [ "CFLAGS=-O3" "CXXFLAGS=-O3" ];
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=register";
+  NIX_LDFLAGS = "-lm";
+  doCheck = true;
+
+  meta = {
+    homepage = "https://sourceforge.net/projects/buddy/";
+    description = "Binary decision diagram package";
+    license = "as-is";
+
+    platforms = lib.platforms.unix; # Once had cygwin problems
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/buddy/gcc-4.3.3-fixes.patch b/nixpkgs/pkgs/development/libraries/buddy/gcc-4.3.3-fixes.patch
new file mode 100644
index 000000000000..2e7efd1c4666
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/buddy/gcc-4.3.3-fixes.patch
@@ -0,0 +1,22 @@
+diff -uwr buddy-2.4.orig/examples/bddcalc/parser.yxx buddy-2.4/examples/bddcalc/parser.yxx
+--- buddy-2.4.orig/examples/bddcalc/parser.yxx	2009-07-02 17:12:48.000000000 +0200
++++ buddy-2.4/examples/bddcalc/parser.yxx	2009-07-02 17:18:36.000000000 +0200
+@@ -7,6 +7,7 @@
+
+ %{
+ #include <string>
++#include <cstdlib>
+ #include <stdarg.h>
+ #include <fstream>
+ #include <getopt.h>
+diff -uwr buddy-2.4.orig/src/bddtest.cxx buddy-2.4/src/bddtest.cxx
+--- buddy-2.4.orig/src/bddtest.cxx	2009-07-02 17:12:48.000000000 +0200
++++ buddy-2.4/src/bddtest.cxx	2009-07-02 17:14:05.000000000 +0200
+@@ -28,6 +28,7 @@
+ ========================================================================*/
+
+ #include <string>
++#include <cstdlib>
+ #include "bdd.h"
+ #include "bvec.h"
+
diff --git a/nixpkgs/pkgs/development/libraries/bullet/default.nix b/nixpkgs/pkgs/development/libraries/bullet/default.nix
new file mode 100644
index 000000000000..2dc3266291d3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/bullet/default.nix
@@ -0,0 +1,64 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, libGLU
+, libGL
+, freeglut
+, Cocoa
+, OpenGL
+}:
+
+stdenv.mkDerivation rec {
+  pname = "bullet";
+  version = "3.25";
+
+  src = fetchFromGitHub {
+    owner = "bulletphysics";
+    repo = "bullet3";
+    rev = version;
+    sha256 = "sha256-AGP05GoxLjHqlnW63/KkZe+TjO3IKcgBi+Qb/osQuCM=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = lib.optionals stdenv.isLinux [ libGLU libGL freeglut ]
+    ++ lib.optionals stdenv.isDarwin [ Cocoa OpenGL ];
+
+  postPatch = ''
+    substituteInPlace examples/ThirdPartyLibs/Gwen/CMakeLists.txt \
+      --replace "-DGLEW_STATIC" "-DGLEW_STATIC -Wno-narrowing"
+  '' + lib.optionalString stdenv.isDarwin ''
+    sed -i 's/FIND_PACKAGE(OpenGL)//' CMakeLists.txt
+    sed -i 's/FIND_LIBRARY(COCOA_LIBRARY Cocoa)//' CMakeLists.txt
+  '';
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+    "-DBUILD_CPU_DEMOS=OFF"
+    "-DINSTALL_EXTRA_LIBS=ON"
+  ] ++ lib.optionals stdenv.isDarwin [
+    "-DOPENGL_FOUND=true"
+    "-DOPENGL_LIBRARIES=${OpenGL}/Library/Frameworks/OpenGL.framework"
+    "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks/OpenGL.framework"
+    "-DOPENGL_gl_LIBRARY=${OpenGL}/Library/Frameworks/OpenGL.framework"
+    "-DCOCOA_LIBRARY=${Cocoa}/Library/Frameworks/Cocoa.framework"
+    "-DBUILD_BULLET2_DEMOS=OFF"
+    "-DBUILD_UNIT_TESTS=OFF"
+    "-DBUILD_BULLET_ROBOTICS_GUI_EXTRA=OFF"
+  ];
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang
+    "-Wno-error=argument-outside-range -Wno-error=c++11-narrowing";
+
+  meta = with lib; {
+    description = "A professional free 3D Game Multiphysics Library";
+    longDescription = ''
+      Bullet 3D Game Multiphysics Library provides state of the art collision
+      detection, soft body and rigid body dynamics.
+    '';
+    homepage = "http://bulletphysics.org";
+    license = licenses.zlib;
+    maintainers = with maintainers; [ aforemny ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/bullet/gwen-narrowing.patch b/nixpkgs/pkgs/development/libraries/bullet/gwen-narrowing.patch
new file mode 100644
index 000000000000..c6c06325dae0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/bullet/gwen-narrowing.patch
@@ -0,0 +1,22 @@
+commit a5d3497577c78b03c05c69d17df972fa9fb54f53
+Author: Linus Heckemann <git@sphalerite.org>
+Date:   Fri Jan 5 23:57:09 2018 +0100
+
+    Add -Wno-narrowing to GWEN's CMakeLists
+    
+    This avoids the compilation issue that occurs on aarch64 with gcc6.
+    (nixpkgs-specific patch)
+
+diff --git a/examples/ThirdPartyLibs/Gwen/CMakeLists.txt b/examples/ThirdPartyLibs/Gwen/CMakeLists.txt
+index 82fa0ffba..26c4bbd37 100644
+--- a/examples/ThirdPartyLibs/Gwen/CMakeLists.txt
++++ b/examples/ThirdPartyLibs/Gwen/CMakeLists.txt
+@@ -15,7 +15,7 @@ IF(NOT WIN32 AND NOT APPLE)
+         ADD_DEFINITIONS("-DDYNAMIC_LOAD_X11_FUNCTIONS=1")
+ ENDIF()
+ 
+-ADD_DEFINITIONS( -DGLEW_STATIC -DGWEN_COMPILE_STATIC -D_HAS_EXCEPTIONS=0 -D_STATIC_CPPLIB )
++ADD_DEFINITIONS( -DGLEW_STATIC -DGWEN_COMPILE_STATIC -D_HAS_EXCEPTIONS=0 -D_STATIC_CPPLIB -Wno-narrowing )
+ 
+ FILE(GLOB gwen_SRCS "*.cpp" "Controls/*.cpp" "Controls/Dialog/*.cpp" "Controls/Dialogs/*.cpp" "Controls/Layout/*.cpp" "Controls/Property/*.cpp" "Input/*.cpp" "Platforms/*.cpp" "Renderers/*.cpp" "Skins/*.cpp")
+ FILE(GLOB gwen_HDRS "*.h" "Controls/*.h" "Controls/Dialog/*.h" "Controls/Dialogs/*.h" "Controls/Layout/*.h" "Controls/Property/*.h" "Input/*.h" "Platforms/*.h" "Renderers/*.h" "Skins/*.h")
diff --git a/nixpkgs/pkgs/development/libraries/bullet/roboschool-fork.nix b/nixpkgs/pkgs/development/libraries/bullet/roboschool-fork.nix
new file mode 100644
index 000000000000..ac8433fc77ac
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/bullet/roboschool-fork.nix
@@ -0,0 +1,58 @@
+{ lib, stdenv, fetchFromGitHub, cmake, libGLU, libGL, freeglut
+, Cocoa,  OpenGL
+}:
+
+stdenv.mkDerivation {
+  pname = "bullet";
+  version = "2019-03-27";
+
+  src = fetchFromGitHub {
+    owner = "olegklimov";
+    repo = "bullet3";
+    # roboschool needs the HEAD of a specific branch of this fork, see
+    # https://github.com/openai/roboschool/issues/126#issuecomment-421643980
+    # https://github.com/openai/roboschool/pull/62
+    # https://github.com/openai/roboschool/issues/124
+    rev = "3687507ddc04a15de2c5db1e349ada3f2b34b3d6";
+    sha256 = "1wd7vj9136dl7lfb8ll0rc2fdl723y3ls9ipp7657yfl2xrqhvkb";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = lib.optionals stdenv.isLinux [ libGLU libGL freeglut ]
+    ++ lib.optionals stdenv.isDarwin [ Cocoa OpenGL ];
+
+  patches = [ ./gwen-narrowing.patch ];
+
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    sed -i 's/FIND_PACKAGE(OpenGL)//' CMakeLists.txt
+    sed -i 's/FIND_LIBRARY(COCOA_LIBRARY Cocoa)//' CMakeLists.txt
+  '';
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+    "-DBUILD_CPU_DEMOS=OFF"
+    "-DINSTALL_EXTRA_LIBS=ON"
+  ] ++ lib.optionals stdenv.isDarwin [
+    "-DOPENGL_FOUND=true"
+    "-DOPENGL_LIBRARIES=${OpenGL}/Library/Frameworks/OpenGL.framework"
+    "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks/OpenGL.framework"
+    "-DOPENGL_gl_LIBRARY=${OpenGL}/Library/Frameworks/OpenGL.framework"
+    "-DCOCOA_LIBRARY=${Cocoa}/Library/Frameworks/Cocoa.framework"
+    "-DBUILD_BULLET2_DEMOS=OFF"
+    "-DBUILD_UNIT_TESTS=OFF"
+  ];
+
+  meta = with lib; {
+    description = "A professional free 3D Game Multiphysics Library";
+    longDescription = ''
+      Bullet 3D Game Multiphysics Library provides state of the art collision
+      detection, soft body and rigid body dynamics.
+    '';
+    homepage = "http://bulletphysics.org";
+    license = licenses.zlib;
+    platforms = platforms.unix;
+    # /tmp/nix-build-bullet-2019-03-27.drv-0/source/src/Bullet3Common/b3Vector3.h:297:7: error: argument value 10880 is outside the valid range [0, 255] [-Wargument-outside-range]
+    #                 y = b3_splat_ps(y, 0x80);
+    broken = (stdenv.isDarwin && stdenv.isx86_64);
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/bulletml/default.nix b/nixpkgs/pkgs/development/libraries/bulletml/default.nix
new file mode 100644
index 000000000000..8d562b58e24a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/bulletml/default.nix
@@ -0,0 +1,77 @@
+{ lib, stdenv, fetchpatch, fetchurl, bison, perl }:
+
+let
+  version = "0.0.6";
+  debianRevision = "7";
+  debianPatch = patchname: hash: fetchpatch {
+    name = "${patchname}.patch";
+    url = "https://sources.debian.org/data/main/b/bulletml/${version}-${debianRevision}/debian/patches/${patchname}.patch";
+    sha256 = hash;
+  };
+
+  lib_src = fetchurl {
+    url = "http://shinh.skr.jp/libbulletml/libbulletml-${version}.tar.bz2";
+    sha256 = "0yda0zgj2ydgkmby5676f5iiawabxadzh5p7bmy42998sp9g6dvw";
+  };
+
+  cpp_src = fetchurl {
+    url = "http://shinh.skr.jp/d/d_cpp.tar.bz2";
+    sha256 = "1ly9qmbb8q9nyadmdap1gmxs3vkniqgchlv2hw7riansz4gg1agh";
+  };
+in
+
+stdenv.mkDerivation {
+  pname = "bulletml";
+  inherit version;
+
+  srcs = [ lib_src cpp_src ];
+
+  postUnpack = "mv d_cpp bulletml/";
+  sourceRoot = "bulletml";
+
+  patches = [
+    (debianPatch "fixes" "0cnr968n0h50fjmjijx7idsa2pg2pv5cwy6nvfbkx9z8w2zf0mkl")
+    (debianPatch "bulletml_d" "03d1dgln3gkiw019pxn3gwgjkmvzisq8kp3n6fpn38yfwh4fp4hv")
+    (debianPatch "d_cpp" "04g9c7c89w7cgrxw75mcbdhzxqmz1716li49mhl98znakchrlb9h")
+    (debianPatch "warnings" "18px79x4drvm6dy6w6js53nzlyvha7qaxhz5a99b97pyk3qc7i9g")
+    (debianPatch "makefile" "0z6yxanxmarx0s08gh12pk2wfqjk8g797wmfcqczdv1i6xc7nqzp")
+    (debianPatch "includes" "1n11j5695hs9pspslf748w2cq5d78s6bwhyl476wp6gcq6jw20bw")
+  ];
+
+  makeFlags = [
+    "-C src"
+  ];
+  nativeBuildInputs = [ bison perl ];
+  hardeningDisable = [ "format" ];
+
+  installPhase = ''
+    install -D -m 644 src/bulletml.d "$out"/include/d/bulletml.d
+    install -d "$out"/include/bulletml/tinyxml
+    install -m 644 src/*.h "$out"/include/bulletml
+    install -m 644 src/tinyxml/tinyxml.h "$out"/include/bulletml/tinyxml
+    cp -r src/boost $out/include/boost
+
+    install -d "$out"/lib
+    install -m 644 src/libbulletml.{a,so}* "$out"/lib
+
+    install -D -m 644 README "$out"/share/doc/libbulletml/README.jp
+    install -m 644 README.en "$out"/share/doc/libbulletml
+    install -m 644 README.bulletml "$out"/share/doc/libbulletml
+    install -D -m 644 README "$out"/share/licenses/libbulletml/README.jp
+    install -m 644 README.en "$out"/share/licenses/libbulletml
+  '';
+
+  meta = with lib; {
+    description = "C++ library to handle BulletML easily";
+    longDescription = ''
+      BulletML is the Bullet Markup Language. BulletML can describe the barrage
+      of bullets in shooting games.
+    '';
+    homepage = "http://www.asahi-net.or.jp/~cs8k-cyu/bulletml/index_e.html";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ fgaz ];
+    # See https://github.com/NixOS/nixpkgs/pull/35482
+    # for some attempts in getting it to build on darwin
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/bwidget/default.nix b/nixpkgs/pkgs/development/libraries/bwidget/default.nix
new file mode 100644
index 000000000000..9c1b8ac81cf0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/bwidget/default.nix
@@ -0,0 +1,27 @@
+{ lib, fetchurl, tcl, tk }:
+
+tcl.mkTclDerivation rec {
+  pname = "bwidget";
+  version = "1.9.16";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/tcllib/bwidget-${version}.tar.gz";
+    sha256 = "sha256-v+ADY3S4QpPSNiCn9t2oZXGBPQx63+2YPB8zflzoGuA=";
+  };
+
+  dontBuild = true;
+  propagatedBuildInputs = [ tk ];
+
+  installPhase = ''
+    mkdir -p "$out/lib/bwidget${version}"
+    cp -R *.tcl lang images "$out/lib/bwidget${version}"
+  '';
+
+  meta = {
+    homepage = "https://sourceforge.net/projects/tcllib";
+    description = "High-level widget set for Tcl/Tk";
+    maintainers = with lib.maintainers; [ agbrooks ];
+    license = lib.licenses.tcltk;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/bzrtp/default.nix b/nixpkgs/pkgs/development/libraries/bzrtp/default.nix
new file mode 100644
index 000000000000..6cbe6fc1899d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/bzrtp/default.nix
@@ -0,0 +1,41 @@
+{ bctoolbox
+, cmake
+, fetchFromGitLab
+, sqlite
+, lib
+, stdenv
+}:
+
+stdenv.mkDerivation rec {
+  pname = "bzrtp";
+  version = "5.2.111";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.linphone.org";
+    owner = "public";
+    group = "BC";
+    repo = pname;
+    rev = version;
+    hash = "sha256-sLvvQhJ9uVt/dx57xs9ftY/ETi46xmyGDH8372zpqj8=";
+  };
+
+  buildInputs = [ bctoolbox sqlite ];
+  nativeBuildInputs = [ cmake ];
+
+  # Do not build static libraries
+  cmakeFlags = [ "-DENABLE_STATIC=NO" ];
+
+  env.NIX_CFLAGS_COMPILE = toString [
+    # Needed with GCC 12
+    "-Wno-error=stringop-overflow"
+    "-Wno-error=unused-parameter"
+  ];
+
+  meta = with lib; {
+    description = "An opensource implementation of ZRTP keys exchange protocol. Part of the Linphone project.";
+    homepage = "https://gitlab.linphone.org/BC/public/bzrtp";
+    license = licenses.gpl3Plus;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ jluttine ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/c-ares/default.nix b/nixpkgs/pkgs/development/libraries/c-ares/default.nix
new file mode 100644
index 000000000000..60578f79ea57
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/c-ares/default.nix
@@ -0,0 +1,46 @@
+{ lib, stdenv, fetchurl, writeTextDir
+, withCMake ? true, cmake
+
+# sensitive downstream packages
+, curl
+, grpc # consumes cmake config
+}:
+
+# Note: this package is used for bootstrapping fetchurl, and thus
+# cannot use fetchpatch! All mutable patches (generated by GitHub or
+# cgit) that are needed here should be included directly in Nixpkgs as
+# files.
+
+stdenv.mkDerivation rec {
+  pname = "c-ares";
+  version = "1.19.1";
+
+  src = fetchurl {
+    url = "https://c-ares.org/download/${pname}-${version}.tar.gz";
+    sha256 = "sha256-MhcAOZty7Q4DfQB0xinndB9rLsLdqSlWq+PpZx0+Jo4=";
+  };
+
+  outputs = [ "out" "dev" "man" ];
+
+  nativeBuildInputs = lib.optionals withCMake [ cmake ];
+
+  cmakeFlags = [] ++ lib.optionals stdenv.hostPlatform.isStatic [
+    "-DCARES_SHARED=OFF"
+    "-DCARES_STATIC=ON"
+  ];
+
+  enableParallelBuilding = true;
+
+  passthru.tests = {
+    inherit grpc;
+    curl = (curl.override { c-aresSupport = true; }).tests.withCheck;
+  };
+
+  meta = with lib; {
+    description = "A C library for asynchronous DNS requests";
+    homepage = "https://c-ares.haxx.se";
+    changelog = "https://c-ares.org/changelog.html#${lib.replaceStrings [ "." ] [ "_" ] version}";
+    license = licenses.mit;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/c-blosc/1.nix b/nixpkgs/pkgs/development/libraries/c-blosc/1.nix
new file mode 100644
index 000000000000..1060e44af075
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/c-blosc/1.nix
@@ -0,0 +1,69 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, testers
+
+, static ? stdenv.hostPlatform.isStatic
+
+, lz4
+, zlib
+, zstd
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "c-blosc";
+  version = "1.21.5";
+
+  src = fetchFromGitHub {
+    owner = "Blosc";
+    repo = "c-blosc";
+    rev = "v${finalAttrs.version}";
+    sha256 = "sha256-bz922lWiap3vMy8qS9dmXa8zUg5NJlg0bx3+/xz7QAk=";
+  };
+
+  # https://github.com/NixOS/nixpkgs/issues/144170
+  postPatch = ''
+    sed -i -E \
+      -e '/^libdir[=]/clibdir=@CMAKE_INSTALL_FULL_LIBDIR@' \
+      -e '/^includedir[=]/cincludedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@' \
+      blosc.pc.in
+  '';
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [
+    lz4
+    zlib
+    zstd
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_STATIC=${if static then "ON" else "OFF"}"
+    "-DBUILD_SHARED=${if static then "OFF" else "ON"}"
+
+    "-DPREFER_EXTERNAL_LZ4=ON"
+    "-DPREFER_EXTERNAL_ZLIB=ON"
+    "-DPREFER_EXTERNAL_ZSTD=ON"
+
+    "-DBUILD_EXAMPLES=OFF"
+    "-DBUILD_BENCHMARKS=OFF"
+    "-DBUILD_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
+  ];
+
+  doCheck = !static;
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    description = "A blocking, shuffling and loss-less compression library";
+    homepage = "https://www.blosc.org";
+    changelog = "https://github.com/Blosc/c-blosc/releases/tag/v${version}";
+    pkgConfigModules = [
+      "blosc"
+    ];
+    license = licenses.bsd3;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ ris ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/c-blosc/2.nix b/nixpkgs/pkgs/development/libraries/c-blosc/2.nix
new file mode 100644
index 000000000000..a431b7f59a85
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/c-blosc/2.nix
@@ -0,0 +1,71 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, testers
+
+, static ? stdenv.hostPlatform.isStatic
+
+, lz4
+, zlib-ng
+, zstd
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "c-blosc2";
+  version = "2.13.2";
+
+  src = fetchFromGitHub {
+    owner = "Blosc";
+    repo = "c-blosc2";
+    rev = "v${finalAttrs.version}";
+    sha256 = "sha256-RNIvg6p/+brW7oboTDH0bbRfIQDaZwtZbbWFbftfWTk=";
+  };
+
+  # https://github.com/NixOS/nixpkgs/issues/144170
+  postPatch = ''
+    sed -i -E \
+      -e '/^libdir[=]/clibdir=@CMAKE_INSTALL_FULL_LIBDIR@' \
+      -e '/^includedir[=]/cincludedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@' \
+      blosc2.pc.in
+  '';
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [
+    lz4
+    zlib-ng
+    zstd
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_STATIC=${if static then "ON" else "OFF"}"
+    "-DBUILD_SHARED=${if static then "OFF" else "ON"}"
+
+    "-DPREFER_EXTERNAL_LZ4=ON"
+    "-DPREFER_EXTERNAL_ZLIB=ON"
+    "-DPREFER_EXTERNAL_ZSTD=ON"
+
+    "-DBUILD_EXAMPLES=OFF"
+    "-DBUILD_BENCHMARKS=OFF"
+    "-DBUILD_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
+  ];
+
+  doCheck = !static;
+  # possibly https://github.com/Blosc/c-blosc2/issues/432
+  enableParallelChecking = false;
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    description = "A fast, compressed, persistent binary data store library for C";
+    homepage = "https://www.blosc.org";
+    changelog = "https://github.com/Blosc/c-blosc2/releases/tag/v${version}";
+    pkgConfigModules = [
+      "blosc2"
+    ];
+    license = licenses.bsd3;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ ris ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/c-blosc/default.nix b/nixpkgs/pkgs/development/libraries/c-blosc/default.nix
new file mode 100644
index 000000000000..4ebe3622af4c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/c-blosc/default.nix
@@ -0,0 +1,4 @@
+{ callPackage }: {
+  c-blosc = callPackage ./1.nix {};
+  c-blosc2 = callPackage ./2.nix {};
+}
diff --git a/nixpkgs/pkgs/development/libraries/caf/default.nix b/nixpkgs/pkgs/development/libraries/caf/default.nix
new file mode 100644
index 000000000000..ae7075cd80df
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/caf/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub, cmake, openssl }:
+
+stdenv.mkDerivation rec {
+  pname = "actor-framework";
+  version = "0.19.6";
+
+  src = fetchFromGitHub {
+    owner = "actor-framework";
+    repo = "actor-framework";
+    rev = version;
+    hash = "sha256-Nb/BF/+xDWV/6iPo3o/NO6EtIaAW+yGFj06AO2baFfc=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ openssl ];
+
+  cmakeFlags = [
+    "-DCAF_ENABLE_EXAMPLES:BOOL=OFF"
+  ];
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-faligned-allocation";
+
+  doCheck = !stdenv.isDarwin;
+  checkTarget = "test";
+
+  meta = with lib; {
+    description = "An open source implementation of the actor model in C++";
+    homepage = "http://actor-framework.org/";
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+    changelog = "https://github.com/actor-framework/actor-framework/raw/${version}/CHANGELOG.md";
+    maintainers = with maintainers; [ bobakker tobim ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cairo/0001-test-don-t-always-build-FreeType-dependent-test.patch b/nixpkgs/pkgs/development/libraries/cairo/0001-test-don-t-always-build-FreeType-dependent-test.patch
new file mode 100644
index 000000000000..9688aca55ab9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cairo/0001-test-don-t-always-build-FreeType-dependent-test.patch
@@ -0,0 +1,34 @@
+From 3910b1155f2d5a98142ade67e09f097cb94a2d2e Mon Sep 17 00:00:00 2001
+From: Alyssa Ross <hi@alyssa.is>
+Date: Mon, 22 Apr 2019 09:53:54 +0000
+Subject: [PATCH 1/5] test: don't always build FreeType-dependent test
+
+This caused a build failure when attempting to build cairo without
+FreeType available on the system.
+---
+ test/Makefile.sources | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/Makefile.sources b/test/Makefile.sources
+index c47131faf..cc3d81f7e 100644
+--- a/test/Makefile.sources
++++ b/test/Makefile.sources
+@@ -144,7 +144,6 @@ test_sources = \
+ 	font-face-get-type.c				\
+ 	font-matrix-translation.c			\
+ 	font-options.c					\
+-	font-variations.c				\
+ 	glyph-cache-pressure.c				\
+ 	get-and-set.c					\
+ 	get-clip.c					\
+@@ -399,6 +398,7 @@ pthread_test_sources =					\
+ 
+ ft_font_test_sources = \
+ 	bitmap-font.c \
++	font-variations.c \
+ 	ft-font-create-for-ft-face.c \
+ 	ft-show-glyphs-positioning.c \
+ 	ft-show-glyphs-table.c \
+-- 
+2.19.2
+
diff --git a/nixpkgs/pkgs/development/libraries/cairo/0002-gl-don-t-implicitly-include-X11-headers.patch b/nixpkgs/pkgs/development/libraries/cairo/0002-gl-don-t-implicitly-include-X11-headers.patch
new file mode 100644
index 000000000000..c34e93ae676a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cairo/0002-gl-don-t-implicitly-include-X11-headers.patch
@@ -0,0 +1,40 @@
+From ec6ee0e09e2d59455241081af66fb3ba02def7e4 Mon Sep 17 00:00:00 2001
+From: Alyssa Ross <hi@alyssa.is>
+Date: Mon, 22 Apr 2019 10:41:27 +0000
+Subject: [PATCH 2/5] gl: don't implicitly include X11 headers
+
+EGL/egl.h on my system includes X11 headers by default, which breaks
+compilation when they aren't available, even though Cairo doesn't need
+them.
+
+Fortunately, this only happens if MESA_EGL_NO_X11_HEADERS is not
+defined, so defining that allows Cairo to be built with GL enabled even
+when X11 isn't available.
+
+Only when the Xlib surface is enabled are the headers guaranteed to be
+available. In that case, MESA_EGL_NO_X11_HEADERS should not be defined,
+to preserve compatibility with users expecting Cairo to include these
+headers. (There are tests that make this assumption.)
+---
+ src/cairo-gl.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/cairo-gl.h b/src/cairo-gl.h
+index 7cd869c76..a95b07bc3 100644
+--- a/src/cairo-gl.h
++++ b/src/cairo-gl.h
+@@ -127,6 +127,11 @@ cairo_gl_surface_create_for_dc (cairo_device_t		*device,
+ #endif
+ 
+ #if CAIRO_HAS_EGL_FUNCTIONS
++
++#if !CAIRO_HAS_XLIB_SURFACE && !defined(MESA_EGL_NO_X11_HEADERS)
++#define MESA_EGL_NO_X11_HEADERS
++#endif
++
+ #include <EGL/egl.h>
+ 
+ cairo_public cairo_device_t *
+-- 
+2.19.2
+
diff --git a/nixpkgs/pkgs/development/libraries/cairo/0003-test-only-build-GL-tests-when-Xlib-is-enabled.patch b/nixpkgs/pkgs/development/libraries/cairo/0003-test-only-build-GL-tests-when-Xlib-is-enabled.patch
new file mode 100644
index 000000000000..09d7fd88627d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cairo/0003-test-only-build-GL-tests-when-Xlib-is-enabled.patch
@@ -0,0 +1,41 @@
+From 84593a7e01b9afa74ec0bddd9515b666d476efba Mon Sep 17 00:00:00 2001
+From: Alyssa Ross <hi@alyssa.is>
+Date: Mon, 22 Apr 2019 11:29:48 +0000
+Subject: [PATCH 3/5] test: only build GL tests when Xlib is enabled
+
+The GL tests all depend on Xlib functions, so they should only be
+enabled when Xlib is enabled, because otherwise the required functions
+might not be present.
+---
+ test/Makefile.am | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/test/Makefile.am b/test/Makefile.am
+index e3c42ea88..9f77622bc 100644
+--- a/test/Makefile.am
++++ b/test/Makefile.am
+@@ -16,10 +16,6 @@ test_sources += $(ft_font_test_sources)
+ endif
+ endif
+ 
+-if CAIRO_HAS_GL_SURFACE
+-test_sources += $(gl_surface_test_sources)
+-endif
+-
+ if CAIRO_HAS_EGL_FUNCTIONS
+ test_sources += $(egl_surface_test_sources)
+ endif
+@@ -51,6 +47,10 @@ endif
+ 
+ if CAIRO_HAS_XLIB_SURFACE
+ test_sources += $(xlib_surface_test_sources)
++
++if CAIRO_HAS_GL_SURFACE
++test_sources += $(gl_surface_test_sources)
++endif
+ endif
+ 
+ if CAIRO_HAS_XLIB_XRENDER_SURFACE
+-- 
+2.19.2
+
diff --git a/nixpkgs/pkgs/development/libraries/cairo/0004-util-don-t-build-cairo-sphinx-unless-PNG-enabled.patch b/nixpkgs/pkgs/development/libraries/cairo/0004-util-don-t-build-cairo-sphinx-unless-PNG-enabled.patch
new file mode 100644
index 000000000000..702c4d49e484
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cairo/0004-util-don-t-build-cairo-sphinx-unless-PNG-enabled.patch
@@ -0,0 +1,32 @@
+From 8b7816ea38a1869e7de94341e3ea9e1eebb8eb4f Mon Sep 17 00:00:00 2001
+From: Alyssa Ross <hi@alyssa.is>
+Date: Mon, 22 Apr 2019 13:08:30 +0000
+Subject: [PATCH 4/5] util: don't build cairo-sphinx unless PNG enabled
+
+cairo-sphinx won't build without libpng, because
+cairo_surface_write_to_png won't be defined.
+---
+ util/Makefile.am | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/util/Makefile.am b/util/Makefile.am
+index 82d0a804c..119b59f48 100644
+--- a/util/Makefile.am
++++ b/util/Makefile.am
+@@ -25,11 +25,13 @@ if BUILD_SPHINX
+ if CAIRO_HAS_DLSYM
+ if CAIRO_HAS_SCRIPT_SURFACE
+ if CAIRO_HAS_TEE_SURFACE
++if CAIRO_HAS_PNG_FUNCTIONS
+ SUBDIRS += cairo-sphinx
+ endif
+ endif
+ endif
+ endif
++endif
+ 
+ AM_CPPFLAGS = -I$(top_srcdir)/src \
+ 	      -I$(top_builddir)/src \
+-- 
+2.19.2
+
diff --git a/nixpkgs/pkgs/development/libraries/cairo/default.nix b/nixpkgs/pkgs/development/libraries/cairo/default.nix
new file mode 100644
index 000000000000..8ac9da237d19
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cairo/default.nix
@@ -0,0 +1,115 @@
+{ lib, stdenv, fetchurl, fetchpatch, gtk-doc, meson, ninja, pkg-config, python3
+, docbook_xsl, fontconfig, freetype, libpng, pixman, zlib
+, x11Support? !stdenv.isDarwin || true, libXext, libXrender
+, gobjectSupport ? true, glib
+, xcbSupport ? x11Support, libxcb
+, darwin
+, testers
+}:
+
+let
+  inherit (lib) optional optionals;
+in stdenv.mkDerivation (finalAttrs: let
+  inherit (finalAttrs) pname version;
+in {
+  pname = "cairo";
+  version = "1.18.0";
+
+  src = fetchurl {
+    url = "https://cairographics.org/${if lib.mod (builtins.fromJSON (lib.versions.minor version)) 2 == 0 then "releases" else "snapshots"}/${pname}-${version}.tar.xz";
+    hash = "sha256-JDoHNrl4oz3uKfnMp1IXM7eKZbVBggb+970cPUzxC2Q=";
+  };
+
+  outputs = [ "out" "dev" "devdoc" ];
+  outputBin = "dev"; # very small
+  separateDebugInfo = true;
+
+  nativeBuildInputs = [
+    gtk-doc
+    meson
+    ninja
+    pkg-config
+    python3
+  ];
+
+  buildInputs = [
+    docbook_xsl
+  ] ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
+    CoreGraphics
+    CoreText
+    ApplicationServices
+    Carbon
+  ]);
+
+  propagatedBuildInputs = [ fontconfig freetype pixman libpng zlib ]
+    ++ optionals x11Support [ libXext libXrender ]
+    ++ optionals xcbSupport [ libxcb ]
+    ++ optional gobjectSupport glib
+    ; # TODO: maybe liblzo but what would it be for here?
+
+  mesonFlags = [
+    "-Dgtk_doc=true"
+
+    # error: #error config.h must be included before this header
+    "-Dsymbol-lookup=disabled"
+
+    # Only used in tests, causes a dependency cycle
+    "-Dspectre=disabled"
+
+    (lib.mesonEnable "glib" gobjectSupport)
+    (lib.mesonEnable "tests" finalAttrs.finalPackage.doCheck)
+    (lib.mesonEnable "xlib" x11Support)
+    (lib.mesonEnable "xcb" xcbSupport)
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    "--cross-file=${builtins.toFile "cross-file.conf" ''
+      [properties]
+      ipc_rmid_deferred_release = ${
+        {
+          linux = "true";
+          freebsd = "true";
+          netbsd = "false";
+        }.${stdenv.hostPlatform.parsed.kernel.name} or
+          (throw "Unknown value for ipc_rmid_deferred_release")
+      }
+    ''}"
+  ];
+
+  preConfigure = ''
+    patchShebangs version.py
+  '';
+
+  enableParallelBuilding = true;
+
+  doCheck = false; # fails
+
+  postInstall = ''
+    # Work around broken `Requires.private' that prevents Freetype
+    # `-I' flags to be propagated.
+    sed -i "$out/lib/pkgconfig/cairo.pc" \
+        -es'|^Cflags:\(.*\)$|Cflags: \1 -I${freetype.dev}/include/freetype2 -I${freetype.dev}/include|g'
+  '' + lib.optionalString stdenv.isDarwin glib.flattenInclude;
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    description = "A 2D graphics library with support for multiple output devices";
+    longDescription = ''
+      Cairo is a 2D graphics library with support for multiple output
+      devices.  Currently supported output targets include the X
+      Window System, XCB, Quartz, Win32, image buffers, PostScript,
+      PDF, and SVG file output.
+
+      Cairo is designed to produce consistent output on all output
+      media while taking advantage of display hardware acceleration
+      when available (e.g., through the X Render Extension).
+    '';
+    homepage = "http://cairographics.org/";
+    license = with licenses; [ lgpl2Plus mpl10 ];
+    pkgConfigModules = [
+      "cairo-pdf"
+      "cairo-ps"
+      "cairo-svg"
+    ] ++ lib.optional gobjectSupport "cairo-gobject";
+    platforms = platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/cairomm/1.16.nix b/nixpkgs/pkgs/development/libraries/cairomm/1.16.nix
new file mode 100644
index 000000000000..9da00741c34e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cairomm/1.16.nix
@@ -0,0 +1,62 @@
+{ stdenv
+, lib
+, fetchurl
+, boost
+, meson
+, ninja
+, pkg-config
+, cairo
+, fontconfig
+, libsigcxx30
+, ApplicationServices
+}:
+
+stdenv.mkDerivation rec {
+  pname = "cairomm";
+  version = "1.18.0";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "https://www.cairographics.org/releases/cairomm-${version}.tar.xz";
+    sha256 = "uBJVOU4+qOiqiHJ20ir6iYX8ja72BpLrJAfSMEnwPPs=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+  ];
+
+  buildInputs = [
+    boost # for tests
+    fontconfig
+  ] ++ lib.optionals stdenv.isDarwin [
+    ApplicationServices
+  ];
+
+  propagatedBuildInputs = [
+    cairo
+    libsigcxx30
+  ];
+
+  mesonFlags = [
+    "-Dbuild-tests=true"
+  ];
+
+  # Meson is no longer able to pick up Boost automatically.
+  # https://github.com/NixOS/nixpkgs/issues/86131
+  BOOST_INCLUDEDIR = "${lib.getDev boost}/include";
+  BOOST_LIBRARYDIR = "${lib.getLib boost}/lib";
+
+  # Tests fail on Darwin, possibly because of sandboxing.
+  doCheck = !stdenv.isDarwin;
+
+  meta = with lib; {
+    description = "C++ bindings for the Cairo vector graphics library";
+    homepage = "https://www.cairographics.org/";
+    license = with licenses; [ lgpl2Plus mpl10 ];
+    maintainers = teams.gnome.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cairomm/default.nix b/nixpkgs/pkgs/development/libraries/cairomm/default.nix
new file mode 100644
index 000000000000..d8d908cbc40d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cairomm/default.nix
@@ -0,0 +1,60 @@
+{ fetchurl
+, stdenv
+, lib
+, pkg-config
+, darwin
+, boost
+, cairo
+, fontconfig
+, libsigcxx
+, meson
+, ninja
+}:
+
+stdenv.mkDerivation rec {
+  pname = "cairomm";
+  version = "1.14.5";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "https://www.cairographics.org/releases/cairomm-${version}.tar.xz";
+    sha256 = "cBNiA1QMiE6Jzhye37Y2m5lTk39s1ZbZfHjJdYpdSNs=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+  ];
+
+  buildInputs = [
+    boost # for tests
+    fontconfig
+  ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
+    ApplicationServices
+  ]);
+
+  propagatedBuildInputs = [
+    cairo
+    libsigcxx
+  ];
+
+  mesonFlags = [
+    "-Dbuild-tests=true"
+  ];
+
+  # Meson is no longer able to pick up Boost automatically.
+  # https://github.com/NixOS/nixpkgs/issues/86131
+  BOOST_INCLUDEDIR = "${lib.getDev boost}/include";
+  BOOST_LIBRARYDIR = "${lib.getLib boost}/lib";
+
+  doCheck = !stdenv.isDarwin;
+
+  meta = with lib; {
+    description = "C++ bindings for the Cairo vector graphics library";
+    homepage = "https://www.cairographics.org/";
+    license = with licenses; [ lgpl2Plus mpl10 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/calcium/default.nix b/nixpkgs/pkgs/development/libraries/calcium/default.nix
new file mode 100644
index 000000000000..f73ee91b4f77
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/calcium/default.nix
@@ -0,0 +1,43 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, mpir
+, gmp
+, mpfr
+, flint
+, arb
+, antic
+}:
+
+stdenv.mkDerivation rec {
+  pname = "calcium";
+  version = "0.4.1";
+
+  src = fetchFromGitHub {
+    owner = "fredrik-johansson";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-Ony2FGMnWyNqD7adGeiDtysHNZ4ClMvQ1ijVPSHJmyc=";
+  };
+
+  buildInputs = [ mpir gmp mpfr flint arb antic ];
+
+  configureFlags = [
+    "--with-gmp=${gmp}"
+    "--with-mpir=${mpir}"
+    "--with-mpfr=${mpfr}"
+    "--with-flint=${flint}"
+    "--with-arb=${arb}"
+    "--with-antic=${antic}"
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "A C library for exact computation with real and complex numbers";
+    homepage = "https://fredrikj.net/calcium/";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ smasher164 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/capnproto/default.nix b/nixpkgs/pkgs/development/libraries/capnproto/default.nix
new file mode 100644
index 000000000000..669e2c7d1859
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/capnproto/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, openssl
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "capnproto";
+  version = "1.0.2";
+
+  # release tarballs are missing some ekam rules
+  src = fetchFromGitHub {
+    owner = "capnproto";
+    repo = "capnproto";
+    rev = "v${version}";
+    sha256 = "sha256-LVdkqVBTeh8JZ1McdVNtRcnFVwEJRNjt0JV2l7RkuO8=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  propagatedBuildInputs = [ openssl zlib ];
+
+  meta = with lib; {
+    homepage    = "https://capnproto.org/";
+    description = "Cap'n Proto cerealization protocol";
+    longDescription = ''
+      Cap’n Proto is an insanely fast data interchange format and
+      capability-based RPC system. Think JSON, except binary. Or think Protocol
+      Buffers, except faster.
+    '';
+    license     = licenses.mit;
+    platforms   = platforms.all;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/capstone/default.nix b/nixpkgs/pkgs/development/libraries/capstone/default.nix
new file mode 100644
index 000000000000..ff33c7bd0979
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/capstone/default.nix
@@ -0,0 +1,35 @@
+{ lib
+, stdenv
+, cmake
+, fetchFromGitHub
+, fixDarwinDylibNames
+}:
+
+stdenv.mkDerivation rec {
+  pname = "capstone";
+  version = "4.0.2";
+
+  src = fetchFromGitHub {
+    owner = "aquynh";
+    repo = "capstone";
+    rev = version;
+    sha256 = "sha256-XMwQ7UaPC8YYu4yxsE4bbR3leYPfBHu5iixSLz05r3g=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ] ++ lib.optionals stdenv.isDarwin [
+    fixDarwinDylibNames
+  ];
+
+  doCheck = true;
+
+  meta = {
+    description = "Advanced disassembly library";
+    homepage    = "http://www.capstone-engine.org";
+    license     = lib.licenses.bsd3;
+    maintainers = with lib.maintainers; [ thoughtpolice ris ];
+    mainProgram = "cstool";
+    platforms   = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/caroline/default.nix b/nixpkgs/pkgs/development/libraries/caroline/default.nix
new file mode 100644
index 000000000000..6b94df2f64a1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/caroline/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, lib, fetchFromGitHub, vala, meson, ninja, pkg-config, glib, libgee, gtk3 }:
+
+stdenv.mkDerivation rec {
+  pname = "caroline";
+  version = "0.3.1";
+
+  src = fetchFromGitHub {
+    owner = "dcharles525";
+    repo = pname;
+    rev = version;
+    hash = "sha256-v423h9EC/h6B9VABhkvmYcyYXKPpvqhI8O7ZjbO637k";
+  };
+
+  nativeBuildInputs = [
+    vala
+    meson
+    ninja
+    pkg-config
+  ];
+
+  buildInputs = [
+    glib
+    libgee
+    gtk3
+  ];
+
+  meta = with lib; {
+    description = " A simple Cairo Chart Library for GTK and Vala";
+    homepage = "https://github.com/dcharles525/Caroline";
+    maintainers = with maintainers; [ grindhold ];
+    license = licenses.mit;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cassandra-cpp-driver/default.nix b/nixpkgs/pkgs/development/libraries/cassandra-cpp-driver/default.nix
new file mode 100644
index 000000000000..4e8175d0585a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cassandra-cpp-driver/default.nix
@@ -0,0 +1,41 @@
+{ fetchFromGitHub
+, lib
+, stdenv
+, cmake
+, zlib
+, libuv
+, openssl
+, pkg-config
+, examples ? false
+}: stdenv.mkDerivation rec {
+    pname = "cassandra-cpp-driver";
+    version = "2.17.1";
+
+    src = fetchFromGitHub {
+      owner = "datastax";
+      repo = "cpp-driver";
+      rev = "refs/tags/${version}";
+      sha256 = "sha256-GuvmKHJknudyn7ahrn/8+kKUA4NW5UjCfkYoX3aTE+Q=";
+    };
+
+    nativeBuildInputs = [ cmake pkg-config ];
+    buildInputs = [ zlib libuv openssl.dev ];
+
+    cmakeFlags = (lib.attrsets.mapAttrsToList
+      (name: value: "-DCASS_BUILD_${name}:BOOL=${if value then "ON" else "OFF"}") {
+        EXAMPLES = examples;
+      }) ++ [ "-DLIBUV_INCLUDE_DIR=${lib.getDev libuv}/include" ];
+
+    meta = with lib; {
+      description = "DataStax CPP cassandra driver";
+      longDescription = ''
+        A modern, feature-rich and highly tunable C/C++ client
+        library for Apache Cassandra 2.1+ using exclusively Cassandra’s
+        binary protocol and Cassandra Query Language v3.
+      '';
+      license = with licenses; [ asl20 ];
+      platforms = platforms.x86_64;
+      homepage = "https://docs.datastax.com/en/developer/cpp-driver/";
+      maintainers = [ maintainers.npatsakula ];
+    };
+}
diff --git a/nixpkgs/pkgs/development/libraries/catboost/default.nix b/nixpkgs/pkgs/development/libraries/catboost/default.nix
new file mode 100644
index 000000000000..fc18eef2ca89
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/catboost/default.nix
@@ -0,0 +1,113 @@
+{ lib
+, config
+, stdenv
+, fetchFromGitHub
+, cmake
+, libiconv
+, llvmPackages
+, ninja
+, openssl
+, python3Packages
+, ragel
+, yasm
+, zlib
+, cudaSupport ? config.cudaSupport
+, cudaPackages ? {}
+, pythonSupport ? false
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "catboost";
+  version = "1.2.2";
+
+  src = fetchFromGitHub {
+    owner = "catboost";
+    repo = "catboost";
+    rev = "refs/tags/v${finalAttrs.version}";
+    hash = "sha256-A1zCIqPOW21dHKBQHRtS+/sstZ2o6F8k71lmJFGn0+g=";
+  };
+
+  patches = [
+    ./remove-conan.patch
+  ];
+
+  postPatch = ''
+    substituteInPlace cmake/common.cmake \
+      --replace  "\''${RAGEL_BIN}" "${ragel}/bin/ragel" \
+      --replace "\''${YASM_BIN}" "${yasm}/bin/yasm"
+
+    shopt -s globstar
+    for cmakelists in **/CMakeLists.*; do
+      sed -i "s/OpenSSL::OpenSSL/OpenSSL::SSL/g" $cmakelists
+      ${lib.optionalString (lib.versionOlder cudaPackages.cudaVersion "11.8") ''
+        sed -i 's/-gencode=arch=compute_89,code=sm_89//g' $cmakelists
+        sed -i 's/-gencode=arch=compute_90,code=sm_90//g' $cmakelists
+      ''}
+    done
+  '';
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [
+    cmake
+    llvmPackages.bintools
+    ninja
+    (python3Packages.python.withPackages (ps: with ps; [ six ]))
+    ragel
+    yasm
+  ] ++ lib.optionals cudaSupport (with cudaPackages; [
+    cuda_nvcc
+  ]);
+
+  buildInputs = [
+    openssl
+    zlib
+  ] ++ lib.optionals stdenv.isDarwin [
+    libiconv
+  ] ++ lib.optionals cudaSupport (with cudaPackages; [
+    cuda_cudart
+    cuda_cccl
+    libcublas
+  ]);
+
+  env = {
+    CUDAHOSTCXX = lib.optionalString cudaSupport "${stdenv.cc}/bin/cc";
+    NIX_CFLAGS_LINK = lib.optionalString stdenv.isLinux "-fuse-ld=lld";
+    NIX_LDFLAGS = "-lc -lm";
+  };
+
+  cmakeFlags = [
+    "-DCMAKE_BINARY_DIR=$out"
+    "-DCMAKE_POSITION_INDEPENDENT_CODE=on"
+    "-DCATBOOST_COMPONENTS=app;libs${lib.optionalString pythonSupport ";python-package"}"
+  ] ++ lib.optionals cudaSupport [
+    "-DHAVE_CUDA=on"
+  ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir $dev
+    cp -r catboost $dev
+    install -Dm555 catboost/app/catboost -t $out/bin
+    install -Dm444 catboost/libs/model_interface/static/lib/libmodel_interface-static-lib.a -t $out/lib
+    install -Dm444 catboost/libs/model_interface/libcatboostmodel${stdenv.hostPlatform.extensions.sharedLibrary} -t $out/lib
+    install -Dm444 catboost/libs/train_interface/libcatboost${stdenv.hostPlatform.extensions.sharedLibrary} -t $out/lib
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "High-performance library for gradient boosting on decision trees";
+    longDescription = ''
+      A fast, scalable, high performance Gradient Boosting on Decision Trees
+      library, used for ranking, classification, regression and other machine
+      learning tasks for Python, R, Java, C++. Supports computation on CPU and GPU.
+    '';
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    homepage = "https://catboost.ai";
+    maintainers = with maintainers; [ PlushBeaver natsukium ];
+    mainProgram = "catboost";
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/catboost/remove-conan.patch b/nixpkgs/pkgs/development/libraries/catboost/remove-conan.patch
new file mode 100644
index 000000000000..6f96b7989a58
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/catboost/remove-conan.patch
@@ -0,0 +1,34 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index becd2ad03c..7e3c8c99b1 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -27,7 +27,6 @@ cmake_policy(SET CMP0104 OLD)
+ 
+ include(cmake/archive.cmake)
+ include(cmake/common.cmake)
+-include(cmake/conan.cmake)
+ include(cmake/cuda.cmake)
+ include(cmake/cython.cmake)
+ include(cmake/fbs.cmake)
+@@ -37,21 +36,6 @@ include(cmake/recursive_library.cmake)
+ include(cmake/swig.cmake)
+ include(cmake/global_vars.cmake)
+ 
+-if (CMAKE_CROSSCOMPILING)
+-  include(${CMAKE_BINARY_DIR}/conan_paths.cmake)
+-else()
+-  conan_cmake_autodetect(settings)
+-  conan_cmake_install(
+-    PATH_OR_REFERENCE ${CMAKE_SOURCE_DIR}
+-    INSTALL_FOLDER ${CMAKE_BINARY_DIR}
+-    BUILD missing
+-    REMOTE conancenter
+-    SETTINGS ${settings}
+-      ENV "CONAN_CMAKE_GENERATOR=${CMAKE_GENERATOR}"
+-      CONF "tools.cmake.cmaketoolchain:generator=${CMAKE_GENERATOR}"
+-  )
+-endif()
+-
+ if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND NOT HAVE_CUDA)
+   include(CMakeLists.linux-x86_64.txt)
+ elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND HAVE_CUDA)
diff --git a/nixpkgs/pkgs/development/libraries/catch/default.nix b/nixpkgs/pkgs/development/libraries/catch/default.nix
new file mode 100644
index 000000000000..c4d64a0f4787
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/catch/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "catch";
+  version = "1.12.2";
+
+  src = fetchFromGitHub {
+    owner = "catchorg";
+    repo = "Catch";
+    rev = "v${version}";
+    sha256 = "1gdp5wm8khn02g2miz381llw3191k7309qj8s3jd6sasj01rhf23";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  cmakeFlags = [ "-DUSE_CPP14=ON" ];
+
+  patches = [
+    # https://github.com/catchorg/Catch2/pull/2151
+    (fetchpatch {
+      url = "https://github.com/catchorg/Catch2/commit/bb6d08323f23a39eb65dd86671e68f4f5d3f2d6c.patch";
+      sha256 = "1vhbzx84nrhhf9zlbl6h5zmg3r5w5v833ihlswsysb9wp2i4isc5";
+    })
+
+    # Fix glibc-2.34 build
+    (fetchpatch {
+      url = "https://src.fedoraproject.org/rpms/catch1/raw/23276476148a657e7a45ade547f858cbf965a33a/f/catch1-sigstksz.patch";
+      sha256 = "sha256-XSsI3iDEZCUSbozlYWC0y/LZ7qr/5zwACpn1jHKD0yU=";
+    })
+  ];
+
+  doCheck = true;
+  checkTarget = "test";
+
+  meta = with lib; {
+    description = "A multi-paradigm automated test framework for C++ and Objective-C (and, maybe, C)";
+    homepage = "http://catch-lib.net";
+    license = licenses.boost;
+    maintainers = with maintainers; [ edwtjo knedlsepp ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/catch2/3.nix b/nixpkgs/pkgs/development/libraries/catch2/3.nix
new file mode 100644
index 000000000000..aa8bf62059bd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/catch2/3.nix
@@ -0,0 +1,51 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, python3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "catch2";
+  version = "3.5.2";
+
+  src = fetchFromGitHub {
+    owner = "catchorg";
+    repo = "Catch2";
+    rev = "v${version}";
+    hash = "sha256-xGPfXjk+oOnR7JqTrZd2pKJxalrlS8CMs7HWDClXaS8=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  cmakeFlags = [
+    "-DCATCH_DEVELOPMENT_BUILD=ON"
+    "-DCATCH_BUILD_TESTING=${if doCheck then "ON" else "OFF"}"
+  ] ++ lib.optionals (stdenv.isDarwin && doCheck) [
+    # test has a faulty path normalization technique that won't work in
+    # our darwin build environment https://github.com/catchorg/Catch2/issues/1691
+    "-DCMAKE_CTEST_ARGUMENTS=-E;ApprovalTests"
+  ];
+
+  # Tests fail on x86_32 if compiled with x87 floats: https://github.com/catchorg/Catch2/issues/2796
+  env = lib.optionalAttrs stdenv.isx86_32 {
+    NIX_CFLAGS_COMPILE = "-msse2 -mfpmath=sse";
+  };
+
+  doCheck = true;
+
+  nativeCheckInputs = [
+    python3
+  ];
+
+  meta = {
+    description = "Modern, C++-native, test framework for unit-tests";
+    homepage = "https://github.com/catchorg/Catch2";
+    changelog = "https://github.com/catchorg/Catch2/blob/${src.rev}/docs/release-notes.md";
+    license = lib.licenses.boost;
+    maintainers = with lib.maintainers; [ dotlambda ];
+    platforms = with lib.platforms; unix ++ windows;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/catch2/default.nix b/nixpkgs/pkgs/development/libraries/catch2/default.nix
new file mode 100644
index 000000000000..56b2016539be
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/catch2/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "catch2";
+  version = "2.13.10";
+
+  src = fetchFromGitHub {
+    owner = "catchorg";
+    repo = "Catch2";
+    rev = "v${version}";
+    sha256="sha256-XnT2ziES94Y4uzWmaxSw7nWegJFQjAqFUG8PkwK5nLU=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [ "-H.." ];
+
+  meta = with lib; {
+    description = "A multi-paradigm automated test framework for C++ and Objective-C (and, maybe, C)";
+    homepage = "http://catch-lib.net";
+    license = licenses.boost;
+    maintainers = with maintainers; [ edwtjo knedlsepp ];
+    platforms = with platforms; unix ++ windows;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ccrtp/default.nix b/nixpkgs/pkgs/development/libraries/ccrtp/default.nix
new file mode 100644
index 000000000000..3fdbbd23ecdc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ccrtp/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl, pkg-config, ucommon, openssl, libgcrypt }:
+
+stdenv.mkDerivation rec {
+  pname = "ccrtp";
+  version = "2.1.2";
+
+  src = fetchurl {
+    url = "mirror://gnu/ccrtp/ccrtp-${version}.tar.gz";
+    sha256 = "17ili8l7zqbbkzr1rcy4hlnazkf50mds41wg6n7bfdsx3c7cldgh";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  propagatedBuildInputs = [ ucommon openssl libgcrypt ];
+
+  configureFlags = [
+    "--disable-demos"
+  ];
+
+  doCheck = true;
+
+  meta = {
+    description = "An implementation of the IETF real-time transport protocol (RTP)";
+    homepage = "https://www.gnu.org/software/ccrtp/";
+    license = lib.licenses.gpl2;
+    maintainers = with lib.maintainers; [ marcweber ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cctag/cmake-install-include-dir.patch b/nixpkgs/pkgs/development/libraries/cctag/cmake-install-include-dir.patch
new file mode 100644
index 000000000000..ae708e55d3e7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cctag/cmake-install-include-dir.patch
@@ -0,0 +1,11 @@
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -209,7 +209,7 @@
+   target_include_directories(CCTag
+                            PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>"
+                                   "$<BUILD_INTERFACE:${generated_dir}>"
+-                                  "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>"
++                                  "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
+                            PUBLIC ${Boost_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS})
+ 
+   # just for testing
diff --git a/nixpkgs/pkgs/development/libraries/cctag/default.nix b/nixpkgs/pkgs/development/libraries/cctag/default.nix
new file mode 100644
index 000000000000..238821b6af91
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cctag/default.nix
@@ -0,0 +1,66 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+
+, cmake
+, boost179
+, eigen
+, opencv
+, tbb
+
+, avx2Support ? stdenv.hostPlatform.avx2Support
+}:
+
+stdenv.mkDerivation rec {
+  pname = "cctag";
+  version = "1.0.3";
+
+  outputs = [ "lib" "dev" "out" ];
+
+  src = fetchFromGitHub {
+    owner = "alicevision";
+    repo = "CCTag";
+    rev = "v${version}";
+    hash = "sha256-foB+e7BCuUucyhN8FsI6BIT3/fsNLTjY6QmjkMWZu6A=";
+  };
+
+  cmakeFlags = [
+    # Feel free to create a PR to add CUDA support
+    "-DCCTAG_WITH_CUDA=OFF"
+
+    "-DCCTAG_ENABLE_SIMD_AVX2=${if avx2Support then "ON" else "OFF"}"
+
+    "-DCCTAG_BUILD_TESTS=${if doCheck then "ON" else "OFF"}"
+    "-DCCTAG_BUILD_APPS=OFF"
+  ];
+
+  patches = [
+    ./cmake-install-include-dir.patch
+  ];
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  propagatedBuildInputs = [
+    tbb
+  ];
+
+  buildInputs = [
+    boost179
+    eigen
+    opencv.cxxdev
+  ];
+
+  # Tests are broken on Darwin (linking issue)
+  doCheck = !stdenv.isDarwin;
+
+  meta = with lib; {
+    description = "Detection of CCTag markers made up of concentric circles";
+    homepage = "https://cctag.readthedocs.io";
+    downloadPage = "https://github.com/alicevision/CCTag";
+    license = licenses.mpl20;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ tmarkus ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cctz/default.nix b/nixpkgs/pkgs/development/libraries/cctz/default.nix
new file mode 100644
index 000000000000..0b945c8c5990
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cctz/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub, Foundation }:
+
+stdenv.mkDerivation rec {
+  pname = "cctz";
+  version = "2.3";
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "cctz";
+    rev = "v${version}";
+    sha256 = "0254xfwscfkjc3fbvx6qgifr3pwkc2rb03z8pbvvqy098di9alhr";
+  };
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  buildInputs = lib.optional stdenv.isDarwin Foundation;
+
+  installTargets = [ "install_hdrs" ]
+    ++ lib.optional (!stdenv.hostPlatform.isStatic) "install_shared_lib"
+    ++ lib.optional stdenv.hostPlatform.isStatic "install_lib";
+
+  postInstall = lib.optionalString stdenv.isDarwin ''
+    install_name_tool -id $out/lib/libcctz.so $out/lib/libcctz.so
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/google/cctz";
+    description = "C++ library for translating between absolute and civil times";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ orivej ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cddlib/default.nix b/nixpkgs/pkgs/development/libraries/cddlib/default.nix
new file mode 100644
index 000000000000..968f32a0af59
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cddlib/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv
+, fetchFromGitHub
+, gmp
+, autoreconfHook
+, texliveSmall
+}:
+
+stdenv.mkDerivation rec {
+  pname = "cddlib";
+  version = "0.94m";
+  src = fetchFromGitHub {
+    owner = "cddlib";
+    repo = "cddlib";
+    rev = version;
+    sha256 = "09s8323h5w9j6mpl1yc6lm770dkskfxd2ayyafkcjllmnncxzfa0";
+  };
+  buildInputs = [gmp];
+  nativeBuildInputs = [
+    autoreconfHook
+    texliveSmall # for building the documentation
+  ];
+  # No actual checks yet (2018-05-05), but maybe one day.
+  # Requested here: https://github.com/cddlib/cddlib/issues/25
+  doCheck = true;
+  meta = with lib; {
+    description = "An implementation of the Double Description Method for generating all vertices of a convex polyhedron";
+    license = licenses.gpl2Plus;
+    maintainers = teams.sage.members;
+    platforms = platforms.unix;
+    homepage = "https://www.inf.ethz.ch/personal/fukudak/cdd_home/index.html";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cdo/default.nix b/nixpkgs/pkgs/development/libraries/cdo/default.nix
new file mode 100644
index 000000000000..b016aa4d4d68
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cdo/default.nix
@@ -0,0 +1,42 @@
+{ lib, stdenv, fetchurl, curl, hdf5, netcdf, eccodes, python3
+, # build, install and link to a CDI library [default=no]
+  enable_cdi_lib ? false
+, # build a completely statically linked CDO binary
+  enable_all_static ? stdenv.hostPlatform.isStatic
+, # Use CXX as default compiler [default=no]
+  enable_cxx ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "cdo";
+  version = "2.2.2";
+
+  # Dependencies
+  buildInputs = [ curl netcdf hdf5 python3 ];
+
+  src = fetchurl {
+    url = "https://code.mpimet.mpg.de/attachments/download/28882/${pname}-${version}.tar.gz";
+    sha256 = "sha256-QZx3MVJEAZr0GilsBQZvR0zMv5Tev6rp4hBtpRvHyTc=";
+  };
+
+ configureFlags = [
+    "--with-netcdf=${netcdf}"
+    "--with-hdf5=${hdf5}"
+    "--with-eccodes=${eccodes}"
+  ]
+   ++ lib.optional enable_cdi_lib "--enable-cdi-lib"
+   ++ lib.optional enable_all_static "--enable-all-static"
+   ++ lib.optional enable_cxx "--enable-cxx";
+
+  meta = with lib; {
+    description = "Collection of command line Operators to manipulate and analyse Climate and NWP model Data";
+    longDescription = ''
+      Supported data formats are GRIB 1/2, netCDF 3/4, SERVICE, EXTRA and IEG.
+      There are more than 600 operators available.
+    '';
+    homepage = "https://code.mpimet.mpg.de/projects/cdo/";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.ltavard ];
+    platforms = with platforms; linux ++ darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cegui/default.nix b/nixpkgs/pkgs/development/libraries/cegui/default.nix
new file mode 100644
index 000000000000..c56c59d02ad1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cegui/default.nix
@@ -0,0 +1,58 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, ogre
+, freetype
+, boost
+, expat
+, darwin
+, libiconv
+, unstableGitUpdater
+}:
+
+stdenv.mkDerivation {
+  pname = "cegui";
+  version = "unstable-2023-03-18";
+
+  src = fetchFromGitHub {
+    owner = "paroj";
+    repo = "cegui";
+    rev = "186ce900e293b98f2721c11930248a8de54aa338";
+    hash = "sha256-RJ4MnxklcuxC+ZYEbfma5RDc2aeJ95LuTwNk+FnEhdo=";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = [
+    ogre
+    freetype
+    boost
+    expat
+  ] ++ lib.optionals stdenv.isDarwin [
+    darwin.apple_sdk.frameworks.Cocoa
+    darwin.apple_sdk.frameworks.Foundation
+    libiconv
+  ];
+
+  cmakeFlags = [
+    "-DCEGUI_OPTION_DEFAULT_IMAGECODEC=OgreRenderer-0"
+  ] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [
+    "-DCMAKE_OSX_ARCHITECTURES=${stdenv.hostPlatform.darwinArch}"
+  ];
+
+  passthru.updateScript = unstableGitUpdater {
+    branch = "v0";
+  };
+
+  meta = with lib; {
+    homepage = "http://cegui.org.uk/";
+    description = "C++ Library for creating GUIs";
+    license = licenses.mit;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/celt/0.5.1.nix b/nixpkgs/pkgs/development/libraries/celt/0.5.1.nix
new file mode 100644
index 000000000000..759dd6254b4e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/celt/0.5.1.nix
@@ -0,0 +1,17 @@
+{ callPackage, fetchurl, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  version = "0.5.1.3";
+
+  src = fetchurl {
+    url = "http://downloads.xiph.org/releases/celt/celt-${version}.tar.gz";
+    sha256 = "0bkam9z5vnrxpbxkkh9kw6yzjka9di56h11iijikdd1f71l5nbpw";
+  };
+
+  # Don't build tests due to badness with ec_ilog
+  prePatch = ''
+    substituteInPlace Makefile.in \
+      --replace 'SUBDIRS = libcelt tests' \
+                'SUBDIRS = libcelt'
+  '';
+})
diff --git a/nixpkgs/pkgs/development/libraries/celt/0.7.nix b/nixpkgs/pkgs/development/libraries/celt/0.7.nix
new file mode 100644
index 000000000000..2092941dc761
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/celt/0.7.nix
@@ -0,0 +1,10 @@
+{ callPackage, fetchurl, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  version = "0.7.1";
+
+  src = fetchurl {
+    url = "http://downloads.xiph.org/releases/celt/celt-${version}.tar.gz";
+    sha256 = "0rihjgzrqcprsv8a1pmiglwik7xqbs2yw3fwd6gb28chnpgy5w4k";
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/celt/default.nix b/nixpkgs/pkgs/development/libraries/celt/default.nix
new file mode 100644
index 000000000000..3071b5d7c6bb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/celt/default.nix
@@ -0,0 +1,10 @@
+{ callPackage, fetchurl, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  version = "0.11.3";
+
+  src = fetchurl {
+    url = "http://downloads.xiph.org/releases/celt/celt-${version}.tar.gz";
+    sha256 = "0dh893wqbh0q4a0x1xyqryykmnhpv7mkblpch019s04a99fq2r3y";
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/celt/generic.nix b/nixpkgs/pkgs/development/libraries/celt/generic.nix
new file mode 100644
index 000000000000..1ddc016d66b1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/celt/generic.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, version, src
+, liboggSupport ? true, libogg ? null # if disabled only the library will be built
+, prePatch ? ""
+, ...
+}:
+
+# The celt codec has been deprecated and is now a part of the opus codec
+
+stdenv.mkDerivation {
+  pname = "celt";
+  inherit version;
+
+  inherit src;
+
+  outputs = [ "out" "dev" ];
+
+  inherit prePatch;
+
+  buildInputs = []
+    ++ lib.optional liboggSupport libogg;
+
+  doCheck = false; # fails
+
+  meta = with lib; {
+    description = "Ultra-low delay audio codec";
+    homepage    = "https://gitlab.xiph.org/xiph/celt"; # http://www.celt-codec.org/ is gone
+    license     = licenses.bsd2;
+    maintainers = with maintainers; [ codyopel raskin ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cereal/1.3.0.nix b/nixpkgs/pkgs/development/libraries/cereal/1.3.0.nix
new file mode 100644
index 000000000000..ab438eb6a8bf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cereal/1.3.0.nix
@@ -0,0 +1,39 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "cereal";
+  version = "1.3.0";
+
+  src = fetchFromGitHub {
+    owner = "USCiLab";
+    repo = "cereal";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-NwyUVeqXxfdyuDevjum6r8LyNtHa0eJ+4IFd3hLkiEE=";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "CVE-2020-11105.patch";
+      url = "https://github.com/USCiLab/cereal/commit/f27c12d491955c94583512603bf32c4568f20929.patch";
+      hash = "sha256-CIkbJ7bAN0MXBhTXQdoQKXUmY60/wQvsdn99FaWt31w=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [ "-DJUST_INSTALL_CEREAL=yes" ];
+
+  meta = {
+    homepage = "https://uscilab.github.io/cereal/";
+    description = "A header-only C++11 serialization library";
+    changelog = "https://github.com/USCiLab/cereal/releases/tag/v${finalAttrs.version}";
+    license = lib.licenses.bsd3;
+    maintainers = with lib.maintainers; [ AndersonTorres ];
+    platforms = lib.platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/cereal/1.3.2.nix b/nixpkgs/pkgs/development/libraries/cereal/1.3.2.nix
new file mode 100644
index 000000000000..5a44b26426c7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cereal/1.3.2.nix
@@ -0,0 +1,31 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "cereal";
+  version = "1.3.2";
+
+  src = fetchFromGitHub {
+    owner = "USCiLab";
+    repo = "cereal";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-HapnwM5oSNKuqoKm5x7+i2zt0sny8z8CePwobz1ITQs=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [ "-DJUST_INSTALL_CEREAL=yes" ];
+
+  meta = {
+    homepage = "https://uscilab.github.io/cereal/";
+    description = "A header-only C++11 serialization library";
+    changelog = "https://github.com/USCiLab/cereal/releases/tag/v${finalAttrs.version}";
+    license = lib.licenses.bsd3;
+    maintainers = with lib.maintainers; [ AndersonTorres ];
+    platforms = lib.platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/ceres-solver/default.nix b/nixpkgs/pkgs/development/libraries/ceres-solver/default.nix
new file mode 100644
index 000000000000..7052c98d8ef8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ceres-solver/default.nix
@@ -0,0 +1,57 @@
+{ lib
+, stdenv
+, fetchpatch
+, fetchurl
+, blas
+, cmake
+, eigen
+, gflags
+, glog
+, suitesparse
+, metis
+, runTests ? false
+, enableStatic ? stdenv.hostPlatform.isStatic
+, withBlas ? true
+}:
+
+# gflags is required to run tests
+assert runTests -> gflags != null;
+
+stdenv.mkDerivation rec {
+  pname = "ceres-solver";
+  version = "2.1.0";
+
+  src = fetchurl {
+    url = "http://ceres-solver.org/ceres-solver-${version}.tar.gz";
+    sha256 = "sha256-99dO7N4K7XW/xR7EjJHQH+Fqa/FrzhmHpwcyhnAeL8Y=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = lib.optional runTests gflags;
+  propagatedBuildInputs = [ eigen glog ]
+  ++ lib.optionals withBlas [ blas suitesparse metis ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=${if enableStatic then "OFF" else "ON"}"
+  ];
+
+  # The Basel BUILD file conflicts with the cmake build directory on
+  # case-insensitive filesystems, eg. darwin.
+  preConfigure = ''
+    rm BUILD
+  '';
+
+  doCheck = runTests;
+
+  checkTarget = "test";
+
+  meta = with lib; {
+    description = "C++ library for modeling and solving large, complicated optimization problems";
+    license = licenses.bsd3;
+    homepage = "http://ceres-solver.org";
+    maintainers = with maintainers; [ giogadi ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cglm/default.nix b/nixpkgs/pkgs/development/libraries/cglm/default.nix
new file mode 100644
index 000000000000..a4fab015db90
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cglm/default.nix
@@ -0,0 +1,33 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "cglm";
+  version = "0.9.2";
+
+  src = fetchFromGitHub {
+    owner = "recp";
+    repo = "cglm";
+    rev = "v${version}";
+    sha256 = "sha256-jaG+XGbSx5SaNhGFWLh+1WTB+ya3c5tBZYs9xKIRafI=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  postPatch = ''
+    substituteInPlace CMakeLists.txt \
+      --replace '\$'{prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
+      --replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/recp/cglm";
+    description = "Highly Optimized Graphics Math (glm) for C";
+    license = licenses.mit;
+    maintainers = [ maintainers.ivar ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cgreen/default.nix b/nixpkgs/pkgs/development/libraries/cgreen/default.nix
new file mode 100644
index 000000000000..60d5bc1289ac
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cgreen/default.nix
@@ -0,0 +1,33 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "cgreen";
+  version = "1.6.3";
+
+  src = fetchFromGitHub {
+    owner = "cgreen-devs";
+    repo = "cgreen";
+    rev = finalAttrs.version;
+    sha256 = "sha256-qcOj+NlgbHCYuNsM6ngNI2fNhkCwLL6mIVkNSv9hRE8=";
+  };
+
+  postPatch = ''
+    for F in tools/discoverer_acceptance_tests.c tools/discoverer.c; do
+      substituteInPlace "$F" --replace "/usr/bin/nm" "nm"
+    done
+  '';
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = {
+    homepage = "https://github.com/cgreen-devs/cgreen";
+    description = "The Modern Unit Test and Mocking Framework for C and C++";
+    license = lib.licenses.isc;
+    maintainers = [ lib.maintainers.AndersonTorres ];
+    platforms = lib.platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/cgui/default.nix b/nixpkgs/pkgs/development/libraries/cgui/default.nix
new file mode 100644
index 000000000000..1bc85d1fcd81
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cgui/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl, texinfo, allegro, perl, libX11 }:
+
+stdenv.mkDerivation rec {
+  pname = "cgui";
+  version="2.1.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/cgui/${version}/${pname}-${version}.tar.gz";
+    sha256 = "1pp1hvidpilq37skkmbgba4lvzi01rasy04y0cnas9ck0canv00s";
+  };
+
+  buildInputs = [ texinfo allegro perl libX11 ];
+
+  configurePhase = ''
+    sh fix.sh unix
+  '';
+
+  hardeningDisable = [ "format" ];
+
+  makeFlags = [ "SYSTEM_DIR=$(out)" ];
+
+  meta = with lib; {
+    description = "A multiplatform basic GUI library";
+    maintainers = [ maintainers.raskin ];
+    platforms = platforms.linux;
+    license = licenses.free;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/charls/default.nix b/nixpkgs/pkgs/development/libraries/charls/default.nix
new file mode 100644
index 000000000000..150806c8c77e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/charls/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "charls";
+  version = "2.4.2";
+
+  src = fetchFromGitHub {
+    owner = "team-charls";
+    repo = pname;
+    rev = "refs/tags/${version}";
+    hash = "sha256-c1wrk6JLcAH7TFPwjARlggaKXrAsLWyUQF/3WHlqoqg=";
+  };
+
+  postPatch = ''
+    substituteInPlace src/charls-template.pc  \
+      --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@  \
+      --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
+  '';
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
+
+  # note this only runs some basic tests, not the full test suite,
+  # but the recommended `charlstest -unittest` fails with an inscrutable C++ IO error
+  doCheck = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/team-charls/charls";
+    description = "A JPEG-LS library implementation in C++";
+    maintainers = with maintainers; [ bcdarwin ];
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/check/default.nix b/nixpkgs/pkgs/development/libraries/check/default.nix
new file mode 100644
index 000000000000..14b4e549264b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/check/default.nix
@@ -0,0 +1,40 @@
+{ fetchurl, lib, stdenv
+, CoreServices
+}:
+
+stdenv.mkDerivation rec {
+  pname = "check";
+  version = "0.15.2";
+
+  src = fetchurl {
+    url = "https://github.com/libcheck/check/releases/download/${version}/check-${version}.tar.gz";
+    sha256 = "02m25y9m46pb6n46s51av62kpd936lkfv3b13kfpckgvmh5lxpm8";
+  };
+
+  # fortify breaks the libcompat vsnprintf implementation
+  hardeningDisable = lib.optionals (stdenv.hostPlatform.isMusl && (stdenv.hostPlatform != stdenv.buildPlatform)) [ "fortify" ];
+
+  # Test can randomly fail: https://hydra.nixos.org/build/7243912
+  doCheck = false;
+
+  buildInputs = lib.optional stdenv.isDarwin CoreServices;
+
+  meta = with lib; {
+    description = "Unit testing framework for C";
+
+    longDescription =
+      '' Check is a unit testing framework for C.  It features a simple
+         interface for defining unit tests, putting little in the way of the
+         developer.  Tests are run in a separate address space, so Check can
+         catch both assertion failures and code errors that cause
+         segmentation faults or other signals.  The output from unit tests
+         can be used within source code editors and IDEs.
+      '';
+
+    homepage = "https://libcheck.github.io/check/";
+
+    license = licenses.lgpl2Plus;
+    mainProgram = "checkmk";
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/chipmunk/default.nix b/nixpkgs/pkgs/development/libraries/chipmunk/default.nix
new file mode 100644
index 000000000000..8290e60a4850
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/chipmunk/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchurl, cmake, freeglut, libGLU, libGL, glfw2, glew, libX11, xorgproto
+, libXi, libXmu, fetchpatch, libXrandr
+}:
+
+stdenv.mkDerivation rec {
+  pname = "chipmunk";
+  majorVersion = "7";
+  version = "${majorVersion}.0.3";
+
+  src = fetchurl {
+    url = "https://chipmunk-physics.net/release/Chipmunk-${majorVersion}.x/Chipmunk-${version}.tgz";
+    sha256 = "06j9cfxsyrrnyvl7hsf55ac5mgff939mmijliampphlizyg0r2q4";
+  };
+
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/slembcke/Chipmunk2D/commit/9a051e6fb970c7afe09ce2d564c163b81df050a8.patch";
+      sha256 = "0ps8bjba1k544vcdx5w0qk7gcjq94yfigxf67j50s63yf70k2n70";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs =
+    [ freeglut libGLU libGL glfw2 glew libX11 xorgproto libXi libXmu libXrandr ];
+
+  postInstall = ''
+    mkdir -p $out/bin
+    cp demo/chipmunk_demos $out/bin
+  '';
+
+  meta = with lib; {
+    description = "A fast and lightweight 2D game physics library";
+    homepage = "http://chipmunk2d.net/";
+    license = licenses.mit;
+    platforms = platforms.unix; # supports Windows and MacOS as well, but those require more work
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/chmlib/default.nix b/nixpkgs/pkgs/development/libraries/chmlib/default.nix
new file mode 100644
index 000000000000..bc609d7bbf17
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/chmlib/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "chmlib";
+  version = "0.40a";
+
+  src = fetchFromGitHub {
+    owner = "jedwing";
+    repo = "CHMLib";
+    rev = "2bef8d063ec7d88a8de6fd9f0513ea42ac0fa21f";
+    sha256 = "1hah0nw0l05npva2r35ywwd0kzyiiz4vamghm6d71h8170iva6m9";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  meta = with lib; {
+    homepage = "http://www.jedrea.com/chmlib";
+    license = licenses.lgpl2;
+    description = "A library for dealing with Microsoft ITSS/CHM format files";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/chromaprint/default.nix b/nixpkgs/pkgs/development/libraries/chromaprint/default.nix
new file mode 100644
index 000000000000..3a169de590bb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/chromaprint/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchurl, cmake, boost, ffmpeg_4, darwin, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "chromaprint";
+  version = "1.5.1";
+
+  src = fetchurl {
+    url = "https://github.com/acoustid/chromaprint/releases/download/v${version}/${pname}-${version}.tar.gz";
+    sha256 = "sha256-oarY+juLGLeNN1Wzdn+v+au2ckLgG0eOyaZOGQ8zXhw=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ ffmpeg_4 ] ++ lib.optionals stdenv.isDarwin
+    (with darwin.apple_sdk.frameworks; [Accelerate CoreGraphics CoreVideo zlib]);
+
+  cmakeFlags = [ "-DBUILD_EXAMPLES=ON" "-DBUILD_TOOLS=ON" ];
+
+  meta = with lib; {
+    homepage = "https://acoustid.org/chromaprint";
+    description = "AcoustID audio fingerprinting library";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cista/default.nix b/nixpkgs/pkgs/development/libraries/cista/default.nix
new file mode 100644
index 000000000000..862a74c596a3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cista/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "cista";
+  version = "0.14";
+
+  src = fetchFromGitHub {
+    owner = "felixguendling";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-E2B+dNFk0ssKhT9dULNFzpa8auRQ9Q0czuUjX6hxWPw=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [ "-DCISTA_INSTALL=ON" ];
+
+  meta = with lib; {
+    homepage = "https://cista.rocks";
+    description = "A simple, high-performance, zero-copy C++ serialization & reflection library";
+    license = licenses.mit;
+    maintainers = [];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/civetweb/default.nix b/nixpkgs/pkgs/development/libraries/civetweb/default.nix
new file mode 100644
index 000000000000..3222702f5a1a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/civetweb/default.nix
@@ -0,0 +1,46 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "civetweb";
+  version = "1.15";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-Qh6BGPk7a01YzCeX42+Og9M+fjXRs7kzNUCyT4mYab4=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  # The existence of the "build" script causes `mkdir -p build` to fail:
+  #   mkdir: cannot create directory 'build': File exists
+  preConfigure = ''
+    rm build
+  '';
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+    "-DCIVETWEB_ENABLE_CXX=ON"
+    "-DCIVETWEB_ENABLE_IPV6=ON"
+
+    # The civetweb unit tests rely on downloading their fork of libcheck.
+    "-DCIVETWEB_BUILD_TESTING=OFF"
+  ];
+
+  meta = {
+    description = "Embedded C/C++ web server";
+    homepage = "https://github.com/civetweb/civetweb";
+    license = [ lib.licenses.mit ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cjose/default.nix b/nixpkgs/pkgs/development/libraries/cjose/default.nix
new file mode 100644
index 000000000000..4ecca1290e35
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cjose/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+, doxygen
+, check
+, jansson
+, openssl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "cjose";
+  version = "0.6.2.2";
+
+  src = fetchFromGitHub {
+    owner = "zmartzone";
+    repo = "cjose";
+    rev = "v${version}";
+    sha256 = "sha256-vDvCxMpgCdteGvNxy2HCNRaxbhxOuTadL0nM2wkFHtk=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config doxygen ];
+  buildInputs = [ jansson openssl ];
+  nativeCheckInputs = [ check ];
+
+  configureFlags = [
+    "--with-jansson=${jansson}"
+    "--with-openssl=${openssl.dev}"
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/zmartzone/cjose";
+    changelog = "https://github.com/zmartzone/cjose/blob/${version}/CHANGELOG.md";
+    description = "C library for Javascript Object Signing and Encryption. This is a maintained fork of the original project";
+    license = licenses.mit;
+    maintainers = with maintainers; [ midchildan ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cjson/default.nix b/nixpkgs/pkgs/development/libraries/cjson/default.nix
new file mode 100644
index 000000000000..e6e09a7ffe3b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cjson/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, lib, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "cjson";
+  version = "1.7.17";
+
+  src = fetchFromGitHub {
+    owner = "DaveGamble";
+    repo = "cJSON";
+    rev = "v${version}";
+    sha256 = "sha256-jU9UbXvdXiNXFh7c9p/LppMsuqryFK40NTTyQGbNU84=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  # cJSON actually uses C99 standard, not C89
+  # https://github.com/DaveGamble/cJSON/issues/275
+  postPatch = ''
+    substituteInPlace CMakeLists.txt --replace -std=c89 -std=c99
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/DaveGamble/cJSON";
+    description = "Ultralightweight JSON parser in ANSI C";
+    license = licenses.mit;
+    maintainers = [ maintainers.matthiasbeyer ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cl/default.nix b/nixpkgs/pkgs/development/libraries/cl/default.nix
new file mode 100644
index 000000000000..1f98635f15dd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cl/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchFromGitHub, rebar, erlang, opencl-headers, ocl-icd }:
+
+stdenv.mkDerivation rec {
+  version = "1.2.4";
+  pname = "cl";
+
+  src = fetchFromGitHub {
+    owner = "tonyrog";
+    repo = "cl";
+    rev = "cl-${version}";
+    sha256 = "1gwkjl305a0231hz3k0w448dsgbgdriaq764sizs5qfn59nzvinz";
+  };
+
+  # https://github.com/tonyrog/cl/issues/39
+  postPatch = ''
+    substituteInPlace c_src/Makefile \
+      --replace "-m64" ""
+  '';
+
+  buildInputs = [ erlang rebar opencl-headers ocl-icd ];
+
+  buildPhase = ''
+    rebar compile
+  '';
+
+  # 'cp' line taken from Arch recipe
+  # https://projects.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/erlang-sdl
+  installPhase = ''
+    DIR=$out/lib/erlang/lib/${pname}-${version}
+    mkdir -p $DIR
+    cp -ruv c_src doc ebin include priv src $DIR
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/tonyrog/cl";
+    description = "OpenCL binding for Erlang";
+    license = licenses.mit;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/clanlib/default.nix b/nixpkgs/pkgs/development/libraries/clanlib/default.nix
new file mode 100644
index 000000000000..7dfc2e084468
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/clanlib/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, libGL
+, libpng
+, pkg-config
+, xorg
+, file
+, freetype
+, fontconfig
+, alsa-lib
+, libXrender
+}:
+
+stdenv.mkDerivation rec {
+  pname = "clanlib";
+  version = "4.1.0";
+
+  src = fetchFromGitHub {
+    repo = "ClanLib";
+    owner = "sphair";
+    rev = "v${version}";
+    sha256 = "sha256-SVsLWcTP+PCIGDWLkadMpJPj4coLK9dJrW4sc2+HotE=";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+    autoreconfHook
+  ];
+  buildInputs = [
+    libGL
+    libpng
+    xorg.xorgproto
+    freetype
+    fontconfig
+    alsa-lib
+    libXrender
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/sphair/ClanLib";
+    description = "A cross platform toolkit library with a primary focus on game creation";
+    license = licenses.mit;
+    maintainers = with maintainers; [ nixinator ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/clap/default.nix b/nixpkgs/pkgs/development/libraries/clap/default.nix
new file mode 100644
index 000000000000..e6c017cb7808
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/clap/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "clap";
+  version = "1.2.0";
+
+  src = fetchFromGitHub {
+    owner = "free-audio";
+    repo = "clap";
+    rev = finalAttrs.version;
+    hash = "sha256-BNT2yWIlWk8kzhZteh7TaamliwJI+lzWVs/8XCFsuUc=";
+  };
+
+  postPatch = ''
+    substituteInPlace clap.pc.in \
+      --replace '$'"{prefix}/@CMAKE_INSTALL_INCLUDEDIR@" '@CMAKE_INSTALL_FULL_INCLUDEDIR@'
+  '';
+
+  nativeBuildInputs = [ cmake ];
+
+  passthru.tests.pkg-config = testers.hasPkgConfigModules { package = finalAttrs.finalPackage; };
+
+  meta = with lib; {
+    description = "Clever Audio Plugin API interface headers";
+    homepage = "https://cleveraudio.org/";
+    pkgConfigModules = [ "clap" ];
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ ris ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/classads/default.nix b/nixpkgs/pkgs/development/libraries/classads/default.nix
new file mode 100644
index 000000000000..6fef10fe5d24
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/classads/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl, autoreconfHook, pcre }:
+
+stdenv.mkDerivation rec {
+  pname = "classads";
+  version = "1.0.10";
+
+  src = fetchurl {
+    url = "ftp://ftp.cs.wisc.edu/condor/classad/c++/classads-${version}.tar.gz";
+    sha256 = "1czgj53gnfkq3ncwlsrwnr4y91wgz35sbicgkp4npfrajqizxqnd";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  buildInputs = [ pcre ];
+
+  configureFlags = [
+    "--enable-namespace" "--enable-flexible-member"
+  ];
+
+  # error: use of undeclared identifier 'finite'; did you mean 'isfinite'?
+  env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) "-Dfinite=isfinite";
+
+  meta = {
+    homepage = "http://www.cs.wisc.edu/condor/classad/";
+    description = "The Classified Advertisements library provides a generic means for matching resources";
+    license = lib.licenses.asl20;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/clfft/default.nix b/nixpkgs/pkgs/development/libraries/clfft/default.nix
new file mode 100644
index 000000000000..824449b0fafc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/clfft/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchFromGitHub, cmake, fftw, fftwFloat, boost, opencl-clhpp, ocl-icd, darwin }:
+
+let
+  inherit (darwin.apple_sdk.frameworks) OpenCL;
+in
+stdenv.mkDerivation rec {
+  pname = "clfft";
+  version = "2.12.2";
+
+  src = fetchFromGitHub {
+    owner = "clMathLibraries";
+    repo = "clFFT";
+    rev = "v${version}";
+    hash = "sha256-yp7u6qhpPYQpBw3d+VLg0GgMyZONVII8BsBCEoRZm4w=";
+  };
+
+  sourceRoot = "${src.name}/src";
+
+  postPatch = ''
+    sed -i '/-m64/d;/-m32/d' CMakeLists.txt
+  '';
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ fftw fftwFloat boost ]
+    ++ lib.optionals stdenv.isLinux [ opencl-clhpp ocl-icd ]
+    ++ lib.optionals stdenv.isDarwin [ OpenCL ];
+
+  # https://github.com/clMathLibraries/clFFT/issues/237
+  CXXFLAGS = "-std=c++98";
+
+  meta = with lib; {
+    description = "Library containing FFT functions written in OpenCL";
+    longDescription = ''
+      clFFT is a software library containing FFT functions written in OpenCL.
+      In addition to GPU devices, the library also supports running on CPU devices to facilitate debugging and heterogeneous programming.
+    '';
+    license = licenses.asl20;
+    homepage = "http://clmathlibraries.github.io/clFFT/";
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ chessai ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/clipp/clipp.pc b/nixpkgs/pkgs/development/libraries/clipp/clipp.pc
new file mode 100644
index 000000000000..38c07e5ba162
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/clipp/clipp.pc
@@ -0,0 +1,9 @@
+prefix=@out@
+includedir=${prefix}/include
+
+Name: @pname@
+Description: Easy to use, powerful and expressive command line argument \
+handling for C++11/14/17
+URL: https://github.com/muellan/clipp
+Version: @version@
+Cflags: -I${includedir}
diff --git a/nixpkgs/pkgs/development/libraries/clipp/default.nix b/nixpkgs/pkgs/development/libraries/clipp/default.nix
new file mode 100644
index 000000000000..12b393e597d4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/clipp/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "clipp";
+  version = "1.2.3";
+
+  src = fetchFromGitHub {
+    owner = "muellan";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0rq80ba2krwzvcg4r2g1al88453c7lz6ziri2s1ygv8inp9r775s";
+  };
+
+  installPhase = ''
+    mkdir -p $out/share/pkgconfig
+    cp -r include $out/
+    substitute ${./clipp.pc} $out/share/pkgconfig/clipp.pc \
+      --subst-var out \
+      --subst-var pname \
+      --subst-var version
+  '';
+
+  meta = with lib; {
+    description = "Easy to use, powerful and expressive command line argument handling for C++11/14/17";
+    homepage = "https://github.com/muellan/clipp";
+    license = licenses.mit;
+    maintainers = with maintainers; [ xbreak ];
+    platforms = with platforms; all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/clipper/default.nix b/nixpkgs/pkgs/development/libraries/clipper/default.nix
new file mode 100644
index 000000000000..929bf90d9c48
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/clipper/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl, cmake, ninja, unzip }:
+
+stdenv.mkDerivation rec {
+  version = "6.4.2";
+  pname = "Clipper";
+  src = fetchurl {
+    url = "mirror://sourceforge/polyclipping/clipper_ver${version}.zip";
+    sha256 = "09q6jc5k7p9y5d75qr2na5d1gm0wly5cjnffh127r04l47c20hx1";
+  };
+
+  sourceRoot = "cpp";
+
+  nativeBuildInputs = [ cmake ninja unzip ];
+
+  meta = with lib; {
+    description = "A polygon and line clipping and offsetting library (C++, C#, Delphi)";
+    longDescription = ''
+      The Clipper library performs line & polygon clipping - intersection, union, difference & exclusive-or,
+      and line & polygon offsetting. The library is based on Vatti's clipping algorithm.
+    '';
+    homepage = "https://sourceforge.net/projects/polyclipping";
+    license = licenses.boost;
+    maintainers = with maintainers; [ mpickering ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/clipper2/0001-fix-pc-paths.patch b/nixpkgs/pkgs/development/libraries/clipper2/0001-fix-pc-paths.patch
new file mode 100644
index 000000000000..93407d5f9ff6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/clipper2/0001-fix-pc-paths.patch
@@ -0,0 +1,14 @@
+diff --git a/Clipper2.pc.cmakein b/Clipper2.pc.cmakein
+index 5632c93..0a5d6ba 100644
+--- a/Clipper2.pc.cmakein
++++ b/Clipper2.pc.cmakein
+@@ -1,7 +1,7 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=${prefix}
+-libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
+-includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
++libdir=@CMAKE_INSTALL_FULL_LIBDIR@
++includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
+
+ Name: Clipper2@PCFILE_LIB_SUFFIX@
+ Description: A Polygon Clipping and Offsetting library in C++
diff --git a/nixpkgs/pkgs/development/libraries/clipper2/default.nix b/nixpkgs/pkgs/development/libraries/clipper2/default.nix
new file mode 100644
index 000000000000..f7bb635e63d0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/clipper2/default.nix
@@ -0,0 +1,45 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "clipper2";
+  version = "1.2.2";
+
+  src = fetchFromGitHub {
+    owner = "AngusJohnson";
+    repo = "Clipper2";
+    rev = "Clipper2_${version}";
+    sha256 = "sha256-u/4GG1A2PAlk8VEWgJX8+EnZ5hpGhu1QbvHwct58sF4=";
+  };
+
+  sourceRoot = "${src.name}/CPP";
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  cmakeFlags = [
+    "-DCLIPPER2_EXAMPLES=OFF"
+    "-DCLIPPER2_TESTS=OFF"
+    "-DBUILD_SHARED_LIBS=ON"
+  ];
+
+  patches = [
+    ./0001-fix-pc-paths.patch
+  ];
+
+  meta = {
+    description = "Polygon Clipping and Offsetting - C++ Only";
+    longDescription = ''
+      The Clipper2 library performs intersection, union, difference and XOR boolean operations on both simple and
+      complex polygons. It also performs polygon offsetting.
+    '';
+    homepage = "https://github.com/AngusJohnson/Clipper2";
+    license = lib.licenses.boost;
+    maintainers = [ lib.maintainers.cadkin ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cln/default.nix b/nixpkgs/pkgs/development/libraries/cln/default.nix
new file mode 100644
index 000000000000..a7094d18e6ea
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cln/default.nix
@@ -0,0 +1,20 @@
+{ lib, gccStdenv, fetchurl, gmp }:
+
+gccStdenv.mkDerivation rec {
+  pname = "cln";
+  version = "1.3.7";
+
+  src = fetchurl {
+    url = "${meta.homepage}${pname}-${version}.tar.bz2";
+    sha256 = "sha256-fH7YR0lYM35N9btX6lF2rQNlAEy7mLYhdlvEYGoQ2Gs=";
+  };
+
+  buildInputs = [ gmp ];
+
+  meta = with lib; {
+    description = "C/C++ library for numbers, a part of GiNaC";
+    homepage = "https://www.ginac.de/CLN/";
+    license = licenses.gpl2;
+    platforms = platforms.unix; # Once had cygwin problems
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cloog-ppl/default.nix b/nixpkgs/pkgs/development/libraries/cloog-ppl/default.nix
new file mode 100644
index 000000000000..65d6a392ffdb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cloog-ppl/default.nix
@@ -0,0 +1,71 @@
+{ fetchurl, lib, stdenv, ppl, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "cloog-ppl";
+  version = "0.15.11";
+
+  src = fetchurl {
+    url = "mirror://gcc/infrastructure/${pname}-${version}.tar.gz";
+    sha256 = "0psdm0bn5gx60glfh955x5b3b23zqrd92idmjr0b00dlnb839mkw";
+  };
+
+  propagatedBuildInputs = [ ppl ];
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  patches = [ ./fix-ppl-version.patch ];
+
+  configureFlags = [ "--with-ppl=${ppl}" ];
+
+  preAutoreconf = ''
+    touch NEWS ChangeLog AUTHORS
+  '';
+
+  doCheck = true;
+
+  meta = {
+    description = "CLooG-PPL, the Chunky Loop Generator";
+
+    longDescription = ''
+      CLooG is a free software library to generate code for scanning
+      Z-polyhedra.  That is, it finds a code (e.g., in C, FORTRAN...) that
+      reaches each integral point of one or more parameterized polyhedra.
+      CLooG has been originally written to solve the code generation problem
+      for optimizing compilers based on the polytope model.  Nevertheless it
+      is used now in various area e.g., to build control automata for
+      high-level synthesis or to find the best polynomial approximation of a
+      function.  CLooG may help in any situation where scanning polyhedra
+      matters.  While the user has full control on generated code quality,
+      CLooG is designed to avoid control overhead and to produce a very
+      effective code.
+    '';
+
+    # CLooG-PPL is actually a port of GLooG from PolyLib to PPL.
+    homepage = "http://www.cloog.org/";
+
+    license = lib.licenses.gpl2Plus;
+
+    maintainers = [ ];
+
+    /* Leads to an ICE on Cygwin:
+
+       make[3]: Entering directory `/tmp/nix-build-9q5gw5m37q5l4f0kjfv9ar8fsc9plk27-ppl-0.10.2.drv-1/ppl-0.10.2/src'
+       /bin/sh ../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..  -I.. -I../src    -g -O2 -frounding-math  -W -Wall -c -o Box.lo Box.cc
+       libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I.. -I../src -g -O2 -frounding-math -W -Wall -c Box.cc  -DDLL_EXPORT -DPIC -o .libs/Box.o
+       In file included from checked.defs.hh:595,
+                        from Checked_Number.defs.hh:27,
+                        from Coefficient.types.hh:15,
+                        from Coefficient.defs.hh:26,
+                        from Box.defs.hh:28,
+                        from Box.cc:24:
+       checked.inlines.hh: In function `Parma_Polyhedra_Library::Result Parma_Polyhedra_Library::Checked::input_generic(Type&, std::istream&, Parma_Polyhedra_Library::Rounding_Dir)':
+       checked.inlines.hh:607: internal compiler error: in invert_truthvalue, at fold-const.c:2719
+       Please submit a full bug report,
+       with preprocessed source if appropriate.
+       See <URL:http://cygwin.com/problems.html> for instructions.
+       make[3]: *** [Box.lo] Error 1
+
+    */
+    platforms = lib.platforms.unix; # Once had cygwin problems
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cloog-ppl/fix-ppl-version.patch b/nixpkgs/pkgs/development/libraries/cloog-ppl/fix-ppl-version.patch
new file mode 100644
index 000000000000..8440d839411b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cloog-ppl/fix-ppl-version.patch
@@ -0,0 +1,16 @@
+diff -rupN src/configure.in cloog-ppl-0.15.11/configure.in
+--- src/configure.in	2014-04-13 13:33:43.349392305 +0200
++++ cloog-ppl-0.15.11/configure.in	2014-04-13 13:34:12.695379888 +0200
+@@ -337,11 +337,7 @@ if test "x$with_ppl" != "x" -a "x$with_p
+ 		        [AC_MSG_ERROR(Can't find PPL headers.)])
+ 
+ 	AC_MSG_CHECKING([for version 0.10 (or later revision) of PPL])
+-	AC_TRY_COMPILE([#include "ppl_c.h"],[
+-	#if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR < 10
+-	choke me
+-	#endif
+-	], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR(Can't find correct version of PPL.) ])
++	AC_MSG_RESULT([yes])
+ 
+ 	LIBS="$LIBS -lppl_c -lppl -lgmpxx"
+ 	AC_DEFINE([CLOOG_PPL_BACKEND], 1, [Use the PPL backend])
diff --git a/nixpkgs/pkgs/development/libraries/cloog/0.18.0.nix b/nixpkgs/pkgs/development/libraries/cloog/0.18.0.nix
new file mode 100644
index 000000000000..12e279797e76
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cloog/0.18.0.nix
@@ -0,0 +1,64 @@
+{ fetchurl, lib, stdenv, gmp, isl }:
+
+stdenv.mkDerivation rec {
+  pname = "cloog";
+  version = "0.18.0";
+
+  src = fetchurl {
+    url = "http://www.bastoul.net/cloog/pages/download/count.php3?url=./cloog-${version}.tar.gz";
+    sha256 = "1c4aa8dde7886be9cbe0f9069c334843b21028f61d344a2d685f88cb1dcf2228";
+  };
+
+  buildInputs = [ gmp ];
+
+  propagatedBuildInputs = [ isl ];
+
+  configureFlags = [ "--with-isl=system" ];
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  meta = {
+    description = "Library that generates loops for scanning polyhedra";
+
+    longDescription = ''
+      CLooG is a free software library to generate code for scanning
+      Z-polyhedra.  That is, it finds a code (e.g., in C, FORTRAN...) that
+      reaches each integral point of one or more parameterized polyhedra.
+      CLooG has been originally written to solve the code generation problem
+      for optimizing compilers based on the polytope model.  Nevertheless it
+      is used now in various area e.g., to build control automata for
+      high-level synthesis or to find the best polynomial approximation of a
+      function.  CLooG may help in any situation where scanning polyhedra
+      matters.  While the user has full control on generated code quality,
+      CLooG is designed to avoid control overhead and to produce a very
+      effective code.
+    '';
+
+    homepage = "http://www.cloog.org/";
+
+    license = lib.licenses.gpl2Plus;
+
+    /* Leads to an ICE on Cygwin:
+
+       make[3]: Entering directory `/tmp/nix-build-9q5gw5m37q5l4f0kjfv9ar8fsc9plk27-ppl-0.10.2.drv-1/ppl-0.10.2/src'
+       /bin/sh ../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..  -I.. -I../src    -g -O2 -frounding-math  -W -Wall -c -o Box.lo Box.cc
+       libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I.. -I../src -g -O2 -frounding-math -W -Wall -c Box.cc  -DDLL_EXPORT -DPIC -o .libs/Box.o
+       In file included from checked.defs.hh:595,
+                        from Checked_Number.defs.hh:27,
+                        from Coefficient.types.hh:15,
+                        from Coefficient.defs.hh:26,
+                        from Box.defs.hh:28,
+                        from Box.cc:24:
+       checked.inlines.hh: In function `Parma_Polyhedra_Library::Result Parma_Polyhedra_Library::Checked::input_generic(Type&, std::istream&, Parma_Polyhedra_Library::Rounding_Dir)':
+       checked.inlines.hh:607: internal compiler error: in invert_truthvalue, at fold-const.c:2719
+       Please submit a full bug report,
+       with preprocessed source if appropriate.
+       See <URL:http://cygwin.com/problems.html> for instructions.
+       make[3]: *** [Box.lo] Error 1
+
+    */
+    platforms = lib.platforms.unix; # Once had cygwin problems
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cloog/default.nix b/nixpkgs/pkgs/development/libraries/cloog/default.nix
new file mode 100644
index 000000000000..bfca886e03d5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cloog/default.nix
@@ -0,0 +1,66 @@
+{ fetchurl, lib, stdenv, gmp, isl }:
+
+stdenv.mkDerivation rec {
+  pname = "cloog";
+  version = "0.18.4";
+
+  src = fetchurl {
+    url = "http://www.bastoul.net/cloog/pages/download/count.php3?url=./${pname}-${version}.tar.gz";
+    sha256 = "03km1aqaiy3sbqc2f046ms9x0mlmacxlvs5rxsvjj8nf20vxynij";
+  };
+
+  buildInputs = [ gmp ];
+
+  propagatedBuildInputs = [ isl ];
+
+  configureFlags = [ "--with-isl=system" ];
+
+  enableParallelBuilding = true;
+  # Breaks the test cases as it reuses 'cloog_temp' file name for different tests.
+  enableParallelChecking = false;
+
+  doCheck = true;
+
+  meta = {
+    description = "Library that generates loops for scanning polyhedra";
+
+    longDescription = ''
+      CLooG is a free software library to generate code for scanning
+      Z-polyhedra.  That is, it finds a code (e.g., in C, FORTRAN...) that
+      reaches each integral point of one or more parameterized polyhedra.
+      CLooG has been originally written to solve the code generation problem
+      for optimizing compilers based on the polytope model.  Nevertheless it
+      is used now in various area e.g., to build control automata for
+      high-level synthesis or to find the best polynomial approximation of a
+      function.  CLooG may help in any situation where scanning polyhedra
+      matters.  While the user has full control on generated code quality,
+      CLooG is designed to avoid control overhead and to produce a very
+      effective code.
+    '';
+
+    homepage = "http://www.cloog.org/";
+
+    license = lib.licenses.gpl2Plus;
+
+    /* Leads to an ICE on Cygwin:
+
+       make[3]: Entering directory `/tmp/nix-build-9q5gw5m37q5l4f0kjfv9ar8fsc9plk27-ppl-0.10.2.drv-1/ppl-0.10.2/src'
+       /bin/sh ../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..  -I.. -I../src    -g -O2 -frounding-math  -W -Wall -c -o Box.lo Box.cc
+       libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I.. -I../src -g -O2 -frounding-math -W -Wall -c Box.cc  -DDLL_EXPORT -DPIC -o .libs/Box.o
+       In file included from checked.defs.hh:595,
+                        from Checked_Number.defs.hh:27,
+                        from Coefficient.types.hh:15,
+                        from Coefficient.defs.hh:26,
+                        from Box.defs.hh:28,
+                        from Box.cc:24:
+       checked.inlines.hh: In function `Parma_Polyhedra_Library::Result Parma_Polyhedra_Library::Checked::input_generic(Type&, std::istream&, Parma_Polyhedra_Library::Rounding_Dir)':
+       checked.inlines.hh:607: internal compiler error: in invert_truthvalue, at fold-const.c:2719
+       Please submit a full bug report,
+       with preprocessed source if appropriate.
+       See <URL:http://cygwin.com/problems.html> for instructions.
+       make[3]: *** [Box.lo] Error 1
+
+    */
+    platforms = lib.platforms.unix; # Once had cygwin problems
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/clucene-core/2.x.nix b/nixpkgs/pkgs/development/libraries/clucene-core/2.x.nix
new file mode 100644
index 000000000000..d6049d284513
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/clucene-core/2.x.nix
@@ -0,0 +1,81 @@
+{lib, stdenv, fetchurl, fetchpatch, cmake, boost, zlib}:
+
+stdenv.mkDerivation rec {
+  pname = "clucene-core";
+  version = "2.3.3.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/clucene/clucene-core-${version}.tar.gz";
+    sha256 = "1arffdwivig88kkx685pldr784njm0249k0rb1f1plwavlrw9zfx";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ boost zlib ];
+
+  cmakeFlags = [
+    "-DBUILD_CONTRIBS=ON"
+    "-DBUILD_CONTRIBS_LIB=ON"
+    "-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON"
+  ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "-D_CL_HAVE_GCC_ATOMIC_FUNCTIONS=0"
+    "-D_CL_HAVE_NAMESPACES_EXITCODE=0"
+    "-D_CL_HAVE_NAMESPACES_EXITCODE__TRYRUN_OUTPUT="
+    "-D_CL_HAVE_NO_SNPRINTF_BUG_EXITCODE=0"
+    "-D_CL_HAVE_NO_SNPRINTF_BUG_EXITCODE__TRYRUN_OUTPUT="
+    "-D_CL_HAVE_TRY_BLOCKS_EXITCODE=0"
+    "-D_CL_HAVE_TRY_BLOCKS_EXITCODE__TRYRUN_OUTPUT="
+    "-D_CL_HAVE_PTHREAD_MUTEX_RECURSIVE=0"
+    "-DLUCENE_STATIC_CONSTANT_SYNTAX_EXITCODE=0"
+    "-DLUCENE_STATIC_CONSTANT_SYNTAX_EXITCODE__TRYRUN_OUTPUT="
+  ];
+
+  patches = [
+    # From debian
+    ./Fix-pkgconfig-file-by-adding-clucene-shared-library.patch
+    ./Fixing_ZLIB_configuration_in_shared_CMakeLists.patch
+    ./Install-contribs-lib.patch
+    # From arch
+    ./fix-missing-include-time.patch
+
+    # required for darwin and linux-musl
+    ./pthread-include.patch
+  ] ++ lib.optionals stdenv.isDarwin [
+    ./fix-darwin.patch
+
+    # see https://bugs.gentoo.org/869170
+    (fetchpatch {
+       url = "https://869170.bugs.gentoo.org/attachment.cgi?id=858825";
+       hash = "sha256-TbAfBKdXh+1HepZc8J6OhK1XGwhwBCMvO8QBDsad998=";
+    })
+  ];
+
+  # see https://github.com/macports/macports-ports/commit/236d43f2450c6be52dc42fd3a2bbabbaa5136201
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace src/shared/CMakeLists.txt --replace 'fstati64;_fstati64;fstat64;fstat;_fstat' 'fstat;_fstat'
+    substituteInPlace src/shared/CMakeLists.txt --replace 'stati64;_stati64;stat64;stat;_stat' 'stat;_stat'
+  '';
+
+  # fails with "Unable to find executable:
+  # /build/clucene-core-2.3.3.4/build/bin/cl_test"
+  doCheck = false;
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing";
+
+  meta = with lib; {
+    description = "Core library for full-featured text search engine";
+    longDescription = ''
+      CLucene is a high-performance, scalable, cross platform, full-featured,
+      open-source indexing and searching API. Specifically, CLucene is the guts
+      of a search engine, the hard stuff. You write the easy stuff: the UI and
+      the process of selecting and parsing your data files to pump them into
+      the search engine yourself, and any specialized queries to pull it back
+      for display or further processing.
+
+      CLucene is a port of the very popular Java Lucene text search engine API.
+    '';
+    homepage = "https://clucene.sourceforge.net";
+    platforms = platforms.unix;
+    license = with licenses; [ asl20 lgpl2 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/clucene-core/Fix-pkgconfig-file-by-adding-clucene-shared-library.patch b/nixpkgs/pkgs/development/libraries/clucene-core/Fix-pkgconfig-file-by-adding-clucene-shared-library.patch
new file mode 100644
index 000000000000..80e49a8e712e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/clucene-core/Fix-pkgconfig-file-by-adding-clucene-shared-library.patch
@@ -0,0 +1,19 @@
+From 7be4a19b76d98260cf95040a47935f854a4ba7a4 Mon Sep 17 00:00:00 2001
+From: Valentin Rusu <kde@rusu.info>
+Date: Sat, 17 Dec 2011 13:47:58 +0100
+Subject: [PATCH] Fix .pc file by adding clucene-shared library
+
+---
+ src/core/libclucene-core.pc.cmake |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/src/core/libclucene-core.pc.cmake
++++ b/src/core/libclucene-core.pc.cmake
+@@ -6,6 +6,6 @@ includedir=${prefix}/include:${prefix}/i
+ Name: libclucene
+ Description: CLucene - a C++ search engine, ported from the popular Apache Lucene
+ Version: @CLUCENE_VERSION_MAJOR@.@CLUCENE_VERSION_MINOR@.@CLUCENE_VERSION_REVISION@.@CLUCENE_VERSION_PATCH@
+-Libs: -L${prefix}/@LIB_DESTINATION@/ -lclucene-core
++Libs: -L${prefix}/@LIB_DESTINATION@/ -lclucene-core -lclucene-shared
+ Cflags: -I${prefix}/include -I${prefix}/include/CLucene/ext
+ ~
diff --git a/nixpkgs/pkgs/development/libraries/clucene-core/Fixing_ZLIB_configuration_in_shared_CMakeLists.patch b/nixpkgs/pkgs/development/libraries/clucene-core/Fixing_ZLIB_configuration_in_shared_CMakeLists.patch
new file mode 100644
index 000000000000..f5f44a7fa2c4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/clucene-core/Fixing_ZLIB_configuration_in_shared_CMakeLists.patch
@@ -0,0 +1,20 @@
+From 772481ca94071ddfe65102a451926e4f9aeb4d2c Mon Sep 17 00:00:00 2001
+From: Veit Jahns <idolum@users.sourceforge.net>
+Date: Thu, 26 May 2011 13:35:28 +0200
+Subject: [PATCH] Fixing ZLIB configuration in shared's CMakeLists
+
+---
+ src/shared/CMakeLists.txt |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/src/shared/CMakeLists.txt
++++ b/src/shared/CMakeLists.txt
+@@ -42,7 +42,7 @@ INCLUDE (CheckAtomicFunctions)
+ find_package(ZLIB)
+ IF ( ZLIB_FOUND )
+   SET ( EXTRA_LIBS ${EXTRA_LIBS} ${ZLIB_LIBRARY} )
+-ELSEIF ( ZLIB_FOUND )
++ELSE ( ZLIB_FOUND )
+   MESSAGE( "ZLIB not found, using local: ${clucene-ext_SOURCE_DIR}/zlib" )
+   SET(ZLIB_INCLUDE_DIR ${clucene-ext_SOURCE_DIR}/zlib )
+   SET(ZLIB_LIBRARY ${clucene-ext_BINARY_DIR})
diff --git a/nixpkgs/pkgs/development/libraries/clucene-core/Install-contribs-lib.patch b/nixpkgs/pkgs/development/libraries/clucene-core/Install-contribs-lib.patch
new file mode 100644
index 000000000000..899411fe02b4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/clucene-core/Install-contribs-lib.patch
@@ -0,0 +1,49 @@
+Description: contribs-lib is not built and installed even with config
+Author: Vitaliy Filippov
+Bug: https://sourceforge.net/tracker/index.php?func=detail&aid=3392466&group_id=80013&atid=558446
+ 
+---
+ CMakeLists.txt                  |    2 +-
+ src/contribs-lib/CMakeLists.txt |   17 +++++++++++++++++
+ 2 files changed, 18 insertions(+), 1 deletion(-)
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -163,7 +163,7 @@ IF ( BUILD_CONTRIBS )
+   SET(BUILD_CONTRIBS_LIB 1)
+ ENDIF ( BUILD_CONTRIBS )
+ IF ( BUILD_CONTRIBS_LIB )
+-  ADD_SUBDIRECTORY (src/contribs-lib EXCLUDE_FROM_ALL)
++  ADD_SUBDIRECTORY (src/contribs-lib)
+ ENDIF ( BUILD_CONTRIBS_LIB )
+ 
+ 
+--- a/src/contribs-lib/CMakeLists.txt
++++ b/src/contribs-lib/CMakeLists.txt
+@@ -106,9 +106,26 @@ add_library(clucene-contribs-lib SHARED
+ )
+ TARGET_LINK_LIBRARIES(clucene-contribs-lib ${clucene_contrib_extra_libs})
+ 
++#install public headers.
++FOREACH(file ${HEADERS})
++	get_filename_component(apath ${file} PATH)
++	get_filename_component(aname ${file} NAME)
++	file(RELATIVE_PATH relpath ${CMAKE_SOURCE_DIR}/src/contribs-lib ${apath})
++	IF ( NOT aname MATCHES "^_.*" )
++		install(FILES ${file} 
++		        DESTINATION include/${relpath}
++		        COMPONENT development)
++	ENDIF ( NOT aname MATCHES "^_.*" )
++ENDFOREACH(file)
++
+ #set properties on the libraries
+ SET_TARGET_PROPERTIES(clucene-contribs-lib PROPERTIES
+     VERSION ${CLUCENE_VERSION}
+     SOVERSION ${CLUCENE_SOVERSION}
+     COMPILE_DEFINITIONS_DEBUG _DEBUG
+ )
++
++#and install library
++install(TARGETS clucene-contribs-lib 
++        DESTINATION ${LIB_DESTINATION}  
++        COMPONENT runtime )
diff --git a/nixpkgs/pkgs/development/libraries/clucene-core/fix-darwin.patch b/nixpkgs/pkgs/development/libraries/clucene-core/fix-darwin.patch
new file mode 100644
index 000000000000..cb47a4f3763f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/clucene-core/fix-darwin.patch
@@ -0,0 +1,62 @@
+--- a/src/shared/CLucene/config/repl_tchar.h
++++ b/src/shared/CLucene/config/repl_tchar.h
+@@ -28,26 +28,26 @@
+         #define _istdigit iswdigit //* digit char check
+         #define _totlower towlower //* convert char to lower case
+         #define _totupper towupper //* convert char to lower case
+-        #define _tcslwr wcslwr //* convert string to lower case
++        #define _tcslwr std::wcslwr //* convert string to lower case
+ 
+         //these are the string handling functions
+         //we may need to create wide-character/multi-byte replacements for these
+-        #define _tcscpy wcscpy //copy a string to another string
+-        #define _tcsncpy wcsncpy //copy a specified amount of one string to another string.
+-        #define _tcscat wcscat //copy a string onto the end of the other string
+-    		#define _tcsncat wcsncat
+-        #define _tcschr wcschr //find location of one character
+-        #define _tcsstr wcsstr //find location of a string
+-        #define _tcslen wcslen //get length of a string
+-        #define _tcscmp wcscmp //case sensitive compare two strings
+-        #define _tcsncmp wcsncmp //case sensitive compare two strings
+-        #define _tcscspn wcscspn //location of any of a set of character in a string
++        #define _tcscpy std::wcscpy //copy a string to another string
++        #define _tcsncpy std::wcsncpy //copy a specified amount of one string to another string.
++        #define _tcscat std::wcscat //copy a string onto the end of the other string
++    		#define _tcsncat std::wcsncat
++        #define _tcschr std::wcschr //find location of one character
++        #define _tcsstr std::wcsstr //find location of a string
++        #define _tcslen std::wcslen //get length of a string
++        #define _tcscmp std::wcscmp //case sensitive compare two strings
++        #define _tcsncmp std::wcsncmp //case sensitive compare two strings
++        #define _tcscspn std::wcscspn //location of any of a set of character in a string
+ 
+ 				//string compare
+         #ifdef _CL_HAVE_FUNCTION_WCSICMP
+-            #define _tcsicmp wcsicmp //* case insensitive compare two string
++            #define _tcsicmp std::wcsicmp //* case insensitive compare two string
+         #else
+-            #define _tcsicmp wcscasecmp //* case insensitive compare two string
++            #define _tcsicmp std::wcscasecmp //* case insensitive compare two string
+         #endif
+ 				#if defined(_CL_HAVE_FUNCTION_WCSDUP)
+ 			  	#define _tcsdup	wcsdup
+@@ -56,8 +56,8 @@
+ 			  #endif
+ 
+         //conversion functions
+-        #define _tcstod wcstod //convert a string to a double
+-        #define _tcstoi64 wcstoll //* convers a string to an 64bit bit integer
++        #define _tcstod std::wcstod //convert a string to a double
++        #define _tcstoi64 std::wcstoll //* convers a string to an 64bit bit integer
+         #define _itot _i64tot
+         #define _i64tot lltow //* converts a 64 bit integer to a string (with base)
+     #else //if defined(_ASCII)
+@@ -105,7 +105,7 @@
+     //some tchar headers miss these...
+     #ifndef _tcstoi64
+         #if defined(_UCS2)
+-        	#define _tcstoi64 wcstoll //* convers a string to an 64bit bit integer
++        	#define _tcstoi64 std::wcstoll //* convers a string to an 64bit bit integer
+         #else
+         	#define _tcstoi64 strtoll
+         #endif
diff --git a/nixpkgs/pkgs/development/libraries/clucene-core/fix-missing-include-time.patch b/nixpkgs/pkgs/development/libraries/clucene-core/fix-missing-include-time.patch
new file mode 100644
index 000000000000..0ac26f76929a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/clucene-core/fix-missing-include-time.patch
@@ -0,0 +1,49 @@
+From c1c2000c35ff39b09cb70fbdf66a107d3b17a674 Mon Sep 17 00:00:00 2001
+From: Stephan Bergmann <sbergman@redhat.com>
+Date: Wed, 12 Oct 2022 08:40:49 +0200
+Subject: [PATCH] Fix missing #include <time.h>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+At least on recent Fedora 37 beta, building now failed with
+
+> CLucene/document/DateTools.cpp:26:19: error: ‘gmtime’ was not declared in this scope
+>    26 |         tm *ptm = gmtime(&secs);
+>       |                   ^~~~~~
+
+etc.
+
+As it turns out, after 22f9d40320e3deeaa8d6aaa7a770077c20a21dae "git-svn-id:
+https://clucene.svn.sourceforge.net/svnroot/clucene/branches/lucene2_3_2@2672
+20ef185c-fe11-0410-a618-ba9304b01011" on 2008-06-26 had commented out
+_CL_TIME_WITH_SYS_TIME in clucene-config.h.cmake as "not actually used for
+anything", then cceccfb52917b5f4da447f1cf20c135952d41442 "Presenting DateTools
+and deprecating DateField. DateTools still requires some testing and its own
+unit testing" on 2008-06-29 had introduced this use of it (into then
+src/CLucene/document/DateTools.H).  And apparently most build environments have
+silently been happy ever since when the dead leading check for
+_CL_TIME_WITH_SYS_TIME didn't include both <sys/time.h> and <time.h>, but the
+following check for _CL_HAVE_SYS_TIME_H only included <sys/time.h> but not
+<time.h>.
+---
+ src/shared/CLucene/clucene-config.h.cmake | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/shared/CLucene/clucene-config.h.cmake b/src/shared/CLucene/clucene-config.h.cmake
+index bd8683a5..6fe0f92b 100644
+--- a/src/shared/CLucene/clucene-config.h.cmake
++++ b/src/shared/CLucene/clucene-config.h.cmake
+@@ -100,8 +100,7 @@ ${SYMBOL__T}
+ //#cmakedefine _CL_STAT_MACROS_BROKEN
+ 
+ /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+-//not actually used for anything...
+-//#cmakedefine _CL_TIME_WITH_SYS_TIME  1 
++#cmakedefine _CL_TIME_WITH_SYS_TIME  1 
+ 
+ /* Define that we will be using -fvisibility=hidden, and 
+  * make public classes visible using __attribute__ ((visibility("default")))
+-- 
+2.37.3
+
diff --git a/nixpkgs/pkgs/development/libraries/clucene-core/pthread-include.patch b/nixpkgs/pkgs/development/libraries/clucene-core/pthread-include.patch
new file mode 100644
index 000000000000..73a168c132f4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/clucene-core/pthread-include.patch
@@ -0,0 +1,14 @@
+--- a/src/shared/CLucene/LuceneThreads.h
++++ b/src/shared/CLucene/LuceneThreads.h
+@@ -7,6 +7,9 @@
+ #ifndef _LuceneThreads_h
+ #define  _LuceneThreads_h
+
++#if defined(_CL_HAVE_PTHREAD)
++	#include <pthread.h>
++#endif
+
+ CL_NS_DEF(util)
+ class CLuceneThreadIdCompare;
+
+
diff --git a/nixpkgs/pkgs/development/libraries/clutter-gst/default.nix b/nixpkgs/pkgs/development/libraries/clutter-gst/default.nix
new file mode 100644
index 000000000000..4d21cd10f8ef
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/clutter-gst/default.nix
@@ -0,0 +1,47 @@
+{ fetchurl, fetchpatch, lib, stdenv, pkg-config, clutter, gtk3, glib, cogl, gnome, gdk-pixbuf, gobject-introspection }:
+
+stdenv.mkDerivation rec {
+  pname = "clutter-gst";
+  version = "3.0.27";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "17czmpl92dzi4h3rn5rishk015yi3jwiw29zv8qan94xcmnbssgy";
+  };
+
+  patches = [
+    # Add patch from Arch Linux to fix corrupted display with Cheese
+    # https://gitlab.gnome.org/GNOME/cheese/-/issues/51
+    # https://github.com/archlinux/svntogit-packages/tree/packages/clutter-gst/trunk
+    (fetchpatch {
+      url = "https://github.com/archlinux/svntogit-packages/raw/c4dd0bbda35aa603ee790676f6e15541f71b6d36/trunk/0001-video-sink-Remove-RGBx-BGRx-support.patch";
+      sha256 = "sha256-k1fCiM/u7q81UrDYgbqhN/C+q9DVQ+qOyq6vmA3hbSQ=";
+    })
+  ];
+
+  strictDeps = true;
+  nativeBuildInputs = [ pkg-config glib gobject-introspection ];
+  propagatedBuildInputs = [ clutter gtk3 glib cogl gdk-pixbuf ];
+
+  postBuild = "rm -rf $out/share/gtk-doc";
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = {
+    description = "GStreamer bindings for clutter";
+
+    homepage = "http://www.clutter-project.org/";
+
+    license = lib.licenses.lgpl2Plus;
+
+    maintainers = with lib.maintainers; [ ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/clutter-gtk/default.nix b/nixpkgs/pkgs/development/libraries/clutter-gtk/default.nix
new file mode 100644
index 000000000000..31743a8f6895
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/clutter-gtk/default.nix
@@ -0,0 +1,53 @@
+{ fetchurl
+, lib
+, stdenv
+, pkg-config
+, meson
+, ninja
+, gobject-introspection
+, clutter
+, gtk3
+, gnome
+}:
+
+let
+  pname = "clutter-gtk";
+  version = "1.8.4";
+in
+
+stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${name}.tar.xz";
+    sha256 = "01ibniy4ich0fgpam53q252idm7f4fn5xg5qvizcfww90gn9652j";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  propagatedBuildInputs = [ clutter gtk3 ];
+  nativeBuildInputs = [ meson ninja pkg-config gobject-introspection ];
+
+  postPatch = ''
+    # ld: malformed 32-bit x.y.z version number: =1
+    substituteInPlace meson.build \
+      --replace "host_system == 'darwin'" "false"
+  '';
+
+  postBuild = "rm -rf $out/share/gtk-doc";
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = {
+    description = "Clutter-GTK";
+    homepage = "http://www.clutter-project.org/";
+    license = lib.licenses.lgpl2Plus;
+    maintainers = with lib.maintainers; [ ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/clutter/default.nix b/nixpkgs/pkgs/development/libraries/clutter/default.nix
new file mode 100644
index 000000000000..804aa13ed91a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/clutter/default.nix
@@ -0,0 +1,108 @@
+{ lib
+, stdenv
+, fetchurl
+, pkg-config
+, libGLU
+, libGL
+, libX11
+, libXext
+, libXfixes
+, libXdamage
+, libXcomposite
+, libXi
+, libxcb
+, cogl
+, pango
+, atk
+, json-glib
+, gobject-introspection
+, gtk3
+, gnome
+, libinput
+, libgudev
+, libxkbcommon
+}:
+
+let
+  pname = "clutter";
+  version = "1.26.4";
+in
+stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${name}.tar.xz";
+    sha256 = "1rn4cd1an6a9dfda884aqpcwcgq8dgydpqvb19nmagw4b70zlj4b";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  buildInputs = [ gtk3 ];
+  nativeBuildInputs = [ pkg-config gobject-introspection ];
+  propagatedBuildInputs = [
+    cogl
+    pango
+    atk
+    json-glib
+    gobject-introspection
+  ] ++ lib.optionals (!stdenv.isDarwin) [
+    libX11
+    libGL
+    libGLU
+    libXext
+    libXfixes
+    libXdamage
+    libXcomposite
+    libXi
+    libxcb
+    libinput
+    libgudev
+    libxkbcommon
+  ];
+
+  configureFlags = [
+    "--enable-introspection" # needed by muffin AFAIK
+  ] ++ lib.optionals stdenv.isDarwin [
+    "--without-x"
+    "--enable-x11-backend=no"
+    "--enable-quartz-backend=yes"
+  ];
+
+  env = lib.optionalAttrs stdenv.cc.isClang {
+    NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
+  };
+
+  #doCheck = true; # no tests possible without a display
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = {
+    description = "Library for creating fast, dynamic graphical user interfaces";
+
+    longDescription =
+      '' Clutter is free software library for creating fast, compelling,
+         portable, and dynamic graphical user interfaces.  It is a core part
+         of MeeGo, and is supported by the open source community.  Its
+         development is sponsored by Intel.
+
+         Clutter uses OpenGL for rendering (and optionally OpenGL|ES for use
+         on mobile and embedded platforms), but wraps an easy to use,
+         efficient, flexible API around GL's complexity.
+
+         Clutter enforces no particular user interface style, but provides a
+         rich, generic foundation for higher-level toolkits tailored to
+         specific needs.
+      '';
+
+    license = lib.licenses.lgpl2Plus;
+    homepage = "http://www.clutter-project.org/";
+
+    maintainers = with lib.maintainers; [ ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cm256cc/default.nix b/nixpkgs/pkgs/development/libraries/cm256cc/default.nix
new file mode 100644
index 000000000000..0e8b03aa7236
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cm256cc/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, boost } :
+
+stdenv.mkDerivation rec {
+  pname = "cm256cc";
+  version = "1.1.0";
+
+  src = fetchFromGitHub {
+    owner = "f4exb";
+    repo = "cm256cc";
+    rev = "v${version}";
+    sha256 = "sha256-T7ZUVVYGdzAialse//MoqWCVNBpbZvzWMAKc0cw7O9k=";
+  };
+
+  patches = [
+    # Pull fix pending upstream inclusion for gcc-13 support:
+    #   https://github.com/f4exb/cm256cc/pull/18
+    (fetchpatch {
+      name = "gcc-13.patch";
+      url = "https://github.com/f4exb/cm256cc/commit/a7f142bcdae8be1c646d67176ba0ba0f7e8dcd68.patch";
+      hash = "sha256-J7bm44sqnGsdPhJxQrE8LDxZ6tkTzLslHQnnKmtgrtM=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ boost ];
+
+  # https://github.com/f4exb/cm256cc/issues/16
+  postPatch = ''
+    substituteInPlace libcm256cc.pc.in \
+      --replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
+  '';
+
+  meta = with lib; {
+    description = "Fast GF(256) Cauchy MDS Block Erasure Codec in C++";
+    homepage = "https://github.com/f4exb/cm256cc";
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ alkeryn ];
+    license = licenses.gpl3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cmark-gfm/default.nix b/nixpkgs/pkgs/development/libraries/cmark-gfm/default.nix
new file mode 100644
index 000000000000..650913fc3888
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cmark-gfm/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+stdenv.mkDerivation rec {
+  pname = "cmark-gfm";
+  version = "0.29.0.gfm.13";
+
+  src = fetchFromGitHub {
+    owner = "github";
+    repo = "cmark-gfm";
+    rev = version;
+    sha256 = "sha256-HiSGtRsSbW03R6aKoMVVFOLrwP5aXtpeXUC/bE5M/qo=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "GitHub's fork of cmark, a CommonMark parsing and rendering library and program in C";
+    homepage = "https://github.com/github/cmark-gfm";
+    changelog = "https://github.com/github/cmark-gfm/raw/${version}/changelog.txt";
+    maintainers = with maintainers; [ cyplo ];
+    platforms = platforms.unix;
+    license = licenses.bsd2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cmark/default.nix b/nixpkgs/pkgs/development/libraries/cmark/default.nix
new file mode 100644
index 000000000000..23d00769ee1b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cmark/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "cmark";
+  version = "0.31.0";
+
+  src = fetchFromGitHub {
+    owner = "commonmark";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-GBesKTp9DqoFAmCc0RB+XePvzV9g+w+oyrD1nCgyklI=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags =
+    # Link the executable with the shared library on system with shared libraries.
+    lib.optional (!stdenv.hostPlatform.isStatic) "-DCMARK_STATIC=OFF"
+    # Do not attempt to build .so library on static platform.
+    ++ lib.optional stdenv.hostPlatform.isStatic "-DCMARK_SHARED=OFF";
+
+  doCheck = true;
+
+  preCheck = let
+    lib_path = if stdenv.isDarwin then "DYLD_FALLBACK_LIBRARY_PATH" else "LD_LIBRARY_PATH";
+  in ''
+    export ${lib_path}=$(readlink -f ./src)
+  '';
+
+  meta = with lib; {
+    description = "CommonMark parsing and rendering library and program in C";
+    homepage = "https://github.com/commonmark/cmark";
+    changelog = "https://github.com/commonmark/cmark/raw/${version}/changelog.txt";
+    maintainers = [ maintainers.michelk ];
+    platforms = platforms.all;
+    license = licenses.bsd2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cminpack/default.nix b/nixpkgs/pkgs/development/libraries/cminpack/default.nix
new file mode 100644
index 000000000000..bebb59334f15
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cminpack/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, stdenv
+, cmake
+, darwin
+, fetchFromGitHub
+, fetchurl
+, withBlas ? true, blas
+}:
+
+stdenv.mkDerivation rec {
+  pname = "cminpack";
+  version = "1.3.8";
+
+  src = fetchFromGitHub {
+    owner = "devernay";
+    repo = "cminpack";
+    rev = "v${version}";
+    hash = "sha256-eFJ43cHbSbWld+gPpMaNiBy1X5TIcN9aVxjh8PxvVDU=";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = lib.optionals withBlas [
+    blas
+  ] ++ lib.optionals (withBlas && stdenv.isDarwin) [
+    darwin.apple_sdk.frameworks.Accelerate
+    darwin.apple_sdk.frameworks.CoreGraphics
+    darwin.apple_sdk.frameworks.CoreVideo
+  ];
+
+  cmakeFlags = [
+    "-DUSE_BLAS=${if withBlas then "ON" else "OFF"}"
+    "-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
+  ];
+
+  meta = {
+    description = "Software for solving nonlinear equations and nonlinear least squares problems";
+    homepage = "http://devernay.free.fr/hacks/cminpack/";
+    changelog = "https://github.com/devernay/cminpack/blob/v${version}/README.md#history";
+    license = lib.licenses.bsd3;
+    platforms = lib.platforms.all;
+    maintainers = [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cmocka/default.nix b/nixpkgs/pkgs/development/libraries/cmocka/default.nix
new file mode 100644
index 000000000000..6c88d1baebfa
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cmocka/default.nix
@@ -0,0 +1,56 @@
+{ fetchurl, fetchpatch, lib, stdenv, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "cmocka";
+  majorVersion = "1.1";
+  version = "${majorVersion}.7";
+
+  src = fetchurl {
+    url = "https://cmocka.org/files/${majorVersion}/cmocka-${version}.tar.xz";
+    sha256 = "sha256-gQVw6wuNZIBDMfgrKf9Hx5DOnNaxY+mNR6SAcEfsrYI=";
+  };
+
+  patches = [
+    ./uintptr_t.patch
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = lib.optional doCheck "-DUNIT_TESTING=ON"
+    ++ lib.optional stdenv.hostPlatform.isStatic "-DBUILD_SHARED_LIBS=OFF";
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Lightweight library to simplify and generalize unit tests for C";
+    longDescription = ''
+      There are a variety of C unit testing frameworks available however
+      many of them are fairly complex and require the latest compiler
+      technology.  Some development requires the use of old compilers which
+      makes it difficult to use some unit testing frameworks. In addition
+      many unit testing frameworks assume the code being tested is an
+      application or module that is targeted to the same platform that will
+      ultimately execute the test.  Because of this assumption many
+      frameworks require the inclusion of standard C library headers in the
+      code module being tested which may collide with the custom or
+      incomplete implementation of the C library utilized by the code under
+      test.
+
+      Cmocka only requires a test application is linked with the standard C
+      library which minimizes conflicts with standard C library headers.
+      Also, CMocka tries to avoid the use of some of the newer features of
+      C compilers.
+
+      This results in CMocka being a relatively small library that can be
+      used to test a variety of exotic code. If a developer wishes to
+      simply test an application with the latest compiler then other unit
+      testing frameworks may be preferable.
+
+      This is the successor of Google's Cmockery.
+    '';
+    homepage = "https://cmocka.org/";
+    license = licenses.asl20;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ kragniz rasendubi ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cmocka/uintptr_t.patch b/nixpkgs/pkgs/development/libraries/cmocka/uintptr_t.patch
new file mode 100644
index 000000000000..ac69560d1c99
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cmocka/uintptr_t.patch
@@ -0,0 +1,16 @@
+Resolve messy situation with uintptr_t and stdint.h
+
+Platforms common in nixpkgs will have stdint.h - thereby we avoid problems
+that seem complicated to avoid.  References:
+https://gitlab.com/cmocka/cmocka/-/issues/38#note_1286565655
+https://git.alpinelinux.org/aports/plain/main/cmocka/musl_uintptr.patch?id=6a15dd0d0ba9cc354a621fb359ca5e315ff2eabd
+
+It isn't easy, as 1.1.6 codebase is missing stdint.h includes on many places,
+and HAVE_UINTPTR_T from cmake also wouldn't get on all places it needs to.
+--- a/include/cmocka.h
++++ b/include/cmocka.h
+@@ -18,2 +18,4 @@
+ #define CMOCKA_H_
++#include <stdint.h>
++#define HAVE_UINTPTR_T 1
+ 
diff --git a/nixpkgs/pkgs/development/libraries/cmrt/default.nix b/nixpkgs/pkgs/development/libraries/cmrt/default.nix
new file mode 100644
index 000000000000..87c692b42cea
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cmrt/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, libdrm, libva }:
+
+stdenv.mkDerivation rec {
+  pname = "cmrt";
+  version = "1.0.6";
+
+  src = fetchFromGitHub {
+    owner = "intel";
+    repo = "cmrt";
+    rev = version;
+    sha256 = "sha256-W6MQI41J9CKeM1eILCkvmW34cbCC8YeEF2mE+Ci8o7s=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  buildInputs = [ libdrm libva ];
+
+  meta = with lib; {
+    broken = (stdenv.isLinux && stdenv.isAarch64);
+    homepage = "https://01.org/linuxmedia";
+    description = "Intel C for Media Runtime";
+    longDescription = "Media GPU kernel manager for Intel G45 & HD Graphics family";
+    license = licenses.mit;
+    maintainers = with maintainers; [ tadfisher ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/codec2/default.nix b/nixpkgs/pkgs/development/libraries/codec2/default.nix
new file mode 100644
index 000000000000..7b1a226de812
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/codec2/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, freedvSupport ? false
+, lpcnetfreedv
+, codec2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "codec2";
+  version = "1.1.1";
+
+  src = fetchFromGitHub {
+    owner = "drowe67";
+    repo = "codec2";
+    rev = "v${version}";
+    hash = "sha256-p1WMp17PCnr50bXDSd6A4Je7AfKVHuLmyEue9221zPs=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = lib.optionals freedvSupport [
+    lpcnetfreedv
+  ];
+
+  # Install a binary that is used by openwebrx
+  postInstall = ''
+    install -Dm0755 src/freedv_rx -t $out/bin/
+  '';
+
+  # Swap keyword order to satisfy SWIG parser
+  postFixup = ''
+    sed -r -i 's/(\<_Complex)(\s+)(float|double)/\3\2\1/' $out/include/$pname/freedv_api.h
+  '';
+
+  cmakeFlags = [
+    # RPATH of binary /nix/store/.../bin/freedv_rx contains a forbidden reference to /build/
+    "-DCMAKE_SKIP_BUILD_RPATH=ON"
+  ] ++ lib.optionals freedvSupport [
+    "-DLPCNET=ON"
+  ];
+
+  meta = with lib; {
+    description = "Speech codec designed for communications quality speech at low data rates";
+    homepage = "https://www.rowetel.com/codec2.html";
+    license = licenses.lgpl21Only;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ markuskowa ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/coeurl/default.nix b/nixpkgs/pkgs/development/libraries/coeurl/default.nix
new file mode 100644
index 000000000000..b0743e032c6e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/coeurl/default.nix
@@ -0,0 +1,55 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, fetchpatch
+, ninja
+, pkg-config
+, meson
+, libevent
+, curl
+, spdlog
+}:
+
+stdenv.mkDerivation rec {
+  pname = "coeurl";
+  version = "0.3.0";
+
+  src = fetchFromGitLab {
+    domain = "nheko.im";
+    owner = "nheko-reborn";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-sN+YSddUOdnJLcnHyWdjNm1PpxCwnkwiqSvyrwUrg6w=";
+  };
+  patches = [
+    # Fix compatibility issues with curl > 7.85, see:
+    # https://nheko.im/nheko-reborn/coeurl/-/commit/d926893007c353fbc149d8538a5762ca8384273a
+    # PATCH CAN BE REMOVED AFTER 0.3.0
+    (fetchpatch {
+      url = "https://nheko.im/nheko-reborn/coeurl/-/commit/d926893007c353fbc149d8538a5762ca8384273a.patch";
+      hash = "sha256-hOBk7riuVI7k7qe/SMq3XJnFzyZ0gB9kVG7dKvWOsPY=";
+    })
+    # Fix error when building with fmt >= 10, see:
+    # https://nheko.im/nheko-reborn/coeurl/-/commit/831e2ee8e9cf08ea1ee9736cde8370f9d0312abc
+    # PATCH CAN BE REMOVED AFTER 0.3.0
+    (fetchpatch {
+      url = "https://nheko.im/nheko-reborn/coeurl/-/commit/831e2ee8e9cf08ea1ee9736cde8370f9d0312abc.patch";
+      hash = "sha256-a52Id7Nm3Mmmwv7eL58j6xovjlkpAO4KahVM/Q3H65w=";
+    })
+  ];
+  postPatch = ''
+    substituteInPlace subprojects/curl.wrap --replace '[provides]' '[provide]'
+  '';
+
+  nativeBuildInputs = [ ninja pkg-config meson ];
+
+  buildInputs = [ libevent curl spdlog ];
+
+  meta = with lib; {
+    description = "A simple async wrapper around CURL for C++";
+    homepage = "https://nheko.im/nheko-reborn/coeurl";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ rnhmjoj ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cogl/default.nix b/nixpkgs/pkgs/development/libraries/cogl/default.nix
new file mode 100644
index 000000000000..987d90e26995
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cogl/default.nix
@@ -0,0 +1,121 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, pkg-config
+, libGL
+, glib
+, gdk-pixbuf
+, xorg
+, libintl
+, pangoSupport ? true
+, pango
+, cairo
+, gobject-introspection
+, wayland
+, gnome
+, mesa
+, automake
+, autoconf
+, gstreamerSupport ? true
+, gst_all_1
+, harfbuzz
+, OpenGL
+}:
+
+stdenv.mkDerivation rec {
+  pname = "cogl";
+  version = "1.22.8";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/cogl-${version}.tar.xz";
+    sha256 = "0nfph4ai60ncdx7hy6hl1i1cmp761jgnyjfhagzi0iqq36qb41d8";
+  };
+
+  patches = [
+    # Some deepin packages need the following patches. They have been
+    # submitted by Fedora on the GNOME Bugzilla
+    # (https://bugzilla.gnome.org/787443). Upstream thinks the patch
+    # could be merged, but dev can not make a new release.
+    ./patches/gnome_bugzilla_787443_359589_deepin.patch
+    ./patches/gnome_bugzilla_787443_361056_deepin.patch
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ pkg-config libintl automake autoconf gobject-introspection ];
+
+  configureFlags = [
+    "--enable-introspection"
+  ] ++ lib.optionals (!stdenv.isDarwin) [
+    "--enable-kms-egl-platform"
+    "--enable-wayland-egl-platform"
+    "--enable-wayland-egl-server"
+    "--enable-gles1"
+    "--enable-gles2"
+    # Force linking against libGL.
+    # Otherwise, it tries to load it from the runtime library path.
+    "LIBS=-lGL"
+  ] ++ lib.optionals stdenv.isDarwin [
+    "--disable-glx"
+    "--without-x"
+  ] ++ lib.optionals gstreamerSupport [
+    "--enable-cogl-gst"
+  ];
+
+  # TODO: this shouldn't propagate so many things
+  # especially not gobject-introspection
+  propagatedBuildInputs = [
+    glib
+    gdk-pixbuf
+    gobject-introspection
+  ] ++ lib.optionals stdenv.isLinux [
+    wayland
+    mesa
+    libGL
+    xorg.libXrandr
+    xorg.libXfixes
+    xorg.libXcomposite
+    xorg.libXdamage
+  ] ++ lib.optionals gstreamerSupport [
+    gst_all_1.gstreamer
+    gst_all_1.gst-plugins-base
+  ];
+
+  buildInputs = lib.optionals pangoSupport [ pango cairo harfbuzz ]
+    ++ lib.optionals stdenv.isDarwin [ OpenGL ];
+
+  env = {
+    COGL_PANGO_DEP_CFLAGS = toString (lib.optionals (stdenv.isDarwin && pangoSupport) [
+      "-I${pango.dev}/include/pango-1.0"
+      "-I${cairo.dev}/include/cairo"
+      "-I${harfbuzz.dev}/include/harfbuzz"
+    ]);
+  } // lib.optionalAttrs stdenv.cc.isClang {
+    NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
+  };
+
+  #doCheck = true; # all tests fail (no idea why)
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    description = "A small open source library for using 3D graphics hardware for rendering";
+    maintainers = with maintainers; [ lovek323 ];
+
+    longDescription = ''
+      Cogl is a small open source library for using 3D graphics hardware for
+      rendering. The API departs from the flat state machine style of OpenGL
+      and is designed to make it easy to write orthogonal components that can
+      render without stepping on each other's toes.
+    '';
+
+    platforms = platforms.unix;
+    license = with licenses; [ mit bsd3 publicDomain sgi-b-20 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cogl/patches/gnome_bugzilla_787443_359589_deepin.patch b/nixpkgs/pkgs/development/libraries/cogl/patches/gnome_bugzilla_787443_359589_deepin.patch
new file mode 100644
index 000000000000..45342dcff2cd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cogl/patches/gnome_bugzilla_787443_359589_deepin.patch
@@ -0,0 +1,93 @@
+From 78636289b073d67209a20145ef0dc003f2d77db6 Mon Sep 17 00:00:00 2001
+From: Sian Cao <yinshuiboy@gmail.com>
+Date: Tue, 12 Apr 2016 11:36:51 +0800
+Subject: [PATCH 1/2] Add GL_ARB_shader_texture_lod support
+
+The patch is used to do lod biased texturing. I can achieve
+faster blurring of images instead of using large blur radius.
+
+---
+ cogl/cogl-context.h                |  1 +
+ cogl/cogl-glsl-shader.c            | 13 +++++++++++--
+ cogl/cogl-types.h                  |  3 ++-
+ cogl/driver/gl/gl/cogl-driver-gl.c |  7 +++++++
+ 4 files changed, 21 insertions(+), 3 deletions(-)
+
+diff --git a/cogl/cogl-context.h b/cogl/cogl-context.h
+index 07badeb..261ce49 100644
+--- a/cogl/cogl-context.h
++++ b/cogl/cogl-context.h
+@@ -290,6 +290,7 @@ typedef enum _CoglFeatureID
+   COGL_FEATURE_ID_PER_VERTEX_POINT_SIZE,
+   COGL_FEATURE_ID_TEXTURE_RG,
+   COGL_FEATURE_ID_BUFFER_AGE,
++  COGL_FEATURE_ID_SHADER_TEXTURE_LOD,
+ 
+   /*< private >*/
+   _COGL_N_FEATURE_IDS   /*< skip >*/
+diff --git a/cogl/cogl-glsl-shader.c b/cogl/cogl-glsl-shader.c
+index 196e0c7..4fb0eb5 100644
+--- a/cogl/cogl-glsl-shader.c
++++ b/cogl/cogl-glsl-shader.c
+@@ -87,8 +87,8 @@ _cogl_glsl_shader_set_source_with_boilerplate (CoglContext *ctx,
+   const char *vertex_boilerplate;
+   const char *fragment_boilerplate;
+ 
+-  const char **strings = g_alloca (sizeof (char *) * (count_in + 4));
+-  GLint *lengths = g_alloca (sizeof (GLint) * (count_in + 4));
++  const char **strings = g_alloca (sizeof (char *) * (count_in + 5));
++  GLint *lengths = g_alloca (sizeof (GLint) * (count_in + 5));
+   char *version_string;
+   int count = 0;
+ 
+@@ -111,6 +111,15 @@ _cogl_glsl_shader_set_source_with_boilerplate (CoglContext *ctx,
+       lengths[count++] = sizeof (texture_3d_extension) - 1;
+     }
+ 
++  if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_PROGRAMMABLE) &&
++      cogl_has_feature (ctx, COGL_FEATURE_ID_SHADER_TEXTURE_LOD))
++    {
++      static const char shader_texture_lod_ext[] =
++        "#extension GL_ARB_shader_texture_lod : enable\n";
++      strings[count] = shader_texture_lod_ext;
++      lengths[count++] = sizeof (shader_texture_lod_ext) - 1;
++    }
++
+   if (shader_gl_type == GL_VERTEX_SHADER)
+     {
+       strings[count] = vertex_boilerplate;
+diff --git a/cogl/cogl-types.h b/cogl/cogl-types.h
+index 6accf8d..77964c6 100644
+--- a/cogl/cogl-types.h
++++ b/cogl/cogl-types.h
+@@ -470,7 +470,8 @@ typedef enum
+   COGL_FEATURE_MAP_BUFFER_FOR_READ    = (1 << 21),
+   COGL_FEATURE_MAP_BUFFER_FOR_WRITE   = (1 << 22),
+   COGL_FEATURE_ONSCREEN_MULTIPLE      = (1 << 23),
+-  COGL_FEATURE_DEPTH_TEXTURE          = (1 << 24)
++  COGL_FEATURE_DEPTH_TEXTURE          = (1 << 24),
++  COGL_FEATURE_SHADER_TEXTURE_LOD     = (1 << 25)
+ } CoglFeatureFlags;
+ 
+ /**
+diff --git a/cogl/driver/gl/gl/cogl-driver-gl.c b/cogl/driver/gl/gl/cogl-driver-gl.c
+index 716d1dd..f305b6a 100644
+--- a/cogl/driver/gl/gl/cogl-driver-gl.c
++++ b/cogl/driver/gl/gl/cogl-driver-gl.c
+@@ -568,6 +568,13 @@ _cogl_driver_update_features (CoglContext *ctx,
+                       COGL_FEATURE_ID_TEXTURE_RECTANGLE, TRUE);
+     }
+ 
++  if (_cogl_check_extension ("GL_ARB_shader_texture_lod", gl_extensions))
++    {
++      flags |= COGL_FEATURE_SHADER_TEXTURE_LOD;
++      COGL_FLAGS_SET (ctx->features,
++                      COGL_FEATURE_ID_SHADER_TEXTURE_LOD, TRUE);
++    }
++
+   if (ctx->glTexImage3D)
+     {
+       flags |= COGL_FEATURE_TEXTURE_3D;
+-- 
+2.9.5
+
diff --git a/nixpkgs/pkgs/development/libraries/cogl/patches/gnome_bugzilla_787443_361056_deepin.patch b/nixpkgs/pkgs/development/libraries/cogl/patches/gnome_bugzilla_787443_361056_deepin.patch
new file mode 100644
index 000000000000..d8409e33fa93
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cogl/patches/gnome_bugzilla_787443_361056_deepin.patch
@@ -0,0 +1,368 @@
+From d8b34ab0604d80d0be22b8b78e9aa6bf4fac7db0 Mon Sep 17 00:00:00 2001
+From: Sian Cao <yinshuiboy@gmail.com>
+Date: Thu, 27 Oct 2016 15:19:32 +0800
+Subject: [PATCH 2/2] texture: Support copy_sub_image
+
+We need copy_sub_image to implement blurring effects of partial framebuffer
+contents as texture sources.
+
+---
+ cogl/cogl-atlas-texture.c                   |  1 +
+ cogl/cogl-driver.h                          | 10 ++++++++
+ cogl/cogl-sub-texture.c                     |  1 +
+ cogl/cogl-texture-2d-sliced.c               |  1 +
+ cogl/cogl-texture-2d.c                      | 30 ++++++++++++++++++++++
+ cogl/cogl-texture-3d.c                      |  1 +
+ cogl/cogl-texture-private.h                 |  9 +++++++
+ cogl/cogl-texture-rectangle.c               |  1 +
+ cogl/cogl-texture.c                         | 33 ++++++++++++++++++++++++
+ cogl/cogl-texture.h                         |  9 +++++++
+ cogl/driver/gl/cogl-texture-2d-gl-private.h |  9 +++++++
+ cogl/driver/gl/cogl-texture-2d-gl.c         | 39 +++++++++++++++++++++++++++++
+ cogl/driver/gl/gl/cogl-driver-gl.c          |  1 +
+ cogl/driver/gl/gles/cogl-driver-gles.c      |  1 +
+ cogl/driver/nop/cogl-driver-nop.c           |  1 +
+ cogl/winsys/cogl-texture-pixmap-x11.c       |  1 +
+ 16 files changed, 148 insertions(+)
+
+diff --git a/cogl/cogl-atlas-texture.c b/cogl/cogl-atlas-texture.c
+index 1c8b569..e411302 100644
+--- a/cogl/cogl-atlas-texture.c
++++ b/cogl/cogl-atlas-texture.c
+@@ -1027,6 +1027,7 @@ cogl_atlas_texture_vtable =
+     FALSE, /* not primitive */
+     _cogl_atlas_texture_allocate,
+     _cogl_atlas_texture_set_region,
++    NULL, /* copy_sub_image */
+     NULL, /* get_data */
+     _cogl_atlas_texture_foreach_sub_texture_in_region,
+     _cogl_atlas_texture_get_max_waste,
+diff --git a/cogl/cogl-driver.h b/cogl/cogl-driver.h
+index 648228c..4a0aeaf 100644
+--- a/cogl/cogl-driver.h
++++ b/cogl/cogl-driver.h
+@@ -192,6 +192,16 @@ struct _CoglDriverVtable
+                                    int level,
+                                    CoglError **error);
+ 
++  CoglBool
++  (* texture_2d_copy_sub_image) (CoglTexture2D *tex_2d,
++                                 GLint xoffset,
++                                 GLint yoffset,
++                                 GLint x,
++                                 GLint y,
++                                 GLsizei width,
++                                 GLsizei height,
++                                 CoglError **error);
++
+   /* Reads back the full contents of the given texture and write it to
+    * @data in the given @format and with the given @rowstride.
+    *
+diff --git a/cogl/cogl-sub-texture.c b/cogl/cogl-sub-texture.c
+index 7baf95e..0a16193 100644
+--- a/cogl/cogl-sub-texture.c
++++ b/cogl/cogl-sub-texture.c
+@@ -460,6 +460,7 @@ cogl_sub_texture_vtable =
+     FALSE, /* not primitive */
+     _cogl_sub_texture_allocate,
+     _cogl_sub_texture_set_region,
++    NULL, /* copy_sub_image */
+     NULL, /* get_data */
+     _cogl_sub_texture_foreach_sub_texture_in_region,
+     _cogl_sub_texture_get_max_waste,
+diff --git a/cogl/cogl-texture-2d-sliced.c b/cogl/cogl-texture-2d-sliced.c
+index e76bef6..b0b099f 100644
+--- a/cogl/cogl-texture-2d-sliced.c
++++ b/cogl/cogl-texture-2d-sliced.c
+@@ -1526,6 +1526,7 @@ cogl_texture_2d_sliced_vtable =
+     FALSE, /* not primitive */
+     _cogl_texture_2d_sliced_allocate,
+     _cogl_texture_2d_sliced_set_region,
++    NULL, /* copy_sub_image */
+     NULL, /* get_data */
+     _cogl_texture_2d_sliced_foreach_sub_texture_in_region,
+     _cogl_texture_2d_sliced_get_max_waste,
+diff --git a/cogl/cogl-texture-2d.c b/cogl/cogl-texture-2d.c
+index cc28cd9..d9ab188 100644
+--- a/cogl/cogl-texture-2d.c
++++ b/cogl/cogl-texture-2d.c
+@@ -628,6 +628,35 @@ _cogl_texture_2d_set_region (CoglTexture *tex,
+ }
+ 
+ static CoglBool
++_cogl_texture_2d_copy_sub_image (CoglTexture *tex,
++                                 GLint xoffset,
++                                 GLint yoffset,
++                                 GLint x,
++                                 GLint y,
++                                 GLsizei width,
++                                 GLsizei height,
++                                 CoglError **error)
++{
++  CoglContext *ctx = tex->context;
++  CoglTexture2D *tex_2d = COGL_TEXTURE_2D (tex);
++
++  cogl_texture_allocate (tex, NULL); /* (abort on error) */
++
++  ctx->driver_vtable->texture_2d_copy_sub_image (tex_2d,
++                                                 xoffset,
++                                                 yoffset,
++                                                 x,
++                                                 y,
++                                                 width,
++                                                 height,
++                                                 error);
++
++  tex_2d->mipmaps_dirty = TRUE;
++
++  return TRUE;
++}
++
++static CoglBool
+ _cogl_texture_2d_get_data (CoglTexture *tex,
+                            CoglPixelFormat format,
+                            int rowstride,
+@@ -675,6 +704,7 @@ cogl_texture_2d_vtable =
+     TRUE, /* primitive */
+     _cogl_texture_2d_allocate,
+     _cogl_texture_2d_set_region,
++    _cogl_texture_2d_copy_sub_image,
+     _cogl_texture_2d_get_data,
+     NULL, /* foreach_sub_texture_in_region */
+     _cogl_texture_2d_get_max_waste,
+diff --git a/cogl/cogl-texture-3d.c b/cogl/cogl-texture-3d.c
+index 8e2ff08..a59d386 100644
+--- a/cogl/cogl-texture-3d.c
++++ b/cogl/cogl-texture-3d.c
+@@ -741,6 +741,7 @@ cogl_texture_3d_vtable =
+     TRUE, /* primitive */
+     _cogl_texture_3d_allocate,
+     _cogl_texture_3d_set_region,
++    NULL, /* copy_sub_image */
+     _cogl_texture_3d_get_data,
+     NULL, /* foreach_sub_texture_in_region */
+     _cogl_texture_3d_get_max_waste,
+diff --git a/cogl/cogl-texture-private.h b/cogl/cogl-texture-private.h
+index 472c41d..34ff81c 100644
+--- a/cogl/cogl-texture-private.h
++++ b/cogl/cogl-texture-private.h
+@@ -90,6 +90,15 @@ struct _CoglTextureVtable
+                            CoglBitmap *bitmap,
+                            CoglError **error);
+ 
++    CoglBool (* copy_sub_image) (CoglTexture *texture,
++                                 GLint xoffset,
++                                 GLint yoffset,
++                                 GLint x,
++                                 GLint y,
++                                 GLsizei width,
++                                 GLsizei height,
++                                 CoglError **error);
++
+   /* This should copy the image data of the texture into @data. The
+      requested format will have been first passed through
+      ctx->texture_driver->find_best_gl_get_data_format so it should
+diff --git a/cogl/cogl-texture-rectangle.c b/cogl/cogl-texture-rectangle.c
+index 65d2f06..9f533c9 100644
+--- a/cogl/cogl-texture-rectangle.c
++++ b/cogl/cogl-texture-rectangle.c
+@@ -761,6 +761,7 @@ cogl_texture_rectangle_vtable =
+     TRUE, /* primitive */
+     _cogl_texture_rectangle_allocate,
+     _cogl_texture_rectangle_set_region,
++    NULL, /* copy_sub_image */
+     _cogl_texture_rectangle_get_data,
+     NULL, /* foreach_sub_texture_in_region */
+     _cogl_texture_rectangle_get_max_waste,
+diff --git a/cogl/cogl-texture.c b/cogl/cogl-texture.c
+index d93db22..1f4b43c 100644
+--- a/cogl/cogl-texture.c
++++ b/cogl/cogl-texture.c
+@@ -514,6 +514,39 @@ cogl_texture_set_region (CoglTexture *texture,
+ }
+ 
+ CoglBool
++cogl_texture_copy_sub_image (CoglTexture *texture,
++                             int xoffset,
++                             int yoffset,
++                             int x,
++                             int y,
++                             size_t width,
++                             size_t height)
++{
++  CoglError *ignore_error = NULL;
++  CoglBool status;
++
++  if (!texture->allocated)
++    cogl_texture_allocate (texture, NULL);
++
++  if (!texture->vtable->copy_sub_image)
++    return FALSE;
++
++  status = texture->vtable->copy_sub_image (texture,
++                                            xoffset,
++                                            yoffset,
++                                            x,
++                                            y,
++                                            width,
++                                            height,
++                                            &ignore_error);
++
++  if (!status)
++    cogl_error_free (ignore_error);
++  return status;
++}
++
++
++CoglBool
+ cogl_texture_set_data (CoglTexture *texture,
+                        CoglPixelFormat format,
+                        int rowstride,
+diff --git a/cogl/cogl-texture.h b/cogl/cogl-texture.h
+index 2718830..81657d1 100644
+--- a/cogl/cogl-texture.h
++++ b/cogl/cogl-texture.h
+@@ -399,6 +399,15 @@ cogl_texture_set_region (CoglTexture *texture,
+                          unsigned int rowstride,
+                          const uint8_t *data);
+ 
++CoglBool
++cogl_texture_copy_sub_image (CoglTexture *texture,
++                             int xoffset,
++                             int yoffset,
++                             int x,
++                             int y,
++                             size_t width,
++                             size_t height);
++
+ #if defined (COGL_ENABLE_EXPERIMENTAL_API)
+ 
+ /**
+diff --git a/cogl/driver/gl/cogl-texture-2d-gl-private.h b/cogl/driver/gl/cogl-texture-2d-gl-private.h
+index e5c6585..d2f9985 100644
+--- a/cogl/driver/gl/cogl-texture-2d-gl-private.h
++++ b/cogl/driver/gl/cogl-texture-2d-gl-private.h
+@@ -109,6 +109,15 @@ _cogl_texture_2d_gl_copy_from_bitmap (CoglTexture2D *tex_2d,
+                                       int dst_y,
+                                       int level,
+                                       CoglError **error);
++CoglBool
++_cogl_texture_2d_gl_copy_sub_image (CoglTexture2D *tex_2d,
++                                    GLint xoffset,
++                                    GLint yoffset,
++                                    GLint x,
++                                    GLint y,
++                                    GLsizei width,
++                                    GLsizei height,
++                                    CoglError **error);
+ 
+ void
+ _cogl_texture_2d_gl_get_data (CoglTexture2D *tex_2d,
+diff --git a/cogl/driver/gl/cogl-texture-2d-gl.c b/cogl/driver/gl/cogl-texture-2d-gl.c
+index 8675f52..bc15ac5 100644
+--- a/cogl/driver/gl/cogl-texture-2d-gl.c
++++ b/cogl/driver/gl/cogl-texture-2d-gl.c
+@@ -35,6 +35,7 @@
+ #include <config.h>
+ 
+ #include <string.h>
++#include <stdio.h>
+ 
+ #include "cogl-private.h"
+ #include "cogl-texture-private.h"
+@@ -719,6 +720,44 @@ _cogl_texture_2d_gl_copy_from_bitmap (CoglTexture2D *tex_2d,
+   return status;
+ }
+ 
++CoglBool
++_cogl_texture_2d_gl_copy_sub_image (CoglTexture2D *tex_2d,
++                                    GLint xoffset,
++                                    GLint yoffset,
++                                    GLint x,
++                                    GLint y,
++                                    GLsizei width,
++                                    GLsizei height,
++                                    CoglError **error)
++{
++  CoglContext *ctx = COGL_TEXTURE (tex_2d)->context;
++
++  if (ctx->current_read_buffer == NULL)
++    return FALSE;
++
++  if (ctx->current_draw_buffer)
++    _cogl_framebuffer_flush_journal (ctx->current_draw_buffer);
++
++  if (ctx->current_read_buffer != NULL &&
++      ctx->current_read_buffer != ctx->current_draw_buffer)
++    _cogl_framebuffer_flush_journal (ctx->current_read_buffer);
++
++  _cogl_bind_gl_texture_transient (GL_TEXTURE_2D,
++                                   tex_2d->gl_texture,
++                                   tex_2d->is_foreign);
++
++  ctx->glCopyTexSubImage2D (GL_TEXTURE_2D,
++                            0,
++                            xoffset,
++                            yoffset,
++                            x,
++                            y,
++                            width,
++                            height);
++
++  return TRUE;
++}
++
+ void
+ _cogl_texture_2d_gl_get_data (CoglTexture2D *tex_2d,
+                               CoglPixelFormat format,
+diff --git a/cogl/driver/gl/gl/cogl-driver-gl.c b/cogl/driver/gl/gl/cogl-driver-gl.c
+index f305b6a..f7f5020 100644
+--- a/cogl/driver/gl/gl/cogl-driver-gl.c
++++ b/cogl/driver/gl/gl/cogl-driver-gl.c
+@@ -695,6 +695,7 @@ _cogl_driver_gl =
+     _cogl_texture_2d_gl_get_gl_handle,
+     _cogl_texture_2d_gl_generate_mipmap,
+     _cogl_texture_2d_gl_copy_from_bitmap,
++    _cogl_texture_2d_gl_copy_sub_image,
+     _cogl_texture_2d_gl_get_data,
+     _cogl_gl_flush_attributes_state,
+     _cogl_clip_stack_gl_flush,
+diff --git a/cogl/driver/gl/gles/cogl-driver-gles.c b/cogl/driver/gl/gles/cogl-driver-gles.c
+index e94449f..f5ac771 100644
+--- a/cogl/driver/gl/gles/cogl-driver-gles.c
++++ b/cogl/driver/gl/gles/cogl-driver-gles.c
+@@ -476,6 +476,7 @@ _cogl_driver_gles =
+     _cogl_texture_2d_gl_get_gl_handle,
+     _cogl_texture_2d_gl_generate_mipmap,
+     _cogl_texture_2d_gl_copy_from_bitmap,
++    _cogl_texture_2d_gl_copy_sub_image,
+     NULL, /* texture_2d_get_data */
+     _cogl_gl_flush_attributes_state,
+     _cogl_clip_stack_gl_flush,
+diff --git a/cogl/driver/nop/cogl-driver-nop.c b/cogl/driver/nop/cogl-driver-nop.c
+index 53f5975..9d88955 100644
+--- a/cogl/driver/nop/cogl-driver-nop.c
++++ b/cogl/driver/nop/cogl-driver-nop.c
+@@ -80,6 +80,7 @@ _cogl_driver_nop =
+     _cogl_texture_2d_nop_get_gl_handle,
+     _cogl_texture_2d_nop_generate_mipmap,
+     _cogl_texture_2d_nop_copy_from_bitmap,
++    NULL, /* texture_2d_copy_from_image */
+     NULL, /* texture_2d_get_data */
+     _cogl_nop_flush_attributes_state,
+     _cogl_clip_stack_nop_flush,
+diff --git a/cogl/winsys/cogl-texture-pixmap-x11.c b/cogl/winsys/cogl-texture-pixmap-x11.c
+index 398c357..a44cdaf 100644
+--- a/cogl/winsys/cogl-texture-pixmap-x11.c
++++ b/cogl/winsys/cogl-texture-pixmap-x11.c
+@@ -1164,6 +1164,7 @@ cogl_texture_pixmap_x11_vtable =
+     FALSE, /* not primitive */
+     _cogl_texture_pixmap_x11_allocate,
+     _cogl_texture_pixmap_x11_set_region,
++    NULL, /* copy_sub_image */
+     _cogl_texture_pixmap_x11_get_data,
+     _cogl_texture_pixmap_x11_foreach_sub_texture_in_region,
+     _cogl_texture_pixmap_x11_get_max_waste,
+-- 
+2.9.5
+
diff --git a/nixpkgs/pkgs/development/libraries/coin3d/default.nix b/nixpkgs/pkgs/development/libraries/coin3d/default.nix
new file mode 100644
index 000000000000..7675ddae378e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/coin3d/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, boost
+, cmake
+, libGL
+, libGLU
+, libX11
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "coin";
+  version = "unstable-2022-07-27";
+
+  src = fetchFromGitHub {
+    owner = "coin3d";
+    repo = "coin";
+    rev = "4c67945a58d2a6e5adb4d2332ab08007769130ef";
+    hash = "sha256-lXS7GxtoPsZe2SJfr0uY99Q0ZtYG0KFlauY1PBuFleo=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [
+    boost
+    libGL
+    libGLU
+    libX11
+  ];
+
+  cmakeFlags = [ "-DCOIN_USE_CPACK=OFF" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/coin3d/coin";
+    description = "High-level, retained-mode toolkit for effective 3D graphics development";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ gebner viric ];
+    platforms = platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/collada-dom/default.nix b/nixpkgs/pkgs/development/libraries/collada-dom/default.nix
new file mode 100644
index 000000000000..1cb5c4853969
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/collada-dom/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, lib, fetchFromGitHub, cmake, boost, libxml2, minizip, readline }:
+
+stdenv.mkDerivation {
+  pname = "collada-dom";
+  version = "unstable-2020-01-03";
+
+  src = fetchFromGitHub {
+    owner = "rdiankov";
+    repo = "collada-dom";
+    rev = "c1e20b7d6ff806237030fe82f126cb86d661f063";
+    sha256 = "sha256-A1ne/D6S0shwCzb9spd1MoSt/238HWA8dvgd+DC9cXc=";
+  };
+
+  postInstall = ''
+    chmod +w -R $out
+    ln -s $out/include/*/* $out/include
+  '';
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [
+    boost
+    libxml2
+    minizip
+    readline
+  ];
+
+  meta = with lib; {
+    description = "Lightweight version of collada-dom, with only the parser.";
+    homepage = "https://github.com/rdiankov/collada-dom";
+    license = licenses.mit;
+    maintainers = with maintainers; [ marius851000 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/comedilib/default.nix b/nixpkgs/pkgs/development/libraries/comedilib/default.nix
new file mode 100644
index 000000000000..ab97ac09a57e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/comedilib/default.nix
@@ -0,0 +1,56 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, autoreconfHook
+, flex
+, bison
+, xmlto
+, docbook_xsl
+, docbook_xml_dtd_44
+, swig
+, perl
+, python3
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "comedilib";
+  version = "0.12.0";
+
+  src = fetchFromGitHub {
+    owner = "Linux-Comedi";
+    repo = "comedilib";
+    rev = "r${lib.replaceStrings [ "." ] [ "_" ] finalAttrs.version}";
+    sha256 = "0kfs2dw62vjz8j7fgsxq6ky8r8kca726gyklbm6kljvgfh47lyfw";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    flex
+    bison
+    swig
+    xmlto
+    docbook_xml_dtd_44
+    docbook_xsl
+    python3
+    perl
+  ];
+
+  preConfigure = ''
+    patchShebangs --build doc/mkref doc/mkdr perl/Comedi.pm
+  '';
+
+  configureFlags = [
+    "--with-udev-hotplug=${placeholder "out"}/lib"
+    "--sysconfdir=${placeholder "out"}/etc"
+  ];
+
+  outputs = [ "out" "dev" "man" "doc" ];
+
+  meta = with lib; {
+    description = "The Linux Control and Measurement Device Interface Library";
+    homepage = "https://github.com/Linux-Comedi/comedilib";
+    license = licenses.lgpl21;
+    maintainers = [ maintainers.doronbehar ];
+    platforms = platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/console-bridge/default.nix b/nixpkgs/pkgs/development/libraries/console-bridge/default.nix
new file mode 100644
index 000000000000..5c85bbd4a196
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/console-bridge/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub, cmake, validatePkgConfig }:
+
+stdenv.mkDerivation rec {
+  pname = "console-bridge";
+  version = "1.0.2";
+
+  src = fetchFromGitHub {
+    owner = "ros";
+    repo = "console_bridge";
+    rev = version;
+    sha256 = "sha256-M3GocT0hodw3Sc2NHcFDiPVZ1XN7BqIUuYLW8OaXMqM=";
+  };
+
+  nativeBuildInputs = [ cmake validatePkgConfig ];
+
+  meta = with lib; {
+    description = "A ROS-independent package for logging that seamlessly pipes into rosconsole/rosout for ROS-dependent packages";
+    homepage = "https://github.com/ros/console_bridge";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ lopsided98 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/coordgenlibs/default.nix b/nixpkgs/pkgs/development/libraries/coordgenlibs/default.nix
new file mode 100644
index 000000000000..4febe03ef04d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/coordgenlibs/default.nix
@@ -0,0 +1,37 @@
+{ fetchFromGitHub
+, lib
+, stdenv
+, boost
+, zlib
+, cmake
+, maeparser
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "coordgenlibs";
+  version = "3.0.2";
+
+  src = fetchFromGitHub {
+    owner = "schrodinger";
+    repo = "coordgenlibs";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-casFPNbPv9mkKpzfBENW7INClypuCO1L7clLGBXvSvI=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ boost zlib maeparser ];
+
+  env = lib.optionalAttrs stdenv.cc.isClang {
+    NIX_CFLAGS_COMPILE = "-Wno-unused-but-set-variable";
+  };
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Schrodinger-developed 2D Coordinate Generation";
+    homepage = "https://github.com/schrodinger/coordgenlibs";
+    changelog = "https://github.com/schrodinger/coordgenlibs/releases/tag/${finalAttrs.version}";
+    maintainers = [ maintainers.rmcgibbo ];
+    license = licenses.bsd3;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/coost/default.nix b/nixpkgs/pkgs/development/libraries/coost/default.nix
new file mode 100644
index 000000000000..3d0c15bbc2ef
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/coost/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchFromGitHub, cmake, curl, openssl, gitUpdater
+, withCurl ? true, withOpenSSL ? true }:
+
+stdenv.mkDerivation rec {
+  pname = "coost";
+  version = "3.0.0";
+
+  src = fetchFromGitHub {
+    owner = "idealvin";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-qpJh1yl0lYYszNHGo5Jkbzal2hnVzg7UUxiyg/Grva8=";
+  };
+
+  postPatch = ''
+    substituteInPlace cmake/coost.pc.in \
+      --replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
+      --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@ \
+  '';
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = lib.optional withCurl curl ++ lib.optional withOpenSSL openssl;
+
+  cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ]
+    ++ lib.optional withCurl "-DWITH_LIBCURL=ON"
+    ++ lib.optional withOpenSSL "-DWITH_OPENSSL=ON";
+
+  passthru.updateScript = gitUpdater { };
+
+  meta = with lib; {
+    description = "A tiny boost library in C++11";
+    homepage = "https://github.com/idealvin/coost";
+    license = licenses.mit;
+    maintainers = [];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cpp-hocon/default.nix b/nixpkgs/pkgs/development/libraries/cpp-hocon/default.nix
new file mode 100644
index 000000000000..fa4fd5fe6d5c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cpp-hocon/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchFromGitHub, cmake, boost, curl, leatherman }:
+
+stdenv.mkDerivation rec {
+  pname = "cpp-hocon";
+  version = "0.3.0";
+
+  src = fetchFromGitHub {
+    sha256 = "0b24anpwkmvbsn5klnr58vxksw00ci9pjhwzx7a61kplyhsaiydw";
+    rev = version;
+    repo = "cpp-hocon";
+    owner = "puppetlabs";
+  };
+
+  postPatch = ''
+    sed -i -e '/add_subdirectory(tests)/d' lib/CMakeLists.txt
+  '';
+
+  env.NIX_CFLAGS_COMPILE = "-Wno-error";
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ boost curl leatherman ];
+
+  meta = with lib; {
+    inherit (src.meta) homepage;
+    description = "A C++ port of the Typesafe Config library";
+    license = licenses.asl20;
+    maintainers = [ maintainers.womfoo ];
+    platforms = platforms.unix;
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/cpp-ipfs-http-client/default.nix b/nixpkgs/pkgs/development/libraries/cpp-ipfs-http-client/default.nix
new file mode 100644
index 000000000000..d44eed5e76f0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cpp-ipfs-http-client/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchFromGitHub, curl, cmake, nlohmann_json }:
+
+stdenv.mkDerivation {
+  pname = "cpp-ipfs-http-client";
+  version = "unstable-2022-01-30";
+
+  src = fetchFromGitHub {
+    owner = "vasild";
+    repo = "cpp-ipfs-http-client";
+    rev = "3cdfa7fc6326e49fc81b3c7ca43ce83bdccef6d9";
+    sha256 = "sha256-/oyafnk4SbrvoCh90wkZXNBjknMKA6EEUoEGo/amLUo=";
+  };
+
+  patches = [ ./unvendor-nlohmann-json.patch ];
+
+  postPatch = ''
+    substituteInPlace CMakeLists.txt \
+      --replace '# Fetch "JSON for Modern C++"' "include_directories(${nlohmann_json}/include)"
+  '';
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ curl ];
+  propagatedBuildInputs = [ nlohmann_json ];
+
+  env.NIX_CFLAGS_COMPILE = toString [
+    "-Wno-error=range-loop-construct"
+    # Needed with GCC 12
+    "-Wno-error=deprecated-declarations"
+  ];
+
+  meta = with lib; {
+    description = "IPFS C++ API client library";
+    homepage = "https://github.com/vasild/cpp-ipfs-http-client";
+    license = licenses.mit;
+    platforms = [ "x86_64-linux" "x86_64-darwin" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cpp-ipfs-http-client/unvendor-nlohmann-json.patch b/nixpkgs/pkgs/development/libraries/cpp-ipfs-http-client/unvendor-nlohmann-json.patch
new file mode 100644
index 000000000000..e21b4e9a7a71
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cpp-ipfs-http-client/unvendor-nlohmann-json.patch
@@ -0,0 +1,27 @@
+--- source/CMakeLists.txt
++++ source/CMakeLists.txt
+@@ -56,11 +56,6 @@ target_include_directories(${IPFS_API_LIBNAME}
+ )
+ 
+ # Fetch "JSON for Modern C++"
+-include(FetchContent)
+-message(STATUS "Fetching nlohmann/JSON")
+-# Retrieve Nlohmann JSON
+-FetchContent_Declare(json URL https://github.com/nlohmann/json/releases/download/v3.10.5/json.tar.xz)
+-FetchContent_MakeAvailable(json)
+ 
+ # libcurl requires additional libs only for static Windows builds
+ if(WIN32)
+@@ -71,12 +66,11 @@ set_target_properties(${IPFS_API_LIBNAME} PROPERTIES
+   SOVERSION ${PROJECT_VERSION_MAJOR}
+   VERSION ${PROJECT_VERSION}
+ )
+-target_link_libraries(${IPFS_API_LIBNAME} ${CURL_LIBRARIES} ${WINDOWS_CURL_LIBS} nlohmann_json::nlohmann_json)
++target_link_libraries(${IPFS_API_LIBNAME} ${CURL_LIBRARIES} ${WINDOWS_CURL_LIBS})
+ if(NOT DISABLE_INSTALL)
+   install(TARGETS ${IPFS_API_LIBNAME} DESTINATION lib)
+   install(FILES include/ipfs/client.h DESTINATION include/ipfs)
+   install(FILES include/ipfs/http/transport.h DESTINATION include/ipfs/http)
+-  install(FILES ${json_SOURCE_DIR}/include/nlohmann/json.hpp DESTINATION include/nlohmann)
+ endif()
+ # Tests, use "CTEST_OUTPUT_ON_FAILURE=1 make test" to see output from failed tests
diff --git a/nixpkgs/pkgs/development/libraries/cpp-jwt/default.nix b/nixpkgs/pkgs/development/libraries/cpp-jwt/default.nix
new file mode 100644
index 000000000000..a9295629bf20
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cpp-jwt/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchFromGitHub, cmake, openssl, gtest, nlohmann_json }:
+
+stdenv.mkDerivation rec {
+  pname = "cpp-jwt";
+  version = "1.4";
+
+  src = fetchFromGitHub {
+    owner = "arun11299";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-5hVsFanTCT/uLLXrnb2kMvmL6qs9RXVkvxdWaT6m4mk=";
+  };
+
+  # fix reported version
+  patches = [ ./fix-version.patch ];
+
+  cmakeFlags = [
+    "-DCPP_JWT_USE_VENDORED_NLOHMANN_JSON=OFF"
+    "-DCPP_JWT_BUILD_EXAMPLES=OFF"
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ gtest openssl nlohmann_json ];
+
+  doCheck = true;
+
+  strictDeps = true;
+
+  meta = {
+    description = "JSON Web Token library for C++";
+    homepage = "https://github.com/arun11299/cpp-jwt";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ fpletz ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cpp-jwt/fix-version.patch b/nixpkgs/pkgs/development/libraries/cpp-jwt/fix-version.patch
new file mode 100644
index 000000000000..d04525e15464
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cpp-jwt/fix-version.patch
@@ -0,0 +1,12 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2f35431..f08eb22 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ cmake_minimum_required(VERSION 3.5.0)
+-project(cpp-jwt VERSION 1.2.0)
++project(cpp-jwt VERSION 1.4.0)
+ 
+ option(CPP_JWT_BUILD_EXAMPLES "build examples" ON)
+ option(CPP_JWT_BUILD_TESTS "build tests" ON)
+ 
\ No newline at end of file
diff --git a/nixpkgs/pkgs/development/libraries/cpp-netlib/default.nix b/nixpkgs/pkgs/development/libraries/cpp-netlib/default.nix
new file mode 100644
index 000000000000..af57944a453d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cpp-netlib/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub, cmake, boost, openssl }:
+
+stdenv.mkDerivation rec {
+  pname = "cpp-netlib";
+  version = "0.13.0-final";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = "${pname}-${version}";
+    sha256 = "18782sz7aggsl66b4mmi1i0ijwa76iww337fi9sygnplz2hs03a3";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ boost openssl ];
+
+  cmakeFlags = [
+    "-DCPP-NETLIB_BUILD_SHARED_LIBS=ON"
+    # fatal error: 'boost/asio/stream_socket_service.hpp' file not found
+    "-DCPP-NETLIB_BUILD_EXAMPLES=OFF"
+    "-DCPP-NETLIB_BUILD_TESTS=OFF"
+  ];
+
+  # Most tests make network GET requests to various websites
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Collection of open-source libraries for high level network programming";
+    homepage    = "https://cpp-netlib.org";
+    license     = licenses.boost;
+    platforms   = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cpp-utilities/default.nix b/nixpkgs/pkgs/development/libraries/cpp-utilities/default.nix
new file mode 100644
index 000000000000..54a8637ebe21
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cpp-utilities/default.nix
@@ -0,0 +1,44 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, cppunit
+, iconv
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "cpp-utilities";
+  version = "5.24.6";
+
+  src = fetchFromGitHub {
+    owner = "Martchus";
+    repo = "cpp-utilities";
+    rev = "v${finalAttrs.version}";
+    sha256 = "sha256-Lzt/lINfYvzabBbEUdNbF4Ta767WgMre2dxBkMbQnp0=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  nativeCheckInputs = [ cppunit ];
+  buildInputs = lib.optionals stdenv.isDarwin [
+    iconv # needed on Darwin, see https://github.com/Martchus/cpp-utilities/issues/4
+  ];
+
+  cmakeFlags = ["-DBUILD_SHARED_LIBS=ON"];
+
+  # Otherwise, tests fail since the resulting shared object libc++utilities.so is only available in PWD of the make files
+  preCheck = ''
+    checkFlagsArray+=(
+      "LD_LIBRARY_PATH=$PWD"
+    )
+  '';
+  # tests fail on Darwin
+  doCheck = !stdenv.isDarwin;
+
+  meta = with lib; {
+    homepage = "https://github.com/Martchus/cpp-utilities";
+    description = "Common C++ classes and routines used by @Martchus' applications featuring argument parser, IO and conversion utilities";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ doronbehar ];
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/cppcms/default.nix b/nixpkgs/pkgs/development/libraries/cppcms/default.nix
new file mode 100644
index 000000000000..718c73fd3f5f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cppcms/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl, cmake, pcre, zlib, python3, openssl }:
+
+stdenv.mkDerivation rec {
+  pname = "cppcms";
+  version = "2.0.0.beta2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/cppcms/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-aXAxx9FB/dIVxr5QkLZuIQamO7PlLwnugSDo78bAiiE=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ pcre zlib python3 openssl ];
+
+  strictDeps = true;
+
+  cmakeFlags = [
+    "--no-warn-unused-cli"
+  ];
+
+  meta = with lib; {
+    homepage = "http://cppcms.com";
+    description = "High Performance C++ Web Framework";
+    platforms = platforms.linux;
+    license = licenses.mit;
+    maintainers = [ maintainers.juliendehos ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cppcodec/default.nix b/nixpkgs/pkgs/development/libraries/cppcodec/default.nix
new file mode 100644
index 000000000000..d3ead22f6b13
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cppcodec/default.nix
@@ -0,0 +1,31 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "cppcodec";
+  version = "0.2";
+
+  src = fetchFromGitHub {
+    owner = "tplgy";
+    repo = finalAttrs.pname;
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-k4EACtDOSkTXezTeFtVdM1EVJjvGga/IQSrvDzhyaXw=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "Header-only C++11 library for encode/decode functions as in RFC 4648";
+    longDescription = ''
+      Header-only C++11 library to encode/decode base64, base64url, base32,
+      base32hex and hex (a.k.a. base16) as specified in RFC 4648, plus
+      Crockford's base32.
+    '';
+    homepage = "https://github.com/tplgy/cppcodec";
+    license = licenses.mit;
+    maintainers = with maintainers; [ panicgh raitobezarius ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/cppdb/default.nix b/nixpkgs/pkgs/development/libraries/cppdb/default.nix
new file mode 100644
index 000000000000..b71a6c073031
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cppdb/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchurl, cmake, sqlite, libmysqlclient, postgresql, unixODBC }:
+
+stdenv.mkDerivation rec {
+  pname = "cppdb";
+  version = "0.3.1";
+
+  src = fetchurl {
+      url = "mirror://sourceforge/cppcms/${pname}-${version}.tar.bz2";
+      sha256 = "0blr1casmxickic84dxzfmn3lm7wrsl4aa2abvpq93rdfddfy3nn";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ sqlite libmysqlclient postgresql unixODBC ];
+
+  cmakeFlags = [ "--no-warn-unused-cli" ];
+  env.NIX_CFLAGS_COMPILE = "-I${libmysqlclient}/include/mysql -L${libmysqlclient}/lib/mysql";
+
+  meta = with lib; {
+    homepage = "http://cppcms.com/sql/cppdb/";
+    description = "C++ Connectivity library that supports MySQL, PostgreSQL, Sqlite3 databases and generic ODBC drivers";
+    platforms = platforms.linux ;
+    license = licenses.boost;
+    maintainers = [ maintainers.juliendehos ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cpptest/default.nix b/nixpkgs/pkgs/development/libraries/cpptest/default.nix
new file mode 100644
index 000000000000..a3558e0ef493
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cpptest/default.nix
@@ -0,0 +1,19 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "cpptest";
+  version = "2.0.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/cpptest/cpptest/cpptest-${version}/cpptest-${version}.tar.gz";
+    sha256 = "0lpy3f2fjx1srh02myanlp6zfi497whlldcrnij39ghfhm0arcnm";
+  };
+
+  meta = with lib; {
+    homepage = "http://cpptest.sourceforge.net/";
+    description = "Simple C++ unit testing framework";
+    maintainers = with maintainers; [ bosu ];
+    license = lib.licenses.lgpl3;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cpptoml/default.nix b/nixpkgs/pkgs/development/libraries/cpptoml/default.nix
new file mode 100644
index 000000000000..888af1c18631
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cpptoml/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchFromGitHub, cmake, libcxxCmakeModule ? false }:
+
+stdenv.mkDerivation rec {
+  pname = "cpptoml";
+  version = "0.4.0";
+
+  src = fetchFromGitHub {
+    owner = "skystrife";
+    repo = "cpptoml";
+    rev = "fededad7169e538ca47e11a9ee9251bc361a9a65";
+    sha256 = "0zlgdlk9nsskmr8xc2ajm6mn1x5wz82ssx9w88s02icz71mcihrx";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [
+    # If this package is built with clang it will attempt to
+    # use libcxx via the Cmake find_package interface.
+    # The default libcxx stdenv in llvmPackages doesn't provide
+    # this and so will fail.
+    "-DENABLE_LIBCXX=${if libcxxCmakeModule then "ON" else "OFF"}"
+    "-DCPPTOML_BUILD_EXAMPLES=OFF"
+  ];
+
+  meta = with lib; {
+    description = "C++ TOML configuration library";
+    homepage = "https://github.com/skystrife/cpptoml";
+    license = licenses.mit;
+    maintainers = with maintainers; [ photex ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cppunit/default.nix b/nixpkgs/pkgs/development/libraries/cppunit/default.nix
new file mode 100644
index 000000000000..fba624a861d7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cppunit/default.nix
@@ -0,0 +1,22 @@
+{lib, stdenv, fetchurl}:
+
+stdenv.mkDerivation rec {
+  pname = "cppunit";
+  version = "1.15.1";
+
+  src = fetchurl {
+    url = "https://dev-www.libreoffice.org/src/${pname}-${version}.tar.gz";
+    sha256 = "19qpqzy66bq76wcyadmi3zahk5v1ll2kig1nvg96zx9padkcdic9";
+  };
+
+  # Avoid blanket -Werror to evade build failures on less
+  # tested compilers.
+  configureFlags = [ "--disable-werror" ];
+
+  meta = with lib; {
+    homepage = "https://freedesktop.org/wiki/Software/cppunit/";
+    description = "C++ unit testing framework";
+    license = licenses.lgpl21;
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cpputest/default.nix b/nixpkgs/pkgs/development/libraries/cpputest/default.nix
new file mode 100644
index 000000000000..39bed6025232
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cpputest/default.nix
@@ -0,0 +1,19 @@
+{lib, stdenv, fetchurl}:
+
+stdenv.mkDerivation rec {
+  pname = "cpputest";
+  version = "4.0";
+
+  src = fetchurl {
+    url = "https://github.com/cpputest/cpputest/releases/download/v${version}/${pname}-${version}.tar.gz";
+    sha256 = "1xslavlb1974y5xvs8n1j9zkk05dlw8imy4saasrjlmibl895ii1";
+  };
+
+  meta = with lib; {
+    homepage = "https://cpputest.github.io/";
+    description = "Unit testing and mocking framework for C/C++";
+    platforms = platforms.all;
+    license = licenses.bsd3;
+    maintainers = [ maintainers.juliendehos ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cppzmq/default.nix b/nixpkgs/pkgs/development/libraries/cppzmq/default.nix
new file mode 100644
index 000000000000..eb3f03d57e40
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cppzmq/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, cmake, zeromq }:
+
+stdenv.mkDerivation rec {
+  pname = "cppzmq";
+  version = "4.10.0";
+
+  src = fetchFromGitHub {
+    owner = "zeromq";
+    repo = "cppzmq";
+    rev = "v${version}";
+    sha256 = "sha256-HTdaV1cLbwGYuikS9EAVvAOdLmCoWlvVXlpYsUwY5IA=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  propagatedBuildInputs = [ zeromq ];
+
+  cmakeFlags = [
+    # Tests try to download googletest at compile time; there is no option
+    # to use a system one and no simple way to download it beforehand.
+    "-DCPPZMQ_BUILD_TESTS=OFF"
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/zeromq/cppzmq";
+    license = licenses.bsd2;
+    description = "C++ binding for 0MQ";
+    maintainers = with maintainers; [ abbradar ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cracklib/default.nix b/nixpkgs/pkgs/development/libraries/cracklib/default.nix
new file mode 100644
index 000000000000..4c0badf3df7c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cracklib/default.nix
@@ -0,0 +1,42 @@
+let version = "2.9.11"; in
+{ stdenv, lib, buildPackages, fetchurl, zlib, gettext
+, lists ? [ (fetchurl {
+  url = "https://github.com/cracklib/cracklib/releases/download/v${version}/cracklib-words-${version}.gz";
+  hash = "sha256-popxGjE1c517Z+nzYLM/DU7M+b1/rE0XwNXkVqkcUXo=";
+}) ]
+}:
+
+stdenv.mkDerivation rec {
+  pname = "cracklib";
+  inherit version;
+
+  src = fetchurl {
+    url = "https://github.com/${pname}/${pname}/releases/download/v${version}/${pname}-${version}.tar.bz2";
+    hash = "sha256-yosEmjwtOyIloejRXWE3mOvHSOOVA4jtomlN5Qe6YCA=";
+  };
+
+  nativeBuildInputs = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) buildPackages.cracklib;
+  buildInputs = [ zlib gettext ];
+
+  postPatch = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
+    chmod +x util/cracklib-format
+    patchShebangs util
+
+  '' + ''
+    ln -vs ${toString lists} dicts/
+  '';
+
+  postInstall = ''
+    make dict-local
+  '';
+  doInstallCheck = true;
+  installCheckTarget = "test";
+
+  meta = with lib; {
+    homepage    = "https://github.com/cracklib/cracklib";
+    description = "A library for checking the strength of passwords";
+    license = licenses.lgpl21; # Different license for the wordlist: http://www.openwall.com/wordlists
+    maintainers = with maintainers; [ lovek323 ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/crc32c/default.nix b/nixpkgs/pkgs/development/libraries/crc32c/default.nix
new file mode 100644
index 000000000000..3b27601bcbfd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/crc32c/default.nix
@@ -0,0 +1,59 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, gflags
+, staticOnly ? stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+  pname = "crc32c";
+  version = "1.1.2";
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "crc32c";
+    rev = version;
+    sha256 = "0c383p7vkfq9rblww6mqxz8sygycyl27rr0j3bzb8l8ga71710ii";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ gflags ];
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isAarch64 "-march=armv8-a+crc";
+
+  cmakeFlags = [
+    "-DCRC32C_INSTALL=1"
+    "-DCRC32C_BUILD_TESTS=1"
+    "-DCRC32C_BUILD_BENCHMARKS=0"
+    "-DCRC32C_USE_GLOG=0"
+    "-DINSTALL_GTEST=0"
+    "-DBUILD_SHARED_LIBS=${if staticOnly then "0" else "1"}"
+  ];
+
+  doCheck = false;
+  doInstallCheck = true;
+
+  installCheckPhase = ''
+    runHook preInstallCheck
+
+    ctest
+
+    runHook postInstallCheck
+  '';
+
+  postFixup = ''
+    # fix bogus include paths
+    for f in $(find $out/lib/cmake -name '*.cmake'); do
+      substituteInPlace "$f" --replace "\''${_IMPORT_PREFIX}/$out/include" "\''${_IMPORT_PREFIX}/include"
+    done
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/google/crc32c";
+    description = "CRC32C implementation with support for CPU-specific acceleration instructions";
+    license = with licenses; [ bsd3 ];
+    maintainers = with maintainers; [ cpcloud ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/crcpp/default.nix b/nixpkgs/pkgs/development/libraries/crcpp/default.nix
new file mode 100644
index 000000000000..69b1864702c9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/crcpp/default.nix
@@ -0,0 +1,30 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "crcpp";
+  version = "1.2.0.0";
+
+  src = fetchFromGitHub {
+    owner = "d-bahr";
+    repo = "CRCpp";
+    rev = "release-${version}";
+    sha256 = "sha256-OY8MF8fwr6k+ZSA/p1U+9GnTFoMSnUZxKVez+mda2tA=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/d-bahr/CRCpp";
+    changelog = "https://github.com/d-bahr/CRCpp/releases/tag/release-${version}";
+    description = "Easy to use and fast C++ CRC library";
+    platforms = platforms.all;
+    maintainers = [ maintainers.ivar ];
+    license = licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cre2/default.nix b/nixpkgs/pkgs/development/libraries/cre2/default.nix
new file mode 100644
index 000000000000..d85843a54f7c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cre2/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook,
+  libtool, pkg-config, re2, texinfo }:
+
+stdenv.mkDerivation rec {
+  pname = "cre2";
+  version = "0.3.6";
+
+  src = fetchFromGitHub {
+    owner = "marcomaggi";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1h9jwn6z8kjf4agla85b5xf7gfkdwncp0mfd8zwk98jkm8y2qx9q";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    libtool
+    pkg-config
+  ];
+  buildInputs = [ re2 texinfo ];
+
+  NIX_LDFLAGS="-lre2 -lpthread";
+
+  configureFlags = [
+    "--enable-maintainer-mode"
+  ];
+
+  meta = with lib; {
+    homepage = "http://marcomaggi.github.io/docs/cre2.html";
+    description = "C Wrapper for RE2";
+    license = licenses.bsd3;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/criterion/default.nix b/nixpkgs/pkgs/development/libraries/criterion/default.nix
new file mode 100644
index 000000000000..9b3304f6012f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/criterion/default.nix
@@ -0,0 +1,50 @@
+{ lib, stdenv, fetchFromGitHub, boxfort, meson, libcsptr, pkg-config, gettext
+, cmake, ninja, protobuf, libffi, libgit2, dyncall, nanomsg, nanopbMalloc
+, python3Packages }:
+
+stdenv.mkDerivation rec {
+  pname = "criterion";
+  version = "2.4.1";
+
+  src = fetchFromGitHub {
+    owner = "Snaipe";
+    repo = "Criterion";
+    rev = "v${version}";
+    sha256 = "KT1XvhT9t07/ubsqzrVUp4iKcpVc1Z+saGF4pm2RsgQ=";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ meson ninja cmake pkg-config protobuf ];
+
+  buildInputs = [
+    boxfort.dev
+    dyncall
+    gettext
+    libcsptr
+    nanomsg
+    nanopbMalloc
+    libgit2
+    libffi
+  ];
+
+  nativeCheckInputs = with python3Packages; [ cram ];
+
+  doCheck = true;
+
+  postPatch = ''
+    patchShebangs ci/isdir.py src/protocol/gen-pb.py
+  '';
+
+  outputs = [ "dev" "out" ];
+
+  meta = with lib; {
+    description = "A cross-platform C and C++ unit testing framework for the 21th century";
+    homepage = "https://github.com/Snaipe/Criterion";
+    license = licenses.mit;
+    maintainers = with maintainers; [
+      thesola10
+      Yumasi
+    ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/croaring/default.nix b/nixpkgs/pkgs/development/libraries/croaring/default.nix
new file mode 100644
index 000000000000..5c1afcbf1365
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/croaring/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "croaring";
+  version = "0.2.61";
+
+  src = fetchFromGitHub {
+    owner = "RoaringBitmap";
+    repo = "CRoaring";
+    rev = "v${version}";
+    sha256 = "14y8iwv6b6gg7hgs00yqg8rwx4vwbb1zs2s99lxa51zx9vp1alcn";
+  };
+
+  patches = fetchpatch {
+    url = "https://github.com/RoaringBitmap/CRoaring/commit/8d8c60736f506b2b8f1c365148a8a541b26a55f2.patch";
+    sha256 = "1y2mbn4i8lj3lkn5s8zziyr9pl1fq9hndzz9c01dkv3s8sn7f55s";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "Compressed bitset library for C and C++";
+    homepage = "http://roaringbitmap.org/";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ orivej ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/crocoddyl/default.nix b/nixpkgs/pkgs/development/libraries/crocoddyl/default.nix
new file mode 100644
index 000000000000..efba13612298
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/crocoddyl/default.nix
@@ -0,0 +1,65 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, example-robot-data
+, pinocchio
+, pythonSupport ? false
+, python3Packages
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "crocoddyl";
+  version = "2.0.2";
+
+  src = fetchFromGitHub {
+    owner = "loco-3d";
+    repo = finalAttrs.pname;
+    rev = "v${finalAttrs.version}";
+    fetchSubmodules = true;
+    hash = "sha256-MsAXHfxLNlIK/PbtVTjvBN1Jk3dyGEkfpj3/98nExj4=";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  propagatedBuildInputs = lib.optionals (!pythonSupport) [
+    example-robot-data
+    pinocchio
+  ] ++ lib.optionals pythonSupport [
+    python3Packages.example-robot-data
+    python3Packages.pinocchio
+  ];
+
+  cmakeFlags = lib.optionals (!pythonSupport) [
+    "-DBUILD_EXAMPLES=OFF"
+    "-DBUILD_PYTHON_INTERFACE=OFF"
+  ];
+
+  prePatch = ''
+    substituteInPlace \
+      examples/CMakeLists.txt \
+      examples/log/check_logfiles.sh \
+      --replace /bin/bash ${stdenv.shell}
+  '';
+
+  doCheck = true;
+  pythonImportsCheck = [
+    "crocoddyl"
+  ];
+  checkInputs = lib.optionals (pythonSupport) [
+    python3Packages.scipy
+  ];
+
+  meta = with lib; {
+    description = "Crocoddyl optimal control library";
+    homepage = "https://github.com/loco-3d/crocoddyl";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ nim65s wegank ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/crossguid/default.nix b/nixpkgs/pkgs/development/libraries/crossguid/default.nix
new file mode 100644
index 000000000000..e8d85ec23dd5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/crossguid/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, libuuid, unstableGitUpdater }:
+
+stdenv.mkDerivation rec {
+  pname = "crossguid";
+  version = "unstable-2019-05-29";
+
+  src = fetchFromGitHub {
+    owner = "graeme-hill";
+    repo = pname;
+    rev = "ca1bf4b810e2d188d04cb6286f957008ee1b7681";
+    hash = "sha256-37tKPDo4lukl/aaDWWSQYfsBNEnDjE7t6OnEZjBhcvQ=";
+  };
+
+  patches = [
+    # Fix the build against gcc-13:
+    #   https://github.com/graeme-hill/crossguid/pull/67
+    (fetchpatch {
+      name = "gcc-13.patch";
+      url = "https://github.com/graeme-hill/crossguid/commit/1eb9bea38c320b2b588635cffceaaa2a8d434780.patch";
+      hash = "sha256-0qKZUeuNfc3gt+aFeaTt+IexO391GCdjS+9PVJmBKV4=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = lib.optional stdenv.isLinux libuuid;
+
+  passthru.updateScript = unstableGitUpdater { };
+
+  meta = with lib; {
+    description = "Lightweight cross platform C++ GUID/UUID library";
+    license = licenses.mit;
+    homepage = "https://github.com/graeme-hill/crossguid";
+    maintainers = with maintainers; [ lilyinstarlight ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/crypto++/default.nix b/nixpkgs/pkgs/development/libraries/crypto++/default.nix
new file mode 100644
index 000000000000..5030a185886d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/crypto++/default.nix
@@ -0,0 +1,64 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, enableStatic ? stdenv.hostPlatform.isStatic
+, enableShared ? !enableStatic
+# Multi-threading with OpenMP is disabled by default
+# more info on https://www.cryptopp.com/wiki/OpenMP
+, withOpenMP ? false
+, llvmPackages
+}:
+
+stdenv.mkDerivation rec {
+  pname = "crypto++";
+  version = "8.9.0";
+  underscoredVersion = lib.strings.replaceStrings ["."] ["_"] version;
+
+  src = fetchFromGitHub {
+    owner = "weidai11";
+    repo = "cryptopp";
+    rev = "CRYPTOPP_${underscoredVersion}";
+    hash = "sha256-HV+afSFkiXdy840JbHBTR8lLL0GMwsN3QdwaoQmicpQ=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  postPatch = ''
+    substituteInPlace GNUmakefile \
+      --replace "AR = /usr/bin/libtool" "AR = ar" \
+      --replace "ARFLAGS = -static -o" "ARFLAGS = -cru"
+  '';
+
+  buildInputs = lib.optionals (stdenv.cc.isClang && withOpenMP) [ llvmPackages.openmp ];
+
+  makeFlags = [ "PREFIX=${placeholder "out"}" ];
+
+  buildFlags =
+       lib.optional enableStatic "static"
+    ++ lib.optional enableShared "shared"
+    ++ [ "libcryptopp.pc" ];
+
+  enableParallelBuilding = true;
+  hardeningDisable = [ "fortify" ];
+  CXXFLAGS = lib.optionals (withOpenMP) [ "-fopenmp" ];
+
+  doCheck = true;
+
+  # always built for checks but install static lib only when necessary
+  preInstall = lib.optionalString (!enableStatic) "rm -f libcryptopp.a";
+
+  installTargets = [ "install-lib" ];
+  installFlags = [ "LDCONF=true" ];
+
+  meta = with lib; {
+    description = "A free C++ class library of cryptographic schemes";
+    homepage = "https://cryptopp.com/";
+    changelog = [
+      "https://raw.githubusercontent.com/weidai11/cryptopp/CRYPTOPP_${underscoredVersion}/History.txt"
+      "https://github.com/weidai11/cryptopp/releases/tag/CRYPTOPP_${underscoredVersion}"
+    ];
+    license = with licenses; [ boost publicDomain ];
+    platforms = platforms.all;
+    maintainers = with maintainers; [ c0bw3b ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/csfml/default.nix b/nixpkgs/pkgs/development/libraries/csfml/default.nix
new file mode 100644
index 000000000000..397d5186a1c4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/csfml/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, cmake, sfml }:
+
+stdenv.mkDerivation rec {
+  pname = "csfml";
+  version = "2.5.2";
+  src = fetchFromGitHub {
+    owner = "SFML";
+    repo  = "CSFML";
+    rev   = version;
+    sha256 = "sha256-A5C/4SnxUX7mW1wkPWJWX3dwMhrJ79DkBuZ7UYzTOqE=";
+  };
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ sfml ];
+  cmakeFlags = [ "-DCMAKE_MODULE_PATH=${sfml}/share/SFML/cmake/Modules/" ];
+
+  meta = with lib; {
+    homepage = "https://www.sfml-dev.org/";
+    description = "Simple and fast multimedia library";
+    longDescription = ''
+      SFML is a simple, fast, cross-platform and object-oriented multimedia API.
+      It provides access to windowing, graphics, audio and network.
+      It is written in C++, and has bindings for various languages such as C, .Net, Ruby, Python.
+    '';
+    license = licenses.zlib;
+    maintainers = [ maintainers.jpdoyle ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ctpl/default.nix b/nixpkgs/pkgs/development/libraries/ctpl/default.nix
new file mode 100644
index 000000000000..634c2cf44cf4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ctpl/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchurl, pkg-config, glib }:
+
+stdenv.mkDerivation rec {
+  pname = "ctpl";
+  version = "0.3.4";
+
+  src = fetchurl {
+    url = "https://download.tuxfamily.org/ctpl/releases/ctpl-${version}.tar.gz";
+    sha256 = "1yr92xv9n6kgyixwg9ps4zb404ic5pgb171k4bi3mv9p6k8gv59s";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ glib ];
+
+  meta = with lib; {
+    homepage = "http://ctpl.tuxfamily.org/";
+    description = "Template engine library written in C";
+    platforms = platforms.linux;
+    maintainers = [ ];
+    license = licenses.gpl3Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ctpp2/default.nix b/nixpkgs/pkgs/development/libraries/ctpp2/default.nix
new file mode 100644
index 000000000000..5aac0850a74d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ctpp2/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchurl, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "ctpp2";
+  version = "2.8.3";
+
+  src = fetchurl {
+    url = "https://ctpp.havoc.ru/download/${pname}-${version}.tar.gz";
+    sha256 = "1z22zfw9lb86z4hcan9hlvji49c9b7vznh7gjm95gnvsh43zsgx8";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  patchPhase = ''
+    # include <unistd.h> to fix undefined getcwd
+    sed -ie 's/<stdlib.h>/<stdlib.h>\n#include <unistd.h>/' src/CTPP2FileSourceLoader.cpp
+  '';
+
+  cmakeFlags = [
+    # RPATH of binary /nix/store/.../bin/ctpp2json contains a forbidden reference to /build/
+    "-DCMAKE_SKIP_BUILD_RPATH=ON"
+  ];
+
+  doCheck = false; # fails
+
+  meta = with lib; {
+    description = "A high performance templating engine";
+    homepage = "https://ctpp.havoc.ru/";
+    maintainers = [ maintainers.robbinch ];
+    platforms = platforms.linux;
+    license = licenses.bsd2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ctranslate2/default.nix b/nixpkgs/pkgs/development/libraries/ctranslate2/default.nix
new file mode 100644
index 000000000000..e8e67c3ad437
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ctranslate2/default.nix
@@ -0,0 +1,95 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, darwin # Accelerate
+, llvmPackages # openmp
+, withMkl ? false, mkl
+, withCUDA ? false
+, withCuDNN ? false
+, cudaPackages
+# Enabling both withOneDNN and withOpenblas is broken
+# https://github.com/OpenNMT/CTranslate2/issues/1294
+, withOneDNN ? false, oneDNN
+, withOpenblas ? true, openblas
+, withRuy ? true
+
+# passthru tests
+, libretranslate
+, wyoming-faster-whisper
+}:
+
+let
+  cmakeBool = b: if b then "ON" else "OFF";
+in
+stdenv.mkDerivation rec {
+  pname = "ctranslate2";
+  version = "3.24.0";
+
+  src = fetchFromGitHub {
+    owner = "OpenNMT";
+    repo = "CTranslate2";
+    rev = "v${version}";
+    hash = "sha256-RK5GQymtaYOM6HK2eRK5Rbz6NZva3Jt7lTPTUbSQXxI=";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ] ++ lib.optionals withCUDA [
+    cudaPackages.cuda_nvcc
+  ];
+
+  cmakeFlags = [
+    # https://opennmt.net/CTranslate2/installation.html#build-options
+    # https://github.com/OpenNMT/CTranslate2/blob/54810350e662ebdb01ecbf8e4a746f02aeff1dd7/python/tools/prepare_build_environment_linux.sh#L53
+    # https://github.com/OpenNMT/CTranslate2/blob/59d223abcc7e636c1c2956e62482bc3299cc7766/python/tools/prepare_build_environment_macos.sh#L12
+    "-DOPENMP_RUNTIME=COMP"
+    "-DWITH_CUDA=${cmakeBool withCUDA}"
+    "-DWITH_CUDNN=${cmakeBool withCuDNN}"
+    "-DWITH_DNNL=${cmakeBool withOneDNN}"
+    "-DWITH_OPENBLAS=${cmakeBool withOpenblas}"
+    "-DWITH_RUY=${cmakeBool withRuy}"
+    "-DWITH_MKL=${cmakeBool withMkl}"
+  ]
+  ++ lib.optional stdenv.isDarwin "-DWITH_ACCELERATE=ON";
+
+  buildInputs = lib.optionals withMkl [
+    mkl
+  ] ++ lib.optionals withCUDA [
+    cudaPackages.cuda_cccl # <nv/target> required by the fp16 headers in cudart
+    cudaPackages.cuda_cudart
+    cudaPackages.libcublas
+    cudaPackages.libcurand
+  ] ++ lib.optionals (withCUDA && withCuDNN) [
+    cudaPackages.cudnn
+  ] ++ lib.optionals withOneDNN [
+    oneDNN
+  ] ++ lib.optionals withOpenblas [
+    openblas
+  ] ++ lib.optionals stdenv.isDarwin [
+    llvmPackages.openmp
+    darwin.apple_sdk.frameworks.Accelerate
+  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
+    darwin.apple_sdk.frameworks.CoreGraphics
+    darwin.apple_sdk.frameworks.CoreVideo
+  ];
+
+  passthru.tests = {
+    inherit
+      libretranslate
+      wyoming-faster-whisper
+    ;
+  };
+
+  meta = with lib; {
+    description = "Fast inference engine for Transformer models";
+    homepage = "https://github.com/OpenNMT/CTranslate2";
+    changelog = "https://github.com/OpenNMT/CTranslate2/blob/${src.rev}/CHANGELOG.md";
+    license = licenses.mit;
+    maintainers = with maintainers; [ hexa misuzu ];
+    broken =
+      (lib.versionOlder cudaPackages.cudaVersion "11.4")
+      || !(withCuDNN -> withCUDA);
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ctre/default.nix b/nixpkgs/pkgs/development/libraries/ctre/default.nix
new file mode 100644
index 000000000000..0c7ef3796125
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ctre/default.nix
@@ -0,0 +1,38 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ctre";
+  version = "3.8.1";
+
+  src = fetchFromGitHub {
+    owner = "hanickadot";
+    repo = "compile-time-regular-expressions";
+    rev = "v${version}";
+    hash = "sha256-EzAPIqdfktrZ+FTEzz52nRNnH7CG59ZE9Ww7qMkAAbY=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  postPatch = ''
+    substituteInPlace packaging/pkgconfig.pc.in \
+      --replace "\''${prefix}/" ""
+  '';
+
+  dontBuild = true;
+
+  meta = with lib; {
+    description = "Fast compile-time regular expressions library";
+    longDescription = ''
+      Fast compile-time regular expressions with support for
+      matching/searching/capturing during compile-time or runtime.
+    '';
+    license = licenses.asl20;
+    homepage = "https://compile-time.re";
+    maintainers = with maintainers; [ azahi ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ctypes_sh/default.nix b/nixpkgs/pkgs/development/libraries/ctypes_sh/default.nix
new file mode 100644
index 000000000000..644c68e85d86
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ctypes_sh/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv
+, fetchFromGitHub
+, autoreconfHook, pkg-config
+, zlib, libffi, elfutils, libdwarf
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ctypes.sh";
+  version = "1.2";
+
+  src = fetchFromGitHub {
+    owner = "taviso";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1wafyfhwd7nf7xdici0djpwgykizaz7jlarn0r1b4spnpjx1zbx4";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ zlib libffi elfutils libdwarf ];
+
+  meta = with lib; {
+    description = "A foreign function interface for bash";
+    homepage = "https://github.com/taviso/ctypes.sh";
+    license = licenses.mit;
+    maintainers = with maintainers; [ tadeokondrak ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cudd/cudd.patch b/nixpkgs/pkgs/development/libraries/cudd/cudd.patch
new file mode 100644
index 000000000000..152fa30997f9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cudd/cudd.patch
@@ -0,0 +1,14 @@
+diff --git a/Makefile.am b/Makefile.am
+index 45f216a..39c3c82 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -3,6 +3,9 @@ ACLOCAL_AMFLAGS = -I m4
+ include_HEADERS = cudd/cudd.h
+ if DDDMP
+ include_HEADERS += dddmp/dddmp.h
++include_HEADERS += util/util.h
++include_HEADERS += config.h
++include_HEADERS += mtr/mtr.h
+ endif
+ if OBJ
+ include_HEADERS += cplusplus/cuddObj.hh
diff --git a/nixpkgs/pkgs/development/libraries/cudd/default.nix b/nixpkgs/pkgs/development/libraries/cudd/default.nix
new file mode 100644
index 000000000000..4e8cf59fbffd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cudd/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "cudd";
+  version = "3.0.0";
+
+  src = fetchurl {
+    url = "https://davidkebo.com/source/cudd_versions/cudd-3.0.0.tar.gz";
+    sha256 = "0sgbgv7ljfr0lwwwrb9wsnav7mw7jmr3k8mygwza15icass6dsdq";
+  };
+
+  configureFlags = [
+    "--enable-dddmp"
+    "--enable-obj"
+  ];
+
+  patches = [
+    ./cudd.patch
+  ];
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  meta = with lib; {
+    homepage = "https://davidkebo.com/cudd";
+    description = "Binary Decision Diagram (BDD) library";
+    license = licenses.bsd3;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ chessai ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/curlpp/default.nix b/nixpkgs/pkgs/development/libraries/curlpp/default.nix
new file mode 100644
index 000000000000..0aee75751d9e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/curlpp/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchFromGitHub, cmake, curl }:
+
+stdenv.mkDerivation rec {
+  pname = "curlpp";
+  version = "0.8.1";
+  src = fetchFromGitHub {
+    owner = "jpbarrette";
+    repo = "curlpp";
+    rev = "v${version}";
+    sha256 = "1b0ylnnrhdax4kwjq64r1fk0i24n5ss6zfzf4hxwgslny01xiwrk";
+  };
+
+  buildInputs = [ curl ];
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    homepage = "https://www.curlpp.org/";
+    description = "C++ wrapper around libcURL";
+    license = licenses.mit;
+    maintainers = with maintainers; [ CrazedProgrammer ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cutee/default.nix b/nixpkgs/pkgs/development/libraries/cutee/default.nix
new file mode 100644
index 000000000000..07e2b7cbcee2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cutee/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "cutee";
+  version = "0.4.2";
+
+  src = fetchurl {
+    url    = "http://www.codesink.org/download/${pname}-${version}.tar.gz";
+    sha256 = "18bzvhzx8k24mpcim5669n3wg9hd0sfsxj8zjpbr24hywrlppgc2";
+  };
+
+  buildFlags = [ "cutee" ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp cutee $out/bin
+  '';
+
+  meta = with lib; {
+    description = "C++ Unit Testing Easy Environment";
+    homepage    = "https://www.codesink.org/cutee_unit_testing.html";
+    license     = licenses.gpl2Plus;
+    maintainers = with maintainers; [ leenaars];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cwiid/default.nix b/nixpkgs/pkgs/development/libraries/cwiid/default.nix
new file mode 100644
index 000000000000..d8c472870c43
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cwiid/default.nix
@@ -0,0 +1,61 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, bison
+, flex
+, bluez
+, pkg-config
+, gtk2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "cwiid";
+  version = "unstable-2010-02-21";
+
+  src = fetchFromGitHub {
+    owner = "abstrakraft";
+    repo = "cwiid";
+    rev = "fadf11e89b579bcc0336a0692ac15c93785f3f82";
+    sha256 = "0qdb0x757k76nfj32xc2nrrdqd9jlwgg63vfn02l2iznnzahxp0h";
+  };
+
+  hardeningDisable = [ "format" ];
+
+  configureFlags = [ "--without-python" ];
+
+  prePatch = ''
+    sed -i -e '/$(LDCONFIG)/d' common/include/lib.mak.in
+  '';
+
+  patches = [
+    ./fix-ar.diff
+  ];
+
+  buildInputs = [
+    bluez
+    gtk2
+  ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+    bison
+    flex
+  ];
+
+  NIX_LDFLAGS = "-lbluetooth";
+
+  postInstall = ''
+    # Some programs (for example, cabal-install) have problems with the double 0
+    sed -i -e "s/0.6.00/0.6.0/" $out/lib/pkgconfig/cwiid.pc
+  '';
+
+  meta = with lib; {
+    description = "Linux Nintendo Wiimote interface";
+    homepage = "http://cwiid.org";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ bennofs ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cwiid/fix-ar.diff b/nixpkgs/pkgs/development/libraries/cwiid/fix-ar.diff
new file mode 100644
index 000000000000..8ca4b885a0a3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cwiid/fix-ar.diff
@@ -0,0 +1,26 @@
+diff --git a/common/include/lib.mak.in b/common/include/lib.mak.in
+index 3afbb14..b8df9d9 100644
+--- a/common/include/lib.mak.in
++++ b/common/include/lib.mak.in
+@@ -22,7 +22,7 @@ static: $(STATIC_LIB)
+ shared: $(SHARED_LIB)
+ 
+ $(STATIC_LIB): $(OBJECTS)
+-	ar rcs $(STATIC_LIB) $(OBJECTS)
++	$(AR) rcs $(STATIC_LIB) $(OBJECTS)
+ 
+ $(SHARED_LIB): $(OBJECTS)
+ 	$(CC) -shared -Wl,-soname,$(SO_NAME) $(LDFLAGS) -o $(SHARED_LIB) \
+diff --git a/configure.ac b/configure.ac
+index 82ca3e1..0a78283 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -15,6 +15,8 @@ if test "$YACC" != "bison -y"; then
+ 	AC_MSG_ERROR([bison not found])
+ fi
+ 
++AC_CHECK_TOOL([AR], [ar], [:])
++
+ AC_ARG_WITH(
+ 	[python],
+ 	[AS_HELP_STRING([--without-python],[compile without python support])],
diff --git a/nixpkgs/pkgs/development/libraries/cxx-prettyprint/default.nix b/nixpkgs/pkgs/development/libraries/cxx-prettyprint/default.nix
new file mode 100644
index 000000000000..f632fca714cf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cxx-prettyprint/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "cxx-prettyprint-unstable";
+  version = "2016-04-30";
+  rev = "9ab26d228f2960f50b38ad37fe0159b7381f7533";
+
+  src = fetchFromGitHub {
+    owner = "louisdx";
+    repo = "cxx-prettyprint";
+    inherit rev;
+    sha256 = "1bp25yw8fb0mi432f72ihfxfj887gi36b36fpv677gawm786l7p1";
+  };
+
+  installPhase = ''
+    mkdir -p "$out/include"
+    cp prettyprint.hpp "$out/include"
+  '';
+
+  meta = with lib; {
+    description    = "Header only C++ library for pretty printing standard containers";
+    homepage       = "https://github.com/louisdx/cxx-prettyprint";
+    license        = lib.licenses.boost;
+    platforms      = platforms.all;
+
+    # This is a header-only library, no point in hydra building it:
+    hydraPlatforms = [];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cxx-rs/Cargo.lock b/nixpkgs/pkgs/development/libraries/cxx-rs/Cargo.lock
new file mode 100644
index 000000000000..157563e60f94
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cxx-rs/Cargo.lock
@@ -0,0 +1,427 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "adler"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "cc"
+version = "1.0.78"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d"
+dependencies = [
+ "jobserver",
+]
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "clang-ast"
+version = "0.1.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "52a6edb6daf3175c637a7c78e46cde7729af8d07d43f36935680a88fd55c0f1c"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "clap"
+version = "4.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa91278560fc226a5d9d736cc21e485ff9aad47d26b8ffe1f54cba868b684b9f"
+dependencies = [
+ "bitflags",
+ "clap_lex",
+ "strsim",
+]
+
+[[package]]
+name = "clap_lex"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "783fe232adfca04f90f56201b26d79682d4cd2625e0bc7290b95123afe558ade"
+dependencies = [
+ "os_str_bytes",
+]
+
+[[package]]
+name = "codespan-reporting"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e"
+dependencies = [
+ "termcolor",
+ "unicode-width",
+]
+
+[[package]]
+name = "crc32fast"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "cxx"
+version = "1.0.94"
+dependencies = [
+ "cc",
+ "cxx-build",
+ "cxx-gen",
+ "cxx-test-suite",
+ "cxxbridge-flags",
+ "cxxbridge-macro",
+ "link-cplusplus",
+ "rustversion",
+ "trybuild",
+]
+
+[[package]]
+name = "cxx-build"
+version = "1.0.94"
+dependencies = [
+ "cc",
+ "codespan-reporting",
+ "cxx",
+ "cxx-gen",
+ "once_cell",
+ "pkg-config",
+ "proc-macro2",
+ "quote",
+ "scratch",
+ "syn 2.0.15",
+]
+
+[[package]]
+name = "cxx-gen"
+version = "0.7.94"
+dependencies = [
+ "codespan-reporting",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.15",
+]
+
+[[package]]
+name = "cxx-test-suite"
+version = "0.0.0"
+dependencies = [
+ "cxx",
+ "cxx-build",
+ "cxxbridge-flags",
+]
+
+[[package]]
+name = "cxxbridge-cmd"
+version = "1.0.94"
+dependencies = [
+ "clap",
+ "codespan-reporting",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.15",
+]
+
+[[package]]
+name = "cxxbridge-flags"
+version = "1.0.94"
+
+[[package]]
+name = "cxxbridge-macro"
+version = "1.0.94"
+dependencies = [
+ "clang-ast",
+ "cxx",
+ "flate2",
+ "memmap",
+ "proc-macro2",
+ "quote",
+ "serde",
+ "serde_json",
+ "syn 2.0.15",
+]
+
+[[package]]
+name = "demo"
+version = "0.0.0"
+dependencies = [
+ "cxx",
+ "cxx-build",
+]
+
+[[package]]
+name = "dissimilar"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd5f0c7e4bd266b8ab2550e6238d2e74977c23c15536ac7be45e9c95e2e3fbbb"
+
+[[package]]
+name = "flate2"
+version = "1.0.25"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841"
+dependencies = [
+ "crc32fast",
+ "miniz_oxide",
+]
+
+[[package]]
+name = "glob"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
+
+[[package]]
+name = "itoa"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440"
+
+[[package]]
+name = "jobserver"
+version = "0.1.25"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "libc"
+version = "0.2.139"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79"
+
+[[package]]
+name = "link-cplusplus"
+version = "1.0.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "memmap"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b"
+dependencies = [
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "miniz_oxide"
+version = "0.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa"
+dependencies = [
+ "adler",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.17.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66"
+
+[[package]]
+name = "os_str_bytes"
+version = "6.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee"
+
+[[package]]
+name = "pkg-config"
+version = "0.3.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160"
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.56"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "rustversion"
+version = "1.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70"
+
+[[package]]
+name = "ryu"
+version = "1.0.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde"
+
+[[package]]
+name = "scratch"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2"
+
+[[package]]
+name = "serde"
+version = "1.0.152"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.152"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.107",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.91"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883"
+dependencies = [
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "strsim"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
+
+[[package]]
+name = "syn"
+version = "1.0.107"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "syn"
+version = "2.0.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "termcolor"
+version = "1.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "toml"
+version = "0.5.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "trybuild"
+version = "1.0.75"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1212c215a87a183687a7cc7065901b1a98da6b37277d51a1b5faedbb4efd4f3"
+dependencies = [
+ "dissimilar",
+ "glob",
+ "once_cell",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "termcolor",
+ "toml",
+]
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc"
+
+[[package]]
+name = "unicode-width"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-util"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
diff --git a/nixpkgs/pkgs/development/libraries/cxx-rs/default.nix b/nixpkgs/pkgs/development/libraries/cxx-rs/default.nix
new file mode 100644
index 000000000000..c06171e72ce5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cxx-rs/default.nix
@@ -0,0 +1,54 @@
+{ cxx-rs, fetchFromGitHub, lib, rustPlatform, testers }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "cxx-rs";
+  version = "1.0.94";
+
+  src = fetchFromGitHub {
+    owner = "dtolnay";
+    repo = "cxx";
+    rev = version;
+    sha256 = "sha256-h6TmQyxhoOhaAWBZr9rRPCf0BE2QMBIYm5uTVKD2paE=";
+  };
+
+  cargoLock = {
+    lockFile = ./Cargo.lock;
+  };
+
+  postPatch = ''
+    cp ${./Cargo.lock} Cargo.lock
+  '';
+
+  cargoBuildFlags = [
+    "--workspace"
+    "--exclude=demo"
+  ];
+
+  postBuild = ''
+    cargo doc --release
+  '';
+
+  cargoTestFlags = [ "--workspace" ];
+
+  outputs = [ "out" "doc" "dev" ];
+
+  postInstall = ''
+    mkdir -p $doc
+    cp -r ./target/doc/* $doc
+
+    mkdir -p $dev/include/rust
+    install -D -m 0644 ./include/cxx.h $dev/include/rust
+  '';
+
+  passthru.tests.version = testers.testVersion {
+    package = cxx-rs;
+    command = "cxxbridge --version";
+  };
+
+  meta = with lib; {
+    description = "Safe FFI between Rust and C++";
+    homepage = "https://github.com/dtolnay/cxx";
+    license = licenses.mit;
+    maintainers = with maintainers; [ centromere ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cxxopts/default.nix b/nixpkgs/pkgs/development/libraries/cxxopts/default.nix
new file mode 100644
index 000000000000..f587cf33308d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cxxopts/default.nix
@@ -0,0 +1,44 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, icu
+, pkg-config
+, enableUnicodeHelp ? true
+}:
+
+stdenv.mkDerivation rec {
+  pname = "cxxopts";
+  version = "3.2.0";
+
+  src = fetchFromGitHub {
+    owner = "jarro2783";
+    repo = "cxxopts";
+    rev = "v${version}";
+    sha256 = "sha256-tOO0YCIG3MxSJZhurNcDR1pWIUEO/Har9mrCrZs3iVk=";
+  };
+
+  buildInputs = lib.optionals enableUnicodeHelp [ icu.dev ];
+  cmakeFlags = [ "-DCXXOPTS_BUILD_EXAMPLES=OFF" ]
+    ++ lib.optional enableUnicodeHelp "-DCXXOPTS_USE_UNICODE_HELP=TRUE";
+  nativeBuildInputs = [ cmake ] ++ lib.optionals enableUnicodeHelp [ pkg-config ];
+
+  doCheck = true;
+
+  # Conflict on case-insensitive filesystems.
+  dontUseCmakeBuildDir = true;
+
+  # https://github.com/jarro2783/cxxopts/issues/332
+  postPatch = ''
+    substituteInPlace packaging/pkgconfig.pc.in \
+      --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/jarro2783/cxxopts";
+    description = "Lightweight C++ GNU-style option parser library";
+    license = licenses.mit;
+    maintainers = [ maintainers.spease ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cxxtest/default.nix b/nixpkgs/pkgs/development/libraries/cxxtest/default.nix
new file mode 100644
index 000000000000..4228a3cb5876
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cxxtest/default.nix
@@ -0,0 +1,47 @@
+{ lib, python3Packages, fetchFromGitHub }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "cxxtest";
+  version = "4.4";
+
+  src = fetchFromGitHub {
+    owner = "CxxTest";
+    repo = pname;
+    rev = version;
+    sha256 = "19w92kipfhp5wvs47l0qpibn3x49sbmvkk91yxw6nwk6fafcdl17";
+  };
+
+  sourceRoot = "${src.name}/python";
+
+  nativeCheckInputs = [ python3Packages.ply ];
+
+  preCheck = ''
+    cd ../
+  '';
+
+  postCheck = ''
+    cd python3
+    python scripts/cxxtestgen --error-printer -o build/GoodSuite.cpp ../../test/GoodSuite.h
+    $CXX -I../../ -o build/GoodSuite build/GoodSuite.cpp
+    build/GoodSuite
+  '';
+
+  preInstall = ''
+    cd python3
+  '';
+
+  postInstall = ''
+    mkdir -p "$out/include"
+    cp -r ../../cxxtest "$out/include"
+  '';
+
+  dontWrapPythonPrograms = true;
+
+  meta = with lib; {
+    homepage = "http://cxxtest.com";
+    description = "Unit testing framework for C++";
+    license = licenses.lgpl3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ juliendehos ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cxxtools/default.nix b/nixpkgs/pkgs/development/libraries/cxxtools/default.nix
new file mode 100644
index 000000000000..8682c8ba8196
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cxxtools/default.nix
@@ -0,0 +1,54 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, tzdata
+, autoreconfHook
+, openssl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "cxxtools";
+  version = "3.0";
+
+  src = fetchFromGitHub {
+    owner = "maekitalo";
+    repo = "cxxtools";
+    rev = "V${version}";
+    hash = "sha256-AiMVmtvI20nyv/nuHHxGH4xFnlc9AagVkKlnRlaYCPM=";
+  };
+
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/maekitalo/cxxtools/commit/b773c01fc13d2ae67abc0839888e383be23562fd.patch";
+      hash = "sha256-9yRkD+vMRhc4n/Xh6SKtmllBrmfDx3IBVOtHQV6s7Tw=";
+    })
+    (fetchpatch {
+      url = "https://github.com/maekitalo/cxxtools/commit/6e1439a108ce3892428e95f341f2d23ae32a590e.patch";
+      hash = "sha256-ZnlbdWBjL9lEtNLEF/ZPa0IzvJ7i4xWI4GbY8KeA6A4=";
+    })
+  ];
+
+  postPatch = ''
+    substituteInPlace src/tz.cpp \
+      --replace '::getenv("TZDIR")' '"${tzdata}/share/zoneinfo"'
+  '';
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  buildInputs = [
+    openssl
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = {
+    homepage = "http://www.tntnet.org/cxxtools.html";
+    description = "Comprehensive C++ class library for Unix and Linux";
+    platforms = lib.platforms.linux;
+    license = lib.licenses.lgpl21;
+    maintainers = [ lib.maintainers.juliendehos ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cyclonedds/0001-Use-full-path-in-pkgconfig.patch b/nixpkgs/pkgs/development/libraries/cyclonedds/0001-Use-full-path-in-pkgconfig.patch
new file mode 100644
index 000000000000..5d41552df37c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cyclonedds/0001-Use-full-path-in-pkgconfig.patch
@@ -0,0 +1,26 @@
+From 4534f88f676d9a07a227aed7b56255dd84d2b906 Mon Sep 17 00:00:00 2001
+From: Pascal Bach <pascal.bach@nextrem.ch>
+Date: Mon, 3 Oct 2022 22:57:34 +0200
+Subject: [PATCH] Use full path in pkgconfig
+
+Signed-off-by: Pascal Bach <pascal.bach@nextrem.ch>
+---
+ PkgConfig.pc.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/PkgConfig.pc.in b/PkgConfig.pc.in
+index 381e2343..93860ff0 100644
+--- a/PkgConfig.pc.in
++++ b/PkgConfig.pc.in
+@@ -1,6 +1,6 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+-includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+-libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
++libdir=@CMAKE_INSTALL_FULL_LIBDIR@
+ 
+ Name: @PROJECT_NAME@
+ Description: Eclipse Cyclone DDS library
+-- 
+2.37.3
+
diff --git a/nixpkgs/pkgs/development/libraries/cyclonedds/default.nix b/nixpkgs/pkgs/development/libraries/cyclonedds/default.nix
new file mode 100644
index 000000000000..899249150b31
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cyclonedds/default.nix
@@ -0,0 +1,30 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "cyclonedds";
+  version = "0.10.4";
+
+  src = fetchFromGitHub {
+    owner = "eclipse-cyclonedds";
+    repo = "cyclonedds";
+    rev = version;
+    sha256 = "sha256-LSCfQPyd/QOsrnLNbKb0OlCvmHi/2aDDhi8VeXpYb1w=";
+  };
+
+  patches = [
+    ./0001-Use-full-path-in-pkgconfig.patch
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "Eclipse Cyclone DDS project";
+    homepage = "https://cyclonedds.io/";
+    license = with licenses; [ epl20 ];
+    maintainers = with maintainers; [ bachp ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cyrus-sasl-xoauth2/default.nix b/nixpkgs/pkgs/development/libraries/cyrus-sasl-xoauth2/default.nix
new file mode 100644
index 000000000000..bc81574a0cdf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cyrus-sasl-xoauth2/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchFromGitHub, autoconf, libtool, automake, cyrus_sasl }:
+
+stdenv.mkDerivation rec {
+  pname = "cyrus-sasl-xoauth2";
+  version = "0.2";
+
+  src = fetchFromGitHub {
+    owner = "moriyoshi";
+    repo = "cyrus-sasl-xoauth2";
+    rev = "v${version}";
+    sha256 = "sha256-lI8uKtVxrziQ8q/Ss+QTgg1xTObZUTAzjL3MYmtwyd8=";
+  };
+
+  nativeBuildInputs = [ autoconf libtool automake ];
+
+  buildInputs = [ cyrus_sasl ];
+
+  preConfigure = "./autogen.sh";
+
+  configureFlags = [
+    "--with-cyrus-sasl=${placeholder "out"}"
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/moriyoshi/cyrus-sasl-xoauth2";
+    description = "XOAUTH2 mechanism plugin for cyrus-sasl";
+    platforms = platforms.unix;
+    license = licenses.mit;
+    maintainers = with lib.maintainers; [ wentasah ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/cyrus-sasl/cyrus-sasl-ac-try-run-fix.patch b/nixpkgs/pkgs/development/libraries/cyrus-sasl/cyrus-sasl-ac-try-run-fix.patch
new file mode 100644
index 000000000000..f0376792e002
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cyrus-sasl/cyrus-sasl-ac-try-run-fix.patch
@@ -0,0 +1,13 @@
+diff --git a/m4/sasl2.m4 b/m4/sasl2.m4
+index 098c853a..91d98def 100644
+--- a/m4/sasl2.m4
++++ b/m4/sasl2.m4
+@@ -350,7 +350,7 @@ int main(void)
+ 
+     return (!have_spnego);  // 0 = success, 1 = failure
+ }
+-],[ac_cv_gssapi_supports_spnego=yes],[ac_cv_gssapi_supports_spnego=no])
++],[ac_cv_gssapi_supports_spnego=yes],[ac_cv_gssapi_supports_spnego=no],[ac_cv_gssapi_supports_spnego=no])
+     LIBS="$cmu_save_LIBS"
+   ])
+   AS_IF([test "$ac_cv_gssapi_supports_spnego" = yes],[
diff --git a/nixpkgs/pkgs/development/libraries/cyrus-sasl/default.nix b/nixpkgs/pkgs/development/libraries/cyrus-sasl/default.nix
new file mode 100644
index 000000000000..7eb13f7136c7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/cyrus-sasl/default.nix
@@ -0,0 +1,58 @@
+{ lib, stdenv, fetchurl, fetchpatch, openssl, openldap, libkrb5, db, gettext
+, pam, libxcrypt, fixDarwinDylibNames, autoreconfHook, enableLdap ? false
+, buildPackages, pruneLibtoolFiles, nixosTests }:
+
+stdenv.mkDerivation rec {
+  pname = "cyrus-sasl";
+  version = "2.1.28";
+
+  src = fetchurl {
+    urls =
+      [ "https://github.com/cyrusimap/${pname}/releases/download/${pname}-${version}/${pname}-${version}.tar.gz"
+        "http://www.cyrusimap.org/releases/${pname}-${version}.tar.gz"
+        "http://www.cyrusimap.org/releases/old/${pname}-${version}.tar.gz"
+      ];
+    sha256 = "sha256-fM/Gq9Ae1nwaCSSzU+Um8bdmsh9C1FYu5jWo6/xbs4w=";
+  };
+
+  patches = [
+    # Fix cross-compilation
+    ./cyrus-sasl-ac-try-run-fix.patch
+    # make compatible with openssl3. can probably be dropped with any release after 2.1.28
+    (fetchpatch {
+      url = "https://github.com/cyrusimap/cyrus-sasl/compare/cb549ef71c5bb646fe583697ebdcaba93267a237...dfaa62392e7caecc6ecf0097b4d73738ec4fc0a8.patch";
+      hash = "sha256-pc0cZqj1QoxDqgd/j/5q3vWONEPrTm4Pr6MzHlfjRCc=";
+    })
+  ];
+
+  outputs = [ "bin" "dev" "out" "man" "devdoc" ];
+
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+  nativeBuildInputs = [ autoreconfHook pruneLibtoolFiles ]
+    ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
+  buildInputs =
+    [ openssl db gettext libkrb5 libxcrypt ]
+    ++ lib.optional enableLdap openldap
+    ++ lib.optional stdenv.isLinux pam;
+
+  configureFlags = [
+    "--with-openssl=${openssl.dev}"
+    "--with-plugindir=${placeholder "out"}/lib/sasl2"
+    "--with-saslauthd=/run/saslauthd"
+    "--enable-login"
+    "--enable-shared"
+  ] ++ lib.optional enableLdap "--with-ldap=${openldap.dev}";
+
+  installFlags = lib.optionals stdenv.isDarwin [ "framedir=$(out)/Library/Frameworks/SASL2.framework" ];
+
+  passthru.tests = {
+    inherit (nixosTests) parsedmarc postfix;
+  };
+
+  meta = with lib; {
+    homepage = "https://www.cyrusimap.org/sasl";
+    description = "Library for adding authentication support to connection-based protocols";
+    platforms = platforms.unix;
+    license = licenses.bsdOriginal;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/czmq/default.nix b/nixpkgs/pkgs/development/libraries/czmq/default.nix
new file mode 100644
index 000000000000..bb8ecafbb347
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/czmq/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl, zeromq }:
+
+stdenv.mkDerivation rec {
+  version = "4.2.1";
+  pname = "czmq";
+
+  src = fetchurl {
+    url = "https://github.com/zeromq/czmq/releases/download/v${version}/${pname}-${version}.tar.gz";
+    sha256 = "sha256-XXIKIEwqWGRdb3ZDrxXVY6cS2tmMnTLB7ZEzd9qmrDk=";
+  };
+
+  # Needs to be propagated for the .pc file to work
+  propagatedBuildInputs = [ zeromq ];
+
+  meta = with lib; {
+    homepage = "http://czmq.zeromq.org/";
+    description = "High-level C Binding for ZeroMQ";
+    license = licenses.mpl20;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/dab_lib/default.nix b/nixpkgs/pkgs/development/libraries/dab_lib/default.nix
new file mode 100644
index 000000000000..82d591abc139
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dab_lib/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
+, faad2, fftwFloat, zlib
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "dab_lib";
+  version = "unstable-2023-03-02";
+
+  src = fetchFromGitHub {
+    owner = "JvanKatwijk";
+    repo = "dab-cmdline";
+    rev = "d615e2ba085f91dc7764cc28dfc4c9df49ee1a93";
+    hash = "sha256-KSkOg0a5iq+13kClQqj+TaEP/PsLUrm8bMmiJEAZ+C4=";
+  };
+
+  sourceRoot = "${finalAttrs.src.name}/library";
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ faad2 fftwFloat zlib ];
+
+  meta = with lib; {
+    description = "DAB/DAB+ decoding library";
+    homepage = "https://github.com/JvanKatwijk/dab-cmdline";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ alexwinter ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/dav1d/default.nix b/nixpkgs/pkgs/development/libraries/dav1d/default.nix
new file mode 100644
index 000000000000..4e48536fa3af
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dav1d/default.nix
@@ -0,0 +1,77 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, meson
+, ninja
+, nasm
+, pkg-config
+, xxHash
+, withTools ? false # "dav1d" binary
+, withExamples ? false
+, SDL2 # "dav1dplay" binary
+, useVulkan ? false
+, libplacebo
+, vulkan-loader
+, vulkan-headers
+
+  # for passthru.tests
+, ffmpeg
+, gdal
+, handbrake
+, libavif
+, libheif
+}:
+
+assert useVulkan -> withExamples;
+
+stdenv.mkDerivation rec {
+  pname = "dav1d";
+  version = "1.3.0";
+
+  src = fetchFromGitHub {
+    owner = "videolan";
+    repo = pname;
+    rev = version;
+    hash = "sha256-c7Dur+0HpteI7KkR9oo3WynoH/FCRaBwZA7bJmPDJp8=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ meson ninja nasm pkg-config ];
+  # TODO: doxygen (currently only HTML and not build by default).
+  buildInputs = [ xxHash ]
+    ++ lib.optional withExamples SDL2
+    ++ lib.optionals useVulkan [ libplacebo vulkan-loader vulkan-headers ];
+
+  mesonFlags = [
+    "-Denable_tools=${lib.boolToString withTools}"
+    "-Denable_examples=${lib.boolToString withExamples}"
+  ];
+
+  doCheck = true;
+
+  passthru.tests = {
+    inherit
+      ffmpeg
+      gdal
+      handbrake
+      libavif
+      libheif;
+  };
+
+  meta = with lib; {
+    description = "A cross-platform AV1 decoder focused on speed and correctness";
+    longDescription = ''
+      The goal of this project is to provide a decoder for most platforms, and
+      achieve the highest speed possible to overcome the temporary lack of AV1
+      hardware decoder. It supports all features from AV1, including all
+      subsampling and bit-depth parameters.
+    '';
+    inherit (src.meta) homepage;
+    changelog = "https://code.videolan.org/videolan/dav1d/-/tags/${version}";
+    # More technical: https://code.videolan.org/videolan/dav1d/blob/${version}/NEWS
+    license = licenses.bsd2;
+    platforms = platforms.unix ++ platforms.windows;
+    maintainers = with maintainers; [ primeos ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/db/CVE-2017-10140-4.8-cwd-db_config.patch b/nixpkgs/pkgs/development/libraries/db/CVE-2017-10140-4.8-cwd-db_config.patch
new file mode 100644
index 000000000000..ed916fcf4d1f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/db/CVE-2017-10140-4.8-cwd-db_config.patch
@@ -0,0 +1,11 @@
+--- a/env/env_open.c.old	2017-06-26 10:32:11.011419981 +0200
++++ b/env/env_open.c	2017-06-26 10:32:46.893721233 +0200
+@@ -473,7 +473,7 @@
+ 	env->db_mode = mode == 0 ? DB_MODE_660 : mode;
+ 
+ 	/* Read the DB_CONFIG file. */
+-	if ((ret = __env_read_db_config(env)) != 0)
++	if (env->db_home != NULL && (ret = __env_read_db_config(env)) != 0)
+ 		return (ret);
+ 
+ 	/*
diff --git a/nixpkgs/pkgs/development/libraries/db/CVE-2017-10140-cwd-db_config.patch b/nixpkgs/pkgs/development/libraries/db/CVE-2017-10140-cwd-db_config.patch
new file mode 100644
index 000000000000..652e962bbe18
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/db/CVE-2017-10140-cwd-db_config.patch
@@ -0,0 +1,11 @@
+--- db-5.3.28/src/env/env_open.c.old	2017-06-26 10:32:11.011419981 +0200
++++ db-5.3.28/src/env/env_open.c	2017-06-26 10:32:46.893721233 +0200
+@@ -473,7 +473,7 @@
+ 	env->db_mode = mode == 0 ? DB_MODE_660 : mode;
+ 
+ 	/* Read the DB_CONFIG file. */
+-	if ((ret = __env_read_db_config(env)) != 0)
++	if (env->db_home != NULL && (ret = __env_read_db_config(env)) != 0)
+ 		return (ret);
+ 
+ 	/*
diff --git a/nixpkgs/pkgs/development/libraries/db/clang-4.8.patch b/nixpkgs/pkgs/development/libraries/db/clang-4.8.patch
new file mode 100644
index 000000000000..0aff87682037
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/db/clang-4.8.patch
@@ -0,0 +1,205 @@
+diff --git a/dbinc/atomic.h b/dbinc/atomic.h
+index 0034dcc..160c8ea 100644
+--- a/dbinc/atomic.h
++++ b/dbinc/atomic.h
+@@ -70,7 +70,7 @@ typedef struct {
+  * These have no memory barriers; the caller must include them when necessary.
+  */
+ #define	atomic_read(p)		((p)->value)
+-#define	atomic_init(p, val)	((p)->value = (val))
++#define	atomic_init_db(p, val)	((p)->value = (val))
+ 
+ #ifdef HAVE_ATOMIC_SUPPORT
+ 
+@@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val;
+ #define	atomic_inc(env, p)	__atomic_inc(p)
+ #define	atomic_dec(env, p)	__atomic_dec(p)
+ #define	atomic_compare_exchange(env, p, o, n)	\
+-	__atomic_compare_exchange((p), (o), (n))
++	__atomic_compare_exchange_int((p), (o), (n))
+ static inline int __atomic_inc(db_atomic_t *p)
+ {
+ 	int	temp;
+@@ -176,7 +176,7 @@ static inline int __atomic_dec(db_atomic_t *p)
+  * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
+  * which configure could be changed to use.
+  */
+-static inline int __atomic_compare_exchange(
++static inline int __atomic_compare_exchange_int(
+ 	db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
+ {
+ 	atomic_value_t was;
+@@ -206,7 +206,7 @@ static inline int __atomic_compare_exchange(
+ #define	atomic_dec(env, p)	(--(p)->value)
+ #define	atomic_compare_exchange(env, p, oldval, newval)		\
+ 	(DB_ASSERT(env, atomic_read(p) == (oldval)),		\
+-	atomic_init(p, (newval)), 1)
++	atomic_init_db(p, (newval)), 1)
+ #else
+ #define atomic_inc(env, p)	__atomic_inc(env, p)
+ #define atomic_dec(env, p)	__atomic_dec(env, p)
+diff --git a/mp/mp_fget.c b/mp/mp_fget.c
+index 5fdee5a..0b75f57 100644
+--- a/mp/mp_fget.c
++++ b/mp/mp_fget.c
+@@ -617,7 +617,7 @@ alloc:		/* Allocate a new buffer header and data space. */
+ 
+ 		/* Initialize enough so we can call __memp_bhfree. */
+ 		alloc_bhp->flags = 0;
+-		atomic_init(&alloc_bhp->ref, 1);
++		atomic_init_db(&alloc_bhp->ref, 1);
+ #ifdef DIAGNOSTIC
+ 		if ((uintptr_t)alloc_bhp->buf & (sizeof(size_t) - 1)) {
+ 			__db_errx(env,
+@@ -911,7 +911,7 @@ alloc:		/* Allocate a new buffer header and data space. */
+ 			MVCC_MPROTECT(bhp->buf, mfp->stat.st_pagesize,
+ 			    PROT_READ);
+ 
+-		atomic_init(&alloc_bhp->ref, 1);
++		atomic_init_db(&alloc_bhp->ref, 1);
+ 		MUTEX_LOCK(env, alloc_bhp->mtx_buf);
+ 		alloc_bhp->priority = bhp->priority;
+ 		alloc_bhp->pgno = bhp->pgno;
+diff --git a/mp/mp_mvcc.c b/mp/mp_mvcc.c
+index 34467d2..f05aa0c 100644
+--- a/mp/mp_mvcc.c
++++ b/mp/mp_mvcc.c
+@@ -276,7 +276,7 @@ __memp_bh_freeze(dbmp, infop, hp, bhp, need_frozenp)
+ #else
+ 	memcpy(frozen_bhp, bhp, SSZA(BH, buf));
+ #endif
+-	atomic_init(&frozen_bhp->ref, 0);
++	atomic_init_db(&frozen_bhp->ref, 0);
+ 	if (mutex != MUTEX_INVALID)
+ 		frozen_bhp->mtx_buf = mutex;
+ 	else if ((ret = __mutex_alloc(env, MTX_MPOOL_BH,
+@@ -428,7 +428,7 @@ __memp_bh_thaw(dbmp, infop, hp, frozen_bhp, alloc_bhp)
+ #endif
+ 		alloc_bhp->mtx_buf = mutex;
+ 		MUTEX_LOCK(env, alloc_bhp->mtx_buf);
+-		atomic_init(&alloc_bhp->ref, 1);
++		atomic_init_db(&alloc_bhp->ref, 1);
+ 		F_CLR(alloc_bhp, BH_FROZEN);
+ 	}
+ 
+diff --git a/mp/mp_region.c b/mp/mp_region.c
+index e6cece9..ddbe906 100644
+--- a/mp/mp_region.c
++++ b/mp/mp_region.c
+@@ -224,7 +224,7 @@ __memp_init(env, dbmp, reginfo_off, htab_buckets, max_nreg)
+ 			     MTX_MPOOL_FILE_BUCKET, 0, &htab[i].mtx_hash)) != 0)
+ 				return (ret);
+ 			SH_TAILQ_INIT(&htab[i].hash_bucket);
+-			atomic_init(&htab[i].hash_page_dirty, 0);
++			atomic_init_db(&htab[i].hash_page_dirty, 0);
+ 		}
+ 
+ 		/*
+@@ -269,7 +269,7 @@ __memp_init(env, dbmp, reginfo_off, htab_buckets, max_nreg)
+ 		hp->mtx_hash = (mtx_base == MUTEX_INVALID) ? MUTEX_INVALID :
+ 		    mtx_base + i;
+ 		SH_TAILQ_INIT(&hp->hash_bucket);
+-		atomic_init(&hp->hash_page_dirty, 0);
++		atomic_init_db(&hp->hash_page_dirty, 0);
+ #ifdef HAVE_STATISTICS
+ 		hp->hash_io_wait = 0;
+ 		hp->hash_frozen = hp->hash_thawed = hp->hash_frozen_freed = 0;
+diff --git a/mutex/mut_method.c b/mutex/mut_method.c
+index 2588763..5c6d516 100644
+--- a/mutex/mut_method.c
++++ b/mutex/mut_method.c
+@@ -426,7 +426,7 @@ atomic_compare_exchange(env, v, oldval, newval)
+ 	MUTEX_LOCK(env, mtx);
+ 	ret = atomic_read(v) == oldval;
+ 	if (ret)
+-		atomic_init(v, newval);
++		atomic_init_db(v, newval);
+ 	MUTEX_UNLOCK(env, mtx);
+ 
+ 	return (ret);
+diff --git a/mutex/mut_tas.c b/mutex/mut_tas.c
+index f3922e0..e40fcdf 100644
+--- a/mutex/mut_tas.c
++++ b/mutex/mut_tas.c
+@@ -46,7 +46,7 @@ __db_tas_mutex_init(env, mutex, flags)
+ 
+ #ifdef HAVE_SHARED_LATCHES
+ 	if (F_ISSET(mutexp, DB_MUTEX_SHARED))
+-		atomic_init(&mutexp->sharecount, 0);
++		atomic_init_db(&mutexp->sharecount, 0);
+ 	else
+ #endif
+ 	if (MUTEX_INIT(&mutexp->tas)) {
+@@ -486,7 +486,7 @@ __db_tas_mutex_unlock(env, mutex)
+ 			F_CLR(mutexp, DB_MUTEX_LOCKED);
+ 			/* Flush flag update before zeroing count */
+ 			MEMBAR_EXIT();
+-			atomic_init(&mutexp->sharecount, 0);
++			atomic_init_db(&mutexp->sharecount, 0);
+ 		} else {
+ 			DB_ASSERT(env, sharecount > 0);
+ 			MEMBAR_EXIT();
+diff -ur a/dist/aclocal/clock.m4 b/dist/aclocal/clock.m4
+--- a/dist/aclocal/clock.m4	1969-12-31 19:00:01.000000000 -0500
++++ b/dist/aclocal/clock.m4	2023-06-05 19:14:02.007080500 -0400
+@@ -21,6 +21,7 @@
+ AC_CACHE_CHECK([for clock_gettime monotonic clock], db_cv_clock_monotonic, [
+ AC_TRY_RUN([
+ #include <sys/time.h>
++int
+ main() {
+ 	struct timespec t;
+ 	return (clock_gettime(CLOCK_MONOTONIC, &t) != 0);
+diff -ur a/dist/aclocal/mutex.m4 b/dist/aclocal/mutex.m4
+--- a/dist/aclocal/mutex.m4	1969-12-31 19:00:01.000000000 -0500
++++ b/dist/aclocal/mutex.m4	2023-06-05 19:14:47.214158196 -0400
+@@ -4,6 +4,7 @@
+ AC_DEFUN(AM_PTHREADS_SHARED, [
+ AC_TRY_RUN([
+ #include <pthread.h>
++int
+ main() {
+ 	pthread_cond_t cond;
+ 	pthread_mutex_t mutex;
+@@ -46,6 +47,7 @@
+ AC_DEFUN(AM_PTHREADS_PRIVATE, [
+ AC_TRY_RUN([
+ #include <pthread.h>
++int
+ main() {
+ 	pthread_cond_t cond;
+ 	pthread_mutex_t mutex;
+diff -ur a/dist/aclocal/sequence.m4 b/dist/aclocal/sequence.m4
+--- a/dist/aclocal/sequence.m4	1969-12-31 19:00:01.000000000 -0500
++++ b/dist/aclocal/sequence.m4	2023-06-05 19:14:02.007869956 -0400
+@@ -43,6 +43,9 @@
+ 	# test, which won't test for the appropriate printf format strings.
+ 	if test "$db_cv_build_sequence" = "yes"; then
+ 		AC_TRY_RUN([
++		#include <string.h>
++		#include <stdio.h>
++		int
+ 		main() {
+ 			$db_cv_seq_type l;
+ 			unsigned $db_cv_seq_type u;
+@@ -59,7 +62,9 @@
+				return (1);
+ 			return (0);
+ 		}],, [db_cv_build_sequence="no"],
+-		AC_TRY_LINK(,[
++		AC_TRY_LINK([
++			#include <string.h>
++			#include <stdio.h>],[
+ 			$db_cv_seq_type l;
+ 			unsigned $db_cv_seq_type u;
+ 			char buf@<:@100@:>@;
+diff -ur a/dist/RELEASE b/dist/RELEASE
+--- a/dist/RELEASE	1969-12-31 19:00:01.000000000 -0500
++++ b/dist/RELEASE	2023-07-02 17:32:34.703953049 -0400
+@@ -7,5 +7,5 @@
+ 
+ DB_VERSION_UNIQUE_NAME=`printf "_%d%03d" $DB_VERSION_MAJOR $DB_VERSION_MINOR`
+ 
+-DB_RELEASE_DATE=`date "+%B %e, %Y"`
++DB_RELEASE_DATE="April  9, 2010"
+ DB_VERSION_STRING="Berkeley DB $DB_VERSION: ($DB_RELEASE_DATE)"
diff --git a/nixpkgs/pkgs/development/libraries/db/clang-5.3.patch b/nixpkgs/pkgs/development/libraries/db/clang-5.3.patch
new file mode 100644
index 000000000000..823a71d6532f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/db/clang-5.3.patch
@@ -0,0 +1,249 @@
+diff --git a/src/dbinc/atomic.h b/src/dbinc/atomic.h
+index 6a858f7..9f338dc 100644
+--- a/src/dbinc/atomic.h
++++ b/src/dbinc/atomic.h
+@@ -70,7 +70,7 @@ typedef struct {
+  * These have no memory barriers; the caller must include them when necessary.
+  */
+ #define	atomic_read(p)		((p)->value)
+-#define	atomic_init(p, val)	((p)->value = (val))
++#define	atomic_init_db(p, val)	((p)->value = (val))
+ 
+ #ifdef HAVE_ATOMIC_SUPPORT
+ 
+@@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val;
+ #define	atomic_inc(env, p)	__atomic_inc(p)
+ #define	atomic_dec(env, p)	__atomic_dec(p)
+ #define	atomic_compare_exchange(env, p, o, n)	\
+-	__atomic_compare_exchange((p), (o), (n))
++	__atomic_compare_exchange_int((p), (o), (n))
+ static inline int __atomic_inc(db_atomic_t *p)
+ {
+ 	int	temp;
+@@ -176,7 +176,7 @@ static inline int __atomic_dec(db_atomic_t *p)
+  * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
+  * which configure could be changed to use.
+  */
+-static inline int __atomic_compare_exchange(
++static inline int __atomic_compare_exchange_int(
+ 	db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
+ {
+ 	atomic_value_t was;
+@@ -206,7 +206,7 @@ static inline int __atomic_compare_exchange(
+ #define	atomic_dec(env, p)	(--(p)->value)
+ #define	atomic_compare_exchange(env, p, oldval, newval)		\
+ 	(DB_ASSERT(env, atomic_read(p) == (oldval)),		\
+-	atomic_init(p, (newval)), 1)
++	atomic_init_db(p, (newval)), 1)
+ #else
+ #define atomic_inc(env, p)	__atomic_inc(env, p)
+ #define atomic_dec(env, p)	__atomic_dec(env, p)
+diff --git a/src/mp/mp_fget.c b/src/mp/mp_fget.c
+index 16de695..d0dcc29 100644
+--- a/src/mp/mp_fget.c
++++ b/src/mp/mp_fget.c
+@@ -649,7 +649,7 @@ alloc:		/* Allocate a new buffer header and data space. */
+ 
+ 		/* Initialize enough so we can call __memp_bhfree. */
+ 		alloc_bhp->flags = 0;
+-		atomic_init(&alloc_bhp->ref, 1);
++		atomic_init_db(&alloc_bhp->ref, 1);
+ #ifdef DIAGNOSTIC
+ 		if ((uintptr_t)alloc_bhp->buf & (sizeof(size_t) - 1)) {
+ 			__db_errx(env, DB_STR("3025",
+@@ -955,7 +955,7 @@ alloc:		/* Allocate a new buffer header and data space. */
+ 			MVCC_MPROTECT(bhp->buf, mfp->pagesize,
+ 			    PROT_READ);
+ 
+-		atomic_init(&alloc_bhp->ref, 1);
++		atomic_init_db(&alloc_bhp->ref, 1);
+ 		MUTEX_LOCK(env, alloc_bhp->mtx_buf);
+ 		alloc_bhp->priority = bhp->priority;
+ 		alloc_bhp->pgno = bhp->pgno;
+diff --git a/src/mp/mp_mvcc.c b/src/mp/mp_mvcc.c
+index 770bad8..e28cce0 100644
+--- a/src/mp/mp_mvcc.c
++++ b/src/mp/mp_mvcc.c
+@@ -276,7 +276,7 @@ __memp_bh_freeze(dbmp, infop, hp, bhp, need_frozenp)
+ #else
+ 	memcpy(frozen_bhp, bhp, SSZA(BH, buf));
+ #endif
+-	atomic_init(&frozen_bhp->ref, 0);
++	atomic_init_db(&frozen_bhp->ref, 0);
+ 	if (mutex != MUTEX_INVALID)
+ 		frozen_bhp->mtx_buf = mutex;
+ 	else if ((ret = __mutex_alloc(env, MTX_MPOOL_BH,
+@@ -428,7 +428,7 @@ __memp_bh_thaw(dbmp, infop, hp, frozen_bhp, alloc_bhp)
+ #endif
+ 		alloc_bhp->mtx_buf = mutex;
+ 		MUTEX_LOCK(env, alloc_bhp->mtx_buf);
+-		atomic_init(&alloc_bhp->ref, 1);
++		atomic_init_db(&alloc_bhp->ref, 1);
+ 		F_CLR(alloc_bhp, BH_FROZEN);
+ 	}
+ 
+diff --git a/src/mp/mp_region.c b/src/mp/mp_region.c
+index 4952030..47645f8 100644
+--- a/src/mp/mp_region.c
++++ b/src/mp/mp_region.c
+@@ -245,7 +245,7 @@ __memp_init(env, dbmp, reginfo_off, htab_buckets, max_nreg)
+ 			     MTX_MPOOL_FILE_BUCKET, 0, &htab[i].mtx_hash)) != 0)
+ 				return (ret);
+ 			SH_TAILQ_INIT(&htab[i].hash_bucket);
+-			atomic_init(&htab[i].hash_page_dirty, 0);
++			atomic_init_db(&htab[i].hash_page_dirty, 0);
+ 		}
+ 
+ 		/*
+@@ -302,7 +302,7 @@ no_prealloc:
+ 		} else
+ 			hp->mtx_hash = mtx_base + (i % dbenv->mp_mtxcount);
+ 		SH_TAILQ_INIT(&hp->hash_bucket);
+-		atomic_init(&hp->hash_page_dirty, 0);
++		atomic_init_db(&hp->hash_page_dirty, 0);
+ #ifdef HAVE_STATISTICS
+ 		hp->hash_io_wait = 0;
+ 		hp->hash_frozen = hp->hash_thawed = hp->hash_frozen_freed = 0;
+diff --git a/src/mutex/mut_method.c b/src/mutex/mut_method.c
+index 09353b0..177353c 100644
+--- a/src/mutex/mut_method.c
++++ b/src/mutex/mut_method.c
+@@ -474,7 +474,7 @@ atomic_compare_exchange(env, v, oldval, newval)
+ 	MUTEX_LOCK(env, mtx);
+ 	ret = atomic_read(v) == oldval;
+ 	if (ret)
+-		atomic_init(v, newval);
++		atomic_init_db(v, newval);
+ 	MUTEX_UNLOCK(env, mtx);
+ 
+ 	return (ret);
+diff --git a/src/mutex/mut_tas.c b/src/mutex/mut_tas.c
+index 106b161..fc4de9d 100644
+--- a/src/mutex/mut_tas.c
++++ b/src/mutex/mut_tas.c
+@@ -47,7 +47,7 @@ __db_tas_mutex_init(env, mutex, flags)
+ 
+ #ifdef HAVE_SHARED_LATCHES
+ 	if (F_ISSET(mutexp, DB_MUTEX_SHARED))
+-		atomic_init(&mutexp->sharecount, 0);
++		atomic_init_db(&mutexp->sharecount, 0);
+ 	else
+ #endif
+ 	if (MUTEX_INIT(&mutexp->tas)) {
+@@ -536,7 +536,7 @@ __db_tas_mutex_unlock(env, mutex)
+ 			F_CLR(mutexp, DB_MUTEX_LOCKED);
+ 			/* Flush flag update before zeroing count */
+ 			MEMBAR_EXIT();
+-			atomic_init(&mutexp->sharecount, 0);
++			atomic_init_db(&mutexp->sharecount, 0);
+ 		} else {
+ 			DB_ASSERT(env, sharecount > 0);
+ 			MEMBAR_EXIT();
+diff -ur a/dist/aclocal/clock.m4 b/dist/aclocal/clock.m4
+--- a/dist/aclocal/clock.m4	1969-12-31 19:00:01.000000000 -0500
++++ b/dist/aclocal/clock.m4	2023-06-05 19:14:02.007080500 -0400
+@@ -21,6 +21,7 @@
+ AC_CACHE_CHECK([for clock_gettime monotonic clock], db_cv_clock_monotonic, [
+ AC_TRY_RUN([
+ #include <sys/time.h>
++int
+ main() {
+ 	struct timespec t;
+ 	return (clock_gettime(CLOCK_MONOTONIC, &t) != 0);
+diff -ur a/dist/aclocal/mmap.m4 b/dist/aclocal/mmap.m4
+--- a/dist/aclocal/mmap.m4	1969-12-31 19:00:01.000000000 -0500
++++ b/dist/aclocal/mmap.m4	2023-06-05 19:14:02.007323624 -0400
+@@ -29,6 +29,8 @@
+      * system to system.
+      */
+     #include <stdio.h>
++    #include <stdlib.h>
++    #include <unistd.h>
+     #include <string.h>
+     #include <sys/types.h>
+     #include <sys/stat.h>
+@@ -42,12 +44,13 @@
+     #define MAP_FAILED (-1)
+     #endif
+
+-    int catch_sig(sig)
++    void catch_sig(sig)
+ 	    int sig;
+     {
+ 	    exit(1);
+     }
+
++    int
+     main() {
+ 	    const char *underlying;
+ 	    unsigned gapsize;
+@@ -88,8 +91,8 @@
+ 		    return (4);
+ 	    }
+
+-	    (void) signal(SIGSEGV, catch_sig);
+-	    (void) signal(SIGBUS, catch_sig);
++	    (void) signal(SIGSEGV, &catch_sig);
++	    (void) signal(SIGBUS, &catch_sig);
+
+ 	    for (i = sizeof(buf); i < total_size; i += gapsize)
+ 		    base[i] = 'A';
+diff -ur a/dist/aclocal/mutex.m4 b/dist/aclocal/mutex.m4
+--- a/dist/aclocal/mutex.m4	1969-12-31 19:00:01.000000000 -0500
++++ b/dist/aclocal/mutex.m4	2023-06-05 19:14:47.214158196 -0400
+@@ -5,6 +5,7 @@
+ AC_TRY_RUN([
+ #include <stdlib.h>
+ #include <pthread.h>
++int
+ main() {
+ 	pthread_cond_t cond;
+ 	pthread_mutex_t mutex;
+@@ -49,6 +50,7 @@
+ AC_TRY_RUN([
+ #include <stdlib.h>
+ #include <pthread.h>
++int
+ main() {
+ 	pthread_cond_t cond;
+ 	pthread_mutex_t mutex;
+@@ -89,6 +91,7 @@
+ AC_TRY_RUN([
+ #include <stdlib.h>
+ #include <pthread.h>
++int
+ main() {
+ 	pthread_cond_t cond;
+ 	pthread_condattr_t condattr;
+@@ -110,6 +113,7 @@
+ AC_TRY_RUN([
+ #include <stdlib.h>
+ #include <pthread.h>
++int
+ main() {
+ 	pthread_rwlock_t rwlock;
+ 	pthread_rwlockattr_t rwlockattr;
+diff -ur a/dist/aclocal/sequence.m4 b/dist/aclocal/sequence.m4
+--- a/dist/aclocal/sequence.m4	1969-12-31 19:00:01.000000000 -0500
++++ b/dist/aclocal/sequence.m4	2023-06-05 19:14:02.007869956 -0400
+@@ -43,6 +43,9 @@
+ 	# test, which won't test for the appropriate printf format strings.
+ 	if test "$db_cv_build_sequence" = "yes"; then
+ 		AC_TRY_RUN([
++		#include <string.h>
++		#include <stdio.h>
++		int
+ 		main() {
+ 			$db_cv_seq_type l;
+ 			unsigned $db_cv_seq_type u;
+@@ -59,7 +62,9 @@
+				return (1);
+ 			return (0);
+ 		}],, [db_cv_build_sequence="no"],
+-		AC_TRY_LINK(,[
++		AC_TRY_LINK([
++			#include <string.h>
++			#include <stdio.h>],[
+ 			$db_cv_seq_type l;
+ 			unsigned $db_cv_seq_type u;
+ 			char buf@<:@100@:>@;
diff --git a/nixpkgs/pkgs/development/libraries/db/clang-6.0.patch b/nixpkgs/pkgs/development/libraries/db/clang-6.0.patch
new file mode 100644
index 000000000000..a411e60dc39b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/db/clang-6.0.patch
@@ -0,0 +1,123 @@
+diff --git a/src/dbinc/atomic.h b/src/dbinc/atomic.h
+index e4420aa..4799b5f 100644
+--- a/src/dbinc/atomic.h
++++ b/src/dbinc/atomic.h
+@@ -70,7 +70,7 @@ typedef struct {
+  * These have no memory barriers; the caller must include them when necessary.
+  */
+ #define	atomic_read(p)		((p)->value)
+-#define	atomic_init(p, val)	((p)->value = (val))
++#define	atomic_init_db(p, val)	((p)->value = (val))
+ 
+ #ifdef HAVE_ATOMIC_SUPPORT
+ 
+@@ -225,7 +225,7 @@ static inline int __atomic_compare_exchange_int(
+ #define	atomic_dec(env, p)	(--(p)->value)
+ #define	atomic_compare_exchange(env, p, oldval, newval)		\
+ 	(DB_ASSERT(env, atomic_read(p) == (oldval)),		\
+-	atomic_init(p, (newval)), 1)
++	atomic_init_db(p, (newval)), 1)
+ #else
+ #define	atomic_inc(env, p)	__atomic_inc_int(env, p)
+ #define	atomic_dec(env, p)	__atomic_dec_int(env, p)
+diff --git a/src/mp/mp_fget.c b/src/mp/mp_fget.c
+index 59fe9fe..fa4ced7 100644
+--- a/src/mp/mp_fget.c
++++ b/src/mp/mp_fget.c
+@@ -654,7 +654,7 @@ alloc:		/* Allocate a new buffer header and data space. */
+ 
+ 		/* Initialize enough so we can call __memp_bhfree. */
+ 		alloc_bhp->flags = 0;
+-		atomic_init(&alloc_bhp->ref, 1);
++		atomic_init_db(&alloc_bhp->ref, 1);
+ #ifdef DIAGNOSTIC
+ 		if ((uintptr_t)alloc_bhp->buf & (sizeof(size_t) - 1)) {
+ 			__db_errx(env, DB_STR("3025",
+@@ -969,7 +969,7 @@ alloc:		/* Allocate a new buffer header and data space. */
+ 			MVCC_MPROTECT(bhp->buf, mfp->pagesize,
+ 			    PROT_READ);
+ 
+-		atomic_init(&alloc_bhp->ref, 1);
++		atomic_init_db(&alloc_bhp->ref, 1);
+ 		MUTEX_LOCK(env, alloc_bhp->mtx_buf);
+ 		alloc_bhp->priority = bhp->priority;
+ 		alloc_bhp->pgno = bhp->pgno;
+diff --git a/src/mp/mp_mvcc.c b/src/mp/mp_mvcc.c
+index 83c4d72..0a47202 100644
+--- a/src/mp/mp_mvcc.c
++++ b/src/mp/mp_mvcc.c
+@@ -281,7 +281,7 @@ __memp_bh_freeze(dbmp, infop, hp, bhp, need_frozenp)
+ #else
+ 	memcpy(frozen_bhp, bhp, SSZA(BH, buf));
+ #endif
+-	atomic_init(&frozen_bhp->ref, 0);
++	atomic_init_db(&frozen_bhp->ref, 0);
+ 	if (mutex != MUTEX_INVALID)
+ 		frozen_bhp->mtx_buf = mutex;
+ 	else if ((ret = __mutex_alloc(env, MTX_MPOOL_BH,
+@@ -440,7 +440,7 @@ __memp_bh_thaw(dbmp, infop, hp, frozen_bhp, alloc_bhp)
+ #endif
+ 		alloc_bhp->mtx_buf = mutex;
+ 		MUTEX_LOCK(env, alloc_bhp->mtx_buf);
+-		atomic_init(&alloc_bhp->ref, 1);
++		atomic_init_db(&alloc_bhp->ref, 1);
+ 		F_CLR(alloc_bhp, BH_FROZEN);
+ 	}
+ 
+diff --git a/src/mp/mp_region.c b/src/mp/mp_region.c
+index 4d95e4f..e97459c 100644
+--- a/src/mp/mp_region.c
++++ b/src/mp/mp_region.c
+@@ -278,7 +278,7 @@ __memp_init(env, dbmp, reginfo_off, htab_buckets, max_nreg)
+ 			     MTX_MPOOL_FILE_BUCKET, 0, &htab[i].mtx_hash)) != 0)
+ 				return (ret);
+ 			SH_TAILQ_INIT(&htab[i].hash_bucket);
+-			atomic_init(&htab[i].hash_page_dirty, 0);
++			atomic_init_db(&htab[i].hash_page_dirty, 0);
+ 		}
+ 
+ 		mtx_base = mtx_prev = MUTEX_INVALID;
+@@ -332,7 +332,7 @@ no_prealloc:
+ 		    DB_MUTEX_SHARED, &hp->mtx_hash)) != 0)
+ 			return (ret);
+ 		SH_TAILQ_INIT(&hp->hash_bucket);
+-		atomic_init(&hp->hash_page_dirty, 0);
++		atomic_init_db(&hp->hash_page_dirty, 0);
+ #ifdef HAVE_STATISTICS
+ 		hp->hash_io_wait = 0;
+ 		hp->hash_frozen = hp->hash_thawed = hp->hash_frozen_freed = 0;
+diff --git a/src/mutex/mut_method.c b/src/mutex/mut_method.c
+index 72b34de..a9f9868 100644
+--- a/src/mutex/mut_method.c
++++ b/src/mutex/mut_method.c
+@@ -501,7 +501,7 @@ __atomic_compare_exchange_int(env, v, oldval, newval)
+ 	MUTEX_LOCK(env, mtx);
+ 	ret = atomic_read(v) == oldval;
+ 	if (ret)
+-		atomic_init(v, newval);
++		atomic_init_db(v, newval);
+ 	MUTEX_UNLOCK(env, mtx);
+ 
+ 	return (ret);
+diff --git a/src/mutex/mut_tas.c b/src/mutex/mut_tas.c
+index 7899c4b..d9420fa 100644
+--- a/src/mutex/mut_tas.c
++++ b/src/mutex/mut_tas.c
+@@ -47,7 +47,7 @@ __db_tas_mutex_init(env, mutex, flags)
+ 
+ #ifdef HAVE_SHARED_LATCHES
+ 	if (F_ISSET(mutexp, DB_MUTEX_SHARED))
+-		atomic_init(&mutexp->sharecount, 0);
++		atomic_init_db(&mutexp->sharecount, 0);
+ 	else
+ #endif
+ 	if (MUTEX_INIT(&mutexp->tas)) {
+@@ -643,7 +643,7 @@ was_not_locked:
+ 			F_CLR(mutexp, DB_MUTEX_LOCKED);
+ 			/* Flush flag update before zeroing count */
+ 			MEMBAR_EXIT();
+-			atomic_init(&mutexp->sharecount, 0);
++			atomic_init_db(&mutexp->sharecount, 0);
+ 		} else {
+ 			DB_ASSERT(env, sharecount > 0);
+ 			MEMBAR_EXIT();
diff --git a/nixpkgs/pkgs/development/libraries/db/darwin-mutexes-4.8.patch b/nixpkgs/pkgs/development/libraries/db/darwin-mutexes-4.8.patch
new file mode 100644
index 000000000000..09d5b814f161
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/db/darwin-mutexes-4.8.patch
@@ -0,0 +1,55 @@
+diff -ur a/dist/aclocal/mutex.m4 b/dist/aclocal/mutex.m4
+--- a/dist/aclocal/mutex.m4	1969-12-31 19:00:01.000000000 -0500
++++ b/dist/aclocal/mutex.m4	2023-06-05 19:14:47.214158196 -0400
+@@ -372,10 +376,11 @@
+ 
+ # _spin_lock_try/_spin_unlock: Apple/Darwin
+ if test "$db_cv_mutex" = no; then
+-AC_TRY_LINK(,[
+-	int x;
+-	_spin_lock_try(&x);
+-	_spin_unlock(&x);
++AC_TRY_LINK([
++#include <os/lock.h>],[
++	os_unfair_lock x = OS_UNFAIR_LOCK_INIT;
++	bool _ = os_unfair_lock_trylock(&x);
++	os_unfair_lock_unlock(&x);
+ ], [db_cv_mutex=Darwin/_spin_lock_try])
+ fi
+ 
+diff -ur a/dbinc/mutex_int.h b/dbinc/mutex_int.h
+--- a/dbinc/mutex_int.h	1969-12-31 19:00:01.000000000 -0500
++++ b/dbinc/mutex_int.h	2023-06-05 19:15:37.510514745 -0400
+@@ -154,14 +154,13 @@
+  * Apple/Darwin library functions.
+  *********************************************************************/
+ #ifdef HAVE_MUTEX_DARWIN_SPIN_LOCK_TRY
+-typedef u_int32_t tsl_t;
++#include <os/lock.h>
++typedef os_unfair_lock tsl_t;
+ 
+ #ifdef LOAD_ACTUAL_MUTEX_CODE
+-extern int _spin_lock_try(tsl_t *);
+-extern void _spin_unlock(tsl_t *);
+-#define	MUTEX_SET(tsl)          _spin_lock_try(tsl)
+-#define	MUTEX_UNSET(tsl)        _spin_unlock(tsl)
+-#define	MUTEX_INIT(tsl)         (MUTEX_UNSET(tsl), 0)
++#define	MUTEX_SET(tsl)          os_unfair_lock_trylock(tsl)
++#define	MUTEX_UNSET(tsl)        os_unfair_lock_unlock(tsl)
++#define	MUTEX_INIT(tsl)         ({ *(tsl) = OS_UNFAIR_LOCK_INIT; tsl; })
+ #endif
+ #endif
+ 
+diff -ur a/dbinc/mutex_int.h b/dbinc/mutex_int.h
+--- a/dbinc_auto/mutex_ext.h	1969-12-31 19:00:01.000000000 -0500
++++ b/dbinc_auto/mutex_ext.h	2023-07-01 22:38:20.749201366 -0400
+@@ -34,6 +34,9 @@
+ #if !defined(HAVE_ATOMIC_SUPPORT) && defined(HAVE_MUTEX_SUPPORT)
+ atomic_value_t __atomic_dec __P((ENV *, db_atomic_t *));
+ #endif
++#if !defined(HAVE_ATOMIC_SUPPORT) && defined(HAVE_MUTEX_SUPPORT)
++int atomic_compare_exchange __P((ENV *, db_atomic_t *, atomic_value_t, atomic_value_t));
++#endif
+ int __db_pthread_mutex_init __P((ENV *, db_mutex_t, u_int32_t));
+ int __db_pthread_mutex_lock __P((ENV *, db_mutex_t));
+ #if defined(HAVE_SHARED_LATCHES)
diff --git a/nixpkgs/pkgs/development/libraries/db/darwin-mutexes.patch b/nixpkgs/pkgs/development/libraries/db/darwin-mutexes.patch
new file mode 100644
index 000000000000..c0616fda7f7f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/db/darwin-mutexes.patch
@@ -0,0 +1,42 @@
+diff -ur a/dist/aclocal/mutex.m4 b/dist/aclocal/mutex.m4
+--- a/dist/aclocal/mutex.m4	1969-12-31 19:00:01.000000000 -0500
++++ b/dist/aclocal/mutex.m4	2023-06-05 19:14:47.214158196 -0400
+@@ -441,10 +445,11 @@
+ 
+ # _spin_lock_try/_spin_unlock: Apple/Darwin
+ if test "$db_cv_mutex" = no; then
+-AC_TRY_LINK(,[
+-	int x;
+-	_spin_lock_try(&x);
+-	_spin_unlock(&x);
++AC_TRY_LINK([
++#include <os/lock.h>],[
++	os_unfair_lock x = OS_UNFAIR_LOCK_INIT;
++	bool _ = os_unfair_lock_trylock(&x);
++	os_unfair_lock_unlock(&x);
+ ], [db_cv_mutex=Darwin/_spin_lock_try])
+ fi
+ 
+diff -ur a/src/dbinc/mutex_int.h b/src/dbinc/mutex_int.h
+--- a/src/dbinc/mutex_int.h	1969-12-31 19:00:01.000000000 -0500
++++ b/src/dbinc/mutex_int.h	2023-06-05 19:15:37.510514745 -0400
+@@ -154,14 +154,13 @@
+  * Apple/Darwin library functions.
+  *********************************************************************/
+ #ifdef HAVE_MUTEX_DARWIN_SPIN_LOCK_TRY
+-typedef u_int32_t tsl_t;
++#include <os/lock.h>
++typedef os_unfair_lock tsl_t;
+ 
+ #ifdef LOAD_ACTUAL_MUTEX_CODE
+-extern int _spin_lock_try(tsl_t *);
+-extern void _spin_unlock(tsl_t *);
+-#define	MUTEX_SET(tsl)          _spin_lock_try(tsl)
+-#define	MUTEX_UNSET(tsl)        _spin_unlock(tsl)
+-#define	MUTEX_INIT(tsl)         (MUTEX_UNSET(tsl), 0)
++#define	MUTEX_SET(tsl)          os_unfair_lock_trylock(tsl)
++#define	MUTEX_UNSET(tsl)        os_unfair_lock_unlock(tsl)
++#define	MUTEX_INIT(tsl)         ({ *(tsl) = OS_UNFAIR_LOCK_INIT; tsl; })
+ #endif
+ #endif
+
diff --git a/nixpkgs/pkgs/development/libraries/db/db-4.8.nix b/nixpkgs/pkgs/development/libraries/db/db-4.8.nix
new file mode 100644
index 000000000000..81705374381e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/db/db-4.8.nix
@@ -0,0 +1,14 @@
+{ lib, stdenv, fetchurl, autoreconfHook, ... } @ args:
+
+import ./generic.nix (args // {
+  version = "4.8.30";
+  sha256 = "0ampbl2f0hb1nix195kz1syrqqxpmvnvnfvphambj7xjrl3iljg0";
+  extraPatches = [
+    ./clang-4.8.patch
+    ./CVE-2017-10140-4.8-cwd-db_config.patch
+    ./darwin-mutexes-4.8.patch
+  ];
+
+  drvArgs.hardeningDisable = [ "format" ];
+  drvArgs.doCheck = false;
+})
diff --git a/nixpkgs/pkgs/development/libraries/db/db-5.3.nix b/nixpkgs/pkgs/development/libraries/db/db-5.3.nix
new file mode 100644
index 000000000000..2362cc9eecb0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/db/db-5.3.nix
@@ -0,0 +1,11 @@
+{ lib, stdenv, fetchurl, autoreconfHook, ... } @ args:
+
+import ./generic.nix (args // {
+  version = "5.3.28";
+  sha256 = "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0";
+  extraPatches = [
+    ./clang-5.3.patch
+    ./CVE-2017-10140-cwd-db_config.patch
+    ./darwin-mutexes.patch
+  ];
+})
diff --git a/nixpkgs/pkgs/development/libraries/db/db-6.0.nix b/nixpkgs/pkgs/development/libraries/db/db-6.0.nix
new file mode 100644
index 000000000000..0d8504c9234c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/db/db-6.0.nix
@@ -0,0 +1,12 @@
+{ lib, stdenv, fetchurl, autoreconfHook, ... } @ args:
+
+import ./generic.nix (args // {
+  version = "6.0.30";
+  sha256 = "1lhglbvg65j5slrlv7qv4vi3cvd7kjywa07gq1abzschycf4p3k0";
+  license = lib.licenses.agpl3;
+  extraPatches = [
+    ./clang-6.0.patch
+    ./CVE-2017-10140-cwd-db_config.patch
+    ./darwin-mutexes.patch
+  ];
+})
diff --git a/nixpkgs/pkgs/development/libraries/db/db-6.2.nix b/nixpkgs/pkgs/development/libraries/db/db-6.2.nix
new file mode 100644
index 000000000000..2c1cb455feae
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/db/db-6.2.nix
@@ -0,0 +1,12 @@
+{ lib, stdenv, fetchurl, autoreconfHook, ... } @ args:
+
+import ./generic.nix (args // {
+  version = "6.2.32";
+  sha256 = "1yx8wzhch5wwh016nh0kfxvknjkafv6ybkqh6nh7lxx50jqf5id9";
+  license = lib.licenses.agpl3;
+  extraPatches = [
+    ./clang-6.0.patch
+    ./CVE-2017-10140-cwd-db_config.patch
+    ./darwin-mutexes.patch
+  ];
+})
diff --git a/nixpkgs/pkgs/development/libraries/db/generic.nix b/nixpkgs/pkgs/development/libraries/db/generic.nix
new file mode 100644
index 000000000000..d715c1ffc8b1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/db/generic.nix
@@ -0,0 +1,95 @@
+{ lib, stdenv, fetchurl, autoreconfHook
+, cxxSupport ? true
+, compat185 ? true
+, dbmSupport ? false
+
+# Options from inherited versions
+, version, sha256
+, extraPatches ? [ ]
+, license ? lib.licenses.sleepycat
+, drvArgs ? {}
+}:
+
+stdenv.mkDerivation (rec {
+  pname = "db";
+  inherit version;
+
+  src = fetchurl {
+    url = "https://download.oracle.com/berkeley-db/${pname}-${version}.tar.gz";
+    sha256 = sha256;
+  };
+
+  # The provided configure script features `main` returning implicit `int`, which causes
+  # configure checks to work incorrectly with clang 16.
+  nativeBuildInputs = [ autoreconfHook ];
+
+  patches = extraPatches;
+
+  outputs = [ "bin" "out" "dev" ];
+
+  # Required when regenerated the configure script to make sure the vendored macros are found.
+  autoreconfFlags = [ "-fi" "-Iaclocal" "-Iaclocal_java" ];
+
+  preAutoreconf = ''
+    pushd dist
+    # Upstream’s `dist/s_config` cats everything into `aclocal.m4`, but that doesn’t work with
+    # autoreconfHook, so cat `config.m4` to another file. Otherwise, it won’t be found by `aclocal`.
+    cat aclocal/config.m4 >> aclocal/options.m4
+  '';
+
+  # This isn’t pretty. The version information is kept separate from the configure script.
+  # After the configure script is regenerated, the version information has to be replaced with the
+  # contents of `dist/RELEASE`.
+  postAutoreconf = ''
+    (
+      declare -a vars=(
+        "DB_VERSION_FAMILY"
+        "DB_VERSION_RELEASE"
+        "DB_VERSION_MAJOR"
+        "DB_VERSION_MINOR"
+        "DB_VERSION_PATCH"
+        "DB_VERSION_STRING"
+        "DB_VERSION_FULL_STRING"
+        "DB_VERSION_UNIQUE_NAME"
+        "DB_VERSION"
+      )
+      source RELEASE
+      for var in "''${vars[@]}"; do
+        sed -e "s/__EDIT_''${var}__/''${!var}/g" -i configure
+      done
+    )
+    popd
+  '';
+
+  configureFlags =
+    [
+      (if cxxSupport then "--enable-cxx" else "--disable-cxx")
+      (if compat185 then "--enable-compat185" else "--disable-compat185")
+    ]
+    ++ lib.optional dbmSupport "--enable-dbm"
+    ++ lib.optional stdenv.isFreeBSD "--with-pic";
+
+  preConfigure = ''
+    cd build_unix
+    configureScript=../dist/configure
+  '';
+
+  postInstall = ''
+    rm -rf $out/docs
+  '';
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  checkPhase = ''
+    make examples_c examples_cxx
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.oracle.com/database/technologies/related/berkeleydb.html";
+    description = "Berkeley DB";
+    license = license;
+    platforms = platforms.unix;
+  };
+} // drvArgs)
diff --git a/nixpkgs/pkgs/development/libraries/dbus-cplusplus/default.nix b/nixpkgs/pkgs/development/libraries/dbus-cplusplus/default.nix
new file mode 100644
index 000000000000..310016363253
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dbus-cplusplus/default.nix
@@ -0,0 +1,64 @@
+{ lib, stdenv, fetchurl, fetchpatch, dbus, glib, pkg-config, expat }:
+
+stdenv.mkDerivation rec {
+  pname = "dbus-cplusplus";
+  version = "0.9.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/dbus-cplusplus/dbus-c%2B%2B/0.9.0/libdbus-c%2B%2B-0.9.0.tar.gz";
+    name = "${pname}-${version}.tar.gz";
+    sha256 = "0qafmy2i6dzx4n1dqp6pygyy6gjljnb7hwjcj2z11c1wgclsq4dw";
+  };
+
+  patches = [
+    (fetchurl {
+      name = "gcc-4.7.patch";
+      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/"
+          + "dbus-c++/files/dbus-c++-0.9.0-gcc-4.7.patch";
+      sha256 = "0rwcz9pvc13b3yfr0lkifnfz0vb5q6dg240bzgf37ni4s8rpc72g";
+    })
+    (fetchpatch {
+      name = "writechar.patch"; # since gcc7
+      url = "https://src.fedoraproject.org/rpms/dbus-c++/raw/9f515ace0594c8b2b9f0d41ffe71bc5b78d30eee/f/dbus-c++-writechar.patch";
+      sha256 = "1kkg4gbpm4hp87l25zw2a3r9c58g7vvgzcqgiman734i66zsbb9l";
+    })
+    (fetchpatch {
+      name = "threading.patch"; # since gcc7
+      url = "https://src.fedoraproject.org/rpms/dbus-c++/raw/9f515ace0594c8b2b9f0d41ffe71bc5b78d30eee/f/dbus-c++-threading.patch";
+      sha256 = "1h362anx3wyxm5lq0v8girmip1jmkdbijrmbrq7k5pp47zkhwwrq";
+    })
+    (fetchpatch {
+      name = "template-operators.patch"; # since gcc12
+      url = "https://src.fedoraproject.org/rpms/dbus-c++/raw/9f515ace0594c8b2b9f0d41ffe71bc5b78d30eee/f/dbus-c++-template-operators.patch";
+      hash = "sha256-B8S7z/YH2YEQgaRsBJBBVTx8vHQhHW7z171TZmogpL8=";
+    })
+    (fetchpatch {
+      name = "0001-src-eventloop.cpp-use-portable-method-for-initializi.patch";
+      url = "https://github.com/openembedded/meta-openembedded/raw/119e75e48dbf0539b4e440417901458ffff79b38/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0001-src-eventloop.cpp-use-portable-method-for-initializi.patch";
+      hash = "sha256-GJWvp5F26c88OCGLrFcXaqUl2FMSDCluppMrRQO3rzc=";
+    })
+    (fetchpatch {
+      name = "0002-tools-generate_proxy.cpp-avoid-possibly-undefined-ui.patch";
+      url = "https://github.com/openembedded/meta-openembedded/raw/119e75e48dbf0539b4e440417901458ffff79b38/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0002-tools-generate_proxy.cpp-avoid-possibly-undefined-ui.patch";
+      hash = "sha256-P9JuG/6k5L6NTiAGH9JRfNcwpNVOV29RQC6fTj0fKZE=";
+    })
+    (fetchpatch {
+      name = "0003-Fixed-undefined-ssize_t-for-clang-3.8.0-on-FreeBSD.patch";
+      url = "https://github.com/openembedded/meta-openembedded/raw/119e75e48dbf0539b4e440417901458ffff79b38/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/0003-Fixed-undefined-ssize_t-for-clang-3.8.0-on-FreeBSD.patch";
+      hash = "sha256-/RCpDvaLIw0kmuBvUGbfnVEvgTKjIQWcSKWheCfgSmM=";
+    })
+  ];
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ dbus glib expat ];
+
+  configureFlags = [ "--disable-ecore" "--disable-tests" ];
+
+  meta = with lib; {
+    homepage = "https://dbus-cplusplus.sourceforge.net";
+    description = "C++ API for D-BUS";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/dbus-glib/default.nix b/nixpkgs/pkgs/development/libraries/dbus-glib/default.nix
new file mode 100644
index 000000000000..c6be0dd419db
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dbus-glib/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchurl, buildPackages
+, pkg-config, expat, gettext, libiconv, dbus, glib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dbus-glib";
+  version = "0.112";
+
+  src = fetchurl {
+    url = "${meta.homepage}/releases/dbus-glib/dbus-glib-${version}.tar.gz";
+    sha256 = "sha256-fVUNzN/NKG4ziVUBgp7Zce62XGFOc6rbSgiu73GbFDo=";
+  };
+
+  outputs = [ "out" "dev" "devdoc" ];
+  outputBin = "dev";
+
+  nativeBuildInputs = [ pkg-config gettext glib ];
+
+  buildInputs = [ expat libiconv ];
+
+  propagatedBuildInputs = [ dbus glib ];
+
+  configureFlags = [ "--exec-prefix=${placeholder "dev"}" ] ++
+    lib.optional (stdenv.buildPlatform != stdenv.hostPlatform)
+      "--with-dbus-binding-tool=${buildPackages.dbus-glib.dev}/bin/dbus-binding-tool";
+
+  doCheck = false;
+
+  passthru = { inherit dbus glib; };
+
+  meta = {
+    homepage = "https://dbus.freedesktop.org";
+    license = with lib.licenses; [ afl21 gpl2Plus ];
+    description = "Obsolete glib bindings for D-Bus lightweight IPC mechanism";
+    maintainers = [ ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/dbus-sharp-glib/dbus-sharp-glib-1.0.nix b/nixpkgs/pkgs/development/libraries/dbus-sharp-glib/dbus-sharp-glib-1.0.nix
new file mode 100644
index 000000000000..f47c91ca3eaf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dbus-sharp-glib/dbus-sharp-glib-1.0.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, mono, dbus-sharp-1_0 }:
+
+stdenv.mkDerivation rec {
+  pname = "dbus-sharp-glib";
+  version = "0.5";
+
+  src = fetchFromGitHub {
+    owner = "mono";
+    repo = "dbus-sharp-glib";
+
+    rev = "v${version}";
+    sha256 = "0z8ylzby8n5sar7aywc8rngd9ap5qqznadsscp5v34cacdfz1gxm";
+  };
+
+  nativeBuildInputs = [ pkg-config autoreconfHook ];
+  buildInputs = [ mono dbus-sharp-1_0 ];
+
+  dontStrip = true;
+
+  meta = with lib; {
+    description = "D-Bus for .NET: GLib integration module";
+    platforms = platforms.linux;
+    license = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/dbus-sharp-glib/default.nix b/nixpkgs/pkgs/development/libraries/dbus-sharp-glib/default.nix
new file mode 100644
index 000000000000..65cd89043663
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dbus-sharp-glib/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, mono, dbus-sharp-2_0, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "dbus-sharp-glib";
+  version = "0.6";
+
+  src = fetchFromGitHub {
+    owner = "mono";
+    repo = "dbus-sharp-glib";
+
+    rev = "v${version}";
+    sha256 = "0i39kfg731as6j0hlmasgj8dyw5xsak7rl2dlimi1naphhffwzm8";
+  };
+
+  nativeBuildInputs = [ pkg-config autoreconfHook ];
+  buildInputs = [ mono dbus-sharp-2_0 ];
+
+  dontStrip = true;
+
+  meta = with lib; {
+    description = "D-Bus for .NET: GLib integration module";
+    platforms = platforms.linux;
+    license = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/dbus-sharp/dbus-sharp-1.0.nix b/nixpkgs/pkgs/development/libraries/dbus-sharp/dbus-sharp-1.0.nix
new file mode 100644
index 000000000000..eb1b20e29eb1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dbus-sharp/dbus-sharp-1.0.nix
@@ -0,0 +1,25 @@
+{lib, stdenv, fetchFromGitHub, pkg-config, mono, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "dbus-sharp";
+  version = "0.7";
+
+  src = fetchFromGitHub {
+    owner = "mono";
+    repo = "dbus-sharp";
+
+    rev = "v${version}";
+    sha256 = "13qlqx9wqahfpzzl59157cjxprqcx2bd40w5gb2bs3vdx058p562";
+  };
+
+  nativeBuildInputs = [ pkg-config autoreconfHook ];
+  buildInputs = [ mono ];
+
+  dontStrip = true;
+
+  meta = with lib; {
+    description = "D-Bus for .NET";
+    platforms = platforms.linux;
+    license = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/dbus-sharp/default.nix b/nixpkgs/pkgs/development/libraries/dbus-sharp/default.nix
new file mode 100644
index 000000000000..c64d7bbef992
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dbus-sharp/default.nix
@@ -0,0 +1,28 @@
+{lib, stdenv, fetchFromGitHub, pkg-config, mono4, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "dbus-sharp";
+  version = "0.8.1";
+
+  src = fetchFromGitHub {
+    owner = "mono";
+    repo = "dbus-sharp";
+
+    rev = "v${version}";
+    sha256 = "1g5lblrvkd0wnhfzp326by6n3a9mj2bj7a7646g0ziwgsxp5w6y7";
+  };
+
+  nativeBuildInputs = [ pkg-config autoreconfHook ];
+
+  # Use msbuild when https://github.com/NixOS/nixpkgs/pull/43680 is merged
+  # See: https://github.com/NixOS/nixpkgs/pull/46060
+  buildInputs = [ mono4 ];
+
+  dontStrip = true;
+
+  meta = with lib; {
+    description = "D-Bus for .NET";
+    platforms = platforms.linux;
+    license = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/dbus/default.nix b/nixpkgs/pkgs/development/libraries/dbus/default.nix
new file mode 100644
index 000000000000..cb5fe9e4fbd3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dbus/default.nix
@@ -0,0 +1,124 @@
+{ stdenv
+, lib
+, fetchurl
+, pkg-config
+, expat
+, enableSystemd ? lib.meta.availableOn stdenv.hostPlatform systemdMinimal
+, systemdMinimal
+, audit
+, libapparmor
+, dbus
+, docbook_xml_dtd_44
+, docbook-xsl-nons
+, xmlto
+, autoreconfHook
+, autoconf-archive
+, x11Support ? (stdenv.isLinux || stdenv.isDarwin)
+, xorg
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dbus";
+  version = "1.14.10";
+
+  src = fetchurl {
+    url = "https://dbus.freedesktop.org/releases/dbus/dbus-${version}.tar.xz";
+    sha256 = "sha256-uh8h0r2dM52i1KqHgMCd8y/qh5mLc9ok9Jq53x42pQ8=";
+  };
+
+  patches = lib.optional stdenv.isSunOS ./implement-getgrouplist.patch;
+
+  postPatch = ''
+    substituteInPlace bus/Makefile.am \
+      --replace 'install-data-hook:' 'disabled:' \
+      --replace '$(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus' ':'
+    substituteInPlace tools/Makefile.am \
+      --replace 'install-data-local:' 'disabled:' \
+      --replace 'installcheck-local:' 'disabled:'
+  '' + /* cleanup of runtime references */ ''
+    substituteInPlace ./dbus/dbus-sysdeps-unix.c \
+      --replace 'DBUS_BINDIR "/dbus-launch"' "\"$lib/bin/dbus-launch\""
+    substituteInPlace ./tools/dbus-launch.c \
+      --replace 'DBUS_DAEMONDIR"/dbus-daemon"' '"/run/current-system/sw/bin/dbus-daemon"'
+  '';
+
+  outputs = [ "out" "dev" "lib" "doc" "man" ];
+  separateDebugInfo = true;
+
+  strictDeps = true;
+  nativeBuildInputs = [
+    autoreconfHook
+    autoconf-archive
+    pkg-config
+    docbook_xml_dtd_44
+    docbook-xsl-nons
+    xmlto
+  ];
+
+  propagatedBuildInputs = [
+    expat
+  ];
+
+  buildInputs =
+    lib.optionals x11Support (with xorg; [
+      libX11
+      libICE
+      libSM
+    ]) ++ lib.optional enableSystemd systemdMinimal
+    ++ lib.optionals stdenv.isLinux [ audit libapparmor ];
+  # ToDo: optional selinux?
+
+  __darwinAllowLocalNetworking = true;
+
+  configureFlags = [
+    "--enable-user-session"
+    "--enable-xml-docs"
+    "--libexecdir=${placeholder "out"}/libexec"
+    "--datadir=/etc"
+    "--localstatedir=/var"
+    "--runstatedir=/run"
+    "--sysconfdir=/etc"
+    "--with-session-socket-dir=/tmp"
+    "--with-system-pid-file=/run/dbus/pid"
+    "--with-system-socket=/run/dbus/system_bus_socket"
+    "--with-systemdsystemunitdir=${placeholder "out"}/etc/systemd/system"
+    "--with-systemduserunitdir=${placeholder "out"}/etc/systemd/user"
+  ] ++ lib.optional (!x11Support) "--without-x"
+  ++ lib.optionals stdenv.isLinux [ "--enable-apparmor" "--enable-libaudit" ]
+  ++ lib.optionals enableSystemd [ "SYSTEMCTL=${systemdMinimal}/bin/systemctl" ];
+
+  NIX_CFLAGS_LINK = lib.optionalString (!stdenv.isDarwin) "-Wl,--as-needed";
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  makeFlags = [
+    # Fix paths in XML catalog broken by mismatching build/install datadir.
+    "dtddir=${placeholder "out"}/share/xml/dbus-1"
+  ];
+
+  installFlags = [
+    "sysconfdir=${placeholder "out"}/etc"
+    "datadir=${placeholder "out"}/share"
+  ];
+
+  # it's executed from $lib by absolute path
+  postFixup = ''
+    moveToOutput bin/dbus-launch "$lib"
+    ln -s "$lib/bin/dbus-launch" "$out/bin/"
+  '';
+
+  passthru = {
+    dbus-launch = "${dbus.lib}/bin/dbus-launch";
+  };
+
+  meta = with lib; {
+    description = "Simple interprocess messaging system";
+    homepage = "https://www.freedesktop.org/wiki/Software/dbus/";
+    changelog = "https://gitlab.freedesktop.org/dbus/dbus/-/blob/dbus-${version}/NEWS";
+    license = licenses.gpl2Plus; # most is also under AFL-2.1
+    maintainers = teams.freedesktop.members ++ (with maintainers; [ ]);
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/dbus/implement-getgrouplist.patch b/nixpkgs/pkgs/development/libraries/dbus/implement-getgrouplist.patch
new file mode 100644
index 000000000000..e3a4a25cb720
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dbus/implement-getgrouplist.patch
@@ -0,0 +1,108 @@
+Compatibility patch for Illumos/Solaris and possibly other platforms.
+Implements getgrouplist when not provided by OS.
+Without it, only the user's primary group is used in authentication!
+--- 	1970-01-01 00:00:00.000000000 +0000
++++ dbus-1.6.8/dbus/getgrouplist.c	2013-02-28 13:10:51.081792722 +0000
+@@ -0,0 +1,89 @@
++/*	$OpenBSD: getgrouplist.c,v 1.12 2005/08/08 08:05:34 espie Exp $ */
++/*
++ * Copyright (c) 1991, 1993
++ *	The Regents of the University of California.  All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 3. Neither the name of the University nor the names of its contributors
++ *    may be used to endorse or promote products derived from this software
++ *    without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ */
++
++/* OPENBSD ORIGINAL: lib/libc/gen/getgrouplist.c */
++
++/*
++ * get credential
++ */
++#include <sys/types.h>
++#include <string.h>
++#include <unistd.h>
++#include <grp.h>
++
++int
++getgrouplist(const char *uname, gid_t agroup, gid_t *groups, int *grpcnt)
++{
++	struct group *grp;
++	int i, ngroups;
++	int ret, maxgroups;
++	int bail;
++
++	ret = 0;
++	ngroups = 0;
++	maxgroups = *grpcnt;
++
++	/*
++	 * install primary group
++	 */
++	if (ngroups >= maxgroups) {
++		*grpcnt = ngroups;
++		return (-1);
++	}
++	groups[ngroups++] = agroup;
++
++	/*
++	 * Scan the group file to find additional groups.
++	 */
++	setgrent();
++	while ((grp = getgrent())) {
++		if (grp->gr_gid == agroup)
++			continue;
++		for (bail = 0, i = 0; bail == 0 && i < ngroups; i++)
++			if (groups[i] == grp->gr_gid)
++				bail = 1;
++		if (bail)
++			continue;
++		for (i = 0; grp->gr_mem[i]; i++) {
++			if (!strcmp(grp->gr_mem[i], uname)) {
++				if (ngroups >= maxgroups) {
++					ret = -1;
++					goto out;
++				}
++				groups[ngroups++] = grp->gr_gid;
++				break;
++			}
++		}
++	}
++out:
++	endgrent();
++	*grpcnt = ngroups;
++	return (ret);
++}
+--- dbus-1.6.8/dbus/dbus-sysdeps-unix.c.orig	2013-02-28 13:08:52.171215237 +0000
++++ dbus-1.6.8/dbus/dbus-sysdeps-unix.c	2013-02-28 13:13:52.224615146 +0000
+@@ -21,6 +21,10 @@
+  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+  *
+  */
++#ifndef HAVE_GETGROUPLIST
++#include "getgrouplist.c"
++#define HAVE_GETGROUPLIST
++#endif
+ 
+ #include <config.h>
+ 
diff --git a/nixpkgs/pkgs/development/libraries/dbus/make-dbus-conf.nix b/nixpkgs/pkgs/development/libraries/dbus/make-dbus-conf.nix
new file mode 100644
index 000000000000..0a8b630d073b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dbus/make-dbus-conf.nix
@@ -0,0 +1,49 @@
+{ runCommand
+, writeText
+, libxslt
+, dbus
+, findXMLCatalogs
+, serviceDirectories ? []
+, suidHelper ? "/var/setuid-wrappers/dbus-daemon-launch-helper"
+, apparmor ? "disabled" # one of enabled, disabled, required
+}:
+
+/* DBus has two configuration parsers -- normal and "trivial", which is used
+ * for suid helper. Unfortunately the latter doesn't support <include>
+ * directive. That means that we can't just place our configuration to
+ * *-local.conf -- it needs to be in the main configuration file.
+ */
+runCommand "dbus-1"
+  {
+    inherit serviceDirectories suidHelper apparmor;
+    preferLocalBuild = true;
+    allowSubstitutes = false;
+
+    nativeBuildInputs = [
+      libxslt.bin
+      findXMLCatalogs
+    ];
+
+    buildInputs = [
+      dbus.out
+    ];
+  }
+  ''
+    mkdir -p $out
+
+    xsltproc --nonet \
+      --stringparam serviceDirectories "$serviceDirectories" \
+      --stringparam suidHelper "$suidHelper" \
+      --stringparam apparmor "$apparmor" \
+      ${./make-system-conf.xsl} ${dbus}/share/dbus-1/system.conf \
+      > $out/system.conf
+    xsltproc --nonet \
+      --stringparam serviceDirectories "$serviceDirectories" \
+      --stringparam apparmor "$apparmor" \
+      ${./make-session-conf.xsl} ${dbus}/share/dbus-1/session.conf \
+      > $out/session.conf
+
+    # check if files are empty or only contain space characters
+    grep -q '[^[:space:]]' "$out/system.conf" || (echo "\"$out/system.conf\" was generated incorrectly and is empty, try building again." && exit 1)
+    grep -q '[^[:space:]]' "$out/session.conf" || (echo "\"$out/session.conf\" was generated incorrectly and is empty, try building again." && exit 1)
+  ''
diff --git a/nixpkgs/pkgs/development/libraries/dbus/make-session-conf.xsl b/nixpkgs/pkgs/development/libraries/dbus/make-session-conf.xsl
new file mode 100644
index 000000000000..a744905cdd39
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dbus/make-session-conf.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+
+<!--
+  This script copies the original system.conf from the dbus
+  distribution, but sets paths from $serviceDirectories parameter
+  and suid helper from $suidHelper parameter.
+-->
+
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:str="http://exslt.org/strings"
+                extension-element-prefixes="str"
+                >
+
+  <xsl:output method='xml' encoding="UTF-8" doctype-system="busconfig.dtd" />
+
+  <xsl:param name="serviceDirectories" />
+  <xsl:param name="apparmor" />
+
+  <xsl:template match="/busconfig">
+    <busconfig>
+      <!-- We leave <standard_session_servicedirs/> because it includes XDG dirs and therefore user Nix profile. -->
+      <xsl:copy-of select="child::node()[name() != 'include' and name() != 'servicedir' and name() != 'includedir']" />
+
+      <!-- configure AppArmor -->
+      <apparmor mode="{$apparmor}"/>
+
+      <xsl:for-each select="str:tokenize($serviceDirectories)">
+        <servicedir><xsl:value-of select="." />/share/dbus-1/services</servicedir>
+        <includedir><xsl:value-of select="." />/etc/dbus-1/session.d</includedir>
+        <includedir><xsl:value-of select="." />/share/dbus-1/session.d</includedir>
+      </xsl:for-each>
+    </busconfig>
+  </xsl:template>
+
+</xsl:stylesheet>
diff --git a/nixpkgs/pkgs/development/libraries/dbus/make-system-conf.xsl b/nixpkgs/pkgs/development/libraries/dbus/make-system-conf.xsl
new file mode 100644
index 000000000000..06233e764e16
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dbus/make-system-conf.xsl
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+
+<!--
+  This script copies the original system.conf from the dbus
+  distribution, but sets paths from $serviceDirectories parameter
+  and suid helper from $suidHelper parameter.
+-->
+
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:str="http://exslt.org/strings"
+                extension-element-prefixes="str"
+                >
+
+  <xsl:output method='xml' encoding="UTF-8" doctype-system="busconfig.dtd" />
+
+  <xsl:param name="serviceDirectories" />
+  <xsl:param name="suidHelper" />
+  <xsl:param name="apparmor" />
+
+  <xsl:template match="/busconfig">
+    <busconfig>
+      <xsl:copy-of select="child::node()[name() != 'include' and name() != 'standard_system_servicedirs' and name() != 'servicehelper' and name() != 'servicedir' and name() != 'includedir']" />
+
+      <!-- configure AppArmor -->
+      <apparmor mode="{$apparmor}"/>
+
+      <!-- set suid helper -->
+      <servicehelper><xsl:value-of select="$suidHelper" /></servicehelper>
+
+      <xsl:for-each select="str:tokenize($serviceDirectories)">
+        <servicedir><xsl:value-of select="." />/share/dbus-1/system-services</servicedir>
+        <includedir><xsl:value-of select="." />/etc/dbus-1/system.d</includedir>
+        <includedir><xsl:value-of select="." />/share/dbus-1/system.d</includedir>
+      </xsl:for-each>
+    </busconfig>
+  </xsl:template>
+
+</xsl:stylesheet>
diff --git a/nixpkgs/pkgs/development/libraries/dbxml/cxx11.patch b/nixpkgs/pkgs/development/libraries/dbxml/cxx11.patch
new file mode 100644
index 000000000000..f264515c7d67
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dbxml/cxx11.patch
@@ -0,0 +1,59 @@
+diff -urN dbxml-6.1.4.orig/dbxml/src/dbxml/nodeStore/NsUpdate.cpp dbxml-6.1.4/dbxml/src/dbxml/nodeStore/NsUpdate.cpp
+--- dbxml-6.1.4.orig/dbxml/src/dbxml/nodeStore/NsUpdate.cpp	2017-05-01 16:05:29.000000000 +0100
++++ dbxml-6.1.4/dbxml/src/dbxml/nodeStore/NsUpdate.cpp	2017-09-04 11:50:20.000000000 +0100
+@@ -1359,21 +1359,13 @@
+ void NsUpdate::attributeRemoved(const DbXmlNodeImpl &node)
+ {
+ 	string key = makeKey(node);
+-#if defined(_MSC_VER) && (_MSC_VER>1600)
+ 	attrMap_.insert(make_pair(key,node.getIndex()));
+-#else
+-	attrMap_.insert(make_pair<const std::string, int>(key,node.getIndex()));
+-#endif
+ }
+ 
+ void NsUpdate::textRemoved(const DbXmlNodeImpl &node)
+ {
+ 	string key = makeKey(node);
+-#if defined(_MSC_VER) && (_MSC_VER>1600)
+ 	textDeleteMap_.insert(make_pair(key,node.getIndex()));
+-#else
+-	textDeleteMap_.insert(make_pair<const std::string, int>(key,node.getIndex()));
+-#endif
+ }
+ 
+ void NsUpdate::textRemoved(int index, const NsNid &nid,
+@@ -1381,21 +1373,13 @@
+ 			   const std::string &cname)
+ {
+ 	string key = makeKey(nid, did, cname);
+-#if defined(_MSC_VER) && (_MSC_VER>1600)
+ 	textDeleteMap_.insert(make_pair(key,index));
+-#else
+-	textDeleteMap_.insert(make_pair<const std::string, int>(key,index));
+-#endif
+ }
+ 
+ void NsUpdate::textInserted(int index, const DbXmlNodeImpl &node)
+ {
+ 	string key = makeKey(node);
+-#if defined(_MSC_VER) && (_MSC_VER>1600)
+ 	textInsertMap_.insert(make_pair(key,index));
+-#else
+-	textInsertMap_.insert(make_pair<const std::string, int>(key,index));
+-#endif
+ }
+ 
+ void NsUpdate::textInserted(int index, const NsNid &nid,
+@@ -1403,11 +1387,7 @@
+ 			    const std::string &cname)
+ {
+ 	string key = makeKey(nid, did, cname);
+-#if defined(_MSC_VER) && (_MSC_VER>1600)
+ 	textInsertMap_.insert(make_pair(key,index));
+-#else
+-	textInsertMap_.insert(make_pair<const std::string, int>(key,index));
+-#endif
+ }
+ 
+ //
diff --git a/nixpkgs/pkgs/development/libraries/dbxml/default.nix b/nixpkgs/pkgs/development/libraries/dbxml/default.nix
new file mode 100644
index 000000000000..c65e7ad93eca
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dbxml/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, fetchurl, db62, xercesc, xqilla }:
+
+stdenv.mkDerivation rec {
+  pname = "dbxml";
+  version = "6.1.4";
+
+  src = fetchurl {
+    url = "http://download.oracle.com/berkeley-db/${pname}-${version}.tar.gz";
+    sha256 = "a8fc8f5e0c3b6e42741fa4dfc3b878c982ff8f5e5f14843f6a7e20d22e64251a";
+  };
+
+  outputs = [ "bin" "dev" "out" ];
+
+  patches = [
+    ./cxx11.patch
+    ./incorrect-optimization.patch
+  ];
+
+  buildInputs = [
+    xercesc xqilla
+  ];
+
+  propagatedBuildInputs = [
+    db62
+  ];
+
+  configureFlags = [
+    "--with-berkeleydb=${db62.out}"
+    "--with-xerces=${xercesc}"
+    "--with-xqilla=${xqilla}"
+  ];
+
+  preConfigure = ''
+    cd dbxml
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.oracle.com/database/berkeley-db/xml.html";
+    description = "Embeddable XML database based on Berkeley DB";
+    license = licenses.agpl3;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/dbxml/incorrect-optimization.patch b/nixpkgs/pkgs/development/libraries/dbxml/incorrect-optimization.patch
new file mode 100644
index 000000000000..630dc972e188
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dbxml/incorrect-optimization.patch
@@ -0,0 +1,34 @@
+Patch provided by Lauren Foutz. See:
+https://community.oracle.com/thread/4093422
+
+--- dbxml-6.1.4-orig/dbxml/src/dbxml/query/ParentOfChildJoinQP.cpp
++++ dbxml-6.1.4/dbxml/src/dbxml/query/ParentOfChildJoinQP.cpp
+@@ -139,28 +139,16 @@ bool ParentOfChildIterator::doJoin(Dynam
+ 
+ 	// Invarient 4: When ancestorStack_ is empty we can output the
+ 	// buffered results_, since any more results will come after them in
+ 	// document order.
+ 
+ 	while(true) {
+ 		context->testInterrupt();
+ 
+-		/* 
+-		 * If current parent's node level already be larger than
+-		 * childen's, abandon current parent and move to next one.
+-		 */
+-		if (parents_ != NULL && 
+-		    parents_->getNodeLevel() > children_->getNodeLevel()) {
+-			if(!parents_->next(context)) {
+-				delete parents_;
+-				parents_ = 0;
+-			}
+-		}
+-
+ 		int cmp = parents_ == 0 ? -1 : isDescendantOf(children_, parents_, /*orSelf*/false);
+ 		if(cmp < 0) {
+ 			if(!ancestorStack_.empty()) {
+ 				// We've found the closest ancestor - is it a parent?
+ 				if(ancestorStack_.back()->getNodeLevel() == (children_->getNodeLevel() - 1)) {
+ 					// Maintain invarient 3
+ 					if(results_.empty() || NodeInfo::compare(results_.back(), ancestorStack_.back()) < 0)
+ 						results_.push_back(ancestorStack_.back());
diff --git a/nixpkgs/pkgs/development/libraries/dclib/default.nix b/nixpkgs/pkgs/development/libraries/dclib/default.nix
new file mode 100644
index 000000000000..05ea7db2cacc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dclib/default.nix
@@ -0,0 +1,20 @@
+{lib, stdenv, fetchurl, libxml2, openssl, bzip2}:
+
+stdenv.mkDerivation rec {
+  pname = "dclib";
+  version = "0.3.7";
+
+  src = fetchurl {
+    url = "ftp://ftp.debian.nl/pub/freebsd/ports/distfiles/dclib-${version}.tar.bz2";
+    sha256 = "02jdzm5hqzs1dv2rd596vgpcjaapm55pqqapz5m94l30v4q72rfc";
+  };
+
+  buildInputs = [libxml2 openssl bzip2];
+
+  meta = with lib; {
+    description = "Peer-to-Peer file sharing client";
+    homepage = "http://dcgui.berlios.de";
+    platforms = platforms.linux;
+    license = [ licenses.openssl licenses.gpl2 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/dclxvi/default.nix b/nixpkgs/pkgs/development/libraries/dclxvi/default.nix
new file mode 100644
index 000000000000..ac2664a1c9f9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dclxvi/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation {
+  pname = "dclxvi";
+  version = "unstable-2013-01-27";
+
+  src = fetchFromGitHub {
+    owner = "agl";
+    repo = "dclxvi";
+    rev = "74009d58f2305be3b95d88717619bde8ecbdd9a2";
+    sha256 = "1kx4h8iv7yb30c6zjmj8zs9x12vxhi0jwkiwxsxj9swf6bww6p1g";
+  };
+
+  buildFlags = [ "libdclxvipairing.so" ];
+
+  patchPhase = ''
+    substituteInPlace Makefile \
+      --replace "gcc" "cc"
+  '' + lib.optionalString stdenv.isDarwin ''
+    substituteInPlace Makefile \
+      --replace "-soname=libdclxvipairing.so" "-install_name,libdclxvipairing.so"
+  '';
+
+  installPhase = ''
+    mkdir -p $out/{include,lib}
+    find . -name \*.h -exec cp {} $out/include \;
+    find . -name \*.so -exec cp {} $out/lib \;
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/agl/dclxvi";
+    description = "Naehrig, Niederhagen and Schwabe's pairings code, massaged into a shared library";
+    platforms = platforms.x86_64;
+    license = licenses.publicDomain;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/dconf/default.nix b/nixpkgs/pkgs/development/libraries/dconf/default.nix
new file mode 100644
index 000000000000..2f8ea0e685e8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dconf/default.nix
@@ -0,0 +1,85 @@
+{ lib, stdenv
+, fetchurl
+, meson
+, mesonEmulatorHook
+, ninja
+, python3
+, vala
+, libxslt
+, pkg-config
+, glib
+, bash-completion
+, dbus
+, gnome
+, gtk-doc
+, docbook-xsl-nons
+, docbook_xml_dtd_42
+, withDocs ? true
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dconf";
+  version = "0.40.0";
+
+  outputs = [ "out" "lib" "dev" ]
+    ++ lib.optional withDocs "devdoc";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "0cs5nayg080y8pb9b7qccm1ni8wkicdmqp1jsgc22110r6j24zyg";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    python3
+    libxslt
+    glib
+    docbook-xsl-nons
+    docbook_xml_dtd_42
+    gtk-doc
+  ] ++ lib.optionals (withDocs && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook  # gtkdoc invokes the host binary to produce documentation
+  ];
+
+
+  buildInputs = [
+    glib
+    bash-completion
+    dbus
+    vala
+  ];
+
+  mesonFlags = [
+    "--sysconfdir=/etc"
+    "-Dgtk_doc=${lib.boolToString withDocs}"
+  ];
+
+  nativeCheckInputs = [
+    dbus # for dbus-daemon
+  ];
+
+  doCheck = !stdenv.isAarch32 && !stdenv.isAarch64 && !stdenv.isDarwin;
+
+  postPatch = ''
+    chmod +x meson_post_install.py tests/test-dconf.py
+    patchShebangs meson_post_install.py
+    patchShebangs tests/test-dconf.py
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://wiki.gnome.org/Projects/dconf";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.unix;
+    maintainers = teams.gnome.members;
+    mainProgram = "dconf";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/dee/0001-Fix-build-with-Vala-0.54.patch b/nixpkgs/pkgs/development/libraries/dee/0001-Fix-build-with-Vala-0.54.patch
new file mode 100644
index 000000000000..4ad8ec8ffc73
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dee/0001-Fix-build-with-Vala-0.54.patch
@@ -0,0 +1,29 @@
+From 7bc49f8edd9a49d675ee5b163ab61b405e2d0258 Mon Sep 17 00:00:00 2001
+From: Jan Tojnar <jtojnar@gmail.com>
+Date: Thu, 7 Oct 2021 21:42:26 +0200
+Subject: [PATCH] Fix build with Vala 0.54
+
+Vala codegen now emits constructor methods so we need to skip @new
+so that we can use a custom one from our VAPI overrides.
+
+https://gitlab.gnome.org/GNOME/vala/-/commit/472765b90cd98c1a628975d20005c46352d665f8
+---
+ vapi/Dee-1.0.metadata | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/vapi/Dee-1.0.metadata b/vapi/Dee-1.0.metadata
+index 7e80de0..793ffd8 100644
+--- a/vapi/Dee-1.0.metadata
++++ b/vapi/Dee-1.0.metadata
+@@ -1,6 +1,8 @@
+ GListResultSet skip
+ GListResultSetClass skip
+ 
++Filter
++	.new skip
+ FilterModel
+ 	.filter unowned
+ Model
+-- 
+2.33.0
+
diff --git a/nixpkgs/pkgs/development/libraries/dee/default.nix b/nixpkgs/pkgs/development/libraries/dee/default.nix
new file mode 100644
index 000000000000..4a2199f450e6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dee/default.nix
@@ -0,0 +1,72 @@
+{ lib, stdenv
+, fetchgit
+, fetchpatch
+, pkg-config
+, glib
+, icu
+, gobject-introspection
+, dbus-glib
+, vala
+, python3
+, autoreconfHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dee";
+  version = "unstable-2017-06-16";
+
+  outputs = [ "out" "dev" "py" ];
+
+  src = fetchgit {
+    url = "https://git.launchpad.net/ubuntu/+source/dee";
+    rev = "import/1.2.7+17.10.20170616-4ubuntu3";
+    sha256 = "09blrdj7229vscp4mkg0fabmcvc6jdpamvblrq86rbky7j2nnwlk";
+  };
+
+  patches = [
+    "${src}/debian/patches/gtkdocize.patch"
+    "${src}/debian/patches/strict-prototype.patch"
+    "${src}/debian/patches/vapi-skip-properties.patch"
+    ./0001-Fix-build-with-Vala-0.54.patch
+
+    # Fixes glib 2.62 deprecations
+    (fetchpatch {
+      name = "dee-1.2.7-deprecated-g_type_class_add_private.patch";
+      url = "https://src.fedoraproject.org/rpms/dee/raw/1a9a4ce3377074fabfca653ffe0287cd73aef82f/f/dee-1.2.7-deprecated-g_type_class_add_private.patch";
+      sha256 = "13nyprq7bb7lnzkcb7frcpzidbl836ycn5bvmwa2k0nhmj6ycbx5";
+    })
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+    vala
+    autoreconfHook
+    gobject-introspection
+    python3
+  ];
+
+  buildInputs = [
+    glib
+    icu
+    dbus-glib
+  ];
+
+  configureFlags = [
+    "--disable-gtk-doc"
+    "--with-pygi-overrides-dir=${placeholder "py"}/${python3.sitePackages}/gi/overrides"
+  ];
+
+  # Compilation fails after a change in glib where
+  # g_string_free now returns a value
+  env.NIX_CFLAGS_COMPILE = "-Wno-error=unused-result";
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "A library that uses DBus to provide objects allowing you to create Model-View-Controller type programs across DBus";
+    homepage = "https://launchpad.net/dee";
+    license = licenses.lgpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ abbradar ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/directfb/default.nix b/nixpkgs/pkgs/development/libraries/directfb/default.nix
new file mode 100644
index 000000000000..e7a7996d91f2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/directfb/default.nix
@@ -0,0 +1,105 @@
+{ stdenv, lib, fetchFromGitHub, fetchpatch
+, autoreconfHook, perl, pkg-config, flux, zlib
+, libjpeg, freetype, libpng, giflib
+, enableX11 ? true, xorg
+, enableSDL ? true, SDL }:
+
+stdenv.mkDerivation rec {
+  pname = "directfb";
+  version = "1.7.7";
+
+  src = fetchFromGitHub {
+    owner = "deniskropp";
+    repo = "DirectFB";
+    rev = "DIRECTFB_${lib.replaceStrings ["."] ["_"] version}";
+    sha256 = "0bs3yzb7hy3mgydrj8ycg7pllrd2b6j0gxj596inyr7ihssr3i0y";
+  };
+
+  patches = [
+    # Fixes build in "davinci" with glibc >= 2.28
+    # The "davinci" module is only enabled on 32-bit arm.
+    # https://github.com/deniskropp/DirectFB/pull/17
+    (fetchpatch {
+      url = "https://github.com/deniskropp/DirectFB/commit/3a236241bbec3f15b012b6f0dbe94353d8094557.patch";
+      sha256 = "0rj3gv0zlb225sqjz04p4yagy4xacf3210aa8vra8i1f0fv0w4kw";
+    })
+
+    # Fixes for build of `pkgsMusl.directfb`; applied everywhere to prevent patchrot
+    (fetchpatch {
+      url = "https://git.alpinelinux.org/aports/plain/community/directfb/0001-directfb-fix-musl-compile.patch?id=f8158258493fc0c3eb5de2302e40f4bc44ecfb09";
+      sha256 = "sha256-hmwzbaXu30ZkAqUn1NmvtlJkM6ctddKcO4hxh+1LSS4=";
+    })
+    (fetchpatch {
+      url = "https://git.alpinelinux.org/aports/plain/community/directfb/0002-Fix-musl-PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP-comp.patch?id=f8158258493fc0c3eb5de2302e40f4bc44ecfb09";
+      sha256 = "sha256-j3+mcP6hV9LKuba1GOdcM1cZfmXuJtRgx4vE484jIns=";
+    })
+  ];
+
+  postPatch = ''
+    # https://github.com/deniskropp/DirectFB/blob/master/src/core/Makefile.am#L15
+    # BUILDTIME is embedded in the result
+    # if switching to cmake then a similar substitution has to be done
+    substituteInPlace src/core/Makefile.am \
+      --replace '`date -u "+%Y-%m-%d %H:%M"`' "`date -u \"+%Y-%m-%d %H:%M\" --date="@''${SOURCE_DATE_EPOCH}"`"
+  '' + lib.optionalString stdenv.hostPlatform.isMusl ''
+    # Specifically patch out two drivers that have build errors with musl libc,
+    # while leaving the rest of the default selection enabled
+    substituteInPlace configure.in \
+      --replace checkfor_lirc={yes,no} \
+      --replace checkfor_matrox={yes,no}
+  '';
+
+  nativeBuildInputs = [ autoreconfHook perl pkg-config flux ];
+
+  buildInputs = [ zlib libjpeg freetype giflib libpng ]
+    ++ lib.optional enableSDL SDL
+    ++ lib.optionals enableX11 (with xorg; [
+      xorgproto libX11 libXext
+      libXrender
+    ]);
+
+  NIX_LDFLAGS = "-lgcc_s";
+
+  configureFlags = [
+    "--enable-sdl"
+    "--enable-zlib"
+    "--with-gfxdrivers=all"
+    "--enable-devmem"
+    "--enable-fbdev"
+    "--enable-mmx"
+    "--enable-sse"
+    "--with-software"
+  ]
+    ++ lib.optional (!stdenv.hostPlatform.isMusl) "--with-smooth-scaling"
+    ++ lib.optional enableX11 "--enable-x11"
+  ;
+
+  # Disable parallel building as parallel builds fail due to incomplete
+  # depends between autogenerated CoreSlave.h and it's include sites:
+  #    CC       prealloc_surface_pool_bridge.lo
+  #    prealloc_surface_pool_bridge.c:41:10:
+  #        fatal error: core/CoreSlave.h: No such file or directory
+  #
+  # Dependencies are specified manually in src/core/Makefile.am. Instead
+  # of fixing them one by one locally let's disable parallel builds until
+  # upstream fixes them.
+  enableParallelBuilding = false;
+
+  meta = with lib; {
+    description = "Graphics and input library designed with embedded systems in mind";
+    longDescription = ''
+      DirectFB is a thin library that provides hardware graphics acceleration,
+      input device handling and abstraction, integrated windowing system with
+      support for translucent windows and multiple display layers, not only on
+      top of the Linux Framebuffer Device. It is a complete hardware
+      abstraction layer with software fallbacks for every graphics operation
+      that is not supported by the underlying hardware. DirectFB adds graphical
+      power to embedded systems and sets a new standard for graphics under
+      Linux.
+    '';
+    homepage = "https://github.com/deniskropp/DirectFB";
+    license = licenses.lgpl21;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.bjornfor ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/directx-headers/default.nix b/nixpkgs/pkgs/development/libraries/directx-headers/default.nix
new file mode 100644
index 000000000000..b15a6baa7cab
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/directx-headers/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, meson, ninja }:
+stdenv.mkDerivation rec {
+  pname = "directx-headers";
+  version = "1.611.0";
+
+  src = fetchFromGitHub {
+    owner = "microsoft";
+    repo = "DirectX-Headers";
+    rev = "v${version}";
+    hash = "sha256-HG2Zj8hvsgv8oeSDp1eK+1A5bvFL6oQIh5mMFWOFsvk=";
+  };
+
+  nativeBuildInputs = [ meson ninja ];
+
+  # tests require WSL2
+  mesonFlags = [ "-Dbuild-test=false" ];
+
+  meta = with lib; {
+    description = "Official D3D12 headers from Microsoft";
+    homepage = "https://github.com/microsoft/DirectX-Headers";
+    license = licenses.mit;
+    maintainers = with maintainers; [ k900 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/discord-gamesdk/default.nix b/nixpkgs/pkgs/development/libraries/discord-gamesdk/default.nix
new file mode 100644
index 000000000000..86e1a70accde
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/discord-gamesdk/default.nix
@@ -0,0 +1,46 @@
+{ lib
+, stdenv
+, fetchzip
+, autoPatchelfHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "discord-gamesdk";
+  version = "3.2.1";
+
+  src = fetchzip {
+    url = "https://dl-game-sdk.discordapp.net/${version}/discord_game_sdk.zip";
+    sha256 = "sha256-83DgL9y3lHLLJ8vgL3EOVk2Tjcue64N+iuDj/UpSdLc=";
+    stripRoot = false;
+  };
+
+  outputs = [ "out" "dev" ];
+
+  buildInputs = [ (stdenv.cc.cc.libgcc or null) ];
+
+  nativeBuildInputs = [ autoPatchelfHook ];
+
+  installPhase =
+    let
+      processor = stdenv.hostPlatform.uname.processor;
+      sharedLibrary = stdenv.hostPlatform.extensions.sharedLibrary;
+    in
+    ''
+      runHook preInstall
+
+      install -Dm555 lib/${processor}/discord_game_sdk${sharedLibrary} $out/lib/discord_game_sdk${sharedLibrary}
+
+      install -Dm444 c/discord_game_sdk.h $dev/lib/include/discord_game_sdk.h
+
+      runHook postInstall
+    '';
+
+  meta = with lib; {
+    homepage = "https://discord.com/developers/docs/game-sdk/sdk-starter-guide";
+    description = "Library to allow other programs to interact with the Discord desktop application";
+    license = licenses.unfree;
+    maintainers = with maintainers; [ tomodachi94 ];
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+    platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" "x86_64-windows" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/discord-rpc/default.nix b/nixpkgs/pkgs/development/libraries/discord-rpc/default.nix
new file mode 100644
index 000000000000..213096f5abf1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/discord-rpc/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+, rapidjson
+, AppKit
+, buildExamples ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "discord-rpc";
+  version = "3.4.0";
+
+  src = fetchFromGitHub {
+    owner = "discordapp";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "04cxhqdv5r92lrpnhxf8702a8iackdf3sfk1050z7pijbijiql2a";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = [
+    rapidjson
+  ] ++ lib.optional stdenv.isDarwin AppKit;
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=true"
+    "-DBUILD_EXAMPLES=${lib.boolToString buildExamples}"
+  ];
+
+  meta = with lib; {
+    description = "Official library to interface with the Discord client";
+    homepage = "https://github.com/discordapp/discord-rpc";
+    license = licenses.mit;
+    maintainers = with maintainers; [ tadeokondrak ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/dleyna-connector-dbus/default.nix b/nixpkgs/pkgs/development/libraries/dleyna-connector-dbus/default.nix
new file mode 100644
index 000000000000..a6983decf33f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dleyna-connector-dbus/default.nix
@@ -0,0 +1,52 @@
+{ stdenv
+, lib
+, meson
+, ninja
+, pkg-config
+, fetchFromGitHub
+, fetchpatch
+, dleyna-core
+, glib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dleyna-connector-dbus";
+  version = "0.4.1";
+
+  src = fetchFromGitHub {
+    owner = "phako";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "WDmymia9MD3BRU6BOCzCIMrz9V0ACRzmEGqjbbuUmlA=";
+  };
+
+  patches = [
+    # Fix build with meson 1.2. We use the gentoo patch intead of the
+    # usptream one because the latter only applies on the libsoup_3 based
+    # merged dLeyna project.
+    # https://gitlab.gnome.org/World/dLeyna/-/merge_requests/6
+    (fetchpatch {
+      url = "https://github.com/gentoo/gentoo/raw/4a0982b49a1d94aa785b05d9b7d256c26c499910/net-libs/dleyna-connector-dbus/files/meson-1.2.0.patch";
+      sha256 = "sha256-/p2OaPO5ghWtPotwIir2TtcFF5IDFN9FFuyqPHevuFI=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+  ];
+
+  buildInputs = [
+    dleyna-core
+    glib
+  ];
+
+  meta = with lib; {
+    description = "A D-Bus API for the dLeyna services";
+    homepage = "https://github.com/phako/dleyna-connector-dbus";
+    maintainers = with maintainers; [ jtojnar ];
+    platforms = platforms.unix;
+    license = licenses.lgpl21Only;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/dleyna-core/default.nix b/nixpkgs/pkgs/development/libraries/dleyna-core/default.nix
new file mode 100644
index 000000000000..2f019977c89d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dleyna-core/default.nix
@@ -0,0 +1,42 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, meson
+, ninja
+, pkg-config
+, gupnp
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dleyna-core";
+  version = "0.7.0";
+
+  outputs = [ "out" "dev" ];
+
+  setupHook = ./setup-hook.sh;
+
+  src = fetchFromGitHub {
+    owner = "phako";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "i4L9+iyAdBNtgImbD54jkjYL5hvzeZ2OaAyFrcFmuG0=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+  ];
+
+  propagatedBuildInputs = [
+    gupnp
+  ];
+
+  meta = with lib; {
+    description = "Library of utility functions that are used by the higher level dLeyna";
+    homepage = "https://github.com/phako/dleyna-core";
+    maintainers = with maintainers; [ jtojnar ];
+    platforms = platforms.unix;
+    license = licenses.lgpl21Only;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/dleyna-core/setup-hook.sh b/nixpkgs/pkgs/development/libraries/dleyna-core/setup-hook.sh
new file mode 100644
index 000000000000..287ad4dc1897
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dleyna-core/setup-hook.sh
@@ -0,0 +1,8 @@
+addDleynaConnectorPath () {
+    if test -d "$1/lib/dleyna-1.0/connectors"
+    then
+        export DLEYNA_CONNECTOR_PATH="${DLEYNA_CONNECTOR_PATH-}${DLEYNA_CONNECTOR_PATH:+:}$1/lib/dleyna-1.0/connectors"
+    fi
+}
+
+addEnvHooks "$targetOffset" addDleynaConnectorPath
diff --git a/nixpkgs/pkgs/development/libraries/dleyna-renderer/default.nix b/nixpkgs/pkgs/development/libraries/dleyna-renderer/default.nix
new file mode 100644
index 000000000000..61574df27c19
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dleyna-renderer/default.nix
@@ -0,0 +1,75 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, fetchpatch
+, meson
+, ninja
+, pkg-config
+, dleyna-connector-dbus
+, dleyna-core
+, gssdp
+, gupnp
+, gupnp-av
+, gupnp-dlna
+, libsoup
+, makeWrapper
+, docbook-xsl-nons
+, libxslt
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dleyna-renderer";
+  version = "0.7.2";
+
+  src = fetchFromGitHub {
+    owner = "phako";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-bGasT3XCa7QHV3D7z59TSHoqWksNSIgaO0z9zYfHHuw=";
+  };
+
+  patches = [
+    # Fix build with meson 1.2. We use the gentoo patch intead of the
+    # usptream one because the latter only applies on the libsoup_3 based
+    # merged dLeyna project.
+    # https://gitlab.gnome.org/World/dLeyna/-/merge_requests/6
+    (fetchpatch {
+      url = "https://github.com/gentoo/gentoo/raw/2ebe20ff4cda180cc248d31a021107d08ecf39d9/net-libs/dleyna-renderer/files/meson-1.2.0.patch";
+      sha256 = "sha256-/p2OaPO5ghWtPotwIir2TtcFF5IDFN9FFuyqPHevuFI=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    makeWrapper
+
+    # manpage
+    docbook-xsl-nons
+    libxslt # for xsltproc
+  ];
+
+  buildInputs = [
+    dleyna-core
+    dleyna-connector-dbus # runtime dependency to be picked up to DLEYNA_CONNECTOR_PATH
+    gssdp
+    gupnp
+    gupnp-av
+    gupnp-dlna
+    libsoup
+  ];
+
+  preFixup = ''
+    wrapProgram "$out/libexec/dleyna-renderer-service" \
+      --set DLEYNA_CONNECTOR_PATH "$DLEYNA_CONNECTOR_PATH"
+  '';
+
+  meta = with lib; {
+    description = "Library to discover and manipulate Digital Media Renderers";
+    homepage = "https://github.com/phako/dleyna-renderer";
+    maintainers = with maintainers; [ jtojnar ];
+    platforms = platforms.unix;
+    license = licenses.lgpl21Only;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/dleyna-server/default.nix b/nixpkgs/pkgs/development/libraries/dleyna-server/default.nix
new file mode 100644
index 000000000000..cec03d84c649
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dleyna-server/default.nix
@@ -0,0 +1,69 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, fetchpatch
+, meson
+, ninja
+, makeWrapper
+, pkg-config
+, dleyna-core
+, dleyna-connector-dbus
+, gssdp
+, gupnp
+, gupnp-av
+, gupnp-dlna
+, libsoup
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dleyna-server";
+  version = "0.7.2";
+
+  src = fetchFromGitHub {
+    owner = "phako";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-jlF9Lr/NG+Fsy/bB7aLb7xOLqel8GueJK5luo9rsDME=";
+  };
+
+  patches = [
+    # Fix build with meson 1.2. We use the gentoo patch intead of the
+    # usptream one because the latter only applies on the libsoup_3 based
+    # merged dLeyna project.
+    # https://gitlab.gnome.org/World/dLeyna/-/merge_requests/6
+    (fetchpatch {
+      url = "https://github.com/gentoo/gentoo/raw/2e3a1f4f7a1ef0c3e387389142785d98b5834e60/net-misc/dleyna-server/files/meson-1.2.0.patch";
+      sha256 = "sha256-/p2OaPO5ghWtPotwIir2TtcFF5IDFN9FFuyqPHevuFI=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    makeWrapper
+  ];
+
+  buildInputs = [
+    dleyna-core
+    dleyna-connector-dbus # runtime dependency to be picked up to DLEYNA_CONNECTOR_PATH
+    gssdp
+    gupnp
+    gupnp-av
+    gupnp-dlna
+    libsoup
+  ];
+
+  preFixup = ''
+    wrapProgram "$out/libexec/dleyna-server-service" \
+      --set DLEYNA_CONNECTOR_PATH "$DLEYNA_CONNECTOR_PATH"
+  '';
+
+  meta = with lib; {
+    description = "Library to discover, browse and manipulate Digital Media Servers";
+    homepage = "https://github.com/phako/dleyna-server";
+    maintainers = with maintainers; [ jtojnar ];
+    platforms = platforms.unix;
+    license = licenses.lgpl21Only;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/dlib/default.nix b/nixpkgs/pkgs/development/libraries/dlib/default.nix
new file mode 100644
index 000000000000..50709cae8c0b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dlib/default.nix
@@ -0,0 +1,90 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, pkg-config
+, libpng
+, libjpeg
+, libwebp
+, blas
+, lapack
+, config
+, guiSupport ? false
+, libX11
+, sse4Support ? stdenv.hostPlatform.sse4_1Support
+, avxSupport ? stdenv.hostPlatform.avxSupport
+, cudaSupport ? config.cudaSupport
+, cudaPackages
+}@inputs:
+(if cudaSupport then cudaPackages.backendStdenv else inputs.stdenv).mkDerivation rec {
+  pname = "dlib";
+  version = "19.24.2";
+
+  src = fetchFromGitHub {
+    owner = "davisking";
+    repo = "dlib";
+    rev = "v${version}";
+    sha256 = "sha256-Z1fScuaIHjj2L1uqLIvsZ7ARKNjM+iaA8SAtWUTPFZk=";
+  };
+
+  postPatch = ''
+    rm -rf dlib/external
+  '';
+
+  cmakeFlags = [
+    (lib.cmakeBool "USE_SSE4_INSTRUCTIONS" sse4Support)
+    (lib.cmakeBool "USE_AVX_INSTRUCTIONS" avxSupport)
+    (lib.cmakeBool "DLIB_USE_CUDA" cudaSupport)
+  ] ++ lib.optionals cudaSupport [
+    (lib.cmakeFeature "DLIB_USE_CUDA_COMPUTE_CAPABILITIES" (builtins.concatStringsSep "," (with cudaPackages.flags; map dropDot cudaCapabilities)))
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ] ++ lib.optionals cudaSupport (with cudaPackages; [
+    cuda_nvcc
+  ]);
+
+  buildInputs = [
+    libpng
+    libjpeg
+    libwebp
+    blas
+    lapack
+  ]
+  ++ lib.optionals guiSupport [ libX11 ]
+  ++ lib.optionals config.cudaSupport (with cudaPackages; [
+    cuda_cudart.dev
+    cuda_cudart.lib
+    cuda_cudart.static
+    cuda_nvcc.dev
+    libcublas.dev
+    libcublas.lib
+    libcublas.static
+    libcurand.dev
+    libcurand.lib
+    libcurand.static
+    libcusolver.dev
+    libcusolver.lib
+    libcusolver.static
+    cudnn.dev
+    cudnn.lib
+    cudnn.static
+    cuda_cccl.dev
+  ]);
+
+  passthru = {
+    inherit
+      cudaSupport cudaPackages
+      sse4Support avxSupport;
+  };
+
+  meta = with lib; {
+    description = "A general purpose cross-platform C++ machine learning library";
+    homepage = "http://www.dlib.net";
+    license = licenses.boost;
+    maintainers = with maintainers; [ christopherpoole ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/docopt_cpp/default.nix b/nixpkgs/pkgs/development/libraries/docopt_cpp/default.nix
new file mode 100644
index 000000000000..2e37e073fb65
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/docopt_cpp/default.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, python3 }:
+
+stdenv.mkDerivation rec {
+  version = "0.6.3";
+  pname = "docopt.cpp";
+
+  src = fetchFromGitHub {
+    owner = "docopt";
+    repo = "docopt.cpp";
+    rev = "v${version}";
+    sha256 = "0cz3vv7g5snfbsqcf3q8bmd6kv5qp84gj3avwkn4vl00krw13bl7";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "python3-for-tests";
+      url = "https://github.com/docopt/docopt.cpp/commit/b3d909dc952ab102a4ad5a1541a41736f35b92ba.patch";
+      hash = "sha256-JJR09pbn3QhYaZAIAjs+pe28+g1VfgHUKspWorHzr8o=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake python3 ];
+
+  cmakeFlags = ["-DWITH_TESTS=ON"];
+
+  strictDeps = true;
+
+  doCheck = true;
+
+  postPatch = ''
+    substituteInPlace docopt.pc.in \
+      --replace "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@" \
+                "@CMAKE_INSTALL_LIBDIR@"
+  '';
+
+  checkPhase = "python ./run_tests";
+
+  meta = with lib; {
+    description = "C++11 port of docopt";
+    homepage = "https://github.com/docopt/docopt.cpp";
+    license = with licenses; [ mit boost ];
+    platforms = platforms.all;
+    maintainers = with maintainers; [ knedlsepp ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/doctest/default.nix b/nixpkgs/pkgs/development/libraries/doctest/default.nix
new file mode 100644
index 000000000000..642cfa3052f7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/doctest/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, installShellFiles, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "doctest";
+  version = "2.4.11";
+
+  src = fetchFromGitHub {
+    owner = "doctest";
+    repo = "doctest";
+    rev = "v${version}";
+    sha256 = "sha256-hotO6QVpPn8unYTaQHFgi40A3oLUd++I3aTe293e4Aw=";
+  };
+
+  patches = [
+    # Suppress unsafe buffer usage warnings with clang 16, which are treated as errors due to `-Werror`.
+    # https://github.com//doctest/doctest/pull/768
+    (fetchpatch {
+      url = "https://github.com/doctest/doctest/commit/9336c9bd86e3fc2e0c36456cad8be3b4e8829a22.patch";
+      hash = "sha256-ZFCVk5qvgfixRm7ZFr7hyNCSEvrT6nB01G/CBshq53o=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/doctest/doctest";
+    description = "The fastest feature-rich C++11/14/17/20 single-header testing framework";
+    platforms = platforms.all;
+    license = licenses.mit;
+    maintainers = with maintainers; [ davidtwco ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/dotconf/default.nix b/nixpkgs/pkgs/development/libraries/dotconf/default.nix
new file mode 100644
index 000000000000..fed050f64b6e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dotconf/default.nix
@@ -0,0 +1,24 @@
+{ fetchFromGitHub, lib, stdenv, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "dotconf";
+  version = "1.3";
+
+  src = fetchFromGitHub {
+    owner = "williamh";
+    repo = "dotconf";
+    rev = "v${version}";
+    sha256 = "1sc95hw5k2xagpafny0v35filmcn05k1ds5ghkldfpf6xw4hakp7";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ ];
+
+  meta = with lib; {
+    description = "A configuration parser library";
+    maintainers = with maintainers; [ pSub ];
+    homepage = "https://github.com/williamh/dotconf";
+    license = licenses.lgpl21Plus;
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/dotnetfx35/default.nix b/nixpkgs/pkgs/development/libraries/dotnetfx35/default.nix
new file mode 100644
index 000000000000..a3045949c6ca
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dotnetfx35/default.nix
@@ -0,0 +1,24 @@
+{stdenv}:
+
+let
+  windir = "/cygdrive/c/WINDOWS";
+in
+{
+  pkg = stdenv.mkDerivation rec {
+    pname = "dotnetfx";
+    version = "3.5";
+    src = "${windir}/Microsoft.NET/Framework/v${version}";
+    buildCommand = ''
+      mkdir -p $out/bin
+      ln -s $src/MSBuild.exe $out/bin
+    '';
+  };
+
+  assembly20Path = "/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v2.0.50727";
+
+  wcfPath = "/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v3.0/WINDOW~1";
+
+  referenceAssembly30Path = "/cygdrive/c/PROGRA~1/REFERE~1/Microsoft/Framework/v3.0";
+
+  referenceAssembly35Path = "/cygdrive/c/PROGRA~1/REFERE~1/Microsoft/Framework/v3.5";
+}
diff --git a/nixpkgs/pkgs/development/libraries/dotnetfx40/default.nix b/nixpkgs/pkgs/development/libraries/dotnetfx40/default.nix
new file mode 100644
index 000000000000..379be1bdc26d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dotnetfx40/default.nix
@@ -0,0 +1,24 @@
+{stdenv}:
+
+let
+  windir = "/cygdrive/c/WINDOWS";
+in
+{
+  pkg = stdenv.mkDerivation rec {
+    pname = "dotnetfx";
+    version = "4.0.30319";
+    src = "${windir}/Microsoft.NET/Framework/v${version}";
+    buildCommand = ''
+      mkdir -p $out/bin
+      ln -s $src/MSBuild.exe $out/bin
+    '';
+  };
+
+  assembly20Path = "/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v2.0.50727";
+
+  wcfPath = "/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v3.0/WINDOW~1";
+
+  referenceAssembly30Path = "/cygdrive/c/PROGRA~1/REFERE~1/Microsoft/Framework/v3.0";
+
+  referenceAssembly35Path = "/cygdrive/c/PROGRA~1/REFERE~1/Microsoft/Framework/v3.5";
+}
diff --git a/nixpkgs/pkgs/development/libraries/double-conversion/default.nix b/nixpkgs/pkgs/development/libraries/double-conversion/default.nix
new file mode 100644
index 000000000000..9ba75c771662
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/double-conversion/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, lib, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "double-conversion";
+  version = "3.3.0";
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "double-conversion";
+    rev = "v${version}";
+    sha256 = "sha256-DkMoHHoHwV4p40IINEqEPzKsCa0LHrJAFw2Yftw7zHo=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
+
+  # Case sensitivity issue
+  preConfigure = lib.optionalString stdenv.isDarwin ''
+    rm BUILD
+  '';
+
+  meta = with lib; {
+    description = "Binary-decimal and decimal-binary routines for IEEE doubles";
+    homepage = "https://github.com/google/double-conversion";
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ abbradar ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/dqlite/default.nix b/nixpkgs/pkgs/development/libraries/dqlite/default.nix
new file mode 100644
index 000000000000..2ed5417c8026
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dqlite/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, file, libuv
+, raft-canonical, sqlite, lxd }:
+
+stdenv.mkDerivation rec {
+  pname = "dqlite";
+  version = "1.16.2";
+
+  src = fetchFromGitHub {
+    owner = "canonical";
+    repo = pname;
+    rev = "refs/tags/v${version}";
+    hash = "sha256-rzKZvVybKLQKT9ZiGT/9LgU7hxI6knVXkPawNhbW/DQ=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook file pkg-config ];
+  buildInputs = [
+    libuv
+    raft-canonical.dev
+    sqlite
+  ];
+
+  enableParallelBuilding = true;
+
+  # tests fail
+  doCheck = false;
+
+  outputs = [ "dev" "out" ];
+
+  passthru.tests = {
+    inherit lxd;
+  };
+
+  meta = with lib; {
+    description = ''
+      Expose a SQLite database over the network and replicate it across a
+      cluster of peers
+    '';
+    homepage = "https://dqlite.io/";
+    license = licenses.asl20;
+    maintainers = teams.lxc.members;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/draco/default.nix b/nixpkgs/pkgs/development/libraries/draco/default.nix
new file mode 100644
index 000000000000..c4ed0730cdac
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/draco/default.nix
@@ -0,0 +1,67 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, nix-update-script
+, cmake
+, python3
+, gtest
+, withAnimation ? true
+, withTranscoder ? true
+, eigen
+, ghc_filesystem
+, tinygltf
+}:
+
+let
+  cmakeBool = b: if b then "ON" else "OFF";
+in
+stdenv.mkDerivation (finalAttrs: {
+  version = "1.5.7";
+  pname = "draco";
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "draco";
+    rev = finalAttrs.version;
+    hash = "sha256-p0Mn4kGeBBKL7Hoz4IBgb6Go6MdkgE7WZgxAnt1tE/0=";
+    fetchSubmodules = true;
+  };
+
+  # ld: unknown option: --start-group
+  postPatch = ''
+    substituteInPlace cmake/draco_targets.cmake \
+      --replace "^Clang" "^AppleClang"
+  '';
+
+  buildInputs = [ gtest ]
+    ++ lib.optionals withTranscoder [ eigen ghc_filesystem tinygltf ];
+
+  nativeBuildInputs = [ cmake python3 ];
+
+  cmakeFlags = [
+    "-DDRACO_ANIMATION_ENCODING=${cmakeBool withAnimation}"
+    "-DDRACO_GOOGLETEST_PATH=${gtest}"
+    "-DBUILD_SHARED_LIBS=${cmakeBool true}"
+    "-DDRACO_TRANSCODER_SUPPORTED=${cmakeBool withTranscoder}"
+  ] ++ lib.optionals withTranscoder [
+    "-DDRACO_EIGEN_PATH=${eigen}/include/eigen3"
+    "-DDRACO_FILESYSTEM_PATH=${ghc_filesystem}"
+    "-DDRACO_TINYGLTF_PATH=${tinygltf}"
+  ];
+
+  CXXFLAGS = [
+    # error: expected ')' before 'value' in 'explicit GltfValue(uint8_t value)'
+    "-include cstdint"
+  ];
+
+  passthru.updateScript = nix-update-script { };
+
+  meta = with lib; {
+    description = "Library for compressing and decompressing 3D geometric meshes and point clouds";
+    homepage = "https://google.github.io/draco/";
+    changelog = "https://github.com/google/draco/releases/tag/${version}";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ jansol ];
+    platforms = platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/draco/tinygltf.nix b/nixpkgs/pkgs/development/libraries/draco/tinygltf.nix
new file mode 100644
index 000000000000..4f965c653850
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/draco/tinygltf.nix
@@ -0,0 +1,30 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, nix-update-script
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  version = "2.8.7";
+  pname = "tinygltf";
+
+  src = fetchFromGitHub {
+    owner = "syoyo";
+    repo = "tinygltf";
+    rev = "v${version}";
+    hash = "sha256-uQlv+mUWnqUJIXnPf2pVuRg1akcXAfqyBIzPPmm4Np4=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  passthru.updateScript = nix-update-script { };
+
+  meta = with lib; {
+    description = "Header only C++11 tiny glTF 2.0 library";
+    homepage = "https://github.com/syoyo/tinygltf";
+    license = licenses.mit;
+    maintainers = with maintainers; [ jansol ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/drogon/default.nix b/nixpkgs/pkgs/development/libraries/drogon/default.nix
new file mode 100644
index 000000000000..5919a45467dc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/drogon/default.nix
@@ -0,0 +1,67 @@
+{ stdenv, fetchFromGitHub, cmake, jsoncpp, libossp_uuid, zlib, lib, fetchpatch
+# optional but of negligible size
+, openssl, brotli, c-ares
+# optional databases
+, sqliteSupport ? true, sqlite
+, postgresSupport ? false, postgresql
+, redisSupport ? false, hiredis
+, mysqlSupport ? false, libmysqlclient, mariadb }:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "drogon";
+  version = "1.9.2";
+
+  src = fetchFromGitHub {
+    owner = "drogonframework";
+    repo = "drogon";
+    rev = "v${finalAttrs.version}";
+    sha256 = "sha256-/pLYBCwulHkHQAVEhuAlPUJSS/jc3uvGtU0Q0RWPNn0=";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [
+    "-DBUILD_TESTING=${if finalAttrs.finalPackage.doInstallCheck then "ON" else "OFF"}"
+    "-DBUILD_EXAMPLES=OFF"
+  ];
+
+  propagatedBuildInputs = [
+    jsoncpp
+    libossp_uuid
+    zlib
+    openssl
+    brotli
+    c-ares
+  ] ++ lib.optional sqliteSupport sqlite
+    ++ lib.optional postgresSupport postgresql
+    ++ lib.optional redisSupport hiredis
+    # drogon uses mariadb for mysql (see https://github.com/drogonframework/drogon/wiki/ENG-02-Installation#Library-Dependencies)
+    ++ lib.optionals mysqlSupport [ libmysqlclient mariadb ];
+
+  patches = [
+    # this part of the test would normally fail because it attempts to configure a CMake project that uses find_package on itself
+    # this patch makes drogon and trantor visible to the test
+    ./fix_find_package.patch
+  ];
+
+  # modifying PATH here makes drogon_ctl visible to the test
+  installCheckPhase = ''
+    (
+      cd ..
+      PATH=$PATH:$out/bin $SHELL test.sh
+    )
+  '';
+
+  # this excludes you, pkgsStatic (cmake wants to run built binaries
+  # in the buildPhase)
+  doInstallCheck = stdenv.buildPlatform == stdenv.hostPlatform;
+
+  meta = with lib; {
+    homepage = "https://github.com/drogonframework/drogon";
+    description = "C++14/17 based HTTP web application framework";
+    license = licenses.mit;
+    maintainers = with maintainers; [ urlordjames ];
+    platforms = platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/drogon/fix_find_package.patch b/nixpkgs/pkgs/development/libraries/drogon/fix_find_package.patch
new file mode 100644
index 000000000000..b76dbfe48830
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/drogon/fix_find_package.patch
@@ -0,0 +1,13 @@
+diff --git a/test.sh b/test.sh
+index f017b9a..027031e 100755
+--- a/test.sh
++++ b/test.sh
+@@ -135,7 +135,7 @@ if [ $os = "windows" ]; then
+   conan install $src_dir -s compiler="Visual Studio" -s compiler.version=16 -sbuild_type=Debug -g cmake_paths
+   cmake_gen="$cmake_gen -DCMAKE_TOOLCHAIN_FILE=conan_paths.cmake -DCMAKE_INSTALL_PREFIX=$src_dir/install"
+ fi
+-cmake .. $cmake_gen
++cmake .. $cmake_gen -DDrogon_DIR=$out/lib/cmake/Drogon -DTrantor_DIR=$out/lib/cmake/Trantor
+ 
+ if [ $? -ne 0 ]; then
+     echo "Failed to run CMake for example project"
diff --git a/nixpkgs/pkgs/development/libraries/drumstick/default.nix b/nixpkgs/pkgs/development/libraries/drumstick/default.nix
new file mode 100644
index 000000000000..486d1ff997d3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/drumstick/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, fetchurl
+, cmake, docbook_xml_dtd_45, docbook_xsl, doxygen, graphviz-nox, pkg-config, qttools, wrapQtAppsHook
+, alsa-lib, fluidsynth, libpulseaudio, qtbase, qtsvg, sonivox
+}:
+
+stdenv.mkDerivation rec {
+  pname = "drumstick";
+  version = "2.7.2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/drumstick/${version}/${pname}-${version}.tar.bz2";
+    hash = "sha256-5XxG5ur584fgW4oCONgMiWzV48Q02HEdmpb9+YhBFe0=";
+  };
+
+  patches = [
+    ./drumstick-plugins.patch
+  ];
+
+  postPatch = ''
+    substituteInPlace library/rt/backendmanager.cpp --subst-var out
+  '';
+
+  outputs = [ "out" "dev" "man" ];
+
+  nativeBuildInputs = [
+    cmake docbook_xml_dtd_45 docbook_xml_dtd_45 docbook_xsl doxygen graphviz-nox pkg-config qttools wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    alsa-lib fluidsynth libpulseaudio qtbase qtsvg sonivox
+  ];
+
+  cmakeFlags = [
+    "-DUSE_DBUS=ON"
+  ];
+
+  meta = with lib; {
+    maintainers = [];
+    description = "MIDI libraries for Qt5/C++";
+    homepage = "https://drumstick.sourceforge.io/";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/drumstick/drumstick-plugins.patch b/nixpkgs/pkgs/development/libraries/drumstick/drumstick-plugins.patch
new file mode 100644
index 000000000000..59711120a8e8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/drumstick/drumstick-plugins.patch
@@ -0,0 +1,14 @@
+Make it look for its plugin in its own installation directory.
+
+Without this vmpk fails to start with "Unable to initialize all MIDI drivers".
+
+--- a/library/rt/backendmanager.cpp
++++ b/library/rt/backendmanager.cpp
+@@ -159,6 +159,7 @@ namespace rt {
+         foreach(const QString& path, QCoreApplication::libraryPaths()) {
+             d->appendDir( path + QDir::separator() + QSTR_DRUMSTICK, result );
+         }
++        d->appendDir( "@out@/lib/" + QSTR_DRUMSTICK, result );
+         return result;
+     }
+ 
diff --git a/nixpkgs/pkgs/development/libraries/dsdcc/default.nix b/nixpkgs/pkgs/development/libraries/dsdcc/default.nix
new file mode 100644
index 000000000000..9397c747e667
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dsdcc/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, mbelib
+, serialdv
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "dsdcc";
+  version = "1.9.5";
+
+  src = fetchFromGitHub {
+    owner = "f4exb";
+    repo = "dsdcc";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-DMCk29O2Lmt2tjo6j5e4ZdZeDL3ZFUh66Sm6TGrIaeU=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    mbelib
+    serialdv
+  ];
+
+  cmakeFlags = [
+    "-DUSE_MBELIB=ON"
+  ];
+
+  postFixup = ''
+    substituteInPlace "$out"/lib/pkgconfig/libdsdcc.pc \
+      --replace '=''${exec_prefix}//' '=/'
+  '';
+
+  meta = {
+    description = "Digital Speech Decoder (DSD) rewritten as a C++ library";
+    homepage = "https://github.com/f4exb/dsdcc";
+    license = lib.licenses.gpl3;
+    mainProgram = "dsdccx";
+    maintainers = with lib.maintainers; [ alexwinter ];
+    platforms = lib.platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/dssi/default.nix b/nixpkgs/pkgs/development/libraries/dssi/default.nix
new file mode 100644
index 000000000000..322c689ba11a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dssi/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl, ladspaH, libjack2, liblo, alsa-lib, libX11, libsndfile, libSM
+, libsamplerate, libtool, autoconf, automake, xorgproto, libICE, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dssi";
+  version = "1.1.1";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/dssi/dssi/${version}/${pname}-${version}.tar.gz";
+    sha256 = "0kl1hzhb7cykzkrqcqgq1dk4xcgrcxv0jja251aq4z4l783jpj7j";
+  };
+
+  nativeBuildInputs = [ autoconf automake pkg-config ];
+  buildInputs =
+    [ ladspaH libjack2 liblo alsa-lib libX11 libsndfile libSM
+      libsamplerate libtool xorgproto libICE
+    ];
+
+  meta = with lib; {
+    description = "A plugin SDK for virtual instruments";
+    maintainers = with maintainers;
+    [
+      raskin
+    ];
+    platforms = platforms.linux;
+    license = licenses.lgpl21;
+    downloadPage = "https://sourceforge.net/projects/dssi/files/dssi/";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/duckdb/default.nix b/nixpkgs/pkgs/development/libraries/duckdb/default.nix
new file mode 100644
index 000000000000..801ad7979aee
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/duckdb/default.nix
@@ -0,0 +1,117 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, ninja
+, openssl
+, openjdk11
+, unixODBC
+, withJdbc ? false
+, withOdbc ? false
+}:
+
+let
+  enableFeature = yes: if yes then "ON" else "OFF";
+in
+stdenv.mkDerivation rec {
+  pname = "duckdb";
+  version = "0.9.2";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-QFK8mEMcqQwALFNvAdD8yWixwMYHSbeo6xqx86PvejU=";
+  };
+
+  patches = [ ./version.patch ];
+
+  postPatch = ''
+    substituteInPlace CMakeLists.txt --subst-var-by DUCKDB_VERSION "v${version}"
+  '';
+
+  nativeBuildInputs = [ cmake ninja ];
+  buildInputs = [ openssl ]
+    ++ lib.optionals withJdbc [ openjdk11 ]
+    ++ lib.optionals withOdbc [ unixODBC ];
+
+  cmakeFlags = [
+    "-DDUCKDB_EXTENSION_CONFIGS=${src}/.github/config/in_tree_extensions.cmake"
+    "-DBUILD_ODBC_DRIVER=${enableFeature withOdbc}"
+    "-DJDBC_DRIVER=${enableFeature withJdbc}"
+  ] ++ lib.optionals doInstallCheck [
+    # development settings
+    "-DBUILD_UNITTESTS=ON"
+  ];
+
+  doInstallCheck = true;
+
+  preInstallCheck = ''
+    export HOME="$(mktemp -d)"
+  '' + lib.optionalString stdenv.isDarwin ''
+    export DYLD_LIBRARY_PATH="$out/lib''${DYLD_LIBRARY_PATH:+:}''${DYLD_LIBRARY_PATH}"
+  '';
+
+  installCheckPhase =
+    let
+      excludes = map (pattern: "exclude:'${pattern}'") [
+        "[s3]"
+        "Test closing database during long running query"
+        "Test using a remote optimizer pass in case thats important to someone"
+        "test/common/test_cast_hugeint.test"
+        "test/sql/copy/csv/test_csv_remote.test"
+        "test/sql/copy/parquet/test_parquet_remote.test"
+        "test/sql/copy/parquet/test_parquet_remote_foreign_files.test"
+        "test/sql/storage/compression/chimp/chimp_read.test"
+        "test/sql/storage/compression/chimp/chimp_read_float.test"
+        "test/sql/storage/compression/patas/patas_compression_ratio.test_coverage"
+        "test/sql/storage/compression/patas/patas_read.test"
+        "test/sql/json/read_json_objects.test"
+        "test/sql/json/read_json.test"
+        "test/sql/json/table/read_json_objects.test"
+        "test/sql/json/table/read_json.test"
+        "test/sql/copy/parquet/parquet_5968.test"
+        "test/fuzzer/pedro/buffer_manager_out_of_memory.test"
+        "test/sql/storage/compression/bitpacking/bitpacking_size_calculation.test"
+        "test/sql/copy/parquet/delta_byte_array_length_mismatch.test"
+        "test/sql/function/timestamp/test_icu_strptime.test"
+        "test/sql/timezone/test_icu_timezone.test"
+        "test/sql/copy/parquet/snowflake_lineitem.test"
+        "test/sql/copy/parquet/test_parquet_force_download.test"
+        "test/sql/copy/parquet/delta_byte_array_multiple_pages.test"
+        "test/sql/copy/csv/test_csv_httpfs_prepared.test"
+        "test/sql/copy/csv/test_csv_httpfs.test"
+        "test/sql/settings/test_disabled_file_system_httpfs.test"
+        "test/sql/copy/csv/parallel/test_parallel_csv.test"
+        "test/sql/copy/csv/parallel/csv_parallel_httpfs.test"
+        "test/common/test_cast_struct.test"
+        # test is order sensitive
+        "test/sql/copy/parquet/parquet_glob.test"
+        # these are only hidden if no filters are passed in
+        "[!hide]"
+        # this test apparently never terminates
+        "test/sql/copy/csv/auto/test_csv_auto.test"
+      ] ++ lib.optionals stdenv.isAarch64 [
+        "test/sql/aggregate/aggregates/test_kurtosis.test"
+        "test/sql/aggregate/aggregates/test_skewness.test"
+        "test/sql/function/list/aggregates/skewness.test"
+      ];
+    in
+    ''
+      runHook preInstallCheck
+
+      $PWD/test/unittest ${lib.concatStringsSep " " excludes}
+
+      runHook postInstallCheck
+    '';
+
+  meta = with lib; {
+    changelog = "https://github.com/duckdb/duckdb/releases/tag/v${version}";
+    description = "Embeddable SQL OLAP Database Management System";
+    homepage = "https://duckdb.org/";
+    license = licenses.mit;
+    mainProgram = "duckdb";
+    maintainers = with maintainers; [ costrouc cpcloud ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/duckdb/version.patch b/nixpkgs/pkgs/development/libraries/duckdb/version.patch
new file mode 100644
index 000000000000..f40785b43079
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/duckdb/version.patch
@@ -0,0 +1,58 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2b49e11288..0a4a69b9a0 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -244,52 +244,7 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "SunOS")
+   set(SUN TRUE)
+ endif()
+ 
+-find_package(Git)
+-if(Git_FOUND)
+-  if (NOT DEFINED GIT_COMMIT_HASH)
+-    execute_process(
+-            COMMAND ${GIT_EXECUTABLE} log -1 --format=%h
+-            WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+-            RESULT_VARIABLE GIT_RESULT
+-            OUTPUT_VARIABLE GIT_COMMIT_HASH
+-            OUTPUT_STRIP_TRAILING_WHITESPACE)
+-  endif()
+-  execute_process(
+-          COMMAND ${GIT_EXECUTABLE} describe --tags --abbrev=0
+-          WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+-          OUTPUT_VARIABLE GIT_LAST_TAG
+-          OUTPUT_STRIP_TRAILING_WHITESPACE)
+-  execute_process(
+-          COMMAND ${GIT_EXECUTABLE} describe --tags --long
+-          WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+-          OUTPUT_VARIABLE GIT_ITERATION
+-          OUTPUT_STRIP_TRAILING_WHITESPACE)
+-else()
+-  message("Git NOT FOUND")
+-endif()
+-
+-if(GIT_RESULT EQUAL "0")
+-  string(REGEX REPLACE "v([0-9]+).[0-9]+.[0-9]+" "\\1" DUCKDB_MAJOR_VERSION "${GIT_LAST_TAG}")
+-  string(REGEX REPLACE "v[0-9]+.([0-9]+).[0-9]+" "\\1" DUCKDB_MINOR_VERSION "${GIT_LAST_TAG}")
+-  string(REGEX REPLACE "v[0-9]+.[0-9]+.([0-9]+)" "\\1" DUCKDB_PATCH_VERSION "${GIT_LAST_TAG}")
+-  string(REGEX REPLACE ".*-([0-9]+)-.*" "\\1" DUCKDB_DEV_ITERATION "${GIT_ITERATION}")
+-
+-  if(DUCKDB_DEV_ITERATION EQUAL 0)
+-    # on a tag; directly use the version
+-    set(DUCKDB_VERSION "${GIT_LAST_TAG}")
+-  else()
+-    # not on a tag, increment the patch version by one and add a -devX suffix
+-    math(EXPR DUCKDB_PATCH_VERSION "${DUCKDB_PATCH_VERSION}+1")
+-    set(DUCKDB_VERSION "v${DUCKDB_MAJOR_VERSION}.${DUCKDB_MINOR_VERSION}.${DUCKDB_PATCH_VERSION}-dev${DUCKDB_DEV_ITERATION}")
+-  endif()
+-else()
+-  # fallback for when building from tarball
+-  set(DUCKDB_MAJOR_VERSION 0)
+-  set(DUCKDB_MINOR_VERSION 0)
+-  set(DUCKDB_PATCH_VERSION 1)
+-  set(DUCKDB_DEV_ITERATION 0)
+-  set(DUCKDB_VERSION "v${DUCKDB_MAJOR_VERSION}.${DUCKDB_MINOR_VERSION}.${DUCKDB_PATCH_VERSION}-dev${DUCKDB_DEV_ITERATION}")
+-endif()
++set(DUCKDB_VERSION "@DUCKDB_VERSION@")
+ 
+ message(STATUS "git hash ${GIT_COMMIT_HASH}, version ${DUCKDB_VERSION}")
+ 
diff --git a/nixpkgs/pkgs/development/libraries/dxflib/default.nix b/nixpkgs/pkgs/development/libraries/dxflib/default.nix
new file mode 100644
index 000000000000..a90820c02cb9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dxflib/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, stdenv
+, fetchurl
+, qmake
+}:
+
+stdenv.mkDerivation rec {
+  version = "3.26.4";
+  pname = "dxflib";
+  src = fetchurl {
+    url = "https://qcad.org/archives/dxflib/${pname}-${version}-src.tar.gz";
+    sha256 = "0pwic33mj6bp4axai5jiyn4xqf31y0xmb1i0pcf55b2h9fav8zah";
+  };
+  nativeBuildInputs = [
+    qmake
+  ];
+  dontWrapQtApps = true;
+  preConfigure = ''
+    sed -i 's/CONFIG += staticlib/CONFIG += shared/' dxflib.pro
+  '';
+  installPhase = ''
+    install -d -m 0755 $out/lib
+    cp -pr *${stdenv.hostPlatform.extensions.sharedLibrary}* $out/lib
+    install -d -m 0755 $out/include/dxflib
+    cp -pr src/*.h $out/include/dxflib
+    # Generate pkg-config file
+    install -d -m 0755 $out/lib/pkgconfig
+    cat << 'EOF' > $out/lib/pkgconfig/dxflib.pc
+    prefix=${placeholder "out"}
+    libdir=${placeholder "out"}/lib
+    includedir=${placeholder "out"}/include
+    Name: dxflib
+    Description: A C++ library for reading and writing DXF files
+    Version: %{version}
+    Libs: -L${placeholder "out"}/lib -ldxflib
+    Cflags: -I${placeholder "out"}/include/dxflib
+    EOF
+  '';
+  doCheck = true;
+
+  meta = {
+    homepage = "https://qcad.org/en/90-dxflib";
+    maintainers = with lib.maintainers; [ raskin ];
+    platforms = lib.platforms.unix;
+    description = "DXF file format library";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/dyncall/default.nix b/nixpkgs/pkgs/development/libraries/dyncall/default.nix
new file mode 100644
index 000000000000..75841b5d0d71
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/dyncall/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "dyncall";
+  version = "1.4";
+
+  src = fetchurl {
+    url = "https://www.dyncall.org/r${version}/dyncall-${version}.tar.gz";
+    # https://www.dyncall.org/r1.4/SHA256
+    sha256 = "sha256-FEN9u+87bckkg/ZQfq+CWrl5ZKie7K6Ms0emvsnDKq4=";
+  };
+
+  # XXX: broken tests, failures masked, lets avoid crashing a bunch for now :)
+  doCheck = false;
+
+  # install bits not automatically installed
+  postInstall = ''
+    # install cmake modules to make using dyncall easier
+    # This is essentially what -DINSTALL_CMAKE_MODULES=ON if using cmake build
+    # We don't use the cmake-based build since it installs different set of headers
+    # (mostly fewer headers, but installs dyncall_alloc_wx.h "instead" dyncall_alloc.h)
+    # and we'd have to patch the cmake module installation to not use CMAKE_ROOT anyway :).
+    install -D -t $out/lib/cmake ./buildsys/cmake/Modules/Find*.cmake
+
+    # manpages are nice, install them
+    # doing this is in the project's "ToDo", so check this when updating!
+    install -D -t $out/share/man/man3 ./*/*.3
+  '';
+
+  meta = with lib; {
+    description = "Highly dynamic multi-platform foreign function call interface library";
+    homepage = "https://www.dyncall.org";
+    license = licenses.isc;
+    maintainers = with maintainers; [ dtzWill ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/easyloggingpp/default.nix b/nixpkgs/pkgs/development/libraries/easyloggingpp/default.nix
new file mode 100644
index 000000000000..3aa6024fc3d1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/easyloggingpp/default.nix
@@ -0,0 +1,31 @@
+# To use this package with a CMake and pkg-config build:
+# pkg_check_modules(EASYLOGGINGPP REQUIRED easyloggingpp)
+# add_executable(main src/main.cpp ${EASYLOGGINGPP_PREFIX}/include/easylogging++.cc)
+{ lib, stdenv, fetchFromGitHub, cmake, gtest }:
+stdenv.mkDerivation rec {
+  pname = "easyloggingpp";
+  version = "9.97.1";
+  src = fetchFromGitHub {
+    owner = "amrayn";
+    repo = "easyloggingpp";
+    rev = "v${version}";
+    sha256 = "sha256-R4NdwsUywgJoK5E/OdZXFds6iBKOsMa0E+2PDdQbV6E=";
+  };
+
+  nativeBuildInputs = [cmake];
+  buildInputs = [gtest];
+  cmakeFlags = [ "-Dtest=ON" ];
+  env.NIX_CFLAGS_COMPILE = "-std=c++11" +
+    lib.optionalString stdenv.isLinux " -pthread";
+  postInstall = ''
+    mkdir -p $out/include
+    cp ../src/easylogging++.cc $out/include
+  '';
+  meta = {
+    description = "C++ logging library";
+    homepage = "https://github.com/amrayn/easyloggingpp";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [acowley];
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/eccodes/default.nix b/nixpkgs/pkgs/development/libraries/eccodes/default.nix
new file mode 100644
index 000000000000..844312768002
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/eccodes/default.nix
@@ -0,0 +1,76 @@
+{ fetchurl
+, lib
+, stdenv
+, cmake
+, netcdf
+, openjpeg
+, libaec
+, libpng
+, gfortran
+, perl
+, enablePython ? false
+, pythonPackages
+, enablePosixThreads ? false
+, enableOpenMPThreads ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "eccodes";
+  version = "2.33.0";
+
+  src = fetchurl {
+    url = "https://confluence.ecmwf.int/download/attachments/45757960/eccodes-${version}-Source.tar.gz";
+    sha256 = "sha256-vc7IzmNlTsaANADFB/ASIKmqQDpF+mtb3/f9zET9fa8=";
+  };
+
+  postPatch = ''
+    substituteInPlace cmake/FindOpenJPEG.cmake --replace openjpeg-2.1 ${openjpeg.incDir}
+
+    # https://github.com/ecmwf/ecbuild/issues/40
+    substituteInPlace cmake/ecbuild_config.h.in \
+      --replace @CMAKE_INSTALL_PREFIX@/@INSTALL_LIB_DIR@ @eccodes_FULL_INSTALL_LIB_DIR@ \
+      --replace @CMAKE_INSTALL_PREFIX@/@INSTALL_BIN_DIR@ @eccodes_FULL_INSTALL_BIN_DIR@
+    substituteInPlace cmake/pkg-config.pc.in \
+      --replace '$'{prefix}/@INSTALL_LIB_DIR@ @eccodes_FULL_INSTALL_LIB_DIR@ \
+      --replace '$'{prefix}/@INSTALL_INCLUDE_DIR@ @eccodes_FULL_INSTALL_INCLUDE_DIR@ \
+      --replace '$'{prefix}/@INSTALL_BIN_DIR@ @eccodes_FULL_INSTALL_BIN_DIR@
+    substituteInPlace cmake/ecbuild_install_project.cmake \
+      --replace '$'{CMAKE_INSTALL_PREFIX}/'$'{INSTALL_INCLUDE_DIR} '$'{'$'{PROJECT_NAME}_FULL_INSTALL_INCLUDE_DIR}
+  '';
+
+  nativeBuildInputs = [ cmake gfortran perl ];
+
+  buildInputs = [
+    netcdf
+    openjpeg
+    libaec
+    libpng
+  ];
+
+  propagatedBuildInputs = lib.optionals enablePython [
+    pythonPackages.python
+    pythonPackages.numpy
+  ];
+
+  cmakeFlags = [
+    "-DENABLE_PYTHON=${if enablePython then "ON" else "OFF"}"
+    "-DENABLE_PNG=ON"
+    "-DENABLE_ECCODES_THREADS=${if enablePosixThreads then "ON" else "OFF"}"
+    "-DENABLE_ECCODES_OMP_THREADS=${if enableOpenMPThreads then "ON" else "OFF"}"
+  ];
+
+  doCheck = true;
+
+  # Only do tests that don't require downloading 120MB of testdata
+  checkPhase = ''
+    ctest -R "eccodes_t_(definitions|calendar|unit_tests|md5|uerra|grib_2nd_order_numValues|julian)" -VV
+  '';
+
+  meta = with lib; {
+    homepage = "https://confluence.ecmwf.int/display/ECC/";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ knedlsepp ];
+    platforms = platforms.unix;
+    description = "ECMWF library for reading and writing GRIB, BUFR and GTS abbreviated header";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/eclib/default.nix b/nixpkgs/pkgs/development/libraries/eclib/default.nix
new file mode 100644
index 000000000000..f78fb9a19106
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/eclib/default.nix
@@ -0,0 +1,52 @@
+{ lib, stdenv
+, fetchurl
+, autoreconfHook
+, pari
+, ntl
+, gmp
+# "FLINT is optional and only used for one part of sparse matrix reduction,
+# which is used in the modular symbol code but not mwrank or other elliptic
+# curve programs." -- https://github.com/JohnCremona/eclib/blob/master/README
+, withFlint ? false, flint ? null
+}:
+
+assert withFlint -> flint != null;
+
+stdenv.mkDerivation rec {
+  pname = "eclib";
+  version = "20231212"; # upgrade might break the sage interface
+  # sage tests to run:
+  # src/sage/interfaces/mwrank.py
+  # src/sage/libs/eclib
+  # ping @timokau for more info
+  src = fetchurl {
+    # all releases for this project appear on its GitHub releases page
+    # by definition! other distros sometimes update whenever they see
+    # a version bump in configure.ac or a new tag (and this might show
+    # up on repology). however, a version bump or a new tag may not
+    # represent a new release, and a new release might not be tagged.
+    #
+    # see https://github.com/JohnCremona/eclib/issues/64#issuecomment-789788561
+    # for upstream's explanation of the above
+    url = "https://github.com/JohnCremona/eclib/releases/download/v${version}/eclib-${version}.tar.bz2";
+    sha256 = "sha256-MtEWo+NZsN5PZIbCu2GIu4tVPIuDP2GMwllkhOi2FFo=";
+  };
+  buildInputs = [
+    pari
+    ntl
+    gmp
+  ] ++ lib.optionals withFlint [
+    flint
+  ];
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+  doCheck = true;
+  meta = with lib; {
+    description = "Elliptic curve tools";
+    homepage = "https://github.com/JohnCremona/eclib";
+    license = licenses.gpl2Plus;
+    maintainers = teams.sage.members;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/edencommon/default.nix b/nixpkgs/pkgs/development/libraries/edencommon/default.nix
new file mode 100644
index 000000000000..022cecc27a61
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/edencommon/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, lib, cmake, fetchFromGitHub, glog, folly, fmt_8, boost, gtest }:
+
+stdenv.mkDerivation rec {
+  pname = "edencommon";
+  version = "2023.03.06.00";
+
+  src = fetchFromGitHub {
+    owner = "facebookexperimental";
+    repo = "edencommon";
+    rev = "v${version}";
+    sha256 = "sha256-m54TaxThWe6bUa6Q1t+e99CLFOvut9vq9RSmimTNuaU=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = lib.optionals stdenv.isDarwin [
+    "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14" # For aligned allocation
+  ];
+
+  buildInputs = [
+    glog
+    folly
+    fmt_8
+    boost
+    gtest
+  ];
+
+  meta = with lib; {
+    description = "A shared library for Meta's source control filesystem tools (EdenFS and Watchman)";
+    homepage = "https://github.com/facebookexperimental/edencommon";
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ kylesferrazza ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/editline/default.nix b/nixpkgs/pkgs/development/libraries/editline/default.nix
new file mode 100644
index 000000000000..4f891a24f1f0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/editline/default.nix
@@ -0,0 +1,42 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, nix-update-script, fetchpatch }:
+
+stdenv.mkDerivation rec {
+  pname = "editline";
+  version = "1.17.1";
+  src = fetchFromGitHub {
+    owner = "troglobit";
+    repo = "editline";
+    rev = version;
+    sha256 = "sha256-0FeDUVCUahbweH24nfaZwa7j7lSfZh1TnQK7KYqO+3g=";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "fix-for-home-end-in-tmux.patch";
+      url = "https://github.com/troglobit/editline/commit/265c1fb6a0b99bedb157dc7c320f2c9629136518.patch";
+      sha256 = "sha256-9fhQH0hT8BcykGzOUoT18HBtWjjoXnePSGDJQp8GH30=";
+    })
+
+    # Pending autoconf-2.72 upstream support:
+    #   https://github.com/troglobit/editline/pull/64
+    (fetchpatch {
+      name = "autoconf-2.72.patch";
+      url = "https://github.com/troglobit/editline/commit/f444a316f5178b8e20fe31e7b2d979e651da077e.patch";
+      hash = "sha256-m3jExTkPvE+ZBwHzf/A+ugzzfbLmeWYn726l7Po7f10=";
+    })
+  ];
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  outputs = [ "out" "dev" "man" "doc" ];
+
+  passthru.updateScript = nix-update-script { };
+
+  meta = with lib; {
+    homepage = "https://troglobit.com/projects/editline/";
+    description = "A readline() replacement for UNIX without termcap (ncurses)";
+    license = licenses.bsdOriginal;
+    maintainers = with maintainers; [ dtzWill oxalica ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/egl-wayland/default.nix b/nixpkgs/pkgs/development/libraries/egl-wayland/default.nix
new file mode 100644
index 000000000000..f84b44007e29
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/egl-wayland/default.nix
@@ -0,0 +1,66 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, eglexternalplatform
+, pkg-config
+, meson
+, ninja
+, wayland-scanner
+, libGL
+, libX11
+, libdrm
+, wayland
+, wayland-protocols
+}:
+
+stdenv.mkDerivation rec {
+  pname = "egl-wayland";
+  version = "1.1.13";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "Nvidia";
+    repo = pname;
+    rev = version;
+    hash = "sha256-NA+jr27aYu0XPG9sxnBtjeBTFHmV7TENRsFy8dDdNUc=";
+  };
+
+  postPatch = ''
+    # Declares an includedir but doesn't install any headers
+    # CMake's `pkg_check_modules(NAME wayland-eglstream IMPORTED_TARGET)` considers this an error
+    sed -i -e '/includedir/d' wayland-eglstream.pc.in
+  '';
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    wayland-scanner
+  ];
+
+  buildInputs = [
+    libGL
+    libX11
+    libdrm
+    wayland
+    wayland-protocols
+  ];
+
+  propagatedBuildInputs = [
+    eglexternalplatform
+  ];
+
+  meta = with lib; {
+    description = "The EGLStream-based Wayland external platform";
+    homepage = "https://github.com/NVIDIA/egl-wayland/";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ hedning ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/eglexternalplatform/default.nix b/nixpkgs/pkgs/development/libraries/eglexternalplatform/default.nix
new file mode 100644
index 000000000000..2845faa9d088
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/eglexternalplatform/default.nix
@@ -0,0 +1,40 @@
+{ stdenvNoCC
+, lib
+, fetchFromGitHub
+}:
+
+stdenvNoCC.mkDerivation rec {
+  pname = "eglexternalplatform";
+  version = "1.1";
+
+  src = fetchFromGitHub {
+    owner = "Nvidia";
+    repo = "eglexternalplatform";
+    rev = "7c8f8e2218e46b1a4aa9538520919747f1184d86";
+    sha256 = "0lr5s2xa1zn220ghmbsiwgmx77l156wk54c7hybia0xpr9yr2nhb";
+  };
+
+  dontConfigure = true;
+  dontBuild = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/include/
+    cp interface/* $out/include/
+
+    substituteInPlace eglexternalplatform.pc \
+      --replace "/usr/include/EGL" "$out/include"
+    install -Dm644 {.,$out/share/pkgconfig}/eglexternalplatform.pc
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "The EGL External Platform interface";
+    homepage = "https://github.com/NVIDIA/eglexternalplatform";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ hedning ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/eigen/2.0.nix b/nixpkgs/pkgs/development/libraries/eigen/2.0.nix
new file mode 100644
index 000000000000..a16335946367
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/eigen/2.0.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitLab, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "eigen";
+  version = "2.0.17";
+
+  src = fetchFromGitLab {
+    owner = "libeigen";
+    repo = pname;
+    rev = version;
+    hash = "sha256-C1Bu2H4zxd/2QVzz9AOdoCSRwOYjF41Vr/0S8Fm2kzQ=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    homepage = "https://eigen.tuxfamily.org";
+    description = "C++ template library for linear algebra: vectors, matrices, and related algorithms";
+    license = licenses.lgpl3Plus;
+    maintainers = with maintainers; [ sander raskin ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/eigen/default.nix b/nixpkgs/pkgs/development/libraries/eigen/default.nix
new file mode 100644
index 000000000000..18fe7450d508
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/eigen/default.nix
@@ -0,0 +1,31 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "eigen";
+  version = "3.4.0";
+
+  src = fetchFromGitLab {
+    owner = "libeigen";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-1/4xMetKMDOgZgzz3WMxfHUEpmdAm52RqZvz6i0mLEw=";
+  };
+
+  patches = [
+    ./include-dir.patch
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    homepage = "https://eigen.tuxfamily.org";
+    description = "C++ template library for linear algebra: vectors, matrices, and related algorithms";
+    license = licenses.lgpl3Plus;
+    maintainers = with maintainers; [ sander raskin ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/eigen/include-dir.patch b/nixpkgs/pkgs/development/libraries/eigen/include-dir.patch
new file mode 100644
index 000000000000..9928bbdbed1b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/eigen/include-dir.patch
@@ -0,0 +1,57 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ # cmake_minimum_require must be the first command of the file
+-cmake_minimum_required(VERSION 3.5.0)
++cmake_minimum_required(VERSION 3.7.0)
+ 
+ project(Eigen3)
+ 
+@@ -443,7 +443,7 @@ set(PKGCONFIG_INSTALL_DIR
+     CACHE PATH "The directory relative to CMAKE_INSTALL_PREFIX where eigen3.pc is installed"
+     )
+ 
+-foreach(var INCLUDE_INSTALL_DIR CMAKEPACKAGE_INSTALL_DIR PKGCONFIG_INSTALL_DIR)
++foreach(var CMAKEPACKAGE_INSTALL_DIR PKGCONFIG_INSTALL_DIR)
+   # If an absolute path is specified, make it relative to "{CMAKE_INSTALL_PREFIX}".
+   if(IS_ABSOLUTE "${${var}}")
+     file(RELATIVE_PATH "${var}" "${CMAKE_INSTALL_PREFIX}" "${${var}}")
+@@ -466,13 +466,6 @@ install(FILES
+   DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel
+   )
+ 
+-if(EIGEN_BUILD_PKGCONFIG)
+-    configure_file(eigen3.pc.in eigen3.pc @ONLY)
+-    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/eigen3.pc
+-        DESTINATION ${PKGCONFIG_INSTALL_DIR}
+-        )
+-endif()
+-
+ install(DIRECTORY Eigen DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel)
+ 
+ 
+@@ -593,8 +586,15 @@ set ( EIGEN_VERSION_MAJOR  ${EIGEN_WORLD_VERSION} )
+ set ( EIGEN_VERSION_MINOR  ${EIGEN_MAJOR_VERSION} )
+ set ( EIGEN_VERSION_PATCH  ${EIGEN_MINOR_VERSION} )
+ set ( EIGEN_DEFINITIONS "")
+-set ( EIGEN_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/${INCLUDE_INSTALL_DIR}" )
+ set ( EIGEN_ROOT_DIR ${CMAKE_INSTALL_PREFIX} )
++GNUInstallDirs_get_absolute_install_dir(EIGEN_INCLUDE_DIR INCLUDE_INSTALL_DIR)
++
++if(EIGEN_BUILD_PKGCONFIG)
++    configure_file(eigen3.pc.in eigen3.pc @ONLY)
++    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/eigen3.pc
++        DESTINATION ${PKGCONFIG_INSTALL_DIR}
++        )
++endif()
+ 
+ include (CMakePackageConfigHelpers)
+ 
+--- a/eigen3.pc.in
++++ b/eigen3.pc.in
+@@ -6,4 +6,4 @@ Description: A C++ template library for linear algebra: vectors, matrices, and r
+ Requires:
+ Version: @EIGEN_VERSION_NUMBER@
+ Libs:
+-Cflags: -I${prefix}/@INCLUDE_INSTALL_DIR@
++Cflags: -I@EIGEN_INCLUDE_DIR@
diff --git a/nixpkgs/pkgs/development/libraries/elf-header/default.nix b/nixpkgs/pkgs/development/libraries/elf-header/default.nix
new file mode 100644
index 000000000000..72166bb38ce9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/elf-header/default.nix
@@ -0,0 +1,44 @@
+{ stdenvNoCC, lib, glibc, musl }:
+
+let
+   libc =
+     if stdenvNoCC.targetPlatform.isMusl
+     then musl
+     else glibc;
+   headerPath =
+     if stdenvNoCC.targetPlatform.isMusl
+     then "musl-${libc.version}/include/elf.h"
+     else "glibc-${libc.version}/elf/elf.h";
+in
+
+stdenvNoCC.mkDerivation {
+  pname = "elf-header";
+  inherit (libc) version;
+
+  src = null;
+
+  dontUnpack = true;
+
+  dontBuild = true;
+
+  installPhase = ''
+    mkdir -p "$out/include";
+    tar -xf \
+        ${lib.escapeShellArg libc.src} \
+        ${lib.escapeShellArg headerPath} \
+        --to-stdout \
+      | sed -e '/features\.h/d' \
+      > "$out/include/elf.h"
+  '';
+
+  meta = libc.meta // {
+    outputsToInstall = [ "out" ];
+    description = "The datastructures of ELF according to the target platform's libc";
+    longDescription = ''
+      The Executable and Linkable Format (ELF, formerly named Extensible Linking
+      Format), is usually defined in a header like this.
+    '';
+    platforms = lib.platforms.all;
+    maintainers = [ lib.maintainers.ericson2314 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/elfio/default.nix b/nixpkgs/pkgs/development/libraries/elfio/default.nix
new file mode 100644
index 000000000000..13bdbe735d63
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/elfio/default.nix
@@ -0,0 +1,34 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, boost
+}:
+
+stdenv.mkDerivation rec {
+  pname = "elfio";
+  version = "3.10";
+
+  src = fetchFromGitHub {
+    owner = "serge1";
+    repo = "elfio";
+    rev = "Release_${version}";
+    sha256 = "sha256-DuZhkiHXdCplRiOy1Gsu7voVPdCbFt+4qFqlOeOeWQw=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  nativeCheckInputs = [ boost ];
+
+  cmakeFlags = [ "-DELFIO_BUILD_TESTS=ON" ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Header-only C++ library for reading and generating files in the ELF binary format";
+    homepage = "https://github.com/serge1/ELFIO";
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ prusnak ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/elpa/default.nix b/nixpkgs/pkgs/development/libraries/elpa/default.nix
new file mode 100644
index 000000000000..910494e0b473
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/elpa/default.nix
@@ -0,0 +1,105 @@
+{ lib, stdenv, fetchurl, autoreconfHook, mpiCheckPhaseHook
+, gfortran, perl, mpi, blas, lapack, scalapack, openssh
+# CPU optimizations
+, avxSupport ? stdenv.hostPlatform.avxSupport
+, avx2Support ? stdenv.hostPlatform.avx2Support
+, avx512Support ? stdenv.hostPlatform.avx512Support
+, config
+# Enable NIVIA GPU support
+# Note, that this needs to be built on a system with a GPU
+# present for the tests to succeed.
+, enableCuda ? config.cudaSupport
+# type of GPU architecture
+, nvidiaArch ? "sm_60"
+, cudaPackages
+} :
+
+assert blas.isILP64 == lapack.isILP64;
+assert blas.isILP64 == scalapack.isILP64;
+
+stdenv.mkDerivation rec {
+  pname = "elpa";
+  version = "2023.11.001";
+
+  passthru = { inherit (blas) isILP64; };
+
+  src = fetchurl {
+    url = "https://elpa.mpcdf.mpg.de/software/tarball-archive/Releases/${version}/elpa-${version}.tar.gz";
+    sha256 = "sha256-tXvRl85nvbbiRRJOn9q4mz/a3dvTTYEu5JDVdH7npBA=";
+  };
+
+  patches = [
+    # Use a plain name for the pkg-config file
+    ./pkg-config.patch
+  ];
+
+  postPatch = ''
+    patchShebangs ./fdep/fortran_dependencies.pl
+    patchShebangs ./test-driver
+
+    # Fix the test script generator
+    substituteInPlace Makefile.am --replace '#!/bin/bash' '#!${stdenv.shell}'
+  '';
+
+  outputs = [ "out" "doc" "man" "dev" ];
+
+  nativeBuildInputs = [ autoreconfHook perl ]
+    ++ lib.optionals enableCuda [ cudaPackages.cuda_nvcc ];
+
+  buildInputs = [ mpi blas lapack scalapack ]
+    ++ lib.optionals enableCuda [
+      cudaPackages.cuda_cudart
+      cudaPackages.libcublas
+    ];
+
+  preConfigure = ''
+    export FC="mpifort"
+    export CC="mpicc"
+    export CXX="mpicxx"
+    export CPP="cpp"
+
+    # These need to be set for configure to succeed
+    export FCFLAGS="${lib.optionalString stdenv.hostPlatform.isx86_64 "-msse3 "
+      + lib.optionalString avxSupport "-mavx "
+      + lib.optionalString avx2Support "-mavx2 -mfma "
+      + lib.optionalString avx512Support "-mavx512"}"
+
+    export CFLAGS=$FCFLAGS
+  '';
+
+  configureFlags = [
+    "--with-mpi"
+    "--enable-openmp"
+    "--without-threading-support-check-during-build"
+  ] ++ lib.optional blas.isILP64 "--enable-64bit-integer-math-support"
+    ++ lib.optional (!avxSupport) "--disable-avx"
+    ++ lib.optional (!avx2Support) "--disable-avx2"
+    ++ lib.optional (!avx512Support) "--disable-avx512"
+    ++ lib.optional (!stdenv.hostPlatform.isx86_64) "--disable-sse"
+    ++ lib.optional (!stdenv.hostPlatform.isx86_64) "--disable-sse-assembly"
+    ++ lib.optional stdenv.hostPlatform.isx86_64 "--enable-sse-assembly"
+    ++ lib.optionals enableCuda [  "--enable-nvidia-gpu" "--with-NVIDIA-GPU-compute-capability=${nvidiaArch}" ];
+
+  enableParallelBuilding = true;
+
+  doCheck = !enableCuda;
+
+  nativeCheckInputs = [ mpiCheckPhaseHook openssh ];
+  preCheck = ''
+    #patchShebangs ./
+
+    # Run dual threaded
+    export OMP_NUM_THREADS=2
+
+    # Reduce test problem sizes
+    export TEST_FLAGS="1500 50 16"
+  '';
+
+  meta = with lib; {
+    description = "Eigenvalue Solvers for Petaflop-Applications";
+    homepage = "https://elpa.mpcdf.mpg.de/";
+    license = licenses.lgpl3Only;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.markuskowa ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/elpa/pkg-config.patch b/nixpkgs/pkgs/development/libraries/elpa/pkg-config.patch
new file mode 100644
index 000000000000..2fc1399483c6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/elpa/pkg-config.patch
@@ -0,0 +1,13 @@
+diff --git a/configure.ac b/configure.ac
+index 0aa533a..da5d1f7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2336,7 +2336,7 @@ if test x"$have_loop_blocking" = x"yes"; then
+ fi
+ 
+ AC_SUBST([SUFFIX])
+-AC_SUBST([PKG_CONFIG_FILE],[elpa${SUFFIX}.pc])
++AC_SUBST([PKG_CONFIG_FILE],[elpa.pc])
+ 
+ AC_CONFIG_FILES([
+   Makefile
diff --git a/nixpkgs/pkgs/development/libraries/embree/2.x.nix b/nixpkgs/pkgs/development/libraries/embree/2.x.nix
new file mode 100644
index 000000000000..45f423659195
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/embree/2.x.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, ispc, tbb, glfw,
+openimageio, libjpeg, libpng, libpthreadstubs, libX11
+}:
+
+stdenv.mkDerivation {
+  pname = "embree";
+  version = "2.17.4";
+
+  src = fetchFromGitHub {
+    owner = "embree";
+    repo = "embree";
+    rev = "v2.17.4";
+    sha256 = "0q3r724r58j4b6cbyy657fsb78z7a2c7d5mwdp7552skynsn2mn9";
+  };
+
+  cmakeFlags = [ "-DEMBREE_TUTORIALS=OFF" ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ ispc tbb glfw openimageio libjpeg libpng libX11 libpthreadstubs ];
+  meta = with lib; {
+    description = "High performance ray tracing kernels from Intel";
+    homepage = "https://embree.github.io/";
+    maintainers = with maintainers; [ hodapp ];
+    license = licenses.asl20;
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/embree/default.nix b/nixpkgs/pkgs/development/libraries/embree/default.nix
new file mode 100644
index 000000000000..419572f3ff16
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/embree/default.nix
@@ -0,0 +1,50 @@
+{ stdenv, lib, fetchFromGitHub, fetchpatch, cmake, pkg-config, ispc, tbb, glfw,
+  openimageio, libjpeg, libpng, libpthreadstubs, libX11, glib }:
+
+stdenv.mkDerivation rec {
+  pname = "embree";
+  version = "3.13.5";
+
+  src = fetchFromGitHub {
+    owner = "embree";
+    repo = "embree";
+    rev = "v${version}";
+    sha256 = "sha256-tfM4SGOFVBG0pQK9B/iN2xDaW3yjefnTtsoUad75m80=";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "fixed-compilation-issues-for-arm-aarch64-processor-under-linux.patch";
+      url = "https://github.com/embree/embree/commit/82ca6b5ccb7abe0403a658a0e079926478f04cb1.patch";
+      hash = "sha256-l9S4PBk+yQUypQ22l05daD0ruouZKE4VHkGvzKxkH4o=";
+    })
+  ];
+
+  postPatch = ''
+    # Fix duplicate /nix/store/.../nix/store/.../ paths
+    sed -i "s|SET(EMBREE_ROOT_DIR .*)|set(EMBREE_ROOT_DIR $out)|" \
+      common/cmake/embree-config.cmake
+    sed -i "s|$""{EMBREE_ROOT_DIR}/||" common/cmake/embree-config.cmake
+    substituteInPlace common/math/math.h --replace 'defined(__MACOSX__) && !defined(__INTEL_COMPILER)' 0
+    substituteInPlace common/math/math.h --replace 'defined(__WIN32__) || defined(__FreeBSD__)' 'defined(__WIN32__) || defined(__FreeBSD__) || defined(__MACOSX__)'
+  '';
+
+  cmakeFlags = [
+    "-DEMBREE_TUTORIALS=OFF"
+    "-DEMBREE_RAY_MASK=ON"
+    "-DTBB_ROOT=${tbb}"
+    "-DTBB_INCLUDE_DIR=${tbb.dev}/include"
+  ];
+
+  nativeBuildInputs = [ ispc pkg-config cmake ];
+  buildInputs = [ tbb glfw openimageio libjpeg libpng libX11 libpthreadstubs ]
+                ++ lib.optionals stdenv.isDarwin [ glib ];
+
+  meta = with lib; {
+    description = "High performance ray tracing kernels from Intel";
+    homepage = "https://embree.github.io/";
+    maintainers = with maintainers; [ hodapp gebner ];
+    license = licenses.asl20;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/enchant/2.x.nix b/nixpkgs/pkgs/development/libraries/enchant/2.x.nix
new file mode 100644
index 000000000000..10d9a4106bb9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/enchant/2.x.nix
@@ -0,0 +1,67 @@
+{ stdenv
+, lib
+, fetchurl
+, aspell
+, groff
+, pkg-config
+, glib
+, hunspell
+, hspell
+, nuspell
+, unittest-cpp
+}:
+
+stdenv.mkDerivation rec {
+  pname = "enchant";
+  version = "2.6.5";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "https://github.com/AbiWord/${pname}/releases/download/v${version}/${pname}-${version}.tar.gz";
+    hash = "sha256-no/SjLZae22jVFh4pcL1KhXwPASTOl/0jbif6GhFco4=";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    groff
+    pkg-config
+  ];
+
+  buildInputs = [
+    glib
+    hunspell
+    nuspell
+  ];
+
+  checkInputs = [
+    unittest-cpp
+  ];
+
+  # libtool puts these to .la files
+  propagatedBuildInputs = [
+    hspell
+    aspell
+  ];
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  configureFlags = [
+    "--enable-relocatable" # needed for tests
+    "--with-aspell"
+    "--with-hspell"
+    "--with-hunspell"
+    "--with-nuspell"
+  ];
+
+  meta = with lib; {
+    description = "Generic spell checking library";
+    homepage = "https://abiword.github.io/enchant/";
+    license = licenses.lgpl21Plus; # with extra provision for non-free checkers
+    maintainers = with maintainers; [ jtojnar ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/enet/default.nix b/nixpkgs/pkgs/development/libraries/enet/default.nix
new file mode 100644
index 000000000000..53aec96fe705
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/enet/default.nix
@@ -0,0 +1,19 @@
+{lib, stdenv, fetchurl}:
+
+stdenv.mkDerivation rec {
+  pname = "enet";
+  version = "1.3.17";
+
+  src = fetchurl {
+    url = "http://enet.bespin.org/download/${pname}-${version}.tar.gz";
+    sha256 = "1p6f9mby86af6cs7pv6h48032ip9g32c05cb7d9mimam8lchz3x3";
+  };
+
+  meta = {
+    homepage = "http://enet.bespin.org/";
+    description = "Simple and robust network communication layer on top of UDP";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/entt/default.nix b/nixpkgs/pkgs/development/libraries/entt/default.nix
new file mode 100644
index 000000000000..2f7a86c7f113
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/entt/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+stdenv.mkDerivation rec {
+  pname = "entt";
+  version = "3.13.1";
+
+  src = fetchFromGitHub {
+    owner = "skypjack";
+    repo = "entt";
+    rev = "v${version}";
+    hash = "sha256-TZuKgpLJCy3uct39SFSVi4b4lyldcfJ3AQNrz3OT3Ow=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    homepage = "https://github.com/skypjack/entt";
+    description = "A header-only, tiny and easy to use library for game programming and much more written in modern C++";
+    maintainers = with maintainers; [ twey ];
+    platforms = platforms.all;
+    license = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/epoll-shim/default.nix b/nixpkgs/pkgs/development/libraries/epoll-shim/default.nix
new file mode 100644
index 000000000000..d303f814b271
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/epoll-shim/default.nix
@@ -0,0 +1,38 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "epoll-shim";
+  version = "0.0.20230411";
+
+  src = fetchFromGitHub {
+    owner = "jiixyj";
+    repo = finalAttrs.pname;
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-TOfybtUEp+EtY2l/UGwVFIESDe9kELJCZHlcz22Cmi8=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  cmakeFlags = [
+    "-DCMAKE_INSTALL_PKGCONFIGDIR=${placeholder "out"}/lib/pkgconfig"
+    "-DBUILD_TESTING=${lib.boolToString finalAttrs.finalPackage.doCheck}"
+  ];
+
+  # https://github.com/jiixyj/epoll-shim/issues/41
+  # https://github.com/jiixyj/epoll-shim/pull/34
+  doCheck = !stdenv.isDarwin;
+
+  meta = with lib; {
+    description = "Small epoll implementation using kqueue";
+    homepage = "https://github.com/jiixyj/epoll-shim";
+    license = licenses.mit;
+    platforms = platforms.darwin ++ platforms.freebsd ++ platforms.netbsd ++ platforms.openbsd;
+    maintainers = with maintainers; [ wegank ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/ethash/default.nix b/nixpkgs/pkgs/development/libraries/ethash/default.nix
new file mode 100644
index 000000000000..9100ccad3b31
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ethash/default.nix
@@ -0,0 +1,47 @@
+{ lib, stdenv, fetchFromGitHub, cmake, gbenchmark, gtest }:
+
+stdenv.mkDerivation rec {
+  pname = "ethash";
+  version = "1.0.1";
+
+  src =
+    fetchFromGitHub {
+      owner = "chfast";
+      repo = "ethash";
+      rev = "v${version}";
+      sha256 = "sha256-BjgfWDn72P4NJhzq0ySW8bvZI3AQB9jOaRqFIeCfJ8k=";
+    };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  nativeCheckInputs = [
+    gbenchmark
+    gtest
+  ];
+
+  #preConfigure = ''
+  #  sed -i 's/GTest::main//' test/unittests/CMakeLists.txt
+  #  cat test/unittests/CMakeLists.txt
+  #  ln -sfv ${gtest.src}/googletest gtest
+  #'';
+
+  # NOTE: disabling tests due to gtest issue
+  cmakeFlags = [
+    "-DHUNTER_ENABLED=OFF"
+    "-DETHASH_BUILD_TESTS=OFF"
+    #"-Dbenchmark_DIR=${gbenchmark}/lib/cmake/benchmark"
+    #"-DGTest_DIR=${gtest.dev}/lib/cmake/GTest"
+    #"-DGTest_DIR=${gtest.src}/googletest"
+    #"-DCMAKE_PREFIX_PATH=${gtest.dev}/lib/cmake"
+  ];
+
+  meta = with lib; {
+    description = "PoW algorithm for Ethereum 1.0 based on Dagger-Hashimoto";
+    homepage = "https://github.com/ethereum/ethash";
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ ];
+    license = licenses.asl20;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/eventlog/default.nix b/nixpkgs/pkgs/development/libraries/eventlog/default.nix
new file mode 100644
index 000000000000..b5b4bc556f69
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/eventlog/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "eventlog";
+  version = "0.2.13";
+
+  src = fetchFromGitHub {
+    owner = "balabit";
+    repo = "eventlog";
+    rev = "a5c19163ba131f79452c6dfe4e31c2b4ce4be741";
+    sha256 = "0a2za3hs7wzy14z7mfgldy1r9xdlqv97yli9wlm8xldr0amsx869";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  meta = with lib; {
+    description = "Syslog event logger library";
+    longDescription = ''
+      The EventLog library aims to be a replacement of the simple syslog() API
+      provided on UNIX systems. The major difference between EventLog and
+      syslog is that EventLog tries to add structure to messages.
+
+      Where you had a simple non-structrured string in syslog() you have a
+      combination of description and tag/value pairs.
+    '';
+    homepage = "https://www.balabit.com/support/community/products/";
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/example-robot-data/default.nix b/nixpkgs/pkgs/development/libraries/example-robot-data/default.nix
new file mode 100644
index 000000000000..b2e665bbc4a9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/example-robot-data/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, pythonSupport ? false
+, python3Packages
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "example-robot-data";
+  version = "4.1.0";
+
+  src = fetchFromGitHub {
+    owner = "Gepetto";
+    repo = "example-robot-data";
+    rev = "v${finalAttrs.version}";
+    fetchSubmodules = true;
+    hash = "sha256-Heq+c8SSYNO8ksTv5FphRBRStlTakm9T66jlPXon5tI=";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = lib.optionals pythonSupport [
+    python3Packages.pinocchio
+  ];
+
+  cmakeFlags = lib.optionals (!pythonSupport) [
+    "-DBUILD_PYTHON_INTERFACE=OFF"
+  ];
+
+  doCheck = true;
+  # The package expect to find an `example-robot-data/robots` folder somewhere
+  # either in install prefix or in the sources
+  # where it can find the meshes for unit tests
+  preCheck = "ln -s source ../../${finalAttrs.pname}";
+  pythonImportsCheck = [
+    "example_robot_data"
+  ];
+
+  meta = with lib; {
+    description = "Set of robot URDFs for benchmarking and developed examples.";
+    homepage = "https://github.com/Gepetto/example-robot-data";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ nim65s wegank ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/exempi/default.nix b/nixpkgs/pkgs/development/libraries/exempi/default.nix
new file mode 100644
index 000000000000..2ebf1ce7cc91
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/exempi/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchurl, expat, zlib, boost, libiconv, darwin }:
+
+stdenv.mkDerivation rec {
+  pname = "exempi";
+  version = "2.6.5";
+
+  src = fetchurl {
+    url = "https://libopenraw.freedesktop.org/download/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-6fmj1Cv/c7XrD3fsIs0BY8PiGUnMQUrR8ZoEZd3kH/4=";
+  };
+
+  configureFlags = [
+    "--with-boost=${boost.dev}"
+  ] ++ lib.optionals (!doCheck) [
+    "--enable-unittest=no"
+  ];
+
+  buildInputs = [ expat zlib boost ]
+    ++ lib.optionals stdenv.isDarwin [ libiconv darwin.apple_sdk.frameworks.CoreServices ];
+
+  doCheck = stdenv.isLinux && stdenv.is64bit;
+  dontDisableStatic = doCheck;
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "An implementation of XMP (Adobe's Extensible Metadata Platform)";
+    homepage = "https://libopenraw.freedesktop.org/exempi/";
+    platforms = platforms.linux ++ platforms.darwin;
+    license = licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/exiv2/default.nix b/nixpkgs/pkgs/development/libraries/exiv2/default.nix
new file mode 100644
index 000000000000..f080bd804b48
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/exiv2/default.nix
@@ -0,0 +1,105 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, doxygen
+, gettext
+, graphviz
+, libxslt
+, removeReferencesTo
+, libiconv
+, brotli
+, expat
+, inih
+, zlib
+, libxml2
+, python3
+, which
+}:
+
+stdenv.mkDerivation rec {
+  pname = "exiv2";
+  version = "0.28.2";
+
+  outputs = [ "out" "lib" "dev" "doc" "man" ];
+
+  src = fetchFromGitHub {
+    owner = "exiv2";
+    repo = "exiv2";
+    rev = "v${version}";
+    hash = "sha256-0TgvIiuHMeohStIwmHOq4yvTj2H07wyx4w3iIdkrLTc=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    doxygen
+    gettext
+    graphviz
+    libxslt
+    removeReferencesTo
+  ];
+
+  buildInputs = lib.optionals stdenv.isDarwin [
+    libiconv
+  ];
+
+  propagatedBuildInputs = [
+    brotli
+    expat
+    inih
+    zlib
+  ];
+
+  nativeCheckInputs = [
+    libxml2.bin
+    python3
+    which
+  ];
+
+  cmakeFlags = [
+    "-DEXIV2_ENABLE_NLS=ON"
+    "-DEXIV2_BUILD_DOC=ON"
+    "-DEXIV2_ENABLE_BMFF=ON"
+  ];
+
+  buildFlags = [
+    "all"
+    "doc"
+  ];
+
+  doCheck = true;
+
+  preCheck = ''
+    patchShebangs ../test/
+    mkdir ../test/tmp
+  '' + lib.optionalString stdenv.hostPlatform.isAarch32 ''
+    # Fix tests on arm
+    # https://github.com/Exiv2/exiv2/issues/933
+    rm -f ../tests/bugfixes/github/test_CVE_2018_12265.py
+  '' + lib.optionalString stdenv.isDarwin ''
+    export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}$PWD/lib
+    export LC_ALL=C
+
+    # disable tests that requires loopback networking
+    substituteInPlace  ../tests/bash_tests/testcases.py \
+      --replace "def io_test(self):" "def io_disabled(self):"
+  '';
+
+  preFixup = ''
+    remove-references-to -t ${stdenv.cc.cc} $lib/lib/*.so.*.*.* $out/bin/exiv2
+  '';
+
+  disallowedReferences = [ stdenv.cc.cc ];
+
+  # causes redefinition of _FORTIFY_SOURCE
+  hardeningDisable = [ "fortify3" ];
+
+  meta = with lib; {
+    homepage = "https://exiv2.org";
+    description = "A library and command-line utility to manage image metadata";
+    platforms = platforms.all;
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ wegank ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/exosip/default.nix b/nixpkgs/pkgs/development/libraries/exosip/default.nix
new file mode 100644
index 000000000000..10d390bd678d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/exosip/default.nix
@@ -0,0 +1,20 @@
+{ lib, stdenv, fetchurl, libosip, openssl, pkg-config }:
+
+stdenv.mkDerivation rec {
+ pname = "libexosip2";
+ version = "5.3.0";
+
+ src = fetchurl {
+    url = "mirror://savannah/exosip/${pname}-${version}.tar.gz";
+    sha256 = "sha256-W3gjmGQx6lztyfCV1pZKzpZvCTsq59CwhAR4i/zrycI=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libosip openssl ];
+
+  meta = with lib; {
+    license = licenses.gpl2Plus;
+    description = "Library that hides the complexity of using the SIP protocol";
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/expat/default.nix b/nixpkgs/pkgs/development/libraries/expat/default.nix
new file mode 100644
index 000000000000..248e3774f4cd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/expat/default.nix
@@ -0,0 +1,65 @@
+{ lib
+, stdenv
+, fetchurl
+# for passthru.tests
+, python3
+, perlPackages
+, haskellPackages
+, luaPackages
+, ocamlPackages
+}:
+
+# Note: this package is used for bootstrapping fetchurl, and thus
+# cannot use fetchpatch! All mutable patches (generated by GitHub or
+# cgit) that are needed here should be included directly in Nixpkgs as
+# files.
+
+stdenv.mkDerivation rec {
+  pname = "expat";
+  version = "2.5.0";
+
+  src = fetchurl {
+    url = "https://github.com/libexpat/libexpat/releases/download/R_${lib.replaceStrings ["."] ["_"] version}/${pname}-${version}.tar.xz";
+    sha256 = "1gnwihpfz4x18rwd6cbrdggmfqjzwsdfh1gpmc0ph21c4gq2097g";
+  };
+
+  strictDeps = true;
+
+  outputs = [ "out" "dev" ]; # TODO: fix referrers
+  outputBin = "dev";
+
+  enableParallelBuilding = true;
+
+  configureFlags = lib.optional stdenv.isFreeBSD "--with-pic";
+
+  outputMan = "dev"; # tiny page for a dev tool
+
+  doCheck = true; # not cross;
+
+  preCheck = ''
+    patchShebangs ./run.sh ./test-driver-wrapper.sh
+  '';
+
+  # CMake files incorrectly calculate library path from dev prefix
+  # https://github.com/libexpat/libexpat/issues/501
+  postFixup = ''
+    substituteInPlace $dev/lib/cmake/expat-${version}/expat-noconfig.cmake \
+      --replace "$"'{_IMPORT_PREFIX}' $out
+  '';
+
+  passthru.tests = {
+    inherit python3;
+    inherit (python3.pkgs) xmltodict;
+    inherit (haskellPackages) hexpat;
+    inherit (perlPackages) XMLSAXExpat XMLParser;
+    inherit (luaPackages) luaexpat;
+    inherit (ocamlPackages) ocaml_expat;
+  };
+
+  meta = with lib; {
+    homepage = "https://libexpat.github.io/";
+    description = "A stream-oriented XML parser library written in C";
+    platforms = platforms.all;
+    license = licenses.mit; # expat version
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/expected-lite/default.nix b/nixpkgs/pkgs/development/libraries/expected-lite/default.nix
new file mode 100644
index 000000000000..5b5fc620795c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/expected-lite/default.nix
@@ -0,0 +1,32 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, ninja
+}:
+
+stdenv.mkDerivation rec {
+  pname = "expected-lite";
+  version = "0.6.3";
+
+  src = fetchFromGitHub {
+    owner = "martinmoene";
+    repo = "expected-lite";
+    rev = "v${version}";
+    hash = "sha256-Qvu/YmkivfXVGM4ZPLVt3XmOEnKWcmHpbb9xJyC2qDQ=";
+  };
+
+  nativeBuildInputs = [ cmake ninja ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = ''
+      Expected objects in C++11 and later in a single-file header-only library
+    '';
+    homepage = "https://github.com/martinmoene/expected-lite";
+    changelog = "https://github.com/martinmoene/expected-lite/blob/${src.rev}/CHANGES.txt";
+    license = licenses.boost;
+    maintainers = with maintainers; [ azahi ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/exprtk/default.nix b/nixpkgs/pkgs/development/libraries/exprtk/default.nix
new file mode 100644
index 000000000000..8dc4f7598abd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/exprtk/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "exprtk";
+  version = "0.0.2";
+
+  src = fetchFromGitHub {
+    owner = "ArashPartow";
+    repo = pname;
+    rev = version;
+    hash = "sha256-ZV5nS6wEbKfzXhfXEtVlkwaEtxpTOYQaGlaxKx3FIvE=";
+  };
+
+  dontBuild = true;
+
+  installPhase = ''
+    runHook preInstall
+    install -Dm644 exprtk.hpp "$out/include/exprtk.hpp"
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "The C++ Mathematical Expression Toolkit Library";
+    homepage = "https://www.partow.net/programming/exprtk/index.html";
+    license = licenses.mit;
+    maintainers = with maintainers; [ anselmschueler ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/faac/default.nix b/nixpkgs/pkgs/development/libraries/faac/default.nix
new file mode 100644
index 000000000000..42f1f8db59bb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/faac/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchurl, autoreconfHook
+, mp4v2Support ? true, mp4v2 ? null
+, drmSupport ? false # Digital Radio Mondiale
+}:
+
+assert mp4v2Support -> (mp4v2 != null);
+
+stdenv.mkDerivation rec {
+  pname = "faac";
+  version = "1.30";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/faac/${pname}-${builtins.replaceStrings ["."] ["_"] version}.tar.gz";
+    sha256 = "1lmj0dib3mjp84jhxc5ddvydkzzhb0gfrdh3ikcidjlcb378ghxd";
+  };
+
+  configureFlags = [ ]
+    ++ lib.optional mp4v2Support "--with-external-mp4v2"
+    ++ lib.optional drmSupport "--enable-drm";
+
+  hardeningDisable = [ "format" ];
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  buildInputs = [ ]
+    ++ lib.optional mp4v2Support mp4v2;
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Open source MPEG-4 and MPEG-2 AAC encoder";
+    license     = licenses.unfreeRedistributable;
+    maintainers = with maintainers; [ codyopel ];
+    platforms   = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/faad2/default.nix b/nixpkgs/pkgs/development/libraries/faad2/default.nix
new file mode 100644
index 000000000000..12179dd7e2a8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/faad2/default.nix
@@ -0,0 +1,42 @@
+{lib
+, stdenv
+, fetchFromGitHub
+, cmake
+
+# for passthru.tests
+, gst_all_1
+, mpd
+, ocamlPackages
+, vlc
+}:
+
+stdenv.mkDerivation rec {
+  pname = "faad2";
+  version = "2.11.1";
+
+  src = fetchFromGitHub {
+    owner = "knik0";
+    repo = "faad2";
+    rev = version;
+    hash = "sha256-E6oe7yjYy1SJo8xQkyUk1sSucKDMPxwUFVSAyrf4Pd8=";
+  };
+
+  outputs = [ "out" "dev" "man" ];
+
+  nativeBuildInputs = [ cmake ];
+
+  passthru.tests = {
+    inherit mpd vlc;
+    inherit (gst_all_1) gst-plugins-bad;
+    ocaml-faad = ocamlPackages.faad;
+  };
+
+  meta = with lib; {
+    description = "An open source MPEG-4 and MPEG-2 AAC decoder";
+    homepage = "https://sourceforge.net/projects/faac/";
+    license     = licenses.gpl2Plus;
+    maintainers = with maintainers; [ codyopel ];
+    mainProgram = "faad";
+    platforms   = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/farbfeld/default.nix b/nixpkgs/pkgs/development/libraries/farbfeld/default.nix
new file mode 100644
index 000000000000..3e1045ab852b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/farbfeld/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl, makeWrapper, file, libpng, libjpeg }:
+
+stdenv.mkDerivation rec {
+  pname = "farbfeld";
+  version = "4";
+
+  src = fetchurl {
+    url = "https://dl.suckless.org/farbfeld/farbfeld-${version}.tar.gz";
+    sha256 = "0ap7rcngffhdd57jw9j22arzkbrhwh0zpxhwbdfwl8fixlhmkpy7";
+  };
+
+  buildInputs = [ libpng libjpeg ];
+  nativeBuildInputs = [ makeWrapper ];
+
+  makeFlags = [ "CC:=$(CC)" ];
+
+  installFlags = [ "PREFIX=$(out)" ];
+  postInstall = ''
+    wrapProgram "$out/bin/2ff" --prefix PATH : "${file}/bin"
+  '';
+
+  meta = with lib; {
+    description = "Suckless image format with conversion tools";
+    homepage = "https://tools.suckless.org/farbfeld/";
+    license = licenses.isc;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ pSub ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/farstream/default.nix b/nixpkgs/pkgs/development/libraries/farstream/default.nix
new file mode 100644
index 000000000000..76ed20495725
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/farstream/default.nix
@@ -0,0 +1,63 @@
+{ lib, stdenv
+, fetchurl
+, fetchpatch
+, libnice
+, pkg-config
+, autoreconfHook
+, gstreamer
+, gst-plugins-base
+, gupnp-igd
+, gobject-introspection
+, gst-plugins-good
+, gst-plugins-bad
+, gst-libav
+, python3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "farstream";
+  version = "0.2.9";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "https://www.freedesktop.org/software/farstream/releases/farstream/${pname}-${version}.tar.gz";
+    sha256 = "0yzlh9jf47a3ir40447s7hlwp98f9yr8z4gcm0vjwz6g6cj12zfb";
+  };
+
+  patches = [
+    # Fix build with newer gnumake.
+    (fetchpatch {
+      url = "https://gitlab.freedesktop.org/farstream/farstream/-/commit/54987d44.diff";
+      sha256 = "02pka68p2j1wg7768rq7afa5wl9xv82wp86q7izrmwwnxdmz4zyg";
+    })
+  ];
+
+  buildInputs = [
+    libnice
+    gupnp-igd
+    libnice
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+    autoreconfHook
+    gobject-introspection
+    python3
+  ];
+
+  propagatedBuildInputs = [
+    gstreamer
+    gst-plugins-base
+    gst-plugins-good
+    gst-plugins-bad
+    gst-libav
+  ];
+
+  meta = with lib; {
+    homepage = "https://www.freedesktop.org/wiki/Software/Farstream";
+    description = "Audio/Video Communications Framework formely known as farsight";
+    platforms = platforms.unix;
+    license = licenses.lgpl21;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/fast-cpp-csv-parser/default.nix b/nixpkgs/pkgs/development/libraries/fast-cpp-csv-parser/default.nix
new file mode 100644
index 000000000000..5a81e3f72746
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fast-cpp-csv-parser/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "fast-cpp-csv-parser";
+  version = "2021-01-03";
+
+  src = fetchFromGitHub {
+    owner = "ben-strasser";
+    repo = pname;
+    rev = "75600d0b77448e6c410893830df0aec1dbacf8e3";
+    sha256 = "04kalwgsr8khqr1j5j13vzwaml268c5dvc9wfcwfs13wp3snqwf2";
+  };
+
+  installPhase = ''
+    mkdir -p $out/lib/pkgconfig $out/include
+    cp -r *.h $out/include/
+    substituteAll ${./fast-cpp-csv-parser.pc.in} $out/lib/pkgconfig/fast-cpp-csv-parser.pc
+  '';
+
+  meta = with lib; {
+    description = "A small, easy-to-use and fast header-only library for reading comma separated value (CSV) files";
+    homepage = "https://github.com/ben-strasser/fast-cpp-csv-parser";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ bhipple ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/fast-cpp-csv-parser/fast-cpp-csv-parser.pc.in b/nixpkgs/pkgs/development/libraries/fast-cpp-csv-parser/fast-cpp-csv-parser.pc.in
new file mode 100644
index 000000000000..4a8e57d20ffc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fast-cpp-csv-parser/fast-cpp-csv-parser.pc.in
@@ -0,0 +1,8 @@
+prefix=@out@
+includedir=${prefix}/include
+
+Name: fast-cpp-csv-parser
+Description: Fast header-only library for reading CSV files
+URL: https://github.com/ben-strasser/fast-cpp-csv-parser
+Version: @version@
+Cflags: -isystem${includedir}
diff --git a/nixpkgs/pkgs/development/libraries/fastcdr/0001-Do-not-require-wget-and-unzip.patch b/nixpkgs/pkgs/development/libraries/fastcdr/0001-Do-not-require-wget-and-unzip.patch
new file mode 100644
index 000000000000..8908beb08240
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fastcdr/0001-Do-not-require-wget-and-unzip.patch
@@ -0,0 +1,34 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+Date: Sat, 5 Jun 2021 14:50:26 +0200
+Subject: [PATCH] Do not require wget and unzip
+
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2261fe7..ce8edad 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -243,21 +243,6 @@ if(BUILD_DOCUMENTATION)
+         set(DOXYFILE_MAKE make.bat)
+     endif()
+ 
+-    if(NOT CHECK_DOCUMENTATION)
+-        find_program(WGET_EXE wget)
+-        if(WGET_EXE)
+-            message(STATUS "Found WGet: ${WGET_EXE}")
+-        else()
+-            message(FATAL_ERROR "wget is needed to build the documentation. Please install it correctly")
+-        endif()
+-        find_program(UNZIP_EXE unzip)
+-        if(UNZIP_EXE)
+-            message(STATUS "Found Unzip: ${UNZIP_EXE}")
+-        else()
+-            message(FATAL_ERROR "unzip is needed to build the documentation. Please install it correctly")
+-        endif()
+-    endif()
+-
+     # Target to create documentation directories
+     add_custom_target(docdirs
+         COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/doc
+-- 
+2.40.1
+
diff --git a/nixpkgs/pkgs/development/libraries/fastcdr/default.nix b/nixpkgs/pkgs/development/libraries/fastcdr/default.nix
new file mode 100644
index 000000000000..a5f87ec7b312
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fastcdr/default.nix
@@ -0,0 +1,64 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, gtest
+, withDocs ? true
+, doxygen
+, graphviz-nox
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "fastcdr";
+  version = "2.1.3";
+
+  src = fetchFromGitHub {
+    owner = "eProsima";
+    repo = "Fast-CDR";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-eSf6LNTVsGEBXjTmTBjjWKBqs68pbnVcw1p2bi1Asgg=";
+  };
+
+  patches = [
+    ./0001-Do-not-require-wget-and-unzip.patch
+  ];
+
+  # Fix doc generation error with doxygen >= 1.10.0
+  # see https://github.com/eProsima/Fast-CDR/issues/193
+  postPatch = ''
+    substituteInPlace ./doxyfile.in --replace \
+      "WARN_AS_ERROR          = YES" \
+      "WARN_AS_ERROR          = NO"
+  '';
+
+  cmakeFlags = lib.optional (stdenv.hostPlatform.isStatic) "-DBUILD_SHARED_LIBS=OFF"
+  # upstream turns BUILD_TESTING=OFF by default and doesn't honor cmake's default (=ON)
+  ++ lib.optional (finalAttrs.finalPackage.doCheck) "-DBUILD_TESTING=ON"
+  ++ lib.optional withDocs "-DBUILD_DOCUMENTATION=ON";
+
+  outputs = [ "out" ] ++ lib.optional withDocs "doc";
+
+  nativeBuildInputs = [
+    cmake
+  ] ++ lib.optionals withDocs [
+    doxygen
+    graphviz-nox
+  ];
+
+  doCheck = true;
+
+  checkInputs = [ gtest ];
+
+  meta = with lib; {
+    homepage = "https://github.com/eProsima/Fast-CDR";
+    description = "Serialization library for OMG's Common Data Representation (CDR)";
+    longDescription = ''
+      A C++ library that provides two serialization mechanisms. One is the
+      standard CDR serialization mechanism, while the other is a faster
+      implementation that modifies the standard.
+    '';
+    license = licenses.asl20;
+    maintainers = with maintainers; [ panicgh ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/fastjson/default.nix b/nixpkgs/pkgs/development/libraries/fastjson/default.nix
new file mode 100644
index 000000000000..8cf571e2c931
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fastjson/default.nix
@@ -0,0 +1,29 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fastjson";
+  version = "1.2304.0";
+
+  src = fetchFromGitHub {
+    owner = "rsyslog";
+    repo = "libfastjson";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-WnM6lQjHz0n5BwWWZoDBavURokcaROXJW46RZen9vj4=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  meta = with lib; {
+    description = "A fast json library for C";
+    homepage = "https://github.com/rsyslog/libfastjson";
+    license = licenses.mit;
+    maintainers = with maintainers; [ nequissimus ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/fastpbkdf2/default.nix b/nixpkgs/pkgs/development/libraries/fastpbkdf2/default.nix
new file mode 100644
index 000000000000..723edd6f29d4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fastpbkdf2/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchFromGitHub, openssl }:
+
+stdenv.mkDerivation rec {
+  pname = "fastpbkdf2";
+  version = "1.0.0";
+
+  src = fetchFromGitHub {
+    owner = "ctz";
+    repo = "fastpbkdf2";
+    rev = "v${version}";
+    sha256 = "09ax0h4ik3vhvp3s98lic93l3g9f4v1jkr5k6z4g1lvm7s3lrha2";
+  };
+
+  buildInputs = [ openssl ];
+
+  preBuild = ''
+    makeFlagsArray=(CFLAGS="-std=c99 -O3 -g")
+  '';
+
+  installPhase = ''
+    mkdir -p $out/{lib,include/fastpbkdf2}
+    cp *.a $out/lib
+    cp fastpbkdf2.h $out/include/fastpbkdf2
+  '';
+
+  meta = with lib; {
+    description = "A fast PBKDF2-HMAC-{SHA1,SHA256,SHA512} implementation in C";
+    homepage = "https://github.com/ctz/fastpbkdf2";
+    license = licenses.cc0;
+    maintainers = with maintainers; [ ledif ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/faudio/default.nix b/nixpkgs/pkgs/development/libraries/faudio/default.nix
new file mode 100644
index 000000000000..96734d7325c1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/faudio/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, cmake, SDL2}:
+
+#TODO: tests
+
+stdenv.mkDerivation rec {
+  pname = "faudio";
+  version = "24.02";
+
+  src = fetchFromGitHub {
+    owner = "FNA-XNA";
+    repo = "FAudio";
+    rev = version;
+    sha256 = "sha256-xEieWgPNSpRJNYh65F2+NLXVZIlKA5ZE+959+s9zQ/I=";
+  };
+
+  nativeBuildInputs = [cmake];
+
+  buildInputs = [ SDL2 ];
+
+  meta = with lib; {
+    description = "XAudio reimplementation focusing to develop a fully accurate DirectX audio library";
+    homepage = "https://github.com/FNA-XNA/FAudio";
+    changelog = "https://github.com/FNA-XNA/FAudio/releases/tag/${version}";
+    license = licenses.zlib;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.marius851000 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/fb303/default.nix b/nixpkgs/pkgs/development/libraries/fb303/default.nix
new file mode 100644
index 000000000000..aad545ca602f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fb303/default.nix
@@ -0,0 +1,55 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, glog
+, folly
+, fmt_8
+, boost
+, fbthrift
+, zlib
+, fizz
+, libsodium
+, wangle
+, python3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fb303";
+  version = "2023.06.12.00";
+
+  src = fetchFromGitHub {
+    owner = "facebook";
+    repo = "fb303";
+    rev = "v${version}";
+    sha256 = "sha256-nUOPYb5/tLyHjaZDvKuq0vdu4L7XOmO8R9nNLGAzeLI=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  cmakeFlags = [
+    "-DPYTHON_EXTENSIONS=OFF"
+  ] ++ lib.optionals stdenv.isDarwin [
+    "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14" # For aligned allocation
+  ];
+
+  buildInputs = [
+    glog
+    folly
+    fmt_8
+    boost
+    fbthrift
+    zlib
+    fizz
+    libsodium
+    wangle
+    python3
+  ];
+
+  meta = with lib; {
+    description = "a base Thrift service and a common set of functionality for querying stats, options, and other information from a service";
+    homepage = "https://github.com/facebook/fb303";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ kylesferrazza ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/fbjni/default.nix b/nixpkgs/pkgs/development/libraries/fbjni/default.nix
new file mode 100644
index 000000000000..20d47cac1fa3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fbjni/default.nix
@@ -0,0 +1,62 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, fetchpatch
+, jdk_headless
+, gtest
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fbjni";
+  version = "0.5.1";
+
+  src = fetchFromGitHub {
+    owner = "facebookincubator";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-97KqfFWtR3VJe2s0D60L3dsIDm4kMa0hpkKoZSAEoVY=";
+  };
+
+  patches = [
+    # Upstram fix for builds on GCC 13. Should be removable with next release after 0.5.1
+    (fetchpatch {
+      name = "add-cstdint-include.patch";
+      url = "https://github.com/facebookincubator/fbjni/commit/59461eff6c7881d58e958287481e1f1cd99e08d3.patch";
+      hash = "sha256-r27C+ODTCZdd1tEz3cevnNNyZlrRhq1jOzwnIYlkglM=";
+    })
+
+    # Part of https://github.com/facebookincubator/fbjni/pull/76
+    # fix cmake file installation directory
+    (fetchpatch {
+      url = "https://github.com/facebookincubator/fbjni/commit/ab02e60b5da28647bfcc864b0bb1b9a90504cdb1.patch";
+      sha256 = "sha256-/h6kosulRH/ZAU2u0zRSaNDK39jsnFt9TaSxyBllZqM=";
+    })
+
+    # install headers
+    (fetchpatch {
+      url = "https://github.com/facebookincubator/fbjni/commit/74e125caa9a815244f1e6bd08eaba57d015378b4.patch";
+      sha256 = "sha256-hQS35D69GD3ewV4zzPG+LO7jk7ncCj2CYDbLJ6SnpqE=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    jdk_headless
+  ];
+
+  buildInputs = [
+    gtest
+  ];
+
+  cmakeFlags = [
+    "-DJAVA_HOME=${jdk_headless.passthru.home}"
+  ];
+
+  meta = with lib; {
+    description = "A library designed to simplify the usage of the Java Native Interface";
+    homepage = "https://github.com/facebookincubator/fbjni";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ jonringer ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/fbthrift/default.nix b/nixpkgs/pkgs/development/libraries/fbthrift/default.nix
new file mode 100644
index 000000000000..6b660a491f23
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fbthrift/default.nix
@@ -0,0 +1,68 @@
+{ stdenv
+, fetchFromGitHub
+, cmake
+, bison
+, boost
+, libevent
+, double-conversion
+, libsodium
+, fizz
+, flex
+, fmt_8
+, folly
+, glog
+, gflags
+, libiberty
+, openssl
+, lib
+, wangle
+, zlib
+, zstd
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fbthrift";
+  version = "2023.03.20.00";
+
+  src = fetchFromGitHub {
+    owner = "facebook";
+    repo = "fbthrift";
+    rev = "v${version}";
+    sha256 = "sha256-jCgdo7jE5QlRK5f2S6XEVM4+TPWI//4DKG/fDMFzgzg=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    bison
+    flex
+  ];
+
+  cmakeFlags = lib.optionals stdenv.isDarwin [
+    "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14" # For aligned allocation
+  ];
+
+  buildInputs = [
+    boost
+    double-conversion
+    fizz
+    fmt_8
+    folly
+    glog
+    gflags
+    libevent
+    libiberty
+    openssl
+    wangle
+    zlib
+    zstd
+    libsodium
+  ];
+
+  meta = with lib; {
+    description = "Facebook's branch of Apache Thrift";
+    homepage = "https://github.com/facebook/fbthrift";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ pierreis kylesferrazza ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/fcft/default.nix b/nixpkgs/pkgs/development/libraries/fcft/default.nix
new file mode 100644
index 000000000000..37084705d6ee
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fcft/default.nix
@@ -0,0 +1,62 @@
+{ stdenv, lib, fetchFromGitea, pkg-config, meson, ninja, scdoc
+, freetype, fontconfig, pixman, tllist, check
+# Text shaping methods to enable, empty list disables all text shaping.
+# See `availableShapingTypes` or upstream meson_options.txt for available types.
+, withShapingTypes ? [ "grapheme" "run" ]
+, harfbuzz, utf8proc
+, fcft # for passthru.tests
+}:
+
+let
+  # Needs to be reflect upstream meson_options.txt
+  availableShapingTypes = [
+    "grapheme"
+    "run"
+  ];
+in
+
+stdenv.mkDerivation rec {
+  pname = "fcft";
+  version = "3.1.7";
+
+  src = fetchFromGitea {
+    domain = "codeberg.org";
+    owner = "dnkl";
+    repo = "fcft";
+    rev = version;
+    sha256 = "sha256-QS39vbf2JowovTBtT4DKDRbLXieOrzbO4cQObOdE788=";
+  };
+
+  depsBuildBuild = [ pkg-config ];
+  nativeBuildInputs = [ pkg-config meson ninja scdoc ];
+  buildInputs = [ freetype fontconfig pixman tllist ]
+    ++ lib.optionals (withShapingTypes != []) [ harfbuzz ]
+    ++ lib.optionals (builtins.elem "run" withShapingTypes) [ utf8proc ];
+  nativeCheckInputs = [ check ];
+
+  mesonBuildType = "release";
+  mesonFlags = builtins.map (t:
+    lib.mesonEnable "${t}-shaping" (lib.elem t withShapingTypes)
+  ) availableShapingTypes;
+
+  doCheck = true;
+
+  outputs = [ "out" "doc" "man" ];
+
+  passthru.tests = {
+    noShaping = fcft.override { withShapingTypes = []; };
+    onlyGraphemeShaping = fcft.override { withShapingTypes = [ "grapheme" ]; };
+  };
+
+  meta = with lib; {
+    homepage = "https://codeberg.org/dnkl/fcft";
+    changelog = "https://codeberg.org/dnkl/fcft/releases/tag/${version}";
+    description = "Simple library for font loading and glyph rasterization";
+    maintainers = with maintainers; [
+      fionera
+      sternenseemann
+    ];
+    license = with licenses; [ mit zlib ];
+    platforms = with platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/fcgi/default.nix b/nixpkgs/pkgs/development/libraries/fcgi/default.nix
new file mode 100644
index 000000000000..5c7f0c44f91c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fcgi/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "fcgi";
+  version = "2.4.2";
+
+  src = fetchFromGitHub {
+    owner = "FastCGI-Archives";
+    repo = "fcgi2";
+    rev = version;
+    sha256 = "1jhz6jfwv5kawa8kajvg18nfwc1b30f38zc0lggszd1vcmrwqkz1";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  postInstall = "ln -s . $out/include/fastcgi";
+
+  meta = with lib; {
+    description = "A language independent, scalable, open extension to CG";
+    homepage = "https://fastcgi-archives.github.io/"; # Formerly http://www.fastcgi.com/
+    license = "FastCGI see LICENSE.TERMS";
+    mainProgram = "cgi-fcgi";
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/fcgi/gcc-4.4.diff b/nixpkgs/pkgs/development/libraries/fcgi/gcc-4.4.diff
new file mode 100644
index 000000000000..c6806c12c067
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fcgi/gcc-4.4.diff
@@ -0,0 +1,12 @@
+diff --git a/libfcgi/fcgio.cpp b/libfcgi/fcgio.cpp
+index 95e28ca..a7eda0e 100644
+--- a/libfcgi/fcgio.cpp
++++ b/libfcgi/fcgio.cpp
+@@ -23,6 +23,7 @@
+ #endif
+ 
+ #include <limits.h>
++#include <cstdio>
+ #include "fcgio.h"
+ 
+ using std::streambuf;
diff --git a/nixpkgs/pkgs/development/libraries/fcl/default.nix b/nixpkgs/pkgs/development/libraries/fcl/default.nix
new file mode 100644
index 000000000000..4e13a3f7113f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fcl/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, eigen, libccd, octomap }:
+
+stdenv.mkDerivation rec {
+  pname = "fcl";
+  version = "0.7.0";
+
+  src = fetchFromGitHub {
+    owner = "flexible-collision-library";
+    repo = pname;
+    rev = version;
+    sha256 = "0f5lhg6f9np7w16s6wz4mb349bycil1irk8z8ylfjwllxi4n6x7a";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  propagatedBuildInputs = [ eigen libccd octomap ];
+
+  outputs = [ "out" "dev" ];
+
+  meta = with lib; {
+    description = "Flexible Collision Library";
+    longDescription = ''
+      FCL is a library for performing three types of proximity queries on a
+      pair of geometric models composed of triangles.
+    '';
+    homepage = "https://github.com/flexible-collision-library/fcl";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ lopsided98 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/fcppt/default.nix b/nixpkgs/pkgs/development/libraries/fcppt/default.nix
new file mode 100644
index 000000000000..1a82a9289a61
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fcppt/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchFromGitHub, cmake, boost, catch2 }:
+stdenv.mkDerivation rec {
+  pname = "fcppt";
+  version = "4.2.1";
+
+  src = fetchFromGitHub {
+    owner = "freundlich";
+    repo = "fcppt";
+    rev = version;
+    sha256 = "1pcmi2ck12nanw1rnwf8lmyx85iq20897k6daxx3hw5f23j1kxv6";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ boost catch2 ];
+
+  cmakeFlags = [
+    "-DENABLE_BOOST=true"
+    "-DENABLE_EXAMPLES=true"
+    "-DENABLE_CATCH=true"
+    "-DENABLE_TEST=true"
+  ];
+
+  meta = with lib; {
+    description = "Freundlich's C++ toolkit";
+    longDescription = ''
+      Freundlich's C++ Toolkit (fcppt) is a collection of libraries focusing on
+      improving general C++ code by providing better types, a strong focus on
+      C++11 (non-conforming compilers are mostly not supported) and functional
+      programming (which is both efficient and syntactically affordable in
+      C++11).
+    '';
+    homepage = "https://fcppt.org";
+    license = licenses.boost;
+    maintainers = with maintainers; [ pmiddend ];
+    platforms = [ "x86_64-linux" "x86_64-windows" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/fdk-aac/default.nix b/nixpkgs/pkgs/development/libraries/fdk-aac/default.nix
new file mode 100644
index 000000000000..0b07b5704916
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fdk-aac/default.nix
@@ -0,0 +1,29 @@
+{ lib
+, stdenv
+, fetchurl
+, exampleSupport ? false # Example encoding program
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fdk-aac";
+  version = "2.0.3";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/opencore-amr/fdk-aac/${pname}-${version}.tar.gz";
+    sha256 = "sha256-gptrie7zgkCc2mhX/YKvhPq7Y0F7CO3p6npVP4Ect54=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  enableParallelBuilding = true;
+
+  configureFlags = lib.optional exampleSupport "--enable-example";
+
+  meta = with lib; {
+    description = "A high-quality implementation of the AAC codec from Android";
+    homepage = "https://sourceforge.net/projects/opencore-amr/";
+    license = licenses.fraunhofer-fdk;
+    maintainers = with maintainers; [ codyopel ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/febio/default.nix b/nixpkgs/pkgs/development/libraries/febio/default.nix
new file mode 100644
index 000000000000..d0c54b8b157d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/febio/default.nix
@@ -0,0 +1,61 @@
+{ lib, stdenv, fetchFromGitHub, cmake, boost, eigen, libxml2, mpi, python3
+, mklSupport ? true, mkl
+, substituteAll
+}:
+
+stdenv.mkDerivation rec {
+  pname = "FEBio";
+  version = "3.6";
+
+  src = fetchFromGitHub {
+    owner = "febiosoftware";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "187s4lyzr806xla3smq3lsvj3f6wxlhfkban89w0fnyfmfb8w9am";
+  };
+
+  patches = [
+    (substituteAll {
+      src = ./fix-cmake.patch;  # cannot find mkl libraries without this
+      so = stdenv.hostPlatform.extensions.sharedLibrary;
+    })
+  ];
+
+  cmakeFlags = lib.optional mklSupport "-DUSE_MKL=On"
+    ++ lib.optional mklSupport "-DMKLROOT=${mkl}"
+  ;
+
+  env.CXXFLAGS = lib.optionalString stdenv.isLinux "-include cstring";
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/include
+    cp -R lib bin $out/
+    cp -R ../FECore \
+      ../FEBioFluid \
+      ../FEBioLib \
+      ../FEBioMech \
+      ../FEBioMix \
+      ../FEBioOpt \
+      ../FEBioPlot \
+      ../FEBioXML \
+      ../NumCore \
+      $out/include
+
+    runHook postInstall
+  '';
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ boost eigen libxml2 mpi python3 python3.pkgs.numpy ]
+   ++ lib.optional mklSupport mkl
+  ;
+
+  meta = {
+    description = "FEBio Suite Solver";
+    license = with lib.licenses; [ mit ];
+    homepage = "https://febio.org/";
+    platforms = lib.platforms.unix;
+    maintainers = with lib.maintainers; [ Scriptkiddi ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/febio/fix-cmake.patch b/nixpkgs/pkgs/development/libraries/febio/fix-cmake.patch
new file mode 100644
index 000000000000..456179ca8364
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/febio/fix-cmake.patch
@@ -0,0 +1,26 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -47,7 +47,7 @@ function(findLib libName libDir libOut)
+         find_library(TEMP NAMES ${libName}.lib ${ARGV3}.lib ${ARGV4}.lib ${ARGV5}.lib ${ARGV6}.lib
+             PATHS ${${libDir}} NO_DEFAULT_PATH)
+     else()
+-        find_library(TEMP NAMES lib${libName}.a lib${ARGV3}.a lib${ARGV4}.a lib${ARGV5}.a lib${ARGV6}.a
++        find_library(TEMP NAMES lib${libName}.a lib${ARGV3}.a lib${ARGV4}.a lib${ARGV5}.a lib${ARGV6}.a lib${libName}@so@ lib${ARGV3}@so@ lib${ARGV4}@so@ lib${ARGV5}@so@ lib${ARGV6}@so@
+             PATHS ${${libDir}} NO_DEFAULT_PATH)
+     endif()
+     
+diff --git a/FindDependencies.cmake b/FindDependencies.cmake
+index 2d644005f..7261ba923 100644
+--- a/FindDependencies.cmake
++++ b/FindDependencies.cmake
+@@ -46,8 +46,8 @@ if(MKLROOT)
+             NO_DEFAULT_PATH)
+             
+         find_library(MKL_OMP_LIB 
+-            NAMES iomp5 iomp5md libiomp5md.lib
+-            PATHS ${MKLROOT}/../lib ${MKLROOT}/../compiler/lib
++            NAMES libiomp5@so@ libiomp5 iomp5 iomp5md libiomp5md.lib
++            PATHS ${MKLROOT}/lib ${MKLROOT}/../lib ${MKLROOT}/../compiler/lib
+             PATH_SUFFIXES "intel64" "intel32"
+             NO_DEFAULT_PATH
+             DOC "MKL OMP Library")
diff --git a/nixpkgs/pkgs/development/libraries/fflas-ffpack/default.nix b/nixpkgs/pkgs/development/libraries/fflas-ffpack/default.nix
new file mode 100644
index 000000000000..7dadbcb39502
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fflas-ffpack/default.nix
@@ -0,0 +1,59 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, givaro, pkg-config, blas, lapack
+, gmpxx
+}:
+
+assert (!blas.isILP64) && (!lapack.isILP64);
+
+stdenv.mkDerivation rec {
+  pname = "fflas-ffpack";
+  version = "2.5.0";
+
+  src = fetchFromGitHub {
+    owner = "linbox-team";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-Eztc2jUyKRVUiZkYEh+IFHkDuPIy+Gx3ZW/MsuOVaMc=";
+  };
+
+  nativeCheckInputs = [
+    gmpxx
+  ];
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ] ++ lib.optionals doCheck nativeCheckInputs;
+
+  buildInputs = [ givaro blas lapack ];
+
+  configureFlags = [
+    "--with-blas-libs=-lcblas"
+    "--with-lapack-libs=-llapacke"
+  ] ++ lib.optionals stdenv.isx86_64 [
+    # disable SIMD instructions (which are enabled *when available* by default)
+    # for now we need to be careful to disable *all* relevant versions of an instruction set explicitly (https://github.com/linbox-team/fflas-ffpack/issues/284)
+    "--${if stdenv.hostPlatform.sse3Support   then "enable" else "disable"}-sse3"
+    "--${if stdenv.hostPlatform.ssse3Support  then "enable" else "disable"}-ssse3"
+    "--${if stdenv.hostPlatform.sse4_1Support then "enable" else "disable"}-sse41"
+    "--${if stdenv.hostPlatform.sse4_2Support then "enable" else "disable"}-sse42"
+    "--${if stdenv.hostPlatform.avxSupport    then "enable" else "disable"}-avx"
+    "--${if stdenv.hostPlatform.avx2Support   then "enable" else "disable"}-avx2"
+    "--${if stdenv.hostPlatform.avx512Support then "enable" else "disable"}-avx512f"
+    "--${if stdenv.hostPlatform.avx512Support then "enable" else "disable"}-avx512dq"
+    "--${if stdenv.hostPlatform.avx512Support then "enable" else "disable"}-avx512vl"
+    "--${if stdenv.hostPlatform.fmaSupport    then "enable" else "disable"}-fma"
+    "--${if stdenv.hostPlatform.fma4Support   then "enable" else "disable"}-fma4"
+  ];
+  doCheck = true;
+
+  meta = with lib; {
+    broken = stdenv.isDarwin;
+    description = "Finite Field Linear Algebra Subroutines";
+    license = licenses.lgpl21Plus;
+    maintainers = teams.sage.members;
+    platforms = platforms.unix;
+    homepage = "https://linbox-team.github.io/fflas-ffpack/";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ffmpeg/4.nix b/nixpkgs/pkgs/development/libraries/ffmpeg/4.nix
new file mode 100644
index 000000000000..e57c0fcff5bc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ffmpeg/4.nix
@@ -0,0 +1,23 @@
+import ./generic.nix {
+  version = "4.4.4";
+  hash = "sha256-Q8bkuF/1uJfqttJJoObnnLX3BEduv+qxsvOrVhMvRjA=";
+  extraPatches = [
+    {
+      name = "libsvtav1-1.5.0-compat-compressed_ten_bit_format.patch";
+      url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/031f1561cd286596cdb374da32f8aa816ce3b135";
+      hash = "sha256-mSnmAkoNikDpxcN+A/hpB7mUbbtcMvm4tG6gZFuroe8=";
+    }
+    # The upstream patch isn’t for ffmpeg 4, but it will apply with a few tweaks.
+    # Fixes a crash when built with clang 16 due to UB in ff_seek_frame_binary.
+    {
+      name = "utils-fix_crash_in_ff_seek_frame_binary.patch";
+      url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/ab792634197e364ca1bb194f9abe36836e42f12d";
+      hash = "sha256-UxZ4VneZpw+Q/UwkEUDNdb2nOx1QnMrZ40UagspNTxI=";
+      postFetch = ''
+        substituteInPlace "$out" \
+          --replace libavformat/seek.c libavformat/utils.c \
+          --replace 'const AVInputFormat *const ' 'const AVInputFormat *'
+      '';
+    }
+  ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/ffmpeg/5.nix b/nixpkgs/pkgs/development/libraries/ffmpeg/5.nix
new file mode 100644
index 000000000000..68edb0fd37e4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ffmpeg/5.nix
@@ -0,0 +1,21 @@
+import ./generic.nix {
+  version = "5.1.3";
+  hash = "sha256-twfJvANLQGO7TiyHPMPqApfHLFUlOGZTTIIGEnjyvuE=";
+  extraPatches = [
+    {
+      name = "libsvtav1-1.5.0-compat-compressed_ten_bit_format.patch";
+      url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/031f1561cd286596cdb374da32f8aa816ce3b135";
+      hash = "sha256-mSnmAkoNikDpxcN+A/hpB7mUbbtcMvm4tG6gZFuroe8=";
+    }
+    {
+      name = "libsvtav1-1.5.0-compat-vbv_bufsize.patch";
+      url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/1c6fd7d756afe0f8b7df14dbf7a95df275f8f5ee";
+      hash = "sha256-v9Viyo12QfZpbcVqd1aHgLl/DgSkdE9F1kr6afTGPik=";
+    }
+    {
+      name = "libsvtav1-1.5.0-compat-maximum_buffer_size_ms-conditional.patch";
+      url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/96748ac54f998ba6fe22802799c16b4eba8d4ccc";
+      hash = "sha256-Z5HSe7YpryYGHD3BYXejAhqR4EPnmfTGyccxNvU3AaU=";
+    }
+  ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/ffmpeg/6.nix b/nixpkgs/pkgs/development/libraries/ffmpeg/6.nix
new file mode 100644
index 000000000000..62d3919c0646
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ffmpeg/6.nix
@@ -0,0 +1,4 @@
+import ./generic.nix {
+  version = "6.1";
+  hash = "sha256-NzhD2D16bCVCyCXo0TRwZYp3Ta5eFSfoQPa+iRkeNZg=";
+}
diff --git a/nixpkgs/pkgs/development/libraries/ffmpeg/generic.nix b/nixpkgs/pkgs/development/libraries/ffmpeg/generic.nix
new file mode 100644
index 000000000000..89893d32ef5d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ffmpeg/generic.nix
@@ -0,0 +1,732 @@
+{ version, hash, extraPatches ? [] }:
+
+{ lib, stdenv, buildPackages, removeReferencesTo, addOpenGLRunpath, pkg-config, perl, texinfo, yasm
+
+, ffmpegVariant ? "small" # Decides which dependencies are enabled by default
+
+  # Build with headless deps; excludes dependencies that are only necessary for
+  # GUI applications. To be used for purposes that don't generally need such
+  # components and i.e. only depend on libav
+, withHeadlessDeps ? ffmpegVariant == "headless" || withSmallDeps
+
+  # Dependencies a user might customarily expect from a regular ffmpeg build.
+  # /All/ packages that depend on ffmpeg and some of its feaures should depend
+  # on the small variant. Small means the minimal set of features that satisfies
+  # all dependants in Nixpkgs
+, withSmallDeps ? ffmpegVariant == "small" || withFullDeps
+
+  # Everything enabled; only guarded behind platform exclusivity or brokeness.
+  # If you need to depend on ffmpeg-full because ffmpeg is missing some feature
+  # your package needs, you should enable that feature in regular ffmpeg
+  # instead.
+, withFullDeps ? ffmpegVariant == "full"
+
+, fetchgit
+, fetchpatch
+
+  # Feature flags
+, withAlsa ? withHeadlessDeps && stdenv.isLinux # Alsa in/output supporT
+, withAom ? withFullDeps # AV1 reference encoder
+, withAribcaption ? withFullDeps && lib.versionAtLeast version "6.1" # ARIB STD-B24 Caption Decoder/Renderer
+, withAss ? withHeadlessDeps && stdenv.hostPlatform == stdenv.buildPlatform # (Advanced) SubStation Alpha subtitle rendering
+, withBluray ? withFullDeps # BluRay reading
+, withBs2b ? withFullDeps # bs2b DSP library
+, withBzlib ? withHeadlessDeps
+, withCaca ? withFullDeps # Textual display (ASCII art)
+, withCelt ? withFullDeps # CELT decoder
+, withChromaprint ? withFullDeps # Audio fingerprinting
+, withCuda ? withFullDeps && (with stdenv; (!isDarwin && !hostPlatform.isAarch && !hostPlatform.isRiscV))
+, withCudaLLVM ? withFullDeps
+, withDav1d ? withHeadlessDeps # AV1 decoder (focused on speed and correctness)
+, withDc1394 ? withFullDeps && !stdenv.isDarwin # IIDC-1394 grabbing (ieee 1394)
+, withDrm ? withHeadlessDeps && (with stdenv; isLinux || isFreeBSD) # libdrm support
+, withFdkAac ? withFullDeps && withUnfree # Fraunhofer FDK AAC de/encoder
+, withFlite ? withFullDeps # Voice Synthesis
+, withFontconfig ? withHeadlessDeps # Needed for drawtext filter
+, withFreetype ? withHeadlessDeps # Needed for drawtext filter
+, withFrei0r ? withFullDeps && withGPL # frei0r video filtering
+, withFribidi ? withFullDeps # Needed for drawtext filter
+, withGme ? withFullDeps # Game Music Emulator
+, withGnutls ? withHeadlessDeps
+, withGsm ? withFullDeps # GSM de/encoder
+, withIconv ? withHeadlessDeps
+, withJack ? withFullDeps && !stdenv.isDarwin # Jack audio
+, withLadspa ? withFullDeps # LADSPA audio filtering
+, withLzma ? withHeadlessDeps # xz-utils
+, withMfx ? withFullDeps && (with stdenv.hostPlatform; isLinux && !isAarch) # Hardware acceleration via intel-media-sdk/libmfx
+, withModplug ? withFullDeps && !stdenv.isDarwin # ModPlug support
+, withMp3lame ? withHeadlessDeps # LAME MP3 encoder
+, withMysofa ? withFullDeps # HRTF support via SOFAlizer
+, withNvdec ? withHeadlessDeps && (with stdenv; !isDarwin && hostPlatform == buildPlatform && !isAarch32 && !hostPlatform.isRiscV)
+, withNvenc ? withHeadlessDeps && (with stdenv; !isDarwin && hostPlatform == buildPlatform && !isAarch32 && !hostPlatform.isRiscV)
+, withOgg ? withHeadlessDeps # Ogg container used by vorbis & theora
+, withOpenal ? withFullDeps # OpenAL 1.1 capture support
+, withOpencl ? withFullDeps
+, withOpencoreAmrnb ? withFullDeps && withVersion3 # AMR-NB de/encoder & AMR-WB decoder
+, withOpengl ? false # OpenGL rendering
+, withOpenh264 ? withFullDeps # H.264/AVC encoder
+, withOpenjpeg ? withFullDeps # JPEG 2000 de/encoder
+, withOpenmpt ? withFullDeps # Tracked music files decoder
+, withOpus ? withHeadlessDeps # Opus de/encoder
+, withPlacebo ? withFullDeps && !stdenv.isDarwin # libplacebo video processing library
+, withPulse ? withSmallDeps && !stdenv.isDarwin # Pulseaudio input support
+, withRav1e ? withFullDeps # AV1 encoder (focused on speed and safety)
+, withRtmp ? false # RTMP[E] support
+, withSamba ? withFullDeps && !stdenv.isDarwin && withGPLv3 # Samba protocol
+, withSdl2 ? withSmallDeps
+, withShaderc ? withFullDeps && !stdenv.isDarwin && lib.versionAtLeast version "5.0"
+, withSoxr ? withHeadlessDeps # Resampling via soxr
+, withSpeex ? withHeadlessDeps # Speex de/encoder
+, withSrt ? withHeadlessDeps # Secure Reliable Transport (SRT) protocol
+, withSsh ? withHeadlessDeps # SFTP protocol
+, withSvg ? withFullDeps # SVG protocol
+, withSvtav1 ? withHeadlessDeps && !stdenv.isAarch64 # AV1 encoder/decoder (focused on speed and correctness)
+, withTensorflow ? false # Tensorflow dnn backend support
+, withTheora ? withHeadlessDeps # Theora encoder
+, withV4l2 ? withHeadlessDeps && !stdenv.isDarwin # Video 4 Linux support
+, withV4l2M2m ? withV4l2
+, withVaapi ? withHeadlessDeps && (with stdenv; isLinux || isFreeBSD) # Vaapi hardware acceleration
+, withVdpau ? withSmallDeps # Vdpau hardware acceleration
+, withVidStab ? withFullDeps && withGPL # Video stabilization
+, withVmaf ? withFullDeps && !stdenv.isAarch64 && lib.versionAtLeast version "5" # Netflix's VMAF (Video Multi-Method Assessment Fusion)
+, withVoAmrwbenc ? withFullDeps && withVersion3 # AMR-WB encoder
+, withVorbis ? withHeadlessDeps # Vorbis de/encoding, native encoder exists
+, withVpx ? withHeadlessDeps && stdenv.buildPlatform == stdenv.hostPlatform # VP8 & VP9 de/encoding
+, withVulkan ? withFullDeps && !stdenv.isDarwin
+, withWebp ? withFullDeps # WebP encoder
+, withX264 ? withHeadlessDeps && withGPL # H.264/AVC encoder
+, withX265 ? withHeadlessDeps && withGPL # H.265/HEVC encoder
+, withXavs ? withFullDeps && withGPL # AVS encoder
+, withXcb ? withXcbShm || withXcbxfixes || withXcbShape # X11 grabbing using XCB
+, withXcbShape ? withFullDeps # X11 grabbing shape rendering
+, withXcbShm ? withFullDeps # X11 grabbing shm communication
+, withXcbxfixes ? withFullDeps # X11 grabbing mouse rendering
+, withXlib ? withFullDeps # Xlib support
+, withXml2 ? withFullDeps # libxml2 support, for IMF and DASH demuxers
+, withXvid ? withHeadlessDeps && withGPL # Xvid encoder, native encoder exists
+, withZimg ? withHeadlessDeps
+, withZlib ? withHeadlessDeps
+, withZmq ? withFullDeps # Message passing
+
+/*
+ *  Licensing options (yes some are listed twice, filters and such are not listed)
+ */
+, withGPL ? true
+, withVersion3 ? true # When withGPL is set this implies GPLv3 otherwise it is LGPLv3
+, withGPLv3 ? withGPL && withVersion3
+, withUnfree ? false
+
+/*
+ *  Build options
+ */
+, withSmallBuild ? false # Optimize for size instead of speed
+, withRuntimeCPUDetection ? true # Detect CPU capabilities at runtime (disable to compile natively)
+, withGrayscale ? withFullDeps # Full grayscale support
+, withSwscaleAlpha ? buildSwscale # Alpha channel support in swscale. You probably want this when buildSwscale.
+, withHardcodedTables ? withHeadlessDeps # Hardcode decode tables instead of runtime generation
+, withSafeBitstreamReader ? withHeadlessDeps # Buffer boundary checking in bitreaders
+, withMultithread ? true # Multithreading via pthreads/win32 threads
+, withNetwork ? withHeadlessDeps # Network support
+, withPixelutils ? withHeadlessDeps # Pixel utils in libavutil
+, withStatic ? stdenv.hostPlatform.isStatic
+, withShared ? !stdenv.hostPlatform.isStatic
+, withPic ? true
+, withThumb ? false # On some ARM platforms
+
+/*
+ *  Program options
+ */
+, buildFfmpeg ? withHeadlessDeps # Build ffmpeg executable
+, buildFfplay ? withFullDeps # Build ffplay executable
+, buildFfprobe ? withHeadlessDeps # Build ffprobe executable
+, buildQtFaststart ? withFullDeps # Build qt-faststart executable
+, withBin ? buildFfmpeg || buildFfplay || buildFfprobe || buildQtFaststart
+/*
+ *  Library options
+ */
+, buildAvcodec ? withHeadlessDeps # Build avcodec library
+, buildAvdevice ? withHeadlessDeps # Build avdevice library
+, buildAvfilter ? withHeadlessDeps # Build avfilter library
+, buildAvformat ? withHeadlessDeps # Build avformat library
+# Deprecated but depended upon by some packages.
+# https://github.com/NixOS/nixpkgs/pull/211834#issuecomment-1417435991)
+, buildAvresample ? withHeadlessDeps && lib.versionOlder version "5" # Build avresample library
+, buildAvutil ? withHeadlessDeps # Build avutil library
+, buildPostproc ? withHeadlessDeps # Build postproc library
+, buildSwresample ? withHeadlessDeps # Build swresample library
+, buildSwscale ? withHeadlessDeps # Build swscale library
+, withLib ? buildAvcodec
+  || buildAvdevice
+  || buildAvfilter
+  || buildAvformat
+  || buildAvutil
+  || buildPostproc
+  || buildSwresample
+  || buildSwscale
+/*
+ *  Documentation options
+ */
+, withDocumentation ? withHtmlDoc || withManPages || withPodDoc || withTxtDoc
+, withHtmlDoc ? withHeadlessDeps # HTML documentation pages
+, withManPages ? withHeadlessDeps # Man documentation pages
+, withPodDoc ? withHeadlessDeps # POD documentation pages
+, withTxtDoc ? withHeadlessDeps # Text documentation pages
+# Whether a "doc" output will be produced. Note that withManPages does not produce
+# a "doc" output because its files go to "man".
+, withDoc ? withDocumentation && (withHtmlDoc || withPodDoc || withTxtDoc)
+
+/*
+ *  Developer options
+ */
+, withDebug ? false
+, withOptimisations ? true
+, withExtraWarnings ? false
+, withStripping ? false
+
+/*
+ *  External libraries options
+ */
+, alsa-lib
+, bzip2
+, celt
+, chromaprint
+, clang
+, dav1d
+, fdk_aac
+, flite
+, fontconfig
+, freetype
+, frei0r
+, fribidi
+, game-music-emu
+, gnutls
+, gsm
+, intel-media-sdk
+, ladspaH
+, lame
+, libaom
+, libaribcaption
+, libass
+, libbluray
+, libbs2b
+, libcaca
+, libdc1394
+, libdrm
+, libGL
+, libGLU
+, libiconv
+, libjack2
+, libmodplug
+, libmysofa
+, libogg
+, libopenmpt
+, libopus
+, libplacebo
+, libplacebo_5
+, libpulseaudio
+, libraw1394
+, librsvg
+, libssh
+, libtensorflow
+, libtheora
+, libv4l
+, libva
+, libva-minimal
+, libvdpau
+, libvmaf
+, libvorbis
+, libvpx
+, libwebp
+, libX11
+, libxcb
+, libXext
+, libxml2
+, libXv
+, nv-codec-headers
+, nv-codec-headers-12
+, ocl-icd # OpenCL ICD
+, openal
+, opencl-headers  # OpenCL headers
+, opencore-amr
+, openh264
+, openjpeg
+, rav1e
+, rtmpdump
+, samba
+, SDL2
+, shaderc
+, soxr
+, speex
+, srt
+, svt-av1
+, vid-stab
+, vo-amrwbenc
+, vulkan-headers
+, vulkan-loader
+, x264
+, x265
+, xavs
+, xvidcore
+, xz
+, zeromq4
+, zimg
+, zlib
+/*
+ *  Darwin frameworks
+ */
+, AVFoundation
+, Cocoa
+, CoreAudio
+, CoreMedia
+, CoreServices
+, MediaToolbox
+, VideoDecodeAcceleration
+, VideoToolbox
+/*
+ *  Testing
+ */
+, testers
+}:
+
+/* Maintainer notes:
+ *
+ * Version bumps:
+ * It should always be safe to bump patch releases (e.g. 2.1.x, x being a patch release)
+ * If adding a new branch, note any configure flags that were added, changed, or deprecated/removed
+ *   and make the necessary changes.
+ *
+ * Known issues:
+ * Cross-compiling will disable features not present on host OS
+ *   (e.g. dxva2 support [DirectX] will not be enabled unless natively compiled on Cygwin)
+ *
+ */
+
+let
+  inherit (lib) optional optionals optionalString enableFeature versionAtLeast;
+in
+
+
+assert lib.elem ffmpegVariant [ "headless" "small" "full" ];
+
+/*
+ *  Licensing dependencies
+ */
+assert withGPLv3 -> withGPL && withVersion3;
+
+/*
+ *  Build dependencies
+ */
+assert withPixelutils -> buildAvutil;
+/*
+ *  Program dependencies
+ */
+assert buildFfmpeg -> buildAvcodec
+                     && buildAvfilter
+                     && buildAvformat
+                     && (buildSwresample || buildAvresample);
+assert buildFfplay -> buildAvcodec
+                     && buildAvformat
+                     && buildSwscale
+                     && (buildSwresample || buildAvresample);
+assert buildFfprobe -> buildAvcodec && buildAvformat;
+/*
+ *  Library dependencies
+ */
+assert buildAvcodec -> buildAvutil; # configure flag since 0.6
+assert buildAvdevice -> buildAvformat
+                       && buildAvcodec
+                       && buildAvutil; # configure flag since 0.6
+assert buildAvformat -> buildAvcodec && buildAvutil; # configure flag since 0.6
+assert buildPostproc -> buildAvutil;
+assert buildSwscale -> buildAvutil;
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "ffmpeg" + (optionalString (ffmpegVariant != "small") "-${ffmpegVariant}");
+  inherit version;
+
+  src = fetchgit {
+    url = "https://git.ffmpeg.org/ffmpeg.git";
+    rev = "n${finalAttrs.version}";
+    inherit hash;
+  };
+
+  postPatch = ''
+    patchShebangs .
+  '' + lib.optionalString withFrei0r ''
+    substituteInPlace libavfilter/vf_frei0r.c \
+      --replace /usr/local/lib/frei0r-1 ${frei0r}/lib/frei0r-1
+    substituteInPlace doc/filters.texi \
+      --replace /usr/local/lib/frei0r-1 ${frei0r}/lib/frei0r-1
+  '';
+
+  patches = map (patch: fetchpatch patch) (extraPatches
+    ++ (lib.optional (lib.versionAtLeast finalAttrs.version "6" && lib.versionOlder finalAttrs.version "6.1")
+      { # this can be removed post 6.1
+        name = "fix_aacps_tablegen";
+        url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/814178f92647be2411516bbb82f48532373d2554";
+        hash = "sha256-FQV9/PiarPXCm45ldtCsxGHjlrriL8DKpn1LaKJ8owI=";
+      }
+    )
+    ++ (lib.optional (lib.versionAtLeast finalAttrs.version "6.1" && lib.versionOlder finalAttrs.version "6.2")
+      { # this can be removed post 6.1
+        name = "fix_build_failure_due_to_PropertyKey_EncoderID";
+        url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/cb049d377f54f6b747667a93e4b719380c3e9475";
+        hash = "sha256-Ittka0mId1N/BwJ0FQ0ygpTSS6Y11u2SjWDpbGN+KXo=";
+      }
+    ));
+
+  configurePlatforms = [];
+  setOutputFlags = false; # Only accepts some of them
+  configureFlags = [
+    #mingw64 is internally treated as mingw32, so 32 and 64 make no difference here
+    "--target_os=${if stdenv.hostPlatform.isMinGW then "mingw64" else stdenv.hostPlatform.parsed.kernel.name}"
+    "--arch=${stdenv.hostPlatform.parsed.cpu.name}"
+    "--pkg-config=${buildPackages.pkg-config.targetPrefix}pkg-config"
+    /*
+     *  Licensing flags
+     */
+    (enableFeature withGPL "gpl")
+    (enableFeature withVersion3 "version3")
+    (enableFeature withUnfree "nonfree")
+    /*
+     *  Build flags
+     */
+    (enableFeature withStatic "static")
+    (enableFeature withShared "shared")
+    (enableFeature withPic "pic")
+    (enableFeature withThumb "thumb")
+
+    (enableFeature withSmallBuild "small")
+    (enableFeature withRuntimeCPUDetection "runtime-cpudetect")
+    (enableFeature withGrayscale "gray")
+    (enableFeature withSwscaleAlpha "swscale-alpha")
+    (enableFeature withHardcodedTables "hardcoded-tables")
+    (enableFeature withSafeBitstreamReader "safe-bitstream-reader")
+
+    (enableFeature (withMultithread && stdenv.hostPlatform.isUnix) "pthreads")
+    (enableFeature (withMultithread && stdenv.hostPlatform.isWindows) "w32threads")
+    "--disable-os2threads" # We don't support OS/2
+
+    (enableFeature withNetwork "network")
+    (enableFeature withPixelutils "pixelutils")
+
+    "--datadir=${placeholder "data"}/share/ffmpeg"
+
+    /*
+     *  Program flags
+     */
+    (enableFeature buildFfmpeg "ffmpeg")
+    (enableFeature buildFfplay "ffplay")
+    (enableFeature buildFfprobe "ffprobe")
+  ] ++ optionals withBin [
+    "--bindir=${placeholder "bin"}/bin"
+  ] ++ [
+    /*
+     *  Library flags
+     */
+    (enableFeature buildAvcodec "avcodec")
+    (enableFeature buildAvdevice "avdevice")
+    (enableFeature buildAvfilter "avfilter")
+    (enableFeature buildAvformat "avformat")
+  ] ++ optionals (lib.versionOlder finalAttrs.version "5") [
+    # Ffmpeg > 4 doesn't know about the flag anymore
+    (enableFeature buildAvresample "avresample")
+  ] ++ [
+    (enableFeature buildAvutil "avutil")
+    (enableFeature (buildPostproc && withGPL) "postproc")
+    (enableFeature buildSwresample "swresample")
+    (enableFeature buildSwscale "swscale")
+  ] ++ optionals withLib [
+    "--libdir=${placeholder "lib"}/lib"
+    "--incdir=${placeholder "dev"}/include"
+  ] ++ [
+    /*
+     *  Documentation flags
+     */
+    (enableFeature withDocumentation "doc")
+    (enableFeature withHtmlDoc "htmlpages")
+    (enableFeature withManPages "manpages")
+  ] ++ optionals withManPages [
+    "--mandir=${placeholder "man"}/share/man"
+  ] ++ [
+    (enableFeature withPodDoc "podpages")
+    (enableFeature withTxtDoc "txtpages")
+  ] ++ optionals withDoc [
+    "--docdir=${placeholder "doc"}/share/doc/ffmpeg"
+  ] ++ [
+    /*
+     *  External libraries
+     */
+    (enableFeature withAlsa "alsa")
+    (enableFeature withAom "libaom")
+  ] ++ optionals (versionAtLeast finalAttrs.version "6.1") [
+    (enableFeature withAribcaption "libaribcaption")
+  ] ++ [
+    (enableFeature withAss "libass")
+    (enableFeature withBluray "libbluray")
+    (enableFeature withBs2b "libbs2b")
+    (enableFeature withBzlib "bzlib")
+    (enableFeature withCelt "libcelt")
+    (enableFeature withChromaprint "chromaprint")
+    (enableFeature withCuda "cuda")
+    (enableFeature withCudaLLVM "cuda-llvm")
+    (enableFeature withDav1d "libdav1d")
+    (enableFeature withDc1394 "libdc1394")
+    (enableFeature withDrm "libdrm")
+    (enableFeature withFdkAac "libfdk-aac")
+    (enableFeature withFlite "libflite")
+    (enableFeature withFontconfig "fontconfig")
+    (enableFeature withFreetype "libfreetype")
+    (enableFeature withFrei0r "frei0r")
+    (enableFeature withFribidi "libfribidi")
+    (enableFeature withGme "libgme")
+    (enableFeature withGnutls "gnutls")
+    (enableFeature withGsm "libgsm")
+    (enableFeature withIconv "iconv")
+    (enableFeature withJack "libjack")
+    (enableFeature withLadspa "ladspa")
+    (enableFeature withLzma "lzma")
+    (enableFeature withMfx "libmfx")
+    (enableFeature withModplug "libmodplug")
+    (enableFeature withMp3lame "libmp3lame")
+    (enableFeature withMysofa "libmysofa")
+    (enableFeature withNvdec "cuvid")
+    (enableFeature withNvdec "nvdec")
+    (enableFeature withNvenc "nvenc")
+    (enableFeature withOpenal "openal")
+    (enableFeature withOpencl "opencl")
+    (enableFeature withOpencoreAmrnb "libopencore-amrnb")
+    (enableFeature withOpengl "opengl")
+    (enableFeature withOpenh264 "libopenh264")
+    (enableFeature withOpenjpeg "libopenjpeg")
+    (enableFeature withOpenmpt "libopenmpt")
+    (enableFeature withOpus "libopus")
+  ] ++ optionals (versionAtLeast finalAttrs.version "5.0") [
+    (enableFeature withPlacebo "libplacebo")
+  ] ++ [
+    (enableFeature withPulse "libpulse")
+    (enableFeature withRav1e "librav1e")
+    (enableFeature withRtmp "librtmp")
+    (enableFeature withSamba "libsmbclient")
+    (enableFeature withSdl2 "sdl2")
+  ] ++ optionals (versionAtLeast finalAttrs.version "5.0") [
+    (enableFeature withShaderc "libshaderc")
+  ] ++ [
+    (enableFeature withSoxr "libsoxr")
+    (enableFeature withSpeex "libspeex")
+    (enableFeature withSrt "libsrt")
+    (enableFeature withSsh "libssh")
+    (enableFeature withSvg "librsvg")
+    (enableFeature withSvtav1 "libsvtav1")
+    (enableFeature withTensorflow "libtensorflow")
+    (enableFeature withTheora "libtheora")
+    (enableFeature withV4l2 "libv4l2")
+    (enableFeature withV4l2M2m "v4l2-m2m")
+    (enableFeature withVaapi "vaapi")
+    (enableFeature withVdpau "vdpau")
+    (enableFeature withVidStab "libvidstab") # Actual min. version 2.0
+    (enableFeature withVmaf "libvmaf")
+    (enableFeature withVoAmrwbenc "libvo-amrwbenc")
+    (enableFeature withVorbis "libvorbis")
+    (enableFeature withVpx "libvpx")
+    (enableFeature withVulkan "vulkan")
+    (enableFeature withWebp "libwebp")
+    (enableFeature withX264 "libx264")
+    (enableFeature withX265 "libx265")
+    (enableFeature withXavs "libxavs")
+    (enableFeature withXcb "libxcb")
+    (enableFeature withXcbShape "libxcb-shape")
+    (enableFeature withXcbShm "libxcb-shm")
+    (enableFeature withXcbxfixes "libxcb-xfixes")
+    (enableFeature withXlib "xlib")
+    (enableFeature withXml2 "libxml2")
+    (enableFeature withXvid "libxvid")
+    (enableFeature withZimg "libzimg")
+    (enableFeature withZlib "zlib")
+    (enableFeature withZmq "libzmq")
+    /*
+     * Developer flags
+     */
+    (enableFeature withDebug "debug")
+    (enableFeature withOptimisations "optimizations")
+    (enableFeature withExtraWarnings "extra-warnings")
+    (enableFeature withStripping "stripping")
+  ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "--cross-prefix=${stdenv.cc.targetPrefix}"
+    "--enable-cross-compile"
+    "--host-cc=${buildPackages.stdenv.cc}/bin/cc"
+  ] ++ optionals stdenv.cc.isClang [
+    "--cc=clang"
+    "--cxx=clang++"
+  ];
+
+  # ffmpeg embeds the configureFlags verbatim in its binaries and because we
+  # configure binary, include, library dir etc., this causes references in
+  # outputs where we don't want them. Patch the generated config.h to remove all
+  # such references except for data.
+  postConfigure = let
+    toStrip = map placeholder (lib.remove "data" finalAttrs.outputs) # We want to keep references to the data dir.
+      ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) buildPackages.stdenv.cc;
+  in
+    "remove-references-to ${lib.concatStringsSep " " (map (o: "-t ${o}") toStrip)} config.h";
+
+  strictDeps = true;
+
+  nativeBuildInputs = [ removeReferencesTo addOpenGLRunpath perl pkg-config texinfo yasm ]
+  ++ optionals withCudaLLVM [ clang ];
+
+  buildInputs = optionals (withNvdec || withNvenc) [ (if (lib.versionAtLeast finalAttrs.version "6") then nv-codec-headers-12 else nv-codec-headers) ]
+  ++ optionals withAlsa [ alsa-lib ]
+  ++ optionals withAom [ libaom ]
+  ++ optionals withAribcaption [ libaribcaption ]
+  ++ optionals withAss [ libass ]
+  ++ optionals withBluray [ libbluray ]
+  ++ optionals withBs2b [ libbs2b ]
+  ++ optionals withBzlib [ bzip2 ]
+  ++ optionals withCaca [ libcaca ]
+  ++ optionals withCelt [ celt ]
+  ++ optionals withChromaprint [ chromaprint ]
+  ++ optionals withDav1d [ dav1d ]
+  ++ optionals withDc1394 [ libdc1394 libraw1394 ]
+  ++ optionals withDrm [ libdrm ]
+  ++ optionals withFdkAac [ fdk_aac ]
+  ++ optionals withFlite [ flite ]
+  ++ optionals withFontconfig [ fontconfig ]
+  ++ optionals withFreetype [ freetype ]
+  ++ optionals withFrei0r [ frei0r ]
+  ++ optionals withFribidi [ fribidi ]
+  ++ optionals withGme [ game-music-emu ]
+  ++ optionals withGnutls [ gnutls ]
+  ++ optionals withGsm [ gsm ]
+  ++ optionals withIconv [ libiconv ] # On Linux this should be in libc, do we really need it?
+  ++ optionals withJack [ libjack2 ]
+  ++ optionals withLadspa [ ladspaH ]
+  ++ optionals withLzma [ xz ]
+  ++ optionals withMfx [ intel-media-sdk ]
+  ++ optionals withModplug [ libmodplug ]
+  ++ optionals withMp3lame [ lame ]
+  ++ optionals withMysofa [ libmysofa ]
+  ++ optionals withOgg [ libogg ]
+  ++ optionals withOpenal [ openal ]
+  ++ optionals withOpencl [ ocl-icd opencl-headers ]
+  ++ optionals withOpencoreAmrnb [ opencore-amr ]
+  ++ optionals withOpengl [ libGL libGLU ]
+  ++ optionals withOpenh264 [ openh264 ]
+  ++ optionals withOpenjpeg [ openjpeg ]
+  ++ optionals withOpenmpt [ libopenmpt ]
+  ++ optionals withOpus [ libopus ]
+  ++ optionals withPlacebo [ (if (lib.versionAtLeast finalAttrs.version "6.1") then libplacebo else libplacebo_5) vulkan-headers ]
+  ++ optionals withPulse [ libpulseaudio ]
+  ++ optionals withRav1e [ rav1e ]
+  ++ optionals withRtmp [ rtmpdump ]
+  ++ optionals withSamba [ samba ]
+  ++ optionals withSdl2 [ SDL2 ]
+  ++ optionals withShaderc [ shaderc ]
+  ++ optionals withSoxr [ soxr ]
+  ++ optionals withSpeex [ speex ]
+  ++ optionals withSrt [ srt ]
+  ++ optionals withSsh [ libssh ]
+  ++ optionals withSvg [ librsvg ]
+  ++ optionals withSvtav1 [ svt-av1 ]
+  ++ optionals withTensorflow [ libtensorflow ]
+  ++ optionals withTheora [ libtheora ]
+  ++ optionals withV4l2 [ libv4l ]
+  ++ optionals withVaapi [ (if withSmallDeps then libva else libva-minimal) ]
+  ++ optionals withVdpau [ libvdpau ]
+  ++ optionals withVidStab [ vid-stab ]
+  ++ optionals withVmaf [ libvmaf ]
+  ++ optionals withVoAmrwbenc [ vo-amrwbenc ]
+  ++ optionals withVorbis [ libvorbis ]
+  ++ optionals withVpx [ libvpx ]
+  ++ optionals withVulkan [ vulkan-headers vulkan-loader ]
+  ++ optionals withWebp [ libwebp ]
+  ++ optionals withX264 [ x264 ]
+  ++ optionals withX265 [ x265 ]
+  ++ optionals withXavs [ xavs ]
+  ++ optionals withXcb [ libxcb ]
+  ++ optionals withXlib [ libX11 libXv libXext ]
+  ++ optionals withXml2 [ libxml2 ]
+  ++ optionals withXvid [ xvidcore ]
+  ++ optionals withZimg [ zimg ]
+  ++ optionals withZlib [ zlib ]
+  ++ optionals withZmq [ zeromq4 ]
+  ++ optionals stdenv.isDarwin [
+    # TODO fine-grained flags
+    AVFoundation
+    Cocoa
+    CoreAudio
+    CoreMedia
+    CoreServices
+    MediaToolbox
+    VideoDecodeAcceleration
+    VideoToolbox
+  ];
+
+  buildFlags = [ "all" ]
+    ++ optional buildQtFaststart "tools/qt-faststart"; # Build qt-faststart executable
+
+  doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
+
+  # Fails with SIGABRT otherwise FIXME: Why?
+  checkPhase = let
+    ldLibraryPathEnv = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH";
+    libsToLink = [ ]
+      ++ optional buildAvcodec "libavcodec"
+      ++ optional buildAvdevice "libavdevice"
+      ++ optional buildAvfilter "libavfilter"
+      ++ optional buildAvformat "libavformat"
+      ++ optional buildAvresample "libavresample"
+      ++ optional buildAvutil "libavutil"
+      ++ optional buildPostproc "libpostproc"
+      ++ optional buildSwresample "libswresample"
+      ++ optional buildSwscale "libswscale"
+    ;
+  in ''
+    ${ldLibraryPathEnv}="${lib.concatStringsSep ":" libsToLink}" make check -j$NIX_BUILD_CORES
+  '';
+
+  outputs = optionals withBin [ "bin" ] # The first output is the one that gets symlinked by default!
+    ++ optionals withLib [ "lib" "dev" ]
+    ++ optionals withDoc [ "doc" ]
+    ++ optionals withManPages [ "man" ]
+    ++ [ "data" "out" ] # We need an "out" output because we get an error otherwise. It's just an empty dir.
+  ;
+
+  postInstall = optionalString buildQtFaststart ''
+    install -D tools/qt-faststart -t $bin/bin
+  '';
+
+  # Set RUNPATH so that libnvcuvid and libcuda in /run/opengl-driver(-32)/lib can be found.
+  # See the explanation in addOpenGLRunpath.
+  postFixup = optionalString (stdenv.isLinux && withLib) ''
+    addOpenGLRunpath ${placeholder "lib"}/lib/libavcodec.so
+    addOpenGLRunpath ${placeholder "lib"}/lib/libavutil.so
+  '';
+
+  enableParallelBuilding = true;
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    description = "A complete, cross-platform solution to record, convert and stream audio and video";
+    homepage = "https://www.ffmpeg.org/";
+    changelog = "https://github.com/FFmpeg/FFmpeg/blob/n${finalAttrs.version}/Changelog";
+    longDescription = ''
+      FFmpeg is the leading multimedia framework, able to decode, encode, transcode,
+      mux, demux, stream, filter and play pretty much anything that humans and machines
+      have created. It supports the most obscure ancient formats up to the cutting edge.
+      No matter if they were designed by some standards committee, the community or
+      a corporation.
+    '';
+    license = with licenses; [ lgpl21Plus ]
+      ++ optional withGPL gpl2Plus
+      ++ optional withVersion3 lgpl3Plus
+      ++ optional withGPLv3 gpl3Plus
+      ++ optional withUnfree unfreeRedistributable
+      ++ optional (withGPL && withUnfree) unfree;
+    pkgConfigModules = [ "libavutil" ];
+    platforms = platforms.all;
+    maintainers = with maintainers; [ atemu arthsmn jopejoe1 ];
+    mainProgram = "ffmpeg";
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/ffmpegthumbnailer/default.nix b/nixpkgs/pkgs/development/libraries/ffmpegthumbnailer/default.nix
new file mode 100644
index 000000000000..381bb7b2984c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ffmpegthumbnailer/default.nix
@@ -0,0 +1,41 @@
+{ fetchFromGitHub, lib, stdenv, ffmpeg-headless, cmake, libpng, pkg-config, libjpeg
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ffmpegthumbnailer";
+  version = "unstable-2022-02-18";
+
+  src = fetchFromGitHub {
+    owner = "dirkvdb";
+    repo = "ffmpegthumbnailer";
+    rev = "3db9fe895b2fa656bb40ddb7a62e27604a688171";
+    sha256 = "0606pbg391l4s8mpyyalm9zrcnm75fwqdlrxy2gif9n21i2fm3rc";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ ffmpeg-headless libpng libjpeg ];
+  cmakeFlags = [ "-DENABLE_THUMBNAILER=ON" ];
+
+  # https://github.com/dirkvdb/ffmpegthumbnailer/issues/215
+  postPatch = ''
+    substituteInPlace libffmpegthumbnailer.pc.in \
+      --replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
+  '';
+
+  meta = with lib;  {
+    homepage = "https://github.com/dirkvdb/ffmpegthumbnailer";
+    description = "A lightweight video thumbnailer";
+    longDescription = "FFmpegthumbnailer is a lightweight video
+        thumbnailer that can be used by file managers to create thumbnails
+        for your video files. The thumbnailer uses ffmpeg o decode frames
+        from the video files, so supported videoformats depend on the
+        configuration flags of ffmpeg.
+        This thumbnailer was designed to be as fast and lightweight as possible.
+        The only dependencies are ffmpeg and libpng.
+    ";
+    platforms = platforms.unix;
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.jagajaga ];
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/ffms/default.nix b/nixpkgs/pkgs/development/libraries/ffms/default.nix
new file mode 100644
index 000000000000..06fce3891e27
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ffms/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+, ffmpeg_4
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ffms";
+  version = "2.40";
+
+  src = fetchFromGitHub {
+    owner = "FFMS";
+    repo = "ffms2";
+    rev = version;
+    sha256 = "sha256-3bPxt911T0bGpAIS2RxBjo+VV84xW06eKcCj3ZAcmvw=";
+  };
+
+  env.NIX_CFLAGS_COMPILE = "-fPIC";
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ];
+
+  preAutoreconf = ''
+    mkdir src/config
+  '';
+
+  buildInputs = [
+    ffmpeg_4
+    zlib
+  ];
+
+  # ffms includes a built-in vapoursynth plugin, see:
+  # https://github.com/FFMS/ffms2#avisynth-and-vapoursynth-plugin
+  postInstall = ''
+    mkdir $out/lib/vapoursynth
+    ln -s $out/lib/libffms2.so $out/lib/vapoursynth/libffms2.so
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/FFMS/ffms2/";
+    description = "FFmpeg based source library for easy frame accurate access";
+    license = licenses.mit;
+    maintainers = with maintainers; [ tadeokondrak ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/fftw/default.nix b/nixpkgs/pkgs/development/libraries/fftw/default.nix
new file mode 100644
index 000000000000..7c06a346e4bb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fftw/default.nix
@@ -0,0 +1,89 @@
+{ fetchurl
+, fetchpatch
+, stdenv
+, lib
+, gfortran
+, perl
+, llvmPackages
+, precision ? "double"
+, enableMpi ? false
+, mpi
+, withDoc ? stdenv.cc.isGNU
+, testers
+}:
+
+assert lib.elem precision [ "single" "double" "long-double" "quad-precision" ];
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "fftw-${precision}";
+  version = "3.3.10";
+
+  src = fetchurl {
+    urls = [
+      "https://fftw.org/fftw-${finalAttrs.version}.tar.gz"
+      "ftp://ftp.fftw.org/pub/fftw/fftw-${finalAttrs.version}.tar.gz"
+    ];
+    sha256 = "sha256-VskyVJhSzdz6/as4ILAgDHdCZ1vpIXnlnmIVs0DiZGc=";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "remove_missing_FFTW3LibraryDepends.patch";
+      url = "https://github.com/FFTW/fftw3/pull/338/commits/f69fef7aa546d4477a2a3fd7f13fa8b2f6c54af7.patch";
+      hash = "sha256-lzX9kAHDMY4A3Td8necXwYLcN6j8Wcegi3A7OIECKeU=";
+    })
+  ];
+
+  outputs = [ "out" "dev" "man" ]
+    ++ lib.optional withDoc "info"; # it's dev-doc only
+  outputBin = "dev"; # fftw-wisdom
+
+  nativeBuildInputs = [ gfortran ];
+
+  buildInputs = lib.optionals stdenv.cc.isClang [
+    # TODO: This may mismatch the LLVM version sin the stdenv, see #79818.
+    llvmPackages.openmp
+  ] ++ lib.optional enableMpi mpi;
+
+  configureFlags = [
+    "--enable-shared"
+    "--enable-threads"
+    "--enable-openmp"
+  ]
+
+  ++ lib.optional (precision != "double") "--enable-${precision}"
+  # https://www.fftw.org/fftw3_doc/SIMD-alignment-and-fftw_005fmalloc.html
+  # FFTW will try to detect at runtime whether the CPU supports these extensions
+  ++ lib.optional (stdenv.isx86_64 && (precision == "single" || precision == "double"))
+    "--enable-sse2 --enable-avx --enable-avx2 --enable-avx512 --enable-avx128-fma"
+  ++ lib.optional enableMpi "--enable-mpi"
+  # doc generation causes Fortran wrapper generation which hard-codes gcc
+  ++ lib.optional (!withDoc) "--disable-doc";
+
+  # fftw builds with -mtune=native by default
+  postPatch = ''
+    substituteInPlace configure --replace "-mtune=native" "-mtune=generic"
+  '';
+
+  enableParallelBuilding = true;
+
+  nativeCheckInputs = [ perl ];
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    description = "Fastest Fourier Transform in the West library";
+    homepage = "https://www.fftw.org/";
+    license = licenses.gpl2Plus;
+    maintainers = [ ];
+    pkgConfigModules = [
+      {
+        "single" = "fftw3f";
+        "double" = "fftw3";
+        "long-double" = "fftw3l";
+        "quad-precision" = "fftw3q";
+      }.${precision}
+    ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/filter-audio/default.nix b/nixpkgs/pkgs/development/libraries/filter-audio/default.nix
new file mode 100644
index 000000000000..a412f7070470
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/filter-audio/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "filter-audio";
+  version = "0.0.1";
+
+  src = fetchFromGitHub {
+    owner = "irungentoo";
+    repo ="filter_audio";
+    rev = "v${version}";
+    sha256 = "1dv4pram317c1w97cjsv9f6r8cdxhgri7ib0v364z08pk7r2avfn";
+  };
+
+  doCheck = false;
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  meta = with lib; {
+    description = "Lightweight audio filtering library made from webrtc code";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/fizz/default.nix b/nixpkgs/pkgs/development/libraries/fizz/default.nix
new file mode 100644
index 000000000000..bdf7a68ffbe3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fizz/default.nix
@@ -0,0 +1,66 @@
+{ stdenv
+, fetchFromGitHub
+, cmake
+, boost
+, libevent
+, double-conversion
+, glog
+, lib
+, fmt_8
+, zstd
+, gflags
+, libiberty
+, openssl
+, folly
+, libsodium
+, gtest
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fizz";
+  version = "2023.03.20.00";
+
+  src = fetchFromGitHub {
+    owner = "facebookincubator";
+    repo = "fizz";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-oBdTj7IPlmtF5rEgDVN/wwa0ZxkN6h2QMN3PQB0nCgQ=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeDir = "../fizz";
+
+  cmakeFlags = [ "-Wno-dev" ]
+    ++ lib.optionals stdenv.isDarwin [
+    "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14" # For aligned allocation
+  ];
+
+  NIX_LDFLAGS = "-lz";
+
+  buildInputs = [
+    fmt_8
+    boost
+    double-conversion
+    folly
+    glog
+    gflags
+    gtest
+    libevent
+    libiberty
+    libsodium
+    openssl
+    zlib
+    zstd
+  ];
+
+  meta = with lib; {
+    description = "C++14 implementation of the TLS-1.3 standard";
+    homepage = "https://github.com/facebookincubator/fizz";
+    changelog = "https://github.com/facebookincubator/fizz/releases/tag/v${version}";
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ pierreis kylesferrazza ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/flann/default.nix b/nixpkgs/pkgs/development/libraries/flann/default.nix
new file mode 100644
index 000000000000..eeac7d14568e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/flann/default.nix
@@ -0,0 +1,79 @@
+{ lib
+, cmake
+, fetchFromGitHub
+, fetchpatch
+, lz4
+, pkg-config
+, python3
+, stdenv
+, unzip
+, enablePython ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "flann";
+  version = "1.9.1";
+
+  src = fetchFromGitHub {
+    owner = "flann-lib";
+    repo = "flann";
+    rev = version;
+    sha256 = "13lg9nazj5s9a41j61vbijy04v6839i67lqd925xmxsbybf36gjc";
+  };
+
+  patches = [
+    # Patch HDF5_INCLUDE_DIR -> HDF_INCLUDE_DIRS.
+    (fetchpatch {
+      url = "https://salsa.debian.org/science-team/flann/-/raw/debian/1.9.1+dfsg-9/debian/patches/0001-Updated-fix-cmake-hdf5.patch";
+      sha256 = "yM1ONU4mu6lctttM5YcSTg8F344TNUJXwjxXLqzr5Pk=";
+    })
+    # Patch no-source library workaround that breaks on CMake > 3.11.
+    (fetchpatch {
+      url = "https://salsa.debian.org/science-team/flann/-/raw/debian/1.9.1+dfsg-9/debian/patches/0001-src-cpp-fix-cmake-3.11-build.patch";
+      sha256 = "REsBnbe6vlrZ+iCcw43kR5wy2o6q10RM73xjW5kBsr4=";
+    })
+  ] ++ lib.optionals (!stdenv.cc.isClang) [
+    # Avoid the bundled version of LZ4 and instead use the system one.
+    (fetchpatch {
+      url = "https://salsa.debian.org/science-team/flann/-/raw/debian/1.9.1+dfsg-9/debian/patches/0003-Use-system-version-of-liblz4.patch";
+      sha256 = "xi+GyFn9PEjLgbJeAIEmsbp7ut9G9KIBkVulyT3nfsg=";
+    })
+    # Fix LZ4 string separator issue, see: https://github.com/flann-lib/flann/pull/480
+    (fetchpatch {
+      url = "https://github.com/flann-lib/flann/commit/25eb56ec78472bd419a121c6905095a793cf8992.patch";
+      sha256 = "qt8h576Gn8uR7+T9u9bEBIRz6e6AoTKpa1JfdZVvW9s=";
+    })
+  ] ++ lib.optionals stdenv.cc.isClang [
+    # Fix build with Clang 16.
+    (fetchpatch {
+      url = "https://github.com/flann-lib/flann/commit/be80cefa69b314a3d9e1ab971715e84145863ebb.patch";
+      hash = "sha256-4SUKzQCm0Sx8N43Z6ShuMbgbbe7q8b2Ibk3WgkB0qa4=";
+    })
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_EXAMPLES:BOOL=OFF"
+    "-DBUILD_TESTS:BOOL=OFF"
+    "-DBUILD_MATLAB_BINDINGS:BOOL=OFF"
+    "-DBUILD_PYTHON_BINDINGS:BOOL=${if enablePython then "ON" else "OFF"}"
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    unzip
+  ];
+
+  # lz4 unbundling broken for llvm, use internal version
+  propagatedBuildInputs = lib.optional (!stdenv.cc.isClang) lz4;
+
+  buildInputs = lib.optionals enablePython [ python3 ];
+
+  meta = {
+    homepage = "https://github.com/flann-lib/flann";
+    license = lib.licenses.bsd3;
+    description = "Fast approximate nearest neighbor searches in high dimensional spaces";
+    maintainers = with lib.maintainers; [viric];
+    platforms = with lib.platforms; linux ++ darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/flatbuffers/default.nix b/nixpkgs/pkgs/development/libraries/flatbuffers/default.nix
new file mode 100644
index 000000000000..747a976f4c9e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/flatbuffers/default.nix
@@ -0,0 +1,43 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, python3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "flatbuffers";
+  version = "23.5.26";
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "flatbuffers";
+    rev = "v${version}";
+    hash = "sha256-e+dNPNbCHYDXUS/W+hMqf/37fhVgEGzId6rhP3cToTE=";
+  };
+
+  nativeBuildInputs = [ cmake python3 ];
+
+  cmakeFlags = [
+    "-DFLATBUFFERS_BUILD_TESTS=${if doCheck then "ON" else "OFF"}"
+    "-DFLATBUFFERS_OSX_BUILD_UNIVERSAL=OFF"
+  ];
+
+  doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
+  checkTarget = "test";
+
+  meta = with lib; {
+    description = "Memory Efficient Serialization Library";
+    longDescription = ''
+      FlatBuffers is an efficient cross platform serialization library for
+      games and other memory constrained apps. It allows you to directly
+      access serialized data without unpacking/parsing it first, while still
+      having great forwards/backwards compatibility.
+    '';
+    homepage = "https://google.github.io/flatbuffers/";
+    license = licenses.asl20;
+    maintainers = [ maintainers.teh ];
+    mainProgram = "flatc";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/flatcc/default.nix b/nixpkgs/pkgs/development/libraries/flatcc/default.nix
new file mode 100644
index 000000000000..1f487955b3f3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/flatcc/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "flatcc";
+  version = "0.6.1";
+
+  src = fetchFromGitHub {
+    owner = "dvidelabs";
+    repo = "flatcc";
+    rev = "v${version}";
+    sha256 = "sha256-0/IZ7eX6b4PTnlSSdoOH0FsORGK9hrLr1zlr/IHsJFQ=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [
+    "-DFLATCC_INSTALL=on"
+  ];
+
+  env.NIX_CFLAGS_COMPILE = toString [
+    "-Wno-error=misleading-indentation"
+    "-Wno-error=stringop-overflow"
+  ];
+
+  meta = with lib; {
+    description = "FlatBuffers Compiler and Library in C for C ";
+    homepage = "https://github.com/dvidelabs/flatcc";
+    license = [ licenses.asl20 ];
+    maintainers = with maintainers; [ onny ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/flatpak/binary-path.patch b/nixpkgs/pkgs/development/libraries/flatpak/binary-path.patch
new file mode 100644
index 000000000000..9da437df91b7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/flatpak/binary-path.patch
@@ -0,0 +1,29 @@
+diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c
+index eba81fef..134024e2 100644
+--- a/common/flatpak-dir.c
++++ b/common/flatpak-dir.c
+@@ -7532,8 +7532,13 @@ export_desktop_file (const char         *app,
+       g_key_file_remove_key (keyfile, groups[i], "X-GNOME-Bugzilla-ExtraInfoScript", NULL);
+ 
+       new_exec = g_string_new ("");
+-      if ((flatpak = g_getenv ("FLATPAK_BINARY")) == NULL)
+-        flatpak = FLATPAK_BINDIR "/flatpak";
++      if (g_str_has_suffix (name, ".service"))
++      {
++        flatpak = "/run/current-system/sw/bin/flatpak";
++      } else {
++        if ((flatpak = g_getenv ("FLATPAK_BINARY")) == NULL)
++          flatpak = "flatpak";
++      }
+ 
+       g_string_append_printf (new_exec,
+                               "%s run --branch=%s --arch=%s",
+@@ -8867,7 +8872,7 @@ flatpak_dir_deploy (FlatpakDir          *self,
+                                        error))
+         return FALSE;
+       if ((flatpak = g_getenv ("FLATPAK_BINARY")) == NULL)
+-        flatpak = FLATPAK_BINDIR "/flatpak";
++        flatpak = "flatpak";
+ 
+       bin_data = g_strdup_printf ("#!/bin/sh\nexec %s run --branch=%s --arch=%s %s \"$@\"\n",
+                                   flatpak, escaped_branch, escaped_arch, escaped_app);
diff --git a/nixpkgs/pkgs/development/libraries/flatpak/default.nix b/nixpkgs/pkgs/development/libraries/flatpak/default.nix
new file mode 100644
index 000000000000..005890a3d4a6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/flatpak/default.nix
@@ -0,0 +1,207 @@
+{ lib, stdenv
+, fetchurl
+, autoreconfHook
+, docbook_xml_dtd_45
+, docbook-xsl-nons
+, which
+, libxml2
+, gobject-introspection
+, gtk-doc
+, intltool
+, libxslt
+, pkg-config
+, xmlto
+, substituteAll
+, runCommand
+, bison
+, xdg-dbus-proxy
+, p11-kit
+, appstream
+, bubblewrap
+, bzip2
+, curl
+, dbus
+, glib
+, gpgme
+, json-glib
+, libarchive
+, libcap
+, libseccomp
+, coreutils
+, socat
+, gettext
+, hicolor-icon-theme
+, shared-mime-info
+, desktop-file-utils
+, gtk3
+, fuse3
+, nixosTests
+, xz
+, zstd
+, ostree
+, polkit
+, python3
+, systemd
+, xorg
+, valgrind
+, glib-networking
+, wrapGAppsNoGuiHook
+, dconf
+, gsettings-desktop-schemas
+, librsvg
+, makeWrapper
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "flatpak";
+  version = "1.14.5";
+
+  # TODO: split out lib once we figure out what to do with triggerdir
+  outputs = [ "out" "dev" "man" "doc" "devdoc" "installedTests" ];
+
+  src = fetchurl {
+    url = "https://github.com/flatpak/flatpak/releases/download/${finalAttrs.version}/flatpak-${finalAttrs.version}.tar.xz";
+    sha256 = "sha256-W3DGTOesE04eoIARJW5COuXFTydyl0QVg/d9AT8n/6w="; # Taken from https://github.com/flatpak/flatpak/releases/
+  };
+
+  patches = [
+    # Hardcode paths used by tests and change test runtime generation to use files from Nix store.
+    # https://github.com/flatpak/flatpak/issues/1460
+    (substituteAll {
+      src = ./fix-test-paths.patch;
+      inherit coreutils gettext socat gtk3;
+      smi = shared-mime-info;
+      dfu = desktop-file-utils;
+      hicolorIconTheme = hicolor-icon-theme;
+    })
+
+    # Hardcode paths used by Flatpak itself.
+    (substituteAll {
+      src = ./fix-paths.patch;
+      p11kit = "${p11-kit.bin}/bin/p11-kit";
+    })
+
+    # Allow gtk-doc to find schemas using XML_CATALOG_FILES environment variable.
+    # Patch taken from gtk-doc expression.
+    ./respect-xml-catalog-files-var.patch
+
+    # Nix environment hacks should not leak into the apps.
+    # https://github.com/NixOS/nixpkgs/issues/53441
+    ./unset-env-vars.patch
+
+    # Use flatpak from PATH to avoid references to `/nix/store` in `/desktop` files.
+    # Applications containing `DBusActivatable` entries should be able to find the flatpak binary.
+    # https://github.com/NixOS/nixpkgs/issues/138956
+    ./binary-path.patch
+
+    # The icon validator needs to access the gdk-pixbuf loaders in the Nix store
+    # and cannot bind FHS paths since those are not available on NixOS.
+    finalAttrs.passthru.icon-validator-patch
+  ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+    libxml2
+    docbook_xml_dtd_45
+    docbook-xsl-nons
+    which
+    gobject-introspection
+    gtk-doc
+    intltool
+    libxslt
+    pkg-config
+    xmlto
+    bison
+    wrapGAppsNoGuiHook
+  ];
+
+  buildInputs = [
+    appstream
+    bubblewrap
+    bzip2
+    curl
+    dbus
+    dconf
+    gpgme
+    json-glib
+    libarchive
+    libcap
+    libseccomp
+    xz
+    zstd
+    polkit
+    python3
+    systemd
+    xorg.libXau
+    fuse3
+    gsettings-desktop-schemas
+    glib-networking
+    librsvg # for flatpak-validate-icon
+  ];
+
+  # Required by flatpak.pc
+  propagatedBuildInputs = [
+    glib
+    ostree
+  ];
+
+  nativeCheckInputs = [
+    valgrind
+  ];
+
+  # TODO: some issues with temporary files
+  doCheck = false;
+
+  NIX_LDFLAGS = "-lpthread";
+
+  enableParallelBuilding = true;
+
+  configureFlags = [
+    "--with-curl"
+    "--with-system-bubblewrap=${bubblewrap}/bin/bwrap"
+    "--with-system-dbus-proxy=${xdg-dbus-proxy}/bin/xdg-dbus-proxy"
+    "--with-dbus-config-dir=${placeholder "out"}/share/dbus-1/system.d"
+    "--localstatedir=/var"
+    "--enable-gtk-doc"
+    "--enable-installed-tests"
+  ];
+
+  makeFlags = [
+    "installed_testdir=${placeholder "installedTests"}/libexec/installed-tests/flatpak"
+    "installed_test_metadir=${placeholder "installedTests"}/share/installed-tests/flatpak"
+  ];
+
+  postPatch = let
+    vsc-py = python3.withPackages (pp: [
+      pp.pyparsing
+    ]);
+  in ''
+    patchShebangs buildutil
+    patchShebangs tests
+    PATH=${lib.makeBinPath [vsc-py]}:$PATH patchShebangs --build subprojects/variant-schema-compiler/variant-schema-compiler
+  '';
+
+  passthru = {
+    icon-validator-patch = substituteAll {
+      src = ./fix-icon-validation.patch;
+      inherit (builtins) storeDir;
+    };
+
+    tests = {
+      installedTests = nixosTests.installed-tests.flatpak;
+
+      validate-icon = runCommand "test-icon-validation" { } ''
+        ${finalAttrs.finalPackage}/libexec/flatpak-validate-icon --sandbox 512 512 ${../../../applications/audio/zynaddsubfx/ZynLogo.svg} > "$out"
+        grep format=svg "$out"
+      '';
+    };
+  };
+
+  meta = with lib; {
+    description = "Linux application sandboxing and distribution framework";
+    homepage = "https://flatpak.org/";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/flatpak/fix-icon-validation.patch b/nixpkgs/pkgs/development/libraries/flatpak/fix-icon-validation.patch
new file mode 100644
index 000000000000..0e4db2b162f1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/flatpak/fix-icon-validation.patch
@@ -0,0 +1,31 @@
+--- a/icon-validator/validate-icon.c
++++ b/icon-validator/validate-icon.c
+@@ -163,7 +163,7 @@ rerun_in_sandbox (const char *arg_width,
+                   const char *arg_height,
+                   const char *filename)
+ {
+-  const char * const usrmerged_dirs[] = { "bin", "lib32", "lib64", "lib", "sbin" };
++  const char * const usrmerged_dirs[] = { };
+   int i;
+   g_autoptr(GPtrArray) args = g_ptr_array_new_with_free_func (g_free);
+   char validate_icon[PATH_MAX + 1];
+@@ -183,8 +183,7 @@ rerun_in_sandbox (const char *arg_width,
+             "--unshare-ipc",
+             "--unshare-net",
+             "--unshare-pid",
+-            "--ro-bind", "/usr", "/usr",
+-            "--ro-bind-try", "/etc/ld.so.cache", "/etc/ld.so.cache",
++            "--ro-bind", "@storeDir@", "@storeDir@",
+             "--ro-bind", validate_icon, validate_icon,
+             NULL);
+ 
+@@ -227,6 +226,9 @@ rerun_in_sandbox (const char *arg_width,
+     add_args (args, "--setenv", "G_MESSAGES_DEBUG", g_getenv ("G_MESSAGES_DEBUG"), NULL);
+   if (g_getenv ("G_MESSAGES_PREFIXED"))
+     add_args (args, "--setenv", "G_MESSAGES_PREFIXED", g_getenv ("G_MESSAGES_PREFIXED"), NULL);
++  if (g_getenv ("GDK_PIXBUF_MODULE_FILE"))
++    add_args (args, "--setenv", "GDK_PIXBUF_MODULE_FILE", g_getenv ("GDK_PIXBUF_MODULE_FILE"), NULL);
++
+ 
+   add_args (args, validate_icon, arg_width, arg_height, filename, NULL);
+   g_ptr_array_add (args, NULL);
diff --git a/nixpkgs/pkgs/development/libraries/flatpak/fix-paths.patch b/nixpkgs/pkgs/development/libraries/flatpak/fix-paths.patch
new file mode 100644
index 000000000000..67f0d4eba71f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/flatpak/fix-paths.patch
@@ -0,0 +1,22 @@
+diff --git a/session-helper/flatpak-session-helper.c b/session-helper/flatpak-session-helper.c
+index 5dd7629e..ddc71a4c 100644
+--- a/session-helper/flatpak-session-helper.c
++++ b/session-helper/flatpak-session-helper.c
+@@ -693,7 +693,7 @@ start_p11_kit_server (const char *flatpak_dir)
+   g_auto(GStrv) stdout_lines = NULL;
+   int i;
+   char *p11_argv[] = {
+-    "p11-kit", "server",
++    "@p11kit@", "server",
+     /* We explicitly request --sh here, because we then fail on earlier versions that doesn't support
+      * this flag. This is good, because those earlier versions did not properly daemonize and caused
+      * the spawn_sync to hang forever, waiting for the pipe to close.
+@@ -836,7 +836,7 @@ main (int    argc,
+       exit (1);
+     }
+ 
+-  if (g_find_program_in_path ("p11-kit"))
++  if (TRUE)
+     start_p11_kit_server (flatpak_dir);
+   else
+     g_debug ("p11-kit not found");
diff --git a/nixpkgs/pkgs/development/libraries/flatpak/fix-test-paths.patch b/nixpkgs/pkgs/development/libraries/flatpak/fix-test-paths.patch
new file mode 100644
index 000000000000..ebbcbde5e951
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/flatpak/fix-test-paths.patch
@@ -0,0 +1,212 @@
+diff --git a/app/flatpak-builtins-build-export.c b/app/flatpak-builtins-build-export.c
+index 3f5d8a1f..79493e61 100644
+--- a/app/flatpak-builtins-build-export.c
++++ b/app/flatpak-builtins-build-export.c
+@@ -464,7 +464,7 @@ validate_desktop_file (GFile      *desktop_file,
+   subprocess = g_subprocess_new (G_SUBPROCESS_FLAGS_STDOUT_PIPE |
+                                  G_SUBPROCESS_FLAGS_STDERR_PIPE |
+                                  G_SUBPROCESS_FLAGS_STDERR_MERGE,
+-                                 &local_error, "desktop-file-validate", path, NULL);
++                                 &local_error, "@dfu@/bin/desktop-file-validate", path, NULL);
+   if (!subprocess)
+     {
+       if (!g_error_matches (local_error, G_SPAWN_ERROR, G_SPAWN_ERROR_NOENT))
+diff --git a/tests/libtest.sh b/tests/libtest.sh
+index 36d39ac4..3ad2c7a6 100644
+--- a/tests/libtest.sh
++++ b/tests/libtest.sh
+@@ -511,7 +511,7 @@ if [ -z "${FLATPAK_BWRAP:-}" ]; then
+     # running installed-tests: assume we know what we're doing
+     _flatpak_bwrap_works=true
+ elif ! "$FLATPAK_BWRAP" --unshare-ipc --unshare-net --unshare-pid \
+-        --ro-bind / / /bin/true > bwrap-result 2>&1; then
++        --ro-bind / / @coreutils@/bin/true > bwrap-result 2>&1; then
+     _flatpak_bwrap_works=false
+ else
+     _flatpak_bwrap_works=true
+@@ -591,7 +591,7 @@ dbus-daemon --fork --config-file=session.conf --print-address=3 --print-pid=4 \
+ export DBUS_SESSION_BUS_ADDRESS="$(cat dbus-session-bus-address)"
+ DBUS_SESSION_BUS_PID="$(cat dbus-session-bus-pid)"
+ 
+-if ! /bin/kill -0 "$DBUS_SESSION_BUS_PID"; then
++if ! @coreutils@/bin/kill -0 "$DBUS_SESSION_BUS_PID"; then
+     assert_not_reached "Failed to start dbus-daemon"
+ fi
+ 
+@@ -606,7 +606,7 @@ commit_to_path () {
+ }
+ 
+ cleanup () {
+-    /bin/kill -9 $DBUS_SESSION_BUS_PID
++    @coreutils@/bin/kill -9 $DBUS_SESSION_BUS_PID
+     gpg-connect-agent --homedir "${FL_GPG_HOMEDIR}" killagent /bye >&2 || true
+     fusermount -u $XDG_RUNTIME_DIR/doc >&2 || :
+     kill $(jobs -p) &> /dev/null || true
+diff --git a/tests/make-test-app.sh b/tests/make-test-app.sh
+index afa11a6b..5b12055f 100755
+--- a/tests/make-test-app.sh
++++ b/tests/make-test-app.sh
+@@ -190,13 +190,13 @@ msgid "Hello world"
+ msgstr "Hallo Welt"
+ EOF
+ mkdir -p ${DIR}/files/de/share/de/LC_MESSAGES
+-msgfmt --output-file ${DIR}/files/de/share/de/LC_MESSAGES/helloworld.mo de.po
++@gettext@/bin/msgfmt --output-file ${DIR}/files/de/share/de/LC_MESSAGES/helloworld.mo de.po
+ cat > fr.po <<EOF
+ msgid "Hello world"
+ msgstr "Bonjour le monde"
+ EOF
+ mkdir -p ${DIR}/files/fr/share/fr/LC_MESSAGES
+-msgfmt --output-file ${DIR}/files/fr/share/fr/LC_MESSAGES/helloworld.mo fr.po
++@gettext@/bin/msgfmt --output-file ${DIR}/files/fr/share/fr/LC_MESSAGES/helloworld.mo fr.po
+ 
+ flatpak build-finish ${DIR} >&2
+ mkdir -p repos
+diff --git a/tests/make-test-runtime.sh b/tests/make-test-runtime.sh
+index 6345ff58..fd50fab3 100755
+--- a/tests/make-test-runtime.sh
++++ b/tests/make-test-runtime.sh
+@@ -28,9 +28,10 @@ EOF
+ 
+ # On Debian derivatives, /usr/sbin and /sbin aren't in ordinary users'
+ # PATHs, but ldconfig is kept in /sbin
+-PATH="$PATH:/usr/sbin:/sbin"
++PATH="$PATH:@socat@/bin:/usr/sbin:/sbin"
+ 
+ # Add bash and dependencies
++mkdir -p ${DIR}/nix/store
+ mkdir -p ${DIR}/usr/bin
+ mkdir -p ${DIR}/usr/lib
+ ln -s ../lib ${DIR}/usr/lib64
+@@ -40,46 +41,17 @@ if test -f /sbin/ldconfig.real; then
+ else
+     cp "$(type -P ldconfig)" "${DIR}/usr/bin"
+ fi
+-LIBS=`mktemp`
+-BINS=`mktemp`
+-
+-add_bin() {
+-    local f=$1
+-    shift
+-
+-    # Check if the program is installed
+-    if ! command -v "${f}" &> /dev/null; then
+-        echo "${f} not found"
+-        exit 1
+-    fi
+-
+-    if grep -qFe "${f}" $BINS; then
+-        # Already handled
+-        return 0
+-    fi
+-
+-    echo $f >> $BINS
+-
+-    # Add library dependencies
+-    (ldd "${f}" | sed "s/.* => //"  | awk '{ print $1}' | grep ^/ | sort -u -o $LIBS $LIBS -)  || true
+-
+-    local shebang=$(sed -n '1s/^#!\([^ ]*\).*/\1/p' "${f}")
+-    if [ x$shebang != x ]; then
+-        add_bin "$shebang"
+-    fi
+-}
+-
+ for i in $@ bash ls cat echo readlink socat; do
+-    I=$(type -P "$i")
+-    add_bin "$I"
+-done
+-for i in `cat $BINS`; do
+-    #echo Adding binary $i 1>&2
+-    cp "$i" ${DIR}/usr/bin/
+-done
+-for i in `cat $LIBS`; do
+-    #echo Adding library $i 1>&2
+-    cp "$i" ${DIR}/usr/lib/
++    I=$(readlink -f "$(type -P "$i")")
++    [ -e "${DIR}/usr/bin/$i" ] && continue
++    requisites=$(nix-store --query --requisites "$I")
++    for r in $requisites; do
++        # a single store item can be needed by multiple paths, no need to copy it again
++        if [ ! -e "${DIR}/$r" ]; then
++            cp -r "$r" "${DIR}/$r"
++        fi
++    done
++    ln -s "$I" "${DIR}/usr/bin/$i"
+ done
+ ln -s bash ${DIR}/usr/bin/sh
+ 
+@@ -90,11 +62,13 @@ echo "Hello world, from a runtime$EXTRA"
+ EOF
+ chmod a+x ${DIR}/usr/bin/runtime_hello.sh
+ 
+-# We copy the C.UTF8 locale and call it en_US. Its a bit of a lie, but
+-# the real en_US locale is often not available, because its in the
+-# local archive.
+-mkdir -p ${DIR}/usr/lib/locale/
+-cp -r /usr/lib/locale/C.* ${DIR}/usr/lib/locale/en_US
++# We do not copy C.UTF8 locale because it is in locale archive and
++# that is already copied with glibc.
++
++mv "${DIR}/nix/store" "${DIR}/usr/store" # files outside /usr are not permitted, we will have to replace /nix/store with /usr/store
++chmod -R u+w "${DIR}" # nix store has read-only directories which would cause problems during clean-up, files need to be writable for sed
++find "${DIR}" -type f -print0 | xargs -0 sed -i 's~/nix/store/~/usr/store/~g' # replace hardcoded paths
++find "${DIR}" -type l | xargs -I '{}' sh -c 'tg="$(readlink "$1")"; newtg="${tg#/nix/store/}"; if [ "$tg" != "$newtg" ]; then ln -fs "/usr/store/$newtg" "$1"; fi' -- '{}' # replace symlink targets
+ 
+ if [ x$COLLECTION_ID != x ]; then
+     collection_args=--collection-id=${COLLECTION_ID}
+diff --git a/tests/testlibrary.c b/tests/testlibrary.c
+index 831d85c1..ae4f03d0 100644
+--- a/tests/testlibrary.c
++++ b/tests/testlibrary.c
+@@ -1601,7 +1601,7 @@ check_bwrap_support (void)
+     {
+       gint exit_code = 0;
+       char *argv[] = { (char *) bwrap, "--unshare-ipc", "--unshare-net",
+-                       "--unshare-pid", "--ro-bind", "/", "/", "/bin/true", NULL };
++                       "--unshare-pid", "--ro-bind", "/", "/", "@coreutils@/bin/true", NULL };
+       g_autofree char *argv_str = g_strjoinv (" ", argv);
+       g_test_message ("Spawning %s", argv_str);
+       g_spawn_sync (NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL, &exit_code, &error);
+diff --git a/triggers/desktop-database.trigger b/triggers/desktop-database.trigger
+index 1037466d..c4c7ed6d 100755
+--- a/triggers/desktop-database.trigger
++++ b/triggers/desktop-database.trigger
+@@ -1,5 +1,5 @@
+ #!/bin/sh
+ 
+-if command -v update-desktop-database >/dev/null && test -d "$1/exports/share/applications"; then
+-    exec update-desktop-database -q "$1/exports/share/applications"
++if test -d "$1/exports/share/applications"; then
++    exec @dfu@/bin/update-desktop-database -q "$1/exports/share/applications"
+ fi
+diff --git a/triggers/gtk-icon-cache.trigger b/triggers/gtk-icon-cache.trigger
+index d9fc8251..d8ddb96e 100755
+--- a/triggers/gtk-icon-cache.trigger
++++ b/triggers/gtk-icon-cache.trigger
+@@ -1,10 +1,10 @@
+ #!/bin/sh
+ 
+-if command -v gtk-update-icon-cache >/dev/null && test -d "$1/exports/share/icons/hicolor"; then
+-    cp /usr/share/icons/hicolor/index.theme "$1/exports/share/icons/hicolor/"
++if test -d "$1/exports/share/icons/hicolor"; then
++    @coreutils@/bin/cp -f @hicolorIconTheme@/share/icons/hicolor/index.theme "$1/exports/share/icons/hicolor/"
+     for dir in "$1"/exports/share/icons/*; do
+         if test -f "$dir/index.theme"; then
+-            if ! gtk-update-icon-cache --quiet "$dir"; then
+-                echo "Failed to run gtk-update-icon-cache for $dir"
++            if ! @gtk3@/bin/gtk-update-icon-cache --quiet "$dir"; then
++                @coreutils@/bin/echo "Failed to run gtk-update-icon-cache for $dir"
+                 exit 1
+             fi
+diff --git a/triggers/mime-database.trigger b/triggers/mime-database.trigger
+index 10ddbbb3..c270998a 100755
+--- a/triggers/mime-database.trigger
++++ b/triggers/mime-database.trigger
+@@ -1,5 +1,5 @@
+ #!/bin/sh
+ 
+-if command -v update-mime-database >/dev/null && test -d "$1/exports/share/mime/packages"; then
+-    exec update-mime-database "$1/exports/share/mime"
++if test -d "$1/exports/share/mime/packages"; then
++    exec @smi@/bin/update-mime-database "$1/exports/share/mime"
+ fi
diff --git a/nixpkgs/pkgs/development/libraries/flatpak/respect-xml-catalog-files-var.patch b/nixpkgs/pkgs/development/libraries/flatpak/respect-xml-catalog-files-var.patch
new file mode 100644
index 000000000000..4cee60be2d07
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/flatpak/respect-xml-catalog-files-var.patch
@@ -0,0 +1,15 @@
+diff --git a/acinclude.m4 b/acinclude.m4
+index 92ec3985..b3fccf1d 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -40,8 +40,8 @@ AC_DEFUN([JH_CHECK_XML_CATALOG],
+ [
+   AC_REQUIRE([JH_PATH_XML_CATALOG],[JH_PATH_XML_CATALOG(,[:])])dnl
+   AC_MSG_CHECKING([for ifelse([$2],,[$1],[$2]) in XML catalog])
+-  if $jh_found_xmlcatalog && \
+-     AC_RUN_LOG([$XMLCATALOG --noout "$XML_CATALOG_FILE" "$1" >&2]); then
++  # empty argument forces libxml to use XML_CATALOG_FILES variable
++  if AC_RUN_LOG([$XMLCATALOG --noout "" "$1" >&2]); then
+     AC_MSG_RESULT([found])
+     ifelse([$3],,,[$3
+ ])dnl
diff --git a/nixpkgs/pkgs/development/libraries/flatpak/unset-env-vars.patch b/nixpkgs/pkgs/development/libraries/flatpak/unset-env-vars.patch
new file mode 100644
index 000000000000..2a88d24f4916
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/flatpak/unset-env-vars.patch
@@ -0,0 +1,12 @@
+diff --git a/common/flatpak-run.c b/common/flatpak-run.c
+index 6f54a9d0..102d9b90 100644
+--- a/common/flatpak-run.c
++++ b/common/flatpak-run.c
+@@ -1902,6 +1902,7 @@ static const ExportData default_exports[] = {
+   {"GDK_BACKEND", NULL},
+   {"VK_DRIVER_FILES", NULL},
+   {"VK_ICD_FILENAMES", NULL},
++  {"GDK_PIXBUF_MODULE_FILE", NULL},
+ };
+ 
+ static const ExportData no_ld_so_cache_exports[] = {
diff --git a/nixpkgs/pkgs/development/libraries/flint/3.nix b/nixpkgs/pkgs/development/libraries/flint/3.nix
new file mode 100644
index 000000000000..3be7fdc63904
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/flint/3.nix
@@ -0,0 +1,71 @@
+{ lib
+, stdenv
+, fetchurl
+, gmp
+, mpfr
+, ntl
+, autoconf
+, automake
+, gettext
+, libtool
+, openblas ? null, blas, lapack
+, withBlas ? true
+, withNtl ? true
+}:
+
+assert withBlas -> openblas != null && blas.implementation == "openblas" && lapack.implementation == "openblas";
+
+stdenv.mkDerivation rec {
+  pname = "flint3";
+  version = "3.0.1";
+
+  src = fetchurl {
+    url = "https://www.flintlib.org/flint-${version}.tar.gz";
+    sha256 = "sha256-ezEaAFA6hjiB64F32+uEMi8pOZ89fXLzsaTJuh1XlLQ=";
+  };
+
+  propagatedBuildInputs = [
+    autoconf
+    automake
+    gettext
+    libtool
+  ];
+
+  buildInputs = [
+    gmp
+    mpfr
+  ] ++ lib.optionals withBlas [
+    openblas
+  ] ++ lib.optionals withNtl [
+    ntl
+  ];
+
+  # We're not using autoreconfHook because flint's bootstrap
+  # script calls autoreconf, among other things.
+  preConfigurePhase = ''
+    echo "Executing bootstrap.sh"
+    ./bootstrap.sh
+  '';
+
+  configureFlags = [
+    "--with-gmp=${gmp}"
+    "--with-mpfr=${mpfr}"
+  ] ++ lib.optionals withBlas [
+    "--with-blas=${openblas}"
+  ] ++ lib.optionals withNtl [
+    "--with-ntl=${ntl}"
+  ];
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Fast Library for Number Theory";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ smasher164 ] ++ teams.sage.members;
+    platforms = platforms.unix;
+    homepage = "https://www.flintlib.org/";
+    downloadPage = "https://www.flintlib.org/downloads.html";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/flint/default.nix b/nixpkgs/pkgs/development/libraries/flint/default.nix
new file mode 100644
index 000000000000..eeb2cf1127e4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/flint/default.nix
@@ -0,0 +1,57 @@
+{ lib
+, stdenv
+, fetchurl
+, gmp
+, mpir
+, mpfr
+, ntl
+, openblas ? null, blas, lapack
+, withBlas ? true
+}:
+
+assert withBlas -> openblas != null && blas.implementation == "openblas" && lapack.implementation == "openblas";
+
+stdenv.mkDerivation rec {
+  pname = "flint";
+  version = "2.9.0";
+
+  src = fetchurl {
+    url = "https://www.flintlib.org/flint-${version}.tar.gz";
+    sha256 = "sha256-L8CQ1RAzyTII5sENQGOXpTyYOuU0O5WOsl9ypXpM52o=";
+  };
+
+  buildInputs = [
+    gmp
+    mpir
+    mpfr
+    ntl
+  ] ++ lib.optionals withBlas [
+    openblas
+  ];
+
+  propagatedBuildInputs = [
+    mpfr # flint.h includes mpfr.h
+  ];
+
+  configureFlags = [
+    "--with-gmp=${gmp}"
+    "--with-mpir=${mpir}"
+    "--with-mpfr=${mpfr}"
+    "--with-ntl=${ntl}"
+  ] ++ lib.optionals withBlas [
+    "--with-blas=${openblas}"
+  ];
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Fast Library for Number Theory";
+    license = licenses.gpl2Plus;
+    maintainers = teams.sage.members;
+    platforms = platforms.unix;
+    homepage = "https://www.flintlib.org/";
+    downloadPage = "https://www.flintlib.org/downloads.html";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/flite/default.nix b/nixpkgs/pkgs/development/libraries/flite/default.nix
new file mode 100644
index 000000000000..59ab572762ee
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/flite/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, alsa-lib
+, fetchpatch
+, libpulseaudio
+, audioBackend ? "pulseaudio"
+}:
+
+assert lib.assertOneOf "audioBackend" audioBackend [ "alsa" "pulseaudio" ];
+
+stdenv.mkDerivation rec {
+  pname = "flite";
+  version = "2.2";
+
+  src = fetchFromGitHub {
+    owner = "festvox";
+    repo = "flite";
+    rev = "v${version}";
+    sha256 = "1n0p81jzndzc1rzgm66kw9ls189ricy5v1ps11y0p2fk1p56kbjf";
+  };
+
+  buildInputs = lib.optional (stdenv.isLinux && audioBackend == "alsa") alsa-lib
+    ++ lib.optional (stdenv.isLinux && audioBackend == "pulseaudio") libpulseaudio;
+
+  # https://github.com/festvox/flite/pull/60.
+  # Replaces `ar` with `$(AR)` in config/common_make_rules.
+  # Improves cross-compilation compatibility.
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/festvox/flite/commit/54c65164840777326bbb83517568e38a128122ef.patch";
+      sha256 = "sha256-hvKzdX7adiqd9D+9DbnfNdqEULg1Hhqe1xElYxNM1B8=";
+    })
+  ];
+
+  configureFlags = [
+    "--enable-shared"
+  ] ++ lib.optionals stdenv.isLinux [ "--with-audio=${audioBackend}" ];
+
+  # main/Makefile creates and removes 'flite_voice_list.c' from multiple targets:
+  # make[1]: *** No rule to make target 'flite_voice_list.c', needed by 'all'.  Stop
+  enableParallelBuilding = false;
+
+  meta = with lib; {
+    description = "A small, fast run-time speech synthesis engine";
+    homepage = "http://www.festvox.org/flite/";
+    license = licenses.bsdOriginal;
+    maintainers = with maintainers; [ getchoo ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/fltk/1.4.nix b/nixpkgs/pkgs/development/libraries/fltk/1.4.nix
new file mode 100644
index 000000000000..d5aa780affa7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fltk/1.4.nix
@@ -0,0 +1,5 @@
+import ./common.nix rec {
+  version = "1.4.x-2021-12-21";
+  rev = "c8bb2a35850be7c6eaec5ad5a2936a77f7913de2";
+  sha256 = "1fwfg1hp1ajqh2b4ra4phi96854q9i8c0gbyi7pr35ljyv848295";
+}
diff --git a/nixpkgs/pkgs/development/libraries/fltk/common.nix b/nixpkgs/pkgs/development/libraries/fltk/common.nix
new file mode 100644
index 000000000000..426a85e6a220
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fltk/common.nix
@@ -0,0 +1,202 @@
+{ version, rev, sha256 }:
+
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, pkg-config
+, zlib
+, libjpeg
+, libpng
+, fontconfig
+, freetype
+, libX11
+, libXext
+, libXinerama
+, libXfixes
+, libXcursor
+, libXft
+, libXrender
+, ApplicationServices
+, Carbon
+, Cocoa
+
+, withGL ? true
+, libGL
+, libGLU
+, glew
+, OpenGL
+
+, withCairo ? true
+, cairo
+
+, withPango ? (lib.strings.versionAtLeast version "1.4" && stdenv.hostPlatform.isLinux)
+, pango
+
+, withDocs ? true
+, doxygen
+, graphviz
+
+, withExamples ? (stdenv.buildPlatform == stdenv.hostPlatform)
+, withShared ? true
+}:
+
+let
+  onOff = value: if value then "ON" else "OFF";
+in
+stdenv.mkDerivation rec {
+  pname = "fltk";
+  inherit version;
+
+  src = fetchFromGitHub {
+    owner = "fltk";
+    repo = "fltk";
+    inherit rev sha256;
+  };
+
+  outputs = [ "out" ]
+    ++ lib.optional withExamples "bin"
+    ++ lib.optional withDocs "doc";
+
+  # Manually move example & test binaries to $bin to avoid cyclic dependencies on dev binaries
+  outputBin = lib.optionalString withExamples "out";
+
+  patches = lib.optionals stdenv.hostPlatform.isDarwin [
+    ./nsosv.patch
+  ];
+
+  postPatch = ''
+    patchShebangs documentation/make_*
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ] ++ lib.optionals withDocs [
+    doxygen
+    graphviz
+  ];
+
+  buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
+    ApplicationServices
+    Carbon
+  ] ++ lib.optionals (withGL && !stdenv.hostPlatform.isDarwin) [
+    libGL
+    libGLU
+  ] ++ lib.optionals (withExamples && withGL) [
+    glew
+  ];
+
+  propagatedBuildInputs = [
+    zlib
+    libjpeg
+    libpng
+  ] ++ lib.optionals stdenv.hostPlatform.isLinux [
+    freetype
+    fontconfig
+    libX11
+    libXext
+    libXinerama
+    libXfixes
+    libXcursor
+    libXft
+    libXrender
+  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
+    Cocoa
+  ] ++ lib.optionals (withGL && stdenv.hostPlatform.isDarwin) [
+    OpenGL
+  ] ++ lib.optionals withCairo [
+    cairo
+  ] ++ lib.optionals withPango [
+    pango
+  ];
+
+  cmakeFlags = [
+    # Common
+    "-DOPTION_BUILD_SHARED_LIBS=${onOff withShared}"
+    "-DOPTION_USE_SYSTEM_ZLIB=ON"
+    "-DOPTION_USE_SYSTEM_LIBJPEG=ON"
+    "-DOPTION_USE_SYSTEM_LIBPNG=ON"
+
+    # X11
+    "-DOPTION_USE_XINERAMA=${onOff stdenv.hostPlatform.isLinux}"
+    "-DOPTION_USE_XFIXES=${onOff stdenv.hostPlatform.isLinux}"
+    "-DOPTION_USE_XCURSOR=${onOff stdenv.hostPlatform.isLinux}"
+    "-DOPTION_USE_XFT=${onOff stdenv.hostPlatform.isLinux}"
+    "-DOPTION_USE_XRENDER=${onOff stdenv.hostPlatform.isLinux}"
+    "-DOPTION_USE_XDBE=${onOff stdenv.hostPlatform.isLinux}"
+
+    # GL
+    "-DOPTION_USE_GL=${onOff withGL}"
+    "-DOpenGL_GL_PREFERENCE=GLVND"
+
+    # Cairo
+    "-DOPTION_CAIRO=${onOff withCairo}"
+    "-DOPTION_CAIROEXT=${onOff withCairo}"
+
+    # Pango
+    "-DOPTION_USE_PANGO=${onOff withPango}"
+
+    # Examples & Tests
+    "-DFLTK_BUILD_EXAMPLES=${onOff withExamples}"
+    "-DFLTK_BUILD_TEST=${onOff withExamples}"
+
+    # Docs
+    "-DOPTION_BUILD_HTML_DOCUMENTATION=${onOff withDocs}"
+    "-DOPTION_BUILD_PDF_DOCUMENTATION=OFF"
+    "-DOPTION_INSTALL_HTML_DOCUMENTATION=${onOff withDocs}"
+    "-DOPTION_INSTALL_PDF_DOCUMENTATION=OFF"
+    "-DOPTION_INCLUDE_DRIVER_DOCUMENTATION=${onOff withDocs}"
+
+    # RPATH of binary /nix/store/.../bin/... contains a forbidden reference to /build/
+    "-DCMAKE_SKIP_BUILD_RPATH=ON"
+  ];
+
+  preBuild = lib.optionalString (withCairo && withShared && stdenv.hostPlatform.isDarwin) ''
+    # unresolved symbols in cairo dylib without this: https://github.com/fltk/fltk/issues/250
+    export NIX_LDFLAGS="$NIX_LDFLAGS -undefined dynamic_lookup"
+  '';
+
+  postBuild = lib.optionalString withDocs ''
+    make docs
+  '';
+
+  postInstall = lib.optionalString withExamples ''
+    mkdir -p $bin/bin
+    mv bin/{test,examples}/* $bin/bin/
+  '' + lib.optionalString stdenv.hostPlatform.isDarwin ''
+    mkdir -p $out/Library/Frameworks
+    mv $out{,/Library/Frameworks}/FLTK.framework
+
+    moveAppBundles() {
+      echo "Moving and symlinking $1"
+      appname="$(basename "$1")"
+      binname="$(basename "$(find "$1"/Contents/MacOS/ -type f -executable | head -n1)")"
+      curpath="$(dirname "$1")"
+
+      mkdir -p "$curpath"/../Applications/
+      mv "$1" "$curpath"/../Applications/
+      [ -f "$curpath"/"$binname" ] && rm "$curpath"/"$binname"
+      ln -s ../Applications/"$appname"/Contents/MacOS/"$binname" "$curpath"/"$binname"
+    }
+
+    rm $out/bin/fluid.icns
+    for app in $out/bin/*.app ${lib.optionalString withExamples "$bin/bin/*.app"}; do
+      moveAppBundles "$app"
+    done
+  '';
+
+  postFixup = ''
+    substituteInPlace $out/bin/fltk-config \
+      --replace "/$out/" "/"
+  '';
+
+  meta = with lib; {
+    description = "A C++ cross-platform lightweight GUI library";
+    homepage = "https://www.fltk.org";
+    platforms = platforms.unix;
+    # LGPL2 with static linking exception
+    # https://www.fltk.org/COPYING.php
+    license = licenses.lgpl2Only;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/fltk/default.nix b/nixpkgs/pkgs/development/libraries/fltk/default.nix
new file mode 100644
index 000000000000..61d73b83e497
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fltk/default.nix
@@ -0,0 +1,5 @@
+import ./common.nix rec {
+  version = "1.3.8";
+  rev = "release-${version}";
+  sha256 = "1pw4ndwn9rr1cxw5qiw32r9la2z9zbjphgsqq1hj2yy4blwv419r";
+}
diff --git a/nixpkgs/pkgs/development/libraries/fltk/nsosv.patch b/nixpkgs/pkgs/development/libraries/fltk/nsosv.patch
new file mode 100644
index 000000000000..9e55b011b571
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fltk/nsosv.patch
@@ -0,0 +1,20 @@
+diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
+index 6f5b8b1..2c7763d 100644
+--- a/src/Fl_cocoa.mm
++++ b/src/Fl_cocoa.mm
+@@ -4074,15 +4074,6 @@ Window fl_xid(const Fl_Window* w)
+ static int calc_mac_os_version() {
+   int M, m, b = 0;
+   NSAutoreleasePool *localPool = [[NSAutoreleasePool alloc] init];
+-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
+-  if ([NSProcessInfo instancesRespondToSelector:@selector(operatingSystemVersion)]) {
+-    NSOperatingSystemVersion version = [[NSProcessInfo processInfo] operatingSystemVersion];
+-    M = version.majorVersion;
+-    m = version.minorVersion;
+-    b = version.patchVersion;
+-  }
+-  else
+-#endif
+   {
+     NSDictionary * sv = [NSDictionary dictionaryWithContentsOfFile:@"/System/Library/CoreServices/SystemVersion.plist"];
+     const char *s = [[sv objectForKey:@"ProductVersion"] UTF8String];
diff --git a/nixpkgs/pkgs/development/libraries/fmt/default.nix b/nixpkgs/pkgs/development/libraries/fmt/default.nix
new file mode 100644
index 000000000000..e2677bdea25d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fmt/default.nix
@@ -0,0 +1,73 @@
+{ lib
+, stdenv
+, fetchFromGitHub, fetchpatch
+, cmake
+, enableShared ? !stdenv.hostPlatform.isStatic
+
+# tests
+, mpd
+, openimageio
+, fcitx5
+, spdlog
+}:
+
+let
+  generic = { version, sha256, patches ? [ ] }:
+    stdenv.mkDerivation {
+      pname = "fmt";
+      inherit version;
+
+      outputs = [ "out" "dev" ];
+
+      src = fetchFromGitHub {
+        owner = "fmtlib";
+        repo = "fmt";
+        rev = version;
+        inherit sha256;
+      };
+
+      inherit patches;
+
+      nativeBuildInputs = [ cmake ];
+
+      cmakeFlags = [
+        "-DBUILD_SHARED_LIBS=${if enableShared then "ON" else "OFF"}"
+      ];
+
+      doCheck = true;
+
+      passthru.tests = {
+        inherit mpd openimageio fcitx5 spdlog;
+      };
+
+      meta = with lib; {
+        description = "Small, safe and fast formatting library";
+        longDescription = ''
+          fmt (formerly cppformat) is an open-source formatting library. It can be
+          used as a fast and safe alternative to printf and IOStreams.
+        '';
+        homepage = "https://fmt.dev/";
+        changelog = "https://github.com/fmtlib/fmt/blob/${version}/ChangeLog.rst";
+        downloadPage = "https://github.com/fmtlib/fmt/";
+        maintainers = [ maintainers.jdehaas ];
+        license = licenses.mit;
+        platforms = platforms.all;
+      };
+    };
+in
+{
+  fmt_8 = generic {
+    version = "8.1.1";
+    sha256 = "sha256-leb2800CwdZMJRWF5b1Y9ocK0jXpOX/nwo95icDf308=";
+  };
+
+  fmt_9 = generic {
+    version = "9.1.0";
+    sha256 = "sha256-rP6ymyRc7LnKxUXwPpzhHOQvpJkpnRFOt2ctvUNlYI0=";
+  };
+
+  fmt_10 = generic {
+    version = "10.1.1";
+    sha256 = "sha256-H9+1lEaHM12nzXSmo9m8S6527t+97e6necayyjCPm1A=";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/folks/default.nix b/nixpkgs/pkgs/development/libraries/folks/default.nix
new file mode 100644
index 000000000000..c100a8862d5c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/folks/default.nix
@@ -0,0 +1,118 @@
+{ stdenv
+, lib
+, fetchurl
+, pkg-config
+, meson
+, ninja
+, glib
+, gnome
+, gettext
+, gobject-introspection
+, vala
+, sqlite
+, dbus-glib
+, dbus
+, libgee
+, evolution-data-server-gtk4
+, python3
+, readline
+, gtk-doc
+, docbook-xsl-nons
+, docbook_xml_dtd_43
+, telepathy-glib
+, telepathySupport ? false
+}:
+
+# TODO: enable more folks backends
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "folks";
+  version = "0.15.7";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/folks/${lib.versions.majorMinor finalAttrs.version}/folks-${finalAttrs.version}.tar.xz";
+    sha256 = "Eg8hnvYyEsqpWuf2rrZOKZKLCxqLlFIFQwSgDQ80eHE=";
+  };
+
+  nativeBuildInputs = [
+    gettext
+    gobject-introspection
+    gtk-doc
+    docbook-xsl-nons
+    docbook_xml_dtd_43
+    meson
+    ninja
+    pkg-config
+    vala
+  ] ++ lib.optionals telepathySupport [
+    python3
+  ];
+
+  buildInputs = [
+    dbus-glib
+    evolution-data-server-gtk4 # UI part not needed, using gtk4 version to reduce system closure.
+    readline
+  ] ++ lib.optionals telepathySupport [
+    telepathy-glib
+  ];
+
+  propagatedBuildInputs = [
+    glib
+    libgee
+    sqlite
+  ];
+
+  nativeCheckInputs = [
+    dbus
+    (python3.withPackages (pp: with pp; [
+      python-dbusmock
+      # The following possibly need to be propagated by dbusmock
+      # if they are not optional
+      dbus-python
+      pygobject3
+    ]))
+  ];
+
+  mesonFlags = [
+    "-Ddocs=true"
+    "-Dtelepathy_backend=${lib.boolToString telepathySupport}"
+    "-Dtests=${lib.boolToString (finalAttrs.doCheck && stdenv.isLinux)}"
+  ];
+
+  # backends/eds/lib/libfolks-eds.so.26.0.0.p/edsf-persona-store.c:10697:4:
+  # error: call to undeclared function 'folks_persona_store_set_is_user_set_default';
+  # ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=implicit-function-declaration";
+
+  # Checks last re-enabled in https://github.com/NixOS/nixpkgs/pull/279843, but timeouts in tests still
+  # occur inconsistently
+  doCheck = false;
+
+  # Prevents e-d-s add-contacts-stress-test from timing out
+  checkPhase = ''
+    runHook preCheck
+    meson test --timeout-multiplier 4
+    runHook postCheck
+  '';
+
+  postPatch = lib.optionalString telepathySupport ''
+    patchShebangs tests/tools/manager-file.py
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = "folks";
+      versionPolicy = "none";
+    };
+  };
+
+  meta = with lib; {
+    description = "A library that aggregates people from multiple sources to create metacontacts";
+    homepage = "https://wiki.gnome.org/Projects/Folks";
+    license = licenses.lgpl21Plus;
+    maintainers = teams.gnome.members;
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/folly/default.nix b/nixpkgs/pkgs/development/libraries/folly/default.nix
new file mode 100644
index 000000000000..22d395785434
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/folly/default.nix
@@ -0,0 +1,98 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, boost
+, cmake
+, double-conversion
+, fmt_8
+, gflags
+, glog
+, libevent
+, libiberty
+, libunwind
+, lz4
+, openssl
+, pkg-config
+, xz
+, zlib
+, zstd
+, jemalloc
+, follyMobile ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "folly";
+  version = "2023.02.27.00";
+
+  src = fetchFromGitHub {
+    owner = "facebook";
+    repo = "folly";
+    rev = "v${version}";
+    sha256 = "sha256-DfZiVxncpKSPn9BN25d8o0/tC27+HhSG/t53WgzAT/s=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  # See CMake/folly-deps.cmake in the Folly source tree.
+  buildInputs = [
+    boost
+    double-conversion
+    glog
+    gflags
+    libevent
+    libiberty
+    openssl
+    lz4
+    xz
+    zlib
+    libunwind
+    fmt_8
+    zstd
+  ] ++ lib.optional stdenv.isLinux jemalloc;
+
+  # jemalloc headers are required in include/folly/portability/Malloc.h
+  propagatedBuildInputs = lib.optional stdenv.isLinux jemalloc;
+
+  env.NIX_CFLAGS_COMPILE = toString [ "-DFOLLY_MOBILE=${if follyMobile then "1" else "0"}" "-fpermissive" ];
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+
+    # temporary hack until folly builds work on aarch64,
+    # see https://github.com/facebook/folly/issues/1880
+    "-DCMAKE_LIBRARY_ARCHITECTURE=${if stdenv.isx86_64 then "x86_64" else "dummy"}"
+
+    # ensure correct dirs in $dev/lib/pkgconfig/libfolly.pc
+    # see https://github.com/NixOS/nixpkgs/issues/144170
+    "-DCMAKE_INSTALL_INCLUDEDIR=include"
+    "-DCMAKE_INSTALL_LIBDIR=lib"
+  ];
+
+  # split outputs to reduce downstream closure sizes
+  outputs = [ "out" "dev" ];
+
+  # patch prefix issues again
+  # see https://github.com/NixOS/nixpkgs/issues/144170
+  postFixup = ''
+    substituteInPlace $dev/lib/cmake/${pname}/${pname}-targets-release.cmake  \
+      --replace '$'{_IMPORT_PREFIX}/lib/ $out/lib/
+  '';
+
+  # folly-config.cmake, will `find_package` these, thus there should be
+  # a way to ensure abi compatibility.
+  passthru = {
+    inherit boost;
+    fmt = fmt_8;
+  };
+
+  meta = with lib; {
+    description = "An open-source C++ library developed and used at Facebook";
+    homepage = "https://github.com/facebook/folly";
+    license = licenses.asl20;
+    # 32bit is not supported: https://github.com/facebook/folly/issues/103
+    platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" "aarch64-linux" ];
+    maintainers = with maintainers; [ abbradar pierreis ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/fontconfig/default.nix b/nixpkgs/pkgs/development/libraries/fontconfig/default.nix
new file mode 100644
index 000000000000..9ff72c202193
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fontconfig/default.nix
@@ -0,0 +1,87 @@
+{ stdenv
+, lib
+, fetchurl
+, pkg-config
+, python3
+, freetype
+, expat
+, libxslt
+, gperf
+, dejavu_fonts
+, autoreconfHook
+, CoreFoundation
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fontconfig";
+  version = "2.15.0";
+
+  outputs = [ "bin" "dev" "lib" "out" ]; # $out contains all the config
+
+  src = fetchurl {
+    url = "https://www.freedesktop.org/software/fontconfig/release/${pname}-${version}.tar.xz";
+    hash = "sha256-Y6BljQ4G4PqIYQZFK1jvBPIfWCAuoCqUw53g0zNdfA4=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    gperf
+    libxslt
+    pkg-config
+    python3
+  ];
+
+  buildInputs = [
+    expat
+  ] ++ lib.optional stdenv.isDarwin CoreFoundation;
+
+  propagatedBuildInputs = [
+    freetype
+  ];
+
+  postPatch = ''
+    # Requires networking.
+    sed -i '/check_PROGRAMS += test-crbug1004254/d' test/Makefile.am
+  '';
+
+  configureFlags = [
+    "--sysconfdir=/etc"
+    "--with-arch=${stdenv.hostPlatform.parsed.cpu.name}"
+    "--with-cache-dir=/var/cache/fontconfig" # otherwise the fallback is in $out/
+    # just <1MB; this is what you get when loading config fails for some reason
+    "--with-default-fonts=${dejavu_fonts.minimal}"
+  ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "--with-arch=${stdenv.hostPlatform.parsed.cpu.name}"
+  ];
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  installFlags = [
+    # Don't try to write to /var/cache/fontconfig at install time.
+    "fc_cachedir=$(TMPDIR)/dummy"
+    "RUN_FC_CACHE_TEST=false"
+    "sysconfdir=${placeholder "out"}/etc"
+  ];
+
+  postInstall = ''
+    cd "$out/etc/fonts"
+    xsltproc --stringparam fontDirectories "${dejavu_fonts.minimal}" \
+      --path $out/share/xml/fontconfig \
+      ${./make-fonts-conf.xsl} $out/etc/fonts/fonts.conf \
+      > fonts.conf.tmp
+    mv fonts.conf.tmp $out/etc/fonts/fonts.conf
+    # We don't keep section 3 of the manpages, as they are quite large and
+    # probably not so useful.
+    rm -r $bin/share/man/man3
+  '';
+
+  meta = with lib; {
+    description = "A library for font customization and configuration";
+    homepage = "http://fontconfig.org/";
+    license = licenses.bsd2; # custom but very bsd-like
+    platforms = platforms.all;
+    maintainers = with maintainers; teams.freedesktop.members ++ [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/fontconfig/make-fonts-cache.nix b/nixpkgs/pkgs/development/libraries/fontconfig/make-fonts-cache.nix
new file mode 100644
index 000000000000..47884b9c3b92
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fontconfig/make-fonts-cache.nix
@@ -0,0 +1,33 @@
+{ runCommand, lib, fontconfig, fontDirectories }:
+
+runCommand "fc-cache"
+  {
+    nativeBuildInputs = [ fontconfig.bin ];
+    preferLocalBuild = true;
+    allowSubstitutes = false;
+    passAsFile = [ "fontDirs" ];
+    fontDirs = ''
+      <!-- Font directories -->
+      ${lib.concatStringsSep "\n" (map (font: "<dir>${font}</dir>") fontDirectories)}
+    '';
+  }
+  ''
+    export FONTCONFIG_FILE=$(pwd)/fonts.conf
+
+    cat > fonts.conf << EOF
+    <?xml version='1.0'?>
+    <!DOCTYPE fontconfig SYSTEM 'urn:fontconfig:fonts.dtd'>
+    <fontconfig>
+      <include>${fontconfig.out}/etc/fonts/fonts.conf</include>
+      <cachedir>$out</cachedir>
+    EOF
+    cat "$fontDirsPath" >> fonts.conf
+    echo "</fontconfig>" >> fonts.conf
+
+    mkdir -p $out
+    fc-cache -sv
+
+    # This is not a cache dir in the normal sense -- it won't be automatically
+    # recreated.
+    rm -f "$out/CACHEDIR.TAG"
+  ''
diff --git a/nixpkgs/pkgs/development/libraries/fontconfig/make-fonts-conf.nix b/nixpkgs/pkgs/development/libraries/fontconfig/make-fonts-conf.nix
new file mode 100644
index 000000000000..cfe0a21e1d35
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fontconfig/make-fonts-conf.nix
@@ -0,0 +1,30 @@
+{ runCommand, stdenv, lib, libxslt, fontconfig, dejavu_fonts, fontDirectories
+, impureFontDirectories ? [
+    # nix user profile
+    "~/.nix-profile/lib/X11/fonts" "~/.nix-profile/share/fonts"
+  ]
+  ++ lib.optional stdenv.isDarwin "~/Library/Fonts"
+  ++ [
+    # FHS paths for non-NixOS platforms
+    "/usr/share/fonts" "/usr/local/share/fonts"
+  ]
+  # darwin paths
+  ++ lib.optionals stdenv.isDarwin [ "/Library/Fonts" "/System/Library/Fonts" ]
+  # nix default profile
+  ++ [ "/nix/var/nix/profiles/default/lib/X11/fonts" "/nix/var/nix/profiles/default/share/fonts" ] }:
+
+runCommand "fonts.conf"
+  {
+    nativeBuildInputs = [ libxslt ];
+    buildInputs = [ fontconfig ];
+    inherit fontDirectories;
+    # Add a default font for non-nixos systems, <1MB and in nixos defaults.
+    impureFontDirectories = impureFontDirectories ++ [ dejavu_fonts.minimal ];
+  }
+  ''
+    xsltproc --stringparam fontDirectories "$fontDirectories" \
+      --stringparam impureFontDirectories "$impureFontDirectories" \
+      --path ${fontconfig.out}/share/xml/fontconfig \
+      ${./make-fonts-conf.xsl} ${fontconfig.out}/etc/fonts/fonts.conf \
+      > $out
+  ''
diff --git a/nixpkgs/pkgs/development/libraries/fontconfig/make-fonts-conf.xsl b/nixpkgs/pkgs/development/libraries/fontconfig/make-fonts-conf.xsl
new file mode 100644
index 000000000000..d04e4ffab967
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fontconfig/make-fonts-conf.xsl
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+
+<!--
+  This script copies the original fonts.conf from the fontconfig
+  distribution, but replaces all <dir> entries with the directories
+  specified in the $fontDirectories parameter.
+-->
+
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:str="http://exslt.org/strings"
+                extension-element-prefixes="str"
+                >
+
+  <xsl:output method='xml' encoding="UTF-8" doctype-system="urn:fontconfig:fonts.dtd" />
+
+  <xsl:param name="fontDirectories" />
+  <xsl:param name="impureFontDirectories" />
+
+  <xsl:template match="/fontconfig">
+
+    <fontconfig>
+      <xsl:apply-templates select="child::node()[name() != 'dir' and name() != 'cachedir' and name() != 'include']" />
+
+      <!-- the first cachedir will be used to store the cache -->
+      <cachedir prefix="xdg">fontconfig</cachedir>
+      <xsl:text>&#0010;</xsl:text>
+      <!-- /var/cache/fontconfig is useful for non-nixos systems -->
+      <cachedir>/var/cache/fontconfig</cachedir>
+      <xsl:text>&#0010;</xsl:text>
+
+      <!-- system-wide config -->
+      <include ignore_missing="yes">/etc/fonts/conf.d</include>
+      <xsl:text>&#0010;</xsl:text>
+
+      <dir prefix="xdg">fonts</dir>
+      <xsl:text>&#0010;</xsl:text>
+      <xsl:for-each select="str:tokenize($fontDirectories)">
+        <dir><xsl:value-of select="." /></dir>
+        <xsl:text>&#0010;</xsl:text>
+      </xsl:for-each>
+
+      <xsl:for-each select="str:tokenize($impureFontDirectories)">
+        <dir><xsl:value-of select="." /></dir>
+        <xsl:text>&#0010;</xsl:text>
+      </xsl:for-each>
+
+    </fontconfig>
+
+  </xsl:template>
+
+
+  <!-- New fontconfig >=2.11 doesn't like xml:space added by xsl:copy-of -->
+  <xsl:template match="node()|@*">
+    <xsl:copy>
+      <xsl:apply-templates select="node()|@*[name() != 'xml:space']"/>
+    </xsl:copy>
+  </xsl:template>
+
+</xsl:stylesheet>
diff --git a/nixpkgs/pkgs/development/libraries/forge/default.nix b/nixpkgs/pkgs/development/libraries/forge/default.nix
new file mode 100644
index 000000000000..d9996ada5067
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/forge/default.nix
@@ -0,0 +1,82 @@
+{ boost
+, cmake
+, expat
+, fetchFromGitHub
+, fontconfig
+, freeimage
+, freetype
+, glfw3
+, glm
+, lib
+, libGLU
+, libGL
+, mesa
+, opencl-clhpp
+, pkg-config
+, stdenv
+, SDL2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "forge";
+  version = "1.0.8";
+
+  src = fetchFromGitHub {
+    owner = "arrayfire";
+    repo = pname;
+    rev = "v1.0.8";
+    sha256 = "sha256-lSZAwcqAHiuZkpYcVfwvZCfNmEF3xGN9S/HuZQrGeKU=";
+  };
+  glad = fetchFromGitHub {
+    owner = "arrayfire";
+    repo = "glad";
+    rev = "b94680aee5b8ce01ae1644c5f2661769366c765a";
+    hash = "sha256-CrZy76gOGMpy9f1NuMK4tokZ57U//zYeNH5ZYY0SC2U=";
+  };
+
+  # This patch ensures that Forge does not try to fetch glad from GitHub and
+  # uses our sources that we've checked out via Nix.
+  patches = [ ./no-download-glad.patch ];
+
+  postPatch = ''
+    mkdir -p ./extern
+    cp -R --no-preserve=mode,ownership ${glad} ./extern/fg_glad-src
+    ln -s ${opencl-clhpp} ./extern/cl2hpp
+  '';
+
+  cmakeFlags = [ "-DFETCHCONTENT_FULLY_DISCONNECTED=ON" ];
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    boost.out
+    boost.dev
+    expat
+    fontconfig
+    freeimage
+    freetype
+    glfw3
+    glm
+    libGL
+    libGLU
+    opencl-clhpp
+    SDL2
+    mesa
+  ];
+
+  meta = with lib; {
+    description = "An OpenGL interop library that can be used with ArrayFire or any other application using CUDA or OpenCL compute backend";
+    longDescription = ''
+      An OpenGL interop library that can be used with ArrayFire or any other application using CUDA or OpenCL compute backend.
+      The goal of Forge is to provide high performance OpenGL visualizations for C/C++ applications that use CUDA/OpenCL.
+      Forge uses OpenGL >=3.3 forward compatible contexts, so please make sure you have capable hardware before trying it out.
+    '';
+    license = licenses.bsd3;
+    homepage = "https://arrayfire.com/";
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ chessai twesterhout ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/forge/no-download-glad.patch b/nixpkgs/pkgs/development/libraries/forge/no-download-glad.patch
new file mode 100644
index 000000000000..0957be82a3b7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/forge/no-download-glad.patch
@@ -0,0 +1,31 @@
+diff --git a/CMakeModules/ForgeConfigureDepsVars.cmake b/CMakeModules/ForgeConfigureDepsVars.cmake
+index ee5c2fc..2f75181 100644
+--- a/CMakeModules/ForgeConfigureDepsVars.cmake
++++ b/CMakeModules/ForgeConfigureDepsVars.cmake
+@@ -84,7 +84,7 @@ macro(fg_dep_check_and_populate dep_prefix)
+         URL            ${fdcp_args_URI}
+         URL_HASH       ${fdcp_args_REF}
+         DOWNLOAD_COMMAND \"\"
+-        UPDATE_DISCONNECTED ON
++        UPDATE_COMMAND \"\"
+         SOURCE_DIR     "${Forge_SOURCE_DIR}/extern/${dep_prefix}-src"
+         BINARY_DIR     "${Forge_BINARY_DIR}/extern/${dep_prefix}-build"
+         SUBBUILD_DIR   "${Forge_BINARY_DIR}/extern/${dep_prefix}-subbuild"
+@@ -94,7 +94,7 @@ macro(fg_dep_check_and_populate dep_prefix)
+         QUIET
+         URL            ${fdcp_args_URI}
+         DOWNLOAD_COMMAND \"\"
+-        UPDATE_DISCONNECTED ON
++        UPDATE_COMMAND \"\"
+         SOURCE_DIR     "${Forge_SOURCE_DIR}/extern/${dep_prefix}-src"
+         BINARY_DIR     "${Forge_BINARY_DIR}/extern/${dep_prefix}-build"
+         SUBBUILD_DIR   "${Forge_BINARY_DIR}/extern/${dep_prefix}-subbuild"
+@@ -106,7 +106,7 @@ macro(fg_dep_check_and_populate dep_prefix)
+         GIT_REPOSITORY ${fdcp_args_URI}
+         GIT_TAG        ${fdcp_args_REF}
+         DOWNLOAD_COMMAND \"\"
+-        UPDATE_DISCONNECTED ON
++        UPDATE_COMMAND \"\"
+         SOURCE_DIR     "${Forge_SOURCE_DIR}/extern/${dep_prefix}-src"
+         BINARY_DIR     "${Forge_BINARY_DIR}/extern/${dep_prefix}-build"
+         SUBBUILD_DIR   "${Forge_BINARY_DIR}/extern/${dep_prefix}-subbuild"
diff --git a/nixpkgs/pkgs/development/libraries/fortify-headers/default.nix b/nixpkgs/pkgs/development/libraries/fortify-headers/default.nix
new file mode 100644
index 000000000000..1f418af7ae96
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fortify-headers/default.nix
@@ -0,0 +1,39 @@
+{ lib
+, stdenv
+, fetchurl
+}:
+
+stdenv.mkDerivation {
+  pname = "fortify-headers";
+  version = "1.1alpine3";
+
+  # upstream only accessible via git - unusable during bootstrap, hence
+  # extract from the alpine package
+  src = fetchurl {
+    url = "https://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/fortify-headers-1.1-r3.apk";
+    name = "fortify-headers.tar.gz";  # ensure it's extracted as a .tar.gz
+    hash = "sha256-8A8JcKHIBgXpUuIP4zs3Q1yBs5jCGd5F3H2E8UN/S2g=";
+  };
+
+  patches = [
+    ./wchar-imports-skip.patch
+    ./restore-macros.patch
+  ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out
+    cp -r include/fortify $out/include
+
+    runHook postInstall
+  '';
+
+  meta = {
+    description = "Standalone header-based fortify-source implementation";
+    homepage = "https://git.2f30.org/fortify-headers";
+    license = lib.licenses.bsd0;
+    platforms = lib.platforms.all;
+    maintainers = with lib.maintainers; [ ris ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/fortify-headers/restore-macros.patch b/nixpkgs/pkgs/development/libraries/fortify-headers/restore-macros.patch
new file mode 100644
index 000000000000..f7d31a329e35
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fortify-headers/restore-macros.patch
@@ -0,0 +1,283 @@
+restore #undef'ed macro values after we're done
+
+some programs that define these miss them if removed
+
+push_macro and pop_macro pragmas allegedly well supported
+by gcc, clang and msvc
+
+--- a/include/fortify/poll.h
++++ b/include/fortify/poll.h
+@@ -29,6 +29,7 @@ __extension__
+ extern "C" {
+ #endif
+ 
++#pragma push_macro("poll")
+ #undef poll
+ 
+ _FORTIFY_FN(poll) int poll(struct pollfd * _FORTIFY_POS0 __f, nfds_t __n, int __s)
+@@ -40,6 +41,8 @@ _FORTIFY_FN(poll) int poll(struct pollfd * _FORTIFY_POS0 __f, nfds_t __n, int __
+ 	return __orig_poll(__f, __n, __s);
+ }
+ 
++#pragma pop_macro("poll")
++
+ #ifdef __cplusplus
+ }
+ #endif
+--- a/include/fortify/stdio.h
++++ b/include/fortify/stdio.h
+@@ -29,12 +29,19 @@ __extension__
+ extern "C" {
+ #endif
+ 
++#pragma push_macro("fgets")
+ #undef fgets
++#pragma push_macro("fread")
+ #undef fread
++#pragma push_macro("fwrite")
+ #undef fwrite
++#pragma push_macro("vsprintf")
+ #undef vsprintf
++#pragma push_macro("vsnprintf")
+ #undef vsnprintf
++#pragma push_macro("snprintf")
+ #undef snprintf
++#pragma push_macro("sprintf")
+ #undef sprintf
+ 
+ _FORTIFY_FN(fgets) char *fgets(char * _FORTIFY_POS0 __s, int __n, FILE *__f)
+@@ -140,6 +147,14 @@ _FORTIFY_FN(sprintf) int sprintf(char *__s, const char *__f, ...)
+ #endif /* __has_builtin(__builtin_va_arg_pack) */
+ #endif /* defined(__has_builtin) */
+ 
++#pragma pop_macro("fgets")
++#pragma pop_macro("fread")
++#pragma pop_macro("fwrite")
++#pragma pop_macro("vsprintf")
++#pragma pop_macro("vsnprintf")
++#pragma pop_macro("snprintf")
++#pragma pop_macro("sprintf")
++
+ #ifdef __cplusplus
+ }
+ #endif
+--- a/include/fortify/stdlib.h
++++ b/include/fortify/stdlib.h
+@@ -38,7 +38,10 @@ extern "C" {
+ 
+ /* FIXME clang */
+ #if (defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)) && !defined(__clang__)
++
++#pragma push_macro("realpath")
+ #undef realpath
++
+ _FORTIFY_FN(realpath) char *realpath(const char *__p, char *__r)
+ {
+ #ifndef PATH_MAX
+@@ -60,6 +63,9 @@ _FORTIFY_FN(realpath) char *realpath(const char *__p, char *__r)
+ 	return __orig_realpath(__p, __r);
+ #endif
+ }
++
++#pragma pop_macro("realpath")
++
+ #endif
+ 
+ #ifdef __cplusplus
+--- a/include/fortify/string.h
++++ b/include/fortify/string.h
+@@ -29,12 +29,19 @@ __extension__
+ extern "C" {
+ #endif
+ 
++#pragma push_macro("memcpy")
+ #undef memcpy
++#pragma push_macro("memmove")
+ #undef memmove
++#pragma push_macro("memset")
+ #undef memset
++#pragma push_macro("strcat")
+ #undef strcat
++#pragma push_macro("strcpy")
+ #undef strcpy
++#pragma push_macro("strncat")
+ #undef strncat
++#pragma push_macro("strncpy")
+ #undef strncpy
+ 
+ _FORTIFY_FN(memcpy) void *memcpy(void * _FORTIFY_POS0 __od,
+@@ -183,6 +190,14 @@ _FORTIFY_FN(strlcpy) size_t strlcpy(char * _FORTIFY_POS0 __d,
+ }
+ #endif
+ 
++#pragma pop_macro("memcpy")
++#pragma pop_macro("memmove")
++#pragma pop_macro("memset")
++#pragma pop_macro("strcat")
++#pragma pop_macro("strcpy")
++#pragma pop_macro("strncat")
++#pragma pop_macro("strncpy")
++
+ #ifdef __cplusplus
+ }
+ #endif
+--- a/include/fortify/strings.h
++++ b/include/fortify/strings.h
+@@ -29,8 +29,12 @@ extern "C" {
+ #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || defined(_POSIX_SOURCE) \
+  || (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE+0 < 200809L) \
+  || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE+0 < 700)
++
++#pragma push_macro("bcopy")
+ #undef bcopy
++#pragma push_macro("bzero")
+ #undef bzero
++
+ _FORTIFY_FN(bcopy) void bcopy(const void * _FORTIFY_POS0 __s,
+                               void * _FORTIFY_POS0 __d, size_t __n)
+ {
+@@ -52,6 +56,9 @@ _FORTIFY_FN(bzero) void bzero(void * _FORTIFY_POS0 __s, size_t __n)
+ }
+ #endif
+ 
++#pragma pop_macro("bcopy")
++#pragma pop_macro("bzero")
++
+ #ifdef __cplusplus
+ }
+ #endif
+--- a/include/fortify/sys/socket.h
++++ b/include/fortify/sys/socket.h
+@@ -29,9 +29,13 @@ __extension__
+ extern "C" {
+ #endif
+ 
++#pragma push_macro("recv")
+ #undef recv
++#pragma push_macro("recvfrom")
+ #undef recvfrom
++#pragma push_macro("send")
+ #undef send
++#pragma push_macro("sendto")
+ #undef sendto
+ 
+ _FORTIFY_FN(recv) ssize_t recv(int __f, void * _FORTIFY_POS0 __s, size_t __n,
+@@ -76,6 +80,11 @@ _FORTIFY_FN(sendto) ssize_t sendto(int __f, const void * _FORTIFY_POS0 __s,
+ 	return __orig_sendto(__f, __s, __n, __fl, __a, __l);
+ }
+ 
++#pragma push_macro("recv")
++#pragma push_macro("recvfrom")
++#pragma push_macro("send")
++#pragma push_macro("sendto")
++
+ #ifdef __cplusplus
+ }
+ #endif
+--- a/include/fortify/unistd.h
++++ b/include/fortify/unistd.h
+@@ -29,16 +29,27 @@ __extension__
+ extern "C" {
+ #endif
+ 
++#pragma push_macro("confstr")
+ #undef confstr
++#pragma push_macro("getcwd")
+ #undef getcwd
++#pragma push_macro("getgroups")
+ #undef getgroups
++#pragma push_macro("gethostname")
+ #undef gethostname
++#pragma push_macro("getlogin_r")
+ #undef getlogin_r
++#pragma push_macro("pread")
+ #undef pread
++#pragma push_macro("read")
+ #undef read
++#pragma push_macro("readlink")
+ #undef readlink
++#pragma push_macro("readlinkat")
+ #undef readlinkat
++#pragma push_macro("ttyname_r")
+ #undef ttyname_r
++#pragma push_macro("write")
+ #undef write
+ 
+ _FORTIFY_FN(confstr) size_t confstr(int __n, char * _FORTIFY_POS0 __s, size_t __l)
+@@ -158,6 +169,18 @@ _FORTIFY_FN(write) ssize_t write(int __f, const void * _FORTIFY_POS0 __s,
+ 	return __orig_write(__f, __s, __n);
+ }
+ 
++#pragma pop_macro("confstr")
++#pragma pop_macro("getcwd")
++#pragma pop_macro("getgroups")
++#pragma pop_macro("gethostname")
++#pragma pop_macro("getlogin_r")
++#pragma pop_macro("pread")
++#pragma pop_macro("read")
++#pragma pop_macro("readlink")
++#pragma pop_macro("readlinkat")
++#pragma pop_macro("ttyname_r")
++#pragma pop_macro("write")
++
+ #ifdef __cplusplus
+ }
+ #endif
+--- a/include/fortify/wchar.h
++++ b/include/fortify/wchar.h
+@@ -43,19 +43,33 @@ __extension__
+ extern "C" {
+ #endif
+ 
++#pragma push_macro("fgetws")
+ #undef fgetws
++#pragma push_macro("mbsrtowcs")
+ #undef mbsrtowcs
++#pragma push_macro("mbstowcs")
+ #undef mbstowcs
++#pragma push_macro("wcrtomb")
+ #undef wcrtomb
++#pragma push_macro("wcscat")
+ #undef wcscat
++#pragma push_macro("wcscpy")
+ #undef wcscpy
++#pragma push_macro("wcsncat")
+ #undef wcsncat
++#pragma push_macro("wcsncpy")
+ #undef wcsncpy
++#pragma push_macro("wcsrtombs")
+ #undef wcsrtombs
++#pragma push_macro("wcstombs")
+ #undef wcstombs
++#pragma push_macro("wctomb")
+ #undef wctomb
++#pragma push_macro("wmemcpy")
+ #undef wmemcpy
++#pragma push_macro("wmemmove")
+ #undef wmemmove
++#pragma push_macro("wmemset")
+ #undef wmemset
+ 
+ _FORTIFY_FN(fgetws) wchar_t *fgetws(wchar_t * _FORTIFY_POS0 __s,
+@@ -269,6 +283,21 @@ _FORTIFY_FN(wmemset) wchar_t *wmemset(wchar_t * _FORTIFY_POS0 __s,
+ 	return __orig_wmemset(__s, __c, __n);
+ }
+ 
++#pragma pop_macro("fgetws")
++#pragma pop_macro("mbsrtowcs")
++#pragma pop_macro("mbstowcs")
++#pragma pop_macro("wcrtomb")
++#pragma pop_macro("wcscat")
++#pragma pop_macro("wcscpy")
++#pragma pop_macro("wcsncat")
++#pragma pop_macro("wcsncpy")
++#pragma pop_macro("wcsrtombs")
++#pragma pop_macro("wcstombs")
++#pragma pop_macro("wctomb")
++#pragma pop_macro("wmemcpy")
++#pragma pop_macro("wmemmove")
++#pragma pop_macro("wmemset")
++
+ #ifdef __cplusplus
+ }
+ #endif
diff --git a/nixpkgs/pkgs/development/libraries/fortify-headers/wchar-imports-skip.patch b/nixpkgs/pkgs/development/libraries/fortify-headers/wchar-imports-skip.patch
new file mode 100644
index 000000000000..255ceba9f099
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fortify-headers/wchar-imports-skip.patch
@@ -0,0 +1,41 @@
+wchar.h: only include other headers if _FORTIFY_SOURCE is enabled
+
+unexpectedly including other headers can cause problems with
+sensitive/brittle code, particularly with alternative compilers
+(clang) which are already operating on the margins of what's
+supported/expected by some projects.
+
+having a way to almost entirely short-circuit these headers (by
+disabling _FORTIFY_SOURCE) is therefore important.
+
+--- a/include/fortify/wchar.h
++++ b/include/fortify/wchar.h
+@@ -20,21 +20,23 @@
+ #if !defined(__cplusplus) && !defined(__clang__)
+ __extension__
+ #endif
+-#include_next <limits.h>
++#include_next <wchar.h>
++
++#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && defined(__OPTIMIZE__) && __OPTIMIZE__ > 0
++
+ #if !defined(__cplusplus) && !defined(__clang__)
+ __extension__
+ #endif
+-#include_next <stdlib.h>
++#include_next <limits.h>
+ #if !defined(__cplusplus) && !defined(__clang__)
+ __extension__
+ #endif
+-#include_next <string.h>
++#include_next <stdlib.h>
+ #if !defined(__cplusplus) && !defined(__clang__)
+ __extension__
+ #endif
+-#include_next <wchar.h>
++#include_next <string.h>
+ 
+-#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && defined(__OPTIMIZE__) && __OPTIMIZE__ > 0
+ #include "fortify-headers.h"
+ 
+ #ifdef __cplusplus
diff --git a/nixpkgs/pkgs/development/libraries/fox/default.nix b/nixpkgs/pkgs/development/libraries/fox/default.nix
new file mode 100644
index 000000000000..49526b99c53b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fox/default.nix
@@ -0,0 +1,50 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, libpng
+, libjpeg
+, libtiff
+, zlib
+, bzip2
+, libGL
+, libGLU
+, libXcursor
+, libXext
+, libXrandr
+, libXft
+, CoreServices
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fox";
+  version = "1.7.81";
+
+  src = fetchurl {
+    url = "http://fox-toolkit.org/ftp/${pname}-${version}.tar.gz";
+    sha256 = "sha256-bu+IEqNkv9OAf96dPYre3CP759pjalVIbYyc3QSQW2w=";
+  };
+
+  buildInputs = [ libpng libjpeg libtiff zlib bzip2 libGL libGLU libXcursor libXext libXrandr libXft ]
+    ++ lib.optional stdenv.isDarwin CoreServices;
+
+  doCheck = true;
+
+  enableParallelBuilding = true;
+
+  hardeningDisable = [ "format" ];
+
+  meta = with lib; {
+    description = "C++ based class library for building Graphical User Interfaces";
+    longDescription = ''
+      FOX stands for Free Objects for X.
+      It is a C++ based class library for building Graphical User Interfaces.
+      Initially, it was developed for LINUX, but the scope of this project has in the course of time become somewhat more ambitious.
+      Current aims are to make FOX completely platform independent, and thus programs written against the FOX library will be only a compile away from running on a variety of platforms.
+    '';
+    homepage = "http://fox-toolkit.org";
+    license = licenses.lgpl3Plus;
+    maintainers = [];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/fox/fox-1.6.nix b/nixpkgs/pkgs/development/libraries/fox/fox-1.6.nix
new file mode 100644
index 000000000000..b5b86cbe48a0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fox/fox-1.6.nix
@@ -0,0 +1,55 @@
+{ lib
+, stdenv
+, fetchurl
+, libpng
+, libjpeg
+, libtiff
+, zlib
+, bzip2
+, libXcursor
+, libXrandr
+, libGLU
+, libGL
+, libXext
+, libXft
+, libXfixes
+, xinput
+, CoreServices
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fox";
+  version = "1.6.57";
+
+  src = fetchurl {
+    url = "ftp://ftp.fox-toolkit.org/pub/${pname}-${version}.tar.gz";
+    sha256 = "08w98m6wjadraw1pi13igzagly4b2nfa57kdqdnkjfhgkvg1bvv5";
+  };
+
+  buildInputs = [
+    libpng libjpeg libtiff zlib bzip2 libXcursor libXrandr
+    libXext libXft libGLU libGL libXfixes xinput
+  ] ++ lib.optional stdenv.isDarwin CoreServices;
+
+  doCheck = true;
+
+  enableParallelBuilding = true;
+
+  hardeningDisable = [ "format" ];
+
+  meta = {
+    broken = stdenv.isDarwin;
+    branch = "1.6";
+    description = "A C++ based class library for building Graphical User Interfaces";
+    longDescription = ''
+        FOX stands for Free Objects for X.
+        It is a C++ based class library for building Graphical User Interfaces.
+        Initially, it was developed for LINUX, but the scope of this project has in the course of time become somewhat more ambitious.
+        Current aims are to make FOX completely platform independent, and thus programs written against the FOX library will be only a compile away from running on a variety of platforms.
+      '';
+    homepage = "http://fox-toolkit.org";
+    license = lib.licenses.lgpl3;
+    maintainers = [];
+    platforms = lib.platforms.mesaPlatforms;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/fpattern/default.nix b/nixpkgs/pkgs/development/libraries/fpattern/default.nix
new file mode 100644
index 000000000000..e1b75f025c89
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fpattern/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, lib, fetchFromGitHub }:
+
+stdenv.mkDerivation (finalAttrs: {
+  version = "1.9";
+  pname = "fpattern";
+
+  src = fetchFromGitHub {
+    owner = "Loadmaster";
+    repo = "fpattern";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-/QvMQCmoocaXfDm3/c3IAPyfZqR6d7IiJ9UoFKZTpVI=";
+  };
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/include
+    cp *.c *.h $out/include
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/Loadmaster/fpattern";
+    description = "Filename pattern matching library functions for DOS, Windows, and Unix";
+    license = licenses.mit;
+    maintainers = with maintainers; [ hughobrien ];
+    platforms = with platforms; linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/fplll/20160331.nix b/nixpkgs/pkgs/development/libraries/fplll/20160331.nix
new file mode 100644
index 000000000000..6bb9570d998a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fplll/20160331.nix
@@ -0,0 +1,21 @@
+{lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, gettext, autoreconfHook
+, gmp, mpfr
+}:
+stdenv.mkDerivation rec {
+  pname = "fplll";
+  version = "20160331";
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = "11dea26c2f9396ffb7a7191aa371343f1f74c5c3";
+    sha256 = "1clxch9hbr30w6s84m2mprxv58adhg5qw6sa2p3jr1cy4r7r59ib";
+  };
+  nativeBuildInputs = [autoconf automake libtool gettext autoreconfHook];
+  buildInputs = [gmp mpfr];
+  meta = {
+    description = "Lattice algorithms using floating-point arithmetic";
+    license = lib.licenses.lgpl21Plus;
+    maintainers = [lib.maintainers.raskin];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/fplll/default.nix b/nixpkgs/pkgs/development/libraries/fplll/default.nix
new file mode 100644
index 000000000000..ab74a09d0795
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fplll/default.nix
@@ -0,0 +1,47 @@
+{ lib, stdenv
+, fetchFromGitHub
+, pkg-config
+, gettext
+, autoreconfHook
+, gmp
+, mpfr
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fplll";
+  version = "5.4.5";
+
+  src = fetchFromGitHub {
+    owner = "fplll";
+    repo = "fplll";
+    rev = version;
+    sha256 = "sha256-taSS7jpVyjVfNe6kSuUDXMD2PgKmtG64V5MjZyQzorI=";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+    gettext
+    autoreconfHook
+  ];
+
+  buildInputs = [
+    gmp
+    mpfr
+  ];
+
+  meta = with lib; {
+    description = "Lattice algorithms using floating-point arithmetic";
+    changelog = [
+      # Some release notes are added to the github tags, though they are not
+      # always complete.
+      "https://github.com/fplll/fplll/releases/tag/${version}"
+      # Releases are announced on this mailing list. Unfortunately it is not
+      # possible to generate a direct link to the most recent announcement, but
+      # this search should find it.
+      "https://groups.google.com/forum/#!searchin/fplll-devel/FPLLL$20${version}"
+    ];
+    license = licenses.lgpl21Plus;
+    maintainers = teams.sage.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/frame/default.nix b/nixpkgs/pkgs/development/libraries/frame/default.nix
new file mode 100644
index 000000000000..f0b37b7e633c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/frame/default.nix
@@ -0,0 +1,25 @@
+{ enableX11 ? true
+,  lib, stdenv, fetchurl, pkg-config, xorg }:
+
+stdenv.mkDerivation rec {
+  pname = "frame";
+  version = "2.5.0";
+  src = fetchurl {
+    url = "https://launchpad.net/frame/trunk/v${version}/+download/${pname}-${version}.tar.xz";
+    sha256 = "bc2a20cd3ac1e61fe0461bd3ee8cb250dbcc1fa511fad0686d267744e9c78f3a";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [
+    stdenv
+  ] ++ lib.optionals enableX11 [xorg.xorgserver xorg.libX11 xorg.libXext xorg.libXi];
+
+  configureFlags = lib.optional enableX11 "--with-x11";
+
+  meta = {
+    homepage = "https://launchpad.net/frame";
+    description = "Handles the buildup and synchronization of a set of simultaneous touches";
+    license = lib.licenses.gpl3;
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/freealut/default.nix b/nixpkgs/pkgs/development/libraries/freealut/default.nix
new file mode 100644
index 000000000000..c29899922979
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/freealut/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, darwin, fetchurl, openal
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "freealut";
+  version = "1.1.0";
+
+  src = fetchurl {
+    url = "http://www.openal.org/openal_webstf/downloads/freealut-${finalAttrs.version}.tar.gz";
+    sha256 = "0kzlil6112x2429nw6mycmif8y6bxr2cwjcvp18vh6s7g63ymlb0";
+  };
+
+  buildInputs = [ openal
+  ] ++ lib.optional stdenv.isDarwin
+    darwin.apple_sdk.frameworks.OpenAL
+  ;
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = {
+    homepage = "http://openal.org/";
+    description = "Free implementation of OpenAL's ALUT standard";
+    license = lib.licenses.lgpl2;
+    pkgConfigModules = [ "freealut" ];
+    platforms = lib.platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/freeglut/default.nix b/nixpkgs/pkgs/development/libraries/freeglut/default.nix
new file mode 100644
index 000000000000..69c3b65e4a51
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/freeglut/default.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, fetchurl, libICE, libXext, libXi, libXrandr, libXxf86vm, libGL, libGLU, cmake
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "freeglut";
+  version = "3.4.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/freeglut/freeglut-${finalAttrs.version}.tar.gz";
+    sha256 = "sha256-PAvLkV2bGAqX7a69ARt6HeVFg6g4ZE3NQrsOoMbz6uw=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ libICE libXext libXi libXrandr libXxf86vm libGL libGLU ];
+
+  cmakeFlags = lib.optionals stdenv.isDarwin [
+                 "-DOPENGL_INCLUDE_DIR=${libGL}/include"
+                 "-DOPENGL_gl_LIBRARY:FILEPATH=${libGL}/lib/libGL.dylib"
+                 "-DOPENGL_glu_LIBRARY:FILEPATH=${libGLU}/lib/libGLU.dylib"
+                 "-DFREEGLUT_BUILD_DEMOS:BOOL=OFF"
+                 "-DFREEGLUT_BUILD_STATIC:BOOL=OFF"
+               ];
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    description = "Create and manage windows containing OpenGL contexts";
+    longDescription = ''
+      FreeGLUT is an open source alternative to the OpenGL Utility Toolkit
+      (GLUT) library. GLUT (and hence FreeGLUT) allows the user to create and
+      manage windows containing OpenGL contexts on a wide range of platforms
+      and also read the mouse, keyboard and joystick functions. FreeGLUT is
+      intended to be a full replacement for GLUT, and has only a few
+      differences.
+    '';
+    homepage = "https://freeglut.sourceforge.net/";
+    license = licenses.mit;
+    pkgConfigModules = [ "glut" ];
+    platforms = platforms.all;
+    maintainers = [ maintainers.bjornfor ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/freeimage/default.nix b/nixpkgs/pkgs/development/libraries/freeimage/default.nix
new file mode 100644
index 000000000000..de1b616fc20a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/freeimage/default.nix
@@ -0,0 +1,78 @@
+{ lib, stdenv, fetchsvn, darwin, libtiff
+, libpng, zlib, libwebp, libraw, openexr, openjpeg
+, libjpeg, jxrlib, pkg-config
+, fixDarwinDylibNames, autoSignDarwinBinariesHook }:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "freeimage";
+  version = "unstable-2021-11-01";
+
+  src = fetchsvn {
+    url = "svn://svn.code.sf.net/p/freeimage/svn/";
+    rev = "1900";
+    sha256 = "rWoNlU/BWKZBPzRb1HqU6T0sT7aK6dpqKPe88+o/4sA=";
+  };
+
+  sourceRoot = "${finalAttrs.src.name}/FreeImage/trunk";
+
+  # Ensure that the bundled libraries are not used at all
+  prePatch = ''
+    rm -rf Source/Lib* Source/OpenEXR Source/ZLib
+  '';
+  patches = [
+    ./unbundle.diff
+    ./libtiff-4.4.0.diff
+  ];
+
+  postPatch = ''
+    # To support cross compilation, use the correct `pkg-config`.
+    substituteInPlace Makefile.fip \
+      --replace "pkg-config" "$PKG_CONFIG"
+    substituteInPlace Makefile.gnu \
+      --replace "pkg-config" "$PKG_CONFIG"
+  '' + lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) ''
+    # Upstream Makefile hardcodes i386 and x86_64 architectures only
+    substituteInPlace Makefile.osx --replace "x86_64" "arm64"
+  '';
+
+  nativeBuildInputs = [
+    pkg-config
+  ] ++ lib.optionals stdenv.isDarwin [
+    darwin.cctools
+    fixDarwinDylibNames
+  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
+    autoSignDarwinBinariesHook
+  ];
+  buildInputs = [ libtiff libtiff.dev_private libpng zlib libwebp libraw openexr openjpeg libjpeg libjpeg.dev_private jxrlib ];
+
+  postBuild = lib.optionalString (!stdenv.isDarwin) ''
+    make -f Makefile.fip
+  '';
+
+  INCDIR = "${placeholder "out"}/include";
+  INSTALLDIR = "${placeholder "out"}/lib";
+
+  preInstall = ''
+    mkdir -p $INCDIR $INSTALLDIR
+  ''
+  # Workaround for Makefiles.osx not using ?=
+  + lib.optionalString stdenv.isDarwin ''
+    makeFlagsArray+=( "INCDIR=$INCDIR" "INSTALLDIR=$INSTALLDIR" )
+  '';
+
+  postInstall = lib.optionalString (!stdenv.isDarwin) ''
+    make -f Makefile.fip install
+  '' + lib.optionalString stdenv.isDarwin ''
+    ln -s $out/lib/libfreeimage.3.dylib $out/lib/libfreeimage.dylib
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "Open Source library for accessing popular graphics image file formats";
+    homepage = "http://freeimage.sourceforge.net/";
+    license = "GPL";
+    maintainers = with lib.maintainers; [viric l-as];
+    platforms = with lib.platforms; unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/freeimage/libtiff-4.4.0.diff b/nixpkgs/pkgs/development/libraries/freeimage/libtiff-4.4.0.diff
new file mode 100644
index 000000000000..13abd5dd7089
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/freeimage/libtiff-4.4.0.diff
@@ -0,0 +1,15 @@
+Fix build with libtiff 4.4.0 by not using a private libtiff API.
+Patch by Kurt Schwehr: https://sourceforge.net/p/freeimage/discussion/36109/thread/2018fdc6e7/
+
+diff -ru a/Source/Metadata/XTIFF.cpp b/Source/Metadata/XTIFF.cpp
+--- a/Source/Metadata/XTIFF.cpp
++++ b/Source/Metadata/XTIFF.cpp
+@@ -749,7 +749,7 @@
+ 				continue;

+ 			}

+ 			// type of storage may differ (e.g. rationnal array vs float array type)

+-			if((unsigned)_TIFFDataSize(tif_tag_type) != FreeImage_TagDataWidth(tag_type)) {

++			if((unsigned)TIFFFieldSetGetSize(fld) != FreeImage_TagDataWidth(tag_type)) {

+ 				// skip tag or _TIFFmemcpy will fail

+ 				continue;

+ 			}

diff --git a/nixpkgs/pkgs/development/libraries/freeimage/unbundle.diff b/nixpkgs/pkgs/development/libraries/freeimage/unbundle.diff
new file mode 100644
index 000000000000..99a7cfb4ca35
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/freeimage/unbundle.diff
@@ -0,0 +1,584 @@
+diff --git a/Makefile.fip b/Makefile.fip
+index 660a0265..86b30401 100644
+--- a/Makefile.fip
++++ b/Makefile.fip
+@@ -11,32 +11,21 @@ INSTALLDIR ?= $(DESTDIR)/usr/lib
+ # Converts cr/lf to just lf
+ DOS2UNIX = dos2unix
+ 
+-LIBRARIES = -lstdc++
++LIBRARIES = -lstdc++ $(shell pkg-config --libs OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp libwebpmux zlib libjxr libjpeg)
+ 
+ MODULES = $(SRCS:.c=.o)
+ MODULES := $(MODULES:.cpp=.o)
+ 
++INCLUDE += $(shell pkg-config --cflags OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp libwebpmux zlib libjxr libjpeg)
++
+ # C flags
+ CFLAGS ?= -std=c99 -O3 -fPIC -fexceptions -fvisibility=hidden
+-# OpenJPEG
+-CFLAGS += -DOPJ_STATIC
+-# LibRaw
+-CFLAGS += -DNO_LCMS
+-# LibJXR
+-CFLAGS += -DDISABLE_PERF_MEASUREMENT -D__ANSI__
+ CFLAGS += $(INCLUDE)
+ 
+ # C++ flags
+ CXXFLAGS ?= -std=c++0x -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
+-# LibJXR
+-CXXFLAGS += -D__ANSI__
+ CXXFLAGS += $(INCLUDE)
+ 
+-ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64)
+-	CFLAGS += -fPIC
+-	CXXFLAGS += -fPIC
+-endif
+-
+ TARGET  = freeimageplus
+ STATICLIB = lib$(TARGET).a
+ SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).so
+@@ -76,10 +65,10 @@ $(SHAREDLIB): $(MODULES)
+ 
+ install:
+ 	install -d $(INCDIR) $(INSTALLDIR)
+-	install -m 644 -o root -g root $(HEADER) $(INCDIR)
+-	install -m 644 -o root -g root $(HEADERFIP) $(INCDIR)
+-	install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
+-	install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
++	install -m 644 $(HEADER) $(INCDIR)
++	install -m 644 $(HEADERFIP) $(INCDIR)
++	install -m 644 $(STATICLIB) $(INSTALLDIR)
++	install -m 755 $(SHAREDLIB) $(INSTALLDIR)
+ 	ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
+ 	ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)	
+ 
+diff --git a/Makefile.gnu b/Makefile.gnu
+index a4f26013..be954761 100644
+--- a/Makefile.gnu
++++ b/Makefile.gnu
+@@ -11,32 +11,21 @@ INSTALLDIR ?= $(DESTDIR)/usr/lib
+ # Converts cr/lf to just lf
+ DOS2UNIX = dos2unix
+ 
+-LIBRARIES = -lstdc++
++LIBRARIES = -lstdc++ $(shell pkg-config --libs OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp libwebpmux zlib libjxr libjpeg)
+ 
+ MODULES = $(SRCS:.c=.o)
+ MODULES := $(MODULES:.cpp=.o)
+ 
++INCLUDE += $(shell pkg-config --cflags OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp libwebpmux zlib libjxr libjpeg)
++
+ # C flags
+ CFLAGS ?= -std=c99 -O3 -fPIC -fexceptions -fvisibility=hidden
+-# OpenJPEG
+-CFLAGS += -DOPJ_STATIC
+-# LibRaw
+-CFLAGS += -DNO_LCMS
+-# LibJXR
+-CFLAGS += -DDISABLE_PERF_MEASUREMENT -D__ANSI__
+ CFLAGS += $(INCLUDE)
+ 
+ # C++ flags
+ CXXFLAGS ?= -std=c++0x -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
+-# LibJXR
+-CXXFLAGS += -D__ANSI__
+ CXXFLAGS += $(INCLUDE)
+ 
+-ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64)
+-	CFLAGS += -fPIC
+-	CXXFLAGS += -fPIC
+-endif
+-
+ TARGET  = freeimage
+ STATICLIB = lib$(TARGET).a
+ SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).so
+@@ -75,12 +64,11 @@ $(SHAREDLIB): $(MODULES)
+ 
+ install:
+ 	install -d $(INCDIR) $(INSTALLDIR)
+-	install -m 644 -o root -g root $(HEADER) $(INCDIR)
+-	install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
+-	install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
++	install -m 644 $(HEADER) $(INCDIR)
++	install -m 644 $(STATICLIB) $(INSTALLDIR)
++	install -m 755 $(SHAREDLIB) $(INSTALLDIR)
+ 	ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
+ 	ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)	
+-#	ldconfig
+ 
+ clean:
+ 	rm -f core Dist/*.* u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)
+diff --git a/Makefile.osx b/Makefile.osx
+index c39121db..3800e39d 100644
+--- a/Makefile.osx
++++ b/Makefile.osx
+@@ -10,24 +10,25 @@ MACOSX_SYSROOT = $(shell xcrun --show-sdk-path)
+ MACOSX_DEPLOYMENT_TARGET = 10.11
+ 
+ # General configuration variables:
+-CC_I386 = $(shell xcrun -find clang)
+-CC_X86_64 = $(shell xcrun -find clang)
+-CPP_I386 = $(shell xcrun -find clang++)
+-CPP_X86_64 = $(shell xcrun -find clang++)
++CC_I386 = clang
++CC_X86_64 = clang
++CPP_I386 = clang++
++CPP_X86_64 = clang++
+ MACOSX_DEPLOY = -mmacosx-version-min=$(MACOSX_DEPLOYMENT_TARGET)
+ COMPILERFLAGS = -Os -fexceptions -fvisibility=hidden -DNO_LCMS -D__ANSI__
+ COMPILERFLAGS_I386 = -arch i386
+ COMPILERFLAGS_X86_64 = -arch x86_64
+ COMPILERPPFLAGS = -Wno-ctor-dtor-privacy -D__ANSI__ -std=c++11 -stdlib=libc++ -Wc++11-narrowing
+-INCLUDE +=
+-INCLUDE_I386 = -isysroot $(MACOSX_SYSROOT)
+-INCLUDE_X86_64 = -isysroot $(MACOSX_SYSROOT)
++INCLUDE += $(shell pkg-config --cflags OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp libwebpmux zlib libjxr libjpeg)
++INCLUDE_I386 =
++INCLUDE_X86_64 =
+ CFLAGS_I386 = $(COMPILERFLAGS) $(COMPILERFLAGS_I386) $(INCLUDE) $(INCLUDE_I386) $(MACOSX_DEPLOY)
+ CFLAGS_X86_64 = $(COMPILERFLAGS) $(COMPILERFLAGS_X86_64) $(INCLUDE) $(INCLUDE_X86_64) $(MACOSX_DEPLOY)
+ CPPFLAGS_I386 = $(COMPILERPPFLAGS) $(CFLAGS_I386)
+ CPPFLAGS_X86_64 = $(COMPILERPPFLAGS) $(CFLAGS_X86_64)
+-LIBRARIES_I386 = $(MACOSX_DEPLOY) -Wl,-syslibroot $(MACOSX_SYSROOT)
+-LIBRARIES_X86_64 = $(MACOSX_DEPLOY) -Wl,-syslibroot $(MACOSX_SYSROOT)
++LIBS = $(shell pkg-config --libs OpenEXR libopenjp2 libraw libpng libtiff-4 libwebp libwebpmux zlib libjxr libjpeg)
++LIBRARIES_I386 = $(LIBS) $(MACOSX_DEPLOY)
++LIBRARIES_X86_64 = $(LIBS) $(MACOSX_DEPLOY)
+ LIBTOOL = libtool
+ LIPO = lipo
+ 
+@@ -57,7 +58,7 @@ dist: FreeImage
+ 	cp *.a Dist
+ 	cp Source/FreeImage.h Dist
+ 
+-FreeImage: $(STATICLIB)
++FreeImage: $(STATICLIB) $(SHAREDLIB)
+ 
+ $(STATICLIB): $(STATICLIB)-x86_64
+ 	cp -p $(STATICLIB)-x86_64 $(STATICLIB)
+@@ -84,13 +85,10 @@ $(STATICLIB)-i386: $(MODULES_I386)
+ $(STATICLIB)-x86_64: $(MODULES_X86_64)
+ 	$(LIBTOOL) -arch_only x86_64 -o $@ $(MODULES_X86_64)
+ 
+-$(SHAREDLIB): $(SHAREDLIB)-i386 $(SHAREDLIB)-x86_64
+-	$(LIPO) -create $(SHAREDLIB)-i386 $(SHAREDLIB)-x86_64 -output $(SHAREDLIB)
+-
+ $(SHAREDLIB)-i386: $(MODULES_I386)
+ 	$(CPP_I386) -arch i386 -dynamiclib $(LIBRARIES_I386) -o $@ $(MODULES_I386)
+ 
+-$(SHAREDLIB)-x86_64: $(MODULES_X86_64)
++$(SHAREDLIB): $(MODULES_X86_64)
+ 	$(CPP_X86_64) -arch x86_64 -dynamiclib $(LIBRARIES_X86_64) -o $@ $(MODULES_X86_64)
+ 
+ .c.o-i386:
+@@ -106,9 +104,8 @@ $(SHAREDLIB)-x86_64: $(MODULES_X86_64)
+ 	$(CPP_X86_64) $(CPPFLAGS_X86_64) -c $< -o $@
+ 
+ install:
+-	install -d -m 755 -o root -g wheel $(INCDIR) $(INSTALLDIR)
+-	install -m 644 -o root -g wheel $(HEADER) $(INCDIR)
+-	install -m 644 -o root -g wheel $(SHAREDLIB) $(STATICLIB) $(INSTALLDIR)
++	install $(HEADER) $(INCDIR)
++	install $(SHAREDLIB) $(STATICLIB) $(INSTALLDIR)
+ 	ranlib -sf $(INSTALLDIR)/$(STATICLIB)
+ 	ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(LIBNAME)
+ 
+diff --git a/Makefile.srcs b/Makefile.srcs
+index 692c6e56..212195b2 100644
+--- a/Makefile.srcs
++++ b/Makefile.srcs
+@@ -1,6 +1,6 @@
+ VER_MAJOR = 3
+ VER_MINOR = 19.0
+-SRCS = ./Source/FreeImage/BitmapAccess.cpp ./Source/FreeImage/ColorLookup.cpp ./Source/FreeImage/ConversionRGBA16.cpp ./Source/FreeImage/ConversionRGBAF.cpp ./Source/FreeImage/FreeImage.cpp ./Source/FreeImage/FreeImageC.c ./Source/FreeImage/FreeImageIO.cpp ./Source/FreeImage/GetType.cpp ./Source/FreeImage/LFPQuantizer.cpp ./Source/FreeImage/MemoryIO.cpp ./Source/FreeImage/PixelAccess.cpp ./Source/FreeImage/J2KHelper.cpp ./Source/FreeImage/MNGHelper.cpp ./Source/FreeImage/Plugin.cpp ./Source/FreeImage/PluginBMP.cpp ./Source/FreeImage/PluginCUT.cpp ./Source/FreeImage/PluginDDS.cpp ./Source/FreeImage/PluginEXR.cpp ./Source/FreeImage/PluginG3.cpp ./Source/FreeImage/PluginGIF.cpp ./Source/FreeImage/PluginHDR.cpp ./Source/FreeImage/PluginICO.cpp ./Source/FreeImage/PluginIFF.cpp ./Source/FreeImage/PluginJ2K.cpp ./Source/FreeImage/PluginJNG.cpp ./Source/FreeImage/PluginJP2.cpp ./Source/FreeImage/PluginJPEG.cpp ./Source/FreeImage/PluginJXR.cpp ./Source/FreeImage/PluginKOALA.cpp ./Source/FreeImage/PluginMNG.cpp ./Source/FreeImage/PluginPCD.cpp ./Source/FreeImage/PluginPCX.cpp ./Source/FreeImage/PluginPFM.cpp ./Source/FreeImage/PluginPICT.cpp ./Source/FreeImage/PluginPNG.cpp ./Source/FreeImage/PluginPNM.cpp ./Source/FreeImage/PluginPSD.cpp ./Source/FreeImage/PluginRAS.cpp ./Source/FreeImage/PluginRAW.cpp ./Source/FreeImage/PluginSGI.cpp ./Source/FreeImage/PluginTARGA.cpp ./Source/FreeImage/PluginTIFF.cpp ./Source/FreeImage/PluginWBMP.cpp ./Source/FreeImage/PluginWebP.cpp ./Source/FreeImage/PluginXBM.cpp ./Source/FreeImage/PluginXPM.cpp ./Source/FreeImage/PSDParser.cpp ./Source/FreeImage/TIFFLogLuv.cpp ./Source/FreeImage/Conversion.cpp ./Source/FreeImage/Conversion16_555.cpp ./Source/FreeImage/Conversion16_565.cpp ./Source/FreeImage/Conversion24.cpp ./Source/FreeImage/Conversion32.cpp ./Source/FreeImage/Conversion4.cpp ./Source/FreeImage/Conversion8.cpp ./Source/FreeImage/ConversionFloat.cpp ./Source/FreeImage/ConversionRGB16.cpp ./Source/FreeImage/ConversionRGBF.cpp ./Source/FreeImage/ConversionType.cpp ./Source/FreeImage/ConversionUINT16.cpp ./Source/FreeImage/Halftoning.cpp ./Source/FreeImage/tmoColorConvert.cpp ./Source/FreeImage/tmoDrago03.cpp ./Source/FreeImage/tmoFattal02.cpp ./Source/FreeImage/tmoReinhard05.cpp ./Source/FreeImage/ToneMapping.cpp ./Source/FreeImage/NNQuantizer.cpp ./Source/FreeImage/WuQuantizer.cpp ./Source/FreeImage/CacheFile.cpp ./Source/FreeImage/MultiPage.cpp ./Source/FreeImage/ZLibInterface.cpp ./Source/Metadata/Exif.cpp ./Source/Metadata/FIRational.cpp ./Source/Metadata/FreeImageTag.cpp ./Source/Metadata/IPTC.cpp ./Source/Metadata/TagConversion.cpp ./Source/Metadata/TagLib.cpp ./Source/Metadata/XTIFF.cpp ./Source/FreeImageToolkit/Background.cpp ./Source/FreeImageToolkit/BSplineRotate.cpp ./Source/FreeImageToolkit/Channels.cpp ./Source/FreeImageToolkit/ClassicRotate.cpp ./Source/FreeImageToolkit/Colors.cpp ./Source/FreeImageToolkit/CopyPaste.cpp ./Source/FreeImageToolkit/Display.cpp ./Source/FreeImageToolkit/Flip.cpp ./Source/FreeImageToolkit/JPEGTransform.cpp ./Source/FreeImageToolkit/MultigridPoissonSolver.cpp ./Source/FreeImageToolkit/Rescale.cpp ./Source/FreeImageToolkit/Resize.cpp Source/LibJPEG/jaricom.c Source/LibJPEG/jcapimin.c Source/LibJPEG/jcapistd.c Source/LibJPEG/jcarith.c Source/LibJPEG/jccoefct.c Source/LibJPEG/jccolor.c Source/LibJPEG/jcdctmgr.c Source/LibJPEG/jchuff.c Source/LibJPEG/jcinit.c Source/LibJPEG/jcmainct.c Source/LibJPEG/jcmarker.c Source/LibJPEG/jcmaster.c Source/LibJPEG/jcomapi.c Source/LibJPEG/jcparam.c Source/LibJPEG/jcprepct.c Source/LibJPEG/jcsample.c Source/LibJPEG/jctrans.c Source/LibJPEG/jdapimin.c Source/LibJPEG/jdapistd.c Source/LibJPEG/jdarith.c Source/LibJPEG/jdatadst.c Source/LibJPEG/jdatasrc.c Source/LibJPEG/jdcoefct.c Source/LibJPEG/jdcolor.c Source/LibJPEG/jddctmgr.c Source/LibJPEG/jdhuff.c Source/LibJPEG/jdinput.c Source/LibJPEG/jdmainct.c Source/LibJPEG/jdmarker.c Source/LibJPEG/jdmaster.c Source/LibJPEG/jdmerge.c Source/LibJPEG/jdpostct.c Source/LibJPEG/jdsample.c Source/LibJPEG/jdtrans.c Source/LibJPEG/jerror.c Source/LibJPEG/jfdctflt.c Source/LibJPEG/jfdctfst.c Source/LibJPEG/jfdctint.c Source/LibJPEG/jidctflt.c Source/LibJPEG/jidctfst.c Source/LibJPEG/jidctint.c Source/LibJPEG/jmemmgr.c Source/LibJPEG/jmemnobs.c Source/LibJPEG/jquant1.c Source/LibJPEG/jquant2.c Source/LibJPEG/jutils.c Source/LibJPEG/transupp.c Source/LibPNG/png.c Source/LibPNG/pngerror.c Source/LibPNG/pngget.c Source/LibPNG/pngmem.c Source/LibPNG/pngpread.c Source/LibPNG/pngread.c Source/LibPNG/pngrio.c Source/LibPNG/pngrtran.c Source/LibPNG/pngrutil.c Source/LibPNG/pngset.c Source/LibPNG/pngtrans.c Source/LibPNG/pngwio.c Source/LibPNG/pngwrite.c Source/LibPNG/pngwtran.c Source/LibPNG/pngwutil.c Source/LibTIFF4/tif_aux.c Source/LibTIFF4/tif_close.c Source/LibTIFF4/tif_codec.c Source/LibTIFF4/tif_color.c Source/LibTIFF4/tif_compress.c Source/LibTIFF4/tif_dir.c Source/LibTIFF4/tif_dirinfo.c Source/LibTIFF4/tif_dirread.c Source/LibTIFF4/tif_dirwrite.c Source/LibTIFF4/tif_dumpmode.c Source/LibTIFF4/tif_error.c Source/LibTIFF4/tif_extension.c Source/LibTIFF4/tif_fax3.c Source/LibTIFF4/tif_fax3sm.c Source/LibTIFF4/tif_flush.c Source/LibTIFF4/tif_getimage.c Source/LibTIFF4/tif_jpeg.c Source/LibTIFF4/tif_lerc.c Source/LibTIFF4/tif_luv.c Source/LibTIFF4/tif_lzw.c Source/LibTIFF4/tif_next.c Source/LibTIFF4/tif_ojpeg.c Source/LibTIFF4/tif_open.c Source/LibTIFF4/tif_packbits.c Source/LibTIFF4/tif_pixarlog.c Source/LibTIFF4/tif_predict.c Source/LibTIFF4/tif_print.c Source/LibTIFF4/tif_read.c Source/LibTIFF4/tif_strip.c Source/LibTIFF4/tif_swab.c Source/LibTIFF4/tif_thunder.c Source/LibTIFF4/tif_tile.c Source/LibTIFF4/tif_version.c Source/LibTIFF4/tif_warning.c Source/LibTIFF4/tif_webp.c Source/LibTIFF4/tif_write.c Source/LibTIFF4/tif_zip.c Source/ZLib/adler32.c Source/ZLib/compress.c Source/ZLib/crc32.c Source/ZLib/deflate.c Source/ZLib/gzclose.c Source/ZLib/gzlib.c Source/ZLib/gzread.c Source/ZLib/gzwrite.c Source/ZLib/infback.c Source/ZLib/inffast.c Source/ZLib/inflate.c Source/ZLib/inftrees.c Source/ZLib/trees.c Source/ZLib/uncompr.c Source/ZLib/zutil.c Source/LibOpenJPEG/bio.c Source/LibOpenJPEG/cio.c Source/LibOpenJPEG/dwt.c Source/LibOpenJPEG/event.c Source/LibOpenJPEG/function_list.c Source/LibOpenJPEG/image.c Source/LibOpenJPEG/invert.c Source/LibOpenJPEG/j2k.c Source/LibOpenJPEG/jp2.c Source/LibOpenJPEG/mct.c Source/LibOpenJPEG/mqc.c Source/LibOpenJPEG/openjpeg.c Source/LibOpenJPEG/opj_clock.c Source/LibOpenJPEG/pi.c Source/LibOpenJPEG/raw.c Source/LibOpenJPEG/t1.c Source/LibOpenJPEG/t2.c Source/LibOpenJPEG/tcd.c Source/LibOpenJPEG/tgt.c Source/OpenEXR/IexMath/IexMathFpu.cpp Source/OpenEXR/IlmImf/b44ExpLogTable.cpp Source/OpenEXR/IlmImf/ImfAcesFile.cpp Source/OpenEXR/IlmImf/ImfAttribute.cpp Source/OpenEXR/IlmImf/ImfB44Compressor.cpp Source/OpenEXR/IlmImf/ImfBoxAttribute.cpp Source/OpenEXR/IlmImf/ImfChannelList.cpp Source/OpenEXR/IlmImf/ImfChannelListAttribute.cpp Source/OpenEXR/IlmImf/ImfChromaticities.cpp Source/OpenEXR/IlmImf/ImfChromaticitiesAttribute.cpp Source/OpenEXR/IlmImf/ImfCompositeDeepScanLine.cpp Source/OpenEXR/IlmImf/ImfCompressionAttribute.cpp Source/OpenEXR/IlmImf/ImfCompressor.cpp Source/OpenEXR/IlmImf/ImfConvert.cpp Source/OpenEXR/IlmImf/ImfCRgbaFile.cpp Source/OpenEXR/IlmImf/ImfDeepCompositing.cpp Source/OpenEXR/IlmImf/ImfDeepFrameBuffer.cpp Source/OpenEXR/IlmImf/ImfDeepImageStateAttribute.cpp Source/OpenEXR/IlmImf/ImfDeepScanLineInputFile.cpp Source/OpenEXR/IlmImf/ImfDeepScanLineInputPart.cpp Source/OpenEXR/IlmImf/ImfDeepScanLineOutputFile.cpp Source/OpenEXR/IlmImf/ImfDeepScanLineOutputPart.cpp Source/OpenEXR/IlmImf/ImfDeepTiledInputFile.cpp Source/OpenEXR/IlmImf/ImfDeepTiledInputPart.cpp Source/OpenEXR/IlmImf/ImfDeepTiledOutputFile.cpp Source/OpenEXR/IlmImf/ImfDeepTiledOutputPart.cpp Source/OpenEXR/IlmImf/ImfDoubleAttribute.cpp Source/OpenEXR/IlmImf/ImfDwaCompressor.cpp Source/OpenEXR/IlmImf/ImfEnvmap.cpp Source/OpenEXR/IlmImf/ImfEnvmapAttribute.cpp Source/OpenEXR/IlmImf/ImfFastHuf.cpp Source/OpenEXR/IlmImf/ImfFloatAttribute.cpp Source/OpenEXR/IlmImf/ImfFloatVectorAttribute.cpp Source/OpenEXR/IlmImf/ImfFrameBuffer.cpp Source/OpenEXR/IlmImf/ImfFramesPerSecond.cpp Source/OpenEXR/IlmImf/ImfGenericInputFile.cpp Source/OpenEXR/IlmImf/ImfGenericOutputFile.cpp Source/OpenEXR/IlmImf/ImfHeader.cpp Source/OpenEXR/IlmImf/ImfHuf.cpp Source/OpenEXR/IlmImf/ImfInputFile.cpp Source/OpenEXR/IlmImf/ImfInputPart.cpp Source/OpenEXR/IlmImf/ImfInputPartData.cpp Source/OpenEXR/IlmImf/ImfIntAttribute.cpp Source/OpenEXR/IlmImf/ImfIO.cpp Source/OpenEXR/IlmImf/ImfKeyCode.cpp Source/OpenEXR/IlmImf/ImfKeyCodeAttribute.cpp Source/OpenEXR/IlmImf/ImfLineOrderAttribute.cpp Source/OpenEXR/IlmImf/ImfLut.cpp Source/OpenEXR/IlmImf/ImfMatrixAttribute.cpp Source/OpenEXR/IlmImf/ImfMisc.cpp Source/OpenEXR/IlmImf/ImfMultiPartInputFile.cpp Source/OpenEXR/IlmImf/ImfMultiPartOutputFile.cpp Source/OpenEXR/IlmImf/ImfMultiView.cpp Source/OpenEXR/IlmImf/ImfOpaqueAttribute.cpp Source/OpenEXR/IlmImf/ImfOutputFile.cpp Source/OpenEXR/IlmImf/ImfOutputPart.cpp Source/OpenEXR/IlmImf/ImfOutputPartData.cpp Source/OpenEXR/IlmImf/ImfPartType.cpp Source/OpenEXR/IlmImf/ImfPizCompressor.cpp Source/OpenEXR/IlmImf/ImfPreviewImage.cpp Source/OpenEXR/IlmImf/ImfPreviewImageAttribute.cpp Source/OpenEXR/IlmImf/ImfPxr24Compressor.cpp Source/OpenEXR/IlmImf/ImfRational.cpp Source/OpenEXR/IlmImf/ImfRationalAttribute.cpp Source/OpenEXR/IlmImf/ImfRgbaFile.cpp Source/OpenEXR/IlmImf/ImfRgbaYca.cpp Source/OpenEXR/IlmImf/ImfRle.cpp Source/OpenEXR/IlmImf/ImfRleCompressor.cpp Source/OpenEXR/IlmImf/ImfScanLineInputFile.cpp Source/OpenEXR/IlmImf/ImfStandardAttributes.cpp Source/OpenEXR/IlmImf/ImfStdIO.cpp Source/OpenEXR/IlmImf/ImfStringAttribute.cpp Source/OpenEXR/IlmImf/ImfStringVectorAttribute.cpp Source/OpenEXR/IlmImf/ImfSystemSpecific.cpp Source/OpenEXR/IlmImf/ImfTestFile.cpp Source/OpenEXR/IlmImf/ImfThreading.cpp Source/OpenEXR/IlmImf/ImfTileDescriptionAttribute.cpp Source/OpenEXR/IlmImf/ImfTiledInputFile.cpp Source/OpenEXR/IlmImf/ImfTiledInputPart.cpp Source/OpenEXR/IlmImf/ImfTiledMisc.cpp Source/OpenEXR/IlmImf/ImfTiledOutputFile.cpp Source/OpenEXR/IlmImf/ImfTiledOutputPart.cpp Source/OpenEXR/IlmImf/ImfTiledRgbaFile.cpp Source/OpenEXR/IlmImf/ImfTileOffsets.cpp Source/OpenEXR/IlmImf/ImfTimeCode.cpp Source/OpenEXR/IlmImf/ImfTimeCodeAttribute.cpp Source/OpenEXR/IlmImf/ImfVecAttribute.cpp Source/OpenEXR/IlmImf/ImfVersion.cpp Source/OpenEXR/IlmImf/ImfWav.cpp Source/OpenEXR/IlmImf/ImfZip.cpp Source/OpenEXR/IlmImf/ImfZipCompressor.cpp Source/OpenEXR/Imath/ImathBox.cpp Source/OpenEXR/Imath/ImathColorAlgo.cpp Source/OpenEXR/Imath/ImathFun.cpp Source/OpenEXR/Imath/ImathMatrixAlgo.cpp Source/OpenEXR/Imath/ImathRandom.cpp Source/OpenEXR/Imath/ImathShear.cpp Source/OpenEXR/Imath/ImathVec.cpp Source/OpenEXR/Iex/IexBaseExc.cpp Source/OpenEXR/Iex/IexThrowErrnoExc.cpp Source/OpenEXR/Half/half.cpp Source/OpenEXR/IlmThread/IlmThread.cpp Source/OpenEXR/IlmThread/IlmThreadMutex.cpp Source/OpenEXR/IlmThread/IlmThreadPool.cpp Source/OpenEXR/IlmThread/IlmThreadSemaphore.cpp Source/OpenEXR/IexMath/IexMathFloatExc.cpp Source/LibRawLite/src/decoders/canon_600.cpp Source/LibRawLite/src/decoders/crx.cpp Source/LibRawLite/src/decoders/decoders_dcraw.cpp Source/LibRawLite/src/decoders/decoders_libraw.cpp Source/LibRawLite/src/decoders/decoders_libraw_dcrdefs.cpp Source/LibRawLite/src/decoders/dng.cpp Source/LibRawLite/src/decoders/fp_dng.cpp Source/LibRawLite/src/decoders/fuji_compressed.cpp Source/LibRawLite/src/decoders/generic.cpp Source/LibRawLite/src/decoders/kodak_decoders.cpp Source/LibRawLite/src/decoders/load_mfbacks.cpp Source/LibRawLite/src/decoders/smal.cpp Source/LibRawLite/src/decoders/unpack.cpp Source/LibRawLite/src/decoders/unpack_thumb.cpp Source/LibRawLite/src/demosaic/aahd_demosaic.cpp Source/LibRawLite/src/demosaic/ahd_demosaic.cpp Source/LibRawLite/src/demosaic/dcb_demosaic.cpp Source/LibRawLite/src/demosaic/dht_demosaic.cpp Source/LibRawLite/src/demosaic/misc_demosaic.cpp Source/LibRawLite/src/demosaic/xtrans_demosaic.cpp Source/LibRawLite/src/integration/dngsdk_glue.cpp Source/LibRawLite/src/integration/rawspeed_glue.cpp Source/LibRawLite/src/libraw_datastream.cpp Source/LibRawLite/src/metadata/adobepano.cpp Source/LibRawLite/src/metadata/canon.cpp Source/LibRawLite/src/metadata/ciff.cpp Source/LibRawLite/src/metadata/cr3_parser.cpp Source/LibRawLite/src/metadata/epson.cpp Source/LibRawLite/src/metadata/exif_gps.cpp Source/LibRawLite/src/metadata/fuji.cpp Source/LibRawLite/src/metadata/hasselblad_model.cpp Source/LibRawLite/src/metadata/identify.cpp Source/LibRawLite/src/metadata/identify_tools.cpp Source/LibRawLite/src/metadata/kodak.cpp Source/LibRawLite/src/metadata/leica.cpp Source/LibRawLite/src/metadata/makernotes.cpp Source/LibRawLite/src/metadata/mediumformat.cpp Source/LibRawLite/src/metadata/minolta.cpp Source/LibRawLite/src/metadata/misc_parsers.cpp Source/LibRawLite/src/metadata/nikon.cpp Source/LibRawLite/src/metadata/normalize_model.cpp Source/LibRawLite/src/metadata/olympus.cpp Source/LibRawLite/src/metadata/p1.cpp Source/LibRawLite/src/metadata/pentax.cpp Source/LibRawLite/src/metadata/samsung.cpp Source/LibRawLite/src/metadata/sony.cpp Source/LibRawLite/src/metadata/tiff.cpp Source/LibRawLite/src/postprocessing/aspect_ratio.cpp Source/LibRawLite/src/postprocessing/dcraw_process.cpp Source/LibRawLite/src/postprocessing/mem_image.cpp Source/LibRawLite/src/postprocessing/postprocessing_aux.cpp Source/LibRawLite/src/postprocessing/postprocessing_utils.cpp Source/LibRawLite/src/postprocessing/postprocessing_utils_dcrdefs.cpp Source/LibRawLite/src/preprocessing/ext_preprocess.cpp Source/LibRawLite/src/preprocessing/raw2image.cpp Source/LibRawLite/src/preprocessing/subtract_black.cpp Source/LibRawLite/src/tables/cameralist.cpp Source/LibRawLite/src/tables/colorconst.cpp Source/LibRawLite/src/tables/colordata.cpp Source/LibRawLite/src/tables/wblists.cpp Source/LibRawLite/src/utils/curves.cpp Source/LibRawLite/src/utils/decoder_info.cpp Source/LibRawLite/src/utils/init_close_utils.cpp Source/LibRawLite/src/utils/open.cpp Source/LibRawLite/src/utils/phaseone_processing.cpp Source/LibRawLite/src/utils/read_utils.cpp Source/LibRawLite/src/utils/thumb_utils.cpp Source/LibRawLite/src/utils/utils_dcraw.cpp Source/LibRawLite/src/utils/utils_libraw.cpp Source/LibRawLite/src/write/file_write.cpp Source/LibRawLite/src/x3f/x3f_parse_process.cpp Source/LibRawLite/src/x3f/x3f_utils_patched.cpp Source/LibWebP/src/dec/alpha_dec.c Source/LibWebP/src/dec/buffer_dec.c Source/LibWebP/src/dec/frame_dec.c Source/LibWebP/src/dec/idec_dec.c Source/LibWebP/src/dec/io_dec.c Source/LibWebP/src/dec/quant_dec.c Source/LibWebP/src/dec/tree_dec.c Source/LibWebP/src/dec/vp8l_dec.c Source/LibWebP/src/dec/vp8_dec.c Source/LibWebP/src/dec/webp_dec.c Source/LibWebP/src/demux/anim_decode.c Source/LibWebP/src/demux/demux.c Source/LibWebP/src/dsp/alpha_processing.c Source/LibWebP/src/dsp/alpha_processing_mips_dsp_r2.c Source/LibWebP/src/dsp/alpha_processing_neon.c Source/LibWebP/src/dsp/alpha_processing_sse2.c Source/LibWebP/src/dsp/alpha_processing_sse41.c Source/LibWebP/src/dsp/cost.c Source/LibWebP/src/dsp/cost_mips32.c Source/LibWebP/src/dsp/cost_mips_dsp_r2.c Source/LibWebP/src/dsp/cost_neon.c Source/LibWebP/src/dsp/cost_sse2.c Source/LibWebP/src/dsp/cpu.c Source/LibWebP/src/dsp/dec.c Source/LibWebP/src/dsp/dec_clip_tables.c Source/LibWebP/src/dsp/dec_mips32.c Source/LibWebP/src/dsp/dec_mips_dsp_r2.c Source/LibWebP/src/dsp/dec_msa.c Source/LibWebP/src/dsp/dec_neon.c Source/LibWebP/src/dsp/dec_sse2.c Source/LibWebP/src/dsp/dec_sse41.c Source/LibWebP/src/dsp/enc.c Source/LibWebP/src/dsp/enc_avx2.c Source/LibWebP/src/dsp/enc_mips32.c Source/LibWebP/src/dsp/enc_mips_dsp_r2.c Source/LibWebP/src/dsp/enc_msa.c Source/LibWebP/src/dsp/enc_neon.c Source/LibWebP/src/dsp/enc_sse2.c Source/LibWebP/src/dsp/enc_sse41.c Source/LibWebP/src/dsp/filters.c Source/LibWebP/src/dsp/filters_mips_dsp_r2.c Source/LibWebP/src/dsp/filters_msa.c Source/LibWebP/src/dsp/filters_neon.c Source/LibWebP/src/dsp/filters_sse2.c Source/LibWebP/src/dsp/lossless.c Source/LibWebP/src/dsp/lossless_enc.c Source/LibWebP/src/dsp/lossless_enc_mips32.c Source/LibWebP/src/dsp/lossless_enc_mips_dsp_r2.c Source/LibWebP/src/dsp/lossless_enc_msa.c Source/LibWebP/src/dsp/lossless_enc_neon.c Source/LibWebP/src/dsp/lossless_enc_sse2.c Source/LibWebP/src/dsp/lossless_enc_sse41.c Source/LibWebP/src/dsp/lossless_mips_dsp_r2.c Source/LibWebP/src/dsp/lossless_msa.c Source/LibWebP/src/dsp/lossless_neon.c Source/LibWebP/src/dsp/lossless_sse2.c Source/LibWebP/src/dsp/lossless_sse41.c Source/LibWebP/src/dsp/rescaler.c Source/LibWebP/src/dsp/rescaler_mips32.c Source/LibWebP/src/dsp/rescaler_mips_dsp_r2.c Source/LibWebP/src/dsp/rescaler_msa.c Source/LibWebP/src/dsp/rescaler_neon.c Source/LibWebP/src/dsp/rescaler_sse2.c Source/LibWebP/src/dsp/ssim.c Source/LibWebP/src/dsp/ssim_sse2.c Source/LibWebP/src/dsp/upsampling.c Source/LibWebP/src/dsp/upsampling_mips_dsp_r2.c Source/LibWebP/src/dsp/upsampling_msa.c Source/LibWebP/src/dsp/upsampling_neon.c Source/LibWebP/src/dsp/upsampling_sse2.c Source/LibWebP/src/dsp/upsampling_sse41.c Source/LibWebP/src/dsp/yuv.c Source/LibWebP/src/dsp/yuv_mips32.c Source/LibWebP/src/dsp/yuv_mips_dsp_r2.c Source/LibWebP/src/dsp/yuv_neon.c Source/LibWebP/src/dsp/yuv_sse2.c Source/LibWebP/src/dsp/yuv_sse41.c Source/LibWebP/src/enc/alpha_enc.c Source/LibWebP/src/enc/analysis_enc.c Source/LibWebP/src/enc/backward_references_cost_enc.c Source/LibWebP/src/enc/backward_references_enc.c Source/LibWebP/src/enc/config_enc.c Source/LibWebP/src/enc/cost_enc.c Source/LibWebP/src/enc/filter_enc.c Source/LibWebP/src/enc/frame_enc.c Source/LibWebP/src/enc/histogram_enc.c Source/LibWebP/src/enc/iterator_enc.c Source/LibWebP/src/enc/near_lossless_enc.c Source/LibWebP/src/enc/picture_csp_enc.c Source/LibWebP/src/enc/picture_enc.c Source/LibWebP/src/enc/picture_psnr_enc.c Source/LibWebP/src/enc/picture_rescale_enc.c Source/LibWebP/src/enc/picture_tools_enc.c Source/LibWebP/src/enc/predictor_enc.c Source/LibWebP/src/enc/quant_enc.c Source/LibWebP/src/enc/syntax_enc.c Source/LibWebP/src/enc/token_enc.c Source/LibWebP/src/enc/tree_enc.c Source/LibWebP/src/enc/vp8l_enc.c Source/LibWebP/src/enc/webp_enc.c Source/LibWebP/src/mux/anim_encode.c Source/LibWebP/src/mux/muxedit.c Source/LibWebP/src/mux/muxinternal.c Source/LibWebP/src/mux/muxread.c Source/LibWebP/src/utils/bit_reader_utils.c Source/LibWebP/src/utils/bit_writer_utils.c Source/LibWebP/src/utils/color_cache_utils.c Source/LibWebP/src/utils/filters_utils.c Source/LibWebP/src/utils/huffman_encode_utils.c Source/LibWebP/src/utils/huffman_utils.c Source/LibWebP/src/utils/quant_levels_dec_utils.c Source/LibWebP/src/utils/quant_levels_utils.c Source/LibWebP/src/utils/random_utils.c Source/LibWebP/src/utils/rescaler_utils.c Source/LibWebP/src/utils/thread_utils.c Source/LibWebP/src/utils/utils.c Source/LibJXR/image/decode/decode.c Source/LibJXR/image/decode/JXRTranscode.c Source/LibJXR/image/decode/postprocess.c Source/LibJXR/image/decode/segdec.c Source/LibJXR/image/decode/strdec.c Source/LibJXR/image/decode/strdec_x86.c Source/LibJXR/image/decode/strInvTransform.c Source/LibJXR/image/decode/strPredQuantDec.c Source/LibJXR/image/encode/encode.c Source/LibJXR/image/encode/segenc.c Source/LibJXR/image/encode/strenc.c Source/LibJXR/image/encode/strenc_x86.c Source/LibJXR/image/encode/strFwdTransform.c Source/LibJXR/image/encode/strPredQuantEnc.c Source/LibJXR/image/sys/adapthuff.c Source/LibJXR/image/sys/image.c Source/LibJXR/image/sys/strcodec.c Source/LibJXR/image/sys/strPredQuant.c Source/LibJXR/image/sys/strTransform.c Source/LibJXR/jxrgluelib/JXRGlue.c Source/LibJXR/jxrgluelib/JXRGlueJxr.c Source/LibJXR/jxrgluelib/JXRGluePFC.c Source/LibJXR/jxrgluelib/JXRMeta.c 
+-INCLS = ./Dist/FreeImage.h ./Examples/Generic/FIIO_Mem.h ./Examples/OpenGL/TextureManager/TextureManager.h ./Examples/Plugin/PluginCradle.h ./Source/CacheFile.h ./Source/FreeImage/J2KHelper.h ./Source/FreeImage/PSDParser.h ./Source/FreeImage.h ./Source/FreeImageIO.h ./Source/FreeImageToolkit/Filters.h ./Source/FreeImageToolkit/Resize.h ./Source/LibJPEG/cderror.h ./Source/LibJPEG/cdjpeg.h ./Source/LibJPEG/jconfig.h ./Source/LibJPEG/jdct.h ./Source/LibJPEG/jerror.h ./Source/LibJPEG/jinclude.h ./Source/LibJPEG/jmemsys.h ./Source/LibJPEG/jmorecfg.h ./Source/LibJPEG/jpegint.h ./Source/LibJPEG/jpeglib.h ./Source/LibJPEG/jversion.h ./Source/LibJPEG/transupp.h ./Source/LibJXR/common/include/guiddef.h ./Source/LibJXR/common/include/wmsal.h ./Source/LibJXR/common/include/wmspecstring.h ./Source/LibJXR/common/include/wmspecstrings_adt.h ./Source/LibJXR/common/include/wmspecstrings_strict.h ./Source/LibJXR/common/include/wmspecstrings_undef.h ./Source/LibJXR/image/decode/decode.h ./Source/LibJXR/image/encode/encode.h ./Source/LibJXR/image/sys/ansi.h ./Source/LibJXR/image/sys/common.h ./Source/LibJXR/image/sys/perfTimer.h ./Source/LibJXR/image/sys/strcodec.h ./Source/LibJXR/image/sys/strTransform.h ./Source/LibJXR/image/sys/windowsmediaphoto.h ./Source/LibJXR/image/sys/xplatform_image.h ./Source/LibJXR/image/x86/x86.h ./Source/LibJXR/jxrgluelib/JXRGlue.h ./Source/LibJXR/jxrgluelib/JXRMeta.h ./Source/LibOpenJPEG/bio.h ./Source/LibOpenJPEG/cidx_manager.h ./Source/LibOpenJPEG/cio.h ./Source/LibOpenJPEG/dwt.h ./Source/LibOpenJPEG/event.h ./Source/LibOpenJPEG/function_list.h ./Source/LibOpenJPEG/image.h ./Source/LibOpenJPEG/indexbox_manager.h ./Source/LibOpenJPEG/invert.h ./Source/LibOpenJPEG/j2k.h ./Source/LibOpenJPEG/jp2.h ./Source/LibOpenJPEG/mct.h ./Source/LibOpenJPEG/mqc.h ./Source/LibOpenJPEG/openjpeg.h ./Source/LibOpenJPEG/opj_clock.h ./Source/LibOpenJPEG/opj_codec.h ./Source/LibOpenJPEG/opj_config.h ./Source/LibOpenJPEG/opj_config_private.h ./Source/LibOpenJPEG/opj_includes.h ./Source/LibOpenJPEG/opj_intmath.h ./Source/LibOpenJPEG/opj_inttypes.h ./Source/LibOpenJPEG/opj_malloc.h ./Source/LibOpenJPEG/opj_stdint.h ./Source/LibOpenJPEG/pi.h ./Source/LibOpenJPEG/raw.h ./Source/LibOpenJPEG/t1.h ./Source/LibOpenJPEG/t1_luts.h ./Source/LibOpenJPEG/t2.h ./Source/LibOpenJPEG/tcd.h ./Source/LibOpenJPEG/tgt.h ./Source/LibPNG/png.h ./Source/LibPNG/pngconf.h ./Source/LibPNG/pngdebug.h ./Source/LibPNG/pnginfo.h ./Source/LibPNG/pnglibconf.h ./Source/LibPNG/pngpriv.h ./Source/LibPNG/pngstruct.h ./Source/LibRawLite/internal/dcraw_defs.h ./Source/LibRawLite/internal/dcraw_fileio_defs.h ./Source/LibRawLite/internal/defines.h ./Source/LibRawLite/internal/dmp_include.h ./Source/LibRawLite/internal/libraw_cameraids.h ./Source/LibRawLite/internal/libraw_cxx_defs.h ./Source/LibRawLite/internal/libraw_internal_funcs.h ./Source/LibRawLite/internal/var_defines.h ./Source/LibRawLite/internal/x3f_tools.h ./Source/LibRawLite/libraw/libraw.h ./Source/LibRawLite/libraw/libraw_alloc.h ./Source/LibRawLite/libraw/libraw_const.h ./Source/LibRawLite/libraw/libraw_datastream.h ./Source/LibRawLite/libraw/libraw_internal.h ./Source/LibRawLite/libraw/libraw_types.h ./Source/LibRawLite/libraw/libraw_version.h ./Source/LibTIFF4/t4.h ./Source/LibTIFF4/tiff.h ./Source/LibTIFF4/tiffconf.h ./Source/LibTIFF4/tiffconf.vc.h ./Source/LibTIFF4/tiffconf.wince.h ./Source/LibTIFF4/tiffio.h ./Source/LibTIFF4/tiffiop.h ./Source/LibTIFF4/tiffvers.h ./Source/LibTIFF4/tif_config.h ./Source/LibTIFF4/tif_config.vc.h ./Source/LibTIFF4/tif_config.wince.h ./Source/LibTIFF4/tif_dir.h ./Source/LibTIFF4/tif_fax3.h ./Source/LibTIFF4/tif_predict.h ./Source/LibTIFF4/uvcode.h ./Source/LibWebP/src/dec/alphai_dec.h ./Source/LibWebP/src/dec/common_dec.h ./Source/LibWebP/src/dec/vp8i_dec.h ./Source/LibWebP/src/dec/vp8li_dec.h ./Source/LibWebP/src/dec/vp8_dec.h ./Source/LibWebP/src/dec/webpi_dec.h ./Source/LibWebP/src/dsp/common_sse2.h ./Source/LibWebP/src/dsp/common_sse41.h ./Source/LibWebP/src/dsp/dsp.h ./Source/LibWebP/src/dsp/lossless.h ./Source/LibWebP/src/dsp/lossless_common.h ./Source/LibWebP/src/dsp/mips_macro.h ./Source/LibWebP/src/dsp/msa_macro.h ./Source/LibWebP/src/dsp/neon.h ./Source/LibWebP/src/dsp/quant.h ./Source/LibWebP/src/dsp/yuv.h ./Source/LibWebP/src/enc/backward_references_enc.h ./Source/LibWebP/src/enc/cost_enc.h ./Source/LibWebP/src/enc/histogram_enc.h ./Source/LibWebP/src/enc/vp8i_enc.h ./Source/LibWebP/src/enc/vp8li_enc.h ./Source/LibWebP/src/mux/animi.h ./Source/LibWebP/src/mux/muxi.h ./Source/LibWebP/src/utils/bit_reader_inl_utils.h ./Source/LibWebP/src/utils/bit_reader_utils.h ./Source/LibWebP/src/utils/bit_writer_utils.h ./Source/LibWebP/src/utils/color_cache_utils.h ./Source/LibWebP/src/utils/endian_inl_utils.h ./Source/LibWebP/src/utils/filters_utils.h ./Source/LibWebP/src/utils/huffman_encode_utils.h ./Source/LibWebP/src/utils/huffman_utils.h ./Source/LibWebP/src/utils/quant_levels_dec_utils.h ./Source/LibWebP/src/utils/quant_levels_utils.h ./Source/LibWebP/src/utils/random_utils.h ./Source/LibWebP/src/utils/rescaler_utils.h ./Source/LibWebP/src/utils/thread_utils.h ./Source/LibWebP/src/utils/utils.h ./Source/LibWebP/src/webp/decode.h ./Source/LibWebP/src/webp/demux.h ./Source/LibWebP/src/webp/encode.h ./Source/LibWebP/src/webp/format_constants.h ./Source/LibWebP/src/webp/mux.h ./Source/LibWebP/src/webp/mux_types.h ./Source/LibWebP/src/webp/types.h ./Source/MapIntrospector.h ./Source/Metadata/FIRational.h ./Source/Metadata/FreeImageTag.h ./Source/OpenEXR/Half/eLut.h ./Source/OpenEXR/Half/half.h ./Source/OpenEXR/Half/halfExport.h ./Source/OpenEXR/Half/halfFunction.h ./Source/OpenEXR/Half/halfLimits.h ./Source/OpenEXR/Half/toFloat.h ./Source/OpenEXR/Iex/Iex.h ./Source/OpenEXR/Iex/IexBaseExc.h ./Source/OpenEXR/Iex/IexErrnoExc.h ./Source/OpenEXR/Iex/IexExport.h ./Source/OpenEXR/Iex/IexForward.h ./Source/OpenEXR/Iex/IexMacros.h ./Source/OpenEXR/Iex/IexMathExc.h ./Source/OpenEXR/Iex/IexNamespace.h ./Source/OpenEXR/Iex/IexThrowErrnoExc.h ./Source/OpenEXR/IexMath/IexMathFloatExc.h ./Source/OpenEXR/IexMath/IexMathFpu.h ./Source/OpenEXR/IexMath/IexMathIeeeExc.h ./Source/OpenEXR/IlmBaseConfig.h ./Source/OpenEXR/IlmImf/b44ExpLogTable.h ./Source/OpenEXR/IlmImf/dwaLookups.h ./Source/OpenEXR/IlmImf/ImfAcesFile.h ./Source/OpenEXR/IlmImf/ImfArray.h ./Source/OpenEXR/IlmImf/ImfAttribute.h ./Source/OpenEXR/IlmImf/ImfAutoArray.h ./Source/OpenEXR/IlmImf/ImfB44Compressor.h ./Source/OpenEXR/IlmImf/ImfBoxAttribute.h ./Source/OpenEXR/IlmImf/ImfChannelList.h ./Source/OpenEXR/IlmImf/ImfChannelListAttribute.h ./Source/OpenEXR/IlmImf/ImfCheckedArithmetic.h ./Source/OpenEXR/IlmImf/ImfChromaticities.h ./Source/OpenEXR/IlmImf/ImfChromaticitiesAttribute.h ./Source/OpenEXR/IlmImf/ImfCompositeDeepScanLine.h ./Source/OpenEXR/IlmImf/ImfCompression.h ./Source/OpenEXR/IlmImf/ImfCompressionAttribute.h ./Source/OpenEXR/IlmImf/ImfCompressor.h ./Source/OpenEXR/IlmImf/ImfConvert.h ./Source/OpenEXR/IlmImf/ImfCRgbaFile.h ./Source/OpenEXR/IlmImf/ImfDeepCompositing.h ./Source/OpenEXR/IlmImf/ImfDeepFrameBuffer.h ./Source/OpenEXR/IlmImf/ImfDeepImageState.h ./Source/OpenEXR/IlmImf/ImfDeepImageStateAttribute.h ./Source/OpenEXR/IlmImf/ImfDeepScanLineInputFile.h ./Source/OpenEXR/IlmImf/ImfDeepScanLineInputPart.h ./Source/OpenEXR/IlmImf/ImfDeepScanLineOutputFile.h ./Source/OpenEXR/IlmImf/ImfDeepScanLineOutputPart.h ./Source/OpenEXR/IlmImf/ImfDeepTiledInputFile.h ./Source/OpenEXR/IlmImf/ImfDeepTiledInputPart.h ./Source/OpenEXR/IlmImf/ImfDeepTiledOutputFile.h ./Source/OpenEXR/IlmImf/ImfDeepTiledOutputPart.h ./Source/OpenEXR/IlmImf/ImfDoubleAttribute.h ./Source/OpenEXR/IlmImf/ImfDwaCompressor.h ./Source/OpenEXR/IlmImf/ImfDwaCompressorSimd.h ./Source/OpenEXR/IlmImf/ImfEnvmap.h ./Source/OpenEXR/IlmImf/ImfEnvmapAttribute.h ./Source/OpenEXR/IlmImf/ImfExport.h ./Source/OpenEXR/IlmImf/ImfFastHuf.h ./Source/OpenEXR/IlmImf/ImfFloatAttribute.h ./Source/OpenEXR/IlmImf/ImfFloatVectorAttribute.h ./Source/OpenEXR/IlmImf/ImfForward.h ./Source/OpenEXR/IlmImf/ImfFrameBuffer.h ./Source/OpenEXR/IlmImf/ImfFramesPerSecond.h ./Source/OpenEXR/IlmImf/ImfGenericInputFile.h ./Source/OpenEXR/IlmImf/ImfGenericOutputFile.h ./Source/OpenEXR/IlmImf/ImfHeader.h ./Source/OpenEXR/IlmImf/ImfHuf.h ./Source/OpenEXR/IlmImf/ImfInputFile.h ./Source/OpenEXR/IlmImf/ImfInputPart.h ./Source/OpenEXR/IlmImf/ImfInputPartData.h ./Source/OpenEXR/IlmImf/ImfInputStreamMutex.h ./Source/OpenEXR/IlmImf/ImfInt64.h ./Source/OpenEXR/IlmImf/ImfIntAttribute.h ./Source/OpenEXR/IlmImf/ImfIO.h ./Source/OpenEXR/IlmImf/ImfKeyCode.h ./Source/OpenEXR/IlmImf/ImfKeyCodeAttribute.h ./Source/OpenEXR/IlmImf/ImfLineOrder.h ./Source/OpenEXR/IlmImf/ImfLineOrderAttribute.h ./Source/OpenEXR/IlmImf/ImfLut.h ./Source/OpenEXR/IlmImf/ImfMatrixAttribute.h ./Source/OpenEXR/IlmImf/ImfMisc.h ./Source/OpenEXR/IlmImf/ImfMultiPartInputFile.h ./Source/OpenEXR/IlmImf/ImfMultiPartOutputFile.h ./Source/OpenEXR/IlmImf/ImfMultiView.h ./Source/OpenEXR/IlmImf/ImfName.h ./Source/OpenEXR/IlmImf/ImfNamespace.h ./Source/OpenEXR/IlmImf/ImfOpaqueAttribute.h ./Source/OpenEXR/IlmImf/ImfOptimizedPixelReading.h ./Source/OpenEXR/IlmImf/ImfOutputFile.h ./Source/OpenEXR/IlmImf/ImfOutputPart.h ./Source/OpenEXR/IlmImf/ImfOutputPartData.h ./Source/OpenEXR/IlmImf/ImfOutputStreamMutex.h ./Source/OpenEXR/IlmImf/ImfPartHelper.h ./Source/OpenEXR/IlmImf/ImfPartType.h ./Source/OpenEXR/IlmImf/ImfPixelType.h ./Source/OpenEXR/IlmImf/ImfPizCompressor.h ./Source/OpenEXR/IlmImf/ImfPreviewImage.h ./Source/OpenEXR/IlmImf/ImfPreviewImageAttribute.h ./Source/OpenEXR/IlmImf/ImfPxr24Compressor.h ./Source/OpenEXR/IlmImf/ImfRational.h ./Source/OpenEXR/IlmImf/ImfRationalAttribute.h ./Source/OpenEXR/IlmImf/ImfRgba.h ./Source/OpenEXR/IlmImf/ImfRgbaFile.h ./Source/OpenEXR/IlmImf/ImfRgbaYca.h ./Source/OpenEXR/IlmImf/ImfRle.h ./Source/OpenEXR/IlmImf/ImfRleCompressor.h ./Source/OpenEXR/IlmImf/ImfScanLineInputFile.h ./Source/OpenEXR/IlmImf/ImfSimd.h ./Source/OpenEXR/IlmImf/ImfStandardAttributes.h ./Source/OpenEXR/IlmImf/ImfStdIO.h ./Source/OpenEXR/IlmImf/ImfStringAttribute.h ./Source/OpenEXR/IlmImf/ImfStringVectorAttribute.h ./Source/OpenEXR/IlmImf/ImfSystemSpecific.h ./Source/OpenEXR/IlmImf/ImfTestFile.h ./Source/OpenEXR/IlmImf/ImfThreading.h ./Source/OpenEXR/IlmImf/ImfTileDescription.h ./Source/OpenEXR/IlmImf/ImfTileDescriptionAttribute.h ./Source/OpenEXR/IlmImf/ImfTiledInputFile.h ./Source/OpenEXR/IlmImf/ImfTiledInputPart.h ./Source/OpenEXR/IlmImf/ImfTiledMisc.h ./Source/OpenEXR/IlmImf/ImfTiledOutputFile.h ./Source/OpenEXR/IlmImf/ImfTiledOutputPart.h ./Source/OpenEXR/IlmImf/ImfTiledRgbaFile.h ./Source/OpenEXR/IlmImf/ImfTileOffsets.h ./Source/OpenEXR/IlmImf/ImfTimeCode.h ./Source/OpenEXR/IlmImf/ImfTimeCodeAttribute.h ./Source/OpenEXR/IlmImf/ImfVecAttribute.h ./Source/OpenEXR/IlmImf/ImfVersion.h ./Source/OpenEXR/IlmImf/ImfWav.h ./Source/OpenEXR/IlmImf/ImfXdr.h ./Source/OpenEXR/IlmImf/ImfZip.h ./Source/OpenEXR/IlmImf/ImfZipCompressor.h ./Source/OpenEXR/IlmThread/IlmThread.h ./Source/OpenEXR/IlmThread/IlmThreadExport.h ./Source/OpenEXR/IlmThread/IlmThreadForward.h ./Source/OpenEXR/IlmThread/IlmThreadMutex.h ./Source/OpenEXR/IlmThread/IlmThreadNamespace.h ./Source/OpenEXR/IlmThread/IlmThreadPool.h ./Source/OpenEXR/IlmThread/IlmThreadSemaphore.h ./Source/OpenEXR/Imath/ImathBox.h ./Source/OpenEXR/Imath/ImathBoxAlgo.h ./Source/OpenEXR/Imath/ImathColor.h ./Source/OpenEXR/Imath/ImathColorAlgo.h ./Source/OpenEXR/Imath/ImathEuler.h ./Source/OpenEXR/Imath/ImathExc.h ./Source/OpenEXR/Imath/ImathExport.h ./Source/OpenEXR/Imath/ImathForward.h ./Source/OpenEXR/Imath/ImathFrame.h ./Source/OpenEXR/Imath/ImathFrustum.h ./Source/OpenEXR/Imath/ImathFrustumTest.h ./Source/OpenEXR/Imath/ImathFun.h ./Source/OpenEXR/Imath/ImathGL.h ./Source/OpenEXR/Imath/ImathGLU.h ./Source/OpenEXR/Imath/ImathHalfLimits.h ./Source/OpenEXR/Imath/ImathInt64.h ./Source/OpenEXR/Imath/ImathInterval.h ./Source/OpenEXR/Imath/ImathLimits.h ./Source/OpenEXR/Imath/ImathLine.h ./Source/OpenEXR/Imath/ImathLineAlgo.h ./Source/OpenEXR/Imath/ImathMath.h ./Source/OpenEXR/Imath/ImathMatrix.h ./Source/OpenEXR/Imath/ImathMatrixAlgo.h ./Source/OpenEXR/Imath/ImathNamespace.h ./Source/OpenEXR/Imath/ImathPlane.h ./Source/OpenEXR/Imath/ImathPlatform.h ./Source/OpenEXR/Imath/ImathQuat.h ./Source/OpenEXR/Imath/ImathRandom.h ./Source/OpenEXR/Imath/ImathRoots.h ./Source/OpenEXR/Imath/ImathShear.h ./Source/OpenEXR/Imath/ImathSphere.h ./Source/OpenEXR/Imath/ImathVec.h ./Source/OpenEXR/Imath/ImathVecAlgo.h ./Source/OpenEXR/OpenEXRConfig.h ./Source/Plugin.h ./Source/Quantizers.h ./Source/ToneMapping.h ./Source/Utilities.h ./Source/ZLib/crc32.h ./Source/ZLib/deflate.h ./Source/ZLib/gzguts.h ./Source/ZLib/inffast.h ./Source/ZLib/inffixed.h ./Source/ZLib/inflate.h ./Source/ZLib/inftrees.h ./Source/ZLib/trees.h ./Source/ZLib/zconf.h ./Source/ZLib/zlib.h ./Source/ZLib/zutil.h ./TestAPI/TestSuite.h ./Wrapper/FreeImage.NET/cpp/FreeImageIO/FreeImageIO.Net.h ./Wrapper/FreeImage.NET/cpp/FreeImageIO/resource.h ./Wrapper/FreeImage.NET/cpp/FreeImageIO/Stdafx.h ./Wrapper/FreeImagePlus/FreeImagePlus.h ./Wrapper/FreeImagePlus/test/fipTest.h
++SRCS = ./Source/FreeImage/BitmapAccess.cpp ./Source/FreeImage/ColorLookup.cpp ./Source/FreeImage/ConversionRGBA16.cpp ./Source/FreeImage/ConversionRGBAF.cpp ./Source/FreeImage/FreeImage.cpp ./Source/FreeImage/FreeImageC.c ./Source/FreeImage/FreeImageIO.cpp ./Source/FreeImage/GetType.cpp ./Source/FreeImage/LFPQuantizer.cpp ./Source/FreeImage/MemoryIO.cpp ./Source/FreeImage/PixelAccess.cpp ./Source/FreeImage/J2KHelper.cpp ./Source/FreeImage/MNGHelper.cpp ./Source/FreeImage/Plugin.cpp ./Source/FreeImage/PluginBMP.cpp ./Source/FreeImage/PluginCUT.cpp ./Source/FreeImage/PluginDDS.cpp ./Source/FreeImage/PluginEXR.cpp ./Source/FreeImage/PluginG3.cpp ./Source/FreeImage/PluginGIF.cpp ./Source/FreeImage/PluginHDR.cpp ./Source/FreeImage/PluginICO.cpp ./Source/FreeImage/PluginIFF.cpp ./Source/FreeImage/PluginJ2K.cpp ./Source/FreeImage/PluginJNG.cpp ./Source/FreeImage/PluginJP2.cpp ./Source/FreeImage/PluginJPEG.cpp ./Source/FreeImage/PluginJXR.cpp ./Source/FreeImage/PluginKOALA.cpp ./Source/FreeImage/PluginMNG.cpp ./Source/FreeImage/PluginPCD.cpp ./Source/FreeImage/PluginPCX.cpp ./Source/FreeImage/PluginPFM.cpp ./Source/FreeImage/PluginPICT.cpp ./Source/FreeImage/PluginPNG.cpp ./Source/FreeImage/PluginPNM.cpp ./Source/FreeImage/PluginPSD.cpp ./Source/FreeImage/PluginRAS.cpp ./Source/FreeImage/PluginRAW.cpp ./Source/FreeImage/PluginSGI.cpp ./Source/FreeImage/PluginTARGA.cpp ./Source/FreeImage/PluginTIFF.cpp ./Source/FreeImage/PluginWBMP.cpp ./Source/FreeImage/PluginWebP.cpp ./Source/FreeImage/PluginXBM.cpp ./Source/FreeImage/PluginXPM.cpp ./Source/FreeImage/PSDParser.cpp ./Source/FreeImage/TIFFLogLuv.cpp ./Source/FreeImage/Conversion.cpp ./Source/FreeImage/Conversion16_555.cpp ./Source/FreeImage/Conversion16_565.cpp ./Source/FreeImage/Conversion24.cpp ./Source/FreeImage/Conversion32.cpp ./Source/FreeImage/Conversion4.cpp ./Source/FreeImage/Conversion8.cpp ./Source/FreeImage/ConversionFloat.cpp ./Source/FreeImage/ConversionRGB16.cpp ./Source/FreeImage/ConversionRGBF.cpp ./Source/FreeImage/ConversionType.cpp ./Source/FreeImage/ConversionUINT16.cpp ./Source/FreeImage/Halftoning.cpp ./Source/FreeImage/tmoColorConvert.cpp ./Source/FreeImage/tmoDrago03.cpp ./Source/FreeImage/tmoFattal02.cpp ./Source/FreeImage/tmoReinhard05.cpp ./Source/FreeImage/ToneMapping.cpp ./Source/FreeImage/NNQuantizer.cpp ./Source/FreeImage/WuQuantizer.cpp ./Source/FreeImage/CacheFile.cpp ./Source/FreeImage/MultiPage.cpp ./Source/FreeImage/ZLibInterface.cpp ./Source/Metadata/Exif.cpp ./Source/Metadata/FIRational.cpp ./Source/Metadata/FreeImageTag.cpp ./Source/Metadata/IPTC.cpp ./Source/Metadata/TagConversion.cpp ./Source/Metadata/TagLib.cpp ./Source/Metadata/XTIFF.cpp ./Source/FreeImageToolkit/Background.cpp ./Source/FreeImageToolkit/BSplineRotate.cpp ./Source/FreeImageToolkit/Channels.cpp ./Source/FreeImageToolkit/ClassicRotate.cpp ./Source/FreeImageToolkit/Colors.cpp ./Source/FreeImageToolkit/CopyPaste.cpp ./Source/FreeImageToolkit/Display.cpp ./Source/FreeImageToolkit/Flip.cpp ./Source/FreeImageToolkit/JPEGTransform.cpp ./Source/FreeImageToolkit/MultigridPoissonSolver.cpp ./Source/FreeImageToolkit/Rescale.cpp ./Source/FreeImageToolkit/Resize.cpp 
++INCLS = ./Dist/FreeImage.h ./Examples/Generic/FIIO_Mem.h ./Examples/OpenGL/TextureManager/TextureManager.h ./Examples/Plugin/PluginCradle.h ./Source/CacheFile.h ./Source/FreeImage/J2KHelper.h ./Source/FreeImage/PSDParser.h ./Source/FreeImage.h ./Source/FreeImageIO.h ./Source/FreeImageToolkit/Filters.h ./Source/FreeImageToolkit/Resize.h ./Source/MapIntrospector.h ./Source/Metadata/FIRational.h ./Source/Metadata/FreeImageTag.h ./Source/Plugin.h ./Source/Quantizers.h ./Source/ToneMapping.h ./Source/Utilities.h ./TestAPI/TestSuite.h ./Wrapper/FreeImage.NET/cpp/FreeImageIO/FreeImageIO.Net.h ./Wrapper/FreeImage.NET/cpp/FreeImageIO/resource.h ./Wrapper/FreeImage.NET/cpp/FreeImageIO/Stdafx.h ./Wrapper/FreeImagePlus/FreeImagePlus.h ./Wrapper/FreeImagePlus/test/fipTest.h
+ 
+-INCLUDE = -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit -ISource/LibJPEG -ISource/LibPNG -ISource/LibTIFF4 -ISource/ZLib -ISource/LibOpenJPEG -ISource/OpenEXR -ISource/OpenEXR/Half -ISource/OpenEXR/Iex -ISource/OpenEXR/IlmImf -ISource/OpenEXR/IlmThread -ISource/OpenEXR/Imath -ISource/OpenEXR/IexMath -ISource/LibRawLite -ISource/LibRawLite/dcraw -ISource/LibRawLite/internal -ISource/LibRawLite/libraw -ISource/LibRawLite/src -ISource/LibWebP -ISource/LibJXR -ISource/LibJXR/common/include -ISource/LibJXR/image/sys -ISource/LibJXR/jxrgluelib
++INCLUDE = -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit
+diff --git a/Source/FreeImage.h b/Source/FreeImage.h
+index 2dfb9ee2..d2d32322 100644
+--- a/Source/FreeImage.h
++++ b/Source/FreeImage.h
+@@ -155,8 +155,8 @@ typedef uint8_t BYTE;
+ typedef uint16_t WORD;
+ typedef uint32_t DWORD;
+ typedef int32_t LONG;
+-typedef int64_t INT64;
+-typedef uint64_t UINT64;
++#define INT64 int64_t
++#define UINT64 uint64_t
+ #else
+ // MS is not C99 ISO compliant
+ typedef long BOOL;
+diff --git a/Source/FreeImage/J2KHelper.cpp b/Source/FreeImage/J2KHelper.cpp
+index 062b49ee..0e79fbc5 100644
+--- a/Source/FreeImage/J2KHelper.cpp
++++ b/Source/FreeImage/J2KHelper.cpp
+@@ -21,7 +21,7 @@
+ 

+ #include "FreeImage.h"

+ #include "Utilities.h"

+-#include "../LibOpenJPEG/openjpeg.h"

++#include <openjpeg.h>

+ #include "J2KHelper.h"

+ 

+ // --------------------------------------------------------------------------

+diff --git a/Source/FreeImage/PluginEXR.cpp b/Source/FreeImage/PluginEXR.cpp
+index b2864303..9bf3ada9 100644
+--- a/Source/FreeImage/PluginEXR.cpp
++++ b/Source/FreeImage/PluginEXR.cpp
+@@ -28,16 +28,16 @@
+ #pragma warning (disable : 4800) // ImfVersion.h - 'const int' : forcing value to bool 'true' or 'false' (performance warning)
+ #endif 
+ 
+-#include "../OpenEXR/IlmImf/ImfIO.h"
+-#include "../OpenEXR/Iex/Iex.h"
+-#include "../OpenEXR/IlmImf/ImfOutputFile.h"
+-#include "../OpenEXR/IlmImf/ImfInputFile.h"
+-#include "../OpenEXR/IlmImf/ImfRgbaFile.h"
+-#include "../OpenEXR/IlmImf/ImfChannelList.h"
+-#include "../OpenEXR/IlmImf/ImfRgba.h"
+-#include "../OpenEXR/IlmImf/ImfArray.h"
+-#include "../OpenEXR/IlmImf/ImfPreviewImage.h"
+-#include "../OpenEXR/Half/half.h"
++#include <OpenEXR/ImfIO.h>
++#include <OpenEXR/Iex.h>
++#include <OpenEXR/ImfOutputFile.h>
++#include <OpenEXR/ImfInputFile.h>
++#include <OpenEXR/ImfRgbaFile.h>
++#include <OpenEXR/ImfChannelList.h>
++#include <OpenEXR/ImfRgba.h>
++#include <OpenEXR/ImfArray.h>
++#include <OpenEXR/ImfPreviewImage.h>
++#include <OpenEXR/half.h>
+ 
+ 
+ // ==========================================================
+diff --git a/Source/FreeImage/PluginG3.cpp b/Source/FreeImage/PluginG3.cpp
+index 4680aa32..7d4b5ce6 100644
+--- a/Source/FreeImage/PluginG3.cpp
++++ b/Source/FreeImage/PluginG3.cpp
+@@ -20,7 +20,7 @@
+ // Use at your own risk!
+ // ==========================================================
+ 
+-#include "../LibTIFF4/tiffiop.h"
++#include <tiffiop.h>
+ 
+ #include "FreeImage.h"
+ #include "Utilities.h"
+diff --git a/Source/FreeImage/PluginJ2K.cpp b/Source/FreeImage/PluginJ2K.cpp
+index b8bcfc8b..621a9037 100644
+--- a/Source/FreeImage/PluginJ2K.cpp
++++ b/Source/FreeImage/PluginJ2K.cpp
+@@ -21,7 +21,7 @@
+ 
+ #include "FreeImage.h"
+ #include "Utilities.h"
+-#include "../LibOpenJPEG/openjpeg.h"
++#include <openjpeg.h>
+ #include "J2KHelper.h"
+ 
+ // ==========================================================
+diff --git a/Source/FreeImage/PluginJP2.cpp b/Source/FreeImage/PluginJP2.cpp
+index 742fe2c0..c57f6267 100644
+--- a/Source/FreeImage/PluginJP2.cpp
++++ b/Source/FreeImage/PluginJP2.cpp
+@@ -21,7 +21,7 @@
+ 
+ #include "FreeImage.h"
+ #include "Utilities.h"
+-#include "../LibOpenJPEG/openjpeg.h"
++#include <openjpeg.h>
+ #include "J2KHelper.h"
+ 
+ // ==========================================================
+diff --git a/Source/FreeImage/PluginJPEG.cpp b/Source/FreeImage/PluginJPEG.cpp
+index 8db177d2..a7de6378 100644
+--- a/Source/FreeImage/PluginJPEG.cpp
++++ b/Source/FreeImage/PluginJPEG.cpp
+@@ -35,9 +35,9 @@ extern "C" {
+ #undef FAR
+ #include <setjmp.h>
+ 
+-#include "../LibJPEG/jinclude.h"
+-#include "../LibJPEG/jpeglib.h"
+-#include "../LibJPEG/jerror.h"
++#include <stdio.h>
++#include <jpeglib.h>
++#include <jerror.h>
+ }
+ 
+ #include "FreeImage.h"
+@@ -484,116 +484,6 @@ marker_is_icc(jpeg_saved_marker_ptr marker) {
+ 	return FALSE;
+ }
+ 
+-/**
+-  See if there was an ICC profile in the JPEG file being read;
+-  if so, reassemble and return the profile data.
+-
+-  TRUE is returned if an ICC profile was found, FALSE if not.
+-  If TRUE is returned, *icc_data_ptr is set to point to the
+-  returned data, and *icc_data_len is set to its length.
+-  
+-  IMPORTANT: the data at **icc_data_ptr has been allocated with malloc()
+-  and must be freed by the caller with free() when the caller no longer
+-  needs it.  (Alternatively, we could write this routine to use the
+-  IJG library's memory allocator, so that the data would be freed implicitly
+-  at jpeg_finish_decompress() time.  But it seems likely that many apps
+-  will prefer to have the data stick around after decompression finishes.)
+-  
+-  NOTE: if the file contains invalid ICC APP2 markers, we just silently
+-  return FALSE.  You might want to issue an error message instead.
+-*/
+-static BOOL 
+-jpeg_read_icc_profile(j_decompress_ptr cinfo, JOCTET **icc_data_ptr, unsigned *icc_data_len) {
+-	jpeg_saved_marker_ptr marker;
+-	int num_markers = 0;
+-	int seq_no;
+-	JOCTET *icc_data;
+-	unsigned total_length;
+-
+-	const int MAX_SEQ_NO = 255;			// sufficient since marker numbers are bytes
+-	BYTE marker_present[MAX_SEQ_NO+1];	// 1 if marker found
+-	unsigned data_length[MAX_SEQ_NO+1];	// size of profile data in marker
+-	unsigned data_offset[MAX_SEQ_NO+1];	// offset for data in marker
+-	
+-	*icc_data_ptr = NULL;		// avoid confusion if FALSE return
+-	*icc_data_len = 0;
+-	
+-	/**
+-	this first pass over the saved markers discovers whether there are
+-	any ICC markers and verifies the consistency of the marker numbering.
+-	*/
+-	
+-	memset(marker_present, 0, (MAX_SEQ_NO + 1));
+-	
+-	for(marker = cinfo->marker_list; marker != NULL; marker = marker->next) {
+-		if (marker_is_icc(marker)) {
+-			if (num_markers == 0) {
+-				// number of markers
+-				num_markers = GETJOCTET(marker->data[13]);
+-			}
+-			else if (num_markers != GETJOCTET(marker->data[13])) {
+-				return FALSE;		// inconsistent num_markers fields 
+-			}
+-			// sequence number
+-			seq_no = GETJOCTET(marker->data[12]);
+-			if (seq_no <= 0 || seq_no > num_markers) {
+-				return FALSE;		// bogus sequence number 
+-			}
+-			if (marker_present[seq_no]) {
+-				return FALSE;		// duplicate sequence numbers 
+-			}
+-			marker_present[seq_no] = 1;
+-			data_length[seq_no] = marker->data_length - ICC_HEADER_SIZE;
+-		}
+-	}
+-	
+-	if (num_markers == 0)
+-		return FALSE;
+-		
+-	/**
+-	check for missing markers, count total space needed,
+-	compute offset of each marker's part of the data.
+-	*/
+-	
+-	total_length = 0;
+-	for(seq_no = 1; seq_no <= num_markers; seq_no++) {
+-		if (marker_present[seq_no] == 0) {
+-			return FALSE;		// missing sequence number
+-		}
+-		data_offset[seq_no] = total_length;
+-		total_length += data_length[seq_no];
+-	}
+-	
+-	if (total_length <= 0)
+-		return FALSE;		// found only empty markers ?
+-	
+-	// allocate space for assembled data 
+-	icc_data = (JOCTET *) malloc(total_length * sizeof(JOCTET));
+-	if (icc_data == NULL)
+-		return FALSE;		// out of memory
+-	
+-	// and fill it in
+-	for (marker = cinfo->marker_list; marker != NULL; marker = marker->next) {
+-		if (marker_is_icc(marker)) {
+-			JOCTET FAR *src_ptr;
+-			JOCTET *dst_ptr;
+-			unsigned length;
+-			seq_no = GETJOCTET(marker->data[12]);
+-			dst_ptr = icc_data + data_offset[seq_no];
+-			src_ptr = marker->data + ICC_HEADER_SIZE;
+-			length = data_length[seq_no];
+-			while (length--) {
+-				*dst_ptr++ = *src_ptr++;
+-			}
+-		}
+-	}
+-	
+-	*icc_data_ptr = icc_data;
+-	*icc_data_len = total_length;
+-	
+-	return TRUE;
+-}
+-
+ /**
+ 	Read JPEG_APPD marker (IPTC or Adobe Photoshop profile)
+ */
+diff --git a/Source/FreeImage/PluginJXR.cpp b/Source/FreeImage/PluginJXR.cpp
+index 85c6ff3e..163a93bd 100644
+--- a/Source/FreeImage/PluginJXR.cpp
++++ b/Source/FreeImage/PluginJXR.cpp
+@@ -23,7 +23,7 @@
+ #include "Utilities.h"

+ #include "../Metadata/FreeImageTag.h"

+ 

+-#include "../LibJXR/jxrgluelib/JXRGlue.h"

++#include <JXRGlue.h>

+ 

+ // ==========================================================

+ // Plugin Interface

+diff --git a/Source/FreeImage/PluginPNG.cpp b/Source/FreeImage/PluginPNG.cpp
+index 661f1602..504fafe1 100644
+--- a/Source/FreeImage/PluginPNG.cpp
++++ b/Source/FreeImage/PluginPNG.cpp
+@@ -40,8 +40,8 @@
+ 
+ // ----------------------------------------------------------
+ 
+-#include "../ZLib/zlib.h"
+-#include "../LibPNG/png.h"
++#include <zlib.h>
++#include <png.h>
+ 
+ // ----------------------------------------------------------
+ 
+diff --git a/Source/FreeImage/PluginRAW.cpp b/Source/FreeImage/PluginRAW.cpp
+index 26134bcc..d7fa81e4 100644
+--- a/Source/FreeImage/PluginRAW.cpp
++++ b/Source/FreeImage/PluginRAW.cpp
+@@ -19,12 +19,16 @@
+ // Use at your own risk!
+ // ==========================================================
+ 
+-#include "../LibRawLite/libraw/libraw.h"
++#include <libraw.h>
+ 
+ #include "FreeImage.h"
+ #include "Utilities.h"
+ #include "../Metadata/FreeImageTag.h"
+ 
++// What an ugly hack
++#undef INT64
++#undef UINT64
++
+ // ==========================================================
+ // Plugin Interface
+ // ==========================================================
+diff --git a/Source/FreeImage/PluginTIFF.cpp b/Source/FreeImage/PluginTIFF.cpp
+index 84554958..13a224dd 100644
+--- a/Source/FreeImage/PluginTIFF.cpp
++++ b/Source/FreeImage/PluginTIFF.cpp
+@@ -37,9 +37,9 @@
+ 

+ #include "FreeImage.h"

+ #include "Utilities.h"

+-#include "../LibTIFF4/tiffiop.h"

++#include <tiffiop.h>

+ #include "../Metadata/FreeImageTag.h"

+-#include "../OpenEXR/Half/half.h"

++#include <OpenEXR/half.h>

+ 

+ #include "FreeImageIO.h"

+ #include "PSDParser.h"

+diff --git a/Source/FreeImage/PluginWebP.cpp b/Source/FreeImage/PluginWebP.cpp
+index 7c9f62fd..c4014473 100644
+--- a/Source/FreeImage/PluginWebP.cpp
++++ b/Source/FreeImage/PluginWebP.cpp
+@@ -24,9 +24,9 @@
+ 
+ #include "../Metadata/FreeImageTag.h"
+ 
+-#include "../LibWebP/src/webp/decode.h"
+-#include "../LibWebP/src/webp/encode.h"
+-#include "../LibWebP/src/webp/mux.h"
++#include <webp/decode.h>
++#include <webp/encode.h>
++#include <webp/mux.h>
+ 
+ // ==========================================================
+ // Plugin Interface
+diff --git a/Source/FreeImage/ZLibInterface.cpp b/Source/FreeImage/ZLibInterface.cpp
+index 3ab6d321..09734755 100644
+--- a/Source/FreeImage/ZLibInterface.cpp
++++ b/Source/FreeImage/ZLibInterface.cpp
+@@ -19,10 +19,9 @@
+ // Use at your own risk!
+ // ==========================================================
+ 
+-#include "../ZLib/zlib.h"
++#include <zlib.h>
+ #include "FreeImage.h"
+ #include "Utilities.h"
+-#include "../ZLib/zutil.h"	/* must be the last header because of error C3163 in VS2008 (_vsnprintf defined in stdio.h) */
+ 
+ /**
+ Compresses a source buffer into a target buffer, using the ZLib library. 
+@@ -115,7 +114,8 @@ FreeImage_ZLibGZip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_s
+ 			return 0;
+         case Z_OK: {
+             // patch header, setup crc and length (stolen from mod_trace_output)
+-            BYTE *p = target + 8; *p++ = 2; *p = OS_CODE; // xflags, os_code
++            // OS_CODE is 0x03 on unix it seems, not sure how important this is
++            BYTE *p = target + 8; *p++ = 2; *p = 0x03; // xflags, os_code
+  	        crc = crc32(crc, source, source_size);
+ 	        memcpy(target + 4 + dest_len, &crc, 4);
+ 	        memcpy(target + 8 + dest_len, &source_size, 4);
+diff --git a/Source/FreeImageToolkit/JPEGTransform.cpp b/Source/FreeImageToolkit/JPEGTransform.cpp
+index 6f9ba8e1..836bc901 100644
+--- a/Source/FreeImageToolkit/JPEGTransform.cpp
++++ b/Source/FreeImageToolkit/JPEGTransform.cpp
+@@ -26,10 +26,10 @@ extern "C" {
+ #undef FAR
+ #include <setjmp.h>
+ 
+-#include "../LibJPEG/jinclude.h"
+-#include "../LibJPEG/jpeglib.h"
+-#include "../LibJPEG/jerror.h"
+-#include "../LibJPEG/transupp.h"
++#include <stdio.h>
++#include <jpeglib.h>
++#include <jerror.h>
++#include <transupp.h>
+ }
+ 
+ #include "FreeImage.h"
+diff --git a/Source/Metadata/XTIFF.cpp b/Source/Metadata/XTIFF.cpp
+index 6919a8e8..ce3d7c6b 100644
+--- a/Source/Metadata/XTIFF.cpp
++++ b/Source/Metadata/XTIFF.cpp
+@@ -29,7 +29,7 @@
+ #pragma warning (disable : 4786) // identifier was truncated to 'number' characters

+ #endif

+ 

+-#include "../LibTIFF4/tiffiop.h"

++#include <tiffiop.h>
+ 

+ #include "FreeImage.h"

+ #include "Utilities.h"

+diff --git a/fipMakefile.srcs b/fipMakefile.srcs
+index cc75e5e0..bedc9e3e 100644
+--- a/fipMakefile.srcs
++++ b/fipMakefile.srcs
+@@ -1,4 +1,4 @@
+ VER_MAJOR = 3
+ VER_MINOR = 19.0
+-SRCS = ./Source/FreeImage/BitmapAccess.cpp ./Source/FreeImage/ColorLookup.cpp ./Source/FreeImage/ConversionRGBA16.cpp ./Source/FreeImage/ConversionRGBAF.cpp ./Source/FreeImage/FreeImage.cpp ./Source/FreeImage/FreeImageC.c ./Source/FreeImage/FreeImageIO.cpp ./Source/FreeImage/GetType.cpp ./Source/FreeImage/LFPQuantizer.cpp ./Source/FreeImage/MemoryIO.cpp ./Source/FreeImage/PixelAccess.cpp ./Source/FreeImage/J2KHelper.cpp ./Source/FreeImage/MNGHelper.cpp ./Source/FreeImage/Plugin.cpp ./Source/FreeImage/PluginBMP.cpp ./Source/FreeImage/PluginCUT.cpp ./Source/FreeImage/PluginDDS.cpp ./Source/FreeImage/PluginEXR.cpp ./Source/FreeImage/PluginG3.cpp ./Source/FreeImage/PluginGIF.cpp ./Source/FreeImage/PluginHDR.cpp ./Source/FreeImage/PluginICO.cpp ./Source/FreeImage/PluginIFF.cpp ./Source/FreeImage/PluginJ2K.cpp ./Source/FreeImage/PluginJNG.cpp ./Source/FreeImage/PluginJP2.cpp ./Source/FreeImage/PluginJPEG.cpp ./Source/FreeImage/PluginJXR.cpp ./Source/FreeImage/PluginKOALA.cpp ./Source/FreeImage/PluginMNG.cpp ./Source/FreeImage/PluginPCD.cpp ./Source/FreeImage/PluginPCX.cpp ./Source/FreeImage/PluginPFM.cpp ./Source/FreeImage/PluginPICT.cpp ./Source/FreeImage/PluginPNG.cpp ./Source/FreeImage/PluginPNM.cpp ./Source/FreeImage/PluginPSD.cpp ./Source/FreeImage/PluginRAS.cpp ./Source/FreeImage/PluginRAW.cpp ./Source/FreeImage/PluginSGI.cpp ./Source/FreeImage/PluginTARGA.cpp ./Source/FreeImage/PluginTIFF.cpp ./Source/FreeImage/PluginWBMP.cpp ./Source/FreeImage/PluginWebP.cpp ./Source/FreeImage/PluginXBM.cpp ./Source/FreeImage/PluginXPM.cpp ./Source/FreeImage/PSDParser.cpp ./Source/FreeImage/TIFFLogLuv.cpp ./Source/FreeImage/Conversion.cpp ./Source/FreeImage/Conversion16_555.cpp ./Source/FreeImage/Conversion16_565.cpp ./Source/FreeImage/Conversion24.cpp ./Source/FreeImage/Conversion32.cpp ./Source/FreeImage/Conversion4.cpp ./Source/FreeImage/Conversion8.cpp ./Source/FreeImage/ConversionFloat.cpp ./Source/FreeImage/ConversionRGB16.cpp ./Source/FreeImage/ConversionRGBF.cpp ./Source/FreeImage/ConversionType.cpp ./Source/FreeImage/ConversionUINT16.cpp ./Source/FreeImage/Halftoning.cpp ./Source/FreeImage/tmoColorConvert.cpp ./Source/FreeImage/tmoDrago03.cpp ./Source/FreeImage/tmoFattal02.cpp ./Source/FreeImage/tmoReinhard05.cpp ./Source/FreeImage/ToneMapping.cpp ./Source/FreeImage/NNQuantizer.cpp ./Source/FreeImage/WuQuantizer.cpp ./Source/FreeImage/CacheFile.cpp ./Source/FreeImage/MultiPage.cpp ./Source/FreeImage/ZLibInterface.cpp ./Source/Metadata/Exif.cpp ./Source/Metadata/FIRational.cpp ./Source/Metadata/FreeImageTag.cpp ./Source/Metadata/IPTC.cpp ./Source/Metadata/TagConversion.cpp ./Source/Metadata/TagLib.cpp ./Source/Metadata/XTIFF.cpp ./Source/FreeImageToolkit/Background.cpp ./Source/FreeImageToolkit/BSplineRotate.cpp ./Source/FreeImageToolkit/Channels.cpp ./Source/FreeImageToolkit/ClassicRotate.cpp ./Source/FreeImageToolkit/Colors.cpp ./Source/FreeImageToolkit/CopyPaste.cpp ./Source/FreeImageToolkit/Display.cpp ./Source/FreeImageToolkit/Flip.cpp ./Source/FreeImageToolkit/JPEGTransform.cpp ./Source/FreeImageToolkit/MultigridPoissonSolver.cpp ./Source/FreeImageToolkit/Rescale.cpp ./Source/FreeImageToolkit/Resize.cpp Source/LibJPEG/jaricom.c Source/LibJPEG/jcapimin.c Source/LibJPEG/jcapistd.c Source/LibJPEG/jcarith.c Source/LibJPEG/jccoefct.c Source/LibJPEG/jccolor.c Source/LibJPEG/jcdctmgr.c Source/LibJPEG/jchuff.c Source/LibJPEG/jcinit.c Source/LibJPEG/jcmainct.c Source/LibJPEG/jcmarker.c Source/LibJPEG/jcmaster.c Source/LibJPEG/jcomapi.c Source/LibJPEG/jcparam.c Source/LibJPEG/jcprepct.c Source/LibJPEG/jcsample.c Source/LibJPEG/jctrans.c Source/LibJPEG/jdapimin.c Source/LibJPEG/jdapistd.c Source/LibJPEG/jdarith.c Source/LibJPEG/jdatadst.c Source/LibJPEG/jdatasrc.c Source/LibJPEG/jdcoefct.c Source/LibJPEG/jdcolor.c Source/LibJPEG/jddctmgr.c Source/LibJPEG/jdhuff.c Source/LibJPEG/jdinput.c Source/LibJPEG/jdmainct.c Source/LibJPEG/jdmarker.c Source/LibJPEG/jdmaster.c Source/LibJPEG/jdmerge.c Source/LibJPEG/jdpostct.c Source/LibJPEG/jdsample.c Source/LibJPEG/jdtrans.c Source/LibJPEG/jerror.c Source/LibJPEG/jfdctflt.c Source/LibJPEG/jfdctfst.c Source/LibJPEG/jfdctint.c Source/LibJPEG/jidctflt.c Source/LibJPEG/jidctfst.c Source/LibJPEG/jidctint.c Source/LibJPEG/jmemmgr.c Source/LibJPEG/jmemnobs.c Source/LibJPEG/jquant1.c Source/LibJPEG/jquant2.c Source/LibJPEG/jutils.c Source/LibJPEG/transupp.c Source/LibPNG/png.c Source/LibPNG/pngerror.c Source/LibPNG/pngget.c Source/LibPNG/pngmem.c Source/LibPNG/pngpread.c Source/LibPNG/pngread.c Source/LibPNG/pngrio.c Source/LibPNG/pngrtran.c Source/LibPNG/pngrutil.c Source/LibPNG/pngset.c Source/LibPNG/pngtrans.c Source/LibPNG/pngwio.c Source/LibPNG/pngwrite.c Source/LibPNG/pngwtran.c Source/LibPNG/pngwutil.c Source/LibTIFF4/tif_aux.c Source/LibTIFF4/tif_close.c Source/LibTIFF4/tif_codec.c Source/LibTIFF4/tif_color.c Source/LibTIFF4/tif_compress.c Source/LibTIFF4/tif_dir.c Source/LibTIFF4/tif_dirinfo.c Source/LibTIFF4/tif_dirread.c Source/LibTIFF4/tif_dirwrite.c Source/LibTIFF4/tif_dumpmode.c Source/LibTIFF4/tif_error.c Source/LibTIFF4/tif_extension.c Source/LibTIFF4/tif_fax3.c Source/LibTIFF4/tif_fax3sm.c Source/LibTIFF4/tif_flush.c Source/LibTIFF4/tif_getimage.c Source/LibTIFF4/tif_jpeg.c Source/LibTIFF4/tif_lerc.c Source/LibTIFF4/tif_luv.c Source/LibTIFF4/tif_lzw.c Source/LibTIFF4/tif_next.c Source/LibTIFF4/tif_ojpeg.c Source/LibTIFF4/tif_open.c Source/LibTIFF4/tif_packbits.c Source/LibTIFF4/tif_pixarlog.c Source/LibTIFF4/tif_predict.c Source/LibTIFF4/tif_print.c Source/LibTIFF4/tif_read.c Source/LibTIFF4/tif_strip.c Source/LibTIFF4/tif_swab.c Source/LibTIFF4/tif_thunder.c Source/LibTIFF4/tif_tile.c Source/LibTIFF4/tif_version.c Source/LibTIFF4/tif_warning.c Source/LibTIFF4/tif_webp.c Source/LibTIFF4/tif_write.c Source/LibTIFF4/tif_zip.c Source/ZLib/adler32.c Source/ZLib/compress.c Source/ZLib/crc32.c Source/ZLib/deflate.c Source/ZLib/gzclose.c Source/ZLib/gzlib.c Source/ZLib/gzread.c Source/ZLib/gzwrite.c Source/ZLib/infback.c Source/ZLib/inffast.c Source/ZLib/inflate.c Source/ZLib/inftrees.c Source/ZLib/trees.c Source/ZLib/uncompr.c Source/ZLib/zutil.c Source/LibOpenJPEG/bio.c Source/LibOpenJPEG/cio.c Source/LibOpenJPEG/dwt.c Source/LibOpenJPEG/event.c Source/LibOpenJPEG/function_list.c Source/LibOpenJPEG/image.c Source/LibOpenJPEG/invert.c Source/LibOpenJPEG/j2k.c Source/LibOpenJPEG/jp2.c Source/LibOpenJPEG/mct.c Source/LibOpenJPEG/mqc.c Source/LibOpenJPEG/openjpeg.c Source/LibOpenJPEG/opj_clock.c Source/LibOpenJPEG/pi.c Source/LibOpenJPEG/raw.c Source/LibOpenJPEG/t1.c Source/LibOpenJPEG/t2.c Source/LibOpenJPEG/tcd.c Source/LibOpenJPEG/tgt.c Source/OpenEXR/IexMath/IexMathFpu.cpp Source/OpenEXR/IlmImf/b44ExpLogTable.cpp Source/OpenEXR/IlmImf/ImfAcesFile.cpp Source/OpenEXR/IlmImf/ImfAttribute.cpp Source/OpenEXR/IlmImf/ImfB44Compressor.cpp Source/OpenEXR/IlmImf/ImfBoxAttribute.cpp Source/OpenEXR/IlmImf/ImfChannelList.cpp Source/OpenEXR/IlmImf/ImfChannelListAttribute.cpp Source/OpenEXR/IlmImf/ImfChromaticities.cpp Source/OpenEXR/IlmImf/ImfChromaticitiesAttribute.cpp Source/OpenEXR/IlmImf/ImfCompositeDeepScanLine.cpp Source/OpenEXR/IlmImf/ImfCompressionAttribute.cpp Source/OpenEXR/IlmImf/ImfCompressor.cpp Source/OpenEXR/IlmImf/ImfConvert.cpp Source/OpenEXR/IlmImf/ImfCRgbaFile.cpp Source/OpenEXR/IlmImf/ImfDeepCompositing.cpp Source/OpenEXR/IlmImf/ImfDeepFrameBuffer.cpp Source/OpenEXR/IlmImf/ImfDeepImageStateAttribute.cpp Source/OpenEXR/IlmImf/ImfDeepScanLineInputFile.cpp Source/OpenEXR/IlmImf/ImfDeepScanLineInputPart.cpp Source/OpenEXR/IlmImf/ImfDeepScanLineOutputFile.cpp Source/OpenEXR/IlmImf/ImfDeepScanLineOutputPart.cpp Source/OpenEXR/IlmImf/ImfDeepTiledInputFile.cpp Source/OpenEXR/IlmImf/ImfDeepTiledInputPart.cpp Source/OpenEXR/IlmImf/ImfDeepTiledOutputFile.cpp Source/OpenEXR/IlmImf/ImfDeepTiledOutputPart.cpp Source/OpenEXR/IlmImf/ImfDoubleAttribute.cpp Source/OpenEXR/IlmImf/ImfDwaCompressor.cpp Source/OpenEXR/IlmImf/ImfEnvmap.cpp Source/OpenEXR/IlmImf/ImfEnvmapAttribute.cpp Source/OpenEXR/IlmImf/ImfFastHuf.cpp Source/OpenEXR/IlmImf/ImfFloatAttribute.cpp Source/OpenEXR/IlmImf/ImfFloatVectorAttribute.cpp Source/OpenEXR/IlmImf/ImfFrameBuffer.cpp Source/OpenEXR/IlmImf/ImfFramesPerSecond.cpp Source/OpenEXR/IlmImf/ImfGenericInputFile.cpp Source/OpenEXR/IlmImf/ImfGenericOutputFile.cpp Source/OpenEXR/IlmImf/ImfHeader.cpp Source/OpenEXR/IlmImf/ImfHuf.cpp Source/OpenEXR/IlmImf/ImfInputFile.cpp Source/OpenEXR/IlmImf/ImfInputPart.cpp Source/OpenEXR/IlmImf/ImfInputPartData.cpp Source/OpenEXR/IlmImf/ImfIntAttribute.cpp Source/OpenEXR/IlmImf/ImfIO.cpp Source/OpenEXR/IlmImf/ImfKeyCode.cpp Source/OpenEXR/IlmImf/ImfKeyCodeAttribute.cpp Source/OpenEXR/IlmImf/ImfLineOrderAttribute.cpp Source/OpenEXR/IlmImf/ImfLut.cpp Source/OpenEXR/IlmImf/ImfMatrixAttribute.cpp Source/OpenEXR/IlmImf/ImfMisc.cpp Source/OpenEXR/IlmImf/ImfMultiPartInputFile.cpp Source/OpenEXR/IlmImf/ImfMultiPartOutputFile.cpp Source/OpenEXR/IlmImf/ImfMultiView.cpp Source/OpenEXR/IlmImf/ImfOpaqueAttribute.cpp Source/OpenEXR/IlmImf/ImfOutputFile.cpp Source/OpenEXR/IlmImf/ImfOutputPart.cpp Source/OpenEXR/IlmImf/ImfOutputPartData.cpp Source/OpenEXR/IlmImf/ImfPartType.cpp Source/OpenEXR/IlmImf/ImfPizCompressor.cpp Source/OpenEXR/IlmImf/ImfPreviewImage.cpp Source/OpenEXR/IlmImf/ImfPreviewImageAttribute.cpp Source/OpenEXR/IlmImf/ImfPxr24Compressor.cpp Source/OpenEXR/IlmImf/ImfRational.cpp Source/OpenEXR/IlmImf/ImfRationalAttribute.cpp Source/OpenEXR/IlmImf/ImfRgbaFile.cpp Source/OpenEXR/IlmImf/ImfRgbaYca.cpp Source/OpenEXR/IlmImf/ImfRle.cpp Source/OpenEXR/IlmImf/ImfRleCompressor.cpp Source/OpenEXR/IlmImf/ImfScanLineInputFile.cpp Source/OpenEXR/IlmImf/ImfStandardAttributes.cpp Source/OpenEXR/IlmImf/ImfStdIO.cpp Source/OpenEXR/IlmImf/ImfStringAttribute.cpp Source/OpenEXR/IlmImf/ImfStringVectorAttribute.cpp Source/OpenEXR/IlmImf/ImfSystemSpecific.cpp Source/OpenEXR/IlmImf/ImfTestFile.cpp Source/OpenEXR/IlmImf/ImfThreading.cpp Source/OpenEXR/IlmImf/ImfTileDescriptionAttribute.cpp Source/OpenEXR/IlmImf/ImfTiledInputFile.cpp Source/OpenEXR/IlmImf/ImfTiledInputPart.cpp Source/OpenEXR/IlmImf/ImfTiledMisc.cpp Source/OpenEXR/IlmImf/ImfTiledOutputFile.cpp Source/OpenEXR/IlmImf/ImfTiledOutputPart.cpp Source/OpenEXR/IlmImf/ImfTiledRgbaFile.cpp Source/OpenEXR/IlmImf/ImfTileOffsets.cpp Source/OpenEXR/IlmImf/ImfTimeCode.cpp Source/OpenEXR/IlmImf/ImfTimeCodeAttribute.cpp Source/OpenEXR/IlmImf/ImfVecAttribute.cpp Source/OpenEXR/IlmImf/ImfVersion.cpp Source/OpenEXR/IlmImf/ImfWav.cpp Source/OpenEXR/IlmImf/ImfZip.cpp Source/OpenEXR/IlmImf/ImfZipCompressor.cpp Source/OpenEXR/Imath/ImathBox.cpp Source/OpenEXR/Imath/ImathColorAlgo.cpp Source/OpenEXR/Imath/ImathFun.cpp Source/OpenEXR/Imath/ImathMatrixAlgo.cpp Source/OpenEXR/Imath/ImathRandom.cpp Source/OpenEXR/Imath/ImathShear.cpp Source/OpenEXR/Imath/ImathVec.cpp Source/OpenEXR/Iex/IexBaseExc.cpp Source/OpenEXR/Iex/IexThrowErrnoExc.cpp Source/OpenEXR/Half/half.cpp Source/OpenEXR/IlmThread/IlmThread.cpp Source/OpenEXR/IlmThread/IlmThreadMutex.cpp Source/OpenEXR/IlmThread/IlmThreadPool.cpp Source/OpenEXR/IlmThread/IlmThreadSemaphore.cpp Source/OpenEXR/IexMath/IexMathFloatExc.cpp Source/LibRawLite/src/decoders/canon_600.cpp Source/LibRawLite/src/decoders/crx.cpp Source/LibRawLite/src/decoders/decoders_dcraw.cpp Source/LibRawLite/src/decoders/decoders_libraw.cpp Source/LibRawLite/src/decoders/decoders_libraw_dcrdefs.cpp Source/LibRawLite/src/decoders/dng.cpp Source/LibRawLite/src/decoders/fp_dng.cpp Source/LibRawLite/src/decoders/fuji_compressed.cpp Source/LibRawLite/src/decoders/generic.cpp Source/LibRawLite/src/decoders/kodak_decoders.cpp Source/LibRawLite/src/decoders/load_mfbacks.cpp Source/LibRawLite/src/decoders/smal.cpp Source/LibRawLite/src/decoders/unpack.cpp Source/LibRawLite/src/decoders/unpack_thumb.cpp Source/LibRawLite/src/demosaic/aahd_demosaic.cpp Source/LibRawLite/src/demosaic/ahd_demosaic.cpp Source/LibRawLite/src/demosaic/dcb_demosaic.cpp Source/LibRawLite/src/demosaic/dht_demosaic.cpp Source/LibRawLite/src/demosaic/misc_demosaic.cpp Source/LibRawLite/src/demosaic/xtrans_demosaic.cpp Source/LibRawLite/src/integration/dngsdk_glue.cpp Source/LibRawLite/src/integration/rawspeed_glue.cpp Source/LibRawLite/src/libraw_datastream.cpp Source/LibRawLite/src/metadata/adobepano.cpp Source/LibRawLite/src/metadata/canon.cpp Source/LibRawLite/src/metadata/ciff.cpp Source/LibRawLite/src/metadata/cr3_parser.cpp Source/LibRawLite/src/metadata/epson.cpp Source/LibRawLite/src/metadata/exif_gps.cpp Source/LibRawLite/src/metadata/fuji.cpp Source/LibRawLite/src/metadata/hasselblad_model.cpp Source/LibRawLite/src/metadata/identify.cpp Source/LibRawLite/src/metadata/identify_tools.cpp Source/LibRawLite/src/metadata/kodak.cpp Source/LibRawLite/src/metadata/leica.cpp Source/LibRawLite/src/metadata/makernotes.cpp Source/LibRawLite/src/metadata/mediumformat.cpp Source/LibRawLite/src/metadata/minolta.cpp Source/LibRawLite/src/metadata/misc_parsers.cpp Source/LibRawLite/src/metadata/nikon.cpp Source/LibRawLite/src/metadata/normalize_model.cpp Source/LibRawLite/src/metadata/olympus.cpp Source/LibRawLite/src/metadata/p1.cpp Source/LibRawLite/src/metadata/pentax.cpp Source/LibRawLite/src/metadata/samsung.cpp Source/LibRawLite/src/metadata/sony.cpp Source/LibRawLite/src/metadata/tiff.cpp Source/LibRawLite/src/postprocessing/aspect_ratio.cpp Source/LibRawLite/src/postprocessing/dcraw_process.cpp Source/LibRawLite/src/postprocessing/mem_image.cpp Source/LibRawLite/src/postprocessing/postprocessing_aux.cpp Source/LibRawLite/src/postprocessing/postprocessing_utils.cpp Source/LibRawLite/src/postprocessing/postprocessing_utils_dcrdefs.cpp Source/LibRawLite/src/preprocessing/ext_preprocess.cpp Source/LibRawLite/src/preprocessing/raw2image.cpp Source/LibRawLite/src/preprocessing/subtract_black.cpp Source/LibRawLite/src/tables/cameralist.cpp Source/LibRawLite/src/tables/colorconst.cpp Source/LibRawLite/src/tables/colordata.cpp Source/LibRawLite/src/tables/wblists.cpp Source/LibRawLite/src/utils/curves.cpp Source/LibRawLite/src/utils/decoder_info.cpp Source/LibRawLite/src/utils/init_close_utils.cpp Source/LibRawLite/src/utils/open.cpp Source/LibRawLite/src/utils/phaseone_processing.cpp Source/LibRawLite/src/utils/read_utils.cpp Source/LibRawLite/src/utils/thumb_utils.cpp Source/LibRawLite/src/utils/utils_dcraw.cpp Source/LibRawLite/src/utils/utils_libraw.cpp Source/LibRawLite/src/write/file_write.cpp Source/LibRawLite/src/x3f/x3f_parse_process.cpp Source/LibRawLite/src/x3f/x3f_utils_patched.cpp Source/LibWebP/src/dec/alpha_dec.c Source/LibWebP/src/dec/buffer_dec.c Source/LibWebP/src/dec/frame_dec.c Source/LibWebP/src/dec/idec_dec.c Source/LibWebP/src/dec/io_dec.c Source/LibWebP/src/dec/quant_dec.c Source/LibWebP/src/dec/tree_dec.c Source/LibWebP/src/dec/vp8l_dec.c Source/LibWebP/src/dec/vp8_dec.c Source/LibWebP/src/dec/webp_dec.c Source/LibWebP/src/demux/anim_decode.c Source/LibWebP/src/demux/demux.c Source/LibWebP/src/dsp/alpha_processing.c Source/LibWebP/src/dsp/alpha_processing_mips_dsp_r2.c Source/LibWebP/src/dsp/alpha_processing_neon.c Source/LibWebP/src/dsp/alpha_processing_sse2.c Source/LibWebP/src/dsp/alpha_processing_sse41.c Source/LibWebP/src/dsp/cost.c Source/LibWebP/src/dsp/cost_mips32.c Source/LibWebP/src/dsp/cost_mips_dsp_r2.c Source/LibWebP/src/dsp/cost_neon.c Source/LibWebP/src/dsp/cost_sse2.c Source/LibWebP/src/dsp/cpu.c Source/LibWebP/src/dsp/dec.c Source/LibWebP/src/dsp/dec_clip_tables.c Source/LibWebP/src/dsp/dec_mips32.c Source/LibWebP/src/dsp/dec_mips_dsp_r2.c Source/LibWebP/src/dsp/dec_msa.c Source/LibWebP/src/dsp/dec_neon.c Source/LibWebP/src/dsp/dec_sse2.c Source/LibWebP/src/dsp/dec_sse41.c Source/LibWebP/src/dsp/enc.c Source/LibWebP/src/dsp/enc_avx2.c Source/LibWebP/src/dsp/enc_mips32.c Source/LibWebP/src/dsp/enc_mips_dsp_r2.c Source/LibWebP/src/dsp/enc_msa.c Source/LibWebP/src/dsp/enc_neon.c Source/LibWebP/src/dsp/enc_sse2.c Source/LibWebP/src/dsp/enc_sse41.c Source/LibWebP/src/dsp/filters.c Source/LibWebP/src/dsp/filters_mips_dsp_r2.c Source/LibWebP/src/dsp/filters_msa.c Source/LibWebP/src/dsp/filters_neon.c Source/LibWebP/src/dsp/filters_sse2.c Source/LibWebP/src/dsp/lossless.c Source/LibWebP/src/dsp/lossless_enc.c Source/LibWebP/src/dsp/lossless_enc_mips32.c Source/LibWebP/src/dsp/lossless_enc_mips_dsp_r2.c Source/LibWebP/src/dsp/lossless_enc_msa.c Source/LibWebP/src/dsp/lossless_enc_neon.c Source/LibWebP/src/dsp/lossless_enc_sse2.c Source/LibWebP/src/dsp/lossless_enc_sse41.c Source/LibWebP/src/dsp/lossless_mips_dsp_r2.c Source/LibWebP/src/dsp/lossless_msa.c Source/LibWebP/src/dsp/lossless_neon.c Source/LibWebP/src/dsp/lossless_sse2.c Source/LibWebP/src/dsp/lossless_sse41.c Source/LibWebP/src/dsp/rescaler.c Source/LibWebP/src/dsp/rescaler_mips32.c Source/LibWebP/src/dsp/rescaler_mips_dsp_r2.c Source/LibWebP/src/dsp/rescaler_msa.c Source/LibWebP/src/dsp/rescaler_neon.c Source/LibWebP/src/dsp/rescaler_sse2.c Source/LibWebP/src/dsp/ssim.c Source/LibWebP/src/dsp/ssim_sse2.c Source/LibWebP/src/dsp/upsampling.c Source/LibWebP/src/dsp/upsampling_mips_dsp_r2.c Source/LibWebP/src/dsp/upsampling_msa.c Source/LibWebP/src/dsp/upsampling_neon.c Source/LibWebP/src/dsp/upsampling_sse2.c Source/LibWebP/src/dsp/upsampling_sse41.c Source/LibWebP/src/dsp/yuv.c Source/LibWebP/src/dsp/yuv_mips32.c Source/LibWebP/src/dsp/yuv_mips_dsp_r2.c Source/LibWebP/src/dsp/yuv_neon.c Source/LibWebP/src/dsp/yuv_sse2.c Source/LibWebP/src/dsp/yuv_sse41.c Source/LibWebP/src/enc/alpha_enc.c Source/LibWebP/src/enc/analysis_enc.c Source/LibWebP/src/enc/backward_references_cost_enc.c Source/LibWebP/src/enc/backward_references_enc.c Source/LibWebP/src/enc/config_enc.c Source/LibWebP/src/enc/cost_enc.c Source/LibWebP/src/enc/filter_enc.c Source/LibWebP/src/enc/frame_enc.c Source/LibWebP/src/enc/histogram_enc.c Source/LibWebP/src/enc/iterator_enc.c Source/LibWebP/src/enc/near_lossless_enc.c Source/LibWebP/src/enc/picture_csp_enc.c Source/LibWebP/src/enc/picture_enc.c Source/LibWebP/src/enc/picture_psnr_enc.c Source/LibWebP/src/enc/picture_rescale_enc.c Source/LibWebP/src/enc/picture_tools_enc.c Source/LibWebP/src/enc/predictor_enc.c Source/LibWebP/src/enc/quant_enc.c Source/LibWebP/src/enc/syntax_enc.c Source/LibWebP/src/enc/token_enc.c Source/LibWebP/src/enc/tree_enc.c Source/LibWebP/src/enc/vp8l_enc.c Source/LibWebP/src/enc/webp_enc.c Source/LibWebP/src/mux/anim_encode.c Source/LibWebP/src/mux/muxedit.c Source/LibWebP/src/mux/muxinternal.c Source/LibWebP/src/mux/muxread.c Source/LibWebP/src/utils/bit_reader_utils.c Source/LibWebP/src/utils/bit_writer_utils.c Source/LibWebP/src/utils/color_cache_utils.c Source/LibWebP/src/utils/filters_utils.c Source/LibWebP/src/utils/huffman_encode_utils.c Source/LibWebP/src/utils/huffman_utils.c Source/LibWebP/src/utils/quant_levels_dec_utils.c Source/LibWebP/src/utils/quant_levels_utils.c Source/LibWebP/src/utils/random_utils.c Source/LibWebP/src/utils/rescaler_utils.c Source/LibWebP/src/utils/thread_utils.c Source/LibWebP/src/utils/utils.c Source/LibJXR/image/decode/decode.c Source/LibJXR/image/decode/JXRTranscode.c Source/LibJXR/image/decode/postprocess.c Source/LibJXR/image/decode/segdec.c Source/LibJXR/image/decode/strdec.c Source/LibJXR/image/decode/strdec_x86.c Source/LibJXR/image/decode/strInvTransform.c Source/LibJXR/image/decode/strPredQuantDec.c Source/LibJXR/image/encode/encode.c Source/LibJXR/image/encode/segenc.c Source/LibJXR/image/encode/strenc.c Source/LibJXR/image/encode/strenc_x86.c Source/LibJXR/image/encode/strFwdTransform.c Source/LibJXR/image/encode/strPredQuantEnc.c Source/LibJXR/image/sys/adapthuff.c Source/LibJXR/image/sys/image.c Source/LibJXR/image/sys/strcodec.c Source/LibJXR/image/sys/strPredQuant.c Source/LibJXR/image/sys/strTransform.c Source/LibJXR/jxrgluelib/JXRGlue.c Source/LibJXR/jxrgluelib/JXRGlueJxr.c Source/LibJXR/jxrgluelib/JXRGluePFC.c Source/LibJXR/jxrgluelib/JXRMeta.c Wrapper/FreeImagePlus/src/fipImage.cpp Wrapper/FreeImagePlus/src/fipMemoryIO.cpp Wrapper/FreeImagePlus/src/fipMetadataFind.cpp Wrapper/FreeImagePlus/src/fipMultiPage.cpp Wrapper/FreeImagePlus/src/fipTag.cpp Wrapper/FreeImagePlus/src/fipWinImage.cpp Wrapper/FreeImagePlus/src/FreeImagePlus.cpp 
+-INCLUDE = -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit -ISource/LibJPEG -ISource/LibPNG -ISource/LibTIFF4 -ISource/ZLib -ISource/LibOpenJPEG -ISource/OpenEXR -ISource/OpenEXR/Half -ISource/OpenEXR/Iex -ISource/OpenEXR/IlmImf -ISource/OpenEXR/IlmThread -ISource/OpenEXR/Imath -ISource/OpenEXR/IexMath -ISource/LibRawLite -ISource/LibRawLite/dcraw -ISource/LibRawLite/internal -ISource/LibRawLite/libraw -ISource/LibRawLite/src -ISource/LibWebP -ISource/LibJXR -ISource/LibJXR/common/include -ISource/LibJXR/image/sys -ISource/LibJXR/jxrgluelib -IWrapper/FreeImagePlus
++SRCS = ./Source/FreeImage/BitmapAccess.cpp ./Source/FreeImage/ColorLookup.cpp ./Source/FreeImage/ConversionRGBA16.cpp ./Source/FreeImage/ConversionRGBAF.cpp ./Source/FreeImage/FreeImage.cpp ./Source/FreeImage/FreeImageC.c ./Source/FreeImage/FreeImageIO.cpp ./Source/FreeImage/GetType.cpp ./Source/FreeImage/LFPQuantizer.cpp ./Source/FreeImage/MemoryIO.cpp ./Source/FreeImage/PixelAccess.cpp ./Source/FreeImage/J2KHelper.cpp ./Source/FreeImage/MNGHelper.cpp ./Source/FreeImage/Plugin.cpp ./Source/FreeImage/PluginBMP.cpp ./Source/FreeImage/PluginCUT.cpp ./Source/FreeImage/PluginDDS.cpp ./Source/FreeImage/PluginEXR.cpp ./Source/FreeImage/PluginG3.cpp ./Source/FreeImage/PluginGIF.cpp ./Source/FreeImage/PluginHDR.cpp ./Source/FreeImage/PluginICO.cpp ./Source/FreeImage/PluginIFF.cpp ./Source/FreeImage/PluginJ2K.cpp ./Source/FreeImage/PluginJNG.cpp ./Source/FreeImage/PluginJP2.cpp ./Source/FreeImage/PluginJPEG.cpp ./Source/FreeImage/PluginJXR.cpp ./Source/FreeImage/PluginKOALA.cpp ./Source/FreeImage/PluginMNG.cpp ./Source/FreeImage/PluginPCD.cpp ./Source/FreeImage/PluginPCX.cpp ./Source/FreeImage/PluginPFM.cpp ./Source/FreeImage/PluginPICT.cpp ./Source/FreeImage/PluginPNG.cpp ./Source/FreeImage/PluginPNM.cpp ./Source/FreeImage/PluginPSD.cpp ./Source/FreeImage/PluginRAS.cpp ./Source/FreeImage/PluginRAW.cpp ./Source/FreeImage/PluginSGI.cpp ./Source/FreeImage/PluginTARGA.cpp ./Source/FreeImage/PluginTIFF.cpp ./Source/FreeImage/PluginWBMP.cpp ./Source/FreeImage/PluginWebP.cpp ./Source/FreeImage/PluginXBM.cpp ./Source/FreeImage/PluginXPM.cpp ./Source/FreeImage/PSDParser.cpp ./Source/FreeImage/TIFFLogLuv.cpp ./Source/FreeImage/Conversion.cpp ./Source/FreeImage/Conversion16_555.cpp ./Source/FreeImage/Conversion16_565.cpp ./Source/FreeImage/Conversion24.cpp ./Source/FreeImage/Conversion32.cpp ./Source/FreeImage/Conversion4.cpp ./Source/FreeImage/Conversion8.cpp ./Source/FreeImage/ConversionFloat.cpp ./Source/FreeImage/ConversionRGB16.cpp ./Source/FreeImage/ConversionRGBF.cpp ./Source/FreeImage/ConversionType.cpp ./Source/FreeImage/ConversionUINT16.cpp ./Source/FreeImage/Halftoning.cpp ./Source/FreeImage/tmoColorConvert.cpp ./Source/FreeImage/tmoDrago03.cpp ./Source/FreeImage/tmoFattal02.cpp ./Source/FreeImage/tmoReinhard05.cpp ./Source/FreeImage/ToneMapping.cpp ./Source/FreeImage/NNQuantizer.cpp ./Source/FreeImage/WuQuantizer.cpp ./Source/FreeImage/CacheFile.cpp ./Source/FreeImage/MultiPage.cpp ./Source/FreeImage/ZLibInterface.cpp ./Source/Metadata/Exif.cpp ./Source/Metadata/FIRational.cpp ./Source/Metadata/FreeImageTag.cpp ./Source/Metadata/IPTC.cpp ./Source/Metadata/TagConversion.cpp ./Source/Metadata/TagLib.cpp ./Source/Metadata/XTIFF.cpp ./Source/FreeImageToolkit/Background.cpp ./Source/FreeImageToolkit/BSplineRotate.cpp ./Source/FreeImageToolkit/Channels.cpp ./Source/FreeImageToolkit/ClassicRotate.cpp ./Source/FreeImageToolkit/Colors.cpp ./Source/FreeImageToolkit/CopyPaste.cpp ./Source/FreeImageToolkit/Display.cpp ./Source/FreeImageToolkit/Flip.cpp ./Source/FreeImageToolkit/JPEGTransform.cpp ./Source/FreeImageToolkit/MultigridPoissonSolver.cpp ./Source/FreeImageToolkit/Rescale.cpp ./Source/FreeImageToolkit/Resize.cpp Wrapper/FreeImagePlus/src/fipImage.cpp Wrapper/FreeImagePlus/src/fipMemoryIO.cpp Wrapper/FreeImagePlus/src/fipMetadataFind.cpp Wrapper/FreeImagePlus/src/fipMultiPage.cpp Wrapper/FreeImagePlus/src/fipTag.cpp Wrapper/FreeImagePlus/src/fipWinImage.cpp Wrapper/FreeImagePlus/src/FreeImagePlus.cpp 
++INCLUDE = -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit -IWrapper/FreeImagePlus
diff --git a/nixpkgs/pkgs/development/libraries/freenect/default.nix b/nixpkgs/pkgs/development/libraries/freenect/default.nix
new file mode 100644
index 000000000000..387fac6d84ad
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/freenect/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, lib, fetchFromGitHub, cmake, libusb1, pkg-config, freeglut, libGLU, libGL, libXi, libXmu
+, GLUT, Cocoa
+ }:
+
+stdenv.mkDerivation rec {
+  pname = "freenect";
+  version = "0.7.0";
+
+  src = fetchFromGitHub {
+    owner = "OpenKinect";
+    repo = "libfreenect";
+    rev = "v${version}";
+    sha256 = "sha256-Lb5mrl9jiI1Z9UOAlP+bBPNoKNxm5VSrFZRvifEfhoU=";
+  };
+
+  buildInputs = [ libusb1 freeglut libGLU libGL libXi libXmu ]
+    ++ lib.optionals stdenv.isDarwin [ GLUT Cocoa ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  # see https://aur.archlinux.org/cgit/aur.git/commit/PKGBUILD?h=libfreenect&id=0d17db49ba64bcb9e3a4eed61cf55c9a5ceb97f1
+  patchPhase = lib.concatMapStrings (x: ''
+    substituteInPlace ${x} --replace "{GLUT_LIBRARY}" "{GLUT_LIBRARIES}"
+  '') [ "examples/CMakeLists.txt" "wrappers/cpp/CMakeLists.txt" ];
+
+  meta = {
+    description = "Drivers and libraries for the Xbox Kinect device on Windows, Linux, and macOS";
+    homepage = "http://openkinect.org";
+    license = with lib.licenses; [ gpl2 asl20 ];
+    maintainers = with lib.maintainers; [ bennofs ];
+    platforms = with lib.platforms; linux ++ darwin ;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/freetds/default.nix b/nixpkgs/pkgs/development/libraries/freetds/default.nix
new file mode 100644
index 000000000000..df7328b2b043
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/freetds/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchurl, autoreconfHook, pkg-config
+, openssl
+, odbcSupport ? true, unixODBC ? null }:
+
+assert odbcSupport -> unixODBC != null;
+
+# Work is in progress to move to cmake so revisit that later
+
+stdenv.mkDerivation rec {
+  pname = "freetds";
+  version = "1.4.10";
+
+  src = fetchurl {
+    url    = "https://www.freetds.org/files/stable/${pname}-${version}.tar.bz2";
+    hash   = "sha256-x+ryJr3LHNwbIhaWUyzNJfTk53VCZaKXd6NAAIS95pg=";
+  };
+
+  buildInputs = [
+    openssl
+  ] ++ lib.optional odbcSupport unixODBC;
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  meta = with lib; {
+    description = "Libraries to natively talk to Microsoft SQL Server and Sybase databases";
+    homepage    = "https://www.freetds.org";
+    changelog   = "https://github.com/FreeTDS/freetds/releases/tag/v${version}";
+    license     = licenses.lgpl2;
+    maintainers = with maintainers; [ peterhoeg ];
+    platforms   = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/freetts/default.nix b/nixpkgs/pkgs/development/libraries/freetts/default.nix
new file mode 100644
index 000000000000..06535c087dc6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/freetts/default.nix
@@ -0,0 +1,39 @@
+{stdenv, fetchurl, apacheAnt, unzip, sharutils, lib, jdk}:
+
+stdenv.mkDerivation rec {
+  pname = "freetts";
+  version = "1.2.2";
+  src = fetchurl {
+    url = "mirror://sourceforge/freetts/${pname}-${version}-src.zip";
+    sha256 = "0mnikqhpf4f4jdr0irmibr8yy0dnffx1i257y22iamxi7a6by2r7";
+  };
+  nativeBuildInputs = [ unzip ];
+  buildInputs = [ apacheAnt sharutils jdk ];
+  unpackPhase = ''
+    unzip $src -x META-INF/*
+  '';
+
+  buildPhase = ''
+    cd */lib
+    sed -i -e "s/more/cat/" jsapi.sh
+    echo y | sh jsapi.sh
+    cd ..
+    ln -s . src
+    ant
+  '';
+  installPhase = ''
+    install -v -m755 -d $out/{lib,docs/{audio,images}}
+    install -v -m644 lib/*.jar $out/lib
+  '';
+
+  meta = {
+    description = "Text to speech system based on Festival written in Java";
+    longDescription = ''
+      Text to speech system based on Festival written in Java.
+      Can be used in combination with KDE accessibility.
+    '';
+    license = "GPL";
+    homepage = "http://freetts.sourceforge.net";
+    maintainers = [ lib.maintainers.sander ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/freetype/default.nix b/nixpkgs/pkgs/development/libraries/freetype/default.nix
new file mode 100644
index 000000000000..68e08a1a8b5f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/freetype/default.nix
@@ -0,0 +1,121 @@
+{ lib
+, stdenv
+, fetchurl
+, buildPackages
+, pkgsHostHost
+, pkg-config
+, which
+, makeWrapper
+, zlib
+, bzip2
+, brotli
+, libpng
+, gnumake
+, glib
+
+, # FreeType supports LCD filtering (colloquially referred to as sub-pixel rendering).
+  # LCD filtering is also known as ClearType and covered by several Microsoft patents.
+  # This option allows it to be disabled. See http://www.freetype.org/patents.html.
+  useEncumberedCode ? true
+
+  # for passthru.tests
+, cairo
+, fontforge
+, ghostscript
+, graphicsmagick
+, gtk3
+, harfbuzz
+, imagemagick
+, pango
+, poppler
+, python3
+, qt5
+, texmacs
+, ttfautohint
+, testers
+}:
+
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "freetype";
+  version = "2.13.2";
+
+  src = let inherit (finalAttrs) pname version; in fetchurl {
+    url = "mirror://savannah/${pname}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-EpkcTlXFBt1/m3ZZM+Yv0r4uBtQhUF15UKEy5PG7SE0=";
+  };
+
+  propagatedBuildInputs = [ zlib bzip2 brotli libpng ]; # needed when linking against freetype
+
+  # dependence on harfbuzz is looser than the reverse dependence
+  nativeBuildInputs = [ pkg-config which ]
+    ++ lib.optional (!stdenv.hostPlatform.isWindows) makeWrapper
+    # FreeType requires GNU Make, which is not part of stdenv on FreeBSD.
+    ++ lib.optional (!stdenv.isLinux) gnumake;
+
+  patches = [
+    ./enable-table-validation.patch
+  ] ++ lib.optional useEncumberedCode ./enable-subpixel-rendering.patch;
+
+  outputs = [ "out" "dev" ];
+
+  configureFlags = [ "--bindir=$(dev)/bin" "--enable-freetype-config" ];
+
+  # native compiler to generate building tool
+  CC_BUILD = "${buildPackages.stdenv.cc}/bin/cc";
+
+  # The asm for armel is written with the 'asm' keyword.
+  CFLAGS = lib.optionalString stdenv.isAarch32 "-std=gnu99"
+    + lib.optionalString stdenv.hostPlatform.is32bit " -D_FILE_OFFSET_BITS=64";
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  postInstall = glib.flattenInclude
+    # pkgsCross.mingwW64.pkg-config doesn't build
+    # makeWrapper doesn't cross-compile to windows #120726
+    + ''
+    substituteInPlace $dev/bin/freetype-config \
+      --replace ${buildPackages.pkg-config} ${pkgsHostHost.pkg-config}
+  '' + lib.optionalString (!stdenv.hostPlatform.isMinGW) ''
+
+    wrapProgram "$dev/bin/freetype-config" \
+      --set PKG_CONFIG_PATH "$PKG_CONFIG_PATH:$dev/lib/pkgconfig"
+  '';
+
+  passthru.tests = {
+    inherit
+      cairo
+      fontforge
+      ghostscript
+      graphicsmagick
+      gtk3
+      harfbuzz
+      imagemagick
+      pango
+      poppler
+      texmacs
+      ttfautohint;
+    inherit (python3.pkgs) freetype-py;
+    inherit (qt5) qtbase;
+    pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+  };
+
+  meta = with lib; {
+    description = "A font rendering engine";
+    longDescription = ''
+      FreeType is a portable and efficient library for rendering fonts. It
+      supports TrueType, Type 1, CFF fonts, and WOFF, PCF, FNT, BDF and PFR
+      fonts. It has a bytecode interpreter and has an automatic hinter called
+      autofit which can be used instead of hinting instructions included in
+      fonts.
+    '';
+    homepage = "https://www.freetype.org/";
+    changelog = "https://gitlab.freedesktop.org/freetype/freetype/-/raw/VER-${builtins.replaceStrings ["."] ["-"] finalAttrs.version}/docs/CHANGES";
+    license = licenses.gpl2Plus; # or the FreeType License (BSD + advertising clause)
+    platforms = platforms.all;
+    pkgConfigModules = [ "freetype2" ];
+    maintainers = with maintainers; [ ttuegel ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/freetype/enable-subpixel-rendering.patch b/nixpkgs/pkgs/development/libraries/freetype/enable-subpixel-rendering.patch
new file mode 100644
index 000000000000..6b3577eb4f02
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/freetype/enable-subpixel-rendering.patch
@@ -0,0 +1,12 @@
+Index: freetype-2.10.0/include/freetype/config/ftoption.h
+--- a/include/freetype/config/ftoption.h
++++ b/include/freetype/config/ftoption.h
+@@ -126,7 +126,7 @@ FT_BEGIN_HEADER
+    * macro is not defined, FreeType offers alternative LCD rendering
+    * technology that produces excellent output without LCD filtering.
+    */
+-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
++#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+ 
+ 
+   /**************************************************************************
diff --git a/nixpkgs/pkgs/development/libraries/freetype/enable-table-validation.patch b/nixpkgs/pkgs/development/libraries/freetype/enable-table-validation.patch
new file mode 100644
index 000000000000..bd964c3342d8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/freetype/enable-table-validation.patch
@@ -0,0 +1,20 @@
+Index: freetype-2.10.0/modules.cfg
+===================================================================
+--- freetype-2.10.0.orig/modules.cfg
++++ freetype-2.10.0/modules.cfg
+@@ -120,6 +120,6 @@ AUX_MODULES += cache
+ # TrueType GX/AAT table validation.  Needs ftgxval.c below.
+ #
+-# AUX_MODULES += gxvalid
++AUX_MODULES += gxvalid
+ 
+ # Support for streams compressed with gzip (files with suffix .gz).
+ #
+@@ -143,6 +143,6 @@ AUX_MODULES += bzip2
+ # OpenType table validation.  Needs ftotval.c below.
+ #
+-# AUX_MODULES += otvalid
++AUX_MODULES += otvalid
+ 
+ # Auxiliary PostScript driver component to share common code.
+ #
diff --git a/nixpkgs/pkgs/development/libraries/freexl/default.nix b/nixpkgs/pkgs/development/libraries/freexl/default.nix
new file mode 100644
index 000000000000..ac5609425b56
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/freexl/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, stdenv
+, fetchurl
+, validatePkgConfig
+, expat
+, minizip
+, zlib
+, libiconv
+}:
+
+stdenv.mkDerivation rec {
+  pname = "freexl";
+  version = "2.0.0";
+
+  src = fetchurl {
+    url = "https://www.gaia-gis.it/gaia-sins/freexl-${version}.tar.gz";
+    hash = "sha256-F2cF8d5Yq3we679cbeRqt2/Ni4VlCNvSj1ZI98bhp/A=";
+  };
+
+  nativeBuildInputs = [ validatePkgConfig ];
+
+  buildInputs = [
+    expat
+    minizip
+    zlib
+  ] ++ lib.optional stdenv.isDarwin libiconv;
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "A library to extract valid data from within an Excel (.xls) spreadsheet";
+    homepage = "https://www.gaia-gis.it/fossil/freexl";
+    # They allow any of these
+    license = with licenses; [ gpl2Plus lgpl21Plus mpl11 ];
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ sikmir ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/frei0r/default.nix b/nixpkgs/pkgs/development/libraries/frei0r/default.nix
new file mode 100644
index 000000000000..1b0a3007710b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/frei0r/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, config
+, stdenv
+, fetchFromGitHub
+, cairo
+, cmake
+, opencv
+, pcre
+, pkg-config
+, cudaSupport ? config.cudaSupport
+, cudaPackages
+}:
+
+stdenv.mkDerivation rec {
+  pname = "frei0r-plugins";
+  version = "2.3.2";
+
+  src = fetchFromGitHub {
+    owner = "dyne";
+    repo = "frei0r";
+    rev = "v${version}";
+    hash = "sha256-shPCCKcmacSB/mqwLU6BPR1p+/9Myg759MMehj9yijI=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [
+    cairo
+    opencv
+    pcre
+  ] ++ lib.optionals cudaSupport [
+    cudaPackages.cuda_cudart
+    cudaPackages.cuda_nvcc
+  ];
+
+  postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
+    for f in $out/lib/frei0r-1/*.so* ; do
+      ln -s $f "''${f%.*}.dylib"
+    done
+  '';
+
+  meta = with lib; {
+    homepage = "https://frei0r.dyne.org";
+    description = "Minimalist, cross-platform, shared video plugins";
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/fribidi/default.nix b/nixpkgs/pkgs/development/libraries/fribidi/default.nix
new file mode 100644
index 000000000000..613725a2672e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fribidi/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv
+, buildPackages
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, fixDarwinDylibNames
+, python3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fribidi";
+  version = "1.0.13";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  # NOTE: Only URL tarball has "Have pre-generated man pages: true", which works-around upstream usage of some rare ancient `c2man` fossil application.
+  src = fetchurl {
+    url = "https://github.com/fribidi/fribidi/releases/download/v${version}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-f6FsgMgb1iL3sZjTE1baE5zDGKY/x3YSF69BMJA/VKI=";
+  };
+
+  postPatch = ''
+    patchShebangs test
+  '';
+
+  nativeBuildInputs = [ meson ninja pkg-config ]
+    ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+
+  doCheck = true;
+  nativeCheckInputs = [ python3 ];
+
+  meta = with lib; {
+    homepage = "https://github.com/fribidi/fribidi";
+    description = "GNU implementation of the Unicode Bidirectional Algorithm (bidi)";
+    license = licenses.lgpl21;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/frozen/default.nix b/nixpkgs/pkgs/development/libraries/frozen/default.nix
new file mode 100644
index 000000000000..26c47617c1f6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/frozen/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, meson
+, ninja
+}:
+
+stdenv.mkDerivation rec {
+  pname = "frozen";
+  # pin to a newer release if frozen releases again, see cesanta/frozen#72
+  version = "unstable-2021-02-23";
+
+  src = fetchFromGitHub {
+    owner = "cesanta";
+    repo = "frozen";
+    rev = "21f051e3abc2240d9a25b2add6629b38e963e102";
+    hash = "sha256-BpuYK9fbWSpeF8iPT8ImrV3CKKaA5RQ2W0ZQ03TciR0=";
+  };
+
+  nativeBuildInputs = [ meson ninja ];
+
+  # frozen has a simple Makefile and a GN BUILD file as building scripts.
+  # Since it has only two source files, the best course of action to support
+  # cross compilation is to create a small meson.build file.
+  # Relevant upstream issue: https://github.com/cesanta/frozen/pull/71
+  # We also remove the GN BUILD file to prevent conflicts on case-insesitive
+  # file systems.
+  preConfigure = ''
+    rm BUILD
+    cp ${./meson.build} meson.build
+  '';
+
+  meta = {
+    homepage = "https://github.com/cesanta/frozen";
+    description = "Minimal JSON parser for C, targeted for embedded systems";
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ thillux ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/frozen/meson.build b/nixpkgs/pkgs/development/libraries/frozen/meson.build
new file mode 100644
index 000000000000..1db9546491ce
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/frozen/meson.build
@@ -0,0 +1,19 @@
+project(
+    'frozen',
+    'c',
+    default_options: [
+        'c_args=-Wextra -fno-builtin -pedantic',
+        'c_std=c99',
+        'werror=true'
+    ],
+    license: 'Apache-2.0',
+    version: '20210223'
+)
+
+library(
+    'frozen',
+    'frozen.c',
+    install: true
+)
+
+install_headers('frozen.h')
diff --git a/nixpkgs/pkgs/development/libraries/frugally-deep/default.nix b/nixpkgs/pkgs/development/libraries/frugally-deep/default.nix
new file mode 100644
index 000000000000..f275ec5f02ba
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/frugally-deep/default.nix
@@ -0,0 +1,53 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, gitUpdater
+, cmake
+, functionalplus
+, eigen
+, nlohmann_json
+, doctest
+, python3Packages
+, buildTests ? false # Needs tensorflow
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "frugally-deep";
+  version = "0.15.24-p0";
+
+  src = fetchFromGitHub {
+    owner = "Dobiasd";
+    repo = "frugally-deep";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-yg2SMsYOOSOgsdwIH1bU3iPM45z6c7WeIrgOddt3um4=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ] ++ lib.optionals buildTests [
+    python3Packages.python
+    python3Packages.numpy
+  ];
+
+  buildInputs = lib.optionals buildTests [
+    doctest
+    python3Packages.tensorflow
+  ];
+
+  propagatedBuildInputs = [
+    functionalplus
+    eigen
+    nlohmann_json
+  ];
+
+  cmakeFlags = lib.optionals buildTests [ "-DFDEEP_BUILD_UNITTEST=ON" ];
+  passthru.updateScript = gitUpdater;
+
+  meta = with lib; {
+    description = "Header-only library for using Keras (TensorFlow) models in C++";
+    homepage = "https://github.com/Dobiasd/frugally-deep";
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ Madouura ];
+    platforms = platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/fstrcmp/cross.patch b/nixpkgs/pkgs/development/libraries/fstrcmp/cross.patch
new file mode 100644
index 000000000000..f794e3b91da6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fstrcmp/cross.patch
@@ -0,0 +1,24 @@
+diff '--color=auto' -ur fstrcmp-0.7-D001-old/configure.ac fstrcmp-0.7.D001/configure.ac
+--- fstrcmp-0.7-D001-old/configure.ac	2014-03-04 19:13:45.000000000 -0500
++++ fstrcmp-0.7.D001/configure.ac	2020-04-02 13:57:52.805154634 -0400
+@@ -32,6 +32,8 @@
+ AC_OBJEXT
+ AC_EXEEXT
+ 
++LT_INIT
++
+ dnl @synopsis AC_ADD_CFLAGS
+ dnl
+ dnl Add the given option to CFLAGS, if it doesn't break the compiler
+diff '--color=auto' -ur fstrcmp-0.7-D001-old/Makefile.in fstrcmp-0.7.D001/Makefile.in
+--- fstrcmp-0.7-D001-old/Makefile.in	2014-03-04 19:13:45.000000000 -0500
++++ fstrcmp-0.7.D001/Makefile.in	2020-04-02 13:57:12.355269595 -0400
+@@ -37,6 +37,8 @@
+ srcdir = @srcdir@
+ VPATH = @srcdir@
+ 
++top_builddir = $(srcdir)
++
+ #
+ # the name of the install program to use
+ #
diff --git a/nixpkgs/pkgs/development/libraries/fstrcmp/default.nix b/nixpkgs/pkgs/development/libraries/fstrcmp/default.nix
new file mode 100644
index 000000000000..2dfa02e71059
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fstrcmp/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchzip, libtool, ghostscript, groff, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "fstrcmp";
+  version = "0.7";
+
+  src = fetchzip {
+    url = "https://sourceforge.net/projects/fstrcmp/files/fstrcmp/${version}/fstrcmp-${version}.D001.tar.gz";
+    sha256 = "0yg3y3k0wz50gmhgigfi2dx725w1gc8snb95ih7vpcnj6kabgz9a";
+  };
+
+  patches = [ ./cross.patch ];
+
+  outputs = [ "out" "dev" "doc" "man" "devman" ];
+
+  nativeBuildInputs = [ libtool ghostscript groff autoreconfHook ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Make fuzzy comparisons of strings and byte arrays";
+    longDescription = ''
+      The fstrcmp project provides a library that is used to make fuzzy
+      comparisons of strings and byte arrays, including multi-byte character
+      strings.
+    '';
+    homepage = "https://fstrcmp.sourceforge.net/";
+    downloadPage = "https://sourceforge.net/projects/fstrcmp/";
+    license = licenses.gpl3;
+    maintainers = [ maintainers.sephalon ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/fstrm/default.nix b/nixpkgs/pkgs/development/libraries/fstrm/default.nix
new file mode 100644
index 000000000000..15daa7e5a959
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fstrm/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, libevent, openssl }:
+
+stdenv.mkDerivation rec {
+  pname = "fstrm";
+  version = "0.6.1";
+
+  src = fetchFromGitHub {
+    owner = "farsightsec";
+    repo = "fstrm";
+    rev = "v${version}";
+    sha256 = "sha256-/WFP2g3Vuf/qaY8pprY8XFAlpEE+0SJUlFNWfa+7ZlE=";
+  };
+
+  outputs = [ "bin" "out" "dev" ];
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ libevent openssl ];
+
+  preBuild = ''
+    NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -L${openssl}/lib"
+  '';
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Frame Streams implementation in C";
+    homepage = "https://github.com/farsightsec/fstrm";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/ftgl/default.nix b/nixpkgs/pkgs/development/libraries/ftgl/default.nix
new file mode 100644
index 000000000000..b6554979c7ee
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ftgl/default.nix
@@ -0,0 +1,76 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, doxygen
+, freeglut
+, freetype
+, libGL
+, libGLU
+, pkg-config
+, darwin
+}:
+
+let
+  inherit (darwin.apple_sdk.frameworks) OpenGL GLUT;
+in
+stdenv.mkDerivation rec {
+  pname = "ftgl";
+  version = "2.4.0";
+
+  src = fetchFromGitHub {
+    owner = "frankheckenbach";
+    repo = "ftgl";
+    rev = "v${version}";
+    hash = "sha256-6TDNGoMeBLnucmHRgEDIVWcjlJb7N0sTluqBwRMMWn4=";
+  };
+
+  # GL_DYLIB is hardcoded to an impure path
+  # /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
+  # and breaks build on recent macOS versions
+  postPatch = ''
+    substituteInPlace m4/gl.m4 \
+      --replace ' -dylib_file $GL_DYLIB: $GL_DYLIB' ""
+  '';
+
+  nativeBuildInputs = [
+    autoreconfHook
+    doxygen
+    pkg-config
+  ];
+  buildInputs = [
+    freetype
+  ] ++ (if stdenv.isDarwin then [
+    OpenGL
+    GLUT
+  ] else [
+    libGL
+    libGLU
+    freeglut
+  ]);
+
+  configureFlags = [
+    "--with-ft-prefix=${lib.getDev freetype}"
+  ];
+
+  enableParallelBuilding = true;
+
+  postInstall = ''
+    install -Dm644 src/FTSize.h -t ${placeholder "out"}/include/FTGL
+    install -Dm644 src/FTFace.h -t ${placeholder "out"}/include/FTGL
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/frankheckenbach/ftgl";
+    description = "Font rendering library for OpenGL applications";
+    longDescription = ''
+      FTGL is a free cross-platform Open Source C++ library that uses Freetype2
+      to simplify rendering fonts in OpenGL applications. FTGL supports bitmaps,
+      pixmaps, texture maps, outlines, polygon mesh, and extruded polygon
+      rendering modes.
+    '';
+    license = licenses.mit;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ftxui/default.nix b/nixpkgs/pkgs/development/libraries/ftxui/default.nix
new file mode 100644
index 000000000000..b49390c61c53
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ftxui/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, doxygen
+, gbenchmark
+, graphviz
+, gtest
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ftxui";
+  version = "5.0.0";
+
+  src = fetchFromGitHub {
+    owner = "ArthurSonzogni";
+    repo = "ftxui";
+    rev = "v${version}";
+    sha256 = "sha256-IF6G4wwQDksjK8nJxxAnxuCw2z2qvggCmRJ2rbg00+E=";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    cmake
+    doxygen
+    graphviz
+  ];
+
+  checkInputs = [
+    gtest
+    gbenchmark
+  ];
+
+  cmakeFlags = [
+    "-DFTXUI_BUILD_EXAMPLES=OFF"
+    "-DFTXUI_BUILD_DOCS=ON"
+    "-DFTXUI_BUILD_TESTS=${if doCheck then "ON" else "OFF"}"
+  ];
+
+  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
+
+  meta = with lib; {
+    homepage = "https://github.com/ArthurSonzogni/FTXUI";
+    changelog = "https://github.com/ArthurSonzogni/FTXUI/blob/v${version}/CHANGELOG.md";
+    description = "Functional Terminal User Interface library for C++";
+    license = licenses.mit;
+    maintainers = [ maintainers.ivar ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/funambol/default.nix b/nixpkgs/pkgs/development/libraries/funambol/default.nix
new file mode 100644
index 000000000000..3e7bf0d21a2b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/funambol/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchurl, zlib, curl, autoreconfHook, unzip }:
+
+stdenv.mkDerivation rec {
+  pname = "funambol-client-cpp";
+  version = "9.0.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/funambol/funambol-client-sdk-${version}.zip";
+    sha256 = "1667gahz30i5r8kbv7w415z0hbgm6f6pln1137l5skapi1if6r73";
+  };
+
+  postUnpack = ''sourceRoot+="/sdk/cpp/build/autotools"'';
+
+  propagatedBuildInputs = [ zlib curl ];
+
+  nativeBuildInputs = [ autoreconfHook unzip ];
+
+  meta = with lib; {
+    description = "SyncML client sdk by Funambol project";
+    homepage = "https://www.funambol.com";
+    license = licenses.agpl3;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/functionalplus/default.nix b/nixpkgs/pkgs/development/libraries/functionalplus/default.nix
new file mode 100644
index 000000000000..af25030ab560
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/functionalplus/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "functionalplus";
+  version = "0.2.22";
+
+  src = fetchFromGitHub {
+    owner = "Dobiasd";
+    repo = "FunctionalPlus";
+    rev = "v${version}";
+    sha256 = "sha256-y0IRmgG9lhWO4IR4G9/VP2a3B+ORTnF7MCf4FU5EuMk=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "Functional Programming Library for C++";
+    homepage = "https://github.com/Dobiasd/FunctionalPlus";
+    license = licenses.boost;
+    platforms = platforms.all;
+    maintainers = [];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/futuresql/default.nix b/nixpkgs/pkgs/development/libraries/futuresql/default.nix
new file mode 100644
index 000000000000..ed6a7033909a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/futuresql/default.nix
@@ -0,0 +1,17 @@
+{ stdenv, lib, fetchurl, cmake, extra-cmake-modules, qtbase }:
+stdenv.mkDerivation rec {
+  pname = "futuresql";
+  version = "0.1.1";
+
+  src = fetchurl {
+    url = "mirror://kde/stable/futuresql/futuresql-${version}.tar.xz";
+    hash = "sha256-5E7Y1alhizynuimD7ZxfdXLm4KWxmflIaINLccy+vUM=";
+  };
+
+  nativeBuildInputs = [ cmake extra-cmake-modules ];
+  buildInputs = [ qtbase ];
+  cmakeFlags = ["-DQT_MAJOR_VERSION=${lib.versions.major qtbase.version}"];
+
+  # a library, nothing to wrap
+  dontWrapQtApps = true;
+}
diff --git a/nixpkgs/pkgs/development/libraries/fuzzylite/default.nix b/nixpkgs/pkgs/development/libraries/fuzzylite/default.nix
new file mode 100644
index 000000000000..a3f70c062e86
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/fuzzylite/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, ninja
+, useFloat ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fuzzylite";
+  version = "6.0";
+
+  src = fetchFromGitHub {
+    owner = "fuzzylite";
+    repo = "fuzzylite";
+    rev = "v${version}";
+    hash = "sha256-i1txeUE/ZSRggwLDtpS8dd4uuZfHX9w3zRH0gBgGXnk=";
+  };
+  sourceRoot = "${src.name}/fuzzylite";
+
+  outputs = [ "out" "dev" ];
+
+  postPatch = ''
+    substituteInPlace CMakeLists.txt \
+      --replace "-Werror" "-Wno-error"
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    ninja
+  ];
+
+  cmakeFlags = [
+    "-DFL_BUILD_TESTS:BOOL=OFF"
+    "-DFL_USE_FLOAT:BOOL=${if useFloat then "ON" else "OFF"}"
+  ];
+
+  meta = with lib; {
+    description = "A fuzzy logic control library in C++";
+    homepage = "https://fuzzylite.com";
+    changelog = "https://github.com/fuzzylite/fuzzylite/${src.rev}/release/CHANGELOG";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ azahi ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/g2o/default.nix b/nixpkgs/pkgs/development/libraries/g2o/default.nix
new file mode 100644
index 000000000000..cc4339da982a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/g2o/default.nix
@@ -0,0 +1,48 @@
+{ lib, stdenv, mkDerivation, fetchFromGitHub, cmake, eigen, suitesparse, blas
+, lapack, libGLU, qtbase, libqglviewer, spdlog }:
+
+mkDerivation rec {
+  pname = "g2o";
+  version = "20230806";
+
+  src = fetchFromGitHub {
+    owner = "RainerKuemmerle";
+    repo = pname;
+    rev = "${version}_git";
+    hash = "sha256-9u1FFRWe7qvDhzSKdGTduuGBXmmgzcSriGFb/oCJjNA=";
+  };
+
+  # Removes a reference to gcc that is only used in a debug message
+  patches = [ ./remove-compiler-reference.patch ];
+
+  outputs = [ "out" "dev" ];
+  separateDebugInfo = true;
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ eigen suitesparse blas lapack libGLU qtbase libqglviewer ];
+  propagatedBuildInputs = [ spdlog ];
+
+  dontWrapQtApps = true;
+
+  cmakeFlags = [
+    # Detection script is broken
+    "-DQGLVIEWER_INCLUDE_DIR=${libqglviewer}/include/QGLViewer"
+    "-DG2O_BUILD_EXAMPLES=OFF"
+  ] ++ lib.optionals stdenv.isx86_64 [
+    "-DDO_SSE_AUTODETECT=OFF"
+    "-DDISABLE_SSE3=${  if stdenv.hostPlatform.sse3Support   then "OFF" else "ON"}"
+    "-DDISABLE_SSE4_1=${if stdenv.hostPlatform.sse4_1Support then "OFF" else "ON"}"
+    "-DDISABLE_SSE4_2=${if stdenv.hostPlatform.sse4_2Support then "OFF" else "ON"}"
+    "-DDISABLE_SSE4_A=${if stdenv.hostPlatform.sse4_aSupport then "OFF" else "ON"}"
+  ];
+
+  meta = with lib; {
+    description = "A General Framework for Graph Optimization";
+    homepage = "https://github.com/RainerKuemmerle/g2o";
+    license = with licenses; [ bsd3 lgpl3 gpl3 ];
+    maintainers = with maintainers; [ lopsided98 ];
+    platforms = platforms.all;
+    # fatal error: 'qglviewer.h' file not found
+    broken = stdenv.isDarwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/g2o/remove-compiler-reference.patch b/nixpkgs/pkgs/development/libraries/g2o/remove-compiler-reference.patch
new file mode 100644
index 000000000000..347c57802403
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/g2o/remove-compiler-reference.patch
@@ -0,0 +1,25 @@
+From b9bfed09e4e3c481b7eb36bee1ff4202ccf69dee Mon Sep 17 00:00:00 2001
+From: Ben Wolsieffer <benwolsieffer@gmail.com>
+Date: Fri, 17 May 2019 19:05:36 -0400
+Subject: [PATCH] Remove reference to compiler.
+
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a3f66dd..bb05bd0 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -371,7 +371,7 @@ set(G2O_HAVE_CHOLMOD ${CHOLMOD_FOUND})
+ set(G2O_HAVE_CSPARSE ${CSPARSE_FOUND})
+ set(G2O_SHARED_LIBS ${BUILD_SHARED_LIBS})
+ set(G2O_LGPL_SHARED_LIBS ${BUILD_LGPL_SHARED_LIBS})
+-set(G2O_CXX_COMPILER "${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER}")
++set(G2O_CXX_COMPILER "${CMAKE_CXX_COMPILER_ID} unknown")
+ 
+ configure_file(config.h.in "${PROJECT_BINARY_DIR}/g2o/config.h")
+ install(FILES ${PROJECT_BINARY_DIR}/g2o/config.h DESTINATION ${INCLUDES_DESTINATION}/g2o)
+-- 
+2.21.0
+
diff --git a/nixpkgs/pkgs/development/libraries/galario/default.nix b/nixpkgs/pkgs/development/libraries/galario/default.nix
new file mode 100644
index 000000000000..8b54cfb7b879
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/galario/default.nix
@@ -0,0 +1,83 @@
+{ lib, stdenv
+, fetchzip
+, fetchFromGitHub
+, cmake
+, fftw
+, fftwFloat
+, enablePython ? false
+, pythonPackages ? null
+, llvmPackages
+}:
+let
+  # CMake recipes are needed to build galario
+  # Build process would usually download them
+  great-cmake-cookoff = fetchzip {
+    url = "https://github.com/UCL/GreatCMakeCookOff/archive/v2.1.9.tar.gz";
+    sha256 = "1yd53b5gx38g6f44jmjk4lc4igs3p25z6616hfb7aq79ly01q0w2";
+  };
+in
+stdenv.mkDerivation rec {
+  pname = "galario";
+  version = "1.2.2";
+
+  src = fetchFromGitHub {
+    owner = "mtazzari";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0dw88ga50x3jwyfgcarn4azlhiarggvdg262hilm7rbrvlpyvha0";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ fftw fftwFloat ]
+  ++ lib.optional enablePython pythonPackages.python
+  ++ lib.optional stdenv.isDarwin llvmPackages.openmp
+  ;
+
+  propagatedBuildInputs = lib.optionals enablePython [
+    pythonPackages.numpy
+    pythonPackages.cython
+    pythonPackages.pytest
+  ];
+
+  nativeCheckInputs = lib.optionals enablePython [ pythonPackages.scipy pythonPackages.pytest-cov ];
+
+  preConfigure = ''
+    mkdir -p build/external/src
+    cp -r ${great-cmake-cookoff} build/external/src/GreatCMakeCookOff
+    chmod -R 777 build/external/src/GreatCMakeCookOff
+  '';
+
+  preCheck = ''
+    ${if stdenv.isDarwin then "export DYLD_LIBRARY_PATH=$(pwd)/src/" else "export LD_LIBRARY_PATH=$(pwd)/src/"}
+    ${lib.optionalString enablePython "sed -i -e 's|^#!.*|#!${stdenv.shell}|' python/py.test.sh"}
+  '';
+
+  cmakeFlags = lib.optionals enablePython [
+    # RPATH of binary /nix/store/.../lib/python3.10/site-packages/galario/double/libcommon.so contains a forbidden reference to /build/
+    "-DCMAKE_SKIP_BUILD_RPATH=ON"
+  ];
+
+  doCheck = true;
+
+  postInstall = lib.optionalString (stdenv.isDarwin && enablePython) ''
+    install_name_tool -change libgalario.dylib $out/lib/libgalario.dylib $out/lib/python*/site-packages/galario/double/libcommon.so
+    install_name_tool -change libgalario_single.dylib $out/lib/libgalario_single.dylib $out/lib/python*/site-packages/galario/single/libcommon.so
+  '';
+
+  meta = with lib; {
+    description = "GPU Accelerated Library for Analysing Radio Interferometer Observations";
+    longDescription = ''
+      Galario is a library that exploits the computing power of modern
+      graphic cards (GPUs) to accelerate the comparison of model
+      predictions to radio interferometer observations. Namely, it
+      speeds up the computation of the synthetic visibilities given a
+      model image (or an axisymmetric brightness profile) and their
+      comparison to the observations.
+    '';
+    homepage = "https://mtazzari.github.io/galario/";
+    license = licenses.lgpl3;
+    maintainers = [ maintainers.smaret ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gamenetworkingsockets/default.nix b/nixpkgs/pkgs/development/libraries/gamenetworkingsockets/default.nix
new file mode 100644
index 000000000000..3927e6e428a8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gamenetworkingsockets/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchFromGitHub, cmake, ninja, go, protobuf, openssl }:
+
+stdenv.mkDerivation rec {
+  pname = "GameNetworkingSockets";
+  version = "1.4.1";
+
+  src = fetchFromGitHub {
+    owner = "ValveSoftware";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "12741wmpvy7mcvqqmjg4a7ph75rwliwgclhk4imjijqf2qkvsphd";
+  };
+
+  nativeBuildInputs = [ cmake ninja go ];
+
+  cmakeFlags = [ "-G Ninja" ];
+
+  # tmp home for go
+  preBuild = "export HOME=\"$TMPDIR\"";
+
+  buildInputs = [ protobuf ];
+  propagatedBuildInputs = [ openssl ];
+
+  meta = with lib; {
+    description = "GameNetworkingSockets is a basic transport layer for games";
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+    inherit (src.meta) homepage;
+    maintainers = [ maintainers.sternenseemann ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gamin/abstract-socket-namespace.patch b/nixpkgs/pkgs/development/libraries/gamin/abstract-socket-namespace.patch
new file mode 100644
index 000000000000..ff1610559721
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gamin/abstract-socket-namespace.patch
@@ -0,0 +1,73 @@
+From 737452159d521aef2041a2767f3ebf9f68f4b6a9 Mon Sep 17 00:00:00 2001
+From: Christian Kampka <christian@kampka.net>
+Date: Tue, 1 Sep 2020 13:54:35 +0200
+Subject: [PATCH] Pin abstract namespace sockets to host_os
+
+Running programs with AC_RUN_IFELSE fails when cross-compiling.
+Since abstract namespace sockets are linux feature, we can easily
+assume it is available for linux and not for darwin.
+---
+ configure.in | 47 ++++++-----------------------------------------
+ 1 file changed, 6 insertions(+), 41 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index eb129db..0ed82ba 100644
+--- a/configure.in
++++ b/configure.in
+@@ -387,47 +387,12 @@ fi
+ 
+ #### Abstract sockets
+ 
+-AC_MSG_CHECKING(abstract socket namespace)
+-AC_LANG_PUSH(C)
+-AC_RUN_IFELSE([AC_LANG_PROGRAM(
+-[[
+-#include <sys/types.h>
+-#include <stdlib.h>
+-#include <string.h>
+-#include <stdio.h>
+-#include <sys/socket.h>
+-#include <sys/un.h>
+-#include <errno.h>
+-]],
+-[[
+-  int listen_fd;
+-  struct sockaddr_un addr;
+-  
+-  listen_fd = socket (PF_UNIX, SOCK_STREAM, 0);
+-  
+-  if (listen_fd < 0)
+-    {
+-      fprintf (stderr, "socket() failed: %s\n", strerror (errno));
+-      exit (1);
+-    }
+-
+-  memset (&addr, '\0', sizeof (addr));
+-  addr.sun_family = AF_UNIX;
+-  strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test");
+-  addr.sun_path[0] = '\0'; /* this is what makes it abstract */
+-  
+-  if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0)
+-    {
+-       fprintf (stderr, "Abstract socket namespace bind() failed: %s\n", 
+-                strerror (errno));
+-       exit (1);
+-    }
+-  else 
+-    exit (0);
+-]])],
+-              [have_abstract_sockets=yes],
+-              [have_abstract_sockets=no])
+-AC_LANG_POP(C)
++AC_MSG_CHECKING([whether target os has abstract socket namespace])
++if test x$target_os = xlinux-gnu ; then
++    have_abstract_sockets=yes
++else
++    have_abstract_sockets=no
++fi	
+ AC_MSG_RESULT($have_abstract_sockets)
+ 
+ if test x$enable_abstract_sockets = xyes; then
+-- 
+2.25.4
+
diff --git a/nixpkgs/pkgs/development/libraries/gamin/deadlock.patch b/nixpkgs/pkgs/development/libraries/gamin/deadlock.patch
new file mode 100644
index 000000000000..e2abc8ce2d97
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gamin/deadlock.patch
@@ -0,0 +1,68 @@
+Fix for a deadlock:
+https://bugzilla.gnome.org/show_bug.cgi?id=667230
+
+From cc14440eface093548cb3bc7814da11d9a99d283 Mon Sep 17 00:00:00 2001
+From: Anssi Hannula <anssi@mageia.org>
+Date: Wed, 4 Jan 2012 00:23:55 +0200
+Subject: [PATCH] fix possible server deadlock in ih_sub_cancel
+
+ih_sub_foreach() calls ih_sub_cancel() while inotify_lock is locked.
+However, ih_sub_cancel() locks it again, and locking GMutex recursively
+causes undefined behaviour.
+
+Fix that by removing locking from ih_sub_cancel() as ih_sub_foreach()
+is its only user. Also make the function static so that it won't
+accidentally get used by other files without locking (inotify-helper.h
+is an internal server header).
+
+This should fix the intermittent deadlocks I've been experiencing
+causing KDE applications to no longer start, and probably also
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=542361
+---
+ server/inotify-helper.c |    7 ++-----
+ server/inotify-helper.h |    1 -
+ 2 files changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/server/inotify-helper.c b/server/inotify-helper.c
+index d77203e..0789fa4 100644
+--- a/server/inotify-helper.c
++++ b/server/inotify-helper.c
+@@ -123,13 +123,11 @@ ih_sub_add (ih_sub_t * sub)
+ 
+ /**
+  * Cancels a subscription which was being monitored.
++ * inotify_lock must be held when calling.
+  */
+-gboolean
++static gboolean
+ ih_sub_cancel (ih_sub_t * sub)
+ {
+-	G_LOCK(inotify_lock);
+-
+-
+ 	if (!sub->cancelled)
+ 	{
+ 		IH_W("cancelling %s\n", sub->pathname);
+@@ -140,7 +138,6 @@ ih_sub_cancel (ih_sub_t * sub)
+ 		sub_list = g_list_remove (sub_list, sub);
+ 	}
+ 
+-	G_UNLOCK(inotify_lock);
+ 	return TRUE;
+ }
+ 
+diff --git a/server/inotify-helper.h b/server/inotify-helper.h
+index 5d3b6d0..d36b5fd 100644
+--- a/server/inotify-helper.h
++++ b/server/inotify-helper.h
+@@ -34,7 +34,6 @@ gboolean	 ih_startup		(event_callback_t ecb,
+ 					 found_callback_t fcb);
+ gboolean	 ih_running		(void);
+ gboolean	 ih_sub_add		(ih_sub_t *sub);
+-gboolean	 ih_sub_cancel		(ih_sub_t *sub);
+ 
+ /* Return FALSE from 'f' if the subscription should be cancelled */
+ void		 ih_sub_foreach		(void *callerdata, gboolean (*f)(ih_sub_t *sub, void *callerdata));
+-- 
+1.7.7.2
+
diff --git a/nixpkgs/pkgs/development/libraries/gamin/debian-patches.nix b/nixpkgs/pkgs/development/libraries/gamin/debian-patches.nix
new file mode 100644
index 000000000000..a8f334fb3c39
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gamin/debian-patches.nix
@@ -0,0 +1,10 @@
+# Generated by debian-patches.sh from debian-patches.txt
+let
+  prefix = "https://sources.debian.org/data/main/g/gamin/0.1.10-4.1/debian/patches";
+in
+[
+  {
+    url = "${prefix}/17_deprecated_const_return.patch";
+    sha256 = "0bssrqcmyivlpk2g0q71d1yavd4wv1lw34l8qipm0ndljjd6rbrk";
+  }
+]
diff --git a/nixpkgs/pkgs/development/libraries/gamin/debian-patches.txt b/nixpkgs/pkgs/development/libraries/gamin/debian-patches.txt
new file mode 100644
index 000000000000..46d2420b21ed
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gamin/debian-patches.txt
@@ -0,0 +1,2 @@
+gamin/0.1.10-4.1
+17_deprecated_const_return.patch
diff --git a/nixpkgs/pkgs/development/libraries/gamin/default.nix b/nixpkgs/pkgs/development/libraries/gamin/default.nix
new file mode 100644
index 000000000000..a2d6078024d5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gamin/default.nix
@@ -0,0 +1,46 @@
+{ lib, stdenv, fetchurl, fetchpatch, pkg-config, glib, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "gamin";
+  version = "0.1.10";
+
+  src = fetchurl {
+    url = "https://www.gnome.org/~veillard/gamin/sources/gamin-${version}.tar.gz";
+    sha256 = "18cr51y5qacvs2fc2p1bqv32rs8bzgs6l67zhasyl45yx055y218";
+  };
+
+  nativeBuildInputs = [ pkg-config autoreconfHook ];
+
+  buildInputs = [ glib ];
+
+  # `_GNU_SOURCE' is needed, e.g., to get `struct ucred' from
+  # <sys/socket.h> with Glibc 2.9.
+  configureFlags = [
+    "--disable-debug"
+    "--without-python" # python3 not supported
+    "CPPFLAGS=-D_GNU_SOURCE"
+  ];
+
+  preBuild = lib.optionalString stdenv.isDarwin ''
+    sed -i 's/,--version-script=.*$/\\/' libgamin/Makefile
+  '';
+
+  patches = [ ./deadlock.patch ]
+    ++ map fetchurl (import ./debian-patches.nix)
+    ++ lib.optional stdenv.cc.isClang ./returnval.patch
+    ++ lib.optional stdenv.hostPlatform.isMusl (fetchpatch {
+      name = "fix-pthread-mutex.patch";
+      url = "https://git.alpinelinux.org/aports/plain/main/gamin/fix-pthread-mutex.patch?h=3.4-stable&id=a1a836b089573752c1b0da7d144c0948b04e8ea8";
+      sha256 = "13igdbqsxb3sz0h417k6ifmq2n4siwqspj6slhc7fdl5wd1fxmdz";
+    }) ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ./abstract-socket-namespace.patch;
+
+
+  meta = with lib; {
+    homepage    = "https://people.gnome.org/~veillard/gamin/";
+    description = "A file and directory monitoring system";
+    maintainers = with maintainers; [ lovek323 ];
+    license = licenses.gpl2;
+    platforms   = platforms.unix;
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/gamin/returnval.patch b/nixpkgs/pkgs/development/libraries/gamin/returnval.patch
new file mode 100644
index 000000000000..3944b14be64c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gamin/returnval.patch
@@ -0,0 +1,12 @@
+diff -rupN gamin-0.1.10-orig/server/gam_eq.c gamin-0.1.10/server/gam_eq.c
+--- gamin-0.1.10-orig/server/gam_eq.c	2015-04-05 19:25:54.000000000 -0400
++++ gamin-0.1.10/server/gam_eq.c	2015-04-05 19:26:00.000000000 -0400
+@@ -124,7 +124,7 @@ gam_eq_flush (gam_eq_t *eq, GamConnDataP
+ {
+ 	gboolean done_work = FALSE;
+ 	if (!eq)
+-		return;
++		return done_work;
+ 
+ #ifdef GAM_EQ_VERBOSE
+ 	GAM_DEBUG(DEBUG_INFO, "gam_eq: Flushing event queue for %s\n", gam_connection_get_pidname (conn));
diff --git a/nixpkgs/pkgs/development/libraries/ganv/default.nix b/nixpkgs/pkgs/development/libraries/ganv/default.nix
new file mode 100644
index 000000000000..d53206ca667b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ganv/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchgit, graphviz, gtk2, gtkmm2, pkg-config, python3, wafHook }:
+
+stdenv.mkDerivation rec {
+  pname = "ganv";
+  version = "unstable-2019-12-30";
+
+  src = fetchgit {
+    url = "https://gitlab.com/drobilla/${pname}.git";
+    fetchSubmodules = true;
+    rev = "90bd022f8909f92cc5290fdcfc76c626749e1186";
+    sha256 = "01znnalirbqxpz62fbw2c14c8xn117jc92xv6dhb3hln92k9x37f";
+  };
+
+  nativeBuildInputs = [ pkg-config wafHook python3 gtk2 ];
+  buildInputs = [ graphviz gtkmm2 ];
+
+  strictDeps = true;
+
+  meta = with lib; {
+    description = "An interactive Gtk canvas widget for graph-based interfaces";
+    homepage = "http://drobilla.net";
+    license = licenses.gpl3;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
+  };
+  }
diff --git a/nixpkgs/pkgs/development/libraries/garmintools/default.nix b/nixpkgs/pkgs/development/libraries/garmintools/default.nix
new file mode 100644
index 000000000000..e183a24c8128
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/garmintools/default.nix
@@ -0,0 +1,19 @@
+{ lib, stdenv, fetchurl, libusb-compat-0_1 }:
+stdenv.mkDerivation rec {
+  pname = "garmintools";
+  version = "0.10";
+  src = fetchurl {
+    url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/garmintools/${pname}-${version}.tar.gz";
+    sha256 = "1vjc8h0z4kx2h52yc3chxn3wh1krn234fg12sggbia9zjrzhpmgz";
+  };
+  buildInputs = [ libusb-compat-0_1 ];
+  meta = {
+    description = "Provides the ability to communicate with the Garmin Forerunner 305 via the USB interface";
+    homepage = "https://code.google.com/archive/p/garmintools/"; # community clone at https://github.com/ianmartin/garmintools
+    license = lib.licenses.gpl2;
+    maintainers = [ ];
+    platforms = lib.platforms.unix;
+    # never built on aarch64-darwin since first introduction in nixpkgs
+    broken = stdenv.isDarwin && stdenv.isAarch64;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gbenchmark/default.nix b/nixpkgs/pkgs/development/libraries/gbenchmark/default.nix
new file mode 100644
index 000000000000..7292b3452826
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gbenchmark/default.nix
@@ -0,0 +1,46 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, gtest
+, prometheus-cpp
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gbenchmark";
+  version = "1.8.3";
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "benchmark";
+    rev = "v${version}";
+    sha256 = "sha256-gztnxui9Fe/FTieMjdvfJjWHjkImtlsHn6fM1FruyME=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  postPatch = ''
+    cp -r ${gtest.src} googletest
+    chmod -R u+w googletest
+
+    # https://github.com/google/benchmark/issues/1396
+    substituteInPlace cmake/benchmark.pc.in \
+      --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
+      --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
+  '';
+
+  # Tests fail on 32-bit due to not enough precision
+  doCheck = stdenv.is64bit;
+
+  passthru.tests = {
+    inherit prometheus-cpp;
+  };
+
+  meta = with lib; {
+    description = "A microbenchmark support library";
+    homepage = "https://github.com/google/benchmark";
+    license = licenses.asl20;
+    platforms = platforms.linux ++ platforms.darwin;
+    maintainers = with maintainers; [ abbradar ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gcab/default.nix b/nixpkgs/pkgs/development/libraries/gcab/default.nix
new file mode 100644
index 000000000000..b31e93553766
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gcab/default.nix
@@ -0,0 +1,81 @@
+{ lib, stdenv
+, fetchurl
+, gettext
+, gobject-introspection
+, gtk-doc
+, docbook_xsl
+, docbook_xml_dtd_43
+, pkg-config
+, meson
+, ninja
+, vala
+, glib
+, zlib
+, gnome
+, nixosTests
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gcab";
+  version = "1.6";
+
+  outputs = [ "bin" "out" "dev" "devdoc" "installedTests" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/gcab/${lib.versions.majorMinor version}/gcab-${version}.tar.xz";
+    hash = "sha256-LwyWFVd8QSaQniUfneBibD7noVI3bBW1VE3xD8h+Vgs=";
+  };
+
+  patches = [
+    # allow installing installed tests to a separate output
+    ./installed-tests-path.patch
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    vala
+    gettext
+    gobject-introspection
+    gtk-doc
+    docbook_xsl
+    docbook_xml_dtd_43
+  ];
+
+  buildInputs = [
+    glib
+    zlib
+  ];
+
+  # required by libgcab-1.0.pc
+  propagatedBuildInputs = [
+    glib
+  ];
+
+  mesonFlags = [
+    "-Dinstalled_tests=true"
+    "-Dinstalled_test_prefix=${placeholder "installedTests"}"
+  ];
+
+  doCheck = true;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "none";
+    };
+
+    tests = {
+      installedTests = nixosTests.installed-tests.gcab;
+    };
+  };
+
+  meta = with lib; {
+    description = "GObject library to create cabinet files";
+    homepage = "https://gitlab.gnome.org/GNOME/gcab";
+    license = licenses.lgpl21Plus;
+    maintainers = teams.gnome.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gcab/installed-tests-path.patch b/nixpkgs/pkgs/development/libraries/gcab/installed-tests-path.patch
new file mode 100644
index 000000000000..ab3b6b3fae3f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gcab/installed-tests-path.patch
@@ -0,0 +1,21 @@
+diff --git a/meson_options.txt b/meson_options.txt
+index c1b1da1..9b76022 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -4,3 +4,4 @@
+ option('vapi', type : 'boolean', value : true, description: 'generate Vala bindings (requires introspection)')
+ option('tests', type : 'boolean', value : true, description : 'enable tests')
+ option('installed_tests', type : 'boolean', value : false, description : 'install tests for "as-installed" testing')
++option('installed_test_prefix', type: 'string', value: '', description: 'Prefix for installed tests')
+diff --git a/tests/meson.build b/tests/meson.build
+index 1e46e2a..aa780d0 100644
+--- a/tests/meson.build
++++ b/tests/meson.build
+@@ -1,5 +1,5 @@
+-installed_tests_metadir = join_paths(get_option('datadir'), 'installed-tests', 'libgcab-1.0')
+-installed_tests_execdir = join_paths(get_option('libexecdir'), 'installed-tests', 'libgcab-1.0')
++installed_tests_metadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests', 'libgcab-1.0')
++installed_tests_execdir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests', 'libgcab-1.0')
+ installed_tests_enabled = get_option('installed_tests')
+ installed_tests_template_tap = files('template-tap.test.in')
+ abs_installed_tests_execdir = join_paths(get_option('prefix'), installed_tests_execdir)
diff --git a/nixpkgs/pkgs/development/libraries/gcc/libgcc/default.nix b/nixpkgs/pkgs/development/libraries/gcc/libgcc/default.nix
new file mode 100644
index 000000000000..600ca69f46d0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gcc/libgcc/default.nix
@@ -0,0 +1,141 @@
+{ lib, stdenvNoLibs, buildPackages
+, gcc, glibc
+, libiberty
+}:
+
+let
+  stdenv = stdenvNoLibs;
+  gccConfigureFlags = gcc.cc.configureFlags ++ [
+    "--disable-fixincludes"
+    "--disable-intl"
+    "--enable-threads=posix"
+    "--with-glibc-version=${glibc.version}"
+    "--disable-plugin"
+
+    # these are required in order to prevent inhibit_libc=true,
+    # which will cripple libgcc's unwinder; see:
+    #  https://github.com/NixOS/nixpkgs/issues/213453#issuecomment-1616346163
+    "--with-headers=${lib.getDev glibc}/include"
+    "--with-native-system-header-dir=${lib.getDev glibc}${glibc.incdir or "/include"}"
+    "--with-build-sysroot=/"
+  ];
+
+in stdenv.mkDerivation (finalAttrs: {
+  pname = "libgcc";
+  inherit (gcc.cc) src version;
+
+  outputs = [ "out" "dev" ];
+
+  strictDeps = true;
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+  nativeBuildInputs = [ libiberty ];
+  buildInputs = [ glibc ];
+
+  postUnpack = ''
+    mkdir -p ./build
+    buildRoot=$(readlink -e "./build")
+  '';
+
+  postPatch =
+    gcc.cc.passthru.forceLibgccToBuildCrtStuff
+    + ''
+      sourceRoot=$(readlink -e "./libgcc")
+    '';
+
+  hardeningDisable = [ "pie" ];
+
+  preConfigure =
+  ''
+    # Drop in libiberty, as external builds are not expected
+    cd "$buildRoot"
+    (
+      mkdir -p build-${stdenv.buildPlatform.config}/libiberty/
+      cd build-${stdenv.buildPlatform.config}/libiberty/
+      ln -s ${buildPackages.libiberty}/lib/libiberty.a ./
+    )
+    mkdir -p "$buildRoot/gcc"
+    cd "$buildRoot/gcc"
+    (
+      # We "shift" the tools over to fake platforms perspective from the previous stage.
+      export AS_FOR_BUILD=${buildPackages.stdenv.cc}/bin/$AS_FOR_BUILD
+      export CC_FOR_BUILD=${buildPackages.stdenv.cc}/bin/$CC_FOR_BUILD
+      export CPP_FOR_BUILD=${buildPackages.stdenv.cc}/bin/$CPP_FOR_BUILD
+      export CXX_FOR_BUILD=${buildPackages.stdenv.cc}/bin/$CXX_FOR_BUILD
+      export LD_FOR_BUILD=${buildPackages.stdenv.cc.bintools}/bin/$LD_FOR_BUILD
+
+      export AS=$AS_FOR_BUILD
+      export CC=$CC_FOR_BUILD
+      export CPP=$CPP_FOR_BUILD
+      export CXX=$CXX_FOR_BUILD
+      export LD=$LD_FOR_BUILD
+
+      export AS_FOR_TARGET=${stdenv.cc}/bin/$AS
+      export CC_FOR_TARGET=${stdenv.cc}/bin/$CC
+      export CPP_FOR_TARGET=${stdenv.cc}/bin/$CPP
+      export LD_FOR_TARGET=${stdenv.cc.bintools}/bin/$LD
+
+      # We define GENERATOR_FILE so nothing bothers looking for GNU GMP.
+      export NIX_CFLAGS_COMPILE_FOR_BUILD+=' -DGENERATOR_FILE=1'
+
+      "$sourceRoot/../gcc/configure" ${lib.concatStringsSep " " gccConfigureFlags}
+
+      # We remove the `libgcc.mvar` deps so that the bootstrap xgcc isn't built.
+      sed -e 's,libgcc.mvars:.*$,libgcc.mvars:,' -i Makefile
+
+      make \
+        config.h \
+        libgcc.mvars \
+        tconfig.h \
+        tm.h \
+        options.h \
+        insn-constants.h \
+  '' + lib.optionalString stdenv.targetPlatform.isM68k ''
+        sysroot-suffix.h \
+  '' + lib.optionalString stdenv.targetPlatform.isAarch32 ''
+        arm-isa.h \
+        arm-cpu.h \
+  '' + ''
+        insn-modes.h
+    )
+    mkdir -p "$buildRoot/gcc/include"
+
+    # Preparing to configure + build libgcc itself
+    mkdir -p "$buildRoot/gcc/${stdenv.hostPlatform.config}/libgcc"
+    cd "$buildRoot/gcc/${stdenv.hostPlatform.config}/libgcc"
+    configureScript=$sourceRoot/configure
+    chmod +x "$configureScript"
+
+    export AS_FOR_BUILD=${buildPackages.stdenv.cc}/bin/$AS_FOR_BUILD
+    export CC_FOR_BUILD=${buildPackages.stdenv.cc}/bin/$CC_FOR_BUILD
+    export CPP_FOR_BUILD=${buildPackages.stdenv.cc}/bin/$CPP_FOR_BUILD
+    export CXX_FOR_BUILD=${buildPackages.stdenv.cc}/bin/$CXX_FOR_BUILD
+    export LD_FOR_BUILD=${buildPackages.stdenv.cc.bintools}/bin/$LD_FOR_BUILD
+
+    export AS=${stdenv.cc}/bin/$AS
+    export CC=${stdenv.cc}/bin/$CC
+    export CPP=${stdenv.cc}/bin/$CPP
+    export CXX=${stdenv.cc}/bin/$CXX
+    export LD=${stdenv.cc.bintools}/bin/$LD
+
+    export AS_FOR_TARGET=${stdenv.cc}/bin/$AS_FOR_TARGET
+    export CC_FOR_TARGET=${stdenv.cc}/bin/$CC_FOR_TARGET
+    export CPP_FOR_TARGET=${stdenv.cc}/bin/$CPP_FOR_TARGET
+    export LD_FOR_TARGET=${stdenv.cc.bintools}/bin/$LD_FOR_TARGET
+  '';
+
+  configurePlatforms = [ "build" "host" ];
+  configureFlags = [
+    "cross_compiling=true"
+    "--disable-gcov"
+    "--with-glibc-version=${glibc.version}"
+  ];
+
+  makeFlags = [ "MULTIBUILDTOP:=../" ];
+
+  postInstall = ''
+    moveToOutput "lib/gcc/${stdenv.hostPlatform.config}/${finalAttrs.version}/include" "$dev"
+    mkdir -p "$out/lib" "$dev/include"
+    ln -s "$out/lib/gcc/${stdenv.hostPlatform.config}/${finalAttrs.version}"/* "$out/lib"
+    ln -s "$dev/lib/gcc/${stdenv.hostPlatform.config}/${finalAttrs.version}/include"/* "$dev/include/"
+  '';
+})
diff --git a/nixpkgs/pkgs/development/libraries/gcc/libstdc++/5.nix b/nixpkgs/pkgs/development/libraries/gcc/libstdc++/5.nix
new file mode 100644
index 000000000000..48a034aebceb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gcc/libstdc++/5.nix
@@ -0,0 +1,119 @@
+{ lib, stdenv, fetchurl, fetchpatch, flex, bison, file }:
+
+stdenv.mkDerivation rec {
+  pname = "libstdc++5";
+  version = "3.3.6";
+
+  src = [
+    (fetchurl {
+      url = "mirror://gcc/releases/gcc-${version}/gcc-core-${version}.tar.bz2";
+      sha256 = "1dpyrpsgakilz2rnh5f8gvrzq5pwzvndacc0df6m04bpqn5fx6sg";
+    })
+    (fetchurl {
+      url = "mirror://gcc/releases/gcc-${version}/gcc-g++-${version}.tar.bz2";
+      sha256 = "14lxl81f7adpc9jxfiwzdxsdzs5zv4piv8xh7f9w910hfzrgvsby";
+    })
+  ];
+
+  patches = [
+    ./no-sys-dirs.patch
+    (fetchpatch {
+      name = "siginfo.patch";
+      url = "https://raw.githubusercontent.com/archlinux/svntogit-packages/e36ee8ed9bb5942db14cf6249a2ead14974a2bfa/trunk/siginfo.patch";
+      sha256 = "15zldbm33yba293dgrgsbv3j332hkc3iqpyc8fa7zl42mh9qk22j";
+      extraPrefix = "";
+    })
+    (fetchpatch {
+      name = "gcc-3.4.3-no_multilib_amd64.patch";
+      url = "https://raw.githubusercontent.com/archlinux/svntogit-packages/e36ee8ed9bb5942db14cf6249a2ead14974a2bfa/trunk/gcc-3.4.3-no_multilib_amd64.patch";
+      sha256 = "11m5lc51b0addhc4yq4rz0dwpv6k73rrj73wya3lqdk8rly6cjpm";
+      extraPrefix = "";
+    })
+    # Required because of glibc 2.26
+    ./struct-ucontext.patch
+  ];
+
+  postPatch = ''
+    # fix build issue with recent gcc
+    sed -i "s#O_CREAT#O_CREAT, 0666#" gcc/collect2.c
+
+    # No fixincludes
+    sed -i -e 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
+  '';
+
+  preConfigure = ''
+    mkdir ../build
+    cd ../build
+    configureScript=../$sourceRoot/configure
+  '';
+
+  preBuild = ''
+    # libstdc++ needs this; otherwise it will use /lib/cpp, which is a Bad
+    # Thing.
+    export CPP="gcc -E"
+
+    # Use *real* header files, otherwise a limits.h is generated
+    # that does not include Glibc's limits.h (notably missing
+    # SSIZE_MAX, which breaks the build).
+    export NIX_FIXINC_DUMMY="$(cat $NIX_CC/nix-support/orig-libc-dev)/include"
+
+    # The path to the Glibc binaries such as `crti.o'.
+    glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
+
+    # Figure out what extra flags to pass to the gcc compilers
+    # being generated to make sure that they use our glibc.
+    EXTRA_FLAGS="-I$NIX_FIXINC_DUMMY $(cat $NIX_CC/nix-support/libc-crt1-cflags) $(cat $NIX_CC/nix-support/libc-cflags) -O2"
+
+    extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $(cat $NIX_BINTOOLS/nix-support/libc-ldflags || true) $(cat $NIX_BINTOOLS/nix-support/libc-ldflags-before || true)"
+    for i in $extraLDFlags; do
+      EXTRA_FLAGS="$EXTRA_FLAGS -Wl,$i"
+    done
+
+    # CFLAGS_FOR_TARGET are needed for the libstdc++ configure script to find
+    # the startfiles.
+    # FLAGS_FOR_TARGET are needed for the target libraries to receive the -Bxxx
+    # for the startfiles.
+    makeFlagsArray=( \
+      "''${makeFlagsArray[@]}" \
+      NATIVE_SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \
+      SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \
+      CFLAGS_FOR_BUILD="$EXTRA_FLAGS" \
+      CFLAGS_FOR_TARGET="$EXTRA_FLAGS" \
+      CXXFLAGS_FOR_BUILD="$EXTRA_FLAGS" \
+      CXXFLAGS_FOR_TARGET="$EXTRA_FLAGS" \
+      FLAGS_FOR_TARGET="$EXTRA_FLAGS" \
+      LDFLAGS_FOR_BUILD="$EXTRA_FLAGS" \
+      LDFLAGS_FOR_TARGET="$EXTRA_FLAGS" \
+      BOOT_CFLAGS="$EXTRA_FLAGS" \
+      BOOT_LDFLAGS="$EXTRA_FLAGS"
+      )
+  '';
+
+  hardeningDisable = [ "format" ];
+
+  nativeBuildInputs = [ flex bison file ];
+
+  configureFlags = [ "--disable-multilib" "--enable-__cxa-atexit" "--enable-threads=posix" "--enable-languages=c++" "--enable-clocale=gnu" ];
+
+  buildFLags = [ "all-target-libstdc++-v3" ];
+
+  installFlags = [ "install-target-libstdc++-v3" ];
+
+  postInstall = ''
+    # Remove includefiles and libs provided by gcc
+    shopt -s extglob
+    rm -rf $out/{bin,include,share,man,info}
+    rm -f $out/lib/*.a
+    rm -rf $out/lib/!(libstdc++*)
+  '';
+
+  meta = with lib; {
+    homepage = "https://gcc.gnu.org/";
+    license = licenses.lgpl3Plus;
+    description = "GNU Compiler Collection, version ${version} -- C++ standard library";
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ abbradar ];
+    # never built on aarch64-linux since first introduction in nixpkgs
+    broken = stdenv.isLinux && stdenv.isAarch64;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gcc/libstdc++/no-sys-dirs.patch b/nixpkgs/pkgs/development/libraries/gcc/libstdc++/no-sys-dirs.patch
new file mode 100644
index 000000000000..8c91d75f2a53
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gcc/libstdc++/no-sys-dirs.patch
@@ -0,0 +1,53 @@
+diff -ru3 gcc-3.3.6-old/gcc/cppdefault.c gcc-3.3.6/gcc/cppdefault.c
+--- gcc-3.3.6-old/gcc/cppdefault.c	2003-11-07 02:13:31.000000000 +0300
++++ gcc-3.3.6/gcc/cppdefault.c	2016-09-02 16:00:03.492484016 +0300
+@@ -26,6 +26,10 @@
+ #include "system.h"
+ #include "cppdefault.h"
+ 
++#undef LOCAL_INCLUDE_DIR
++#undef SYSTEM_INCLUDE_DIR
++#undef STANDARD_INCLUDE_DIR
++
+ const struct default_include cpp_include_defaults[]
+ #ifdef INCLUDE_DEFAULTS
+ = INCLUDE_DEFAULTS;
+diff -ru3 gcc-3.3.6-old/gcc/gcc.c gcc-3.3.6/gcc/gcc.c
+--- gcc-3.3.6-old/gcc/gcc.c	2004-04-01 20:55:17.000000000 +0400
++++ gcc-3.3.6/gcc/gcc.c	2016-09-02 16:01:24.843520114 +0300
+@@ -6130,10 +6130,6 @@
+ 		      NULL, PREFIX_PRIORITY_LAST, 0, NULL, 1);
+ 	}
+ 
+-      add_sysrooted_prefix (&startfile_prefixes, standard_startfile_prefix_1,
+-			    "BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL, 1);
+-      add_sysrooted_prefix (&startfile_prefixes, standard_startfile_prefix_2,
+-			    "BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL, 1);
+ #if 0 /* Can cause surprises, and one can use -B./ instead.  */
+       add_prefix (&startfile_prefixes, "./", NULL,
+ 		  PREFIX_PRIORITY_LAST, 1, NULL, 0);
+diff -ru3 gcc-3.3.6-old/gcc/Makefile.in gcc-3.3.6/gcc/Makefile.in
+--- gcc-3.3.6-old/gcc/Makefile.in	2004-04-01 20:55:23.000000000 +0400
++++ gcc-3.3.6/gcc/Makefile.in	2016-09-02 16:00:03.493484017 +0300
+@@ -260,7 +260,11 @@
+ PARTITION_H = $(srcdir)/../include/partition.h
+ 
+ # Default native SYSTEM_HEADER_DIR, to be overridden by targets.
+-NATIVE_SYSTEM_HEADER_DIR = /usr/include
++# Nix: we override NATIVE_SYSTEM_HEADER_DIR in order to prevent
++# `fixinc' from fixing header files in /usr/include.  However,
++# NATIVE_SYSTEM_HEADER_DIR must point to an existing directory, so set
++# it to some dummy directory.
++NATIVE_SYSTEM_HEADER_DIR = $(NIX_FIXINC_DUMMY)
+ # Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
+ CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
+ 
+@@ -2201,7 +2205,7 @@
+   -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
+   -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_alias)\" \
+   -DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \
+-  -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \
++  -DLOCAL_INCLUDE_DIR=\"/no-such-dir\" \
+   -DCROSS_INCLUDE_DIR=\"$(CROSS_SYSTEM_HEADER_DIR)\" \
+   -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
+   @TARGET_SYSTEM_ROOT_DEFINE@
diff --git a/nixpkgs/pkgs/development/libraries/gcc/libstdc++/struct-ucontext.patch b/nixpkgs/pkgs/development/libraries/gcc/libstdc++/struct-ucontext.patch
new file mode 100644
index 000000000000..5462e0e33ecd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gcc/libstdc++/struct-ucontext.patch
@@ -0,0 +1,61 @@
+diff --git a/gcc/config/alpha/linux.h b/gcc/config/alpha/linux.h
+index 3a2940c..67f9899 100644
+--- a/gcc/config/alpha/linux.h
++++ b/gcc/config/alpha/linux.h
+@@ -89,7 +89,7 @@ Boston, MA 02111-1307, USA.  */
+       {									\
+ 	struct rt_sigframe {						\
+ 	  struct siginfo info;						\
+-	  struct ucontext uc;						\
++	  ucontext_t uc;						\
+ 	} *rt_ = (CONTEXT)->cfa;					\
+ 	sc_ = &rt_->uc.uc_mcontext;					\
+       }									\
+diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
+index e86ab3d..30797a7 100644
+--- a/gcc/config/i386/linux.h
++++ b/gcc/config/i386/linux.h
+@@ -260,7 +260,7 @@ Boston, MA 02111-1307, USA.  */
+ 	  siginfo_t *pinfo;					\
+ 	  void *puc;							\
+ 	  siginfo_t info;						\
+-	  struct ucontext uc;						\
++	  ucontext_t uc;						\
+ 	} *rt_ = (CONTEXT)->cfa;					\
+ 	sc_ = (struct sigcontext *) &rt_->uc.uc_mcontext;		\
+       }									\
+diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
+index fbfaa58..200c8dc 100644
+--- a/gcc/config/i386/linux64.h
++++ b/gcc/config/i386/linux64.h
+@@ -112,7 +112,7 @@ Boston, MA 02111-1307, USA.  */
+     if (*(unsigned char *)(pc_+0) == 0x48				\
+ 	&& *(unsigned long *)(pc_+1) == 0x050f0000000fc0c7)		\
+       {									\
+-	struct ucontext *uc_ = (CONTEXT)->cfa;				\
++	ucontext_t *uc_ = (CONTEXT)->cfa;				\
+ 	sc_ = (struct sigcontext *) &uc_->uc_mcontext;			\
+       }									\
+     else								\
+@@ -182,7 +182,7 @@ Boston, MA 02111-1307, USA.  */
+ 	  struct siginfo *pinfo;					\
+ 	  void *puc;							\
+ 	  struct siginfo info;						\
+-	  struct ucontext uc;						\
++	  ucontext_t uc;						\
+ 	} *rt_ = (CONTEXT)->cfa;					\
+ 	sc_ = (struct sigcontext *) &rt_->uc.uc_mcontext;		\
+       }									\
+diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h
+index ba70ec1..0fff8b1 100644
+--- a/gcc/config/rs6000/linux.h
++++ b/gcc/config/rs6000/linux.h
+@@ -101,7 +101,7 @@ Boston, MA 02111-1307, USA.  */
+ 
+ struct kernel_old_ucontext {
+   unsigned long     uc_flags;
+-  struct ucontext  *uc_link;
++  ucontext_t       *uc_link;
+   stack_t           uc_stack;
+   struct sigcontext_struct uc_mcontext;
+   sigset_t          uc_sigmask;
diff --git a/nixpkgs/pkgs/development/libraries/gcr/4.nix b/nixpkgs/pkgs/development/libraries/gcr/4.nix
new file mode 100644
index 000000000000..650d87958c5e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gcr/4.nix
@@ -0,0 +1,113 @@
+{ stdenv
+, lib
+, fetchurl
+, pkg-config
+, meson
+, ninja
+, gettext
+, gnupg
+, p11-kit
+, glib
+, libgcrypt
+, libtasn1
+, gtk4
+, pango
+, libsecret
+, openssh
+, systemd
+, gobject-introspection
+, wrapGAppsHook4
+, vala
+, gi-docgen
+, gnome
+, python3
+, shared-mime-info
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gcr";
+  version = "4.1.0";
+
+  outputs = [ "out" "bin" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "nOqtKShLqRm5IW4oiMGOxnJAwsk7OkhWvFSIu8Hzo4M=";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+    meson
+    ninja
+    gettext
+    gobject-introspection
+    gi-docgen
+    wrapGAppsHook4
+    vala
+    gi-docgen
+    shared-mime-info
+  ];
+
+  buildInputs = [
+    gnupg
+    libgcrypt
+    libtasn1
+    pango
+    libsecret
+    openssh
+    systemd
+    gtk4
+  ];
+
+  propagatedBuildInputs = [
+    glib
+    p11-kit
+  ];
+
+  nativeCheckInputs = [
+    python3
+  ];
+
+  mesonFlags = [
+    # We are still using ssh-agent from gnome-keyring.
+    # https://github.com/NixOS/nixpkgs/issues/140824
+    "-Dssh_agent=false"
+  ];
+
+  doCheck = false; # fails 21 out of 603 tests, needs dbus daemon
+
+  PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "${placeholder "out"}/lib/systemd/user";
+
+  postPatch = ''
+    patchShebangs gcr/fixtures/
+  '';
+
+  postFixup = ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      attrPath = "gcr_4";
+      packageName = pname;
+    };
+  };
+
+  meta = with lib; {
+    platforms = platforms.unix;
+    maintainers = teams.gnome.members;
+    description = "GNOME crypto services (daemon and tools)";
+    homepage = "https://gitlab.gnome.org/GNOME/gcr";
+    license = licenses.lgpl2Plus;
+
+    longDescription = ''
+      GCR is a library for displaying certificates, and crypto UI, accessing
+      key stores. It also provides the viewer for crypto files on the GNOME
+      desktop.
+
+      GCK is a library for accessing PKCS#11 modules like smart cards, in a
+      (G)object oriented way.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gcr/default.nix b/nixpkgs/pkgs/development/libraries/gcr/default.nix
new file mode 100644
index 000000000000..1fec6100bf2b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gcr/default.nix
@@ -0,0 +1,121 @@
+{ stdenv
+, lib
+, fetchurl
+, pkg-config
+, meson
+, ninja
+, gettext
+, gnupg
+, p11-kit
+, glib
+, libgcrypt
+, libtasn1
+, gtk3
+, pango
+, libsecret
+, openssh
+, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd
+, gobject-introspection
+, wrapGAppsHook
+, gi-docgen
+, vala
+, gnome
+, python3
+, shared-mime-info
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gcr";
+  version = "3.41.2";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "utEPPFU6DhhUZJq1nFskNNoiyhpUrmE48fU5YVZ+Grc=";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+    meson
+    python3
+    ninja
+    gettext
+    gobject-introspection
+    gi-docgen
+    wrapGAppsHook
+    vala
+    shared-mime-info
+    gnupg
+    openssh
+  ];
+
+  buildInputs = [
+    libgcrypt
+    libtasn1
+    pango
+    libsecret
+    openssh
+  ] ++ lib.optionals (systemdSupport) [
+    systemd
+  ];
+
+  propagatedBuildInputs = [
+    glib
+    gtk3
+    p11-kit
+  ];
+
+  nativeCheckInputs = [
+    python3
+  ];
+
+  mesonFlags = [
+    # We are still using ssh-agent from gnome-keyring.
+    # https://github.com/NixOS/nixpkgs/issues/140824
+    "-Dssh_agent=false"
+  ] ++ lib.optionals (!systemdSupport) [
+    "-Dsystemd=disabled"
+  ];
+
+  doCheck = false; # fails 21 out of 603 tests, needs dbus daemon
+
+  PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "${placeholder "out"}/lib/systemd/user";
+
+  postPatch = ''
+    patchShebangs gcr/fixtures/
+
+    chmod +x meson_post_install.py
+    patchShebangs meson_post_install.py
+    substituteInPlace meson_post_install.py --replace ".so" "${stdenv.hostPlatform.extensions.sharedLibrary}"
+  '';
+
+  postFixup = ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      freeze = true;
+    };
+  };
+
+  meta = with lib; {
+    platforms = platforms.unix;
+    maintainers = teams.gnome.members;
+    description = "GNOME crypto services (daemon and tools)";
+    homepage = "https://gitlab.gnome.org/GNOME/gcr";
+    license = licenses.lgpl2Plus;
+
+    longDescription = ''
+      GCR is a library for displaying certificates, and crypto UI, accessing
+      key stores. It also provides the viewer for crypto files on the GNOME
+      desktop.
+
+      GCK is a library for accessing PKCS#11 modules like smart cards, in a
+      (G)object oriented way.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gd/default.nix b/nixpkgs/pkgs/development/libraries/gd/default.nix
new file mode 100644
index 000000000000..af96d9d06d27
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gd/default.nix
@@ -0,0 +1,67 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, autoconf
+, automake
+, pkg-config
+, zlib
+, libpng
+, libjpeg
+, libwebp
+, libtiff
+, withXorg ? true
+, libXpm
+, libavif
+, fontconfig
+, freetype
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gd";
+  version = "2.3.3";
+
+  src = fetchurl {
+    url = "https://github.com/libgd/libgd/releases/download/${pname}-${version}/libgd-${version}.tar.xz";
+    sha256 = "0qas3q9xz3wgw06dm2fj0i189rain6n60z1vyq50d5h7wbn25s1z";
+  };
+
+  patches = [
+    (fetchpatch { # included in > 2.3.3
+      name = "restore-GD_FLIP.patch";
+      url = "https://github.com/libgd/libgd/commit/f4bc1f5c26925548662946ed7cfa473c190a104a.diff";
+      sha256 = "XRXR3NOkbEub3Nybaco2duQk0n8vxif5mTl2AUacn9w=";
+    })
+  ];
+
+  hardeningDisable = [ "format" ];
+
+  configureFlags = [
+    "--enable-gd-formats"
+  ]
+    # -pthread gets passed to clang, causing warnings
+    ++ lib.optional stdenv.isDarwin "--enable-werror=no";
+
+  nativeBuildInputs = [ autoconf automake pkg-config ];
+
+  buildInputs = [ zlib freetype libpng libjpeg libwebp libtiff libavif ]
+    ++ lib.optionals withXorg [ fontconfig libXpm ];
+
+  outputs = [ "bin" "dev" "out" ];
+
+  postFixup = ''
+    moveToOutput "bin/gdlib-config" $dev
+  '';
+
+  enableParallelBuilding = true;
+
+  doCheck = false; # fails 2 tests
+
+  meta = with lib; {
+    homepage = "https://libgd.github.io/";
+    description = "A dynamic image creation library";
+    license = licenses.free; # some custom license
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gdal/default.nix b/nixpkgs/pkgs/development/libraries/gdal/default.nix
new file mode 100644
index 000000000000..64801dd5b714
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gdal/default.nix
@@ -0,0 +1,287 @@
+{ lib
+, stdenv
+, callPackage
+, fetchFromGitHub
+
+, useMinimalFeatures ? false
+, useTiledb ? (!useMinimalFeatures) && !(stdenv.isDarwin && stdenv.isx86_64)
+, useLibHEIF ? (!useMinimalFeatures)
+, useLibJXL ? (!useMinimalFeatures)
+, useMysql ? (!useMinimalFeatures)
+, usePostgres ? (!useMinimalFeatures)
+, usePoppler ? (!useMinimalFeatures)
+, useArrow ? (!useMinimalFeatures)
+, useHDF ? (!useMinimalFeatures)
+, useNetCDF ? (!useMinimalFeatures)
+, useArmadillo ? (!useMinimalFeatures)
+, useJava ? (!useMinimalFeatures)
+
+, ant
+, bison
+, cmake
+, gtest
+, doxygen
+, graphviz
+, pkg-config
+, python3
+, swig
+, armadillo
+, arrow-cpp
+, c-blosc
+, brunsli
+, cfitsio
+, crunch
+, curl
+, cryptopp
+, libdeflate
+, expat
+, libgeotiff
+, geos
+, giflib
+, jdk
+, libheif
+, dav1d
+, libaom
+, libde265
+, rav1e
+, x265
+, hdf4
+, hdf5-cpp
+, libiconv
+, libjpeg
+, json_c
+, libjxl
+, libhwy
+, lerc
+, xz
+, libxml2
+, lz4
+, libmysqlclient
+, netcdf
+, openexr
+, openjpeg
+, openssl
+, pcre2
+, libpng
+, poppler
+, postgresql
+, proj
+, qhull
+, libspatialite
+, sqlite
+, libtiff
+, tiledb
+, libwebp
+, xercesc
+, zlib
+, zstd
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "gdal";
+  version = "3.8.4";
+
+  src = fetchFromGitHub {
+    owner = "OSGeo";
+    repo = "gdal";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-R9VLof13OXPbWGHOG1Q4WZWSPoF739C6WuNWxoIwKTw=";
+  };
+
+  nativeBuildInputs = [
+    bison
+    cmake
+    doxygen
+    graphviz
+    pkg-config
+    python3.pkgs.setuptools
+    python3.pkgs.wrapPython
+    swig
+  ] ++ lib.optionals useJava [ ant jdk ];
+
+  cmakeFlags = [
+    "-DGDAL_USE_INTERNAL_LIBS=OFF"
+    "-DGEOTIFF_INCLUDE_DIR=${lib.getDev libgeotiff}/include"
+    "-DGEOTIFF_LIBRARY_RELEASE=${lib.getLib libgeotiff}/lib/libgeotiff${stdenv.hostPlatform.extensions.sharedLibrary}"
+    "-DMYSQL_INCLUDE_DIR=${lib.getDev libmysqlclient}/include/mysql"
+    "-DMYSQL_LIBRARY=${lib.getLib libmysqlclient}/lib/${lib.optionalString (libmysqlclient.pname != "mysql") "mysql/"}libmysqlclient${stdenv.hostPlatform.extensions.sharedLibrary}"
+  ] ++ lib.optionals finalAttrs.doInstallCheck [
+    "-DBUILD_TESTING=ON"
+  ] ++ lib.optionals (!stdenv.isDarwin) [
+    "-DCMAKE_SKIP_BUILD_RPATH=ON" # without, libgdal.so can't find libmariadb.so
+  ] ++ lib.optionals stdenv.isDarwin [
+    "-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON"
+  ] ++ lib.optionals (!useTiledb) [
+    "-DGDAL_USE_TILEDB=OFF"
+  ] ++ lib.optionals (!useJava) [
+    # This is not strictly needed as the Java bindings wouldn't build anyway if
+    # ant/jdk were not available.
+    "-DBUILD_JAVA_BINDINGS=OFF"
+  ];
+
+  buildInputs =
+    let
+      tileDbDeps = lib.optionals useTiledb [ tiledb ];
+      libHeifDeps = lib.optionals useLibHEIF [
+        libheif
+        dav1d
+        libaom
+        libde265
+        rav1e
+        x265
+      ];
+      libJxlDeps = lib.optionals useLibJXL [
+        libjxl
+        libhwy
+      ];
+      mysqlDeps = lib.optionals useMysql [ libmysqlclient ];
+      postgresDeps = lib.optionals usePostgres [ postgresql ];
+      popplerDeps = lib.optionals usePoppler [ poppler ];
+      arrowDeps = lib.optionals useArrow [ arrow-cpp ];
+      hdfDeps = lib.optionals useHDF [
+        hdf4
+        hdf5-cpp
+      ];
+      netCdfDeps = lib.optionals useNetCDF [ netcdf ];
+      armadilloDeps = lib.optionals useArmadillo [ armadillo ];
+
+      darwinDeps = lib.optionals stdenv.isDarwin [ libiconv ];
+      nonDarwinDeps = lib.optionals (!stdenv.isDarwin) ([
+        # tests for formats enabled by these packages fail on macos
+        openexr
+        xercesc
+      ] ++ arrowDeps);
+    in
+    [
+      c-blosc
+      brunsli
+      cfitsio
+      crunch
+      curl
+      cryptopp
+      libdeflate
+      expat
+      libgeotiff
+      geos
+      giflib
+      libjpeg
+      json_c
+      lerc
+      xz
+      libxml2
+      lz4
+      openjpeg
+      openssl
+      pcre2
+      libpng
+      proj
+      qhull
+      libspatialite
+      sqlite
+      libtiff
+      gtest
+      libwebp
+      zlib
+      zstd
+      python3
+      python3.pkgs.numpy
+    ] ++ tileDbDeps
+    ++ libHeifDeps
+    ++ libJxlDeps
+    ++ mysqlDeps
+    ++ postgresDeps
+    ++ popplerDeps
+    ++ arrowDeps
+    ++ hdfDeps
+    ++ netCdfDeps
+    ++ armadilloDeps
+    ++ darwinDeps
+    ++ nonDarwinDeps;
+
+  pythonPath = [ python3.pkgs.numpy ];
+  postInstall = ''
+    wrapPythonProgramsIn "$out/bin" "$out $pythonPath"
+  '' + lib.optionalString useJava ''
+    cd $out/lib
+    ln -s ./jni/libgdalalljni${stdenv.hostPlatform.extensions.sharedLibrary}
+    cd -
+  '';
+
+  enableParallelBuilding = true;
+
+  doInstallCheck = true;
+  # preCheck rather than preInstallCheck because this is what pytestCheckHook
+  # calls (coming from the python world)
+  preCheck = ''
+    pushd autotest
+
+    export HOME=$(mktemp -d)
+    export PYTHONPATH="$out/${python3.sitePackages}:$PYTHONPATH"
+    export GDAL_DOWNLOAD_TEST_DATA=OFF
+    # allows to skip tests that fail because of file handle leak
+    # the issue was not investigated
+    # https://github.com/OSGeo/gdal/blob/v3.7.0/autotest/gdrivers/bag.py#L61
+    export BUILD_NAME=fedora
+  '';
+  nativeInstallCheckInputs = with python3.pkgs; [
+    pytestCheckHook
+    pytest-env
+    filelock
+    lxml
+  ];
+  disabledTestPaths = [
+    # tests that attempt to make network requests
+    "gcore/vsis3.py"
+    "gdrivers/gdalhttp.py"
+    "gdrivers/wms.py"
+
+    # disable benchmarks
+    "benchmark/*"
+  ];
+  disabledTests = [
+    # tests that attempt to make network requests
+    "test_jp2openjpeg_45"
+    # tests that require the full proj dataset which we don't package yet
+    # https://github.com/OSGeo/gdal/issues/5523
+    "test_transformer_dem_overrride_srs"
+    "test_osr_ct_options_area_of_interest"
+    # ZIP does not support timestamps before 1980
+    "test_sentinel2_zipped"
+    # tries to call unwrapped executable
+    "test_SetPROJAuxDbPaths"
+    # fixed and renamed in 3.8.0RC1
+    # https://github.com/OSGeo/gdal/commit/c8b471ca1e6318866ff668d2b57bb6f076e3ae29
+    "test_visoss_6"
+    # failing with PROJ 9.3.1
+    # https://github.com/OSGeo/gdal/issues/8908
+    "test_osr_esri_28"
+  ] ++ lib.optionals (!stdenv.isx86_64) [
+    # likely precision-related expecting x87 behaviour
+    "test_jp2openjpeg_22"
+  ] ++ lib.optionals stdenv.isDarwin [
+    # flaky on macos
+    "test_rda_download_queue"
+  ] ++ lib.optionals (lib.versionOlder proj.version "8") [
+    "test_ogr_parquet_write_crs_without_id_in_datum_ensemble_members"
+  ] ++ lib.optionals (!usePoppler) [
+    "test_pdf_jpx_compression"
+  ];
+  postCheck = ''
+    popd # autotest
+  '';
+
+  passthru.tests = {
+    gdal = callPackage ./tests.nix { gdal = finalAttrs.finalPackage; };
+  };
+
+  __darwinAllowLocalNetworking = true;
+
+  meta = with lib; {
+    changelog = "https://github.com/OSGeo/gdal/blob/v${finalAttrs.version}/NEWS.md";
+    description = "Translator library for raster geospatial data formats";
+    homepage = "https://www.gdal.org/";
+    license = licenses.mit;
+    maintainers = with maintainers; teams.geospatial.members ++ [ marcweber dotlambda ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/gdal/tests.nix b/nixpkgs/pkgs/development/libraries/gdal/tests.nix
new file mode 100644
index 000000000000..87fbff2d5fa5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gdal/tests.nix
@@ -0,0 +1,55 @@
+{ runCommand, gdal, jdk }:
+
+let
+  inherit (gdal) pname version;
+
+in
+runCommand "${pname}-tests" { meta.timeout = 60; }
+  ''
+    # test version
+    ${gdal}/bin/ogrinfo --version \
+      | grep 'GDAL ${version}'
+
+    ${gdal}/bin/gdalinfo --version \
+      | grep 'GDAL ${version}'
+
+
+    # test formats
+    ${gdal}/bin/ogrinfo --formats \
+      | grep 'GPKG.*GeoPackage'
+
+    ${gdal}/bin/gdalinfo --formats \
+      | grep 'GTiff.*GeoTIFF'
+
+
+    # test vector file
+    echo -e "Latitude,Longitude,Name\n48.1,0.25,'Test point'" > test.csv
+    ${gdal}/bin/ogrinfo ./test.csv
+
+
+    # test raster file
+    ${gdal}/bin/gdal_create \
+      -a_srs "EPSG:4326" \
+      -of GTiff \
+      -ot UInt16 \
+      -a_nodata 255 \
+      -burn 0 \
+      -outsize 800 600 \
+      -co COMPRESS=LZW \
+      test.tif
+
+    ${gdal}/bin/gdalinfo ./test.tif
+
+    # test java bindings
+    cat <<EOF > main.java
+    import org.gdal.gdal.gdal;
+    class Main {
+      public static void main(String[] args) {
+      gdal.AllRegister();
+      }
+    }
+    EOF
+    ${jdk}/bin/java -Djava.library.path=${gdal}/lib/ -cp ${gdal}/share/java/gdal-${version}.jar main.java
+
+    touch $out
+  ''
diff --git a/nixpkgs/pkgs/development/libraries/gdbm/default.nix b/nixpkgs/pkgs/development/libraries/gdbm/default.nix
new file mode 100644
index 000000000000..e1a3def0ba42
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gdbm/default.nix
@@ -0,0 +1,67 @@
+{ stdenv, lib, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "gdbm";
+  version = "1.23";
+
+  src = fetchurl {
+    url = "mirror://gnu/gdbm/${pname}-${version}.tar.gz";
+    sha256 = "sha256-dLEIHSH/8TrkvXwW5dblBKTCb3zeHcoNljpIQXS7ys0=";
+  };
+
+  doCheck = true; # not cross;
+
+  # Linking static stubs on cygwin requires correct ordering.
+  # Consider upstreaming this.
+
+  # Disable dbmfetch03.at test because it depends on unlink()
+  # failing on a link in a chmod -w directory, which cygwin
+  # apparently allows.
+  postPatch = lib.optionalString stdenv.buildPlatform.isCygwin ''
+      substituteInPlace tests/Makefile.in --replace \
+        '_LDADD = ../src/libgdbm.la ../compat/libgdbm_compat.la' \
+        '_LDADD = ../compat/libgdbm_compat.la ../src/libgdbm.la'
+      substituteInPlace tests/testsuite.at --replace \
+        'm4_include([dbmfetch03.at])' ""
+  '';
+
+  enableParallelBuilding = true;
+  configureFlags = [ "--enable-libgdbm-compat" ];
+
+  # create symlinks for compatibility
+  postInstall = ''
+    install -dm755 $out/include/gdbm
+    (
+      cd $out/include/gdbm
+      ln -s ../gdbm.h gdbm.h
+      ln -s ../ndbm.h ndbm.h
+      ln -s ../dbm.h  dbm.h
+    )
+  '';
+
+  meta = with lib; {
+    description = "GNU dbm key/value database library";
+    longDescription = ''
+       GNU dbm (or GDBM, for short) is a library of database functions that
+       use extensible hashing and work similar to the standard UNIX dbm.
+       These routines are provided to a programmer needing to create and
+       manipulate a hashed database.
+
+       The basic use of GDBM is to store key/data pairs in a data file.
+       Each key must be unique and each key is paired with only one data
+       item.
+
+       The library provides primitives for storing key/data pairs,
+       searching and retrieving the data by its key and deleting a key
+       along with its data.  It also support sequential iteration over all
+       key/data pairs in a database.
+
+       For compatibility with programs using old UNIX dbm function, the
+       package also provides traditional dbm and ndbm interfaces.
+      '';
+    homepage = "https://www.gnu.org/software/gdbm/";
+    license = licenses.gpl3Plus;
+    platforms = platforms.all;
+    maintainers = [ maintainers.vrthra ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gdcm/default.nix b/nixpkgs/pkgs/development/libraries/gdcm/default.nix
new file mode 100644
index 000000000000..9d6db6fca684
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gdcm/default.nix
@@ -0,0 +1,103 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, enableVTK ? true
+, vtk
+, ApplicationServices
+, Cocoa
+, libiconv
+, enablePython ? false
+, python ? null
+, swig4
+, expat
+, libuuid
+, openjpeg
+, zlib
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gdcm";
+  version = "3.0.23";
+
+  src = fetchFromGitHub {
+    owner = "malaterre";
+    repo = "GDCM";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-zwIPWcjTrfbdNBzAqwV6lU2l6sx+e4Yi7dprdem6AeE=";
+  };
+
+  cmakeFlags = [
+    "-DGDCM_BUILD_APPLICATIONS=ON"
+    "-DGDCM_BUILD_SHARED_LIBS=ON"
+    "-DGDCM_BUILD_TESTING=ON"
+    "-DGDCM_USE_SYSTEM_EXPAT=ON"
+    "-DGDCM_USE_SYSTEM_ZLIB=ON"
+    "-DGDCM_USE_SYSTEM_UUID=ON"
+    "-DGDCM_USE_SYSTEM_OPENJPEG=ON"
+    # hack around usual "`RUNTIME_DESTINATION` must not be an absolute path" issue:
+    "-DCMAKE_INSTALL_LIBDIR=lib"
+    "-DCMAKE_INSTALL_BINDIR=bin"
+    "-DCMAKE_INSTALL_INCLUDEDIR=include"
+  ] ++ lib.optionals enableVTK [
+    "-DGDCM_USE_VTK=ON"
+  ] ++ lib.optionals enablePython [
+    "-DGDCM_WRAP_PYTHON:BOOL=ON"
+    "-DGDCM_INSTALL_PYTHONMODULE_DIR=${placeholder "out"}/${python.sitePackages}"
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    expat
+    libuuid
+    openjpeg
+    zlib
+  ] ++ lib.optionals enableVTK [
+    vtk
+  ] ++ lib.optionals stdenv.isDarwin [
+    ApplicationServices
+    Cocoa
+    libiconv
+  ] ++ lib.optionals enablePython [ swig4 python ];
+
+  disabledTests = [
+    # require networking:
+    "TestEcho"
+    "TestFind"
+    "gdcmscu-echo-dicomserver"
+    "gdcmscu-find-dicomserver"
+    # seemingly ought to be be disabled when the test data submodule is not present:
+    "TestvtkGDCMImageReader2_3"
+    "TestSCUValidation"
+    # errors because 3 classes not wrapped:
+    "TestWrapPython"
+  ] ++ lib.optionals (stdenv.isAarch64 && stdenv.isLinux) [
+    "TestRescaler2"
+  ];
+
+  checkPhase = ''
+    runHook preCheck
+    ctest --exclude-regex '^(${lib.concatStringsSep "|" disabledTests})$'
+    runHook postCheck
+  '';
+  doCheck = true;
+  # note that when the test data is available to the build via `fetchSubmodules = true`,
+  # a number of additional but much slower tests are enabled
+
+  meta = with lib; {
+    description = "The grassroots cross-platform DICOM implementation";
+    longDescription = ''
+      Grassroots DICOM (GDCM) is an implementation of the DICOM standard designed to be open source so that researchers may access clinical data directly.
+      GDCM includes a file format definition and a network communications protocol, both of which should be extended to provide a full set of tools for a researcher or small medical imaging vendor to interface with an existing medical database.
+    '';
+    homepage = "https://gdcm.sourceforge.net/";
+    license = with licenses; [ bsd3 asl20 ];
+    maintainers = with maintainers; [ tfmoraes ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gdk-pixbuf/default.nix b/nixpkgs/pkgs/development/libraries/gdk-pixbuf/default.nix
new file mode 100644
index 000000000000..f77daec2ea6f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gdk-pixbuf/default.nix
@@ -0,0 +1,160 @@
+{ stdenv
+, fetchurl
+, nixosTests
+, fixDarwinDylibNames
+, meson
+, ninja
+, pkg-config
+, gettext
+, python3
+, docutils
+, gi-docgen
+, glib
+, libtiff
+, libjpeg
+, libpng
+, gnome
+, doCheck ? false
+, makeWrapper
+, lib
+, testers
+, buildPackages
+, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
+, gobject-introspection
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "gdk-pixbuf";
+  version = "2.42.10";
+
+  outputs = [ "out" "dev" "man" ]
+    ++ lib.optional withIntrospection "devdoc"
+    ++ lib.optional (stdenv.buildPlatform == stdenv.hostPlatform) "installedTests";
+
+  src = let
+    inherit (finalAttrs) pname version;
+  in fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "7ptsddE7oJaQei48aye2G80X9cfr6rWltDnS8uOf5Es=";
+  };
+
+  patches = [
+    # Move installed tests to a separate output
+    ./installed-tests-path.patch
+  ];
+
+  # gdk-pixbuf-thumbnailer is not wrapped therefore strictDeps will work
+  strictDeps = true;
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gettext
+    python3
+    makeWrapper
+    glib
+
+    # for man pages
+    docutils
+  ] ++ lib.optionals stdenv.isDarwin [
+    fixDarwinDylibNames
+  ] ++ lib.optionals withIntrospection [
+    gi-docgen
+    gobject-introspection
+  ];
+
+  propagatedBuildInputs = [
+    glib
+    libtiff
+    libjpeg
+    libpng
+  ];
+
+  mesonFlags = [
+    "-Dgio_sniffing=false"
+    (lib.mesonBool "gtk_doc" withIntrospection)
+    (lib.mesonEnable "introspection" withIntrospection)
+  ];
+
+  postPatch = ''
+    chmod +x build-aux/* # patchShebangs only applies to executables
+    patchShebangs build-aux
+
+    substituteInPlace tests/meson.build --subst-var-by installedtestsprefix "$installedTests"
+
+    # Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake)
+    # it should be a build-time dep for build
+    # TODO: send upstream
+    substituteInPlace docs/meson.build \
+      --replace "dependency('gi-docgen'," "dependency('gi-docgen', native:true," \
+      --replace "'gi-docgen', req" "'gi-docgen', native:true, req"
+  '';
+
+  postInstall =
+    ''
+      # All except one utility seem to be only useful during building.
+      moveToOutput "bin" "$dev"
+      moveToOutput "bin/gdk-pixbuf-thumbnailer" "$out"
+
+    '' + lib.optionalString stdenv.isDarwin ''
+      # meson erroneously installs loaders with .dylib extension on Darwin.
+      # Their @rpath has to be replaced before gdk-pixbuf-query-loaders looks at them.
+      for f in $out/${finalAttrs.passthru.moduleDir}/*.dylib; do
+          install_name_tool -change @rpath/libgdk_pixbuf-2.0.0.dylib $out/lib/libgdk_pixbuf-2.0.0.dylib $f
+          mv $f ''${f%.dylib}.so
+      done
+    '' + lib.optionalString withIntrospection ''
+      # We need to install 'loaders.cache' in lib/gdk-pixbuf-2.0/2.10.0/
+      ${stdenv.hostPlatform.emulator buildPackages} $dev/bin/gdk-pixbuf-query-loaders --update-cache
+    '';
+
+  # The fixDarwinDylibNames hook doesn't patch binaries.
+  preFixup = lib.optionalString stdenv.isDarwin ''
+    for f in $out/bin/* $dev/bin/*; do
+        install_name_tool -change @rpath/libgdk_pixbuf-2.0.0.dylib $out/lib/libgdk_pixbuf-2.0.0.dylib $f
+    done
+  '';
+
+  postFixup = lib.optionalString withIntrospection ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  # The tests take an excessive amount of time (> 1.5 hours) and memory (> 6 GB).
+  inherit doCheck;
+
+  setupHook = ./setup-hook.sh;
+
+  separateDebugInfo = stdenv.isLinux;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = finalAttrs.pname;
+      versionPolicy = "odd-unstable";
+    };
+
+    tests = {
+      installedTests = nixosTests.installed-tests.gdk-pixbuf;
+      pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+    };
+
+    # gdk_pixbuf_binarydir and gdk_pixbuf_moduledir variables from gdk-pixbuf-2.0.pc
+    binaryDir = "lib/gdk-pixbuf-2.0/2.10.0";
+    moduleDir = "${finalAttrs.passthru.binaryDir}/loaders";
+  };
+
+  meta = with lib; {
+    description = "A library for image loading and manipulation";
+    homepage = "https://gitlab.gnome.org/GNOME/gdk-pixbuf";
+    license = licenses.lgpl21Plus;
+    maintainers = [ maintainers.eelco ] ++ teams.gnome.members;
+    mainProgram = "gdk-pixbuf-thumbnailer";
+    pkgConfigModules = [ "gdk-pixbuf-2.0" ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/gdk-pixbuf/installed-tests-path.patch b/nixpkgs/pkgs/development/libraries/gdk-pixbuf/installed-tests-path.patch
new file mode 100644
index 000000000000..1da2b0a10dcd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gdk-pixbuf/installed-tests-path.patch
@@ -0,0 +1,13 @@
+--- a/tests/meson.build
++++ b/tests/meson.build
+@@ -85,8 +85,8 @@
+   'aero.gif',
+ ]
+ 
+-installed_test_bindir = join_paths(gdk_pixbuf_libexecdir, 'installed-tests', meson.project_name())
+-installed_test_datadir = join_paths(gdk_pixbuf_datadir, 'installed-tests', meson.project_name())
++installed_test_bindir = join_paths('@installedtestsprefix@', 'libexec', 'installed-tests', meson.project_name())
++installed_test_datadir = join_paths('@installedtestsprefix@', 'share', 'installed-tests', meson.project_name())
+ 
+ install_data(test_data, install_dir: installed_test_bindir)
+ install_subdir('test-images', install_dir: installed_test_bindir)
diff --git a/nixpkgs/pkgs/development/libraries/gdk-pixbuf/setup-hook.sh b/nixpkgs/pkgs/development/libraries/gdk-pixbuf/setup-hook.sh
new file mode 100644
index 000000000000..ecf9793b91f6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gdk-pixbuf/setup-hook.sh
@@ -0,0 +1,17 @@
+findGdkPixbufLoaders() {
+
+    # choose the longest loaders.cache
+    local loadersCache="$1/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"
+    if [[ -f "$loadersCache" ]]; then
+        if [[ -f "${GDK_PIXBUF_MODULE_FILE-}" ]]; then
+            if (( "$(cat "$loadersCache" | wc -l)" > "$(cat "$GDK_PIXBUF_MODULE_FILE" | wc -l)" )); then
+                export GDK_PIXBUF_MODULE_FILE="$loadersCache"
+            fi
+        else
+            export GDK_PIXBUF_MODULE_FILE="$loadersCache"
+        fi
+    fi
+
+}
+
+addEnvHooks "$targetOffset" findGdkPixbufLoaders
diff --git a/nixpkgs/pkgs/development/libraries/gdk-pixbuf/xlib.nix b/nixpkgs/pkgs/development/libraries/gdk-pixbuf/xlib.nix
new file mode 100644
index 000000000000..dd498bb9aeac
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gdk-pixbuf/xlib.nix
@@ -0,0 +1,52 @@
+{ lib, stdenv
+, fetchFromGitLab
+, meson
+, ninja
+, pkg-config
+, docbook-xsl-nons
+, docbook_xml_dtd_43
+, gtk-doc
+, gdk-pixbuf
+, libX11
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gdk-pixbuf-xlib";
+  version = "2.40.2";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchFromGitLab {
+    domain = "gitlab.gnome.org";
+    owner = "Archive";
+    repo = "gdk-pixbuf-xlib";
+    rev = version;
+    hash = "sha256-b4EUaYzg2NlBMU90dGQivOvkv9KKSzES/ymPqzrelu8=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    docbook-xsl-nons
+    docbook_xml_dtd_43
+    gtk-doc
+  ];
+
+  propagatedBuildInputs = [
+    gdk-pixbuf
+    libX11
+  ];
+
+  mesonFlags = [
+    "-Dgtk_doc=true"
+  ];
+
+  meta = with lib; {
+    description = "Deprecated API for integrating GdkPixbuf with Xlib data types";
+    homepage = "https://gitlab.gnome.org/Archive/gdk-pixbuf-xlib";
+    maintainers = teams.gnome.members;
+    license = licenses.lgpl21Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gdl/default.nix b/nixpkgs/pkgs/development/libraries/gdl/default.nix
new file mode 100644
index 000000000000..6e7e1e39b38d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gdl/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl, pkg-config, libxml2, gtk3, gnome, intltool }:
+
+stdenv.mkDerivation rec {
+  pname = "gdl";
+  version = "3.40.0";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/gdl/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "NkHU/WadHhgYrv88+f+3iH/Fw2eFC3jCjHdeukq2pVU=";
+  };
+
+  nativeBuildInputs = [ pkg-config intltool ];
+  buildInputs = [ libxml2 gtk3 ];
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = "gdl";
+    };
+  };
+
+  meta = with lib; {
+    description = "Gnome docking library";
+    homepage = "https://developer.gnome.org/gdl/";
+    maintainers = teams.gnome.members;
+    license = licenses.gpl2;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gdome2/default.nix b/nixpkgs/pkgs/development/libraries/gdome2/default.nix
new file mode 100644
index 000000000000..5aa1c487b4f9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gdome2/default.nix
@@ -0,0 +1,33 @@
+{lib, stdenv, fetchurl, pkg-config, glib, libxml2, gtk-doc}:
+
+let
+  pname = "gdome2";
+  version = "0.8.1";
+in
+
+stdenv.mkDerivation {
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "http://gdome2.cs.unibo.it/tarball/${pname}-${version}.tar.gz";
+    sha256 = "0hyms5s3hziajp3qbwdwqjc2xcyhb783damqg8wxjpwfxyi81fzl";
+  };
+
+  hardeningDisable = [ "format" ];
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ glib libxml2 gtk-doc ];
+  propagatedBuildInputs = [glib libxml2];
+  patches = [
+    ./xml-document.patch
+    ./fno-common.patch
+  ];
+
+  meta = with lib; {
+    homepage = "http://gdome2.cs.unibo.it/";
+    description = "DOM C library developed for the Gnome project";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ prikhi roconnor ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gdome2/fno-common.patch b/nixpkgs/pkgs/development/libraries/gdome2/fno-common.patch
new file mode 100644
index 000000000000..f9dc93c48fcf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gdome2/fno-common.patch
@@ -0,0 +1,11 @@
+On gcc-10 -fno-common is the default which forbids miltiple definitions.
+--- a/libgdome/xpath/gdome-xpath-xpnsresolv.h
++++ b/libgdome/xpath/gdome-xpath-xpnsresolv.h
+@@ -42,6 +42,6 @@ void gdome_xpath_xpnsresolv_ref (GdomeXPathNSResolver *self, GdomeException *exc
+ void gdome_xpath_xpnsresolv_unref (GdomeXPathNSResolver *self, GdomeException *exc);
+ GdomeDOMString * gdome_xpath_xpnsresolv_lookupNamespaceURI( GdomeXPathNSResolver *self, GdomeDOMString *prefix, GdomeException *exc);
+ 
+-const GdomeXPathNSResolverVtab gdome_xpath_xpnsresolv_vtab;
++extern const GdomeXPathNSResolverVtab gdome_xpath_xpnsresolv_vtab;
+ 
+ #endif /* GDOME_XPNSRESOLV_FILE */
diff --git a/nixpkgs/pkgs/development/libraries/gdome2/xml-document.patch b/nixpkgs/pkgs/development/libraries/gdome2/xml-document.patch
new file mode 100644
index 000000000000..7567d1049fc0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gdome2/xml-document.patch
@@ -0,0 +1,11 @@
+--- a/libgdome/gdomecore/gdome-xml-documentt.c	2003-07-13 14:47:54.000000000 +0400
++++ b/libgdome/gdomecore/gdome-xml-documentt.c	2013-07-02 14:09:18.304613703 +0400
+@@ -342,7 +342,7 @@
+ 	}
+ 	xmlNodeDumpOutput (out_buff, NULL, (xmlNode *)is, 0, 0, NULL);
+ 	xmlOutputBufferFlush(out_buff);
+-	ret = g_strndup (out_buff->buffer->content, out_buff->buffer->use);
++	ret = g_strndup (xmlBufContent(out_buff), xmlBufUse(out_buff));
+ 	(void)xmlOutputBufferClose(out_buff);
+
+ 	return gdome_xml_str_mkref_own (ret);
diff --git a/nixpkgs/pkgs/development/libraries/gecode/3.nix b/nixpkgs/pkgs/development/libraries/gecode/3.nix
new file mode 100644
index 000000000000..1d6f158b52f2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gecode/3.nix
@@ -0,0 +1,39 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, perl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gecode";
+  version = "3.7.3";
+
+  src = fetchurl {
+    url = "http://www.gecode.org/download/${pname}-${version}.tar.gz";
+    sha256 = "0k45jas6p3cyldgyir1314ja3174sayn2h2ly3z9b4dl3368pk77";
+  };
+
+  patches = [
+    (import ./fix-const-weights-clang-patch.nix fetchpatch)
+  ];
+
+  postPatch = ''
+    substituteInPlace gecode/flatzinc/lexer.yy.cpp \
+      --replace "register " ""
+  '';
+
+  nativeBuildInputs = [ perl ];
+
+  preConfigure = "patchShebangs configure";
+
+  env.CXXFLAGS = lib.optionalString stdenv.cc.isClang "-std=c++14";
+
+  meta = with lib; {
+    license = licenses.mit;
+    homepage = "https://www.gecode.org";
+    description = "Toolkit for developing constraint-based systems";
+    platforms = platforms.all;
+    maintainers = [ maintainers.manveru ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gecode/default.nix b/nixpkgs/pkgs/development/libraries/gecode/default.nix
new file mode 100644
index 000000000000..57bac2295139
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gecode/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, bison
+, flex
+, perl
+, gmp
+, mpfr
+, qtbase
+, enableGist ? true
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gecode";
+  version = "6.2.0";
+
+  src = fetchFromGitHub {
+    owner = "Gecode";
+    repo = "gecode";
+    rev = "release-${version}";
+    sha256 = "0b1cq0c810j1xr2x9y9996p894571sdxng5h74py17c6nr8c6dmk";
+  };
+
+  patches = [
+    (import ./fix-const-weights-clang-patch.nix fetchpatch)
+  ];
+
+  enableParallelBuilding = true;
+  dontWrapQtApps = true;
+  nativeBuildInputs = [ bison flex ];
+  buildInputs = [ perl gmp mpfr ]
+    ++ lib.optional enableGist qtbase;
+
+  meta = with lib; {
+    license = licenses.mit;
+    homepage = "https://www.gecode.org";
+    description = "Toolkit for developing constraint-based systems";
+    platforms = platforms.all;
+    maintainers = [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gecode/fix-const-weights-clang-patch.nix b/nixpkgs/pkgs/development/libraries/gecode/fix-const-weights-clang-patch.nix
new file mode 100644
index 000000000000..77160283afee
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gecode/fix-const-weights-clang-patch.nix
@@ -0,0 +1,7 @@
+fetchpatch:
+# https://github.com/Gecode/gecode/pull/74
+(fetchpatch {
+  name = "fix-const-weights-clang.patch";
+  url = "https://github.com/Gecode/gecode/commit/c810c96b1ce5d3692e93439f76c4fa7d3daf9fbb.patch";
+  sha256 = "0270msm22q5g5sqbdh8kmrihlxnnxqrxszk9a49hdxd72736p4fc";
+})
diff --git a/nixpkgs/pkgs/development/libraries/gegl/default.nix b/nixpkgs/pkgs/development/libraries/gegl/default.nix
new file mode 100644
index 000000000000..914d72a7fe8a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gegl/default.nix
@@ -0,0 +1,132 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch2
+, pkg-config
+, vala
+, gobject-introspection
+, gtk-doc
+, docbook-xsl-nons
+, docbook_xml_dtd_43
+, glib
+, babl
+, libpng
+, llvmPackages
+, cairo
+, libjpeg
+, librsvg
+, lensfun
+, libspiro
+, maxflow
+, netsurf
+, pango
+, poly2tri-c
+, poppler
+, bzip2
+, json-glib
+, gettext
+, meson
+, ninja
+, libraw
+, gexiv2
+, libwebp
+, luajit
+, openexr
+, OpenCL
+, suitesparse
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gegl";
+  version = "0.4.46";
+
+  outputs = [ "out" "dev" "devdoc" ];
+  outputBin = "dev";
+
+  src = fetchurl {
+    url = "https://download.gimp.org/pub/gegl/${lib.versions.majorMinor version}/gegl-${version}.tar.xz";
+    hash = "sha256-0LOySBvId0xfPQpIdhGRAWbRju+COoWfuR54Grex6JI=";
+  };
+
+  patches = [
+    # https://gitlab.gnome.org/GNOME/gegl/-/merge_requests/136
+    # Fix missing libm dependency.
+    (fetchpatch2 {
+      url = "https://gitlab.gnome.org/GNOME/gegl/-/commit/ee970f10f4fe442cbf8a4f5cb94049deab33e786.patch";
+      hash = "sha256-0LLKH+Gg+1H83kN7hJGK2u+oLrw7Hxed7R4tTwT3C5s=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+    gettext
+    meson
+    ninja
+    vala
+    gobject-introspection
+    gtk-doc
+    docbook-xsl-nons
+    docbook_xml_dtd_43
+  ];
+
+  buildInputs = [
+    libpng
+    cairo
+    libjpeg
+    librsvg
+    lensfun
+    libspiro
+    maxflow
+    netsurf.libnsgif
+    pango
+    poly2tri-c
+    poppler
+    bzip2
+    libraw
+    libwebp
+    gexiv2
+    luajit
+    openexr
+    suitesparse
+  ] ++ lib.optionals stdenv.isDarwin [
+    OpenCL
+  ] ++ lib.optionals stdenv.cc.isClang [
+    llvmPackages.openmp
+  ];
+
+  # for gegl-4.0.pc
+  propagatedBuildInputs = [
+    glib
+    json-glib
+    babl
+  ];
+
+  mesonFlags = [
+    "-Dgtk-doc=true"
+    "-Dmrg=disabled" # not sure what that is
+    "-Dsdl2=disabled"
+    "-Dpygobject=disabled"
+    "-Dlibav=disabled"
+    "-Dlibv4l=disabled"
+    "-Dlibv4l2=disabled"
+    # Disabled due to multiple vulnerabilities, see
+    # https://github.com/NixOS/nixpkgs/pull/73586
+    "-Djasper=disabled"
+  ];
+
+  postPatch = ''
+    chmod +x tests/opencl/opencl_test.sh
+    patchShebangs tests/ff-load-save/tests_ff_load_save.sh tests/opencl/opencl_test.sh tools/xml_insert.sh
+  '';
+
+  # tests fail to connect to the com.apple.fonts daemon in sandboxed mode
+  doCheck = !stdenv.isDarwin;
+
+  meta = with lib; {
+    description = "Graph-based image processing framework";
+    homepage = "https://www.gegl.org";
+    license = licenses.lgpl3Plus;
+    maintainers = with maintainers; [ jtojnar ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/geis/default.nix b/nixpkgs/pkgs/development/libraries/geis/default.nix
new file mode 100644
index 000000000000..17ef806ec9ad
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/geis/default.nix
@@ -0,0 +1,56 @@
+{ lib, stdenv, fetchurl
+, pkg-config
+, python3Packages
+, wrapGAppsHook
+, atk
+, dbus
+, evemu
+, frame
+, gdk-pixbuf
+, gobject-introspection
+, grail
+, gtk3
+, xorg
+, pango
+, xorgserver
+}:
+
+
+stdenv.mkDerivation rec {
+  pname = "geis";
+  version = "2.2.17";
+
+  src = fetchurl {
+    url = "https://launchpad.net/geis/trunk/${version}/+download/${pname}-${version}.tar.xz";
+    sha256 = "1svhbjibm448ybq6gnjjzj0ak42srhihssafj0w402aj71lgaq4a";
+  };
+
+  env.NIX_CFLAGS_COMPILE = "-Wno-error=misleading-indentation -Wno-error=pointer-compare";
+
+  hardeningDisable = [ "format" ];
+
+  pythonPath = with python3Packages;
+    [ pygobject3  ];
+
+  nativeBuildInputs = [ pkg-config wrapGAppsHook python3Packages.wrapPython gobject-introspection ];
+  buildInputs = [ atk dbus evemu frame gdk-pixbuf grail
+    gtk3 xorg.libX11 xorg.libXext xorg.libXi xorg.libXtst pango python3Packages.python xorgserver
+  ];
+
+  patchPhase = ''
+    substituteInPlace python/geis/geis_v2.py --replace \
+      "ctypes.util.find_library(\"geis\")" "'$out/lib/libgeis.so'"
+  '';
+
+  preFixup = ''
+    buildPythonPath "$out $pythonPath"
+    gappsWrapperArgs+=(--set PYTHONPATH "$program_PYTHONPATH")
+  '';
+
+  meta = with lib; {
+    description = "A library for input gesture recognition";
+    homepage = "https://launchpad.net/geis";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/genann/default.nix b/nixpkgs/pkgs/development/libraries/genann/default.nix
new file mode 100644
index 000000000000..f1d7373183ab
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/genann/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "genann";
+  version = "1.0.0";
+
+  src = fetchFromGitHub {
+    owner = "codeplea";
+    repo = "genann";
+    rev = "v${version}";
+    sha256 = "0z45ndpd4a64i6jayr4yxfcr5h87bsmhm7lfgnbp35pnfywiclmq";
+  };
+
+  dontBuild = true;
+  doCheck = true;
+
+  # Nix doesn't seem to recognize this by default.
+  checkPhase = ''
+    make check
+  '';
+
+  installPhase = ''
+    mkdir -p $out/include
+    cp ./genann.{h,c} $out/include
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/codeplea/genann";
+    description = "Simple neural network library in ANSI C";
+    license = licenses.zlib;
+    maintainers = [ maintainers.ivar ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gensio/default.nix b/nixpkgs/pkgs/development/libraries/gensio/default.nix
new file mode 100644
index 000000000000..cd20eab42a62
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gensio/default.nix
@@ -0,0 +1,41 @@
+{ autoreconfHook
+, fetchFromGitHub
+, lib
+, nix-update-script
+, openssl
+, pkg-config
+, stdenv
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gensio";
+  version = "2.8.2";
+
+  src = fetchFromGitHub {
+    owner = "cminyard";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-SwY9FAUljaxap2ZlPS3JJ8VkYiJFWoSLU1miEQIEerE=";
+  };
+
+  passthru = {
+    updateScript = nix-update-script { };
+  };
+
+  configureFlags = [
+    "--with-python=no"
+  ];
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  buildInputs = lib.optionals stdenv.isDarwin [ openssl ];
+
+  meta = with lib; {
+    description = "General Stream I/O";
+    homepage = "https://sourceforge.net/projects/ser2net/";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ emantor ];
+    mainProgram = "gensiot";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/geoclue/add-option-for-installation-sysconfdir.patch b/nixpkgs/pkgs/development/libraries/geoclue/add-option-for-installation-sysconfdir.patch
new file mode 100644
index 000000000000..832ae945aa2c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/geoclue/add-option-for-installation-sysconfdir.patch
@@ -0,0 +1,92 @@
+diff --git i/data/meson.build w/data/meson.build
+index 6ac2a11..73f433b 100644
+--- i/data/meson.build
++++ w/data/meson.build
+@@ -1,6 +1,6 @@
+ if get_option('enable-backend')
+     conf = configuration_data()
+-    conf.set('sysconfdir', sysconfdir)
++    conf.set('sysconfdir', sysconfdir_install)
+ 
+     if get_option('demo-agent')
+         conf.set('demo_agent', 'geoclue-demo-agent;')
+@@ -8,7 +8,7 @@ if get_option('enable-backend')
+         conf.set('demo_agent', '')
+     endif
+ 
+-    conf_dir = join_paths(sysconfdir, 'geoclue')
++    conf_dir = join_paths(sysconfdir_install, 'geoclue')
+     configure_file(output: 'geoclue.conf',
+                    input: 'geoclue.conf.in',
+                    configuration: conf,
+@@ -17,7 +17,7 @@ if get_option('enable-backend')
+     conf = configuration_data()
+     conf.set('libexecdir', libexecdir)
+     conf.set('dbus_srv_user', get_option('dbus-srv-user'))
+-    conf.set('sysconfdir', sysconfdir)
++    conf.set('sysconfdir', sysconfdir_install)
+ 
+     confd_dir = join_paths(conf_dir, 'conf.d')
+     install_emptydir(confd_dir)
+@@ -37,7 +37,7 @@ if get_option('enable-backend')
+     # DBus Service policy file
+     dbus_service_dir = get_option('dbus-sys-dir')
+     if dbus_service_dir == ''
+-        dbus_service_dir = join_paths(sysconfdir, 'dbus-1', 'system.d')
++        dbus_service_dir = join_paths(sysconfdir_install, 'dbus-1', 'system.d')
+     endif
+     configure_file(output: 'org.freedesktop.GeoClue2.conf',
+                    input: 'org.freedesktop.GeoClue2.conf.in',
+diff --git i/demo/meson.build w/demo/meson.build
+index 1427fbe..2623f16 100644
+--- i/demo/meson.build
++++ w/demo/meson.build
+@@ -54,7 +54,7 @@ if get_option('demo-agent')
+                                    install_dir: desktop_dir)
+ 
+     # Also install in the autostart directory.
+-    autostart_dir = join_paths(sysconfdir, 'xdg', 'autostart')
++    autostart_dir = join_paths(sysconfdir_install, 'xdg', 'autostart')
+     meson.add_install_script('install-file.py',
+                              desktop_file.full_path(),
+                              autostart_dir)
+diff --git i/meson.build w/meson.build
+index 220ae2b..dbf6458 100644
+--- i/meson.build
++++ w/meson.build
+@@ -12,7 +12,11 @@ gclue_api_version='2.0'
+ datadir = join_paths(get_option('prefix'), get_option('datadir'))
+ includedir = join_paths(get_option('prefix'), get_option('includedir'))
+ libexecdir = join_paths(get_option('prefix'), get_option('libexecdir'))
+-sysconfdir = join_paths(get_option('prefix'), get_option('sysconfdir'))
++if get_option('sysconfdir_install') != ''
++  sysconfdir_install = join_paths(get_option('prefix'), get_option('sysconfdir_install'))
++else
++  sysconfdir_install = get_option('sysconfdir')
++endif
+ localedir = join_paths(datadir, 'locale')
+ 
+ header_dir = 'libgeoclue-' + gclue_api_version
+@@ -29,7 +33,7 @@ conf.set_quoted('PACKAGE_URL', 'https://gitlab.freedesktop.org/geoclue/geoclue/w
+ conf.set_quoted('PACKAGE_BUGREPORT', 'https://gitlab.freedesktop.org/geoclue/geoclue/issues/new')
+ conf.set_quoted('TEST_SRCDIR', meson.project_source_root() + '/data/')
+ conf.set_quoted('LOCALEDIR', localedir)
+-conf.set_quoted('SYSCONFDIR', sysconfdir)
++conf.set_quoted('SYSCONFDIR', get_option('sysconfdir'))
+ conf.set_quoted('MOZILLA_API_KEY', get_option('mozilla-api-key'))
+ conf.set10('GCLUE_USE_3G_SOURCE', get_option('3g-source'))
+ conf.set10('GCLUE_USE_CDMA_SOURCE', get_option('cdma-source'))
+diff --git i/meson_options.txt w/meson_options.txt
+index 5b8c42d..945dfd5 100644
+--- i/meson_options.txt
++++ w/meson_options.txt
+@@ -40,6 +40,9 @@ option('systemd-system-unit-dir',
+ option('dbus-srv-user',
+        type: 'string', value: 'root',
+        description: 'The user (existing) as which the service will run')
++option('sysconfdir_install',
++       type: 'string', value: '',
++       description: 'sysconfdir to use during installation')
+ option('mozilla-api-key',
+        type: 'string', value: 'geoclue',
+        description: 'Your API key for Mozilla Location Service')
diff --git a/nixpkgs/pkgs/development/libraries/geoclue/default.nix b/nixpkgs/pkgs/development/libraries/geoclue/default.nix
new file mode 100644
index 000000000000..c2bf28d71045
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/geoclue/default.nix
@@ -0,0 +1,107 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, fetchpatch
+, intltool
+, meson
+, mesonEmulatorHook
+, ninja
+, pkg-config
+, gtk-doc
+, docbook-xsl-nons
+, docbook_xml_dtd_412
+, glib
+, json-glib
+, libsoup_3
+, libnotify
+, gdk-pixbuf
+, modemmanager
+, avahi
+, glib-networking
+, python3
+, wrapGAppsHook
+, gobject-introspection
+, vala
+, withDemoAgent ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "geoclue";
+  version = "2.7.0";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "geoclue";
+    repo = "geoclue";
+    rev = version;
+    hash = "sha256-vzarUg4lBEXYkH+n9SY8SYr0gHUX94PSTDmKd957gyc=";
+  };
+
+  patches = [
+    ./add-option-for-installation-sysconfdir.patch
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+    intltool
+    meson
+    ninja
+    wrapGAppsHook
+    python3
+    vala
+    gobject-introspection
+    # devdoc
+    gtk-doc
+    docbook-xsl-nons
+    docbook_xml_dtd_412
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
+  ];
+
+  buildInputs = [
+    glib
+    json-glib
+    libsoup_3
+    avahi
+  ] ++ lib.optionals withDemoAgent [
+    libnotify gdk-pixbuf
+  ] ++ lib.optionals (!stdenv.isDarwin) [
+    modemmanager
+  ];
+
+  propagatedBuildInputs = [
+    glib
+    glib-networking
+  ];
+
+  mesonFlags = [
+    "-Dsystemd-system-unit-dir=${placeholder "out"}/etc/systemd/system"
+    "-Ddemo-agent=${lib.boolToString withDemoAgent}"
+    "--sysconfdir=/etc"
+    "-Dsysconfdir_install=${placeholder "out"}/etc"
+    "-Dmozilla-api-key=5c28d1f4-9511-47ff-b11a-2bef80fc177c"
+    "-Ddbus-srv-user=geoclue"
+    "-Ddbus-sys-dir=${placeholder "out"}/share/dbus-1/system.d"
+  ] ++ lib.optionals stdenv.isDarwin [
+    "-D3g-source=false"
+    "-Dcdma-source=false"
+    "-Dmodem-gps-source=false"
+    "-Dnmea-source=false"
+  ];
+
+  postPatch = ''
+    chmod +x demo/install-file.py
+    patchShebangs demo/install-file.py
+  '';
+
+  meta = with lib; {
+    broken = stdenv.isDarwin && withDemoAgent;
+    description = "Geolocation framework and some data providers";
+    homepage = "https://gitlab.freedesktop.org/geoclue/geoclue/wikis/home";
+    maintainers = with maintainers; [ raskin mimame ];
+    platforms = with platforms; linux ++ darwin;
+    license = licenses.lgpl2Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/geocode-glib/default.nix b/nixpkgs/pkgs/development/libraries/geocode-glib/default.nix
new file mode 100644
index 000000000000..ee619aad89ea
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/geocode-glib/default.nix
@@ -0,0 +1,72 @@
+{ stdenv
+, lib
+, fetchurl
+, meson
+, mesonEmulatorHook
+, ninja
+, pkg-config
+, gettext
+, gtk-doc
+, docbook-xsl-nons
+, gobject-introspection
+, gnome
+, libsoup
+, json-glib
+, glib
+, nixosTests
+}:
+
+stdenv.mkDerivation rec {
+  pname = "geocode-glib";
+  version = "3.26.4";
+
+  outputs = [ "out" "dev" "devdoc" "installedTests" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/geocode-glib/${lib.versions.majorMinor version}/geocode-glib-${version}.tar.xz";
+    sha256 = "LZpoJtFYRwRJoXOHEiFZbaD4Pr3P+YuQxwSQiQVqN6o=";
+  };
+
+  patches = [
+    ./installed-tests-path.patch
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gettext
+    gtk-doc
+    docbook-xsl-nons
+    gobject-introspection
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
+  ];
+
+  buildInputs = [
+    glib
+    libsoup
+    json-glib
+  ];
+
+  mesonFlags = [
+    "-Dsoup2=${lib.boolToString (lib.versionOlder libsoup.version "2.99")}"
+    "-Dinstalled_test_prefix=${placeholder "installedTests"}"
+  ];
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+    };
+    tests = {
+      installed-tests = nixosTests.installed-tests.geocode-glib;
+    };
+  };
+
+  meta = with lib; {
+    description = "A convenience library for the geocoding and reverse geocoding using Nominatim service";
+    license = licenses.lgpl2Plus;
+    maintainers = teams.gnome.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/geocode-glib/installed-tests-path.patch b/nixpkgs/pkgs/development/libraries/geocode-glib/installed-tests-path.patch
new file mode 100644
index 000000000000..e5f24abdddd1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/geocode-glib/installed-tests-path.patch
@@ -0,0 +1,26 @@
+diff --git a/geocode-glib/tests/meson.build b/geocode-glib/tests/meson.build
+index 5cd1fca..c2f9a9d 100644
+--- a/geocode-glib/tests/meson.build
++++ b/geocode-glib/tests/meson.build
+@@ -1,5 +1,5 @@
+-install_dir = get_option('prefix') / get_option('datadir') / 'installed-tests' / library_name
+-install_bindir = get_option('prefix') / get_option('libexecdir') / library_name
++install_dir = get_option('installed_test_prefix') / 'share' / 'installed-tests' / library_name
++install_bindir = get_option('installed_test_prefix') / 'libexec' / library_name
+ 
+ e = executable('geo-uri',
+                'geo-uri.c',
+diff --git a/meson_options.txt b/meson_options.txt
+index 62b713d..1454416 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,6 +1,9 @@
+ option('enable-installed-tests',
+        type: 'boolean', value: true,
+        description: 'Build & install test programs')
++option('installed_test_prefix',
++       type: 'string', value: '',
++       description: 'Prefix for installed tests')
+ option('enable-introspection',
+         type: 'boolean', value: true,
+         description: 'Whether to enable the introspection generation')
diff --git a/nixpkgs/pkgs/development/libraries/geogram/default.nix b/nixpkgs/pkgs/development/libraries/geogram/default.nix
new file mode 100644
index 000000000000..619b5dfcdf57
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/geogram/default.nix
@@ -0,0 +1,128 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchFromGitHub
+
+, cmake
+, doxygen
+, zlib
+, python3Packages
+}:
+
+let
+  testdata = fetchFromGitHub {
+    owner = "BrunoLevy";
+    repo = "geogram.data";
+    rev = "43dd49054a78d9b3fb8ef729f48ab47a272c718c";
+    hash = "sha256-F2Lyt4nEOczVYLz6WLny+YrsxNwREBGPkProN8NHFN4=";
+  };
+in
+stdenv.mkDerivation rec {
+  pname = "geogram";
+  version = "1.8.6";
+
+  src = fetchurl {
+    url = "https://github.com/BrunoLevy/geogram/releases/download/v${version}/geogram_${version}.tar.gz";
+    hash = "sha256-Xqha5HVqD2Ao0z++RKcQdMZUmtMb5eZ1DMJEVrfNUzE=";
+  };
+
+  outputs = [ "bin" "lib" "dev" "doc" "out" ];
+
+  cmakeFlags = [
+    # Triangle is unfree
+    "-DGEOGRAM_WITH_TRIANGLE=OFF"
+
+    # Disable some extra features (feel free to create a PR if you need one of those)
+
+    # If GEOGRAM_WITH_LEGACY_NUMERICS is enabled GeoGram will build its own version of
+    # ARPACK, CBLAS, CLAPACK, LIBF2C and SUPERLU
+    "-DGEOGRAM_WITH_LEGACY_NUMERICS=OFF"
+
+    # Don't build Lua
+    "-DGEOGRAM_WITH_LUA=OFF"
+
+    # Disable certain features requiring GLFW
+    "-DGEOGRAM_WITH_GRAPHICS=OFF"
+
+    # NOTE: Options introduced by patch (see below)
+    "-DGEOGRAM_INSTALL_CMAKE_DIR=${placeholder "dev"}/lib/cmake"
+    "-DGEOGRAM_INSTALL_PKGCONFIG_DIR=${placeholder "dev"}/lib/pkgconfig"
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    doxygen
+  ];
+
+  buildInputs = [
+    zlib
+  ];
+
+  patches = [
+    # This patch replaces the bundled (outdated) zlib with our zlib
+    # Should be harmless, but if there are issues this patch can also be removed
+    # Also check https://github.com/BrunoLevy/geogram/issues/49 for progress
+    ./replace-bundled-zlib.patch
+  ];
+
+  postPatch = lib.optionalString stdenv.isAarch64 ''
+    substituteInPlace cmake/platforms/*/config.cmake \
+      --replace "-m64" ""
+  '';
+
+  postBuild = ''
+    make doc-devkit-full
+  '';
+
+  nativeCheckInputs = [
+    python3Packages.robotframework
+  ];
+
+  doCheck = true;
+
+  checkPhase =
+    let
+      skippedTests = [
+        # Failing tests as of version 1.8.3
+        "FileConvert"
+        "Reconstruct"
+        "Remesh"
+
+        # Skip slow RVD test
+        "RVD"
+
+        # Flaky as of 1.8.5 (SIGSEGV, possibly a use-after-free)
+        "Delaunay"
+      ];
+    in
+    ''
+      runHook preCheck
+
+      ln -s ${testdata} ../tests/data
+
+      source tests/testenv.sh
+      robot \
+        ${lib.concatMapStringsSep " " (t: lib.escapeShellArg "--skip=${t}") skippedTests} \
+        ../tests
+
+      runHook postCheck
+    '';
+
+  meta = with lib; {
+    description = "Programming Library with Geometric Algorithms";
+    longDescription = ''
+      Geogram contains the main results in Geometry Processing from the former ALICE Inria project,
+      that is, more than 30 research articles published in ACM SIGGRAPH, ACM Transactions on Graphics,
+      Symposium on Geometry Processing and Eurographics.
+    '';
+    homepage = "https://github.com/BrunoLevy/geogram";
+    license = licenses.bsd3;
+
+    # Broken on aarch64-linux as of version 1.8.3
+    # See https://github.com/BrunoLevy/geogram/issues/74
+    broken = stdenv.isLinux && stdenv.isAarch64;
+
+    platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
+    maintainers = with maintainers; [ tmarkus ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/geogram/replace-bundled-zlib.patch b/nixpkgs/pkgs/development/libraries/geogram/replace-bundled-zlib.patch
new file mode 100644
index 000000000000..3d19d66b0d2b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/geogram/replace-bundled-zlib.patch
@@ -0,0 +1,46 @@
+--- a/src/lib/geogram/third_party/CMakeLists.txt	1970-01-01 01:00:01.000000000 +0100
++++ b/src/lib/geogram/third_party/CMakeLists.txt	2023-03-09 20:46:16.740801862 +0100
+@@ -33,7 +33,6 @@
+ aux_source_directories(SOURCES "Source Files\\LM6"          LM7)
+ aux_source_directories(SOURCES "Source Files\\rply"         rply)
+ aux_source_directories(SOURCES "Source Files\\shewchuk"     shewchuk)
+-aux_source_directories(SOURCES "Source Files\\zlib"         zlib)
+ aux_source_directories(SOURCES "Source Files\\PoissonRecon" PoissonRecon)
+ aux_source_directories(SOURCES "Source Files\\xatlas"       xatlas)
+ 
+--- a/src/lib/geogram/CMakeLists.txt	1970-01-01 01:00:01.000000000 +0100
++++ b/src/lib/geogram/CMakeLists.txt	2023-03-09 20:49:21.080059939 +0100
+@@ -70,6 +70,9 @@
+     target_link_libraries(geogram psapi)
+ endif()
+ 
++find_package(ZLIB REQUIRED)
++target_link_libraries(geogram ZLIB::ZLIB)
++
+ # Install the library
+ install_devkit_targets(geogram)
+ 
+--- a/src/lib/geogram/basic/geofile.h	1970-01-01 01:00:01.000000000 +0100
++++ b/src/lib/geogram/basic/geofile.h	2023-03-09 20:52:33.713329571 +0100
+@@ -44,7 +44,7 @@
+ #include <geogram/basic/numeric.h>
+ #include <geogram/basic/memory.h>
+ #include <geogram/basic/string.h>
+-#include <geogram/third_party/zlib/zlib.h>
++#include <zlib.h>
+ 
+ #include <stdexcept>
+ #include <fstream>
+--- a/src/lib/geogram/third_party/CMakeLists.txt	1970-01-01 01:00:01.000000000 +0100
++++ b/src/lib/geogram/third_party/CMakeLists.txt	2023-03-09 20:54:50.276520762 +0100
+@@ -60,8 +59,10 @@
+     ${ANDROID_NDK}/sources/android/native_app_glue
+   )
+   message(STATUS "building for Android")
+ endif()  
+ 
++find_package(ZLIB REQUIRED)
++target_link_libraries(geogram_third_party PUBLIC ZLIB::ZLIB)
+ 
+ set_target_properties(
+     geogram_third_party PROPERTIES
diff --git a/nixpkgs/pkgs/development/libraries/geographiclib/default.nix b/nixpkgs/pkgs/development/libraries/geographiclib/default.nix
new file mode 100644
index 000000000000..70eba2c3a384
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/geographiclib/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub, cmake, doxygen }:
+
+stdenv.mkDerivation rec {
+  pname = "geographiclib";
+  version = "2.3";
+
+  src = fetchFromGitHub {
+    owner = "geographiclib";
+    repo = "geographiclib";
+    rev = "v${version}";
+    hash = "sha256-FVA2y1q0WjRSCltCN2qntWC//Zj94TXO/fTebFfQ9NY=";
+  };
+
+  nativeBuildInputs = [ cmake doxygen ];
+
+  cmakeFlags = [
+    "-DBUILD_DOCUMENTATION=ON"
+    "-DCMAKE_INSTALL_LIBDIR=lib"
+  ];
+
+  meta = with lib; {
+    description = "C++ geographic library";
+    longDescription = ''
+      GeographicLib is a small C++ library for:
+      * geodesic and rhumb line calculations
+      * conversions between geographic, UTM, UPS, MGRS, geocentric, and local cartesian coordinates
+      * gravity (e.g., EGM2008) and geomagnetic field (e.g., WMM2020) calculations
+    '';
+    homepage = "https://geographiclib.sourceforge.io/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ sikmir ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/geoip/default.nix b/nixpkgs/pkgs/development/libraries/geoip/default.nix
new file mode 100644
index 000000000000..4b12871e5567
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/geoip/default.nix
@@ -0,0 +1,52 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, drvName ? "geoip"
+
+  # in geoipDatabase, you can insert a package defining
+  # "${geoipDatabase}/share/GeoIP" e.g. geolite-legacy
+, geoipDatabase ? "/var/lib/geoip-databases"
+}:
+
+let
+  dataDir =
+    if lib.isDerivation geoipDatabase
+    then "${toString geoipDatabase}/share/GeoIP"
+    else geoipDatabase;
+
+in
+stdenv.mkDerivation rec {
+  pname = drvName;
+  version = "1.6.12";
+
+  src = fetchFromGitHub {
+    owner = "maxmind";
+    repo = "geoip-api-c";
+    rev = "v${version}";
+    sha256 = "0ixyp3h51alnncr17hqp1p0rlqz9w69nlhm60rbzjjz3vjx52ajv";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  # Cross compilation shenanigans
+  configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "ac_cv_func_malloc_0_nonnull=yes"
+    "ac_cv_func_realloc_0_nonnull=yes"
+  ];
+
+  # Fix up the default data directory
+  postConfigure = ''
+    find . -name Makefile.in -exec sed -i -r 's#^pkgdatadir\s*=.+$#pkgdatadir = ${dataDir}#' {} \;
+  '';
+
+  passthru = { inherit dataDir; };
+
+  meta = with lib; {
+    description = "An API for GeoIP/Geolocation databases";
+    maintainers = with maintainers; [ thoughtpolice raskin ];
+    license = licenses.lgpl21;
+    platforms = platforms.unix;
+    homepage = "https://www.maxmind.com";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/geos/3.11.nix b/nixpkgs/pkgs/development/libraries/geos/3.11.nix
new file mode 100644
index 000000000000..90bdfdb0d605
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/geos/3.11.nix
@@ -0,0 +1,47 @@
+{ lib
+, stdenv
+, callPackage
+, fetchpatch
+, fetchurl
+, testers
+
+, cmake
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "geos";
+  version = "3.11.2";
+
+  src = fetchurl {
+    url = "https://download.osgeo.org/geos/${finalAttrs.pname}-${finalAttrs.version}.tar.bz2";
+    hash = "sha256-sfB3ZpSBxaPmKv/EnpbrBvKBmHpdNv2rIlIX5bgl5Mw=";
+  };
+
+  patches = [
+    # Pull upstream fix of `gcc-13` build failure:
+    #   https://github.com/libgeos/geos/pull/805
+    (fetchpatch {
+      name = "gcc-13.patch";
+      url = "https://github.com/libgeos/geos/commit/bea3188be44075034fd349f5bb117c943bdb7fb1.patch";
+      hash = "sha256-dQT3Hf9YJchgjon/r46TLIXXbE6C0ZnewyvfYJea4jM=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  doCheck = true;
+
+  passthru.tests = {
+    pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+    geos = callPackage ./tests.nix { geos = finalAttrs.finalPackage; };
+  };
+
+  meta = with lib; {
+    description = "C/C++ library for computational geometry with a focus on algorithms used in geographic information systems (GIS) software";
+    homepage = "https://libgeos.org";
+    license = licenses.lgpl21Only;
+    maintainers = teams.geospatial.members;
+    pkgConfigModules = [ "geos" ];
+    mainProgram = "geosop";
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/geos/3.9.nix b/nixpkgs/pkgs/development/libraries/geos/3.9.nix
new file mode 100644
index 000000000000..cc3025928c80
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/geos/3.9.nix
@@ -0,0 +1,32 @@
+{ lib
+, stdenv
+, fetchurl
+, cmake
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "geos";
+  version = "3.9.5";
+
+  src = fetchurl {
+    url = "https://download.osgeo.org/geos/${finalAttrs.pname}-${finalAttrs.version}.tar.bz2";
+    hash = "sha256-xsmu36iGT7RLp4kRQIRCOCv9BpDPLUCRrjgFyGN4kDY=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  enableParallelBuilding = true;
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    description = "C++ port of the Java Topology Suite (JTS)";
+    homepage = "https://trac.osgeo.org/geos";
+    license = licenses.lgpl21Only;
+    pkgConfigModules = [ "geos" ];
+    maintainers = with lib.maintainers; [
+      willcohen
+    ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/geos/default.nix b/nixpkgs/pkgs/development/libraries/geos/default.nix
new file mode 100644
index 000000000000..fc3cff98d7e8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/geos/default.nix
@@ -0,0 +1,37 @@
+{ lib
+, stdenv
+, callPackage
+, fetchurl
+, testers
+
+, cmake
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "geos";
+  version = "3.12.1";
+
+  src = fetchurl {
+    url = "https://download.osgeo.org/geos/${finalAttrs.pname}-${finalAttrs.version}.tar.bz2";
+    hash = "sha256-1up+SSIktRGT6CRP4+wXxNRNB3fzwyyk+xcRQFSaDQM=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  doCheck = true;
+
+  passthru.tests = {
+    pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+    geos = callPackage ./tests.nix { geos = finalAttrs.finalPackage; };
+  };
+
+  meta = with lib; {
+    description = "C/C++ library for computational geometry with a focus on algorithms used in geographic information systems (GIS) software";
+    homepage = "https://libgeos.org";
+    license = licenses.lgpl21Only;
+    mainProgram = "geosop";
+    maintainers = teams.geospatial.members;
+    pkgConfigModules = [ "geos" ];
+    changelog = "https://github.com/libgeos/geos/releases/tag/${finalAttrs.finalPackage.version}";
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/geos/tests.nix b/nixpkgs/pkgs/development/libraries/geos/tests.nix
new file mode 100644
index 000000000000..ad9ab883db2d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/geos/tests.nix
@@ -0,0 +1,15 @@
+{ runCommand, geos }:
+
+let
+  inherit (geos) pname;
+in
+runCommand "${pname}-tests" { meta.timeout = 60; }
+  ''
+    ${geos}/bin/geosop \
+      --explode \
+      --format wkt \
+      polygonize \
+      -a "MULTILINESTRING ((200 100, 100 100, 200 200), (200 200, 200 100), (200 200, 300 100, 200 100))" \
+      | grep 'POLYGON ((200 100, 100 100, 200 200, 200 100))'
+    touch $out
+  ''
diff --git a/nixpkgs/pkgs/development/libraries/getdata/default.nix b/nixpkgs/pkgs/development/libraries/getdata/default.nix
new file mode 100644
index 000000000000..8617d7ddd2f2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/getdata/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, libtool }:
+stdenv.mkDerivation rec {
+  pname = "getdata";
+  version = "0.11.0";
+  src = fetchFromGitHub {
+    owner = "ketiltrout";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-fuFakbkxDwDp6Z9VITPIB8NiYRSp98Ub1y5SC6W5S1E=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ libtool ];
+
+  meta = with lib; {
+    description = "Reference implementation of the Dirfile Standards";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.all;
+    maintainers = [ maintainers.vbgl ];
+    homepage = "https://getdata.sourceforge.net/";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/getdns/default.nix b/nixpkgs/pkgs/development/libraries/getdns/default.nix
new file mode 100644
index 000000000000..0a6f34eab6cc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/getdns/default.nix
@@ -0,0 +1,92 @@
+# Getdns and Stubby are released together, see https://getdnsapi.net/releases/
+
+{ lib, stdenv, fetchurl, cmake, darwin, doxygen, libidn2, libyaml, openssl
+, systemd, unbound, yq }:
+let
+  metaCommon = with lib; {
+    maintainers = with maintainers; [ leenaars ehmry ];
+    license = licenses.bsd3;
+    platforms = platforms.all;
+  };
+in rec {
+
+  getdns = stdenv.mkDerivation rec {
+    pname = "getdns";
+    version = "1.7.3";
+    outputs = [ "out" "dev" "lib" "man" ];
+
+    src = fetchurl {
+      url = with lib; "https://getdnsapi.net/releases/${pname}-${concatStringsSep "-" (splitVersion version)}/${pname}-${version}.tar.gz";
+      # upstream publishes hashes in hex format
+      sha256 = "f1404ca250f02e37a118aa00cf0ec2cbe11896e060c6d369c6761baea7d55a2c";
+    };
+
+    nativeBuildInputs = [ cmake doxygen ];
+
+    buildInputs = [ libidn2 openssl unbound ];
+
+    # https://github.com/getdnsapi/getdns/issues/517
+    postPatch = ''
+      substituteInPlace getdns.pc.in \
+        --replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
+        --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
+    '';
+
+    postInstall = "rm -r $out/share/doc";
+
+    meta = with lib;
+      metaCommon // {
+        description = "A modern asynchronous DNS API";
+        longDescription = ''
+          getdns is an implementation of a modern asynchronous DNS API; the
+          specification was originally edited by Paul Hoffman. It is intended to make all
+          types of DNS information easily available to application developers and non-DNS
+          experts. DNSSEC offers a unique global infrastructure for establishing and
+          enhancing cryptographic trust relations. With the development of this API the
+          developers intend to offer application developers a modern and flexible
+          interface that enables end-to-end trust in the DNS architecture, and which will
+          inspire application developers to implement innovative security solutions in
+          their applications.
+        '';
+        homepage = "https://getdnsapi.net";
+      };
+  };
+
+  stubby = stdenv.mkDerivation rec {
+    pname = "stubby";
+    version = "0.4.3";
+    outputs = [ "out" "man" "stubbyExampleJson" ];
+
+    inherit (getdns) src;
+    sourceRoot = "${getdns.pname}-${getdns.version}/stubby";
+
+    nativeBuildInputs = [ cmake doxygen yq ];
+
+    buildInputs = [ getdns libyaml openssl systemd ]
+      ++ lib.optionals stdenv.isDarwin [ darwin.Security ];
+
+    postInstall = ''
+      rm -r $out/share/doc
+      yq \
+        < $NIX_BUILD_TOP/$sourceRoot/stubby.yml.example \
+        > $stubbyExampleJson
+    '';
+
+    passthru.settingsExample = with builtins;
+      fromJSON (readFile stubby.stubbyExampleJson);
+
+    meta = with lib;
+      metaCommon // {
+        description = "A local DNS Privacy stub resolver (using DNS-over-TLS)";
+        longDescription = ''
+          Stubby is an application that acts as a local DNS Privacy stub
+          resolver (using RFC 7858, aka DNS-over-TLS). Stubby encrypts DNS
+          queries sent from a client machine (desktop or laptop) to a DNS
+          Privacy resolver increasing end user privacy. Stubby is developed by
+          the getdns team.
+        '';
+        homepage = "https://dnsprivacy.org/wiki/x/JYAT";
+      };
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/gettext/0001-msginit-Do-not-use-POT-Creation-Date.patch b/nixpkgs/pkgs/development/libraries/gettext/0001-msginit-Do-not-use-POT-Creation-Date.patch
new file mode 100644
index 000000000000..eea9dc6e0378
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gettext/0001-msginit-Do-not-use-POT-Creation-Date.patch
@@ -0,0 +1,32 @@
+From 1e000ca711886055176a2f90197a383d09de0e67 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?=
+ <rosen644835@gmail.com>
+Date: Fri, 18 Dec 2020 14:19:36 +0100
+Subject: [PATCH] msginit: Do not use POT-Creation-Date.
+
+* gettext-tools/src/msginit.c (po_revision_date): Do not use
+POT-Creation-Date when the file is automatically generated.
+---
+ gettext-tools/src/msginit.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/gettext-tools/src/msginit.c b/gettext-tools/src/msginit.c
+index 8ca9a3b77..06e0e7195 100644
+--- a/gettext-tools/src/msginit.c
++++ b/gettext-tools/src/msginit.c
+@@ -1075,9 +1075,9 @@ static const char *
+ po_revision_date (const char *header)
+ {
+   if (no_translator)
+-    /* Because the PO file is automatically generated, we use the
+-       POT-Creation-Date, not the current time.  */
+-    return get_field (header, "POT-Creation-Date");
++    /* Because the PO file is automatically generated, we don't
++       generate PO-Revision-Date field.  */
++    return NULL;
+   else
+     {
+       /* Assume the translator will modify the PO file now.  */
+-- 
+2.29.2
+
diff --git a/nixpkgs/pkgs/development/libraries/gettext/absolute-paths.diff b/nixpkgs/pkgs/development/libraries/gettext/absolute-paths.diff
new file mode 100644
index 000000000000..af37f61a9a41
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gettext/absolute-paths.diff
@@ -0,0 +1,21 @@
+diff --git a/gettext-runtime/src/gettext.sh.in b/gettext-runtime/src/gettext.sh.in
+index 1dfa3bb..d6ef8a8 100644
+--- a/gettext-runtime/src/gettext.sh.in
++++ b/gettext-runtime/src/gettext.sh.in
+@@ -86,14 +86,14 @@ fi
+ # looks up the translation of MSGID and substitutes shell variables in the
+ # result.
+ eval_gettext () {
+-  gettext "$1" | (export PATH `envsubst --variables "$1"`; envsubst "$1")
++  @out@/bin/gettext "$1" | (export PATH `@out@/bin/envsubst --variables "$1"`; @out@/bin/envsubst "$1")
+ }
+ 
+ # eval_ngettext MSGID MSGID-PLURAL COUNT
+ # looks up the translation of MSGID / MSGID-PLURAL for COUNT and substitutes
+ # shell variables in the result.
+ eval_ngettext () {
+-  ngettext "$1" "$2" "$3" | (export PATH `envsubst --variables "$1 $2"`; envsubst "$1 $2")
++  @out@/bin/ngettext "$1" "$2" "$3" | (export PATH `@out@/bin/envsubst --variables "$1 $2"`; @out@/bin/envsubst "$1 $2")
+ }
+ 
+ # Note: This use of envsubst is much safer than using the shell built-in 'eval'
diff --git a/nixpkgs/pkgs/development/libraries/gettext/default.nix b/nixpkgs/pkgs/development/libraries/gettext/default.nix
new file mode 100644
index 000000000000..4366f9df5aad
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gettext/default.nix
@@ -0,0 +1,113 @@
+{ stdenv, lib, fetchurl, libiconv, xz, bash
+}:
+
+# 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.
+
+# Note: this package is used for bootstrapping fetchurl, and thus
+# cannot use fetchpatch! All mutable patches (generated by GitHub or
+# cgit) that are needed here should be included directly in Nixpkgs as
+# files.
+
+stdenv.mkDerivation rec {
+  pname = "gettext";
+  version = "0.21.1";
+
+  src = fetchurl {
+    url = "mirror://gnu/gettext/${pname}-${version}.tar.gz";
+    sha256 = "sha256-6MNlDh2M7odcTzVWQjgsHfgwWL1aEe6FVcDPJ21kbUU=";
+  };
+  patches = [
+    ./absolute-paths.diff
+    # fix reproducibile output, in particular in the grub2 build
+    # https://savannah.gnu.org/bugs/index.php?59658
+    ./0001-msginit-Do-not-use-POT-Creation-Date.patch
+  ];
+
+  outputs = [ "out" "man" "doc" "info" ];
+
+  hardeningDisable = [ "format" ];
+
+  LDFLAGS = lib.optionalString stdenv.isSunOS "-lm -lmd -lmp -luutil -lnvpair -lnsl -lidmap -lavl -lsec";
+
+  configureFlags = [
+     "--disable-csharp" "--with-xz"
+  ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    # On cross building, gettext supposes that the wchar.h from libc
+    # does not fulfill gettext needs, so it tries to work with its
+    # own wchar.h file, which does not cope well with the system's
+    # wchar.h and stddef.h (gcc-4.3 - glibc-2.9)
+    "gl_cv_func_wcwidth_works=yes"
+  ];
+
+  postPatch = ''
+   substituteAllInPlace gettext-runtime/src/gettext.sh.in
+   substituteInPlace gettext-tools/projects/KDE/trigger --replace "/bin/pwd" pwd
+   substituteInPlace gettext-tools/projects/GNOME/trigger --replace "/bin/pwd" pwd
+   substituteInPlace gettext-tools/src/project-id --replace "/bin/pwd" pwd
+  '' + lib.optionalString stdenv.hostPlatform.isCygwin ''
+    sed -i -e "s/\(cldr_plurals_LDADD = \)/\\1..\/gnulib-lib\/libxml_rpl.la /" gettext-tools/src/Makefile.in
+    sed -i -e "s/\(libgettextsrc_la_LDFLAGS = \)/\\1..\/gnulib-lib\/libxml_rpl.la /" gettext-tools/src/Makefile.in
+  '' + lib.optionalString stdenv.hostPlatform.isMinGW ''
+    sed -i "s/@GNULIB_CLOSE@/1/" */*/unistd.in.h
+  '';
+
+  strictDeps = true;
+  nativeBuildInputs = [
+    xz
+    xz.bin
+  ];
+  buildInputs = lib.optionals (!stdenv.hostPlatform.isMinGW) [
+    bash
+  ]
+  ++ lib.optionals (!stdenv.isLinux && !stdenv.hostPlatform.isCygwin) [
+    # HACK, see #10874 (and 14664)
+    libiconv
+  ];
+
+  setupHooks = [
+    ../../../build-support/setup-hooks/role.bash
+    ./gettext-setup-hook.sh
+  ];
+  env = {
+    gettextNeedsLdflags = stdenv.hostPlatform.libc != "glibc" && !stdenv.hostPlatform.isMusl;
+  };
+
+  enableParallelBuilding = true;
+  enableParallelChecking = false; # fails sometimes
+
+  meta = with lib; {
+    description = "Well integrated set of translation tools and documentation";
+
+    longDescription = ''
+      Usually, programs are written and documented in English, and use
+      English at execution time for interacting with users.  Using a common
+      language is quite handy for communication between developers,
+      maintainers and users from all countries.  On the other hand, most
+      people are less comfortable with English than with their own native
+      language, and would rather be using their mother tongue for day to
+      day's work, as far as possible.  Many would simply love seeing their
+      computer screen showing a lot less of English, and far more of their
+      own language.
+
+      GNU `gettext` is an important step for the GNU Translation Project, as
+      it is an asset on which we may build many other steps. This package
+      offers to programmers, translators, and even users, a well integrated
+      set of tools and documentation. Specifically, the GNU `gettext`
+      utilities are a set of tools that provides a framework to help other
+      GNU packages produce multi-lingual messages.
+    '';
+
+    homepage = "https://www.gnu.org/software/gettext/";
+
+    maintainers = with maintainers; [ zimbatm vrthra ];
+    license = licenses.gpl2Plus;
+    platforms = platforms.all;
+  };
+}
+
+// lib.optionalAttrs stdenv.isDarwin {
+  makeFlags = [ "CFLAGS=-D_FORTIFY_SOURCE=0" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/gettext/gettext-setup-hook.sh b/nixpkgs/pkgs/development/libraries/gettext/gettext-setup-hook.sh
new file mode 100644
index 000000000000..5cc9655a89bc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gettext/gettext-setup-hook.sh
@@ -0,0 +1,17 @@
+gettextDataDirsHook() {
+    # See pkgs/build-support/setup-hooks/role.bash
+    getHostRoleEnvHook
+    if [ -d "$1/share/gettext" ]; then
+        addToSearchPath "GETTEXTDATADIRS${role_post}" "$1/share/gettext"
+    fi
+}
+
+addEnvHooks "$hostOffset" gettextDataDirsHook
+
+# libintl must be listed in load flags on non-Glibc
+# it doesn't hurt to have it in Glibc either though
+if [ -n "@gettextNeedsLdflags@" -a -z "${dontAddExtraLibs-}" ]; then
+    # See pkgs/build-support/setup-hooks/role.bash
+    getHostRole
+    export NIX_LDFLAGS${role_post}+=" -lintl"
+fi
diff --git a/nixpkgs/pkgs/development/libraries/gexiv2/default.nix b/nixpkgs/pkgs/development/libraries/gexiv2/default.nix
new file mode 100644
index 000000000000..4a346fdcffcd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gexiv2/default.nix
@@ -0,0 +1,84 @@
+{ stdenv
+, lib
+, fetchurl
+, meson
+, mesonEmulatorHook
+, ninja
+, pkg-config
+, exiv2
+, glib
+, gnome
+, gobject-introspection
+, vala
+, gtk-doc
+, docbook-xsl-nons
+, docbook_xml_dtd_43
+, python3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gexiv2";
+  version = "0.14.2";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "Kgyc9I++izQ1AIhm/9QLjt2wZn0iErQjlv32iOk84L4=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gobject-introspection
+    vala
+    gtk-doc
+    docbook-xsl-nons
+    docbook_xml_dtd_43
+    (python3.pythonOnBuildForHost.withPackages (ps: [ ps.pygobject3 ]))
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
+  ];
+
+  buildInputs = [
+    glib
+  ];
+
+  propagatedBuildInputs = [
+    exiv2
+  ];
+
+  mesonFlags = [
+    "-Dgtk_doc=true"
+    "-Dtests=true"
+  ];
+
+  doCheck = true;
+
+  preCheck = let
+    libSuffix = if stdenv.isDarwin then "2.dylib" else "so.2";
+  in ''
+    # Our gobject-introspection patches make the shared library paths absolute
+    # in the GIR files. When running unit tests, the library is not yet installed,
+    # though, so we need to replace the absolute path with a local one during build.
+    # We are using a symlink that will be overridden during installation.
+    mkdir -p $out/lib
+    ln -s $PWD/gexiv2/libgexiv2.${libSuffix} $out/lib/libgexiv2.${libSuffix}
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://wiki.gnome.org/Projects/gexiv2";
+    description = "GObject wrapper around the Exiv2 photo metadata library";
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+    maintainers = teams.gnome.members;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gf2x/default.nix b/nixpkgs/pkgs/development/libraries/gf2x/default.nix
new file mode 100644
index 000000000000..1b45be611281
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gf2x/default.nix
@@ -0,0 +1,50 @@
+{ stdenv
+, lib
+, fetchFromGitLab
+, fetchpatch
+, autoreconfHook
+, buildPackages
+, optimize ? false # impure hardware optimizations
+}:
+stdenv.mkDerivation rec {
+  pname = "gf2x";
+  version = "1.3.0";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.inria.fr";
+    owner = "gf2x";
+    repo = pname;
+    rev = "${pname}-${version}";
+    sha256 = "04g5jg0i4vz46b4w2dvbmahwzi3k6b8g515mfw7im1inc78s14id";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "gf2x-1.3.0-configure-clang16.patch";
+      url = "https://gitlab.inria.fr/gf2x/gf2x/-/commit/a2f0fd388c12ca0b9f4525c6cfbc515418dcbaf8.diff";
+      hash = "sha256-Aj2KzWZMR24S04IbPOBPwacCU4rEiB+FFWxtRuF50LA=";
+    })
+  ];
+
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  # no actual checks present yet (as of 1.2), but can't hurt trying
+  # for an indirect test, run ntl's test suite
+  doCheck = true;
+
+  configureFlags = lib.optionals (!optimize) [
+    "--disable-hardware-specific-code"
+  ];
+
+  meta = with lib; {
+    description = "Routines for fast arithmetic in GF(2)[x]";
+    homepage = "https://gitlab.inria.fr/gf2x/gf2x/";
+    license = licenses.gpl2Plus;
+    maintainers = teams.sage.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gfbgraph/default.nix b/nixpkgs/pkgs/development/libraries/gfbgraph/default.nix
new file mode 100644
index 000000000000..d84dd96ce2f4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gfbgraph/default.nix
@@ -0,0 +1,67 @@
+{ stdenv
+, lib
+, fetchurl
+, pkg-config
+, glib
+, librest
+, gnome-online-accounts
+, gnome
+, libsoup
+, json-glib
+, gobject-introspection
+, gtk-doc
+, pkgs
+, docbook-xsl-nons
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gfbgraph";
+  version = "0.2.5";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "nLOBs/eLoRNt+Xrz8G47EdzCqzOawI907aD4BX1mA+M=";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+    gobject-introspection
+    gtk-doc
+    docbook-xsl-nons
+  ];
+
+  buildInputs = [
+    glib
+    gnome-online-accounts
+  ];
+
+  propagatedBuildInputs = [
+    libsoup
+    json-glib
+    librest
+  ];
+
+  configureFlags = [
+    "--enable-introspection"
+    "--enable-gtk-doc"
+  ];
+
+  enableParallelBuilding = true;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://wiki.gnome.org/Projects/GFBGraph";
+    description = "GLib/GObject wrapper for the Facebook Graph API";
+    maintainers = teams.gnome.members;
+    license = licenses.lgpl21Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gflags/default.nix b/nixpkgs/pkgs/development/libraries/gflags/default.nix
new file mode 100644
index 000000000000..a690d8f2e154
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gflags/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchFromGitHub, cmake
+, enableShared ? !stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gflags";
+  version = "2.2.2";
+
+  src = fetchFromGitHub {
+    owner = "gflags";
+    repo = "gflags";
+    rev = "v${version}";
+    sha256 = "147i3md3nxkjlrccqg4mq1kyzc7yrhvqv5902iibc7znkvzdvlp0";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  # This isn't used by the build and breaks the CMake build on case-insensitive filesystems (e.g., on Darwin)
+  preConfigure = "rm BUILD";
+
+  cmakeFlags = [
+    "-DGFLAGS_BUILD_SHARED_LIBS=${if enableShared then "ON" else "OFF"}"
+    "-DGFLAGS_BUILD_STATIC_LIBS=ON"
+  ];
+
+  doCheck = false;
+
+  meta = with lib; {
+    description = "A C++ library that implements commandline flags processing";
+    longDescription = ''
+      The gflags package contains a C++ library that implements commandline flags processing.
+      As such it's a replacement for getopt().
+      It was owned by Google. google-gflags project has been renamed to gflags and maintained by new community.
+    '';
+    homepage = "https://gflags.github.io/gflags/";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.linquize ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gfxstream/default.nix b/nixpkgs/pkgs/development/libraries/gfxstream/default.nix
new file mode 100644
index 000000000000..196bca7cdc5f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gfxstream/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitiles, meson, ninja, pkg-config, python3
+, aemu, libdrm, libglvnd, vulkan-headers, vulkan-loader, xorg
+}:
+
+stdenv.mkDerivation {
+  pname = "gfxstream";
+  version = "0.1.2";
+
+  src = fetchFromGitiles {
+    url = "https://android.googlesource.com/platform/hardware/google/gfxstream";
+    rev = "a29282666c0e2fdbb2c98cfe68a7c0677163ef91";
+    hash = "sha256-IYXkaHZPEYIE9KW731GN6x6yRS+FYtP1zyHcaSofhIM=";
+  };
+
+  nativeBuildInputs = [ meson ninja pkg-config python3 ];
+  buildInputs = [ aemu libglvnd vulkan-headers vulkan-loader xorg.libX11 ]
+    ++ lib.optional (lib.meta.availableOn stdenv.hostPlatform libdrm) libdrm;
+
+  # dlopens libvulkan.
+  #
+  # XXX: Unsure if this is required on Darwin.  If it is, it probably
+  #      needs to be done using install_name_tool.
+  preConfigure = lib.optionalString (!stdenv.isDarwin) ''
+    mesonFlagsArray=(-Dcpp_link_args="-Wl,--push-state -Wl,--no-as-needed -lvulkan -Wl,--pop-state")
+  '';
+
+  meta = with lib; {
+    homepage = "https://android.googlesource.com/platform/hardware/google/gfxstream";
+    description = "Graphics Streaming Kit";
+    license = licenses.free; # https://android.googlesource.com/platform/hardware/google/gfxstream/+/refs/heads/main/LICENSE
+    maintainers = with maintainers; [ qyliss ];
+    platforms = aemu.meta.platforms;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ggz_base_libs/default.nix b/nixpkgs/pkgs/development/libraries/ggz_base_libs/default.nix
new file mode 100644
index 000000000000..162a64eeb5da
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ggz_base_libs/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchurl, intltool, openssl, expat, libgcrypt }:
+
+stdenv.mkDerivation rec {
+  pname = "ggz-base-libs";
+  version = "0.99.5";
+
+  src = fetchurl {
+    url = "http://mirrors.ibiblio.org/pub/mirrors/ggzgamingzone/ggz/snapshots/ggz-base-libs-snapshot-${version}.tar.gz";
+    sha256 = "1cw1vg0fbj36zyggnzidx9cbjwfc1yr4zqmsipxnvns7xa2awbdk";
+  };
+
+  nativeBuildInputs = [ intltool ];
+  buildInputs = [ openssl expat libgcrypt ];
+
+  patchPhase = ''
+    substituteInPlace configure \
+      --replace "/usr/local/ssl/include" "${openssl.dev}/include" \
+      --replace "/usr/local/ssl/lib" "${lib.getLib openssl}/lib"
+  '';
+
+  configureFlags = [
+    "--with-tls"
+  ];
+
+  meta = with lib; {
+    description = "GGZ Gaming zone libraries";
+    maintainers = with maintainers;
+    [
+      raskin
+    ];
+    platforms = platforms.linux;
+    license = licenses.gpl2;
+    downloadPage = "http://www.ggzgamingzone.org/releases/";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ghc_filesystem/default.nix b/nixpkgs/pkgs/development/libraries/ghc_filesystem/default.nix
new file mode 100644
index 000000000000..8dd65a90e534
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ghc_filesystem/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, lib, cmake, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "filesystem";
+  version = "1.5.12";
+
+  src = fetchFromGitHub {
+    owner = "gulrak";
+    repo = "filesystem";
+    rev = "v${version}";
+    hash = "sha256-j4RE5Ach7C7Kef4+H9AHSXa2L8OVyJljDwBduKcC4eE=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "header-only single-file C++ std::filesystem compatible helper library";
+    homepage = "https://github.com/gulrak/filesystem";
+    license = licenses.mit;
+    maintainers = with maintainers; [ bbjubjub ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/giflib/4.1.nix b/nixpkgs/pkgs/development/libraries/giflib/4.1.nix
new file mode 100644
index 000000000000..8f3ebcf7d3be
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/giflib/4.1.nix
@@ -0,0 +1,21 @@
+{lib, stdenv, fetchurl}:
+
+stdenv.mkDerivation rec {
+  pname = "giflib";
+  version = "4.1.6";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/giflib/giflib-${version}.tar.bz2";
+    sha256 = "1v9b7ywz7qg8hli0s9vv1b8q9xxb2xvqq2mg1zpr73xwqpcwxhg1";
+  };
+
+  hardeningDisable = [ "format" ];
+
+  meta = with lib; {
+    description = "A library for reading and writing gif images";
+    branch = "4.1";
+    license = licenses.mit;
+    platforms = platforms.unix;
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/giflib/default.nix b/nixpkgs/pkgs/development/libraries/giflib/default.nix
new file mode 100644
index 000000000000..8c8a587ed548
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/giflib/default.nix
@@ -0,0 +1,71 @@
+{ stdenv
+, lib
+, fetchurl
+, fetchpatch
+, fixDarwinDylibNames
+, pkgsStatic
+}:
+
+stdenv.mkDerivation rec {
+  pname = "giflib";
+  version = "5.2.1";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/giflib/giflib-${version}.tar.gz";
+    sha256 = "1gbrg03z1b6rlrvjyc6d41bc8j1bsr7rm8206gb1apscyii5bnii";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "CVE-2022-28506.patch";
+      url = "https://src.fedoraproject.org/rpms/giflib/raw/2e9917bf13df114354163f0c0211eccc00943596/f/CVE-2022-28506.patch";
+      sha256 = "sha256-TBemEXkuox8FdS9RvjnWcTWPaHRo4crcwSR9czrUwBY=";
+    })
+  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
+    # https://sourceforge.net/p/giflib/bugs/133/
+    (fetchpatch {
+      name = "darwin-soname.patch";
+      url = "https://sourceforge.net/p/giflib/bugs/_discuss/thread/4e811ad29b/c323/attachment/Makefile.patch";
+      sha256 = "12afkqnlkl3n1hywwgx8sqnhp3bz0c5qrwcv8j9hifw1lmfhv67r";
+      extraPrefix = "./";
+    })
+  ] ++ lib.optionals stdenv.hostPlatform.isMinGW [
+    # Build dll libraries.
+    (fetchurl {
+      url = "https://aur.archlinux.org/cgit/aur.git/plain/001-mingw-build.patch?h=mingw-w64-giflib&id=4cf1e519bcf51338dc607d23388fca47d71790c0";
+      sha256 = "KyJi3eqH/Ae+guEK6znraZI5+IPImaoYoW5NTkCvjsg=";
+    })
+
+    # Install executables.
+    ./mingw-install-exes.patch
+  ];
+
+  nativeBuildInputs = lib.optionals stdenv.isDarwin [
+    fixDarwinDylibNames
+  ];
+
+  makeFlags = [
+    "PREFIX=${builtins.placeholder "out"}"
+  ];
+
+  postPatch = lib.optionalString stdenv.hostPlatform.isStatic ''
+    # Upstream build system does not support NOT building shared libraries.
+    sed -i '/all:/ s/libgif.so//' Makefile
+    sed -i '/all:/ s/libutil.so//' Makefile
+    sed -i '/-m 755 libgif.so/ d' Makefile
+    sed -i '/ln -sf libgif.so/ d' Makefile
+  '';
+
+  passthru.tests = {
+    static = pkgsStatic.giflib;
+  };
+
+  meta = {
+    description = "A library for reading and writing gif images";
+    homepage = "https://giflib.sourceforge.net/";
+    platforms = lib.platforms.unix;
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ ];
+    branch = "5.2";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/giflib/mingw-install-exes.patch b/nixpkgs/pkgs/development/libraries/giflib/mingw-install-exes.patch
new file mode 100644
index 000000000000..5ec3fdad7e65
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/giflib/mingw-install-exes.patch
@@ -0,0 +1,11 @@
+--- a/Makefile
++++ b/Makefile
+@@ -92,7 +92,7 @@
+ install: all install-bin install-include install-lib install-man
+ install-bin: $(INSTALLABLE)
+ 	$(INSTALL) -d "$(DESTDIR)$(BINDIR)"
+-	$(INSTALL) $^ "$(DESTDIR)$(BINDIR)"
++	$(INSTALL) $(^:=.exe) "$(DESTDIR)$(BINDIR)"
+ install-include:
+ 	$(INSTALL) -d "$(DESTDIR)$(INCDIR)"
+ 	$(INSTALL) -m 644 gif_lib.h "$(DESTDIR)$(INCDIR)"
diff --git a/nixpkgs/pkgs/development/libraries/gio-sharp/default.nix b/nixpkgs/pkgs/development/libraries/gio-sharp/default.nix
new file mode 100644
index 000000000000..91fbb86bd669
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gio-sharp/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, autoconf, automake, which, pkg-config, mono, glib, gtk-sharp-2_0 }:
+
+stdenv.mkDerivation rec {
+  pname = "gio-sharp";
+  version = "0.3";
+
+  src = fetchFromGitHub {
+    owner = "mono";
+    repo = "gio-sharp";
+
+    rev = version;
+    sha256 = "13pc529pjabj7lq23dbndc26ssmg5wkhc7lfvwapm87j711m0zig";
+  };
+
+  nativeBuildInputs = [ pkg-config autoconf automake which ];
+  buildInputs = [ mono glib gtk-sharp-2_0 ];
+
+  dontStrip = true;
+
+  prePatch = ''
+    ./autogen-2.22.sh
+  '';
+
+  meta = with lib; {
+    description = "GIO API bindings";
+    homepage = "https://github.com/mono/gio-sharp";
+    license = licenses.mit;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/git2-cpp/default.nix b/nixpkgs/pkgs/development/libraries/git2-cpp/default.nix
new file mode 100644
index 000000000000..aae958518661
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/git2-cpp/default.nix
@@ -0,0 +1,30 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "git2-cpp";
+  version = "0.1.1";
+
+  src = fetchFromGitHub {
+    owner = "ken-matsui";
+    repo = "git2-cpp";
+    rev = finalAttrs.version;
+    hash = "sha256-2jKSQW6dUCIKtl33paSTuZdYAaYdFnILx/Gxv/ghFiI=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/ken-matsui/git2-cpp";
+    description = "libgit2 bindings for C++";
+    license = licenses.mit;
+    maintainers = with maintainers; [ ken-matsui ];
+    platforms = platforms.unix;
+  };
+})
+# TODO [ ken-matsui ]: tests
diff --git a/nixpkgs/pkgs/development/libraries/givaro/3.7.nix b/nixpkgs/pkgs/development/libraries/givaro/3.7.nix
new file mode 100644
index 000000000000..7ca154f18e06
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/givaro/3.7.nix
@@ -0,0 +1,17 @@
+{lib, stdenv, fetchurl, automake, autoconf, libtool, autoreconfHook, gmpxx}:
+stdenv.mkDerivation rec {
+  pname = "givaro";
+  version = "3.7.2";
+  src = fetchurl {
+    url = "https://forge.imag.fr/frs/download.php/370/givaro-${version}.tar.gz";
+    sha256 = "0lf5cnbyr27fw7klc3zabkb1979dn67jmrjz6pa3jzw2ng74x9b3";
+  };
+  nativeBuildInputs = [ autoreconfHook autoconf automake ];
+  buildInputs = [libtool gmpxx];
+  meta = {
+    description = "A C++ library for arithmetic and algebraic computations";
+    license = lib.licenses.cecill-b;
+    maintainers = [lib.maintainers.raskin];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/givaro/3.nix b/nixpkgs/pkgs/development/libraries/givaro/3.nix
new file mode 100644
index 000000000000..f52f23d15c12
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/givaro/3.nix
@@ -0,0 +1,17 @@
+{lib, stdenv, fetchurl, automake, autoconf, libtool, autoreconfHook, gmpxx}:
+stdenv.mkDerivation rec {
+  pname = "givaro";
+  version = "3.8.0";
+  src = fetchurl {
+    url = "https://forge.imag.fr/frs/download.php/592/givaro-${version}.tar.gz";
+    sha256 = "1822ksv8653a84hvcz0vxl3nk8dqz7d41ys8rplq0zjjmvb2i5yq";
+  };
+  nativeBuildInputs = [ autoreconfHook autoconf automake ];
+  buildInputs = [libtool gmpxx];
+  meta = {
+    description = "A C++ library for arithmetic and algebraic computations";
+    license = lib.licenses.cecill-b;
+    maintainers = [lib.maintainers.raskin];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/givaro/default.nix b/nixpkgs/pkgs/development/libraries/givaro/default.nix
new file mode 100644
index 000000000000..c38419bed52b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/givaro/default.nix
@@ -0,0 +1,62 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, automake
+, autoconf
+, libtool
+, autoreconfHook
+, gmpxx
+}:
+stdenv.mkDerivation rec {
+  pname = "givaro";
+  version = "4.2.0";
+  src = fetchFromGitHub {
+    owner = "linbox-team";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-KR0WJc0CSvaBnPRott4hQJhWNBb/Wi6MIhcTExtVobQ=";
+  };
+  patches = [
+    # Pull upstream fix for gcc-13:
+    #   https://github.com/linbox-team/givaro/pull/218
+    (fetchpatch {
+      name = "gcc-13.patch";
+      url = "https://github.com/linbox-team/givaro/commit/c7744bb133496cd7ac04688f345646d505e1bf52.patch";
+      hash = "sha256-aAA5o8Va10v0Pqgcpx7qM0TAZiNQgXoR6N9xecj7tDA=";
+    })
+  ];
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ autoreconfHook autoconf automake ];
+  buildInputs = [libtool];
+  propagatedBuildInputs = [ gmpxx ];
+
+  configureFlags = [
+    "--disable-optimization"
+  ] ++ lib.optionals stdenv.isx86_64 [
+    # disable SIMD instructions (which are enabled *when available* by default)
+    "--${if stdenv.hostPlatform.sse3Support   then "enable" else "disable"}-sse3"
+    "--${if stdenv.hostPlatform.ssse3Support  then "enable" else "disable"}-ssse3"
+    "--${if stdenv.hostPlatform.sse4_1Support then "enable" else "disable"}-sse41"
+    "--${if stdenv.hostPlatform.sse4_2Support then "enable" else "disable"}-sse42"
+    "--${if stdenv.hostPlatform.avxSupport    then "enable" else "disable"}-avx"
+    "--${if stdenv.hostPlatform.avx2Support   then "enable" else "disable"}-avx2"
+    "--${if stdenv.hostPlatform.fmaSupport    then "enable" else "disable"}-fma"
+    "--${if stdenv.hostPlatform.fma4Support   then "enable" else "disable"}-fma4"
+  ];
+
+  # On darwin, tests are linked to dylib in the nix store, so we need to make
+  # sure tests run after installPhase.
+  doInstallCheck = true;
+  installCheckTarget = "check";
+  doCheck = false;
+
+  meta = {
+    description = "A C++ library for arithmetic and algebraic computations";
+    license = lib.licenses.cecill-b;
+    maintainers = [lib.maintainers.raskin];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gjs/default.nix b/nixpkgs/pkgs/development/libraries/gjs/default.nix
new file mode 100644
index 000000000000..1c1c1d5ff407
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gjs/default.nix
@@ -0,0 +1,149 @@
+{ fetchurl
+, lib
+, stdenv
+, meson
+, mesonEmulatorHook
+, ninja
+, pkg-config
+, gnome
+, gtk3
+, atk
+, gobject-introspection
+, spidermonkey_115
+, pango
+, cairo
+, readline
+, libsysprof-capture
+, glib
+, libxml2
+, dbus
+, gdk-pixbuf
+, harfbuzz
+, makeWrapper
+, which
+, xvfb-run
+, nixosTests
+, installTests ? true
+}:
+
+let
+  testDeps = [
+    gtk3 atk pango.out gdk-pixbuf harfbuzz
+  ];
+in stdenv.mkDerivation (finalAttrs: {
+  pname = "gjs";
+  version = "1.78.3";
+
+  outputs = [ "out" "dev" "installedTests" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/gjs/${lib.versions.majorMinor finalAttrs.version}/gjs-${finalAttrs.version}.tar.xz";
+    hash = "sha256-QtUDZMql15LHZzT+W7zEudu0iBnaIKQGAGHouVJhNKQ=";
+  };
+
+  patches = [
+    # Hard-code various paths
+    ./fix-paths.patch
+
+    # Allow installing installed tests to a separate output.
+    ./installed-tests-path.patch
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    makeWrapper
+    which # for locale detection
+    libxml2 # for xml-stripblanks
+    dbus # for dbus-run-session
+    gobject-introspection
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
+  ];
+
+  buildInputs = [
+    cairo
+    readline
+    libsysprof-capture
+    spidermonkey_115
+  ];
+
+  nativeCheckInputs = [
+    xvfb-run
+  ] ++ testDeps;
+
+  propagatedBuildInputs = [
+    glib
+  ];
+
+  mesonFlags = [
+    "-Dinstalled_test_prefix=${placeholder "installedTests"}"
+  ] ++ lib.optionals (!stdenv.isLinux || stdenv.hostPlatform.isMusl) [
+    "-Dprofiler=disabled"
+  ];
+
+  doCheck = !stdenv.isDarwin;
+
+  postPatch = ''
+    patchShebangs build/choose-tests-locale.sh
+    substituteInPlace installed-tests/debugger-test.sh --subst-var-by gjsConsole $out/bin/gjs-console
+  '' + lib.optionalString stdenv.hostPlatform.isMusl ''
+    substituteInPlace installed-tests/js/meson.build \
+      --replace "'Encoding'," "#'Encoding',"
+  '';
+
+  preCheck = ''
+    # Our gobject-introspection patches make the shared library paths absolute
+    # in the GIR files. When running tests, the library is not yet installed,
+    # though, so we need to replace the absolute path with a local one during build.
+    # We are using a symlink that will be overridden during installation.
+    mkdir -p $out/lib $installedTests/libexec/installed-tests/gjs
+    ln -s $PWD/libgjs.so.0 $out/lib/libgjs.so.0
+    ln -s $PWD/installed-tests/js/libgimarshallingtests.so $installedTests/libexec/installed-tests/gjs/libgimarshallingtests.so
+    ln -s $PWD/installed-tests/js/libgjstesttools/libgjstesttools.so $installedTests/libexec/installed-tests/gjs/libgjstesttools.so
+    ln -s $PWD/installed-tests/js/libregress.so $installedTests/libexec/installed-tests/gjs/libregress.so
+    ln -s $PWD/installed-tests/js/libwarnlib.so $installedTests/libexec/installed-tests/gjs/libwarnlib.so
+  '';
+
+  postInstall = ''
+    # TODO: make the glib setup hook handle moving the schemas in other outputs.
+    installedTestsSchemaDatadir="$installedTests/share/gsettings-schemas/gjs-${finalAttrs.version}"
+    mkdir -p "$installedTestsSchemaDatadir"
+    mv "$installedTests/share/glib-2.0" "$installedTestsSchemaDatadir"
+  '';
+
+  postFixup = lib.optionalString installTests ''
+    wrapProgram "$installedTests/libexec/installed-tests/gjs/minijasmine" \
+      --prefix XDG_DATA_DIRS : "$installedTestsSchemaDatadir" \
+      --prefix GI_TYPELIB_PATH : "${lib.makeSearchPath "lib/girepository-1.0" testDeps}"
+  '';
+
+  checkPhase = ''
+    runHook preCheck
+    xvfb-run -s '-screen 0 800x600x24' \
+      meson test --print-errorlogs
+    runHook postCheck
+  '';
+
+  separateDebugInfo = stdenv.isLinux;
+
+  passthru = {
+    tests = {
+      installed-tests = nixosTests.installed-tests.gjs;
+    };
+
+    updateScript = gnome.updateScript {
+      packageName = "gjs";
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    description = "JavaScript bindings for GNOME";
+    homepage = "https://gitlab.gnome.org/GNOME/gjs/blob/master/doc/Home.md";
+    license = licenses.lgpl2Plus;
+    maintainers = teams.gnome.members;
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/gjs/fix-paths.patch b/nixpkgs/pkgs/development/libraries/gjs/fix-paths.patch
new file mode 100644
index 000000000000..5ca5372ea947
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gjs/fix-paths.patch
@@ -0,0 +1,13 @@
+diff --git a/installed-tests/debugger-test.sh b/installed-tests/debugger-test.sh
+index 0d118490..54c5507e 100755
+--- a/installed-tests/debugger-test.sh
++++ b/installed-tests/debugger-test.sh
+@@ -3,7 +3,7 @@
+ if test "$GJS_USE_UNINSTALLED_FILES" = "1"; then
+     gjs="$TOP_BUILDDIR/gjs-console"
+ else
+-    gjs=gjs-console
++    gjs=@gjsConsole@
+ fi
+ 
+ echo 1..1
diff --git a/nixpkgs/pkgs/development/libraries/gjs/installed-tests-path.patch b/nixpkgs/pkgs/development/libraries/gjs/installed-tests-path.patch
new file mode 100644
index 000000000000..09cd8eaff434
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gjs/installed-tests-path.patch
@@ -0,0 +1,37 @@
+diff --git a/installed-tests/meson.build b/installed-tests/meson.build
+index 04c7910f..9647908c 100644
+--- a/installed-tests/meson.build
++++ b/installed-tests/meson.build
+@@ -1,7 +1,7 @@
+ ### Installed tests ############################################################
+ 
+-installed_tests_execdir = get_option('prefix') / get_option('libexecdir') / 'installed-tests' / meson.project_name()
+-installed_tests_metadir = abs_datadir / 'installed-tests' / meson.project_name()
++installed_tests_execdir = get_option('installed_test_prefix') / 'libexec' / 'installed-tests' / meson.project_name()
++installed_tests_metadir = get_option('installed_test_prefix') / 'share' / 'installed-tests' / meson.project_name()
+ 
+ # Simple shell script tests #
+ 
+diff --git a/meson.build b/meson.build
+index 9ab29475..42ffe07f 100644
+--- a/meson.build
++++ b/meson.build
+@@ -557,7 +557,7 @@ install_data('installed-tests/extra/lsan.supp',
+     install_dir: get_option('datadir') / api_name / 'lsan')
+ 
+ if get_option('installed_tests')
+-    schemadir = abs_datadir / 'glib-2.0' / 'schemas'
++    schemadir = get_option('installed_test_prefix') / 'share' / 'glib-2.0' / 'schemas'
+     install_data('installed-tests/js/org.gnome.GjsTest.gschema.xml', install_dir: schemadir)
+     meson.add_install_script('build/compile-gschemas.py', schemadir)
+ endif
+diff --git a/meson_options.txt b/meson_options.txt
+index 825ba77a..21f0323c 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -25,3 +25,5 @@ option('skip_gtk_tests', type: 'boolean', value: false,
+     description: 'Skip tests that need a display connection')
+ option('verbose_logs', type: 'boolean', value: false,
+     description: 'Enable extra log messages that may decrease performance (not allowed in release builds)')
++option('installed_test_prefix', type: 'string', value: '',
++    description: 'Prefix for installed tests')
diff --git a/nixpkgs/pkgs/development/libraries/gl2ps/default.nix b/nixpkgs/pkgs/development/libraries/gl2ps/default.nix
new file mode 100644
index 000000000000..2a02b5d767e0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gl2ps/default.nix
@@ -0,0 +1,44 @@
+{ lib
+, stdenv
+, fetchurl
+, cmake
+, zlib
+, libpng
+, libGL
+, libGLU
+, freeglut
+, darwin
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gl2ps";
+  version = "1.4.2";
+
+  src = fetchurl {
+    url = "http://geuz.org/gl2ps/src/${pname}-${version}.tgz";
+    sha256 = "1sgzv547h7hrskb9qd0x5yp45kmhvibjwj2mfswv95lg070h074d";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = [
+    zlib
+    libpng
+  ] ++ lib.optionals (!stdenv.isDarwin) [
+    libGL
+    libGLU
+    freeglut
+  ] ++ lib.optionals stdenv.isDarwin [
+    darwin.apple_sdk.frameworks.OpenGL
+  ];
+
+  meta = with lib; {
+    homepage = "http://geuz.org/gl2ps";
+    description = "An OpenGL to PostScript printing library";
+    platforms = platforms.all;
+    license = licenses.lgpl2;
+    maintainers = with maintainers; [ raskin twhitehead ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gl3w/default.nix b/nixpkgs/pkgs/development/libraries/gl3w/default.nix
new file mode 100644
index 000000000000..fdfb203ba12b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gl3w/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchFromGitHub, python3, cmake, libglvnd, libGLU, unstableGitUpdater }:
+
+stdenv.mkDerivation rec {
+  pname = "gl3w";
+  version = "unstable-2023-10-10";
+
+  src = fetchFromGitHub {
+    owner = "skaslev";
+    repo = pname;
+    rev = "3a33275633ce4be433332dc776e6a5b3bdea6506";
+    hash = "sha256-kEm5QItpasSFJQ32YBHPpc+itz/nQ8bQMCavbOTGT/w=";
+  };
+
+  nativeBuildInputs = [ python3 cmake ];
+  # gl3w installs a CMake config that when included expects to be able to
+  # build and link against both of these libraries
+  # (the gl3w generated C file gets compiled into the downstream target)
+  propagatedBuildInputs = [ libglvnd libGLU ];
+
+  dontUseCmakeBuildDir = true;
+
+  # These files must be copied rather than linked since they are considered
+  # outputs for the custom command, and CMake expects to be able to touch them
+  preConfigure = ''
+    mkdir -p include/{GL,KHR}
+    cp ${libglvnd.dev}/include/GL/glcorearb.h include/GL/glcorearb.h
+    cp ${libglvnd.dev}/include/KHR/khrplatform.h include/KHR/khrplatform.h
+  '';
+
+  passthru.updateScript = unstableGitUpdater { };
+
+  meta = with lib; {
+    description = "Simple OpenGL core profile loading";
+    homepage = "https://github.com/skaslev/gl3w";
+    license = licenses.unlicense;
+    maintainers = with maintainers; [ lilyinstarlight ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/glbinding/default.nix b/nixpkgs/pkgs/development/libraries/glbinding/default.nix
new file mode 100644
index 000000000000..6cbc5e99b1c3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glbinding/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub, cmake, libGLU  }:
+
+stdenv.mkDerivation rec {
+  pname = "glbinding";
+  version = "3.3.0";
+
+  src = fetchFromGitHub {
+    owner = "cginternals";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-xmEXZ1ssXzrElqd6D1zooFxLEyspsF4Dau3d9+1/2yw=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ libGLU ];
+
+  meta = with lib; {
+    homepage = "https://github.com/cginternals/glbinding/";
+    description = "A C++ binding for the OpenGL API, generated using the gl.xml specification";
+    license = licenses.mit;
+    maintainers = [ maintainers.mt-caret ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gle/default.nix b/nixpkgs/pkgs/development/libraries/gle/default.nix
new file mode 100644
index 000000000000..79be821faaec
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gle/default.nix
@@ -0,0 +1,19 @@
+{lib, stdenv, fetchurl, freeglut, libX11, libXt, libXmu, libXi, libXext, libGL, libGLU}:
+stdenv.mkDerivation rec {
+  pname = "gle";
+  version = "3.1.0";
+  buildInputs = [libGLU libGL freeglut libX11 libXt libXmu libXi libXext];
+  src = fetchurl {
+    urls = [
+      "mirror://sourceforge/project/gle/gle/gle-${version}/gle-${version}.tar.gz"
+      "https://www.linas.org/gle/pub/gle-${version}.tar.gz"
+      ];
+    sha256 = "09zs1di4dsssl9k322nzildvf41jwipbzhik9p43yb1bcfsp92nw";
+  };
+  meta = {
+    description = "Tubing and extrusion library";
+    license = lib.licenses.gpl2 ;
+    maintainers = [lib.maintainers.raskin];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/glew/1.10.nix b/nixpkgs/pkgs/development/libraries/glew/1.10.nix
new file mode 100644
index 000000000000..3f355deb33b9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glew/1.10.nix
@@ -0,0 +1,55 @@
+{ lib, stdenv, fetchurl, libGLU, libXmu, libXi, libXext
+, AGL, OpenGL
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "glew";
+  version = "1.10.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/glew/${finalAttrs.pname}-${finalAttrs.version}.tgz";
+    sha256 = "01zki46dr5khzlyywr3cg615bcal32dazfazkf360s1znqh17i4r";
+  };
+
+  buildInputs = if stdenv.isDarwin then [ AGL ] else [ libXmu libXi libXext ];
+  propagatedBuildInputs = if stdenv.isDarwin then [ OpenGL ] else [ libGLU ]; # GL/glew.h includes GL/glu.h
+
+  outputs = [ "out" "dev" ];
+
+  patchPhase = ''
+    sed -i 's|lib64|lib|' config/Makefile.linux
+    ${lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
+    sed -i -e 's/\(INSTALL.*\)-s/\1/' Makefile
+    ''}
+  '';
+
+  buildFlags = [ "all" ];
+  installFlags = [ "install.all" ];
+
+  preInstall = ''
+    export GLEW_DEST="$out"
+  '';
+
+  postInstall = ''
+    mkdir -pv $out/share/doc/glew
+    mkdir -p $dev/lib/pkgconfig
+    cp glew*.pc $dev/lib/pkgconfig
+    cp -r README.txt LICENSE.txt doc $out/share/doc/glew
+  '';
+
+  makeFlags = [
+    "SYSTEM=${if stdenv.hostPlatform.isMinGW then "mingw" else stdenv.hostPlatform.parsed.kernel.name}"
+  ];
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    description = "An OpenGL extension loading library for C(++)";
+    homepage = "https://glew.sourceforge.net/";
+    license = licenses.free; # different files under different licenses
+      #["BSD" "GLX" "SGI-B" "GPL2"]
+    pkgConfigModules = [ "glew" ];
+    platforms = platforms.mesaPlatforms;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/glew/default.nix b/nixpkgs/pkgs/development/libraries/glew/default.nix
new file mode 100644
index 000000000000..5e1c986be28f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glew/default.nix
@@ -0,0 +1,66 @@
+{ lib, stdenv, fetchurl, fetchpatch, cmake, libGLU, libXmu, libXi, libXext
+, OpenGL
+, enableEGL ? false
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "glew";
+  version = "2.2.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/glew/${finalAttrs.pname}-${finalAttrs.version}.tgz";
+    sha256 = "1qak8f7g1iswgswrgkzc7idk7jmqgwrs58fhg2ai007v7j4q5z6l";
+  };
+
+  outputs = [ "bin" "out" "dev" ];
+
+  patches = [
+    # https://github.com/nigels-com/glew/pull/342
+    (fetchpatch {
+      url = "https://github.com/nigels-com/glew/commit/966e53fa153175864e151ec8a8e11f688c3e752d.diff";
+      sha256 = "sha256-xsSwdAbdWZA4KVoQhaLlkYvO711i3QlHGtv6v1Omkhw=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = lib.optionals (!stdenv.isDarwin) [ libXmu libXi libXext ];
+  propagatedBuildInputs = if stdenv.isDarwin then [ OpenGL ] else [ libGLU ]; # GL/glew.h includes GL/glu.h
+
+  cmakeDir = "cmake";
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+  ] ++ lib.optional enableEGL "-DGLEW_EGL=ON";
+
+  postInstall = ''
+    moveToOutput lib/cmake "''${!outputDev}"
+    moveToOutput lib/pkgconfig "''${!outputDev}"
+
+    cat >> "''${!outputDev}"/lib/cmake/glew/glew-config.cmake <<EOF
+    # nixpkg's workaround for a cmake bug
+    # https://discourse.cmake.org/t/the-findglew-cmake-module-does-not-set-glew-libraries-in-some-cases/989/3
+    set(GLEW_VERSION "$version")
+    set(GLEW_LIBRARIES GLEW::glew\''${_glew_target_postfix})
+    get_target_property(GLEW_INCLUDE_DIRS GLEW::glew\''${_glew_target_postfix} INTERFACE_INCLUDE_DIRECTORIES)
+    set_target_properties(GLEW::GLEW\''${_glew_target_postfix} PROPERTIES
+        IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE ""
+        IMPORTED_IMPLIB_RELEASE "GLEW"
+        IMPORTED_IMPLIB_DEBUG "GLEW"
+    )
+    EOF
+  '';
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    description = "An OpenGL extension loading library for C/C++";
+    homepage = "https://glew.sourceforge.net/";
+    license = with licenses; [ /* modified bsd */ free mit gpl2Only ]; # For full details, see https://github.com/nigels-com/glew#copyright-and-licensing
+    pkgConfigModules = [ "glew" ];
+    platforms = with platforms;
+      if enableEGL then
+        subtractLists darwin mesaPlatforms
+      else
+        mesaPlatforms;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/glfw/2.x.nix b/nixpkgs/pkgs/development/libraries/glfw/2.x.nix
new file mode 100644
index 000000000000..545e7a418a5f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glfw/2.x.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchurl, libGLU, libGL, libX11, libXext }:
+
+stdenv.mkDerivation rec {
+  pname = "glfw";
+  version = "2.7.9";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/glfw/glfw-${version}.tar.bz2";
+    sha256 = "17c2msdcb7pn3p8f83805h1c216bmdqnbn9hgzr1j8wnwjcpxx6i";
+  };
+
+  buildInputs = [ libGLU libGL libX11 libXext ];
+
+  buildPhase = ''
+    make x11
+  '';
+
+  installPhase = ''
+    mkdir -p $out
+    make x11-dist-install PREFIX=$out
+    mv $out/lib/libglfw.so $out/lib/libglfw.so.2
+    ln -s libglfw.so.2 $out/lib/libglfw.so
+  '';
+
+  meta = with lib; {
+    description = "Multi-platform library for creating OpenGL contexts and managing input, including keyboard, mouse, joystick and time";
+    homepage = "https://glfw.sourceforge.net/";
+    license = licenses.zlib;
+    maintainers = [ lib.maintainers.marcweber ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/glfw/3.x-wayland-minecraft.nix b/nixpkgs/pkgs/development/libraries/glfw/3.x-wayland-minecraft.nix
new file mode 100644
index 000000000000..03baa891b3b4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glfw/3.x-wayland-minecraft.nix
@@ -0,0 +1,64 @@
+{ stdenv, lib, fetchFromGitHub, fetchpatch2, cmake, extra-cmake-modules
+, libGL, wayland, wayland-protocols, libxkbcommon, libdecor
+}:
+
+stdenv.mkDerivation {
+  version = "unstable-2023-06-01";
+  pname = "glfw-wayland-minecraft";
+
+  src = fetchFromGitHub {
+    owner = "glfw";
+    repo = "GLFW";
+    rev = "3eaf1255b29fdf5c2895856c7be7d7185ef2b241";
+    sha256 = "sha256-UnwuE/3q6I4dS5syagpnqrDEVDK9XSVdyOg7KNkdUUA=";
+  };
+
+  patches = [
+    (fetchpatch2 {
+      url = "https://raw.githubusercontent.com/Admicos/minecraft-wayland/15f88a515c63a9716cfdf4090fab8e16543f4ebd/0003-Don-t-crash-on-calls-to-focus-or-icon.patch";
+      hash = "sha256-NZbKh16h+tWXXnz13QcFBFaeGXMNxZKGQb9xJEahFnE=";
+    })
+    (fetchpatch2 {
+      url = "https://raw.githubusercontent.com/Admicos/minecraft-wayland/15f88a515c63a9716cfdf4090fab8e16543f4ebd/0005-Add-warning-about-being-an-unofficial-patch.patch";
+      hash = "sha256-QMUNlnlCeFz5gIVdbM+YXPsrmiOl9cMwuVRSOvlw+T0=";
+    })
+  ];
+
+  propagatedBuildInputs = [ libGL ];
+
+  nativeBuildInputs = [ cmake extra-cmake-modules ];
+
+  buildInputs = [ wayland wayland-protocols libxkbcommon ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+    "-DGLFW_BUILD_WAYLAND=ON"
+    "-DGLFW_BUILD_X11=OFF"
+    "-DCMAKE_C_FLAGS=-D_GLFW_EGL_LIBRARY='\"${lib.getLib libGL}/lib/libEGL.so.1\"'"
+  ];
+
+  postPatch = ''
+    substituteInPlace src/wl_init.c \
+      --replace "libxkbcommon.so.0" "${lib.getLib libxkbcommon}/lib/libxkbcommon.so.0"
+
+    substituteInPlace src/wl_init.c \
+      --replace "libdecor-0.so.0" "${lib.getLib libdecor}/lib/libdecor-0.so.0"
+
+    substituteInPlace src/wl_init.c \
+      --replace "libwayland-client.so.0" "${lib.getLib wayland}/lib/libwayland-client.so.0"
+
+    substituteInPlace src/wl_init.c \
+      --replace "libwayland-cursor.so.0" "${lib.getLib wayland}/lib/libwayland-cursor.so.0"
+
+    substituteInPlace src/wl_init.c \
+      --replace "libwayland-egl.so.1" "${lib.getLib wayland}/lib/libwayland-egl.so.1"
+  '';
+
+  meta = with lib; {
+    description = "Multi-platform library for creating OpenGL contexts and managing input, including keyboard, mouse, joystick and time - with patches to support Minecraft on Wayland";
+    homepage = "https://www.glfw.org/";
+    license = licenses.zlib;
+    maintainers = with maintainers; [ Scrumplex ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/glfw/3.x.nix b/nixpkgs/pkgs/development/libraries/glfw/3.x.nix
new file mode 100644
index 000000000000..01db789a60bd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glfw/3.x.nix
@@ -0,0 +1,56 @@
+{ stdenv, lib, fetchFromGitHub, cmake
+, libGL, libXrandr, libXinerama, libXcursor, libX11, libXi, libXext
+, Carbon, Cocoa, Kernel, OpenGL, fixDarwinDylibNames
+, waylandSupport ? false, extra-cmake-modules, wayland
+, wayland-protocols, libxkbcommon
+}:
+
+stdenv.mkDerivation rec {
+  version = "3.3.9";
+  pname = "glfw";
+
+  src = fetchFromGitHub {
+    owner = "glfw";
+    repo = "GLFW";
+    rev = version;
+    sha256 = "sha256-DlPRNGCBr6XF9Jn8kWs5lCRTyjPeDt/69PNDzBDhoyg=";
+  };
+
+  # Fix linkage issues on X11 (https://github.com/NixOS/nixpkgs/issues/142583)
+  patches = lib.optional (!waylandSupport) ./x11.patch;
+
+  propagatedBuildInputs =
+    lib.optionals stdenv.isDarwin [ OpenGL ]
+    ++ lib.optionals stdenv.isLinux [ libGL ];
+
+  nativeBuildInputs = [ cmake ]
+    ++ lib.optional stdenv.isDarwin fixDarwinDylibNames
+    ++ lib.optional waylandSupport extra-cmake-modules;
+
+  buildInputs =
+    lib.optionals stdenv.isDarwin [ Carbon Cocoa Kernel ]
+    ++ lib.optionals (stdenv.isLinux && waylandSupport) [ wayland wayland-protocols libxkbcommon ]
+    ++ lib.optionals (stdenv.isLinux && !waylandSupport) [ libX11 libXrandr libXinerama libXcursor libXi libXext ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+  ] ++ lib.optionals (!stdenv.isDarwin && !stdenv.hostPlatform.isWindows) [
+    "-DCMAKE_C_FLAGS=-D_GLFW_GLX_LIBRARY='\"${lib.getLib libGL}/lib/libGL.so.1\"'"
+  ] ++ lib.optionals waylandSupport [
+    "-DGLFW_USE_WAYLAND=ON"
+    "-DCMAKE_C_FLAGS=-D_GLFW_EGL_LIBRARY='\"${lib.getLib libGL}/lib/libEGL.so.1\"'"
+  ];
+
+  postPatch = lib.optionalString waylandSupport ''
+    substituteInPlace src/wl_init.c \
+      --replace "libxkbcommon.so.0" "${lib.getLib libxkbcommon}/lib/libxkbcommon.so.0"
+  '';
+
+  meta = with lib; {
+    description = "Multi-platform library for creating OpenGL contexts and managing input, including keyboard, mouse, joystick and time";
+    homepage = "https://www.glfw.org/";
+    license = licenses.zlib;
+    maintainers = with maintainers; [ marcweber twey ];
+    platforms = platforms.unix ++ platforms.windows;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/glfw/wayland.patch b/nixpkgs/pkgs/development/libraries/glfw/wayland.patch
new file mode 100644
index 000000000000..c0c338f845b3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glfw/wayland.patch
@@ -0,0 +1,25 @@
+From 46fb81c69e8acdb70907409f98dd01e387408414 Mon Sep 17 00:00:00 2001
+From: Stone Tickle <lattis@mochiro.moe>
+Date: Fri, 5 Jun 2020 12:51:25 +0900
+Subject: [PATCH] set O_NONBLOCK on repeat timerfd
+
+---
+ src/wl_init.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/wl_init.c b/src/wl_init.c
+index 49e7cc52..43569bef 100644
+--- a/src/wl_init.c
++++ b/src/wl_init.c
+@@ -1166,7 +1166,7 @@ int _glfwPlatformInit(void)
+ 
+     _glfw.wl.timerfd = -1;
+     if (_glfw.wl.seatVersion >= 4)
+-        _glfw.wl.timerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC);
++        _glfw.wl.timerfd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK);
+ 
+     if (_glfw.wl.pointer && _glfw.wl.shm)
+     {
+-- 
+2.31.1
+
diff --git a/nixpkgs/pkgs/development/libraries/glfw/x11.patch b/nixpkgs/pkgs/development/libraries/glfw/x11.patch
new file mode 100644
index 000000000000..5cadf53bfe70
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glfw/x11.patch
@@ -0,0 +1,18 @@
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index a0be580e..ba143851 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -219,6 +219,13 @@ if (GLFW_BUILD_X11)
+     if (NOT X11_Xshape_INCLUDE_PATH)
+         message(FATAL_ERROR "X Shape headers not found; install libxext development package")
+     endif()
++
++    target_link_libraries(glfw PRIVATE ${X11_Xrandr_LIB}
++                                       ${X11_Xinerama_LIB}
++                                       ${X11_Xkb_LIB}
++                                       ${X11_Xcursor_LIB}
++                                       ${X11_Xi_LIB}
++                                       ${X11_Xshape_LIB})
+ endif()
+ 
+ if (UNIX AND NOT APPLE)
diff --git a/nixpkgs/pkgs/development/libraries/glib-networking/default.nix b/nixpkgs/pkgs/development/libraries/glib-networking/default.nix
new file mode 100644
index 000000000000..d646830c771f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glib-networking/default.nix
@@ -0,0 +1,93 @@
+{ stdenv
+, lib
+, fetchurl
+, substituteAll
+, meson
+, ninja
+, nixosTests
+, pkg-config
+, glib
+, gettext
+, makeWrapper
+, gnutls
+, p11-kit
+, libproxy
+, gnome
+, gsettings-desktop-schemas
+, bash
+}:
+
+stdenv.mkDerivation rec {
+  pname = "glib-networking";
+  version = "2.78.0";
+
+  outputs = [ "out" "installedTests" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "Uv5M6T99xRM0sQKJRZmFjSPIplrEoRELMJIFZdaNOro=";
+  };
+
+  patches = [
+    (substituteAll {
+      src = ./hardcode-gsettings.patch;
+      gds_gsettings_path = glib.getSchemaPath gsettings-desktop-schemas;
+    })
+
+    ./installed-tests-path.patch
+  ];
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gettext
+    makeWrapper
+    glib # for gio-querymodules
+  ];
+
+  buildInputs = [
+    glib
+    gnutls
+    p11-kit
+    libproxy
+    gsettings-desktop-schemas
+    bash # installed-tests shebangs
+  ];
+
+  doCheck = false; # tests need to access the certificates (among other things)
+
+  mesonFlags = [
+    "-Dinstalled_tests=true"
+    "-Dinstalled_test_prefix=${placeholder "installedTests"}"
+  ];
+
+  postFixup = ''
+    find "$installedTests/libexec" "$out/libexec" -type f -executable -print0 \
+      | while IFS= read -r -d "" file; do
+      echo "Wrapping program '$file'"
+      wrapProgram "$file" --prefix GIO_EXTRA_MODULES : "$out/lib/gio/modules"
+    done
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+
+    tests = {
+      installedTests = nixosTests.installed-tests.glib-networking;
+    };
+  };
+
+  meta = with lib; {
+    description = "Network-related giomodules for glib";
+    homepage = "https://gitlab.gnome.org/GNOME/glib-networking";
+    license = licenses.lgpl21Plus;
+    maintainers = teams.gnome.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/glib-networking/hardcode-gsettings.patch b/nixpkgs/pkgs/development/libraries/glib-networking/hardcode-gsettings.patch
new file mode 100644
index 000000000000..0a091b2344dc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glib-networking/hardcode-gsettings.patch
@@ -0,0 +1,341 @@
+diff --git a/proxy/gnome/gproxyresolvergnome.c b/proxy/gnome/gproxyresolvergnome.c
+index 50b63cd..4364116 100644
+--- a/proxy/gnome/gproxyresolvergnome.c
++++ b/proxy/gnome/gproxyresolvergnome.c
+@@ -156,23 +156,79 @@
+ 
+   resolver->base_resolver = g_simple_proxy_resolver_new (NULL, NULL);
+ 
+-  resolver->proxy_settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);
++  {
++    GSettingsSchemaSource *schema_source;
++    GSettingsSchema *schema;
++    schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
++                                                                g_settings_schema_source_get_default(),
++                                                                TRUE, NULL);
++    schema = g_settings_schema_source_lookup(schema_source,
++                                             GNOME_PROXY_SETTINGS_SCHEMA,
++                                             FALSE);
++    resolver->proxy_settings = g_settings_new_full(schema, NULL, NULL);
++    g_settings_schema_source_unref(schema_source);
++    g_settings_schema_unref(schema);
++  }
+   g_signal_connect (resolver->proxy_settings, "changed",
+                     G_CALLBACK (gsettings_changed), resolver);
+-  resolver->http_settings = g_settings_get_child (resolver->proxy_settings,
+-                                                  GNOME_PROXY_HTTP_CHILD_SCHEMA);
++  {
++    GSettingsSchemaSource *schema_source;
++    GSettingsSchema *schema;
++    schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
++                                                                g_settings_schema_source_get_default(),
++                                                                TRUE, NULL);
++    schema = g_settings_schema_source_lookup(schema_source,
++                                             GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTP_CHILD_SCHEMA,
++                                             FALSE);
++    resolver->http_settings = g_settings_new_full(schema, NULL, NULL);
++    g_settings_schema_source_unref(schema_source);
++    g_settings_schema_unref(schema);
++  }
+   g_signal_connect (resolver->http_settings, "changed",
+                     G_CALLBACK (gsettings_changed), resolver);
+-  resolver->https_settings = g_settings_get_child (resolver->proxy_settings,
+-                                                   GNOME_PROXY_HTTPS_CHILD_SCHEMA);
++  {
++    GSettingsSchemaSource *schema_source;
++    GSettingsSchema *schema;
++    schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
++                                                                g_settings_schema_source_get_default(),
++                                                                TRUE, NULL);
++    schema = g_settings_schema_source_lookup(schema_source,
++                                             GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTPS_CHILD_SCHEMA,
++                                             FALSE);
++    resolver->https_settings = g_settings_new_full(schema, NULL, NULL);
++    g_settings_schema_source_unref(schema_source);
++    g_settings_schema_unref(schema);
++  }
+   g_signal_connect (resolver->https_settings, "changed",
+                     G_CALLBACK (gsettings_changed), resolver);
+-  resolver->ftp_settings = g_settings_get_child (resolver->proxy_settings,
+-                                                 GNOME_PROXY_FTP_CHILD_SCHEMA);
++  {
++    GSettingsSchemaSource *schema_source;
++    GSettingsSchema *schema;
++    schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
++                                                                g_settings_schema_source_get_default(),
++                                                                TRUE, NULL);
++    schema = g_settings_schema_source_lookup(schema_source,
++                                             GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_FTP_CHILD_SCHEMA,
++                                             FALSE);
++    resolver->ftp_settings = g_settings_new_full(schema, NULL, NULL);
++    g_settings_schema_source_unref(schema_source);
++    g_settings_schema_unref(schema);
++  }
+   g_signal_connect (resolver->ftp_settings, "changed",
+                     G_CALLBACK (gsettings_changed), resolver);
+-  resolver->socks_settings = g_settings_get_child (resolver->proxy_settings,
+-                                                   GNOME_PROXY_SOCKS_CHILD_SCHEMA);
++  {
++    GSettingsSchemaSource *schema_source;
++    GSettingsSchema *schema;
++    schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
++                                                                g_settings_schema_source_get_default(),
++                                                                TRUE, NULL);
++    schema = g_settings_schema_source_lookup(schema_source,
++                                             GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_SOCKS_CHILD_SCHEMA,
++                                             FALSE);
++    resolver->socks_settings = g_settings_new_full(schema, NULL, NULL);
++    g_settings_schema_source_unref(schema_source);
++    g_settings_schema_unref(schema);
++  }
+   g_signal_connect (resolver->socks_settings, "changed",
+                     G_CALLBACK (gsettings_changed), resolver);
+ 
+diff --git a/proxy/tests/gnome.c b/proxy/tests/gnome.c
+index f76b094..54751e3 100644
+--- a/proxy/tests/gnome.c
++++ b/proxy/tests/gnome.c
+@@ -55,26 +55,86 @@
+ {
+   GSettings *settings, *child;
+ 
+-  settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);
++  {
++    GSettingsSchemaSource *schema_source;
++    GSettingsSchema *schema;
++    schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
++                                                                g_settings_schema_source_get_default(),
++                                                                TRUE, NULL);
++    schema = g_settings_schema_source_lookup(schema_source,
++                                             GNOME_PROXY_SETTINGS_SCHEMA,
++                                             FALSE);
++    settings = g_settings_new_full(schema, NULL, NULL);
++    g_settings_schema_source_unref(schema_source);
++    g_settings_schema_unref(schema);
++  }
+   g_settings_reset (settings, GNOME_PROXY_MODE_KEY);
+   g_settings_reset (settings, GNOME_PROXY_USE_SAME_PROXY_KEY);
+ 
+-  child = g_settings_get_child (settings, GNOME_PROXY_HTTP_CHILD_SCHEMA);
++  {
++    GSettingsSchemaSource *schema_source;
++    GSettingsSchema *schema;
++    schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
++                                                                g_settings_schema_source_get_default(),
++                                                                TRUE, NULL);
++    schema = g_settings_schema_source_lookup(schema_source,
++                                             GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTP_CHILD_SCHEMA,
++                                             FALSE);
++    child = g_settings_new_full(schema, NULL, NULL);
++    g_settings_schema_source_unref(schema_source);
++    g_settings_schema_unref(schema);
++  }
+   g_settings_reset (child, GNOME_PROXY_HTTP_HOST_KEY);
+   g_settings_reset (child, GNOME_PROXY_HTTP_PORT_KEY);
+   g_object_unref (child);
+ 
+-  child = g_settings_get_child (settings, GNOME_PROXY_HTTPS_CHILD_SCHEMA);
++  {
++    GSettingsSchemaSource *schema_source;
++    GSettingsSchema *schema;
++    schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
++                                                                g_settings_schema_source_get_default(),
++                                                                TRUE, NULL);
++    schema = g_settings_schema_source_lookup(schema_source,
++                                             GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTPS_CHILD_SCHEMA,
++                                             FALSE);
++    child = g_settings_new_full(schema, NULL, NULL);
++    g_settings_schema_source_unref(schema_source);
++    g_settings_schema_unref(schema);
++  }
+   g_settings_reset (child, GNOME_PROXY_HTTPS_HOST_KEY);
+   g_settings_reset (child, GNOME_PROXY_HTTPS_PORT_KEY);
+   g_object_unref (child);
+ 
+-  child = g_settings_get_child (settings, GNOME_PROXY_FTP_CHILD_SCHEMA);
++  {
++    GSettingsSchemaSource *schema_source;
++    GSettingsSchema *schema;
++    schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
++                                                                g_settings_schema_source_get_default(),
++                                                                TRUE, NULL);
++    schema = g_settings_schema_source_lookup(schema_source,
++                                             GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_FTP_CHILD_SCHEMA,
++                                             FALSE);
++    child = g_settings_new_full(schema, NULL, NULL);
++    g_settings_schema_source_unref(schema_source);
++    g_settings_schema_unref(schema);
++  }
+   g_settings_reset (child, GNOME_PROXY_FTP_HOST_KEY);
+   g_settings_reset (child, GNOME_PROXY_FTP_PORT_KEY);
+   g_object_unref (child);
+ 
+-  child = g_settings_get_child (settings, GNOME_PROXY_SOCKS_CHILD_SCHEMA);
++  {
++    GSettingsSchemaSource *schema_source;
++    GSettingsSchema *schema;
++    schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
++                                                                g_settings_schema_source_get_default(),
++                                                                TRUE, NULL);
++    schema = g_settings_schema_source_lookup(schema_source,
++                                             GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_SOCKS_CHILD_SCHEMA,
++                                             FALSE);
++    child = g_settings_new_full(schema, NULL, NULL);
++    g_settings_schema_source_unref(schema_source);
++    g_settings_schema_unref(schema);
++  }
+   g_settings_reset (child, GNOME_PROXY_SOCKS_HOST_KEY);
+   g_settings_reset (child, GNOME_PROXY_SOCKS_PORT_KEY);
+   g_object_unref (child);
+@@ -88,21 +148,69 @@
+ {
+   GSettings *settings, *child;
+ 
+-  settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);
++  {
++    GSettingsSchemaSource *schema_source;
++    GSettingsSchema *schema;
++    schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
++                                                                g_settings_schema_source_get_default(),
++                                                                TRUE, NULL);
++    schema = g_settings_schema_source_lookup(schema_source,
++                                             GNOME_PROXY_SETTINGS_SCHEMA,
++                                             FALSE);
++    settings = g_settings_new_full(schema, NULL, NULL);
++    g_settings_schema_source_unref(schema_source);
++    g_settings_schema_unref(schema);
++  }
+   g_settings_set_enum (settings, GNOME_PROXY_MODE_KEY, G_DESKTOP_PROXY_MODE_MANUAL);
+   g_settings_set_boolean (settings, GNOME_PROXY_USE_SAME_PROXY_KEY, TRUE);
+ 
+-  child = g_settings_get_child (settings, GNOME_PROXY_HTTP_CHILD_SCHEMA);
++  {
++    GSettingsSchemaSource *schema_source;
++    GSettingsSchema *schema;
++    schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
++                                                                g_settings_schema_source_get_default(),
++                                                                TRUE, NULL);
++    schema = g_settings_schema_source_lookup(schema_source,
++                                             GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTP_CHILD_SCHEMA,
++                                             FALSE);
++    child = g_settings_new_full(schema, NULL, NULL);
++    g_settings_schema_source_unref(schema_source);
++    g_settings_schema_unref(schema);
++  }
+   g_settings_set_string (child, GNOME_PROXY_HTTP_HOST_KEY, "proxy.example.com");
+   g_settings_set_int (child, GNOME_PROXY_HTTP_PORT_KEY, 8080);
+   g_object_unref (child);
+ 
+-  child = g_settings_get_child (settings, GNOME_PROXY_HTTPS_CHILD_SCHEMA);
++  {
++    GSettingsSchemaSource *schema_source;
++    GSettingsSchema *schema;
++    schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
++                                                                g_settings_schema_source_get_default(),
++                                                                TRUE, NULL);
++    schema = g_settings_schema_source_lookup(schema_source,
++                                             GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTPS_CHILD_SCHEMA,
++                                             FALSE);
++    child = g_settings_new_full(schema, NULL, NULL);
++    g_settings_schema_source_unref(schema_source);
++    g_settings_schema_unref(schema);
++  }
+   g_settings_set_string (child, GNOME_PROXY_HTTPS_HOST_KEY, "proxy-s.example.com");
+   g_settings_set_int (child, GNOME_PROXY_HTTPS_PORT_KEY, 7070);
+   g_object_unref (child);
+ 
+-  child = g_settings_get_child (settings, GNOME_PROXY_FTP_CHILD_SCHEMA);
++  {
++    GSettingsSchemaSource *schema_source;
++    GSettingsSchema *schema;
++    schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
++                                                                g_settings_schema_source_get_default(),
++                                                                TRUE, NULL);
++    schema = g_settings_schema_source_lookup(schema_source,
++                                             GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_FTP_CHILD_SCHEMA,
++                                             FALSE);
++    child = g_settings_new_full(schema, NULL, NULL);
++    g_settings_schema_source_unref(schema_source);
++    g_settings_schema_unref(schema);
++  }
+   g_settings_set_string (child, GNOME_PROXY_FTP_HOST_KEY, "proxy-f.example.com");
+   g_settings_set_int (child, GNOME_PROXY_FTP_PORT_KEY, 6060);
+   g_object_unref (child);
+@@ -119,12 +227,36 @@
+   GSettings *settings, *child;
+   const gchar *ignore_hosts[2] = { "127.0.0.1", NULL };
+ 
+-  settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);
++  {
++    GSettingsSchemaSource *schema_source;
++    GSettingsSchema *schema;
++    schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
++                                                                g_settings_schema_source_get_default(),
++                                                                TRUE, NULL);
++    schema = g_settings_schema_source_lookup(schema_source,
++                                             GNOME_PROXY_SETTINGS_SCHEMA,
++                                             FALSE);
++    settings = g_settings_new_full(schema, NULL, NULL);
++    g_settings_schema_source_unref(schema_source);
++    g_settings_schema_unref(schema);
++  }
+   g_settings_set_enum (settings, GNOME_PROXY_MODE_KEY, G_DESKTOP_PROXY_MODE_MANUAL);
+   g_settings_set (settings, GNOME_PROXY_IGNORE_HOSTS_KEY,
+                   "@as", g_variant_new_strv (ignore_hosts, -1));
+ 
+-  child = g_settings_get_child (settings, GNOME_PROXY_SOCKS_CHILD_SCHEMA);
++  {
++    GSettingsSchemaSource *schema_source;
++    GSettingsSchema *schema;
++    schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
++                                                                g_settings_schema_source_get_default(),
++                                                                TRUE, NULL);
++    schema = g_settings_schema_source_lookup(schema_source,
++                                             GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_SOCKS_CHILD_SCHEMA,
++                                             FALSE);
++    child = g_settings_new_full(schema, NULL, NULL);
++    g_settings_schema_source_unref(schema_source);
++    g_settings_schema_unref(schema);
++  }
+   g_settings_set_string (child, GNOME_PROXY_SOCKS_HOST_KEY, "proxy.example.com");
+   g_settings_set_int (child, GNOME_PROXY_SOCKS_PORT_KEY, 1234);
+   g_object_unref (child);
+@@ -139,12 +271,36 @@
+ {
+   GSettings *settings, *http;
+ 
+-  settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);
++  {
++    GSettingsSchemaSource *schema_source;
++    GSettingsSchema *schema;
++    schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
++                                                                g_settings_schema_source_get_default(),
++                                                                TRUE, NULL);
++    schema = g_settings_schema_source_lookup(schema_source,
++                                             GNOME_PROXY_SETTINGS_SCHEMA,
++                                             FALSE);
++    settings = g_settings_new_full(schema, NULL, NULL);
++    g_settings_schema_source_unref(schema_source);
++    g_settings_schema_unref(schema);
++  }
+   g_settings_set_enum (settings, GNOME_PROXY_MODE_KEY, G_DESKTOP_PROXY_MODE_MANUAL);
+   g_settings_set (settings, GNOME_PROXY_IGNORE_HOSTS_KEY,
+                   "@as", g_variant_new_strv (ignore_hosts, n_ignore_hosts));
+ 
+-  http = g_settings_get_child (settings, GNOME_PROXY_HTTP_CHILD_SCHEMA);
++  {
++    GSettingsSchemaSource *schema_source;
++    GSettingsSchema *schema;
++    schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
++                                                                g_settings_schema_source_get_default(),
++                                                                TRUE, NULL);
++    schema = g_settings_schema_source_lookup(schema_source,
++                                             GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTP_CHILD_SCHEMA,
++                                             FALSE);
++    http = g_settings_new_full(schema, NULL, NULL);
++    g_settings_schema_source_unref(schema_source);
++    g_settings_schema_unref(schema);
++  }
+   g_settings_set_string (http, GNOME_PROXY_HTTP_HOST_KEY, "localhost");
+   g_settings_set_int (http, GNOME_PROXY_HTTP_PORT_KEY, 8080);
+ 
diff --git a/nixpkgs/pkgs/development/libraries/glib-networking/installed-tests-path.patch b/nixpkgs/pkgs/development/libraries/glib-networking/installed-tests-path.patch
new file mode 100644
index 000000000000..549307cca39d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glib-networking/installed-tests-path.patch
@@ -0,0 +1,27 @@
+diff --git a/meson.build b/meson.build
+index 01e18a9..5dbb2fc 100644
+--- a/meson.build
++++ b/meson.build
+@@ -12,8 +12,8 @@ libdir = join_paths(prefix, get_option('libdir'))
+ libexecdir = join_paths(prefix, get_option('libexecdir'))
+ localedir = join_paths(prefix, get_option('localedir'))
+ 
+-installed_tests_metadir = join_paths(datadir, 'installed-tests', meson.project_name())
+-installed_tests_execdir = join_paths(libexecdir, 'installed-tests', meson.project_name())
++installed_tests_metadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests', meson.project_name())
++installed_tests_execdir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests', meson.project_name())
+ 
+ cc = meson.get_compiler('c')
+ host_system = host_machine.system()
+diff --git a/meson_options.txt b/meson_options.txt
+index c566ccd..80f7c33 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -10,6 +10,7 @@ option('environment_proxy', type: 'feature', value: 'auto', description: 'suppor
+ option('libproxy', type: 'feature', value: 'auto', description: 'support for libproxy proxy configration')
+ option('gnome_proxy', type: 'feature', value: 'auto', description: 'support for GNOME desktop proxy configuration')
+ option('installed_tests', type: 'boolean', value: false, description: 'enable installed tests')
++option('installed_test_prefix', type: 'string', value: '', description: 'Prefix for installed tests')
+ option('debug_logs', type: 'boolean', value: false, description: 'enable debug log messages (slow)')
+ 
+ # Deprecated, use -Ddefault_library=static instead.
diff --git a/nixpkgs/pkgs/development/libraries/glib-testing/default.nix b/nixpkgs/pkgs/development/libraries/glib-testing/default.nix
new file mode 100644
index 000000000000..d77a5418a13e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glib-testing/default.nix
@@ -0,0 +1,63 @@
+{ lib, stdenv
+, fetchFromGitLab
+, meson
+, ninja
+, pkg-config
+, gtk-doc
+, docbook-xsl-nons
+, docbook_xml_dtd_43
+, glib
+, nixosTests
+}:
+
+stdenv.mkDerivation rec {
+  pname = "glib-testing";
+  version = "0.1.1";
+
+  outputs = [ "out" "dev" "devdoc" "installedTests" ];
+
+  src = fetchFromGitLab {
+    domain = "gitlab.gnome.org";
+    owner = "pwithnall";
+    repo = "libglib-testing";
+    rev = version;
+    sha256 = "U3epLDdLES7MA71z7Q1WXMjzySTFERWBU0u8poObbEo=";
+  };
+
+  patches = [
+    # allow installing installed tests to a separate output
+    ./installed-tests-path.patch
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gtk-doc
+    docbook-xsl-nons
+    docbook_xml_dtd_43
+  ];
+
+  propagatedBuildInputs = [
+    glib
+  ];
+
+  mesonFlags = [
+    "-Dinstalled_tests=true"
+    "-Dinstalled_test_prefix=${placeholder "installedTests"}"
+  ];
+
+  passthru = {
+    tests = {
+      installedTests = nixosTests.installed-tests.glib-testing;
+    };
+  };
+
+  meta = with lib; {
+    description = "Test library providing test harnesses and mock classes complementing the classes provided by GLib";
+    homepage = "https://gitlab.gnome.org/pwithnall/libglib-testing";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ jtojnar ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/glib-testing/installed-tests-path.patch b/nixpkgs/pkgs/development/libraries/glib-testing/installed-tests-path.patch
new file mode 100644
index 000000000000..37ee2a988899
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glib-testing/installed-tests-path.patch
@@ -0,0 +1,32 @@
+diff --git a/libglib-testing/tests/meson.build b/libglib-testing/tests/meson.build
+index 4789c63..2b8525d 100644
+--- a/libglib-testing/tests/meson.build
++++ b/libglib-testing/tests/meson.build
+@@ -15,9 +15,9 @@ test_programs = [
+   ['signal-logger', [], deps],
+ ]
+ 
+-installed_tests_metadir = join_paths(datadir, 'installed-tests',
++installed_tests_metadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests',
+                                      'libglib-testing-' + libglib_testing_api_version)
+-installed_tests_execdir = join_paths(libexecdir, 'installed-tests',
++installed_tests_execdir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests',
+                                      'libglib-testing-' + libglib_testing_api_version)
+ 
+ foreach program: test_programs
+@@ -48,4 +48,4 @@ foreach program: test_programs
+     exe,
+     env: envs,
+   )
+-endforeach
+\ No newline at end of file
++endforeach
+diff --git a/meson_options.txt b/meson_options.txt
+index e69263e..7cb1ee8 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -4,3 +4,4 @@ option(
+   value: false,
+   description: 'enable installed tests'
+ )
++option('installed_test_prefix', type: 'string', value: '', description: 'Prefix for installed tests')
diff --git a/nixpkgs/pkgs/development/libraries/glib/darwin-compilation.patch b/nixpkgs/pkgs/development/libraries/glib/darwin-compilation.patch
new file mode 100644
index 000000000000..f215eef798af
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glib/darwin-compilation.patch
@@ -0,0 +1,24 @@
+Fix compilation on Mac OS X with gcc 4.8.
+
+diff -ru glib-2.40.0-orig/gio/gdummyfile.c glib-2.40.0/gio/gdummyfile.c
+--- glib-2.40.0-orig/gio/gdummyfile.c   2014-02-03 18:40:41.000000000 +0100
++++ glib-2.40.0/gio/gdummyfile.c        2014-07-15 10:58:31.000000000 +0200
+@@ -454,7 +454,8 @@
+   result = g_malloc (escaped_string_end - escaped_string + 1);
+        
+   out = result;
+-  for (in = escaped_string; in < escaped_string_end; in++) 
++  in = escaped_string;
++  for (; in < escaped_string_end; in++) 
+     {
+       character = *in;
+       if (*in == '%') 
+@@ -551,6 +552,7 @@
+   
+   decoded->scheme = g_malloc (p - uri);
+   out = decoded->scheme;
+-  for (in = uri; in < p - 1; in++)
++  in = uri;
++  for (; in < p - 1; in++)
+     *out++ = g_ascii_tolower (*in);
+   *out = 0;
diff --git a/nixpkgs/pkgs/development/libraries/glib/default.nix b/nixpkgs/pkgs/development/libraries/glib/default.nix
new file mode 100644
index 000000000000..2a1bae9cf41b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glib/default.nix
@@ -0,0 +1,292 @@
+{ config
+, lib
+, stdenv
+, fetchurl
+, gettext
+, meson
+, ninja
+, pkg-config
+, perl
+, python3
+, libiconv, zlib, libffi, pcre2, libelf, gnome, libselinux, bash, gnum4, gtk-doc, docbook_xsl, docbook_xml_dtd_45, libxslt
+# use util-linuxMinimal to avoid circular dependency (util-linux, systemd, glib)
+, util-linuxMinimal ? null
+, buildPackages
+
+# this is just for tests (not in the closure of any regular package)
+, coreutils, dbus, libxml2, tzdata
+, desktop-file-utils, shared-mime-info
+, darwin
+, makeHardcodeGsettingsPatch
+, testers
+}:
+
+assert stdenv.isLinux -> util-linuxMinimal != null;
+
+/*
+  * TODO:
+  * Use --enable-installed-tests for GNOME-related packages,
+      and use them as a separately installed tests run by Hydra
+      (they should test an already installed package)
+      https://wiki.gnome.org/Initiatives/GnomeGoals/InstalledTests
+  * Support org.freedesktop.Application, including D-Bus activation from desktop files
+*/
+let
+  # Some packages don't get "Cflags" from pkg-config correctly
+  # and then fail to build when directly including like <glib/...>.
+  # This is intended to be run in postInstall of any package
+  # which has $out/include/ containing just some disjunct directories.
+  flattenInclude = ''
+    for dir in "''${!outputInclude}"/include/*; do
+      cp -r "$dir"/* "''${!outputInclude}/include/"
+      rm -r "$dir"
+      ln -s . "$dir"
+    done
+    ln -sr -t "''${!outputInclude}/include/" "''${!outputInclude}"/lib/*/include/* 2>/dev/null || true
+  '';
+
+  buildDocs = stdenv.hostPlatform == stdenv.buildPlatform && !stdenv.hostPlatform.isStatic;
+in
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "glib";
+  version = "2.78.4";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/glib/${lib.versions.majorMinor finalAttrs.version}/glib-${finalAttrs.version}.tar.xz";
+    sha256 = "sha256-JLjgZy3KEgzDLTlLzLhYROcy4E/nXRi7BXOy28dUj2M=";
+  };
+
+  patches = lib.optionals stdenv.isDarwin [
+    ./darwin-compilation.patch
+  ] ++ lib.optionals stdenv.hostPlatform.isMusl [
+    ./quark_init_on_demand.patch
+    ./gobject_init_on_demand.patch
+  ] ++ [
+    ./glib-appinfo-watch.patch
+    ./schema-override-variable.patch
+
+    # Add support 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)
+    #    * gapplication (non-darwin)
+    #    * gdbus
+    #    * gio
+    #    * gio-launch-desktop (symlink to $out)
+    #    * gsettings
+    # 2. Development/build tools ($dev)
+    #    * gdbus-codegen
+    #    * gio-querymodules
+    #    * glib-compile-resources
+    #    * glib-compile-schemas
+    #    * glib-genmarshal
+    #    * glib-gettextize
+    #    * glib-mkenums
+    #    * gobject-query
+    #    * gresource
+    #    * gtester
+    #    * gtester-report
+    # 3. Tools for desktop environment that cannot go to $bin due to $out depending on them ($out)
+    #    * gio-launch-desktop
+    ./split-dev-programs.patch
+
+    # Disable flaky test.
+    # https://gitlab.gnome.org/GNOME/glib/-/issues/820
+    ./skip-timer-test.patch
+  ];
+
+  outputs = [ "bin" "out" "dev" "devdoc" ];
+
+  setupHook = ./setup-hook.sh;
+
+  buildInputs = [
+    libelf
+    finalAttrs.setupHook
+    pcre2
+  ] ++ lib.optionals (!stdenv.hostPlatform.isWindows) [
+    bash gnum4 # install glib-gettextize and m4 macros for other apps to use
+  ] ++ lib.optionals stdenv.isLinux [
+    libselinux
+    util-linuxMinimal # for libmount
+  ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
+    AppKit Carbon Cocoa CoreFoundation CoreServices Foundation
+  ]) ++ lib.optionals buildDocs [
+    # Note: this needs to be both in buildInputs and nativeBuildInputs. The
+    # Meson gtkdoc module uses find_program to look it up (-> build dep), but
+    # glib's own Meson configuration uses the host pkg-config to find its
+    # version (-> host dep). We could technically go and fix this in glib, add
+    # pkg-config to depsBuildBuild, but this would be a futile exercise since
+    # Meson's gtkdoc integration does not support cross compilation[1] anyway
+    # and this derivation disables the docs build when cross compiling.
+    #
+    # [1] https://github.com/mesonbuild/meson/issues/2003
+    gtk-doc
+  ];
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    perl
+    python3
+    gettext
+    libxslt
+    docbook_xsl
+  ] ++ lib.optionals buildDocs [
+    gtk-doc
+    docbook_xml_dtd_45
+    libxml2
+  ];
+
+  propagatedBuildInputs = [ zlib libffi gettext libiconv ];
+
+  mesonFlags = [
+    # Avoid the need for gobject introspection binaries in PATH in cross-compiling case.
+    # Instead we just copy them over from the native output.
+    "-Dgtk_doc=${lib.boolToString buildDocs}"
+    "-Dnls=enabled"
+    "-Ddevbindir=${placeholder "dev"}/bin"
+  ] ++ lib.optionals (!stdenv.isDarwin) [
+    "-Dman=true"                # broken on Darwin
+  ] ++ lib.optionals stdenv.isFreeBSD [
+    "-Db_lundef=false"
+    "-Dxattr=false"
+  ];
+
+  env.NIX_CFLAGS_COMPILE = toString [
+    "-Wno-error=nonnull"
+    # Default for release buildtype but passed manually because
+    # we're using plain
+    "-DG_DISABLE_CAST_CHECKS"
+  ];
+
+  postPatch = ''
+    chmod +x gio/tests/gengiotypefuncs.py
+    patchShebangs gio/tests/gengiotypefuncs.py
+    chmod +x docs/reference/gio/concat-files-helper.py
+    patchShebangs docs/reference/gio/concat-files-helper.py
+    patchShebangs glib/gen-unicode-tables.pl
+    patchShebangs glib/tests/gen-casefold-txt.py
+    patchShebangs glib/tests/gen-casemap-txt.py
+    patchShebangs tools/gen-visibility-macros.py
+
+    # Needs machine-id, comment the test
+    sed -e '/\/gdbus\/codegen-peer-to-peer/ s/^\/*/\/\//' -i gio/tests/gdbus-peer.c
+    sed -e '/g_test_add_func/ s/^\/*/\/\//' -i gio/tests/gdbus-address-get-session.c
+    # All gschemas fail to pass the test, upstream bug?
+    sed -e '/g_test_add_data_func/ s/^\/*/\/\//' -i gio/tests/gschema-compile.c
+    # Cannot reproduce the failing test_associations on hydra
+    sed -e '/\/appinfo\/associations/d' -i gio/tests/appinfo.c
+    # Needed because of libtool wrappers
+    sed -e '/g_subprocess_launcher_set_environ (launcher, envp);/a g_subprocess_launcher_setenv (launcher, "PATH", g_getenv("PATH"), TRUE);' -i gio/tests/gsubprocess.c
+  '' + lib.optionalString stdenv.hostPlatform.isWindows ''
+    substituteInPlace gio/win32/meson.build \
+      --replace "libintl, " ""
+  '';
+
+  postConfigure = ''
+    patchShebangs gio/gdbus-2.0/codegen/gdbus-codegen gobject/glib-{genmarshal,mkenums}
+  '';
+
+  DETERMINISTIC_BUILD = 1;
+
+  postInstall = ''
+    moveToOutput "share/glib-2.0" "$dev"
+    substituteInPlace "$dev/bin/gdbus-codegen" --replace "$out" "$dev"
+    sed -i "$dev/bin/glib-gettextize" -e "s|^gettext_dir=.*|gettext_dir=$dev/share/glib-2.0/gettext|"
+
+    # This file is *included* in gtk3 and would introduce runtime reference via __FILE__.
+    sed '1i#line 1 "glib-${finalAttrs.version}/include/glib-2.0/gobject/gobjectnotifyqueue.c"' \
+      -i "$dev"/include/glib-2.0/gobject/gobjectnotifyqueue.c
+    for i in $bin/bin/*; do
+      moveToOutput "share/bash-completion/completions/''${i##*/}" "$bin"
+    done
+    for i in $dev/bin/*; do
+      moveToOutput "share/bash-completion/completions/''${i##*/}" "$dev"
+    done
+  '' + lib.optionalString (!buildDocs) ''
+    cp -r ${buildPackages.glib.devdoc} $devdoc
+  '';
+
+  # Move man pages to the same output as their binaries (needs to be
+  # done after preFixupHooks which moves man pages too - in
+  # _multioutDocs)
+  postFixup = ''
+    for i in $dev/bin/*; do
+      moveToOutput "share/man/man1/''${i##*/}.1.*" "$dev"
+    done
+  '';
+
+  nativeCheckInputs = [ tzdata desktop-file-utils shared-mime-info ];
+
+  preCheck = lib.optionalString finalAttrs.finalPackage.doCheck or config.doCheckByDefault or false ''
+    export LD_LIBRARY_PATH="$NIX_BUILD_TOP/glib-${finalAttrs.version}/glib/.libs''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
+    export TZDIR="${tzdata}/share/zoneinfo"
+    export XDG_CACHE_HOME="$TMP"
+    export XDG_RUNTIME_HOME="$TMP"
+    export HOME="$TMP"
+    export XDG_DATA_DIRS="${desktop-file-utils}/share:${shared-mime-info}/share"
+    export G_TEST_DBUS_DAEMON="${dbus}/bin/dbus-daemon"
+    export PATH="$PATH:$(pwd)/gobject"
+    echo "PATH=$PATH"
+  '';
+
+  separateDebugInfo = stdenv.isLinux;
+
+  passthru = rec {
+    gioModuleDir = "lib/gio/modules";
+
+    makeSchemaDataDirPath = dir: name: "${dir}/share/gsettings-schemas/${name}";
+    makeSchemaPath = dir: name: "${makeSchemaDataDirPath dir name}/glib-2.0/schemas";
+    getSchemaPath = pkg: makeSchemaPath pkg pkg.name;
+    getSchemaDataDirPath = pkg: makeSchemaDataDirPath pkg pkg.name;
+
+    tests = {
+      withChecks = finalAttrs.finalPackage.overrideAttrs (_: { doCheck = true; });
+      pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+    };
+
+    inherit flattenInclude;
+    updateScript = gnome.updateScript {
+      packageName = "glib";
+      versionPolicy = "odd-unstable";
+    };
+
+    mkHardcodeGsettingsPatch =
+      {
+        src,
+        glib-schema-to-var,
+      }:
+      builtins.trace
+        "glib.mkHardcodeGsettingsPatch is deprecated, please use makeHardcodeGsettingsPatch instead"
+        (makeHardcodeGsettingsPatch {
+          inherit src;
+          schemaIdToVariableMapping = glib-schema-to-var;
+        });
+  };
+
+  meta = with lib; {
+    description = "C library of programming buildings blocks";
+    homepage    = "https://wiki.gnome.org/Projects/GLib";
+    license     = licenses.lgpl21Plus;
+    maintainers = teams.gnome.members ++ (with maintainers; [ lovek323 raskin ]);
+    pkgConfigModules = [
+      "gio-2.0"
+      "gobject-2.0"
+      "gthread-2.0"
+    ];
+    platforms   = platforms.unix ++ platforms.windows;
+
+    longDescription = ''
+      GLib provides the core application building blocks for libraries
+      and applications written in C.  It provides the core object
+      system used in GNOME, the main loop implementation, and a large
+      set of utility functions for strings and common data structures.
+    '';
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/glib/elementary-terminal-support.patch b/nixpkgs/pkgs/development/libraries/glib/elementary-terminal-support.patch
new file mode 100644
index 000000000000..34a56c8487ae
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glib/elementary-terminal-support.patch
@@ -0,0 +1,12 @@
+diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
+index 30fcb2937..a6a7163a7 100644
+--- a/gio/gdesktopappinfo.c
++++ b/gio/gdesktopappinfo.c
+@@ -2704,6 +2704,7 @@ prepend_terminal_to_vector (int          *argc,
+     { "gnome-terminal", "--" },
+     { "mate-terminal", "-x" },
+     { "xfce4-terminal", "-x" },
++    { "io.elementary.terminal", "-x" },
+     { "tilix", "-e" },
+     { "konsole", "-e" },
+     { "nxterm", "-e" },
diff --git a/nixpkgs/pkgs/development/libraries/glib/glib-appinfo-watch.patch b/nixpkgs/pkgs/development/libraries/glib/glib-appinfo-watch.patch
new file mode 100644
index 000000000000..cbd78a6db4a6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glib/glib-appinfo-watch.patch
@@ -0,0 +1,102 @@
+This patch lets GLib's GDesktopAppInfo API watch and notice changes
+to the Nix user and system profiles.  That way, the list of available
+applications shown by the desktop environment is immediately updated
+when the user installs or removes any
+(see <https://issues.guix.gnu.org/35594>).
+
+It does so by monitoring /nix/var/nix/profiles (for changes to the system
+profile) and /nix/var/nix/profiles/per-user/USER (for changes to the user
+profile) as well as /etc/profiles/per-user (for chanes to the user
+environment profile) and crawling their share/applications sub-directory when
+changes happen.
+
+diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
+index b779b30..31069f7 100644
+--- a/gio/gdesktopappinfo.c
++++ b/gio/gdesktopappinfo.c
+@@ -150,6 +150,7 @@ typedef struct
+   gchar                      *alternatively_watching;
+   gboolean                    is_config;
+   gboolean                    is_setup;
++  gchar                      *nix_profile_watch_dir;
+   GFileMonitor               *monitor;
+   GHashTable                 *app_names;
+   GHashTable                 *mime_tweaks;
+@@ -181,6 +182,7 @@ desktop_file_dir_unref (DesktopFileDir *dir)
+     {
+       desktop_file_dir_reset (dir);
+       g_free (dir->path);
++      g_free (dir->nix_profile_watch_dir);
+       g_free (dir);
+     }
+ }
+@@ -205,6 +207,14 @@ desktop_file_dir_get_alternative_dir (DesktopFileDir *dir)
+ {
+   gchar *parent;
+ 
++  /* If DIR is a profile, watch the specified directory--e.g.,
++   * /nix/var/nix/profiles/per-user/$USER/ for the user profile.  Do not watch
++   * ~/.nix-profile or /run/current-system/sw because GFileMonitor does
++   * not pass IN_DONT_FOLLOW and thus cannot notice any change.
++   * /etc/profiles/per-user is monitored directly for the same reason. */
++  if (dir->nix_profile_watch_dir != NULL)
++    return g_strdup (dir->nix_profile_watch_dir);
++
+   /* If the directory itself exists then we need no alternative. */
+   if (g_access (dir->path, R_OK | X_OK) == 0)
+     return NULL;
+@@ -250,11 +260,11 @@ desktop_file_dir_changed (GFileMonitor      *monitor,
+    *
+    * If this is a notification for a parent directory (because the
+    * desktop directory didn't exist) then we shouldn't fire the signal
+-   * unless something actually changed.
++   * unless something actually changed or it's part of a Nix profile.
+    */
+   g_mutex_lock (&desktop_file_dir_lock);
+ 
+-  if (dir->alternatively_watching)
++  if (dir->alternatively_watching && dir->nix_profile_watch_dir == NULL)
+     {
+       gchar *alternative_dir;
+ 
+@@ -1556,6 +1566,40 @@ desktop_file_dirs_lock (void)
+       for (i = 0; dirs[i]; i++)
+         g_ptr_array_add (desktop_file_dirs, desktop_file_dir_new (dirs[i]));
+ 
++      {
++        /* Monitor the system and user profile under /nix/var/nix/profiles and
++         * treat modifications to them as if they were modifications to their
++         * /share sub-directory.  */
++        const gchar *user;
++        DesktopFileDir *system_profile_dir, *user_profile_dir, *user_env_dir;
++
++        system_profile_dir =
++          desktop_file_dir_new ("/nix/var/nix/profiles/system/sw/share");
++        system_profile_dir->nix_profile_watch_dir = g_strdup ("/nix/var/nix/profiles");
++        g_ptr_array_add (desktop_file_dirs, desktop_file_dir_ref (system_profile_dir));
++
++        user = g_get_user_name ();
++        if (user != NULL)
++          {
++            gchar *profile_dir, *user_data_dir, *env_dir, *env_data_dir;
++
++            profile_dir = g_build_filename ("/nix/var/nix/profiles/per-user", user, NULL);
++            user_data_dir = g_build_filename (profile_dir, "profile", "share", NULL);
++            user_profile_dir = desktop_file_dir_new (user_data_dir);
++            user_profile_dir->nix_profile_watch_dir = profile_dir;
++            
++            env_dir = g_build_filename ("/etc/profiles/per-user", NULL);
++            env_data_dir = g_build_filename (env_dir, user, "share", NULL);
++            user_env_dir = desktop_file_dir_new (env_data_dir);
++            user_env_dir->nix_profile_watch_dir = env_dir;
++
++            g_ptr_array_add (desktop_file_dirs, desktop_file_dir_ref (user_profile_dir));
++            g_ptr_array_add (desktop_file_dirs, desktop_file_dir_ref (user_env_dir));
++            g_free (user_data_dir);
++            g_free (env_data_dir);
++          }
++      }
++
+       /* The list of directories will never change after this, unless
+        * g_get_user_config_dir() changes due to %G_TEST_OPTION_ISOLATE_DIRS. */
+       desktop_file_dirs_config_dir = user_config_dir;
diff --git a/nixpkgs/pkgs/development/libraries/glib/gobject_init_on_demand.patch b/nixpkgs/pkgs/development/libraries/glib/gobject_init_on_demand.patch
new file mode 100644
index 000000000000..d72d0b61dca2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glib/gobject_init_on_demand.patch
@@ -0,0 +1,87 @@
+--- glib-source/gobject/gtype.c	2016-08-17 17:20:47.000000000 +0200
++++ glib-source/gobject/gtype.c	2016-09-01 21:56:31.777406646 +0200
+@@ -209,6 +209,9 @@
+ static gboolean				type_node_is_a_L		(TypeNode		*node,
+ 									 TypeNode		*iface_node);
+ 
++#if !defined(__GLIBC__)
++static void gobject_init (void);
++#endif
+ 
+ /* --- enumeration --- */
+ 
+@@ -2631,7 +2634,10 @@
+ 			     GTypeFlags			 flags)
+ {
+   TypeNode *node;
+-  
++ 
++#if !defined(__GLIBC__)
++  gobject_init();
++#endif 
+   g_assert_type_system_initialized ();
+   g_return_val_if_fail (type_id > 0, 0);
+   g_return_val_if_fail (type_name != NULL, 0);
+@@ -2749,6 +2755,9 @@
+   TypeNode *pnode, *node;
+   GType type = 0;
+   
++#if !defined(__GLIBC__)
++  gobject_init();
++#endif 
+   g_assert_type_system_initialized ();
+   g_return_val_if_fail (parent_type > 0, 0);
+   g_return_val_if_fail (type_name != NULL, 0);
+@@ -2804,6 +2813,9 @@
+   TypeNode *pnode, *node;
+   GType type;
+   
++#if !defined(__GLIBC__)
++  gobject_init();
++#endif 
+   g_assert_type_system_initialized ();
+   g_return_val_if_fail (parent_type > 0, 0);
+   g_return_val_if_fail (type_name != NULL, 0);
+@@ -3319,6 +3331,9 @@
+ {
+   TypeNode *node;
+   
++#if !defined(__GLIBC__)
++  gobject_init();
++#endif 
+   g_assert_type_system_initialized ();
+   
+   node = lookup_type_node_I (type);
+@@ -4343,6 +4358,9 @@
+ void
+ g_type_init_with_debug_flags (GTypeDebugFlags debug_flags)
+ {
++#if !defined(__GLIBC__)
++  gobject_init();
++#endif 
+   g_assert_type_system_initialized ();
+ 
+   if (debug_flags)
+@@ -4361,6 +4379,9 @@
+ void
+ g_type_init (void)
+ {
++#if !defined(__GLIBC__)
++  gobject_init();
++#endif 
+   g_assert_type_system_initialized ();
+ }
+ 
+@@ -4372,6 +4393,12 @@
+   TypeNode *node;
+   GType type;
+ 
++#if !defined(__GLIBC__)
++  static int gobject_initialized = 0;
++  if (gobject_initialized)
++    return;
++  gobject_initialized = 1;
++#endif
+   /* Ensure GLib is initialized first, see
+    * https://bugzilla.gnome.org/show_bug.cgi?id=756139
+    */
diff --git a/nixpkgs/pkgs/development/libraries/glib/quark_init_on_demand.patch b/nixpkgs/pkgs/development/libraries/glib/quark_init_on_demand.patch
new file mode 100644
index 000000000000..168086484314
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glib/quark_init_on_demand.patch
@@ -0,0 +1,33 @@
+--- glib-source/glib/gquark.c	2016-08-17 17:20:47.000000000 +0200
++++ glib-source/glib/gquark.c	2016-08-30 07:49:13.298234757 +0200
+@@ -57,6 +57,9 @@
+ void
+ g_quark_init (void)
+ {
++  if (quark_ht)
++    return;
++
+   g_assert (quark_seq_id == 0);
+   quark_ht = g_hash_table_new (g_str_hash, g_str_equal);
+   quarks = g_new (gchar*, QUARK_BLOCK_SIZE);
+@@ -138,9 +141,12 @@
+     return 0;
+ 
+   G_LOCK (quark_global);
++#if !defined(__GLIBC__)
++  g_quark_init ();
++#endif
+   quark = GPOINTER_TO_UINT (g_hash_table_lookup (quark_ht, string));
+   G_UNLOCK (quark_global);
+
+   return quark;
+ }
+ 
+@@ -280,6 +286,7 @@
+   GQuark quark;
+   gchar **quarks_new;
+ 
++  g_quark_init ();
+   if (quark_seq_id % QUARK_BLOCK_SIZE == 0)
+     {
+       quarks_new = g_new (gchar*, quark_seq_id + QUARK_BLOCK_SIZE);
diff --git a/nixpkgs/pkgs/development/libraries/glib/schema-override-variable.patch b/nixpkgs/pkgs/development/libraries/glib/schema-override-variable.patch
new file mode 100644
index 000000000000..f98af04a7f24
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glib/schema-override-variable.patch
@@ -0,0 +1,14 @@
+diff --git a/gio/gsettingsschema.c b/gio/gsettingsschema.c
+index 1282c10a1..feadfe3aa 100644
+--- a/gio/gsettingsschema.c
++++ b/gio/gsettingsschema.c
+@@ -360,6 +360,9 @@ initialise_schema_sources (void)
+ 
+       try_prepend_data_dir (g_get_user_data_dir ());
+ 
++      if (!is_setuid && (path = g_getenv ("NIX_GSETTINGS_OVERRIDES_DIR")) != NULL)
++        try_prepend_dir (path);
++
+       /* Disallow loading extra schemas if running as setuid, as that could
+        * allow reading privileged files. */
+       if (!is_setuid && (path = g_getenv ("GSETTINGS_SCHEMA_DIR")) != NULL)
diff --git a/nixpkgs/pkgs/development/libraries/glib/setup-hook.sh b/nixpkgs/pkgs/development/libraries/glib/setup-hook.sh
new file mode 100644
index 000000000000..8ead5510ec4f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glib/setup-hook.sh
@@ -0,0 +1,34 @@
+make_glib_find_gsettings_schemas() {
+    # For packages that need gschemas of other packages (e.g. empathy)
+    for maybe_dir in "$1"/share/gsettings-schemas/*; do
+        if [[ -d "$maybe_dir/glib-2.0/schemas" ]]; then
+            addToSearchPath GSETTINGS_SCHEMAS_PATH "$maybe_dir"
+        fi
+    done
+}
+addEnvHooks "$targetOffset" make_glib_find_gsettings_schemas
+
+# Install gschemas, if any, in a package-specific directory
+glibPreInstallPhase() {
+  makeFlagsArray+=("gsettingsschemadir=${!outputLib}/share/gsettings-schemas/$name/glib-2.0/schemas/")
+}
+preInstallPhases+=" glibPreInstallPhase"
+
+glibPreFixupPhase() {
+    # Move gschemas in case the install flag didn't help
+    if [ -d "$prefix/share/glib-2.0/schemas" ]; then
+        mkdir -p "${!outputLib}/share/gsettings-schemas/$name/glib-2.0"
+        mv "$prefix/share/glib-2.0/schemas" "${!outputLib}/share/gsettings-schemas/$name/glib-2.0/"
+    fi
+
+    addToSearchPath GSETTINGS_SCHEMAS_PATH "${!outputLib}/share/gsettings-schemas/$name"
+}
+
+# gappsWrapperArgsHook expects GSETTINGS_SCHEMAS_PATH variable to be set by this.
+# Until we have dependency mechanism in generic builder, we need to use this ugly hack.
+if [[ " ${preFixupPhases:-} " =~ " gappsWrapperArgsHook " ]]; then
+    preFixupPhases+=" "
+    preFixupPhases="${preFixupPhases/ gappsWrapperArgsHook / glibPreFixupPhase gappsWrapperArgsHook }"
+else
+    preFixupPhases+=" glibPreFixupPhase"
+fi
diff --git a/nixpkgs/pkgs/development/libraries/glib/skip-timer-test.patch b/nixpkgs/pkgs/development/libraries/glib/skip-timer-test.patch
new file mode 100644
index 000000000000..942f3e7864c4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glib/skip-timer-test.patch
@@ -0,0 +1,17 @@
+Description: Skip test which performs some unreliable floating point comparisons
+Forwarded: https://bugzilla.gnome.org/show_bug.cgi?id=722604
+
+Index: b/glib/tests/timer.c
+===================================================================
+--- a/glib/tests/timer.c
++++ b/glib/tests/timer.c
+@@ -203,7 +203,7 @@
+ {
+   g_test_init (&argc, &argv, NULL);
+ 
+-  g_test_add_func ("/timer/basic", test_timer_basic);
++/*  g_test_add_func ("/timer/basic", test_timer_basic);*/
+-  g_test_add_func ("/timer/stop", test_timer_stop);
++/*  g_test_add_func ("/timer/stop", test_timer_stop);*/
+   g_test_add_func ("/timer/continue", test_timer_continue);
+   g_test_add_func ("/timer/reset", test_timer_reset);
diff --git a/nixpkgs/pkgs/development/libraries/glib/split-dev-programs.patch b/nixpkgs/pkgs/development/libraries/glib/split-dev-programs.patch
new file mode 100644
index 000000000000..0333c5c9ca29
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glib/split-dev-programs.patch
@@ -0,0 +1,214 @@
+diff --git a/gio/gdbus-2.0/codegen/meson.build b/gio/gdbus-2.0/codegen/meson.build
+index 65faae9b2..4297513d4 100644
+--- a/gio/gdbus-2.0/codegen/meson.build
++++ b/gio/gdbus-2.0/codegen/meson.build
+@@ -20,7 +20,7 @@ gdbus_codegen_conf.set('DATADIR', glib_datadir)
+ # Install gdbus-codegen executable
+ gdbus_codegen = configure_file(input : 'gdbus-codegen.in',
+   output : 'gdbus-codegen',
+-  install_dir : get_option('bindir'),
++  install_dir : get_option('devbindir'),
+   install_tag : 'bin-devel',
+   configuration : gdbus_codegen_conf
+ )
+diff --git a/gio/meson.build b/gio/meson.build
+index 75686bb3e..2f1a73482 100644
+--- a/gio/meson.build
++++ b/gio/meson.build
+@@ -882,14 +882,15 @@ pkg.generate(libgio,
+     'schemasdir=' + '${datadir}' / schemas_subdir,
+     'dtdsdir=' + '${datadir}' / dtds_subdir,
+     'bindir=' + '${prefix}' / get_option('bindir'),
++    'devbindir=' + get_option('devbindir'),
+     'giomoduledir=' + pkgconfig_giomodulesdir,
+     'gio=' + '${bindir}' / 'gio',
+-    'gio_querymodules=' + pkgconfig_multiarch_bindir / 'gio-querymodules',
+-    'glib_compile_schemas=' + pkgconfig_multiarch_bindir / 'glib-compile-schemas',
+-    'glib_compile_resources=' + '${bindir}' / 'glib-compile-resources',
++    'gio_querymodules=' + '${devbindir}' / 'gio-querymodules',
++    'glib_compile_schemas=' + '${devbindir}' / 'glib-compile-schemas',
++    'glib_compile_resources=' + '${devbindir}' / 'glib-compile-resources',
+     'gdbus=' + '${bindir}' /'gdbus',
+-    'gdbus_codegen=' + '${bindir}' / 'gdbus-codegen',
+-    'gresource=' + '${bindir}' / 'gresource',
++    'gdbus_codegen=' + '${devbindir}' / 'gdbus-codegen',
++    'gresource=' + '${devbindir}' / 'gresource',
+     'gsettings=' + '${bindir}' / 'gsettings',
+   ],
+   version : glib_version,
+@@ -992,6 +993,7 @@ executable('gio', gio_tool_sources,
+ 
+ executable('gresource', 'gresource-tool.c',
+   install : true,
++  install_dir : get_option('devbindir'),
+   install_tag : 'bin',
+   # intl.lib is not compatible with SAFESEH
+   link_args : noseh_link_args,
+@@ -999,7 +1001,7 @@ executable('gresource', 'gresource-tool.c',
+ 
+ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodule-priv.c',
+   install : true,
+-  install_dir : multiarch_bindir,
++  install_dir : get_option('devbindir'),
+   install_tag : 'bin',
+   c_args : gio_c_args,
+   # intl.lib is not compatible with SAFESEH
+@@ -1009,7 +1011,7 @@ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodu
+ glib_compile_schemas = executable('glib-compile-schemas',
+   ['glib-compile-schemas.c'],
+   install : true,
+-  install_dir : multiarch_bindir,
++  install_dir : get_option('devbindir'),
+   install_tag : 'bin',
+   # intl.lib is not compatible with SAFESEH
+   link_args : noseh_link_args,
+@@ -1018,6 +1020,7 @@ glib_compile_schemas = executable('glib-compile-schemas',
+ glib_compile_resources = executable('glib-compile-resources',
+   [gconstructor_as_data_h, 'glib-compile-resources.c'],
+   install : true,
++  install_dir : get_option('devbindir'),
+   install_tag : 'bin-devel',
+   c_args : gio_c_args,
+   # intl.lib is not compatible with SAFESEH
+diff --git a/gio/tests/meson.build b/gio/tests/meson.build
+index 4ef3343ab..2a0a6b56b 100644
+--- a/gio/tests/meson.build
++++ b/gio/tests/meson.build
+@@ -1131,16 +1131,18 @@ if have_bash and have_pkg_config
+ 
+   gio_binaries = [
+     'gio',
+-    'glib-compile-resources',
+     'gdbus',
+-    'gdbus-codegen',
+-    'gresource',
+     'gsettings',
+   ]
+-  gio_multiarch_binaries = [
++  gio_dev_binaries = [
++    'glib-compile-resources',
++    'gdbus-codegen',
++    'gresource',
+     'gio-querymodules',
+     'glib-compile-schemas',
+   ]
++  gio_multiarch_binaries = [
++  ]
+ 
+   foreach binary: gio_binaries
+     pkg_config_tests += [
+@@ -1149,6 +1151,13 @@ if have_bash and have_pkg_config
+         prefix / get_option('bindir') / binary)
+     ]
+   endforeach
++  foreach binary: gio_dev_binaries
++    pkg_config_tests += [
++      'test "$(pkg-config --variable=@0@ gio-2.0)" = "@1@"'.format(
++        binary.underscorify(),
++        prefix / get_option('devbindir') / binary)
++    ]
++  endforeach
+ 
+   foreach binary: gio_multiarch_binaries
+     pkg_config_tests += [
+diff --git a/glib/meson.build b/glib/meson.build
+index c26a35e42..38effe12a 100644
+--- a/glib/meson.build
++++ b/glib/meson.build
+@@ -447,9 +447,10 @@ pkg.generate(libglib,
+   variables : [
+     'bindir=' + '${prefix}' / get_option('bindir'),
+     'datadir=' + '${prefix}' / get_option('datadir'),
+-    'glib_genmarshal=' + '${bindir}' / 'glib-genmarshal',
+-    'gobject_query=' + '${bindir}' / 'gobject-query',
+-    'glib_mkenums=' + '${bindir}' / 'glib-mkenums',
++    'devbindir=' + get_option('devbindir'),
++    'glib_genmarshal=' + '${devbindir}' / 'glib-genmarshal',
++    'gobject_query=' + '${devbindir}' / 'gobject-query',
++    'glib_mkenums=' + '${devbindir}' / 'glib-mkenums',
+     'glib_valgrind_suppressions=' + '${datadir}' /
+       valgrind_suppression_file_install_subdir /
+       fs.name(valgrind_suppression_file),
+@@ -490,6 +491,7 @@ if host_system == 'windows'
+ else
+   gtester = executable('gtester', 'gtester.c',
+     install : true,
++    install_dir : get_option('devbindir'),
+     install_tag : 'bin-devel',
+     c_args : ['-UG_DISABLE_ASSERT'],
+     include_directories : configinc,
+@@ -505,7 +507,7 @@ report_conf.set('PYTHON', python_name)
+ configure_file(
+   input: 'gtester-report.in',
+   output: 'gtester-report',
+-  install_dir: get_option('bindir'),
++  install_dir: get_option('devbindir'),
+   install_tag : 'bin-devel',
+   configuration: report_conf,
+   install_mode: 'rwxr-xr-x'
+diff --git a/glib/tests/meson.build b/glib/tests/meson.build
+index 09ecd5ab3..9748d4122 100644
+--- a/glib/tests/meson.build
++++ b/glib/tests/meson.build
+@@ -508,9 +508,9 @@ if have_bash and have_pkg_config
+         'test "$(pkg-config --variable=datadir glib-2.0)" = "@0@"'.format(
+           prefix / get_option('datadir')),
+         'test "$(pkg-config --variable=gobject_query glib-2.0)" = "@0@"'.format(
+-          prefix / get_option('bindir') / 'gobject-query'),
++          prefix / get_option('devbindir') / 'gobject-query'),
+         'test "$(pkg-config --variable=glib_mkenums glib-2.0)" = "@0@"'.format(
+-          prefix / get_option('bindir') / 'glib-mkenums'),
++          prefix / get_option('devbindir') / 'glib-mkenums'),
+         'test "$(pkg-config --variable=glib_valgrind_suppressions glib-2.0)" = "@0@"'.format(
+           prefix / get_option('datadir') /
+           valgrind_suppression_file_install_subdir / fs.name(valgrind_suppression_file)),
+diff --git a/gobject/meson.build b/gobject/meson.build
+index 2129aaf8a..da8462428 100644
+--- a/gobject/meson.build
++++ b/gobject/meson.build
+@@ -94,7 +94,7 @@ foreach tool: python_tools
+     input : tool + '.in',
+     output : tool,
+     configuration : python_tools_conf,
+-    install_dir : glib_bindir,
++    install_dir : get_option('devbindir'),
+     install_tag : 'bin-devel',
+   )
+ 
+@@ -172,6 +172,7 @@ meson.override_dependency('gobject-2.0', libgobject_dep)
+ 
+ gobject_query = executable('gobject-query', 'gobject-query.c',
+   install : true,
++  install_dir : get_option('devbindir'),
+   install_tag : 'bin-devel',
+   dependencies : [libglib_dep, libgobject_dep])
+ 
+diff --git a/meson_options.txt b/meson_options.txt
+index 517d5757c..198cc1b3c 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -4,6 +4,11 @@ option('runtime_libdir',
+        description : 'install runtime libraries relative to libdir',
+        deprecated: true)
+ 
++option('devbindir',
++       type : 'string',
++       value : '',
++       description : 'bindir for development tools')
++
+ option('charsetalias_dir',
+        type : 'string',
+        value : '',
+diff --git a/tools/meson.build b/tools/meson.build
+index 257312ebf..f8315392b 100644
+--- a/tools/meson.build
++++ b/tools/meson.build
+@@ -8,7 +8,7 @@ if have_sh
+   gettextize_conf.set('datarootdir', glib_datadir)
+   gettextize_conf.set('datadir', glib_datadir)
+   configure_file(input : 'glib-gettextize.in',
+-    install_dir : glib_bindir,
++    install_dir : get_option('devbindir'),
+     install_tag : 'bin-devel',
+     output : 'glib-gettextize',
+     configuration : gettextize_conf)
diff --git a/nixpkgs/pkgs/development/libraries/glibc/0001-Revert-Remove-all-usage-of-BASH-or-BASH-in-installed.patch b/nixpkgs/pkgs/development/libraries/glibc/0001-Revert-Remove-all-usage-of-BASH-or-BASH-in-installed.patch
new file mode 100644
index 000000000000..b7658b59fb1e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glibc/0001-Revert-Remove-all-usage-of-BASH-or-BASH-in-installed.patch
@@ -0,0 +1,134 @@
+From cdd0c4b168fe228de97778556cea5c0f936e0e79 Mon Sep 17 00:00:00 2001
+From: Bernardo Meurer <bernardo@meurer.org>
+Date: Fri, 22 Jul 2022 22:11:07 -0700
+Subject: [PATCH] Revert "Remove all usage of @BASH@ or ${BASH} in installed
+ files, and hardcode /bin/bash instead"
+
+We need the ability to override to use `/bin/sh` here to avoid having
+some bootstrap tools in a final build product.
+
+This reverts commit 5188a9d0265cc6f7235a8af1d31ab02e4a24853d.
+
+Co-authored-by: Maximilian Bosch <maximilian@mbosch.me>
+---
+ debug/Makefile     | 5 +++--
+ debug/xtrace.sh    | 2 +-
+ elf/Makefile       | 4 +++-
+ elf/ldd.bash.in    | 2 +-
+ elf/sotruss.sh     | 2 +-
+ malloc/Makefile    | 5 +++--
+ malloc/memusage.sh | 2 +-
+ timezone/Makefile  | 3 ++-
+ 8 files changed, 15 insertions(+), 10 deletions(-)
+
+diff --git a/debug/Makefile b/debug/Makefile
+index 52f9a7852c..22e4ae5461 100644
+--- a/debug/Makefile
++++ b/debug/Makefile
+@@ -265,8 +265,9 @@ $(objpfx)pcprofiledump: $(objpfx)pcprofiledump.o
+ 
+ $(objpfx)xtrace: xtrace.sh
+ 	rm -f $@.new
+-	sed -e 's|@VERSION@|$(version)|' -e 's|@SLIBDIR@|$(sLIBdir)|' \
+-	    -e 's|@BINDIR@|$(bindir)|' -e 's|@PKGVERSION@|$(PKGVERSION)|' \
++	sed -e 's|@BASH@|$(BASH)|' -e 's|@VERSION@|$(version)|' \
++	    -e 's|@SLIBDIR@|$(sLIBdir)|' -e 's|@BINDIR@|$(bindir)|' \
++	    -e 's|@PKGVERSION@|$(PKGVERSION)|' \
+ 	    -e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|' $^ > $@.new \
+ 	&& rm -f $@ && mv $@.new $@ && chmod +x $@
+ 
+diff --git a/debug/xtrace.sh b/debug/xtrace.sh
+index 3d1f2af43a..eb2ba7ad4a 100755
+--- a/debug/xtrace.sh
++++ b/debug/xtrace.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#! @BASH@
+ # Copyright (C) 1999-2023 Free Software Foundation, Inc.
+ # This file is part of the GNU C Library.
+ 
+diff --git a/elf/Makefile b/elf/Makefile
+index 0d19964d42..ee8ee1cd41 100644
+--- a/elf/Makefile
++++ b/elf/Makefile
+@@ -250,7 +250,8 @@ $(objpfx)sotruss-lib.so: $(common-objpfx)libc.so $(objpfx)ld.so \
+ 	$(common-objpfx)libc_nonshared.a
+ 
+ $(objpfx)sotruss: sotruss.sh $(common-objpfx)config.make
+-	sed -e 's%@VERSION@%$(version)%g' \
++	sed -e 's%@BASH@%$(BASH)%g' \
++	    -e 's%@VERSION@%$(version)%g' \
+ 	    -e 's%@TEXTDOMAINDIR@%$(localedir)%g' \
+ 	    -e 's%@PREFIX@%$(prefix)%g' \
+ 	    -e 's|@PKGVERSION@|$(PKGVERSION)|g' \
+@@ -1396,6 +1397,7 @@ ldd-rewrite = -e 's%@RTLD@%$(rtlddir)/$(rtld-installed-name)%g' \
+ 	      -e 's%@VERSION@%$(version)%g' \
+ 	      -e 's|@PKGVERSION@|$(PKGVERSION)|g' \
+ 	      -e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|g' \
++	      -e 's%@BASH@%$(BASH)%g' \
+ 	      -e 's%@TEXTDOMAINDIR@%$(localedir)%g'
+ 
+ ifeq ($(ldd-rewrite-script),no)
+diff --git a/elf/ldd.bash.in b/elf/ldd.bash.in
+index e45dec5894..e09428506e 100644
+--- a/elf/ldd.bash.in
++++ b/elf/ldd.bash.in
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#! @BASH@
+ # Copyright (C) 1996-2023 Free Software Foundation, Inc.
+ # This file is part of the GNU C Library.
+ 
+diff --git a/elf/sotruss.sh b/elf/sotruss.sh
+index 874a6bed3f..7cc154561e 100755
+--- a/elf/sotruss.sh
++++ b/elf/sotruss.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#! @BASH@
+ # Copyright (C) 2011-2023 Free Software Foundation, Inc.
+ # This file is part of the GNU C Library.
+ 
+diff --git a/malloc/Makefile b/malloc/Makefile
+index dfb51d344c..574b5e9579 100644
+--- a/malloc/Makefile
++++ b/malloc/Makefile
+@@ -306,8 +306,9 @@ $(objpfx)mtrace: mtrace.pl
+ 
+ $(objpfx)memusage: memusage.sh
+ 	rm -f $@.new
+-	sed -e 's|@VERSION@|$(version)|' -e 's|@SLIBDIR@|$(sLIBdir)|' \
+-	    -e 's|@BINDIR@|$(bindir)|' -e 's|@PKGVERSION@|$(PKGVERSION)|' \
++	sed -e 's|@BASH@|$(BASH)|' -e 's|@VERSION@|$(version)|' \
++	    -e 's|@SLIBDIR@|$(sLIBdir)|' -e 's|@BINDIR@|$(bindir)|' \
++	    -e 's|@PKGVERSION@|$(PKGVERSION)|' \
+ 	    -e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|' $^ > $@.new \
+ 	&& rm -f $@ && mv $@.new $@ && chmod +x $@
+ 
+diff --git a/malloc/memusage.sh b/malloc/memusage.sh
+index b1f5848b74..329e36ef8a 100755
+--- a/malloc/memusage.sh
++++ b/malloc/memusage.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#! @BASH@
+ # Copyright (C) 1999-2023 Free Software Foundation, Inc.
+ # This file is part of the GNU C Library.
+ 
+diff --git a/timezone/Makefile b/timezone/Makefile
+index 0306c0bca9..de9bbcc815 100644
+--- a/timezone/Makefile
++++ b/timezone/Makefile
+@@ -132,7 +132,8 @@ $(testdata)/XT5: testdata/gen-XT5.sh
+ 	mv $@.tmp $@
+ 
+ $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make
+-	sed -e 's|TZDIR=[^}]*|TZDIR=$(zonedir)|' \
++	sed -e 's|/bin/bash|$(BASH)|' \
++	    -e 's|TZDIR=[^}]*|TZDIR=$(zonedir)|' \
+ 	    -e '/TZVERSION=/s|see_Makefile|"$(version)"|' \
+ 	    -e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \
+ 	    -e '/REPORT_BUGS_TO=/s|=.*|="$(REPORT_BUGS_TO)"|' \
+-- 
+2.38.4
+
diff --git a/nixpkgs/pkgs/development/libraries/glibc/0001-aarch64-math-vector.h-add-NVCC-include-guard.patch b/nixpkgs/pkgs/development/libraries/glibc/0001-aarch64-math-vector.h-add-NVCC-include-guard.patch
new file mode 100644
index 000000000000..234bc1943c9a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glibc/0001-aarch64-math-vector.h-add-NVCC-include-guard.patch
@@ -0,0 +1,37 @@
+From 44d0a3a9bd8c6fe59f6ccb44206a50a900bfcf4a Mon Sep 17 00:00:00 2001
+From: Connor Baker <connor.baker@tweag.io>
+Date: Tue, 31 Oct 2023 14:30:24 +0000
+Subject: [PATCH] aarch64/math-vector.h: add NVCC include guard
+
+---
+ sysdeps/aarch64/fpu/bits/math-vector.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/sysdeps/aarch64/fpu/bits/math-vector.h b/sysdeps/aarch64/fpu/bits/math-vector.h
+index 7c200599c1..583a426494 100644
+--- a/sysdeps/aarch64/fpu/bits/math-vector.h
++++ b/sysdeps/aarch64/fpu/bits/math-vector.h
+@@ -25,17 +25,17 @@
+ /* Get default empty definitions for simd declarations.  */
+ #include <bits/libm-simd-decl-stubs.h>
+ 
+-#if __GNUC_PREREQ(9, 0)
++#if __GNUC_PREREQ(9, 0) && !defined(__CUDACC__)
+ #  define __ADVSIMD_VEC_MATH_SUPPORTED
+ typedef __Float32x4_t __f32x4_t;
+ typedef __Float64x2_t __f64x2_t;
+-#elif __glibc_clang_prereq(8, 0)
++#elif __glibc_clang_prereq(8, 0) && !defined(__CUDACC__)
+ #  define __ADVSIMD_VEC_MATH_SUPPORTED
+ typedef __attribute__ ((__neon_vector_type__ (4))) float __f32x4_t;
+ typedef __attribute__ ((__neon_vector_type__ (2))) double __f64x2_t;
+ #endif
+ 
+-#if __GNUC_PREREQ(10, 0) || __glibc_clang_prereq(11, 0)
++#if (__GNUC_PREREQ(10, 0) || __glibc_clang_prereq(11, 0)) && !defined(__CUDACC__)
+ #  define __SVE_VEC_MATH_SUPPORTED
+ typedef __SVFloat32_t __sv_f32_t;
+ typedef __SVFloat64_t __sv_f64_t;
+-- 
+2.42.0
+
diff --git a/nixpkgs/pkgs/development/libraries/glibc/2.38-master.patch.gz b/nixpkgs/pkgs/development/libraries/glibc/2.38-master.patch.gz
new file mode 100644
index 000000000000..a07e4f8e1d50
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glibc/2.38-master.patch.gz
Binary files differdiff --git a/nixpkgs/pkgs/development/libraries/glibc/common.nix b/nixpkgs/pkgs/development/libraries/glibc/common.nix
new file mode 100644
index 000000000000..826d1e9c8389
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glibc/common.nix
@@ -0,0 +1,299 @@
+/* Build configuration used to build glibc, Info files, and locale
+   information.
+
+   Note that this derivation has multiple outputs and does not respect the
+   standard convention of putting the executables into the first output. The
+   first output is `lib` so that the libraries provided by this derivation
+   can be accessed directly, e.g.
+
+     "${pkgs.glibc}/lib/ld-linux-x86_64.so.2"
+
+   The executables are put into `bin` output and need to be referenced via
+   the `bin` attribute of the main package, e.g.
+
+     "${pkgs.glibc.bin}/bin/ldd".
+
+  The executables provided by glibc typically include `ldd`, `locale`, `iconv`
+  but the exact set depends on the library version and the configuration.
+*/
+
+# Note: this package is used for bootstrapping fetchurl, and thus
+# cannot use fetchpatch! All mutable patches (generated by GitHub or
+# cgit) that are needed here should be included directly in Nixpkgs as
+# files.
+
+{ stdenv, lib
+, buildPackages
+, fetchurl
+, linuxHeaders ? null
+, gd ? null, libpng ? null
+, libidn2
+, bison
+, python3Minimal
+}:
+
+{ pname
+, withLinuxHeaders ? false
+, profilingLibraries ? false
+, withGd ? false
+, withLibcrypt ? false
+, extraBuildInputs ? []
+, extraNativeBuildInputs ? []
+, ...
+} @ args:
+
+let
+  version = "2.38";
+  patchSuffix = "-44";
+  sha256 = "sha256-+4KZiZiyspllRnvBtp0VLpwwfSzzAcnq+0VVt3DvP9I=";
+in
+
+assert withLinuxHeaders -> linuxHeaders != null;
+assert withGd -> gd != null && libpng != null;
+
+stdenv.mkDerivation ({
+  version = version + patchSuffix;
+
+  enableParallelBuilding = true;
+
+  patches =
+    [
+      /* No tarballs for stable upstream branch, only https://sourceware.org/git/glibc.git and using git would complicate bootstrapping.
+          $ git fetch --all -p && git checkout origin/release/2.38/master && git describe
+          glibc-2.38-44-gd37c2b20a4
+          $ git show --minimal --reverse glibc-2.38.. | gzip -9n --rsyncable - > 2.38-master.patch.gz
+
+         To compare the archive contents zdiff can be used.
+          $ zdiff -u 2.38-master.patch.gz ../nixpkgs/pkgs/development/libraries/glibc/2.38-master.patch.gz
+       */
+      ./2.38-master.patch.gz
+
+      /* Allow NixOS and Nix to handle the locale-archive. */
+      ./nix-locale-archive.patch
+
+      /* Don't use /etc/ld.so.cache, for non-NixOS systems.  */
+      ./dont-use-system-ld-so-cache.patch
+
+      /* Don't use /etc/ld.so.preload, but /etc/ld-nix.so.preload.  */
+      ./dont-use-system-ld-so-preload.patch
+
+      /* The command "getconf CS_PATH" returns the default search path
+         "/bin:/usr/bin", which is inappropriate on NixOS machines. This
+         patch extends the search path by "/run/current-system/sw/bin". */
+      ./fix_path_attribute_in_getconf.patch
+
+      ./fix-x64-abi.patch
+
+      /* https://github.com/NixOS/nixpkgs/pull/137601 */
+      ./nix-nss-open-files.patch
+
+      ./0001-Revert-Remove-all-usage-of-BASH-or-BASH-in-installed.patch
+
+      /* Patch derived from archlinux,
+         https://gitlab.archlinux.org/archlinux/packaging/packages/glibc/-/blob/e54d98e2d1aae4930ecad9404ef12234922d9dfd/reenable_DT_HASH.patch
+
+         See also https://github.com/ValveSoftware/Proton/issues/6051
+         & https://github.com/NixOS/nixpkgs/pull/188492#issuecomment-1233802991
+      */
+      ./reenable_DT_HASH.patch
+
+      /* Retrieved from https://salsa.debian.org/glibc-team/glibc/-/commit/662dbc4f9287139a0d9c91df328a5ba6cc6abee1#0f3c6d67cb8cf5bb35c421c20f828fea97b68edf
+         Qualys advisory: https://www.qualys.com/2024/01/30/qsort.txt
+       */
+      ./local-qsort-memory-corruption.patch
+    ]
+    /* NVCC does not support ARM intrinsics. Since <math.h> is pulled in by almost
+       every HPC piece of software, without this patch CUDA compilation on ARM
+       is effectively broken. See
+       https://forums.developer.nvidia.com/t/nvcc-fails-to-build-with-arm-neon-instructions-cpp-vs-cu/248355/2.
+    */
+    ++ (
+      let
+        isAarch64 = stdenv.buildPlatform.isAarch64 || stdenv.hostPlatform.isAarch64;
+        isLinux = stdenv.buildPlatform.isLinux || stdenv.hostPlatform.isLinux;
+      in
+      lib.optional (isAarch64 && isLinux) ./0001-aarch64-math-vector.h-add-NVCC-include-guard.patch
+    )
+    ++ lib.optional stdenv.hostPlatform.isMusl ./fix-rpc-types-musl-conflicts.patch
+    ++ lib.optional stdenv.buildPlatform.isDarwin ./darwin-cross-build.patch;
+
+  postPatch =
+    ''
+      # Needed for glibc to build with the gnumake 3.82
+      # http://comments.gmane.org/gmane.linux.lfs.support/31227
+      sed -i 's/ot \$/ot:\n\ttouch $@\n$/' manual/Makefile
+
+      # nscd needs libgcc, and we don't want it dynamically linked
+      # because we don't want it to depend on bootstrap-tools libs.
+      echo "LDFLAGS-nscd += -static-libgcc" >> nscd/Makefile
+
+      # Ensure that `__nss_files_fopen` can still be wrapped by `libredirect`.
+      sed -i -e '/libc_hidden_def (__nss_files_fopen)/d' nss/nss_files_fopen.c
+      sed -i -e '/libc_hidden_proto (__nss_files_fopen)/d' include/nss_files.h
+    ''
+    # FIXME: find a solution for infinite recursion in cross builds.
+    # For now it's hopefully acceptable that IDN from libc doesn't reliably work.
+    + lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
+
+      # Ensure that libidn2 is found.
+      patch -p 1 <<EOF
+      --- a/inet/idna.c
+      +++ b/inet/idna.c
+      @@ -25,1 +25,1 @@
+      -#define LIBIDN2_SONAME "libidn2.so.0"
+      +#define LIBIDN2_SONAME "${lib.getLib libidn2}/lib/libidn2.so.0"
+      EOF
+    '';
+
+  configureFlags =
+    [ "-C"
+      "--enable-add-ons"
+      "--sysconfdir=/etc"
+      "--enable-stack-protector=strong"
+      "--enable-bind-now"
+      (lib.withFeatureAs withLinuxHeaders "headers" "${linuxHeaders}/include")
+      (lib.enableFeature profilingLibraries "profile")
+      "--enable-fortify-source"
+    ] ++ lib.optionals (stdenv.hostPlatform.isx86 || stdenv.hostPlatform.isAarch64) [
+      # This feature is currently supported on
+      # i386, x86_64 and x32 with binutils 2.29 or later,
+      # and on aarch64 with binutils 2.30 or later.
+      # https://sourceware.org/glibc/wiki/PortStatus
+      "--enable-static-pie"
+    ] ++ lib.optionals stdenv.hostPlatform.isx86_64 [
+      # Enable Intel Control-flow Enforcement Technology (CET) support
+      "--enable-cet"
+    ] ++ lib.optionals withLinuxHeaders [
+      "--enable-kernel=3.10.0" # RHEL 7 and derivatives, seems oldest still supported kernel
+    ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+      (lib.flip lib.withFeature "fp"
+         (stdenv.hostPlatform.gcc.float or (stdenv.hostPlatform.parsed.abi.float or "hard") == "soft"))
+      "--with-__thread"
+    ] ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform && stdenv.hostPlatform.isAarch32) [
+      "--host=arm-linux-gnueabi"
+      "--build=arm-linux-gnueabi"
+
+      # To avoid linking with -lgcc_s (dynamic link)
+      # so the glibc does not depend on its compiler store path
+      "libc_cv_as_needed=no"
+    ]
+    ++ lib.optional withGd "--with-gd"
+    ++ lib.optional withLibcrypt "--enable-crypt";
+
+  makeFlags = (args.makeFlags or []) ++ [
+    "OBJCOPY=${stdenv.cc.targetPrefix}objcopy"
+  ];
+
+  postInstall = (args.postInstall or "") + ''
+    moveToOutput bin/getent $getent
+  '';
+
+  installFlags = [ "sysconfdir=$(out)/etc" ];
+
+  # out as the first output is an exception exclusive to glibc
+
+  # getent is its own output, not kept in bin, since many things
+  # depend on getent but not on the locale generation tools in the bin
+  # output. This saves a couple of megabytes of closure size in many cases.
+  outputs = [ "out" "bin" "dev" "static" "getent" ];
+
+  strictDeps = true;
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+  nativeBuildInputs = [ bison python3Minimal ] ++ extraNativeBuildInputs;
+  buildInputs = [ linuxHeaders ] ++ lib.optionals withGd [ gd libpng ] ++ extraBuildInputs;
+
+  env = {
+    linuxHeaders = lib.optionalString withLinuxHeaders linuxHeaders;
+    inherit (stdenv) is64bit;
+    # Needed to install share/zoneinfo/zone.tab.  Set to impure /bin/sh to
+    # prevent a retained dependency on the bootstrap tools in the stdenv-linux
+    # bootstrap.
+    BASH_SHELL = "/bin/sh";
+  };
+
+  # Used by libgcc, elf-header, and others to determine ABI
+  passthru = { inherit version; minorRelease = version; };
+}
+
+// (removeAttrs args [ "withLinuxHeaders" "withGd" "postInstall" "makeFlags" ]) //
+
+{
+  src = fetchurl {
+    url = "mirror://gnu/glibc/glibc-${version}.tar.xz";
+    inherit sha256;
+  };
+
+  # Remove absolute paths from `configure' & co.; build out-of-tree.
+  preConfigure = ''
+    export PWD_P=$(type -tP pwd)
+    for i in configure io/ftwtest-sh; do
+        # Can't use substituteInPlace here because replace hasn't been
+        # built yet in the bootstrap.
+        sed -i "$i" -e "s^/bin/pwd^$PWD_P^g"
+    done
+
+    mkdir ../build
+    cd ../build
+
+    configureScript="`pwd`/../$sourceRoot/configure"
+
+    ${lib.optionalString (stdenv.cc.libc != null)
+      ''makeFlags="$makeFlags BUILD_LDFLAGS=-Wl,-rpath,${stdenv.cc.libc}/lib OBJDUMP=${stdenv.cc.bintools.bintools}/bin/objdump"''
+    }
+
+
+  '' + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
+    sed -i s/-lgcc_eh//g "../$sourceRoot/Makeconfig"
+
+    cat > config.cache << "EOF"
+    libc_cv_forced_unwind=yes
+    libc_cv_c_cleanup=yes
+    libc_cv_gnu89_inline=yes
+    EOF
+
+    # ./configure has logic like
+    #
+    #     AR=`$CC -print-prog-name=ar`
+    #
+    # This searches various directories in the gcc and its wrapper. In nixpkgs,
+    # this returns the bare string "ar", which is build ar. This can result as
+    # a build failure with the following message:
+    #
+    #     libc_pic.a: error adding symbols: archive has no index; run ranlib to add one
+    #
+    # (Observed cross compiling from aarch64-linux -> armv7l-linux).
+    #
+    # Nixpkgs passes a correct value for AR and friends, so to use the correct
+    # set of tools, we only need to delete this special handling.
+    sed -i \
+      -e '/^AR=/d' \
+      -e '/^AS=/d' \
+      -e '/^LD=/d' \
+      -e '/^OBJCOPY=/d' \
+      -e '/^OBJDUMP=/d' \
+      $configureScript
+  '';
+
+  preBuild = lib.optionalString withGd "unset NIX_DONT_SET_RPATH";
+
+  doCheck = false; # fails
+
+  meta = with lib; {
+    homepage = "https://www.gnu.org/software/libc/";
+    description = "The GNU C Library";
+
+    longDescription =
+      '' Any Unix-like operating system needs a C library: the library which
+         defines the "system calls" and other basic facilities such as
+         open, malloc, printf, exit...
+
+         The GNU C library is used as the C library in the GNU system and
+         most systems with the Linux kernel.
+      '';
+
+    license = licenses.lgpl2Plus;
+
+    maintainers = with maintainers; [ eelco ma27 connorbaker ];
+    platforms = platforms.linux;
+  } // (args.meta or {});
+})
diff --git a/nixpkgs/pkgs/development/libraries/glibc/darwin-cross-build.patch b/nixpkgs/pkgs/development/libraries/glibc/darwin-cross-build.patch
new file mode 100644
index 000000000000..b746e6369a07
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glibc/darwin-cross-build.patch
@@ -0,0 +1,77 @@
+enable cross-compilation of glibc on Darwin (build=Darwin, host=Linux)
+* increase ulimit for open files: macOS default of 256 is too low for glibc build system
+* use host version of ar, which is given by environment variable
+* build system uses stamp.os and stamp.oS files, which only differ in case;
+  this fails on macOS, so replace .oS with .o_S
+--- glibc-2.32/Makefile.in	2018-02-01 17:17:18.000000000 +0100
++++ glibc-2.32/Makefile.in	2020-12-27 18:21:30.000000000 +0100
+@@ -6,9 +6,11 @@
+ .PHONY: all install bench
+ 
+ all .DEFAULT:
+-	$(MAKE) -r PARALLELMFLAGS="$(PARALLELMFLAGS)" -C $(srcdir) objdir=`pwd` $@
++	ulimit -n 1024; \
++	$(MAKE) -r AR=$$AR PARALLELMFLAGS="$(PARALLELMFLAGS)" -C $(srcdir) objdir=`pwd` $@
+ 
+ install:
++	ulimit -n 1024; \
+ 	LC_ALL=C; export LC_ALL; \
+ 	$(MAKE) -r PARALLELMFLAGS="$(PARALLELMFLAGS)" -C $(srcdir) objdir=`pwd` $@
+ 
+--- glibc-2.32/Makerules	2018-02-01 17:17:18.000000000 +0100
++++ glibc-2.32/Makerules	2020-12-27 18:21:30.000000000 +0100
+@@ -847,8 +847,8 @@
+ ifndef objects
+ 
+ # Create the stamp$o files to keep the parent makefile happy.
+-subdir_lib: $(foreach o,$(object-suffixes-for-libc),$(objpfx)stamp$o)
+-$(foreach o,$(object-suffixes-for-libc),$(objpfx)stamp$o):
++subdir_lib: $(foreach o,$(object-suffixes-for-libc),$(objpfx)stamp$(subst .oS,.o_S,$o))
++$(foreach o,$(object-suffixes-for-libc),$(objpfx)stamp$(subst .oS,.o_S,$o)):
+ 	$(make-target-directory)
+ 	rm -f $@; > $@
+ else
+@@ -859,7 +859,7 @@
+ # The parent will then actually add them all to the archive in the
+ # archive rule, below.
+ define o-iterator-doit
+-$(objpfx)stamp$o: $(o-objects); $$(do-stamp)
++$(objpfx)stamp$(subst .oS,.o_S,$o): $(o-objects); $$(do-stamp)
+ endef
+ define do-stamp
+ $(make-target-directory)
+@@ -875,14 +875,14 @@
+ # on the stamp files built above.
+ define o-iterator-doit
+ $(common-objpfx)$(patsubst %,$(libtype$o),c): \
+-		$(subdirs-stamp-o) $(common-objpfx)stamp$o; $$(do-makelib)
++		$(subdirs-stamp-o) $(common-objpfx)stamp$(subst .oS,.o_S,$o); $$(do-makelib)
+ endef
+ define do-makelib
+ cd $(common-objdir) && \
+ $(AR) $(CREATE_ARFLAGS) $(@F) `cat $(patsubst $(common-objpfx)%,%,$^)`
+ endef
+ subdirs-stamps := $(foreach d,$(subdirs),$(common-objpfx)$d/stamp%)
+-subdirs-stamp-o = $(subst %,$o,$(subdirs-stamps))
++subdirs-stamp-o = $(subst %,$(subst .oS,.o_S,$o),$(subdirs-stamps))
+ ifndef subdir
+ $(subdirs-stamps): subdir_lib;
+ endif
+@@ -893,7 +893,7 @@
+ # This makes all the object files.
+ .PHONY: objects objs libobjs extra-objs
+ objects objs: libobjs extra-objs
+-libobjs: $(foreach o,$(object-suffixes-for-libc),$(objpfx)stamp$o)
++libobjs: $(foreach o,$(object-suffixes-for-libc),$(objpfx)stamp$(subst .oS,.o_S,$o))
+ extra-objs: $(addprefix $(objpfx),$(extra-objs))
+ 
+ # Canned sequence for building an extra library archive.
+@@ -1499,7 +1499,7 @@
+ 	$(rmobjs)
+ define rmobjs
+ $(foreach o,$(object-suffixes-for-libc),
+--rm -f $(objpfx)stamp$o $(o-objects))
++-rm -f $(objpfx)stamp$(subst .oS,.o_S,$o) $(o-objects))
+ endef
+ 
+ # Also remove the dependencies and generated source files.
diff --git a/nixpkgs/pkgs/development/libraries/glibc/default.nix b/nixpkgs/pkgs/development/libraries/glibc/default.nix
new file mode 100644
index 000000000000..be3bee081e73
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glibc/default.nix
@@ -0,0 +1,187 @@
+{ lib, stdenv, callPackage
+, withLinuxHeaders ? true
+, profilingLibraries ? false
+, withGd ? false
+, withLibcrypt? false
+, pkgsBuildBuild
+, libgcc
+}:
+
+let
+  gdCflags = [
+    "-Wno-error=stringop-truncation"
+    "-Wno-error=missing-attributes"
+    "-Wno-error=array-bounds"
+  ];
+in
+
+(callPackage ./common.nix { inherit stdenv; } {
+  inherit withLinuxHeaders withGd profilingLibraries withLibcrypt;
+  pname = "glibc" + lib.optionalString withGd "-gd" + lib.optionalString (stdenv.cc.isGNU && libgcc==null) "-nolibgcc";
+}).overrideAttrs(previousAttrs: {
+
+    # Note:
+    # Things you write here override, and do not add to,
+    # the values in `common.nix`.
+    # (For example, if you define `patches = [...]` here, it will
+    # override the patches in `common.nix` -- so instead you should
+    # write `patches = (previousAttrs.patches or []) ++ [ ... ]`.
+
+    NIX_NO_SELF_RPATH = true;
+
+    postConfigure = ''
+      # Hack: get rid of the `-static' flag set by the bootstrap stdenv.
+      # This has to be done *after* `configure' because it builds some
+      # test binaries.
+      export NIX_CFLAGS_LINK=
+      export NIX_LDFLAGS_BEFORE=
+
+      export NIX_DONT_SET_RPATH=1
+      unset CFLAGS
+
+      # Apparently --bindir is not respected.
+      makeFlagsArray+=("bindir=$bin/bin" "sbindir=$bin/sbin" "rootsbindir=$bin/sbin")
+    '' + lib.optionalString stdenv.buildPlatform.isDarwin ''
+      # ld-wrapper will otherwise attempt to inject CoreFoundation into ld-linux's RUNPATH
+      export NIX_COREFOUNDATION_RPATH=
+    '';
+
+    # The pie, stackprotector and fortify hardening flags are autodetected by
+    # glibc and enabled by default if supported. Setting it for every gcc
+    # invocation does not work.
+    hardeningDisable = [ "fortify" "pie" "stackprotector" ];
+
+    env = (previousAttrs.env or { }) // {
+      NIX_CFLAGS_COMPILE = (previousAttrs.env.NIX_CFLAGS_COMPILE or "") + lib.concatStringsSep " "
+        (builtins.concatLists [
+          (lib.optionals withGd gdCflags)
+          # Fix -Werror build failure when building glibc with musl with GCC >= 8, see:
+          # https://github.com/NixOS/nixpkgs/pull/68244#issuecomment-544307798
+          (lib.optional stdenv.hostPlatform.isMusl "-Wno-error=attribute-alias")
+          (lib.optionals ((stdenv.hostPlatform != stdenv.buildPlatform) || stdenv.hostPlatform.isMusl) [
+            # Ignore "error: '__EI___errno_location' specifies less restrictive attributes than its target '__errno_location'"
+            # New warning as of GCC 9
+            # Same for musl: https://github.com/NixOS/nixpkgs/issues/78805
+            "-Wno-error=missing-attributes"
+          ])
+          (lib.optionals (stdenv.hostPlatform.isPower64) [
+            # Do not complain about the Processor Specific ABI (i.e. the
+            # choice to use IEEE-standard `long double`).  We pass this
+            # flag in order to mute a `-Werror=psabi` passed by glibc;
+            # hopefully future glibc releases will not pass that flag.
+            "-Wno-error=psabi"
+          ])
+        ]);
+    };
+
+    # glibc needs to `dlopen()` `libgcc_s.so` but does not link
+    # against it.  Furthermore, glibc doesn't use the ordinary
+    # `dlopen()` call to do this; instead it uses one which ignores
+    # most paths:
+    #
+    #   https://sourceware.org/legacy-ml/libc-help/2013-11/msg00026.html
+    #
+    # In order to get it to not ignore `libgcc_s.so`, we have to add its path to
+    # `user-defined-trusted-dirs`:
+    #
+    #   https://sourceware.org/git/?p=glibc.git;a=blob;f=elf/Makefile;h=b509b3eada1fb77bf81e2a0ca5740b94ad185764#l1355
+    #
+    # Conveniently, this will also inform Nix of the fact that glibc depends on
+    # gcc.libgcc, since the path will be embedded in the resulting binary.
+    #
+    makeFlags =
+      (previousAttrs.makeFlags or [])
+      ++ lib.optionals (libgcc != null) [
+        "user-defined-trusted-dirs=${libgcc}/lib"
+      ];
+
+    postInstall = previousAttrs.postInstall + (if stdenv.buildPlatform.canExecute stdenv.hostPlatform then ''
+      echo SUPPORTED-LOCALES=C.UTF-8/UTF-8 > ../glibc-2*/localedata/SUPPORTED
+      make -j''${NIX_BUILD_CORES:-1} localedata/install-locales
+    '' else lib.optionalString stdenv.buildPlatform.isLinux
+      # This is based on http://www.linuxfromscratch.org/lfs/view/development/chapter06/glibc.html
+      # Instead of using their patch to build a build-native localedef,
+      # we simply use the one from pkgsBuildBuild.
+      #
+      # Note that we can't use pkgsBuildHost (aka buildPackages) here, because
+      # that will cause an eval-time infinite recursion: "buildPackages.glibc
+      # depended on buildPackages.libgcc, which, since it's GCC, depends on the
+      # target's bintools, which depend on the target's glibc, which, again,
+      # depends on buildPackages.glibc, causing an infinute recursion when
+      # evaluating buildPackages.glibc when glibc hasn't come from stdenv
+      # (e.g. on musl)." https://github.com/NixOS/nixpkgs/pull/259964
+    ''
+      pushd ../glibc-2*/localedata
+      export I18NPATH=$PWD GCONV_PATH=$PWD/../iconvdata
+      mkdir -p $NIX_BUILD_TOP/${pkgsBuildBuild.glibc}/lib/locale
+      ${lib.getBin pkgsBuildBuild.glibc}/bin/localedef \
+        --alias-file=../intl/locale.alias \
+        -i locales/C \
+        -f charmaps/UTF-8 \
+        --prefix $NIX_BUILD_TOP \
+        ${if stdenv.hostPlatform.parsed.cpu.significantByte.name == "littleEndian" then
+            "--little-endian"
+          else
+            "--big-endian"} \
+        C.UTF-8
+      cp -r $NIX_BUILD_TOP/${pkgsBuildBuild.glibc}/lib/locale $out/lib
+      popd
+    '') + ''
+
+      test -f $out/etc/ld.so.cache && rm $out/etc/ld.so.cache
+
+      if test -n "$linuxHeaders"; then
+          # Include the Linux kernel headers in Glibc, except the `scsi'
+          # subdirectory, which Glibc provides itself.
+          (cd $dev/include && \
+           ln -sv $(ls -d $linuxHeaders/include/* | grep -v scsi\$) .)
+      fi
+
+      # Fix for NIXOS-54 (ldd not working on x86_64).  Make a symlink
+      # "lib64" to "lib".
+      if test -n "$is64bit"; then
+          ln -s lib $out/lib64
+      fi
+
+      # Get rid of more unnecessary stuff.
+      rm -rf $out/var $bin/bin/sln
+
+      # Backwards-compatibility to fix e.g.
+      # "configure: error: Pthreads are required to build libgomp" during `gcc`-build
+      # because it's not actually needed anymore to link against `pthreads` since
+      # it's now part of `libc.so.6` itself, but the gcc build breaks if
+      # this doesn't work.
+      ln -sf $out/lib/libpthread.so.0 $out/lib/libpthread.so
+      ln -sf $out/lib/librt.so.1 $out/lib/librt.so
+      ln -sf $out/lib/libdl.so.2 $out/lib/libdl.so
+      test -f $out/lib/libutil.so.1 && ln -sf $out/lib/libutil.so.1 $out/lib/libutil.so
+      touch $out/lib/libpthread.a
+
+      # Put libraries for static linking in a separate output.  Note
+      # that libc_nonshared.a and libpthread_nonshared.a are required
+      # for dynamically-linked applications.
+      mkdir -p $static/lib
+      mv $out/lib/*.a $static/lib
+      mv $static/lib/lib*_nonshared.a $out/lib
+      # If libutil.so.1 is missing, libutil.a is required.
+      test -f $out/lib/libutil.so.1 || mv $static/lib/libutil.a $out/lib
+      # Some of *.a files are linker scripts where moving broke the paths.
+      sed "/^GROUP/s|$out/lib/lib|$static/lib/lib|g" \
+        -i "$static"/lib/*.a
+
+      # Work around a Nix bug: hard links across outputs cause a build failure.
+      cp $bin/bin/getconf $bin/bin/getconf_
+      mv $bin/bin/getconf_ $bin/bin/getconf
+    '';
+
+    separateDebugInfo = true;
+
+    passthru =
+      (previousAttrs.passthru or {})
+      // lib.optionalAttrs (libgcc != null) {
+        inherit libgcc;
+      };
+
+  meta = (previousAttrs.meta or {}) // { description = "The GNU C Library"; };
+})
+
diff --git a/nixpkgs/pkgs/development/libraries/glibc/dont-use-system-ld-so-cache.patch b/nixpkgs/pkgs/development/libraries/glibc/dont-use-system-ld-so-cache.patch
new file mode 100644
index 000000000000..0e0315aca270
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glibc/dont-use-system-ld-so-cache.patch
@@ -0,0 +1,64 @@
+diff --git a/elf/Makefile b/elf/Makefile
+index 5d666b1b..a5017e9c 100644
+--- a/elf/Makefile
++++ b/elf/Makefile
+@@ -669,14 +669,14 @@ $(objpfx)sln: $(sln-modules:%=$(objpfx)%.o)
+ 
+ $(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o)
+ 
+-SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"'
+-CFLAGS-ldconfig.c += $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \
++PREFIX-FLAGS := -D'PREFIX="$(prefix)"'
++CFLAGS-ldconfig.c += $(PREFIX-FLAGS) -D'LIBDIR="$(libdir)"' \
+ 		    -D'SLIBDIR="$(slibdir)"'
+ libof-ldconfig = ldconfig
+-CFLAGS-dl-cache.c += $(SYSCONF-FLAGS)
+-CFLAGS-cache.c += $(SYSCONF-FLAGS)
+-CFLAGS-rtld.c += $(SYSCONF-FLAGS)
+-CFLAGS-dl-usage.c += $(SYSCONF-FLAGS) \
++CFLAGS-dl-cache.c += $(PREFIX-FLAGS)
++CFLAGS-cache.c += $(PREFIX-FLAGS)
++CFLAGS-rtld.c += $(PREFIX-FLAGS)
++CFLAGS-dl-usage.c += $(PREFIX-FLAGS) \
+   -D'RTLD="$(rtlddir)/$(rtld-installed-name)"'
+ 
+ cpp-srcs-left := $(all-rtld-routines:=.os)
+diff --git a/elf/dl-diagnostics.c b/elf/dl-diagnostics.c
+index bef224b3..8e166b12 100644
+--- a/elf/dl-diagnostics.c
++++ b/elf/dl-diagnostics.c
+@@ -205,7 +205,7 @@ print_paths (void)
+ {
+   _dl_diagnostics_print_labeled_string ("path.prefix", PREFIX);
+   _dl_diagnostics_print_labeled_string ("path.rtld", RTLD);
+-  _dl_diagnostics_print_labeled_string ("path.sysconfdir", SYSCONFDIR);
++  _dl_diagnostics_print_labeled_string ("path.sysconfdir", PREFIX "/etc");
+
+   unsigned int index = 0;
+   static const char *system_dirs = SYSTEM_DIRS "\0";
+diff --git a/elf/ldconfig.c b/elf/ldconfig.c
+index 28ed637a..6f07b79a 100644
+--- a/elf/ldconfig.c
++++ b/elf/ldconfig.c
+@@ -57,7 +57,7 @@
+ #define TLS_HWCAP_BIT 63
+ 
+ #ifndef LD_SO_CONF
+-# define LD_SO_CONF SYSCONFDIR "/ld.so.conf"
++# define LD_SO_CONF PREFIX "/etc/ld.so.conf"
+ #endif
+ 
+ /* Get libc version number.  */
+diff --git a/sysdeps/generic/dl-cache.h b/sysdeps/generic/dl-cache.h
+index 964d50a4..2224d651 100644
+--- a/sysdeps/generic/dl-cache.h
++++ b/sysdeps/generic/dl-cache.h
+@@ -35,7 +35,7 @@
+ #endif
+ 
+ #ifndef LD_SO_CACHE
+-# define LD_SO_CACHE SYSCONFDIR "/ld.so.cache"
++# define LD_SO_CACHE PREFIX "/etc/ld.so.cache"
+ #endif
+ 
+ #ifndef add_system_dir
diff --git a/nixpkgs/pkgs/development/libraries/glibc/dont-use-system-ld-so-preload.patch b/nixpkgs/pkgs/development/libraries/glibc/dont-use-system-ld-so-preload.patch
new file mode 100644
index 000000000000..894e2a11cf87
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glibc/dont-use-system-ld-so-preload.patch
@@ -0,0 +1,12 @@
+diff -ru glibc-2.20-orig/elf/rtld.c glibc-2.20/elf/rtld.c
+--- glibc-2.20-orig/elf/rtld.c	2014-09-07 10:09:09.000000000 +0200
++++ glibc-2.20/elf/rtld.c	2014-10-27 11:32:25.203043157 +0100
+@@ -1513,7 +1513,7 @@
+      open().  So we do this first.  If it succeeds we do almost twice
+      the work but this does not matter, since it is not for production
+      use.  */
+-  static const char preload_file[] = "/etc/ld.so.preload";
++  static const char preload_file[] = "/etc/ld-nix.so.preload";
+   if (__glibc_unlikely (__access (preload_file, R_OK) == 0))
+     {
+       /* Read the contents of the file.  */
diff --git a/nixpkgs/pkgs/development/libraries/glibc/fix-rpc-types-musl-conflicts.patch b/nixpkgs/pkgs/development/libraries/glibc/fix-rpc-types-musl-conflicts.patch
new file mode 100644
index 000000000000..19f8bfc7cce8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glibc/fix-rpc-types-musl-conflicts.patch
@@ -0,0 +1,38 @@
+@@ -, +, @@ 
+---
+ sunrpc/rpc/types.h | 22 ++++++----------------
+ 1 file changed, 6 insertions(+), 16 deletions(-)
+--- a/sunrpc/rpc/types.h	
++++ a/sunrpc/rpc/types.h	
+@@ -69,24 +69,14 @@ typedef unsigned long rpcport_t;
+ #include <sys/types.h>
+ #endif
+ 
+-#if defined __APPLE_CC__ || defined __FreeBSD__
+-# define __u_char_defined
+-# define __daddr_t_defined
+-#endif
+-
+-#ifndef __u_char_defined
+-typedef __u_char u_char;
+-typedef __u_short u_short;
+-typedef __u_int u_int;
+-typedef __u_long u_long;
+-typedef __quad_t quad_t;
+-typedef __u_quad_t u_quad_t;
+-typedef __fsid_t fsid_t;
++/* IMPORTANT NOTE: This has been modified to build against the musl C
++ * library and it probably now ONLY builds with the musl C library.
++ *
++ * See: https://sourceware.org/bugzilla/show_bug.cgi?id=21604
++ */
+ # define __u_char_defined
+-#endif
+ #ifndef __daddr_t_defined
+-typedef __daddr_t daddr_t;
+-typedef __caddr_t caddr_t;
++typedef int daddr_t;
+ # define __daddr_t_defined
+ #endif
+ 
+-- 
diff --git a/nixpkgs/pkgs/development/libraries/glibc/fix-x64-abi.patch b/nixpkgs/pkgs/development/libraries/glibc/fix-x64-abi.patch
new file mode 100644
index 000000000000..1d60dcd7988b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glibc/fix-x64-abi.patch
@@ -0,0 +1,35 @@
+From 3288c6da64add3b4561b8c10fff522027caea01c Mon Sep 17 00:00:00 2001
+From: Nicholas Miell <nmiell@gmail.com>
+Date: Sat, 17 Jun 2017 18:21:07 -0700
+Subject: [PATCH] Align the stack on entry to __tls_get_addr()
+
+Old versions of gcc (4 & 5) didn't align the stack according to the
+AMD64 psABI when calling __tls_get_addr(). Apparently new versions of
+gcc (7) got much more aggressive about vectorizing and generating MOVAPS
+instructions, which means old binaries built with the buggy versions of
+gcc are much more likely to crash when using versions of glibc built
+using gcc 7.
+
+For example, a large number of Linux games built using the Unity game
+engine and available for purchase on Steam.
+---
+ elf/dl-tls.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/elf/dl-tls.c b/elf/dl-tls.c
+index 5aba33b3fa..3f3cb917de 100644
+--- a/elf/dl-tls.c
++++ b/elf/dl-tls.c
+@@ -827,6 +827,10 @@ rtld_hidden_proto (__tls_get_addr)
+ rtld_hidden_def (__tls_get_addr)
+ #endif
+
++#ifdef __x86_64__
++/* Old versions of gcc didn't align the stack. */
++__attribute__((force_align_arg_pointer))
++#endif
+ /* The generic dynamic and local dynamic model cannot be used in
+    statically linked applications.  */
+ void *
+--
+2.13.0
diff --git a/nixpkgs/pkgs/development/libraries/glibc/fix_path_attribute_in_getconf.patch b/nixpkgs/pkgs/development/libraries/glibc/fix_path_attribute_in_getconf.patch
new file mode 100644
index 000000000000..714e49db5607
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glibc/fix_path_attribute_in_getconf.patch
@@ -0,0 +1,6 @@
+diff -ubr glibc-2.17-orig/sysdeps/unix/confstr.h glibc-2.17/sysdeps/unix/confstr.h
+--- glibc-2.17-orig/sysdeps/unix/confstr.h	2013-06-03 22:01:44.829726968 +0200
++++ glibc-2.17/sysdeps/unix/confstr.h	2013-06-03 22:04:39.469376740 +0200
+@@ -1 +1 @@
+-#define	CS_PATH	"/bin:/usr/bin"
++#define	CS_PATH	"/run/current-system/sw/bin:/bin:/usr/bin"
diff --git a/nixpkgs/pkgs/development/libraries/glibc/info.nix b/nixpkgs/pkgs/development/libraries/glibc/info.nix
new file mode 100644
index 000000000000..d643d8a6ba09
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glibc/info.nix
@@ -0,0 +1,23 @@
+{ callPackage, texinfo, perl }:
+
+callPackage ./common.nix {} {
+  pname = "glibc-info";
+
+  outputs = [ "out" ];
+
+  configureFlags = [ "--enable-add-ons" ];
+
+  extraNativeBuildInputs = [ texinfo perl ];
+
+  makeFlags = [ "info" ];
+
+  # I don't know why the info is not generated in 'build'
+  # Somehow building the info still does not work, because the final
+  # libc.info hasn't a Top node.
+  installPhase = ''
+    mkdir -p "$out/share/info"
+    cp -v "manual/"*.info* "$out/share/info"
+  '';
+
+  meta.description = "GNU Info manual of the GNU C Library";
+}
diff --git a/nixpkgs/pkgs/development/libraries/glibc/local-qsort-memory-corruption.patch b/nixpkgs/pkgs/development/libraries/glibc/local-qsort-memory-corruption.patch
new file mode 100644
index 000000000000..f7e25c72a61c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glibc/local-qsort-memory-corruption.patch
@@ -0,0 +1,14 @@
+diff -rup a/stdlib/qsort.c b/stdlib/qsort.c
+--- a/stdlib/qsort.c	2023-07-31 10:54:16.000000000 -0700
++++ b/stdlib/qsort.c	2024-01-15 09:08:25.596167959 -0800
+@@ -224,7 +224,8 @@ _quicksort (void *const pbase, size_t to
+     while ((run_ptr += size) <= end_ptr)
+       {
+ 	tmp_ptr = run_ptr - size;
+-	while ((*cmp) ((void *) run_ptr, (void *) tmp_ptr, arg) < 0)
++	while (tmp_ptr != base_ptr
++	       && (*cmp) ((void *) run_ptr, (void *) tmp_ptr, arg) < 0)
+ 	  tmp_ptr -= size;
+ 
+ 	tmp_ptr += size;
+
diff --git a/nixpkgs/pkgs/development/libraries/glibc/locales-builder.sh b/nixpkgs/pkgs/development/libraries/glibc/locales-builder.sh
new file mode 100644
index 000000000000..27894b09b91c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glibc/locales-builder.sh
@@ -0,0 +1,18 @@
+if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
+# Glibc cannot have itself in its RPATH.
+export NIX_NO_SELF_RPATH=1
+
+source $stdenv/setup
+
+postConfigure() {
+    # Hack: get rid of the `-static' flag set by the bootstrap stdenv.
+    # This has to be done *after* `configure' because it builds some
+    # test binaries.
+    export NIX_CFLAGS_LINK=
+    export NIX_LDFLAGS_BEFORE=
+
+    export NIX_DONT_SET_RPATH=1
+    unset CFLAGS
+}
+
+genericBuild
diff --git a/nixpkgs/pkgs/development/libraries/glibc/locales.nix b/nixpkgs/pkgs/development/libraries/glibc/locales.nix
new file mode 100644
index 000000000000..eddeb5e3ec4b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glibc/locales.nix
@@ -0,0 +1,86 @@
+/* This function builds just the `lib/locale/locale-archive' file from
+   Glibc and nothing else.  If `allLocales' is true, all supported
+   locales are included; otherwise, just the locales listed in
+   `locales'.  See localedata/SUPPORTED in the Glibc source tree for
+   the list of all supported locales:
+   https://sourceware.org/git/?p=glibc.git;a=blob;f=localedata/SUPPORTED
+*/
+
+{ lib, stdenv, buildPackages, callPackage, writeText, glibc
+, allLocales ? true, locales ? [ "en_US.UTF-8/UTF-8" ]
+}:
+
+(callPackage ./common.nix { inherit stdenv; } {
+  pname = "glibc-locales";
+  extraNativeBuildInputs = [ glibc ];
+}).overrideAttrs(finalAttrs: previousAttrs: {
+
+  builder = ./locales-builder.sh;
+
+  outputs = [ "out" ];
+
+  LOCALEDEF_FLAGS = [
+    (if stdenv.hostPlatform.isLittleEndian
+    then "--little-endian"
+    else "--big-endian")
+  ];
+
+  preBuild = (previousAttrs.preBuild or "") + ''
+      # Awful hack: `localedef' doesn't allow the path to `locale-archive'
+      # to be overriden, but you *can* specify a prefix, i.e. it will use
+      # <prefix>/<path-to-glibc>/lib/locale/locale-archive.  So we use
+      # $TMPDIR as a prefix, meaning that the locale-archive is placed in
+      # $TMPDIR/nix/store/...-glibc-.../lib/locale/locale-archive.
+      LOCALEDEF_FLAGS+=" --prefix=$TMPDIR"
+
+      mkdir -p $TMPDIR/"${buildPackages.glibc.out}/lib/locale"
+
+      echo 'C.UTF-8/UTF-8 \' >> ../glibc-2*/localedata/SUPPORTED
+
+      # Hack to allow building of the locales (needed since glibc-2.12)
+      sed -i -e 's,^$(rtld-prefix) $(common-objpfx)locale/localedef,localedef $(LOCALEDEF_FLAGS),' ../glibc-2*/localedata/Makefile
+    ''
+      + lib.optionalString (!allLocales) ''
+      # Check that all locales to be built are supported
+      echo -n '${lib.concatMapStrings (s: s + " \\\n") locales}' \
+        | sort -u > locales-to-build.txt
+      cat ../glibc-2*/localedata/SUPPORTED | grep ' \\' \
+        | sort -u > locales-supported.txt
+      comm -13 locales-supported.txt locales-to-build.txt \
+        > locales-unsupported.txt
+      if [[ $(wc -c locales-unsupported.txt) != "0 locales-unsupported.txt" ]]; then
+        cat locales-supported.txt
+        echo "Error: unsupported locales detected:"
+        cat locales-unsupported.txt
+        echo "You should choose from the list above the error."
+        false
+      fi
+
+      echo SUPPORTED-LOCALES='${toString locales}' > ../glibc-2*/localedata/SUPPORTED
+    '';
+
+  # Current `nixpkgs` way of building locales is not compatible with
+  # parallel install. `locale-archive` is updated in parallel with
+  # multiple `localedef` processes and causes non-deterministic result:
+  #   https://github.com/NixOS/nixpkgs/issues/245360
+  enableParallelBuilding = false;
+
+  makeFlags = (previousAttrs.makeFlags or []) ++ [
+    "localedata/install-locales"
+    "localedir=${builtins.placeholder "out"}/lib/locale"
+  ];
+
+  installPhase =
+    ''
+      mkdir -p "$out/lib/locale" "$out/share/i18n"
+      cp -v "$TMPDIR/$NIX_STORE/"*"/lib/locale/locale-archive" "$out/lib/locale"
+      cp -v ../glibc-2*/localedata/SUPPORTED "$out/share/i18n/SUPPORTED"
+    '';
+
+  setupHook = writeText "locales-setup-hook.sh"
+    ''
+      export LOCALE_ARCHIVE=@out@/lib/locale/locale-archive
+    '';
+
+  meta.description = "Locale information for the GNU C Library";
+})
diff --git a/nixpkgs/pkgs/development/libraries/glibc/mtrace.nix b/nixpkgs/pkgs/development/libraries/glibc/mtrace.nix
new file mode 100644
index 000000000000..4dbcb19af2a4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glibc/mtrace.nix
@@ -0,0 +1,40 @@
+{ glibc, perl }:
+
+# Small wrapper which only exposes `mtrace(3)` from `glibc`. This can't be placed
+# into `glibc` itself because it depends on Perl which would mean that the final
+# `glibc` inside a stdenv bootstrap has a dependency `glibc -> perl -> bootstrap tools`,
+# so this is now in its own package that isn't used for bootstrapping.
+#
+# `glibc` needs to be overridden here because it's still needed to `./configure` the source in order
+# to have a build environment where we can call the needed make target.
+
+glibc.overrideAttrs (oldAttrs: {
+  pname = "glibc-mtrace";
+
+  buildPhase = ''
+    runHook preBuild
+
+    mkdir malloc
+    make -C ../glibc-${glibc.minorRelease}/malloc objdir=`pwd` `pwd`/malloc/mtrace;
+
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mv malloc/mtrace $out/bin/
+  '';
+
+  # Perl checked during configure
+  nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [ perl ];
+  # Perl shebang used for `mtrace`.
+  buildInputs = oldAttrs.buildInputs ++ [ perl ];
+
+  # Reset a few things declared by `pkgs.glibc`.
+  outputs = [ "out" ];
+  separateDebugInfo = false;
+
+  meta = oldAttrs.meta // {
+    description = "Perl script used to interpret and provide human readable output of the trace log contained in the file mtracedata, whose contents were produced by mtrace(3).";
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/glibc/multi.nix b/nixpkgs/pkgs/development/libraries/glibc/multi.nix
new file mode 100644
index 000000000000..5cd48958ec2c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glibc/multi.nix
@@ -0,0 +1,38 @@
+{ lib
+, runCommand, glibc, glibc32
+}:
+
+let
+  nameVersion = builtins.parseDrvName glibc.name;
+  glibc64 = glibc;
+in
+runCommand "${nameVersion.name}-multi-${nameVersion.version}"
+  # out as the first output is an exception exclusive to glibc
+  {
+    outputs = [ "out" "bin" "dev" ];  # TODO: no static version here (yet)
+    passthru = {
+      libgcc = lib.lists.filter (x: x!=null) [
+        (glibc64.libgcc or null)
+        (glibc32.libgcc or null)
+      ];
+    };
+  }
+  ''
+    mkdir -p "$out/lib"
+    ln -s '${glibc64.out}'/lib/* "$out/lib"
+    ln -s '${glibc32.out}/lib' "$out/lib/32"
+    ln -s lib "$out/lib64"
+
+    # fixing ldd RLTDLIST
+    mkdir -p "$bin/bin"
+    cp -s '${glibc64.bin}'/bin/* "$bin/bin/"
+    rm "$bin/bin/ldd"
+    sed -e "s|^RTLDLIST=.*$|RTLDLIST=\"$out/lib/ld-linux-x86-64.so.2 $out/lib/32/ld-linux.so.2\"|g" \
+        '${glibc64.bin}/bin/ldd' > "$bin/bin/ldd"
+    chmod +x "$bin/bin/ldd"
+
+    mkdir "$dev"
+    cp -rs '${glibc32.dev}'/include "$dev/"
+    chmod +w -R "$dev"
+    cp -rsf '${glibc64.dev}'/include "$dev/"
+  ''
diff --git a/nixpkgs/pkgs/development/libraries/glibc/nix-locale-archive.patch b/nixpkgs/pkgs/development/libraries/glibc/nix-locale-archive.patch
new file mode 100644
index 000000000000..2fedf2a7a7db
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glibc/nix-locale-archive.patch
@@ -0,0 +1,121 @@
+diff --git a/locale/loadarchive.c b/locale/loadarchive.c
+index 512769eaec..171dbb4ad9 100644
+--- a/locale/loadarchive.c
++++ b/locale/loadarchive.c
+@@ -123,6 +123,23 @@ calculate_head_size (const struct locarhead *h)
+   return MAX (namehash_end, MAX (string_end, locrectab_end));
+ }
+ 
++static int
++open_locale_archive (void)
++{
++  int fd = -1;
++  char *versioned_path = getenv ("LOCALE_ARCHIVE_2_27");
++  char *path = getenv ("LOCALE_ARCHIVE");
++  if (versioned_path)
++    fd = __open_nocancel (versioned_path, O_RDONLY|O_LARGEFILE|O_CLOEXEC);
++  if (path && fd < 0)
++    fd = __open_nocancel (path, O_RDONLY|O_LARGEFILE|O_CLOEXEC);
++  if (fd < 0)
++    fd = __open_nocancel (archfname, O_RDONLY|O_LARGEFILE|O_CLOEXEC);
++  if (fd < 0)
++    fd = __open_nocancel ("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE|O_CLOEXEC);
++  return fd;
++}
++
+ 
+ /* Find the locale *NAMEP in the locale archive, and return the
+    internalized data structure for its CATEGORY data.  If this locale has
+@@ -202,7 +219,7 @@ _nl_load_locale_from_archive (int category, const char **namep)
+       archmapped = &headmap;
+ 
+       /* The archive has never been opened.  */
+-      fd = __open_nocancel (archfname, O_RDONLY|O_LARGEFILE|O_CLOEXEC);
++      fd = open_locale_archive ();
+       if (fd < 0)
+ 	/* Cannot open the archive, for whatever reason.  */
+ 	return NULL;
+@@ -397,8 +414,7 @@ _nl_load_locale_from_archive (int category, const char **namep)
+ 	  if (fd == -1)
+ 	    {
+ 	      struct __stat64_t64 st;
+-	      fd = __open_nocancel (archfname,
+-				    O_RDONLY|O_LARGEFILE|O_CLOEXEC);
++	      fd = open_locale_archive();
+ 	      if (fd == -1)
+ 		/* Cannot open the archive, for whatever reason.  */
+ 		return NULL;
+diff --git a/locale/programs/locale.c b/locale/programs/locale.c
+index ca0a95be99..e484783402 100644
+--- a/locale/programs/locale.c
++++ b/locale/programs/locale.c
+@@ -633,6 +633,24 @@ nameentcmp (const void *a, const void *b)
+ }
+ 
+ 
++static int
++open_locale_archive (void)
++{
++  int fd = -1;
++  char *versioned_path = getenv ("LOCALE_ARCHIVE_2_27");
++  char *path = getenv ("LOCALE_ARCHIVE");
++  if (versioned_path)
++    fd = open64 (versioned_path, O_RDONLY);
++  if (path && fd < 0)
++    fd = open64 (path, O_RDONLY);
++  if (fd < 0)
++    fd = open64 (ARCHIVE_NAME, O_RDONLY);
++  if (fd < 0)
++    fd = open64 ("/usr/lib/locale/locale-archive", O_RDONLY);
++  return fd;
++}
++
++
+ static int
+ write_archive_locales (void **all_datap, char *linebuf)
+ {
+@@ -645,7 +663,7 @@ write_archive_locales (void **all_datap, char *linebuf)
+   int fd, ret = 0;
+   uint32_t cnt;
+ 
+-  fd = open64 (ARCHIVE_NAME, O_RDONLY);
++  fd = open_locale_archive ();
+   if (fd < 0)
+     return 0;
+ 
+diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c
+index f38e835c52..779a3199fc 100644
+--- a/locale/programs/locarchive.c
++++ b/locale/programs/locarchive.c
+@@ -117,6 +117,22 @@ prepare_address_space (int fd, size_t total, size_t *reserved, int *xflags,
+ }
+ 
+ 
++static int
++open_locale_archive (const char * archivefname, int flags)
++{
++  int fd = -1;
++  char *versioned_path = getenv ("LOCALE_ARCHIVE_2_27");
++  char *path = getenv ("LOCALE_ARCHIVE");
++  if (versioned_path)
++    fd = open64 (versioned_path, flags);
++  if (path && fd < 0)
++    fd = open64 (path, flags);
++  if (fd < 0)
++    fd = open64 (archivefname, flags);
++  return fd;
++}
++
++
+ static void
+ create_archive (const char *archivefname, struct locarhandle *ah)
+ {
+@@ -578,7 +594,7 @@ open_archive (struct locarhandle *ah, bool readonly)
+   while (1)
+     {
+       /* Open the archive.  We must have exclusive write access.  */
+-      fd = open64 (archivefname, readonly ? O_RDONLY : O_RDWR);
++      fd = open_locale_archive (archivefname, readonly ? O_RDONLY : O_RDWR);
+       if (fd == -1)
+ 	{
+ 	  /* Maybe the file does not yet exist? If we are opening
diff --git a/nixpkgs/pkgs/development/libraries/glibc/nix-nss-open-files.patch b/nixpkgs/pkgs/development/libraries/glibc/nix-nss-open-files.patch
new file mode 100644
index 000000000000..9a515c4662e2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glibc/nix-nss-open-files.patch
@@ -0,0 +1,51 @@
+diff --git a/nss/nss_files/files-XXX.c b/nss/nss_files/files-XXX.c
+index 1db9e46127..3a567e0224 100644
+--- a/nss/nss_files/files-XXX.c
++++ b/nss/nss_files/files-XXX.c
+@@ -75,8 +75,20 @@ internal_setent (FILE **stream)
+ 
+   if (*stream == NULL)
+     {
+-      *stream = __nss_files_fopen (DATAFILE);
+-
++      const char *file = DATAFILE;
++
++      #ifdef NIX_DATAFILE
++      // use the Nix environment variable such as `NIX_ETC_PROTOCOLS`
++      char *path = secure_getenv (NIX_DATAFILE);
++
++      // if the environment variable is set, then read from the /nix/store entry instead
++      if (path && path[0]) {
++        file = path;
++      }
++      #endif
++      
++      *stream = __nss_files_fopen (file);
++    
+       if (*stream == NULL)
+ 	status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
+     }
+diff --git a/nss/nss_files/files-proto.c b/nss/nss_files/files-proto.c
+index c30bedc0aa..b321e68d3c 100644
+--- a/nss/nss_files/files-proto.c
++++ b/nss/nss_files/files-proto.c
+@@ -23,6 +23,7 @@ NSS_DECLARE_MODULE_FUNCTIONS (files)
+ 
+ #define ENTNAME		protoent
+ #define DATABASE	"protocols"
++#define NIX_DATAFILE "NIX_ETC_PROTOCOLS"
+ 
+ struct protoent_data {};
+ 
+diff --git a/nss/nss_files/files-service.c b/nss/nss_files/files-service.c
+index bfc2590699..0bff36aee5 100644
+--- a/nss/nss_files/files-service.c
++++ b/nss/nss_files/files-service.c
+@@ -24,6 +24,7 @@ NSS_DECLARE_MODULE_FUNCTIONS (files)
+ 
+ #define ENTNAME		servent
+ #define DATABASE	"services"
++#define NIX_DATAFILE "NIX_ETC_SERVICES"
+ 
+ struct servent_data {};
+ 
diff --git a/nixpkgs/pkgs/development/libraries/glibc/reenable_DT_HASH.patch b/nixpkgs/pkgs/development/libraries/glibc/reenable_DT_HASH.patch
new file mode 100644
index 000000000000..87a2329d8240
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glibc/reenable_DT_HASH.patch
@@ -0,0 +1,28 @@
+From 31915e55f9c34f6137ab1c5ac002375a2d5d4589 Mon Sep 17 00:00:00 2001
+From: Frederik Schwan <frederik.schwan@linux.com>
+Date: Fri, 4 Aug 2023 15:19:57 +0200
+Subject: [PATCH] force --hash-style=both to keep compatibility with old niche
+ software
+
+---
+ Makeconfig | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/Makeconfig b/Makeconfig
+index 77d7fd14df..2ae67c4beb 100644
+--- a/Makeconfig
++++ b/Makeconfig
+@@ -378,6 +378,10 @@ relro-LDFLAGS = -Wl,-z,relro
+ LDFLAGS.so += $(relro-LDFLAGS)
+ LDFLAGS-rtld += $(relro-LDFLAGS)
+ 
++hashstyle-LDFLAGS = -Wl,--hash-style=both
++LDFLAGS.so += $(hashstyle-LDFLAGS)
++LDFLAGS-rtld += $(hashstyle-LDFLAGS)
++
+ # Linker options to enable and disable DT_RELR.
+ ifeq ($(have-dt-relr),yes)
+ dt-relr-ldflag = -Wl,-z,pack-relative-relocs
+-- 
+2.41.0
+
diff --git a/nixpkgs/pkgs/development/libraries/glibmm/2.68.nix b/nixpkgs/pkgs/development/libraries/glibmm/2.68.nix
new file mode 100644
index 000000000000..c3c444f407e0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glibmm/2.68.nix
@@ -0,0 +1,59 @@
+{ lib
+, stdenv
+, fetchurl
+, pkg-config
+, gnum4
+, glib
+, libsigcxx30
+, gnome
+, Cocoa
+, meson
+, ninja
+}:
+
+stdenv.mkDerivation rec {
+  pname = "glibmm";
+  version = "2.78.1";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-9HPyl10mw0CeES7RHtNkBvs4Q/qXXfV1wi1MuEMIX2E=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    pkg-config
+    ninja
+    gnum4
+    glib # for glib-compile-schemas
+  ];
+
+  buildInputs = lib.optionals stdenv.isDarwin [
+    Cocoa
+  ];
+
+  propagatedBuildInputs = [
+    glib
+    libsigcxx30
+  ];
+
+  doCheck = false; # fails. one test needs the net, another /etc/fstab
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      attrPath = "glibmm_2_68";
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    description = "C++ interface to the GLib library";
+    homepage = "https://gtkmm.org/";
+    license = licenses.lgpl2Plus;
+    maintainers = teams.gnome.members ++ (with maintainers; [ raskin ]);
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/glibmm/default.nix b/nixpkgs/pkgs/development/libraries/glibmm/default.nix
new file mode 100644
index 000000000000..8800070ab61f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glibmm/default.nix
@@ -0,0 +1,47 @@
+{ lib, stdenv, fetchurl, pkg-config, gnum4, glib, libsigcxx, gnome, darwin, meson, ninja }:
+
+stdenv.mkDerivation rec {
+  pname = "glibmm";
+  version = "2.66.6";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-U1h0JZgYHlNR17+NoHK/k+bdXxeNJ2QNTkYryPFOFS8=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [
+    meson
+    pkg-config
+    ninja
+    gnum4
+    glib # for glib-compile-schemas
+  ];
+
+  buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
+    Cocoa
+  ]);
+  propagatedBuildInputs = [ glib libsigcxx ];
+
+  doCheck = false; # fails. one test needs the net, another /etc/fstab
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+      freeze = true;
+    };
+  };
+
+  meta = with lib; {
+    description = "C++ interface to the GLib library";
+
+    homepage = "https://gtkmm.org/";
+
+    license = licenses.lgpl2Plus;
+
+    maintainers = with maintainers; [raskin];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/glm/default.nix b/nixpkgs/pkgs/development/libraries/glm/default.nix
new file mode 100644
index 000000000000..417d70d621b6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glm/default.nix
@@ -0,0 +1,84 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  version = "0.9.9.8";
+  pname = "glm";
+
+  src = fetchFromGitHub {
+    owner = "g-truc";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-F//+3L5Ozrw6s7t4LrcUmO7sN30ZSESdrPAYX57zgr8=";
+  };
+
+  # (https://github.com/g-truc/glm/pull/986 wasn't enough, and -Werror is used)
+  # (https://github.com/g-truc/glm/pull/1055 neither)
+  patches = [
+    (fetchpatch {
+      name = "glm-0.9.9.8-clang.patch";
+      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/glm/files/glm-0.9.9.8-clang.patch?id=79476d4b145a4a6b0cbc0e73a6cefb5d584bf8fa";
+      hash = "sha256-D8O+qofnGUEaH5nQGdNddwHyr5FhPQa/lOup4z4SFgY=";
+    })
+  ];
+
+  outputs = [ "out" "doc" ];
+
+  nativeBuildInputs = [ cmake ];
+
+  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102823
+  env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "11") "-fno-ipa-modref";
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=OFF"
+    "-DBUILD_STATIC_LIBS=OFF"
+    "-DGLM_TEST_ENABLE=${if doCheck then "ON" else "OFF"}"
+  ];
+
+  doCheck = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    # Install header-only library
+    mkdir -p $out/include
+    cp -rv ../glm $out/include
+    rm $out/include/glm/CMakeLists.txt
+    rm $out/include/glm/detail/*.cpp
+
+    # Install CMake files
+    mkdir -p $out/lib
+    cp -rv ../cmake $out/lib
+    substituteInPlace $out/lib/cmake/glm/glmConfig.cmake \
+        --replace 'GLM_INCLUDE_DIRS ''${_IMPORT_PREFIX}' "GLM_INCLUDE_DIRS $out/include"
+
+    # Install pkg-config file
+    mkdir -p $out/lib/pkgconfig
+    substituteAll ${./glm.pc.in} $out/lib/pkgconfig/glm.pc
+
+    # Install docs
+    mkdir -p $doc/share/doc/glm
+    cp -rv ../doc/api $doc/share/doc/glm/html
+    cp -v ../doc/manual.pdf $doc/share/doc/glm
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "OpenGL Mathematics library for C++";
+    longDescription = ''
+      OpenGL Mathematics (GLM) is a header only C++ mathematics library for
+      graphics software based on the OpenGL Shading Language (GLSL)
+      specification and released under the MIT license.
+    '';
+    homepage = "https://github.com/g-truc/glm";
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ smancill ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/glm/glm.pc.in b/nixpkgs/pkgs/development/libraries/glm/glm.pc.in
new file mode 100644
index 000000000000..e196c793d1d5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glm/glm.pc.in
@@ -0,0 +1,7 @@
+prefix=@out@
+includedir=@out@/include
+
+Name: GLM
+Description: OpenGL Mathematics
+Version: @version@
+Cflags: -I${includedir}
diff --git a/nixpkgs/pkgs/development/libraries/globalarrays/default.nix b/nixpkgs/pkgs/development/libraries/globalarrays/default.nix
new file mode 100644
index 000000000000..f7bc072f1757
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/globalarrays/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchpatch, fetchFromGitHub, autoreconfHook
+, blas, gfortran, openssh, mpi
+} :
+
+stdenv.mkDerivation rec {
+  pname = "globalarrays";
+  version = "5.8.2";
+
+  src = fetchFromGitHub {
+    owner = "GlobalArrays";
+    repo = "ga";
+    rev = "v${version}";
+    sha256 = "sha256-2ffQIg9topqKX7ygnWaa/UunL9d0Lj9qr9xucsjLuoY=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook gfortran ];
+  buildInputs = [ mpi blas openssh ];
+
+  preConfigure = ''
+    configureFlagsArray+=( "--enable-i8" \
+                           "--with-mpi" \
+                           "--with-mpi3" \
+                           "--enable-eispack" \
+                           "--enable-underscoring" \
+                           "--with-blas8=${blas}/lib -lblas" )
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Global Arrays Programming Models";
+    homepage = "http://hpc.pnl.gov/globalarrays/";
+    maintainers = [ maintainers.markuskowa ];
+    license = licenses.bsd3;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/glog/default.nix b/nixpkgs/pkgs/development/libraries/glog/default.nix
new file mode 100644
index 000000000000..53377022ad69
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glog/default.nix
@@ -0,0 +1,74 @@
+{ stdenv, lib, fetchFromGitHub, cmake, gflags, gtest, perl }:
+
+stdenv.mkDerivation rec {
+  pname = "glog";
+  version = "0.6.0";
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "glog";
+    rev = "v${version}";
+    sha256 = "sha256-xqRp9vaauBkKz2CXbh/Z4TWqhaUtqfbsSlbYZR/kW9s=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ gtest ];
+
+  propagatedBuildInputs = [ gflags ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+    # glog's custom FindUnwind.cmake module detects LLVM's unwind in case
+    # stdenv.cc is clang. But the module doesn't get installed, causing
+    # consumers of the CMake config file to fail at the configuration step.
+    # Explicitly disabling unwind support sidesteps the issue.
+    "-DWITH_UNWIND=OFF"
+  ];
+
+  doCheck = true;
+
+  # There are some non-thread safe tests that can fail
+  enableParallelChecking = false;
+  nativeCheckInputs = [ perl ];
+
+  env.GTEST_FILTER =
+    let
+      filteredTests = lib.optionals stdenv.hostPlatform.isMusl [
+        "Symbolize.SymbolizeStackConsumption"
+        "Symbolize.SymbolizeWithDemanglingStackConsumption"
+      ] ++ lib.optionals stdenv.hostPlatform.isStatic [
+        "LogBacktraceAt.DoesBacktraceAtRightLineWhenEnabled"
+      ] ++ lib.optionals stdenv.cc.isClang [
+        # Clang optimizes an expected allocation away.
+        # See https://github.com/google/glog/issues/937
+        "DeathNoAllocNewHook.logging"
+      ] ++ lib.optionals stdenv.isDarwin [
+        "LogBacktraceAt.DoesBacktraceAtRightLineWhenEnabled"
+      ];
+    in
+    "-${builtins.concatStringsSep ":" filteredTests}";
+
+  checkPhase =
+    let
+      excludedTests = lib.optionals stdenv.isDarwin [
+        "mock-log"
+      ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
+        "logging"   # works around segfaults on aarch64-darwin for now
+      ];
+      excludedTestsRegex = lib.optionalString (excludedTests != [ ]) "(${lib.concatStringsSep "|" excludedTests})";
+    in
+    ''
+      runHook preCheck
+      ctest -E "${excludedTestsRegex}" --output-on-failure
+      runHook postCheck
+    '';
+
+  meta = with lib; {
+    homepage = "https://github.com/google/glog";
+    license = licenses.bsd3;
+    description = "Library for application-level logging";
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ nh2 r-burns ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gloox/default.nix b/nixpkgs/pkgs/development/libraries/gloox/default.nix
new file mode 100644
index 000000000000..b4cd3ca75ee1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gloox/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchurl
+, zlibSupport ? true, zlib
+, sslSupport ? true, openssl
+, idnSupport ? true, libidn
+}:
+
+
+stdenv.mkDerivation rec{
+  pname = "gloox";
+  version = "1.0.28";
+
+  src = fetchurl {
+    url = "https://camaya.net/download/gloox-${version}.tar.bz2";
+    sha256 = "sha256-WRvRLCSe3gtQoe9rmawN6O+cG6T9Lhhvl6dAIVzFlmw=";
+  };
+
+  # needed since gcc12
+  postPatch = ''
+    sed '1i#include <ctime>' -i \
+      src/tests/{tag/tag_perf.cpp,zlib/zlib_perf.cpp} \
+      src/examples/*.cpp
+  '';
+
+  buildInputs = [ ]
+    ++ lib.optional zlibSupport zlib
+    ++ lib.optional sslSupport openssl
+    ++ lib.optional idnSupport libidn;
+
+  meta = with lib; {
+    description = "A portable high-level Jabber/XMPP library for C++";
+    homepage = "http://camaya.net/gloox";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/glpk/default.nix b/nixpkgs/pkgs/development/libraries/glpk/default.nix
new file mode 100644
index 000000000000..a78170909caa
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glpk/default.nix
@@ -0,0 +1,79 @@
+{ lib, stdenv
+, fetchurl
+, fetchpatch
+, libmysqlclient
+# Excerpt from glpk's INSTALL file:
+# This feature allows the exact simplex solver to use the GNU MP
+# bignum library. If it is disabled, the exact simplex solver uses the
+# GLPK bignum module, which provides the same functionality as GNU MP,
+# however, it is much less efficient.
+, withGmp ? true
+, gmp
+}:
+
+assert withGmp -> gmp != null;
+
+stdenv.mkDerivation rec {
+  version = "5.0";
+  pname = "glpk";
+
+  src = fetchurl {
+    url = "mirror://gnu/glpk/${pname}-${version}.tar.gz";
+    sha256 = "sha256-ShAT7rtQ9yj8YBvdgzsLKHAzPDs+WoFu66kh2VvsbxU=";
+  };
+
+  buildInputs =
+    [ libmysqlclient
+    ] ++ lib.optionals withGmp [
+      gmp
+    ];
+
+  configureFlags = lib.optionals withGmp [
+    "--with-gmp"
+  ];
+
+  patches = [
+    # GLPK makes it possible to customize its message printing behaviour. Sage
+    # does that and needs to differentiate between printing regular messages and
+    # printing errors. Unfortunately there is no way to tell and glpk upstream
+    # rejected this patch. All it does is set the variable pointing to the error
+    # file back to NULL before glpk calls abort(). In sage's case, abort won't
+    # actually be called because the error handler jumps out of the function.
+    # This shouldn't affect everybody else, since glpk just calls abort()
+    # immediately afterwards anyways.
+    # See the sage trac ticket for more details:
+    # https://trac.sagemath.org/ticket/20710#comment:18
+    (fetchpatch {
+      name = "error_recovery.patch";
+      url = "https://raw.githubusercontent.com/sagemath/sage/d3c1f607e32f964bf0cab877a63767c86fd00266/build/pkgs/glpk/patches/error_recovery.patch";
+      sha256 = "sha256-2hNtUEoGTFt3JgUvLH3tPWnz+DZcXNhjXzS+/V89toA=";
+    })
+  ];
+
+  postPatch =
+    # Do not hardcode the include path for libmysqlclient.
+    ''
+      substituteInPlace configure \
+        --replace '-I/usr/include/mysql' '$(mysql_config --include)'
+    '';
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "The GNU Linear Programming Kit";
+
+    longDescription =
+      '' The GNU Linear Programming Kit is intended for solving large
+         scale linear programming problems by means of the revised
+         simplex method.  It is a set of routines written in the ANSI C
+         programming language and organized in the form of a library.
+      '';
+
+    homepage = "https://www.gnu.org/software/glpk/";
+    license = licenses.gpl3Plus;
+
+    maintainers = with maintainers; [ ] ++ teams.sage.members;
+    mainProgram = "glpsol";
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/glpng/default.nix b/nixpkgs/pkgs/development/libraries/glpng/default.nix
new file mode 100644
index 000000000000..34c58774fb24
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glpng/default.nix
@@ -0,0 +1,39 @@
+{ lib
+, stdenv
+, fetchFromRepoOrCz
+, cmake
+, libGL
+, libpng
+, pkg-config
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "glpng";
+  version = "1.46";
+
+  src = fetchFromRepoOrCz {
+    repo = "glpng";
+    rev = "v${version}";
+    hash = "sha256-C7EHaBN0PE/HJB6zcIaYU63+o7/MEz4WU1xr/kIOanM=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    libGL
+    libpng
+    zlib
+  ];
+
+  meta = with lib; {
+    homepage = "https://repo.or.cz/glpng.git/blob_plain/HEAD:/glpng.htm";
+    description = "PNG loader library for OpenGL";
+    license = licenses.mit;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/glui/default.nix b/nixpkgs/pkgs/development/libraries/glui/default.nix
new file mode 100644
index 000000000000..511ec60db2fb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/glui/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv
+, fetchFromGitHub
+, freeglut
+, libGL
+, libGLU
+, libX11
+, libXext
+, libXi
+, libXmu
+}:
+
+stdenv.mkDerivation rec {
+  pname = "glui";
+  version = "2.37";
+
+  src = fetchFromGitHub {
+    owner = "libglui";
+    repo = "glui";
+    rev = version;
+    sha256 = "0qg2y8w95s03zay1qsqs8pqxxlg6l9kwm7rrs1qmx0h22sxb360i";
+  };
+
+  buildInputs = [ freeglut libGLU libGL libXmu libXext libX11 libXi ];
+
+  installPhase = ''
+    mkdir -p "$out"/{bin,lib,share/glui/doc,include}
+    cp -rT bin "$out/bin"
+    cp -rT lib "$out/lib"
+    cp -rT include "$out/include"
+    cp -rT doc "$out/share/glui/doc"
+    cp LICENSE.txt "$out/share/glui/doc"
+  '';
+
+  meta = with lib; {
+    description = "A user interface library using OpenGL";
+    license = licenses.zlib ;
+    maintainers = [ maintainers.raskin ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gmime/2.nix b/nixpkgs/pkgs/development/libraries/gmime/2.nix
new file mode 100644
index 000000000000..d6369227739b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gmime/2.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, fetchurl, pkg-config, glib, zlib, gnupg, libgpg-error, gobject-introspection }:
+
+stdenv.mkDerivation rec {
+  version = "2.6.23";
+  pname = "gmime";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/gmime/2.6/${pname}-${version}.tar.xz";
+    sha256 = "0slzlzcr3h8jikpz5a5amqd0csqh2m40gdk910ws2hnaf5m6hjbi";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ pkg-config gobject-introspection ];
+  propagatedBuildInputs = [ glib zlib libgpg-error ];
+  configureFlags = [
+    "--enable-introspection=yes"
+  ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "ac_cv_have_iconv_detect_h=yes" ];
+
+  postPatch = ''
+    substituteInPlace tests/testsuite.c \
+      --replace /bin/rm rm \
+      --replace /bin/mkdir mkdir
+
+    substituteInPlace tests/test-pkcs7.c \
+      --replace /bin/mkdir mkdir
+  '';
+
+  preConfigure = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
+    cp ${if stdenv.hostPlatform.isMusl then ./musl-iconv-detect.h else ./iconv-detect.h} ./iconv-detect.h
+  '';
+
+  nativeCheckInputs = [ gnupg ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/jstedfast/gmime/";
+    description = "A C/C++ library for creating, editing and parsing MIME messages and structures";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gmime/3.nix b/nixpkgs/pkgs/development/libraries/gmime/3.nix
new file mode 100644
index 000000000000..8f20d756c1f9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gmime/3.nix
@@ -0,0 +1,54 @@
+{ lib, stdenv, fetchurl, pkg-config, glib, zlib, gnupg, gpgme, libidn2, libunistring, gobject-introspection
+, vala }:
+
+stdenv.mkDerivation rec {
+  version = "3.2.14";
+  pname = "gmime";
+
+  src = fetchurl { # https://github.com/jstedfast/gmime/releases
+    url = "https://github.com/jstedfast/gmime/releases/download/${version}/gmime-${version}.tar.xz";
+    sha256 = "sha256-pes91nX3LlRci8HNEhB+Sq0ursGQXre0ATzbH75eIxc=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ pkg-config gobject-introspection vala ];
+  buildInputs = [
+    zlib
+    gpgme
+    libidn2
+    libunistring
+    vala # for share/vala/Makefile.vapigen
+  ];
+  propagatedBuildInputs = [ glib ];
+  configureFlags = [
+    "--enable-introspection=yes"
+    "--enable-vala=yes"
+  ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "ac_cv_have_iconv_detect_h=yes" ];
+
+  postPatch = ''
+    substituteInPlace tests/testsuite.c \
+      --replace /bin/rm rm
+  '';
+
+  preConfigure = ''
+    PKG_CONFIG_VAPIGEN_VAPIGEN="$(type -p vapigen)"
+    export PKG_CONFIG_VAPIGEN_VAPIGEN
+  '' + lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
+    cp ${if stdenv.hostPlatform.isMusl then ./musl-iconv-detect.h else ./iconv-detect.h} ./iconv-detect.h
+  '';
+
+  nativeCheckInputs = [ gnupg ];
+
+  doCheck = true;
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/jstedfast/gmime/";
+    description = "A C/C++ library for creating, editing and parsing MIME messages and structures";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gmime/iconv-detect.h b/nixpkgs/pkgs/development/libraries/gmime/iconv-detect.h
new file mode 100644
index 000000000000..6d9dd05b59e2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gmime/iconv-detect.h
@@ -0,0 +1,6 @@
+/* This is an auto-generated header, DO NOT EDIT! */
+
+#define ICONV_ISO_INT_FORMAT "iso-%u-%u"
+#define ICONV_ISO_STR_FORMAT "iso-%u-%s"
+#define ICONV_SHIFT_JIS "shift-jis"
+#define ICONV_10646 "iso-10646"
diff --git a/nixpkgs/pkgs/development/libraries/gmime/musl-iconv-detect.h b/nixpkgs/pkgs/development/libraries/gmime/musl-iconv-detect.h
new file mode 100644
index 000000000000..569da106b943
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gmime/musl-iconv-detect.h
@@ -0,0 +1,6 @@
+/* This is an auto-generated header, DO NOT EDIT! */
+
+#define ICONV_ISO_INT_FORMAT "iso-%u-%u"
+#define ICONV_ISO_STR_FORMAT "iso-%u-%s"
+#define ICONV_SHIFT_JIS "shift-jis"
+#define ICONV_10646 "UCS-4BE"
diff --git a/nixpkgs/pkgs/development/libraries/gmm/default.nix b/nixpkgs/pkgs/development/libraries/gmm/default.nix
new file mode 100644
index 000000000000..fb44222e75f5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gmm/default.nix
@@ -0,0 +1,18 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "gmm";
+  version = "5.4.2";
+
+  src = fetchurl {
+    url = "mirror://savannah/getfem/stable/${pname}-${version}.tar.gz";
+    sha256 = "sha256-UgbnMmQ/aTQQkCiy8XNmDywu3LDuJpIo1pSsym4iyIo=";
+  };
+
+  meta = with lib; {
+    description = "Generic C++ template library for sparse, dense and skyline matrices";
+    homepage = "http://getfem.org/gmm.html";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gmp/4.3.2.nix b/nixpkgs/pkgs/development/libraries/gmp/4.3.2.nix
new file mode 100644
index 000000000000..e809ed926eda
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gmp/4.3.2.nix
@@ -0,0 +1,78 @@
+{ lib, stdenv, fetchurl, m4, cxx ? true }:
+
+let self = stdenv.mkDerivation rec {
+  pname = "gmp";
+  version = "4.3.2";
+
+  src = fetchurl {
+    url = "mirror://gnu/gmp/gmp-${version}.tar.bz2";
+    sha256 = "0x8prpqi9amfcmi7r4zrza609ai9529pjaq0h4aw51i867064qck";
+  };
+
+  #outputs TODO: split $cxx due to libstdc++ dependency
+  # maybe let ghc use a version with *.so shared with rest of nixpkgs and *.a added
+  # - see #5855 for related discussion
+  outputs = [ "out" "dev" "info" ];
+  passthru.static = self.out;
+
+  nativeBuildInputs = [ m4 ];
+
+  # Prevent the build system from using sub-architecture-specific
+  # instructions (e.g., SSE2 on i686).
+  #
+  # This is not a problem for Apple machines, which are all alike.  In
+  # addition, `configfsf.guess' would return `i386-apple-darwin10.2.0' on
+  # `x86_64-darwin', leading to a 32-bit ABI build, which is undesirable.
+  preConfigure =
+    if !stdenv.isDarwin
+    then "ln -sf configfsf.guess config.guess"
+    else ''echo "Darwin host is `./config.guess`."'';
+
+  configureFlags = [
+    (lib.enableFeature cxx "cxx")
+  ] ++ lib.optionals stdenv.isDarwin [
+    "ac_cv_build=x86_64-apple-darwin13.4.0"
+    "ac_cv_host=x86_64-apple-darwin13.4.0"
+  ];
+
+  # The test t-lucnum_ui fails (on Linux/x86_64) when built with GCC 4.8.
+  # Newer versions of GMP don't have that issue anymore.
+  doCheck = false;
+
+  meta = {
+    branch = "4";
+    description = "GNU multiple precision arithmetic library";
+
+    longDescription =
+      '' GMP is a free library for arbitrary precision arithmetic, operating
+         on signed integers, rational numbers, and floating point numbers.
+         There is no practical limit to the precision except the ones implied
+         by the available memory in the machine GMP runs on.  GMP has a rich
+         set of functions, and the functions have a regular interface.
+
+         The main target applications for GMP are cryptography applications
+         and research, Internet security applications, algebra systems,
+         computational algebra research, etc.
+
+         GMP is carefully designed to be as fast as possible, both for small
+         operands and for huge operands.  The speed is achieved by using
+         fullwords as the basic arithmetic type, by using fast algorithms,
+         with highly optimised assembly code for the most common inner loops
+         for a lot of CPUs, and by a general emphasis on speed.
+
+         GMP is faster than any other bignum library.  The advantage for GMP
+         increases with the operand sizes for many operations, since GMP uses
+         asymptotically faster algorithms.
+      '';
+
+    homepage = "https://gmplib.org/";
+    license = lib.licenses.lgpl3Plus;
+
+    maintainers = [ ];
+    platforms = lib.platforms.all;
+    badPlatforms = [ "x86_64-darwin" ];
+    # never built on aarch64-darwin, aarch64-linux since first introduction in nixpkgs
+    broken = (stdenv.isDarwin && stdenv.isAarch64) || (stdenv.isLinux && stdenv.isAarch64);
+  };
+};
+  in self
diff --git a/nixpkgs/pkgs/development/libraries/gmp/5.1.3-CVE-2021-43618.patch b/nixpkgs/pkgs/development/libraries/gmp/5.1.3-CVE-2021-43618.patch
new file mode 100644
index 000000000000..13b9bc5f58cd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gmp/5.1.3-CVE-2021-43618.patch
@@ -0,0 +1,20 @@
+Based on https://gmplib.org/repo/gmp-6.2/raw-rev/561a9c25298e,
+adapted for 5.x by ris
+
+diff -r e1fd9db13b47 -r 561a9c25298e mpz/inp_raw.c
+--- a/mpz/inp_raw.c	Tue Dec 22 23:49:51 2020 +0100
++++ b/mpz/inp_raw.c	Thu Oct 21 19:06:49 2021 +0200
+@@ -81,8 +81,11 @@
+ 
+   abs_csize = ABS (csize);
+ 
++  if (UNLIKELY (abs_csize > ~(mp_bitcnt_t) 0 / 8))
++    return 0; /* Bit size overflows */
++
+   /* round up to a multiple of limbs */
+-  abs_xsize = (abs_csize*8 + GMP_NUMB_BITS-1) / GMP_NUMB_BITS;
++  abs_xsize = ((mp_bitcnt_t)abs_csize*8 + GMP_NUMB_BITS-1) / GMP_NUMB_BITS;
+ 
+   if (abs_xsize != 0)
+     {
+
diff --git a/nixpkgs/pkgs/development/libraries/gmp/5.1.x.nix b/nixpkgs/pkgs/development/libraries/gmp/5.1.x.nix
new file mode 100644
index 000000000000..e4fb89d054da
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gmp/5.1.x.nix
@@ -0,0 +1,87 @@
+{ lib, stdenv, fetchurl, m4
+, cxx ? true
+, withStatic ? stdenv.hostPlatform.isStatic
+}:
+
+let inherit (lib) optional; in
+
+let self = stdenv.mkDerivation rec {
+  pname = "gmp";
+  version = "5.1.3";
+
+  src = fetchurl { # we need to use bz2, others aren't in bootstrapping stdenv
+    urls = [ "mirror://gnu/gmp/gmp-${version}.tar.bz2" "ftp://ftp.gmplib.org/pub/gmp-${version}/gmp-${version}.tar.bz2" ];
+    sha256 = "0q5i39pxrasgn9qdxzpfbwhh11ph80p57x6hf48m74261d97j83m";
+  };
+
+  #outputs TODO: split $cxx due to libstdc++ dependency
+  # maybe let ghc use a version with *.so shared with rest of nixpkgs and *.a added
+  # - see #5855 for related discussion
+  outputs = [ "out" "dev" "info" ];
+  passthru.static = self.out;
+
+  nativeBuildInputs = [ m4 ];
+
+  patches = [
+    ./5.1.3-CVE-2021-43618.patch
+  ] ++ lib.optionals stdenv.isDarwin [
+    ./need-size-t.patch
+  ];
+
+  configureFlags = [
+    "--with-pic"
+    (lib.enableFeature cxx "cxx")
+    # Build a "fat binary", with routines for several sub-architectures
+    # (x86), except on Solaris where some tests crash with "Memory fault".
+    # See <https://hydra.nixos.org/build/2760931>, for instance.
+    #
+    # no darwin because gmp uses ASM that clang doesn't like
+    (lib.enableFeature (!stdenv.isSunOS && stdenv.hostPlatform.isx86) "fat")
+    # The config.guess in GMP tries to runtime-detect various
+    # ARM optimization flags via /proc/cpuinfo (and is also
+    # broken on multicore CPUs). Avoid this impurity.
+    "--build=${stdenv.buildPlatform.config}"
+  ] ++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions"
+    ++ optional (stdenv.isDarwin && stdenv.is64bit) "ABI=64"
+    ;
+
+  doCheck = true;
+
+  dontDisableStatic = withStatic;
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://gmplib.org/";
+    description = "GNU multiple precision arithmetic library";
+    license = licenses.gpl3Plus;
+
+    longDescription =
+      '' GMP is a free library for arbitrary precision arithmetic, operating
+         on signed integers, rational numbers, and floating point numbers.
+         There is no practical limit to the precision except the ones implied
+         by the available memory in the machine GMP runs on.  GMP has a rich
+         set of functions, and the functions have a regular interface.
+
+         The main target applications for GMP are cryptography applications
+         and research, Internet security applications, algebra systems,
+         computational algebra research, etc.
+
+         GMP is carefully designed to be as fast as possible, both for small
+         operands and for huge operands.  The speed is achieved by using
+         fullwords as the basic arithmetic type, by using fast algorithms,
+         with highly optimised assembly code for the most common inner loops
+         for a lot of CPUs, and by a general emphasis on speed.
+
+         GMP is faster than any other bignum library.  The advantage for GMP
+         increases with the operand sizes for many operations, since GMP uses
+         asymptotically faster algorithms.
+      '';
+
+    platforms = platforms.all;
+    badPlatforms = [ "x86_64-darwin" ];
+    # never built on aarch64-darwin since first introduction in nixpkgs
+    broken = stdenv.isDarwin && stdenv.isAarch64;
+  };
+};
+  in self
diff --git a/nixpkgs/pkgs/development/libraries/gmp/6.x.nix b/nixpkgs/pkgs/development/libraries/gmp/6.x.nix
new file mode 100644
index 000000000000..44874246b6ea
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gmp/6.x.nix
@@ -0,0 +1,93 @@
+{ lib, stdenv, fetchurl, m4
+, cxx ? !stdenv.hostPlatform.useAndroidPrebuilt && !stdenv.hostPlatform.isWasm
+, buildPackages
+, withStatic ? stdenv.hostPlatform.isStatic
+}:
+
+# 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 inherit (lib) optional; in
+
+let self = stdenv.mkDerivation rec {
+  pname = "gmp${lib.optionalString cxx "-with-cxx"}";
+  version = "6.3.0";
+
+  src = fetchurl { # we need to use bz2, others aren't in bootstrapping stdenv
+    urls = [ "mirror://gnu/gmp/gmp-${version}.tar.bz2" "ftp://ftp.gmplib.org/pub/gmp-${version}/gmp-${version}.tar.bz2" ];
+    hash = "sha256-rCghGnz7YJuuLiyNYFjWbI/pZDT3QM9v4uR7AA0cIMs=";
+  };
+
+  #outputs TODO: split $cxx due to libstdc++ dependency
+  # maybe let ghc use a version with *.so shared with rest of nixpkgs and *.a added
+  # - see #5855 for related discussion
+  outputs = [ "out" "dev" "info" ];
+  passthru.static = self.out;
+
+  strictDeps = true;
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+  nativeBuildInputs = [ m4 ];
+
+  configureFlags = [
+    "--with-pic"
+    (lib.enableFeature cxx "cxx")
+    # Build a "fat binary", with routines for several sub-architectures
+    # (x86), except on Solaris where some tests crash with "Memory fault".
+    # See <https://hydra.nixos.org/build/2760931>, for instance.
+    #
+    # no darwin because gmp uses ASM that clang doesn't like
+    (lib.enableFeature (!stdenv.isSunOS && stdenv.hostPlatform.isx86) "fat")
+    # The config.guess in GMP tries to runtime-detect various
+    # ARM optimization flags via /proc/cpuinfo (and is also
+    # broken on multicore CPUs). Avoid this impurity.
+    "--build=${stdenv.buildPlatform.config}"
+  ] ++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions"
+    ++ optional (stdenv.isDarwin && stdenv.is64bit) "ABI=64"
+    # to build a .dll on windows, we need --disable-static + --enable-shared
+    # see https://gmplib.org/manual/Notes-for-Particular-Systems.html
+    ++ optional (!withStatic && stdenv.hostPlatform.isWindows) "--disable-static --enable-shared"
+    ++ optional (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) "--disable-assembly";
+
+  doCheck = true; # not cross;
+
+  dontDisableStatic = withStatic;
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://gmplib.org/";
+    description = "GNU multiple precision arithmetic library";
+    license = with licenses; [
+      lgpl3Only
+      gpl2Only
+    ];
+
+    longDescription =
+      '' GMP is a free library for arbitrary precision arithmetic, operating
+         on signed integers, rational numbers, and floating point numbers.
+         There is no practical limit to the precision except the ones implied
+         by the available memory in the machine GMP runs on.  GMP has a rich
+         set of functions, and the functions have a regular interface.
+
+         The main target applications for GMP are cryptography applications
+         and research, Internet security applications, algebra systems,
+         computational algebra research, etc.
+
+         GMP is carefully designed to be as fast as possible, both for small
+         operands and for huge operands.  The speed is achieved by using
+         fullwords as the basic arithmetic type, by using fast algorithms,
+         with highly optimised assembly code for the most common inner loops
+         for a lot of CPUs, and by a general emphasis on speed.
+
+         GMP is faster than any other bignum library.  The advantage for GMP
+         increases with the operand sizes for many operations, since GMP uses
+         asymptotically faster algorithms.
+      '';
+
+    platforms = platforms.all;
+    maintainers = [ maintainers.vrthra ];
+  };
+};
+  in self
diff --git a/nixpkgs/pkgs/development/libraries/gmp/need-size-t.patch b/nixpkgs/pkgs/development/libraries/gmp/need-size-t.patch
new file mode 100644
index 000000000000..c4ba086182a9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gmp/need-size-t.patch
@@ -0,0 +1,18 @@
+diff --git a/gmp-h.in b/gmp-h.in
+index 7deb67a..240d663 100644
+--- a/gmp-h.in
++++ b/gmp-h.in
+@@ -46,13 +46,11 @@ along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
+ #ifndef __GNU_MP__
+ #define __GNU_MP__ 5
+ 
+-#define __need_size_t  /* tell gcc stddef.h we only want size_t */
+ #if defined (__cplusplus)
+ #include <cstddef>     /* for size_t */
+ #else
+ #include <stddef.h>    /* for size_t */
+ #endif
+-#undef __need_size_t
+ 
+ /* Instantiated by configure. */
+ #if ! defined (__GMP_WITHIN_CONFIGURE)
diff --git a/nixpkgs/pkgs/development/libraries/gmtk/default.nix b/nixpkgs/pkgs/development/libraries/gmtk/default.nix
new file mode 100644
index 000000000000..6f2906a8234e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gmtk/default.nix
@@ -0,0 +1,32 @@
+{lib, stdenv, substituteAll, fetchFromGitHub, libtool, pkg-config, intltool, glib, gtk3
+, libpulseaudio, mplayer, gnome_mplayer }:
+
+stdenv.mkDerivation rec {
+  pname = "gmtk";
+  version = "1.0.9";
+
+  src = fetchFromGitHub {
+    owner = "kdekorte";
+    repo = "gmtk";
+    rev = "v${version}";
+    sha256 = "1zb5m1y1gckal3140gvx31572a6xpccwfmdwa1w5lx2wdq1pwk1i";
+  };
+
+  nativeBuildInputs = [ libtool pkg-config intltool ];
+  buildInputs = [ glib gtk3 libpulseaudio ];
+
+  patches = [
+    (substituteAll {
+      src = ./fix-paths.patch;
+      mplayer = "${mplayer}/bin/mplayer";
+    })
+  ];
+
+  meta = with lib; {
+    description = "Common functions for gnome-mplayer and gecko-mediaplayer";
+    homepage = "https://sites.google.com/site/kdekorte2/gnomemplayer";
+    license = licenses.gpl2;
+    maintainers = gnome_mplayer.meta.maintainers;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gmtk/fix-paths.patch b/nixpkgs/pkgs/development/libraries/gmtk/fix-paths.patch
new file mode 100644
index 000000000000..64738300aba4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gmtk/fix-paths.patch
@@ -0,0 +1,20 @@
+--- a/src/gmtk_media_player.c
++++ b/src/gmtk_media_player.c
+@@ -2449,7 +2449,7 @@
+         player->minimum_mplayer = detect_mplayer_features(player);
+ 
+         if (player->mplayer_binary == NULL || !g_file_test(player->mplayer_binary, G_FILE_TEST_EXISTS)) {
+-            argv[argn++] = g_strdup_printf("mplayer");
++            argv[argn++] = g_strdup_printf("@mplayer@");
+         } else {
+             argv[argn++] = g_strdup_printf("%s", player->mplayer_binary);
+         }
+@@ -4135,7 +4135,7 @@
+         return ret;
+ 
+     if (player->mplayer_binary == NULL || !g_file_test(player->mplayer_binary, G_FILE_TEST_EXISTS)) {
+-        av[ac++] = g_strdup_printf("mplayer");
++        av[ac++] = g_strdup_printf("@mplayer@");
+     } else {
+         av[ac++] = g_strdup_printf("%s", player->mplayer_binary);
+     }
diff --git a/nixpkgs/pkgs/development/libraries/gnet/default.nix b/nixpkgs/pkgs/development/libraries/gnet/default.nix
new file mode 100644
index 000000000000..5992868c7343
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gnet/default.nix
@@ -0,0 +1,25 @@
+{lib, stdenv, fetchFromGitHub, pkg-config, autoconf, automake, glib, libtool }:
+
+stdenv.mkDerivation rec {
+  pname = "gnet";
+  version = "2.0.8";
+  src = fetchFromGitHub {
+    owner = "GNOME";
+    repo = "gnet";
+    rev = "GNET_${lib.replaceStrings ["."] ["_"] version}";
+    sha256 = "1cy78kglzi235md964ikvm0rg801bx0yk9ya8zavndjnaarzqq87";
+  };
+
+  nativeBuildInputs = [ pkg-config autoconf automake ];
+  buildInputs = [ glib libtool ];
+
+  preConfigure = "./autogen.sh";
+
+  meta = with lib; {
+    description = "A network library, written in C, object-oriented, and built upon GLib";
+    homepage = "https://developer.gnome.org/gnet/";
+    license = licenses.lgpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ pSub ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gnome-desktop/bubblewrap-paths.patch b/nixpkgs/pkgs/development/libraries/gnome-desktop/bubblewrap-paths.patch
new file mode 100644
index 000000000000..c31e093f4b7e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gnome-desktop/bubblewrap-paths.patch
@@ -0,0 +1,17 @@
+diff --git a/libgnome-desktop/gnome-desktop-thumbnail-script.c b/libgnome-desktop/gnome-desktop-thumbnail-script.c
+index ddcc1511..546c2a36 100644
+--- a/libgnome-desktop/gnome-desktop-thumbnail-script.c
++++ b/libgnome-desktop/gnome-desktop-thumbnail-script.c
+@@ -555,9 +555,9 @@ add_bwrap (GPtrArray   *array,
+   g_return_val_if_fail (script->s_infile != NULL, FALSE);
+ 
+   add_args (array,
+-	    "bwrap",
+-	    "--ro-bind", "/usr", "/usr",
+-	    "--ro-bind-try", "/etc/ld.so.cache", "/etc/ld.so.cache",
++	    "@bubblewrap_bin@",
++	    "--ro-bind", "@storeDir@", "@storeDir@",
++	    "--ro-bind-try", "/run/current-system", "/run/current-system",
+ 	    NULL);
+ 
+   /* These directories might be symlinks into /usr/... */
diff --git a/nixpkgs/pkgs/development/libraries/gnome-desktop/default.nix b/nixpkgs/pkgs/development/libraries/gnome-desktop/default.nix
new file mode 100644
index 000000000000..db95029c804e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gnome-desktop/default.nix
@@ -0,0 +1,101 @@
+{ lib
+, stdenv
+, fetchurl
+, substituteAll
+, pkg-config
+, libxslt
+, ninja
+, gnome
+, gtk3
+, gtk4
+, glib
+, gettext
+, libxml2
+, xkeyboard_config
+, libxkbcommon
+, isocodes
+, meson
+, wayland
+, libseccomp
+, systemd
+, bubblewrap
+, gobject-introspection
+, gtk-doc
+, docbook-xsl-nons
+, gsettings-desktop-schemas
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gnome-desktop";
+  version = "44.0";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/gnome-desktop/${lib.versions.major version}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-QsdzdF2EuhS8HPHExvRgYUiAOlzTN5QcY5ZHlfPFnUI=";
+  };
+
+  patches = lib.optionals stdenv.isLinux [
+    (substituteAll {
+      src = ./bubblewrap-paths.patch;
+      bubblewrap_bin = "${bubblewrap}/bin/bwrap";
+      inherit (builtins) storeDir;
+    })
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+    meson
+    ninja
+    gettext
+    libxslt
+    libxml2
+    gobject-introspection
+    gtk-doc
+    docbook-xsl-nons
+    glib
+  ];
+
+  buildInputs = [
+    xkeyboard_config
+    libxkbcommon # for xkbregistry
+    isocodes
+    gtk3
+    gtk4
+    glib
+  ] ++ lib.optionals stdenv.isLinux [
+    bubblewrap
+    wayland
+    libseccomp
+    systemd
+  ];
+
+  propagatedBuildInputs = [
+    gsettings-desktop-schemas
+  ];
+
+  mesonFlags = [
+    "-Dgtk_doc=true"
+    "-Ddesktop_docs=false"
+  ] ++ lib.optionals (!stdenv.isLinux) [
+    "-Dsystemd=disabled"
+    "-Dudev=disabled"
+  ];
+
+  separateDebugInfo = stdenv.isLinux;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = "gnome-desktop";
+    };
+  };
+
+  meta = with lib; {
+    description = "Library with common API for various GNOME modules";
+    homepage = "https://gitlab.gnome.org/GNOME/gnome-desktop";
+    license = with licenses; [ gpl2Plus lgpl2Plus ];
+    platforms = platforms.unix;
+    maintainers = teams.gnome.members;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gnome-menus/default.nix b/nixpkgs/pkgs/development/libraries/gnome-menus/default.nix
new file mode 100644
index 000000000000..498641bbdc30
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gnome-menus/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchurl, pkg-config, gettext, glib, gobject-introspection, gnome }:
+
+stdenv.mkDerivation rec {
+  pname = "gnome-menus";
+  version = "3.36.0";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "07xvaf8s0fiv0035nk8zpzymn5www76w2a1vflrgqmp9plw8yd6r";
+  };
+
+  makeFlags = [
+    "INTROSPECTION_GIRDIR=${placeholder "out"}/share/gir-1.0/"
+    "INTROSPECTION_TYPELIBDIR=${placeholder "out"}/lib/girepository-1.0"
+  ];
+
+  nativeBuildInputs = [ pkg-config gettext gobject-introspection ];
+  buildInputs = [ glib ];
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "none";
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://gitlab.gnome.org/GNOME/gnome-menus";
+    description = "Library that implements freedesktops's Desktop Menu Specification in GNOME";
+    license = with licenses; [ gpl2 lgpl2 ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gnome-online-accounts/default.nix b/nixpkgs/pkgs/development/libraries/gnome-online-accounts/default.nix
new file mode 100644
index 000000000000..6cdc54acd290
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gnome-online-accounts/default.nix
@@ -0,0 +1,105 @@
+{ stdenv
+, lib
+, fetchFromGitLab
+, pkg-config
+, vala
+, glib
+, meson
+, ninja
+, libxslt
+, gtk3
+, enableBackend ? stdenv.isLinux
+, webkitgtk_4_1
+, json-glib
+, librest_1_0
+, libxml2
+, libsecret
+, gtk-doc
+, gobject-introspection
+, gettext
+, icu
+, glib-networking
+, libsoup_3
+, docbook-xsl-nons
+, docbook_xml_dtd_412
+, gnome
+, gcr
+, libkrb5
+, gvfs
+, dbus
+, wrapGAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gnome-online-accounts";
+  version = "3.48.0";
+
+  outputs = [ "out" "dev" ] ++ lib.optionals enableBackend [ "man" "devdoc" ];
+
+  src = fetchFromGitLab {
+    domain = "gitlab.gnome.org";
+    owner = "GNOME";
+    repo = "gnome-online-accounts";
+    rev = version;
+    sha256 = "sha256-USl0Qay9pSgbbp3n/L8eBaRQwaBYledht5j+afmo++o=";
+  };
+
+  mesonFlags = [
+    "-Dfedora=false" # not useful in NixOS or for NixOS users.
+    "-Dgoabackend=${lib.boolToString enableBackend}"
+    "-Dgtk_doc=${lib.boolToString enableBackend}"
+    "-Dman=${lib.boolToString enableBackend}"
+    "-Dmedia_server=true"
+  ];
+
+  nativeBuildInputs = [
+    dbus # used for checks and pkg-config to install dbus service/s
+    docbook_xml_dtd_412
+    docbook-xsl-nons
+    gettext
+    gobject-introspection
+    gtk-doc
+    libxslt
+    meson
+    ninja
+    pkg-config
+    vala
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    gcr
+    glib
+    glib-networking
+    gtk3
+    gvfs # OwnCloud, Google Drive
+    icu
+    json-glib
+    libkrb5
+    librest_1_0
+    libxml2
+    libsecret
+    libsoup_3
+  ] ++ lib.optionals enableBackend [
+    webkitgtk_4_1
+  ];
+
+  env.NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0";
+
+  separateDebugInfo = true;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      versionPolicy = "odd-unstable";
+      packageName = pname;
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://wiki.gnome.org/Projects/GnomeOnlineAccounts";
+    description = "Single sign-on framework for GNOME";
+    platforms = platforms.unix;
+    license = licenses.lgpl2Plus;
+    maintainers = teams.gnome.members;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gnome-video-effects/default.nix b/nixpkgs/pkgs/development/libraries/gnome-video-effects/default.nix
new file mode 100644
index 000000000000..0db1aa27e778
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gnome-video-effects/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv
+, fetchurl
+, pkg-config
+, meson
+, ninja
+, gettext
+, gnome
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gnome-video-effects";
+  version = "0.6.0";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "166utGs/WoMvsuDZC0K/jGFgICylKsmt0Xr84ZLjyKg=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gettext
+  ];
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "none";
+    };
+  };
+
+  meta = with lib; {
+    description = "A collection of GStreamer effects to be used in different GNOME Modules";
+    homepage = "https://wiki.gnome.org/Projects/GnomeVideoEffects";
+    platforms = platforms.unix;
+    maintainers = teams.gnome.members;
+    license = licenses.gpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gnu-config/default.nix b/nixpkgs/pkgs/development/libraries/gnu-config/default.nix
new file mode 100644
index 000000000000..0315f39c6059
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gnu-config/default.nix
@@ -0,0 +1,64 @@
+{ lib, stdenv, fetchurl }:
+
+# 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
+  rev = "28ea239c53a2d5d8800c472bc2452eaa16e37af2";
+
+  # Don't use fetchgit as this is needed during Aarch64 bootstrapping
+  configGuess = fetchurl {
+    name = "config.guess-${builtins.substring 0 7 rev}";
+    url = "https://git.savannah.gnu.org/cgit/config.git/plain/config.guess?id=${rev}";
+    hash = "sha256-7CV3YUJSMm+InfHel7mkV8A6mpSBEEhWPCEaRElti6M=";
+  };
+  configSub = fetchurl {
+    name = "config.sub-${builtins.substring 0 7 rev}";
+    url = "https://git.savannah.gnu.org/cgit/config.git/plain/config.sub?id=${rev}";
+    hash = "sha256-Rlxf5nx9NrcugIgScWRF1NONS5RzTKjTaoY50SMjh4s=";
+  };
+in stdenv.mkDerivation {
+  pname = "gnu-config";
+  version = "2023-09-19";
+
+  unpackPhase = ''
+    runHook preUnpack
+    cp ${configGuess} ./config.guess
+    cp ${configSub} ./config.sub
+    chmod +w ./config.sub ./config.guess
+    runHook postUnpack
+  '';
+
+  # If this isn't set, `pkgs.gnu-config.overrideAttrs( _: { patches
+  # = ...; })` will behave very counterintuitively: the (unpatched)
+  # gnu-config from the updateAutotoolsGnuConfigScriptsHook stdenv's
+  # defaultNativeBuildInputs will "update" the patched gnu-config by
+  # reverting the patch!
+  dontUpdateAutotoolsGnuConfigScripts = true;
+
+  dontConfigure = true;
+  dontBuild = true;
+
+  installPhase = ''
+    runHook preInstall
+    install -Dm755 ./config.guess $out/config.guess
+    install -Dm755 ./config.sub $out/config.sub
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Attempt to guess a canonical system name";
+    homepage = "https://savannah.gnu.org/projects/config";
+    license = licenses.gpl3;
+    # In addition to GPLv3:
+    #   As a special exception to the GNU General Public License, if you
+    #   distribute this file as part of a program that contains a
+    #   configuration script generated by Autoconf, you may include it under
+    #   the same distribution terms that you use for the rest of that
+    #   program.
+    maintainers = with maintainers; [ dezgeg emilytrau ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gnu-efi/default.nix b/nixpkgs/pkgs/development/libraries/gnu-efi/default.nix
new file mode 100644
index 000000000000..e9746271ea27
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gnu-efi/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, buildPackages, fetchurl, pciutils
+, gitUpdater }:
+
+stdenv.mkDerivation rec {
+  pname = "gnu-efi";
+  version = "3.0.15";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/gnu-efi/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-kxole5xcG6Zf9Rnxg3PEOKJoJfLbeGaxY+ltGxaPIOo=";
+  };
+
+  buildInputs = [ pciutils ];
+
+  hardeningDisable = [ "stackprotector" ];
+
+  makeFlags = [
+    "PREFIX=\${out}"
+    "HOSTCC=${buildPackages.stdenv.cc.targetPrefix}cc"
+    "CROSS_COMPILE=${stdenv.cc.targetPrefix}"
+  ];
+
+  postPatch = ''
+    substituteInPlace Make.defaults \
+      --replace "-Werror" ""
+  '';
+
+  passthru.updateScript = gitUpdater {
+    # No nicer place to find latest release.
+    url = "https://git.code.sf.net/p/gnu-efi/code";
+  };
+
+  meta = with lib; {
+    description = "GNU EFI development toolchain";
+    homepage = "https://sourceforge.net/projects/gnu-efi/";
+    license = licenses.bsd3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gnutls/default.nix b/nixpkgs/pkgs/development/libraries/gnutls/default.nix
new file mode 100644
index 000000000000..b8c95653e366
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gnutls/default.nix
@@ -0,0 +1,142 @@
+{ config, lib, stdenv, fetchurl, zlib, lzo, libtasn1, nettle, pkg-config, lzip
+, perl, gmp, autoconf, automake, libidn2, libiconv
+, texinfo
+, unbound, dns-root-data, gettext, util-linux
+, cxxBindings ? !stdenv.hostPlatform.isStatic # tries to link libstdc++.so
+, tpmSupport ? false, trousers, which, nettools, libunistring
+, withP11-kit ? !stdenv.hostPlatform.isStatic, p11-kit
+, Security  # darwin Security.framework
+# certificate compression - only zlib now, more possible: zstd, brotli
+
+# for passthru.tests
+, curlWithGnuTls
+, emacs
+, ffmpeg
+, haskellPackages
+, knot-resolver
+, ngtcp2-gnutls
+, ocamlPackages
+, python3Packages
+, qemu
+, rsyslog
+, openconnect
+, samba
+}:
+
+let
+
+  # XXX: Gnulib's `test-select' fails on FreeBSD:
+  # https://hydra.nixos.org/build/2962084/nixlog/1/raw .
+  doCheck = !stdenv.isFreeBSD && !stdenv.isDarwin
+      && stdenv.buildPlatform == stdenv.hostPlatform;
+
+  inherit (stdenv.hostPlatform) isDarwin;
+in
+
+stdenv.mkDerivation rec {
+  pname = "gnutls";
+  version = "3.8.3";
+
+  src = fetchurl {
+    url = "mirror://gnupg/gnutls/v${lib.versions.majorMinor version}/gnutls-${version}.tar.xz";
+    hash = "sha256-90/FlUsn1Oxt+7Ed6ph4iLWxJCiaNwOvytoO5SD0Fz4=";
+  };
+
+  outputs = [ "bin" "dev" "out" "man" "devdoc" ];
+  # Not normally useful docs.
+  outputInfo = "devdoc";
+  outputDoc  = "devdoc";
+
+  patches = [
+    ./nix-ssl-cert-file.patch
+  ];
+
+  # Skip some tests:
+  #  - pkg-config: building against the result won't work before installing (3.5.11)
+  #  - fastopen: no idea; it broke between 3.6.2 and 3.6.3 (3437fdde6 in particular)
+  #  - trust-store: default trust store path (/etc/ssl/...) is missing in sandbox (3.5.11)
+  #  - psk-file: no idea; it broke between 3.6.3 and 3.6.4
+  # Change p11-kit test to use pkg-config to find p11-kit
+  postPatch = ''
+    sed '2iexit 77' -i tests/{pkgconfig,fastopen}.sh
+    sed '/^void doit(void)/,/^{/ s/{/{ exit(77);/' -i tests/{trust-store,psk-file}.c
+    sed 's:/usr/lib64/pkcs11/ /usr/lib/pkcs11/ /usr/lib/x86_64-linux-gnu/pkcs11/:`pkg-config --variable=p11_module_path p11-kit-1`:' -i tests/p11-kit-trust.sh
+  '' + lib.optionalString stdenv.hostPlatform.isMusl '' # See https://gitlab.com/gnutls/gnutls/-/issues/945
+    sed '2iecho "certtool tests skipped in musl build"\nexit 0' -i tests/cert-tests/certtool.sh
+  '';
+
+  preConfigure = "patchShebangs .";
+  configureFlags =
+    lib.optionals withP11-kit [
+    "--with-default-trust-store-file=/etc/ssl/certs/ca-certificates.crt"
+    "--with-default-trust-store-pkcs11=pkcs11:"
+  ] ++ [
+    "--disable-dependency-tracking"
+    "--enable-fast-install"
+    "--with-unbound-root-key-file=${dns-root-data}/root.key"
+    (lib.withFeature withP11-kit "p11-kit")
+    (lib.enableFeature cxxBindings "cxx")
+  ];
+
+  enableParallelBuilding = true;
+
+  buildInputs = [ lzo lzip libtasn1 libidn2 zlib gmp libunistring unbound gettext libiconv ]
+    ++ lib.optional (withP11-kit) p11-kit
+    ++ lib.optional (tpmSupport && stdenv.isLinux) trousers;
+
+  nativeBuildInputs = [ perl pkg-config texinfo ]
+    ++ lib.optionals doCheck [ which nettools util-linux ];
+
+  propagatedBuildInputs = [ nettle ]
+    # Builds dynamically linking against gnutls seem to need the framework now.
+    ++ lib.optional isDarwin Security;
+
+  inherit doCheck;
+  # stdenv's `NIX_SSL_CERT_FILE=/no-cert-file.crt` breaks tests.
+  # Also empty files won't work, and we want to avoid potentially impure /etc/
+  preCheck = "NIX_SSL_CERT_FILE=${./dummy.crt}";
+
+  # Fixup broken libtool and pkg-config files
+  preFixup = lib.optionalString (!isDarwin) ''
+    sed ${lib.optionalString tpmSupport "-e 's,-ltspi,-L${trousers}/lib -ltspi,'"} \
+        -e 's,-lz,-L${zlib.out}/lib -lz,' \
+        -e 's,-L${gmp.dev}/lib,-L${gmp.out}/lib,' \
+        -e 's,-lgmp,-L${gmp.out}/lib -lgmp,' \
+        -i $out/lib/*.la "$dev/lib/pkgconfig/gnutls.pc"
+  '' + ''
+    # It seems only useful for static linking but basically noone does that.
+    substituteInPlace "$out/lib/libgnutls.la" \
+      --replace "-lunistring" ""
+  '';
+
+  passthru.tests = {
+    inherit ngtcp2-gnutls curlWithGnuTls ffmpeg emacs qemu knot-resolver samba openconnect;
+    inherit (ocamlPackages) ocamlnet;
+    haskell-gnutls = haskellPackages.gnutls;
+    python3-gnutls = python3Packages.python3-gnutls;
+    rsyslog = rsyslog.override { withGnutls = true; };
+  };
+
+  meta = with lib; {
+    description = "The GNU Transport Layer Security Library";
+
+    longDescription = ''
+       GnuTLS is a project that aims to develop a library which
+       provides a secure layer, over a reliable transport
+       layer. Currently the GnuTLS library implements the proposed standards by
+       the IETF's TLS working group.
+
+       Quoting from the TLS protocol specification:
+
+       "The TLS protocol provides communications privacy over the
+       Internet. The protocol allows client/server applications to
+       communicate in a way that is designed to prevent eavesdropping,
+       tampering, or message forgery."
+    '';
+
+    homepage = "https://gnutls.org/";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ vcunat ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gnutls/dummy.crt b/nixpkgs/pkgs/development/libraries/gnutls/dummy.crt
new file mode 100644
index 000000000000..77300f6376b2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gnutls/dummy.crt
@@ -0,0 +1,45 @@
+ACCVRAIZ1
+-----BEGIN CERTIFICATE-----
+MIIH0zCCBbugAwIBAgIIXsO3pkN/pOAwDQYJKoZIhvcNAQEFBQAwQjESMBAGA1UE
+AwwJQUNDVlJBSVoxMRAwDgYDVQQLDAdQS0lBQ0NWMQ0wCwYDVQQKDARBQ0NWMQsw
+CQYDVQQGEwJFUzAeFw0xMTA1MDUwOTM3MzdaFw0zMDEyMzEwOTM3MzdaMEIxEjAQ
+BgNVBAMMCUFDQ1ZSQUlaMTEQMA4GA1UECwwHUEtJQUNDVjENMAsGA1UECgwEQUND
+VjELMAkGA1UEBhMCRVMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCb
+qau/YUqXry+XZpp0X9DZlv3P4uRm7x8fRzPCRKPfmt4ftVTdFXxpNRFvu8gMjmoY
+HtiP2Ra8EEg2XPBjs5BaXCQ316PWywlxufEBcoSwfdtNgM3802/J+Nq2DoLSRYWo
+G2ioPej0RGy9ocLLA76MPhMAhN9KSMDjIgro6TenGEyxCQ0jVn8ETdkXhBilyNpA
+lHPrzg5XPAOBOp0KoVdDaaxXbXmQeOW1tDvYvEyNKKGno6e6Ak4l0Squ7a4DIrhr
+IA8wKFSVf+DuzgpmndFALW4ir50awQUZ0m/A8p/4e7MCQvtQqR0tkw8jq8bBD5L/
+0KIV9VMJcRz/RROE5iZe+OCIHAr8Fraocwa48GOEAqDGWuzndN9wrqODJerWx5eH
+k6fGioozl2A3ED6XPm4pFdahD9GILBKfb6qkxkLrQaLjlUPTAYVtjrs78yM2x/47
+4KElB0iryYl0/wiPgL/AlmXz7uxLaL2diMMxs0Dx6M/2OLuc5NF/1OVYm3z61PMO
+m3WR5LpSLhl+0fXNWhn8ugb2+1KoS5kE3fj5tItQo05iifCHJPqDQsGH+tUtKSpa
+cXpkatcnYGMN285J9Y0fkIkyF/hzQ7jSWpOGYdbhdQrqeWZ2iE9x6wQl1gpaepPl
+uUsXQA+xtrn13k/c4LOsOxFwYIRKQ26ZIMApcQrAZQIDAQABo4ICyzCCAscwfQYI
+KwYBBQUHAQEEcTBvMEwGCCsGAQUFBzAChkBodHRwOi8vd3d3LmFjY3YuZXMvZmls
+ZWFkbWluL0FyY2hpdm9zL2NlcnRpZmljYWRvcy9yYWl6YWNjdjEuY3J0MB8GCCsG
+AQUFBzABhhNodHRwOi8vb2NzcC5hY2N2LmVzMB0GA1UdDgQWBBTSh7Tj3zcnk1X2
+VuqB5TbMjB4/vTAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFNKHtOPfNyeT
+VfZW6oHlNsyMHj+9MIIBcwYDVR0gBIIBajCCAWYwggFiBgRVHSAAMIIBWDCCASIG
+CCsGAQUFBwICMIIBFB6CARAAQQB1AHQAbwByAGkAZABhAGQAIABkAGUAIABDAGUA
+cgB0AGkAZgBpAGMAYQBjAGkA8wBuACAAUgBhAO0AegAgAGQAZQAgAGwAYQAgAEEA
+QwBDAFYAIAAoAEEAZwBlAG4AYwBpAGEAIABkAGUAIABUAGUAYwBuAG8AbABvAGcA
+7QBhACAAeQAgAEMAZQByAHQAaQBmAGkAYwBhAGMAaQDzAG4AIABFAGwAZQBjAHQA
+cgDzAG4AaQBjAGEALAAgAEMASQBGACAAUQA0ADYAMAAxADEANQA2AEUAKQAuACAA
+QwBQAFMAIABlAG4AIABoAHQAdABwADoALwAvAHcAdwB3AC4AYQBjAGMAdgAuAGUA
+czAwBggrBgEFBQcCARYkaHR0cDovL3d3dy5hY2N2LmVzL2xlZ2lzbGFjaW9uX2Mu
+aHRtMFUGA1UdHwROMEwwSqBIoEaGRGh0dHA6Ly93d3cuYWNjdi5lcy9maWxlYWRt
+aW4vQXJjaGl2b3MvY2VydGlmaWNhZG9zL3JhaXphY2N2MV9kZXIuY3JsMA4GA1Ud
+DwEB/wQEAwIBBjAXBgNVHREEEDAOgQxhY2N2QGFjY3YuZXMwDQYJKoZIhvcNAQEF
+BQADggIBAJcxAp/n/UNnSEQU5CmH7UwoZtCPNdpNYbdKl02125DgBS4OxnnQ8pdp
+D70ER9m+27Up2pvZrqmZ1dM8MJP1jaGo/AaNRPTKFpV8M9xii6g3+CfYCS0b78gU
+JyCpZET/LtZ1qmxNYEAZSUNUY9rizLpm5U9EelvZaoErQNV/+QEnWCzI7UiRfD+m
+AM/EKXMRNt6GGT6d7hmKG9Ww7Y49nCrADdg9ZuM8Db3VlFzi4qc1GwQA9j9ajepD
+vV+JHanBsMyZ4k0ACtrJJ1vnE5Bc5PUzolVt3OAJTS+xJlsndQAJxGJ3KQhfnlms
+tn6tn1QwIgPBHnFk/vk4CpYY3QIUrCPLBhwepH2NDd4nQeit2hW3sCPdK6jT2iWH
+7ehVRE2I9DZ+hJp4rPcOVkkO1jMl1oRQQmwgEh0q1b688nCBpHBgvgW1m54ERL5h
+I6zppSSMEYCUWqKiuUnSwdzRp+0xESyeGabu4VXhwOrPDYTkF7eifKXeVSUG7szA
+h1xA2syVP1XgNce4hL60Xc16gwFy7ofmXx2utYXGJt/mwZrpHgJHnyqobalbz+xF
+d3+YJ5oyXSrjhO7FmGYvliAd3djDJ9ew+f7Zfc3Qn48LFFhRny+Lwzgt3uiP1o2H
+pPVWQxaZLPSkVrQ0uGE3ycJYgBugl6H8WY3pEfbRD0tVNEYqi4Y7
+-----END CERTIFICATE-----
diff --git a/nixpkgs/pkgs/development/libraries/gnutls/nix-ssl-cert-file.patch b/nixpkgs/pkgs/development/libraries/gnutls/nix-ssl-cert-file.patch
new file mode 100644
index 000000000000..c0f27f7b5a45
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gnutls/nix-ssl-cert-file.patch
@@ -0,0 +1,17 @@
+allow overriding system trust store location via $NIX_SSL_CERT_FILE
+
+--- a/lib/system/certs.c
++++ b/lib/system/certs.c
+@@ -404,6 +404,10 @@ gnutls_x509_trust_list_add_system_trust(gnutls_x509_trust_list_t list,
+ 					unsigned int tl_flags,
+ 					unsigned int tl_vflags)
+ {
+-	return add_system_trust(list, tl_flags | GNUTLS_TL_NO_DUPLICATES,
+-				tl_vflags);
++	tl_flags = tl_flags|GNUTLS_TL_NO_DUPLICATES;
++	const char *file = secure_getenv("NIX_SSL_CERT_FILE");
++	return file
++		? gnutls_x509_trust_list_add_trust_file(
++			list, file, NULL/*CRL*/, GNUTLS_X509_FMT_PEM, tl_flags, tl_vflags)
++		: add_system_trust(list, tl_flags, tl_vflags);
+ }
diff --git a/nixpkgs/pkgs/development/libraries/gobject-introspection/absolute_gir_path.patch b/nixpkgs/pkgs/development/libraries/gobject-introspection/absolute_gir_path.patch
new file mode 100644
index 000000000000..f74a7af1cff4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gobject-introspection/absolute_gir_path.patch
@@ -0,0 +1,13 @@
+diff --git a/gir/cairo-1.0.gir.in b/gir/cairo-1.0.gir.in
+index e4c9fb3d..3351b184 100644
+--- a/gir/cairo-1.0.gir.in
++++ b/gir/cairo-1.0.gir.in
+@@ -6,7 +6,7 @@
+   <package name="@CAIRO_GIR_PACKAGE@"/>
+   <c:include name="cairo-gobject.h"/>
+   <namespace name="cairo" version="1.0"
+-	     shared-library="@CAIRO_SHARED_LIBRARY@"
++	     shared-library="@cairoLib@/@CAIRO_SHARED_LIBRARY@"
+ 	     c:identifier-prefixes="cairo"
+ 	     c:symbol-prefixes="cairo">
+     <record name="Context" c:type="cairo_t" foreign="1"
diff --git a/nixpkgs/pkgs/development/libraries/gobject-introspection/absolute_shlib_path.patch b/nixpkgs/pkgs/development/libraries/gobject-introspection/absolute_shlib_path.patch
new file mode 100644
index 000000000000..b6dc66fc66b1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gobject-introspection/absolute_shlib_path.patch
@@ -0,0 +1,192 @@
+diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
+index 64575557..1eb0a2b4 100644
+--- a/giscanner/scannermain.py
++++ b/giscanner/scannermain.py
+@@ -95,6 +95,39 @@ def get_windows_option_group(parser):
+     return group
+ 
+ 
++def _get_default_fallback_libpath():
++    # Newer multiple-output-optimized stdenv has an environment variable
++    # $outputLib which in turn specifies another variable which then is used as
++    # the destination for the library contents (${!outputLib}/lib).
++    store_path = os.environ.get(os.environ.get("outputLib")) if "outputLib" in os.environ else None
++    if store_path is None:
++        outputs = os.environ.get("outputs", "out").split()
++        if "lib" in outputs:
++            # For multiple output derivations let's try whether there is a $lib
++            # environment variable and use that as the base store path.
++            store_path = os.environ.get("lib")
++        elif "out" in outputs:
++            # Otherwise we have a single output derivation, so the libraries
++            # most certainly will end up in "$out/lib".
++            store_path = os.environ.get("out")
++
++    if store_path is not None:
++        # Even if we have a $lib as output, there still should be a $lib/lib
++        # directory.
++        return os.path.join(store_path, 'lib')
++    else:
++        # If we haven't found a possible scenario, let's return an empty string
++        # so that the shared library won't be prepended with a path.
++        #
++        # Note that this doesn't mean that all hope is lost, because after all
++        # we can still use --fallback-library-path to set one.
++        #
++        # Also, we're not returning None, because that would make it very
++        # difficult to disable adding fallback paths altogether using something
++        # like: --fallback-library-path=""
++        return ""
++
++
+ def _get_option_parser():
+     parser = optparse.OptionParser('%prog [options] sources',
+                                    version='%prog ' + giscanner.__version__)
+@@ -214,6 +247,10 @@ match the namespace prefix.""")
+     parser.add_option("", "--c-include",
+                       action="append", dest="c_includes", default=[],
+                       help="headers which should be included in C programs")
++    parser.add_option("", "--fallback-library-path",
++                      action="store", dest="fallback_libpath",
++                      default=_get_default_fallback_libpath(),
++                      help="Path to prepend to unknown shared libraries")
+     parser.add_option("", "--filelist",
+                       action="store", dest="filelist", default=[],
+                       help="file containing headers and sources to be scanned")
+diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py
+index 9f8ab5df..af325022 100644
+--- a/giscanner/shlibs.py
++++ b/giscanner/shlibs.py
+@@ -57,6 +57,12 @@ def _ldd_library_pattern(library_name):
+     $""" % re.escape(library_name), re.VERBOSE)
+ 
+ 
++def _ldd_library_nix_pattern(library_name):
++    nix_store_dir = re.escape('@nixStoreDir@'.rstrip('/'))
++    pattern = r'(%s(?:/[^/]*)+lib%s[^A-Za-z0-9_-][^\s\(\)]*)'
++    return re.compile(pattern % (nix_store_dir, re.escape(library_name)))
++
++
+ # This is a what we do for non-la files. We assume that we are on an
+ # ELF-like system where ldd exists and the soname extracted with ldd is
+ # a filename that can be opened with dlopen().
+@@ -108,7 +114,8 @@ def _resolve_non_libtool(options, binary, libraries):
+             output = output.decode("utf-8", "replace")
+ 
+         shlibs = resolve_from_ldd_output(libraries, output)
+-        return list(map(sanitize_shlib_path, shlibs))
++        fallback_libpath = options.fallback_libpath or "";
++        return list(map(lambda p: os.path.join(fallback_libpath, p), map(sanitize_shlib_path, shlibs)))
+ 
+ 
+ def sanitize_shlib_path(lib):
+@@ -117,19 +124,18 @@ def sanitize_shlib_path(lib):
+     # In case we get relative paths on macOS (like @rpath) then we fall
+     # back to the basename as well:
+     # https://gitlab.gnome.org/GNOME/gobject-introspection/issues/222
+-    if sys.platform == "darwin":
+-        if not os.path.isabs(lib):
+-            return os.path.basename(lib)
+-        return lib
+-    else:
++
++    # Always use absolute paths if available
++    if not os.path.isabs(lib):
+         return os.path.basename(lib)
++    return lib
+ 
+ 
+ def resolve_from_ldd_output(libraries, output):
+     patterns = {}
+     for library in libraries:
+         if not os.path.isfile(library):
+-            patterns[library] = _ldd_library_pattern(library)
++            patterns[library] = (_ldd_library_pattern(library), _ldd_library_nix_pattern(library))
+     if len(patterns) == 0:
+         return []
+ 
+@@ -141,8 +147,11 @@ def resolve_from_ldd_output(libraries, output):
+         if line.endswith(':'):
+             continue
+         for word in line.split():
+-            for library, pattern in patterns.items():
+-                m = pattern.match(word)
++            for library, (pattern, nix_pattern) in patterns.items():
++                if line.find('@nixStoreDir@') != -1:
++                    m = nix_pattern.match(word)
++                else:
++                    m = pattern.match(word)
+                 if m:
+                     del patterns[library]
+                     shlibs.append(m.group())
+diff --git a/giscanner/utils.py b/giscanner/utils.py
+index 31c7ea48..630002a8 100644
+--- a/giscanner/utils.py
++++ b/giscanner/utils.py
+@@ -114,16 +114,11 @@ def extract_libtool_shlib(la_file):
+     if dlname is None:
+         return None
+ 
+-    # Darwin uses absolute paths where possible; since the libtool files never
+-    # contain absolute paths, use the libdir field
+-    if platform.system() == 'Darwin':
+-        dlbasename = os.path.basename(dlname)
+-        libdir = _extract_libdir_field(la_file)
+-        if libdir is None:
+-            return dlbasename
+-        return libdir + '/' + dlbasename
+-    # Older libtools had a path rather than the raw dlname
+-    return os.path.basename(dlname)
++    dlbasename = os.path.basename(dlname)
++    libdir = _extract_libdir_field(la_file)
++    if libdir is None:
++        return dlbasename
++    return libdir + '/' + dlbasename
+ 
+ 
+ # Returns arguments for invoking libtool, if applicable, otherwise None
+diff --git a/tests/scanner/test_shlibs.py b/tests/scanner/test_shlibs.py
+index a8337c60..72789d76 100644
+--- a/tests/scanner/test_shlibs.py
++++ b/tests/scanner/test_shlibs.py
+@@ -7,6 +7,30 @@ from giscanner.shlibs import resolve_from_ldd_output, sanitize_shlib_path
+ 
+ class TestLddParser(unittest.TestCase):
+ 
++    def test_resolve_from_ldd_output_nix(self):
++        output = '''\
++            libglib-2.0.so.0 => @nixStoreDir@/gmrf09y7sfxrr0mcx90dba7w41jj2kzk-glib-2.58.1/lib/libglib-2.0.so.0 (0x00007f0ee1b28000)
++            libgobject-2.0.so.0 => @nixStoreDir@/gmrf09y7sfxrr0mcx90dba7w41jj2kzk-glib-2.58.1/lib/libgobject-2.0.so.0 (0x00007f0ee18cf000)
++            libgio-2.0.so.0 => @nixStoreDir@/gmrf09y7sfxrr0mcx90dba7w41jj2kzk-glib-2.58.1/lib/libgio-2.0.so.0 (0x00007f0ee1502000)
++            libxml2.so.2 => @nixStoreDir@/72mxkk74cv266snkjpz1kwl1i2rg8rpc-libxml2-2.9.8/lib/libxml2.so.2 (0x00007f0ee119c000)
++            libsqlite3.so.0 => @nixStoreDir@/ck5ay23hsmlc67pg3m34kzd1k2hhvww0-sqlite-3.24.0/lib/libsqlite3.so.0 (0x00007f0ee0e98000)
++            libpsl.so.5 => @nixStoreDir@/qn3l2gn7m76f318676wflrs2z6d4rrkj-libpsl-0.20.2-list-2017-02-03/lib/libpsl.so.5 (0x00007f0ee0c88000)
++            libc.so.6 => @nixStoreDir@/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6 (0x00007f0ee08d4000)
++            libpcre.so.1 => @nixStoreDir@/hxbq8lpc53qsf1bc0dfcsm47wmcxzjvh-pcre-8.42/lib/libpcre.so.1 (0x00007f0ee0662000)
++            @nixStoreDir@/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib64/ld-linux-x86-64.so.2 (0x00007f0ee20ff000)
++            libblkid.so.1 => @nixStoreDir@/q0kgnq21j0l2yd77gdlld371246cwghh-util-linux-2.32.1/lib/libblkid.so.1 (0x00007f0edd0cd000)
++            libuuid.so.1 => @nixStoreDir@/q0kgnq21j0l2yd77gdlld371246cwghh-util-linux-2.32.1/lib/libuuid.so.1 (0x00007f0edcec5000)
++            librt.so.1 => @nixStoreDir@/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/librt.so.1 (0x00007f0edccbd000)
++            libstdc++.so.6 => @nixStoreDir@/3v5r7fkrbkw2qajadvjbf6p6qriz9p1i-gcc-7.3.0-lib/lib/libstdc++.so.6 (0x00007f0edc936000)
++            libgcc_s.so.1 => @nixStoreDir@/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libgcc_s.so.1 (0x00007f0edc720000)
++        '''
++        libraries = ['glib-2.0', 'gio-2.0']
++
++        self.assertEqual(
++            ['@nixStoreDir@/gmrf09y7sfxrr0mcx90dba7w41jj2kzk-glib-2.58.1/lib/libglib-2.0.so.0',
++             '@nixStoreDir@/gmrf09y7sfxrr0mcx90dba7w41jj2kzk-glib-2.58.1/lib/libgio-2.0.so.0'],
++            resolve_from_ldd_output(libraries, output))
++
+     def test_resolve_from_ldd_output(self):
+         output = '''\
+             libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fbe12d68000)
+@@ -40,7 +64,8 @@ class TestLddParser(unittest.TestCase):
+ 
+         self.assertEqual(
+             sanitize_shlib_path('/foo/bar'),
+-            '/foo/bar' if sys.platform == 'darwin' else 'bar')
++            # NixOS always want the absolute path
++            '/foo/bar')
+ 
+     def test_unresolved_library(self):
+         output = ''
diff --git a/nixpkgs/pkgs/development/libraries/gobject-introspection/default.nix b/nixpkgs/pkgs/development/libraries/gobject-introspection/default.nix
new file mode 100644
index 000000000000..3817d8bb9ced
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gobject-introspection/default.nix
@@ -0,0 +1,172 @@
+{ stdenv
+, lib
+, fetchurl
+, glib
+, flex
+, bison
+, meson
+, ninja
+, gtk-doc
+, docbook-xsl-nons
+, docbook_xml_dtd_43
+, docbook_xml_dtd_45
+, pkg-config
+, libffi
+, python3
+, cctools
+, cairo
+, gnome
+, substituteAll
+, buildPackages
+, gobject-introspection-unwrapped
+, nixStoreDir ? builtins.storeDir
+, x11Support ? true
+, testers
+}:
+
+# now that gobject-introspection creates large .gir files (eg gtk3 case)
+# it may be worth thinking about using multiple derivation outputs
+# In that case its about 6MB which could be separated
+
+let
+  pythonModules = pp: [
+    pp.mako
+    pp.markdown
+  ];
+in
+stdenv.mkDerivation (finalAttrs: {
+  pname = "gobject-introspection";
+  version = "1.78.1";
+
+  # outputs TODO: share/gobject-introspection-1.0/tests is needed during build
+  # by pygobject3 (and maybe others), but it's only searched in $out
+  outputs = [ "out" "dev" "devdoc" "man" ];
+  outputBin = "dev";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/gobject-introspection/${lib.versions.majorMinor finalAttrs.version}/gobject-introspection-${finalAttrs.version}.tar.xz";
+    sha256 = "vXur2Zr3JY52gZ5Fukprw5lgj+di2D/ePKwDPFCEG7Q=";
+  };
+
+  patches = [
+    # Make g-ir-scanner put absolute path to GIR files it generates
+    # so that programs can just dlopen them without having to muck
+    # with LD_LIBRARY_PATH environment variable.
+    (substituteAll {
+      src = ./absolute_shlib_path.patch;
+      inherit nixStoreDir;
+    })
+  ] ++ lib.optionals x11Support [
+    # Hardcode the cairo shared library path in the Cairo gir shipped with this package.
+    # https://github.com/NixOS/nixpkgs/issues/34080
+    (substituteAll {
+      src = ./absolute_gir_path.patch;
+      cairoLib = "${lib.getLib cairo}/lib";
+    })
+  ];
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    flex
+    bison
+    gtk-doc
+    docbook-xsl-nons
+    docbook_xml_dtd_45
+    # Build definition checks for the Python modules needed at runtime by importing them.
+    (buildPackages.python3.withPackages pythonModules)
+    finalAttrs.setupHook # move .gir files
+    # can't use canExecute, we need prebuilt when cross
+  ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ gobject-introspection-unwrapped ];
+
+  buildInputs = [
+    (python3.withPackages pythonModules)
+  ];
+
+  nativeCheckInputs = lib.optionals stdenv.isDarwin [
+    cctools # for otool
+  ];
+
+  propagatedBuildInputs = [
+    libffi
+    glib
+  ];
+
+  mesonFlags = [
+    "--datadir=${placeholder "dev"}/share"
+    "-Dcairo=disabled"
+    "-Dgtk_doc=${lib.boolToString (stdenv.hostPlatform == stdenv.buildPlatform)}"
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    "-Dgi_cross_ldd_wrapper=${substituteAll {
+      name = "g-ir-scanner-lddwrapper";
+      isExecutable = true;
+      src = ./wrappers/g-ir-scanner-lddwrapper.sh;
+      inherit (buildPackages) bash;
+      buildlddtree = "${buildPackages.pax-utils}/bin/lddtree";
+    }}"
+    "-Dgi_cross_binary_wrapper=${stdenv.hostPlatform.emulator buildPackages}"
+    # can't use canExecute, we need prebuilt when cross
+  ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
+    "-Dgi_cross_use_prebuilt_gi=true"
+  ];
+
+  doCheck = !stdenv.isAarch64;
+
+  # During configurePhase, two python scripts are generated and need this. See
+  # https://github.com/NixOS/nixpkgs/pull/98316#issuecomment-695785692
+  postConfigure = ''
+    patchShebangs tools/*
+  '';
+
+  postInstall = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
+    cp -r ${buildPackages.gobject-introspection-unwrapped.devdoc} $devdoc
+    # these are uncompiled c and header files which aren't installed when cross-compiling because
+    # code that installs them is in tests/meson.build which is only run when not cross-compiling
+    # pygobject3 needs them
+    cp -r ${buildPackages.gobject-introspection-unwrapped.dev}/share/gobject-introspection-1.0/tests $dev/share/gobject-introspection-1.0/tests
+  '';
+
+  preCheck = ''
+    # Our gobject-introspection patches make the shared library paths absolute
+    # in the GIR files. When running tests, the library is not yet installed,
+    # though, so we need to replace the absolute path with a local one during build.
+    # We are using a symlink that we will delete before installation.
+    mkdir -p $out/lib
+    ln -s $PWD/tests/scanner/libregress-1.0${stdenv.targetPlatform.extensions.sharedLibrary} $out/lib/libregress-1.0${stdenv.targetPlatform.extensions.sharedLibrary}
+  '';
+
+  postCheck = ''
+    rm $out/lib/libregress-1.0${stdenv.targetPlatform.extensions.sharedLibrary}
+  '';
+
+  setupHook = ./setup-hook.sh;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = "gobject-introspection";
+      versionPolicy = "odd-unstable";
+    };
+    tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+  };
+
+  meta = with lib; {
+    description = "A middleware layer between C libraries and language bindings";
+    homepage = "https://gi.readthedocs.io/";
+    maintainers = teams.gnome.members ++ (with maintainers; [ lovek323 artturin ]);
+    pkgConfigModules = [ "gobject-introspection-1.0" ];
+    platforms = platforms.unix;
+    badPlatforms = [ lib.systems.inspect.platformPatterns.isStatic ];
+    license = with licenses; [ gpl2 lgpl2 ];
+
+    longDescription = ''
+      GObject introspection is a middleware layer between C libraries (using
+      GObject) and language bindings. The C library can be scanned at compile
+      time and generate a metadata file, in addition to the actual native C
+      library. Then at runtime, language bindings can read this metadata and
+      automatically provide bindings to call into the C library.
+    '';
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/gobject-introspection/setup-hook.sh b/nixpkgs/pkgs/development/libraries/gobject-introspection/setup-hook.sh
new file mode 100644
index 000000000000..50571a8f914d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gobject-introspection/setup-hook.sh
@@ -0,0 +1,34 @@
+make_gobject_introspection_find_gir_files() {
+    # required for .typelib files, eg mypaint git version
+    if [ -d "$1/lib/girepository-1.0" ]; then
+      addToSearchPath GI_TYPELIB_PATH $1/lib/girepository-1.0
+    fi
+
+    # XDG_DATA_DIRS: required for finding .gir files
+    if [ -d "$1/share/gir-1.0" ]; then
+      addToSearchPath XDG_DATA_DIRS $1/share
+    fi
+}
+
+addEnvHooks "$targetOffset" make_gobject_introspection_find_gir_files
+
+giDiscoverSelf() {
+    if [ -d "$prefix/lib/girepository-1.0" ]; then
+      addToSearchPath GI_TYPELIB_PATH $prefix/lib/girepository-1.0
+    fi
+}
+
+# gappsWrapperArgsHook expects GI_TYPELIB_PATH variable to be set by this.
+# Until we have dependency mechanism in generic builder, we need to use this ugly hack.
+if [[ " ${preFixupPhases:-} " =~ " gappsWrapperArgsHook " ]]; then
+    preFixupPhases+=" "
+    preFixupPhases="${preFixupPhases/ gappsWrapperArgsHook / giDiscoverSelf gappsWrapperArgsHook }"
+else
+    preFixupPhases+=" giDiscoverSelf"
+fi
+
+_multioutMoveGlibGir() {
+  moveToOutput share/gir-1.0 "${!outputDev}"
+}
+
+preFixupHooks+=(_multioutMoveGlibGir)
diff --git a/nixpkgs/pkgs/development/libraries/gobject-introspection/wrapper.nix b/nixpkgs/pkgs/development/libraries/gobject-introspection/wrapper.nix
new file mode 100644
index 000000000000..53b1a35f8212
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gobject-introspection/wrapper.nix
@@ -0,0 +1,105 @@
+{ lib
+, stdenv
+, buildPackages
+, targetPackages
+, gobject-introspection-unwrapped
+, ...
+}@_args:
+
+# to build, run
+# `nix build ".#pkgsCross.aarch64-multiplatform.buildPackages.gobject-introspection"`
+
+# a comment for both depsTargetTargetPropagated's
+# add self to buildInputs to avoid needing to add gobject-introspection to buildInputs in addition to nativeBuildInputs
+# builds use target-pkg-config to look for gobject-introspection instead of just looking for binaries in $PATH
+
+let
+  # ensure that `.override` works
+  args = builtins.removeAttrs _args [ "buildPackages" "targetPackages" "gobject-introspection-unwrapped" ];
+  # passing this stdenv to `targetPackages...` breaks due to splicing not working in `.override``
+  argsForTarget = builtins.removeAttrs args [ "stdenv" ];
+
+  overriddenUnwrappedGir = gobject-introspection-unwrapped.override args;
+  # if we have targetPackages.gobject-introspection then propagate that
+  overridenTargetUnwrappedGir =
+    if targetPackages ? gobject-introspection-unwrapped
+    then targetPackages.gobject-introspection-unwrapped.override argsForTarget
+    else overriddenUnwrappedGir;
+in
+
+# wrap both pkgsCrossX.buildPackages.gobject-introspection and {pkgs,pkgsSomethingExecutableOnBuildSystem).buildPackages.gobject-introspection
+if (!stdenv.hostPlatform.canExecute stdenv.targetPlatform) && stdenv.targetPlatform.emulatorAvailable buildPackages
+then
+  overriddenUnwrappedGir.overrideAttrs
+    (previousAttrs:
+      {
+
+        pname = "gobject-introspection-wrapped";
+        passthru = previousAttrs.passthru // {
+          unwrapped = overriddenUnwrappedGir;
+        };
+        dontStrip = true;
+        depsTargetTargetPropagated = [ overridenTargetUnwrappedGir ];
+        buildCommand = ''
+          eval fixupPhase
+          ${lib.concatMapStrings (output: ''
+            mkdir -p ${"$" + "${output}"}
+            ${lib.getExe buildPackages.xorg.lndir} ${overriddenUnwrappedGir.${output}} ${"$" + "${output}"}
+          '') overriddenUnwrappedGir.outputs}
+
+          cp $dev/bin/g-ir-compiler $dev/bin/.g-ir-compiler-wrapped
+          cp $dev/bin/g-ir-scanner $dev/bin/.g-ir-scanner-wrapped
+
+          (
+            rm "$dev/bin/g-ir-compiler"
+            rm "$dev/bin/g-ir-scanner"
+            export bash="${buildPackages.bash}"
+            export emulator=${lib.escapeShellArg (stdenv.targetPlatform.emulator buildPackages)}
+            export emulatorwrapper="$dev/bin/g-ir-scanner-qemuwrapper"
+            export buildlddtree="${buildPackages.pax-utils}/bin/lddtree"
+
+            export targetgir="${lib.getDev overridenTargetUnwrappedGir}"
+
+            substituteAll "${./wrappers/g-ir-compiler.sh}" "$dev/bin/g-ir-compiler"
+            substituteAll "${./wrappers/g-ir-scanner.sh}" "$dev/bin/g-ir-scanner"
+            substituteAll "${./wrappers/g-ir-scanner-lddwrapper.sh}" "$dev/bin/g-ir-scanner-lddwrapper"
+            substituteAll "${./wrappers/g-ir-scanner-qemuwrapper.sh}" "$dev/bin/g-ir-scanner-qemuwrapper"
+            chmod +x $dev/bin/g-ir-compiler
+            chmod +x $dev/bin/g-ir-scanner*
+          )
+        ''
+        # when cross-compiling and using the wrapper then when a package looks up the g_ir_X
+        # variable with pkg-config they'll get the host version which can't be run
+        # override the variable to use the absolute path to g_ir_X in PATH which can be run
+        + ''
+          cat >> $dev/nix-support/setup-hook <<-'EOF'
+            override-pkg-config-gir-variables() {
+              PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_G_IR_SCANNER="$(type -p g-ir-scanner)"
+              PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_G_IR_COMPILER="$(type -p g-ir-compiler)"
+              PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_G_IR_GENERATE="$(type -p g-ir-generate)"
+              export PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_G_IR_SCANNER
+              export PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_G_IR_COMPILER
+              export PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_G_IR_GENERATE
+            }
+
+            preConfigureHooks+=(override-pkg-config-gir-variables)
+          EOF
+        '';
+      })
+else
+  overriddenUnwrappedGir.overrideAttrs (previousAttrs:
+    {
+      pname = "gobject-introspection-wrapped";
+      passthru = previousAttrs.passthru // {
+        unwrapped = overriddenUnwrappedGir;
+      };
+      dontStrip = true;
+      depsTargetTargetPropagated = [ overridenTargetUnwrappedGir ];
+      buildCommand = ''
+        eval fixupPhase
+        ${lib.concatMapStrings (output: ''
+          mkdir -p ${"$" + "${output}"}
+          ${lib.getExe buildPackages.xorg.lndir} ${overriddenUnwrappedGir.${output}} ${"$" + "${output}"}
+        '') overriddenUnwrappedGir.outputs}
+      '';
+    })
diff --git a/nixpkgs/pkgs/development/libraries/gobject-introspection/wrappers/g-ir-compiler.sh b/nixpkgs/pkgs/development/libraries/gobject-introspection/wrappers/g-ir-compiler.sh
new file mode 100644
index 000000000000..e82de18cae3d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gobject-introspection/wrappers/g-ir-compiler.sh
@@ -0,0 +1,4 @@
+#! @bash@/bin/bash
+# shellcheck shell=bash
+
+exec @emulatorwrapper@ @targetgir@/bin/g-ir-compiler "$@"
diff --git a/nixpkgs/pkgs/development/libraries/gobject-introspection/wrappers/g-ir-scanner-lddwrapper.sh b/nixpkgs/pkgs/development/libraries/gobject-introspection/wrappers/g-ir-scanner-lddwrapper.sh
new file mode 100644
index 000000000000..f9c2a29f1442
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gobject-introspection/wrappers/g-ir-scanner-lddwrapper.sh
@@ -0,0 +1,4 @@
+#! @bash@/bin/bash
+# shellcheck shell=bash
+
+exec @buildlddtree@ "$@"
diff --git a/nixpkgs/pkgs/development/libraries/gobject-introspection/wrappers/g-ir-scanner-qemuwrapper.sh b/nixpkgs/pkgs/development/libraries/gobject-introspection/wrappers/g-ir-scanner-qemuwrapper.sh
new file mode 100644
index 000000000000..9b407bc4144a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gobject-introspection/wrappers/g-ir-scanner-qemuwrapper.sh
@@ -0,0 +1,23 @@
+#! @bash@/bin/bash
+# shellcheck shell=bash
+
+# fixes issues like
+# libdbusmenu-gtk3-aarch64-unknown-linux-gnu> /build/libdbusmenu-16.04.0/libdbusmenu-gtk/tmp-introspect2jhtiwwn/.libs/DbusmenuGtk3-0.4:
+# error while loading shared libraries: libdbusmenu-glib.so.4: cannot open shared object file: No such file or directory
+# in non-meson builds
+
+# see: https://github.com/void-linux/void-packages/blob/master/srcpkgs/gobject-introspection/files/g-ir-scanner-qemuwrapper
+# https://github.com/openembedded/openembedded-core/blob/c5a14f39a6717a99b510cb97aa2fb403d4b98d99/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.72.0.bb#L74
+while read -r d; do \
+    # some meson projects may have subprojects which use makefiles for docs(e.g. gi-docgen), ignore those as they will never be needed
+    if [[ -f "$d/Makefile" && "$d" != *"subproject"* ]]; then
+        GIR_EXTRA_LIBS_PATH="$(readlink -f "$d/.libs"):$GIR_EXTRA_LIBS_PATH"
+        export GIR_EXTRA_LIBS_PATH
+    fi
+done < <(find "$NIX_BUILD_TOP" -type d)
+
+# quoting broke the build of atk
+# shellcheck disable=2086
+exec @emulator@ ${GIR_EXTRA_OPTIONS:-} \
+    ${GIR_EXTRA_LIBS_PATH:+-E LD_LIBRARY_PATH="${GIR_EXTRA_LIBS_PATH}"} \
+    "$@"
diff --git a/nixpkgs/pkgs/development/libraries/gobject-introspection/wrappers/g-ir-scanner.sh b/nixpkgs/pkgs/development/libraries/gobject-introspection/wrappers/g-ir-scanner.sh
new file mode 100644
index 000000000000..7843bb91db97
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gobject-introspection/wrappers/g-ir-scanner.sh
@@ -0,0 +1,7 @@
+#! @bash@/bin/bash
+# shellcheck shell=bash
+
+exec @dev@/bin/.g-ir-scanner-wrapped \
+    --use-binary-wrapper=@emulatorwrapper@ \
+    --use-ldd-wrapper=@dev@/bin/g-ir-scanner-lddwrapper \
+    "$@"
diff --git a/nixpkgs/pkgs/development/libraries/goffice/default.nix b/nixpkgs/pkgs/development/libraries/goffice/default.nix
new file mode 100644
index 000000000000..2d25a6d9e4d6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/goffice/default.nix
@@ -0,0 +1,51 @@
+{ fetchurl, lib, stdenv, pkg-config, intltool, glib, gtk3, lasem
+, libgsf, libxml2, libxslt, cairo, pango, librsvg, gnome
+, autoreconfHook
+, gtk-doc
+}:
+
+stdenv.mkDerivation rec {
+  pname = "goffice";
+  version = "0.10.56";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "uGQKL+4MCld4SypbkpRKKTLHidsQOd31ommtY0eW5+I=";
+  };
+
+  nativeBuildInputs = [
+    pkg-config intltool autoreconfHook gtk-doc
+    glib  # for glib-genmarshal
+  ];
+
+  propagatedBuildInputs = [
+    glib gtk3 libxml2 cairo pango libgsf lasem
+  ];
+
+  buildInputs = [ libxslt librsvg ];
+
+  enableParallelBuilding = true;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = {
+    description = "A Glib/GTK set of document centric objects and utilities";
+
+    longDescription = ''
+      There are common operations for document centric applications that are
+      conceptually simple, but complex to implement fully: plugins, load/save
+      documents, undo/redo.
+    '';
+
+    license = lib.licenses.gpl2Plus;
+
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gom/default.nix b/nixpkgs/pkgs/development/libraries/gom/default.nix
new file mode 100644
index 000000000000..3cb7e9bd6fcb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gom/default.nix
@@ -0,0 +1,64 @@
+{ lib, stdenv
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, glib
+, python3
+, sqlite
+, gdk-pixbuf
+, gnome
+, gobject-introspection
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gom";
+  version = "0.4";
+
+  outputs = [ "out" "py" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "17ca07hpg7dqxjn0jpqim3xqcmplk2a87wbwrrlq3dd3m8381l38";
+  };
+
+  patches = [
+    ./longer-stress-timeout.patch
+  ];
+
+  nativeBuildInputs = [
+    gobject-introspection
+    meson
+    ninja
+    pkg-config
+  ];
+
+  buildInputs = [
+    gdk-pixbuf
+    glib
+    sqlite
+    python3.pkgs.pygobject3
+  ];
+
+  mesonFlags = [
+    "-Dpygobject-override-dir=${placeholder "py"}/${python3.sitePackages}/gi/overrides"
+  ];
+
+  # Success is more likely on x86_64
+  doCheck = stdenv.isx86_64;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    description = "A GObject to SQLite object mapper";
+    homepage = "https://wiki.gnome.org/Projects/Gom";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.unix;
+    maintainers = teams.gnome.members;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gom/longer-stress-timeout.patch b/nixpkgs/pkgs/development/libraries/gom/longer-stress-timeout.patch
new file mode 100644
index 000000000000..3dcd1d0a107f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gom/longer-stress-timeout.patch
@@ -0,0 +1,13 @@
+diff --git a/tests/meson.build b/tests/meson.build
+index 1df4884..d7a6f5d 100644
+--- a/tests/meson.build
++++ b/tests/meson.build
+@@ -25,7 +25,7 @@ test('test-gom-find', test_find)
+ 
+ test_stress = executable('test-gom-stress', 'test-gom-stress.c',
+   dependencies: [libgom_dep])
+-test('test-gom-stress', test_stress, timeout: 300)
++test('test-gom-stress', test_stress, timeout: 500)
+ 
+ test_transform = executable('test-gom-transform', 'test-gom-transform.c',
+   c_args: '-DIMAGE="@0@/gnome.png"'.format(meson.current_source_dir()),
diff --git a/nixpkgs/pkgs/development/libraries/goocanvas/2.x.nix b/nixpkgs/pkgs/development/libraries/goocanvas/2.x.nix
new file mode 100644
index 000000000000..9067ef71ca05
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/goocanvas/2.x.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchurl, pkg-config, gettext, gtk-doc, gobject-introspection, python3, gtk3, cairo, glib, gnome }:
+
+stdenv.mkDerivation rec {
+  pname = "goocanvas";
+  version = "2.0.4";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/goocanvas/2.0/${pname}-${version}.tar.xz";
+    sha256 = "141fm7mbqib0011zmkv3g8vxcjwa7hypmq71ahdyhnj2sjvy4a67";
+  };
+
+  nativeBuildInputs = [ pkg-config gettext gtk-doc python3 gobject-introspection ];
+  buildInputs = [ gtk3 cairo glib ];
+
+  configureFlags = [
+    "--disable-python"
+  ];
+  PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_GIRDIR = "$(dev)/share/gir-1.0";
+  PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_TYPELIBDIR = "$(out)/lib/girepository-1.0";
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      attrPath = "${pname}${lib.versions.major version}";
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+      freeze = true;
+    };
+  };
+
+  meta = with lib; {
+    description = "Canvas widget for GTK based on the the Cairo 2D library";
+    homepage = "https://wiki.gnome.org/Projects/GooCanvas";
+    license = licenses.lgpl2;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/goocanvas/3.x.nix b/nixpkgs/pkgs/development/libraries/goocanvas/3.x.nix
new file mode 100644
index 000000000000..8a07f31b818d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/goocanvas/3.x.nix
@@ -0,0 +1,58 @@
+{ lib
+, stdenv
+, fetchurl
+, pkg-config
+, gettext
+, gobject-introspection
+, gtk-doc
+, python3
+, cairo
+, gtk3
+, glib
+, gnome
+}:
+
+stdenv.mkDerivation rec {
+  pname = "goocanvas";
+  version = "3.0.0";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/goocanvas/${lib.versions.majorMinor version}/goocanvas-${version}.tar.xz";
+    sha256 = "06j05g2lmwvklmv51xsb7gm7rszcarhm01sal41jfp0qzrbpa2k7";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+    gettext
+    gobject-introspection
+    gtk-doc
+    python3
+  ];
+
+  buildInputs = [
+    cairo
+    gtk3
+    glib
+  ];
+
+  PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_GIRDIR = "$(dev)/share/gir-1.0";
+  PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_TYPELIBDIR = "$(out)/lib/girepository-1.0";
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      attrPath = "${pname}${lib.versions.major version}";
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    description = "Canvas widget for GTK based on the the Cairo 2D library";
+    homepage = "https://wiki.gnome.org/Projects/GooCanvas";
+    license = licenses.lgpl2; # https://gitlab.gnome.org/GNOME/goocanvas/-/issues/12
+    maintainers = with maintainers; [ bobby285271 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/goocanvas/default.nix b/nixpkgs/pkgs/development/libraries/goocanvas/default.nix
new file mode 100644
index 000000000000..03268fb024c6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/goocanvas/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl, gtk2, cairo, glib, pkg-config, gnome }:
+
+stdenv.mkDerivation rec {
+  pname = "goocanvas";
+  version = "1.0.0";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.bz2";
+    sha256 = "07kicpcacbqm3inp7zq32ldp95mxx4kfxpaazd0x5jk7hpw2w1qw";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ gtk2 cairo glib ];
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+      freeze = true;
+    };
+  };
+
+  meta = with lib; {
+    description = "Canvas widget for GTK based on the the Cairo 2D library";
+    homepage = "https://wiki.gnome.org/Projects/GooCanvas";
+    license = licenses.lgpl2;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/goocanvasmm/default.nix b/nixpkgs/pkgs/development/libraries/goocanvasmm/default.nix
new file mode 100644
index 000000000000..764208008656
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/goocanvasmm/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchurl, pkg-config, goocanvas2, gtkmm3, gnome }:
+
+stdenv.mkDerivation rec {
+  pname = "goocanvasmm";
+  version = "1.90.11";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "0vpdfrj59nwzwj8bk4s0h05iyql62pxjzsxh72g3vry07s3i3zw0";
+  };
+  nativeBuildInputs = [ pkg-config ];
+  propagatedBuildInputs = [ gtkmm3 goocanvas2 ];
+
+  enableParallelBuilding = true;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      attrPath = "goocanvasmm2";
+      versionPolicy = "none"; # stable version has not been released yet, last update 2015
+    };
+  };
+
+  meta = with lib; {
+    description = "C++ bindings for GooCanvas";
+    homepage = "https://wiki.gnome.org/Projects/GooCanvas";
+    license = licenses.lgpl2;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/google-cloud-cpp/default.nix b/nixpkgs/pkgs/development/libraries/google-cloud-cpp/default.nix
new file mode 100644
index 000000000000..0a6be882120b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/google-cloud-cpp/default.nix
@@ -0,0 +1,147 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, c-ares
+, cmake
+, crc32c
+, curl
+, gbenchmark
+, grpc
+, gtest
+, ninja
+, nlohmann_json
+, openssl
+, pkg-config
+, protobuf
+  # default list of APIs: https://github.com/googleapis/google-cloud-cpp/blob/v1.32.1/CMakeLists.txt#L173
+, apis ? [ "*" ]
+, staticOnly ? stdenv.hostPlatform.isStatic
+}:
+let
+  # defined in cmake/GoogleapisConfig.cmake
+  googleapisRev = "85f8c758016c279fb7fa8f0d51ddc7ccc0dd5e05";
+  googleapis = fetchFromGitHub {
+    name = "googleapis-src";
+    owner = "googleapis";
+    repo = "googleapis";
+    rev = googleapisRev;
+    hash = "sha256-4Qiz0pBgW3OZi+Z8Zq6k9E94+8q6/EFMwPh8eQxDjdI=";
+  };
+  excludedTests = builtins.fromTOML (builtins.readFile ./skipped_tests.toml);
+in
+stdenv.mkDerivation rec {
+  pname = "google-cloud-cpp";
+  version = "2.14.0";
+
+  src = fetchFromGitHub {
+    owner = "googleapis";
+    repo = "google-cloud-cpp";
+    rev = "v${version}";
+    sha256 = "sha256-0SoOaAqvk8cVC5W3ejTfe4O/guhrro3uAzkeIpAkCpg=";
+  };
+
+  patches = [
+    # https://github.com/googleapis/google-cloud-cpp/pull/12554, tagged in 2.16.0
+    (fetchpatch {
+      name = "prepare-for-GCC-13.patch";
+      url = "https://github.com/googleapis/google-cloud-cpp/commit/ae30135c86982c36e82bb0f45f99baa48c6a780b.patch";
+      hash = "sha256-L0qZfdhP8Zt/gYBWvJafteVgBHR8Kup49RoOrLDtj3k=";
+    })
+  ];
+
+  postPatch = ''
+    substituteInPlace external/googleapis/CMakeLists.txt \
+      --replace "https://github.com/googleapis/googleapis/archive/\''${_GOOGLE_CLOUD_CPP_GOOGLEAPIS_COMMIT_SHA}.tar.gz" "file://${googleapis}"
+    sed -i '/https:\/\/storage.googleapis.com\/cloud-cpp-community-archive\/com_google_googleapis/d' external/googleapis/CMakeLists.txt
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    ninja
+    pkg-config
+  ] ++ lib.optionals (!doInstallCheck) [
+    # enable these dependencies when doInstallCheck is false because we're
+    # unconditionally building tests and benchmarks
+    #
+    # when doInstallCheck is true, these deps are added to nativeInstallCheckInputs
+    gbenchmark
+    gtest
+  ];
+
+  buildInputs = [
+    c-ares
+    crc32c
+    (curl.override { inherit openssl; })
+    grpc
+    nlohmann_json
+    openssl
+    protobuf
+  ];
+
+  # https://hydra.nixos.org/build/222679737/nixlog/3/tail
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isAarch64 "-Wno-error=maybe-uninitialized";
+
+  doInstallCheck = true;
+
+  preInstallCheck =
+    let
+      # These paths are added to (DY)LD_LIBRARY_PATH because they contain
+      # testing-only shared libraries that do not need to be installed, but
+      # need to be loadable by the test executables.
+      #
+      # Setting (DY)LD_LIBRARY_PATH is only necessary when building shared libraries.
+      additionalLibraryPaths = [
+        "$PWD/google/cloud/bigtable"
+        "$PWD/google/cloud/bigtable/benchmarks"
+        "$PWD/google/cloud/pubsub"
+        "$PWD/google/cloud/spanner"
+        "$PWD/google/cloud/spanner/benchmarks"
+        "$PWD/google/cloud/storage"
+        "$PWD/google/cloud/storage/benchmarks"
+        "$PWD/google/cloud/testing_util"
+      ];
+      ldLibraryPathName = "${lib.optionalString stdenv.isDarwin "DY"}LD_LIBRARY_PATH";
+    in
+    lib.optionalString doInstallCheck (
+      lib.optionalString (!staticOnly) ''
+        export ${ldLibraryPathName}=${lib.concatStringsSep ":" additionalLibraryPaths}
+      '' + ''
+        export GTEST_FILTER="-${lib.concatStringsSep ":" excludedTests.cases}"
+      ''
+    );
+
+  installCheckPhase = lib.optionalString doInstallCheck ''
+    runHook preInstallCheck
+
+    # disable tests that contact the internet
+    ctest --exclude-regex '^(${lib.concatStringsSep "|" excludedTests.whole})'
+
+    runHook postInstallCheck
+  '';
+
+  nativeInstallCheckInputs = lib.optionals doInstallCheck [
+    gbenchmark
+    gtest
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS:BOOL=${if staticOnly then "OFF" else "ON"}"
+    # unconditionally build tests to catch linker errors as early as possible
+    # this adds a good chunk of time to the build
+    "-DBUILD_TESTING:BOOL=ON"
+    "-DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES:BOOL=OFF"
+  ] ++ lib.optionals (apis != [ "*" ]) [
+    "-DGOOGLE_CLOUD_CPP_ENABLE=${lib.concatStringsSep ";" apis}"
+  ];
+
+  requiredSystemFeatures = [ "big-parallel" ];
+
+  meta = with lib; {
+    license = with licenses; [ asl20 ];
+    homepage = "https://github.com/googleapis/google-cloud-cpp";
+    description = "C++ Idiomatic Clients for Google Cloud Platform services";
+    platforms = [ "x86_64-linux" "aarch64-linux" ];
+    maintainers = with maintainers; [ cpcloud ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/google-cloud-cpp/skipped_tests.toml b/nixpkgs/pkgs/development/libraries/google-cloud-cpp/skipped_tests.toml
new file mode 100644
index 000000000000..d4ac469fbcff
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/google-cloud-cpp/skipped_tests.toml
@@ -0,0 +1,139 @@
+whole = [
+  "common_samples_samples",
+  "common_internal_grpc_impersonate_service_account_integration_test",
+  "common_internal_unified_rest_credentials_integration_test",
+  "iam_samples_iam_credentials_samples",
+  "iam_samples_iam_samples",
+  "iam_admin_v1_samples_iam_client_samples",
+  "iam_credentials_v1_samples_iam_credentials_client_samples",
+  "iam_v1_samples_iam_policy_client_samples",
+  "iam_v2_samples_policies_client_samples",
+  "bigtable_admin_admin_iam_policy_integration_test",
+  "bigtable_bigtable_instance_admin_client_samples",
+  "bigtable_bigtable_table_admin_client_samples",
+  "bigtable_apply_read_latency_benchmark",
+  "bigtable_endurance_benchmark",
+  "bigtable_mutation_batcher_throughput_benchmark",
+  "bigtable_read_sync_vs_async_benchmark",
+  "bigtable_scan_throughput_benchmark",
+  "bigtable_admin_iam_policy_integration_test",
+  "bigtable_data_async_future_integration_test",
+  "bigtable_data_integration_test",
+  "bigtable_filters_integration_test",
+  "bigtable_mutations_integration_test",
+  "bigtable_table_sample_rows_integration_test",
+  "bigquery_samples_bigquery_read_samples",
+  "bigquery_analyticshub_v1_samples_analytics_hub_client_samples",
+  "bigquery_biglake_v1_samples_metastore_client_samples",
+  "bigquery_connection_v1_samples_connection_client_samples",
+  "bigquery_datapolicies_v1_samples_data_policy_client_samples",
+  "bigquery_datatransfer_v1_samples_data_transfer_client_samples",
+  "bigquery_migration_v2_samples_migration_client_samples",
+  "bigquery_reservation_v1_samples_reservation_client_samples",
+  "bigquery_storage_v1_samples_bigquery_read_client_samples",
+  "bigquery_storage_v1_samples_bigquery_write_client_samples",
+  "logging_quickstart",
+  "logging_v2_samples_config_service_v2_client_samples",
+  "logging_v2_samples_logging_service_v2_client_samples",
+  "logging_v2_samples_metrics_service_v2_client_samples",
+  "pubsub_endurance",
+  "pubsub_throughput",
+  "pubsub_subscriber_integration_test",
+  "pubsub_subscription_admin_integration_test",
+  "pubsub_topic_admin_integration_test",
+  "spanner_client_integration_test",
+  "spanner_client_stress_test",
+  "spanner_data_types_integration_test",
+  "spanner_database_admin_integration_test",
+  "spanner_instance_admin_integration_test",
+  "spanner_session_pool_integration_test",
+  "spanner_admin_database_admin_integration_test",
+  "spanner_admin_instance_admin_integration_test",
+  "spanner_database_admin_client_samples",
+  "spanner_instance_admin_client_samples",
+  "spanner_multiple_rows_cpu_benchmark",
+  "spanner_single_row_throughput_benchmark",
+  "storage_alternative_endpoint_integration_test",
+  "storage_auto_finalize_integration_test",
+  "storage_bucket_integration_test",
+  "storage_create_client_integration_test",
+  "storage_curl_sign_blob_integration_test",
+  "storage_decompressive_transcoding_integration_test",
+  "storage_grpc_bucket_acl_integration_test",
+  "storage_grpc_bucket_metadata_integration_test",
+  "storage_grpc_default_object_acl_integration_test",
+  "storage_grpc_integration_test",
+  "storage_grpc_object_acl_integration_test",
+  "storage_grpc_object_media_integration_test",
+  "storage_grpc_object_metadata_integration_test",
+  "storage_key_file_integration_test",
+  "storage_minimal_iam_credentials_rest_integration_test",
+  "storage_object_basic_crud_integration_test",
+  "storage_object_checksum_integration_test",
+  "storage_object_compose_many_integration_test",
+  "storage_object_file_integration_test",
+  "storage_object_hash_integration_test",
+  "storage_object_insert_integration_test",
+  "storage_object_insert_preconditions_integration_test",
+  "storage_object_integration_test",
+  "storage_object_list_objects_versions_integration_test",
+  "storage_object_media_integration_test",
+  "storage_object_parallel_upload_integration_test",
+  "storage_object_plenty_clients_serially_integration_test",
+  "storage_object_plenty_clients_simultaneously_integration_test",
+  "storage_object_read_headers_integration_test",
+  "storage_object_read_preconditions_integration_test",
+  "storage_object_read_range_integration_test",
+  "storage_object_read_stream_integration_test",
+  "storage_object_resumable_parallel_upload_integration_test",
+  "storage_object_resumable_write_integration_test",
+  "storage_object_rewrite_integration_test",
+  "storage_object_write_preconditions_integration_test",
+  "storage_object_write_stream_integration_test",
+  "storage_object_write_streambuf_integration_test",
+  "storage_service_account_integration_test",
+  "storage_signed_url_integration_test",
+  "storage_small_reads_integration_test",
+  "storage_thread_integration_test",
+  "storage_tracing_integration_test",
+  "storage_unified_credentials_integration_test",
+  "storage_aggregate_download_throughput_benchmark",
+  "storage_aggregate_upload_throughput_benchmark",
+  "storage_create_dataset",
+  "storage_storage_file_transfer_benchmark",
+  "storage_storage_parallel_uploads_benchmark",
+  "storage_storage_throughput_vs_cpu_benchmark",
+  "storage_throughput_experiment_test"
+]
+cases = [
+  "BackupExtraIntegrationTest.CreateBackupWithExpiredVersionTime",
+  "BackupExtraIntegrationTest.BackupWithExpiredVersionTime",
+  "BackupExtraIntegrationTest.BackupWithFutureVersionTime",
+  "BackupExtraIntegrationTest.CreateBackupWithFutureVersionTime",
+  "BlockingPublisherIntegrationTest.Basic",
+  "DatabaseAdminClientTest.CreateWithEncryptionKey",
+  "DatabaseAdminClientTest.CreateWithNonexistentEncryptionKey",
+  "DatabaseAdminClientTest.DatabaseBasicCRUD",
+  "DatabaseAdminClientTest.VersionRetentionPeriodCreate",
+  "DatabaseAdminClientTest.VersionRetentionPeriodCreateFailure",
+  "DatabaseAdminClientTest.VersionRetentionPeriodUpdate",
+  "DatabaseAdminClientTest.VersionRetentionPeriodUpdateFailure",
+  "ErrorParsingIntegrationTest.FailureContainsErrorInfo",
+  "GrpcServiceAccountIntegrationTest.GetServiceAccount",
+  "GrpcBucketMetadataIntegrationTest.ObjectMetadataCRUD",
+  "InstanceAdminClientTest.InstanceConfig",
+  "InstanceAdminClientTest.InstanceIam",
+  "InstanceAdminClientTest.InstanceReadOperations",
+  "LoggingIntegrationTest.ListMonitoredResourceDescriptors",
+  "LoggingIntegrationTest.WriteLogEntries",
+  "ObjectFileMultiThreadedTest.Download",
+  "ObjectReadLargeIntegrationTest.LimitedMemoryGrowth",
+  "SubscriberIntegrationTest.FireAndForget",
+  "SubscriberIntegrationTest.PublishOrdered",
+  "SubscriberIntegrationTest.PublishPullAck",
+  "SubscriberIntegrationTest.RawStub",
+  "SubscriberIntegrationTest.ReportNotFound",
+  "SubscriberIntegrationTest.StreamingSubscriptionBatchSource",
+  "SubscriptionAdminIntegrationTest.SubscriptionCRUD",
+  "TopicAdminIntegrationTest.TopicCRUD"
+]
diff --git a/nixpkgs/pkgs/development/libraries/gperftools/default.nix b/nixpkgs/pkgs/development/libraries/gperftools/default.nix
new file mode 100644
index 000000000000..e76c033c705d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gperftools/default.nix
@@ -0,0 +1,61 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, fetchpatch
+, autoreconfHook
+, libunwind
+, perl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gperftools";
+  version = "2.15";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = "${pname}-${version}";
+    sha256 = "sha256-3ibr8AHzo7txX1U+9oOWA60qeeJs/OGeevv+sgBwQa0=";
+  };
+
+  patches = [
+    # Add the --disable-general-dynamic-tls configure option:
+    # https://bugzilla.redhat.com/show_bug.cgi?id=1483558
+    (fetchpatch {
+      url = "https://src.fedoraproject.org/rpms/gperftools/raw/f62d87a34f56f64fb8eb86727e34fbc2d3f5294a/f/gperftools-2.7.90-disable-generic-dynamic-tls.patch";
+      sha256 = "02falhpaqkl27hl1dib4yvmhwsddmgbw0krb46w31fyf3awb2ydv";
+    })
+  ];
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  # tcmalloc uses libunwind in a way that works correctly only on non-ARM dynamically linked linux
+  buildInputs = [ perl ]
+             ++ lib.optional (stdenv.isLinux && !(stdenv.hostPlatform.isAarch || stdenv.hostPlatform.isStatic )) libunwind;
+
+  # Disable general dynamic TLS on AArch to support dlopen()'ing the library:
+  # https://bugzilla.redhat.com/show_bug.cgi?id=1483558
+  configureFlags = lib.optional stdenv.hostPlatform.isAarch
+    "--disable-general-dynamic-tls";
+
+  prePatch = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace Makefile.am --replace stdc++ c++
+  '';
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin
+    "-D_XOPEN_SOURCE";
+
+  # some packages want to link to the static tcmalloc_minimal
+  # to drop the runtime dependency on gperftools
+  dontDisableStatic = true;
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/gperftools/gperftools";
+    description = "Fast, multi-threaded malloc() and nifty performance analysis tools";
+    platforms = platforms.all;
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ vcunat ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gpgme/default.nix b/nixpkgs/pkgs/development/libraries/gpgme/default.nix
new file mode 100644
index 000000000000..ca359fcc912b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gpgme/default.nix
@@ -0,0 +1,131 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, autoreconfHook
+, libgpg-error
+, gnupg
+, pkg-config
+, glib
+, pth
+, libassuan
+, file
+, which
+, ncurses
+, texinfo
+, buildPackages
+, qtbase ? null
+, pythonSupport ? false
+, swig2 ? null
+# only for passthru.tests
+, libsForQt5
+, qt6Packages
+, python3
+}:
+let
+  inherit (stdenv.hostPlatform) system;
+in
+stdenv.mkDerivation rec {
+  pname = "gpgme";
+  version = "1.23.2";
+
+  src = fetchurl {
+    url = "mirror://gnupg/gpgme/${pname}-${version}.tar.bz2";
+    hash = "sha256-lJnosfM8zLaBVSehvBYEnTWmGYpsX64BhfK9VhvOUiQ=";
+  };
+
+  patches = [
+    # Support Python 3.10 version detection without distutils, https://dev.gnupg.org/D545
+    ./python-310-detection-without-distutils.patch
+    # Fix a test after disallowing compressed signatures in gpg (PR #180336)
+    ./test_t-verify_double-plaintext.patch
+  ];
+
+  outputs = [ "out" "dev" "info" ];
+
+  outputBin = "dev"; # gpgme-config; not so sure about gpgme-tool
+
+  nativeBuildInputs = [
+    autoreconfHook
+    gnupg
+    pkg-config
+    texinfo
+  ] ++ lib.optionals pythonSupport [
+    python3.pythonOnBuildForHost
+    ncurses
+    swig2
+    which
+  ];
+
+  buildInputs = lib.optionals pythonSupport [
+    python3
+  ];
+
+  propagatedBuildInputs = [
+    glib
+    libassuan
+    libgpg-error
+    pth
+  ] ++ lib.optionals (qtbase != null) [
+    qtbase
+  ];
+
+  nativeCheckInputs = [
+    which
+  ];
+
+  depsBuildBuild = [
+    buildPackages.stdenv.cc
+  ];
+
+  dontWrapQtApps = true;
+
+  configureFlags = [
+    "--enable-fixed-path=${gnupg}/bin"
+    "--with-libgpg-error-prefix=${libgpg-error.dev}"
+    "--with-libassuan-prefix=${libassuan.dev}"
+  ] ++ lib.optional pythonSupport "--enable-languages=python"
+  # Tests will try to communicate with gpg-agent instance via a UNIX socket
+  # which has a path length limit. Nix on darwin is using a build directory
+  # that already has quite a long path and the resulting socket path doesn't
+  # fit in the limit. https://github.com/NixOS/nix/pull/1085
+  ++ lib.optionals stdenv.isDarwin [ "--disable-gpg-test" ];
+
+  env.NIX_CFLAGS_COMPILE = toString (
+    # qgpgme uses Q_ASSERT which retains build inputs at runtime unless
+    # debugging is disabled
+    lib.optional (qtbase != null) "-DQT_NO_DEBUG"
+    # https://www.gnupg.org/documentation/manuals/gpgme/Largefile-Support-_0028LFS_0029.html
+    ++ lib.optional stdenv.hostPlatform.is32bit "-D_FILE_OFFSET_BITS=64"
+  );
+
+  enableParallelBuilding = true;
+
+  # prevent tests from being run during the buildPhase
+  makeFlags = [ "tests=" ];
+
+  doCheck = true;
+
+  checkFlags = [ "-C" "tests" ];
+
+  passthru.tests = {
+    python = python3.pkgs.gpgme;
+    qt5 = libsForQt5.qgpgme;
+    qt6 = qt6Packages.qgpgme;
+  };
+
+  meta = with lib; {
+    homepage = "https://gnupg.org/software/gpgme/index.html";
+    changelog = "https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;f=NEWS;hb=gpgme-${version}";
+    description = "Library for making GnuPG easier to use";
+    longDescription = ''
+      GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
+      easier for applications. It provides a High-Level Crypto API for
+      encryption, decryption, signing, signature verification and key
+      management.
+    '';
+    license = with licenses; [ lgpl21Plus gpl3Plus ];
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ dotlambda ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gpgme/python-310-detection-without-distutils.patch b/nixpkgs/pkgs/development/libraries/gpgme/python-310-detection-without-distutils.patch
new file mode 100644
index 000000000000..e0eea9ff0429
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gpgme/python-310-detection-without-distutils.patch
@@ -0,0 +1,273 @@
+diff --git a/m4/ax_python_devel.m4 b/m4/ax_python_devel.m4
+--- a/m4/ax_python_devel.m4
++++ b/m4/ax_python_devel.m4
+@@ -1,5 +1,5 @@
+ # ===========================================================================
+-#      https://www.gnu.org/software/autoconf-archive/ax_python_devel.html
++#     https://www.gnu.org/software/autoconf-archive/ax_python_devel.html
+ # ===========================================================================
+ #
+ # SYNOPSIS
+@@ -12,8 +12,8 @@
+ #   in your configure.ac.
+ #
+ #   This macro checks for Python and tries to get the include path to
+-#   'Python.h'. It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LDFLAGS)
+-#   output variables. It also exports $(PYTHON_EXTRA_LIBS) and
++#   'Python.h'. It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LIBS) output
++#   variables. It also exports $(PYTHON_EXTRA_LIBS) and
+ #   $(PYTHON_EXTRA_LDFLAGS) for embedding Python in your code.
+ #
+ #   You can search for some particular version of Python by passing a
+@@ -67,7 +67,7 @@
+ #   modified version of the Autoconf Macro, you may extend this special
+ #   exception to the GPL to apply to your modified version as well.
+ 
+-#serial 17
++#serial 23
+ 
+ AU_ALIAS([AC_PYTHON_DEVEL], [AX_PYTHON_DEVEL])
+ AC_DEFUN([AX_PYTHON_DEVEL],[
+@@ -99,7 +99,7 @@
+ This version of the AC@&t@_PYTHON_DEVEL macro
+ doesn't work properly with versions of Python before
+ 2.1.0. You may need to re-run configure, setting the
+-variables PYTHON_CPPFLAGS, PYTHON_LDFLAGS, PYTHON_SITE_PKG,
++variables PYTHON_CPPFLAGS, PYTHON_LIBS, PYTHON_SITE_PKG,
+ PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand.
+ Moreover, to disable this check, set PYTHON_NOVERSIONCHECK
+ to something else than an empty string.
+@@ -135,16 +135,25 @@
+ 	#
+ 	# Check if you have distutils, else fail
+ 	#
+-	AC_MSG_CHECKING([for the distutils Python package])
+-	ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
+-	if test -z "$ac_distutils_result"; then
++	AC_MSG_CHECKING([for the sysconfig Python package])
++	ac_sysconfig_result=`$PYTHON -c "import sysconfig" 2>&1`
++	if test $? -eq 0; then
+ 		AC_MSG_RESULT([yes])
++		IMPORT_SYSCONFIG="import sysconfig"
+ 	else
+ 		AC_MSG_RESULT([no])
+-		AC_MSG_ERROR([cannot import Python module "distutils".
++
++		AC_MSG_CHECKING([for the distutils Python package])
++		ac_sysconfig_result=`$PYTHON -c "from distutils import sysconfig" 2>&1`
++		if test $? -eq 0; then
++			AC_MSG_RESULT([yes])
++			IMPORT_SYSCONFIG="from distutils import sysconfig"
++		else
++			AC_MSG_ERROR([cannot import Python module "distutils".
+ Please check your Python installation. The error was:
+-$ac_distutils_result])
+-		PYTHON_VERSION=""
++$ac_sysconfig_result])
++			PYTHON_VERSION=""
++		fi
+ 	fi
+ 
+ 	#
+@@ -152,10 +161,19 @@
+ 	#
+ 	AC_MSG_CHECKING([for Python include path])
+ 	if test -z "$PYTHON_CPPFLAGS"; then
+-		python_path=`$PYTHON -c "import distutils.sysconfig; \
+-			print (distutils.sysconfig.get_python_inc ());"`
+-		plat_python_path=`$PYTHON -c "import distutils.sysconfig; \
+-			print (distutils.sysconfig.get_python_inc (plat_specific=1));"`
++		if test "$IMPORT_SYSCONFIG" = "import sysconfig"; then
++			# sysconfig module has different functions
++			python_path=`$PYTHON -c "$IMPORT_SYSCONFIG; \
++				print (sysconfig.get_path ('include'));"`
++			plat_python_path=`$PYTHON -c "$IMPORT_SYSCONFIG; \
++				print (sysconfig.get_path ('platinclude'));"`
++		else
++			# old distutils way
++			python_path=`$PYTHON -c "$IMPORT_SYSCONFIG; \
++				print (sysconfig.get_python_inc ());"`
++			plat_python_path=`$PYTHON -c "$IMPORT_SYSCONFIG; \
++				print (sysconfig.get_python_inc (plat_specific=1));"`
++		fi
+ 		if test -n "${python_path}"; then
+ 			if test "${plat_python_path}" != "${python_path}"; then
+ 				python_path="-I$python_path -I$plat_python_path"
+@@ -172,14 +190,14 @@
+ 	# Check for Python library path
+ 	#
+ 	AC_MSG_CHECKING([for Python library path])
+-	if test -z "$PYTHON_LDFLAGS"; then
++	if test -z "$PYTHON_LIBS"; then
+ 		# (makes two attempts to ensure we've got a version number
+ 		# from the interpreter)
+ 		ac_python_version=`cat<<EOD | $PYTHON -
+ 
+ # join all versioning strings, on some systems
+ # major/minor numbers could be in different list elements
+-from distutils.sysconfig import *
++from sysconfig import *
+ e = get_config_var('VERSION')
+ if e is not None:
+ 	print(e)
+@@ -197,7 +215,7 @@
+ 		# Make the versioning information available to the compiler
+ 
+ 		# JW: We don't need it and it interferes with the hack
+-		# to detect multiple Pyhton versions
++		# to detect multiple Python versions
+ 		#AC_DEFINE_UNQUOTED([HAVE_PYTHON], ["$ac_python_version"],
+                 #                  [If available, contains the Python version number currently in use.])
+ 
+@@ -205,8 +223,8 @@
+ 		ac_python_libdir=`cat<<EOD | $PYTHON -
+ 
+ # There should be only one
+-import distutils.sysconfig
+-e = distutils.sysconfig.get_config_var('LIBDIR')
++$IMPORT_SYSCONFIG
++e = sysconfig.get_config_var('LIBDIR')
+ if e is not None:
+ 	print (e)
+ EOD`
+@@ -214,8 +232,8 @@
+ 		# Now, for the library:
+ 		ac_python_library=`cat<<EOD | $PYTHON -
+ 
+-import distutils.sysconfig
+-c = distutils.sysconfig.get_config_vars()
++$IMPORT_SYSCONFIG
++c = sysconfig.get_config_vars()
+ if 'LDVERSION' in c:
+ 	print ('python'+c[['LDVERSION']])
+ else:
+@@ -230,44 +248,67 @@
+ 		then
+ 			# use the official shared library
+ 			ac_python_library=`echo "$ac_python_library" | sed "s/^lib//"`
+-			PYTHON_LDFLAGS="-L$ac_python_libdir -l$ac_python_library"
++			PYTHON_LIBS="-L$ac_python_libdir -l$ac_python_library"
+ 		else
+ 			# old way: use libpython from python_configdir
+ 			ac_python_libdir=`$PYTHON -c \
+-			  "from distutils.sysconfig import get_python_lib as f; \
++			  "from sysconfig import get_python_lib as f; \
+ 			  import os; \
+ 			  print (os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"`
+-			PYTHON_LDFLAGS="-L$ac_python_libdir -lpython$ac_python_version"
++			PYTHON_LIBS="-L$ac_python_libdir -lpython$ac_python_version"
+ 		fi
+ 
+-		if test -z "PYTHON_LDFLAGS"; then
++		if test -z "PYTHON_LIBS"; then
+ 			AC_MSG_ERROR([
+   Cannot determine location of your Python DSO. Please check it was installed with
+-  dynamic libraries enabled, or try setting PYTHON_LDFLAGS by hand.
++  dynamic libraries enabled, or try setting PYTHON_LIBS by hand.
+ 			])
+ 		fi
+ 	fi
+-	AC_MSG_RESULT([$PYTHON_LDFLAGS])
+-	AC_SUBST([PYTHON_LDFLAGS])
++	AC_MSG_RESULT([$PYTHON_LIBS])
++	AC_SUBST([PYTHON_LIBS])
+ 
+ 	#
+ 	# Check for site packages
+ 	#
+ 	AC_MSG_CHECKING([for Python site-packages path])
+ 	if test -z "$PYTHON_SITE_PKG"; then
+-		PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
+-			print (distutils.sysconfig.get_python_lib(0,0));"`
++		if test "$IMPORT_SYSCONFIG" = "import sysconfig"; then
++			PYTHON_SITE_PKG=`$PYTHON -c "$IMPORT_SYSCONFIG; \
++				print (sysconfig.get_path('purelib'));"`
++		else
++			# distutils.sysconfig way
++			PYTHON_SITE_PKG=`$PYTHON -c "$IMPORT_SYSCONFIG; \
++				print (sysconfig.get_python_lib(0,0));"`
++		fi
+ 	fi
+ 	AC_MSG_RESULT([$PYTHON_SITE_PKG])
+ 	AC_SUBST([PYTHON_SITE_PKG])
+ 
++	#
++	# Check for platform-specific site packages
++	#
++	AC_MSG_CHECKING([for Python platform specific site-packages path])
++	if test -z "$PYTHON_SITE_PKG"; then
++		if test "$IMPORT_SYSCONFIG" = "import sysconfig"; then
++			PYTHON_PLATFORM_SITE_PKG=`$PYTHON -c "$IMPORT_SYSCONFIG; \
++				print (sysconfig.get_path('platlib'));"`
++		else
++			# distutils.sysconfig way
++			PYTHON_PLATFORM_SITE_PKG=`$PYTHON -c "$IMPORT_SYSCONFIG; \
++				print (sysconfig.get_python_lib(1,0));"`
++		fi
++	fi
++	AC_MSG_RESULT([$PYTHON_PLATFORM_SITE_PKG])
++	AC_SUBST([PYTHON_PLATFORM_SITE_PKG])
++
+ 	#
+ 	# libraries which must be linked in when embedding
+ 	#
+ 	AC_MSG_CHECKING(python extra libraries)
+ 	if test -z "$PYTHON_EXTRA_LIBS"; then
+-	   PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
+-                conf = distutils.sysconfig.get_config_var; \
++	   PYTHON_EXTRA_LIBS=`$PYTHON -c "$IMPORT_SYSCONFIG; \
++                conf = sysconfig.get_config_var; \
+                 print (conf('LIBS') + ' ' + conf('SYSLIBS'))"`
+ 	fi
+ 	AC_MSG_RESULT([$PYTHON_EXTRA_LIBS])
+@@ -278,8 +319,8 @@
+ 	#
+ 	AC_MSG_CHECKING(python extra linking flags)
+ 	if test -z "$PYTHON_EXTRA_LDFLAGS"; then
+-		PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \
+-			conf = distutils.sysconfig.get_config_var; \
++		PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "$IMPORT_SYSCONFIG; \
++			conf = sysconfig.get_config_var; \
+ 			print (conf('LINKFORSHARED'))"`
+ 	fi
+ 	AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS])
+@@ -291,8 +332,10 @@
+ 	AC_MSG_CHECKING([consistency of all components of python development environment])
+ 	# save current global flags
+ 	ac_save_LIBS="$LIBS"
++	ac_save_LDFLAGS="$LDFLAGS"
+ 	ac_save_CPPFLAGS="$CPPFLAGS"
+-	LIBS="$ac_save_LIBS $PYTHON_LDFLAGS $PYTHON_EXTRA_LDFLAGS $PYTHON_EXTRA_LIBS"
++	LIBS="$ac_save_LIBS $PYTHON_LIBS $PYTHON_EXTRA_LIBS $PYTHON_EXTRA_LIBS"
++	LDFLAGS="$ac_save_LDFLAGS $PYTHON_EXTRA_LDFLAGS"
+ 	CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS"
+ 	AC_LANG_PUSH([C])
+ 	AC_LINK_IFELSE([
+@@ -303,15 +346,17 @@
+ 	# turn back to default flags
+ 	CPPFLAGS="$ac_save_CPPFLAGS"
+ 	LIBS="$ac_save_LIBS"
++	LDFLAGS="$ac_save_LDFLAGS"
+ 
+ 	AC_MSG_RESULT([$pythonexists])
+ 
+         if test ! "x$pythonexists" = "xyes"; then
++        # gpgme: only warn here, no error, as we are looking for multiple versions
+ 	   AC_MSG_WARN([
+   Could not link test program to Python. Maybe the main Python library has been
+   installed in some non-standard library path. If so, pass it to configure,
+-  via the LDFLAGS environment variable.
+-  Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
++  via the LIBS environment variable.
++  Example: ./configure LIBS="-L/usr/non-standard-path/python/lib"
+   ============================================================================
+    You probably have to install the development version of the Python package
+    for your distribution.  The exact name of this package varies among them.
+@@ -323,4 +368,4 @@
+ 	#
+ 	# all done!
+ 	#
+-])
++])
+\ No newline at end of file
+
diff --git a/nixpkgs/pkgs/development/libraries/gpgme/test_t-verify_double-plaintext.patch b/nixpkgs/pkgs/development/libraries/gpgme/test_t-verify_double-plaintext.patch
new file mode 100644
index 000000000000..8f866af0da91
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gpgme/test_t-verify_double-plaintext.patch
@@ -0,0 +1,31 @@
+--- a/tests/gpg/t-verify.c
++++ b/tests/gpg/t-verify.c
+@@ -304,7 +304,7 @@
+   err = gpgme_data_new (&text);
+   fail_if_err (err);
+   err = gpgme_op_verify (ctx, sig, NULL, text);
+-  if (gpgme_err_code (err) != GPG_ERR_BAD_DATA)
++  if (gpgme_err_code (err) == GPG_ERR_NO_ERROR)
+     {
+       fprintf (stderr, "%s:%i: Double plaintext message not detected\n",
+ 	       PGM, __LINE__);
+--- a/lang/python/tests/t-verify.py
++++ b/lang/python/tests/t-verify.py
+@@ -142,7 +142,7 @@
+     c.op_verify(sig, None, text)
+ except Exception as e:
+     assert type(e) == gpg.errors.GPGMEError
+-    assert e.getcode() == gpg.errors.BAD_DATA
++    assert e.getcode() != gpg.errors.NO_ERROR
+ else:
+     assert False, "Expected an error but got none."
+ 
+@@ -178,7 +178,7 @@
+     try:
+         c.verify(double_plaintext_sig)
+     except gpg.errors.GPGMEError as e:
+-        assert e.getcode() == gpg.errors.BAD_DATA
++        assert e.getcode() != gpg.errors.NO_ERROR
+     else:
+         assert False, "Expected an error but got none."
+ 
diff --git a/nixpkgs/pkgs/development/libraries/gr-framework/Use-the-module-mode-to-search-for-the-LibXml2-package.patch b/nixpkgs/pkgs/development/libraries/gr-framework/Use-the-module-mode-to-search-for-the-LibXml2-package.patch
new file mode 100644
index 000000000000..b472d7271e8d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gr-framework/Use-the-module-mode-to-search-for-the-LibXml2-package.patch
@@ -0,0 +1,25 @@
+From 5d2377ad5e99742662e056bb782d5c21afb01dfb Mon Sep 17 00:00:00 2001
+From: Pavel Sobolev <paveloom@riseup.net>
+Date: Tue, 19 Sep 2023 13:27:39 +0300
+Subject: [PATCH] Use the module mode to search for the `LibXml2` package.
+
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 03490335..fb69e8fd 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -96,7 +96,7 @@ find_package(Expat)
+ # CMake ships with a `FindLibXml2.cmake` module which does not configure needed libxml2 dependencies.
+ # Thus, use the `libxml2-config.cmake` config file shipped with libxml which configures dependencies correctly by
+ # skipping module search mode.
+-find_package(LibXml2 NO_MODULE)
++find_package(LibXml2 MODULE)
+ if(${CMAKE_VERSION} VERSION_GREATER "3.16.0")
+   find_package(
+     Qt6
+--
+2.42.0
+
diff --git a/nixpkgs/pkgs/development/libraries/gr-framework/default.nix b/nixpkgs/pkgs/development/libraries/gr-framework/default.nix
new file mode 100644
index 000000000000..2157a18f58d1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gr-framework/default.nix
@@ -0,0 +1,71 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, nix-update-script
+
+, cmake
+, wrapQtAppsHook
+
+, cairo
+, ffmpeg
+, freetype
+, ghostscript
+, glfw
+, libjpeg
+, libtiff
+, qhull
+, qtbase
+, xorg
+, zeromq
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gr-framework";
+  version = "0.72.11";
+
+  src = fetchFromGitHub {
+    owner = "sciapp";
+    repo = "gr";
+    rev = "v${version}";
+    hash = "sha256-HspDRqO/JKpPeHOfctYAOwwR3y1u+GW3v0OnN7OfLT4=";
+  };
+
+  patches = [
+    ./Use-the-module-mode-to-search-for-the-LibXml2-package.patch
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    cairo
+    ffmpeg
+    freetype
+    ghostscript
+    glfw
+    libjpeg
+    libtiff
+    qhull
+    qtbase
+    xorg.libX11
+    xorg.libXft
+    xorg.libXt
+    zeromq
+  ];
+
+  preConfigure = ''
+    echo ${version} > version.txt
+  '';
+
+  passthru.updateScript = nix-update-script { };
+
+  meta = with lib; {
+    description = "GR framework is a graphics library for visualisation applications";
+    homepage = "https://gr-framework.org";
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ paveloom ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/grail/default.nix b/nixpkgs/pkgs/development/libraries/grail/default.nix
new file mode 100644
index 000000000000..b11ec3a9f5c3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/grail/default.nix
@@ -0,0 +1,25 @@
+{ enableX11 ? true,
+  lib, stdenv, fetchurl, pkg-config, xorg, python3, frame }:
+
+stdenv.mkDerivation rec {
+  pname = "grail";
+  version = "3.1.1";
+
+  src = fetchurl {
+    url = "https://launchpad.net/grail/trunk/${version}/+download/${pname}-${version}.tar.bz2";
+    sha256 = "1wwx5ibjdz5pyd0f5cd1n91y67r68dymxpm2lgd829041xjizvay";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ python3 frame ]
+  ++ lib.optionals enableX11 [xorg.libX11 xorg.libXtst xorg.libXext xorg.libXi xorg.libXfixes];
+
+  configureFlags = lib.optional enableX11 "--with-x11";
+
+  meta = {
+    homepage = "https://launchpad.net/canonical-multitouch/grail";
+    description = "Gesture Recognition And Instantiation Library";
+    license = lib.licenses.gpl2;
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/grantlee/5/default.nix b/nixpkgs/pkgs/development/libraries/grantlee/5/default.nix
new file mode 100644
index 000000000000..b115e1c8d7b6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/grantlee/5/default.nix
@@ -0,0 +1,55 @@
+{ mkDerivation, lib, fetchFromGitHub, qtbase, qtscript, cmake }:
+
+mkDerivation rec {
+  pname = "grantlee";
+  version = "5.3.1";
+  grantleePluginPrefix = "lib/grantlee/${lib.versions.majorMinor version}";
+
+  src = fetchFromGitHub {
+    owner = "steveire";
+    repo = "grantlee";
+    rev = "v${version}";
+    sha256 = "sha256-enP7b6A7Ndew2LJH569fN3IgPu2/KL5rCmU/jmKb9sY=";
+  };
+
+  buildInputs = [ qtbase qtscript ];
+  nativeBuildInputs = [ cmake ];
+
+  patches = [
+    ./grantlee-nix-profiles.patch
+    ./grantlee-no-canonicalize-filepath.patch
+  ];
+
+  outputs = [ "out" "dev" ];
+  postFixup =
+    # Disabuse CMake of the notion that libraries are in $dev
+    ''
+      for way in release debug; do
+          cmake="$dev/lib/cmake/Grantlee5/GrantleeTargets-$way.cmake"
+          if [ -f "$cmake" ]; then
+              sed -i "$cmake" -e "s|\''${_IMPORT_PREFIX}|$out|"
+          fi
+      done
+    '';
+
+  setupHook = ./setup-hook.sh;
+
+  doCheck = false; # fails all the tests (ctest)
+
+  meta = with lib; {
+    description = "Qt5 port of Django template system";
+    longDescription = ''
+      Grantlee is a plugin based String Template system written using the Qt
+      framework. The goals of the project are to make it easier for application
+      developers to separate the structure of documents from the data they
+      contain, opening the door for theming.
+
+      The syntax is intended to follow the syntax of the Django template system,
+      and the design of Django is reused in Grantlee.'';
+
+    homepage = "https://github.com/steveire/grantlee";
+    maintainers = [ maintainers.ttuegel ];
+    license = licenses.lgpl21;
+    inherit (qtbase.meta) platforms;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/grantlee/5/grantlee-nix-profiles.patch b/nixpkgs/pkgs/development/libraries/grantlee/5/grantlee-nix-profiles.patch
new file mode 100644
index 000000000000..f6c13dbd6d55
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/grantlee/5/grantlee-nix-profiles.patch
@@ -0,0 +1,19 @@
+Index: grantlee-5.1.0/templates/lib/engine.cpp
+===================================================================
+--- grantlee-5.1.0.orig/templates/lib/engine.cpp
++++ grantlee-5.1.0/templates/lib/engine.cpp
+@@ -48,6 +48,14 @@ Engine::Engine(QObject *parent)
+ 
+   d_ptr->m_pluginDirs = QCoreApplication::instance()->libraryPaths();
+   d_ptr->m_pluginDirs << QString::fromLocal8Bit(GRANTLEE_PLUGIN_PATH);
++
++  // Add library paths derived from NIX_PROFILES.
++  const QByteArrayList profiles = qgetenv("NIX_PROFILES").split(' ');
++  for (const QByteArray &profile: profiles) {
++    if (!profile.isEmpty()) {
++      d_ptr->m_pluginDirs << (QFile::decodeName(profile) + QStringLiteral("/lib"));
++    }
++  }
+ }
+ 
+ Engine::~Engine()
diff --git a/nixpkgs/pkgs/development/libraries/grantlee/5/grantlee-no-canonicalize-filepath.patch b/nixpkgs/pkgs/development/libraries/grantlee/5/grantlee-no-canonicalize-filepath.patch
new file mode 100644
index 000000000000..b29911bcfcdb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/grantlee/5/grantlee-no-canonicalize-filepath.patch
@@ -0,0 +1,27 @@
+Index: grantlee-5.1.0/templates/lib/templateloader.cpp
+===================================================================
+--- grantlee-5.1.0.orig/templates/lib/templateloader.cpp
++++ grantlee-5.1.0/templates/lib/templateloader.cpp
+@@ -142,10 +142,6 @@ Template FileSystemTemplateLoader::loadByName(const QString &fileName,
+                      + QLatin1Char('/') + fileName);
+     const QFileInfo fi(file);
+
+-    if (file.exists()
+-        && !fi.canonicalFilePath().contains(
+-            QDir(d->m_templateDirs.at(i)).canonicalPath()))
+-      return {};
+     ++i;
+   }
+
+@@ -173,11 +169,6 @@ FileSystemTemplateLoader::getMediaUri(co
+                      + QLatin1Char('/') + fileName);
+ 
+     const QFileInfo fi(file);
+-    if (!fi.canonicalFilePath().contains(
+-            QDir(d->m_templateDirs.at(i)).canonicalPath())) {
+-      ++i;
+-      continue;
+-    }
+ 
+     if (file.exists()) {
+       auto path = fi.absoluteFilePath();
diff --git a/nixpkgs/pkgs/development/libraries/grantlee/5/setup-hook.sh b/nixpkgs/pkgs/development/libraries/grantlee/5/setup-hook.sh
new file mode 100644
index 000000000000..b51cb4a31909
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/grantlee/5/setup-hook.sh
@@ -0,0 +1,13 @@
+grantleePluginPrefix=@grantleePluginPrefix@
+
+providesGrantleeRuntime() {
+    [ -d "$1/$grantleePluginPrefix" ]
+}
+
+_grantleeEnvHook() {
+    if providesGrantleeRuntime "$1"; then
+        propagatedBuildInputs+=" $1"
+        propagatedUserEnvPkgs+=" $1"
+    fi
+}
+addEnvHooks "$hostOffset" _grantleeEnvHook
diff --git a/nixpkgs/pkgs/development/libraries/grantlee/default.nix b/nixpkgs/pkgs/development/libraries/grantlee/default.nix
new file mode 100644
index 000000000000..2d1a87ab0b3e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/grantlee/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, lib, fetchFromGitHub, qtbase, cmake, wrapQtAppsHook }:
+
+stdenv.mkDerivation rec {
+  pname = "grantlee";
+  version = "5.3.1";
+
+  src = fetchFromGitHub {
+    owner = "steveire";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-enP7b6A7Ndew2LJH569fN3IgPu2/KL5rCmU/jmKb9sY=";
+  };
+
+  nativeBuildInputs = [ cmake wrapQtAppsHook ];
+  buildInputs = [ qtbase ];
+
+  meta = {
+    description = "Libraries for text templating with Qt";
+    longDescription = ''
+      Grantlee is a set of Free Software libraries written using the Qt framework. Currently two libraries are shipped with Grantlee: Grantlee Templates and Grantlee TextDocument.
+      The goal of Grantlee Templates is to make it easier for application developers to separate the structure of documents from the data they contain, opening the door for theming and advanced generation of other text such as code.
+      The syntax uses the syntax of the Django template system, and the core design of Django is reused in Grantlee.
+    '';
+
+    homepage = "https://github.com/steveire/grantlee";
+    license = lib.licenses.lgpl21Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/graphene-hardened-malloc/default.nix b/nixpkgs/pkgs/development/libraries/graphene-hardened-malloc/default.nix
new file mode 100644
index 000000000000..85ec3352f705
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/graphene-hardened-malloc/default.nix
@@ -0,0 +1,95 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, python3
+, runCommand
+, makeWrapper
+, stress-ng
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "graphene-hardened-malloc";
+  version = "12";
+
+  src = fetchFromGitHub {
+    owner = "GrapheneOS";
+    repo = "hardened_malloc";
+    rev = finalAttrs.version;
+    sha256 = "sha256-ujwzr4njNsf/VTyEq7zKHWxoivU3feavSTx+MLIj1ZM=";
+  };
+
+  doCheck = true;
+  nativeCheckInputs = [ python3 ];
+  # these tests cover use as a build-time-linked library
+  checkTarget = "test";
+
+  installPhase = ''
+    install -Dm444 -t $out/include include/*
+    install -Dm444 -t $out/lib out/libhardened_malloc.so
+
+    mkdir -p $out/bin
+    substitute preload.sh $out/bin/preload-hardened-malloc --replace "\$dir" $out/lib
+    chmod 0555 $out/bin/preload-hardened-malloc
+  '';
+
+  separateDebugInfo = true;
+
+  passthru = {
+    ld-preload-tests = stdenv.mkDerivation {
+      name = "${finalAttrs.pname}-ld-preload-tests";
+      inherit (finalAttrs) src;
+
+      nativeBuildInputs = [ makeWrapper ];
+
+      # reuse the projects tests to cover use with LD_PRELOAD. we have
+      # to convince the test programs to build as though they're naive
+      # standalone executables. this includes disabling tests for
+      # malloc_object_size, which doesn't make sense to use via LD_PRELOAD.
+      buildPhase = ''
+        pushd test
+        make LDLIBS= LDFLAGS=-Wl,--unresolved-symbols=ignore-all CXXFLAGS=-lstdc++
+        substituteInPlace test_smc.py \
+          --replace 'test_malloc_object_size' 'dont_test_malloc_object_size' \
+          --replace 'test_invalid_malloc_object_size' 'dont_test_invalid_malloc_object_size'
+        popd # test
+      '';
+
+      installPhase = ''
+        mkdir -p $out/test
+        cp -r test $out/test
+
+        mkdir -p $out/bin
+        makeWrapper ${python3.interpreter} $out/bin/run-tests \
+          --add-flags "-I -m unittest discover --start-directory $out/test"
+      '';
+    };
+    tests = {
+      ld-preload = runCommand "ld-preload-test-run" { } ''
+        ${finalAttrs.finalPackage}/bin/preload-hardened-malloc ${finalAttrs.passthru.ld-preload-tests}/bin/run-tests
+        touch $out
+      '';
+      # to compensate for the lack of tests of correct normal malloc operation
+      stress = runCommand "stress-test-run" { } ''
+        ${finalAttrs.finalPackage}/bin/preload-hardened-malloc ${stress-ng}/bin/stress-ng \
+          --no-rand-seed \
+          --malloc 8 \
+          --malloc-ops 1000000 \
+          --verify
+        touch $out
+      '';
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://github.com/GrapheneOS/hardened_malloc";
+    description = "Hardened allocator designed for modern systems";
+    longDescription = ''
+      This is a security-focused general purpose memory allocator providing the malloc API
+      along with various extensions. It provides substantial hardening against heap
+      corruption vulnerabilities yet aims to provide decent overall performance.
+    '';
+    license = licenses.mit;
+    maintainers = with maintainers; [ ris ];
+    platforms = [ "x86_64-linux" "aarch64-linux" ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/graphene/0001-meson-add-options-for-tests-installation-dirs.patch b/nixpkgs/pkgs/development/libraries/graphene/0001-meson-add-options-for-tests-installation-dirs.patch
new file mode 100644
index 000000000000..36d81ca9f138
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/graphene/0001-meson-add-options-for-tests-installation-dirs.patch
@@ -0,0 +1,51 @@
+From d68fcb793d70032e978ecf8e0577eea955a741cf Mon Sep 17 00:00:00 2001
+From: worldofpeace <worldofpeace@protonmail.ch>
+Date: Sun, 10 Apr 2022 12:02:10 +0800
+Subject: [PATCH] meson: add options for tests installation dirs
+
+---
+ meson_options.txt |  6 ++++++
+ tests/meson.build | 13 +++++++++++--
+ 2 files changed, 17 insertions(+), 2 deletions(-)
+
+diff --git a/meson_options.txt b/meson_options.txt
+index b9a2fb5..4b8629f 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -23,3 +23,9 @@ option('tests', type: 'boolean',
+ option('installed_tests', type: 'boolean',
+        value: true,
+        description: 'Install tests')
++option('installed_test_datadir', type: 'string',
++       value: '',
++       description: 'Installation directory for data files in tests')
++option('installed_test_bindir', type: 'string',
++       value: '',
++       description: 'Installation directory for binary files in tests')
+diff --git a/tests/meson.build b/tests/meson.build
+index 2b925e7..3276849 100644
+--- a/tests/meson.build
++++ b/tests/meson.build
+@@ -21,8 +21,17 @@ unit_tests = [
+ 
+ gen_installed_test = find_program('gen-installed-test.py')
+ 
+-installed_test_datadir = join_paths(get_option('prefix'), get_option('datadir'), 'installed-tests', graphene_api_path)
+-installed_test_bindir = join_paths(get_option('prefix'), get_option('libexecdir'), 'installed-tests', graphene_api_path)
++installed_test_suffix = join_paths('installed-tests', graphene_api_path)
++
++installed_test_datadir = join_paths(get_option('installed_test_datadir'), installed_test_suffix)
++if installed_test_datadir == ''
++  installed_test_datadir = join_paths(get_option('prefix'), get_option('datadir'), installed_test_suffix)
++endif
++
++installed_test_bindir = join_paths(get_option('installed_test_bindir'), installed_test_suffix)
++if installed_test_bindir == ''
++  installed_test_bindir = join_paths(get_option('prefix'), get_option('libexecdir'), installed_test_suffix)
++endif
+ 
+ # Make tests conditional on having mutest-1 installed system-wide, or
+ # available as a subproject
+-- 
+2.35.1
+
diff --git a/nixpkgs/pkgs/development/libraries/graphene/default.nix b/nixpkgs/pkgs/development/libraries/graphene/default.nix
new file mode 100644
index 000000000000..23b617d4a610
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/graphene/default.nix
@@ -0,0 +1,124 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, fetchpatch
+, nix-update-script
+, pkg-config
+, meson
+, mesonEmulatorHook
+, ninja
+, python3
+, mutest
+, nixosTests
+, glib
+, withDocumentation ? !stdenv.hostPlatform.isStatic
+, gtk-doc
+, docbook_xsl
+, docbook_xml_dtd_43
+, buildPackages
+, gobject-introspection
+, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
+, makeWrapper
+}:
+
+stdenv.mkDerivation rec {
+  pname = "graphene";
+  version = "1.10.8";
+
+  outputs = [ "out" "dev" ]
+    ++ lib.optionals withDocumentation [ "devdoc" ]
+    ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [ "installedTests" ];
+
+  src = fetchFromGitHub {
+    owner = "ebassi";
+    repo = pname;
+    rev = version;
+    sha256 = "P6JQhSktzvyMHatP/iojNGXPmcsxsFxdYerXzS23ojI=";
+  };
+
+  patches = [
+    # Add option for changing installation path of installed tests.
+    ./0001-meson-add-options-for-tests-installation-dirs.patch
+
+    # Disable flaky simd_operators_reciprocal test
+    # https://github.com/ebassi/graphene/issues/246
+    (fetchpatch {
+      url = "https://github.com/ebassi/graphene/commit/4fbdd07ea3bcd0964cca3966010bf71cb6fa8209.patch";
+      sha256 = "uFkkH0u4HuQ/ua1mfO7sJZ7MPrQdV/JON7mTYB4DW80=";
+      includes = [ "tests/simd.c" ];
+      revert = true;
+    })
+  ];
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    python3
+    makeWrapper
+  ] ++ lib.optionals withDocumentation [
+    docbook_xml_dtd_43
+    docbook_xsl
+    gtk-doc
+  ] ++ lib.optionals withIntrospection [
+    gobject-introspection
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
+  ];
+
+  buildInputs = [
+    glib
+  ];
+
+  nativeCheckInputs = [
+    mutest
+  ];
+
+  mesonFlags = [
+    (lib.mesonBool "gtk_doc" withDocumentation)
+    (lib.mesonEnable "introspection" withIntrospection)
+    "-Dinstalled_test_datadir=${placeholder "installedTests"}/share"
+    "-Dinstalled_test_bindir=${placeholder "installedTests"}/libexec"
+  ] ++ lib.optionals stdenv.isAarch32 [
+    # the box test is failing with SIGBUS on armv7l-linux
+    # https://github.com/ebassi/graphene/issues/215
+    "-Darm_neon=false"
+  ];
+
+  doCheck = true;
+
+  postPatch = ''
+    patchShebangs tests/gen-installed-test.py
+  '' + lib.optionalString withIntrospection ''
+    PATH=${python3.withPackages (pp: [ pp.pygobject3 pp.tappy ])}/bin:$PATH patchShebangs tests/introspection.py
+  '';
+
+  postFixup = let
+    introspectionPy = "${placeholder "installedTests"}/libexec/installed-tests/graphene-1.0/introspection.py";
+  in lib.optionalString withIntrospection ''
+    if [ -x '${introspectionPy}' ] ; then
+      wrapProgram '${introspectionPy}' \
+        --prefix GI_TYPELIB_PATH : "$out/lib/girepository-1.0"
+    fi
+  '';
+
+  passthru = {
+    tests = {
+      installedTests = nixosTests.installed-tests.graphene;
+    };
+
+    updateScript = nix-update-script { };
+  };
+
+  meta = with lib; {
+    description = "A thin layer of graphic data types";
+    homepage = "https://github.com/ebassi/graphene";
+    license = licenses.mit;
+    maintainers = teams.gnome.members ++ (with maintainers; [ ]);
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/grilo-plugins/chromaprint-gst-plugins.patch b/nixpkgs/pkgs/development/libraries/grilo-plugins/chromaprint-gst-plugins.patch
new file mode 100644
index 000000000000..cb6a1a354945
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/grilo-plugins/chromaprint-gst-plugins.patch
@@ -0,0 +1,13 @@
+diff --git a/src/chromaprint/grl-chromaprint.c b/src/chromaprint/grl-chromaprint.c
+index 5a3598b..8979291 100644
+--- a/src/chromaprint/grl-chromaprint.c
++++ b/src/chromaprint/grl-chromaprint.c
+@@ -111,6 +111,8 @@
+ 
+   gst_init (NULL, NULL);
+ 
++  @load_plugins@
++
+   source = grl_chromaprint_source_new ();
+   grl_registry_register_source (registry,
+                                 plugin,
diff --git a/nixpkgs/pkgs/development/libraries/grilo-plugins/default.nix b/nixpkgs/pkgs/development/libraries/grilo-plugins/default.nix
new file mode 100644
index 000000000000..88b83a32918f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/grilo-plugins/default.nix
@@ -0,0 +1,101 @@
+{ lib, stdenv
+, fetchurl
+, substituteAll
+, meson
+, ninja
+, pkg-config
+, gettext
+, gperf
+, sqlite
+, libarchive
+, libdmapsharing
+, libsoup_3
+, gnome
+, libxml2
+, lua5_4
+, liboauth
+, libgdata
+, libmediaart
+, grilo
+, gst_all_1
+, gnome-online-accounts
+, gmime
+, gom
+, json-glib
+, avahi
+, tracker
+, dleyna-server
+, itstool
+, totem-pl-parser
+}:
+
+stdenv.mkDerivation rec {
+  pname = "grilo-plugins";
+  version = "0.3.16";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "/m9Nvlhsa4uiQGOU4gLyLQCdZCqW6zpU8y9qIdCEzcs=";
+  };
+
+  patches = [
+    # grl-chromaprint requires the following GStreamer elements:
+    # * fakesink (gstreamer)
+    # * playbin (gst-plugins-base)
+    # * chromaprint (gst-plugins-bad)
+    (substituteAll {
+      src = ./chromaprint-gst-plugins.patch;
+      load_plugins = lib.concatMapStrings (plugin: ''gst_registry_scan_path(gst_registry_get(), "${lib.getLib plugin}/lib/gstreamer-1.0");'') (with gst_all_1; [
+        gstreamer
+        gst-plugins-base
+        gst-plugins-bad
+      ]);
+    })
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gettext
+    itstool
+    gperf # for lua-factory
+  ];
+
+  buildInputs = [
+    grilo
+    libxml2
+    # libgdata
+    lua5_4
+    liboauth
+    sqlite
+    gnome-online-accounts
+    totem-pl-parser
+    libarchive
+    libdmapsharing
+    libsoup_3
+    gmime
+    gom
+    json-glib
+    avahi
+    libmediaart
+    tracker
+    dleyna-server
+    gst_all_1.gstreamer
+  ];
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "none";
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://wiki.gnome.org/Projects/Grilo";
+    description = "A collection of plugins for the Grilo framework";
+    maintainers = teams.gnome.members;
+    license = licenses.lgpl21Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/grilo/default.nix b/nixpkgs/pkgs/development/libraries/grilo/default.nix
new file mode 100644
index 000000000000..49c957cec5dc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/grilo/default.nix
@@ -0,0 +1,80 @@
+{ stdenv
+, lib
+, fetchurl
+, meson
+, mesonEmulatorHook
+, ninja
+, pkg-config
+, python3
+, gettext
+, vala
+, glib
+, liboauth
+, gtk3
+, gtk-doc
+, docbook-xsl-nons
+, docbook_xml_dtd_43
+, libxml2
+, gnome
+, gobject-introspection
+, libsoup_3
+, totem-pl-parser
+}:
+
+stdenv.mkDerivation rec {
+  pname = "grilo";
+  version = "0.3.16"; # if you change minor, also change ./setup-hook.sh
+
+  outputs = [ "out" "dev" "man" "devdoc" ];
+  outputBin = "dev";
+
+  setupHook = ./setup-hook.sh;
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "iEWA6MXs4oDfI6pj/1I0t9SJiKQE331r/M0ed7RzvZY=";
+  };
+
+  mesonFlags = [
+    "-Denable-gtk-doc=true"
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    python3
+    gettext
+    gobject-introspection
+    vala
+    gtk-doc
+    docbook-xsl-nons
+    docbook_xml_dtd_43
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
+  ];
+
+  buildInputs = [
+    glib
+    liboauth
+    gtk3
+    libxml2
+    libsoup_3
+    totem-pl-parser
+  ];
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "none";
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://wiki.gnome.org/Projects/Grilo";
+    description = "Framework that provides access to various sources of multimedia content, using a pluggable system";
+    maintainers = teams.gnome.members;
+    license = licenses.lgpl2Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/grilo/setup-hook.sh b/nixpkgs/pkgs/development/libraries/grilo/setup-hook.sh
new file mode 100644
index 000000000000..9337c520a207
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/grilo/setup-hook.sh
@@ -0,0 +1,7 @@
+make_grilo_find_plugins() {
+    if [ -d "$1"/lib/grilo-0.3 ]; then
+        addToSearchPath GRL_PLUGIN_PATH "$1/lib/grilo-0.3"
+    fi
+}
+
+addEnvHooks "$hostOffset" make_grilo_find_plugins
diff --git a/nixpkgs/pkgs/development/libraries/grpc/default.nix b/nixpkgs/pkgs/development/libraries/grpc/default.nix
new file mode 100644
index 000000000000..1110764575e3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/grpc/default.nix
@@ -0,0 +1,120 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, buildPackages
+, cmake
+, zlib
+, c-ares
+, pkg-config
+, re2
+, openssl
+, protobuf
+, grpc
+, abseil-cpp
+, libnsl
+
+# tests
+, python3
+, arrow-cpp
+}:
+
+stdenv.mkDerivation rec {
+  pname = "grpc";
+  version = "1.61.0"; # N.B: if you change this, please update:
+    # pythonPackages.grpcio-tools
+    # pythonPackages.grpcio-status
+
+  src = fetchFromGitHub {
+    owner = "grpc";
+    repo = "grpc";
+    rev = "v${version}";
+    hash = "sha256-NLxcGFQ1F5RLoSFC0XYMjvGXkSWc/vLzgtk5qsOndEo=";
+    fetchSubmodules = true;
+  };
+
+  patches = [
+    (fetchpatch {
+      # armv6l support, https://github.com/grpc/grpc/pull/21341
+      name = "grpc-link-libatomic.patch";
+      url = "https://github.com/lopsided98/grpc/commit/a9b917666234f5665c347123d699055d8c2537b2.patch";
+      hash = "sha256-Lm0GQsz/UjBbXXEE14lT0dcRzVmCKycrlrdBJj+KLu8=";
+    })
+    (fetchpatch {
+      # Fix compatibility with Abseil 202401. Remove with the next release.
+      url = "https://github.com/grpc/grpc/commit/bc044174401a0842b36b8682936fc93b5041cf88.patch";
+      hash = "sha256-VKAuPtLqsR2dmrpKuFXq2HIhuDxPJVSH2w1G00N07RI=";
+      excludes = [ "src/core/lib/transport/message.cc" ];
+    })
+  ];
+
+  nativeBuildInputs = [ cmake pkg-config ]
+    ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) grpc;
+  propagatedBuildInputs = [ c-ares re2 zlib abseil-cpp ];
+  buildInputs = [ openssl protobuf ]
+    ++ lib.optionals stdenv.isLinux [ libnsl ];
+
+  cmakeFlags = [
+    "-DgRPC_ZLIB_PROVIDER=package"
+    "-DgRPC_CARES_PROVIDER=package"
+    "-DgRPC_RE2_PROVIDER=package"
+    "-DgRPC_SSL_PROVIDER=package"
+    "-DgRPC_PROTOBUF_PROVIDER=package"
+    "-DgRPC_ABSL_PROVIDER=package"
+    "-DBUILD_SHARED_LIBS=ON"
+  ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "-D_gRPC_PROTOBUF_PROTOC_EXECUTABLE=${buildPackages.protobuf}/bin/protoc"
+    "-D_gRPC_CPP_PLUGIN=${buildPackages.grpc}/bin/grpc_cpp_plugin"
+  ]
+  # The build scaffold defaults to c++14 on darwin, even when the compiler uses
+  # a more recent c++ version by default [1]. However, downgrades are
+  # problematic, because the compatibility types in abseil will have different
+  # interface definitions than the ones used for building abseil itself.
+  # [1] https://github.com/grpc/grpc/blob/v1.57.0/CMakeLists.txt#L239-L243
+  ++ (let
+    defaultCxxIsOlderThan17 =
+      (stdenv.cc.isClang && lib.versionAtLeast stdenv.cc.cc.version "16.0")
+       || (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.cc.version "11.0");
+    in lib.optionals (stdenv.hostPlatform.isDarwin && defaultCxxIsOlderThan17)
+  [
+    "-DCMAKE_CXX_STANDARD=17"
+  ]);
+
+  # CMake creates a build directory by default, this conflicts with the
+  # basel BUILD file on case-insensitive filesystems.
+  preConfigure = ''
+    rm -vf BUILD
+  '';
+
+  # When natively compiling, grpc_cpp_plugin is executed from the build directory,
+  # needing to load dynamic libraries from the build directory, so we set
+  # LD_LIBRARY_PATH to enable this. When cross compiling we need to avoid this,
+  # since it can cause the grpc_cpp_plugin executable from buildPackages to
+  # crash if build and host architecture are compatible (e. g. pkgsLLVM).
+  preBuild = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
+    export LD_LIBRARY_PATH=$(pwd)''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH
+  '';
+
+  env.NIX_CFLAGS_COMPILE = toString ([
+    "-Wno-error"
+  ] ++ lib.optionals stdenv.isDarwin [
+    # Workaround for https://github.com/llvm/llvm-project/issues/48757
+    "-Wno-elaborated-enum-base"
+  ]);
+
+  enableParallelBuilds = true;
+
+  passthru.tests = {
+    inherit (python3.pkgs) grpcio-status grpcio-tools jaxlib;
+    inherit arrow-cpp;
+  };
+
+  meta = with lib; {
+    description = "The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ lnl7 marsam ];
+    homepage = "https://grpc.io/";
+    platforms = platforms.all;
+    changelog = "https://github.com/grpc/grpc/releases/tag/v${version}";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gsasl/default.nix b/nixpkgs/pkgs/development/libraries/gsasl/default.nix
new file mode 100644
index 000000000000..3dc5c128fc37
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gsasl/default.nix
@@ -0,0 +1,48 @@
+{ fetchurl, lib, stdenv, libidn, libkrb5
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "gsasl";
+  version = "2.2.1";
+
+  src = fetchurl {
+    url = "mirror://gnu/gsasl/${finalAttrs.pname}-${finalAttrs.version}.tar.gz";
+    sha256 = "sha256-1FtWLhO9E7n8ILNy9LUyaXQM9iefg28JzhG50yvO4HU=";
+  };
+
+  # This is actually bug in musl. It is already fixed in trunc and
+  # this patch won't be necessary with musl > 1.2.3.
+  #
+  # https://git.musl-libc.org/cgit/musl/commit/?id=b50eb8c36c20f967bd0ed70c0b0db38a450886ba
+  patches = lib.optional stdenv.hostPlatform.isMusl ./gsasl.patch;
+
+  buildInputs = [ libidn libkrb5 ];
+
+  configureFlags = [ "--with-gssapi-impl=mit" ];
+
+  preCheck = ''
+    export LOCALDOMAIN="dummydomain"
+  '';
+  doCheck = !stdenv.hostPlatform.isDarwin;
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = {
+    description = "GNU SASL, Simple Authentication and Security Layer library";
+
+    longDescription =
+      '' GNU SASL is a library that implements the IETF Simple
+         Authentication and Security Layer (SASL) framework and
+         some SASL mechanisms. SASL is used in network servers
+         (e.g. IMAP, SMTP, etc.) to authenticate peers.
+       '';
+
+    homepage = "https://www.gnu.org/software/gsasl/";
+    license = lib.licenses.gpl3Plus;
+
+    maintainers = with lib.maintainers; [ shlevy ];
+    pkgConfigModules = [ "libgsasl" ];
+    platforms = lib.platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/gsasl/gsasl.patch b/nixpkgs/pkgs/development/libraries/gsasl/gsasl.patch
new file mode 100644
index 000000000000..572d3034967e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gsasl/gsasl.patch
@@ -0,0 +1,21 @@
+GNU libc and Musl libc have different ideas what
+
+    strverscmp("UNKNOWN", "2.2.0")
+
+should return. Hopefully nobody depend on this particular behaviour in
+practice.
+
+--- a/tests/version.c	1970-01-01 00:00:00.000000000 -0000
++++ b/tests/version.c	1970-01-01 00:00:00.000000000 -0000
+@@ -111,11 +111,5 @@
+       exit_code = EXIT_FAILURE;
+     }
+ 
+-  if (gsasl_check_version ("UNKNOWN"))
+-    {
+-      printf ("FAIL: gsasl_check_version (UNKNOWN)\n");
+-      exit_code = EXIT_FAILURE;
+-    }
+-
+   return exit_code;
+ }
diff --git a/nixpkgs/pkgs/development/libraries/gsettings-desktop-schemas/default.nix b/nixpkgs/pkgs/development/libraries/gsettings-desktop-schemas/default.nix
new file mode 100644
index 000000000000..f898f3d3bcd8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gsettings-desktop-schemas/default.nix
@@ -0,0 +1,70 @@
+{ lib, stdenv
+, fetchurl
+, pkg-config
+, glib
+, gobject-introspection
+, buildPackages
+, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
+, meson
+, ninja
+  # just for passthru
+, gnome
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gsettings-desktop-schemas";
+  version = "45.0";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.major version}/${pname}-${version}.tar.xz";
+    sha256 = "NlyNBNr3mzjIs9yWJjSaAk+eS+/dMf7edLQvep++CuI=";
+  };
+
+  strictDeps = true;
+  depsBuildBuild = [ pkg-config ];
+  nativeBuildInputs = [
+    glib
+    meson
+    ninja
+    pkg-config
+  ] ++ lib.optionals withIntrospection [
+    gobject-introspection
+  ];
+
+  mesonFlags = [
+    (lib.mesonBool "introspection" withIntrospection)
+  ];
+
+  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='''
+    EOF
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas";
+    description = "Collection of GSettings schemas for settings shared by various components of a desktop";
+    license = licenses.lgpl21Plus;
+    maintainers = teams.gnome.members;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gsettings-qt/default.nix b/nixpkgs/pkgs/development/libraries/gsettings-qt/default.nix
new file mode 100644
index 000000000000..803ab5e96dc5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gsettings-qt/default.nix
@@ -0,0 +1,69 @@
+{ lib, stdenv, fetchFromGitLab, pkg-config
+, qmake, qtbase, qtdeclarative, wrapQtAppsHook
+, glib, gobject-introspection
+, gitUpdater
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gsettings-qt";
+  version = "0.2";
+
+  src = fetchFromGitLab {
+    group = "ubports";
+    owner = "core";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "14l8xphw4jd9ckqba13cyxq0i362x8lfsd0zlfawwi2z1q1vqm92";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+    qmake
+    gobject-introspection
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    glib
+    qtdeclarative
+  ];
+
+  patchPhase = ''
+    # force ordered build of subdirs
+    sed -i -e "\$aCONFIG += ordered" gsettings-qt.pro
+
+    # It seems that there is a bug in qtdeclarative: qmlplugindump fails
+    # because it can not find or load the Qt platform plugin "minimal".
+    # A workaround is to set QT_PLUGIN_PATH and QML2_IMPORT_PATH explicitly.
+    export QT_PLUGIN_PATH=${qtbase.bin}/${qtbase.qtPluginPrefix}
+    export QML2_IMPORT_PATH=${qtdeclarative.bin}/${qtbase.qtQmlPrefix}
+
+    substituteInPlace GSettings/gsettings-qt.pro \
+      --replace '$$[QT_INSTALL_QML]' "$out/$qtQmlPrefix" \
+      --replace '$$[QT_INSTALL_BINS]/qmlplugindump' "qmlplugindump"
+
+    substituteInPlace src/gsettings-qt.pro \
+      --replace '$$[QT_INSTALL_LIBS]' "$out/lib" \
+      --replace '$$[QT_INSTALL_HEADERS]' "$out/include"
+  '';
+
+  preInstall = ''
+    # do not install tests
+    for f in tests/Makefile{,.cpptest}; do
+      substituteInPlace $f \
+        --replace "install: install_target" "install: "
+    done
+  '';
+
+  passthru.updateScript = gitUpdater {
+    rev-prefix = "v";
+  };
+
+  meta = with lib; {
+    description = "Library to access GSettings from Qt";
+    homepage = "https://gitlab.com/ubports/core/gsettings-qt";
+    license = licenses.lgpl3;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.romildo ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gsignond/conf.patch b/nixpkgs/pkgs/development/libraries/gsignond/conf.patch
new file mode 100644
index 000000000000..0aa2034e3996
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gsignond/conf.patch
@@ -0,0 +1,12 @@
+diff --git a/meson.build b/meson.build
+index cb1e0df..d90c85c 100644
+--- a/meson.build
++++ b/meson.build
+@@ -95,6 +95,6 @@ endif
+ configure_file(
+     input: 'gsignond.conf.in',
+     configuration: conf_data,
+-    install_dir: sysconf_dir,
++    install_dir: 'etc/',
+     output: 'gsignond.conf'
+ )
diff --git a/nixpkgs/pkgs/development/libraries/gsignond/default.nix b/nixpkgs/pkgs/development/libraries/gsignond/default.nix
new file mode 100644
index 000000000000..912054eb85c3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gsignond/default.nix
@@ -0,0 +1,67 @@
+{ lib, stdenv, fetchFromGitLab, pkg-config, meson, ninja, glib, glib-networking
+, sqlite, gobject-introspection, vala, gtk-doc, libsecret, docbook_xsl
+, docbook_xml_dtd_43, docbook_xml_dtd_45, glibcLocales, makeWrapper
+, symlinkJoin, gsignondPlugins, plugins }:
+
+let
+unwrapped = stdenv.mkDerivation rec {
+  pname = "gsignond";
+  version = "1.2.0";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchFromGitLab {
+    owner = "accounts-sso";
+    repo = pname;
+    rev = version;
+    sha256 = "17cpil3lpijgyj2z5c41vhb7fpk17038k5ggyw9p6049jrlf423m";
+  };
+
+  nativeBuildInputs = [
+    docbook_xml_dtd_43
+    docbook_xml_dtd_45
+    docbook_xsl
+    glibcLocales
+    gobject-introspection
+    gtk-doc
+    meson
+    ninja
+    pkg-config
+    vala
+  ];
+
+  buildInputs = [
+    glib
+    glib-networking
+    libsecret
+  ];
+
+  propagatedBuildInputs = [ sqlite ];
+
+  mesonFlags = [
+    "-Dbus_type=session"
+    "-Dextension=desktop"
+  ];
+
+  LC_ALL = "en_US.UTF-8";
+
+  patches = [
+    ./conf.patch
+    ./plugin-load-env.patch
+  ];
+
+  meta = with lib; {
+    description = "D-Bus service which performs user authentication on behalf of its clients";
+    homepage = "https://gitlab.com/accounts-sso/gsignond";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.linux;
+  };
+};
+
+in if plugins == [] then unwrapped
+    else import ./wrapper.nix {
+      inherit makeWrapper symlinkJoin plugins;
+      gsignond = unwrapped;
+    }
+
diff --git a/nixpkgs/pkgs/development/libraries/gsignond/plugin-load-env.patch b/nixpkgs/pkgs/development/libraries/gsignond/plugin-load-env.patch
new file mode 100644
index 000000000000..5da2b4c157e8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gsignond/plugin-load-env.patch
@@ -0,0 +1,35 @@
+diff --git a/src/gplugind/gsignond-plugin-loader.c b/src/gplugind/gsignond-plugin-loader.c
+index 5497b32..979e1b4 100644
+--- a/src/gplugind/gsignond-plugin-loader.c
++++ b/src/gplugind/gsignond-plugin-loader.c
+@@ -38,11 +38,10 @@ gsignond_load_plugin (
+     gchar *plugin_filename;
+     GSignondPlugin *plugin;
+ 
+-#   ifdef ENABLE_DEBUG
+     const gchar *env_val = g_getenv("SSO_GPLUGINS_DIR");
+     if (env_val)
+         plugin_path = env_val;
+-#   endif
++
+     plugin_filename = g_module_build_path (plugin_path, plugin_type);
+     plugin = gsignond_load_plugin_with_filename (plugin_type,
+                                                  plugin_filename);
+diff --git a/src/gplugind/main.c b/src/gplugind/main.c
+index 1c6cdb6..c85c623 100644
+--- a/src/gplugind/main.c
++++ b/src/gplugind/main.c
+@@ -93,11 +93,11 @@ _install_sighandlers (GMainLoop *main_loop)
+ static const gchar* _plugin_path(void)
+ {
+     const gchar *plugin_path = GSIGNOND_GPLUGINS_DIR;
+-#   ifdef ENABLE_DEBUG
++
+     const gchar *env_val = g_getenv("SSO_GPLUGINS_DIR");
+     if (env_val)
+         plugin_path = env_val;
+-#   endif
++
+     return plugin_path;
+ }
+ 
diff --git a/nixpkgs/pkgs/development/libraries/gsignond/plugins/lastfm.nix b/nixpkgs/pkgs/development/libraries/gsignond/plugins/lastfm.nix
new file mode 100644
index 000000000000..6141528a9fe6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gsignond/plugins/lastfm.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchFromGitLab, pkg-config, meson, ninja, vala, glib, gsignond, json-glib, libsoup, gobject-introspection }:
+
+stdenv.mkDerivation {
+  pname = "gsignond-plugin-lastfm";
+  version = "2018-05-07";
+
+  src = fetchFromGitLab {
+    owner = "accounts-sso";
+    repo = "gsignond-plugin-lastfm";
+    rev = "0a7a5f8511282e45cfe35987b81f27f158f0648c";
+    sha256 = "0ay6ir9zg9l0264x5xwd7c6j8qmwlhrifkkkjd1yrjh9sqxyfj7f";
+  };
+
+  nativeBuildInputs = [
+    gobject-introspection
+    meson
+    ninja
+    pkg-config
+    vala
+  ];
+
+  buildInputs = [
+    glib
+    gsignond
+    json-glib
+    libsoup
+  ];
+
+  PKG_CONFIG_GSIGNOND_GPLUGINSDIR = "${placeholder "out"}/lib/gsignond/gplugins";
+
+  meta = with lib; {
+    description = "Plugin for the Accounts-SSO gSignOn daemon that handles Last.FM credentials";
+    homepage = "https://gitlab.com/accounts-sso/gsignond-plugin-lastfm";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gsignond/plugins/mail.nix b/nixpkgs/pkgs/development/libraries/gsignond/plugins/mail.nix
new file mode 100644
index 000000000000..977bc1489420
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gsignond/plugins/mail.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchFromGitLab, pkg-config, meson, ninja, vala, glib, gsignond, gobject-introspection }:
+
+stdenv.mkDerivation rec {
+  pname = "gsignond-plugin-mail";
+  version = "0.3.0";
+
+  src = fetchFromGitLab {
+    owner = "accounts-sso";
+    repo = "gsignond-plugin-mail";
+    rev = version;
+    sha256 = "0x8jcl0ra9kacm80f1im5wpxp9r9wxayjwnk6dkv7fhjbl2p4nh0";
+  };
+
+  nativeBuildInputs = [
+    gobject-introspection
+    meson
+    ninja
+    pkg-config
+    vala
+  ];
+
+  buildInputs = [
+    glib
+    gsignond
+  ];
+
+  PKG_CONFIG_GSIGNOND_GPLUGINSDIR = "${placeholder "out"}/lib/gsignond/gplugins";
+
+  meta = with lib; {
+    description = "Plugin for the Accounts-SSO gSignOn daemon that handles E-Mail credentials";
+    homepage = "https://gitlab.com/accounts-sso/gsignond-plugin-mail";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gsignond/plugins/oauth.nix b/nixpkgs/pkgs/development/libraries/gsignond/plugins/oauth.nix
new file mode 100644
index 000000000000..bc496e8ac2cc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gsignond/plugins/oauth.nix
@@ -0,0 +1,48 @@
+{ lib, stdenv, fetchFromGitLab, pkg-config, meson, ninja, glib, gsignond, check
+, json-glib, libsoup, gnutls, gtk-doc, docbook_xml_dtd_43, docbook_xml_dtd_45
+, docbook_xsl, glibcLocales, gobject-introspection }:
+
+stdenv.mkDerivation {
+  pname = "gsignond-plugin-oauth";
+  version = "2018-10-15";
+
+  src = fetchFromGitLab {
+    owner = "accounts-sso";
+    repo = "gsignond-plugin-oa";
+    rev = "d471cebfd7c50567b1244277a9559f18f8d58691";
+    sha256 = "00axl8wwp2arc6h4bpr4m3ik2hy8an0lbm48q2a9r94krmq56hnx";
+  };
+
+  nativeBuildInputs = [
+    check
+    docbook_xml_dtd_43
+    docbook_xml_dtd_45
+    docbook_xsl
+    glibcLocales
+    gobject-introspection
+    gtk-doc
+    meson
+    ninja
+    pkg-config
+  ];
+
+  buildInputs = [
+    glib
+    gnutls
+    gsignond
+    json-glib
+    libsoup
+  ];
+
+  LC_ALL = "en_US.UTF-8";
+
+  PKG_CONFIG_GSIGNOND_GPLUGINSDIR = "${placeholder "out"}/lib/gsignond/gplugins";
+
+  meta = with lib; {
+    description = "Plugin for the Accounts-SSO gSignOn daemon that handles the OAuth 1.0 and 2.0 authentication protocols";
+    homepage = "https://gitlab.com/accounts-sso/gsignond-plugin-oa";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gsignond/plugins/sasl.nix b/nixpkgs/pkgs/development/libraries/gsignond/plugins/sasl.nix
new file mode 100644
index 000000000000..bd87d4f72bb5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gsignond/plugins/sasl.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, fetchFromGitLab, pkg-config, meson, ninja, glib, gsignond, gsasl, check
+, gtk-doc, docbook_xml_dtd_43, docbook_xml_dtd_45, docbook_xsl, glibcLocales, gobject-introspection }:
+
+stdenv.mkDerivation {
+  pname = "gsignond-plugin-sasl";
+  version = "2018-10-15";
+
+  src = fetchFromGitLab {
+    owner = "accounts-sso";
+    repo = "gsignond-plugin-sasl";
+    rev = "b304c70b7dad9368b23b1205122d10de684c896a";
+    sha256 = "0knzw7c2fm2kzs1gxbrm4kk67522w9cpwqj7xvn86473068k90va";
+  };
+
+  nativeBuildInputs = [
+    check
+    docbook_xml_dtd_43
+    docbook_xml_dtd_45
+    docbook_xsl
+    glibcLocales
+    gobject-introspection
+    gtk-doc
+    meson
+    ninja
+    pkg-config
+  ];
+
+  buildInputs = [
+    glib
+    gsasl
+    gsignond
+  ];
+
+  LC_ALL = "en_US.UTF-8";
+
+  PKG_CONFIG_GSIGNOND_GPLUGINSDIR = "${placeholder "out"}/lib/gsignond/gplugins";
+
+  meta = with lib; {
+    description = "Plugin for the Accounts-SSO gSignOn daemon that handles the SASL authentication protocol";
+    homepage = "https://gitlab.com/accounts-sso/gsignond-plugin-sasl";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gsignond/wrapper.nix b/nixpkgs/pkgs/development/libraries/gsignond/wrapper.nix
new file mode 100644
index 000000000000..9b31a2213ceb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gsignond/wrapper.nix
@@ -0,0 +1,25 @@
+{ makeWrapper, symlinkJoin, gsignond, plugins }:
+
+symlinkJoin {
+  name = "gsignond-with-plugins-${gsignond.version}";
+
+  paths = [ gsignond ] ++ plugins;
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  postBuild = ''
+    wrapProgram $out/bin/gsignond \
+      --set SSO_GPLUGINS_DIR "$out/lib/gsignond/gplugins"
+
+    rm $out/share/dbus-1/services/com.google.code.AccountsSSO.gSingleSignOn.service
+    rm $out/share/dbus-1/services/com.google.code.AccountsSSO.SingleSignOn.service
+
+    substitute ${gsignond}/share/dbus-1/services/com.google.code.AccountsSSO.gSingleSignOn.service $out/share/dbus-1/services/com.google.code.AccountsSSO.gSingleSignOn.service \
+      --replace ${gsignond} $out
+
+    substitute ${gsignond}/share/dbus-1/services/com.google.code.AccountsSSO.SingleSignOn.service $out/share/dbus-1/services/com.google.code.AccountsSSO.SingleSignOn.service \
+      --replace ${gsignond} $out
+  '';
+
+  inherit (gsignond) meta;
+}
diff --git a/nixpkgs/pkgs/development/libraries/gsl-lite/default.nix b/nixpkgs/pkgs/development/libraries/gsl-lite/default.nix
new file mode 100644
index 000000000000..fcab02095264
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gsl-lite/default.nix
@@ -0,0 +1,60 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, ninja
+, installCompatHeader ? false
+, installLegacyHeaders ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gsl-lite";
+  version = "0.41.0";
+
+  src = fetchFromGitHub {
+    owner = "gsl-lite";
+    repo = "gsl-lite";
+    rev = "v${version}";
+    hash = "sha256-cuuix302bVA7dWa7EJoxJ+otf1rSzjWQK8DHJsVkQio=";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "type-limits-cast-fix.patch";
+      url = "https://github.com/gsl-lite/gsl-lite/commit/13475be0e5bf5f464c398f4a07ef5c7684bc57c5.patch";
+      hash = "sha256-rSz7OBmgQ3KcQ971tS3Z3QNC+U4XmrPjgmuOyG7J6Bo=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake ninja ];
+
+  cmakeFlags = lib.mapAttrsToList
+    (name: value: ''-DGSL_LITE_OPT_${name}:BOOL=${if value then "ON" else "OFF"}'')
+    {
+      INSTALL_COMPAT_HEADER = installCompatHeader;
+      INSTALL_LEGACY_HEADERS = installLegacyHeaders;
+      BUILD_TESTS = doCheck;
+    };
+
+  # Building tests is broken on Darwin.
+  doCheck = !stdenv.isDarwin;
+
+  meta = with lib; {
+    description = ''
+      A single-file header-only version of ISO C++ Guidelines Support Library
+      (GSL) for C++98, C++11, and later
+    '';
+    longDescription = ''
+      gsl-lite is a single-file header-only implementation of the C++ Core
+      Guidelines Support Library originally based on Microsoft GSL and adapted
+      for C++98, C++03. It also works when compiled as C++11, C++14, C++17,
+      C++20.
+    '';
+    homepage = "https://github.com/gsl-lite/gsl-lite";
+    changelog = "https://github.com/gsl-lite/gsl-lite/blob/${src.rev}/CHANGES.txt";
+    license = licenses.mit;
+    maintainers = with maintainers; [ azahi ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gsl/default.nix b/nixpkgs/pkgs/development/libraries/gsl/default.nix
new file mode 100644
index 000000000000..ffe168674e68
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gsl/default.nix
@@ -0,0 +1,45 @@
+{ fetchurl, lib, stdenv }:
+
+stdenv.mkDerivation rec {
+  pname = "gsl";
+  version = "2.7.1";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "mirror://gnu/gsl/${pname}-${version}.tar.gz";
+    sha256 = "sha256-3LD71DBIgyt1f/mUJpGo3XACbV2g/4VgHlJof23us0s=";
+  };
+
+  preConfigure = if (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11" && stdenv.isDarwin) then ''
+    MACOSX_DEPLOYMENT_TARGET=10.16
+  '' else null;
+
+  postInstall = ''
+    moveToOutput bin/gsl-config "$dev"
+  '';
+
+  # do not let -march=skylake to enable FMA (https://lists.gnu.org/archive/html/bug-gsl/2011-11/msg00019.html)
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isx86_64 "-mno-fma";
+
+  # https://lists.gnu.org/archive/html/bug-gsl/2015-11/msg00012.html
+  doCheck = stdenv.hostPlatform.system != "i686-linux";
+
+  meta = {
+    description = "The GNU Scientific Library, a large numerical library";
+    homepage = "https://www.gnu.org/software/gsl/";
+    license = lib.licenses.gpl3Plus;
+
+    longDescription = ''
+      The GNU Scientific Library (GSL) is a numerical library for C
+      and C++ programmers.  It is free software under the GNU General
+      Public License.
+
+      The library provides a wide range of mathematical routines such
+      as random number generators, special functions and least-squares
+      fitting.  There are over 1000 functions in total with an
+      extensive test suite.
+    '';
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gsm/default.nix b/nixpkgs/pkgs/development/libraries/gsm/default.nix
new file mode 100644
index 000000000000..ae2c489fe832
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gsm/default.nix
@@ -0,0 +1,56 @@
+{ lib, stdenv, fetchurl
+, # Compile statically (support for packages that look for the static object)
+  staticSupport ? stdenv.hostPlatform.isStatic
+}:
+
+let
+  inherit (stdenv) isDarwin;
+  inherit (lib) optional optionalString;
+in
+
+stdenv.mkDerivation rec {
+  pname = "gsm";
+  version = "1.0.22";
+
+  src = fetchurl {
+    url = "https://www.quut.com/gsm/${pname}-${version}.tar.gz";
+    sha256 = "sha256-8Acukfa7hah4svbb9KC3yFDE3rgEnVVMZTQLO/ad8Kw=";
+  };
+
+  patchPhase = ''
+    substituteInPlace Makefile \
+      --replace "= gcc " "?= gcc "
+    # Fix include directory
+    sed -e 's,$(GSM_INSTALL_ROOT)/inc,$(GSM_INSTALL_ROOT)/include/gsm,' -i Makefile
+  '' + optionalString (!staticSupport) (
+    (if isDarwin then  ''
+      # Build dylib on Darwin
+      sed -e 's,libgsm.a,libgsm.dylib,' -i Makefile
+      sed -e 's,$(AR) $(ARFLAGS) $(LIBGSM) $(GSM_OBJECTS),$(LD) -o $(LIBGSM) -dynamiclib -install_name $(GSM_INSTALL_ROOT)/$(LIBGSM) $(GSM_OBJECTS) -lc,' -i Makefile
+    '' else ''
+      # Build ELF shared object by default
+      sed -e 's,libgsm.a,libgsm.so,' -i Makefile
+      sed -e 's/$(AR) $(ARFLAGS) $(LIBGSM) $(GSM_OBJECTS)/$(LD) -shared -Wl,-soname,libgsm.so -o $(LIBGSM) $(GSM_OBJECTS) -lc/' -i Makefile
+    '') + ''
+      # Remove line that is unused when building shared libraries
+      sed -e 's,$(RANLIB) $(LIBGSM),,' -i Makefile
+    ''
+  );
+
+  makeFlags = [
+    "SHELL=${stdenv.shell}"
+    "INSTALL_ROOT=$(out)"
+  ] ++ optional stdenv.cc.isClang "CC=clang";
+
+  preInstall = "mkdir -p $out/{bin,lib,man/man1,man/man3,include/gsm}";
+
+  parallelBuild = false;
+
+  meta = with lib; {
+    description = "Lossy speech compression codec";
+    homepage    = "https://www.quut.com/gsm/";
+    license     = licenses.bsd2;
+    maintainers = with maintainers; [ codyopel raskin ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gsmlib/default.nix b/nixpkgs/pkgs/development/libraries/gsmlib/default.nix
new file mode 100644
index 000000000000..5b3672650f19
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gsmlib/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
+stdenv.mkDerivation rec {
+  pname = "gsmlib";
+  version = "unstable-2017-10-06";
+
+  src = fetchFromGitHub {
+    owner = "x-logLT";
+    repo = "gsmlib";
+    rev = "4f794b14450132f81673f7d3570c5a859aecf7ae";
+    sha256 = "16v8aj914ac1ipf14a867ljib3gy7fhzd9ypxnsg9l0zi8mm3ml5";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  env.NIX_CFLAGS_COMPILE = toString [
+    # Needed with GCC 12
+    "-std=c++14"
+  ];
+
+  meta = with lib; {
+    description = "Library to access GSM mobile phones through GSM modems";
+    homepage = "https://github.com/x-logLT/gsmlib";
+    license = licenses.lgpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.misuzu ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gsoap/default.nix b/nixpkgs/pkgs/development/libraries/gsoap/default.nix
new file mode 100644
index 000000000000..08b8146ac0a8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gsoap/default.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, fetchurl, autoreconfHook, unzip, m4, bison, flex, openssl, zlib }:
+
+let
+  majorVersion = "2.8";
+
+in stdenv.mkDerivation rec {
+  pname = "gsoap";
+  version = "${majorVersion}.108";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/gsoap2/gsoap-${majorVersion}/gsoap_${version}.zip";
+    sha256 = "0x58bwlclk7frv03kg8bp0pm7zl784samvbzskrnr7dl5v866nvl";
+  };
+
+  buildInputs = [ openssl zlib ];
+  nativeBuildInputs = [ autoreconfHook bison flex m4 unzip ];
+  # Parallel building doesn't work as of 2.8.49
+  enableParallelBuilding = false;
+
+  # Future versions of automake require subdir-objects if the source is structured this way
+  # As of 2.8.49 (maybe earlier) this is needed to silence warnings
+  prePatch = ''
+    substituteInPlace configure.ac \
+      --replace 'AM_INIT_AUTOMAKE([foreign])' 'AM_INIT_AUTOMAKE([foreign subdir-objects])'
+  '';
+
+  meta = with lib; {
+    description = "C/C++ toolkit for SOAP web services and XML-based applications";
+    homepage = "http://www.cs.fsu.edu/~engelen/soap.html";
+    # gsoap is dual/triple licensed (see homepage for details):
+    # 1. gSOAP Public License 1.3 (based on Mozilla Public License 1.1).
+    #    Components NOT covered by the gSOAP Public License are:
+    #     - wsdl2h tool and its source code output,
+    #     - soapcpp2 tool and its source code output,
+    #     - UDDI code,
+    #     - the webserver example code in gsoap/samples/webserver,
+    #     - and several example applications in the gsoap/samples directory.
+    # 2. GPLv2 covers all of the software
+    # 3. Proprietary commercial software development license (removes GPL
+    #    restrictions)
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ bjornfor ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gsound/default.nix b/nixpkgs/pkgs/development/libraries/gsound/default.nix
new file mode 100644
index 000000000000..6c5c98b77d7f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gsound/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchurl, pkg-config, glib, vala, libcanberra, gobject-introspection, libtool, gnome, meson, ninja }:
+
+stdenv.mkDerivation rec {
+  pname = "gsound";
+  version = "1.0.3";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "06l80xgykj7x1kqkjvcq06pwj2rmca458zvs053qc55x3sg06bfa";
+  };
+
+  strictDeps = true;
+  depsBuildBuild = [ pkg-config ];
+  nativeBuildInputs = [ pkg-config meson ninja gobject-introspection libtool vala ];
+  buildInputs = [ glib libcanberra ];
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://wiki.gnome.org/Projects/GSound";
+    description = "Small library for playing system sounds";
+    maintainers = teams.gnome.members;
+    license = licenses.gpl2;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gspell/0001-Darwin-build-fix.patch b/nixpkgs/pkgs/development/libraries/gspell/0001-Darwin-build-fix.patch
new file mode 100644
index 000000000000..6200dca189f8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gspell/0001-Darwin-build-fix.patch
@@ -0,0 +1,29 @@
+From 2d6dd1c286eb57fbf968510318cafc94888b98de Mon Sep 17 00:00:00 2001
+From: OPNA2608 <christoph.neidahl@gmail.com>
+Date: Sun, 13 Jun 2021 21:56:03 +0200
+Subject: [PATCH] Darwin build fix
+
+---
+ gspell/Makefile.am | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/gspell/Makefile.am b/gspell/Makefile.am
+index 69ee421..7c58973 100644
+--- a/gspell/Makefile.am
++++ b/gspell/Makefile.am
+@@ -161,6 +162,12 @@ gspell_private_headers += \
+ gspell_private_c_files += \
+ 	gspell-osx.c
+ 
++libgspell_core_la_CFLAGS += \
++	-xobjective-c
++
++libgspell_core_la_LDFLAGS += \
++	-framework Cocoa
++
+ endif # OS_OSX
+ 
+ if HAVE_INTROSPECTION
+-- 
+2.29.3
+
diff --git a/nixpkgs/pkgs/development/libraries/gspell/default.nix b/nixpkgs/pkgs/development/libraries/gspell/default.nix
new file mode 100644
index 000000000000..c4d15352020a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gspell/default.nix
@@ -0,0 +1,79 @@
+{ stdenv
+, lib
+, buildPackages
+, fetchurl
+, pkg-config
+, libxml2
+, autoreconfHook
+, gtk-doc
+, glib
+, gtk3
+, enchant2
+, icu
+, vala
+, gobject-introspection
+, gnome
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gspell";
+  version = "1.12.2";
+
+  outputs = [ "out" "dev" ];
+  outputBin = "dev";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "tOmTvYJ+TOtqdwsbXolQ/OO+nIsrDL6yL9+ZKAjdITk=";
+  };
+
+  patches = [
+    # Extracted from: https://github.com/Homebrew/homebrew-core/blob/2a27fb86b08afc7ae6dff79cf64aafb8ecc93275/Formula/gspell.rb#L125-L149
+    # Dropped the GTK_MAC_* changes since gtk-mac-integration is not needed since 1.12.1
+    ./0001-Darwin-build-fix.patch
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+    vala
+    gobject-introspection
+    libxml2
+    autoreconfHook
+    gtk-doc
+    glib
+  ];
+
+  buildInputs = [
+    gtk3
+    icu
+    vala # for share/vala/Makefile.vapigen (PKG_CONFIG_VAPIGEN_VAPIGEN)
+  ];
+
+  propagatedBuildInputs = [
+    # required for pkg-config
+    enchant2
+  ];
+
+  configureFlags = [
+    "GLIB_COMPILE_RESOURCES=${lib.getDev buildPackages.glib}/bin/glib-compile-resources"
+    "GLIB_MKENUMS=${lib.getDev buildPackages.glib}/bin/glib-mkenums"
+    "PKG_CONFIG_VAPIGEN_VAPIGEN=${lib.getBin buildPackages.vala}/bin/vapigen"
+    "--enable-introspection=yes"
+    "--enable-vala=yes"
+  ];
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "none";
+    };
+  };
+
+  meta = with lib; {
+    description = "A spell-checking library for GTK applications";
+    homepage = "https://wiki.gnome.org/Projects/gspell";
+    license = licenses.lgpl21Plus;
+    maintainers = teams.gnome.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gss/default.nix b/nixpkgs/pkgs/development/libraries/gss/default.nix
new file mode 100644
index 000000000000..3eacad32f813
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gss/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, fetchurl
+, withShishi ? !stdenv.isDarwin
+, shishi
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gss";
+  version = "1.0.4";
+
+  src = fetchurl {
+    url = "mirror://gnu/gss/gss-${version}.tar.gz";
+    hash = "sha256-7M6r3vTK4/znIYsuy4PrQifbpEtTthuMKy6IrgJBnHM=";
+  };
+
+  buildInputs = lib.optional withShishi shishi;
+
+  # ./stdint.h:89:5: error: expected value in expression
+  preConfigure = lib.optionalString stdenv.isDarwin ''
+    export GNULIBHEADERS_OVERRIDE_WINT_T=0
+  '';
+
+  configureFlags = [
+    "--${if withShishi then "enable" else "disable"}-kerberos5"
+  ];
+
+  doCheck = true;
+
+  # Fixup .la files
+  postInstall = lib.optionalString withShishi ''
+    sed -i 's,\(-lshishi\),-L${shishi}/lib \1,' $out/lib/libgss.la
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.gnu.org/software/gss/";
+    description = "Generic Security Service";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gssdp/1.6.nix b/nixpkgs/pkgs/development/libraries/gssdp/1.6.nix
new file mode 100644
index 000000000000..468c2a84ca28
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gssdp/1.6.nix
@@ -0,0 +1,87 @@
+{ stdenv
+, lib
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, gobject-introspection
+, vala
+, pandoc
+, gi-docgen
+, python3
+, libsoup_3
+, glib
+, gnome
+, gssdp-tools
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gssdp";
+  version = "1.6.3";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/gssdp/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "L+21r9sizxTVSYo5p3PKiXiKJQ/PcBGHg9+CHh8/NEY=";
+  };
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gobject-introspection
+    vala
+    pandoc
+    gi-docgen
+    python3
+  ];
+
+  buildInputs = [
+    libsoup_3
+  ];
+
+  propagatedBuildInputs = [
+    glib
+  ];
+
+  mesonFlags = [
+    "-Dgtk_doc=true"
+    "-Dsniffer=false"
+  ];
+
+  doCheck = true;
+
+  postFixup = ''
+    # Move developer documentation to devdoc output.
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    find -L "$out/share/doc" -type f -regex '.*\.devhelp2?' -print0 \
+      | while IFS= read -r -d ''' file; do
+        moveToOutput "$(dirname "''${file/"$out/"/}")" "$devdoc"
+    done
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      attrPath = "gssdp_1_6";
+      packageName = pname;
+    };
+
+    tests = {
+      inherit gssdp-tools;
+    };
+  };
+
+  meta = with lib; {
+    broken = stdenv.isDarwin;
+    description = "GObject-based API for handling resource discovery and announcement over SSDP";
+    homepage = "http://www.gupnp.org/";
+    license = licenses.lgpl2Plus;
+    maintainers = teams.gnome.members;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gssdp/default.nix b/nixpkgs/pkgs/development/libraries/gssdp/default.nix
new file mode 100644
index 000000000000..14bac6c2fec2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gssdp/default.nix
@@ -0,0 +1,82 @@
+{ stdenv
+, lib
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, gobject-introspection
+, vala
+, gi-docgen
+, python3
+, libsoup
+, glib
+, gnome
+, gssdp-tools
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gssdp";
+  version = "1.4.1";
+
+  outputs = [ "out" "dev" ]
+    ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/gssdp/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "VySWVDV9PVGxQDFRaaJMBnHeeqUsb3XIxcmr1Ao1JSk=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gobject-introspection
+    vala
+    gi-docgen
+    python3
+  ];
+
+  buildInputs = [
+    libsoup
+  ];
+
+  propagatedBuildInputs = [
+    glib
+  ];
+
+  mesonFlags = [
+    "-Dgtk_doc=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}"
+    "-Dsniffer=false"
+  ];
+
+  # Bail out! GLib-GIO-FATAL-CRITICAL: g_inet_address_to_string: assertion 'G_IS_INET_ADDRESS (address)' failed
+  doCheck = !stdenv.isDarwin;
+
+  postFixup = lib.optionalString (stdenv.buildPlatform == stdenv.hostPlatform) ''
+    # Move developer documentation to devdoc output.
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    find -L "$out/share/doc" -type f -regex '.*\.devhelp2?' -print0 \
+      | while IFS= read -r -d ''' file; do
+        moveToOutput "$(dirname "''${file/"$out/"/}")" "$devdoc"
+    done
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      freeze = true;
+    };
+
+    tests = {
+      inherit gssdp-tools;
+    };
+  };
+
+  meta = with lib; {
+    description = "GObject-based API for handling resource discovery and announcement over SSDP";
+    homepage = "http://www.gupnp.org/";
+    license = licenses.lgpl2Plus;
+    maintainers = teams.gnome.members;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gssdp/standalone-tools.patch b/nixpkgs/pkgs/development/libraries/gssdp/standalone-tools.patch
new file mode 100644
index 000000000000..6491afbe8678
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gssdp/standalone-tools.patch
@@ -0,0 +1,42 @@
+diff --git a/libgssdp/gssdp-client-private.h b/libgssdp/gssdp-client-private.h
+index ac31247..241c054 100644
+--- a/libgssdp/gssdp-client-private.h
++++ b/libgssdp/gssdp-client-private.h
+@@ -10,7 +10,11 @@
+ #ifndef GSSDP_CLIENT_PRIVATE_H
+ #define GSSDP_CLIENT_PRIVATE_H
+ 
++#ifdef GSSDP_TOOLS
++#include <libgssdp/gssdp-client.h>
++#else
+ #include "gssdp-client.h"
++#endif
+ 
+ G_BEGIN_DECLS
+ 
+diff --git a/tools/meson.build b/tools/meson.build
+index 40eb8e3..5db545b 100644
+--- a/tools/meson.build
++++ b/tools/meson.build
+@@ -1,3 +1,10 @@
++project('gssdp-tools', 'c', version: '@version@')
++gnome = import('gnome')
++
++gssdp = dependency('gssdp-1.6')
++gtk = dependency('gtk4', version : '>= 4')
++libsoup = dependency('libsoup-3.0', version : '>= 2.99.0')
++
+ resource = gnome.compile_resources(
+     'org.gupnp.GSSDP.DeviceSniffer',
+     'gssdp-device-sniffer.gresource.xml',
+@@ -12,7 +19,9 @@ sniffer = executable(
+         'main-window.h',
+         resource
+     ],
+-    dependencies : [gssdp, gtk],
++    dependencies : [gssdp, gtk, libsoup],
++    c_args: ['-DGSSDP_TOOLS'],
++    include_directories : [include_directories('..')],
+     install: true,
+     export_dynamic : true,
+     gui_app : true
diff --git a/nixpkgs/pkgs/development/libraries/gssdp/tools.nix b/nixpkgs/pkgs/development/libraries/gssdp/tools.nix
new file mode 100644
index 000000000000..5fcd0219a945
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gssdp/tools.nix
@@ -0,0 +1,50 @@
+{ stdenv
+, lib
+, substituteAll
+, meson
+, ninja
+, pkg-config
+, wrapGAppsHook4
+, gssdp_1_6
+, gtk4
+, libsoup_3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gssdp-tools";
+  inherit (gssdp_1_6) version src;
+
+  patches = [
+    # Allow building tools separately from the library.
+    # This is needed to break the depenency cycle.
+    (substituteAll {
+      src = ./standalone-tools.patch;
+      inherit version;
+    })
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    wrapGAppsHook4
+  ];
+
+  buildInputs = [
+    gssdp_1_6
+    gtk4
+    libsoup_3
+  ];
+
+  preConfigure = ''
+    cd tools
+  '';
+
+  meta = with lib; {
+    description = "Device Sniffer tool based on GSSDP framework";
+    homepage = "http://www.gupnp.org/";
+    license = licenses.lgpl2Plus;
+    maintainers = gssdp_1_6.meta.maintainers;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/bad/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/bad/default.nix
new file mode 100644
index 000000000000..7706975ca056
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gstreamer/bad/default.nix
@@ -0,0 +1,368 @@
+{ lib
+, stdenv
+, fetchurl
+, substituteAll
+, meson
+, ninja
+, gettext
+, pkg-config
+, python3
+, gst-plugins-base
+, orc
+, gstreamer
+, gobject-introspection
+, enableZbar ? false
+, faacSupport ? false
+, faac
+, opencvSupport ? false
+, opencv4
+, faad2
+, ldacbt
+, libass
+, libkate
+, lrdf
+, ladspaH
+, lcms2
+, libnice
+, webrtc-audio-processing
+, lilv
+, lv2
+, serd
+, sord
+, sratom
+, libbs2b
+, libmodplug
+, libmpeg2
+, libmicrodns
+, openjpeg
+, libopus
+, librsvg
+, bluez
+, chromaprint
+, curl
+, fdk_aac
+, flite
+, gsm
+, json-glib
+, libaom
+, libdc1394
+, libde265
+, libdrm
+, libdvdnav
+, libdvdread
+, libgudev
+, qrencode
+, libsndfile
+, libusb1
+, neon
+, openal
+, openexr_3
+, openh264
+, libopenmpt
+, pango
+, rtmpdump
+, sbc
+, soundtouch
+, spandsp
+, srtp
+, zbar
+, wayland-protocols
+, wildmidi
+, fluidsynth
+, libva
+, libvdpau
+, wayland
+, libwebp
+, xvidcore
+, gnutls
+, mjpegtools
+, libGLU
+, libGL
+, addOpenGLRunpath
+, gtk3
+, libintl
+, game-music-emu
+, openssl
+, x265
+, libxml2
+, srt
+, vo-aacenc
+, libfreeaptx
+, zxing-cpp
+, usrsctp
+, VideoToolbox
+, AudioToolbox
+, AVFoundation
+, Cocoa
+, CoreMedia
+, CoreVideo
+, Foundation
+, MediaToolbox
+, enableGplPlugins ? true
+, bluezSupport ? stdenv.isLinux
+# Causes every application using GstDeviceMonitor to send mDNS queries every 2 seconds
+, microdnsSupport ? false
+# Checks meson.is_cross_build(), so even canExecute isn't enough.
+, enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc
+, guiSupport ? true, directfb
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gst-plugins-bad";
+  version = "1.22.8";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz";
+    hash = "sha256-RYeD+CNgaJkePilu3Wccjt24vm+skzwcLhUDRihk6g8=";
+  };
+
+  patches = [
+    # Add fallback paths for nvidia userspace libraries
+    (substituteAll {
+      src = ./fix-paths.patch;
+      inherit (addOpenGLRunpath) driverLink;
+    })
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    orc # for orcc
+    python3
+    gettext
+    gstreamer # for gst-tester-1.0
+    gobject-introspection
+  ] ++ lib.optionals enableDocumentation [
+    hotdoc
+  ] ++ lib.optionals stdenv.isLinux [
+    wayland # for wayland-scanner
+  ];
+
+  buildInputs = [
+    gst-plugins-base
+    orc
+    json-glib
+    lcms2
+    ldacbt
+    libass
+    libkate
+    webrtc-audio-processing # required by webrtcdsp
+    #webrtc-audio-processing_1 # required by isac
+    libbs2b
+    libmodplug
+    openjpeg
+    libopenmpt
+    libopus
+    librsvg
+    curl.dev
+    fdk_aac
+    gsm
+    libaom
+    libdc1394
+    libde265
+    libdvdnav
+    libdvdread
+    libnice
+    qrencode
+    libsndfile
+    libusb1
+    neon
+    openal
+    openexr_3
+    openh264
+    rtmpdump
+    pango
+    soundtouch
+    srtp
+    fluidsynth
+    libvdpau
+    libwebp
+    xvidcore
+    gnutls
+    game-music-emu
+    openssl
+    libxml2
+    libintl
+    srt
+    vo-aacenc
+    libfreeaptx
+    zxing-cpp
+    usrsctp
+    wildmidi
+  ] ++ lib.optionals opencvSupport [
+    opencv4
+  ] ++ lib.optionals enableZbar [
+    zbar
+  ] ++ lib.optionals faacSupport [
+    faac
+  ] ++ lib.optionals enableGplPlugins [
+    libmpeg2
+    mjpegtools
+    faad2
+    x265
+  ] ++ lib.optionals bluezSupport [
+    bluez
+  ] ++ lib.optionals microdnsSupport [
+    libmicrodns
+  ] ++ lib.optionals stdenv.isLinux [
+    libva # vaapi requires libva -> libdrm -> libpciaccess, which is Linux-only in nixpkgs
+    wayland
+    wayland-protocols
+  ] ++ lib.optionals (!stdenv.isDarwin) [
+    # TODO: mjpegtools uint64_t is not compatible with guint64 on Darwin
+    mjpegtools
+
+    chromaprint
+    flite
+    libdrm
+    libgudev
+    sbc
+    spandsp
+
+    # ladspa plug-in
+    ladspaH
+    lrdf # TODO: make build on Darwin
+
+    # lv2 plug-in
+    lilv
+    lv2
+    serd
+    sord
+    sratom
+
+    libGL
+    libGLU
+  ] ++ lib.optionals guiSupport [
+    gtk3
+  ] ++ lib.optionals (stdenv.isLinux && guiSupport) [
+    directfb
+  ] ++ lib.optionals stdenv.isDarwin [
+    # For unknown reasons the order is important, e.g. if
+    # VideoToolbox is last, we get:
+    #     fatal error: 'VideoToolbox/VideoToolbox.h' file not found
+    VideoToolbox
+    AudioToolbox
+    AVFoundation
+    Cocoa
+    CoreMedia
+    CoreVideo
+    Foundation
+    MediaToolbox
+  ];
+
+  mesonFlags = [
+    "-Dexamples=disabled" # requires many dependencies and probably not useful for our users
+    "-Dglib-asserts=disabled" # asserts should be disabled on stable releases
+
+    "-Damfcodec=disabled" # Windows-only
+    "-Davtp=disabled"
+    "-Ddirectshow=disabled" # Windows-only
+    "-Ddts=disabled" # required `libdca` library not packaged in nixpkgs as of writing, and marked as "BIG FAT WARNING: libdca is still in early development"
+    "-Dzbar=${if enableZbar then "enabled" else "disabled"}"
+    "-Dfaac=${if faacSupport then "enabled" else "disabled"}"
+    "-Diqa=disabled" # required `dssim` library not packaging in nixpkgs as of writing, also this is AGPL so update license when adding support
+    "-Dmagicleap=disabled" # required `ml_audio` library not packaged in nixpkgs as of writing
+    "-Dmsdk=disabled" # not packaged in nixpkgs as of writing / no Windows support
+    # As of writing, with `libmpcdec` in `buildInputs` we get
+    #   "Could not find libmpcdec header files, but Musepack was enabled via options"
+    # This is likely because nixpkgs has the header in libmpc/mpcdec.h
+    # instead of mpc/mpcdec.h, like Arch does. The situation is not trivial.
+    # There are apparently 2 things called `libmpcdec` from the same author:
+    #   * http://svn.musepack.net/libmpcdec/trunk/src/
+    #   * http://svn.musepack.net/libmpc/trunk/include/mpc/
+    # Fixing it likely requires to first figure out with upstream which one
+    # is needed, and then patching upstream to find it (though it probably
+    # already works on Arch?).
+    "-Dmusepack=disabled"
+    "-Dopenni2=disabled" # not packaged in nixpkgs as of writing
+    "-Dopensles=disabled" # not packaged in nixpkgs as of writing
+    "-Dsvthevcenc=disabled" # required `SvtHevcEnc` library not packaged in nixpkgs as of writing
+    "-Dteletext=disabled" # required `zvbi` library not packaged in nixpkgs as of writing
+    "-Dtinyalsa=disabled" # not packaged in nixpkgs as of writing
+    "-Dvoamrwbenc=disabled" # required `vo-amrwbenc` library not packaged in nixpkgs as of writing
+    "-Dvulkan=disabled" # Linux-only, and we haven't figured out yet which of the vulkan nixpkgs it needs
+    "-Dwasapi=disabled" # not packaged in nixpkgs as of writing / no Windows support
+    "-Dwasapi2=disabled" # not packaged in nixpkgs as of writing / no Windows support
+    "-Dwpe=disabled" # required `wpe-webkit` library not packaged in nixpkgs as of writing
+    "-Disac=disabled" # depends on `webrtc-audio-coding-1` not compatible with 0.3
+    "-Dgs=disabled" # depends on `google-cloud-cpp`
+    "-Donnx=disabled" # depends on `libonnxruntime` not packaged in nixpkgs as of writing
+    "-Dopenaptx=enabled" # since gstreamer-1.20.1 `libfreeaptx` is supported for circumventing the dubious license conflict with `libopenaptx`
+    "-Dopencv=${if opencvSupport then "enabled" else "disabled"}" # Reduces rebuild size when `config.cudaSupport = true`
+    "-Dmicrodns=${if microdnsSupport then "enabled" else "disabled"}"
+    "-Dbluez=${if bluezSupport then "enabled" else "disabled"}"
+    (lib.mesonEnable "doc" enableDocumentation)
+  ]
+  ++ lib.optionals (!stdenv.isLinux) [
+    "-Ddoc=disabled" # needs gstcuda to be enabled which is Linux-only
+    "-Dnvcodec=disabled" # Linux-only
+    "-Dva=disabled" # see comment on `libva` in `buildInputs`
+  ] ++ lib.optionals (!stdenv.isLinux || !guiSupport) [
+    "-Ddirectfb=disabled"
+  ]
+  ++ lib.optionals stdenv.isDarwin [
+    "-Dchromaprint=disabled"
+    "-Dflite=disabled"
+    "-Dkms=disabled" # renders to libdrm output
+    "-Dlv2=disabled"
+    "-Dsbc=disabled"
+    "-Dspandsp=disabled"
+    "-Ddvb=disabled"
+    "-Dfbdev=disabled"
+    "-Duvch264=disabled" # requires gudev
+    "-Dv4l2codecs=disabled" # requires gudev
+    "-Dladspa=disabled" # requires lrdf
+  ] ++ lib.optionals (!stdenv.isLinux || !stdenv.isx86_64) [
+    "-Dqsv=disabled" # Linux (and Windows) x86 only
+  ] ++ lib.optionals (!gst-plugins-base.glEnabled) [
+    "-Dgl=disabled"
+  ] ++ lib.optionals (!gst-plugins-base.waylandEnabled) [
+    "-Dgtk3=disabled" # Wayland-based GTK sink
+    "-Dwayland=disabled"
+  ] ++ lib.optionals (!gst-plugins-base.glEnabled) [
+    # `applemedia/videotexturecache.h` requires `gst/gl/gl.h`,
+    # but its meson build system does not declare the dependency.
+    "-Dapplemedia=disabled"
+  ] ++ (if enableGplPlugins then [
+    "-Dgpl=enabled"
+  ] else [
+    "-Ddts=disabled"
+    "-Dfaad=disabled"
+    "-Diqa=disabled"
+    "-Dmpeg2enc=disabled"
+    "-Dmplex=disabled"
+    "-Dresindvd=disabled"
+    "-Dx265=disabled"
+  ]);
+
+  # Argument list too long
+  strictDeps = true;
+
+  postPatch = ''
+    patchShebangs \
+      scripts/extract-release-date-from-doap-file.py
+  '';
+
+  # This package has some `_("string literal")` string formats
+  # that trip up clang with format security enabled.
+  hardeningDisable = [ "format" ];
+
+  doCheck = false; # fails 20 out of 58 tests, expensive
+
+  meta = with lib; {
+    description = "GStreamer Bad Plugins";
+    homepage = "https://gstreamer.freedesktop.org";
+    longDescription = ''
+      a set of plug-ins that aren't up to par compared to the
+      rest.  They might be close to being good quality, but they're missing
+      something - be it a good code review, some documentation, a set of tests,
+      a real live maintainer, or some actual wide use.
+    '';
+    license = if enableGplPlugins then licenses.gpl2Plus else licenses.lgpl2Plus;
+    platforms = platforms.linux ++ platforms.darwin;
+    maintainers = with maintainers; [ matthewbauer lilyinstarlight ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/bad/fix-paths.patch b/nixpkgs/pkgs/development/libraries/gstreamer/bad/fix-paths.patch
new file mode 100644
index 000000000000..ea832cc9f60b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gstreamer/bad/fix-paths.patch
@@ -0,0 +1,48 @@
+diff --git a/gst-libs/gst/cuda/gstcudaloader.c b/gst-libs/gst/cuda/gstcudaloader.c
+index fffcbefd2b..6f738d3af3 100644
+--- a/gst-libs/gst/cuda/gstcudaloader.c
++++ b/gst-libs/gst/cuda/gstcudaloader.c
+@@ -165,6 +165,11 @@ gst_cuda_load_library (void)
+     return TRUE;
+ 
+   module = g_module_open (filename, G_MODULE_BIND_LAZY);
++
++  if (module == NULL) {
++    module = g_module_open ("@driverLink@/lib/" CUDA_LIBNAME, G_MODULE_BIND_LAZY);
++  }
++
+   if (module == NULL) {
+     GST_WARNING ("Could not open library %s, %s", filename, g_module_error ());
+     return FALSE;
+diff --git a/sys/nvcodec/gstcuvidloader.c b/sys/nvcodec/gstcuvidloader.c
+index e957e062e0..004ec2dcd5 100644
+--- a/sys/nvcodec/gstcuvidloader.c
++++ b/sys/nvcodec/gstcuvidloader.c
+@@ -85,6 +85,11 @@ gst_cuvid_load_library (guint api_major_ver, guint api_minor_ver)
+     return TRUE;
+ 
+   module = g_module_open (filename, G_MODULE_BIND_LAZY);
++
++  if (module == NULL) {
++    module = g_module_open ("@driverLink@/lib/" NVCUVID_LIBNAME, G_MODULE_BIND_LAZY);
++  }
++
+   if (module == NULL) {
+     GST_WARNING ("Could not open library %s, %s", filename, g_module_error ());
+     return FALSE;
+diff --git a/sys/nvcodec/gstnvenc.c b/sys/nvcodec/gstnvenc.c
+index 106857a954..3bab9989f0 100644
+--- a/sys/nvcodec/gstnvenc.c
++++ b/sys/nvcodec/gstnvenc.c
+@@ -907,6 +907,11 @@ gst_nvenc_load_library (guint * api_major_ver, guint * api_minor_ver)
+   };
+ 
+   module = g_module_open (NVENC_LIBRARY_NAME, G_MODULE_BIND_LAZY);
++
++  if (module == NULL) {
++    module = g_module_open ("@driverLink@/lib/" NVENC_LIBRARY_NAME, G_MODULE_BIND_LAZY);
++  }
++
+   if (module == NULL) {
+     GST_WARNING ("Could not open library %s, %s",
+         NVENC_LIBRARY_NAME, g_module_error ());
diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/base/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/base/default.nix
new file mode 100644
index 000000000000..c68693681ee1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gstreamer/base/default.nix
@@ -0,0 +1,172 @@
+{ stdenv
+, fetchurl
+, lib
+, pkg-config
+, meson
+, ninja
+, gettext
+, python3
+, gstreamer
+, graphene
+, orc
+, pango
+, libtheora
+, libintl
+, libopus
+, isocodes
+, libjpeg
+, libpng
+, libvisual
+, tremor # provides 'virbisidec'
+, libGL
+, gobject-introspection
+, enableX11 ? stdenv.isLinux
+, libXext
+, libXi
+, libXv
+, enableWayland ? stdenv.isLinux
+, wayland
+, wayland-protocols
+, enableAlsa ? stdenv.isLinux
+, alsa-lib
+# TODO: fix once x86_64-darwin sdk updated
+, enableCocoa ? (stdenv.isDarwin && stdenv.isAarch64)
+, Cocoa
+, OpenGL
+, enableGl ? (enableX11 || enableWayland || enableCocoa)
+, enableCdparanoia ? (!stdenv.isDarwin)
+, cdparanoia
+, glib
+, testers
+# Checks meson.is_cross_build(), so even canExecute isn't enough.
+, enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform
+, hotdoc
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "gst-plugins-base";
+  version = "1.22.8";
+
+  outputs = [ "out" "dev" ];
+
+  src = let
+    inherit (finalAttrs) pname version;
+  in fetchurl {
+    url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz";
+    hash = "sha256-62eS5cc8be+5FZw26m5LeKL4r2USZ4tL07AsjS1JKs8=";
+  };
+
+  strictDeps = true;
+  depsBuildBuild = [
+    pkg-config
+  ];
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    python3
+    gettext
+    orc
+    glib
+    gstreamer
+    gobject-introspection
+  ] ++ lib.optionals enableDocumentation [
+    hotdoc
+  ] ++ lib.optionals enableWayland [
+    wayland
+  ];
+
+  buildInputs = [
+    graphene
+    orc
+    libtheora
+    libintl
+    libopus
+    isocodes
+    libpng
+    libjpeg
+    tremor
+    pango
+  ] ++ lib.optionals (!stdenv.isDarwin) [
+    libGL
+    libvisual
+  ] ++ lib.optionals stdenv.isDarwin [
+    OpenGL
+  ] ++ lib.optionals enableAlsa [
+    alsa-lib
+  ] ++ lib.optionals enableX11 [
+    libXext
+    libXi
+    libXv
+  ] ++ lib.optionals enableWayland [
+    wayland
+    wayland-protocols
+  ] ++ lib.optional enableCocoa Cocoa
+    ++ lib.optional enableCdparanoia cdparanoia;
+
+  propagatedBuildInputs = [
+    gstreamer
+  ];
+
+  mesonFlags = [
+    "-Dexamples=disabled" # requires many dependencies and probably not useful for our users
+    # See https://github.com/GStreamer/gst-plugins-base/blob/d64a4b7a69c3462851ff4dcfa97cc6f94cd64aef/meson_options.txt#L15 for a list of choices
+    "-Dgl_winsys=${lib.concatStringsSep "," (lib.optional enableX11 "x11" ++ lib.optional enableWayland "wayland" ++ lib.optional enableCocoa "cocoa")}"
+    (lib.mesonEnable "doc" enableDocumentation)
+  ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
+    "-Dtests=disabled"
+  ]
+  ++ lib.optional (!enableX11) "-Dx11=disabled"
+  # TODO How to disable Wayland?
+  ++ lib.optional (!enableGl) "-Dgl=disabled"
+  ++ lib.optional (!enableAlsa) "-Dalsa=disabled"
+  ++ lib.optional (!enableCdparanoia) "-Dcdparanoia=disabled"
+  ++ lib.optionals stdenv.isDarwin [
+    "-Dlibvisual=disabled"
+  ];
+
+  postPatch = ''
+    patchShebangs \
+      scripts/meson-pkg-config-file-fixup.py \
+      scripts/extract-release-date-from-doap-file.py
+  '';
+
+  # This package has some `_("string literal")` string formats
+  # that trip up clang with format security enabled.
+  hardeningDisable = [ "format" ];
+
+  doCheck = false; # fails, wants DRI access for OpenGL
+
+  passthru = {
+    # Downstream `gst-*` packages depending on `gst-plugins-base`
+    # have meson build options like 'gl' etc. that depend
+    # on these features being built in `-base`.
+    # If they are not built here, then the downstream builds
+    # will fail, as they, too, use `-Dauto_features=enabled`
+    # which would enable these options unconditionally.
+    # That means we must communicate to these downstream packages
+    # if the `-base` enabled these options or not, so that
+    # the can enable/disable those features accordingly.
+    # The naming `*Enabled` vs `enable*` is intentional to
+    # distinguish inputs from outputs (what is to be built
+    # vs what was built) and to make them easier to search for.
+    glEnabled = enableGl;
+    waylandEnabled = enableWayland;
+  };
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    description = "Base GStreamer plug-ins and helper libraries";
+    homepage = "https://gstreamer.freedesktop.org";
+    license = licenses.lgpl2Plus;
+    pkgConfigModules = [
+      "gstreamer-audio-1.0"
+      "gstreamer-base-1.0"
+      "gstreamer-net-1.0"
+      "gstreamer-video-1.0"
+    ];
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ matthewbauer lilyinstarlight ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/core/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/core/default.nix
new file mode 100644
index 000000000000..9979184b089a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gstreamer/core/default.nix
@@ -0,0 +1,124 @@
+{ stdenv
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, gettext
+, bison
+, flex
+, python3
+, glib
+, makeWrapper
+, libcap
+, libunwind
+, elfutils # for libdw
+, bash-completion
+, lib
+, Cocoa
+, CoreServices
+, gobject-introspection
+, testers
+# Checks meson.is_cross_build(), so even canExecute isn't enough.
+, enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "gstreamer";
+  version = "1.22.8";
+
+  outputs = [
+    "bin"
+    "out"
+    "dev"
+  ];
+
+  src = let
+    inherit (finalAttrs) pname version;
+  in fetchurl {
+    url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz";
+    hash = "sha256-rU49sXcRObHbF7Gvp8BdsIOuAQC9TaJEtx8WLczkG/w=";
+  };
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  strictDeps = true;
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gettext
+    bison
+    flex
+    python3
+    makeWrapper
+    glib
+    bash-completion
+    gobject-introspection
+  ] ++ lib.optionals stdenv.isLinux [
+    libcap # for setcap binary
+  ] ++ lib.optionals enableDocumentation [
+    hotdoc
+  ];
+
+  buildInputs = [
+    bash-completion
+  ] ++ lib.optionals stdenv.isLinux [
+    libcap
+    libunwind
+    elfutils
+  ] ++ lib.optionals stdenv.isDarwin [
+    Cocoa
+    CoreServices
+  ];
+
+  propagatedBuildInputs = [
+    glib
+  ];
+
+  mesonFlags = [
+    "-Ddbghelp=disabled" # not needed as we already provide libunwind and libdw, and dbghelp is a fallback to those
+    "-Dexamples=disabled" # requires many dependencies and probably not useful for our users
+    (lib.mesonEnable "doc" enableDocumentation)
+  ] ++ lib.optionals stdenv.isDarwin [
+    # darwin.libunwind doesn't have pkg-config definitions so meson doesn't detect it.
+    "-Dlibunwind=disabled"
+    "-Dlibdw=disabled"
+  ];
+
+  postPatch = ''
+    patchShebangs \
+      gst/parse/get_flex_version.py \
+      gst/parse/gen_grammar.py.in \
+      gst/parse/gen_lex.py.in \
+      libs/gst/helpers/ptp_helper_post_install.sh \
+      scripts/extract-release-date-from-doap-file.py
+  '';
+
+  postInstall = ''
+    for prog in "$bin/bin/"*; do
+        # We can't use --suffix here due to quoting so we craft the export command by hand
+        wrapProgram "$prog" --run 'export GST_PLUGIN_SYSTEM_PATH_1_0=$GST_PLUGIN_SYSTEM_PATH_1_0''${GST_PLUGIN_SYSTEM_PATH_1_0:+:}$(unset _tmp; for profile in $NIX_PROFILES; do _tmp="$profile/lib/gstreamer-1.0''${_tmp:+:}$_tmp"; done; printf '%s' "$_tmp")'
+    done
+  '';
+
+  preFixup = ''
+    moveToOutput "share/bash-completion" "$bin"
+  '';
+
+  setupHook = ./setup-hook.sh;
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    description = "Open source multimedia framework";
+    homepage = "https://gstreamer.freedesktop.org";
+    license = licenses.lgpl2Plus;
+    pkgConfigModules = [
+      "gstreamer-controller-1.0"
+    ];
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ ttuegel matthewbauer lilyinstarlight ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/core/setup-hook.sh b/nixpkgs/pkgs/development/libraries/gstreamer/core/setup-hook.sh
new file mode 100644
index 000000000000..026a4e5f55a0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gstreamer/core/setup-hook.sh
@@ -0,0 +1,9 @@
+addGstreamer1LibPath () {
+    if test -d "$1/lib/gstreamer-1.0"
+    then
+        export GST_PLUGIN_SYSTEM_PATH_1_0="${GST_PLUGIN_SYSTEM_PATH_1_0-}${GST_PLUGIN_SYSTEM_PATH_1_0:+:}$1/lib/gstreamer-1.0"
+    fi
+}
+
+addEnvHooks "$hostOffset" addGstreamer1LibPath
+
diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/default.nix
new file mode 100644
index 000000000000..1bfdf5b24de3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gstreamer/default.nix
@@ -0,0 +1,56 @@
+{ callPackage
+, AVFoundation
+, AudioToolbox
+, Cocoa
+, CoreFoundation
+, CoreMedia
+, CoreServices
+, CoreVideo
+, DiskArbitration
+, Foundation
+, IOKit
+, MediaToolbox
+, OpenGL
+, Security
+, VideoToolbox
+, ipu6ep-camera-hal
+, ipu6epmtl-camera-hal
+}:
+
+{
+  gstreamer = callPackage ./core { inherit Cocoa CoreServices; };
+
+  gstreamermm = callPackage ./gstreamermm { };
+
+  gst-plugins-base = callPackage ./base { inherit Cocoa OpenGL; };
+
+  gst-plugins-good = callPackage ./good { inherit Cocoa; };
+
+  gst-plugins-bad = callPackage ./bad { inherit AudioToolbox AVFoundation Cocoa CoreMedia CoreVideo Foundation MediaToolbox VideoToolbox; };
+
+  gst-plugins-ugly = callPackage ./ugly { inherit CoreFoundation DiskArbitration IOKit; };
+
+  gst-plugins-viperfx = callPackage ./viperfx { };
+
+  gst-plugins-rs = callPackage ./rs { inherit Security; };
+
+  gst-rtsp-server = callPackage ./rtsp-server { };
+
+  gst-libav = callPackage ./libav { };
+
+  gst-devtools = callPackage ./devtools { };
+
+  gst-editing-services = callPackage ./ges { };
+
+  gst-vaapi = callPackage ./vaapi { };
+
+  icamerasrc-ipu6 = callPackage ./icamerasrc { };
+  icamerasrc-ipu6ep = callPackage ./icamerasrc {
+    ipu6-camera-hal = ipu6ep-camera-hal;
+  };
+  icamerasrc-ipu6epmtl = callPackage ./icamerasrc {
+    ipu6-camera-hal = ipu6epmtl-camera-hal;
+  };
+
+  # note: gst-python is in ../../python-modules/gst-python - called under python3Packages
+}
diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/devtools/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/devtools/default.nix
new file mode 100644
index 000000000000..6ce4723b5a32
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gstreamer/devtools/default.nix
@@ -0,0 +1,69 @@
+{ lib, stdenv
+, fetchurl
+, cairo
+, meson
+, ninja
+, pkg-config
+, gstreamer
+, gst-plugins-base
+, gst-plugins-bad
+, gst-rtsp-server
+, python3
+, gobject-introspection
+, json-glib
+# Checks meson.is_cross_build(), so even canExecute isn't enough.
+, enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gst-devtools";
+  version = "1.22.8";
+
+  src = fetchurl {
+    url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz";
+    hash = "sha256-zWNAVvyxbQNbPfWVPsha6L1Wxo8pkgtyDvkgynHqdqc=";
+  };
+
+  outputs = [
+    "out"
+    "dev"
+  ];
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gobject-introspection
+  ] ++ lib.optionals enableDocumentation [
+    hotdoc
+  ];
+
+  buildInputs = [
+    cairo
+    python3
+    json-glib
+  ];
+
+  propagatedBuildInputs = [
+    gstreamer
+    gst-plugins-base
+    gst-plugins-bad
+    gst-rtsp-server
+  ];
+
+  mesonFlags = [
+    (lib.mesonEnable "doc" enableDocumentation)
+  ];
+
+  meta = with lib; {
+    description = "Integration testing infrastructure for the GStreamer framework";
+    homepage = "https://gstreamer.freedesktop.org";
+    license = licenses.lgpl2Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ lilyinstarlight ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/ges/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/ges/default.nix
new file mode 100644
index 000000000000..317fc4e53728
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gstreamer/ges/default.nix
@@ -0,0 +1,73 @@
+{ lib, stdenv
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, python3
+, bash-completion
+, gst-plugins-base
+, gst-plugins-bad
+, gst-devtools
+, libxml2
+, flex
+, gettext
+, gobject-introspection
+# Checks meson.is_cross_build(), so even canExecute isn't enough.
+, enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gst-editing-services";
+  version = "1.22.8";
+
+  outputs = [
+    "out"
+    "dev"
+  ];
+
+  src = fetchurl {
+    url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz";
+    hash = "sha256-0dXnXhkOsL4/1JQJ5Bo6qOaM+03qpzU0iFVGdJVs0d8=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gettext
+    gobject-introspection
+    python3
+    flex
+  ] ++ lib.optionals enableDocumentation [
+    hotdoc
+  ];
+
+  buildInputs = [
+    bash-completion
+    libxml2
+    gst-devtools
+    python3
+  ];
+
+  propagatedBuildInputs = [
+    gst-plugins-base
+    gst-plugins-bad
+  ];
+
+  mesonFlags = [
+    (lib.mesonEnable "doc" enableDocumentation)
+  ];
+
+  postPatch = ''
+    patchShebangs \
+      scripts/extract-release-date-from-doap-file.py
+  '';
+
+  meta = with lib; {
+    description = "Library for creation of audio/video non-linear editors";
+    homepage = "https://gstreamer.freedesktop.org";
+    license = licenses.lgpl2Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ lilyinstarlight ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/good/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/good/default.nix
new file mode 100644
index 000000000000..6bea24314695
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gstreamer/good/default.nix
@@ -0,0 +1,202 @@
+{ lib, stdenv
+, fetchurl
+, fetchpatch
+, meson
+, nasm
+, ninja
+, pkg-config
+, python3
+, gst-plugins-base
+, orc
+, bzip2
+, gettext
+, libGL
+, libv4l
+, libdv
+, libavc1394
+, libiec61883
+, libvpx
+, speex
+, flac
+, taglib
+, libshout
+, cairo
+, gdk-pixbuf
+, aalib
+, libcaca
+, libsoup
+, libpulseaudio
+, libintl
+, Cocoa
+, lame
+, mpg123
+, twolame
+, gtkSupport ? false, gtk3
+, qt5Support ? false, qt5
+, qt6Support ? false, qt6
+, raspiCameraSupport ? false, libraspberrypi
+, enableJack ? true, libjack2
+, enableX11 ? stdenv.isLinux, xorg
+, ncurses
+, wayland
+, wayland-protocols
+, libgudev
+, wavpack
+, glib
+, openssl
+# Checks meson.is_cross_build(), so even canExecute isn't enough.
+, enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc
+}:
+
+# MMAL is not supported on aarch64, see:
+# https://github.com/raspberrypi/userland/issues/688
+assert raspiCameraSupport -> (stdenv.isLinux && stdenv.isAarch32);
+
+stdenv.mkDerivation rec {
+  pname = "gst-plugins-good";
+  version = "1.22.8";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz";
+    hash = "sha256-4wW58H9SdDykgdoKTgx2w179YK2vGwaU6zuwIeITfjk=";
+  };
+
+  strictDeps = true;
+
+  depsBuildBuild = [ pkg-config ];
+
+  nativeBuildInputs = [
+    pkg-config
+    python3
+    meson
+    ninja
+    gettext
+    nasm
+    orc
+    libshout
+    glib
+  ] ++ lib.optionals enableDocumentation [
+    hotdoc
+  ] ++ lib.optionals qt5Support (with qt5; [
+    qtbase
+    qttools
+  ]) ++ lib.optionals qt6Support (with qt6; [
+    qtbase
+    qttools
+  ]) ++ lib.optionals stdenv.isLinux [
+    wayland-protocols
+  ];
+
+  buildInputs = [
+    gst-plugins-base
+    orc
+    bzip2
+    libdv
+    libvpx
+    speex
+    flac
+    taglib
+    cairo
+    gdk-pixbuf
+    aalib
+    libcaca
+    libsoup
+    libshout
+    lame
+    mpg123
+    twolame
+    libintl
+    ncurses
+    wavpack
+    openssl
+  ] ++ lib.optionals raspiCameraSupport [
+    libraspberrypi
+  ] ++ lib.optionals enableX11 [
+    xorg.libXext
+    xorg.libXfixes
+    xorg.libXdamage
+  ] ++ lib.optionals gtkSupport [
+    # for gtksink
+    gtk3
+  ] ++ lib.optionals qt5Support (with qt5; [
+    qtbase
+    qtdeclarative
+    qtwayland
+    qtx11extras
+  ]) ++ lib.optionals qt6Support (with qt6; [
+    qtbase
+    qtdeclarative
+    qtwayland
+  ]) ++ lib.optionals stdenv.isDarwin [
+    Cocoa
+  ] ++ lib.optionals stdenv.isLinux [
+    libGL
+    libv4l
+    libpulseaudio
+    libavc1394
+    libiec61883
+    libgudev
+    wayland
+  ] ++ lib.optionals enableJack [
+    libjack2
+  ];
+
+  mesonFlags = [
+    "-Dexamples=disabled" # requires many dependencies and probably not useful for our users
+    "-Dglib-asserts=disabled" # asserts should be disabled on stable releases
+    (lib.mesonEnable "doc" enableDocumentation)
+  ] ++ lib.optionals (!qt5Support) [
+    "-Dqt5=disabled"
+  ] ++ lib.optionals (!qt6Support) [
+    "-Dqt6=disabled"
+  ] ++ lib.optionals (!gtkSupport) [
+    "-Dgtk3=disabled"
+  ] ++ lib.optionals (!enableX11) [
+    "-Dximagesrc=disabled" # Linux-only
+  ] ++ lib.optionals (!enableJack) [
+    "-Djack=disabled"
+  ] ++ lib.optionals (!stdenv.isLinux) [
+    "-Ddv1394=disabled" # Linux only
+    "-Doss4=disabled" # Linux only
+    "-Doss=disabled" # Linux only
+    "-Dpulse=disabled" # TODO check if we can keep this enabled
+    "-Dv4l2-gudev=disabled" # Linux-only
+    "-Dv4l2=disabled" # Linux-only
+  ] ++ (if raspiCameraSupport then [
+    "-Drpi-lib-dir=${libraspberrypi}/lib"
+  ] else [
+    "-Drpicamsrc=disabled"
+  ]);
+
+  postPatch = ''
+    patchShebangs \
+      scripts/extract-release-date-from-doap-file.py
+  '';
+
+  NIX_LDFLAGS = [
+    # linking error on Darwin
+    # https://github.com/NixOS/nixpkgs/pull/70690#issuecomment-553694896
+    "-lncurses"
+  ];
+
+  # fails 1 tests with "Unexpected critical/warning: g_object_set_is_valid_property: object class 'GstRtpStorage' has no property named ''"
+  doCheck = false;
+
+  # must be explicitly set since 5590e365
+  dontWrapQtApps = true;
+
+  meta = with lib; {
+    description = "GStreamer Good Plugins";
+    homepage = "https://gstreamer.freedesktop.org";
+    longDescription = ''
+      a set of plug-ins that we consider to have good quality code,
+      correct functionality, our preferred license (LGPL for the plug-in
+      code, LGPL or LGPL-compatible for the supporting library).
+    '';
+    license = licenses.lgpl2Plus;
+    platforms = platforms.linux ++ platforms.darwin;
+    maintainers = with maintainers; [ matthewbauer lilyinstarlight ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/gstreamermm/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/gstreamermm/default.nix
new file mode 100644
index 000000000000..40186664284e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gstreamer/gstreamermm/default.nix
@@ -0,0 +1,59 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, pkg-config
+, file
+, glibmm
+, gst_all_1
+, gnome
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gstreamermm";
+  version = "1.10.0";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "0q4dx9sncqbwgpzma0zvj6zssc279yl80pn8irb95qypyyggwn5y";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "${pname}-${version}.fix-build-against-glib-2.68.patch";
+      url = "https://gitlab.gnome.org/GNOME/gstreamermm/-/commit/37116547fb5f9066978e39b4cf9f79f2154ad425.patch";
+      sha256 = "sha256-YHtmOiOl4POwas3eWHsew3IyGK7Aq22MweBm3JPwyBM=";
+    })
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [
+    pkg-config
+    file
+  ];
+
+  propagatedBuildInputs = [
+    glibmm
+    gst_all_1.gst-plugins-base
+  ];
+
+  enableParallelBuilding = true;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      attrPath = "gst_all_1.gstreamermm";
+      packageName = "gstreamermm";
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    description = "C++ interface for GStreamer";
+    homepage = "https://gstreamer.freedesktop.org/bindings/cplusplus.html";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ romildo ];
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/icamerasrc/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/icamerasrc/default.nix
new file mode 100644
index 000000000000..4d6c5671f0e2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gstreamer/icamerasrc/default.nix
@@ -0,0 +1,60 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+, gst_all_1
+, ipu6-camera-hal
+, libdrm
+}:
+
+stdenv.mkDerivation {
+  pname = "icamerasrc-${ipu6-camera-hal.ipuVersion}";
+  version = "unstable-2023-10-23";
+
+  src = fetchFromGitHub {
+    owner = "intel";
+    repo = "icamerasrc";
+    rev = "528a6f177732def4d5ebc17927220d8823bc8fdc";
+    hash = "sha256-Ezcm5OpF/NKvJf5sFeJyvNc2Uq0166GukC9MuNUV2Fs=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ];
+
+  preConfigure = ''
+    # https://github.com/intel/ipu6-camera-hal/issues/1
+    export CHROME_SLIM_CAMHAL=ON
+    # https://github.com/intel/icamerasrc/issues/22
+    export STRIP_VIRTUAL_CHANNEL_CAMHAL=ON
+  '';
+
+  buildInputs = [
+    gst_all_1.gstreamer
+    gst_all_1.gst-plugins-base
+    ipu6-camera-hal
+    libdrm
+  ];
+
+  NIX_CFLAGS_COMPILE = [
+    "-Wno-error"
+    # gstcameradeinterlace.cpp:55:10: fatal error: gst/video/video.h: No such file or directory
+    "-I${gst_all_1.gst-plugins-base.dev}/include/gstreamer-1.0"
+  ];
+
+  enableParallelBuilding = true;
+
+  passthru = {
+    inherit (ipu6-camera-hal) ipuVersion;
+  };
+
+  meta = with lib; {
+    description = "GStreamer Plugin for MIPI camera support through the IPU6/IPU6EP/IPU6SE on Intel Tigerlake/Alderlake/Jasperlake platforms";
+    homepage = "https://github.com/intel/icamerasrc/tree/icamerasrc_slim_api";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ hexa ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/libav/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/libav/default.nix
new file mode 100644
index 000000000000..f3dfac82c799
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gstreamer/libav/default.nix
@@ -0,0 +1,62 @@
+{ stdenv
+, lib
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, python3
+, gstreamer
+, gst-plugins-base
+, gettext
+, libav
+# Checks meson.is_cross_build(), so even canExecute isn't enough.
+, enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc
+}:
+
+# Note that since gst-libav-1.6, libav is actually ffmpeg. See
+# https://gstreamer.freedesktop.org/releases/1.6/ for more info.
+
+stdenv.mkDerivation rec {
+  pname = "gst-libav";
+  version = "1.22.8";
+
+  src = fetchurl {
+    url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz";
+    hash = "sha256-vjk0m8B6tM29ml/W6phIxgHHVguloFd61SALg71CSYE=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    gettext
+    pkg-config
+    python3
+  ] ++ lib.optionals enableDocumentation [
+    hotdoc
+  ];
+
+  buildInputs = [
+    gstreamer
+    gst-plugins-base
+    libav
+  ];
+
+  mesonFlags = [
+    (lib.mesonEnable "doc" enableDocumentation)
+  ];
+
+  postPatch = ''
+    patchShebangs \
+      scripts/extract-release-date-from-doap-file.py
+  '';
+
+  meta = with lib; {
+    description = "FFmpeg/libav plugin for GStreamer";
+    homepage = "https://gstreamer.freedesktop.org";
+    license = licenses.lgpl2Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ lilyinstarlight ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/rs/Cargo.lock b/nixpkgs/pkgs/development/libraries/gstreamer/rs/Cargo.lock
new file mode 100644
index 000000000000..6a3ecc43d739
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gstreamer/rs/Cargo.lock
@@ -0,0 +1,6446 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "addr2line"
+version = "0.20.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3"
+dependencies = [
+ "gimli",
+]
+
+[[package]]
+name = "adler"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
+
+[[package]]
+name = "aes"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561"
+dependencies = [
+ "aes-soft",
+ "aesni",
+ "cipher",
+]
+
+[[package]]
+name = "aes-ctr"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7729c3cde54d67063be556aeac75a81330d802f0259500ca40cb52967f975763"
+dependencies = [
+ "aes-soft",
+ "aesni",
+ "cipher",
+ "ctr",
+]
+
+[[package]]
+name = "aes-soft"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072"
+dependencies = [
+ "cipher",
+ "opaque-debug",
+]
+
+[[package]]
+name = "aesni"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce"
+dependencies = [
+ "cipher",
+ "opaque-debug",
+]
+
+[[package]]
+name = "aho-corasick"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "86b8f9420f797f2d9e935edf629310eb938a0d839f984e25327f3c7eed22300c"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "android-tzdata"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
+
+[[package]]
+name = "android_system_properties"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "anstream"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163"
+dependencies = [
+ "anstyle",
+ "anstyle-parse",
+ "anstyle-query",
+ "anstyle-wincon",
+ "colorchoice",
+ "is-terminal",
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd"
+
+[[package]]
+name = "anstyle-parse"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333"
+dependencies = [
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle-query"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b"
+dependencies = [
+ "windows-sys",
+]
+
+[[package]]
+name = "anstyle-wincon"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c677ab05e09154296dd37acecd46420c17b9713e8366facafa8fc0885167cf4c"
+dependencies = [
+ "anstyle",
+ "windows-sys",
+]
+
+[[package]]
+name = "anyhow"
+version = "1.0.72"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854"
+
+[[package]]
+name = "arbitrary"
+version = "0.4.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "db55d72333851e17d572bec876e390cd3b11eb1ef53ae821dd9f3b653d2b4569"
+
+[[package]]
+name = "arg_enum_proc_macro"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d7c29b43ee8654590587cd033b3eca2f9c4f8cdff945ec0e6ee91ceb057d87f3"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "arrayvec"
+version = "0.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "async-compression"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62b74f44609f0f91493e3082d3734d98497e094777144380ea4db9f9905dd5b6"
+dependencies = [
+ "flate2",
+ "futures-core",
+ "memchr",
+ "pin-project-lite",
+ "tokio",
+]
+
+[[package]]
+name = "async-recursion"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.28",
+]
+
+[[package]]
+name = "async-stream"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51"
+dependencies = [
+ "async-stream-impl",
+ "futures-core",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "async-stream-impl"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.28",
+]
+
+[[package]]
+name = "async-task"
+version = "4.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae"
+
+[[package]]
+name = "async-trait"
+version = "0.1.72"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.28",
+]
+
+[[package]]
+name = "async-tungstenite"
+version = "0.23.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1e9efbe14612da0a19fb983059a0b621e9cf6225d7018ecab4f9988215540dc"
+dependencies = [
+ "futures-io",
+ "futures-util",
+ "log",
+ "native-tls",
+ "pin-project-lite",
+ "tokio",
+ "tokio-native-tls",
+ "tungstenite 0.20.0",
+]
+
+[[package]]
+name = "atomic_refcell"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "79d6dc922a2792b006573f60b2648076355daeae5ce9cb59507e5908c9625d31"
+
+[[package]]
+name = "atty"
+version = "0.2.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
+dependencies = [
+ "hermit-abi 0.1.19",
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "autocfg"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+
+[[package]]
+name = "av1-grain"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6f6ca6f0c18c02c2fbfc119df551b8aeb8a385f6d5980f1475ba0255f1e97f1e"
+dependencies = [
+ "anyhow",
+ "arrayvec",
+ "itertools 0.10.5",
+ "log",
+ "nom",
+ "num-rational",
+ "serde",
+ "v_frame",
+]
+
+[[package]]
+name = "aws-config"
+version = "0.56.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "de3d533e0263bf453cc80af4c8bcc4d64e2aca293bd16f81633a36f1bf4a97cb"
+dependencies = [
+ "aws-credential-types",
+ "aws-http",
+ "aws-sdk-sso",
+ "aws-sdk-sts",
+ "aws-smithy-async",
+ "aws-smithy-client",
+ "aws-smithy-http",
+ "aws-smithy-http-tower",
+ "aws-smithy-json",
+ "aws-smithy-types",
+ "aws-types",
+ "bytes",
+ "fastrand",
+ "hex",
+ "http",
+ "hyper",
+ "ring",
+ "time 0.3.25",
+ "tokio",
+ "tower",
+ "tracing",
+ "zeroize",
+]
+
+[[package]]
+name = "aws-credential-types"
+version = "0.56.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e4834ba01c5ad1ed9740aa222de62190e3c565d11ab7e72cc68314a258994567"
+dependencies = [
+ "aws-smithy-async",
+ "aws-smithy-types",
+ "fastrand",
+ "tokio",
+ "tracing",
+ "zeroize",
+]
+
+[[package]]
+name = "aws-http"
+version = "0.56.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72badf9de83cc7d66b21b004f09241836823b8302afb25a24708769e576a8d8f"
+dependencies = [
+ "aws-credential-types",
+ "aws-smithy-http",
+ "aws-smithy-types",
+ "aws-types",
+ "bytes",
+ "http",
+ "http-body",
+ "lazy_static",
+ "percent-encoding",
+ "pin-project-lite",
+ "tracing",
+]
+
+[[package]]
+name = "aws-runtime"
+version = "0.56.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf832f522111225c02547e1e1c28137e840e4b082399d93a236e4b29193a4667"
+dependencies = [
+ "aws-credential-types",
+ "aws-http",
+ "aws-sigv4",
+ "aws-smithy-async",
+ "aws-smithy-eventstream",
+ "aws-smithy-http",
+ "aws-smithy-runtime-api",
+ "aws-smithy-types",
+ "aws-types",
+ "fastrand",
+ "http",
+ "percent-encoding",
+ "tracing",
+ "uuid",
+]
+
+[[package]]
+name = "aws-sdk-kinesisvideo"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5d12ca8af73af5453ecde2a4cc3df43eb6d623552bd3899692bfc92c6ddd1463"
+dependencies = [
+ "aws-credential-types",
+ "aws-http",
+ "aws-runtime",
+ "aws-smithy-async",
+ "aws-smithy-client",
+ "aws-smithy-http",
+ "aws-smithy-json",
+ "aws-smithy-runtime",
+ "aws-smithy-runtime-api",
+ "aws-smithy-types",
+ "aws-types",
+ "bytes",
+ "http",
+ "regex",
+ "tokio-stream",
+ "tracing",
+]
+
+[[package]]
+name = "aws-sdk-kinesisvideosignaling"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e4d880336d747d5207a74b656d8a229401142598fa36cab9163ac221946d517d"
+dependencies = [
+ "aws-credential-types",
+ "aws-http",
+ "aws-runtime",
+ "aws-smithy-async",
+ "aws-smithy-client",
+ "aws-smithy-http",
+ "aws-smithy-json",
+ "aws-smithy-runtime",
+ "aws-smithy-runtime-api",
+ "aws-smithy-types",
+ "aws-types",
+ "bytes",
+ "http",
+ "regex",
+ "tracing",
+]
+
+[[package]]
+name = "aws-sdk-s3"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e30370b61599168d38190ad272bb91842cd81870a6ca035c05dd5726d22832c"
+dependencies = [
+ "aws-credential-types",
+ "aws-http",
+ "aws-runtime",
+ "aws-sigv4",
+ "aws-smithy-async",
+ "aws-smithy-checksums",
+ "aws-smithy-client",
+ "aws-smithy-eventstream",
+ "aws-smithy-http",
+ "aws-smithy-json",
+ "aws-smithy-runtime",
+ "aws-smithy-runtime-api",
+ "aws-smithy-types",
+ "aws-smithy-xml",
+ "aws-types",
+ "bytes",
+ "http",
+ "http-body",
+ "once_cell",
+ "percent-encoding",
+ "regex",
+ "tokio-stream",
+ "tracing",
+ "url",
+]
+
+[[package]]
+name = "aws-sdk-sso"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f41bf2c28d32dbb9894a8fcfcb148265d034d3f4a170552a47553a09de890895"
+dependencies = [
+ "aws-credential-types",
+ "aws-http",
+ "aws-runtime",
+ "aws-smithy-async",
+ "aws-smithy-client",
+ "aws-smithy-http",
+ "aws-smithy-json",
+ "aws-smithy-runtime",
+ "aws-smithy-runtime-api",
+ "aws-smithy-types",
+ "aws-types",
+ "bytes",
+ "http",
+ "regex",
+ "tokio-stream",
+ "tracing",
+]
+
+[[package]]
+name = "aws-sdk-sts"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "79e21aa1a5b0853969a1ef96ccfaa8ff5d57c761549786a4d5f86c1902b2586a"
+dependencies = [
+ "aws-credential-types",
+ "aws-http",
+ "aws-runtime",
+ "aws-smithy-async",
+ "aws-smithy-client",
+ "aws-smithy-http",
+ "aws-smithy-json",
+ "aws-smithy-query",
+ "aws-smithy-runtime",
+ "aws-smithy-runtime-api",
+ "aws-smithy-types",
+ "aws-smithy-xml",
+ "aws-types",
+ "http",
+ "regex",
+ "tracing",
+]
+
+[[package]]
+name = "aws-sdk-transcribestreaming"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "12669c64c03c04e207ff14994791a3a508ae4dc55b0b73f31182171d19b04989"
+dependencies = [
+ "aws-credential-types",
+ "aws-http",
+ "aws-runtime",
+ "aws-sigv4",
+ "aws-smithy-async",
+ "aws-smithy-client",
+ "aws-smithy-eventstream",
+ "aws-smithy-http",
+ "aws-smithy-json",
+ "aws-smithy-runtime",
+ "aws-smithy-runtime-api",
+ "aws-smithy-types",
+ "aws-types",
+ "bytes",
+ "http",
+ "hyper",
+ "regex",
+ "tracing",
+]
+
+[[package]]
+name = "aws-sdk-translate"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "336147dbb8f9d406dea0bbe5ef057ec4761d4134e7c8eb915db503d7081c6da7"
+dependencies = [
+ "aws-credential-types",
+ "aws-http",
+ "aws-runtime",
+ "aws-smithy-async",
+ "aws-smithy-client",
+ "aws-smithy-http",
+ "aws-smithy-json",
+ "aws-smithy-runtime",
+ "aws-smithy-runtime-api",
+ "aws-smithy-types",
+ "aws-types",
+ "bytes",
+ "fastrand",
+ "http",
+ "regex",
+ "tokio-stream",
+ "tracing",
+]
+
+[[package]]
+name = "aws-sig-auth"
+version = "0.56.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d861c220cd86e3d3e84b8fabddd6b7c29fbd8234715ebb71e063a64689d66bc0"
+dependencies = [
+ "aws-credential-types",
+ "aws-sigv4",
+ "aws-smithy-async",
+ "aws-smithy-http",
+ "aws-types",
+ "http",
+ "tracing",
+]
+
+[[package]]
+name = "aws-sigv4"
+version = "0.56.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2cb40a93429794065f41f0581734fc56a345f6a38d8e2e3c25c7448d930cd132"
+dependencies = [
+ "aws-smithy-eventstream",
+ "aws-smithy-http",
+ "bytes",
+ "form_urlencoded",
+ "hex",
+ "hmac 0.12.1",
+ "http",
+ "once_cell",
+ "percent-encoding",
+ "regex",
+ "sha2",
+ "time 0.3.25",
+ "tracing",
+]
+
+[[package]]
+name = "aws-smithy-async"
+version = "0.56.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ee6d17d487c8b579423067718b3580c0908d0f01d7461813f94ec4323bad623"
+dependencies = [
+ "futures-util",
+ "pin-project-lite",
+ "tokio",
+ "tokio-stream",
+]
+
+[[package]]
+name = "aws-smithy-checksums"
+version = "0.56.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d1849fd5916904513fb0862543b36f8faab43c07984dbc476132b7da1aed056"
+dependencies = [
+ "aws-smithy-http",
+ "aws-smithy-types",
+ "bytes",
+ "crc32c",
+ "crc32fast",
+ "hex",
+ "http",
+ "http-body",
+ "md-5",
+ "pin-project-lite",
+ "sha1",
+ "sha2",
+ "tracing",
+]
+
+[[package]]
+name = "aws-smithy-client"
+version = "0.56.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bdbe0a3ad15283cc5f863a68cb6adc8e256e7c109c43c01bdd09be407219a1e9"
+dependencies = [
+ "aws-smithy-async",
+ "aws-smithy-http",
+ "aws-smithy-http-tower",
+ "aws-smithy-types",
+ "bytes",
+ "fastrand",
+ "http",
+ "http-body",
+ "hyper",
+ "hyper-rustls",
+ "lazy_static",
+ "pin-project-lite",
+ "rustls",
+ "tokio",
+ "tower",
+ "tracing",
+]
+
+[[package]]
+name = "aws-smithy-eventstream"
+version = "0.56.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a56afef1aa766f512b4970b4c3150b9bf2df8035939723830df4b30267e2d7cb"
+dependencies = [
+ "aws-smithy-types",
+ "bytes",
+ "crc32fast",
+]
+
+[[package]]
+name = "aws-smithy-http"
+version = "0.56.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "34dc313472d727f5ef44fdda93e668ebfe17380c99dee512c403e3ca51863bb9"
+dependencies = [
+ "aws-smithy-eventstream",
+ "aws-smithy-types",
+ "bytes",
+ "bytes-utils",
+ "futures-core",
+ "http",
+ "http-body",
+ "hyper",
+ "once_cell",
+ "percent-encoding",
+ "pin-project-lite",
+ "pin-utils",
+ "tokio",
+ "tokio-util",
+ "tracing",
+]
+
+[[package]]
+name = "aws-smithy-http-tower"
+version = "0.56.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1dd50fca5a4ea4ec3771689ee93bf06b32de02a80af01ed93a8f8a4ed90e8483"
+dependencies = [
+ "aws-smithy-http",
+ "aws-smithy-types",
+ "bytes",
+ "http",
+ "http-body",
+ "pin-project-lite",
+ "tower",
+ "tracing",
+]
+
+[[package]]
+name = "aws-smithy-json"
+version = "0.56.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3591dd7c2fe01ab8025e4847a0a0f6d0c2b2269714688ffb856f9cf6c6d465cf"
+dependencies = [
+ "aws-smithy-types",
+]
+
+[[package]]
+name = "aws-smithy-query"
+version = "0.56.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dbabb1145e65dd57ae72d91a2619d3f5fba40b68a5f40ba009c30571dfd60aff"
+dependencies = [
+ "aws-smithy-types",
+ "urlencoding",
+]
+
+[[package]]
+name = "aws-smithy-runtime"
+version = "0.56.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3687fb838d4ad1c883b62eb59115bc9fb02c4f308aac49a7df89627067f6eb0d"
+dependencies = [
+ "aws-smithy-async",
+ "aws-smithy-client",
+ "aws-smithy-http",
+ "aws-smithy-runtime-api",
+ "aws-smithy-types",
+ "bytes",
+ "fastrand",
+ "http",
+ "http-body",
+ "once_cell",
+ "pin-project-lite",
+ "pin-utils",
+ "tokio",
+ "tracing",
+]
+
+[[package]]
+name = "aws-smithy-runtime-api"
+version = "0.56.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5cfbf1e5c2108b41f5ca607cde40dd5109fecc448f5d30c8e614b61f36dce704"
+dependencies = [
+ "aws-smithy-async",
+ "aws-smithy-http",
+ "aws-smithy-types",
+ "bytes",
+ "http",
+ "tokio",
+ "tracing",
+]
+
+[[package]]
+name = "aws-smithy-types"
+version = "0.56.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eed0a94eefd845a2a78677f1b72f02fa75802d38f7f59be675add140279aa8bf"
+dependencies = [
+ "base64-simd",
+ "itoa",
+ "num-integer",
+ "ryu",
+ "serde",
+ "time 0.3.25",
+]
+
+[[package]]
+name = "aws-smithy-xml"
+version = "0.56.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c88052c812f696143ad7ba729c63535209ff0e0f49e31a6d2b1205208ea6ea79"
+dependencies = [
+ "xmlparser",
+]
+
+[[package]]
+name = "aws-types"
+version = "0.56.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6bceb8cf724ad057ad7f327d0d256d7147b3eac777b39849a26189e003dc9782"
+dependencies = [
+ "aws-credential-types",
+ "aws-smithy-async",
+ "aws-smithy-client",
+ "aws-smithy-http",
+ "aws-smithy-types",
+ "http",
+ "rustc_version",
+ "tracing",
+]
+
+[[package]]
+name = "backtrace"
+version = "0.3.68"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12"
+dependencies = [
+ "addr2line",
+ "cc",
+ "cfg-if",
+ "libc",
+ "miniz_oxide",
+ "object",
+ "rustc-demangle",
+]
+
+[[package]]
+name = "base32"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa"
+
+[[package]]
+name = "base64"
+version = "0.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
+
+[[package]]
+name = "base64"
+version = "0.21.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d"
+
+[[package]]
+name = "base64-serde"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba368df5de76a5bea49aaf0cf1b39ccfbbef176924d1ba5db3e4135216cbe3c7"
+dependencies = [
+ "base64 0.21.2",
+ "serde",
+]
+
+[[package]]
+name = "base64-simd"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "339abbe78e73178762e23bea9dfd08e697eb3f3301cd4be981c0f78ba5859195"
+dependencies = [
+ "outref",
+ "vsimd",
+]
+
+[[package]]
+name = "bincode"
+version = "1.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "bitflags"
+version = "2.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42"
+
+[[package]]
+name = "bitstream-io"
+version = "1.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "82704769cb85a22df2c54d6bdd6a158b7931d256cf3248a07d6ecbe9d58b31d7"
+
+[[package]]
+name = "block-buffer"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "block-buffer"
+version = "0.10.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "build_const"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4ae4235e6dac0694637c763029ecea1a2ec9e4e06ec2729bd21ba4d9c863eb7"
+
+[[package]]
+name = "built"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b9c056b9ed43aee5e064b683aa1ec783e19c6acec7559e3ae931b7490472fbe"
+dependencies = [
+ "cargo-lock",
+]
+
+[[package]]
+name = "bumpalo"
+version = "3.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1"
+
+[[package]]
+name = "byte-slice-cast"
+version = "1.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c"
+
+[[package]]
+name = "bytemuck"
+version = "1.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea"
+
+[[package]]
+name = "byteorder"
+version = "1.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
+
+[[package]]
+name = "bytes"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be"
+
+[[package]]
+name = "bytes-utils"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e47d3a8076e283f3acd27400535992edb3ba4b5bb72f8891ad8fbe7932a7d4b9"
+dependencies = [
+ "bytes",
+ "either",
+]
+
+[[package]]
+name = "cairo-rs"
+version = "0.18.1"
+source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.18#854c9b0592fb3a3865caa3e8538a5dda98399c0c"
+dependencies = [
+ "bitflags 2.3.3",
+ "cairo-sys-rs",
+ "glib",
+ "libc",
+ "once_cell",
+ "thiserror",
+]
+
+[[package]]
+name = "cairo-sys-rs"
+version = "0.18.1"
+source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.18#854c9b0592fb3a3865caa3e8538a5dda98399c0c"
+dependencies = [
+ "glib-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "cargo-lock"
+version = "8.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "031718ddb8f78aa5def78a09e90defe30151d1f6c672f937af4dd916429ed996"
+dependencies = [
+ "semver",
+ "serde",
+ "toml 0.5.11",
+ "url",
+]
+
+[[package]]
+name = "cc"
+version = "1.0.82"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "305fe645edc1442a0fa8b6726ba61d422798d37a52e12eaecf4b022ebbb88f01"
+dependencies = [
+ "jobserver",
+ "libc",
+]
+
+[[package]]
+name = "cdg"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d254b2c9fc971518da5d652aee7edc6b9bb96fa32de28f166895faf69d9926e6"
+
+[[package]]
+name = "cdg_renderer"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3753104c2ef8672021f3355a59ab5944d7aa5472f970b5d97e93bd741d79af96"
+dependencies = [
+ "cdg",
+ "image",
+]
+
+[[package]]
+name = "cea708-types"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3a23ec736ab2aafb861ef6f22c662cbc18c85e73945f86bd9e936a20be7cc958"
+dependencies = [
+ "once_cell",
+ "tracing",
+ "tracing-subscriber",
+]
+
+[[package]]
+name = "cfg-expr"
+version = "0.15.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b40ccee03b5175c18cde8f37e7d2a33bcef6f8ec8f7cc0d81090d1bb380949c9"
+dependencies = [
+ "smallvec",
+ "target-lexicon",
+]
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "chrono"
+version = "0.4.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5"
+dependencies = [
+ "android-tzdata",
+ "iana-time-zone",
+ "js-sys",
+ "num-traits",
+ "serde",
+ "time 0.1.45",
+ "wasm-bindgen",
+ "winapi",
+]
+
+[[package]]
+name = "cipher"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "clap"
+version = "4.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c27cdf28c0f604ba3f512b0c9a409f8de8513e4816705deb0498b627e7c3a3fd"
+dependencies = [
+ "clap_builder",
+ "clap_derive",
+ "once_cell",
+]
+
+[[package]]
+name = "clap_builder"
+version = "4.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08a9f1ab5e9f01a9b81f202e8562eb9a10de70abf9eaeac1be465c28b75aa4aa"
+dependencies = [
+ "anstream",
+ "anstyle",
+ "clap_lex",
+ "strsim",
+]
+
+[[package]]
+name = "clap_derive"
+version = "4.3.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050"
+dependencies = [
+ "heck",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.28",
+]
+
+[[package]]
+name = "clap_lex"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b"
+
+[[package]]
+name = "claxon"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4bfbf56724aa9eca8afa4fcfadeb479e722935bb2a0900c2d37e0cc477af0688"
+
+[[package]]
+name = "color-name"
+version = "1.1.0"
+source = "git+https://github.com/lilyinstarlight/color-name#cac0ed5b7d2e0682c08c9bfd13089d5494e81b9a"
+
+[[package]]
+name = "color-thief"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6460d760cf38ce67c9e0318f896538820acc54f2d0a3bfc5b2c557211066c98"
+dependencies = [
+ "rgb",
+]
+
+[[package]]
+name = "color_quant"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b"
+
+[[package]]
+name = "colorchoice"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
+
+[[package]]
+name = "concurrent-queue"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c"
+dependencies = [
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "cookie"
+version = "0.16.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb"
+dependencies = [
+ "percent-encoding",
+ "time 0.3.25",
+ "version_check",
+]
+
+[[package]]
+name = "cookie_store"
+version = "0.16.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d606d0fba62e13cf04db20536c05cb7f13673c161cb47a47a82b9b9e7d3f1daa"
+dependencies = [
+ "cookie",
+ "idna 0.2.3",
+ "log",
+ "publicsuffix",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "time 0.3.25",
+ "url",
+]
+
+[[package]]
+name = "core-foundation"
+version = "0.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa"
+
+[[package]]
+name = "cpufeatures"
+version = "0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "crc"
+version = "1.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb"
+dependencies = [
+ "build_const",
+]
+
+[[package]]
+name = "crc32c"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d8f48d60e5b4d2c53d5c2b1d8a58c849a70ae5e5509b08a48d047e3b65714a74"
+dependencies = [
+ "rustc_version",
+]
+
+[[package]]
+name = "crc32fast"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "crossbeam-channel"
+version = "0.5.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200"
+dependencies = [
+ "cfg-if",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-deque"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef"
+dependencies = [
+ "cfg-if",
+ "crossbeam-epoch",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-epoch"
+version = "0.9.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7"
+dependencies = [
+ "autocfg",
+ "cfg-if",
+ "crossbeam-utils",
+ "memoffset 0.9.0",
+ "scopeguard",
+]
+
+[[package]]
+name = "crossbeam-utils"
+version = "0.8.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "crypto-common"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
+dependencies = [
+ "generic-array",
+ "typenum",
+]
+
+[[package]]
+name = "crypto-mac"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714"
+dependencies = [
+ "generic-array",
+ "subtle",
+]
+
+[[package]]
+name = "csound"
+version = "0.1.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8d49045d7365f5c2cadb1f20932189a0da101ac86c8dbe891975814b2348d57d"
+dependencies = [
+ "bitflags 1.3.2",
+ "csound-sys",
+ "libc",
+ "va_list",
+]
+
+[[package]]
+name = "csound-sys"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "86b11869eaed111b64d29e66cc5c7de9f172d5b623b716eb74c5dd841dbcfe39"
+dependencies = [
+ "libc",
+ "va_list",
+]
+
+[[package]]
+name = "ctr"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fb4a30d54f7443bf3d6191dcd486aca19e67cb3c49fa7a06a319966346707e7f"
+dependencies = [
+ "cipher",
+]
+
+[[package]]
+name = "darling"
+version = "0.20.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e"
+dependencies = [
+ "darling_core",
+ "darling_macro",
+]
+
+[[package]]
+name = "darling_core"
+version = "0.20.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621"
+dependencies = [
+ "fnv",
+ "ident_case",
+ "proc-macro2",
+ "quote",
+ "strsim",
+ "syn 2.0.28",
+]
+
+[[package]]
+name = "darling_macro"
+version = "0.20.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5"
+dependencies = [
+ "darling_core",
+ "quote",
+ "syn 2.0.28",
+]
+
+[[package]]
+name = "dash-mpd"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5d0c74b03285fe95649f588140b6009dc10bc4f747bd774818ed8e9cc6b5cbb6"
+dependencies = [
+ "base64 0.21.2",
+ "base64-serde",
+ "chrono",
+ "fs-err",
+ "iso8601",
+ "log",
+ "num-traits",
+ "quick-xml",
+ "regex",
+ "serde",
+ "serde_with",
+ "thiserror",
+ "tokio",
+ "xattr",
+]
+
+[[package]]
+name = "dasp_frame"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b2a3937f5fe2135702897535c8d4a5553f8b116f76c1529088797f2eee7c5cd6"
+dependencies = [
+ "dasp_sample",
+]
+
+[[package]]
+name = "dasp_sample"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c87e182de0887fd5361989c677c4e8f5000cd9491d6d563161a8f3a5519fc7f"
+
+[[package]]
+name = "data-encoding"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"
+
+[[package]]
+name = "dav1d"
+version = "0.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87ca43c8e58ee931086b5fd9a4b6a8cc40c1346592246c4fe3d299eca1684c75"
+dependencies = [
+ "bitflags 2.3.3",
+ "dav1d-sys",
+]
+
+[[package]]
+name = "dav1d-sys"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "615542bb14c18b795f46aba92258902168218d714090f5fff47e68c9a352ea2d"
+dependencies = [
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "deranged"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7684a49fb1af197853ef7b2ee694bc1f5b4179556f1e5710e1760c5db6f5e929"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "diff"
+version = "0.1.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8"
+
+[[package]]
+name = "digest"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "digest"
+version = "0.10.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
+dependencies = [
+ "block-buffer 0.10.4",
+ "crypto-common",
+ "subtle",
+]
+
+[[package]]
+name = "dssim-core"
+version = "3.2.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1388544389475fcfd718b35a286af17cb215202af26bf2067d0e1024adbc3fe9"
+dependencies = [
+ "imgref",
+ "itertools 0.11.0",
+ "rayon",
+ "rgb",
+]
+
+[[package]]
+name = "ebur128"
+version = "0.1.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "12aebdd6b6b47b5880c049efb0e77f8762178a0745ef778878908f5981c05f52"
+dependencies = [
+ "bitflags 1.3.2",
+ "dasp_frame",
+ "dasp_sample",
+ "smallvec",
+]
+
+[[package]]
+name = "ed25519"
+version = "1.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7"
+dependencies = [
+ "signature",
+]
+
+[[package]]
+name = "either"
+version = "1.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
+
+[[package]]
+name = "encoding_rs"
+version = "0.8.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "env_logger"
+version = "0.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7"
+dependencies = [
+ "atty",
+ "humantime",
+ "log",
+ "termcolor",
+]
+
+[[package]]
+name = "env_logger"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0"
+dependencies = [
+ "humantime",
+ "is-terminal",
+ "log",
+ "regex",
+ "termcolor",
+]
+
+[[package]]
+name = "equivalent"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
+
+[[package]]
+name = "errno"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f"
+dependencies = [
+ "errno-dragonfly",
+ "libc",
+ "windows-sys",
+]
+
+[[package]]
+name = "errno-dragonfly"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
+dependencies = [
+ "cc",
+ "libc",
+]
+
+[[package]]
+name = "fastrand"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764"
+
+[[package]]
+name = "fdeflate"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d329bdeac514ee06249dabc27877490f17f5d371ec693360768b838e19f3ae10"
+dependencies = [
+ "simd-adler32",
+]
+
+[[package]]
+name = "ffv1"
+version = "0.0.0"
+source = "git+https://github.com/rust-av/ffv1.git?rev=2afb025a327173ce891954c052e804d0f880368a#2afb025a327173ce891954c052e804d0f880368a"
+dependencies = [
+ "crc",
+ "num-traits",
+ "thiserror",
+]
+
+[[package]]
+name = "field-offset"
+version = "0.3.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f"
+dependencies = [
+ "memoffset 0.9.0",
+ "rustc_version",
+]
+
+[[package]]
+name = "fixedbitset"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80"
+
+[[package]]
+name = "flate2"
+version = "1.0.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743"
+dependencies = [
+ "crc32fast",
+ "miniz_oxide",
+]
+
+[[package]]
+name = "flavors"
+version = "0.2.0"
+source = "git+https://github.com/rust-av/flavors#833508af656d298c269f2397c8541a084264d992"
+dependencies = [
+ "nom",
+]
+
+[[package]]
+name = "flume"
+version = "0.10.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577"
+dependencies = [
+ "futures-core",
+ "futures-sink",
+ "nanorand",
+ "pin-project",
+ "spin 0.9.8",
+]
+
+[[package]]
+name = "fnv"
+version = "1.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
+
+[[package]]
+name = "foreign-types"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
+dependencies = [
+ "foreign-types-shared",
+]
+
+[[package]]
+name = "foreign-types-shared"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
+
+[[package]]
+name = "form_urlencoded"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652"
+dependencies = [
+ "percent-encoding",
+]
+
+[[package]]
+name = "fs-err"
+version = "2.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0845fa252299212f0389d64ba26f34fa32cfe41588355f21ed507c59a0f64541"
+
+[[package]]
+name = "fst"
+version = "0.4.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ab85b9b05e3978cc9a9cf8fea7f01b494e1a09ed3037e16ba39edc7a29eb61a"
+
+[[package]]
+name = "futures"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-executor",
+ "futures-io",
+ "futures-sink",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-channel"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2"
+dependencies = [
+ "futures-core",
+ "futures-sink",
+]
+
+[[package]]
+name = "futures-core"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c"
+
+[[package]]
+name = "futures-executor"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0"
+dependencies = [
+ "futures-core",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-io"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964"
+
+[[package]]
+name = "futures-macro"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.28",
+]
+
+[[package]]
+name = "futures-sink"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e"
+
+[[package]]
+name = "futures-task"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65"
+
+[[package]]
+name = "futures-util"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-io",
+ "futures-macro",
+ "futures-sink",
+ "futures-task",
+ "memchr",
+ "pin-project-lite",
+ "pin-utils",
+ "slab",
+]
+
+[[package]]
+name = "gdk-pixbuf"
+version = "0.18.1"
+source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.18#854c9b0592fb3a3865caa3e8538a5dda98399c0c"
+dependencies = [
+ "gdk-pixbuf-sys",
+ "gio",
+ "glib",
+ "libc",
+ "once_cell",
+]
+
+[[package]]
+name = "gdk-pixbuf-sys"
+version = "0.18.1"
+source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.18#854c9b0592fb3a3865caa3e8538a5dda98399c0c"
+dependencies = [
+ "gio-sys",
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "gdk4"
+version = "0.7.1"
+source = "git+https://github.com/gtk-rs/gtk4-rs?branch=0.7#9cf490a3afcad0a61233d4f65cfc2f5d2d369e9f"
+dependencies = [
+ "cairo-rs",
+ "gdk-pixbuf",
+ "gdk4-sys",
+ "gio",
+ "glib",
+ "libc",
+ "pango",
+]
+
+[[package]]
+name = "gdk4-sys"
+version = "0.7.1"
+source = "git+https://github.com/gtk-rs/gtk4-rs?branch=0.7#9cf490a3afcad0a61233d4f65cfc2f5d2d369e9f"
+dependencies = [
+ "cairo-sys-rs",
+ "gdk-pixbuf-sys",
+ "gio-sys",
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "pango-sys",
+ "pkg-config",
+ "system-deps",
+]
+
+[[package]]
+name = "gdk4-wayland"
+version = "0.7.1"
+source = "git+https://github.com/gtk-rs/gtk4-rs?branch=0.7#9cf490a3afcad0a61233d4f65cfc2f5d2d369e9f"
+dependencies = [
+ "gdk4",
+ "gdk4-wayland-sys",
+ "gio",
+ "glib",
+ "libc",
+]
+
+[[package]]
+name = "gdk4-wayland-sys"
+version = "0.7.1"
+source = "git+https://github.com/gtk-rs/gtk4-rs?branch=0.7#9cf490a3afcad0a61233d4f65cfc2f5d2d369e9f"
+dependencies = [
+ "glib-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "gdk4-win32"
+version = "0.7.1"
+source = "git+https://github.com/gtk-rs/gtk4-rs?branch=0.7#9cf490a3afcad0a61233d4f65cfc2f5d2d369e9f"
+dependencies = [
+ "gdk4",
+ "gdk4-win32-sys",
+ "gio",
+ "glib",
+ "khronos-egl",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "gdk4-win32-sys"
+version = "0.7.1"
+source = "git+https://github.com/gtk-rs/gtk4-rs?branch=0.7#9cf490a3afcad0a61233d4f65cfc2f5d2d369e9f"
+dependencies = [
+ "gdk-pixbuf-sys",
+ "gdk4-sys",
+ "glib-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "gdk4-x11"
+version = "0.7.1"
+source = "git+https://github.com/gtk-rs/gtk4-rs?branch=0.7#9cf490a3afcad0a61233d4f65cfc2f5d2d369e9f"
+dependencies = [
+ "gdk4",
+ "gdk4-x11-sys",
+ "gio",
+ "glib",
+ "libc",
+]
+
+[[package]]
+name = "gdk4-x11-sys"
+version = "0.7.1"
+source = "git+https://github.com/gtk-rs/gtk4-rs?branch=0.7#9cf490a3afcad0a61233d4f65cfc2f5d2d369e9f"
+dependencies = [
+ "gdk4-sys",
+ "glib-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "generic-array"
+version = "0.14.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
+dependencies = [
+ "typenum",
+ "version_check",
+]
+
+[[package]]
+name = "getopts"
+version = "0.2.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5"
+dependencies = [
+ "unicode-width",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.2.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "libc",
+ "wasi 0.11.0+wasi-snapshot-preview1",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "gif"
+version = "0.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045"
+dependencies = [
+ "color_quant",
+ "weezl",
+]
+
+[[package]]
+name = "gimli"
+version = "0.27.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e"
+
+[[package]]
+name = "gio"
+version = "0.18.1"
+source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.18#854c9b0592fb3a3865caa3e8538a5dda98399c0c"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-io",
+ "futures-util",
+ "gio-sys",
+ "glib",
+ "libc",
+ "once_cell",
+ "pin-project-lite",
+ "smallvec",
+ "thiserror",
+]
+
+[[package]]
+name = "gio-sys"
+version = "0.18.1"
+source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.18#854c9b0592fb3a3865caa3e8538a5dda98399c0c"
+dependencies = [
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "system-deps",
+ "winapi",
+]
+
+[[package]]
+name = "glib"
+version = "0.18.1"
+source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.18#854c9b0592fb3a3865caa3e8538a5dda98399c0c"
+dependencies = [
+ "bitflags 2.3.3",
+ "futures-channel",
+ "futures-core",
+ "futures-executor",
+ "futures-task",
+ "futures-util",
+ "gio-sys",
+ "glib-macros",
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "memchr",
+ "once_cell",
+ "smallvec",
+ "thiserror",
+]
+
+[[package]]
+name = "glib-macros"
+version = "0.18.1"
+source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.18#854c9b0592fb3a3865caa3e8538a5dda98399c0c"
+dependencies = [
+ "heck",
+ "proc-macro-crate",
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.28",
+]
+
+[[package]]
+name = "glib-sys"
+version = "0.18.1"
+source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.18#854c9b0592fb3a3865caa3e8538a5dda98399c0c"
+dependencies = [
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "glob"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
+
+[[package]]
+name = "gobject-sys"
+version = "0.18.1"
+source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.18#854c9b0592fb3a3865caa3e8538a5dda98399c0c"
+dependencies = [
+ "glib-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "graphene-rs"
+version = "0.18.1"
+source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.18#854c9b0592fb3a3865caa3e8538a5dda98399c0c"
+dependencies = [
+ "glib",
+ "graphene-sys",
+ "libc",
+]
+
+[[package]]
+name = "graphene-sys"
+version = "0.18.1"
+source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.18#854c9b0592fb3a3865caa3e8538a5dda98399c0c"
+dependencies = [
+ "glib-sys",
+ "libc",
+ "pkg-config",
+ "system-deps",
+]
+
+[[package]]
+name = "gsk4"
+version = "0.7.1"
+source = "git+https://github.com/gtk-rs/gtk4-rs?branch=0.7#9cf490a3afcad0a61233d4f65cfc2f5d2d369e9f"
+dependencies = [
+ "cairo-rs",
+ "gdk4",
+ "glib",
+ "graphene-rs",
+ "gsk4-sys",
+ "libc",
+ "pango",
+]
+
+[[package]]
+name = "gsk4-sys"
+version = "0.7.1"
+source = "git+https://github.com/gtk-rs/gtk4-rs?branch=0.7#9cf490a3afcad0a61233d4f65cfc2f5d2d369e9f"
+dependencies = [
+ "cairo-sys-rs",
+ "gdk4-sys",
+ "glib-sys",
+ "gobject-sys",
+ "graphene-sys",
+ "libc",
+ "pango-sys",
+ "system-deps",
+]
+
+[[package]]
+name = "gst-plugin-audiofx"
+version = "0.11.0"
+dependencies = [
+ "anyhow",
+ "atomic_refcell",
+ "byte-slice-cast",
+ "ebur128",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-app",
+ "gstreamer-audio",
+ "gstreamer-base",
+ "gstreamer-check",
+ "hrtf",
+ "nnnoiseless",
+ "num-traits",
+ "rayon",
+ "smallvec",
+]
+
+[[package]]
+name = "gst-plugin-aws"
+version = "0.11.0"
+dependencies = [
+ "async-stream",
+ "aws-config",
+ "aws-credential-types",
+ "aws-sdk-s3",
+ "aws-sdk-transcribestreaming",
+ "aws-sdk-translate",
+ "aws-sig-auth",
+ "aws-smithy-http",
+ "aws-smithy-types",
+ "aws-types",
+ "base32",
+ "bytes",
+ "chrono",
+ "env_logger 0.10.0",
+ "futures",
+ "gio",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-audio",
+ "gstreamer-base",
+ "gstreamer-check",
+ "http",
+ "percent-encoding",
+ "rand",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "test-with",
+ "tokio",
+ "url",
+]
+
+[[package]]
+name = "gst-plugin-cdg"
+version = "0.11.0"
+dependencies = [
+ "cdg",
+ "cdg_renderer",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-app",
+ "gstreamer-base",
+ "gstreamer-video",
+ "image",
+ "muldiv",
+]
+
+[[package]]
+name = "gst-plugin-claxon"
+version = "0.11.0"
+dependencies = [
+ "atomic_refcell",
+ "byte-slice-cast",
+ "claxon",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-audio",
+ "gstreamer-check",
+ "once_cell",
+]
+
+[[package]]
+name = "gst-plugin-closedcaption"
+version = "0.11.0"
+dependencies = [
+ "anyhow",
+ "atomic_refcell",
+ "byteorder",
+ "cairo-rs",
+ "cc",
+ "cea708-types",
+ "chrono",
+ "either",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-base",
+ "gstreamer-check",
+ "gstreamer-video",
+ "nom",
+ "pango",
+ "pangocairo",
+ "pretty_assertions",
+ "rand",
+ "serde",
+ "serde_json",
+ "uuid",
+]
+
+[[package]]
+name = "gst-plugin-csound"
+version = "0.11.0"
+dependencies = [
+ "byte-slice-cast",
+ "csound",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-audio",
+ "gstreamer-base",
+ "gstreamer-check",
+]
+
+[[package]]
+name = "gst-plugin-dav1d"
+version = "0.11.0"
+dependencies = [
+ "dav1d",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-base",
+ "gstreamer-video",
+ "num_cpus",
+]
+
+[[package]]
+name = "gst-plugin-fallbackswitch"
+version = "0.11.0"
+dependencies = [
+ "gio",
+ "gst-plugin-gtk4",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-app",
+ "gstreamer-audio",
+ "gstreamer-base",
+ "gstreamer-check",
+ "gstreamer-video",
+ "gtk4",
+ "parking_lot",
+]
+
+[[package]]
+name = "gst-plugin-ffv1"
+version = "0.11.0"
+dependencies = [
+ "byte-slice-cast",
+ "ffv1",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-check",
+ "gstreamer-video",
+]
+
+[[package]]
+name = "gst-plugin-file"
+version = "0.11.0"
+dependencies = [
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-base",
+ "url",
+]
+
+[[package]]
+name = "gst-plugin-flavors"
+version = "0.11.0"
+dependencies = [
+ "byteorder",
+ "flavors",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-audio",
+ "gstreamer-base",
+ "muldiv",
+ "nom",
+ "num-rational",
+ "smallvec",
+]
+
+[[package]]
+name = "gst-plugin-fmp4"
+version = "0.11.0"
+dependencies = [
+ "anyhow",
+ "chrono",
+ "dash-mpd",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-app",
+ "gstreamer-audio",
+ "gstreamer-base",
+ "gstreamer-check",
+ "gstreamer-pbutils",
+ "gstreamer-video",
+ "m3u8-rs",
+ "quick-xml",
+ "serde",
+]
+
+[[package]]
+name = "gst-plugin-gif"
+version = "0.11.0"
+dependencies = [
+ "atomic_refcell",
+ "gif",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-check",
+ "gstreamer-video",
+ "once_cell",
+]
+
+[[package]]
+name = "gst-plugin-gtk4"
+version = "0.11.0"
+dependencies = [
+ "gdk4-wayland",
+ "gdk4-win32",
+ "gdk4-x11",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-base",
+ "gstreamer-gl",
+ "gstreamer-gl-egl",
+ "gstreamer-gl-wayland",
+ "gstreamer-gl-x11",
+ "gstreamer-video",
+ "gtk4",
+ "windows-sys",
+]
+
+[[package]]
+name = "gst-plugin-hlssink3"
+version = "0.11.0"
+dependencies = [
+ "gio",
+ "glib",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-audio",
+ "gstreamer-base",
+ "gstreamer-check",
+ "m3u8-rs",
+ "once_cell",
+ "regex",
+]
+
+[[package]]
+name = "gst-plugin-hsv"
+version = "0.11.0"
+dependencies = [
+ "byte-slice-cast",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-audio",
+ "gstreamer-base",
+ "gstreamer-check",
+ "gstreamer-video",
+ "num-traits",
+]
+
+[[package]]
+name = "gst-plugin-json"
+version = "0.11.0"
+dependencies = [
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-check",
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "gst-plugin-lewton"
+version = "0.11.0"
+dependencies = [
+ "atomic_refcell",
+ "byte-slice-cast",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-audio",
+ "gstreamer-check",
+ "lewton",
+]
+
+[[package]]
+name = "gst-plugin-livesync"
+version = "0.11.0"
+dependencies = [
+ "gio",
+ "gst-plugin-gtk4",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-audio",
+ "gstreamer-check",
+ "gtk4",
+ "muldiv",
+ "num-rational",
+ "parking_lot",
+]
+
+[[package]]
+name = "gst-plugin-mp4"
+version = "0.11.0"
+dependencies = [
+ "anyhow",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-audio",
+ "gstreamer-base",
+ "gstreamer-pbutils",
+ "gstreamer-video",
+ "tempfile",
+ "url",
+]
+
+[[package]]
+name = "gst-plugin-ndi"
+version = "0.11.0"
+dependencies = [
+ "atomic_refcell",
+ "byte-slice-cast",
+ "byteorder",
+ "glib",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-audio",
+ "gstreamer-base",
+ "gstreamer-video",
+ "libloading",
+]
+
+[[package]]
+name = "gst-plugin-onvif"
+version = "0.11.0"
+dependencies = [
+ "cairo-rs",
+ "chrono",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-base",
+ "gstreamer-rtp",
+ "gstreamer-video",
+ "pango",
+ "pangocairo",
+ "xmlparser",
+ "xmltree",
+]
+
+[[package]]
+name = "gst-plugin-png"
+version = "0.11.0"
+dependencies = [
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-check",
+ "gstreamer-video",
+ "once_cell",
+ "parking_lot",
+ "png",
+]
+
+[[package]]
+name = "gst-plugin-raptorq"
+version = "0.11.0"
+dependencies = [
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-base",
+ "gstreamer-check",
+ "gstreamer-rtp",
+ "rand",
+ "raptorq",
+]
+
+[[package]]
+name = "gst-plugin-rav1e"
+version = "0.11.0"
+dependencies = [
+ "atomic_refcell",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-check",
+ "gstreamer-video",
+ "rav1e",
+]
+
+[[package]]
+name = "gst-plugin-regex"
+version = "0.11.0"
+dependencies = [
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-check",
+ "regex",
+]
+
+[[package]]
+name = "gst-plugin-reqwest"
+version = "0.11.0"
+dependencies = [
+ "futures",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-base",
+ "headers",
+ "hyper",
+ "mime",
+ "reqwest",
+ "tokio",
+ "url",
+]
+
+[[package]]
+name = "gst-plugin-rtp"
+version = "0.11.0"
+dependencies = [
+ "bitstream-io",
+ "chrono",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-check",
+ "gstreamer-rtp",
+]
+
+[[package]]
+name = "gst-plugin-sodium"
+version = "0.11.0"
+dependencies = [
+ "clap",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-app",
+ "gstreamer-base",
+ "gstreamer-check",
+ "hex",
+ "once_cell",
+ "pretty_assertions",
+ "rand",
+ "serde",
+ "serde_json",
+ "smallvec",
+ "sodiumoxide",
+]
+
+[[package]]
+name = "gst-plugin-spotify"
+version = "0.11.0"
+dependencies = [
+ "anyhow",
+ "futures",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-base",
+ "librespot",
+ "tokio",
+ "url",
+]
+
+[[package]]
+name = "gst-plugin-textahead"
+version = "0.11.0"
+dependencies = [
+ "gst-plugin-version-helper",
+ "gstreamer",
+]
+
+[[package]]
+name = "gst-plugin-textwrap"
+version = "0.11.0"
+dependencies = [
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-check",
+ "hyphenation",
+ "textwrap",
+]
+
+[[package]]
+name = "gst-plugin-threadshare"
+version = "0.11.0"
+dependencies = [
+ "async-task",
+ "cc",
+ "clap",
+ "concurrent-queue",
+ "flume",
+ "futures",
+ "gio",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-app",
+ "gstreamer-audio",
+ "gstreamer-check",
+ "gstreamer-net",
+ "gstreamer-rtp",
+ "libc",
+ "once_cell",
+ "pin-project-lite",
+ "pkg-config",
+ "polling",
+ "rand",
+ "slab",
+ "socket2 0.5.3",
+ "waker-fn",
+ "winapi",
+]
+
+[[package]]
+name = "gst-plugin-togglerecord"
+version = "0.11.0"
+dependencies = [
+ "either",
+ "gio",
+ "gst-plugin-gtk4",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-audio",
+ "gstreamer-check",
+ "gstreamer-video",
+ "gtk4",
+ "parking_lot",
+]
+
+[[package]]
+name = "gst-plugin-tracers"
+version = "0.11.0"
+dependencies = [
+ "anyhow",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "regex",
+ "signal-hook",
+]
+
+[[package]]
+name = "gst-plugin-tutorial"
+version = "0.11.0"
+dependencies = [
+ "byte-slice-cast",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-audio",
+ "gstreamer-base",
+ "gstreamer-video",
+ "num-traits",
+]
+
+[[package]]
+name = "gst-plugin-uriplaylistbin"
+version = "0.11.0"
+dependencies = [
+ "anyhow",
+ "clap",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-app",
+ "more-asserts",
+ "thiserror",
+ "url",
+]
+
+[[package]]
+name = "gst-plugin-version-helper"
+version = "0.7.5"
+dependencies = [
+ "chrono",
+]
+
+[[package]]
+name = "gst-plugin-videofx"
+version = "0.11.0"
+dependencies = [
+ "atomic_refcell",
+ "cairo-rs",
+ "color-name",
+ "color-thief",
+ "dssim-core",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-base",
+ "gstreamer-check",
+ "gstreamer-video",
+ "image",
+ "image_hasher",
+ "rgb",
+]
+
+[[package]]
+name = "gst-plugin-webp"
+version = "0.11.0"
+dependencies = [
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-check",
+ "gstreamer-video",
+ "libwebp-sys2",
+ "pretty_assertions",
+]
+
+[[package]]
+name = "gst-plugin-webrtc"
+version = "0.11.0"
+dependencies = [
+ "anyhow",
+ "async-recursion",
+ "async-tungstenite",
+ "aws-config",
+ "aws-credential-types",
+ "aws-sdk-kinesisvideo",
+ "aws-sdk-kinesisvideosignaling",
+ "aws-sig-auth",
+ "aws-smithy-http",
+ "aws-smithy-types",
+ "aws-types",
+ "chrono",
+ "clap",
+ "data-encoding",
+ "fastrand",
+ "futures",
+ "gst-plugin-version-helper",
+ "gst-plugin-webrtc-signalling-protocol",
+ "gstreamer",
+ "gstreamer-app",
+ "gstreamer-base",
+ "gstreamer-rtp",
+ "gstreamer-sdp",
+ "gstreamer-utils",
+ "gstreamer-video",
+ "gstreamer-webrtc",
+ "http",
+ "human_bytes",
+ "livekit-api",
+ "livekit-protocol",
+ "parse_link_header",
+ "regex",
+ "reqwest",
+ "serde",
+ "serde_json",
+ "thiserror",
+ "tokio",
+ "tokio-native-tls",
+ "tokio-stream",
+ "tracing",
+ "tracing-log",
+ "tracing-subscriber",
+ "url",
+ "url-escape",
+ "uuid",
+]
+
+[[package]]
+name = "gst-plugin-webrtc-signalling"
+version = "0.11.0"
+dependencies = [
+ "anyhow",
+ "async-tungstenite",
+ "clap",
+ "futures",
+ "gst-plugin-webrtc-signalling-protocol",
+ "pin-project-lite",
+ "serde",
+ "serde_json",
+ "test-log",
+ "thiserror",
+ "tokio",
+ "tokio-native-tls",
+ "tracing",
+ "tracing-log",
+ "tracing-subscriber",
+ "uuid",
+]
+
+[[package]]
+name = "gst-plugin-webrtc-signalling-protocol"
+version = "0.11.0"
+dependencies = [
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "gst-plugin-webrtchttp"
+version = "0.11.0"
+dependencies = [
+ "async-recursion",
+ "bytes",
+ "futures",
+ "gst-plugin-version-helper",
+ "gstreamer",
+ "gstreamer-sdp",
+ "gstreamer-webrtc",
+ "parse_link_header",
+ "reqwest",
+ "tokio",
+]
+
+[[package]]
+name = "gstreamer"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "cfg-if",
+ "futures-channel",
+ "futures-core",
+ "futures-util",
+ "glib",
+ "gstreamer-sys",
+ "itertools 0.11.0",
+ "libc",
+ "muldiv",
+ "num-integer",
+ "num-rational",
+ "option-operations",
+ "paste",
+ "pretty-hex",
+ "serde",
+ "serde_bytes",
+ "smallvec",
+ "thiserror",
+]
+
+[[package]]
+name = "gstreamer-app"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "futures-core",
+ "futures-sink",
+ "glib",
+ "gstreamer",
+ "gstreamer-app-sys",
+ "gstreamer-base",
+ "libc",
+]
+
+[[package]]
+name = "gstreamer-app-sys"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "glib-sys",
+ "gstreamer-base-sys",
+ "gstreamer-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "gstreamer-audio"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "cfg-if",
+ "glib",
+ "gstreamer",
+ "gstreamer-audio-sys",
+ "gstreamer-base",
+ "libc",
+]
+
+[[package]]
+name = "gstreamer-audio-sys"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "glib-sys",
+ "gobject-sys",
+ "gstreamer-base-sys",
+ "gstreamer-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "gstreamer-base"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "atomic_refcell",
+ "cfg-if",
+ "glib",
+ "gstreamer",
+ "gstreamer-base-sys",
+ "libc",
+]
+
+[[package]]
+name = "gstreamer-base-sys"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "glib-sys",
+ "gobject-sys",
+ "gstreamer-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "gstreamer-check"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "glib",
+ "gstreamer",
+ "gstreamer-check-sys",
+]
+
+[[package]]
+name = "gstreamer-check-sys"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "glib-sys",
+ "gobject-sys",
+ "gstreamer-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "gstreamer-gl"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "glib",
+ "gstreamer",
+ "gstreamer-base",
+ "gstreamer-gl-sys",
+ "gstreamer-video",
+ "libc",
+]
+
+[[package]]
+name = "gstreamer-gl-egl"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "glib",
+ "gstreamer",
+ "gstreamer-gl",
+ "gstreamer-gl-egl-sys",
+ "libc",
+]
+
+[[package]]
+name = "gstreamer-gl-egl-sys"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "glib-sys",
+ "gstreamer-gl-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "gstreamer-gl-sys"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "glib-sys",
+ "gobject-sys",
+ "gstreamer-base-sys",
+ "gstreamer-sys",
+ "gstreamer-video-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "gstreamer-gl-wayland"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "glib",
+ "gstreamer",
+ "gstreamer-gl",
+ "gstreamer-gl-wayland-sys",
+ "libc",
+]
+
+[[package]]
+name = "gstreamer-gl-wayland-sys"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "glib-sys",
+ "gstreamer-gl-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "gstreamer-gl-x11"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "glib",
+ "gstreamer",
+ "gstreamer-gl",
+ "gstreamer-gl-x11-sys",
+ "libc",
+]
+
+[[package]]
+name = "gstreamer-gl-x11-sys"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "glib-sys",
+ "gstreamer-gl-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "gstreamer-net"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "gio",
+ "glib",
+ "gstreamer",
+ "gstreamer-net-sys",
+]
+
+[[package]]
+name = "gstreamer-net-sys"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "gio-sys",
+ "glib-sys",
+ "gstreamer-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "gstreamer-pbutils"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "glib",
+ "gstreamer",
+ "gstreamer-audio",
+ "gstreamer-pbutils-sys",
+ "gstreamer-video",
+ "libc",
+ "thiserror",
+]
+
+[[package]]
+name = "gstreamer-pbutils-sys"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "glib-sys",
+ "gobject-sys",
+ "gstreamer-audio-sys",
+ "gstreamer-sys",
+ "gstreamer-video-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "gstreamer-rtp"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "glib",
+ "gstreamer",
+ "gstreamer-rtp-sys",
+ "libc",
+]
+
+[[package]]
+name = "gstreamer-rtp-sys"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "glib-sys",
+ "gstreamer-base-sys",
+ "gstreamer-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "gstreamer-sdp"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "glib",
+ "gstreamer",
+ "gstreamer-sdp-sys",
+]
+
+[[package]]
+name = "gstreamer-sdp-sys"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "glib-sys",
+ "gstreamer-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "gstreamer-sys"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "gstreamer-utils"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "gstreamer",
+ "gstreamer-app",
+ "gstreamer-video",
+ "thiserror",
+]
+
+[[package]]
+name = "gstreamer-video"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "cfg-if",
+ "futures-channel",
+ "glib",
+ "gstreamer",
+ "gstreamer-base",
+ "gstreamer-video-sys",
+ "libc",
+ "serde",
+]
+
+[[package]]
+name = "gstreamer-video-sys"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "glib-sys",
+ "gobject-sys",
+ "gstreamer-base-sys",
+ "gstreamer-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "gstreamer-webrtc"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "glib",
+ "gstreamer",
+ "gstreamer-sdp",
+ "gstreamer-webrtc-sys",
+ "libc",
+]
+
+[[package]]
+name = "gstreamer-webrtc-sys"
+version = "0.21.0"
+source = "git+https://gitlab.freedesktop.org/gstreamer/gstreamer-rs?branch=0.21#5022d85b8385814669aa797249dce94193eeccc0"
+dependencies = [
+ "glib-sys",
+ "gstreamer-sdp-sys",
+ "gstreamer-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "gtk4"
+version = "0.7.1"
+source = "git+https://github.com/gtk-rs/gtk4-rs?branch=0.7#9cf490a3afcad0a61233d4f65cfc2f5d2d369e9f"
+dependencies = [
+ "cairo-rs",
+ "field-offset",
+ "futures-channel",
+ "gdk-pixbuf",
+ "gdk4",
+ "gio",
+ "glib",
+ "graphene-rs",
+ "gsk4",
+ "gtk4-macros",
+ "gtk4-sys",
+ "libc",
+ "pango",
+]
+
+[[package]]
+name = "gtk4-macros"
+version = "0.7.1"
+source = "git+https://github.com/gtk-rs/gtk4-rs?branch=0.7#9cf490a3afcad0a61233d4f65cfc2f5d2d369e9f"
+dependencies = [
+ "anyhow",
+ "proc-macro-crate",
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "gtk4-sys"
+version = "0.7.1"
+source = "git+https://github.com/gtk-rs/gtk4-rs?branch=0.7#9cf490a3afcad0a61233d4f65cfc2f5d2d369e9f"
+dependencies = [
+ "cairo-sys-rs",
+ "gdk-pixbuf-sys",
+ "gdk4-sys",
+ "gio-sys",
+ "glib-sys",
+ "gobject-sys",
+ "graphene-sys",
+ "gsk4-sys",
+ "libc",
+ "pango-sys",
+ "system-deps",
+]
+
+[[package]]
+name = "h2"
+version = "0.3.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049"
+dependencies = [
+ "bytes",
+ "fnv",
+ "futures-core",
+ "futures-sink",
+ "futures-util",
+ "http",
+ "indexmap 1.9.3",
+ "slab",
+ "tokio",
+ "tokio-util",
+ "tracing",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
+
+[[package]]
+name = "hashbrown"
+version = "0.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a"
+
+[[package]]
+name = "headers"
+version = "0.3.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584"
+dependencies = [
+ "base64 0.13.1",
+ "bitflags 1.3.2",
+ "bytes",
+ "headers-core",
+ "http",
+ "httpdate",
+ "mime",
+ "sha1",
+]
+
+[[package]]
+name = "headers-core"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429"
+dependencies = [
+ "http",
+]
+
+[[package]]
+name = "heck"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
+
+[[package]]
+name = "hermit-abi"
+version = "0.1.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "hermit-abi"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b"
+
+[[package]]
+name = "hex"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
+
+[[package]]
+name = "hmac"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b"
+dependencies = [
+ "crypto-mac",
+ "digest 0.9.0",
+]
+
+[[package]]
+name = "hmac"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
+dependencies = [
+ "digest 0.10.7",
+]
+
+[[package]]
+name = "hostname"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867"
+dependencies = [
+ "libc",
+ "match_cfg",
+ "winapi",
+]
+
+[[package]]
+name = "hrtf"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73088c4a5d7c9d21ee942a54611696f247c4bafc85e9261bf8c409b6857e75be"
+dependencies = [
+ "byteorder",
+ "rubato",
+ "rustfft",
+]
+
+[[package]]
+name = "http"
+version = "0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482"
+dependencies = [
+ "bytes",
+ "fnv",
+ "itoa",
+]
+
+[[package]]
+name = "http-body"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1"
+dependencies = [
+ "bytes",
+ "http",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "httparse"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904"
+
+[[package]]
+name = "httpdate"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421"
+
+[[package]]
+name = "human_bytes"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "27e2b089f28ad15597b48d8c0a8fe94eeb1c1cb26ca99b6f66ac9582ae10c5e6"
+
+[[package]]
+name = "humantime"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
+
+[[package]]
+name = "hyper"
+version = "0.14.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468"
+dependencies = [
+ "bytes",
+ "futures-channel",
+ "futures-core",
+ "futures-util",
+ "h2",
+ "http",
+ "http-body",
+ "httparse",
+ "httpdate",
+ "itoa",
+ "pin-project-lite",
+ "socket2 0.4.9",
+ "tokio",
+ "tower-service",
+ "tracing",
+ "want",
+]
+
+[[package]]
+name = "hyper-proxy"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca815a891b24fdfb243fa3239c86154392b0953ee584aa1a2a1f66d20cbe75cc"
+dependencies = [
+ "bytes",
+ "futures",
+ "headers",
+ "http",
+ "hyper",
+ "tokio",
+ "tower-service",
+]
+
+[[package]]
+name = "hyper-rustls"
+version = "0.24.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97"
+dependencies = [
+ "futures-util",
+ "http",
+ "hyper",
+ "log",
+ "rustls",
+ "rustls-native-certs",
+ "tokio",
+ "tokio-rustls",
+]
+
+[[package]]
+name = "hyper-tls"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
+dependencies = [
+ "bytes",
+ "hyper",
+ "native-tls",
+ "tokio",
+ "tokio-native-tls",
+]
+
+[[package]]
+name = "hyphenation"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bcf4dd4c44ae85155502a52c48739c8a48185d1449fff1963cffee63c28a50f0"
+dependencies = [
+ "bincode",
+ "fst",
+ "hyphenation_commons",
+ "pocket-resources",
+ "serde",
+]
+
+[[package]]
+name = "hyphenation_commons"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5febe7a2ade5c7d98eb8b75f946c046b335324b06a14ea0998271504134c05bf"
+dependencies = [
+ "fst",
+ "serde",
+]
+
+[[package]]
+name = "iana-time-zone"
+version = "0.1.57"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613"
+dependencies = [
+ "android_system_properties",
+ "core-foundation-sys",
+ "iana-time-zone-haiku",
+ "js-sys",
+ "wasm-bindgen",
+ "windows",
+]
+
+[[package]]
+name = "iana-time-zone-haiku"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "ident_case"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
+
+[[package]]
+name = "idna"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8"
+dependencies = [
+ "matches",
+ "unicode-bidi",
+ "unicode-normalization",
+]
+
+[[package]]
+name = "idna"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6"
+dependencies = [
+ "unicode-bidi",
+ "unicode-normalization",
+]
+
+[[package]]
+name = "idna"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c"
+dependencies = [
+ "unicode-bidi",
+ "unicode-normalization",
+]
+
+[[package]]
+name = "if-addrs"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cbc0fa01ffc752e9dbc72818cdb072cd028b86be5e09dd04c5a643704fe101a9"
+dependencies = [
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "image"
+version = "0.24.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711"
+dependencies = [
+ "bytemuck",
+ "byteorder",
+ "color_quant",
+ "num-rational",
+ "num-traits",
+]
+
+[[package]]
+name = "image_hasher"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f9e64a8c472ea9f81ac448e3b488fd82dcdfce6434cf880882bf36bfb5c268a"
+dependencies = [
+ "base64 0.21.2",
+ "image",
+ "rustdct",
+ "serde",
+ "transpose",
+]
+
+[[package]]
+name = "imgref"
+version = "1.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b2cf49df1085dcfb171460e4592597b84abe50d900fb83efb6e41b20fefd6c2c"
+
+[[package]]
+name = "indexmap"
+version = "1.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
+dependencies = [
+ "autocfg",
+ "hashbrown 0.12.3",
+ "serde",
+]
+
+[[package]]
+name = "indexmap"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d"
+dependencies = [
+ "equivalent",
+ "hashbrown 0.14.0",
+ "serde",
+]
+
+[[package]]
+name = "interpolate_name"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4b35f4a811037cfdcd44c5db40678464b2d5d248fc1abeeaaa125b370d47f17"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "ipnet"
+version = "2.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6"
+
+[[package]]
+name = "is-terminal"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b"
+dependencies = [
+ "hermit-abi 0.3.2",
+ "rustix",
+ "windows-sys",
+]
+
+[[package]]
+name = "iso8601"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "924e5d73ea28f59011fec52a0d12185d496a9b075d360657aed2a5707f701153"
+dependencies = [
+ "nom",
+]
+
+[[package]]
+name = "itertools"
+version = "0.10.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
+dependencies = [
+ "either",
+]
+
+[[package]]
+name = "itertools"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57"
+dependencies = [
+ "either",
+]
+
+[[package]]
+name = "itoa"
+version = "1.0.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38"
+
+[[package]]
+name = "jobserver"
+version = "0.1.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "js-sys"
+version = "0.3.64"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a"
+dependencies = [
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "jsonwebtoken"
+version = "8.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378"
+dependencies = [
+ "base64 0.21.2",
+ "ring",
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "khronos-egl"
+version = "5.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d1382b16c04aeb821453d6215a3c80ba78f24c6595c5aa85653378aabe0c83e3"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "lazy_static"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+
+[[package]]
+name = "lewton"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "777b48df9aaab155475a83a7df3070395ea1ac6902f5cd062b8f2b028075c030"
+dependencies = [
+ "byteorder",
+ "ogg",
+ "tinyvec",
+]
+
+[[package]]
+name = "libc"
+version = "0.2.147"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
+
+[[package]]
+name = "libfuzzer-sys"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fcf184a4b6b274f82a5df6b357da6055d3e82272327bba281c28bbba6f1664ef"
+dependencies = [
+ "arbitrary",
+ "cc",
+]
+
+[[package]]
+name = "libloading"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d580318f95776505201b28cf98eb1fa5e4be3b689633ba6a3e6cd880ff22d8cb"
+dependencies = [
+ "cfg-if",
+ "windows-sys",
+]
+
+[[package]]
+name = "libm"
+version = "0.2.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4"
+
+[[package]]
+name = "libmdns"
+version = "0.7.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b04ae6b56b3b19ade26f0e7e7c1360a1713514f326c5ed0797cf2c109c9e010"
+dependencies = [
+ "byteorder",
+ "futures-util",
+ "hostname",
+ "if-addrs",
+ "log",
+ "multimap",
+ "nix",
+ "rand",
+ "socket2 0.4.9",
+ "thiserror",
+ "tokio",
+ "winapi",
+]
+
+[[package]]
+name = "librespot"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ea4c9952ef48968f8184a4a87f8576982426ebe623342d5a28f7d9c4978e4a44"
+dependencies = [
+ "base64 0.13.1",
+ "env_logger 0.9.3",
+ "futures-util",
+ "getopts",
+ "hex",
+ "hyper",
+ "librespot-audio",
+ "librespot-connect",
+ "librespot-core",
+ "librespot-discovery",
+ "librespot-metadata",
+ "librespot-playback",
+ "librespot-protocol",
+ "log",
+ "rpassword",
+ "sha-1",
+ "thiserror",
+ "tokio",
+ "url",
+]
+
+[[package]]
+name = "librespot-audio"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c176a31355e1ea8e0b9c4ced19df4947bfe4770661c25c142b6fba2365940d9d"
+dependencies = [
+ "aes-ctr",
+ "byteorder",
+ "bytes",
+ "futures-util",
+ "librespot-core",
+ "log",
+ "tempfile",
+ "tokio",
+]
+
+[[package]]
+name = "librespot-connect"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ffafb6a443e9445ccb3d5d591573b5b1da3c89a9b8846c63ba2c3710210d3ec"
+dependencies = [
+ "form_urlencoded",
+ "futures-util",
+ "librespot-core",
+ "librespot-discovery",
+ "librespot-playback",
+ "librespot-protocol",
+ "log",
+ "protobuf",
+ "rand",
+ "serde",
+ "serde_json",
+ "tokio",
+ "tokio-stream",
+]
+
+[[package]]
+name = "librespot-core"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "046349f25888e644bf02d9c5de0164b2a493d29aa4ce18e1ad0b756da9b55d6d"
+dependencies = [
+ "aes",
+ "base64 0.13.1",
+ "byteorder",
+ "bytes",
+ "form_urlencoded",
+ "futures-core",
+ "futures-util",
+ "hmac 0.11.0",
+ "http",
+ "httparse",
+ "hyper",
+ "hyper-proxy",
+ "librespot-protocol",
+ "log",
+ "num-bigint",
+ "num-integer",
+ "num-traits",
+ "once_cell",
+ "pbkdf2",
+ "priority-queue",
+ "protobuf",
+ "rand",
+ "serde",
+ "serde_json",
+ "sha-1",
+ "shannon",
+ "thiserror",
+ "tokio",
+ "tokio-stream",
+ "tokio-util",
+ "url",
+ "uuid",
+ "vergen",
+]
+
+[[package]]
+name = "librespot-discovery"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2aa877d18f6150364012cb4be5682d62d7c712c88bae2d0d01720fd7c15e2f06"
+dependencies = [
+ "aes-ctr",
+ "base64 0.13.1",
+ "form_urlencoded",
+ "futures-core",
+ "hmac 0.11.0",
+ "hyper",
+ "libmdns",
+ "librespot-core",
+ "log",
+ "rand",
+ "serde_json",
+ "sha-1",
+ "thiserror",
+ "tokio",
+]
+
+[[package]]
+name = "librespot-metadata"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6b80361fcbcb5092056fd47c08c34d5d51b08385d8efb6941c0d3e46d032c21c"
+dependencies = [
+ "async-trait",
+ "byteorder",
+ "librespot-core",
+ "librespot-protocol",
+ "log",
+ "protobuf",
+]
+
+[[package]]
+name = "librespot-playback"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5190a0b9bcc7f70ee4196a6b4a1c731d405ca130d4a6fcd4c561cfdde8b7cfb7"
+dependencies = [
+ "byteorder",
+ "futures-executor",
+ "futures-util",
+ "lewton",
+ "librespot-audio",
+ "librespot-core",
+ "librespot-metadata",
+ "log",
+ "ogg",
+ "parking_lot",
+ "rand",
+ "rand_distr",
+ "shell-words",
+ "thiserror",
+ "tokio",
+ "zerocopy",
+]
+
+[[package]]
+name = "librespot-protocol"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5d6d3ac6196ac0ea67bbe039f56d6730a5d8b31502ef9bce0f504ed729dcb39f"
+dependencies = [
+ "glob",
+ "protobuf",
+ "protobuf-codegen-pure",
+]
+
+[[package]]
+name = "libsodium-sys"
+version = "0.2.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6b779387cd56adfbc02ea4a668e704f729be8d6a6abd2c27ca5ee537849a92fd"
+dependencies = [
+ "cc",
+ "libc",
+ "pkg-config",
+ "walkdir",
+]
+
+[[package]]
+name = "libwebp-sys2"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "74f9c6964201c51319f16a796dc947a73961646eba49f584187b12de9970d077"
+dependencies = [
+ "cc",
+ "cfg-if",
+ "libc",
+ "pkg-config",
+ "vcpkg",
+]
+
+[[package]]
+name = "linux-raw-sys"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503"
+
+[[package]]
+name = "livekit-api"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e0d4c5d731bb0da7b313c982ee32300e7caf1ee0595c0d1e57d00f43248c0c47"
+dependencies = [
+ "futures-util",
+ "jsonwebtoken",
+ "livekit-protocol",
+ "log",
+ "parking_lot",
+ "prost",
+ "reqwest",
+ "serde",
+ "serde_json",
+ "sha2",
+ "thiserror",
+ "tokio",
+ "tokio-tungstenite",
+ "url",
+]
+
+[[package]]
+name = "livekit-protocol"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "81bd731959a8dccc17248499b9952693f593bee4bb79186bf60d180b4097be59"
+dependencies = [
+ "futures-util",
+ "parking_lot",
+ "prost",
+ "prost-types",
+ "tokio",
+]
+
+[[package]]
+name = "lock_api"
+version = "0.4.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16"
+dependencies = [
+ "autocfg",
+ "scopeguard",
+]
+
+[[package]]
+name = "log"
+version = "0.4.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4"
+
+[[package]]
+name = "m3u8-rs"
+version = "5.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d39af8845edca961e3286dcbafeb9e6407d3df6a616ef086847162d46f438d75"
+dependencies = [
+ "chrono",
+ "nom",
+]
+
+[[package]]
+name = "match_cfg"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4"
+
+[[package]]
+name = "matchers"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"
+dependencies = [
+ "regex-automata 0.1.10",
+]
+
+[[package]]
+name = "matches"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5"
+
+[[package]]
+name = "maybe-rayon"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519"
+dependencies = [
+ "cfg-if",
+ "rayon",
+]
+
+[[package]]
+name = "md-5"
+version = "0.10.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca"
+dependencies = [
+ "digest 0.10.7",
+]
+
+[[package]]
+name = "memchr"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
+
+[[package]]
+name = "memoffset"
+version = "0.6.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "memoffset"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "mime"
+version = "0.3.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
+
+[[package]]
+name = "minimal-lexical"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
+
+[[package]]
+name = "miniz_oxide"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7"
+dependencies = [
+ "adler",
+ "simd-adler32",
+]
+
+[[package]]
+name = "mio"
+version = "0.8.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2"
+dependencies = [
+ "libc",
+ "wasi 0.11.0+wasi-snapshot-preview1",
+ "windows-sys",
+]
+
+[[package]]
+name = "more-asserts"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fafa6961cabd9c63bcd77a45d7e3b7f3b552b70417831fb0f56db717e72407e"
+
+[[package]]
+name = "muldiv"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "956787520e75e9bd233246045d19f42fb73242759cc57fba9611d940ae96d4b0"
+
+[[package]]
+name = "multimap"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "nanorand"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3"
+dependencies = [
+ "getrandom",
+]
+
+[[package]]
+name = "nasm-rs"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fe4d98d0065f4b1daf164b3eafb11974c94662e5e2396cf03f32d0bb5c17da51"
+dependencies = [
+ "rayon",
+]
+
+[[package]]
+name = "native-tls"
+version = "0.2.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e"
+dependencies = [
+ "lazy_static",
+ "libc",
+ "log",
+ "openssl",
+ "openssl-probe",
+ "openssl-sys",
+ "schannel",
+ "security-framework",
+ "security-framework-sys",
+ "tempfile",
+]
+
+[[package]]
+name = "new_debug_unreachable"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
+
+[[package]]
+name = "nix"
+version = "0.23.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f3790c00a0150112de0f4cd161e3d7fc4b2d8a5542ffc35f099a2562aecb35c"
+dependencies = [
+ "bitflags 1.3.2",
+ "cc",
+ "cfg-if",
+ "libc",
+ "memoffset 0.6.5",
+]
+
+[[package]]
+name = "nnnoiseless"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "23d377ce2fb579ed5c14cfa0d39e70849030fdf673d6d1a764cadb2dfbb02a50"
+dependencies = [
+ "once_cell",
+ "rustfft",
+]
+
+[[package]]
+name = "nom"
+version = "7.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
+dependencies = [
+ "memchr",
+ "minimal-lexical",
+]
+
+[[package]]
+name = "noop_proc_macro"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8"
+
+[[package]]
+name = "nu-ansi-term"
+version = "0.46.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"
+dependencies = [
+ "overload",
+ "winapi",
+]
+
+[[package]]
+name = "num-bigint"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f"
+dependencies = [
+ "autocfg",
+ "num-integer",
+ "num-traits",
+ "rand",
+]
+
+[[package]]
+name = "num-complex"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d"
+dependencies = [
+ "num-traits",
+]
+
+[[package]]
+name = "num-derive"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "num-derive"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e6a0fd4f737c707bd9086cc16c925f294943eb62eb71499e9fd4cf71f8b9f4e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.28",
+]
+
+[[package]]
+name = "num-integer"
+version = "0.1.45"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
+dependencies = [
+ "autocfg",
+ "num-traits",
+]
+
+[[package]]
+name = "num-rational"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0"
+dependencies = [
+ "autocfg",
+ "num-bigint",
+ "num-integer",
+ "num-traits",
+ "serde",
+]
+
+[[package]]
+name = "num-traits"
+version = "0.2.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2"
+dependencies = [
+ "autocfg",
+ "libm",
+]
+
+[[package]]
+name = "num_cpus"
+version = "1.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
+dependencies = [
+ "hermit-abi 0.3.2",
+ "libc",
+]
+
+[[package]]
+name = "object"
+version = "0.31.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "ogg"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6951b4e8bf21c8193da321bcce9c9dd2e13c858fe078bf9054a288b419ae5d6e"
+dependencies = [
+ "byteorder",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
+
+[[package]]
+name = "opaque-debug"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
+
+[[package]]
+name = "openssl"
+version = "0.10.56"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "729b745ad4a5575dd06a3e1af1414bd330ee561c01b3899eb584baeaa8def17e"
+dependencies = [
+ "bitflags 1.3.2",
+ "cfg-if",
+ "foreign-types",
+ "libc",
+ "once_cell",
+ "openssl-macros",
+ "openssl-sys",
+]
+
+[[package]]
+name = "openssl-macros"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.28",
+]
+
+[[package]]
+name = "openssl-probe"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
+
+[[package]]
+name = "openssl-sys"
+version = "0.9.91"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "866b5f16f90776b9bb8dc1e1802ac6f0513de3a7a7465867bfbc563dc737faac"
+dependencies = [
+ "cc",
+ "libc",
+ "pkg-config",
+ "vcpkg",
+]
+
+[[package]]
+name = "option-operations"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7c26d27bb1aeab65138e4bf7666045169d1717febcc9ff870166be8348b223d0"
+dependencies = [
+ "paste",
+]
+
+[[package]]
+name = "outref"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4030760ffd992bef45b0ae3f10ce1aba99e33464c90d14dd7c039884963ddc7a"
+
+[[package]]
+name = "overload"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
+
+[[package]]
+name = "pango"
+version = "0.18.1"
+source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.18#854c9b0592fb3a3865caa3e8538a5dda98399c0c"
+dependencies = [
+ "gio",
+ "glib",
+ "libc",
+ "once_cell",
+ "pango-sys",
+]
+
+[[package]]
+name = "pango-sys"
+version = "0.18.1"
+source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.18#854c9b0592fb3a3865caa3e8538a5dda98399c0c"
+dependencies = [
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "pangocairo"
+version = "0.18.1"
+source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.18#854c9b0592fb3a3865caa3e8538a5dda98399c0c"
+dependencies = [
+ "cairo-rs",
+ "glib",
+ "libc",
+ "pango",
+ "pangocairo-sys",
+]
+
+[[package]]
+name = "pangocairo-sys"
+version = "0.18.1"
+source = "git+https://github.com/gtk-rs/gtk-rs-core?branch=0.18#854c9b0592fb3a3865caa3e8538a5dda98399c0c"
+dependencies = [
+ "cairo-sys-rs",
+ "glib-sys",
+ "libc",
+ "pango-sys",
+ "system-deps",
+]
+
+[[package]]
+name = "parking_lot"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
+dependencies = [
+ "lock_api",
+ "parking_lot_core",
+]
+
+[[package]]
+name = "parking_lot_core"
+version = "0.9.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447"
+dependencies = [
+ "backtrace",
+ "cfg-if",
+ "libc",
+ "petgraph",
+ "redox_syscall 0.3.5",
+ "smallvec",
+ "thread-id",
+ "windows-targets",
+]
+
+[[package]]
+name = "parse_link_header"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3687fe9debbbf2a019f381a8bc6b42049b22647449b39af54b3013985c0cf6de"
+dependencies = [
+ "http",
+ "lazy_static",
+ "regex",
+ "url",
+]
+
+[[package]]
+name = "paste"
+version = "1.0.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c"
+
+[[package]]
+name = "pbkdf2"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa"
+dependencies = [
+ "crypto-mac",
+ "hmac 0.11.0",
+]
+
+[[package]]
+name = "percent-encoding"
+version = "2.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
+
+[[package]]
+name = "petgraph"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4"
+dependencies = [
+ "fixedbitset",
+ "indexmap 1.9.3",
+]
+
+[[package]]
+name = "pin-project"
+version = "1.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422"
+dependencies = [
+ "pin-project-internal",
+]
+
+[[package]]
+name = "pin-project-internal"
+version = "1.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.28",
+]
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "12cc1b0bf1727a77a54b6654e7b5f1af8604923edc8b81885f8ec92f9e3f0a05"
+
+[[package]]
+name = "pin-utils"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
+
+[[package]]
+name = "pkg-config"
+version = "0.3.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
+
+[[package]]
+name = "png"
+version = "0.17.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "59871cc5b6cce7eaccca5a802b4173377a1c2ba90654246789a8fa2334426d11"
+dependencies = [
+ "bitflags 1.3.2",
+ "crc32fast",
+ "fdeflate",
+ "flate2",
+ "miniz_oxide",
+]
+
+[[package]]
+name = "pocket-resources"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c135f38778ad324d9e9ee68690bac2c1a51f340fdf96ca13e2ab3914eb2e51d8"
+
+[[package]]
+name = "polling"
+version = "2.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce"
+dependencies = [
+ "autocfg",
+ "bitflags 1.3.2",
+ "cfg-if",
+ "concurrent-queue",
+ "libc",
+ "log",
+ "pin-project-lite",
+ "windows-sys",
+]
+
+[[package]]
+name = "ppv-lite86"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
+
+[[package]]
+name = "pretty-hex"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5"
+
+[[package]]
+name = "pretty_assertions"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66"
+dependencies = [
+ "diff",
+ "yansi",
+]
+
+[[package]]
+name = "primal-check"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9df7f93fd637f083201473dab4fee2db4c429d32e55e3299980ab3957ab916a0"
+dependencies = [
+ "num-integer",
+]
+
+[[package]]
+name = "priority-queue"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fff39edfcaec0d64e8d0da38564fad195d2d51b680940295fcc307366e101e61"
+dependencies = [
+ "autocfg",
+ "indexmap 1.9.3",
+]
+
+[[package]]
+name = "proc-macro-crate"
+version = "1.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919"
+dependencies = [
+ "once_cell",
+ "toml_edit",
+]
+
+[[package]]
+name = "proc-macro-error"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
+dependencies = [
+ "proc-macro-error-attr",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+ "version_check",
+]
+
+[[package]]
+name = "proc-macro-error-attr"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "version_check",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.66"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "prost"
+version = "0.11.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd"
+dependencies = [
+ "bytes",
+ "prost-derive",
+]
+
+[[package]]
+name = "prost-derive"
+version = "0.11.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4"
+dependencies = [
+ "anyhow",
+ "itertools 0.10.5",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "prost-types"
+version = "0.11.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13"
+dependencies = [
+ "prost",
+]
+
+[[package]]
+name = "protobuf"
+version = "2.28.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94"
+
+[[package]]
+name = "protobuf-codegen"
+version = "2.28.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "033460afb75cf755fcfc16dfaed20b86468082a2ea24e05ac35ab4a099a017d6"
+dependencies = [
+ "protobuf",
+]
+
+[[package]]
+name = "protobuf-codegen-pure"
+version = "2.28.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "95a29399fc94bcd3eeaa951c715f7bea69409b2445356b00519740bcd6ddd865"
+dependencies = [
+ "protobuf",
+ "protobuf-codegen",
+]
+
+[[package]]
+name = "psl-types"
+version = "2.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33cb294fe86a74cbcf50d4445b37da762029549ebeea341421c7c70370f86cac"
+
+[[package]]
+name = "publicsuffix"
+version = "2.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "96a8c1bda5ae1af7f99a2962e49df150414a43d62404644d98dd5c3a93d07457"
+dependencies = [
+ "idna 0.3.0",
+ "psl-types",
+]
+
+[[package]]
+name = "quick-xml"
+version = "0.30.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956"
+dependencies = [
+ "memchr",
+ "serde",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "rand"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
+dependencies = [
+ "libc",
+ "rand_chacha",
+ "rand_core",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
+dependencies = [
+ "ppv-lite86",
+ "rand_core",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
+dependencies = [
+ "getrandom",
+]
+
+[[package]]
+name = "rand_distr"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31"
+dependencies = [
+ "num-traits",
+ "rand",
+]
+
+[[package]]
+name = "raptorq"
+version = "1.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "655b020bbf5c89791160a30f0d4706d8ec7aa5718d6a198f6df19c400e4f4470"
+
+[[package]]
+name = "rav1e"
+version = "0.6.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "16c383692a5e7abd9f6d1eddb1a5e0269f859392387883361bb09e5555852ec1"
+dependencies = [
+ "arbitrary",
+ "arg_enum_proc_macro",
+ "arrayvec",
+ "av1-grain",
+ "bitstream-io",
+ "built",
+ "cc",
+ "cfg-if",
+ "interpolate_name",
+ "itertools 0.10.5",
+ "libc",
+ "libfuzzer-sys",
+ "log",
+ "maybe-rayon",
+ "nasm-rs",
+ "new_debug_unreachable",
+ "noop_proc_macro",
+ "num-derive 0.3.3",
+ "num-traits",
+ "once_cell",
+ "paste",
+ "rand",
+ "rand_chacha",
+ "rust_hawktracer",
+ "rustc_version",
+ "simd_helpers",
+ "system-deps",
+ "thiserror",
+ "v_frame",
+]
+
+[[package]]
+name = "rayon"
+version = "1.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b"
+dependencies = [
+ "either",
+ "rayon-core",
+]
+
+[[package]]
+name = "rayon-core"
+version = "1.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d"
+dependencies = [
+ "crossbeam-channel",
+ "crossbeam-deque",
+ "crossbeam-utils",
+ "num_cpus",
+]
+
+[[package]]
+name = "realfft"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d7695c87f31dc3644760f23fb59a3fed47659703abf76cf2d111f03b9e712342"
+dependencies = [
+ "rustfft",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.2.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
+dependencies = [
+ "bitflags 1.3.2",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29"
+dependencies = [
+ "bitflags 1.3.2",
+]
+
+[[package]]
+name = "regex"
+version = "1.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-automata 0.3.6",
+ "regex-syntax 0.7.4",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
+dependencies = [
+ "regex-syntax 0.6.29",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.3.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax 0.7.4",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.6.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
+
+[[package]]
+name = "regex-syntax"
+version = "0.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2"
+
+[[package]]
+name = "reqwest"
+version = "0.11.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55"
+dependencies = [
+ "async-compression",
+ "base64 0.21.2",
+ "bytes",
+ "cookie",
+ "cookie_store",
+ "encoding_rs",
+ "futures-core",
+ "futures-util",
+ "h2",
+ "http",
+ "http-body",
+ "hyper",
+ "hyper-tls",
+ "ipnet",
+ "js-sys",
+ "log",
+ "mime",
+ "native-tls",
+ "once_cell",
+ "percent-encoding",
+ "pin-project-lite",
+ "serde",
+ "serde_json",
+ "serde_urlencoded",
+ "tokio",
+ "tokio-native-tls",
+ "tokio-util",
+ "tower-service",
+ "url",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+ "winreg",
+]
+
+[[package]]
+name = "rgb"
+version = "0.8.36"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "20ec2d3e3fc7a92ced357df9cebd5a10b6fb2aa1ee797bf7e9ce2f17dffc8f59"
+dependencies = [
+ "bytemuck",
+]
+
+[[package]]
+name = "ring"
+version = "0.16.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc"
+dependencies = [
+ "cc",
+ "libc",
+ "once_cell",
+ "spin 0.5.2",
+ "untrusted",
+ "web-sys",
+ "winapi",
+]
+
+[[package]]
+name = "rpassword"
+version = "6.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2bf099a1888612545b683d2661a1940089f6c2e5a8e38979b2159da876bfd956"
+dependencies = [
+ "libc",
+ "serde",
+ "serde_json",
+ "winapi",
+]
+
+[[package]]
+name = "rubato"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "610bbefcfef7f43cbe275995b6077b74f34480efce293c30327bf44fdad871ed"
+dependencies = [
+ "log",
+ "num-complex",
+ "num-integer",
+ "num-traits",
+ "realfft",
+]
+
+[[package]]
+name = "rust_hawktracer"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3480a29b927f66c6e06527be7f49ef4d291a01d694ec1fe85b0de71d6b02ac1"
+dependencies = [
+ "rust_hawktracer_normal_macro",
+ "rust_hawktracer_proc_macro",
+]
+
+[[package]]
+name = "rust_hawktracer_normal_macro"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a570059949e1dcdc6f35228fa389f54c2c84dfe0c94c05022baacd56eacd2e9"
+
+[[package]]
+name = "rust_hawktracer_proc_macro"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb626abdbed5e93f031baae60d72032f56bc964e11ac2ff65f2ba3ed98d6d3e1"
+
+[[package]]
+name = "rustc-demangle"
+version = "0.1.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
+
+[[package]]
+name = "rustc_version"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
+dependencies = [
+ "semver",
+]
+
+[[package]]
+name = "rustdct"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b61555105d6a9bf98797c063c362a1d24ed8ab0431655e38f1cf51e52089551"
+dependencies = [
+ "rustfft",
+]
+
+[[package]]
+name = "rustfft"
+version = "6.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e17d4f6cbdb180c9f4b2a26bbf01c4e647f1e1dea22fe8eb9db54198b32f9434"
+dependencies = [
+ "num-complex",
+ "num-integer",
+ "num-traits",
+ "primal-check",
+ "strength_reduce",
+ "transpose",
+ "version_check",
+]
+
+[[package]]
+name = "rustix"
+version = "0.38.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "172891ebdceb05aa0005f533a6cbfca599ddd7d966f6f5d4d9b2e70478e70399"
+dependencies = [
+ "bitflags 2.3.3",
+ "errno",
+ "libc",
+ "linux-raw-sys",
+ "windows-sys",
+]
+
+[[package]]
+name = "rustls"
+version = "0.21.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d1feddffcfcc0b33f5c6ce9a29e341e4cd59c3f78e7ee45f4a40c038b1d6cbb"
+dependencies = [
+ "log",
+ "ring",
+ "rustls-webpki",
+ "sct",
+]
+
+[[package]]
+name = "rustls-native-certs"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00"
+dependencies = [
+ "openssl-probe",
+ "rustls-pemfile",
+ "schannel",
+ "security-framework",
+]
+
+[[package]]
+name = "rustls-pemfile"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2"
+dependencies = [
+ "base64 0.21.2",
+]
+
+[[package]]
+name = "rustls-webpki"
+version = "0.101.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "261e9e0888cba427c3316e6322805653c9425240b6fd96cee7cb671ab70ab8d0"
+dependencies = [
+ "ring",
+ "untrusted",
+]
+
+[[package]]
+name = "ryu"
+version = "1.0.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741"
+
+[[package]]
+name = "same-file"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "schannel"
+version = "0.1.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88"
+dependencies = [
+ "windows-sys",
+]
+
+[[package]]
+name = "scopeguard"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
+
+[[package]]
+name = "sct"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4"
+dependencies = [
+ "ring",
+ "untrusted",
+]
+
+[[package]]
+name = "security-framework"
+version = "2.9.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de"
+dependencies = [
+ "bitflags 1.3.2",
+ "core-foundation",
+ "core-foundation-sys",
+ "libc",
+ "security-framework-sys",
+]
+
+[[package]]
+name = "security-framework-sys"
+version = "2.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
+[[package]]
+name = "semver"
+version = "1.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "serde"
+version = "1.0.183"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32ac8da02677876d532745a130fc9d8e6edfa81a269b107c5b00829b91d8eb3c"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_bytes"
+version = "0.11.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.183"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aafe972d60b0b9bee71a91b92fee2d4fb3c9d7e8f6b179aa99f27203d99a4816"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.28",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.104"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c"
+dependencies = [
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "serde_spanned"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "serde_urlencoded"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
+dependencies = [
+ "form_urlencoded",
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "serde_with"
+version = "3.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1402f54f9a3b9e2efe71c1cea24e648acce55887983553eeb858cf3115acfd49"
+dependencies = [
+ "base64 0.21.2",
+ "chrono",
+ "hex",
+ "indexmap 1.9.3",
+ "indexmap 2.0.0",
+ "serde",
+ "serde_json",
+ "serde_with_macros",
+ "time 0.3.25",
+]
+
+[[package]]
+name = "serde_with_macros"
+version = "3.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9197f1ad0e3c173a0222d3c4404fb04c3afe87e962bcb327af73e8301fa203c7"
+dependencies = [
+ "darling",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.28",
+]
+
+[[package]]
+name = "sha-1"
+version = "0.9.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6"
+dependencies = [
+ "block-buffer 0.9.0",
+ "cfg-if",
+ "cpufeatures",
+ "digest 0.9.0",
+ "opaque-debug",
+]
+
+[[package]]
+name = "sha1"
+version = "0.10.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest 0.10.7",
+]
+
+[[package]]
+name = "sha2"
+version = "0.10.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest 0.10.7",
+]
+
+[[package]]
+name = "shannon"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ea5b41c9427b56caa7b808cb548a04fb50bb5b9e98590b53f28064ff4174561"
+dependencies = [
+ "byteorder",
+]
+
+[[package]]
+name = "sharded-slab"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31"
+dependencies = [
+ "lazy_static",
+]
+
+[[package]]
+name = "shell-words"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde"
+
+[[package]]
+name = "signal-hook"
+version = "0.3.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801"
+dependencies = [
+ "libc",
+ "signal-hook-registry",
+]
+
+[[package]]
+name = "signal-hook-registry"
+version = "1.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "signature"
+version = "1.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c"
+
+[[package]]
+name = "simd-adler32"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
+
+[[package]]
+name = "simd_helpers"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6"
+dependencies = [
+ "quote",
+]
+
+[[package]]
+name = "slab"
+version = "0.4.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "smallvec"
+version = "1.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9"
+
+[[package]]
+name = "smawk"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f67ad224767faa3c7d8b6d91985b78e70a1324408abcb1cfcc2be4c06bc06043"
+
+[[package]]
+name = "socket2"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662"
+dependencies = [
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "socket2"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877"
+dependencies = [
+ "libc",
+ "windows-sys",
+]
+
+[[package]]
+name = "sodiumoxide"
+version = "0.2.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e26be3acb6c2d9a7aac28482586a7856436af4cfe7100031d219de2d2ecb0028"
+dependencies = [
+ "ed25519",
+ "libc",
+ "libsodium-sys",
+ "serde",
+]
+
+[[package]]
+name = "spin"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
+
+[[package]]
+name = "spin"
+version = "0.9.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
+dependencies = [
+ "lock_api",
+]
+
+[[package]]
+name = "strength_reduce"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fe895eb47f22e2ddd4dabc02bce419d2e643c8e3b585c78158b349195bc24d82"
+
+[[package]]
+name = "strsim"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
+
+[[package]]
+name = "subtle"
+version = "2.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
+
+[[package]]
+name = "syn"
+version = "1.0.109"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "syn"
+version = "2.0.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "system-deps"
+version = "6.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "30c2de8a4d8f4b823d634affc9cd2a74ec98c53a756f317e529a48046cbf71f3"
+dependencies = [
+ "cfg-expr",
+ "heck",
+ "pkg-config",
+ "toml 0.7.6",
+ "version-compare",
+]
+
+[[package]]
+name = "target-lexicon"
+version = "0.12.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a"
+
+[[package]]
+name = "tempfile"
+version = "3.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc02fddf48964c42031a0b3fe0428320ecf3a73c401040fc0096f97794310651"
+dependencies = [
+ "cfg-if",
+ "fastrand",
+ "redox_syscall 0.3.5",
+ "rustix",
+ "windows-sys",
+]
+
+[[package]]
+name = "termcolor"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "test-log"
+version = "0.2.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9601d162c1d77e62c1ea0bc8116cd1caf143ce3af947536c3c9052a1677fe0c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "test-with"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ea821854cf861c2bd28c19253b5b036fa4a6990745897bdb18a511b787c0187"
+dependencies = [
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "regex",
+ "syn 2.0.28",
+]
+
+[[package]]
+name = "textwrap"
+version = "0.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d"
+dependencies = [
+ "hyphenation",
+ "smawk",
+ "unicode-linebreak",
+ "unicode-width",
+]
+
+[[package]]
+name = "thiserror"
+version = "1.0.44"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90"
+dependencies = [
+ "thiserror-impl",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "1.0.44"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.28",
+]
+
+[[package]]
+name = "thread-id"
+version = "4.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3ee93aa2b8331c0fec9091548843f2c90019571814057da3b783f9de09349d73"
+dependencies = [
+ "libc",
+ "redox_syscall 0.2.16",
+ "winapi",
+]
+
+[[package]]
+name = "thread_local"
+version = "1.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+]
+
+[[package]]
+name = "time"
+version = "0.1.45"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a"
+dependencies = [
+ "libc",
+ "wasi 0.10.0+wasi-snapshot-preview1",
+ "winapi",
+]
+
+[[package]]
+name = "time"
+version = "0.3.25"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b0fdd63d58b18d663fbdf70e049f00a22c8e42be082203be7f26589213cd75ea"
+dependencies = [
+ "deranged",
+ "itoa",
+ "serde",
+ "time-core",
+ "time-macros",
+]
+
+[[package]]
+name = "time-core"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb"
+
+[[package]]
+name = "time-macros"
+version = "0.2.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd"
+dependencies = [
+ "time-core",
+]
+
+[[package]]
+name = "tinyvec"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50"
+dependencies = [
+ "tinyvec_macros",
+]
+
+[[package]]
+name = "tinyvec_macros"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
+
+[[package]]
+name = "tokio"
+version = "1.30.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2d3ce25f50619af8b0aec2eb23deebe84249e19e2ddd393a6e16e3300a6dadfd"
+dependencies = [
+ "backtrace",
+ "bytes",
+ "libc",
+ "mio",
+ "num_cpus",
+ "parking_lot",
+ "pin-project-lite",
+ "signal-hook-registry",
+ "socket2 0.5.3",
+ "tokio-macros",
+ "windows-sys",
+]
+
+[[package]]
+name = "tokio-macros"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.28",
+]
+
+[[package]]
+name = "tokio-native-tls"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2"
+dependencies = [
+ "native-tls",
+ "tokio",
+]
+
+[[package]]
+name = "tokio-rustls"
+version = "0.24.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081"
+dependencies = [
+ "rustls",
+ "tokio",
+]
+
+[[package]]
+name = "tokio-stream"
+version = "0.1.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842"
+dependencies = [
+ "futures-core",
+ "pin-project-lite",
+ "tokio",
+]
+
+[[package]]
+name = "tokio-tungstenite"
+version = "0.19.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec509ac96e9a0c43427c74f003127d953a265737636129424288d27cb5c4b12c"
+dependencies = [
+ "futures-util",
+ "log",
+ "native-tls",
+ "tokio",
+ "tokio-native-tls",
+ "tungstenite 0.19.0",
+]
+
+[[package]]
+name = "tokio-util"
+version = "0.7.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d"
+dependencies = [
+ "bytes",
+ "futures-core",
+ "futures-sink",
+ "pin-project-lite",
+ "tokio",
+ "tracing",
+]
+
+[[package]]
+name = "toml"
+version = "0.5.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "toml"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542"
+dependencies = [
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "toml_edit",
+]
+
+[[package]]
+name = "toml_datetime"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "toml_edit"
+version = "0.19.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a"
+dependencies = [
+ "indexmap 2.0.0",
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "winnow",
+]
+
+[[package]]
+name = "tower"
+version = "0.4.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c"
+dependencies = [
+ "futures-core",
+ "futures-util",
+ "pin-project",
+ "pin-project-lite",
+ "tokio",
+ "tower-layer",
+ "tower-service",
+ "tracing",
+]
+
+[[package]]
+name = "tower-layer"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0"
+
+[[package]]
+name = "tower-service"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52"
+
+[[package]]
+name = "tracing"
+version = "0.1.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8"
+dependencies = [
+ "cfg-if",
+ "log",
+ "pin-project-lite",
+ "tracing-attributes",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-attributes"
+version = "0.1.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.28",
+]
+
+[[package]]
+name = "tracing-core"
+version = "0.1.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a"
+dependencies = [
+ "once_cell",
+ "valuable",
+]
+
+[[package]]
+name = "tracing-log"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922"
+dependencies = [
+ "lazy_static",
+ "log",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-subscriber"
+version = "0.3.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77"
+dependencies = [
+ "matchers",
+ "nu-ansi-term",
+ "once_cell",
+ "regex",
+ "sharded-slab",
+ "smallvec",
+ "thread_local",
+ "tracing",
+ "tracing-core",
+ "tracing-log",
+]
+
+[[package]]
+name = "transpose"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6522d49d03727ffb138ae4cbc1283d3774f0d10aa7f9bf52e6784c45daf9b23"
+dependencies = [
+ "num-integer",
+ "strength_reduce",
+]
+
+[[package]]
+name = "try-lock"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed"
+
+[[package]]
+name = "tungstenite"
+version = "0.19.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "15fba1a6d6bb030745759a9a2a588bfe8490fc8b4751a277db3a0be1c9ebbf67"
+dependencies = [
+ "byteorder",
+ "bytes",
+ "data-encoding",
+ "http",
+ "httparse",
+ "log",
+ "native-tls",
+ "rand",
+ "sha1",
+ "thiserror",
+ "url",
+ "utf-8",
+]
+
+[[package]]
+name = "tungstenite"
+version = "0.20.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e862a1c4128df0112ab625f55cd5c934bcb4312ba80b39ae4b4835a3fd58e649"
+dependencies = [
+ "byteorder",
+ "bytes",
+ "data-encoding",
+ "http",
+ "httparse",
+ "log",
+ "native-tls",
+ "rand",
+ "sha1",
+ "thiserror",
+ "url",
+ "utf-8",
+]
+
+[[package]]
+name = "typenum"
+version = "1.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba"
+
+[[package]]
+name = "unicode-bidi"
+version = "0.3.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460"
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c"
+
+[[package]]
+name = "unicode-linebreak"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f"
+
+[[package]]
+name = "unicode-normalization"
+version = "0.1.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921"
+dependencies = [
+ "tinyvec",
+]
+
+[[package]]
+name = "unicode-width"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
+
+[[package]]
+name = "untrusted"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
+
+[[package]]
+name = "url"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb"
+dependencies = [
+ "form_urlencoded",
+ "idna 0.4.0",
+ "percent-encoding",
+]
+
+[[package]]
+name = "url-escape"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "44e0ce4d1246d075ca5abec4b41d33e87a6054d08e2366b63205665e950db218"
+dependencies = [
+ "percent-encoding",
+]
+
+[[package]]
+name = "urlencoding"
+version = "2.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da"
+
+[[package]]
+name = "utf-8"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
+
+[[package]]
+name = "utf8parse"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
+
+[[package]]
+name = "uuid"
+version = "1.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d"
+dependencies = [
+ "getrandom",
+]
+
+[[package]]
+name = "v_frame"
+version = "0.3.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85db69f33d00031c1b07f7292e56317d5aa9475bdbd3d27ef18f3633438a697e"
+dependencies = [
+ "cfg-if",
+ "noop_proc_macro",
+ "num-derive 0.4.0",
+ "num-traits",
+ "rust_hawktracer",
+]
+
+[[package]]
+name = "va_list"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "350bd5ef744f978a387cd08ce514be4e3766746496f355d59d68af36f52d36da"
+
+[[package]]
+name = "valuable"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
+
+[[package]]
+name = "vcpkg"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
+
+[[package]]
+name = "vergen"
+version = "3.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7141e445af09c8919f1d5f8a20dae0b20c3b57a45dee0d5823c6ed5d237f15a"
+dependencies = [
+ "bitflags 1.3.2",
+ "chrono",
+ "rustc_version",
+]
+
+[[package]]
+name = "version-compare"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "579a42fc0b8e0c63b76519a339be31bed574929511fa53c1a3acae26eb258f29"
+
+[[package]]
+name = "version_check"
+version = "0.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
+
+[[package]]
+name = "vsimd"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64"
+
+[[package]]
+name = "waker-fn"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca"
+
+[[package]]
+name = "walkdir"
+version = "2.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698"
+dependencies = [
+ "same-file",
+ "winapi-util",
+]
+
+[[package]]
+name = "want"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"
+dependencies = [
+ "try-lock",
+]
+
+[[package]]
+name = "wasi"
+version = "0.10.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
+
+[[package]]
+name = "wasi"
+version = "0.11.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.87"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342"
+dependencies = [
+ "cfg-if",
+ "wasm-bindgen-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.87"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd"
+dependencies = [
+ "bumpalo",
+ "log",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.28",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-futures"
+version = "0.4.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.87"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.87"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.28",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.87"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1"
+
+[[package]]
+name = "web-sys"
+version = "0.3.64"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "weezl"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb"
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-util"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
+[[package]]
+name = "windows"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.48.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f"
+dependencies = [
+ "windows_aarch64_gnullvm",
+ "windows_aarch64_msvc",
+ "windows_i686_gnu",
+ "windows_i686_msvc",
+ "windows_x86_64_gnu",
+ "windows_x86_64_gnullvm",
+ "windows_x86_64_msvc",
+]
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
+
+[[package]]
+name = "winnow"
+version = "0.5.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "acaaa1190073b2b101e15083c38ee8ec891b5e05cbee516521e94ec008f61e64"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "winreg"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "xattr"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "xml-rs"
+version = "0.8.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "47430998a7b5d499ccee752b41567bc3afc57e1327dc855b1a2aa44ce29b5fa1"
+
+[[package]]
+name = "xmlparser"
+version = "0.13.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4d25c75bf9ea12c4040a97f829154768bbbce366287e2dc044af160cd79a13fd"
+
+[[package]]
+name = "xmltree"
+version = "0.10.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d7d8a75eaf6557bb84a65ace8609883db44a29951042ada9b393151532e41fcb"
+dependencies = [
+ "xml-rs",
+]
+
+[[package]]
+name = "yansi"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec"
+
+[[package]]
+name = "zerocopy"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f3b9c234616391070b0b173963ebc65a9195068e7ed3731c6edac2ec45ebe106"
+dependencies = [
+ "byteorder",
+ "zerocopy-derive",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f7f3a471f98d0a61c34322fbbfd10c384b07687f680d4119813713f72308d91"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.28",
+]
+
+[[package]]
+name = "zeroize"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9"
diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/rs/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/rs/default.nix
new file mode 100644
index 000000000000..708a735939af
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gstreamer/rs/default.nix
@@ -0,0 +1,256 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, fetchpatch
+, rustPlatform
+, meson
+, ninja
+, python3
+, pkg-config
+, rustc
+, cargo
+, cargo-c
+, nasm
+, gstreamer
+, gst-plugins-base
+, gst-plugins-bad
+, gtk4
+, cairo
+, csound
+, dav1d
+, libsodium
+, libwebp
+, openssl
+, pango
+, Security
+, gst-plugins-good
+, nix-update-script
+# specifies a limited subset of plugins to build (the default `null` means all plugins supported on the stdenv platform)
+, plugins ? null
+# Checks meson.is_cross_build(), so even canExecute isn't enough.
+, enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform && plugins == null
+, hotdoc
+}:
+
+let
+  # populated from meson_options.txt (manually for now, but that might change in the future)
+  validPlugins = {
+    # audio
+    audiofx = [ ];
+    claxon = [ ];
+    csound = [ csound ];
+    lewton = [ ];
+    spotify = [ ];
+
+    # generic
+    file = [ ];
+    sodium = [ libsodium ];
+    threadshare = [ ];
+
+    # mux
+    flavors = [ ];
+    fmp4 = [ ];
+    mp4 = [ ];
+
+    # net
+    aws = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
+    hlssink3 = [ ];
+    ndi = [ ];
+    onvif = [ pango ];
+    raptorq = [ ];
+    reqwest = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
+    rtp = [ ];
+    webrtc = [ gst-plugins-bad openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
+    webrtchttp = [ gst-plugins-bad openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
+
+    # text
+    textahead = [ ];
+    json = [ ];
+    regex = [ ];
+    textwrap = [ ];
+
+    # utils
+    fallbackswitch = [ gtk4 ];
+    livesync = [ gtk4 ];
+    togglerecord = [ gtk4 ];
+    tracers = [ ];
+    uriplaylistbin = [ ];
+
+    # video
+    cdg = [ ];
+    closedcaption = [ pango ];
+    dav1d = [ dav1d ];
+    ffv1 = [ ];
+    gif = [ ];
+    gtk4 = [ gtk4 ];
+    hsv = [ ];
+    png = [ ];
+    rav1e = [ ];
+    videofx = [ cairo ];
+    webp = [ libwebp ];
+  };
+
+  selectedPlugins = if plugins != null then lib.unique (lib.sort lib.lessThan plugins) else lib.subtractLists (
+    [
+      "csound" # tests have weird failure on x86, does not currently work on arm or darwin
+      "livesync" # tests have suspicious intermittent failure, see https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/357
+    ] ++ lib.optionals stdenv.isAarch64 [
+      "raptorq" # pointer alignment failure in tests on aarch64
+    ] ++ lib.optionals stdenv.isDarwin [
+      "reqwest" # tests hang on darwin
+      "threadshare" # tests cannot bind to localhost on darwin
+      "webp" # not supported on darwin (upstream crate issue)
+    ] ++ lib.optionals (!gst-plugins-base.glEnabled) [
+      # these require gstreamer-gl
+      "gtk4"
+      "livesync"
+      "fallbackswitch"
+      "togglerecord"
+    ]
+  ) (lib.attrNames validPlugins);
+
+  invalidPlugins = lib.subtractLists (lib.attrNames validPlugins) selectedPlugins;
+
+  # TODO: figure out what must be done about this upstream - related lu-zero/cargo-c#323 lu-zero/cargo-c#138
+  cargo-c' = (cargo-c.__spliced.buildHost or cargo-c).overrideAttrs (oldAttrs: {
+    patches = (oldAttrs.patches or []) ++ [
+      (fetchpatch {
+        name = "cargo-c-test-rlib-fix.patch";
+        url = "https://github.com/lu-zero/cargo-c/commit/8421f2da07cd066d2ae8afbb027760f76dc9ee6c.diff";
+        hash = "sha256-eZSR4DKSbS5HPpb9Kw8mM2ZWg7Y92gZQcaXUEu1WNj0=";
+        revert = true;
+      })
+    ];
+  });
+in
+  assert lib.assertMsg (invalidPlugins == [])
+    "Invalid gst-plugins-rs plugin${lib.optionalString (lib.length invalidPlugins > 1) "s"}: ${lib.concatStringsSep ", " invalidPlugins}";
+
+stdenv.mkDerivation rec {
+  pname = "gst-plugins-rs";
+  version = "0.11.0+fixup";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "gstreamer";
+    repo = "gst-plugins-rs";
+    rev = version;
+    hash = "sha256-nvDvcY/WyVhcxitcoqgEUT8A1synZqxG2e51ct7Fgss=";
+    # TODO: temporary workaround for case-insensitivity problems with color-name crate - https://github.com/annymosse/color-name/pull/2
+    postFetch = ''
+      sedSearch="$(cat <<\EOF | sed -ze 's/\n/\\n/g'
+      \[\[package\]\]
+      name = "color-name"
+      version = "\([^"\n]*\)"
+      source = "registry+https://github.com/rust-lang/crates.io-index"
+      checksum = "[^"\n]*"
+      EOF
+      )"
+      sedReplace="$(cat <<\EOF | sed -ze 's/\n/\\n/g'
+      [[package]]
+      name = "color-name"
+      version = "\1"
+      source = "git+https://github.com/lilyinstarlight/color-name#cac0ed5b7d2e0682c08c9bfd13089d5494e81b9a"
+      EOF
+      )"
+      sed -i -ze "s|$sedSearch|$sedReplace|g" $out/Cargo.lock
+    '';
+  };
+
+  cargoDeps = rustPlatform.importCargoLock {
+    lockFile = ./Cargo.lock;
+    outputHashes = {
+      "cairo-rs-0.18.1" = "sha256-k+YIAZXxejbxPQqbUU91qbx2AR98gTrseknLHtNZDEE=";
+      "color-name-1.1.0" = "sha256-RfMStbe2wX5qjPARHIFHlSDKjzx8DwJ+RjzyltM5K7A=";
+      "ffv1-0.0.0" = "sha256-af2VD00tMf/hkfvrtGrHTjVJqbl+VVpLaR0Ry+2niJE=";
+      "flavors-0.2.0" = "sha256-zBa0X75lXnASDBam9Kk6w7K7xuH9fP6rmjWZBUB5hxk=";
+      "gdk4-0.7.1" = "sha256-UMGmZivVdvmKRAjIGlj6pjDxwfNJyz8/6C0eYH1OOw4=";
+      "gstreamer-0.21.0" = "sha256-2uilK8wYG8e59fdL3q+kmixc1zw+EBwqvGs/EgfCGhk=";
+    };
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    rustPlatform.cargoSetupHook
+    meson
+    ninja
+    python3
+    python3.pkgs.tomli
+    pkg-config
+    rustc
+    cargo
+    cargo-c'
+    nasm
+  ] ++ lib.optionals enableDocumentation [
+    hotdoc
+  ];
+
+  buildInputs = [
+    gstreamer
+    gst-plugins-base
+  ] ++ lib.concatMap (plugin: lib.getAttr plugin validPlugins) selectedPlugins;
+
+  checkInputs = [
+    gst-plugins-good
+    gst-plugins-bad
+  ];
+
+  mesonFlags = (
+    map (plugin: lib.mesonEnable plugin true) selectedPlugins
+  ) ++ [
+    (lib.mesonOption "sodium-source" "system")
+    (lib.mesonEnable "doc" enableDocumentation)
+  ];
+
+  # turn off all auto plugins since we use a list of plugins we generate
+  mesonAutoFeatures = "disabled";
+
+  doCheck = true;
+
+  # csound lib dir must be manually specified for it to build
+  # webrtc and webrtchttp plugins are the only that need gstreamer-webrtc (from gst-plugins-bad, a heavy set)
+  preConfigure = ''
+    export CARGO_BUILD_JOBS=$NIX_BUILD_CORES
+
+    patchShebangs dependencies.py
+  '' + lib.optionalString (lib.elem "csound" selectedPlugins) ''
+    export CSOUND_LIB_DIR=${lib.getLib csound}/lib
+  '' + lib.optionalString (lib.mutuallyExclusive [ "webrtc" "webrtchttp" ] selectedPlugins) ''
+    sed -i "/\['gstreamer-webrtc-1\.0', 'gst-plugins-bad', 'gstwebrtc_dep', 'gstwebrtc'\]/d" meson.build
+  '' + lib.optionalString (!gst-plugins-base.glEnabled) ''
+    sed -i "/\['gstreamer-gl-1\.0', 'gst-plugins-base', 'gst_gl_dep', 'gstgl'\]/d" meson.build
+  '';
+
+  # run tests ourselves to avoid meson timing out by default
+  checkPhase = ''
+    runHook preCheck
+
+    meson test --no-rebuild --verbose --timeout-multiplier 12
+
+    runHook postCheck
+  '';
+
+  doInstallCheck = (lib.elem "webp" selectedPlugins) && !stdenv.hostPlatform.isStatic &&
+    stdenv.hostPlatform.isElf;
+  installCheckPhase = ''
+    runHook preInstallCheck
+    readelf -a $out/lib/gstreamer-1.0/libgstrswebp.so | grep -F 'Shared library: [libwebpdemux.so'
+    runHook postInstallCheck
+  '';
+
+  passthru.updateScript = nix-update-script {
+    # use numbered releases rather than gstreamer-* releases
+    extraArgs = [ "--version-regex" "([0-9.]+)" ];
+  };
+
+  meta = with lib; {
+    description = "GStreamer plugins written in Rust";
+    homepage = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs";
+    license = with licenses; [ mpl20 asl20 mit lgpl21Plus ];
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ lilyinstarlight ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/rtsp-server/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/rtsp-server/default.nix
new file mode 100644
index 000000000000..6b0dfcc8598f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gstreamer/rtsp-server/default.nix
@@ -0,0 +1,66 @@
+{ stdenv
+, lib
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, python3
+, gettext
+, gobject-introspection
+, gst-plugins-base
+, gst-plugins-bad
+# Checks meson.is_cross_build(), so even canExecute isn't enough.
+, enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gst-rtsp-server";
+  version = "1.22.8";
+
+  src = fetchurl {
+    url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz";
+    hash = "sha256-cFF3BRwimXbxca3Nerl2Kua8xLt33DCKC9gKY9psM38=";
+  };
+
+  outputs = [
+    "out"
+    "dev"
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    gettext
+    gobject-introspection
+    pkg-config
+    python3
+  ] ++ lib.optionals enableDocumentation [
+    hotdoc
+  ];
+
+  buildInputs = [
+    gst-plugins-base
+    gst-plugins-bad
+  ];
+
+  mesonFlags = [
+    "-Dexamples=disabled" # requires many dependencies and probably not useful for our users
+    (lib.mesonEnable "doc" enableDocumentation)
+  ];
+
+  postPatch = ''
+    patchShebangs \
+      scripts/extract-release-date-from-doap-file.py
+  '';
+
+  meta = with lib; {
+    description = "GStreamer RTSP server";
+    homepage = "https://gstreamer.freedesktop.org";
+    longDescription = ''
+      A library on top of GStreamer for building an RTSP server.
+    '';
+    license = licenses.lgpl2Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ bkchr lilyinstarlight ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/ugly/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/ugly/default.nix
new file mode 100644
index 000000000000..cc78a6ec0f80
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gstreamer/ugly/default.nix
@@ -0,0 +1,98 @@
+{ stdenv
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, python3
+, gst-plugins-base
+, orc
+, gettext
+, a52dec
+, libcdio
+, libdvdread
+, libmad
+, libmpeg2
+, x264
+, libintl
+, lib
+, opencore-amr
+, IOKit
+, CoreFoundation
+, DiskArbitration
+, enableGplPlugins ? true
+# Checks meson.is_cross_build(), so even canExecute isn't enough.
+, enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gst-plugins-ugly";
+  version = "1.22.8";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz";
+    hash = "sha256-B2HZa6UI4BwCcYgbJoKMK//X2K/VCHIhnwiPdVslLKc=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    gettext
+    pkg-config
+    python3
+  ] ++ lib.optionals enableDocumentation [
+    hotdoc
+  ];
+
+  buildInputs = [
+    gst-plugins-base
+    orc
+    libintl
+    opencore-amr
+  ] ++ lib.optionals enableGplPlugins [
+    a52dec
+    libcdio
+    libdvdread
+    libmad
+    libmpeg2
+    x264
+  ] ++ lib.optionals stdenv.isDarwin [
+    IOKit
+    CoreFoundation
+    DiskArbitration
+  ];
+
+  mesonFlags = [
+    "-Dsidplay=disabled" # sidplay / sidplay/player.h isn't packaged in nixpkgs as of writing
+    (lib.mesonEnable "doc" enableDocumentation)
+  ] ++ (if enableGplPlugins then [
+    "-Dgpl=enabled"
+  ] else [
+    "-Da52dec=disabled"
+    "-Dcdio=disabled"
+    "-Ddvdread=disabled"
+    "-Dmpeg2dec=disabled"
+    "-Dsidplay=disabled"
+    "-Dx264=disabled"
+  ]);
+
+  postPatch = ''
+    patchShebangs \
+      scripts/extract-release-date-from-doap-file.py
+  '';
+
+  meta = with lib; {
+    description = "Gstreamer Ugly Plugins";
+    homepage = "https://gstreamer.freedesktop.org";
+    longDescription = ''
+      a set of plug-ins that have good quality and correct functionality,
+      but distributing them might pose problems.  The license on either
+      the plug-ins or the supporting libraries might not be how we'd
+      like. The code might be widely known to present patent problems.
+    '';
+    license = if enableGplPlugins then licenses.gpl2Plus else licenses.lgpl2Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ matthewbauer lilyinstarlight ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/vaapi/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/vaapi/default.nix
new file mode 100644
index 000000000000..b3a7142edae9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gstreamer/vaapi/default.nix
@@ -0,0 +1,91 @@
+{ lib, stdenv
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, gst-plugins-base
+, bzip2
+, libva
+, wayland
+, wayland-protocols
+, libdrm
+, udev
+, xorg
+, libGLU
+, libGL
+, gstreamer
+, gst-plugins-bad
+, nasm
+, libvpx
+, python3
+# Checks meson.is_cross_build(), so even canExecute isn't enough.
+, enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gstreamer-vaapi";
+  version = "1.22.8";
+
+  src = fetchurl {
+    url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz";
+    hash = "sha256-Epi6NHpwxCuIzev5G2Wf6gKxu3Jp6r+OKePAvVgniSg=";
+  };
+
+  outputs = [
+    "out"
+    "dev"
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    python3
+    bzip2
+    wayland
+  ] ++ lib.optionals enableDocumentation [
+    hotdoc
+  ];
+
+  buildInputs = [
+    gstreamer
+    gst-plugins-base
+    gst-plugins-bad
+    libva
+    wayland
+    wayland-protocols
+    libdrm
+    udev
+    xorg.libX11
+    xorg.libXext
+    xorg.libXv
+    xorg.libXrandr
+    xorg.libSM
+    xorg.libICE
+    nasm
+    libvpx
+  ] ++ lib.optionals (!stdenv.isDarwin) [
+    libGL
+    libGLU
+  ];
+
+  strictDeps = true;
+
+  mesonFlags = [
+    "-Dexamples=disabled" # requires many dependencies and probably not useful for our users
+    (lib.mesonEnable "doc" enableDocumentation)
+  ];
+
+  postPatch = ''
+    patchShebangs \
+      scripts/extract-release-date-from-doap-file.py
+  '';
+
+  meta = with lib; {
+    description = "Set of VAAPI GStreamer Plug-ins";
+    homepage = "https://gstreamer.freedesktop.org";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ lilyinstarlight ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/viperfx/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/viperfx/default.nix
new file mode 100644
index 000000000000..83c7d75e98c1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gstreamer/viperfx/default.nix
@@ -0,0 +1,41 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, pkg-config
+, wrapGAppsHook
+, gst_all_1
+, cmake
+}:
+stdenv.mkDerivation rec {
+  pname = "gst-plugins-viperfx";
+  version = "unstable-2020-9-20";
+
+  src = fetchFromGitHub {
+    owner = "Audio4Linux";
+    repo = "gst-plugin-viperfx";
+    rev = "a5c1b03dfe1ab0822b717a5f9392e9f1237fdba0";
+    sha256 = "sha256-0so4jV56nl3tZHuZpvtyMrpOZ4tNJ59Pyj6zbV5bJ5Y=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config wrapGAppsHook ];
+
+  propagatedBuildInputs = [
+    gst_all_1.gstreamer
+    gst_all_1.gst-plugins-base
+  ];
+
+  installPhase = ''
+    runHook preInstall
+    install -D libgstviperfx.so $out/lib/gstreamer-1.0/libgstviperfx.so
+    install -D $src/COPYING $out/share/licenses/gst-plugins-viperfx/LICENSE
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "ViPER FX core wrapper plug-in for GStreamer1";
+    homepage = "https://github.com/Audio4Linux/gst-plugin-viperfx";
+    license = licenses.unfreeRedistributable;
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ rewine ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gtdialog/default.nix b/nixpkgs/pkgs/development/libraries/gtdialog/default.nix
new file mode 100644
index 000000000000..d7e60659a5ea
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtdialog/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl, cdk, unzip, gtk2, glib, ncurses, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "gtdialog";
+  version = "1.4";
+
+  src = fetchurl {
+    url = "https://foicica.com/gtdialog/download/gtdialog_${version}.zip";
+    sha256 = "sha256-0+WBr1IZIhQjxOsKO/yuXjaTRWPObhMdGqgibcpXGtI=";
+  };
+
+  nativeBuildInputs = [ pkg-config unzip ];
+  buildInputs = [
+    cdk
+    gtk2
+    glib
+    ncurses
+  ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  meta = with lib; {
+    description = "Cross-platform helper for creating interactive dialogs";
+    license = licenses.mit;
+    maintainers = with maintainers; [ raskin ];
+    platforms = platforms.linux;
+    homepage = "http://foicica.com/gtdialog";
+    downloadPage = "http://foicica.com/gtdialog/download";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gtest/default.nix b/nixpkgs/pkgs/development/libraries/gtest/default.nix
new file mode 100644
index 000000000000..80013e3613d0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtest/default.nix
@@ -0,0 +1,46 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, ninja
+, static ? stdenv.hostPlatform.isStatic,
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gtest";
+  version = "1.12.1";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "googletest";
+    rev = "release-${version}";
+    hash = "sha256-W+OxRTVtemt2esw4P7IyGWXOonUN5ZuscjvzqkYvZbM=";
+  };
+
+  patches = [
+    ./fix-cmake-config-includedir.patch
+  ];
+
+  nativeBuildInputs = [ cmake ninja ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
+  ] ++ lib.optionals (
+    (stdenv.cc.isGNU && (lib.versionOlder stdenv.cc.version "11.0"))
+    || (stdenv.cc.isClang && (lib.versionOlder stdenv.cc.version "16.0"))
+  ) [
+    # Enable C++17 support
+    # https://github.com/google/googletest/issues/3081
+    "-DCMAKE_CXX_STANDARD=17"
+  ];
+
+  meta = with lib; {
+    description = "Google's framework for writing C++ tests";
+    homepage = "https://github.com/google/googletest";
+    license = licenses.bsd3;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ ivan-tkatchev ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gtest/fix-cmake-config-includedir.patch b/nixpkgs/pkgs/development/libraries/gtest/fix-cmake-config-includedir.patch
new file mode 100644
index 000000000000..573884fdcbcd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtest/fix-cmake-config-includedir.patch
@@ -0,0 +1,34 @@
+diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt
+index 5c1f0daf..ed8aae58 100644
+--- a/googlemock/CMakeLists.txt
++++ b/googlemock/CMakeLists.txt
+@@ -108,10 +108,10 @@ if (DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11")
+   string(REPLACE ";" "$<SEMICOLON>" dirs "${gmock_build_include_dirs}")
+   target_include_directories(gmock SYSTEM INTERFACE
+     "$<BUILD_INTERFACE:${dirs}>"
+-    "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>")
++    "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
+   target_include_directories(gmock_main SYSTEM INTERFACE
+     "$<BUILD_INTERFACE:${dirs}>"
+-    "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>")
++    "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
+ endif()
+ 
+ ########################################################################
+diff --git a/googletest/CMakeLists.txt b/googletest/CMakeLists.txt
+index aa00a5f3..50434fed 100644
+--- a/googletest/CMakeLists.txt
++++ b/googletest/CMakeLists.txt
+@@ -134,10 +134,10 @@ if (DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11")
+   string(REPLACE ";" "$<SEMICOLON>" dirs "${gtest_build_include_dirs}")
+   target_include_directories(gtest SYSTEM INTERFACE
+     "$<BUILD_INTERFACE:${dirs}>"
+-    "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>")
++    "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
+   target_include_directories(gtest_main SYSTEM INTERFACE
+     "$<BUILD_INTERFACE:${dirs}>"
+-    "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>")
++    "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
+ endif()
+ if(CMAKE_SYSTEM_NAME MATCHES "QNX")
+   target_link_libraries(gtest PUBLIC regex)
diff --git a/nixpkgs/pkgs/development/libraries/gthree/default.nix b/nixpkgs/pkgs/development/libraries/gthree/default.nix
new file mode 100644
index 000000000000..f8e50f384590
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gthree/default.nix
@@ -0,0 +1,74 @@
+{ lib, stdenv
+, fetchFromGitHub
+, fetchpatch
+, ninja
+, meson
+, pkg-config
+, gobject-introspection
+, gtk-doc
+, docbook-xsl-nons
+, docbook_xml_dtd_43
+, glib
+, gtk3
+, graphene
+, libepoxy
+, json-glib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gthree";
+  version = "0.9.0";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchFromGitHub {
+    owner = "alexlarsson";
+    repo = "gthree";
+    rev = version;
+    sha256 = "09fcnjc3j21lh5fjf067wm35sb4qni4vgzing61kixnn2shy79iy";
+  };
+
+  patches = [
+    # Add option for disabling examples
+    (fetchpatch {
+      url = "https://github.com/alexlarsson/gthree/commit/75f05c40aba9d5f603d8a3c490c3406c1fe06776.patch";
+      sha256 = "PBwLz4DLhC+7BtypVTFMFiF3hKAJeskU3XBKFHa3a84=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    ninja
+    meson
+    pkg-config
+    gtk-doc
+    docbook-xsl-nons
+    docbook_xml_dtd_43
+    gobject-introspection
+  ];
+
+  buildInputs = [
+    libepoxy
+    json-glib
+  ];
+
+  propagatedBuildInputs = [
+    glib
+    gtk3
+    graphene
+  ];
+
+  mesonFlags = [
+    "-Dgtk_doc=${if stdenv.isDarwin then "false" else "true"}"
+    # Data for examples is useless when the example programs are not installed.
+    "-Dexamples=false"
+  ];
+
+  meta = with lib; {
+    description = "GObject/GTK port of three.js";
+    homepage = "https://github.com/alexlarsson/gthree";
+    license = licenses.mit;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.unix;
+    broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/gthree.x86_64-darwin
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gtk-engine-bluecurve/default.nix b/nixpkgs/pkgs/development/libraries/gtk-engine-bluecurve/default.nix
new file mode 100644
index 000000000000..43cf8675735f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtk-engine-bluecurve/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchurl, pkg-config, intltool, gtk2 }:
+
+stdenv.mkDerivation rec {
+  pname = "gtk-engine-bluecurve";
+  version = "1.0";
+
+  src = fetchurl {
+    url = "https://ftp.gnome.org/pub/gnome/teams/art.gnome.org/archive/themes/gtk2/GTK2-Wonderland-Engine-${version}.tar.bz2";
+    sha256 = "1nim3lhmbs5mw1hh76d9258c1p923854x2j6i30gmny812c7qjnm";
+  };
+
+  nativeBuildInputs = [ pkg-config intltool ];
+
+  buildInputs = [ gtk2 ];
+
+  meta = {
+    description = "Original Bluecurve engine from Red Hat's artwork package";
+    license = lib.licenses.gpl2;
+    platforms = lib.platforms.linux;
+    maintainers = [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gtk-engine-murrine/default.nix b/nixpkgs/pkgs/development/libraries/gtk-engine-murrine/default.nix
new file mode 100644
index 000000000000..5cbd4302dbaa
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtk-engine-murrine/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchurl, pkg-config, intltool, gtk2 }:
+
+stdenv.mkDerivation rec {
+  pname = "gtk-engine-murrine";
+  version = "0.98.2";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "129cs5bqw23i76h3nmc29c9mqkm9460iwc8vkl7hs4xr07h8mip9";
+  };
+
+  strictDeps = true;
+  nativeBuildInputs = [ pkg-config intltool ];
+  buildInputs = [ gtk2 ];
+
+  meta = {
+    description = "A very flexible theme engine";
+    homepage = "https://gitlab.gnome.org/Archive/murrine";
+    license = lib.licenses.lgpl3;
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gtk-engines/default.nix b/nixpkgs/pkgs/development/libraries/gtk-engines/default.nix
new file mode 100644
index 000000000000..d722143b210e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtk-engines/default.nix
@@ -0,0 +1,20 @@
+{ lib, stdenv, fetchurl, pkg-config, intltool, gtk2 }:
+
+stdenv.mkDerivation rec {
+  pname = "gtk-engines";
+  version = "2.20.2";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/gtk-engines/${lib.versions.majorMinor version}/gtk-engines-${version}.tar.bz2";
+    sha256 = "1db65pb0j0mijmswrvpgkdabilqd23x22d95hp5kwxvcramq1dhm";
+  };
+
+  nativeBuildInputs = [ pkg-config intltool ];
+  buildInputs = [ gtk2 ];
+
+  meta = {
+    description = "Theme engines for GTK 2";
+    license = lib.licenses.lgpl21Plus;
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gtk-frdp/default.nix b/nixpkgs/pkgs/development/libraries/gtk-frdp/default.nix
new file mode 100644
index 000000000000..72cefea7e59a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtk-frdp/default.nix
@@ -0,0 +1,59 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, meson
+, ninja
+, pkg-config
+, vala
+, gobject-introspection
+, glib
+, gtk3
+, freerdp
+, fuse3
+, unstableGitUpdater
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gtk-frdp";
+  version = "unstable-2023-09-16";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.gnome.org";
+    owner = "GNOME";
+    repo = pname;
+    rev = "62fc62c5ccb7634f0bc87c57a4673877c24c94ed";
+    sha256 = "H+ebFWjpmp4Ua22Bd6K3LsxNHqEbtpawnzA5ry8+XFc=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    vala
+    gobject-introspection
+  ];
+
+  buildInputs = [
+    glib
+    gtk3
+    freerdp
+    fuse3
+  ];
+
+  passthru = {
+    updateScript = unstableGitUpdater { };
+  };
+
+  env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [
+    "-DTARGET_OS_IPHONE=0"
+    "-DTARGET_OS_WATCH=0"
+  ]);
+
+  meta = with lib; {
+    homepage = "https://gitlab.gnome.org/GNOME/gtk-frdp";
+    description = "RDP viewer widget for GTK";
+    maintainers = teams.gnome.members;
+    license = licenses.lgpl3Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gtk-layer-shell/default.nix b/nixpkgs/pkgs/development/libraries/gtk-layer-shell/default.nix
new file mode 100644
index 000000000000..5ecfc299edd4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtk-layer-shell/default.nix
@@ -0,0 +1,66 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, meson
+, ninja
+, pkg-config
+, gtk-doc
+, docbook-xsl-nons
+, docbook_xml_dtd_43
+, wayland-scanner
+, wayland
+, gtk3
+, gobject-introspection
+, vala
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "gtk-layer-shell";
+  version = "0.8.2";
+
+  outputs = [ "out" "dev" "devdoc" ];
+  outputBin = "devdoc"; # for demo
+
+  src = fetchFromGitHub {
+    owner = "wmww";
+    repo = "gtk-layer-shell";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-8wpfoZcgusJdEbKGZ02UtOOcSogMTNP9Lm+ujo/eKdA=";
+  };
+
+  strictDeps = true;
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gobject-introspection
+    gtk-doc
+    docbook-xsl-nons
+    docbook_xml_dtd_43
+    vala
+    wayland-scanner
+  ];
+
+  buildInputs = [
+    wayland
+    gtk3
+  ];
+
+  mesonFlags = [
+    "-Ddocs=true"
+    "-Dexamples=true"
+  ];
+
+  meta = with lib; {
+    description = "A library to create panels and other desktop components for Wayland using the Layer Shell protocol";
+    homepage = "https://github.com/wmww/gtk-layer-shell";
+    license = licenses.lgpl3Plus;
+    maintainers = with maintainers; [ eonpatapon donovanglover ];
+    platforms = platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/gtk-mac-integration/default.nix b/nixpkgs/pkgs/development/libraries/gtk-mac-integration/default.nix
new file mode 100644
index 000000000000..f9d41916ecd6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtk-mac-integration/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitLab, autoreconfHook, pkg-config, glib, gtk-doc, gtk, gobject-introspection }:
+
+stdenv.mkDerivation rec {
+  pname = "gtk-mac-integration";
+  version = "3.0.1";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.gnome.org";
+    owner = "GNOME";
+    repo = pname;
+    rev = "${pname}-${version}";
+    sha256 = "0sc0m3p8r5xfh5i4d7dg72kfixx9yi4f800y43bszyr88y52jkga";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config gtk-doc gobject-introspection ];
+  buildInputs = [ glib ];
+  propagatedBuildInputs = [ gtk ];
+
+  preAutoreconf = ''
+    gtkdocize
+  '';
+
+  meta = with lib; {
+    description = "Provides integration for GTK applications into the Mac desktop";
+    license = licenses.lgpl21;
+    homepage = "https://wiki.gnome.org/Projects/GTK/OSX/Integration";
+    maintainers = with maintainers; [ matthewbauer ];
+    platforms = platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gtk-sharp-beans/default.nix b/nixpkgs/pkgs/development/libraries/gtk-sharp-beans/default.nix
new file mode 100644
index 000000000000..69ef71f1506f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtk-sharp-beans/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, which, pkg-config, mono, gtk-sharp-2_0, gio-sharp }:
+
+stdenv.mkDerivation rec {
+  pname = "gtk-sharp-beans";
+  version = "2.14.0";
+
+  src = fetchFromGitHub {
+    owner = "mono";
+    repo = "gtk-sharp-beans";
+
+    rev = version;
+    sha256 = "04sylwdllb6gazzs2m4jjfn14mil9l3cny2q0xf0zkhczzih6ah1";
+  };
+
+  nativeBuildInputs = [ pkg-config autoreconfHook which ];
+  buildInputs = [ mono gtk-sharp-2_0 gio-sharp ];
+
+  dontStrip = true;
+
+  meta = with lib; {
+    description = "Binds some API from GTK that isn't in GTK# 2.12.x";
+    platforms = platforms.linux;
+    license = licenses.lgpl21;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gtk-sharp/2.0.nix b/nixpkgs/pkgs/development/libraries/gtk-sharp/2.0.nix
new file mode 100644
index 000000000000..b083ca02cf2c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtk-sharp/2.0.nix
@@ -0,0 +1,71 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, pkg-config
+, mono
+, glib
+, pango
+, gtk2
+, libxml2
+, monoDLLFixer
+, autoconf
+, automake
+, libtool
+, which
+, fetchpatch
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gtk-sharp";
+  version = "2.12.45";
+
+  builder = ./builder.sh;
+  src = fetchFromGitHub {
+    owner = "mono";
+    repo = "gtk-sharp";
+    rev = version;
+    sha256 = "1vy6yfwkfv6bb45bzf4g6dayiqkvqqvlr02rsnhd10793hlpqlgg";
+  };
+
+  patches = [
+    (fetchpatch {
+      url = "https://projects.archlinux.de/svntogit/packages.git/plain/trunk/gtk-sharp2-2.12.12-gtkrange.patch?h=packages/gtk-sharp-2";
+      sha256 = "bjx+OfgWnN8SO82p8G7pbGuxJ9EeQxMLeHnrtEm8RV8=";
+    })
+  ];
+
+  postInstall = ''
+    pushd $out/bin
+    for f in gapi2-*
+    do
+      substituteInPlace $f --replace mono ${mono}/bin/mono
+    done
+    popd
+  '';
+
+  nativeBuildInputs = [ pkg-config autoconf automake libtool which ];
+
+  buildInputs = [
+    mono glib pango gtk2
+    libxml2
+  ];
+
+  preConfigure = ''
+    ./bootstrap-${lib.versions.majorMinor version}
+  '';
+
+  dontStrip = true;
+
+  inherit monoDLLFixer;
+
+  passthru = {
+    gtk = gtk2;
+  };
+
+  meta = with lib; {
+    description = "Graphical User Interface Toolkit for mono and .Net";
+    homepage = "https://www.mono-project.com/docs/gui/gtksharp";
+    platforms = platforms.linux;
+    license = licenses.gpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gtk-sharp/3.0.nix b/nixpkgs/pkgs/development/libraries/gtk-sharp/3.0.nix
new file mode 100644
index 000000000000..8b594a00a7e5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtk-sharp/3.0.nix
@@ -0,0 +1,56 @@
+{ lib, stdenv
+, fetchurl
+, fetchpatch
+, pkg-config
+, mono
+, glib
+, pango
+, gtk3
+, libxml2
+, monoDLLFixer
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gtk-sharp";
+  version = "2.99.3";
+
+  builder = ./builder.sh;
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "18n3l9zcldyvn4lwi8izd62307mkhz873039nl6awrv285qzah34";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [
+    mono glib pango gtk3
+    libxml2
+  ];
+
+  patches = [
+    # Fixes MONO_PROFILE_ENTER_LEAVE undeclared when compiling against newer versions of mono.
+    # @see https://github.com/mono/gtk-sharp/pull/266
+    (fetchpatch {
+      name = "MONO_PROFILE_ENTER_LEAVE.patch";
+      url = "https://github.com/mono/gtk-sharp/commit/401df51bc461de93c1a78b6a7a0d5adc63cf186c.patch";
+      sha256 = "0hrkcr5a7wkixnyp60v4d6j3arsb63h54rd30lc5ajfjb3p92kcf";
+    })
+    # @see https://github.com/mono/gtk-sharp/pull/263
+    (fetchpatch {
+      name = "disambiguate_Gtk.Range.patch";
+      url = "https://github.com/mono/gtk-sharp/commit/a00552ad68ae349e89e440dca21b86dbd6bccd30.patch";
+      sha256 = "1ylplr9g9x7ybsgrydsgr6p3g7w6i46yng1hnl3afgn4vj45rag2";
+    })
+  ];
+
+  dontStrip = true;
+
+  inherit monoDLLFixer;
+
+  passthru = {
+    inherit gtk3;
+  };
+
+  meta = {
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gtk-sharp/builder.sh b/nixpkgs/pkgs/development/libraries/gtk-sharp/builder.sh
new file mode 100644
index 000000000000..45e640e2a708
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtk-sharp/builder.sh
@@ -0,0 +1,12 @@
+if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
+source $stdenv/setup
+
+genericBuild
+
+# !!! hack
+export ALL_INPUTS="$out $pkgs"
+
+find $out -name "*.dll.config" | while read configFile; do
+    echo "modifying config file $configFile"
+    $monoDLLFixer "$configFile"
+done
diff --git a/nixpkgs/pkgs/development/libraries/gtk/2.x.nix b/nixpkgs/pkgs/development/libraries/gtk/2.x.nix
new file mode 100644
index 000000000000..b2afb21b6214
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtk/2.x.nix
@@ -0,0 +1,158 @@
+{ config
+, lib
+, stdenv
+, fetchurl
+, atk
+, buildPackages
+, cairo
+, cups
+, gdk-pixbuf
+, gettext
+, glib
+, gobject-introspection
+, libXcomposite
+, libXcursor
+, libXdamage
+, libXi
+, libXinerama
+, libXrandr
+, libXrender
+, pango
+, perl
+, pkg-config
+, substituteAll
+, testers
+, AppKit
+, Cocoa
+, gdktarget ? if stdenv.isDarwin then "quartz" else "x11"
+, cupsSupport ? config.gtk2.cups or stdenv.isLinux
+, xineramaSupport ? stdenv.isLinux
+}:
+
+let
+  gtkCleanImmodulesCache = substituteAll {
+    src = ./hooks/clean-immodules-cache.sh;
+    gtk_module_path = "gtk-2.0";
+    gtk_binary_version = "2.10.0";
+  };
+in
+stdenv.mkDerivation (finalAttrs: {
+  pname = "gtk+";
+  version = "2.24.33";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/gtk+/2.24/gtk+-${finalAttrs.version}.tar.xz";
+    hash = "sha256-rCrHV/WULTGKMRpUsMgLXvKV8pnCpzxjL2v7H/Scxto=";
+  };
+
+  outputs = [ "out" "dev" "devdoc" ];
+  outputBin = "dev";
+
+  setupHooks =  [
+    ./hooks/drop-icon-theme-cache.sh
+    gtkCleanImmodulesCache
+  ];
+
+  nativeBuildInputs = finalAttrs.setupHooks ++ [
+    gettext
+    gobject-introspection
+    perl
+    pkg-config
+  ];
+
+  patches = [
+    ./patches/2.0-immodules.cache.patch
+    ./patches/gtk2-theme-paths.patch
+  ] ++ lib.optionals stdenv.isDarwin [
+    ./patches/2.0-gnome_bugzilla_557780_306776_freeciv_darwin.patch
+    ./patches/2.0-darwin-x11.patch
+    # Fixes an incompatible function pointer conversion and implicit int errors with clang 16.
+    ./patches/2.0-clang.patch
+  ];
+
+  propagatedBuildInputs = [
+    atk
+    cairo
+    gdk-pixbuf
+    glib
+    pango
+  ] ++ lib.optionals (stdenv.isLinux || stdenv.isDarwin) [
+    libXcomposite
+    libXcursor
+    libXi
+    libXrandr
+    libXrender
+  ] ++ lib.optional xineramaSupport libXinerama
+  ++ lib.optional cupsSupport cups
+  ++ lib.optionals stdenv.isDarwin [
+    libXdamage
+    AppKit
+    Cocoa
+  ];
+
+  preConfigure =
+    lib.optionalString (stdenv.isDarwin
+                        && lib.versionAtLeast
+                          stdenv.hostPlatform.darwinMinVersion "11")
+      "MACOSX_DEPLOYMENT_TARGET=10.16";
+
+  configureFlags = [
+    "--sysconfdir=/etc"
+    "--with-gdktarget=${gdktarget}"
+    "--with-xinput=yes"
+  ] ++ lib.optionals stdenv.isDarwin [
+    "--disable-glibtest"
+    "--disable-introspection"
+    "--disable-visibility"
+  ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
+    "ac_cv_path_GTK_UPDATE_ICON_CACHE=${buildPackages.gtk2}/bin/gtk-update-icon-cache"
+    "ac_cv_path_GDK_PIXBUF_CSOURCE=${buildPackages.gdk-pixbuf.dev}/bin/gdk-pixbuf-csource"
+  ];
+
+  enableParallelBuilding = true;
+
+  installFlags = [
+    "sysconfdir=${placeholder "out"}/etc"
+  ];
+
+  doCheck = false; # needs X11
+
+  postInstall = ''
+    moveToOutput share/gtk-2.0/demo "$devdoc"
+    # The updater is needed for nixos env and it's tiny.
+    moveToOutput bin/gtk-update-icon-cache "$out"
+  '';
+
+  passthru = {
+    gtkExeEnvPostBuild = ''
+      rm $out/lib/gtk-2.0/2.10.0/immodules.cache
+      $out/bin/gtk-query-immodules-2.0 $out/lib/gtk-2.0/2.10.0/immodules/*.so > $out/lib/gtk-2.0/2.10.0/immodules.cache
+    ''; # workaround for bug of nix-mode for Emacs */ '';
+    inherit gdktarget;
+    tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+  };
+
+  meta = {
+    homepage = "https://www.gtk.org/";
+    description = "A multi-platform toolkit for creating graphical user interfaces";
+    longDescription = ''
+      GTK is a highly usable, feature rich toolkit for creating graphical user
+      interfaces which boasts cross platform compatibility and an easy to use
+      API.  GTK it is written in C, but has bindings to many other popular
+      programming languages such as C++, Python and C# among others.  GTK is
+      licensed under the GNU LGPL 2.1 allowing development of both free and
+      proprietary software with GTK without any license fees or royalties.
+    '';
+    changelog = "https://gitlab.gnome.org/GNOME/gtk/-/raw/${finalAttrs.version}/NEWS";
+    license = lib.licenses.lgpl2Plus;
+    maintainers = with lib.maintainers; [ lovek323 raskin ];
+    platforms = lib.platforms.all;
+    pkgConfigModules = [
+      "gdk-2.0"
+      "gtk+-2.0"
+    ] ++ lib.optionals (gdktarget == "x11") [
+      "gdk-x11-2.0"
+      "gtk+-x11-2.0"
+    ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/gtk/3.x.nix b/nixpkgs/pkgs/development/libraries/gtk/3.x.nix
new file mode 100644
index 000000000000..c244414c5508
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtk/3.x.nix
@@ -0,0 +1,269 @@
+{ lib
+, stdenv
+, substituteAll
+, fetchurl
+, pkg-config
+, gettext
+, docbook-xsl-nons
+, docbook_xml_dtd_43
+, gtk-doc
+, meson
+, mesonEmulatorHook
+, ninja
+, python3
+, makeWrapper
+, shared-mime-info
+, isocodes
+, expat
+, glib
+, cairo
+, pango
+, gdk-pixbuf
+, atk
+, at-spi2-atk
+, gobject-introspection
+, buildPackages
+, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
+, compileSchemas ? stdenv.hostPlatform.emulatorAvailable buildPackages
+, fribidi
+, xorg
+, libepoxy
+, libxkbcommon
+, libxml2
+, gmp
+, gnome
+, gsettings-desktop-schemas
+, sassc
+, trackerSupport ? stdenv.isLinux && (stdenv.buildPlatform == stdenv.hostPlatform)
+, tracker
+, x11Support ? stdenv.isLinux
+, waylandSupport ? stdenv.isLinux
+, libGL
+, wayland
+, wayland-protocols
+, xineramaSupport ? stdenv.isLinux
+, cupsSupport ? stdenv.isLinux
+, cups
+, AppKit
+, Cocoa
+, QuartzCore
+, broadwaySupport ? true
+, wayland-scanner
+, testers
+}:
+
+let
+
+  gtkCleanImmodulesCache = substituteAll {
+    src = ./hooks/clean-immodules-cache.sh;
+    gtk_module_path = "gtk-3.0";
+    gtk_binary_version = "3.0.0";
+  };
+
+in
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "gtk+3";
+  version = "3.24.39";
+
+  outputs = [ "out" "dev" ] ++ lib.optional withIntrospection "devdoc";
+  outputBin = "dev";
+
+  setupHooks = [
+    ./hooks/drop-icon-theme-cache.sh
+    gtkCleanImmodulesCache
+  ];
+
+  src = let
+    inherit (finalAttrs) version;
+  in fetchurl {
+    url = "mirror://gnome/sources/gtk+/${lib.versions.majorMinor version}/gtk+-${version}.tar.xz";
+    sha256 = "sha256-HKw+VmubLzZTpFjAjC3N/cqfkIA3rAPJ2FZLQpV3jXk=";
+  };
+
+  patches = [
+    ./patches/3.0-immodules.cache.patch
+    ./patches/3.0-Xft-setting-fallback-compute-DPI-properly.patch
+  ] ++ lib.optionals stdenv.isDarwin [
+    # X11 module requires <gio/gdesktopappinfo.h> which is not installed on Darwin
+    # let’s drop that dependency in similar way to how other parts of the library do it
+    # e.g. https://gitlab.gnome.org/GNOME/gtk/blob/3.24.4/gtk/gtk-launch.c#L31-33
+    # https://gitlab.gnome.org/GNOME/gtk/merge_requests/536
+    ./patches/3.0-darwin-x11.patch
+  ];
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+  nativeBuildInputs = [
+    gettext
+    makeWrapper
+    meson
+    ninja
+    pkg-config
+    python3
+    sassc
+    gdk-pixbuf
+  ] ++ finalAttrs.setupHooks ++ lib.optionals withIntrospection [
+    gobject-introspection
+    docbook_xml_dtd_43
+    docbook-xsl-nons
+    gtk-doc
+    # For xmllint
+    libxml2
+  ] ++ lib.optionals ((withIntrospection || compileSchemas) && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
+  ] ++ lib.optionals waylandSupport [
+    wayland-scanner
+  ];
+
+  buildInputs = [
+    libxkbcommon
+    (libepoxy.override { inherit x11Support; })
+    isocodes
+  ] ++ lib.optionals stdenv.isDarwin [
+    AppKit
+  ] ++ lib.optionals trackerSupport [
+    tracker
+  ];
+  #TODO: colord?
+
+  propagatedBuildInputs = with xorg; [
+    at-spi2-atk
+    atk
+    cairo
+    expat
+    fribidi
+    gdk-pixbuf
+    glib
+    gsettings-desktop-schemas
+    libICE
+    libSM
+    libXcomposite
+    libXcursor
+    libXdamage
+    libXfixes
+    libXi
+    libXrandr
+    libXrender
+    pango
+  ] ++ lib.optionals stdenv.isDarwin [
+    # explicitly propagated, always needed
+    Cocoa
+    QuartzCore
+  ] ++ lib.optionals waylandSupport [
+    libGL
+    wayland
+    wayland-protocols
+  ] ++ lib.optionals xineramaSupport [
+    libXinerama
+  ] ++ lib.optionals cupsSupport [
+    cups
+  ];
+
+  mesonFlags = [
+    "-Dgtk_doc=${lib.boolToString withIntrospection}"
+    "-Dtests=false"
+    "-Dtracker3=${lib.boolToString trackerSupport}"
+    "-Dbroadway_backend=${lib.boolToString broadwaySupport}"
+    "-Dx11_backend=${lib.boolToString x11Support}"
+    "-Dquartz_backend=${lib.boolToString (stdenv.isDarwin && !x11Support)}"
+    "-Dintrospection=${lib.boolToString withIntrospection}"
+  ];
+
+  doCheck = false; # needs X11
+
+  separateDebugInfo = stdenv.isLinux;
+
+  # These are the defines that'd you'd get with --enable-debug=minimum (default).
+  # See: https://developer.gnome.org/gtk3/stable/gtk-building.html#extra-configuration-options
+  env.NIX_CFLAGS_COMPILE = "-DG_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS";
+
+  postPatch = ''
+    # See https://github.com/NixOS/nixpkgs/issues/132259
+    substituteInPlace meson.build \
+      --replace "x11_enabled = false" ""
+
+    # this conditional gates the installation of share/gsettings-schemas/.../glib-2.0/schemas/gschemas.compiled.
+    substituteInPlace meson.build \
+      --replace 'if not meson.is_cross_build()' 'if ${lib.boolToString compileSchemas}'
+
+    files=(
+      build-aux/meson/post-install.py
+      demos/gtk-demo/geninclude.py
+      gdk/broadway/gen-c-array.py
+      gdk/gen-gdk-gresources-xml.py
+      gtk/cursor/dnd-copy.png
+      gtk/gen-gtk-gresources-xml.py
+      gtk/gen-rc.py
+      gtk/gentypefuncs.py
+    )
+
+    chmod +x ''${files[@]}
+    patchShebangs ''${files[@]}
+  '';
+
+  postInstall = lib.optionalString (!stdenv.isDarwin) ''
+    # The updater is needed for nixos env and it's tiny.
+    moveToOutput bin/gtk-update-icon-cache "$out"
+    # Launcher
+    moveToOutput bin/gtk-launch "$out"
+    # Broadway daemon
+    moveToOutput bin/broadwayd "$out"
+
+    # TODO: patch glib directly
+    for f in $dev/bin/gtk-encode-symbolic-svg; do
+      wrapProgram $f --prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
+    done
+  '' + lib.optionalString (stdenv.buildPlatform == stdenv.hostPlatform) ''
+    GTK_PATH="''${out:?}/lib/gtk-3.0/3.0.0/immodules/" ''${dev:?}/bin/gtk-query-immodules-3.0 > "''${out:?}/lib/gtk-3.0/3.0.0/immodules.cache"
+  '';
+
+  # Wrap demos
+  postFixup =  lib.optionalString (!stdenv.isDarwin) ''
+    demos=(gtk3-demo gtk3-demo-application gtk3-icon-browser gtk3-widget-factory)
+
+    for program in ''${demos[@]}; do
+      wrapProgram $dev/bin/$program \
+        --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share/gsettings-schemas/${finalAttrs.pname}-${finalAttrs.version}"
+    done
+  '' + lib.optionalString stdenv.isDarwin ''
+    # a comment created a cycle between outputs
+    sed '/^# ModulesPath =/d' -i "$out"/lib/gtk-*/*/immodules.cache
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = "gtk+";
+      attrPath = "gtk3";
+      freeze = true;
+    };
+    tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+  };
+
+  meta = with lib; {
+    description = "A multi-platform toolkit for creating graphical user interfaces";
+    longDescription = ''
+      GTK is a highly usable, feature rich toolkit for creating
+      graphical user interfaces which boasts cross platform
+      compatibility and an easy to use API.  GTK it is written in C,
+      but has bindings to many other popular programming languages
+      such as C++, Python and C# among others.  GTK is licensed
+      under the GNU LGPL 2.1 allowing development of both free and
+      proprietary software with GTK without any license fees or
+      royalties.
+    '';
+    homepage = "https://www.gtk.org/";
+    license = licenses.lgpl2Plus;
+    maintainers = with maintainers; [ raskin ] ++ teams.gnome.members;
+    pkgConfigModules = [
+      "gdk-3.0"
+      "gtk+-3.0"
+    ] ++ lib.optionals x11Support [
+      "gdk-x11-3.0"
+      "gtk+-x11-3.0"
+    ];
+    platforms = platforms.all;
+    changelog = "https://gitlab.gnome.org/GNOME/gtk/-/raw/${version}/NEWS";
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/gtk/4.x.nix b/nixpkgs/pkgs/development/libraries/gtk/4.x.nix
new file mode 100644
index 000000000000..2d14823accf4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtk/4.x.nix
@@ -0,0 +1,281 @@
+{ lib
+, stdenv
+, buildPackages
+, substituteAll
+, fetchurl
+, pkg-config
+, gettext
+, graphene
+, gi-docgen
+, meson
+, mesonEmulatorHook
+, ninja
+, python3
+, makeWrapper
+, shared-mime-info
+, isocodes
+, glib
+, cairo
+, pango
+, pandoc
+, gdk-pixbuf
+, gobject-introspection
+, fribidi
+, harfbuzz
+, xorg
+, libepoxy
+, libxkbcommon
+, libpng
+, libtiff
+, libjpeg
+, libxml2
+, gnome
+, gsettings-desktop-schemas
+, gst_all_1
+, sassc
+, trackerSupport ? stdenv.isLinux
+, tracker
+, x11Support ? stdenv.isLinux
+, waylandSupport ? stdenv.isLinux
+, libGL
+# experimental and can cause crashes in inspector
+, vulkanSupport ? false
+, shaderc
+, vulkan-loader
+, vulkan-headers
+, wayland
+, wayland-protocols
+, wayland-scanner
+, xineramaSupport ? stdenv.isLinux
+, cupsSupport ? stdenv.isLinux
+, compileSchemas ? stdenv.hostPlatform.emulatorAvailable buildPackages
+, cups
+, AppKit
+, Cocoa
+, libexecinfo
+, broadwaySupport ? true
+}:
+
+let
+
+  gtkCleanImmodulesCache = substituteAll {
+    src = ./hooks/clean-immodules-cache.sh;
+    gtk_module_path = "gtk-4.0";
+    gtk_binary_version = "4.0.0";
+  };
+
+in
+
+stdenv.mkDerivation rec {
+  pname = "gtk4";
+  version = "4.12.4";
+
+  outputs = [ "out" "dev" ] ++ lib.optionals x11Support [ "devdoc" ];
+  outputBin = "dev";
+
+  setupHooks = [
+    ./hooks/drop-icon-theme-cache.sh
+    gtkCleanImmodulesCache
+  ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/gtk/${lib.versions.majorMinor version}/gtk-${version}.tar.xz";
+    sha256 = "umfGSY5Vmfko7a+54IoyCt+qUKsvDab8arIlL8LVdSA=";
+  };
+
+  patches = [
+    # https://github.com/NixOS/nixpkgs/pull/218143#issuecomment-1501059486
+    ./patches/4.0-fix-darwin-build.patch
+  ];
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    gettext
+    gobject-introspection
+    makeWrapper
+    meson
+    ninja
+    pkg-config
+    python3
+    sassc
+    gi-docgen
+    libxml2 # for xmllint
+  ] ++ lib.optionals (compileSchemas && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
+  ] ++ lib.optionals waylandSupport [
+    wayland-scanner
+  ] ++ lib.optionals vulkanSupport [
+    shaderc # for glslc
+  ] ++ setupHooks;
+
+  buildInputs = [
+    libxkbcommon
+    libpng
+    libtiff
+    libjpeg
+    (libepoxy.override { inherit x11Support; })
+    isocodes
+  ] ++ lib.optionals vulkanSupport [
+    vulkan-headers
+  ] ++ [
+    gst_all_1.gst-plugins-base
+    gst_all_1.gst-plugins-bad
+    fribidi
+    harfbuzz
+  ] ++ (with xorg; [
+    libICE
+    libSM
+    libXcursor
+    libXdamage
+    libXi
+    libXrandr
+    libXrender
+  ]) ++ lib.optionals stdenv.isDarwin [
+    AppKit
+  ] ++ lib.optionals trackerSupport [
+    tracker
+  ] ++ lib.optionals waylandSupport [
+    libGL
+    wayland
+    wayland-protocols
+  ] ++ lib.optionals xineramaSupport [
+    xorg.libXinerama
+  ] ++ lib.optionals cupsSupport [
+    cups
+  ] ++ lib.optionals stdenv.isDarwin [
+    Cocoa
+  ] ++ lib.optionals stdenv.hostPlatform.isMusl [
+    libexecinfo
+  ];
+  #TODO: colord?
+
+  propagatedBuildInputs = [
+    # Required by pkg-config files.
+    cairo
+    gdk-pixbuf
+    glib
+    graphene
+    pango
+  ] ++ lib.optionals waylandSupport [
+    wayland
+  ] ++ lib.optionals vulkanSupport [
+    vulkan-loader
+  ] ++ [
+    # Required for GSettings schemas at runtime.
+    # Will be picked up by wrapGAppsHook.
+    gsettings-desktop-schemas
+  ];
+
+  mesonFlags = [
+    # ../docs/tools/shooter.c:4:10: fatal error: 'cairo-xlib.h' file not found
+    "-Ddocumentation=${lib.boolToString x11Support}"
+    "-Dbuild-tests=false"
+    "-Dtracker=${if trackerSupport then "enabled" else "disabled"}"
+    "-Dbroadway-backend=${lib.boolToString broadwaySupport}"
+  ] ++ lib.optionals vulkanSupport [
+    "-Dvulkan=enabled"
+  ] ++ lib.optionals (!cupsSupport) [
+    "-Dprint-cups=disabled"
+  ] ++ lib.optionals (stdenv.isDarwin && !stdenv.isAarch64) [
+    "-Dmedia-gstreamer=disabled" # requires gstreamer-gl
+  ] ++ lib.optionals (!x11Support) [
+    "-Dx11-backend=false"
+  ];
+
+  doCheck = false; # needs X11
+
+  separateDebugInfo = stdenv.isLinux;
+
+  # These are the defines that'd you'd get with --enable-debug=minimum (default).
+  # See: https://developer.gnome.org/gtk3/stable/gtk-building.html#extra-configuration-options
+  env = {
+    NIX_CFLAGS_COMPILE = "-DG_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS";
+  } // lib.optionalAttrs stdenv.hostPlatform.isMusl {
+    NIX_LDFLAGS = "-lexecinfo";
+  };
+
+  postPatch = ''
+    # this conditional gates the installation of share/gsettings-schemas/.../glib-2.0/schemas/gschemas.compiled.
+    substituteInPlace meson.build \
+      --replace 'if not meson.is_cross_build()' 'if ${lib.boolToString compileSchemas}'
+
+    files=(
+      build-aux/meson/gen-demo-header.py
+      build-aux/meson/gen-visibility-macros.py
+      demos/gtk-demo/geninclude.py
+      gdk/broadway/gen-c-array.py
+      gdk/gen-gdk-gresources-xml.py
+      gtk/gen-gtk-gresources-xml.py
+      gtk/gentypefuncs.py
+    )
+
+    chmod +x ''${files[@]}
+    patchShebangs ''${files[@]}
+
+  '';
+
+  preInstall = ''
+    OLD_PATH="$PATH"
+    PATH="$PATH:$dev/bin" # so the install script finds gtk4-update-icon-cache
+  '';
+
+  postInstall = ''
+    PATH="$OLD_PATH"
+  '' + lib.optionalString (!stdenv.isDarwin) ''
+    # The updater is needed for nixos env and it's tiny.
+    moveToOutput bin/gtk4-update-icon-cache "$out"
+    # Launcher
+    moveToOutput bin/gtk-launch "$out"
+
+    # TODO: patch glib directly
+    for f in $dev/bin/gtk4-encode-symbolic-svg; do
+      wrapProgram $f --prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
+    done
+  '' + lib.optionalString broadwaySupport ''
+    # Broadway daemon
+    moveToOutput bin/gtk4-broadwayd "$out"
+  '';
+
+  # Wrap demos
+  postFixup =  lib.optionalString (!stdenv.isDarwin) ''
+    demos=(gtk4-demo gtk4-demo-application gtk4-icon-browser gtk4-widget-factory)
+
+    for program in ''${demos[@]}; do
+      wrapProgram $dev/bin/$program \
+        --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share/gsettings-schemas/${pname}-${version}"
+    done
+  '' + lib.optionalString x11Support ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = "gtk";
+      versionPolicy = "odd-unstable";
+      attrPath = "gtk4";
+    };
+  };
+
+  meta = with lib; {
+    description = "A multi-platform toolkit for creating graphical user interfaces";
+    longDescription = ''
+      GTK is a highly usable, feature rich toolkit for creating
+      graphical user interfaces which boasts cross platform
+      compatibility and an easy to use API.  GTK it is written in C,
+      but has bindings to many other popular programming languages
+      such as C++, Python and C# among others.  GTK is licensed
+      under the GNU LGPL 2.1 allowing development of both free and
+      proprietary software with GTK without any license fees or
+      royalties.
+    '';
+    homepage = "https://www.gtk.org/";
+    license = licenses.lgpl2Plus;
+    maintainers = teams.gnome.members ++ (with maintainers; [ raskin ]);
+    platforms = platforms.all;
+    changelog = "https://gitlab.gnome.org/GNOME/gtk/-/raw/${version}/NEWS";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gtk/hooks/clean-immodules-cache.sh b/nixpkgs/pkgs/development/libraries/gtk/hooks/clean-immodules-cache.sh
new file mode 100644
index 000000000000..0868a4a39101
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtk/hooks/clean-immodules-cache.sh
@@ -0,0 +1,15 @@
+# shellcheck shell=bash
+
+fixupOutputHooks+=(_gtkCleanImmodulesCache)
+
+# Clean comments that link to generator of the file
+_gtkCleanImmodulesCache() {
+    # gtk_module_path is where the modules are installed
+    # https://gitlab.gnome.org/GNOME/gtk/-/blob/3.24.24/gtk/gtkmodules.c#L68
+    # gtk_binary_version can be retrived with:
+    # pkg-config --variable=gtk_binary_version gtk+-3.0
+    local f="${prefix:?}/lib/@gtk_module_path@/@gtk_binary_version@/immodules.cache"
+    if [ -f "$f" ]; then
+        sed 's|Created by .*bin/gtk-query-|Created by bin/gtk-query-|' -i "$f"
+    fi
+}
diff --git a/nixpkgs/pkgs/development/libraries/gtk/hooks/drop-icon-theme-cache.sh b/nixpkgs/pkgs/development/libraries/gtk/hooks/drop-icon-theme-cache.sh
new file mode 100644
index 000000000000..f28a856c4f50
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtk/hooks/drop-icon-theme-cache.sh
@@ -0,0 +1,19 @@
+# shellcheck shell=bash
+
+# Packages often run gtk-update-icon-cache to include their icons in themes’ icon cache.
+# However, since each package is installed to its own prefix, the files will only collide.
+dropIconThemeCache() {
+    if [[ -z "${dontDropIconThemeCache:-}" ]]; then
+        local icondir="${out:?}/share/icons"
+        if [[ -d "${icondir}" ]]; then
+            # App icons are supposed to go to hicolor theme, since it is a fallback theme as per [icon-theme-spec], but some might still choose to install stylized icons to other themes.
+            find "${icondir}" -name 'icon-theme.cache' -print0 \
+              | while IFS= read -r -d '' file; do
+                echo "Removing ${file}"
+                rm -f "${file}"
+            done
+        fi
+    fi
+}
+
+preFixupPhases="${preFixupPhases-} dropIconThemeCache"
diff --git a/nixpkgs/pkgs/development/libraries/gtk/patches/2.0-clang.patch b/nixpkgs/pkgs/development/libraries/gtk/patches/2.0-clang.patch
new file mode 100644
index 000000000000..1e2e73b9833d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtk/patches/2.0-clang.patch
@@ -0,0 +1,49 @@
+diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c
+index 4317523fb8..3c09cd3ae8 100644
+--- a/gtk/gtkscale.c
++++ b/gtk/gtkscale.c
+@@ -1471,7 +1471,7 @@ gtk_scale_add_mark (GtkScale        *scale,
+   mark->position = position;
+  
+   priv->marks = g_slist_insert_sorted_with_data (priv->marks, mark,
+-                                                 (GCompareFunc) compare_marks,
++                                                 (GCompareDataFunc) compare_marks,
+                                                  GINT_TO_POINTER (
+                                                    gtk_range_get_inverted (GTK_RANGE (scale)) 
+                                                    ));
+diff --git a/tests/testmenubars.c b/tests/testmenubars.c
+index 416a939861..c65e82be26 100644
+--- a/tests/testmenubars.c
++++ b/tests/testmenubars.c
+@@ -21,7 +21,7 @@
+ #include <gtk/gtk.h>
+ 
+ static GtkWidget *
+-create_menu (depth)
++create_menu (int depth, gboolean _unused)
+ {
+     GtkWidget *menu;
+     GtkWidget *menuitem;
+@@ -35,19 +35,19 @@ create_menu (depth)
+     gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
+     gtk_widget_show (menuitem);
+     gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem),
+-			       create_menu (depth - 1));
++			       create_menu (depth - 1, _unused));
+ 
+     menuitem = gtk_menu_item_new_with_mnemonic ("Two");
+     gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
+     gtk_widget_show (menuitem);
+     gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem),
+-			       create_menu (depth - 1));
++			       create_menu (depth - 1, _unused));
+ 
+     menuitem = gtk_menu_item_new_with_mnemonic ("Three");
+     gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
+     gtk_widget_show (menuitem);
+     gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem),
+-			       create_menu (depth - 1));
++			       create_menu (depth - 1, _unused));
+ 
+     return menu;
+ }
diff --git a/nixpkgs/pkgs/development/libraries/gtk/patches/2.0-darwin-x11.patch b/nixpkgs/pkgs/development/libraries/gtk/patches/2.0-darwin-x11.patch
new file mode 100644
index 000000000000..9725cfb84260
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtk/patches/2.0-darwin-x11.patch
@@ -0,0 +1,22 @@
+--- a/gdk/x11/gdkapplaunchcontext-x11.c
++++ b/gdk/x11/gdkapplaunchcontext-x11.c
+@@ -26,7 +26,6 @@
+ #include <unistd.h>
+ 
+ #include <glib.h>
+-#include <gio/gdesktopappinfo.h>
+ 
+ #include "gdkx.h"
+ #include "gdkapplaunchcontext.h"
+@@ -363,10 +362,7 @@
+   else
+     workspace_str = NULL;
+ 
+-  if (G_IS_DESKTOP_APP_INFO (info))
+-    application_id = g_desktop_app_info_get_filename (G_DESKTOP_APP_INFO (info));
+-  else
+-    application_id = NULL;
++  application_id = NULL;
+ 
+   startup_id = g_strdup_printf ("%s-%lu-%s-%s-%d_TIME%lu",
+                                 g_get_prgname (),
diff --git a/nixpkgs/pkgs/development/libraries/gtk/patches/2.0-gnome_bugzilla_557780_306776_freeciv_darwin.patch b/nixpkgs/pkgs/development/libraries/gtk/patches/2.0-gnome_bugzilla_557780_306776_freeciv_darwin.patch
new file mode 100644
index 000000000000..3b1c080abf08
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtk/patches/2.0-gnome_bugzilla_557780_306776_freeciv_darwin.patch
@@ -0,0 +1,54 @@
+From 8b822ab0060acdf4217f589411fe71574cbb09c0 Mon Sep 17 00:00:00 2001
+From: Daniel Trebbien <dtrebbien@gmail.com>
+Date: Fri, 3 Jul 2015 12:08:18 -0400
+Subject: [PATCH] quartz: Bug 557780 - Missing support for depth == 1 in
+ gdk_image_new_for_depth()
+
+When the gtk2 client of Freeciv is started, an assertion failure is seen
+immediately and the client stops:
+"Gdk:ERROR:gdkimage-quartz.c:325:_gdk_image_new_for_depth: assertion
+failed: (depth == 24 || depth == 32)"
+
+In this case, _gdk_image_new_for_depth() is being called from
+_gdk_quartz_image_copy_to_image(). The GdkImage passed to this function
+is NULL so a new GdkImage is created. However, the depth of the passed
+GdkDrawable is 1 and this is passed directly as the `depth' parameter to
+_gdk_image_new_for_depth(), leading to the assertion failure.
+
+In _gdk_quartz_image_copy_to_image(), rather than directly pass the
+GdkDrawable's depth to _gdk_image_new_for_depth(), if the depth is 1,
+then create the new GdkImage with depth 24. The case where the depth is
+1 is already handled in _gdk_quartz_image_copy_to_image().
+
+This allows the Freeciv 2.5.0 gtk2 client to start and play a game.
+---
+ gdk/quartz/gdkimage-quartz.c | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/gdk/quartz/gdkimage-quartz.c b/gdk/quartz/gdkimage-quartz.c
+index 493efba..853ef61 100644
+--- a/gdk/quartz/gdkimage-quartz.c
++++ b/gdk/quartz/gdkimage-quartz.c
+@@ -43,10 +43,15 @@ _gdk_quartz_image_copy_to_image (GdkDrawable *drawable,
+ 
+   screen = gdk_drawable_get_screen (drawable);
+   if (!image)
+-    image = _gdk_image_new_for_depth (screen, GDK_IMAGE_FASTEST, NULL, 
+-				      width, height,
+-				      gdk_drawable_get_depth (drawable));
+-  
++    {
++      gint drawable_depth = gdk_drawable_get_depth (drawable);
++      if (drawable_depth == 1)
++        drawable_depth = 24;
++      image = _gdk_image_new_for_depth (screen, GDK_IMAGE_FASTEST, NULL,
++                                        width, height,
++                                        drawable_depth);
++    }
++
+   if (GDK_IS_PIXMAP_IMPL_QUARTZ (drawable))
+     {
+       GdkPixmapImplQuartz *pix_impl;
+-- 
+2.3.2 (Apple Git-55)
+
diff --git a/nixpkgs/pkgs/development/libraries/gtk/patches/2.0-immodules.cache.patch b/nixpkgs/pkgs/development/libraries/gtk/patches/2.0-immodules.cache.patch
new file mode 100644
index 000000000000..1b8231756e71
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtk/patches/2.0-immodules.cache.patch
@@ -0,0 +1,27 @@
+--- a/gtk/gtkrc.c	2014-09-30 05:02:17.000000000 +0900
++++ b/gtk/gtkrc.c	2016-04-09 17:39:51.363288355 +0900
+@@ -445,5 +445,23 @@
+   if (var)
+     result = g_strdup (var);
+ 
++  // check NIX_PROFILES paths.
++  const gchar *nixProfilesEnv = g_getenv ("NIX_PROFILES");
++  gchar *cachePath;
++  guint i;
++
++  if(nixProfilesEnv && !result){
++    gchar **paths = g_strsplit(nixProfilesEnv, " ", -1);
++    for (i = 0; paths[i] != NULL; i++){
++      cachePath = g_build_filename(paths[i], "etc", "gtk-2.0", "immodules.cache", NULL);
++      if( g_file_test( cachePath, G_FILE_TEST_EXISTS) ){
++        if(result) g_free(result);
++        result = g_strdup(cachePath);
++      }
++      g_free(cachePath);
++    }
++    g_strfreev(paths);
++  }
++
+   if (!result)
+     {
+
diff --git a/nixpkgs/pkgs/development/libraries/gtk/patches/3.0-Xft-setting-fallback-compute-DPI-properly.patch b/nixpkgs/pkgs/development/libraries/gtk/patches/3.0-Xft-setting-fallback-compute-DPI-properly.patch
new file mode 100644
index 000000000000..247dd3ea8456
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtk/patches/3.0-Xft-setting-fallback-compute-DPI-properly.patch
@@ -0,0 +1,34 @@
+From 269f2d80ea41cde17612600841fbdc32e99010f5 Mon Sep 17 00:00:00 2001
+From: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
+Date: Tue, 24 Jan 2017 12:30:08 +0100
+Subject: [PATCH] Xft setting fallback: compute DPI properly
+
+This is a partial revert of bdf0820c501437a2150d8ff0d5340246e713f73f. If
+the Xft DPI settings are not explicitly set, use the values provided by
+the X server rather than hard-coding the fallback value of 96.
+
+While an auto-configured Xorg already reports 96, this value can be
+overriden by the user, and we should respect the user choice in this
+case. There is no need to require them to set the same value in
+different places (the Xorg DPI settings and Xft.dpi).
+---
+ gdk/x11/gdkxftdefaults.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/gdk/x11/gdkxftdefaults.c b/gdk/x11/gdkxftdefaults.c
+index fa1cfde2ec..c462b78c4b 100644
+--- a/gdk/x11/gdkxftdefaults.c
++++ b/gdk/x11/gdkxftdefaults.c
+@@ -174,7 +174,8 @@ init_xft_settings (GdkScreen *screen)
+     x11_screen->xft_rgba = FC_RGBA_UNKNOWN;
+ 
+   if (!get_double_default (xdisplay, "dpi", &dpi_double))
+-    dpi_double = 96.0;
++    dpi_double = (DisplayHeight(xdisplay, x11_screen->screen_num)*25.4)/
++		    DisplayHeightMM(xdisplay, x11_screen->screen_num);
+ 
+   x11_screen->xft_dpi = (int)(0.5 + PANGO_SCALE * dpi_double);
+ }
+-- 
+2.11.0.616.gd72966cf44.dirty
+
diff --git a/nixpkgs/pkgs/development/libraries/gtk/patches/3.0-darwin-x11.patch b/nixpkgs/pkgs/development/libraries/gtk/patches/3.0-darwin-x11.patch
new file mode 100644
index 000000000000..86631634b5bd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtk/patches/3.0-darwin-x11.patch
@@ -0,0 +1,28 @@
+--- a/gdk/x11/gdkapplaunchcontext-x11.c
++++ b/gdk/x11/gdkapplaunchcontext-x11.c
+@@ -27,7 +27,9 @@
+ #include "gdkprivate-x11.h"
+ 
+ #include <glib.h>
++#if defined(HAVE_GIO_UNIX) && !defined(__APPLE__)
+ #include <gio/gdesktopappinfo.h>
++#endif
+ 
+ #include <string.h>
+ #include <unistd.h>
+@@ -352,10 +354,15 @@
+   else
+     workspace_str = NULL;
+ 
++#if defined(HAVE_GIO_UNIX) && !defined(__APPLE__)
+   if (G_IS_DESKTOP_APP_INFO (info))
+     application_id = g_desktop_app_info_get_filename (G_DESKTOP_APP_INFO (info));
+   else
+     application_id = NULL;
++#else
++  application_id = NULL;
++#warning Please add support for creating AppInfo from id for your OS
++#endif
+ 
+   startup_id = g_strdup_printf ("%s-%lu-%s-%s-%d_TIME%lu",
+                                 g_get_prgname (),
diff --git a/nixpkgs/pkgs/development/libraries/gtk/patches/3.0-immodules.cache.patch b/nixpkgs/pkgs/development/libraries/gtk/patches/3.0-immodules.cache.patch
new file mode 100644
index 000000000000..bbe5f28dbd3e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtk/patches/3.0-immodules.cache.patch
@@ -0,0 +1,27 @@
+--- a/gtk/deprecated/gtkrc.c	2016-04-02 18:43:08.401663112 +0900
++++ b/gtk/deprecated/gtkrc.c	2016-04-02 18:29:19.927608592 +0900
+@@ -774,5 +774,23 @@
+   if (var)
+     result = g_strdup (var);
+ 
++  // check NIX_PROFILES paths.
++  const gchar *nixProfilesEnv = g_getenv ("NIX_PROFILES");
++  gchar *cachePath;
++  guint i;
++
++  if(nixProfilesEnv && !result){
++    gchar **paths = g_strsplit(nixProfilesEnv, " ", -1);
++    for (i = 0; paths[i] != NULL; i++){
++      cachePath = g_build_filename(paths[i], "etc", "gtk-3.0", "immodules.cache", NULL);
++      if( g_file_test( cachePath, G_FILE_TEST_EXISTS) ){
++        if(result) g_free(result);
++        result = g_strdup(cachePath);
++      }
++      g_free(cachePath);
++    }
++    g_strfreev(paths);
++  }
++
+   if (!result)
+     {
+ 
diff --git a/nixpkgs/pkgs/development/libraries/gtk/patches/4.0-fix-darwin-build.patch b/nixpkgs/pkgs/development/libraries/gtk/patches/4.0-fix-darwin-build.patch
new file mode 100644
index 000000000000..01f4377aa0a7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtk/patches/4.0-fix-darwin-build.patch
@@ -0,0 +1,31 @@
+diff --git a/gdk/macos/gdkmacospasteboard-private.h b/gdk/macos/gdkmacospasteboard-private.h
+index fdeb936..c4b8666 100644
+--- a/gdk/macos/gdkmacospasteboard-private.h
++++ b/gdk/macos/gdkmacospasteboard-private.h
+@@ -27,6 +27,10 @@
+ 
+ G_BEGIN_DECLS
+ 
++#ifndef AVAILABLE_MAC_OS_X_VERSION_10_13_AND_LATER
++typedef NSString *NSPasteboardType;
++#endif
++
+ @interface GdkMacosPasteboardItemDataProvider : NSObject <NSPasteboardItemDataProvider>
+ {
+   GdkContentProvider *_contentProvider;
+diff --git a/gdk/macos/gdkmacospasteboard.c b/gdk/macos/gdkmacospasteboard.c
+index 66b3c9f..b9e0d8a 100644
+--- a/gdk/macos/gdkmacospasteboard.c
++++ b/gdk/macos/gdkmacospasteboard.c
+@@ -400,7 +400,11 @@ _gdk_macos_pasteboard_register_drag_types (NSWindow *window)
+       gdk_content_formats_get_gtypes (formats, &n_gtypes);
+ 
+       if (n_gtypes)
++#ifdef AVAILABLE_MAC_OS_X_VERSION_10_13_AND_LATER
+         [ret addObject:NSPasteboardTypeURL];
++#else
++        [ret addObject:[[NSString alloc] initWithUTF8String:"public.url"]];
++#endif
+ 
+       gdk_content_formats_unref (formats);
+     }
diff --git a/nixpkgs/pkgs/development/libraries/gtk/patches/gtk2-theme-paths.patch b/nixpkgs/pkgs/development/libraries/gtk/patches/gtk2-theme-paths.patch
new file mode 100644
index 000000000000..edd69b078076
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtk/patches/gtk2-theme-paths.patch
@@ -0,0 +1,40 @@
+Subject: [PATCHv2] gtk: Patch GTK+ to look for themes in profiles.
+To: guix-devel@gnu.org
+Date: Sun, 13 Mar 2016 15:17:37 +1100
+Url: https://lists.gnu.org/archive/html/guix-devel/2016-03/msg00492.html
+
+diff -Naur gtk+-2.24.28.new/gtk/gtkrc.c gtk+-2.24.28/gtk/gtkrc.c
+--- gtk+-2.24.28.new/gtk/gtkrc.c	2016-03-13 10:31:14.413644362 +1100
++++ gtk+-2.24.28/gtk/gtkrc.c	2016-03-13 12:51:34.723398423 +1100
+@@ -808,6 +808,8 @@
+   gchar *path = NULL;
+   const gchar *home_dir;
+   gchar *subpath;
++  const gchar * const *xdg_data_dirs;
++  gint i;
+ 
+   if (type)
+     subpath = g_strconcat ("gtk-2.0-", type,
+@@ -830,6 +832,22 @@
+     }
+ 
+   if (!path)
++    {
++      xdg_data_dirs = g_get_system_data_dirs ();
++      for (i = 0; xdg_data_dirs[i]; i++)
++        {
++          path = g_build_filename (xdg_data_dirs[i], "themes", name, subpath, NULL);
++          if (g_file_test (path, G_FILE_TEST_EXISTS))
++            break;
++          else
++            {
++              g_free (path);
++              path = NULL;
++            }
++        }
++    }
++
++  if (!path)
+     {
+       gchar *theme_dir = gtk_rc_get_theme_dir ();
+       path = g_build_filename (theme_dir, name, subpath, NULL);
diff --git a/nixpkgs/pkgs/development/libraries/gtk4-layer-shell/default.nix b/nixpkgs/pkgs/development/libraries/gtk4-layer-shell/default.nix
new file mode 100644
index 000000000000..d69970193080
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtk4-layer-shell/default.nix
@@ -0,0 +1,65 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, meson
+, ninja
+, pkg-config
+, gtk-doc
+, docbook-xsl-nons
+, docbook_xml_dtd_43
+, wayland-scanner
+, wayland
+, gtk4
+, gobject-introspection
+, vala
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "gtk4-layer-shell";
+  version = "1.0.2";
+
+  outputs = [ "out" "dev" "devdoc" ];
+  outputBin = "devdoc";
+
+  src = fetchFromGitHub {
+    owner = "wmww";
+    repo = "gtk4-layer-shell";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-decjPkFkYy7kIjyozsB7BEmw33wzq1EQyIBrxO36984=";
+  };
+
+  strictDeps = true;
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gobject-introspection
+    gtk-doc
+    docbook-xsl-nons
+    docbook_xml_dtd_43
+    vala
+    wayland-scanner
+  ];
+
+  buildInputs = [
+    wayland
+    gtk4
+  ];
+
+  mesonFlags = [
+    "-Ddocs=true"
+    "-Dexamples=true"
+  ];
+
+  meta = with lib; {
+    description = "A library to create panels and other desktop components for Wayland using the Layer Shell protocol and GTK4";
+    license = licenses.mit;
+    maintainers = with maintainers; [ donovanglover ];
+    platforms = platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/gtkd/default.nix b/nixpkgs/pkgs/development/libraries/gtkd/default.nix
new file mode 100644
index 000000000000..d773434b8323
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtkd/default.nix
@@ -0,0 +1,132 @@
+{ lib, stdenv, fetchzip, atk, cairo, dcompiler, gdk-pixbuf, gnome, gst_all_1, librsvg
+, glib, gtk3, gtksourceview4, libgda, libpeas, pango, pkg-config, which, vte }:
+
+let
+  inherit (gst_all_1) gstreamer gst-plugins-base gst-plugins-bad;
+in stdenv.mkDerivation rec {
+  pname = "gtkd";
+  version = "3.10.0";
+
+  src = fetchzip {
+    url = "https://gtkd.org/Downloads/sources/GtkD-${version}.zip";
+    sha256 = "DEKVDexGyg/T3SdnnvRjaHq1LbDo8ekNslxKROpMCCE=";
+    stripRoot = false;
+  };
+
+  nativeBuildInputs = [ dcompiler pkg-config which ];
+  propagatedBuildInputs = [
+    atk cairo gdk-pixbuf glib gstreamer gst-plugins-base gtk3 gtksourceview4
+    libgda libpeas librsvg pango vte
+  ];
+
+  postPatch = ''
+    substituteAll ${./paths.d} generated/gtkd/gtkd/paths.d
+
+    substituteInPlace generated/gstreamer/gst/app/c/functions.d \
+      --replace libgstapp-1.0.so.0 ${gst-plugins-base}/lib/libgstapp-1.0.so.0 \
+      --replace libgstapp-1.0.0.dylib ${gst-plugins-base}/lib/libgstapp-1.0.0.dylib
+
+    substituteInPlace generated/gstreamer/gst/base/c/functions.d \
+      --replace libgstbase-1.0.so.0 ${gstreamer.out}/lib/libgstbase-1.0.so.0 \
+      --replace libgstbase-1.0.0.dylib ${gstreamer.out}/lib/libgstbase-1.0.0.dylib
+
+    substituteInPlace generated/gstreamer/gst/mpegts/c/functions.d \
+      --replace libgstmpegts-1.0.so.0 ${gst-plugins-bad.out}/lib/libgstmpegts-1.0.so.0 \
+      --replace libgstmpegts-1.0.0.dylib ${gst-plugins-bad.out}/lib/libgstmpegts-1.0.0.dylib
+
+    substituteInPlace generated/gstreamer/gstinterfaces/c/functions.d \
+      --replace libgstvideo-1.0.so.0 ${gst-plugins-base}/lib/libgstvideo-1.0.so.0 \
+      --replace libgstvideo-1.0.0.dylib ${gst-plugins-base}/lib/libgstvideo-1.0.0.dylib
+
+    substituteInPlace generated/gstreamer/gstreamer/c/functions.d \
+      --replace libgstreamer-1.0.so.0 ${gstreamer}/lib/libgstreamer-1.0.so.0 \
+      --replace libgstreamer-1.0.0.dylib ${gstreamer}/lib/libgstreamer-1.0.0.dylib
+
+    substituteInPlace generated/gtkd/atk/c/functions.d \
+      --replace libatk-1.0.so.0 ${atk}/lib/libatk-1.0.so.0 \
+      --replace libatk-1.0.0.dylib ${atk}/lib/libatk-1.0.0.dylib
+
+    substituteInPlace generated/gtkd/cairo/c/functions.d \
+      --replace libcairo.so.2 ${cairo}/lib/libcairo.so.2 \
+      --replace libcairo.dylib ${cairo}/lib/libcairo.dylib
+
+    substituteInPlace generated/gtkd/gdk/c/functions.d \
+      --replace libgdk-3.so.0 ${gtk3}/lib/libgdk-3.so.0 \
+      --replace libgdk-3.0.dylib ${gtk3}/lib/libgdk-3.0.dylib
+
+    substituteInPlace generated/gtkd/gdkpixbuf/c/functions.d \
+      --replace libgdk_pixbuf-2.0.so.0 ${gdk-pixbuf}/lib/libgdk_pixbuf-2.0.so.0 \
+      --replace libgdk_pixbuf-2.0.0.dylib ${gdk-pixbuf}/lib/libgdk_pixbuf-2.0.0.dylib
+
+    substituteInPlace generated/gtkd/gio/c/functions.d \
+      --replace libgio-2.0.so.0 ${glib.out}/lib/libgio-2.0.so.0 \
+      --replace libgio-2.0.0.dylib ${glib.out}/lib/libgio-2.0.0.dylib
+
+    substituteInPlace generated/gtkd/glib/c/functions.d \
+      --replace libglib-2.0.so.0 ${glib.out}/lib/libglib-2.0.so.0 \
+      --replace libgmodule-2.0.so.0 ${glib.out}/lib/libgmodule-2.0.so.0 \
+      --replace libgobject-2.0.so.0 ${glib.out}/lib/libgobject-2.0.so.0 \
+      --replace libglib-2.0.0.dylib ${glib.out}/lib/libglib-2.0.0.dylib \
+      --replace libgmodule-2.0.0.dylib ${glib.out}/lib/libgmodule-2.0.0.dylib \
+      --replace libgobject-2.0.0.dylib ${glib.out}/lib/libgobject-2.0.0.dylib
+
+    substituteInPlace generated/gtkd/gobject/c/functions.d \
+      --replace libgobject-2.0.so.0 ${glib.out}/lib/libgobject-2.0.so.0 \
+      --replace libgobject-2.0.0.dylib ${glib.out}/lib/libgobject-2.0.0.dylib
+
+    substituteInPlace generated/gtkd/gtk/c/functions.d \
+      --replace libgdk-3.so.0 ${gtk3}/lib/libgdk-3.so.0 \
+      --replace libgtk-3.so.0 ${gtk3}/lib/libgtk-3.so.0 \
+      --replace libgdk-3.0.dylib ${gtk3}/lib/libgdk-3.0.dylib \
+      --replace libgtk-3.0.dylib ${gtk3}/lib/libgtk-3.0.dylib
+
+    substituteInPlace generated/gtkd/pango/c/functions.d \
+      --replace libpango-1.0.so.0 ${pango.out}/lib/libpango-1.0.so.0 \
+      --replace libpangocairo-1.0.so.0 ${pango.out}/lib/libpangocairo-1.0.so.0 \
+      --replace libpango-1.0.0.dylib ${pango.out}/lib/libpango-1.0.0.dylib \
+      --replace libpangocairo-1.0.0.dylib ${pango.out}/lib/libpangocairo-1.0.0.dylib
+
+    substituteInPlace generated/gtkd/rsvg/c/functions.d \
+      --replace librsvg-2.so.2 ${librsvg}/lib/librsvg-2.so.2 \
+      --replace librsvg-2.2.dylib ${librsvg}/lib/librsvg-2.2.dylib
+
+    substituteInPlace generated/peas/peas/c/functions.d \
+      --replace libpeas-1.0.so.0 ${libpeas}/lib/libpeas-1.0.so.0 \
+      --replace libpeas-gtk-1.0.so.0 ${libpeas}/lib/libpeas-gtk-1.0.so.0 \
+      --replace libpeas-1.0.0.dylib ${libpeas}/lib/libpeas-1.0.0.dylib \
+      --replace gtk-1.0.0.dylib ${libpeas}/lib/gtk-1.0.0.dylib
+
+    substituteInPlace generated/sourceview/gsv/c/functions.d \
+      --replace libgtksourceview-4.so.0 ${gtksourceview4}/lib/libgtksourceview-4.so.0 \
+      --replace libgtksourceview-4.0.dylib ${gtksourceview4}/lib/libgtksourceview-4.0.dylib
+
+    substituteInPlace generated/vte/vte/c/functions.d \
+      --replace libvte-2.91.so.0 ${vte}/lib/libvte-2.91.so.0 \
+      --replace libvte-2.91.0.dylib ${vte}/lib/libvte-2.91.0.dylib
+  '';
+
+  makeFlags  = [
+    "prefix=${placeholder "out"}"
+    "PKG_CONFIG=${pkg-config}/bin/${pkg-config.targetPrefix}pkg-config"
+  ];
+
+  # The .pc files does not declare an `includedir=`, so the multiple
+  # outputs setup hook misses this.
+  postFixup = ''
+    for pc in $dev/lib/pkgconfig/*; do
+      substituteInPlace $pc \
+        --replace "$out/include" "$dev/include"
+    done
+  '';
+
+  passthru = {
+    inherit dcompiler;
+  };
+
+  meta = with lib; {
+    description = "D binding and OO wrapper for GTK";
+    homepage = "https://gtkd.org";
+    license = licenses.lgpl3Plus;
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gtkd/paths.d b/nixpkgs/pkgs/development/libraries/gtkd/paths.d
new file mode 100644
index 000000000000..8793da440690
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtkd/paths.d
@@ -0,0 +1,142 @@
+/*
+ * gtkD is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version, with
+ * some exceptions, please read the COPYING file.
+ *
+ * gtkD is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with gtkD; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
+ *
+ * paths.d  -- list of libraries that will be dynamically linked with gtkD
+ *
+ * Added:	John Reimer	-- 2004-12-20
+ * Updated: 2005-02-21 changed names; added version(linux)
+ * Updated: 2005-05-05 updated Linux support
+ * Updated: 2008-02-16 Tango support
+ */
+
+module gtkd.paths;
+
+/*
+ * Define the Libraries that gtkD will be using.
+ *   This is a growable list, as long as the programmer
+ *   also adds to the importLibs list.
+ */
+
+enum LIBRARY
+{
+	ATK,
+	CAIRO,
+	GDK,
+	GDKPIXBUF,
+	GLIB,
+	GMODULE,
+	GOBJECT,
+	GIO,
+	GTHREAD,
+	GTK,
+	PANGO,
+	PANGOCAIRO,
+	GLGDK,
+	GLGTK,
+	GDA,
+	GSV,
+	GSV1,
+	GSTREAMER,
+	GSTINTERFACES,
+	VTE,
+	PEAS,
+	RSVG,
+}
+
+version (Windows)
+{
+	const string[LIBRARY.max+1] importLibs =
+	[
+		LIBRARY.ATK:           "libatk-1.0-0.dll",
+		LIBRARY.CAIRO:         "libcairo-2.dll",
+		LIBRARY.GDK:           "libgdk-3-0.dll",
+		LIBRARY.GDKPIXBUF:     "libgdk_pixbuf-2.0-0.dll",
+		LIBRARY.GLIB:          "libglib-2.0-0.dll",
+		LIBRARY.GMODULE:       "libgmodule-2.0-0.dll",
+		LIBRARY.GOBJECT:       "libgobject-2.0-0.dll",
+		LIBRARY.GIO:           "libgio-2.0-0.dll",
+		LIBRARY.GTHREAD:       "libgthread-2.0-0.dll",
+		LIBRARY.GTK:           "libgtk-3-0.dll",
+		LIBRARY.PANGO:         "libpango-1.0-0.dll",
+		LIBRARY.PANGOCAIRO:    "libpangocairo-1.0-0.dll",
+		LIBRARY.GLGDK:         "libgdkglext-3.0-0.dll",
+		LIBRARY.GLGTK:         "libgtkglext-3.0-0.dll",
+		LIBRARY.GDA:           "libgda-4.0-4.dll",
+		LIBRARY.GSV:           "libgtksourceview-3.0-0.dll",
+		LIBRARY.GSV1:          "libgtksourceview-3.0-1.dll",
+		LIBRARY.GSTREAMER:     "libgstreamer-1.0.dll",
+		LIBRARY.GSTINTERFACES: "libgstvideo-1.0.dll",
+		LIBRARY.VTE:           "libvte-2.91.dll",
+		LIBRARY.PEAS:          "libpeas-1.0.dll",
+		LIBRARY.RSVG:          "librsvg-2-2.dll",
+	];
+}
+else version(darwin)
+{
+	const string[LIBRARY.max+1] importLibs =
+	[
+		LIBRARY.ATK:           "@atk@/lib/libatk-1.0.dylib",
+		LIBRARY.CAIRO:         "@cairo@/lib/libcairo.dylib",
+		LIBRARY.GDK:           "@gtk3@/lib/libgdk-3.0.dylib",
+		LIBRARY.GDKPIXBUF:     "@gdk_pixbuf@/lib/libgdk_pixbuf-2.0.dylib",
+		LIBRARY.GLIB:          "@glib@/lib/libglib-2.0.dylib",
+		LIBRARY.GMODULE:       "@glib@/lib/libgmodule-2.0.dylib",
+		LIBRARY.GOBJECT:       "@glib@/lib/libgobject-2.0.dylib",
+		LIBRARY.GIO:           "@glib@/lib/libgio-2.0.dylib",
+		LIBRARY.GTHREAD:       "@glib@/lib/libgthread-2.0.dylib",
+		LIBRARY.GTK:           "@gtk3@/lib/libgtk-3.0.dylib",
+		LIBRARY.PANGO:         "@pango@/lib/libpango-1.0.dylib",
+		LIBRARY.PANGOCAIRO:    "@pango@/lib/libpangocairo-1.0.dylib",
+		LIBRARY.GLGDK:         "libgdkglext-3.0.dylib",
+		LIBRARY.GLGTK:         "libgtkglext-3.0.dylib",
+		LIBRARY.GDA:           "@libgda@/lib/libgda-2.dylib",
+		LIBRARY.GSV:           "@gtksourceview4@/lib/libgtksourceview-4.0.dylib",
+		LIBRARY.GSV1:          "@gtksourceview4@/lib/libgtksourceview-4.0.dylib",
+		LIBRARY.GSTREAMER:     "@gstreamer@/lib/libgstreamer-1.0.dylib",
+		LIBRARY.GSTINTERFACES: "@gst_plugins_base@/lib/libgstvideo-1.0.dylib",
+		LIBRARY.VTE:           "@vte@/lib/libvte-2.91.dylib",
+		LIBRARY.PEAS:          "@libpeas@/lib/libpeas-1.0.dylib",
+		LIBRARY.RSVG:          "@librsvg@/lib/librsvg-2.dylib",
+	];
+}
+else
+{
+	const string[LIBRARY.max+1] importLibs =
+	[
+		LIBRARY.ATK:           "@atk@/lib/libatk-1.0.so.0",
+		LIBRARY.CAIRO:         "@cairo@/lib/libcairo.so.2",
+		LIBRARY.GDK:           "@gtk3@/lib/libgdk-3.so.0",
+		LIBRARY.GDKPIXBUF:     "@gdk_pixbuf@/lib/libgdk_pixbuf-2.0.so.0",
+		LIBRARY.GLIB:          "@glib@/lib/libglib-2.0.so.0",
+		LIBRARY.GMODULE:       "@glib@/lib/libgmodule-2.0.so.0",
+		LIBRARY.GOBJECT:       "@glib@/lib/libgobject-2.0.so.0",
+		LIBRARY.GIO:           "@glib@/lib/libgio-2.0.so.0",
+		LIBRARY.GTHREAD:       "@glib@/lib/libgthread-2.0.so.0",
+		LIBRARY.GTK:           "@gtk3@/lib/libgtk-3.so.0",
+		LIBRARY.PANGO:         "@pango@/lib/libpango-1.0.so.0",
+		LIBRARY.PANGOCAIRO:    "@pango@/lib/libpangocairo-1.0.so.0",
+		LIBRARY.GLGDK:         "libgdkglext-3.0.so.0",
+		LIBRARY.GLGTK:         "libgtkglext-3.0.so.0",
+		LIBRARY.GDA:           "@libgda@/lib/libgda-4.0.so.4",
+		LIBRARY.GSV:           "@gtksourceview4@/lib/libgtksourceview-4.so.0",
+		LIBRARY.GSV1:          "@gtksourceview4@/lib/libgtksourceview-4.so.0",
+		LIBRARY.GSTREAMER:     "@gstreamer@/lib/libgstreamer-1.0.so.0",
+		LIBRARY.GSTINTERFACES: "@gst_plugins_base@/lib/libgstvideo-1.0.so.0",
+		LIBRARY.VTE:           "@vte@/lib/libvte-2.91.so.0",
+		LIBRARY.PEAS:          "@libpeas@/lib/libpeas-1.0.so.0",
+		LIBRARY.RSVG:          "@librsvg@/lib/librsvg-2.so.2",
+	];
+}
diff --git a/nixpkgs/pkgs/development/libraries/gtkdatabox/default.nix b/nixpkgs/pkgs/development/libraries/gtkdatabox/default.nix
new file mode 100644
index 000000000000..0cc510ce7313
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtkdatabox/default.nix
@@ -0,0 +1,30 @@
+{ lib
+, stdenv
+, fetchurl
+, pkg-config
+, gtk3
+, pango
+, cairo
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gtkdatabox";
+  version = "1.0.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/gtkdatabox/${pname}-${version}.tar.gz";
+    sha256 = "1qykm551bx8j8pfgxs60l2vhpi8lv4r8va69zvn2594lchh71vlb";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  propagatedBuildInputs = [ gtk3 pango cairo ];
+
+  meta = {
+    description = "GTK widget for displaying large amounts of numerical data";
+    homepage = "https://gtkdatabox.sourceforge.io/";
+    license = lib.licenses.lgpl2Only;
+    platforms = lib.platforms.unix;
+    maintainers = with lib.maintainers; [ yl3dy ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gtkextra/default.nix b/nixpkgs/pkgs/development/libraries/gtkextra/default.nix
new file mode 100644
index 000000000000..ed860b7dde3f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtkextra/default.nix
@@ -0,0 +1,42 @@
+{ stdenv
+, lib
+, fetchurl
+, pkg-config
+, gobject-introspection
+, file
+, gtk2
+, glib
+, cairo
+, atk
+, pango
+, libtiff
+, libpng
+, libjpeg
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gtkextra";
+  version = "3.3.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/gtkextra/${lib.versions.majorMinor version}/${pname}-${version}.tar.gz";
+    sha256 = "1mpihbyzhv3ymfim93l9xnxmzhwyqdba5xb4rdn5vggdg25766v5";
+  };
+
+  postPatch = ''
+    substituteInPlace configure \
+      --replace "/usr/bin/file" "${file}/bin/file"
+  '';
+
+  nativeBuildInputs = [ gobject-introspection pkg-config ];
+
+  buildInputs = [ gtk2 glib cairo atk pango libtiff libpng libjpeg ];
+
+  meta = with lib; {
+    homepage = "https://gtkextra.sourceforge.net/";
+    description = "GtkExtra is a useful set of widgets for creating GUI's for GTK+.";
+    license = licenses.lgpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ tesq0 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gtkimageview/default.nix b/nixpkgs/pkgs/development/libraries/gtkimageview/default.nix
new file mode 100644
index 000000000000..fb63d4f00c1d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtkimageview/default.nix
@@ -0,0 +1,40 @@
+{ fetchurl, lib, stdenv, pkg-config, gtk2 }:
+
+stdenv.mkDerivation rec {
+  pname = "gtkimageview";
+  version = "1.6.4";
+
+  src = fetchurl {
+    url = "https://sources.archlinux.org/other/packages/${pname}/${pname}-${version}.tar.gz";
+    sha256 = "1wj63af9j9p5i067lpwi9lxvwalamakrmklvl983kvi7s4w1ss2c";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ gtk2 ];
+
+  preConfigure = ''
+    sed '/DEPRECATED_FLAGS/d' -i configure
+    sed 's/-Wall -Werror//' -i configure
+  '';
+
+  doCheck = true;
+
+  meta = {
+    homepage = "https://wiki.gnome.org/Projects/GTK/GtkImageView";
+
+    description = "Image viewer widget for GTK";
+
+    longDescription =
+      '' GtkImageView is a simple image viewer widget for GTK.  Similar to
+         the image viewer panes in gThumb or Eye of Gnome.  It makes writing
+         image viewing and editing applications easy.  Among its features
+         are: mouse and keyboard zooming; scrolling and dragging; adjustable
+         interpolation; GIF animation support.
+       '';
+
+    license = lib.licenses.lgpl2Plus;
+
+    maintainers = [ ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gtkmm/2.x.nix b/nixpkgs/pkgs/development/libraries/gtkmm/2.x.nix
new file mode 100644
index 000000000000..284ee83c2d4f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtkmm/2.x.nix
@@ -0,0 +1,42 @@
+{ lib, stdenv, fetchurl, pkg-config, gtk2, glibmm, cairomm, pangomm, atkmm }:
+
+stdenv.mkDerivation rec {
+  pname = "gtkmm";
+  version = "2.24.5";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/gtkmm/${lib.versions.majorMinor version}/gtkmm-${version}.tar.xz";
+    sha256 = "0680a53b7bf90b4e4bf444d1d89e6df41c777e0bacc96e9c09fc4dd2f5fe6b72";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ pkg-config ];
+
+  propagatedBuildInputs = [ glibmm gtk2 atkmm cairomm pangomm ];
+
+  doCheck = true;
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "C++ interface to the GTK graphical user interface library";
+
+    longDescription = ''
+      gtkmm is the official C++ interface for the popular GUI library
+      GTK.  Highlights include typesafe callbacks, and a
+      comprehensive set of widgets that are easily extensible via
+      inheritance.  You can create user interfaces either in code or
+      with the Glade User Interface designer, using libglademm.
+      There's extensive documentation, including API reference and a
+      tutorial.
+    '';
+
+    homepage = "https://gtkmm.org/";
+
+    license = lib.licenses.lgpl2Plus;
+
+    maintainers = with lib.maintainers; [ raskin ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gtkmm/3.x.nix b/nixpkgs/pkgs/development/libraries/gtkmm/3.x.nix
new file mode 100644
index 000000000000..1d3f15ba9871
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtkmm/3.x.nix
@@ -0,0 +1,58 @@
+{ lib, stdenv, fetchurl, pkg-config, meson, ninja, python3, gtk3, glibmm, cairomm, pangomm, atkmm, libepoxy, gnome, glib, gdk-pixbuf }:
+
+stdenv.mkDerivation rec {
+  pname = "gtkmm";
+  version = "3.24.8";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "0pQMZJIuW5WFVLI9TEHRg56p5D4NLls4Gc+0aCSgmMQ=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [
+    pkg-config
+    meson
+    ninja
+    python3
+    glib
+    gdk-pixbuf # for gdk-pixbuf-pixdata
+  ];
+  buildInputs = [ libepoxy ];
+
+  propagatedBuildInputs = [ glibmm gtk3 atkmm cairomm pangomm ];
+
+  # https://bugzilla.gnome.org/show_bug.cgi?id=764521
+  doCheck = false;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      attrPath = "${pname}3";
+      versionPolicy = "odd-unstable";
+      freeze = true;
+    };
+  };
+
+  meta = with lib; {
+    description = "C++ interface to the GTK graphical user interface library";
+
+    longDescription = ''
+      gtkmm is the official C++ interface for the popular GUI library
+      GTK.  Highlights include typesafe callbacks, and a
+      comprehensive set of widgets that are easily extensible via
+      inheritance.  You can create user interfaces either in code or
+      with the Glade User Interface designer, using libglademm.
+      There's extensive documentation, including API reference and a
+      tutorial.
+    '';
+
+    homepage = "https://gtkmm.org/";
+
+    license = licenses.lgpl2Plus;
+
+    maintainers = with maintainers; [ raskin ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gtkmm/4.x.nix b/nixpkgs/pkgs/development/libraries/gtkmm/4.x.nix
new file mode 100644
index 000000000000..21bfdd858c29
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtkmm/4.x.nix
@@ -0,0 +1,93 @@
+{ stdenv
+, lib
+, fetchurl
+, pkg-config
+, meson
+, ninja
+, python3
+, gtk4
+, glib
+, glibmm_2_68
+, cairomm_1_16
+, pangomm_2_48
+, libepoxy
+, gnome
+, makeFontsConf
+, xvfb-run
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gtkmm";
+  version = "4.12.0";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "+8PnYYEjNFwBSO9xq7ZUjUIfUrsiT72jSHW2d9wDLJI=";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+    meson
+    ninja
+    python3
+    glib # glib-compile-resources
+  ];
+
+  buildInputs = [
+    libepoxy
+  ];
+
+  propagatedBuildInputs = [
+    glibmm_2_68
+    gtk4
+    cairomm_1_16
+    pangomm_2_48
+  ];
+
+  nativeCheckInputs = lib.optionals (!stdenv.isDarwin)[
+    xvfb-run
+  ];
+
+  # Tests require fontconfig.
+  FONTCONFIG_FILE = makeFontsConf {
+    fontDirectories = [ ];
+  };
+
+  doCheck = true;
+
+  checkPhase = ''
+    runHook preCheck
+
+    ${lib.optionalString (!stdenv.isDarwin) "xvfb-run -s '-screen 0 800x600x24'"} \
+      meson test --print-errorlogs
+
+    runHook postCheck
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      attrPath = "${pname}4";
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    description = "C++ interface to the GTK graphical user interface library";
+    longDescription = ''
+      gtkmm is the official C++ interface for the popular GUI library
+      GTK.  Highlights include typesafe callbacks, and a
+      comprehensive set of widgets that are easily extensible via
+      inheritance.  You can create user interfaces either in code or
+      with the Glade User Interface designer, using libglademm.
+      There's extensive documentation, including API reference and a
+      tutorial.
+    '';
+    homepage = "https://gtkmm.org/";
+    license = licenses.lgpl2Plus;
+    maintainers = teams.gnome.members ++ (with maintainers; [ raskin ]);
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gtksourceview/3.x-nix_share_path.patch b/nixpkgs/pkgs/development/libraries/gtksourceview/3.x-nix_share_path.patch
new file mode 100644
index 000000000000..c87350167c25
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtksourceview/3.x-nix_share_path.patch
@@ -0,0 +1,11 @@
+--- a/gtksourceview/gtksourceview-utils.c	2014-07-13 16:13:57.418687726 +0200
++++ b/gtksourceview/gtksourceview-utils.c	2014-07-13 16:14:20.550847767 +0200
+@@ -68,6 +68,8 @@
+ 							 basename,
+ 							 NULL));
+ 
++        g_ptr_array_add (dirs, g_build_filename ("@NIX_SHARE_PATH@", SOURCEVIEW_DIR, basename, NULL));
++
+ 	g_ptr_array_add (dirs, NULL);
+ 
+ 	return (gchar**) g_ptr_array_free (dirs, FALSE);
diff --git a/nixpkgs/pkgs/development/libraries/gtksourceview/3.x.nix b/nixpkgs/pkgs/development/libraries/gtksourceview/3.x.nix
new file mode 100644
index 000000000000..704a7c3e9c54
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtksourceview/3.x.nix
@@ -0,0 +1,58 @@
+{ lib, stdenv, fetchurl, pkg-config, atk, cairo, glib, gtk3, pango, vala
+, libxml2, perl, intltool, gettext, gobject-introspection, dbus, xvfb-run, shared-mime-info
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "gtksourceview";
+  version = "3.24.11";
+
+  src = let
+    inherit (finalAttrs) pname version;
+  in fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "1zbpj283b5ycz767hqz5kdq02wzsga65pp4fykvhg8xj6x50f6v9";
+  };
+
+  propagatedBuildInputs = [
+    # Required by gtksourceview-3.0.pc
+    gtk3
+    # Used by gtk_source_language_manager_guess_language
+    shared-mime-info
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ pkg-config intltool perl gobject-introspection vala ];
+
+  nativeCheckInputs = [ xvfb-run dbus ];
+
+  buildInputs = [ atk cairo glib pango libxml2 gettext ];
+
+  preBuild = ''
+    substituteInPlace gtksourceview/gtksourceview-utils.c --replace "@NIX_SHARE_PATH@" "$out/share"
+  '';
+
+  patches = [ ./3.x-nix_share_path.patch ];
+
+  enableParallelBuilding = true;
+
+  doCheck = stdenv.isLinux;
+  checkPhase = ''
+    NO_AT_BRIDGE=1 \
+    XDG_DATA_DIRS="$XDG_DATA_DIRS:${shared-mime-info}/share" \
+    xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
+      --config-file=${dbus}/share/dbus-1/session.conf \
+      make check
+  '';
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    homepage = "https://wiki.gnome.org/Projects/GtkSourceView";
+    pkgConfigModules = [ "gtksourceview-3.0" ];
+    platforms = with platforms; linux ++ darwin;
+    license = licenses.lgpl21;
+    maintainers = teams.gnome.members;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/gtksourceview/4.x-nix_share_path.patch b/nixpkgs/pkgs/development/libraries/gtksourceview/4.x-nix_share_path.patch
new file mode 100644
index 000000000000..a35d9a88d0df
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtksourceview/4.x-nix_share_path.patch
@@ -0,0 +1,11 @@
+--- a/gtksourceview/gtksourceutils.c
++++ b/gtksourceview/gtksourceutils.c
+@@ -232,6 +232,8 @@
+ 							 NULL));
+ 	}
+ 
++	g_ptr_array_add (dirs, g_build_filename (DATADIR, GSV_DATA_SUBDIR, basename, NULL));
++
+ 	g_ptr_array_add (dirs, NULL);
+ 
+ 	return (gchar **) g_ptr_array_free (dirs, FALSE);
diff --git a/nixpkgs/pkgs/development/libraries/gtksourceview/4.x.nix b/nixpkgs/pkgs/development/libraries/gtksourceview/4.x.nix
new file mode 100644
index 000000000000..df66d4b9eb72
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtksourceview/4.x.nix
@@ -0,0 +1,131 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch2
+, meson
+, ninja
+, pkg-config
+, atk
+, cairo
+, glib
+, gtk3
+, pango
+, fribidi
+, vala
+, libxml2
+, perl
+, gettext
+, gnome
+, gobject-introspection
+, dbus
+, xvfb-run
+, shared-mime-info
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "gtksourceview";
+  version = "4.8.4";
+
+  outputs = [ "out" "dev" ];
+
+  src = let
+    inherit (finalAttrs) pname version;
+  in fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "fsnRj7KD0fhKOj7/O3pysJoQycAGWXs/uru1lYQgqH0=";
+  };
+
+  patches = [
+    # By default, the library loads syntaxes from XDG_DATA_DIRS and user directory
+    # but not from its own datadr (it assumes it will be in XDG_DATA_DIRS).
+    # Since this is not generally true with Nix, let’s add $out/share unconditionally.
+    ./4.x-nix_share_path.patch
+
+    # nix.lang: Add Nix syntax highlighting
+    # https://gitlab.gnome.org/GNOME/gtksourceview/-/merge_requests/303
+    (fetchpatch2 {
+      url = "https://gitlab.gnome.org/GNOME/gtksourceview/-/commit/685b3bd08869c2aefe33fad696a7f5f2dc831016.patch";
+      hash = "sha256-yeYXJ2l/QS857C4UXOnMFyh0JsptA0TQt0lfD7wN5ic=";
+    })
+
+    # nix.lang: fix section name
+    (fetchpatch2 {
+      url = "https://gitlab.gnome.org/GNOME/gtksourceview/-/commit/1dbbb01da98140e0b2d5d0c6c2df29247650ed83.patch";
+      hash = "sha256-6HxLKQyI5DDvmKhmldQlwVPV62RfFa2gwWbcHA2cICs=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gettext
+    perl
+    gobject-introspection
+    vala
+  ];
+
+  buildInputs = [
+    atk
+    cairo
+    glib
+    pango
+    fribidi
+    libxml2
+  ];
+
+  propagatedBuildInputs = [
+    # Required by gtksourceview-4.0.pc
+    gtk3
+    # Used by gtk_source_language_manager_guess_language
+    shared-mime-info
+  ];
+
+  nativeCheckInputs = [
+    xvfb-run
+    dbus
+  ];
+
+  postPatch = ''
+    # https://gitlab.gnome.org/GNOME/gtksourceview/-/merge_requests/295
+    # build: drop unnecessary vapigen check
+    substituteInPlace meson.build \
+      --replace "if generate_vapi" "if false"
+  '';
+
+  # Broken by PCRE 2 bump in GLib.
+  # https://gitlab.gnome.org/GNOME/gtksourceview/-/issues/283
+  doCheck = false;
+
+  checkPhase = ''
+    runHook preCheck
+
+    XDG_DATA_DIRS="$XDG_DATA_DIRS:${shared-mime-info}/share" \
+    xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
+      --config-file=${dbus}/share/dbus-1/session.conf \
+      meson test --no-rebuild --print-errorlogs
+
+    runHook postCheck
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = "gtksourceview";
+      attrPath = "gtksourceview4";
+      versionPolicy = "odd-unstable";
+      freeze = true;
+    };
+  };
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    description = "Source code editing widget for GTK";
+    homepage = "https://wiki.gnome.org/Projects/GtkSourceView";
+    pkgConfigModules = [ "gtksourceview-4" ];
+    platforms = platforms.unix;
+    license = licenses.lgpl21Plus;
+    maintainers = teams.gnome.members;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/gtksourceview/5.x.nix b/nixpkgs/pkgs/development/libraries/gtksourceview/5.x.nix
new file mode 100644
index 000000000000..ee2d694c18ff
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtksourceview/5.x.nix
@@ -0,0 +1,119 @@
+{ lib
+, stdenv
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, glib
+, pcre2
+, gtk4
+, pango
+, fribidi
+, vala
+, gi-docgen
+, libxml2
+, perl
+, gettext
+, gnome
+, gobject-introspection
+, dbus
+, xvfb-run
+, shared-mime-info
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "gtksourceview";
+  version = "5.10.0";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = let
+    inherit (finalAttrs) pname version;
+  in fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "s4owEMNPWeE7BRdenSDKAqMRBEP+wrHldHQTgBvJwj8=";
+  };
+
+  patches = [
+    # By default, the library loads syntaxes from XDG_DATA_DIRS and user directory
+    # but not from its own datadr (it assumes it will be in XDG_DATA_DIRS).
+    # Since this is not generally true with Nix, let’s add $out/share unconditionally.
+    ./4.x-nix_share_path.patch
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gettext
+    perl
+    gobject-introspection
+    vala
+    gi-docgen
+    gtk4 # for gtk4-update-icon-cache checked during configure
+  ];
+
+  buildInputs = [
+    glib
+    pcre2
+    pango
+    fribidi
+    libxml2
+  ];
+
+  propagatedBuildInputs = [
+    # Required by gtksourceview-5.0.pc
+    gtk4
+    # Used by gtk_source_language_manager_guess_language
+    shared-mime-info
+  ];
+
+  nativeCheckInputs = [
+    xvfb-run
+    dbus
+  ];
+
+  mesonFlags = [
+    "-Dgtk_doc=true"
+  ];
+
+  doCheck = stdenv.isLinux;
+
+  checkPhase = ''
+    runHook preCheck
+
+    env \
+      XDG_DATA_DIRS="$XDG_DATA_DIRS:${shared-mime-info}/share" \
+      GTK_A11Y=none \
+      xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
+        --config-file=${dbus}/share/dbus-1/session.conf \
+        meson test --no-rebuild --print-errorlogs
+
+    runHook postCheck
+  '';
+
+  postFixup = ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = "gtksourceview";
+      attrPath = "gtksourceview5";
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    description = "Source code editing widget for GTK";
+    homepage = "https://wiki.gnome.org/Projects/GtkSourceView";
+    pkgConfigModules = [ "gtksourceview-5" ];
+    platforms = platforms.unix;
+    license = licenses.lgpl21Plus;
+    maintainers = teams.gnome.members;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/gtksourceviewmm/4.x.nix b/nixpkgs/pkgs/development/libraries/gtksourceviewmm/4.x.nix
new file mode 100644
index 000000000000..d6e7dfd3db56
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtksourceviewmm/4.x.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchurl, pkg-config, gtkmm3, glibmm, gtksourceview4, gnome }:
+
+stdenv.mkDerivation rec {
+  pname = "gtksourceviewmm";
+  version = "3.91.1";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "088p2ch1b4fvzl9416nw3waj0pqgp31cd5zj4lx5hzzrq2afgapy";
+  };
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      attrPath = "gtksourceviewmm4";
+      packageName = pname;
+      versionPolicy = "none";
+    };
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  propagatedBuildInputs = [ glibmm gtkmm3 gtksourceview4 ];
+
+  meta = with lib; {
+    platforms = platforms.linux;
+    homepage = "https://gitlab.gnome.org/GNOME/gtksourceviewmm";
+    description = "C++ wrapper for gtksourceview";
+    license = licenses.lgpl2;
+    maintainers = teams.gnome.members;
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/gtksourceviewmm/default.nix b/nixpkgs/pkgs/development/libraries/gtksourceviewmm/default.nix
new file mode 100644
index 000000000000..ec1396512929
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtksourceviewmm/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchurl, pkg-config, gtkmm3, glibmm, gtksourceview3, gnome }:
+
+stdenv.mkDerivation rec {
+  pname = "gtksourceviewmm";
+  version = "3.21.3";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/gtksourceviewmm/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "1danc9mp5mnb65j01qxkwj92z8jf1gns41wbgp17qh7050f0pc6v";
+  };
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = "gtksourceviewmm";
+      versionPolicy = "none";
+      freeze = true;
+    };
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ glibmm gtkmm3 gtksourceview3 ];
+
+  meta = with lib; {
+    platforms = platforms.unix;
+    homepage = "https://gitlab.gnome.org/GNOME/gtksourceviewmm";
+    description = "C++ wrapper for gtksourceview";
+    license = licenses.lgpl2;
+    maintainers = [ maintainers.juliendehos ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/gtkspell/3.nix b/nixpkgs/pkgs/development/libraries/gtkspell/3.nix
new file mode 100644
index 000000000000..3c7a6a3b3b23
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtkspell/3.nix
@@ -0,0 +1,30 @@
+{lib, stdenv, fetchurl, gtk3, aspell, pkg-config, enchant, isocodes, intltool, gobject-introspection, vala}:
+
+stdenv.mkDerivation rec {
+  pname = "gtkspell";
+  version = "3.0.10";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "mirror://sourceforge/gtkspell/gtkspell3-${version}.tar.xz";
+    sha256 = "0cjp6xdcnzh6kka42w9g0w2ihqjlq8yl8hjm9wsfnixk6qwgch5h";
+  };
+
+  nativeBuildInputs = [ pkg-config intltool gobject-introspection vala ];
+  buildInputs = [ aspell gtk3 enchant isocodes ];
+  propagatedBuildInputs = [ enchant ];
+
+  configureFlags = [
+    "--enable-introspection"
+    "--enable-vala"
+  ];
+
+  meta = with lib; {
+    homepage = "https://gtkspell.sourceforge.net/";
+    description = "Word-processor-style highlighting GtkTextView widget";
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gtkspell/default.nix b/nixpkgs/pkgs/development/libraries/gtkspell/default.nix
new file mode 100644
index 000000000000..eb8b1363c32b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtkspell/default.nix
@@ -0,0 +1,53 @@
+{ stdenv
+, lib
+, fetchurl
+, fetchpatch
+, autoreconfHook
+, docbook_xsl
+, gtk-doc
+, intltool
+, pkg-config
+, aspell
+, enchant
+, gtk2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gtkspell";
+  version = "2.0.16";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/gtkspell/${pname}-${version}.tar.gz";
+    sha256 = "00hdv28bp72kg1mq2jdz1sdw2b8mb9iclsp7jdqwpck705bdriwg";
+  };
+
+  patches = [
+    # Build with enchant 2
+    # https://github.com/archlinux/svntogit-packages/tree/packages/gtkspell/trunk
+    (fetchpatch {
+      url = "https://github.com/archlinux/svntogit-packages/raw/17fb30b5196db378c18e7c115f28e97b962b95ff/trunk/enchant-2.diff";
+      sha256 = "0d9409bnapwzwhnfpz3dvl6qalskqa4lzmhrmciazsypbw3ry5rf";
+    })
+  ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+    docbook_xsl
+    gtk-doc
+    intltool
+    pkg-config
+  ];
+
+  buildInputs = [
+    aspell
+    enchant
+    gtk2
+  ];
+
+  meta = with lib; {
+    description = "Word-processor-style highlighting and replacement of misspelled words";
+    homepage = "https://gtkspell.sourceforge.net";
+    platforms = platforms.unix;
+    license = licenses.gpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gtkspellmm/default.nix b/nixpkgs/pkgs/development/libraries/gtkspellmm/default.nix
new file mode 100644
index 000000000000..641ebbf9f08d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtkspellmm/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchurl
+, pkg-config
+, gtk3, glib, glibmm, gtkmm3, gtkspell3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gtkspellmm";
+  version = "3.0.5";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/gtkspell/gtkspellmm/" +
+          "${pname}-${version}.tar.xz";
+    sha256 = "0i8mxwyfv5mskachafa4qlh315q0cfph7s66s1s34nffadbmm1sv";
+  };
+
+  propagatedBuildInputs = [
+    gtkspell3
+  ];
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [
+    gtk3 glib glibmm gtkmm3
+  ];
+
+  meta = with lib; {
+    description = "C++ binding for the gtkspell library";
+    homepage = "https://gtkspell.sourceforge.net/";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gts/default.nix b/nixpkgs/pkgs/development/libraries/gts/default.nix
new file mode 100644
index 000000000000..5aa8aca6ffb3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gts/default.nix
@@ -0,0 +1,48 @@
+{ fetchurl, lib, stdenv, pkg-config, autoreconfHook, gettext, glib, buildPackages }:
+
+
+stdenv.mkDerivation rec {
+  pname = "gts";
+  version = "0.7.6";
+
+  outputs = [ "bin" "dev" "out" ];
+
+  src = fetchurl {
+    url = "mirror://sourceforge/gts/${pname}-${version}.tar.gz";
+    sha256 = "07mqx09jxh8cv9753y2d2jsv7wp8vjmrd7zcfpbrddz3wc9kx705";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+    autoreconfHook
+    glib  # required to satisfy AM_PATH_GLIB_2_0
+  ];
+  buildInputs = [ gettext ];
+  propagatedBuildInputs = [ glib ];
+
+  doCheck = false; # fails with "permission denied"
+
+  preBuild = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
+    pushd src
+    make CC=${buildPackages.stdenv.cc}/bin/cc predicates_init
+    mv predicates_init predicates_init_build
+    make clean
+    popd
+
+    substituteInPlace src/Makefile --replace "./predicates_init" "./predicates_init_build"
+  '';
+
+  meta = {
+    homepage = "https://gts.sourceforge.net/";
+    license = lib.licenses.lgpl2Plus;
+    description = "GNU Triangulated Surface Library";
+
+    longDescription = ''
+      Library intended to provide a set of useful functions to deal with
+      3D surfaces meshed with interconnected triangles.
+    '';
+
+    maintainers = [ lib.maintainers.viric ];
+    platforms = lib.platforms.linux ++ lib.platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gumbo/default.nix b/nixpkgs/pkgs/development/libraries/gumbo/default.nix
new file mode 100644
index 000000000000..68416ef2edc0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gumbo/default.nix
@@ -0,0 +1,27 @@
+{ lib
+, stdenv
+, fetchFromGitea
+, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "gumbo";
+  version = "0.12.1";
+
+  src = fetchFromGitea {
+    domain = "codeberg.org";
+    owner = "grisha";
+    repo = "gumbo-parser";
+    rev = version;
+    hash = "sha256-d4V4bI08Prmg3U0KGu4yIwpHcvTJT3NAd4lbzdBU/AE=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  meta = with lib; {
+    description = "C99 HTML parsing algorithm";
+    homepage = "https://github.com/google/gumbo-parser";
+    maintainers = [ maintainers.nico202 ];
+    platforms = with platforms; linux ++ darwin;
+    license = licenses.asl20;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gupnp-av/default.nix b/nixpkgs/pkgs/development/libraries/gupnp-av/default.nix
new file mode 100644
index 000000000000..c43f69fd97b5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gupnp-av/default.nix
@@ -0,0 +1,67 @@
+{ stdenv
+, lib
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, gobject-introspection
+, vala
+, gtk-doc
+, docbook-xsl-nons
+, docbook_xml_dtd_412
+, glib
+, libxml2
+, gnome
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gupnp-av";
+  version = "0.14.1";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "t5zgzEsMZtnFS8Ihg6EOVwmgAR0q8nICWUjvyrM6Pk8=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gobject-introspection
+    vala
+    gtk-doc
+    docbook-xsl-nons
+    docbook_xml_dtd_412
+  ];
+
+  buildInputs = [
+    glib
+    libxml2
+  ];
+
+  NIX_CFLAGS_COMPILE = [
+    "-Wno-error=deprecated-declarations"
+  ];
+
+  mesonFlags = [
+    "-Dgtk_doc=true"
+  ];
+
+  doCheck = true;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    homepage = "http://gupnp.org/";
+    description = "A collection of helpers for building AV (audio/video) applications using GUPnP";
+    license = licenses.lgpl2Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gupnp-dlna/default.nix b/nixpkgs/pkgs/development/libraries/gupnp-dlna/default.nix
new file mode 100644
index 000000000000..7761e3cbd880
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gupnp-dlna/default.nix
@@ -0,0 +1,68 @@
+{ stdenv
+, lib
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, gobject-introspection
+, vala
+, gtk-doc
+, docbook-xsl-nons
+, docbook_xml_dtd_412
+, libxml2
+, gst_all_1
+, gnome
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gupnp-dlna";
+  version = "0.12.0";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "PVO5b4W8VijTPjZ+yb8q2zjvKzTXrQQ0proM9K2QSOY=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gobject-introspection
+    vala
+    gtk-doc
+    docbook-xsl-nons
+    docbook_xml_dtd_412
+  ];
+
+  buildInputs = [
+    libxml2
+    gst_all_1.gst-plugins-base
+  ];
+
+  mesonFlags = [
+    "-Dgtk_doc=true"
+  ];
+
+  doCheck = true;
+
+  postPatch = ''
+    chmod +x tests/test-discoverer.sh.in
+    patchShebangs tests/test-discoverer.sh.in
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://wiki.gnome.org/Projects/GUPnP/";
+    description = "Library to ease DLNA-related bits for applications using GUPnP";
+    license = licenses.lgpl2Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gupnp-igd/default.nix b/nixpkgs/pkgs/development/libraries/gupnp-igd/default.nix
new file mode 100644
index 000000000000..60a3bfe91117
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gupnp-igd/default.nix
@@ -0,0 +1,71 @@
+{ lib, stdenv
+, fetchurl
+, pkg-config
+, meson
+, ninja
+, gettext
+, gobject-introspection
+, gtk-doc
+, docbook_xsl
+, docbook_xml_dtd_412
+, glib
+, gupnp
+, gnome
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gupnp-igd";
+  version = "1.2.0";
+
+  outputs = [ "out" "dev" ]
+    ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-S1EgCYqhPt0ngYup7k1/6WG/VAv1DQVv9wPGFUXgK+E=";
+  };
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+    meson
+    ninja
+    gettext
+    gobject-introspection
+    gtk-doc
+    docbook_xsl
+    docbook_xml_dtd_412
+  ];
+
+  propagatedBuildInputs = [
+    glib
+    gupnp
+  ];
+
+  mesonFlags = [
+    "-Dgtk_doc=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}"
+    "-Dintrospection=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}"
+  ];
+
+  # Seems to get stuck sometimes.
+  # https://github.com/NixOS/nixpkgs/issues/119288
+  #doCheck = true;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+      freeze = true;
+    };
+  };
+
+  meta = with lib; {
+    description = "Library to handle UPnP IGD port mapping";
+    homepage = "http://www.gupnp.org/";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gupnp/0001-pkg-config-Declare-header-dependencies-as-public.patch b/nixpkgs/pkgs/development/libraries/gupnp/0001-pkg-config-Declare-header-dependencies-as-public.patch
new file mode 100644
index 000000000000..46a2dae382d2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gupnp/0001-pkg-config-Declare-header-dependencies-as-public.patch
@@ -0,0 +1,55 @@
+From a3461f69222ef23b2edd411c5fc8daefea556a2c Mon Sep 17 00:00:00 2001
+From: Jan Tojnar <jtojnar@gmail.com>
+Date: Wed, 20 Oct 2021 20:55:29 +0200
+Subject: [PATCH] pkg-config: Declare header dependencies as public
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The headers include libsoup and libxml2 headers but those libraries are only
+listed in Requires.private. This does not matter for upstream pkg-config
+because it uses Cflags from libraries in Requires.private as well but as our
+pkg-config is patched to only use Requires.private for static linking.
+
+Let’s add libsoup-2.4 and libxml-2.0 to Requires rather than Requires.private
+to make the reverse dependencies correctly find their headers.
+---
+ libgupnp/meson.build | 2 +-
+ meson.build          | 3 ++-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/libgupnp/meson.build b/libgupnp/meson.build
+index cb8a102..5fda9d8 100644
+--- a/libgupnp/meson.build
++++ b/libgupnp/meson.build
+@@ -129,7 +129,7 @@ pkg.generate(
+     libgupnp,
+     subdirs: 'gupnp-1.2',
+     name : 'gupnp-1.2',
+-    requires : ['glib-2.0', 'gio-2.0', 'gssdp-1.2'],
++    requires : ['glib-2.0', 'gio-2.0', 'gssdp-1.2', 'libsoup-2.4 >= ' + libsoup_version, 'libxml-2.0'],
+     description : 'GObject-based UPnP library',
+     version : meson.project_version(),
+     filebase : 'gupnp-1.2'
+diff --git a/meson.build b/meson.build
+index 3790bcf..c96a983 100644
+--- a/meson.build
++++ b/meson.build
+@@ -25,12 +25,13 @@ gssdp_dep = dependency('gssdp-1.2', version : '>= 1.3.0', default_options: ['sni
+ 
+ gio_unix = dependency('gio-unix-2.0', version: '>= 2.44', required: host_machine.system() != 'windows')
+ 
++libsoup_version = '2.48.0'
+ dependencies = [
+     dependency('glib-2.0', version : '>= ' + glib_version),
+     dependency('gio-2.0', version : '>= ' + glib_version),
+     dependency('gmodule-2.0', version : '>= ' + glib_version),
+     dependency('gobject-2.0', version : '>= ' + glib_version),
+-    dependency('libsoup-2.4', version : '>= 2.48.0'),
++    dependency('libsoup-2.4', version : '>= ' + libsoup_version),
+     gssdp_dep,
+     dependency('libxml-2.0'),
+ ]
+-- 
+2.33.0
+
diff --git a/nixpkgs/pkgs/development/libraries/gupnp/1.6.nix b/nixpkgs/pkgs/development/libraries/gupnp/1.6.nix
new file mode 100644
index 000000000000..eb33748c4589
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gupnp/1.6.nix
@@ -0,0 +1,72 @@
+{ stdenv
+, lib
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, gobject-introspection
+, vala
+, gi-docgen
+, glib
+, gssdp_1_6
+, libsoup_3
+, libxml2
+, gnome
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gupnp";
+  version = "1.6.6";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/gupnp/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    hash = "sha256-ydxQ6MeLN5LRsObFxfUsk+k0XT2uKJHjEamTpXT1oE8=";
+  };
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gobject-introspection
+    vala
+    gi-docgen
+  ];
+
+  propagatedBuildInputs = [
+    glib
+    gssdp_1_6
+    libsoup_3
+    libxml2
+  ];
+
+  mesonFlags = [
+    "-Dgtk_doc=true"
+  ];
+
+  doCheck = true;
+
+  postFixup = ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      attrPath = "gupnp_1_6";
+      packageName = pname;
+    };
+  };
+
+  meta = with lib; {
+    homepage = "http://www.gupnp.org/";
+    description = "An implementation of the UPnP specification";
+    license = licenses.lgpl2Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gupnp/default.nix b/nixpkgs/pkgs/development/libraries/gupnp/default.nix
new file mode 100644
index 000000000000..4a8b250d2644
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gupnp/default.nix
@@ -0,0 +1,102 @@
+{ stdenv
+, lib
+, fetchurl
+, fetchpatch2
+, meson
+, ninja
+, pkg-config
+, gobject-introspection
+, vala
+, gtk-doc
+, docbook_xsl
+, docbook_xml_dtd_412
+, docbook_xml_dtd_45
+, glib
+, gssdp
+, libsoup
+, libxml2
+, libuuid
+, gnome
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gupnp";
+  version = "1.4.4";
+
+  outputs = [ "out" "dev" ]
+    ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/gupnp/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-N2GxXLBjYh+Efz7/t9djfwMXUA/Ka9oeGQT3OSF1Ch8=";
+  };
+
+  patches = [
+    # Bring .pc file in line with our patched pkg-config.
+    ./0001-pkg-config-Declare-header-dependencies-as-public.patch
+
+    # Unbreak build with Meson 1.2.0
+    # https://gitlab.gnome.org/GNOME/gupnp/-/merge_requests/33
+    (fetchpatch2 {
+      name = "meson-1.2-fix.patch";
+      url = "https://gitlab.gnome.org/GNOME/gupnp/-/commit/85c0244cfbf933d3e90d50ab68394c68d86f9ed5.patch";
+      hash = "sha256-poDhkEgDTpgGnTbbZLPwx8Alf0h81vmzJyx3izWmDGw=";
+    })
+
+    # Fix build against libxml2 2.11
+    # https://gitlab.gnome.org/GNOME/gupnp/-/merge_requests/34
+    (fetchpatch2 {
+      name = "libxml2-2.11-fix.patch";
+      url = "https://gitlab.gnome.org/GNOME/gupnp/-/commit/bc56f02b0f89e96f2bd74af811903d9931965f58.patch";
+      hash = "sha256-KCHlq7Es+WLIWKgIgGVTaHarVQIiZPEi5r6nMAhXTgY=";
+    })
+  ];
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gobject-introspection
+    vala
+    gtk-doc
+    docbook_xsl
+    docbook_xml_dtd_412
+    docbook_xml_dtd_45
+  ];
+
+  buildInputs = [
+    libuuid
+  ];
+
+  propagatedBuildInputs = [
+    glib
+    gssdp
+    libsoup
+    libxml2
+  ];
+
+  mesonFlags = [
+    "-Dgtk_doc=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}"
+  ];
+
+  # Bail out! ERROR:../tests/test-bugs.c:168:test_on_timeout: code should not be reached
+  doCheck = !stdenv.isDarwin;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      freeze = true;
+    };
+  };
+
+  meta = with lib; {
+    homepage = "http://www.gupnp.org/";
+    description = "An implementation of the UPnP specification";
+    license = licenses.lgpl2Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gusb/default.nix b/nixpkgs/pkgs/development/libraries/gusb/default.nix
new file mode 100644
index 000000000000..d6fe70440132
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gusb/default.nix
@@ -0,0 +1,90 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, substituteAll
+, meson
+, ninja
+, pkg-config
+, gobject-introspection
+, gi-docgen
+, python3
+, glib
+, libusb1
+, json-glib
+, vala
+, hwdata
+, umockdev
+}:
+
+let
+  pythonEnv = python3.pythonOnBuildForHost.withPackages (ps: with ps; [
+    setuptools
+  ]);
+in
+stdenv.mkDerivation rec {
+  pname = "gusb";
+  version = "0.4.8";
+
+  outputs = [ "bin" "out" "dev" "devdoc" ];
+
+  src = fetchFromGitHub {
+    owner = "hughsie";
+    repo = "libgusb";
+    rev = "refs/tags/${version}";
+    hash = "sha256-xhWx45uOh8Yokd3/32CQ6tsdkgGaYUOvaylrq/jmoP0=";
+  };
+
+  patches = [
+    (substituteAll {
+      src = ./fix-python-path.patch;
+      python = "${pythonEnv}/bin/python3";
+    })
+  ];
+
+  strictDeps = true;
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gobject-introspection
+    gi-docgen
+    vala
+  ];
+
+  # all required in gusb.pc
+  propagatedBuildInputs = [
+    glib
+    libusb1
+    json-glib
+  ];
+
+  mesonFlags = [
+    (lib.mesonBool "tests" doCheck)
+    (lib.mesonOption "usb_ids" "${hwdata}/share/hwdata/usb.ids")
+  ];
+
+  checkInputs = [
+    umockdev
+  ];
+
+  doCheck = false; # tests try to access USB
+
+  postFixup = ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    ls -la "$out/share/doc"
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  meta = with lib; {
+    description = "GLib libusb wrapper";
+    homepage = "https://github.com/hughsie/libgusb";
+    license = licenses.lgpl21;
+    maintainers = [ maintainers.marcweber ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gusb/fix-python-path.patch b/nixpkgs/pkgs/development/libraries/gusb/fix-python-path.patch
new file mode 100644
index 000000000000..5f04387a537e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gusb/fix-python-path.patch
@@ -0,0 +1,14 @@
+diff --git a/gusb/meson.build b/gusb/meson.build
+index 8236a2b..282aa48 100644
+--- a/gusb/meson.build
++++ b/gusb/meson.build
+@@ -147,7 +147,7 @@ libgusb_gir = libgusb_girtarget[0]
+ libgusb_typelib = libgusb_girtarget[1]
+ 
+ pymod = import('python')
+-py_installation = pymod.find_installation()
++py_installation = pymod.find_installation('@python@')
+ 
+ # Verify the map file is correct -- note we can't actually use the generated
+ # file for two reasons:
+
diff --git a/nixpkgs/pkgs/development/libraries/gvfs/default.nix b/nixpkgs/pkgs/development/libraries/gvfs/default.nix
new file mode 100644
index 000000000000..20278435cedf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gvfs/default.nix
@@ -0,0 +1,154 @@
+{ stdenv
+, lib
+, fetchurl
+, fetchpatch2
+, meson
+, ninja
+, pkg-config
+, substituteAll
+, gettext
+, dbus
+, glib
+, udevSupport ? stdenv.isLinux
+, libgudev
+, udisks2
+, libgcrypt
+, libcap
+, polkit
+, libgphoto2
+, avahi
+, libarchive
+, fuse3
+, libcdio
+, libxml2
+, libsoup_3
+, libxslt
+, docbook_xsl
+, docbook_xml_dtd_42
+, samba
+, libmtp
+, gnomeSupport ? false
+, gnome
+, gcr
+, glib-networking
+, gnome-online-accounts
+, wrapGAppsHook
+, libimobiledevice
+, libbluray
+, libcdio-paranoia
+, libnfs
+, openssh
+, libsecret
+, libgdata
+, python3
+, gsettings-desktop-schemas
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gvfs";
+  version = "1.52.2";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/gvfs/${lib.versions.majorMinor version}/gvfs-${version}.tar.xz";
+    hash = "sha256-pkOs6qBTyqwNjv+aAV9jbkvRuwnP4nhk40fbZ0YOe5E=";
+  };
+
+  patches = [
+    (substituteAll {
+      src = ./hardcode-ssh-path.patch;
+      ssh_program = "${lib.getBin openssh}/bin/ssh";
+    })
+  ];
+
+  postPatch = ''
+    patchShebangs test
+  '';
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    python3
+    pkg-config
+    gettext
+    wrapGAppsHook
+    libxslt
+    docbook_xsl
+    docbook_xml_dtd_42
+  ];
+
+  buildInputs = [
+    glib
+    libgcrypt
+    dbus
+    libgphoto2
+    avahi
+    libarchive
+    libimobiledevice
+    libbluray
+    libnfs
+    libxml2
+    gsettings-desktop-schemas
+    libsoup_3
+  ] ++ lib.optionals udevSupport [
+    libgudev
+    udisks2
+    fuse3
+    libcdio
+    samba
+    libmtp
+    libcap
+    polkit
+    libcdio-paranoia
+  ] ++ lib.optionals gnomeSupport [
+    gcr
+    glib-networking # TLS support
+    gnome-online-accounts
+    libsecret
+    libgdata
+  ];
+
+  mesonFlags = [
+    "-Dsystemduserunitdir=${placeholder "out"}/lib/systemd/user"
+    "-Dtmpfilesdir=no"
+  ] ++ lib.optionals (!udevSupport) [
+    "-Dgudev=false"
+    "-Dudisks2=false"
+    "-Dfuse=false"
+    "-Dcdda=false"
+    "-Dsmb=false"
+    "-Dmtp=false"
+    "-Dadmin=false"
+    "-Dgphoto2=false"
+    "-Dlibusb=false"
+    "-Dlogind=false"
+  ] ++ lib.optionals (!gnomeSupport) [
+    "-Dgcr=false"
+    "-Dgoa=false"
+    "-Dkeyring=false"
+    "-Dgoogle=false"
+  ] ++ lib.optionals (avahi == null) [
+    "-Ddnssd=false"
+  ] ++ lib.optionals (samba == null) [
+    # Xfce don't want samba
+    "-Dsmb=false"
+  ];
+
+  doCheck = false; # fails with "ModuleNotFoundError: No module named 'gi'"
+  doInstallCheck = doCheck;
+
+  separateDebugInfo = true;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    description = "Virtual Filesystem support library" + optionalString gnomeSupport " (full GNOME support)";
+    license = licenses.lgpl2Plus;
+    platforms = platforms.unix;
+    maintainers = teams.gnome.members;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gvfs/hardcode-ssh-path.patch b/nixpkgs/pkgs/development/libraries/gvfs/hardcode-ssh-path.patch
new file mode 100644
index 000000000000..aaf8e291aa8b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gvfs/hardcode-ssh-path.patch
@@ -0,0 +1,13 @@
+diff --git a/daemon/meson.build b/daemon/meson.build
+index 72a16890..718944e1 100644
+--- a/daemon/meson.build
++++ b/daemon/meson.build
+@@ -256,7 +256,7 @@ if enable_sftp
+     '-DDEFAULT_BACKEND_TYPE=sftp',
+     '-DBACKEND_TYPES="sftp", G_VFS_TYPE_BACKEND_SFTP,',
+     '-DMAX_JOB_THREADS=1',
+-    '-DSSH_PROGRAM="ssh"',
++    '-DSSH_PROGRAM="@ssh_program@"',
+   ]
+
+   programs += {'gvfsd-sftp': {'sources': sources, 'dependencies': deps, 'c_args': cflags}}
diff --git a/nixpkgs/pkgs/development/libraries/gvm-libs/default.nix b/nixpkgs/pkgs/development/libraries/gvm-libs/default.nix
new file mode 100644
index 000000000000..651dc26ca1ae
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gvm-libs/default.nix
@@ -0,0 +1,74 @@
+{ lib
+, stdenv
+, cmake
+, doxygen
+, fetchFromGitHub
+, glib
+, glib-networking
+, gnutls
+, gpgme
+, hiredis
+, libgcrypt
+, libnet
+, libpcap
+, libssh
+, libuuid
+, libxcrypt
+, libxml2
+, paho-mqtt-c
+, pkg-config
+, zlib
+, freeradius
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gvm-libs";
+  version = "22.8.0";
+
+  src = fetchFromGitHub {
+    owner = "greenbone";
+    repo = pname;
+    rev = "refs/tags/v${version}";
+    hash = "sha256-nFqYpt9OWEPgSbaNsHLhs9mg7ChQcmfcgHh7nFfQh18=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    doxygen
+    pkg-config
+  ];
+
+  buildInputs = [
+    glib
+    glib-networking
+    gnutls
+    gpgme
+    hiredis
+    libgcrypt
+    freeradius
+    libnet
+    libpcap
+    libssh
+    libuuid
+    libxcrypt
+    libxml2
+    paho-mqtt-c
+    zlib
+  ];
+
+  cmakeFlags = [
+    "-DGVM_RUN_DIR=${placeholder "out"}/run/gvm"
+  ];
+
+  # causes redefinition of _FORTIFY_SOURCE
+  hardeningDisable = [ "fortify3" ];
+
+  meta = with lib; {
+    description = "Libraries module for the Greenbone Vulnerability Management Solution";
+    homepage = "https://github.com/greenbone/gvm-libs";
+    changelog = "https://github.com/greenbone/gvm-libs/releases/tag/v${version}";
+    license = with licenses; [ gpl2Plus ];
+    maintainers = with maintainers; [ fab ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/half/default.nix b/nixpkgs/pkgs/development/libraries/half/default.nix
new file mode 100644
index 000000000000..557ed1ffe90e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/half/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchzip }:
+
+stdenv.mkDerivation rec {
+  version = "2.2.0";
+  pname = "half";
+
+  src = fetchzip {
+    url = "mirror://sourceforge/half/${version}/half-${version}.zip";
+    sha256 = "sha256-ZdGgBMZylFgkvs/XVBnvgBY2EYSHRLY3S4YwXjshpOY=";
+    stripRoot = false;
+  };
+
+  buildCommand = ''
+    mkdir -p $out/include $out/share/doc
+    cp $src/include/half.hpp               $out/include/
+    cp $src/{ChangeLog,LICENSE,README}.txt $out/share/doc/
+  '';
+
+  meta = with lib; {
+    description = "C++ library for half precision floating point arithmetics";
+    platforms = platforms.all;
+    license = licenses.mit;
+    maintainers = [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/hamlib/4.nix b/nixpkgs/pkgs/development/libraries/hamlib/4.nix
new file mode 100644
index 000000000000..8fde56729e83
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hamlib/4.nix
@@ -0,0 +1,64 @@
+{ lib
+, stdenv
+, fetchurl
+, perl
+, swig
+, gd
+, ncurses
+, python3
+, libxml2
+, tcl
+, libusb-compat-0_1
+, pkg-config
+, boost
+, libtool
+, perlPackages
+, pythonBindings ? true
+, tclBindings ? true
+, perlBindings ? true
+}:
+
+stdenv.mkDerivation rec {
+  pname = "hamlib";
+  version = "4.5.5";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
+    sha256 = "sha256-YByJ8y7SJelSet49ZNDQXSMgLAWuIf+nflnXDuRZf80=";
+  };
+
+  nativeBuildInputs = [
+    swig
+    pkg-config
+    libtool
+  ];
+
+  buildInputs = [
+    gd
+    libxml2
+    libusb-compat-0_1
+    boost
+  ] ++ lib.optionals pythonBindings [ python3 ncurses ]
+    ++ lib.optionals tclBindings [ tcl ]
+    ++ lib.optionals perlBindings [ perl perlPackages.ExtUtilsMakeMaker ];
+
+  configureFlags = lib.optionals perlBindings [ "--with-perl-binding" ]
+    ++ lib.optionals tclBindings [ "--with-tcl-binding" "--with-tcl=${tcl}/lib/" ]
+    ++ lib.optionals pythonBindings [ "--with-python-binding" ];
+
+  meta = with lib; {
+    description = "Runtime library to control radio transceivers and receivers";
+    longDescription = ''
+    Hamlib provides a standardized programming interface that applications
+    can use to send the appropriate commands to a radio.
+
+    Also included in the package is a simple radio control program 'rigctl',
+    which lets one control a radio transceiver or receiver, either from
+    command line interface or in a text-oriented interactive interface.
+    '';
+    license = with licenses; [ gpl2Plus lgpl2Plus ];
+    homepage = "https://hamlib.sourceforge.net";
+    maintainers = with maintainers; [ relrod ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/hamlib/default.nix b/nixpkgs/pkgs/development/libraries/hamlib/default.nix
new file mode 100644
index 000000000000..9250a66c219e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hamlib/default.nix
@@ -0,0 +1,71 @@
+{ lib
+, stdenv
+, fetchurl
+, perl
+, swig
+, gd
+, ncurses
+, python3
+, libxml2
+, tcl
+, libusb-compat-0_1
+, pkg-config
+, boost
+, libtool
+, perlPackages
+, pythonBindings ? true
+, tclBindings ? true
+, perlBindings ? stdenv.buildPlatform == stdenv.hostPlatform
+, buildPackages
+}:
+
+stdenv.mkDerivation rec {
+  pname = "hamlib";
+  version = "3.3";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
+    sha256 = "10788mgrhbc57zpzakcxv5aqnr2819pcshml6fbh8zvnkja562y9";
+  };
+
+  strictDeps = true;
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+  nativeBuildInputs = [
+    swig
+    pkg-config
+    libtool
+  ] ++ lib.optionals pythonBindings [ python3 ]
+    ++ lib.optionals tclBindings [ tcl ]
+    ++ lib.optionals perlBindings [ perl ];
+
+  buildInputs = [
+    gd
+    libxml2
+    libusb-compat-0_1
+    boost
+  ] ++ lib.optionals pythonBindings [ python3 ncurses ]
+    ++ lib.optionals tclBindings [ tcl ];
+
+
+  configureFlags = [
+    "CC_FOR_BUILD=${stdenv.cc.targetPrefix}cc"
+  ] ++ lib.optionals perlBindings [ "--with-perl-binding" ]
+    ++ lib.optionals tclBindings [ "--with-tcl-binding" "--with-tcl=${tcl}/lib/" ]
+    ++ lib.optionals pythonBindings [ "--with-python-binding" ];
+
+  meta = with lib; {
+    description = "Runtime library to control radio transceivers and receivers";
+    longDescription = ''
+    Hamlib provides a standardized programming interface that applications
+    can use to send the appropriate commands to a radio.
+
+    Also included in the package is a simple radio control program 'rigctl',
+    which lets one control a radio transceiver or receiver, either from
+    command line interface or in a text-oriented interactive interface.
+    '';
+    license = with licenses; [ gpl2Plus lgpl2Plus ];
+    homepage = "https://hamlib.sourceforge.net";
+    maintainers = with maintainers; [ relrod ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/harfbuzz/default.nix b/nixpkgs/pkgs/development/libraries/harfbuzz/default.nix
new file mode 100644
index 000000000000..993fca591e84
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/harfbuzz/default.nix
@@ -0,0 +1,125 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, pkg-config
+, glib
+, freetype
+, fontconfig
+, libintl
+, meson
+, ninja
+, gobject-introspection
+, buildPackages
+, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
+, icu
+, graphite2
+, harfbuzz # The icu variant uses and propagates the non-icu one.
+, ApplicationServices
+, CoreText
+, withCoreText ? false
+, withIcu ? false # recommended by upstream as default, but most don't needed and it's big
+, withGraphite2 ? true # it is small and major distros do include it
+, python3
+, gtk-doc
+, docbook-xsl-nons
+, docbook_xml_dtd_43
+# for passthru.tests
+, gimp
+, gtk3
+, gtk4
+, mapnik
+, qt5
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "harfbuzz${lib.optionalString withIcu "-icu"}";
+  version = "7.3.0";
+
+  src = fetchurl {
+    url = "https://github.com/harfbuzz/harfbuzz/releases/download/${finalAttrs.version}/harfbuzz-${finalAttrs.version}.tar.xz";
+    hash = "sha256-IHcHiXSaybqEbfM5g9vaItuDbHDZ9dBQy5qlNHCUqPs=";
+  };
+
+  postPatch = ''
+    patchShebangs src/*.py test
+  '' + lib.optionalString stdenv.isDarwin ''
+    # ApplicationServices.framework headers have cast-align warnings.
+    substituteInPlace src/hb.hh \
+      --replace '#pragma GCC diagnostic error   "-Wcast-align"' ""
+  '';
+
+  outputs = [ "out" "dev" "devdoc" ];
+  outputBin = "dev";
+
+  mesonFlags = [
+    # upstream recommends cairo, but it is only used for development purposes
+    # and is not part of the library.
+    # Cairo causes transitive (build) dependencies on various X11 or other
+    # GUI-related libraries, so it shouldn't be re-added lightly.
+    (lib.mesonEnable "cairo" false)
+    # chafa is only used in a development utility, not in the library
+    (lib.mesonEnable "chafa" false)
+    (lib.mesonEnable "coretext" withCoreText)
+    (lib.mesonEnable "graphite" withGraphite2)
+    (lib.mesonEnable "icu" withIcu)
+    (lib.mesonEnable "introspection" withIntrospection)
+  ];
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    libintl
+    pkg-config
+    python3
+    glib
+    gtk-doc
+    docbook-xsl-nons
+    docbook_xml_dtd_43
+  ] ++ lib.optional withIntrospection gobject-introspection;
+
+  buildInputs = [ glib freetype ]
+    ++ lib.optionals withCoreText [ ApplicationServices CoreText ];
+
+  propagatedBuildInputs = lib.optional withGraphite2 graphite2
+    ++ lib.optionals withIcu [ icu harfbuzz ];
+
+  doCheck = true;
+
+  # Slightly hacky; some pkgs expect them in a single directory.
+  postFixup = lib.optionalString withIcu ''
+    rm "$out"/lib/libharfbuzz.* "$dev/lib/pkgconfig/harfbuzz.pc"
+    ln -s {'${harfbuzz.dev}',"$dev"}/lib/pkgconfig/harfbuzz.pc
+    ${lib.optionalString stdenv.isDarwin ''
+      ln -s {'${harfbuzz.out}',"$out"}/lib/libharfbuzz.dylib
+      ln -s {'${harfbuzz.out}',"$out"}/lib/libharfbuzz.0.dylib
+    ''}
+  '';
+
+  passthru.tests = {
+    inherit gimp gtk3 gtk4 mapnik;
+    inherit (qt5) qtbase;
+    pkg-config = testers.hasPkgConfigModules {
+      package = finalAttrs.finalPackage;
+    };
+  };
+
+  meta = with lib; {
+    description = "An OpenType text shaping engine";
+    homepage = "https://harfbuzz.github.io/";
+    changelog = "https://github.com/harfbuzz/harfbuzz/raw/${version}/NEWS";
+    maintainers = [ maintainers.eelco ];
+    license = licenses.mit;
+    platforms = platforms.unix ++ platforms.windows;
+    pkgConfigModules = [
+      "harfbuzz"
+      "harfbuzz-gobject"
+      "harfbuzz-subset"
+    ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/hawknl/default.nix b/nixpkgs/pkgs/development/libraries/hawknl/default.nix
new file mode 100644
index 000000000000..6d60d62fcce7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hawknl/default.nix
@@ -0,0 +1,31 @@
+{lib, stdenv, fetchurl, unzip}:
+
+stdenv.mkDerivation rec {
+  pname = "hawknl";
+  version = "1.68";
+
+  src = fetchurl {
+    url = "http://urchlay.naptime.net/~urchlay/src/HawkNL${lib.replaceStrings ["."] [""] version}src.zip";
+    sha256 = "11shn2fbxj3w0j77w0234pqyj1368x686kkgv09q5yqhi1cdp028";
+  };
+
+  nativeBuildInputs = [ unzip ];
+
+  makefile = "makefile.linux";
+
+  patchPhase = ''
+    sed -i s/soname,NL/soname,libNL/ src/makefile.linux
+  '';
+
+  preInstall = ''
+    sed -i s,/usr/local,$out, src/makefile.linux
+    mkdir -p $out/lib $out/include
+  '';
+
+  meta = {
+    homepage = "http://hawksoft.com/hawknl/";
+    description = "Free, open source, game oriented network API";
+    license = lib.licenses.lgpl2Plus;
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/hax11/default.nix b/nixpkgs/pkgs/development/libraries/hax11/default.nix
new file mode 100644
index 000000000000..608411ec71f1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hax11/default.nix
@@ -0,0 +1,50 @@
+{ lib
+, multiStdenv
+, fetchFromGitHub
+, libX11
+, libXxf86vm
+, xorgproto
+, unstableGitUpdater
+}:
+
+multiStdenv.mkDerivation (finalAttrs: {
+  pname = "hax11";
+  version = "unstable-2023-09-25";
+
+  src = fetchFromGitHub {
+    owner = "CyberShadow";
+    repo = "hax11";
+    rev = "2ea9d469785bbe0338729c4deeb902a259fd7b10";
+    hash = "sha256-bYuIngZ76m5IgbbTFTZ8LJmpHl4nHS272Ci1B9eJIws=";
+  };
+
+  outputs = [ "out" "doc" ];
+
+  buildInputs = [
+    libX11
+    libXxf86vm
+    xorgproto
+  ];
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dm644 lib32/hax11.so -t $out/lib32/
+    install -Dm644 lib64/hax11.so -t $out/lib64/
+    install -Dm644 README.md -t $doc/share/doc/hax11/
+
+    runHook postInstall
+  '';
+
+  passthru = {
+    updateScript = unstableGitUpdater { };
+  };
+
+  meta = {
+    homepage = "https://github.com/CyberShadow/hax11";
+    description = "Hackbrary to Hook and Augment X11 protocol calls";
+    license = with lib.licenses; [ mit ];
+    maintainers = with lib.maintainers; [ AndersonTorres ];
+    platforms = lib.platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/hdf5-blosc/blosc_filter.pc.in b/nixpkgs/pkgs/development/libraries/hdf5-blosc/blosc_filter.pc.in
new file mode 100644
index 000000000000..04e29515d9b1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hdf5-blosc/blosc_filter.pc.in
@@ -0,0 +1,13 @@
+prefix=@out@
+includedir=${prefix}/include
+libdir=${prefix}/lib
+
+Name: blosc_filter
+Description: Blosc Filter
+URL: http://blosc.org/
+Version: @version@
+Requires: \
+  blosc \
+  hdf5
+Cflags: -isystem${includedir}
+Libs: -L${libdir} -Wl,-rpath,${libdir} -lblosc_filter
diff --git a/nixpkgs/pkgs/development/libraries/hdf5-blosc/default.nix b/nixpkgs/pkgs/development/libraries/hdf5-blosc/default.nix
new file mode 100644
index 000000000000..985660ff9073
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hdf5-blosc/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, c-blosc, cmake, hdf5, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "hdf5-blosc";
+  version = "1.0.0";
+
+  src = fetchFromGitHub {
+    owner = "Blosc";
+    repo = pname;
+    rev =  "v${version}";
+    sha256 = "1nj2bm1v6ymm3fmyvhbn6ih5fgdiapavlfghh1pvbmhw71cysyqs";
+  };
+
+  patches = [ ./no-external-blosc.patch ];
+
+  outputs = [ "out" "dev" "plugin" ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ c-blosc hdf5 ];
+
+  preConfigure = ''
+    substituteInPlace CMakeLists.txt --replace 'set(BLOSC_INSTALL_DIR "''${CMAKE_CURRENT_BINARY_DIR}/blosc")' 'set(BLOSC_INSTALL_DIR "${c-blosc}")'
+  '';
+
+  cmakeFlags = [
+    "-DPLUGIN_INSTALL_PATH=${placeholder "plugin"}/hdf5/lib/plugin"
+  ];
+
+  postInstall = ''
+    mkdir -p $out/lib/pkgconfig
+    substituteAll ${./blosc_filter.pc.in} $out/lib/pkgconfig/blosc_filter.pc
+  '';
+
+  meta = with lib; {
+    description = "Filter for HDF5 that uses the Blosc compressor";
+    homepage = "https://github.com/Blosc/hdf5-blosc";
+    license = licenses.mit;
+    maintainers = with maintainers; [ bhipple ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/hdf5-blosc/no-external-blosc.patch b/nixpkgs/pkgs/development/libraries/hdf5-blosc/no-external-blosc.patch
new file mode 100644
index 000000000000..8f2bd8579ed8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hdf5-blosc/no-external-blosc.patch
@@ -0,0 +1,26 @@
+--- a/CMakeLists.txt      2019-10-11 12:12:27.445417039 -0400
++++ b/CMakeLists.txt      2019-10-11 12:27:26.630691742 -0400
+@@ -22,14 +22,6 @@
+ message("BLOSC_CMAKE_ARGS='${BLOSC_CMAKE_ARGS}'")
+ message("GIT_EXECUTABLE='${GIT_EXECUTABLE}'")
+
+-ExternalProject_Add(project_blosc
+-  PREFIX ${BLOSC_PREFIX}
+-  GIT_REPOSITORY https://github.com/Blosc/c-blosc.git
+-  INSTALL_DIR ${BLOSC_INSTALL_DIR}
+-  CMAKE_ARGS ${BLOSC_CMAKE_ARGS}
+-)
+-
+-
+ # sources
+ set(SOURCES src/blosc_filter.c)
+ set(PLUGIN_SOURCES src/blosc_filter.c src/blosc_plugin.c )
+@@ -53,7 +45,6 @@
+ # add blosc libraries
+ add_library(blosc_shared SHARED IMPORTED)
+ set_property(TARGET blosc_shared PROPERTY IMPORTED_LOCATION ${BLOSC_INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}blosc${CMAKE_SHARED_LIBRARY_SUFFIX})
+-add_dependencies(blosc_shared project_blosc)
+ include_directories(${BLOSC_INSTALL_DIR}/include)
+
+ add_library(blosc_filter_shared SHARED ${SOURCES})
+
diff --git a/nixpkgs/pkgs/development/libraries/herqq/default.nix b/nixpkgs/pkgs/development/libraries/herqq/default.nix
new file mode 100644
index 000000000000..3e84432cd507
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/herqq/default.nix
@@ -0,0 +1,26 @@
+{ lib, mkDerivation, fetchFromGitHub, qmake, qtmultimedia, qtbase }:
+
+mkDerivation rec {
+  version = "unstable-20-06-26";
+  pname = "herqq";
+
+  nativeBuildInputs = [ qmake ];
+  buildInputs = [ qtbase qtmultimedia ];
+
+  outputs = [ "out" "dev" ];
+
+  sourceRoot = "${src.name}/herqq";
+  src = fetchFromGitHub {
+    owner = "ThomArmax";
+    repo = "HUPnP";
+    rev = "c8385a8846b52def7058ae3794249d6b566a41fc";
+    sha256 = "FxN/QlLB3sZ6Vn/9VIKNUntX/B4+crQZ7t760pwFqY8=";
+  };
+
+  meta = with lib; {
+    homepage = "http://herqq.org";
+    description = "A software library for building UPnP devices and control points";
+    platforms = platforms.linux;
+    maintainers = [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/hfst-ospell/default.nix b/nixpkgs/pkgs/development/libraries/hfst-ospell/default.nix
new file mode 100644
index 000000000000..f0a0bc6bef48
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hfst-ospell/default.nix
@@ -0,0 +1,56 @@
+{ lib
+, stdenv
+, autoreconfHook
+, fetchFromGitHub
+, fetchpatch
+, icu
+, libarchive
+, pkg-config
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "hfst-ospell";
+  version = "0.5.3";
+
+  src = fetchFromGitHub {
+    owner = "hfst";
+    repo = "hfst-ospell";
+    rev = "refs/tags/v${finalAttrs.version}";
+    hash = "sha256-16H1nbAIe+G71+TnlLG0WnH9LktZwmc0d0O+oYduH1k=";
+  };
+
+  patches = [
+    # Pull upstream fix for gcc-13
+    (fetchpatch {
+      name = "cstdint.patch";
+      url = "https://github.com/hfst/hfst-ospell/commit/7481bffbf622bc9aee3547183fbe8db9cf8b22ce.patch";
+      hash = "sha256-q/B5mLx8Oc0nIRe3n3gl0OTyjIaEMCBsPc1GvpE226c=";
+    })
+  ];
+
+  buildInputs = [
+    icu
+    libarchive
+  ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ];
+
+  # libxmlxx is listed as a dependency but Darwin build fails with it,
+  # might also be better in general since libxmlxx in Nixpkgs is 8 years old
+  # https://github.com/hfst/hfst-ospell/issues/48#issuecomment-546535653
+  configureFlags = [
+    "--without-libxmlpp"
+    "--without-tinyxml2"
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/hfst/hfst-ospell/";
+    description = "HFST spell checker library and command line tool ";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ lurkki ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/hfst/default.nix b/nixpkgs/pkgs/development/libraries/hfst/default.nix
new file mode 100644
index 000000000000..41707bbd4986
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hfst/default.nix
@@ -0,0 +1,53 @@
+{ lib
+, autoreconfHook
+, bison
+, flex
+, foma
+, fetchFromGitHub
+, gettext
+, icu
+, stdenv
+, swig
+, pkg-config
+, zlib
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "hfst";
+  version = "3.16.0";
+
+  src = fetchFromGitHub {
+    owner = "hfst";
+    repo = "hfst";
+    rev = "refs/tags/v${finalAttrs.version}";
+    hash = "sha256-2ST0s08Pcp+hTn7rUTgPE1QkH6PPWtiuFezXV3QW0kU=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    bison
+    flex
+    pkg-config
+    swig
+  ];
+
+  buildInputs = [
+    foma
+    gettext
+    icu
+    zlib
+  ];
+
+  configureFlags = [
+    "--enable-all-tools"
+    "--with-foma-upstream=true"
+  ];
+
+  meta = with lib; {
+    description = "FST language processing library";
+    homepage = "https://github.com/hfst/hfst";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ lurkki ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/hidapi/default.nix b/nixpkgs/pkgs/development/libraries/hidapi/default.nix
new file mode 100644
index 000000000000..dfba7f4e1171
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hidapi/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, libusb1
+, udev
+, Cocoa
+, IOKit
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "hidapi";
+  version = "0.14.0";
+
+  src = fetchFromGitHub {
+    owner = "libusb";
+    repo = "hidapi";
+    rev = "${finalAttrs.pname}-${finalAttrs.version}";
+    sha256 = "sha256-p3uzBq5VxxQbVuy1lEHEEQdxXwnhQgJDIyAAWjVWNIg=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = lib.optionals stdenv.isLinux [ libusb1 udev ];
+
+  enableParallelBuilding = true;
+
+  propagatedBuildInputs = lib.optionals stdenv.isDarwin [ Cocoa IOKit ];
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    description = "Library for communicating with USB and Bluetooth HID devices";
+    homepage = "https://github.com/libusb/hidapi";
+    maintainers = with maintainers; [ prusnak ];
+    # You can choose between GPLv3, BSD or HIDAPI license (even more liberal)
+    license = with licenses; [ bsd3 /* or */ gpl3Only ] ;
+    pkgConfigModules = lib.optionals stdenv.isDarwin [
+      "hidapi"
+    ] ++ lib.optionals stdenv.isLinux [
+      "hidapi-hidraw"
+      "hidapi-libusb"
+    ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/highfive/default.nix b/nixpkgs/pkgs/development/libraries/highfive/default.nix
new file mode 100644
index 000000000000..364c99fa2923
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/highfive/default.nix
@@ -0,0 +1,48 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+, boost
+, eigen
+, hdf5
+, mpiSupport ? hdf5.mpiSupport
+, mpi ? hdf5.mpi
+}:
+
+assert mpiSupport -> mpi != null;
+
+stdenv.mkDerivation rec {
+  pname = "highfive${lib.optionalString mpiSupport "-mpi"}";
+  version = "2.9.0";
+
+  src = fetchFromGitHub {
+    owner = "BlueBrain";
+    repo = "HighFive";
+    rev = "v${version}";
+    sha256 = "sha256-4n7J0qf4josYVsbVF4u+NLdecpA9gqHXCfibr0QfyJ4=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ boost eigen hdf5 ];
+
+  passthru = {
+    inherit mpiSupport mpi;
+  };
+
+  cmakeFlags = [
+    "-DHIGHFIVE_USE_BOOST=ON"
+    "-DHIGHFIVE_USE_EIGEN=ON"
+    "-DHIGHFIVE_EXAMPLES=OFF"
+    "-DHIGHFIVE_UNIT_TESTS=OFF"
+    "-DHIGHFIVE_USE_INSTALL_DEPS=ON"
+  ]
+  ++ (lib.optionals mpiSupport [ "-DHIGHFIVE_PARALLEL_HDF5=ON" ]);
+
+  meta = with lib; {
+    description = "Header-only C++ HDF5 interface";
+    license = licenses.boost;
+    homepage = "https://bluebrain.github.io/HighFive/";
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ robertodr ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/hiredis-vip/default.nix b/nixpkgs/pkgs/development/libraries/hiredis-vip/default.nix
new file mode 100644
index 000000000000..a4c7575ac041
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hiredis-vip/default.nix
@@ -0,0 +1,25 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+}:
+
+stdenv.mkDerivation rec {
+  pname = "hiredis-vip";
+  version = "0.3.0";
+
+  src = fetchFromGitHub {
+    owner = "vipshop";
+    repo = "hiredis-vip";
+    rev = version;
+    sha256 = "1z9zry635pxqv6d2cgk3dghb5qfpg9m7dz34ld4djw9b53hjr2z2";
+  };
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  meta = {
+    description = "A C client library for the Redis database";
+    homepage = "https://github.com/vipshop/hiredis-vip";
+    license = lib.licenses.bsd3;
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/hiredis/default.nix b/nixpkgs/pkgs/development/libraries/hiredis/default.nix
new file mode 100644
index 000000000000..fe9442b7d80d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hiredis/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchFromGitHub, openssl }:
+
+stdenv.mkDerivation rec {
+  pname = "hiredis";
+  version = "1.2.0";
+  nativeBuildInputs = [openssl];
+
+  src = fetchFromGitHub {
+    owner = "redis";
+    repo = "hiredis";
+    rev = "v${version}";
+    sha256 = "sha256-ZxUITm3OcbERcvaNqGQU46bEfV+jN6safPalG0TVfBg=";
+  };
+
+  PREFIX = "\${out}";
+  USE_SSL = 1;
+
+  meta = with lib; {
+    homepage = "https://github.com/redis/hiredis";
+    description = "Minimalistic C client for Redis >= 1.2";
+    license = licenses.bsd3;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/hivex/default.nix b/nixpkgs/pkgs/development/libraries/hivex/default.nix
new file mode 100644
index 000000000000..d8e320a44c19
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hivex/default.nix
@@ -0,0 +1,48 @@
+{ lib, stdenv, fetchurl, pkg-config, autoreconfHook, makeWrapper, perlPackages
+, ocamlPackages, libxml2, libintl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "hivex";
+  version = "1.3.23";
+
+  src = fetchurl {
+    url = "https://libguestfs.org/download/hivex/${pname}-${version}.tar.gz";
+    hash = "sha256-QM9UhPFclGciWfs7makL7285DmPzelKhwGgIogFqa70=";
+  };
+
+  patches = [ ./hivex-syms.patch ];
+
+  postPatch = ''
+    substituteInPlace ocaml/Makefile.am \
+        --replace '$(DESTDIR)$(OCAMLLIB)' '$(out)/lib/ocaml/${ocamlPackages.ocaml.version}/site-lib'
+  '';
+
+  strictDeps = true;
+  nativeBuildInputs = [ autoreconfHook makeWrapper perlPackages.perl pkg-config ]
+  ++ (with ocamlPackages; [ ocaml findlib ]);
+  buildInputs = [
+    libxml2
+  ]
+  ++ (with perlPackages; [ perl IOStringy ])
+  ++ lib.optionals stdenv.isDarwin [ libintl ];
+
+  enableParallelBuilding = true;
+
+  postInstall = ''
+    wrapProgram $out/bin/hivexregedit \
+        --set PERL5LIB "$out/${perlPackages.perl.libPrefix}" \
+        --prefix "PATH" : "$out/bin"
+
+    wrapProgram $out/bin/hivexml \
+        --prefix "PATH" : "$out/bin"
+  '';
+
+  meta = with lib; {
+    description = "Windows registry hive extraction library";
+    license = licenses.lgpl2Only;
+    homepage = "https://github.com/libguestfs/hivex";
+    maintainers = with maintainers; [offline];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/hivex/hivex-syms.patch b/nixpkgs/pkgs/development/libraries/hivex/hivex-syms.patch
new file mode 100644
index 000000000000..f2b06da6aaf1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hivex/hivex-syms.patch
@@ -0,0 +1,11 @@
+diff -rupN hivex-1.3.14/lib/Makefile.am hivex-1.3.14-new/lib/Makefile.am
+--- hivex-1.3.14/lib/Makefile.am	2013-09-10 13:04:12.000000000 +0200
++++ hivex-1.3.14-new/lib/Makefile.am	2014-11-06 01:31:05.956106861 +0100
+@@ -51,7 +51,6 @@
+ 	-pthread \
+ 	-version-info 0:0:0 \
+ 	-no-undefined \
+-	$(VERSION_SCRIPT_FLAGS)$(srcdir)/hivex.syms \
+ 	$(LTLIBICONV) \
+ 	$(LTLIBINTL) \
+ 	$(LTLIBTHREAD)
diff --git a/nixpkgs/pkgs/development/libraries/hmat-oss/default.nix b/nixpkgs/pkgs/development/libraries/hmat-oss/default.nix
new file mode 100644
index 000000000000..f24dc8777a73
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hmat-oss/default.nix
@@ -0,0 +1,37 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, blas
+, lapack
+}:
+
+
+stdenv.mkDerivation rec {
+  pname = "hmat-oss";
+  version = "1.9.0";
+
+  src = fetchFromGitHub {
+    owner = "jeromerobert";
+    repo = "hmat-oss";
+    rev = "refs/tags/${version}";
+    sha256 = "sha256-JW6zghoYnF7NcAuAACgTQoxANEnmwjUAB8jCpof7Ums=";
+  };
+
+  cmakeFlags = [
+    "-DHMAT_GIT_VERSION=OFF"
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ blas lapack ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "A hierarchical matrix C/C++ library";
+    homepage = "https://github.com/jeromerobert/hmat-oss";
+    license = licenses.gpl2;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ gdinh ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/hnswlib/default.nix b/nixpkgs/pkgs/development/libraries/hnswlib/default.nix
new file mode 100644
index 000000000000..4c5e46237760
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hnswlib/default.nix
@@ -0,0 +1,66 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, python3
+}:
+let
+  python = python3.withPackages(ps: with ps; [
+    numpy
+  ]);
+in
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "hnswlib";
+  version = "0.8.0";
+
+  src = fetchFromGitHub {
+    owner = "nmslib";
+    repo = "hnswlib";
+    rev = "refs/tags/v${finalAttrs.version}";
+    hash = "sha256-1KkAX42j/I06KO4wCnDsDifN1JiENqYKR5NNHBjyuVA=";
+  };
+
+  # this is a header-only library, so we don't need to build it
+  # we need `cmake` only to run tests
+  nativeCheckInputs = [
+    cmake
+    python
+  ];
+
+  # we only want to run buildPhase when we run tests
+  dontBuild = !finalAttrs.finalPackage.doCheck;
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dm644 $src/hnswlib/*.h -t $out/include/hnswlib
+
+    runHook postInstall
+  '';
+
+  doCheck = true;
+
+  preCheck = ''
+    pushd ../tests/cpp
+    ${python.interpreter} update_gen_data.py
+    popd
+  '';
+
+  checkPhase = ''
+    runHook preCheck
+
+    ./test_updates
+
+    runHook postCheck
+  '';
+
+  meta = with lib; {
+    description = "Header-only C++/python library for fast approximate nearest neighbors";
+    homepage = "https://github.com/nmslib/hnswlib";
+    changelog = "https://github.com/nmslib/hnswlib/releases/tag/${finalAttrs.src.rev}";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ natsukium ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/hotpatch/default.nix b/nixpkgs/pkgs/development/libraries/hotpatch/default.nix
new file mode 100644
index 000000000000..66be524a86ca
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hotpatch/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "hotpatch";
+  version = "0.2";
+
+  src = fetchFromGitHub {
+    owner = "vikasnkumar";
+    repo = "hotpatch";
+    rev = "4b65e3f275739ea5aa798d4ad083c4cb10e29149";
+    sha256 = "169vdh55wsbn6fl58lpzqx64v6ifzh7krykav33x1d9hsk98qjqh";
+  };
+
+  doCheck = true;
+
+  nativeBuildInputs = [ cmake ];
+
+  preConfigure = ''
+    substituteInPlace test/loader.c \
+      --replace \"/lib64/ld-linux-x86-64.so.2 \""$(cat $NIX_CC/nix-support/dynamic-linker)" \
+      --replace \"/lib/ld-linux-x86-64.so.2 \""$(cat $NIX_CC/nix-support/dynamic-linker)" \
+      --replace \"/lib/ld-linux.so.2 \""$(cat $NIX_CC/nix-support/dynamic-linker)" \
+      --replace \"/lib32/ld-linux.so.2 \""$(cat $NIX_CC/nix-support/dynamic-linker)"
+  '';
+
+  checkPhase = ''
+    LD_LIBRARY_PATH=$(pwd)/src make test
+  '';
+
+  patches = [ ./no-loader-test.patch ];
+
+  meta = with lib; {
+    description = "Hot patching executables on Linux using .so file injection";
+    homepage = src.meta.homepage;
+    license = licenses.bsd3;
+    maintainers = [ ];
+    platforms = ["i686-linux" "x86_64-linux"];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/hotpatch/no-loader-test.patch b/nixpkgs/pkgs/development/libraries/hotpatch/no-loader-test.patch
new file mode 100644
index 000000000000..5bc975bb848a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hotpatch/no-loader-test.patch
@@ -0,0 +1,25 @@
+diff --git a/test/loader.c b/test/loader.c
+index 4e3dfdc..7f98d94 100644
+--- a/test/loader.c
++++ b/test/loader.c
+@@ -54,20 +54,6 @@ int main(int argc, char **argv)
+ 	assert(ret < 0);
+ 	ret = ld_find_library(maps, mapnum, "libc", false, NULL, 6);
+ 	assert(ret >= 0);
+-#if __WORDSIZE == 64
+-	ret = ld_find_library(maps, mapnum, "/lib64/ld-linux-x86-64.so.2",
+-						  true, NULL, 6);
+-	assert(ret >= 0);
+-	ret = ld_find_library(maps, mapnum, "/lib/ld-linux-x86-64.so.2",
+-						  false, NULL, 6);
+-#else
+-	ret = ld_find_library(maps, mapnum, "/lib/ld-linux.so.2",
+-						  true, NULL, 6);
+-	assert(ret >= 0);
+-	ret = ld_find_library(maps, mapnum, "/lib32/ld-linux.so.2",
+-						  false, NULL, 6);
+-#endif
+-	assert(ret < 0);
+ 	ld_free_maps(maps, mapnum);
+     return 0;
+ }
diff --git a/nixpkgs/pkgs/development/libraries/howard-hinnant-date/default.nix b/nixpkgs/pkgs/development/libraries/howard-hinnant-date/default.nix
new file mode 100644
index 000000000000..4f3e74f5d8a8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/howard-hinnant-date/default.nix
@@ -0,0 +1,64 @@
+{ lib, stdenv, fetchFromGitHub, cmake, tzdata, fetchpatch, substituteAll }:
+
+stdenv.mkDerivation rec {
+  pname = "howard-hinnant-date";
+  version = "3.0.1";
+
+  src = fetchFromGitHub {
+    owner = "HowardHinnant";
+    repo = "date";
+    rev = "v${version}";
+    sha256 = "1qk7pgnk0bpinja28104qha6f7r1xwh5dy3gra7vjkqwl0jdwa35";
+  };
+
+  patches = [
+    # Add pkg-config file
+    # https://github.com/HowardHinnant/date/pull/538
+    (fetchpatch {
+      name = "output-date-pc-for-pkg-config.patch";
+      url = "https://git.alpinelinux.org/aports/plain/community/date/538-output-date-pc-for-pkg-config.patch?id=11f6b4d4206b0648182e7b41cd57dcc9ccea0728";
+      sha256 = "1ma0586jsd89jgwbmd2qlvlc8pshs1pc4zk5drgxi3qvp8ai1154";
+    })
+    # Fix CMake include directory path.
+    # https://github.com/HowardHinnant/date/pull/753
+    (fetchpatch {
+      name = "fix-cmake-include-dir.patch";
+      url = "https://github.com/HowardHinnant/date/commit/8061b53c489b0c8676feedcb65049b27664327b5.patch";
+      hash = "sha256-weZUgu0SDad7EK7msUbVzk1zY4euI0Biafj/5jD4JV4=";
+    })
+    # Without this patch, this library will drop a `tzdata` directory into
+    # `~/Downloads` if it cannot find `/usr/share/zoneinfo`. Make the path it
+    # searches for `zoneinfo` be the one from the `tzdata` package.
+    (substituteAll {
+      src = ./make-zoneinfo-available.diff;
+      inherit tzdata;
+    })
+  ];
+
+  # Tweaks to fix undefined variable substitutions
+  # https://github.com/HowardHinnant/date/pull/538#pullrequestreview-1373268697
+  postPatch = ''
+    substituteInPlace date.pc.in \
+      --replace '@CMAKE_INSTALL_LIB@' '@CMAKE_INSTALL_FULL_LIBDIR@' \
+      --replace '@CMAKE_INSTALL_INCLUDE@' '@CMAKE_INSTALL_FULL_INCLUDEDIR@' \
+      --replace '@PACKAGE_VERSION@' '${version}'
+  '';
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [
+    "-DBUILD_TZ_LIB=true"
+    "-DBUILD_SHARED_LIBS=true"
+    "-DUSE_SYSTEM_TZ_DB=true"
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  meta = with lib; {
+    license = licenses.mit;
+    description = "A date and time library based on the C++11/14/17 <chrono> header";
+    homepage = "https://github.com/HowardHinnant/date";
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ r-burns ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/howard-hinnant-date/make-zoneinfo-available.diff b/nixpkgs/pkgs/development/libraries/howard-hinnant-date/make-zoneinfo-available.diff
new file mode 100644
index 000000000000..f9e69ff38cbb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/howard-hinnant-date/make-zoneinfo-available.diff
@@ -0,0 +1,13 @@
+diff --git a/src/tz.cpp b/src/tz.cpp
+index 68436c3..2bfe19e 100644
+--- a/src/tz.cpp
++++ b/src/tz.cpp
+@@ -349,7 +349,7 @@ discover_tz_dir()
+     struct stat sb;
+     using namespace std;
+ #  ifndef __APPLE__
+-    CONSTDATA auto tz_dir_default = "/usr/share/zoneinfo";
++    CONSTDATA auto tz_dir_default = "@tzdata@/share/zoneinfo";
+     CONSTDATA auto tz_dir_buildroot = "/usr/share/zoneinfo/uclibc";
+ 
+     // Check special path which is valid for buildroot with uclibc builds
diff --git a/nixpkgs/pkgs/development/libraries/hpp-fcl/default.nix b/nixpkgs/pkgs/development/libraries/hpp-fcl/default.nix
new file mode 100644
index 000000000000..c91d3cbaac4f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hpp-fcl/default.nix
@@ -0,0 +1,63 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, boost
+, eigen
+, assimp
+, octomap
+, qhull
+, pythonSupport ? false
+, python3Packages
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "hpp-fcl";
+  version = "2.4.1";
+
+  src = fetchFromGitHub {
+    owner = "humanoid-path-planner";
+    repo = finalAttrs.pname;
+    rev = "v${finalAttrs.version}";
+    fetchSubmodules = true;
+    hash = "sha256-Suow6dvDZI0uS/CkzfkWIxYjn+i4Fbyd2EnqlxM2gMY=";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  propagatedBuildInputs = [
+    assimp
+    qhull
+    octomap
+  ] ++ lib.optionals (!pythonSupport) [
+    boost
+    eigen
+  ] ++ lib.optionals pythonSupport [
+    python3Packages.boost
+    python3Packages.eigenpy
+  ];
+
+  cmakeFlags = [
+    "-DHPP_FCL_HAS_QHULL=ON"
+  ] ++ lib.optionals (!pythonSupport) [
+    "-DBUILD_PYTHON_INTERFACE=OFF"
+  ];
+
+  doCheck = true;
+  pythonImportsCheck = lib.optionals (!pythonSupport) [
+    "hppfcl"
+  ];
+
+  meta = with lib; {
+    description = "An extension of the Flexible Collision Library";
+    homepage = "https://github.com/humanoid-path-planner/hpp-fcl";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ nim65s ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/hpx/default.nix b/nixpkgs/pkgs/development/libraries/hpx/default.nix
new file mode 100644
index 000000000000..bcaf1233d300
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hpx/default.nix
@@ -0,0 +1,38 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, asio
+, boost
+, cmake
+, hwloc
+, gperftools
+, ninja
+, pkg-config
+, python3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "hpx";
+  version = "1.9.1";
+
+  src = fetchFromGitHub {
+    owner = "STEllAR-GROUP";
+    repo = "hpx";
+    rev = "v${version}";
+    hash = "sha256-1gLDwgCqv+3+rOSG7a3fFsnjqfKpnPpWnBmrW+z+jWw=";
+  };
+
+  propagatedBuildInputs = [ hwloc ];
+  buildInputs = [ asio boost gperftools ];
+  nativeBuildInputs = [ cmake pkg-config python3 ];
+
+  strictDeps = true;
+
+  meta = {
+    description = "C++ standard library for concurrency and parallelism";
+    homepage = "https://github.com/STEllAR-GROUP/hpx";
+    license = lib.licenses.boost;
+    platforms = [ "x86_64-linux" ]; # lib.platforms.linux;
+    maintainers = with lib.maintainers; [ bobakker ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/hspell/default.nix b/nixpkgs/pkgs/development/libraries/hspell/default.nix
new file mode 100644
index 000000000000..2a65afad809a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hspell/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchurl, perl, zlib, buildPackages }:
+
+stdenv.mkDerivation rec {
+  name = "${passthru.pname}-${passthru.version}";
+
+  passthru = {
+    pname = "hspell";
+    version = "1.1";
+  };
+
+  PERL_USE_UNSAFE_INC = "1";
+
+  src = fetchurl {
+    url = "${meta.homepage}${name}.tar.gz";
+    sha256 = "08x7rigq5pa1pfpl30qp353hbdkpadr1zc49slpczhsn0sg36pd6";
+  };
+
+  patchPhase = "patchShebangs .";
+  preBuild = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
+    make CC=${buildPackages.stdenv.cc}/bin/cc find_sizes
+    mv find_sizes find_sizes_build
+    make clean
+
+    substituteInPlace Makefile --replace "./find_sizes" "./find_sizes_build"
+    substituteInPlace Makefile --replace "ar cr" "${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar cr"
+    substituteInPlace Makefile --replace "ranlib" "${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ranlib"
+    substituteInPlace Makefile --replace "STRIP=strip" "STRIP=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}strip"
+  '';
+  nativeBuildInputs = [ perl zlib ];
+#  buildInputs = [ zlib ];
+
+  meta = with lib; {
+    description = "Hebrew spell checker";
+    homepage = "http://hspell.ivrix.org.il/";
+    platforms = platforms.all;
+    license = licenses.gpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/hspell/dicts.nix b/nixpkgs/pkgs/development/libraries/hspell/dicts.nix
new file mode 100644
index 000000000000..e11cbbce3336
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hspell/dicts.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, hspell }:
+
+let
+  dict = variant: a: stdenv.mkDerivation ({
+    inherit (hspell) version src patchPhase nativeBuildInputs;
+    buildFlags = [ variant ];
+
+    meta = hspell.meta // {
+      broken = true;
+      description = "${variant} Hebrew dictionary";
+    } // (lib.optionalAttrs (a ? meta) a.meta);
+  } // (removeAttrs a ["meta"]));
+in
+{
+  recurseForDerivations = true;
+
+  aspell = dict "aspell" {
+    pname = "aspell-dict-he";
+
+    installPhase = ''
+      mkdir -p $out/lib/aspell
+      cp -v he_affix.dat he.wl $out/lib/aspell'';
+  };
+
+  myspell = dict "myspell" {
+    pname = "myspell-dict-he";
+
+    installPhase = ''
+      mkdir -p $out/lib/myspell
+      cp -v he.dic he.aff $out/lib/myspell'';
+  };
+
+  hunspell = dict "hunspell" {
+    pname = "hunspell-dict-he";
+
+    installPhase = ''
+      mkdir -p $out/lib
+      cp -rv hunspell $out/lib'';
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/htmlcxx/c++17.patch b/nixpkgs/pkgs/development/libraries/htmlcxx/c++17.patch
new file mode 100644
index 000000000000..53fa9fbfc8c1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/htmlcxx/c++17.patch
@@ -0,0 +1,24 @@
+diff --color -Naur a/html/CharsetConverter.cc b/html/CharsetConverter.cc
+--- a/html/CharsetConverter.cc	2018-12-29 03:13:56.000000000 +0000
++++ b/html/CharsetConverter.cc	2021-05-31 23:03:10.705334580 +0100
+@@ -7,7 +7,7 @@
+ using namespace std;
+ using namespace htmlcxx;
+ 
+-CharsetConverter::CharsetConverter(const string &from, const string &to) throw (Exception)
++CharsetConverter::CharsetConverter(const string &from, const string &to)
+ {
+ 	mIconvDescriptor = iconv_open(to.c_str(), from.c_str());
+ 	if (mIconvDescriptor == (iconv_t)(-1))
+diff --color -Naur a/html/CharsetConverter.h b/html/CharsetConverter.h
+--- a/html/CharsetConverter.h	2018-12-29 03:13:56.000000000 +0000
++++ b/html/CharsetConverter.h	2021-05-31 23:03:19.042574598 +0100
+@@ -17,7 +17,7 @@
+ 						: std::runtime_error(arg) {}
+ 			};
+ 			
+-			CharsetConverter(const std::string &from, const std::string &to) throw (Exception);
++			CharsetConverter(const std::string &from, const std::string &to);
+ 			~CharsetConverter();
+ 			
+ 			std::string convert(const std::string &input);
diff --git a/nixpkgs/pkgs/development/libraries/htmlcxx/default.nix b/nixpkgs/pkgs/development/libraries/htmlcxx/default.nix
new file mode 100644
index 000000000000..41e86b275fe4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/htmlcxx/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchurl, autoreconfHook, libiconv }:
+
+stdenv.mkDerivation rec {
+  pname = "htmlcxx";
+  version = "0.87";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/htmlcxx/v${version}/${pname}-${version}.tar.gz";
+    sha256 = "sha256-XTj5OM9N+aKYpTRq8nGV//q/759GD8KgIjPLz6j8dcg=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ libiconv ];
+  patches = [
+    ./ptrdiff.patch
+    ./c++17.patch
+  ];
+
+  meta = with lib; {
+    homepage = "https://htmlcxx.sourceforge.net/";
+    description = "A simple non-validating css1 and html parser for C++";
+    license = licenses.lgpl2;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/htmlcxx/ptrdiff.patch b/nixpkgs/pkgs/development/libraries/htmlcxx/ptrdiff.patch
new file mode 100644
index 000000000000..6348ba24f8da
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/htmlcxx/ptrdiff.patch
@@ -0,0 +1,13 @@
+diff -rc htmlcxx-orig-0.85/html/tree.h htmlcxx-0.85/html/tree.h
+*** htmlcxx-orig-0.85/html/tree.h	2015-09-02 13:57:17.988688798 +0200
+--- htmlcxx-0.85/html/tree.h	2015-09-02 13:57:52.737768811 +0200
+***************
+*** 45,50 ****
+--- 45,51 ----
+  #ifndef tree_hh_
+  #define tree_hh_
+  
++ #include <cstddef>
+  #include <cassert>
+  #include <memory>
+  #include <stdexcept>
diff --git a/nixpkgs/pkgs/development/libraries/http-parser/default.nix b/nixpkgs/pkgs/development/libraries/http-parser/default.nix
new file mode 100644
index 000000000000..65ac1fe92c13
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/http-parser/default.nix
@@ -0,0 +1,67 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch
+, enableShared ? !stdenv.hostPlatform.isStatic
+, enableStatic ? stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+  pname = "http-parser";
+  version = "2.9.4";
+
+  src = fetchFromGitHub {
+    owner = "nodejs";
+    repo = "http-parser";
+    rev = "v${version}";
+    sha256 = "1vda4dp75pjf5fcph73sy0ifm3xrssrmf927qd1x8g3q46z0cv6c";
+  };
+
+  env.NIX_CFLAGS_COMPILE = "-Wno-error";
+
+  patches = [
+    ./enable-static-shared.patch
+  ] ++ lib.optionals stdenv.isAarch32 [
+    # https://github.com/nodejs/http-parser/pull/510
+    (fetchpatch {
+      url = "https://github.com/nodejs/http-parser/commit/4f15b7d510dc7c6361a26a7c6d2f7c3a17f8d878.patch";
+      sha256 = "sha256-rZZMJeow3V1fTnjadRaRa+xTq3pdhZn/eJ4xjxEDoU4=";
+    })
+  ];
+
+  makeFlags = [
+    "DESTDIR="
+    "PREFIX=$(out)"
+    "BINEXT=${stdenv.hostPlatform.extensions.executable}"
+    "Platform=${lib.toLower stdenv.hostPlatform.uname.system}"
+    "AEXT=${lib.strings.removePrefix "." stdenv.hostPlatform.extensions.staticLibrary}"
+    "ENABLE_SHARED=${if enableShared then "1" else "0"}"
+    "ENABLE_STATIC=${if enableStatic then "1" else "0"}"
+  ] ++ lib.optionals enableShared [
+    "SOEXT=${lib.strings.removePrefix "." stdenv.hostPlatform.extensions.sharedLibrary}"
+  ] ++ lib.optionals enableStatic [
+    "AEXT=${lib.strings.removePrefix "." stdenv.hostPlatform.extensions.staticLibrary}"
+  ] ++ lib.optionals (enableShared && stdenv.hostPlatform.isWindows) [
+    "SONAME=$(SOLIBNAME).$(SOMAJOR).$(SOMINOR).$(SOEXT)"
+    "LIBNAME=$(SOLIBNAME).$(SOMAJOR).$(SOMINOR).$(SOREV).$(SOEXT)"
+    "LDFLAGS=-Wl,--out-implib=$(LIBNAME).a"
+  ];
+
+  buildFlags = lib.optional enableShared "library"
+    ++ lib.optional enableStatic "package";
+
+  doCheck = true;
+  checkTarget = "test";
+
+  enableParallelBuilding = true;
+
+  postInstall = lib.optionalString stdenv.hostPlatform.isWindows ''
+    install -D *.dll.a $out/lib
+    ln -sf libhttp_parser.${version}.dll.a $out/lib/libhttp_parser.dll.a
+  '';
+
+  meta = with lib; {
+    description = "An HTTP message parser written in C";
+    homepage = "https://github.com/nodejs/http-parser";
+    maintainers = with maintainers; [ matthewbauer ];
+    license = licenses.mit;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/http-parser/enable-static-shared.patch b/nixpkgs/pkgs/development/libraries/http-parser/enable-static-shared.patch
new file mode 100644
index 000000000000..42f11d4c817f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/http-parser/enable-static-shared.patch
@@ -0,0 +1,93 @@
+commit abcb3cca9452779e91380b7636f32745166af3de
+Author: John Ericson <John.Ericson@Obsidian.Systems>
+Date:   Wed Nov 29 23:55:38 2023 -0500
+
+    Make build system: enable/disable shared/static support
+    
+    This allows building this package in static-lib-only distros.
+
+diff --git a/Makefile b/Makefile
+index 5d21221..cbc7914 100644
+--- a/Makefile
++++ b/Makefile
+@@ -18,6 +18,9 @@
+ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ # IN THE SOFTWARE.
+ 
++ENABLE_SHARED ?= 1
++ENABLE_STATIC ?=
++
+ PLATFORM ?= $(shell sh -c 'uname -s | tr "[A-Z]" "[a-z]"')
+ HELPER ?=
+ BINEXT ?=
+@@ -25,6 +28,8 @@ SOLIBNAME = libhttp_parser
+ SOMAJOR = 2
+ SOMINOR = 9
+ SOREV   = 4
++AEXT    = a
++STATICLIBNAME = $(SOLIBNAME).$(AEXT)
+ ifeq (darwin,$(PLATFORM))
+ SOEXT ?= dylib
+ SONAME ?= $(SOLIBNAME).$(SOMAJOR).$(SOMINOR).$(SOEXT)
+@@ -109,11 +114,17 @@ test-valgrind: test_g
+ libhttp_parser.o: http_parser.c http_parser.h Makefile
+ 	$(CC) $(CPPFLAGS_FAST) $(CFLAGS_LIB) -c http_parser.c -o libhttp_parser.o
+ 
+-library: libhttp_parser.o
+-	$(CC) $(LDFLAGS_LIB) -o $(LIBNAME) $<
++.PHONY: library
++library: $(LIBNAME)
++
++$(LIBNAME): libhttp_parser.o
++	$(CC) $(LDFLAGS_LIB) -o $@ $<
+ 
+-package: http_parser.o
+-	$(AR) rcs libhttp_parser.a http_parser.o
++.PHONY: package
++package: $(STATICLIBNAME)
++
++$(STATICLIBNAME): http_parser.o
++	$(AR) rcs $@ $<
+ 
+ url_parser: http_parser.o contrib/url_parser.c
+ 	$(CC) $(CPPFLAGS_FAST) $(CFLAGS_FAST) $^ -o $@
+@@ -130,12 +141,30 @@ parsertrace_g: http_parser_g.o contrib/parsertrace.c
+ tags: http_parser.c http_parser.h test.c
+ 	ctags $^
+ 
+-install: library
++.PHONY: install-headers
++install-headers:
+ 	$(INSTALL) -D  http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h
++
++.PHONY: install-library
++install-library: library
+ 	$(INSTALL) -D $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME)
+ 	ln -sf $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME)
+ 	ln -sf $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SOLIBNAME).$(SOEXT)
+ 
++.PHONY: install-package
++install-package: package
++	$(INSTALL) -D $(STATICLIBNAME) $(DESTDIR)$(LIBDIR)/$(STATICLIBNAME)
++
++.PHONY: install
++install: install-headers
++ifeq ($(ENABLE_SHARED),1)
++install: install-library
++endif
++ifeq ($(ENABLE_STATIC),1)
++install: install-package
++endif
++
++.PHONY: install-strip
+ install-strip: library
+ 	$(INSTALL) -D  http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h
+ 	$(INSTALL) -D -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME)
+@@ -147,6 +176,7 @@ uninstall:
+ 	rm $(DESTDIR)$(LIBDIR)/$(SOLIBNAME).$(SOEXT)
+ 	rm $(DESTDIR)$(LIBDIR)/$(SONAME)
+ 	rm $(DESTDIR)$(LIBDIR)/$(LIBNAME)
++	rm $(DESTDIR)$(LIBDIR)/$(STATICLIBNAME)
+ 
+ clean:
+ 	rm -f *.o *.a tags test test_fast test_g \
diff --git a/nixpkgs/pkgs/development/libraries/httplib/default.nix b/nixpkgs/pkgs/development/libraries/httplib/default.nix
new file mode 100644
index 000000000000..4736326b4a30
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/httplib/default.nix
@@ -0,0 +1,30 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, openssl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "httplib";
+  version = "0.15.3";
+
+  src = fetchFromGitHub {
+    owner = "yhirose";
+    repo = "cpp-httplib";
+    rev = "v${version}";
+    hash = "sha256-+YAjmsZvBkOk5bsjE07weTNUmevHd1ZXP0bv5QbkZMs=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ openssl ];
+
+  meta = with lib; {
+    description = "A C++ header-only HTTP/HTTPS server and client library";
+    homepage = "https://github.com/yhirose/cpp-httplib";
+    changelog = "https://github.com/yhirose/cpp-httplib/releases/tag/v${version}";
+    maintainers = with maintainers; [ aidalgol ];
+    license = licenses.mit;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/hunspell/0001-Make-hunspell-look-in-XDG_DATA_DIRS-for-dictionaries.patch b/nixpkgs/pkgs/development/libraries/hunspell/0001-Make-hunspell-look-in-XDG_DATA_DIRS-for-dictionaries.patch
new file mode 100644
index 000000000000..4607f8b8ee09
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hunspell/0001-Make-hunspell-look-in-XDG_DATA_DIRS-for-dictionaries.patch
@@ -0,0 +1,37 @@
+From 8c67f314de2684d77315eecd99ef091d441f17dd Mon Sep 17 00:00:00 2001
+From: Matthew Bauer <mjbauer95@gmail.com>
+Date: Wed, 24 Jul 2019 15:35:18 -0400
+Subject: [PATCH] Make hunspell look in XDG_DATA_DIRS for dictionaries
+
+Some dictionaries may exist but only show up under XDG_DATA_DIRS. For
+instance, $HOME/.local/share/hunspell could contain some dictionaries.
+
+This patch adds each directory in the hunspell subdir of each
+XDG_DATA_DIRS to the lookup path.
+
+Upstream pr is available at: https://github.com/hunspell/hunspell/pull/637
+---
+ src/tools/hunspell.cxx | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/tools/hunspell.cxx b/src/tools/hunspell.cxx
+index 690e34a..6cd127e 100644
+--- a/src/tools/hunspell.cxx
++++ b/src/tools/hunspell.cxx
+@@ -2044,6 +2044,13 @@ int main(int argc, char** argv) {
+     if (getenv("DICPATH")) {
+       path_std_str.append(getenv("DICPATH")).append(PATHSEP);
+     }
++    if (getenv("XDG_DATA_DIRS")) {
++      char* dir = strtok(getenv("XDG_DATA_DIRS"), ":");
++      while (dir != NULL) {
++        path_std_str.append(dir).append("/hunspell:");
++        dir = strtok(NULL, ":");
++      }
++    }
+     path_std_str.append(LIBDIR).append(PATHSEP);
+     if (HOME) {
+       const char * userooodir[] = USEROOODIR;
+-- 
+2.22.0
+
diff --git a/nixpkgs/pkgs/development/libraries/hunspell/default.nix b/nixpkgs/pkgs/development/libraries/hunspell/default.nix
new file mode 100644
index 000000000000..2f48bd668de4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hunspell/default.nix
@@ -0,0 +1,60 @@
+{ lib, stdenv, fetchFromGitHub, ncurses, readline, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  version = "1.7.2";
+  pname = "hunspell";
+
+  src = fetchFromGitHub {
+    owner = "hunspell";
+    repo = "hunspell";
+    rev = "v${version}";
+    sha256 = "sha256-x2FXxnVIqsf5/UEQcvchAndXBv/3mW8Z55djQAFgNA8=";
+  };
+
+  outputs = [ "bin" "dev" "out" "man" ];
+
+  buildInputs = [ ncurses readline ];
+  nativeBuildInputs = [ autoreconfHook ];
+
+  patches = [
+    ./0001-Make-hunspell-look-in-XDG_DATA_DIRS-for-dictionaries.patch
+  ];
+
+  postPatch = ''
+    patchShebangs tests
+  '';
+
+  autoreconfFlags = [ "-vfi" ];
+
+  configureFlags = [ "--with-ui" "--with-readline" ];
+
+  hardeningDisable = [ "format" ];
+
+  meta = with lib; {
+    homepage = "https://hunspell.sourceforge.net";
+    description = "Spell checker";
+    longDescription = ''
+      Hunspell is the spell checker of LibreOffice, OpenOffice.org, Mozilla
+      Firefox 3 & Thunderbird, Google Chrome, and it is also used by
+      proprietary software packages, like macOS, InDesign, memoQ, Opera and
+      SDL Trados.
+
+      Main features:
+
+      * Extended support for language peculiarities; Unicode character encoding, compounding and complex morphology.
+      * Improved suggestion using n-gram similarity, rule and dictionary based pronunciation data.
+      * Morphological analysis, stemming and generation.
+      * Hunspell is based on MySpell and works also with MySpell dictionaries.
+      * C++ library under GPL/LGPL/MPL tri-license.
+      * Interfaces and ports:
+        * Enchant (Generic spelling library from the Abiword project),
+        * XSpell (macOS port, but Hunspell is part of the macOS from version 10.6 (Snow Leopard), and
+            now it is enough to place Hunspell dictionary files into
+            ~/Library/Spelling or /Library/Spelling for spell checking),
+        * Delphi, Java (JNA, JNI), Perl, .NET, Python, Ruby ([1], [2]), UNO.
+    '';
+    platforms = platforms.all;
+    license = with licenses; [ gpl2 lgpl21 mpl11 ];
+    maintainers = with lib.maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/hunspell/dictionaries-chromium.nix b/nixpkgs/pkgs/development/libraries/hunspell/dictionaries-chromium.nix
new file mode 100644
index 000000000000..6f834147d00b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hunspell/dictionaries-chromium.nix
@@ -0,0 +1,70 @@
+{ lib, stdenv, fetchgit }:
+
+let
+  mkDictFromChromium = { shortName, dictFileName, shortDescription }:
+    stdenv.mkDerivation {
+      pname = "hunspell-dict-${shortName}-chromium";
+      version = "115.0.5790.170";
+
+      src = fetchgit {
+        url = "https://chromium.googlesource.com/chromium/deps/hunspell_dictionaries";
+        rev = "41cdffd71c9948f63c7ad36e1fb0ff519aa7a37e";
+        hash = "sha256-67mvpJRFFa9eMfyqFMURlbxOaTJBICnk+gl0b0mEHl8=";
+      };
+
+      dontBuild = true;
+
+      installPhase = ''
+        cp ${dictFileName} $out
+      '';
+
+      passthru = {
+        # As chromium needs the exact filename in ~/.config/chromium/Dictionaries,
+        # this value needs to be known to tools using the package if they want to
+        # link the file correctly.
+        inherit dictFileName;
+
+        updateScript = ./update-chromium-dictionaries.py;
+      };
+
+      meta = {
+        homepage = "https://chromium.googlesource.com/chromium/deps/hunspell_dictionaries/";
+        description = "Chromium compatible hunspell dictionary for ${shortDescription}";
+        longDescription = ''
+          Humspell directories in Chromium's custom bdic format
+
+          See https://www.chromium.org/developers/how-tos/editing-the-spell-checking-dictionaries/
+        '';
+        license = with lib.licenses; [ gpl2 lgpl21 mpl11 lgpl3 ];
+        maintainers = with lib.maintainers; [ networkexception ];
+        platforms = lib.platforms.all;
+      };
+    };
+in
+rec {
+
+  /* ENGLISH */
+
+  en_US = en-us;
+  en-us = mkDictFromChromium {
+    shortName = "en-us";
+    dictFileName = "en-US-10-1.bdic";
+    shortDescription = "English (United States)";
+  };
+
+  en_GB = en-us;
+  en-gb = mkDictFromChromium {
+    shortName = "en-gb";
+    dictFileName = "en-GB-10-1.bdic";
+    shortDescription = "English (United Kingdom)";
+  };
+
+  /* GERMAN */
+
+  de_DE = de-de;
+  de-de = mkDictFromChromium {
+    shortName = "de-de";
+    dictFileName = "de-DE-3-0.bdic";
+    shortDescription = "German (Germany)";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/hunspell/dictionaries.nix b/nixpkgs/pkgs/development/libraries/hunspell/dictionaries.nix
new file mode 100644
index 000000000000..dbaa4888922c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hunspell/dictionaries.nix
@@ -0,0 +1,970 @@
+/* hunspell dictionaries */
+
+{ lib, stdenv, fetchurl, fetchzip, fetchFromGitHub, unzip, coreutils, bash, which, zip, ispell, perl, python3, hunspell }:
+
+
+let
+  mkDict =
+    { pname, readmeFile, dictFileName, ... }@args:
+    stdenv.mkDerivation ({
+      inherit pname;
+      installPhase = ''
+        runHook preInstall
+        # hunspell dicts
+        install -dm755 "$out/share/hunspell"
+        install -m644 ${dictFileName}.dic "$out/share/hunspell/"
+        install -m644 ${dictFileName}.aff "$out/share/hunspell/"
+        # myspell dicts symlinks
+        install -dm755 "$out/share/myspell/dicts"
+        ln -sv "$out/share/hunspell/${dictFileName}.dic" "$out/share/myspell/dicts/"
+        ln -sv "$out/share/hunspell/${dictFileName}.aff" "$out/share/myspell/dicts/"
+        # docs
+        install -dm755 "$out/share/doc"
+        install -m644 ${readmeFile} $out/share/doc/${pname}.txt
+        runHook postInstall
+      '';
+    } // args);
+
+  mkDictFromRla =
+    { shortName, shortDescription, dictFileName }:
+    mkDict rec {
+      inherit dictFileName;
+      version = "2.5";
+      pname = "hunspell-dict-${shortName}-rla";
+      readmeFile = "README.txt";
+      src = fetchFromGitHub {
+        owner = "sbosio";
+        repo = "rla-es";
+        rev = "v${version}";
+        sha256 = "sha256-oGnxOGHzDogzUMZESydIxRTbq9Dmd03flwHx16AK1yk=";
+      };
+      meta = with lib; {
+        description = "Hunspell dictionary for ${shortDescription} from rla";
+        homepage = "https://github.com/sbosio/rla-es";
+        license = with licenses; [ gpl3 lgpl3 mpl11 ];
+        maintainers = with maintainers; [ renzo ];
+        platforms = platforms.all;
+      };
+      nativeBuildInputs = [ bash coreutils which zip unzip ];
+      postPatch = ''
+        substituteInPlace ortograf/herramientas/make_dict.sh \
+           --replace /bin/bash ${bash}/bin/bash \
+           --replace /dev/stderr stderr.log
+
+        substituteInPlace ortograf/herramientas/remover_comentarios.sh \
+           --replace /bin/bash ${bash}/bin/bash \
+      '';
+      buildPhase = ''
+        cd ortograf/herramientas
+        bash -x ./make_dict.sh -l ${dictFileName} -2
+        unzip ${dictFileName}.zip \
+          ${dictFileName}.dic ${dictFileName}.aff ${readmeFile}
+      '';
+    };
+
+  mkDictFromDSSO =
+    { shortName, shortDescription, dictFileName }:
+    mkDict rec {
+      inherit dictFileName;
+      version = "2.40";
+      # Should really use a string function or something
+      _version = "2-40";
+      pname = "hunspell-dict-${shortName}-dsso";
+      _name = "ooo_swedish_dict_${_version}";
+      readmeFile = "LICENSE_en_US.txt";
+      src = fetchurl {
+        url = "https://extensions.libreoffice.org/extensions/swedish-spelling-dictionary-den-stora-svenska-ordlistan/${version}/@@download/file/${_name}.oxt";
+        sha256 = "b982881cc75f5c4af1199535bd4735ee476bdc48edf63e3f05fb4f715654a7bc";
+      };
+      meta = with lib; {
+        longDescription = ''
+          Svensk ordlista baserad på DSSO (den stora svenska ordlistan) och Göran
+          Anderssons (goran@init.se) arbete med denna. Ordlistan hämtas från
+          LibreOffice då dsso.se inte längre verkar vara med oss.
+        '';
+        description = "Hunspell dictionary for ${shortDescription} from LibreOffice";
+        license = licenses.lgpl3;
+        platforms = platforms.all;
+      };
+      nativeBuildInputs = [ unzip ];
+      sourceRoot = ".";
+      unpackCmd = ''
+        unzip $src dictionaries/${dictFileName}.dic dictionaries/${dictFileName}.aff $readmeFile
+      '';
+      installPhase = ''
+        # hunspell dicts
+        install -dm755 "$out/share/hunspell"
+        install -m644 dictionaries/${dictFileName}.dic "$out/share/hunspell/"
+        install -m644 dictionaries/${dictFileName}.aff "$out/share/hunspell/"
+        # myspell dicts symlinks
+        install -dm755 "$out/share/myspell/dicts"
+        ln -sv "$out/share/hunspell/${dictFileName}.dic" "$out/share/myspell/dicts/"
+        ln -sv "$out/share/hunspell/${dictFileName}.aff" "$out/share/myspell/dicts/"
+        # docs
+        install -dm755 "$out/share/doc"
+        install -m644 ${readmeFile} $out/share/doc/${pname}.txt
+      '';
+    };
+
+  mkDictFromDicollecte =
+    { shortName, shortDescription, longDescription, dictFileName, isDefault ? false }:
+    mkDict rec {
+      inherit dictFileName;
+      version = "5.3";
+      pname = "hunspell-dict-${shortName}-dicollecte";
+      readmeFile = "README_dict_fr.txt";
+      src = fetchurl {
+        url = "http://www.dicollecte.org/download/fr/hunspell-french-dictionaries-v${version}.zip";
+        sha256 = "0ca7084jm7zb1ikwzh1frvpb97jn27i7a5d48288h2qlfp068ik0";
+      };
+      meta = with lib; {
+        inherit longDescription;
+        description = "Hunspell dictionary for ${shortDescription} from Dicollecte";
+        homepage = "https://www.dicollecte.org/home.php?prj=fr";
+        license = licenses.mpl20;
+        maintainers = with maintainers; [ renzo ];
+        platforms = platforms.all;
+      };
+      nativeBuildInputs = [ unzip ];
+      sourceRoot = ".";
+      unpackCmd = ''
+        unzip $src ${dictFileName}.dic ${dictFileName}.aff ${readmeFile}
+      '';
+      postInstall = lib.optionalString isDefault ''
+        for ext in aff dic; do
+          ln -sv $out/share/hunspell/${dictFileName}.$ext $out/share/hunspell/fr_FR.$ext
+          ln -sv $out/share/myspell/dicts/${dictFileName}.$ext $out/share/myspell/dicts/fr_FR.$ext
+        done
+      '';
+    };
+
+  mkDictFromWordlist =
+    { shortName, shortDescription, srcFileName, dictFileName, src }:
+    mkDict rec {
+      inherit src srcFileName dictFileName;
+      version = "2018.04.16";
+      pname = "hunspell-dict-${shortName}-wordlist";
+      srcReadmeFile = "README_" + srcFileName + ".txt";
+      readmeFile = "README_" + dictFileName + ".txt";
+      meta = with lib; {
+        description = "Hunspell dictionary for ${shortDescription} from Wordlist";
+        homepage = "http://wordlist.aspell.net/";
+        license = licenses.bsd3;
+        maintainers = with maintainers; [ renzo ];
+        platforms = platforms.all;
+      };
+      nativeBuildInputs = [ unzip ];
+      sourceRoot = ".";
+      unpackCmd = ''
+        unzip $src ${srcFileName}.dic ${srcFileName}.aff ${srcReadmeFile}
+      '';
+      postUnpack = ''
+        mv ${srcFileName}.dic ${dictFileName}.dic || true
+        mv ${srcFileName}.aff ${dictFileName}.aff || true
+        mv ${srcReadmeFile} ${readmeFile}         || true
+      '';
+    };
+
+  mkDictFromLinguistico =
+    { shortName, shortDescription, dictFileName, src }:
+    mkDict rec {
+      inherit src dictFileName;
+      version = "2.4";
+      pname = "hunspell-dict-${shortName}-linguistico";
+      readmeFile = dictFileName + "_README.txt";
+      meta = with lib; {
+        description = "Hunspell dictionary for ${shortDescription}";
+        homepage = "https://sourceforge.net/projects/linguistico/";
+        license = licenses.gpl3;
+        maintainers = with maintainers; [ renzo ];
+        platforms = platforms.all;
+      };
+      nativeBuildInputs = [ unzip ];
+      sourceRoot = ".";
+      prePatch = ''
+        # Fix dic file empty lines (FS#22275)
+        sed '/^\/$/d' -i ${dictFileName}.dic
+      '';
+      unpackCmd = ''
+        unzip $src ${dictFileName}.dic ${dictFileName}.aff ${readmeFile}
+      '';
+    };
+
+  mkDictFromXuxen =
+    { shortName, srcs, shortDescription, longDescription, dictFileName }:
+    stdenv.mkDerivation rec {
+      pname = "hunspell-dict-${shortName}-xuxen";
+      version = "5-2015.11.10";
+
+      inherit srcs;
+
+      sourceRoot = ".";
+      # Copy files stripping until first dash (path and hash)
+      unpackCmd = "cp $curSrc \${curSrc##*-}";
+      installPhase = ''
+        # hunspell dicts
+        install -dm755 "$out/share/hunspell"
+        install -m644 ${dictFileName}.dic "$out/share/hunspell/"
+        install -m644 ${dictFileName}.aff "$out/share/hunspell/"
+        # myspell dicts symlinks
+        install -dm755 "$out/share/myspell/dicts"
+        ln -sv "$out/share/hunspell/${dictFileName}.dic" "$out/share/myspell/dicts/"
+        ln -sv "$out/share/hunspell/${dictFileName}.aff" "$out/share/myspell/dicts/"
+      '';
+
+      meta = with lib; {
+        homepage = "http://xuxen.eus/";
+        description = shortDescription;
+        longDescription = longDescription;
+        license = licenses.gpl2;
+        maintainers = with maintainers; [ zalakain ];
+        platforms = platforms.all;
+      };
+    };
+
+  mkDictFromJ3e =
+    { shortName, shortDescription, dictFileName }:
+    stdenv.mkDerivation rec {
+      pname = "hunspell-dict-${shortName}-j3e";
+      version = "20161207";
+
+      src = fetchurl {
+        url = "https://j3e.de/ispell/igerman98/dict/igerman98-${version}.tar.bz2";
+        sha256 = "1a3055hp2bc4q4nlg3gmg0147p3a1zlfnc65xiv2v9pyql1nya8p";
+      };
+
+      nativeBuildInputs = [ ispell perl hunspell ];
+
+      dontBuild = true;
+
+      installPhase = ''
+        patchShebangs bin
+        make hunspell/${dictFileName}.aff hunspell/${dictFileName}.dic
+        # hunspell dicts
+        install -dm755 "$out/share/hunspell"
+        install -m644 hunspell/${dictFileName}.dic "$out/share/hunspell/"
+        install -m644 hunspell/${dictFileName}.aff "$out/share/hunspell/"
+        # myspell dicts symlinks
+        install -dm755 "$out/share/myspell/dicts"
+        ln -sv "$out/share/hunspell/${dictFileName}.dic" "$out/share/myspell/dicts/"
+        ln -sv "$out/share/hunspell/${dictFileName}.aff" "$out/share/myspell/dicts/"
+      '';
+
+      meta = with lib; {
+        homepage = "https://www.j3e.de/ispell/igerman98/index_en.html";
+        description = shortDescription;
+        license = with licenses; [ gpl2 gpl3 ];
+        maintainers = with maintainers; [ timor ];
+        platforms = platforms.all;
+      };
+    };
+
+  mkDictFromLibreOffice =
+    { shortName
+    , shortDescription
+    , dictFileName
+    , license
+    , readmeFile ? "README_${dictFileName}.txt"
+    , sourceRoot ? dictFileName
+    }:
+    mkDict rec {
+      pname = "hunspell-dict-${shortName}-libreoffice";
+      version = "6.3.0.4";
+      inherit dictFileName readmeFile;
+      src = fetchFromGitHub {
+        owner = "LibreOffice";
+        repo = "dictionaries";
+        rev = "libreoffice-${version}";
+        sha256 = "14z4b0grn7cw8l9s7sl6cgapbpwhn1b3gwc3kn6b0k4zl3dq7y63";
+      };
+      buildPhase = ''
+        cp -a ${sourceRoot}/* .
+      '';
+      meta = with lib; {
+        homepage = "https://wiki.documentfoundation.org/Development/Dictionaries";
+        description = "Hunspell dictionary for ${shortDescription} from LibreOffice";
+        license = license;
+        maintainers = with maintainers; [ vlaci ];
+        platforms = platforms.all;
+      };
+    };
+
+in
+rec {
+
+  /* ENGLISH */
+
+  en_US = en-us;
+  en-us = mkDictFromWordlist {
+    shortName = "en-us";
+    shortDescription = "English (United States)";
+    srcFileName = "en_US";
+    dictFileName = "en_US";
+    src = fetchurl {
+      url = "mirror://sourceforge/wordlist/speller/2018.04.16/hunspell-en_US-2018.04.16.zip";
+      sha256 = "18hbncvqnckzqarrmnzk58plymjqyi93k4qj98fac5mr71jbmzaf";
+    };
+  };
+
+  en_US-large = en-us-large;
+  en-us-large = mkDictFromWordlist {
+    shortName = "en-us-large";
+    shortDescription = "English (United States) Large";
+    srcFileName = "en_US-large";
+    dictFileName = "en_US";
+    src = fetchurl {
+      url = "mirror://sourceforge/wordlist/speller/2018.04.16/hunspell-en_US-large-2018.04.16.zip";
+      sha256 = "1xm9jgqbivp5cb78ykjxg47vzq1yqj82l7r4q5cjpivrv99s49qc";
+    };
+  };
+
+  en_CA = en-ca;
+  en-ca = mkDictFromWordlist {
+    shortName = "en-ca";
+    shortDescription = "English (Canada)";
+    srcFileName = "en_CA";
+    dictFileName = "en_CA";
+    src = fetchurl {
+      url = "mirror://sourceforge/wordlist/speller/2018.04.16/hunspell-en_CA-2018.04.16.zip";
+      sha256 = "06yf3s7y1215jmikbs18cn4j8a13csp4763w3jfgah8zlim6vc47";
+    };
+  };
+
+  en_CA-large = en-ca-large;
+  en-ca-large = mkDictFromWordlist {
+    shortName = "en-ca-large";
+    shortDescription = "English (Canada) Large";
+    srcFileName = "en_CA-large";
+    dictFileName = "en_CA";
+    src = fetchurl {
+      url = "mirror://sourceforge/wordlist/speller/2018.04.16/hunspell-en_CA-large-2018.04.16.zip";
+      sha256 = "1200xxyvv6ni8nk52v3059c367817vnrkm0cdh38rhiigb5flfha";
+    };
+  };
+
+  en_AU = en-au;
+  en-au = mkDictFromWordlist {
+    shortName = "en-au";
+    shortDescription = "English (Australia)";
+    srcFileName = "en_AU";
+    dictFileName = "en_AU";
+    src = fetchurl {
+      url = "mirror://sourceforge/wordlist/speller/2018.04.16/hunspell-en_AU-2018.04.16.zip";
+      sha256 = "1kp06npl1kd05mm9r52cg2iwc13x02zwqgpibdw15b6x43agg6f5";
+    };
+  };
+
+  en_AU-large = en-au-large;
+  en-au-large = mkDictFromWordlist {
+    shortName = "en-au-large";
+    shortDescription = "English (Australia) Large";
+    srcFileName = "en_AU-large";
+    dictFileName = "en_AU";
+    src = fetchurl {
+      url = "mirror://sourceforge/wordlist/speller/2018.04.16/hunspell-en_AU-large-2018.04.16.zip";
+      sha256 = "14l1w4dpk0k1js2wwq5ilfil89ni8cigph95n1rh6xi4lzxj7h6g";
+    };
+  };
+
+  en_GB-ise = en-gb-ise;
+  en-gb-ise = mkDictFromWordlist {
+    shortName = "en-gb-ise";
+    shortDescription = "English (United Kingdom, 'ise' ending)";
+    srcFileName = "en_GB-ise";
+    dictFileName = "en_GB";
+    src = fetchurl {
+      url = "mirror://sourceforge/wordlist/speller/2018.04.16/hunspell-en_GB-ise-2018.04.16.zip";
+      sha256 = "0ylg1zvfvsawamymcc9ivrqcb9qhlpgpnizm076xc56jz554xc2l";
+    };
+  };
+
+  en_GB-ize = en-gb-ize;
+  en-gb-ize = mkDictFromWordlist {
+    shortName = "en-gb-ize";
+    shortDescription = "English (United Kingdom, 'ize' ending)";
+    srcFileName = "en_GB-ize";
+    dictFileName = "en_GB";
+    src = fetchurl {
+      url = "mirror://sourceforge/wordlist/speller/2018.04.16/hunspell-en_GB-ize-2018.04.16.zip";
+      sha256 = "1rmwy6sxmd400cwjf58az6g14sq28p18f5mlq8ybg8y33q9m42ps";
+    };
+  };
+
+  en_GB-large = en-gb-large;
+  en-gb-large = mkDictFromWordlist {
+    shortName = "en-gb-large";
+    shortDescription = "English (United Kingdom) Large";
+    srcFileName = "en_GB-large";
+    dictFileName = "en_GB";
+    src = fetchurl {
+      url = "mirror://sourceforge/wordlist/speller/2018.04.16/hunspell-en_GB-large-2018.04.16.zip";
+      sha256 = "1y4d7x5vvi1qh1s3i09m0vvqrpdzzqhsdngr8nsh7hc5bnlm37mi";
+    };
+  };
+
+  /* SPANISH */
+
+  es_ANY = es-any;
+  es-any = mkDictFromRla {
+    shortName = "es-any";
+    shortDescription = "Spanish (any variant)";
+    dictFileName = "es_ANY";
+  };
+
+  es_AR = es-ar;
+  es-ar = mkDictFromRla {
+    shortName = "es-ar";
+    shortDescription = "Spanish (Argentina)";
+    dictFileName = "es_AR";
+  };
+
+  es_BO = es-bo;
+  es-bo = mkDictFromRla {
+    shortName = "es-bo";
+    shortDescription = "Spanish (Bolivia)";
+    dictFileName = "es_BO";
+  };
+
+  es_CL = es-cl;
+  es-cl = mkDictFromRla {
+    shortName = "es-cl";
+    shortDescription = "Spanish (Chile)";
+    dictFileName = "es_CL";
+  };
+
+  es_CO = es-co;
+  es-co = mkDictFromRla {
+    shortName = "es-co";
+    shortDescription = "Spanish (Colombia)";
+    dictFileName = "es_CO";
+  };
+
+  es_CR = es-cr;
+  es-cr = mkDictFromRla {
+    shortName = "es-cr";
+    shortDescription = "Spanish (Costa Rica)";
+    dictFileName = "es_CR";
+  };
+
+  es_CU = es-cu;
+  es-cu = mkDictFromRla {
+    shortName = "es-cu";
+    shortDescription = "Spanish (Cuba)";
+    dictFileName = "es_CU";
+  };
+
+  es_DO = es-do;
+  es-do = mkDictFromRla {
+    shortName = "es-do";
+    shortDescription = "Spanish (Dominican Republic)";
+    dictFileName = "es_DO";
+  };
+
+  es_EC = es-ec;
+  es-ec = mkDictFromRla {
+    shortName = "es-ec";
+    shortDescription = "Spanish (Ecuador)";
+    dictFileName = "es_EC";
+  };
+
+  es_ES = es-es;
+  es-es = mkDictFromRla {
+    shortName = "es-es";
+    shortDescription = "Spanish (Spain)";
+    dictFileName = "es_ES";
+  };
+
+  es_GT = es-gt;
+  es-gt = mkDictFromRla {
+    shortName = "es-gt";
+    shortDescription = "Spanish (Guatemala)";
+    dictFileName = "es_GT";
+  };
+
+  es_HN = es-hn;
+  es-hn = mkDictFromRla {
+    shortName = "es-hn";
+    shortDescription = "Spanish (Honduras)";
+    dictFileName = "es_HN";
+  };
+
+  es_MX = es-mx;
+  es-mx = mkDictFromRla {
+    shortName = "es-mx";
+    shortDescription = "Spanish (Mexico)";
+    dictFileName = "es_MX";
+  };
+
+  es_NI = es-ni;
+  es-ni = mkDictFromRla {
+    shortName = "es-ni";
+    shortDescription = "Spanish (Nicaragua)";
+    dictFileName = "es_NI";
+  };
+
+  es_PA = es-pa;
+  es-pa = mkDictFromRla {
+    shortName = "es-pa";
+    shortDescription = "Spanish (Panama)";
+    dictFileName = "es_PA";
+  };
+
+  es_PE = es-pe;
+  es-pe = mkDictFromRla {
+    shortName = "es-pe";
+    shortDescription = "Spanish (Peru)";
+    dictFileName = "es_PE";
+  };
+
+  es_PR = es-pr;
+  es-pr = mkDictFromRla {
+    shortName = "es-pr";
+    shortDescription = "Spanish (Puerto Rico)";
+    dictFileName = "es_PR";
+  };
+
+  es_PY = es-py;
+  es-py = mkDictFromRla {
+    shortName = "es-py";
+    shortDescription = "Spanish (Paraguay)";
+    dictFileName = "es_PY";
+  };
+
+  es_SV = es-sv;
+  es-sv = mkDictFromRla {
+    shortName = "es-sv";
+    shortDescription = "Spanish (El Salvador)";
+    dictFileName = "es_SV";
+  };
+
+  es_UY = es-uy;
+  es-uy = mkDictFromRla {
+    shortName = "es-uy";
+    shortDescription = "Spanish (Uruguay)";
+    dictFileName = "es_UY";
+  };
+
+  es_VE = es-ve;
+  es-ve = mkDictFromRla {
+    shortName = "es-ve";
+    shortDescription = "Spanish (Venezuela)";
+    dictFileName = "es_VE";
+  };
+
+  /* FRENCH */
+
+  fr-any = mkDictFromDicollecte {
+    shortName = "fr-any";
+    dictFileName = "fr-toutesvariantes";
+    shortDescription = "French (any variant)";
+    longDescription = ''
+      Ce dictionnaire contient les nouvelles et les anciennes graphies des
+      mots concernés par la réforme de 1990.
+    '';
+  };
+
+  fr-classique = mkDictFromDicollecte {
+    shortName = "fr-classique";
+    dictFileName = "fr-classique";
+    shortDescription = "French (classic)";
+    longDescription = ''
+      Ce dictionnaire est une extension du dictionnaire «Moderne» et propose
+      en sus des graphies alternatives, parfois encore très usitées, parfois
+      tombées en désuétude.
+    '';
+  };
+
+  fr-moderne = mkDictFromDicollecte {
+    shortName = "fr-moderne";
+    dictFileName = "fr-moderne";
+    shortDescription = "French (modern)";
+    longDescription = ''
+      Ce dictionnaire propose une sélection des graphies classiques et
+      réformées, suivant la lente évolution de l’orthographe actuelle. Ce
+      dictionnaire contient les graphies les moins polémiques de la réforme.
+    '';
+    isDefault = true;
+  };
+
+  fr-reforme1990 = mkDictFromDicollecte {
+    shortName = "fr-reforme1990";
+    dictFileName = "fr-reforme1990";
+    shortDescription = "French (1990 reform)";
+    longDescription = ''
+      Ce dictionnaire ne connaît que les graphies nouvelles des mots concernés
+      par la réforme de 1990.
+    '';
+  };
+
+  /* ITALIAN */
+
+  it_IT = it-it;
+  it-it = mkDictFromLinguistico {
+    shortName = "it-it";
+    dictFileName = "it_IT";
+    shortDescription = "Hunspell dictionary for 'Italian (Italy)' from Linguistico";
+    src = fetchurl {
+      url = "mirror://sourceforge/linguistico/italiano_2_4_2007_09_01.zip";
+      sha256 = "0m9frz75fx456bczknay5i446gdcp1smm48lc0qfwzhz0j3zcdrd";
+    };
+  };
+
+  /* BASQUE */
+
+  eu_ES = eu-es;
+  eu-es = mkDictFromXuxen {
+    shortName = "eu-es";
+    dictFileName = "eu_ES";
+    shortDescription = "Basque (Xuxen 5)";
+    longDescription = ''
+      Itxura berritzeaz gain, testuak zuzentzen laguntzeko zenbait hobekuntza
+      egin dira Xuxen.eus-en. Lexikoari dagokionez, 18645 sarrera berri erantsi
+      ditugu, eta proposamenak egiteko sistema ere aldatu dugu. Esate baterako,
+      gaizki idatzitako hitz baten inguruko proposamenak eskuratzeko, euskaraz
+      idaztean egiten ditugun akats arruntenak hartu dira kontuan. Sistemak
+      ematen dituen proposamenak ordenatzeko, berriz, aipatutako irizpidea
+      erabiltzeaz gain, Internetetik automatikoki eskuratutako euskarazko corpus
+      bateko datuen arabera ordenatu daitezke emaitzak. Erabiltzaileak horrela
+      ordenatu nahi baditu proposamenak, hautatu egin behar du aukera hori
+      testu-kutxaren azpian dituen aukeren artean. Interesgarria da proposamenak
+      ordenatzeko irizpide hori, hala sistemak formarik erabilienak proposatuko
+      baitizkigu gutxiago erabiltzen direnen aurretik.
+    '';
+    srcs = [
+      (fetchurl {
+        url = "http://xuxen.eus/static/hunspell/eu_ES.aff";
+        sha256 = "12w2j6phzas2rdzc7f20jnk93sm59m2zzfdgxv6p8nvcvbrkmc02";
+      })
+      (fetchurl {
+        url = "http://xuxen.eus/static/hunspell/eu_ES.dic";
+        sha256 = "0lw193jr7ldvln5x5z9p21rz1by46h0say9whfcw2kxs9vprd5b3";
+      })
+    ];
+  };
+
+  /* HUNGARIAN */
+
+  hu_HU = hu-hu;
+  hu-hu = mkDictFromLibreOffice {
+    shortName = "hu-hu";
+    dictFileName = "hu_HU";
+    shortDescription = "Hungarian (Hungary)";
+    license = with lib.licenses; [ mpl20 lgpl3 ];
+  };
+
+  /* SWEDISH */
+
+  sv_SE = sv-se;
+  sv-se = mkDictFromDSSO {
+    shortName = "sv-se";
+    dictFileName = "sv_SE";
+    shortDescription = "Swedish (Sweden)";
+  };
+
+  # Finlandian Swedish (hello Linus Torvalds)
+  sv_FI = sv-fi;
+  sv-fi = mkDictFromDSSO {
+    shortName = "sv-fi";
+    dictFileName = "sv_FI";
+    shortDescription = "Swedish (Finland)";
+  };
+
+  /* GERMAN */
+
+  de_DE = de-de;
+  de-de = mkDictFromJ3e {
+    shortName = "de-de";
+    shortDescription = "German (Germany)";
+    dictFileName = "de_DE";
+  };
+
+  de_AT = de-at;
+  de-at = mkDictFromJ3e {
+    shortName = "de-at";
+    shortDescription = "German (Austria)";
+    dictFileName = "de_AT";
+  };
+
+  de_CH = de-ch;
+  de-ch = mkDictFromJ3e {
+    shortName = "de-ch";
+    shortDescription = "German (Switzerland)";
+    dictFileName = "de_CH";
+  };
+
+  /* UKRAINIAN */
+
+  uk_UA = uk-ua;
+  uk-ua = mkDict rec {
+    pname = "hunspell-dict-uk-ua";
+    version = "4.6.3";
+    _version = "4-6.3";
+
+    src = fetchurl {
+      url = "https://extensions.libreoffice.org/extensions/ukrainian-spelling-dictionary-and-thesaurus/${_version}/@@download/file/dict-uk_UA-${version}.oxt";
+      sha256 = "14rd07yx4fx2qxjr5xqc8qy151idd8k2hr5yi18d9r8gccnm9w50";
+    };
+
+    dictFileName = "uk_UA";
+    readmeFile = "README_uk_UA.txt";
+    nativeBuildInputs = [ unzip ];
+    unpackCmd = ''
+      unzip $src ${dictFileName}/{${dictFileName}.dic,${dictFileName}.aff,${readmeFile}}
+    '';
+
+    meta = with lib; {
+      description = "Hunspell dictionary for Ukrainian (Ukraine) from LibreOffice";
+      homepage = "https://extensions.libreoffice.org/extensions/ukrainian-spelling-dictionary-and-thesaurus/";
+      license = licenses.mpl20;
+      maintainers = with maintainers; [ dywedir ];
+      platforms = platforms.all;
+    };
+  };
+
+  /* RUSSIAN */
+
+  ru_RU = ru-ru;
+  ru-ru = mkDictFromLibreOffice {
+    shortName = "ru-ru";
+    dictFileName = "ru_RU";
+    shortDescription = "Russian (Russian)";
+    license = with lib.licenses; [ mpl20 lgpl3 ];
+  };
+
+  /* CZECH */
+
+  cs_CZ = cs-cz;
+  cs-cz = mkDictFromLibreOffice {
+    shortName = "cs-cz";
+    dictFileName = "cs_CZ";
+    shortDescription = "Czech (Czechia)";
+    readmeFile = "README_cs.txt";
+    license = with lib.licenses; [ gpl2 ];
+  };
+
+  /* SLOVAK */
+
+  sk_SK = sk-sk;
+  sk-sk = mkDictFromLibreOffice {
+    shortName = "sk-sk";
+    dictFileName = "sk_SK";
+    shortDescription = "Slovak (Slovakia)";
+    readmeFile = "README_sk.txt";
+    license = with lib.licenses; [ gpl2 lgpl21 mpl11 ];
+  };
+
+  /* DANISH */
+
+  da_DK = da-dk;
+  da-dk = mkDict rec {
+    pname = "hunspell-dict-da-dk";
+    version = "2.5.189";
+
+    src = fetchurl {
+      url = "https://stavekontrolden.dk/dictionaries/da_DK/da_DK-${version}.oxt";
+      sha256 = "sha256:0i1cw0nfg24b0sg2yc3q7315ng5vc5245nvh0l1cndkn2c9z4978";
+    };
+
+    shortName = "da-dk";
+    shortDescription = "Danish (Danmark)";
+    dictFileName = "da_DK";
+    readmeFile = "README_da_DK.txt";
+    nativeBuildInputs = [ unzip ];
+    unpackCmd = ''
+      unzip $src ${dictFileName}.dic ${dictFileName}.aff ${readmeFile} -d ${dictFileName}
+    '';
+
+    meta = with lib; {
+      description = "Hunspell dictionary for Danish (Denmark) from Stavekontrolden";
+      homepage = "https://github.com/jeppebundsgaard/stavekontrolden";
+      license = with lib.licenses; [ gpl2Only lgpl21Only mpl11 ];
+      maintainers = with maintainers; [ louisdk1 ];
+    };
+  };
+
+  /* DUTCH */
+
+  nl_NL = nl_nl;
+  nl_nl = mkDict rec {
+    pname = "hunspell-dict-nl-nl";
+    version = "2.20.19";
+
+    src = fetchFromGitHub {
+      owner = "OpenTaal";
+      repo = "opentaal-hunspell";
+      rev = version;
+      sha256 = "0jma8mmrncyzd77kxliyngs4z6z4769g3nh0a7xn2pd4s5y2xdpy";
+    };
+
+    preInstall = ''
+      mv nl.aff nl_NL.aff
+      mv nl.dic nl_NL.dic
+    '';
+
+    dictFileName = "nl_NL";
+    readmeFile = "README.md";
+
+    meta = with lib; {
+      description = "Hunspell dictionary for Dutch (Netherlands) from OpenTaal";
+      homepage = "https://www.opentaal.org/";
+      license = with licenses; [ bsd3 ]; # and/or cc-by-nc-30
+      maintainers = with maintainers; [ artturin ];
+    };
+  };
+
+  /* HEBREW */
+
+  he_IL = he-il;
+  he-il = mkDictFromLibreOffice {
+    shortName = "he-il";
+    dictFileName = "he_IL";
+    shortDescription = "Hebrew (Israel)";
+    readmeFile = "README_he_IL.txt";
+    license = with lib.licenses; [ agpl3Plus ];
+  };
+
+  /* THAI */
+
+  th_TH = th-th;
+  th-th = mkDict {
+    pname = "hunspell-dict-th-th";
+    version = "experimental-2023-03-01";
+    dictFileName = "th_TH";
+    readmeFile = "README.md";
+    src = fetchFromGitHub {
+      owner = "SyafiqHadzir";
+      repo = "Hunspell-TH";
+      rev = "9c09f1b7c0eb4d04b9f6f427901686c5c3d9fa54";
+      sha256 = "1wszpnbgj31k72x1vvcfkzcpmxsncdpqsi3zagah7swilpi7cqm4";
+    };
+    meta = with lib; {
+      description = "Hunspell dictionary for Central Thai (Thailand)";
+      homepage = "https://github.com/SyafiqHadzir/Hunspell-TH";
+      license = with licenses; [ gpl3 ];
+      maintainers = with maintainers; [ toastal ]; # looking for a native speaker
+      platforms = platforms.all;
+    };
+  };
+
+  /* CROATIAN */
+
+  hr_HR = hr-hr;
+  hr-hr = mkDictFromLibreOffice {
+    shortName = "hr-hr";
+    dictFileName = "hr_HR";
+    shortDescription = "Croatian (Croatia)";
+    readmeFile = "README_hr_HR.txt";
+    license = with lib.licenses; [ gpl2Only lgpl21Only mpl11 ];
+  };
+
+  /* NORWEGIAN */
+
+  nb_NO = nb-no;
+  nb-no = mkDictFromLibreOffice {
+    shortName = "nb-no";
+    dictFileName = "nb_NO";
+    sourceRoot = "no";
+    readmeFile = "README_hyph_NO.txt";
+    shortDescription = "Norwegian Bokmål (Norway)";
+    license = with lib.licenses; [ gpl2Only ];
+  };
+
+  nn_NO = nn-no;
+  nn-no = mkDictFromLibreOffice {
+    shortName = "nn-no";
+    dictFileName = "nn_NO";
+    sourceRoot = "no";
+    readmeFile = "README_hyph_NO.txt";
+    shortDescription = "Norwegian Nynorsk (Norway)";
+    license = with lib.licenses; [ gpl2Only ];
+  };
+
+  /* TOKI PONA */
+
+  tok = mkDict rec {
+    pname = "hunspell-dict-tok";
+    version = "20220829";
+    dictFileName = "tok";
+    readmeFile = "README.en.adoc";
+
+    src = fetchzip {
+      url = "https://github.com/somasis/hunspell-tok/releases/download/${version}/hunspell-tok-${version}.tar.gz";
+      sha256 = "sha256-RiAODKXPUeIcf8IFcU6Tacehq5S8GYuPTuxEiN2CXD0=";
+    };
+
+    dontBuild = true;
+
+    meta = with lib; {
+      description = "Hunspell dictionary for Toki Pona";
+      homepage = "https://github.com/somasis/hunspell-tok";
+      license = with lib.licenses; [ cc0 publicDomain cc-by-sa-30 cc-by-sa-40 ];
+      maintainers = with maintainers; [ somasis ];
+      platforms = platforms.all;
+    };
+  };
+
+  /* POLISH */
+
+  pl_PL = pl-pl;
+  pl-pl = mkDictFromLibreOffice {
+    shortName = "pl-pl";
+    dictFileName = "pl_PL";
+    shortDescription = "Polish (Poland)";
+    readmeFile = "README_en.txt";
+    # the README doesn't specify versions of licenses :/
+    license = with lib.licenses; [ gpl2Plus lgpl2Plus mpl10 asl20 cc-by-sa-25 ];
+  };
+
+  /* PORTUGUESE */
+
+  pt_BR = pt-br;
+  pt-br = mkDictFromLibreOffice {
+    shortName = "pt-br";
+    dictFileName = "pt_BR";
+    shortDescription = "Portuguese (Brazil)";
+    readmeFile = "README_pt_BR.txt";
+    license = with lib.licenses; [ lgpl3 ];
+  };
+
+  pt_PT = pt-pt;
+  pt-pt = mkDictFromLibreOffice {
+    shortName = "pt-pt";
+    dictFileName = "pt_PT";
+    shortDescription = "Portuguese (Portugal)";
+    readmeFile = "README_pt_PT.txt";
+    license = with lib.licenses; [ gpl2 lgpl21 mpl11 ];
+  };
+
+  /* PERSIAN */
+
+  fa_IR = fa-ir;
+  fa-ir = mkDict {
+    pname = "hunspell-dict-fa-ir";
+    version = "experimental-2022-09-04";
+    dictFileName = "fa-IR";
+    readmeFile = "README.md";
+    src = fetchFromGitHub {
+      owner = "b00f";
+      repo = "lilak";
+      rev = "1a80a8e5c9377ac424d29ef20be894e250bc9765";
+      hash = "sha256-xonnrclzgFEHdQ9g8ijm0bo9r5a5Y0va52NoJR5d8mo=";
+    };
+    nativeBuildInputs = [ python3 ];
+    buildPhase = ''
+      runHook preBuild
+      mkdir build
+      (cd src && python3 lilak.py)
+      mv build/* ./
+      # remove timestamp from file
+      sed -i 's/^\(## *File Version[^,]*\),.*/\1/' fa-IR.aff
+      runHook postBuild
+    '';
+    meta = with lib; {
+      description = "Hunspell dictionary for Persian (Iran)";
+      homepage = "https://github.com/b00f/lilak";
+      license = licenses.asl20;
+      maintainers = with maintainers; [ nix-julia ];
+      platforms = platforms.all;
+    };
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/hunspell/update-chromium-dictionaries.py b/nixpkgs/pkgs/development/libraries/hunspell/update-chromium-dictionaries.py
new file mode 100755
index 000000000000..eb24fc32937c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hunspell/update-chromium-dictionaries.py
@@ -0,0 +1,77 @@
+#! /usr/bin/env nix-shell
+#! nix-shell -i python3 -p python3 nix nix-prefetch-git
+
+import base64
+import fileinput
+import json
+import os
+import re
+import subprocess
+import sys
+
+from urllib.request import urlopen, Request
+
+
+DICTIONARIES_CHROMIUM_NIX = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'dictionaries-chromium.nix')
+
+
+def get_latest_chromium_stable_release():
+    RELEASES_URL = 'https://versionhistory.googleapis.com/v1/chrome/platforms/linux/channels/stable/versions/all/releases'
+    print(f'GET {RELEASES_URL}')
+    with urlopen(RELEASES_URL) as resp:
+        return json.load(resp)['releases'][0]
+
+
+def get_file_revision(revision, file_path):
+    """Fetches the requested Git revision of the given Chromium file."""
+    url = f'https://chromium.googlesource.com/chromium/src/+/refs/tags/{revision}/{file_path}?format=TEXT'
+    with urlopen(url) as http_response:
+        resp = http_response.read()
+        return base64.b64decode(resp)
+
+
+def nix_prefetch_git(url, rev):
+    """Prefetches the requested Git revision of the given repository URL."""
+    print(f'nix-prefetch-git {url} {rev}')
+    out = subprocess.check_output(['nix-prefetch-git', '--quiet', '--url', url, '--rev', rev])
+    return json.loads(out)
+
+
+def get_current_revision():
+    with open(DICTIONARIES_CHROMIUM_NIX) as f:
+        for line in f:
+            rev = re.search(r'^        rev = "(.*)";', line)
+            if rev:
+                return rev.group(1)
+    sys.exit(1)
+
+
+print('Getting latest chromium version...')
+chromium_release = get_latest_chromium_stable_release()
+chromium_version = chromium_release['version']
+print(f'chromium version: {chromium_version}')
+
+print('Getting corresponding hunspell_dictionaries commit...')
+deps = get_file_revision(chromium_version, 'DEPS')
+hunspell_dictionaries_pattern = r"^\s*Var\('chromium_git'\)\s*\+\s*'\/chromium\/deps\/hunspell_dictionaries\.git'\s*\+\s*'@'\s*\+\s*'(\w*)',$"
+hunspell_dictionaries_commit = re.search(hunspell_dictionaries_pattern, deps.decode(), re.MULTILINE).group(1)
+print(f'hunspell_dictionaries commit: {hunspell_dictionaries_commit}')
+
+current_commit = get_current_revision()
+if current_commit == hunspell_dictionaries_commit:
+    print('Commit is already packaged, no update needed.')
+    sys.exit(0)
+
+print('Commit has changed compared to the current package, updating...')
+
+print('Getting hash of hunspell_dictionaries revision...')
+hunspell_dictionaries_git = nix_prefetch_git("https://chromium.googlesource.com/chromium/deps/hunspell_dictionaries", hunspell_dictionaries_commit)
+hunspell_dictionaries_hash = hunspell_dictionaries_git['hash']
+print(f'hunspell_dictionaries commit hash: {hunspell_dictionaries_hash}')
+
+with fileinput.FileInput(DICTIONARIES_CHROMIUM_NIX, inplace=True) as file:
+    for line in file:
+        result = re.sub(r'^      version = ".+";', f'      version = "{chromium_version}";', line)
+        result = re.sub(r'^        rev = ".*";', f'        rev = "{hunspell_dictionaries_commit}";', result)
+        result = re.sub(r'^        hash = ".+";', f'        hash = "{hunspell_dictionaries_hash}";', result)
+        print(result, end='')
diff --git a/nixpkgs/pkgs/development/libraries/hunspell/wrapper.nix b/nixpkgs/pkgs/development/libraries/hunspell/wrapper.nix
new file mode 100644
index 000000000000..01987ab71858
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hunspell/wrapper.nix
@@ -0,0 +1,12 @@
+{ stdenv, lib, hunspell, makeWrapper, dicts ? [] }:
+let
+  searchPath = lib.makeSearchPath "share/hunspell" dicts;
+in
+stdenv.mkDerivation {
+  name = (lib.appendToName "with-dicts" hunspell).name;
+  nativeBuildInputs = [ makeWrapper ];
+  buildCommand = ''
+    makeWrapper ${hunspell.bin}/bin/hunspell $out/bin/hunspell --prefix DICPATH : ${lib.escapeShellArg searchPath}
+  '';
+  meta = removeAttrs hunspell.meta ["outputsToInstall"];
+}
diff --git a/nixpkgs/pkgs/development/libraries/hwloc/default.nix b/nixpkgs/pkgs/development/libraries/hwloc/default.nix
new file mode 100644
index 000000000000..7dc11069e9a6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hwloc/default.nix
@@ -0,0 +1,79 @@
+{ lib, stdenv, fetchurl, pkg-config, expat, ncurses, pciutils, numactl
+, x11Support ? false
+, libX11
+, cairo
+, config
+, enableCuda ? config.cudaSupport
+, cudaPackages
+}:
+
+stdenv.mkDerivation rec {
+  pname = "hwloc";
+  version = "2.10.0";
+
+  src = fetchurl {
+    url = "https://www.open-mpi.org/software/hwloc/v${lib.versions.majorMinor version}/downloads/hwloc-${version}.tar.bz2";
+    sha256 = "sha256-AwXdYMneL75lGf4qTo/cbT243ldKDKeBK5LoDAWuE5I=";
+  };
+
+  configureFlags = [
+    "--localstatedir=/var"
+    "--enable-netloc"
+  ];
+
+  # XXX: libX11 is not directly needed, but needed as a propagated dep of Cairo.
+  nativeBuildInputs = [ pkg-config ]
+  ++ lib.optionals enableCuda [ cudaPackages.cuda_nvcc ];
+
+  buildInputs = [ expat ncurses ]
+    ++ lib.optionals x11Support [ cairo libX11 ]
+    ++ lib.optionals stdenv.isLinux [ numactl ]
+    ++ lib.optionals enableCuda [ cudaPackages.cuda_cudart ];
+
+  # Since `libpci' appears in `hwloc.pc', it must be propagated.
+  propagatedBuildInputs = lib.optional stdenv.isLinux pciutils;
+
+  enableParallelBuilding = true;
+
+  postInstall = lib.optionalString stdenv.isLinux ''
+    if [ -d "${numactl}/lib64" ]; then
+      numalibdir="${numactl}/lib64"
+    else
+      numalibdir="${numactl}/lib"
+      test -d "$numalibdir"
+    fi
+
+    sed -i "$lib/lib/libhwloc.la" \
+      -e "s|-lnuma|-L$numalibdir -lnuma|g"
+    '';
+
+  # Checks disabled because they're impure (hardware dependent) and
+  # fail on some build machines.
+  doCheck = false;
+
+  outputs = [ "out" "lib" "dev" "doc" "man" ];
+
+  meta = with lib; {
+    description = "Portable abstraction of hierarchical architectures for high-performance computing";
+    longDescription = ''
+       hwloc provides a portable abstraction (across OS,
+       versions, architectures, ...) of the hierarchical topology of
+       modern architectures, including NUMA memory nodes, sockets,
+       shared caches, cores and simultaneous multithreading.  It also
+       gathers various attributes such as cache and memory
+       information.  It primarily aims at helping high-performance
+       computing applications with gathering information about the
+       hardware so as to exploit it accordingly and efficiently.
+
+       hwloc may display the topology in multiple convenient
+       formats.  It also offers a powerful programming interface to
+       gather information about the hardware, bind processes, and much
+       more.
+    '';
+    # https://www.open-mpi.org/projects/hwloc/license.php
+    license = licenses.bsd3;
+    homepage = "https://www.open-mpi.org/projects/hwloc/";
+    maintainers = with maintainers; [ fpletz markuskowa ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/hyena/default.nix b/nixpkgs/pkgs/development/libraries/hyena/default.nix
new file mode 100644
index 000000000000..177f6fe7909d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hyena/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv, fetchurl, pkg-config, mono, gtk-sharp-2_0, monoDLLFixer }:
+
+stdenv.mkDerivation rec {
+  pname = "hyena";
+  version = "0.5";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.bz2";
+    sha256 = "eb7154a42b6529bb9746c39272719f3168d6363ed4bad305a916ed7d90bc8de9";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [
+    mono gtk-sharp-2_0
+  ];
+
+  postPatch = ''
+    patchShebangs build/dll-map-makefile-verifier
+    patchShebangs build/private-icon-theme-installer
+    substituteInPlace configure --replace lib/mono/2.0/ lib/mono/2.0-api/
+    find -name Makefile.in | xargs -n 1 -d '\n' sed -e 's/^dnl/#/' -i
+  '';
+
+  dontStrip = true;
+
+  inherit monoDLLFixer;
+
+  meta = with lib; {
+    homepage = "https://wiki.gnome.org/Attic/Hyena";
+    description = "A C# library which contains a hodge-podge of random stuff";
+    longDescription = ''
+      Hyena is a C# library used to make awesome applications. It contains a lot of random things,
+      including useful data structures, a Sqlite-based db layer, cool widgets, a JSON library,
+      a smart job/task scheduler, a user-query/search parser, and much more. It's particularly
+      useful for Gtk# applications, though only the Hyena.Gui assembly requires Gtk#.
+    '';
+    platforms = platforms.all;
+    maintainers = with maintainers; [ obadz ];
+    license = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/hyperscan/default.nix b/nixpkgs/pkgs/development/libraries/hyperscan/default.nix
new file mode 100644
index 000000000000..0b9765dac4cf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hyperscan/default.nix
@@ -0,0 +1,84 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, ragel
+, python3
+, util-linux
+, pkg-config
+, boost
+, pcre
+, withStatic ? false # build only shared libs by default, build static+shared if true
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "hyperscan";
+  version = "5.4.2";
+
+  src = fetchFromGitHub {
+    owner = "intel";
+    repo = "hyperscan";
+    hash = "sha256-tzmVc6kJPzkFQLUM1MttQRLpgs0uckbV6rCxEZwk1yk=";
+    rev = "v${finalAttrs.version}";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  buildInputs = [ boost ];
+  nativeBuildInputs = [
+    cmake ragel python3 util-linux pkg-config
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_AVX512=ON"
+  ]
+  ++ lib.optional (!stdenv.isDarwin) "-DFAT_RUNTIME=ON"
+  ++ lib.optional (withStatic) "-DBUILD_STATIC_AND_SHARED=ON"
+  ++ lib.optional (!withStatic) "-DBUILD_SHARED_LIBS=ON";
+
+  # hyperscan CMake is completely broken for chimera builds when pcre is compiled
+  # the only option to make it build - building from source
+  # In case pcre is built from source, chimera build is turned on by default
+  preConfigure = lib.optional withStatic ''
+    mkdir -p pcre
+    tar xvf ${pcre.src} --strip-components 1 -C pcre
+  '';
+
+  postPatch = ''
+    sed -i '/examples/d' CMakeLists.txt
+    substituteInPlace libhs.pc.in \
+      --replace "libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@" "libdir=@CMAKE_INSTALL_LIBDIR@" \
+      --replace "includedir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@" "includedir=@CMAKE_INSTALL_INCLUDEDIR@"
+  '';
+
+  doCheck = true;
+  checkPhase = ''
+    runHook preCheck
+
+    bin/unit-hyperscan
+    ${lib.optionalString withStatic ''bin/unit-chimera''}
+
+    runHook postCheck
+  '';
+
+  meta = with lib; {
+    description = "High-performance multiple regex matching library";
+    longDescription = ''
+      Hyperscan is a high-performance multiple regex matching library.
+      It follows the regular expression syntax of the commonly-used
+      libpcre library, but is a standalone library with its own C API.
+
+      Hyperscan uses hybrid automata techniques to allow simultaneous
+      matching of large numbers (up to tens of thousands) of regular
+      expressions and for the matching of regular expressions across
+      streams of data.
+
+      Hyperscan is typically used in a DPI library stack.
+    '';
+
+    homepage = "https://www.hyperscan.io/";
+    maintainers = with maintainers; [ avnik ];
+    platforms = [ "x86_64-linux" "x86_64-darwin" ];
+    license = licenses.bsd3;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/hyphen/default.nix b/nixpkgs/pkgs/development/libraries/hyphen/default.nix
new file mode 100644
index 000000000000..ed3980f7a90d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hyphen/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchurl, perl, ... }:
+
+let
+  version = "2.8.8";
+  folder = with builtins;
+    let parts = splitVersion version;
+    in concatStringsSep "." [ (elemAt parts 0) (elemAt parts 1) ];
+in stdenv.mkDerivation rec {
+  pname = "hyphen";
+  inherit version;
+
+  nativeBuildInputs = [ perl ];
+
+  src = fetchurl {
+    url =
+      "https://sourceforge.net/projects/hunspell/files/Hyphen/${folder}/${pname}-${version}.tar.gz";
+    sha256 = "01ap9pr6zzzbp4ky0vy7i1983fwyqy27pl0ld55s30fdxka3ciih";
+  };
+
+  meta = with lib; {
+    description = "A text hyphenation library";
+    homepage = "https://sourceforge.net/projects/hunspell/files/Hyphen/";
+    platforms = platforms.all;
+    license = with licenses; [ gpl2 lgpl21 mpl11 ];
+    maintainers = with maintainers; [ Br1ght0ne ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/icu/58.nix b/nixpkgs/pkgs/development/libraries/icu/58.nix
new file mode 100644
index 000000000000..e53e4e3737ed
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/icu/58.nix
@@ -0,0 +1,14 @@
+fetchurl:
+let
+  keywordFix = fetchurl {
+    url = "http://bugs.icu-project.org/trac/changeset/39484?format=diff";
+    name = "icu-changeset-39484.diff";
+    sha256 = "0hxhpgydalyxacaaxlmaddc1sjwh65rsnpmg0j414mnblq74vmm8";
+  };
+in
+import ./base.nix {
+  version = "58.2";
+  sha256 = "036shcb3f8bm1lynhlsb4kpjm9s9c2vdiir01vg216rs2l8482ib";
+  patches = [ keywordFix ];
+  patchFlags = [ "-p4" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/icu/60.nix b/nixpkgs/pkgs/development/libraries/icu/60.nix
new file mode 100644
index 000000000000..e56135b15c62
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/icu/60.nix
@@ -0,0 +1,4 @@
+import ./base.nix {
+  version = "60.2";
+  sha256 = "065l3n0q9wqaw8dz20x82srshhm6i987fr9ync5xf9mr6n7ylwzh";
+}
diff --git a/nixpkgs/pkgs/development/libraries/icu/63.nix b/nixpkgs/pkgs/development/libraries/icu/63.nix
new file mode 100644
index 000000000000..a83e2cd5f5eb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/icu/63.nix
@@ -0,0 +1,16 @@
+{ stdenv, lib, fetchurl, fetchpatch, fixDarwinDylibNames, nativeBuildRoot, testers
+, buildRootOnly ? false
+}:
+
+import ./base.nix {
+  version = "63.1";
+  sha256 = "17fbk0lm2clsxbmjzvyp245ayx0n4chji3ky1f3fbz2ljjv91i05";
+  patches = [
+    # https://bugzilla.mozilla.org/show_bug.cgi?id=1499398
+    (fetchpatch {
+      url = "https://github.com/unicode-org/icu/commit/8baff8f03e07d8e02304d0c888d0bb21ad2eeb01.patch";
+      sha256 = "1awfa98ljcf95a85cssahw6bvdnpbq5brf1kgspy14w4mlmhd0jb";
+    })
+  ];
+  patchFlags = [ "-p3" ];
+} { inherit stdenv lib fetchurl fixDarwinDylibNames nativeBuildRoot testers buildRootOnly; }
diff --git a/nixpkgs/pkgs/development/libraries/icu/64.nix b/nixpkgs/pkgs/development/libraries/icu/64.nix
new file mode 100644
index 000000000000..c7bdd22c1793
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/icu/64.nix
@@ -0,0 +1,4 @@
+import ./base.nix {
+  version = "64.2";
+  sha256 = "0v0xsf14xwlj125y9fd8lrhsaych4d8liv8gr746zng6g225szb2";
+}
diff --git a/nixpkgs/pkgs/development/libraries/icu/66.nix b/nixpkgs/pkgs/development/libraries/icu/66.nix
new file mode 100644
index 000000000000..5dfad945d291
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/icu/66.nix
@@ -0,0 +1,4 @@
+import ./base.nix {
+  version = "66.1";
+  sha256 = "0bharwzc9nzkbrcf405z2nb3h7q0711z450arz0mjmdrk8hg58sj";
+}
diff --git a/nixpkgs/pkgs/development/libraries/icu/67.nix b/nixpkgs/pkgs/development/libraries/icu/67.nix
new file mode 100644
index 000000000000..23a1069ea14f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/icu/67.nix
@@ -0,0 +1,4 @@
+import ./base.nix {
+  version = "67.1";
+  sha256 = "1p6mhvxl0xr2n0g6xdps3mwzwlv6mjsz3xlpm793p9aiybb0ra4l";
+}
diff --git a/nixpkgs/pkgs/development/libraries/icu/68.nix b/nixpkgs/pkgs/development/libraries/icu/68.nix
new file mode 100644
index 000000000000..5aeba0f2628c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/icu/68.nix
@@ -0,0 +1,4 @@
+import ./base.nix {
+  version = "68.2";
+  sha256 = "09fng7a80xj8d5r1cgbgq8r47dsw5jsr6si9p2cj2ylhwgg974f7";
+}
diff --git a/nixpkgs/pkgs/development/libraries/icu/69.nix b/nixpkgs/pkgs/development/libraries/icu/69.nix
new file mode 100644
index 000000000000..8cea41daadb9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/icu/69.nix
@@ -0,0 +1,4 @@
+import ./base.nix {
+  version = "69.1";
+  sha256 = "0icps0avkwy5df3wwc5kybxcg63hcgk4phdh9g244g0xrmx7pfjc";
+}
diff --git a/nixpkgs/pkgs/development/libraries/icu/70.nix b/nixpkgs/pkgs/development/libraries/icu/70.nix
new file mode 100644
index 000000000000..955bbcac02f8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/icu/70.nix
@@ -0,0 +1,4 @@
+import ./base.nix {
+  version = "70.1";
+  sha256 = "1m9zgkaf5lyh65nyc6n0n5bs2f5k53nnj1ih6nskpwbvq4l5884d";
+}
diff --git a/nixpkgs/pkgs/development/libraries/icu/71.nix b/nixpkgs/pkgs/development/libraries/icu/71.nix
new file mode 100644
index 000000000000..456dffc322a4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/icu/71.nix
@@ -0,0 +1,4 @@
+import ./base.nix {
+  version = "71.1";
+  sha256 = "sha256-Z6fm5R9h+vEwa2k1Mz4TssSKvY2m0vRs5q3KJLHiHr8=";
+}
diff --git a/nixpkgs/pkgs/development/libraries/icu/72.nix b/nixpkgs/pkgs/development/libraries/icu/72.nix
new file mode 100644
index 000000000000..8eeb10138d12
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/icu/72.nix
@@ -0,0 +1,4 @@
+import ./base.nix {
+  version = "72.1";
+  sha256 = "sha256-otLTghcJKn7VZjXjRGf5L5drNw4gGCrTJe3qZoGnHWg=";
+}
diff --git a/nixpkgs/pkgs/development/libraries/icu/73.nix b/nixpkgs/pkgs/development/libraries/icu/73.nix
new file mode 100644
index 000000000000..dfbdf1403adc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/icu/73.nix
@@ -0,0 +1,4 @@
+import ./base.nix {
+  version = "73.2";
+  sha256 = "sha256-gYqAcS7TyqzZtlIwXgGvx/oWfm8ulJltpEuQwqtgTOE=";
+}
diff --git a/nixpkgs/pkgs/development/libraries/icu/base.nix b/nixpkgs/pkgs/development/libraries/icu/base.nix
new file mode 100644
index 000000000000..c5e46fa4530d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/icu/base.nix
@@ -0,0 +1,108 @@
+{ version, sha256, patches ? [], patchFlags ? [] }:
+{ stdenv, lib, fetchurl, fixDarwinDylibNames
+  # Cross-compiled icu4c requires a build-root of a native compile
+, buildRootOnly ? false, nativeBuildRoot
+, testers
+}:
+
+let
+  pname = "icu4c";
+
+  baseAttrs = {
+    src = fetchurl {
+      url = "https://github.com/unicode-org/icu/releases/download/release-${lib.replaceStrings [ "." ] [ "-" ] version}/icu4c-${lib.replaceStrings [ "." ] [ "_" ] version}-src.tgz";
+      inherit sha256;
+    };
+
+    postUnpack = ''
+      sourceRoot=''${sourceRoot}/source
+      echo Source root reset to ''${sourceRoot}
+    '';
+
+    # https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27
+    postPatch = if (stdenv.hostPlatform.libc == "glibc" || stdenv.hostPlatform.libc == "musl") && lib.versionOlder version "62.1"
+      then "substituteInPlace i18n/digitlst.cpp --replace '<xlocale.h>' '<locale.h>'"
+      else null; # won't find locale_t on darwin
+
+    inherit patchFlags patches;
+
+    preConfigure = ''
+      sed -i -e "s|/bin/sh|${stdenv.shell}|" configure
+
+      # $(includedir) is different from $(prefix)/include due to multiple outputs
+      sed -i -e 's|^\(CPPFLAGS = .*\) -I\$(prefix)/include|\1 -I$(includedir)|' config/Makefile.inc.in
+    '' + lib.optionalString stdenv.isAarch32 ''
+      # From https://archlinuxarm.org/packages/armv7h/icu/files/icudata-stdlibs.patch
+      sed -e 's/LDFLAGSICUDT=-nodefaultlibs -nostdlib/LDFLAGSICUDT=/' -i config/mh-linux
+    '';
+
+    configureFlags = [ "--disable-debug" ]
+      ++ lib.optional (stdenv.isFreeBSD || stdenv.isDarwin) "--enable-rpath"
+      ++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "--with-cross-build=${nativeBuildRoot}";
+
+    enableParallelBuilding = true;
+
+    meta = with lib; {
+      description = "Unicode and globalization support library";
+      homepage = "https://icu.unicode.org/";
+      maintainers = with maintainers; [ raskin ];
+      pkgConfigModules = [
+        "icu-i18n"
+        "icu-io"
+        "icu-uc"
+      ];
+      platforms = platforms.all;
+    };
+  };
+
+  realAttrs = baseAttrs // {
+    name = pname + "-" + version;
+
+    outputs = [ "out" "dev" ];
+    outputBin = "dev";
+
+    # FIXME: This fixes dylib references in the dylibs themselves, but
+    # not in the programs in $out/bin.
+    nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
+
+    # remove dependency on bootstrap-tools in early stdenv build
+    postInstall = lib.optionalString stdenv.isDarwin ''
+      sed -i 's/INSTALL_CMD=.*install/INSTALL_CMD=install/' $out/lib/icu/${version}/pkgdata.inc
+    '' + (let
+      replacements = [
+        { from = "\${prefix}/include"; to = "${placeholder "dev"}/include"; } # --cppflags-searchpath
+        { from = "\${pkglibdir}/Makefile.inc"; to = "${placeholder "dev"}/lib/icu/Makefile.inc"; } # --incfile
+        { from = "\${pkglibdir}/pkgdata.inc"; to = "${placeholder "dev"}/lib/icu/pkgdata.inc"; } # --incpkgdatafile
+      ];
+    in ''
+      substituteInPlace "$dev/bin/icu-config" \
+        ${lib.concatMapStringsSep " " (r: "--replace '${r.from}' '${r.to}'") replacements}
+    '');
+
+    postFixup = ''moveToOutput lib/icu "$dev" '';
+  };
+
+  buildRootOnlyAttrs = baseAttrs // {
+    name = pname + "-build-root-" + version;
+
+    preConfigure = baseAttrs.preConfigure + ''
+      mkdir build
+      cd build
+      configureScript=../configure
+    '';
+
+    postBuild = ''
+      cd ..
+      mv build $out
+      echo "Doing build-root only, exiting now" >&2
+      exit 0
+    '';
+  };
+
+  attrs = if buildRootOnly
+            then buildRootOnlyAttrs
+          else realAttrs;
+in
+stdenv.mkDerivation (finalAttrs: attrs // {
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+})
diff --git a/nixpkgs/pkgs/development/libraries/id3lib/default.nix b/nixpkgs/pkgs/development/libraries/id3lib/default.nix
new file mode 100644
index 000000000000..e95f5e3cab2d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/id3lib/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchurl, libiconv, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "id3lib";
+  version = "3.8.3";
+
+  patches = [
+    ./id3lib-3.8.3-gcc43-1.patch
+    ./patch_id3lib_3.8.3_UTF16_writing_bug.diff
+  ];
+
+  buildInputs = [ libiconv zlib ];
+
+  src = fetchurl {
+    url = "mirror://sourceforge/id3lib/${pname}-${version}.tar.gz";
+    sha256 = "0yfhqwk0w8q2hyv1jib1008jvzmwlpsxvc8qjllhna6p1hycqj97";
+  };
+
+  doCheck = false; # fails to compile
+
+  meta = with lib; {
+    description = "Library for reading, writing, and manipulating ID3v1 and ID3v2 tags";
+    homepage = "https://id3lib.sourceforge.net";
+    platforms = platforms.unix;
+    license = licenses.lgpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/id3lib/id3lib-3.8.3-gcc43-1.patch b/nixpkgs/pkgs/development/libraries/id3lib/id3lib-3.8.3-gcc43-1.patch
new file mode 100644
index 000000000000..2b7457d54c79
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/id3lib/id3lib-3.8.3-gcc43-1.patch
@@ -0,0 +1,104 @@
+http://www.linuxfromscratch.org/patches/downloads/id3lib/id3lib-3.8.3-gcc43-1.patch 
+
+Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
+Date: 2008-11-21
+Initial Package Version: 3.8.3
+Upstream Status: unknown
+Origin: fedora
+Description: Allows it to compile with gcc-4.3.
+
+diff -up id3lib-3.8.3/include/id3/id3lib_strings.h~ id3lib-3.8.3/include/id3/id3lib_strings.h
+--- id3lib-3.8.3/include/id3/id3lib_strings.h~	2003-03-02 02:23:00.000000000 +0200
++++ id3lib-3.8.3/include/id3/id3lib_strings.h	2008-01-04 01:30:52.000000000 +0200
+@@ -29,6 +29,7 @@
+ #ifndef _ID3LIB_STRINGS_H_
+ #define _ID3LIB_STRINGS_H_
+ 
++#include <cstring>
+ #include <string>
+ 
+ #if (defined(__GNUC__) && (__GNUC__ >= 3) || (defined(_MSC_VER) && _MSC_VER > 1000))
+diff -up id3lib-3.8.3/configure.in~ id3lib-3.8.3/configure.in
+--- id3lib-3.8.3/configure.in~	2008-01-04 11:39:01.000000000 +0100
++++ id3lib-3.8.3/configure.in	2008-01-04 11:39:01.000000000 +0100
+@@ -227,7 +227,6 @@ AC_CHECK_HEADERS(fstream iostream iomani
+ )
+ AC_CHECK_HEADERS(               \
+   string                        \
+-  iomanip.h                     \
+   ,,AC_MSG_ERROR([Missing a vital header file for id3lib])
+ )
+ 
+diff -up id3lib-3.8.3/configure~ id3lib-3.8.3/configure
+--- id3lib-3.8.3/configure~	2008-01-04 11:39:10.000000000 +0100
++++ id3lib-3.8.3/configure	2008-01-04 11:39:10.000000000 +0100
+@@ -22976,7 +22976,6 @@ done
+ 
+ for ac_header in \
+   string                        \
+-  iomanip.h                     \
+ 
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+diff -up id3lib-3.8.3/include/id3/writers.h~ id3lib-3.8.3/include/id3/writers.h
+--- id3lib-3.8.3/include/id3/writers.h~	2008-01-04 11:59:39.000000000 +0100
++++ id3lib-3.8.3/include/id3/writers.h	2008-01-04 11:59:39.000000000 +0100
+@@ -28,9 +28,9 @@
+ #ifndef _ID3LIB_WRITERS_H_
+ #define _ID3LIB_WRITERS_H_
+ 
++#include <cstring>
+ #include "id3/writer.h"
+ #include "id3/id3lib_streams.h"
+-//#include <string.h>
+ 
+ class ID3_CPP_EXPORT ID3_OStreamWriter : public ID3_Writer
+ {
+diff -up id3lib-3.8.3/examples/demo_info.cpp~ id3lib-3.8.3/examples/demo_info.cpp
+--- id3lib-3.8.3/examples/demo_info.cpp~	2008-01-04 12:00:56.000000000 +0100
++++ id3lib-3.8.3/examples/demo_info.cpp	2008-01-04 12:00:56.000000000 +0100
+@@ -309,7 +309,7 @@ void PrintInformation(const ID3_Tag &myT
+ 
+ #define DEBUG
+ 
+-int main( unsigned int argc, char * const argv[])
++int main(int argc, char * const argv[])
+ {
+   ID3D_INIT_DOUT();
+ 
+diff -up id3lib-3.8.3/examples/demo_copy.cpp~ id3lib-3.8.3/examples/demo_copy.cpp
+--- id3lib-3.8.3/examples/demo_copy.cpp~	2008-01-04 12:01:26.000000000 +0100
++++ id3lib-3.8.3/examples/demo_copy.cpp	2008-01-04 12:01:26.000000000 +0100
+@@ -81,7 +81,7 @@ void DisplayTags(ostream &os, luint nTag
+   }
+ }
+ 
+-int main( unsigned int argc, char * const argv[])
++int main(int argc, char * const argv[])
+ {
+   int ulFlag = ID3TT_ID3;
+   ID3D_INIT_DOUT();
+diff -up id3lib-3.8.3/examples/demo_convert.cpp~ id3lib-3.8.3/examples/demo_convert.cpp
+--- id3lib-3.8.3/examples/demo_convert.cpp~	2008-01-04 12:01:20.000000000 +0100
++++ id3lib-3.8.3/examples/demo_convert.cpp	2008-01-04 12:01:20.000000000 +0100
+@@ -84,7 +84,7 @@ void DisplayTags(ostream &os, luint nTag
+   }
+ }
+ 
+-int main( unsigned int argc, char * const argv[])
++int main(int argc, char * const argv[])
+ {
+   flags_t ulFlag = ID3TT_ALL;
+   gengetopt_args_info args;
+diff -up id3lib-3.8.3/examples/demo_tag.cpp~ id3lib-3.8.3/examples/demo_tag.cpp
+--- id3lib-3.8.3/examples/demo_tag.cpp~	2008-01-04 12:01:41.000000000 +0100
++++ id3lib-3.8.3/examples/demo_tag.cpp	2008-01-04 12:01:41.000000000 +0100
+@@ -46,7 +46,7 @@ void DisplayTags(ostream &os, luint nTag
+     os << "v2";
+ }
+ 
+-int main( unsigned int argc, char * const argv[])
++int main(int argc, char * const argv[])
+ {
+   int ulFlag = ID3TT_ID3;
+   ID3D_INIT_DOUT();
diff --git a/nixpkgs/pkgs/development/libraries/id3lib/patch_id3lib_3.8.3_UTF16_writing_bug.diff b/nixpkgs/pkgs/development/libraries/id3lib/patch_id3lib_3.8.3_UTF16_writing_bug.diff
new file mode 100644
index 000000000000..b05d2cf298d3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/id3lib/patch_id3lib_3.8.3_UTF16_writing_bug.diff
@@ -0,0 +1,39 @@
+diff -ruN id3lib-3.8.3.orig/ChangeLog id3lib-3.8.3/ChangeLog
+--- id3lib-3.8.3.orig/ChangeLog	2003-03-02 01:23:00.000000000 +0100
++++ id3lib-3.8.3/ChangeLog	2006-02-22 00:33:59.946214472 +0100
+@@ -1,3 +1,8 @@
++2006-02-17  Jerome Couderc
++
++    * Patch from Spoon to fix UTF-16 writing bug
++      http://sourceforge.net/tracker/index.php?func=detail&aid=1016290&group_id=979&atid=300979
++
+ 2003-03-02 Sunday 17:38   Thijmen Klok <thijmen@id3lib.org>
+ 
+ 	* THANKS (1.20): added more people 
+diff -ruN id3lib-3.8.3.orig/src/io_helpers.cpp id3lib-3.8.3/src/io_helpers.cpp
+--- id3lib-3.8.3.orig/src/io_helpers.cpp	2003-03-02 01:23:00.000000000 +0100
++++ id3lib-3.8.3/src/io_helpers.cpp	2006-02-22 00:35:02.926639992 +0100
+@@ -363,11 +363,22 @@
+     // Write the BOM: 0xFEFF
+     unicode_t BOM = 0xFEFF;
+     writer.writeChars((const unsigned char*) &BOM, 2);
++    // Patch from Spoon : 2004-08-25 14:17
++    //   http://sourceforge.net/tracker/index.php?func=detail&aid=1016290&group_id=979&atid=300979
++    // Wrong code
++    //for (size_t i = 0; i < size; i += 2)
++    //{
++    //  unicode_t ch = (data[i] << 8) | data[i+1];
++    //  writer.writeChars((const unsigned char*) &ch, 2);
++    //}
++    // Right code
++    unsigned char *pdata = (unsigned char *) data.c_str();
+     for (size_t i = 0; i < size; i += 2)
+     {
+-      unicode_t ch = (data[i] << 8) | data[i+1];
++      unicode_t ch = (pdata[i] << 8) | pdata[i+1];
+       writer.writeChars((const unsigned char*) &ch, 2);
+     }
++    // End patch
+   }
+   return writer.getCur() - beg;
+ }
diff --git a/nixpkgs/pkgs/development/libraries/idnkit/default.nix b/nixpkgs/pkgs/development/libraries/idnkit/default.nix
new file mode 100644
index 000000000000..37354f8be489
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/idnkit/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchurl, libiconv }:
+
+stdenv.mkDerivation rec {
+  pname = "idnkit";
+  version = "2.3";
+
+  src = fetchurl {
+    url = "https://jprs.co.jp/idn/${pname}-${version}.tar.bz2";
+    sha256 = "0zp9yc84ff5s0g2i6v9yfyza2n2x4xh0kq7hjd3anhh0clbp3l16";
+  };
+
+  buildInputs = [ libiconv ];
+
+  meta = with lib; {
+    homepage = "https://jprs.co.jp/idn/index-e.html";
+    description = "Provides functionalities about i18n domain name processing";
+    license = {
+      fullName = "Open Source Code License version 1.1";
+      url = "https://jprs.co.jp/idn/idnkit2-OSCL.txt";
+    };
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/igraph/default.nix b/nixpkgs/pkgs/development/libraries/igraph/default.nix
new file mode 100644
index 000000000000..55915b4bb523
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/igraph/default.nix
@@ -0,0 +1,110 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, arpack
+, bison
+, blas
+, cmake
+, flex
+, fop
+, glpk
+, gmp
+, lapack
+, libxml2
+, libxslt
+, llvmPackages
+, pkg-config
+, plfit
+, python3
+, sourceHighlight
+, xmlto
+}:
+
+assert (blas.isILP64 == lapack.isILP64 &&
+        blas.isILP64 == arpack.isILP64 &&
+        !blas.isILP64);
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "igraph";
+  version = "0.10.10";
+
+  src = fetchFromGitHub {
+    owner = "igraph";
+    repo = finalAttrs.pname;
+    rev = finalAttrs.version;
+    hash = "sha256-xFX48qAr0x0iNRns/aGH9UKL0wGJyfccQLdEXUFI/TU=";
+  };
+
+  postPatch = ''
+    echo "${finalAttrs.version}" > IGRAPH_VERSION
+  '';
+
+  outputs = [ "out" "dev" "doc" ];
+
+  nativeBuildInputs = [
+    bison
+    cmake
+    flex
+    fop
+    libxml2
+    libxslt
+    pkg-config
+    python3
+    sourceHighlight
+    xmlto
+  ];
+
+  buildInputs = [
+    arpack
+    blas
+    glpk
+    gmp
+    lapack
+    libxml2
+    plfit
+  ] ++ lib.optionals stdenv.cc.isClang [
+    llvmPackages.openmp
+  ];
+
+  cmakeFlags = [
+    "-DIGRAPH_USE_INTERNAL_BLAS=OFF"
+    "-DIGRAPH_USE_INTERNAL_LAPACK=OFF"
+    "-DIGRAPH_USE_INTERNAL_ARPACK=OFF"
+    "-DIGRAPH_USE_INTERNAL_GLPK=OFF"
+    "-DIGRAPH_USE_INTERNAL_GMP=OFF"
+    "-DIGRAPH_USE_INTERNAL_PLFIT=OFF"
+    "-DIGRAPH_GLPK_SUPPORT=ON"
+    "-DIGRAPH_GRAPHML_SUPPORT=ON"
+    "-DIGRAPH_OPENMP_SUPPORT=ON"
+    "-DIGRAPH_ENABLE_LTO=AUTO"
+    "-DIGRAPH_ENABLE_TLS=ON"
+    "-DBUILD_SHARED_LIBS=ON"
+  ];
+
+  doCheck = true;
+
+  postInstall = ''
+    mkdir -p "$out/share"
+    cp -r doc "$out/share"
+  '';
+
+  postFixup = ''
+    substituteInPlace $dev/lib/cmake/igraph/igraph-targets.cmake \
+      --replace-fail "_IMPORT_PREFIX \"$out\"" "_IMPORT_PREFIX \"$dev\""
+  '' + lib.optionalString stdenv.isDarwin ''
+    install_name_tool -change libblas.dylib ${blas}/lib/libblas.dylib $out/lib/libigraph.dylib
+  '';
+
+  passthru.tests = {
+    python = python3.pkgs.igraph;
+  };
+
+  meta = with lib; {
+    description = "C library for complex network analysis and graph theory";
+    homepage = "https://igraph.org/";
+    changelog = "https://github.com/igraph/igraph/blob/${finalAttrs.src.rev}/CHANGELOG.md";
+    license = licenses.gpl2Plus;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ MostAwesomeDude dotlambda ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/ijs/default.nix b/nixpkgs/pkgs/development/libraries/ijs/default.nix
new file mode 100644
index 000000000000..ad13daef788d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ijs/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, autoreconfHook, ghostscript }:
+
+stdenv.mkDerivation {
+  pname = "ijs";
+  inherit (ghostscript) version src;
+
+  postPatch = "cd ijs";
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  configureFlags = [ "--enable-shared" ];
+
+  meta = with lib; {
+    homepage = "https://www.openprinting.org/download/ijs/";
+    description = "Raster printer driver architecture";
+
+    license = licenses.gpl3Plus;
+
+    platforms = platforms.all;
+    maintainers = [ maintainers.abbradar ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/iksemel/default.nix b/nixpkgs/pkgs/development/libraries/iksemel/default.nix
new file mode 100644
index 000000000000..6ba64dcaa588
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/iksemel/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, autoreconfHook, libtool, pkg-config, gnutls, fetchFromGitHub, texinfo }:
+
+stdenv.mkDerivation rec {
+  pname = "iksemel";
+  version = "1.4.2";
+
+  src = fetchFromGitHub {
+    owner = "timothytylee";
+    repo = "iksemel-1.4";
+    rev = "v${version}";
+    sha256 = "1xv302p344hnpxqcgs3z6wwxhrik39ckgfw5cjyrw0dkf316z9yh";
+  };
+
+  nativeBuildInputs = [ pkg-config autoreconfHook libtool texinfo ];
+  buildInputs = [ gnutls ];
+
+  meta = with lib; {
+    description = "XML parser for jabber";
+
+    homepage = "https://github.com/timothytylee/iksemel-1.4";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ disassembler ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ilbc/CMakeLists.txt b/nixpkgs/pkgs/development/libraries/ilbc/CMakeLists.txt
new file mode 100644
index 000000000000..edd8e7a32797
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ilbc/CMakeLists.txt
@@ -0,0 +1,11 @@
+cmake_minimum_required(VERSION 2.6)
+
+project(ilbc)
+
+file(GLOB ilbc_SRCS *.c)
+file(GLOB ilbc_HDRS *.h)
+
+add_library(ilbc SHARED ${ilbc_SRCS})
+
+install(TARGETS ilbc DESTINATION lib)
+install(FILES ${ilbc_HDRS} DESTINATION include/ilbc)
diff --git a/nixpkgs/pkgs/development/libraries/ilbc/default.nix b/nixpkgs/pkgs/development/libraries/ilbc/default.nix
new file mode 100644
index 000000000000..39d7b7b61b04
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ilbc/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchurl, gawk, cmake }:
+
+stdenv.mkDerivation rec {
+  name = "ilbc-rfc3951";
+
+  script = ./extract-cfile.awk;
+
+  rfc3951 = fetchurl {
+    url = "http://www.ietf.org/rfc/rfc3951.txt";
+    sha256 = "0zf4mvi3jzx6zjrfl2rbhl2m68pzbzpf1vbdmn7dqbfpcb67jpdy";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  unpackPhase = ''
+    mkdir -v ${name}
+    cd ${name}
+    ${gawk}/bin/gawk -f ${script} ${rfc3951}
+    cp -v ${./CMakeLists.txt} CMakeLists.txt
+    '';
+
+  meta = {
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ilbc/extract-cfile.awk b/nixpkgs/pkgs/development/libraries/ilbc/extract-cfile.awk
new file mode 100644
index 000000000000..e4b07bc08963
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ilbc/extract-cfile.awk
@@ -0,0 +1,24 @@
+BEGIN { srcname = "nothing"; }
+{ if (/^A\.[0-9][0-9]*\.* *[a-zA-Z][a-zA-Z_0-9]*\.[ch]/) {
+    if (srcname != "nothing")
+      close(srcname);
+    srcname = $2;
+    printf("creating source file %s\n", srcname);
+  }else if (srcname != "nothing") {
+    if (/Andersen,* *et* *al\./) 
+      printf("skipping %s\n", $0);
+    else if (//)
+      printf("skipping2 %s\n", $0);
+    else if (/Internet Low Bit Rate Codec *December 2004/)
+      printf("skipping3 %s\n", $0);
+    else if (/Authors' *Addresses/){
+      close(srcname);
+      exit;}
+    else
+      print $0 >> srcname;
+  }
+}
+END {
+  printf("ending file %s\n", srcname);
+  close(srcname);
+}
diff --git a/nixpkgs/pkgs/development/libraries/ilmbase/default.nix b/nixpkgs/pkgs/development/libraries/ilmbase/default.nix
new file mode 100644
index 000000000000..219d961f9f96
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ilmbase/default.nix
@@ -0,0 +1,37 @@
+{ stdenv
+, lib
+, buildPackages
+, cmake
+, openexr
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ilmbase";
+  version = lib.getVersion openexr;
+
+  # the project no longer provides separate tarballs. We may even want to merge
+  # the ilmbase package into openexr in the future.
+  inherit (openexr) src patches;
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake ];
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+
+  # fails 1 out of 1 tests with
+  # "lt-ImathTest: testBoxAlgo.cpp:892: void {anonymous}::boxMatrixTransform(): Assertion `b21 == b2' failed"
+  # at least on i686. spooky!
+  doCheck = stdenv.isx86_64;
+
+  preConfigure = ''
+    # Need to cd after patches for openexr patches to apply.
+    cd IlmBase
+  '';
+
+  meta = with lib; {
+    description = " A library for 2D/3D vectors and matrices and other mathematical objects, functions and data types for computer graphics";
+    homepage = "https://www.openexr.com/";
+    license = licenses.bsd3;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/imath/default.nix b/nixpkgs/pkgs/development/libraries/imath/default.nix
new file mode 100644
index 000000000000..17d5f57c76c1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/imath/default.nix
@@ -0,0 +1,27 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "imath";
+  version = "3.1.9";
+
+  src = fetchFromGitHub {
+    owner = "AcademySoftwareFoundation";
+    repo = "imath";
+    rev = "v${version}";
+    sha256 = "sha256-NcGiYz7jbxLyVd80lOIyN3zXcC4mHh+dcFEY4Kqw9BY=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "Imath is a C++ and python library of 2D and 3D vector, matrix, and math operations for computer graphics";
+    homepage = "https://github.com/AcademySoftwareFoundation/Imath";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ paperdigits ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/imgui/default.nix b/nixpkgs/pkgs/development/libraries/imgui/default.nix
new file mode 100644
index 000000000000..244a3570c031
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/imgui/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, lib, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "imgui";
+  version = "1.90.2";
+
+  src = fetchFromGitHub {
+    owner = "ocornut";
+    repo = "imgui";
+    rev = "v${version}";
+    sha256 = "sha256-0sqV1TgidSuZQLihRTUCd46jKIgwcOJlKjRyOvopqlo=";
+  };
+
+  dontBuild = true;
+
+  installPhase = ''
+    mkdir -p $out/include/imgui
+
+    cp *.h $out/include/imgui
+    cp *.cpp $out/include/imgui
+    cp -a backends $out/include/imgui/
+    cp -a misc $out/include/imgui/
+  '';
+
+  meta = with lib; {
+    description = "Bloat-free Graphical User interface for C++ with minimal dependencies";
+    homepage = "https://github.com/ocornut/imgui";
+    license = licenses.mit;
+    maintainers = with maintainers; [ wolfangaukang ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/iml/default.nix b/nixpkgs/pkgs/development/libraries/iml/default.nix
new file mode 100644
index 000000000000..884cebab2e30
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/iml/default.nix
@@ -0,0 +1,28 @@
+{lib, stdenv, autoreconfHook, fetchurl, gmp, blas}:
+stdenv.mkDerivation rec {
+  pname = "iml";
+  version = "1.0.5";
+  src = fetchurl {
+    url = "http://www.cs.uwaterloo.ca/~astorjoh/iml-${version}.tar.bz2";
+    sha256 = "0akwhhz9b40bz6lrfxpamp7r7wkk48p455qbn04mfnl9a1l6db8x";
+  };
+  buildInputs = [
+    gmp
+    blas
+  ];
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+  configureFlags = [
+    "--with-gmp-include=${gmp.dev}/include"
+    "--with-gmp-lib=${gmp}/lib"
+    "--with-cblas=-lblas"
+  ];
+  meta = {
+    description = "Algorithms for computing exact solutions to dense systems of linear equations over the integers";
+    license = lib.licenses.gpl2Plus;
+    maintainers = [lib.maintainers.raskin];
+    platforms = lib.platforms.unix;
+    homepage = "https://cs.uwaterloo.ca/~astorjoh/iml.html";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/imlib2/default.nix b/nixpkgs/pkgs/development/libraries/imlib2/default.nix
new file mode 100644
index 000000000000..ab237d9dca00
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/imlib2/default.nix
@@ -0,0 +1,101 @@
+{ lib, stdenv, fetchurl
+# Image file formats
+, libjpeg, libtiff, giflib, libpng, libwebp, libjxl
+, libspectre
+# imlib2 can load images from ID3 tags.
+, libid3tag, librsvg, libheif
+, freetype , bzip2, pkg-config
+, x11Support ? true
+, webpSupport ? true
+, svgSupport ? false
+, heifSupport ? false
+, jxlSupport ? false
+, psSupport ? false
+
+# for passthru.tests
+, libcaca
+, diffoscopeMinimal
+, feh
+, icewm
+, openbox
+, fluxbox
+, enlightenment
+, xorg
+, testers
+
+, gitUpdater
+}:
+
+let
+  inherit (lib) optional optionals;
+in
+stdenv.mkDerivation (finalAttrs: {
+  pname = "imlib2";
+  version = "1.12.1";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/enlightenment/${finalAttrs.pname}-${finalAttrs.version}.tar.xz";
+    hash = "sha256-jCTS0YnE1a5gLb8vwPuxF6qSPqtsiDBB8P7spOjGd04=";
+  };
+
+  buildInputs = [
+    libjpeg libtiff giflib libpng
+    bzip2 freetype libid3tag
+  ] ++ optionals x11Support [ xorg.libXft xorg.libXext ]
+    ++ optional heifSupport libheif
+    ++ optional svgSupport librsvg
+    ++ optional webpSupport libwebp
+    ++ optional jxlSupport libjxl
+    ++ optional psSupport libspectre;
+
+  nativeBuildInputs = [ pkg-config ];
+
+  enableParallelBuilding = true;
+
+  # Do not build amd64 assembly code on Darwin, because it fails to compile
+  # with unknow directive errors
+  configureFlags = optional stdenv.isDarwin "--enable-amd64=no"
+    ++ optional (!svgSupport) "--without-svg"
+    ++ optional (!heifSupport) "--without-heif"
+    ++ optional (!x11Support) "--without-x";
+
+  outputs = [ "bin" "out" "dev" ];
+
+  passthru = {
+    tests = {
+      inherit
+        libcaca
+        diffoscopeMinimal
+        feh
+        icewm
+        openbox
+        fluxbox
+        enlightenment;
+      pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+    };
+    updateScript = gitUpdater {
+      # No nicer place to find latest release.
+      url = "https://git.enlightenment.org/old/legacy-imlib2.git";
+      rev-prefix = "v";
+    };
+  };
+
+  meta = with lib; {
+    description = "Image manipulation library";
+
+    longDescription = ''
+      This is the Imlib 2 library - a library that does image file loading and
+      saving as well as rendering, manipulation, arbitrary polygon support, etc.
+      It does ALL of these operations FAST. Imlib2 also tries to be highly
+      intelligent about doing them, so writing naive programs can be done
+      easily, without sacrificing speed.
+    '';
+
+    homepage = "https://docs.enlightenment.org/api/imlib2/html";
+    changelog = "https://git.enlightenment.org/old/legacy-imlib2/raw/tag/v${finalAttrs.version}/ChangeLog";
+    license = licenses.imlib2;
+    pkgConfigModules = [ "imlib2" ];
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/immer/default.nix b/nixpkgs/pkgs/development/libraries/immer/default.nix
new file mode 100644
index 000000000000..1e82c6ad1d5d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/immer/default.nix
@@ -0,0 +1,30 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "immer";
+  version = "0.8.0";
+
+  src = fetchFromGitHub {
+    owner = "arximboldi";
+    repo = "immer";
+    rev = "v${version}";
+    hash = "sha256-R0C6hN50eyFSv10L/Q0tRdnUrRvze+eRXPrlAQsddYY=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  dontBuild = true;
+  dontUseCmakeBuildDir = true;
+
+  meta = with lib; {
+    description = "Postmodern immutable and persistent data structures for C++ — value semantics at scale";
+    homepage = "https://sinusoid.es/immer";
+    changelog = "https://github.com/arximboldi/immer/releases/tag/v${version}";
+    license = licenses.boost;
+    maintainers = with maintainers; [ sifmelcara ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/impy/default.nix b/nixpkgs/pkgs/development/libraries/impy/default.nix
new file mode 100644
index 000000000000..6d148dd14639
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/impy/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv
+, fetchFromGitHub
+, meson
+, ninja
+, pkg-config
+, libpng
+, zlib
+, giflib
+, libjpeg
+}:
+
+stdenv.mkDerivation rec {
+  pname = "impy";
+  version = "0.2";
+
+  src = fetchFromGitHub {
+    owner = "bcampbell";
+    repo = "impy";
+    rev = "v${version}";
+    sha256 = "sha256-0bHm3jawYgcIeF2COALWlypX7kvPw1hifB/W+TKcC4M=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+  ];
+
+  buildInputs = [
+    libpng
+    zlib
+    giflib
+    libjpeg
+  ];
+
+  meta = with lib; {
+    description = "A simple library for loading/saving images and animations, written in C";
+    homepage = "https://github.com/bcampbell/impy";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ fgaz ];
+    platforms = platforms.all;
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/imtui/default.nix b/nixpkgs/pkgs/development/libraries/imtui/default.nix
new file mode 100644
index 000000000000..86b488c1a888
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/imtui/default.nix
@@ -0,0 +1,64 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, imgui
+, ninja
+, withEmscripten ? false, emscripten
+, withCurl ? (!withEmscripten), curl
+, withNcurses ? (!withEmscripten), ncurses
+, static ? withEmscripten
+, darwin
+}:
+
+stdenv.mkDerivation rec {
+  pname = "imtui";
+  version = "1.0.5";
+
+  src = fetchFromGitHub {
+    owner = "ggerganov";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-eHQPDEfxKGLdiOi0lUUgqJcmme1XJLSPAafT223YK+U=";
+  };
+
+  nativeBuildInputs = [ cmake ninja ];
+
+  buildInputs = lib.optional withEmscripten emscripten
+    ++ lib.optional withCurl curl
+    ++ lib.optional withNcurses ncurses
+    ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Cocoa;
+
+  postPatch = ''
+    cp -r ${imgui}/include/imgui third-party/imgui
+  '' + lib.optionalString (lib.versionAtLeast imgui.version "1.90.1") ''
+    substituteInPlace src/imtui-impl-{emscripten,ncurses}.cpp \
+      --replace "ImGuiKey_KeyPadEnter" "ImGuiKey_KeypadEnter"
+  '';
+
+  cmakeFlags = [
+    "-DEMSCRIPTEN:BOOL=${if withEmscripten then "ON" else "OFF"}"
+    "-DIMTUI_SUPPORT_CURL:BOOL=${if withCurl then "ON" else "OFF"}"
+    "-DIMTUI_SUPPORT_NCURSES:BOOL=${if withNcurses then "ON" else "OFF"}"
+    "-DBUILD_SHARED_LIBS:BOOL=${if (!static) then "ON" else "OFF"}"
+    "-DIMTUI_BUILD_EXAMPLES:BOOL=OFF"
+    "-DIMTUI_INSTALL_IMGUI_HEADERS:BOOL=OFF"
+  ];
+
+  postInstall = ''
+    rm -rf $out/include/imgui
+  '';
+
+  meta = with lib; {
+    description = "Immediate mode text-based user interface library";
+    longDescription = ''
+      ImTui is an immediate mode text-based user interface library. Supports 256
+      ANSI colors and mouse/keyboard input.
+    '';
+    homepage = "https://imtui.ggerganov.com";
+    changelog = "https://github.com/ggerganov/imtui/blob/${src.rev}/CHANGELOG.md";
+    license = licenses.mit;
+    maintainers = with maintainers; [ azahi ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/inchi/default.nix b/nixpkgs/pkgs/development/libraries/inchi/default.nix
new file mode 100644
index 000000000000..f74cfdec9305
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/inchi/default.nix
@@ -0,0 +1,74 @@
+{ fetchurl
+, lib
+, stdenv
+, unzip
+, fixDarwinDylibNames
+}:
+
+let
+  versionMajor = "1";
+  versionMinor = "0.6";
+  version = versionMajor + "." + versionMinor;
+  removeDots = lib.replaceStrings [ "." ] [ "" ];
+  src-doc = fetchurl {
+    url = "http://www.inchi-trust.org/download/${removeDots version}/INCHI-1-DOC.zip";
+    sha256 = "1kyda09i9p89xfq90ninwi7w13k1w3ljpl4gqdhpfhi5g8fgxx7f";
+   };
+in
+  stdenv.mkDerivation rec {
+    pname = "inchi";
+    inherit version;
+
+    src = fetchurl {
+      url = "http://www.inchi-trust.org/download/${removeDots version}/INCHI-1-SRC.zip";
+      sha256 = "1zbygqn0443p0gxwr4kx3m1bkqaj8x9hrpch3s41py7jq08f6x28";
+    };
+
+    nativeBuildInputs = [ unzip ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
+    outputs = [ "out" "doc" ];
+
+    enableParallelBuilding = true;
+
+    preConfigure = ''
+      cd ./INCHI_API/libinchi/gcc
+    '' + lib.optionalString stdenv.isDarwin ''
+      substituteInPlace makefile \
+        --replace ",--version-script=libinchi.map" "" \
+        --replace "LINUX_Z_RELRO = ,-z,relro" "" \
+        --replace "-soname" "-install_name" \
+        --replace "gcc" $CC
+    '';
+    installPhase = let
+      versionOneDot = versionMajor + "." + removeDots versionMinor;
+    in ''
+      runHook preInstall
+
+      cd ../../..
+      mkdir -p $out/lib
+      mkdir -p $out/include/inchi
+      mkdir -p $doc/share/
+
+      install -m 755 INCHI_API/bin/Linux/libinchi.so.${versionOneDot}.00 $out/lib
+      ln -s $out/lib/libinchi.so.${versionOneDot}.00 $out/lib/libinchi.so.1
+      ln -s $out/lib/libinchi.so.${versionOneDot}.00 $out/lib/libinchi.so
+      install -m 644 INCHI_BASE/src/*.h $out/include/inchi
+
+      runHook postInstall
+    '';
+
+    preFixup = lib.optionalString stdenv.isDarwin ''
+      fixDarwinDylibNames $(find "$out" -name "*.so.*")
+    '';
+
+    postInstall = ''
+      unzip '${src-doc}'
+      install -m 644 INCHI-1-DOC/*.pdf $doc/share
+    '';
+
+    meta = with lib; {
+      homepage = "https://www.inchi-trust.org/";
+      description = "IUPAC International Chemical Identifier library";
+      license = licenses.lgpl2Plus;
+      maintainers = with maintainers; [ rmcgibbo ];
+    };
+  }
diff --git a/nixpkgs/pkgs/development/libraries/incrtcl/default.nix b/nixpkgs/pkgs/development/libraries/incrtcl/default.nix
new file mode 100644
index 000000000000..4558ebbd0dcf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/incrtcl/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchurl, writeText, tcl }:
+
+tcl.mkTclDerivation rec {
+  pname = "incrtcl";
+  version = "4.2.3";
+
+  src = fetchurl {
+    url    = "mirror://sourceforge/incrtcl/%5BIncr%20Tcl_Tk%5D-source/3.4/itcl${version}.tar.gz";
+    sha256 = "sha256-idOs2GXP3ZY7ECtF+K9hg5REyK6sQ0qk+666gUQPjCY=";
+  };
+
+  enableParallelBuilding = true;
+
+  patchPhase = ''
+    substituteInPlace configure --replace "\''${TCL_SRC_DIR}/generic" "${tcl}/include"
+  '';
+
+  postInstall = ''
+    rmdir $out/bin
+    mv $out/lib/itcl${version}/* $out/lib
+    ln -s libitcl${version}${stdenv.hostPlatform.extensions.sharedLibrary} \
+      $out/lib/libitcl${lib.versions.major version}${stdenv.hostPlatform.extensions.sharedLibrary}
+    rmdir $out/lib/itcl${version}
+  '';
+
+  setupHook = writeText "setup-hook.sh" ''
+    export ITCL_LIBRARY=@out@/lib
+  '';
+
+  outputs = [ "out" "dev" "man" ];
+
+  meta = with lib; {
+    homepage    = "https://incrtcl.sourceforge.net/";
+    description = "Object Oriented Enhancements for Tcl/Tk";
+    license     = licenses.tcltk;
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ thoughtpolice ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/indicator-application/gtk2.nix b/nixpkgs/pkgs/development/libraries/indicator-application/gtk2.nix
new file mode 100644
index 000000000000..9fe3575b7bc2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/indicator-application/gtk2.nix
@@ -0,0 +1,53 @@
+{ stdenv, fetchurl, lib, file
+, pkg-config, autoconf
+, glib, dbus-glib, json-glib
+, gtk2, libindicator-gtk2, libdbusmenu-gtk2, libappindicator-gtk2 }:
+
+stdenv.mkDerivation rec {
+  pname = "indicator-application-gtk2";
+  version = "12.10.0.1";
+
+  src = fetchurl {
+    url = "${meta.homepage}/indicator-application-gtk2/i-a-${version}/+download/indicator-application-${version}.tar.gz";
+    sha256 = "1xqsb6c1pwawabw854f7aybjrgyhc2r1316i9lyjspci51zk5m7v";
+  };
+
+  nativeBuildInputs = [ pkg-config autoconf ];
+
+  buildInputs = [
+    glib dbus-glib json-glib
+    gtk2 libindicator-gtk2 libdbusmenu-gtk2 libappindicator-gtk2
+  ];
+
+  postPatch = ''
+    substituteInPlace configure.ac \
+      --replace 'DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1`' \
+                "DBUSSERVICEDIR=$out/share/dbus-1/services"
+    autoconf
+    for f in {configure,ltmain.sh,m4/libtool.m4}; do
+      substituteInPlace $f \
+        --replace /usr/bin/file ${file}/bin/file
+    done
+    substituteInPlace src/Makefile.in \
+      --replace 'applicationlibdir = $(INDICATORDIR)' "applicationlibdir = $out/lib"
+  '';
+
+  configureFlags = [
+    "CFLAGS=-Wno-error"
+    "--sysconfdir=/etc"
+    "--localstatedir=/var"
+  ];
+
+  installFlags = [
+    "sysconfdir=\${out}/etc"
+    "localstatedir=\${TMPDIR}"
+  ];
+
+  meta = with lib; {
+    description = "Indicator to take menus from applications and place them in the panel (GTK 2 library for Xfce/LXDE)";
+    homepage = "https://launchpad.net/indicators-gtk2";
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.msteen ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/indicator-application/gtk3.nix b/nixpkgs/pkgs/development/libraries/indicator-application/gtk3.nix
new file mode 100644
index 000000000000..8947e33e9001
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/indicator-application/gtk3.nix
@@ -0,0 +1,57 @@
+{ lib, stdenv, fetchbzr
+, pkg-config, systemd, autoreconfHook
+, glib, dbus-glib, json-glib
+, gtk3, libindicator-gtk3, libdbusmenu-gtk3, libappindicator-gtk3 }:
+
+stdenv.mkDerivation rec {
+  pname = "indicator-application";
+  version = "12.10.1";
+
+  name = "${pname}-gtk3-${version}";
+
+  src = fetchbzr {
+    url = "https://code.launchpad.net/~indicator-applet-developers/${pname}/trunk.17.04";
+    rev = "260";
+    sha256 = "1f0jdyqqb5g86zdpbcyn16x94yjigsfiv2kf73dvni5rp1vafbq1";
+  };
+
+  nativeBuildInputs = [ pkg-config autoreconfHook ];
+
+  buildInputs = [
+    glib dbus-glib json-glib systemd
+    gtk3 libindicator-gtk3 libdbusmenu-gtk3 libappindicator-gtk3
+  ];
+
+  postPatch = ''
+    substituteInPlace data/Makefile.am \
+      --replace "/etc/xdg/autostart" "$out/etc/xdg/autostart"
+  '';
+
+  configureFlags = [
+    "CFLAGS=-Wno-error"
+    "--sysconfdir=/etc"
+    "--localstatedir=/var"
+  ];
+
+  installFlags = [
+    "sysconfdir=\${out}/etc"
+    "localstatedir=\${TMPDIR}"
+  ];
+
+  PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "$(out)/lib/systemd/user";
+  PKG_CONFIG_INDICATOR3_0_4_INDICATORDIR = "$(out)/lib/indicators3/7/";
+
+  # Upstart is not used in NixOS
+  postFixup = ''
+    rm -rf $out/share/indicator-application/upstart
+    rm -rf $out/share/upstart
+  '';
+
+  meta = with lib; {
+    description = "Indicator to take menus from applications and place them in the panel";
+    homepage = "https://launchpad.net/indicator-application";
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.msteen ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/inih/default.nix b/nixpkgs/pkgs/development/libraries/inih/default.nix
new file mode 100644
index 000000000000..61bca95d9b2e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/inih/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchFromGitHub, meson, ninja }:
+
+stdenv.mkDerivation rec {
+  pname = "inih";
+  version = "57";
+
+  src = fetchFromGitHub {
+    owner = "benhoyt";
+    repo = pname;
+    rev = "r${version}";
+    hash = "sha256-a4nvhJSmZGqu2sdZSPNPjdnkzZ9dSKocL/XG2aDyFw4=";
+  };
+
+  nativeBuildInputs = [ meson ninja ];
+
+  meta = with lib; {
+    description = "Simple .INI file parser in C, good for embedded systems";
+    homepage = "https://github.com/benhoyt/inih";
+    changelog = "https://github.com/benhoyt/inih/releases/tag/r${version}";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ TredwellGit ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/iniparser/default.nix b/nixpkgs/pkgs/development/libraries/iniparser/default.nix
new file mode 100644
index 000000000000..62deaeb1c281
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/iniparser/default.nix
@@ -0,0 +1,51 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "iniparser";
+  version = "4.1";
+
+  src = fetchFromGitHub {
+    owner = "ndevilla";
+    repo = "iniparser";
+    rev = "v${version}";
+    sha256 = "0dhab6pad6wh816lr7r3jb6z273njlgw2vpw8kcfnmi7ijaqhnr5";
+  };
+
+  patches = ./no-usr.patch;
+
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace Makefile \
+        --replace -Wl,-soname= -Wl,-install_name,
+  '';
+
+  doCheck = true;
+  preCheck = "patchShebangs test/make-tests.sh";
+
+  installPhase = ''
+    mkdir -p $out/lib
+
+    mkdir -p $out/include
+    cp src/*.h $out/include
+
+    mkdir -p $out/share/doc/${pname}-${version}
+    for i in AUTHORS INSTALL LICENSE README.md; do
+      bzip2 -c -9 $i > $out/share/doc/${pname}-${version}/$i.bz2;
+    done;
+    cp -r html $out/share/doc/${pname}-${version}
+
+    cp libiniparser.a $out/lib
+    cp libiniparser.so.1 $out/lib
+    ln -s libiniparser.so.1 $out/lib/libiniparser.so
+
+    mkdir -p $out/lib/pkgconfig
+    substituteAll ${./iniparser.pc.in} $out/lib/pkgconfig/iniparser.pc
+  '';
+
+  meta = with lib; {
+    inherit (src.meta) homepage;
+    description = "Free standalone ini file parsing library";
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.primeos ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/iniparser/iniparser.pc.in b/nixpkgs/pkgs/development/libraries/iniparser/iniparser.pc.in
new file mode 100644
index 000000000000..fb94188fff71
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/iniparser/iniparser.pc.in
@@ -0,0 +1,12 @@
+prefix=@out@
+exec_prefix=@out@
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+datarootdir=${prefix}/share
+datadir=${datarootdir}
+
+Name: libiniparser
+Description: Iniparser library
+Version: @version@
+Libs: -L${libdir} -liniparser
+Cflags: -I${includedir}
diff --git a/nixpkgs/pkgs/development/libraries/iniparser/no-usr.patch b/nixpkgs/pkgs/development/libraries/iniparser/no-usr.patch
new file mode 100644
index 000000000000..a3c568cdde43
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/iniparser/no-usr.patch
@@ -0,0 +1,13 @@
+--- a/Makefile	2017-10-20 20:30:41.494608284 +0200
++++ b/Makefile	2017-10-20 20:33:22.279212026 +0200
+@@ -20,8 +20,8 @@
+ ARFLAGS = rcv
+ 
+ SHLD = ${CC} ${CFLAGS}
+-LDSHFLAGS = -shared -Wl,-Bsymbolic
+-LDFLAGS += -Wl,-rpath -Wl,/usr/lib -Wl,-rpath,/usr/lib
++LDSHFLAGS = -shared
++LDFLAGS =
+ 
+ # .so.0 is for version 3.x, .so.1 is 4.x
+ SO_TARGET ?= libiniparser.so.1
diff --git a/nixpkgs/pkgs/development/libraries/intel-gmmlib/default.nix b/nixpkgs/pkgs/development/libraries/intel-gmmlib/default.nix
new file mode 100644
index 000000000000..58eba3ddc6d9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/intel-gmmlib/default.nix
@@ -0,0 +1,39 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+# for passthru.tests
+, intel-compute-runtime
+, intel-media-driver
+}:
+
+stdenv.mkDerivation rec {
+  pname = "intel-gmmlib";
+  version = "22.3.17";
+
+  src = fetchFromGitHub {
+    owner = "intel";
+    repo = "gmmlib";
+    rev = "intel-gmmlib-${version}";
+    sha256 = "sha256-9utlENByIQSayKTdSJapLBWMI2gFpOReNZe7bpbEoj8=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  passthru.tests = {
+    inherit intel-compute-runtime intel-media-driver;
+  };
+
+  meta = with lib; {
+    homepage = "https://github.com/intel/gmmlib";
+    license = licenses.mit;
+    description = "Intel Graphics Memory Management Library";
+    longDescription = ''
+      The Intel(R) Graphics Memory Management Library provides device specific
+      and buffer management for the Intel(R) Graphics Compute Runtime for
+      OpenCL(TM) and the Intel(R) Media Driver for VAAPI.
+    '';
+    platforms = [ "x86_64-linux" "i686-linux" ];
+    maintainers = with maintainers; [ SuperSandro2000 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/intel-media-driver/default.nix b/nixpkgs/pkgs/development/libraries/intel-media-driver/default.nix
new file mode 100644
index 000000000000..68028849b639
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/intel-media-driver/default.nix
@@ -0,0 +1,75 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, pkg-config
+, libva
+, libpciaccess
+, intel-gmmlib
+, libdrm
+, enableX11 ? stdenv.isLinux
+, libX11
+  # for passhtru.tests
+, pkgsi686Linux
+}:
+
+stdenv.mkDerivation rec {
+  pname = "intel-media-driver";
+  version = "23.3.5";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "intel";
+    repo = "media-driver";
+    rev = "intel-media-${version}";
+    hash = "sha256-7OdLpqO2evNeyxceOtHEI7sJCVybqvrcM1ZZx8bI4xw=";
+  };
+
+  patches = [
+    # fix platform detection
+    (fetchpatch {
+      url = "https://salsa.debian.org/multimedia-team/intel-media-driver-non-free/-/raw/7376a99f060c26d6be8e56674da52a61662617b9/debian/patches/0002-Remove-settings-based-on-ARCH.patch";
+      hash = "sha256-57yePuHWYb3XXrB4MjYO2h6jbqfs4SGTLlLG91el8M4=";
+    })
+  ];
+
+  cmakeFlags = [
+    "-DINSTALL_DRIVER_SYSCONF=OFF"
+    "-DLIBVA_DRIVERS_PATH=${placeholder "out"}/lib/dri"
+    # Works only on hosts with suitable CPUs.
+    "-DMEDIA_RUN_TEST_SUITE=OFF"
+    "-DMEDIA_BUILD_FATAL_WARNINGS=OFF"
+  ];
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.hostPlatform.system == "i686-linux") "-D_FILE_OFFSET_BITS=64";
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [ libva libpciaccess intel-gmmlib libdrm ]
+    ++ lib.optional enableX11 libX11;
+
+  postFixup = lib.optionalString enableX11 ''
+    patchelf --set-rpath "$(patchelf --print-rpath $out/lib/dri/iHD_drv_video.so):${lib.makeLibraryPath [ libX11 ]}" \
+      $out/lib/dri/iHD_drv_video.so
+  '';
+
+  passthru.tests = {
+    inherit (pkgsi686Linux) intel-media-driver;
+  };
+
+  meta = with lib; {
+    description = "Intel Media Driver for VAAPI — Broadwell+ iGPUs";
+    longDescription = ''
+      The Intel Media Driver for VAAPI is a new VA-API (Video Acceleration API)
+      user mode driver supporting hardware accelerated decoding, encoding, and
+      video post processing for GEN based graphics hardware.
+    '';
+    homepage = "https://github.com/intel/media-driver";
+    changelog = "https://github.com/intel/media-driver/releases/tag/intel-media-${version}";
+    license = with licenses; [ bsd3 mit ];
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ SuperSandro2000 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/intel-media-sdk/default.nix b/nixpkgs/pkgs/development/libraries/intel-media-sdk/default.nix
new file mode 100644
index 000000000000..b20b6782d9b0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/intel-media-sdk/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, gtest, libdrm, libpciaccess, libva, libX11
+, libXau, libXdmcp, libpthreadstubs, fetchpatch }:
+
+stdenv.mkDerivation rec {
+  pname = "intel-media-sdk";
+  version = "23.2.2";
+
+  src = fetchFromGitHub {
+    owner = "Intel-Media-SDK";
+    repo = "MediaSDK";
+    rev = "intel-mediasdk-${version}";
+    hash = "sha256-wno3a/ZSKvgHvZiiJ0Gq9GlrEbfHCizkrSiHD6k/Loo=";
+  };
+
+  patches = [
+    # https://github.com/Intel-Media-SDK/MediaSDK/pull/3005
+    (fetchpatch {
+      name = "include-cstdint-explicitly.patch";
+      url = "https://github.com/Intel-Media-SDK/MediaSDK/commit/a4f37707c1bfdd5612d3de4623ffb2d21e8c1356.patch";
+      hash = "sha256-OPwGzcMTctJvHcKn5bHqV8Ivj4P7+E4K9WOKgECqf04=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [
+    libdrm libva libpciaccess libX11 libXau libXdmcp libpthreadstubs
+  ];
+  nativeCheckInputs = [ gtest ];
+
+  cmakeFlags = [
+    "-DBUILD_SAMPLES=OFF"
+    "-DBUILD_TESTS=${if doCheck then "ON" else "OFF"}"
+    "-DUSE_SYSTEM_GTEST=ON"
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Intel Media SDK";
+    license = licenses.mit;
+    maintainers = with maintainers; [ midchildan ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/intel-vaapi-driver/default.nix b/nixpkgs/pkgs/development/libraries/intel-vaapi-driver/default.nix
new file mode 100644
index 000000000000..5622ad158f91
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/intel-vaapi-driver/default.nix
@@ -0,0 +1,55 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, gnum4, pkg-config, python3
+, intel-gpu-tools, libdrm, libva
+, enableHybridCodec ? false, vaapi-intel-hybrid
+, enableGui ? true, libX11, libGL, wayland, libXext
+}:
+
+stdenv.mkDerivation rec {
+  pname = "intel-vaapi-driver";
+  version = "2.4.1";
+
+  src = fetchFromGitHub {
+    owner  = "intel";
+    repo   = "intel-vaapi-driver";
+    rev    = version;
+    sha256 = "1cidki3av9wnkgwi7fklxbg3bh6kysf8w3fk2qadjr05a92mx3zp";
+  };
+
+  # Set the correct install path:
+  LIBVA_DRIVERS_PATH = "${placeholder "out"}/lib/dri";
+
+  postInstall = lib.optionalString enableHybridCodec ''
+    ln -s ${vaapi-intel-hybrid}/lib/dri/* $out/lib/dri/
+  '';
+
+  configureFlags = [
+    (lib.enableFeature enableGui "x11")
+    (lib.enableFeature enableGui "wayland")
+  ] ++ lib.optional enableHybridCodec "--enable-hybrid-codec";
+
+  nativeBuildInputs = [ autoreconfHook gnum4 pkg-config python3 ];
+
+  buildInputs = [ intel-gpu-tools libdrm libva ]
+    ++ lib.optionals enableGui [ libX11 libXext libGL wayland ]
+    ++ lib.optional enableHybridCodec vaapi-intel-hybrid;
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://01.org/linuxmedia";
+    license = licenses.mit;
+    description = "VA-API user mode driver for Intel GEN Graphics family";
+    longDescription = ''
+      This VA-API video driver backend provides a bridge to the GEN GPUs through
+      the packaging of buffers and commands to be sent to the i915 driver for
+      exercising both hardware and shader functionality for video decode,
+      encode, and processing.
+      VA-API is an open-source library and API specification, which provides
+      access to graphics hardware acceleration capabilities for video
+      processing. It consists of a main library and driver-specific acceleration
+      backends for each supported hardware vendor.
+    '';
+    platforms = [ "x86_64-linux" "i686-linux" ];
+    maintainers = with maintainers; [ SuperSandro2000 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/iodash/0001-Add-cmake-install-directives.patch b/nixpkgs/pkgs/development/libraries/iodash/0001-Add-cmake-install-directives.patch
new file mode 100644
index 000000000000..1868a7419208
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/iodash/0001-Add-cmake-install-directives.patch
@@ -0,0 +1,44 @@
+From 89c7c160f897f64e17fb74efffccfd1fc16f8b7d Mon Sep 17 00:00:00 2001
+From: Jappie Klooster <jappieklooster@hotmail.com>
+Date: Fri, 2 Apr 2021 14:22:02 -0400
+Subject: [PATCH] Add cmake install directives.
+
+To make nix builds work, it expect a `make install` command to
+be available.
+Adding these directives seems to fix the build.
+
+If it's no trouble to you, please add them.
+
+Maybe don't need endian
+---
+ CMakeLists.txt | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 06e416f..8d6f489 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -6,6 +6,8 @@ set(CMAKE_CXX_STANDARD 17)
+ add_library(IODash INTERFACE)
+ target_include_directories(IODash INTERFACE .)
+ 
++include(GNUInstallDirs)
++
+ add_executable(IODash_Test test.cpp)
+ target_link_libraries(IODash_Test IODash)
+ 
+@@ -20,3 +22,11 @@ if (DEFINED BUILD_BENCHMARKS AND (${BUILD_BENCHMARKS}))
+     target_link_libraries(boost_Benchmark_HTTP boost_system pthread)
+ endif()
+ 
++install(TARGETS IODash
++        LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
++install(FILES IODash.hpp
++        DESTINATION include/)
++
++install(FILES
++        IODash/Buffer.hpp IODash/SocketAddress.hpp IODash/File.hpp IODash/Socket.hpp IODash/EventLoop.hpp IODash/Serial.hpp IODash/Timer.hpp
++        DESTINATION include/IODash)
+-- 
+2.29.2
+
diff --git a/nixpkgs/pkgs/development/libraries/iodash/default.nix b/nixpkgs/pkgs/development/libraries/iodash/default.nix
new file mode 100644
index 000000000000..d8982f0f8c04
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/iodash/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "iodash";
+  version = "0.1.7";
+
+  src  = fetchFromGitHub {
+    owner  = "YukiWorkshop";
+    repo   = "IODash";
+    rev    = "9dcb26621a9c17dbab704b5bab0c3a5fc72624cb";
+    sha256 = "0db5y2206fwh3h1pzjm9hy3m76inm0xpm1c5gvrladz6hiqfp7bx";
+    fetchSubmodules = true;
+  };
+  # adds missing cmake install directives
+  # https://github.com/YukiWorkshop/IODash/pull/2
+  patches = [ ./0001-Add-cmake-install-directives.patch];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  meta = with lib; {
+    homepage = "https://github.com/YukiWorkshop/IODash";
+    description = "Lightweight C++ I/O library for POSIX operation systems";
+    license = licenses.mit;
+    maintainers = with maintainers; [ jappie ];
+    platforms = with platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ip2location-c/default.nix b/nixpkgs/pkgs/development/libraries/ip2location-c/default.nix
new file mode 100644
index 000000000000..43db1ac56b09
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ip2location-c/default.nix
@@ -0,0 +1,41 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ip2location-c";
+  version = "8.6.1";
+
+  src = fetchFromGitHub {
+    owner = "chrislim2888";
+    repo = "IP2Location-C-Library";
+    rev = version;
+    sha256 = "sha256-3/cLoGV7go4S1ew73IJzJEMTlLnvM3adl+/Sb7mPrZY=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  enableParallelBuilding = true;
+
+  # Checks require a database, which require registration (although sample
+  # databases are available, downloading them for just 1 test seems excessive):
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Library to look up locations of host names and IP addresses";
+    longDescription = ''
+      A C library to find the country, region, city,coordinates,
+      zip code, time zone, ISP, domain name, connection type, area code,
+      weather, MCC, MNC, mobile brand name, elevation and usage type of
+      any IP address or host name in the IP2Location databases.
+    '';
+    homepage = "https://www.ip2location.com/developers/c";
+    license = with licenses; [ gpl3Plus lgpl3Plus ];
+    maintainers = with maintainers; [ ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ipu6-camera-hal/default.nix b/nixpkgs/pkgs/development/libraries/ipu6-camera-hal/default.nix
new file mode 100644
index 000000000000..3ec63fd0807d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ipu6-camera-hal/default.nix
@@ -0,0 +1,88 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+
+# build
+, cmake
+, pkg-config
+
+# runtime
+, expat
+, ipu6-camera-bins
+, libtool
+, gst_all_1
+
+# Pick one of
+# - ipu6 (Tiger Lake)
+# - ipu6ep (Alder Lake)
+# - ipu6epmtl (Meteor Lake)
+, ipuVersion ? "ipu6"
+}:
+let
+  ipuTarget = {
+    "ipu6" = "ipu_tgl";
+    "ipu6ep" = "ipu_adl";
+    "ipu6epmtl" = "ipu_mtl";
+  }.${ipuVersion};
+in
+stdenv.mkDerivation {
+  pname = "${ipuVersion}-camera-hal";
+  version = "unstable-2023-09-25";
+
+  src = fetchFromGitHub {
+    owner = "intel";
+    repo = "ipu6-camera-hal";
+    rev = "9fa05a90886d399ad3dda4c2ddc990642b3d20c9";
+    hash = "sha256-yS1D7o6dsQ4FQkjfwcisOxcP7Majb+4uQ/iW5anMb5c=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  PKG_CONFIG_PATH = "${lib.makeLibraryPath [ ipu6-camera-bins ]}/${ipuTarget}/pkgconfig";
+
+  cmakeFlags = [
+    "-DIPU_VER=${ipuVersion}"
+    # missing libiacss
+    "-DUSE_PG_LITE_PIPE=ON"
+  ];
+
+  NIX_CFLAGS_COMPILE = [
+    "-Wno-error"
+  ];
+
+  enableParallelBuilding = true;
+
+  buildInputs = [
+    expat
+    ipu6-camera-bins
+    libtool
+    gst_all_1.gstreamer
+    gst_all_1.gst-plugins-base
+  ];
+
+  postPatch = ''
+    substituteInPlace src/platformdata/PlatformData.h \
+      --replace '/usr/share/' "${placeholder "out"}/share/"
+  '';
+
+  postFixup = ''
+    for lib in $out/lib/*.so; do
+      patchelf --add-rpath "${lib.makeLibraryPath [ ipu6-camera-bins ]}/${ipuTarget}" $lib
+    done
+  '';
+
+  passthru = {
+    inherit ipuVersion;
+  };
+
+  meta = with lib; {
+    description = "HAL for processing of images in userspace";
+    homepage = "https://github.com/intel/ipu6-camera-hal";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ hexa ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/iqueue/default.nix b/nixpkgs/pkgs/development/libraries/iqueue/default.nix
new file mode 100644
index 000000000000..7f5d5c4c069c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/iqueue/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl, pkg-config, libbsd, microsoft-gsl }:
+
+stdenv.mkDerivation rec {
+  pname = "iqueue";
+  version = "0.1.0";
+  src = fetchurl {
+    url = "https://github.com/twosigma/iqueue/releases/download/v${version}/iqueue-${version}.tar.gz";
+    sha256 = "0049fnr02k15gr21adav33swrwxrpbananilnrp63vp5zs5v9m4x";
+  };
+
+  doCheck = true;
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libbsd microsoft-gsl ];
+
+  env.NIX_CFLAGS_COMPILE = toString [
+    # Needed with GCC 12
+    "-Wno-error=array-parameter"
+    "-Wno-error=misleading-indentation"
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/twosigma/iqueue";
+    description = "Indexed queue";
+    license = licenses.asl20;
+    platforms = [ "x86_64-linux" ];
+    maintainers = [ maintainers.catern ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/irrlicht/common.nix b/nixpkgs/pkgs/development/libraries/irrlicht/common.nix
new file mode 100644
index 000000000000..f330c30fda11
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/irrlicht/common.nix
@@ -0,0 +1,11 @@
+{ fetchzip }:
+
+rec {
+  pname = "irrlicht";
+  version = "1.8.4";
+
+  src = fetchzip {
+    url = "mirror://sourceforge/irrlicht/${pname}-${version}.zip";
+    sha256 = "02sq067fn4xpf0lcyb4vqxmm43qg2nxx770bgrl799yymqbvih5f";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/irrlicht/default.nix b/nixpkgs/pkgs/development/libraries/irrlicht/default.nix
new file mode 100644
index 000000000000..fa5d2b3b0c99
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/irrlicht/default.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, fetchzip, libGLU, libGL, libXrandr, libX11, libXxf86vm, zlib }:
+
+let
+  common = import ./common.nix { inherit fetchzip; };
+in
+
+stdenv.mkDerivation rec {
+  pname = common.pname;
+  version = common.version;
+
+  src = common.src;
+
+  postPatch = ''
+    sed -ie '/sys\/sysctl.h/d' source/Irrlicht/COSOperator.cpp
+  '' + lib.optionalString stdenv.isAarch64 ''
+    substituteInPlace source/Irrlicht/Makefile \
+      --replace "-DIRRLICHT_EXPORTS=1" "-DIRRLICHT_EXPORTS=1 -DPNG_ARM_NEON_OPT=0"
+  '';
+
+  preConfigure = ''
+    cd source/Irrlicht
+  '';
+
+  preBuild = ''
+    makeFlagsArray+=(sharedlib NDEBUG=1 LDFLAGS="-lX11 -lGL -lXxf86vm")
+  '';
+
+  enableParallelBuilding = true;
+
+  preInstall = ''
+    sed -i s,/usr/local/lib,$out/lib, Makefile
+    mkdir -p $out/lib
+  '';
+
+  buildInputs = [
+    libGLU libGL libXrandr libX11 libXxf86vm
+  ] ++ lib.optional stdenv.isAarch64 zlib;
+
+  meta = {
+    homepage = "https://irrlicht.sourceforge.io/";
+    license = lib.licenses.zlib;
+    description = "Open source high performance realtime 3D engine written in C++";
+    platforms = lib.platforms.linux ++ lib.platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/irrlicht/mac.nix b/nixpkgs/pkgs/development/libraries/irrlicht/mac.nix
new file mode 100644
index 000000000000..b3ef27e38774
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/irrlicht/mac.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchzip, libGLU, libGL, fetchFromGitHub, cmake, Cocoa, OpenGL, IOKit }:
+
+let
+  common = import ./common.nix { inherit fetchzip; };
+in
+
+stdenv.mkDerivation rec {
+  pname = "irrlicht-mac";
+  version = common.version;
+
+  src = fetchFromGitHub {
+    owner = "quiark";
+    repo = "IrrlichtCMake";
+    rev = "523a5e6ef84be67c3014f7b822b97acfced536ce";
+    sha256 = "10ahnry2zl64wphs233gxhvs6c0345pyf5nwa29mc6yn49x7bidi";
+  };
+
+  postUnpack = ''
+    cp -r ${common.src}/* $sourceRoot/
+    chmod -R 777 $sourceRoot
+  '';
+
+  patches = [ ./mac_device.patch ];
+  dontFixCmake = true;
+
+  cmakeFlags = [
+    "-DIRRLICHT_STATIC_LIBRARY=ON"
+    "-DIRRLICHT_BUILD_EXAMPLES=OFF"
+    "-DIRRLICHT_INSTALL_MEDIA_FILES=OFF"
+    "-DIRRLICHT_ENABLE_X11_SUPPORT=OFF"
+    "-DIRRLICHT_BUILD_TOOLS=OFF"
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ OpenGL Cocoa IOKit ];
+
+  meta = {
+    homepage = "https://irrlicht.sourceforge.net/";
+    license = lib.licenses.zlib;
+    description = "Open source high performance realtime 3D engine written in C++";
+    platforms = lib.platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/irrlicht/mac_device.patch b/nixpkgs/pkgs/development/libraries/irrlicht/mac_device.patch
new file mode 100644
index 000000000000..2cd402938286
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/irrlicht/mac_device.patch
@@ -0,0 +1,38 @@
+--- a/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm
++++ b/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm
+@@ -39,7 +39,7 @@
+ #include <IOKit/hidsystem/IOHIDUsageTables.h>

+ #else

+ /* The header was moved here in Mac OS X 10.1 */

+-#include <Kernel/IOKit/hidsystem/IOHIDUsageTables.h>

++#include <IOKit/hid/IOHIDUsageTables.h>

+ #endif

+ #include <IOKit/hid/IOHIDLib.h>

+ #include <IOKit/hid/IOHIDKeys.h>

+@@ -496,7 +496,7 @@
+ 		{

+ 			[[NSAutoreleasePool alloc] init];

+ 			[NSApplication sharedApplication];

+-			[NSApp setDelegate:(id<NSFileManagerDelegate>)[[[AppDelegate alloc] initWithDevice:this] autorelease]];

++			[NSApp setDelegate:(id<NSApplicationDelegate>)[[[AppDelegate alloc] initWithDevice:this] autorelease]];

+ 			[NSBundle loadNibNamed:@"MainMenu" owner:[NSApp delegate]];

+ 			[NSApp finishLaunching];

+ 		}

+@@ -642,7 +642,7 @@
+ 						NSOpenGLPFASamples, (NSOpenGLPixelFormatAttribute)CreationParams.AntiAlias,

+ 						NSOpenGLPFAStencilSize, (NSOpenGLPixelFormatAttribute)(CreationParams.Stencilbuffer?1:0),

+ 						NSOpenGLPFADoubleBuffer,

+-						(NSOpenGLPixelFormatAttribute)nil

++						(NSOpenGLPixelFormatAttribute)0

+ 					};

+ 

+ 					if (CreationParams.AntiAlias<2)

+@@ -668,7 +668,7 @@
+ 						{

+ 							// Third try without Doublebuffer

+ 							os::Printer::log("No doublebuffering available.", ELL_WARNING);

+-							windowattribs[14]=(NSOpenGLPixelFormatAttribute)nil;

++							windowattribs[14]=(NSOpenGLPixelFormatAttribute)0;

+ 						}

+ 

+ 						format = [[NSOpenGLPixelFormat alloc] initWithAttributes:windowattribs];

diff --git a/nixpkgs/pkgs/development/libraries/irrlichtmt/default.nix b/nixpkgs/pkgs/development/libraries/irrlichtmt/default.nix
new file mode 100644
index 000000000000..8787fd390efd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/irrlichtmt/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, zlib
+, libpng
+, libjpeg
+, libGL
+, libX11
+, libXi
+, libXext
+, Cocoa
+, Kernel
+}:
+stdenv.mkDerivation (finalAttrs: {
+  pname = "irrlichtmt";
+  version = "1.9.0mt13";
+
+  src = fetchFromGitHub {
+    owner = "minetest";
+    repo = "irrlicht";
+    rev = finalAttrs.version;
+    hash = "sha256-BlQd7zbpvQnxqLv3IaHWrXzJ1pJFbQQ3DNWDAj14/YY=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = [
+    zlib
+    libpng
+    libjpeg
+    libGL
+    libX11
+    libXi
+    libXext
+  ] ++ lib.optionals stdenv.isDarwin [
+    Cocoa
+    Kernel
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  meta = {
+    homepage = "https://github.com/minetest/irrlicht";
+    license = lib.licenses.zlib;
+    maintainers = with lib.maintainers; [ DeeUnderscore ];
+    description = "Minetest project's fork of Irrlicht, a realtime 3D engine written in C++";
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/isa-l/default.nix b/nixpkgs/pkgs/development/libraries/isa-l/default.nix
new file mode 100644
index 000000000000..d81f1120742a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/isa-l/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, nasm }:
+
+stdenv.mkDerivation rec {
+  pname = "isa-l";
+  version = "2.31.0";
+
+  src = fetchFromGitHub {
+    owner = "intel";
+    repo = "isa-l";
+    rev = "v${version}";
+    sha256 = "sha256-xBBtpjtWyba0DogdLobtuWmiiAHTXMK4oRnjYuTUCNk=";
+  };
+
+  nativeBuildInputs = [ nasm autoreconfHook ];
+
+  preConfigure = ''
+    export AS=nasm
+  '';
+
+  meta = with lib; {
+    description = "A collection of optimised low-level functions targeting storage applications";
+    license = licenses.bsd3;
+    homepage = "https://github.com/intel/isa-l";
+    maintainers = with maintainers; [ jbedo ];
+    platforms = platforms.all;
+    broken = stdenv.isDarwin && stdenv.isAarch64; # does not build on M1 mac (asm/hwcap.h file not found) maybe needs gcc not clang?
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/isl/0.11.1.nix b/nixpkgs/pkgs/development/libraries/isl/0.11.1.nix
new file mode 100644
index 000000000000..a11d9eca6a6e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/isl/0.11.1.nix
@@ -0,0 +1,8 @@
+import ./generic.nix {
+  version = "0.11.1";
+  urls = [
+    "https://src.fedoraproject.org/repo/pkgs/gcc/isl-0.11.1.tar.bz2/bce1586384d8635a76d2f017fb067cd2/isl-0.11.1.tar.bz2"
+  ];
+  sha256 = "13d9cqa5rzhbjq0xf0b2dyxag7pqa72xj9dhsa03m8ccr1a4npq9";
+  patches = [ ./fix-gcc-build.diff ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/isl/0.14.1.nix b/nixpkgs/pkgs/development/libraries/isl/0.14.1.nix
new file mode 100644
index 000000000000..1a368d2523e0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/isl/0.14.1.nix
@@ -0,0 +1,8 @@
+import ./generic.nix rec {
+  version = "0.14.1";
+  urls = [
+    "mirror://sourceforge/libisl/isl-${version}.tar.xz"
+    "https://libisl.sourceforge.io/isl-${version}.tar.xz"
+  ];
+  sha256 = "0xa6xagah5rywkywn19rzvbvhfvkmylhcxr6z9z7bz29cpiwk0l8";
+}
diff --git a/nixpkgs/pkgs/development/libraries/isl/0.17.1.nix b/nixpkgs/pkgs/development/libraries/isl/0.17.1.nix
new file mode 100644
index 000000000000..2e0110df786e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/isl/0.17.1.nix
@@ -0,0 +1,8 @@
+import ./generic.nix rec {
+  version = "0.17.1";
+  urls = [
+    "mirror://sourceforge/libisl/isl-${version}.tar.xz"
+    "https://libisl.sourceforge.io/isl-${version}.tar.xz"
+  ];
+  sha256 = "be152e5c816b477594f4c6194b5666d8129f3a27702756ae9ff60346a8731647";
+}
diff --git a/nixpkgs/pkgs/development/libraries/isl/0.20.0.nix b/nixpkgs/pkgs/development/libraries/isl/0.20.0.nix
new file mode 100644
index 000000000000..d7567bebf298
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/isl/0.20.0.nix
@@ -0,0 +1,11 @@
+import ./generic.nix rec {
+  version = "0.20";
+  urls = [
+    "mirror://sourceforge/libisl/isl-${version}.tar.xz"
+    "https://libisl.sourceforge.io/isl-${version}.tar.xz"
+  ];
+  sha256 = "1akpgq0rbqbah5517blg2zlnfvjxfcl9cjrfc75nbcx5p2gnlnd5";
+  configureFlags = [
+    "--with-gcc-arch=generic" # don't guess -march=/mtune=
+  ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/isl/0.24.0.nix b/nixpkgs/pkgs/development/libraries/isl/0.24.0.nix
new file mode 100644
index 000000000000..90eb5ec0fac2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/isl/0.24.0.nix
@@ -0,0 +1,11 @@
+import ./generic.nix rec {
+  version = "0.24";
+  urls = [
+    "mirror://sourceforge/libisl/isl-${version}.tar.xz"
+    "https://libisl.sourceforge.io/isl-${version}.tar.xz"
+  ];
+  sha256 = "1bgbk6n93qqn7w8v21kxf4x6dc3z0ypqrzvgfd46nhagak60ac84";
+  configureFlags = [
+    "--with-gcc-arch=generic" # don't guess -march=/mtune=
+  ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/isl/fix-gcc-build.diff b/nixpkgs/pkgs/development/libraries/isl/fix-gcc-build.diff
new file mode 100644
index 000000000000..6fbd1f9d478b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/isl/fix-gcc-build.diff
@@ -0,0 +1,12 @@
+diff -ru isl-0.11.1/include/isl/int.h isl-0.11.1.new/include/isl/int.h
+--- isl-0.11.1/include/isl/int.h        2012-11-29 09:47:32.000000000 +0100
++++ isl-0.11.1.new/include/isl/int.h    2013-10-27 15:35:31.348553812 +0100
+@@ -14,7 +14,7 @@
+ #include <string.h>
+ #include <gmp.h>
+ #if defined(__cplusplus)
+-#include <iostream>
++#include <ostream>
+ #endif
+ 
+ #if defined(__cplusplus)
diff --git a/nixpkgs/pkgs/development/libraries/isl/generic.nix b/nixpkgs/pkgs/development/libraries/isl/generic.nix
new file mode 100644
index 000000000000..31bd990645b5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/isl/generic.nix
@@ -0,0 +1,41 @@
+{ version
+, urls
+, sha256
+, configureFlags ? []
+, patches ? []
+}:
+
+{ lib
+, stdenv
+, fetchurl
+, gmp
+, autoreconfHook
+, buildPackages
+}:
+
+stdenv.mkDerivation {
+  pname = "isl";
+  inherit version;
+
+  src = fetchurl {
+    inherit urls sha256;
+  };
+
+  inherit patches;
+
+  strictDeps = true;
+  depsBuildBuild = lib.optionals (lib.versionAtLeast version "0.24") [ buildPackages.stdenv.cc ];
+  nativeBuildInputs = lib.optionals (stdenv.hostPlatform.isRiscV && lib.versionOlder version "0.24") [ autoreconfHook ];
+  buildInputs = [ gmp ];
+
+  inherit configureFlags;
+
+  enableParallelBuilding = true;
+
+  meta = {
+    homepage = "https://libisl.sourceforge.io/";
+    license = lib.licenses.lgpl21;
+    description = "A library for manipulating sets and relations of integer points bounded by linear constraints";
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/iso-codes/default.nix b/nixpkgs/pkgs/development/libraries/iso-codes/default.nix
new file mode 100644
index 000000000000..5539a97f0ce6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/iso-codes/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchurl, gettext, python3 }:
+
+stdenv.mkDerivation rec {
+  pname = "iso-codes";
+  version = "4.16.0";
+
+  src = fetchurl {
+    url = "https://salsa.debian.org/iso-codes-team/iso-codes/-/archive/v${version}/${pname}-v${version}.tar.gz";
+    sha256 = "sha256-fJkPw5oFl1vtsBdeP/Cfw4MEiBX2i0Yqu/BVqAMuZsw=";
+  };
+
+  nativeBuildInputs = [ gettext python3 ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://salsa.debian.org/iso-codes-team/iso-codes";
+    description = "Various ISO codes packaged as XML files";
+    license = licenses.lgpl21;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/itk/5.2.x.nix b/nixpkgs/pkgs/development/libraries/itk/5.2.x.nix
new file mode 100644
index 000000000000..e50f2bbca494
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/itk/5.2.x.nix
@@ -0,0 +1,5 @@
+import ./generic.nix rec {
+  version = "5.2.1";
+  rev = "v${version}";
+  sourceSha256 = "sha256-KaVe9FMGm4ZVMpwAT12fA67T0qZS3ZueiI8z85+xSwE=";
+}
diff --git a/nixpkgs/pkgs/development/libraries/itk/5.x.nix b/nixpkgs/pkgs/development/libraries/itk/5.x.nix
new file mode 100644
index 000000000000..765b464e46a1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/itk/5.x.nix
@@ -0,0 +1,5 @@
+import ./generic.nix rec {
+  version = "5.3.0";
+  rev = "v${version}";
+  sourceSha256 = "sha256-+qCd8Jzpl5fEPTUpLyjjFBkfgCn3+Lf4pi8QnjCwofs=";
+}
diff --git a/nixpkgs/pkgs/development/libraries/itk/generic.nix b/nixpkgs/pkgs/development/libraries/itk/generic.nix
new file mode 100644
index 000000000000..652fce4a6797
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/itk/generic.nix
@@ -0,0 +1,116 @@
+{ version, rev, sourceSha256 }:
+
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake
+, expat, fftw, gdcm, hdf5-cpp, libjpeg, libminc, libtiff, libpng
+, libX11, libuuid, xz, vtk, zlib, Cocoa }:
+
+let
+  itkGenericLabelInterpolatorSrc = fetchFromGitHub {
+    owner = "InsightSoftwareConsortium";
+    repo = "ITKGenericLabelInterpolator";
+    rev = "2f3768110ffe160c00c533a1450a49a16f4452d9";
+    hash = "sha256-Cm3jg14MMnbr/sP+gqR2Rh25xJjoRvpmY/jP/DKH978=";
+  };
+
+  itkAdaptiveDenoisingSrc = fetchFromGitHub {
+    owner = "ntustison";
+    repo = "ITKAdaptiveDenoising";
+    rev = "24825c8d246e941334f47968553f0ae388851f0c";
+    hash = "sha256-deJbza36c0Ohf9oKpO2T4po37pkyI+2wCSeGL4r17Go=";
+  };
+
+  itkSimpleITKFiltersSrc = fetchFromGitHub {
+    owner = "InsightSoftwareConsortium";
+    repo = "ITKSimpleITKFilters";
+    rev = "bb896868fc6480835495d0da4356d5db009592a6";
+    hash = "sha256-MfaIA0xxA/pzUBSwnAevr17iR23Bo5iQO2cSyknS3o4=";
+  };
+in
+
+stdenv.mkDerivation {
+  pname = "itk";
+  inherit version;
+
+  src = fetchFromGitHub {
+    owner = "InsightSoftwareConsortium";
+    repo = "ITK";
+    inherit rev;
+    sha256 = sourceSha256;
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "fix-gcc13-build";
+      url = "https://github.com/InsightSoftwareConsortium/ITK/commit/9a719a0d2f5f489eeb9351b0ef913c3693147a4f.patch";
+      hash = "sha256-dDyqYOzo91afR8W7k2N64X6l7t6Ws1C9iuRkWHUe0fg=";
+    })
+  ];
+
+  postPatch = ''
+    substituteInPlace CMake/ITKSetStandardCompilerFlags.cmake  \
+      --replace "-march=corei7" ""  \
+      --replace "-mtune=native" ""
+    ln -sr ${itkGenericLabelInterpolatorSrc} Modules/External/ITKGenericLabelInterpolator
+    ln -sr ${itkAdaptiveDenoisingSrc} Modules/External/ITKAdaptiveDenoising
+    ln -sr ${itkSimpleITKFiltersSrc} Modules/External/ITKSimpleITKFilters
+  '';
+
+  cmakeFlags = [
+    "-DBUILD_EXAMPLES=OFF"
+    "-DBUILD_SHARED_LIBS=ON"
+    "-DITK_FORBID_DOWNLOADS=ON"
+    "-DITK_USE_SYSTEM_LIBRARIES=ON"  # finds common libraries e.g. hdf5, libpng, libtiff, zlib, but not GDCM, NIFTI, MINC, etc.
+    # note ITK_USE_SYSTEM_EIGEN, part of ITK_USE_SYSTEM_LIBRARIES,
+    # causes "...-itk-5.2.1/include/ITK-5.2/itkSymmetricEigenAnalysis.h:23:31: fatal error: Eigen/Eigenvalues: No such file or directory"
+    # when compiling c3d, but maybe an ITK 5.2/eigen version issue:
+    "-DITK_USE_SYSTEM_EIGEN=OFF"
+    "-DITK_USE_SYSTEM_GOOGLETEST=OFF"  # ANTs build failure due to https://github.com/ANTsX/ANTs/issues/1489
+    "-DITK_USE_SYSTEM_GDCM=ON"
+    "-DITK_USE_SYSTEM_MINC=ON"
+    "-DLIBMINC_DIR=${libminc}/lib/cmake"
+    "-DModule_ITKMINC=ON"
+    "-DModule_ITKIOMINC=ON"
+    "-DModule_ITKIOTransformMINC=ON"
+    "-DModule_SimpleITKFilters=ON"
+    "-DModule_ITKVtkGlue=ON"
+    "-DModule_ITKReview=ON"
+    "-DModule_MGHIO=ON"
+    "-DModule_AdaptiveDenoising=ON"
+    "-DModule_GenericLabelInterpolator=ON"
+  ];
+
+  nativeBuildInputs = [ cmake xz ];
+  buildInputs = [
+    libX11
+    libuuid
+    vtk
+  ] ++ lib.optionals stdenv.isDarwin [ Cocoa ];
+  # Due to ITKVtkGlue=ON and the additional dependencies needed to configure VTK 9
+  # (specifically libGL and libX11 on Linux),
+  # it's now seemingly necessary for packages that configure ITK to
+  # also include configuration deps of VTK, even if VTK is not required or available.
+  # These deps were propagated from VTK 9 in https://github.com/NixOS/nixpkgs/pull/206935,
+  # so we simply propagate them again from ITK.
+  # This admittedly is a hack and seems like an issue with VTK 9's CMake configuration.
+  propagatedBuildInputs = [
+    # The dependencies we've un-vendored from ITK, such as GDCM, must be propagated,
+    # otherwise other software built against ITK fails to configure since ITK headers
+    # refer to these previously vendored libraries:
+    expat
+    fftw
+    gdcm
+    hdf5-cpp
+    libjpeg
+    libminc
+    libpng
+    libtiff
+    zlib
+  ] ++ vtk.propagatedBuildInputs;
+
+  meta = {
+    description = "Insight Segmentation and Registration Toolkit";
+    homepage = "https://www.itk.org";
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [viric];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/itktcl/default.nix b/nixpkgs/pkgs/development/libraries/itktcl/default.nix
new file mode 100644
index 000000000000..b6a4788075f7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/itktcl/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchurl, tcl, tk, incrtcl }:
+
+tcl.mkTclDerivation rec {
+  pname = "itk-tcl";
+  version = "4.1.0";
+
+  src = fetchurl {
+    url    = "mirror://sourceforge/incrtcl/%5BIncr%20Tcl_Tk%5D-source/3.4/itk${version}.tar.gz";
+    sha256 = "1iy964jfgsfnc1agk1w6bbm44x18ily8d4wmr7cc9z9f4acn2r6s";
+  };
+
+  buildInputs = [ tk incrtcl ];
+  enableParallelBuilding = true;
+
+  configureFlags = [
+    "--with-tk=${tk}/lib"
+    "--with-itcl=${incrtcl}/lib"
+    "--with-tkinclude=${tk.dev}/include"
+  ];
+
+  postInstall = ''
+    rmdir $out/bin
+    mv $out/lib/itk${version}/* $out/lib
+    ln -s libitk${version}${stdenv.hostPlatform.extensions.sharedLibrary} \
+      $out/lib/libitk${lib.versions.major version}${stdenv.hostPlatform.extensions.sharedLibrary}
+    rmdir $out/lib/itk${version}
+  '';
+
+  outputs = [ "out" "dev" "man" ];
+
+  meta = with lib; {
+    homepage    = "https://incrtcl.sourceforge.net/";
+    description = "Mega-widget toolkit for incr Tk";
+    license     = licenses.tcltk;
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ thoughtpolice ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/jabcode/default.nix b/nixpkgs/pkgs/development/libraries/jabcode/default.nix
new file mode 100644
index 000000000000..dba1fba20df6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/jabcode/default.nix
@@ -0,0 +1,51 @@
+{ stdenv
+, fetchFromGitHub
+, lib
+, subproject ? "library" # one of "library", "reader" or  "writer"
+, zlib
+, libpng
+, libtiff
+, jabcode
+}:
+let
+  subdir = lib.getAttr subproject {
+    "library" = "jabcode";
+    "reader" = "jabcodeReader";
+    "writer" = "jabcodeWriter";
+  };
+in
+stdenv.mkDerivation rec {
+  pname = "jabcode-${subproject}";
+  version = "unstable-2022-06-17";
+  src = fetchFromGitHub {
+    repo = "jabcode";
+    owner = "jabcode";
+    rev = "ee0e4c88b9f3c1da46d6f679ee8b69c547907c20";
+    hash = "sha256-GjRkDWefQFdT4i9hRcQhYsY4beMUIXxy38I5lsQytyA=";
+  };
+
+  nativeBuildInputs =
+    [ zlib libpng libtiff ]
+    ++ lib.optionals (subproject != "library") [ jabcode ];
+
+  preConfigure = "cd src/${subdir}";
+
+  installPhase =
+    if subproject == "library" then ''
+      mkdir -p $out/lib
+      cp build/* $out/lib
+    '' else ''
+      mkdir -p $out/bin
+      cp -RT bin $out/bin
+    '';
+
+  meta = with lib; {
+    description = "A high-capacity 2D color bar code (${subproject})";
+    longDescription = "JAB Code (Just Another Bar Code) is a high-capacity 2D color bar code, which can encode more data than traditional black/white (QR) codes. This is the ${subproject} part.";
+    homepage = "https://jabcode.org/";
+    license = licenses.lgpl21;
+    maintainers = [ maintainers.xaverdh ];
+    platforms = platforms.unix;
+    broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/jabcode.x86_64-darwin
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/jama/default.nix b/nixpkgs/pkgs/development/libraries/jama/default.nix
new file mode 100644
index 000000000000..30044eb2cc05
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/jama/default.nix
@@ -0,0 +1,30 @@
+{lib, stdenv, fetchurl, unzip, tnt}:
+
+stdenv.mkDerivation rec {
+  pname = "jama";
+  version = "1.2.5";
+
+  src = fetchurl {
+    url = "https://math.nist.gov/tnt/jama125.zip";
+    sha256 = "031ns526fvi2nv7jzzv02i7i5sjcyr0gj884i3an67qhsx8vyckl";
+  };
+
+  nativeBuildInputs = [ unzip ];
+  propagatedBuildInputs = [ tnt ];
+
+  unpackPhase = ''
+      mkdir "${pname}-${version}"
+      unzip "$src"
+  '';
+  installPhase = ''
+      mkdir -p $out/include
+      cp *.h $out/include
+  '';
+
+  meta = with lib; {
+    homepage = "https://math.nist.gov/tnt/";
+    description = "JAMA/C++ Linear Algebra Package: Java-like matrix C++ templates";
+    platforms = platforms.unix;
+    license = licenses.publicDomain;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/jansson/default.nix b/nixpkgs/pkgs/development/libraries/jansson/default.nix
new file mode 100644
index 000000000000..fbc9a676a85c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/jansson/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "jansson";
+  version = "2.14";
+
+  src = fetchFromGitHub {
+    owner = "akheron";
+    repo = "jansson";
+    rev = "v${version}";
+    sha256 = "sha256-FQgy2+g3AyRVJeniqPQj0KNeHgPdza2pmEIXqSyYry4=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [
+    # networkmanager relies on libjansson.so:
+    #   https://github.com/NixOS/nixpkgs/pull/176302#issuecomment-1150239453
+    "-DJANSSON_BUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/akheron/jansson";
+    description = "C library for encoding, decoding and manipulating JSON data";
+    changelog = "https://github.com/akheron/jansson/raw/v${version}/CHANGES";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = [ maintainers.marsam ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/jarowinkler-cpp/default.nix b/nixpkgs/pkgs/development/libraries/jarowinkler-cpp/default.nix
new file mode 100644
index 000000000000..fb19f998423b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/jarowinkler-cpp/default.nix
@@ -0,0 +1,41 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, catch2_3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "jarowinkler-cpp";
+  version = "1.0.2";
+
+  src = fetchFromGitHub {
+    owner = "maxbachmann";
+    repo = "jarowinkler-cpp";
+    rev = "v${version}";
+    hash = "sha256-GuwDSCYTfSwqTnzZSft3ufVSKL7255lVvbJhBxKxjJw=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  cmakeFlags = lib.optionals doCheck [
+    "-DJARO_WINKLER_BUILD_TESTING=ON"
+  ];
+
+  nativeCheckInputs = [
+    catch2_3
+  ];
+
+  doCheck = true;
+
+  meta = {
+    description = "Fast Jaro and Jaro-Winkler distance";
+    homepage = "https://github.com/maxbachmann/jarowinkler-cpp";
+    changelog = "https://github.com/maxbachmann/jarowinkler-cpp/blob/${src.rev}/CHANGELOG.md";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ dotlambda ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/java/commons/bcel/default.nix b/nixpkgs/pkgs/development/libraries/java/commons/bcel/default.nix
new file mode 100644
index 000000000000..49cc12b2b33e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/commons/bcel/default.nix
@@ -0,0 +1,26 @@
+{lib, stdenv, fetchurl}:
+
+stdenv.mkDerivation rec {
+  version = "6.8.0";
+  pname = "commons-bcel";
+
+  src = fetchurl {
+    url    = "mirror://apache/commons/bcel/binaries/bcel-${version}-bin.tar.gz";
+    hash   = "sha256-DdH+LcVY7C9sFqMY1UkMHRcAbtAsyINdTEmaj5Dr0OI=";
+  };
+
+  installPhase = ''
+    tar xf ${src}
+    mkdir -p $out/share/java
+    cp bcel-${version}.jar $out/share/java/
+  '';
+
+  meta = {
+    homepage    = "https://commons.apache.org/proper/commons-bcel/";
+    description = "Gives users a convenient way to analyze, create, and manipulate (binary) Java class files";
+    sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
+    maintainers = with lib.maintainers; [ copumpkin ];
+    license     = lib.licenses.asl20;
+    platforms = with lib.platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/java/commons/bsf/default.nix b/nixpkgs/pkgs/development/libraries/java/commons/bsf/default.nix
new file mode 100644
index 000000000000..f55029335e58
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/commons/bsf/default.nix
@@ -0,0 +1,25 @@
+{lib, stdenv, fetchurl}:
+
+stdenv.mkDerivation rec {
+  pname = "commons-bsf";
+  version = "2.4.0";
+
+  src = fetchurl {
+    url = "mirror://apache/commons/bsf/binaries/bsf-bin-${version}.tar.gz";
+    sha256 = "1my3hv4y8cvrd1kr315wvbjqsamzlzswnbqcmsa2m4hqcafddfr8";
+  };
+
+  installPhase = ''
+    mkdir -p $out/share/java
+    cp lib/bsf.jar $out/share/java/
+  '';
+
+  meta = {
+    description = "Interface to scripting languages, including JSR-223";
+    homepage = "https://commons.apache.org/proper/commons-bsf/";
+    sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
+    license = lib.licenses.asl20;
+    platforms = lib.platforms.unix;
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/java/commons/compress/default.nix b/nixpkgs/pkgs/development/libraries/java/commons/compress/default.nix
new file mode 100644
index 000000000000..53265baaf8fe
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/commons/compress/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  version = "1.25.0";
+  pname = "commons-compress";
+
+  src = fetchurl {
+    url    = "mirror://apache/commons/compress/binaries/${pname}-${version}-bin.tar.gz";
+    sha256 = "sha256-isxV/gTOjVQW3716cr8ZrlLnOn8YWWr6p1SHYlwhdvA=";
+  };
+
+  installPhase = ''
+    tar xf ${src}
+    mkdir -p $out/share/java
+    cp *.jar $out/share/java/
+  '';
+
+  meta = {
+    homepage    = "https://commons.apache.org/proper/commons-compress";
+    description = "Allows manipulation of ar, cpio, Unix dump, tar, zip, gzip, XZ, Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE and Z files";
+    maintainers = with lib.maintainers; [ copumpkin ];
+    sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
+    license     = lib.licenses.asl20;
+    platforms = with lib.platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/java/commons/daemon/default.nix b/nixpkgs/pkgs/development/libraries/java/commons/daemon/default.nix
new file mode 100644
index 000000000000..be61630d17f4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/commons/daemon/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  version = "1.3.4";
+  pname = "commons-daemon";
+
+  src = fetchurl {
+    url    = "mirror://apache/commons/daemon/binaries/commons-daemon-${version}-bin.tar.gz";
+    sha256 = "sha256-n9zmdPC4nLs/Rnth9uojkc5Kg5IfgERbr08TOvENR0Q=";
+  };
+
+  installPhase = ''
+    tar xf ${src}
+    mkdir -p $out/share/java
+    cp *.jar $out/share/java/
+  '';
+
+  meta = {
+    homepage    = "https://commons.apache.org/proper/commons-daemon";
+    description = "Apache Commons Daemon software is a set of utilities and Java support classes for running Java applications as server processes.";
+    maintainers = with lib.maintainers; [ rsynnest ];
+    sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
+    license     = lib.licenses.asl20;
+    platforms = with lib.platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/java/commons/fileupload/default.nix b/nixpkgs/pkgs/development/libraries/java/commons/fileupload/default.nix
new file mode 100644
index 000000000000..40c66909213e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/commons/fileupload/default.nix
@@ -0,0 +1,25 @@
+{lib, stdenv, fetchurl}:
+
+stdenv.mkDerivation rec {
+  version = "1.4";
+  pname = "commons-fileupload";
+
+  src = fetchurl {
+    url    = "mirror://apache/commons/fileupload/binaries/${pname}-${version}-bin.tar.gz";
+    sha256 = "1avfv4gljp7flra767yzas54vfb6az9s1nhxfjv48jj2x0llxxkx";
+  };
+  installPhase = ''
+    tar xf ${src}
+    mkdir -p $out/share/java
+    cp commons-fileupload-*-bin/*.jar $out/share/java/
+  '';
+
+  meta = {
+    homepage    = "https://commons.apache.org/proper/commons-fileupload";
+    description = "Makes it easy to add robust, high-performance, file upload capability to your servlets and web applications";
+    maintainers = with lib.maintainers; [ copumpkin ];
+    sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
+    license     = lib.licenses.asl20;
+    platforms = with lib.platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/java/commons/io/default.nix b/nixpkgs/pkgs/development/libraries/java/commons/io/default.nix
new file mode 100644
index 000000000000..7c1c9f361145
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/commons/io/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  version = "2.11.0";
+  pname = "commons-io";
+
+  src = fetchurl {
+    url    = "mirror://apache/commons/io/binaries/${pname}-${version}-bin.tar.gz";
+    sha256 = "sha256-9RXVNzjEhdYCYWbB9/xW3rm+gSOuD6+jwAO9zJVt4fk=";
+  };
+
+  installPhase = ''
+    tar xf ${src}
+    mkdir -p $out/share/java
+    cp *.jar $out/share/java/
+  '';
+
+  meta = {
+    homepage    = "https://commons.apache.org/proper/commons-io";
+    description = "A library of utilities to assist with developing IO functionality";
+    maintainers = with lib.maintainers; [ copumpkin ];
+    sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
+    license     = lib.licenses.asl20;
+    platforms = with lib.platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/java/commons/lang/default.nix b/nixpkgs/pkgs/development/libraries/java/commons/lang/default.nix
new file mode 100644
index 000000000000..7271bea4bfcc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/commons/lang/default.nix
@@ -0,0 +1,31 @@
+{ lib
+, stdenv
+, fetchurl
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  version = "3.14.0";
+  pname = "commons-lang";
+
+  src = fetchurl {
+    url = "mirror://apache/commons/lang/binaries/commons-lang3-${finalAttrs.version}-bin.tar.gz";
+    hash = "sha256-MXw+P81fzKN4GnmW/x4MUMEyRO6WHpTl9vbYS4RzOxY=";
+  };
+
+  installPhase = ''
+    runHook preInstall
+    tar xf ${finalAttrs.src}
+    mkdir -p $out/share/java
+    cp *.jar $out/share/java/
+    runHook postInstall
+  '';
+
+  meta = {
+    description = "Provides additional methods to manipulate standard Java library classes";
+    homepage = "https://commons.apache.org/proper/commons-lang";
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ copumpkin ];
+    platforms = with lib.platforms; unix;
+    sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/java/commons/logging/default.nix b/nixpkgs/pkgs/development/libraries/java/commons/logging/default.nix
new file mode 100644
index 000000000000..71832498c34a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/commons/logging/default.nix
@@ -0,0 +1,25 @@
+{lib, stdenv, fetchurl}:
+
+stdenv.mkDerivation rec {
+  pname = "commons-logging";
+  version = "1.2";
+
+  src = fetchurl {
+    url    = "mirror://apache/commons/logging/binaries/commons-logging-${version}-bin.tar.gz";
+    sha256 = "1gc70pmcv0x6ibl89jglmr22f8zpr63iaifi49nrq399qw2qhx9z";
+  };
+
+  installPhase = ''
+    mkdir -p $out/share/java
+    cp commons-logging-*.jar $out/share/java/
+  '';
+
+  meta = {
+    description = "Wrapper around a variety of logging API implementations";
+    homepage = "https://commons.apache.org/proper/commons-logging";
+    sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
+    license = lib.licenses.asl20;
+    platforms = lib.platforms.unix;
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/java/commons/math/default.nix b/nixpkgs/pkgs/development/libraries/java/commons/math/default.nix
new file mode 100644
index 000000000000..4f928db4cf3b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/commons/math/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  version = "3.6.1";
+  pname = "commons-math";
+
+  src = fetchurl {
+    url    = "mirror://apache/commons/math/binaries/commons-math3-${version}-bin.tar.gz";
+    sha256 = "0x4nx5pngv2n4ga11c1s4w2mf6cwydwkgs7da6wwvcjraw57bhkz";
+  };
+
+  installPhase = ''
+    tar xf ${src}
+    mkdir -p $out/share/java
+    cp *.jar $out/share/java/
+  '';
+
+  meta = {
+    homepage    = "https://commons.apache.org/proper/commons-math/";
+    description = "A library of lightweight, self-contained mathematics and statistics components";
+    maintainers = with lib.maintainers; [ copumpkin ];
+    sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
+    license     = lib.licenses.asl20;
+    platforms = with lib.platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/java/cup/default.nix b/nixpkgs/pkgs/development/libraries/java/cup/default.nix
new file mode 100644
index 000000000000..2f673a8e5a67
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/cup/default.nix
@@ -0,0 +1,56 @@
+{ lib
+, stdenv
+, fetchurl
+, ant
+, jdk
+, makeWrapper
+, canonicalize-jars-hook
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "java-cup";
+  version = "11b-20160615";
+
+  src = fetchurl {
+    url = "http://www2.cs.tum.edu/projects/cup/releases/java-cup-src-${finalAttrs.version}.tar.gz";
+    hash = "sha256-4OdzYG5FzhqorROD5jk9U+2dzyhh5D76gZT1Z+kdv/o=";
+  };
+
+  sourceRoot = ".";
+
+  patches = [ ./javacup-0.11b_beta20160615-build-xml-git.patch ];
+
+  nativeBuildInputs = [
+    ant
+    jdk
+    makeWrapper
+    canonicalize-jars-hook
+  ];
+
+  buildPhase = ''
+    runHook preBuild
+    ant
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dm644 dist/java-cup-11b.jar -t $out/share/java-cup
+    install -Dm644 dist/java-cup-11b-runtime.jar -t $out/share/java
+
+    makeWrapper ${jdk.jre}/bin/java $out/bin/javacup \
+        --add-flags "-jar $out/share/java-cup/java-cup-11b.jar"
+
+    runHook postInstall
+  '';
+
+  meta = {
+    description = "LALR parser generator for Java";
+    homepage = "http://www2.cs.tum.edu/projects/cup/";
+    license = lib.licenses.mit;
+    mainProgram = "javacup";
+    maintainers = [ lib.maintainers.romildo ];
+    platforms = lib.platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/java/cup/javacup-0.11b_beta20160615-build-xml-git.patch b/nixpkgs/pkgs/development/libraries/java/cup/javacup-0.11b_beta20160615-build-xml-git.patch
new file mode 100644
index 000000000000..f2054ee9d4d3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/cup/javacup-0.11b_beta20160615-build-xml-git.patch
@@ -0,0 +1,38 @@
+--- javacup/build.xml.orig	2016-06-15 07:10:15.000000000 -0300
++++ javacup/build.xml	2016-07-17 08:46:46.632722844 -0300
+@@ -21,26 +21,6 @@
+     <mkdir dir="${dist}" />
+     <loadfile property="cupversion" srcFile="version.txt" failonerror="false" />
+     <property name="cupversion" value="custombuild" unless:set="cupversion"/>
+-    <exec executable="git" outputproperty="gitversion">
+-      <arg value="log"/>
+-      <arg value="-1"/>
+-      <arg value="--format=%h"/>
+-    </exec>
+-    <exec executable="git" outputproperty="changed">
+-      <arg value="status"/>
+-      <arg value="--porcelain"/>
+-      <redirector>
+-	<outputfilterchain>
+-	<linecontainsregexp>
+-	  <regexp pattern='^M.*'/>
+-	</linecontainsregexp>
+-	<tokenfilter>
+-	  <replaceregex pattern=".*" replace="modifications based on "/>
+-	</tokenfilter>
+-	</outputfilterchain>
+-	</redirector>
+-    </exec>
+-    <property name="svnversion">${changed}${gitversion}</property>
+   </target>
+ 
+   <property environment="env" />
+@@ -79,7 +59,7 @@
+     <copy todir="${java}"><fileset dir="${src}"></fileset></copy>
+     <replace file="${java}/java_cup/version.java"
+        token="+ version_str"
+-       value='+ "v0.11b ${cupversion} (GIT ${svnversion})"'>
++       value='+ "v0.11b ${cupversion}"'>
+     </replace>
+     <javac srcdir="${java}" destdir="${classes}" verbose="off" listfiles="off" debug="on" source="1.8" target="1.8">
+       <classpath refid="libraries"/>
diff --git a/nixpkgs/pkgs/development/libraries/java/dbus-java/default.nix b/nixpkgs/pkgs/development/libraries/java/dbus-java/default.nix
new file mode 100644
index 000000000000..c8e67edfe2b5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/dbus-java/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl, gettext, jdk8, libmatthew_java }:
+
+stdenv.mkDerivation rec {
+  pname = "dbus-java";
+  version = "2.7";
+
+  src = fetchurl {
+    url = "https://dbus.freedesktop.org/releases/dbus-java/dbus-java-${version}.tar.gz";
+    sha256 = "0cyaxd8x6sxmi6pklkkx45j311a6w51fxl4jc5j3inc4cailwh5y";
+  };
+  JAVA_HOME=jdk8;
+  JAVA="${jdk8}/bin/java";
+  PREFIX="\${out}";
+  JAVAUNIXLIBDIR="${libmatthew_java}/lib/jni";
+  JAVAUNIXJARDIR="${libmatthew_java}/share/java";
+  buildInputs = [ gettext jdk8 ];
+  # I'm too lazy to build the documentation
+  preBuild = ''
+    sed -i -e "s|all: bin doc man|all: bin|" \
+           -e "s|install: install-bin install-man install-doc|install: install-bin|" Makefile
+  '';
+
+  meta = with lib; {
+    platforms = platforms.linux;
+    maintainers = [ maintainers.sander ];
+    license = licenses.afl21;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/java/geoipjava/default.nix b/nixpkgs/pkgs/development/libraries/java/geoipjava/default.nix
new file mode 100644
index 000000000000..cbb6b35a65c9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/geoipjava/default.nix
@@ -0,0 +1,30 @@
+{lib, stdenv, fetchurl, jdk, unzip}:
+
+stdenv.mkDerivation rec {
+  pname = "GeoIPJava";
+  version = "1.2.5";
+
+  src = fetchurl {
+    url = "https://geolite.maxmind.com/download/geoip/api/java/GeoIPJava-${version}.zip";
+    sha256 = "1gb2d0qvvq7xankz7l7ymbr3qprwk9bifpy4hlgw0sq4i6a55ypd";
+  };
+  nativeBuildInputs = [ unzip ];
+  buildInputs = [ jdk ];
+  buildPhase =
+    ''
+      cd source
+      javac $(find . -name \*.java)
+      jar cfv maxmindgeoip.jar $(find . -name \*.class)
+    '';
+  installPhase =
+    ''
+      mkdir -p $out/share/java
+      cp maxmindgeoip.jar $out/share/java
+    '';
+  meta = {
+    description = "GeoIP Java API";
+    license = lib.licenses.lgpl21Plus;
+    maintainers = [ lib.maintainers.sander ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/java/hsqldb/default.nix b/nixpkgs/pkgs/development/libraries/java/hsqldb/default.nix
new file mode 100644
index 000000000000..a2484ce83077
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/hsqldb/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchurl, unzip, makeWrapper, jre }:
+
+stdenv.mkDerivation rec {
+  pname = "hsqldb";
+  version = "2.7.2";
+  underscoreMajMin = lib.replaceStrings ["."] ["_"] (lib.versions.majorMinor version);
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/hsqldb/hsqldb/hsqldb_${underscoreMajMin}/hsqldb-${version}.zip";
+    sha256 = "sha256-/7NZy+ZroxeTF7av22LNJ0dlMzvTAWfOMypLLYWXWBI=";
+  };
+
+  nativeBuildInputs = [ unzip makeWrapper ];
+  buildInputs = [ jre ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/lib $out/bin
+    cp -R hsqldb/lib/*.jar $out/lib
+
+    makeWrapper ${jre}/bin/java $out/bin/hsqldb --add-flags "-classpath $out/lib/hsqldb.jar org.hsqldb.server.Server"
+    makeWrapper ${jre}/bin/java $out/bin/runServer --add-flags "-classpath $out/lib/hsqldb.jar org.hsqldb.server.Server"
+    makeWrapper ${jre}/bin/java $out/bin/runManagerSwing --add-flags "-classpath $out/lib/hsqldb.jar org.hsqldb.util.DatabaseManagerSwing"
+    makeWrapper ${jre}/bin/java $out/bin/runWebServer --add-flags "-classpath $out/lib/hsqldb.jar org.hsqldb.server.WebServer"
+    makeWrapper ${jre}/bin/java $out/bin/runManager --add-flags "-classpath $out/lib/hsqldb.jar org.hsqldb.util.DatabaseManager"
+    makeWrapper ${jre}/bin/java $out/bin/sqltool --add-flags "-jar $out/lib/sqltool.jar"
+
+   runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "http://hsqldb.org";
+    description = "A relational, embedable database management system written in Java and a set of related tools";
+    sourceProvenance = with sourceTypes; [ binaryBytecode ];
+    platforms = platforms.unix;
+    license = licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/java/httpunit/default.nix b/nixpkgs/pkgs/development/libraries/java/httpunit/default.nix
new file mode 100644
index 000000000000..07afdabd89b2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/httpunit/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "httpunit";
+  version = "1.7";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/httpunit/httpunit-${version}.zip";
+    sha256 = "09gnayqgizd8cjqayvdpkxrc69ipyxawc96aznfrgdhdiwv8l5zf";
+  };
+
+  buildCommand = ''
+    cp ./* $out
+  '';
+
+  meta = with lib; {
+    homepage = "https://httpunit.sourceforge.net";
+    platforms = platforms.unix;
+    license = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/java/hydra-ant-logger/default.nix b/nixpkgs/pkgs/development/libraries/java/hydra-ant-logger/default.nix
new file mode 100644
index 000000000000..96b6cd05ed1a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/hydra-ant-logger/default.nix
@@ -0,0 +1,43 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, ant
+, jdk
+, canonicalize-jars-hook
+}:
+
+stdenv.mkDerivation {
+  pname = "hydra-ant-logger";
+  version = "2010.2";
+
+  src = fetchFromGitHub {
+    owner = "NixOS";
+    repo = "hydra-ant-logger";
+    rev = "dae3224f4ed42418d3492bdf5bee4f825819006f";
+    hash = "sha256-5oQ/jZfz7izTcYR+N801HYh4lH2MF54PCMnmA4CpRwc=";
+  };
+
+  nativeBuildInputs = [
+    ant
+    jdk
+    canonicalize-jars-hook
+  ];
+
+  buildPhase = ''
+    runHook preBuild
+    mkdir lib
+    ant
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preBuild
+    install -Dm644 *.jar -t $out/share/java
+    runHook postBuild
+  '';
+
+  meta = {
+    homepage = "https://github.com/NixOS/hydra-ant-logger";
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/java/jdom/default.nix b/nixpkgs/pkgs/development/libraries/java/jdom/default.nix
new file mode 100644
index 000000000000..f05b45cf0489
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/jdom/default.nix
@@ -0,0 +1,31 @@
+{ lib
+, stdenv
+, fetchzip
+}:
+
+stdenv.mkDerivation rec {
+  pname = "jdom";
+  version = "2.0.6.1";
+
+  src = fetchzip {
+    url = "http://www.jdom.org/dist/binary/jdom-${version}.zip";
+    stripRoot = false;
+    hash = "sha256-Y++mlO+7N5EU2NhRzLl5x5WXNqu/2tDO/NpNhfRegcg=";
+  };
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/share/java
+    cp -a . $out/share/java
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Java-based solution for accessing, manipulating, and outputting XML data from Java code";
+    homepage = "http://www.jdom.org";
+    platforms = platforms.unix;
+    license = licenses.bsdOriginal;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/java/jffi/default.nix b/nixpkgs/pkgs/development/libraries/java/jffi/default.nix
new file mode 100644
index 000000000000..b4351f4e9df9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/jffi/default.nix
@@ -0,0 +1,48 @@
+{ lib, stdenv, fetchFromGitHub, jdk, jre, ant, libffi, texinfo, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "jffi";
+  version = "1.3.12";
+
+  src = fetchFromGitHub {
+    owner = "jnr";
+    repo = "jffi";
+    rev = "jffi-${version}";
+    sha256 = "sha256-U0pBoKewZEen7aH3rIvZ8dKKeXKE1+Z5WtfM0HK6/LQ=";
+  };
+
+  nativeBuildInputs = [ jdk ant texinfo pkg-config ];
+  buildInputs = [ libffi ] ;
+
+  buildPhase = ''
+    # The pkg-config script in the build.xml doesn't work propery
+    # set the lib path manually to work around this.
+    export LIBFFI_LIBS="${libffi}/lib/libffi.so"
+
+    ant -Duse.system.libffi=1 jar
+    ant -Duse.system.libffi=1 archive-platform-jar
+  '';
+
+  installPhase = ''
+    mkdir -p $out/share/java
+    cp -r dist/* $out/share/java
+  '';
+
+  doCheck = true;
+  checkPhase = ''
+    # The pkg-config script in the build.xml doesn't work propery
+    # set the lib path manually to work around this.
+    export LIBFFI_LIBS="${libffi}/lib/libffi.so"
+
+    ant -Duse.system.libffi=1 test
+  '';
+
+  meta = with lib; {
+    broken = stdenv.isDarwin;
+    description = "Java Foreign Function Interface ";
+    homepage = "https://github.com/jnr/jffi";
+    platforms = platforms.unix;
+    license = licenses.asl20;
+    maintainers = with maintainers; [ bachp ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/java/jflex/default.nix b/nixpkgs/pkgs/development/libraries/java/jflex/default.nix
new file mode 100644
index 000000000000..90e4d4329d5e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/jflex/default.nix
@@ -0,0 +1,38 @@
+{lib, stdenv, fetchurl, jre} :
+
+stdenv.mkDerivation rec {
+  pname = "jflex";
+  version = "1.9.1";
+
+  src = fetchurl {
+    url = "http://jflex.de/release/jflex-${version}.tar.gz";
+    sha256 = "sha256-4MHp7vkf9t8E1z+l6v8T86ArZ5/uFHTlzK4AciTfbfY=";
+  };
+
+  sourceRoot = "${pname}-${version}";
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out
+    cp -a * $out
+    rm -f $out/bin/jflex.bat
+
+    patchShebangs $out
+    sed -i -e '/^JAVA=java/ s#java#${jre}/bin/java#' $out/bin/jflex
+    runHook postInstall
+  '';
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    runHook preInstallCheck
+    $out/bin/jflex --version
+    runHook postInstallCheck
+  '';
+
+  meta = {
+    homepage = "https://www.jflex.de/";
+    description = "Lexical analyzer generator for Java, written in Java";
+    license = lib.licenses.bsd3;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/java/libmatthew-java/default.nix b/nixpkgs/pkgs/development/libraries/java/libmatthew-java/default.nix
new file mode 100644
index 000000000000..6f736403e056
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/libmatthew-java/default.nix
@@ -0,0 +1,20 @@
+{lib, stdenv, fetchurl, jdk}:
+
+stdenv.mkDerivation rec {
+  pname = "libmatthew-java";
+  version = "0.8";
+
+  src = fetchurl {
+    url = "https://src.fedoraproject.org/repo/pkgs/libmatthew-java/libmatthew-java-${version}.tar.gz/8455b8751083ce25c99c2840609271f5/libmatthew-java-${version}.tar.gz";
+    sha256 = "1yldkhsdzm0a41a0i881bin2jklhp85y3ah245jd6fz3npcx7l85";
+  };
+  JAVA_HOME=jdk;
+  PREFIX="\${out}";
+  buildInputs = [ jdk ];
+
+  meta = with lib; {
+    platforms = platforms.linux;
+    maintainers = [ maintainers.sander ];
+    license = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/java/lombok/default.nix b/nixpkgs/pkgs/development/libraries/java/lombok/default.nix
new file mode 100644
index 000000000000..017f0581dc93
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/lombok/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchurl, makeWrapper, jdk }:
+
+stdenv.mkDerivation rec {
+  pname = "lombok";
+  version = "1.18.30";
+
+  src = fetchurl {
+    url = "https://projectlombok.org/downloads/lombok-${version}.jar";
+    sha256 = "sha256-1+4SLu4erutFGCqJ/zb8LdCGhY0bL1S2Fcb+97odYBI=";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  outputs = [ "out" "bin" ];
+
+  buildCommand = ''
+    mkdir -p $out/share/java
+    cp $src $out/share/java/lombok.jar
+
+    makeWrapper ${jdk}/bin/java $bin/bin/lombok \
+      --add-flags "-cp ${jdk}/lib/openjdk/lib/tools.jar:$out/share/java/lombok.jar" \
+      --add-flags lombok.launch.Main
+  '';
+
+  meta = {
+    description = "A library that can write a lot of boilerplate for your Java project";
+    platforms = lib.platforms.all;
+    sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
+    license = lib.licenses.mit;
+    homepage = "https://projectlombok.org/";
+    maintainers = [ lib.maintainers.CrystalGamma ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/java/lucene/default.nix b/nixpkgs/pkgs/development/libraries/java/lucene/default.nix
new file mode 100644
index 000000000000..9791c0ee4556
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/lucene/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "lucene";
+  version = "1.4.3";
+
+  src = fetchurl {
+    url = "https://archive.apache.org/dist/jakarta/lucene/lucene-${version}.tar.gz";
+    sha256 = "1mxaxg65f7v8n60irjwm24v7hcisbl0srmpvcy1l4scs6rjj1awh";
+  };
+
+  buildCommand = ''
+    cp -r . $out/
+  '';
+
+  meta = with lib; {
+    description = "Java full-text search engine";
+    platforms = platforms.unix;
+    license = licenses.asl20;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/java/mockobjects/default.nix b/nixpkgs/pkgs/development/libraries/java/mockobjects/default.nix
new file mode 100644
index 000000000000..113c377240b4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/mockobjects/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "mockobjects";
+  version = "0.09";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/mockobjects/mockobjects-bin-${version}.tar";
+    sha256 = "18rnyqfcyh0s3dwkkaszdd50ssyjx5fa1y3ii309ldqg693lfgnz";
+  };
+
+  # Work around the "unpacker appears to have produced no directories"
+  sourceRoot = ".";
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/share/java
+    cp mockobjects-*.jar $out/share/java
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Generic unit testing framework and methodology for testing any kind of code";
+    sourceProvenance = with sourceTypes; [ binaryBytecode ];
+    platforms = platforms.unix;
+    license = licenses.asl20;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/java/rhino/default.nix b/nixpkgs/pkgs/development/libraries/java/rhino/default.nix
new file mode 100644
index 000000000000..e67425208657
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/rhino/default.nix
@@ -0,0 +1,58 @@
+{ fetchurl, lib, stdenv, unzip, ant, javac, jvm }:
+
+let
+  xbeans  = fetchurl {
+    url = "http://archive.apache.org/dist/xmlbeans/binaries/xmlbeans-2.2.0.zip";
+    sha256 = "1pb08d9j81d0wz5wj31idz198iwhqb7mch872n08jh1354rjlqwk";
+  };
+in
+stdenv.mkDerivation rec {
+  pname = "rhino";
+  version = "1.7R2";
+
+  src = fetchurl {
+    url = "mirror://mozilla/js/rhino1_7R2.zip";
+    sha256 = "1p32hkghi6bkc3cf2dcqyaw5cjj7403mykcp0fy8f5bsnv0pszv7";
+  };
+
+  patches = [ ./gcj-type-mismatch.patch ];
+
+  hardeningDisable = [ "fortify" "format" ];
+
+  preConfigure =
+    ''
+      find -name \*.jar -or -name \*.class -exec rm -v {} \;
+
+      # The build process tries to download it by itself.
+      mkdir -p "build/tmp-xbean"
+      ln -sv "${xbeans}" "build/tmp-xbean/xbean.zip"
+    '';
+
+  nativeBuildInputs = [ unzip ];
+  buildInputs = [ ant javac jvm ];
+
+  buildPhase = "ant jar";
+  doCheck    = false;
+
+  # FIXME: Install javadoc as well.
+  installPhase =
+    ''
+      mkdir -p "$out/share/java"
+      cp -v *.jar "$out/share/java"
+    '';
+
+  meta = with lib; {
+    description = "An implementation of JavaScript written in Java";
+
+    longDescription =
+      '' Rhino is an open-source implementation of JavaScript written
+         entirely in Java.  It is typically embedded into Java applications
+         to provide scripting to end users.
+      '';
+
+    homepage = "http://www.mozilla.org/rhino/";
+
+    license = with licenses; [ mpl11 /* or */ gpl2Plus ];
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/java/rhino/gcj-type-mismatch.patch b/nixpkgs/pkgs/development/libraries/java/rhino/gcj-type-mismatch.patch
new file mode 100644
index 000000000000..dac7b209069a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/rhino/gcj-type-mismatch.patch
@@ -0,0 +1,103 @@
+Work around GCJ bug #35410:
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35410 .
+
+diff --git a/src/org/mozilla/javascript/Arguments.java b/src/org/mozilla/javascript/Arguments.java
+index d914294..d658f12 100644
+--- a/src/org/mozilla/javascript/Arguments.java
++++ b/src/org/mozilla/javascript/Arguments.java
+@@ -144,7 +144,7 @@ final class Arguments extends IdScriptableObject
+                 synchronized (this) {
+                     if (args[index] != NOT_FOUND) {
+                         if (args == activation.originalArgs) {
+-                            args = args.clone();
++                            args = (Object[]) args.clone();
+                         }
+                         args[index] = value;
+                         return;
+@@ -162,7 +162,7 @@ final class Arguments extends IdScriptableObject
+             synchronized (this) {
+                 if (args[index] != NOT_FOUND) {
+                     if (args == activation.originalArgs) {
+-                        args = args.clone();
++                        args = (Object[]) args.clone();
+                     }
+                     args[index] = NOT_FOUND;
+                     return;
+diff --git a/src/org/mozilla/javascript/FunctionObject.java b/src/org/mozilla/javascript/FunctionObject.java
+index 1d6c752..3adc100 100644
+--- a/src/org/mozilla/javascript/FunctionObject.java
++++ b/src/org/mozilla/javascript/FunctionObject.java
+@@ -455,7 +455,7 @@ public class FunctionObject extends BaseFunction
+                     Object converted = convertArg(cx, scope, arg, typeTags[i]);
+                     if (arg != converted) {
+                         if (invokeArgs == args) {
+-                            invokeArgs = args.clone();
++                            invokeArgs = (Object[]) args.clone();
+                         }
+                         invokeArgs[i] = converted;
+                     }
+diff --git a/src/org/mozilla/javascript/Interpreter.java b/src/org/mozilla/javascript/Interpreter.java
+index f7f544d..e125e2f 100644
+--- a/src/org/mozilla/javascript/Interpreter.java
++++ b/src/org/mozilla/javascript/Interpreter.java
+@@ -285,9 +285,9 @@ public class Interpreter implements Evaluator
+             // clone stack but keep varSource to point to values
+             // from this frame to share variables.
+ 
+-            copy.stack = stack.clone();
+-            copy.stackAttributes = stackAttributes.clone();
+-            copy.sDbl = sDbl.clone();
++            copy.stack = (Object[]) stack.clone();
++            copy.stackAttributes = (int[]) stackAttributes.clone();
++            copy.sDbl = (double[]) sDbl.clone();
+ 
+             copy.frozen = false;
+             return copy;
+diff --git a/src/org/mozilla/javascript/NativeJavaClass.java b/src/org/mozilla/javascript/NativeJavaClass.java
+index f72f9e7..25c6757 100644
+--- a/src/org/mozilla/javascript/NativeJavaClass.java
++++ b/src/org/mozilla/javascript/NativeJavaClass.java
+@@ -271,7 +271,7 @@ public class NativeJavaClass extends NativeJavaObject implements Function
+                 Object x = Context.jsToJava(arg, argTypes[i]);
+                 if (x != arg) {
+                     if (args == origArgs) {
+-                        args = origArgs.clone();
++                        args = (Object[]) origArgs.clone();
+                     }
+                     args[i] = x;
+                 }
+diff --git a/src/org/mozilla/javascript/NativeJavaMethod.java b/src/org/mozilla/javascript/NativeJavaMethod.java
+index b6eaf8b..dc699a0 100644
+--- a/src/org/mozilla/javascript/NativeJavaMethod.java
++++ b/src/org/mozilla/javascript/NativeJavaMethod.java
+@@ -213,7 +213,7 @@ public class NativeJavaMethod extends BaseFunction
+                 Object coerced = Context.jsToJava(arg, argTypes[i]);
+                 if (coerced != arg) {
+                     if (origArgs == args) {
+-                        args = args.clone();
++                        args = (Object[]) args.clone();
+                     }
+                     args[i] = coerced;
+                 }
+diff --git a/src/org/mozilla/javascript/regexp/NativeRegExp.java b/src/org/mozilla/javascript/regexp/NativeRegExp.java
+index 0bae489..f7124bf 100644
+--- a/src/org/mozilla/javascript/regexp/NativeRegExp.java
++++ b/src/org/mozilla/javascript/regexp/NativeRegExp.java
+@@ -2168,7 +2168,7 @@ System.out.println("Testing at " + gData.cp + ", op = " + op);
+                     // XXX: If backTrackData will no longer be used, then
+                     // there is no need to clone backTrackData.parens
+                     if (backTrackData.parens != null) {
+-                        gData.parens = backTrackData.parens.clone();
++                        gData.parens = (long[]) backTrackData.parens.clone();
+                     }
+ 
+                     gData.cp = backTrackData.cp;
+@@ -2708,7 +2708,7 @@ class REBackTrackData {
+         continuation_pc = pc;
+         lastParen = gData.lastParen;
+         if (gData.parens != null) {
+-            parens = gData.parens.clone();
++            parens = (long[]) gData.parens.clone();
+         }
+         cp = gData.cp;
+         stateStackTop = gData.stateStackTop;
diff --git a/nixpkgs/pkgs/development/libraries/java/saxon/default.nix b/nixpkgs/pkgs/development/libraries/java/saxon/default.nix
new file mode 100644
index 000000000000..17dfd7385e12
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/saxon/default.nix
@@ -0,0 +1,98 @@
+{ lib, stdenv, fetchurl, unzip, jre, jre8 }:
+
+let
+  common = { pname, version, src, description, java ? jre
+           , prog ? null, jar ? null, license ? lib.licenses.mpl20 }:
+    stdenv.mkDerivation {
+      name = "${pname}-${version}";
+      inherit pname version src;
+
+      nativeBuildInputs = [ unzip ];
+
+      buildCommand = let
+        prog' = if prog == null then pname else prog;
+        jar' = if jar == null then pname else jar;
+      in ''
+        unzip $src -d $out
+        mkdir -p $out/bin $out/share $out/share/java
+        cp -s "$out"/*.jar "$out/share/java/"  # */
+        rm -rf $out/notices
+        mv $out/doc $out/share
+        cat > $out/bin/${prog'} <<EOF
+        #! $shell
+        export JAVA_HOME=${jre}
+        exec ${jre}/bin/java -jar $out/${jar'}.jar "\$@"
+        EOF
+        chmod a+x $out/bin/${prog'}
+      '';
+
+      meta = with lib; {
+        inherit description license;
+        homepage = "https://saxon.sourceforge.net/";
+        sourceProvenance = with sourceTypes; [ binaryBytecode ];
+        maintainers = with maintainers; [ rvl ];
+        platforms = platforms.all;
+      };
+    };
+
+in {
+  saxon = common {
+    pname = "saxon";
+    version = "6.5.3";
+    src = fetchurl {
+      url = "mirror://sourceforge/saxon/saxon6_5_3.zip";
+      sha256 = "0l5y3y2z4wqgh80f26dwwxwncs8v3nkz3nidv14z024lmk730vs3";
+    };
+    description = "XSLT 1.0 processor";
+    # https://saxon.sourceforge.net/saxon6.5.3/conditions.html
+    license = lib.licenses.mpl10;
+    java = jre8;
+  };
+
+  saxonb_8_8 = common {
+    pname = "saxonb";
+    version = "8.8";
+    jar = "saxon8";
+    src = fetchurl {
+      url = "mirror://sourceforge/saxon/saxonb8-8j.zip";
+      sha256 = "15bzrfyd2f1045rsp9dp4znyhmizh1pm97q8ji2bc0b43q23xsb8";
+    };
+    description = "Complete and conformant processor of XSLT 2.0, XQuery 1.0, and XPath 2.0";
+    java = jre8;
+  };
+
+  saxonb_9_1 = common {
+    pname = "saxonb";
+    version = "9.1.0.8";
+    jar = "saxon9";
+    src = fetchurl {
+      url = "mirror://sourceforge/saxon/Saxon-B/9.1.0.8/saxonb9-1-0-8j.zip";
+      sha256 = "1d39jdnwr3v3pzswm81zry6yikqlqy9dp2l2wmpqdiw00r5drg4j";
+    };
+    description = "Complete and conformant processor of XSLT 2.0, XQuery 1.0, and XPath 2.0";
+  };
+
+  saxon_9-he = common {
+    pname = "saxon-he";
+    version = "9.9.0.1";
+    prog = "saxon-he";
+    jar = "saxon9he";
+    src = fetchurl {
+      url = "mirror://sourceforge/saxon/Saxon-HE/9.9/SaxonHE9-9-0-1J.zip";
+      sha256 = "1inxd7ia7rl9fxfrw8dy9sb7rqv76ipblaki5262688wf2dscs60";
+    };
+    description = "Processor for XSLT 3.0, XPath 2.0 and 3.1, and XQuery 3.1";
+  };
+
+  saxon-he = common {
+    pname = "saxon-he";
+    version = "11.5";
+    prog = "saxon-he";
+    jar = "saxon-he-11.5";
+    src = fetchurl {
+      url = "https://github.com/Saxonica/Saxon-HE/raw/a6d11dec3853326b661e9aff283e30b43c02e163/11/Java/SaxonHE11-5J.zip";
+      sha256 = "2Nwh6dG3YAjc/OTr8DMOfbnRvdCWB0YsVP3ZLRbM9U0=";
+    };
+    description = "Processor for XSLT 3.0, XPath 2.0 and 3.1, and XQuery 3.1";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/java/smack/default.nix b/nixpkgs/pkgs/development/libraries/java/smack/default.nix
new file mode 100644
index 000000000000..fd263d91d426
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/smack/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "smack";
+  version = "4.1.9";
+
+  src = fetchurl {
+    url = "http://www.igniterealtime.org/downloadServlet?filename=smack/smack_${lib.replaceStrings ["."] ["_"] version}.tar.gz";
+    sha256 = "009x0qcxd4dkvwcjz2nla470pwbabwvg37wc21pslpw42ldi0bzp";
+  };
+
+  sourceRoot = ".";
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/share/java
+    cp libs/smack-*.jar $out/share/java
+
+    runHook postInstall
+  '';
+
+  meta = {
+    description = "A XMPP (Jabber) client library for instant messaging and presence";
+    homepage = "http://www.igniterealtime.org/projects/smack/";
+    sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
+    platforms = lib.platforms.unix;
+    license = lib.licenses.asl20;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/java/swt/awt-libs.patch b/nixpkgs/pkgs/development/libraries/java/swt/awt-libs.patch
new file mode 100644
index 000000000000..6c3ff53b7983
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/swt/awt-libs.patch
@@ -0,0 +1,8 @@
+--- a/make_linux.mak
++++ b/make_linux.mak
+@@ -63,4 +63,4 @@
+
+ AWT_LFLAGS = -shared ${SWT_LFLAGS}
+-AWT_LIBS = -L$(AWT_LIB_PATH) -ljawt
++AWT_LIBS = `pkg-config --libs x11` -L$(AWT_LIB_PATH) -ljawt
+
diff --git a/nixpkgs/pkgs/development/libraries/java/swt/default.nix b/nixpkgs/pkgs/development/libraries/java/swt/default.nix
new file mode 100644
index 000000000000..4c900ed21ac6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/swt/default.nix
@@ -0,0 +1,158 @@
+{ lib
+, stdenv
+, canonicalize-jars-hook
+, fetchzip
+, pkg-config
+, atk
+, glib
+, gtk2
+, jdk
+, libGL
+, libGLU
+, libXt
+, libXtst
+, gnome2
+}:
+
+let
+  platformMap = {
+    x86_64-linux =
+      { platform = "gtk-linux-x86_64";
+        sha256 = "17frac2nsx22hfa72264as31rn35hfh9gfgy0n6wvc3knl5d2716"; };
+    i686-linux =
+      { platform = "gtk-linux-x86";
+        sha256 = "13ca17rga9yvdshqvh0sfzarmdcl4wv4pid0ls7v35v4844zbc8b"; };
+    x86_64-darwin =
+      { platform = "cocoa-macosx-x86_64";
+        sha256 = "0wjyxlw7i9zd2m8syd6k1q85fj8pzhxlfsrl8fpgsj37p698bd0a"; };
+  };
+
+  metadata = assert platformMap ? ${stdenv.hostPlatform.system};
+    platformMap.${stdenv.hostPlatform.system};
+in stdenv.mkDerivation rec {
+  pname = "swt";
+  version = "4.5";
+  fullVersion = "${version}-201506032000";
+
+  hardeningDisable = [ "format" ];
+
+  # Alas, the Eclipse Project apparently doesn't produce source-only
+  # releases of SWT.  So we just grab a binary release and extract
+  # "src.zip" from that.
+  src = fetchzip {
+    url = "https://archive.eclipse.org/eclipse/downloads/drops4/" +
+      "R-${fullVersion}/${pname}-${version}-${metadata.platform}.zip";
+    inherit (metadata) sha256;
+    stripRoot = false;
+    postFetch = ''
+      mkdir "$unpackDir"
+      cd "$unpackDir"
+
+      renamed="$TMPDIR/src.zip"
+      mv "$out/src.zip" "$renamed"
+      unpackFile "$renamed"
+      rm -r "$out"
+
+      mv "$unpackDir" "$out"
+    '';
+  };
+
+  nativeBuildInputs = [
+    canonicalize-jars-hook
+    pkg-config
+  ];
+  buildInputs = [
+    atk
+    gtk2
+    jdk
+    libGL
+    libGLU
+    libXtst
+    gnome2.gnome_vfs
+    gnome2.libgnome
+    gnome2.libgnomeui
+  ] ++ lib.optionals (lib.hasPrefix "8u" jdk.version) [
+    libXt
+  ];
+
+  patches = [ ./awt-libs.patch ./gtk-libs.patch ];
+
+  prePatch = ''
+    # clear whitespace from makefiles (since we match on EOL later)
+    sed -i 's/ \+$//' ./*.mak
+  '';
+
+  postPatch = let makefile-sed = builtins.toFile "swt-makefile.sed" (''
+    # fix pkg-config invocations in CFLAGS/LIBS pairs.
+    #
+    # change:
+    #     FOOCFLAGS = `pkg-config --cflags `foo bar`
+    #     FOOLIBS = `pkg-config --libs-only-L foo` -lbaz
+    # into:
+    #     FOOCFLAGS = `pkg-config --cflags foo bar`
+    #     FOOLIBS = `pkg-config --libs foo bar`
+    #
+    # the latter works more consistently.
+    /^[A-Z0-9_]\+CFLAGS = `pkg-config --cflags [^`]\+`$/ {
+      N
+      s'' +
+        "/" + ''
+          ^\([A-Z0-9_]\+\)CFLAGS = `pkg-config --cflags \(.\+\)`\
+          \1LIBS = `pkg-config --libs-only-L .\+$'' +
+        "/" + ''
+          \1CFLAGS = `pkg-config --cflags \2`\
+          \1LIBS = `pkg-config --libs \2`'' +
+        "/\n" + ''
+    }
+    # fix WebKit libs not being there
+    s/\$(WEBKIT_LIB) \$(WEBKIT_OBJECTS)$/\0 `pkg-config --libs glib-2.0`/g
+  ''); in ''
+    declare -a makefiles=(./*.mak)
+    sed -i -f ${makefile-sed} "''${makefiles[@]}"
+    # assign Makefile variables eagerly & change backticks to `$(shell …)`
+    sed -i -e 's/ = `\([^`]\+\)`/ := $(shell \1)/' \
+      -e 's/`\([^`]\+\)`/$(shell \1)/' \
+      "''${makefiles[@]}"
+  '';
+
+  buildPhase = ''
+    runHook preBuild
+
+    export JAVA_HOME=${jdk}
+
+    ./build.sh
+
+    mkdir out
+    find org/ -name '*.java' -type f -exec javac -d out/ {} +
+
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    if [ -n "$prefix" ]; then
+      mkdir -p "$prefix"
+    fi
+
+    mkdir -p "$out/lib"
+    cp -t "$out/lib" ./*.so
+
+    mkdir -p "$out/jars"
+    cp -t out/ version.txt
+    (cd out && jar -c *) > "$out/jars/swt.jar"
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.eclipse.org/swt/";
+    description = ''
+      A widget toolkit for Java to access the user-interface facilities of
+      the operating systems on which it is implemented.
+    '';
+    license = licenses.epl10;
+    maintainers = with maintainers; [ bb010g ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/java/swt/gtk-libs.patch b/nixpkgs/pkgs/development/libraries/java/swt/gtk-libs.patch
new file mode 100644
index 000000000000..cd13082b5df7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/java/swt/gtk-libs.patch
@@ -0,0 +1,14 @@
+--- a/make_linux.mak
++++ b/make_linux.mak
+@@ -53,9 +53,4 @@
+
+-# Do not use pkg-config to get libs because it includes unnecessary dependencies (i.e. pangoxft-1.0)
+-GTKCFLAGS = `pkg-config --cflags gtk+-$(GTK_VERSION) gtk+-unix-print-$(GTK_VERSION)`
++GTKCFLAGS = `pkg-config --cflags gtk+-$(GTK_VERSION) gthread-2.0 gtk+-unix-print-$(GTK_VERSION) x11 xtst`
++GTKLIBS = `pkg-config --libs gtk+-$(GTK_VERSION) gthread-2.0 gtk+-unix-print-$(GTK_VERSION) x11 xtst`
+-ifeq ($(GTK_VERSION), 3.0)
+-GTKLIBS = `pkg-config --libs-only-L gtk+-$(GTK_VERSION) gthread-2.0` $(XLIB64) -L/usr/X11R6/lib -lgtk-3 -lgdk-3 -lcairo -lgthread-2.0 -lXtst
+-else
+-GTKLIBS = `pkg-config --libs-only-L gtk+-$(GTK_VERSION) gthread-2.0` $(XLIB64) -L/usr/X11R6/lib -lgtk-x11-$(GTK_VERSION) -lgthread-2.0 -lXtst
+-endif
+
diff --git a/nixpkgs/pkgs/development/libraries/jbig2dec/default.nix b/nixpkgs/pkgs/development/libraries/jbig2dec/default.nix
new file mode 100644
index 000000000000..af99944dae72
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/jbig2dec/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchurl, python3, autoconf, automake, libtool }:
+
+stdenv.mkDerivation rec {
+  pname = "jbig2dec";
+  version = "0.20";
+
+  src = fetchurl {
+    url = "https://github.com/ArtifexSoftware/jbig2dec/archive/${version}/jbig2dec-${version}.tar.gz";
+    hash = "sha256-qXBTaaZjOrpTJpNFDsgCxWI5fhuCRmLegJ7ekvZ6/yE=";
+  };
+
+  postPatch = ''
+    patchShebangs test_jbig2dec.py
+  '';
+
+  nativeBuildInputs = [ autoconf automake libtool ];
+
+  # `autogen.sh` runs `configure`, and expects that any flags needed
+  # by `configure` (like `--host`) are passed to `autogen.sh`.
+  configureScript = "./autogen.sh";
+
+  nativeCheckInputs = [ python3 ];
+  doCheck = true;
+
+  meta = {
+    homepage = "https://www.jbig2dec.com/";
+    description = "Decoder implementation of the JBIG2 image compression format";
+    license = lib.licenses.agpl3;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/jbig2enc/default.nix b/nixpkgs/pkgs/development/libraries/jbig2enc/default.nix
new file mode 100644
index 000000000000..7c847918c9f9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/jbig2enc/default.nix
@@ -0,0 +1,68 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, python3
+, leptonica
+, zlib
+, libwebp
+, giflib
+, libjpeg
+, libpng
+, libtiff
+, autoreconfHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "jbig2enc";
+  version = "0.29";
+
+  src = fetchFromGitHub {
+    owner = "agl";
+    repo = "jbig2enc";
+    rev = version;
+    hash = "sha256-IAL4egXgaGmCilzcryjuvOoHhahyrfGWY68GBfXXgAM=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  propagatedBuildInputs = [
+    leptonica
+    zlib
+    libwebp
+    giflib
+    libjpeg
+    libpng
+    libtiff
+  ];
+
+  patches = [
+    (fetchpatch {
+      name = "fix-build-leptonica-1.83.patch";
+      url = "https://github.com/agl/jbig2enc/commit/ea050190466f5336c69c6a11baa1cb686677fcab.patch";
+      hash = "sha256-+kScjFgDEU9F7VOUNAhm2XBjGm49fzAH8hYhmTm8xv8=";
+    })
+  ];
+
+  # We don't want to install this Python 2 script
+  postInstall = ''
+    rm "$out/bin/pdf.py"
+  '';
+
+  # This is necessary, because the resulting library has
+  # /tmp/nix-build-jbig2enc/src/.libs before /nix/store/jbig2enc/lib
+  # in its rpath, which means that patchelf --shrink-rpath removes
+  # the /nix/store one.  By cleaning up before fixup, we ensure that
+  # the /tmp/nix-build-jbig2enc/src/.libs directory is gone.
+  preFixup = ''
+    make clean
+  '';
+
+  meta = {
+    description = "Encoder for the JBIG2 image compression format";
+    license = lib.licenses.asl20;
+    platforms = lib.platforms.all;
+    homepage = "https://github.com/agl/jbig2enc";
+    mainProgram = "jbig2";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/jbigkit/default.nix b/nixpkgs/pkgs/development/libraries/jbigkit/default.nix
new file mode 100644
index 000000000000..40a46041caa2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/jbigkit/default.nix
@@ -0,0 +1,52 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "jbigkit";
+  version = "2.1";
+
+  src = fetchurl {
+    url = "https://www.cl.cam.ac.uk/~mgk25/jbigkit/download/${pname}-${version}.tar.gz";
+    sha256 = "0cnrcdr1dwp7h7m0a56qw09bv08krb37mpf7cml5sjdgpyv0cwfy";
+  };
+
+  makeFlags = [
+    "CC=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc"
+    "AR=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar"
+    "RANLIB=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ranlib"
+  ];
+
+  postPatch = ''
+    sed -i 's/^\(CFLAGS.*\)$/\1 -fPIC/' Makefile
+
+    for f in Makefile libjbig/Makefile pbmtools/Makefile; do
+        sed -i -E 's/\bar /$(AR) /g;s/\branlib /$(RANLIB) /g' "$f"
+    done
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    install -D -m644 libjbig/libjbig.a $out/lib/libjbig.a
+    install -D -m644 libjbig/libjbig85.a $out/lib/libjbig85.a
+    install -D -m644 libjbig/jbig.h $out/include/jbig.h
+    install -D -m644 libjbig/jbig_ar.h $out/include/jbig_ar.h
+    install -D -m644 libjbig/jbig85.h $out/include/jbig85.h
+
+    install -d -m755 $out/share/man/man1
+    install -m644 pbmtools/*.1* $out/share/man/man1
+
+    install -D -m755 pbmtools/jbgtopbm $out/bin/jbgtopbm
+    install -D -m755 pbmtools/pbmtojbg $out/bin/pbmtojbg
+    install -D -m755 pbmtools/jbgtopbm85 $out/bin/jbgtopbm85
+    install -D -m755 pbmtools/pbmtojbg85 $out/bin/pbmtojbg85
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "http://www.cl.cam.ac.uk/~mgk25/jbigkit/";
+    description = "A software implementation of the JBIG1 data compression standard";
+    license = licenses.gpl2Plus;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/jcal/default.nix b/nixpkgs/pkgs/development/libraries/jcal/default.nix
new file mode 100644
index 000000000000..354a5518c43d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/jcal/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook
+, readline
+}:
+
+stdenv.mkDerivation rec {
+  pname = "jcal";
+  version = "0.4.1";
+
+  src = fetchFromGitHub {
+    owner = "fzerorubigd";
+    repo = "jcal";
+    rev = "v${version}";
+    sha256 = "0m3g3rf0ycv2dsfn9y2472fa3r0yla8pfqk6gq00nrscsc3pp4zf";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ readline ];
+
+  preAutoreconf = "cd sources/";
+
+  meta = with lib; {
+    description = "Jalali calendar is a small and portable free software library to manipulate date and time in Jalali calendar system";
+    homepage =  "http://nongnu.org/jcal/";
+    license = licenses.gpl3;
+    maintainers = [ ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/jellyfin-ffmpeg/default.nix b/nixpkgs/pkgs/development/libraries/jellyfin-ffmpeg/default.nix
new file mode 100644
index 000000000000..6398f8b872d5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/jellyfin-ffmpeg/default.nix
@@ -0,0 +1,40 @@
+{ ffmpeg_6-full
+, fetchFromGitHub
+, lib
+}:
+
+ffmpeg_6-full.overrideAttrs (old: rec {
+  pname = "jellyfin-ffmpeg";
+  version = "6.0.1-2";
+
+  src = fetchFromGitHub {
+    owner = "jellyfin";
+    repo = "jellyfin-ffmpeg";
+    rev = "v${version}";
+    hash = "sha256-wc9OGwjcRDTDxlHYVTlbLe1B/F11z0Xcz6WRrO42zn4=";
+  };
+
+  # Clobber upstream patches as they don't apply to the Jellyfin fork
+  patches = [];
+
+  configureFlags = old.configureFlags ++ [
+    "--extra-version=Jellyfin"
+    "--disable-ptx-compression" # https://github.com/jellyfin/jellyfin/issues/7944#issuecomment-1156880067
+  ];
+
+  postPatch = ''
+    for file in $(cat debian/patches/series); do
+      patch -p1 < debian/patches/$file
+    done
+
+    ${old.postPatch or ""}
+  '';
+
+  meta = with lib; {
+    description = "${old.meta.description} (Jellyfin fork)";
+    homepage = "https://github.com/jellyfin/jellyfin-ffmpeg";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ justinas ];
+    pkgConfigModules = [ "libavutil" ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/jemalloc/default.nix b/nixpkgs/pkgs/development/libraries/jemalloc/default.nix
new file mode 100644
index 000000000000..8a3b8658fbb8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/jemalloc/default.nix
@@ -0,0 +1,68 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+# By default, jemalloc puts a je_ prefix onto all its symbols on OSX, which
+# then stops downstream builds (mariadb in particular) from detecting it. This
+# option should remove the prefix and give us a working jemalloc.
+# Causes segfaults with some software (ex. rustc), but defaults to true for backward
+# compatibility.
+, stripPrefix ? stdenv.hostPlatform.isDarwin
+, disableInitExecTls ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "jemalloc";
+  version = "5.3.0";
+
+  src = fetchurl {
+    url = "https://github.com/jemalloc/jemalloc/releases/download/${version}/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-LbgtHnEZ3z5xt2QCGbbf6EeJvAU3mDw7esT3GJrs/qo=";
+  };
+
+  patches = [
+    # fix tests under --with-jemalloc-prefix=, see https://github.com/jemalloc/jemalloc/pull/2340
+    (fetchpatch {
+      url = "https://github.com/jemalloc/jemalloc/commit/d00ecee6a8dfa90afcb1bbc0858985c17bef6559.patch";
+      hash = "sha256-N5i4IxGJ4SSAgFiq5oGRnrNeegdk2flw9Sh2mP0yl4c=";
+    })
+  ];
+
+  configureFlags =
+    # see the comment on stripPrefix
+    lib.optional stripPrefix "--with-jemalloc-prefix="
+    ++ lib.optional disableInitExecTls "--disable-initial-exec-tls"
+    # jemalloc is unable to correctly detect transparent hugepage support on
+    # ARM (https://github.com/jemalloc/jemalloc/issues/526), and the default
+    # kernel ARMv6/7 kernel does not enable it, so we explicitly disable support
+    ++ lib.optionals (stdenv.isAarch32 && lib.versionOlder version "5") [
+      "--disable-thp"
+      "je_cv_thp=no"
+    ]
+    # AArch64 has configurable page size up to 64k. The default configuration
+    # for jemalloc only supports 4k page sizes.
+    ++ lib.optional stdenv.isAarch64 "--with-lg-page=16"
+    # See https://github.com/jemalloc/jemalloc/issues/1997
+    # Using a value of 48 should work on both emulated and native x86_64-darwin.
+    ++ lib.optional (stdenv.isDarwin && stdenv.isx86_64) "--with-lg-vaddr=48"
+  ;
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-error=array-bounds";
+  env.NIX_LDFLAGS = lib.optionalString (stdenv.cc.libcxx != null) "-l${stdenv.cc.libcxx.cxxabi.libName}";
+
+  # Tries to link test binaries binaries dynamically and fails
+  doCheck = !stdenv.hostPlatform.isStatic;
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://jemalloc.net/";
+    description = "General purpose malloc(3) implementation";
+    longDescription = ''
+      malloc(3)-compatible memory allocator that emphasizes fragmentation
+      avoidance and scalable concurrency support.
+    '';
+    license = licenses.bsd2;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/jemalloc/rust.nix b/nixpkgs/pkgs/development/libraries/jemalloc/rust.nix
new file mode 100644
index 000000000000..1a9968933b1e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/jemalloc/rust.nix
@@ -0,0 +1,24 @@
+{ lib
+, stdenv
+, jemalloc
+, writeText
+
+, unprefixed ? false
+}:
+
+let
+  # On some platforms the unprefixed feature will be ignored:
+  # https://github.com/tikv/jemallocator/blob/ab0676d77e81268cd09b059260c75b38dbef2d51/jemalloc-sys/src/env.rs
+  unprefixed' = unprefixed && !stdenv.hostPlatform.isMusl && !stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isAndroid;
+
+in jemalloc.overrideAttrs (oldAttrs: {
+  configureFlags = oldAttrs.configureFlags ++ [
+    "--with-private-namespace=_rjem_"
+  ] ++ lib.optionals (!unprefixed') [
+    "--with-jemalloc-prefix=_rjem_"
+  ];
+
+  setupHook = writeText "setup-hook.sh" ''
+    export JEMALLOC_OVERRIDE="@out@/lib/libjemalloc${stdenv.hostPlatform.extensions.library}"
+  '';
+})
diff --git a/nixpkgs/pkgs/development/libraries/jitterentropy/default.nix b/nixpkgs/pkgs/development/libraries/jitterentropy/default.nix
new file mode 100644
index 000000000000..edf46fa4f51b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/jitterentropy/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "jitterentropy";
+  version = "3.4.1";
+
+  src = fetchFromGitHub {
+    owner = "smuellerDD";
+    repo = "jitterentropy-library";
+    rev = "v${version}";
+    hash = "sha256-GSGlupTN1o8BbTN287beqYSRFDaXOk6SlIRvtjpvmhQ=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  enableParallelBuilding = true;
+  hardeningDisable = [ "fortify" ]; # avoid warnings
+
+  # prevent jitterentropy from builtin strip to allow controlling this from the derivation's
+  # settings. Also fixes a strange issue, where this strip may fail when cross-compiling.
+  installFlags = [
+    "INSTALL_STRIP=install"
+    "PREFIX=${placeholder "out"}"
+  ];
+
+  meta = with lib; {
+    description = "Provides a noise source using the CPU execution timing jitter";
+    homepage = "https://github.com/smuellerDD/jitterentropy-library";
+    changelog = "https://github.com/smuellerDD/jitterentropy-library/raw/v${version}/CHANGES.md";
+    license = with licenses; [ bsd3 /* OR */ gpl2Only ];
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ johnazoidberg c0bw3b ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/jose/default.nix b/nixpkgs/pkgs/development/libraries/jose/default.nix
new file mode 100644
index 000000000000..08fc7e6dc99e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/jose/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, meson, pkg-config, ninja, asciidoc
+, zlib, jansson, openssl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "jose";
+  version = "11";
+
+  src = fetchFromGitHub {
+    owner = "latchset";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-TKcXswF50B8MS+XHSEvqHaFSAct7VdsnZ0RtZCF04Lc=";
+  };
+
+  nativeBuildInputs = [ meson pkg-config ninja asciidoc ];
+  buildInputs = [ zlib jansson openssl ];
+
+  outputs = [ "out" "dev" "man" ];
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "C-language implementation of Javascript Object Signing and Encryption";
+    homepage = "https://github.com/latchset/jose";
+    maintainers = with lib.maintainers; [ ];
+    license = lib.licenses.asl20;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/jpcre2/default.nix b/nixpkgs/pkgs/development/libraries/jpcre2/default.nix
new file mode 100644
index 000000000000..51fbba13ba0c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/jpcre2/default.nix
@@ -0,0 +1,27 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, pcre2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "jpcre2";
+  version = "10.32.01";
+  rev = version;
+
+  src = fetchFromGitHub {
+    owner = "jpcre2";
+    repo = "jpcre2";
+    rev = "refs/tags/${version}";
+    hash = "sha256-CizjxAiajDLqajZKizMRAk5UEZA+jDeBSldPyIb6Ic8=";
+  };
+
+  buildInputs = [ pcre2 ];
+
+  meta = with lib; {
+    homepage = "https://docs.neuzunix.com/jpcre2/latest/";
+    description = "C++ wrapper for PCRE2 Library";
+    platforms = lib.platforms.all;
+    license = licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/json-c/default.nix b/nixpkgs/pkgs/development/libraries/json-c/default.nix
new file mode 100644
index 000000000000..ab3d2be6f010
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/json-c/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "json-c";
+  version = "0.17";
+
+  src = fetchFromGitHub {
+    owner = "json-c";
+    repo = "json-c";
+    rev = "json-c-0.17-20230812";
+    hash = "sha256-R5KIJ0xVgGqffjzJaZvvvhAneJ+ZBuanyF6KYTTxb58=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "A JSON implementation in C";
+    longDescription = ''
+      JSON-C implements a reference counting object model that allows you to
+      easily construct JSON objects in C, output them as JSON formatted strings
+      and parse JSON formatted strings back into the C representation of JSON
+      objects.
+    '';
+    homepage = "https://github.com/json-c/json-c/wiki";
+    changelog = "https://github.com/json-c/json-c/blob/${finalAttrs.src.rev}/ChangeLog";
+    maintainers = with maintainers; [ lovek323 ];
+    platforms = platforms.unix;
+    license = licenses.mit;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/json-fortran/default.nix b/nixpkgs/pkgs/development/libraries/json-fortran/default.nix
new file mode 100644
index 000000000000..422248520fc4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/json-fortran/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, lib, fetchFromGitHub, gfortran, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "json-fortran";
+  version = "8.3.0";
+
+  src = fetchFromGitHub {
+    owner = "jacobwilliams";
+    repo = pname;
+    rev = version;
+    hash = "sha256-96W9bzWEZ3EN4wtnDT3G3pvLdcI4SIhGJWBVPU3rNZ4=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    gfortran
+  ];
+
+  cmakeFlags = [
+    "-DUSE_GNU_INSTALL_CONVENTION=ON"
+  ];
+
+  # Due to some misconfiguration in CMake the Fortran modules end up in $out/$out.
+  # Move them back to the desired location.
+  postInstall = ''
+    mv $out/$out/include $out/.
+    rm -r $out/nix
+  '';
+
+  meta = with lib; {
+    description = "Modern Fortran JSON API";
+    homepage = "https://github.com/jacobwilliams/json-fortran";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.sheepforce ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/json-glib/default.nix b/nixpkgs/pkgs/development/libraries/json-glib/default.nix
new file mode 100644
index 000000000000..79075929c651
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/json-glib/default.nix
@@ -0,0 +1,106 @@
+{ lib
+, stdenv
+, fetchurl
+, glib
+, meson
+, ninja
+, nixosTests
+, pkg-config
+, gettext
+, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
+, buildPackages
+, gobject-introspection
+, gi-docgen
+, libxslt
+, fixDarwinDylibNames
+, gnome
+}:
+
+stdenv.mkDerivation rec {
+  pname = "json-glib";
+  version = "1.8.0";
+
+  outputs = [ "out" "dev" "installedTests" ]
+    ++ lib.optional withIntrospection "devdoc";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "l+9euSyoEQOa1Qpl8GYz8armR5J4kwe+cXB5XYsxlFQ=";
+  };
+
+  patches = [
+    # Add option for changing installation path of installed tests.
+    ./meson-add-installed-tests-prefix-option.patch
+  ];
+
+  strictDeps = true;
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gettext
+    glib
+    libxslt
+  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
+    fixDarwinDylibNames
+  ] ++ lib.optionals withIntrospection [
+    gobject-introspection
+    gi-docgen
+  ];
+
+  propagatedBuildInputs = [
+    glib
+  ];
+
+  mesonFlags = [
+    "-Dinstalled_test_prefix=${placeholder "installedTests"}"
+    (lib.mesonEnable "introspection" withIntrospection)
+    (lib.mesonEnable "gtk_doc" withIntrospection)
+  ];
+
+  # Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake)
+  # it should be a build-time dep for build
+  # TODO: send upstream
+  postPatch = ''
+    substituteInPlace doc/meson.build \
+      --replace "'gi-docgen', ver" "'gi-docgen', native:true, ver" \
+      --replace "'gi-docgen', req" "'gi-docgen', native:true, req"
+  '';
+
+  doCheck = true;
+
+  postFixup = ''
+    # Move developer documentation to devdoc output.
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    if [[ -d "$out/share/doc" ]]; then
+        find -L "$out/share/doc" -type f -regex '.*\.devhelp2?' -print0 \
+          | while IFS= read -r -d ''' file; do
+            moveToOutput "$(dirname "''${file/"$out/"/}")" "$devdoc"
+        done
+    fi
+  '';
+
+  passthru = {
+    tests = {
+      installedTests = nixosTests.installed-tests.json-glib;
+    };
+
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    description = "A library providing (de)serialization support for the JavaScript Object Notation (JSON) format";
+    homepage = "https://wiki.gnome.org/Projects/JsonGlib";
+    license = licenses.lgpl21Plus;
+    maintainers = teams.gnome.members;
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/json-glib/meson-add-installed-tests-prefix-option.patch b/nixpkgs/pkgs/development/libraries/json-glib/meson-add-installed-tests-prefix-option.patch
new file mode 100644
index 000000000000..ff09a0115587
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/json-glib/meson-add-installed-tests-prefix-option.patch
@@ -0,0 +1,27 @@
+diff --git a/json-glib/tests/meson.build b/json-glib/tests/meson.build
+index 1eb56c8..dca444e 100644
+--- a/json-glib/tests/meson.build
++++ b/json-glib/tests/meson.build
+@@ -21,8 +21,9 @@ test_data = [
+   'stream-load.json',
+ ]
+ 
+-installed_test_bindir = join_paths(json_libexecdir, 'installed-tests', json_api_name)
+-installed_test_datadir = join_paths(json_datadir, 'installed-tests', json_api_name)
++installed_test_prefix = get_option('installed_test_prefix')
++installed_test_bindir = join_paths(installed_test_prefix, 'libexec', 'installed-tests', json_api_name)
++installed_test_datadir = join_paths(installed_test_prefix, 'share', 'installed-tests', json_api_name)
+ 
+ install_data(test_data, install_dir: installed_test_bindir)
+ 
+diff --git a/meson_options.txt b/meson_options.txt
+index 5a96998..383aa6c 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -13,3 +13,6 @@ option('tests',
+ option('nls',
+        type: 'feature', value: 'auto', yield: true,
+        description: 'Enable native language support (translations)')
++option('installed_test_prefix',
++       description: 'Prefix for installed tests',
++       type: 'string')
diff --git a/nixpkgs/pkgs/development/libraries/jsoncpp/default.nix b/nixpkgs/pkgs/development/libraries/jsoncpp/default.nix
new file mode 100644
index 000000000000..59572afc627c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/jsoncpp/default.nix
@@ -0,0 +1,58 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, python3
+, validatePkgConfig
+, secureMemory ? false
+, enableStatic ? stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+  pname = "jsoncpp";
+  version = "1.9.5";
+
+  outputs = ["out" "dev"];
+
+  src = fetchFromGitHub {
+    owner = "open-source-parsers";
+    repo = "jsoncpp";
+    rev = version;
+    sha256 = "sha256-OyfJD19g8cT9wOD0hyJyEw4TbaxZ9eY04396U/7R+hs=";
+  };
+
+  /* During darwin bootstrap, we have a cp that doesn't understand the
+   * --reflink=auto flag, which is used in the default unpackPhase for dirs
+   */
+  unpackPhase = ''
+    cp -a ${src} ${src.name}
+    chmod -R +w ${src.name}
+    export sourceRoot=${src.name}
+  '';
+
+  postPatch = lib.optionalString secureMemory ''
+    sed -i 's/#define JSONCPP_USING_SECURE_MEMORY 0/#define JSONCPP_USING_SECURE_MEMORY 1/' include/json/version.h
+  '';
+
+  nativeBuildInputs = [ cmake python3 validatePkgConfig ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+    "-DBUILD_OBJECT_LIBS=OFF"
+    "-DJSONCPP_WITH_CMAKE_PACKAGE=ON"
+    "-DBUILD_STATIC_LIBS=${if enableStatic then "ON" else "OFF"}"
+  ]
+    # the test's won't compile if secureMemory is used because there is no
+    # comparison operators and conversion functions between
+    # std::basic_string<..., Json::SecureAllocator<char>> vs.
+    # std::basic_string<..., [default allocator]>
+    ++ lib.optional ((stdenv.buildPlatform != stdenv.hostPlatform) || secureMemory) "-DJSONCPP_WITH_TESTS=OFF";
+
+  meta = with lib; {
+    homepage = "https://github.com/open-source-parsers/jsoncpp";
+    description = "A C++ library for interacting with JSON";
+    maintainers = with maintainers; [ ttuegel cpages ];
+    license = licenses.mit;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/jsonrpc-glib/default.nix b/nixpkgs/pkgs/development/libraries/jsonrpc-glib/default.nix
new file mode 100644
index 000000000000..855c3cfcf2cd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/jsonrpc-glib/default.nix
@@ -0,0 +1,67 @@
+{ stdenv
+, lib
+, fetchurl
+, meson
+, ninja
+, glib
+, json-glib
+, pkg-config
+, gobject-introspection
+, vala
+, gi-docgen
+, gnome
+}:
+
+stdenv.mkDerivation rec {
+  pname = "jsonrpc-glib";
+  version = "3.44.0";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "aUBqAlDQzFF1QIyufsqAwMa/rvxK4YMLNUwEM7zVzgY=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gobject-introspection
+    vala
+    gi-docgen
+  ];
+
+  buildInputs = [
+    glib
+    json-glib
+  ];
+
+  mesonFlags = [
+    "-Denable_gtk_doc=true"
+  ];
+
+  # Tests fail non-deterministically
+  # https://gitlab.gnome.org/GNOME/jsonrpc-glib/issues/2
+  doCheck = false;
+
+  postFixup = ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    description = "A library to communicate using the JSON-RPC 2.0 specification";
+    homepage = "https://gitlab.gnome.org/GNOME/jsonrpc-glib";
+    license = licenses.lgpl21Plus;
+    maintainers = teams.gnome.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/judy/cross.patch b/nixpkgs/pkgs/development/libraries/judy/cross.patch
new file mode 100644
index 000000000000..a4e53c08a6d6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/judy/cross.patch
@@ -0,0 +1,22 @@
+--- a/src/Judy1/Makefile.am
++++ b/src/Judy1/Makefile.am
+@@ -18,7 +18,7 @@
+ libinline_la_CFLAGS = $(AM_CFLAGS) -DJUDYGETINLINE
+ 
+ Judy1Tables.c: Judy1TablesGen.c
+-	$(CC) $(INCLUDES) $(AM_CFLAGS) @CFLAGS@ -o Judy1TablesGen Judy1TablesGen.c; ./Judy1TablesGen
++	$(CC_FOR_BUILD) $(INCLUDES) $(AM_CFLAGS) @CFLAGS@ -o Judy1TablesGen Judy1TablesGen.c; ./Judy1TablesGen
+ 
+ Judy1ByCount.c:../JudyCommon/JudyByCount.c
+ 	cp -f ../JudyCommon/JudyByCount.c      		Judy1ByCount.c   
+--- a/src/JudyL/Makefile.am
++++ b/src/JudyL/Makefile.am
+@@ -18,7 +18,7 @@
+ libinline_la_CFLAGS = $(AM_CFLAGS) -DJUDYGETINLINE
+ 
+ JudyLTables.c: JudyLTablesGen.c
+-	$(CC) $(INCLUDES) $(AM_CFLAGS) @CFLAGS@ -o JudyLTablesGen JudyLTablesGen.c; ./JudyLTablesGen 
++	$(CC_FOR_BUILD) $(INCLUDES) $(AM_CFLAGS) @CFLAGS@ -o JudyLTablesGen JudyLTablesGen.c; ./JudyLTablesGen 
+ 
+ JudyLByCount.c:   ../JudyCommon/JudyByCount.c
+ 	cp -f ../JudyCommon/JudyByCount.c      		JudyLByCount.c   
diff --git a/nixpkgs/pkgs/development/libraries/judy/default.nix b/nixpkgs/pkgs/development/libraries/judy/default.nix
new file mode 100644
index 000000000000..618aee498466
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/judy/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl, pkgsBuildBuild, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "judy";
+  version = "1.0.5";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/judy/Judy-${version}.tar.gz";
+    sha256 = "1sv3990vsx8hrza1mvq3bhvv9m6ff08y4yz7swn6znszz24l0w6j";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+  depsBuildBuild = [ pkgsBuildBuild.stdenv.cc ];
+  patches = [ ./cross.patch ];
+
+  # Disable parallel builds as manpages lack some dependencies:
+  #    ../tool/jhton ext/JudyHS_funcs_3.htm | grep -v '^[   ]*$' | sed -e 's/\.C//' > man/man3/JudyHS_funcs
+  #    make[2]: *** No rule to make target 'man/man3/JSLD', needed by 'all-am'.  Stop.
+  # Let's wait for the upstream fix similar to https://sourceforge.net/p/judy/patches/4/
+  enableParallelBuilding = false;
+
+  meta = {
+    homepage = "https://judy.sourceforge.net/";
+    license = lib.licenses.lgpl21Plus;
+    description = "State-of-the-art C library that implements a sparse dynamic array";
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/jxrlib/default.nix b/nixpkgs/pkgs/development/libraries/jxrlib/default.nix
new file mode 100644
index 000000000000..517746aa9b53
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/jxrlib/default.nix
@@ -0,0 +1,46 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "jxrlib";
+  version = "1.1";
+
+  # Use the source from a fork on github because CodePlex does not
+  # deliver an easily downloadable tarball.
+  src = fetchFromGitHub {
+    owner = "4creators";
+    repo = pname;
+    rev = "f7521879862b9085318e814c6157490dd9dbbdb4";
+    sha256 = "0rk3hbh00nw0wgbfbqk1szrlfg3yq7w6ar16napww3nrlm9cj65w";
+  };
+
+  patches = [
+    (fetchpatch {
+      url = "https://salsa.debian.org/debian-phototools-team/jxrlib/-/raw/df96f9b9c1fbe9cdc97589c337f8a948bc81c4d0/debian/patches/usecmake.patch";
+      sha256 = "sha256-BpCToLgA5856PZk5mXlwAy3Oh9aYP/2wvu2DXDTqufM=";
+    })
+    (fetchpatch {
+      url = "https://salsa.debian.org/debian-phototools-team/jxrlib/-/raw/6c88037293aff8d5bc8a76ea32b36781c430ede3/debian/patches/bug803743.patch";
+      sha256 = "sha256-omIGa+ZrWjaH/IkBn4jgjufF/HEDKw69anVCX4hw+xQ=";
+    })
+    (fetchpatch {
+      url = "https://salsa.debian.org/debian-phototools-team/jxrlib/-/raw/b23d49062ec6a9b2739c9dade86be525a72fc807/debian/patches/pkg-config.patch";
+      sha256 = "sha256-ZACaXEi+rbKIFBHtSBheyFfqV2HYsKKrT+SmTShyUhg=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  strictDeps = true;
+
+  env = lib.optionalAttrs stdenv.cc.isClang {
+    NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
+  };
+
+  meta = with lib; {
+    description = "Implementation of the JPEG XR image codec standard";
+    homepage = "https://jxrlib.codeplex.com";
+    license = licenses.bsd2;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ romildo ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/kcolorpicker/default.nix b/nixpkgs/pkgs/development/libraries/kcolorpicker/default.nix
new file mode 100644
index 000000000000..4647d65882cd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kcolorpicker/default.nix
@@ -0,0 +1,24 @@
+{ lib, mkDerivation, fetchFromGitHub, cmake, qtbase }:
+
+mkDerivation rec {
+  pname = "kcolorpicker";
+  version = "0.2.0";
+
+  src = fetchFromGitHub {
+    owner = "ksnip";
+    repo = "kColorPicker";
+    rev = "v${version}";
+    sha256 = "sha256-ahmMj/yzQiRP9oJwDuhJGxe849kxNsoGFDZ2CGQNhKs=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ qtbase ];
+
+  meta = with lib; {
+    description = "Qt based Color Picker with popup menu";
+    homepage = "https://github.com/ksnip/kColorPicker";
+    license = licenses.lgpl3Plus;
+    maintainers = with maintainers; [ fliegendewurst ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/kcp/default.nix b/nixpkgs/pkgs/development/libraries/kcp/default.nix
new file mode 100644
index 000000000000..29bab0087989
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kcp/default.nix
@@ -0,0 +1,27 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "kcp";
+  version = "1.7";
+
+  src = fetchFromGitHub {
+    owner = "skywind3000";
+    repo = "kcp";
+    rev = version;
+    hash = "sha256-yW40x4T++4rB7hoabGN8qiSN7octyoUYEfE9oDlLxjU=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "A Fast and Reliable ARQ Protocol";
+    homepage = "https://github.com/skywind3000/kcp";
+    license = licenses.mit;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/kdb/default.nix b/nixpkgs/pkgs/development/libraries/kdb/default.nix
new file mode 100644
index 000000000000..f9aa5dc369c6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kdb/default.nix
@@ -0,0 +1,49 @@
+{ mkDerivation
+, lib
+, fetchurl
+, fetchpatch
+, extra-cmake-modules
+, qtbase
+, kcoreaddons
+, python3
+, sqlite
+, postgresql
+, libmysqlclient
+, qttools
+}:
+
+mkDerivation rec {
+  pname = "kdb";
+  version = "3.2.0";
+
+  src = fetchurl {
+    url = "mirror://kde/stable/${pname}/src/${pname}-${version}.tar.xz";
+    sha256 = "0s909x34a56n3xwhqz27irl2gbzidax0685w2kf34f0liny872cg";
+  };
+
+  patches = [
+    # fix build with newer QT versions
+    (fetchpatch {
+      url = "https://github.com/KDE/kdb/commit/b36d74f13a1421437a725fb74502c993c359392a.patch";
+      sha256 = "sha256-ENMZTUZ3yCKUhHPMUcDe1cMY2GLBz0G3ZvMRyj8Hfrw=";
+    })
+    # fix build with newer posgresql versions
+    (fetchpatch {
+      url = "https://github.com/KDE/kdb/commit/40cdaea4d7824cc1b0d26e6ad2dcb61fa2077911.patch";
+      sha256 = "sha256-cZpX6L/NZX3vztnh0s2+v4J7kBcKgUdecY53LRp8CwM=";
+    })
+  ];
+
+  nativeBuildInputs = [ extra-cmake-modules qttools ];
+
+  buildInputs = [ kcoreaddons python3 sqlite postgresql libmysqlclient ];
+
+  propagatedBuildInputs = [ qtbase ];
+
+  meta = with lib; {
+    description = "A database connectivity and creation framework for various database vendors";
+    license = licenses.lgpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ zraexy ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/kddockwidgets/default.nix b/nixpkgs/pkgs/development/libraries/kddockwidgets/default.nix
new file mode 100644
index 000000000000..29b7bf992775
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kddockwidgets/default.nix
@@ -0,0 +1,29 @@
+{ lib
+, mkDerivation
+, fetchFromGitHub
+, cmake
+, qtbase
+, qtx11extras
+}:
+
+mkDerivation rec {
+  pname = "KDDockWidgets";
+  version = "1.7.0";
+
+  src = fetchFromGitHub {
+    owner = "KDAB";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-k5Hn9kxq1+tH5kV/ZeD4xzQLDgcY4ACC+guP7YJD4C8=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ qtbase qtx11extras ];
+
+  meta = with lib; {
+    description = "KDAB's Dock Widget Framework for Qt";
+    homepage = "https://www.kdab.com/development-resources/qt-tools/kddockwidgets";
+    license = with licenses; [ gpl2Only gpl3Only ];
+    maintainers = with maintainers; [ _1000teslas ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/attica.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/attica.nix
new file mode 100644
index 000000000000..dbe4dd14b8f5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/attica.nix
@@ -0,0 +1,8 @@
+{ mkDerivation, extra-cmake-modules, qtbase }:
+
+mkDerivation {
+  pname = "attica";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ qtbase ];
+  outputs = [ "out" "dev" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/baloo.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/baloo.nix
new file mode 100644
index 000000000000..2a264d47c24c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/baloo.nix
@@ -0,0 +1,36 @@
+{ mkDerivation
+, lib
+, fetchpatch
+, extra-cmake-modules
+, kauth
+, kconfig
+, kcoreaddons
+, kcrash
+, kdbusaddons
+, kfilemetadata
+, ki18n
+, kidletime
+, kio
+, lmdb
+, qtbase
+, qtdeclarative
+, solid
+,
+}:
+
+mkDerivation {
+  pname = "baloo";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ kauth kconfig kcrash kdbusaddons ki18n kio kidletime lmdb qtdeclarative solid ];
+  outputs = [ "out" "dev" ];
+  propagatedBuildInputs = [ kcoreaddons kfilemetadata qtbase ];
+
+  # kde-baloo.service uses `ExecCondition=@KDE_INSTALL_FULL_BINDIR@/kde-systemd-start-condition ...`
+  # which comes from the "plasma-workspace" derivation, but KDE_INSTALL_* all point at the "baloo" one
+  # (`${lib.getBin pkgs.plasma-workspace}` would cause infinite recursion)
+  postUnpack = ''
+    substituteInPlace "$sourceRoot"/src/file/kde-baloo.service.in \
+      --replace @KDE_INSTALL_FULL_BINDIR@ /run/current-system/sw/bin
+  '';
+  meta.platforms = lib.platforms.linux ++ lib.platforms.freebsd;
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/bluez-qt.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/bluez-qt.nix
new file mode 100644
index 000000000000..4dad732641a6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/bluez-qt.nix
@@ -0,0 +1,16 @@
+{ mkDerivation, lib
+, extra-cmake-modules
+, qtbase, qtdeclarative
+}:
+
+mkDerivation {
+  pname = "bluez-qt";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ qtdeclarative ];
+  propagatedBuildInputs = [ qtbase ];
+  preConfigure = ''
+    substituteInPlace CMakeLists.txt \
+      --replace /lib/udev/rules.d "$bin/lib/udev/rules.d"
+  '';
+  meta.platforms = lib.platforms.linux;
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/breeze-icons.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/breeze-icons.nix
new file mode 100644
index 000000000000..7fd482ea0da0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/breeze-icons.nix
@@ -0,0 +1,16 @@
+{ mkDerivation, extra-cmake-modules, gtk3, qtsvg, hicolor-icon-theme }:
+
+mkDerivation {
+  pname = "breeze-icons";
+  nativeBuildInputs = [ extra-cmake-modules gtk3 ];
+  buildInputs = [ qtsvg ];
+  propagatedBuildInputs = [
+    hicolor-icon-theme
+  ];
+  dontDropIconThemeCache = true;
+  outputs = [ "out" ]; # only runtime outputs
+  postInstall = ''
+    gtk-update-icon-cache "''${out:?}/share/icons/breeze"
+    gtk-update-icon-cache "''${out:?}/share/icons/breeze-dark"
+  '';
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/default.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/default.nix
new file mode 100644
index 000000000000..cc87ec2afa57
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/default.nix
@@ -0,0 +1,191 @@
+/*
+
+# New packages
+
+READ THIS FIRST
+
+This module is for official packages in KDE Frameworks 5. All available packages
+are listed in `./srcs.nix`, although a few are not yet packaged in Nixpkgs (see
+below).
+
+IF YOUR PACKAGE IS NOT LISTED IN `./srcs.nix`, IT DOES NOT GO HERE.
+
+Many of the packages released upstream are not yet built in Nixpkgs due to lack
+of demand. To add a Nixpkgs build for an upstream package, copy one of the
+existing packages here and modify it as necessary.
+
+# Updates
+
+1. Update the URL in `./fetch.sh`.
+2. Run `./maintainers/scripts/fetch-kde-qt.sh pkgs/development/libraries/kde-frameworks`
+   from the top of the Nixpkgs tree.
+3. Use `nox-review wip` to check that everything builds.
+4. Commit the changes and open a pull request.
+
+*/
+
+{ libsForQt5, lib, fetchurl }:
+
+let
+  maintainers = with lib.maintainers; [ ttuegel nyanloutre ];
+  license = with lib.licenses; [
+    lgpl21Plus lgpl3Plus bsd2 mit gpl2Plus gpl3Plus fdl12Plus
+  ];
+
+  srcs = import ./srcs.nix {
+    inherit fetchurl;
+    mirror = "mirror://kde";
+  };
+
+  mkDerivation = libsForQt5.callPackage ({ stdenv, mkDerivation ? stdenv.mkDerivation }: mkDerivation) {};
+
+  packages = self: with self;
+    # SUPPORT
+    let
+
+      propagate = out:
+        let setupHook = { writeScript }:
+              writeScript "setup-hook" ''
+                if [ "''${hookName:-}" != postHook ]; then
+                    postHooks+=("source @dev@/nix-support/setup-hook")
+                else
+                    # Propagate $dev so that this setup hook is propagated
+                    # But only if there is a separate $dev output
+                    if [ "''${outputDev:?}" != out ]; then
+                        propagatedBuildInputs="''${propagatedBuildInputs-} @dev@"
+                    fi
+                fi
+              '';
+        in callPackage setupHook {};
+
+      propagateBin = propagate "bin";
+
+      callPackage = self.newScope {
+
+        inherit propagate propagateBin;
+
+        mkDerivation = args:
+          let
+
+            inherit (args) pname;
+            inherit (srcs.${pname}) src version;
+
+            outputs = args.outputs or [ "bin" "dev" "out" ];
+            hasSeparateDev = lib.elem "dev" outputs;
+
+            defaultSetupHook = if hasSeparateDev then propagateBin else null;
+            setupHook = args.setupHook or defaultSetupHook;
+
+            meta =
+              let meta = args.meta or {}; in
+              meta // {
+                homepage = meta.homepage or "https://kde.org";
+                license = meta.license or license;
+                maintainers = (meta.maintainers or []) ++ maintainers;
+                platforms = meta.platforms or lib.platforms.all;
+              };
+
+          in mkDerivation (args // {
+            inherit pname meta outputs setupHook src version;
+          });
+
+      };
+
+    in {
+      extra-cmake-modules = callPackage ./extra-cmake-modules {};
+
+    # TIER 1
+      attica = callPackage ./attica.nix {};
+      bluez-qt = callPackage ./bluez-qt.nix {};
+      breeze-icons = callPackage ./breeze-icons.nix {};
+      kapidox = callPackage ./kapidox.nix {};
+      karchive = callPackage ./karchive.nix {};
+      kcalendarcore = callPackage ./kcalendarcore.nix {};
+      kcodecs = callPackage ./kcodecs.nix {};
+      kconfig = callPackage ./kconfig.nix {};
+      kcoreaddons = callPackage ./kcoreaddons.nix {};
+      kdbusaddons = callPackage ./kdbusaddons.nix {};
+      kdnssd = callPackage ./kdnssd.nix {};
+      kguiaddons = callPackage ./kguiaddons.nix {};
+      kholidays = callPackage ./kholidays.nix {};
+      ki18n = callPackage ./ki18n.nix {};
+      kidletime = callPackage ./kidletime.nix {};
+      kirigami2 = callPackage ./kirigami2.nix {};
+      kitemmodels = callPackage ./kitemmodels.nix {};
+      kitemviews = callPackage ./kitemviews.nix {};
+      kplotting = callPackage ./kplotting.nix {};
+      kquickcharts = callPackage ./kquickcharts.nix {};
+      kwayland = callPackage ./kwayland.nix {};
+      kwidgetsaddons = callPackage ./kwidgetsaddons.nix {};
+      kwindowsystem = callPackage ./kwindowsystem {};
+      modemmanager-qt = callPackage ./modemmanager-qt.nix {};
+      networkmanager-qt = callPackage ./networkmanager-qt.nix {};
+      oxygen-icons = callPackage ./oxygen-icons.nix {};
+      oxygen-icons5 = oxygen-icons;
+      prison = callPackage ./prison.nix {};
+      qqc2-desktop-style = callPackage ./qqc2-desktop-style.nix {};
+      solid = callPackage ./solid {};
+      sonnet = callPackage ./sonnet.nix {};
+      syntax-highlighting = callPackage ./syntax-highlighting.nix {};
+      threadweaver = callPackage ./threadweaver.nix {};
+
+    # TIER 2
+      kactivities = callPackage ./kactivities.nix {};
+      kauth = callPackage ./kauth {};
+      kcompletion = callPackage ./kcompletion.nix {};
+      kcontacts = callPackage ./kcontacts.nix {};
+      kcrash = callPackage ./kcrash.nix {};
+      kdoctools = callPackage ./kdoctools {};
+      kfilemetadata = callPackage ./kfilemetadata {};
+      kimageformats = callPackage ./kimageformats.nix {};
+      kjobwidgets = callPackage ./kjobwidgets.nix {};
+      knotifications = callPackage ./knotifications.nix {};
+      kpackage = callPackage ./kpackage {};
+      kpeople = callPackage ./kpeople.nix {};
+      kpty = callPackage ./kpty.nix {};
+      kunitconversion = callPackage ./kunitconversion.nix {};
+      syndication = callPackage ./syndication.nix {};
+
+    # TIER 3
+      baloo = callPackage ./baloo.nix {};
+      kactivities-stats = callPackage ./kactivities-stats.nix {};
+      kbookmarks = callPackage ./kbookmarks.nix {};
+      kcmutils = callPackage ./kcmutils.nix {};
+      kconfigwidgets = callPackage ./kconfigwidgets.nix {};
+      kdav = callPackage ./kdav.nix {};
+      kdeclarative = callPackage ./kdeclarative.nix {};
+      kded = callPackage ./kded.nix {};
+      kdesu = callPackage ./kdesu {};
+      kemoticons = callPackage ./kemoticons.nix {};
+      kglobalaccel = callPackage ./kglobalaccel.nix {};
+      kiconthemes = callPackage ./kiconthemes {};
+      kinit = callPackage ./kinit {};
+      kio = callPackage ./kio {};
+      knewstuff = callPackage ./knewstuff {};
+      knotifyconfig = callPackage ./knotifyconfig.nix {};
+      kparts = callPackage ./kparts.nix {};
+      krunner = callPackage ./krunner.nix {};
+      kservice = callPackage ./kservice {};
+      ktexteditor = callPackage ./ktexteditor.nix {};
+      ktextwidgets = callPackage ./ktextwidgets.nix {};
+      kwallet = callPackage ./kwallet.nix {};
+      kxmlgui = callPackage ./kxmlgui.nix {};
+      plasma-framework = callPackage ./plasma-framework.nix {};
+      kpurpose = callPackage ./purpose.nix {};
+
+    # TIER 4
+      frameworkintegration = callPackage ./frameworkintegration.nix {};
+
+    # PORTING AIDS
+      kdelibs4support = callPackage ./kdelibs4support {};
+      kdesignerplugin = callPackage ./kdesignerplugin.nix {};
+      khtml = callPackage ./khtml.nix {};
+      kjs = callPackage ./kjs.nix {};
+      kjsembed = callPackage ./kjsembed.nix {};
+      kmediaplayer = callPackage ./kmediaplayer.nix {};
+      kross = callPackage ./kross.nix {};
+      kxmlrpcclient = callPackage ./kxmlrpcclient.nix {};
+
+    };
+
+in lib.makeScope libsForQt5.newScope packages
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/extra-cmake-modules/default.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/extra-cmake-modules/default.nix
new file mode 100644
index 000000000000..dcd7a76acb33
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/extra-cmake-modules/default.nix
@@ -0,0 +1,25 @@
+{ mkDerivation, lib, fetchpatch, cmake, pkg-config }:
+
+mkDerivation {
+  pname = "extra-cmake-modules";
+
+  patches = [
+    # https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/268
+    (fetchpatch {
+      url = "https://invent.kde.org/frameworks/extra-cmake-modules/-/commit/5862a6f5b5cd7ed5a7ce2af01e44747c36318220.patch";
+      sha256 = "10y36fc3hnpmcsmjgfxn1rp4chj5yrhgghj7m8gbmcai1q5jr0xj";
+    })
+  ];
+
+  outputs = [ "out" ];  # this package has no runtime components
+
+  propagatedBuildInputs = [ cmake pkg-config ];
+
+  setupHook = ./setup-hook.sh;
+
+  meta = with lib; {
+    platforms = platforms.linux ++ platforms.darwin;
+    homepage = "https://invent.kde.org/frameworks/extra-cmake-modules";
+    license = licenses.bsd2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/extra-cmake-modules/setup-hook.sh b/nixpkgs/pkgs/development/libraries/kde-frameworks/extra-cmake-modules/setup-hook.sh
new file mode 100644
index 000000000000..8d86ab1d54ad
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/extra-cmake-modules/setup-hook.sh
@@ -0,0 +1,117 @@
+ecmEnvHook() {
+    addToSearchPath XDG_DATA_DIRS "$1/share"
+    addToSearchPath XDG_CONFIG_DIRS "$1/etc/xdg"
+}
+addEnvHooks "$targetOffset" ecmEnvHook
+
+ecmPostHook() {
+    # Because we need to use absolute paths here, we must set *all* the paths.
+    cmakeFlags+=" -DKDE_INSTALL_EXECROOTDIR=${!outputBin}"
+    cmakeFlags+=" -DKDE_INSTALL_BINDIR=${!outputBin}/bin"
+    cmakeFlags+=" -DKDE_INSTALL_SBINDIR=${!outputBin}/sbin"
+    cmakeFlags+=" -DKDE_INSTALL_LIBDIR=${!outputLib}/lib"
+    cmakeFlags+=" -DKDE_INSTALL_LIBEXECDIR=${!outputLib}/libexec"
+    cmakeFlags+=" -DKDE_INSTALL_CMAKEPACKAGEDIR=${!outputDev}/lib/cmake"
+    cmakeFlags+=" -DKDE_INSTALL_INCLUDEDIR=${!outputInclude}/include"
+    cmakeFlags+=" -DKDE_INSTALL_LOCALSTATEDIR=/var"
+    cmakeFlags+=" -DKDE_INSTALL_DATAROOTDIR=${!outputBin}/share"
+    cmakeFlags+=" -DKDE_INSTALL_DATADIR=${!outputBin}/share"
+    cmakeFlags+=" -DKDE_INSTALL_DOCBUNDLEDIR=${!outputBin}/share/doc/HTML"
+    cmakeFlags+=" -DKDE_INSTALL_KCFGDIR=${!outputBin}/share/config.kcfg"
+    cmakeFlags+=" -DKDE_INSTALL_KCONFUPDATEDIR=${!outputBin}/share/kconf_update"
+    cmakeFlags+=" -DKDE_INSTALL_KSERVICES5DIR=${!outputBin}/share/kservices5"
+    cmakeFlags+=" -DKDE_INSTALL_KSERVICETYPES5DIR=${!outputBin}/share/kservicetypes5"
+    cmakeFlags+=" -DKDE_INSTALL_KXMLGUI5DIR=${!outputBin}/share/kxmlgui5"
+    cmakeFlags+=" -DKDE_INSTALL_KNOTIFY5RCDIR=${!outputBin}/share/knotifications5"
+    cmakeFlags+=" -DKDE_INSTALL_ICONDIR=${!outputBin}/share/icons"
+    cmakeFlags+=" -DKDE_INSTALL_LOCALEDIR=${!outputLib}/share/locale"
+    cmakeFlags+=" -DKDE_INSTALL_SOUNDDIR=${!outputBin}/share/sounds"
+    cmakeFlags+=" -DKDE_INSTALL_TEMPLATEDIR=${!outputBin}/share/templates"
+    cmakeFlags+=" -DKDE_INSTALL_WALLPAPERDIR=${!outputBin}/share/wallpapers"
+    cmakeFlags+=" -DKDE_INSTALL_APPDIR=${!outputBin}/share/applications"
+    cmakeFlags+=" -DKDE_INSTALL_DESKTOPDIR=${!outputBin}/share/desktop-directories"
+    cmakeFlags+=" -DKDE_INSTALL_MIMEDIR=${!outputBin}/share/mime/packages"
+    cmakeFlags+=" -DKDE_INSTALL_METAINFODIR=${!outputBin}/share/appdata"
+    cmakeFlags+=" -DKDE_INSTALL_MANDIR=${!outputBin}/share/man"
+    cmakeFlags+=" -DKDE_INSTALL_INFODIR=${!outputBin}/share/info"
+    cmakeFlags+=" -DKDE_INSTALL_DBUSDIR=${!outputBin}/share/dbus-1"
+    cmakeFlags+=" -DKDE_INSTALL_DBUSINTERFACEDIR=${!outputBin}/share/dbus-1/interfaces"
+    cmakeFlags+=" -DKDE_INSTALL_DBUSSERVICEDIR=${!outputBin}/share/dbus-1/services"
+    cmakeFlags+=" -DKDE_INSTALL_DBUSSYSTEMSERVICEDIR=${!outputBin}/share/dbus-1/system-services"
+    cmakeFlags+=" -DKDE_INSTALL_SYSCONFDIR=${!outputBin}/etc"
+    cmakeFlags+=" -DKDE_INSTALL_CONFDIR=${!outputBin}/etc/xdg"
+    cmakeFlags+=" -DKDE_INSTALL_AUTOSTARTDIR=${!outputBin}/etc/xdg/autostart"
+
+    if [ "$(uname)" = "Darwin" ]; then
+        cmakeFlags+=" -DKDE_INSTALL_BUNDLEDIR=${!outputBin}/Applications/KDE"
+    fi
+
+    if [ -n "${qtPluginPrefix-}" ]; then
+        cmakeFlags+=" -DKDE_INSTALL_QTPLUGINDIR=${!outputBin}/$qtPluginPrefix"
+        cmakeFlags+=" -DKDE_INSTALL_PLUGINDIR=${!outputBin}/$qtPluginPrefix"
+    fi
+
+    if [ -n "${qtQmlPrefix-}" ]; then
+        cmakeFlags+=" -DKDE_INSTALL_QMLDIR=${!outputBin}/$qtQmlPrefix"
+    fi
+}
+postHooks+=(ecmPostHook)
+
+xdgDataSubdirs=( \
+    "config.kcfg" "kconf_update" "kservices5" "kservicetypes5" \
+    "kxmlgui5" "knotifications5" "icons" "locale" "sounds" "templates" \
+    "wallpapers" "applications" "desktop-directories" "mime" "appdata" "dbus-1" \
+)
+
+# ecmHostPathsSeen is an associative array of the paths that have already been
+# seen by ecmHostPathHook.
+declare -gA ecmHostPathsSeen
+
+ecmHostPathIsNotSeen() {
+    if [[ -n "${ecmHostPathsSeen["$1"]:-}" ]]; then
+        # The path has been seen before.
+        return 1
+    else
+        # The path has not been seen before.
+        # Now it is seen, so record it.
+        ecmHostPathsSeen["$1"]=1
+        return 0
+    fi
+}
+
+ecmHostPathHook() {
+    ecmHostPathIsNotSeen "$1" || return 0
+
+    local xdgConfigDir="$1/etc/xdg"
+    if [ -d "$xdgConfigDir" ]
+    then
+        qtWrapperArgs+=(--prefix XDG_CONFIG_DIRS : "$xdgConfigDir")
+    fi
+
+    for xdgDataSubdir in "${xdgDataSubdirs[@]}"
+    do
+        if [ -d "$1/share/$xdgDataSubdir" ]
+        then
+            qtWrapperArgs+=(--prefix XDG_DATA_DIRS : "$1/share")
+            break
+        fi
+    done
+
+    local manDir="$1/man"
+    if [ -d "$manDir" ]
+    then
+        qtWrapperArgs+=(--prefix MANPATH : "$manDir")
+    fi
+
+    local infoDir="$1/info"
+    if [ -d "$infoDir" ]
+    then
+        qtWrapperArgs+=(--prefix INFOPATH : "$infoDir")
+    fi
+
+    if [ -d "$1/dbus-1" ]
+    then
+        propagatedUserEnvPkgs+=" $1"
+    fi
+}
+addEnvHooks "$targetOffset" ecmHostPathHook
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/fetch.sh b/nixpkgs/pkgs/development/libraries/kde-frameworks/fetch.sh
new file mode 100644
index 000000000000..a6797786ee53
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/fetch.sh
@@ -0,0 +1 @@
+WGET_ARGS=( https://download.kde.org/stable/frameworks/5.114/ -A '*.tar.xz' )
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/frameworkintegration.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/frameworkintegration.nix
new file mode 100644
index 000000000000..6cb700c77744
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/frameworkintegration.nix
@@ -0,0 +1,16 @@
+{
+  mkDerivation,
+  extra-cmake-modules,
+  kbookmarks, kcompletion, kconfig, kconfigwidgets, ki18n, kiconthemes, kio,
+  knewstuff, knotifications, kpackage, kwidgetsaddons, libXcursor, qtx11extras
+}:
+
+mkDerivation {
+  pname = "frameworkintegration";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [
+    kbookmarks kcompletion kconfig ki18n kio knewstuff knotifications kpackage
+    kwidgetsaddons libXcursor qtx11extras
+  ];
+  propagatedBuildInputs = [ kconfigwidgets kiconthemes ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kactivities-stats.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kactivities-stats.nix
new file mode 100644
index 000000000000..cb838e067742
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kactivities-stats.nix
@@ -0,0 +1,14 @@
+{
+  mkDerivation, lib,
+  extra-cmake-modules,
+  boost, kactivities, kconfig, qtbase,
+}:
+
+mkDerivation {
+  pname = "kactivities-stats";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ boost kactivities kconfig ];
+  propagatedBuildInputs = [ qtbase ];
+  outputs = [ "out" "dev" ];
+  meta.platforms = lib.platforms.linux ++ lib.platforms.freebsd;
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kactivities.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kactivities.nix
new file mode 100644
index 000000000000..f2f5d09cc8e6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kactivities.nix
@@ -0,0 +1,14 @@
+{
+  mkDerivation,
+  extra-cmake-modules,
+  boost, kconfig, kcoreaddons, kio, kwindowsystem, qtbase, qtdeclarative,
+}:
+
+mkDerivation {
+  pname = "kactivities";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [
+    boost kconfig kcoreaddons kio kwindowsystem qtdeclarative
+  ];
+  propagatedBuildInputs = [ qtbase ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kapidox.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kapidox.nix
new file mode 100644
index 000000000000..c7dde83bf611
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kapidox.nix
@@ -0,0 +1,26 @@
+{ mkDerivation, python3, qtbase }:
+
+mkDerivation {
+  pname = "kapidox";
+  nativeBuildInputs = [ python3.pkgs.setuptools qtbase ];
+
+  buildInputs = with python3.pkgs; [ jinja2 pyyaml requests ];
+
+  postPatch = ''
+    sed -i -e 's|"doxy\w\+", ||g' setup.py
+  '';
+
+  buildPhase = ''
+    runHook preBuild
+    ${python3.interpreter} setup.py build
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    ${python3.interpreter} setup.py install --prefix="$out"
+    runHook postInstall
+  '';
+
+  outputs = [ "out" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/karchive.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/karchive.nix
new file mode 100644
index 000000000000..514b63f44b55
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/karchive.nix
@@ -0,0 +1,13 @@
+{
+  mkDerivation,
+  extra-cmake-modules,
+  bzip2, xz, qtbase, qttools, zlib, zstd
+}:
+
+mkDerivation {
+  pname = "karchive";
+  nativeBuildInputs = [ extra-cmake-modules qttools ];
+  buildInputs = [ bzip2 xz zlib zstd ];
+  propagatedBuildInputs = [ qtbase ];
+  outputs = [ "out" "dev" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kauth/cmake-install-paths.patch b/nixpkgs/pkgs/development/libraries/kde-frameworks/kauth/cmake-install-paths.patch
new file mode 100644
index 000000000000..c66f5ecd008f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kauth/cmake-install-paths.patch
@@ -0,0 +1,17 @@
+Index: kauth-5.18.0/KF5AuthConfig.cmake.in
+===================================================================
+--- kauth-5.18.0.orig/KF5AuthConfig.cmake.in
++++ kauth-5.18.0/KF5AuthConfig.cmake.in
+@@ -4,9 +4,9 @@ set(KAUTH_STUB_FILES_DIR "@PACKAGE_KDE_I
+ 
+ set(KAUTH_BACKEND_NAME "@KAUTH_BACKEND_NAME@")
+ set(KAUTH_HELPER_BACKEND_NAME "@KAUTH_HELPER_BACKEND_NAME@")
+-set(KAUTH_POLICY_FILES_INSTALL_DIR "@KAUTH_POLICY_FILES_INSTALL_DIR@")
+-set(KAUTH_HELPER_INSTALL_DIR "@KAUTH_HELPER_INSTALL_DIR@")
+-set(KAUTH_HELPER_INSTALL_ABSOLUTE_DIR "@KAUTH_HELPER_INSTALL_ABSOLUTE_DIR@")
++set(KAUTH_POLICY_FILES_INSTALL_DIR "${KDE_INSTALL_DATADIR}/polkit-1/actions")
++set(KAUTH_HELPER_INSTALL_DIR "${KDE_INSTALL_LIBEXECDIR}")
++set(KAUTH_HELPER_INSTALL_ABSOLUTE_DIR "${KDE_INSTALL_LIBEXECDIR}")
+ 
+ find_dependency(KF5CoreAddons "@KF5_DEP_VERSION@")
+ 
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kauth/default.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kauth/default.nix
new file mode 100644
index 000000000000..0ad7cfbbb7e1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kauth/default.nix
@@ -0,0 +1,19 @@
+{
+  lib, stdenv, mkDerivation, propagate,
+  extra-cmake-modules, kcoreaddons, qttools,
+  enablePolkit ? stdenv.isLinux, polkit-qt
+}:
+
+mkDerivation {
+  pname = "kauth";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = lib.optional enablePolkit polkit-qt ++ [ qttools ];
+  propagatedBuildInputs = [ kcoreaddons ];
+  patches = [
+    ./cmake-install-paths.patch
+  ];
+  # library stores reference to plugin path,
+  # separating $out from $bin would create a reference cycle
+  outputs = [ "out" "dev" ];
+  setupHook = propagate "out";
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kbookmarks.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kbookmarks.nix
new file mode 100644
index 000000000000..1c45a4acb097
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kbookmarks.nix
@@ -0,0 +1,16 @@
+{
+  mkDerivation,
+  extra-cmake-modules, qttools,
+  kcodecs, kconfig, kconfigwidgets, kcoreaddons, kiconthemes, kwidgetsaddons,
+  kxmlgui, qtbase,
+}:
+
+mkDerivation {
+  pname = "kbookmarks";
+  nativeBuildInputs = [ extra-cmake-modules qttools ];
+  buildInputs = [
+    kcodecs kconfig kconfigwidgets kcoreaddons kiconthemes kxmlgui
+  ];
+  propagatedBuildInputs = [ kwidgetsaddons qtbase ];
+  outputs = [ "out" "dev" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kcalendarcore.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kcalendarcore.nix
new file mode 100644
index 000000000000..3f02765af8ea
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kcalendarcore.nix
@@ -0,0 +1,13 @@
+{
+  mkDerivation,
+  extra-cmake-modules,
+  libical,
+  qtbase
+}:
+
+mkDerivation {
+  pname = "kcalendarcore";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  propagatedBuildInputs = [ libical ];
+  outputs = [ "out" "dev" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kcmutils.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kcmutils.nix
new file mode 100644
index 000000000000..a275e7175713
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kcmutils.nix
@@ -0,0 +1,16 @@
+{
+  mkDerivation,
+  extra-cmake-modules,
+  kconfigwidgets, kcoreaddons, kdeclarative, ki18n, kiconthemes, kitemviews,
+  kpackage, kservice, kxmlgui, qtdeclarative,
+}:
+
+mkDerivation {
+  pname = "kcmutils";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [
+    kcoreaddons kdeclarative ki18n kiconthemes kitemviews kpackage kxmlgui
+    qtdeclarative
+  ];
+  propagatedBuildInputs = [ kconfigwidgets kservice ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kcodecs.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kcodecs.nix
new file mode 100644
index 000000000000..69a9e812494e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kcodecs.nix
@@ -0,0 +1,9 @@
+{ mkDerivation, extra-cmake-modules, qtbase, qttools, gperf }:
+
+mkDerivation {
+  pname = "kcodecs";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ qttools gperf ];
+  propagatedBuildInputs = [ qtbase ];
+  outputs = [ "out" "dev" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kcompletion.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kcompletion.nix
new file mode 100644
index 000000000000..28b4715f98f9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kcompletion.nix
@@ -0,0 +1,13 @@
+{
+  mkDerivation,
+  extra-cmake-modules,
+  kconfig, kwidgetsaddons, qtbase, qttools
+}:
+
+mkDerivation {
+  pname = "kcompletion";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ kconfig kwidgetsaddons qttools ];
+  propagatedBuildInputs = [ qtbase ];
+  outputs = [ "out" "dev" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kconfig.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kconfig.nix
new file mode 100644
index 000000000000..76d9a85e649c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kconfig.nix
@@ -0,0 +1,8 @@
+{ mkDerivation, extra-cmake-modules, qtbase, qttools }:
+
+mkDerivation {
+  pname = "kconfig";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ qttools ];
+  propagatedBuildInputs = [ qtbase ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kconfigwidgets.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kconfigwidgets.nix
new file mode 100644
index 000000000000..4b20daf052a0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kconfigwidgets.nix
@@ -0,0 +1,16 @@
+{
+  mkDerivation, extra-cmake-modules,
+  kauth, kcodecs, kconfig, kdoctools, kguiaddons, ki18n, kwidgetsaddons, qttools, qtbase,
+}:
+
+mkDerivation {
+  pname = "kconfigwidgets";
+  nativeBuildInputs = [ extra-cmake-modules kdoctools ];
+  buildInputs = [ kguiaddons ki18n qtbase qttools ];
+  propagatedBuildInputs = [ kauth kcodecs kconfig kwidgetsaddons ];
+  outputs = [ "out" "dev" ];
+  outputBin = "dev";
+  postInstall = ''
+    moveToOutput ''${qtPluginPrefix:?}/designer/kconfigwidgets5widgets.so "$out"
+  '';
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kcontacts.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kcontacts.nix
new file mode 100644
index 000000000000..0d26d064dd2b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kcontacts.nix
@@ -0,0 +1,18 @@
+{
+  mkDerivation, lib,
+  extra-cmake-modules, isocodes,
+  kcoreaddons, kconfig, kcodecs, ki18n, qtbase,
+}:
+
+mkDerivation {
+  pname = "kcontacts";
+  meta = {
+    license = [ lib.licenses.lgpl21 ];
+  };
+  propagatedBuildInputs = [
+    isocodes
+  ];
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ kcoreaddons kconfig kcodecs ki18n qtbase ];
+  outputs = [ "out" "dev" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kcoreaddons.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kcoreaddons.nix
new file mode 100644
index 000000000000..f790d802c0ca
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kcoreaddons.nix
@@ -0,0 +1,12 @@
+{
+  mkDerivation,
+  extra-cmake-modules,
+  qtbase, qttools, shared-mime-info
+}:
+
+mkDerivation {
+  pname = "kcoreaddons";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ qttools shared-mime-info ];
+  propagatedBuildInputs = [ qtbase ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kcrash.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kcrash.nix
new file mode 100644
index 000000000000..4658ab5c6dae
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kcrash.nix
@@ -0,0 +1,13 @@
+{
+  mkDerivation,
+  extra-cmake-modules,
+  kcoreaddons, kwindowsystem, qtbase, qtx11extras,
+}:
+
+mkDerivation {
+  pname = "kcrash";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ kcoreaddons kwindowsystem qtx11extras ];
+  propagatedBuildInputs = [ qtbase ];
+  outputs = [ "out" "dev" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kdav.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kdav.nix
new file mode 100644
index 000000000000..3149c2206625
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kdav.nix
@@ -0,0 +1,15 @@
+{
+  mkDerivation, lib,
+  extra-cmake-modules, kdoctools,
+  kcoreaddons, kio, qtxmlpatterns,
+}:
+
+mkDerivation {
+  pname = "kdav";
+  meta = {
+    license = with lib.licenses; [ gpl2Plus lgpl21Plus fdl12Plus ];
+  };
+  nativeBuildInputs = [ extra-cmake-modules kdoctools ];
+  buildInputs = [ kcoreaddons kio qtxmlpatterns ];
+  outputs = [ "out" "dev" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kdbusaddons.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kdbusaddons.nix
new file mode 100644
index 000000000000..b123129cf8d1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kdbusaddons.nix
@@ -0,0 +1,12 @@
+{
+  mkDerivation,
+  extra-cmake-modules,
+  qtbase, qttools, qtx11extras
+}:
+
+mkDerivation {
+  pname = "kdbusaddons";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ qttools qtx11extras ];
+  propagatedBuildInputs = [ qtbase ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kdeclarative.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kdeclarative.nix
new file mode 100644
index 000000000000..08f7cb5d3785
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kdeclarative.nix
@@ -0,0 +1,15 @@
+{
+  mkDerivation, extra-cmake-modules,
+  libepoxy, kconfig, kglobalaccel, kguiaddons, ki18n, kiconthemes, kio, kpackage,
+  kwidgetsaddons, kwindowsystem, qtdeclarative
+}:
+
+mkDerivation {
+  pname = "kdeclarative";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [
+    libepoxy kglobalaccel kguiaddons ki18n kiconthemes kio kwidgetsaddons
+    kwindowsystem
+  ];
+  propagatedBuildInputs = [ kconfig kpackage qtdeclarative ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kded.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kded.nix
new file mode 100644
index 000000000000..02364ba72f36
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kded.nix
@@ -0,0 +1,22 @@
+{
+  mkDerivation, lib, propagate, wrapGAppsHook,
+  extra-cmake-modules, kdoctools,
+  gsettings-desktop-schemas, kconfig, kcoreaddons, kcrash, kdbusaddons,
+  kservice, qtbase,
+}:
+
+mkDerivation {
+  pname = "kded";
+  nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook ];
+  buildInputs = [
+    gsettings-desktop-schemas kconfig kcoreaddons kcrash kdbusaddons
+    kservice qtbase
+  ];
+  outputs = [ "out" "dev" ];
+  setupHook = propagate "out";
+  dontWrapGApps = true;
+  preFixup = ''
+    qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
+  '';
+  meta.platforms = lib.platforms.linux ++ lib.platforms.freebsd;
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kdelibs4support/default.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kdelibs4support/default.nix
new file mode 100644
index 000000000000..1e7b30738752
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kdelibs4support/default.nix
@@ -0,0 +1,33 @@
+{
+  mkDerivation,
+  docbook_xml_dtd_45, extra-cmake-modules, kdoctools,
+  kauth, karchive, kcompletion, kconfig, kconfigwidgets, kcoreaddons, kcrash,
+  kdbusaddons, kded, kdesignerplugin, kemoticons, kglobalaccel, kguiaddons,
+  ki18n, kiconthemes, kio, kitemmodels, kinit, knotifications, kparts, kservice,
+  ktextwidgets, kunitconversion, kwidgetsaddons, kwindowsystem, kxmlgui,
+  networkmanager, qtbase, qtsvg, qttools, qtx11extras, xorg
+}:
+
+mkDerivation {
+  pname = "kdelibs4support";
+  patches = [
+    ./nix-kde-include-dir.patch
+  ];
+  setupHook = ./setup-hook.sh;
+  nativeBuildInputs = [ extra-cmake-modules qttools ];
+  propagatedNativeBuildInputs = [ kdoctools ];
+  buildInputs = [
+    kcompletion kconfig kded kglobalaccel ki18n kio kservice kwidgetsaddons
+    kxmlgui networkmanager qtsvg qtx11extras xorg.libSM
+  ];
+  propagatedBuildInputs = [
+    kauth karchive kconfigwidgets kcoreaddons kcrash kdbusaddons kdesignerplugin
+    kemoticons kguiaddons kiconthemes kitemmodels kinit knotifications kparts
+    ktextwidgets kunitconversion kwindowsystem qtbase
+  ];
+  cmakeFlags = [
+    "-DDocBookXML4_DTD_DIR=${docbook_xml_dtd_45}/xml/dtd/docbook"
+    "-DDocBookXML4_DTD_VERSION=4.5"
+  ];
+  outputs = [ "out" "dev" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kdelibs4support/nix-kde-include-dir.patch b/nixpkgs/pkgs/development/libraries/kde-frameworks/kdelibs4support/nix-kde-include-dir.patch
new file mode 100644
index 000000000000..eabb70254483
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kdelibs4support/nix-kde-include-dir.patch
@@ -0,0 +1,13 @@
+Index: kdelibs4support-5.18.0/src/kdecore/kstandarddirs.cpp
+===================================================================
+--- kdelibs4support-5.18.0.orig/src/kdecore/kstandarddirs.cpp
++++ kdelibs4support-5.18.0/src/kdecore/kstandarddirs.cpp
+@@ -292,7 +292,7 @@ static QString relativeInstallPath(const
+             return QFile::decodeName(ICON_INSTALL_DIR "/");
+         }
+         if (strcmp("include", type) == 0) {
+-            return QFile::decodeName(INCLUDE_INSTALL_DIR "/");
++            return QFile::decodeName(qgetenv("NIX_KDE_INCLUDE_DIR"));
+         }
+         break;
+     case 'l':
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kdelibs4support/setup-hook.sh b/nixpkgs/pkgs/development/libraries/kde-frameworks/kdelibs4support/setup-hook.sh
new file mode 100644
index 000000000000..21ac2e83b5da
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kdelibs4support/setup-hook.sh
@@ -0,0 +1 @@
+export NIX_KDE_INCLUDE_DIR="@dev@/include/"  # trailing slash is required!
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kdesignerplugin.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kdesignerplugin.nix
new file mode 100644
index 000000000000..6244b82397a2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kdesignerplugin.nix
@@ -0,0 +1,16 @@
+{
+  mkDerivation,
+  extra-cmake-modules, kdoctools,
+  kcompletion, kconfig, kconfigwidgets, kcoreaddons, kiconthemes, kio,
+  kitemviews, kplotting, ktextwidgets, kwidgetsaddons, kxmlgui, qttools, sonnet,
+}:
+
+mkDerivation {
+  pname = "kdesignerplugin";
+  nativeBuildInputs = [ extra-cmake-modules kdoctools ];
+  buildInputs = [
+    kcompletion kconfig kconfigwidgets kcoreaddons kiconthemes kio kitemviews
+    kplotting ktextwidgets kwidgetsaddons kxmlgui sonnet
+  ];
+  propagatedBuildInputs = [ qttools ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kdesu/default.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kdesu/default.nix
new file mode 100644
index 000000000000..b5aed8236fd3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kdesu/default.nix
@@ -0,0 +1,17 @@
+{
+  mkDerivation, lib,
+  extra-cmake-modules,
+  kcoreaddons, ki18n, kpty, kservice, qtbase,
+  useSudo ? false
+}:
+
+mkDerivation {
+  pname = "kdesu";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ kcoreaddons ki18n kpty kservice qtbase ];
+  propagatedBuildInputs = [ kpty ];
+  outputs = [ "out" "dev" ];
+  patches = [ ./kdesu-search-for-wrapped-daemon-first.patch ];
+  cmakeFlags = lib.optionals useSudo [ "-DKDESU_USE_SUDO_DEFAULT=On" ];
+  meta.platforms = lib.platforms.linux ++ lib.platforms.freebsd;
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kdesu/kdesu-search-for-wrapped-daemon-first.patch b/nixpkgs/pkgs/development/libraries/kde-frameworks/kdesu/kdesu-search-for-wrapped-daemon-first.patch
new file mode 100644
index 000000000000..1379707f02fe
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kdesu/kdesu-search-for-wrapped-daemon-first.patch
@@ -0,0 +1,38 @@
+From 01af4d2a098e5819c09bca37568941dcd4b89d0b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= <malaquias@gmail.com>
+Date: Thu, 16 Jul 2020 13:21:42 -0300
+Subject: [PATCH] Search for the daemon first in /run/wrappers/bin
+
+If looking first in libexec, the eventually wrapped one in
+/run/wrappers/bin can not be found.
+---
+ src/client.cpp | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/src/client.cpp b/src/client.cpp
+index 44fbacd..6b5abf5 100644
+--- a/src/client.cpp
++++ b/src/client.cpp
+@@ -384,11 +384,14 @@ int KDEsuClient::stopServer()
+ 
+ static QString findDaemon()
+ {
+-    QString daemon = QFile::decodeName(KDE_INSTALL_FULL_LIBEXECDIR_KF "/kdesud");
+-    if (!QFile::exists(daemon)) { // if not in libexec, find it in PATH
+-        daemon = QStandardPaths::findExecutable(QStringLiteral("kdesud"));
+-        if (daemon.isEmpty()) {
+-            qCWarning(KSU_LOG) << "kdesud daemon not found.";
++    QString daemon = QFile::decodeName("/run/wrappers/bin/kdesud");
++    if (!QFile::exists(daemon)) { // if not in wrappers
++        daemon = QFile::decodeName(KDE_INSTALL_FULL_LIBEXECDIR_KF "/kdesud");
++        if (!QFile::exists(daemon)) { // if not in libexec, find it in PATH
++            daemon = QStandardPaths::findExecutable(QStringLiteral("kdesud"));
++            if (daemon.isEmpty()) {
++                qCWarning(KSU_LOG) << "kdesud daemon not found.";
++            }
+         }
+     }
+     return daemon;
+-- 
+2.27.0
+
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kdnssd.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kdnssd.nix
new file mode 100644
index 000000000000..545057e7ef1f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kdnssd.nix
@@ -0,0 +1,13 @@
+{
+  mkDerivation,
+  extra-cmake-modules,
+  avahi, qtbase, qttools,
+}:
+
+mkDerivation {
+  pname = "kdnssd";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ avahi qttools ];
+  propagatedBuildInputs = [ qtbase ];
+  outputs = [ "out" "dev" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kdoctools/default.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kdoctools/default.nix
new file mode 100644
index 000000000000..4b52cd95b710
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kdoctools/default.nix
@@ -0,0 +1,40 @@
+{
+  mkDerivation, lib, stdenv, fetchpatch,
+  extra-cmake-modules, docbook_xml_dtd_45, docbook_xsl_ns,
+  karchive, ki18n, qtbase,
+  perl, perlPackages
+}:
+
+mkDerivation {
+  pname = "kdoctools";
+  nativeBuildInputs = [
+    extra-cmake-modules
+    # The build system insists on having native Perl.
+    perl perlPackages.URI
+  ];
+  propagatedBuildInputs = [
+    # kdoctools at runtime actually needs Perl for the platform kdoctools is
+    # running on, not necessarily native perl.
+    perl perlPackages.URI
+    qtbase
+  ];
+  buildInputs = [ karchive ki18n ];
+  outputs = [ "out" "dev" ];
+  patches = [ ./kdoctools-no-find-docbook-xml.patch ]
+    # kf.doctools.core: Error: Could not find kdoctools catalogs
+    ++ lib.optionals stdenv.isDarwin [
+    (fetchpatch {
+      name = "kdoctools-relocate-datapath.patch";
+      url = "https://github.com/msys2/MINGW-packages/raw/0900785a1f4e4146ab9561fb92a1c70fa70fcfc4/mingw-w64-kdoctools-qt5/0001-kdoctools-relocate-datapath.patch";
+      hash = "sha256-MlokdrabXavWHGXYmdz9zZDJQIwAdNxebJBSAH2Z3vI=";
+    })
+  ];
+  cmakeFlags = [
+    "-DDocBookXML4_DTD_DIR=${docbook_xml_dtd_45}/xml/dtd/docbook"
+    "-DDocBookXSL_DIR=${docbook_xsl_ns}/xml/xsl/docbook"
+  ];
+  postFixup = ''
+    moveToOutput "share/doc" "$dev"
+    moveToOutput "share/man" "$dev"
+  '';
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kdoctools/kdoctools-no-find-docbook-xml.patch b/nixpkgs/pkgs/development/libraries/kde-frameworks/kdoctools/kdoctools-no-find-docbook-xml.patch
new file mode 100644
index 000000000000..4e3a33efab32
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kdoctools/kdoctools-no-find-docbook-xml.patch
@@ -0,0 +1,12 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5c4863c..f731775 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -46,7 +46,6 @@ set_package_properties(LibXml2 PROPERTIES
+                       )
+ 
+ 
+-find_package(DocBookXML4 "4.5")
+ 
+ set_package_properties(DocBookXML4 PROPERTIES
+                        TYPE REQUIRED
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kdoctools/setup-hook.sh b/nixpkgs/pkgs/development/libraries/kde-frameworks/kdoctools/setup-hook.sh
new file mode 100644
index 000000000000..2928d9b34dbe
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kdoctools/setup-hook.sh
@@ -0,0 +1,5 @@
+addXdgData() {
+    addToSearchPath XDG_DATA_DIRS "$1/share"
+}
+
+addEnvHooks "$targetOffset" addXdgData
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kemoticons.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kemoticons.nix
new file mode 100644
index 000000000000..67613d274a75
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kemoticons.nix
@@ -0,0 +1,12 @@
+{
+  mkDerivation,
+  extra-cmake-modules,
+  karchive, kcoreaddons, kservice, qtbase,
+}:
+
+mkDerivation {
+  pname = "kemoticons";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ karchive kcoreaddons ];
+  propagatedBuildInputs = [ kservice qtbase ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kfilemetadata/cmake-install-paths.patch b/nixpkgs/pkgs/development/libraries/kde-frameworks/kfilemetadata/cmake-install-paths.patch
new file mode 100644
index 000000000000..daeaf222b630
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kfilemetadata/cmake-install-paths.patch
@@ -0,0 +1,13 @@
+Index: kfilemetadata-5.18.0/src/CMakeLists.txt
+===================================================================
+--- kfilemetadata-5.18.0.orig/src/CMakeLists.txt
++++ kfilemetadata-5.18.0/src/CMakeLists.txt
+@@ -49,7 +49,7 @@ install(TARGETS KF5FileMetaData EXPORT K
+ 
+ install(EXPORT KF5FileMetaDataTargets
+         NAMESPACE KF5::
+-        DESTINATION ${KDE_INSTALL_LIBDIR}/cmake/KF5FileMetaData
++        DESTINATION ${KDE_INSTALL_FULL_CMAKEPACKAGEDIR}/KF5FileMetaData
+         FILE KF5FileMetaDataTargets.cmake)
+ 
+ install(FILES
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kfilemetadata/default.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kfilemetadata/default.nix
new file mode 100644
index 000000000000..1bd1f115c6cb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kfilemetadata/default.nix
@@ -0,0 +1,38 @@
+{ mkDerivation
+, lib
+, stdenv
+, extra-cmake-modules
+, attr
+, ebook_tools
+, exiv2
+, ffmpeg
+, karchive
+, kcoreaddons
+, ki18n
+, poppler
+, qtbase
+, qtmultimedia
+, taglib
+}:
+
+mkDerivation {
+  pname = "kfilemetadata";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = lib.optionals stdenv.isLinux [
+    attr
+  ] ++ [
+    ebook_tools
+    exiv2
+    ffmpeg
+    karchive
+    kcoreaddons
+    ki18n
+    poppler
+    qtbase
+    qtmultimedia
+    taglib
+  ];
+  patches = [
+    ./cmake-install-paths.patch
+  ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kglobalaccel.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kglobalaccel.nix
new file mode 100644
index 000000000000..ab181b8d902d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kglobalaccel.nix
@@ -0,0 +1,17 @@
+{
+  mkDerivation,
+  extra-cmake-modules,
+  kconfig, kcoreaddons, kcrash, kdbusaddons, kservice, kwindowsystem,
+  qtbase, qttools, qtx11extras, libXdmcp,
+}:
+
+mkDerivation {
+  pname = "kglobalaccel";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [
+    kconfig kcoreaddons kcrash kdbusaddons kservice kwindowsystem qttools
+    qtx11extras libXdmcp
+  ];
+  outputs = [ "out" "dev" ];
+  propagatedBuildInputs = [ qtbase ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kguiaddons.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kguiaddons.nix
new file mode 100644
index 000000000000..9254043117ae
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kguiaddons.nix
@@ -0,0 +1,16 @@
+{ mkDerivation
+, extra-cmake-modules
+, qtbase, qtx11extras, wayland, plasma-wayland-protocols
+}:
+
+mkDerivation {
+  pname = "kguiaddons";
+
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ qtx11extras wayland plasma-wayland-protocols ];
+  propagatedBuildInputs = [ qtbase ];
+
+  outputs = [ "out" "dev" ];
+
+  meta.homepage = "https://invent.kde.org/frameworks/kguiaddons";
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kholidays.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kholidays.nix
new file mode 100644
index 000000000000..81369d4ce83d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kholidays.nix
@@ -0,0 +1,16 @@
+{
+  mkDerivation, lib,
+  extra-cmake-modules, kdoctools,
+  qtbase, qtdeclarative, qttools,
+}:
+
+mkDerivation {
+  pname = "kholidays";
+  meta = {
+    license = with lib.licenses; [ gpl2Plus lgpl21Plus fdl12Plus ];
+    maintainers = with lib.maintainers; [ bkchr ];
+  };
+  nativeBuildInputs = [ extra-cmake-modules kdoctools ];
+  buildInputs = [ qtbase qtdeclarative qttools ];
+  outputs = [ "out" "dev" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/khtml.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/khtml.nix
new file mode 100644
index 000000000000..9677ffb78a5e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/khtml.nix
@@ -0,0 +1,18 @@
+{
+  mkDerivation,
+  extra-cmake-modules, perl,
+  giflib, karchive, kcodecs, kglobalaccel, ki18n, kiconthemes, kio, kjs,
+  knotifications, kparts, ktextwidgets, kwallet, kwidgetsaddons, kwindowsystem,
+  kxmlgui, phonon, qtx11extras, sonnet, gperf
+}:
+
+mkDerivation {
+  pname = "khtml";
+  nativeBuildInputs = [ extra-cmake-modules perl ];
+  buildInputs = [
+    giflib karchive kcodecs kglobalaccel ki18n kiconthemes kio knotifications
+    kparts ktextwidgets kwallet kwidgetsaddons kwindowsystem kxmlgui phonon
+    qtx11extras sonnet gperf
+  ];
+  propagatedBuildInputs = [ kjs ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/ki18n.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/ki18n.nix
new file mode 100644
index 000000000000..be8016155b87
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/ki18n.nix
@@ -0,0 +1,12 @@
+{
+  mkDerivation,
+  extra-cmake-modules, gettext, python3,
+  qtbase, qtdeclarative, qtscript,
+}:
+
+mkDerivation {
+  pname = "ki18n";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  propagatedNativeBuildInputs = [ gettext python3 ];
+  buildInputs = [ qtdeclarative qtscript ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kiconthemes/default-theme-breeze.patch b/nixpkgs/pkgs/development/libraries/kde-frameworks/kiconthemes/default-theme-breeze.patch
new file mode 100644
index 000000000000..f7cb0ea3aacc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kiconthemes/default-theme-breeze.patch
@@ -0,0 +1,13 @@
+Index: kiconthemes-5.17.0/src/kicontheme.cpp
+===================================================================
+--- kiconthemes-5.17.0.orig/src/kicontheme.cpp
++++ kiconthemes-5.17.0/src/kicontheme.cpp
+@@ -557,7 +557,7 @@ void KIconTheme::reconfigure()
+ // static
+ QString KIconTheme::defaultThemeName()
+ {
+-    return QStringLiteral("hicolor");
++    return QStringLiteral("breeze");
+ }
+ 
+ void KIconTheme::assignIconsToContextMenu(ContextMenus type,
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kiconthemes/default.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kiconthemes/default.nix
new file mode 100644
index 000000000000..f807193718d5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kiconthemes/default.nix
@@ -0,0 +1,18 @@
+{
+  mkDerivation,
+  extra-cmake-modules,
+  breeze-icons, karchive, kcoreaddons, kconfigwidgets, ki18n, kitemviews,
+  qtbase, qtsvg, qttools,
+}:
+
+mkDerivation {
+  pname = "kiconthemes";
+  patches = [
+    ./default-theme-breeze.patch
+  ];
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [
+    breeze-icons karchive kcoreaddons kconfigwidgets ki18n kitemviews
+  ];
+  propagatedBuildInputs = [ qtbase qtsvg qttools ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kidletime.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kidletime.nix
new file mode 100644
index 000000000000..522e3a2a5de3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kidletime.nix
@@ -0,0 +1,13 @@
+{
+  mkDerivation,
+  extra-cmake-modules,
+  qtbase, qtx11extras,
+  wayland, wayland-protocols, plasma-wayland-protocols
+}:
+
+mkDerivation {
+  pname = "kidletime";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ qtx11extras wayland wayland-protocols plasma-wayland-protocols ];
+  propagatedBuildInputs = [ qtbase ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kimageformats.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kimageformats.nix
new file mode 100644
index 000000000000..5954d56e6cca
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kimageformats.nix
@@ -0,0 +1,19 @@
+{
+  mkDerivation, lib,
+  extra-cmake-modules,
+  ilmbase, karchive, openexr, libavif, libheif, libjxl, libraw, qtbase
+}:
+
+let inherit (lib) getDev; in
+
+mkDerivation {
+  pname = "kimageformats";
+
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ karchive openexr libavif libheif libjxl libraw qtbase ];
+  outputs = [ "out" ]; # plugins only
+  CXXFLAGS = "-I${getDev ilmbase}/include/OpenEXR";
+  cmakeFlags = [
+    "-DKIMAGEFORMATS_HEIF=ON"
+  ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kinit/0002-start_kdeinit-path.patch b/nixpkgs/pkgs/development/libraries/kde-frameworks/kinit/0002-start_kdeinit-path.patch
new file mode 100644
index 000000000000..f9c019c2ae2a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kinit/0002-start_kdeinit-path.patch
@@ -0,0 +1,25 @@
+From 129cd0ae1e983adc10dbe84e87bcc6f31cb13db8 Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@mailbox.org>
+Date: Sun, 16 Feb 2020 14:23:44 -0600
+Subject: [PATCH 2/4] start_kdeinit-path
+
+---
+ src/start_kdeinit/start_kdeinit_wrapper.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/start_kdeinit/start_kdeinit_wrapper.c b/src/start_kdeinit/start_kdeinit_wrapper.c
+index 891f50c..ef664ad 100644
+--- a/src/start_kdeinit/start_kdeinit_wrapper.c
++++ b/src/start_kdeinit/start_kdeinit_wrapper.c
+@@ -11,7 +11,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ 
+-#define EXECUTE KDE_INSTALL_FULL_LIBEXECDIR_KF5 "/start_kdeinit"
++#define EXECUTE "/run/wrappers/bin/start_kdeinit"
+ 
+ #if KDEINIT_OOM_PROTECT
+ 
+-- 
+2.23.1
+
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kinit/0003-kdeinit-extra-libs.patch b/nixpkgs/pkgs/development/libraries/kde-frameworks/kinit/0003-kdeinit-extra-libs.patch
new file mode 100644
index 000000000000..499c975a9e2d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kinit/0003-kdeinit-extra-libs.patch
@@ -0,0 +1,59 @@
+From 4f5d0de7e35744cdbfa9e280ee7e15a54cf21abb Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@mailbox.org>
+Date: Sun, 16 Feb 2020 14:24:07 -0600
+Subject: [PATCH 3/4] kdeinit-extra-libs
+
+---
+ src/kdeinit/kinit.cpp | 22 ++++------------------
+ 1 file changed, 4 insertions(+), 18 deletions(-)
+
+diff --git a/src/kdeinit/kinit.cpp b/src/kdeinit/kinit.cpp
+index 0801b75..622dd5f 100644
+--- a/src/kdeinit/kinit.cpp
++++ b/src/kdeinit/kinit.cpp
+@@ -96,9 +96,9 @@ static const char *extra_libs[] = {
+     "libKF5Parts.5.dylib",
+     "libKF5Plasma.5.dylib"
+ #else
+-    "libKF5KIOCore.so.5",
+-    "libKF5Parts.so.5",
+-    "libKF5Plasma.so.5"
++    NIXPKGS_KF5_KIOCORE,
++    NIXPKGS_KF5_PARTS,
++    NIXPKGS_KF5_PLASMA
+ #endif
+ };
+ #endif
+@@ -1524,20 +1524,6 @@ static int initXconnection()
+ }
+ #endif
+ 
+-#ifndef Q_OS_OSX
+-// Find a shared lib in the lib dir, e.g. libkio.so.
+-// Completely unrelated to plugins.
+-static QString findSharedLib(const QString &lib)
+-{
+-    QString path = QFile::decodeName(CMAKE_INSTALL_PREFIX "/" KDE_INSTALL_LIBDIR "/") + lib;
+-    if (QFile::exists(path)) {
+-        return path;
+-    }
+-    // We could also look in LD_LIBRARY_PATH, but really, who installs the main libs in different prefixes?
+-    return QString();
+-}
+-#endif
+-
+ extern "C" {
+ 
+     static void secondary_child_handler(int)
+@@ -1679,7 +1665,7 @@ int main(int argc, char **argv)
+ #if defined(Q_OS_UNIX) && !defined(Q_OS_OSX)
+     if (!d.suicide && qEnvironmentVariableIsEmpty("KDE_IS_PRELINKED")) {
+         for (const char *extra_lib : extra_libs) {
+-            const QString extra = findSharedLib(QString::fromLatin1(extra_lib));
++            const QString extra = QString::fromLatin1(extra_lib);
+             if (!extra.isEmpty()) {
+                 QLibrary l(extra);
+                 l.setLoadHints(QLibrary::ExportExternalSymbolsHint);
+-- 
+2.23.1
+
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kinit/0004-start_kdeinit-environ-hard-limit.patch b/nixpkgs/pkgs/development/libraries/kde-frameworks/kinit/0004-start_kdeinit-environ-hard-limit.patch
new file mode 100644
index 000000000000..2996342deadb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kinit/0004-start_kdeinit-environ-hard-limit.patch
@@ -0,0 +1,29 @@
+From 41e94983dcfbc1667f1b18c5b566aa5c5975edcb Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@mailbox.org>
+Date: Mon, 17 Feb 2020 04:45:03 -0600
+Subject: [PATCH 4/4] start_kdeinit-environ-hard-limit
+
+---
+ src/start_kdeinit/start_kdeinit.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/start_kdeinit/start_kdeinit.c b/src/start_kdeinit/start_kdeinit.c
+index f2db3e9..4ff2602 100644
+--- a/src/start_kdeinit/start_kdeinit.c
++++ b/src/start_kdeinit/start_kdeinit.c
+@@ -148,7 +148,11 @@ int main(int argc, char **argv)
+                         ++i) {
+                     unsigned len;
+                     if (read(0, &len, sizeof(unsigned)) == sizeof(unsigned)
+-                            && len && len < (1 << 12)) {
++                            && len) {
++                        if (len >= (1 << 20)) {
++                            fprintf(stderr, "%s: exceeded environment length limit", argv[0]);
++                            return 1;
++                        }
+                         env[ i ] = malloc(len + 1);
+                         if ((unsigned) read(0, env[ i ], len) == len) {
+                             env[ i ][ len ] = '\0';
+-- 
+2.23.1
+
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kinit/default.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kinit/default.nix
new file mode 100644
index 000000000000..1f2620c5664d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kinit/default.nix
@@ -0,0 +1,38 @@
+{
+  mkDerivation, lib, stdenv, writeScript,
+  extra-cmake-modules, kdoctools,
+  kconfig, kcrash, ki18n, kio, kparts, kservice, kwindowsystem, plasma-framework
+}:
+
+let inherit (lib) getLib; in
+
+mkDerivation {
+  pname = "kinit";
+  outputs = [ "out" "dev" ];
+  nativeBuildInputs = [ extra-cmake-modules kdoctools ];
+  buildInputs = [
+    kconfig kcrash ki18n kio kservice kwindowsystem
+  ];
+  patches = [
+    ./0002-start_kdeinit-path.patch
+    ./0003-kdeinit-extra-libs.patch
+    ./0004-start_kdeinit-environ-hard-limit.patch
+  ];
+  CXXFLAGS = [
+    ''-DNIXPKGS_KF5_KIOCORE=\"${getLib kio}/lib/libKF5KIOCore.so.5\"''
+    ''-DNIXPKGS_KF5_PARTS=\"${getLib kparts}/lib/libKF5Parts.so.5\"''
+  ] ++ lib.optionals stdenv.isLinux [
+    ''-DNIXPKGS_KF5_PLASMA=\"${getLib plasma-framework}/lib/libKF5Plasma.so.5\"''
+  ];
+  setupHook = writeScript "setup-hook.sh" ''
+    kinitFixupOutputHook() {
+        if [ $prefix != ''${!outputBin} ] && [ -d $prefix/lib ]; then
+            mkdir -p ''${!outputBin}/lib
+            find $prefix/lib -maxdepth 1 -name 'libkdeinit5_*.so' -exec ln -s \{\} ''${!outputBin}/lib \;
+            rmdir --ignore-fail-on-non-empty ''${!outputBin}/lib
+        fi
+    }
+
+    fixupOutputHooks+=(kinitFixupOutputHook)
+  '';
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kio/0001-Remove-impure-smbd-search-path.patch b/nixpkgs/pkgs/development/libraries/kde-frameworks/kio/0001-Remove-impure-smbd-search-path.patch
new file mode 100644
index 000000000000..e541f7a05e8d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kio/0001-Remove-impure-smbd-search-path.patch
@@ -0,0 +1,25 @@
+From af54a2a37655df26a33bc6783cb472c38f65322f Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@mailbox.org>
+Date: Sun, 28 Mar 2021 10:31:12 -0500
+Subject: [PATCH 1/2] Remove impure smbd search path
+
+---
+ src/core/ksambashare.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/core/ksambashare.cpp b/src/core/ksambashare.cpp
+index e810ce4..7cfb4e6 100644
+--- a/src/core/ksambashare.cpp
++++ b/src/core/ksambashare.cpp
+@@ -61,7 +61,7 @@ KSambaSharePrivate::~KSambaSharePrivate()
+ bool KSambaSharePrivate::isSambaInstalled()
+ {
+     const bool daemonExists =
+-        !QStandardPaths::findExecutable(QStringLiteral("smbd"), {QStringLiteral("/usr/sbin/"), QStringLiteral("/usr/local/sbin/")}).isEmpty();
++        !QStandardPaths::findExecutable(QStringLiteral("smbd")).isEmpty();
+     if (!daemonExists) {
+         qCDebug(KIO_CORE_SAMBASHARE) << "KSambaShare: Could not find smbd";
+     }
+-- 
+2.30.1
+
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kio/default.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kio/default.nix
new file mode 100644
index 000000000000..8815683aef65
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kio/default.nix
@@ -0,0 +1,36 @@
+{
+  stdenv, lib, mkDerivation, fetchpatch,
+  extra-cmake-modules, kdoctools, qttools,
+  acl, attr, libkrb5, util-linux,
+  karchive, kbookmarks, kcompletion, kconfig, kconfigwidgets, kcoreaddons,
+  kdbusaddons, ki18n, kiconthemes, kitemviews, kjobwidgets, knotifications,
+  kservice, ktextwidgets, kwallet, kwidgetsaddons, kwindowsystem, kxmlgui,
+  qtbase, qtscript, qtx11extras, solid, kcrash, kded
+}:
+
+mkDerivation {
+  pname = "kio";
+  nativeBuildInputs = [ extra-cmake-modules kdoctools ];
+  buildInputs = [
+    karchive kconfigwidgets kdbusaddons ki18n kiconthemes knotifications
+    ktextwidgets kwallet kwidgetsaddons kwindowsystem qtscript qtx11extras
+    kcrash libkrb5
+  ] ++ lib.lists.optionals stdenv.isLinux [
+    acl attr # both are needed for ACL support
+    util-linux # provides libmount
+  ];
+  propagatedBuildInputs = [
+    kbookmarks kcompletion kconfig kcoreaddons kitemviews kjobwidgets kservice
+    kxmlgui qtbase qttools solid
+  ] ++ lib.optionals stdenv.isLinux [
+    kded
+  ];
+  outputs = [ "out" "dev" ];
+  separateDebugInfo = true;
+  patches = [
+    ./0001-Remove-impure-smbd-search-path.patch
+ ];
+  meta = {
+    homepage = "https://api.kde.org/frameworks/kio/html/";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kirigami2.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kirigami2.nix
new file mode 100644
index 000000000000..a47182fda5e5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kirigami2.nix
@@ -0,0 +1,8 @@
+{ mkDerivation, extra-cmake-modules, qtbase, qtquickcontrols2, qtgraphicaleffects, qttools }:
+
+mkDerivation {
+  pname = "kirigami2";
+  nativeBuildInputs = [ extra-cmake-modules qttools ];
+  buildInputs = [ qtbase qtquickcontrols2 qtgraphicaleffects ];
+  outputs = [ "out" "dev" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kitemmodels.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kitemmodels.nix
new file mode 100644
index 000000000000..8abed8aaa090
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kitemmodels.nix
@@ -0,0 +1,12 @@
+{
+  mkDerivation,
+  extra-cmake-modules,
+  qtbase
+}:
+
+mkDerivation {
+  pname = "kitemmodels";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  propagatedBuildInputs = [ qtbase ];
+  outputs = [ "out" "dev" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kitemviews.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kitemviews.nix
new file mode 100644
index 000000000000..ef350835f05d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kitemviews.nix
@@ -0,0 +1,13 @@
+{
+  mkDerivation, lib,
+  extra-cmake-modules,
+  qtbase, qttools
+}:
+
+mkDerivation {
+  pname = "kitemviews";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ qttools ];
+  propagatedBuildInputs = [ qtbase ];
+  outputs = [ "out" "dev" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kjobwidgets.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kjobwidgets.nix
new file mode 100644
index 000000000000..a4a6d5bb1025
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kjobwidgets.nix
@@ -0,0 +1,11 @@
+{
+  mkDerivation,
+  extra-cmake-modules, qttools,
+  kcoreaddons, kwidgetsaddons, qtx11extras
+}:
+
+mkDerivation {
+  pname = "kjobwidgets";
+  nativeBuildInputs = [ extra-cmake-modules qttools ];
+  buildInputs = [ kcoreaddons kwidgetsaddons qtx11extras ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kjs.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kjs.nix
new file mode 100644
index 000000000000..a0f985323747
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kjs.nix
@@ -0,0 +1,11 @@
+{
+  mkDerivation,
+  extra-cmake-modules, kdoctools,
+  pcre, qtbase,
+}:
+
+mkDerivation {
+  pname = "kjs";
+  nativeBuildInputs = [ extra-cmake-modules kdoctools ];
+  buildInputs = [ pcre qtbase ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kjsembed.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kjsembed.nix
new file mode 100644
index 000000000000..576727e81d2f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kjsembed.nix
@@ -0,0 +1,12 @@
+{
+  mkDerivation,
+  extra-cmake-modules, kdoctools, qttools,
+  ki18n, kjs, qtsvg,
+}:
+
+mkDerivation {
+  pname = "kjsembed";
+  nativeBuildInputs = [ extra-cmake-modules kdoctools qttools ];
+  buildInputs = [ ki18n qtsvg ];
+  propagatedBuildInputs = [ kjs ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kmediaplayer.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kmediaplayer.nix
new file mode 100644
index 000000000000..f92c22956511
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kmediaplayer.nix
@@ -0,0 +1,11 @@
+{ mkDerivation
+, extra-cmake-modules
+, kparts
+, kxmlgui
+}:
+
+mkDerivation {
+  pname = "kmediaplayer";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ kparts kxmlgui ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/knewstuff/0001-Delay-resolving-knsrcdir.patch b/nixpkgs/pkgs/development/libraries/kde-frameworks/knewstuff/0001-Delay-resolving-knsrcdir.patch
new file mode 100644
index 000000000000..b42e75267f9f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/knewstuff/0001-Delay-resolving-knsrcdir.patch
@@ -0,0 +1,25 @@
+From 09b5063e115c36b75e291230175b449a0f6d0c29 Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@mailbox.org>
+Date: Sun, 28 Mar 2021 13:34:33 -0500
+Subject: [PATCH] Delay resolving knsrcdir
+
+---
+ KF5NewStuffCoreConfig.cmake.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/KF5NewStuffCoreConfig.cmake.in b/KF5NewStuffCoreConfig.cmake.in
+index c65c7c4..3275627 100644
+--- a/KF5NewStuffCoreConfig.cmake.in
++++ b/KF5NewStuffCoreConfig.cmake.in
+@@ -3,7 +3,7 @@
+ include(CMakeFindDependencyMacro)
+ find_dependency(KF5Attica "@KF_DEP_VERSION@")
+ 
+-set(KDE_INSTALL_KNSRCDIR "@KDE_INSTALL_DATADIR@/knsrcfiles")
++set(KDE_INSTALL_KNSRCDIR "${KDE_INSTALL_DATADIR}/knsrcfiles")
+ 
+ include("${CMAKE_CURRENT_LIST_DIR}/KF5NewStuffCoreTargets.cmake")
+ @PACKAGE_INCLUDE_CORE_QCHTARGETS@
+-- 
+2.30.1
+
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/knewstuff/default.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/knewstuff/default.nix
new file mode 100644
index 000000000000..6e554b5faaad
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/knewstuff/default.nix
@@ -0,0 +1,21 @@
+{
+  mkDerivation, fetchpatch,
+  extra-cmake-modules,
+  attica, karchive, kcompletion, kconfig, kcoreaddons, ki18n, kiconthemes,
+  kio, kitemviews, kpackage, kservice, ktextwidgets, kwidgetsaddons, kxmlgui, qtbase,
+  qtdeclarative, kirigami2, syndication,
+}:
+
+mkDerivation {
+  pname = "knewstuff";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [
+    karchive kcompletion kconfig kcoreaddons ki18n kiconthemes kio kitemviews
+    kpackage
+    ktextwidgets kwidgetsaddons qtbase qtdeclarative kirigami2 syndication
+  ];
+  propagatedBuildInputs = [ attica kservice kxmlgui ];
+  patches = [
+    ./0001-Delay-resolving-knsrcdir.patch
+  ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/knotifications.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/knotifications.nix
new file mode 100644
index 000000000000..5284d673d89e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/knotifications.nix
@@ -0,0 +1,17 @@
+{ mkDerivation, lib, stdenv
+, extra-cmake-modules
+, kcodecs, kconfig, kcoreaddons, kwindowsystem
+, libdbusmenu
+, phonon
+, qttools, qtx11extras, qtmacextras
+}:
+
+mkDerivation {
+  pname = "knotifications";
+  nativeBuildInputs = [ extra-cmake-modules qttools ];
+  buildInputs = [
+    kcodecs kconfig kcoreaddons kwindowsystem libdbusmenu phonon qtx11extras
+  ] ++ lib.optionals stdenv.isDarwin [
+    qtmacextras
+  ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/knotifyconfig.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/knotifyconfig.nix
new file mode 100644
index 000000000000..b2415d731ff0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/knotifyconfig.nix
@@ -0,0 +1,13 @@
+{
+  mkDerivation,
+  extra-cmake-modules,
+  kcompletion, kconfig, ki18n, kio, phonon, qtbase,
+}:
+
+mkDerivation {
+  pname = "knotifyconfig";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ kcompletion kconfig ki18n kio phonon ];
+  propagatedBuildInputs = [ qtbase ];
+  outputs = [ "out" "dev" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kpackage/0001-Allow-external-paths-default.patch b/nixpkgs/pkgs/development/libraries/kde-frameworks/kpackage/0001-Allow-external-paths-default.patch
new file mode 100644
index 000000000000..4b1c0aadf76d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kpackage/0001-Allow-external-paths-default.patch
@@ -0,0 +1,25 @@
+From c134a83d226fc6b92412ee714bb6c7ab7e3a800f Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@mailbox.org>
+Date: Sun, 28 Mar 2021 10:25:18 -0500
+Subject: [PATCH 1/2] Allow external paths default
+
+---
+ src/kpackage/package.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/kpackage/package.cpp b/src/kpackage/package.cpp
+index 36f5600..881f176 100644
+--- a/src/kpackage/package.cpp
++++ b/src/kpackage/package.cpp
+@@ -866,7 +866,7 @@ PackagePrivate::PackagePrivate()
+ PackagePrivate::PackagePrivate()
+     : QSharedData()
+     , fallbackPackage(nullptr)
+-    , externalPaths(false)
++    , externalPaths(true)
+     , valid(false)
+     , checkedValid(false)
+ {
+-- 
+2.30.1
+
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kpackage/0002-QDirIterator-follow-symlinks.patch b/nixpkgs/pkgs/development/libraries/kde-frameworks/kpackage/0002-QDirIterator-follow-symlinks.patch
new file mode 100644
index 000000000000..933271def27d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kpackage/0002-QDirIterator-follow-symlinks.patch
@@ -0,0 +1,25 @@
+From b1c0d2542234247a5051df015d70347597dfe8d8 Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@mailbox.org>
+Date: Sun, 28 Mar 2021 10:26:40 -0500
+Subject: [PATCH 2/2] QDirIterator follow symlinks
+
+---
+ src/kpackage/packageloader.cpp            | 2 +-
+ src/kpackage/private/packagejobthread.cpp | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/kpackage/packageloader.cpp b/src/kpackage/packageloader.cpp
+index f03d882..d5aee56 100644
+--- a/src/kpackage/packageloader.cpp
++++ b/src/kpackage/packageloader.cpp
+@@ -196,7 +196,7 @@ QList<KPluginMetaData> PackageLoader::listPackages(const QString &packageFormat,
+     }
+
+     for (auto const &plugindir : std::as_const(paths)) {
+-        const QDirIterator::IteratorFlags flags = QDirIterator::Subdirectories;
++        const QDirIterator::IteratorFlags flags = QDirIterator::Subdirectories | QDirIterator::FollowSymlinks;
+         const QStringList nameFilters = {QStringLiteral("metadata.json"), QStringLiteral("metadata.desktop")};
+
+         QDirIterator it(plugindir, nameFilters, QDir::Files, flags);
+--
+2.30.1
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kpackage/default.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kpackage/default.nix
new file mode 100644
index 000000000000..c1d9bf387fc5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kpackage/default.nix
@@ -0,0 +1,15 @@
+{
+  mkDerivation,
+  extra-cmake-modules, kdoctools,
+  karchive, kconfig, kcoreaddons, ki18n, qtbase,
+}:
+
+mkDerivation {
+  pname = "kpackage";
+  nativeBuildInputs = [ extra-cmake-modules kdoctools ];
+  buildInputs = [ karchive kconfig kcoreaddons ki18n qtbase ];
+  patches = [
+    ./0001-Allow-external-paths-default.patch
+    ./0002-QDirIterator-follow-symlinks.patch
+  ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kparts.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kparts.nix
new file mode 100644
index 000000000000..682c2da63132
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kparts.nix
@@ -0,0 +1,16 @@
+{
+  mkDerivation,
+  extra-cmake-modules,
+  kconfig, kcoreaddons, ki18n, kiconthemes, kio, kjobwidgets, knotifications,
+  kservice, ktextwidgets, kwidgetsaddons, kxmlgui
+}:
+
+mkDerivation {
+  pname = "kparts";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [
+    kconfig kcoreaddons ki18n kiconthemes kjobwidgets knotifications kservice
+    kwidgetsaddons
+  ];
+  propagatedBuildInputs = [ kio ktextwidgets kxmlgui ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kpeople.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kpeople.nix
new file mode 100644
index 000000000000..433cc6b6e113
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kpeople.nix
@@ -0,0 +1,15 @@
+{
+  mkDerivation,
+  extra-cmake-modules,
+  kcoreaddons, ki18n, kitemviews, kservice, kwidgetsaddons, qtbase,
+  qtdeclarative,
+}:
+
+mkDerivation {
+  pname = "kpeople";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [
+    kcoreaddons ki18n kitemviews kservice kwidgetsaddons qtdeclarative
+  ];
+  propagatedBuildInputs = [ qtbase ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kplotting.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kplotting.nix
new file mode 100644
index 000000000000..eb26b252566b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kplotting.nix
@@ -0,0 +1,10 @@
+{ mkDerivation
+, extra-cmake-modules, qttools, qtbase
+}:
+
+mkDerivation {
+  pname = "kplotting";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  propagatedBuildInputs = [ qtbase qttools ];
+  outputs = [ "out" "dev" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kpty.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kpty.nix
new file mode 100644
index 000000000000..239407d6abdf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kpty.nix
@@ -0,0 +1,8 @@
+{ mkDerivation, extra-cmake-modules, kcoreaddons, ki18n, qtbase, }:
+
+mkDerivation {
+  pname = "kpty";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ kcoreaddons ki18n qtbase ];
+  outputs = [ "out" "dev" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kquickcharts.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kquickcharts.nix
new file mode 100644
index 000000000000..20c1b2368a7b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kquickcharts.nix
@@ -0,0 +1,12 @@
+{
+  mkDerivation,
+  extra-cmake-modules,
+  qtquickcontrols2, qtbase,
+}:
+
+mkDerivation {
+  pname = "kquickcharts";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  propagatedBuildInputs = [ qtquickcontrols2 ];
+  outputs = [ "out" "dev" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kross.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kross.nix
new file mode 100644
index 000000000000..7cc083e5a261
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kross.nix
@@ -0,0 +1,13 @@
+{ mkDerivation, extra-cmake-modules, kcompletion, kcoreaddons
+, kdoctools, ki18n, kiconthemes, kio, kparts, kwidgetsaddons
+, kxmlgui, qtbase, qtscript, qtxmlpatterns,
+}:
+
+mkDerivation {
+  pname = "kross";
+  nativeBuildInputs = [ extra-cmake-modules kdoctools ];
+  buildInputs = [ kcompletion kcoreaddons kxmlgui ];
+  propagatedBuildInputs = [
+    ki18n kiconthemes kio kparts kwidgetsaddons qtbase qtscript qtxmlpatterns
+  ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/krunner.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/krunner.nix
new file mode 100644
index 000000000000..a56e56a2fe09
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/krunner.nix
@@ -0,0 +1,18 @@
+{
+  mkDerivation, fetchpatch,
+  extra-cmake-modules,
+  kconfig, kcoreaddons, ki18n, kio, kservice, plasma-framework, qtbase,
+  qtdeclarative, solid, threadweaver, kwindowsystem
+}:
+
+let
+  self = mkDerivation {
+    pname = "krunner";
+    nativeBuildInputs = [ extra-cmake-modules ];
+    buildInputs = [
+      kconfig kcoreaddons ki18n kio kservice qtdeclarative solid
+      threadweaver
+    ];
+    propagatedBuildInputs = [ plasma-framework qtbase kwindowsystem ];
+  };
+in self
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kservice/default.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kservice/default.nix
new file mode 100644
index 000000000000..008c52cf0785
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kservice/default.nix
@@ -0,0 +1,21 @@
+{
+  mkDerivation,
+  bison, extra-cmake-modules, flex,
+  kconfig, kcoreaddons, kcrash, kdbusaddons, kdoctools, ki18n, kwindowsystem,
+  qtbase, shared-mime-info,
+}:
+
+mkDerivation {
+  pname = "kservice";
+  nativeBuildInputs = [ extra-cmake-modules kdoctools ];
+  propagatedNativeBuildInputs = [ bison flex ];
+  buildInputs = [
+    kcrash kdbusaddons ki18n kwindowsystem qtbase
+  ];
+  propagatedBuildInputs = [ kconfig kcoreaddons ];
+  propagatedUserEnvPkgs = [ shared-mime-info ]; # for kbuildsycoca5
+  patches = [
+    ./qdiriterator-follow-symlinks.patch
+    ./no-canonicalize-path.patch
+  ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kservice/no-canonicalize-path.patch b/nixpkgs/pkgs/development/libraries/kde-frameworks/kservice/no-canonicalize-path.patch
new file mode 100644
index 000000000000..cf98ffb9067f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kservice/no-canonicalize-path.patch
@@ -0,0 +1,13 @@
+Index: kservice-5.21.0/src/sycoca/vfolder_menu.cpp
+===================================================================
+--- kservice-5.21.0.orig/src/sycoca/vfolder_menu.cpp
++++ kservice-5.21.0/src/sycoca/vfolder_menu.cpp
+@@ -415,7 +415,7 @@ VFolderMenu::absoluteDir(const QString &
+     }
+ 
+     if (!relative) {
+-        QString resolved = QDir(dir).canonicalPath();
++      QString resolved = QDir::cleanPath(dir);
+         if (!resolved.isEmpty()) {
+             dir = resolved;
+         }
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kservice/qdiriterator-follow-symlinks.patch b/nixpkgs/pkgs/development/libraries/kde-frameworks/kservice/qdiriterator-follow-symlinks.patch
new file mode 100644
index 000000000000..fdd8b4d81a18
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kservice/qdiriterator-follow-symlinks.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sycoca/kbuildsycoca.cpp b/src/sycoca/kbuildsycoca.cpp
+index b125299..0682b90 100644
+--- a/src/sycoca/kbuildsycoca.cpp
++++ b/src/sycoca/kbuildsycoca.cpp
+@@ -207,7 +207,7 @@ bool KBuildSycoca::build()
+         const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, m_resourceSubdir, QStandardPaths::LocateDirectory);
+         qCDebug(SYCOCA) << "Looking for subdir" << m_resourceSubdir << "=>" << dirs;
+         for (const QString &dir : dirs) {
+-            QDirIterator it(dir, QDirIterator::Subdirectories);
++            QDirIterator it(dir, QDirIterator::Subdirectories | QDirIterator::FollowSymlinks);
+             while (it.hasNext()) {
+                 const QString filePath = it.next();
+                 Q_ASSERT(filePath.startsWith(dir)); // due to the line below...
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/ktexteditor.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/ktexteditor.nix
new file mode 100644
index 000000000000..ccc9f76b237a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/ktexteditor.nix
@@ -0,0 +1,23 @@
+{
+  mkDerivation, lib, stdenv,
+  extra-cmake-modules, perl,
+  karchive, kconfig, kguiaddons, ki18n, kiconthemes, kio, kparts, libgit2,
+  qtscript, qtxmlpatterns, sonnet, syntax-highlighting, qtquickcontrols,
+  editorconfig-core-c
+}:
+
+mkDerivation ({
+  pname = "ktexteditor";
+  nativeBuildInputs = [ extra-cmake-modules perl ];
+  buildInputs = [
+    karchive kconfig kguiaddons ki18n kiconthemes kio libgit2 qtscript
+    qtxmlpatterns sonnet syntax-highlighting qtquickcontrols
+    editorconfig-core-c
+  ];
+  propagatedBuildInputs = [ kparts ];
+} // lib.optionalAttrs stdenv.isDarwin {
+  postPatch = ''
+    substituteInPlace src/part/CMakeLists.txt \
+      --replace "kpart.desktop" "${kparts}/share/kservicetypes5/kpart.desktop"
+  '';
+})
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/ktextwidgets.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/ktextwidgets.nix
new file mode 100644
index 000000000000..6ce7aa88c3a6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/ktextwidgets.nix
@@ -0,0 +1,15 @@
+{
+  mkDerivation,
+  extra-cmake-modules, qttools,
+  kcompletion, kconfig, kconfigwidgets, ki18n, kiconthemes, kservice,
+  kwindowsystem, qtbase, sonnet,
+}:
+
+mkDerivation {
+  pname = "ktextwidgets";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [
+    kcompletion kconfig kconfigwidgets kiconthemes kservice kwindowsystem
+  ];
+  propagatedBuildInputs = [ ki18n qtbase qttools sonnet ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kunitconversion.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kunitconversion.nix
new file mode 100644
index 000000000000..aa4c87a1e5f9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kunitconversion.nix
@@ -0,0 +1,8 @@
+{ mkDerivation, extra-cmake-modules, ki18n, qtbase, }:
+
+mkDerivation {
+  pname = "kunitconversion";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ ki18n qtbase ];
+  outputs = [ "out" "dev" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kwallet.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kwallet.nix
new file mode 100644
index 000000000000..01ad788ba112
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kwallet.nix
@@ -0,0 +1,18 @@
+{
+  mkDerivation,
+  extra-cmake-modules, kdoctools,
+  kconfig, kconfigwidgets, kcoreaddons , kdbusaddons, ki18n,
+  kiconthemes, knotifications, kservice, kwidgetsaddons, kwindowsystem,
+  libgcrypt, qgpgme, qtbase, qca-qt5
+}:
+
+mkDerivation {
+  pname = "kwallet";
+  nativeBuildInputs = [ extra-cmake-modules kdoctools ];
+  buildInputs = [
+    kconfig kconfigwidgets kcoreaddons kdbusaddons ki18n kiconthemes
+    knotifications kservice kwidgetsaddons kwindowsystem
+    libgcrypt qgpgme qca-qt5
+  ];
+  propagatedBuildInputs = [ qtbase ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kwayland.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kwayland.nix
new file mode 100644
index 000000000000..fbe7d70ec2f1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kwayland.nix
@@ -0,0 +1,14 @@
+{
+  mkDerivation, propagateBin, lib,
+  extra-cmake-modules,
+  plasma-wayland-protocols, qtbase, wayland, wayland-protocols
+}:
+
+mkDerivation {
+  pname = "kwayland";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ plasma-wayland-protocols wayland wayland-protocols ];
+  propagatedBuildInputs = [ qtbase ];
+  setupHook = propagateBin; # XDG_CONFIG_DIRS
+  meta.platforms = lib.platforms.linux ++ lib.platforms.freebsd;
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kwidgetsaddons.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kwidgetsaddons.nix
new file mode 100644
index 000000000000..0fead3bfd6ba
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kwidgetsaddons.nix
@@ -0,0 +1,13 @@
+{
+  mkDerivation,
+  extra-cmake-modules,
+  qtbase, qttools
+}:
+
+mkDerivation {
+  pname = "kwidgetsaddons";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ qttools ];
+  propagatedBuildInputs = [ qtbase ];
+  outputs = [ "out" "dev" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kwindowsystem/default.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kwindowsystem/default.nix
new file mode 100644
index 000000000000..ec102dbb342a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kwindowsystem/default.nix
@@ -0,0 +1,14 @@
+{
+  mkDerivation,
+  extra-cmake-modules,
+  libpthreadstubs, libXdmcp,
+  qtbase, qttools, qtx11extras
+}:
+
+mkDerivation {
+  pname = "kwindowsystem";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ libpthreadstubs libXdmcp qttools qtx11extras ];
+  propagatedBuildInputs = [ qtbase ];
+  outputs = [ "out" "dev" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kxmlgui.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kxmlgui.nix
new file mode 100644
index 000000000000..c666edbc196d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kxmlgui.nix
@@ -0,0 +1,16 @@
+{
+  mkDerivation,
+  extra-cmake-modules, qttools,
+  attica, kconfig, kconfigwidgets, kglobalaccel, ki18n, kiconthemes, kitemviews,
+  ktextwidgets, kwindowsystem, qtbase, sonnet,
+}:
+
+mkDerivation {
+  pname = "kxmlgui";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [
+    attica kglobalaccel ki18n kiconthemes kitemviews ktextwidgets kwindowsystem
+    sonnet
+  ];
+  propagatedBuildInputs = [ kconfig kconfigwidgets qtbase qttools ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/kxmlrpcclient.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/kxmlrpcclient.nix
new file mode 100644
index 000000000000..3b2d869d1777
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/kxmlrpcclient.nix
@@ -0,0 +1,9 @@
+{ mkDerivation, extra-cmake-modules, ki18n, kio }:
+
+mkDerivation {
+  pname = "kxmlrpcclient";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ ki18n ];
+  propagatedBuildInputs = [ kio ];
+  outputs = [ "out" "dev" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/modemmanager-qt.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/modemmanager-qt.nix
new file mode 100644
index 000000000000..f82f97fc7d9d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/modemmanager-qt.nix
@@ -0,0 +1,13 @@
+{
+  mkDerivation, lib,
+  extra-cmake-modules,
+  modemmanager, qtbase
+}:
+
+mkDerivation {
+  pname = "modemmanager-qt";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  propagatedBuildInputs = [ modemmanager qtbase ];
+  outputs = [ "out" "dev" ];
+  meta.platforms = lib.platforms.linux;
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/networkmanager-qt.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/networkmanager-qt.nix
new file mode 100644
index 000000000000..04256007ef24
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/networkmanager-qt.nix
@@ -0,0 +1,14 @@
+{
+  mkDerivation, lib,
+  extra-cmake-modules,
+  networkmanager, qtbase,
+}:
+
+mkDerivation {
+  pname = "networkmanager-qt";
+
+  nativeBuildInputs = [ extra-cmake-modules ];
+  propagatedBuildInputs = [ networkmanager qtbase ];
+  outputs = [ "out" "dev" ];
+  meta.platforms = lib.platforms.linux;
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/oxygen-icons.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/oxygen-icons.nix
new file mode 100644
index 000000000000..4760c51abe54
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/oxygen-icons.nix
@@ -0,0 +1,13 @@
+{ mkDerivation
+, lib
+, extra-cmake-modules
+, qtbase
+}:
+
+mkDerivation {
+  pname = "oxygen-icons";
+  meta.license = lib.licenses.lgpl3Plus;
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ qtbase ];
+  outputs = [ "out" ]; # only runtime outputs
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/plasma-framework.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/plasma-framework.nix
new file mode 100644
index 000000000000..3d1e6bfb23d4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/plasma-framework.nix
@@ -0,0 +1,20 @@
+{
+  mkDerivation,
+  extra-cmake-modules, kdoctools,
+  kactivities, karchive, kconfig, kconfigwidgets, kcoreaddons, kdbusaddons,
+  kdeclarative, kglobalaccel, kguiaddons, ki18n, kiconthemes, kio,
+  knotifications, kpackage, kservice, kwayland, kwindowsystem, kxmlgui,
+  qtbase, qtdeclarative, qtscript, qtx11extras, kirigami2, qtquickcontrols2
+}:
+
+mkDerivation {
+  pname = "plasma-framework";
+  nativeBuildInputs = [ extra-cmake-modules kdoctools ];
+  buildInputs = [
+    kactivities karchive kconfig kconfigwidgets kcoreaddons kdbusaddons
+    kdeclarative kglobalaccel kguiaddons ki18n kiconthemes kio knotifications
+    kwayland kwindowsystem kxmlgui qtdeclarative qtscript qtx11extras
+    qtquickcontrols2
+  ];
+  propagatedBuildInputs = [ kpackage kservice qtbase kirigami2 ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/prison.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/prison.nix
new file mode 100644
index 000000000000..d2a7b5c1a408
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/prison.nix
@@ -0,0 +1,13 @@
+{
+  mkDerivation,
+  extra-cmake-modules,
+  libdmtx, qrencode, qtbase, qtmultimedia, zxing-cpp
+}:
+
+mkDerivation {
+  pname = "prison";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ libdmtx qrencode zxing-cpp ];
+  propagatedBuildInputs = [ qtbase qtmultimedia ];
+  outputs = [ "out" "dev" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/purpose.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/purpose.nix
new file mode 100644
index 000000000000..ee4e9584641c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/purpose.nix
@@ -0,0 +1,14 @@
+{
+  mkDerivation, extra-cmake-modules, intltool, qtbase
+, accounts-qt, qtdeclarative, kaccounts-integration, kconfig, kcoreaddons, ki18n, kio, kirigami2
+, fetchpatch, signond
+}:
+
+mkDerivation {
+  pname = "purpose";
+  nativeBuildInputs = [ extra-cmake-modules intltool ];
+  buildInputs = [
+    qtbase accounts-qt qtdeclarative kaccounts-integration kconfig kcoreaddons
+    ki18n kio kirigami2 signond
+  ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/qqc2-desktop-style.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/qqc2-desktop-style.nix
new file mode 100644
index 000000000000..6d8635c4f283
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/qqc2-desktop-style.nix
@@ -0,0 +1,14 @@
+{ mkDerivation
+, extra-cmake-modules
+, qtquickcontrols2
+, qtx11extras
+, kconfig
+, kiconthemes
+, kirigami2
+}:
+
+mkDerivation {
+  pname = "qqc2-desktop-style";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ qtx11extras qtquickcontrols2 kconfig kiconthemes kirigami2 ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/solid/default.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/solid/default.nix
new file mode 100644
index 000000000000..27160c3bda0d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/solid/default.nix
@@ -0,0 +1,15 @@
+{
+  mkDerivation, lib, stdenv,
+  bison, extra-cmake-modules, flex,
+  media-player-info, qtbase, qtdeclarative, qttools
+}:
+
+mkDerivation {
+  pname = "solid";
+  patches = [ ./fix-search-path.patch ];
+  nativeBuildInputs = [ bison extra-cmake-modules flex ]
+    ++ lib.optionals stdenv.isLinux [ media-player-info ];
+  buildInputs = [ qtdeclarative qttools ];
+  propagatedBuildInputs = [ qtbase ];
+  propagatedUserEnvPkgs = lib.optionals stdenv.isLinux [ media-player-info ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/solid/fix-search-path.patch b/nixpkgs/pkgs/development/libraries/kde-frameworks/solid/fix-search-path.patch
new file mode 100644
index 000000000000..010aa1f3efcc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/solid/fix-search-path.patch
@@ -0,0 +1,17 @@
+diff --git a/src/solid/devices/backends/fstab/fstabhandling.cpp b/src/solid/devices/backends/fstab/fstabhandling.cpp
+index ac2a628..7ee46cc 100644
+--- a/src/solid/devices/backends/fstab/fstabhandling.cpp
++++ b/src/solid/devices/backends/fstab/fstabhandling.cpp
+@@ -275,7 +275,11 @@ bool Solid::Backends::Fstab::FstabHandling::callSystemCommand(const QString &com
+                                                               const QObject *receiver,
+                                                               std::function<void(QProcess *)> callback)
+ {
+-    static const QStringList searchPaths{QStringLiteral("/sbin"), QStringLiteral("/bin"), QStringLiteral("/usr/sbin"), QStringLiteral("/usr/bin")};
++    static const QStringList searchPaths{QStringLiteral("/run/wrappers/bin"),
++                                         QStringLiteral("/sbin"),
++                                         QStringLiteral("/bin"),
++                                         QStringLiteral("/usr/sbin"),
++                                         QStringLiteral("/usr/bin")};
+     static const QString joinedPaths = searchPaths.join(QLatin1Char(':'));
+     const QString exec = QStandardPaths::findExecutable(commandName, searchPaths);
+     if (exec.isEmpty()) {
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/sonnet.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/sonnet.nix
new file mode 100644
index 000000000000..c0ed3f7d79ba
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/sonnet.nix
@@ -0,0 +1,11 @@
+{ mkDerivation
+, extra-cmake-modules
+, aspell, hunspell, qtbase, qttools
+}:
+
+mkDerivation {
+  pname = "sonnet";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ aspell hunspell qttools ];
+  propagatedBuildInputs = [ qtbase ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/srcs.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/srcs.nix
new file mode 100644
index 000000000000..d51c74cc4e64
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/srcs.nix
@@ -0,0 +1,670 @@
+# DO NOT EDIT! This file is generated automatically.
+# Command: ./maintainers/scripts/fetch-kde-qt.sh pkgs/development/libraries/kde-frameworks/
+{ fetchurl, mirror }:
+
+{
+  attica = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/attica-5.114.0.tar.xz";
+      sha256 = "0gkdsm1vyyyxxyl4rni9s2bdz5w6zphzjl58fddjl899da06hqfq";
+      name = "attica-5.114.0.tar.xz";
+    };
+  };
+  baloo = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/baloo-5.114.0.tar.xz";
+      sha256 = "19sib1y0m5h2gnnpr9rfk810p6pdfm4zzxlm0a44r7910llp8i50";
+      name = "baloo-5.114.0.tar.xz";
+    };
+  };
+  bluez-qt = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/bluez-qt-5.114.0.tar.xz";
+      sha256 = "1ni50jwnb5ww8mkql0p3q8660c0srj8p0ik27lvxakwdq4wf6l9s";
+      name = "bluez-qt-5.114.0.tar.xz";
+    };
+  };
+  breeze-icons = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/breeze-icons-5.114.0.tar.xz";
+      sha256 = "0z5cpv10jyjdwjfkm7nj6hyp4vj29apm476hvbpb4gan27jyb91y";
+      name = "breeze-icons-5.114.0.tar.xz";
+    };
+  };
+  extra-cmake-modules = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/extra-cmake-modules-5.114.0.tar.xz";
+      sha256 = "0z4nqravsfzlsgvkg5rha2d0qxfr3pfncw7z2fxzzqvzj7mfk6im";
+      name = "extra-cmake-modules-5.114.0.tar.xz";
+    };
+  };
+  frameworkintegration = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/frameworkintegration-5.114.0.tar.xz";
+      sha256 = "1dqgzhhh8gnvl8jsvh2i6pjn935d61avh63b4z9kpllhvp9a2lnd";
+      name = "frameworkintegration-5.114.0.tar.xz";
+    };
+  };
+  kactivities = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kactivities-5.114.0.tar.xz";
+      sha256 = "10pyynqz8c22la9aqms080iqlisj3irbi1kwnn3s0vg5dsjxr1p3";
+      name = "kactivities-5.114.0.tar.xz";
+    };
+  };
+  kactivities-stats = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kactivities-stats-5.114.0.tar.xz";
+      sha256 = "1zhrs2p3c831rwx7ww87i82k5i236vfywdxv7zhz93k3vffyqby7";
+      name = "kactivities-stats-5.114.0.tar.xz";
+    };
+  };
+  kapidox = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kapidox-5.114.0.tar.xz";
+      sha256 = "0xxw3lvipyax8r1af3ypwjj6waarbp2z9n11fjb4kvyigsypglmb";
+      name = "kapidox-5.114.0.tar.xz";
+    };
+  };
+  karchive = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/karchive-5.114.0.tar.xz";
+      sha256 = "015gc1zarny8r478p7g9m6r67l5dk3r0vcp28ilmfmznxy0k0hda";
+      name = "karchive-5.114.0.tar.xz";
+    };
+  };
+  kauth = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kauth-5.114.0.tar.xz";
+      sha256 = "1rkf9mc9718wn8pzd3d3wcg3lsn0vkr9a2cqnz86rbg3cf2qdbir";
+      name = "kauth-5.114.0.tar.xz";
+    };
+  };
+  kbookmarks = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kbookmarks-5.114.0.tar.xz";
+      sha256 = "06lnsyjhh80mdcqjww40glinmrjydbmkhv27a267vf34r7kam9rc";
+      name = "kbookmarks-5.114.0.tar.xz";
+    };
+  };
+  kcalendarcore = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kcalendarcore-5.114.0.tar.xz";
+      sha256 = "0aimda01zqw4fz5ldvz4vh767bi10r00kvm62n89nxhsq46wlk7p";
+      name = "kcalendarcore-5.114.0.tar.xz";
+    };
+  };
+  kcmutils = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kcmutils-5.114.0.tar.xz";
+      sha256 = "1pblf3c60m0gn3vhdprw28f8y54kij02jwz91r2vnmng8d1xkrp9";
+      name = "kcmutils-5.114.0.tar.xz";
+    };
+  };
+  kcodecs = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kcodecs-5.114.0.tar.xz";
+      sha256 = "080zvcqd8iq05p5x3qaf3rryx75lg2l2j1dr18sp50ir50zfwh2w";
+      name = "kcodecs-5.114.0.tar.xz";
+    };
+  };
+  kcompletion = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kcompletion-5.114.0.tar.xz";
+      sha256 = "0qvdxqlh1dklkbmqfjg5gc3dkdicgzn6q5lgvyf8cv46dinj6mwc";
+      name = "kcompletion-5.114.0.tar.xz";
+    };
+  };
+  kconfig = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kconfig-5.114.0.tar.xz";
+      sha256 = "0hghdh4p6cq9ckp4g5jdgd8w47pdsxxvzimrdfjrs71lmy8ydiy2";
+      name = "kconfig-5.114.0.tar.xz";
+    };
+  };
+  kconfigwidgets = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kconfigwidgets-5.114.0.tar.xz";
+      sha256 = "16layydkcwfbvzxqjzprkq8bbxifn0z0wm7mc9bzwrfxy761rjnj";
+      name = "kconfigwidgets-5.114.0.tar.xz";
+    };
+  };
+  kcontacts = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kcontacts-5.114.0.tar.xz";
+      sha256 = "0lyqvbs216p5zpssaf4pyccph7nbwkbvhpmhbi32y2rm23cmxlwf";
+      name = "kcontacts-5.114.0.tar.xz";
+    };
+  };
+  kcoreaddons = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kcoreaddons-5.114.0.tar.xz";
+      sha256 = "1wv3s3xsiii96k17nzs2fb0ih2lyg52krf58v44nlk9wfi4wmnqx";
+      name = "kcoreaddons-5.114.0.tar.xz";
+    };
+  };
+  kcrash = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kcrash-5.114.0.tar.xz";
+      sha256 = "1avi4yd3kpjqxrvci1nicxbh9mjafj1w2vgfmqanq66b76s4kxj1";
+      name = "kcrash-5.114.0.tar.xz";
+    };
+  };
+  kdav = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kdav-5.114.0.tar.xz";
+      sha256 = "11959fxz24snk2l31kw8w96wah0s2fjimimrxh6xhppiy5qp2fp2";
+      name = "kdav-5.114.0.tar.xz";
+    };
+  };
+  kdbusaddons = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kdbusaddons-5.114.0.tar.xz";
+      sha256 = "0pzzznyxhi48z5hhdsdxz3vaaihrdshpx65ha2v2nn2gh3ww7ikm";
+      name = "kdbusaddons-5.114.0.tar.xz";
+    };
+  };
+  kdeclarative = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kdeclarative-5.114.0.tar.xz";
+      sha256 = "0w98pj8acxb4m9645963rzq5vja1fbih5czz24mf9zdqlg2dkz8g";
+      name = "kdeclarative-5.114.0.tar.xz";
+    };
+  };
+  kded = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kded-5.114.0.tar.xz";
+      sha256 = "00n4isc4ahii0ldrg761lkmnq27kmrfqs9zkmpvmgbg57259mvc3";
+      name = "kded-5.114.0.tar.xz";
+    };
+  };
+  kdelibs4support = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/portingAids/kdelibs4support-5.114.0.tar.xz";
+      sha256 = "17473him2fjfcw5f88diarqac815wsakfyb9fka82a4qqh9l41mc";
+      name = "kdelibs4support-5.114.0.tar.xz";
+    };
+  };
+  kdesignerplugin = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/portingAids/kdesignerplugin-5.114.0.tar.xz";
+      sha256 = "0zlvkayv6zl5rp1076bscmdzyw93y7sxqb5848w11vs0g9amcj9n";
+      name = "kdesignerplugin-5.114.0.tar.xz";
+    };
+  };
+  kdesu = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kdesu-5.114.0.tar.xz";
+      sha256 = "14dcf32izn4lxr8vx372rfznflc1rcxwanx06phkd8mx9zyg4jxr";
+      name = "kdesu-5.114.0.tar.xz";
+    };
+  };
+  kdewebkit = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/portingAids/kdewebkit-5.114.0.tar.xz";
+      sha256 = "04zc2qs13k04gsn124mnh6sqi3pax8c014jcb0qdh3h2r2y72bz3";
+      name = "kdewebkit-5.114.0.tar.xz";
+    };
+  };
+  kdnssd = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kdnssd-5.114.0.tar.xz";
+      sha256 = "1zw5rkprr54j05ic8zljk57zahp2v6333slr253r3n1679zqlv64";
+      name = "kdnssd-5.114.0.tar.xz";
+    };
+  };
+  kdoctools = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kdoctools-5.114.0.tar.xz";
+      sha256 = "15s58r2zvdckw30x9q9ir8h1i8q2ncfgjn9h4jnmylwm79z3z27v";
+      name = "kdoctools-5.114.0.tar.xz";
+    };
+  };
+  kemoticons = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kemoticons-5.114.0.tar.xz";
+      sha256 = "0w87prkhdmba7y8ylbycdpwdzd2djmp7hvv5ljb9s4aqqhnn3vw4";
+      name = "kemoticons-5.114.0.tar.xz";
+    };
+  };
+  kfilemetadata = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kfilemetadata-5.114.0.tar.xz";
+      sha256 = "15va29chlsrxii02w1ax718hp1b14ym59lcfyzh7w30zlf681560";
+      name = "kfilemetadata-5.114.0.tar.xz";
+    };
+  };
+  kglobalaccel = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kglobalaccel-5.114.0.tar.xz";
+      sha256 = "19mmav055fnzyl760fyhf0pdvaidd5i1h04l2hcnpin4p1jnpfap";
+      name = "kglobalaccel-5.114.0.tar.xz";
+    };
+  };
+  kguiaddons = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kguiaddons-5.114.0.tar.xz";
+      sha256 = "0riya9plcz9c1ndhdbsradssndshbm12705swn7vf7am17n7f947";
+      name = "kguiaddons-5.114.0.tar.xz";
+    };
+  };
+  kholidays = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kholidays-5.114.0.tar.xz";
+      sha256 = "19r8dxglz5ll6iyvigsccil3ikvcsnyy5nwcpjvjr1c0brigcjmy";
+      name = "kholidays-5.114.0.tar.xz";
+    };
+  };
+  khtml = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/portingAids/khtml-5.114.0.tar.xz";
+      sha256 = "1mf84zs9hjvmi74f8rgqzrfkqjq597f9k64dn1bqcj13v0w10vry";
+      name = "khtml-5.114.0.tar.xz";
+    };
+  };
+  ki18n = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/ki18n-5.114.0.tar.xz";
+      sha256 = "1yg03awcx5ay6lgbgwv91i0ankrm94z9m0wky4v03gnwnvw8pa0v";
+      name = "ki18n-5.114.0.tar.xz";
+    };
+  };
+  kiconthemes = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kiconthemes-5.114.0.tar.xz";
+      sha256 = "0ndiqmcs1ybj4acc6k3p9jwq09slqc4nj12ifqvlxrfj3ak6sb28";
+      name = "kiconthemes-5.114.0.tar.xz";
+    };
+  };
+  kidletime = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kidletime-5.114.0.tar.xz";
+      sha256 = "06sc9w54g4n7s5gjkqz08rgcz6v3pr0bdgx3gbjgzass6l4m8w7p";
+      name = "kidletime-5.114.0.tar.xz";
+    };
+  };
+  kimageformats = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kimageformats-5.114.0.tar.xz";
+      sha256 = "1nfzpgnrbwncx9zp9cwa169jlfv7i85p00a07d4jc5hrdyvvkn0w";
+      name = "kimageformats-5.114.0.tar.xz";
+    };
+  };
+  kinit = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kinit-5.114.0.tar.xz";
+      sha256 = "0b6z9gq05vz20hm5y9ai3sbqq3gxwm3a3z88dkvi7dywk7vbqcph";
+      name = "kinit-5.114.0.tar.xz";
+    };
+  };
+  kio = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kio-5.114.0.tar.xz";
+      sha256 = "0nwmxbfhvfw69q07vxvflri7rkdczyc89xv4ll3nrzrhgf15kb2z";
+      name = "kio-5.114.0.tar.xz";
+    };
+  };
+  kirigami2 = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kirigami2-5.114.0.tar.xz";
+      sha256 = "1bd232gs4394fa3aq31mjqrn8f3vjsghx7817szi7ryvnn6fnqkw";
+      name = "kirigami2-5.114.0.tar.xz";
+    };
+  };
+  kitemmodels = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kitemmodels-5.114.0.tar.xz";
+      sha256 = "1bfmcrbcbrvp2rcaf32vzvarqwp41gn6s4xpf56hnxbwf9kgk1fl";
+      name = "kitemmodels-5.114.0.tar.xz";
+    };
+  };
+  kitemviews = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kitemviews-5.114.0.tar.xz";
+      sha256 = "00vl2ck0pq0sqcxvhlr2pimgr27hd9v7y9dz6w4arb5smi5q1ixg";
+      name = "kitemviews-5.114.0.tar.xz";
+    };
+  };
+  kjobwidgets = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kjobwidgets-5.114.0.tar.xz";
+      sha256 = "1ymlqi5cqcs79nj1vff8pqwgvy0dxj5vv7l529w3a3n315hkrny8";
+      name = "kjobwidgets-5.114.0.tar.xz";
+    };
+  };
+  kjs = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/portingAids/kjs-5.114.0.tar.xz";
+      sha256 = "08nh6yr6bqifpb5s9a4wbjwmwnm7zp5k8hcdmyb6mlcbam9qp6j7";
+      name = "kjs-5.114.0.tar.xz";
+    };
+  };
+  kjsembed = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/portingAids/kjsembed-5.114.0.tar.xz";
+      sha256 = "1xglisxv7nfsbj9lgpvc4c5ql4f6m7n71vf7vih5ff3aqybrkgxa";
+      name = "kjsembed-5.114.0.tar.xz";
+    };
+  };
+  kmediaplayer = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/portingAids/kmediaplayer-5.114.0.tar.xz";
+      sha256 = "092yvzvrkvr8xxncw7h5ghfd2bggzxsqfj67c2vhymhfw4i0c54x";
+      name = "kmediaplayer-5.114.0.tar.xz";
+    };
+  };
+  knewstuff = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/knewstuff-5.114.0.tar.xz";
+      sha256 = "15xmx7rnnrsz2cj044aviyr4hi9h8r0nnva9qzcjcq2hkkgj7wjj";
+      name = "knewstuff-5.114.0.tar.xz";
+    };
+  };
+  knotifications = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/knotifications-5.114.0.tar.xz";
+      sha256 = "0cjd5ml9hyzprjgmrc132cmp7g9hnl0h5swlxw2ifqnxxyfkg72b";
+      name = "knotifications-5.114.0.tar.xz";
+    };
+  };
+  knotifyconfig = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/knotifyconfig-5.114.0.tar.xz";
+      sha256 = "049n64qlr69zv1dc1dhgbsca37179hp06xfsxnhg97lblz3p3gds";
+      name = "knotifyconfig-5.114.0.tar.xz";
+    };
+  };
+  kpackage = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kpackage-5.114.0.tar.xz";
+      sha256 = "0v165az3k5lfszxy0kl2464573y0dcq92fyfiklwnkkcjsvba69d";
+      name = "kpackage-5.114.0.tar.xz";
+    };
+  };
+  kparts = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kparts-5.114.0.tar.xz";
+      sha256 = "1rrf765p554r7l8j23gx5zxdq6wimh0v91qdkwz7ilm2qr16vd5v";
+      name = "kparts-5.114.0.tar.xz";
+    };
+  };
+  kpeople = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kpeople-5.114.0.tar.xz";
+      sha256 = "04v0s3amn6lbb16qvp1r6figckva6xk8z7djk8jda8fbnx8dx2r1";
+      name = "kpeople-5.114.0.tar.xz";
+    };
+  };
+  kplotting = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kplotting-5.114.0.tar.xz";
+      sha256 = "17x58pplln0plqiyhjpzdiqxngylxq5gkc5gk7b91xzm783x2k0n";
+      name = "kplotting-5.114.0.tar.xz";
+    };
+  };
+  kpty = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kpty-5.114.0.tar.xz";
+      sha256 = "0fm7bfp89kvg1a64q8piiyal71p6vjnqcm13zak6r9fbfwcm0gs9";
+      name = "kpty-5.114.0.tar.xz";
+    };
+  };
+  kquickcharts = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kquickcharts-5.114.0.tar.xz";
+      sha256 = "1f91x92qdzxp31z7ixx9jn41hq9f3w9hjia94pab9vsnaz8prbd1";
+      name = "kquickcharts-5.114.0.tar.xz";
+    };
+  };
+  kross = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/portingAids/kross-5.114.0.tar.xz";
+      sha256 = "0bbpi63lxbb4ylx2jd172a2bqyxkd606n7w8zrvcjy466lkv3sz4";
+      name = "kross-5.114.0.tar.xz";
+    };
+  };
+  krunner = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/krunner-5.114.0.tar.xz";
+      sha256 = "1rjs9b87bi4f6pdm9fwnha2sj2mrq260l80iz2jq1zah83p546sw";
+      name = "krunner-5.114.0.tar.xz";
+    };
+  };
+  kservice = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kservice-5.114.0.tar.xz";
+      sha256 = "0jdvlplnsb9w628wh3ip6awxvhgyc097zh7ls9614ymkbnpc9xca";
+      name = "kservice-5.114.0.tar.xz";
+    };
+  };
+  ktexteditor = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/ktexteditor-5.114.0.tar.xz";
+      sha256 = "06amzk6290imi2gj3v1k3f56zdlad7zbz4wwlf34v4iibj9mfgw8";
+      name = "ktexteditor-5.114.0.tar.xz";
+    };
+  };
+  ktextwidgets = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/ktextwidgets-5.114.0.tar.xz";
+      sha256 = "0w1wwyd3fy351rmkhf3i55is5031j2zxvswm0b1sb3pd159v888v";
+      name = "ktextwidgets-5.114.0.tar.xz";
+    };
+  };
+  kunitconversion = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kunitconversion-5.114.0.tar.xz";
+      sha256 = "1qyqvl8fy105zwma5nrkz9zg5932w2f33daw0azhj322iffrm39n";
+      name = "kunitconversion-5.114.0.tar.xz";
+    };
+  };
+  kwallet = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kwallet-5.114.0.tar.xz";
+      sha256 = "1cji8bvy5m77zljyrrgipsw8pxcds1sgikxlq3sdfxymcsw2wr36";
+      name = "kwallet-5.114.0.tar.xz";
+    };
+  };
+  kwayland = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kwayland-5.114.0.tar.xz";
+      sha256 = "1lzmlbv5vl656cigjj07hbc0gj6g1i2xqanvnhxj360109kzilf1";
+      name = "kwayland-5.114.0.tar.xz";
+    };
+  };
+  kwidgetsaddons = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kwidgetsaddons-5.114.0.tar.xz";
+      sha256 = "1cc8lsk9v0cp2wiy1q26mlkf8np0yj01sq8a7w13ga5s6hv4sh2n";
+      name = "kwidgetsaddons-5.114.0.tar.xz";
+    };
+  };
+  kwindowsystem = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kwindowsystem-5.114.0.tar.xz";
+      sha256 = "03xbsf1pmswd2kpn3pdszp4vndclsh7j02fp22npxaxllmfr4va9";
+      name = "kwindowsystem-5.114.0.tar.xz";
+    };
+  };
+  kxmlgui = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/kxmlgui-5.114.0.tar.xz";
+      sha256 = "0gvjf32ssc0r0bdpb1912ldsr5rjls8vrscwy5gm9g5gw504hmmr";
+      name = "kxmlgui-5.114.0.tar.xz";
+    };
+  };
+  kxmlrpcclient = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/portingAids/kxmlrpcclient-5.114.0.tar.xz";
+      sha256 = "1fgjai3vj3yk67ynhd7blilyrdhdn5nvma3v3j1sbdg98pr7qzar";
+      name = "kxmlrpcclient-5.114.0.tar.xz";
+    };
+  };
+  modemmanager-qt = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/modemmanager-qt-5.114.0.tar.xz";
+      sha256 = "16jqhmcpsffl9a7c0bb4hwjy3bw5rakdsnc5n6y8djc6237jl9pi";
+      name = "modemmanager-qt-5.114.0.tar.xz";
+    };
+  };
+  networkmanager-qt = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/networkmanager-qt-5.114.0.tar.xz";
+      sha256 = "10anjsnrzawrfjlznjvvl2sbxrajl2ddnq2kgl314b5dk7z3yk4n";
+      name = "networkmanager-qt-5.114.0.tar.xz";
+    };
+  };
+  oxygen-icons = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/oxygen-icons-5.114.0.tar.xz";
+      sha256 = "0f6hv5g8y2ggagrq9x9b78bqxqg6bqcpm1xxhf69ybgjikrqdf2r";
+      name = "oxygen-icons-5.114.0.tar.xz";
+    };
+  };
+  plasma-framework = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/plasma-framework-5.114.0.tar.xz";
+      sha256 = "058hl76q35bw3rzmv348azk1lmhkpgmfrxr3jd9s1hphijr8sgcx";
+      name = "plasma-framework-5.114.0.tar.xz";
+    };
+  };
+  prison = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/prison-5.114.0.tar.xz";
+      sha256 = "1wbr1lryxmrx65ilq1bhqsdhhikrih977nhpb02fq0cqnvv7v9i7";
+      name = "prison-5.114.0.tar.xz";
+    };
+  };
+  purpose = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/purpose-5.114.0.tar.xz";
+      sha256 = "1lj67f0x4gvbh9by3c3crbbwwnx7b9ifjna9ggziya4m6zj0m4z1";
+      name = "purpose-5.114.0.tar.xz";
+    };
+  };
+  qqc2-desktop-style = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/qqc2-desktop-style-5.114.0.tar.xz";
+      sha256 = "1y5g91vybjvhwmzpfwrc70q5j7jxf5b972f9fh2vzb930jir6c8g";
+      name = "qqc2-desktop-style-5.114.0.tar.xz";
+    };
+  };
+  solid = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/solid-5.114.0.tar.xz";
+      sha256 = "1slxlj5jhp8g745l328932934633nl81sq3n8fd73h655hymsk4s";
+      name = "solid-5.114.0.tar.xz";
+    };
+  };
+  sonnet = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/sonnet-5.114.0.tar.xz";
+      sha256 = "0zxi96i3gfpx759qc1nyz7jqlswg5ivgr1w9gbbsm1x5fi9ikadx";
+      name = "sonnet-5.114.0.tar.xz";
+    };
+  };
+  syndication = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/syndication-5.114.0.tar.xz";
+      sha256 = "13rjb1zm9yd8vbm9h7avqih5v0rr2srqwglm29l7mcnankqlh4n7";
+      name = "syndication-5.114.0.tar.xz";
+    };
+  };
+  syntax-highlighting = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/syntax-highlighting-5.114.0.tar.xz";
+      sha256 = "1skblg2m0sar63qrgkjsg0w9scixggm5qj7lp4gzjn4hwq6m3n63";
+      name = "syntax-highlighting-5.114.0.tar.xz";
+    };
+  };
+  threadweaver = {
+    version = "5.114.0";
+    src = fetchurl {
+      url = "${mirror}/stable/frameworks/5.114/threadweaver-5.114.0.tar.xz";
+      sha256 = "1y07g58w6z3i11y3djg3aaxanhp9hzaciq61l4dn1gqwghn09xgh";
+      name = "threadweaver-5.114.0.tar.xz";
+    };
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/syndication.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/syndication.nix
new file mode 100644
index 000000000000..1d32f9b70219
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/syndication.nix
@@ -0,0 +1,11 @@
+{ mkDerivation, lib
+, extra-cmake-modules
+, kcodecs
+}:
+
+mkDerivation {
+  pname = "syndication";
+  meta.maintainers = [ lib.maintainers.bkchr ];
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ kcodecs ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/syntax-highlighting.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/syntax-highlighting.nix
new file mode 100644
index 000000000000..fee392140f7e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/syntax-highlighting.nix
@@ -0,0 +1,10 @@
+{ mkDerivation
+, extra-cmake-modules, perl, qtbase, qttools
+}:
+
+mkDerivation {
+  pname = "syntax-highlighting";
+  nativeBuildInputs = [ extra-cmake-modules perl ];
+  buildInputs = [ qttools ];
+  propagatedBuildInputs = [ qtbase ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kde-frameworks/threadweaver.nix b/nixpkgs/pkgs/development/libraries/kde-frameworks/threadweaver.nix
new file mode 100644
index 000000000000..fb43b9f28b06
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kde-frameworks/threadweaver.nix
@@ -0,0 +1,12 @@
+{
+  mkDerivation,
+  extra-cmake-modules,
+  qtbase
+}:
+
+mkDerivation {
+  pname = "threadweaver";
+  nativeBuildInputs = [ extra-cmake-modules ];
+  propagatedBuildInputs = [ qtbase ];
+  outputs = [ "out" "dev" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/kdiagram/default.nix b/nixpkgs/pkgs/development/libraries/kdiagram/default.nix
new file mode 100644
index 000000000000..3cebc05f3d8b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kdiagram/default.nix
@@ -0,0 +1,25 @@
+{
+  mkDerivation, fetchFromGitLab, lib,
+  extra-cmake-modules, qttools,
+  qtbase, qtsvg,
+}:
+
+mkDerivation rec {
+  pname = "kdiagram";
+  version = "2.8.0";
+  src = fetchFromGitLab {
+    domain = "invent.kde.org";
+    owner = "graphics";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-Se131GZE12wqdfN/V4id1pphUvteSrmMaKZ0+lqg1z8=";
+  };
+  nativeBuildInputs = [ extra-cmake-modules qttools ];
+  propagatedBuildInputs = [ qtbase qtsvg ];
+  meta = {
+    description = "Libraries for creating business diagrams";
+    license = lib.licenses.gpl2;
+    platforms = qtbase.meta.platforms;
+    maintainers = [ lib.maintainers.ttuegel ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/kdsoap/default.nix b/nixpkgs/pkgs/development/libraries/kdsoap/default.nix
new file mode 100644
index 000000000000..5dc6b5f962e1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kdsoap/default.nix
@@ -0,0 +1,47 @@
+{ stdenv
+, lib
+, fetchurl
+, cmake
+, qtbase
+, wrapQtAppsHook
+}:
+
+let
+  isQt6 = lib.versions.major qtbase.version == "6";
+  cmakeName = if isQt6 then "KDSoap-qt6" else "KDSoap";
+in stdenv.mkDerivation rec {
+  pname = "kdsoap";
+  version = "2.2.0";
+
+  src = fetchurl {
+    url = "https://github.com/KDAB/KDSoap/releases/download/kdsoap-${version}/kdsoap-${version}.tar.gz";
+    sha256 = "sha256-2e8RlIRCGXyfpEvW+63IQrcoCmDfxAV3r2b97WN681Y=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake wrapQtAppsHook ];
+
+  buildInputs = [ qtbase ];
+
+  cmakeFlags = [ (lib.cmakeBool "KDSoap_QT6" isQt6) ];
+
+  postInstall = ''
+    moveToOutput bin/kdwsdl2cpp* "$dev"
+    substituteInPlace "$out/lib/cmake/${cmakeName}/KDSoapTargets-release.cmake" \
+      --replace $out/bin $dev/bin
+  '';
+
+  meta = with lib; {
+    description = "A Qt-based client-side and server-side SOAP component";
+    longDescription = ''
+      KD Soap is a Qt-based client-side and server-side SOAP component.
+
+      It can be used to create client applications for web services and also
+      provides the means to create web services without the need for any further
+      component such as a dedicated web server.
+    '';
+    license = with licenses; [ gpl2 gpl3 lgpl21 ];
+    maintainers = [ maintainers.ttuegel ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/kerberos/heimdal.nix b/nixpkgs/pkgs/development/libraries/kerberos/heimdal.nix
new file mode 100644
index 000000000000..ff211b6b9c34
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kerberos/heimdal.nix
@@ -0,0 +1,178 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+, python3
+, perl
+, bison
+, flex
+, texinfo
+, perlPackages
+
+, openldap
+, libcap_ng
+, sqlite
+, openssl
+, db
+, libedit
+, pam
+, krb5
+, libmicrohttpd
+, cjson
+
+, CoreFoundation
+, Security
+, SystemConfiguration
+
+, curl
+, jdk
+, unzip
+, which
+
+, nixosTests
+
+, withCJSON ? true
+, withCapNG ? stdenv.isLinux
+# libmicrohttpd should theoretically work for darwin as well, but something is broken.
+# It affects tests check-bx509d and check-httpkadmind.
+, withMicroHTTPD ? stdenv.isLinux
+, withOpenLDAP ? true
+, withOpenLDAPAsHDBModule ? false
+, withOpenSSL ? true
+, withSQLite3 ? true
+}:
+
+assert lib.assertMsg (withOpenLDAPAsHDBModule -> withOpenLDAP) ''
+  OpenLDAP needs to be enabled in order to build the OpenLDAP HDB Module.
+'';
+
+stdenv.mkDerivation {
+  pname = "heimdal";
+  version = "7.8.0-unstable-2023-11-29";
+
+  src = fetchFromGitHub {
+    owner = "heimdal";
+    repo = "heimdal";
+    rev = "3253c49544eacb33d5ad2f6f919b0696e5aab794";
+    hash = "sha256-uljzQBzXrZCZjcIWfioqHN8YsbUUNy14Vo+A3vZIXzM=";
+  };
+
+  outputs = [ "out" "dev" "man" "info" ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+    python3
+    perl
+    bison
+    flex
+    texinfo
+  ]
+  ++ (with perlPackages; [ JSON ]);
+
+  buildInputs = [ db libedit pam ]
+    ++ lib.optionals (stdenv.isDarwin) [ CoreFoundation Security SystemConfiguration ]
+    ++ lib.optionals (withCJSON) [ cjson ]
+    ++ lib.optionals (withCapNG) [ libcap_ng ]
+    ++ lib.optionals (withMicroHTTPD) [ libmicrohttpd ]
+    ++ lib.optionals (withOpenLDAP) [ openldap ]
+    ++ lib.optionals (withOpenSSL) [ openssl ]
+    ++ lib.optionals (withSQLite3) [ sqlite ];
+
+  doCheck = true;
+  nativeCheckInputs = [
+    curl
+    jdk
+    unzip
+    which
+  ];
+
+  configureFlags = [
+    "--with-libedit-include=${libedit.dev}/include"
+    "--with-libedit-lib=${libedit}/lib"
+    "--with-berkeley-db-include=${db.dev}/include"
+    "--with-berkeley-db"
+
+    "--without-x"
+    "--disable-afs-string-to-key"
+  ] ++ lib.optionals (withCapNG) [
+    "--with-capng"
+  ] ++ lib.optionals (withCJSON) [
+    "--with-cjson=${cjson}"
+  ] ++ lib.optionals (withOpenLDAP) [
+    "--with-openldap=${openldap.dev}"
+  ] ++ lib.optionals (withOpenLDAPAsHDBModule) [
+    "--enable-hdb-openldap-module"
+  ] ++ lib.optionals (withSQLite3) [
+    "--with-sqlite3=${sqlite.dev}"
+  ];
+
+  # (check-ldap) slapd resides within ${openldap}/libexec,
+  #              which is not part of $PATH by default.
+  # (check-ldap) prepending ${openldap}/bin to the path to avoid
+  #              using the default installation of openldap on unsandboxed darwin systems,
+  #              which does not support the new mdb backend at the moment (2024-01-13).
+  # (check-ldap) the bdb backend got deprecated in favour of mdb in openldap 2.5.0,
+  #              but the heimdal tests still seem to expect bdb as the openldap backend.
+  #              This might be fixed upstream in a future update.
+  patchPhase = ''
+    runHook prePatch
+
+    substituteInPlace tests/ldap/slapd-init.in \
+      --replace 'SCHEMA_PATHS="' 'SCHEMA_PATHS="${openldap}/etc/schema '
+    substituteInPlace tests/ldap/check-ldap.in \
+      --replace 'PATH=' 'PATH=${openldap}/libexec:${openldap}/bin:'
+    substituteInPlace tests/ldap/slapd.conf \
+      --replace 'database	bdb' 'database mdb'
+
+    runHook postPatch
+  '';
+
+  # (test_cc) heimdal uses librokens implementation of `secure_getenv` on darwin,
+  #           which expects either USER or LOGNAME to be set.
+  preCheck = lib.optionalString (stdenv.isDarwin) ''
+    export USER=nix-builder
+  '';
+
+  # We need to build hcrypt for applications like samba
+  postBuild = ''
+    (cd include/hcrypto; make -j $NIX_BUILD_CORES)
+    (cd lib/hcrypto; make -j $NIX_BUILD_CORES)
+  '';
+
+  postInstall = ''
+    # Install hcrypto
+    (cd include/hcrypto; make -j $NIX_BUILD_CORES install)
+    (cd lib/hcrypto; make -j $NIX_BUILD_CORES install)
+
+    mkdir -p $dev/bin
+    mv $out/bin/krb5-config $dev/bin/
+
+    # asn1 compilers, move them to $dev
+    mv $out/libexec/heimdal/* $dev/bin
+    rmdir $out/libexec/heimdal
+
+    # compile_et is needed for cross-compiling this package and samba
+    mv lib/com_err/.libs/compile_et $dev/bin
+  '';
+
+  # Issues with hydra
+  #  In file included from hxtool.c:34:0:
+  #  hx_locl.h:67:25: fatal error: pkcs10_asn1.h: No such file or directory
+  #enableParallelBuilding = true;
+
+  passthru = {
+    implementation = "heimdal";
+    tests.nixos = nixosTests.kerberos.heimdal;
+  };
+
+  meta = with lib; {
+    homepage = "https://www.heimdal.software";
+    changelog = "https://github.com/heimdal/heimdal/releases";
+    description = "An implementation of Kerberos 5 (and some more stuff)";
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ h7x4 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/kerberos/krb5.nix b/nixpkgs/pkgs/development/libraries/kerberos/krb5.nix
new file mode 100644
index 000000000000..fdf01c195af5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kerberos/krb5.nix
@@ -0,0 +1,124 @@
+{ lib, stdenv, fetchurl, pkg-config, perl, bison, bootstrap_cmds
+, openssl, openldap, libedit, keyutils, libverto, darwin
+
+# for passthru.tests
+, bind
+, curl
+, nixosTests
+, openssh
+, postgresql
+, python3
+
+# Extra Arguments
+, type ? ""
+# This is called "staticOnly" because krb5 does not support
+# builting both static and shared, see below.
+, staticOnly ? false
+, withVerto ? false
+}:
+
+# 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
+  libOnly = type == "lib";
+in
+stdenv.mkDerivation rec {
+  pname = "${type}krb5";
+  version = "1.21.2";
+
+  src = fetchurl {
+    url = "https://kerberos.org/dist/krb5/${lib.versions.majorMinor version}/krb5-${version}.tar.gz";
+    hash = "sha256-lWCUGp2EPAJDpxsXp6xv4xx867W845g9t55Srn6FBJE=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  configureFlags = [ "--localstatedir=/var/lib" ]
+    # krb5's ./configure does not allow passing --enable-shared and --enable-static at the same time.
+    # See https://bbs.archlinux.org/viewtopic.php?pid=1576737#p1576737
+    ++ lib.optionals staticOnly [ "--enable-static" "--disable-shared" ]
+    ++ lib.optional withVerto "--with-system-verto"
+    ++ lib.optional stdenv.isFreeBSD ''WARN_CFLAGS=""''
+    ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform)
+       [ "krb5_cv_attr_constructor_destructor=yes,yes"
+         "ac_cv_func_regcomp=yes"
+         "ac_cv_printf_positional=yes"
+       ];
+
+  nativeBuildInputs = [ pkg-config perl ]
+    ++ lib.optional (!libOnly) bison
+    # Provides the mig command used by the build scripts
+    ++ lib.optional stdenv.isDarwin bootstrap_cmds;
+
+  buildInputs = [ openssl ]
+    ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.libc != "bionic" && !(stdenv.hostPlatform.useLLVM or false)) [ keyutils ]
+    ++ lib.optionals (!libOnly) [ openldap libedit ]
+    ++ lib.optionals withVerto [ libverto ];
+
+  propagatedBuildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk; [
+    libs.xpc
+    frameworks.Kerberos
+  ]);
+
+  sourceRoot = "krb5-${version}/src";
+
+  postPatch = ''
+    substituteInPlace config/shlib.conf \
+        --replace "'ld " "'${stdenv.cc.targetPrefix}ld "
+  '';
+
+  libFolders = [ "util" "include" "lib" "build-tools" ];
+
+  buildPhase = lib.optionalString libOnly ''
+    runHook preBuild
+
+    MAKE="make -j $NIX_BUILD_CORES"
+    for folder in $libFolders; do
+      $MAKE -C $folder
+    done
+
+    runHook postBuild
+  '';
+
+  installPhase = lib.optionalString libOnly ''
+    runHook preInstall
+
+    mkdir -p "$out"/{bin,sbin,lib/pkgconfig,share/{et,man/man1}} \
+      "$dev"/include/{gssapi,gssrpc,kadm5,krb5}
+    for folder in $libFolders; do
+      $MAKE -C $folder install
+    done
+
+    runHook postInstall
+  '';
+
+  # not via outputBin, due to reference from libkrb5.so
+  postInstall = ''
+    moveToOutput bin/krb5-config "$dev"
+  '';
+
+  enableParallelBuilding = true;
+  doCheck = false; # fails with "No suitable file for testing purposes"
+
+  meta = with lib; {
+    description = "MIT Kerberos 5";
+    homepage = "http://web.mit.edu/kerberos/";
+    license = licenses.mit;
+    platforms = platforms.unix ++ platforms.windows;
+  };
+
+  passthru = {
+    implementation = "krb5";
+    tests = {
+      inherit (nixosTests) kerberos;
+      inherit (python3.pkgs) requests-credssp;
+      bind = bind.override { enableGSSAPI = true; };
+      curl = curl.override { gssSupport = true; };
+      openssh = openssh.override { withKerberos = true; };
+      postgresql = postgresql.override { gssSupport = true; };
+    };
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/keybinder/default.nix b/nixpkgs/pkgs/development/libraries/keybinder/default.nix
new file mode 100644
index 000000000000..2efbf85d47c7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/keybinder/default.nix
@@ -0,0 +1,46 @@
+{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, pkg-config, gnome
+, gtk-doc, gtk2, lua, gobject-introspection
+}:
+
+stdenv.mkDerivation rec {
+  pname = "keybinder";
+  version = "0.3.1";
+
+  src = fetchFromGitHub {
+    owner = "engla";
+    repo = "keybinder";
+    rev = "v${version}";
+    sha256 = "sha256-elL6DZtzCwAtoyGZYP0jAma6tHPks2KAtrziWtBENGU=";
+  };
+
+  nativeBuildInputs = [ pkg-config autoconf automake gobject-introspection ];
+
+  buildInputs = [
+    libtool gnome.gnome-common gtk-doc gtk2
+    lua
+  ];
+
+  configureFlags = [ "--disable-python" ];
+
+  preConfigure = ''
+    ./autogen.sh --prefix="$out" $configureFlags
+  '';
+
+  meta = with lib; {
+    description = "Library for registering global key bindings";
+    longDescription = ''
+      keybinder is a library for registering global keyboard shortcuts.
+      Keybinder works with GTK-based applications using the X Window System.
+
+      The library contains:
+
+      * A C library, ``libkeybinder``
+      * Gobject-Introspection (gir)  generated bindings
+      * Lua bindings, ``lua-keybinder``
+    '';
+    homepage = "https://github.com/engla/keybinder/";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.bjornfor ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/keybinder3/default.nix b/nixpkgs/pkgs/development/libraries/keybinder3/default.nix
new file mode 100644
index 000000000000..e7bbd2b131d5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/keybinder3/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, pkg-config, gnome
+, gtk-doc, gtk3, libX11, libXext, libXrender, gobject-introspection
+}:
+
+stdenv.mkDerivation rec {
+  pname = "keybinder3";
+  version = "0.3.2";
+
+  src = fetchFromGitHub {
+    owner = "kupferlauncher";
+    repo = "keybinder";
+    rev = "keybinder-3.0-v${version}";
+    sha256 = "196ibn86j54fywfwwgyh89i9wygm4vh7ls19fn20vrnm6ijlzh9r";
+  };
+
+  strictDeps = true;
+  nativeBuildInputs = [
+    autoconf
+    automake
+    libtool
+    pkg-config
+    gnome.gnome-common
+    gtk-doc
+    gobject-introspection
+  ];
+  buildInputs = [
+    gtk3 libX11 libXext libXrender
+  ];
+
+  preConfigure = ''
+    # NOCONFIGURE fixes 'If you meant to cross compile, use `--host'.'
+    NOCONFIGURE=1 ./autogen.sh --prefix="$out"
+    substituteInPlace ./configure \
+      --replace "dummy pkg-config" 'dummy ''${ac_tool_prefix}pkg-config'
+  '';
+
+  meta = with lib; {
+    description = "Library for registering global key bindings";
+    homepage = "https://github.com/kupferlauncher/keybinder/";
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/keystone/default.nix b/nixpkgs/pkgs/development/libraries/keystone/default.nix
new file mode 100644
index 000000000000..278385a1fd66
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/keystone/default.nix
@@ -0,0 +1,42 @@
+{ lib, stdenv
+, fetchFromGitHub
+, pkg-config
+, cmake
+, python3
+, fixDarwinDylibNames
+}:
+
+stdenv.mkDerivation rec {
+  pname = "keystone";
+  version = "0.9.2";
+
+  src = fetchFromGitHub {
+    owner = "keystone-engine";
+    repo = pname;
+    rev = version;
+    sha256 = "020d1l1aqb82g36l8lyfn2j8c660mm6sh1nl4haiykwgdl9xnxfa";
+  };
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+    "-DCMAKE_INSTALL_LIBDIR=lib"
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+    cmake
+    python3
+  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
+    # TODO: could be replaced by setting CMAKE_INSTALL_NAME_DIR?
+    fixDarwinDylibNames
+  ];
+
+  meta = with lib; {
+    description = "Lightweight multi-platform, multi-architecture assembler framework";
+    homepage = "https://www.keystone-engine.org";
+    license = licenses.gpl2Only;
+    maintainers = with maintainers; [ luc65r ];
+    mainProgram = "kstool";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/kf5gpgmepp/default.nix b/nixpkgs/pkgs/development/libraries/kf5gpgmepp/default.nix
new file mode 100644
index 000000000000..5fa51987eaa7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kf5gpgmepp/default.nix
@@ -0,0 +1,23 @@
+{ mkDerivation, lib, fetchgit, cmake, extra-cmake-modules, qtbase, boost, gpgme }:
+
+mkDerivation {
+  pname = "kf5gpgmepp";
+  version = "16.08.3";
+
+  src = fetchgit {
+    url = "https://anongit.kde.org/gpgmepp.git";
+    rev = "9826f6674e496ce575f606d17c318566381b3b15";
+    sha256 = "02ck2l3s8s7xh44blqaqnc5k49ccicdnzvhiwa67a3zgicz5i0vh";
+  };
+
+  buildInputs = [ extra-cmake-modules qtbase boost ];
+  propagatedBuildInputs = [ gpgme ];
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    license = [ licenses.lgpl2 ];
+    platforms = platforms.linux;
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/khronos-ocl-icd-loader/default.nix b/nixpkgs/pkgs/development/libraries/khronos-ocl-icd-loader/default.nix
new file mode 100644
index 000000000000..57fe21a27c7b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/khronos-ocl-icd-loader/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, opencl-headers, cmake, withTracing ? false }:
+
+stdenv.mkDerivation rec {
+  pname = "opencl-icd-loader";
+  version = "2023.12.14";
+
+  src = fetchFromGitHub {
+    owner = "KhronosGroup";
+    repo = "OpenCL-ICD-Loader";
+    rev = "v${version}";
+    hash = "sha256-/4ixQAwJpygdg+qtR1ccBlz8hmtYYxRgUV5dlJabsg8=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ opencl-headers ];
+
+  cmakeFlags = [
+    (lib.cmakeBool "OCL_ICD_ENABLE_TRACE" withTracing)
+  ];
+
+  meta = with lib; {
+    description = "Official Khronos OpenCL ICD Loader";
+    homepage = "https://github.com/KhronosGroup/OpenCL-ICD-Loader";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ davidtwco ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/kimageannotator/default.nix b/nixpkgs/pkgs/development/libraries/kimageannotator/default.nix
new file mode 100644
index 000000000000..ce1be1d18062
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kimageannotator/default.nix
@@ -0,0 +1,24 @@
+{ lib, mkDerivation, fetchFromGitHub, cmake, qtbase, kcolorpicker, qttools }:
+
+mkDerivation rec {
+  pname = "kimageannotator";
+  version = "0.6.1";
+
+  src = fetchFromGitHub {
+    owner = "ksnip";
+    repo = "kImageAnnotator";
+    rev = "v${version}";
+    sha256 = "sha256-lNoYAJ5yTC5H0gWPVkBGhLroRhFCPyC1DsVBy0IrqL4=";
+  };
+
+  nativeBuildInputs = [ cmake qttools ];
+  buildInputs = [ qtbase kcolorpicker ];
+
+  meta = with lib; {
+    description = "Tool for annotating images";
+    homepage = "https://github.com/ksnip/kImageAnnotator";
+    license = licenses.lgpl3Plus;
+    maintainers = with maintainers; [ fliegendewurst ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/kirigami-addons/default.nix b/nixpkgs/pkgs/development/libraries/kirigami-addons/default.nix
new file mode 100644
index 000000000000..8cefa310b61a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kirigami-addons/default.nix
@@ -0,0 +1,44 @@
+{ lib
+, mkDerivation
+, fetchFromGitLab
+
+, cmake
+, extra-cmake-modules
+
+, ki18n
+, kirigami2
+, qtquickcontrols2
+}:
+
+mkDerivation rec {
+  pname = "kirigami-addons";
+  version = "0.11.0";
+
+  src = fetchFromGitLab {
+    domain = "invent.kde.org";
+    owner = "libraries";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-KTkEfGmQf9kj+9e/rJM7jd/4BqubDLu5/oLkX88uENA=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    extra-cmake-modules
+  ];
+
+  buildInputs = [
+    ki18n
+    kirigami2
+    qtquickcontrols2
+  ];
+
+  meta = with lib; {
+    description = "Add-ons for the Kirigami framework";
+    homepage = "https://invent.kde.org/libraries/kirigami-addons";
+    # https://invent.kde.org/libraries/kirigami-addons/-/blob/b197d98fdd079b6fc651949bd198363872d1be23/src/treeview/treeviewplugin.cpp#L1-5
+    license = licenses.lgpl2Plus;
+    maintainers = with maintainers; [ samueldr matthiasbeyer ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/kissfft/0001-pkgconfig-darwin.patch b/nixpkgs/pkgs/development/libraries/kissfft/0001-pkgconfig-darwin.patch
new file mode 100644
index 000000000000..534d46f0c8ba
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kissfft/0001-pkgconfig-darwin.patch
@@ -0,0 +1,48 @@
+From c0dc376be9154d143574a818417ceed23308b5f2 Mon Sep 17 00:00:00 2001
+From: OPNA2608 <christoph.neidahl@gmail.com>
+Date: Sun, 18 Apr 2021 01:45:20 +0200
+Subject: [PATCH] pkgconfig darwin
+
+---
+ Makefile | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 971c6d6..0f4be0c 100644
+--- a/Makefile
++++ b/Makefile
+@@ -153,7 +153,6 @@ endif
+ # -DKISS_FFT_BUILD to TYPEFLAGS
+ #
+ 
+-ifneq ($(shell uname -s),Darwin)
+ 	PKGCONFIG_KISSFFT_VERSION = $(KFVER_MAJOR).$(KFVER_MINOR).$(KFVER_PATCH)
+ 	PKGCONFIG_KISSFFT_OUTPUT_NAME = $(KISSFFTLIB_SHORTNAME)
+ 	PKGCONFIG_PKG_KISSFFT_DEFS = $(TYPEFLAGS)
+@@ -170,7 +169,6 @@ ifneq ($(shell uname -s),Darwin)
+ 	PKGCONFIG_KISSFFT_LIBDIR = $(ABS_LIBDIR)
+   endif
+ 	PKGCONFIG_KISSFFT_PKGINCLUDEDIR = $${includedir}/kissfft
+-endif
+ 
+ export TYPEFLAGS
+ 
+@@ -226,7 +224,6 @@ ifneq ($(KISSFFT_STATIC), 1)
+ 	ln -sf $(KISSFFTLIB_NAME) $(KISSFFTLIB_SODEVELNAME)
+   endif
+ endif
+-ifneq ($(shell uname -s),Darwin)
+ 	mkdir "$(ABS_LIBDIR)/pkgconfig"
+ 	sed \
+ 		-e 's+@PKGCONFIG_KISSFFT_VERSION@+$(PKGCONFIG_KISSFFT_VERSION)+' \
+@@ -238,7 +235,6 @@ ifneq ($(shell uname -s),Darwin)
+ 		-e 's+@PKGCONFIG_KISSFFT_LIBDIR@+$(PKGCONFIG_KISSFFT_LIBDIR)+' \
+ 		-e 's+@PKGCONFIG_KISSFFT_PKGINCLUDEDIR@+$(PKGCONFIG_KISSFFT_PKGINCLUDEDIR)+' \
+ 		kissfft.pc.in 1>"$(ABS_LIBDIR)/pkgconfig/$(KISSFFT_PKGCONFIG)"
+-endif
+ ifneq ($(KISSFFT_TOOLS), 0)
+ 	make -C tools install
+ endif
+-- 
+2.29.3
+
diff --git a/nixpkgs/pkgs/development/libraries/kissfft/default.nix b/nixpkgs/pkgs/development/libraries/kissfft/default.nix
new file mode 100644
index 000000000000..503cad45fd9e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kissfft/default.nix
@@ -0,0 +1,85 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fftw
+, fftwFloat
+, python3
+, datatype ? "double"
+, withTools ? false
+, libpng
+, enableStatic ? stdenv.hostPlatform.isStatic
+, enableOpenmp ? false
+, llvmPackages
+}:
+let
+  py = python3.withPackages (ps: with ps; [ numpy ]);
+  option = cond: if cond then "1" else "0";
+in
+stdenv.mkDerivation rec {
+  pname = "kissfft-${datatype}${lib.optionalString enableOpenmp "-openmp"}";
+  version = "131.1.0";
+
+  src = fetchFromGitHub {
+    owner = "mborgerding";
+    repo = "kissfft";
+    rev = version;
+    sha256 = "1yfws5bn4kh62yk6hdyp9h9775l6iz7wsfisbn58jap6b56s8j5s";
+  };
+
+  patches = [
+    ./0001-pkgconfig-darwin.patch
+  ];
+
+  # https://bugs.llvm.org/show_bug.cgi?id=45034
+  postPatch = lib.optionalString (stdenv.hostPlatform.isLinux && stdenv.cc.isClang && lib.versionOlder stdenv.cc.version "10") ''
+    substituteInPlace test/Makefile \
+      --replace "-ffast-math" ""
+  ''
+  + lib.optionalString (stdenv.hostPlatform.isDarwin) ''
+    substituteInPlace test/Makefile \
+      --replace "LD_LIBRARY_PATH" "DYLD_LIBRARY_PATH"
+    # Don't know how to make math.h's double long constants available
+    substituteInPlace test/testcpp.cc \
+      --replace "M_PIl" "M_PI"
+  '';
+
+  makeFlags = [
+    "PREFIX=${placeholder "out"}"
+    "KISSFFT_DATATYPE=${datatype}"
+    "KISSFFT_TOOLS=${option withTools}"
+    "KISSFFT_STATIC=${option enableStatic}"
+    "KISSFFT_OPENMP=${option enableOpenmp}"
+  ];
+
+  buildInputs = lib.optionals (withTools && datatype != "simd") [ libpng ]
+    # TODO: This may mismatch the LLVM version in the stdenv, see #79818.
+    ++ lib.optional (enableOpenmp && stdenv.cc.isClang) llvmPackages.openmp;
+
+  doCheck = true;
+
+  nativeCheckInputs = [
+    py
+    (if datatype == "float" then fftwFloat else fftw)
+  ];
+
+  checkFlags = [ "testsingle" ];
+
+  postInstall = ''
+    ln -s ${pname}.pc $out/lib/pkgconfig/kissfft.pc
+  '';
+
+  # Tools can't find kissfft libs on Darwin
+  postFixup = lib.optionalString (withTools && stdenv.hostPlatform.isDarwin) ''
+    for bin in $out/bin/*; do
+      install_name_tool -change lib${pname}.dylib $out/lib/lib${pname}.dylib $bin
+    done
+  '';
+
+  meta = with lib; {
+    description = "A mixed-radix Fast Fourier Transform based up on the KISS principle";
+    homepage = "https://github.com/mborgerding/kissfft";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/kmsxx/default.nix b/nixpkgs/pkgs/development/libraries/kmsxx/default.nix
new file mode 100644
index 000000000000..a07bc73a64ce
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kmsxx/default.nix
@@ -0,0 +1,43 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, meson
+, ninja
+, cmake
+, pkg-config
+, libdrm
+, fmt
+, libevdev
+, withPython ? false
+, python3Packages
+}:
+
+stdenv.mkDerivation {
+  pname = "kmsxx";
+  version = "2021-07-26";
+
+  src = fetchFromGitHub {
+    owner = "tomba";
+    repo = "kmsxx";
+    fetchSubmodules = true;
+    rev = "54f591ec0de61dd192baf781c9b2ec87d5b461f7";
+    sha256 = "sha256-j+20WY4a2iTKZnYjXhxbNnZZ53K3dHpDMTp+ZulS+7c=";
+  };
+
+  # Didn't detect pybind11 without cmake
+  nativeBuildInputs = [ meson ninja pkg-config ] ++ lib.optionals withPython [ cmake ];
+  buildInputs = [ libdrm fmt libevdev ]
+    ++ lib.optionals withPython (with python3Packages; [ python pybind11 ]);
+
+  dontUseCmakeConfigure = true;
+
+  mesonFlags = lib.optional (!withPython) "-Dpykms=disabled";
+
+  meta = with lib; {
+    description = "C++11 library, utilities and python bindings for Linux kernel mode setting";
+    homepage = "https://github.com/tomba/kmsxx";
+    license = licenses.mpl20;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/kompute/default.nix b/nixpkgs/pkgs/development/libraries/kompute/default.nix
new file mode 100644
index 000000000000..ced30a87dbfa
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kompute/default.nix
@@ -0,0 +1,60 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, vulkan-headers
+, vulkan-loader
+, fmt
+, glslang
+, ninja
+}:
+
+stdenv.mkDerivation rec {
+  pname = "kompute";
+  version = "0.8.1";
+
+  src = fetchFromGitHub {
+    owner = "KomputeProject";
+    repo = "kompute";
+    rev = "v${version}";
+    sha256 = "sha256-OkVGYh8QrD7JNqWFBLrDTYlk6IYHdvt4i7UtC4sQTzo=";
+  };
+
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/KomputeProject/kompute/commit/9a791b161dd58ca927fe090f65fa2b0e5e85e7ca.diff";
+      sha256 = "OtFTN8sgPlyiMmVzUnqzCkVMKj6DWxbCXtYwkRdEprY=";
+    })
+    (fetchpatch {
+      name = "enum-class-fix-for-fmt-8-x.patch";
+      url = "https://github.com/KomputeProject/kompute/commit/f731f2e55c7aaaa804111106c3e469f9a642d4eb.patch";
+      sha256 = "sha256-scTCYqkgKQnH27xzuY4FVbiwRuwBvChmLPPU7ZUrrL0=";
+    })
+  ];
+
+  cmakeFlags = [
+    "-DKOMPUTE_OPT_INSTALL=1"
+    "-DRELEASE=1"
+    "-DKOMPUTE_ENABLE_SPDLOG=1"
+  ];
+
+  nativeBuildInputs = [ cmake ninja ];
+  buildInputs = [ fmt ];
+  propagatedBuildInputs = [ glslang vulkan-headers vulkan-loader ];
+
+  meta = with lib; {
+    description = "General purpose GPU compute framework built on Vulkan";
+    longDescription = ''
+      General purpose GPU compute framework built on Vulkan to
+      support 1000s of cross vendor graphics cards (AMD,
+      Qualcomm, NVIDIA & friends). Blazing fast, mobile-enabled,
+      asynchronous and optimized for advanced GPU data
+      processing usecases. Backed by the Linux Foundation"
+    '';
+    homepage = "https://kompute.cc/";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ atila ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/kpeoplevcard/default.nix b/nixpkgs/pkgs/development/libraries/kpeoplevcard/default.nix
new file mode 100644
index 000000000000..689b7c9869b6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kpeoplevcard/default.nix
@@ -0,0 +1,42 @@
+{ stdenv
+, lib
+, fetchurl
+, cmake
+, pkg-config
+, wrapQtAppsHook
+, extra-cmake-modules
+, kcoreaddons
+, kpeople
+, kcontacts
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "kpeoplevcard";
+  version = "0.1";
+
+  src = fetchurl {
+    url = "mirror://kde/stable/kpeoplevcard/${finalAttrs.version}/kpeoplevcard-${finalAttrs.version}.tar.xz";
+    sha256 = "1hv3fq5k0pps1wdvq9r1zjnr0nxf8qc3vwsnzh9jpvdy79ddzrcd";
+  };
+
+  buildInputs = [
+    kcoreaddons
+    kpeople
+    kcontacts
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    wrapQtAppsHook
+    extra-cmake-modules
+  ];
+
+  meta = with lib; {
+    description = "Pulseaudio bindings for Qt";
+    homepage    = "https://github.com/KDE/kpeoplevcard";
+    license     = with licenses; [ lgpl2 ];
+    maintainers = with maintainers; [ doronbehar ];
+  };
+})
+
diff --git a/nixpkgs/pkgs/development/libraries/kproperty/default.nix b/nixpkgs/pkgs/development/libraries/kproperty/default.nix
new file mode 100644
index 000000000000..991fd4d27a74
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kproperty/default.nix
@@ -0,0 +1,29 @@
+{
+  mkDerivation, lib, fetchurl,
+  extra-cmake-modules,
+  qtbase, kconfig, kcoreaddons, kwidgetsaddons, kguiaddons,
+  qttools
+}:
+
+mkDerivation rec {
+  pname = "kproperty";
+  version = "3.2.0";
+
+  src = fetchurl {
+    url = "mirror://kde/stable/${pname}/src/${pname}-${version}.tar.xz";
+    sha256 = "1yldfsdamk4dag8dyryjn5n9j2pzi42s79kkafymfnbifhnhrbv7";
+  };
+
+  nativeBuildInputs = [ extra-cmake-modules ];
+
+  buildInputs = [ kconfig kcoreaddons kwidgetsaddons kguiaddons qttools ];
+
+  propagatedBuildInputs = [ qtbase ];
+
+  meta = with lib; {
+    description = "A property editing framework with editor widget similar to what is known from Qt Designer";
+    license = licenses.lgpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ zraexy ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/kquickimageedit/default.nix b/nixpkgs/pkgs/development/libraries/kquickimageedit/default.nix
new file mode 100644
index 000000000000..cd43904a123e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kquickimageedit/default.nix
@@ -0,0 +1,33 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, extra-cmake-modules
+, qtbase
+, qtdeclarative
+}:
+
+stdenv.mkDerivation rec {
+  pname = "kquickimageeditor";
+  version = "0.3.0";
+
+  src = fetchFromGitLab {
+    domain = "invent.kde.org";
+    owner = "libraries";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-+BByt07HMb4u6j9bVZqkUPvyRaElKvJ2MjKlPakL87E=";
+  };
+
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ qtbase qtdeclarative ];
+  cmakeFlags = ["-DQT_MAJOR_VERSION=${lib.versions.major qtbase.version}"];
+  dontWrapQtApps = true;
+
+  meta = with lib; {
+    description = "Set of QtQuick components providing basic image editing capabilities";
+    homepage = "https://invent.kde.org/libraries/kquickimageeditor";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.unix;
+    badPlatforms = platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/kreport/default.nix b/nixpkgs/pkgs/development/libraries/kreport/default.nix
new file mode 100644
index 000000000000..1c8470204f80
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kreport/default.nix
@@ -0,0 +1,26 @@
+{
+  mkDerivation, lib, fetchurl,
+  extra-cmake-modules,
+  qtdeclarative, qtwebkit, kconfig, kcoreaddons, kwidgetsaddons, kguiaddons, kproperty, marble, python3
+}:
+
+mkDerivation rec {
+  pname = "kreport";
+  version = "3.2.0";
+
+  src = fetchurl {
+    url = "mirror://kde/stable/${pname}/src/${pname}-${version}.tar.xz";
+    sha256 = "1mycsvkz5rphi9df2i4ch4ykvprd4m76acsdzs3zis2ljrqnsw92";
+  };
+
+  nativeBuildInputs = [ extra-cmake-modules ];
+
+  buildInputs = [ qtdeclarative qtwebkit kconfig kcoreaddons kwidgetsaddons kguiaddons kproperty marble python3 ];
+
+  meta = with lib; {
+    description = "A framework for creation and generation of reports in multiple formats";
+    license = licenses.lgpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ zraexy ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/kronosnet/default.nix b/nixpkgs/pkgs/development/libraries/kronosnet/default.nix
new file mode 100644
index 000000000000..bff25956f7a9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kronosnet/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub
+, autoreconfHook, pkg-config
+, libqb, libxml2, libnl, lksctp-tools
+, nss, openssl, bzip2, lzo, lz4, xz, zlib, zstd
+, doxygen
+}:
+
+stdenv.mkDerivation rec {
+  pname = "kronosnet";
+  version = "1.28";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-HxdZy2TiQT7pWyhaSq4YJAcqjykzWy1aI3gEZrlbghQ=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config doxygen ];
+
+  buildInputs = [
+    libqb libxml2 libnl lksctp-tools
+    nss openssl
+    bzip2 lzo lz4 xz zlib zstd
+  ];
+
+  meta = with lib; {
+    description = "VPN on steroids";
+    homepage = "https://kronosnet.org/";
+    license = with licenses; [ lgpl21Plus gpl2Plus ];
+    maintainers = with maintainers; [ ryantm ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ktextaddons/default.nix b/nixpkgs/pkgs/development/libraries/ktextaddons/default.nix
new file mode 100644
index 000000000000..b648109d150e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ktextaddons/default.nix
@@ -0,0 +1,20 @@
+{ lib, mkDerivation, fetchurl, cmake, extra-cmake-modules, karchive, kconfigwidgets, kcoreaddons, ki18n, kxmlgui, qtkeychain }:
+mkDerivation rec {
+  pname = "ktextaddons";
+  version = "1.3.2";
+
+  src = fetchurl {
+    url = "mirror://kde/stable/${pname}/${pname}-${version}.tar.xz";
+    hash = "sha256-mB7Hh2Ljrg8D2GxDyHCa1s6CVmg5DDkhwafEqtSqUeM=";
+  };
+
+  nativeBuildInputs = [ cmake extra-cmake-modules ];
+  buildInputs = [ karchive kconfigwidgets kcoreaddons ki18n kxmlgui qtkeychain ];
+
+  meta = with lib; {
+    description = "Various text handling addons for KDE applications";
+    homepage = "https://invent.kde.org/libraries/ktextaddons/";
+    license = licenses.gpl2Plus;
+    maintainers = [];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/kuserfeedback/default.nix b/nixpkgs/pkgs/development/libraries/kuserfeedback/default.nix
new file mode 100644
index 000000000000..5e1fe28297fd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kuserfeedback/default.nix
@@ -0,0 +1,23 @@
+{ lib
+, mkDerivation
+, fetchurl
+, extra-cmake-modules
+, qttools
+}:
+mkDerivation rec {
+  pname = "kuserfeedback";
+  version = "1.3.0";
+
+  src = fetchurl {
+    url = "mirror://kde/stable/${pname}/${pname}-${version}.tar.xz";
+    hash = "sha256-JSMIuCLdRpDqhasWiMmw2lUSl4rGtDX3ell5/B0v/RM=";
+  };
+
+  nativeBuildInputs = [ extra-cmake-modules qttools ];
+
+  meta = with lib; {
+    license = [ licenses.mit ];
+    maintainers = [ maintainers.k900 ];
+    description = "Framework for collecting user feedback for apps via telemetry and surveys";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/kweathercore/default.nix b/nixpkgs/pkgs/development/libraries/kweathercore/default.nix
new file mode 100644
index 000000000000..943dee42c0e9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kweathercore/default.nix
@@ -0,0 +1,37 @@
+{ mkDerivation
+, lib
+, fetchFromGitLab
+, extra-cmake-modules
+, kholidays
+, ki18n
+, qtlocation
+}:
+
+mkDerivation rec {
+  pname = "kweathercore";
+  version = "0.7";
+
+  src = fetchFromGitLab {
+    domain = "invent.kde.org";
+    owner = "libraries";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-CnnoPkgz97SfDG13zfyIWweVnp2oxAChTPKFxJC+L8A=";
+  };
+
+  buildInputs = [
+    kholidays
+    ki18n
+    qtlocation
+  ];
+
+  nativeBuildInputs = [ extra-cmake-modules ];
+
+  meta = with lib; {
+    license = [ licenses.cc0 ];
+    maintainers = [ maintainers.samueldr ];
+    description = ''
+      Library to facilitate retrieval of weather information including forecasts and alerts
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/kyotocabinet/default.nix b/nixpkgs/pkgs/development/libraries/kyotocabinet/default.nix
new file mode 100644
index 000000000000..37c918785fb9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/kyotocabinet/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchurl, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "kyotocabinet";
+  version = "1.2.80";
+
+  src = fetchurl {
+    url = "https://dbmx.net/kyotocabinet/pkg/kyotocabinet-${version}.tar.gz";
+    sha256 = "sha256-TIXXNmaNgpIL/b25KsPWa32xEI8JWBp2ndkWCgLe80k=";
+  };
+
+  prePatch = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace kccommon.h \
+      --replace tr1/unordered_map unordered_map \
+      --replace tr1/unordered_set unordered_set \
+      --replace tr1::hash std::hash \
+      --replace tr1::unordered_map std::unordered_map \
+      --replace tr1::unordered_set std::unordered_set
+
+    substituteInPlace lab/kcdict/Makefile --replace stdc++ c++
+    substituteInPlace configure \
+        --replace /usr/local/bin:/usr/local/sbin: "" \
+        --replace /usr/bin:/usr/sbin: "" \
+        --replace /bin:/sbin: "" \
+        --replace stdc++ c++
+  '';
+
+  buildInputs = [ zlib ];
+
+  meta = with lib; {
+    homepage = "https://dbmx.net/kyotocabinet";
+    description = "A library of routines for managing a database";
+    license = licenses.gpl3Plus;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/l-smash/default.nix b/nixpkgs/pkgs/development/libraries/l-smash/default.nix
new file mode 100644
index 000000000000..40eb4bd10d36
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/l-smash/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, which }:
+
+stdenv.mkDerivation rec {
+  pname = "l-smash";
+  version = "2.14.5";
+
+  src = fetchFromGitHub {
+    owner = "l-smash";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0rcq9727im6kd8da8b7kzzbzxdldvmh5nsljj9pvr4m3lj484b02";
+  };
+
+  nativeBuildInputs = [ which ];
+
+  configureFlags = [
+    "--cc=cc"
+    "--cross-prefix=${stdenv.cc.targetPrefix}"
+  ];
+
+  meta = with lib; {
+    homepage = "http://l-smash.github.io/l-smash/";
+    description = "MP4 container utilities";
+    license = licenses.isc;
+    maintainers = with maintainers; [ tadeokondrak ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/lame/default.nix b/nixpkgs/pkgs/development/libraries/lame/default.nix
new file mode 100644
index 000000000000..576d166f0ca7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lame/default.nix
@@ -0,0 +1,62 @@
+{ lib, stdenv, fetchurl
+, nasmSupport ? true, nasm # Assembly optimizations
+, cpmlSupport ? true # Compaq's fast math library
+#, efenceSupport ? false, libefence # Use ElectricFence for malloc debugging
+, sndfileFileIOSupport ? false, libsndfile # Use libsndfile, instead of lame's internal routines
+, analyzerHooksSupport ? true # Use analyzer hooks
+, decoderSupport ? true # mpg123 decoder
+, frontendSupport ? true # Build the lame executable
+#, mp3xSupport ? false, gtk1 # Build GTK frame analyzer
+, mp3rtpSupport ? false # Build mp3rtp
+, debugSupport ? false # Debugging (disables optimizations)
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lame";
+  version = "3.100";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/lame/${pname}-${version}.tar.gz";
+    sha256 = "07nsn5sy3a8xbmw1bidxnsj5fj6kg9ai04icmqw40ybkp353dznx";
+  };
+
+  outputs = [ "out" "lib" "doc" ]; # a small single header
+  outputMan = "out";
+
+  nativeBuildInputs = [ ]
+    ++ lib.optional nasmSupport nasm;
+
+  buildInputs = [ ]
+    #++ optional efenceSupport libefence
+    #++ optional mp3xSupport gtk1
+    ++ lib.optional sndfileFileIOSupport libsndfile;
+
+  configureFlags = [
+    (lib.enableFeature nasmSupport "nasm")
+    (lib.enableFeature cpmlSupport "cpml")
+    #(enableFeature efenceSupport "efence")
+    (if sndfileFileIOSupport then "--with-fileio=sndfile" else "--with-fileio=lame")
+    (lib.enableFeature analyzerHooksSupport "analyzer-hooks")
+    (lib.enableFeature decoderSupport "decoder")
+    (lib.enableFeature frontendSupport "frontend")
+    (lib.enableFeature frontendSupport "dynamic-frontends")
+    #(enableFeature mp3xSupport "mp3x")
+    (lib.enableFeature mp3rtpSupport "mp3rtp")
+    (lib.optionalString debugSupport "--enable-debug=alot")
+  ];
+
+  preConfigure = ''
+    # Prevent a build failure for 3.100 due to using outdated symbol list
+    # https://hydrogenaud.io/index.php/topic,114777.msg946373.html#msg946373
+    sed -i '/lame_init_old/d' include/libmp3lame.sym
+  '';
+
+  meta = with lib; {
+    description = "A high quality MPEG Audio Layer III (MP3) encoder";
+    homepage    = "http://lame.sourceforge.net";
+    license     = licenses.lgpl2;
+    maintainers = with maintainers; [ codyopel ];
+    platforms   = platforms.all;
+    mainProgram = "lame";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/languagemachines/frog.nix b/nixpkgs/pkgs/development/libraries/languagemachines/frog.nix
new file mode 100644
index 000000000000..50167f28a9db
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/languagemachines/frog.nix
@@ -0,0 +1,54 @@
+{ lib, stdenv, fetchurl
+, automake, autoconf, bzip2, libtar, libtool, pkg-config, autoconf-archive
+, libxml2, icu
+, languageMachines
+}:
+
+let
+  release = lib.importJSON ./release-info/LanguageMachines-frog.json;
+in
+
+stdenv.mkDerivation {
+  pname = "frog";
+  version = release.version;
+  src = fetchurl { inherit (release) url sha256;
+                   name = "frog-v${release.version}.tar.gz"; };
+  nativeBuildInputs = [ pkg-config automake autoconf ];
+  buildInputs = [ bzip2 libtar libtool autoconf-archive
+                  libxml2 icu
+                  languageMachines.ticcutils
+                  languageMachines.timbl
+                  languageMachines.mbt
+                  languageMachines.libfolia
+                  languageMachines.ucto
+                  languageMachines.frogdata
+                ];
+
+  preConfigure = ''
+    sh bootstrap.sh
+  '';
+  postInstall = ''
+    # frog expects the data files installed in the same prefix
+    mkdir -p $out/share/frog/;
+    for f in ${languageMachines.frogdata}/share/frog/*; do
+      ln -s $f $out/share/frog/;
+    done;
+
+    make check
+  '';
+
+  meta = with lib; {
+    description = "A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for Dutch";
+    homepage    = "https://languagemachines.github.io/frog";
+    license     = licenses.gpl3;
+    platforms   = platforms.all;
+    maintainers = with maintainers; [ roberth ];
+
+    longDescription = ''
+      Frog is an integration of memory-based natural language processing (NLP) modules developed for Dutch. All NLP modules are based on Timbl, the Tilburg memory-based learning software package. Most modules were created in the 1990s at the ILK Research Group (Tilburg University, the Netherlands) and the CLiPS Research Centre (University of Antwerp, Belgium). Over the years they have been integrated into a single text processing tool, which is currently maintained and developed by the Language Machines Research Group and the Centre for Language and Speech Technology at Radboud University Nijmegen. A dependency parser, a base phrase chunker, and a named-entity recognizer module were added more recently. Where possible, Frog makes use of multi-processor support to run subtasks in parallel.
+
+      Various (re)programming rounds have been made possible through funding by NWO, the Netherlands Organisation for Scientific Research, particularly under the CGN project, the IMIX programme, the Implicit Linguistics project, the CLARIN-NL programme and the CLARIAH programme.
+    '';
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/languagemachines/frogdata.nix b/nixpkgs/pkgs/development/libraries/languagemachines/frogdata.nix
new file mode 100644
index 000000000000..5b1b07e79277
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/languagemachines/frogdata.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl
+, automake, autoconf, libtool, pkg-config, autoconf-archive
+}:
+
+let
+  release = lib.importJSON ./release-info/LanguageMachines-frogdata.json;
+in
+
+stdenv.mkDerivation {
+  pname = "frogdata";
+  version = release.version;
+  src = fetchurl { inherit (release) url sha256;
+                   name = "frogdata-${release.version}.tar.gz"; };
+  nativeBuildInputs = [ pkg-config automake autoconf ];
+  buildInputs = [ libtool autoconf-archive
+                ];
+
+  preConfigure = ''
+    sh bootstrap.sh
+  '';
+
+  meta = with lib; {
+    description = "Data for Frog, a Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for Dutch";
+    homepage    = "https://languagemachines.github.io/frog";
+    license     = licenses.gpl3;
+    platforms   = platforms.all;
+    maintainers = with maintainers; [ roberth ];
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/languagemachines/libfolia.nix b/nixpkgs/pkgs/development/libraries/languagemachines/libfolia.nix
new file mode 100644
index 000000000000..6cc5bcade205
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/languagemachines/libfolia.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchurl
+, automake, autoconf, libtool, pkg-config, autoconf-archive
+, libxml2, icu, bzip2, libtar
+, languageMachines }:
+
+let
+  release = lib.importJSON ./release-info/LanguageMachines-libfolia.json;
+in
+
+stdenv.mkDerivation {
+  pname = "libfolia";
+  version = release.version;
+  src = fetchurl { inherit (release) url sha256;
+                   name = "libfolia-${release.version}.tar.gz"; };
+  nativeBuildInputs = [ pkg-config automake autoconf ];
+  buildInputs = [ bzip2 libtool autoconf-archive libtar libxml2 icu languageMachines.ticcutils ];
+  preConfigure = "sh bootstrap.sh";
+
+  # compat with icu61+ https://github.com/unicode-org/icu/blob/release-64-2/icu4c/readme.html#L554
+  CXXFLAGS = [ "-DU_USING_ICU_NAMESPACE=1" ];
+
+  meta = with lib; {
+    description = "A C++ API for FoLiA documents; an XML-based linguistic annotation format.";
+    homepage    = "https://proycon.github.io/folia/";
+    license     = licenses.gpl3;
+    platforms   = platforms.all;
+    maintainers = with maintainers; [ roberth ];
+
+    longDescription = ''
+      A high-level C++ API to read, manipulate, and create FoLiA documents. FoLiA is an XML-based annotation format, suitable for the representation of linguistically annotated language resources. FoLiA’s intended use is as a format for storing and/or exchanging language resources, including corpora.
+    '';
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/languagemachines/mbt-add-libxml2-dep.patch b/nixpkgs/pkgs/development/libraries/languagemachines/mbt-add-libxml2-dep.patch
new file mode 100644
index 000000000000..9037f1093bb9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/languagemachines/mbt-add-libxml2-dep.patch
@@ -0,0 +1,13 @@
+--- a/configure.ac	2017-06-12 06:48:15.000000000 +0200
++++ b/configure.ac	2017-06-12 06:50:06.000000000 +0200
+@@ -76,6 +76,10 @@
+ CXXFLAGS="$CXXFLAGS $ticcutils_CFLAGS"
+ LIBS="$LIBS $ticcutils_LIBS"
+ 
++PKG_CHECK_MODULES([libxml2], [libxml-2.0 >= 2.6.16] )
++CXXFLAGS="$CXXFLAGS $libxml2_CFLAGS"
++LIBS="$LIBS $libxml2_LIBS"
++
+ AC_CONFIG_FILES([
+   Makefile
+   mbt.pc
diff --git a/nixpkgs/pkgs/development/libraries/languagemachines/mbt.nix b/nixpkgs/pkgs/development/libraries/languagemachines/mbt.nix
new file mode 100644
index 000000000000..9556c1d56701
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/languagemachines/mbt.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv, fetchurl
+, automake, autoconf, bzip2, libtar, libtool, pkg-config, autoconf-archive
+, libxml2
+, languageMachines
+}:
+
+let
+  release = lib.importJSON ./release-info/LanguageMachines-mbt.json;
+in
+
+stdenv.mkDerivation {
+  pname = "mbt";
+  version = release.version;
+  src = fetchurl { inherit (release) url sha256;
+                   name = "mbt-${release.version}.tar.gz"; };
+  nativeBuildInputs = [ pkg-config automake autoconf ];
+  buildInputs = [ bzip2 libtar libtool autoconf-archive
+                  libxml2
+                  languageMachines.ticcutils
+                  languageMachines.timbl
+                ];
+  patches = [ ./mbt-add-libxml2-dep.patch ];
+  preConfigure = ''
+    sh bootstrap.sh
+  '';
+
+  meta = with lib; {
+    description = "Memory Based Tagger";
+    homepage    = "https://languagemachines.github.io/mbt/";
+    license     = licenses.gpl3;
+    platforms   = platforms.all;
+    maintainers = with maintainers; [ roberth ];
+
+    longDescription = ''
+      MBT is a memory-based tagger-generator and tagger in one. The tagger-generator part can generate a sequence tagger on the basis of a training set of tagged sequences; the tagger part can tag new sequences. MBT can, for instance, be used to generate part-of-speech taggers or chunkers for natural language processing. It has also been used for named-entity recognition, information extraction in domain-specific texts, and disfluency chunking in transcribed speech.
+
+      Mbt is used by Frog for Dutch tagging.
+    '';
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/languagemachines/packages.nix b/nixpkgs/pkgs/development/libraries/languagemachines/packages.nix
new file mode 100644
index 000000000000..8a490bbc9867
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/languagemachines/packages.nix
@@ -0,0 +1,18 @@
+{ pkgs }:
+let
+  inherit (pkgs) callPackage;
+  icu = pkgs.icu60;
+in
+{
+  ticcutils = callPackage ./ticcutils.nix { };
+  libfolia = callPackage ./libfolia.nix { inherit icu; };
+  ucto = callPackage ./ucto.nix { inherit icu; };
+  uctodata = callPackage ./uctodata.nix { };
+  timbl = callPackage ./timbl.nix { };
+  timblserver = callPackage ./timblserver.nix { };
+  mbt = callPackage ./mbt.nix { };
+  frog = callPackage ./frog.nix { inherit icu; };
+  frogdata = callPackage ./frogdata.nix { };
+
+  test = callPackage ./test.nix { };
+}
diff --git a/nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-frog.json b/nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-frog.json
new file mode 100644
index 000000000000..55c2ec20a312
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-frog.json
@@ -0,0 +1,5 @@
+{
+  "version": "v0.13.7",
+  "url": "https://api.github.com/repos/LanguageMachines/frog/tarball/v0.13.7",
+  "sha256": "0swyfi3g862n888qj8v8kd18745hasy0vnc70i9qlv0ji0321bnf"
+}
diff --git a/nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-frogdata.json b/nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-frogdata.json
new file mode 100644
index 000000000000..6ea449387172
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-frogdata.json
@@ -0,0 +1,5 @@
+{
+  "version": "0.13",
+  "url": "https://api.github.com/repos/LanguageMachines/frogdata/tarball/v0.13",
+  "sha256": "13mhv8qacl0n20ddl1ay49xi6h2m0a149ya3rrsmaah3x4adb4sg"
+}
diff --git a/nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-libfolia.json b/nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-libfolia.json
new file mode 100644
index 000000000000..792d958213fb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-libfolia.json
@@ -0,0 +1,5 @@
+{
+  "version": "v1.7",
+  "url": "https://api.github.com/repos/LanguageMachines/libfolia/tarball/v1.7",
+  "sha256": "0hpxdry7n2887klryc587xv46p6z6jp6hz9x7k2pk5v7jb0z4s65"
+}
diff --git a/nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-mbt.json b/nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-mbt.json
new file mode 100644
index 000000000000..f1bbff47a28e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-mbt.json
@@ -0,0 +1,5 @@
+{
+  "version": "v3.2.16",
+  "url": "https://api.github.com/repos/LanguageMachines/mbt/tarball/v3.2.16",
+  "sha256": "0f9f5l84m0lmmv4km9myn3yhy67jbmk3qn2fi40dy025gx4l0x3x"
+}
diff --git a/nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-ticcutils.json b/nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-ticcutils.json
new file mode 100644
index 000000000000..11069c6b02c7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-ticcutils.json
@@ -0,0 +1,5 @@
+{
+  "version": "v0.15",
+  "url": "https://api.github.com/repos/LanguageMachines/ticcutils/tarball/v0.15",
+  "sha256": "0lssb1klx2flmr6fy78j37i5lbq3gfhzjx24j6n72ndm2rvprvcn"
+}
diff --git a/nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-timbl.json b/nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-timbl.json
new file mode 100644
index 000000000000..d35f2c8333aa
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-timbl.json
@@ -0,0 +1,5 @@
+{
+  "version": "v6.4.9",
+  "url": "https://api.github.com/repos/LanguageMachines/timbl/tarball/v6.4.9",
+  "sha256": "1279npc3xlq05hnkylpbkgg941gjhvl6sd5fw4vgwcx2rwmmlaay"
+}
diff --git a/nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-timblserver.json b/nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-timblserver.json
new file mode 100644
index 000000000000..d588da3f8b6e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-timblserver.json
@@ -0,0 +1,5 @@
+{
+  "version": "v1.11",
+  "url": "https://api.github.com/repos/LanguageMachines/timblserver/tarball/v1.11",
+  "sha256": "02k8c704wr5miy82w6zj0imm7sdfnxf3db34qiaa8l3myhn17qlw"
+}
diff --git a/nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-ucto.json b/nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-ucto.json
new file mode 100644
index 000000000000..9b05cf3e1393
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-ucto.json
@@ -0,0 +1,5 @@
+{
+  "version": "v0.9.6",
+  "url": "https://api.github.com/repos/LanguageMachines/ucto/tarball/v0.9.6",
+  "sha256": "0fxq4j32g7kp6789xz23651c4v2j7zlz87cshfv9g1xjs7jxns3f"
+}
diff --git a/nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-uctodata.json b/nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-uctodata.json
new file mode 100644
index 000000000000..08069bb333bc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/languagemachines/release-info/LanguageMachines-uctodata.json
@@ -0,0 +1,5 @@
+{
+  "version": "v0.4",
+  "url": "https://api.github.com/repos/LanguageMachines/uctodata/tarball/v0.4",
+  "sha256": "02c78qmwi9ijpk5wila3p62fmfdy1rpmlvvzbxs3wg0rdb0nwvd2"
+}
diff --git a/nixpkgs/pkgs/development/libraries/languagemachines/test.nix b/nixpkgs/pkgs/development/libraries/languagemachines/test.nix
new file mode 100644
index 000000000000..26fff825a151
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/languagemachines/test.nix
@@ -0,0 +1,25 @@
+{ runCommand
+, languageMachines
+}:
+
+runCommand "frog-test" {} ''
+  ${languageMachines.frog}/bin/frog >$out <<EOF
+  Dit is een test
+
+  EOF
+  echo "Frog output:"
+  cat $out
+
+  expected () {
+    echo "Test expectation failed: $@"
+    exit 1
+  }
+
+  lines="$(wc -l $out | awk '{print $1}')"
+  test 5 = $lines || expected "Five lines of output"
+  grep "is" $out | grep "zijn" >/dev/null || expected "Stemming works"
+  grep "een" $out | grep "onbep" >/dev/null || expected "Tagging works"
+
+  deps="$(echo $(awk 'BEGIN { FS = "\t*" } ; {print $1 " -> " $9 "; "}' <$out))"
+  test "1 -> 2; 2 -> 0; 3 -> 4; 4 -> 2; -> ;" = "$deps" || expected "Dependency parsing works"
+''
diff --git a/nixpkgs/pkgs/development/libraries/languagemachines/ticcutils.nix b/nixpkgs/pkgs/development/libraries/languagemachines/ticcutils.nix
new file mode 100644
index 000000000000..0b5fef292fcf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/languagemachines/ticcutils.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl
+, automake, autoconf, libtool, pkg-config, autoconf-archive
+, libxml2, zlib, bzip2, libtar }:
+
+let
+  release = lib.importJSON ./release-info/LanguageMachines-ticcutils.json;
+in
+
+stdenv.mkDerivation {
+  pname = "ticcutils";
+  version = release.version;
+  src = fetchurl { inherit (release) url sha256;
+                   name = "ticcutils-${release.version}.tar.gz"; };
+  nativeBuildInputs = [ pkg-config automake autoconf ];
+  buildInputs = [ libtool autoconf-archive libxml2
+                  # optional:
+                  zlib bzip2 libtar
+                  # broken but optional: boost
+                ];
+  preConfigure = "sh bootstrap.sh";
+
+  meta = with lib; {
+    description = "This module contains useful functions for general use in the TiCC software stack and beyond.";
+    homepage    = "https://github.com/LanguageMachines/ticcutils";
+    license     = licenses.gpl3;
+    platforms   = platforms.all;
+    maintainers = with maintainers; [ roberth ];
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/languagemachines/timbl.nix b/nixpkgs/pkgs/development/libraries/languagemachines/timbl.nix
new file mode 100644
index 000000000000..1585798170b3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/languagemachines/timbl.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchurl
+, automake, autoconf, libtool, pkg-config, autoconf-archive
+, libxml2, bzip2, libtar
+, languageMachines
+}:
+
+let
+  release = lib.importJSON ./release-info/LanguageMachines-timbl.json;
+in
+
+stdenv.mkDerivation {
+  pname = "timbl";
+  version = release.version;
+  src = fetchurl { inherit (release) url sha256;
+                   name = "timbl-${release.version}.tar.gz"; };
+  nativeBuildInputs = [ pkg-config automake autoconf ];
+  buildInputs = [ bzip2 libtar libtool autoconf-archive
+                  libxml2
+                  languageMachines.ticcutils
+                ];
+  preConfigure = "sh bootstrap.sh";
+
+  meta = with lib; {
+    description = "TiMBL implements several memory-based learning algorithms";
+    homepage    = "https://github.com/LanguageMachines/timbl/";
+    license     = licenses.gpl3;
+    platforms   = platforms.all;
+    maintainers = with maintainers; [ roberth ];
+
+    longDescription = ''
+      TiMBL is an open source software package implementing several memory-based learning algorithms, among which IB1-IG, an implementation of k-nearest neighbor classification with feature weighting suitable for symbolic feature spaces, and IGTree, a decision-tree approximation of IB1-IG. All implemented algorithms have in common that they store some representation of the training set explicitly in memory. During testing, new cases are classified by extrapolation from the most similar stored cases.
+
+      For over fifteen years TiMBL has been mostly used in natural language processing as a machine learning classifier component, but its use extends to virtually any supervised machine learning domain. Due to its particular decision-tree-based implementation, TiMBL is in many cases far more efficient in classification than a standard k-nearest neighbor algorithm would be.
+    '';
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/languagemachines/timblserver.nix b/nixpkgs/pkgs/development/libraries/languagemachines/timblserver.nix
new file mode 100644
index 000000000000..ea40d017d471
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/languagemachines/timblserver.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchurl
+, automake, autoconf, bzip2, libtar, libtool, pkg-config, autoconf-archive
+, libxml2
+, languageMachines
+}:
+
+let
+  release = lib.importJSON ./release-info/LanguageMachines-timblserver.json;
+in
+
+stdenv.mkDerivation {
+  pname = "timblserver";
+  version = release.version;
+  src = fetchurl { inherit (release) url sha256;
+                   name = "timblserver-${release.version}.tar.gz"; };
+  nativeBuildInputs = [ pkg-config automake autoconf ];
+  buildInputs = [ bzip2 libtar libtool autoconf-archive
+                  libxml2
+                  languageMachines.ticcutils
+                  languageMachines.timbl
+                ];
+  preConfigure = "sh bootstrap.sh";
+
+  meta = with lib; {
+    description = "This server for TiMBL implements several memory-based learning algorithms";
+    homepage    = "https://github.com/LanguageMachines/timblserver/";
+    license     = licenses.gpl3;
+    platforms   = platforms.all;
+    maintainers = with maintainers; [ roberth ];
+
+    longDescription = ''
+      This implements a server for TiMBL. TiMBL is an open source software package implementing several memory-based learning algorithms, among which IB1-IG, an implementation of k-nearest neighbor classification with feature weighting suitable for symbolic feature spaces, and IGTree, a decision-tree approximation of IB1-IG. All implemented algorithms have in common that they store some representation of the training set explicitly in memory. During testing, new cases are classified by extrapolation from the most similar stored cases.
+
+      For over fifteen years TiMBL has been mostly used in natural language processing as a machine learning classifier component, but its use extends to virtually any supervised machine learning domain. Due to its particular decision-tree-based implementation, TiMBL is in many cases far more efficient in classification than a standard k-nearest neighbor algorithm would be.
+    '';
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/languagemachines/ucto.nix b/nixpkgs/pkgs/development/libraries/languagemachines/ucto.nix
new file mode 100644
index 000000000000..f707d9fb8b6e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/languagemachines/ucto.nix
@@ -0,0 +1,49 @@
+{ lib, stdenv, fetchurl
+, automake, autoconf, libtool, pkg-config, autoconf-archive
+, libxml2, icu, bzip2, libtar
+, languageMachines
+}:
+
+let
+  release = lib.importJSON ./release-info/LanguageMachines-ucto.json;
+in
+
+stdenv.mkDerivation {
+  pname = "ucto";
+  version = release.version;
+  src = fetchurl { inherit (release) url sha256;
+                   name = "ucto-${release.version}.tar.gz"; };
+  nativeBuildInputs = [ pkg-config automake autoconf ];
+  buildInputs = [ bzip2 libtool autoconf-archive
+                  icu libtar libxml2
+                  languageMachines.ticcutils
+                  languageMachines.libfolia
+                  languageMachines.uctodata
+                  # TODO textcat from libreoffice? Pulls in X11 dependencies?
+                ];
+  preConfigure = "sh bootstrap.sh;";
+
+  postInstall = ''
+    # ucto expects the data files installed in the same prefix
+    mkdir -p $out/share/ucto/;
+    for f in ${languageMachines.uctodata}/share/ucto/*; do
+      echo "Linking $f"
+      ln -s $f $out/share/ucto/;
+    done;
+  '';
+
+  meta = with lib; {
+    description = "A rule-based tokenizer for natural language";
+    homepage    = "https://languagemachines.github.io/ucto/";
+    license     = licenses.gpl3;
+    platforms   = platforms.all;
+    maintainers = with maintainers; [ roberth ];
+
+    longDescription = ''
+      Ucto tokenizes text files: it separates words from punctuation, and splits sentences. It offers several other basic preprocessing steps such as changing case that you can all use to make your text suited for further processing such as indexing, part-of-speech tagging, or machine translation.
+
+      Ucto comes with tokenisation rules for several languages and can be easily extended to suit other languages. It has been incorporated for tokenizing Dutch text in Frog, a Dutch morpho-syntactic processor.
+    '';
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/languagemachines/uctodata.nix b/nixpkgs/pkgs/development/libraries/languagemachines/uctodata.nix
new file mode 100644
index 000000000000..a274b6193edd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/languagemachines/uctodata.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchurl
+, automake, autoconf, libtool, pkg-config, autoconf-archive
+ }:
+
+let
+  release = lib.importJSON ./release-info/LanguageMachines-uctodata.json;
+in
+
+stdenv.mkDerivation {
+  pname = "uctodata";
+  version = release.version;
+  src = fetchurl { inherit (release) url sha256;
+                   name = "uctodata-${release.version}.tar.gz"; };
+  nativeBuildInputs = [ pkg-config automake autoconf ];
+  buildInputs = [ libtool autoconf-archive ];
+  preConfigure = "sh bootstrap.sh";
+
+  meta = with lib; {
+    description = "A rule-based tokenizer for natural language";
+    homepage    = "https://languagemachines.github.io/ucto/";
+    license     = licenses.gpl3;
+    platforms   = platforms.all;
+    maintainers = with maintainers; [ roberth ];
+
+    longDescription = ''
+      Ucto tokenizes text files: it separates words from punctuation, and splits sentences. It offers several other basic preprocessing steps such as changing case that you can all use to make your text suited for further processing such as indexing, part-of-speech tagging, or machine translation.
+
+      Ucto comes with tokenisation rules for several languages and can be easily extended to suit other languages. It has been incorporated for tokenizing Dutch text in Frog, a Dutch morpho-syntactic processor.
+    '';
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/languagemachines/update b/nixpkgs/pkgs/development/libraries/languagemachines/update
new file mode 100755
index 000000000000..3189637df746
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/languagemachines/update
@@ -0,0 +1,79 @@
+#!/usr/bin/env nix-shell
+#!nix-shell --packages curl
+#!nix-shell --packages jq
+#!nix-shell --packages parallel
+#!nix-shell -i bash
+
+# Exit immediately if a command exits with a non-zero status.
+# Exit when a producer fails in a pipe
+# Treat undefined variable references as errors
+set -e -o pipefail -u
+
+# Check if working directory is (probably) right
+test "./update" = $0 || {
+    echo "The working directory ought to be the same is the update script location. Please invoke as ./update" 1>&2
+    exit 1
+}
+
+# Create temporary directory with automatic cleanup
+readonly MY_TMP="$(mktemp -d)"
+cleanup () {
+    rm -rf "$MY_TMP"
+}
+trap cleanup EXIT
+
+# stdout: file containing release info and a convenient placeholder
+# for the sha256 attribute
+getRelease () {
+    local owner="$1"
+    local repo="$2"
+    local out="$MY_TMP/$owner--$repo-release"
+    curl -fSs https://api.github.com/repos/"$owner"/"$repo"/releases/latest \
+        | jq '{ version: .name, url: .tarball_url, sha256: "__SHA256__" }' \
+             > "$out"
+    echo "$out"
+}
+
+# 'getters' for the release info file
+
+# stdout: unquoted tarball url
+releaseUrl () {
+    local file="$1"
+    jq -r '.url' <"$file"
+}
+
+# stdout: unquoted version
+releaseVersion () {
+    local file="$1"
+    jq -r '.version' <"$file"
+}
+
+# Fetch release tarball and compute hash
+# stdout: base32 sha256 to be used in fetchurl
+getReleaseHash () {
+    local file="$1"
+    local name="$2"
+    nix-prefetch-url "$(releaseUrl "$file")" --name "$name-$(releaseVersion "$file").tar.gz"
+}
+
+# Write a release info file to release-info/$owner-$repo.json
+updateRelease () {
+    local owner="$1"
+    local repo="$2"
+    local r="$(getRelease "$owner" "$repo")"
+    local hash="$(getReleaseHash "$r" "$repo")"
+    sed \
+      -e s/__SHA256__/"$hash"/\
+      <"$r" \
+      >"release-info/$owner-$repo.json"
+}
+
+updateRelease LanguageMachines frogdata
+updateRelease LanguageMachines frog
+updateRelease LanguageMachines libfolia
+updateRelease LanguageMachines mbt
+updateRelease LanguageMachines ticcutils
+updateRelease LanguageMachines timbl
+updateRelease LanguageMachines timblserver
+updateRelease LanguageMachines ucto
+updateRelease LanguageMachines uctodata
diff --git a/nixpkgs/pkgs/development/libraries/lasem/default.nix b/nixpkgs/pkgs/development/libraries/lasem/default.nix
new file mode 100644
index 000000000000..9c49429ece45
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lasem/default.nix
@@ -0,0 +1,39 @@
+{ fetchurl, lib, stdenv, pkg-config, intltool, gobject-introspection, glib, gdk-pixbuf
+, libxml2, cairo, pango, gnome }:
+
+stdenv.mkDerivation rec {
+  pname = "lasem";
+  version = "0.4.4";
+
+  outputs = [ "bin" "out" "dev" "man" "doc" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "0fds3fsx84ylsfvf55zp65y8xqjj5n8gbhcsk02vqglivk7izw4v";
+  };
+
+  nativeBuildInputs = [ pkg-config intltool gobject-introspection ];
+
+  propagatedBuildInputs = [
+    glib gdk-pixbuf libxml2 cairo pango
+  ];
+
+  enableParallelBuilding = true;
+  doCheck = true;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = {
+    description = "SVG and MathML rendering library";
+
+    homepage = "https://wiki.gnome.org/Projects/Lasem";
+    license = lib.licenses.gpl2Plus;
+
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/lasso/default.nix b/nixpkgs/pkgs/development/libraries/lasso/default.nix
new file mode 100644
index 000000000000..e3f91c3d827c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lasso/default.nix
@@ -0,0 +1,59 @@
+{ lib, stdenv
+, autoreconfHook
+, fetchurl
+, glib
+, gobject-introspection
+, gtk-doc
+, libtool
+, libxml2
+, libxslt
+, openssl
+, pkg-config
+, python3
+, xmlsec
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lasso";
+  version = "2.8.2";
+
+  src = fetchurl {
+    url = "https://dev.entrouvert.org/lasso/lasso-${version}.tar.gz";
+    hash = "sha256-ahgxv9v49CTHUIq6R7BF1RNB7A/ekSLziwuGsJbvUz4=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+    python3
+    gobject-introspection
+  ];
+
+  buildInputs = [
+    glib
+    gtk-doc
+    libtool
+    libxml2
+    libxslt
+    openssl
+    python3.pkgs.six
+    xmlsec
+    zlib
+  ];
+
+  configurePhase = ''
+    ./configure --with-pkg-config=$PKG_CONFIG_PATH \
+                --disable-perl \
+                --prefix=$out
+  '';
+
+  meta = with lib; {
+    homepage = "https://lasso.entrouvert.org/";
+    description = "Liberty Alliance Single Sign-On library";
+    changelog = "https://git.entrouvert.org/entrouvert/lasso/raw/tag/v${version}/ChangeLog";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ womfoo ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/lcm/default.nix b/nixpkgs/pkgs/development/libraries/lcm/default.nix
new file mode 100644
index 000000000000..dcd50a6f4fe1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lcm/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchFromGitHub, cmake, glib, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "lcm";
+  version = "1.5.0";
+
+  src = fetchFromGitHub {
+    owner = "lcm-proj";
+    repo = "lcm";
+    rev = "v${version}";
+    hash = "sha256-IFHoJl5OtnUb+w3gLG5f578yAektjgrY9Uj2eUVoIrc=";
+  };
+
+  outputs = [ "out" "dev" "man" ];
+
+  nativeBuildInputs = [
+    pkg-config
+    cmake
+  ];
+
+  buildInputs = [
+    glib
+  ];
+
+  meta = with lib; {
+    description = "Lightweight Communications and Marshalling (LCM)";
+    homepage = "https://github.com/lcm-proj/lcm";
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ kjeremy ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/lcms/cve-2013-4276.patch b/nixpkgs/pkgs/development/libraries/lcms/cve-2013-4276.patch
new file mode 100644
index 000000000000..8f2f32297828
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lcms/cve-2013-4276.patch
@@ -0,0 +1,62 @@
+diff -ur lcms-1.19.dfsg/samples/icctrans.c lcms-1.19.dfsg-patched/samples/icctrans.c
+--- lcms-1.19.dfsg/samples/icctrans.c	2009-10-30 15:57:45.000000000 +0000
++++ lcms-1.19.dfsg-patched/samples/icctrans.c	2013-08-06 11:53:14.385266647 +0100
+@@ -86,6 +86,8 @@
+ static LPcmsNAMEDCOLORLIST InputColorant = NULL;
+ static LPcmsNAMEDCOLORLIST OutputColorant = NULL;
+ 
++unsigned int Buffer_size = 4096;
++
+ 
+ // isatty replacement
+ 
+@@ -500,7 +502,7 @@
+ 
+     Prefix[0] = 0;
+     if (!lTerse)
+-        sprintf(Prefix, "%s=", C);
++        snprintf(Prefix, 20, "%s=", C);
+ 
+     if (InHexa)
+     {
+@@ -648,7 +650,9 @@
+ static
+ void GetLine(char* Buffer)
+ {    
+-    scanf("%s", Buffer);
++    char User_buffer[Buffer_size];
++    fgets(User_buffer, (Buffer_size - 1), stdin);
++    sscanf(User_buffer,"%s", Buffer);
+     
+     if (toupper(Buffer[0]) == 'Q') { // Quit?
+ 
+@@ -668,7 +672,7 @@
+ static
+ double GetAnswer(const char* Prompt, double Range)
+ {
+-    char Buffer[4096];
++    char Buffer[Buffer_size];
+     double val = 0.0;
+ 	       
+     if (Range == 0.0) {              // Range 0 means double value
+@@ -738,7 +742,7 @@
+ static
+ WORD GetIndex(void)
+ {
+-    char Buffer[4096], Name[40], Prefix[40], Suffix[40];
++    char Buffer[Buffer_size], Name[40], Prefix[40], Suffix[40];
+     int index, max;
+ 
+     max = cmsNamedColorCount(hTrans)-1;
+diff -ur lcms-1.19.dfsg/tifficc/tiffdiff.c lcms-1.19.dfsg-patched/tifficc/tiffdiff.c
+--- lcms-1.19.dfsg/tifficc/tiffdiff.c	2009-10-30 15:57:46.000000000 +0000
++++ lcms-1.19.dfsg-patched/tifficc/tiffdiff.c	2013-08-06 11:49:06.698951157 +0100
+@@ -633,7 +633,7 @@
+     cmsIT8SetSheetType(hIT8, "TIFFDIFF");
+     
+    
+-    sprintf(Buffer, "Differences between %s and %s", TiffName1, TiffName2);
++    snprintf(Buffer, 256, "Differences between %s and %s", TiffName1, TiffName2);
+   
+     cmsIT8SetComment(hIT8, Buffer);
+ 
diff --git a/nixpkgs/pkgs/development/libraries/lcms/default.nix b/nixpkgs/pkgs/development/libraries/lcms/default.nix
new file mode 100644
index 000000000000..9a957a119243
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lcms/default.nix
@@ -0,0 +1,24 @@
+{lib, stdenv, fetchurl}:
+
+stdenv.mkDerivation rec {
+  pname = "lcms";
+  version = "1.19";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/lcms/${pname}-${version}.tar.gz";
+    sha256 = "1abkf8iphwyfs3z305z3qczm3z1i9idc1lz4gvfg92jnkz5k5bl0";
+  };
+
+  patches = [ ./cve-2013-4276.patch ];
+
+  outputs = [ "bin" "dev" "out" "man" ];
+
+  doCheck = false; # fails with "Error in Linear interpolation (2p): Must be i=8000, But is n=8001"
+
+  meta = {
+    description = "Color management engine";
+    homepage = "http://www.littlecms.com/";
+    license = lib.licenses.mit;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/lcms2/default.nix b/nixpkgs/pkgs/development/libraries/lcms2/default.nix
new file mode 100644
index 000000000000..ab984884073a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lcms2/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchurl, libtiff, libjpeg, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "lcms2";
+  version = "2.16";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/lcms/${pname}-${version}.tar.gz";
+    hash = "sha256-2HPTSti5tM6gEGMfGmIo0gh0deTcXnY+uBrMI9nUWlE=";
+  };
+
+  outputs = [ "bin" "dev" "out" ];
+
+  propagatedBuildInputs = [ libtiff libjpeg zlib ];
+
+  # See https://trac.macports.org/ticket/60656
+  LDFLAGS = if stdenv.hostPlatform.isDarwin then "-Wl,-w" else null;
+
+  meta = with lib; {
+    description = "Color management engine";
+    homepage = "http://www.littlecms.com/";
+    license = licenses.mit;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/lcrq/default.nix b/nixpkgs/pkgs/development/libraries/lcrq/default.nix
new file mode 100644
index 000000000000..865ec4697326
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lcrq/default.nix
@@ -0,0 +1,28 @@
+{
+  stdenv,
+  fetchFromGitea,
+  lib
+}:
+stdenv.mkDerivation (finalAttrs: {
+  name = "lcrq";
+  version = "0.1.2";
+
+  src = fetchFromGitea {
+    domain = "codeberg.org";
+    owner = "librecast";
+    repo = "lcrq";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-r4UiZ9oNDxF3rHMqg+1NLLjm6LPZtzgtZOs7pRe5SdQ=";
+  };
+
+  installFlags = [ "PREFIX=$(out)" ];
+
+  meta = {
+    changelog = "https://codeberg.org/librecast/lcrq/src/tag/v${finalAttrs.version}/CHANGELOG.md";
+    description = "Librecast RaptorQ library.";
+    homepage = "https://librecast.net/lcrq.html";
+    license = [ lib.licenses.gpl2 lib.licenses.gpl3 ];
+    maintainers = with lib.maintainers; [ albertchae aynish DMills27 jasonodoom jleightcap ];
+    platforms = lib.platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/ldacbt/default.nix b/nixpkgs/pkgs/development/libraries/ldacbt/default.nix
new file mode 100644
index 000000000000..a467eb8e0d51
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ldacbt/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ldacBT";
+  version = "2.0.2.3";
+
+  src = fetchFromGitHub {
+    repo = "ldacBT";
+    owner = "ehfive";
+    rev = "v${version}";
+    sha256 = "09dalysx4fgrgpfdm9a51x6slnf4iik1sqba4xjgabpvq91bnb63";
+    fetchSubmodules = true;
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  cmakeFlags = [
+    # CMakeLists.txt by default points to $out
+    "-DINSTALL_INCLUDEDIR=${placeholder "dev"}/include"
+  ];
+
+  meta = with lib; {
+    description = "AOSP libldac dispatcher";
+    homepage    = "https://github.com/EHfive/ldacBT";
+    license     = licenses.asl20;
+    # libldac code detects & #error's out on non-LE byte order
+    platforms   = platforms.littleEndian;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ldb/default.nix b/nixpkgs/pkgs/development/libraries/ldb/default.nix
new file mode 100644
index 000000000000..de1af1f447e8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ldb/default.nix
@@ -0,0 +1,80 @@
+{ lib, stdenv
+, fetchurl
+, python3
+, pkg-config
+, readline
+, tdb
+, talloc
+, tevent
+, popt
+, libxslt
+, docbook-xsl-nons
+, docbook_xml_dtd_42
+, cmocka
+, wafHook
+, libxcrypt
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ldb";
+  version = "2.8.0";
+
+  src = fetchurl {
+    url = "mirror://samba/ldb/${pname}-${version}.tar.gz";
+    hash = "sha256-NY3KEPzScgeshXoNf0NaRtvGzR98ENu4QMGTG/GWXwg=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [
+    pkg-config
+    python3
+    wafHook
+    libxslt
+    docbook-xsl-nons
+    docbook_xml_dtd_42
+    tdb
+    tevent
+  ];
+
+  buildInputs = [
+    python3
+    readline # required to build python
+    tdb
+    talloc
+    tevent
+    popt
+    cmocka
+    libxcrypt
+  ];
+
+  # otherwise the configure script fails with
+  # PYTHONHASHSEED=1 missing! Don't use waf directly, use ./configure and make!
+  preConfigure = ''
+    export PKGCONFIG="$PKG_CONFIG"
+    export PYTHONHASHSEED=1
+  '';
+
+  wafPath = "buildtools/bin/waf";
+
+  wafConfigureFlags = [
+    "--bundled-libraries=NONE"
+    "--builtin-libraries=replace"
+    "--without-ldb-lmdb"
+  ];
+
+  # python-config from build Python gives incorrect values when cross-compiling.
+  # If python-config is not found, the build falls back to using the sysconfig
+  # module, which works correctly in all cases.
+  PYTHON_CONFIG = "/invalid";
+
+  stripDebugList = [ "bin" "lib" "modules" ];
+
+  meta = with lib; {
+    broken = stdenv.isDarwin;
+    description = "A LDAP-like embedded database";
+    homepage = "https://ldb.samba.org/";
+    license = licenses.lgpl3Plus;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ldns/default.nix b/nixpkgs/pkgs/development/libraries/ldns/default.nix
new file mode 100644
index 000000000000..1e696b1175a4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ldns/default.nix
@@ -0,0 +1,51 @@
+{ lib, stdenv, fetchurl, openssl, perl, which, dns-root-data }:
+
+stdenv.mkDerivation rec {
+  pname = "ldns";
+  version = "1.8.3";
+
+  src = fetchurl {
+    url = "https://www.nlnetlabs.nl/downloads/ldns/${pname}-${version}.tar.gz";
+    sha256 = "sha256-w/ct0QNrKQfjpW5qz537LlUSVrPBu9l4eULe7rcOeGA=";
+  };
+
+  postPatch = ''
+    patchShebangs doc/doxyparse.pl
+  '';
+
+  outputs = [ "out" "dev" "man" "examples" ];
+
+  nativeBuildInputs = [ perl ];
+  buildInputs = [ openssl ];
+
+  configureFlags = [
+    "--with-ssl=${openssl.dev}"
+    "--with-trust-anchor=${dns-root-data}/root.key"
+    "--with-drill"
+    "--disable-gost"
+    "--with-examples"
+  ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "ac_cv_func_malloc_0_nonnull=yes"
+    "ac_cv_func_realloc_0_nonnull=yes"
+  ];
+
+  nativeCheckInputs = [ which ];
+  doCheck = false; # fails. missing some files
+
+  postInstall = ''
+    # Only 'drill' stays in $out
+    # the rest are examples:
+    moveToOutput "bin/ldns*" "$examples"
+    # with exception of ldns-config, which goes to $dev:
+    moveToOutput "bin/ldns-config" "$dev"
+  '';
+
+  meta = with lib; {
+    description = "Library with the aim of simplifying DNS programming in C";
+    homepage = "http://www.nlnetlabs.nl/projects/ldns/";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ dtzWill ];
+    mainProgram = "drill";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ldutils/default.nix b/nixpkgs/pkgs/development/libraries/ldutils/default.nix
new file mode 100644
index 000000000000..0268aa8ce62d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ldutils/default.nix
@@ -0,0 +1,41 @@
+{ mkDerivation
+, lib
+, fetchFromGitLab
+, qtcharts
+, qtsvg
+, qmake
+}:
+
+mkDerivation rec {
+  pname = "ldutils";
+  version = "1.10";
+
+  src = fetchFromGitLab {
+    owner = "ldutils-projects";
+    repo = pname;
+    rev = "v_${version}";
+    sha256 = "sha256-fP+tZY+ayaeuxPvywO/639sNE+IwrxaEJ245q9HTOCU=";
+  };
+
+  buildInputs = [
+    qtcharts
+    qtsvg
+  ];
+
+  nativeBuildInputs = [
+    qmake
+  ];
+
+  qmakeFlags = [ "ldutils.pro" ];
+
+  LDUTILS_LIB=placeholder "out";
+  LDUTILS_INCLUDE=placeholder "out";
+
+  meta = with lib; {
+    description = "Headers and link library for other ldutils projects";
+    homepage = "https://gitlab.com/ldutils-projects/ldutils";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ sohalt ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/leatherman/default.nix b/nixpkgs/pkgs/development/libraries/leatherman/default.nix
new file mode 100644
index 000000000000..47bdd0ffb480
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/leatherman/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchFromGitHub, boost, cmake, curl, ruby }:
+
+stdenv.mkDerivation rec {
+  pname = "leatherman";
+  version = "1.12.11";
+
+  src = fetchFromGitHub {
+    sha256 = "sha256-XB5qIXPe1Tu+cfxuL+HAfR9QQNiUY/noO51CVEz9hsU=";
+    rev = version;
+    repo = "leatherman";
+    owner = "puppetlabs";
+  };
+
+  cmakeFlags = [ "-DLEATHERMAN_ENABLE_TESTING=OFF" ];
+
+  env.NIX_CFLAGS_COMPILE = "-Wno-error";
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ boost curl ruby ];
+
+  meta = with lib; {
+    homepage = "https://github.com/puppetlabs/leatherman/";
+    description = "A collection of C++ and CMake utility libraries";
+    license = licenses.asl20;
+    maintainers = [ maintainers.womfoo ];
+    platforms = platforms.unix;
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/lemon-graph/default.nix b/nixpkgs/pkgs/development/libraries/lemon-graph/default.nix
new file mode 100644
index 000000000000..ae071a727133
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lemon-graph/default.nix
@@ -0,0 +1,33 @@
+{ lib
+, stdenv
+, fetchurl
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lemon-graph";
+  version = "1.3.1";
+
+  src = fetchurl {
+    url = "https://lemon.cs.elte.hu/pub/sources/lemon-${version}.tar.gz";
+    sha256 = "1j6kp9axhgna47cfnmk1m7vnqn01hwh7pf1fp76aid60yhjwgdvi";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  # error: no viable conversion from ...
+  doCheck = !stdenv.isDarwin;
+
+  patches = [
+    # error: ISO C++17 does not allow 'register' storage class specifier
+    ./remove-register.patch
+  ];
+
+  meta = with lib; {
+    homepage = "https://lemon.cs.elte.hu/trac/lemon";
+    description = "Efficient library for combinatorial optimization tasks on graphs and networks";
+    license = licenses.boost;
+    maintainers = with maintainers; [ trepetti ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/lemon-graph/remove-register.patch b/nixpkgs/pkgs/development/libraries/lemon-graph/remove-register.patch
new file mode 100644
index 000000000000..002e832035bf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lemon-graph/remove-register.patch
@@ -0,0 +1,15 @@
+diff --git a/lemon/random.h b/lemon/random.h
+index 8de74ede8a..f9861f3916 100644
+--- a/lemon/random.h
++++ b/lemon/random.h
+@@ -249,8 +249,8 @@ namespace lemon {
+ 
+         current = state + length;
+ 
+-        register Word *curr = state + length - 1;
+-        register long num;
++        Word *curr = state + length - 1;
++        long num;
+ 
+         num = length - shift;
+         while (num--) {
diff --git a/nixpkgs/pkgs/development/libraries/lensfun/default.nix b/nixpkgs/pkgs/development/libraries/lensfun/default.nix
new file mode 100644
index 000000000000..efd65c1695d4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lensfun/default.nix
@@ -0,0 +1,63 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config, glib, zlib, libpng, cmake, libxml2, python3 }:
+
+let
+  version = "0.3.3";
+  pname = "lensfun";
+
+  # Fetch a more recent version of the repo containing a more recent lens
+  # database
+  lensfunDatabase = fetchFromGitHub {
+    owner = "lensfun";
+    repo = "lensfun";
+    rev = "ec9412d27d5fa8f377848a59c768b12c243cb80d";
+    sha256 = "sha256-/u/3oQzac/dQrgFaiYvzT5uQ108XarkXnA2DByA5sic=";
+  };
+
+in
+stdenv.mkDerivation {
+  inherit pname version;
+
+  src = fetchFromGitHub {
+    owner = "lensfun";
+    repo = "lensfun";
+    rev = "v${version}";
+    sha256 = "0ixf0f7qv0mc7zrw9w1sb60w833g4rqrfj8cjxwzv2vimqcksccz";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "fix-compilation-with-clang.patch";
+      url = "https://github.com/lensfun/lensfun/commit/5c2065685a22f19f8138365c0e5acf0be8329c02.patch";
+      sha256 = "sha256-tAOCNL37pKE7hfQCu+hUTKLFnRHWF5Dplqf+GaucG+4=";
+    })
+  ];
+
+  # replace database with a more recent snapshot
+  # the mastr branch uses version 2 profiles, while 0.3.3 requires version 1 profiles,
+  # so we run the conversion tool the project provides,
+  # then untar the verson 1 profiles into the source dir before we build
+  prePatch = ''
+    rm -R data/db
+    python3 ${lensfunDatabase}/tools/lensfun_convert_db_v2_to_v1.py $TMPDIR ${lensfunDatabase}/data/db
+    mkdir -p data/db
+    tar xvf $TMPDIR/db/version_1.tar -C data/db
+    date +%s > data/db/timestamp.txt
+  '';
+
+  nativeBuildInputs = [
+    cmake pkg-config
+    python3 python3.pkgs.lxml # For the db converison
+  ];
+
+  buildInputs = [ glib zlib libpng ];
+
+  cmakeFlags = [ "-DINSTALL_HELPER_SCRIPTS=OFF" ];
+
+  meta = with lib; {
+    platforms = platforms.linux ++ platforms.darwin;
+    maintainers = with maintainers; [ flokli ];
+    license = lib.licenses.lgpl3;
+    description = "An opensource database of photographic lenses and their characteristics";
+    homepage = "https://lensfun.github.io";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/leptonica/default.nix b/nixpkgs/pkgs/development/libraries/leptonica/default.nix
new file mode 100644
index 000000000000..12cd3f074fcb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/leptonica/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, which, gnuplot
+, giflib, libjpeg, libpng, libtiff, libwebp, openjpeg, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "leptonica";
+  version = "1.84.1";
+
+  src = fetchurl {
+    url = "https://github.com/DanBloomberg/${pname}/releases/download/${version}/${pname}-${version}.tar.gz";
+    hash = "sha256-Kz4SVLHMo4HnfIGbWcqZd0/0NTAgm5rrUR4dRliKZPY=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ giflib libjpeg libpng libtiff libwebp openjpeg zlib ];
+  enableParallelBuilding = true;
+
+  nativeCheckInputs = [ which gnuplot ];
+
+  # Fails on pngio_reg for unknown reason
+  doCheck = false; # !stdenv.isDarwin;
+
+  meta = {
+    description = "Image processing and analysis library";
+    homepage = "http://www.leptonica.org/";
+    license = lib.licenses.bsd2; # http://www.leptonica.org/about-the-license.html
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/lerc/default.nix b/nixpkgs/pkgs/development/libraries/lerc/default.nix
new file mode 100644
index 000000000000..f7bba5125a72
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lerc/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lerc";
+  version = "4.0.0";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "esri";
+    repo = "lerc";
+    rev = "v${version}";
+    hash = "sha256-IHY9QtNYsxPz/ksxRMZGHleT+/bawfTYNVRSTAuYQ7Y=";
+  };
+
+  patches = [
+    # https://github.com/Esri/lerc/pull/227
+    (fetchpatch {
+      name = "use-cmake-install-full-dir.patch";
+      url = "https://github.com/Esri/lerc/commit/5462ca7f7dfb38c65e16f5abfd96873af177a0f8.patch";
+      hash = "sha256-qaNR3QwLe0AB6vu1nXOh9KhlPdWM3DmgCJj4d0VdOUk=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  meta = {
+    description = "C++ library for Limited Error Raster Compression";
+    homepage = "https://github.com/esri/lerc";
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ dotlambda ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/lesstif/c-missing_xm_h.patch b/nixpkgs/pkgs/development/libraries/lesstif/c-missing_xm_h.patch
new file mode 100644
index 000000000000..2d298d5f4c4e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lesstif/c-missing_xm_h.patch
@@ -0,0 +1,11 @@
+--- lesstif2-0.94.4.orig/include/Motif-2.1/Xm/XmStrDefs.h
++++ lesstif2-0.94.4/include/Motif-2.1/Xm/XmStrDefs.h
+@@ -28,6 +28,8 @@
+ 
+ #include <X11/StringDefs.h>
+ 
++#include <Xm/Xm.h>
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
diff --git a/nixpkgs/pkgs/development/libraries/lesstif/c-render_table_crash.patch b/nixpkgs/pkgs/development/libraries/lesstif/c-render_table_crash.patch
new file mode 100644
index 000000000000..1699dbe19084
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lesstif/c-render_table_crash.patch
@@ -0,0 +1,11 @@
+--- lesstif2-0.95.0.orig/lib/Xm-2.1/RenderTable.c
++++ lesstif2-0.95.0/lib/Xm-2.1/RenderTable.c
+@@ -465,7 +465,7 @@
+ 	DEBUGOUT(_LtDebug(__FILE__, w, "_XmRenderTableFinaliseTag(%s)\n", tag));
+ #if 1
+ 	/* Experimental start */
+-	if (r->dpy == 0)
++	if (r->dpy == 0  &&  w)
+ 		r->dpy = XtDisplay(w);
+ 	/* Experimental end */
+ #endif
diff --git a/nixpkgs/pkgs/development/libraries/lesstif/c-xpmpipethrough.patch b/nixpkgs/pkgs/development/libraries/lesstif/c-xpmpipethrough.patch
new file mode 100644
index 000000000000..69f9a2464c6d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lesstif/c-xpmpipethrough.patch
@@ -0,0 +1,381 @@
+Index: lesstif2-0.95.0/lib/Xm-2.1/XpmRdFToI.c
+===================================================================
+--- lesstif2-0.95.0.orig/lib/Xm-2.1/XpmRdFToI.c	2004-11-18 22:00:58.000000000 +0100
++++ lesstif2-0.95.0/lib/Xm-2.1/XpmRdFToI.c	2006-07-11 11:13:29.000000000 +0200
+@@ -44,11 +44,15 @@
+    DebugUtil.h! */
+ #include <stdio.h>
+ #include <string.h>
++#include <errno.h>
+ 
+ #include <ctype.h>
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
++#ifdef HAVE_SYS_WAIT_H
++#include <sys/wait.h>
++#endif
+ #ifdef HAVE_SYS_STAT_H
+ #include <sys/stat.h>
+ #endif
+@@ -87,16 +91,6 @@
+  	    strcpy(dst, src); \
+ 	else return (XpmFileInvalid); }
+ #endif
+-#include <sys/stat.h>
+-#if !defined(NO_ZPIPE) && defined(WIN32)
+-# define popen _popen
+-# define pclose _pclose
+-# if defined(STAT_ZFILE)
+-#  include <io.h>
+-#  define stat _stat
+-#  define fstat _fstat
+-# endif
+-#endif
+ 
+ LFUNC(OpenReadFile, int, (char *filename, xpmData *mdata));
+ LFUNC(xpmDataClose, void, (xpmData *mdata));
+@@ -173,90 +167,131 @@
+ }
+ #endif /* CXPMPROG */
+ 
+-/*
+- * open the given file to be read as an xpmData which is returned.
+- */
+ #ifndef NO_ZPIPE
+-	FILE *s_popen(char *cmd, const char *type);
+-#else
+-#	define s_popen popen
++/* Do not depend on errno after read_through */
++FILE*
++xpmPipeThrough(fd, cmd, arg1, mode)
++    int fd;
++    const char* cmd;
++    const char* arg1;
++    const char* mode;
++{
++    FILE* fp;
++    int status, fds[2], in = 0, out = 1;
++    pid_t pid;
++    if ( 'w' == *mode )
++	out = 0, in = 1;
++    if ( pipe(fds) < 0 )
++	return NULL;
++    pid = fork();
++    if ( pid < 0 )
++	goto fail1;
++    if ( 0 == pid )
++    {
++	close(fds[in]);
++	if ( dup2(fds[out], out) < 0 )
++	    goto err;
++	close(fds[out]);
++	if ( dup2(fd, in) < 0 )
++	    goto err;
++	close(fd);
++	pid = fork();
++	if ( pid < 0 )
++	    goto err;
++	if ( 0 == pid )
++	{
++	    execlp(cmd, cmd, arg1, NULL);
++	    perror(cmd);
++	    goto err;
++	}
++	_exit(0);
++    err:
++	_exit(1);
++    }
++    close(fds[out]);
++    /* calling process: wait for first child */
++    while ( waitpid(pid, &status, 0) < 0 && EINTR == errno )
++	;
++    if ( WIFSIGNALED(status) ||
++	 (WIFEXITED(status) && WEXITSTATUS(status) != 0) )
++	goto fail2;
++    fp = fdopen(fds[in], mode);
++    if ( !fp )
++	goto fail2;
++    close(fd); /* still open in 2nd child */
++    return fp;
++fail1:
++    close(fds[out]);
++fail2:
++    close(fds[in]);
++    return NULL;
++}
+ #endif
+ 
++/*
++ * open the given file to be read as an xpmData which is returned.
++ */
+ static int
+ OpenReadFile(filename, mdata)
+     char *filename;
+     xpmData *mdata;
+ {
+-#ifndef NO_ZPIPE
+-    char buf[BUFSIZ];
+-# ifdef STAT_ZFILE
+-    char *compressfile;
+-    struct stat status;
+-# endif
+-#endif
+-
+     if (!filename) {
+ 	mdata->stream.file = (stdin);
+ 	mdata->type = XPMFILE;
+     } else {
+-#ifndef NO_ZPIPE
+-	size_t len = strlen(filename);
+-
+-	if(len == 0                        ||
+-	   filename[len-1] == '/')
+-		return(XpmOpenFailed);
+-	if ((len > 2) && !strcmp(".Z", filename + (len - 2))) {
+-	    mdata->type = XPMPIPE;
+-	    snprintf(buf, sizeof(buf), "uncompress -c \"%s\"", filename);
+-	    if (!(mdata->stream.file = s_popen(buf, "r")))
+-		return (XpmOpenFailed);
+-
+-	} else if ((len > 3) && !strcmp(".gz", filename + (len - 3))) {
+-	    mdata->type = XPMPIPE;
+-	    snprintf(buf, sizeof(buf), "gunzip -qc \"%s\"", filename);
+-	    if (!(mdata->stream.file = s_popen(buf, "r")))
+-		return (XpmOpenFailed);
+-
+-	} else {
+-# ifdef STAT_ZFILE
+-	    if (!(compressfile = (char *) XpmMalloc(len + 4)))
++	int fd = open(filename, O_RDONLY);
++#if defined(NO_ZPIPE)
++	if ( fd < 0 )
++	    return XpmOpenFailed;
++#else
++	const char* ext = NULL;
++	if ( fd >= 0 )
++	    ext = strrchr(filename, '.');
++#ifdef STAT_ZFILE /* searching for z-files if the given name not found */
++	else
++	{
++	    size_t len = strlen(filename);
++	    char *compressfile = (char *) XpmMalloc(len + 4);
++	    if ( !compressfile )
+ 		return (XpmNoMemory);
+-
+-	    snprintf(compressfile, len+4, "%s.Z", filename);
+-	    if (!stat(compressfile, &status)) {
+-		snprintf(buf, sizeof(buf), "uncompress -c \"%s\"", compressfile);
+-		if (!(mdata->stream.file = s_popen(buf, "r"))) {
++	    strcpy(compressfile, filename);
++	    strcpy(compressfile + len, ext = ".Z");
++	    fd = open(compressfile, O_RDONLY);
++	    if ( fd < 0 )
++	    {
++		strcpy(compressfile + len, ext = ".gz");
++		fd = open(compressfile, O_RDONLY);
++		if ( fd < 0 )
++		{
+ 		    XpmFree(compressfile);
+-		    return (XpmOpenFailed);
+-		}
+-		mdata->type = XPMPIPE;
+-	    } else {
+-		snprintf(compressfile, len+4, "%s.gz", filename);
+-		if (!stat(compressfile, &status)) {
+-		    snprintf(buf, sizeof(buf), "gunzip -c \"%s\"", compressfile);
+-		    if (!(mdata->stream.file = s_popen(buf, "r"))) {
+-			XpmFree(compressfile);
+-			return (XpmOpenFailed);
+-		    }
+-		    mdata->type = XPMPIPE;
+-		} else {
+-# endif
+-#endif
+-		    if (!(mdata->stream.file = fopen(filename, "r"))) {
+-#if !defined(NO_ZPIPE) && defined(STAT_ZFILE)
+-			XpmFree(compressfile);
+-#endif
+-			return (XpmOpenFailed);
+-		    }
+-		    mdata->type = XPMFILE;
+-#ifndef NO_ZPIPE
+-# ifdef STAT_ZFILE
++		    return XpmOpenFailed;
+ 		}
+ 	    }
+ 	    XpmFree(compressfile);
+-# endif
+ 	}
+ #endif
++	if ( ext && !strcmp(ext, ".Z") )
++	{
++	    mdata->type = XPMPIPE;
++	    mdata->stream.file = xpmPipeThrough(fd, "uncompress", "-c", "r");
++	}
++	else if ( ext && !strcmp(ext, ".gz") )
++	{
++	    mdata->type = XPMPIPE;
++	    mdata->stream.file = xpmPipeThrough(fd, "gunzip", "-qc", "r");
++	}
++	else
++#endif /* z-files */
++	{
++	    mdata->type = XPMFILE;
++	    mdata->stream.file = fdopen(fd, "r");
++	}
++	if (!mdata->stream.file)
++	{
++	    close(fd);
++	    return (XpmOpenFailed);
++	}
+     }
+     mdata->CommentLength = 0;
+ #ifdef CXPMPROG
+@@ -273,15 +308,6 @@
+ xpmDataClose(mdata)
+     xpmData *mdata;
+ {
+-    switch (mdata->type) {
+-    case XPMFILE:
+-	if (mdata->stream.file != (stdin))
+-	    fclose(mdata->stream.file);
+-	break;
+-#ifndef NO_ZPIPE
+-    case XPMPIPE:
++    if (mdata->stream.file != (stdin))
+ 	fclose(mdata->stream.file);
+-	break;
+-#endif
+-    }
+ }
+Index: lesstif2-0.95.0/lib/Xm-2.1/XpmWrFFrI.c
+===================================================================
+--- lesstif2-0.95.0.orig/lib/Xm-2.1/XpmWrFFrI.c	2005-04-13 20:03:27.000000000 +0200
++++ lesstif2-0.95.0/lib/Xm-2.1/XpmWrFFrI.c	2006-07-11 11:13:29.000000000 +0200
+@@ -50,11 +50,15 @@
+    DebugUtil.h! */
+ #include <stdio.h>
+ #include <string.h>
++#include <errno.h>
+ 
+ #include <ctype.h>
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
++#ifdef HAVE_SYS_WAIT_H
++#include <sys/wait.h>
++#endif
+ #ifdef HAVE_SYS_STAT_H
+ #include <sys/stat.h>
+ #endif
+@@ -94,11 +98,6 @@
+ 	else return (XpmFileInvalid); }
+ #endif
+ 
+-#if !defined(NO_ZPIPE) && defined(WIN32)
+-# define popen _popen
+-# define pclose _pclose
+-#endif
+-
+ /* MS Windows define a function called WriteFile @#%#&!!! */
+ LFUNC(xpmWriteFile, int, (FILE *file, XpmImage *image, char *name,
+ 			  XpmInfo *info));
+@@ -354,58 +353,48 @@
+     fprintf(file, ",\n\"XPMENDEXT\"");
+ }
+ 
++
++#ifndef NO_ZPIPE
++FUNC(xpmPipeThrough, FILE*, (int fd,
++			     const char* cmd,
++			     const char* arg1,
++			     const char* mode));
++#endif
++
+ /*
+  * open the given file to be written as an xpmData which is returned
+  */
+-#ifndef NO_ZPIPE
+-	FILE *s_popen(char *cmd, const char *type);
+-#else
+-#	define s_popen popen
+-#endif
+ static int
+ OpenWriteFile(filename, mdata)
+     char *filename;
+     xpmData *mdata;
+ {
+-#ifndef NO_ZPIPE
+-    char buf[BUFSIZ];
+-
+-#endif
+-
+     if (!filename) {
+ 	mdata->stream.file = (stdout);
+ 	mdata->type = XPMFILE;
+     } else {
+ #ifndef NO_ZPIPE
+-	size_t len = strlen(filename);
+-
+-	if(len == 0                        ||
+-	   filename[0] == '/'              ||
+-	   strstr(filename, "../") != NULL ||
+-	   filename[len-1] == '/')
+-		return(XpmOpenFailed);
+-
++	size_t len;
++#endif
++	int fd = open(filename, O_WRONLY|O_CREAT|O_TRUNC, 0644);
++	if ( fd < 0 )
++	    return(XpmOpenFailed);
++#ifndef NO_ZPIPE
++	len = strlen(filename);
+ 	if (len > 2 && !strcmp(".Z", filename + (len - 2))) {
+-	    snprintf(buf, sizeof(buf), "compress > \"%s\"", filename);
+-	    if (!(mdata->stream.file = s_popen(buf, "w")))
+-		return (XpmOpenFailed);
+-
++	    mdata->stream.file = xpmPipeThrough(fd, "compress", NULL, "w");
+ 	    mdata->type = XPMPIPE;
+ 	} else if (len > 3 && !strcmp(".gz", filename + (len - 3))) {
+-	    snprintf(buf, sizeof(buf), "gzip -q > \"%s\"", filename);
+-	    if (!(mdata->stream.file = s_popen(buf, "w")))
+-		return (XpmOpenFailed);
+-
++	    mdata->stream.file = xpmPipeThrough(fd, "gzip", "-q", "w");
+ 	    mdata->type = XPMPIPE;
+-	} else {
++	} else
+ #endif
+-	    if (!(mdata->stream.file = fopen(filename, "w")))
+-		return (XpmOpenFailed);
+-
++	{
++	    mdata->stream.file = fdopen(fd, "w");
+ 	    mdata->type = XPMFILE;
+-#ifndef NO_ZPIPE
+ 	}
+-#endif
++	if (!mdata->stream.file)
++	    return (XpmOpenFailed);
+     }
+     return (XpmSuccess);
+ }
+@@ -417,15 +406,6 @@
+ xpmDataClose(mdata)
+     xpmData *mdata;
+ {
+-    switch (mdata->type) {
+-    case XPMFILE:
+-	if (mdata->stream.file != (stdout))
+-	    fclose(mdata->stream.file);
+-	break;
+-#ifndef NO_ZPIPE
+-    case XPMPIPE:
++    if (mdata->stream.file != (stdout))
+ 	fclose(mdata->stream.file);
+-	break;
+-#endif
+-    }
+ }
diff --git a/nixpkgs/pkgs/development/libraries/lesstif/default.nix b/nixpkgs/pkgs/development/libraries/lesstif/default.nix
new file mode 100644
index 000000000000..e0bd674e4daa
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lesstif/default.nix
@@ -0,0 +1,50 @@
+{ lib
+, stdenv
+, fetchurl
+, freetype
+, fontconfig
+, libICE
+, libX11
+, libXp
+, libXau
+, libXext
+, libXt
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lesstif";
+  version = "0.95.2";
+  src = fetchurl {
+    url = "mirror://sourceforge/lesstif/${pname}-${version}.tar.bz2";
+    sha256 = "1qzpxjjf7ri1jzv71mvq5m9g8hfaj5yzwp30rwxlm6n2b24a6jpb";
+  };
+  buildInputs = [
+    freetype
+    fontconfig
+    libICE
+    libX11
+    libXext
+    libXt
+  ];
+  propagatedBuildInputs = [
+    libXau
+    libXp
+  ];
+
+  # These patches fix a number of later issues - in particular the
+  # render_table_crash shows up in 'arb'. The same patches appear
+  # in Debian, so we assume they have been sent upstream.
+  #
+  patches = [
+    ./c-missing_xm_h.patch
+    ./c-render_table_crash.patch
+    ./c-xpmpipethrough.patch
+    ];
+
+  meta = with lib; {
+    description = "An open source clone of the Motif widget set";
+    homepage = "https://lesstif.sourceforge.net";
+    platforms = platforms.unix;
+    license = with licenses; [ gpl2 lgpl2 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/level-zero/default.nix b/nixpkgs/pkgs/development/libraries/level-zero/default.nix
new file mode 100644
index 000000000000..50cbe4a18cc3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/level-zero/default.nix
@@ -0,0 +1,33 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, addOpenGLRunpath
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "level-zero";
+  version = "1.15.8";
+
+  src = fetchFromGitHub {
+    owner = "oneapi-src";
+    repo = "level-zero";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-n1dcsI2sLeB68HpI5oQ5p3zdAcSvnSY+qpHL9vp6FOk=";
+  };
+
+  nativeBuildInputs = [ cmake addOpenGLRunpath ];
+
+  postFixup = ''
+    addOpenGLRunpath $out/lib/libze_loader.so
+  '';
+
+  meta = with lib; {
+    description = "oneAPI Level Zero Specification Headers and Loader";
+    homepage = "https://github.com/oneapi-src/level-zero";
+    changelog = "https://github.com/oneapi-src/level-zero/blob/v${version}/CHANGELOG.md";
+    license = licenses.mit;
+    maintainers = [ maintainers.ziguana ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/leveldb/default.nix b/nixpkgs/pkgs/development/libraries/leveldb/default.nix
new file mode 100644
index 000000000000..f5e7e2a638d2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/leveldb/default.nix
@@ -0,0 +1,62 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, fixDarwinDylibNames, snappy, cmake
+, static ? stdenv.hostPlatform.isStatic }:
+
+stdenv.mkDerivation rec {
+  pname = "leveldb";
+  version = "1.23";
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "leveldb";
+    rev = version;
+    sha256 = "sha256-RL+dfSFZZzWvUobSqiPbuC4nDiGzjIIukbVJZRacHbI=";
+  };
+
+  patches = [
+    # Re-enable RTTI. Needed for e.g. Ceph to compile properly.
+    # See https://github.com/NixOS/nixpkgs/issues/147801,
+    # https://github.com/google/leveldb/issues/731,
+    # https://lists.ceph.io/hyperkitty/list/dev@ceph.io/thread/K4OSAA4AJS2V7FQI6GNCKCK3IRQDBQRS/.
+    (fetchpatch {
+      url = "https://src.fedoraproject.org/rpms/leveldb/raw/e8178670c664e952fdd00f1fc6e3eb28b2c5b6a8/f/0006-revert-no-rtti.patch";
+      sha256 = "sha256-d2YAV8O+1VKu3WwgNsWw6Cxg5sUUR+xOlJtA7pTcigQ=";
+    })
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  buildInputs = [ snappy ];
+
+  nativeBuildInputs = lib.optional stdenv.isDarwin fixDarwinDylibNames ++ [ cmake ];
+
+  doCheck = true;
+
+  buildFlags = [ "all" ];
+
+  # NOTE: disabling tests due to gtest issue
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
+    "-DLEVELDB_BUILD_TESTS=OFF"
+    "-DLEVELDB_BUILD_BENCHMARKS=OFF"
+  ];
+
+  postInstall = ''
+    substituteInPlace "$out"/lib/cmake/leveldb/leveldbTargets.cmake \
+      --replace 'INTERFACE_INCLUDE_DIRECTORIES "''${_IMPORT_PREFIX}/include"' 'INTERFACE_INCLUDE_DIRECTORIES "'$dev'"'
+    mkdir -p $dev/lib/pkgconfig
+    cat <<EOF > $dev/lib/pkgconfig/leveldb.pc
+      Name: leveldb
+      Description: Fast and lightweight key/value database library by Google.
+      Version: ${version}
+      Libs: -L$out/lib -lleveldb
+      Cflags: -I$dev/include
+    EOF
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/google/leveldb";
+    description = "Fast and lightweight key/value database library by Google";
+    license = licenses.bsd3;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/levmar/default.nix b/nixpkgs/pkgs/development/libraries/levmar/default.nix
new file mode 100644
index 000000000000..f1ba199fc8e0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/levmar/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "levmar";
+  version = "2.6";
+
+  src = fetchurl {
+    url = "https://www.ics.forth.gr/~lourakis/levmar/${pname}-${version}.tgz";
+    sha256 = "1mxsjip9x782z6qa6k5781wjwpvj5aczrn782m9yspa7lhgfzx1v";
+  };
+
+  patchPhase = ''
+    substituteInPlace levmar.h --replace "define HAVE_LAPACK" "undef HAVE_LAPACK"
+    sed -i 's/LAPACKLIBS=.*/LAPACKLIBS=/' Makefile
+    substituteInPlace Makefile --replace "gcc" "${stdenv.cc.targetPrefix}cc"
+  '';
+
+  installPhase = ''
+    mkdir -p $out/include $out/lib
+    cp lm.h $out/include
+    cp liblevmar.a $out/lib
+  '';
+
+  meta = {
+    description = "ANSI C implementations of Levenberg-Marquardt, usable also from C++";
+    homepage = "https://www.ics.forth.gr/~lourakis/levmar/";
+    license = lib.licenses.gpl2Plus;
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/lib2geom/default.nix b/nixpkgs/pkgs/development/libraries/lib2geom/default.nix
new file mode 100644
index 000000000000..e0db2b76f19e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lib2geom/default.nix
@@ -0,0 +1,104 @@
+{ stdenv
+, fetchpatch
+, fetchFromGitLab
+, cmake
+, ninja
+, pkg-config
+, boost
+, glib
+, gsl
+, cairo
+, double-conversion
+, gtest
+, lib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lib2geom";
+  version = "1.3";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitLab {
+    owner = "inkscape";
+    repo = "lib2geom";
+    rev = "refs/tags/${version}";
+    hash = "sha256-llUpW8VRBD8RKaGfyedzsMbLRb8DIo0ePt6m2T2w7Po=";
+  };
+
+  patches = [
+    # Fix compilation with Clang.
+    # https://gitlab.com/inkscape/lib2geom/-/merge_requests/102
+    (fetchpatch {
+      url = "https://gitlab.com/inkscape/lib2geom/-/commit/a5b5ac7d992023f8a80535ede60421e73ecd8e20.patch";
+      hash = "sha256-WJYkk3WRYVyPSvyTbKDUrYvUwFgKA9mmTiEWtYQqM4Q=";
+    })
+    (fetchpatch {
+      url = "https://gitlab.com/inkscape/lib2geom/-/commit/23d9393af4bee17aeb66a3c13bdad5dbed982d08.patch";
+      hash = "sha256-LAaGMIXpDI/Wzv5E2LasW1Y2/G4ukhuEzDmFu3AzZOA=";
+    })
+
+    # Fix ellipses rendering near page corners.
+    # https://gitlab.com/inkscape/lib2geom/-/issues/66
+    (fetchpatch {
+      url = "https://gitlab.com/inkscape/lib2geom/-/commit/039ce8d4af23a0a2a9d48eb970b321d9795dcc08.patch";
+      hash = "sha256-JfgGrqBcYSYKcdl4Bt7vGZ4aTBPSHM6JjZ95IlzxPwI=";
+    })
+    (fetchpatch {
+      url = "https://gitlab.com/inkscape/lib2geom/-/commit/cf523857e48c87f9f6a09217bdf935fff457823d.patch";
+      hash = "sha256-BRg8ANHMSgoi6vt9PNbhwG1fRkzEPXb4gPTPO3sY0XE=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    ninja
+    pkg-config
+  ];
+
+  buildInputs = [
+    boost
+    glib
+    gsl
+    cairo
+    double-conversion
+  ];
+
+  nativeCheckInputs = [
+    gtest
+  ];
+
+  cmakeFlags = [
+    "-D2GEOM_BUILD_SHARED=ON"
+  ];
+
+  doCheck = true;
+
+  # TODO: Update cmake hook to make it simpler to selectively disable cmake tests: #113829
+  checkPhase = let
+    disabledTests =
+      lib.optionals stdenv.isAarch64 [
+        # Broken on all platforms, test just accidentally passes on some.
+        # https://gitlab.com/inkscape/lib2geom/-/issues/63
+        "elliptical-arc-test"
+      ]
+      ++ lib.optionals stdenv.hostPlatform.isMusl [
+        # Fails due to rounding differences
+        # https://gitlab.com/inkscape/lib2geom/-/issues/70
+        "circle-test"
+      ]
+      ;
+  in ''
+    runHook preCheck
+    ctest --output-on-failure -E '^${lib.concatStringsSep "|" disabledTests}$'
+    runHook postCheck
+  '';
+
+  meta = with lib; {
+    description = "Easy to use 2D geometry library in C++";
+    homepage = "https://gitlab.com/inkscape/lib2geom";
+    license = [ licenses.lgpl21Only licenses.mpl11 ];
+    maintainers = with maintainers; [ jtojnar ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/lib3ds/default.nix b/nixpkgs/pkgs/development/libraries/lib3ds/default.nix
new file mode 100644
index 000000000000..791d2ab523d0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lib3ds/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl, unzip }:
+
+stdenv.mkDerivation rec {
+  pname = "lib3ds";
+  version = "1.3.0";
+
+  src = fetchurl {
+    url = "http://lib3ds.googlecode.com/files/lib3ds-${version}.zip";
+    sha256 = "1qr9arfdkjf7q11xhvxwzmhxqz3nhcjkyb8zzfjpz9jm54q0rc7m";
+  };
+
+  nativeBuildInputs = [ unzip ];
+
+  meta = {
+    description = "Library for managing 3D-Studio Release 3 and 4 \".3DS\" files";
+    homepage = "https://lib3ds.sourceforge.net/";
+    license = "LGPL";
+    platforms = lib.platforms.unix;
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/lib3mf/default.nix b/nixpkgs/pkgs/development/libraries/lib3mf/default.nix
new file mode 100644
index 000000000000..0da54cd61c07
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lib3mf/default.nix
@@ -0,0 +1,52 @@
+{ lib, stdenv, fetchFromGitHub, cmake, ninja, automaticcomponenttoolkit
+, pkg-config, libzip, gtest, openssl, libuuid, libossp_uuid }:
+
+stdenv.mkDerivation rec {
+  pname = "lib3mf";
+  version = "2.2.0";
+
+  src = fetchFromGitHub {
+    owner = "3MFConsortium";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-WMTTYYgpCIM86a6Jw8iah/YVXN9T5youzEieWL/d+Bc=";
+  };
+
+  nativeBuildInputs = [ cmake ninja pkg-config ];
+
+  outputs = [ "out" "dev" ];
+
+  cmakeFlags = [
+    "-DCMAKE_INSTALL_INCLUDEDIR=include/lib3mf"
+    "-DUSE_INCLUDED_ZLIB=OFF"
+    "-DUSE_INCLUDED_LIBZIP=OFF"
+    "-DUSE_INCLUDED_GTEST=OFF"
+    "-DUSE_INCLUDED_SSL=OFF"
+  ];
+
+  buildInputs = [
+    libzip gtest openssl
+  ] ++ (if stdenv.isDarwin then [ libossp_uuid ] else [ libuuid ]);
+
+  postPatch = ''
+    # This lets us build the tests properly on aarch64-darwin.
+    substituteInPlace CMakeLists.txt \
+      --replace 'SET(CMAKE_OSX_ARCHITECTURES "x86_64")' ""
+
+    # fix libdir=''${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+    sed -i 's,libdir=''${\(exec_\)\?prefix}/,libdir=,' lib3mf.pc.in
+
+    # replace bundled binaries
+    for i in AutomaticComponentToolkit/bin/act.*; do
+      ln -sf ${automaticcomponenttoolkit}/bin/act $i
+    done
+  '';
+
+  meta = with lib; {
+    description = "Reference implementation of the 3D Manufacturing Format file standard";
+    homepage = "https://3mf.io/";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ gebner ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libAfterImage/default.nix b/nixpkgs/pkgs/development/libraries/libAfterImage/default.nix
new file mode 100644
index 000000000000..828a6891e293
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libAfterImage/default.nix
@@ -0,0 +1,98 @@
+{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook, giflib, libjpeg, libpng, libX11, zlib
+, static ? stdenv.hostPlatform.isStatic
+, withX ? !stdenv.isDarwin }:
+
+stdenv.mkDerivation {
+  pname = "libAfterImage";
+  version = "1.20";
+
+  src = fetchurl {
+    name = "libAfterImage-1.20.tar.bz2";
+    urls = [
+      "https://sourceforge.net/projects/afterstep/files/libAfterImage/1.20/libAfterImage-1.20.tar.bz2/download"
+      "ftp://ftp.afterstep.org/stable/libAfterImage/libAfterImage-1.20.tar.bz2"
+    ];
+    sha256 = "0n74rxidwig3yhr6fzxsk7y19n1nq1f296lzrvgj5pfiyi9k48vf";
+  };
+
+  patches = [
+    # add back --with-gif option
+    (fetchpatch {
+      name = "libafterimage-gif.patch";
+      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libafterimage/files/libafterimage-gif.patch?id=4aa4fca00611b0b3a4007870da43cc5fd63f76c4";
+      sha256 = "16pa94wlqpd7h6mzs4f0qm794yk1xczrwsgf93kdd3g0zbjq3rnr";
+    })
+
+    # fix build with newer giflib
+    (fetchpatch {
+      name = "libafterimage-giflib5-v2.patch";
+      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libafterimage/files/libafterimage-giflib5-v2.patch?id=4aa4fca00611b0b3a4007870da43cc5fd63f76c4";
+      sha256 = "0qwydqy9bm73cg5n3vm97aj4jfi70p7fxqmfbi54vi78z593brln";
+      stripLen = 1;
+    })
+
+    # fix build with newer libpng
+    (fetchpatch {
+      name = "libafterimage-libpng15.patch";
+      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libafterimage/files/libafterimage-libpng15.patch?id=4aa4fca00611b0b3a4007870da43cc5fd63f76c4";
+      sha256 = "1qyvf7786hayasfnnilfbri3p99cfz5wjpbli3gdqj2cvk6mpydv";
+    })
+
+    # fix an ldconfig problem
+    (fetchpatch {
+      name = "libafterimage-makefile.patch";
+      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libafterimage/files/libafterimage-makefile.in.patch?id=4aa4fca00611b0b3a4007870da43cc5fd63f76c4";
+      sha256 = "1n6fniz6dldms615046yhc4mlg9gb53y4yfia8wfz6szgq5zicj4";
+    })
+
+    # Fix build failure against binutils-2.36:
+    #  https://sourceforge.net/p/afterstep/bugs/5/
+    (fetchpatch {
+      name = "binutils-2.36.patch";
+      url = "https://sourceforge.net/p/afterstep/bugs/5/attachment/libafterimage-binutils-2.36-support.patch";
+      sha256 = "1cfgm2ffwlsmhvvfmrxlglddaigr99k88d5xqva9pkl3mmzy3jym";
+      # workaround '-p0' patchflags below.
+      stripLen = 1;
+    })
+
+    # fix https://github.com/root-project/root/issues/10990
+    (fetchpatch {
+      url = "https://github.com/root-project/root/pull/11243/commits/e177a477b0be05ef139094be1e96a99ece06350a.diff";
+      hash = "sha256-2DQmJGHmATHawl3dk9dExncVe1sXzJQyy4PPwShoLTY=";
+      stripLen = 5;
+    })
+  ];
+  patchFlags = [ "-p0" ];
+
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ giflib libjpeg libpng zlib ] ++ lib.optional withX libX11;
+
+  preConfigure = ''
+    rm -rf {libjpeg,libpng,libungif,zlib}/
+    substituteInPlace Makefile.in \
+      --replace "include .depend" ""
+  '' + lib.optionalString stdenv.isDarwin ''
+    substituteInPlace Makefile.in \
+      --replace "-soname," "-install_name,$out/lib/"
+  '';
+
+  configureFlags = [
+    "--with-gif"
+    "--disable-mmx-optimization"
+    "--${if static then "enable" else "disable"}-staticlibs"
+    "--${if !static then "enable" else "disable"}-sharedlibs"
+    "--${if withX then "with" else "without"}-x"
+  ];
+
+  env = lib.optionalAttrs stdenv.cc.isClang {
+    NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
+  };
+
+  meta = with lib; {
+    homepage = "http://www.afterstep.org/afterimage/";
+    description = "A generic image manipulation library";
+    platforms = platforms.unix;
+    maintainers = [ maintainers.veprbl ];
+    license = licenses.lgpl21;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libHX/default.nix b/nixpkgs/pkgs/development/libraries/libHX/default.nix
new file mode 100644
index 000000000000..7016c5c86593
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libHX/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchurl, autoconf, automake, libtool }:
+
+stdenv.mkDerivation rec {
+  pname = "libHX";
+  version = "3.22";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libhx/libHX/${version}/${pname}-${version}.tar.xz";
+    sha256 = "18w39j528lyg2026dr11f2xxxphy91cg870nx182wbd8cjlqf86c";
+  };
+
+  patches = [];
+
+  nativeBuildInputs = [ autoconf automake libtool ];
+
+  preConfigure = ''
+    sh autogen.sh
+  '';
+
+  meta = with lib; {
+    homepage = "https://libhx.sourceforge.net/";
+    longDescription = ''
+      libHX is a C library (with some C++ bindings available) that provides data structures
+      and functions commonly needed, such as maps, deques, linked lists, string formatting
+      and autoresizing, option and config file parsing, type checking casts and more.
+      '';
+    maintainers = [ ];
+    platforms = platforms.linux;
+    license = with licenses; [ gpl3 lgpl21Plus wtfpl ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libLAS/default.nix b/nixpkgs/pkgs/development/libraries/libLAS/default.nix
new file mode 100644
index 000000000000..195f77d19231
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libLAS/default.nix
@@ -0,0 +1,59 @@
+{ lib, stdenv, fetchurl, fetchpatch, boost, cmake, libgeotiff, libtiff, LASzip2, fixDarwinDylibNames }:
+
+stdenv.mkDerivation rec {
+  pname = "libLAS";
+  version = "1.8.1";
+
+  src = fetchurl {
+    url = "https://download.osgeo.org/liblas/libLAS-${version}.tar.bz2";
+    sha256 = "0xjfxb3ydvr2258ji3spzyf81g9caap19ql2pk91wiivqsc4mnws";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "aarch64-darwin.patch";
+      url = "https://github.com/libLAS/libLAS/commit/ded463732db1f9baf461be6f3fe5b8bb683c41cd.patch";
+      sha256 = "sha256-aWMpazeefDHE9OzuLR3FJ8+oXeGhEsk1igEm6j2DUnw=";
+    })
+    (fetchpatch {
+      name = "fix-build-with-boost-1.73-1.patch";
+      url = "https://github.com/libLAS/libLAS/commit/af431abce95076b59f4eb7c6ef0930ca57c8a063.patch";
+      hash = "sha256-2lr028t5hq3oOLZFXnvIJXCUsoVHbG/Mus93OZvi5ZU=";
+    })
+    (fetchpatch {
+      name = "fix-build-with-boost-1.73-2.patch";
+      url = "https://github.com/libLAS/libLAS/commit/0d3b8d75f371a6b7c605bbe5293091cb64a7e2d3.patch";
+      hash = "sha256-gtNIazR+l1h+Xef+4qQc7EVi+Nlht3F8CrwkINothtA=";
+    })
+    # remove on update. fix compile error in apps/las2col.c
+    # https://github.com/libLAS/libLAS/pull/151
+    (fetchpatch {
+      name = "fflush-x2-is-not-an-fsync.patch";
+      url = "https://github.com/libLAS/libLAS/commit/e789d43df4500da0c12d2f6d3ac1d031ed835493.patch";
+      hash = "sha256-0zI0NvOt9C5BPrfAbgU1N1kj3rZFB7rf0KRj7yemyWI=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
+  buildInputs = [ boost libgeotiff libtiff LASzip2 ];
+
+  cmakeFlags = [
+    "-DWITH_LASZIP=ON"
+    # libLAS is currently not compatible with LASzip 3,
+    # see https://github.com/libLAS/libLAS/issues/144.
+    "-DLASZIP_INCLUDE_DIR=${LASzip2}/include"
+    "-DCMAKE_EXE_LINKER_FLAGS=-pthread"
+  ];
+
+  postFixup = lib.optionalString stdenv.isDarwin ''
+    install_name_tool -change "@rpath/liblas.3.dylib" "$out/lib/liblas.3.dylib" $out/lib/liblas_c.dylib
+  '';
+
+  meta = {
+    description = "LAS 1.0/1.1/1.2 ASPRS LiDAR data translation toolset";
+    homepage = "https://liblas.org";
+    license = lib.licenses.bsd3;
+    platforms = lib.platforms.unix;
+    maintainers = [ lib.maintainers.michelk ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libaacs/default.nix b/nixpkgs/pkgs/development/libraries/libaacs/default.nix
new file mode 100644
index 000000000000..a270051f48ab
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libaacs/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl, libgcrypt, libgpg-error, bison, flex }:
+
+# library that allows libbluray to play AACS protected bluray disks
+# libaacs does not infringe DRM's right or copyright. See the legal page of the website for more info.
+
+# Info on how to use / obtain aacs keys:
+# http://vlc-bluray.whoknowsmy.name/
+# https://wiki.archlinux.org/index.php/BluRay
+
+stdenv.mkDerivation rec {
+  pname = "libaacs";
+  version  = "0.11.1";
+
+  src = fetchurl {
+    url = "http://get.videolan.org/libaacs/${version}/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-qIqg6+TJinf3rv/ZKrPvZKxUjGuCLoJIqLkmclvqCjk=";
+  };
+
+  buildInputs = [ libgcrypt libgpg-error ];
+
+  nativeBuildInputs = [ bison flex ];
+
+  meta = with lib; {
+    homepage = "https://www.videolan.org/developers/libaacs.html";
+    description = "Library to access AACS protected Blu-Ray disks";
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ abbradar ];
+    platforms = with platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libaal/default.nix b/nixpkgs/pkgs/development/libraries/libaal/default.nix
new file mode 100644
index 000000000000..d5b0b95f9599
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libaal/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  version = "1.0.7";
+  pname = "libaal";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/reiser4/${pname}-${version}.tar.gz";
+    sha256 = "sha256-fIVohp2PVCaNaQRVJ4zfW8mukiiqM3BgF8Vwu9qrmJE=";
+  };
+
+  preInstall = ''
+    substituteInPlace Makefile --replace ./run-ldconfig true
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = {
+    homepage = "http://www.namesys.com/";
+    description = "Support library for Reiser4";
+    license = lib.licenses.gpl2;
+    maintainers = with lib.maintainers; [ mglolenstine ];
+    platforms = with lib.platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libabigail/default.nix b/nixpkgs/pkgs/development/libraries/libabigail/default.nix
new file mode 100644
index 000000000000..4ca2eb75b44f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libabigail/default.nix
@@ -0,0 +1,59 @@
+{ lib, stdenv
+, fetchurl
+, autoreconfHook
+, elfutils
+, libxml2
+, pkg-config
+, strace
+, python3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libabigail";
+  version = "2.1";
+
+  outputs = [ "bin" "out" "dev" ];
+
+  src = fetchurl {
+    url = "https://mirrors.kernel.org/sourceware/${pname}/${pname}-${version}.tar.gz";
+    sha256 = "sha256-SmKX1B0V0ZNiVhFxFr1hKW5rm+4j1UoMr40/WrjdzEw=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+    strace
+  ];
+
+  buildInputs = [
+    elfutils
+    libxml2
+  ];
+
+  nativeCheckInputs = [
+    python3
+  ];
+
+  configureFlags = [
+    "--enable-bash-completion=yes"
+    "--enable-cxx11=yes"
+  ];
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  preCheck = ''
+    # runtestdiffpkg needs cache directory
+    export XDG_CACHE_HOME="$TEMPDIR"
+    patchShebangs tests/
+  '';
+
+  meta = with lib; {
+    description = "ABI Generic Analysis and Instrumentation Library";
+    homepage = "https://sourceware.org/libabigail/";
+    license = licenses.asl20-llvm;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libabw/default.nix b/nixpkgs/pkgs/development/libraries/libabw/default.nix
new file mode 100644
index 000000000000..3da65787e036
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libabw/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchurl, boost, doxygen, gperf, pkg-config, librevenge, libxml2, perl }:
+
+stdenv.mkDerivation rec {
+  pname = "libabw";
+  version = "0.1.3";
+
+  src = fetchurl {
+    url = "https://dev-www.libreoffice.org/src/libabw/${pname}-${version}.tar.xz";
+    sha256 = "1vbfrmnvib3cym0yyyabnd8xpx4f7wp20vnn09s6dln347fajqz7";
+  };
+
+  # Boost 1.59 compatibility fix
+  # Attempt removing when updating
+  postPatch = ''
+    sed -i 's,^CPPFLAGS.*,\0 -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED,' src/lib/Makefile.in
+  '';
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ boost doxygen gperf librevenge libxml2 perl ];
+
+  meta = with lib; {
+    homepage = "https://wiki.documentfoundation.org/DLP/Libraries/libabw";
+    description = "Library parsing abiword documents";
+    platforms = platforms.unix;
+    license = licenses.mpl20;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libaccounts-glib/default.nix b/nixpkgs/pkgs/development/libraries/libaccounts-glib/default.nix
new file mode 100644
index 000000000000..c540f4bc26ec
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libaccounts-glib/default.nix
@@ -0,0 +1,57 @@
+{ lib, stdenv, fetchFromGitLab, meson, mesonEmulatorHook, ninja, glib, check, python3, vala, gtk-doc, glibcLocales
+, libxml2, libxslt, pkg-config, sqlite, docbook_xsl, docbook_xml_dtd_43, gobject-introspection }:
+
+stdenv.mkDerivation rec {
+  pname = "libaccounts-glib";
+  version = "1.26";
+
+  outputs = [ "out" "dev" "devdoc" "py" ];
+
+  src = fetchFromGitLab {
+    owner = "accounts-sso";
+    repo = "libaccounts-glib";
+    rev = version;
+    sha256 = "sha256-KVKylt+XjLfidsS2KzT7oFXP6rTR528lYAUP8dffu7k=";
+  };
+
+  nativeBuildInputs = [
+    check
+    docbook_xml_dtd_43
+    docbook_xsl
+    glibcLocales
+    gobject-introspection
+    gtk-doc
+    meson
+    ninja
+    pkg-config
+    vala
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
+  ];
+
+  buildInputs = [
+    glib
+    libxml2
+    libxslt
+    python3.pkgs.pygobject3
+    sqlite
+  ];
+
+  # TODO: send patch upstream to make running tests optional
+  postPatch = lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
+    substituteInPlace meson.build \
+      --replace "subdir('tests')" ""
+  '';
+
+  LC_ALL = "en_US.UTF-8";
+
+  mesonFlags = [
+    "-Dpy-overrides-dir=${placeholder "py"}/${python3.sitePackages}/gi/overrides"
+  ];
+
+  meta = with lib; {
+    description = "Library for managing accounts which can be used from GLib applications";
+    platforms = platforms.linux;
+    license = licenses.lgpl21;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libad9361/default.nix b/nixpkgs/pkgs/development/libraries/libad9361/default.nix
new file mode 100644
index 000000000000..f370870f71ef
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libad9361/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, cmake, libiio }:
+
+stdenv.mkDerivation rec {
+  pname = "libad9361";
+  version = "0.3";
+
+  src = fetchFromGitHub {
+    owner = "analogdevicesinc";
+    repo = "libad9361-iio";
+    rev = "v${version}";
+    hash = "sha256-9e66qSrKpczatZY9lPAzi/6f7lHChnl2+Pih53oa28Y=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ libiio ];
+
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    # Fix iio include path on darwin to match linux
+    for i in test/*.c; do
+      substituteInPlace $i \
+        --replace 'iio/iio.h' 'iio.h'
+    done
+  '';
+
+  meta = with lib; {
+    description = "IIO AD9361 library for filter design and handling, multi-chip sync, etc";
+    homepage = "http://analogdevicesinc.github.io/libad9361-iio/";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ sikmir ];
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libadwaita/default.nix b/nixpkgs/pkgs/development/libraries/libadwaita/default.nix
new file mode 100644
index 000000000000..40ff3f9b807f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libadwaita/default.nix
@@ -0,0 +1,121 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, gi-docgen
+, meson
+, ninja
+, pkg-config
+, sassc
+, vala
+, gobject-introspection
+, appstream
+, fribidi
+, glib
+, gtk4
+, gnome
+, gsettings-desktop-schemas
+, xvfb-run
+, AppKit
+, Foundation
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libadwaita";
+  version = "1.4.3";
+
+  outputs = [ "out" "dev" "devdoc" ];
+  outputBin = "devdoc"; # demo app
+
+  src = fetchFromGitLab {
+    domain = "gitlab.gnome.org";
+    owner = "GNOME";
+    repo = "libadwaita";
+    rev = version;
+    hash = "sha256-ctHAN0SY6k68jaBpmIpMm8DngC9DPiL1vAmGhECpNic=";
+  };
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    gi-docgen
+    meson
+    ninja
+    pkg-config
+    sassc
+    vala
+    gobject-introspection
+  ];
+
+  mesonFlags = [
+    "-Dgtk_doc=true"
+  ] ++ lib.optionals (!doCheck) [
+    "-Dtests=false"
+  ];
+
+  buildInputs = [
+    appstream
+    fribidi
+  ] ++ lib.optionals stdenv.isDarwin [
+    AppKit
+    Foundation
+  ];
+
+  propagatedBuildInputs = [
+    gtk4
+  ];
+
+  nativeCheckInputs = [
+    gnome.adwaita-icon-theme
+  ] ++ lib.optionals (!stdenv.isDarwin) [
+    xvfb-run
+  ];
+
+  # Tests had to be disabled on Darwin because test-button-content fails
+  #
+  # not ok /Adwaita/ButtonContent/style_class_button - Gdk-FATAL-CRITICAL:
+  # gdk_macos_monitor_get_workarea: assertion 'GDK_IS_MACOS_MONITOR (self)' failed
+  doCheck = !stdenv.isDarwin;
+
+  checkPhase = ''
+    runHook preCheck
+
+    testEnvironment=(
+      # Disable portal since we cannot run it in tests.
+      ADW_DISABLE_PORTAL=1
+
+      # AdwSettings needs to be initialized from “org.gnome.desktop.interface” GSettings schema when portal is not used for color scheme.
+      # It will not actually be used since the “color-scheme” key will only have been introduced in GNOME 42, falling back to detecting theme name.
+      # See adw_settings_constructed function in https://gitlab.gnome.org/GNOME/libadwaita/commit/60ec69f0a5d49cad8a6d79e4ecefd06dc6e3db12
+      "XDG_DATA_DIRS=${glib.getSchemaDataDirPath gsettings-desktop-schemas}"
+
+      # Tests need a cache directory
+      "HOME=$TMPDIR"
+    )
+    env "''${testEnvironment[@]}" ${lib.optionalString (!stdenv.isDarwin) "xvfb-run"} \
+      meson test --print-errorlogs
+
+    runHook postCheck
+  '';
+
+  postFixup = ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+    };
+  };
+
+  meta = with lib; {
+    changelog = "https://gitlab.gnome.org/GNOME/libadwaita/-/blob/${src.rev}/NEWS";
+    description = "Library to help with developing UI for mobile devices using GTK/GNOME";
+    homepage = "https://gitlab.gnome.org/GNOME/libadwaita";
+    license = licenses.lgpl21Plus;
+    maintainers = teams.gnome.members ++ (with maintainers; [ dotlambda ]);
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libaec/default.nix b/nixpkgs/pkgs/development/libraries/libaec/default.nix
new file mode 100644
index 000000000000..5bc6ad6c5f2e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libaec/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchFromGitLab
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libaec";
+  version  = "1.1.2";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.dkrz.de";
+    owner = "k202009";
+    repo = "libaec";
+    rev = "v${version}";
+    sha256 = "sha256-mmiPpfUZE7W6Hzalr/tcJUFQe5kF4dYM1uZShjBsoVA=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    homepage = "https://gitlab.dkrz.de/k202009/libaec";
+    description = "Adaptive Entropy Coding library";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ tbenst ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libagar/default.nix b/nixpkgs/pkgs/development/libraries/libagar/default.nix
new file mode 100644
index 000000000000..bff80ab996db
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libagar/default.nix
@@ -0,0 +1,47 @@
+{ lib, stdenv, fetchurl, pkg-config, libtool, perl, bsdbuild, gettext, mandoc
+, libpng, libjpeg, libXinerama, freetype, SDL, libGLU, libGL
+, libsndfile, portaudio, libmysqlclient, fontconfig
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libagar";
+  version = "1.5.0";
+
+  src = fetchurl {
+    url = "http://stable.hypertriton.com/agar/agar-${finalAttrs.version}.tar.gz";
+    sha256 = "001wcqk5z67qg0raw9zlwmv62drxiwqykvsbk10q2mrc6knjsd42";
+  };
+
+  preConfigure = ''
+    substituteInPlace configure.in \
+      --replace '_BSD_SOURCE' '_DEFAULT_SOURCE'
+    cat configure.in | ${bsdbuild}/bin/mkconfigure > configure
+  '';
+
+  configureFlags = [
+    "--with-libtool=${libtool}/bin/libtool"
+    "--enable-nls=yes"
+    "--with-gettext=${gettext}"
+    "--with-jpeg=${libjpeg.dev}"
+    "--with-gl=${libGL}"
+    "--with-mysql=${libmysqlclient}"
+    "--with-manpages=yes"
+  ];
+
+  outputs = [ "out" "devdoc" ];
+
+  nativeBuildInputs = [ pkg-config libtool gettext ];
+
+  buildInputs = [
+    bsdbuild perl libXinerama SDL libGL libmysqlclient mandoc
+    freetype.dev libpng libjpeg.dev fontconfig portaudio libsndfile
+  ];
+
+  meta = with lib; {
+    description = "Cross-platform GUI toolkit";
+    homepage = "http://libagar.org/index.html";
+    license = with licenses; bsd3;
+    maintainers = with maintainers; [ ramkromberg ];
+    platforms = with platforms; linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libagar/libagar_test.nix b/nixpkgs/pkgs/development/libraries/libagar/libagar_test.nix
new file mode 100644
index 000000000000..c54a7957f436
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libagar/libagar_test.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchurl, bsdbuild, libagar, perl, libjpeg, libpng, openssl }:
+
+stdenv.mkDerivation {
+  pname = "libagar-test";
+  inherit (libagar) version src;
+
+  sourceRoot = "agar-${libagar.version}/tests";
+
+  # Workaround build failure on -fno-common toolchains:
+  #   ld: textdlg.o:(.bss+0x0): multiple definition of `someString';
+  #     configsettings.o:(.bss+0x0): first defined here
+  # TODO: the workaround can be removed once nixpkgs updates to 1.6.0.
+  env.NIX_CFLAGS_COMPILE = "-fcommon";
+
+  preConfigure = ''
+    substituteInPlace configure.in \
+      --replace '_BSD_SOURCE' '_DEFAULT_SOURCE'
+    cat configure.in | ${bsdbuild}/bin/mkconfigure > configure
+  '';
+
+  configureFlags = [ "--with-agar=${libagar}" ];
+
+  buildInputs = [ perl bsdbuild libagar libjpeg libpng openssl ];
+
+  meta = with lib; {
+    broken = (stdenv.isLinux && stdenv.isAarch64);
+    description = "Tests for libagar";
+    homepage = "http://libagar.org/index.html";
+    license = with licenses; bsd3;
+    maintainers = with maintainers; [ ramkromberg ];
+    platforms = with platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libajantv2/default.nix b/nixpkgs/pkgs/development/libraries/libajantv2/default.nix
new file mode 100644
index 000000000000..d0d94c2d125a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libajantv2/default.nix
@@ -0,0 +1,35 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, ninja
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libajantv2";
+  version = "16.2-bugfix5";
+
+  src = fetchFromGitHub {
+    owner = "aja-video";
+    repo = "ntv2";
+    rev = "v${version}";
+    sha256 = "sha256-h5PKWMwqTeI5/EaTWkjYojuvDU0FyMpzIjWB98UOJwc=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [
+    cmake
+    ninja
+    pkg-config
+  ];
+
+  meta = with lib; {
+    description = "AJA NTV2 Open Source Static Libs and Headers for building applications that only wish to statically link against";
+    homepage = "https://github.com/aja-video/ntv2";
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ sebtm ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libamqpcpp/default.nix b/nixpkgs/pkgs/development/libraries/libamqpcpp/default.nix
new file mode 100644
index 000000000000..99a847af0b87
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libamqpcpp/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchFromGitHub, openssl }:
+
+stdenv.mkDerivation rec {
+  pname = "libamqpcpp";
+  version = "4.3.26";
+
+  src = fetchFromGitHub {
+    owner = "CopernicaMarketingSoftware";
+    repo = "AMQP-CPP";
+    rev = "v${version}";
+    sha256 = "sha256-lHkYoppJ/wo6RRE6V4iN6JXz5OoErJUl4IyrwiCB9FM=";
+  };
+
+  buildInputs = [ openssl ];
+
+  patches = [ ./libamqpcpp-darwin.patch ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Library for communicating with a RabbitMQ server";
+    homepage = "https://github.com/CopernicaMarketingSoftware/AMQP-CPP";
+    license = licenses.asl20;
+    maintainers = [ maintainers.mjp ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libamqpcpp/libamqpcpp-darwin.patch b/nixpkgs/pkgs/development/libraries/libamqpcpp/libamqpcpp-darwin.patch
new file mode 100644
index 000000000000..9f8d700929b4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libamqpcpp/libamqpcpp-darwin.patch
@@ -0,0 +1,13 @@
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -0,0 +1 @@
++CXX ?= g++
+@@ -43 +44 @@ ${SHARED_LIB}: ${SHARED_OBJECTS}
+-	${LD} ${LD_FLAGS} -Wl,${SONAMEPARAMETER},lib$(LIBRARY_NAME).so.$(SONAME) -o $@ ${SHARED_OBJECTS}
++	${CXX} ${LD_FLAGS} -Wl,${SONAMEPARAMETER},lib$(LIBRARY_NAME).so.$(SONAME) -o $@ ${SHARED_OBJECTS}
+@@ -52 +53 @@ ${SHARED_OBJECTS}:
+-	${CPP} ${CPPFLAGS} -fpic -o $@ ${@:%.o=%.cpp}
++	${CXX} ${CPPFLAGS} -fpic -o $@ ${@:%.o=%.cpp}
+@@ -55 +56 @@ ${STATIC_OBJECTS}:
+-	${CPP} ${CPPFLAGS} -o $@ ${@:%.s.o=%.cpp}
++	${CXX} ${CPPFLAGS} -o $@ ${@:%.s.o=%.cpp}
diff --git a/nixpkgs/pkgs/development/libraries/libantlr3c/default.nix b/nixpkgs/pkgs/development/libraries/libantlr3c/default.nix
new file mode 100644
index 000000000000..f61c0bfafc7b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libantlr3c/default.nix
@@ -0,0 +1,23 @@
+{lib, stdenv, fetchurl}:
+
+stdenv.mkDerivation rec {
+  pname = "libantlr3c";
+  version = "3.4";
+  src = fetchurl {
+    url = "https://www.antlr3.org/download/C/libantlr3c-${version}.tar.gz";
+    sha256 ="0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa";
+  };
+
+  configureFlags = lib.optional stdenv.is64bit "--enable-64bit"
+    # libantlr3c wrongly emits the abi flags -m64 and -m32 which imply x86 archs
+    # https://github.com/antlr/antlr3/issues/205
+    ++ lib.optional (!stdenv.hostPlatform.isx86) "--disable-abiflags";
+
+  meta = with lib; {
+    description = "C runtime libraries of ANTLR v3";
+    homepage = "https://www.antlr3.org/";
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ vbgl ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libao/default.nix b/nixpkgs/pkgs/development/libraries/libao/default.nix
new file mode 100644
index 000000000000..63cb0401aae4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libao/default.nix
@@ -0,0 +1,52 @@
+{ stdenv, lib, fetchFromGitHub, fetchpatch
+, autoreconfHook, pkg-config, libpulseaudio, alsa-lib, libcap
+, CoreAudio, CoreServices, AudioUnit
+, usePulseAudio }:
+
+stdenv.mkDerivation rec {
+  version = "1.2.2";
+  pname = "libao";
+
+  # the github mirror is more up to date than downloads.xiph.org
+  src = fetchFromGitHub {
+    owner  = "xiph";
+    repo   = "libao";
+    rev    = version;
+    sha256 = "0svgk4sc9kdhcsfyvbvgm5vpbg3sfr6z5rliflrw49v3x2i4vxq5";
+  };
+
+  patches = [
+    # add header time.h for nanosecond
+    (fetchpatch {
+      name = "nanosecond-header.patch";
+      url = "https://github.com/xiph/libao/commit/1f998f5d6d77674dad01b181811638578ad68242.patch";
+      hash = "sha256-cvlyhQq1YS4pVya44LfsKD1R6iSOONsHJGRbP5LlanQ=";
+    })
+  ];
+
+  configureFlags = [
+    "--disable-broken-oss"
+    "--enable-alsa-mmap"
+  ];
+
+  outputs = [ "out" "dev" "man" "doc" ];
+
+  buildInputs = [ ] ++
+    lib.optional  usePulseAudio   libpulseaudio ++
+    lib.optionals stdenv.isLinux  [ alsa-lib libcap ] ++
+    lib.optionals stdenv.isDarwin [ CoreAudio CoreServices AudioUnit ];
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  meta = with lib; {
+    longDescription = ''
+      Libao is Xiph.org's cross-platform audio library that allows
+      programs to output audio using a simple API on a wide variety of
+      platforms.
+    '';
+    homepage = "https://xiph.org/ao/";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libaom/default.nix b/nixpkgs/pkgs/development/libraries/libaom/default.nix
new file mode 100644
index 000000000000..a808b62c3a3b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libaom/default.nix
@@ -0,0 +1,86 @@
+{ lib, stdenv, fetchzip, yasm, perl, cmake, pkg-config, python3
+, enableVmaf ? true, libvmaf
+, gitUpdater
+}:
+
+let
+  isCross = stdenv.buildPlatform != stdenv.hostPlatform;
+in
+stdenv.mkDerivation rec {
+  pname = "libaom";
+  version = "3.8.1";
+
+  src = fetchzip {
+    url = "https://aomedia.googlesource.com/aom/+archive/v${version}.tar.gz";
+    hash = "sha256-qng9fEbm71HqPnPzfgqswSium9egIgpB6ZLesOQVg6c=";
+    stripRoot = false;
+  };
+
+  patches = [ ./outputs.patch ];
+
+  nativeBuildInputs = [
+    yasm perl cmake pkg-config python3
+  ];
+
+  propagatedBuildInputs = lib.optional enableVmaf libvmaf;
+
+  preConfigure = ''
+    # build uses `git describe` to set the build version
+    cat > $NIX_BUILD_TOP/git << "EOF"
+    #!${stdenv.shell}
+    echo v${version}
+    EOF
+    chmod +x $NIX_BUILD_TOP/git
+    export PATH=$NIX_BUILD_TOP:$PATH
+  '';
+
+  # Configuration options:
+  # https://aomedia.googlesource.com/aom/+/refs/heads/master/build/cmake/aom_config_defaults.cmake
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+    "-DENABLE_TESTS=OFF"
+  ] ++ lib.optionals enableVmaf [
+    "-DCONFIG_TUNE_VMAF=1"
+  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
+    # CPU detection isn't supported on Darwin and breaks the aarch64-darwin build:
+    "-DCONFIG_RUNTIME_CPU_DETECT=0"
+  ] ++ lib.optionals (isCross && !stdenv.hostPlatform.isx86) [
+    "-DCMAKE_ASM_COMPILER=${stdenv.cc.targetPrefix}as"
+  ] ++ lib.optionals stdenv.isAarch32 [
+    # armv7l-hf-multiplatform does not support NEON
+    # see lib/systems/platform.nix
+    "-DENABLE_NEON=0"
+  ];
+
+  postFixup = ''
+    moveToOutput lib/libaom.a "$static"
+  '' + lib.optionalString stdenv.hostPlatform.isStatic ''
+    ln -s $static $out
+  '';
+
+  outputs = [ "out" "bin" "dev" "static" ];
+
+  passthru = {
+    updateScript = gitUpdater {
+      url = "https://aomedia.googlesource.com/aom";
+      rev-prefix = "v";
+      ignoredVersions = "(alpha|beta|rc).*";
+    };
+  };
+
+  meta = with lib; {
+    description = "Alliance for Open Media AV1 codec library";
+    longDescription = ''
+      Libaom is the reference implementation of the AV1 codec from the Alliance
+      for Open Media. It contains an AV1 library as well as applications like
+      an encoder (aomenc) and a decoder (aomdec).
+    '';
+    homepage    = "https://aomedia.org/av1-features/get-started/";
+    changelog   = "https://aomedia.googlesource.com/aom/+/refs/tags/v${version}/CHANGELOG";
+    maintainers = with maintainers; [ primeos kiloreux dandellion ];
+    platforms   = platforms.all;
+    outputsToInstall = [ "bin" ];
+    license = licenses.bsd2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libaom/outputs.patch b/nixpkgs/pkgs/development/libraries/libaom/outputs.patch
new file mode 100644
index 000000000000..7b34338403f2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libaom/outputs.patch
@@ -0,0 +1,69 @@
+diff --git a/build/cmake/aom_install.cmake b/build/cmake/aom_install.cmake
+index 0bd2bf035..5cf5acea8 100644
+--- a/build/cmake/aom_install.cmake
++++ b/build/cmake/aom_install.cmake
+@@ -42,8 +42,8 @@ macro(setup_aom_install_targets)
+               -DAOM_ROOT=${AOM_ROOT}
+               -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
+               -DCMAKE_INSTALL_BINDIR=${CMAKE_INSTALL_BINDIR}
+-              -DCMAKE_INSTALL_INCLUDEDIR=${CMAKE_INSTALL_INCLUDEDIR}
+-              -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR}
++              -DCMAKE_INSTALL_FULL_INCLUDEDIR=${CMAKE_INSTALL_FULL_INCLUDEDIR}
++              -DCMAKE_INSTALL_FULL_LIBDIR=${CMAKE_INSTALL_FULL_LIBDIR}
+               -DCMAKE_PROJECT_NAME=${CMAKE_PROJECT_NAME}
+               -DCONFIG_MULTITHREAD=${CONFIG_MULTITHREAD}
+               -DCONFIG_TUNE_VMAF=${CONFIG_TUNE_VMAF}
+@@ -84,12 +84,12 @@ macro(setup_aom_install_targets)
+     # Setup the install rules. install() will automatically prepend
+     # CMAKE_INSTALL_PREFIX to relative paths
+     install(FILES ${AOM_INSTALL_INCS}
+-            DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aom")
++            DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}/aom")
+     install(FILES "${AOM_PKG_CONFIG_FILE}"
+-            DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
++            DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig")
+     install(TARGETS ${AOM_INSTALL_LIBS};${AOM_INSTALL_BINS}
+-            RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
+-            LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
+-            ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")
++            RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}"
++            LIBRARY DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}"
++            ARCHIVE DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}")
+   endif()
+ endmacro()
+diff --git a/build/cmake/pkg_config.cmake b/build/cmake/pkg_config.cmake
+index e8fff2e77..b8a73aad4 100644
+--- a/build/cmake/pkg_config.cmake
++++ b/build/cmake/pkg_config.cmake
+@@ -11,8 +11,8 @@
+ cmake_minimum_required(VERSION 3.5)
+ 
+ set(REQUIRED_ARGS "AOM_ROOT" "AOM_CONFIG_DIR" "CMAKE_INSTALL_PREFIX"
+-                  "CMAKE_INSTALL_BINDIR" "CMAKE_INSTALL_INCLUDEDIR"
+-                  "CMAKE_INSTALL_LIBDIR" "CMAKE_PROJECT_NAME"
++                  "CMAKE_INSTALL_BINDIR" "CMAKE_INSTALL_FULL_INCLUDEDIR"
++                  "CMAKE_INSTALL_FULL_LIBDIR" "CMAKE_PROJECT_NAME"
+                   "CONFIG_MULTITHREAD")
+ 
+ foreach(arg ${REQUIRED_ARGS})
+@@ -35,15 +35,15 @@ else()
+ endif()
+ 
+ # Write pkg-config info.
+-set(prefix "${CMAKE_INSTALL_PREFIX}")
+-set(bindir "${CMAKE_INSTALL_BINDIR}")
+-set(includedir "${CMAKE_INSTALL_INCLUDEDIR}")
+-set(libdir "${CMAKE_INSTALL_LIBDIR}")
++get_filename_component(prefix "${CMAKE_INSTALL_FULL_INCLUDEDIR}" DIRECTORY)
++get_filename_component(exec_prefix "${CMAKE_INSTALL_FULL_LIBDIR}" DIRECTORY)
++get_filename_component(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}" NAME)
++get_filename_component(libdir "${CMAKE_INSTALL_FULL_LIBDIR}" NAME)
+ set(pkgconfig_file "${AOM_CONFIG_DIR}/aom.pc")
+ string(TOLOWER ${CMAKE_PROJECT_NAME} pkg_name)
+ file(WRITE "${pkgconfig_file}" "# libaom pkg-config.\n")
+ file(APPEND "${pkgconfig_file}" "prefix=${prefix}\n")
+-file(APPEND "${pkgconfig_file}" "exec_prefix=\${prefix}\n")
++file(APPEND "${pkgconfig_file}" "exec_prefix=${exec_prefix}\n")
+ file(APPEND "${pkgconfig_file}" "includedir=\${prefix}/${includedir}\n")
+ file(APPEND "${pkgconfig_file}" "libdir=\${exec_prefix}/${libdir}\n\n")
+ file(APPEND "${pkgconfig_file}" "Name: ${pkg_name}\n")
diff --git a/nixpkgs/pkgs/development/libraries/libaosd/default.nix b/nixpkgs/pkgs/development/libraries/libaosd/default.nix
new file mode 100644
index 000000000000..540fc10998e5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libaosd/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, cairo, pango,
+  libX11, libXcomposite, autoconf, automake }:
+
+stdenv.mkDerivation rec {
+  version = "0.2.7-9-g177589f";
+  pname = "libaosd";
+
+  src = fetchFromGitHub {
+    owner  = "atheme-legacy";
+    repo   = "libaosd";
+    rev    = version;
+    sha256 = "1cn7k0n74p6jp25kxwcyblhmbdvgw3mikvj0m2jh4c6xccfrgb9a";
+  };
+
+  nativeBuildInputs = [ autoconf automake pkg-config ];
+  buildInputs = [ cairo pango libX11 libXcomposite ];
+  enableParallelBuilding = true;
+
+  preConfigure = ''
+    ./autogen.sh
+  '';
+
+  meta = with lib; {
+    longDescription = ''
+      libaosd is an advanced on screen display library.
+
+      It supports many modern features like anti-aliased text and
+      composited rendering via XComposite, as well as support for
+      rendering Cairo and Pango layouts.
+    '';
+    broken = stdenv.isDarwin;
+    homepage = "https://github.com/atheme-legacy/libaosd";
+    license = licenses.mit;
+    maintainers = with maintainers; [ unode ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libappindicator/default.nix b/nixpkgs/pkgs/development/libraries/libappindicator/default.nix
new file mode 100644
index 000000000000..8e68ea3f9cb6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libappindicator/default.nix
@@ -0,0 +1,83 @@
+{ stdenv, fetchgit, lib
+, pkg-config, autoreconfHook
+, glib, dbus-glib
+, gtkVersion ? "3"
+, gtk2, libindicator-gtk2, libdbusmenu-gtk2
+, gtk3, libindicator-gtk3, libdbusmenu-gtk3
+, gtk-doc, vala, gobject-introspection
+, monoSupport ? false, mono, gtk-sharp-2_0, gtk-sharp-3_0
+, testers
+}:
+
+let
+  throwBadGtkVersion = throw "unknown GTK version ${gtkVersion}";
+in
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = let postfix = if monoSupport then "sharp" else "gtk${gtkVersion}";
+          in "libappindicator-${postfix}";
+  version = "12.10.1+20.10.20200706.1";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchgit {
+    url = "https://git.launchpad.net/ubuntu/+source/libappindicator";
+    rev = "fe25e53bc7e39cd59ad6b3270cd7a6a9c78c4f44";
+    sha256 = "0xjvbl4gn7ra2fs6gn2g9s787kzb5cg9hv79iqsz949rxh4iw32d";
+  };
+
+  nativeBuildInputs = [ pkg-config autoreconfHook vala gobject-introspection gtk-doc ];
+
+  propagatedBuildInputs = {
+    "2" = [ gtk2 libdbusmenu-gtk2 ];
+    "3" = [ gtk3 libdbusmenu-gtk3 ];
+  }.${gtkVersion} or throwBadGtkVersion;
+
+  buildInputs = [
+    glib dbus-glib
+    {
+      "2" = libindicator-gtk2;
+      "3" = libindicator-gtk3;
+    }.${gtkVersion} or throwBadGtkVersion
+  ] ++ lib.optionals monoSupport [
+    mono
+    {
+      "2" = gtk-sharp-2_0;
+      "3" = gtk-sharp-3_0;
+    }.${gtkVersion} or throwBadGtkVersion
+  ];
+
+  preAutoreconf = ''
+    gtkdocize
+  '';
+
+  configureFlags = [
+    "CFLAGS=-Wno-error"
+    "--sysconfdir=/etc"
+    "--localstatedir=/var"
+    "--with-gtk=${gtkVersion}"
+  ];
+
+  doCheck = false; # generates shebangs in check phase, too lazy to fix
+
+  installFlags = [
+    "sysconfdir=${placeholder "out"}/etc"
+    "localstatedir=\${TMPDIR}"
+  ];
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    description = "A library to allow applications to export a menu into the Unity Menu bar";
+    homepage = "https://launchpad.net/libappindicator";
+    license = with licenses; [ lgpl21 lgpl3 ];
+    pkgConfigModules = {
+      "2" = [ "appindicator-0.1" ];
+      "3" = [ "appindicator3-0.1" ];
+    }.${gtkVersion} or throwBadGtkVersion;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.msteen ];
+    # TODO: Resolve the issues with the Mono bindings.
+    broken = monoSupport;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libarchive-qt/default.nix b/nixpkgs/pkgs/development/libraries/libarchive-qt/default.nix
new file mode 100644
index 000000000000..14608b9f970d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libarchive-qt/default.nix
@@ -0,0 +1,34 @@
+{ mkDerivation, lib, fetchFromGitLab, libarchive, xz, zlib, bzip2, meson, pkg-config, ninja }:
+
+mkDerivation rec {
+  pname = "libarchive-qt";
+  version = "2.0.8";
+
+  src = fetchFromGitLab {
+    owner = "marcusbritanicus";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-31a6DsxObSJWyLfT6mVtyjloT26IwFHpH53iuyC2mco=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+  ];
+
+  buildInputs = [
+    libarchive
+    bzip2
+    zlib
+    xz
+  ];
+
+  meta = with lib; {
+    description = "A Qt based archiving solution with libarchive backend";
+    homepage = "https://gitlab.com/marcusbritanicus/libarchive-qt";
+    license = licenses.lgpl3Plus;
+    maintainers = with maintainers; [ dan4ik605743 ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libarchive/default.nix b/nixpkgs/pkgs/development/libraries/libarchive/default.nix
new file mode 100644
index 000000000000..d58ba0bc5c5c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libarchive/default.nix
@@ -0,0 +1,127 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, 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
+
+# for passthru.tests
+, cmake
+, nix
+, samba
+}:
+
+assert xarSupport -> libxml2 != null;
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libarchive";
+  version = "3.7.2";
+
+  src = fetchFromGitHub {
+    owner = "libarchive";
+    repo = "libarchive";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-p2JgJ/rvqaQ6yyXSh+ehScUH565ud5bQncl+lOnsWfc=";
+  };
+
+  patches = [
+    # Pull fix for test failure on 32-bit systems:
+    (fetchpatch {
+      name = "32-bit-tests-fix.patch";
+      url = "https://github.com/libarchive/libarchive/commit/3bd918d92f8c34ba12de9c6604d96f9e262a59fc.patch";
+      hash = "sha256-RM3xFM6S2DkM5DJ0kAba8eLzEXuY5/7AaU06maHJ6rM=";
+    })
+  ];
+
+  outputs = [ "out" "lib" "dev" ];
+
+  postPatch = let
+    skipTestPaths = [
+      # test won't work in nix sandbox
+      "libarchive/test/test_write_disk_perms.c"
+      # the filesystem does not necessarily have sparse capabilities
+      "libarchive/test/test_sparse_basic.c"
+      # the filesystem does not necessarily have hardlink capabilities
+      "libarchive/test/test_write_disk_hardlink.c"
+      # access-time-related tests flakey on some systems
+      "cpio/test/test_option_a.c"
+      "cpio/test/test_option_t.c"
+    ];
+    removeTest = testPath: ''
+      substituteInPlace Makefile.am --replace "${testPath}" ""
+      rm "${testPath}"
+    '';
+  in ''
+    substituteInPlace Makefile.am --replace '/bin/pwd' "$(type -P pwd)"
+
+    ${lib.concatStringsSep "\n" (map removeTest skipTestPaths)}
+  '';
+
+  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
+  propagatedBuildInputs = lib.optionals stdenv.isLinux [ attr acl ];
+
+  configureFlags = lib.optional (!xarSupport) "--without-xml2";
+
+  preBuild = lib.optionalString stdenv.isCygwin ''
+    echo "#include <windows.h>" >> config.h
+  '';
+
+  # https://github.com/libarchive/libarchive/issues/1475
+  doCheck = !stdenv.hostPlatform.isMusl;
+
+  preFixup = ''
+    sed -i $lib/lib/libarchive.la \
+      -e 's|-lcrypto|-L${lib.getLib openssl}/lib -lcrypto|' \
+      -e 's|-llzo2|-L${lzo}/lib -llzo2|'
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "http://libarchive.org";
+    description = "Multi-format archive and compression library";
+    longDescription = ''
+      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.
+    '';
+    changelog = "https://github.com/libarchive/libarchive/releases/tag/v${finalAttrs.version}";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ jcumming AndersonTorres ];
+    platforms = platforms.all;
+  };
+
+  passthru.tests = {
+    inherit cmake nix samba;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libargon2/default.nix b/nixpkgs/pkgs/development/libraries/libargon2/default.nix
new file mode 100644
index 000000000000..ae9ba47cdc3f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libargon2/default.nix
@@ -0,0 +1,51 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, fixDarwinDylibNames }:
+
+stdenv.mkDerivation rec {
+  pname = "libargon2";
+  version = "20190702";
+
+  src = fetchFromGitHub {
+    owner = "P-H-C";
+    repo = "phc-winner-argon2";
+    rev = version;
+    sha256 = "0p4ry9dn0mi9js0byijxdyiwx74p1nr8zj7wjpd1fjgqva4sk23i";
+  };
+
+  nativeBuildInputs = lib.optionals stdenv.isDarwin [
+    fixDarwinDylibNames
+  ];
+
+  patches = [
+    # TODO: remove when https://github.com/P-H-C/phc-winner-argon2/pull/277 is merged + released
+    (fetchpatch {
+      url = "https://github.com/P-H-C/phc-winner-argon2/commit/cd1c1d8d204e4ec4557e358013567c097cb70562.patch";
+      sha256 = "0whqv8b6q9602n7vxpzbd8bk8wz22r1jz9x5lrm9z7ib3wz81c8a";
+    })
+  ];
+
+  makeFlags = [
+    "AR=${stdenv.cc.targetPrefix}ar" # Fix cross-compilation
+    "PREFIX=${placeholder "out"}"
+    "ARGON2_VERSION=${version}"
+    "LIBRARY_REL=lib"
+    "PKGCONFIG_REL=lib"
+  ] ++ lib.optionals stdenv.hostPlatform.isStatic [
+    "LIBRARIES=$(LIB_ST)"
+  ];
+
+  meta = with lib; {
+    description = "A key derivation function that was selected as the winner of the Password Hashing Competition in July 2015";
+    longDescription = ''
+      A password-hashing function created by by Alex Biryukov, Daniel Dinu, and
+      Dmitry Khovratovich. Argon2 was declared the winner of the Password
+      Hashing Competition (PHC). There were 24 submissions and 9 finalists.
+      Catena, Lyra2, Makwa and yescrypt were given special recognition. The PHC
+      recommends using Argon2 rather than legacy algorithms.
+    '';
+    homepage = "https://www.argon2.com/";
+    license = with licenses; [ asl20 cc0 ];
+    maintainers = with maintainers; [ taeer olynch ];
+    mainProgram = "argon2";
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libargs/default.nix b/nixpkgs/pkgs/development/libraries/libargs/default.nix
new file mode 100644
index 000000000000..5247aa5a94f5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libargs/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "args";
+  version = "6.4.6";
+
+  src = fetchFromGitHub {
+    owner = "Taywee";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-2gH3h3QAl0+XVULt/fR2UUGKNIxTUmnRRdxPOFdpVy4=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  # https://github.com/Taywee/args/issues/108
+  postPatch = ''
+    substituteInPlace CMakeLists.txt \
+      --replace '$'{CMAKE_INSTALL_LIBDIR_ARCHIND} '$'{CMAKE_INSTALL_LIBDIR}
+    substituteInPlace packaging/pkgconfig.pc.in \
+      --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
+  '';
+
+  meta = with lib; {
+    description = "A simple header-only C++ argument parser library";
+    homepage = "https://github.com/Taywee/args";
+    license = licenses.mit;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libasr/default.nix b/nixpkgs/pkgs/development/libraries/libasr/default.nix
new file mode 100644
index 000000000000..8d5b6d128ddf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libasr/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl, libevent, openssl }:
+
+stdenv.mkDerivation rec {
+  pname = "libasr";
+  version=  "1.0.4";
+
+  src = fetchurl {
+    url = "https://www.opensmtpd.org/archives/${pname}-${version}.tar.gz";
+    sha256 = "1d6s8njqhvayx2gp47409sp1fn8m608ws26hr1srfp6i23nnpyqr";
+  };
+
+  buildInputs = [ libevent openssl ];
+
+  meta = with lib; {
+    homepage = "https://github.com/OpenSMTPD/libasr";
+    description = "Free, simple and portable asynchronous resolver library";
+    license = licenses.isc;
+    maintainers = [ maintainers.koral ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libass/default.nix b/nixpkgs/pkgs/development/libraries/libass/default.nix
new file mode 100644
index 000000000000..ad94f55ccb6d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libass/default.nix
@@ -0,0 +1,47 @@
+{ lib, stdenv, fetchurl, pkg-config, yasm
+, freetype, fribidi, harfbuzz
+, fontconfigSupport ? true, fontconfig ? null # fontconfig support
+, rasterizerSupport ? false # Internal rasterizer
+, largeTilesSupport ? false # Use larger tiles in the rasterizer
+, libiconv
+, darwin
+}:
+
+assert fontconfigSupport -> fontconfig != null;
+
+stdenv.mkDerivation rec {
+  pname = "libass";
+  version = "0.17.1";
+
+  src = fetchurl {
+    url = "https://github.com/libass/libass/releases/download/${version}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-8NoLv7pHbBauPhz9hiJW0wkVkR96uqGxbOYu5lMZJ4Q=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  configureFlags = [
+    (lib.enableFeature fontconfigSupport "fontconfig")
+    (lib.enableFeature rasterizerSupport "rasterizer")
+    (lib.enableFeature largeTilesSupport "large-tiles")
+  ];
+
+  nativeBuildInputs = [ pkg-config yasm ];
+
+  buildInputs = [ freetype fribidi harfbuzz ]
+    ++ lib.optional fontconfigSupport fontconfig
+    ++ lib.optional stdenv.isDarwin [
+      libiconv
+      darwin.apple_sdk.frameworks.ApplicationServices
+      darwin.apple_sdk.frameworks.CoreFoundation
+      darwin.apple_sdk.frameworks.CoreText
+    ];
+
+  meta = with lib; {
+    description = "Portable ASS/SSA subtitle renderer";
+    homepage    = "https://github.com/libass/libass";
+    license     = licenses.isc;
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ codyopel ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libassuan/default.nix b/nixpkgs/pkgs/development/libraries/libassuan/default.nix
new file mode 100644
index 000000000000..60c13040ae5e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libassuan/default.nix
@@ -0,0 +1,43 @@
+{ fetchurl, lib, stdenv, gettext, npth, libgpg-error, buildPackages }:
+
+stdenv.mkDerivation rec {
+  pname = "libassuan";
+  version = "2.5.6";
+
+  src = fetchurl {
+    url = "mirror://gnupg/${pname}/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-6f0nIY1TlJBOTjl4j5sXQnEcPmtBaJoxqjOAvVqk9CY=";
+  };
+
+  outputs = [ "out" "dev" "info" ];
+  outputBin = "dev"; # libassuan-config
+
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+  buildInputs = [ npth gettext ];
+
+  configureFlags = [
+    # Required for cross-compilation.
+    "--with-libgpg-error-prefix=${libgpg-error.dev}"
+  ];
+
+  doCheck = true;
+
+  # Make sure includes are fixed for callers who don't use libassuan-config
+  postInstall = ''
+    sed -i 's,#include <gpg-error.h>,#include "${libgpg-error.dev}/include/gpg-error.h",g' $dev/include/assuan.h
+  '';
+
+  meta = with lib; {
+    description = "IPC library used by GnuPG and related software";
+    longDescription = ''
+      Libassuan is a small library implementing the so-called Assuan
+      protocol.  This protocol is used for IPC between most newer
+      GnuPG components.  Both, server and client side functions are
+      provided.
+    '';
+    homepage = "http://gnupg.org";
+    license = licenses.lgpl2Plus;
+    platforms = platforms.all;
+    maintainers = [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libast/default.nix b/nixpkgs/pkgs/development/libraries/libast/default.nix
new file mode 100644
index 000000000000..f4dae188f31c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libast/default.nix
@@ -0,0 +1,31 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libast";
+  version = "0.8";
+
+  src = fetchFromGitHub {
+    owner = "mej";
+    repo = pname;
+    rev = version;
+    hash = "sha256-rnqToFi+d6D6O+JDHQxkVjTc/0RBag6Jqv4uDcE4PNc=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ];
+
+  meta = with lib; {
+    inherit (src.meta) homepage;
+    description = "Library of Assorted Spiffy Things";
+    license = licenses.bsd2;
+    maintainers = [ maintainers.AndersonTorres ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libasyncns/default.nix b/nixpkgs/pkgs/development/libraries/libasyncns/default.nix
new file mode 100644
index 000000000000..423b8cca6915
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libasyncns/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libasyncns";
+  version = "0.8";
+
+  src = fetchurl {
+    url = "http://0pointer.de/lennart/projects/libasyncns/${pname}-${version}.tar.gz";
+    sha256 = "0x5b6lcic4cd7q0bx00x93kvpyzl7n2abbgvqbrlzrfb8vknc6jg";
+  };
+
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace libasyncns/asyncns.c \
+      --replace '<arpa/nameser.h>' '<arpa/nameser_compat.h>'
+  '';
+
+  configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "ac_cv_func_malloc_0_nonnull=yes"
+    "ac_cv_func_realloc_0_nonnull=yes"
+  ];
+
+  meta = with lib; {
+    homepage = "http://0pointer.de/lennart/projects/libasyncns/";
+    description = "A C library for Linux/Unix for executing name service queries asynchronously";
+    license = licenses.lgpl21;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libatomic_ops/default.nix b/nixpkgs/pkgs/development/libraries/libatomic_ops/default.nix
new file mode 100644
index 000000000000..e7170953d0ca
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libatomic_ops/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl, autoconf, automake, libtool }:
+
+stdenv.mkDerivation rec {
+  pname = "libatomic_ops";
+  version = "7.8.2";
+
+  src = fetchurl {
+    urls = [
+      "http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-${version}.tar.gz"
+      "https://github.com/ivmai/libatomic_ops/releases/download/v${version}/libatomic_ops-${version}.tar.gz"
+    ];
+    sha256 = "sha256-0wUgf+IH8rP7XLTAGdoStEzj/LxZPf1QgNhnsaJBm1E=";
+  };
+
+  outputs = [ "out" "dev" "doc" ];
+
+  nativeBuildInputs = lib.optionals stdenv.isCygwin [ autoconf automake libtool ];
+
+  preConfigure = lib.optionalString stdenv.isCygwin ''
+    sed -i -e "/libatomic_ops_gpl_la_SOURCES/a libatomic_ops_gpl_la_LIBADD = libatomic_ops.la" src/Makefile.am
+    ./autogen.sh
+  '';
+
+  meta = {
+    description = "A library for semi-portable access to hardware-provided atomic memory update operations";
+    license = lib.licenses.gpl2Plus ;
+    maintainers = [lib.maintainers.raskin];
+    platforms = with lib.platforms; unix ++ windows;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libaudclient/default.nix b/nixpkgs/pkgs/development/libraries/libaudclient/default.nix
new file mode 100644
index 000000000000..9c790172039b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libaudclient/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchurl, pkg-config, glib, dbus-glib }:
+
+stdenv.mkDerivation rec {
+  pname = "libaudclient";
+  version = "3.5-rc2";
+
+  src = fetchurl {
+    url = "https://distfiles.audacious-media-player.org/${pname}-${version}.tar.bz2";
+    sha256 = "0nhpgz0kg8r00z54q5i96pjk7s57krq3fvdypq496c7fmlv9kdap";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ glib dbus-glib ];
+
+  meta = with lib; {
+    description = "Legacy D-Bus client library for Audacious";
+    homepage = "https://audacious-media-player.org/";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ pSub ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libaudec/default.nix b/nixpkgs/pkgs/development/libraries/libaudec/default.nix
new file mode 100644
index 000000000000..5340f62a32ed
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libaudec/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub
+, libsndfile, libsamplerate
+, meson, ninja, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libaudec";
+  version = "0.3.4";
+
+  src = fetchFromGitHub {
+    owner = "zrythm";
+    repo = "libaudec";
+    rev = "v${version}";
+    sha256 = "sha256-8morbrq8zG+2N3ruMeJa85ci9P0wPQOfZ5H56diFEAo=";
+  };
+
+  buildInputs = [ libsndfile libsamplerate ];
+  nativeBuildInputs = [ meson ninja pkg-config ];
+
+  meta = with lib; {
+    description = "A library for reading and resampling audio files";
+    homepage = "https://www.zrythm.org";
+    license = licenses.agpl3Plus;
+    mainProgram = "audec";
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libav/default.nix b/nixpkgs/pkgs/development/libraries/libav/default.nix
new file mode 100644
index 000000000000..283c2034be7e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libav/default.nix
@@ -0,0 +1,137 @@
+{ lib, stdenv, fetchurl, pkg-config, yasm, bzip2, zlib, perl, bash
+, mp3Support    ? true,   lame      ? null
+, speexSupport  ? true,   speex     ? null
+, theoraSupport ? true,   libtheora ? null
+, vorbisSupport ? true,   libvorbis ? null
+, vpxSupport    ? true,   libvpx    ? null
+, x264Support   ? false,  x264      ? null
+, xvidSupport   ? true,   xvidcore  ? null
+, faacSupport   ? false,  faac      ? null
+, vaapiSupport  ? true,   libva     ? null
+, vdpauSupport  ? true,   libvdpau  ? null
+, freetypeSupport ? true, freetype  ? null # it's small and almost everywhere
+, SDL # only for avplay in $bin, adds nontrivial closure to it
+, enableGPL ? true # ToDo: some additional default stuff may need GPL
+, enableUnfree ? faacSupport
+}:
+
+assert faacSupport -> enableUnfree;
+
+let inherit (lib) optional optionals hasPrefix enableFeature; in
+
+/* ToDo:
+    - more deps, inspiration: https://packages.ubuntu.com/raring/libav-tools
+    - maybe do some more splitting into outputs
+*/
+
+let
+  result = {
+    # e.g. https://libav.org/releases/libav-11.11.tar.xz.sha1
+    libav_0_8 = libavFun "0.8.21" "d858f65128dad0bac1a8c3a51e5cbb27a7c79b3f";
+    libav_11  = libavFun "11.12"  "61d5dcab5fde349834af193a572b12a5fd6a4d42";
+    libav_12  = libavFun "12.3"   "386c18c8b857f23dfcf456ce40370716130211d9";
+  };
+
+  libavFun = version : sha1 : stdenv.mkDerivation rec {
+    pname = "libav";
+    inherit version;
+
+    src = fetchurl {
+      url = "${meta.homepage}/releases/${pname}-${version}.tar.xz";
+      inherit sha1; # upstream directly provides sha1 of releases over https
+    };
+
+    patches = []
+      ++ optional (vpxSupport && hasPrefix "0.8." version) ./vpxenc-0.8.17-libvpx-1.5.patch
+      ++ optional (vpxSupport && hasPrefix "12." version) ./vpx-12.3-libvpx-1.8.patch
+      ;
+
+    postPatch = ''
+      patchShebangs .
+      # another shebang was hidden in a here document text
+      substituteInPlace ./configure --replace "#! /bin/sh" "#!${bash}/bin/sh"
+    '';
+
+    configurePlatforms = [];
+    configureFlags = assert lib.all (x: x!=null) buildInputs; [
+      "--arch=${stdenv.hostPlatform.parsed.cpu.name}"
+      "--target_os=${stdenv.hostPlatform.parsed.kernel.name}"
+      #"--enable-postproc" # it's now a separate package in upstream
+      "--disable-avserver" # upstream says it's in a bad state
+      "--enable-avplay"
+      "--enable-shared"
+      "--enable-runtime-cpudetect"
+      "--cc=${stdenv.cc.targetPrefix}cc"
+      (enableFeature enableGPL "gpl")
+      (enableFeature enableGPL "swscale")
+      (enableFeature mp3Support "libmp3lame")
+      (enableFeature mp3Support "libmp3lame")
+      (enableFeature speexSupport "libspeex")
+      (enableFeature theoraSupport "libtheora")
+      (enableFeature vorbisSupport "libvorbis")
+      (enableFeature vpxSupport "libvpx")
+      (enableFeature x264Support "libx264")
+      (enableFeature xvidSupport "libxvid")
+      (enableFeature faacSupport "libfaac")
+      (enableFeature faacSupport "nonfree")
+      (enableFeature vaapiSupport "vaapi")
+      (enableFeature vdpauSupport "vdpau")
+      (enableFeature freetypeSupport "libfreetype")
+    ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+      "--cross-prefix=${stdenv.cc.targetPrefix}"
+      "--enable-cross-compile"
+    ];
+
+  nativeBuildInputs = [ pkg-config perl ];
+    buildInputs = [ lame yasm zlib bzip2 SDL bash ]
+      ++ [ perl ] # for install-man target
+      ++ optional mp3Support lame
+      ++ optional speexSupport speex
+      ++ optional theoraSupport libtheora
+      ++ optional vorbisSupport libvorbis
+      ++ optional vpxSupport libvpx
+      ++ optional x264Support x264
+      ++ optional xvidSupport xvidcore
+      ++ optional faacSupport faac
+      ++ optional vaapiSupport libva
+      ++ optional vdpauSupport libvdpau
+      ++ optional freetypeSupport freetype
+      ;
+
+    enableParallelBuilding = true;
+
+    outputs = [ "bin" "dev" "out" ];
+    setOutputFlags = false;
+
+    # alltools to build smaller tools, incl. aviocat, ismindex, qt-faststart, etc.
+    buildFlags = [ "all" "alltools" "install-man" ];
+
+
+    postInstall = ''
+      moveToOutput bin "$bin"
+      # alltools target compiles an executable in tools/ for every C
+      # source file in tools/, so move those to $out
+      for tool in $(find tools -type f -executable); do
+        mv "$tool" "$bin/bin/"
+      done
+    '';
+
+    doInstallCheck = false; # fails randomly
+    installCheckTarget = "check"; # tests need to be run *after* installation
+
+    passthru = { inherit vdpauSupport; };
+
+    meta = with lib; {
+      homepage = "https://libav.org/";
+      description = "A complete, cross-platform solution to record, convert and stream audio and video (fork of ffmpeg)";
+      license = with licenses; if enableUnfree then unfree #ToDo: redistributable or not?
+        else if enableGPL then gpl2Plus else lgpl21Plus;
+      platforms = with platforms; linux ++ darwin;
+      knownVulnerabilities =
+        lib.optional (lib.versionOlder version "12.1") "CVE-2017-9051"
+        ++ lib.optionals (lib.versionOlder version "12.3") [ "CVE-2018-5684" "CVE-2018-5766" ]
+        ++ lib.optionals (lib.versionOlder version "12.4") [ "CVE-2019-9717" "CVE-2019-9720" ];
+    };
+  }; # libavFun
+
+in result
diff --git a/nixpkgs/pkgs/development/libraries/libav/vpx-12.3-libvpx-1.8.patch b/nixpkgs/pkgs/development/libraries/libav/vpx-12.3-libvpx-1.8.patch
new file mode 100644
index 000000000000..8f8e5003284f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libav/vpx-12.3-libvpx-1.8.patch
@@ -0,0 +1,46 @@
+--- libav/libavcodec/libvpx.c.orig	2018-02-12 21:25:59 UTC
++++ libav/libavcodec/libvpx.c
+@@ -25,6 +25,7 @@
+ enum AVPixelFormat ff_vpx_imgfmt_to_pixfmt(vpx_img_fmt_t img)
+ {
+     switch (img) {
++#if VPX_IMAGE_ABI_VERSION < 5
+     case VPX_IMG_FMT_RGB24:     return AV_PIX_FMT_RGB24;
+     case VPX_IMG_FMT_RGB565:    return AV_PIX_FMT_RGB565BE;
+     case VPX_IMG_FMT_RGB555:    return AV_PIX_FMT_RGB555BE;
+@@ -36,10 +37,13 @@ enum AVPixelFormat ff_vpx_imgfmt_to_pixfmt(vpx_img_fmt
+     case VPX_IMG_FMT_ARGB_LE:   return AV_PIX_FMT_BGRA;
+     case VPX_IMG_FMT_RGB565_LE: return AV_PIX_FMT_RGB565LE;
+     case VPX_IMG_FMT_RGB555_LE: return AV_PIX_FMT_RGB555LE;
++#endif
+     case VPX_IMG_FMT_I420:      return AV_PIX_FMT_YUV420P;
+     case VPX_IMG_FMT_I422:      return AV_PIX_FMT_YUV422P;
+     case VPX_IMG_FMT_I444:      return AV_PIX_FMT_YUV444P;
++#if VPX_IMAGE_ABI_VERSION < 5
+     case VPX_IMG_FMT_444A:      return AV_PIX_FMT_YUVA444P;
++#endif
+ #if VPX_IMAGE_ABI_VERSION >= 3
+     case VPX_IMG_FMT_I440:      return AV_PIX_FMT_YUV440P;
+     case VPX_IMG_FMT_I42016:    return AV_PIX_FMT_YUV420P16BE;
+@@ -53,6 +57,7 @@ enum AVPixelFormat ff_vpx_imgfmt_to_pixfmt(vpx_img_fmt
+ vpx_img_fmt_t ff_vpx_pixfmt_to_imgfmt(enum AVPixelFormat pix)
+ {
+     switch (pix) {
++#if VPX_IMAGE_ABI_VERSION < 5
+     case AV_PIX_FMT_RGB24:        return VPX_IMG_FMT_RGB24;
+     case AV_PIX_FMT_RGB565BE:     return VPX_IMG_FMT_RGB565;
+     case AV_PIX_FMT_RGB555BE:     return VPX_IMG_FMT_RGB555;
+@@ -64,10 +69,13 @@ vpx_img_fmt_t ff_vpx_pixfmt_to_imgfmt(enum AVPixelForm
+     case AV_PIX_FMT_BGRA:         return VPX_IMG_FMT_ARGB_LE;
+     case AV_PIX_FMT_RGB565LE:     return VPX_IMG_FMT_RGB565_LE;
+     case AV_PIX_FMT_RGB555LE:     return VPX_IMG_FMT_RGB555_LE;
++#endif
+     case AV_PIX_FMT_YUV420P:      return VPX_IMG_FMT_I420;
+     case AV_PIX_FMT_YUV422P:      return VPX_IMG_FMT_I422;
+     case AV_PIX_FMT_YUV444P:      return VPX_IMG_FMT_I444;
++#if VPX_IMAGE_ABI_VERSION < 5
+     case AV_PIX_FMT_YUVA444P:     return VPX_IMG_FMT_444A;
++#endif
+ #if VPX_IMAGE_ABI_VERSION >= 3
+     case AV_PIX_FMT_YUV440P:      return VPX_IMG_FMT_I440;
+     case AV_PIX_FMT_YUV420P16BE:  return VPX_IMG_FMT_I42016;
diff --git a/nixpkgs/pkgs/development/libraries/libav/vpxenc-0.8.17-libvpx-1.5.patch b/nixpkgs/pkgs/development/libraries/libav/vpxenc-0.8.17-libvpx-1.5.patch
new file mode 100644
index 000000000000..456828c025ef
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libav/vpxenc-0.8.17-libvpx-1.5.patch
@@ -0,0 +1,22 @@
+--- a/libavcodec/libvpxenc.c	2016-05-01 17:57:16.753852614 +0200
++++ b/libavcodec/libvpxenc.c	2016-05-01 18:01:08.252147138 +0200
+@@ -67,19 +67,11 @@
+ 
+ /** String mappings for enum vp8e_enc_control_id */
+ static const char *ctlidstr[] = {
+-    [VP8E_UPD_ENTROPY]           = "VP8E_UPD_ENTROPY",
+-    [VP8E_UPD_REFERENCE]         = "VP8E_UPD_REFERENCE",
+-    [VP8E_USE_REFERENCE]         = "VP8E_USE_REFERENCE",
+-    [VP8E_SET_ROI_MAP]           = "VP8E_SET_ROI_MAP",
+-    [VP8E_SET_ACTIVEMAP]         = "VP8E_SET_ACTIVEMAP",
+-    [VP8E_SET_SCALEMODE]         = "VP8E_SET_SCALEMODE",
+     [VP8E_SET_CPUUSED]           = "VP8E_SET_CPUUSED",
+     [VP8E_SET_ENABLEAUTOALTREF]  = "VP8E_SET_ENABLEAUTOALTREF",
+     [VP8E_SET_NOISE_SENSITIVITY] = "VP8E_SET_NOISE_SENSITIVITY",
+-    [VP8E_SET_SHARPNESS]         = "VP8E_SET_SHARPNESS",
+     [VP8E_SET_STATIC_THRESHOLD]  = "VP8E_SET_STATIC_THRESHOLD",
+     [VP8E_SET_TOKEN_PARTITIONS]  = "VP8E_SET_TOKEN_PARTITIONS",
+-    [VP8E_GET_LAST_QUANTIZER]    = "VP8E_GET_LAST_QUANTIZER",
+     [VP8E_SET_ARNR_MAXFRAMES]    = "VP8E_SET_ARNR_MAXFRAMES",
+     [VP8E_SET_ARNR_STRENGTH]     = "VP8E_SET_ARNR_STRENGTH",
+     [VP8E_SET_ARNR_TYPE]         = "VP8E_SET_ARNR_TYPE",
diff --git a/nixpkgs/pkgs/development/libraries/libavc1394/default.nix b/nixpkgs/pkgs/development/libraries/libavc1394/default.nix
new file mode 100644
index 000000000000..4dfc5713af7e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libavc1394/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchurl, pkg-config, libraw1394, argp-standalone }:
+
+stdenv.mkDerivation rec {
+  pname = "libavc1394";
+  version = "0.5.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libavc1394/${pname}-${version}.tar.gz";
+    sha256 = "0lsv46jdqvdx5hx92v0z2cz3yh6212pz9gk0k3513sbaa04zzcbw";
+  };
+
+  buildInputs = lib.optional stdenv.hostPlatform.isMusl argp-standalone;
+  nativeBuildInputs = [ pkg-config ];
+  propagatedBuildInputs = [ libraw1394 ];
+
+  NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-largp";
+
+  meta = {
+    description = "Programming interface for the 1394 Trade Association AV/C (Audio/Video Control) Digital Interface Command Set";
+    homepage = "https://sourceforge.net/projects/libavc1394/";
+    license = lib.licenses.lgpl21Plus;
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libavif/default.nix b/nixpkgs/pkgs/development/libraries/libavif/default.nix
new file mode 100644
index 000000000000..2cb7920cb5f9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libavif/default.nix
@@ -0,0 +1,94 @@
+{ lib, stdenv
+, fetchFromGitHub
+, libaom
+, cmake
+, pkg-config
+, zlib
+, libpng
+, libjpeg
+, dav1d
+, libyuv
+, gdk-pixbuf
+, makeWrapper
+}:
+
+let
+  gdkPixbufModuleDir = "${placeholder "out"}/${gdk-pixbuf.moduleDir}";
+  gdkPixbufModuleFile = "${placeholder "out"}/${gdk-pixbuf.binaryDir}/avif-loaders.cache";
+in
+
+stdenv.mkDerivation rec {
+  pname = "libavif";
+  version = "1.0.3";
+
+  src = fetchFromGitHub {
+    owner = "AOMediaCodec";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-0MLr9wdIs3c4pOAF4rlC8QNQXlrK3YGXILS9foVKfVM=";
+  };
+
+  # reco: encode libaom slowest but best, decode dav1d fastest
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+    "-DAVIF_CODEC_AOM=ON" # best encoder (slow but small)
+    "-DAVIF_CODEC_DAV1D=ON" # best decoder (fast)
+    "-DAVIF_CODEC_AOM_DECODE=OFF"
+    "-DAVIF_BUILD_APPS=ON"
+    "-DAVIF_BUILD_GDK_PIXBUF=ON"
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    gdk-pixbuf
+    makeWrapper
+  ];
+
+  buildInputs = [
+    gdk-pixbuf
+    libaom
+    zlib
+    libpng
+    libjpeg
+    dav1d
+    libyuv
+  ];
+
+  postPatch = ''
+    substituteInPlace contrib/gdk-pixbuf/avif.thumbnailer.in \
+      --replace '@CMAKE_INSTALL_FULL_BINDIR@/gdk-pixbuf-thumbnailer' "$out/libexec/gdk-pixbuf-thumbnailer-avif"
+  '';
+
+  env.PKG_CONFIG_GDK_PIXBUF_2_0_GDK_PIXBUF_MODULEDIR = gdkPixbufModuleDir;
+
+  postInstall = ''
+    GDK_PIXBUF_MODULEDIR=${gdkPixbufModuleDir} \
+    GDK_PIXBUF_MODULE_FILE=${gdkPixbufModuleFile} \
+    gdk-pixbuf-query-loaders --update-cache
+
+  ''
+  # Cross-compiled gdk-pixbuf doesn't support thumbnailers
+  + lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
+    mkdir -p "$out/bin"
+    makeWrapper ${gdk-pixbuf}/bin/gdk-pixbuf-thumbnailer "$out/libexec/gdk-pixbuf-thumbnailer-avif" \
+      --set GDK_PIXBUF_MODULE_FILE ${gdkPixbufModuleFile}
+  '';
+
+  meta = with lib; {
+    description  = "C implementation of the AV1 Image File Format";
+    longDescription = ''
+      Libavif aims to be a friendly, portable C implementation of the
+      AV1 Image File Format. It is a work-in-progress, but can already
+      encode and decode all AOM supported YUV formats and bit depths
+      (with alpha). It also features an encoder and a decoder
+      (avifenc/avifdec).
+    '';
+    homepage    = "https://github.com/AOMediaCodec/libavif";
+    changelog   = "https://github.com/AOMediaCodec/libavif/blob/v${version}/CHANGELOG.md";
+    maintainers = with maintainers; [ mkg20001 ];
+    platforms   = platforms.all;
+    license     = licenses.bsd2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libax25/default.nix b/nixpkgs/pkgs/development/libraries/libax25/default.nix
new file mode 100644
index 000000000000..27f519099006
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libax25/default.nix
@@ -0,0 +1,31 @@
+{ lib
+, stdenv
+, fetchurl
+, glibc
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libax25";
+  version = "0.0.12-rc5";
+
+  buildInputs = [ glibc ] ++ lib.optionals stdenv.hostPlatform.isStatic [ glibc.static ];
+
+  # Due to recent unsolvable administrative domain problems with linux-ax25.org,
+  # the new domain is linux-ax25.in-berlin.de
+  src = fetchurl {
+    url = "https://linux-ax25.in-berlin.de/pub/ax25-lib/libax25-${version}.tar.gz";
+    hash = "sha256-vxV5GVDOHr38N/512ArZpnZ+a7FTbXBNpoSJkc9DI98=";
+  };
+
+  configureFlags = [ "--sysconfdir=/etc" ];
+
+  LDFLAGS = lib.optionals stdenv.hostPlatform.isStatic [ "-static-libgcc" "-static" ];
+
+  meta = with lib; {
+    description = "AX.25 library for hamradio applications";
+    homepage = "https://linux-ax25.in-berlin.de/wiki/Main_Page";
+    license = licenses.lgpl21Only;
+    maintainers = with maintainers; [ sarcasticadmin ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libayatana-appindicator/default.nix b/nixpkgs/pkgs/development/libraries/libayatana-appindicator/default.nix
new file mode 100644
index 000000000000..719f1b3e4275
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libayatana-appindicator/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchFromGitHub, lib
+, pkg-config, cmake
+, gtk-doc
+, gtk3, libayatana-indicator, libdbusmenu-gtk3
+, vala
+, gobject-introspection
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libayatana-appindicator";
+  version = "0.5.92";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "AyatanaIndicators";
+    repo = "libayatana-appindicator";
+    rev = version;
+    sha256 = "sha256-NzaWQBb2Ez1ik23wCgW1ZQh1/rY7GcPlLvaSgV7uXrA=";
+  };
+
+  nativeBuildInputs = [ pkg-config cmake gtk-doc vala gobject-introspection ];
+
+  buildInputs = [ gtk3 ];
+
+  propagatedBuildInputs = [ libayatana-indicator libdbusmenu-gtk3 ];
+
+  cmakeFlags = [
+    "-DENABLE_BINDINGS_MONO=False"
+  ];
+
+  meta = with lib; {
+    description = "Ayatana Application Indicators Shared Library";
+    homepage = "https://github.com/AyatanaIndicators/libayatana-appindicator";
+    changelog = "https://github.com/AyatanaIndicators/libayatana-appindicator/blob/${version}/ChangeLog";
+    license = [ licenses.lgpl3Plus licenses.lgpl21Plus ];
+    maintainers = [ maintainers.nickhu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libayatana-common/default.nix b/nixpkgs/pkgs/development/libraries/libayatana-common/default.nix
new file mode 100644
index 000000000000..439cc45031f9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libayatana-common/default.nix
@@ -0,0 +1,79 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, gitUpdater
+, testers
+, cmake
+, glib
+, gobject-introspection
+, gtest
+, intltool
+, lomiri
+, pkg-config
+, systemd
+, vala
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libayatana-common";
+  version = "0.9.10";
+
+  src = fetchFromGitHub {
+    owner = "AyatanaIndicators";
+    repo = "libayatana-common";
+    rev = finalAttrs.version;
+    hash = "sha256-qi3xsnZjqSz3I7O+xPxDnI91qDIA0XFJ3tCQQF84vIg=";
+  };
+
+  postPatch = ''
+    # Queries via pkg_get_variable, can't override prefix
+    substituteInPlace data/CMakeLists.txt \
+      --replace 'pkg_get_variable(SYSTEMD_USER_UNIT_DIR systemd systemd_user_unit_dir)' 'set(SYSTEMD_USER_UNIT_DIR ''${CMAKE_INSTALL_PREFIX}/lib/systemd/user)'
+  '';
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    cmake
+    gobject-introspection
+    intltool
+    pkg-config
+    vala
+  ];
+
+  buildInputs = [
+    lomiri.cmake-extras
+    glib
+    lomiri.lomiri-url-dispatcher
+    systemd
+  ];
+
+  checkInputs = [
+    gtest
+  ];
+
+  cmakeFlags = [
+    "-DENABLE_TESTS=${lib.boolToString finalAttrs.finalPackage.doCheck}"
+    "-DENABLE_LOMIRI_FEATURES=ON"
+    "-DGSETTINGS_LOCALINSTALL=ON"
+    "-DGSETTINGS_COMPILE=ON"
+  ];
+
+  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
+
+  passthru = {
+    tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+    updateScript = gitUpdater { };
+  };
+
+  meta = with lib; {
+    description = "Common functions for Ayatana System Indicators";
+    homepage = "https://github.com/AyatanaIndicators/libayatana-common";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ OPNA2608 ];
+    platforms = platforms.linux;
+    pkgConfigModules = [
+      "libayatana-common"
+    ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libayatana-indicator/default.nix b/nixpkgs/pkgs/development/libraries/libayatana-indicator/default.nix
new file mode 100644
index 000000000000..0cadea9f9902
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libayatana-indicator/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchFromGitHub, lib
+, pkg-config, cmake
+, gtk3
+, ayatana-ido
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libayatana-indicator";
+  version = "0.9.4";
+
+  src = fetchFromGitHub {
+    owner = "AyatanaIndicators";
+    repo = "libayatana-indicator";
+    rev = version;
+    sha256 = "sha256-OsguZ+jl274uPSCTFHq/ZwUE3yHR7MlUPHCpfmn1F7A=";
+  };
+
+  nativeBuildInputs = [ pkg-config cmake ];
+
+  buildInputs = [ gtk3 ];
+
+  propagatedBuildInputs = [ ayatana-ido ];
+
+  meta = with lib; {
+    description = "Ayatana Indicators Shared Library";
+    homepage = "https://github.com/AyatanaIndicators/libayatana-indicator";
+    changelog = "https://github.com/AyatanaIndicators/libayatana-indicator/blob/${version}/ChangeLog";
+    license = licenses.gpl3Plus;
+    maintainers = [ maintainers.nickhu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libb2/default.nix b/nixpkgs/pkgs/development/libraries/libb2/default.nix
new file mode 100644
index 000000000000..9e507188aad3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libb2/default.nix
@@ -0,0 +1,43 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, libtool
+, pkg-config
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libb2";
+  version = "0.98.1";
+
+  src = fetchFromGitHub {
+    owner = "BLAKE2";
+    repo = "libb2";
+    rev = "refs/tags/v${finalAttrs.version}";
+    sha256 = "0qj8aaqvfcavj1vj5asm4pqm03ap7q8x4c2fy83cqggvky0frgya";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    libtool
+    pkg-config
+  ];
+
+  configureFlags = lib.optional stdenv.hostPlatform.isx86 "--enable-fat=yes";
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    description = "The BLAKE2 family of cryptographic hash functions";
+    homepage = "https://blake2.net/";
+    pkgConfigModules = [ "libb2" ];
+    platforms = platforms.all;
+    maintainers = with maintainers; [ dfoxfranke dotlambda ];
+    license = licenses.cc0;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libb64/default.nix b/nixpkgs/pkgs/development/libraries/libb64/default.nix
new file mode 100644
index 000000000000..3b24089e53c6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libb64/default.nix
@@ -0,0 +1,62 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch }:
+
+stdenv.mkDerivation rec {
+  pname = "libb64";
+  version = "2.0.0.1";
+
+  src = fetchFromGitHub {
+    owner = "libb64";
+    repo = "libb64";
+    rev = "v${version}";
+    sha256 = "sha256-9loDftr769qnIi00MueO86kjha2EiG9pnCLogp0Iq3c=";
+  };
+
+  patches = [
+    # Fix parallel build failure: https://github.com/libb64/libb64/pull/9
+    #  make[1]: *** No rule to make target 'libb64.a', needed by 'c-example1'.  Stop.
+    (fetchpatch {
+      name = "parallel-make.patch";
+      url = "https://github.com/libb64/libb64/commit/4fe47c052e9123da8f751545deb48be08c3411f6.patch";
+      sha256 = "18b3np3gpyzimqmk6001riqv5n70wfbclky6zzsrvj5zl1dj4ljf";
+    })
+    # Fix i686-linux build failure.
+    (fetchpatch {
+      name = "elif.patch";
+      url = "https://github.com/libb64/libb64/commit/819e43c8b34261ea3ee694bdc27865a033966083.patch";
+      hash = "sha256-r2jI6Q3rWDtArLlkAuyy7vcjsuRvX+2fBd5yk8XOMcc";
+    })
+    (fetchpatch {
+      name = "size_t.patch";
+      url = "https://github.com/libb64/libb64/commit/b5edeafc89853c48fa41a4c16393a1fdc8638ab6.patch";
+      hash = "sha256-+bqfOOlT/t0FLQEMHuxW1BxJcx9rk0yYM3wD43mcymo";
+    })
+    # Fix build with Clang 16.
+    # https://github.com/libb64/libb64/pull/10
+    (fetchpatch {
+      name = "use-proper-function-prototype-for-main.patch";
+      url = "https://github.com/libb64/libb64/commit/98eaf510f40e384b32c01ad4bd5c3a697fdd8560.patch";
+      hash = "sha256-CGslJUw0og/bBBirLm0J5Q7cf2WW/vniVAkXHlb6lbQ=";
+    })
+  ] ++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) (fetchpatch {
+    name = "0001-example-Do-not-run-the-tests.patch";
+    url = "https://cgit.openembedded.org/meta-openembedded/plain/meta-oe/recipes-support/libb64/libb64/0001-example-Do-not-run-the-tests.patch?id=484e0de1e4ee107f21ae2a5c5f976ed987978baf";
+    sha256 = "sha256-KTsiIWJe66BKlu/A43FWfW0XAu4E7lWX/RY4NITRrm4=";
+  });
+
+  enableParallelBuilding = true;
+
+  installPhase = ''
+    mkdir -p $out $out/lib $out/bin $out/include
+    cp -r include/* $out/include/
+    cp base64/base64 $out/bin/
+    cp src/libb64.a src/cencode.o src/cdecode.o $out/lib/
+  '';
+
+  meta = {
+    description = "ANSI C routines for fast base64 encoding/decoding";
+    homepage = "https://github.com/libb64/libb64";
+    license = lib.licenses.publicDomain;
+    mainProgram = "base64";
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libbacktrace/0001-libbacktrace-avoid-libtool-wrapping-tests.patch b/nixpkgs/pkgs/development/libraries/libbacktrace/0001-libbacktrace-avoid-libtool-wrapping-tests.patch
new file mode 100644
index 000000000000..3ee3198cb229
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libbacktrace/0001-libbacktrace-avoid-libtool-wrapping-tests.patch
@@ -0,0 +1,201 @@
+From 1cf6b108882669f1b20c18fb5f2d6dff0fc83296 Mon Sep 17 00:00:00 2001
+From: Jan Tojnar <jtojnar@gmail.com>
+Date: Sat, 24 Dec 2022 15:31:51 +0100
+Subject: [PATCH 1/4] libbacktrace: avoid libtool wrapping tests
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When `--enable-shared` is used, libtool will produce shell scripts
+instead of programs, preventing separate debug info from being generated:
+
+    objcopy --only-keep-debug btest btest_gnudebuglink.debug
+    objcopy: btest: file format not recognized
+    make[2]: *** [Makefile:2615: btest_gnudebuglink] Error 1
+
+Let’s make it properly set rpath with `-no-install` flag,
+so that wrappers are not needed, as mentioned on
+https://autotools.info/libtool/wrappers.html
+---
+ Makefile.am | 28 +++++++++++++++++++++++-----
+ 1 file changed, 23 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index c53cbae..6eab991 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -107,6 +107,8 @@ check_DATA =
+ # Flags to use when compiling test programs.
+ libbacktrace_TEST_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) -g
+ 
++libbacktrace_TEST_LDFLAGS = -no-install
++
+ if USE_DSYMUTIL
+ 
+ %.dSYM: %
+@@ -171,48 +173,56 @@ xcoff_%.c: xcoff.c
+ 
+ test_elf_32_SOURCES = test_format.c testlib.c
+ test_elf_32_CFLAGS = $(libbacktrace_TEST_CFLAGS)
++test_elf_32_LDFLAGS = $(libbacktrace_TEST_LDFLAGS)
+ test_elf_32_LDADD = libbacktrace_noformat.la elf_32.lo
+ 
+ BUILDTESTS += test_elf_32
+ 
+ test_elf_64_SOURCES = test_format.c testlib.c
+ test_elf_64_CFLAGS = $(libbacktrace_TEST_CFLAGS)
++test_elf_64_LDFLAGS = $(libbacktrace_TEST_LDFLAGS)
+ test_elf_64_LDADD = libbacktrace_noformat.la elf_64.lo
+ 
+ BUILDTESTS += test_elf_64
+ 
+ test_macho_SOURCES = test_format.c testlib.c
+ test_macho_CFLAGS = $(libbacktrace_TEST_CFLAGS)
++test_macho_LDFLAGS = $(libbacktrace_TEST_LDFLAGS)
+ test_macho_LDADD = libbacktrace_noformat.la macho.lo
+ 
+ BUILDTESTS += test_macho
+ 
+ test_xcoff_32_SOURCES = test_format.c testlib.c
+ test_xcoff_32_CFLAGS = $(libbacktrace_TEST_CFLAGS)
++test_xcoff_32_LDFLAGS = $(libbacktrace_TEST_LDFLAGS)
+ test_xcoff_32_LDADD = libbacktrace_noformat.la xcoff_32.lo
+ 
+ BUILDTESTS += test_xcoff_32
+ 
+ test_xcoff_64_SOURCES = test_format.c testlib.c
+ test_xcoff_64_CFLAGS = $(libbacktrace_TEST_CFLAGS)
++test_xcoff_64_LDFLAGS = $(libbacktrace_TEST_LDFLAGS)
+ test_xcoff_64_LDADD = libbacktrace_noformat.la xcoff_64.lo
+ 
+ BUILDTESTS += test_xcoff_64
+ 
+ test_pecoff_SOURCES = test_format.c testlib.c
+ test_pecoff_CFLAGS = $(libbacktrace_TEST_CFLAGS)
++test_pecoff_LDFLAGS = $(libbacktrace_TEST_LDFLAGS)
+ test_pecoff_LDADD = libbacktrace_noformat.la pecoff.lo
+ 
+ BUILDTESTS += test_pecoff
+ 
+ test_unknown_SOURCES = test_format.c testlib.c
+ test_unknown_CFLAGS = $(libbacktrace_TEST_CFLAGS)
++test_unknown_LDFLAGS = $(libbacktrace_TEST_LDFLAGS)
+ test_unknown_LDADD = libbacktrace_noformat.la unknown.lo
+ 
+ BUILDTESTS += test_unknown
+ 
+ unittest_SOURCES = unittest.c testlib.c
+ unittest_CFLAGS = $(libbacktrace_TEST_CFLAGS)
++unittest_LDFLAGS = $(libbacktrace_TEST_LDFLAGS)
+ unittest_LDADD = libbacktrace.la
+ 
+ BUILDTESTS += unittest
+@@ -253,7 +263,7 @@ if HAVE_OBJCOPY_DEBUGLINK
+ 
+ b2test_SOURCES = $(btest_SOURCES)
+ b2test_CFLAGS = $(libbacktrace_TEST_CFLAGS)
+-b2test_LDFLAGS = -Wl,--build-id
++b2test_LDFLAGS = -Wl,--build-id $(libbacktrace_TEST_LDFLAGS)
+ b2test_LDADD = libbacktrace_elf_for_test.la
+ 
+ check_PROGRAMS += b2test
+@@ -263,7 +273,7 @@ if HAVE_DWZ
+ 
+ b3test_SOURCES = $(btest_SOURCES)
+ b3test_CFLAGS = $(libbacktrace_TEST_CFLAGS)
+-b3test_LDFLAGS = -Wl,--build-id
++b3test_LDFLAGS = -Wl,--build-id $(libbacktrace_TEST_LDFLAGS)
+ b3test_LDADD = libbacktrace_elf_for_test.la
+ 
+ check_PROGRAMS += b3test
+@@ -276,6 +286,7 @@ endif HAVE_ELF
+ 
+ btest_SOURCES = btest.c testlib.c
+ btest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -O
++btest_LDFLAGS = $(libbacktrace_TEST_LDFLAGS)
+ btest_LDADD = libbacktrace.la
+ 
+ BUILDTESTS += btest
+@@ -330,6 +341,7 @@ endif HAVE_DWZ
+ 
+ stest_SOURCES = stest.c
+ stest_CFLAGS = $(libbacktrace_TEST_CFLAGS)
++stest_LDFLAGS = $(libbacktrace_TEST_LDFLAGS)
+ stest_LDADD = libbacktrace.la
+ 
+ BUILDTESTS += stest
+@@ -352,6 +364,7 @@ if HAVE_ELF
+ 
+ ztest_SOURCES = ztest.c testlib.c
+ ztest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -DSRCDIR=\"$(srcdir)\"
++ztest_LDFLAGS = $(libbacktrace_TEST_LDFLAGS)
+ ztest_LDADD = libbacktrace.la
+ ztest_alloc_LDADD = libbacktrace_alloc.la
+ 
+@@ -371,6 +384,7 @@ BUILDTESTS += ztest_alloc
+ 
+ zstdtest_SOURCES = zstdtest.c testlib.c
+ zstdtest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -DSRCDIR=\"$(srcdir)\"
++zstdtest_LDFLAGS = $(libbacktrace_TEST_LDFLAGS)
+ zstdtest_LDADD = libbacktrace.la
+ zstdtest_alloc_LDADD = libbacktrace_alloc.la
+ 
+@@ -392,6 +406,7 @@ endif HAVE_ELF
+ 
+ edtest_SOURCES = edtest.c edtest2_build.c testlib.c
+ edtest_CFLAGS = $(libbacktrace_TEST_CFLAGS)
++edtest_LDFLAGS = $(libbacktrace_TEST_LDFLAGS)
+ edtest_LDADD = libbacktrace.la
+ 
+ BUILDTESTS += edtest
+@@ -422,6 +437,7 @@ BUILDTESTS += ttest
+ 
+ ttest_SOURCES = ttest.c testlib.c
+ ttest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -pthread
++ttest_LDFLAGS = $(libbacktrace_TEST_LDFLAGS)
+ ttest_LDADD = libbacktrace.la
+ 
+ if USE_DSYMUTIL
+@@ -460,12 +476,12 @@ if HAVE_COMPRESSED_DEBUG
+ 
+ ctestg_SOURCES = btest.c testlib.c
+ ctestg_CFLAGS = $(libbacktrace_TEST_CFLAGS)
+-ctestg_LDFLAGS = -Wl,--compress-debug-sections=zlib-gnu
++ctestg_LDFLAGS = -Wl,--compress-debug-sections=zlib-gnu $(libbacktrace_TEST_LDFLAGS)
+ ctestg_LDADD = libbacktrace.la
+ 
+ ctesta_SOURCES = btest.c testlib.c
+ ctesta_CFLAGS = $(libbacktrace_TEST_CFLAGS)
+-ctesta_LDFLAGS = -Wl,--compress-debug-sections=zlib-gabi
++ctesta_LDFLAGS = -Wl,--compress-debug-sections=zlib-gabi $(libbacktrace_TEST_LDFLAGS)
+ ctesta_LDADD = libbacktrace.la
+ 
+ BUILDTESTS += ctestg ctesta
+@@ -474,7 +490,7 @@ if HAVE_COMPRESSED_DEBUG_ZSTD
+ 
+ ctestzstd_SOURCES = btest.c testlib.c
+ ctestzstd_CFLAGS = $(libbacktrace_TEST_CFLAGS)
+-ctestzstd_LDFLAGS = -Wl,--compress-debug-sections=zstd
++ctestzstd_LDFLAGS = -Wl,--compress-debug-sections=zstd $(libbacktrace_TEST_LDFLAGS)
+ ctestzstd_LDADD = libbacktrace.la
+ 
+ BUILDTESTS += ctestzstd
+@@ -521,6 +537,7 @@ endif
+ 
+ mtest_SOURCES = mtest.c testlib.c
+ mtest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -O
++mtest_LDFLAGS = $(libbacktrace_TEST_LDFLAGS)
+ mtest_LDADD = libbacktrace.la
+ 
+ BUILDTESTS += mtest
+@@ -553,6 +570,7 @@ if HAVE_ELF
+ 
+ xztest_SOURCES = xztest.c testlib.c
+ xztest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -DSRCDIR=\"$(srcdir)\"
++xztest_LDFLAGS = $(libbacktrace_TEST_LDFLAGS)
+ xztest_LDADD = libbacktrace.la
+ 
+ xztest_alloc_SOURCES = $(xztest_SOURCES)
+-- 
+2.38.1
+
diff --git a/nixpkgs/pkgs/development/libraries/libbacktrace/0002-libbacktrace-Allow-configuring-debug-dir.patch b/nixpkgs/pkgs/development/libraries/libbacktrace/0002-libbacktrace-Allow-configuring-debug-dir.patch
new file mode 100644
index 000000000000..37da7ef4d964
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libbacktrace/0002-libbacktrace-Allow-configuring-debug-dir.patch
@@ -0,0 +1,108 @@
+From f409ee343fe6cdc059bb411746f27a515aec66a8 Mon Sep 17 00:00:00 2001
+From: Jan Tojnar <jtojnar@gmail.com>
+Date: Sat, 24 Dec 2022 16:46:18 +0100
+Subject: [PATCH 2/4] libbacktrace: Allow configuring debug dir
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+On platforms that do not use FHS like NixOS or GNU Guix,
+the build-id directories are not under `/usr/lib/debug`.
+
+Let’s add `--with-separate-debug-dir` configure flag so that
+the path can be changed. The same flag is supported by gdb:
+
+https://github.com/bminor/binutils-gdb/blob/095f84c7e3cf85cd68c657c46b80be078f336bc9/gdb/configure.ac#L113-L115
+---
+ Makefile.am  | 11 ++++++-----
+ configure.ac |  8 ++++++++
+ elf.c        |  4 ++--
+ 3 files changed, 16 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 6eab991..da443c1 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -33,7 +33,8 @@ ACLOCAL_AMFLAGS = -I config
+ 
+ AM_CPPFLAGS =
+ 
+-AM_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) $(PIC_FLAG)
++AM_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) $(PIC_FLAG) \
++	-DSYSTEM_DEBUG_DIR=\"$(SEPARATE_DEBUG_DIR)\"
+ 
+ include_HEADERS = backtrace.h backtrace-supported.h
+ 
+@@ -134,7 +135,7 @@ libbacktrace_noformat_la_DEPENDENCIES = $(libbacktrace_noformat_la_LIBADD)
+ if HAVE_ELF
+ if HAVE_OBJCOPY_DEBUGLINK
+ 
+-TEST_BUILD_ID_DIR=$(abs_builddir)/usr/lib/debug/.build-id/
++TEST_DEBUG_DIR=$(abs_builddir)/usr/lib/debug
+ 
+ check_LTLIBRARIES += libbacktrace_elf_for_test.la
+ 
+@@ -143,8 +144,8 @@ libbacktrace_elf_for_test_la_LIBADD = $(BACKTRACE_FILE) elf_for_test.lo \
+ 	$(VIEW_FILE) $(ALLOC_FILE)
+ 
+ elf_for_test.c: elf.c
+-	SEARCH='^#define SYSTEM_BUILD_ID_DIR.*$$'; \
+-	REPLACE="#define SYSTEM_BUILD_ID_DIR \"$(TEST_BUILD_ID_DIR)\""; \
++	SEARCH='^#define BUILD_ID_DIR.*$$'; \
++	REPLACE='\0\n#undef SYSTEM_DEBUG_DIR\n#define SYSTEM_DEBUG_DIR "$(TEST_DEBUG_DIR)"'; \
+ 	$(SED) "s%$$SEARCH%$$REPLACE%" \
+ 		$< \
+ 		> $@.tmp
+@@ -468,7 +469,7 @@ endif HAVE_OBJCOPY_DEBUGLINK
+ 
+ %_buildid: %
+ 	./install-debuginfo-for-buildid.sh \
+-	  "$(TEST_BUILD_ID_DIR)" \
++	  "$(TEST_DEBUG_DIR)/.build-id" \
+ 	  $<
+ 	$(OBJCOPY) --strip-debug $< $@
+ 
+diff --git a/configure.ac b/configure.ac
+index 7f122cb..bb590ab 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -67,6 +67,14 @@ AM_MAINTAINER_MODE
+ AC_ARG_WITH(target-subdir,
+ [  --with-target-subdir=SUBDIR      Configuring in a subdirectory for target])
+ 
++AC_ARG_WITH(separate-debug-dir,
++[  --with-separate-debug-dir=DEBUGDIR      Look for global separate debug info in this path @<:@LIBDIR/debug@:>@],
++[separate_debug_dir=$withval],
++[separate_debug_dir=$libdir/debug])
++
++SEPARATE_DEBUG_DIR=$separate_debug_dir
++AC_SUBST(SEPARATE_DEBUG_DIR)
++
+ # We must force CC to /not/ be precious variables; otherwise
+ # the wrong, non-multilib-adjusted value will be used in multilibs.
+ # As a side effect, we have to subst CFLAGS ourselves.
+diff --git a/elf.c b/elf.c
+index e82ecc5..8b1189c 100644
+--- a/elf.c
++++ b/elf.c
+@@ -856,7 +856,7 @@ elf_readlink (struct backtrace_state *state, const char *filename,
+     }
+ }
+ 
+-#define SYSTEM_BUILD_ID_DIR "/usr/lib/debug/.build-id/"
++#define BUILD_ID_DIR "/.build-id/"
+ 
+ /* Open a separate debug info file, using the build ID to find it.
+    Returns an open file descriptor, or -1.
+@@ -870,7 +870,7 @@ elf_open_debugfile_by_buildid (struct backtrace_state *state,
+ 			       backtrace_error_callback error_callback,
+ 			       void *data)
+ {
+-  const char * const prefix = SYSTEM_BUILD_ID_DIR;
++  const char * const prefix = SYSTEM_DEBUG_DIR BUILD_ID_DIR;
+   const size_t prefix_len = strlen (prefix);
+   const char * const suffix = ".debug";
+   const size_t suffix_len = strlen (suffix);
+-- 
+2.38.1
+
diff --git a/nixpkgs/pkgs/development/libraries/libbacktrace/0003-libbacktrace-Support-multiple-build-id-directories.patch b/nixpkgs/pkgs/development/libraries/libbacktrace/0003-libbacktrace-Support-multiple-build-id-directories.patch
new file mode 100644
index 000000000000..f223217a8313
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libbacktrace/0003-libbacktrace-Support-multiple-build-id-directories.patch
@@ -0,0 +1,101 @@
+From de122af5382d8017cae63bdee946206c6c6c23ab Mon Sep 17 00:00:00 2001
+From: Jan Tojnar <jtojnar@gmail.com>
+Date: Sat, 24 Dec 2022 20:19:27 +0100
+Subject: [PATCH 3/4] libbacktrace: Support multiple build id directories
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+gdb supports multiple debug directories separated by colons:
+https://github.com/bminor/binutils-gdb/blob/fcbfb25dcca625a7f999ec51d48b6fc3a32123c3/gdb/build-id.c#L136-L142
+
+This is useful for example when using dwarffs in addition
+to debug data installed using distribution’s package manager.
+---
+ elf.c | 57 ++++++++++++++++++++++++++++++++++++---------------------
+ 1 file changed, 36 insertions(+), 21 deletions(-)
+
+diff --git a/elf.c b/elf.c
+index 8b1189c..65c647a 100644
+--- a/elf.c
++++ b/elf.c
+@@ -865,12 +865,12 @@ elf_readlink (struct backtrace_state *state, const char *filename,
+    when the build ID is known is in /usr/lib/debug/.build-id.  */
+ 
+ static int
+-elf_open_debugfile_by_buildid (struct backtrace_state *state,
++elf_open_debugfile_by_buildid (const char * const prefix,
++                               struct backtrace_state *state,
+ 			       const char *buildid_data, size_t buildid_size,
+ 			       backtrace_error_callback error_callback,
+ 			       void *data)
+ {
+-  const char * const prefix = SYSTEM_DEBUG_DIR BUILD_ID_DIR;
+   const size_t prefix_len = strlen (prefix);
+   const char * const suffix = ".debug";
+   const size_t suffix_len = strlen (suffix);
+@@ -6936,27 +6936,42 @@ elf_add (struct backtrace_state *state, const char *filename, int descriptor,
+   if (buildid_data != NULL)
+     {
+       int d;
++      char debug_directories[strlen(SYSTEM_DEBUG_DIR) + 1];
++      char *debug_dir;
+ 
+-      d = elf_open_debugfile_by_buildid (state, buildid_data, buildid_size,
+-					 error_callback, data);
+-      if (d >= 0)
+-	{
+-	  int ret;
++      strcpy(debug_directories, SYSTEM_DEBUG_DIR);
+ 
+-	  elf_release_view (state, &buildid_view, error_callback, data);
+-	  if (debuglink_view_valid)
+-	    elf_release_view (state, &debuglink_view, error_callback, data);
+-	  if (debugaltlink_view_valid)
+-	    elf_release_view (state, &debugaltlink_view, error_callback, data);
+-	  ret = elf_add (state, "", d, NULL, 0, base_address, error_callback,
+-			 data, fileline_fn, found_sym, found_dwarf, NULL, 0,
+-			 1, NULL, 0);
+-	  if (ret < 0)
+-	    backtrace_close (d, error_callback, data);
+-	  else if (descriptor >= 0)
+-	    backtrace_close (descriptor, error_callback, data);
+-	  return ret;
+-	}
++      debug_dir = strtok (debug_directories, ":");
++      while (debug_dir != NULL)
++      {
++        char prefix[strlen(debug_dir) + strlen(BUILD_ID_DIR) + 1];
++        strcpy(prefix, debug_dir);
++        strcat(prefix, BUILD_ID_DIR);
++
++        d = elf_open_debugfile_by_buildid (prefix, state, buildid_data, buildid_size,
++                                           error_callback, data);
++
++        if (d >= 0)
++          {
++            int ret;
++
++            elf_release_view (state, &buildid_view, error_callback, data);
++            if (debuglink_view_valid)
++              elf_release_view (state, &debuglink_view, error_callback, data);
++            if (debugaltlink_view_valid)
++              elf_release_view (state, &debugaltlink_view, error_callback, data);
++            ret = elf_add (state, "", d, NULL, 0, base_address, error_callback,
++                           data, fileline_fn, found_sym, found_dwarf, NULL, 0,
++                           1, NULL, 0);
++            if (ret < 0)
++              backtrace_close (d, error_callback, data);
++            else if (descriptor >= 0)
++              backtrace_close (descriptor, error_callback, data);
++            return ret;
++          }
++
++        debug_dir = strtok (NULL, ":");
++      }
+     }
+ 
+   if (buildid_view_valid)
+-- 
+2.38.1
+
diff --git a/nixpkgs/pkgs/development/libraries/libbacktrace/0004-libbacktrace-Support-NIX_DEBUG_INFO_DIRS-environment.patch b/nixpkgs/pkgs/development/libraries/libbacktrace/0004-libbacktrace-Support-NIX_DEBUG_INFO_DIRS-environment.patch
new file mode 100644
index 000000000000..9abbbedb9eaa
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libbacktrace/0004-libbacktrace-Support-NIX_DEBUG_INFO_DIRS-environment.patch
@@ -0,0 +1,42 @@
+From a3b7510e4c9e7201a4301f2a45d8569b06354607 Mon Sep 17 00:00:00 2001
+From: Jan Tojnar <jtojnar@gmail.com>
+Date: Sat, 24 Dec 2022 20:30:22 +0100
+Subject: [PATCH 4/4] libbacktrace: Support NIX_DEBUG_INFO_DIRS environment
+ variable
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Let’s make debug data lookup work on NixOS just like in gdb.
+---
+ elf.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/elf.c b/elf.c
+index 65c647a..5c8abc0 100644
+--- a/elf.c
++++ b/elf.c
+@@ -6935,11 +6935,18 @@ elf_add (struct backtrace_state *state, const char *filename, int descriptor,
+ 
+   if (buildid_data != NULL)
+     {
++      const char *debug_directories_immutable;
++      const char *nix_debug = getenv ("NIX_DEBUG_INFO_DIRS");
++      if (nix_debug != NULL)
++        debug_directories_immutable = nix_debug;
++      else
++        debug_directories_immutable = SYSTEM_DEBUG_DIR;
++
+       int d;
+-      char debug_directories[strlen(SYSTEM_DEBUG_DIR) + 1];
++      char debug_directories[strlen(debug_directories_immutable) + 1];
+       char *debug_dir;
+ 
+-      strcpy(debug_directories, SYSTEM_DEBUG_DIR);
++      strcpy(debug_directories, debug_directories_immutable);
+ 
+       debug_dir = strtok (debug_directories, ":");
+       while (debug_dir != NULL)
+-- 
+2.38.1
+
diff --git a/nixpkgs/pkgs/development/libraries/libbacktrace/default.nix b/nixpkgs/pkgs/development/libraries/libbacktrace/default.nix
new file mode 100644
index 000000000000..288185f92281
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libbacktrace/default.nix
@@ -0,0 +1,56 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, enableStatic ? stdenv.hostPlatform.isStatic
+, enableShared ? !stdenv.hostPlatform.isStatic
+, unstableGitUpdater
+, autoreconfHook
+}:
+
+stdenv.mkDerivation {
+  pname = "libbacktrace";
+  version = "unstable-2023-11-30";
+
+  src = fetchFromGitHub {
+    owner = "ianlancetaylor";
+    repo = "libbacktrace";
+    rev = "14818b7783eeb9a56c3f0fca78cefd3143f8c5f6";
+    sha256 = "DQZQsqzeQ/0v87bfqs6sXqS2M5Tunc1OydTWRSB3PCw=";
+  };
+
+  patches = [
+    # Fix tests with shared library.
+    # https://github.com/ianlancetaylor/libbacktrace/pull/99
+    ./0001-libbacktrace-avoid-libtool-wrapping-tests.patch
+
+    # Support multiple debug dirs.
+    # https://github.com/ianlancetaylor/libbacktrace/pull/100
+    ./0002-libbacktrace-Allow-configuring-debug-dir.patch
+    ./0003-libbacktrace-Support-multiple-build-id-directories.patch
+
+    # Support NIX_DEBUG_INFO_DIRS environment variable.
+    ./0004-libbacktrace-Support-NIX_DEBUG_INFO_DIRS-environment.patch
+  ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  configureFlags = [
+    (lib.enableFeature enableStatic "static")
+    (lib.enableFeature enableShared "shared")
+  ];
+
+  doCheck = stdenv.isLinux && !stdenv.hostPlatform.isMusl;
+
+  passthru = {
+    updateScript = unstableGitUpdater { };
+  };
+
+  meta = with lib; {
+    description = "A C library that may be linked into a C/C++ program to produce symbolic backtraces";
+    homepage = "https://github.com/ianlancetaylor/libbacktrace";
+    maintainers = with maintainers; [ twey ];
+    license = with licenses; [ bsd3 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libbap/default.nix b/nixpkgs/pkgs/development/libraries/libbap/default.nix
new file mode 100644
index 000000000000..ebbf02603cbb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libbap/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, bap, ocaml, findlib, ctypes, autoreconfHook,
+  which }:
+
+stdenv.mkDerivation {
+  pname = "libbap";
+  version = "master-2022-07-13";
+
+  src = fetchFromGitHub {
+    owner = "BinaryAnalysisPlatform";
+    repo = "bap-bindings";
+    rev = "4d324dd794f8e022e8eddecbb2ae2e7b28173947";
+    hash = "sha256-la47HR+i99ueDEWR91YIXGdKflpE1E0qmmJjeowmGSI=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook which ocaml findlib ];
+  buildInputs = [ bap ctypes ];
+
+  preInstall = ''
+    mkdir -p $out/lib
+    mkdir -p $out/include
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/binaryanalysisplatform/bap-bindings";
+    description = "A C library for interacting with BAP";
+    maintainers = [ maintainers.maurer ];
+    platforms = platforms.unix;
+    license = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libbaseencode/default.nix b/nixpkgs/pkgs/development/libraries/libbaseencode/default.nix
new file mode 100644
index 000000000000..7cd4b173c9b7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libbaseencode/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, lib, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "libbaseencode";
+  version = "1.0.15";
+
+  src = fetchFromGitHub {
+    owner = "paolostivanin";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-WiE+ZMX4oZieER1pu43aSWytkxfkQdX+S3JI98XPpL4=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "Library written in C for encoding and decoding data using base32 or base64 (RFC-4648)";
+    homepage = "https://github.com/paolostivanin/libbaseencode";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ alexbakker ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libbde/default.nix b/nixpkgs/pkgs/development/libraries/libbde/default.nix
new file mode 100644
index 000000000000..4bef9748701c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libbde/default.nix
@@ -0,0 +1,29 @@
+{ lib
+, stdenv
+, fetchurl
+, fuse
+, ncurses
+, python3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libbde";
+  version = "20221031";
+
+  src = fetchurl {
+    url = "https://github.com/libyal/libbde/releases/download/${version}/${pname}-alpha-${version}.tar.gz";
+    sha256 = "sha256-uMbwofboePCFWlxEOdRbZK7uZuj0MZC/qusWuu0Bm7g=";
+  };
+
+  buildInputs = [ fuse ncurses python3 ];
+
+  configureFlags = [ "--enable-python" ];
+
+  meta = with lib; {
+    description = "Library to access the BitLocker Drive Encryption (BDE) format";
+    homepage = "https://github.com/libyal/libbde/";
+    license = licenses.lgpl3;
+    maintainers = with maintainers; [ eliasp ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libbdplus/default.nix b/nixpkgs/pkgs/development/libraries/libbdplus/default.nix
new file mode 100644
index 000000000000..5c2255a50a62
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libbdplus/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl, libgcrypt, libgpg-error, gettext }:
+
+# library that allows libbluray to play BDplus protected bluray disks
+# libaacs does not infringe DRM's right or copyright. See the legal page of the website for more info.
+
+# Info on how to use / obtain aacs keys:
+# http://vlc-bluray.whoknowsmy.name/
+# https://wiki.archlinux.org/index.php/BluRay
+
+stdenv.mkDerivation rec {
+  pname = "libbdplus";
+  version  = "0.2.0";
+
+  src = fetchurl {
+    url = "http://get.videolan.org/libbdplus/${version}/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-uT7qPq7zPW6RVdLDSwaMUFSTqlpJNuYydPQ0KrD0Clg=";
+  };
+
+  buildInputs = [ libgcrypt libgpg-error gettext ];
+
+  nativeBuildInputs = [ ];
+
+  meta = with lib; {
+    homepage = "http://www.videolan.org/developers/libbdplus.html";
+    description = "Library to access BD+ protected Blu-Ray disks";
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ abbradar ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libbladeRF/default.nix b/nixpkgs/pkgs/development/libraries/libbladeRF/default.nix
new file mode 100644
index 000000000000..ce570b76bc08
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libbladeRF/default.nix
@@ -0,0 +1,51 @@
+{ stdenv, lib, fetchFromGitHub, fetchpatch, pkg-config, cmake, git, doxygen, help2man, ncurses, tecla
+, libusb1, udev }:
+
+stdenv.mkDerivation rec {
+  pname = "libbladeRF";
+  version = "2.5.0";
+
+  src = fetchFromGitHub {
+    owner = "Nuand";
+    repo = "bladeRF";
+    rev = "libbladeRF_v${version}";
+    sha256 = "sha256-H40w5YKp6M3QLrsPhILEnJiWutCYLtbgC4a63sV397Q=";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ cmake pkg-config git doxygen help2man ];
+  # ncurses used due to https://github.com/Nuand/bladeRF/blob/ab4fc672c8bab4f8be34e8917d3f241b1d52d0b8/host/utilities/bladeRF-cli/CMakeLists.txt#L208
+  buildInputs = [ tecla libusb1 ]
+    ++ lib.optionals stdenv.isLinux [ udev ]
+    ++ lib.optionals stdenv.isDarwin [ ncurses ];
+
+  # Fixup shebang
+  prePatch = "patchShebangs host/utilities/bladeRF-cli/src/cmd/doc/generate.bash";
+
+  # Let us avoid nettools as a dependency.
+  postPatch = ''
+    sed -i 's/$(hostname)/hostname/' host/utilities/bladeRF-cli/src/cmd/doc/generate.bash
+  '';
+
+  cmakeFlags = [
+    "-DBUILD_DOCUMENTATION=ON"
+  ] ++ lib.optionals stdenv.isLinux [
+    "-DUDEV_RULES_PATH=etc/udev/rules.d"
+    "-DINSTALL_UDEV_RULES=ON"
+    "-DBLADERF_GROUP=bladerf"
+  ];
+
+  env = lib.optionalAttrs stdenv.cc.isClang {
+    NIX_CFLAGS_COMPILE = "-Wno-error=unused-but-set-variable";
+  };
+
+  hardeningDisable = [ "fortify" ];
+
+  meta = with lib; {
+    homepage = "https://nuand.com/libbladeRF-doc";
+    description = "Supporting library of the BladeRF SDR opensource hardware";
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ markuskowa ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libblockdev/default.nix b/nixpkgs/pkgs/development/libraries/libblockdev/default.nix
new file mode 100644
index 000000000000..7b317ecec5a5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libblockdev/default.nix
@@ -0,0 +1,94 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+, gtk-doc
+, docbook_xml_dtd_43
+, python3
+, gobject-introspection
+, glib
+, udev
+, kmod
+, parted
+, cryptsetup
+, lvm2
+, util-linux
+, libbytesize
+, libndctl
+, nss
+, volume_key
+, libxslt
+, docbook_xsl
+, gptfdisk
+, libyaml
+, autoconf-archive
+, thin-provisioning-tools
+, makeBinaryWrapper
+, e2fsprogs
+, libnvme
+, keyutils
+}:
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libblockdev";
+  version = "3.0.4";
+
+  src = fetchFromGitHub {
+    owner = "storaged-project";
+    repo = "libblockdev";
+    rev = "${finalAttrs.version}-1";
+    hash = "sha256-9tPI8FyHQ9i7p4HLrxiseIH8Y5uqnlsNjcZ1qIHCcRY=";
+  };
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  postPatch = ''
+    patchShebangs scripts
+  '';
+
+  nativeBuildInputs = [
+    autoconf-archive
+    autoreconfHook
+    docbook_xsl
+    docbook_xml_dtd_43
+    gobject-introspection
+    gtk-doc
+    libxslt
+    makeBinaryWrapper
+    pkg-config
+    python3
+  ];
+
+  buildInputs = [
+    cryptsetup
+    e2fsprogs
+    glib
+    gptfdisk
+    keyutils
+    kmod
+    libbytesize
+    libndctl
+    libnvme
+    libyaml
+    lvm2
+    nss
+    parted
+    udev
+    util-linux
+    volume_key
+  ];
+
+  postInstall = ''
+    wrapProgram $out/bin/lvm-cache-stats --prefix PATH : \
+      ${lib.makeBinPath [ thin-provisioning-tools ]}
+  '';
+
+  meta = {
+    changelog = "https://github.com/storaged-project/libblockdev/raw/${finalAttrs.src.rev}/NEWS.rst";
+    description = "A library for manipulating block devices";
+    homepage = "http://storaged.org/libblockdev/";
+    license = with lib.licenses; [ lgpl2Plus gpl2Plus ]; # lgpl2Plus for the library, gpl2Plus for the utils
+    maintainers = with lib.maintainers; [ johnazoidberg ];
+    platforms = lib.platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libblocksruntime/default.nix b/nixpkgs/pkgs/development/libraries/libblocksruntime/default.nix
new file mode 100644
index 000000000000..0ab380064429
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libblocksruntime/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub, clang }:
+
+stdenv.mkDerivation {
+  pname = "blocksruntime";
+  version = "unstable-2014-06-24";
+
+  src = fetchFromGitHub {
+    owner = "mackyle";
+    repo = "blocksruntime";
+    rev = "b5c5274daf1e0e46ecc9ad8f6f69889bce0a0a5d";
+    sha256 = "0ic4lagagkylcvwgf10mg0s1i57h4i25ds2fzvms22xj4zwzk1sd";
+  };
+
+  buildInputs = [ clang ];
+
+  configurePhase = ''
+    export CC=clang
+    export CXX=clang++
+  '';
+
+  buildPhase = "./buildlib";
+
+  checkPhase = "./checktests";
+
+  doCheck = false; # hasdescriptor.c test fails, hrm.
+
+  installPhase = ''prefix="/" DESTDIR=$out ./installlib'';
+
+  meta = with lib; {
+    description = "Installs the BlocksRuntime library from the compiler-rt";
+    homepage = "https://github.com/mackyle/blocksruntime";
+    license = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libbluray/default.nix b/nixpkgs/pkgs/development/libraries/libbluray/default.nix
new file mode 100644
index 000000000000..bc10d06b846c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libbluray/default.nix
@@ -0,0 +1,50 @@
+{ lib, stdenv, fetchurl, fetchpatch, pkg-config, fontconfig, autoreconfHook, DiskArbitration
+, withJava ? false, jdk, ant
+, withAACS ? false, libaacs
+, withBDplus ? false, libbdplus
+, withMetadata ? true, libxml2
+, withFonts ? true, freetype
+}:
+
+# Info on how to use:
+# https://wiki.archlinux.org/index.php/BluRay
+
+stdenv.mkDerivation rec {
+  pname = "libbluray";
+  version = "1.3.4";
+
+  src = fetchurl {
+    url = "https://get.videolan.org/libbluray/${version}/${pname}-${version}.tar.bz2";
+    hash = "sha256-R4/9aKD13ejvbKmJt/A1taCiLFmRQuXNP/ewO76+Xys=";
+  };
+
+  nativeBuildInputs = [ pkg-config autoreconfHook ]
+    ++ lib.optionals withJava [ ant ];
+
+  buildInputs = [ fontconfig ]
+    ++ lib.optional withJava jdk
+    ++ lib.optional withMetadata libxml2
+    ++ lib.optional withFonts freetype
+    ++ lib.optional stdenv.isDarwin DiskArbitration;
+
+  propagatedBuildInputs = lib.optional withAACS libaacs;
+
+  NIX_LDFLAGS = lib.optionalString withAACS "-L${libaacs}/lib -laacs"
+    + lib.optionalString withBDplus " -L${libbdplus}/lib -lbdplus";
+
+  preConfigure = lib.optionalString withJava ''
+    export JDK_HOME="${jdk.home}"
+  '';
+
+  configureFlags = lib.optional (!withJava) "--disable-bdjava-jar"
+    ++ lib.optional (!withMetadata) "--without-libxml2"
+    ++ lib.optional (!withFonts) "--without-freetype";
+
+  meta = with lib; {
+    homepage = "http://www.videolan.org/developers/libbluray.html";
+    description = "Library to access Blu-Ray disks for video playback";
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ abbradar ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libbpkg/default.nix b/nixpkgs/pkgs/development/libraries/libbpkg/default.nix
new file mode 100644
index 000000000000..6315b5df0f05
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libbpkg/default.nix
@@ -0,0 +1,48 @@
+{ lib, stdenv
+, build2
+, fetchurl
+, libbutl
+, enableShared ? !stdenv.hostPlatform.isStatic
+, enableStatic ? !enableShared
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libbpkg";
+  version = "0.16.0";
+  outputs = [ "out" "dev" "doc" ];
+
+  src = fetchurl {
+    url = "https://pkg.cppget.org/1/alpha/build2/libbpkg-${version}.tar.gz";
+    hash = "sha256-h3Stt1n1057ASf3n16plr5cNGIKOjHiiuOfqrcCJ5tA=";
+  };
+
+  nativeBuildInputs = [
+    build2
+  ];
+  buildInputs = [
+    libbutl
+  ];
+
+  build2ConfigureFlags = [
+    "config.bin.lib=${build2.configSharedStatic enableShared enableStatic}"
+  ];
+
+  strictDeps = true;
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "build2 package dependency manager utility library";
+    longDescription = ''
+      This library defines the types and utilities for working with build2 packages.
+      In particular, it provides C++ classes as well as the parser and serializer
+      implementations that can be used to read, manipulate, and write package,
+      repository and signature manifests.
+    '';
+    homepage = "https://build2.org/";
+    changelog = "https://git.build2.org/cgit/libbpkg/log";
+    license = licenses.mit;
+    maintainers = with maintainers; [ r-burns ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libbsd/darwin-fix-libbsd.sym.patch b/nixpkgs/pkgs/development/libraries/libbsd/darwin-fix-libbsd.sym.patch
new file mode 100644
index 000000000000..de40da981623
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libbsd/darwin-fix-libbsd.sym.patch
@@ -0,0 +1,15 @@
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 9d22b00..c6848fc 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -198,7 +198,9 @@ libbsd_ctor_a_SOURCES = \
+ # Generate a simple libtool symbol export list to be used as a fallback if
+ # there is no version script support.
+ libbsd.sym: libbsd.map
+-	$(AM_V_GEN) $(SED) -ne 's/^[[:space:]]\{1,\}\([A-Za-z0-9_]\{1,\}\);/\1/p' libbsd.map > $@
++	$(AM_V_GEN) $(SED) -ne 's/^[[:space:]]\{1,\}\([A-Za-z0-9_]\{1,\}\);/\1/p' libbsd.map \
++	  | grep -Ev '(group_from_gid|user_from_uid|nlist|__fdnlist|bsd_getopt)' \
++	  > $@
+ 
+ if NEED_TRANSPARENT_LIBMD
+ TRANSPARENT_LIBMD_DEPENDS = format.ld
diff --git a/nixpkgs/pkgs/development/libraries/libbsd/default.nix b/nixpkgs/pkgs/development/libraries/libbsd/default.nix
new file mode 100644
index 000000000000..4f06eb7f8624
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libbsd/default.nix
@@ -0,0 +1,66 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, fetchpatch
+, autoreconfHook
+, libmd
+, gitUpdater
+}:
+
+# Run `./get-version` for the new value when bumping the Git revision.
+let gitVersion = "0.11.7-55-g73b2"; in
+
+stdenv.mkDerivation {
+  pname = "libbsd";
+  version = "unstable-2023-04-29";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "libbsd";
+    repo = "libbsd";
+    rev = "73b25a8f871b3a20f6ff76679358540f95d7dbfd";
+    hash = "sha256-LS28taIMjRCl6xqg75eYOIrTDl8PzSa+OvrdiEOP1+U=";
+  };
+
+  outputs = [ "out" "dev" "man" ];
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  nativeBuildInputs = [ autoreconfHook ];
+  propagatedBuildInputs = [ libmd ];
+
+  patches = [
+    # Fix `{get,set}progname(3bsd)` conditionalization
+    # https://gitlab.freedesktop.org/libbsd/libbsd/-/issues/24
+    (fetchpatch {
+      url = "https://github.com/emilazy/libbsd/commit/0381f8d92873c5a19ced3ff861ee8ffe7825953e.patch";
+      hash = "sha256-+RMg5eHLgC4gyX9zXM0ttNf7rd9E3UzJX/7UVCYGXx4=";
+    })
+  ] ++ lib.optionals stdenv.isDarwin [
+    # Temporary build system hack from upstream maintainer
+    # https://gitlab.freedesktop.org/libbsd/libbsd/-/issues/19#note_2017684
+    ./darwin-fix-libbsd.sym.patch
+  ];
+
+  postPatch = ''
+    substituteInPlace configure.ac \
+      --replace 'm4_esyscmd([./get-version])' '[${gitVersion}]'
+  '';
+
+  passthru.updateScript = gitUpdater {
+    # No nicer place to find latest release.
+    url = "https://gitlab.freedesktop.org/libbsd/libbsd.git";
+  };
+
+  meta = with lib; {
+    description = "Common functions found on BSD systems";
+    homepage = "https://libbsd.freedesktop.org/";
+    license = with licenses; [ beerware bsd2 bsd3 bsdOriginal isc mit ];
+    platforms = platforms.unix;
+    # See architectures defined in src/local-elf.h.
+    badPlatforms = lib.platforms.microblaze;
+    maintainers = with maintainers; [ matthewbauer ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libbson/default.nix b/nixpkgs/pkgs/development/libraries/libbson/default.nix
new file mode 100644
index 000000000000..e03d7c194847
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libbson/default.nix
@@ -0,0 +1,23 @@
+{ fetchFromGitHub, perl, lib, stdenv, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "libbson";
+  version = "1.9.5";
+
+  src = fetchFromGitHub {
+    owner = "mongodb";
+    repo = "libbson";
+    rev = version;
+    sha256 = "16rmzxhhmbvhp4q6qac5j9c74z2pcg5raag5w16mynzikdd2l05b";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ perl ];
+
+  meta = with lib; {
+    description = "A C Library for parsing, editing, and creating BSON documents";
+    homepage = "https://github.com/mongodb/libbson";
+    license = licenses.asl20;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libbtbb/default.nix b/nixpkgs/pkgs/development/libraries/libbtbb/default.nix
new file mode 100644
index 000000000000..e0e70005e25f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libbtbb/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, lib, fetchFromGitHub, cmake, CoreServices }:
+
+stdenv.mkDerivation rec {
+  pname = "libbtbb";
+  version = "2020-12-R1";
+
+  src = fetchFromGitHub {
+    owner = "greatscottgadgets";
+    repo = pname;
+    rev = version;
+    sha256 = "1byv8174xam7siakr1p0523x97wkh0fmwmq341sd3g70qr2g767d";
+  };
+
+  nativeBuildInputs = [ cmake ] ++ lib.optionals stdenv.isDarwin [ CoreServices ];
+
+  # https://github.com/greatscottgadgets/libbtbb/issues/63
+  postPatch = ''
+    substituteInPlace lib/libbtbb.pc.in \
+      --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
+      --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
+  '';
+
+  meta = with lib; {
+    description = "Bluetooth baseband decoding library";
+    homepage = "https://github.com/greatscottgadgets/libbtbb";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ oxzi ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libbutl/default.nix b/nixpkgs/pkgs/development/libraries/libbutl/default.nix
new file mode 100644
index 000000000000..aee951a51d6c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libbutl/default.nix
@@ -0,0 +1,62 @@
+{ lib, stdenv
+, build2
+, DarwinTools
+, fetchurl
+, libuuid
+, enableShared ? !stdenv.hostPlatform.isStatic
+, enableStatic ? !enableShared
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libbutl";
+  version = "0.16.0";
+
+  outputs = [ "out" "dev" "doc" ];
+
+  src = fetchurl {
+    url = "https://pkg.cppget.org/1/alpha/build2/libbutl-${version}.tar.gz";
+    hash = "sha256-MGL6P/lG2sJdJXZiTcDvdy4jmU+2jYHsvaX4eEO9J2g=";
+  };
+
+  nativeBuildInputs = [
+    build2
+  ] ++ lib.optionals stdenv.isDarwin [
+    DarwinTools
+  ];
+
+  patches = [
+    # Install missing .h files needed by dependers
+    # https://github.com/build2/libbutl/issues/5
+    ./install-h-files.patch
+  ];
+
+  strictDeps = true;
+
+  # Should be true for anything built with build2,
+  # but especially important when bootstrapping
+  disallowedReferences = [ build2 ];
+
+  postPatch = lib.optionalString stdenv.isLinux ''
+    substituteInPlace libbutl/uuid-linux.cxx \
+      --replace '"libuuid.so' '"${lib.getLib libuuid}/lib/libuuid.so'
+  '';
+
+  build2ConfigureFlags = [
+    "config.bin.lib=${build2.configSharedStatic enableShared enableStatic}"
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "build2 utility library";
+    longDescription = ''
+      This library is a collection of utilities that are used throughout the
+      build2 toolchain.
+    '';
+    homepage = "https://build2.org/";
+    changelog = "https://git.build2.org/cgit/libbutl/log";
+    license = licenses.mit;
+    maintainers = with maintainers; [ r-burns ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libbutl/install-h-files.patch b/nixpkgs/pkgs/development/libraries/libbutl/install-h-files.patch
new file mode 100644
index 000000000000..02086ad36f5a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libbutl/install-h-files.patch
@@ -0,0 +1,22 @@
+diff --git a/libbutl/buildfile b/libbutl/buildfile
+index ba4ad96..f5356a1 100644
+--- a/libbutl/buildfile
++++ b/libbutl/buildfile
+@@ -1,7 +1,7 @@
+ # file      : libbutl/buildfile
+ # license   : MIT; see accompanying LICENSE file
+ 
+-lib{butl}: {hxx ixx txx cxx}{** -uuid-* +uuid-io         \
++lib{butl}: {h hxx ixx txx cxx}{** -uuid-* +uuid-io       \
+                                 -win32-utility           \
+                                 -mingw-*                 \
+                                 -version                 \
+@@ -154,7 +154,7 @@ else
+ # Install into the libbutl/ subdirectory of, say, /usr/include/
+ # recreating subdirectories.
+ #
+-{hxx ixx txx}{*}:
++{h hxx ixx txx}{*}:
+ {
+   install         = include/libbutl/
+   install.subdirs = true
diff --git a/nixpkgs/pkgs/development/libraries/libbytesize/default.nix b/nixpkgs/pkgs/development/libraries/libbytesize/default.nix
new file mode 100644
index 000000000000..6604bb322294
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libbytesize/default.nix
@@ -0,0 +1,56 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, docbook_xml_dtd_43
+, docbook_xsl
+, gettext
+, gmp
+, gtk-doc
+, libxslt
+, mpfr
+, pcre2
+, pkg-config
+, python3
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libbytesize";
+  version = "2.10";
+
+  src = fetchFromGitHub {
+    owner = "storaged-project";
+    repo = "libbytesize";
+    rev = finalAttrs.version;
+    hash = "sha256-IPBoYcnSQ1/ws3mzPUXxgbetZkXRWrGhtakXaVVFb6U=";
+  };
+
+  outputs = [ "out" "dev" "devdoc" "man" ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+    docbook_xml_dtd_43
+    docbook_xsl
+    gettext
+    gtk-doc
+    libxslt
+    pkg-config
+    python3
+  ];
+
+  buildInputs = [
+    gmp
+    mpfr
+    pcre2
+  ];
+
+  strictDeps = true;
+
+  meta = {
+    homepage = "https://github.com/storaged-project/libbytesize";
+    description = "A tiny library providing a C 'class' for working with arbitrary big sizes in bytes";
+    license = lib.licenses.lgpl2Plus;
+    maintainers = with lib.maintainers; [ AndersonTorres ];
+    platforms = lib.platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libcaca/default.nix b/nixpkgs/pkgs/development/libraries/libcaca/default.nix
new file mode 100644
index 000000000000..26d8c79443a0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcaca/default.nix
@@ -0,0 +1,74 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, imlib2
+, xorg
+, ncurses
+, pkg-config
+, zlib
+, x11Support ? !stdenv.isDarwin
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libcaca";
+  version = "0.99.beta20";
+
+  src = fetchFromGitHub {
+    owner = "cacalabs";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-N0Lfi0d4kjxirEbIjdeearYWvStkKMyV6lgeyNKXcVw=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ];
+
+  buildInputs = [
+    ncurses
+    zlib
+    (imlib2.override { inherit x11Support; })
+  ] ++ lib.optionals x11Support [
+    xorg.libX11
+    xorg.libXext
+  ];
+
+  outputs = [ "bin" "dev" "out" "man" ];
+
+  configureFlags = [
+    (if x11Support then "--enable-x11" else "--disable-x11")
+  ];
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString (!x11Support) "-DX_DISPLAY_MISSING";
+
+  postInstall = ''
+    mkdir -p $dev/bin
+    mv $bin/bin/caca-config $dev/bin/caca-config
+  '';
+
+  meta = with lib; {
+    homepage = "http://caca.zoy.org/wiki/libcaca";
+    description = "A graphics library that outputs text instead of pixels";
+    longDescription = ''
+      libcaca is a graphics library that outputs text instead of pixels, so that
+      it can work on older video cards or text terminals. It is not unlike the
+      famous ​AAlib library, with the following improvements:
+
+      - Unicode support
+      - 2048 available colours (some devices can only handle 16)
+      - dithering of colour images
+      - advanced text canvas operations (blitting, rotations)
+
+      Libcaca works in a text terminal (and should thus work on all Unix systems
+      including Mac OS X) using the S-Lang or ncurses libraries. It also works
+      natively on DOS and Windows.
+
+      Libcaca was written by Sam Hocevar and Jean-Yves Lamoureux.
+    '';
+    license = licenses.wtfpl;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcacard/default.nix b/nixpkgs/pkgs/development/libraries/libcacard/default.nix
new file mode 100644
index 000000000000..1ab5b428f57a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcacard/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchurl, pkg-config, glib, nss }:
+
+stdenv.mkDerivation rec {
+  pname = "libcacard";
+  version = "2.8.1";
+
+  src = fetchurl {
+    url = "https://www.spice-space.org/download/libcacard/${pname}-${version}.tar.xz";
+    sha256 = "sha256-+79N6Mt9tb3/XstnL/Db5pOfufNEuQDVG6YpUymjMuc=";
+  };
+
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    sed -i '/--version-script/d' Makefile.in
+    sed -i 's/^vflag = .*$/vflag = ""/' meson.build
+  '';
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ glib nss ];
+
+  meta = with lib; {
+    description = "Smart card emulation library";
+    homepage = "https://gitlab.freedesktop.org/spice/libcacard";
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ yana ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcanberra/default.nix b/nixpkgs/pkgs/development/libraries/libcanberra/default.nix
new file mode 100644
index 000000000000..cda60e4d215f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcanberra/default.nix
@@ -0,0 +1,75 @@
+{ stdenv, lib, fetchurl, fetchpatch, pkg-config, libtool
+, gtk2-x11, gtk3-x11 , gtkSupport ? null
+, libpulseaudio, gst_all_1, libvorbis, libcap
+, Carbon, CoreServices, AppKit
+, withAlsa ? stdenv.isLinux, alsa-lib }:
+
+stdenv.mkDerivation rec {
+  pname = "libcanberra";
+  version = "0.30";
+
+  src = fetchurl {
+    url = "http://0pointer.de/lennart/projects/libcanberra/${pname}-${version}.tar.xz";
+    sha256 = "0wps39h8rx2b00vyvkia5j40fkak3dpipp1kzilqla0cgvk73dn2";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  strictDeps = true;
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [
+    libpulseaudio libvorbis
+    libtool # in buildInputs rather than nativeBuildInputs since libltdl is used (not libtool itself)
+  ] ++ (with gst_all_1; [ gstreamer gst-plugins-base ])
+    ++ lib.optional (gtkSupport == "gtk2") gtk2-x11
+    ++ lib.optional (gtkSupport == "gtk3") gtk3-x11
+    ++ lib.optionals stdenv.isDarwin [ Carbon CoreServices AppKit ]
+    ++ lib.optional stdenv.isLinux libcap
+    ++ lib.optional withAlsa alsa-lib;
+
+  configureFlags = [ "--disable-oss" ];
+
+  patches = [
+    (fetchpatch {
+      name = "0001-gtk-Don-t-assume-all-GdkDisplays-are-GdkX11Displays-.patch";
+      url = "http://git.0pointer.net/libcanberra.git/patch/?id=c0620e432650e81062c1967cc669829dbd29b310";
+      sha256 = "0rc7zwn39yxzxp37qh329g7375r5ywcqcaak8ryd0dgvg8m5hcx9";
+    })
+  ] ++ lib.optionals stdenv.isDarwin [
+    (fetchpatch {
+      url = "https://github.com/macports/macports-ports/raw/5a7965dfea7727d1ceedee46c7b0ccee9cb23468/audio/libcanberra/files/patch-configure.diff";
+      sha256 = "sha256-pEJy1krciUEg5BFIS8FJ4BubjfS/nt9aqi6BLnS1+4M=";
+      extraPrefix = "";
+    })
+    (fetchpatch {
+      url = "https://github.com/macports/macports-ports/raw/5a7965dfea7727d1ceedee46c7b0ccee9cb23468/audio/libcanberra/files/dynamic_lookup-11.patch";
+      sha256 = "sha256-nUjha2pKh5VZl0ZZzcr9NTo1TVuMqF4OcLiztxW+ofQ=";
+      extraPrefix = "";
+    })
+  ];
+
+  postInstall = ''
+    for f in $out/lib/*.la; do
+      sed 's|-lltdl|-L${libtool.lib}/lib -lltdl|' -i $f
+    done
+  '';
+
+  passthru = lib.optionalAttrs (gtkSupport != null) {
+    gtkModule = if gtkSupport == "gtk2" then "/lib/gtk-2.0" else "/lib/gtk-3.0/";
+  };
+
+  meta = with lib; {
+    description = "An implementation of the XDG Sound Theme and Name Specifications";
+    longDescription = ''
+      libcanberra is an implementation of the XDG Sound Theme and Name
+      Specifications, for generating event sounds on free desktops
+      such as GNOME.  It comes with several backends (ALSA,
+      PulseAudio, OSS, GStreamer, null) and is designed to be
+      portable.
+    '';
+    homepage = "http://0pointer.de/lennart/projects/libcanberra/";
+    license = licenses.lgpl2Plus;
+    maintainers = [ ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcangjie/default.nix b/nixpkgs/pkgs/development/libraries/libcangjie/default.nix
new file mode 100644
index 000000000000..5b68a6526f1d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcangjie/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, autoconf, automake, libtool, m4, fetchurl, bash, pkg-config, sqlite }:
+
+stdenv.mkDerivation rec {
+  pname = "libcangjie";
+  version = "1.4_rev_${rev}";
+  rev = "a73c1d8783f7b6526fd9b2cc44a669ffa5518d3d";
+
+  # fetchFromGitLab isn't working for some reason
+  src = fetchurl {
+    url = "https://gitlab.freedesktop.org/cangjie/libcangjie/-/archive/a73c1d8783f7b6526fd9b2cc44a669ffa5518d3d/libcangjie-a73c1d8783f7b6526fd9b2cc44a669ffa5518d3d.tar.gz";
+    sha256 = "sha256-j5IQ0hBefoF8p966YrfZgYCw7ht5twJhYi4l0NneukQ=";
+  };
+
+  nativeBuildInputs = [ pkg-config autoconf automake ];
+  buildInputs = [ libtool m4 sqlite ];
+
+  configureScript = "./autogen.sh";
+
+  preConfigure = ''
+    find . -name '*.sh' -exec sed -e 's@#!/bin/bash@${bash}/bin/bash@' -i '{}' ';'
+  '';
+
+  doCheck = true;
+
+  meta = {
+    description = "A C library implementing the Cangjie input method";
+    longDescription = ''
+      libcangjie is a library implementing the Cangjie input method.
+    '';
+    homepage = "https://gitlab.freedesktop.org/cangjie/libcangjie";
+    license = lib.licenses.lgpl3Plus;
+
+    maintainers = [ lib.maintainers.linquize ];
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcaption/default.nix b/nixpkgs/pkgs/development/libraries/libcaption/default.nix
new file mode 100644
index 000000000000..78cf5214051d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcaption/default.nix
@@ -0,0 +1,30 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, re2c
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libcaption";
+  version = "0.7";
+
+  src = fetchFromGitHub {
+    owner = "szatmary";
+    repo = "libcaption";
+    rev = finalAttrs.version;
+    sha256 = "sha256-OBtxoFJF0cxC+kfSK8TIKIdLkmCh5WOJlI0fejnisJo=";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ re2c ];
+
+  meta = with lib; {
+    description = "Free open-source CEA608 / CEA708 closed-caption encoder/decoder";
+    homepage = "https://github.com/szatmary/libcaption";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ pschmitt ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libcbor/default.nix b/nixpkgs/pkgs/development/libraries/libcbor/default.nix
new file mode 100644
index 000000000000..43a73d374ea5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcbor/default.nix
@@ -0,0 +1,71 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, cmocka
+
+# for passthru.tests
+, libfido2
+, mysql80
+, openssh
+, systemd
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libcbor";
+  version = "0.10.2";
+
+  src = fetchFromGitHub {
+    owner = "PJK";
+    repo = "libcbor";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-eE11hYPsOKqfoX8fx/oYfOAichhUe4mMpNQNVZ6vAUI=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    # Pull fix pending upstream inclusion to support
+    # `CMAKE_INSTALL_INCLUDEDIR`:
+    #   https://github.com/PJK/libcbor/pull/297
+    (fetchpatch {
+      name = "includedir.patch";
+      url = "https://github.com/PJK/libcbor/commit/d00a63e6d6858a2ed6be9b431b42799ed2c99ad8.patch";
+      hash = "sha256-kBCSbAHOCGOs/4Yu6Vh0jcmzA/jYPkkPXPGPrptRfyk=";
+    })
+  ];
+
+  strictDeps = true;
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [
+    cmocka # cmake expects cmocka module
+  ];
+
+  cmakeFlags = lib.optional finalAttrs.finalPackage.doCheck "-DWITH_TESTS=ON"
+    ++ lib.optional (!stdenv.hostPlatform.isStatic) "-DBUILD_SHARED_LIBS=ON";
+
+  # Tests are restricted while pkgsStatic.cmocka is broken. Tracked at:
+  # https://github.com/NixOS/nixpkgs/issues/213623
+  doCheck = !stdenv.hostPlatform.isStatic
+    && stdenv.hostPlatform == stdenv.buildPlatform;
+
+  nativeCheckInputs = [ cmocka ];
+
+  passthru.tests = {
+    inherit libfido2 mysql80;
+    openssh = (openssh.override { withFIDO = true; });
+    systemd = (systemd.override {
+      withFido2 = true;
+      withCryptsetup = true;
+    });
+  };
+
+  meta = with lib; {
+    description = "CBOR protocol implementation for C and others";
+    homepage = "https://github.com/PJK/libcbor";
+    license = licenses.mit;
+    maintainers = with maintainers; [ dtzWill ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libccd/default.nix b/nixpkgs/pkgs/development/libraries/libccd/default.nix
new file mode 100644
index 000000000000..c8e7c8af2104
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libccd/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "libccd";
+  version = "2.1";
+
+  src = fetchFromGitHub {
+    owner = "danfis";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0sfmn5pd7k5kyhbxnd689xmsa5v843r7sska96dlysqpljd691jc";
+  };
+
+  patches = [
+    # Fix pkgconfig file with absolute CMAKE_INSTALL_*DIR
+    # https://github.com/danfis/libccd/pull/76
+    (fetchpatch {
+      url = "https://github.com/danfis/libccd/commit/cd16c4f168ae308e4c77db66ac97a2eaf47e059e.patch";
+      sha256 = "02wj21c185kwf8bn4qi4cnna0ypzqm481xw9rr8jy1i0cb1r9idg";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "Library for collision detection between two convex shapes";
+    homepage = "https://github.com/danfis/libccd";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ lopsided98 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcdada/default.nix b/nixpkgs/pkgs/development/libraries/libcdada/default.nix
new file mode 100644
index 000000000000..e78d845cf5be
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcdada/default.nix
@@ -0,0 +1,37 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libcdada";
+  version = "0.4.0";
+
+  src = fetchFromGitHub {
+    owner = "msune";
+    repo = "libcdada";
+    rev = "v${version}";
+    hash = "sha256-vUasCukDRZYB67eu87ckEZG9i6rsNf0aKY2kZsVezRE=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  configureFlags = [
+    "--without-tests"
+    "--without-examples"
+  ];
+
+  meta = with lib; {
+    description = "Library for basic data structures in C";
+    longDescription = ''
+      Basic data structures in C: list, set, map/hashtable, queue... (libstdc++ wrapper)
+    '';
+    homepage = "https://github.com/msune/libcdada";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ _0x4A6F ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcdaudio/default.nix b/nixpkgs/pkgs/development/libraries/libcdaudio/default.nix
new file mode 100644
index 000000000000..134f9d7f8f33
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcdaudio/default.nix
@@ -0,0 +1,18 @@
+{lib, stdenv, fetchurl}:
+
+stdenv.mkDerivation rec {
+  pname = "libcdaudio";
+  version = "0.99.12p2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libcdaudio/libcdaudio-${version}.tar.gz";
+    sha256 = "1fsy6dlzxrx177qc877qhajm9l4g28mvh06h2l15rxy4bapzknjz" ;
+  };
+
+  meta = {
+    description = "A portable library for controlling audio CDs";
+    homepage = "https://libcdaudio.sourceforge.net";
+    platforms = lib.platforms.linux;
+    license = lib.licenses.lgpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcddb/default.nix b/nixpkgs/pkgs/development/libraries/libcddb/default.nix
new file mode 100644
index 000000000000..11a0c259dfdb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcddb/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl, libiconv }:
+
+stdenv.mkDerivation rec {
+  pname = "libcddb";
+  version = "1.3.2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libcddb/${pname}-${version}.tar.bz2";
+    sha256 = "0fr21a7vprdyy1bq6s99m0x420c9jm5fipsd63pqv8qyfkhhxkim";
+  };
+
+  buildInputs = [ libiconv ];
+
+  configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "ac_cv_func_malloc_0_nonnull=yes"
+    "ac_cv_func_realloc_0_nonnull=yes"
+  ];
+
+  doCheck = false; # fails 3 of 5 tests with locale errors
+
+  meta = with lib; {
+    description = "C library to access data on a CDDB server (freedb.org)";
+    homepage = "https://libcddb.sourceforge.net/";
+    license = licenses.lgpl2Plus;
+    mainProgram = "cddb_query";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcdio-paranoia/default.nix b/nixpkgs/pkgs/development/libraries/libcdio-paranoia/default.nix
new file mode 100644
index 000000000000..bd39cfb71cb3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcdio-paranoia/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, libcdio, pkg-config,
+  libiconv, IOKit, DiskArbitration}:
+
+stdenv.mkDerivation rec {
+  pname = "libcdio-paranoia";
+  version = "0.94+2";
+
+  src = fetchFromGitHub {
+    owner = "rocky";
+    repo = "libcdio-paranoia";
+    rev = "release-10.2+${version}";
+    sha256 = "1wjgmmaca4baw7k5c3vdap9hnjc49ciagi5kvpvync3aqfmdvkha";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ libcdio ] ++
+    lib.optionals stdenv.isDarwin [ libiconv IOKit DiskArbitration ];
+
+  propagatedBuildInputs = lib.optional stdenv.isDarwin DiskArbitration;
+
+  configureFlags = lib.optionals stdenv.isDarwin [
+    "--disable-ld-version-script"
+  ];
+
+  meta = with lib; {
+    description = "CD paranoia on top of libcdio";
+    longDescription = ''
+      This is a port of xiph.org's cdda paranoia to use libcdio for CDROM
+      access. By doing this, cdparanoia runs on platforms other than GNU/Linux.
+    '';
+    homepage = "https://github.com/rocky/libcdio-paranoia";
+    license = licenses.gpl3;
+    maintainers = [ ];
+    mainProgram = "cd-paranoia";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcdio/default.nix b/nixpkgs/pkgs/development/libraries/libcdio/default.nix
new file mode 100644
index 000000000000..2124e696d343
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcdio/default.nix
@@ -0,0 +1,52 @@
+{ lib, stdenv, fetchurl, fetchpatch, libcddb, pkg-config, ncurses, help2man, libiconv, Carbon, IOKit }:
+
+stdenv.mkDerivation rec {
+  pname = "libcdio";
+  version = "2.1.0";
+
+  src = fetchurl {
+    url = "mirror://gnu/libcdio/libcdio-${version}.tar.bz2";
+    sha256 = "0avi6apv5ydjy6b9c3z9a46rvp5i57qyr09vr7x4nndxkmcfjl45";
+  };
+
+  patches = [
+    # Fixes test failure of realpath test with glibc-2.36
+    (fetchpatch {
+      url = "https://src.fedoraproject.org/rpms/libcdio/raw/d49ccdd9c8b4e9d57c01539f4c8948f28ce82bca/f/realpath-test-fix.patch";
+      sha256 = "sha256-ldAGlcf79uQ8QAt4Au8Iv6jsI6ICZXtXOKZBpyELtN8=";
+    })
+
+    # pull pending upstream patch to fix build on ncurses-6.3:
+    #  https://savannah.gnu.org/patch/index.php?10130
+    (fetchpatch {
+      name = "ncurses-6.3.patch";
+      url = "https://savannah.gnu.org/patch/download.php?file_id=52179";
+      sha256 = "1v15gxhpi4bgcr12pb3d9c3hiwj0drvc832vic7sham34lhjmcbb";
+    })
+  ];
+
+  postPatch = ''
+    patchShebangs .
+  '';
+
+  nativeBuildInputs = [ pkg-config help2man ];
+  buildInputs = [ libcddb libiconv ncurses ]
+    ++ lib.optionals stdenv.isDarwin [ Carbon IOKit ];
+
+  enableParallelBuilding = true;
+
+  doCheck = !stdenv.isDarwin;
+
+  meta = with lib; {
+    description = "A library for OS-independent CD-ROM and CD image access";
+    longDescription = ''
+      GNU libcdio is a library for OS-independent CD-ROM and
+      CD image access.  It includes a library for working with
+      ISO-9660 filesystems (libiso9660), as well as utility
+      programs such as an audio CD player and an extractor.
+    '';
+    homepage = "https://www.gnu.org/software/libcdio/";
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcdr/default.nix b/nixpkgs/pkgs/development/libraries/libcdr/default.nix
new file mode 100644
index 000000000000..64695aaa55d7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcdr/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl, fetchpatch, libwpg, libwpd, lcms, pkg-config, librevenge, icu, boost, cppunit }:
+
+stdenv.mkDerivation rec {
+  pname = "libcdr";
+  version = "0.1.7";
+
+  src = fetchurl {
+    url = "https://dev-www.libreoffice.org/src/${pname}-${version}.tar.xz";
+    hash = "sha256-VmYknWE0ZrmqHph+pBCcBDZYZuknfYD2zZZj6GuOzdQ=";
+  };
+
+  strictDeps = true;
+
+  buildInputs = [ libwpg libwpd lcms librevenge icu boost cppunit ];
+
+  nativeBuildInputs = [ pkg-config ];
+
+  CXXFLAGS="--std=gnu++0x"; # For c++11 constants in lcms2.h
+
+  meta = {
+    description = "A library providing ability to interpret and import Corel Draw drawings into various applications";
+    homepage = "https://wiki.documentfoundation.org/DLP/Libraries/libcdr";
+    platforms = lib.platforms.all;
+    license = lib.licenses.mpl20;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcec/default.nix b/nixpkgs/pkgs/development/libraries/libcec/default.nix
new file mode 100644
index 000000000000..90ffcb01cf91
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcec/default.nix
@@ -0,0 +1,45 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, udev
+, libcec_platform
+, withLibraspberrypi ? false
+, libraspberrypi
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libcec";
+  version = "6.0.2";
+
+  src = fetchFromGitHub {
+    owner = "Pulse-Eight";
+    repo = "libcec";
+    rev = "libcec-${version}";
+    sha256 = "sha256-OWqCn7Z0KG8sLlfMWd0btJIFJs79ET3Y1AV/y/Kj2TU=";
+  };
+
+  # Fix dlopen path
+  postPatch = ''
+    substituteInPlace include/cecloader.h --replace "libcec.so" "$out/lib/libcec.so"
+  '';
+
+  nativeBuildInputs = [ pkg-config cmake ];
+  buildInputs = [ udev libcec_platform ] ++
+    lib.optional withLibraspberrypi libraspberrypi;
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=1"
+  ] ++ lib.optionals stdenv.isLinux [
+    "-DHAVE_LINUX_API=1"
+  ];
+
+  meta = with lib; {
+    description = "Allows you (with the right hardware) to control your device with your TV remote control using existing HDMI cabling";
+    homepage = "http://libcec.pulse-eight.com";
+    license = lib.licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.titanous ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcec/platform.nix b/nixpkgs/pkgs/development/libraries/libcec/platform.nix
new file mode 100644
index 000000000000..d9594c90b624
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcec/platform.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "p8-platform";
+  version = "2.1.0.1";
+
+  src = fetchFromGitHub {
+    owner = "Pulse-Eight";
+    repo = "platform";
+    rev = "p8-platform-${version}";
+    sha256 = "sha256-zAI/AOLJAunv+cCQ6bOXrgkW+wl5frj3ktzx2cDeCCk=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "Platform library for libcec and Kodi addons";
+    homepage = "https://github.com/Pulse-Eight/platform";
+    license = lib.licenses.gpl2Plus;
+    platforms = platforms.all;
+    maintainers = [ maintainers.titanous ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcef/default.nix b/nixpkgs/pkgs/development/libraries/libcef/default.nix
new file mode 100644
index 000000000000..d6d098110af8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcef/default.nix
@@ -0,0 +1,125 @@
+{ lib
+, stdenv
+, fetchurl
+, cmake
+, glib
+, nss
+, nspr
+, atk
+, at-spi2-atk
+, libdrm
+, expat
+, libxcb
+, libxkbcommon
+, libX11
+, libXcomposite
+, libXdamage
+, libXext
+, libXfixes
+, libXrandr
+, mesa
+, gtk3
+, pango
+, cairo
+, alsa-lib
+, dbus
+, at-spi2-core
+, cups
+, libxshmfence
+, obs-studio
+}:
+
+let
+  gl_rpath = lib.makeLibraryPath [
+    stdenv.cc.cc.lib
+  ];
+
+  rpath = lib.makeLibraryPath [
+    glib
+    nss
+    nspr
+    atk
+    at-spi2-atk
+    libdrm
+    expat
+    libxcb
+    libxkbcommon
+    libX11
+    libXcomposite
+    libXdamage
+    libXext
+    libXfixes
+    libXrandr
+    mesa
+    gtk3
+    pango
+    cairo
+    alsa-lib
+    dbus
+    at-spi2-core
+    cups
+    libxshmfence
+  ];
+  platforms = {
+    "aarch64-linux" = {
+      platformStr = "linuxarm64";
+      projectArch = "arm64";
+    };
+    "x86_64-linux" = {
+      platformStr = "linux64";
+      projectArch = "x86_64";
+    };
+  };
+  platforms."aarch64-linux".sha256 = "16sbfk599h96wcsmpbxlwsvq0n1pssmm8dpwmjsqfrn1464dvs68";
+  platforms."x86_64-linux".sha256 = "1wa4nv28saz96kar9svdarfz6c4rnbcqz0rqxzl9zclnhfzhqdiw";
+
+  platformInfo = builtins.getAttr stdenv.hostPlatform.system platforms;
+in
+stdenv.mkDerivation rec {
+  pname = "cef-binary";
+  version = "121.3.13";
+  gitRevision = "5c4a81b";
+  chromiumVersion = "121.0.6167.184";
+
+  src = fetchurl {
+    url = "https://cef-builds.spotifycdn.com/cef_binary_${version}+g${gitRevision}+chromium-${chromiumVersion}_${platformInfo.platformStr}_minimal.tar.bz2";
+    inherit (platformInfo) sha256;
+  };
+
+  nativeBuildInputs = [ cmake ];
+  cmakeFlags = [ "-DPROJECT_ARCH=${platformInfo.projectArch}" ];
+  makeFlags = [ "libcef_dll_wrapper" ];
+  dontStrip = true;
+  dontPatchELF = true;
+
+  installPhase = ''
+    mkdir -p $out/lib/ $out/share/cef/
+    cp libcef_dll_wrapper/libcef_dll_wrapper.a $out/lib/
+    cp ../Release/libcef.so $out/lib/
+    cp ../Release/libEGL.so $out/lib/
+    cp ../Release/libGLESv2.so $out/lib/
+    patchelf --set-rpath "${rpath}" $out/lib/libcef.so
+    patchelf --set-rpath "${gl_rpath}" $out/lib/libEGL.so
+    patchelf --set-rpath "${gl_rpath}" $out/lib/libGLESv2.so
+    cp ../Release/*.bin $out/share/cef/
+    cp -r ../Resources/* $out/share/cef/
+    cp -r ../include $out/
+  '';
+
+  passthru.tests = {
+    inherit obs-studio; # frequently breaks on CEF updates
+  };
+  passthru.updateScript = ./update.sh;
+
+  meta = with lib; {
+    description = "Simple framework for embedding Chromium-based browsers in other applications";
+    homepage = "https://cef-builds.spotifycdn.com/index.html";
+    maintainers = with maintainers; [ puffnfresh ];
+    sourceProvenance = with sourceTypes; [
+      fromSource
+      binaryNativeCode
+    ];
+    license = licenses.bsd3;
+    platforms = [ "x86_64-linux" "aarch64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcef/update.sh b/nixpkgs/pkgs/development/libraries/libcef/update.sh
new file mode 100755
index 000000000000..d11fd7193d6e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcef/update.sh
@@ -0,0 +1,25 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p curl gnused jq
+
+set -x -eu -o pipefail
+
+cd $(dirname "${BASH_SOURCE[0]}")
+
+VERSION_JSON=$(curl --silent https://cef-builds.spotifycdn.com/index.json | jq '[.linux64.versions[] | select (.channel == "stable")][0]')
+
+CEF_VERSION=$(echo ${VERSION_JSON} | jq -r '.cef_version' | cut -d'+' -f1)
+GIT_REVISION=$(echo ${VERSION_JSON} | jq -r '.cef_version' | cut -d'+' -f2 | cut -c 2-)
+CHROMIUM_VERSION=$(echo ${VERSION_JSON} | jq -r '.chromium_version')
+
+SHA256_LINUX64=$(nix-prefetch-url --quiet https://cef-builds.spotifycdn.com/cef_binary_${CEF_VERSION}+g${GIT_REVISION}+chromium-${CHROMIUM_VERSION}_linux64_minimal.tar.bz2)
+SHA256_LINUXARM64=$(nix-prefetch-url --quiet https://cef-builds.spotifycdn.com/cef_binary_${CEF_VERSION}+g${GIT_REVISION}+chromium-${CHROMIUM_VERSION}_linuxarm64_minimal.tar.bz2)
+
+setKV () {
+    sed -i "s|$1 = \".*\"|$1 = \"${2:-}\"|" ./default.nix
+}
+
+setKV version ${CEF_VERSION}
+setKV gitRevision ${GIT_REVISION}
+setKV chromiumVersion ${CHROMIUM_VERSION}
+setKV 'platforms."aarch64-linux".sha256' ${SHA256_LINUXARM64}
+setKV 'platforms."x86_64-linux".sha256' ${SHA256_LINUX64}
diff --git a/nixpkgs/pkgs/development/libraries/libcello/default.nix b/nixpkgs/pkgs/development/libraries/libcello/default.nix
new file mode 100644
index 000000000000..b2f3fc5fae5b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcello/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libcello";
+  version = "2.1.0";
+
+  src = fetchurl {
+    url = "https://libcello.org/static/libCello-${version}.tar.gz";
+    sha256 = "0a1b2x5ni07vd9ridnl7zv7h2s32070wsphjy94qr066b99gdb29";
+  };
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  meta = {
+    homepage = "https://libcello.org/";
+    description = "Higher level programming in C";
+    license = lib.licenses.bsd3;
+    maintainers = [ lib.maintainers.MostAwesomeDude ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcerf/default.nix b/nixpkgs/pkgs/development/libraries/libcerf/default.nix
new file mode 100644
index 000000000000..92fd70bb0cc6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcerf/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, lib, fetchurl, cmake, perl, gnuplot }:
+
+stdenv.mkDerivation rec {
+  pname = "libcerf";
+  version = "2.4";
+
+  src = fetchurl {
+    url = "https://jugit.fz-juelich.de/mlz/libcerf/-/archive/v${version}/libcerf-v${version}.tar.gz";
+    sha256 = "sha256-CAswrlZMPavjuJJkUira9WR+x1QCFXK+5UkpaXsnbNw=";
+  };
+
+  nativeBuildInputs = [ cmake perl ];
+
+  passthru.tests = {
+    inherit gnuplot;
+  };
+
+  meta = with lib; {
+    description = "Complex error (erf), Dawson, Faddeeva, and Voigt function library";
+    homepage = "https://jugit.fz-juelich.de/mlz/libcerf";
+    license = licenses.mit;
+    maintainers = with maintainers; [ orivej ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libchamplain/default.nix b/nixpkgs/pkgs/development/libraries/libchamplain/default.nix
new file mode 100644
index 000000000000..065d412c91e1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libchamplain/default.nix
@@ -0,0 +1,89 @@
+{ fetchurl
+, lib
+, stdenv
+, meson
+, ninja
+, vala
+, gtk-doc
+, docbook_xsl
+, docbook_xml_dtd_412
+, pkg-config
+, glib
+, gtk3
+, cairo
+, sqlite
+, gnome
+, clutter-gtk
+, libsoup
+, libsoup_3
+, gobject-introspection /*, libmemphis */
+, withLibsoup3 ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libchamplain";
+  version = "0.12.21";
+
+  outputs = [ "out" "dev" ]
+    ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "qRXNFyoMUpRMVXn8tGg/ioeMVxv16SglS12v78cn5ac=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gobject-introspection
+    vala
+  ] ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [
+    gtk-doc
+    docbook_xsl
+    docbook_xml_dtd_412
+  ];
+
+  buildInputs = [
+    sqlite
+    (if withLibsoup3 then libsoup_3 else libsoup)
+  ];
+
+  propagatedBuildInputs = [
+    glib
+    gtk3
+    cairo
+    clutter-gtk
+  ];
+
+  mesonFlags = [
+    (lib.mesonBool "gtk_doc" (stdenv.buildPlatform == stdenv.hostPlatform))
+    "-Dvapi=true"
+    (lib.mesonBool "libsoup3" withLibsoup3)
+  ];
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://wiki.gnome.org/Projects/libchamplain";
+    license = licenses.lgpl2Plus;
+
+    description = "C library providing a ClutterActor to display maps";
+
+    longDescription = ''
+      libchamplain is a C library providing a ClutterActor to display
+       maps.  It also provides a GTK widget to display maps in GTK
+       applications.  Python and Perl bindings are also available.  It
+       supports numerous free map sources such as OpenStreetMap,
+       OpenCycleMap, OpenAerialMap, and Maps for free.
+    '';
+
+    maintainers = teams.gnome.members ++ teams.pantheon.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libchardet/default.nix b/nixpkgs/pkgs/development/libraries/libchardet/default.nix
new file mode 100644
index 000000000000..47ce911a6951
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libchardet/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, perl }:
+
+stdenv.mkDerivation rec {
+  pname = "libchardet";
+  version = "1.0.6";
+
+  src = fetchFromGitHub {
+    owner = "Joungkyun";
+    repo = "libchardet";
+    rev = version;
+    sha256 = "sha256-JhEiWM3q8X+eEBHxv8k9yYOaTGoJOzI+/iFYC0gZJJs=";
+  };
+
+  nativeBuildInputs = [ perl ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Mozilla's Universal Charset Detector C/C++ API";
+    homepage = "ftp://ftp.oops.org/pub/oops/libchardet/index.html";
+    license = licenses.mpl11;
+    maintainers = [ maintainers.abbradar ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libchewing/default.nix b/nixpkgs/pkgs/development/libraries/libchewing/default.nix
new file mode 100644
index 000000000000..7cfa864fc06f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libchewing/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, sqlite, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "libchewing";
+  version = "unstable-2020-06-27";
+
+  src = fetchFromGitHub {
+    owner = "chewing";
+    repo = "libchewing";
+    rev = "452f6221fbad90c0706a3963b17e226216e40dd7";
+    sha256 = "sha256-w3/K2O/CU+XVzqzVCYJyq1vLgToN6iIUhJ9J7ia4p9E=";
+  };
+
+  buildInputs = [ sqlite ];
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "Intelligent Chinese phonetic input method";
+    homepage = "https://chewing.im/";
+    license = licenses.lgpl21Only;
+    maintainers = [ maintainers.ericsagnes ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libchop/0001-Fix-RPC-compilation-when-using-libtirpc-rather-than-.patch b/nixpkgs/pkgs/development/libraries/libchop/0001-Fix-RPC-compilation-when-using-libtirpc-rather-than-.patch
new file mode 100644
index 000000000000..f5a016f63ac3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libchop/0001-Fix-RPC-compilation-when-using-libtirpc-rather-than-.patch
@@ -0,0 +1,41 @@
+From 86fd3be1d31d2e7c09603aa3a8966537ac01bb07 Mon Sep 17 00:00:00 2001
+From: Maximilian Bosch <maximilian@mbosch.me>
+Date: Tue, 11 Aug 2020 20:30:16 +0200
+Subject: [PATCH] Fix RPC compilation when using libtirpc rather than glibc
+
+---
+ src/block-server.c        | 3 +++
+ utils/chop-block-server.c | 3 +++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/src/block-server.c b/src/block-server.c
+index 3f97417..29b299e 100644
+--- a/src/block-server.c
++++ b/src/block-server.c
+@@ -18,6 +18,9 @@
+ 
+ /* Server-side stubs.  */
+ 
++#include <rpc/types.h>
++#include <rpc/xdr.h>
++#include <rpc/auth.h>
+ #include <rpc/svc.h>
+ #include <chop/block-server.h>
+ 
+diff --git a/utils/chop-block-server.c b/utils/chop-block-server.c
+index a2076c0..9462f5d 100644
+--- a/utils/chop-block-server.c
++++ b/utils/chop-block-server.c
+@@ -19,6 +19,9 @@
+    store, e.g. a GDBM block store, and serves it remotely.  A lot of code is
+    borrowed from `chop-archiver.c'.  */
+ 
++#include <rpc/types.h>
++#include <rpc/xdr.h>
++#include <rpc/auth.h>
+ #include <chop/chop-config.h>
+ 
+ #include <alloca.h>
+-- 
+2.25.4
+
diff --git a/nixpkgs/pkgs/development/libraries/libchop/default.nix b/nixpkgs/pkgs/development/libraries/libchop/default.nix
new file mode 100644
index 000000000000..ce113106ce56
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libchop/default.nix
@@ -0,0 +1,59 @@
+{ fetchurl, lib, stdenv, zlib, bzip2, libgcrypt
+, gdbm, gperf, tdb, gnutls, db, libuuid
+, lzo, pkg-config, guile, rpcsvc-proto, libtirpc
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libchop";
+  version = "0.5.2";
+
+  src = fetchurl {
+    url = "mirror://savannah/libchop/libchop-${version}.tar.gz";
+    sha256 = "0fpdyxww41ba52d98blvnf543xvirq1v9xz1i3x1gm9lzlzpmc2g";
+  };
+
+  patches = [ ./gets-undeclared.patch ./size_t.patch ./0001-Fix-RPC-compilation-when-using-libtirpc-rather-than-.patch ];
+
+  nativeBuildInputs = [ pkg-config gperf rpcsvc-proto ];
+
+  env.NIX_CFLAGS_COMPILE = toString [ "-I${libtirpc.dev}/include/tirpc" ];
+  NIX_LDFLAGS = [ "-ltirpc" ];
+
+  buildInputs =
+    [ zlib bzip2 lzo
+      libgcrypt
+      gdbm db tdb
+      gnutls libuuid
+      guile libtirpc
+    ];
+
+  doCheck = false;
+
+  preConfigure = ''
+    sed -re 's%@GUILE@%&/guile%' -i */Makefile.* Makefile.*
+  '';
+
+  meta = with lib; {
+    description = "Tools & library for data backup and distributed storage";
+
+    longDescription =
+      '' Libchop is a set of utilities and library for data backup and
+         distributed storage.  Its main application is chop-backup, an
+         encrypted backup program that supports data integrity checks,
+         versioning at little cost, distribution among several sites,
+         selective sharing of stored data, adaptive compression, and more.
+         The library itself, which chop-backup builds upon, implements
+         storage techniques such as content-based addressing, content hash
+         keys, Merkle trees, similarity detection, and lossless compression.
+         It makes it easy to combine them in different ways.  The
+         ‘chop-archiver’ and ‘chop-block-server’ tools, illustrated in the
+         manual, provide direct access to these facilities from the command
+         line.  It is written in C and has Guile (Scheme) bindings.
+      '';
+
+    homepage = "https://www.nongnu.org/libchop/";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.gnu ++ platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libchop/gets-undeclared.patch b/nixpkgs/pkgs/development/libraries/libchop/gets-undeclared.patch
new file mode 100644
index 000000000000..b6cdc77caa84
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libchop/gets-undeclared.patch
@@ -0,0 +1,71 @@
+This patch is needed to allow builds with newer versions of
+the GNU libc (2.16+).
+
+
+commit 66712c23388e93e5c518ebc8515140fa0c807348
+Author: Eric Blake <eblake@redhat.com>
+Date:   Thu Mar 29 13:30:41 2012 -0600
+
+    stdio: don't assume gets any more
+    
+    Gnulib intentionally does not have a gets module, and now that C11
+    and glibc have dropped it, we should be more proactive about warning
+    any user on a platform that still has a declaration of this dangerous
+    interface.
+    
+    * m4/stdio_h.m4 (gl_STDIO_H, gl_STDIO_H_DEFAULTS): Drop gets
+    support.
+    * modules/stdio (Makefile.am): Likewise.
+    * lib/stdio-read.c (gets): Likewise.
+    * tests/test-stdio-c++.cc: Likewise.
+    * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Fix comment.
+    * lib/stdio.in.h (gets): Make warning occur in more places.
+    * doc/posix-functions/gets.texi (gets): Update documentation.
+    Reported by Christer Solskogen.
+    
+    Signed-off-by: Eric Blake <eblake@redhat.com>
+
+diff --git a/lib/stdio.in.h b/lib/stdio.in.h
+index aa7b599..c377b6e 100644
+--- a/lib/stdio.in.h
++++ b/lib/stdio.in.h
+@@ -698,22 +698,11 @@ _GL_WARN_ON_USE (getline, "getline is unportable - "
+ # endif
+ #endif
+ 
+-#if @GNULIB_GETS@
+-# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
+-#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+-#   undef gets
+-#   define gets rpl_gets
+-#  endif
+-_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1)));
+-_GL_CXXALIAS_RPL (gets, char *, (char *s));
+-# else
+-_GL_CXXALIAS_SYS (gets, char *, (char *s));
+-#  undef gets
+-# endif
+-_GL_CXXALIASWARN (gets);
+ /* It is very rare that the developer ever has full control of stdin,
+-   so any use of gets warrants an unconditional warning.  Assume it is
+-   always declared, since it is required by C89.  */
++   so any use of gets warrants an unconditional warning; besides, C11
++   removed it.  */
++#undef gets
++#if HAVE_RAW_DECL_GETS
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+ #endif
+ 
+@@ -1053,9 +1042,9 @@ _GL_WARN_ON_USE (snprintf, "snprintf is unportable - "
+ # endif
+ #endif
+ 
+-/* Some people would argue that sprintf should be handled like gets
+-   (for example, OpenBSD issues a link warning for both functions),
+-   since both can cause security holes due to buffer overruns.
++/* Some people would argue that all sprintf uses should be warned about
++   (for example, OpenBSD issues a link warning for it),
++   since it can cause security holes due to buffer overruns.
+    However, we believe that sprintf can be used safely, and is more
+    efficient than snprintf in those safe cases; and as proof of our
+    belief, we use sprintf in several gnulib modules.  So this header
diff --git a/nixpkgs/pkgs/development/libraries/libchop/size_t.patch b/nixpkgs/pkgs/development/libraries/libchop/size_t.patch
new file mode 100644
index 000000000000..82b6cb995ef3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libchop/size_t.patch
@@ -0,0 +1,11 @@
+--- a/src/chop.c
++++ b/src/chop.c
+@@ -539,7 +539,7 @@ extern const chop_class_t chop_gdbm_bloc
+   chop_qdbm_block_iterator_class;
+ 
+ const struct chop_class_entry *
+-chop_lookup_class_entry (const char *str, unsigned int len);
++chop_lookup_class_entry (const char *str, size_t len);
+ 
+ /* Include the gperf-generated perfect hash table.  */
+ #include "class-lookup.c"
diff --git a/nixpkgs/pkgs/development/libraries/libcifpp/default.nix b/nixpkgs/pkgs/development/libraries/libcifpp/default.nix
new file mode 100644
index 000000000000..2ec4a6da2ce6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcifpp/default.nix
@@ -0,0 +1,45 @@
+{ lib
+, stdenv
+, boost
+, cmake
+, fetchFromGitHub
+, fetchpatch
+, eigen
+, zlib
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libcifpp";
+  version = "7.0.0";
+
+  src = fetchFromGitHub {
+    owner = "PDB-REDO";
+    repo = "libcifpp";
+    rev = "refs/tags/v${finalAttrs.version}";
+    hash = "sha256-nOKekN3re2Gg7h2RAJ6yRZMfEEk65N2zvb9NafRCVbE=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  cmakeFlags = [
+    # disable network access
+    "-DCIFPP_DOWNLOAD_CCD=OFF"
+  ];
+
+  buildInputs = [
+    boost
+    eigen
+    zlib
+  ];
+
+  meta = with lib; {
+    description = "Manipulate mmCIF and PDB files";
+    homepage = "https://github.com/PDB-REDO/libcifpp";
+    changelog = "https://github.com/PDB-REDO/libcifpp/releases/tag/${finalAttrs.src.rev}";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ natsukium ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libcint/default.nix b/nixpkgs/pkgs/development/libraries/libcint/default.nix
new file mode 100644
index 000000000000..caa7e51336a4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcint/default.nix
@@ -0,0 +1,55 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, blas
+  # Check Inputs
+, python3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libcint";
+  version = "6.1.2";
+
+  src = fetchFromGitHub {
+    owner = "sunqm";
+    repo = "libcint";
+    rev = "v${version}";
+    hash = "sha256-URJcC0ib87ejrTCglCjhC2tQHNc5TRvo4CQ52N58n+4=";
+  };
+
+  postPatch = ''
+    sed -i 's/libcint.so/libcint${stdenv.hostPlatform.extensions.sharedLibrary}/g' testsuite/*.py
+  '';
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ blas ];
+  cmakeFlags = [
+    "-DENABLE_TEST=1"
+    "-DQUICK_TEST=1"
+    "-DCMAKE_INSTALL_PREFIX=" # ends up double-adding /nix/store/... prefix, this avoids issue
+    "-DWITH_RANGE_COULOMB:STRING=1"
+    "-DWITH_FORTRAN:STRING=1"
+    "-DMIN_EXPCUTOFF:STRING=20"
+  ];
+
+  strictDeps = true;
+
+  doCheck = true;
+  nativeCheckInputs = [ python3.pkgs.numpy ];
+
+  meta = with lib; {
+    description = "General GTO integrals for quantum chemistry";
+    longDescription = ''
+      libcint is an open source library for analytical Gaussian integrals.
+      It provides C/Fortran API to evaluate one-electron / two-electron
+      integrals for Cartesian / real-spheric / spinor Gaussian type functions.
+    '';
+    homepage = "http://wiki.sunqm.net/libcint";
+    downloadPage = "https://github.com/sunqm/libcint";
+    changelog = "https://github.com/sunqm/libcint/blob/master/ChangeLog";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ drewrisinger ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libck/default.nix b/nixpkgs/pkgs/development/libraries/libck/default.nix
new file mode 100644
index 000000000000..cc53d4957eb4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libck/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "ck";
+  version = "0.7.1";
+
+  src = fetchFromGitHub {
+    owner = "concurrencykit";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-HUC+8Vd0koAmumRZ8gS5u6LVa7fUfkIYRaxVv6/7Hgg=";
+  };
+
+  postPatch = ''
+    substituteInPlace \
+      configure \
+        --replace \
+          'COMPILER=`./.1 2> /dev/null`' \
+          "COMPILER=gcc"
+  '';
+
+  configureFlags = ["--platform=${stdenv.hostPlatform.parsed.cpu.name}}"];
+
+  dontDisableStatic = true;
+
+  meta = with lib; {
+    description = "High-performance concurrency research library";
+    longDescription = ''
+      Concurrency primitives, safe memory reclamation mechanisms and non-blocking data structures for the research, design and implementation of high performance concurrent systems.
+    '';
+    license = with licenses; [ asl20 bsd2 ];
+    homepage = "http://concurrencykit.org/";
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ chessai thoughtpolice ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcli/default.nix b/nixpkgs/pkgs/development/libraries/libcli/default.nix
new file mode 100644
index 000000000000..982d34f1bdce
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcli/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchFromGitHub, fetchurl, libxcrypt }:
+
+stdenv.mkDerivation rec {
+  pname = "libcli";
+  version = "1.9.7";
+
+  src = fetchFromGitHub {
+    sha256 = "08pmjhqkwldhmcwjhi2l27slf1fk6nxxfaihnk2637pqkycy8z0c";
+    rev = "v${version}";
+    repo = "libcli";
+    owner = "dparrish";
+  };
+
+  patches =
+    [ (fetchurl {
+        url = "https://github.com/dparrish/libcli/commit/ebc5a09db457ee1be9996711463cbbafe5ea72d5.patch";
+        sha256 = "0szjiw3gd7by1sv924shnngfxvc98xvaqvx228b575xq93xxjcwl";
+      })
+    ];
+
+  buildInputs = [ libxcrypt ];
+
+  enableParallelBuilding = true;
+
+  makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "AR=${stdenv.cc.targetPrefix}ar" "PREFIX=$(out)" ];
+
+  env.NIX_CFLAGS_COMPILE = toString [
+    # Needed with GCC 12
+    "-Wno-error=address"
+  ];
+
+  meta = with lib; {
+    description = "Emulate a Cisco-style telnet command-line interface";
+    homepage = "http://sites.dparrish.com/libcli";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcloudproviders/default.nix b/nixpkgs/pkgs/development/libraries/libcloudproviders/default.nix
new file mode 100644
index 000000000000..5977ea33bd24
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcloudproviders/default.nix
@@ -0,0 +1,61 @@
+{ stdenv
+, lib
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, gobject-introspection
+, vala
+, gtk-doc
+, docbook_xsl
+, glib
+, mesonEmulatorHook
+, gnome
+}:
+
+# TODO: Add installed tests once https://gitlab.gnome.org/World/libcloudproviders/issues/4 is fixed
+
+stdenv.mkDerivation rec {
+  pname = "libcloudproviders";
+  version = "0.3.5";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/libcloudproviders/${lib.versions.majorMinor version}/libcloudproviders-${version}.tar.xz";
+    sha256 = "uYdFbt2vcVup1iOqK8UBqxtpff/rEaqng6Y3J13xhto=";
+  };
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  mesonFlags = [
+    "-Denable-gtk-doc=true"
+  ];
+
+  strictDeps = true;
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gobject-introspection
+    vala
+    gtk-doc
+    docbook_xsl
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
+  ];
+
+  buildInputs = [ glib ];
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = "libcloudproviders";
+    };
+  };
+
+  meta = with lib; {
+    description = "DBus API that allows cloud storage sync clients to expose their services";
+    homepage = "https://gitlab.gnome.org/World/libcloudproviders";
+    license = licenses.lgpl3Plus;
+    maintainers = with maintainers; [ jtojnar ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libclthreads/default.nix b/nixpkgs/pkgs/development/libraries/libclthreads/default.nix
new file mode 100644
index 000000000000..e4548420a057
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libclthreads/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libclthreads";
+  version = "2.4.2";
+
+  src = fetchurl {
+    url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/clthreads-${version}.tar.bz2";
+    sha256 = "0cbs1w89q8wfjrrhvxf6xk0y02nkjl5hd0yb692c8ma01i6b2nf6";
+  };
+
+  patchPhase = ''
+    cd source
+    # don't run ldconfig:
+    sed -e "/ldconfig/d" -i ./Makefile
+  '';
+
+  makeFlags = [
+    "PREFIX=$(out)"
+    "SUFFIX=''"
+  ];
+
+  preInstall = ''
+    # The Makefile does not create the include and lib directories
+    mkdir -p $out/include
+    mkdir -p $out/lib
+  '';
+
+  postInstall = ''
+    ln $out/lib/libclthreads.so $out/lib/libclthreads.so.2
+  '';
+
+  meta = with lib; {
+    description = "Zita thread library";
+    homepage = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/index.html";
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libclxclient/default.nix b/nixpkgs/pkgs/development/libraries/libclxclient/default.nix
new file mode 100644
index 000000000000..40f259677ff4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libclxclient/default.nix
@@ -0,0 +1,49 @@
+{ lib, stdenv, fetchurl, libclthreads, libX11, libXft, xorg, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "libclxclient";
+  version = "3.9.2";
+
+  src = fetchurl {
+    url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/clxclient-${version}.tar.bz2";
+    sha256 = "10bq6fy8d3pr1x2x3xx9qhf2hdxrwdgvg843a2y6lx70y1jfj0c5";
+  };
+
+  buildInputs = [ libclthreads libX11 libXft xorg.xorgproto ];
+
+  nativeBuildInputs = [ pkg-config ];
+
+  env.NIX_CFLAGS_COMPILE = "-I${xorg.xorgproto}/include -I${libXft.dev}/include";
+
+  patchPhase = ''
+    cd source
+    # use pkg-config instead of pkgcon:
+    sed -e 's/pkgconf/pkg-config/g' -i ./Makefile
+    # don't run ldconfig:
+    sed -e "/ldconfig/d" -i ./Makefile
+    # make sure it can find clxclient.h:
+    sed -e 's/<clxclient.h>/"clxclient.h"/' -i ./enumip.cc
+  '';
+
+  makeFlags = [
+    "PREFIX=$(out)"
+    "SUFFIX=''"
+  ];
+
+  preInstall = ''
+    # The Makefile does not create the include directory
+    mkdir -p $out/include
+  '';
+
+  postInstall = ''
+    ln $out/lib/libclxclient.so $out/lib/libclxclient.so.3
+  '';
+
+  meta = with lib; {
+    description = "Zita X11 library";
+    homepage = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/index.html";
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcmis/default.nix b/nixpkgs/pkgs/development/libraries/libcmis/default.nix
new file mode 100644
index 000000000000..52da37199919
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcmis/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, boost, libxml2, pkg-config, docbook2x, curl, autoreconfHook, cppunit }:
+
+stdenv.mkDerivation rec {
+  pname = "libcmis";
+  version = "0.6.2";
+
+  src = fetchFromGitHub {
+    owner = "tdf";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-HXiyQKjOlQXWABY10XrOiYxPqfpmUJC3a6xD98LIHDw=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config docbook2x ];
+  buildInputs = [ boost libxml2 curl cppunit ];
+
+  configureFlags = [
+    "--disable-werror"
+    "DOCBOOK2MAN=${docbook2x}/bin/docbook2man"
+  ];
+
+  doCheck = true;
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "C++ client library for the CMIS interface";
+    homepage = "https://github.com/tdf/libcmis";
+    license = licenses.gpl2;
+    mainProgram = "cmis-client";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcollectdclient/default.nix b/nixpkgs/pkgs/development/libraries/libcollectdclient/default.nix
new file mode 100644
index 000000000000..41c5565482fe
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcollectdclient/default.nix
@@ -0,0 +1,22 @@
+{ lib, collectd }:
+
+collectd.overrideAttrs (oldAttrs: {
+  pname = "libcollectdclient";
+  inherit (collectd) version;
+  buildInputs = [ ];
+
+  configureFlags = (oldAttrs.configureFlags or []) ++ [
+    "--disable-daemon"
+    "--disable-all-plugins"
+  ];
+
+  postInstall = "rm -rf $out/{bin,etc,sbin,share}";
+
+  meta = with lib; {
+    description = "C Library for collectd, a daemon which collects system performance statistics periodically";
+    homepage = "http://collectd.org";
+    license = licenses.gpl2;
+    platforms = platforms.linux; # TODO: collectd may be linux but the C client may be more portable?
+    maintainers = [ maintainers.sheenobu maintainers.bjornfor ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libcommuni/default.nix b/nixpkgs/pkgs/development/libraries/libcommuni/default.nix
new file mode 100644
index 000000000000..f7d064e0de38
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcommuni/default.nix
@@ -0,0 +1,48 @@
+{ lib, stdenv, fetchFromGitHub
+, qtbase, qtdeclarative, qmake, which
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libcommuni";
+  version = "3.7.0";
+
+  src = fetchFromGitHub {
+    owner = "communi";
+    repo = "libcommuni";
+    rev = "v${version}";
+    sha256 = "sha256-9eYJpmjW1J48RD6wVJOHmsAgTbauNeeCrXe076ufq1I=";
+  };
+
+  buildInputs = [ qtbase qtdeclarative ];
+  nativeBuildInputs = [ qmake which ];
+
+  enableParallelBuilding = true;
+
+  dontUseQmakeConfigure = true;
+  configureFlags = [ "-config" "release" ]
+    # Build mixes up dylibs/frameworks if one is not explicitly specified.
+    ++ lib.optionals stdenv.isDarwin [ "-config" "qt_framework" ];
+
+  dontWrapQtApps = true;
+
+  preConfigure = ''
+    sed -i -e 's|/bin/pwd|pwd|g' configure
+  '';
+
+  # The tests fail on darwin because of install_name if they run
+  # before the frameworks are installed.
+  doCheck = false;
+  doInstallCheck = true;
+  installCheckTarget = "check";
+
+  # Hack to avoid TMPDIR in RPATHs.
+  preFixup = "rm -rf lib";
+
+  meta = with lib; {
+    description = "A cross-platform IRC framework written with Qt";
+    homepage = "https://communi.github.io";
+    license = licenses.bsd3;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ hrdinka ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libconfig/default.nix b/nixpkgs/pkgs/development/libraries/libconfig/default.nix
new file mode 100644
index 000000000000..5c06808f67c3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libconfig/default.nix
@@ -0,0 +1,32 @@
+{ lib
+, stdenv
+, fetchurl
+, # this also disables building tests.
+  # on static windows cross-compile they fail to build
+  doCheck ? with stdenv.hostPlatform; !(isWindows && isStatic)
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libconfig";
+  version = "1.7.3";
+
+  src = fetchurl {
+    url = "https://hyperrealm.github.io/${pname}/dist/${pname}-${version}.tar.gz";
+    sha256 = "sha256-VFFm1srAN3RDgdHpzFpUBQlOe/rRakEWmbz/QLuzHuc=";
+  };
+
+  inherit doCheck;
+
+  configureFlags = lib.optional (stdenv.hostPlatform.isWindows || stdenv.hostPlatform.isStatic) "--disable-examples"
+    ++ lib.optional (!doCheck) "--disable-tests";
+
+  cmakeFlags = lib.optionals (!doCheck) [ "-DBUILD_TESTS:BOOL=OFF" ];
+
+  meta = with lib; {
+    homepage = "http://www.hyperrealm.com/libconfig";
+    description = "A simple library for processing structured configuration files";
+    license = licenses.lgpl3;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libconfuse/default.nix b/nixpkgs/pkgs/development/libraries/libconfuse/default.nix
new file mode 100644
index 000000000000..91a5a2f26f87
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libconfuse/default.nix
@@ -0,0 +1,62 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, autoreconfHook
+, flex
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libconfuse";
+  version = "3.3";
+
+  src = fetchFromGitHub {
+    sha256 = "1npfk5jv59kk4n8pkyx89fn9s6p8x3gbffs42jaw24frgxfgp8ca";
+    rev = "v${version}";
+    repo = "libconfuse";
+    owner = "martinh";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "CVE-2022-40320.patch";
+      urls = [
+        "https://sources.debian.org/data/main/libc/libconfuse/3.3-3/debian/patches/CVE-2022-40320.patch"
+        # files on sources.debian.org can disappear
+        "https://web.archive.org/web/20230107133212/https://sources.debian.org/data/main/libc/libconfuse/3.3-3/debian/patches/CVE-2022-40320.patch"
+      ];
+      sha256 = "sha256-ftfE9JFz4nyRSOb2xHb9BAtgWn5Yv2WLm4RegDLtiBw=";
+    })
+  ];
+
+  postPatch = ''
+    substituteInPlace tests/Makefile.am \
+      --replace 'TESTS            += empty_string' "" \
+      --replace 'TESTS            += print_filter' ""
+  '';
+
+  nativeBuildInputs = [ autoreconfHook flex ];
+
+  enableParallelBuilding = true;
+
+  # On darwin the tests depend on the installed libraries because of install_name.
+  doInstallCheck = true;
+  installCheckTarget = "check";
+
+  meta = with lib; {
+    inherit (src.meta) homepage;
+    description = "Small configuration file parser library for C";
+    longDescription = ''
+      libConfuse (previously libcfg) is a configuration file parser library
+      written in C. It supports sections and (lists of) values, as well as
+      some other features. It makes it very easy to add configuration file
+      capability to a program using a simple API.
+
+      The goal of libConfuse is not to be the configuration file parser library
+      with a gazillion of features. Instead, it aims to be easy to use and
+      quick to integrate with your code.
+    '';
+    license = licenses.isc;
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcork/default.nix b/nixpkgs/pkgs/development/libraries/libcork/default.nix
new file mode 100644
index 000000000000..305ba24e280e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcork/default.nix
@@ -0,0 +1,51 @@
+{ stdenv
+, fetchFromGitHub
+, cmake
+, lib
+, pkg-config
+, check
+}:
+stdenv.mkDerivation rec {
+  pname = "libcork";
+  version = "1.0.0--rc3";
+
+  src = fetchFromGitHub {
+    owner = "dcreager";
+    repo = pname;
+    rev = version;
+    sha256 = "152gqnmr6wfmflf5l6447am4clmg3p69pvy3iw7yhaawjqa797sk";
+  };
+
+  postPatch = ''
+    # N.B. We need to create this file, otherwise it tries to use git to
+    # determine the package version, which we do not want.
+    echo "${version}" > .version-stamp
+    echo "${version}" > .commit-stamp
+
+    # N.B. We disable tests by force, since their build is broken.
+    sed -i '/add_subdirectory(tests)/d' ./CMakeLists.txt
+
+    # https://github.com/dcreager/libcork/issues/173
+    substituteInPlace cmake/FindCTargets.cmake \
+      --replace '\$'{exec_prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
+      --replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR} \
+      --replace '\$'{datarootdir}/'$'{base_docdir} '$'{CMAKE_INSTALL_FULL_DOCDIR}
+  '';
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ check ];
+
+  doCheck = false;
+
+  postInstall = ''
+    ln -s $out/lib/libcork.so $out/lib/libcork.so.1
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/dcreager/libcork";
+    description = "A simple, easily embeddable cross-platform C library";
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ lovesegfault ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcotp/default.nix b/nixpkgs/pkgs/development/libraries/libcotp/default.nix
new file mode 100644
index 000000000000..80b418e3065d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcotp/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, lib, fetchFromGitHub, cmake, pkg-config, libgcrypt }:
+
+stdenv.mkDerivation rec {
+  pname = "libcotp";
+  version = "3.0.0";
+
+  src = fetchFromGitHub {
+    owner = "paolostivanin";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-/IIzUMms4aS63psyxwL+Ynj78c38R3WwbD2HIpdHF88=";
+  };
+
+  postPatch = lib.optionalString stdenv.cc.isClang ''
+    substituteInPlace CMakeLists.txt \
+      --replace "add_link_options(-Wl," "# add_link_options(-Wl,"
+  '';
+
+  buildInputs = [ libgcrypt ];
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  meta = with lib; {
+    description = "C library that generates TOTP and HOTP";
+    homepage = "https://github.com/paolostivanin/libcotp";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ alexbakker ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcouchbase/default.nix b/nixpkgs/pkgs/development/libraries/libcouchbase/default.nix
new file mode 100644
index 000000000000..4f813d74a897
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcouchbase/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, libevent, openssl}:
+
+stdenv.mkDerivation rec {
+  pname = "libcouchbase";
+  version = "3.3.9";
+
+  src = fetchFromGitHub {
+    owner = "couchbase";
+    repo = "libcouchbase";
+    rev = version;
+    sha256 = "sha256-dvXRbAdgb1WmKLijYkx6+js60ZxK1Tl2aTFSF7EpN74=";
+  };
+
+  cmakeFlags = [ "-DLCB_NO_MOCK=ON" ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ libevent openssl ];
+
+  # Running tests in parallel does not work
+  enableParallelChecking = false;
+
+  doCheck = !stdenv.isDarwin;
+
+  meta = with lib; {
+    description = "C client library for Couchbase";
+    homepage = "https://github.com/couchbase/libcouchbase";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcpr/default.nix b/nixpkgs/pkgs/development/libraries/libcpr/default.nix
new file mode 100644
index 000000000000..8a4025cf7097
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcpr/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchFromGitHub, cmake, curl }:
+
+let version = "1.10.5"; in
+stdenv.mkDerivation {
+  pname = "libcpr";
+  inherit version;
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "libcpr";
+    repo = "cpr";
+    rev = version;
+    hash = "sha256-mAuU2uF8d+aHvCmotgIrBi/pUp1jkP6G0f98M76zjOw=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  propagatedBuildInputs = [ curl ];
+
+  cmakeFlags = [
+    "-DCPR_USE_SYSTEM_CURL=ON"
+  ];
+
+  postPatch = ''
+    # Linking with stdc++fs is no longer necessary.
+    sed -i '/stdc++fs/d' include/CMakeLists.txt
+  '';
+
+  postInstall = ''
+    substituteInPlace "$out/lib/cmake/cpr/cprTargets.cmake" \
+      --replace "_IMPORT_PREFIX \"$out\"" \
+                "_IMPORT_PREFIX \"$dev\""
+  '';
+
+  meta = with lib; {
+    description = "C++ wrapper around libcurl";
+    homepage = "https://docs.libcpr.org/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ rycee ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcrafter/default.nix b/nixpkgs/pkgs/development/libraries/libcrafter/default.nix
new file mode 100644
index 000000000000..029bec5630bf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcrafter/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, libpcap }:
+
+stdenv.mkDerivation rec {
+  pname = "libcrafter";
+  version = "1.0";
+
+  src = fetchFromGitHub {
+    owner = "pellegre";
+    repo = "libcrafter";
+    rev = "version-${version}";
+    sha256 = "sha256-tCdN3+EzISVl+wp5umOFD+bgV+uUdabH+2LyxlV/W7Q=";
+  };
+
+  preConfigure = "cd libcrafter";
+
+  configureScript = "./autogen.sh";
+
+  configureFlags = [ "--with-libpcap=yes" ];
+
+  nativeBuildInputs = [ autoconf automake ];
+  buildInputs = [ libtool ];
+
+  propagatedBuildInputs = [ libpcap ];
+
+  meta = {
+    homepage = "https://github.com/pellegre/libcrafter";
+    description = "High level C++ network packet sniffing and crafting library";
+    license = lib.licenses.bsd3;
+    maintainers = [ ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcredis/default.nix b/nixpkgs/pkgs/development/libraries/libcredis/default.nix
new file mode 100644
index 000000000000..e0224d865d55
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcredis/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libcredis";
+  version = "0.2.3";
+
+  src = fetchurl {
+    url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/credis/credis-${version}.tar.gz";
+    sha256 = "1l3hlw9rrc11qggbg9a2303p3bhxxx2vqkmlk8avsrbqw15r1ayr";
+  };
+
+  # credis build system has no install actions, provide our own.
+  installPhase = ''
+    mkdir -p "$out/bin"
+    mkdir -p "$out/lib"
+    mkdir -p "$out/include"
+
+    cp -v credis-test "$out/bin/"
+    cp -v *.a *.so "$out/lib/"
+    cp -v *.h "$out/include/"
+  '';
+
+  meta = with lib; {
+    description = "C client library for Redis (key-value database)";
+    homepage = "https://code.google.com/archive/p/credis/";
+    license = licenses.bsd3; # from homepage
+    platforms = platforms.all;
+    maintainers = [ maintainers.bjornfor ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcrossguid/default.nix b/nixpkgs/pkgs/development/libraries/libcrossguid/default.nix
new file mode 100644
index 000000000000..c81dbb86f6a0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcrossguid/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub, libuuid }:
+
+stdenv.mkDerivation rec {
+  name = "lib" + pname + "-" + version;
+  pname = "crossguid";
+  version = "2016-02-21";
+
+  src = fetchFromGitHub {
+    owner = "graeme-hill";
+    repo = pname;
+    rev = "8f399e8bd4252be9952f3dfa8199924cc8487ca4";
+    sha256 = "1i29y207qqddvaxbn39pk2fbh3gx8zvdprfp35wasj9rw2wjk3s9";
+  };
+
+  buildInputs = [ libuuid ];
+
+  buildPhase = ''
+    $CXX -c guid.cpp -o guid.o $CXXFLAGS -std=c++11 -DGUID_LIBUUID
+    $AR rvs libcrossguid.a guid.o
+  '';
+  installPhase = ''
+    mkdir -p $out/{lib,include}
+    install -D -m644 libcrossguid.a "$out/lib/libcrossguid.a"
+    install -D -m644 guid.h "$out/include/guid.h"
+  '';
+
+  meta = with lib; {
+    description = "Lightweight cross platform C++ GUID/UUID library";
+    license = licenses.mit;
+    maintainers = with maintainers; [ edwtjo ];
+    homepage = "https://github.com/graeme-hill/crossguid";
+    platforms = with platforms; linux;
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcryptui/default.nix b/nixpkgs/pkgs/development/libraries/libcryptui/default.nix
new file mode 100644
index 000000000000..89b7dfa66444
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcryptui/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, intltool, glib, gnome, gtk3, gnupg, gpgme, dbus-glib, libgnome-keyring }:
+
+stdenv.mkDerivation rec {
+  pname = "libcryptui";
+  version = "3.12.2";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "0rh8wa5k2iwbwppyvij2jdxmnlfjbna7kbh2a5n7zw4nnjkx3ski";
+  };
+
+  patches = [
+    # based on https://gitlab.gnome.org/GNOME/libcryptui/-/commit/b05e301d1b264a5d8f07cb96e5edc243d99bff79.patch
+    # https://gitlab.gnome.org/GNOME/libcryptui/-/merge_requests/1
+    ./fix-latest-gnupg.patch
+  ];
+
+  nativeBuildInputs = [ pkg-config intltool autoreconfHook ];
+  buildInputs = [ glib gtk3 gnupg gpgme dbus-glib libgnome-keyring ];
+  propagatedBuildInputs = [ dbus-glib ];
+
+  enableParallelBuilding = true;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    description = "Interface components for OpenPGP";
+    homepage = "https://gitlab.gnome.org/GNOME/libcryptui";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcryptui/fix-latest-gnupg.patch b/nixpkgs/pkgs/development/libraries/libcryptui/fix-latest-gnupg.patch
new file mode 100644
index 000000000000..19aa27b549c2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcryptui/fix-latest-gnupg.patch
@@ -0,0 +1,26 @@
+From b05e301d1b264a5d8f07cb96e5edc243d99bff79 Mon Sep 17 00:00:00 2001
+From: Antoine Jacoutot <ajacoutot@gnome.org>
+Date: Fri, 10 Nov 2017 08:55:55 +0100
+Subject: [PATCH] Accept GnuPG 2.2.x as supported version
+
+https://bugzilla.gnome.org/show_bug.cgi?id=790152
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4486e7b2..be5b28b4 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -95,7 +95,7 @@ AC_ARG_ENABLE(gpg-check,
+ 	DO_CHECK=$enableval, DO_CHECK=yes)
+ 
+ if test	"$DO_CHECK" = "yes"; then
+-	accepted_versions="1.2 1.4 2.0"
++	accepted_versions="1.2 1.4 2.0 2.2 2.3 2.4"
+ 	AC_PATH_PROGS(GNUPG, [gpg gpg2], no)
+ 	AC_DEFINE_UNQUOTED(GNUPG, "$GNUPG", [Path to gpg executable.])
+ 	ok="no"
+-- 
+GitLab
+
diff --git a/nixpkgs/pkgs/development/libraries/libcs50/default.nix b/nixpkgs/pkgs/development/libraries/libcs50/default.nix
new file mode 100644
index 000000000000..14c8190ccbf2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcs50/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libcs50";
+  version = "11.0.2";
+
+  src = fetchFromGitHub {
+    owner = "cs50";
+    repo = "libcs50";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-A4CEU5wfwykVTDIsKZnQ8co+6RwBGYGZEZxRFzQTKBI=";
+  };
+
+  installPhase = ''
+    runHook preInstall
+    mkdir $out
+    cp -R build/lib $out/lib
+    cp -R build/include $out/include
+    ln -sf $out/lib/libcs50.so.11.0.2 $out/lib/libcs50.so.11
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/cs50/libcs50";
+    description = "CS50 Library for C";
+    license = licenses.gpl3Only;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libcsptr/default.nix b/nixpkgs/pkgs/development/libraries/libcsptr/default.nix
new file mode 100644
index 000000000000..a8f33deda36c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcsptr/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "libcsptr";
+  version = "2.0.4";
+
+  src = fetchFromGitHub {
+    owner = "Snaipe";
+    repo = "libcsptr";
+    rev = "v${version}";
+    sha256 = "0i1498h2i6zq3fn3zf3iw7glv6brn597165hnibgwccqa8sh3ich";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "Smart pointer constructs for the (GNU) C programming language";
+    homepage = "https://github.com/Snaipe/libcsptr";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = [ maintainers.fragamus ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libctb/default.nix b/nixpkgs/pkgs/development/libraries/libctb/default.nix
new file mode 100644
index 000000000000..d52adac556d8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libctb/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchurl }:
+stdenv.mkDerivation rec {
+  pname = "libctb";
+  version = "0.16";
+  src = fetchurl {
+    url = "https://iftools.com/download/files/legacy/${pname}-${version}.tar.gz";
+    sha256 = "027wh89d0qyly3d9m6rg4x7x1gqz3y3cnxlgk0k8xgygcrm05c0w";
+  };
+  patches = [
+    ./include-kbhit.patch
+  ];
+  sourceRoot = "${pname}-${version}/build";
+  makeFlags = [
+    "prefix=$(out)"
+  ];
+  meta = with lib; {
+    description = "Communications toolbox";
+    homepage = "https://iftools.com";
+    license = licenses.lgpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.misuzu ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libctb/include-kbhit.patch b/nixpkgs/pkgs/development/libraries/libctb/include-kbhit.patch
new file mode 100644
index 000000000000..76b4e38fadb9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libctb/include-kbhit.patch
@@ -0,0 +1,13 @@
+diff --git a/GNUmakefile b/GNUmakefile
+index e39a687..026f9c4 100644
+--- a/GNUmakefile
++++ b/GNUmakefile
+@@ -140,7 +140,7 @@ all: ../lib/libctb$(LIBFLAG)$(GPIBFLAG)-0.16.a ../lib/libctb$(LIBFLAG)$(GPIBFLAG
+
+ install: install_ctb_lib install_ctb_dll
+ 	$(INSTALL) -d $(DESTDIR)$(prefix)/include/ctb-0.16
+-	for f in ctb.h fifo.h getopt.h $(GPIBINC) iobase.h linux/serport.h linux/timer.h portscan.h serport.h serportx.h timer.h; do \
++	for f in ctb.h fifo.h getopt.h $(GPIBINC) iobase.h kbhit.h linux/serport.h linux/timer.h portscan.h serport.h serportx.h timer.h; do \
+ 	if test ! -d $(DESTDIR)$(prefix)/include/ctb-0.16/`dirname $$f` ; then \
+ 	$(INSTALL) -d $(DESTDIR)$(prefix)/include/ctb-0.16/`dirname $$f`; \
+ 	fi; \
diff --git a/nixpkgs/pkgs/development/libraries/libctemplate/default.nix b/nixpkgs/pkgs/development/libraries/libctemplate/default.nix
new file mode 100644
index 000000000000..2aa36bfe9914
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libctemplate/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub, python3, autoconf, automake, libtool }:
+
+stdenv.mkDerivation rec {
+  pname = "ctemplate";
+  version = "2.4";
+
+  src = fetchFromGitHub {
+    owner = "OlafvdSpek";
+    repo = "ctemplate";
+    rev = "ctemplate-${version}";
+    sha256 = "1x0p5yym6vvcx70pm8ihnbxxrl2wnblfp72ih5vjyg8mzkc8cxrr";
+  };
+
+  nativeBuildInputs = [ python3 autoconf automake libtool ];
+
+  postPatch = ''
+    patchShebangs .
+  '';
+
+  preConfigure = ''
+    ./autogen.sh
+  '';
+
+  meta = {
+    description = "A simple but powerful template language for C++";
+    longDescription = ''
+      CTemplate is a simple but powerful template language for C++. It
+      emphasizes separating logic from presentation: it is impossible to
+      embed application logic in this template language.
+    '';
+    homepage = "https://github.com/OlafvdSpek/ctemplate";
+    license = lib.licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libctl/default.nix b/nixpkgs/pkgs/development/libraries/libctl/default.nix
new file mode 100644
index 000000000000..d7fed2415df0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libctl/default.nix
@@ -0,0 +1,31 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, gfortran
+, guile
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libctl";
+  version = "4.5.1";
+
+  src = fetchFromGitHub {
+    owner = "NanoComp";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "uOydBWYPXSBUi+4MM6FNx6B5l2to7Ny9Uc1MMTV9bGA=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook gfortran guile pkg-config ];
+
+  configureFlags = [ "--enable-shared" ];
+
+  meta = with lib; {
+    description = "Guile-based library for supporting flexible control files in scientific simulations";
+    homepage = "https://github.com/NanoComp/libctl";
+    license = licenses.gpl2Only;
+    maintainers = with maintainers; [ carpinchomug ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcue/default.nix b/nixpkgs/pkgs/development/libraries/libcue/default.nix
new file mode 100644
index 000000000000..ec7f1ba26ab1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcue/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, cmake, bison, flex }:
+
+stdenv.mkDerivation rec {
+  pname = "libcue";
+  version = "2.3.0";
+
+  src = fetchFromGitHub {
+    owner = "lipnitsk";
+    repo = "libcue";
+    rev = "v${version}";
+    hash = "sha256-ZMUUa8CmpFNparPsM/P2yvRto9E85EdTxpID5sKQbNI=";
+  };
+
+  nativeBuildInputs = [ cmake bison flex ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "CUE Sheet Parser Library";
+    longDescription = ''
+      libcue is intended to parse a so called cue sheet from a char string or
+      a file pointer. For handling of the parsed data a convenient API is
+      available.
+    '';
+    homepage = "https://github.com/lipnitsk/libcue";
+    license = licenses.gpl2Only;
+    maintainers = with maintainers; [ astsmtl ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcutl/default.nix b/nixpkgs/pkgs/development/libraries/libcutl/default.nix
new file mode 100644
index 000000000000..db04b5f59b5c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcutl/default.nix
@@ -0,0 +1,34 @@
+{ lib, gccStdenv, fetchurl, xercesc }:
+
+let
+  stdenv = gccStdenv;
+in
+stdenv.mkDerivation rec {
+  pname = "libcutl";
+  version = "1.10.0";
+
+  meta = with lib; {
+    description = "C++ utility library from Code Synthesis";
+    longDescription = ''
+        libcutl is a C++ utility library.
+        It contains a collection of generic and independent components such as
+        meta-programming tests, smart pointers, containers, compiler building blocks, etc.
+    '';
+    homepage = "https://codesynthesis.com/projects/libcutl/";
+    changelog = "https://git.codesynthesis.com/cgit/libcutl/libcutl/plain/NEWS?h=${version}";
+    platforms = platforms.all;
+    maintainers = with maintainers; [ ];
+    license = licenses.mit;
+  };
+
+  majmin = builtins.head ( builtins.match "([[:digit:]]\\.[[:digit:]]+).*" "${version}" );
+  src = fetchurl {
+    url = "https://codesynthesis.com/download/${pname}/${majmin}/${pname}-${version}.tar.bz2";
+    sha256 = "070j2x02m4gm1fn7gnymrkbdxflgzxwl7m96aryv8wp3f3366l8j";
+  };
+
+  buildInputs = [ xercesc ];
+  enableParallelBuilding = true;
+
+  env.NIX_CFLAGS_COMPILE = toString [ "-std=c++14" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcxxrt/default.nix b/nixpkgs/pkgs/development/libraries/libcxxrt/default.nix
new file mode 100644
index 000000000000..c18e699eaf86
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcxxrt/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub, cmake, unstableGitUpdater }:
+
+stdenv.mkDerivation {
+  pname = "libcxxrt";
+  version = "unstable-2024-02-05";
+
+  src = fetchFromGitHub {
+    owner = "libcxxrt";
+    repo = "libcxxrt";
+    rev = "bd4fa85d7f772f2ad32146d5681c91612fc93842";
+    sha256 = "2F6MmLfKyFl7HzdTb1NDBVHMSRVzVhcib93JVaR58Qw=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  installPhase = ''
+    mkdir -p $out/include $out/lib
+    cp ../src/cxxabi.h $out/include
+    cp lib/libcxxrt${stdenv.hostPlatform.extensions.library} $out/lib
+  '';
+
+  passthru = {
+    libName = "cxxrt";
+    updateScript = unstableGitUpdater { };
+  };
+
+  meta = with lib; {
+    homepage = "https://github.com/libcxxrt/libcxxrt";
+    description = "Implementation of the Code Sourcery C++ ABI";
+    maintainers = with maintainers; [ qyliss ];
+    platforms = platforms.all;
+    license = licenses.bsd2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libcyaml/default.nix b/nixpkgs/pkgs/development/libraries/libcyaml/default.nix
new file mode 100644
index 000000000000..99ad390896f6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libcyaml/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, lib, fetchFromGitHub
+, libyaml
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libcyaml";
+  version = "1.4.1";
+
+  src = fetchFromGitHub {
+    owner = "tlsa";
+    repo = "libcyaml";
+    rev = "v${version}";
+    sha256 = "sha256-iS1T8R0SW+qu0TlP5FVlDzUfQitiZMUkbJUigbxeW0Y=";
+  };
+
+  buildInputs = [ libyaml ];
+
+  makeFlags = [ "VARIANT=release" "PREFIX=$(out)" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/tlsa/libcyaml";
+    description = "C library for reading and writing YAML";
+    changelog = "https://github.com/tlsa/libcyaml/raw/v${version}/CHANGES.md";
+    license = licenses.isc;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdaemon/default.nix b/nixpkgs/pkgs/development/libraries/libdaemon/default.nix
new file mode 100644
index 000000000000..112792454c43
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdaemon/default.nix
@@ -0,0 +1,28 @@
+{lib, stdenv, fetchurl}:
+
+stdenv.mkDerivation rec {
+  pname = "libdaemon";
+  version = "0.14";
+
+  src = fetchurl {
+    url = "http://0pointer.de/lennart/projects/libdaemon/${pname}-${version}.tar.gz";
+    sha256 = "0d5qlq5ab95wh1xc87rqrh1vx6i8lddka1w3f1zcqvcqdxgyn8zx";
+  };
+
+  outputs = [ "out" "dev" "doc" ];
+
+  patches = [ ./fix-includes.patch ];
+
+  configureFlags = [ "--disable-lynx" ]
+    ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform)
+    [ # Can't run this test while cross-compiling
+      "ac_cv_func_setpgrp_void=yes"
+    ];
+
+  meta = {
+    description = "Lightweight C library that eases the writing of UNIX daemons";
+    homepage = "http://0pointer.de/lennart/projects/libdaemon/";
+    license = lib.licenses.lgpl2Plus;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdaemon/fix-includes.patch b/nixpkgs/pkgs/development/libraries/libdaemon/fix-includes.patch
new file mode 100644
index 000000000000..51c5133afede
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdaemon/fix-includes.patch
@@ -0,0 +1,13 @@
+--- libdaemon-0.14.orig/examples/testd.c
++++ libdaemon-0.14/examples/testd.c
+@@ -21,9 +21,9 @@
+ #include <signal.h>
+ #include <errno.h>
+ #include <string.h>
++#include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/time.h>
+-#include <sys/unistd.h>
+ #include <sys/select.h>
+ 
+ #include <libdaemon/dfork.h>
diff --git a/nixpkgs/pkgs/development/libraries/libdatachannel/default.nix b/nixpkgs/pkgs/development/libraries/libdatachannel/default.nix
new file mode 100644
index 000000000000..64351a85a9ae
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdatachannel/default.nix
@@ -0,0 +1,61 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, srcOnly
+, cmake
+, ninja
+, pkg-config
+, libnice
+, openssl
+, plog
+, srtp
+, usrsctp
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libdatachannel";
+  version = "0.19.5";
+
+  src = fetchFromGitHub {
+    owner = "paullouisageneau";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-XTfe0NqDQWx4ISgEiUbzACH9csaG+IrUvwss07dnz80=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  strictDeps = true;
+  nativeBuildInputs = [
+    cmake
+    ninja
+    pkg-config
+  ];
+  buildInputs = [
+    libnice
+    openssl
+    srtp
+    usrsctp
+    plog
+  ];
+
+  cmakeFlags = [
+    "-DUSE_NICE=ON"
+    "-DPREFER_SYSTEM_LIB=ON"
+    "-DNO_EXAMPLES=ON"
+  ];
+
+  postFixup = ''
+    # Fix include path that will be incorrect due to the "dev" output
+    substituteInPlace "$dev/lib/cmake/LibDataChannel/LibDataChannelTargets.cmake" \
+      --replace "\''${_IMPORT_PREFIX}/include" "$dev/include"
+  '';
+
+  meta = with lib; {
+    description = "C/C++ WebRTC network library featuring Data Channels, Media Transport, and WebSockets";
+    homepage = "https://libdatachannel.org/";
+    license = with licenses; [ mpl20 ];
+    maintainers = with maintainers; [ erdnaxe ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdatovka/default.nix b/nixpkgs/pkgs/development/libraries/libdatovka/default.nix
new file mode 100644
index 000000000000..99fce98b1926
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdatovka/default.nix
@@ -0,0 +1,43 @@
+{ lib
+, stdenv
+, autoreconfHook
+, pkg-config
+, fetchurl
+, expat
+, gpgme
+, libgcrypt
+, libxml2
+, libxslt
+, gnutls
+, curl
+, docbook_xsl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libdatovka";
+  version = "0.6.0";
+
+  src = fetchurl {
+    url = "https://gitlab.nic.cz/datovka/libdatovka/-/archive/v${version}/libdatovka-v${version}.tar.gz";
+    sha256 = "sha256-+n2gKEi0TyTl/zEdJYpX1oPfGSftk6TzVjbVOuIMU3Q=";
+  };
+
+  patches = [
+    ./libdatovka-deprecated-fn-curl.patch
+  ];
+
+  configureFlags = [
+    "--with-docbook-xsl-stylesheets=${docbook_xsl}/xml/xsl/docbook"
+  ];
+
+  nativeBuildInputs = [ pkg-config autoreconfHook ];
+  buildInputs = [ expat gpgme libgcrypt libxml2 libxslt gnutls curl docbook_xsl ];
+
+  meta = with lib; {
+    description = "Client library for accessing SOAP services of Czech government-provided Databox infomation system";
+    homepage = "https://gitlab.nic.cz/datovka/libdatovka";
+    license = licenses.gpl3Plus;
+    maintainers = [ maintainers.ovlach ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdatovka/libdatovka-deprecated-fn-curl.patch b/nixpkgs/pkgs/development/libraries/libdatovka/libdatovka-deprecated-fn-curl.patch
new file mode 100644
index 000000000000..b63f850c7d71
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdatovka/libdatovka-deprecated-fn-curl.patch
@@ -0,0 +1,11 @@
+--- libdatovka-v0.2.1/configure.ac	2021-11-03 13:33:03.000000000 +0100
++++ libdatovka-v0.2.1-patched/configure.ac	2023-01-18 11:44:25.647566474 +0100
+@@ -46,6 +46,8 @@
+                 [Define if you want include debugging code])
+       )
+ 
++CFLAGS="${CFLAGS} -Wno-error=deprecated-declarations"
++
+ AC_CHECK_DECL([_WIN32])
+ AM_CONDITIONAL([WIN32], [test "$ac_cv_have_decl__WIN32" = "yes"])
+ 
diff --git a/nixpkgs/pkgs/development/libraries/libdatrie/default.nix b/nixpkgs/pkgs/development/libraries/libdatrie/default.nix
new file mode 100644
index 000000000000..765efe573a64
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdatrie/default.nix
@@ -0,0 +1,47 @@
+{ lib, stdenv, fetchFromGitHub, makeWrapper
+, autoreconfHook, autoconf-archive
+, installShellFiles, libiconv }:
+
+stdenv.mkDerivation rec {
+
+  pname = "libdatrie";
+  version = "2019-12-20";
+
+  outputs = [ "bin" "out" "lib" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "tlwg";
+    repo = "libdatrie";
+    rev = "d1db08ac1c76f54ba23d63665437473788c999f3";
+    sha256 = "03dc363259iyiidrgadzc7i03mmfdj8h78j82vk6z53w6fxq5zxc";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    autoconf-archive
+    installShellFiles
+  ];
+
+  buildInputs = [ libiconv ];
+
+  preAutoreconf = let
+    reports = "https://github.com/tlwg/libdatrie/issues";
+  in
+  ''
+    sed -i -e "/AC_INIT/,+3d" configure.ac
+    sed -i "5iAC_INIT(${pname},${version},[${reports}])" configure.ac
+  '';
+
+  postInstall = ''
+    installManPage man/trietool.1
+  '';
+
+  meta = with lib; {
+    homepage = "https://linux.thai.net/~thep/datrie/datrie.html";
+    description = "This is an implementation of double-array structure for representing trie";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ ];
+    pkgConfigModules = [ "datrie-0.2" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdazzle/default.nix b/nixpkgs/pkgs/development/libraries/libdazzle/default.nix
new file mode 100644
index 000000000000..ec616b4a5fab
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdazzle/default.nix
@@ -0,0 +1,88 @@
+{ lib
+, stdenv
+, fetchurl
+, ninja
+, meson
+, mesonEmulatorHook
+, pkg-config
+, vala
+, gobject-introspection
+, libxml2
+, gtk-doc
+, docbook_xsl
+, docbook_xml_dtd_43
+, dbus
+, xvfb-run
+, glib
+, gtk3
+, gnome
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libdazzle";
+  version = "3.44.0";
+
+  outputs = [ "out" "dev" "devdoc" ];
+  outputBin = "dev";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/libdazzle/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "PNPkXrbiaAywXVLh6A3Y+dWdR2UhLw4o945sF4PRjq4=";
+  };
+
+  nativeBuildInputs = [
+    ninja
+    meson
+    pkg-config
+    vala
+    gobject-introspection
+    libxml2
+    gtk-doc
+    docbook_xsl
+    docbook_xml_dtd_43
+    dbus
+    glib
+  ] ++ lib.optionals stdenv.isLinux [
+    xvfb-run
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
+  ];
+
+  buildInputs = [
+    glib
+    gtk3
+  ];
+
+  mesonFlags = [
+    "-Denable_gtk_doc=true"
+  ];
+
+  doCheck = stdenv.isLinux;
+
+  checkPhase = ''
+    xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
+      --config-file=${dbus}/share/dbus-1/session.conf \
+      meson test --print-errorlogs
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+    };
+  };
+
+  meta = with lib; {
+    description = "A library to delight your users with fancy features";
+    longDescription = ''
+      The libdazzle library is a companion library to GObject and GTK. It
+      provides various features that we wish were in the underlying library but
+      cannot for various reasons. In most cases, they are wildly out of scope
+      for those libraries. In other cases, our design isn't quite generic
+      enough to work for everyone.
+    '';
+    homepage = "https://wiki.gnome.org/Apps/Builder";
+    license = licenses.gpl3Plus;
+    maintainers = teams.gnome.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdbi-drivers/default.nix b/nixpkgs/pkgs/development/libraries/libdbi-drivers/default.nix
new file mode 100644
index 000000000000..461a3c0b7bbd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdbi-drivers/default.nix
@@ -0,0 +1,64 @@
+{ lib, stdenv, fetchurl, libdbi
+# TODO: migrate away from overriding packages to null
+, libmysqlclient ? null
+, sqlite ? null
+, postgresql ? null
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libdbi-drivers";
+  version = "0.9.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libdbi-drivers/libdbi-drivers-${version}.tar.gz";
+    sha256 = "0m680h8cc4428xin4p733azysamzgzcmv4psjvraykrsaz6ymlj3";
+  };
+
+  buildInputs = [ libdbi sqlite postgresql ] ++ lib.optional (libmysqlclient != null) libmysqlclient;
+
+  postPatch = ''
+    sed -i '/SQLITE3_LIBS/ s/-lsqlite/-lsqlite3/' configure;
+  '';
+
+  configureFlags = [
+    "--sysconfdir=/etc"
+    "--localstatedir=/var"
+    "--disable-docs"
+    "--enable-libdbi"
+    "--with-dbi-incdir=${libdbi}/include"
+    "--with-dbi-libdir=${libdbi}/lib"
+  ] ++ lib.optionals (libmysqlclient != null) [
+    "--with-mysql"
+    "--with-mysql-incdir=${lib.getDev libmysqlclient}/include/mysql"
+    "--with-mysql-libdir=${libmysqlclient}/lib/mysql"
+  ] ++ lib.optionals (sqlite != null) [
+    "--with-sqlite3"
+    "--with-sqlite3-incdir=${sqlite.dev}/include/sqlite"
+    "--with-sqlite3-libdir=${sqlite.out}/lib/sqlite"
+  ] ++ lib.optionals (postgresql != null) [
+    "--with-pgsql"
+    "--with-pgsql_incdir=${postgresql}/include"
+    "--with-pgsql_libdir=${postgresql.lib}/lib"
+  ];
+
+  installFlags = [ "DESTDIR=\${out}" ];
+
+  postInstall = ''
+    mv $out/$out/* $out
+    DIR=$out/$out
+    while rmdir $DIR 2>/dev/null; do
+      DIR="$(dirname "$DIR")"
+    done
+
+    # Remove the unneeded var/lib directories
+    rm -rf $out/var
+  '';
+
+  meta = with lib; {
+    homepage = "https://libdbi-drivers.sourceforge.net/";
+    description = "Database drivers for libdbi";
+    platforms = platforms.all;
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdbi/default.nix b/nixpkgs/pkgs/development/libraries/libdbi/default.nix
new file mode 100644
index 000000000000..f0cb74cb86d0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdbi/default.nix
@@ -0,0 +1,18 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libdbi";
+  version = "0.9.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libdbi/${pname}-${version}.tar.gz";
+    sha256 = "00s5ra7hdlq25iv23nwf4h1v3kmbiyzx0v9bhggjiii4lpf6ryys";
+  };
+
+  meta = with lib; {
+    homepage = "https://libdbi.sourceforge.net/";
+    description = "DB independent interface to DB";
+    license = licenses.lgpl21;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdbusmenu-qt/qt-5.5.nix b/nixpkgs/pkgs/development/libraries/libdbusmenu-qt/qt-5.5.nix
new file mode 100644
index 000000000000..7219bcbdeb5a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdbusmenu-qt/qt-5.5.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchgit, cmake, qtbase }:
+
+stdenv.mkDerivation rec {
+  pname = "libdbusmenu-qt";
+  version = "0.9.3+16";
+
+  src = fetchgit {
+    url = "https://git.launchpad.net/ubuntu/+source/libdbusmenu-qt";
+    rev = "import/${version}.04.20160218-1";
+    sha256 = "039yvklhbmfbcynrbqq9n5ywmj8bjfslnkzcnwpzyhnxdzb6yxlx";
+  };
+
+  buildInputs = [ qtbase ];
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [ "-DWITH_DOC=OFF" ];
+
+  dontWrapQtApps = true;
+
+  meta = with lib; {
+    homepage = "https://launchpad.net/libdbusmenu-qt";
+    description = "Provides a Qt implementation of the DBusMenu spec";
+    maintainers = [ maintainers.ttuegel ];
+    inherit (qtbase.meta) platforms;
+    license = licenses.lgpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdbusmenu/default.nix b/nixpkgs/pkgs/development/libraries/libdbusmenu/default.nix
new file mode 100644
index 000000000000..5143372d2b0d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdbusmenu/default.nix
@@ -0,0 +1,77 @@
+{ stdenv, fetchurl, lib, file
+, pkg-config, intltool
+, glib, dbus-glib, json-glib
+, gobject-introspection, vala
+, gtkVersion ? null, gtk2, gtk3
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libdbusmenu-${if gtkVersion == null then "glib" else "gtk${gtkVersion}"}";
+  version = "16.04.0";
+
+  src = let
+    inherit (finalAttrs) version;
+  in fetchurl {
+    url = "https://launchpad.net/dbusmenu/${lib.versions.majorMinor version}/${version}/+download/libdbusmenu-${version}.tar.gz";
+    sha256 = "12l7z8dhl917iy9h02sxmpclnhkdjryn08r8i4sr8l3lrlm4mk5r";
+  };
+
+  nativeBuildInputs = [ vala pkg-config intltool gobject-introspection ];
+
+  buildInputs = [
+    glib dbus-glib json-glib
+  ] ++ lib.optional (gtkVersion != null)
+    {
+      "2" = gtk2;
+      "3" = gtk3;
+    }.${gtkVersion} or (throw "unknown GTK version ${gtkVersion}");
+
+  patches = [
+    ./requires-glib.patch
+  ];
+
+  postPatch = ''
+    for f in {configure,ltmain.sh,m4/libtool.m4}; do
+      substituteInPlace $f \
+        --replace /usr/bin/file ${file}/bin/file
+    done
+  '';
+
+  # https://projects.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/libdbusmenu
+  preConfigure = ''
+    export HAVE_VALGRIND_TRUE="#"
+    export HAVE_VALGRIND_FALSE=""
+  '';
+
+  configureFlags = [
+    "CFLAGS=-Wno-error"
+    "--sysconfdir=/etc"
+    "--localstatedir=/var"
+    # TODO use `lib.withFeatureAs`
+    (if gtkVersion == null then "--disable-gtk" else "--with-gtk=${gtkVersion}")
+    "--disable-scrollkeeper"
+  ] ++ lib.optional (gtkVersion != "2") "--disable-dumper";
+
+  doCheck = false; # generates shebangs in check phase, too lazy to fix
+
+  installFlags = [
+    "sysconfdir=${placeholder "out"}/etc"
+    "localstatedir=\${TMPDIR}"
+    "typelibdir=${placeholder "out"}/lib/girepository-1.0"
+  ];
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    description = "Library for passing menu structures across DBus";
+    homepage = "https://launchpad.net/dbusmenu";
+    license = with licenses; [ gpl3 lgpl21 lgpl3 ];
+    pkgConfigModules = [
+      "dbusmenu-glib-0.4"
+      "dbusmenu-jsonloader-0.4"
+    ] ++ lib.optional (gtkVersion == "3") "dbusmenu-gtk${gtkVersion}-0.4";
+    platforms = platforms.linux;
+    maintainers = [ maintainers.msteen ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libdbusmenu/requires-glib.patch b/nixpkgs/pkgs/development/libraries/libdbusmenu/requires-glib.patch
new file mode 100644
index 000000000000..53cad2cf018f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdbusmenu/requires-glib.patch
@@ -0,0 +1,11 @@
+--- a/libdbusmenu-glib/dbusmenu-glib-0.4.pc.in
++++ b/libdbusmenu-glib/dbusmenu-glib-0.4.pc.in
+@@ -5,7 +5,7 @@
+ includedir=@includedir@
+
+ Cflags: -I${includedir}/libdbusmenu-glib-0.4
+-Requires:
++Requires: glib-2.0
+ Libs: -L${libdir} -ldbusmenu-glib
+
+ Name: libdbusmenu-glib
diff --git a/nixpkgs/pkgs/development/libraries/libdc1394/default.nix b/nixpkgs/pkgs/development/libraries/libdc1394/default.nix
new file mode 100644
index 000000000000..9ca5581b3bff
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdc1394/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchurl, libraw1394
+, libusb1, CoreServices }:
+
+stdenv.mkDerivation rec {
+  pname = "libdc1394";
+  version = "2.2.7";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libdc1394/${pname}-${version}.tar.gz";
+    sha256 = "sha256-U3zreN087ycaGD9KF2GR0c7PhfAlUg5r03WLDhnmYJ8=";
+  };
+
+  buildInputs = [ libusb1 ]
+    ++ lib.optional stdenv.isLinux libraw1394
+    ++ lib.optional stdenv.isDarwin CoreServices;
+
+  meta = with lib; {
+    description = "Capture and control API for IIDC compliant cameras";
+    homepage = "https://sourceforge.net/projects/libdc1394/";
+    license = licenses.lgpl21Plus;
+    maintainers = [ maintainers.viric ];
+    mainProgram = "dc1394_reset_bus";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libde265/default.nix b/nixpkgs/pkgs/development/libraries/libde265/default.nix
new file mode 100644
index 000000000000..6259fa5b4839
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libde265/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+
+, callPackage
+
+  # for passthru.tests
+, imagemagick
+, libheif
+, imlib2Full
+, gst_all_1
+}:
+
+stdenv.mkDerivation (finalAttrs: rec {
+  version = "1.0.15";
+  pname = "libde265";
+
+  src = fetchFromGitHub {
+    owner = "strukturag";
+    repo = "libde265";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-guiLM4RNe5O0qpeCoQUbs1Z7j0wp8iK9za2+6NIB8yY=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  enableParallelBuilding = true;
+
+  passthru.tests = {
+    inherit imagemagick libheif imlib2Full;
+    inherit (gst_all_1) gst-plugins-bad;
+
+    test-corpus-decode = callPackage ./test-corpus-decode.nix {
+      libde265 = finalAttrs.finalPackage;
+    };
+  };
+
+  meta = {
+    homepage = "https://github.com/strukturag/libde265";
+    description = "Open h.265 video codec implementation";
+    license = lib.licenses.lgpl3;
+    platforms = lib.platforms.unix;
+    maintainers = with lib.maintainers; [ gebner ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libde265/test-corpus-decode.nix b/nixpkgs/pkgs/development/libraries/libde265/test-corpus-decode.nix
new file mode 100644
index 000000000000..763c93e6a993
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libde265/test-corpus-decode.nix
@@ -0,0 +1,48 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, libde265
+}:
+
+stdenv.mkDerivation {
+  pname = "libde265-test-corpus-decode";
+  version = "unstable-2020-02-19";
+
+  src = fetchFromGitHub {
+    owner = "strukturag";
+    repo = "libde265-data";
+    rev = "bdfdfdbe682f514c5185c270c74eac42731a7fa8";
+    sha256 = "sha256-fOgu7vMoyH30Zzbkfm4a6JVDZtYLO/0R2syC2Wux+Z8=";
+  };
+
+  dontConfigure = true;
+  dontBuild = true;
+
+  doCheck = true;
+  nativeCheckInputs = [ libde265 ];
+  # based on invocations in https://github.com/strukturag/libde265/blob/0b1752abff97cb542941d317a0d18aa50cb199b1/scripts/ci-run.sh
+  checkPhase = ''
+    echo "Single-threaded:"
+    find . -name '*.bin' | while read f; do
+      echo "Decoding $f"
+      dec265 -q -c $f
+      dec265 -0 -q -c $f
+      dec265 -q --disable-deblocking --disable-sao $f
+    done
+    echo "Multi-threaded:"
+    find RandomAccess/ -name '*.bin' | while read f; do
+      echo "Decoding $f"
+      dec265 -t 4 -q -c $f
+      dec265 -t 4 -0 -q -c $f
+      dec265 -t 4 -q --disable-deblocking --disable-sao $f
+    done
+  '';
+  # a larger corpus of files can be found
+  # as an ubuntu package libde265-teststreams @
+  # https://launchpad.net/~strukturag/+archive/ubuntu/libde265/+packages
+  # but it is *much* larger
+
+  installPhase = ''
+    touch $out
+  '';
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdecor/default.nix b/nixpkgs/pkgs/development/libraries/libdecor/default.nix
new file mode 100644
index 000000000000..f81fdc68768a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdecor/default.nix
@@ -0,0 +1,59 @@
+{ stdenv
+, lib
+, fetchFromGitLab
+, pkg-config
+, meson
+, ninja
+, wayland
+, wayland-protocols
+, wayland-scanner
+, cairo
+, dbus
+, pango
+, gtk3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libdecor";
+  version = "0.2.2";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "libdecor";
+    repo = "libdecor";
+    rev = version;
+    hash = "sha256-mID19uHXFKJUZtQsSOXjRdz541YVjMxmSHVa+DlkPRc=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  strictDeps = true;
+
+  mesonFlags = [
+    (lib.mesonBool "demo" false)
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    wayland-scanner
+  ];
+
+  buildInputs = [
+    wayland
+    wayland-protocols
+    cairo
+    dbus
+    pango
+    gtk3
+  ];
+
+  meta = with lib; {
+    homepage = "https://gitlab.freedesktop.org/libdecor/libdecor";
+    description = "Client-side decorations library for Wayland clients";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ artturin ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdeflate/default.nix b/nixpkgs/pkgs/development/libraries/libdeflate/default.nix
new file mode 100644
index 000000000000..3bbf449d89aa
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdeflate/default.nix
@@ -0,0 +1,34 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fixDarwinDylibNames
+, pkgsStatic
+, cmake
+}:
+stdenv.mkDerivation rec {
+  pname = "libdeflate";
+  version = "1.19";
+
+  src = fetchFromGitHub {
+    owner = "ebiggers";
+    repo = "libdeflate";
+    rev = "v${version}";
+    sha256 = "sha256-HgZ2an1PCPhiLsd3ZA7tgZ1wVTOdHzDr8FHrqJhEbQw=";
+  };
+
+  cmakeFlags = lib.optionals stdenv.hostPlatform.isStatic [ "-DLIBDEFLATE_BUILD_SHARED_LIB=OFF" ];
+
+  nativeBuildInputs = [ cmake ]
+    ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
+
+  passthru.tests.static = pkgsStatic.libdeflate;
+
+  meta = with lib; {
+    description = "Fast DEFLATE/zlib/gzip compressor and decompressor";
+    license = licenses.mit;
+    homepage = "https://github.com/ebiggers/libdeflate";
+    changelog = "https://github.com/ebiggers/libdeflate/blob/v${version}/NEWS.md";
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ orivej kaction ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdeltachat/Cargo.lock b/nixpkgs/pkgs/development/libraries/libdeltachat/Cargo.lock
new file mode 100644
index 000000000000..551b2d30e951
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdeltachat/Cargo.lock
@@ -0,0 +1,5717 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "abao"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2daa0989489b05a455a9707adbbbc17443edf7bbc902ce499cd3b84148d68a40"
+dependencies = [
+ "arrayref",
+ "arrayvec",
+ "blake3",
+ "futures",
+ "tokio",
+]
+
+[[package]]
+name = "addr2line"
+version = "0.21.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb"
+dependencies = [
+ "gimli",
+]
+
+[[package]]
+name = "adler"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
+
+[[package]]
+name = "aes"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2"
+dependencies = [
+ "cfg-if",
+ "cipher",
+ "cpufeatures",
+]
+
+[[package]]
+name = "ahash"
+version = "0.8.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+ "version_check",
+ "zerocopy",
+]
+
+[[package]]
+name = "aho-corasick"
+version = "1.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "alloc-no-stdlib"
+version = "2.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3"
+
+[[package]]
+name = "alloc-stdlib"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece"
+dependencies = [
+ "alloc-no-stdlib",
+]
+
+[[package]]
+name = "allocator-api2"
+version = "0.2.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5"
+
+[[package]]
+name = "android-tzdata"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
+
+[[package]]
+name = "android_system_properties"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "anes"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299"
+
+[[package]]
+name = "ansi_term"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "anstyle"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87"
+
+[[package]]
+name = "anyhow"
+version = "1.0.75"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6"
+dependencies = [
+ "backtrace",
+]
+
+[[package]]
+name = "arrayref"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545"
+
+[[package]]
+name = "arrayvec"
+version = "0.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
+
+[[package]]
+name = "ascii_utils"
+version = "0.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "71938f30533e4d95a6d17aa530939da3842c2ab6f4f84b9dae68447e4129f74a"
+
+[[package]]
+name = "asn1-rs"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0"
+dependencies = [
+ "asn1-rs-derive",
+ "asn1-rs-impl",
+ "displaydoc",
+ "nom",
+ "num-traits",
+ "rusticata-macros",
+ "thiserror",
+ "time 0.3.30",
+]
+
+[[package]]
+name = "asn1-rs-derive"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+ "synstructure",
+]
+
+[[package]]
+name = "asn1-rs-impl"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "async-channel"
+version = "1.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35"
+dependencies = [
+ "concurrent-queue",
+ "event-listener 2.5.3",
+ "futures-core",
+]
+
+[[package]]
+name = "async-channel"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ca33f4bc4ed1babef42cad36cc1f51fa88be00420404e5b1e80ab1b18f7678c"
+dependencies = [
+ "concurrent-queue",
+ "event-listener 4.0.0",
+ "event-listener-strategy",
+ "futures-core",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "async-compression"
+version = "0.3.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "942c7cd7ae39e91bde4820d74132e9862e62c2f386c3aa90ccf55949f5bad63a"
+dependencies = [
+ "flate2",
+ "futures-core",
+ "memchr",
+ "pin-project-lite",
+ "tokio",
+]
+
+[[package]]
+name = "async-imap"
+version = "0.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d736a74edf6c327b53dd9c932eae834253470ac5f0c55770e7e133bcbf986362"
+dependencies = [
+ "async-channel 2.1.1",
+ "base64 0.21.5",
+ "bytes",
+ "chrono",
+ "futures",
+ "imap-proto",
+ "log",
+ "nom",
+ "once_cell",
+ "pin-utils",
+ "self_cell",
+ "stop-token",
+ "thiserror",
+ "tokio",
+]
+
+[[package]]
+name = "async-mutex"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e"
+dependencies = [
+ "event-listener 2.5.3",
+]
+
+[[package]]
+name = "async-native-tls"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9343dc5acf07e79ff82d0c37899f079db3534d99f189a1837c8e549c99405bec"
+dependencies = [
+ "native-tls",
+ "thiserror",
+ "tokio",
+ "url",
+]
+
+[[package]]
+name = "async-smtp"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8709c0d4432be428a88a06746689a9cb543e8e27ef7f61ca4d0455003a3d8c5b"
+dependencies = [
+ "anyhow",
+ "base64 0.13.1",
+ "futures",
+ "hostname",
+ "log",
+ "nom",
+ "pin-project",
+ "thiserror",
+ "tokio",
+]
+
+[[package]]
+name = "async-trait"
+version = "0.1.74"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.39",
+]
+
+[[package]]
+name = "async_zip"
+version = "0.0.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b2105142db9c6203b9dadc83b0553394589a6cb31b1449a3b46b42f47c3434d0"
+dependencies = [
+ "async-compression",
+ "crc32fast",
+ "log",
+ "pin-project",
+ "thiserror",
+ "tokio",
+]
+
+[[package]]
+name = "autocfg"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+
+[[package]]
+name = "axum"
+version = "0.6.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf"
+dependencies = [
+ "async-trait",
+ "axum-core",
+ "base64 0.21.5",
+ "bitflags 1.3.2",
+ "bytes",
+ "futures-util",
+ "http",
+ "http-body",
+ "hyper",
+ "itoa",
+ "matchit",
+ "memchr",
+ "mime",
+ "percent-encoding",
+ "pin-project-lite",
+ "rustversion",
+ "serde",
+ "serde_json",
+ "serde_path_to_error",
+ "serde_urlencoded",
+ "sha1",
+ "sync_wrapper",
+ "tokio",
+ "tokio-tungstenite",
+ "tower",
+ "tower-layer",
+ "tower-service",
+]
+
+[[package]]
+name = "axum-core"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c"
+dependencies = [
+ "async-trait",
+ "bytes",
+ "futures-util",
+ "http",
+ "http-body",
+ "mime",
+ "rustversion",
+ "tower-layer",
+ "tower-service",
+]
+
+[[package]]
+name = "backtrace"
+version = "0.3.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837"
+dependencies = [
+ "addr2line",
+ "cc",
+ "cfg-if",
+ "libc",
+ "miniz_oxide",
+ "object",
+ "rustc-demangle",
+]
+
+[[package]]
+name = "base16ct"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce"
+
+[[package]]
+name = "base16ct"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf"
+
+[[package]]
+name = "base64"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7"
+
+[[package]]
+name = "base64"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff"
+
+[[package]]
+name = "base64"
+version = "0.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
+
+[[package]]
+name = "base64"
+version = "0.21.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9"
+
+[[package]]
+name = "base64ct"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"
+
+[[package]]
+name = "bincode"
+version = "1.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "bitfield"
+version = "0.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2d7e60934ceec538daadb9d8432424ed043a904d8e0243f3c6446bce549a46ac"
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "bitflags"
+version = "2.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07"
+
+[[package]]
+name = "blake3"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87"
+dependencies = [
+ "arrayref",
+ "arrayvec",
+ "cc",
+ "cfg-if",
+ "constant_time_eq",
+]
+
+[[package]]
+name = "block-buffer"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "block-buffer"
+version = "0.10.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "block-padding"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "blowfish"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e412e2cd0f2b2d93e02543ceae7917b3c70331573df19ee046bcbc35e45e87d7"
+dependencies = [
+ "byteorder",
+ "cipher",
+]
+
+[[package]]
+name = "brotli"
+version = "3.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f"
+dependencies = [
+ "alloc-no-stdlib",
+ "alloc-stdlib",
+ "brotli-decompressor",
+]
+
+[[package]]
+name = "brotli-decompressor"
+version = "2.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f"
+dependencies = [
+ "alloc-no-stdlib",
+ "alloc-stdlib",
+]
+
+[[package]]
+name = "bstr"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "542f33a8835a0884b006a0c3df3dadd99c0c3f296ed26c2fdc8028e01ad6230c"
+dependencies = [
+ "memchr",
+ "serde",
+]
+
+[[package]]
+name = "buffer-redux"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d2886ea01509598caac116942abd33ab5a88fa32acdf7e4abfa0fc489ca520c9"
+dependencies = [
+ "memchr",
+ "safemem",
+]
+
+[[package]]
+name = "bumpalo"
+version = "3.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec"
+
+[[package]]
+name = "bytemuck"
+version = "1.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6"
+
+[[package]]
+name = "byteorder"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
+
+[[package]]
+name = "bytes"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223"
+
+[[package]]
+name = "camellia"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3264e2574e9ef2b53ce6f536dea83a69ac0bc600b762d1523ff83fe07230ce30"
+dependencies = [
+ "byteorder",
+ "cipher",
+]
+
+[[package]]
+name = "camino"
+version = "1.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "cargo-platform"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e34637b3140142bdf929fb439e8aa4ebad7651ebf7b1080b3930aa16ac1459ff"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "cargo_metadata"
+version = "0.14.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa"
+dependencies = [
+ "camino",
+ "cargo-platform",
+ "semver",
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "cast"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
+
+[[package]]
+name = "cast5"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26b07d673db1ccf000e90f54b819db9e75a8348d6eb056e9b8ab53231b7a9911"
+dependencies = [
+ "cipher",
+]
+
+[[package]]
+name = "cc"
+version = "1.0.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "cfb-mode"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "738b8d467867f80a71351933f70461f5b56f24d5c93e0cf216e59229c968d330"
+dependencies = [
+ "cipher",
+]
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "charset"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "18e9079d1a12a2cc2bffb5db039c43661836ead4082120d5844f02555aca2d46"
+dependencies = [
+ "base64 0.13.1",
+ "encoding_rs",
+]
+
+[[package]]
+name = "chrono"
+version = "0.4.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38"
+dependencies = [
+ "android-tzdata",
+ "iana-time-zone",
+ "js-sys",
+ "num-traits",
+ "wasm-bindgen",
+ "windows-targets",
+]
+
+[[package]]
+name = "ciborium"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "effd91f6c78e5a4ace8a5d3c0b6bfaec9e2baaef55f3efc00e45fb2e477ee926"
+dependencies = [
+ "ciborium-io",
+ "ciborium-ll",
+ "serde",
+]
+
+[[package]]
+name = "ciborium-io"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cdf919175532b369853f5d5e20b26b43112613fd6fe7aee757e35f7a44642656"
+
+[[package]]
+name = "ciborium-ll"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "defaa24ecc093c77630e6c15e17c51f5e187bf35ee514f4e2d67baaa96dae22b"
+dependencies = [
+ "ciborium-io",
+ "half",
+]
+
+[[package]]
+name = "cipher"
+version = "0.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
+dependencies = [
+ "crypto-common",
+ "inout",
+]
+
+[[package]]
+name = "clap"
+version = "4.4.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41fffed7514f420abec6d183b1d3acfd9099c79c3a10a06ade4f8203f1411272"
+dependencies = [
+ "clap_builder",
+]
+
+[[package]]
+name = "clap_builder"
+version = "4.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "63361bae7eef3771745f02d8d892bec2fee5f6e34af316ba556e7f97a7069ff1"
+dependencies = [
+ "anstyle",
+ "clap_lex",
+]
+
+[[package]]
+name = "clap_lex"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1"
+
+[[package]]
+name = "clipboard-win"
+version = "4.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362"
+dependencies = [
+ "error-code",
+ "str-buf",
+ "winapi",
+]
+
+[[package]]
+name = "cobs"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15"
+
+[[package]]
+name = "color_quant"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b"
+
+[[package]]
+name = "concurrent-queue"
+version = "2.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400"
+dependencies = [
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "const-oid"
+version = "0.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f"
+
+[[package]]
+name = "const_format"
+version = "0.2.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673"
+dependencies = [
+ "const_format_proc_macros",
+]
+
+[[package]]
+name = "const_format_proc_macros"
+version = "0.2.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-xid",
+]
+
+[[package]]
+name = "constant_time_eq"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2"
+
+[[package]]
+name = "convert_case"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
+
+[[package]]
+name = "convert_case"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fb4a24b1aaf0fd0ce8b45161144d6f42cd91677fd5940fd431183eb023b3a2b8"
+
+[[package]]
+name = "core-foundation"
+version = "0.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.8.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f"
+
+[[package]]
+name = "cpufeatures"
+version = "0.2.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "crc24"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fd121741cf3eb82c08dd3023eb55bf2665e5f60ec20f89760cf836ae4562e6a0"
+
+[[package]]
+name = "crc32fast"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "criterion"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f"
+dependencies = [
+ "anes",
+ "cast",
+ "ciborium",
+ "clap",
+ "criterion-plot",
+ "futures",
+ "is-terminal",
+ "itertools",
+ "num-traits",
+ "once_cell",
+ "oorandom",
+ "plotters",
+ "rayon",
+ "regex",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "tinytemplate",
+ "tokio",
+ "walkdir",
+]
+
+[[package]]
+name = "criterion-plot"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1"
+dependencies = [
+ "cast",
+ "itertools",
+]
+
+[[package]]
+name = "crossbeam-deque"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef"
+dependencies = [
+ "cfg-if",
+ "crossbeam-epoch",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-epoch"
+version = "0.9.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7"
+dependencies = [
+ "autocfg",
+ "cfg-if",
+ "crossbeam-utils",
+ "memoffset",
+ "scopeguard",
+]
+
+[[package]]
+name = "crossbeam-utils"
+version = "0.8.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "crypto-bigint"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef"
+dependencies = [
+ "generic-array",
+ "rand_core 0.6.4",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "crypto-bigint"
+version = "0.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76"
+dependencies = [
+ "generic-array",
+ "rand_core 0.6.4",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "crypto-common"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
+dependencies = [
+ "generic-array",
+ "typenum",
+]
+
+[[package]]
+name = "curve25519-dalek"
+version = "3.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61"
+dependencies = [
+ "byteorder",
+ "digest 0.9.0",
+ "rand_core 0.5.1",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "curve25519-dalek"
+version = "4.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "curve25519-dalek-derive",
+ "digest 0.10.7",
+ "fiat-crypto",
+ "platforms",
+ "rustc_version",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "curve25519-dalek-derive"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.39",
+]
+
+[[package]]
+name = "darling"
+version = "0.13.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c"
+dependencies = [
+ "darling_core 0.13.4",
+ "darling_macro 0.13.4",
+]
+
+[[package]]
+name = "darling"
+version = "0.14.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850"
+dependencies = [
+ "darling_core 0.14.4",
+ "darling_macro 0.14.4",
+]
+
+[[package]]
+name = "darling_core"
+version = "0.13.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610"
+dependencies = [
+ "fnv",
+ "ident_case",
+ "proc-macro2",
+ "quote",
+ "strsim",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "darling_core"
+version = "0.14.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0"
+dependencies = [
+ "fnv",
+ "ident_case",
+ "proc-macro2",
+ "quote",
+ "strsim",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "darling_macro"
+version = "0.13.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835"
+dependencies = [
+ "darling_core 0.13.4",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "darling_macro"
+version = "0.14.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e"
+dependencies = [
+ "darling_core 0.14.4",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "data-encoding"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5"
+
+[[package]]
+name = "default-net"
+version = "0.14.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a4898b43aed56499fad6b294d15b3e76a51df68079bf492e5daae38ca084e003"
+dependencies = [
+ "dlopen2",
+ "libc",
+ "memalloc",
+ "netlink-packet-core",
+ "netlink-packet-route",
+ "netlink-sys",
+ "once_cell",
+ "system-configuration",
+ "windows",
+]
+
+[[package]]
+name = "deltachat"
+version = "1.131.9"
+dependencies = [
+ "ansi_term",
+ "anyhow",
+ "async-channel 2.1.1",
+ "async-imap",
+ "async-native-tls",
+ "async-smtp",
+ "async_zip",
+ "backtrace",
+ "base64 0.21.5",
+ "brotli",
+ "chrono",
+ "criterion",
+ "deltachat_derive",
+ "email",
+ "encoded-words",
+ "escaper",
+ "fast-socks5",
+ "fd-lock",
+ "format-flowed",
+ "futures",
+ "futures-lite",
+ "hex",
+ "hickory-resolver",
+ "humansize",
+ "image",
+ "iroh",
+ "kamadak-exif",
+ "lettre_email",
+ "libc",
+ "log",
+ "mailparse",
+ "mime",
+ "num-derive",
+ "num-traits",
+ "num_cpus",
+ "once_cell",
+ "parking_lot",
+ "percent-encoding",
+ "pgp",
+ "pin-project",
+ "pretty_assertions",
+ "pretty_env_logger",
+ "proptest",
+ "qrcodegen",
+ "quick-xml",
+ "rand 0.8.5",
+ "ratelimit",
+ "regex",
+ "reqwest",
+ "rusqlite",
+ "rust-hsluv",
+ "sanitize-filename",
+ "serde",
+ "serde_json",
+ "sha-1",
+ "sha2 0.10.8",
+ "smallvec",
+ "strum",
+ "strum_macros",
+ "tagger",
+ "tempfile",
+ "testdir",
+ "textwrap",
+ "thiserror",
+ "tokio",
+ "tokio-io-timeout",
+ "tokio-stream",
+ "tokio-tar",
+ "tokio-util",
+ "toml",
+ "url",
+ "uuid",
+]
+
+[[package]]
+name = "deltachat-jsonrpc"
+version = "1.131.9"
+dependencies = [
+ "anyhow",
+ "async-channel 2.1.1",
+ "axum",
+ "base64 0.21.5",
+ "deltachat",
+ "env_logger",
+ "futures",
+ "log",
+ "num-traits",
+ "sanitize-filename",
+ "schemars",
+ "serde",
+ "serde_json",
+ "tempfile",
+ "tokio",
+ "typescript-type-def",
+ "walkdir",
+ "yerpc",
+]
+
+[[package]]
+name = "deltachat-repl"
+version = "1.131.9"
+dependencies = [
+ "ansi_term",
+ "anyhow",
+ "deltachat",
+ "dirs",
+ "log",
+ "pretty_env_logger",
+ "rusqlite",
+ "rustyline",
+ "tokio",
+]
+
+[[package]]
+name = "deltachat-rpc-server"
+version = "1.131.9"
+dependencies = [
+ "anyhow",
+ "deltachat",
+ "deltachat-jsonrpc",
+ "env_logger",
+ "futures-lite",
+ "log",
+ "serde",
+ "serde_json",
+ "tokio",
+ "tokio-util",
+ "yerpc",
+]
+
+[[package]]
+name = "deltachat_derive"
+version = "2.0.0"
+dependencies = [
+ "quote",
+ "syn 2.0.39",
+]
+
+[[package]]
+name = "deltachat_ffi"
+version = "1.131.9"
+dependencies = [
+ "anyhow",
+ "deltachat",
+ "deltachat-jsonrpc",
+ "human-panic",
+ "libc",
+ "num-traits",
+ "once_cell",
+ "rand 0.8.5",
+ "serde_json",
+ "thiserror",
+ "tokio",
+ "yerpc",
+]
+
+[[package]]
+name = "der"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de"
+dependencies = [
+ "const-oid",
+ "der_derive",
+ "pem-rfc7468 0.6.0",
+ "zeroize",
+]
+
+[[package]]
+name = "der"
+version = "0.7.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c"
+dependencies = [
+ "const-oid",
+ "pem-rfc7468 0.7.0",
+ "zeroize",
+]
+
+[[package]]
+name = "der-parser"
+version = "8.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e"
+dependencies = [
+ "asn1-rs",
+ "displaydoc",
+ "nom",
+ "num-bigint",
+ "num-traits",
+ "rusticata-macros",
+]
+
+[[package]]
+name = "der_derive"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ef71ddb5b3a1f53dee24817c8f70dfa1cb29e804c18d88c228d4bc9c86ee3b9"
+dependencies = [
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "deranged"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3"
+dependencies = [
+ "powerfmt",
+]
+
+[[package]]
+name = "derive_builder"
+version = "0.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8"
+dependencies = [
+ "derive_builder_macro",
+]
+
+[[package]]
+name = "derive_builder_core"
+version = "0.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f"
+dependencies = [
+ "darling 0.14.4",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "derive_builder_macro"
+version = "0.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e"
+dependencies = [
+ "derive_builder_core",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "derive_more"
+version = "0.99.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321"
+dependencies = [
+ "convert_case 0.4.0",
+ "proc-macro2",
+ "quote",
+ "rustc_version",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "des"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ffdd80ce8ce993de27e9f063a444a4d53ce8e8db4c1f00cc03af5ad5a9867a1e"
+dependencies = [
+ "cipher",
+]
+
+[[package]]
+name = "diff"
+version = "0.1.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8"
+
+[[package]]
+name = "digest"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "digest"
+version = "0.10.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
+dependencies = [
+ "block-buffer 0.10.4",
+ "const-oid",
+ "crypto-common",
+ "subtle",
+]
+
+[[package]]
+name = "dirs"
+version = "5.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225"
+dependencies = [
+ "dirs-sys",
+]
+
+[[package]]
+name = "dirs-next"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1"
+dependencies = [
+ "cfg-if",
+ "dirs-sys-next",
+]
+
+[[package]]
+name = "dirs-sys"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c"
+dependencies = [
+ "libc",
+ "option-ext",
+ "redox_users",
+ "windows-sys",
+]
+
+[[package]]
+name = "dirs-sys-next"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"
+dependencies = [
+ "libc",
+ "redox_users",
+ "winapi",
+]
+
+[[package]]
+name = "displaydoc"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.39",
+]
+
+[[package]]
+name = "dlopen2"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b121caccfc363e4d9a4589528f3bef7c71b83c6ed01c8dc68cbeeb7fd29ec698"
+dependencies = [
+ "dlopen2_derive",
+ "libc",
+ "once_cell",
+ "winapi",
+]
+
+[[package]]
+name = "dlopen2_derive"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3a09ac8bb8c16a282264c379dffba707b9c998afc7506009137f3c6136888078"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "dyn-clone"
+version = "1.0.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d"
+
+[[package]]
+name = "ecdsa"
+version = "0.14.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c"
+dependencies = [
+ "der 0.6.1",
+ "elliptic-curve 0.12.3",
+ "rfc6979 0.3.1",
+ "signature 1.6.4",
+]
+
+[[package]]
+name = "ecdsa"
+version = "0.16.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca"
+dependencies = [
+ "der 0.7.8",
+ "digest 0.10.7",
+ "elliptic-curve 0.13.8",
+ "rfc6979 0.4.0",
+ "signature 2.2.0",
+ "spki 0.7.2",
+]
+
+[[package]]
+name = "ed25519"
+version = "1.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7"
+dependencies = [
+ "serde",
+ "signature 1.6.4",
+]
+
+[[package]]
+name = "ed25519"
+version = "2.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53"
+dependencies = [
+ "pkcs8 0.10.2",
+ "signature 2.2.0",
+]
+
+[[package]]
+name = "ed25519-dalek"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d"
+dependencies = [
+ "curve25519-dalek 3.2.0",
+ "ed25519 1.5.3",
+ "rand 0.7.3",
+ "serde",
+ "serde_bytes",
+ "sha2 0.9.9",
+ "zeroize",
+]
+
+[[package]]
+name = "ed25519-dalek"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0"
+dependencies = [
+ "curve25519-dalek 4.1.1",
+ "ed25519 2.2.3",
+ "serde",
+ "sha2 0.10.8",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "educe"
+version = "0.4.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0f0042ff8246a363dbe77d2ceedb073339e85a804b9a47636c6e016a9a32c05f"
+dependencies = [
+ "enum-ordinalize",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "either"
+version = "1.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
+
+[[package]]
+name = "elliptic-curve"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3"
+dependencies = [
+ "base16ct 0.1.1",
+ "crypto-bigint 0.4.9",
+ "der 0.6.1",
+ "digest 0.10.7",
+ "ff 0.12.1",
+ "generic-array",
+ "group 0.12.1",
+ "rand_core 0.6.4",
+ "sec1 0.3.0",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "elliptic-curve"
+version = "0.13.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47"
+dependencies = [
+ "base16ct 0.2.0",
+ "crypto-bigint 0.5.5",
+ "digest 0.10.7",
+ "ff 0.13.0",
+ "generic-array",
+ "group 0.13.0",
+ "hkdf",
+ "pem-rfc7468 0.7.0",
+ "pkcs8 0.10.2",
+ "rand_core 0.6.4",
+ "sec1 0.7.3",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "email"
+version = "0.0.21"
+source = "git+https://github.com/deltachat/rust-email?branch=master#37778c89d5eb5a94b7983f3f37ff67769bde3cf9"
+dependencies = [
+ "base64 0.11.0",
+ "chrono",
+ "encoded-words",
+ "encoding",
+ "lazy_static",
+ "rand 0.7.3",
+ "time 0.1.45",
+ "version_check",
+]
+
+[[package]]
+name = "embedded-io"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced"
+
+[[package]]
+name = "encoded-words"
+version = "0.2.0"
+source = "git+https://github.com/async-email/encoded-words?branch=master#d55366b36f96e383f39c432aedce42ee8b43f796"
+dependencies = [
+ "base64 0.12.3",
+ "charset",
+ "encoding_rs",
+ "hex",
+ "lazy_static",
+ "regex",
+ "thiserror",
+]
+
+[[package]]
+name = "encoding"
+version = "0.2.33"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec"
+dependencies = [
+ "encoding-index-japanese",
+ "encoding-index-korean",
+ "encoding-index-simpchinese",
+ "encoding-index-singlebyte",
+ "encoding-index-tradchinese",
+]
+
+[[package]]
+name = "encoding-index-japanese"
+version = "1.20141219.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91"
+dependencies = [
+ "encoding_index_tests",
+]
+
+[[package]]
+name = "encoding-index-korean"
+version = "1.20141219.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4dc33fb8e6bcba213fe2f14275f0963fd16f0a02c878e3095ecfdf5bee529d81"
+dependencies = [
+ "encoding_index_tests",
+]
+
+[[package]]
+name = "encoding-index-simpchinese"
+version = "1.20141219.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d87a7194909b9118fc707194baa434a4e3b0fb6a5a757c73c3adb07aa25031f7"
+dependencies = [
+ "encoding_index_tests",
+]
+
+[[package]]
+name = "encoding-index-singlebyte"
+version = "1.20141219.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a"
+dependencies = [
+ "encoding_index_tests",
+]
+
+[[package]]
+name = "encoding-index-tradchinese"
+version = "1.20141219.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18"
+dependencies = [
+ "encoding_index_tests",
+]
+
+[[package]]
+name = "encoding_index_tests"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569"
+
+[[package]]
+name = "encoding_rs"
+version = "0.8.33"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "endian-type"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d"
+
+[[package]]
+name = "entities"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b5320ae4c3782150d900b79807611a59a99fc9a1d61d686faafc24b93fc8d7ca"
+
+[[package]]
+name = "enum-as-inner"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a"
+dependencies = [
+ "heck",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.39",
+]
+
+[[package]]
+name = "enum-ordinalize"
+version = "3.1.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1bf1fa3f06bbff1ea5b1a9c7b14aa992a39657db60a2759457328d7e058f49ee"
+dependencies = [
+ "num-bigint",
+ "num-traits",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.39",
+]
+
+[[package]]
+name = "env_logger"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece"
+dependencies = [
+ "humantime",
+ "is-terminal",
+ "log",
+ "regex",
+ "termcolor",
+]
+
+[[package]]
+name = "equivalent"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
+
+[[package]]
+name = "errno"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8"
+dependencies = [
+ "libc",
+ "windows-sys",
+]
+
+[[package]]
+name = "error-code"
+version = "2.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21"
+dependencies = [
+ "libc",
+ "str-buf",
+]
+
+[[package]]
+name = "escaper"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a53eb97b7349ba1bdb31839eceafe9aaae8f1d8d944dc589b67fb0b26e1c1666"
+dependencies = [
+ "entities",
+]
+
+[[package]]
+name = "event-listener"
+version = "2.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0"
+
+[[package]]
+name = "event-listener"
+version = "4.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "770d968249b5d99410d61f5bf89057f3199a077a04d087092f58e7d10692baae"
+dependencies = [
+ "concurrent-queue",
+ "parking",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "event-listener-strategy"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3"
+dependencies = [
+ "event-listener 4.0.0",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "fallible-iterator"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649"
+
+[[package]]
+name = "fallible-streaming-iterator"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a"
+
+[[package]]
+name = "fast-socks5"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "961ce1761191c157145a8c9f0c3ceabecd3a729d65c9a8d443674eaee3420f7e"
+dependencies = [
+ "anyhow",
+ "log",
+ "thiserror",
+ "tokio",
+ "tokio-stream",
+]
+
+[[package]]
+name = "fast_chemail"
+version = "0.9.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "495a39d30d624c2caabe6312bfead73e7717692b44e0b32df168c275a2e8e9e4"
+dependencies = [
+ "ascii_utils",
+]
+
+[[package]]
+name = "fastrand"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5"
+
+[[package]]
+name = "fd-lock"
+version = "3.0.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef033ed5e9bad94e55838ca0ca906db0e043f517adda0c8b79c7a8c66c93c1b5"
+dependencies = [
+ "cfg-if",
+ "rustix",
+ "windows-sys",
+]
+
+[[package]]
+name = "fdeflate"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "64d6dafc854908ff5da46ff3f8f473c6984119a2876a383a860246dd7841a868"
+dependencies = [
+ "simd-adler32",
+]
+
+[[package]]
+name = "ff"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160"
+dependencies = [
+ "rand_core 0.6.4",
+ "subtle",
+]
+
+[[package]]
+name = "ff"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449"
+dependencies = [
+ "rand_core 0.6.4",
+ "subtle",
+]
+
+[[package]]
+name = "fiat-crypto"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7"
+
+[[package]]
+name = "filetime"
+version = "0.2.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "redox_syscall 0.3.5",
+ "windows-sys",
+]
+
+[[package]]
+name = "flate2"
+version = "1.0.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e"
+dependencies = [
+ "crc32fast",
+ "miniz_oxide",
+]
+
+[[package]]
+name = "flume"
+version = "0.10.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577"
+dependencies = [
+ "futures-core",
+ "futures-sink",
+ "nanorand",
+ "pin-project",
+ "spin 0.9.8",
+]
+
+[[package]]
+name = "fnv"
+version = "1.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
+
+[[package]]
+name = "foreign-types"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
+dependencies = [
+ "foreign-types-shared",
+]
+
+[[package]]
+name = "foreign-types-shared"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
+
+[[package]]
+name = "form_urlencoded"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652"
+dependencies = [
+ "percent-encoding",
+]
+
+[[package]]
+name = "format-flowed"
+version = "1.0.0"
+
+[[package]]
+name = "futures"
+version = "0.3.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-executor",
+ "futures-io",
+ "futures-sink",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-channel"
+version = "0.3.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb"
+dependencies = [
+ "futures-core",
+ "futures-sink",
+]
+
+[[package]]
+name = "futures-core"
+version = "0.3.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c"
+
+[[package]]
+name = "futures-executor"
+version = "0.3.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc"
+dependencies = [
+ "futures-core",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-io"
+version = "0.3.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa"
+
+[[package]]
+name = "futures-lite"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3831c2651acb5177cbd83943f3d9c8912c5ad03c76afcc0e9511ba568ec5ebb"
+dependencies = [
+ "fastrand",
+ "futures-core",
+ "futures-io",
+ "memchr",
+ "parking",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "futures-macro"
+version = "0.3.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.39",
+]
+
+[[package]]
+name = "futures-sink"
+version = "0.3.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817"
+
+[[package]]
+name = "futures-task"
+version = "0.3.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2"
+
+[[package]]
+name = "futures-util"
+version = "0.3.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-io",
+ "futures-macro",
+ "futures-sink",
+ "futures-task",
+ "memchr",
+ "pin-project-lite",
+ "pin-utils",
+ "slab",
+]
+
+[[package]]
+name = "generic-array"
+version = "0.14.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
+dependencies = [
+ "typenum",
+ "version_check",
+ "zeroize",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.1.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "wasi 0.9.0+wasi-snapshot-preview1",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.2.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "libc",
+ "wasi 0.11.0+wasi-snapshot-preview1",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "gif"
+version = "0.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045"
+dependencies = [
+ "color_quant",
+ "weezl",
+]
+
+[[package]]
+name = "gimli"
+version = "0.28.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
+
+[[package]]
+name = "group"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7"
+dependencies = [
+ "ff 0.12.1",
+ "rand_core 0.6.4",
+ "subtle",
+]
+
+[[package]]
+name = "group"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63"
+dependencies = [
+ "ff 0.13.0",
+ "rand_core 0.6.4",
+ "subtle",
+]
+
+[[package]]
+name = "h2"
+version = "0.3.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178"
+dependencies = [
+ "bytes",
+ "fnv",
+ "futures-core",
+ "futures-sink",
+ "futures-util",
+ "http",
+ "indexmap",
+ "slab",
+ "tokio",
+ "tokio-util",
+ "tracing",
+]
+
+[[package]]
+name = "half"
+version = "1.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7"
+
+[[package]]
+name = "hashbrown"
+version = "0.14.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
+dependencies = [
+ "ahash",
+ "allocator-api2",
+]
+
+[[package]]
+name = "hashlink"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7"
+dependencies = [
+ "hashbrown",
+]
+
+[[package]]
+name = "heck"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
+
+[[package]]
+name = "hermit-abi"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7"
+
+[[package]]
+name = "hex"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
+
+[[package]]
+name = "hickory-proto"
+version = "0.24.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "091a6fbccf4860009355e3efc52ff4acf37a63489aad7435372d44ceeb6fbbcf"
+dependencies = [
+ "async-trait",
+ "cfg-if",
+ "data-encoding",
+ "enum-as-inner",
+ "futures-channel",
+ "futures-io",
+ "futures-util",
+ "idna",
+ "ipnet",
+ "once_cell",
+ "rand 0.8.5",
+ "thiserror",
+ "tinyvec",
+ "tokio",
+ "tracing",
+ "url",
+]
+
+[[package]]
+name = "hickory-resolver"
+version = "0.24.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "35b8f021164e6a984c9030023544c57789c51760065cd510572fedcfb04164e8"
+dependencies = [
+ "cfg-if",
+ "futures-util",
+ "hickory-proto",
+ "ipconfig",
+ "lru-cache",
+ "once_cell",
+ "parking_lot",
+ "rand 0.8.5",
+ "resolv-conf",
+ "smallvec",
+ "thiserror",
+ "tokio",
+ "tracing",
+]
+
+[[package]]
+name = "hkdf"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437"
+dependencies = [
+ "hmac",
+]
+
+[[package]]
+name = "hmac"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
+dependencies = [
+ "digest 0.10.7",
+]
+
+[[package]]
+name = "home"
+version = "0.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb"
+dependencies = [
+ "windows-sys",
+]
+
+[[package]]
+name = "hostname"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867"
+dependencies = [
+ "libc",
+ "match_cfg",
+ "winapi",
+]
+
+[[package]]
+name = "http"
+version = "0.2.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb"
+dependencies = [
+ "bytes",
+ "fnv",
+ "itoa",
+]
+
+[[package]]
+name = "http-body"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1"
+dependencies = [
+ "bytes",
+ "http",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "httparse"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904"
+
+[[package]]
+name = "httpdate"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
+
+[[package]]
+name = "human-panic"
+version = "1.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a79a67745be0cb8dd2771f03b24c2f25df98d5471fe7a595d668cfa2e6f843d"
+dependencies = [
+ "backtrace",
+ "os_info",
+ "serde",
+ "serde_derive",
+ "toml",
+ "uuid",
+]
+
+[[package]]
+name = "humansize"
+version = "2.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6cb51c9a029ddc91b07a787f1d86b53ccfa49b0e86688c946ebe8d3555685dd7"
+dependencies = [
+ "libm",
+]
+
+[[package]]
+name = "humantime"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
+
+[[package]]
+name = "hyper"
+version = "0.14.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468"
+dependencies = [
+ "bytes",
+ "futures-channel",
+ "futures-core",
+ "futures-util",
+ "h2",
+ "http",
+ "http-body",
+ "httparse",
+ "httpdate",
+ "itoa",
+ "pin-project-lite",
+ "socket2 0.4.10",
+ "tokio",
+ "tower-service",
+ "tracing",
+ "want",
+]
+
+[[package]]
+name = "hyper-tls"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
+dependencies = [
+ "bytes",
+ "hyper",
+ "native-tls",
+ "tokio",
+ "tokio-native-tls",
+]
+
+[[package]]
+name = "iana-time-zone"
+version = "0.1.58"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20"
+dependencies = [
+ "android_system_properties",
+ "core-foundation-sys",
+ "iana-time-zone-haiku",
+ "js-sys",
+ "wasm-bindgen",
+ "windows-core",
+]
+
+[[package]]
+name = "iana-time-zone-haiku"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "idea"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "075557004419d7f2031b8bb7f44bb43e55a83ca7b63076a8fb8fe75753836477"
+dependencies = [
+ "cipher",
+]
+
+[[package]]
+name = "ident_case"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
+
+[[package]]
+name = "idna"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c"
+dependencies = [
+ "unicode-bidi",
+ "unicode-normalization",
+]
+
+[[package]]
+name = "image"
+version = "0.24.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711"
+dependencies = [
+ "bytemuck",
+ "byteorder",
+ "color_quant",
+ "gif",
+ "jpeg-decoder",
+ "num-rational",
+ "num-traits",
+ "png",
+]
+
+[[package]]
+name = "imap-proto"
+version = "0.16.3"
+source = "git+https://github.com/djc/tokio-imap.git?rev=01ff256a7e42a9f7d2732706f8b71a16ce93427e#01ff256a7e42a9f7d2732706f8b71a16ce93427e"
+dependencies = [
+ "nom",
+]
+
+[[package]]
+name = "indexmap"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f"
+dependencies = [
+ "equivalent",
+ "hashbrown",
+]
+
+[[package]]
+name = "inout"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "ipconfig"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f"
+dependencies = [
+ "socket2 0.5.5",
+ "widestring",
+ "windows-sys",
+ "winreg",
+]
+
+[[package]]
+name = "ipnet"
+version = "2.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3"
+
+[[package]]
+name = "iroh"
+version = "0.4.2"
+source = "git+https://github.com/n0-computer/iroh?branch=maint-0.4#9881b7886235035a1124e4371f7a4cd59379e51b"
+dependencies = [
+ "abao",
+ "anyhow",
+ "base64 0.21.5",
+ "blake3",
+ "bytes",
+ "default-net",
+ "der 0.6.1",
+ "derive_more",
+ "dirs-next",
+ "ed25519-dalek 1.0.1",
+ "futures",
+ "hex",
+ "num_cpus",
+ "portable-atomic",
+ "postcard",
+ "quic-rpc",
+ "quinn",
+ "rand 0.7.3",
+ "rcgen",
+ "ring 0.16.20",
+ "rustls",
+ "rustls-webpki",
+ "serde",
+ "serde-error",
+ "ssh-key",
+ "tempfile",
+ "thiserror",
+ "tokio",
+ "tokio-stream",
+ "tokio-util",
+ "tracing",
+ "tracing-futures",
+ "tracing-subscriber",
+ "walkdir",
+ "x509-parser",
+ "zeroize",
+]
+
+[[package]]
+name = "is-terminal"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b"
+dependencies = [
+ "hermit-abi",
+ "rustix",
+ "windows-sys",
+]
+
+[[package]]
+name = "itertools"
+version = "0.10.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
+dependencies = [
+ "either",
+]
+
+[[package]]
+name = "itoa"
+version = "1.0.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38"
+
+[[package]]
+name = "jpeg-decoder"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e"
+
+[[package]]
+name = "js-sys"
+version = "0.3.65"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8"
+dependencies = [
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "kamadak-exif"
+version = "0.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef4fc70d0ab7e5b6bafa30216a6b48705ea964cdfc29c050f2412295eba58077"
+dependencies = [
+ "mutate_once",
+]
+
+[[package]]
+name = "keccak"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940"
+dependencies = [
+ "cpufeatures",
+]
+
+[[package]]
+name = "lazy_static"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+dependencies = [
+ "spin 0.5.2",
+]
+
+[[package]]
+name = "lettre"
+version = "0.9.2"
+source = "git+https://github.com/deltachat/lettre?branch=master#2ffdb5347f1255b4aed51cf87cda1f8207160f36"
+dependencies = [
+ "fast_chemail",
+ "log",
+]
+
+[[package]]
+name = "lettre_email"
+version = "0.9.2"
+source = "git+https://github.com/deltachat/lettre?branch=master#2ffdb5347f1255b4aed51cf87cda1f8207160f36"
+dependencies = [
+ "base64 0.11.0",
+ "email",
+ "lazy_static",
+ "lettre",
+ "mime",
+ "regex",
+ "time 0.1.45",
+ "uuid",
+]
+
+[[package]]
+name = "libc"
+version = "0.2.150"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c"
+
+[[package]]
+name = "libm"
+version = "0.2.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058"
+
+[[package]]
+name = "libredox"
+version = "0.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8"
+dependencies = [
+ "bitflags 2.4.1",
+ "libc",
+ "redox_syscall 0.4.1",
+]
+
+[[package]]
+name = "libsqlite3-sys"
+version = "0.27.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716"
+dependencies = [
+ "cc",
+ "openssl-sys",
+ "pkg-config",
+ "vcpkg",
+]
+
+[[package]]
+name = "linked-hash-map"
+version = "0.5.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
+
+[[package]]
+name = "linux-raw-sys"
+version = "0.4.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829"
+
+[[package]]
+name = "lock_api"
+version = "0.4.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45"
+dependencies = [
+ "autocfg",
+ "scopeguard",
+]
+
+[[package]]
+name = "log"
+version = "0.4.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
+
+[[package]]
+name = "lru-cache"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c"
+dependencies = [
+ "linked-hash-map",
+]
+
+[[package]]
+name = "mailparse"
+version = "0.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6b56570f5f8c0047260d1c8b5b331f62eb9c660b9dd4071a8c46f8c7d3f280aa"
+dependencies = [
+ "charset",
+ "data-encoding",
+ "quoted_printable",
+]
+
+[[package]]
+name = "match_cfg"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4"
+
+[[package]]
+name = "matchers"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"
+dependencies = [
+ "regex-automata 0.1.10",
+]
+
+[[package]]
+name = "matchit"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94"
+
+[[package]]
+name = "md-5"
+version = "0.10.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf"
+dependencies = [
+ "cfg-if",
+ "digest 0.10.7",
+]
+
+[[package]]
+name = "memalloc"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df39d232f5c40b0891c10216992c2f250c054105cb1e56f0fc9032db6203ecc1"
+
+[[package]]
+name = "memchr"
+version = "2.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167"
+
+[[package]]
+name = "memoffset"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "mime"
+version = "0.3.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
+
+[[package]]
+name = "minimal-lexical"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
+
+[[package]]
+name = "miniz_oxide"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7"
+dependencies = [
+ "adler",
+ "simd-adler32",
+]
+
+[[package]]
+name = "mio"
+version = "0.8.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0"
+dependencies = [
+ "libc",
+ "wasi 0.11.0+wasi-snapshot-preview1",
+ "windows-sys",
+]
+
+[[package]]
+name = "mutate_once"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "16cf681a23b4d0a43fc35024c176437f9dcd818db34e0f42ab456a0ee5ad497b"
+
+[[package]]
+name = "nanorand"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3"
+dependencies = [
+ "getrandom 0.2.11",
+]
+
+[[package]]
+name = "native-tls"
+version = "0.2.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e"
+dependencies = [
+ "lazy_static",
+ "libc",
+ "log",
+ "openssl",
+ "openssl-probe",
+ "openssl-sys",
+ "schannel",
+ "security-framework",
+ "security-framework-sys",
+ "tempfile",
+]
+
+[[package]]
+name = "netlink-packet-core"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7e5cf0b54effda4b91615c40ff0fd12d0d4c9a6e0f5116874f03941792ff535a"
+dependencies = [
+ "anyhow",
+ "byteorder",
+ "libc",
+ "netlink-packet-utils",
+]
+
+[[package]]
+name = "netlink-packet-route"
+version = "0.15.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ea993e32c77d87f01236c38f572ecb6c311d592e56a06262a007fd2a6e31253c"
+dependencies = [
+ "anyhow",
+ "bitflags 1.3.2",
+ "byteorder",
+ "libc",
+ "netlink-packet-core",
+ "netlink-packet-utils",
+]
+
+[[package]]
+name = "netlink-packet-utils"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ede8a08c71ad5a95cdd0e4e52facd37190977039a4704eb82a283f713747d34"
+dependencies = [
+ "anyhow",
+ "byteorder",
+ "paste",
+ "thiserror",
+]
+
+[[package]]
+name = "netlink-sys"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411"
+dependencies = [
+ "bytes",
+ "libc",
+ "log",
+]
+
+[[package]]
+name = "nibble_vec"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43"
+dependencies = [
+ "smallvec",
+]
+
+[[package]]
+name = "nix"
+version = "0.26.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b"
+dependencies = [
+ "bitflags 1.3.2",
+ "cfg-if",
+ "libc",
+]
+
+[[package]]
+name = "nom"
+version = "7.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
+dependencies = [
+ "memchr",
+ "minimal-lexical",
+]
+
+[[package]]
+name = "ntapi"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "nu-ansi-term"
+version = "0.46.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"
+dependencies = [
+ "overload",
+ "winapi",
+]
+
+[[package]]
+name = "num-bigint"
+version = "0.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0"
+dependencies = [
+ "autocfg",
+ "num-integer",
+ "num-traits",
+]
+
+[[package]]
+name = "num-bigint-dig"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151"
+dependencies = [
+ "byteorder",
+ "lazy_static",
+ "libm",
+ "num-integer",
+ "num-iter",
+ "num-traits",
+ "rand 0.8.5",
+ "serde",
+ "smallvec",
+ "zeroize",
+]
+
+[[package]]
+name = "num-derive"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cfb77679af88f8b125209d354a202862602672222e7f2313fdd6dc349bad4712"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.39",
+]
+
+[[package]]
+name = "num-integer"
+version = "0.1.45"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
+dependencies = [
+ "autocfg",
+ "num-traits",
+]
+
+[[package]]
+name = "num-iter"
+version = "0.1.43"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252"
+dependencies = [
+ "autocfg",
+ "num-integer",
+ "num-traits",
+]
+
+[[package]]
+name = "num-rational"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0"
+dependencies = [
+ "autocfg",
+ "num-integer",
+ "num-traits",
+]
+
+[[package]]
+name = "num-traits"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c"
+dependencies = [
+ "autocfg",
+ "libm",
+]
+
+[[package]]
+name = "num_cpus"
+version = "1.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
+dependencies = [
+ "hermit-abi",
+ "libc",
+]
+
+[[package]]
+name = "object"
+version = "0.32.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "oid-registry"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff"
+dependencies = [
+ "asn1-rs",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
+
+[[package]]
+name = "oorandom"
+version = "11.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575"
+
+[[package]]
+name = "opaque-debug"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
+
+[[package]]
+name = "openssl"
+version = "0.10.60"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "79a4c6c3a2b158f7f8f2a2fc5a969fa3a068df6fc9dbb4a43845436e3af7c800"
+dependencies = [
+ "bitflags 2.4.1",
+ "cfg-if",
+ "foreign-types",
+ "libc",
+ "once_cell",
+ "openssl-macros",
+ "openssl-sys",
+]
+
+[[package]]
+name = "openssl-macros"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.39",
+]
+
+[[package]]
+name = "openssl-probe"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
+
+[[package]]
+name = "openssl-src"
+version = "300.1.6+3.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "439fac53e092cd7442a3660c85dde4643ab3b5bd39040912388dcdabf6b88085"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "openssl-sys"
+version = "0.9.96"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3812c071ba60da8b5677cc12bcb1d42989a65553772897a7e0355545a819838f"
+dependencies = [
+ "cc",
+ "libc",
+ "openssl-src",
+ "pkg-config",
+ "vcpkg",
+]
+
+[[package]]
+name = "option-ext"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
+
+[[package]]
+name = "os_info"
+version = "3.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "006e42d5b888366f1880eda20371fedde764ed2213dc8496f49622fa0c99cd5e"
+dependencies = [
+ "log",
+ "serde",
+ "winapi",
+]
+
+[[package]]
+name = "overload"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
+
+[[package]]
+name = "p256"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594"
+dependencies = [
+ "ecdsa 0.14.8",
+ "elliptic-curve 0.12.3",
+ "sha2 0.10.8",
+]
+
+[[package]]
+name = "p256"
+version = "0.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b"
+dependencies = [
+ "ecdsa 0.16.9",
+ "elliptic-curve 0.13.8",
+ "primeorder",
+ "sha2 0.10.8",
+]
+
+[[package]]
+name = "p384"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dfc8c5bf642dde52bb9e87c0ecd8ca5a76faac2eeed98dedb7c717997e1080aa"
+dependencies = [
+ "ecdsa 0.14.8",
+ "elliptic-curve 0.12.3",
+ "sha2 0.10.8",
+]
+
+[[package]]
+name = "p384"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "70786f51bcc69f6a4c0360e063a4cac5419ef7c5cd5b3c99ad70f3be5ba79209"
+dependencies = [
+ "ecdsa 0.16.9",
+ "elliptic-curve 0.13.8",
+ "primeorder",
+ "sha2 0.10.8",
+]
+
+[[package]]
+name = "parking"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae"
+
+[[package]]
+name = "parking_lot"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
+dependencies = [
+ "lock_api",
+ "parking_lot_core",
+]
+
+[[package]]
+name = "parking_lot_core"
+version = "0.9.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "redox_syscall 0.4.1",
+ "smallvec",
+ "windows-targets",
+]
+
+[[package]]
+name = "paste"
+version = "1.0.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c"
+
+[[package]]
+name = "pem"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8"
+dependencies = [
+ "base64 0.13.1",
+]
+
+[[package]]
+name = "pem-rfc7468"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24d159833a9105500e0398934e205e0773f0b27529557134ecfc51c27646adac"
+dependencies = [
+ "base64ct",
+]
+
+[[package]]
+name = "pem-rfc7468"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412"
+dependencies = [
+ "base64ct",
+]
+
+[[package]]
+name = "percent-encoding"
+version = "2.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
+
+[[package]]
+name = "pgp"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "27e1f8e085bfa9b85763fe3ddaacbe90a09cd847b3833129153a6cb063bbe132"
+dependencies = [
+ "aes",
+ "base64 0.21.5",
+ "bitfield",
+ "block-padding",
+ "blowfish",
+ "bstr",
+ "buffer-redux",
+ "byteorder",
+ "camellia",
+ "cast5",
+ "cfb-mode",
+ "chrono",
+ "cipher",
+ "crc24",
+ "curve25519-dalek 4.1.1",
+ "derive_builder",
+ "des",
+ "digest 0.10.7",
+ "ed25519-dalek 2.1.0",
+ "elliptic-curve 0.13.8",
+ "flate2",
+ "generic-array",
+ "hex",
+ "idea",
+ "log",
+ "md-5",
+ "nom",
+ "num-bigint-dig",
+ "num-derive",
+ "num-traits",
+ "p256 0.13.2",
+ "p384 0.13.0",
+ "rand 0.8.5",
+ "ripemd",
+ "rsa 0.9.5",
+ "sha1",
+ "sha2 0.10.8",
+ "sha3",
+ "signature 2.2.0",
+ "smallvec",
+ "thiserror",
+ "twofish",
+ "x25519-dalek",
+ "zeroize",
+]
+
+[[package]]
+name = "pin-project"
+version = "1.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422"
+dependencies = [
+ "pin-project-internal",
+]
+
+[[package]]
+name = "pin-project-internal"
+version = "1.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.39",
+]
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58"
+
+[[package]]
+name = "pin-utils"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
+
+[[package]]
+name = "pkcs1"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eff33bdbdfc54cc98a2eca766ebdec3e1b8fb7387523d5c9c9a2891da856f719"
+dependencies = [
+ "der 0.6.1",
+ "pkcs8 0.9.0",
+ "spki 0.6.0",
+ "zeroize",
+]
+
+[[package]]
+name = "pkcs1"
+version = "0.7.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f"
+dependencies = [
+ "der 0.7.8",
+ "pkcs8 0.10.2",
+ "spki 0.7.2",
+]
+
+[[package]]
+name = "pkcs8"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba"
+dependencies = [
+ "der 0.6.1",
+ "spki 0.6.0",
+]
+
+[[package]]
+name = "pkcs8"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7"
+dependencies = [
+ "der 0.7.8",
+ "spki 0.7.2",
+]
+
+[[package]]
+name = "pkg-config"
+version = "0.3.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
+
+[[package]]
+name = "platforms"
+version = "3.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0"
+
+[[package]]
+name = "plotters"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45"
+dependencies = [
+ "num-traits",
+ "plotters-backend",
+ "plotters-svg",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "plotters-backend"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609"
+
+[[package]]
+name = "plotters-svg"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab"
+dependencies = [
+ "plotters-backend",
+]
+
+[[package]]
+name = "png"
+version = "0.17.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd75bf2d8dd3702b9707cdbc56a5b9ef42cec752eb8b3bafc01234558442aa64"
+dependencies = [
+ "bitflags 1.3.2",
+ "crc32fast",
+ "fdeflate",
+ "flate2",
+ "miniz_oxide",
+]
+
+[[package]]
+name = "portable-atomic"
+version = "1.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3bccab0e7fd7cc19f820a1c8c91720af652d0c88dc9664dd72aef2614f04af3b"
+
+[[package]]
+name = "postcard"
+version = "1.0.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a55c51ee6c0db07e68448e336cf8ea4131a620edefebf9893e759b2d793420f8"
+dependencies = [
+ "cobs",
+ "const_format",
+ "embedded-io",
+ "postcard-derive",
+ "serde",
+]
+
+[[package]]
+name = "postcard-derive"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fc4b01218787dd4420daf63875163a787a78294ad48a24e9f6fa8c6507759a79"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "powerfmt"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
+
+[[package]]
+name = "ppv-lite86"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
+
+[[package]]
+name = "pretty_assertions"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66"
+dependencies = [
+ "diff",
+ "yansi",
+]
+
+[[package]]
+name = "pretty_env_logger"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "865724d4dbe39d9f3dd3b52b88d859d66bcb2d6a0acfd5ea68a65fb66d4bdc1c"
+dependencies = [
+ "env_logger",
+ "log",
+]
+
+[[package]]
+name = "primeorder"
+version = "0.13.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6"
+dependencies = [
+ "elliptic-curve 0.13.8",
+]
+
+[[package]]
+name = "proc-macro-error"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
+dependencies = [
+ "proc-macro-error-attr",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+ "version_check",
+]
+
+[[package]]
+name = "proc-macro-error-attr"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "version_check",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "proptest"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf"
+dependencies = [
+ "bitflags 2.4.1",
+ "lazy_static",
+ "num-traits",
+ "rand 0.8.5",
+ "rand_chacha 0.3.1",
+ "rand_xorshift",
+ "regex-syntax 0.8.2",
+ "unarray",
+]
+
+[[package]]
+name = "qrcodegen"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4339fc7a1021c9c1621d87f5e3505f2805c8c105420ba2f2a4df86814590c142"
+
+[[package]]
+name = "quic-rpc"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6d60c2fc2390baad4b9d41ae9957ae88c3095496f88e252ef50722df8b5b78d7"
+dependencies = [
+ "bincode",
+ "educe",
+ "flume",
+ "futures",
+ "pin-project",
+ "quinn",
+ "serde",
+ "tokio",
+ "tokio-serde",
+ "tokio-util",
+ "tracing",
+]
+
+[[package]]
+name = "quick-error"
+version = "1.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
+
+[[package]]
+name = "quick-xml"
+version = "0.31.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "quinn"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8cc2c5017e4b43d5995dcea317bc46c1e09404c0a9664d2908f7f02dfe943d75"
+dependencies = [
+ "bytes",
+ "pin-project-lite",
+ "quinn-proto",
+ "quinn-udp",
+ "rustc-hash",
+ "rustls",
+ "thiserror",
+ "tokio",
+ "tracing",
+]
+
+[[package]]
+name = "quinn-proto"
+version = "0.10.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "141bf7dfde2fbc246bfd3fe12f2455aa24b0fbd9af535d8c86c7bd1381ff2b1a"
+dependencies = [
+ "bytes",
+ "rand 0.8.5",
+ "ring 0.16.20",
+ "rustc-hash",
+ "rustls",
+ "rustls-native-certs",
+ "slab",
+ "thiserror",
+ "tinyvec",
+ "tracing",
+]
+
+[[package]]
+name = "quinn-udp"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "055b4e778e8feb9f93c4e439f71dc2156ef13360b432b799e179a8c4cdf0b1d7"
+dependencies = [
+ "bytes",
+ "libc",
+ "socket2 0.5.5",
+ "tracing",
+ "windows-sys",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.33"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "quoted_printable"
+version = "0.4.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a3866219251662ec3b26fc217e3e05bf9c4f84325234dfb96bf0bf840889e49"
+
+[[package]]
+name = "radix_trie"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd"
+dependencies = [
+ "endian-type",
+ "nibble_vec",
+]
+
+[[package]]
+name = "rand"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
+dependencies = [
+ "getrandom 0.1.16",
+ "libc",
+ "rand_chacha 0.2.2",
+ "rand_core 0.5.1",
+ "rand_hc",
+]
+
+[[package]]
+name = "rand"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
+dependencies = [
+ "libc",
+ "rand_chacha 0.3.1",
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
+dependencies = [
+ "ppv-lite86",
+ "rand_core 0.5.1",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
+dependencies = [
+ "ppv-lite86",
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
+dependencies = [
+ "getrandom 0.1.16",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
+dependencies = [
+ "getrandom 0.2.11",
+]
+
+[[package]]
+name = "rand_hc"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
+dependencies = [
+ "rand_core 0.5.1",
+]
+
+[[package]]
+name = "rand_xorshift"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f"
+dependencies = [
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "ratelimit"
+version = "1.0.0"
+
+[[package]]
+name = "rayon"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1"
+dependencies = [
+ "either",
+ "rayon-core",
+]
+
+[[package]]
+name = "rayon-core"
+version = "1.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed"
+dependencies = [
+ "crossbeam-deque",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "rcgen"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b"
+dependencies = [
+ "pem",
+ "ring 0.16.20",
+ "time 0.3.30",
+ "yasna",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29"
+dependencies = [
+ "bitflags 1.3.2",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa"
+dependencies = [
+ "bitflags 1.3.2",
+]
+
+[[package]]
+name = "redox_users"
+version = "0.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4"
+dependencies = [
+ "getrandom 0.2.11",
+ "libredox",
+ "thiserror",
+]
+
+[[package]]
+name = "regex"
+version = "1.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-automata 0.4.3",
+ "regex-syntax 0.8.2",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
+dependencies = [
+ "regex-syntax 0.6.29",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax 0.8.2",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.6.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
+
+[[package]]
+name = "regex-syntax"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
+
+[[package]]
+name = "reqwest"
+version = "0.11.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b"
+dependencies = [
+ "base64 0.21.5",
+ "bytes",
+ "encoding_rs",
+ "futures-core",
+ "futures-util",
+ "h2",
+ "http",
+ "http-body",
+ "hyper",
+ "hyper-tls",
+ "ipnet",
+ "js-sys",
+ "log",
+ "mime",
+ "native-tls",
+ "once_cell",
+ "percent-encoding",
+ "pin-project-lite",
+ "serde",
+ "serde_json",
+ "serde_urlencoded",
+ "system-configuration",
+ "tokio",
+ "tokio-native-tls",
+ "tower-service",
+ "url",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+ "winreg",
+]
+
+[[package]]
+name = "resolv-conf"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00"
+dependencies = [
+ "hostname",
+ "quick-error",
+]
+
+[[package]]
+name = "rfc6979"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb"
+dependencies = [
+ "crypto-bigint 0.4.9",
+ "hmac",
+ "zeroize",
+]
+
+[[package]]
+name = "rfc6979"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2"
+dependencies = [
+ "hmac",
+ "subtle",
+]
+
+[[package]]
+name = "ring"
+version = "0.16.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc"
+dependencies = [
+ "cc",
+ "libc",
+ "once_cell",
+ "spin 0.5.2",
+ "untrusted 0.7.1",
+ "web-sys",
+ "winapi",
+]
+
+[[package]]
+name = "ring"
+version = "0.17.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b"
+dependencies = [
+ "cc",
+ "getrandom 0.2.11",
+ "libc",
+ "spin 0.9.8",
+ "untrusted 0.9.0",
+ "windows-sys",
+]
+
+[[package]]
+name = "ripemd"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f"
+dependencies = [
+ "digest 0.10.7",
+]
+
+[[package]]
+name = "rsa"
+version = "0.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "094052d5470cbcef561cb848a7209968c9f12dfa6d668f4bca048ac5de51099c"
+dependencies = [
+ "byteorder",
+ "digest 0.10.7",
+ "num-bigint-dig",
+ "num-integer",
+ "num-iter",
+ "num-traits",
+ "pkcs1 0.4.1",
+ "pkcs8 0.9.0",
+ "rand_core 0.6.4",
+ "signature 1.6.4",
+ "smallvec",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "rsa"
+version = "0.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af6c4b23d99685a1408194da11270ef8e9809aff951cc70ec9b17350b087e474"
+dependencies = [
+ "const-oid",
+ "digest 0.10.7",
+ "num-bigint-dig",
+ "num-integer",
+ "num-traits",
+ "pkcs1 0.7.5",
+ "pkcs8 0.10.2",
+ "rand_core 0.6.4",
+ "signature 2.2.0",
+ "spki 0.7.2",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "rusqlite"
+version = "0.30.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a78046161564f5e7cd9008aff3b2990b3850dc8e0349119b98e8f251e099f24d"
+dependencies = [
+ "bitflags 2.4.1",
+ "fallible-iterator",
+ "fallible-streaming-iterator",
+ "hashlink",
+ "libsqlite3-sys",
+ "smallvec",
+]
+
+[[package]]
+name = "rust-hsluv"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "efe2374f2385cdd8755a446f80b2a646de603c9d8539ca38734879b5c71e378b"
+
+[[package]]
+name = "rustc-demangle"
+version = "0.1.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
+
+[[package]]
+name = "rustc-hash"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
+
+[[package]]
+name = "rustc_version"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
+dependencies = [
+ "semver",
+]
+
+[[package]]
+name = "rusticata-macros"
+version = "4.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632"
+dependencies = [
+ "nom",
+]
+
+[[package]]
+name = "rustix"
+version = "0.38.25"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e"
+dependencies = [
+ "bitflags 2.4.1",
+ "errno",
+ "libc",
+ "linux-raw-sys",
+ "windows-sys",
+]
+
+[[package]]
+name = "rustls"
+version = "0.21.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9"
+dependencies = [
+ "ring 0.17.5",
+ "rustls-webpki",
+ "sct",
+]
+
+[[package]]
+name = "rustls-native-certs"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00"
+dependencies = [
+ "openssl-probe",
+ "rustls-pemfile",
+ "schannel",
+ "security-framework",
+]
+
+[[package]]
+name = "rustls-pemfile"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c"
+dependencies = [
+ "base64 0.21.5",
+]
+
+[[package]]
+name = "rustls-webpki"
+version = "0.101.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765"
+dependencies = [
+ "ring 0.17.5",
+ "untrusted 0.9.0",
+]
+
+[[package]]
+name = "rustversion"
+version = "1.0.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4"
+
+[[package]]
+name = "rustyline"
+version = "12.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "994eca4bca05c87e86e15d90fc7a91d1be64b4482b38cb2d27474568fe7c9db9"
+dependencies = [
+ "bitflags 2.4.1",
+ "cfg-if",
+ "clipboard-win",
+ "fd-lock",
+ "home",
+ "libc",
+ "log",
+ "memchr",
+ "nix",
+ "radix_trie",
+ "scopeguard",
+ "unicode-segmentation",
+ "unicode-width",
+ "utf8parse",
+ "winapi",
+]
+
+[[package]]
+name = "ryu"
+version = "1.0.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741"
+
+[[package]]
+name = "safemem"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072"
+
+[[package]]
+name = "same-file"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "sanitize-filename"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2ed72fbaf78e6f2d41744923916966c4fbe3d7c74e3037a8ee482f1115572603"
+dependencies = [
+ "lazy_static",
+ "regex",
+]
+
+[[package]]
+name = "schannel"
+version = "0.1.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88"
+dependencies = [
+ "windows-sys",
+]
+
+[[package]]
+name = "schemars"
+version = "0.8.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29"
+dependencies = [
+ "dyn-clone",
+ "schemars_derive",
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "schemars_derive"
+version = "0.8.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "serde_derive_internals",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "scopeguard"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
+
+[[package]]
+name = "sct"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414"
+dependencies = [
+ "ring 0.17.5",
+ "untrusted 0.9.0",
+]
+
+[[package]]
+name = "sec1"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928"
+dependencies = [
+ "base16ct 0.1.1",
+ "der 0.6.1",
+ "generic-array",
+ "pkcs8 0.9.0",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "sec1"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc"
+dependencies = [
+ "base16ct 0.2.0",
+ "der 0.7.8",
+ "generic-array",
+ "pkcs8 0.10.2",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "security-framework"
+version = "2.9.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de"
+dependencies = [
+ "bitflags 1.3.2",
+ "core-foundation",
+ "core-foundation-sys",
+ "libc",
+ "security-framework-sys",
+]
+
+[[package]]
+name = "security-framework-sys"
+version = "2.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
+[[package]]
+name = "self_cell"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e388332cd64eb80cd595a00941baf513caffae8dce9cfd0467fc9c66397dade6"
+
+[[package]]
+name = "semver"
+version = "1.0.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "serde"
+version = "1.0.193"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde-error"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e988182713aeed6a619a88bca186f6d6407483485ffe44c869ee264f8eabd13f"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "serde_bytes"
+version = "0.11.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.193"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.39",
+]
+
+[[package]]
+name = "serde_derive_internals"
+version = "0.26.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.108"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b"
+dependencies = [
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "serde_path_to_error"
+version = "0.1.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4beec8bce849d58d06238cb50db2e1c417cfeafa4c63f692b15c82b7c80f8335"
+dependencies = [
+ "itoa",
+ "serde",
+]
+
+[[package]]
+name = "serde_spanned"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "serde_urlencoded"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
+dependencies = [
+ "form_urlencoded",
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "sha-1"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest 0.10.7",
+]
+
+[[package]]
+name = "sha1"
+version = "0.10.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest 0.10.7",
+]
+
+[[package]]
+name = "sha2"
+version = "0.9.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800"
+dependencies = [
+ "block-buffer 0.9.0",
+ "cfg-if",
+ "cpufeatures",
+ "digest 0.9.0",
+ "opaque-debug",
+]
+
+[[package]]
+name = "sha2"
+version = "0.10.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest 0.10.7",
+]
+
+[[package]]
+name = "sha3"
+version = "0.10.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60"
+dependencies = [
+ "digest 0.10.7",
+ "keccak",
+]
+
+[[package]]
+name = "sharded-slab"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6"
+dependencies = [
+ "lazy_static",
+]
+
+[[package]]
+name = "signal-hook-registry"
+version = "1.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "signature"
+version = "1.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c"
+dependencies = [
+ "digest 0.10.7",
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "signature"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de"
+dependencies = [
+ "digest 0.10.7",
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "simd-adler32"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
+
+[[package]]
+name = "slab"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "smallvec"
+version = "1.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970"
+
+[[package]]
+name = "smawk"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c"
+
+[[package]]
+name = "socket2"
+version = "0.4.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d"
+dependencies = [
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "socket2"
+version = "0.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9"
+dependencies = [
+ "libc",
+ "windows-sys",
+]
+
+[[package]]
+name = "spin"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
+
+[[package]]
+name = "spin"
+version = "0.9.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
+dependencies = [
+ "lock_api",
+]
+
+[[package]]
+name = "spki"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b"
+dependencies = [
+ "base64ct",
+ "der 0.6.1",
+]
+
+[[package]]
+name = "spki"
+version = "0.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a"
+dependencies = [
+ "base64ct",
+ "der 0.7.8",
+]
+
+[[package]]
+name = "ssh-encoding"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19cfdc32e0199062113edf41f344fbf784b8205a94600233c84eb838f45191e1"
+dependencies = [
+ "base64ct",
+ "pem-rfc7468 0.6.0",
+ "sha2 0.10.8",
+]
+
+[[package]]
+name = "ssh-key"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "288d8f5562af5a3be4bda308dd374b2c807b940ac370b5efa1c99311da91d9a1"
+dependencies = [
+ "ed25519-dalek 1.0.1",
+ "p256 0.11.1",
+ "p384 0.11.2",
+ "rand_core 0.6.4",
+ "rsa 0.7.2",
+ "sec1 0.3.0",
+ "sha2 0.10.8",
+ "signature 1.6.4",
+ "ssh-encoding",
+ "zeroize",
+]
+
+[[package]]
+name = "stop-token"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af91f480ee899ab2d9f8435bfdfc14d08a5754bd9d3fef1f1a1c23336aad6c8b"
+dependencies = [
+ "async-channel 1.9.0",
+ "cfg-if",
+ "futures-core",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "str-buf"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0"
+
+[[package]]
+name = "strsim"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
+
+[[package]]
+name = "strum"
+version = "0.25.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125"
+
+[[package]]
+name = "strum_macros"
+version = "0.25.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0"
+dependencies = [
+ "heck",
+ "proc-macro2",
+ "quote",
+ "rustversion",
+ "syn 2.0.39",
+]
+
+[[package]]
+name = "subtle"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc"
+
+[[package]]
+name = "syn"
+version = "1.0.109"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "syn"
+version = "2.0.39"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "sync_wrapper"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160"
+
+[[package]]
+name = "synstructure"
+version = "0.12.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+ "unicode-xid",
+]
+
+[[package]]
+name = "sysinfo"
+version = "0.26.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c18a6156d1f27a9592ee18c1a846ca8dd5c258b7179fc193ae87c74ebb666f5"
+dependencies = [
+ "cfg-if",
+ "core-foundation-sys",
+ "libc",
+ "ntapi",
+ "once_cell",
+ "winapi",
+]
+
+[[package]]
+name = "system-configuration"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7"
+dependencies = [
+ "bitflags 1.3.2",
+ "core-foundation",
+ "system-configuration-sys",
+]
+
+[[package]]
+name = "system-configuration-sys"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
+[[package]]
+name = "tagger"
+version = "4.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "094c9f64d6de9a8506b1e49b63a29333b37ed9e821ee04be694d431b3264c3c5"
+
+[[package]]
+name = "tempfile"
+version = "3.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5"
+dependencies = [
+ "cfg-if",
+ "fastrand",
+ "redox_syscall 0.4.1",
+ "rustix",
+ "windows-sys",
+]
+
+[[package]]
+name = "termcolor"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "testdir"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "480060a2e7e1d3c779d3dea588a81c0df78b6a6322b7ce25c0d2ec14a0d5d869"
+dependencies = [
+ "anyhow",
+ "backtrace",
+ "cargo_metadata",
+ "once_cell",
+ "sysinfo",
+ "whoami",
+]
+
+[[package]]
+name = "textwrap"
+version = "0.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d"
+dependencies = [
+ "smawk",
+ "unicode-linebreak",
+ "unicode-width",
+]
+
+[[package]]
+name = "thiserror"
+version = "1.0.50"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2"
+dependencies = [
+ "thiserror-impl",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "1.0.50"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.39",
+]
+
+[[package]]
+name = "thread_local"
+version = "1.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+]
+
+[[package]]
+name = "time"
+version = "0.1.45"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a"
+dependencies = [
+ "libc",
+ "wasi 0.10.0+wasi-snapshot-preview1",
+ "winapi",
+]
+
+[[package]]
+name = "time"
+version = "0.3.30"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5"
+dependencies = [
+ "deranged",
+ "itoa",
+ "powerfmt",
+ "serde",
+ "time-core",
+ "time-macros",
+]
+
+[[package]]
+name = "time-core"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
+
+[[package]]
+name = "time-macros"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20"
+dependencies = [
+ "time-core",
+]
+
+[[package]]
+name = "tinytemplate"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc"
+dependencies = [
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "tinyvec"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50"
+dependencies = [
+ "tinyvec_macros",
+]
+
+[[package]]
+name = "tinyvec_macros"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
+
+[[package]]
+name = "tokio"
+version = "1.34.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9"
+dependencies = [
+ "backtrace",
+ "bytes",
+ "libc",
+ "mio",
+ "num_cpus",
+ "parking_lot",
+ "pin-project-lite",
+ "signal-hook-registry",
+ "socket2 0.5.5",
+ "tokio-macros",
+ "windows-sys",
+]
+
+[[package]]
+name = "tokio-io-timeout"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf"
+dependencies = [
+ "pin-project-lite",
+ "tokio",
+]
+
+[[package]]
+name = "tokio-macros"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.39",
+]
+
+[[package]]
+name = "tokio-native-tls"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2"
+dependencies = [
+ "native-tls",
+ "tokio",
+]
+
+[[package]]
+name = "tokio-serde"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "911a61637386b789af998ee23f50aa30d5fd7edcec8d6d3dedae5e5815205466"
+dependencies = [
+ "bincode",
+ "bytes",
+ "educe",
+ "futures-core",
+ "futures-sink",
+ "pin-project",
+ "serde",
+]
+
+[[package]]
+name = "tokio-stream"
+version = "0.1.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842"
+dependencies = [
+ "futures-core",
+ "pin-project-lite",
+ "tokio",
+]
+
+[[package]]
+name = "tokio-tar"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d5714c010ca3e5c27114c1cdeb9d14641ace49874aa5626d7149e47aedace75"
+dependencies = [
+ "filetime",
+ "futures-core",
+ "libc",
+ "redox_syscall 0.3.5",
+ "tokio",
+ "tokio-stream",
+ "xattr",
+]
+
+[[package]]
+name = "tokio-tungstenite"
+version = "0.20.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c"
+dependencies = [
+ "futures-util",
+ "log",
+ "tokio",
+ "tungstenite",
+]
+
+[[package]]
+name = "tokio-util"
+version = "0.7.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15"
+dependencies = [
+ "bytes",
+ "futures-core",
+ "futures-sink",
+ "pin-project-lite",
+ "tokio",
+ "tracing",
+]
+
+[[package]]
+name = "toml"
+version = "0.8.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35"
+dependencies = [
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "toml_edit",
+]
+
+[[package]]
+name = "toml_datetime"
+version = "0.6.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "toml_edit"
+version = "0.21.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03"
+dependencies = [
+ "indexmap",
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "winnow",
+]
+
+[[package]]
+name = "tower"
+version = "0.4.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c"
+dependencies = [
+ "futures-core",
+ "futures-util",
+ "pin-project",
+ "pin-project-lite",
+ "tokio",
+ "tower-layer",
+ "tower-service",
+ "tracing",
+]
+
+[[package]]
+name = "tower-layer"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0"
+
+[[package]]
+name = "tower-service"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52"
+
+[[package]]
+name = "tracing"
+version = "0.1.40"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
+dependencies = [
+ "log",
+ "pin-project-lite",
+ "tracing-attributes",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-attributes"
+version = "0.1.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.39",
+]
+
+[[package]]
+name = "tracing-core"
+version = "0.1.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"
+dependencies = [
+ "once_cell",
+ "valuable",
+]
+
+[[package]]
+name = "tracing-futures"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2"
+dependencies = [
+ "pin-project",
+ "tracing",
+]
+
+[[package]]
+name = "tracing-log"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3"
+dependencies = [
+ "log",
+ "once_cell",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-subscriber"
+version = "0.3.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b"
+dependencies = [
+ "matchers",
+ "nu-ansi-term",
+ "once_cell",
+ "regex",
+ "sharded-slab",
+ "smallvec",
+ "thread_local",
+ "tracing",
+ "tracing-core",
+ "tracing-log",
+]
+
+[[package]]
+name = "try-lock"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed"
+
+[[package]]
+name = "tungstenite"
+version = "0.20.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9"
+dependencies = [
+ "byteorder",
+ "bytes",
+ "data-encoding",
+ "http",
+ "httparse",
+ "log",
+ "rand 0.8.5",
+ "sha1",
+ "thiserror",
+ "url",
+ "utf-8",
+]
+
+[[package]]
+name = "twofish"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a78e83a30223c757c3947cd144a31014ff04298d8719ae10d03c31c0448c8013"
+dependencies = [
+ "cipher",
+]
+
+[[package]]
+name = "typenum"
+version = "1.17.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
+
+[[package]]
+name = "typescript-type-def"
+version = "0.5.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a548b68faefac1ef83c3682cece0046b4f3efc943a067aacb4dfb99be299f60"
+dependencies = [
+ "serde_json",
+ "typescript-type-def-derive",
+]
+
+[[package]]
+name = "typescript-type-def-derive"
+version = "0.5.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2f205a929a19c5dd74f80c9f795c33b4416f7efef7d7b2772f0eff96bdd71c35"
+dependencies = [
+ "darling 0.13.4",
+ "ident_case",
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "unarray"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94"
+
+[[package]]
+name = "unicode-bidi"
+version = "0.3.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460"
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
+
+[[package]]
+name = "unicode-linebreak"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f"
+
+[[package]]
+name = "unicode-normalization"
+version = "0.1.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921"
+dependencies = [
+ "tinyvec",
+]
+
+[[package]]
+name = "unicode-segmentation"
+version = "1.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36"
+
+[[package]]
+name = "unicode-width"
+version = "0.1.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85"
+
+[[package]]
+name = "unicode-xid"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c"
+
+[[package]]
+name = "untrusted"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
+
+[[package]]
+name = "untrusted"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
+
+[[package]]
+name = "url"
+version = "2.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5"
+dependencies = [
+ "form_urlencoded",
+ "idna",
+ "percent-encoding",
+]
+
+[[package]]
+name = "utf-8"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
+
+[[package]]
+name = "utf8parse"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
+
+[[package]]
+name = "uuid"
+version = "1.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560"
+dependencies = [
+ "getrandom 0.2.11",
+ "serde",
+]
+
+[[package]]
+name = "valuable"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
+
+[[package]]
+name = "vcpkg"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
+
+[[package]]
+name = "version_check"
+version = "0.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
+
+[[package]]
+name = "walkdir"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee"
+dependencies = [
+ "same-file",
+ "winapi-util",
+]
+
+[[package]]
+name = "want"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"
+dependencies = [
+ "try-lock",
+]
+
+[[package]]
+name = "wasi"
+version = "0.9.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
+
+[[package]]
+name = "wasi"
+version = "0.10.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
+
+[[package]]
+name = "wasi"
+version = "0.11.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.89"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e"
+dependencies = [
+ "cfg-if",
+ "wasm-bindgen-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.89"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826"
+dependencies = [
+ "bumpalo",
+ "log",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.39",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-futures"
+version = "0.4.38"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.89"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.89"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.39",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.89"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f"
+
+[[package]]
+name = "web-sys"
+version = "0.3.65"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "weezl"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb"
+
+[[package]]
+name = "whoami"
+version = "1.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50"
+dependencies = [
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "widestring"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8"
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-util"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
+[[package]]
+name = "windows"
+version = "0.32.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fbedf6db9096bc2364adce0ae0aa636dcd89f3c3f2cd67947062aaf0ca2a10ec"
+dependencies = [
+ "windows_aarch64_msvc 0.32.0",
+ "windows_i686_gnu 0.32.0",
+ "windows_i686_msvc 0.32.0",
+ "windows_x86_64_gnu 0.32.0",
+ "windows_x86_64_msvc 0.32.0",
+]
+
+[[package]]
+name = "windows-core"
+version = "0.51.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
+dependencies = [
+ "windows_aarch64_gnullvm",
+ "windows_aarch64_msvc 0.48.5",
+ "windows_i686_gnu 0.48.5",
+ "windows_i686_msvc 0.48.5",
+ "windows_x86_64_gnu 0.48.5",
+ "windows_x86_64_gnullvm",
+ "windows_x86_64_msvc 0.48.5",
+]
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.32.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d8e92753b1c443191654ec532f14c199742964a061be25d77d7a96f09db20bf5"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.32.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6a711c68811799e017b6038e0922cb27a5e2f43a2ddb609fe0b6f3eeda9de615"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.32.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "146c11bb1a02615db74680b32a68e2d61f553cc24c4eb5b4ca10311740e44172"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.32.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c912b12f7454c6620635bbff3450962753834be2a594819bd5e945af18ec64bc"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.32.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "504a2476202769977a040c6364301a3f65d0cc9e3fb08600b2bda150a0488316"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
+
+[[package]]
+name = "winnow"
+version = "0.5.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "winreg"
+version = "0.50.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1"
+dependencies = [
+ "cfg-if",
+ "windows-sys",
+]
+
+[[package]]
+name = "x25519-dalek"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96"
+dependencies = [
+ "curve25519-dalek 4.1.1",
+ "rand_core 0.6.4",
+ "serde",
+ "zeroize",
+]
+
+[[package]]
+name = "x509-parser"
+version = "0.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8"
+dependencies = [
+ "asn1-rs",
+ "base64 0.13.1",
+ "data-encoding",
+ "der-parser",
+ "lazy_static",
+ "nom",
+ "oid-registry",
+ "rusticata-macros",
+ "thiserror",
+ "time 0.3.30",
+]
+
+[[package]]
+name = "xattr"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "yansi"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec"
+
+[[package]]
+name = "yasna"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd"
+dependencies = [
+ "time 0.3.30",
+]
+
+[[package]]
+name = "yerpc"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "75b5547af776328f66a5476ea3b7c0789e6fed164eb32d1a2122cfb39ffa505d"
+dependencies = [
+ "anyhow",
+ "async-channel 1.9.0",
+ "async-mutex",
+ "async-trait",
+ "axum",
+ "futures",
+ "futures-util",
+ "log",
+ "schemars",
+ "serde",
+ "serde_json",
+ "tokio",
+ "tracing",
+ "typescript-type-def",
+ "yerpc_derive",
+]
+
+[[package]]
+name = "yerpc_derive"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f321bb5f728fb066af06c5a994e4375f1f8b054ee6d650766f0bd68dfa4faefe"
+dependencies = [
+ "convert_case 0.5.0",
+ "darling 0.14.4",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "zerocopy"
+version = "0.7.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f43de342578a3a14a9314a2dab1942cbfcbe5686e1f91acdc513058063eafe18"
+dependencies = [
+ "zerocopy-derive",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.7.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e1012d89e3acb79fad7a799ce96866cfb8098b74638465ea1b1533d35900ca90"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.39",
+]
+
+[[package]]
+name = "zeroize"
+version = "1.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d"
+dependencies = [
+ "zeroize_derive",
+]
+
+[[package]]
+name = "zeroize_derive"
+version = "1.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.39",
+]
diff --git a/nixpkgs/pkgs/development/libraries/libdeltachat/default.nix b/nixpkgs/pkgs/development/libraries/libdeltachat/default.nix
new file mode 100644
index 000000000000..0d7b96562104
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdeltachat/default.nix
@@ -0,0 +1,99 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cargo
+, cmake
+, deltachat-desktop
+, deltachat-repl
+, openssl
+, perl
+, pkg-config
+, python3
+, rustPlatform
+, sqlcipher
+, sqlite
+, fixDarwinDylibNames
+, CoreFoundation
+, Security
+, SystemConfiguration
+, libiconv
+}:
+
+let
+  cargoLock = {
+    lockFile = ./Cargo.lock;
+    outputHashes = {
+      "email-0.0.21" = "sha256-u4CsK/JqFgq5z3iJGxxGtb7QbSkOAqmOvrmagsqfXIU=";
+      "encoded-words-0.2.0" = "sha256-KK9st0hLFh4dsrnLd6D8lC6pRFFs8W+WpZSGMGJcosk=";
+      "imap-proto-0.16.3" = "sha256-okIHA8MQ1K/tcKHZYGh83zom1ULGHZ/KGxgcwiE1+sE=";
+      "iroh-0.4.2" = "sha256-VXNMmj+AvlY/W2JRWMICoNOqpFEahsUDxypHRg185Ao=";
+      "lettre-0.9.2" = "sha256-+hU1cFacyyeC9UGVBpS14BWlJjHy90i/3ynMkKAzclk=";
+    };
+  };
+in stdenv.mkDerivation rec {
+  pname = "libdeltachat";
+  version = "1.131.9";
+
+  src = fetchFromGitHub {
+    owner = "deltachat";
+    repo = "deltachat-core-rust";
+    rev = "v${version}";
+    hash = "sha256-xZai5RsrfT6bYzMpNdKncmDzBzcAcEtZZmh7f+3g5Hs=";
+  };
+
+  patches = [
+    ./no-static-lib.patch
+  ];
+
+  cargoDeps = rustPlatform.importCargoLock cargoLock;
+
+  nativeBuildInputs = [
+    cmake
+    perl
+    pkg-config
+    rustPlatform.cargoSetupHook
+    cargo
+  ] ++ lib.optionals stdenv.isDarwin [
+    fixDarwinDylibNames
+  ];
+
+  buildInputs = [
+    openssl
+    sqlcipher
+    sqlite
+  ] ++ lib.optionals stdenv.isDarwin [
+    CoreFoundation
+    Security
+    SystemConfiguration
+    libiconv
+  ];
+
+  nativeCheckInputs = with rustPlatform; [
+    cargoCheckHook
+  ];
+
+  # Sometimes -fmacro-prefix-map= can redirect __FILE__ to non-existent
+  # paths. This breaks packages like `python3.pkgs.deltachat`. We embed
+  # absolute path to headers by expanding `__FILE__`.
+  postInstall = ''
+    substituteInPlace $out/include/deltachat.h \
+      --replace __FILE__ '"${placeholder "out"}/include/deltachat.h"'
+  '';
+
+  passthru = {
+    inherit cargoLock;
+    tests = {
+      inherit deltachat-desktop deltachat-repl;
+      python = python3.pkgs.deltachat;
+    };
+  };
+
+  meta = with lib; {
+    description = "Delta Chat Rust Core library";
+    homepage = "https://github.com/deltachat/deltachat-core-rust/";
+    changelog = "https://github.com/deltachat/deltachat-core-rust/blob/${src.rev}/CHANGELOG.md";
+    license = licenses.mpl20;
+    maintainers = with maintainers; [ dotlambda ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdeltachat/no-static-lib.patch b/nixpkgs/pkgs/development/libraries/libdeltachat/no-static-lib.patch
new file mode 100644
index 000000000000..14ea1106138f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdeltachat/no-static-lib.patch
@@ -0,0 +1,38 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 44ca43e7..8b6960dd 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -14,7 +14,6 @@ find_program(CARGO cargo)
+ 
+ add_custom_command(
+ 	OUTPUT
+-	"target/release/libdeltachat.a"
+ 	"target/release/libdeltachat.${DYNAMIC_EXT}"
+ 	"target/release/pkgconfig/deltachat.pc"
+         COMMAND
+@@ -39,12 +38,10 @@ add_custom_target(
+ 	lib_deltachat
+ 	ALL
+ 	DEPENDS
+-	"target/release/libdeltachat.a"
+ 	"target/release/libdeltachat.${DYNAMIC_EXT}"
+ 	"target/release/pkgconfig/deltachat.pc"
+ )
+ 
+ install(FILES "deltachat-ffi/deltachat.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+-install(FILES "target/release/libdeltachat.a" DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ install(FILES "target/release/libdeltachat.${DYNAMIC_EXT}" DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ install(FILES "target/release/pkgconfig/deltachat.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+diff --git a/deltachat-ffi/Cargo.toml b/deltachat-ffi/Cargo.toml
+index de0fbafe..120efec9 100644
+--- a/deltachat-ffi/Cargo.toml
++++ b/deltachat-ffi/Cargo.toml
+@@ -12,7 +12,7 @@ categories = ["cryptography", "std", "email"]
+ 
+ [lib]
+ name = "deltachat"
+-crate-type = ["cdylib", "staticlib"]
++crate-type = ["cdylib"]
+ 
+ [dependencies]
+ deltachat = { path = "../", default-features = false }
diff --git a/nixpkgs/pkgs/development/libraries/libdevil/default.nix b/nixpkgs/pkgs/development/libraries/libdevil/default.nix
new file mode 100644
index 000000000000..0cba50c3a924
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdevil/default.nix
@@ -0,0 +1,77 @@
+{ lib
+, stdenv
+, fetchurl
+, libjpeg
+, libpng
+, libmng
+, lcms1
+, libtiff
+, openexr
+, libGL
+, libX11
+, pkg-config
+, OpenGL
+, runtimeShell
+, withXorg ? true
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libdevil";
+  version = "1.7.8";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "mirror://sourceforge/openil/DevIL-${finalAttrs.version}.tar.gz";
+    sha256 = "1zd850nn7nvkkhasrv7kn17kzgslr5ry933v6db62s4lr0zzlbv8";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ libjpeg libpng libmng lcms1 libtiff openexr ]
+    ++ lib.optionals withXorg [ libX11 libGL ]
+    ++ lib.optionals stdenv.isDarwin [ OpenGL ];
+
+  configureFlags = [ "--enable-ILU" "--enable-ILUT" ];
+
+  preConfigure = ''
+    sed -i 's, -std=gnu99,,g' configure
+    sed -i 's,malloc.h,stdlib.h,g' src-ILU/ilur/ilur.c
+  '' + lib.optionalString stdenv.cc.isClang ''
+    sed -i 's/libIL_la_CXXFLAGS = $(AM_CFLAGS)/libIL_la_CXXFLAGS =/g' lib/Makefile.in
+  '';
+
+  postConfigure = ''
+    sed -i '/RESTRICT_KEYWORD/d' include/IL/config.h
+  '';
+
+  patches = [
+    (fetchurl {
+        url = "https://sources.debian.org/data/main/d/devil/1.7.8-10/debian/patches/03_CVE-2009-3994.diff";
+        sha256 = "0qkx2qfv02igbrmsn6z5a3lbrbwjfh3rb0c2sj54wy0j1f775hbc";
+    })
+    ./ftbfs-libpng15.patch
+    ./il_endian.h.patch
+  ];
+
+  enableParallelBuilding = true;
+
+  postPatch = ''
+    for a in test/Makefile.in test/format_test/format_checks.sh.in ; do
+      substituteInPlace $a \
+        --replace /bin/bash ${runtimeShell}
+    done
+  '';
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    homepage = "https://openil.sourceforge.net/";
+    description = "An image library which can can load, save, convert, manipulate, filter and display a wide variety of image formats";
+    license = licenses.lgpl2;
+    pkgConfigModules = [ "IL" ];
+    platforms = platforms.mesaPlatforms;
+    maintainers = with maintainers; [ ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libdevil/ftbfs-libpng15.patch b/nixpkgs/pkgs/development/libraries/libdevil/ftbfs-libpng15.patch
new file mode 100644
index 000000000000..5fc53c2dc6a7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdevil/ftbfs-libpng15.patch
@@ -0,0 +1,31 @@
+Source: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=649554
+--- devil-1.7.8.orig/src-IL/src/il_icon.c
++++ devil-1.7.8/src-IL/src/il_icon.c
+@@ -525,7 +525,11 @@
+ 
+ 	// Expand low-bit-depth grayscale images to 8 bits
+ 	if (ico_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) {
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++		png_set_expand_gray_1_2_4_to_8(ico_png_ptr);
++#else
+ 		png_set_gray_1_2_4_to_8(ico_png_ptr);
++#endif
+ 	}
+ 
+ 	// Expand RGB images with transparency to full alpha channels
+only in patch2:
+unchanged:
+--- devil-1.7.8.orig/src-IL/src/il_png.c
++++ devil-1.7.8/src-IL/src/il_png.c
+@@ -278,7 +278,11 @@
+ 
+ 	// Expand low-bit-depth grayscale images to 8 bits
+ 	if (png_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) {
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++		png_set_expand_gray_1_2_4_to_8(png_ptr);
++#else
+ 		png_set_gray_1_2_4_to_8(png_ptr);
++#endif
+ 	}
+ 
+ 	// Expand RGB images with transparency to full alpha channels
diff --git a/nixpkgs/pkgs/development/libraries/libdevil/il_endian.h.patch b/nixpkgs/pkgs/development/libraries/libdevil/il_endian.h.patch
new file mode 100644
index 000000000000..c220e6802fd9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdevil/il_endian.h.patch
@@ -0,0 +1,27 @@
+Source: http://sourceforge.net/p/resil/tickets/8/
+--- devil-1.7.8.orig/src-IL/include/il_endian.h.orig	2009-03-08 01:10:08.000000000 -0600
++++ devil-1.7.8/src-IL/include/il_endian.h	2013-11-03 01:52:37.000000000 -0600
+@@ -19,9 +19,13 @@
+ 	#ifndef __BIG_ENDIAN__
+ 	#define __BIG_ENDIAN__ 1
+ 	#endif
++#else
++	#ifndef __LITTLE_ENDIAN__
++	#define __LITTLE_ENDIAN__ 1
++	#endif
+ #endif
+ 
+-#if (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __BIG_ENDIAN__) \
++#if (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) \
+   || (defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__))
+  	#undef __LITTLE_ENDIAN__
+ 	#define Short(s) iSwapShort(s)
+@@ -39,8 +43,6 @@
+ 	#define BigDouble(d)  
+ #else
+ 	#undef __BIG_ENDIAN__
+-	#undef __LITTLE_ENDIAN__  // Not sure if it's defined by any compiler...
+-	#define __LITTLE_ENDIAN__
+ 	#define Short(s)  
+ 	#define UShort(s)  
+ 	#define Int(i)  
diff --git a/nixpkgs/pkgs/development/libraries/libdex/default.nix b/nixpkgs/pkgs/development/libraries/libdex/default.nix
new file mode 100644
index 000000000000..283708693421
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdex/default.nix
@@ -0,0 +1,66 @@
+{ stdenv
+, lib
+, fetchFromGitLab
+, gi-docgen
+, gobject-introspection
+, meson
+, ninja
+, pkg-config
+, vala
+, glib
+, liburing
+, gnome
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libdex";
+  version = "0.4.3";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchFromGitLab {
+    domain = "gitlab.gnome.org";
+    owner = "GNOME";
+    repo = "libdex";
+    rev = version;
+    sha256 = "0GNlgJgAOE3JGwu/6Zsh4sjFapA7nUcGD3lgZZJ0BfQ=";
+  };
+
+  nativeBuildInputs = [
+    gi-docgen
+    gobject-introspection
+    meson
+    ninja
+    pkg-config
+    vala
+  ];
+
+  buildInputs = [
+    glib
+    liburing
+  ];
+
+  mesonFlags = [
+    "-Ddocs=true"
+  ];
+
+  doCheck = true;
+
+  postFixup = ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  passthru.updateScript = gnome.updateScript {
+    packageName = "libdex";
+    versionPolicy = "odd-unstable";
+  };
+
+  meta = with lib; {
+    description = "Library supporting deferred execution for GNOME and GTK";
+    homepage = "https://gitlab.gnome.org/GNOME/libdex";
+    maintainers = teams.gnome.members;
+    platforms = platforms.linux;
+    license = licenses.lgpl21Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdicom/default.nix b/nixpkgs/pkgs/development/libraries/libdicom/default.nix
new file mode 100644
index 000000000000..cb4d68121ef5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdicom/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, uthash
+, meson
+, ninja
+, pkg-config
+, check
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libdicom";
+  version = "1.0.5";
+
+  src = fetchFromGitHub {
+    owner = "ImagingDataCommons";
+    repo = "libdicom";
+    rev = "v${finalAttrs.version}";
+    sha256 = "sha256-9n0Gp9+fmTM/shgWC8zpwt1pic9BrvDubOt7f+ZDMeE=";
+  };
+
+  buildInputs = [ uthash ];
+
+  nativeBuildInputs = [ meson ninja pkg-config ]
+    ++ lib.optionals (finalAttrs.finalPackage.doCheck) [ check ];
+
+  mesonBuildType = "release";
+
+  mesonFlags = lib.optionals (!finalAttrs.finalPackage.doCheck) [ "-Dtests=false" ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "C library for reading DICOM files";
+    homepage = "https://github.com/ImagingDataCommons/libdicom";
+    license = licenses.mit;
+    maintainers = with maintainers; [ lromor ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libdigidocpp/default.nix b/nixpkgs/pkgs/development/libraries/libdigidocpp/default.nix
new file mode 100644
index 000000000000..49c3713bbe0e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdigidocpp/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchurl, fetchpatch, cmake, minizip, pcsclite, opensc, openssl
+, xercesc, xml-security-c, pkg-config, xsd, zlib, xalanc, xxd }:
+
+stdenv.mkDerivation rec {
+  version = "3.16.0";
+  pname = "libdigidocpp";
+
+  src = fetchurl {
+     url = "https://github.com/open-eid/libdigidocpp/releases/download/v${version}/libdigidocpp-${version}.tar.gz";
+     hash = "sha256-XgObeVQJ2X7hNIelGK55RTtkKvU6D+RkLMc24/PZCzY=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config xxd ];
+
+  buildInputs = [
+    minizip pcsclite opensc openssl xercesc
+    xml-security-c xsd zlib xalanc
+  ];
+
+  outputs = [ "out" "lib" "dev" "bin" ];
+
+  # libdigidocpp.so's `PKCS11Signer::PKCS11Signer()` dlopen()s "opensc-pkcs11.so"
+  # itself, so add OpenSC to its DT_RUNPATH after the fixupPhase shrinked it.
+  # https://github.com/open-eid/cmake/pull/35 might be an alternative.
+  postFixup = ''
+    patchelf --add-rpath ${opensc}/lib/pkcs11 $lib/lib/libdigidocpp.so
+  '';
+
+  meta = with lib; {
+    description = "Library for creating DigiDoc signature files";
+    homepage = "https://www.id.ee/";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.jagajaga ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdiscid/default.nix b/nixpkgs/pkgs/development/libraries/libdiscid/default.nix
new file mode 100644
index 000000000000..11cbdc1d8961
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdiscid/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchurl, cmake, pkg-config, darwin }:
+
+stdenv.mkDerivation rec {
+  pname = "libdiscid";
+  version = "0.6.4";
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.IOKit ];
+
+  src = fetchurl {
+    url = "http://ftp.musicbrainz.org/pub/musicbrainz/${pname}/${pname}-${version}.tar.gz";
+    sha256 = "sha256-3V6PHJrq1ELiO3SanMkzY3LmLoitcHmitiiVsDkMsoI=";
+  };
+
+  NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-framework CoreFoundation -framework IOKit";
+
+  meta = with lib; {
+    description = "A C library for creating MusicBrainz DiscIDs from audio CDs";
+    homepage = "http://musicbrainz.org/doc/libdiscid";
+    maintainers = with maintainers; [ ehmry ];
+    license = licenses.lgpl21;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdisplay-info/default.nix b/nixpkgs/pkgs/development/libraries/libdisplay-info/default.nix
new file mode 100644
index 000000000000..783ee4ad483d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdisplay-info/default.nix
@@ -0,0 +1,38 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, meson
+, pkg-config
+, ninja
+, python3
+, hwdata
+, edid-decode
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libdisplay-info";
+  version = "0.1.1";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "emersion";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-7t1CoLus3rPba9paapM7+H3qpdsw7FlzJsSHFwM/2Lk=";
+  };
+
+  depsBuildBuild = [ pkg-config ];
+  nativeBuildInputs = [ meson pkg-config ninja edid-decode hwdata python3 ];
+
+  postPatch = ''
+    patchShebangs tool/gen-search-table.py
+  '';
+
+  meta = with lib; {
+    description = "EDID and DisplayID library";
+    homepage = "https://gitlab.freedesktop.org/emersion/libdisplay-info";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ pedrohlc ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdivecomputer/default.nix b/nixpkgs/pkgs/development/libraries/libdivecomputer/default.nix
new file mode 100644
index 000000000000..8e37bd773cb3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdivecomputer/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libdivecomputer";
+  version = "0.8.0";
+
+  src = fetchurl {
+    url = "https://www.libdivecomputer.org/releases/${pname}-${version}.tar.gz";
+    sha256 = "sha256-J17M55I2RO1YH6q53LTxpprSUbzrByHE5fhftjFheg4=";
+  };
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "http://www.libdivecomputer.org";
+    description = "A cross-platform and open source library for communication with dive computers from various manufacturers";
+    maintainers = [ maintainers.mguentner ];
+    license = licenses.lgpl21;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdivsufsort/default.nix b/nixpkgs/pkgs/development/libraries/libdivsufsort/default.nix
new file mode 100644
index 000000000000..f2a2dae5f816
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdivsufsort/default.nix
@@ -0,0 +1,22 @@
+{lib, stdenv, fetchFromGitHub, cmake}:
+
+stdenv.mkDerivation rec {
+  pname = "libdivsufsort";
+  version = "2.0.1";
+
+  src = fetchFromGitHub {
+    owner = "y-256";
+    repo = pname;
+    rev = "${version}";
+    hash = "sha256-4p+L1bq9SBgWSHXx+WYWAe60V2g1AN+zlJvC+F367Tk=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = {
+    homepage = "https://github.com/y-256/libdivsufsort";
+    license = lib.licenses.mit;
+    description = "Library to construct the suffix array and the BW transformed string";
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdmapsharing/default.nix b/nixpkgs/pkgs/development/libraries/libdmapsharing/default.nix
new file mode 100644
index 000000000000..ba1b3c05f1a6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdmapsharing/default.nix
@@ -0,0 +1,79 @@
+{ stdenv
+, lib
+, fetchFromGitLab
+, autoconf
+, automake
+, libtool
+, which
+, pkg-config
+, python3
+, vala
+, avahi
+, gdk-pixbuf
+, gst_all_1
+, glib
+, gtk-doc
+, docbook-xsl-nons
+, docbook_xml_dtd_43
+, gobject-introspection
+, libsoup_3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libdmapsharing";
+  version = "3.9.13";
+
+  outputs = [ "out" "dev" "devdoc" ];
+  outputBin = "dev";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.gnome.org";
+    owner = "GNOME";
+    repo = pname;
+    rev = "${lib.toUpper pname}_${lib.replaceStrings ["."] ["_"] version}";
+    sha256 = "oR9lpOFxgGfrtzncFT6dbmhKQfcuH/NvhOR/USHAHQc=";
+  };
+
+  nativeBuildInputs = [
+    autoconf
+    automake
+    libtool
+    which
+    pkg-config
+    python3
+    gobject-introspection
+    vala
+    gtk-doc
+    docbook-xsl-nons
+    docbook_xml_dtd_43
+  ];
+
+  buildInputs = [
+    avahi
+    gdk-pixbuf
+    gst_all_1.gstreamer
+    gst_all_1.gst-plugins-base
+  ];
+
+  propagatedBuildInputs = [
+    glib
+    libsoup_3
+  ];
+
+  configureFlags = [
+    "--enable-gtk-doc"
+    "--disable-tests" # Tests require mDNS server.
+  ];
+
+  preConfigure = ''
+    NOCONFIGURE=1 ./autogen.sh
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.flyn.org/projects/libdmapsharing/";
+    description = "Library that implements the DMAP family of protocols";
+    maintainers = teams.gnome.members;
+    license = licenses.lgpl21Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdmtx/default.nix b/nixpkgs/pkgs/development/libraries/libdmtx/default.nix
new file mode 100644
index 000000000000..4c5ef2c33140
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdmtx/default.nix
@@ -0,0 +1,29 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libdmtx";
+  version = "0.7.7";
+
+  src = fetchFromGitHub {
+    owner = "dmtx";
+    repo = "libdmtx";
+    rev = "v${version}";
+    sha256 = "sha256-UQy8iFfl8BNT5cBUMVF1tIScFPfHekSofaebtel9JWk=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  meta = {
+    description = "An open source software for reading and writing Data Matrix barcodes";
+    homepage = "https://github.com/dmtx/libdmtx";
+    changelog = "https://github.com/dmtx/libdmtx/blob/v${version}/ChangeLog";
+    platforms = lib.platforms.all;
+    maintainers = [ ];
+    license = lib.licenses.bsd2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdnet/default.nix b/nixpkgs/pkgs/development/libraries/libdnet/default.nix
new file mode 100644
index 000000000000..717d565ef835
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdnet/default.nix
@@ -0,0 +1,31 @@
+{lib, stdenv, fetchurl, automake, autoconf, libtool}:
+
+stdenv.mkDerivation rec {
+  pname = "libdnet";
+  version = "1.12";
+
+  enableParallelBuilding = true;
+
+  src = fetchurl {
+    url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/libdnet/libdnet-${version}.tgz";
+    sha256 = "09mhbr8x66ykhf5581a5zjpplpjxibqzgkkpx689kybwg0wk1cw3";
+  };
+
+  nativeBuildInputs = [ automake autoconf ];
+  buildInputs = [ libtool ];
+
+  # .so endings are missing (quick and dirty fix)
+  postInstall = ''
+    for i in $out/lib/*; do
+      ln -s $i $i.so
+    done
+  '';
+
+  meta = {
+    description = "Provides a simplified, portable interface to several low-level networking routines";
+    homepage = "https://github.com/dugsong/libdnet";
+    license = lib.licenses.bsd3;
+    maintainers = [lib.maintainers.marcweber];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdovi/Cargo.lock b/nixpkgs/pkgs/development/libraries/libdovi/Cargo.lock
new file mode 100644
index 000000000000..417a92d2d166
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdovi/Cargo.lock
@@ -0,0 +1,704 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "anes"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299"
+
+[[package]]
+name = "anyhow"
+version = "1.0.70"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4"
+
+[[package]]
+name = "atty"
+version = "0.2.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
+dependencies = [
+ "hermit-abi 0.1.19",
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "autocfg"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "bitstream-io"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d28070975aaf4ef1fd0bd1f29b739c06c2cdd9972e090617fb6dca3b2cb564e"
+
+[[package]]
+name = "bitvec"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c"
+dependencies = [
+ "funty",
+ "radium",
+ "tap",
+ "wyz",
+]
+
+[[package]]
+name = "bitvec_helpers"
+version = "3.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3ef6883bd86b4112b56be19de3a1628de6c4063be7be6e641d484c83069efb4a"
+dependencies = [
+ "bitstream-io",
+]
+
+[[package]]
+name = "bumpalo"
+version = "3.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535"
+
+[[package]]
+name = "cast"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "ciborium"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b0c137568cc60b904a7724001b35ce2630fd00d5d84805fbb608ab89509d788f"
+dependencies = [
+ "ciborium-io",
+ "ciborium-ll",
+ "serde",
+]
+
+[[package]]
+name = "ciborium-io"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "346de753af073cc87b52b2083a506b38ac176a44cfb05497b622e27be899b369"
+
+[[package]]
+name = "ciborium-ll"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "213030a2b5a4e0c0892b6652260cf6ccac84827b83a85a534e178e3906c4cf1b"
+dependencies = [
+ "ciborium-io",
+ "half",
+]
+
+[[package]]
+name = "clap"
+version = "3.2.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5"
+dependencies = [
+ "bitflags",
+ "clap_lex",
+ "indexmap",
+ "textwrap",
+]
+
+[[package]]
+name = "clap_lex"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5"
+dependencies = [
+ "os_str_bytes",
+]
+
+[[package]]
+name = "crc"
+version = "3.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe"
+dependencies = [
+ "crc-catalog",
+]
+
+[[package]]
+name = "crc-catalog"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484"
+
+[[package]]
+name = "criterion"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7c76e09c1aae2bc52b3d2f29e13c6572553b30c4aa1b8a49fd70de6412654cb"
+dependencies = [
+ "anes",
+ "atty",
+ "cast",
+ "ciborium",
+ "clap",
+ "criterion-plot",
+ "itertools",
+ "lazy_static",
+ "num-traits",
+ "oorandom",
+ "plotters",
+ "rayon",
+ "regex",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "tinytemplate",
+ "walkdir",
+]
+
+[[package]]
+name = "criterion-plot"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1"
+dependencies = [
+ "cast",
+ "itertools",
+]
+
+[[package]]
+name = "crossbeam-channel"
+version = "0.5.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c"
+dependencies = [
+ "cfg-if",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-deque"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef"
+dependencies = [
+ "cfg-if",
+ "crossbeam-epoch",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-epoch"
+version = "0.9.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695"
+dependencies = [
+ "autocfg",
+ "cfg-if",
+ "crossbeam-utils",
+ "memoffset",
+ "scopeguard",
+]
+
+[[package]]
+name = "crossbeam-utils"
+version = "0.8.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "dolby_vision"
+version = "3.1.2"
+dependencies = [
+ "anyhow",
+ "bitvec",
+ "bitvec_helpers",
+ "crc",
+ "criterion",
+ "libc",
+ "roxmltree",
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "either"
+version = "1.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91"
+
+[[package]]
+name = "funty"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c"
+
+[[package]]
+name = "half"
+version = "1.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7"
+
+[[package]]
+name = "hashbrown"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
+
+[[package]]
+name = "hermit-abi"
+version = "0.1.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "hermit-abi"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "indexmap"
+version = "1.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
+dependencies = [
+ "autocfg",
+ "hashbrown",
+]
+
+[[package]]
+name = "itertools"
+version = "0.10.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
+dependencies = [
+ "either",
+]
+
+[[package]]
+name = "itoa"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6"
+
+[[package]]
+name = "js-sys"
+version = "0.3.61"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730"
+dependencies = [
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "lazy_static"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+
+[[package]]
+name = "libc"
+version = "0.2.141"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
+
+[[package]]
+name = "log"
+version = "0.4.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "memoffset"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "num-traits"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "num_cpus"
+version = "1.15.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b"
+dependencies = [
+ "hermit-abi 0.2.6",
+ "libc",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.17.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3"
+
+[[package]]
+name = "oorandom"
+version = "11.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575"
+
+[[package]]
+name = "os_str_bytes"
+version = "6.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ceedf44fb00f2d1984b0bc98102627ce622e083e49a5bacdb3e514fa4238e267"
+
+[[package]]
+name = "plotters"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2538b639e642295546c50fcd545198c9d64ee2a38620a628724a3b266d5fbf97"
+dependencies = [
+ "num-traits",
+ "plotters-backend",
+ "plotters-svg",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "plotters-backend"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "193228616381fecdc1224c62e96946dfbc73ff4384fba576e052ff8c1bea8142"
+
+[[package]]
+name = "plotters-svg"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f9a81d2759aae1dae668f783c308bc5c8ebd191ff4184aaa1b37f65a6ae5a56f"
+dependencies = [
+ "plotters-backend",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.56"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "radium"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09"
+
+[[package]]
+name = "rayon"
+version = "1.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b"
+dependencies = [
+ "either",
+ "rayon-core",
+]
+
+[[package]]
+name = "rayon-core"
+version = "1.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d"
+dependencies = [
+ "crossbeam-channel",
+ "crossbeam-deque",
+ "crossbeam-utils",
+ "num_cpus",
+]
+
+[[package]]
+name = "regex"
+version = "1.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d"
+dependencies = [
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.6.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
+
+[[package]]
+name = "roxmltree"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d8f595a457b6b8c6cda66a48503e92ee8d19342f905948f29c383200ec9eb1d8"
+dependencies = [
+ "xmlparser",
+]
+
+[[package]]
+name = "ryu"
+version = "1.0.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041"
+
+[[package]]
+name = "same-file"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "scopeguard"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
+
+[[package]]
+name = "serde"
+version = "1.0.159"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c04e8343c3daeec41f58990b9d77068df31209f2af111e059e9fe9646693065"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.159"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c614d17805b093df4b147b51339e7e44bf05ef59fba1e45d83500bcfb4d8585"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.13",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.95"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d721eca97ac802aa7777b701877c8004d950fc142651367300d21c1cc0194744"
+dependencies = [
+ "indexmap",
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "syn"
+version = "1.0.109"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "syn"
+version = "2.0.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c9da457c5285ac1f936ebd076af6dac17a61cfe7826f2076b4d015cf47bc8ec"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "tap"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
+
+[[package]]
+name = "textwrap"
+version = "0.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d"
+
+[[package]]
+name = "tinytemplate"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc"
+dependencies = [
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4"
+
+[[package]]
+name = "walkdir"
+version = "2.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698"
+dependencies = [
+ "same-file",
+ "winapi-util",
+]
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.84"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b"
+dependencies = [
+ "cfg-if",
+ "wasm-bindgen-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.84"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9"
+dependencies = [
+ "bumpalo",
+ "log",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.84"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.84"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.84"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d"
+
+[[package]]
+name = "web-sys"
+version = "0.3.61"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-util"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
+[[package]]
+name = "wyz"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed"
+dependencies = [
+ "tap",
+]
+
+[[package]]
+name = "xmlparser"
+version = "0.13.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4d25c75bf9ea12c4040a97f829154768bbbce366287e2dc044af160cd79a13fd"
diff --git a/nixpkgs/pkgs/development/libraries/libdovi/default.nix b/nixpkgs/pkgs/development/libraries/libdovi/default.nix
new file mode 100644
index 000000000000..c70a217f6fce
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdovi/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, rustPlatform
+, fetchCrate
+, cargo-c
+, rust
+, stdenv
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "libdovi";
+  version = "3.1.2";
+
+  src = fetchCrate {
+    pname = "dolby_vision";
+    inherit version;
+    hash = "sha256-eLmGswgxtmqGc9f8l/9qvwSm+8bi06q+Ryvo7Oyr7s0=";
+  };
+
+  cargoLock.lockFile = ./Cargo.lock;
+
+  postPatch = ''
+    ln -s ${./Cargo.lock} Cargo.lock
+  '';
+
+  nativeBuildInputs = [ cargo-c ];
+
+  buildPhase = ''
+    runHook preBuild
+    ${rust.envVars.setEnv} cargo cbuild -j $NIX_BUILD_CORES --release --frozen --prefix=${placeholder "out"} --target ${stdenv.hostPlatform.rust.rustcTarget}
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    ${rust.envVars.setEnv} cargo cinstall -j $NIX_BUILD_CORES --release --frozen --prefix=${placeholder "out"} --target ${stdenv.hostPlatform.rust.rustcTarget}
+    runHook postInstall
+  '';
+
+  checkPhase = ''
+    runHook preCheck
+    ${rust.envVars.setEnv} cargo ctest -j $NIX_BUILD_CORES --release --frozen --prefix=${placeholder "out"} --target ${stdenv.hostPlatform.rust.rustcTarget}
+    runHook postCheck
+  '';
+
+  meta = with lib; {
+    description = "C library for Dolby Vision metadata parsing and writing";
+    homepage = "https://crates.io/crates/dolby_vision";
+    license = licenses.mit;
+    maintainers = with maintainers; [ kranzes ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdrm/default.nix b/nixpkgs/pkgs/development/libraries/libdrm/default.nix
new file mode 100644
index 000000000000..8d8a932f4994
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdrm/default.nix
@@ -0,0 +1,63 @@
+{ stdenv, lib, fetchurl, pkg-config, meson, ninja, docutils
+, libpthreadstubs, libpciaccess
+, withValgrind ? lib.meta.availableOn stdenv.hostPlatform valgrind-light, valgrind-light
+, gitUpdater
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libdrm";
+  version = "2.4.120";
+
+  src = fetchurl {
+    url = "https://dri.freedesktop.org/${pname}/${pname}-${version}.tar.xz";
+    hash = "sha256-O/VTY/dsclCUZEGrUdOmzArlGAVcD/AXMkq3bN77Mno=";
+  };
+
+  outputs = [ "out" "dev" "bin" ];
+
+  nativeBuildInputs = [ pkg-config meson ninja docutils ];
+  buildInputs = [ libpthreadstubs libpciaccess ]
+    ++ lib.optional withValgrind valgrind-light;
+
+  mesonFlags = [
+    "-Dinstall-test-programs=true"
+    "-Dcairo-tests=disabled"
+    (lib.mesonEnable "omap" stdenv.hostPlatform.isLinux)
+    (lib.mesonEnable "valgrind" withValgrind)
+  ] ++ lib.optionals stdenv.hostPlatform.isAarch [
+    "-Dtegra=enabled"
+  ] ++ lib.optionals (!stdenv.hostPlatform.isLinux) [
+    "-Detnaviv=disabled"
+  ];
+
+  passthru = {
+    updateScript = gitUpdater {
+      url = "https://gitlab.freedesktop.org/mesa/drm.git";
+      rev-prefix = "libdrm-";
+      # Skip versions like libdrm-2_0_2 that happen to go last when
+      # sorted.
+      ignoredVersions = "_";
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://gitlab.freedesktop.org/mesa/drm";
+    downloadPage = "https://dri.freedesktop.org/libdrm/";
+    description = "Direct Rendering Manager library and headers";
+    longDescription = ''
+      A userspace library for accessing the DRM (Direct Rendering Manager) on
+      Linux, BSD and other operating systems that support the ioctl interface.
+      The library provides wrapper functions for the ioctls to avoid exposing
+      the kernel interface directly, and for chipsets with drm memory manager,
+      support for tracking relocations and buffers.
+      New functionality in the kernel DRM drivers typically requires a new
+      libdrm, but a new libdrm will always work with an older kernel.
+
+      libdrm is a low-level library, typically used by graphics drivers such as
+      the Mesa drivers, the X drivers, libva and similar projects.
+    '';
+    license = licenses.mit;
+    platforms = lib.subtractLists platforms.darwin platforms.unix;
+    maintainers = with maintainers; [ primeos ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdv/default.nix b/nixpkgs/pkgs/development/libraries/libdv/default.nix
new file mode 100644
index 000000000000..49c2ab1bdfa7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdv/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchurl, popt }:
+
+stdenv.mkDerivation rec {
+  pname = "libdv";
+  version = "1.0.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libdv/libdv-${version}.tar.gz";
+    sha256 = "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3";
+  };
+
+  # Disable priority scheduling on Darwin because it doesn’t support sched_setscheduler.
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace encodedv/dvconnect.c \
+      --replace '#ifdef _SC_PRIORITY_SCHEDULING' '#if 0'
+  '';
+
+  configureFlags = [
+    "--disable-asm"
+    "--disable-sdl"
+    "--disable-gtk"
+    "--disable-xv"
+    "--disable-gprof"
+  ];
+
+  buildInputs = [ popt ];
+
+  meta = with lib; {
+    description = "Software decoder for DV format video, as defined by the IEC 61834 and SMPTE 314M standards";
+    homepage = "https://sourceforge.net/projects/libdv/";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdvbcsa/default.nix b/nixpkgs/pkgs/development/libraries/libdvbcsa/default.nix
new file mode 100644
index 000000000000..7da80a75d6a7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdvbcsa/default.nix
@@ -0,0 +1,22 @@
+{lib, stdenv, fetchurl}:
+
+stdenv.mkDerivation rec {
+  pname = "libdvbcsa";
+  version = "1.1.0";
+
+  src = fetchurl {
+    url = "http://get.videolan.org/libdvbcsa/${version}/${pname}-${version}.tar.gz";
+    sha256 = "4db78af5cdb2641dfb1136fe3531960a477c9e3e3b6ba19a2754d046af3f456d";
+  };
+
+  doCheck = true;
+
+  meta = {
+    description = "A free implementation of the DVB Common Scrambling Algorithm with encryption and decryption capabilities";
+    homepage = "http://www.videolan.org/developers/libdvbcsa.html";
+    platforms = lib.platforms.unix;
+    license = lib.licenses.gpl2Only;
+    maintainers = with lib.maintainers; [ melias122 ];
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdvbpsi/default.nix b/nixpkgs/pkgs/development/libraries/libdvbpsi/default.nix
new file mode 100644
index 000000000000..5d539a7a4882
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdvbpsi/default.nix
@@ -0,0 +1,19 @@
+{lib, stdenv, fetchurl}:
+
+stdenv.mkDerivation rec {
+  pname = "libdvbpsi";
+  version = "1.3.3";
+
+  src = fetchurl {
+    url = "http://get.videolan.org/libdvbpsi/${version}/${pname}-${version}.tar.bz2";
+    sha256 = "04h1l3vrkrdsrvkgzcr51adk10g6hxcxvgjphyyxz718ry5rkd82";
+  };
+
+  meta = {
+    description = "A simple library designed for decoding and generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818 and ITU-T H.222.0";
+    homepage = "http://www.videolan.org/developers/libdvbpsi.html";
+    platforms = lib.platforms.unix;
+    license = lib.licenses.lgpl21;
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdvdcss/default.nix b/nixpkgs/pkgs/development/libraries/libdvdcss/default.nix
new file mode 100644
index 000000000000..b43c0ccdd0fe
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdvdcss/default.nix
@@ -0,0 +1,20 @@
+{lib, stdenv, fetchurl, IOKit}:
+
+stdenv.mkDerivation rec {
+  pname = "libdvdcss";
+  version = "1.4.3";
+
+  buildInputs = lib.optional stdenv.isDarwin IOKit;
+
+  src = fetchurl {
+    url = "http://get.videolan.org/libdvdcss/${version}/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-IzzJL13AHF06lvWzWCvn1c7lo1pS06CBWHRdPYYHAHk=";
+  };
+
+  meta = with lib; {
+    homepage = "http://www.videolan.org/developers/libdvdcss.html";
+    description = "A library for decrypting DVDs";
+    license = licenses.gpl2;
+    platforms = with platforms; linux ++ darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdvdnav/4.2.1.nix b/nixpkgs/pkgs/development/libraries/libdvdnav/4.2.1.nix
new file mode 100644
index 000000000000..0285ff22fe2f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdvdnav/4.2.1.nix
@@ -0,0 +1,30 @@
+{lib, stdenv, fetchurl, pkg-config, libdvdread}:
+
+stdenv.mkDerivation rec {
+  pname = "libdvdnav";
+  version = "4.2.1";
+
+  src = fetchurl {
+    url = "http://dvdnav.mplayerhq.hu/releases/libdvdnav-${version}.tar.xz";
+    sha256 = "7fca272ecc3241b6de41bbbf7ac9a303ba25cb9e0c82aa23901d3104887f2372";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [libdvdread];
+
+  configureScript = "./configure2"; # wtf?
+
+  preConfigure = ''
+    mkdir -p $out
+  '';
+
+  meta = {
+    homepage = "http://dvdnav.mplayerhq.hu/";
+    description = "A library that implements DVD navigation features such as DVD menus";
+    license = lib.licenses.gpl2;
+    maintainers = [ lib.maintainers.wmertens ];
+    platforms = lib.platforms.linux;
+  };
+
+  passthru = { inherit libdvdread; };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdvdnav/default.nix b/nixpkgs/pkgs/development/libraries/libdvdnav/default.nix
new file mode 100644
index 000000000000..8414605593de
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdvdnav/default.nix
@@ -0,0 +1,24 @@
+{lib, stdenv, fetchurl, pkg-config, libdvdread}:
+
+stdenv.mkDerivation rec {
+  pname = "libdvdnav";
+  version = "6.1.1";
+
+  src = fetchurl {
+    url = "http://get.videolan.org/libdvdnav/${version}/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-wZGnR1lH0yP/doDPksD7G+gjdwGIXzdlbGTQTpjRjUg=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [libdvdread];
+
+  meta = {
+    homepage = "http://dvdnav.mplayerhq.hu/";
+    description = "A library that implements DVD navigation features such as DVD menus";
+    license = lib.licenses.gpl2;
+    maintainers = [ lib.maintainers.wmertens ];
+    platforms = lib.platforms.unix;
+  };
+
+  passthru = { inherit libdvdread; };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdvdread/4.9.9.nix b/nixpkgs/pkgs/development/libraries/libdvdread/4.9.9.nix
new file mode 100644
index 000000000000..87ab724796c7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdvdread/4.9.9.nix
@@ -0,0 +1,27 @@
+{lib, stdenv, fetchurl, libdvdcss}:
+
+stdenv.mkDerivation rec {
+  pname = "libdvdread";
+  version = "4.9.9";
+
+  src = fetchurl {
+    url = "http://dvdnav.mplayerhq.hu/releases/libdvdread-${version}.tar.xz";
+    sha256 = "d91275471ef69d488b05cf15c60e1cd65e17648bfc692b405787419f47ca424a";
+  };
+
+  buildInputs = [libdvdcss];
+
+  NIX_LDFLAGS = "-ldvdcss";
+
+  postInstall = ''
+    ln -s dvdread $out/include/libdvdread
+  '';
+
+  meta = {
+    homepage = "http://dvdnav.mplayerhq.hu/";
+    description = "A library for reading DVDs";
+    license = lib.licenses.gpl2;
+    maintainers = [ lib.maintainers.wmertens ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdvdread/default.nix b/nixpkgs/pkgs/development/libraries/libdvdread/default.nix
new file mode 100644
index 000000000000..f07af1fa575b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdvdread/default.nix
@@ -0,0 +1,27 @@
+{lib, stdenv, fetchurl, libdvdcss}:
+
+stdenv.mkDerivation rec {
+  pname = "libdvdread";
+  version = "6.1.3";
+
+  src = fetchurl {
+    url = "http://get.videolan.org/libdvdread/${version}/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-zjVFSZeiCMvlDpEjLw5z+xrDRxllgToTuHMKjxihU2k=";
+  };
+
+  buildInputs = [libdvdcss];
+
+  NIX_LDFLAGS = "-ldvdcss";
+
+  postInstall = ''
+    ln -s dvdread $out/include/libdvdread
+  '';
+
+  meta = {
+    homepage = "http://dvdnav.mplayerhq.hu/";
+    description = "A library for reading DVDs";
+    license = lib.licenses.gpl2;
+    maintainers = [ lib.maintainers.wmertens ];
+    platforms = with lib.platforms; linux ++ darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdwarf/20210528.nix b/nixpkgs/pkgs/development/libraries/libdwarf/20210528.nix
new file mode 100644
index 000000000000..25d14de99ae2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdwarf/20210528.nix
@@ -0,0 +1,8 @@
+{ callPackage, zlib, libelf }:
+callPackage ./common.nix rec {
+  version = "20210528";
+  url = "https://www.prevanders.net/libdwarf-${version}.tar.gz";
+  hash = "sha512-4PnIhVQFPubBsTM5YIkRieeCDEpN3DArfmN1Skzc/CrLG0tgg6ci0SBKdemU//NAHswlG4w7JAkPjLQEbZD4cA==";
+  buildInputs = [ zlib libelf ];
+  knownVulnerabilities = [ "CVE-2022-32200" "CVE-2022-39170" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdwarf/common.nix b/nixpkgs/pkgs/development/libraries/libdwarf/common.nix
new file mode 100644
index 000000000000..ebf59ccd03f9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdwarf/common.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchurl, buildInputs, hash, version, libelf, url, knownVulnerabilities }:
+
+stdenv.mkDerivation rec {
+  pname = "libdwarf";
+  inherit version;
+
+  src = fetchurl {
+    inherit url hash;
+  };
+
+  configureFlags = [ "--enable-shared" "--disable-nonshared" ];
+
+  inherit buildInputs;
+
+  outputs = [ "bin" "lib" "dev" "out" ];
+
+  meta = {
+    homepage = "https://github.com/davea42/libdwarf-code";
+    platforms = lib.platforms.unix;
+    license = lib.licenses.lgpl21Plus;
+    maintainers = [ lib.maintainers.atry ];
+    inherit knownVulnerabilities;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdwarf/default.nix b/nixpkgs/pkgs/development/libraries/libdwarf/default.nix
new file mode 100644
index 000000000000..006933a4de03
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdwarf/default.nix
@@ -0,0 +1,12 @@
+{ callPackage
+, zlib
+, zstd
+}:
+
+callPackage ./common.nix rec {
+  version = "0.9.0";
+  url = "https://www.prevanders.net/libdwarf-${version}.tar.xz";
+  hash = "sha512-KC2Q38nacE62SkuhFB8q5mD+6xS78acjdzhmmOMSSSi0SmkU2OiOYUGrCINc5yOtCQqFOtV9vLQ527pXJV+1iQ==";
+  buildInputs = [ zlib zstd ];
+  knownVulnerabilities = [];
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdwg/default.nix b/nixpkgs/pkgs/development/libraries/libdwg/default.nix
new file mode 100644
index 000000000000..969b5d9636f2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdwg/default.nix
@@ -0,0 +1,32 @@
+{lib, stdenv, fetchurl, indent}:
+
+stdenv.mkDerivation rec {
+  pname = "libdwg";
+  version = "0.6";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libdwg/libdwg-${version}.tar.bz2";
+    sha256 = "0l8ks1x70mkna1q7mzy1fxplinz141bd24qhrm1zkdil74mcsryc";
+  };
+
+  nativeBuildInputs = [ indent ];
+
+  hardeningDisable = [ "format" ];
+
+  # remove forbidden references to $TMPDIR
+  preFixup = lib.optionalString stdenv.isLinux ''
+    for f in "$out"/bin/*; do
+      if isELF "$f"; then
+        patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$f"
+      fi
+    done
+  '';
+
+  meta = {
+    description = "Library reading dwg files";
+    homepage = "http://libdwg.sourceforge.net/en/";
+    license = lib.licenses.gpl3;
+    maintainers = [lib.maintainers.marcweber];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libdynd/default.nix b/nixpkgs/pkgs/development/libraries/libdynd/default.nix
new file mode 100644
index 000000000000..8746ea42882c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdynd/default.nix
@@ -0,0 +1,42 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "libdynd";
+  version = "0.7.2";
+
+  src = fetchFromGitHub {
+    owner = "libdynd";
+    repo = "libdynd";
+    rev = "v${version}";
+    sha256 = "0fkd5rawqni1cq51fmr76iw7ll4fmbahfwv4rglnsabbkylf73pr";
+  };
+
+  cmakeFlags = [
+    "-DDYND_BUILD_BENCHMARKS=OFF"
+  ];
+
+  env.NIX_CFLAGS_COMPILE = builtins.toString [
+    # added to fix build with gcc7+
+    "-Wno-error=implicit-fallthrough"
+    "-Wno-error=nonnull"
+    "-Wno-error=tautological-compare"
+    "-Wno-error=class-memaccess"
+    "-Wno-error=parentheses"
+    "-Wno-error=deprecated-copy"
+    # Needed with GCC 12
+    "-Wno-error=deprecated-declarations"
+    "-Wno-error=maybe-uninitialized"
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  outputs = [ "out" "dev" ];
+  outputDoc = "dev";
+
+  meta = with lib; {
+    description = "C++ dynamic ndarray library, with Python exposure";
+    homepage = "http://libdynd.org";
+    license = licenses.bsd2;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libe-book/default.nix b/nixpkgs/pkgs/development/libraries/libe-book/default.nix
new file mode 100644
index 000000000000..f066e470568b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libe-book/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, stdenv
+, fetchurl
+, gperf
+, pkg-config
+, librevenge
+, libxml2
+, boost
+, icu
+, cppunit
+, zlib
+, liblangtag
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libe-book";
+  version = "0.1.3";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libebook/libe-book-${version}/libe-book-${version}.tar.xz";
+    hash = "sha256-fo2P808ngxrKO8b5zFMsL5DSBXx3iWO4hP89HjTf4fk=";
+  };
+
+  # restore compatibility with icu68+
+  postPatch = ''
+    substituteInPlace src/lib/EBOOKCharsetConverter.cpp --replace \
+      "TRUE, TRUE, &status)" \
+      "true, true, &status)"
+  '';
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [
+    gperf
+    librevenge
+    libxml2
+    boost
+    icu
+    cppunit
+    zlib
+    liblangtag
+  ];
+
+  env.NIX_CFLAGS_COMPILE = "-Wno-error=unused-function";
+
+  meta = with lib; {
+    description = "Library for import of reflowable e-book formats";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ raskin ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libe57format/default.nix b/nixpkgs/pkgs/development/libraries/libe57format/default.nix
new file mode 100644
index 000000000000..cbbdd4dcc026
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libe57format/default.nix
@@ -0,0 +1,73 @@
+{
+  lib, stdenv,
+  cmake,
+  fetchpatch,
+  fetchFromGitHub,
+  boost,
+  xercesc,
+  icu,
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libe57format";
+  version = "2.2.0";
+
+  src = fetchFromGitHub {
+    owner = "asmaloney";
+    repo = "libE57Format";
+    rev = "v${version}";
+    sha256 = "15l23spjvak5h3n7aj3ggy0c3cwcg8mvnc9jlbd9yc2ra43bx7bp";
+  };
+
+  patches = [
+    # gcc11 header fix
+    (fetchpatch {
+      url = "https://github.com/asmaloney/libE57Format/commit/13f6a16394ce3eb50ea4cd21f31f77f53294e8d0.patch";
+      sha256 = "sha256-4vVhKrCxnWO106DSAk+xxo4uk6zC89m9VQAPaDJ8Ed4=";
+    })
+  ];
+  CXXFLAGS = [
+    # GCC 13: error: 'int16_t' has not been declared in 'std'
+    "-include cstdint"
+  ];
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = [
+    boost
+    icu
+  ];
+
+  propagatedBuildInputs = [
+    # Necessary for projects that try to find libE57Format via CMake
+    # due to the way that libe57format's CMake config is written.
+    xercesc
+  ];
+
+  # The build system by default builds ONLY static libraries, and with
+  # `-DE57_BUILD_SHARED=ON` builds ONLY shared libraries, see:
+  #     https://github.com/asmaloney/libE57Format/issues/48
+  #     https://github.com/asmaloney/libE57Format/blob/f657d470da5f0d185fe371c4c011683f6e30f0cb/CMakeLists.txt#L82-L89
+  # We support building both by building statically and then
+  # building an .so file here manually.
+  # The way this is written makes this Linux-only for now.
+  postInstall = ''
+    cd $out/lib
+    g++ -Wl,--no-undefined -shared -o libE57FormatShared.so -L. -Wl,-whole-archive -lE57Format -Wl,-no-whole-archive -lxerces-c
+    mv libE57FormatShared.so libE57Format.so
+
+    if [ "$dontDisableStatic" -ne "1" ]; then
+      rm libE57Format.a
+    fi
+  '';
+
+  meta = with lib; {
+    description = "Library for reading & writing the E57 file format";
+    homepage = "https://github.com/asmaloney/libE57Format";
+    license = licenses.boost;
+    maintainers = with maintainers; [ chpatrick nh2 ];
+    platforms = platforms.linux; # because of the .so buiding in `postInstall` above
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libeatmydata/default.nix b/nixpkgs/pkgs/development/libraries/libeatmydata/default.nix
new file mode 100644
index 000000000000..7be484538ab1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libeatmydata/default.nix
@@ -0,0 +1,53 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch2
+, autoreconfHook
+, strace
+, which
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libeatmydata";
+  version = "131";
+
+  src = fetchFromGitHub {
+    owner = "stewartsmith";
+    repo = pname;
+    rev = "refs/tags/v${version}";
+    sha256 = "sha256-0lrYDW51/KSr809whGwg9FYhzcLRfmoxipIgrK1zFCc=";
+  };
+
+  patches = [
+    # Fixes "error: redefinition of 'open'" on musl
+    (fetchpatch2 {
+      url = "https://raw.githubusercontent.com/void-linux/void-packages/861ac185a6b60134292ff93d40e40b5391d0aa8e/srcpkgs/libeatmydata/patches/musl.patch";
+      hash = "sha256-MZfTgf2Qn94UpPlYNRM2zK99iKQorKQrlbU5/1WJhJM=";
+    })
+  ];
+
+  postPatch = ''
+    patchShebangs .
+  '';
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  nativeCheckInputs = [
+    strace
+    which
+  ];
+
+  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Small LD_PRELOAD library to disable fsync and friends";
+    homepage = "https://www.flamingspork.com/projects/libeatmydata/";
+    license = licenses.gpl3Plus;
+    mainProgram = "eatmydata";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libeb/default.nix b/nixpkgs/pkgs/development/libraries/libeb/default.nix
new file mode 100644
index 000000000000..fe0011f9c997
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libeb/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchurl, perl, zlib }:
+stdenv.mkDerivation rec {
+  pname = "libeb";
+  version = "4.4.3";
+
+  src = fetchurl {
+    url = "ftp://ftp.sra.co.jp/pub/misc/eb/eb-${version}.tar.bz2";
+    sha256 = "0psbdzirazfnn02hp3gsx7xxss9f1brv4ywp6a15ihvggjki1rxb";
+  };
+
+  nativeBuildInputs = [ perl ];
+  buildInputs = [ zlib ];
+
+  meta = with lib; {
+    description = "C library for accessing Japanese CD-ROM books";
+    longDescription = ''
+      The EB library is a library for accessing CD-ROM books, which are a
+      common way to distribute electronic dictionaries in Japan.  It supports
+      the EB, EBG, EBXA, EBXA-C, S-EBXA and EPWING formats.
+    '';
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ gebner ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libebml/default.nix b/nixpkgs/pkgs/development/libraries/libebml/default.nix
new file mode 100644
index 000000000000..3478217d7f6b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libebml/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "libebml";
+  version = "1.4.5";
+
+  src = fetchFromGitHub {
+    owner  = "Matroska-Org";
+    repo   = "libebml";
+    rev    = "release-${version}";
+    sha256 = "sha256-PIVBePTWceMgiENdaL9lvXIL/RQIrtg7l0OG2tO0SU8=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=YES"
+    "-DCMAKE_INSTALL_PREFIX="
+  ];
+
+  meta = with lib; {
+    description = "Extensible Binary Meta Language library";
+    homepage = "https://dl.matroska.org/downloads/libebml/";
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libebur128/default.nix b/nixpkgs/pkgs/development/libraries/libebur128/default.nix
new file mode 100644
index 000000000000..c91cb23189f7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libebur128/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, cmake, speexdsp, pkg-config }:
+
+stdenv.mkDerivation rec {
+  version = "1.2.6";
+  pname = "libebur128";
+
+  src = fetchFromGitHub {
+    owner = "jiixyj";
+    repo = "libebur128";
+    rev = "v${version}";
+    sha256 = "sha256-UKO2k+kKH/dwt2xfaYMrH/GXjEkIrnxh1kGG/3P5d3Y=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ speexdsp ];
+
+  # https://github.com/jiixyj/libebur128/issues/121
+  postPatch = ''
+    substituteInPlace ebur128/libebur128.pc.cmake \
+      --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
+  '';
+
+  meta = with lib; {
+    description = "Implementation of the EBU R128 loudness standard";
+    homepage = "https://github.com/jiixyj/libebur128";
+    license = licenses.mit;
+    maintainers = [ maintainers.andrewrk ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libedit/01-cygwin.patch b/nixpkgs/pkgs/development/libraries/libedit/01-cygwin.patch
new file mode 100644
index 000000000000..33bd39ed61e5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libedit/01-cygwin.patch
@@ -0,0 +1,25 @@
+--- libedit-20120311-3.0/src/chartype.h	2012-03-11 10:54:58.000000000 +0100
++++ libedit-20120311-3.0/src/chartype.h	2012-05-03 19:00:20.651847423 +0200
+@@ -56,9 +56,11 @@
+ /* Oh for a <uchar.h> with char32_t and __STDC_UTF_32__ in it...
+  * ref: ISO/IEC DTR 19769
+  */
++#ifndef __CYGWIN__
+ #if WCHAR_MAX < INT32_MAX
+ #warning Build environment does not support non-BMP characters
+ #endif
++#endif
+ 
+ #ifndef HAVE_WCSDUP
+ wchar_t *wcsdup(const wchar_t *s);
+--- libedit-20120311-3.0/src/editline/readline.h	2011-02-26 23:42:59.000000000 +0100
++++ libedit-20120311-3.0/src/editline/readline.h	2012-05-03 19:00:49.211244803 +0200
+@@ -75,7 +75,7 @@ typedef KEYMAP_ENTRY *Keymap;
+ 
+ #ifndef CTRL
+ #include <sys/ioctl.h>
+-#if !defined(__sun) && !defined(__hpux) && !defined(_AIX)
++#if !defined(__sun) && !defined(__hpux) && !defined(_AIX) && !defined(__CYGWIN__)
+ #include <sys/ttydefaults.h>
+ #endif
+ #ifndef CTRL
diff --git a/nixpkgs/pkgs/development/libraries/libedit/default.nix b/nixpkgs/pkgs/development/libraries/libedit/default.nix
new file mode 100644
index 000000000000..97636e36e848
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libedit/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchurl, ncurses }:
+
+stdenv.mkDerivation rec {
+  pname = "libedit";
+  version = "20230828-3.1";
+
+  src = fetchurl {
+    url = "https://thrysoee.dk/editline/${pname}-${version}.tar.gz";
+    sha256 = "sha256-TugYK25WkpDn0fRPD3jayHFrNfZWt2Uo9pnGnJiBTa0=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  # Have `configure' avoid `/usr/bin/nroff' in non-chroot builds.
+  # NROFF = "${groff}/bin/nroff";
+
+  # GCC automatically include `stdc-predefs.h` while Clang does not do
+  # this by default. While Musl is ISO 10646 compliant, doesn't define
+  # __STDC_ISO_10646__. This definition is in `stdc-predefs.h` that's
+  # why libedit builds just fine with GCC and Musl.
+  # There is a DR to fix this issue with Clang which is not merged
+  # yet.
+  # https://reviews.llvm.org/D137043
+  env.NIX_CFLAGS_COMPILE =
+    lib.optionalString (stdenv.targetPlatform.isMusl && stdenv.cc.isClang)
+      "-D__STDC_ISO_10646__=201103L";
+
+  patches = [ ./01-cygwin.patch ];
+
+  propagatedBuildInputs = [ ncurses ];
+
+  postInstall = ''
+    find $out/lib -type f | grep '\.\(la\|pc\)''$' | xargs sed -i \
+      -e 's,-lncurses[a-z]*,-L${ncurses.out}/lib -lncursesw,g'
+  '';
+
+  meta = with lib; {
+    homepage = "http://www.thrysoee.dk/editline/";
+    description = "A port of the NetBSD Editline library (libedit)";
+    license = licenses.bsd3;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libee/default.nix b/nixpkgs/pkgs/development/libraries/libee/default.nix
new file mode 100644
index 000000000000..1269f6f0eff3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libee/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl, pkg-config, libestr }:
+stdenv.mkDerivation rec {
+  pname = "libee";
+  version = "0.4.1";
+
+  src = fetchurl {
+    url = "http://www.libee.org/download/files/download/libee-${version}.tar.gz";
+    sha256 = "09xhgzmsq0g3jsyj24vy67bhzk2fv971w5ixdkhfwgar70cw1nn0";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libestr];
+
+  meta = {
+    description = "An Event Expression Library inspired by CEE";
+    homepage = "http://www.libee.org/";
+    license = lib.licenses.lgpl21Plus;
+    mainProgram = "libee-convert";
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libei/default.nix b/nixpkgs/pkgs/development/libraries/libei/default.nix
new file mode 100644
index 000000000000..18bf680ca840
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libei/default.nix
@@ -0,0 +1,69 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchFromGitLab
+, attr
+, libevdev
+, libxkbcommon
+, meson
+, ninja
+, pkg-config
+, protobuf
+, protobufc
+, python3
+, systemd
+}:
+let
+  munit = fetchFromGitHub {
+    owner = "nemequ";
+    repo = "munit";
+    rev = "fbbdf1467eb0d04a6ee465def2e529e4c87f2118";
+    hash = "sha256-qm30C++rpLtxBhOABBzo+6WILSpKz2ibvUvoe8ku4ow=";
+  };
+in
+stdenv.mkDerivation rec {
+  pname = "libei";
+  version = "1.2.0";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "libinput";
+    repo = "libei";
+    rev = version;
+    hash = "sha256-MHPWEBMtxoEJ8j3LyDPD+m3DsO9u8nE+/pPtRHHXEXA=";
+  };
+
+  buildInputs = [
+    libevdev
+    libxkbcommon
+    protobuf
+    protobufc
+    systemd
+  ];
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    (python3.withPackages(ps: with ps; [
+      attrs
+      jinja2
+      pytest
+      python-dbusmock
+      strenum
+      structlog
+    ]))
+  ];
+
+  postPatch = ''
+    ln -s "${munit}" ./subprojects/munit
+    patchShebangs ./proto/ei-scanner
+  '';
+
+  meta = with lib; {
+    description = "Library for Emulated Input";
+    homepage = "https://gitlab.freedesktop.org/libinput/libei";
+    license = licenses.mit;
+    maintainers = [ maintainers.pedrohlc ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libelf/default.nix b/nixpkgs/pkgs/development/libraries/libelf/default.nix
new file mode 100644
index 000000000000..fdfa4fda0def
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libelf/default.nix
@@ -0,0 +1,65 @@
+{ lib, stdenv
+, fetchurl, autoreconfHook, gettext, freebsd, netbsd
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libelf";
+  version = "0.8.13";
+
+  src = fetchurl {
+    url = "https://fossies.org/linux/misc/old/${pname}-${version}.tar.gz";
+    sha256 = "0vf7s9dwk2xkmhb79aigqm0x0yfbw1j0b9ksm51207qwr179n6jr";
+  };
+
+  patches = [
+    ./dont-hardcode-ar.patch
+    # Fix warnings from preprocessor instructions.
+    # https://github.com/NixOS/nixpkgs/issues/59929
+    ./preprocessor-warnings.patch
+    # `configure` defines a test `main` with an implicit `int` return, which clang 16 disallows.
+    ./fix-configure-main.patch
+  ];
+
+  enableParallelBuilding = true;
+  # Lacks dependencies:
+  #   mkdir ...-libelf-0.8.13/lib
+  #   mkdir ...-libelf-0.8.13/lib
+  # mkdir: cannot create directory '...-libelf-0.8.13/lib': File exists
+  enableParallelInstalling = false;
+
+  doCheck = true;
+
+  preConfigure = if !stdenv.hostPlatform.useAndroidPrebuilt then null else ''
+    sed -i 's|DISTSUBDIRS = lib po|DISTSUBDIRS = lib|g' Makefile.in
+    sed -i 's|SUBDIRS = lib @POSUB@|SUBDIRS = lib|g' Makefile.in
+  '';
+
+  configureFlags = []
+       # Configure check for dynamic lib support is broken, see
+       # http://lists.uclibc.org/pipermail/uclibc-cvs/2005-August/019383.html
+    ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "mr_cv_target_elf=yes"
+       # Libelf's custom NLS macros fail to determine the catalog file extension
+       # on Darwin, so disable NLS for now.
+    ++ lib.optional stdenv.hostPlatform.isDarwin "--disable-nls";
+
+  strictDeps = true;
+  nativeBuildInputs =
+    (if stdenv.hostPlatform.isFreeBSD then [ freebsd.gencat ]
+     else if stdenv.hostPlatform.isNetBSD then [ netbsd.gencat ]
+     else [ gettext ])
+       # The provided `configure` script fails on clang 16 because some tests have a `main`
+       # returning an implicit `int`, which clang 16 treats as an error. Running `autoreconf` fixes
+       # the test and allows `configure` to detect clang properly.
+    ++ [ autoreconfHook ];
+
+  meta = {
+    description = "ELF object file access library";
+
+    homepage = "https://github.com/Distrotech/libelf";
+
+    license = lib.licenses.lgpl2Plus;
+
+    platforms = lib.platforms.all;
+    maintainers = [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libelf/dont-hardcode-ar.patch b/nixpkgs/pkgs/development/libraries/libelf/dont-hardcode-ar.patch
new file mode 100644
index 000000000000..e282d9005dbb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libelf/dont-hardcode-ar.patch
@@ -0,0 +1,11 @@
+--- a/lib/Makefile.in
++++ b/lib/Makefile.in
+@@ -27,7 +27,7 @@ installdirs = $(libdir) $(includedir) $(includedir)/libelf
+ 
+ CC = @CC@
+ LD = @LD@
+-AR = ar
++AR ?= ar
+ MV = mv -f
+ RM = rm -f
+ LN_S = @LN_S@
diff --git a/nixpkgs/pkgs/development/libraries/libelf/fix-configure-main.patch b/nixpkgs/pkgs/development/libraries/libelf/fix-configure-main.patch
new file mode 100644
index 000000000000..cc7e5f4c41d1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libelf/fix-configure-main.patch
@@ -0,0 +1,12 @@
+diff -ur a/configure.in b/configure.in
+--- a/configure.in	2008-05-23 04:17:56.000000000 -0400
++++ b/configure.in	2023-06-01 19:16:04.801921924 -0400
+@@ -282,7 +282,7 @@
+ #define memmove(d,s,n) bcopy((s),(d),(n))
+ #endif
+ extern int strcmp();
+-main() {
++int main() {
+   char buf[] = "0123456789";
+   memmove(buf + 1, buf, 9);
+   if (strcmp(buf, "0012345678")) exit(1);
diff --git a/nixpkgs/pkgs/development/libraries/libelf/preprocessor-warnings.patch b/nixpkgs/pkgs/development/libraries/libelf/preprocessor-warnings.patch
new file mode 100644
index 000000000000..e04c8ee202a0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libelf/preprocessor-warnings.patch
@@ -0,0 +1,264 @@
+diff --git a/lib/elf_repl.h b/lib/elf_repl.h
+index c5cf90f..7e1e8df 100644
+--- a/lib/elf_repl.h
++++ b/lib/elf_repl.h
+@@ -45,7 +45,7 @@ typedef __libelf_u32_t		Elf32_Word;
+ #define ELF32_FSZ_SWORD		4
+ #define ELF32_FSZ_WORD		4
+ 
+-#if __LIBELF64
++#if defined(__LIBELF64)
+ 
+ typedef __libelf_u64_t		Elf64_Addr;
+ typedef __libelf_u16_t		Elf64_Half;
+@@ -93,7 +93,7 @@ typedef struct {
+     Elf32_Half		e_shstrndx;
+ } Elf32_Ehdr;
+ 
+-#if __LIBELF64
++#if defined(__LIBELF64)
+ typedef struct {
+     unsigned char	e_ident[EI_NIDENT];
+     Elf64_Half		e_type;
+@@ -307,7 +307,7 @@ typedef struct {
+     Elf32_Word		sh_entsize;
+ } Elf32_Shdr;
+ 
+-#if __LIBELF64
++#if defined(__LIBELF64)
+ typedef struct {
+     Elf64_Word		sh_name;
+     Elf64_Word		sh_type;
+@@ -434,7 +434,7 @@ typedef struct {
+     Elf32_Half		st_shndx;
+ } Elf32_Sym;
+ 
+-#if __LIBELF64
++#if defined(__LIBELF64)
+ typedef struct {
+     Elf64_Word		st_name;
+     unsigned char	st_info;
+@@ -457,7 +457,7 @@ typedef struct {
+ #define ELF32_ST_TYPE(i)	((i)&0xf)
+ #define ELF32_ST_INFO(b,t)	(((b)<<4)+((t)&0xf))
+ 
+-#if __LIBELF64
++#if defined(__LIBELF64)
+ #define ELF64_ST_BIND(i)	((i)>>4)
+ #define ELF64_ST_TYPE(i)	((i)&0xf)
+ #define ELF64_ST_INFO(b,t)	(((b)<<4)+((t)&0xf))
+@@ -495,7 +495,7 @@ typedef struct {
+  * Macros for manipulating st_other
+  */
+ #define ELF32_ST_VISIBILITY(o)	((o)&0x3)
+-#if __LIBELF64
++#if defined(__LIBELF64)
+ #define ELF64_ST_VISIBILITY(o)	((o)&0x3)
+ #endif /* __LIBELF64 */
+ 
+@@ -521,7 +521,7 @@ typedef struct {
+     Elf32_Sword		r_addend;
+ } Elf32_Rela;
+ 
+-#if __LIBELF64
++#if defined(__LIBELF64)
+ typedef struct {
+     Elf64_Addr		r_offset;
+     Elf64_Xword		r_info;
+@@ -541,7 +541,7 @@ typedef struct {
+ #define ELF32_R_TYPE(i)		((unsigned char)(i))
+ #define ELF32_R_INFO(s,t)	(((s)<<8)+(unsigned char)(t))
+ 
+-#if __LIBELF64
++#if defined(__LIBELF64)
+ #define ELF64_R_SYM(i)		((Elf64_Xword)(i)>>32)
+ #define ELF64_R_TYPE(i)		((i)&0xffffffffL)
+ #define ELF64_R_INFO(s,t)	(((Elf64_Xword)(s)<<32)+((t)&0xffffffffL))
+@@ -556,7 +556,7 @@ typedef struct {
+     Elf32_Word		n_type;		/* descriptor type */
+ } Elf32_Nhdr;
+ 
+-#if __LIBELF64
++#if defined(__LIBELF64)
+ /* Solaris and GNU use this layout.  Be compatible. */
+ /* XXX: Latest ELF specs say it's 64-bit!!! */
+ typedef struct {
+@@ -587,7 +587,7 @@ typedef struct {
+     Elf32_Word		p_align;
+ } Elf32_Phdr;
+ 
+-#if __LIBELF64
++#if defined(__LIBELF64)
+ typedef struct {
+     Elf64_Word		p_type;
+     Elf64_Word		p_flags;
+@@ -654,7 +654,7 @@ typedef struct {
+     } d_un;
+ } Elf32_Dyn;
+ 
+-#if __LIBELF64
++#if defined(__LIBELF64)
+ typedef struct {
+     Elf64_Sxword	d_tag;
+     union {
+@@ -798,7 +798,7 @@ typedef struct {
+     Elf32_Half		si_flags;
+ } Elf32_Syminfo;
+ 
+-#if __LIBELF64
++#if defined(__LIBELF64)
+ typedef struct {
+     Elf64_Half		si_boundto;
+     Elf64_Half		si_flags;
+@@ -863,7 +863,7 @@ typedef struct {
+ 
+ typedef Elf32_Half	Elf32_Versym;
+ 
+-#if __LIBELF64
++#if defined(__LIBELF64)
+ 
+ typedef struct {
+     Elf64_Half		vd_version;
+@@ -933,7 +933,7 @@ typedef Elf64_Half	Elf64_Versym;
+ /*
+  * Move section
+  */
+-#if __LIBELF64
++#if defined(__LIBELF64)
+ 
+ typedef struct {
+     Elf32_Lword		m_value;
+@@ -973,7 +973,7 @@ typedef struct {
+     } c_un;
+ } Elf32_Cap;
+ 
+-#if __LIBELF64
++#if defined(__LIBELF64)
+ 
+ typedef struct {
+     Elf64_Xword     	c_tag;
+diff --git a/lib/gelf.h b/lib/gelf.h
+index 5af0558..98a759c 100644
+--- a/lib/gelf.h
++++ b/lib/gelf.h
+@@ -22,15 +22,15 @@
+ #ifndef _GELF_H
+ #define _GELF_H
+ 
+-#if __LIBELF_INTERNAL__
++#if defined(__LIBELF_INTERNAL__)
+ #include <libelf.h>
+ #else /* __LIBELF_INTERNAL__ */
+ #include <libelf/libelf.h>
+ #endif /* __LIBELF_INTERNAL__ */
+ 
+-#if __LIBELF_NEED_LINK_H
++#if defined(__LIBELF_NEED_LINK_H)
+ #include <link.h>
+-#elif __LIBELF_NEED_SYS_LINK_H
++#elif defined(__LIBELF_NEED_SYS_LINK_H)
+ #include <sys/link.h>
+ #endif /* __LIBELF_NEED_LINK_H */
+ 
+@@ -46,7 +46,7 @@ extern "C" {
+ # endif /* __STDC__ || defined(__cplusplus) */
+ #endif /* __P */
+ 
+-#if !__LIBELF64
++#if !defined(__LIBELF64)
+ 
+ #error "GElf is not supported on this system."
+ 
+@@ -71,7 +71,7 @@ typedef Elf64_Sym	GElf_Sym;
+ /*
+  * Symbol versioning
+  */
+-#if __LIBELF_SYMBOL_VERSIONS
++#if defined(__LIBELF_SYMBOL_VERSIONS)
+ typedef Elf64_Verdef	GElf_Verdef;
+ typedef Elf64_Verneed	GElf_Verneed;
+ typedef Elf64_Verdaux	GElf_Verdaux;
+diff --git a/lib/libelf.h b/lib/libelf.h
+index 3ebd0f3..788482d 100644
+--- a/lib/libelf.h
++++ b/lib/libelf.h
+@@ -25,7 +25,7 @@
+ #include <stddef.h>	/* for size_t */
+ #include <sys/types.h>
+ 
+-#if __LIBELF_INTERNAL__
++#if defined(__LIBELF_INTERNAL__)
+ #include <sys_elf.h>
+ #else /* __LIBELF_INTERNAL__ */
+ #include <libelf/sys_elf.h>
+@@ -224,7 +224,7 @@ extern Elf_Data *elf32_xlatetom __P((Elf_Data *__dst, const Elf_Data *__src,
+  */
+ extern long elf32_checksum __P((Elf *__elf));
+ 
+-#if __LIBELF64
++#if defined(__LIBELF64)
+ /*
+  * 64-bit ELF functions
+  * Not available on all platforms
+diff --git a/lib/sys_elf.h.in b/lib/sys_elf.h.in
+index b71a20d..722051b 100644
+--- a/lib/sys_elf.h.in
++++ b/lib/sys_elf.h.in
+@@ -68,7 +68,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ #ifdef __LIBELF_HEADER_ELF_H
+ # include __LIBELF_HEADER_ELF_H
+ #else /* __LIBELF_HEADER_ELF_H */
+-# if __LIBELF_INTERNAL__
++# if defined(__LIBELF_INTERNAL__)
+ #  include <elf_repl.h>
+ # else /* __LIBELF_INTERNAL__ */
+ #  include <libelf/elf_repl.h>
+@@ -92,7 +92,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ #  define STN_UNDEF	0
+ # endif /* STN_UNDEF */
+ 
+-# if __LIBELF64
++# if defined(__LIBELF64)
+ 
+ #  ifndef ELF64_FSZ_ADDR
+ #   define ELF64_FSZ_ADDR	8
+@@ -116,7 +116,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ #   define ELF64_R_INFO(s,t)	(((Elf64_Xword)(s)<<32)+((t)&0xffffffffL))
+ #  endif /* ELF64_R_SYM */
+ 
+-#  if __LIBELF64_LINUX
++#  if defined(__LIBELF64_LINUX)
+ typedef __libelf_u64_t	Elf64_Addr;
+ typedef __libelf_u16_t	Elf64_Half;
+ typedef __libelf_u64_t	Elf64_Off;
+diff --git a/lib/sys_elf.h.w32 b/lib/sys_elf.h.w32
+index 0f93c55..7360104 100644
+--- a/lib/sys_elf.h.w32
++++ b/lib/sys_elf.h.w32
+@@ -68,7 +68,7 @@
+ #ifdef __LIBELF_HEADER_ELF_H

+ # include __LIBELF_HEADER_ELF_H

+ #else /* __LIBELF_HEADER_ELF_H */

+-# if __LIBELF_INTERNAL__

++# if defined(__LIBELF_INTERNAL__)

+ #  include <elf_repl.h>

+ # else /* __LIBELF_INTERNAL__ */

+ #  include <libelf/elf_repl.h>

+@@ -92,7 +92,7 @@
+ #  define STN_UNDEF	0

+ # endif /* STN_UNDEF */

+ 

+-# if __LIBELF64

++# if defined(__LIBELF64)

+ 

+ #  ifndef ELF64_FSZ_ADDR

+ #   define ELF64_FSZ_ADDR	8

+@@ -116,7 +116,7 @@
+ #   define ELF64_R_INFO(s,t)	(((Elf64_Xword)(s)<<32)+((t)&0xffffffffL))

+ #  endif /* ELF64_R_SYM */

+ 

+-#  if __LIBELF64_LINUX

++#  if defined(__LIBELF64_LINUX)

+ typedef __libelf_u64_t	Elf64_Addr;

+ typedef __libelf_u16_t	Elf64_Half;

+ typedef __libelf_u64_t	Elf64_Off;

diff --git a/nixpkgs/pkgs/development/libraries/libelfin/0001-Don-t-detect-package-version-with-Git.patch b/nixpkgs/pkgs/development/libraries/libelfin/0001-Don-t-detect-package-version-with-Git.patch
new file mode 100644
index 000000000000..e4b4e592b7a5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libelfin/0001-Don-t-detect-package-version-with-Git.patch
@@ -0,0 +1,72 @@
+From 77a34d31695e02bc3d06b68c7ca3ff9c3cb67844 Mon Sep 17 00:00:00 2001
+From: Maximilian Bosch <maximilian@mbosch.me>
+Date: Sun, 26 May 2019 19:46:27 +0200
+Subject: [PATCH] Don't detect package version with Git
+
+This will build in a Nix-based build environment. Instead we ismply
+replace `@version@` using `substituteAll`.
+---
+ dwarf/Makefile | 19 +++++++++----------
+ elf/Makefile   | 15 +++++++--------
+ 2 files changed, 16 insertions(+), 18 deletions(-)
+
+diff --git a/dwarf/Makefile b/dwarf/Makefile
+index 71456bd..f871227 100644
+--- a/dwarf/Makefile
++++ b/dwarf/Makefile
+@@ -43,16 +43,15 @@ CLEAN += libdwarf++.so
+ # Create pkg-config for local library and headers. This will be
+ # transformed in to the correct global pkg-config by install.
+ libdwarf++.pc: always
+-	@(VER=$$(git describe --match 'v*' | sed -e s/^v//); \
+-	  echo "libdir=$$PWD"; \
+-	  echo "includedir=$$PWD"; \
+-	  echo ""; \
+-	  echo "Name: libdwarf++"; \
+-	  echo "Description: C++11 DWARF library"; \
+-	  echo "Version: $$VER"; \
+-	  echo "Requires: libelf++ = $$VER"; \
+-	  echo "Libs: -L\$${libdir} -ldwarf++"; \
+-	  echo "Cflags: -I\$${includedir}") > $@
++	@(echo "libdir=$$PWD"; \
++		echo "includedir=$$PWD"; \
++		echo ""; \
++		echo "Name: libdwarf++"; \
++		echo "Description: C++11 DWARF library"; \
++		echo "Version: @version@"; \
++		echo "Requires: libelf++ = @version@"; \
++		echo "Libs: -L\$${libdir} -ldwarf++"; \
++		echo "Cflags: -I\$${includedir}") > $@
+ CLEAN += libdwarf++.pc
+ 
+ .PHONY: always
+diff --git a/elf/Makefile b/elf/Makefile
+index 9c7c224..50630a7 100644
+--- a/elf/Makefile
++++ b/elf/Makefile
+@@ -42,15 +42,14 @@ CLEAN += libelf++.so
+ # Create pkg-config for local library and headers. This will be
+ # transformed in to the correct global pkg-config by install.
+ libelf++.pc: always
+-	@(VER=$$(git describe --match 'v*' | sed -e s/^v//); \
+-	  echo "libdir=$$PWD"; \
++	@(echo "libdir=$$PWD"; \
+ 	  echo "includedir=$$PWD"; \
+-	  echo ""; \
+-	  echo "Name: libelf++"; \
+-	  echo "Description: C++11 ELF library"; \
+-	  echo "Version: $$VER"; \
+-	  echo "Libs: -L\$${libdir} -lelf++"; \
+-	  echo "Cflags: -I\$${includedir}") > $@
++		echo ""; \
++		echo "Name: libelf++"; \
++		echo "Description: C++11 ELF library"; \
++		echo "Version: @version@"; \
++		echo "Libs: -L\$${libdir} -lelf++"; \
++		echo "Cflags: -I\$${includedir}") > $@
+ CLEAN += libelf++.pc
+ 
+ .PHONY: always
+-- 
+2.19.2
+
diff --git a/nixpkgs/pkgs/development/libraries/libelfin/default.nix b/nixpkgs/pkgs/development/libraries/libelfin/default.nix
new file mode 100644
index 000000000000..7d5a928aa2f4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libelfin/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchFromGitHub, python3, substituteAll }:
+
+stdenv.mkDerivation rec {
+  pname = "libelfin";
+  version = "unstable-2018-08-25";
+
+  src = fetchFromGitHub {
+    owner = "aclements";
+    repo = pname;
+    rev = "ac45a094fadba77ad840063fb7aab82571546be0";
+    sha256 = "143x680c6hsy51kngs04ypg4ql3lp498llcwj4lh1v0qp5qvjhyz";
+  };
+
+  patches = [
+    (substituteAll {
+      src = ./0001-Don-t-detect-package-version-with-Git.patch;
+      inherit version;
+    })
+  ];
+
+  nativeBuildInputs = [ python3 ];
+
+  makeFlags = [ "PREFIX=${placeholder "out"}" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/aclements/libelfin/";
+    license = licenses.mit;
+    description = "C++11 ELF/DWARF parser";
+    maintainers = with maintainers; [ ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libemf2svg/default.nix b/nixpkgs/pkgs/development/libraries/libemf2svg/default.nix
new file mode 100644
index 000000000000..4bb7caa02615
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libemf2svg/default.nix
@@ -0,0 +1,31 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, fontconfig
+, freetype
+, libpng
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libemf2svg";
+  version = "1.1.0";
+
+  src = fetchFromGitHub {
+    owner = "kakwa";
+    repo = pname;
+    rev = version;
+    sha256 = "04g6dp5xadszqjyjl162x26mfhhwinia65hbkl3mv70bs4an9898";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ fontconfig freetype libpng ];
+
+  meta = with lib; {
+    description = "Microsoft EMF to SVG conversion library";
+    homepage = "https://github.com/kakwa/libemf2svg";
+    maintainers = with maintainers; [ erdnaxe ];
+    license = licenses.gpl2Only;
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libepc/default.nix b/nixpkgs/pkgs/development/libraries/libepc/default.nix
new file mode 100644
index 000000000000..a2822eae8d54
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libepc/default.nix
@@ -0,0 +1,69 @@
+{ stdenv
+, lib
+, fetchurl
+, autoreconfHook
+, pkg-config
+, intltool
+, gtk-doc
+, glib
+, avahi
+, gnutls
+, libuuid
+, libsoup
+, gtk3
+, gnome
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libepc";
+  version = "0.4.6";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/libepc/${lib.versions.majorMinor finalAttrs.version}/libepc-${finalAttrs.version}.tar.xz";
+    sha256 = "1s3svb2slqjsrqfv50c2ymnqcijcxb5gnx6bfibwh9l5ga290n91";
+  };
+
+  patches = [
+    # Remove dependency that is only needed by uninstalled examples.
+    ./no-avahi-ui.patch
+  ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+    gnome.gnome-common
+    pkg-config
+    intltool
+    gtk-doc
+  ];
+
+  buildInputs = [
+    glib
+    libuuid
+    gtk3
+  ];
+
+  propagatedBuildInputs = [
+    avahi
+    gnutls
+    libsoup
+  ];
+
+  enableParallelBuilding = true;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = "libepc";
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    description = "Easy Publish and Consume Library";
+    homepage = "https://wiki.gnome.org/Projects/libepc";
+    license = licenses.lgpl21Plus;
+    maintainers = teams.gnome.members;
+    platforms = platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libepc/no-avahi-ui.patch b/nixpkgs/pkgs/development/libraries/libepc/no-avahi-ui.patch
new file mode 100644
index 000000000000..4649ecbe27ce
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libepc/no-avahi-ui.patch
@@ -0,0 +1,36 @@
+diff --git a/Makefile.am b/Makefile.am
+index acf0d25..13022d1 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -32,8 +32,6 @@ noinst_PROGRAMS = \
+ 	examples/lookup-resource \
+ 	examples/service-browser \
+ 	examples/simple-publisher \
+-	examples/consumer-ui \
+-	examples/publisher-ui \
+ 	examples/server-credentials \
+ 	$(TESTS)
+ TESTS = \
+@@ -155,10 +153,6 @@ examples_service_browser_LDADD			= $(example_epc_libs)
+ examples_simple_publisher_CFLAGS		= $(example_epc_cflags)
+ examples_simple_publisher_LDADD			= $(example_epc_libs)
+ 
+-examples_consumer_ui_CFLAGS			= $(example_epc_ui_cflags) $(AVAHI_UI_CFLAGS)
+-examples_consumer_ui_LDADD			= $(example_epc_ui_libs) $(AVAHI_UI_LIBS)
+-examples_publisher_ui_CFLAGS			= $(example_epc_ui_cflags) $(AVAHI_UI_CFLAGS) -rdynamic
+-examples_publisher_ui_LDADD			= $(example_epc_ui_libs) $(AVAHI_UI_LIBS)
+ examples_server_credentials_CFLAGS		= $(example_epc_ui_cflags)
+ examples_server_credentials_LDADD		= $(example_epc_ui_libs)
+ 
+diff --git a/configure.ac b/configure.ac
+index d68bf94..89bd471 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -53,7 +53,6 @@ PKG_CHECK_EXISTS([$GIO_REQUIREMENT],
+                   GIO=$GIO_REQUIREMENT],
+                  [AC_MSG_RESULT([no])])
+ 
+-PKG_CHECK_MODULES(AVAHI_UI,  [avahi-ui-gtk3     >= 0.6])
+ PKG_CHECK_MODULES(LIBEPC,    [avahi-client >= 0.6
+                               avahi-glib   >= 0.6
+                               glib-2.0     >= 2.36
diff --git a/nixpkgs/pkgs/development/libraries/libepoxy/default.nix b/nixpkgs/pkgs/development/libraries/libepoxy/default.nix
new file mode 100644
index 000000000000..cd98e2229fe2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libepoxy/default.nix
@@ -0,0 +1,77 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, meson
+, ninja
+, pkg-config
+, utilmacros
+, python3
+, libGL
+, libX11
+, Carbon
+, OpenGL
+, x11Support ? !stdenv.isDarwin
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libepoxy";
+  version = "1.5.10";
+
+  src = fetchFromGitHub {
+    owner = "anholt";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-gZiyPOW2PeTMILcPiUTqPUGRNlMM5mI1z9563v4SgEs=";
+  };
+
+  patches = [ ./libgl-path.patch ];
+
+  postPatch = ''
+    patchShebangs src/*.py
+  ''
+  + lib.optionalString stdenv.isDarwin ''
+    substituteInPlace src/dispatch_common.h --replace "PLATFORM_HAS_GLX 0" "PLATFORM_HAS_GLX 1"
+  ''
+  # cgl_core and cgl_epoxy_api fail in darwin sandbox and on Hydra (because it's headless?)
+  + lib.optionalString stdenv.isDarwin ''
+    substituteInPlace test/meson.build \
+      --replace "[ 'cgl_epoxy_api', [ 'cgl_epoxy_api.c' ] ]," ""
+  ''
+  + lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) ''
+    substituteInPlace test/meson.build \
+      --replace "[ 'cgl_core', [ 'cgl_core.c' ] ]," ""
+  '';
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ meson ninja pkg-config utilmacros python3 ];
+
+  buildInputs = lib.optionals (x11Support && !stdenv.isDarwin) [
+    libGL
+  ] ++ lib.optionals x11Support [
+    libX11
+  ] ++ lib.optionals stdenv.isDarwin [
+    Carbon
+    OpenGL
+  ];
+
+  mesonFlags = [
+    "-Degl=${if (x11Support && !stdenv.isDarwin) then "yes" else "no"}"
+    "-Dglx=${if x11Support then "yes" else "no"}"
+    "-Dtests=${lib.boolToString doCheck}"
+    "-Dx11=${lib.boolToString x11Support}"
+  ];
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString (x11Support && !stdenv.isDarwin) ''-DLIBGL_PATH="${lib.getLib libGL}/lib"'';
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "A library for handling OpenGL function pointer management";
+    homepage = "https://github.com/anholt/libepoxy";
+    license = licenses.mit;
+    maintainers = with maintainers; [ goibhniu ];
+    platforms = platforms.unix;
+    pkgConfigModules = [ "epoxy" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libepoxy/libgl-path.patch b/nixpkgs/pkgs/development/libraries/libepoxy/libgl-path.patch
new file mode 100644
index 000000000000..8f38ee27174b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libepoxy/libgl-path.patch
@@ -0,0 +1,24 @@
+diff --git a/src/dispatch_common.c b/src/dispatch_common.c
+index b3e4f5f..303e8f5 100644
+--- a/src/dispatch_common.c
++++ b/src/dispatch_common.c
+@@ -310,6 +310,19 @@ get_dlopen_handle(void **handle, const char *lib_name, bool exit_on_fail, bool l
+             flags |= RTLD_NOLOAD;
+ 
+         *handle = dlopen(lib_name, flags);
++#ifdef LIBGL_PATH
++        if (!*handle) {
++          char pathbuf[sizeof(LIBGL_PATH) + 1 + 1024 + 1];
++          int l = snprintf(pathbuf, sizeof(pathbuf), "%s/%s", LIBGL_PATH, lib_name);
++          if (l < 0 || l >= sizeof(pathbuf)) {
++            // This really shouldn't happen
++            fprintf(stderr, "Error prefixing library pathname\n");
++            exit(1);
++          }
++          *handle = dlopen(pathbuf, flags);
++        }
++#endif
++
+         if (!*handle) {
+             if (exit_on_fail) {
+                 fprintf(stderr, "Couldn't open %s: %s\n", lib_name, dlerror());
diff --git a/nixpkgs/pkgs/development/libraries/liberfa/default.nix b/nixpkgs/pkgs/development/libraries/liberfa/default.nix
new file mode 100644
index 000000000000..b59d3aab4a33
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liberfa/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "erfa";
+  version = "2.0.0";
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  src = fetchFromGitHub {
+    owner = "liberfa";
+    repo = "erfa";
+    rev = "v${version}";
+    sha256 = "sha256-xBE8mWwmvlu0v3Up5y6J8jMhToMSACdKeQzPJoG8LWk=";
+  };
+
+  configureFlags = [ "--enable-shared" ];
+
+  meta = with lib; {
+    description = "Essential Routines for Fundamental Astronomy";
+    homepage = "https://github.com/liberfa/erfa";
+    maintainers = with maintainers; [ mir06 ];
+    license = {
+      url = "https://github.com/liberfa/erfa/blob/master/LICENSE";
+      free = true;
+    };
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/liberio/default.nix b/nixpkgs/pkgs/development/libraries/liberio/default.nix
new file mode 100644
index 000000000000..f7e4fa6e7329
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liberio/default.nix
@@ -0,0 +1,38 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, autoreconfHook
+, systemd
+, pkg-config
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "liberio";
+  version = "unstable-2019-12-11";
+
+  src = fetchFromGitHub {
+    owner = "EttusResearch";
+    repo = "liberio";
+    rev = "81777e500d1c3b88d5048d46643fb5553eb5f786";
+    sha256 = "1n40lj5g497mmqh14vahdhy3jwvcry2pkc670p4c9f1pggp6ysgk";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+    autoreconfHook
+  ];
+
+  buildInputs = [
+    systemd
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Ettus Research DMA I/O Library";
+    homepage = "https://github.com/EttusResearch/liberio";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.doronbehar ];
+    platforms = platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libesmtp/default.nix b/nixpkgs/pkgs/development/libraries/libesmtp/default.nix
new file mode 100644
index 000000000000..3193f383d610
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libesmtp/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, openssl }:
+
+stdenv.mkDerivation rec {
+  pname = "libESMTP";
+  version = "1.1.0";
+
+  nativeBuildInputs = [ meson ninja pkg-config ];
+  buildInputs = [ openssl ];
+
+  src = fetchFromGitHub {
+    owner = "libesmtp";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1bhh8hlsl9597x0bnfl563k2c09b61qnkb9mfyqcmzlq63m1zw5y";
+  };
+
+  meta = with lib; {
+    description = "A Library for Posting Electronic Mail";
+    longDescription = ''
+      libESMTP is an SMTP client library which manages submission of electronic mail
+      via a preconfigured Mail Transport Agent (MTA) such as Exim or Postfix.
+      It implements many SMTP extensions including TLS for security
+      and PIPELINING for high performance.
+    '';
+    homepage = "https://libesmtp.github.io/";
+    license = licenses.lgpl21Plus;
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/libestr/default.nix b/nixpkgs/pkgs/development/libraries/libestr/default.nix
new file mode 100644
index 000000000000..5630047eed7f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libestr/default.nix
@@ -0,0 +1,18 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libestr";
+  version = "0.1.11";
+
+  src = fetchurl {
+    url = "http://libestr.adiscon.com/files/download/${pname}-${version}.tar.gz";
+    sha256 = "0910ifzcs8kpd3srrr4fvbacgh2zrc6yn7i4rwfj6jpzhlkjnqs6";
+  };
+
+  meta = with lib; {
+    homepage = "https://libestr.adiscon.com/";
+    description = "Some essentials for string handling";
+    license = licenses.lgpl21;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libetpan/default.nix b/nixpkgs/pkgs/development/libraries/libetpan/default.nix
new file mode 100644
index 000000000000..767b53c9d277
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libetpan/default.nix
@@ -0,0 +1,100 @@
+{ stdenv, lib, fetchFromGitHub, fetchpatch
+, autoconf, automake, libtool, openssl, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libetpan";
+  version = "1.9.4";
+
+  src = fetchFromGitHub {
+    owner = "dinhviethoa";
+    repo = "libetpan";
+    rev = version;
+    hash = "sha256-lukeWURNsRPTuFk2q2XVnwkKz5Y+PRiPba5GPQCw6jw=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    # The following patches are security and/or reliability fixes.
+    # They all must be removed for the next version bump.
+
+    # Fix potential null pointer deference
+    # https://github.com/dinhvh/libetpan/pull/348
+    (fetchpatch {
+      name = "pr-348-null-pointer-deference.patch";
+      url = "https://github.com/dinhvh/libetpan/commit/720e92e5752e562723a9730f8e604cb78f3a9163.patch";
+      hash = "sha256-/bA/ekeMhLE3OyREHIanlrb+uuSxwur+ZloeaX9AyyM=";
+    })
+
+    # Fix potential null pointer deference
+    # https://github.com/dinhvh/libetpan/pull/361
+    (fetchpatch {
+      name = "pr-361-null-pointer-deference.patch";
+      url = "https://github.com/dinhvh/libetpan/commit/0cdefb017fcfd0fae56a151dc14c8439a38ecc44.patch";
+      hash = "sha256-qbWisOCPI91AIXzg3n7mceSVbBKHZXd8Z0z1u/SrIG8=";
+    })
+
+    # Fix potential null pointer deference
+    # https://github.com/dinhvh/libetpan/pull/363
+    (fetchpatch {
+      name = "pr-363-null-pointer-deference.patch";
+      url = "https://github.com/dinhvh/libetpan/commit/68bde8b12b40a680c29d228f0b8fe4dfbf2d8d0b.patch";
+      hash = "sha256-dUbnh2RoeELk/usHeFsdGC+J198jcudx3rb6/3sUAX0=";
+    })
+
+    # Missing boundary fix
+    # https://github.com/dinhvh/libetpan/pull/384
+    (fetchpatch {
+      name = "pr-384-missing-boundary-fix.patch";
+      url = "https://github.com/dinhvh/libetpan/commit/24c485495216c00076b29391591f46b61fcb3dac.patch";
+      hash = "sha256-6ry8EfiYgbMtQYtT7L662I1A7N7N6OOy9T2ECgR7+cI=";
+    })
+
+    # CVE-2020-15953: Detect extra data after STARTTLS response and exit
+    # https://github.com/dinhvh/libetpan/pull/387
+    (fetchpatch {
+      name = "cve-2020-15953-imap.patch";
+      url = "https://github.com/dinhvh/libetpan/commit/1002a0121a8f5a9aee25357769807f2c519fa50b.patch";
+      hash = "sha256-dqnHZAzX6ym8uF23iKVotdHQv9XQ/BGBAiRGSb7QLcE=";
+    })
+
+    # CVE-2020-15953: Detect extra data after STARTTLS responses in SMTP and POP3 and exit
+    # https://github.com/dinhvh/libetpan/pull/388
+    (fetchpatch {
+      name = "cve-2020-15953-pop3-smtp.patch";
+      url = "https://github.com/dinhvh/libetpan/commit/298460a2adaabd2f28f417a0f106cb3b68d27df9.patch";
+      hash = "sha256-QI0gvLGUik4TQAz/pxwVfOhZc/xtj6jcWPZkJVsSCFM=";
+    })
+
+    # Fix buffer overwrite for empty string in remove_trailing_eol
+    # https://github.com/dinhvh/libetpan/pull/408
+    (fetchpatch {
+      name = "pr-408-fix-buffer-overwrite.patch";
+      url = "https://github.com/dinhvh/libetpan/commit/078b924c7f49ac435b10b0f53a73f1bbc4717064.patch";
+      hash = "sha256-lBRS+bv/7IK7yat2p3mc0SRYn/wRB/spjE7ungj6DT0=";
+    })
+
+    # CVE-2022-4121: Fixed crash when st_info_list is NULL.
+    # https://github.com/dinhvh/libetpan/issues/420
+    (fetchpatch {
+      name = "cve-2022-4121.patch";
+      url = "https://github.com/dinhvh/libetpan/commit/5c9eb6b6ba64c4eb927d7a902317410181aacbba.patch";
+      hash = "sha256-O+LUkI91oej7MFg4Pg6/xq1uhSanweH81VzPXBdiPh4=";
+    })
+  ];
+
+  nativeBuildInputs = [ autoconf automake libtool pkg-config ];
+
+  buildInputs = [ openssl ];
+
+  configureScript = "./autogen.sh";
+
+  meta = with lib; {
+    description = "Mail Framework for the C Language";
+    homepage = "https://www.etpan.org/libetpan.html";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ oxzi ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libev/default.nix b/nixpkgs/pkgs/development/libraries/libev/default.nix
new file mode 100644
index 000000000000..750cb3974cf7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libev/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl
+, # Note: -static hasn’t work on darwin
+  static ? with stdenv.hostPlatform; isStatic && !isDarwin
+}:
+
+# Note: this package is used for bootstrapping fetchurl, and thus
+# cannot use fetchpatch! All mutable patches (generated by GitHub or
+# cgit) that are needed here should be included directly in Nixpkgs as
+# files.
+
+stdenv.mkDerivation rec {
+  pname = "libev";
+  version="4.33";
+
+  src = fetchurl {
+    url = "http://dist.schmorp.de/libev/Attic/${pname}-${version}.tar.gz";
+    sha256 = "1sjs4324is7fp21an4aas2z4dwsvs6z4xwrmp72vwpq1s6wbfzjh";
+  };
+
+  configureFlags = lib.optional (static) "LDFLAGS=-static";
+
+  meta = {
+    description = "A high-performance event loop/event model with lots of features";
+    maintainers = [ lib.maintainers.raskin ];
+    platforms = lib.platforms.all;
+    license = lib.licenses.bsd2; # or GPL2+
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libevdev/default.nix b/nixpkgs/pkgs/development/libraries/libevdev/default.nix
new file mode 100644
index 000000000000..c8db600dce81
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libevdev/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl, fetchpatch, python3 }:
+
+stdenv.mkDerivation rec {
+  pname = "libevdev";
+  version = "1.13.1";
+
+  src = fetchurl {
+    url = "https://www.freedesktop.org/software/${pname}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-Bqd78qxcmTMFiCvBZBAX9b7BWS1tG2R4e61JKrNPLzY=";
+  };
+
+  nativeBuildInputs = [ python3 ];
+
+  meta = with lib; {
+    description = "Wrapper library for evdev devices";
+    homepage = "https://www.freedesktop.org/software/libevdev/doc/latest/index.html";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.amorsillo ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libevdevplus/0001-Add-cmake-install-directives.patch b/nixpkgs/pkgs/development/libraries/libevdevplus/0001-Add-cmake-install-directives.patch
new file mode 100644
index 000000000000..2635d6ab829e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libevdevplus/0001-Add-cmake-install-directives.patch
@@ -0,0 +1,41 @@
+From 7f208aaf21aa468013fc41e67c32f6a6c8c08249 Mon Sep 17 00:00:00 2001
+From: Jappie Klooster <jappieklooster@hotmail.com>
+Date: Fri, 2 Apr 2021 16:01:05 -0400
+Subject: [PATCH] Add cmake install directives
+
+To make nix builds work, it expect a make install command to
+be available.
+Adding these directives seems to fix the build.
+
+If it's no trouble to you, please add them.
+---
+ CMakeLists.txt | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f9db618..425d391 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -4,10 +4,17 @@ project(libevdevPlus)
+ set(SOURCE_FILES
+         evdevPlus.cpp evdevPlus.hpp CommonIncludes.hpp InputEvent.hpp Resource.cpp)
+ 
++include(GNUInstallDirs)
++
+ add_library(evdevPlus ${SOURCE_FILES})
+ target_include_directories(evdevPlus PUBLIC .)
+ 
+ add_executable(evdevPlus_test test.cpp)
+ target_link_libraries(evdevPlus_test evdevPlus)
+ 
+-configure_file(evdevPlus.pc.in evdevPlus.pc @ONLY)
+\ No newline at end of file
++configure_file(evdevPlus.pc.in evdevPlus.pc @ONLY)
++
++install(TARGETS evdevPlus
++        LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
++install(FILES evdevPlus.hpp CommonIncludes.hpp InputEvent.hpp
++        DESTINATION include/)
+-- 
+2.29.2
+
diff --git a/nixpkgs/pkgs/development/libraries/libevdevplus/default.nix b/nixpkgs/pkgs/development/libraries/libevdevplus/default.nix
new file mode 100644
index 000000000000..11d644cd90df
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libevdevplus/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "libevdevplus";
+  version = "unstable-2021-04-02";
+
+  # adds missing cmake install directives
+  # https://github.com/YukiWorkshop/libevdevPlus/pull/10
+  patches = [ ./0001-Add-cmake-install-directives.patch];
+
+  src  = fetchFromGitHub {
+    owner  = "YukiWorkshop";
+    repo   = "libevdevPlus";
+    rev    = "b4d4b3143056424a3da9f0516ca02a47209ef757";
+    sha256 = "09y65s16gch0w7fy1s9yjk9gz3bjzxix36h5wmwww6lkj2i1z3rj";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  meta = with lib; {
+    inherit (src.meta) homepage;
+    description = "Easy-to-use event device library in C++";
+    license = licenses.mit;
+    maintainers = with maintainers; [ willibutz ];
+    platforms = with platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libevent/default.nix b/nixpkgs/pkgs/development/libraries/libevent/default.nix
new file mode 100644
index 000000000000..782d86f1f581
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libevent/default.nix
@@ -0,0 +1,72 @@
+{ lib, stdenv, fetchurl, findutils, fixDarwinDylibNames
+, sslSupport ? true, openssl
+, fetchpatch
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libevent";
+  version = "2.1.12";
+
+  src = fetchurl {
+    url = "https://github.com/libevent/libevent/releases/download/release-${version}-stable/libevent-${version}-stable.tar.gz";
+    sha256 = "1fq30imk8zd26x8066di3kpc5zyfc5z6frr3zll685zcx4dxxrlj";
+  };
+
+  patches = [
+    # Don't define BIO_get_init() for LibreSSL 3.5+
+    (fetchpatch {
+      url = "https://github.com/libevent/libevent/commit/883630f76cbf512003b81de25cd96cb75c6cf0f9.patch";
+      sha256 = "sha256-VPJqJUAovw6V92jpqIXkIR1xYGbxIWxaHr8cePWI2SU=";
+    })
+  ];
+
+  configureFlags = lib.optional (!sslSupport) "--disable-openssl";
+
+  preConfigure = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") ''
+    MACOSX_DEPLOYMENT_TARGET=10.16
+  '';
+
+  # libevent_openssl is moved into its own output, so that openssl isn't present
+  # in the default closure.
+  outputs = [ "out" "dev" ]
+    ++ lib.optional sslSupport "openssl"
+    ;
+  outputBin = "dev";
+  propagatedBuildOutputs = [ "out" ]
+    ++ lib.optional sslSupport "openssl"
+    ;
+
+  nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
+
+  buildInputs = lib.optional sslSupport openssl
+    ++ lib.optional stdenv.isCygwin findutils;
+
+  doCheck = false; # needs the net
+
+  postInstall = lib.optionalString sslSupport ''
+    moveToOutput "lib/libevent_openssl*" "$openssl"
+    substituteInPlace "$dev/lib/pkgconfig/libevent_openssl.pc" \
+      --replace "$out" "$openssl"
+    sed "/^libdir=/s|$out|$openssl|" -i "$openssl"/lib/libevent_openssl.la
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Event notification library";
+    longDescription = ''
+      The libevent API provides a mechanism to execute a callback function
+      when a specific event occurs on a file descriptor or after a timeout
+      has been reached.  Furthermore, libevent also support callbacks due
+      to signals or regular timeouts.
+
+      libevent is meant to replace the event loop found in event driven
+      network servers.  An application just needs to call event_dispatch()
+      and then add or remove events dynamically without having to change
+      the event loop.
+    '';
+    homepage = "https://libevent.org/";
+    license = licenses.bsd3;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libewf/default.nix b/nixpkgs/pkgs/development/libraries/libewf/default.nix
new file mode 100644
index 000000000000..dffacc7d276c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libewf/default.nix
@@ -0,0 +1,28 @@
+{ fetchurl, fetchpatch, lib, stdenv, zlib, openssl, libuuid, pkg-config, bzip2 }:
+
+stdenv.mkDerivation rec {
+  version = "20231119";
+  pname = "libewf";
+
+  src = fetchurl {
+    url = "https://github.com/libyal/libewf/releases/download/${version}/libewf-experimental-${version}.tar.gz";
+    hash = "sha256-7AjUEaXasOzJV9ErZK2a4HMTaqhcBbLKd8M+A5SbKrc=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ zlib openssl libuuid ]
+    ++ lib.optionals stdenv.isDarwin [ bzip2 ];
+
+  # cannot run test program while cross compiling
+  configureFlags = lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    "ac_cv_openssl_xts_duplicate_keys=yes"
+  ];
+
+  meta = {
+    description = "Library for support of the Expert Witness Compression Format";
+    homepage = "https://sourceforge.net/projects/libewf/";
+    license = lib.licenses.lgpl3;
+    maintainers = [ lib.maintainers.raskin ] ;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libexecinfo/30-linux-makefile.patch b/nixpkgs/pkgs/development/libraries/libexecinfo/30-linux-makefile.patch
new file mode 100644
index 000000000000..134c64441d36
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libexecinfo/30-linux-makefile.patch
@@ -0,0 +1,44 @@
+--- Makefile.orig
++++ Makefile
+@@ -23,24 +23,25 @@
+ # SUCH DAMAGE.
+ #
+ # $Id: Makefile,v 1.3 2004/07/19 05:19:55 sobomax Exp $
++#
++# Linux Makefile by Matt Smith <mcs@darkregion.net>, 2011/01/04
+ 
+-LIB=	execinfo
++CC=cc
++AR=ar
++EXECINFO_CFLAGS=$(CFLAGS) -O2 -pipe -fno-strict-aliasing -std=gnu99 -c
++EXECINFO_LDFLAGS=$(LDFLAGS)
+ 
+-SRCS=	stacktraverse.c stacktraverse.h execinfo.c execinfo.h
++all: static dynamic
+ 
+-INCS=	execinfo.h
++static:
++	$(CC) $(EXECINFO_CFLAGS) $(EXECINFO_LDFLAGS) stacktraverse.c
++	$(CC) $(EXECINFO_CFLAGS) $(EXECINFO_LDFLAGS) execinfo.c
++	$(AR) rcs libexecinfo.a stacktraverse.o execinfo.o
+ 
+-SHLIB_MAJOR=	1
+-SHLIB_MINOR=	0
++dynamic:
++	$(CC) -fpic -DPIC $(EXECINFO_CFLAGS) $(EXECINFO_LDFLAGS) stacktraverse.c -o stacktraverse.So
++	$(CC) -fpic -DPIC $(EXECINFO_CFLAGS) $(EXECINFO_LDFLAGS) execinfo.c -o execinfo.So
++	$(CC) -shared -Wl,-soname,libexecinfo.so.1 -o libexecinfo.so.1 stacktraverse.So execinfo.So
+ 
+-NOPROFILE=	yes
+-
+-DPADD=		${LIBM}
+-LDADD=		-lm
+-
+-#WARNS?=	4
+-
+-#stacktraverse.c: gen.py
+-#	./gen.py > stacktraverse.c
+-
+-.include <bsd.lib.mk>
++clean:
++	rm -rf *.o *.So *.a *.so
diff --git a/nixpkgs/pkgs/development/libraries/libexecinfo/default.nix b/nixpkgs/pkgs/development/libraries/libexecinfo/default.nix
new file mode 100644
index 000000000000..36f956e77724
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libexecinfo/default.nix
@@ -0,0 +1,53 @@
+{ lib, stdenv, fetchurl, fetchpatch
+, enableStatic ? true
+, enableShared ? !stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libexecinfo";
+  version = "1.1";
+
+  src = fetchurl {
+    url = "http://distcache.freebsd.org/local-distfiles/itetcu/${pname}-${version}.tar.bz2";
+    sha256 = "07wvlpc1jk1sj4k5w53ml6wagh0zm9kv2l1jngv8xb7xww9ik8n9";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "10-execinfo.patch";
+      url = "https://git.alpinelinux.org/aports/plain/main/libexecinfo/10-execinfo.patch?id=730cdcef6901750f4029d4c3b8639ce02ee3ead1";
+      sha256 = "0lnphrad4vspyljnvmm62dyxj98vgp3wabj4w3vfzfph7j8piw7g";
+    })
+    (fetchpatch {
+      name = "20-define-gnu-source.patch";
+      url = "https://git.alpinelinux.org/aports/plain/main/libexecinfo/20-define-gnu-source.patch?id=730cdcef6901750f4029d4c3b8639ce02ee3ead1";
+      sha256 = "1mp8mc639b0h2s69m5z6s2h3q3n1zl298j9j0plzj7f979j76302";
+    })
+    ./30-linux-makefile.patch
+  ];
+
+  makeFlags = [ "CC:=$(CC)" "AR:=$(AR)" ];
+  hardeningEnable = [ "stackprotector" ];
+
+  buildFlags =
+      lib.optional enableStatic "static"
+   ++ lib.optional enableShared "dynamic";
+
+  patchFlags = [ "-p0" ];
+
+  installPhase = ''
+    install -Dm644 execinfo.h stacktraverse.h -t $out/include
+  '' + lib.optionalString enableShared ''
+    install -Dm755 libexecinfo.so.1 -t $out/lib
+    ln -s $out/lib/libexecinfo.so{.1,}
+  '' + lib.optionalString enableStatic ''
+    install -Dm755 libexecinfo.a -t $out/lib
+  '';
+
+  meta = with lib; {
+    description = "Quick-n-dirty BSD licensed clone of the GNU libc backtrace facility";
+    license = licenses.bsd2;
+    homepage = "https://www.freshports.org/devel/libexecinfo";
+    maintainers = with maintainers; [ dtzWill ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libexif/default.nix b/nixpkgs/pkgs/development/libraries/libexif/default.nix
new file mode 100644
index 000000000000..0ab1f8fa984a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libexif/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, gettext }:
+
+stdenv.mkDerivation rec {
+  pname = "libexif";
+  version = "0.6.24";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = "${pname}-${builtins.replaceStrings ["."] ["_"] version}-release";
+    sha256 = "sha256-Eqgnm31s8iPJdhTpk5HM89HSZTXTK+e7YZ/CCdbeJX4=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook gettext ];
+
+  meta = with lib; {
+    homepage = "https://libexif.github.io/";
+    description = "A library to read and manipulate EXIF data in digital photographs";
+    license = licenses.lgpl21;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ erictapen ];
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/libexsid/default.nix b/nixpkgs/pkgs/development/libraries/libexsid/default.nix
new file mode 100644
index 000000000000..38cdfc84d4e4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libexsid/default.nix
@@ -0,0 +1,47 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+, docSupport ? true
+, doxygen
+, libftdi1
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libexsid";
+  version = "2.1";
+
+  src = fetchFromGitHub {
+    owner = "libsidplayfp";
+    repo = "exsid-driver";
+    rev = version;
+    sha256 = "1qbiri549fma8c72nmj3cpz3sn1vc256kfafnygkmkzg7wdmgi7r";
+  };
+
+  outputs = [ "out" ]
+    ++ lib.optional docSupport "doc";
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ]
+    ++ lib.optional docSupport doxygen;
+
+  buildInputs = [ libftdi1 ];
+
+  enableParallelBuilding = true;
+
+  installTargets = [ "install" ]
+    ++ lib.optional docSupport "doc";
+
+  postInstall = lib.optionalString docSupport ''
+    mkdir -p $doc/share/libexsid/doc
+    cp -r docs/html $doc/share/libexsid/doc/
+  '';
+
+  meta = with lib; {
+    description = "Driver for exSID USB";
+    homepage = "http://hacks.slashdirt.org/hw/exsid/";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ OPNA2608 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libextractor/default.nix b/nixpkgs/pkgs/development/libraries/libextractor/default.nix
new file mode 100644
index 000000000000..272cd3d9aa3e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libextractor/default.nix
@@ -0,0 +1,105 @@
+{ lib, stdenv, fetchurl, fetchpatch, substituteAll
+, libtool, gettext, zlib, bzip2, flac, libvorbis
+, exiv2, libgsf, pkg-config
+, rpmSupport ? stdenv.isLinux, rpm
+, gstreamerSupport ? true, gst_all_1
+# ^ Needed e.g. for proper id3 and FLAC support.
+#   Set to `false` to decrease package closure size by about 87 MB (53%).
+, gstPlugins ? (gst: [ gst.gst-plugins-base gst.gst-plugins-good ])
+# If an application needs additional gstreamer plugins it can also make them
+# available by adding them to the environment variable
+# GST_PLUGIN_SYSTEM_PATH_1_0, e.g. like this:
+# postInstall = ''
+#   wrapProgram $out/bin/extract --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0"
+# '';
+# See also <https://nixos.org/nixpkgs/manual/#sec-language-gnome>.
+, gtkSupport ? true, glib, gtk3
+, videoSupport ? true, ffmpeg_4, libmpeg2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libextractor";
+  version = "1.11";
+
+  src = fetchurl {
+    url = "mirror://gnu/libextractor/${pname}-${version}.tar.gz";
+    sha256 = "sha256-FvYzq4dGo4VHxKHaP0WRGSsIJa2DxDNvBXW4WEPYvY8=";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "libextractor-exiv2-0.28.patch";
+      url = "https://git.pld-linux.org/?p=packages/libextractor.git;a=blob_plain;f=libextractor-exiv2-0.28.patch;h=d763b65f2578f1127713de8dc82f432d34f95a85;hb=0e7de1c6794e8c331a1a1a6a829993c7cd217d3a";
+      hash = "sha256-szAv2A+NmiQyj2+R7BO6fHX588vlTgljPtrnMR6mgGY=";
+    })
+  ] ++ lib.optionals gstreamerSupport [
+
+    # Libraries cannot be wrapped so we need to hardcode the plug-in paths.
+    (substituteAll {
+      src = ./gst-hardcode-plugins.patch;
+      load_gst_plugins = lib.concatMapStrings
+        (plugin: ''gst_registry_scan_path(gst_registry_get(), "${lib.getLib plugin}/lib/gstreamer-1.0");'')
+        (gstPlugins gst_all_1);
+    })
+  ];
+
+  preConfigure =
+    '' echo "patching installation directory in \`extractor.c'..."
+       sed -i "src/main/extractor.c" \
+           -e "s|pexe[[:blank:]]*=.*$|pexe = strdup(\"$out/lib/\");|g"
+    '';
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs =
+   [ libtool gettext zlib bzip2 flac libvorbis exiv2
+     libgsf
+   ] ++ lib.optionals rpmSupport [ rpm ]
+     ++ lib.optionals gstreamerSupport
+          ([ gst_all_1.gstreamer ] ++ gstPlugins gst_all_1)
+     ++ lib.optionals gtkSupport [ glib gtk3 ]
+     ++ lib.optionals videoSupport [ ffmpeg_4 libmpeg2 ];
+
+  configureFlags = [
+    "--disable-ltdl-install"
+    "--with-ltdl-include=${libtool}/include"
+    "--with-ltdl-lib=${libtool.lib}/lib"
+    "--enable-xpdf"
+  ];
+
+  # Checks need to be run after "make install", otherwise plug-ins are not in
+  # the search path, etc.
+  doCheck = false;
+  doInstallCheck = !stdenv.isDarwin;
+  installCheckPhase = "make check";
+
+  meta = with lib; {
+    description = "Simple library for keyword extraction";
+
+    longDescription =
+      '' GNU libextractor is a library used to extract meta-data from files
+         of arbitrary type.  It is designed to use helper-libraries to perform
+         the actual extraction, and to be trivially extendable by linking
+         against external extractors for additional file types.
+
+         The goal is to provide developers of file-sharing networks or
+         WWW-indexing bots with a universal library to obtain simple keywords
+         to match against queries.  libextractor contains a shell-command
+         extract that, similar to the well-known file command, can extract
+         meta-data from a file an print the results to stdout.
+
+         Currently, libextractor supports the following formats: HTML, PDF,
+         PS, OLE2 (DOC, XLS, PPT), OpenOffice (sxw), StarOffice (sdw), DVI,
+         MAN, FLAC, MP3 (ID3v1 and ID3v2), NSF(E) (NES music), SID (C64
+         music), OGG, WAV, EXIV2, JPEG, GIF, PNG, TIFF, DEB, RPM, TAR(.GZ),
+         ZIP, ELF, S3M (Scream Tracker 3), XM (eXtended Module), IT (Impulse
+         Tracker), FLV, REAL, RIFF (AVI), MPEG, QT and ASF.  Also, various
+         additional MIME types are detected.
+      '';
+
+    license = licenses.gpl3Plus;
+
+    maintainers = [ maintainers.jorsn ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libextractor/gst-hardcode-plugins.patch b/nixpkgs/pkgs/development/libraries/libextractor/gst-hardcode-plugins.patch
new file mode 100644
index 000000000000..73ecf5f252f6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libextractor/gst-hardcode-plugins.patch
@@ -0,0 +1,11 @@
+--- a/src/plugins/gstreamer_extractor.c
++++ b/src/plugins/gstreamer_extractor.c
+@@ -2215,6 +2215,7 @@ void __attribute__ ((constructor))
+ gstreamer_init ()
+ {
+   gst_init (NULL, NULL);
++  @load_gst_plugins@
+   g_log_set_default_handler (&log_handler, NULL);
+   g_log_set_handler (NULL, G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
+                     &log_handler, NULL);
+
diff --git a/nixpkgs/pkgs/development/libraries/libexttextcat/default.nix b/nixpkgs/pkgs/development/libraries/libexttextcat/default.nix
new file mode 100644
index 000000000000..39369c5c3b6b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libexttextcat/default.nix
@@ -0,0 +1,19 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libexttextcat";
+  version = "3.4.6";
+
+  src = fetchurl {
+    url = "https://dev-www.libreoffice.org/src/libexttextcat/${pname}-${version}.tar.xz";
+    sha256 = "sha256-bXfqziDp6hBsEzDiaO3nDJpKiXRN3CVxVoJ1TsozaN8=";
+  };
+
+  meta = with lib; {
+    description = "An N-Gram-Based Text Categorization library primarily intended for language guessing";
+    homepage = "https://wiki.documentfoundation.org/Libexttextcat";
+    license = licenses.bsd3;
+    mainProgram = "createfp";
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libf2c/default.nix b/nixpkgs/pkgs/development/libraries/libf2c/default.nix
new file mode 100644
index 000000000000..a2cb4d2bd246
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libf2c/default.nix
@@ -0,0 +1,40 @@
+{lib, stdenv, fetchurl, unzip}:
+
+stdenv.mkDerivation rec {
+  pname = "libf2c";
+  version = "20160102";
+
+  src = fetchurl {
+    url = "http://www.netlib.org/f2c/libf2c.zip";
+    sha256 = "1q78y8j8xpl8zdzdxmn5ablss56hi5a7vz3idam9l2nfx5q40h6a";
+  };
+
+  unpackPhase = ''
+    mkdir build
+    cd build
+    unzip ${src}
+  '';
+
+  makeFlags = [ "-f" "makefile.u" ];
+
+  installPhase = ''
+    mkdir -p $out/include $out/lib
+    cp libf2c.a $out/lib
+    cp f2c.h $out/include
+  '';
+
+  nativeBuildInputs = [ unzip ];
+
+  hardeningDisable = [ "format" ];
+
+  # Makefile is missing depepdencies on generated headers:
+  #   main.c:4:10: fatal error: signal1.h: No such file or directory
+  enableParallelBuilding = false;
+
+  meta = {
+    description = "F2c converts Fortran 77 source code to C";
+    homepage = "http://www.netlib.org/f2c/";
+    license = lib.licenses.mit;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libfabric/default.nix b/nixpkgs/pkgs/development/libraries/libfabric/default.nix
new file mode 100644
index 000000000000..ab92befa9ed8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfabric/default.nix
@@ -0,0 +1,44 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, pkg-config
+, autoreconfHook
+, enablePsm2 ? (stdenv.isx86_64 && stdenv.isLinux)
+, libpsm2
+, enableOpx ? (stdenv.isx86_64 && stdenv.isLinux)
+, libuuid
+, numactl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libfabric";
+  version = "1.20.1";
+
+  enableParallelBuilding = true;
+
+  src = fetchFromGitHub {
+    owner = "ofiwg";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-rQzsh3Q2xaGwmmsfvUmFE8WbAb1e2JEvunSoqZYRHvE=";
+  };
+
+  outputs = [ "out" "dev" "man" ];
+
+  nativeBuildInputs = [ pkg-config autoreconfHook ];
+
+  buildInputs = lib.optionals enableOpx [ libuuid numactl ] ++ lib.optionals enablePsm2 [ libpsm2 ];
+
+  configureFlags = [
+    (if enablePsm2 then "--enable-psm2=${libpsm2}" else "--disable-psm2")
+    (if enableOpx then "--enable-opx" else "--disable-opx")
+  ];
+
+  meta = with lib; {
+    homepage = "https://ofiwg.github.io/libfabric/";
+    description = "Open Fabric Interfaces";
+    license = with licenses; [ gpl2 bsd2 ];
+    platforms = platforms.all;
+    maintainers = [ maintainers.bzizou ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libfakekey/default.nix b/nixpkgs/pkgs/development/libraries/libfakekey/default.nix
new file mode 100644
index 000000000000..3e568759c1bc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfakekey/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchurl, libX11, libXi, libXtst, pkg-config, xorgproto }:
+
+stdenv.mkDerivation rec {
+  pname = "libfakekey";
+  version = "0.1";
+
+  src = fetchurl {
+    url = "https://downloads.yoctoproject.org/releases/matchbox/libfakekey/0.1/${pname}-${version}.tar.gz";
+    sha256 = "10msplyn535hmzbmbdnx4zc20hkaw6d81if5lzxs82k8sq2mkx9k";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libX11 libXi libXtst xorgproto ];
+  NIX_LDFLAGS = "-lX11";
+
+  meta = with lib; {
+    description = "X virtual keyboard library";
+    homepage = "https://www.yoctoproject.org/tools-resources/projects/matchbox";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libfaketime/0001-Remove-unsupported-clang-flags.patch b/nixpkgs/pkgs/development/libraries/libfaketime/0001-Remove-unsupported-clang-flags.patch
new file mode 100644
index 000000000000..7dfad4978005
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfaketime/0001-Remove-unsupported-clang-flags.patch
@@ -0,0 +1,13 @@
+diff --git a/src/Makefile b/src/Makefile
+index 2af4804..bcff809 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -80,7 +80,7 @@ PREFIX ?= /usr/local
+ LIBDIRNAME ?= /lib/faketime
+ PLATFORM ?=$(shell uname)
+ 
+-CFLAGS += -std=gnu99 -Wall -Wextra -Werror -Wno-nonnull-compare -DFAKE_PTHREAD -DFAKE_STAT -DFAKE_UTIME -DFAKE_SLEEP -DFAKE_TIMERS -DFAKE_INTERNAL_CALLS -fPIC -DPREFIX='"'$(PREFIX)'"' -DLIBDIRNAME='"'$(LIBDIRNAME)'"' $(FAKETIME_COMPILE_CFLAGS)
++CFLAGS += -std=gnu99 -Wall -Wextra -DFAKE_PTHREAD -DFAKE_STAT -DFAKE_UTIME -DFAKE_SLEEP -DFAKE_TIMERS -DFAKE_INTERNAL_CALLS -fPIC -DPREFIX='"'$(PREFIX)'"' -DLIBDIRNAME='"'$(LIBDIRNAME)'"' $(FAKETIME_COMPILE_CFLAGS)
+ ifeq ($(PLATFORM),SunOS)
+ CFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=600
+ endif
diff --git a/nixpkgs/pkgs/development/libraries/libfaketime/default.nix b/nixpkgs/pkgs/development/libraries/libfaketime/default.nix
new file mode 100644
index 000000000000..f44702582f27
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfaketime/default.nix
@@ -0,0 +1,50 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, perl, coreutils }:
+
+stdenv.mkDerivation rec {
+  pname = "libfaketime";
+  version = "0.9.10";
+
+  src = fetchFromGitHub {
+    owner = "wolfcw";
+    repo = "libfaketime";
+    rev = "v${version}";
+    sha256 = "sha256-DYRuQmIhQu0CNEboBAtHOr/NnWxoXecuPMSR/UQ/VIQ=";
+  };
+
+  patches = [
+    ./nix-store-date.patch
+    (fetchpatch {
+      name = "0001-libfaketime.c-wrap-timespec_get-in-TIME_UTC-macro.patch";
+      url = "https://github.com/wolfcw/libfaketime/commit/e0e6b79568d36a8fd2b3c41f7214769221182128.patch";
+      sha256 = "sha256-KwwP76v0DXNW73p/YBvwUOPdKMAcVdbQSKexD/uFOYo=";
+    })
+  ] ++ (lib.optionals stdenv.cc.isClang [
+    # https://github.com/wolfcw/libfaketime/issues/277
+    ./0001-Remove-unsupported-clang-flags.patch
+  ]);
+
+  postPatch = ''
+    patchShebangs test src
+    for a in test/functests/test_exclude_mono.sh src/faketime.c ; do
+      substituteInPlace $a \
+        --replace /bin/bash ${stdenv.shell}
+    done
+    substituteInPlace src/faketime.c --replace @DATE_CMD@ ${coreutils}/bin/date
+  '';
+
+  PREFIX = placeholder "out";
+  LIBDIRNAME = "/lib";
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=cast-function-type -Wno-error=format-truncation";
+
+  nativeCheckInputs = [ perl ];
+
+  meta = with lib; {
+    description = "Report faked system time to programs without having to change the system-wide time";
+    homepage = "https://github.com/wolfcw/libfaketime/";
+    license = licenses.gpl2;
+    platforms = platforms.all;
+    maintainers = [ maintainers.bjornfor ];
+    mainProgram = "faketime";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libfaketime/nix-store-date.patch b/nixpkgs/pkgs/development/libraries/libfaketime/nix-store-date.patch
new file mode 100644
index 000000000000..e93a7ec76507
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfaketime/nix-store-date.patch
@@ -0,0 +1,29 @@
+From abd7dd05b440e3dc9621a1579e4afb0267897d9c Mon Sep 17 00:00:00 2001
+From: Finn Behrens <me@kloenk.de>
+Date: Fri, 5 Mar 2021 21:58:57 +0100
+Subject: [PATCH] use nix date path
+
+---
+ src/faketime.c | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/src/faketime.c b/src/faketime.c
+index af618f2..48e47da 100644
+--- a/src/faketime.c
++++ b/src/faketime.c
+@@ -50,11 +50,7 @@
+ 
+ const char version[] = "0.9.10";
+ 
+-#if (defined __APPLE__) || (defined __sun)
+-static const char *date_cmd = "gdate";
+-#else
+-static const char *date_cmd = "date";
+-#endif
++static const char *date_cmd = "@DATE_CMD@";
+ 
+ #define PATH_BUFSIZE 4096
+ 
+-- 
+2.24.3 (Apple Git-128)
+
diff --git a/nixpkgs/pkgs/development/libraries/libfann/default.nix b/nixpkgs/pkgs/development/libraries/libfann/default.nix
new file mode 100644
index 000000000000..590755c3a0fa
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfann/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, lib, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "libfann";
+  version = "2.2.0";
+
+  src = fetchFromGitHub {
+    owner = "libfann";
+    repo = "fann";
+    rev = version;
+    sha256 = "0awbs0vjsrdglqiaybb0ln13ciizmyrw9ahllahvgbq4nr0nvf6y";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  outputs = [ "out" "dev" ];
+
+  meta = {
+    homepage = "http://leenissen.dk/fann/wp/";
+    description = "Fast Artificial Neural Network Library";
+    maintainers = with lib.maintainers; [ fpletz ];
+    license = lib.licenses.lgpl21;
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libff/default.nix b/nixpkgs/pkgs/development/libraries/libff/default.nix
new file mode 100644
index 000000000000..af2191fb4136
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libff/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub, cmake, boost, gmp, openssl, pkg-config
+, enableStatic ? stdenv.hostPlatform.isStatic }:
+
+stdenv.mkDerivation rec {
+  pname = "libff";
+  version = "0.2.1";
+
+  src = fetchFromGitHub {
+    owner = "scipr-lab";
+    repo = "libff";
+    rev = "v${version}";
+    sha256 = "0dczi829497vqlmn6n4fgi89bc2h9f13gx30av5z2h6ikik7crgn";
+    fetchSubmodules = true;
+  };
+
+  cmakeFlags = [ "-DWITH_PROCPS=Off" ]
+    ++ lib.optionals stdenv.isAarch64 [ "-DCURVE=ALT_BN128" "-DUSE_ASM=OFF" ];
+
+  postPatch = lib.optionalString (!enableStatic) ''
+    substituteInPlace libff/CMakeLists.txt --replace "STATIC" "SHARED"
+  '';
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ boost gmp openssl ];
+
+  meta = with lib; {
+    description = "C++ library for Finite Fields and Elliptic Curves";
+    changelog = "https://github.com/scipr-lab/libff/blob/develop/CHANGELOG.md";
+    homepage = "https://github.com/scipr-lab/libff";
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ arturcygan ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libffcall/default.nix b/nixpkgs/pkgs/development/libraries/libffcall/default.nix
new file mode 100644
index 000000000000..ebeb520a769e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libffcall/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libffcall";
+  version = "2.4";
+
+  src = fetchurl {
+    url = "mirror://gnu/libffcall/libffcall-${version}.tar.gz";
+    sha256 = "sha256-jvaZIdvcBrxbuQUTYiY3p7g6cfMfW6N3vp2P2PV5EsI=";
+  };
+
+  enableParallelBuilding = false;
+
+  outputs = [ "dev" "out" "doc" "man" ];
+
+  postInstall = ''
+    mkdir -p $doc/share/doc/libffcall
+    mv $out/share/html $doc/share/doc/libffcall
+    rm -rf $out/share
+  '';
+
+  meta = with lib; {
+    description = "Foreign function call library";
+    homepage = "https://www.gnu.org/software/libffcall/";
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libffi/3.3.nix b/nixpkgs/pkgs/development/libraries/libffi/3.3.nix
new file mode 100644
index 000000000000..294717d1fb1c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libffi/3.3.nix
@@ -0,0 +1,69 @@
+{ lib, stdenv, fetchurl, fetchpatch
+, autoreconfHook
+
+, doCheck ? true # test suite depends on dejagnu which cannot be used during bootstrapping
+, dejagnu
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libffi";
+  version = "3.3";
+
+  src = fetchurl {
+    url = "https://github.com/libffi/libffi/releases/download/v${version}/${pname}-${version}.tar.gz";
+    hash = "sha256-cvunkicD3fp6Ao1ROsFahcjVTI1n9V+lpIAohdxlIFY=";
+  };
+
+  patches = [];
+
+  outputs = [ "out" "dev" "man" "info" ];
+
+  configureFlags = [
+    "--with-gcc-arch=generic" # no detection of -march= or -mtune=
+    "--enable-pax_emutramp"
+
+    # Causes issues in downstream packages which misuse ffi_closure_alloc
+    # Reenable once these issues are fixed and merged:
+    # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6155
+    # https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/283
+    "--disable-exec-static-tramp"
+  ];
+
+  # with fortify3, tests fail for some reason
+  hardeningDisable = [ "fortify3" ];
+
+  preCheck = ''
+    # The tests use -O0 which is not compatible with -D_FORTIFY_SOURCE.
+    NIX_HARDENING_ENABLE=''${NIX_HARDENING_ENABLE/fortify/}
+  '';
+
+  dontStrip = stdenv.hostPlatform != stdenv.buildPlatform; # Don't run the native `strip' when cross-compiling.
+
+  inherit doCheck;
+
+  nativeCheckInputs = [ dejagnu ];
+
+  meta = with lib; {
+    description = "A foreign function call interface library";
+    longDescription = ''
+      The libffi library provides a portable, high level programming
+      interface to various calling conventions.  This allows a
+      programmer to call any function specified by a call interface
+      description at run-time.
+
+      FFI stands for Foreign Function Interface.  A foreign function
+      interface is the popular name for the interface that allows code
+      written in one language to call code written in another
+      language.  The libffi library really only provides the lowest,
+      machine dependent layer of a fully featured foreign function
+      interface.  A layer must exist above libffi that handles type
+      conversions for values passed between the two languages.
+    '';
+    homepage = "http://sourceware.org/libffi/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ armeenm ];
+    platforms = platforms.all;
+    # never built on aarch64-darwin since first introduction in nixpkgs
+    broken = stdenv.isDarwin && stdenv.isAarch64;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libffi/default.nix b/nixpkgs/pkgs/development/libraries/libffi/default.nix
new file mode 100644
index 000000000000..6394a35d782d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libffi/default.nix
@@ -0,0 +1,79 @@
+{ lib, stdenv, fetchurl, fetchpatch
+, autoreconfHook
+
+  # test suite depends on dejagnu which cannot be used during bootstrapping
+  # dejagnu also requires tcl which can't be built statically at the moment
+, doCheck ? !(stdenv.hostPlatform.isStatic)
+, dejagnu
+, nix-update-script
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libffi";
+  version = "3.4.4";
+
+  src = fetchurl {
+    url = "https://github.com/libffi/libffi/releases/download/v${version}/${pname}-${version}.tar.gz";
+    sha256 = "sha256-1mxWrSWags8qnfxAizK/XaUjcVALhHRff7i2RXEt9nY=";
+  };
+
+  # 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.
+  patches = [
+    # Fix implicit function declarations (clang-16 build failure):
+    #     https://github.com/libffi/libffi/pull/764
+    ./fix-implicit-fun-decl.patch
+  ];
+
+  strictDeps = true;
+  outputs = [ "out" "dev" "man" "info" ];
+
+  enableParallelBuilding = true;
+
+  configurePlatforms = [ "build" "host" ];
+
+  configureFlags = [
+    "--with-gcc-arch=generic" # no detection of -march= or -mtune=
+    "--enable-pax_emutramp"
+  ];
+
+  preCheck = ''
+    # The tests use -O0 which is not compatible with -D_FORTIFY_SOURCE.
+    NIX_HARDENING_ENABLE=''${NIX_HARDENING_ENABLE/fortify3/}
+    NIX_HARDENING_ENABLE=''${NIX_HARDENING_ENABLE/fortify/}
+  '';
+
+  dontStrip = stdenv.hostPlatform != stdenv.buildPlatform; # Don't run the native `strip' when cross-compiling.
+
+  inherit doCheck;
+
+  nativeCheckInputs = [ dejagnu ];
+
+  passthru = {
+    updateScript = nix-update-script { };
+  };
+
+  meta = with lib; {
+    description = "A foreign function call interface library";
+    longDescription = ''
+      The libffi library provides a portable, high level programming
+      interface to various calling conventions.  This allows a
+      programmer to call any function specified by a call interface
+      description at run-time.
+
+      FFI stands for Foreign Function Interface.  A foreign function
+      interface is the popular name for the interface that allows code
+      written in one language to call code written in another
+      language.  The libffi library really only provides the lowest,
+      machine dependent layer of a fully featured foreign function
+      interface.  A layer must exist above libffi that handles type
+      conversions for values passed between the two languages.
+    '';
+    homepage = "http://sourceware.org/libffi/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ matthewbauer ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libffi/fix-implicit-fun-decl.patch b/nixpkgs/pkgs/development/libraries/libffi/fix-implicit-fun-decl.patch
new file mode 100644
index 000000000000..c0bd32d4333c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libffi/fix-implicit-fun-decl.patch
@@ -0,0 +1,46 @@
+https://github.com/libffi/libffi/commit/ce077e5565366171aa1b4438749b0922fce887a4.patch
+
+From ce077e5565366171aa1b4438749b0922fce887a4 Mon Sep 17 00:00:00 2001
+From: serge-sans-paille <serge.guelton@telecom-bretagne.eu>
+Date: Thu, 2 Feb 2023 14:46:29 +0000
+Subject: [PATCH] Forward declare open_temp_exec_file (#764)
+
+It's defined in closures.c and used in tramp.c.
+Also declare it as an hidden symbol, as it should be.
+
+Co-authored-by: serge-sans-paille <sguelton@mozilla.com>
+---
+ include/ffi_common.h | 4 ++++
+ src/tramp.c          | 4 ++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/include/ffi_common.h b/include/ffi_common.h
+index 2bd31b03d..c53a79493 100644
+--- a/include/ffi_common.h
++++ b/include/ffi_common.h
+@@ -128,6 +128,10 @@ void *ffi_data_to_code_pointer (void *data) FFI_HIDDEN;
+    static trampoline. */
+ int ffi_tramp_is_present (void *closure) FFI_HIDDEN;
+ 
++/* Return a file descriptor of a temporary zero-sized file in a
++   writable and executable filesystem. */
++int open_temp_exec_file(void) FFI_HIDDEN;
++
+ /* Extended cif, used in callback from assembly routine */
+ typedef struct
+ {
+diff --git a/src/tramp.c b/src/tramp.c
+index 7e005b054..5f19b557f 100644
+--- a/src/tramp.c
++++ b/src/tramp.c
+@@ -39,6 +39,10 @@
+ #ifdef __linux__
+ #define _GNU_SOURCE 1
+ #endif
++
++#include <ffi.h>
++#include <ffi_common.h>
++
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <stdlib.h>
diff --git a/nixpkgs/pkgs/development/libraries/libfido2/default.nix b/nixpkgs/pkgs/development/libraries/libfido2/default.nix
new file mode 100644
index 000000000000..b3c3cc450237
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfido2/default.nix
@@ -0,0 +1,59 @@
+{ lib
+, stdenv
+, fetchurl
+, cmake
+, pkg-config
+, hidapi
+, libcbor
+, openssl
+, udev
+, zlib
+, withPcsclite ? true
+, pcsclite
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libfido2";
+  version = "1.14.0";
+
+  # releases on https://developers.yubico.com/libfido2/Releases/ are signed
+  src = fetchurl {
+    url = "https://developers.yubico.com/${pname}/Releases/${pname}-${version}.tar.gz";
+    sha256 = "sha256-NgF5LjIAMtQoACxMzoSZpMe4AzGQUaJaDJ8fE4/+5Fo=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [ libcbor zlib ]
+    ++ lib.optionals stdenv.isDarwin [ hidapi ]
+    ++ lib.optionals stdenv.isLinux [ udev ]
+    ++ lib.optionals (stdenv.isLinux && withPcsclite) [ pcsclite ];
+
+  propagatedBuildInputs = [ openssl ];
+
+  outputs = [ "out" "dev" "man" ];
+
+  cmakeFlags = [
+    "-DUDEV_RULES_DIR=${placeholder "out"}/etc/udev/rules.d"
+    "-DCMAKE_INSTALL_LIBDIR=lib"
+  ] ++ lib.optionals stdenv.isDarwin [
+    "-DUSE_HIDAPI=1"
+  ] ++ lib.optionals stdenv.isLinux [
+    "-DNFC_LINUX=1"
+  ] ++ lib.optionals (stdenv.isLinux && withPcsclite) [
+    "-DUSE_PCSC=1"
+  ];
+
+  # causes possible redefinition of _FORTIFY_SOURCE?
+  hardeningDisable = [ "fortify3" ];
+
+  meta = with lib; {
+    description = ''
+      Provides library functionality for FIDO 2.0, including communication with a device over USB.
+    '';
+    homepage = "https://github.com/Yubico/libfido2";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ dtzWill prusnak ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libfilezilla/default.nix b/nixpkgs/pkgs/development/libraries/libfilezilla/default.nix
new file mode 100644
index 000000000000..99a3351d56ee
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfilezilla/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv
+, fetchurl
+, autoreconfHook
+, gettext
+, gnutls
+, nettle
+, pkg-config
+, libiconv
+, libxcrypt
+, ApplicationServices
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libfilezilla";
+  version = "0.45.0";
+
+  src = fetchurl {
+    url = "https://download.filezilla-project.org/${pname}/${pname}-${version}.tar.xz";
+    hash = "sha256-PBRUvBWG0Xd29ix1BdQ6BtOr0uLjVkLMpHf6IvJ9mC8=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  buildInputs = [ gettext gnutls nettle libxcrypt ]
+    ++ lib.optionals stdenv.isDarwin [ libiconv ApplicationServices ];
+
+  preBuild = lib.optionalString (stdenv.isDarwin) ''
+    export MACOSX_DEPLOYMENT_TARGET=11.0
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://lib.filezilla-project.org/";
+    description = "A modern C++ library, offering some basic functionality to build high-performing, platform-independent programs";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ pSub ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libfishsound/default.nix b/nixpkgs/pkgs/development/libraries/libfishsound/default.nix
new file mode 100644
index 000000000000..bf578b969eff
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfishsound/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchurl, libvorbis, speex, flac, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "libfishsound";
+  version = "1.0.0";
+
+  src = fetchurl {
+    url = "https://downloads.xiph.org/releases/libfishsound/${pname}-${version}.tar.gz";
+    sha256 = "1iz7mn6hw2wg8ljaw74f4g2zdj68ib88x4vjxxg3gjgc5z75f2rf";
+  };
+
+  propagatedBuildInputs = [ libvorbis speex flac ];
+
+  nativeBuildInputs = [ pkg-config ];
+
+  meta = with lib; {
+    homepage = "https://xiph.org/fishsound/";
+    description = "A simple programming interface for decoding and encoding audio data using Xiph.org codecs (FLAC, Speex and Vorbis)";
+    longDescription = ''libfishsound by itself is designed to handle raw codec streams from a lower level layer such as UDP datagrams. When these codecs are used in files, they are commonly encapsulated in Ogg to produce Ogg FLAC, Speex and Ogg Vorbis files.
+
+libfishsound is a wrapper around the existing codec libraries and provides a consistent, higher-level programming interface. It has been designed for use in a wide variety of applications; it has no direct dependencies on Ogg encapsulation, though it is most commonly used in conjunction with liboggz to decode or encode FLAC, Speex or Vorbis audio tracks in Ogg files, including Ogg Theora and Annodex.
+
+FishSound has been developed and tested on GNU/Linux, Darwin/MacOSX and Win32. It probably also works on other Unix-like systems via GNU autoconf. For Win32: nmake Makefiles, Visual Studio .NET 2003 solution files and Visual C++ 6.0 workspace files are all provided in the source distribution.'';
+    platforms = platforms.unix;
+    license = licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libfive/default.nix b/nixpkgs/pkgs/development/libraries/libfive/default.nix
new file mode 100644
index 000000000000..1d8f57a817c3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfive/default.nix
@@ -0,0 +1,105 @@
+{ lib
+, stdenv
+, wrapQtAppsHook
+, fetchFromGitHub
+, cmake
+, ninja
+, pkg-config
+, eigen
+, zlib
+, libpng
+, boost
+, guile
+, python
+, qtbase
+, darwin
+}:
+
+stdenv.mkDerivation {
+  pname = "libfive";
+  version = "unstable-2023-06-07";
+
+  src = fetchFromGitHub {
+    owner = "libfive";
+    repo = "libfive";
+    rev = "7af5f43684a8a497ac8610d39f7fca935364a9b9";
+    hash = "sha256-GQzsHKeKsCWKOVfBrTuUFq2XasPxhsN+19stWY0WtVc=";
+  };
+
+  nativeBuildInputs = [ wrapQtAppsHook cmake ninja pkg-config python.pkgs.pythonImportsCheckHook ];
+  buildInputs = [ eigen zlib libpng boost guile python qtbase ]
+    ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk_11_0.frameworks.Cocoa ];
+
+  preConfigure = ''
+    substituteInPlace studio/src/guile/interpreter.cpp \
+      --replace '"libfive/bind/guile"' \
+                '"libfive/bind/guile:${placeholder "out"}/${guile.siteCcacheDir}"' \
+      --replace '(app_resource_dir + ":" + finder_build_dir).toLocal8Bit()' \
+                '"libfive/bind/guile:${placeholder "out"}/${guile.siteCcacheDir}"'
+
+    substituteInPlace libfive/bind/guile/CMakeLists.txt \
+      --replace "LIBFIVE_FRAMEWORK_DIR=$<TARGET_FILE_DIR:libfive>" \
+                "LIBFIVE_FRAMEWORK_DIR=$out/lib" \
+      --replace "LIBFIVE_STDLIB_DIR=$<TARGET_FILE_DIR:libfive-stdlib>" \
+                "LIBFIVE_STDLIB_DIR=$out/lib"
+
+    substituteInPlace libfive/bind/python/CMakeLists.txt \
+      --replace ' ''${PYTHON_SITE_PACKAGES_DIR}' \
+                " $out/${python.sitePackages}" \
+
+    substituteInPlace libfive/bind/python/libfive/ffi.py \
+      --replace "os.path.join('libfive', folder)" \
+                "os.path.join('$out/${python.sitePackages}/libfive', folder)" \
+
+    export XDG_CACHE_HOME=$(mktemp -d)/.cache
+  '';
+
+  cmakeFlags = [
+    "-DGUILE_CCACHE_DIR=${placeholder "out"}/${guile.siteCcacheDir}"
+  ] ++ lib.optionals (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11") [
+    # warning: 'aligned_alloc' is only available on macOS 10.15 or newer
+    "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15"
+  ];
+
+  env = lib.optionalAttrs stdenv.cc.isClang {
+    NIX_CFLAGS_COMPILE = "-Wno-error=enum-constexpr-conversion";
+  };
+
+  postInstall = lib.optionalString stdenv.isDarwin ''
+    # No rules to install the mac app, so do it manually.
+    mkdir -p $out/Applications
+    cp -r studio/Studio.app $out/Applications/Studio.app
+
+    install_name_tool -add_rpath $out/lib $out/Applications/Studio.app/Contents/MacOS/Studio
+
+    makeWrapper $out/Applications/Studio.app/Contents/MacOS/Studio $out/bin/Studio
+  '' + ''
+    # Link "Studio" binary to "libfive-studio" to be more obvious:
+    ln -s "$out/bin/Studio" "$out/bin/libfive-studio"
+
+    # Create links since libfive looks for the library in a specific path.
+    mkdir -p "$out/${python.sitePackages}/libfive/src"
+    ln -s "$out"/lib/libfive.* "$out/${python.sitePackages}/libfive/src/"
+    mkdir -p "$out/${python.sitePackages}/libfive/stdlib"
+    ln -s "$out"/lib/libfive-stdlib.* "$out/${python.sitePackages}/libfive/stdlib/"
+
+    # Create links so Studio can find the bindings.
+    mkdir -p "$out/libfive/bind"
+    ln -s "$out/${python.sitePackages}" "$out/libfive/bind/python"
+  '';
+
+  pythonImportsCheck = [
+    "libfive"
+    "libfive.runner"
+    "libfive.shape"
+    "libfive.stdlib"
+  ];
+
+  meta = with lib; {
+    description = "Infrastructure for solid modeling with F-Reps in C, C++, and Guile";
+    homepage = "https://libfive.com/";
+    maintainers = with maintainers; [ hodapp kovirobi wulfsta ];
+    license = with licenses; [ mpl20 gpl2Plus ];
+    platforms = with platforms; all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libfixposix/default.nix b/nixpkgs/pkgs/development/libraries/libfixposix/default.nix
new file mode 100644
index 000000000000..3d451de582a5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfixposix/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, getconf }:
+
+stdenv.mkDerivation rec {
+  pname = "libfixposix";
+  version="0.5.1";
+
+  src = fetchFromGitHub {
+    owner = "sionescu";
+    repo = "libfixposix";
+    rev = "v${version}";
+    sha256 = "sha256-5qA6ytbqE+/05XQGxP9/4vEs9gFcuI3k7eJJYucW7fM=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ] ++ lib.optionals stdenv.isDarwin [ getconf ];
+
+  meta = with lib; {
+    homepage = "https://github.com/sionescu/libfixposix";
+    description = "Thin wrapper over POSIX syscalls and some replacement functionality";
+    license = licenses.boost;
+    maintainers = with maintainers; [ orivej raskin ];
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libfm/default.nix b/nixpkgs/pkgs/development/libraries/libfm/default.nix
new file mode 100644
index 000000000000..f8f79d99e457
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfm/default.nix
@@ -0,0 +1,54 @@
+{ lib
+, stdenv
+, fetchurl
+, glib
+, intltool
+, menu-cache
+, pango
+, pkg-config
+, vala
+, extraOnly ? false
+, withGtk3 ? false, gtk2, gtk3
+}:
+
+let
+    gtk = if withGtk3 then gtk3 else gtk2;
+    inherit (lib) optional optionalString;
+in
+stdenv.mkDerivation rec {
+  pname = if extraOnly
+          then "libfm-extra"
+          else "libfm";
+  version = "1.3.2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/pcmanfm/libfm-${version}.tar.xz";
+    sha256 = "sha256-pQQmMDBM+OXYz/nVZca9VG8ii0jJYBU+02ajTofK0eU=";
+  };
+
+  nativeBuildInputs = [ vala pkg-config intltool ];
+  buildInputs = [ glib gtk pango ]
+                ++ optional (!extraOnly) menu-cache;
+
+  configureFlags = [ "--sysconfdir=/etc" ]
+                   ++ optional extraOnly "--with-extra-only"
+                   ++ optional withGtk3 "--with-gtk=3";
+
+  installFlags = [ "sysconfdir=${placeholder "out"}/etc" ];
+
+  # libfm-extra is pulled in by menu-cache and thus leads to a collision for libfm
+  postInstall = optionalString (!extraOnly) ''
+     rm $out/lib/libfm-extra.so $out/lib/libfm-extra.so.* $out/lib/libfm-extra.la $out/lib/pkgconfig/libfm-extra.pc
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    broken = stdenv.isDarwin;
+    homepage = "https://blog.lxde.org/category/pcmanfm/";
+    license = licenses.lgpl21Plus;
+    description = "A glib-based library for file management";
+    maintainers = [ maintainers.ttuegel ];
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-elan/default.nix b/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-elan/default.nix
new file mode 100644
index 000000000000..3e7253a40175
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-elan/default.nix
@@ -0,0 +1,53 @@
+{ stdenvNoCC
+, lib
+, fetchzip
+, libfprint-tod
+, openssl
+, gusb
+, glib
+, autoPatchelfHook
+}:
+
+stdenvNoCC.mkDerivation {
+  pname = "libfprint-2-tod1-elan";
+  version = "0.0.8";
+
+  src = fetchzip {
+    url = "https://download.lenovo.com/pccbbs/mobiles/r1slf01w.zip";
+    hash = "sha256-GD/BebPto1fFLgyvpiitt+ngwEtdsnKsvdFNeSmVDmw=";
+    # .so is in a subzip
+    postFetch = ''
+      unpackFile $out/*
+      rm $out/*.zip
+      mv * $out/
+    '';
+  };
+
+  nativeBuildInputs = [ autoPatchelfHook];
+
+  buildInputs = [
+    libfprint-tod
+    openssl
+    gusb
+    glib
+  ];
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dm444 libfprint-2-tod1-elan.so -t "$out/lib/libfprint-2/tod-1/"
+
+    runHook postInstall
+  '';
+
+  passthru.driverPath = "/lib/libfprint-2/tod-1";
+
+  meta = with lib; {
+    description = "Elan(04f3:0c4b) driver module for libfprint-2-tod Touch OEM Driver";
+    homepage = "https://support.lenovo.com/us/en/downloads/ds560939-elan-fingerprint-driver-for-ubuntu-2204-thinkpad-e14-gen-4-e15-gen-4";
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+    license = licenses.unfree;
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ qdlmcfresh ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-goodix-550a/default.nix b/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-goodix-550a/default.nix
new file mode 100644
index 000000000000..16626fe0e227
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-goodix-550a/default.nix
@@ -0,0 +1,45 @@
+{ stdenv, lib, fetchzip, unzip, libfprint-tod }:
+
+stdenv.mkDerivation {
+  pname = "libfprint-2-tod1-goodix-550a";
+  version = "0.0.9";
+
+  src = fetchzip {
+    url = "https://download.lenovo.com/pccbbs/mobiles/r1slg01w.zip";
+    sha256 = "sha256-6tp8Unu6rs27oB5VAqfRqHmv5D9N3njl5qv6We0b/Ec=";
+  };
+
+  nativeBuildInputs = [ unzip ];
+
+  unpackPhase = ''
+    unzip $src/libfprint-tod-goodix-550a-0.0.9.zip
+    cd libfprint-tod-goodix-550a-0.0.9
+    ar x libfprint-2-tod-goodix_amd64.deb
+    tar xf data.tar.xz
+  '';
+
+  buildPhase = ''
+    patchelf \
+      --set-rpath ${lib.makeLibraryPath [ libfprint-tod ]} \
+      usr/lib/x86_64-linux-gnu/libfprint-2/tod-1/libfprint-tod-goodix-550a-$version.so
+  '';
+
+  installPhase = ''
+    mkdir -p "$out/lib/libfprint-2/tod-1/"
+    mkdir -p "$out/lib/udev/rules.d/"
+
+    cp usr/lib/x86_64-linux-gnu/libfprint-2/tod-1/libfprint-tod-goodix-550a-$version.so "$out/lib/libfprint-2/tod-1/"
+    cp lib/udev/rules.d/60-libfprint-2-tod1-goodix.rules "$out/lib/udev/rules.d/"
+  '';
+
+  passthru.driverPath = "/lib/libfprint-2/tod-1";
+
+  meta = with lib; {
+    description = "Goodix 550a driver module for libfprint-2-tod Touch OEM Driver (from Lenovo)";
+    homepage = "https://support.lenovo.com/us/en/downloads/ds560884-goodix-fingerprint-driver-for-linux-thinkpad-e14-gen-4-e15-gen-4";
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+    license = licenses.unfree;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ utkarshgupta137 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-goodix/default.nix b/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-goodix/default.nix
new file mode 100644
index 000000000000..c7710ce1d199
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-goodix/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, lib, fetchgit, libfprint-tod }:
+
+stdenv.mkDerivation {
+  pname = "libfprint-2-tod1-goodix";
+  version = "0.0.6";
+
+  src = fetchgit {
+    url = "https://git.launchpad.net/~oem-solutions-engineers/libfprint-2-tod1-goodix/+git/libfprint-2-tod1-goodix";
+    rev = "882735c6366fbe30149eea5cfd6d0ddff880f0e4"; # droped-lp1880058 on 2020-11-25
+    sha256 = "sha256-Uv+Rr4V31DyaZFOj79Lpyfl3G6zVWShh20roI0AvMPU=";
+  };
+
+  buildPhase = ''
+    patchelf \
+      --set-rpath ${lib.makeLibraryPath [ libfprint-tod ]} \
+      usr/lib/x86_64-linux-gnu/libfprint-2/tod-1/libfprint-tod-goodix-53xc-$version.so
+  '';
+
+  installPhase = ''
+    mkdir -p "$out/lib/libfprint-2/tod-1/"
+    mkdir -p "$out/lib/udev/rules.d/"
+
+    cp usr/lib/x86_64-linux-gnu/libfprint-2/tod-1/libfprint-tod-goodix-53xc-$version.so "$out/lib/libfprint-2/tod-1/"
+    cp lib/udev/rules.d/60-libfprint-2-tod1-goodix.rules "$out/lib/udev/rules.d/"
+  '';
+
+  passthru.driverPath = "/lib/libfprint-2/tod-1";
+
+  meta = with lib; {
+    description = "Goodix driver module for libfprint-2-tod Touch OEM Driver";
+    homepage = "https://git.launchpad.net/~oem-solutions-engineers/libfprint-2-tod1-goodix/+git/libfprint-2-tod1-goodix/";
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+    license = licenses.unfree;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ grahamc ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-vfs0090/0001-vfs0090-add-missing-explicit-dependencies-in-meson.b.patch b/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-vfs0090/0001-vfs0090-add-missing-explicit-dependencies-in-meson.b.patch
new file mode 100644
index 000000000000..ac06e83ab938
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-vfs0090/0001-vfs0090-add-missing-explicit-dependencies-in-meson.b.patch
@@ -0,0 +1,28 @@
+From c02f2e040dd1e7664777c5a705272e4eb7bfb569 Mon Sep 17 00:00:00 2001
+From: Vincent Breitmoser <look@my.amazin.horse>
+Date: Thu, 10 Jun 2021 14:09:19 +0200
+Subject: [PATCH] vfs0090: add missing explicit dependencies in meson.build
+
+Make all dependencies explicit, so they can be found when building with Nix.
+
+---
+ meson.build | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/meson.build b/meson.build
+index 54a7ca4..88f8793 100644
+--- a/meson.build
++++ b/meson.build
+@@ -17,6 +17,9 @@ udev_dep = dependency('udev')
+ vfs009x_deps += libfprint_tod_dep
+ vfs009x_deps += dependency('nss')
+ vfs009x_deps += dependency('openssl')
++vfs009x_deps += dependency('gusb')
++vfs009x_deps += dependency('libfprint-2')
++vfs009x_deps += dependency('glib-2.0')
+ 
+ vfs0090_deps += dependency('pixman-1')
+ 
+-- 
+2.31.1
+
diff --git a/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-vfs0090/0002-vfs0090-add-missing-linux-limits.h-include.patch b/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-vfs0090/0002-vfs0090-add-missing-linux-limits.h-include.patch
new file mode 100644
index 000000000000..6111cf0ad294
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-vfs0090/0002-vfs0090-add-missing-linux-limits.h-include.patch
@@ -0,0 +1,26 @@
+From 5405e02c629e689449e852424aed8cca217ed309 Mon Sep 17 00:00:00 2001
+From: Vincent Breitmoser <look@my.amazin.horse>
+Date: Thu, 10 Jun 2021 14:10:52 +0200
+Subject: [PATCH] vfs0090: add missing <linux/limits.h> include
+
+This header is needed for the NAME_MAX constant used in this file.
+
+---
+ vfs0090.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/vfs0090.c b/vfs0090.c
+index 8034faf..6070df7 100644
+--- a/vfs0090.c
++++ b/vfs0090.c
+@@ -24,6 +24,7 @@
+ 
+ #include <errno.h>
+ #include <ctype.h>
++#include <linux/limits.h>
+ #include <nss.h>
+ #include <pk11pub.h>
+ #include <sechash.h>
+-- 
+2.31.1
+
diff --git a/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-vfs0090/default.nix b/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-vfs0090/default.nix
new file mode 100644
index 000000000000..840f8e227153
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfprint-2-tod1-vfs0090/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, lib, fetchFromGitLab, pkg-config, libfprint, libfprint-tod, gusb, udev, nss, openssl, meson, pixman, ninja, glib }:
+stdenv.mkDerivation {
+  pname = "libfprint-2-tod1-vfs0090";
+  version = "0.8.5";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "3v1n0";
+    repo = "libfprint-tod-vfs0090";
+    rev = "6084a1545589beec0c741200b18b0902cca225ba";
+    sha256 = "sha256-tSML/8USd/LuHF/YGLvNgykixF6VYtfE4SXzeV47840=";
+  };
+
+  patches = [
+    # TODO remove once https://gitlab.freedesktop.org/3v1n0/libfprint-tod-vfs0090/-/merge_requests/1 is merged
+    ./0001-vfs0090-add-missing-explicit-dependencies-in-meson.b.patch
+    # TODO remove once https://gitlab.freedesktop.org/3v1n0/libfprint-tod-vfs0090/-/merge_requests/2 is merged
+    ./0002-vfs0090-add-missing-linux-limits.h-include.patch
+  ];
+
+  nativeBuildInputs = [ pkg-config meson ninja ];
+  buildInputs = [ libfprint libfprint-tod glib gusb udev nss openssl pixman ];
+
+  installPhase = ''
+    runHook preInstall
+
+    install -D -t "$out/lib/libfprint-2/tod-1/" libfprint-tod-vfs009x.so
+    install -D -t "$out/lib/udev/rules.d/" $src/60-libfprint-2-tod-vfs0090.rules
+
+    runHook postInstall
+  '';
+
+  passthru.driverPath = "/lib/libfprint-2/tod-1";
+
+  meta = with lib; {
+    description = "A libfprint-2-tod Touch OEM Driver for 2016 ThinkPad's fingerprint readers";
+    homepage = "https://gitlab.freedesktop.org/3v1n0/libfprint-tod-vfs0090";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ valodim ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libfprint-tod/default.nix b/nixpkgs/pkgs/development/libraries/libfprint-tod/default.nix
new file mode 100644
index 000000000000..bffafc5e44f4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfprint-tod/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, libfprint
+, fetchFromGitLab
+}:
+
+# for the curious, "tod" means "Touch OEM Drivers" meaning it can load
+# external .so's.
+libfprint.overrideAttrs ({ postPatch ? "", mesonFlags ? [], ... }: let
+  version = "1.90.7+git20210222+tod1";
+in  {
+  pname = "libfprint-tod";
+  inherit version;
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "3v1n0";
+    repo = "libfprint";
+    rev = "v${version}";
+    sha256 = "0cj7iy5799pchyzqqncpkhibkq012g3bdpn18pfb19nm43svhn4j";
+  };
+
+  mesonFlags = [
+    # Include virtual drivers for fprintd tests
+    "-Ddrivers=all"
+    "-Dudev_hwdb_dir=${placeholder "out"}/lib/udev/hwdb.d"
+  ];
+
+
+  postPatch = ''
+    ${postPatch}
+    patchShebangs ./tests/*.py ./tests/*.sh
+  '';
+
+
+  meta = with lib; {
+    homepage = "https://gitlab.freedesktop.org/3v1n0/libfprint";
+    description = "A library designed to make it easy to add support for consumer fingerprint readers, with support for loaded drivers";
+    license = licenses.lgpl21;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ grahamc ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libfprint/default.nix b/nixpkgs/pkgs/development/libraries/libfprint/default.nix
new file mode 100644
index 000000000000..41eef399162a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfprint/default.nix
@@ -0,0 +1,93 @@
+{ lib, stdenv
+, fetchFromGitLab
+, pkg-config
+, meson
+, python3
+, ninja
+, gusb
+, pixman
+, glib
+, nss
+, gobject-introspection
+, coreutils
+, cairo
+, libgudev
+, gtk-doc
+, docbook-xsl-nons
+, docbook_xml_dtd_43
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libfprint";
+  version = "1.94.6";
+  outputs = [ "out" "devdoc" ];
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "libfprint";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-lDnAXWukBZSo8X6UEVR2nOMeVUi/ahnJgx2cP+vykZ8=";
+  };
+
+  postPatch = ''
+    patchShebangs \
+      tests/test-runner.sh \
+      tests/unittest_inspector.py \
+      tests/virtual-image.py \
+      tests/umockdev-test.py \
+      tests/test-generated-hwdb.sh
+  '';
+
+  nativeBuildInputs = [
+    pkg-config
+    meson
+    ninja
+    gtk-doc
+    docbook-xsl-nons
+    docbook_xml_dtd_43
+    gobject-introspection
+  ];
+
+  buildInputs = [
+    gusb
+    pixman
+    glib
+    nss
+    cairo
+    libgudev
+  ];
+
+  mesonFlags = [
+    "-Dudev_rules_dir=${placeholder "out"}/lib/udev/rules.d"
+    # Include virtual drivers for fprintd tests
+    "-Ddrivers=all"
+    "-Dudev_hwdb_dir=${placeholder "out"}/lib/udev/hwdb.d"
+  ];
+
+  nativeInstallCheckInputs = [
+    (python3.withPackages (p: with p; [ pygobject3 ]))
+  ];
+
+  # We need to run tests _after_ install so all the paths that get loaded are in
+  # the right place.
+  doCheck = false;
+
+  doInstallCheck = true;
+
+  installCheckPhase = ''
+    runHook preInstallCheck
+
+    ninjaCheckPhase
+
+    runHook postInstallCheck
+  '';
+
+  meta = with lib; {
+    homepage = "https://fprint.freedesktop.org/";
+    description = "A library designed to make it easy to add support for consumer fingerprint readers";
+    license = licenses.lgpl21Only;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ abbradar ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libfpx/default.nix b/nixpkgs/pkgs/development/libraries/libfpx/default.nix
new file mode 100644
index 000000000000..5c77e0139e8a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfpx/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchurl, fetchpatch }:
+
+stdenv.mkDerivation rec {
+  pname = "libfpx";
+  version = "1.3.1-7";
+
+  src = fetchurl {
+    url = "mirror://imagemagick/delegates/${pname}-${version}.tar.xz";
+    sha256 = "1s28mwb06w6dj0zl6ashpj8m1qiyadawzl7cvbw7dmj1w39ipghh";
+  };
+
+  # Darwin gets misdetected as Windows without this
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-D__unix";
+
+  patches = [
+    (fetchpatch {
+      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libfpx/files/libfpx-1.3.1_p6-gcc6.patch?id=f28a947813dbc0a1fd1a8d4a712d58a64c48ca01";
+      sha256 = "032y8110zgnkdhkdq3745zk53am1x34d912rai8q70k3sskyq22p";
+    })
+    # Pull upstream fix for -fno-common:
+    #  https://github.com/ImageMagick/libfpx/pull/1
+    (fetchpatch {
+      name = "fno-common.patch";
+      url = "https://github.com/ImageMagick/libfpx/commit/c32b340581ba6c88c5092f374f655c7579b598a6.patch";
+      sha256 = "1gbc0qb2ri1mj9r66wx0yn28fsr7zhhlyz2mwbica8wh34xijgz9";
+    })
+  ];
+
+  meta = with lib; {
+    homepage = "http://www.imagemagick.org";
+    description = "A library for manipulating FlashPIX images";
+    license = "Flashpix";
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libfreeaptx/default.nix b/nixpkgs/pkgs/development/libraries/libfreeaptx/default.nix
new file mode 100644
index 000000000000..cfc120244521
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfreeaptx/default.nix
@@ -0,0 +1,46 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "libfreeaptx";
+  version = "0.1.1";
+
+  src = fetchFromGitHub {
+    owner = "iamthehorker";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-eEUhOrKqb2hHWanY+knpY9FBEnjkkFTB+x6BZgMBpbo=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace Makefile \
+      --replace '-soname' '-install_name' \
+      --replace 'lib$(NAME).so' 'lib$(NAME).dylib'
+  '';
+
+  makeFlags = [
+    "PREFIX=${placeholder "out"}"
+    # disable static builds
+    "ANAME="
+    "AOBJECTS="
+    "STATIC_UTILITIES="
+  ];
+
+  enableParallelBuilding = true;
+
+  postInstall = lib.optionalString stdenv.isDarwin ''
+    install_name_tool -change libfreeaptx.dylib.0 $out/lib/libfreeaptx.dylib.0 $out/bin/freeaptxdec
+    install_name_tool -change libfreeaptx.dylib.0 $out/lib/libfreeaptx.dylib.0 $out/bin/freeaptxenc
+    install_name_tool -id $out/lib/libfreeaptx.dylib $out/lib/libfreeaptx.dylib
+    install_name_tool -id $out/lib/libfreeaptx.dylib.0 $out/lib/libfreeaptx.dylib.0
+  '';
+
+  meta = with lib; {
+    description = "Free Implementation of Audio Processing Technology codec (aptX)";
+    license = licenses.lgpl21Plus;
+    homepage = "https://github.com/iamthehorker/libfreeaptx";
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ kranzes ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libfreefare/default.nix b/nixpkgs/pkgs/development/libraries/libfreefare/default.nix
new file mode 100644
index 000000000000..f1466dd5a9f5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfreefare/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, libnfc, openssl
+, libobjc ? null
+, IOKit, Security
+}:
+
+stdenv.mkDerivation {
+  pname = "libfreefare";
+  version = "0.4.0";
+
+  src = fetchurl {
+    url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/libfreefare/libfreefare-0.4.0.tar.bz2";
+    sha256 = "0r5wfvwgf35lb1v65wavnwz2wlfyfdims6a9xpslf4lsm4a1v8xz";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ libnfc openssl ] ++ lib.optionals stdenv.isDarwin [ libobjc IOKit Security ];
+
+  meta = with lib; {
+    description = "The libfreefare project aims to provide a convenient API for MIFARE card manipulations";
+    license = licenses.lgpl3;
+    homepage = "https://github.com/nfc-tools/libfreefare";
+    maintainers = with maintainers; [bobvanderlinden];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libfsm/default.nix b/nixpkgs/pkgs/development/libraries/libfsm/default.nix
new file mode 100644
index 000000000000..9840b875f331
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfsm/default.nix
@@ -0,0 +1,62 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, bmake
+, docbook_xsl
+, libxslt
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libfsm";
+  version = "0.1pre2987_${builtins.substring 0 8 src.rev}";
+
+  src = fetchFromGitHub {
+    owner  = "katef";
+    repo   = pname;
+    rev    = "087e3389ad2cd5e5c40caeb40387e632567d7258";
+    hash   = "sha256-XWrZxnRbMB609l+sYFf8VsXy3NxqBsBPUrHgKLIyu/I=";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [
+    bmake
+    docbook_xsl
+    libxslt # xsltproc
+  ];
+  enableParallelBuilding = true;
+  enableParallelInstalling = false;
+
+  # note: build checks value of '$CC' to add some extra cflags, but we don't
+  # necessarily know which 'stdenv' someone chose, so we leave it alone (e.g.
+  # if we use stdenv vs clangStdenv, we don't know which, and CC=cc in all
+  # cases.) it's unclear exactly what should be done if we want those flags,
+  # but the defaults work fine.
+  makeFlags = [ "-r" "PREFIX=$(out)" ];
+
+  # fix up multi-output install. we also have to fix the pkg-config libdir
+  # file; it uses prefix=$out; libdir=${prefix}/lib, which is wrong in
+  # our case; libdir should really be set to the $lib output.
+  postInstall = ''
+    mkdir -p $lib $dev/lib
+
+    mv $out/lib             $lib/lib
+    mv $out/include         $dev/include
+    mv $out/share/pkgconfig $dev/lib/pkgconfig
+    rmdir $out/share
+
+    for x in libfsm.pc libre.pc; do
+      substituteInPlace "$dev/lib/pkgconfig/$x" \
+        --replace 'libdir=''${prefix}/lib' "libdir=$lib/lib"
+    done
+  '';
+
+  outputs = [ "out" "lib" "dev" ];
+
+  meta = with lib; {
+    description = "DFA regular expression library & friends";
+    homepage    = "https://github.com/katef/libfsm";
+    license     = licenses.bsd2;
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ thoughtpolice ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libftdi/1.x.nix b/nixpkgs/pkgs/development/libraries/libftdi/1.x.nix
new file mode 100644
index 000000000000..1e35d4124615
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libftdi/1.x.nix
@@ -0,0 +1,77 @@
+{ lib
+, stdenv
+, fetchgit
+, cmake
+, pkg-config
+, libusb1
+, libconfuse
+, cppSupport ? true
+, boost
+, pythonSupport ? true
+, python3
+, swig
+, docSupport ? true
+, doxygen
+, graphviz
+}:
+
+let
+  inherit (lib) optionals optionalString;
+  onOff = a: if a then "ON" else "OFF";
+in
+stdenv.mkDerivation rec {
+  pname = "libftdi";
+  version = "1.5";
+
+  src = fetchgit {
+    url = "git://developer.intra2net.com/libftdi";
+    rev = "v${version}";
+    sha256 = "0vipg3y0kbbzjhxky6hfyxy42mpqhvwn1r010zr5givcfp8ghq26";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [ cmake pkg-config ]
+    ++ optionals docSupport [ doxygen graphviz ]
+    ++ optionals pythonSupport [ swig ];
+
+  buildInputs = [ libconfuse ]
+    ++ optionals cppSupport [ boost ];
+
+  cmakeFlags = [
+    "-DFTDIPP=${onOff cppSupport}"
+    "-DBUILD_TESTS=${onOff cppSupport}"
+    "-DLINK_PYTHON_LIBRARY=${onOff pythonSupport}"
+    "-DPYTHON_BINDINGS=${onOff pythonSupport}"
+    "-DDOCUMENTATION=${onOff docSupport}"
+  ] ++ lib.optionals pythonSupport [
+    "-DPYTHON_EXECUTABLE=${python3.pythonOnBuildForHost.interpreter}"
+    "-DPYTHON_LIBRARY=${python3}/lib/libpython${python3.pythonVersion}${stdenv.hostPlatform.extensions.sharedLibrary}"
+  ];
+
+  propagatedBuildInputs = [ libusb1 ];
+
+  postInstall = ''
+    mkdir -p "$out/etc/udev/rules.d/"
+    cp ../packages/99-libftdi.rules "$out/etc/udev/rules.d/"
+  '' + optionalString docSupport ''
+    cp -r doc/man "$out/share/"
+    cp -r doc/html "$out/share/doc/libftdi1/"
+  '';
+
+  postFixup = optionalString cppSupport ''
+    # This gets misassigned to the C++ version's path for some reason
+    for fileToFix in $out/{bin/libftdi1-config,lib/pkgconfig/libftdi1.pc}; do
+      substituteInPlace $fileToFix \
+        --replace "$out/include/libftdipp1" "$out/include/libftdi1"
+    done
+  '';
+
+  meta = with lib; {
+    description = "A library to talk to FTDI chips using libusb";
+    homepage = "https://www.intra2net.com/en/developer/libftdi/";
+    license = with licenses; [ lgpl2Only gpl2Only ];
+    platforms = platforms.all;
+    maintainers = with maintainers; [ bjornfor ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libftdi/default.nix b/nixpkgs/pkgs/development/libraries/libftdi/default.nix
new file mode 100644
index 000000000000..ffc33d0247d1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libftdi/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, stdenv
+, fetchurl
+, libusb-compat-0_1
+, Security
+, IOKit
+, libobjc
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libftdi";
+  version = "0.20";
+
+  src = fetchurl {
+    url = "https://www.intra2net.com/en/developer/libftdi/download/${pname}-${version}.tar.gz";
+    sha256 = "13l39f6k6gff30hsgh0wa2z422g9pyl91rh8a8zz6f34k2sxaxii";
+  };
+
+  buildInputs = [ libusb-compat-0_1 ] ++ lib.optionals stdenv.isDarwin [ libobjc Security IOKit ];
+
+  propagatedBuildInputs = [ libusb-compat-0_1 ];
+
+  configureFlags = lib.optional (!stdenv.isDarwin) "--with-async-mode";
+
+  # allow async mode. from ubuntu. see:
+  #   https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/libftdi/trusty/view/head:/debian/patches/04_async_mode.diff
+  patchPhase = ''
+    substituteInPlace ./src/ftdi.c \
+      --replace "ifdef USB_CLASS_PTP" "if 0"
+  '';
+
+  # remove forbidden references to $TMPDIR
+  preFixup = lib.optionalString stdenv.isLinux ''
+    for f in "$out"/bin/*; do
+      if isELF "$f"; then
+        patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$f"
+      fi
+    done
+  '';
+
+  meta = {
+    description = "A library to talk to FTDI chips using libusb";
+    homepage = "https://www.intra2net.com/en/developer/libftdi/";
+    license = lib.licenses.lgpl21;
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libfyaml/default.nix b/nixpkgs/pkgs/development/libraries/libfyaml/default.nix
new file mode 100644
index 000000000000..f594d64095c4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libfyaml/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook, testers }:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libfyaml";
+  version = "0.9";
+
+  src = fetchFromGitHub {
+    owner = "pantoniou";
+    repo = "libfyaml";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-Id5pdFzjA9q67okfESO3LZH8jIz93mVgIEEuBbPjuGI=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  outputs = [ "bin" "dev" "out" "man" ];
+
+  configureFlags = [ "--disable-network" ];
+
+  doCheck = true;
+
+  preCheck = ''
+    patchShebangs test
+  '';
+
+  passthru.tests.pkg-config = testers.hasPkgConfigModules {
+    package = finalAttrs.finalPackage;
+  };
+
+  meta = with lib; {
+    description = "Fully feature complete YAML parser and emitter, supporting the latest YAML spec and passing the full YAML testsuite";
+    homepage = "https://github.com/pantoniou/libfyaml";
+    changelog = "https://github.com/pantoniou/libfyaml/releases/tag/v${finalAttrs.version}";
+    license = licenses.mit;
+    maintainers = [ maintainers.marsam ];
+    pkgConfigModules = [ "libfyaml" ];
+    platforms = platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libgadu/default.nix b/nixpkgs/pkgs/development/libraries/libgadu/default.nix
new file mode 100644
index 000000000000..72bf067b2db4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgadu/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, zlib, protobufc, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "libgadu";
+  version = "1.12.2";
+
+  src = fetchFromGitHub {
+    owner = "wojtekka";
+    repo = pname;
+    rev = version;
+    sha256 = "1s16cripy5w9k12534qb012iwc5m9qcjyrywgsziyn3kl3i0aa8h";
+  };
+
+  propagatedBuildInputs = [ zlib ];
+  buildInputs = [ protobufc ];
+  nativeBuildInputs = [ autoreconfHook ];
+
+  meta = {
+    description = "A library to deal with gadu-gadu protocol (most popular polish IM protocol)";
+    homepage = "https://libgadu.net/index.en.html";
+    platforms = lib.platforms.linux;
+    license = lib.licenses.lgpl21;
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgaminggear/default.nix b/nixpkgs/pkgs/development/libraries/libgaminggear/default.nix
new file mode 100644
index 000000000000..c90d47dff502
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgaminggear/default.nix
@@ -0,0 +1,42 @@
+{ lib, stdenv, fetchurl, cmake, pkg-config, gettext
+, gtk2, libcanberra, libnotify, pcre, sqlite, xorg
+, harfbuzz
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libgaminggear";
+  version = "0.15.1";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libgaminggear/${pname}-${version}.tar.bz2";
+    sha256 = "0jf5i1iv8j842imgiixbhwcr6qcwa93m27lzr6gb01ri5v35kggz";
+  };
+
+  outputs = [ "dev" "out" "bin" ];
+
+  nativeBuildInputs = [ cmake pkg-config gettext ];
+
+  propagatedBuildInputs = [
+    gtk2 libcanberra libnotify pcre sqlite xorg.libXdmcp xorg.libpthreadstubs
+  ];
+
+  cmakeFlags = [
+    "-DINSTALL_CMAKE_MODULESDIR=lib/cmake"
+    "-DINSTALL_PKGCONFIGDIR=lib/pkgconfig"
+    "-DINSTALL_LIBDIR=lib"
+  ];
+
+  # https://sourceforge.net/p/libgaminggear/discussion/general/thread/b43a776b3a/
+  env.NIX_CFLAGS_COMPILE = toString [ "-I${harfbuzz.dev}/include/harfbuzz" ];
+
+  postFixup = ''
+    moveToOutput bin "$bin"
+  '';
+
+  meta = {
+    description = "Provides functionality for gaming input devices";
+    homepage = "https://sourceforge.net/projects/libgaminggear/";
+    platforms = lib.platforms.linux;
+    license = lib.licenses.gpl2Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgbinder/default.nix b/nixpkgs/pkgs/development/libraries/libgbinder/default.nix
new file mode 100644
index 000000000000..4a4a0ee6bf21
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgbinder/default.nix
@@ -0,0 +1,52 @@
+{ stdenv, lib, fetchFromGitHub, pkg-config, glib, libglibutil }:
+
+stdenv.mkDerivation rec {
+  pname = "libgbinder";
+  version = "1.1.36";
+
+  src = fetchFromGitHub {
+    owner = "mer-hybris";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-QTlOiZG6qpNeicMJpOTMSTk2WwKbOzkaLulgmsxYaVI=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [
+    pkg-config
+  ];
+
+  buildInputs = [
+    glib
+    libglibutil
+  ];
+
+  postPatch = ''
+    # Fix pkg-config and ranlib names for cross-compilation
+    substituteInPlace Makefile \
+      --replace "pkg-config" "$PKG_CONFIG" \
+      --replace "ranlib" "$RANLIB"
+  '';
+
+  makeFlags = [
+    "LIBDIR=$(out)/lib"
+    "INSTALL_INCLUDE_DIR=$(dev)/include/gbinder"
+    "INSTALL_PKGCONFIG_DIR=$(dev)/lib/pkgconfig"
+  ];
+
+  installTargets = [ "install" "install-dev" ];
+
+  postInstall = ''
+    sed -i -e "s@includedir=/usr@includedir=$dev@g" $dev/lib/pkgconfig/$pname.pc
+    sed -i -e "s@Cflags: @Cflags: $($PKG_CONFIG --cflags libglibutil) @g" $dev/lib/pkgconfig/$pname.pc
+  '';
+
+  meta = {
+    description = "GLib-style interface to binder";
+    homepage = "https://github.com/mer-hybris/libgbinder";
+    license = lib.licenses.bsd3;
+    platforms = lib.platforms.linux;
+    maintainers = with lib.maintainers; [ mcaju ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgcrypt/1.8.nix b/nixpkgs/pkgs/development/libraries/libgcrypt/1.8.nix
new file mode 100644
index 000000000000..2f0f3b4fd019
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgcrypt/1.8.nix
@@ -0,0 +1,75 @@
+{ lib
+, stdenv
+, fetchurl
+, libgpg-error
+, enableCapabilities ? false, libcap
+, buildPackages
+# for passthru.tests
+, gnupg
+, libotr
+, rsyslog
+}:
+
+assert enableCapabilities -> stdenv.isLinux;
+
+stdenv.mkDerivation rec {
+  pname = "libgcrypt";
+  version = "1.8.10";
+
+  src = fetchurl {
+    url = "mirror://gnupg/libgcrypt/libgcrypt-${version}.tar.bz2";
+    sha256 = "sha256-aJaRVQH5UeI9AtywRTRpwswiqk13oAH/c6JkfC0p590=";
+  };
+
+  outputs = [ "out" "dev" "info" ];
+  outputBin = "dev";
+
+  # The CPU Jitter random number generator must not be compiled with
+  # optimizations and the optimize -O0 pragma only works for gcc.
+  # The build enables -O2 by default for everything else.
+  hardeningDisable = lib.optional stdenv.cc.isClang "fortify";
+
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+
+  buildInputs = [ libgpg-error ]
+    ++ lib.optional enableCapabilities libcap;
+
+  strictDeps = true;
+
+  configureFlags = [ "--with-libgpg-error-prefix=${libgpg-error.dev}" ]
+      ++ lib.optional (stdenv.hostPlatform.isMusl || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)) "--disable-asm"; # for darwin see https://dev.gnupg.org/T5157
+
+  # Necessary to generate correct assembly when compiling for aarch32 on
+  # aarch64
+  configurePlatforms = [ "host" "build" ];
+
+  postConfigure = ''
+    sed -i configure \
+        -e 's/NOEXECSTACK_FLAGS=$/NOEXECSTACK_FLAGS="-Wa,--noexecstack"/'
+  '';
+
+  # Make sure libraries are correct for .pc and .la files
+  # Also make sure includes are fixed for callers who don't use libgpgcrypt-config
+  postFixup = ''
+    sed -i 's,#include <gpg-error.h>,#include "${libgpg-error.dev}/include/gpg-error.h",g' "$dev/include/gcrypt.h"
+  '' + lib.optionalString enableCapabilities ''
+    sed -i 's,\(-lcap\),-L${libcap.lib}/lib \1,' $out/lib/libgcrypt.la
+  '';
+
+  doCheck = true;
+
+  passthru.tests = {
+    inherit gnupg libotr rsyslog;
+  };
+
+  meta = with lib; {
+    homepage = "https://www.gnu.org/software/libgcrypt/";
+    changelog = "https://git.gnupg.org/cgi-bin/gitweb.cgi?p=${pname}.git;a=blob;f=NEWS;hb=refs/tags/${pname}-${version}";
+    description = "General-purpose cryptographic library";
+    license = licenses.lgpl2Plus;
+    platforms = platforms.all;
+    knownVulnerabilities = [
+      "CVE-2021-40528"
+    ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgcrypt/default.nix b/nixpkgs/pkgs/development/libraries/libgcrypt/default.nix
new file mode 100644
index 000000000000..3605d48a2fd1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgcrypt/default.nix
@@ -0,0 +1,85 @@
+{ lib
+, stdenv
+, fetchurl
+, gettext
+, libgpg-error
+, enableCapabilities ? false, libcap
+, buildPackages
+# for passthru.tests
+, gnupg
+, libotr
+, rsyslog
+}:
+
+assert enableCapabilities -> stdenv.isLinux;
+
+stdenv.mkDerivation rec {
+  pname = "libgcrypt";
+  version = "1.10.3";
+
+  src = fetchurl {
+    url = "mirror://gnupg/libgcrypt/${pname}-${version}.tar.bz2";
+    hash = "sha256-iwhwiXrFrGfe1Wjc+t9Flpz6imvrD9YK8qnq3Coycqo=";
+  };
+
+  outputs = [ "out" "dev" "info" ];
+  outputBin = "dev";
+
+  # The CPU Jitter random number generator must not be compiled with
+  # optimizations and the optimize -O0 pragma only works for gcc.
+  # The build enables -O2 by default for everything else.
+  hardeningDisable = lib.optional stdenv.cc.isClang "fortify";
+
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+
+  buildInputs = [ libgpg-error ]
+    ++ lib.optional stdenv.isDarwin gettext
+    ++ lib.optional enableCapabilities libcap;
+
+  strictDeps = true;
+
+  configureFlags = [ "--with-libgpg-error-prefix=${libgpg-error.dev}" ]
+      ++ lib.optional (stdenv.hostPlatform.isMusl || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)) "--disable-asm"; # for darwin see https://dev.gnupg.org/T5157
+
+  # Necessary to generate correct assembly when compiling for aarch32 on
+  # aarch64
+  configurePlatforms = [ "host" "build" ];
+
+  postConfigure = ''
+    sed -i configure \
+        -e 's/NOEXECSTACK_FLAGS=$/NOEXECSTACK_FLAGS="-Wa,--noexecstack"/'
+  '';
+
+  enableParallelBuilding = true;
+
+  # Make sure libraries are correct for .pc and .la files
+  # Also make sure includes are fixed for callers who don't use libgpgcrypt-config
+  postFixup = ''
+    sed -i 's,#include <gpg-error.h>,#include "${libgpg-error.dev}/include/gpg-error.h",g' "$dev/include/gcrypt.h"
+  '' + lib.optionalString enableCapabilities ''
+    sed -i 's,\(-lcap\),-L${libcap.lib}/lib \1,' $out/lib/libgcrypt.la
+  '';
+
+  # TODO: figure out why this is even necessary and why the missing dylib only crashes
+  # random instead of every test
+  preCheck = lib.optionalString stdenv.isDarwin ''
+    mkdir -p $out/lib
+    cp src/.libs/libgcrypt.20.dylib $out/lib
+  '';
+
+  doCheck = true;
+  enableParallelChecking = true;
+
+  passthru.tests = {
+    inherit gnupg libotr rsyslog;
+  };
+
+  meta = with lib; {
+    homepage = "https://www.gnu.org/software/libgcrypt/";
+    changelog = "https://git.gnupg.org/cgi-bin/gitweb.cgi?p=${pname}.git;a=blob;f=NEWS;hb=refs/tags/${pname}-${version}";
+    description = "General-purpose cryptographic library";
+    license = licenses.lgpl2Plus;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ vrthra ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgda/6.x.nix b/nixpkgs/pkgs/development/libraries/libgda/6.x.nix
new file mode 100644
index 000000000000..1f551ec9b4b1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgda/6.x.nix
@@ -0,0 +1,114 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, pkg-config
+, intltool
+, meson
+, ninja
+, itstool
+, libxml2
+, python3
+, gtk3
+, json-glib
+, isocodes
+, openssl
+, gnome
+, gobject-introspection
+, vala
+, libgee
+, sqlite
+, gtk-doc
+, yelp-tools
+, mysqlSupport ? false
+, libmysqlclient ? null
+, postgresSupport ? false
+, postgresql ? null
+}:
+
+assert mysqlSupport -> libmysqlclient != null;
+assert postgresSupport -> postgresql != null;
+
+stdenv.mkDerivation rec {
+  pname = "libgda";
+  version = "6.0.0";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "0w564z7krgjk19r39mi5qn4kggpdg9ggbyn9pb4aavb61r14npwr";
+  };
+
+  patches = [
+    # Fix undefined behavior
+    (fetchpatch {
+      url = "https://gitlab.gnome.org/GNOME/libgda/-/commit/657b2f8497da907559a6769c5b1d2d7b5bd40688.patch";
+      sha256 = "Qx4S9KQsTAr4M0QJi0Xr5kKuHSp4NwZJHoRPYyxIyTk=";
+    })
+
+    # Fix building vapi
+    (fetchpatch {
+      url = "https://gitlab.gnome.org/GNOME/libgda/-/commit/57f618a3b2a3758ee3dcbf9bbdc566122dd8566d.patch";
+      sha256 = "pyfymUd61m1kHaGyMbUQMma+szB8mlqGWwcFBBQawf8=";
+    })
+
+    (fetchpatch {
+      name = "CVE-2021-39359.patch";
+      url = "https://gitlab.gnome.org/GNOME/libgda/-/commit/bebdffb4de586fb43fd07ac549121f4b22f6812d.patch";
+      sha256 = "sha256-UjHP1nhb5n6TOdaMdQeE2s828T4wv/0ycG3FAk+I1QA=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+    intltool
+    meson
+    ninja
+    itstool
+    libxml2
+    python3
+    gobject-introspection
+    vala
+    gtk-doc
+    yelp-tools
+  ];
+
+  buildInputs = [
+    gtk3
+    json-glib
+    isocodes
+    openssl
+    libgee
+    sqlite
+  ] ++ lib.optionals mysqlSupport [
+    libmysqlclient
+  ] ++ lib.optionals postgresSupport [
+    postgresql
+  ];
+
+  postPatch = ''
+    patchShebangs \
+      providers/raw_spec.py \
+      providers/mysql/gen_bin.py
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      attrPath = "libgda6";
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    description = "Database access library";
+    homepage = "https://www.gnome-db.org/";
+    license = with licenses; [
+      # library
+      lgpl2Plus
+      # CLI tools
+      gpl2Plus
+    ];
+    maintainers = teams.gnome.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgda/default.nix b/nixpkgs/pkgs/development/libraries/libgda/default.nix
new file mode 100644
index 000000000000..1ef0a397c8e7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgda/default.nix
@@ -0,0 +1,109 @@
+{ lib
+, stdenv
+, fetchurl
+, pkg-config
+, intltool
+, itstool
+, libxml2
+, gtk3
+, openssl
+, gnome
+, gobject-introspection
+, vala
+, libgee
+, fetchpatch
+, autoreconfHook
+, gtk-doc
+, autoconf-archive
+, yelp-tools
+, mysqlSupport ? false
+, libmysqlclient
+, postgresSupport ? false
+, postgresql
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libgda";
+  version = "5.2.10";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "1j1l4dwjgw6w4d1v4bl5a4kwyj7bcih8mj700ywm7xakh1xxyv3g";
+  };
+
+  patches = [
+    # fix compile error with mysql
+    (fetchpatch {
+      url = "https://gitlab.gnome.org/GNOME/libgda/-/commit/9859479884fad5f39e6c37e8995e57c28b11b1b9.diff";
+      sha256 = "158sncc5bg9lkri1wb0i1ri1nhx4c34rzi47gbfkwphlp7qd4qqv";
+    })
+    (fetchpatch {
+      name = "CVE-2021-39359.patch";
+      url = "https://src.fedoraproject.org/rpms/libgda5/raw/72bb769f12e861e27e883dac5fab34f1ba4bd97e/f/bebdffb4de586fb43fd07ac549121f4b22f6812d.patch";
+      sha256 = "sha256-hIKuY5NEqOzntdlLb541bA4xZU5ypTRmV1u765K6KbM=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+    intltool
+    itstool
+    gobject-introspection
+    vala
+    autoreconfHook
+    gtk-doc
+    autoconf-archive
+    yelp-tools
+  ];
+
+  buildInputs = [
+    gtk3
+    openssl
+    libgee
+  ] ++ lib.optionals mysqlSupport [
+    libmysqlclient
+  ] ++ lib.optionals postgresSupport [
+    postgresql
+  ];
+
+  propagatedBuildInputs = [
+    libxml2
+  ];
+
+  configureFlags = [
+    "--with-mysql=${if mysqlSupport then "yes" else "no"}"
+    "--with-postgres=${if postgresSupport then "yes" else "no"}"
+
+    # macOS builds use the sqlite source code that comes with libgda,
+    # as opposed to using the system or brewed sqlite3, which is not supported on macOS,
+    # as mentioned in https://github.com/GNOME/libgda/blob/95eeca4b0470f347c645a27f714c62aa6e59f820/libgda/sqlite/README#L31,
+    # which references the paper https://web.archive.org/web/20100610151539/http://lattice.umiacs.umd.edu/files/functions_tr.pdf
+    # See also https://github.com/Homebrew/homebrew-core/blob/104f9ecd02854a82372b64d63d41356555378a52/Formula/libgda.rb
+    "--enable-system-sqlite=${if stdenv.isDarwin then "no" else "yes"}"
+  ];
+
+  enableParallelBuilding = true;
+
+  hardeningDisable = [ "format" ];
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+      freeze = true;
+    };
+  };
+
+  meta = with lib; {
+    description = "Database access library";
+    homepage = "https://www.gnome-db.org/";
+    license = with licenses; [
+      # library
+      lgpl2Plus
+      # CLI tools
+      gpl2Plus
+    ];
+    maintainers = teams.gnome.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgdamm/default.nix b/nixpkgs/pkgs/development/libraries/libgdamm/default.nix
new file mode 100644
index 000000000000..34735e644e43
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgdamm/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchurl, pkg-config, glibmm, libgda, libxml2, gnome
+, mysqlSupport ? false
+, postgresSupport ? false }:
+
+let
+  gda = libgda.override {
+    inherit mysqlSupport postgresSupport;
+  };
+in stdenv.mkDerivation rec {
+  pname = "libgdamm";
+  version = "4.99.11";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "1fyh15b3f8hmwbswalxk1g4l04yvvybksn5nm7gznn5jl5q010p9";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ glibmm libxml2 ];
+  propagatedBuildInputs = [ gda ];
+
+  enableParallelBuilding = true;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "none"; # Should be odd-unstable but stable version has not been released yet.
+    };
+  };
+
+  meta = with lib; {
+    description = "C++ bindings for libgda";
+    homepage = "https://www.gnome-db.org/";
+    license = licenses.lgpl21Plus;
+    maintainers = teams.gnome.members;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgdata/default.nix b/nixpkgs/pkgs/development/libraries/libgdata/default.nix
new file mode 100644
index 000000000000..e0d3a7318a85
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgdata/default.nix
@@ -0,0 +1,86 @@
+{ lib, stdenv
+, fetchurl
+, pkg-config
+, meson
+, ninja
+, nixosTests
+, vala
+, gettext
+, libxml2
+, glib
+, json-glib
+, gcr
+, gnome-online-accounts
+, gobject-introspection
+, gnome
+, p11-kit
+, openssl
+, uhttpmock
+, libsoup
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libgdata";
+  version = "0.18.1";
+
+  outputs = [ "out" "dev" "installedTests" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "3YWS7rZRKtCoz1yL6McudvdL/msj5N2T8HVu4HFoBMc=";
+  };
+
+  patches = [
+    ./installed-tests-path.patch
+  ];
+
+  nativeBuildInputs = [
+    gettext
+    gobject-introspection
+    meson
+    ninja
+    pkg-config
+    vala
+  ];
+
+  buildInputs = [
+    gcr
+    openssl
+    p11-kit
+    uhttpmock
+  ];
+
+  propagatedBuildInputs = [
+    glib
+    libsoup
+    libxml2
+    gnome-online-accounts
+    json-glib
+  ];
+
+  mesonFlags = [
+    "-Dgtk_doc=false"
+    "-Dinstalled_test_bindir=${placeholder "installedTests"}/libexec"
+    "-Dinstalled_test_datadir=${placeholder "installedTests"}/share"
+    "-Dinstalled_tests=true"
+  ];
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "none"; # Stable version has not been updated for a long time.
+    };
+
+    tests = {
+      installedTests = nixosTests.installed-tests.libgdata;
+    };
+  };
+
+  meta = with lib; {
+    description = "GData API library";
+    homepage = "https://wiki.gnome.org/Projects/libgdata";
+    maintainers = with maintainers; [ raskin ] ++ teams.gnome.members;
+    platforms = platforms.linux;
+    license = licenses.lgpl21Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgdata/installed-tests-path.patch b/nixpkgs/pkgs/development/libraries/libgdata/installed-tests-path.patch
new file mode 100644
index 000000000000..f8c0a1293a1f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgdata/installed-tests-path.patch
@@ -0,0 +1,94 @@
+diff --git a/gdata/tests/meson.build b/gdata/tests/meson.build
+index 05184deb..3a9392d4 100644
+--- a/gdata/tests/meson.build
++++ b/gdata/tests/meson.build
+@@ -1,5 +1,12 @@
+-tests_execdir = gdata_libexecdir / 'installed-tests' / gdata_name
+-tests_metadir = gdata_datadir / 'installed-tests' / gdata_name
++tests_bindir = get_option('installed_test_bindir') / 'installed-tests' / gdata_name
++if tests_bindir == ''
++    test_bindir = gdata_libexecdir / 'installed-tests' / gdata_name
++endif
++
++tests_datadir = get_option('installed_test_datadir') / 'installed-tests' / gdata_name
++if tests_datadir == ''
++    tests_datadir = gdata_datadir / 'installed-tests' / gdata_name
++endif
+ 
+ tests_sources = files(
+   'common.c',
+@@ -49,7 +56,7 @@ foreach test_name, extra_args: tests
+     dependencies: common_deps + extra_args.get('dependencies', []),
+     sources: tests_sources,
+     install: install_tests and not should_fail,
+-    install_dir: tests_execdir,
++    install_dir: tests_bindir,
+   )
+ 
+   test(
+@@ -65,7 +72,7 @@ if install_tests
+     should_fail = extra_args.get('should_fail', false)
+     tests_conf = {
+       'TEST_TYPE': 'session',
+-      'TEST_ABS_PATH': gdata_prefix / tests_execdir / test_name,
++      'TEST_ABS_PATH': tests_bindir / test_name,
+     }
+ 
+     configure_file (
+@@ -73,13 +80,13 @@ if install_tests
+       output: test_name + '.test',
+       configuration: tests_conf,
+       install: not should_fail,
+-      install_dir: tests_metadir,
++      install_dir: tests_datadir,
+     )
+   endforeach
+ 
+   install_subdir(
+     'traces',
+-    install_dir: tests_execdir,
++    install_dir: tests_bindir,
+   )
+ 
+   test_data = [
+@@ -98,6 +105,6 @@ if install_tests
+ 
+   install_data(
+     test_data,
+-    install_dir: tests_execdir,
++    install_dir: tests_bindir,
+   )
+ endif
+diff --git a/meson.build b/meson.build
+index 50441abb..5fc773b1 100644
+--- a/meson.build
++++ b/meson.build
+@@ -20,9 +20,9 @@ gdata_api_version_minor = 0
+ 
+ # Define the install directories
+ gdata_prefix = get_option('prefix')
+-gdata_datadir = get_option('datadir')
+-gdata_libexecdir = get_option('libexecdir')
+-gdata_includedir = get_option('includedir')
++gdata_datadir = gdata_prefix / get_option('datadir')
++gdata_libexecdir = gdata_prefix / get_option('libexecdir')
++gdata_includedir = gdata_prefix / get_option('includedir')
+ 
+ gdata_include_subdir = gdata_name / 'gdata'
+ 
+diff --git a/meson_options.txt b/meson_options.txt
+index 25cc6b55..6fc2cfa3 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -43,3 +43,11 @@ option('vapi',
+   type: 'boolean',
+   value: true,
+   description: 'Enable creation of vapi files')
++
++option('installed_test_datadir', type: 'string',
++  value: '',
++  description: 'Installation directory for data files in tests')
++
++option('installed_test_bindir', type: 'string',
++  value: '',
++  description: 'Installation directory for binary files in tests')
diff --git a/nixpkgs/pkgs/development/libraries/libgdiplus/configure-pkg-config.patch b/nixpkgs/pkgs/development/libraries/libgdiplus/configure-pkg-config.patch
new file mode 100644
index 000000000000..b636f07e2bd6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgdiplus/configure-pkg-config.patch
@@ -0,0 +1,17 @@
+diff --git a/configure.ac b/configure.ac
+index e47a3f1..f529e69 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -16,10 +16,8 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+ 
+ AC_C_BIGENDIAN
+ 
+-AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+-if test "x$PKG_CONFIG" = "xno"; then
+-	AC_MSG_ERROR([You need to install pkg-config])
+-fi
++PKG_PROG_PKG_CONFIG
++
+ GLIB_REQUIRED_VERSION="2.2.3"
+ PKG_CHECK_MODULES(BASE_DEPENDENCIES, glib-2.0 >= $GLIB_REQUIRED_VERSION)
+ 
diff --git a/nixpkgs/pkgs/development/libraries/libgdiplus/default.nix b/nixpkgs/pkgs/development/libraries/libgdiplus/default.nix
new file mode 100644
index 000000000000..e71aedd2cbcf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgdiplus/default.nix
@@ -0,0 +1,53 @@
+{ lib, stdenv, fetchzip, pkg-config, glib, cairo, Carbon, fontconfig
+, libtiff, giflib, libjpeg, libpng
+, libXrender, libexif, autoreconfHook, fetchpatch }:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libgdiplus";
+  version = "6.1";
+
+  # Using source archive to avoid fetching Git submodules.
+  # Git repo: https://github.com/mono/libgdiplus
+  src = fetchzip {
+    url = "https://download.mono-project.com/sources/libgdiplus/libgdiplus-${finalAttrs.version}.tar.gz";
+    hash = "sha256-+lP9ETlw3s0RUliQT1uBWZ2j6o3V9EECBQSppOYFq4Q=";
+  };
+
+  patches = [
+    # Fix pkg-config lookup when cross-compiling.
+    ./configure-pkg-config.patch
+  ];
+
+  NIX_LDFLAGS = "-lgif";
+
+  outputs = [ "out" "dev" ];
+
+  hardeningDisable = [ "format" ];
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  configureFlags = lib.optional stdenv.cc.isClang "--host=${stdenv.hostPlatform.system}";
+
+  enableParallelBuilding = true;
+
+  buildInputs =
+    [ glib cairo fontconfig libtiff giflib
+      libjpeg libpng libXrender libexif
+    ]
+    ++ lib.optional stdenv.isDarwin Carbon;
+
+  postInstall = lib.optionalString stdenv.isDarwin ''
+    ln -s $out/lib/libgdiplus.0.dylib $out/lib/libgdiplus.so
+  '';
+
+  checkPhase = ''
+    make check -w
+  '';
+
+  meta = with lib; {
+    description = "Mono library that provides a GDI+-compatible API on non-Windows operating systems";
+    homepage = "https://www.mono-project.com/docs/gui/libgdiplus/";
+    platforms = platforms.unix;
+    license = licenses.mit;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libgee/default.nix b/nixpkgs/pkgs/development/libraries/libgee/default.nix
new file mode 100644
index 000000000000..7863235e0211
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgee/default.nix
@@ -0,0 +1,55 @@
+{ stdenv
+, lib
+, fetchurl
+, autoconf
+, vala
+, pkg-config
+, glib
+, gobject-introspection
+, gnome
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libgee";
+  version = "0.20.6";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/libgee/${lib.versions.majorMinor finalAttrs.version}/libgee-${finalAttrs.version}.tar.xz";
+    sha256 = "G/g09eENYMxhJNdO08HdONpkZ4f794ciILi0Bo5HbU0=";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+    autoconf
+    vala
+    gobject-introspection
+  ];
+
+  buildInputs = [
+    glib
+  ];
+
+  doCheck = true;
+
+  env = {
+    PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_GIRDIR = "${placeholder "dev"}/share/gir-1.0";
+    PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_TYPELIBDIR = "${placeholder "out"}/lib/girepository-1.0";
+  };
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = "libgee";
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    description = "Utility library providing GObject-based interfaces and classes for commonly used data structures";
+    homepage = "https://wiki.gnome.org/Projects/Libgee";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.unix;
+    maintainers = teams.gnome.members;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libgeotiff/default.nix b/nixpkgs/pkgs/development/libraries/libgeotiff/default.nix
new file mode 100644
index 000000000000..9b160e6b29e8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgeotiff/default.nix
@@ -0,0 +1,49 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+, libjpeg
+, libtiff
+, proj
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  version = "1.7.1";
+  pname = "libgeotiff";
+
+  src = fetchFromGitHub {
+    owner = "OSGeo";
+    repo = "libgeotiff";
+    rev = version;
+    hash = "sha256-bE6UAUKiorriTgYrqhxbMAN2NEtmV/8IIfF02RUghSI=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  sourceRoot = "${src.name}/libgeotiff";
+
+  configureFlags = [
+    "--with-jpeg=${libjpeg.dev}"
+    "--with-zlib=${zlib.dev}"
+  ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ];
+
+  buildInputs = [ libtiff proj ];
+
+  #hardeningDisable = [ "format" ];
+
+  meta = with lib; {
+    description = "Library implementing attempt to create a tiff based interchange format for georeferenced raster imagery";
+    homepage = "https://github.com/OSGeo/libgeotiff";
+    changelog = "https://github.com/OSGeo/libgeotiff/blob/${src.rev}/libgeotiff/NEWS";
+    license = licenses.mit;
+    maintainers = with maintainers; teams.geospatial.members ++ [ marcweber ];
+    platforms = with platforms; linux ++ darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgepub/default.nix b/nixpkgs/pkgs/development/libraries/libgepub/default.nix
new file mode 100644
index 000000000000..fbf9d28ce93e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgepub/default.nix
@@ -0,0 +1,55 @@
+{ lib
+, stdenv
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, glib
+, gobject-introspection
+, gnome
+, webkitgtk_4_1
+, libsoup_3
+, libxml2
+, libarchive
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libgepub";
+  version = "0.7.1";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "o+SzGiMmWdJqVLkSGziCw9c5fDz0SuXGS4ZwCYC8f2A=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gobject-introspection
+  ];
+
+  buildInputs = [
+    glib
+    webkitgtk_4_1
+    libsoup_3
+    libxml2
+    libarchive
+  ];
+
+  doCheck = true;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "none";
+    };
+  };
+
+  meta = with lib; {
+    description = "GObject based library for handling and rendering epub documents";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.linux;
+    maintainers = teams.gnome.members;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgflow/default.nix b/nixpkgs/pkgs/development/libraries/libgflow/default.nix
new file mode 100644
index 000000000000..007afa6ef5bf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgflow/default.nix
@@ -0,0 +1,49 @@
+{stdenv, lib, vala, meson, ninja, pkg-config, fetchFromGitea, gobject-introspection, glib, gtk3}:
+
+stdenv.mkDerivation rec {
+  pname = "libgflow";
+  version = "1.0.4";
+
+  outputs = [ "out" "dev" "devdoc" ];
+  outputBin = "devdoc"; # demo app
+
+  src = fetchFromGitea {
+    domain = "notabug.org";
+    owner = "grindhold";
+    repo = "libgtkflow";
+    rev = "gflow_${version}";
+    hash = "sha256-JoVq7U5JQ3pRxptR7igWFw7lcBTsgr3aVXxayLqhyFo=";
+  };
+
+  nativeBuildInputs = [
+    vala
+    meson
+    ninja
+    pkg-config
+    gobject-introspection
+  ];
+
+  buildInputs = [
+    gtk3
+    glib
+  ];
+
+  postFixup = ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  mesonFlags = [
+    "-Denable_valadoc=true"
+    "-Denable_gtk3=false"
+    "-Denable_gtk4=false"
+  ];
+
+  meta = with lib; {
+    description = "Flow graph widget for GTK 3";
+    homepage = "https://notabug.org/grindhold/libgtkflow";
+    maintainers = with maintainers; [ grindhold ];
+    license = licenses.lgpl3Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgig/default.nix b/nixpkgs/pkgs/development/libraries/libgig/default.nix
new file mode 100644
index 000000000000..48d45797096b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgig/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchurl, autoconf, automake, libsndfile, libtool, pkg-config, libuuid }:
+
+stdenv.mkDerivation rec {
+  pname = "libgig";
+  version = "4.4.0";
+
+  src = fetchurl {
+    url = "https://download.linuxsampler.org/packages/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-ZwQMrK8da12lFz7UAY2i+eW3rzPFhngdUfeV3hW65iI=";
+  };
+
+  nativeBuildInputs = [ autoconf automake libtool pkg-config ];
+
+  buildInputs = [ libsndfile libuuid ];
+
+  preConfigure = "make -f Makefile.svn";
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "http://www.linuxsampler.org";
+    description = "Gigasampler file access library";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgit2-glib/default.nix b/nixpkgs/pkgs/development/libraries/libgit2-glib/default.nix
new file mode 100644
index 000000000000..9d16775f626b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgit2-glib/default.nix
@@ -0,0 +1,73 @@
+{ stdenv
+, lib
+, fetchurl
+, gnome
+, meson
+, ninja
+, pkg-config
+, vala
+, libssh2
+, gtk-doc
+, gobject-introspection
+, gi-docgen
+, libgit2
+, glib
+, python3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libgit2-glib";
+  version = "1.2.0";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "EzHa2oOPTh9ZGyZFnUQSajJd52LcPNJhU6Ma+9/hgZA=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    vala
+    gtk-doc
+    gobject-introspection
+    gi-docgen
+  ];
+
+  propagatedBuildInputs = [
+    # Required by libgit2-glib-1.0.pc
+    libgit2
+    glib
+  ];
+
+  buildInputs = [
+    libssh2
+    python3.pkgs.pygobject3 # this should really be a propagated input of python output
+  ];
+
+  mesonFlags = [
+    "-Dgtk_doc=true"
+  ];
+
+  postPatch = ''
+    chmod +x meson_python_compile.py
+    patchShebangs meson_python_compile.py
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "none";
+    };
+  };
+
+  meta = with lib; {
+    description = "A glib wrapper library around the libgit2 git access library";
+    homepage = "https://wiki.gnome.org/Projects/Libgit2-glib";
+    license = licenses.lgpl21Plus;
+    maintainers = teams.gnome.members;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgit2/default.nix b/nixpkgs/pkgs/development/libraries/libgit2/default.nix
new file mode 100644
index 000000000000..957a146ce2a0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgit2/default.nix
@@ -0,0 +1,82 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, python3
+, zlib
+, libssh2
+, openssl
+, pcre
+, http-parser
+, libiconv
+, Security
+, staticBuild ? stdenv.hostPlatform.isStatic
+# for passthru.tests
+, libgit2-glib
+, python3Packages
+, gitstatus
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libgit2";
+  version = "1.7.1";
+  # also check the following packages for updates: python3Packages.pygit2 and libgit2-glib
+
+  outputs = ["lib" "dev" "out"];
+
+  src = fetchFromGitHub {
+    owner = "libgit2";
+    repo = "libgit2";
+    rev = "v${version}";
+    hash = "sha256-3W0/i6Pu7I7D1zMQhmEqJVsa7PZpKOqU1+udNENSBvM=";
+  };
+
+  cmakeFlags = [
+    "-DUSE_HTTP_PARSER=system"
+    "-DUSE_SSH=ON"
+    "-DBUILD_SHARED_LIBS=${if staticBuild then "OFF" else "ON"}"
+  ] ++ lib.optionals stdenv.hostPlatform.isWindows [
+    "-DDLLTOOL=${stdenv.cc.bintools.targetPrefix}dlltool"
+    # For ws2_32, refered to by a `*.pc` file
+    "-DCMAKE_LIBRARY_PATH=${stdenv.cc.libc}/lib"
+  ];
+
+  nativeBuildInputs = [ cmake python3 pkg-config ];
+
+  buildInputs = [ zlib libssh2 openssl pcre http-parser ]
+    ++ lib.optional stdenv.isDarwin Security;
+
+  propagatedBuildInputs = lib.optional (!stdenv.isLinux) libiconv;
+
+  doCheck = true;
+  checkPhase = ''
+    testArgs=(-v -xonline)
+
+    # slow
+    testArgs+=(-xclone::nonetwork::bad_urls)
+
+    # failed to set permissions on ...: Operation not permitted
+    testArgs+=(-xrepo::init::extended_1)
+    testArgs+=(-xrepo::template::extended_with_template_and_shared_mode)
+
+    (
+      set -x
+      ./libgit2_tests ''${testArgs[@]}
+    )
+  '';
+
+  passthru.tests = {
+    inherit libgit2-glib;
+    inherit (python3Packages) pygit2;
+    inherit gitstatus;
+  };
+
+  meta = with lib; {
+    description = "Linkable library implementation of Git that you can use in your application";
+    homepage = "https://libgit2.org/";
+    license = licenses.gpl2Plus;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ SuperSandro2000 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libglibutil/default.nix b/nixpkgs/pkgs/development/libraries/libglibutil/default.nix
new file mode 100644
index 000000000000..acd8b374b58b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libglibutil/default.nix
@@ -0,0 +1,49 @@
+{ stdenv, lib, fetchFromGitHub, pkg-config, glib }:
+
+stdenv.mkDerivation rec {
+  pname = "libglibutil";
+  version = "1.0.76";
+
+  src = fetchFromGitHub {
+    owner = "sailfishos";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-qp3zcaoLM6G3DZgb2Jic1OhHetraEmYRiGkbQlSBnjs=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [
+    pkg-config
+  ];
+
+  buildInputs = [
+    glib
+  ];
+
+  postPatch = ''
+    # Fix pkg-config name for cross-compilation
+    substituteInPlace Makefile --replace "pkg-config" "$PKG_CONFIG"
+  '';
+
+  makeFlags = [
+    "LIBDIR=$(out)/lib"
+    "INSTALL_INCLUDE_DIR=$(dev)/include/gutil"
+    "INSTALL_PKGCONFIG_DIR=$(dev)/lib/pkgconfig"
+  ];
+
+  installTargets = [ "install" "install-dev" ];
+
+  postInstall = ''
+    sed -i -e "s@includedir=/usr@includedir=$dev@g" $dev/lib/pkgconfig/$pname.pc
+    sed -i -e "s@Cflags: @Cflags: $($PKG_CONFIG --cflags glib-2.0) @g" $dev/lib/pkgconfig/$pname.pc
+  '';
+
+  meta = {
+    description = "Library of glib utilities.";
+    homepage = "https://git.sailfishos.org/mer-core/libglibutil";
+    license = lib.licenses.bsd3;
+    platforms = lib.platforms.linux;
+    maintainers = with lib.maintainers; [ mcaju ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libglvnd/default.nix b/nixpkgs/pkgs/development/libraries/libglvnd/default.nix
new file mode 100644
index 000000000000..a7480d6ffb95
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libglvnd/default.nix
@@ -0,0 +1,87 @@
+{ stdenv, lib, fetchFromGitLab
+, fetchpatch
+, autoreconfHook, pkg-config, python3, addOpenGLRunpath
+, libX11, libXext, xorgproto
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libglvnd";
+  version = "1.7.0";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "glvnd";
+    repo = "libglvnd";
+    rev = "v${version}";
+    sha256 = "sha256-2U9JtpGyP4lbxtVJeP5GUgh5XthloPvFIw28+nldYx8=";
+  };
+
+  patches = [
+    # Enable 64-bit file APIs on 32-bit systems:
+    #   https://gitlab.freedesktop.org/glvnd/libglvnd/-/merge_requests/288
+    (fetchpatch {
+      name = "large-file.patch";
+      url = "https://gitlab.freedesktop.org/glvnd/libglvnd/-/commit/956d2d3f531841cabfeddd940be4c48b00c226b4.patch";
+      hash = "sha256-Y6YCzd/jZ1VZP9bFlHkHjzSwShXeA7iJWdyfxpgT2l0=";
+    })
+  ];
+
+  nativeBuildInputs = [ autoreconfHook pkg-config python3 addOpenGLRunpath ];
+  buildInputs = [ libX11 libXext xorgproto ];
+
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace src/GLX/Makefile.am \
+      --replace "-Wl,-Bsymbolic " ""
+    substituteInPlace src/EGL/Makefile.am \
+      --replace "-Wl,-Bsymbolic " ""
+    substituteInPlace src/GLdispatch/Makefile.am \
+      --replace "-Xlinker --version-script=$(VERSION_SCRIPT)" "-Xlinker"
+  '';
+
+  env.NIX_CFLAGS_COMPILE = toString ([
+    "-UDEFAULT_EGL_VENDOR_CONFIG_DIRS"
+    # FHS paths are added so that non-NixOS applications can find vendor files.
+    "-DDEFAULT_EGL_VENDOR_CONFIG_DIRS=\"${addOpenGLRunpath.driverLink}/share/glvnd/egl_vendor.d:/etc/glvnd/egl_vendor.d:/usr/share/glvnd/egl_vendor.d\""
+
+    "-Wno-error=array-bounds"
+  ] ++ lib.optionals stdenv.cc.isClang [
+    "-Wno-error"
+    "-Wno-int-conversion"
+  ]);
+
+  configureFlags  = []
+    # Indirectly: https://bugs.freedesktop.org/show_bug.cgi?id=35268
+    ++ lib.optional stdenv.hostPlatform.isMusl "--disable-tls"
+    # Remove when aarch64-darwin asm support is upstream: https://gitlab.freedesktop.org/glvnd/libglvnd/-/issues/216
+    ++ lib.optional (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) "--disable-asm";
+
+  outputs = [ "out" "dev" ];
+
+  # Set RUNPATH so that libGLX can find driver libraries in /run/opengl-driver(-32)/lib.
+  # Note that libEGL does not need it because it uses driver config files which should
+  # contain absolute paths to libraries.
+  postFixup = ''
+    addOpenGLRunpath $out/lib/libGLX.so
+  '';
+
+  passthru = { inherit (addOpenGLRunpath) driverLink; };
+
+  meta = with lib; {
+    description = "The GL Vendor-Neutral Dispatch library";
+    longDescription = ''
+      libglvnd is a vendor-neutral dispatch layer for arbitrating OpenGL API
+      calls between multiple vendors. It allows multiple drivers from different
+      vendors to coexist on the same filesystem, and determines which vendor to
+      dispatch each API call to at runtime.
+      Both GLX and EGL are supported, in any combination with OpenGL and OpenGL ES.
+    '';
+    inherit (src.meta) homepage;
+    # https://gitlab.freedesktop.org/glvnd/libglvnd#libglvnd:
+    changelog = "https://gitlab.freedesktop.org/glvnd/libglvnd/-/tags/v${version}";
+    license = with licenses; [ mit bsd1 bsd3 gpl3Only asl20 ];
+    platforms = platforms.unix;
+    # https://gitlab.freedesktop.org/glvnd/libglvnd/-/issues/212
+    badPlatforms = [ lib.systems.inspect.platformPatterns.isStatic ];
+    maintainers = with maintainers; [ primeos ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgmpris/default.nix b/nixpkgs/pkgs/development/libraries/libgmpris/default.nix
new file mode 100644
index 000000000000..a7826fabd134
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgmpris/default.nix
@@ -0,0 +1,34 @@
+{ stdenv
+, lib
+, fetchurl
+, pkg-config
+, glib
+, gobject-introspection
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libgmpris";
+  version = "2.2.1-8";
+
+  src = fetchurl {
+    url = "https://www.sonarnerd.net/src/focal/src/${pname}_${version}.tar.gz";
+    sha256 = "sha256-iyKNmg6sf+mxlY/4vt5lKdrKfJzkoCYU2j1O8uwk8K4=";
+  };
+
+  nativeBuildInputs = [ pkg-config gobject-introspection ];
+
+  buildInputs = [ glib ];
+
+  postInstall = ''
+    mkdir -p $out/share/doc/${pname}
+    cp ./AUTHORS $out/share/doc/${pname}
+    cp ./README $out/share/doc/${pname}
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.sonarnerd.net/src/";
+    description = "GMPRIS GDBus bindings GDBus bindings generated from the GMPRIS XML spec files";
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ lovesegfault ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgnome-games-support/2.0.nix b/nixpkgs/pkgs/development/libraries/libgnome-games-support/2.0.nix
new file mode 100644
index 000000000000..03166a423c3a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgnome-games-support/2.0.nix
@@ -0,0 +1,61 @@
+{ stdenv
+, lib
+, fetchurl
+, pkg-config
+, glib
+, gobject-introspection
+, gtk4
+, libgee
+, gettext
+, vala
+, gnome
+, libintl
+, meson
+, ninja
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libgnome-games-support";
+  version = "2.0.0";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "U4Ifb+Mu3cue7zMk9kaqrIPMbT3gk339XyZkcNRT0qQ=";
+  };
+
+  nativeBuildInputs = [
+    gettext
+    gobject-introspection
+    meson
+    ninja
+    pkg-config
+    vala
+  ];
+
+  buildInputs = [
+    libintl
+  ];
+
+  propagatedBuildInputs = [
+    # Required by libgnome-games-support-2.pc
+    glib
+    gtk4
+    libgee
+  ];
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      attrPath = "${pname}_2_0";
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    description = "Small library intended for internal use by GNOME Games, but it may be used by others";
+    homepage = "https://wiki.gnome.org/Apps/Games";
+    license = licenses.lgpl3Plus;
+    maintainers = teams.gnome.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgnome-games-support/default.nix b/nixpkgs/pkgs/development/libraries/libgnome-games-support/default.nix
new file mode 100644
index 000000000000..e63d7f8fe656
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgnome-games-support/default.nix
@@ -0,0 +1,58 @@
+{ lib, stdenv
+, fetchurl
+, pkg-config
+, glib
+, gtk3
+, libgee
+, gettext
+, vala
+, gnome
+, libintl
+, meson
+, ninja
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libgnome-games-support";
+  version = "1.8.2";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "KENGBKewOHMawCMXMTiP8QT1ZbsjMMwk54zaBM/T730=";
+  };
+
+  nativeBuildInputs = [
+    gettext
+    meson
+    ninja
+    pkg-config
+    vala
+  ];
+
+  buildInputs = [
+    libintl
+  ];
+
+  propagatedBuildInputs = [
+    # Required by libgnome-games-support-1.pc
+    glib
+    gtk3
+    libgee
+  ];
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+      freeze = true;
+    };
+  };
+
+  meta = with lib; {
+    description = "Small library intended for internal use by GNOME Games, but it may be used by others";
+    homepage = "https://wiki.gnome.org/Apps/Games";
+    license = licenses.lgpl3;
+    maintainers = teams.gnome.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgnome-keyring/default.nix b/nixpkgs/pkgs/development/libraries/libgnome-keyring/default.nix
new file mode 100644
index 000000000000..f360e29ec2f2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgnome-keyring/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchurl, glib, dbus, libgcrypt, pkg-config, intltool
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libgnome-keyring";
+  version = "2.32.0";
+
+  src = let
+    inherit (finalAttrs) pname version;
+  in fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.bz2";
+    sha256 = "030gka96kzqg1r19b4xrmac89hf1xj1kr5p461yvbzfxh46qqf2n";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  strictDeps = true;
+  propagatedBuildInputs = [ glib dbus libgcrypt ];
+  nativeBuildInputs = [ pkg-config intltool ];
+
+  configureFlags = [
+    # not ideal to use -config scripts but it's not possible switch it to pkg-config
+    # binaries in dev have a for build shebang
+    "LIBGCRYPT_CONFIG=${lib.getExe' (lib.getDev libgcrypt) "libgcrypt-config"}"
+  ];
+
+  postPatch = ''
+    # uses pkg-config in some places and uses the correct $PKG_CONFIG in some
+    # it's an ancient library so it has very old configure scripts and m4
+    substituteInPlace ./configure \
+      --replace "pkg-config" "$PKG_CONFIG"
+  '';
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = {
+    pkgConfigModules = [ "gnome-keyring-1" ];
+    inherit (glib.meta) platforms maintainers;
+    homepage = "https://wiki.gnome.org/Projects/GnomeKeyring";
+    license = with lib.licenses; [ gpl2 lgpl2 ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libgnomekbd/default.nix b/nixpkgs/pkgs/development/libraries/libgnomekbd/default.nix
new file mode 100644
index 000000000000..251f86b05789
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgnomekbd/default.nix
@@ -0,0 +1,60 @@
+{ lib
+, stdenv
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, gobject-introspection
+, glib
+, gtk3
+, libxklavier
+, wrapGAppsHook
+, gnome
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libgnomekbd";
+  version = "3.28.1";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "ItxZVm1zwAZTUPWpc0DmLsx7CMTfGRg4BLuL4kyP6HA=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    wrapGAppsHook
+    glib
+    gobject-introspection
+  ];
+
+  # Requires in libgnomekbd.pc
+  propagatedBuildInputs = [
+    gtk3
+    libxklavier
+    glib
+  ];
+
+  postInstall = ''
+    # Missing post-install script.
+    glib-compile-schemas "$out/share/glib-2.0/schemas"
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    description = "Keyboard management library";
+    maintainers = teams.gnome.members;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgnt/default.nix b/nixpkgs/pkgs/development/libraries/libgnt/default.nix
new file mode 100644
index 000000000000..33ce7fbaa113
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgnt/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, lib, fetchurl, meson, ninja, pkg-config
+, gtk-doc, docbook-xsl-nons
+, glib, ncurses, libxml2
+, buildDocs ? true
+}:
+stdenv.mkDerivation rec {
+  pname = "libgnt";
+  version = "2.14.1";
+
+  outputs = [ "out" "dev" ] ++ lib.optional buildDocs "devdoc";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/pidgin/${pname}-${version}.tar.xz";
+    sha256 = "1n2bxg0ignn53c08cp69pj4sdg53kwlqn23rincyjmpr327fdhsy";
+  };
+
+  nativeBuildInputs = [ meson ninja pkg-config ]
+    ++ lib.optionals buildDocs [ gtk-doc docbook-xsl-nons ];
+
+  buildInputs = [ glib ncurses libxml2 ];
+
+  postPatch = ''
+    substituteInPlace meson.build --replace \
+      "ncurses_sys_prefix = '/usr'" \
+      "ncurses_sys_prefix = '${lib.getDev ncurses}'"
+  '' + lib.optionalString (!buildDocs) ''
+    sed "/^subdir('doc')$/d" -i meson.build
+  '';
+
+  meta = with lib; {
+    description = "An ncurses toolkit for creating text-mode graphical user interfaces";
+    homepage = "https://keep.imfreedom.org/libgnt/libgnt/";
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+    maintainers = with lib.maintainers; [ ony ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgnurl/default.nix b/nixpkgs/pkgs/development/libraries/libgnurl/default.nix
new file mode 100644
index 000000000000..f2d3d15f9e80
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgnurl/default.nix
@@ -0,0 +1,46 @@
+{ lib, stdenv, fetchurl, libtool, perl, pkg-config, python3, zlib, gnutls
+, libidn2, libunistring }:
+
+stdenv.mkDerivation rec {
+  pname = "libgnurl";
+  version = "7.72.0";
+
+  src = fetchurl {
+    url = "mirror://gnu/gnunet/gnurl-${version}.tar.gz";
+    sha256 = "1y4laraq37kw8hc8jlzgcw7y37bfd0n71q0sy3d3z6yg7zh2prxi";
+  };
+
+  nativeBuildInputs = [ libtool perl pkg-config python3 ];
+
+  buildInputs = [ gnutls zlib libidn2 libunistring ];
+
+  configureFlags = [
+    "--disable-ntlm-wb"
+    "--without-ca-bundle"
+    "--with-ca-fallback"
+    # below options will cause errors if enabled
+    "--disable-ftp"
+    "--disable-tftp"
+    "--disable-file"
+    "--disable-ldap"
+    "--disable-dict"
+    "--disable-rtsp"
+    "--disable-telnet"
+    "--disable-pop3"
+    "--disable-imap"
+    "--disable-smb"
+    "--disable-smtp"
+    "--disable-gopher"
+    "--without-ssl" # disables only openssl, not ssl in general
+    "--without-libpsl"
+    "--without-librtmp"
+  ];
+
+  meta = with lib; {
+    description = "A fork of libcurl used by GNUnet";
+    homepage    = "https://gnunet.org/en/gnurl.html";
+    maintainers = with maintainers; [ vrthra ];
+    platforms = platforms.unix;
+    license = licenses.curl;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgourou/default.nix b/nixpkgs/pkgs/development/libraries/libgourou/default.nix
new file mode 100644
index 000000000000..78b5654873bd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgourou/default.nix
@@ -0,0 +1,56 @@
+{ lib
+, stdenv
+, fetchzip
+, pugixml
+, updfparser
+, curl
+, openssl
+, libzip
+, installShellFiles
+}:
+
+stdenv.mkDerivation rec {
+  name = "libgourou";
+  version = "0.8.2";
+
+  src = fetchzip {
+    url = "https://indefero.soutade.fr/p/${name}/source/download/v${version}/";
+    sha256 = "sha256-adkrvBCgN07Ir+J3JFCy+X9p9609lj1w8nElrlHXTxc";
+    extension = "zip";
+  };
+
+  postPatch = ''
+    patchShebangs scripts/setup.sh
+  '';
+
+  postConfigure = ''
+    mkdir lib
+    ln -s ${updfparser}/lib lib/updfparser
+  '';
+
+  nativeBuildInputs = [ installShellFiles ];
+  buildInputs = [ pugixml updfparser curl openssl libzip ];
+
+  makeFlags = [ "BUILD_STATIC=1" "BUILD_SHARED=1" ];
+
+  installPhase = ''
+    runHook preInstall
+    install -Dt $out/include include/libgourou*.h
+    install -Dt $out/lib libgourou.so
+    install -Dt $out/lib libgourou.so.${version}
+    install -Dt $out/lib libgourou.a
+    install -Dt $out/bin utils/acsmdownloader
+    install -Dt $out/bin utils/adept_{activate,loan_mgt,remove}
+    installManPage utils/man/*.1
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Implementation of Adobe's ADEPT protocol for ePub/PDF DRM";
+    homepage = "https://indefero.soutade.fr/p/libgourou";
+    license = licenses.lgpl3Plus;
+    maintainers = with maintainers; [ autumnal ];
+    platforms = platforms.all;
+    broken = stdenv.isDarwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgpg-error/default.nix b/nixpkgs/pkgs/development/libraries/libgpg-error/default.nix
new file mode 100644
index 000000000000..fa3dc1b95b09
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgpg-error/default.nix
@@ -0,0 +1,79 @@
+{ stdenv, lib, buildPackages, fetchurl, gettext
+, genPosixLockObjOnly ? false
+}: let
+  genPosixLockObjOnlyAttrs = lib.optionalAttrs genPosixLockObjOnly {
+    buildPhase = ''
+      cd src
+      make gen-posix-lock-obj
+    '';
+
+    installPhase = ''
+      mkdir -p $out/bin
+      install -m755 gen-posix-lock-obj $out/bin
+    '';
+
+    outputs = [ "out" ];
+    outputBin = "out";
+  };
+in stdenv.mkDerivation (rec {
+  pname = "libgpg-error";
+  version = "1.47";
+
+  src = fetchurl {
+    url = "mirror://gnupg/${pname}/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-njxnCWa5bsx0bCjCxBlUHjvLeH0ac5MPXl9eG8u7m9s=";
+  };
+
+  postPatch = ''
+    sed '/BUILD_TIMESTAMP=/s/=.*/=1970-01-01T00:01+0000/' -i ./configure
+  '';
+
+  configureFlags = [
+    # See https://dev.gnupg.org/T6257#164567
+    "--enable-install-gpg-error-config"
+  ];
+
+  outputs = [ "out" "dev" "info" ];
+  outputBin = "dev"; # deps want just the lib, most likely
+
+  # If architecture-dependent MO files aren't available, they're generated
+  # during build, so we need gettext for cross-builds.
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+  nativeBuildInputs = [ gettext ];
+
+  postConfigure =
+    # For some reason, /bin/sh on OpenIndiana leads to this at the end of the
+    # `config.status' run:
+    #   ./config.status[1401]: shift: (null): bad number
+    # (See <https://hydra.nixos.org/build/2931046/nixlog/1/raw>.)
+    # Thus, re-run it with Bash.
+    lib.optionalString stdenv.isSunOS ''
+      ${stdenv.shell} config.status
+    ''
+    # ./configure errorneous decides to use weak symbols on pkgsStatic,
+    # which, together with other defines results in locking functions in
+    # src/posix-lock.c to be no-op, causing tests/t-lock.c to fail.
+    + lib.optionalString stdenv.hostPlatform.isStatic ''
+      sed '/USE_POSIX_THREADS_WEAK/ d' config.h
+      echo '#undef USE_POSIX_THREADS_WEAK' >> config.h
+    '';
+
+  doCheck = true; # not cross
+
+  meta = with lib; {
+    homepage = "https://www.gnupg.org/software/libgpg-error/index.html";
+    changelog = "https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgpg-error.git;a=blob;f=NEWS;hb=refs/tags/libgpg-error-${version}";
+    description = "A small library that defines common error values for all GnuPG components";
+
+    longDescription = ''
+      Libgpg-error is a small library that defines common error values
+      for all GnuPG components.  Among these are GPG, GPGSM, GPGME,
+      GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SmartCard
+      Daemon and possibly more in the future.
+    '';
+
+    license = licenses.lgpl2Plus;
+    platforms = platforms.all;
+    maintainers = [ maintainers.vrthra ];
+  };
+} // genPosixLockObjOnlyAttrs)
diff --git a/nixpkgs/pkgs/development/libraries/libgphoto2/default.nix b/nixpkgs/pkgs/development/libraries/libgphoto2/default.nix
new file mode 100644
index 000000000000..4897934860b1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgphoto2/default.nix
@@ -0,0 +1,83 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, buildPackages
+, autoreconfHook
+, pkg-config
+, gettext
+, libusb1
+, libtool
+, libexif
+, libgphoto2
+, libjpeg
+, curl
+, libxml2
+, gd
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libgphoto2";
+  version = "2.5.31";
+
+  src = fetchFromGitHub {
+    owner = "gphoto";
+    repo = "libgphoto2";
+    rev = "libgphoto2-${builtins.replaceStrings [ "." ] [ "_" ] version}-release";
+    sha256 = "sha256-UmyDKEaPP9VJqi8f+y6JZcTlQomhMTN+/C//ODYx6/w=";
+  };
+
+  depsBuildBuild = [ pkg-config ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+    gettext
+    libtool
+    pkg-config
+  ];
+
+  buildInputs = [
+    libjpeg
+    libtool # for libltdl
+    libusb1
+    curl
+    libxml2
+    gd
+  ];
+
+  # These are mentioned in the Requires line of libgphoto's pkg-config file.
+  propagatedBuildInputs = [ libexif ];
+
+  hardeningDisable = [ "format" ];
+
+  postInstall =
+    let
+      executablePrefix =
+        if stdenv.buildPlatform == stdenv.hostPlatform then
+          "$out"
+        else
+          buildPackages.libgphoto2;
+    in
+    ''
+      mkdir -p $out/lib/udev/{rules.d,hwdb.d}
+      ${executablePrefix}/lib/libgphoto2/print-camera-list \
+          udev-rules version 201 group camera \
+          >$out/lib/udev/rules.d/40-libgphoto2.rules
+      ${executablePrefix}/lib/libgphoto2/print-camera-list \
+          hwdb version 201 group camera \
+          >$out/lib/udev/hwdb.d/20-gphoto.hwdb
+    '';
+
+  meta = {
+    homepage = "http://www.gphoto.org/proj/libgphoto2/";
+    description = "A library for accessing digital cameras";
+    longDescription = ''
+      This is the library backend for gphoto2. It contains the code for PTP,
+      MTP, and other vendor specific protocols for controlling and transferring data
+      from digital cameras.
+    '';
+    # XXX: the homepage claims LGPL, but several src files are lgpl21Plus
+    license = lib.licenses.lgpl21Plus;
+    platforms = with lib.platforms; unix;
+    maintainers = with lib.maintainers; [ jcumming ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgpiod/default.nix b/nixpkgs/pkgs/development/libraries/libgpiod/default.nix
new file mode 100644
index 000000000000..a5f914b39a95
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgpiod/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchurl, autoreconfHook, autoconf-archive, pkg-config
+, enable-tools ? true }:
+
+stdenv.mkDerivation rec {
+  pname = "libgpiod";
+  version = "2.1";
+
+  src = fetchurl {
+    url = "https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/snapshot/libgpiod-${version}.tar.gz";
+    hash = "sha256-/W7UssZ0/mzDtIGID2zeHup54pbpWhObhUAequpt4/w=";
+  };
+
+  nativeBuildInputs = [
+    autoconf-archive
+    pkg-config
+    autoreconfHook
+  ];
+
+  configureFlags = [
+    "--enable-tools=${if enable-tools then "yes" else "no"}"
+    "--enable-bindings-cxx"
+  ];
+
+  meta = with lib; {
+    description = "C library and tools for interacting with the linux GPIO character device";
+    longDescription = ''
+      Since linux 4.8 the GPIO sysfs interface is deprecated. User space should use
+      the character device instead. This library encapsulates the ioctl calls and
+      data structures behind a straightforward API.
+    '';
+    homepage = "https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/about/";
+    license = with licenses; [
+      lgpl21Plus # libgpiod
+      lgpl3Plus # C++ bindings
+    ] ++ lib.optional enable-tools gpl2Plus;
+    maintainers = [ maintainers.expipiplus1 ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgpod/default.nix b/nixpkgs/pkgs/development/libraries/libgpod/default.nix
new file mode 100644
index 000000000000..a34b108a0a5a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgpod/default.nix
@@ -0,0 +1,78 @@
+{ stdenv
+, lib
+, fetchurl
+, fetchpatch
+, perlPackages
+, intltool
+, autoreconfHook
+, pkg-config
+, glib
+, libxml2
+, sqlite
+, zlib
+, sg3_utils
+, gdk-pixbuf
+, taglib
+, libimobiledevice
+, monoSupport ? false
+, mono
+, gtk-sharp-2_0
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libgpod";
+  version = "0.8.3";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/gtkpod/libgpod-${version}.tar.bz2";
+    hash = "sha256-Y4p5WdBOlfHmKrrQK9M3AuTo3++YSFrH2dUDlcN+lV0=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    (fetchpatch {
+      name = "libplist-2.3.0-compatibility.patch";
+      url = "https://sourceforge.net/p/gtkpod/patches/48/attachment/libplist-2.3.0-compatibility.patch";
+      hash = "sha256-aVkuYE1N/jdEhVhiXEVhApvOC+8csIMMpP20rAJwEVQ=";
+    })
+  ];
+
+  postPatch = ''
+    # support libplist 2.2
+    substituteInPlace configure.ac --replace 'libplist >= 1.0' 'libplist-2.0 >= 2.2'
+  '';
+
+  configureFlags = [
+    "--without-hal"
+    "--enable-udev"
+    "--with-udev-dir=${placeholder "out"}/lib/udev"
+  ] ++ lib.optionals monoSupport [ "--with-mono" ];
+
+  dontStrip = monoSupport;
+
+  nativeBuildInputs = [ autoreconfHook intltool pkg-config ]
+    ++ (with perlPackages; [ perl XMLParser ])
+    ++ lib.optional monoSupport mono;
+
+  buildInputs = [
+    libxml2
+    sg3_utils
+    sqlite
+    taglib
+  ] ++ lib.optional monoSupport gtk-sharp-2_0;
+
+  propagatedBuildInputs = [
+    gdk-pixbuf
+    glib
+    libimobiledevice
+  ];
+
+  meta = with lib; {
+    homepage = "https://sourceforge.net/projects/gtkpod/";
+    description = "Library used by gtkpod to access the contents of an ipod";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.linux;
+    maintainers = [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgringotts/default.nix b/nixpkgs/pkgs/development/libraries/libgringotts/default.nix
new file mode 100644
index 000000000000..faa478b568c7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgringotts/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchurl, pkg-config, zlib, bzip2, libmcrypt, libmhash }:
+
+stdenv.mkDerivation rec {
+  pname = "libgringotts";
+  version = "1.2.1";
+
+  src = fetchurl {
+    url = "https://sourceforge.net/projects/gringotts.berlios/files/${pname}-${version}.tar.bz2";
+    sha256 = "1ldz1lyl1aml5ci1mpnys8dg6n7khpcs4zpycak3spcpgdsnypm7";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ zlib bzip2 libmcrypt libmhash ];
+
+  meta = with lib; {
+    description = "A small library to encapsulate data in an encrypted structure";
+    homepage = "https://libgringotts.sourceforge.net/";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ pSub ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgrss/default.nix b/nixpkgs/pkgs/development/libraries/libgrss/default.nix
new file mode 100644
index 000000000000..8cb978042e71
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgrss/default.nix
@@ -0,0 +1,66 @@
+{ lib, stdenv, fetchurl, fetchpatch, pkg-config, vala, gobject-introspection, gtk-doc
+, docbook_xsl, docbook_xml_dtd_412, glib, libxml2, libsoup, gnome, buildPackages
+, Foundation, AppKit
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libgrss";
+  version = "0.7.0";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "1nalslgyglvhpva3px06fj6lv5zgfg0qmj0sbxyyl5d963vc02b7";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "CVE-2016-20011.patch";
+      # https://gitlab.gnome.org/GNOME/libgrss/-/merge_requests/7, not yet merged!
+      url = "https://gitlab.gnome.org/GNOME/libgrss/-/commit/2c6ea642663e2a44efc8583fae7c54b7b98f72b3.patch";
+      sha256 = "1ijvq2jl97vphcvrbrqxvszdmv6yyjfygdca9vyaijpafwyzzb18";
+    })
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+    vala
+    gobject-introspection
+    gtk-doc
+    docbook_xsl
+    docbook_xml_dtd_412
+  ];
+
+  buildInputs = [
+    glib
+    libxml2
+    libsoup
+  ] ++ lib.optionals stdenv.isDarwin [
+    Foundation
+    AppKit
+  ];
+
+  configureFlags = [
+    "PKG_CONFIG=${buildPackages.pkg-config}/bin/${buildPackages.pkg-config.targetPrefix}pkg-config"
+  ] ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [
+    "--enable-gtk-doc"
+  ];
+
+  doCheck = true;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "none";
+    };
+  };
+
+  meta = with lib; {
+    description = "Glib abstaction to handle feeds in RSS, Atom and other formats";
+    homepage = "https://wiki.gnome.org/Projects/Libgrss";
+    license = licenses.lgpl3Plus;
+    maintainers = teams.gnome.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgsf/default.nix b/nixpkgs/pkgs/development/libraries/libgsf/default.nix
new file mode 100644
index 000000000000..eec93fa11169
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgsf/default.nix
@@ -0,0 +1,101 @@
+{ fetchFromGitLab
+, lib
+, stdenv
+, autoreconfHook
+, gtk-doc
+, pkg-config
+, intltool
+, gettext
+, glib
+, libxml2
+, zlib
+, bzip2
+, perl
+, gdk-pixbuf
+, libiconv
+, libintl
+, gnome
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libgsf";
+  version = "1.14.51";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitLab {
+    domain = "gitlab.gnome.org";
+    owner = "GNOME";
+    repo = "libgsf";
+    rev = "LIBGSF_${lib.replaceStrings ["."] ["_"] version}";
+    hash = "sha256-iJcfR+iy1bbRkh+yCAEhY5ks8V6vXIPH7namZSvP98c=";
+  };
+
+  postPatch = ''
+    # Fix cross-compilation
+    substituteInPlace configure.ac \
+      --replace "AC_PATH_PROG(PKG_CONFIG, pkg-config, no)" \
+                "PKG_PROG_PKG_CONFIG"
+  '';
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    autoreconfHook
+    gtk-doc
+    pkg-config
+    intltool
+    libintl
+  ];
+
+  buildInputs = [
+    gettext
+    bzip2
+    zlib
+  ];
+
+  nativeCheckInputs = [
+    perl
+  ];
+
+  propagatedBuildInputs = [
+    libxml2
+    glib
+    gdk-pixbuf
+    libiconv
+  ];
+
+  doCheck = true;
+
+  preCheck = ''
+    patchShebangs ./tests/
+  '';
+
+  # checking pkg-config is at least version 0.9.0... ./configure: line 15213: no: command not found
+  # configure: error: in `/build/libgsf-1.14.50':
+  # configure: error: The pkg-config script could not be found or is too old.  Make sure it
+  # is in your PATH or set the PKG_CONFIG environment variable to the full
+  preConfigure = ''
+    export PKG_CONFIG="$(command -v "$PKG_CONFIG")"
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    description = "GNOME's Structured File Library";
+    homepage = "https://www.gnome.org/projects/libgsf";
+    license = licenses.lgpl21Only;
+    maintainers = with maintainers; [ lovek323 ];
+    platforms = lib.platforms.unix;
+
+    longDescription = ''
+      Libgsf aims to provide an efficient extensible I/O abstraction for
+      dealing with different structured file formats.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgssglue/default.nix b/nixpkgs/pkgs/development/libraries/libgssglue/default.nix
new file mode 100644
index 000000000000..0d01b05e223b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgssglue/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl, libkrb5 }:
+
+stdenv.mkDerivation rec {
+  pname = "libgssglue";
+  version = "0.4";
+
+  src = fetchurl {
+    url = "http://www.citi.umich.edu/projects/nfsv4/linux/libgssglue/${pname}-${version}.tar.gz";
+    sha256 = "0fh475kxzlabwz30wz3bf7i8kfqiqzhfahayx3jj79rba1sily9z";
+  };
+
+  postPatch = ''
+    sed s:/etc/gssapi_mech.conf:$out/etc/gssapi_mech.conf: -i src/g_initialize.c
+  '';
+
+  postInstall = ''
+    mkdir -p $out/etc
+    cat <<EOF > $out/etc/gssapi_mech.conf
+    ${libkrb5}/lib/libgssapi_krb5.so mechglue_internal_krb5_init
+    EOF
+  '';
+
+  meta = with lib; {
+    homepage = "http://www.citi.umich.edu/projects/nfsv4/linux/";
+    description = "Exports a gssapi interface which calls other random gssapi libraries";
+    license = licenses.bsd3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ corngood ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgtkflow3/default.nix b/nixpkgs/pkgs/development/libraries/libgtkflow3/default.nix
new file mode 100644
index 000000000000..7c85bd00b5d6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgtkflow3/default.nix
@@ -0,0 +1,54 @@
+{stdenv, lib, vala, meson, ninja, pkg-config, fetchFromGitea, gobject-introspection, glib, gtk3, libgflow}:
+
+stdenv.mkDerivation rec {
+  pname = "libgtkflow3";
+  version = "1.0.6";
+
+  outputs = [ "out" "dev" "devdoc" ];
+  outputBin = "devdoc"; # demo app
+
+  src = fetchFromGitea {
+    domain = "notabug.org";
+    owner = "grindhold";
+    repo = "libgtkflow";
+    rev = "gtkflow3_${version}";
+    hash = "sha256-JoVq7U5JQ3pRxptR7igWFw7lcBTsgr3aVXxayLqhyFo=";
+  };
+
+  nativeBuildInputs = [
+    vala
+    meson
+    ninja
+    pkg-config
+    gobject-introspection
+  ];
+
+  buildInputs = [
+    gtk3
+    glib
+    libgflow
+  ];
+
+  postFixup = ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  mesonFlags = [
+    "-Denable_valadoc=true"
+    "-Denable_gtk4=false"
+    "-Denable_gflow=false"
+  ];
+
+  postPatch = ''
+    rm -r libgflow
+  '';
+
+  meta = with lib; {
+    description = "Flow graph widget for GTK 3";
+    homepage = "https://notabug.org/grindhold/libgtkflow";
+    maintainers = with maintainers; [ grindhold ];
+    license = licenses.lgpl3Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgtkflow4/default.nix b/nixpkgs/pkgs/development/libraries/libgtkflow4/default.nix
new file mode 100644
index 000000000000..60439e7636e1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgtkflow4/default.nix
@@ -0,0 +1,54 @@
+{stdenv, lib, vala, meson, ninja, pkg-config, fetchFromGitea, gobject-introspection, glib, gtk4, libgflow}:
+
+stdenv.mkDerivation rec {
+  pname = "libgtkflow4";
+  version = "0.2.6";
+
+  outputs = [ "out" "dev" "devdoc" ];
+  outputBin = "devdoc"; # demo app
+
+  src = fetchFromGitea {
+    domain = "notabug.org";
+    owner = "grindhold";
+    repo = "libgtkflow";
+    rev = "gtkflow4_${version}";
+    hash = "sha256-JoVq7U5JQ3pRxptR7igWFw7lcBTsgr3aVXxayLqhyFo=";
+  };
+
+  nativeBuildInputs = [
+    vala
+    meson
+    ninja
+    pkg-config
+    gobject-introspection
+  ];
+
+  buildInputs = [
+    gtk4
+    glib
+    libgflow
+  ];
+
+  postFixup = ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  mesonFlags = [
+    "-Denable_valadoc=true"
+    "-Denable_gtk3=false"
+    "-Denable_gflow=false"
+  ];
+
+  postPatch = ''
+    rm -r libgflow
+  '';
+
+  meta = with lib; {
+    description = "Flow graph widget for GTK 3";
+    homepage = "https://notabug.org/grindhold/libgtkflow";
+    maintainers = with maintainers; [ grindhold ];
+    license = licenses.lgpl3Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgtop/default.nix b/nixpkgs/pkgs/development/libraries/libgtop/default.nix
new file mode 100644
index 000000000000..ae4938483590
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgtop/default.nix
@@ -0,0 +1,51 @@
+{ lib, stdenv
+, fetchurl
+, glib
+, pkg-config
+, perl
+, gettext
+, gobject-introspection
+, gnome
+, gtk-doc
+, deterministic-uname
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libgtop";
+  version = "2.41.2";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    hash = "sha256-2QJs2KSNJ83/0zL41gqSdktWQk5SLEIM0ToB9A2vksM=";
+  };
+
+  nativeBuildInputs = [
+    # uname output embedded in https://gitlab.gnome.org/GNOME/libgtop/-/blob/master/src/daemon/Makefile.am
+    deterministic-uname
+    pkg-config
+    gtk-doc
+    perl
+    gettext
+    gobject-introspection
+  ];
+
+  propagatedBuildInputs = [
+    glib
+  ];
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    description = "A library that reads information about processes and the running system";
+    license = licenses.gpl2Plus;
+    maintainers = teams.gnome.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgudev/default.nix b/nixpkgs/pkgs/development/libraries/libgudev/default.nix
new file mode 100644
index 000000000000..68e3e42476e7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgudev/default.nix
@@ -0,0 +1,77 @@
+{ stdenv
+, lib
+, fetchurl
+, pkg-config
+, meson
+, ninja
+, udev
+, glib
+, gnome
+, vala
+, gobject-introspection
+, glibcLocales
+, umockdev
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libgudev";
+  version = "238";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/libgudev/${lib.versions.majorMinor finalAttrs.version}/libgudev-${finalAttrs.version}.tar.xz";
+    hash = "sha256-YSZqsa/J1z28YKiyr3PpnS/f9H2ZVE0IV2Dk+mZ7XdE=";
+  };
+
+  patches = [
+    # Conditionally disable one test that requires a locale implementation
+    # https://gitlab.gnome.org/GNOME/libgudev/-/merge_requests/31
+    ./tests-skip-double-test-on-stub-locale-impls.patch
+  ];
+
+  postPatch = lib.optionalString finalAttrs.finalPackage.doCheck ''
+    # The relative location of LD_PRELOAD works for Glibc but not for other loaders (e.g. pkgsMusl)
+    substituteInPlace tests/meson.build \
+      --replace "LD_PRELOAD=libumockdev-preload.so.0" "LD_PRELOAD=${lib.getLib umockdev}/lib/libumockdev-preload.so.0"
+  '';
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    pkg-config
+    meson
+    ninja
+    vala
+    glib # for glib-mkenums needed during the build
+    gobject-introspection
+  ];
+
+  buildInputs = [
+    udev
+    glib
+  ];
+
+  checkInputs = [
+    glibcLocales
+    umockdev
+  ];
+
+  doCheck = true;
+  mesonFlags = lib.optional (!finalAttrs.finalPackage.doCheck) "-Dtests=disabled";
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = "libgudev";
+      versionPolicy = "none";
+    };
+  };
+
+  meta = with lib; {
+    description = "A library that provides GObject bindings for libudev";
+    homepage = "https://wiki.gnome.org/Projects/libgudev";
+    maintainers = [ maintainers.eelco ] ++ teams.gnome.members;
+    platforms = platforms.linux;
+    license = licenses.lgpl2Plus;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libgudev/tests-skip-double-test-on-stub-locale-impls.patch b/nixpkgs/pkgs/development/libraries/libgudev/tests-skip-double-test-on-stub-locale-impls.patch
new file mode 100644
index 000000000000..277670aeed2b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgudev/tests-skip-double-test-on-stub-locale-impls.patch
@@ -0,0 +1,41 @@
+From ad8b10870ee2092268f87144d8e5ab7db2011139 Mon Sep 17 00:00:00 2001
+From: Alyssa Ross <hi@alyssa.is>
+Date: Tue, 30 Jan 2024 20:47:21 +0100
+Subject: [PATCH] tests: Skip double test on stub locale impls
+
+On musl, setlocale() with an unknown locale name will succeed, but
+treat the requested locale as if it were C.UTF-8.  Therefore, to
+properly check whether the locale is supported, we need to actually
+verify whether it works the way we expect when deciding whether to
+skip the test.
+---
+ tests/test-double.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/tests/test-double.c b/tests/test-double.c
+index 91e77c9..e9d9232 100644
+--- a/tests/test-double.c
++++ b/tests/test-double.c
+@@ -39,8 +39,6 @@ fixture_teardown (Fixture *f, G_GNUC_UNUSED const void *data)
+ static void
+ test_double (Fixture *f, G_GNUC_UNUSED const void *data)
+ {
+-	g_assert_cmpstr (nl_langinfo(RADIXCHAR), ==, ",");
+-
+ 	umockdev_testbed_add_device (f->testbed, "platform", "dev1", NULL,
+ 				     "in_accel_scale", "0.0000098", NULL,
+ 				     "ID_MODEL", "KoolGadget", "SCALE", "0.0000098", NULL);
+@@ -73,6 +71,10 @@ int main(int argc, char **argv)
+ 	if (setlocale (LC_NUMERIC, "fr_FR.UTF-8") == NULL)
+ 		return GNU_SKIP_RETURNCODE;
+ 
++	/* Skip if locale doesn't work how we expect. */
++	if (strcmp (nl_langinfo(RADIXCHAR), ","))
++		return GNU_SKIP_RETURNCODE;
++
+ 	g_test_init (&argc, &argv, NULL);
+ 
+ 	g_test_add ("/gudev/double", Fixture, NULL,
+-- 
+GitLab
+
diff --git a/nixpkgs/pkgs/development/libraries/libguestfs/appliance.nix b/nixpkgs/pkgs/development/libraries/libguestfs/appliance.nix
new file mode 100644
index 000000000000..1cedb03cb764
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libguestfs/appliance.nix
@@ -0,0 +1,31 @@
+{ lib
+, stdenvNoCC
+, fetchurl
+}:
+
+stdenvNoCC.mkDerivation rec {
+  pname = "libguestfs-appliance";
+  version = "1.46.0";
+
+  src = fetchurl {
+    url = "http://download.libguestfs.org/binaries/appliance/appliance-${version}.tar.xz";
+    hash = "sha256-p1UN5wv3y+V5dFMG5yM3bVf1vaoDzQnVv9apfwC4gNg=";
+  };
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out
+    cp README.fixed initrd kernel root $out
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "VM appliance disk image used in libguestfs package";
+    homepage = "https://libguestfs.org";
+    license = with licenses; [ gpl2Plus lgpl2Plus ];
+    platforms = [ "i686-linux" "x86_64-linux" ];
+    hydraPlatforms = [ ]; # Hydra fails with "Output limit exceeded"
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libguestfs/default.nix b/nixpkgs/pkgs/development/libraries/libguestfs/default.nix
new file mode 100644
index 000000000000..0b2b4278a65a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libguestfs/default.nix
@@ -0,0 +1,168 @@
+{ lib
+, stdenv
+, fetchurl
+, pkg-config
+, autoreconfHook
+, makeWrapper
+, libxcrypt
+, ncurses
+, cpio
+, gperf
+, cdrkit
+, flex
+, bison
+, qemu
+, pcre2
+, augeas
+, libxml2
+, acl
+, libcap
+, libcap_ng
+, libconfig
+, systemd
+, fuse
+, yajl
+, libvirt
+, hivex
+, db
+, gmp
+, readline
+, file
+, numactl
+, libapparmor
+, jansson
+, getopt
+, perlPackages
+, ocamlPackages
+, libtirpc
+, appliance ? null
+, javaSupport ? false
+, jdk
+, zstd
+}:
+
+assert appliance == null || lib.isDerivation appliance;
+
+stdenv.mkDerivation rec {
+  pname = "libguestfs";
+  version = "1.50.1";
+
+  src = fetchurl {
+    url = "https://libguestfs.org/download/${lib.versions.majorMinor version}-stable/${pname}-${version}.tar.gz";
+    sha256 = "sha256-Xmhx6I+C5SHjHUQt5qELZJcCN8t5VumdEXsSO1hWWm8=";
+  };
+
+  strictDeps = true;
+  nativeBuildInputs = [
+    autoreconfHook
+    bison
+    cdrkit
+    cpio
+    flex
+    getopt
+    gperf
+    makeWrapper
+    pkg-config
+    qemu
+    zstd
+  ] ++ (with perlPackages; [ perl libintl-perl GetoptLong ModuleBuild ])
+  ++ (with ocamlPackages; [ ocaml findlib ]);
+  buildInputs = [
+    libxcrypt
+    ncurses
+    jansson
+    pcre2
+    augeas
+    libxml2
+    acl
+    libcap
+    libcap_ng
+    libconfig
+    systemd
+    fuse
+    yajl
+    libvirt
+    gmp
+    readline
+    file
+    hivex
+    db
+    numactl
+    libapparmor
+    perlPackages.ModuleBuild
+    libtirpc
+  ] ++ (with ocamlPackages; [ ocamlbuild ocaml_libvirt gettext-stub ounit ])
+  ++ lib.optional javaSupport jdk;
+
+  prePatch = ''
+    # build-time scripts
+    substituteInPlace run.in        --replace '#!/bin/bash' '#!${stdenv.shell}'
+    substituteInPlace ocaml-link.sh.in --replace '#!/bin/bash' '#!${stdenv.shell}'
+
+    # $(OCAMLLIB) is read-only "${ocamlPackages.ocaml}/lib/ocaml"
+    substituteInPlace ocaml/Makefile.am            --replace '$(DESTDIR)$(OCAMLLIB)' '$(out)/lib/ocaml'
+    substituteInPlace ocaml/Makefile.in            --replace '$(DESTDIR)$(OCAMLLIB)' '$(out)/lib/ocaml'
+
+    # some scripts hardcore /usr/bin/env which is not available in the build env
+    patchShebangs .
+  '';
+  configureFlags = [
+    "--disable-appliance"
+    "--disable-daemon"
+    "--with-distro=NixOS"
+    "--with-guestfs-path=${placeholder "out"}/lib/guestfs"
+  ] ++ lib.optionals (!javaSupport) [ "--without-java" ];
+  patches = [
+    ./libguestfs-syms.patch
+  ];
+
+  createFindlibDestdir = true;
+
+  installFlags = [ "REALLY_INSTALL=yes" ];
+  enableParallelBuilding = true;
+
+  postInstall = ''
+    mv "$out/lib/ocaml/guestfs" "$OCAMLFIND_DESTDIR/guestfs"
+    for bin in $out/bin/*; do
+      wrapProgram "$bin" \
+        --prefix PATH     : "$out/bin:${hivex}/bin:${qemu}/bin" \
+        --prefix PERL5LIB : "$out/${perlPackages.perl.libPrefix}"
+    done
+  '';
+
+  postFixup = lib.optionalString (appliance != null) ''
+    mkdir -p $out/{lib,lib64}
+    ln -s ${appliance} $out/lib64/guestfs
+    ln -s ${appliance} $out/lib/guestfs
+  '';
+
+  doInstallCheck = appliance != null;
+  installCheckPhase = ''
+    runHook preInstallCheck
+
+    export HOME=$(mktemp -d) # avoid access to /homeless-shelter/.guestfish
+
+    ${qemu}/bin/qemu-img create -f qcow2 disk1.img 10G
+
+    $out/bin/guestfish <<'EOF'
+    add-drive disk1.img
+    run
+    list-filesystems
+    part-disk /dev/sda mbr
+    mkfs ext2 /dev/sda1
+    list-filesystems
+    EOF
+
+    runHook postInstallCheck
+  '';
+
+  meta = with lib; {
+    description = "Tools for accessing and modifying virtual machine disk images";
+    license = with licenses; [ gpl2Plus lgpl21Plus ];
+    homepage = "https://libguestfs.org/";
+    maintainers = with maintainers; [ offline ];
+    platforms = platforms.linux;
+    # this is to avoid "output size exceeded"
+    hydraPlatforms = if appliance != null then appliance.meta.hydraPlatforms else platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libguestfs/libguestfs-syms.patch b/nixpkgs/pkgs/development/libraries/libguestfs/libguestfs-syms.patch
new file mode 100644
index 000000000000..09c4b1393ce7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libguestfs/libguestfs-syms.patch
@@ -0,0 +1,13 @@
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -168,8 +168,7 @@ libguestfs_la_LIBADD = \
+ # Force libtool to name the library 'libguestfs.so.0.$(MAX_PROC_NR).0'.
+ # Include the version script to limit which symbols are exported.
+ libguestfs_la_LDFLAGS = \
+-	-version-info $(MAX_PROC_NR):0:$(MAX_PROC_NR) \
+-	$(VERSION_SCRIPT_FLAGS)$(srcdir)/libguestfs.syms
++	-version-info $(MAX_PROC_NR):0:$(MAX_PROC_NR)
+ 
+ if HAVE_FUSE
+ # XXX Unfortunately FUSE_CFLAGS defines _FILE_OFFSET_BITS=64.
diff --git a/nixpkgs/pkgs/development/libraries/libgumath/default.nix b/nixpkgs/pkgs/development/libraries/libgumath/default.nix
new file mode 100644
index 000000000000..f82401f524fa
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgumath/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv
+, fetchFromGitHub
+, libndtypes
+, libxnd
+}:
+
+stdenv.mkDerivation {
+  pname = "libgumath";
+  version = "unstable-2019-08-01";
+
+  src = fetchFromGitHub {
+    owner = "xnd-project";
+    repo = "gumath";
+    rev = "360ed454105ac5615a7cb7d216ad25bc4181b876";
+    sha256 = "1wprkxpmjrk369fpw8rbq51r7jvqkcndqs209y7p560cnagmsxc6";
+  };
+
+  buildInputs = [ libndtypes libxnd ];
+
+  # Override linker with cc (symlink to either gcc or clang)
+  # Library expects to use cc for linking
+  configureFlags = [
+    "LD=${stdenv.cc.targetPrefix}cc"
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Library supporting function dispatch on general data containers. C base and Python wrapper";
+    homepage = "https://xnd.io/";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.costrouc ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgweather/default.nix b/nixpkgs/pkgs/development/libraries/libgweather/default.nix
new file mode 100644
index 000000000000..53c4b5f259b7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgweather/default.nix
@@ -0,0 +1,109 @@
+{ lib
+, stdenv
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, libxml2
+, json-glib
+, glib
+, gettext
+, libsoup_3
+, gi-docgen
+, gobject-introspection
+, python3
+, tzdata
+, geocode-glib_2
+, vala
+, gnome
+, withIntrospection ? stdenv.buildPlatform == stdenv.hostPlatform
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libgweather";
+  version = "4.4.0";
+
+  outputs = [ "out" "dev" ] ++ lib.optional withIntrospection "devdoc";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "Nm6Gb/KnCLiUz+qUdbjo/1TLPitHfqcqit4Nq+5fSKQ=";
+  };
+
+  patches = [
+    # Headers depend on glib but it is only listed in Requires.private,
+    # which does not influence Cflags on non-static builds in nixpkgs’s
+    # pkg-config. Let’s add it to Requires to ensure Cflags are set correctly.
+    ./fix-pkgconfig.patch
+  ];
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gettext
+    glib
+    (python3.pythonOnBuildForHost.withPackages (ps: [ ps.pygobject3 ]))
+  ] ++ lib.optionals withIntrospection [
+    gi-docgen
+    gobject-introspection
+    vala
+  ];
+
+  buildInputs = [
+    glib
+    libsoup_3
+    libxml2
+    json-glib
+    geocode-glib_2
+  ];
+
+  mesonFlags = [
+    "-Dzoneinfo_dir=${tzdata}/share/zoneinfo"
+    (lib.mesonBool "introspection" withIntrospection)
+  ] ++ lib.optionals stdenv.isDarwin [
+    "-Dc_args=-D_DARWIN_C_SOURCE"
+  ];
+
+  postPatch = ''
+    patchShebangs build-aux/meson/gen_locations_variant.py
+
+    # Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake)
+    # it should be a build-time dep for build
+    # TODO: send upstream
+    substituteInPlace doc/meson.build \
+      --replace "'gi-docgen', ver" "'gi-docgen', native:true, ver" \
+      --replace "'gi-docgen', req" "'gi-docgen', native:true, req"
+
+    # gir works for us even when cross-compiling
+    # TODO: send upstream because downstream users can use the option to disable gir if they don't have it working
+    substituteInPlace libgweather/meson.build \
+      --replace "g_ir_scanner.found() and not meson.is_cross_build()" "g_ir_scanner.found()"
+  '';
+
+  postFixup = ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+      # Version 40.alpha preceded version 4.0.
+      freeze = "40.alpha";
+    };
+  };
+
+  meta = with lib; {
+    description = "A library to access weather information from online services for numerous locations";
+    homepage = "https://wiki.gnome.org/Projects/LibGWeather";
+    license = licenses.gpl2Plus;
+    maintainers = teams.gnome.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libgweather/fix-pkgconfig.patch b/nixpkgs/pkgs/development/libraries/libgweather/fix-pkgconfig.patch
new file mode 100644
index 000000000000..b118a3bc9dd8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgweather/fix-pkgconfig.patch
@@ -0,0 +1,14 @@
+diff --git a/libgweather/meson.build b/libgweather/meson.build
+index b5d0b4d4..10010d70 100644
+--- a/libgweather/meson.build
++++ b/libgweather/meson.build
+@@ -269,6 +269,9 @@ pkgconfig.generate(
+   description: 'Gather weather information from online services',
+   version: meson.project_version(),
+   subdirs: libgweather_full_version,
++  requires: [
++    'glib-2.0',
++  ],
+   variables: [
+     'soupapiversion=' + libsoup_api_version,
+   ]
diff --git a/nixpkgs/pkgs/development/libraries/libgxps/default.nix b/nixpkgs/pkgs/development/libraries/libgxps/default.nix
new file mode 100644
index 000000000000..397939103400
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libgxps/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchurl, meson, ninja, pkg-config, glib, gobject-introspection, cairo
+, libarchive, freetype, libjpeg, libtiff, gnome, lcms2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libgxps";
+  version = "0.3.2";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "bSeGclajXM+baSU+sqiKMrrKO5fV9O9/guNmf6Q1JRw=";
+  };
+
+  nativeBuildInputs = [ meson ninja pkg-config gobject-introspection ];
+  buildInputs = [ glib cairo freetype libjpeg libtiff lcms2 ];
+  propagatedBuildInputs = [ libarchive ];
+
+  mesonFlags = [
+    "-Denable-test=false"
+  ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
+    "-Ddisable-introspection=true"
+  ];
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "none";
+    };
+  };
+
+  meta = with lib; {
+    description = "A GObject based library for handling and rendering XPS documents";
+    homepage = "https://wiki.gnome.org/Projects/libgxps";
+    license = licenses.lgpl21Plus;
+    maintainers = teams.gnome.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libhandy/0.x.nix b/nixpkgs/pkgs/development/libraries/libhandy/0.x.nix
new file mode 100644
index 000000000000..a6945508e593
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libhandy/0.x.nix
@@ -0,0 +1,53 @@
+{ lib, stdenv, fetchFromGitLab, meson, ninja, pkg-config, gobject-introspection, vala
+, gtk-doc, docbook_xsl, docbook_xml_dtd_43
+, gtk3, gnome-desktop
+, dbus, xvfb-run, libxml2
+, hicolor-icon-theme
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libhandy";
+  version = "0.0.13";
+
+  outputs = [ "out" "dev" "devdoc" ];
+  outputBin = "dev";
+
+  src = fetchFromGitLab {
+    domain = "source.puri.sm";
+    owner = "Librem5";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1y23k623sjkldfrdiwfarpchg5mg58smcy1pkgnwfwca15wm1ra5";
+  };
+
+  nativeBuildInputs = [
+    meson ninja pkg-config gobject-introspection vala libxml2
+    gtk-doc docbook_xsl docbook_xml_dtd_43
+  ];
+  buildInputs = [ gnome-desktop gtk3 libxml2 ];
+  nativeCheckInputs = [ dbus xvfb-run hicolor-icon-theme ];
+
+  mesonFlags = [
+    "-Dgtk_doc=true"
+    "-Dglade_catalog=disabled"
+    "-Dintrospection=enabled"
+  ];
+
+  doCheck = !stdenv.isDarwin;
+
+  checkPhase = ''
+    NO_AT_BRIDGE=1 \
+    XDG_DATA_DIRS="$XDG_DATA_DIRS:${hicolor-icon-theme}/share" \
+    xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
+      --config-file=${dbus}/share/dbus-1/session.conf \
+      meson test --print-errorlogs
+  '';
+
+  meta = with lib; {
+    description = "A library full of GTK widgets for mobile phones";
+    homepage = "https://source.puri.sm/Librem5/libhandy";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libhandy/default.nix b/nixpkgs/pkgs/development/libraries/libhandy/default.nix
new file mode 100644
index 000000000000..7507f40b604f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libhandy/default.nix
@@ -0,0 +1,140 @@
+{ lib
+, stdenv
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, gobject-introspection
+, vala
+, gi-docgen
+, glib
+, gsettings-desktop-schemas
+, gtk3
+, enableGlade ? false
+, glade
+, xvfb-run
+, gdk-pixbuf
+, librsvg
+, libxml2
+, hicolor-icon-theme
+, at-spi2-atk
+, at-spi2-core
+, gnome
+, libhandy
+, runCommand
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libhandy";
+  version = "1.8.2";
+
+  outputs = [
+    "out"
+    "dev"
+    "devdoc"
+  ] ++ lib.optionals enableGlade [
+    "glade"
+  ];
+  outputBin = "dev";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-0RqizT5XCsbQ79ukbRcxR8EfRYJkV+kkwFmQuy4N+a0=";
+  };
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    gobject-introspection
+    gi-docgen
+    meson
+    ninja
+    pkg-config
+    vala
+  ] ++ lib.optionals enableGlade [
+    libxml2 # for xmllint
+  ];
+
+  buildInputs = [
+    gdk-pixbuf
+    gtk3
+  ] ++ lib.optionals enableGlade [
+    glade
+  ];
+
+  nativeCheckInputs = [
+    xvfb-run
+    at-spi2-atk
+    at-spi2-core
+    librsvg
+    hicolor-icon-theme
+  ];
+
+  mesonFlags = [
+    "-Dgtk_doc=true"
+    "-Dglade_catalog=${if enableGlade then "enabled" else "disabled"}"
+  ];
+
+  # Uses define_variable in pkg-config, but we still need it to use the glade output
+  PKG_CONFIG_GLADEUI_2_0_MODULEDIR = "${placeholder "glade"}/lib/glade/modules";
+  PKG_CONFIG_GLADEUI_2_0_CATALOGDIR = "${placeholder "glade"}/share/glade/catalogs";
+
+  doCheck = !stdenv.isDarwin;
+
+  checkPhase = ''
+    runHook preCheck
+
+    testEnvironment=(
+      # Disable portal since we cannot run it in tests.
+      HDY_DISABLE_PORTAL=1
+
+      "XDG_DATA_DIRS=${lib.concatStringsSep ":" [
+        # HdySettings needs to be initialized from “org.gnome.desktop.interface” GSettings schema when portal is not used for color scheme.
+        # It will not actually be used since the “color-scheme” key will only have been introduced in GNOME 42, falling back to detecting theme name.
+        # See hdy_settings_constructed function in https://gitlab.gnome.org/GNOME/libhandy/-/commit/bb68249b005c445947bfb2bee66c91d0fe9c41a4
+        (glib.getSchemaDataDirPath gsettings-desktop-schemas)
+
+        # Some tests require icons
+        "${hicolor-icon-theme}/share"
+      ]}"
+    )
+    env "''${testEnvironment[@]}" xvfb-run \
+      meson test --print-errorlogs
+
+    runHook postCheck
+  '';
+
+  postFixup = ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  } // lib.optionalAttrs (!enableGlade) {
+    glade =
+      let
+        libhandyWithGlade = libhandy.override {
+          enableGlade = true;
+        };
+      in runCommand "${libhandy.name}-glade" {} ''
+        cp -r "${libhandyWithGlade.glade}" "$out"
+        chmod -R +w "$out"
+        sed -e "s#${libhandyWithGlade.out}#${libhandy.out}#g" -e "s#${libhandyWithGlade.glade}#$out#g" -i $(find "$out" -type f)
+      '';
+  };
+
+  meta = with lib; {
+    changelog = "https://gitlab.gnome.org/GNOME/libhandy/-/tags/${version}";
+    description = "Building blocks for modern adaptive GNOME apps";
+    homepage = "https://gitlab.gnome.org/GNOME/libhandy";
+    license = licenses.lgpl21Plus;
+    maintainers = teams.gnome.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libhangul/default.nix b/nixpkgs/pkgs/development/libraries/libhangul/default.nix
new file mode 100644
index 000000000000..295ed9bf3054
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libhangul/default.nix
@@ -0,0 +1,19 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libhangul";
+  version = "0.1.0";
+
+  src = fetchurl {
+    url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/libhangul/libhangul-${version}.tar.gz";
+    sha256 = "0ni9b0v70wkm0116na7ghv03pgxsfpfszhgyj3hld3bxamfal1ar";
+  };
+
+  meta = with lib; {
+    description = "Core algorithm library for Korean input routines";
+    homepage = "https://github.com/choehwanjin/libhangul";
+    license = licenses.lgpl21;
+    maintainers = [ maintainers.ianwookim ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libharu/default.nix b/nixpkgs/pkgs/development/libraries/libharu/default.nix
new file mode 100644
index 000000000000..dabd74e648c3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libharu/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchFromGitHub, cmake, zlib, libpng }:
+
+stdenv.mkDerivation rec {
+  pname = "libharu";
+  version = "2.4.4";
+
+  src = fetchFromGitHub {
+    owner = "libharu";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-tw/E79Cg/8kIei6NUu1W+mP0sUDCm8KTB7ZjzxsqpeM=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ zlib libpng ];
+
+  meta = {
+    description = "Cross platform, open source library for generating PDF files";
+    homepage = "http://libharu.org/";
+    license = lib.licenses.zlib;
+    maintainers = [ lib.maintainers.marcweber ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libhdhomerun/default.nix b/nixpkgs/pkgs/development/libraries/libhdhomerun/default.nix
new file mode 100644
index 000000000000..558e6d6fa894
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libhdhomerun/default.nix
@@ -0,0 +1,42 @@
+{ lib, stdenv, fetchurl }:
+
+# libhdhomerun requires UDP port 65001 to be open in order to detect and communicate with tuners.
+# If your firewall is enabled, make sure to have something like:
+#   networking.firewall.allowedUDPPorts = [ 65001 ];
+
+stdenv.mkDerivation rec {
+  pname = "libhdhomerun";
+  version = "20231214";
+
+  src = fetchurl {
+    url = "https://download.silicondust.com/hdhomerun/libhdhomerun_${version}.tgz";
+    hash = "sha256-VSoQLoqiq8xBYJDewvb4DaWfl/kfV5aOnp17PcAF268=";
+  };
+
+  patches = [
+    ./nixos-darwin-no-fat-dylib.patch
+  ];
+
+  makeFlags = [
+    "CC=${stdenv.cc.targetPrefix}cc"
+  ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/{bin,lib,include/hdhomerun}
+    install -Dm444 libhdhomerun${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib
+    install -Dm555 hdhomerun_config $out/bin
+    cp *.h $out/include/hdhomerun
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Implements the libhdhomerun protocol for use with Silicondust HDHomeRun TV tuners";
+    homepage = "https://www.silicondust.com/support/linux";
+    license = licenses.lgpl21Only;
+    maintainers = with maintainers; [ sielicki titanous ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libhdhomerun/nixos-darwin-no-fat-dylib.patch b/nixpkgs/pkgs/development/libraries/libhdhomerun/nixos-darwin-no-fat-dylib.patch
new file mode 100644
index 000000000000..99c389a19434
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libhdhomerun/nixos-darwin-no-fat-dylib.patch
@@ -0,0 +1,52 @@
+From 6b9ed19d7874b88b7db5b740dac3dcd7dcda6c8c Mon Sep 17 00:00:00 2001
+From: Nicholas Sielicki <git@opensource.nslick.com>
+Date: Sat, 25 Nov 2023 13:54:39 -0600
+Subject: [PATCH] nixos-darwin-no-fat-dylib
+
+Signed-off-by: Nicholas Sielicki <git@opensource.nslick.com>
+---
+ Makefile | 24 ++++--------------------
+ 1 file changed, 4 insertions(+), 20 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 1d8fb9f..35c7d15 100644
+--- a/Makefile
++++ b/Makefile
+@@ -42,30 +42,14 @@ LIBSRCS += hdhomerun_video.c
+ 
+ ifeq ($(OS),Darwin)
+ 
+-TARGET_X64 := -target x86_64-apple-macos10.11
+-TARGET_ARM64 := -target arm64-apple-macos11
+-
+ all : hdhomerun_config libhdhomerun.dylib
+ 
+-hdhomerun_config_x64 : hdhomerun_config.c $(LIBSRCS)
+-	$(CC) $(TARGET_X64) $(CFLAGS) $+ $(LDFLAGS) -o $@
+-	$(STRIP) $@
+-
+-hdhomerun_config_arm64 : hdhomerun_config.c $(LIBSRCS)
+-	$(CC) $(TARGET_ARM64) $(CFLAGS) $+ $(LDFLAGS) -o $@
++hdhomerun_config: hdhomerun_config.c $(LIBSRCS)
++	$(CC) $(CFLAGS) $+ $(LDFLAGS) -o $@
+ 	$(STRIP) $@
+ 
+-hdhomerun_config : hdhomerun_config_x64 hdhomerun_config_arm64
+-	lipo -create -output hdhomerun_config hdhomerun_config_x64 hdhomerun_config_arm64
+-
+-libhdhomerun_x64.dylib : $(LIBSRCS)
+-	$(CC) $(TARGET_X64) $(CFLAGS) -DDLL_EXPORT -fPIC -dynamiclib $+ $(LDFLAGS) -o $@
+-
+-libhdhomerun_arm64.dylib : $(LIBSRCS)
+-	$(CC) $(TARGET_ARM64) $(CFLAGS) -DDLL_EXPORT -fPIC -dynamiclib $+ $(LDFLAGS) -o $@
+-
+-libhdhomerun.dylib : libhdhomerun_x64.dylib libhdhomerun_arm64.dylib
+-	lipo -create -output libhdhomerun.dylib libhdhomerun_x64.dylib libhdhomerun_arm64.dylib
++libhdhomerun.dylib : $(LIBSRCS)
++	$(CC) $(CFLAGS) -DDLL_EXPORT -fPIC -dynamiclib $+ $(LDFLAGS) -o $@
+ 
+ else
+ 
+-- 
+2.42.0
+
diff --git a/nixpkgs/pkgs/development/libraries/libheif/default.nix b/nixpkgs/pkgs/development/libraries/libheif/default.nix
new file mode 100644
index 000000000000..d14df84d3483
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libheif/default.nix
@@ -0,0 +1,68 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+, dav1d
+, rav1e
+, libde265
+, x265
+, libpng
+, libjpeg
+, libaom
+, gdk-pixbuf
+
+# for passthru.tests
+, gimp
+, imagemagick
+, imlib2Full
+, imv
+, vips
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libheif";
+  version = "1.15.2";
+
+  outputs = [ "bin" "out" "dev" "man" ];
+
+  src = fetchFromGitHub {
+    owner = "strukturag";
+    repo = "libheif";
+    rev = "v${version}";
+    sha256 = "sha256-VbMBZ17leGezng2FYKgiSq04Se0PT0a3WqjM6xZ3zS4=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ];
+
+  buildInputs = [
+    dav1d
+    rav1e
+    libde265
+    x265
+    libpng
+    libjpeg
+    libaom
+    gdk-pixbuf
+  ];
+
+  enableParallelBuilding = true;
+
+  # Fix installation path for gdk-pixbuf module
+  PKG_CONFIG_GDK_PIXBUF_2_0_GDK_PIXBUF_MODULEDIR = "${placeholder "out"}/${gdk-pixbuf.moduleDir}";
+
+  passthru.tests = {
+    inherit gimp imagemagick imlib2Full imv vips;
+  };
+
+  meta = {
+    homepage = "http://www.libheif.org/";
+    description = "ISO/IEC 23008-12:2017 HEIF image file format decoder and encoder";
+    license = lib.licenses.lgpl3Plus;
+    platforms = lib.platforms.unix;
+    maintainers = with lib.maintainers; [ gebner ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libhsts/default.nix b/nixpkgs/pkgs/development/libraries/libhsts/default.nix
new file mode 100644
index 000000000000..2150bbd24bfb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libhsts/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchFromGitLab, fetchurl, autoconf-archive, autoreconfHook, pkg-config, python3 }:
+let
+  chromium_version = "90.0.4417.1";
+
+  hsts_list = fetchurl {
+    url = "https://raw.github.com/chromium/chromium/${chromium_version}/net/http/transport_security_state_static.json";
+    sha256 = "09f24n30x5dmqk8zk7k2glcilgr27832a3304wj1yp97158sqsfx";
+  };
+
+in
+stdenv.mkDerivation rec {
+  pname = "libhsts";
+  version = "0.1.0";
+
+  src = fetchFromGitLab {
+    owner = "rockdaboot";
+    repo = pname;
+    rev = "libhsts-${version}";
+    sha256 = "0gbchzf0f4xzb6zjc56dk74hqrmdgyirmgxvvsqp9vqn9wb5kkx4";
+  };
+
+  postPatch = ''
+    pushd tests
+    cp ${hsts_list} transport_security_state_static.json
+    sed 's/^ *\/\/.*$//g' transport_security_state_static.json >hsts.json
+    popd
+    patchShebangs src/hsts-make-dafsa
+  '';
+
+  nativeBuildInputs = [ autoconf-archive autoreconfHook pkg-config python3 ];
+
+  outputs = [ "out" "dev" ];
+
+  meta = with lib; {
+    description = "Library to easily check a domain against the Chromium HSTS Preload list";
+    homepage = "https://gitlab.com/rockdaboot/libhsts";
+    license = with licenses; [ mit bsd3 ];
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libhsts/update.sh b/nixpkgs/pkgs/development/libraries/libhsts/update.sh
new file mode 100755
index 000000000000..f80966e08c9a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libhsts/update.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p curl jq
+
+set -euo pipefail -x
+
+cd "$(dirname "$0")"
+
+chromium_version=$(curl -s "https://api.github.com/repos/chromium/chromium/tags" | jq -r 'map(select(.prerelease | not)) | .[1].name')
+sha256=$(nix-prefetch-url "https://raw.github.com/chromium/chromium/$chromium_version/net/http/transport_security_state_static.json")
+
+sed -e "0,/chromium_version/s/chromium_version = \".*\"/chromium_version = \"$chromium_version\"/" \
+    -e "0,/sha256/s/sha256 = \".*\"/sha256 = \"$sha256\"/" \
+  --in-place ./default.nix
diff --git a/nixpkgs/pkgs/development/libraries/libhttpseverywhere/default.nix b/nixpkgs/pkgs/development/libraries/libhttpseverywhere/default.nix
new file mode 100644
index 000000000000..80bc73e9a043
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libhttpseverywhere/default.nix
@@ -0,0 +1,55 @@
+{ lib, stdenv, fetchurl, pkg-config, meson, ninja, makeFontsConf, vala, fetchpatch
+, gnome, libgee, glib, json-glib, libarchive, libsoup, gobject-introspection }:
+
+let
+  pname = "libhttpseverywhere";
+  version = "0.8.3";
+in stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${name}.tar.xz";
+    sha256 = "1jmn6i4vsm89q1axlq4ajqkzqmlmjaml9xhw3h9jnal46db6y00w";
+  };
+
+  nativeBuildInputs = [ vala gobject-introspection meson ninja pkg-config ];
+  buildInputs = [ glib libgee json-glib libsoup libarchive ];
+
+  patches = [
+    # Fixes build with vala >=0.42
+    (fetchpatch {
+      url = "https://gitlab.gnome.org/GNOME/libhttpseverywhere/commit/6da08ef1ade9ea267cecf14dd5cb2c3e6e5e50cb.patch";
+      sha256 = "1nwjlh8iqgjayccwdh0fbpq2g1h8bg1k1g9i324f2bhhvyhmpq8f";
+    })
+    # fix build with meson 0.60
+    (fetchpatch {
+      url = "https://gitlab.gnome.org/GNOME/libhttpseverywhere/-/commit/4c38b2ca25802c464f3204a62815201d8cf549fd.patch";
+      sha256 = "sha256-1+fmR0bpvJ9ISN2Hr+BTIQz+Bf6VfY1RdVZ/OohUlWU=";
+    })
+  ];
+
+  mesonFlags = [ "-Denable_valadoc=true" ];
+
+  doCheck = true;
+
+  checkPhase = "(cd test && ./httpseverywhere_test)";
+
+  FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ ]; };
+
+  outputs = [ "out" "devdoc" ];
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    description = "Library to use HTTPSEverywhere in desktop applications";
+    homepage = "https://gitlab.gnome.org/GNOME/libhttpseverywhere";
+    license = licenses.lgpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ sternenseemann ] ++ teams.gnome.members;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libhugetlbfs/default.nix b/nixpkgs/pkgs/development/libraries/libhugetlbfs/default.nix
new file mode 100644
index 000000000000..0f7859be9dbb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libhugetlbfs/default.nix
@@ -0,0 +1,55 @@
+{ stdenv, lib, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libhugetlbfs";
+  version = "2.23";
+
+  src = fetchurl {
+    url = "https://github.com/libhugetlbfs/libhugetlbfs/releases/download/${version}/libhugetlbfs-${version}.tar.gz";
+    sha256 = "0ya4q001g111d3pqlzrf3yaifadl0ccirx5dndz1pih7x3qp41mp";
+  };
+
+  patches = [
+    (fetchurl {
+      url = "https://build.opensuse.org/public/source/openSUSE:Factory/libhugetlbfs/glibc-2.34-fix.patch?rev=50";
+      sha256 = "sha256-eRQa6M0ZdHMtwA5nnzDTWYv/x4AnRZhj+MpDiwyCvVM=";
+    })
+  ];
+
+  outputs = [ "bin" "dev" "man" "doc" "lib" "out" ];
+
+  postConfigure = ''
+    patchShebangs ld.hugetlbfs
+  '';
+
+  enableParallelBuilding = true;
+  makeFlags = [
+    "BUILDTYPE=NATIVEONLY"
+    "PREFIX=$(out)"
+    "HEADERDIR=$(dev)/include"
+    "LIBDIR32=$(lib)/$(LIB32)"
+    "LIBDIR64=$(lib)/$(LIB64)"
+    "EXEDIR=$(bin)/bin"
+    "DOCDIR=$(doc)/share/doc/libhugetlbfs"
+    "MANDIR=$(man)/share/man"
+  ] ++ lib.optionals (stdenv.buildPlatform.system != stdenv.hostPlatform.system) [
+    # The ARCH logic defaults to querying `uname`, which will return build platform arch
+    "ARCH=${stdenv.hostPlatform.uname.processor}"
+  ];
+
+  # Default target builds tests as well, and the tests want a static
+  # libc.
+  buildFlags = [ "libs" "tools" ];
+  installTargets = [ "install" "install-docs" ];
+
+  meta = with lib; {
+    description = "library and utilities for Linux hugepages";
+    maintainers = with maintainers; [ qyliss ];
+    license = licenses.lgpl21Plus;
+    platforms = platforms.linux;
+    badPlatforms = flatten [
+      systems.inspect.platformPatterns.isStatic
+      systems.inspect.patterns.isMusl
+    ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libhv/default.nix b/nixpkgs/pkgs/development/libraries/libhv/default.nix
new file mode 100644
index 000000000000..e48b836b7cd7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libhv/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, curl, openssl, Security }:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libhv";
+  version = "1.3.2";
+
+  src = fetchFromGitHub {
+    owner = "ithewei";
+    repo = "libhv";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-tVuQwj2HvAhp51urGCuNPjBEIaTu9yR031Ih/5or9Pk=";
+  };
+
+  patches = [
+    # Fix build failure on gcc-13:
+    #   https://github.com/ithewei/libhv/pull/490
+    (fetchpatch {
+      name = "gcc-13.patch";
+      url = "https://github.com/ithewei/libhv/commit/b3e61519fbdbbb956fed275c0a849ba5d4d6e45c.patch";
+      hash = "sha256-fuYI+B3qZkSAbLZc0p6/0fnqaHx6w9N9vhTEE2t6UUs=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ curl openssl ] ++ lib.optional stdenv.isDarwin Security;
+
+  cmakeFlags = [
+    "-DENABLE_UDS=ON"
+    "-DWITH_MQTT=ON"
+    "-DWITH_CURL=ON"
+    "-DWITH_NGHTTP2=ON"
+    "-DWITH_OPENSSL=ON"
+    "-DWITH_KCP=ON"
+  ];
+
+  meta = with lib; {
+    description = "A c/c++ network library for developing TCP/UDP/SSL/HTTP/WebSocket/MQTT client/server";
+    homepage = "https://github.com/ithewei/libhv";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ sikmir ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libhwy/default.nix b/nixpkgs/pkgs/development/libraries/libhwy/default.nix
new file mode 100644
index 000000000000..664378d42b6d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libhwy/default.nix
@@ -0,0 +1,73 @@
+{ lib
+, stdenv
+, cmake
+, ninja
+, gtest
+, fetchFromGitHub
+, fetchpatch
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libhwy";
+  version = "1.0.7";
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "highway";
+    rev = version;
+    hash = "sha256-Z+mAR9nSAbCskUvo6oK79Yd85bu0HtI2aR5THS1EozM=";
+  };
+
+  patches = lib.optional stdenv.hostPlatform.isRiscV
+    # Adds CMake option HWY_CMAKE_RVV
+    # https://github.com/google/highway/pull/1743
+    (fetchpatch {
+      name = "libhwy-add-rvv-optout.patch";
+      url = "https://github.com/google/highway/commit/5d58d233fbcec0c6a39df8186a877329147324b3.patch";
+      hash = "sha256-ileSNYddOt1F5rooRB0fXT20WkVlnG+gP5w7qJdBuww=";
+    });
+
+  nativeBuildInputs = [ cmake ninja ];
+
+  # Required for case-insensitive filesystems ("BUILD" exists)
+  dontUseCmakeBuildDir = true;
+
+  cmakeFlags = let
+    libExt = stdenv.hostPlatform.extensions.library;
+  in [
+    "-GNinja"
+    "-DCMAKE_INSTALL_LIBDIR=lib"
+    "-DCMAKE_INSTALL_INCLUDEDIR=include"
+  ] ++ lib.optionals doCheck [
+    "-DHWY_SYSTEM_GTEST:BOOL=ON"
+    "-DGTEST_INCLUDE_DIR=${lib.getDev gtest}/include"
+    "-DGTEST_LIBRARY=${lib.getLib gtest}/lib/libgtest${libExt}"
+    "-DGTEST_MAIN_LIBRARY=${lib.getLib gtest}/lib/libgtest_main${libExt}"
+  ] ++ lib.optionals stdenv.hostPlatform.isAarch32 [
+    "-DHWY_CMAKE_ARM7=ON"
+  ] ++ lib.optionals stdenv.hostPlatform.isx86_32 [
+    # Quoting CMakelists.txt:
+    #   This must be set on 32-bit x86 with GCC < 13.1, otherwise math_test will be
+    #   skipped. For GCC 13.1+, you can also build with -fexcess-precision=standard.
+    # Fixes tests:
+    #   HwyMathTestGroup/HwyMathTest.TestAllAtanh/EMU128
+    #   HwyMathTestGroup/HwyMathTest.TestAllLog1p/EMU128
+    "-DHWY_CMAKE_SSE2=ON"
+  ] ++ lib.optionals stdenv.hostPlatform.isRiscV [
+    # Runtime dispatch is not implemented https://github.com/google/highway/issues/838
+    # so tests (and likely normal operation) fail with SIGILL on processors without V.
+    # Until the issue is resolved, we disable RVV completely.
+    "-DHWY_CMAKE_RVV=OFF"
+  ];
+
+  # hydra's darwin machines run into https://github.com/libjxl/libjxl/issues/408
+  doCheck = !stdenv.hostPlatform.isDarwin;
+
+  meta = with lib; {
+    description = "Performance-portable, length-agnostic SIMD with runtime dispatch";
+    homepage = "https://github.com/google/highway";
+    license = with licenses; [ asl20 bsd3 ];
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ zhaofengli ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libiberty/default.nix b/nixpkgs/pkgs/development/libraries/libiberty/default.nix
new file mode 100644
index 000000000000..2040ef3bee08
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libiberty/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, buildPackages
+, staticBuild ? stdenv.hostPlatform.isStatic
+}:
+
+let inherit (buildPackages.buildPackages) gcc; in
+
+stdenv.mkDerivation {
+  pname = "libiberty";
+  version = "${gcc.cc.version}";
+
+  inherit (gcc.cc) src;
+
+  outputs = [ "out" "dev" ];
+
+  postUnpack = "sourceRoot=\${sourceRoot}/libiberty";
+
+  configureFlags = [ "--enable-install-libiberty" ]
+    ++ lib.optional (!staticBuild) "--enable-shared";
+
+  postInstall = lib.optionalString (!staticBuild) ''
+    cp pic/libiberty.a $out/lib*/libiberty.a
+  '';
+
+  meta = with lib; {
+    homepage = "https://gcc.gnu.org/";
+    license = licenses.lgpl2;
+    description = "Collection of subroutines used by various GNU programs";
+    maintainers = with maintainers; [ abbradar ericson2314 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libibmad/default.nix b/nixpkgs/pkgs/development/libraries/libibmad/default.nix
new file mode 100644
index 000000000000..9088d9022069
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libibmad/default.nix
@@ -0,0 +1,19 @@
+{ lib, stdenv, fetchurl, libibumad }:
+
+stdenv.mkDerivation rec {
+  pname = "libibmad";
+  version = "1.3.13";
+
+  src = fetchurl {
+    url = "https://www.openfabrics.org/downloads/management/${pname}-${version}.tar.gz";
+    sha256 = "02sj8k2jpcbiq8s0l2lqk4vwji2dbb2lc730cv1yzv0zr0hxgk8p";
+  };
+
+  buildInputs = [ libibumad ];
+
+  meta = with lib; {
+    homepage = "https://www.openfabrics.org/";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libibumad/default.nix b/nixpkgs/pkgs/development/libraries/libibumad/default.nix
new file mode 100644
index 000000000000..b9ebef7d4ccb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libibumad/default.nix
@@ -0,0 +1,17 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libibumad";
+  version = "1.3.10.2";
+
+  src = fetchurl {
+    url = "https://www.openfabrics.org/downloads/management/${pname}-${version}.tar.gz";
+    sha256 = "0bkygb3lbpaj6s4vsyixybrrkcnilbijv4ga5p1xdwyr3gip83sh";
+  };
+
+  meta = with lib; {
+    homepage = "https://www.openfabrics.org/";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libical/default.nix b/nixpkgs/pkgs/development/libraries/libical/default.nix
new file mode 100644
index 000000000000..243c26af8e58
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libical/default.nix
@@ -0,0 +1,112 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, pkgsBuildBuild
+, pkgsBuildHost
+, cmake
+, glib
+, icu
+, libxml2
+, ninja
+, perl
+, pkg-config
+, libical
+, python3
+, tzdata
+, fixDarwinDylibNames
+, withIntrospection ? stdenv.hostPlatform.emulatorAvailable pkgsBuildHost
+, gobject-introspection
+, vala
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libical";
+  version = "3.0.17";
+
+  outputs = [ "out" "dev" ]; # "devdoc" ];
+
+  src = fetchFromGitHub {
+    owner = "libical";
+    repo = "libical";
+    rev = "v${version}";
+    sha256 = "sha256-GqPCjI40kkqNv9zTnLdJgZVBxS4eZRHl+k/BN9vGnDo=";
+  };
+
+  strictDeps = true;
+
+  depsBuildBuild = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    # provides ical-glib-src-generator that runs during build
+    libical
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    ninja
+    perl
+    pkg-config
+  ] ++ lib.optionals withIntrospection [
+    gobject-introspection
+    vala
+    # Docs building fails:
+    # https://github.com/NixOS/nixpkgs/pull/67204
+    # previously with https://github.com/NixOS/nixpkgs/pull/61657#issuecomment-495579489
+    # gtk-doc docbook_xsl docbook_xml_dtd_43 # for docs
+  ] ++ lib.optionals stdenv.isDarwin [
+    fixDarwinDylibNames
+  ];
+  nativeInstallCheckInputs = [
+    # running libical-glib tests
+    (python3.pythonOnBuildForHost.withPackages (pkgs: with pkgs; [
+      pygobject3
+    ]))
+  ];
+
+  buildInputs = [
+    glib
+    libxml2
+    icu
+  ];
+
+  cmakeFlags = [
+    "-DENABLE_GTK_DOC=False"
+    "-DGOBJECT_INTROSPECTION=${if withIntrospection then "True" else "False"}"
+    "-DICAL_GLIB_VAPI=${if withIntrospection then "True" else "False"}"
+  ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "-DIMPORT_ICAL_GLIB_SRC_GENERATOR=${lib.getDev pkgsBuildBuild.libical}/lib/cmake/LibIcal/IcalGlibSrcGenerator.cmake"
+  ];
+
+  patches = [
+    # Will appear in 3.1.0
+    # https://github.com/libical/libical/issues/350
+    ./respect-env-tzdir.patch
+  ];
+
+  # Using install check so we do not have to manually set
+  # LD_LIBRARY_PATH and GI_TYPELIB_PATH variables
+  # Musl does not support TZDIR.
+  doInstallCheck = !stdenv.hostPlatform.isMusl;
+  enableParallelChecking = false;
+  preInstallCheck = if stdenv.isDarwin then ''
+    for testexe in $(find ./src/test -maxdepth 1 -type f -executable); do
+      for lib in $(cd lib && ls *.3.dylib); do
+        install_name_tool -change $lib $out/lib/$lib $testexe
+      done
+    done
+  '' else null;
+  installCheckPhase = ''
+    runHook preInstallCheck
+
+    export TZDIR=${tzdata}/share/zoneinfo
+    ctest --output-on-failure
+
+    runHook postInstallCheck
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/libical/libical";
+    description = "An Open Source implementation of the iCalendar protocols";
+    changelog = "https://github.com/libical/libical/raw/v${version}/ReleaseNotes.txt";
+    license = licenses.mpl20;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libical/respect-env-tzdir.patch b/nixpkgs/pkgs/development/libraries/libical/respect-env-tzdir.patch
new file mode 100644
index 000000000000..59d23e490e5a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libical/respect-env-tzdir.patch
@@ -0,0 +1,29 @@
+--- a/src/libical/icaltz-util.c
++++ b/src/libical/icaltz-util.c
+@@ -94,9 +94,9 @@
+ static const char *zdir = NULL;
+ 
+ static const char *search_paths[] = {
++    "/etc/zoneinfo",
+     "/usr/share/zoneinfo",
+     "/usr/lib/zoneinfo",
+-    "/etc/zoneinfo",
+     "/usr/share/lib/zoneinfo"
+ };
+ 
+@@ -178,6 +178,15 @@
+     const char *fname = ZONES_TAB_SYSTEM_FILENAME;
+     size_t i, num_search_paths;
+ 
++   const char *env_tzdir = getenv ("TZDIR");
++   if (env_tzdir) {
++       sprintf (file_path, "%s/%s", env_tzdir, fname);
++       if (!access (file_path, F_OK|R_OK)) {
++           zdir = env_tzdir;
++           return;
++       }
++   }
++
+     num_search_paths = sizeof(search_paths) / sizeof(search_paths[0]);
+     for (i = 0; i < num_search_paths; i++) {
+         snprintf(file_path, MAXPATHLEN, "%s/%s", search_paths[i], fname);
diff --git a/nixpkgs/pkgs/development/libraries/libicns/default.nix b/nixpkgs/pkgs/development/libraries/libicns/default.nix
new file mode 100644
index 000000000000..fc2fa9b66487
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libicns/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchgit, autoreconfHook, pkg-config, libpng, openjpeg, zlib }:
+
+stdenv.mkDerivation {
+  pname = "libicns";
+  version = "0.8.1-unstable-2022-04-10";
+
+  src = fetchgit {
+    name = "libicns";
+    url = "https://git.code.sf.net/p/icns/code";
+    rev = "921f972c461c505e5ac981aaddbdfdde97e8bb2b";
+    hash = "sha256-YeO0rlTujDNmrdJ3DRyl3TORswF2KFKA+wVUxJo8Dno";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ libpng openjpeg zlib ];
+
+  meta = with lib; {
+    description = "Library for manipulation of the Mac OS icns resource format";
+    homepage = "https://icns.sourceforge.io";
+    license = with licenses; [ gpl2 lgpl2 lgpl21 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libiconv/default.nix b/nixpkgs/pkgs/development/libraries/libiconv/default.nix
new file mode 100644
index 000000000000..44f4b025e50e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libiconv/default.nix
@@ -0,0 +1,88 @@
+{ fetchurl, stdenv, lib
+, enableStatic ? stdenv.hostPlatform.isStatic
+, enableShared ? !stdenv.hostPlatform.isStatic
+, enableDarwinABICompat ? false
+}:
+
+# assert !stdenv.hostPlatform.isLinux || stdenv.hostPlatform != stdenv.buildPlatform; # TODO: improve on cross
+
+stdenv.mkDerivation rec {
+  pname = "libiconv";
+  version = "1.17";
+
+  src = fetchurl {
+    url = "mirror://gnu/libiconv/${pname}-${version}.tar.gz";
+    sha256 = "sha256-j3QhO1YjjIWlClMp934GGYdx5w3Zpzl3n0wC9l2XExM=";
+  };
+
+  enableParallelBuilding = true;
+
+  setupHooks = [
+    ../../../build-support/setup-hooks/role.bash
+    ./setup-hook.sh
+  ];
+
+  postPatch =
+    lib.optionalString ((stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.isMinGW) || stdenv.cc.nativeLibc)
+      ''
+        sed '/^_GL_WARN_ON_USE (gets/d' -i srclib/stdio.in.h
+      ''
+    + lib.optionalString (!enableShared) ''
+      sed -i -e '/preload/d' Makefile.in
+    ''
+    # The system libiconv is based on libiconv 1.11 with some ABI differences. The following changes
+    # build a compatible libiconv on Darwin, allowing it to be sustituted in place of the system one
+    # using `install_name_tool`. This removes the need to for a separate, Darwin-specific libiconv
+    # derivation and allows Darwin to benefit from upstream updates and fixes.
+    + lib.optionalString enableDarwinABICompat ''
+      for iconv_h_in in iconv.h.in iconv.h.build.in; do
+        substituteInPlace "include/$iconv_h_in" \
+          --replace "#define iconv libiconv" "" \
+          --replace "#define iconv_close libiconv_close" "" \
+          --replace "#define iconv_open libiconv_open" "" \
+          --replace "#define iconv_open_into libiconv_open_into" "" \
+          --replace "#define iconvctl libiconvctl" "" \
+          --replace "#define iconvlist libiconvlist" ""
+      done
+    '';
+
+  # This is hacky, but `libiconv.dylib` needs to reexport `libcharset.dylib` to match the behavior
+  # of the system libiconv on Darwin. Trying to do this by modifying the `Makefile` results in an
+  # error linking `iconv` because `libcharset.dylib` is not at its final path yet. Avoid the error
+  # by building without the reexport then clean and rebuild `libiconv.dylib` with the reexport.
+  #
+  # For an explanation why `libcharset.dylib` is reexported, see:
+  # https://github.com/apple-oss-distributions/libiconv/blob/a167071feb7a83a01b27ec8d238590c14eb6faff/xcodeconfig/libiconv.xcconfig
+  postBuild = lib.optionalString enableDarwinABICompat ''
+    make clean -C lib
+    NIX_CFLAGS_COMPILE+=" -Wl,-reexport-lcharset -L. " make -C lib -j$NIX_BUILD_CORES SHELL=$SHELL
+  '';
+
+  configureFlags = [
+    (lib.enableFeature enableStatic "static")
+    (lib.enableFeature enableShared "shared")
+  ] ++ lib.optional stdenv.isFreeBSD "--with-pic";
+
+  meta = {
+    description = "An iconv(3) implementation";
+
+    longDescription = ''
+      Some programs, like mailers and web browsers, must be able to convert
+      between a given text encoding and the user's encoding.  Other programs
+      internally store strings in Unicode, to facilitate internal processing,
+      and need to convert between internal string representation (Unicode)
+      and external string representation (a traditional encoding) when they
+      are doing I/O.  GNU libiconv is a conversion library for both kinds of
+      applications.
+    '';
+
+    homepage = "https://www.gnu.org/software/libiconv/";
+    license = lib.licenses.lgpl2Plus;
+
+    maintainers = [ ];
+    mainProgram = "iconv";
+
+    # This library is not needed on GNU platforms.
+    hydraPlatforms = with lib.platforms; cygwin ++ darwin ++ freebsd;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libiconv/setup-hook.sh b/nixpkgs/pkgs/development/libraries/libiconv/setup-hook.sh
new file mode 100644
index 000000000000..3d9656ffe5d6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libiconv/setup-hook.sh
@@ -0,0 +1,8 @@
+# libiconv must be listed in load flags on non-Glibc
+# it doesn't hurt to have it in Glibc either though
+
+# See pkgs/build-support/setup-hooks/role.bash
+if [ -z "${dontAddExtraLibs-}" ]; then
+    getHostRole
+    export NIX_LDFLAGS${role_post}+=" -liconv"
+fi
diff --git a/nixpkgs/pkgs/development/libraries/libid3tag/CVE-2017-11550-and-CVE-2017-11551.patch b/nixpkgs/pkgs/development/libraries/libid3tag/CVE-2017-11550-and-CVE-2017-11551.patch
new file mode 100644
index 000000000000..b1f9d0978cec
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libid3tag/CVE-2017-11550-and-CVE-2017-11551.patch
@@ -0,0 +1,13 @@
+Common subdirectories: libid3tag-0.15.1b/msvc++ and libid3tag-0.15.1b-patched/msvc++
+diff -uwp libid3tag-0.15.1b/utf16.c libid3tag-0.15.1b-patched/utf16.c
+--- libid3tag-0.15.1b/utf16.c	2004-01-23 10:41:32.000000000 +0100
++++ libid3tag-0.15.1b-patched/utf16.c	2018-11-01 13:12:00.866050641 +0100
+@@ -250,6 +250,8 @@ id3_ucs4_t *id3_utf16_deserialize(id3_by
+   id3_ucs4_t *ucs4;
+ 
+   end = *ptr + (length & ~1);
++  if (end == *ptr)
++    return 0;
+ 
+   utf16 = malloc((length / 2 + 1) * sizeof(*utf16));
+   if (utf16 == 0)
diff --git a/nixpkgs/pkgs/development/libraries/libid3tag/debian-patches.patch b/nixpkgs/pkgs/development/libraries/libid3tag/debian-patches.patch
new file mode 100644
index 000000000000..0a828b334cf8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libid3tag/debian-patches.patch
@@ -0,0 +1,89 @@
+diff --git a/compat.gperf b/compat.gperf
+index 4e24613..5635980 100644
+--- a/compat.gperf
++++ b/compat.gperf
+@@ -236,6 +236,10 @@ int id3_compat_fixup(struct id3_tag *tag)
+
+     encoding = id3_parse_uint(&data, 1);
+     string   = id3_parse_string(&data, end - data, encoding, 0);
++    if (!string)
++    {
++	continue;
++    }
+
+     if (id3_ucs4_length(string) < 4) {
+       free(string);
+diff --git a/genre.dat b/genre.dat
+index 17acab5..1f02779 100644
+--- a/genre.dat
++++ b/genre.dat
+@@ -277,8 +277,8 @@ static id3_ucs4_t const genre_PUNK_ROCK[] =
+   { 'P', 'u', 'n', 'k', ' ', 'R', 'o', 'c', 'k', 0 };
+ static id3_ucs4_t const genre_DRUM_SOLO[] =
+   { 'D', 'r', 'u', 'm', ' ', 'S', 'o', 'l', 'o', 0 };
+-static id3_ucs4_t const genre_A_CAPPELLA[] =
+-  { 'A', ' ', 'C', 'a', 'p', 'p', 'e', 'l', 'l', 'a', 0 };
++static id3_ucs4_t const genre_A_CAPELLA[] =
++  { 'A', ' ', 'C', 'a', 'p', 'e', 'l', 'l', 'a', 0 };
+ static id3_ucs4_t const genre_EURO_HOUSE[] =
+   { 'E', 'u', 'r', 'o', '-', 'H', 'o', 'u', 's', 'e', 0 };
+ static id3_ucs4_t const genre_DANCE_HALL[] =
+@@ -452,7 +452,7 @@ static id3_ucs4_t const *const genre_table[] = {
+   genre_DUET,
+   genre_PUNK_ROCK,
+   genre_DRUM_SOLO,
+-  genre_A_CAPPELLA,
++  genre_A_CAPELLA,
+   genre_EURO_HOUSE,
+   genre_DANCE_HALL,
+   genre_GOA,
+diff --git a/genre.dat.in b/genre.dat.in
+index 872de40..e71e34b 100644
+--- a/genre.dat.in
++++ b/genre.dat.in
+@@ -153,7 +153,7 @@ Freestyle
+ Duet
+ Punk Rock
+ Drum Solo
+-A Cappella
++A Capella
+ Euro-House
+ Dance Hall
+ Goa
+diff --git a/parse.c b/parse.c
+index 86a3f21..947c249 100644
+--- a/parse.c
++++ b/parse.c
+@@ -165,6 +165,9 @@ id3_ucs4_t *id3_parse_string(id3_byte_t const **ptr, id3_length_t length,
+   case ID3_FIELD_TEXTENCODING_UTF_8:
+     ucs4 = id3_utf8_deserialize(ptr, length);
+     break;
++  default:
++  	/* FIXME: Unknown encoding! Print warning? */
++	return NULL;
+   }
+
+   if (ucs4 && !full) {
+diff --git a/utf16.c b/utf16.c
+index 70ee9d5..6e60a75 100644
+--- a/utf16.c
++++ b/utf16.c
+@@ -282,5 +282,18 @@ id3_ucs4_t *id3_utf16_deserialize(id3_byte_t const **ptr, id3_length_t length,
+
+   free(utf16);
+
++  if (end == *ptr && length % 2 != 0)
++  {
++     /* We were called with a bogus length.  It should always
++      * be an even number.  We can deal with this in a few ways:
++      * - Always give an error.
++      * - Try and parse as much as we can and
++      *   - return an error if we're called again when we
++      *     already tried to parse everything we can.
++      *   - tell that we parsed it, which is what we do here.
++      */
++     (*ptr)++;
++  }
++
+   return ucs4;
+ }
\ No newline at end of file
diff --git a/nixpkgs/pkgs/development/libraries/libid3tag/default.nix b/nixpkgs/pkgs/development/libraries/libid3tag/default.nix
new file mode 100644
index 000000000000..c8c9d8bf5103
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libid3tag/default.nix
@@ -0,0 +1,48 @@
+{ lib, stdenv, fetchurl, zlib, gperf_3_0 }:
+
+stdenv.mkDerivation rec {
+  pname = "libid3tag";
+  version = "0.15.1b";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/mad/libid3tag-${version}.tar.gz";
+    sha256 = "63da4f6e7997278f8a3fef4c6a372d342f705051d1eeb6a46a86b03610e26151";
+  };
+
+  outputs = [ "out" "dev" ];
+  setOutputFlags = false;
+
+  strictDeps = true;
+
+  nativeBuildInputs = [ gperf_3_0 ];
+
+  buildInputs = [ zlib ];
+
+  patches = [
+    ./debian-patches.patch
+    ./CVE-2017-11550-and-CVE-2017-11551.patch
+  ];
+
+  preConfigure = ''
+    configureFlagsArray+=(
+      --includedir=$dev/include
+    )
+  '';
+
+  postInstall = ''
+    mkdir -p $dev/lib/pkgconfig
+    cp ${./id3tag.pc} $dev/lib/pkgconfig/id3tag.pc
+    substituteInPlace $dev/lib/pkgconfig/id3tag.pc \
+      --subst-var-by out $out \
+      --subst-var-by dev $dev \
+      --subst-var-by version "${version}"
+  '';
+
+  meta = with lib; {
+    description = "ID3 tag manipulation library";
+    homepage = "https://mad.sourceforge.net/";
+    license = licenses.gpl2;
+    maintainers = [ ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libid3tag/id3tag.pc b/nixpkgs/pkgs/development/libraries/libid3tag/id3tag.pc
new file mode 100644
index 000000000000..e3df7b3f9df0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libid3tag/id3tag.pc
@@ -0,0 +1,11 @@
+prefix=@out@
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=@dev@/include
+
+Name: libid3tag
+Description: ID3 tag manipulation library
+Version: @version@
+
+Libs: -L${libdir} -lid3tag
+Cflags: -I${includedir}
diff --git a/nixpkgs/pkgs/development/libraries/libidn/default.nix b/nixpkgs/pkgs/development/libraries/libidn/default.nix
new file mode 100644
index 000000000000..da37ef781b35
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libidn/default.nix
@@ -0,0 +1,47 @@
+{ fetchurl, lib, stdenv, libiconv
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libidn";
+  version = "1.42";
+
+  src = fetchurl {
+    url = "mirror://gnu/libidn/${finalAttrs.pname}-${finalAttrs.version}.tar.gz";
+    sha256 = "sha256-1sGZ3NgG5P4nk2DLSwg0mg05Vg7VSP/RzK3ajN7LRyM=";
+  };
+
+  outputs = [ "bin" "dev" "out" "info" "devdoc" ];
+
+  hardeningDisable = [ "format" ];
+
+  buildInputs = lib.optional stdenv.isDarwin libiconv;
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = {
+    homepage = "https://www.gnu.org/software/libidn/";
+    description = "Library for internationalized domain names";
+
+    longDescription = ''
+      GNU Libidn is a fully documented implementation of the
+      Stringprep, Punycode and IDNA specifications.  Libidn's purpose
+      is to encode and decode internationalized domain names.  The
+      native C, C\# and Java libraries are available under the GNU
+      Lesser General Public License version 2.1 or later.
+
+      The library contains a generic Stringprep implementation.
+      Profiles for Nameprep, iSCSI, SASL, XMPP and Kerberos V5 are
+      included.  Punycode and ASCII Compatible Encoding (ACE) via IDNA
+      are supported.  A mechanism to define Top-Level Domain (TLD)
+      specific validation tables, and to compare strings against those
+      tables, is included.  Default tables for some TLDs are also
+      included.
+    '';
+
+    license = lib.licenses.lgpl2Plus;
+    pkgConfigModules = [ "libidn" ];
+    platforms = lib.platforms.all;
+    maintainers = with lib.maintainers; [ lsix ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libidn2/default.nix b/nixpkgs/pkgs/development/libraries/libidn2/default.nix
new file mode 100644
index 000000000000..8fcbe42650fc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libidn2/default.nix
@@ -0,0 +1,46 @@
+{ fetchurl, lib, stdenv, libiconv, libunistring, help2man, texinfo, buildPackages }:
+
+# Note: this package is used for bootstrapping fetchurl, and thus
+# cannot use fetchpatch! All mutable patches (generated by GitHub or
+# cgit) that are needed here should be included directly in Nixpkgs as
+# files.
+
+stdenv.mkDerivation rec {
+  pname = "libidn2";
+  version = "2.3.7";
+
+  src = fetchurl {
+    url = "https://ftp.gnu.org/gnu/libidn/${pname}-${version}.tar.gz";
+    hash = "sha256-TCGnkbYQuVGbnQ4SuAl78vNZsS+N2SZHYRqSnmv9fWQ=";
+  };
+
+  strictDeps = true;
+  # Beware: non-bootstrap libidn2 is overridden by ./hack.nix
+  outputs = [ "bin" "dev" "out" "info" "devdoc" ];
+
+  enableParallelBuilding = true;
+
+  # The above patch causes the documentation to be regenerated, so the
+  # documentation tools are required.
+  nativeBuildInputs = lib.optionals stdenv.isDarwin [ help2man texinfo ];
+  buildInputs = [ libunistring ] ++ lib.optional stdenv.isDarwin libiconv;
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+
+  meta = {
+    homepage = "https://www.gnu.org/software/libidn/#libidn2";
+    description = "Free software implementation of IDNA2008 and TR46";
+
+    longDescription = ''
+      Libidn2 is believed to be a complete IDNA2008 and TR46 implementation,
+      but has yet to be as extensively used as the IDNA2003 Libidn library.
+
+      The installed C library libidn2 is dual-licensed under LGPLv3+|GPLv2+,
+      while the rest of the package is GPLv3+.  See the file COPYING for
+      detailed information.
+    '';
+
+    license = with lib.licenses; [ lgpl3Plus gpl2Plus gpl3Plus ];
+    platforms = lib.platforms.all;
+    maintainers = with lib.maintainers; [ fpletz ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libidn2/no-bootstrap-reference.nix b/nixpkgs/pkgs/development/libraries/libidn2/no-bootstrap-reference.nix
new file mode 100644
index 000000000000..e5922073437d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libidn2/no-bootstrap-reference.nix
@@ -0,0 +1,30 @@
+{ stdenv, lib, libidn2, libunistring, runCommandLocal, patchelf }:
+# Construct a copy of libidn2.* where all (transitive) libc references (in .bin)
+# get replaced by a new one, so that there's no reference to bootstrap tools.
+runCommandLocal
+  "${libidn2.pname}-${libidn2.version}"
+  {
+    outputs = [ "bin" "dev" "out" ];
+    passthru = {
+      inherit (libidn2) out info devdoc; # no need to touch these store paths
+    };
+  }
+  ''
+    cp -r '${libidn2.bin}' "$bin"
+    chmod +w "$bin"/bin/*
+    patchelf \
+      --set-interpreter '${stdenv.cc.bintools.dynamicLinker}' \
+      --set-rpath '${lib.concatMapStringsSep ":" (p: lib.getLib p + "/lib")
+                      [ stdenv.cc.libc libunistring libidn2 ]}' \
+      "$bin"/bin/*
+
+    cp -r '${libidn2.dev}' "$dev"
+    chmod +w "$dev"/nix-support/propagated-build-inputs
+    substituteInPlace "$dev"/nix-support/propagated-build-inputs \
+      --replace '${libidn2.bin}' "$bin"
+    substituteInPlace "$dev"/lib/pkgconfig/libidn2.pc \
+      --replace '${libidn2.dev}' "$dev"
+
+    ln -s '${libidn2.out}' "$out" # it's hard to be without any $out
+  ''
+
diff --git a/nixpkgs/pkgs/development/libraries/libiec61883/default.nix b/nixpkgs/pkgs/development/libraries/libiec61883/default.nix
new file mode 100644
index 000000000000..911210202fe0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libiec61883/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchurl, pkg-config, libraw1394 }:
+
+stdenv.mkDerivation rec {
+  version = "1.2.0";
+  pname = "libiec61883";
+
+  src = fetchurl {
+    url = "mirror://debian/pool/main/libi/libiec61883/libiec61883_${version}.orig.tar.gz";
+    name = "libiec61883-${version}.tar.gz";
+    sha256 = "7c7879c6b9add3148baea697dfbfdcefffbc8ac74e8e6bcf46125ec1d21b373a";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  propagatedBuildInputs = [ libraw1394 ];
+
+  meta = with lib; {
+    homepage = "https://www.linux1394.org";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libieee1284/default.nix b/nixpkgs/pkgs/development/libraries/libieee1284/default.nix
new file mode 100644
index 000000000000..a2cbd6e4096f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libieee1284/default.nix
@@ -0,0 +1,48 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch
+, autoconf, automake, libtool, xmlto, docbook_xml_dtd_412, docbook_xsl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libieee1284";
+  version = "0.2.11";
+
+  src = fetchFromGitHub {
+    owner = "twaugh";
+    repo = pname;
+    rev = "V${builtins.replaceStrings [ "." ] [ "_" ] version}";
+    sha256 = "0wfv1prmhhpyll9l4g1ij3im7hk9mm96ydw3l9fvhjp3993cdn2x";
+  };
+
+  patches = [
+    # Fix build on Musl.
+    (fetchpatch {
+      url = "https://raw.githubusercontent.com/void-linux/void-packages/861ac185a6b60134292ff93d40e40b5391d0aa8e/srcpkgs/libieee1284/patches/musl.patch";
+      sha256 = "03xivd6z7m51i5brlmzs60pjrlqyr4561qlnh182wa7rrm01x5y6";
+    })
+  ];
+
+  nativeBuildInputs = [
+    autoconf
+    automake
+    libtool
+    xmlto
+    docbook_xml_dtd_412
+    docbook_xsl
+  ];
+
+  configureFlags = [
+    "--without-python"
+  ];
+
+  prePatch = ''
+    ./bootstrap
+  '';
+
+  meta = with lib; {
+    description = "Parallel port communication library";
+    homepage = "http://cyberelk.net/tim/software/libieee1284/";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ romildo ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libiio/cmake-fix-libxml2-find-package.patch b/nixpkgs/pkgs/development/libraries/libiio/cmake-fix-libxml2-find-package.patch
new file mode 100644
index 000000000000..034f6d32c7d1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libiio/cmake-fix-libxml2-find-package.patch
@@ -0,0 +1,13 @@
+diff --color -ur a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt	2022-06-02 02:57:01.503340155 +0300
++++ b/CMakeLists.txt	2022-06-02 02:54:33.726941188 +0300
+@@ -378,7 +378,7 @@
+ 	# So, try first to find the CMake module provided by libxml2 package, then fallback
+ 	# on the CMake's FindLibXml2.cmake module (which can lack some definition, especially
+ 	# in static build case).
+-	find_package(LibXml2 QUIET NO_MODULE)
++	find_package(LibXml2 QUIET MODULE)
+ 	if(DEFINED LIBXML2_VERSION_STRING)
+ 		set(LIBXML2_FOUND ON)
+ 		set(LIBXML2_INCLUDE_DIR ${LIBXML2_INCLUDE_DIRS})
+Seulement dans b: good.patch
diff --git a/nixpkgs/pkgs/development/libraries/libiio/default.nix b/nixpkgs/pkgs/development/libraries/libiio/default.nix
new file mode 100644
index 000000000000..8adc01512040
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libiio/default.nix
@@ -0,0 +1,85 @@
+{ stdenv
+, fetchFromGitHub
+, cmake
+, flex
+, bison
+, libxml2
+, pythonSupport ? stdenv.hostPlatform.hasSharedLibraries, python
+, libusb1
+, avahiSupport ? true, avahi
+, libaio
+, runtimeShell
+, lib
+, pkg-config
+, CFNetwork
+, CoreServices
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libiio";
+  version = "0.24";
+
+  outputs = [ "out" "lib" "dev" ]
+    ++ lib.optional pythonSupport "python";
+
+  src = fetchFromGitHub {
+    owner = "analogdevicesinc";
+    repo = "libiio";
+    rev = "v${version}";
+    sha256 = "sha256-c5HsxCdp1cv5BGTQ/8dc8J893zk9ntbfAudLpqoQ1ow=";
+  };
+
+  # Revert after https://github.com/NixOS/nixpkgs/issues/125008 is
+  # fixed properly
+  patches = [ ./cmake-fix-libxml2-find-package.patch ];
+
+  nativeBuildInputs = [
+    cmake
+    flex
+    bison
+    pkg-config
+  ] ++ lib.optionals pythonSupport ([
+    python
+  ] ++ lib.optional python.isPy3k python.pkgs.setuptools);
+
+  buildInputs = [
+    libxml2
+    libusb1
+  ] ++ lib.optional avahiSupport avahi
+    ++ lib.optional stdenv.isLinux libaio
+    ++ lib.optionals stdenv.isDarwin [ CFNetwork CoreServices ];
+
+  cmakeFlags = [
+    "-DUDEV_RULES_INSTALL_DIR=${placeholder "out"}/lib/udev/rules.d"
+    # osx framework is disabled,
+    # the linux-like directory structure is used for proper output splitting
+    "-DOSX_PACKAGE=off"
+    "-DOSX_FRAMEWORK=off"
+  ] ++ lib.optionals pythonSupport [
+    "-DPython_EXECUTABLE=${python.pythonOnBuildForHost.interpreter}"
+    "-DPYTHON_BINDINGS=on"
+  ] ++ lib.optionals (!avahiSupport) [
+    "-DHAVE_DNS_SD=OFF"
+  ];
+
+  postPatch = ''
+    substituteInPlace libiio.rules.cmakein \
+      --replace /bin/sh ${runtimeShell}
+  '' + lib.optionalString pythonSupport ''
+    # Hardcode path to the shared library into the bindings.
+    sed "s#@libiio@#$lib/lib/libiio${stdenv.hostPlatform.extensions.sharedLibrary}#g" ${./hardcode-library-path.patch} | patch -p1
+  '';
+
+  postInstall = lib.optionalString pythonSupport ''
+    # Move Python bindings into a separate output.
+    moveToOutput ${python.sitePackages} "$python"
+  '';
+
+  meta = with lib; {
+    description = "API for interfacing with the Linux Industrial I/O Subsystem";
+    homepage = "https://github.com/analogdevicesinc/libiio";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.linux ++ platforms.darwin;
+    maintainers = with maintainers; [ thoughtpolice ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libiio/hardcode-library-path.patch b/nixpkgs/pkgs/development/libraries/libiio/hardcode-library-path.patch
new file mode 100644
index 000000000000..dad35851cdc6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libiio/hardcode-library-path.patch
@@ -0,0 +1,38 @@
+diff --git a/bindings/python/iio.py b/bindings/python/iio.py
+index 5306daa..f8962ee 100644
+--- a/bindings/python/iio.py
++++ b/bindings/python/iio.py
+@@ -229,9 +229,9 @@ if "Windows" in _system():
+     _iiolib = "libiio.dll"
+ else:
+     # Non-windows, possibly Posix system
+-    _iiolib = "iio"
++    _iiolib = "@libiio@"
+ 
+-_lib = _cdll(find_library(_iiolib), use_errno=True, use_last_error=True)
++_lib = _cdll(_iiolib, use_errno=True, use_last_error=True)
+ 
+ _get_backends_count = _lib.iio_get_backends_count
+ _get_backends_count.restype = c_uint
+diff --git a/bindings/python/setup.py.cmakein b/bindings/python/setup.py.cmakein
+index cd14e2e..516c409 100644
+--- a/bindings/python/setup.py.cmakein
++++ b/bindings/python/setup.py.cmakein
+@@ -62,7 +62,7 @@ class InstallWrapper(install):
+             _iiolib = "libiio.dll"
+         else:
+             # Non-windows, possibly Posix system
+-            _iiolib = "iio"
++            _iiolib = "@libiio@"
+         try:
+             import os
+ 
+@@ -72,7 +72,7 @@ class InstallWrapper(install):
+                 fulllibpath = find_recursive(destdir, "libiio.so")
+                 _lib = _cdll(fulllibpath, use_errno=True, use_last_error=True)
+             else:
+-                _lib = _cdll(find_library(_iiolib), use_errno=True, use_last_error=True)
++                _lib = _cdll(_iiolib, use_errno=True, use_last_error=True)
+             if not _lib._name:
+                 raise OSError
+         except OSError:
diff --git a/nixpkgs/pkgs/development/libraries/libimagequant/Cargo.lock b/nixpkgs/pkgs/development/libraries/libimagequant/Cargo.lock
new file mode 100644
index 000000000000..8e542f358693
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libimagequant/Cargo.lock
@@ -0,0 +1,285 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "adler"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
+
+[[package]]
+name = "ahash"
+version = "0.8.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+ "version_check",
+ "zerocopy",
+]
+
+[[package]]
+name = "arrayvec"
+version = "0.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
+
+[[package]]
+name = "bitflags"
+version = "2.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf"
+
+[[package]]
+name = "bytemuck"
+version = "1.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6"
+
+[[package]]
+name = "c_test"
+version = "0.1.0"
+dependencies = [
+ "cc",
+ "imagequant-sys",
+]
+
+[[package]]
+name = "cc"
+version = "1.0.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "crc32fast"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "crossbeam-deque"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d"
+dependencies = [
+ "crossbeam-epoch",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-epoch"
+version = "0.9.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
+dependencies = [
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-utils"
+version = "0.8.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345"
+
+[[package]]
+name = "either"
+version = "1.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
+
+[[package]]
+name = "fallible_collections"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a88c69768c0a15262df21899142bc6df9b9b823546d4b4b9a7bc2d6c448ec6fd"
+dependencies = [
+ "hashbrown",
+]
+
+[[package]]
+name = "flate2"
+version = "1.0.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e"
+dependencies = [
+ "crc32fast",
+ "miniz_oxide",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e"
+dependencies = [
+ "ahash",
+]
+
+[[package]]
+name = "imagequant"
+version = "4.3.0"
+dependencies = [
+ "arrayvec",
+ "lodepng",
+ "once_cell",
+ "rayon",
+ "rgb",
+ "thread_local",
+]
+
+[[package]]
+name = "imagequant-sys"
+version = "4.0.4"
+dependencies = [
+ "bitflags",
+ "imagequant",
+ "libc",
+]
+
+[[package]]
+name = "libc"
+version = "0.2.152"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7"
+
+[[package]]
+name = "lodepng"
+version = "3.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a42d298694b14401847de29abd44adf278b42e989e516deac7b72018400002d8"
+dependencies = [
+ "crc32fast",
+ "fallible_collections",
+ "flate2",
+ "libc",
+ "rgb",
+]
+
+[[package]]
+name = "miniz_oxide"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7"
+dependencies = [
+ "adler",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.19.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.78"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "rayon"
+version = "1.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051"
+dependencies = [
+ "either",
+ "rayon-core",
+]
+
+[[package]]
+name = "rayon-core"
+version = "1.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
+dependencies = [
+ "crossbeam-deque",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "rgb"
+version = "0.8.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05aaa8004b64fd573fc9d002f4e632d51ad4f026c2b5ba95fcb6c2f32c2c47d8"
+dependencies = [
+ "bytemuck",
+]
+
+[[package]]
+name = "syn"
+version = "2.0.48"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "thread_local"
+version = "1.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+]
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
+
+[[package]]
+name = "version_check"
+version = "0.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
+
+[[package]]
+name = "zerocopy"
+version = "0.7.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be"
+dependencies = [
+ "zerocopy-derive",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.7.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
diff --git a/nixpkgs/pkgs/development/libraries/libimagequant/default.nix b/nixpkgs/pkgs/development/libraries/libimagequant/default.nix
new file mode 100644
index 000000000000..8d8acfd835d0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libimagequant/default.nix
@@ -0,0 +1,67 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchurl
+, rust
+, rustPlatform
+, cargo-c
+, python3
+
+# tests
+, testers
+, vips
+, libimagequant
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "libimagequant";
+  version = "4.3.0";
+
+  src = fetchFromGitHub {
+    owner = "ImageOptim";
+    repo = "libimagequant";
+    rev = version;
+    hash = "sha256-/gHe3LQaBWOQImBesKvHK46T42TtRld988wgxbut4i0=";
+  };
+
+  cargoLock = {
+    lockFile = ./Cargo.lock;
+  };
+
+  postPatch = ''
+    ln -s ${./Cargo.lock} Cargo.lock
+  '';
+
+  nativeBuildInputs = [ cargo-c ];
+
+  postBuild = ''
+    pushd imagequant-sys
+    ${rust.envVars.setEnv} cargo cbuild --release --frozen --prefix=${placeholder "out"} --target ${stdenv.hostPlatform.rust.rustcTarget}
+    popd
+  '';
+
+  postInstall = ''
+    pushd imagequant-sys
+    ${rust.envVars.setEnv} cargo cinstall --release --frozen --prefix=${placeholder "out"} --target ${stdenv.hostPlatform.rust.rustcTarget}
+    popd
+  '';
+
+  passthru.tests = {
+    inherit vips;
+    inherit (python3.pkgs) pillow;
+
+    pkg-config = testers.hasPkgConfigModules {
+      package = libimagequant;
+      moduleNames = [ "imagequant" ];
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://pngquant.org/lib/";
+    description = "Image quantization library";
+    longDescription = "Small, portable C library for high-quality conversion of RGBA images to 8-bit indexed-color (palette) images.";
+    license = licenses.gpl3Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ ma9e marsam ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libime/default.nix b/nixpkgs/pkgs/development/libraries/libime/default.nix
new file mode 100644
index 000000000000..5f914485993a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libime/default.nix
@@ -0,0 +1,67 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchFromGitHub
+, cmake
+, extra-cmake-modules
+, boost
+, python3
+, fcitx5
+, zstd
+}:
+
+let
+  tableVer = "20240108";
+  table = fetchurl {
+    url = "https://download.fcitx-im.org/data/table-${tableVer}.tar.gz";
+    hash = "sha256-cpxZbYaQfecnx00Pw/0kHEBsXevStMt07v4CI4funa4=";
+  };
+  arpaVer = "20230712";
+  arpa = fetchurl {
+    url = "https://download.fcitx-im.org/data/lm_sc.arpa-${arpaVer}.tar.xz";
+    hash = "sha256-ut1iwWxjc3h6D9qPCc1FLRL2DVhohW9lHO7PGge6ujI=";
+  };
+  dictVer = "20230412";
+  dict = fetchurl {
+    url = "https://download.fcitx-im.org/data/dict-${dictVer}.tar.xz";
+    hash = "sha256-8F/Mr/loeQCqw9mtWoGyCIi1cyAUA/vNm7x5B9npdQc=";
+  };
+in
+stdenv.mkDerivation rec {
+  pname = "libime";
+  version = "1.1.5";
+
+  src = fetchFromGitHub {
+    owner = "fcitx";
+    repo = "libime";
+    rev = version;
+    hash = "sha256-AvlQOpjrHSifUtWSTft2bywlWhwka26VcqqReqAlcv8=";
+    fetchSubmodules = true;
+  };
+
+  prePatch = ''
+    ln -s ${table} data/$(stripHash ${table})
+    ln -s ${arpa} data/$(stripHash ${arpa})
+    ln -s ${dict} data/$(stripHash ${dict})
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    extra-cmake-modules
+    python3
+  ];
+
+  buildInputs = [
+    zstd
+    boost
+    fcitx5
+  ];
+
+  meta = with lib; {
+    description = "A library to support generic input method implementation";
+    homepage = "https://github.com/fcitx/libime";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ poscat ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libimobiledevice-glue/default.nix b/nixpkgs/pkgs/development/libraries/libimobiledevice-glue/default.nix
new file mode 100644
index 000000000000..5c602a4ee9aa
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libimobiledevice-glue/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+, libplist
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libimobiledevice-glue";
+  version = "1.0.0";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "libimobiledevice";
+    repo = pname;
+    rev = version;
+    hash = "sha256-9TjIYz6w61JaJgOJtWteIDk9bO3NnXp/2ZJwdirFcYM=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ];
+
+  propagatedBuildInputs = [
+    libplist
+  ];
+
+  preAutoreconf = ''
+    export RELEASE_VERSION=${version}
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/libimobiledevice/libimobiledevice-glue";
+    description = "Library with common code used by the libraries and tools around the libimobiledevice project";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ infinisil ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libimobiledevice/default.nix b/nixpkgs/pkgs/development/libraries/libimobiledevice/default.nix
new file mode 100644
index 000000000000..a229bb1fef08
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libimobiledevice/default.nix
@@ -0,0 +1,82 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, autoreconfHook
+, pkg-config
+, openssl
+, libgcrypt
+, libplist
+, libtasn1
+, libusbmuxd
+, libimobiledevice-glue
+, SystemConfiguration
+, CoreFoundation
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libimobiledevice";
+  version = "1.3.0+date=2023-04-30";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "libimobiledevice";
+    repo = pname;
+    rev = "860ffb707af3af94467d2ece4ad258dda957c6cd";
+    hash = "sha256-mIsB+EaGJlGMOpz3OLrs0nAmhOY1BwMs83saFBaejwc=";
+  };
+
+  patches = [
+    # Pull upstream fix for clang-16 and upcoming gcc-14 support:
+    #   https://github.com/libimobiledevice/libimobiledevice/pull/1444
+    (fetchpatch {
+      name = "usleep-decl.patch";
+      url = "https://github.com/libimobiledevice/libimobiledevice/commit/db623184c0aa09c27697f5a2e81025db223075d5.patch";
+      hash = "sha256-TgdgBkEDXzQDSgJxcZc+pZncfmBVXarhHOByGFs6p0Q=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ];
+
+  propagatedBuildInputs = [
+    openssl
+    libgcrypt
+    libplist
+    libtasn1
+    libusbmuxd
+    libimobiledevice-glue
+  ] ++ lib.optionals stdenv.isDarwin [
+    SystemConfiguration
+    CoreFoundation
+  ];
+
+  preAutoreconf = ''
+    export RELEASE_VERSION=${version}
+  '';
+
+  configureFlags = [ "--without-cython" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/libimobiledevice/libimobiledevice";
+    description = "A software library that talks the protocols to support iPhone®, iPod Touch® and iPad® devices on Linux";
+    longDescription = ''
+      libimobiledevice is a software library that talks the protocols to support
+      iPhone®, iPod Touch® and iPad® devices on Linux. Unlike other projects, it
+      does not depend on using any existing proprietary libraries and does not
+      require jailbreaking. It allows other software to easily access the
+      device's filesystem, retrieve information about the device and it's
+      internals, backup/restore the device, manage SpringBoard® icons, manage
+      installed applications, retrieve addressbook/calendars/notes and bookmarks
+      and synchronize music and video to the device. The library is in
+      development since August 2007 with the goal to bring support for these
+      devices to the Linux Desktop.
+    '';
+    license = licenses.lgpl21Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ infinisil ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libindicator/default.nix b/nixpkgs/pkgs/development/libraries/libindicator/default.nix
new file mode 100644
index 000000000000..99b6542fa3e8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libindicator/default.nix
@@ -0,0 +1,50 @@
+{ stdenv, fetchurl, lib, file
+, pkg-config, glib
+, gtkVersion ? "3", gtk2, gtk3 }:
+
+stdenv.mkDerivation rec {
+  pname = "libindicator-gtk${gtkVersion}";
+  version = "12.10.1";
+
+  src = fetchurl {
+    url = "https://launchpad.net/libindicator/${lib.versions.majorMinor version}/${version}/+download/libindicator-${version}.tar.gz";
+    sha256 = "b2d2e44c10313d5c9cd60db455d520f80b36dc39562df079a3f29495e8f9447f";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [ pkg-config glib ];
+
+  buildInputs = [ (if gtkVersion == "2" then gtk2 else gtk3) ];
+
+  postPatch = ''
+    substituteInPlace configure \
+      --replace 'LIBINDICATOR_LIBS+="$LIBM"' 'LIBINDICATOR_LIBS+=" $LIBM"'
+    for f in {build-aux/ltmain.sh,configure,m4/libtool.m4}; do
+      substituteInPlace $f\
+        --replace /usr/bin/file ${file}/bin/file
+    done
+  '';
+
+  configureFlags = [
+    "CFLAGS=-Wno-error"
+    "--sysconfdir=/etc"
+    "--localstatedir=/var"
+    "--with-gtk=${gtkVersion}"
+  ];
+
+  installFlags = [
+    "sysconfdir=\${out}/etc"
+    "localstatedir=\${TMPDIR}"
+  ];
+
+  doCheck = false; # fails 8 out of 8 tests
+
+  meta = with lib; {
+    description = "A set of symbols and convenience functions for Ayatana indicators";
+    homepage = "https://launchpad.net/libindicator";
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.msteen ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libinfinity/default.nix b/nixpkgs/pkgs/development/libraries/libinfinity/default.nix
new file mode 100644
index 000000000000..f9963ce3e636
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libinfinity/default.nix
@@ -0,0 +1,51 @@
+{ gtkWidgets ? false # build GTK widgets for libinfinity
+, avahiSupport ? false # build support for Avahi in libinfinity
+, lib, stdenv, fetchurl, pkg-config, glib, libxml2, gnutls, gsasl
+, gobject-introspection
+, gtk3 ? null, gtk-doc, docbook_xsl, docbook_xml_dtd_412, avahi ? null, libdaemon, libidn, gss
+, libintl }:
+
+assert avahiSupport -> avahi != null;
+assert gtkWidgets -> gtk3 != null;
+
+let
+  self = stdenv.mkDerivation rec {
+    pname = "libinfinity";
+    version = "0.7.2";
+    src = fetchurl {
+      url = "https://github.com/gobby/${pname}/releases/download/${version}/${pname}-${version}.tar.gz";
+      sha256 = "17i3g61hxz9pzl3ryd1yr15142r25m06jfzjrpdy7ic1b8vjjw3f";
+    };
+
+    outputs = [ "bin" "out" "dev" "man" "devdoc" ];
+
+    nativeBuildInputs = [ pkg-config gtk-doc docbook_xsl docbook_xml_dtd_412 gobject-introspection ];
+    buildInputs = [ glib libxml2 gsasl libidn gss libintl libdaemon ]
+      ++ lib.optional gtkWidgets gtk3
+      ++ lib.optional avahiSupport avahi;
+
+    propagatedBuildInputs = [ gnutls ];
+
+    configureFlags = [
+      (lib.enableFeature true "gtk-doc")
+      (lib.enableFeature true "introspection")
+      (lib.withFeature gtkWidgets "inftextgtk")
+      (lib.withFeature gtkWidgets "infgtk")
+      (lib.withFeature true "infinoted")
+      (lib.withFeature true "libdaemon")
+      (lib.withFeature avahiSupport "avahi")
+    ];
+
+    passthru = {
+      infinoted = "${self.bin}/bin/infinoted-${lib.versions.majorMinor version}";
+    };
+
+    meta = {
+      homepage = "https://gobby.github.io/";
+      description = "An implementation of the Infinote protocol written in GObject-based C";
+      license = lib.licenses.lgpl2Plus;
+      maintainers = [ ];
+      platforms = with lib.platforms; linux ++ darwin;
+    };
+  };
+in self
diff --git a/nixpkgs/pkgs/development/libraries/libinjection/default.nix b/nixpkgs/pkgs/development/libraries/libinjection/default.nix
new file mode 100644
index 000000000000..d4193f32ccc0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libinjection/default.nix
@@ -0,0 +1,47 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch
+, python3
+}:
+
+stdenv.mkDerivation rec {
+  pname   = "libinjection";
+  version = "3.10.0";
+
+  src = fetchFromGitHub {
+    owner  = "client9";
+    repo   = pname;
+    rev    = "refs/tags/v${version}";
+    sha256 = "0chsgam5dqr9vjfhdcp8cgk7la6nf3lq44zs6z6si98cq743550g";
+  };
+
+  nativeBuildInputs = [ python3 ];
+
+  strictDeps = true;
+
+  patches = [
+    (fetchpatch {
+      name = "support-python3-for-building";
+      url = "https://raw.githubusercontent.com/sysown/proxysql/bed58f92917eb651b80fd8ffa627a485eb320805/deps/libinjection/update-build-py3.diff";
+      hash = "sha256-SPdf57FIDDNpatWe5pjhAiZl5yPMDEv50k0Wj+eWTEM=";
+    })
+  ];
+
+  postPatch = ''
+    patchShebangs src
+    substituteInPlace src/Makefile \
+      --replace /usr/local $out
+  '';
+
+  configurePhase = "cd src";
+  buildPhase = "make all";
+
+  # no binaries, so out = library, dev = headers
+  outputs = [ "out" "dev" ];
+
+  meta = with lib; {
+    description = "SQL / SQLI tokenizer parser analyzer";
+    homepage    = "https://github.com/client9/libinjection";
+    license     = licenses.bsd3;
+    platforms   = platforms.all;
+    maintainers = with maintainers; [ thoughtpolice ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libinklevel/default.nix b/nixpkgs/pkgs/development/libraries/libinklevel/default.nix
new file mode 100644
index 000000000000..0179009be3f9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libinklevel/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchurl, pkg-config, libusb1 }:
+
+stdenv.mkDerivation rec {
+  pname = "libinklevel";
+  version = "0.9.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
+    sha256 = "sha256-J0cEaC5v4naO4GGUzdfV55kB7KzA+q+v64i5y5Xbp9Q=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [
+    libusb1
+  ];
+
+  outputs = [ "out" "dev" "doc" ];
+
+  meta = with lib; {
+    description = "A library for checking the ink level of your printer";
+    longDescription = ''
+      Libinklevel is a library for checking the ink level of your printer on a
+      system which runs Linux or FreeBSD. It supports printers attached via
+      USB. Currently printers of the following brands are supported: HP, Epson
+      and Canon. Canon BJNP network printers are supported too. This is not
+      official software from the printer manufacturers. The goal of this
+      project is to create a vendor independent API for retrieving the ink
+      level of a printer connected to a Linux or FreeBSD box.
+    '';
+    homepage = "https://libinklevel.sourceforge.net/";
+    license = licenses.gpl2;
+    platforms = platforms.linux ++ platforms.freebsd;
+    maintainers = with maintainers; [ samb96 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libinotify-kqueue/default.nix b/nixpkgs/pkgs/development/libraries/libinotify-kqueue/default.nix
new file mode 100644
index 000000000000..d01407b43d0f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libinotify-kqueue/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "libinotify-kqueue";
+  version = "20180201";
+
+  src = fetchFromGitHub {
+    owner = "libinotify-kqueue";
+    repo = "libinotify-kqueue";
+    rev = version;
+    sha256 = "sha256-9A5s8rPGlRv3KbxOukk0VB2IQrDxVjklO5RB+IA1cDY=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  doCheck = true;
+  checkFlags = [ "test" ];
+
+  meta = with lib; {
+    description = "Inotify shim for macOS and BSD";
+    homepage = "https://github.com/libinotify-kqueue/libinotify-kqueue";
+    license = licenses.mit;
+    maintainers = with maintainers; [ yana ];
+    platforms = with platforms; darwin ++ freebsd ++ netbsd ++ openbsd;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libinput/default.nix b/nixpkgs/pkgs/development/libraries/libinput/default.nix
new file mode 100644
index 000000000000..16193e5e5148
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libinput/default.nix
@@ -0,0 +1,137 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, gitUpdater
+, pkg-config
+, meson
+, ninja
+, libevdev
+, mtdev
+, udev
+, libwacom
+, documentationSupport ? false
+, doxygen
+, graphviz
+, runCommand
+, eventGUISupport ? false
+, cairo
+, glib
+, gtk3
+, testsSupport ? false
+, check
+, valgrind
+, python3
+, nixosTests
+}:
+
+let
+  mkFlag = optSet: flag: "-D${flag}=${lib.boolToString optSet}";
+
+  sphinx-build =
+    let
+      env = python3.withPackages (pp: with pp; [
+        sphinx
+        recommonmark
+        sphinx-rtd-theme
+      ]);
+    in
+    # Expose only the sphinx-build binary to avoid contaminating
+    # everything with Sphinx’s Python environment.
+    runCommand "sphinx-build" { } ''
+      mkdir -p "$out/bin"
+      ln -s "${env}/bin/sphinx-build" "$out/bin"
+    '';
+in
+
+stdenv.mkDerivation rec {
+  pname = "libinput";
+  version = "1.25.0";
+
+  outputs = [ "bin" "out" "dev" ];
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "libinput";
+    repo = "libinput";
+    rev = version;
+    hash = "sha256-c2FU5OW+CIgtYTQy+bwIbaw3SP1pVxaLokhO+ag5/1s=";
+  };
+
+  patches = [
+    ./udev-absolute-path.patch
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+    meson
+    ninja
+  ] ++ lib.optionals documentationSupport [
+    doxygen
+    graphviz
+    sphinx-build
+  ];
+
+  buildInputs = [
+    libevdev
+    mtdev
+    libwacom
+    (python3.withPackages (pp: with pp; [
+      pp.libevdev # already in scope
+      pyudev
+      pyyaml
+      setuptools
+    ]))
+  ] ++ lib.optionals eventGUISupport [
+    # GUI event viewer
+    cairo
+    glib
+    gtk3
+  ];
+
+  propagatedBuildInputs = [
+    udev
+  ];
+
+  nativeCheckInputs = [
+    check
+    valgrind
+  ];
+
+  mesonFlags = [
+    (mkFlag documentationSupport "documentation")
+    (mkFlag eventGUISupport "debug-gui")
+    (mkFlag testsSupport "tests")
+    "--sysconfdir=/etc"
+    "--libexecdir=${placeholder "bin"}/libexec"
+  ];
+
+  doCheck = testsSupport && stdenv.hostPlatform == stdenv.buildPlatform;
+
+  postPatch = ''
+    patchShebangs \
+      test/symbols-leak-test \
+      test/check-leftover-udev-rules.sh \
+      test/helper-copy-and-exec-from-tmp.sh
+
+    # Don't create an empty directory under /etc.
+    sed -i "/install_emptydir(dir_etc \/ 'libinput')/d" meson.build
+  '';
+
+  passthru = {
+    tests = {
+      libinput-module = nixosTests.libinput;
+    };
+    updateScript = gitUpdater {
+      patchlevel-unstable = true;
+    };
+  };
+
+  meta = with lib; {
+    description = "Handles input devices in Wayland compositors and provides a generic X.Org input driver";
+    homepage = "https://www.freedesktop.org/wiki/Software/libinput/";
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ codyopel ] ++ teams.freedesktop.members;
+    changelog = "https://gitlab.freedesktop.org/libinput/libinput/-/releases/${version}";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libinput/udev-absolute-path.patch b/nixpkgs/pkgs/development/libraries/libinput/udev-absolute-path.patch
new file mode 100644
index 000000000000..5c85b8639486
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libinput/udev-absolute-path.patch
@@ -0,0 +1,11 @@
+--- a/meson.build
++++ b/meson.build
+@@ -100,7 +100,7 @@
+      args : model_quirks)
+ 
+ udev_rules_config = configuration_data()
+-udev_rules_config.set('UDEV_TEST_PATH', '')
++udev_rules_config.set('UDEV_TEST_PATH', dir_udev + '/')
+ configure_file(input : 'udev/80-libinput-device-groups.rules.in',
+ 	       output : '80-libinput-device-groups.rules',
+ 	       install : true,
diff --git a/nixpkgs/pkgs/development/libraries/libinsane/default.nix b/nixpkgs/pkgs/development/libraries/libinsane/default.nix
new file mode 100644
index 000000000000..a83268ca31ad
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libinsane/default.nix
@@ -0,0 +1,47 @@
+{ stdenv
+, lib
+, meson
+, ninja
+, fetchFromGitLab
+, pkg-config
+, glib
+, docbook_xsl
+, sane-backends
+, gobject-introspection
+, vala
+, gtk-doc
+, valgrind
+, doxygen
+, cunit
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libinsane";
+  version = "1.0.10";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchFromGitLab {
+    domain = "gitlab.gnome.org";
+    repo = "libinsane";
+    group = "World";
+    owner = "OpenPaperwork";
+    rev = version;
+    sha256 = "sha256-2BLg8zB0InPJqK9JypQIMVXIJndo9ZuNB4OeOAo/Hsc=";
+  };
+
+  nativeBuildInputs = [ meson pkg-config ninja doxygen gtk-doc docbook_xsl gobject-introspection vala ];
+
+  buildInputs = [ sane-backends glib ];
+
+  nativeCheckInputs = [ cunit valgrind ];
+
+  doCheck = true;
+
+  meta = {
+    description = "Crossplatform access to image scanners (paper eaters only)";
+    homepage = "https://openpaper.work/en/projects/";
+    license = lib.licenses.lgpl3Plus;
+    maintainers = [ lib.maintainers.symphorien ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libint/default.nix b/nixpkgs/pkgs/development/libraries/libint/default.nix
new file mode 100644
index 000000000000..046e9608819d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libint/default.nix
@@ -0,0 +1,228 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoconf
+, automake
+, libtool
+, python3
+, perl
+, gmpxx
+, mpfr
+, boost
+, eigen
+, gfortran
+, cmake
+, enableFMA ? stdenv.hostPlatform.fmaSupport
+, enableFortran ? true
+, enableSSE ? (!enableFortran) && stdenv.hostPlatform.isx86_64
+
+  # Maximum angular momentum of basis functions
+  # 7 is required for def2/J auxiliary basis on 3d metals upwards
+, maxAm ? 7
+
+  # ERI derivative order for 4-, 3- and 2-centre ERIs.
+  # 2nd derivatives are defaults and allow gradients Hessians with density fitting
+  # Setting them to zero disables derivatives.
+, eriDeriv ? 2
+, eri3Deriv ? 2
+, eri2Deriv ? 2
+
+  # Angular momentum for derivatives of ERIs. Takes a list of length $DERIV_ORD+1.
+  # Starting from index 0, each index i specifies the supported angular momentum
+  # for the derivative order i, e.g. [6,5,4] supports ERIs for l=6, their first
+  # derivatives for l=5 and their second derivatives for l=4.
+, eriAm ? (builtins.genList (i: maxAm - 1 - i) (eriDeriv + 1))
+, eri3Am ? (builtins.genList (i: maxAm - i) (eri2Deriv + 1))
+, eri2Am ? (builtins.genList (i: maxAm - i) (eri2Deriv + 1))
+
+  # Same as above for optimised code. Higher optimisations take a long time.
+, eriOptAm ? (builtins.genList (i: maxAm - 3 - i) (eriDeriv + 1))
+, eri3OptAm ? (builtins.genList (i: maxAm - 3 - i) (eri2Deriv + 1))
+, eri2OptAm ? (builtins.genList (i: maxAm - 3 - i) (eri2Deriv + 1))
+
+  # One-Electron integrals of all kinds including multipole integrals.
+  # Libint does not build them and their derivatives by default.
+, enableOneBody ? false
+, oneBodyDerivOrd ? 2
+, multipoleOrd ? 4 # Maximum order of multipole integrals, 4=octopoles
+
+  # Whether to enable generic code if angular momentum is unsupported
+, enableGeneric ? true
+
+  # Support integrals over contracted Gaussian
+, enableContracted ? true
+
+  # Spherical harmonics/Cartesian orbital conventions
+, cartGaussOrd ? "standard" # Ordering of Cartesian basis functions, "standard" is CCA
+, shGaussOrd ? "standard" # Ordering of spherical harmonic basis functions. "standard" is -l to +l, "guassian" is 0, 1, -1, 2, -2, ...
+, shellSet ? "standard"
+, eri3PureSh ? false # Transformation of 3-centre ERIs into spherical harmonics
+, eri2PureSh ? false # Transformation of 2-centre ERIs into spherical harmonics
+}:
+
+# Check that Fortran bindings are not used together with SIMD real type
+assert (if enableFortran then !enableSSE else true);
+
+# Check that a possible angular momentum for basis functions is used
+assert (maxAm >= 1 && maxAm <= 8);
+
+# Check for valid derivative order in ERIs
+assert (eriDeriv >= 0 && eriDeriv <= 4);
+assert (eri2Deriv >= 0 && eri2Deriv <= 4);
+assert (eri3Deriv >= 0 && eri3Deriv <= 4);
+
+# Ensure valid arguments for generated angular momenta in ERI derivatives are used.
+assert (
+  builtins.length eriAm == eriDeriv + 1 &&
+  builtins.foldl' (a: b: a && b) true (builtins.map (a: a <= maxAm && a >= 0) eriAm)
+);
+assert (
+  builtins.length eri3Am == eriDeriv + 1 &&
+  builtins.foldl' (a: b: a && b) true (builtins.map (a: a <= maxAm && a >= 0) eri3Am)
+);
+assert (
+  builtins.length eri2Am == eriDeriv + 1 &&
+  builtins.foldl' (a: b: a && b) true (builtins.map (a: a <= maxAm && a >= 0) eri2Am)
+);
+
+# Ensure valid arguments for generated angular momenta in optimised ERI derivatives are used.
+assert (
+  builtins.length eriOptAm == eriDeriv + 1 &&
+  builtins.foldl' (a: b: a && b) true (builtins.map (a: a <= maxAm && a >= 0) eriOptAm)
+);
+assert (
+  builtins.length eri3OptAm == eriDeriv + 1 &&
+  builtins.foldl' (a: b: a && b) true (builtins.map (a: a <= maxAm && a >= 0) eri3OptAm)
+);
+assert (
+  builtins.length eri2OptAm == eriDeriv + 1 &&
+  builtins.foldl' (a: b: a && b) true (builtins.map (a: a <= maxAm && a >= 0) eri2OptAm)
+);
+
+# Ensure a valid derivative order for one-electron integrals
+assert (oneBodyDerivOrd >= 0 && oneBodyDerivOrd <= 4);
+
+# Check that valid basis shell orders are used, see https://github.com/evaleev/libint/wiki
+assert (builtins.elem cartGaussOrd [ "standard" "intv3" "gamess" "orca" "bagel" ]);
+assert (builtins.elem shGaussOrd [ "standard" "gaussian" ]);
+assert (builtins.elem shellSet [ "standard" "orca" ]);
+
+let
+  pname = "libint";
+  version = "2.8.1";
+
+  meta = with lib; {
+    description = "Library for the evaluation of molecular integrals of many-body operators over Gaussian functions";
+    homepage = "https://github.com/evaleev/libint";
+    license = with licenses; [ lgpl3Only gpl3Only ];
+    maintainers = with maintainers; [ markuskowa sheepforce ];
+    platforms = [ "x86_64-linux" ];
+  };
+
+  codeGen = stdenv.mkDerivation {
+    inherit pname version;
+
+    src = fetchFromGitHub {
+      owner = "evaleev";
+      repo = pname;
+      rev = "v${version}";
+      hash = "sha256-0QWOJUjK7Jq4KCk77vNIrBNKOzPcc/1+Ji13IN5xUKM=";
+    };
+
+    # Replace hardcoded "/bin/rm" with normal "rm"
+    postPatch = ''
+      for f in \
+        bin/ltmain.sh \
+        configure.ac \
+        src/bin/libint/Makefile \
+        src/lib/libint/Makefile.library \
+        tests/eri/Makefile \
+        tests/hartree-fock/Makefile \
+        tests/unit/Makefile; do
+          substituteInPlace $f --replace "/bin/rm" "rm"
+      done
+    '';
+
+    nativeBuildInputs = [
+      autoconf
+      automake
+      libtool
+      mpfr
+      python3
+      perl
+      gmpxx
+    ] ++ lib.optional enableFortran gfortran;
+
+    buildInputs = [ boost eigen ];
+
+    configureFlags = with lib; [
+      "--with-max-am=${builtins.toString maxAm}"
+      "--with-eri-max-am=${concatStringsSep "," (builtins.map builtins.toString eriAm)}"
+      "--with-eri3-max-am=${concatStringsSep "," (builtins.map builtins.toString eri3Am)}"
+      "--with-eri2-max-am=${concatStringsSep "," (builtins.map builtins.toString eri2Am)}"
+      "--with-eri-opt-am=${concatStringsSep "," (builtins.map builtins.toString eriOptAm)}"
+      "--with-eri3-opt-am=${concatStringsSep "," (builtins.map builtins.toString eri3OptAm)}"
+      "--with-eri2-opt-am=${concatStringsSep "," (builtins.map builtins.toString eri2OptAm)}"
+      "--with-cartgauss-ordering=${cartGaussOrd}"
+      "--with-shgauss-ordering=${shGaussOrd}"
+      "--with-shell-set=${shellSet}"
+    ]
+    ++ optional enableFMA "--enable-fma"
+    ++ optional (eriDeriv > 0) "--enable-eri=${builtins.toString eriDeriv}"
+    ++ optional (eri2Deriv > 0) "--enable-eri2=${builtins.toString eri2Deriv}"
+    ++ optional (eri3Deriv > 0) "--enable-eri3=${builtins.toString eri3Deriv}"
+    ++ lists.optionals enableOneBody [
+      "--enable-1body=${builtins.toString oneBodyDerivOrd}"
+      "--enable-1body-property-derivs"
+    ]
+    ++ optional (multipoleOrd > 0) "--with-multipole-max-order=${builtins.toString multipoleOrd}"
+    ++ optional enableGeneric "--enable-generic"
+    ++ optional enableContracted "--enable-contracted-ints"
+    ++ optional eri3PureSh "--enable-eri3-pure-sh"
+    ++ optional eri2PureSh "--enable-eri2-pure-sh"
+    ;
+
+    preConfigure = ''
+      ./autogen.sh
+    '';
+
+    makeFlags = [ "export" ];
+
+    installPhase = ''
+      mkdir -p $out
+      cp ${pname}-${version}.tgz $out/.
+    '';
+
+    enableParallelBuilding = true;
+
+    inherit meta;
+  };
+
+  codeComp = stdenv.mkDerivation {
+    inherit pname version;
+
+    src = "${codeGen}/${pname}-${version}.tgz";
+
+    nativeBuildInputs = [
+      python3
+      cmake
+    ] ++ lib.optional enableFortran gfortran;
+
+    buildInputs = [ boost eigen ];
+
+    # Default is just "double", but SSE2 is available on all x86_64 CPUs.
+    # AVX support is advertised, but does not work in 2.6 (possibly in 2.7).
+    # Fortran interface is incompatible with changing the LIBINT2_REALTYPE.
+    cmakeFlags = [
+      "-DLIBINT2_SHGAUSS_ORDERING=${shGaussOrd}"
+    ] ++ lib.optional enableFortran "-DENABLE_FORTRAN=ON"
+    ++ lib.optional enableSSE "-DLIBINT2_REALTYPE=libint2::simd::VectorSSEDouble";
+
+    # Can only build in the source-tree. A lot of preprocessing magic fails otherwise.
+    dontUseCmakeBuildDir = true;
+
+    inherit meta;
+  };
+
+in
+codeComp
diff --git a/nixpkgs/pkgs/development/libraries/libiodbc/default.nix b/nixpkgs/pkgs/development/libraries/libiodbc/default.nix
new file mode 100644
index 000000000000..6d6d7d46576d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libiodbc/default.nix
@@ -0,0 +1,28 @@
+{ config, lib, stdenv, fetchurl, pkg-config, gtk2, Carbon
+, useGTK ? config.libiodbc.gtk or false }:
+
+stdenv.mkDerivation rec {
+  pname = "libiodbc";
+  version = "3.52.16";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/iodbc/${pname}-${version}.tar.gz";
+    sha256 = "sha256-OJizLQeWE2D28s822zYDa3GaIw5HZGklioDzIkPoRfo=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = lib.optionals useGTK [ gtk2 ]
+                ++ lib.optional stdenv.isDarwin Carbon;
+
+  preBuild =
+    ''
+      export NIX_LDFLAGS_BEFORE="-rpath $out/lib"
+    '';
+
+  meta = with lib; {
+    description = "iODBC driver manager";
+    homepage = "https://www.iodbc.org";
+    platforms = platforms.unix;
+    license = licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libipfix/default.nix b/nixpkgs/pkgs/development/libraries/libipfix/default.nix
new file mode 100644
index 000000000000..e62c456dd4ab
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libipfix/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation {
+  pname = "libipfix";
+  version = "110209";
+  src = fetchurl {
+    url = "mirror://sourceforge/libipfix/files/libipfix/libipfix_110209.tgz";
+    sha256 = "0h7v0sxjjdc41hl5vq2x0yhyn04bczl11bqm97825mivrvfymhn6";
+  };
+
+  # Workaround build failure on -fno-common toolchains:
+  #   ld: ../libmisc/libmisc.a(mlog.o):/build/libipfix_110209/libmisc/misc.h:111: multiple definition of
+  #     `ht_globals'; collector.o:/build/libipfix_110209/collector/../libmisc/misc.h:111: first defined here
+  # TODO: drop the workaround when fix ix released:
+  #   https://sourceforge.net/p/libipfix/code/ci/a501612c6b8ac6f2df16b366f7a92211382bae6b/
+  env.NIX_CFLAGS_COMPILE = "-fcommon";
+
+  meta = with lib; {
+    homepage = "https://libipfix.sourceforge.net/";
+    description = "The libipfix C-library implements the IPFIX protocol defined by the IP Flow Information Export working group of the IETF";
+    license = licenses.lgpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ lewo ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libipt/default.nix b/nixpkgs/pkgs/development/libraries/libipt/default.nix
new file mode 100644
index 000000000000..6a05aec46854
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libipt/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "libipt";
+  version = "2.1";
+
+  src = fetchFromGitHub {
+    owner = "intel";
+    repo = "libipt";
+    rev = "v${version}";
+    sha256 = "sha256-SLCuNTFRGFh0mTv1xLCIDg7b6DbWCxgHhrCoPu9xpmw=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "Intel Processor Trace decoder library";
+    homepage = "https://github.com/intel/libipt";
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ orivej ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libiptcdata/default.nix b/nixpkgs/pkgs/development/libraries/libiptcdata/default.nix
new file mode 100644
index 000000000000..6bf670a40382
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libiptcdata/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, libiconv
+, libintl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libiptcdata";
+  version = "1.0.5";
+
+  src = fetchFromGitHub {
+    owner = "ianw";
+    repo = pname;
+    rev = "release_${builtins.replaceStrings ["."] ["_"] version}";
+    sha256 = "sha256-ZjokepDAHiSEwXrkvM9qUAPcpIiRQoOsv7REle7roPU=";
+  };
+
+  postPatch = ''
+    # gtk-doc doesn't build without network access
+    sed -i '/GTK_DOC_CHECK/d;/docs/d' configure.ac
+    sed -i 's/docs//' Makefile.am
+  '';
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  buildInputs = lib.optionals stdenv.isDarwin [
+    libiconv
+    libintl
+  ];
+
+  meta = with lib; {
+    description = "Library for reading and writing the IPTC metadata in images and other files";
+    homepage = "https://github.com/ianw/libiptcdata";
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ wegank ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libirc/default.nix b/nixpkgs/pkgs/development/libraries/libirc/default.nix
new file mode 100644
index 000000000000..368cd7e1d859
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libirc/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub, cmake, qtbase }:
+
+stdenv.mkDerivation rec {
+  pname = "libirc";
+  version = "unstable-2022-10-15";
+
+  src = fetchFromGitHub {
+    owner = "grumpy-irc";
+    repo = "libirc";
+    rev = "734082ffffb6d6744070c75587159d927342edea";
+    sha256 = "Qi/YKLlau0rdQ9XCMyreQdv4ctQWHFIoE3YlW6QnbSI=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [
+    "-DQT5_BUILD=1"
+    "-DQt5Core_DIR=${qtbase.dev}/lib/cmake/Qt5Core"
+    "-DQt5Network_DIR=${qtbase.dev}/lib/cmake/Qt5Network"
+  ];
+
+  preFixup = ''
+    mkdir -p $out/libirc/libirc{,client}
+    cp ../libirc/*.h $out/libirc/libirc
+    cp ../libircclient/*.h $out/libirc/libircclient
+  '';
+
+  meta = with lib; {
+    description = "C++ IRC library written in Qt with support for data serialization";
+    homepage = "https://github.com/grumpy-irc/libirc";
+    license = licenses.lgpl3;
+    maintainers = with maintainers; [ fee1-dead ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libircclient/default.nix b/nixpkgs/pkgs/development/libraries/libircclient/default.nix
new file mode 100644
index 000000000000..56a9f1b961cf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libircclient/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  version = "1.10";
+  pname   = "libircclient";
+
+  src = fetchurl {
+    url    = "mirror://sourceforge/${pname}/${pname}/${version}/${pname}-${version}.tar.gz";
+    sha256 = "0b9wa0h3xc31wpqlvgxgnvqp5wgx3kwsf5s9432m5cj8ycx6zcmv";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  configureFlags = [ "--enable-shared" ];
+
+  postPatch = ''
+    substituteInPlace src/Makefile.in \
+      --replace "@prefix@/include" "@prefix@/include/libircclient" \
+      --replace "@libdir@"         "@prefix@/lib" \
+      --replace "cp "              "install "
+  '';
+
+  meta = with lib; {
+    description = "A small but extremely powerful library which implements the client IRC protocol";
+    homepage    = "http://www.ulduzsoft.com/libircclient/";
+    license     = licenses.lgpl3;
+    maintainers = with maintainers; [ obadz ];
+    platforms   = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libirecovery/default.nix b/nixpkgs/pkgs/development/libraries/libirecovery/default.nix
new file mode 100644
index 000000000000..c2a8e16e1d48
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libirecovery/default.nix
@@ -0,0 +1,60 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+, libusb1
+, readline
+, libimobiledevice-glue
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libirecovery";
+  version = "1.1.0";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "libimobiledevice";
+    repo = pname;
+    rev = version;
+    hash = "sha256-84xwSOLwPU2Py6X2r6FYESxdc1EuuD6xHEXTUUEdvTE=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ];
+
+  buildInputs = [
+    libusb1
+    readline
+    libimobiledevice-glue
+  ];
+
+  preAutoreconf = ''
+    export RELEASE_VERSION=${version}
+  '';
+
+  # Packager note: Not clear whether this needs a NixOS configuration,
+  # as only the `idevicerestore` binary was tested so far (which worked
+  # without further configuration).
+  configureFlags = [
+    "--with-udevrulesdir=${placeholder "out"}/lib/udev/rules.d"
+    ''--with-udevrule="OWNER=\"root\", GROUP=\"myusergroup\", MODE=\"0660\""''
+  ];
+
+  meta = with lib; {
+    description = "Library and utility to talk to iBoot/iBSS via USB on Mac OS X, Windows, and Linux";
+    longDescription = ''
+      libirecovery is a cross-platform library which implements communication to
+      iBoot/iBSS found on Apple's iOS devices via USB. A command-line utility is also
+      provided.
+    '';
+    homepage = "https://github.com/libimobiledevice/libirecovery";
+    license = licenses.lgpl21Only;
+    maintainers = with maintainers; [ nh2 ];
+    mainProgram = "irecovery";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libiscsi/default.nix b/nixpkgs/pkgs/development/libraries/libiscsi/default.nix
new file mode 100644
index 000000000000..826593b9d66c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libiscsi/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "libiscsi";
+  version = "1.19.0";
+
+  src = fetchFromGitHub {
+    owner = "sahlberg";
+    repo = "libiscsi";
+    rev = version;
+    sha256 = "0ajrkkg5awmi8m4b3mha7h07ylg18k252qprvk1sgq0qbyd66zy7";
+  };
+
+  postPatch = ''
+    substituteInPlace lib/socket.c \
+      --replace "void iscsi_decrement_iface_rr() {" "void iscsi_decrement_iface_rr(void) {"
+  '';
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  # This problem is gone on libiscsi master.
+  env.NIX_CFLAGS_COMPILE = toString (lib.optional stdenv.hostPlatform.is32bit "-Wno-error=sign-compare");
+
+  meta = with lib; {
+    description = "iscsi client library and utilities";
+    homepage = "https://github.com/sahlberg/libiscsi";
+    license = licenses.lgpl2;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ misuzu ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libisds/default.nix b/nixpkgs/pkgs/development/libraries/libisds/default.nix
new file mode 100644
index 000000000000..4c61e3c48868
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libisds/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv
+, fetchurl
+, expat
+, gpgme
+, libgcrypt
+, libxml2
+, libxslt
+, curl
+, docbook_xsl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libisds";
+  version = "0.11.2";
+
+  src = fetchurl {
+    url = "http://xpisar.wz.cz/${pname}/dist/${pname}-${version}.tar.xz";
+    sha256 = "sha256-YUb4N7J7EaYHHiFI965kUhtNitRTJfmY/ns3MTfkGPs=";
+  };
+
+  configureFlags = [
+    "--with-docbook-xsl-stylesheets=${docbook_xsl}/xml/xsl/docbook"
+  ];
+
+  buildInputs = [ expat gpgme libgcrypt libxml2 libxslt curl docbook_xsl ];
+
+  NIX_CFLAGS_COMPILE = [ "-Wno-error=deprecated-declarations" ];
+
+  meta = with lib; {
+    description = "Client library for accessing SOAP services of Czech government-provided Databox infomation system";
+    homepage = "http://xpisar.wz.cz/libisds/";
+    license = licenses.lgpl3;
+    maintainers = [ maintainers.mmahut ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libite/default.nix b/nixpkgs/pkgs/development/libraries/libite/default.nix
new file mode 100644
index 000000000000..8b70a3b715f6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libite/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, libconfuse }:
+
+stdenv.mkDerivation rec {
+  pname = "libite";
+  version = "2.6.1";
+
+  src = fetchFromGitHub {
+    owner = "troglobit";
+    repo = "libite";
+    rev = "v${version}";
+    sha256 = "sha256-q1NoHSiPmFPwkTJqg3L5fEBXF/JjRWvA9e4d532ILE8=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ libconfuse ];
+
+  meta = with lib; {
+    description = "Lightweight library of frog DNA";
+    longDescription = ''
+      Libite is a lightweight library of frog DNA. It can be used to fill
+      the gaps in any dinosaur project. It holds useful functions and macros
+      developed by both Finit and the OpenBSD project. Most notably the
+      string functions: strlcpy(3), strlcat(3) and the highly useful *BSD
+      sys/queue.h and sys/tree.h API's.
+
+      Libite is the frog DNA missing in GNU libc. However, -lite does not
+      aim to become another GLIB! One noticeable gap in GLIBC is the missing
+      _SAFE macros in the BSD sys/queue.h API — highly recommended when
+      traversing lists to delete/free nodes.
+    '';
+    homepage = "https://github.com/troglobit/libite";
+    platforms = with platforms; linux ++ netbsd;
+    maintainers = with maintainers; [ fpletz ];
+    license = with licenses; [ mit isc bsd2 bsd3 ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/libivykis/default.nix b/nixpkgs/pkgs/development/libraries/libivykis/default.nix
new file mode 100644
index 000000000000..c5e0c55854e6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libivykis/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, file, protobufc }:
+
+stdenv.mkDerivation rec {
+  pname = "libivykis";
+
+  version = "0.42.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libivykis/${version}/ivykis-${version}.tar.gz";
+    sha256 = "0abi0rc3wnncvr68hy6rmzp96x6napd7fs1mff20dr8lb0jyvy3f";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ file protobufc ];
+
+  meta = with lib; {
+    homepage = "https://libivykis.sourceforge.net/";
+    description = ''
+      A thin wrapper over various OS'es implementation of I/O readiness
+      notification facilities
+    '';
+    license = licenses.zlib;
+    maintainers = [];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libixp/default.nix b/nixpkgs/pkgs/development/libraries/libixp/default.nix
new file mode 100644
index 000000000000..f6ad6d01b08f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libixp/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, unzip, txt2tags }:
+
+stdenv.mkDerivation rec {
+  pname = "libixp";
+  version = "unstable-2022-04-04";
+
+  src = fetchFromGitHub {
+    owner = "0intro";
+    repo = "libixp";
+    rev = "ca2acb2988e4f040022f0e2094c69ab65fa6ec53";
+    hash = "sha256-S25DmXJ7fN0gXLV0IzUdz8hXPTYEHmaSG7Mnli6GQVc=";
+  };
+
+  postPatch = lib.optionalString stdenv.cc.isClang ''
+    substituteInPlace mk/ixp.mk \
+      --replace "©" "C "
+  '';
+
+  postConfigure = ''
+   sed -i -e "s|^PREFIX.*=.*$|PREFIX = $out|" config.mk
+  '';
+
+  nativeBuildInputs = [ unzip ];
+  buildInputs = [ txt2tags ];
+
+  meta = {
+    homepage = "https://github.com/0intro/libixp";
+    description = "Portable, simple C-language 9P client and server library";
+    maintainers = with lib.maintainers; [ kovirobi ];
+    license = lib.licenses.mit;
+    platforms = with lib.platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libjaylink/default.nix b/nixpkgs/pkgs/development/libraries/libjaylink/default.nix
new file mode 100644
index 000000000000..5d461940dcea
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libjaylink/default.nix
@@ -0,0 +1,36 @@
+{ fetchFromGitLab, lib, stdenv
+, autoreconfHook, pkg-config
+, libusb1
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libjaylink";
+  version = "0.3.1";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.zapb.de";
+    owner = "libjaylink";
+    repo = "libjaylink";
+    rev = version;
+    sha256 = "sha256-odJDE1A0WZ9vBXPxaUdthjTgmbmbdHjbyY1PkaM4+vI=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ libusb1 ];
+
+  postPatch = ''
+    patchShebangs autogen.sh
+  '';
+
+  postInstall = ''
+    install -Dm644 contrib/99-libjaylink.rules $out/lib/udev/rules.d/libjaylink.rules
+  '';
+
+  meta = with lib; {
+    homepage = "https://gitlab.zapb.de/libjaylink/libjaylink";
+    description = "libjaylink is a shared library written in C to access SEGGER J-Link and compatible devices.";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ felixsinger ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libjcat/default.nix b/nixpkgs/pkgs/development/libraries/libjcat/default.nix
new file mode 100644
index 000000000000..6d9481d1da2d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libjcat/default.nix
@@ -0,0 +1,78 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, docbook_xml_dtd_43
+, docbook-xsl-nons
+, glib
+, json-glib
+, gnutls
+, gpgme
+, gobject-introspection
+, vala
+, gtk-doc
+, meson
+, ninja
+, pkg-config
+, python3
+, nixosTests
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libjcat";
+  version = "0.2.1";
+
+  outputs = [ "bin" "out" "dev" "devdoc" "man" "installedTests" ];
+
+  src = fetchFromGitHub {
+    owner = "hughsie";
+    repo = "libjcat";
+    rev = version;
+    sha256 = "sha256-tCXz62MEqYBnrx2RxlTBwKGTahfhUCVdet4VnXw5klQ=";
+  };
+
+  patches = [
+    # Installed tests are installed to different output
+    ./installed-tests-path.patch
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    docbook_xml_dtd_43
+    docbook-xsl-nons
+    gobject-introspection
+    vala
+    gnutls
+    gtk-doc
+    python3
+  ];
+
+  buildInputs = [
+    glib
+    json-glib
+    gnutls
+    gpgme
+  ];
+
+  mesonFlags = [
+    "-Dgtkdoc=true"
+    "-Dinstalled_test_prefix=${placeholder "installedTests"}"
+  ];
+
+  doCheck = true;
+
+  passthru = {
+    tests = {
+      installed-tests = nixosTests.installed-tests.libjcat;
+    };
+  };
+
+  meta = with lib; {
+    description = "Library for reading and writing Jcat files";
+    homepage = "https://github.com/hughsie/libjcat";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libjcat/installed-tests-path.patch b/nixpkgs/pkgs/development/libraries/libjcat/installed-tests-path.patch
new file mode 100644
index 000000000000..d199f91385f5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libjcat/installed-tests-path.patch
@@ -0,0 +1,24 @@
+diff --git a/meson.build b/meson.build
+index f69968d..d1d6c6e 100644
+--- a/meson.build
++++ b/meson.build
+@@ -114,8 +114,8 @@ else
+   datadir = join_paths(prefix, get_option('datadir'))
+   localstatedir = join_paths(prefix, get_option('localstatedir'))
+   libexecdir = join_paths(prefix, get_option('libexecdir'))
+-  installed_test_bindir = join_paths(libexecdir, 'installed-tests', meson.project_name())
+-  installed_test_datadir = join_paths(datadir, 'installed-tests', meson.project_name())
++  installed_test_bindir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests', meson.project_name())
++  installed_test_datadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests', meson.project_name())
+ endif
+ mandir = join_paths(prefix, get_option('mandir'))
+ localedir = join_paths(prefix, get_option('localedir'))
+diff --git a/meson_options.txt b/meson_options.txt
+index 4784300..d382fc1 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,3 +1,4 @@
++option('installed_test_prefix', type: 'string', value: '', description: 'Prefix for installed tests')
+ option('gtkdoc', type : 'boolean', value : false, description : 'enable developer documentation')
+ option('introspection', type : 'boolean', value : true, description : 'generate GObject Introspection data')
+ option('tests', type : 'boolean', value : true, description : 'enable tests')
diff --git a/nixpkgs/pkgs/development/libraries/libjodycode/default.nix b/nixpkgs/pkgs/development/libraries/libjodycode/default.nix
new file mode 100644
index 000000000000..2a99ed5feca3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libjodycode/default.nix
@@ -0,0 +1,29 @@
+{ lib
+, stdenv
+, fetchFromGitea
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libjodycode";
+  version = "3.1";
+
+  outputs = [ "out" "man" "dev" ];
+
+  src = fetchFromGitea {
+    domain = "codeberg.org";
+    owner = "jbruchon";
+    repo = "libjodycode";
+    rev = "v${version}";
+    hash = "sha256-uhWQh5YwLwYRm34nY5HvcEepqlTSDt9s3PSoD403kQM=";
+  };
+
+  env.PREFIX = placeholder "out";
+
+  meta = with lib; {
+    description = "Shared code used by several utilities written by Jody Bruchon";
+    homepage = "https://github.com/jbruchon/libjodycode";
+    changelog = "https://github.com/jbruchon/libjodycode/blob/${src.rev}/CHANGES.txt";
+    license = licenses.mit;
+    maintainers = with maintainers; [ pbsds ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libjpeg-turbo/0001-Compile-transupp.c-as-part-of-the-library.patch b/nixpkgs/pkgs/development/libraries/libjpeg-turbo/0001-Compile-transupp.c-as-part-of-the-library.patch
new file mode 100644
index 000000000000..775315018064
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libjpeg-turbo/0001-Compile-transupp.c-as-part-of-the-library.patch
@@ -0,0 +1,34 @@
+From 6442d11617f95d13e2a371bd3e01f5082a9c356d Mon Sep 17 00:00:00 2001
+From: Las <las@protonmail.ch>
+Date: Sun, 3 Jan 2021 18:35:37 +0000
+Subject: [PATCH] Compile transupp.c as part of the library
+
+---
+ CMakeLists.txt |  4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index adb0ca45..46fc16dd 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -581,7 +581,7 @@ set(JPEG_SOURCES ${JPEG12_SOURCES} jcapimin.c jchuff.c jcicc.c jcinit.c
+   jclhuff.c jcmarker.c jcmaster.c jcomapi.c jcparam.c jcphuff.c jctrans.c
+   jdapimin.c jdatadst.c jdatasrc.c jdhuff.c jdicc.c jdinput.c jdlhuff.c
+   jdmarker.c jdmaster.c jdphuff.c jdtrans.c jerror.c jfdctflt.c jmemmgr.c
+-  jmemnobs.c jpeg_nbits.c)
++  jmemnobs.c jpeg_nbits.c transupp.c)
+ 
+ if(WITH_ARITH_ENC OR WITH_ARITH_DEC)
+   set(JPEG_SOURCES ${JPEG_SOURCES} jaricom.c)
+@@ -1803,7 +1803,7 @@ install(EXPORT ${CMAKE_PROJECT_NAME}Targets
+ 
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/jconfig.h
+   ${CMAKE_CURRENT_SOURCE_DIR}/jerror.h ${CMAKE_CURRENT_SOURCE_DIR}/jmorecfg.h
+-  ${CMAKE_CURRENT_SOURCE_DIR}/jpeglib.h
++  ${CMAKE_CURRENT_SOURCE_DIR}/jpeglib.h ${CMAKE_CURRENT_SOURCE_DIR}/transupp.h
+   DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+ 
+ include(cmakescripts/BuildPackages.cmake)
+-- 
+2.43.0
+
diff --git a/nixpkgs/pkgs/development/libraries/libjpeg-turbo/0002-Make-exported-symbols-in-transupp.c-weak.patch b/nixpkgs/pkgs/development/libraries/libjpeg-turbo/0002-Make-exported-symbols-in-transupp.c-weak.patch
new file mode 100644
index 000000000000..fc23b776312a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libjpeg-turbo/0002-Make-exported-symbols-in-transupp.c-weak.patch
@@ -0,0 +1,81 @@
+From 6442d11617f95d13e2a371bd3e01f5082a9c356d Mon Sep 17 00:00:00 2001
+From: Las <las@protonmail.ch>
+Date: Sun, 3 Jan 2021 18:35:37 +0000
+Subject: [PATCH] Make exported symbols in transupp.c weak
+
+The exported symbols are made weak to not conflict with users
+of the library that already vendor this functionality.
+---
+ transupp.c     | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/transupp.c b/transupp.c
+index 34fbb371..c0ade5a9 100644
+--- a/transupp.c
++++ b/transupp.c
+@@ -1388,7 +1388,7 @@ jt_read_integer(const char **strptr, JDIMENSION *result)
+  * This code is loosely based on XParseGeometry from the X11 distribution.
+  */
+ 
+-GLOBAL(boolean)
++GLOBAL(boolean) __attribute__((weak))
+ jtransform_parse_crop_spec(jpeg_transform_info *info, const char *spec)
+ {
+   info->crop = FALSE;
+@@ -1488,7 +1488,7 @@ trim_bottom_edge(jpeg_transform_info *info, JDIMENSION full_height)
+  * and transformation is not perfect.  Otherwise returns TRUE.
+  */
+ 
+-GLOBAL(boolean)
++GLOBAL(boolean) __attribute__((weak))
+ jtransform_request_workspace(j_decompress_ptr srcinfo,
+                              jpeg_transform_info *info)
+ {
+@@ -2035,7 +2035,7 @@ adjust_exif_parameters(JOCTET *data, unsigned int length, JDIMENSION new_width,
+  * to jpeg_write_coefficients().
+  */
+ 
+-GLOBAL(jvirt_barray_ptr *)
++GLOBAL(jvirt_barray_ptr *) __attribute__((weak))
+ jtransform_adjust_parameters(j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
+                              jvirt_barray_ptr *src_coef_arrays,
+                              jpeg_transform_info *info)
+@@ -2154,7 +2154,7 @@ jtransform_adjust_parameters(j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
+  * Note that some transformations will modify the source data arrays!
+  */
+ 
+-GLOBAL(void)
++GLOBAL(void) __attribute__((weak))
+ jtransform_execute_transform(j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
+                              jvirt_barray_ptr *src_coef_arrays,
+                              jpeg_transform_info *info)
+@@ -2266,7 +2266,7 @@ jtransform_execute_transform(j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
+  *           (may use custom action then)
+  */
+ 
+-GLOBAL(boolean)
++GLOBAL(boolean) __attribute__((weak))
+ jtransform_perfect_transform(JDIMENSION image_width, JDIMENSION image_height,
+                              int MCU_width, int MCU_height,
+                              JXFORM_CODE transform)
+@@ -2305,7 +2305,7 @@ jtransform_perfect_transform(JDIMENSION image_width, JDIMENSION image_height,
+  * This must be called before jpeg_read_header() to have the desired effect.
+  */
+ 
+-GLOBAL(void)
++GLOBAL(void) __attribute__((weak))
+ jcopy_markers_setup(j_decompress_ptr srcinfo, JCOPY_OPTION option)
+ {
+ #ifdef SAVE_MARKERS_SUPPORTED
+@@ -2337,7 +2337,7 @@ jcopy_markers_setup(j_decompress_ptr srcinfo, JCOPY_OPTION option)
+  * JFIF APP0 or Adobe APP14 markers if selected.
+  */
+ 
+-GLOBAL(void)
++GLOBAL(void) __attribute__((weak))
+ jcopy_markers_execute(j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
+                       JCOPY_OPTION option)
+ {
+-- 
+2.43.0
+
diff --git a/nixpkgs/pkgs/development/libraries/libjpeg-turbo/default.nix b/nixpkgs/pkgs/development/libraries/libjpeg-turbo/default.nix
new file mode 100644
index 000000000000..a34a60b11bf1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libjpeg-turbo/default.nix
@@ -0,0 +1,117 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, nasm
+, openjdk
+, enableJava ? false # whether to build the java wrapper
+, enableJpeg7 ? false # whether to build libjpeg with v7 compatibility
+, enableJpeg8 ? false # whether to build libjpeg with v8 compatibility
+, enableStatic ? stdenv.hostPlatform.isStatic
+, enableShared ? !stdenv.hostPlatform.isStatic
+
+# for passthru.tests
+, dvgrab
+, epeg
+, freeimage
+, gd
+, graphicsmagick
+, imagemagick
+, imlib2
+, jhead
+, libjxl
+, mjpegtools
+, opencv
+, python3
+, vips
+, testers
+}:
+
+assert !(enableJpeg7 && enableJpeg8);  # pick only one or none, not both
+
+stdenv.mkDerivation (finalAttrs: {
+
+  pname = "libjpeg-turbo";
+  version = "3.0.2";
+
+  src = fetchFromGitHub {
+    owner = "libjpeg-turbo";
+    repo = "libjpeg-turbo";
+    rev = finalAttrs.version;
+    hash = "sha256-xHjd0WHN50b75wdWPHUwfmJGsiWKmj+zA59UwakIo74=";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "CMAKE_CROSSCOMPILING_EMULATOR=env-fix.patch";
+      url = "https://github.com/libjpeg-turbo/libjpeg-turbo/compare/36c51dd3eb60ebde3ca77d3cfa7df3422f1aaaf1..b6ee1016abbc55116304ad396cf88aa19391e10a.patch";
+      hash = "sha256-dNwXicvZEsG02TBaM5nYMlZ+VczT/Dfx6ZM/6huZpwE=";
+    })
+
+    # This is needed by freeimage
+    ./0001-Compile-transupp.c-as-part-of-the-library.patch
+  ] ++ lib.optionals (!stdenv.hostPlatform.isMinGW) [
+    ./0002-Make-exported-symbols-in-transupp.c-weak.patch
+  ] ++ lib.optionals stdenv.hostPlatform.isMinGW [
+    ./mingw-boolean.patch
+  ];
+
+  outputs = [ "bin" "dev" "dev_private" "out" "man" "doc" ];
+
+  postFixup = ''
+    moveToOutput include/transupp.h $dev_private
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    nasm
+  ] ++ lib.optionals enableJava [
+    openjdk
+  ];
+
+  cmakeFlags = [
+    "-DENABLE_STATIC=${if enableStatic then "1" else "0"}"
+    "-DENABLE_SHARED=${if enableShared then "1" else "0"}"
+  ] ++ lib.optionals enableJava [
+    "-DWITH_JAVA=1"
+  ] ++ lib.optionals enableJpeg7 [
+    "-DWITH_JPEG7=1"
+  ] ++ lib.optionals enableJpeg8 [
+    "-DWITH_JPEG8=1"
+  ] ++ lib.optionals stdenv.hostPlatform.isRiscV [
+    # https://github.com/libjpeg-turbo/libjpeg-turbo/issues/428
+    # https://github.com/libjpeg-turbo/libjpeg-turbo/commit/88bf1d16786c74f76f2e4f6ec2873d092f577c75
+    "-DFLOATTEST=fp-contract"
+  ];
+
+  doInstallCheck = true;
+  installCheckTarget = "test";
+
+  passthru.tests = {
+    inherit
+      dvgrab
+      epeg
+      freeimage
+      gd
+      graphicsmagick
+      imagemagick
+      imlib2
+      jhead
+      libjxl
+      mjpegtools
+      opencv
+      vips;
+    inherit (python3.pkgs) pillow imread pyturbojpeg;
+    pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+  };
+
+  meta = with lib; {
+    homepage = "https://libjpeg-turbo.org/";
+    description = "A faster (using SIMD) libjpeg implementation";
+    license = licenses.ijg; # and some parts under other BSD-style licenses
+    pkgConfigModules = [ "libjpeg" "libturbojpeg" ];
+    maintainers = with maintainers; [ vcunat colemickens kamadorueda ];
+    platforms = platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libjpeg-turbo/mingw-boolean.patch b/nixpkgs/pkgs/development/libraries/libjpeg-turbo/mingw-boolean.patch
new file mode 100644
index 000000000000..9b9483d63987
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libjpeg-turbo/mingw-boolean.patch
@@ -0,0 +1,19 @@
+Ported to updated libjpeg-turbo from
+https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-libjpeg-turbo/jpeg-typedefs.patch
+--- a/jmorecfg.h	2012-02-10 06:47:55 +0300
++++ b/jmorecfg.h	2012-05-03 10:29:13 +0400
+@@ -224,7 +224,13 @@
+  * Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
+  */
+ 
+-#ifndef HAVE_BOOLEAN
++#if defined(_WIN32) && !defined(HAVE_BOOLEAN)
++#ifndef __RPCNDR_H__
++typedef unsigned char boolean;
++#endif
++#define HAVE_BOOLEAN
++#endif
++#if !defined(HAVE_BOOLEAN) && !defined(__RPCNDR_H__)
+ typedef int boolean;
+ #endif
+ #ifndef FALSE			/* in case these macros already exist */
diff --git a/nixpkgs/pkgs/development/libraries/libjpeg/default.nix b/nixpkgs/pkgs/development/libraries/libjpeg/default.nix
new file mode 100644
index 000000000000..d161ff362bcb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libjpeg/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl
+, testers
+, static ? false
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libjpeg";
+  version = "9f";
+
+  src = fetchurl {
+    url = "http://www.ijg.org/files/jpegsrc.v${finalAttrs.version}.tar.gz";
+    sha256 = "sha256-BHBcEQyyRpyqeftx+6PXv4NJFHBulkGkWJSFwfgyVls=";
+  };
+
+  configureFlags = lib.optional static "--enable-static --disable-shared";
+
+  outputs = [ "bin" "dev" "out" "man" ];
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    homepage = "https://www.ijg.org/";
+    description = "A library that implements the JPEG image file format";
+    maintainers = with maintainers; [ ];
+    license = licenses.free;
+    pkgConfigModules = [ "libjpeg" ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libjson-rpc-cpp/default.nix b/nixpkgs/pkgs/development/libraries/libjson-rpc-cpp/default.nix
new file mode 100644
index 000000000000..8e80b9bd8405
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libjson-rpc-cpp/default.nix
@@ -0,0 +1,101 @@
+{ lib, stdenv
+, fetchFromGitHub
+, fetchpatch
+, pkg-config
+, cmake
+, argtable
+, catch2
+, curl
+, doxygen
+, hiredis
+, jsoncpp
+, libmicrohttpd
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libjson-rpc-cpp";
+  version = "1.3.0";
+
+  src = fetchFromGitHub {
+    owner = "cinemast";
+    repo = "libjson-rpc-cpp";
+    sha256 = "sha256-EAakiqlfMprwLjloDekOssaB/EnAmn5njcwHGZtYs9w=";
+    rev = "v${version}";
+  };
+
+  env.NIX_CFLAGS_COMPILE = "-I${catch2}/include/catch2";
+
+  patches = [
+    (fetchpatch {
+      name = "int-to-MHD_Result.patch";
+      url = "https://patch-diff.githubusercontent.com/raw/cinemast/libjson-rpc-cpp/pull/299.patch";
+      sha256 = "sha256-hiey6etzbOxhMElTMX7offKbey7c2OO/UWeN03k0AaM=";
+    })
+  ];
+
+  nativeBuildInputs = [ pkg-config cmake doxygen ];
+  buildInputs = [
+    argtable
+    catch2
+    curl
+    hiredis
+    jsoncpp
+    libmicrohttpd
+  ];
+
+  postPatch = ''
+    for f in cmake/FindArgtable.cmake \
+             src/stubgenerator/stubgenerator.cpp \
+             src/stubgenerator/stubgeneratorfactory.cpp
+    do
+      sed -i -re 's/argtable2/argtable3/g' $f
+    done
+
+    sed -i -re 's#MATCHES "jsoncpp"#MATCHES ".*/jsoncpp/json$"#g' cmake/FindJsoncpp.cmake
+  '';
+
+  preConfigure = ''
+    mkdir -p Build/Install
+    pushd Build
+  '';
+
+  # this hack is needed because the cmake scripts
+  # require write permission to absolute paths
+  configurePhase = ''
+    runHook preConfigure
+    cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd)/Install \
+             -DCMAKE_BUILD_TYPE=Release
+    runHook postConfigure
+  '';
+
+  preInstall = ''
+    function fixRunPath {
+      p=$(patchelf --print-rpath $1)
+      q="$p:${lib.makeLibraryPath [ jsoncpp argtable libmicrohttpd curl ]}:$out/lib"
+      patchelf --set-rpath $q $1
+    }
+
+    mkdir -p $out
+  '';
+
+  postInstall = ''
+    sed -i -re "s#-([LI]).*/Build/Install(.*)#-\1$out\2#g" Install/lib64/pkgconfig/*.pc
+    for f in Install/lib64/*.so* $(find Install/bin -executable -type f); do
+      fixRunPath $f
+    done
+    cp -r Install/* $out
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    make install
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "C++ framework for json-rpc (json remote procedure call)";
+    homepage = "https://github.com/cinemast/libjson-rpc-cpp";
+    license = licenses.mit;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libjson/default.nix b/nixpkgs/pkgs/development/libraries/libjson/default.nix
new file mode 100644
index 000000000000..30e36e965858
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libjson/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl, unzip }:
+
+stdenv.mkDerivation rec {
+  pname = "libjson";
+  version = "7.6.1";
+  src = fetchurl {
+    url = "mirror://sourceforge/libjson/libjson_${version}.zip";
+    sha256 = "0xkk5qc7kjcdwz9l04kmiz1nhmi7iszl3k165phf53h3a4wpl9h7";
+  };
+  patches = [ ./install-fix.patch ];
+  nativeBuildInputs = [ unzip ];
+  makeFlags = [ "prefix=$(out)" ];
+  env.NIX_CFLAGS_COMPILE = toString [ "-std=c++11" ];
+  preInstall = "mkdir -p $out/lib";
+
+  meta = with lib; {
+    homepage = "http://libjson.sourceforge.net/";
+    description = "A JSON reader and writer";
+    longDescription = ''
+      A JSON reader and writer which is super-efficient and
+      usually runs circles around other JSON libraries.
+      It's highly customizable to optimize for your particular project, and
+      very lightweight. For Windows, OSX, or Linux. Works in any language.
+    '';
+    platforms = platforms.unix;
+    license = licenses.bsd2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libjson/install-fix.patch b/nixpkgs/pkgs/development/libraries/libjson/install-fix.patch
new file mode 100644
index 000000000000..f074c8ba3aa5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libjson/install-fix.patch
@@ -0,0 +1,12 @@
+diff -Naur libjson-orig/makefile libjson/makefile
+--- libjson-orig/makefile	2012-05-30 05:15:42.000000000 -0400
++++ libjson/makefile	2013-08-15 09:17:41.154245534 -0400
+@@ -266,7 +266,7 @@
+ 	cp -r ./$(srcdir)/JSONDefs $(include_path)/$(libname_hdr)/$(srcdir)
+ 	chmod -R a+r $(include_path)/$(libname_hdr)
+ 	find  $(include_path)/$(libname_hdr) -type d -exec chmod a+x {} \;
+-	cp -rv $(srcdir)/Dependencies/ $(include_path)/$(libname_hdr)/$(srcdir)
++	cp -rv $(srcdir)/../Dependencies/ $(include_path)/$(libname_hdr)/$(srcdir)/..
+ 	@echo "Install header files: Done."
+ 
+ clean: banner
diff --git a/nixpkgs/pkgs/development/libraries/libjwt/default.nix b/nixpkgs/pkgs/development/libraries/libjwt/default.nix
new file mode 100644
index 000000000000..4d2c11601135
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libjwt/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, lib, fetchFromGitHub, autoreconfHook, pkg-config, jansson, openssl }:
+
+stdenv.mkDerivation rec {
+  pname = "libjwt";
+  version = "1.16.0";
+
+  src = fetchFromGitHub {
+    owner = "benmcollins";
+    repo = "libjwt";
+    rev = "v${version}";
+    sha256 = "sha256-5hbmEen31lB6Xdv5WU+8InKa0+1OsuB8QG0jVa1+a2w=";
+  };
+
+  buildInputs = [ jansson openssl ];
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  meta = with lib; {
+    homepage = "https://github.com/benmcollins/libjwt";
+    description = "JWT C Library";
+    license = licenses.mpl20;
+    maintainers = with maintainers; [ pnotequalnp ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libjxl/default.nix b/nixpkgs/pkgs/development/libraries/libjxl/default.nix
new file mode 100644
index 000000000000..833b58e59428
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libjxl/default.nix
@@ -0,0 +1,121 @@
+{ stdenv, lib, fetchFromGitHub
+, brotli
+, cmake
+, giflib
+, gperftools
+, gtest
+, libhwy
+, libjpeg
+, libpng
+, libwebp
+, openexr_3
+, pkg-config
+, zlib
+, asciidoc
+, graphviz
+, doxygen
+, python3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libjxl";
+  version = "0.9.1";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "libjxl";
+    repo = "libjxl";
+    rev = "v${version}";
+    hash = "sha256-n5KNbbw6NQRROEM7Cojla/igRCFNawUq7nfhzJlMlPI=";
+    # There are various submodules in `third_party/`.
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [
+    cmake
+    gtest
+    pkg-config
+    asciidoc
+    doxygen
+    python3
+  ];
+
+  depsBuildBuild = [
+    graphviz
+  ];
+
+  # Functionality not currently provided by this package
+  # that the cmake build can apparently use:
+  #     OpenGL/GLUT (for Examples -> comparison with sjpeg)
+  #     viewer (see `cmakeFlags`)
+  #     plugins like for GDK and GIMP (see `cmakeFlags`)
+
+  # Vendored libraries:
+  # `libjxl` currently vendors many libraries as git submodules that they
+  # might patch often (e.g. test/gmock, see
+  # https://github.com/NixOS/nixpkgs/pull/103160#discussion_r519487734).
+  # When it has stabilised in the future, we may want to tell the build
+  # to use use nixpkgs system libraries.
+
+  # As of writing, libjxl does not point out all its dependencies
+  # conclusively in its README or otherwise; they can best be determined
+  # by checking the CMake output for "Could NOT find".
+  buildInputs = [
+    giflib
+    gperftools # provides `libtcmalloc`
+    libjpeg
+    libpng
+    libwebp
+    openexr_3
+    zlib
+  ];
+
+  propagatedBuildInputs = [
+    brotli
+    libhwy
+  ];
+
+  cmakeFlags = [
+    # For C dependencies like brotli, which are dynamically linked,
+    # we want to use the system libraries, so that we don't have to care about
+    # installing their .so files generated by this build.
+    # The other C++ dependencies are statically linked in, so there
+    # using the vendorered ones is easier.
+    "-DJPEGXL_FORCE_SYSTEM_BROTLI=ON"
+
+    # Use our version of highway, though it is still statically linked in
+    "-DJPEGXL_FORCE_SYSTEM_HWY=ON"
+
+    # Use our version of gtest
+    "-DJPEGXL_FORCE_SYSTEM_GTEST=ON"
+
+    # TODO: Update this package to enable this (overridably via an option):
+    # Viewer tools for evaluation.
+    # "-DJPEGXL_ENABLE_VIEWERS=ON"
+
+    # TODO: Update this package to enable this (overridably via an option):
+    # Enable plugins, such as:
+    # * the `gdk-pixbuf` one, which allows applications like `eog` to load jpeg-xl files
+    # * the `gimp` one, which allows GIMP to load jpeg-xl files
+    # "-DJPEGXL_ENABLE_PLUGINS=ON"
+  ] ++ lib.optionals stdenv.hostPlatform.isStatic [
+    "-DJPEGXL_STATIC=ON"
+  ] ++ lib.optionals stdenv.hostPlatform.isAarch32 [
+    "-DJPEGXL_FORCE_NEON=ON"
+  ];
+
+  CXXFLAGS = lib.optionalString stdenv.hostPlatform.isAarch32 "-mfp16-format=ieee";
+
+  # FIXME x86_64-darwin:
+  # https://github.com/NixOS/nixpkgs/pull/204030#issuecomment-1352768690
+  doCheck = with stdenv; !(hostPlatform.isi686 || isDarwin && isx86_64);
+
+  meta = with lib; {
+    homepage = "https://github.com/libjxl/libjxl";
+    description = "JPEG XL image format reference implementation.";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ nh2 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libkate/default.nix b/nixpkgs/pkgs/development/libraries/libkate/default.nix
new file mode 100644
index 000000000000..d2ef623bf157
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libkate/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchurl, libogg, libpng }:
+
+stdenv.mkDerivation rec {
+  pname = "libkate";
+  version = "0.4.1";
+
+  src = fetchurl {
+    url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/libkate/${pname}-${version}.tar.gz";
+    sha256 = "0s3vr2nxfxlf1k75iqpp4l78yf4gil3f0v778kvlngbchvaq23n4";
+  };
+
+  buildInputs = [ libogg libpng ];
+
+  meta = with lib; {
+    description = "A library for encoding and decoding Kate streams";
+    longDescription = ''
+      This is libkate, the reference implementation of a codec for the Kate
+      bitstream format. Kate is a karaoke and text codec meant for encapsulation
+      in an Ogg container. It can carry Unicode text, images, and animate
+      them.'';
+    homepage = "https://code.google.com/archive/p/libkate/";
+    platforms = platforms.unix;
+    license = licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libkcapi/default.nix b/nixpkgs/pkgs/development/libraries/libkcapi/default.nix
new file mode 100644
index 000000000000..93405b1f9e3b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libkcapi/default.nix
@@ -0,0 +1,53 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, buildPackages
+  # libkcapi offers multiple tools. They can be disabled for minimization.
+, kcapi-test ? true
+, kcapi-speed ? true
+, kcapi-hasher ? true
+, kcapi-rngapp ? true
+, kcapi-encapp ? true
+, kcapi-dgstapp ? true
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libkcapi";
+  version = "1.5.0";
+
+  src = fetchFromGitHub {
+    owner = "smuellerDD";
+    repo = "libkcapi";
+    rev = "v${version}";
+    hash = "sha256-xOI29cjhUGUeHLaYIrPA5ZwwCE9lBdZG6kaW0lo1uL8=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  # libkcapi looks also for a host c compiler when cross-compiling
+  # otherwise you obtain following error message:
+  # "error: no acceptable C compiler found in $PATH"
+  depsBuildBuild = [
+    buildPackages.stdenv.cc
+  ];
+
+  enableParallelBuilding = true;
+
+  configureFlags =
+    lib.optional kcapi-test "--enable-kcapi-test" ++
+    lib.optional kcapi-speed "--enable-kcapi-speed" ++
+    lib.optional kcapi-hasher "--enable-kcapi-hasher" ++
+    lib.optional kcapi-rngapp "--enable-kcapi-rngapp" ++
+    lib.optional kcapi-encapp "--enable-kcapi-encapp" ++
+    lib.optional kcapi-dgstapp "--enable-kcapi-dgstapp"
+  ;
+
+  meta = {
+    homepage = "http://www.chronox.de/libkcapi.html";
+    description = "Linux Kernel Crypto API User Space Interface Library";
+    license = with lib.licenses; [ bsd3 gpl2Only ];
+    platforms = lib.platforms.linux;
+    maintainers = with lib.maintainers; [ orichter thillux ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libkqueue/default.nix b/nixpkgs/pkgs/development/libraries/libkqueue/default.nix
new file mode 100644
index 000000000000..5f96353d9d69
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libkqueue/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "libkqueue";
+  version = "2.6.2";
+
+  src = fetchFromGitHub {
+    owner = "mheily";
+    repo = "libkqueue";
+    rev = "v${version}";
+    sha256 = "sha256-5Zds9sqHkFldJf3ThTPOiaGKohmFcIzY0ARDA0iswVk=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "kqueue(2) compatibility library";
+    homepage = "https://github.com/mheily/libkqueue";
+    changelog = "https://github.com/mheily/libkqueue/raw/v${version}/ChangeLog";
+    license = licenses.bsd2;
+    maintainers = [ maintainers.marsam ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libkrun/default.nix b/nixpkgs/pkgs/development/libraries/libkrun/default.nix
new file mode 100644
index 000000000000..dbee4c9a3582
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libkrun/default.nix
@@ -0,0 +1,59 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, rustPlatform
+, cargo
+, pkg-config
+, glibc
+, openssl
+, libkrunfw
+, rustc
+, sevVariant ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libkrun";
+  version = "1.7.2";
+
+  src = fetchFromGitHub {
+    owner = "containers";
+    repo = "libkrun";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-cP+Pxl/9QIsoGysXTBZJ86q57cIMA7TJenMWtcOI+Y4=";
+  };
+
+  cargoDeps = rustPlatform.fetchCargoTarball {
+    inherit pname version src;
+    hash = "sha256-qVyHC015QJEt6LZ8br3H0nucYKhYGBMtyB2IBaixTqk=";
+  };
+
+  nativeBuildInputs = [
+    rustPlatform.cargoSetupHook
+    cargo
+    rustc
+  ] ++ lib.optionals sevVariant [
+    pkg-config
+  ];
+
+  buildInputs = [
+    (libkrunfw.override { inherit sevVariant; })
+    glibc
+    glibc.static
+  ] ++ lib.optionals sevVariant [
+    openssl
+  ];
+
+  makeFlags = [
+    "PREFIX=${placeholder "out"}"
+  ] ++ lib.optionals sevVariant [
+    "SEV=1"
+  ];
+
+  meta = with lib; {
+    description = "A dynamic library providing Virtualization-based process isolation capabilities";
+    homepage = "https://github.com/containers/libkrun";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ nickcao ];
+    platforms = libkrunfw.meta.platforms;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libkrunfw/default.nix b/nixpkgs/pkgs/development/libraries/libkrunfw/default.nix
new file mode 100644
index 000000000000..f4f67db652ca
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libkrunfw/default.nix
@@ -0,0 +1,61 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchurl
+, flex
+, bison
+, bc
+, elfutils
+, python3
+, sevVariant ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libkrunfw";
+  version = "4.0.0";
+
+  src = fetchFromGitHub {
+    owner = "containers";
+    repo = "libkrunfw";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-9oVl4mlJE7QHeehG86pbh7KdShZNUGwlnO75k/F/PQ0=";
+  };
+
+  kernelSrc = fetchurl {
+    url = "https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.4.7.tar.xz";
+    hash = "sha256-3hQ8th3Kp1bAX1b/NRRDFtgQYVgZUYoz40dU8GTEp9g=";
+  };
+
+  postPatch = ''
+    substituteInPlace Makefile \
+      --replace 'curl $(KERNEL_REMOTE) -o $(KERNEL_TARBALL)' 'ln -s $(kernelSrc) $(KERNEL_TARBALL)'
+  '';
+
+  nativeBuildInputs = [
+    flex
+    bison
+    bc
+    python3
+    python3.pkgs.pyelftools
+  ];
+
+  buildInputs = [
+    elfutils
+  ];
+
+  makeFlags = [
+    "PREFIX=${placeholder "out"}"
+  ] ++ lib.optionals sevVariant [
+    "SEV=1"
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "A dynamic library bundling the guest payload consumed by libkrun";
+    homepage = "https://github.com/containers/libkrunfw";
+    license = with licenses; [ lgpl2Only lgpl21Only ];
+    maintainers = with maintainers; [ nickcao ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libks/default.nix b/nixpkgs/pkgs/development/libraries/libks/default.nix
new file mode 100644
index 000000000000..d3279bbe991a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libks/default.nix
@@ -0,0 +1,56 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, pkg-config
+, libuuid
+, openssl
+, libossp_uuid
+, freeswitch
+, nix-update-script
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libks";
+  version = "2.0.3";
+
+  src = fetchFromGitHub {
+    owner = "signalwire";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-iAgiGo/PMG0L4S/ZqSPL7Hl8akCNyva4JhaOkcHit8w=";
+  };
+
+  patches = [
+    (fetchpatch {
+      url = "https://raw.githubusercontent.com/openwrt/telephony/5ced7ea4fc9bd746273d564bf3c102f253d2182e/libs/libks/patches/01-find-libm.patch";
+      sha256 = "1hyrsdxg69d08qzvf3mbrx2363lw52jcybw8i3ynzqcl228gcg8a";
+    })
+  ];
+
+  dontUseCmakeBuildDir = true;
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [ openssl ]
+    ++ lib.optional stdenv.isLinux libuuid
+    ++ lib.optional stdenv.isDarwin libossp_uuid;
+
+  passthru = {
+    tests.freeswitch = freeswitch;
+    updateScript = nix-update-script { };
+  };
+
+  meta = with lib; {
+    broken = stdenv.isDarwin;
+    description = "Foundational support for signalwire C products";
+    homepage = "https://github.com/signalwire/libks";
+    maintainers = with lib.maintainers; [ misuzu ];
+    platforms = platforms.unix;
+    license = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libksba/default.nix b/nixpkgs/pkgs/development/libraries/libksba/default.nix
new file mode 100644
index 000000000000..8f22ede81669
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libksba/default.nix
@@ -0,0 +1,33 @@
+{ buildPackages, lib, stdenv, fetchurl, gettext, libgpg-error }:
+
+stdenv.mkDerivation rec {
+  pname = "libksba";
+  version = "1.6.5";
+
+  src = fetchurl {
+    url = "mirror://gnupg/libksba/libksba-${version}.tar.bz2";
+    hash = "sha256-pWRijFdMmSh5mHU/mNdQur2RpOnbRR9GrRQEZu8qbRY=";
+  };
+
+  outputs = [ "out" "dev" "info" ];
+
+  buildInputs = [ gettext ];
+  propagatedBuildInputs = [ libgpg-error ];
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+
+  configureFlags = [ "--with-libgpg-error-prefix=${libgpg-error.dev}" ];
+
+  postInstall = ''
+    mkdir -p $dev/bin
+    mv $out/bin/*-config $dev/bin/
+    rmdir --ignore-fail-on-non-empty $out/bin
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.gnupg.org";
+    description = "CMS and X.509 access library";
+    platforms = platforms.all;
+    maintainers = with maintainers; [ ];
+    license = licenses.lgpl3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libksi/default.nix b/nixpkgs/pkgs/development/libraries/libksi/default.nix
new file mode 100644
index 000000000000..634e52b97ab6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libksi/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, openssl, curl }:
+
+stdenv.mkDerivation rec {
+  pname = "libksi";
+  version = "3.21.3075";
+
+  src = fetchFromGitHub {
+    owner = "Guardtime";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-JEdjy91+8xJPNzjkumadT05SxcvtM551+SjLN1SQcAU=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ openssl curl ];
+
+  configureFlags = [
+    "--with-openssl=${openssl.dev}"
+    "--with-cafile=/etc/ssl/certs/ca-certificates.crt"
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/GuardTime/libksi";
+    description = "Keyless Signature Infrastructure API library";
+    license = licenses.asl20;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/liblangtag/default.nix b/nixpkgs/pkgs/development/libraries/liblangtag/default.nix
new file mode 100644
index 000000000000..0988bb9259d7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liblangtag/default.nix
@@ -0,0 +1,63 @@
+{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook, gtk-doc, gettext
+, pkg-config, glib, libxml2, gobject-introspection, gnome-common, unzip
+}:
+
+stdenv.mkDerivation rec {
+  pname = "liblangtag";
+  version = "0.6.3";
+
+  # Artifact tarball contains lt-localealias.h needed for darwin
+  src = fetchurl {
+    url = "https://bitbucket.org/tagoh/liblangtag/downloads/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-HxKiCgLsOo0i5U3tuLaDpDycFgvaG6M3vxBgYHrnM70=";
+  };
+
+  core_zip = fetchurl {
+    # please update if an update is available
+    url = "http://www.unicode.org/Public/cldr/37/core.zip";
+    sha256 = "0myswkvvaxvrz9zwq4zh65sygfd9n72cd5rk4pwacqba4nxgb4xs";
+  };
+
+  language_subtag_registry = fetchurl {
+    url = "http://www.iana.org/assignments/language-subtag-registry";
+    sha256 = "0y9x5gra6jri4sk16f0dp69p06almnsl48rs85605f035kf539qm";
+  };
+
+  patches = [
+    # Pull upstream fix for gcc-13 build compatibility
+    (fetchpatch {
+      name = "gcc-13-p1.patch";
+      url = "https://bitbucket.org/tagoh/liblangtag/commits/0b6e9f4616a34146e7443c4e9a7197153645e40b/raw";
+      hash = "sha256-69wJDVwDCP5OPHKoRn9WZNrvfCvmlX3SwtRmcpJHn2o=";
+    })
+    (fetchpatch {
+      name = "gcc-13-p1.patch";
+      url = "https://bitbucket.org/tagoh/liblangtag/commits/1497c4477d0fa0b7df1886951b953dd3cea54427/raw";
+      hash = "sha256-k0Uaeg6YLxVze4fgf0kiyuiZJ5wh2Jq3h7cFPQPtwyo=";
+    })
+  ];
+
+  postPatch = ''
+    gtkdocize
+    cp "${core_zip}" data/core.zip
+    touch data/stamp-core-zip
+    cp "${language_subtag_registry}" data/language-subtag-registry
+  '';
+
+  configureFlags =
+    lib.optional
+      (stdenv.hostPlatform.libc == "glibc")
+      "--with-locale-alias=${stdenv.cc.libc}/share/locale/locale.alias";
+
+  buildInputs = [ gettext glib libxml2 gnome-common ];
+  nativeBuildInputs = [ autoreconfHook gtk-doc gettext pkg-config unzip gobject-introspection ];
+
+  meta = with lib; {
+    description = "An interface library to access tags for identifying languages";
+    license = licenses.mpl20;
+    maintainers = [ maintainers.raskin ];
+    platforms = platforms.unix;
+    # There are links to a homepage that are broken by a BitBucket change
+    homepage = "https://bitbucket.org/tagoh/liblangtag/overview";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/liblastfm/default.nix b/nixpkgs/pkgs/development/libraries/liblastfm/default.nix
new file mode 100644
index 000000000000..7dcc3b0d0cc0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liblastfm/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config, which, cmake
+, fftwSinglePrec, libsamplerate, qtbase
+, darwin }:
+
+stdenv.mkDerivation rec {
+  pname = "liblastfm-unstable";
+  version = "2019-08-23";
+
+  src = fetchFromGitHub {
+    owner = "lastfm";
+    repo = "liblastfm";
+    rev = "2ce2bfe1879227af8ffafddb82b218faff813db9";
+    sha256 = "1crih9xxf3rb109aqw12bjqv47z28lvlk2dpvyym5shf82nz6yd0";
+  };
+
+  patches = [(fetchpatch {
+    url = "https://github.com/lastfm/liblastfm/commit/9c5d072b55f2863310e40291677e6397e9cbc3c2.patch";
+    name = "0001-Remove-deprecated-staging-server-and-fix-test-for-QT5-at-Ubuntu-19.10.patch";
+    sha256 = "04r14prydxshjgfws3pjajjmp2msszhjjs1mjh8s66yg29vq620l";
+  })];
+
+  nativeBuildInputs = [ pkg-config which cmake ];
+  buildInputs = [ fftwSinglePrec libsamplerate qtbase ]
+    ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.SystemConfiguration;
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "11") "-std=c++11";
+
+  dontWrapQtApps = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/lastfm/liblastfm";
+    description = "Official LastFM library";
+    platforms = platforms.unix;
+    maintainers = [ ];
+    license = licenses.gpl3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/liblastfmSF/default.nix b/nixpkgs/pkgs/development/libraries/liblastfmSF/default.nix
new file mode 100644
index 000000000000..f25ee3afae4a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liblastfmSF/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl, pkg-config, curl, openssl }:
+
+stdenv.mkDerivation rec {
+  pname = "liblastfm-SF";
+  version = "0.5";
+
+  nativeBuildInputs = [ pkg-config ];
+
+  propagatedBuildInputs = [ curl openssl ];
+
+  src = fetchurl {
+    url = "mirror://sourceforge/liblastfm/libclastfm-${version}.tar.gz";
+    sha256 = "0hpfflvfx6r4vvsbvdc564gkby8kr07p8ma7hgpxiy2pnlbpian9";
+  };
+
+  meta = {
+    homepage = "https://liblastfm.sourceforge.net";
+    description = "Unofficial C lastfm library";
+    license = lib.licenses.gpl3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/liblaxjson/default.nix b/nixpkgs/pkgs/development/libraries/liblaxjson/default.nix
new file mode 100644
index 000000000000..9464714d5cc9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liblaxjson/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  version = "1.0.5";
+  pname = "liblaxjson";
+
+  src = fetchFromGitHub {
+    owner = "andrewrk";
+    repo = "liblaxjson";
+    rev = version;
+    sha256 = "01iqbpbhnqfifhv82m6hi8190w5sdim4qyrkss7z1zyv3gpchc5s";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "Library for parsing JSON config files";
+    homepage = "https://github.com/andrewrk/liblaxjson";
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.andrewrk ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/liblc3/default.nix b/nixpkgs/pkgs/development/libraries/liblc3/default.nix
new file mode 100644
index 000000000000..f2ec852d3bf0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liblc3/default.nix
@@ -0,0 +1,38 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, meson
+, ninja
+}:
+
+let
+  name = "liblc3";
+  version = "1.0.4";
+in
+stdenv.mkDerivation {
+  pname = name;
+  version = version;
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "liblc3";
+    rev = "v${version}";
+    sha256 = "sha256-nQJgF/cWoCx5TkX4xOaLB9SzvhVXPY29bLh7UwPMWEE=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+  ];
+
+  meta = with lib; {
+    description = "LC3 (Low Complexity Communication Codec) is an efficient low latency audio codec";
+    homepage = "https://github.com/google/liblc3";
+    license = licenses.asl20;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ jansol ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/liblcf/default.nix b/nixpkgs/pkgs/development/libraries/liblcf/default.nix
new file mode 100644
index 000000000000..b91b6ea709ad
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liblcf/default.nix
@@ -0,0 +1,45 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+, expat
+, icu
+}:
+
+stdenv.mkDerivation rec {
+  pname = "liblcf";
+  version = "0.8";
+
+  src = fetchFromGitHub {
+    owner = "EasyRPG";
+    repo = "liblcf";
+    rev = version;
+    hash = "sha256-jJGIsNw7wplTL5FBWGL8osb9255o9ZaWgl77R+RLDMM=";
+  };
+
+  dtrictDeps = true;
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ];
+
+  propagatedBuildInputs = [
+    expat
+    icu
+  ];
+
+  enableParallelBuilding = true;
+  enableParallelChecking = true;
+
+  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
+
+  meta = with lib; {
+    description = "Library to handle RPG Maker 2000/2003 and EasyRPG projects";
+    homepage = "https://github.com/EasyRPG/liblcf";
+    license = licenses.mit;
+    maintainers = with maintainers; [ yana ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libliftoff/default.nix b/nixpkgs/pkgs/development/libraries/libliftoff/default.nix
new file mode 100644
index 000000000000..08b7ab13a275
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libliftoff/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitLab
+, meson, pkg-config, ninja
+, libdrm
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libliftoff";
+  version = "0.4.1";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "emersion";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-NPwhsd6IOQ0XxNQQNdaaM4kmwoLftokV86WYhoa5csY=";
+  };
+
+  nativeBuildInputs = [ meson pkg-config ninja ];
+
+  buildInputs = [ libdrm ];
+
+  meta = with lib; {
+    description = "A lightweight KMS plane library";
+    longDescription = ''
+      libliftoff eases the use of KMS planes from userspace without standing in
+      your way. Users create "virtual planes" called layers, set KMS properties
+      on them, and libliftoff will pick planes for these layers if possible.
+    '';
+    inherit (src.meta) homepage;
+    changelog = "https://github.com/emersion/libliftoff/releases/tag/v${version}";
+    license     = licenses.mit;
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ primeos Scrumplex ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/liblinear/default.nix b/nixpkgs/pkgs/development/libraries/liblinear/default.nix
new file mode 100644
index 000000000000..b75aba83de69
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liblinear/default.nix
@@ -0,0 +1,42 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+let
+  soVersion = "5";
+in stdenv.mkDerivation rec {
+  pname = "liblinear";
+  version = "2.47";
+
+  src = fetchFromGitHub {
+    owner = "cjlin1";
+    repo = "liblinear";
+    rev = "v${builtins.replaceStrings ["."] [""] version}";
+    sha256 = "sha256-so7uCc/52NdN0V2Ska8EUdw/wSegaudX5AF+c0xe5jk=";
+  };
+
+  makeFlags = [ "AR=${stdenv.cc.targetPrefix}ar" "RANLIB=${stdenv.cc.targetPrefix}ranlib" ];
+
+  outputs = [ "bin" "dev" "out" ];
+
+  buildFlags = [ "lib" "predict" "train" ];
+
+  installPhase = ''
+    ${if stdenv.isDarwin then ''
+      install -D liblinear.so.${soVersion} $out/lib/liblinear.${soVersion}.dylib
+      ln -s $out/lib/liblinear.${soVersion}.dylib $out/lib/liblinear.dylib
+    '' else ''
+      install -Dt $out/lib liblinear.so.${soVersion}
+      ln -s $out/lib/liblinear.so.${soVersion} $out/lib/liblinear.so
+    ''}
+    install -D train $bin/bin/liblinear-train
+    install -D predict $bin/bin/liblinear-predict
+    install -Dm444 -t $dev/include linear.h
+  '';
+
+  meta = with lib; {
+    description = "A library for large linear classification";
+    homepage = "https://www.csie.ntu.edu.tw/~cjlin/liblinear/";
+    license = licenses.bsd3;
+    maintainers = [ ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/liblinphone/backport-cpp17.patch b/nixpkgs/pkgs/development/libraries/liblinphone/backport-cpp17.patch
new file mode 100644
index 000000000000..d9eb75fa2768
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liblinphone/backport-cpp17.patch
@@ -0,0 +1,98 @@
+From 9ece6e77dcf6545c3b8104068302c6243e3a5e88 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micka=C3=ABl=20Turnel?=
+ <mickael.turnel@belledonne-communications.com>
+Date: Wed, 1 Mar 2023 09:14:53 +0100
+Subject: [PATCH] Set c++ version 17 and fix compilation errors
+
+Backported-by: Lorenz Brun <lorenz@brun.one>
+
+---
+ CMakeLists.txt                           |  2 +-
+ daemon/daemon.cc                         |  2 +-
+ libxsd/xsd/cxx/config.hxx                |  2 +-
+ src/conference/session/streams-group.cpp | 10 +++++-----
+ 4 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 475ff16a8..a771e4595 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -92,7 +92,7 @@ cmake_dependent_option(ENABLE_QRCODE "Enable QRCode support" YES "ENABLE_VIDEO"
+ # * DISABLE_BC_PACKAGE_SEARCH: skip find_package() for every BC package (bctoolbox, ortp, etc.)
+ # * DISABLE_SOCI_PACKAGE_SEARCH: skip find_package() for Soci.
+ 
+-set(CMAKE_CXX_STANDARD 14)
++set(CMAKE_CXX_STANDARD 17)
+ set(CMAKE_CXX_EXTENSIONS NO)
+ 
+ if(NOT CMAKE_BUILD_TYPE)
+diff --git a/daemon/daemon.cc b/daemon/daemon.cc
+index 197fc22ef..fd09edb26 100644
+--- a/daemon/daemon.cc
++++ b/daemon/daemon.cc
+@@ -628,7 +628,7 @@ void Daemon::execCommand(const string &command) {
+ 	ist.get(argsbuf);
+ 	string args = argsbuf.str();
+ 	if (!args.empty() && (args[0] == ' ')) args.erase(0, 1);
+-	list<DaemonCommand*>::iterator it = find_if(mCommands.begin(), mCommands.end(), bind2nd(mem_fun(&DaemonCommand::matches), name));
++	list<DaemonCommand*>::iterator it = find_if(mCommands.begin(), mCommands.end(), [&name](const DaemonCommand *dc) { return dc->matches(name); });
+ 	if (it != mCommands.end()) {
+ 		ms_mutex_lock(&mMutex);
+ 		(*it)->exec(this, args);
+diff --git a/libxsd/xsd/cxx/config.hxx b/libxsd/xsd/cxx/config.hxx
+index 076b107f5..385841731 100644
+--- a/libxsd/xsd/cxx/config.hxx
++++ b/libxsd/xsd/cxx/config.hxx
+@@ -19,7 +19,7 @@
+ #  endif
+ #else
+ #  if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L
+-#    ifdef __GNUC__
++#    if defined(__GNUC__) && !defined(__clang__)
+ #      if (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4
+ #        define XSD_CXX11_NULLPTR
+ #      endif
+diff --git a/src/conference/session/streams-group.cpp b/src/conference/session/streams-group.cpp
+index bff739dda..84277a6b7 100644
+--- a/src/conference/session/streams-group.cpp
++++ b/src/conference/session/streams-group.cpp
+@@ -447,11 +447,11 @@ float StreamsGroup::computeOverallQuality(_functor func){
+ }
+ 
+ float StreamsGroup::getAverageQuality(){
+-	return computeOverallQuality(mem_fun(&Stream::getAverageQuality));
++	return computeOverallQuality(mem_fn(&Stream::getAverageQuality));
+ }
+ 
+ float StreamsGroup::getCurrentQuality(){
+-	return computeOverallQuality(mem_fun(&Stream::getCurrentQuality));
++	return computeOverallQuality(mem_fn(&Stream::getCurrentQuality));
+ }
+ 
+ int StreamsGroup::getAvpfRrInterval()const{
+@@ -481,11 +481,11 @@ bool StreamsGroup::avpfEnabled() const{
+ }
+ 
+ void StreamsGroup::refreshSockets(){
+-	forEach<Stream>(mem_fun(&Stream::refreshSockets));
++	forEach<Stream>(mem_fn(&Stream::refreshSockets));
+ }
+ 
+ void StreamsGroup::computeAndReportBandwidth(){
+-	forEach<Stream>(mem_fun(&Stream::updateBandwidthReports));
++	forEach<Stream>(mem_fn(&Stream::updateBandwidthReports));
+ 	
+ 	if (!bctbx_log_level_enabled(BCTBX_LOG_DOMAIN, BCTBX_LOG_MESSAGE)) return;
+ 	
+@@ -540,7 +540,7 @@ void StreamsGroup::finish(){
+ 	mIceService->finish(); // finish ICE first, as it has actions on the streams.
+ 	for (auto & ss : mSharedServices) ss.second->checkDestroy();
+ 	mSharedServices.clear();
+-	forEach<Stream>(mem_fun(&Stream::finish));
++	forEach<Stream>(mem_fn(&Stream::finish));
+ 	mFinished = true;
+ }
+ 
+-- 
+2.41.0
+
diff --git a/nixpkgs/pkgs/development/libraries/liblinphone/default.nix b/nixpkgs/pkgs/development/libraries/liblinphone/default.nix
new file mode 100644
index 000000000000..c4b792e673fc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liblinphone/default.nix
@@ -0,0 +1,91 @@
+{ lib
+, bc-soci
+, belcard
+, belle-sip
+, cmake
+, doxygen
+, fetchFromGitLab
+, jsoncpp
+, libxml2
+, lime
+, mediastreamer
+, python3
+, sqlite
+, stdenv
+, xercesc
+, zxing-cpp
+}:
+
+stdenv.mkDerivation rec {
+  pname = "liblinphone";
+  version = "5.2.98";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.linphone.org";
+    owner = "public";
+    group = "BC";
+    repo = pname;
+    rev = version;
+    hash = "sha256-kQZePMa7MTaSJLEObM8khfSFYLqhlgTcVyKfTPLwKYU=";
+  };
+
+  patches = [
+    # zxing-cpp 2.0+ requires C++ 17
+    # Manual backport as upstream ran formatters in the meantime
+    ./backport-cpp17.patch
+  ];
+
+  postPatch = ''
+    substituteInPlace src/CMakeLists.txt \
+      --replace "jsoncpp_object" "jsoncpp" \
+      --replace "jsoncpp_static" "jsoncpp"
+  '';
+
+  cmakeFlags = [
+    "-DENABLE_STATIC=NO" # Do not build static libraries
+    "-DENABLE_UNIT_TESTS=NO" # Do not build test executables
+    "-DENABLE_STRICT=NO" # Do not build with -Werror
+  ];
+
+  buildInputs = [
+    # Made by BC
+    belcard
+    belle-sip
+    lime
+    mediastreamer
+
+    # Vendored by BC
+    bc-soci
+
+    jsoncpp
+    libxml2
+    (python3.withPackages (ps: [ ps.pystache ps.six ]))
+    sqlite
+    xercesc
+    zxing-cpp
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    doxygen
+  ];
+
+  strictDeps = true;
+
+  # Some grammar files needed to be copied too from some dependencies. I suppose
+  # if one define a dependency in such a way that its share directory is found,
+  # then this copying would be unnecessary. Instead of actually copying these
+  # files, create a symlink.
+  postInstall = ''
+    mkdir -p $out/share/belr/grammars
+    ln -s ${belcard}/share/belr/grammars/* $out/share/belr/grammars/
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.linphone.org/technical-corner/liblinphone";
+    description = "Library for SIP calls and instant messaging";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ jluttine ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/liblo/default.nix b/nixpkgs/pkgs/development/libraries/liblo/default.nix
new file mode 100644
index 000000000000..1a9ce7c331a0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liblo/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "liblo";
+  version = "0.31";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/liblo/liblo/${version}/${pname}-${version}.tar.gz";
+    sha256 = "0l67rkdhfa8cffa0nynql3lh2xlbn1454h6qxhjddp1029p48krb";
+  };
+
+  doCheck = false; # fails 1 out of 3 tests
+
+  meta = {
+    description = "Lightweight library to handle the sending and receiving of messages according to the Open Sound Control (OSC) protocol";
+    homepage = "https://sourceforge.net/projects/liblo";
+    license = lib.licenses.gpl2;
+    maintainers = [lib.maintainers.marcweber];
+    platforms = with lib.platforms; linux ++ darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/liblockfile/default.nix b/nixpkgs/pkgs/development/libraries/liblockfile/default.nix
new file mode 100644
index 000000000000..003991c80dde
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liblockfile/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  _name   = "liblockfile";
+  version = "1.17";
+  name    = "${_name}-${version}";
+
+  src = fetchurl {
+    url = "mirror://debian/pool/main/libl/${_name}/${_name}_${version}.orig.tar.gz";
+    sha256 = "sha256-bpN/NlCvq0qsGY80i4mxykLtzrF/trsJGPZCFDzP0V4=";
+  };
+
+  preConfigure = ''
+    sed -i -e 's/ -g [^ ]* / /' Makefile.in
+  '';
+
+  preInstall = ''
+    mkdir -p $out/{bin,lib,include,man} $out/man/man{1,3}
+  '';
+
+  meta = {
+    description = "Shared library with NFS-safe locking functions";
+    homepage = "http://packages.debian.org/unstable/libs/liblockfile1";
+    license = lib.licenses.gpl2Plus;
+
+    maintainers = [ lib.maintainers.bluescreen303 ];
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/liblogging/default.nix b/nixpkgs/pkgs/development/libraries/liblogging/default.nix
new file mode 100644
index 000000000000..2623e65f68b0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liblogging/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchurl, pkg-config
+, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
+, systemd
+}:
+
+stdenv.mkDerivation rec {
+  pname = "liblogging";
+  version = "1.0.6";
+
+  src = fetchurl {
+    url = "http://download.rsyslog.com/liblogging/liblogging-${version}.tar.gz";
+    sha256 = "14xz00mq07qmcgprlj5b2r21ljgpa4sbwmpr6jm2wrf8wms6331k";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = lib.optionals withSystemd [ systemd ];
+
+  configureFlags = [
+    "--enable-rfc3195"
+    "--enable-stdlog"
+    (if withSystemd then "--enable-journal" else "--disable-journal")
+    "--enable-man-pages"
+  ];
+
+  meta = with lib; {
+    homepage = "http://www.liblogging.org/";
+    description = "Lightweight signal-safe logging library";
+    license = licenses.bsd2;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/liblognorm/default.nix b/nixpkgs/pkgs/development/libraries/liblognorm/default.nix
new file mode 100644
index 000000000000..184d9932eb28
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liblognorm/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchurl, pkg-config, libestr, json_c, pcre, fastJson }:
+
+stdenv.mkDerivation rec {
+  pname = "liblognorm";
+  version = "2.0.6";
+
+  src = fetchurl {
+    url = "http://www.liblognorm.com/files/download/liblognorm-${version}.tar.gz";
+    sha256 = "1wpn15c617r7lfm1z9d5aggmmi339s6yn4pdz698j0r2bkl5gw6g";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libestr json_c pcre fastJson ];
+
+  configureFlags = [ "--enable-regexp" ];
+
+  meta = with lib; {
+    description = "Help to make sense out of syslog data, or, actually, any event data that is present in text form";
+    homepage = "https://www.liblognorm.com/";
+    license = licenses.lgpl21;
+    mainProgram = "lognormalizer";
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/liblouis/default.nix b/nixpkgs/pkgs/development/libraries/liblouis/default.nix
new file mode 100644
index 000000000000..6f22edae4f3d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liblouis/default.nix
@@ -0,0 +1,77 @@
+{ fetchFromGitHub
+, lib
+, stdenv
+, autoreconfHook
+, pkg-config
+, gettext
+, python3
+, texinfo
+, help2man
+, libyaml
+, perl
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "liblouis";
+  version = "3.28.0";
+
+  outputs = [ "out" "dev" "info" "doc" ]
+    # configure: WARNING: cannot generate manual pages while cross compiling
+    ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [ "man" ];
+
+  src = fetchFromGitHub {
+    owner = "liblouis";
+    repo = "liblouis";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-PvGlhsnAxQctcODiK628BDdzYaWUIF/F3dN2g//Gywg=";
+  };
+
+  strictDeps = true;
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+    gettext
+    python3
+    # Docs, man, info
+    texinfo
+    help2man
+  ];
+
+  buildInputs = [
+    # lou_checkYaml
+    libyaml
+  ];
+
+  nativeCheckInputs = [
+    perl
+  ];
+
+  configureFlags = [
+    # Required by Python bindings
+    "--enable-ucs4"
+  ];
+
+  postPatch = ''
+    patchShebangs tests
+    substituteInPlace python/louis/__init__.py.in --replace "###LIBLOUIS_SONAME###" "$out/lib/liblouis.so"
+  '';
+
+  postInstall = ''
+    pushd python
+    python setup.py install --prefix="$out" --optimize=1
+    popd
+  '';
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Open-source braille translator and back-translator";
+    homepage = "https://liblouis.io/";
+    license = with licenses; [
+      lgpl21Plus # library
+      gpl3Plus # tools
+    ];
+    maintainers = with maintainers; [ jtojnar ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/liblqr-1/default.nix b/nixpkgs/pkgs/development/libraries/liblqr-1/default.nix
new file mode 100644
index 000000000000..6b8c2ebeaa94
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liblqr-1/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, glib, Carbon, AppKit }:
+
+stdenv.mkDerivation rec {
+  pname = "liblqr-1";
+  version = "0.4.2";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "carlobaldassi";
+    repo = "liblqr";
+    rev = "v${version}";
+    sha256 = "10mrl5k3l2hxjhz4w93n50xwywp6y890rw2vsjcgai8627x5f1df";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = lib.optionals stdenv.isDarwin [ Carbon AppKit ];
+  propagatedBuildInputs = [ glib ];
+
+  meta = with lib; {
+    homepage = "http://liblqr.wikidot.com";
+    description = "Seam-carving C/C++ library called Liquid Rescaling";
+    platforms = platforms.all;
+    license = with licenses; [ gpl3 lgpl3 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/liblscp/default.nix b/nixpkgs/pkgs/development/libraries/liblscp/default.nix
new file mode 100644
index 000000000000..993c090299bd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liblscp/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchurl, autoconf, automake, libtool, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "liblscp";
+  version = "0.9.4";
+
+  src = fetchurl {
+    url = "https://download.linuxsampler.org/packages/${pname}-${version}.tar.gz";
+    sha256 = "sha256-8+3qHgIv32wfNHHggXID1W8M7pTqji4bHNGob3DTkho=";
+  };
+
+  nativeBuildInputs = [ autoconf automake libtool pkg-config ];
+
+  preConfigure = "make -f Makefile.git";
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "http://www.linuxsampler.org";
+    description = "LinuxSampler Control Protocol (LSCP) wrapper library";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libltc/default.nix b/nixpkgs/pkgs/development/libraries/libltc/default.nix
new file mode 100644
index 000000000000..a290b9bce9e0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libltc/default.nix
@@ -0,0 +1,18 @@
+{lib, stdenv, fetchurl}:
+
+stdenv.mkDerivation rec {
+  pname = "libltc";
+  version = "1.3.2";
+
+  src = fetchurl {
+    url = "https://github.com/x42/libltc/releases/download/v${version}/libltc-${version}.tar.gz";
+    sha256 = "sha256-Cm1CzWwh6SWif6Vg3EWsgAV9J18jNCECglkJwC07Ekk=";
+  };
+
+  meta = with lib; {
+    homepage = "http://x42.github.io/libltc/";
+    description = "POSIX-C Library for handling Linear/Logitudinal Time Code (LTC)";
+    license = licenses.lgpl3Plus;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/liblxi/default.nix b/nixpkgs/pkgs/development/libraries/liblxi/default.nix
new file mode 100644
index 000000000000..8531c8ea7c4c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liblxi/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchFromGitHub
+, meson, ninja, pkg-config, cmake
+, libtirpc, rpcsvc-proto, avahi, libxml2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "liblxi";
+  version = "1.20";
+
+  src = fetchFromGitHub {
+    owner = "lxi-tools";
+    repo = "liblxi";
+    rev = "v${version}";
+    hash = "sha256-jS0huNkbyKrsJ3NkenrYtjkzLakOsTJpwlgSo98ribE=";
+  };
+
+  nativeBuildInputs = [ meson ninja cmake pkg-config rpcsvc-proto ];
+
+  buildInputs = lib.optionals (!stdenv.isDarwin) [
+    libtirpc
+    avahi
+  ] ++ [
+    libxml2
+  ];
+
+  meta = with lib; {
+    description = "Library for communicating with LXI compatible instruments";
+    longDescription = ''
+      liblxi is an open source software library which offers a simple
+      API for communicating with LXI compatible instruments.
+      The API allows applications to easily discover instruments
+      on networks and communicate SCPI commands.
+    '';
+    homepage = "https://lxi-tools.github.io/";
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.vq ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmad/default.nix b/nixpkgs/pkgs/development/libraries/libmad/default.nix
new file mode 100644
index 000000000000..b9096fce9ef0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmad/default.nix
@@ -0,0 +1,84 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, autoconf
+
+# for passthru.tests
+, audacity
+, mpd
+, mpg321
+, normalize
+, ocamlPackages
+, streamripper
+, vlc
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libmad";
+  version = "0.15.1b";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/mad/${pname}-${version}.tar.gz";
+    sha256 = "14460zhacxhswnzb36qfpd1f2wbk10qvksvm6wyq5hpvdgnw7ymv";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/openwrt/packages/raw/openwrt-19.07/libs/libmad/patches/001-mips_removal_h_constraint.patch";
+      sha256 = "0layswr6qg6axf4vyz6xrv73jwga34mkma3ifk9w9vrk41454hr5";
+    })
+    (fetchpatch {
+      url = "https://github.com/KaOSx/main/raw/1270b8080f37fb6cca562829a521991800b0a497/libmad/libmad.patch";
+      sha256 = "0rysq0sn3dfdz6pa6bfqkmk4ymc4rzk5ym7p16dyk37sldg1pbzs";
+    })
+    (fetchpatch {
+      url = "https://github.com/KaOSx/main/raw/1270b8080f37fb6cca562829a521991800b0a497/libmad/amd64-64bit.diff";
+      sha256 = "0mx56dmkbvw3zxnqd2hjng48q0d7q7473pns4n0ksdam29b0c5ar";
+    })
+    (fetchpatch {
+      name = "CVE-2017-8372-CVE-2017-8373.patch";
+      url = "https://github.com/openwrt/packages/raw/openwrt-19.07/libs/libmad/patches/102-CVE-2017-8373-CVE-2017-8372-md-size.patch";
+      sha256 = "0p6mkpn66h1ds8jvww28q4vlr58jwm58m9vb7pkvvyvy764agqnk";
+    })
+    (fetchpatch {
+      name = "CVE-2017-8374.patch";
+      url = "https://github.com/openwrt/packages/raw/openwrt-19.07/libs/libmad/patches/101-CVE-2017-8374-length-check.patch";
+      sha256 = "1j1ssxwmx9nfahzl62frbzck93xrjc2v3w30c12vmk29iflf1890";
+    })
+  ]
+  # optimize.diff is taken from https://projects.archlinux.org/svntogit/packages.git/tree/trunk/optimize.diff?h=packages/libmad
+  # It is included here in order to fix a build failure in Clang
+  # But it may be useful to fix other, currently unknown problems as well
+  ++ lib.optionals stdenv.cc.isClang [
+    (fetchpatch {
+      url = "https://github.com/KaOSx/main/raw/1270b8080f37fb6cca562829a521991800b0a497/libmad/optimize.diff";
+      sha256 = "0hcxzz9ql1fizyqbsgdchdwi7bvchfr72172j43hpyj53p0yabc6";
+    })
+  ];
+
+  # The -fforce-mem flag has been removed in GCC 4.3.
+  postPatch = ''
+    substituteInPlace configure.ac --replace "-fforce-mem" ""
+    substituteInPlace configure.ac --replace "arch=\"-march=i486\"" ""
+  '';
+
+  nativeBuildInputs = [ autoconf ];
+
+  preConfigure = "autoconf";
+
+  passthru.tests = {
+    inherit audacity mpd mpg321 normalize streamripper vlc;
+    ocaml-mad = ocamlPackages.mad;
+  };
+
+  meta = with lib; {
+    homepage    = "https://sourceforge.net/projects/mad/";
+    description = "A high-quality, fixed-point MPEG audio decoder supporting MPEG-1 and MPEG-2";
+    license     = licenses.gpl2;
+    maintainers = with maintainers; [ lovek323 ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmanette/default.nix b/nixpkgs/pkgs/development/libraries/libmanette/default.nix
new file mode 100644
index 000000000000..e5bbf9a39cb9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmanette/default.nix
@@ -0,0 +1,76 @@
+{ lib, stdenv
+, fetchurl
+, ninja
+, meson
+, mesonEmulatorHook
+, pkg-config
+, vala
+, gobject-introspection
+, buildPackages
+, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
+, gtk-doc
+, docbook-xsl-nons
+, docbook_xml_dtd_43
+, glib
+, libgudev
+, libevdev
+, gnome
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libmanette";
+  version = "0.2.7";
+
+  outputs = [ "out" "dev" ] ++ lib.optional withIntrospection "devdoc";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    hash = "sha256-zd1cAqExBywZxs3m8sss1X6ufay1DRTDN+/ZgLqlGlE=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    glib
+  ] ++ lib.optionals withIntrospection [
+    vala
+    gobject-introspection
+    gtk-doc
+    docbook-xsl-nons
+    docbook_xml_dtd_43
+  ] ++ lib.optionals (withIntrospection && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
+  ];
+
+  buildInputs = [
+    glib
+    libevdev
+  ] ++ lib.optionals withIntrospection [
+    libgudev
+  ];
+
+  mesonFlags = [
+    (lib.mesonBool "doc" withIntrospection)
+    (lib.mesonEnable "gudev" withIntrospection)
+    (lib.mesonBool "introspection" withIntrospection)
+    (lib.mesonBool "vapi" withIntrospection)
+  ];
+
+  doCheck = true;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    description = "A simple GObject game controller library";
+    homepage = "https://gnome.pages.gitlab.gnome.org/libmanette/";
+    license = licenses.lgpl21Plus;
+    maintainers = teams.gnome.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmatchbox/default.nix b/nixpkgs/pkgs/development/libraries/libmatchbox/default.nix
new file mode 100644
index 000000000000..50b66eccfb3d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmatchbox/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchurl, libX11, libXext, libpng, libXft, libICE, pango, libjpeg}:
+
+stdenv.mkDerivation rec {
+  pname = "libmatchbox";
+  version = "1.11";
+
+  buildInputs = [ libXft libICE pango libjpeg ];
+  propagatedBuildInputs = [ libX11 libXext libpng ];
+  NIX_LDFLAGS = "-lX11";
+
+  src = fetchurl {
+    url = "https://downloads.yoctoproject.org/releases/matchbox/libmatchbox/${version}/libmatchbox-${version}.tar.bz2";
+    sha256 = "0lvv44s3bf96zvkysa4ansxj2ffgj3b5kgpliln538q4wd9ank15";
+  };
+
+  meta = {
+    description = "Library of the matchbox X window manager";
+    homepage = "http://matchbox-project.org/";
+    license = lib.licenses.gpl2Plus;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmatheval/default.nix b/nixpkgs/pkgs/development/libraries/libmatheval/default.nix
new file mode 100644
index 000000000000..c2084b007a61
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmatheval/default.nix
@@ -0,0 +1,50 @@
+{ lib, stdenv, fetchurl, pkg-config, guile, flex, fetchpatch }:
+
+stdenv.mkDerivation rec {
+  version = "1.1.11";
+  pname = "libmatheval";
+
+  nativeBuildInputs = [ pkg-config flex ];
+  buildInputs = [ guile ];
+
+  src = fetchurl {
+    url = "https://ftp.gnu.org/gnu/libmatheval/${pname}-${version}.tar.gz";
+    sha256 = "474852d6715ddc3b6969e28de5e1a5fbaff9e8ece6aebb9dc1cc63e9e88e89ab";
+  };
+
+  # Patches coming from debian package
+  # https://packages.debian.org/source/sid/libs/libmatheval
+  patches = [
+    (fetchpatch {
+      url = "https://sources.debian.org/data/main/libm/libmatheval/1.1.11%2Bdfsg-5/debian/patches/002-skip-docs.patch";
+      hash = "sha256-wjz54FKQq7t9Bz0W3EOu+ZPTt8EcfkMotkZKwlWa09o=";
+    })
+    (fetchpatch {
+      url = "https://sources.debian.org/data/main/libm/libmatheval/1.1.11%2Bdfsg-5/debian/patches/003-guile3.0.patch";
+      hash = "sha256-H3E/2m4MfQAbjpXbVFyNhikVifi3spVThzaVU5srmjI=";
+    })
+    (fetchpatch {
+      url = "https://sources.debian.org/data/main/libm/libmatheval/1.1.11%2Bdfsg-5/debian/patches/disable_coth_test.patch";
+      hash = "sha256-9XeMXWDTzELWTPcsjAqOlIzp4qY9yupU+e6r0rJEUS0=";
+    })
+  ];
+
+  env.NIX_CFLAGS_COMPILE = "-I${lib.getDev guile}/include/guile/${guile.effectiveVersion}";
+  env.NIX_LDFLAGS = "-L${guile}/lib -lguile-${guile.effectiveVersion}";
+
+  meta = {
+    description = "A library to parse and evaluate symbolic expressions input as text";
+    longDescription = ''
+      GNU libmatheval is a library (callable from C and Fortran) to parse and evaluate symbolic
+      expressions input as text. It supports expressions in any number of variables of arbitrary
+      names, decimal and symbolic constants, basic unary and binary operators, and elementary
+      mathematical functions. In addition to parsing and evaluation, libmatheval can also compute
+      symbolic derivatives and output expressions to strings.
+    '';
+    homepage = "https://www.gnu.org/software/libmatheval/";
+    license = lib.licenses.gpl3;
+    maintainers = [ lib.maintainers.bzizou ];
+    platforms = lib.platforms.unix;
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/libmatroska/default.nix b/nixpkgs/pkgs/development/libraries/libmatroska/default.nix
new file mode 100644
index 000000000000..aee9176790e2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmatroska/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, libebml }:
+
+stdenv.mkDerivation rec {
+  pname = "libmatroska";
+  version = "1.7.1";
+
+  src = fetchFromGitHub {
+    owner  = "Matroska-Org";
+    repo   = "libmatroska";
+    rev    = "release-${version}";
+    sha256 = "sha256-hfu3Q1lIyMlWFWUM2Pu70Hie0rlQmua7Kq8kSIWnfHE=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [ libebml ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=YES"
+    "-DCMAKE_INSTALL_PREFIX="
+  ];
+
+  meta = with lib; {
+    description = "A library to parse Matroska files";
+    homepage = "https://matroska.org/";
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmaxminddb/default.nix b/nixpkgs/pkgs/development/libraries/libmaxminddb/default.nix
new file mode 100644
index 000000000000..1651d36710e6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmaxminddb/default.nix
@@ -0,0 +1,20 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libmaxminddb";
+  version = "1.9.1";
+
+  src = fetchurl {
+    url = meta.homepage + "/releases/download/${version}/${pname}-${version}.tar.gz";
+    sha256 = "sha256-qAaCqJ2RX99gs10xYjL7BOvzb/8n/am9Of6KONPNPxI=";
+  };
+
+  meta = with lib; {
+    description = "C library for working with MaxMind geolocation DB files";
+    homepage = "https://github.com/maxmind/libmaxminddb";
+    license = licenses.asl20;
+    maintainers = teams.helsinki-systems.members;
+    mainProgram = "mmdblookup";
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmbim/default.nix b/nixpkgs/pkgs/development/libraries/libmbim/default.nix
new file mode 100644
index 000000000000..8ceb1b3b03bf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmbim/default.nix
@@ -0,0 +1,75 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, meson
+, ninja
+, pkg-config
+, glib
+, python3
+, help2man
+, systemd
+, bash-completion
+, bash
+, buildPackages
+, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
+, withDocs ? stdenv.hostPlatform == stdenv.buildPlatform
+, gobject-introspection
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libmbim";
+  version = "1.30.0";
+
+  outputs = [ "out" "dev" ]
+    ++ lib.optionals withDocs [ "man" ];
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "mobile-broadband";
+    repo = "libmbim";
+    rev = version;
+    hash = "sha256-sHTpu9WeMZroT+1I18ObEHWSzcyj/Relyz8UNe+WawI=";
+  };
+
+  mesonFlags = [
+    "-Dudevdir=${placeholder "out"}/lib/udev"
+    (lib.mesonBool "introspection" withIntrospection)
+    (lib.mesonBool "man" withDocs)
+  ];
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    python3
+  ] ++ lib.optionals withDocs [
+    help2man
+  ] ++ lib.optionals withIntrospection [
+    gobject-introspection
+  ];
+
+  buildInputs = [
+    glib
+    systemd
+    bash-completion
+    bash
+  ];
+
+  doCheck = true;
+
+  postPatch = ''
+    patchShebangs \
+      build-aux/mbim-codegen/mbim-codegen
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.freedesktop.org/wiki/Software/libmbim/";
+    description = "Library for talking to WWAN modems and devices which speak the Mobile Interface Broadband Model (MBIM) protocol";
+    changelog = "https://gitlab.freedesktop.org/mobile-broadband/libmbim/-/raw/${version}/NEWS";
+    maintainers = teams.freedesktop.members;
+    platforms = platforms.linux;
+    license = licenses.gpl2Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmcfp/default.nix b/nixpkgs/pkgs/development/libraries/libmcfp/default.nix
new file mode 100644
index 000000000000..7a76fabaa433
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmcfp/default.nix
@@ -0,0 +1,30 @@
+{ lib
+, stdenv
+, cmake
+, fetchFromGitHub
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libmcfp";
+  version = "1.2.4";
+
+  src = fetchFromGitHub {
+    owner = "mhekkel";
+    repo = "libmcfp";
+    rev = "refs/tags/v${finalAttrs.version}";
+    hash = "sha256-Xz7M3TmUHGqiYZbFGSDxsVvg4VhgoVvr9TW03UxdFBw=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  meta = with lib; {
+    description = "Header only library that can collect configuration options from command line arguments";
+    homepage = "https://github.com/mhekkel/libmcfp";
+    changelog = "https://github.com/mhekkel/libmcfp/blob/${finalAttrs.src.rev}/changelog";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ natsukium ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libmcrypt/default.nix b/nixpkgs/pkgs/development/libraries/libmcrypt/default.nix
new file mode 100644
index 000000000000..668389091c01
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmcrypt/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchurl, darwin, disablePosixThreads ? false }:
+
+stdenv.mkDerivation rec {
+  pname = "libmcrypt";
+  version = "2.5.8";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/mcrypt/Libmcrypt/${version}/libmcrypt-${version}.tar.gz";
+    sha256 = "0gipgb939vy9m66d3k8il98rvvwczyaw2ixr8yn6icds9c3nrsz4";
+  };
+
+  buildInputs = lib.optional stdenv.isDarwin darwin.cctools;
+
+  configureFlags = lib.optionals disablePosixThreads [ "--disable-posix-threads" ]
+    ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+      # AC_FUNC_MALLOC is broken on cross builds.
+      "ac_cv_func_malloc_0_nonnull=yes"
+      "ac_cv_func_realloc_0_nonnull=yes"
+    ];
+
+  env = lib.optionalAttrs stdenv.cc.isClang {
+    NIX_CFLAGS_COMPILE = "-Wno-implicit-function-declaration -Wno-implicit-int";
+  };
+
+  meta = {
+    description = "Replacement for the old crypt() package and crypt(1) command, with extensions";
+    homepage = "https://mcrypt.sourceforge.net";
+    license = "GPL";
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmd/default.nix b/nixpkgs/pkgs/development/libraries/libmd/default.nix
new file mode 100644
index 000000000000..bf156fb1c55d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmd/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook }:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libmd";
+  version = "1.1.0";
+
+  src = fetchurl {
+    urls = [
+      "https://archive.hadrons.org/software/libmd/libmd-${finalAttrs.version}.tar.xz"
+      "https://libbsd.freedesktop.org/releases/libmd-${finalAttrs.version}.tar.xz"
+    ];
+    sha256 = "sha256-G9aqQidTE68xQcfPLluWTosf1IgCXK8vlx9DsAd2szI=";
+  };
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  meta = with lib; {
+    homepage = "https://www.hadrons.org/software/libmd/";
+    changelog = "https://archive.hadrons.org/software/libmd/libmd-${finalAttrs.version}.announce";
+    # Git: https://git.hadrons.org/cgit/libmd.git
+    description = "Message Digest functions from BSD systems";
+    license = with licenses; [ bsd3 bsd2 isc beerware publicDomain ];
+    maintainers = with maintainers; [ primeos ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libmediaart/default.nix b/nixpkgs/pkgs/development/libraries/libmediaart/default.nix
new file mode 100644
index 000000000000..a68db1389ab5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmediaart/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchurl, meson, mesonEmulatorHook, ninja, pkg-config, vala, gtk-doc, docbook_xsl, docbook_xml_dtd_412, glib, gdk-pixbuf, gobject-introspection, gnome }:
+
+stdenv.mkDerivation rec {
+  pname = "libmediaart";
+  version = "1.9.6";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "w7xQJdfbOAWH+cjrgAxhH2taFta0t4/P+T9ih2pnfxc=";
+  };
+
+  nativeBuildInputs = [ meson ninja pkg-config vala gtk-doc docbook_xsl docbook_xml_dtd_412 gobject-introspection ]
+    ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
+  ];
+
+  buildInputs = [ glib gdk-pixbuf ];
+
+  mesonFlags = [
+    "-Dgtk_doc=true"
+  ];
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "none";
+    };
+  };
+
+  meta = with lib; {
+    description = "Library tasked with managing, extracting and handling media art caches";
+    maintainers = teams.gnome.members;
+    license = licenses.gpl2;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmediainfo/default.nix b/nixpkgs/pkgs/development/libraries/libmediainfo/default.nix
new file mode 100644
index 000000000000..94acb13205b5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmediainfo/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, libzen, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "libmediainfo";
+  version = "23.11";
+
+  src = fetchurl {
+    url = "https://mediaarea.net/download/source/libmediainfo/${version}/libmediainfo_${version}.tar.xz";
+    hash = "sha256-GX5U/MeePA1d9EqPWNxOAYvC+F0T+jvtVK89xW1ehT0=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ zlib ];
+  propagatedBuildInputs = [ libzen ];
+
+  sourceRoot = "MediaInfoLib/Project/GNU/Library";
+
+  postPatch = lib.optionalString (stdenv.cc.targetPrefix != "") ''
+    substituteInPlace configure.ac \
+      --replace "pkg-config " "${stdenv.cc.targetPrefix}pkg-config "
+  '';
+
+  configureFlags = [ "--enable-shared" ];
+
+  enableParallelBuilding = true;
+
+  postInstall = ''
+    install -vD -m 644 libmediainfo.pc "$out/lib/pkgconfig/libmediainfo.pc"
+  '';
+
+  meta = with lib; {
+    description = "Shared library for mediainfo";
+    homepage = "https://mediaarea.net/";
+    changelog = "https://mediaarea.net/MediaInfo/ChangeLog";
+    license = licenses.bsd2;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.devhell ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmemcached/default.nix b/nixpkgs/pkgs/development/libraries/libmemcached/default.nix
new file mode 100644
index 000000000000..07fe854c777c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmemcached/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchurl, fetchpatch, cyrus_sasl, libevent }:
+
+stdenv.mkDerivation rec {
+  pname = "libmemcached";
+  version = "1.0.18";
+
+  src = fetchurl {
+    url = "https://launchpad.net/libmemcached/${lib.versions.majorMinor version}/${version}/+download/libmemcached-${version}.tar.gz";
+    sha256 = "10jzi14j32lpq0if0p9vygcl2c1352hwbywzvr9qzq7x6aq0nb72";
+  };
+
+  # Fix linking against libpthread (patch from Fedora)
+  # https://bugzilla.redhat.com/show_bug.cgi?id=1037707
+  # https://bugs.launchpad.net/libmemcached/+bug/1281907
+  # Fix building on macOS (patch from Homebrew)
+  # https://bugs.launchpad.net/libmemcached/+bug/1245562
+  patches = lib.optional stdenv.isLinux ./libmemcached-fix-linking-with-libpthread.patch
+    ++ lib.optional stdenv.isDarwin (fetchpatch {
+      url = "https://raw.githubusercontent.com/Homebrew/homebrew/bfd4a0a4626b61c2511fdf573bcbbc6bbe86340e/Library/Formula/libmemcached.rb";
+      sha256 = "1gjf3vd7hiyzxjvlg2zfc3y2j0lyr6nhbws4xb5dmin3csyp8qb8";
+    })
+    ++ lib.optional stdenv.hostPlatform.isMusl ./musl-fixes.patch;
+
+  buildInputs = [ libevent ];
+  propagatedBuildInputs = [ cyrus_sasl ];
+
+  env.NIX_CFLAGS_COMPILE = "-fpermissive";
+
+  meta = with lib; {
+    homepage = "https://libmemcached.org";
+    description = "Open source C/C++ client library and tools for the memcached server";
+    license = licenses.bsd3;
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmemcached/libmemcached-fix-linking-with-libpthread.patch b/nixpkgs/pkgs/development/libraries/libmemcached/libmemcached-fix-linking-with-libpthread.patch
new file mode 100644
index 000000000000..e5e21c433587
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmemcached/libmemcached-fix-linking-with-libpthread.patch
@@ -0,0 +1,19 @@
+diff -up libmemcached-1.0.16/build-aux/ltmain.sh.orig libmemcached-1.0.16/build-aux/ltmain.sh
+--- libmemcached-1.0.16/build-aux/ltmain.sh.orig	2013-12-03 16:36:53.222107642 +0100
++++ libmemcached-1.0.16/build-aux/ltmain.sh	2013-12-03 16:37:35.770132249 +0100
+@@ -5664,6 +5664,15 @@ func_mode_link ()
+ 	    *" $arg "*) ;;
+ 	    * ) func_append new_inherited_linker_flags " $arg" ;;
+ 	esac
++	# As we are forced to pass -nostdlib to g++ during linking, the option
++	# -pthread{,s} is not in effect;  add the -lpthread to $deplist
++	# explicitly to link correctly.
++	if test "$tagname" = CXX -a x"$with_gcc" = xyes; then
++	  case "$arg" in
++	    -pthread*) func_append deplibs " -lpthread" ;;
++	  esac
++	fi
++
+ 	continue
+ 	;;
+ 
diff --git a/nixpkgs/pkgs/development/libraries/libmemcached/musl-fixes.patch b/nixpkgs/pkgs/development/libraries/libmemcached/musl-fixes.patch
new file mode 100644
index 000000000000..eb2a6bc980eb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmemcached/musl-fixes.patch
@@ -0,0 +1,58 @@
+diff --git a/libhashkit/fnv_64.cc b/libhashkit/fnv_64.cc
+index 68e4dd0..64656b7 100644
+--- a/libhashkit/fnv_64.cc
++++ b/libhashkit/fnv_64.cc
+@@ -37,8 +37,9 @@
+ 
+ 
+ #include <libhashkit/common.h>
++#include <limits.h>
+ 
+-#if __WORDSIZE == 64 && defined(HAVE_FNV64_HASH)
++#if (LONG_BITS == 64) && defined(HAVE_FNV64_HASH)
+ 
+ /* FNV hash'es lifted from Dustin Sallings work */
+ static uint64_t FNV_64_INIT= 0xcbf29ce484222325;
+diff --git a/libhashkit/has.cc b/libhashkit/has.cc
+index 843e32e..4153e5e 100644
+--- a/libhashkit/has.cc
++++ b/libhashkit/has.cc
+@@ -37,6 +37,7 @@
+ 
+ 
+ #include <libhashkit/common.h>
++#include <limits.h>
+ 
+ bool libhashkit_has_algorithm(const hashkit_hash_algorithm_t algo)
+ {
+@@ -44,7 +45,7 @@ bool libhashkit_has_algorithm(const hashkit_hash_algorithm_t algo)
+   {
+   case HASHKIT_HASH_FNV1_64:
+   case HASHKIT_HASH_FNV1A_64:
+-#if __WORDSIZE == 64 && defined(HAVE_FNV64_HASH)
++#if (LONG_BITS == 64) && defined(HAVE_FNV64_HASH)
+     return true;
+ #else
+     return false;
+diff --git a/libtest/cmdline.cc b/libtest/cmdline.cc
+index 29a22de..161c646 100644
+--- a/libtest/cmdline.cc
++++ b/libtest/cmdline.cc
+@@ -61,7 +61,7 @@ using namespace libtest;
+ #include <algorithm>
+ #include <stdexcept>
+ 
+-#ifndef __USE_GNU
++#ifndef _GNU_SOURCE
+ static char **environ= NULL;
+ #endif
+ 
+@@ -201,7 +201,7 @@ Application::error_t Application::run(const char *args[])
+ 
+   fatal_assert(posix_spawnattr_setsigmask(&spawnattr, &mask) == 0);
+ 
+-#if defined(POSIX_SPAWN_USEVFORK) || defined(__linux__)
++#if defined(POSIX_SPAWN_USEVFORK) || defined(__GLIBC__)
+   // Use USEVFORK on linux
+   flags |= POSIX_SPAWN_USEVFORK;
+ #endif
diff --git a/nixpkgs/pkgs/development/libraries/libmesode/default.nix b/nixpkgs/pkgs/development/libraries/libmesode/default.nix
new file mode 100644
index 000000000000..128975246a8a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmesode/default.nix
@@ -0,0 +1,48 @@
+{ lib, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, libtool
+, openssl
+, expat
+, pkg-config
+, check
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libmesode";
+  version = "0.10.1";
+
+  src = fetchFromGitHub {
+    owner = "profanity-im";
+    repo = "libmesode";
+    rev = version;
+    sha256 = "1bxnkhrypgv41qyy1n545kcggmlw1hvxnhwihijhhcf2pxd2s654";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ openssl expat libtool check ];
+
+  dontDisableStatic = true;
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Fork of libstrophe (https://github.com/strophe/libstrophe) for use with Profanity XMPP Client";
+    longDescription = ''
+      Reasons for forking:
+
+      - Remove Windows support
+      - Support only one XML Parser implementation (expat)
+      - Support only one SSL implementation (OpenSSL)
+
+      This simplifies maintenance of the library when used in Profanity.
+      Whilst Profanity will run against libstrophe, libmesode provides extra
+      TLS functionality such as manual SSL certificate verification.
+    '';
+    homepage = "https://github.com/profanity-im/libmesode/";
+    license = with licenses; [ gpl3Only mit];
+    platforms = platforms.unix;
+    broken = stdenv.isDarwin;
+    maintainers = with maintainers; [ devhell ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmhash/autotools-define-conflict-debian-fix.patch b/nixpkgs/pkgs/development/libraries/libmhash/autotools-define-conflict-debian-fix.patch
new file mode 100644
index 000000000000..1e3a5d680df6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmhash/autotools-define-conflict-debian-fix.patch
@@ -0,0 +1,78 @@
+Patch fixing #DEFINE redefinitions for generic PACKAGE_* attributes which
+cause collisions when using libmhash in another package also using autotools.
+
+Debian Bug report #473204
+
+diff -x configure -x config.guess -x config.sub -x 'Makefile.*' -Nru
+mhash-0.9.9.orig/configure.in mhash-0.9.9/configure.in
+--- mhash-0.9.9.orig/configure.in       2007-04-04 19:22:28.000000000 -0700
++++ mhash-0.9.9/configure.in    2008-03-29 00:21:24.000000000 -0800
+@@ -6,6 +6,7 @@
+ AM_INIT_AUTOMAKE
+
+ AC_DEFINE([MHASH_VERSION], PROGRAM_VERSION, "MHash Version")
++AC_CONFIG_HEADER([include/mutils/config.h])
+ AC_CONFIG_HEADER([include/mutils/mhash_config.h])
+
+
+diff -x configure -x config.guess -x config.sub -x 'Makefile.*' -Nru
+mhash-0.9.9.orig/include/mutils/config.h.in
+mhash-0.9.9/include/mutils/config.h.in
+--- mhash-0.9.9.orig/include/mutils/config.h.in 1969-12-31 16:00:00.000000000
+-0800
++++ mhash-0.9.9/include/mutils/config.h.in      2008-03-29 00:48:22.000000000
+-0800
+@@ -0,0 +1,22 @@
++/* Name of package */
++#undef PACKAGE
++
++/* Define to the address where bug reports for this package should be sent. */
++#undef PACKAGE_BUGREPORT
++
++/* Define to the full name of this package. */
++#undef PACKAGE_NAME
++
++/* Define to the full name and version of this package. */
++#undef PACKAGE_STRING
++
++/* Define to the one symbol short name of this package. */
++#undef PACKAGE_TARNAME
++
++/* Define to the version of this package. */
++#undef PACKAGE_VERSION
++
++/* Version number of package */
++#undef VERSION
++
++
+diff -x configure -x config.guess -x config.sub -x 'Makefile.*' -Nru
+mhash-0.9.9.orig/include/mutils/mhash_config.h.in
+mhash-0.9.9/include/mutils/mhash_config.h.in
+--- mhash-0.9.9.orig/include/mutils/mhash_config.h.in   2008-03-29
+00:23:29.000000000 -0800
++++ mhash-0.9.9/include/mutils/mhash_config.h.in        2008-03-29
+00:06:41.000000000 -0800
+@@ -181,24 +181,6 @@
+ /* Define to 1 if your C compiler doesn't accept -c and -o together. */
+ #undef NO_MINUS_C_MINUS_O
+
+-/* Name of package */
+-#undef PACKAGE
+-
+-/* Define to the address where bug reports for this package should be sent. */
+-#undef PACKAGE_BUGREPORT
+-
+-/* Define to the full name of this package. */
+-#undef PACKAGE_NAME
+-
+-/* Define to the full name and version of this package. */
+-#undef PACKAGE_STRING
+-
+-/* Define to the one symbol short name of this package. */
+-#undef PACKAGE_TARNAME
+-
+-/* Define to the version of this package. */
+-#undef PACKAGE_VERSION
+-
+ /* Define to 1 if the C compiler supports function prototypes. */
+ #undef PROTOTYPES
diff --git a/nixpkgs/pkgs/development/libraries/libmhash/default.nix b/nixpkgs/pkgs/development/libraries/libmhash/default.nix
new file mode 100644
index 000000000000..0cccefb99980
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmhash/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "mhash";
+  version = "0.9.9.9";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.bz2";
+    sha256 = "1w7yiljan8gf1ibiypi6hm3r363imm3sxl1j8hapjdq3m591qljn";
+  };
+
+  dontDisableStatic = true;
+
+  patches = [ ./autotools-define-conflict-debian-fix.patch ];
+
+  meta = {
+    description = "Hash algorithms library";
+    longDescription = ''
+      Libmhash is a library that provides a uniform interface to several hash
+      algorithms. It supports the basics for message authentication by
+      following rfc2104 (HMAC). It also includes some key generation algorithms
+      which are based on hash algorithms.
+    '';
+    homepage = "https://mhash.sourceforge.net";
+    license = "LGPL";
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmicrodns/default.nix b/nixpkgs/pkgs/development/libraries/libmicrodns/default.nix
new file mode 100644
index 000000000000..c9dd899a2b00
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmicrodns/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv
+, fetchFromGitHub
+, meson
+, ninja
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  version = "0.2.0";
+  pname = "libmicrodns";
+
+  src = fetchFromGitHub {
+    owner = "videolabs";
+    repo = pname;
+    rev = version;
+    sha256 = "05vgka45c1frnv4q7pbz0bggsn5xaykh4xpklh9yb6d6qj7dbx0b";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+  ];
+
+  meta = with lib; {
+    description = "Minimal mDNS resolver library, used by VLC";
+    homepage = "https://github.com/videolabs/libmicrodns";
+    license = licenses.lgpl21;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.shazow ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmicrohttpd/0.9.69.nix b/nixpkgs/pkgs/development/libraries/libmicrohttpd/0.9.69.nix
new file mode 100644
index 000000000000..866658c224f3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmicrohttpd/0.9.69.nix
@@ -0,0 +1,10 @@
+{ callPackage, fetchurl }:
+
+callPackage ./generic.nix ( rec {
+  version = "0.9.69";
+
+  src = fetchurl {
+    url = "mirror://gnu/libmicrohttpd/libmicrohttpd-${version}.tar.gz";
+    sha256 = "sha256-+5trFIt4dJPmN9MINYhxHmXLy3JvoCzuLNVDxd4n434=";
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libmicrohttpd/0.9.71.nix b/nixpkgs/pkgs/development/libraries/libmicrohttpd/0.9.71.nix
new file mode 100644
index 000000000000..7e60f8c72726
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmicrohttpd/0.9.71.nix
@@ -0,0 +1,10 @@
+{ callPackage, fetchurl }:
+
+callPackage ./generic.nix ( rec {
+  version = "0.9.71";
+
+  src = fetchurl {
+    url = "mirror://gnu/libmicrohttpd/libmicrohttpd-${version}.tar.gz";
+    sha256 = "10mii4mifmfs3v7kgciqml7f0fj7ljp0sngrx64pnwmgbzl4bx78";
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libmicrohttpd/0.9.72.nix b/nixpkgs/pkgs/development/libraries/libmicrohttpd/0.9.72.nix
new file mode 100644
index 000000000000..4c695218184c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmicrohttpd/0.9.72.nix
@@ -0,0 +1,10 @@
+{ callPackage, fetchurl }:
+
+callPackage ./generic.nix ( rec {
+  version = "0.9.72";
+
+  src = fetchurl {
+    url = "mirror://gnu/libmicrohttpd/libmicrohttpd-${version}.tar.gz";
+    sha256 = "sha256-Cugl+ODX9BIB/USg3xz0VMHLC8UP6dWcJlUiYCZML/g=";
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libmicrohttpd/0.9.74.nix b/nixpkgs/pkgs/development/libraries/libmicrohttpd/0.9.74.nix
new file mode 100644
index 000000000000..c4b3343ecd4c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmicrohttpd/0.9.74.nix
@@ -0,0 +1,10 @@
+{ callPackage, fetchurl }:
+
+callPackage ./generic.nix ( rec {
+  version = "0.9.74";
+
+  src = fetchurl {
+    url = "mirror://gnu/libmicrohttpd/libmicrohttpd-${version}.tar.gz";
+    sha256 = "sha256-QgNdAmE3MyS/tDQBj0q4klFLECU9GvIy5BtMwsEeZQs=";
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libmicrohttpd/generic.nix b/nixpkgs/pkgs/development/libraries/libmicrohttpd/generic.nix
new file mode 100644
index 000000000000..d5bc619e9042
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmicrohttpd/generic.nix
@@ -0,0 +1,49 @@
+{ lib, stdenv, libgcrypt, curl, gnutls, pkg-config, libiconv, libintl, version, src, meta ? {}, fetchpatch }:
+
+let
+  meta_ = meta;
+in
+
+stdenv.mkDerivation rec {
+  pname = "libmicrohttpd";
+  inherit version src;
+
+  patches = lib.optionals (lib.versionOlder version "0.9.76") [
+    (fetchpatch {
+      name = "CVE-2023-27371.patch";
+      url = "https://git.gnunet.org/libmicrohttpd.git/patch/?id=e0754d1638c602382384f1eface30854b1defeec";
+      hash = "sha256-vzrq9HPysGpc13rFEk6zLPgpUqp/ST4q/Wp30Dam97k=";
+      excludes = [
+        "ChangeLog"
+      ];
+    })
+  ];
+
+  outputs = [ "out" "dev" "devdoc" "info" ];
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libgcrypt curl gnutls libiconv libintl ];
+
+  preCheck = ''
+    # Since `localhost' can't be resolved in a chroot, work around it.
+    sed -ie 's/localhost/127.0.0.1/g' src/test*/*.[ch]
+  '';
+
+  # Disabled because the tests can time-out.
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Embeddable HTTP server library";
+
+    longDescription = ''
+      GNU libmicrohttpd is a small C library that is supposed to make
+      it easy to run an HTTP server as part of another application.
+    '';
+
+    license = licenses.lgpl2Plus;
+
+    homepage = "https://www.gnu.org/software/libmicrohttpd/";
+
+    maintainers = with maintainers; [ eelco vrthra fpletz ];
+    platforms = platforms.unix;
+  } // meta_;
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmikmod/default.nix b/nixpkgs/pkgs/development/libraries/libmikmod/default.nix
new file mode 100644
index 000000000000..29f64116b7a8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmikmod/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv, fetchurl, texinfo, alsa-lib, libpulseaudio, CoreAudio }:
+
+let
+  inherit (lib) optional optionalString;
+
+in stdenv.mkDerivation rec {
+  pname = "libmikmod";
+  version = "3.3.11.1";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/mikmod/libmikmod-${version}.tar.gz";
+    sha256 = "06bdnhb0l81srdzg6gn2v2ydhhaazza7rshrcj3q8dpqr3gn97dd";
+  };
+
+  buildInputs = [ texinfo ]
+    ++ optional stdenv.isLinux alsa-lib
+    ++ optional stdenv.isDarwin CoreAudio;
+  propagatedBuildInputs =
+    optional stdenv.isLinux libpulseaudio;
+
+  outputs = [ "out" "dev" "man" ];
+
+  NIX_LDFLAGS = optionalString stdenv.isLinux "-lasound";
+
+  postInstall = ''
+    moveToOutput bin/libmikmod-config "$dev"
+  '';
+
+  meta = with lib; {
+    description = "A library for playing tracker music module files";
+    homepage    = "https://mikmod.shlomifish.org/";
+    license     = licenses.lgpl2Plus;
+    maintainers = with maintainers; [ astsmtl lovek323 ];
+    platforms   = platforms.unix;
+
+    longDescription = ''
+      A library for playing tracker music module files supporting many formats,
+      including MOD, S3M, IT and XM.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmilter/darwin.patch b/nixpkgs/pkgs/development/libraries/libmilter/darwin.patch
new file mode 100644
index 000000000000..9bad640450c6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmilter/darwin.patch
@@ -0,0 +1,28 @@
+Fix build issues on Darwin.
+
+--- a/devtools/OS/Darwin	2014-03-05 01:59:45.000000000 +0100
++++ b/devtools/OS/Darwin	2020-05-18 14:47:57.000000000 +0200
+@@ -8,6 +8,8 @@
+ #    We look a lot more like 4.4BSD than NeXTStep or OpenStep.
+ #
+ define(`confCC', `cc -traditional-cpp -pipe ${Extra_CC_Flags}')
++define(`confCCOPTS_SO', `-fPIC')
++define(`confSOEXT', `dylib')
+ define(`confMAPDEF', `-DNEWDB -DNIS -DMAP_REGEX -DNETINFO -DAUTO_NETINFO_ALIASES -DAUTO_NETINFO_HOSTS')
+ define(`confENVDEF', `-DDARWIN')
+ define(`confLDOPTS', `${Extra_LD_Flags}')
+--- a/sendmail/sendmail.h	2020-05-18 14:51:17.000000000 +0200
++++ b/sendmail/sendmail.h	2020-05-18 14:51:00.000000000 +0200
+@@ -122,7 +122,11 @@
+ # endif
+ 
+ #if NAMED_BIND
+-# include <arpa/nameser.h>
++# ifdef __APPLE__
++#  include <arpa/nameser_compat.h>
++# else
++#  include <arpa/nameser.h>
++# endif
+ # ifdef NOERROR
+ #  undef NOERROR		/* avoid <sys/streams.h> conflict */
+ # endif
diff --git a/nixpkgs/pkgs/development/libraries/libmilter/default.nix b/nixpkgs/pkgs/development/libraries/libmilter/default.nix
new file mode 100644
index 000000000000..a06f3d4deca1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmilter/default.nix
@@ -0,0 +1,49 @@
+{ lib, stdenv, fetchurl, m4, fixDarwinDylibNames }:
+
+stdenv.mkDerivation rec {
+  pname = "libmilter";
+  version = "8.18.1";
+
+  src = fetchurl {
+    url = "ftp://ftp.sendmail.org/pub/sendmail/sendmail.${version}.tar.gz";
+    sha256 = "sha256-y/HzCcOOSAb3zz6tJCYPF9H+j7YyVtE+2zzdGgmPB3A=";
+  };
+
+  buildPhase = ''
+    mkdir -p $out/lib
+    cd libmilter
+    cat > a.m4 <<EOF
+      define(\`confCC', \`$CC')
+      define(\`confAR', \`$AR')
+      define(\`confEBINDIR', \`$out/libexec')
+      define(\`confINCLUDEDIR', \`$out/include')
+      define(\`confLIBDIR', \`$out/lib')
+      define(\`confMANROOT', \`$out/man/cat')
+      define(\`confMANROOTMAN', \`$out/man/man')
+      define(\`confMBINDIR', \`$out/sbin')
+      define(\`confSBINDIR', \`$out/sbin')
+      define(\`confSHAREDLIBDIR', \`$out/lib')
+      define(\`confUBINDIR', \`$out/bin')
+      define(\`confINCGRP', \`root')
+      define(\`confLIBGRP', \`root')
+      APPENDDEF(\`confENVDEF', \`-DNETINET6')
+    EOF
+    export MILTER_SOVER=1
+    sh Build -f ./a.m4
+  '';
+
+  patches = [ ./install.patch ./sharedlib.patch ./darwin.patch ];
+
+  nativeBuildInputs = [ m4 ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+  postInstall = lib.optionalString stdenv.isDarwin ''
+    fixDarwinDylibNames $out/lib/libmilter.*.1
+  '';
+
+  meta = with lib; {
+    description = "Sendmail Milter mail filtering API library";
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ fpletz ];
+    license = licenses.sendmail;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmilter/install.patch b/nixpkgs/pkgs/development/libraries/libmilter/install.patch
new file mode 100644
index 000000000000..f6d3574ca4c1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmilter/install.patch
@@ -0,0 +1,42 @@
+diff -rc sendmail-8.14.4/devtools/M4/UNIX/library.m4 sendmail-8.14.4-new/devtools/M4/UNIX/library.m4
+*** sendmail-8.14.4/devtools/M4/UNIX/library.m4	Wed Sep  6 00:56:53 2006
+--- sendmail-8.14.4-new/devtools/M4/UNIX/library.m4	Tue Feb  9 11:25:13 2010
+***************
+*** 28,34 ****
+  
+  install-`'bldCURRENT_PRODUCT: bldCURRENT_PRODUCT.a
+  ifdef(`bldINSTALLABLE', `	ifdef(`confMKDIR', `if [ ! -d ${DESTDIR}${bldINSTALL_DIR`'LIBDIR} ]; then confMKDIR -p ${DESTDIR}${bldINSTALL_DIR`'LIBDIR}; else :; fi ')
+! 	${INSTALL} -c -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} bldCURRENT_PRODUCT.a ${DESTDIR}${LIBDIR}')
+  
+  bldCURRENT_PRODUCT-clean:
+  	rm -f ${OBJS} bldCURRENT_PRODUCT.a ${MANPAGES}
+--- 28,34 ----
+  
+  install-`'bldCURRENT_PRODUCT: bldCURRENT_PRODUCT.a
+  ifdef(`bldINSTALLABLE', `	ifdef(`confMKDIR', `if [ ! -d ${DESTDIR}${bldINSTALL_DIR`'LIBDIR} ]; then confMKDIR -p ${DESTDIR}${bldINSTALL_DIR`'LIBDIR}; else :; fi ')
+! 	${INSTALL} -c bldCURRENT_PRODUCT.a ${DESTDIR}${LIBDIR}')
+  
+  bldCURRENT_PRODUCT-clean:
+  	rm -f ${OBJS} bldCURRENT_PRODUCT.a ${MANPAGES}
+diff -rc sendmail-8.14.4/libmilter/Makefile.m4 sendmail-8.14.4-new/libmilter/Makefile.m4
+*** sendmail-8.14.4/libmilter/Makefile.m4	Tue Nov 24 22:59:33 2009
+--- sendmail-8.14.4-new/libmilter/Makefile.m4	Tue Feb  9 10:47:19 2010
+***************
+*** 33,40 ****
+  MFDEF=	${SRCDIR}/inc`'lude/libmilter/mfdef.h
+  install-mfapi: ${MFAPI}
+  	if [ ! -d ${DESTDIR}${INCLUDEDIR}/libmilter ]; then mkdir -p ${DESTDIR}${INCLUDEDIR}/libmilter; else :; fi
+! 	${INSTALL} -c -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} ${MFAPI} ${DESTDIR}${INCLUDEDIR}/libmilter/mfapi.h
+! 	${INSTALL} -c -o ${INCOWN} -g ${INCGRP} -m ${INCMODE} ${MFDEF} ${DESTDIR}${INCLUDEDIR}/libmilter/mfdef.h
+  divert(0)
+  
+  bldFINISH
+--- 33,40 ----
+  MFDEF=	${SRCDIR}/inc`'lude/libmilter/mfdef.h
+  install-mfapi: ${MFAPI}
+  	if [ ! -d ${DESTDIR}${INCLUDEDIR}/libmilter ]; then mkdir -p ${DESTDIR}${INCLUDEDIR}/libmilter; else :; fi
+! 	${INSTALL} -c ${MFAPI} ${DESTDIR}${INCLUDEDIR}/libmilter/mfapi.h
+! 	${INSTALL} -c ${MFDEF} ${DESTDIR}${INCLUDEDIR}/libmilter/mfdef.h
+  divert(0)
+  
+  bldFINISH
diff --git a/nixpkgs/pkgs/development/libraries/libmilter/sharedlib.patch b/nixpkgs/pkgs/development/libraries/libmilter/sharedlib.patch
new file mode 100644
index 000000000000..1e256c59ec3e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmilter/sharedlib.patch
@@ -0,0 +1,56 @@
+diff -Nru sendmail-8.14.3.orig/devtools/M4/UNIX/milterlibrary.m4 sendmail-8.14.3/devtools/M4/UNIX/milterlibrary.m4
+--- sendmail-8.14.3.orig/devtools/M4/UNIX/milterlibrary.m4	1970-01-01 01:00:00.000000000 +0100
++++ sendmail-8.14.3/devtools/M4/UNIX/milterlibrary.m4	2009-08-22 21:51:10.000000000 +0200
+@@ -0,0 +1,39 @@
++divert(-1)
++#
++# Copyright (c) 1999-2001 Sendmail, Inc. and its suppliers.
++#	All rights reserved.
++#
++# By using this file, you agree to the terms and conditions set
++# forth in the LICENSE file which can be found at the top level of
++# the sendmail distribution.
++#
++#
++#  Definitions for Makefile construction for sendmail
++#
++divert(0)dnl
++include(confBUILDTOOLSDIR`/M4/'bldM4_TYPE_DIR`/links.m4')dnl
++define(`confSOEXT', ifdef(`confSOEXT', `confSOEXT', `so'))dnl
++bldLIST_PUSH_ITEM(`bldC_PRODUCTS', bldCURRENT_PRODUCT)dnl
++bldPUSH_TARGET(bldCURRENT_PRODUCT`.'confSOEXT bldCURRENT_PRODUCT`.a')dnl
++bldPUSH_INSTALL_TARGET(`install-'bldCURRENT_PRODUCT)dnl
++bldPUSH_CLEAN_TARGET(bldCURRENT_PRODUCT`-clean')dnl
++
++include(confBUILDTOOLSDIR`/M4/'bldM4_TYPE_DIR`/defines.m4')
++divert(bldTARGETS_SECTION)
++bldCURRENT_PRODUCT`.'confSOEXT: ${BEFORE} ${bldCURRENT_PRODUCT`OBJS'}
++	${CCLINK} ${LDOPTS_SO} -o bldCURRENT_PRODUCT.confSOEXT ifdef(`confSONAME',`-Wl,confSONAME,bldCURRENT_PRODUCT.confSOEXT.${MILTER_SOVER}') ${bldCURRENT_PRODUCT`OBJS'} -lc ${LIBS}
++bldCURRENT_PRODUCT.a: ${BEFORE} ${bldCURRENT_PRODUCT`OBJS'}
++	${AR} ${AROPTS} bldCURRENT_PRODUCT.a ${bldCURRENT_PRODUCT`OBJS'}
++	${RANLIB} ${RANLIBOPTS} bldCURRENT_PRODUCT.a
++ifdef(`bldLINK_SOURCES', `bldMAKE_SOURCE_LINKS(bldLINK_SOURCES)')
++
++install-`'bldCURRENT_PRODUCT: bldCURRENT_PRODUCT.confSOEXT bldCURRENT_PRODUCT.a
++ifdef(`bldINSTALLABLE', `	ifdef(`confMKDIR', `if [ ! -d "${DESTDIR}${bldINSTALL_DIR`'LIBDIR}" ]; then confMKDIR -p "${DESTDIR}${bldINSTALL_DIR`'LIBDIR}"; else :; fi ')
++	${INSTALL} -c bldCURRENT_PRODUCT.confSOEXT "${DESTDIR}${LIBDIR}/bldCURRENT_PRODUCT.confSOEXT.${MILTER_SOVER}"
++	${LN} ${LNOPTS} bldCURRENT_PRODUCT.confSOEXT.${MILTER_SOVER} "${DESTDIR}${LIBDIR}/bldCURRENT_PRODUCT.confSOEXT"
++	${INSTALL} -c -m 644 bldCURRENT_PRODUCT.a "${DESTDIR}${LIBDIR}"')
++
++bldCURRENT_PRODUCT-clean:
++	rm -f ${OBJS} bldCURRENT_PRODUCT.confSOEXT bldCURRENT_PRODUCT.a ${MANPAGES}
++
++divert(0)
++COPTS+= confCCOPTS_SO
+diff -Nru sendmail-8.14.3.orig/libmilter/Makefile.m4 sendmail-8.14.3/libmilter/Makefile.m4
+--- sendmail-8.14.3.orig/libmilter/Makefile.m4	2008-04-08 07:23:44.000000000 +0200
++++ sendmail-8.14.3/libmilter/Makefile.m4	2009-08-22 21:53:35.000000000 +0200
+@@ -9,7 +9,7 @@
+ SMSRCDIR=ifdef(`confSMSRCDIR', `confSMSRCDIR', `${SRCDIR}/sendmail')
+ PREPENDDEF(`confINCDIRS', `-I${SMSRCDIR} ')
+ 
+-bldPRODUCT_START(`library', `libmilter')
++bldPRODUCT_START(`milterlibrary', `libmilter')
+ define(`bldINSTALLABLE', `true')
+ define(`LIBMILTER_EXTRAS', `errstring.c strl.c')
+ APPENDDEF(`confENVDEF', `-DNOT_SENDMAIL -Dsm_snprintf=snprintf')
diff --git a/nixpkgs/pkgs/development/libraries/libminc/default.nix b/nixpkgs/pkgs/development/libraries/libminc/default.nix
new file mode 100644
index 000000000000..189d2b12e519
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libminc/default.nix
@@ -0,0 +1,48 @@
+{ lib, stdenv, fetchFromGitHub, cmake, zlib, netcdf, nifticlib, hdf5 }:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname   = "libminc";
+  version = "2.4.06";
+
+  src = fetchFromGitHub {
+    owner = "BIC-MNI";
+    repo = "libminc";
+    rev = "refs/tags/release-${finalAttrs.version}";
+    hash = "sha256-HTt3y0AFM9pkEkWPb9cDmvUz4iBQWfpX7wLF9Vlg8hc=";
+  };
+
+  postPatch = ''
+    patchShebangs .
+  '';
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [
+    zlib
+    nifticlib
+  ];
+  propagatedBuildInputs = [
+    netcdf
+    hdf5
+  ];
+
+  cmakeFlags = [
+    "-DLIBMINC_MINC1_SUPPORT=ON"
+    "-DLIBMINC_BUILD_SHARED_LIBS=ON"
+    "-DLIBMINC_USE_NIFTI=ON"
+    "-DLIBMINC_USE_SYSTEM_NIFTI=ON"
+  ];
+
+  doCheck = !stdenv.isDarwin;
+    # -j1: see https://github.com/BIC-MNI/libminc/issues/110
+  checkPhase = ''
+    ctest -j1 --output-on-failure
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/BIC-MNI/libminc";
+    description = "Medical imaging library based on HDF5";
+    maintainers = with maintainers; [ bcdarwin ];
+    platforms = platforms.unix;
+    license = licenses.free;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libmkv/default.nix b/nixpkgs/pkgs/development/libraries/libmkv/default.nix
new file mode 100644
index 000000000000..584d76e1cf2b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmkv/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchFromGitHub, libtool, autoconf, automake }:
+
+stdenv.mkDerivation rec {
+  pname = "libmkv";
+  version = "0.6.5.1";
+
+  src = fetchFromGitHub {
+    owner = "saintdev";
+    repo = pname;
+    rev = "refs/tags/${version}";
+    sha256 = "0pr9q7yprndl8d15ir7i7cznvmf1yqpvnsyivv763n6wryssq6dl";
+  };
+
+  nativeBuildInputs = [ libtool autoconf automake ];
+
+  preConfigure = "sh bootstrap.sh";
+
+  meta = {
+    description = "Abandoned library. Alternative lightweight Matroska muxer written for HandBrake";
+    longDescription = ''
+      Library was meant to be an alternative to the official libmatroska library.
+      It is written in plain C, and intended to be very portable.
+    '';
+    homepage = "https://github.com/saintdev/libmkv";
+    license = lib.licenses.gpl2;
+    maintainers = [ lib.maintainers.wmertens ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmms/default.nix b/nixpkgs/pkgs/development/libraries/libmms/default.nix
new file mode 100644
index 000000000000..0d099e77b6e3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmms/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchurl, glib, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "libmms";
+  version = "0.6.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libmms/libmms-${version}.tar.gz";
+    sha256 = "0kvhxr5hkabj9v7ah2rzkbirndfqdijd9hp8v52c1z6bxddf019w";
+  };
+
+  buildInputs = [ glib ];
+
+  nativeBuildInputs = [ pkg-config ];
+
+  meta = with lib; {
+    description = "Library for downloading (streaming) media files using the mmst and mmsh protocols";
+    homepage = "http://libmms.sourceforge.net";
+    platforms = platforms.all;
+    license = licenses.lgpl21;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmng/default.nix b/nixpkgs/pkgs/development/libraries/libmng/default.nix
new file mode 100644
index 000000000000..15a68bdce589
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmng/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchurl, zlib, libpng, libjpeg, lcms2 }:
+
+stdenv.mkDerivation rec {
+  pname = "libmng";
+  version = "2.0.3";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libmng/${pname}-${version}.tar.xz";
+    sha256 = "1lvxnpds0vcf0lil6ia2036ghqlbl740c4d2sz0q5g6l93fjyija";
+  };
+
+  outputs = [ "out" "dev" "devdoc" ];
+  outputMan= "devdoc";
+
+  propagatedBuildInputs = [ zlib libpng libjpeg lcms2 ];
+
+  meta = with lib; {
+    description = "Reference library for reading, displaying, writing and examining Multiple-Image Network Graphics";
+    homepage = "http://www.libmng.com";
+    license = licenses.zlib;
+    maintainers = with maintainers; [ marcweber ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmnl/default.nix b/nixpkgs/pkgs/development/libraries/libmnl/default.nix
new file mode 100644
index 000000000000..9a6f6a1d14dc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmnl/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libmnl";
+  version = "1.0.5";
+
+  src = fetchurl {
+    url = "https://netfilter.org/projects/libmnl/files/${pname}-${version}.tar.bz2";
+    sha256 = "09851ns07399rbz0y8slrlmnw3fn1nakr8d37pxjn5gkks8rnjr7";
+  };
+
+  meta = {
+    description = "Minimalistic user-space library oriented to Netlink developers";
+    longDescription = ''
+      libmnl is a minimalistic user-space library oriented to Netlink developers.
+      There are a lot of common tasks in parsing, validating, constructing of both the Netlink
+      header and TLVs that are repetitive and easy to get wrong.
+      This library aims to provide simple helpers that allows you to re-use code and to avoid
+      re-inventing the wheel.
+    '';
+    homepage = "https://netfilter.org/projects/libmnl/index.html";
+    license = lib.licenses.lgpl21Plus;
+
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmodbus/default.nix b/nixpkgs/pkgs/development/libraries/libmodbus/default.nix
new file mode 100644
index 000000000000..72fdbc4c0219
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmodbus/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "libmodbus";
+  version = "3.1.10";
+
+  src = fetchFromGitHub {
+    owner = "stephane";
+    repo = "libmodbus";
+    rev = "v${version}";
+    hash = "sha256-e2lB5D41a5MOmz9M90ZXfIltSOxNDOrQUpRNU2yYd1k=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  configureFlags = [
+    # when cross-compiling we assume that the host system will return a valid
+    # pointer for calls to malloc(0) or realloc(0)
+    # https://www.uclibc.org/FAQ.html#gnu_malloc
+    # https://www.gnu.org/software/autoconf/manual/autoconf.html#index-AC_005fFUNC_005fMALLOC-454
+    # the upstream source should be patched to avoid needing this
+    "ac_cv_func_malloc_0_nonnull=yes"
+    "ac_cv_func_realloc_0_nonnull=yes"
+  ];
+
+  meta = with lib; {
+    description = "Library to send/receive data according to the Modbus protocol";
+    homepage = "https://libmodbus.org/";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.bjornfor ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmodplug/default.nix b/nixpkgs/pkgs/development/libraries/libmodplug/default.nix
new file mode 100644
index 000000000000..334dfa9d8015
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmodplug/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchurl, file }:
+
+stdenv.mkDerivation rec {
+  pname = "libmodplug";
+  version = "0.8.9.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/modplug-xmms/libmodplug/${version}/${pname}-${version}.tar.gz";
+    sha256 = "1pnri98a603xk47smnxr551svbmgbzcw018mq1k6srbrq6kaaz25";
+  };
+
+  # Unfortunately, upstream appears inactive and the patches from the fork don’t apply cleanly.
+  # Modify `src/fastmix.cpp` to remove usage of the register storage class, which is
+  # not allowed in C++17 and is an error in clang 16.
+  prePatch = "substituteInPlace src/fastmix.cpp --replace 'register ' ''";
+
+  outputs = [ "out" "dev" ];
+
+  preConfigure = ''
+     substituteInPlace configure \
+        --replace ' -mmacosx-version-min=10.5' "" \
+        --replace /usr/bin/file ${file}/bin/file
+  '';
+
+  meta = with lib; {
+    description = "MOD playing library";
+    homepage    = "https://modplug-xmms.sourceforge.net/";
+    license     = licenses.publicDomain;
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ raskin ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmodule/default.nix b/nixpkgs/pkgs/development/libraries/libmodule/default.nix
new file mode 100644
index 000000000000..dd98908f3111
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmodule/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchFromGitHub
+, cmake, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "libmodule";
+  version = "5.0.1";
+
+  src = fetchFromGitHub {
+    owner = "FedeDP";
+    repo = "libmodule";
+    rev = version;
+    sha256 = "sha256-wkRiDWO9wUyxkAeqvm99u22Jq4xnQJx6zS7Sb+R8iMg=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  # https://github.com/FedeDP/libmodule/issues/7
+  postPatch = ''
+    substituteInPlace Extra/libmodule.pc.in \
+      --replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
+      --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
+  '';
+
+  meta = with lib; {
+    description = "C simple and elegant implementation of an actor library";
+    homepage = "https://github.com/FedeDP/libmodule";
+    platforms = platforms.linux;
+    license = licenses.mit;
+    maintainers = with maintainers; [
+      eadwu
+    ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmodulemd/default.nix b/nixpkgs/pkgs/development/libraries/libmodulemd/default.nix
new file mode 100644
index 000000000000..7f21e52a037c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmodulemd/default.nix
@@ -0,0 +1,73 @@
+{ lib, stdenv
+, substituteAll
+, fetchFromGitHub
+, pkg-config
+, meson
+, ninja
+, gobject-introspection
+, python3
+, libyaml
+, rpm
+, file
+, gtk-doc
+, docbook-xsl-nons
+, docbook_xml_dtd_412
+, glib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libmodulemd";
+  version = "2.15.0";
+
+  outputs = [ "bin" "out" "dev" "devdoc" "man" "py" ];
+
+  src = fetchFromGitHub {
+    owner = "fedora-modularity";
+    repo = pname;
+    rev = "${pname}-${version}";
+    sha256 = "sha256-mIyrdksyEk1AKV+vw4g8LUwlQRzwwMkPDuCbw2IiNcA=";
+  };
+
+  patches = [
+    # Use proper glib devdoc path.
+    (substituteAll {
+      src = ./glib-devdoc.patch;
+      glib_devdoc = glib.devdoc;
+    })
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+    meson
+    ninja
+    gtk-doc
+    docbook-xsl-nons
+    docbook_xml_dtd_412
+    gobject-introspection
+  ];
+
+  buildInputs = [
+    libyaml
+    rpm
+    file # for libmagic
+    glib
+  ];
+
+  mesonFlags = [
+    "-Dgobject_overrides_dir_py3=${placeholder "py"}/${python3.sitePackages}/gi/overrides"
+  ];
+
+  postFixup = ''
+    # Python overrides depend our own typelibs and other packages
+    mkdir -p "$py/nix-support"
+    echo "$out ${python3.pkgs.pygobject3} ${python3.pkgs.six}" > "$py/nix-support/propagated-build-inputs"
+  '';
+
+  meta = with lib; {
+    description = "C Library for manipulating module metadata files";
+    homepage = "https://github.com/fedora-modularity/libmodulemd";
+    license = licenses.mit;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.linux ++ platforms.darwin ;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmodulemd/glib-devdoc.patch b/nixpkgs/pkgs/development/libraries/libmodulemd/glib-devdoc.patch
new file mode 100644
index 000000000000..cde42d8e0b2e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmodulemd/glib-devdoc.patch
@@ -0,0 +1,13 @@
+diff --git a/meson.build b/meson.build
+index a8b02b4..dd31a76 100644
+--- a/meson.build
++++ b/meson.build
+@@ -67,7 +67,7 @@ test = find_program('test')
+ with_docs = get_option('with_docs')
+ if with_docs
+   gtkdoc = dependency('gtk-doc')
+-  glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
++  glib_docpath = join_paths('@glib_devdoc@', 'share', 'gtk-doc', 'html')
+ 
+   ret = run_command ([test, '-e', join_paths(glib_docpath, 'glib/index.html')])
+   if ret.returncode() != 0
diff --git a/nixpkgs/pkgs/development/libraries/libmongocrypt/default.nix b/nixpkgs/pkgs/development/libraries/libmongocrypt/default.nix
new file mode 100644
index 000000000000..f45d41fed628
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmongocrypt/default.nix
@@ -0,0 +1,59 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, pkg-config
+, mongoc
+, openssl
+, darwin
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libmongocrypt";
+  version = "1.7.4";
+
+  src = fetchFromGitHub {
+    owner = "mongodb";
+    repo = pname;
+    rev = version;
+    hash = "sha256-I4KG2BHAovin9EaF8lNzJzucARvi0Qptz5Y9gTt3WkE=";
+  };
+
+  patches = [
+    # fix pkg-config files
+    # submitted upstream: https://github.com/mongodb/libmongocrypt/pull/634
+    (fetchpatch {
+      url = "https://github.com/mongodb/libmongocrypt/commit/5514cf0a366c4d0dc1b0f2a62201f0f1161054da.diff";
+      hash = "sha256-eMSn6MRnc3yKfU2u/Bg3juWiupDzY1DUGi1/HSRftIs=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [
+    mongoc
+    openssl
+  ] ++ lib.optionals stdenv.isDarwin [
+    darwin.apple_sdk_11_0.frameworks.Security
+  ];
+
+  cmakeFlags = [
+    # all three of these are required to use system libbson
+    "-DUSE_SHARED_LIBBSON=ON"
+    "-DMONGOCRYPT_MONGOC_DIR=USE-SYSTEM"
+    "-DENABLE_ONLINE_TESTS=OFF"
+
+    # this pulls in a library we don't have
+    "-DMONGOCRYPT_ENABLE_DECIMAL128=OFF"
+
+    # this avoids a dependency on Python
+    "-DBUILD_VERSION=${version}"
+  ];
+
+  meta = with lib; {
+    description = "Required C library for client-side and queryable encryption in MongoDB";
+    homepage = "https://github.com/mongodb/libmongocrypt";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmowgli/default.nix b/nixpkgs/pkgs/development/libraries/libmowgli/default.nix
new file mode 100644
index 000000000000..a2a3971844bc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmowgli/default.nix
@@ -0,0 +1,20 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "libmowgli";
+  version = "2.1.3";
+
+  src = fetchFromGitHub {
+    owner = "atheme";
+    repo = "libmowgli-2";
+    rev = "v${version}";
+    sha256 = "sha256-jlw6ixMoIdIjmQ86N+KN+Gez218sw894POkcCYnT0s0=";
+  };
+
+  meta = with lib; {
+    description = "A development framework for C providing high performance and highly flexible algorithms";
+    homepage = "https://github.com/atheme/libmowgli-2";
+    license = licenses.isc;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmp3splt/default.nix b/nixpkgs/pkgs/development/libraries/libmp3splt/default.nix
new file mode 100644
index 000000000000..0e813375b9a2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmp3splt/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchurl, libtool, libmad, libid3tag }:
+
+stdenv.mkDerivation rec {
+  pname = "libmp3splt";
+  version = "0.9.2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/mp3splt/${pname}-${version}.tar.gz";
+    sha256 = "1p1mn2hsmj5cp40fnc8g1yfvk72p8pjxi866gjdkgjsqrr7xdvih";
+  };
+
+  outputs = [ "out" "dev" ];
+  nativeBuildInputs = [ libtool ];
+  buildInputs = [ libmad libid3tag ];
+
+  configureFlags = [ "--disable-pcre" ];
+
+  meta = with lib; {
+    homepage    = "https://sourceforge.net/projects/mp3splt/";
+    description = "Utility to split mp3, ogg vorbis and FLAC files without decoding";
+    maintainers = with maintainers; [ bosu ];
+    platforms   = platforms.unix;
+    license = licenses.gpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmpack/default.nix b/nixpkgs/pkgs/development/libraries/libmpack/default.nix
new file mode 100644
index 000000000000..edb692d512d7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmpack/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, libtool }:
+
+stdenv.mkDerivation rec {
+  pname = "libmpack";
+  version = "1.0.5";
+  src = fetchFromGitHub {
+    owner = "libmpack";
+    repo = "libmpack";
+    rev = version;
+    sha256 = "0rai5djdkjz7bsn025k5489in7r1amagw1pib0z4qns6b52kiar2";
+  };
+
+  makeFlags = [
+    "LIBTOOL=${libtool}/bin/libtool"
+    "PREFIX=$(out)"
+    "config=release"
+  ];
+
+  meta = with lib; {
+    description = "Simple implementation of msgpack in C";
+    homepage = "https://github.com/tarruda/libmpack/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ lovek323 ];
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmpc/default.nix b/nixpkgs/pkgs/development/libraries/libmpc/default.nix
new file mode 100644
index 000000000000..fe11b59f4523
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmpc/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv, fetchurl
+, gmp, mpfr
+}:
+
+# Note: this package is used for bootstrapping fetchurl, and thus
+# cannot use fetchpatch! All mutable patches (generated by GitHub or
+# cgit) that are needed here should be included directly in Nixpkgs as
+# files.
+
+stdenv.mkDerivation rec {
+  pname = "libmpc";
+  version = "1.3.1"; # to avoid clash with the MPD client
+
+  src = fetchurl {
+    url = "mirror://gnu/mpc/mpc-${version}.tar.gz";
+    sha256 = "sha256-q2QkkvXPiCt0qgy3MM1BCoHtzb7IlRg86TDnBsHHWbg=";
+  };
+
+  strictDeps = true;
+  enableParallelBuilding = true;
+
+  buildInputs = [ gmp mpfr ];
+
+  doCheck = true; # not cross;
+
+  meta = {
+    description = "Library for multiprecision complex arithmetic with exact rounding";
+
+    longDescription =
+      '' GNU MPC is a C library for the arithmetic of complex numbers with
+         arbitrarily high precision and correct rounding of the result.  It is
+         built upon and follows the same principles as GNU MPFR.
+      '';
+
+    homepage = "https://www.multiprecision.org/mpc/";
+    license = lib.licenses.lgpl2Plus;
+
+    platforms = lib.platforms.all;
+    maintainers = [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmpcdec/default.nix b/nixpkgs/pkgs/development/libraries/libmpcdec/default.nix
new file mode 100644
index 000000000000..753687221245
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmpcdec/default.nix
@@ -0,0 +1,17 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libmpcdec";
+  version = "1.2.6";
+
+  src = fetchurl {
+    url = "https://files.musepack.net/source/libmpcdec-${version}.tar.bz2";
+    sha256 = "1a0jdyga1zfi4wgkg3905y6inghy3s4xfs5m4x7pal08m0llkmab";
+  };
+
+  meta = {
+    description = "Musepack SV7 decoder library";
+    platforms = lib.platforms.unix;
+    license = lib.licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmpeg2/default.nix b/nixpkgs/pkgs/development/libraries/libmpeg2/default.nix
new file mode 100644
index 000000000000..bf5f25ca43f8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmpeg2/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  version = "0.5.1";
+  pname = "libmpeg2";
+
+  src = fetchurl {
+    url = "http://libmpeg2.sourceforge.net/files/${pname}-${version}.tar.gz";
+    sha256 = "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny";
+  };
+
+  # Otherwise clang fails with 'duplicate symbol ___sputc'
+  buildFlags = lib.optional stdenv.isDarwin "CFLAGS=-std=gnu89";
+
+  meta = {
+    homepage = "http://libmpeg2.sourceforge.net/";
+    description = "A free library for decoding mpeg-2 and mpeg-1 video streams";
+    license = lib.licenses.gpl2;
+    maintainers = with lib.maintainers; [ ];
+    platforms = with lib.platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmrss/default.nix b/nixpkgs/pkgs/development/libraries/libmrss/default.nix
new file mode 100644
index 000000000000..43d829b98342
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmrss/default.nix
@@ -0,0 +1,23 @@
+{lib, stdenv, fetchurl, curl, libnxml, pkg-config}:
+
+stdenv.mkDerivation rec {
+  pname = "libmrss";
+  version = "0.19.2";
+
+  src = fetchurl {
+    url = "https://www.autistici.org/bakunin/libmrss/libmrss-${version}.tar.gz";
+    sha256 = "02r1bgj8qlkn63xqfi5yq8y7wrilxcnkycaag8qskhg5ranic507";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  propagatedBuildInputs = [ curl libnxml ];
+
+  meta = {
+    homepage = "http://www.autistici.org/bakunin/libmrss/doc";
+    description = "C library for parsing, writing and creating RSS/ATOM files or streams";
+    license = lib.licenses.lgpl2;
+
+    platforms = lib.platforms.all;
+    maintainers = [ lib.maintainers.viric ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmspack/default.nix b/nixpkgs/pkgs/development/libraries/libmspack/default.nix
new file mode 100644
index 000000000000..a26f0c3f3a48
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmspack/default.nix
@@ -0,0 +1,18 @@
+{lib, stdenv, fetchurl}:
+
+stdenv.mkDerivation rec {
+  pname = "libmspack";
+  version = "0.10.1alpha";
+
+  src = fetchurl {
+    url = "https://www.cabextract.org.uk/libmspack/${pname}-${version}.tar.gz";
+    sha256 = "13janaqsvm7aqc4agjgd4819pbgqv50j88bh5kci1z70wvg65j5s";
+  };
+
+  meta = {
+    description = "A de/compression library for various Microsoft formats";
+    homepage = "https://www.cabextract.org.uk/libmspack";
+    license = lib.licenses.lgpl2Only;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmtp/default.nix b/nixpkgs/pkgs/development/libraries/libmtp/default.nix
new file mode 100644
index 000000000000..cd6820fdab06
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmtp/default.nix
@@ -0,0 +1,72 @@
+{ stdenv
+, autoconf
+, automake
+, fetchFromGitHub
+, fetchpatch
+, gettext
+, lib
+, libiconv
+, libtool
+, libusb1
+, pkg-config
+, buildPackages
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libmtp";
+  version = "1.1.21";
+
+  src = fetchFromGitHub {
+    owner = "libmtp";
+    repo = "libmtp";
+    rev = "libmtp-${builtins.replaceStrings [ "." ] [ "-" ] version}";
+    sha256 = "sha256-m9QFVD8udQ3SdGwn276BnIKqGeATA5QuokOK29Ykc1k=";
+  };
+
+  patches = [
+    # Backport cross fix.
+    (fetchpatch {
+      url = "https://github.com/libmtp/libmtp/commit/467fa26e6b14c0884b15cf6d191de97e5513fe05.patch";
+      sha256 = "2DrRrdcguJ9su4LxtT6YOjer8gUTxIoHVpk+6M9P4cg=";
+    })
+  ];
+
+  outputs = [ "bin" "dev" "out" ];
+
+  nativeBuildInputs = [
+    autoconf
+    automake
+    gettext
+    libtool
+    pkg-config
+  ];
+
+  buildInputs = [ libiconv ];
+
+  propagatedBuildInputs = [ libusb1 ];
+
+  preConfigure = "NOCONFIGURE=1 ./autogen.sh";
+
+  configureFlags = [ "--with-udev=${placeholder "out"}/lib/udev" ];
+
+  configurePlatforms = [ "build" "host" ];
+
+  makeFlags = lib.optionals (stdenv.isLinux && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    "MTP_HOTPLUG=${buildPackages.libmtp}/bin/mtp-hotplug"
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/libmtp/libmtp";
+    description = "An implementation of Microsoft's Media Transfer Protocol";
+    longDescription = ''
+      libmtp is an implementation of Microsoft's Media Transfer Protocol (MTP)
+      in the form of a library suitable primarily for POSIX compliant operating
+      systems. We implement MTP Basic, the stuff proposed for standardization.
+    '';
+    platforms = platforms.unix;
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ lovesegfault ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmusicbrainz/5.x.nix b/nixpkgs/pkgs/development/libraries/libmusicbrainz/5.x.nix
new file mode 100644
index 000000000000..14a6cc16c837
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmusicbrainz/5.x.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, neon, libdiscid, libxml2, pkg-config }:
+
+stdenv.mkDerivation rec {
+  version = "5.1.0";
+  pname = "libmusicbrainz";
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ neon libdiscid libxml2 ];
+
+  src = fetchFromGitHub {
+    owner  = "metabrainz";
+    repo   = "libmusicbrainz";
+    sha256 = "0ah9kaf3g3iv1cps2vs1hs33nfbjfx1xscpjgxr1cg28p4ri6jhq";
+    rev    = "release-${version}";
+  };
+
+  patches = [
+    # Fix build with libxml2 2.12
+    (fetchpatch {
+      url = "https://github.com/metabrainz/libmusicbrainz/commit/9ba00067a15479a52262a5126bcb6889da5884b7.patch";
+      hash = "sha256-4VxTohLpjUNnNZGIoRpBjUz71mLP3blg4oFL7itnJnY=";
+    })
+    (fetchpatch {
+      url = "https://github.com/metabrainz/libmusicbrainz/commit/558c9ba0e6d702d5c877f75be98176f57abf1b02.patch";
+      hash = "sha256-hKYY4BJLh/Real3NugLwzc4gPBQ3NB/F63iI/aV8Wh8=";
+    })
+  ];
+
+  dontUseCmakeBuildDir=true;
+
+  meta = with lib; {
+    homepage = "http://musicbrainz.org/doc/libmusicbrainz";
+    description = "MusicBrainz Client Library (5.x version)";
+    longDescription = ''
+      The libmusicbrainz (also known as mb_client or MusicBrainz Client
+      Library) is a development library geared towards developers who wish to
+      add MusicBrainz lookup capabilities to their applications.'';
+    platforms = platforms.all;
+    license = licenses.lgpl21;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmusicbrainz/default.nix b/nixpkgs/pkgs/development/libraries/libmusicbrainz/default.nix
new file mode 100644
index 000000000000..a77d64ffddce
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmusicbrainz/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl, cmake, neon, libdiscid }:
+
+stdenv.mkDerivation rec {
+  pname = "libmusicbrainz";
+  version = "3.0.3";
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ neon libdiscid ];
+
+  src = fetchurl {
+    url = "ftp://ftp.musicbrainz.org/pub/musicbrainz/${pname}-${version}.tar.gz";
+    sha256 = "1i9qly13bwwmgj68vma766hgvsd1m75236haqsp9zgh5znlmkm3z";
+  };
+
+  patches = [
+    # Fix spacing around string literal for modern clang
+    ./v3-darwin.patch
+  ];
+
+  meta = with lib; {
+    homepage = "http://musicbrainz.org/doc/libmusicbrainz";
+    description = "MusicBrainz Client Library (3.x version)";
+    longDescription = ''
+      The libmusicbrainz (also known as mb_client or MusicBrainz Client
+      Library) is a development library geared towards developers who wish to
+      add MusicBrainz lookup capabilities to their applications.'';
+    platforms = platforms.all;
+    license = licenses.lgpl21;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmusicbrainz/v3-darwin.patch b/nixpkgs/pkgs/development/libraries/libmusicbrainz/v3-darwin.patch
new file mode 100644
index 000000000000..af97eaff1ed3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmusicbrainz/v3-darwin.patch
@@ -0,0 +1,22 @@
+diff --git a/src/webservice.cpp b/src/webservice.cpp
+index 3a36167..df14812 100644
+--- a/src/webservice.cpp
++++ b/src/webservice.cpp
+@@ -184,7 +184,7 @@ WebService::get(const std::string &entity,
+ 	if (!sess) 
+ 		throw WebServiceError("ne_session_create() failed.");
+ 	ne_set_server_auth(sess, httpAuth, this);
+-	ne_set_useragent(sess, PACKAGE"/"VERSION);
++	ne_set_useragent(sess, PACKAGE "/" VERSION);
+ 	
+ 	// Use proxy server
+ 	if (!d->proxyHost.empty()) {
+@@ -269,7 +269,7 @@ WebService::post(const std::string &entity,
+ 	if (!sess) 
+ 		throw WebServiceError("ne_session_create() failed.");
+ 	ne_set_server_auth(sess, httpAuth, this);
+-	ne_set_useragent(sess, PACKAGE"/"VERSION);
++	ne_set_useragent(sess, PACKAGE "/" VERSION);
+ 
+ 	// Use proxy server
+ 	if (!d->proxyHost.empty()) {
diff --git a/nixpkgs/pkgs/development/libraries/libmwaw/default.nix b/nixpkgs/pkgs/development/libraries/libmwaw/default.nix
new file mode 100644
index 000000000000..cc2a292a0493
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmwaw/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl, boost, pkg-config, cppunit, zlib, libwpg, libwpd, librevenge }:
+
+stdenv.mkDerivation rec {
+  pname = "libmwaw";
+  version = "0.3.22";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libmwaw/libmwaw/libmwaw-${version}/libmwaw-${version}.tar.xz";
+    sha256 = "sha256-oaOf/Oo/8qenquDCOHfd9JGLVUv4Kw3l186Of2HqjjI=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [
+    boost
+    cppunit
+    zlib
+    libwpg
+    libwpd
+    librevenge
+  ];
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Import library for some old mac text documents";
+    license = licenses.mpl20;
+    maintainers = with maintainers; [ raskin ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmx/default.nix b/nixpkgs/pkgs/development/libraries/libmx/default.nix
new file mode 100644
index 000000000000..52d92840a346
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmx/default.nix
@@ -0,0 +1,62 @@
+{ lib, stdenv, fetchFromGitHub
+, libtool, pkg-config, automake, autoconf, intltool
+, glib, gobject-introspection, gtk2, gtk-doc
+, clutter, clutter-gtk
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libmx";
+  version = "1.4.7";
+
+  src = fetchFromGitHub {
+    owner = "clutter-project";
+    repo = "mx";
+    rev = version;
+    sha256 = "sha256-+heIPSkg3d22xsU48UOTJ9FPLXC7zLivcnabQOM9aEk=";
+  };
+
+  # remove the following superfluous checks
+  preConfigure = ''
+    substituteInPlace "autogen.sh" \
+      --replace '`which intltoolize`' '"x"' \
+      --replace '`which gtkdocize`' '"x"' \
+      --replace '`which autoreconf`' '"x"'
+  '';
+
+  configureFlags = [ "--enable-introspection"
+                     "--without-startup-notification"
+                     "--without-dbus"
+                     "--without-glade"
+                     "--without-clutter-imcontext"
+                     "--without-clutter-gesture"
+                   ];
+
+  configureScript = "sh autogen.sh";
+
+  nativeBuildInputs = [ pkg-config automake autoconf intltool gobject-introspection ];
+  buildInputs = [
+    libtool
+    gtk2 gtk-doc clutter clutter-gtk
+  ];
+
+  # patch to resolve GL errors
+  # source : https://github.com/clutter-project/mx/pull/62
+  preBuild = ''
+    sed -i 's/GLushort/gushort/g' mx/mx-deform-texture.c
+    sed -i 's/GLfloat/gfloat/g' mx/mx-texture-frame.c
+  '';
+
+  meta = with lib; {
+    homepage = "http://www.clutter-project.org/";
+    description = "A Clutter-based toolkit";
+    longDescription =
+      ''Mx is a widget toolkit using Clutter that provides a set of standard
+        interface elements, including buttons, progress bars, scroll bars and
+        others. It also implements some standard managers. One other interesting
+        feature is the possibility setting style properties from a CSS format
+        file.'';
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ ];
+    platforms = with platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmypaint/default.nix b/nixpkgs/pkgs/development/libraries/libmypaint/default.nix
new file mode 100644
index 000000000000..655480f75a2f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmypaint/default.nix
@@ -0,0 +1,55 @@
+{ lib, stdenv
+, autoconf
+, automake
+, fetchFromGitHub
+, glib
+, intltool
+, json_c
+, libtool
+, pkg-config
+, python3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libmypaint";
+  version = "1.6.1";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "mypaint";
+    repo = "libmypaint";
+    rev = "v${version}";
+    sha256 = "1ppgpmnhph9h8ayx9776f79a0bxbdszfw9c6bw7c3ffy2yk40178";
+  };
+
+  nativeBuildInputs = [
+    autoconf
+    automake
+    intltool
+    libtool
+    pkg-config
+    python3
+  ];
+
+  buildInputs = [
+    glib
+  ];
+
+  # for libmypaint.pc
+  propagatedBuildInputs = [
+    json_c
+  ];
+
+  doCheck = true;
+
+  preConfigure = "./autogen.sh";
+
+  meta = with lib; {
+    homepage = "http://mypaint.org/";
+    description = "Library for making brushstrokes which is used by MyPaint and other projects";
+    license = licenses.isc;
+    maintainers = with maintainers; [ goibhniu jtojnar ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libmysqlconnectorcpp/default.nix b/nixpkgs/pkgs/development/libraries/libmysqlconnectorcpp/default.nix
new file mode 100644
index 000000000000..a5a1983e615e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libmysqlconnectorcpp/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv
+, fetchurl
+, cmake
+, boost
+, openssl
+, mysql80
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libmysqlconnectorcpp";
+  version = "8.3.0";
+
+  src = fetchurl {
+    url = "https://cdn.mysql.com/Downloads/Connector-C++/mysql-connector-c++-${version}-src.tar.gz";
+    hash = "sha256-oXvx+tErGrF/X2x3ZiifuHIA6RlFMjTD7BZk13NL6Pg=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = [
+    boost
+    openssl
+    mysql80
+  ];
+
+  cmakeFlags = [
+    # libmysqlclient is shared library
+    "-DMYSQLCLIENT_STATIC_LINKING=false"
+    # still needed for mysql-workbench
+    "-DWITH_JDBC=true"
+  ];
+
+  meta = {
+    homepage = "https://dev.mysql.com/downloads/connector/cpp/";
+    description = "C++ library for connecting to mysql servers";
+    license = lib.licenses.gpl2Only;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libnabo/default.nix b/nixpkgs/pkgs/development/libraries/libnabo/default.nix
new file mode 100644
index 000000000000..af5e78c25d66
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libnabo/default.nix
@@ -0,0 +1,31 @@
+{lib, stdenv, fetchFromGitHub, cmake, eigen, boost}:
+
+stdenv.mkDerivation rec {
+  version = "1.0.7";
+  pname = "libnabo";
+
+  src = fetchFromGitHub {
+    owner = "ethz-asl";
+    repo = "libnabo";
+    rev = version;
+    sha256 = "17vxlmszzpm95vvfdxnm98d5p297i10fyblblj6kf0ynq8r2mpsh";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ eigen boost ];
+
+  cmakeFlags = [
+    "-DEIGEN_INCLUDE_DIR=${eigen}/include/eigen3"
+  ];
+
+  doCheck = true;
+  checkTarget = "test";
+
+  meta = with lib; {
+    inherit (src.meta) homepage;
+    description = "A fast K Nearest Neighbor library for low-dimensional spaces";
+    license = licenses.bsd3;
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ cryptix ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libnatpmp/default.nix b/nixpkgs/pkgs/development/libraries/libnatpmp/default.nix
new file mode 100644
index 000000000000..49e89b97344b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libnatpmp/default.nix
@@ -0,0 +1,44 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, fixDarwinDylibNames
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libnatpmp";
+  version = "20230423";
+
+  src = fetchurl {
+    url = "https://miniupnp.tuxfamily.org/files/${pname}-${version}.tar.gz";
+    hash = "sha256-BoTtLIQGQ351GaG9IOqDeA24cbOjpddSMRuj6Inb/HA=";
+  };
+
+  patches = [
+    # install natpmp_declspec.h too, else nothing that uses this library will build
+    (fetchpatch {
+      url = "https://github.com/miniupnp/libnatpmp/commit/5f4a7c65837a56e62c133db33c28cd1ea71db662.patch";
+      hash = "sha256-tvoGFmo5AzUgb40bIs/EzikE0ex1SFzE5peLXhktnbc=";
+    })
+  ];
+
+  makeFlags = [
+    "INSTALLPREFIX=$(out)"
+    "CC:=$(CC)"
+  ];
+
+  nativeBuildInputs = lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+  postFixup = ''
+    chmod +x $out/lib/*
+  '';
+
+  meta = with lib; {
+    description = "NAT-PMP client";
+    homepage = "http://miniupnp.free.fr/libnatpmp.html";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ orivej ];
+    mainProgram = "natpmpc";
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libnats-c/default.nix b/nixpkgs/pkgs/development/libraries/libnats-c/default.nix
new file mode 100644
index 000000000000..e0ee93c16286
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libnats-c/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchFromGitHub
+, cmake, protobuf, protobufc
+, libsodium, openssl
+}:
+
+stdenv.mkDerivation rec {
+  pname   = "libnats";
+  version = "3.7.0";
+
+  src = fetchFromGitHub {
+    owner  = "nats-io";
+    repo   = "nats.c";
+    rev    = "v${version}";
+    sha256 = "sha256-BIEe3DhPqyK+vAAk/6x8Ui+4t+IUyvtHf5Lk2AZVuC8=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ libsodium openssl protobuf protobufc ];
+
+  separateDebugInfo = true;
+  outputs = [ "out" "dev" ];
+
+  # https://github.com/nats-io/nats.c/issues/542
+  postPatch = ''
+    substituteInPlace src/libnats.pc.in \
+      --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
+  '';
+
+  meta = with lib; {
+    description = "C API for the NATS messaging system";
+    homepage    = "https://github.com/nats-io/nats.c";
+    license     = licenses.asl20;
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ thoughtpolice ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libnatspec/default.nix b/nixpkgs/pkgs/development/libraries/libnatspec/default.nix
new file mode 100644
index 000000000000..360aba08e709
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libnatspec/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchurl, autoreconfHook, popt, libiconv }:
+
+stdenv.mkDerivation rec {
+  pname = "libnatspec";
+  version = "0.3.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/natspec/${pname}-${version}.tar.bz2";
+    sha256 = "0wffxjlc8svilwmrcg3crddpfrpv35mzzjgchf8ygqsvwbrbb3b7";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  buildInputs = [ popt ];
+
+  propagatedBuildInputs = [ libiconv ];
+
+  meta = with lib; {
+    homepage = "https://natspec.sourceforge.net/";
+    description = "A library intended to smooth national specificities in using of programs";
+    platforms = platforms.unix;
+    license = licenses.lgpl21;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libnbd/default.nix b/nixpkgs/pkgs/development/libraries/libnbd/default.nix
new file mode 100644
index 000000000000..5889c8ef12d5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libnbd/default.nix
@@ -0,0 +1,63 @@
+{ lib
+, stdenv
+, fetchurl
+, bash-completion
+, pkg-config
+, perl
+, libxml2
+, fuse
+, fuse3
+, gnutls
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libnbd";
+  version = "1.18.2";
+
+  src = fetchurl {
+    url = "https://download.libguestfs.org/libnbd/${lib.versions.majorMinor version}-stable/${pname}-${version}.tar.gz";
+    hash = "sha256-OYtNHAIGgwJuapoJNEMVkurUK9bQ7KO+V223bGC0TFI=";
+  };
+
+  nativeBuildInputs = [
+    bash-completion
+    pkg-config
+    perl
+  ];
+
+  buildInputs = [
+    fuse
+    fuse3
+    gnutls
+    libxml2
+  ];
+
+  installFlags = [ "bashcompdir=$(out)/share/bash-completion/completions" ];
+
+  meta = with lib; {
+    homepage = "https://gitlab.com/nbdkit/libnbd";
+    description = "Network Block Device client library in userspace";
+    longDescription = ''
+      NBD — Network Block Device — is a protocol for accessing Block Devices
+      (hard disks and disk-like things) over a Network.  This is the NBD client
+      library in userspace, a simple library for writing NBD clients.
+
+      The key features are:
+      - Synchronous API for ease of use.
+      - Asynchronous API for writing non-blocking, multithreaded clients. You
+        can mix both APIs freely.
+      - High performance.
+      - Minimal dependencies for the basic library.
+      - Well-documented, stable API.
+      - Bindings in several programming languages.
+      - Shell (nbdsh) for command line and scripting.
+    '';
+    license = with licenses; lgpl21Plus;
+    maintainers = with maintainers; [ AndersonTorres humancalico ];
+    platforms = with platforms; linux;
+  };
+}
+# TODO: package the 1.6-stable version too
+# TODO: git version needs ocaml
+# TODO: bindings for go, ocaml and python
+
diff --git a/nixpkgs/pkgs/development/libraries/libndctl/default.nix b/nixpkgs/pkgs/development/libraries/libndctl/default.nix
new file mode 100644
index 000000000000..6e82191e7558
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libndctl/default.nix
@@ -0,0 +1,50 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook
+, asciidoc, pkg-config, xmlto, docbook_xsl, docbook_xml_dtd_45, libxslt
+, json_c, kmod, which, util-linux, udev, keyutils
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libndctl";
+  version = "71.1";
+
+  src = fetchFromGitHub {
+    owner  = "pmem";
+    repo   = "ndctl";
+    rev    = "v${version}";
+    sha256 = "sha256-osux3DiKRh8ftHwyfFI+WSFx20+yJsg1nVx5nuoKJu4=";
+  };
+
+  outputs = [ "out" "lib" "man" "dev" ];
+
+  nativeBuildInputs =
+    [ autoreconfHook asciidoc pkg-config xmlto docbook_xml_dtd_45 docbook_xsl libxslt
+      which
+    ];
+
+  buildInputs =
+    [ json_c kmod util-linux udev keyutils
+    ];
+
+  configureFlags =
+    [ "--without-bash"
+      "--without-systemd"
+      "--disable-asciidoctor" # depends on ruby 2.7, use asciidoc instead
+    ];
+
+  patchPhase = ''
+    patchShebangs test
+
+    substituteInPlace git-version --replace /bin/bash ${stdenv.shell}
+    substituteInPlace git-version-gen --replace /bin/sh ${stdenv.shell}
+
+    echo "m4_define([GIT_VERSION], [${version}])" > version.m4;
+  '';
+
+  meta = with lib; {
+    description = "Tools for managing the Linux Non-Volatile Memory Device sub-system";
+    homepage    = "https://github.com/pmem/ndctl";
+    license     = licenses.lgpl21;
+    maintainers = with maintainers; [ thoughtpolice ];
+    platforms   = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libndp/default.nix b/nixpkgs/pkgs/development/libraries/libndp/default.nix
new file mode 100644
index 000000000000..6109c48b036e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libndp/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchurl, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "libndp";
+  version = "1.8";
+
+  src = fetchurl {
+    url = "http://libndp.org/files/libndp-${version}.tar.gz";
+    sha256 = "sha256-iP+2buLrUn8Ub1wC9cy8OLqX0rDVfrRr+6SIghqwwCs=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  meta = with lib; {
+    homepage = "http://libndp.org/";
+    description = "Library for Neighbor Discovery Protocol";
+    platforms = platforms.linux;
+    maintainers = [ ];
+    license = licenses.lgpl21;
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/libndtypes/default.nix b/nixpkgs/pkgs/development/libraries/libndtypes/default.nix
new file mode 100644
index 000000000000..175b48f10934
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libndtypes/default.nix
@@ -0,0 +1,31 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+}:
+
+stdenv.mkDerivation {
+  pname = "libndtypes";
+  version = "unstable-2019-08-01";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "xnd-project";
+    repo = "ndtypes";
+    rev = "3ce6607c96d8fe67b72cc0c97bf595620cdd274e";
+    sha256 = "18303q0jfar1lmi4krp94plczb455zcgw772f9lb8xa5p0bkhx01";
+  };
+
+  # Override linker with cc (symlink to either gcc or clang)
+  # Library expects to use cc for linking
+  configureFlags = [ "LD=${stdenv.cc.targetPrefix}cc" ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Dynamic types for data description and in-memory computations";
+    homepage = "https://xnd.io/";
+    license = licenses.bsdOriginal;
+    maintainers = [ maintainers.costrouc ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libnest2d/default.nix b/nixpkgs/pkgs/development/libraries/libnest2d/default.nix
new file mode 100644
index 000000000000..b3aba528f924
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libnest2d/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub, cmake, clipper, nlopt, boost }:
+
+stdenv.mkDerivation {
+  version = "4.12.0";
+  pname = "libnest2d";
+
+  # This revision is waiting to be merged upstream
+  # Once it has been merged, this should be switched to it
+  # Upstream PR: https://github.com/tamasmeszaros/libnest2d/pull/18
+  src = fetchFromGitHub {
+    owner = "Ultimaker";
+    repo = "libnest2d";
+    rev = "31391fd173249ad9b906390058e13b09238fadc8";
+    sha256 = "1hzqi4z55x76rss3xk7hfqhy9hcaq2jaav5jqxa1aqmbvarr2gla";
+  };
+
+  postPatch = ''
+    substituteInPlace {,examples/}CMakeLists.txt \
+      --replace "set(CMAKE_CXX_STANDARD 11)" "set(CMAKE_CXX_STANDARD 14)"
+  '';
+
+  propagatedBuildInputs = [ clipper nlopt boost ];
+  nativeBuildInputs = [ cmake ];
+
+  CLIPPER_PATH = "${clipper.out}";
+  cmakeFlags = [ "-DLIBNEST2D_HEADER_ONLY=OFF" ];
+
+  meta = with lib; {
+    description =
+      "2D irregular bin packaging and nesting library written in modern C++";
+    homepage = "https://github.com/Ultimaker/libnest2d";
+    license = licenses.lgpl3;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libnet/default.nix b/nixpkgs/pkgs/development/libraries/libnet/default.nix
new file mode 100644
index 000000000000..b835844491fb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libnet/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool }:
+
+stdenv.mkDerivation rec {
+  pname = "libnet";
+  version = "1.3";
+
+  src = fetchFromGitHub {
+    owner = "sam-github";
+    repo = "libnet";
+    rev = "v${version}";
+    hash = "sha256-P3LaDMMNPyEnA8nO1Bm7H0mW/hVBr0cFdg+p2JmWcGI=";
+  };
+
+  nativeBuildInputs = [
+    autoconf
+    automake
+    libtool
+  ];
+
+  preConfigure = "./autogen.sh";
+
+  meta = with lib; {
+    homepage = "https://github.com/sam-github/libnet";
+    description = "Portable framework for low-level network packet construction";
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libnetfilter_acct/default.nix b/nixpkgs/pkgs/development/libraries/libnetfilter_acct/default.nix
new file mode 100644
index 000000000000..6c52d7f7b560
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libnetfilter_acct/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl, pkg-config, libmnl }:
+
+stdenv.mkDerivation rec {
+  version = "1.0.3";
+  pname = "libnetfilter_acct";
+
+  src = fetchurl {
+    url = "https://www.netfilter.org/projects/libnetfilter_acct/files/${pname}-${version}.tar.bz2";
+    sha256 = "06lsjndgfjsgfjr43px2n2wk3nr7whz6r405mks3887y7vpwwl22";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libmnl ];
+
+  meta = with lib; {
+    homepage = "https://www.netfilter.org/projects/libnetfilter_acct/";
+    description = "Userspace library providing interface to extended accounting infrastructure";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libnetfilter_conntrack/default.nix b/nixpkgs/pkgs/development/libraries/libnetfilter_conntrack/default.nix
new file mode 100644
index 000000000000..e960c8d1bf48
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libnetfilter_conntrack/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchurl, fetchpatch, pkg-config, libnfnetlink, libmnl }:
+
+stdenv.mkDerivation rec {
+  pname = "libnetfilter_conntrack";
+  version = "1.0.9";
+
+  src = fetchurl {
+    url = "https://netfilter.org/projects/libnetfilter_conntrack/files/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-Z72d9J/jTouCFE9t+5OzIPOEqOpZcn6S/40YtfS1eag=";
+  };
+
+  patches = [
+    # Fix Musl build.
+    (fetchpatch {
+      url = "https://git.netfilter.org/libnetfilter_conntrack/patch/?id=21ee35dde73aec5eba35290587d479218c6dd824";
+      sha256 = "00rp82jrx5ygcw8la3c7bv7sigw9qzbn956dk71qjx981a2g2kqk";
+    })
+  ];
+
+  buildInputs = [ libmnl ];
+  propagatedBuildInputs = [ libnfnetlink ];
+  nativeBuildInputs = [ pkg-config ];
+
+  meta = with lib; {
+    description = "Userspace library providing an API to the in-kernel connection tracking state table";
+    longDescription = ''
+      libnetfilter_conntrack is a userspace library providing a programming interface (API) to the
+      in-kernel connection tracking state table. The library libnetfilter_conntrack has been
+      previously known as libnfnetlink_conntrack and libctnetlink. This library is currently used
+      by conntrack-tools among many other applications
+    '';
+    homepage = "https://netfilter.org/projects/libnetfilter_conntrack/";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libnetfilter_cthelper/default.nix b/nixpkgs/pkgs/development/libraries/libnetfilter_cthelper/default.nix
new file mode 100644
index 000000000000..5d221bed34a0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libnetfilter_cthelper/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl, pkg-config, libmnl }:
+
+stdenv.mkDerivation rec {
+  pname = "libnetfilter_cthelper";
+  version = "1.0.1";
+
+  src = fetchurl {
+    url = "https://netfilter.org/projects/libnetfilter_cthelper/files/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-FAc9VIcjOJc1XT/wTdwcjQPMW6jSNWI2qogWGp8tyRI=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libmnl ];
+
+  meta = {
+    description = "Userspace library that provides the programming interface to the user-space connection tracking helper infrastructure";
+    longDescription = ''
+      libnetfilter_cthelper is the userspace library that provides the programming interface
+      to the user-space helper infrastructure available since Linux kernel 3.6. With this
+      library, you register, configure, enable and disable user-space helpers. This library
+      is used by conntrack-tools.
+    '';
+    homepage = "https://www.netfilter.org/projects/libnetfilter_cthelper/";
+    license = lib.licenses.gpl2Plus;
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libnetfilter_cttimeout/default.nix b/nixpkgs/pkgs/development/libraries/libnetfilter_cttimeout/default.nix
new file mode 100644
index 000000000000..d4b53a181871
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libnetfilter_cttimeout/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl, pkg-config, libmnl }:
+
+stdenv.mkDerivation rec {
+  pname = "libnetfilter_cttimeout";
+  version = "1.0.1";
+
+  src = fetchurl {
+    url = "https://netfilter.org/projects/libnetfilter_cttimeout/files/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-C1naLzIE4cgMuF0fbXIoX8B7AaL1Z4q/Xcz7vv1lAyU=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libmnl ];
+
+  meta = {
+    description = "Userspace library that provides the programming interface to the connection tracking timeout infrastructure";
+    longDescription = ''
+      libnetfilter_cttimeout is the userspace library that provides the programming
+      interface to the fine-grain connection tracking timeout infrastructure.
+      With this library, you can create, update and delete timeout policies that can
+      be attached to traffic flows. This library is used by conntrack-tools.
+    '';
+    homepage = "https://netfilter.org/projects/libnetfilter_cttimeout/";
+    license = lib.licenses.gpl2Plus;
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libnetfilter_log/default.nix b/nixpkgs/pkgs/development/libraries/libnetfilter_log/default.nix
new file mode 100644
index 000000000000..aadc3d92b597
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libnetfilter_log/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl, pkg-config, libnfnetlink, libmnl }:
+
+stdenv.mkDerivation rec {
+  pname = "libnetfilter_log";
+  version = "1.0.2";
+
+  src = fetchurl {
+    url = "https://netfilter.org/projects/libnetfilter_log/files/${pname}-${version}.tar.bz2";
+    sha256 = "1spy9xs41v76kid5ana8n126f3mvgq6fjibbfbj4kn0larbhix73";
+  };
+
+  buildInputs = [ libmnl ];
+  propagatedBuildInputs = [ libnfnetlink ];
+  nativeBuildInputs = [ pkg-config ];
+
+  meta = with lib; {
+    description = "Userspace library providing interface to packets that have been logged by the kernel packet filter";
+    longDescription = ''
+      libnetfilter_log is a userspace library providing interface to packets
+      that have been logged by the kernel packet filter. It is is part of a
+      system that deprecates the old syslog/dmesg based packet logging. This
+      library has been previously known as libnfnetlink_log.
+    '';
+    homepage = "https://netfilter.org/projects/libnetfilter_log/";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ orivej ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libnetfilter_queue/default.nix b/nixpkgs/pkgs/development/libraries/libnetfilter_queue/default.nix
new file mode 100644
index 000000000000..d1783289965e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libnetfilter_queue/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl, pkg-config, libmnl, libnfnetlink }:
+
+stdenv.mkDerivation rec {
+  version = "1.0.5";
+  pname = "libnetfilter_queue";
+
+  src = fetchurl {
+    url = "https://www.netfilter.org/projects/libnetfilter_queue/files/${pname}-${version}.tar.bz2";
+    sha256 = "1xdra6i4p8jkv943ygjw646qx8df27f7p5852kc06vjx608krzzr";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libmnl libnfnetlink ];
+
+  meta = with lib; {
+    homepage = "https://www.netfilter.org/projects/libnetfilter_queue/";
+    description = "Userspace API to packets queued by the kernel packet filter";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libnfc/default.nix b/nixpkgs/pkgs/development/libraries/libnfc/default.nix
new file mode 100644
index 000000000000..88bc909ea0e6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libnfc/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, libusb-compat-0_1
+, readline
+, cmake
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libnfc";
+  version = "1.8.0";
+
+  src = fetchFromGitHub {
+    owner = "nfc-tools";
+    repo = pname;
+    rev = "libnfc-${version}";
+    sha256 = "5gMv/HajPrUL/vkegEqHgN2d6Yzf01dTMrx4l34KMrQ=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    libusb-compat-0_1
+    readline
+  ];
+
+  configureFlags = [
+    "sysconfdir=/etc"
+  ];
+
+  cmakeFlags = lib.optionals stdenv.isDarwin [
+    "-DLIBNFC_DRIVER_PN532_I2C=OFF"
+    "-DLIBNFC_DRIVER_PN532_SPI=OFF"
+  ];
+
+  meta = with lib; {
+    description = "Library for Near Field Communication (NFC)";
+    homepage = "https://github.com/nfc-tools/libnfc";
+    license = licenses.lgpl3Plus;
+    maintainers = with maintainers; [ offline ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libnfnetlink/default.nix b/nixpkgs/pkgs/development/libraries/libnfnetlink/default.nix
new file mode 100644
index 000000000000..3b6b804a8dc6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libnfnetlink/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libnfnetlink";
+  version = "1.0.2";
+
+  src = fetchurl {
+    url = "https://www.netfilter.org/projects/libnfnetlink/files/libnfnetlink-${version}.tar.bz2";
+    sha256 = "0xn3rcrzxr6g82kfxzs9bqn2zvl2kf2yda30drwb9vr6sk1wfr5h";
+  };
+
+  meta = {
+    description = "Low-level library for netfilter related kernel/userspace communication";
+    longDescription = ''
+      libnfnetlink is the low-level library for netfilter related kernel/userspace communication.
+      It provides a generic messaging infrastructure for in-kernel netfilter subsystems
+      (such as nfnetlink_log, nfnetlink_queue, nfnetlink_conntrack) and their respective users
+      and/or management tools in userspace.
+
+      This library is not meant as a public API for application developers.
+      It is only used by other netfilter.org projects, like the aforementioned ones.
+    '';
+    homepage = "https://www.netfilter.org/projects/libnfnetlink/index.html";
+    license = lib.licenses.gpl2;
+
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libnfs/default.nix b/nixpkgs/pkgs/development/libraries/libnfs/default.nix
new file mode 100644
index 000000000000..d9beee7933fa
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libnfs/default.nix
@@ -0,0 +1,42 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "libnfs";
+  version = "5.0.2";
+
+  src = fetchFromGitHub {
+    owner = "sahlberg";
+    repo = "libnfs";
+    rev = "libnfs-${version}";
+    sha256 = "sha256-rdxi5bPXHTICZQIj/CmHgZ/V70svnITJj/OSF4mmC3o=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  patches = [
+    # Fixes 100% CPU usage in multi-threaded mode
+    (fetchpatch {
+      url = "https://github.com/sahlberg/libnfs/commit/34d6fe37e986da5b0ced86cd028a88e482537d5a.patch";
+      sha256 = "sha256-i7mi+TVdkLb4MztT5Ic/Q8XBIWk9lo8v5bNjHOr6LaI=";
+    })
+    # Fixes deprecation warnings on macOS
+    (fetchpatch {
+      url = "https://github.com/sahlberg/libnfs/commit/f6631c54a7b0385988f11357bf96728a6d7345b9.patch";
+      sha256 = "sha256-xLRZ9J1vr04n//gNv9ljUBt5LHUGBRRVIXJCMlFbHFI=";
+    })
+  ];
+
+  configureFlags = [
+    "--enable-pthread"
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "NFS client library";
+    homepage    = "https://github.com/sahlberg/libnfs";
+    license     = with licenses; [ lgpl2 bsd2 gpl3 ];
+    maintainers = with maintainers; [ peterhoeg ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libnftnl/default.nix b/nixpkgs/pkgs/development/libraries/libnftnl/default.nix
new file mode 100644
index 000000000000..941ef5dad79f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libnftnl/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchurl, pkg-config, libmnl }:
+
+stdenv.mkDerivation rec {
+  version = "1.2.6";
+  pname = "libnftnl";
+
+  src = fetchurl {
+    url = "https://netfilter.org/projects/${pname}/files/${pname}-${version}.tar.xz";
+    hash = "sha256-zurqLNkhR9oZ8To1p/GkvCdn/4l+g45LR5z1S1nHd/Q=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libmnl ];
+
+  meta = with lib; {
+    description = "A userspace library providing a low-level netlink API to the in-kernel nf_tables subsystem";
+    homepage = "https://netfilter.org/projects/libnftnl/";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ fpletz ] ++ teams.helsinki-systems.members;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libngspice/default.nix b/nixpkgs/pkgs/development/libraries/libngspice/default.nix
new file mode 100644
index 000000000000..840ff2177d85
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libngspice/default.nix
@@ -0,0 +1,49 @@
+{ lib
+, stdenv
+, fetchurl
+, flex
+, bison
+, fftw
+, withNgshared ? true
+, libXaw
+, libXext
+}:
+
+stdenv.mkDerivation rec {
+  pname = "${lib.optionalString withNgshared "lib"}ngspice";
+  version = "42";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/ngspice/ngspice-${version}.tar.gz";
+    hash = "sha256-c3/jhGqyMzolDfrfHtbr4YYK8dil/154A8dyzEJW5Qo=";
+  };
+
+  nativeBuildInputs = [
+    flex
+    bison
+  ];
+
+  buildInputs = [
+    fftw
+  ] ++ lib.optionals (!withNgshared) [
+    libXaw
+    libXext
+  ];
+
+  configureFlags = lib.optionals withNgshared [
+    "--with-ngshared"
+  ] ++ [
+    "--enable-xspice"
+    "--enable-cider"
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "The Next Generation Spice (Electronic Circuit Simulator)";
+    homepage = "http://ngspice.sourceforge.net";
+    license = with licenses; [ bsd3 gpl2Plus lgpl2Plus ]; # See https://sourceforge.net/p/ngspice/ngspice/ci/master/tree/COPYING
+    maintainers = with maintainers; [ bgamari rongcuid ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libnice/default.nix b/nixpkgs/pkgs/development/libraries/libnice/default.nix
new file mode 100644
index 000000000000..ade70284ba68
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libnice/default.nix
@@ -0,0 +1,89 @@
+{ lib, stdenv
+, fetchurl
+, fetchpatch
+, meson
+, ninja
+, pkg-config
+, python3
+, gobject-introspection
+, gtk-doc
+, docbook_xsl
+, docbook_xml_dtd_412
+, glib
+, gupnp-igd
+, gst_all_1
+, gnutls
+, graphviz
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libnice";
+  version = "0.1.21";
+
+  outputs = [ "bin" "out" "dev" ]
+    ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" ];
+
+  src = fetchurl {
+    url = "https://libnice.freedesktop.org/releases/${pname}-${version}.tar.gz";
+    hash = "sha256-cuc6Ks8g9ZCT4h1WAWBuQFhzUD6zXzRvpiHeI+mbOzk=";
+  };
+
+  patches = [
+    # Fix generating data
+    # Note: upstream is not willing to merge our fix
+    # https://gitlab.freedesktop.org/libnice/libnice/merge_requests/35#note_98871
+    (fetchpatch {
+      url = "https://gitlab.freedesktop.org/libnice/libnice/commit/d470c4bf4f2449f7842df26ca1ce1efb63452bc6.patch";
+      sha256 = "0z74vizf92flfw1m83p7yz824vfykmnm0xbnk748bnnyq186i6mg";
+    })
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    python3
+    gobject-introspection
+
+    # documentation
+    gtk-doc
+    docbook_xsl
+    docbook_xml_dtd_412
+    graphviz
+  ];
+
+  buildInputs = [
+    gst_all_1.gstreamer
+    gst_all_1.gst-plugins-base
+    gnutls
+    gupnp-igd
+  ];
+
+  propagatedBuildInputs = [
+    glib
+  ];
+
+  mesonFlags = [
+    "-Dgtk_doc=${if (stdenv.buildPlatform == stdenv.hostPlatform) then "enabled" else "disabled"}"
+    "-Dintrospection=${if (stdenv.buildPlatform == stdenv.hostPlatform) then "enabled" else "disabled"}"
+    "-Dexamples=disabled" # requires many dependencies and probably not useful for our users
+  ];
+
+  # Tests are flaky
+  # see https://github.com/NixOS/nixpkgs/pull/53293#issuecomment-453739295
+  doCheck = false;
+
+  meta = with lib; {
+    description = "GLib ICE implementation";
+    longDescription = ''
+      Libnice is an implementation of the IETF's Interactice Connectivity
+      Establishment (ICE) standard (RFC 5245) and the Session Traversal
+      Utilities for NAT (STUN) standard (RFC 5389).
+
+      It provides a GLib-based library, libnice and a Glib-free library,
+      libstun as well as GStreamer elements.'';
+    homepage = "https://libnice.freedesktop.org/";
+    platforms = platforms.unix;
+    license = with licenses; [ lgpl21 mpl11 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libnitrokey/default.nix b/nixpkgs/pkgs/development/libraries/libnitrokey/default.nix
new file mode 100644
index 000000000000..6b847a8e742d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libnitrokey/default.nix
@@ -0,0 +1,45 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, hidapi
+, libusb1
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libnitrokey";
+  version = "3.8";
+
+  src = fetchFromGitHub {
+    owner = "Nitrokey";
+    repo = "libnitrokey";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-4PEZ31QyVOmdhpKqTN8fwcHoLuu+w+OJ3fZeqwlE+io=";
+    # On OSX, libnitrokey depends on a custom version of hidapi in a submodule.
+    # Monitor https://github.com/Nitrokey/libnitrokey/issues/140 to see if we
+    # can remove this extra work one day.
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  cmakeFlags = [
+    "-DADD_GIT_INFO=OFF"
+    "-DCMAKE_INSTALL_UDEVRULESDIR=etc/udev/rules.d"
+  ];
+
+  buildInputs = [ libusb1 ];
+
+  propagatedBuildInputs = [ hidapi ];
+
+  meta = with lib; {
+    description = "Communicate with Nitrokey devices in a clean and easy manner";
+    homepage = "https://github.com/Nitrokey/libnitrokey";
+    license = licenses.lgpl3;
+    maintainers = with maintainers; [ panicgh raitobezarius ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libnixxml/default.nix b/nixpkgs/pkgs/development/libraries/libnixxml/default.nix
new file mode 100644
index 000000000000..7a9e0580e37e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libnixxml/default.nix
@@ -0,0 +1,61 @@
+{ fetchFromGitHub, lib, stdenv, autoreconfHook, pkg-config, libxml2, gd, glib, getopt, libxslt, nix, bash}:
+
+stdenv.mkDerivation {
+  pname = "libnixxml";
+  version = "unstable-2020-06-25";
+
+  src = fetchFromGitHub {
+    owner = "svanderburg";
+    repo = "libnixxml";
+    rev = "54c04a5fdbc8661b2445a7527f499e0a77753a1a";
+    sha256 = "sha256-HKQnCkO1TDs1e0MDil0Roq4YRembqRHQvb7lK3GAftQ=";
+  };
+
+  prePatch = ''
+    # Remove broken test
+    substituteInPlace tests/draw/Makefile.am \
+      --replace "draw-wrong.sh" ""
+    rm tests/draw/draw-wrong.sh
+
+    # Fix bash path
+    substituteInPlace scripts/nixexpr2xml.in \
+      --replace "/bin/bash" "${bash}/bin/bash"
+  '';
+
+  preAutoreconf = ''
+    # Copied from bootstrap script
+    ln -s README.md README
+    mkdir -p config
+  '';
+
+  configureFlags = [ "--with-gd" "--with-glib" ];
+  CFLAGS = "-Wall";
+
+  strictDeps = true;
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+    getopt
+    libxslt
+  ];
+  buildInputs = [
+    bash
+    libxml2
+    gd.dev
+    glib
+    nix
+  ];
+  nativeCheckInputs = [
+    nix
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "XML-based Nix-friendly data integration library";
+    homepage = "https://github.com/svanderburg/libnixxml";
+    license = licenses.mit;
+    maintainers = with maintainers; [ tomberek ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libnotify/default.nix b/nixpkgs/pkgs/development/libraries/libnotify/default.nix
new file mode 100644
index 000000000000..589703f574c6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libnotify/default.nix
@@ -0,0 +1,68 @@
+{ lib, stdenv
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, libxslt
+, docbook-xsl-ns
+, glib
+, gdk-pixbuf
+, gnome
+, buildPackages
+, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
+, gobject-introspection
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libnotify";
+  version = "0.8.3";
+
+  outputs = [ "out" "man" "dev" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    hash = "sha256-7o8++UYVatNAb99F/u29zZMtvSEatPFvdeuk82+y9sA=";
+  };
+
+  mesonFlags = [
+    # disable tests as we don't need to depend on GTK (2/3)
+    "-Dtests=false"
+    "-Ddocbook_docs=disabled"
+    "-Dgtk_doc=false"
+    "-Dintrospection=${if withIntrospection then "enabled" else "disabled"}"
+  ];
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    libxslt
+    docbook-xsl-ns
+    glib # for glib-mkenums needed during the build
+  ] ++ lib.optionals withIntrospection [
+    gobject-introspection
+  ];
+
+  propagatedBuildInputs = [
+    gdk-pixbuf
+    glib
+  ];
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "none";
+    };
+  };
+
+  meta = with lib; {
+    description = "A library that sends desktop notifications to a notification daemon";
+    homepage = "https://gitlab.gnome.org/GNOME/libnotify";
+    license = licenses.lgpl21;
+    maintainers = teams.gnome.members;
+    mainProgram = "notify-send";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libnsl/default.nix b/nixpkgs/pkgs/development/libraries/libnsl/default.nix
new file mode 100644
index 000000000000..b199406918ab
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libnsl/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, libtirpc, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "libnsl";
+  version = "2.0.1";
+
+  src = fetchFromGitHub {
+    owner = "thkukuk";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-bCToqXVE4RZcoZ2eTNZcVHyzKlWyIpSAssQCOZcfmEA=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ libtirpc ];
+
+  meta = with lib; {
+    description = "Client interface library for NIS(YP) and NIS+";
+    homepage = "https://github.com/thkukuk/libnsl";
+    license = licenses.lgpl21;
+    maintainers = [ maintainers.dezgeg ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libnut/default.nix b/nixpkgs/pkgs/development/libraries/libnut/default.nix
new file mode 100644
index 000000000000..401327b0158a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libnut/default.nix
@@ -0,0 +1,29 @@
+{ stdenv
+, lib
+, fetchgit
+}:
+stdenv.mkDerivation rec {
+  pname = "libnut";
+  version = "unstable-2020-11-06";
+
+  src = fetchgit {
+    url = "https://git.ffmpeg.org/nut.git";
+    rev = "12f6a7af3e0f34fd957cf078b66f072d3dc695b3";
+    sha256 = "1wgl2mb9482c1j3yac0v2ilfjs7gb9mhw9kjnrmlj9kp0whm4l1j";
+  };
+
+  sourceRoot = "${src.name}/src/trunk";
+  makeFlags = ["prefix=$(out)"];
+  installTargets = [
+    "install-libnut"
+    "install-nututils"
+  ];
+
+  meta = with lib; {
+    description = "A library to read/write the NUT video container format";
+    homepage = "https://git.ffmpeg.org/gitweb/nut.git";
+    license = licenses.mit;
+    maintainers = with maintainers; [quag];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libnxml/default.nix b/nixpkgs/pkgs/development/libraries/libnxml/default.nix
new file mode 100644
index 000000000000..6a0c52c9e99a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libnxml/default.nix
@@ -0,0 +1,22 @@
+{lib, stdenv, fetchurl, curl}:
+
+stdenv.mkDerivation rec {
+  pname = "libnxml";
+  version = "0.18.3";
+
+  src = fetchurl {
+    url = "https://www.autistici.org/bakunin/libnxml/libnxml-${version}.tar.gz";
+    sha256 = "0ix5b9bxd7r517vhgcxwdviq4m0g0pq46s5g3h04gcqnpbin150g";
+  };
+
+  buildInputs = [ curl ];
+
+  meta = {
+    homepage = "https://www.autistici.org/bakunin/libnxml/";
+    description = "C library for parsing, writing and creating XML 1.0 and 1.1 files or streams";
+    license = lib.licenses.lgpl2;
+
+    platforms = lib.platforms.all;
+    maintainers = [ lib.maintainers.viric ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/liboauth/default.nix b/nixpkgs/pkgs/development/libraries/liboauth/default.nix
new file mode 100644
index 000000000000..3f2f02987fbb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liboauth/default.nix
@@ -0,0 +1,33 @@
+{ fetchurl, lib, stdenv, nss, nspr, pkg-config }:
+
+
+stdenv.mkDerivation rec {
+  pname = "liboauth";
+  version = "1.0.3";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/liboauth/${pname}-${version}.tar.gz";
+    sha256 = "07w1aq8y8wld43wmbk2q8134p3bfkp2vma78mmsfgw2jn1bh3xhd";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ pkg-config ];
+
+  propagatedBuildInputs = [ nss nspr ];
+
+  configureFlags = [ "--enable-nss" ];
+
+  postInstall = ''
+    substituteInPlace $out/lib/liboauth.la \
+      --replace "-lnss3" "-L${nss.out}/lib -lnss3"
+  '';
+
+  meta = with lib; {
+    platforms = platforms.all;
+    description = "C library implementing the OAuth secure authentication protocol";
+    homepage = "http://liboauth.sourceforge.net/";
+    license = licenses.mit;
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/libodb-sqlite/default.nix b/nixpkgs/pkgs/development/libraries/libodb-sqlite/default.nix
new file mode 100644
index 000000000000..9ac1153deee2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libodb-sqlite/default.nix
@@ -0,0 +1,57 @@
+{ lib, stdenv
+, build2
+, fetchurl
+, libodb
+, sqlite
+, enableShared ? !stdenv.hostPlatform.isStatic
+, enableStatic ? !enableShared
+}:
+stdenv.mkDerivation rec {
+  pname = "libodb-sqlite";
+  version = "2.5.0-b.25";
+
+  outputs = [ "out" "dev" "doc" ];
+
+  src = fetchurl {
+    url = "https://pkg.cppget.org/1/beta/odb/libodb-sqlite-${version}.tar.gz";
+    hash = "sha256-Ko40WZErbL77B4eoJ5FFko/gTFYhADGlBzxPLuy8Wqc=";
+  };
+
+  nativeBuildInputs = [
+    build2
+  ];
+  buildInputs = [
+    libodb
+  ];
+  propagatedBuildInputs = [
+    sqlite
+  ];
+
+  build2ConfigureFlags = [
+    "config.bin.lib=${build2.configSharedStatic enableShared enableStatic}"
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "SQLite ODB runtime library";
+    longDescription = ''
+      ODB is an object-relational mapping (ORM) system for C++. It provides
+      tools, APIs, and library support that allow you to persist C++ objects
+      to a relational database (RDBMS) without having to deal with tables,
+      columns, or SQL and without manually writing any of the mapping code.
+      For more information see:
+
+      http://www.codesynthesis.com/products/odb/
+
+      This package contains the SQLite ODB runtime library. Every application
+      that includes code generated for the SQLite database will need to link
+      to this library.
+    '';
+    homepage = "https://www.codesynthesis.com/products/odb/";
+    changelog = "https://git.codesynthesis.com/cgit/odb/libodb-sqlite/tree/NEWS";
+    license = licenses.gpl2Only;
+    maintainers = with maintainers; [ r-burns ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libodb/default.nix b/nixpkgs/pkgs/development/libraries/libodb/default.nix
new file mode 100644
index 000000000000..c016fc657d6f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libodb/default.nix
@@ -0,0 +1,46 @@
+{ lib, stdenv
+, build2
+, fetchurl
+, enableShared ? !stdenv.hostPlatform.isStatic
+, enableStatic ? !enableShared
+}:
+stdenv.mkDerivation rec {
+  pname = "libodb";
+  version = "2.5.0-b.25";
+
+  outputs = [ "out" "dev" "doc" ];
+
+  src = fetchurl {
+    url = "https://pkg.cppget.org/1/beta/odb/libodb-${version}.tar.gz";
+    hash = "sha256-G634kVRbgwfBmIh8QqUclr/xvY3o0ouVmp/jxJrHzcs=";
+  };
+
+  nativeBuildInputs = [ build2 ];
+  build2ConfigureFlags = [
+    "config.bin.lib=${build2.configSharedStatic enableShared enableStatic}"
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Common ODB runtime library";
+    longDescription = ''
+      ODB is an object-relational mapping (ORM) system for C++. It provides
+      tools, APIs, and library support that allow you to persist C++ objects
+      to a relational database (RDBMS) without having to deal with tables,
+      columns, or SQL and without manually writing any of the mapping code.
+      For more information see:
+
+      http://www.codesynthesis.com/products/odb/
+
+      This package contains the common ODB runtime library. Every application
+      that includes code generated by the ODB compiler will need to link to
+      this library.
+    '';
+    homepage = "https://www.codesynthesis.com/products/odb/";
+    changelog = "https://git.codesynthesis.com/cgit/odb/libodb/tree/NEWS";
+    license = licenses.gpl2Only;
+    maintainers = with maintainers; [ r-burns ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libodfgen/default.nix b/nixpkgs/pkgs/development/libraries/libodfgen/default.nix
new file mode 100644
index 000000000000..d4a6aab24c87
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libodfgen/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl, boost, pkg-config, cppunit, zlib, libwpg, libwpd, librevenge }:
+
+stdenv.mkDerivation rec {
+  pname = "libodfgen";
+  version = "0.1.7";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/libwpd/libodfgen/libodfgen-${version}/libodfgen-${version}.tar.xz";
+    sha256 = "sha256-Mj5JH5VsjKKrsSyZjjUGcJMKMjF7+WYrBhXdSzkiuDE=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [
+    boost
+    cppunit
+    zlib
+    libwpg
+    libwpd
+    librevenge
+  ];
+
+  meta = with lib; {
+    description = "A base library for generating ODF documents";
+    license = licenses.mpl20;
+    maintainers = with maintainers; [ raskin ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libofa/default.nix b/nixpkgs/pkgs/development/libraries/libofa/default.nix
new file mode 100644
index 000000000000..a64afbb930ae
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libofa/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchurl, expat, curl, fftw }:
+
+stdenv.mkDerivation rec {
+  pname = "libofa";
+  version = "0.9.3";
+  deb_patch = "5";
+
+  src = fetchurl {
+    url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/musicip-libofa/${pname}-${version}.tar.gz";
+    sha256 = "184ham039l7lwhfgg0xr2vch2xnw1lwh7sid432mh879adhlc5h2";
+  };
+
+  patches = fetchurl {
+    url = "mirror://debian/pool/main/libo/libofa/libofa_${version}-${deb_patch}.debian.tar.gz";
+    sha256 = "1rfkyz13cm8izm90c1xflp4rvsa24aqs6qpbbbqqcbmvzsj6j9yn";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  setOutputFlags = false;
+
+  preConfigure = ''
+    configureFlagsArray=(--includedir=$dev/include --libdir=$out/lib)
+  '';
+
+  propagatedBuildInputs = [ expat curl fftw ];
+
+  meta = with lib; {
+    homepage = "https://code.google.com/archive/p/musicip-libofa/";
+    description = "Library Open Fingerprint Architecture";
+    longDescription = ''
+      LibOFA (Library Open Fingerprint Architecture) is an open-source audio
+      fingerprint created and provided by MusicIP'';
+    platforms = platforms.linux;
+    license = licenses.gpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libofx/default.nix b/nixpkgs/pkgs/development/libraries/libofx/default.nix
new file mode 100644
index 000000000000..b7dddd16672c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libofx/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub, opensp, pkg-config, libxml2, curl
+, autoconf, automake, libtool, gengetopt, libiconv }:
+
+stdenv.mkDerivation rec {
+  pname = "libofx";
+  version = "0.10.9";
+
+  src = fetchFromGitHub {
+    owner = "LibOFX";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-KOQrEAt1jHrOpPQ7QbGUADe0i7sQXNH2fblPRzT0EIg=";
+  };
+
+  preConfigure = "./autogen.sh";
+  configureFlags = [ "--with-opensp-includes=${opensp}/include/OpenSP" ];
+  nativeBuildInputs = [ pkg-config libtool autoconf automake gengetopt ];
+  buildInputs = [ opensp libxml2 curl ] ++ lib.optional stdenv.isDarwin libiconv;
+
+  meta = {
+    description = "Opensource implementation of the Open Financial eXchange specification";
+    homepage = "https://libofx.sourceforge.net/";
+    license = "LGPL";
+    platforms = lib.platforms.unix;
+    maintainers = [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libogg/default.nix b/nixpkgs/pkgs/development/libraries/libogg/default.nix
new file mode 100644
index 000000000000..ba0338ffd934
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libogg/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libogg";
+  version = "1.3.5";
+
+  src = fetchurl {
+    url = "http://downloads.xiph.org/releases/ogg/${pname}-${version}.tar.xz";
+    sha256 = "01b7050bghdvbxvw0gzv588fn4a27zh42ljpwzm4vrf8dziipnf4";
+  };
+
+  outputs = [ "out" "dev" "doc" ];
+
+  meta = with lib; {
+    description = "Media container library to manipulate Ogg files";
+    longDescription = ''
+      Library to work with Ogg multimedia container format.
+      Ogg is flexible file storage and streaming format that supports
+      plethora of codecs. Open format free for anyone to use.
+    '';
+    homepage = "https://xiph.org/ogg/";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.ehmry ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/liboggz/default.nix b/nixpkgs/pkgs/development/libraries/liboggz/default.nix
new file mode 100644
index 000000000000..ecf013363ad7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liboggz/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchurl, libogg, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "liboggz";
+  version = "1.1.1";
+
+  src = fetchurl {
+    url = "https://downloads.xiph.org/releases/liboggz/${pname}-${version}.tar.gz";
+    sha256 = "0nj17lhnsw4qbbk8jy4j6a78w6v2llhqdwq46g44mbm9w2qsvbvb";
+  };
+
+  propagatedBuildInputs = [ libogg ];
+
+  nativeBuildInputs = [ pkg-config ];
+
+  meta = with lib; {
+    homepage = "https://xiph.org/oggz/";
+    description = "A C library and tools for manipulating with Ogg files and streams";
+    longDescription = ''
+      Oggz comprises liboggz and the tool oggz, which provides commands to
+      inspect, edit and validate Ogg files. The oggz-chop tool can also be used
+      to serve time ranges of Ogg media over HTTP by any web server that
+      supports CGI.
+
+      liboggz is a C library for reading and writing Ogg files and streams.  It
+      offers various improvements over the reference libogg, including support
+      for seeking, validation and timestamp interpretation. Ogg is an
+      interleaving data container developed by Monty at Xiph.Org, originally to
+      support the Ogg Vorbis audio format but now used for many free codecs
+      including Dirac, FLAC, Speex and Theora.'';
+    platforms = platforms.unix;
+    license = licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/liboil/default.nix b/nixpkgs/pkgs/development/libraries/liboil/default.nix
new file mode 100644
index 000000000000..4291b3668039
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liboil/default.nix
@@ -0,0 +1,33 @@
+{lib, stdenv, fetchurl, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "liboil";
+  version = "0.3.17";
+
+  src = fetchurl {
+    url = "${meta.homepage}/download/liboil-${version}.tar.gz";
+    sha256 = "0sgwic99hxlb1av8cm0albzh8myb7r3lpcwxfm606l0bkc3h4pqh";
+  };
+
+  patches = [ ./x86_64-cpuid.patch ];
+
+  outputs = [ "out" "dev" "devdoc" ];
+  outputBin = "dev"; # oil-bugreport
+
+  nativeBuildInputs = [ pkg-config ];
+
+  # fix "argb_paint_i386.c:53:Incorrect register `%rax' used with `l' suffix"
+  # errors
+  configureFlags = lib.optional (stdenv.isDarwin && stdenv.isx86_64) "--build=x86_64";
+
+  # fixes a cast in inline asm: easier than patching
+  buildFlags = lib.optional stdenv.isDarwin "CFLAGS=-fheinous-gnu-extensions";
+
+  meta = with lib; {
+    description = "A library of simple functions that are optimized for various CPUs";
+    homepage    = "https://liboil.freedesktop.org";
+    license     = licenses.bsd2;
+    maintainers = with maintainers; [ lovek323 ];
+    platforms   = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/liboil/x86_64-cpuid.patch b/nixpkgs/pkgs/development/libraries/liboil/x86_64-cpuid.patch
new file mode 100644
index 000000000000..d86dd79c3bcb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liboil/x86_64-cpuid.patch
@@ -0,0 +1,38 @@
+From 705916007fba0a845229a02dc6474cb523eff150 Mon Sep 17 00:00:00 2001
+From: David Schleef <ds@schleef.org>
+Date: Tue, 20 Jul 2010 21:05:26 +0000
+Subject: x86: Fix cpuid function on x86-64
+
+Fixes: #28956.
+---
+diff --git a/liboil/liboilcpu-x86.c b/liboil/liboilcpu-x86.c
+index e7a1978..ef4d3f2 100644
+--- a/liboil/liboilcpu-x86.c
++++ b/liboil/liboilcpu-x86.c
+@@ -162,13 +162,10 @@ get_cpuid (uint32_t op, uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d)
+ static void
+ get_cpuid (uint32_t op, uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d)
+ {
++  *a = op;
+   __asm__ (
+-      "  pushq %%rbx\n"
+       "  cpuid\n"
+-      "  mov %%ebx, %%esi\n"
+-      "  popq %%rbx\n"
+-      : "=a" (*a), "=S" (*b), "=c" (*c), "=d" (*d)
+-      : "0" (op));
++      : "+a" (*a), "=b" (*b), "=c" (*c), "=d" (*d));
+ }
+ #endif
+ 
+@@ -185,7 +182,7 @@ oil_cpu_detect_cpuid (void)
+ {
+   uint32_t eax, ebx, ecx, edx;
+   uint32_t level;
+-  char vendor[13] = { 0 };
++  char vendor[13+4] = { 0 };
+   int ret;
+ 
+   oil_fault_check_enable ();
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/nixpkgs/pkgs/development/libraries/libomxil-bellagio/default.nix b/nixpkgs/pkgs/development/libraries/libomxil-bellagio/default.nix
new file mode 100644
index 000000000000..4f129dc13781
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libomxil-bellagio/default.nix
@@ -0,0 +1,46 @@
+{ lib
+, stdenv
+, fetchurl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libomxil-bellagio";
+  version = "0.9.3";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/omxil/omxil/Bellagio%20${version}/${pname}-${version}.tar.gz";
+    sha256 = "0k6p6h4npn8p1qlgq6z3jbfld6n1bqswzvxzndki937gr0lhfg2r";
+  };
+
+  configureFlags =
+    lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "ac_cv_func_malloc_0_nonnull=yes" ];
+
+  patches = [
+    ./fedora-fixes.patch
+    ./fno-common.patch
+    # Fix stack overread: https://sourceforge.net/p/omxil/patches/8/
+    (fetchurl {
+      name = "no-overread.patch";
+      url = "https://sourceforge.net/p/omxil/patches/8/attachment/0001-src-base-omx_base_component.c-fix-stack-overread.patch";
+      hash = "sha256-ElpiDxU0Ii4Ou8ebVx4Ne9UnB6mesC8cRj77N7LdovA=";
+    })
+  ];
+
+  # Disable parallel build as it fails as:
+  #    ld: cannot find -lomxil-bellagio
+  enableParallelBuilding = false;
+
+  doCheck = false; # fails
+
+  env.NIX_CFLAGS_COMPILE =
+    # stringop-truncation: see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1028978
+    if stdenv.cc.isGNU then "-Wno-error=array-bounds -Wno-error=stringop-overflow=8 -Wno-error=stringop-truncation"
+    else "-Wno-error=absolute-value -Wno-error=enum-conversion -Wno-error=logical-not-parentheses -Wno-error=non-literal-null-conversion";
+
+  meta = with lib; {
+    homepage = "https://omxil.sourceforge.net/";
+    description = "An opensource implementation of the Khronos OpenMAX Integration Layer API to access multimedia components";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libomxil-bellagio/fedora-fixes.patch b/nixpkgs/pkgs/development/libraries/libomxil-bellagio/fedora-fixes.patch
new file mode 100644
index 000000000000..2ae3c3c871c5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libomxil-bellagio/fedora-fixes.patch
@@ -0,0 +1,199 @@
+When libomxdynamicloader.so is loaded, it complains that RM_Deinit can't be resolved.
+Link explicitly against omxil-bellagio so that ld.so can find the reference.
+
+Signed-off-by: Qais Yousef <qais.yousef@imgtec.com>
+
+--- bellagio-0.9.3/src/dynamic_loader/Makefile.am.old	2012-03-23 15:07:47.379021034 +0000
++++ bellagio-0.9.3/src/dynamic_loader/Makefile.am	2012-03-23 15:08:47.563034818 +0000
+@@ -3,7 +3,7 @@
+ omxdynamicloader_LTLIBRARIES = libomxdynamicloader.la
+ libomxdynamicloader_la_SOURCES = ste_dynamic_component_loader.c ste_dynamic_component_loader.h
+ 
+-libomxdynamicloader_la_LDFLAGS =
++libomxdynamicloader_la_LDFLAGS = -L$(abs_top_srcdir)/src/.libs -lomxil-bellagio
+ libomxdynamicloader_la_CFLAGS = -I$(top_srcdir)/include \
+ 			-I$(top_srcdir)/src \
+ 			-I$(top_srcdir)/src/base \
+Fix dependency issue to allow parallel build
+
+Signed-off-by: Qais Yousef <qais.yousef@imgtec.com>
+
+Index: bellagio-0.9.3/src/Makefile.am
+===================================================================
+--- bellagio-0.9.3.orig/src/Makefile.am
++++ bellagio-0.9.3/src/Makefile.am
+@@ -8,6 +8,7 @@ omxregister_bellagio_SOURCES = omxregist
+ omxregister_bellagio_CFLAGS = -DOMXILCOMPONENTSPATH=\"$(plugindir)/\" \
+ 			      -I$(top_srcdir)/include
+ omxregister_bellagio_LDFLAGS = -lomxil-bellagio -L$(builddir)
++omxregister_bellagio_DEPENDENCIES = libomxil-bellagio.la
+ 
+ lib_LTLIBRARIES = libomxil-bellagio.la
+ libomxil_bellagio_la_SOURCES = component_loader.h \
+We always access globalComponentList[] at indexComponent=-1 which causes a
+segfault. Use i as the index instead.
+
+Signed-off-by: Qais Yousef <qais.yousef@imgtec.com>
+
+--- bellagio-0.9.3/src/omx_reference_resource_manager.c.old	2012-03-13 10:15:25.743940980 +0000
++++ bellagio-0.9.3/src/omx_reference_resource_manager.c	2012-03-13 10:18:02.201971009 +0000
+@@ -485,7 +485,6 @@
+ OMX_ERRORTYPE RM_removeFromWaitForResource(OMX_COMPONENTTYPE *openmaxStandComp) {
+ 	omx_base_component_PrivateType* omx_base_component_Private;
+ 	int i = 0;
+-	int indexComponent = -1;
+ 
+ 	DEBUG(DEB_LEV_FUNCTION_NAME, "In %s\n", __func__);
+ 	omx_base_component_Private = (omx_base_component_PrivateType*)openmaxStandComp->pComponentPrivate;
+@@ -493,16 +492,13 @@
+ 	while(listOfcomponentRegistered[i].component_name != NULL ) {
+ 		if (!strcmp(listOfcomponentRegistered[i].component_name, omx_base_component_Private->name)) {
+ 			// found component in the list of the resource manager
+-			removeElemFromList(&globalComponentList[indexComponent], openmaxStandComp);
+-			break;
++			removeElemFromList(&globalComponentList[i], openmaxStandComp);
++			DEBUG(DEB_LEV_FUNCTION_NAME, "Out of %s\n", __func__);
++			return OMX_ErrorNone;
+ 		}
+ 		i++;
+ 	}
+-	if (indexComponent <0) {
+-		// No resource to be handled
+-		DEBUG(DEB_LEV_ERR, "In %s No resource to be handled\n", __func__);
+-		return OMX_ErrorNone;
+-	}
+-	DEBUG(DEB_LEV_FUNCTION_NAME, "Out of %s\n", __func__);
++	// No resource to be handled
++	DEBUG(DEB_LEV_ERR, "In %s No resource to be handled\n", __func__);
+ 	return OMX_ErrorNone;
+ }
+ OMX_INDEXTYPE/OMX_INDEXVENDORTYPE in one switch
+ src/base/omx_base_component.c |   54 ++++++++++++++++++++++-------------------
+ 1 files changed, 29 insertions(+), 25 deletions(-)
+--- a/src/base/omx_base_component.c	
++++ a/src/base/omx_base_component.c	
+@@ -915,14 +915,6 @@ OSCL_EXPORT_REF OSCL_EXPORT_REF OMX_ERRORTYPE omx_base_component_GetParameter(
+     return OMX_ErrorBadParameter;
+   }
+   switch(nParamIndex) {
+-  case OMX_IndexParameterThreadsID:
+-	    if ((err = checkHeader(ComponentParameterStructure, sizeof(OMX_PARAM_BELLAGIOTHREADS_ID))) != OMX_ErrorNone) {
+-	      break;
+-	    }
+-	  threadID = (OMX_PARAM_BELLAGIOTHREADS_ID *)ComponentParameterStructure;
+-	  threadID->nThreadBufferMngtID = omx_base_component_Private->bellagioThreads->nThreadBufferMngtID;
+-	  threadID->nThreadMessageID = omx_base_component_Private->bellagioThreads->nThreadMessageID;
+-	  break;
+   case OMX_IndexParamAudioInit:
+   case OMX_IndexParamVideoInit:
+   case OMX_IndexParamImageInit:
+@@ -988,28 +980,40 @@ OSCL_EXPORT_REF OSCL_EXPORT_REF OMX_ERRORTYPE omx_base_component_GetParameter(
+       }
+     }
+     break;
+-  case OMX_IndexVendorCompPropTunnelFlags:
+-    pPropTunnelSetup = (OMX_VENDOR_PROP_TUNNELSETUPTYPE*)ComponentParameterStructure;
++  default:
++    /* additional switch statement for extended OMX_INDEXTYPE */
++    switch((OMX_INDEXVENDORTYPE) nParamIndex) {
++    case OMX_IndexParameterThreadsID:
++        if ((err = checkHeader(ComponentParameterStructure, sizeof(OMX_PARAM_BELLAGIOTHREADS_ID))) != OMX_ErrorNone) {
++          break;
++        }
++      threadID = (OMX_PARAM_BELLAGIOTHREADS_ID *)ComponentParameterStructure;
++      threadID->nThreadBufferMngtID = omx_base_component_Private->bellagioThreads->nThreadBufferMngtID;
++      threadID->nThreadMessageID = omx_base_component_Private->bellagioThreads->nThreadMessageID;
++      break;
++    case OMX_IndexVendorCompPropTunnelFlags:
++      pPropTunnelSetup = (OMX_VENDOR_PROP_TUNNELSETUPTYPE*)ComponentParameterStructure;
+ 
+-    if (pPropTunnelSetup->nPortIndex >= (omx_base_component_Private->sPortTypesParam[OMX_PortDomainAudio].nPorts +
+-                                         omx_base_component_Private->sPortTypesParam[OMX_PortDomainVideo].nPorts +
+-                                         omx_base_component_Private->sPortTypesParam[OMX_PortDomainImage].nPorts +
+-                                         omx_base_component_Private->sPortTypesParam[OMX_PortDomainOther].nPorts)) {
++      if (pPropTunnelSetup->nPortIndex >= (omx_base_component_Private->sPortTypesParam[OMX_PortDomainAudio].nPorts +
++                                           omx_base_component_Private->sPortTypesParam[OMX_PortDomainVideo].nPorts +
++                                           omx_base_component_Private->sPortTypesParam[OMX_PortDomainImage].nPorts +
++                                           omx_base_component_Private->sPortTypesParam[OMX_PortDomainOther].nPorts)) {
+ 
+-      DEBUG(DEB_LEV_ERR,"In %s OMX_IndexVendorCompPropTunnelFlags nPortIndex=%d Line=%d \n",
+-          __func__,(int)pPropTunnelSetup->nPortIndex,__LINE__);
++        DEBUG(DEB_LEV_ERR,"In %s OMX_IndexVendorCompPropTunnelFlags nPortIndex=%d Line=%d \n",
++            __func__,(int)pPropTunnelSetup->nPortIndex,__LINE__);
+ 
+-      return OMX_ErrorBadPortIndex;
+-    }
++        return OMX_ErrorBadPortIndex;
++      }
+ 
+-    pPort = omx_base_component_Private->ports[pPropTunnelSetup->nPortIndex];
++      pPort = omx_base_component_Private->ports[pPropTunnelSetup->nPortIndex];
+ 
+-    pPropTunnelSetup->nTunnelSetup.nTunnelFlags  = pPort->nTunnelFlags;
+-    pPropTunnelSetup->nTunnelSetup.eSupplier     = pPort->eBufferSupplier;
+-    break;
+-  default:
+-    err = OMX_ErrorUnsupportedIndex;
+-    break;
++      pPropTunnelSetup->nTunnelSetup.nTunnelFlags  = pPort->nTunnelFlags;
++      pPropTunnelSetup->nTunnelSetup.eSupplier     = pPort->eBufferSupplier;
++      break;
++    default:
++      err = OMX_ErrorUnsupportedIndex;
++      break;
++    }
+   }
+   DEBUG(DEB_LEV_FUNCTION_NAME, "Out of %s for component %p\n", __func__, hComponent);
+   return err;
+diff -up libomxil-bellagio-0.9.3/Makefile.am.nodoc libomxil-bellagio-0.9.3/Makefile.am
+--- libomxil-bellagio-0.9.3/Makefile.am.nodoc	2011-01-12 08:53:26.000000000 +0100
++++ libomxil-bellagio-0.9.3/Makefile.am	2012-04-23 13:46:15.410823381 +0200
+@@ -7,7 +7,6 @@ EXTRA_DIST = libomxil-bellagio.spec
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = libomxil-bellagio.pc
+ 
+-docdir = $(DESTDIR)$(prefix)/share/doc/@PACKAGE@
+ doc_DATA = README \
+ 	   ChangeLog \
+ 	   TODO
+diff -up libomxil-bellagio-0.9.3/src/omxregister.c.unused libomxil-bellagio-0.9.3/src/omxregister.c
+--- libomxil-bellagio-0.9.3/src/omxregister.c.unused	2011-01-12 08:53:26.000000000 +0100
++++ libomxil-bellagio-0.9.3/src/omxregister.c	2012-12-10 22:02:28.621695659 +0100
+@@ -248,7 +248,15 @@ static int buildComponentsList(FILE* omx
+ 						}
+ 						fptr(stComponents);
+ 						err = fwrite(lib_absolute_path, 1, strlen(lib_absolute_path), omxregistryfp);
+-						err = fwrite("\n", 1, 1, omxregistryfp);
++						if (err != strlen(lib_absolute_path)) {
++							DEBUG(DEB_LEV_ERR, "Failed to write %zu bytes to fd %d\n", strlen(lib_absolute_path), fileno(omxregistryfp));
++							continue;
++						}
++						err = fwrite("\n", 1, strlen(buffer), omxregistryfp);
++						if (err != strlen(buffer)) {
++							DEBUG(DEB_LEV_ERR, "Failed to write %zu bytes to fd %d\n", strlen(buffer), fileno(omxregistryfp));
++							continue;
++						}
+ 
+ 
+ 						for (i = 0; i<num_of_comp; i++) {
+--- libomxil-bellagio-0.9.3/include/OMX_Types.h.orig 2011-01-12 08:53:26.000000000 +0100
++++ libomxil-bellagio-0.9.3/include/OMX_Types.h 2013-02-25 09:53:55.000000000 +0100
+@@ -314,6 +314,18 @@
+  *  platform & operating specific object used to reference the window */
+ typedef void* OMX_NATIVE_WINDOWTYPE;
+
++
++/** Define the OMX IL version that corresponds to this set of header files.
++ *  We also define a combined version that can be used to write or compare
++ *  values of the 32bit nVersion field, assuming a little endian architecture */
++#define OMX_VERSION_MAJOR 1
++#define OMX_VERSION_MINOR 1
++#define OMX_VERSION_REVISION 2
++#define OMX_VERSION_STEP 0
++
++#define OMX_VERSION ((OMX_VERSION_STEP<<24) | (OMX_VERSION_REVISION<<16) | (OMX_VERSION_MINOR<<8) | OMX_VERSION_MAJOR)
++
++
+ /** The OMX_VERSIONTYPE union is used to specify the version for
+     a structure or component.  For a component, the version is entirely
+     specified by the component vendor.  Components doing the same function
diff --git a/nixpkgs/pkgs/development/libraries/libomxil-bellagio/fno-common.patch b/nixpkgs/pkgs/development/libraries/libomxil-bellagio/fno-common.patch
new file mode 100644
index 000000000000..be70391adaae
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libomxil-bellagio/fno-common.patch
@@ -0,0 +1,32 @@
+Fix build faiure on gcc-10 (defaults to -fno-common).
+--- a/src/omx_reference_resource_manager.c
++++ b/src/omx_reference_resource_manager.c
+@@ -30,6 +30,11 @@
+ #include "base/omx_base_component.h"
+ #include "queue.h"
+ 
++int globalIndex;
++NameIndexType *listOfcomponentRegistered;
++ComponentListType **globalComponentList;
++ComponentListType **globalWaitingComponentList;
++
+ /**
+  * This is the static base pointer of the list
+  */
+--- a/src/omx_reference_resource_manager.h
++++ b/src/omx_reference_resource_manager.h
+@@ -49,10 +49,10 @@ struct NameIndexType {
+ };
+ 
+ 
+-int globalIndex;
+-NameIndexType *listOfcomponentRegistered;
+-ComponentListType **globalComponentList;
+-ComponentListType **globalWaitingComponentList;
++extern int globalIndex;
++extern NameIndexType *listOfcomponentRegistered;
++extern ComponentListType **globalComponentList;
++extern ComponentListType **globalWaitingComponentList;
+ 
+ OMX_ERRORTYPE RM_RegisterComponent(char *name, int max_components);
+ OMX_ERRORTYPE addElemToList(ComponentListType **list, OMX_COMPONENTTYPE *openmaxStandComp, int index, OMX_BOOL bIsWaiting);
diff --git a/nixpkgs/pkgs/development/libraries/liboop/default.nix b/nixpkgs/pkgs/development/libraries/liboop/default.nix
new file mode 100644
index 000000000000..7a5d38db0d36
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liboop/default.nix
@@ -0,0 +1,18 @@
+{lib, stdenv, fetchurl}:
+
+stdenv.mkDerivation {
+  pname = "liboop";
+  version = "1.0";
+
+  src = fetchurl {
+    url = "http://download.ofb.net/liboop/liboop.tar.gz";
+    sha256 = "34d83c6e0f09ee15cb2bc3131e219747c3b612bb57cf7d25318ab90da9a2d97c";
+  };
+
+  meta = {
+    description = "Event loop library";
+    homepage = "http://liboop.ofb.net/";
+    license = "LGPL";
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libopenaptx/default.nix b/nixpkgs/pkgs/development/libraries/libopenaptx/default.nix
new file mode 100644
index 000000000000..33a5cadb71dd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libopenaptx/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "libopenaptx";
+  version = "0.2.1";
+
+  src = fetchFromGitHub {
+    owner = "pali";
+    repo = "libopenaptx";
+    rev = version;
+    sha256 = "sha256-4FYKxw1U+efCfzKOPSDJH8a/dG0KV+anJDgxjqzD80k=";
+  };
+
+  makeFlags = [
+    "PREFIX=${placeholder "out"}"
+    # disable static builds
+    "ANAME="
+    "AOBJECTS="
+    "STATIC_UTILITIES="
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Audio Processing Technology codec (aptX)";
+    license = licenses.gpl3Plus;
+    homepage = "https://github.com/pali/libopenaptx";
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ orivej ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libopenglrecorder/default.nix b/nixpkgs/pkgs/development/libraries/libopenglrecorder/default.nix
new file mode 100644
index 000000000000..05616dd7c984
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libopenglrecorder/default.nix
@@ -0,0 +1,46 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, pkg-config
+, libjpeg
+, libvpx
+, openh264
+, withPulse ? stdenv.hostPlatform.isLinux
+, libpulseaudio
+, libvorbis
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libopenglrecorder";
+  version = "unstable-2020-08-13";
+
+  src = fetchFromGitHub {
+    owner = "Benau";
+    repo = "libopenglrecorder";
+    rev = "c1b81ce26e62fae1aaa086b5cd337cb12361ea3d";
+    sha256 = "13s2d7qs8z4w0gb3hx03n97xmwl07d4s473m4gw90qcvmz217kiz";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    libjpeg
+    libvpx
+    openh264
+  ] ++ lib.optionals withPulse [
+    libpulseaudio
+    libvorbis
+  ];
+
+  meta = with lib; {
+    description = "Library allowing Optional async readback OpenGL frame buffer with optional audio recording";
+    homepage = "https://github.com/Benau/libopenglrecorder";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ OPNA2608 ];
+    platforms = with platforms; windows ++ linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libopenshot-audio/0001-undef-fpret-on-aarch64-darwin.patch b/nixpkgs/pkgs/development/libraries/libopenshot-audio/0001-undef-fpret-on-aarch64-darwin.patch
new file mode 100644
index 000000000000..c391f77dda8b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libopenshot-audio/0001-undef-fpret-on-aarch64-darwin.patch
@@ -0,0 +1,13 @@
+diff --git a/JuceLibraryCode/modules/juce_core/native/juce_osx_ObjCHelpers.h b/JuceLibraryCode/modules/juce_core/native/juce_osx_ObjCHelpers.h
+index 2593790..0b5983d 100644
+--- a/JuceLibraryCode/modules/juce_core/native/juce_osx_ObjCHelpers.h
++++ b/JuceLibraryCode/modules/juce_core/native/juce_osx_ObjCHelpers.h
+@@ -209,7 +209,7 @@ static inline ReturnValue ObjCMsgSendSuper (struct objc_super* s, SEL sel, Param
+ typedef id (*MsgSendSuperFn) (struct objc_super*, SEL, ...);
+ static inline MsgSendSuperFn getMsgSendSuperFn() noexcept   { return (MsgSendSuperFn) (void*) objc_msgSendSuper; }
+ 
+-#if ! JUCE_IOS
++#if JUCE_INTEL && ! JUCE_IOS
+ typedef double (*MsgSendFPRetFn) (id, SEL op, ...);
+ static inline MsgSendFPRetFn getMsgSendFPRetFn() noexcept   { return (MsgSendFPRetFn) (void*) objc_msgSend_fpret; }
+ #endif
diff --git a/nixpkgs/pkgs/development/libraries/libopenshot-audio/default.nix b/nixpkgs/pkgs/development/libraries/libopenshot-audio/default.nix
new file mode 100644
index 000000000000..e546dc7a5786
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libopenshot-audio/default.nix
@@ -0,0 +1,77 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, alsa-lib
+, cmake
+, doxygen
+, libX11
+, libXcursor
+, libXext
+, libXft
+, libXinerama
+, libXrandr
+, pkg-config
+, zlib
+, Accelerate
+, AGL
+, Cocoa
+, Foundation
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libopenshot-audio";
+  version = "0.3.2";
+
+  src = fetchFromGitHub {
+    owner = "OpenShot";
+    repo = "libopenshot-audio";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-PLpB9sy9xehipN5S9okCHm1mPm5MaZMVaFqCBvFUiTw=";
+  };
+
+  patches = [
+    # https://forum.juce.com/t/juce-and-macos-11-arm/40285/24
+    ./0001-undef-fpret-on-aarch64-darwin.patch
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    doxygen
+    pkg-config
+  ];
+
+  buildInputs = lib.optionals stdenv.isLinux [
+    alsa-lib
+  ] ++ (if stdenv.isDarwin then [
+    Accelerate
+    AGL
+    Cocoa
+    Foundation
+    zlib
+  ] else [
+    libX11
+    libXcursor
+    libXext
+    libXft
+    libXinerama
+    libXrandr
+  ]);
+
+  strictDeps = true;
+
+  doCheck = true;
+
+  meta = {
+    homepage = "http://openshot.org/";
+    description = "High-quality sound editing library";
+    longDescription = ''
+      OpenShot Audio Library (libopenshot-audio) is a program that allows the
+      high-quality editing and playback of audio, and is based on the amazing
+      JUCE library.
+    '';
+    license = with lib.licenses; [ gpl3Plus ];
+    maintainers = with lib.maintainers; [ AndersonTorres ];
+    platforms = lib.platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libopenshot/0001-link-magickcore.diff b/nixpkgs/pkgs/development/libraries/libopenshot/0001-link-magickcore.diff
new file mode 100644
index 000000000000..e5055d3f3089
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libopenshot/0001-link-magickcore.diff
@@ -0,0 +1,12 @@
+diff -Naur source/src/CMakeLists.txt source-new/src/CMakeLists.txt
+--- source/src/CMakeLists.txt	1969-12-31 21:00:01.000000000 -0300
++++ source-new/src/CMakeLists.txt	2023-11-30 09:39:45.442332463 -0300
+@@ -231,7 +231,7 @@
+     target_compile_definitions(openshot PUBLIC USE_IMAGEMAGICK=1)
+ 
+     # Link with ImageMagick library
+-    target_link_libraries(openshot PUBLIC ImageMagick::Magick++)
++    target_link_libraries(openshot PUBLIC ImageMagick::Magick++ ImageMagick::MagickCore)
+ 
+     set(HAVE_IMAGEMAGICK TRUE CACHE BOOL "Building with ImageMagick support" FORCE)
+     mark_as_advanced(HAVE_IMAGEMAGICK)
diff --git a/nixpkgs/pkgs/development/libraries/libopenshot/default.nix b/nixpkgs/pkgs/development/libraries/libopenshot/default.nix
new file mode 100644
index 000000000000..4622dabb2983
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libopenshot/default.nix
@@ -0,0 +1,87 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, alsa-lib
+, cmake
+, cppzmq
+, doxygen
+, ffmpeg
+, imagemagick
+, jsoncpp
+, libopenshot-audio
+, llvmPackages
+, pkg-config
+, python3
+, qtbase
+, qtmultimedia
+, swig
+, zeromq
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libopenshot";
+  version = "0.3.2";
+
+  src = fetchFromGitHub {
+    owner = "OpenShot";
+    repo = "libopenshot";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-axFGNq+Kg8atlaSlG8EKvxj/FwLfpDR8/e4otmnyosM=";
+  };
+
+  patches = lib.optionals stdenv.isDarwin [
+    # Darwin requires both Magick++ and MagickCore for a successful linkage
+    ./0001-link-magickcore.diff
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    doxygen
+    pkg-config
+    swig
+  ];
+
+  buildInputs = [
+    cppzmq
+    ffmpeg
+    imagemagick
+    jsoncpp
+    libopenshot-audio
+    python3
+    qtbase
+    qtmultimedia
+    zeromq
+  ] ++ lib.optionals stdenv.isLinux [
+    alsa-lib
+  ] ++ lib.optionals stdenv.isDarwin [
+    llvmPackages.openmp
+  ];
+
+  strictDeps = true;
+
+  dontWrapQtApps = true;
+
+  doCheck = true;
+
+  cmakeFlags = [
+    (lib.cmakeBool "ENABLE_RUBY" false)
+    (lib.cmakeOptionType "filepath" "PYTHON_MODULE_PATH" python3.sitePackages)
+  ];
+
+  passthru = {
+    inherit libopenshot-audio;
+  };
+
+  meta = {
+    homepage = "http://openshot.org/";
+    description = "Free, open-source video editor library";
+    longDescription = ''
+      OpenShot Library (libopenshot) is an open-source project dedicated to
+      delivering high quality video editing, animation, and playback solutions
+      to the world. API currently supports C++, Python, and Ruby.
+    '';
+    license = with lib.licenses; [ gpl3Plus ];
+    maintainers = with lib.maintainers; [ AndersonTorres ];
+    platforms = lib.platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/liboping/default.nix b/nixpkgs/pkgs/development/libraries/liboping/default.nix
new file mode 100644
index 000000000000..118f283a0f9f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liboping/default.nix
@@ -0,0 +1,47 @@
+{ stdenv, fetchurl, fetchpatch, ncurses ? null, perl ? null, lib }:
+
+stdenv.mkDerivation rec {
+  pname = "liboping";
+  version = "1.10.0";
+
+  src = fetchurl {
+    url = "https://noping.cc/files/${pname}-${version}.tar.bz2";
+    sha256 = "1n2wkmvw6n80ybdwkjq8ka43z2x8mvxq49byv61b52iyz69slf7b";
+  };
+
+  patches = [
+    # Add support for ncurses-6.3. A backport of patch pending upstream
+    # inclusion: https://github.com/octo/liboping/pull/61
+    ./ncurses-6.3.patch
+
+    # Pull pending fix for format arguments mismatch:
+    #  https://github.com/octo/liboping/pull/60
+    (fetchpatch {
+      name = "format-args.patch";
+      url = "https://github.com/octo/liboping/commit/7a50e33f2a686564aa43e4920141e6f64e042df1.patch";
+      sha256 = "118fl3k84m3iqwfp49g5qil4lw1gcznzmyxnfna0h7za2nm50cxw";
+    })
+  ];
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString
+    stdenv.cc.isGNU "-Wno-error=format-truncation";
+
+  buildInputs = [ ncurses perl ];
+
+  configureFlags = lib.optional (perl == null) "--with-perl-bindings=no";
+
+  meta = with lib; {
+    description = "C library to generate ICMP echo requests (a.k.a. ping packets)";
+    longDescription = ''
+      liboping is a C library to generate ICMP echo requests, better known as
+      "ping packets". It is intended for use in network monitoring applications
+      or applications that would otherwise need to fork ping(1) frequently.
+      Included is a sample application, called oping, which demonstrates the
+      library's abilities.
+    '';
+    homepage = "http://noping.cc/";
+    license = licenses.lgpl21;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.bjornfor ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/liboping/ncurses-6.3.patch b/nixpkgs/pkgs/development/libraries/liboping/ncurses-6.3.patch
new file mode 100644
index 000000000000..14d2be07fe38
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liboping/ncurses-6.3.patch
@@ -0,0 +1,21 @@
+A backport of https://github.com/octo/liboping/pull/61
+--- a/src/oping.c
++++ b/src/oping.c
+@@ -1125,7 +1125,7 @@ static int update_graph_prettyping (ping_context_t *ctx, /* {{{ */
+ 			wattron (ctx->window, COLOR_PAIR(color));
+ 
+ 		if (has_utf8())
+-			mvwprintw (ctx->window, /* y = */ 3, /* x = */ x + 2, symbol);
++			mvwprintw (ctx->window, /* y = */ 3, /* x = */ x + 2, "%s", symbol);
+ 		else
+ 			mvwaddch (ctx->window, /* y = */ 3, /* x = */ x + 2, symbolc);
+ 
+@@ -1222,7 +1222,7 @@ static int update_graph_histogram (ping_context_t *ctx) /* {{{ */
+ 		if (counters[x] == 0)
+ 			mvwaddch (ctx->window, /* y = */ 3, /* x = */ x + 2, ' ');
+ 		else if (has_utf8 ())
+-			mvwprintw (ctx->window, /* y = */ 3, /* x = */ x + 2,
++			mvwprintw (ctx->window, /* y = */ 3, /* x = */ x + 2, "%s",
+ 					hist_symbols_utf8[index]);
+ 		else
+ 			mvwaddch (ctx->window, /* y = */ 3, /* x = */ x + 2,
diff --git a/nixpkgs/pkgs/development/libraries/libopus/default.nix b/nixpkgs/pkgs/development/libraries/libopus/default.nix
new file mode 100644
index 000000000000..b2b095f5607e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libopus/default.nix
@@ -0,0 +1,73 @@
+{ lib
+, stdenv
+, fetchpatch
+, fetchurl
+, meson
+, python3
+, ninja
+, fixedPoint ? false
+, withCustomModes ? true
+, withIntrinsics ? stdenv.hostPlatform.isAarch || stdenv.hostPlatform.isx86
+, withAsm ? false
+
+# tests
+, ffmpeg-headless
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libopus";
+  version = "1.4";
+
+  src = fetchurl {
+    url = "https://downloads.xiph.org/releases/opus/opus-${version}.tar.gz";
+    sha256 = "sha256-ybMrQlO+WuY9H/Fu6ga5S18PKVG3oCrO71jjo85JxR8=";
+  };
+
+  patches = [
+    ./fix-pkg-config-paths.patch
+    # Some tests time out easily on slower machines
+    ./test-timeout.patch
+    # Fix meson build for arm64. Remove with next release
+    # https://gitlab.xiph.org/xiph/opus/-/merge_requests/59
+    (fetchpatch {
+      url = "https://gitlab.xiph.org/xiph/opus/-/commit/20c032d27c59d65b19b8ffbb2608e5282fe817eb.patch";
+      hash = "sha256-2pX+0ay5PTyHL2plameBX2L1Q4aTx7V7RGiTdhNIuE4=";
+    })
+  ];
+
+  postPatch = ''
+    patchShebangs meson/
+  '';
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [
+    meson
+    python3
+    ninja
+  ];
+
+  mesonFlags = [
+    (lib.mesonBool "fixed-point" fixedPoint)
+    (lib.mesonBool "custom-modes" withCustomModes)
+    (lib.mesonEnable "intrinsics" withIntrinsics)
+    (lib.mesonEnable "rtcd" (withIntrinsics || withAsm))
+    (lib.mesonEnable "asm" withAsm)
+    (lib.mesonEnable "docs" false)
+  ];
+
+  doCheck = !stdenv.isi686 && !stdenv.isAarch32; # test_unit_LPC_inv_pred_gain fails
+
+  passthru.tests = {
+    inherit ffmpeg-headless;
+  };
+
+  meta = with lib; {
+    description = "Open, royalty-free, highly versatile audio codec";
+    homepage = "https://opus-codec.org/";
+    changelog = "https://gitlab.xiph.org/xiph/opus/-/releases/v${version}";
+    license = licenses.bsd3;
+    platforms = platforms.all;
+    maintainers = [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libopus/fix-pkg-config-paths.patch b/nixpkgs/pkgs/development/libraries/libopus/fix-pkg-config-paths.patch
new file mode 100644
index 000000000000..d54b7f5558c9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libopus/fix-pkg-config-paths.patch
@@ -0,0 +1,13 @@
+--- i/meson.build
++++ w/meson.build
+@@ -591,8 +591,8 @@ pkgconf = configuration_data()
+ 
+ pkgconf.set('prefix', join_paths(get_option('prefix')))
+ pkgconf.set('exec_prefix', '${prefix}')
+-pkgconf.set('libdir', '${prefix}/@0@'.format(get_option('libdir')))
+-pkgconf.set('includedir', '${prefix}/@0@'.format(get_option('includedir')))
++pkgconf.set('libdir', '${prefix}' / get_option('libdir'))
++pkgconf.set('includedir', '${prefix}' / get_option('includedir'))
+ pkgconf.set('VERSION', opus_version)
+ pkgconf.set('PC_BUILD', pc_build)
+ pkgconf.set('LIBM', libm.found() ? '-lm' : '')
diff --git a/nixpkgs/pkgs/development/libraries/libopus/test-timeout.patch b/nixpkgs/pkgs/development/libraries/libopus/test-timeout.patch
new file mode 100644
index 000000000000..e20f12cc1d54
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libopus/test-timeout.patch
@@ -0,0 +1,16 @@
+diff --git a/tests/meson.build b/tests/meson.build
+index 5f3ac9d..74b2de7 100644
+--- a/tests/meson.build
++++ b/tests/meson.build
+@@ -1,8 +1,8 @@
+ # Tests that link to libopus
+ opus_tests = [
+-  ['test_opus_api'],
+-  ['test_opus_decode', [], 60],
+-  ['test_opus_encode', 'opus_encode_regressions.c', 120],
++  ['test_opus_api', [], 60],
++  ['test_opus_decode', [], 120],
++  ['test_opus_encode', 'opus_encode_regressions.c', 240],
+   ['test_opus_padding'],
+   ['test_opus_projection'],
+ ]
diff --git a/nixpkgs/pkgs/development/libraries/libopusenc/default.nix b/nixpkgs/pkgs/development/libraries/libopusenc/default.nix
new file mode 100644
index 000000000000..bd749616cc47
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libopusenc/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl, pkg-config, libopus }:
+
+stdenv.mkDerivation rec {
+  pname = "libopusenc";
+  version = "0.2.1";
+
+  src = fetchurl {
+    url = "mirror://mozilla/opus/libopusenc-${version}.tar.gz";
+    sha256 = "1ffb0vhlymlsq70pxsjj0ksz77yfm2x0a1x8q50kxmnkm1hxp642";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  doCheck = true;
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libopus ];
+
+  meta = with lib; {
+    description = "Library for encoding .opus audio files and live streams";
+    license = licenses.bsd3;
+    homepage = "https://www.opus-codec.org/";
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ pmiddend ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/liboqs/default.nix b/nixpkgs/pkgs/development/libraries/liboqs/default.nix
new file mode 100644
index 000000000000..4962f9459d79
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liboqs/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, openssl
+, enableStatic ? stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+  pname = "liboqs";
+  version = "0.8.0";
+
+  src = fetchFromGitHub {
+    owner = "open-quantum-safe";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-h3mXoGRYgPg0wKQ1u6uFP7wlEUMQd5uIBt4Hr7vjNtA=";
+  };
+
+  patches = [ ./fix-openssl-detection.patch ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ openssl ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=${if enableStatic then "OFF" else "ON"}"
+    "-DOQS_DIST_BUILD=ON"
+    "-DOQS_BUILD_ONLY_LIB=ON"
+  ];
+
+  dontFixCmake = true; # fix CMake file will give an error
+
+  meta = with lib; {
+    description = "C library for prototyping and experimenting with quantum-resistant cryptography";
+    homepage = "https://openquantumsafe.org";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = [];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/liboqs/fix-openssl-detection.patch b/nixpkgs/pkgs/development/libraries/liboqs/fix-openssl-detection.patch
new file mode 100644
index 000000000000..33be7188370f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liboqs/fix-openssl-detection.patch
@@ -0,0 +1,36 @@
+From 6bdcf53de74ac2afba42deea63522939ca51f871 Mon Sep 17 00:00:00 2001
+From: Raphael Robatsch <raphael-git@tapesoftware.net>
+Date: Mon, 25 Dec 2023 16:15:29 +0000
+Subject: [PATCH] Do not forcibly set OPENSSL_ROOT_DIR.
+
+CMake can already find OpenSSL via pkg-config. Setting OPENSSL_ROOT_DIR
+forcibly to "/usr" breaks this.
+---
+ CMakeLists.txt | 11 -----------
+ 1 file changed, 11 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 288bcbe8..9750fae6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -119,17 +119,6 @@ include(.CMake/compiler_opts.cmake)
+ include(.CMake/alg_support.cmake)
+ 
+ if(${OQS_USE_OPENSSL})
+-    if(NOT DEFINED OPENSSL_ROOT_DIR)
+-        if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Darwin")
+-            if(EXISTS "/usr/local/opt/openssl@1.1")
+-                set(OPENSSL_ROOT_DIR "/usr/local/opt/openssl@1.1")
+-            elseif(EXISTS "/opt/homebrew/opt/openssl@1.1")
+-                set(OPENSSL_ROOT_DIR "/opt/homebrew/opt/openssl@1.1")
+-            endif()
+-        elseif(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux")
+-            set(OPENSSL_ROOT_DIR "/usr")
+-        endif()
+-    endif()
+     find_package(OpenSSL 1.1.1 REQUIRED)
+ endif()
+ 
+-- 
+2.42.0
+
diff --git a/nixpkgs/pkgs/development/libraries/libosinfo/default.nix b/nixpkgs/pkgs/development/libraries/libosinfo/default.nix
new file mode 100644
index 000000000000..498f26a7caf0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libosinfo/default.nix
@@ -0,0 +1,92 @@
+{ lib, stdenv
+, fetchurl
+, fetchpatch
+, pkg-config
+, meson
+, ninja
+, gettext
+, gobject-introspection
+, gtk-doc
+, docbook_xsl
+, glib
+, libsoup_3
+, libxml2
+, libxslt
+, check
+, curl
+, perl
+, hwdata
+, osinfo-db
+, substituteAll
+, vala ? null
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libosinfo";
+  version = "1.11.0";
+
+  src = fetchurl {
+    url = "https://releases.pagure.org/${pname}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-G/lu7J4UYPPRpxMWPMof8NSAo0kLUImSkvFFSLOpa2A=";
+  };
+
+  outputs = [ "out" "dev" ]
+    ++ lib.optional (stdenv.hostPlatform == stdenv.buildPlatform) "devdoc";
+
+  nativeBuildInputs = [
+    pkg-config
+    meson
+    ninja
+    vala
+    gettext
+    gobject-introspection
+    gtk-doc
+    docbook_xsl
+    perl # for pod2man
+  ];
+  buildInputs = [
+    glib
+    libsoup_3
+    libxml2
+    libxslt
+  ];
+  nativeCheckInputs = [
+    check
+    curl
+    perl
+  ];
+
+  patches = [
+    (substituteAll {
+      src = ./osinfo-db-data-dir.patch;
+      osinfo_db_data_dir = "${osinfo-db}/share";
+    })
+
+    # Fix build with libxml 2.12
+    (fetchpatch {
+      url = "https://gitlab.com/libosinfo/libosinfo/-/commit/5bbdd06503456784c5ffa22409e8bab50470d673.patch";
+      hash = "sha256-KqgHXI+lD5VYp2wtA58Drp15TgNK1O3xCaYBy4/B9wc=";
+    })
+  ];
+
+  mesonFlags = [
+    "-Dwith-usb-ids-path=${hwdata}/share/hwdata/usb.ids"
+    "-Dwith-pci-ids-path=${hwdata}/share/hwdata/pci.ids"
+    "-Denable-gtk-doc=true"
+  ];
+
+  preCheck = ''
+    patchShebangs ../osinfo/check-symfile.pl ../osinfo/check-symsorting.pl
+  '';
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "GObject based library API for managing information about operating systems, hypervisors and the (virtual) hardware devices they can support";
+    homepage = "https://libosinfo.org/";
+    changelog = "https://gitlab.com/libosinfo/libosinfo/-/blob/v${version}/NEWS";
+    license = licenses.lgpl2Plus;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.bjornfor ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libosinfo/osinfo-db-data-dir.patch b/nixpkgs/pkgs/development/libraries/libosinfo/osinfo-db-data-dir.patch
new file mode 100644
index 000000000000..2197eca23d9d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libosinfo/osinfo-db-data-dir.patch
@@ -0,0 +1,11 @@
+--- a/osinfo/osinfo_loader.c
++++ b/osinfo/osinfo_loader.c
+@@ -2304,7 +2304,7 @@
+     } else {
+         path = g_getenv("OSINFO_SYSTEM_DIR");
+         if (!path)
+-            path = DATA_DIR "/osinfo";
++            path = "@osinfo_db_data_dir@/osinfo";
+ 
+         file = g_file_new_for_path(path);
+     }
diff --git a/nixpkgs/pkgs/development/libraries/libosmium/default.nix b/nixpkgs/pkgs/development/libraries/libosmium/default.nix
new file mode 100644
index 000000000000..63aab4c0bfb1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libosmium/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchFromGitHub, cmake, protozero, expat, zlib, bzip2, boost, lz4 }:
+
+stdenv.mkDerivation rec {
+  pname = "libosmium";
+  version = "2.20.0";
+
+  src = fetchFromGitHub {
+    owner = "osmcode";
+    repo = "libosmium";
+    rev = "v${version}";
+    sha256 = "sha256-QM6Nj2cmrhUysR2enFKhTWXdBXNqM21/Yqdn/zXEfYE=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ protozero zlib bzip2 expat boost lz4 ];
+
+  cmakeFlags = [ "-DINSTALL_GDALCPP:BOOL=ON" ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Fast and flexible C++ library for working with OpenStreetMap data";
+    homepage = "https://osmcode.org/libosmium/";
+    license = licenses.boost;
+    changelog = [
+      "https://github.com/osmcode/libosmium/releases/tag/v${version}"
+      "https://github.com/osmcode/libosmium/blob/v${version}/CHANGELOG.md"
+    ];
+    maintainers = with maintainers; [ das-g ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libosmscout/default.nix b/nixpkgs/pkgs/development/libraries/libosmscout/default.nix
new file mode 100644
index 000000000000..c33b8881a03a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libosmscout/default.nix
@@ -0,0 +1,37 @@
+{ lib, mkDerivation, fetchFromGitHub, fetchpatch, cmake, pkg-config
+, marisa, qttools, qtlocation }:
+
+mkDerivation rec {
+  pname = "libosmscout";
+  version = "2022.04.25";
+
+  src = fetchFromGitHub {
+    owner = "Framstag";
+    repo = "libosmscout";
+    rev = "4c3b28472864b8e9cdda80a05ec73ef22cb39323";
+    sha256 = "sha256-Qe5TkF4BwlsEI7emC0gdc7SmS4QrSGLiO0QdjuJA09g=";
+  };
+
+  patches = [
+    # Fix build with libxml v2.12
+    # FIXME: Remove at next package update
+    (fetchpatch {
+      name = "libxml-2.12-fix.patch";
+      url = "https://github.com/Framstag/libosmscout/commit/db7b307de1a1146a6868015a0adfc2e21b7d5e39.patch";
+      hash = "sha256-5NDamzb2K18sMVfREnUNksgD2NL7ELzLl83SlGIveO0=";
+    })
+  ];
+
+  cmakeFlags = [ "-DOSMSCOUT_BUILD_TESTS=OFF" ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ marisa qttools qtlocation ];
+
+  meta = with lib; {
+    description = "Simple, high-level interfaces for offline location and POI lokup, rendering and routing functionalities based on OpenStreetMap (OSM) data";
+    homepage = "https://libosmscout.sourceforge.net/";
+    license = licenses.lgpl3Plus;
+    maintainers = [ maintainers.Thra11 ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libossp-uuid/default.nix b/nixpkgs/pkgs/development/libraries/libossp-uuid/default.nix
new file mode 100644
index 000000000000..a283df1bbaea
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libossp-uuid/default.nix
@@ -0,0 +1,46 @@
+{lib, stdenv, fetchurl}:
+
+stdenv.mkDerivation rec {
+  pname = "libossp-uuid";
+  version = "1.6.2";
+
+  src = fetchurl {
+    url = "ftp://ftp.ossp.org/pkg/lib/uuid/uuid-${version}.tar.gz";
+    sha256= "11a615225baa5f8bb686824423f50e4427acd3f70d394765bdff32801f0fd5b0";
+  };
+
+  configureFlags = [
+    "ac_cv_va_copy=yes"
+  ] ++ lib.optional stdenv.isFreeBSD "--with-pic";
+
+  patches = [ ./shtool.patch ];
+
+  meta = with lib; {
+    homepage = "http://www.ossp.org/pkg/lib/uuid/";
+    description = "OSSP uuid ISO-C and C++ shared library";
+    longDescription =
+      ''
+        OSSP uuid is a ISO-C:1999 application programming interface
+        (API) and corresponding command line interface (CLI) for the
+        generation of DCE 1.1, ISO/IEC 11578:1996 and RFC 4122
+        compliant Universally Unique Identifier (UUID). It supports
+        DCE 1.1 variant UUIDs of version 1 (time and node based),
+        version 3 (name based, MD5), version 4 (random number based)
+        and version 5 (name based, SHA-1). Additional API bindings are
+        provided for the languages ISO-C++:1998, Perl:5 and
+        PHP:4/5. Optional backward compatibility exists for the ISO-C
+        DCE-1.1 and Perl Data::UUID APIs.
+
+        UUIDs are 128 bit numbers which are intended to have a high
+        likelihood of uniqueness over space and time and are
+        computationally difficult to guess. They are globally unique
+        identifiers which can be locally generated without contacting
+        a global registration authority. UUIDs are intended as unique
+        identifiers for both mass tagging objects with an extremely
+        short lifetime and to reliably identifying very persistent
+        objects across a network.
+      '';
+    license = licenses.bsd2;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libossp-uuid/shtool.patch b/nixpkgs/pkgs/development/libraries/libossp-uuid/shtool.patch
new file mode 100644
index 000000000000..f0c7cc485f50
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libossp-uuid/shtool.patch
@@ -0,0 +1,11 @@
+--- a/shtool	2008-07-05 05:43:08.000000000 +0800
++++ b/shtool	2018-07-25 15:45:40.559587471 +0800
+@@ -1400,7 +1400,7 @@
+             if [ ".$opt_t" = .yes ]; then
+                 echo "strip $dsttmp" 1>&2
+             fi
+-            strip $dsttmp || shtool_exit $?
++            $STRIP $dsttmp || shtool_exit $?
+         fi
+         if [ ".$opt_o" != . ]; then
+             if [ ".$opt_t" = .yes ]; then
diff --git a/nixpkgs/pkgs/development/libraries/libotr/default.nix b/nixpkgs/pkgs/development/libraries/libotr/default.nix
new file mode 100644
index 000000000000..672d298f1446
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libotr/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl, pkgsHostTarget, libgcrypt, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "libotr";
+  version = "4.1.1";
+
+  src = fetchurl {
+    url = "https://otr.cypherpunks.ca/libotr-${version}.tar.gz";
+    sha256 = "1x8rliydhbibmzwdbyr7pd7n87m2jmxnqkpvaalnf4154hj1hfwb";
+  };
+
+  patches = [ ./fix-regtest-client.patch ];
+
+  outputs = [ "bin" "out" "dev" ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkgsHostTarget.libgcrypt.dev # for libgcrypt-config
+  ];
+  propagatedBuildInputs = [ libgcrypt ];
+
+  meta = with lib; {
+    homepage = "http://www.cypherpunks.ca/otr/";
+    license = licenses.lgpl21;
+    description = "Library for Off-The-Record Messaging";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libotr/fix-regtest-client.patch b/nixpkgs/pkgs/development/libraries/libotr/fix-regtest-client.patch
new file mode 100644
index 000000000000..bfd0007b9616
--- /dev/null
+++ b/nixpkgs/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/nixpkgs/pkgs/development/libraries/libow/default.nix b/nixpkgs/pkgs/development/libraries/libow/default.nix
new file mode 100644
index 000000000000..5340caeff0a8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libow/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, fetchFromGitHub, autoconf, automake, pkg-config, libtool }:
+
+stdenv.mkDerivation rec {
+  version = "3.2p4";
+  pname = "libow";
+
+  src = fetchFromGitHub {
+    owner = "owfs";
+    repo = "owfs";
+    rev = "v${version}";
+    sha256 = "0dln1ar7bxwhpi36sccmpwapy7iz4j097rbf02mgn42lw5vrcg3s";
+  };
+
+  nativeBuildInputs = [ autoconf automake libtool pkg-config ];
+
+  preConfigure = ''
+    # Tries to use glibtoolize on Darwin, but it shouldn't for Nix.
+    sed -i -e 's/glibtoolize/libtoolize/g' bootstrap
+    ./bootstrap
+  '';
+
+  configureFlags = [
+    "--disable-owtcl"
+    "--disable-owphp"
+    "--disable-owpython"
+    "--disable-zero"
+    "--disable-owshell"
+    "--disable-owhttpd"
+    "--disable-owftpd"
+    "--disable-owserver"
+    "--disable-owperl"
+    "--disable-owtap"
+    "--disable-owmon"
+    "--disable-owexternal"
+  ];
+
+  meta = with lib; {
+    description = "1-Wire File System full library";
+    homepage = "https://owfs.org/";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ disserman ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libowfat/default.nix b/nixpkgs/pkgs/development/libraries/libowfat/default.nix
new file mode 100644
index 000000000000..a04050458edf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libowfat/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libowfat";
+  version = "0.33";
+
+  src = fetchurl {
+    url = "https://www.fefe.de/libowfat/${pname}-${version}.tar.xz";
+    sha256 = "sha256-MR7Is/S3K7RC4yP7ATqY+Vb6dFVH8ryUVih7INAnzX0=";
+  };
+
+  # Fix for glibc 2.34 from Gentoo
+  # https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=914a4aa87415dabfe77181a2365766417a5919a4
+  postPatch = ''
+    # do not define "__pure__", this the gcc builtin (bug #806505)
+    sed 's#__pure__;#__attribute__((__pure__));#' -i fmt.h scan.h byte.h stralloc.h str.h critbit.h || die
+    sed 's#__pure__$#__attrib__pure__#' -i  fmt.h scan.h byte.h stralloc.h str.h critbit.h || die
+    # remove unneeded definition of __deprecated__
+    sed '/^#define __deprecated__$/d' -i scan/scan_iso8601.c scan/scan_httpdate.c || die
+  '';
+  preBuild = ''
+    make headers
+  '';
+
+  makeFlags = [ "prefix=$(out)" ];
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "A GPL reimplementation of libdjb";
+    homepage = "https://www.fefe.de/libowfat/";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libowlevelzs/default.nix b/nixpkgs/pkgs/development/libraries/libowlevelzs/default.nix
new file mode 100644
index 000000000000..46c05e6960a0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libowlevelzs/default.nix
@@ -0,0 +1,27 @@
+{ cmake
+, fetchFromGitHub
+, lib
+, stdenv
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libowlevelzs";
+  version = "0.1.1";
+
+  src = fetchFromGitHub {
+    owner = "fogti";
+    repo = "libowlevelzs";
+    rev = "v${version}";
+    sha256 = "y/EaMMsmJEmnptfjwiat4FC2+iIKlndC2Wdpop3t7vY=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "Zscheile Lowlevel (utility) library";
+    homepage = "https://github.com/fogti/libowlevelzs";
+    license = licenses.mit;
+    maintainers = [ maintainers.fogti ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libp11/default.nix b/nixpkgs/pkgs/development/libraries/libp11/default.nix
new file mode 100644
index 000000000000..69eb2fb63394
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libp11/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, libtool, pkg-config
+, openssl }:
+
+stdenv.mkDerivation rec {
+  pname = "libp11";
+  version = "0.4.12";
+
+  src = fetchFromGitHub {
+    owner = "OpenSC";
+    repo = "libp11";
+    rev = "${pname}-${version}";
+    sha256 = "sha256-Xqjl12xT30ZXWYzPWNN3jWY9pxojhd7Kq0OC7rABt4M=";
+  };
+
+  configureFlags = [
+    "--with-enginesdir=${placeholder "out"}/lib/engines"
+  ];
+
+  nativeBuildInputs = [ autoreconfHook pkg-config libtool ];
+
+  buildInputs = [ openssl ];
+
+  enableParallelBuilding = true;
+
+  passthru = { inherit openssl; };
+
+  meta = with lib; {
+    description = "Small layer on top of PKCS#11 API to make PKCS#11 implementations easier";
+    homepage = "https://github.com/OpenSC/libp11";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libpam-wrapper/default.nix b/nixpkgs/pkgs/development/libraries/libpam-wrapper/default.nix
new file mode 100644
index 000000000000..0701ae0fc55f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpam-wrapper/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv
+, fetchgit
+, cmake
+, linux-pam
+, enablePython ? false
+, python ? null
+}:
+
+assert enablePython -> python != null;
+
+stdenv.mkDerivation rec {
+  pname = "libpam-wrapper";
+  version = "1.1.3";
+
+  src = fetchgit {
+    url = "git://git.samba.org/pam_wrapper.git";
+    rev = "pam_wrapper-${version}";
+    sha256 = "00mqhsashx7njrvxz085d0b88nizhdy7m3x17ip5yhvwsl63km6p";
+  };
+
+  nativeBuildInputs = [ cmake ] ++ lib.optionals enablePython [ python ];
+
+  # We must use linux-pam, using openpam will result in broken fprintd.
+  buildInputs = [ linux-pam ];
+
+  meta = with lib; {
+    description = "Wrapper for testing PAM modules";
+    homepage = "https://cwrap.org/pam_wrapper.html";
+    license = licenses.gpl3Plus;
+    maintainers = [ ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libpanel/default.nix b/nixpkgs/pkgs/development/libraries/libpanel/default.nix
new file mode 100644
index 000000000000..a4f8e71eba2e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpanel/default.nix
@@ -0,0 +1,65 @@
+{ stdenv
+, lib
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, gobject-introspection
+, vala
+, gi-docgen
+, glib
+, gtk4
+, libadwaita
+, gnome
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libpanel";
+  version = "1.4.1";
+
+  outputs = [ "out" "dev" "devdoc" ];
+  outputBin = "dev";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/libpanel/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "mEENAOc0hX7N8zuaIN17D7ONi20x1Dabr8HGc5Krud4=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gobject-introspection
+    vala
+    gi-docgen
+  ];
+
+  buildInputs = [
+    glib
+    gtk4
+    libadwaita
+  ];
+
+  mesonFlags = [
+    "-Dinstall-examples=true"
+  ];
+
+  postFixup = ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+    };
+  };
+
+  meta = with lib; {
+    description = "Dock/panel library for GTK 4";
+    homepage = "https://gitlab.gnome.org/GNOME/libpanel";
+    license = licenses.lgpl3Plus;
+    maintainers = teams.gnome.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libpaper/default.nix b/nixpkgs/pkgs/development/libraries/libpaper/default.nix
new file mode 100644
index 000000000000..b9372ba1d407
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpaper/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchurl, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  version = "1.1.28";
+  pname = "libpaper";
+
+  src = fetchurl {
+    url = "mirror://debian/pool/main/libp/libpaper/libpaper_${version}.tar.gz";
+    sha256 = "sha256-yLuUbsk9PCxyu7HXJX6QFyoipEoHoH+2uAKluyyV/dw=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  # The configure script of libpaper is buggy: it uses AC_SUBST on a headerfile
+  # to compile sysconfdir into the library. Autoconf however defines sysconfdir
+  # as "${prefix}/etc", which is not expanded by AC_SUBST so libpaper will look
+  # for config files in (literally, without expansion) '${prefix}/etc'. Manually
+  # setting sysconfdir fixes this issue.
+  preConfigure = ''
+    configureFlagsArray+=(
+      "--sysconfdir=$out/etc"
+    )
+  '';
+
+  # Set the default paper to letter (this is what libpaper uses as default as well,
+  # if you call getdefaultpapername()).
+  # The user can still override this with the PAPERCONF environment variable.
+  postInstall = ''
+    mkdir -p $out/etc
+    echo letter > $out/etc/papersize
+  '';
+
+  meta = {
+    description = "Library for handling paper characteristics";
+    homepage = "http://packages.debian.org/unstable/source/libpaper";
+    license = lib.licenses.gpl2;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libpar2/default.nix b/nixpkgs/pkgs/development/libraries/libpar2/default.nix
new file mode 100644
index 000000000000..772f3ff719d5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpar2/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchurl, pkg-config, libsigcxx }:
+
+stdenv.mkDerivation rec {
+  pname = "libpar2";
+  version = "0.4";
+
+  src = fetchurl {
+    url = "https://launchpad.net/libpar2/trunk/${version}/+download/${pname}-${version}.tar.gz";
+    sha256 = "1m4ncws1h03zq7zyqbaymvjzzbh1d3lc4wb1aksrdf0ync76yv9i";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libsigcxx ];
+
+  patches = [ ./libpar2-0.4-external-verification.patch ];
+
+  CXXFLAGS = lib.optionalString stdenv.cc.isClang "-std=c++11";
+
+  meta = {
+    homepage = "https://parchive.sourceforge.net/";
+    license = lib.licenses.gpl2Plus;
+    description = "A library for using Parchives (parity archive volume sets)";
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libpar2/libpar2-0.4-external-verification.patch b/nixpkgs/pkgs/development/libraries/libpar2/libpar2-0.4-external-verification.patch
new file mode 100644
index 000000000000..74879c4fe9b8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpar2/libpar2-0.4-external-verification.patch
@@ -0,0 +1,16 @@
+diff -aud -U 5 libpar2-0.4-original/par2repairer.h libpar2-0.4-patched/par2repairer.h
+--- libpar2-0.4-original/par2repairer.h	2013-07-18 15:03:10.000000000 +0200
++++ libpar2-0.4-patched/par2repairer.h	2014-08-06 15:52:59.000000000 +0200
+@@ -94,11 +94,11 @@
+   // Perform a sliding window scan of the DiskFile looking for blocks of data that 
+   // might belong to any of the source files (for which a verification packet was
+   // available). If a block of data might be from more than one source file, prefer
+   // the one specified by the "sourcefile" parameter. If the first data block
+   // found is for a different source file then "sourcefile" is changed accordingly.
+-  bool ScanDataFile(DiskFile                *diskfile,   // [in]     The file being scanned
++  virtual bool ScanDataFile(DiskFile                *diskfile,   // [in]     The file being scanned
+                     Par2RepairerSourceFile* &sourcefile, // [in/out] The source file matched
+                     MatchType               &matchtype,  // [out]    The type of match
+                     MD5Hash                 &hashfull,   // [out]    The full hash of the file
+                     MD5Hash                 &hash16k,    // [out]    The hash of the first 16k
+                     u32                     &count);     // [out]    The number of blocks found
diff --git a/nixpkgs/pkgs/development/libraries/libpcap/default.nix b/nixpkgs/pkgs/development/libraries/libpcap/default.nix
new file mode 100644
index 000000000000..d1ea44b6ac2f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpcap/default.nix
@@ -0,0 +1,70 @@
+{ lib
+, stdenv
+, fetchurl
+, flex
+, bison
+, bluez
+, libnl
+, libxcrypt
+, pkg-config
+, withBluez ? false
+, withRemote ? false
+
+# for passthru.tests
+, ettercap
+, nmap
+, ostinato
+, tcpreplay
+, vde2
+, wireshark
+, python3
+, haskellPackages
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libpcap";
+  version = "1.10.4";
+
+  src = fetchurl {
+    url = "https://www.tcpdump.org/release/${pname}-${version}.tar.gz";
+    hash = "sha256-7RmgOD+tcuOtQ1/SOdfNgNZJFrhyaVUBWdIORxYOvl8=";
+  };
+
+  buildInputs = lib.optionals stdenv.isLinux [ libnl ]
+    ++ lib.optionals withRemote [ libxcrypt ];
+
+  nativeBuildInputs = [ flex bison ]
+    ++ lib.optionals stdenv.isLinux [ pkg-config ]
+    ++ lib.optionals withBluez [ bluez.dev ];
+
+  # We need to force the autodetection because detection doesn't
+  # work in pure build environments.
+  configureFlags = [
+    "--with-pcap=${if stdenv.isLinux then "linux" else "bpf"}"
+  ] ++ lib.optionals stdenv.isDarwin [
+    "--disable-universal"
+  ] ++ lib.optionals withRemote [
+    "--enable-remote"
+  ] ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform)
+    [ "ac_cv_linux_vers=2" ];
+
+  postInstall = ''
+    if [ "$dontDisableStatic" -ne "1" ]; then
+      rm -f $out/lib/libpcap.a
+    fi
+  '';
+
+  passthru.tests = {
+    inherit ettercap nmap ostinato tcpreplay vde2 wireshark;
+    inherit (python3.pkgs) pcapy-ng scapy;
+    haskell-pcap = haskellPackages.pcap;
+  };
+
+  meta = with lib; {
+    homepage = "https://www.tcpdump.org";
+    description = "Packet Capture Library";
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ fpletz ];
+    license = licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libpeas/2.x.nix b/nixpkgs/pkgs/development/libraries/libpeas/2.x.nix
new file mode 100644
index 000000000000..38e4fe055085
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpeas/2.x.nix
@@ -0,0 +1,97 @@
+{ stdenv
+, lib
+, fetchurl
+, substituteAll
+, pkg-config
+, gi-docgen
+, gobject-introspection
+, meson
+, ninja
+, gjs
+, glib
+, lua5_1
+, python3
+, spidermonkey_115
+, gnome
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libpeas";
+  version = "2.0.1";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    hash = "sha256-ndwdUfOGY9pN9SFjBRt7LOo6JCz67p9afhQPB4TIqnc=";
+  };
+
+  patches = [
+    # Make PyGObject’s gi library available.
+    (substituteAll {
+      src = ./fix-paths.patch;
+      pythonPaths = lib.concatMapStringsSep ", " (pkg: "'${pkg}/${python3.sitePackages}'") [
+        python3.pkgs.pygobject3
+      ];
+    })
+  ];
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    gi-docgen
+    gobject-introspection
+    meson
+    ninja
+    pkg-config
+  ];
+
+  buildInputs = [
+    gjs
+    glib
+    lua5_1
+    lua5_1.pkgs.lgi
+    python3
+    python3.pkgs.pygobject3
+    spidermonkey_115
+  ];
+
+  propagatedBuildInputs = [
+    # Required by libpeas-2.pc
+    gobject-introspection
+  ];
+
+  mesonFlags = [
+    "-Dgtk_doc=true"
+  ];
+
+  postPatch = ''
+    # Checks lua51 and lua5.1 executable but we have non of them.
+    substituteInPlace meson.build --replace \
+      "find_program('lua51', required: false)" \
+      "find_program('lua', required: false)"
+  '';
+
+  postFixup = ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      attrPath = "libpeas2";
+      packageName = "libpeas";
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    description = "A GObject-based plugins engine";
+    homepage = "https://wiki.gnome.org/Projects/Libpeas";
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+    maintainers = teams.gnome.members;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libpeas/default.nix b/nixpkgs/pkgs/development/libraries/libpeas/default.nix
new file mode 100644
index 000000000000..f0b6023117d9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpeas/default.nix
@@ -0,0 +1,91 @@
+{ stdenv
+, lib
+, fetchurl
+, substituteAll
+, meson
+, ninja
+, pkg-config
+, gettext
+, gi-docgen
+, gnome
+, glib
+, gtk3
+, gobject-introspection
+, python3
+, ncurses
+, wrapGAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libpeas";
+  version = "1.36.0";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "KXy5wszNjoYXYj0aPoQVtFMLjlqJPjUnu/0e3RMje0w=";
+  };
+
+  patches = [
+    # Make PyGObject’s gi library available.
+    (substituteAll {
+      src = ./fix-paths.patch;
+      pythonPaths = lib.concatMapStringsSep ", " (pkg: "'${pkg}/${python3.sitePackages}'") [
+        python3.pkgs.pygobject3
+      ];
+    })
+  ];
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+    meson
+    ninja
+    gettext
+    gi-docgen
+    gobject-introspection
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    glib
+    gtk3
+    ncurses
+    python3
+    python3.pkgs.pygobject3
+  ];
+
+  propagatedBuildInputs = [
+    # Required by libpeas-1.0.pc
+    gobject-introspection
+  ];
+
+  mesonFlags = [
+    "-Dgtk_doc=true"
+  ];
+
+  postFixup = ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+      freeze = true;
+    };
+  };
+
+  meta = with lib; {
+    description = "A GObject-based plugins engine";
+    homepage = "https://wiki.gnome.org/Projects/Libpeas";
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+    maintainers = teams.gnome.members;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libpeas/fix-paths.patch b/nixpkgs/pkgs/development/libraries/libpeas/fix-paths.patch
new file mode 100644
index 000000000000..c54cdd8873f5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpeas/fix-paths.patch
@@ -0,0 +1,14 @@
+diff --git a/loaders/python/peas-plugin-loader-python.c b/loaders/python/peas-plugin-loader-python.c
+index 26edbf3..0d65ada 100644
+--- a/loaders/python/peas-plugin-loader-python.c
++++ b/loaders/python/peas-plugin-loader-python.c
+@@ -248,6 +248,9 @@ peas_plugin_loader_python_initialize (PeasPluginLoader *loader)
+       goto python_init_error;
+     }
+ 
++  /* Add PyGObject to path */
++  PyRun_SimpleString("import site; import functools; functools.reduce(lambda k, p: site.addsitedir(p, k), [@pythonPaths@], site._init_pathinfo())");
++
+   /* Initialize PyGObject */
+   pygobject_init (PYGOBJECT_MAJOR_VERSION,
+                   PYGOBJECT_MINOR_VERSION,
diff --git a/nixpkgs/pkgs/development/libraries/libpfm/default.nix b/nixpkgs/pkgs/development/libraries/libpfm/default.nix
new file mode 100644
index 000000000000..0598fd6451ef
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpfm/default.nix
@@ -0,0 +1,52 @@
+{ lib
+, stdenv
+, fetchurl
+, enableShared ? !stdenv.hostPlatform.isStatic
+, windows
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  version = "4.13.0";
+  pname = "libpfm";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/perfmon2/libpfm4/libpfm-${finalAttrs.version}.tar.gz";
+    sha256 = "sha256-0YuXdkx1VSjBBR03bjNUXQ62DG6/hWgENoE/pbBMw9E=";
+  };
+
+  # Don't install libpfm.so on windows as it doesn't exist
+  # This target is created only if `ifeq ($(SYS),Linux)` passes
+  patches = [ ./fix-windows.patch ];
+
+  # Upstream uses "WINDOWS" instead of "Windows" which is incorrect
+  # See: https://github.com/NixOS/nixpkgs/pull/252982#discussion_r1314346216
+  postPatch = ''
+    substituteInPlace config.mk examples/Makefile \
+      --replace '($(SYS),WINDOWS)' '($(SYS),Windows)'
+  '';
+
+  makeFlags = [
+    "PREFIX=${placeholder "out"}"
+    "LDCONFIG=true"
+    "ARCH=${stdenv.hostPlatform.uname.processor}"
+    "SYS=${stdenv.hostPlatform.uname.system}"
+  ];
+
+  env.NIX_CFLAGS_COMPILE = "-Wno-error";
+  env.CONFIG_PFMLIB_SHARED = if enableShared then "y" else "n";
+
+  buildInputs = lib.optional stdenv.hostPlatform.isWindows windows.libgnurx;
+
+  meta = with lib; {
+    description = "Helper library to program the performance monitoring events";
+    longDescription = ''
+      This package provides a library, called libpfm4 which is used to
+      develop monitoring tools exploiting the performance monitoring
+      events such as those provided by the Performance Monitoring Unit
+      (PMU) of modern processors.
+    '';
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ pierron t4ccer ];
+    platforms = platforms.linux ++ platforms.windows;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libpfm/fix-windows.patch b/nixpkgs/pkgs/development/libraries/libpfm/fix-windows.patch
new file mode 100644
index 000000000000..584b9ba6eb81
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpfm/fix-windows.patch
@@ -0,0 +1,18 @@
+diff --git a/lib/Makefile b/lib/Makefile
+index 5ca71e3..cd0717f 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -428,11 +428,13 @@ install:
+ 	-mkdir -p $(DESTDIR)$(LIBDIR)
+ 	$(INSTALL) -m 644 $(ALIBPFM) $(DESTDIR)$(LIBDIR)
+ ifeq ($(CONFIG_PFMLIB_SHARED),y)
++ifeq ($(SYS),Linux)
+ 	$(INSTALL) $(SLIBPFM) $(DESTDIR)$(LIBDIR)
+ 	cd $(DESTDIR)$(LIBDIR); $(LN) $(SLIBPFM) $(VLIBPFM)
+ 	cd $(DESTDIR)$(LIBDIR); $(LN) $(SLIBPFM) libpfm.$(SOLIBEXT)
+ 	-$(LDCONFIG)
+ endif
++endif
+ 
+ tags:
+ 	$(CTAGS) -o $(TOPDIR)/tags --tag-relative=yes $(SRCS) $(INCDEP)
diff --git a/nixpkgs/pkgs/development/libraries/libpg_query/default.nix b/nixpkgs/pkgs/development/libraries/libpg_query/default.nix
new file mode 100644
index 000000000000..ad7043e064e3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpg_query/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchFromGitHub, which, squawk }:
+
+stdenv.mkDerivation rec {
+  pname = "libpg_query";
+  version = "16-5.1.0";
+
+  src = fetchFromGitHub {
+    owner = "pganalyze";
+    repo = "libpg_query";
+    rev = version;
+    hash = "sha256-X48wjKdgkAc4wUubQ5ip1zZYiCKzQJyQTgGvO/pOY3I=";
+  };
+
+  nativeBuildInputs = [ which ];
+
+  makeFlags = [ "build" "build_shared" ];
+
+  installPhase = ''
+    install -Dm644 -t $out/lib libpg_query.a
+    install -Dm644 -t $out/include pg_query.h
+    install -Dm644 -t $out/lib libpg_query${stdenv.hostPlatform.extensions.sharedLibrary}
+  '';
+
+  doCheck = true;
+  checkTarget = "test";
+
+  passthru.tests = {
+    inherit squawk;
+  };
+
+  meta = with lib; {
+    homepage = "https://github.com/pganalyze/libpg_query";
+    description = "C library for accessing the PostgreSQL parser outside of the server environment";
+    changelog = "https://github.com/pganalyze/libpg_query/blob/${version}/CHANGELOG.md";
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.marsam ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libpgf/default.nix b/nixpkgs/pkgs/development/libraries/libpgf/default.nix
new file mode 100644
index 000000000000..c0d24cb3cdf5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpgf/default.nix
@@ -0,0 +1,33 @@
+{ lib
+, stdenv
+, fetchzip
+, autoreconfHook
+, dos2unix
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libpgf";
+  version = "7.21.7";
+
+  src = fetchzip {
+    url = "mirror://sourceforge/${pname}/${pname}/${version}/${pname}.zip";
+    hash = "sha256-TAWIuikijfyeTRetZWoMMdB/FeGAR7ZjNssVxUevlVg=";
+  };
+
+  postPatch = ''
+    find . -type f | xargs dos2unix
+    mv README.txt README
+  '';
+
+  nativeBuildInputs = [
+    autoreconfHook
+    dos2unix
+  ];
+
+  meta = {
+    homepage = "https://www.libpgf.org/";
+    description = "Progressive Graphics Format";
+    license = lib.licenses.lgpl21Plus;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libphonenumber/build-reproducibility.patch b/nixpkgs/pkgs/development/libraries/libphonenumber/build-reproducibility.patch
new file mode 100644
index 000000000000..137c9045c77d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libphonenumber/build-reproducibility.patch
@@ -0,0 +1,28 @@
+--- a/tools/cpp/src/cpp-build/generate_geocoding_data.cc.orig	1970-01-01 01:00:01.000000000 +0100
++++ b/tools/cpp/src/cpp-build/generate_geocoding_data.cc	2024-01-16 19:03:45.409089423 +0100
+@@ -94,7 +94,8 @@
+   DirEntryKinds kind_;
+ };
+ 
+-// Lists directory entries in path. "." and ".." are excluded. Returns true on
++// Lists directory entries in path. "." and ".." are excluded. Entries are
++// returned in a consistent order to ensure reproducibility. Returns true on
+ // success.
+ bool ListDirectory(const string& path, vector<DirEntry>* entries) {
+   entries->clear();
+@@ -114,8 +115,14 @@
+     // http://pubs.opengroup.org/onlinepubs/9699919799/functions/readdir.html
+     errno = 0;
+     entry = readdir(dir);
++    if (errno != 0) {
++      return false;
++    }
+     if (entry == NULL) {
+-      return errno == 0;
++      std::sort(
++          entries->begin(), entries->end(),
++          [](const DirEntry& a, const DirEntry& b) { return a.name() < b.name(); });
++      return true;
+     }
+     if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) {
+        continue;
diff --git a/nixpkgs/pkgs/development/libraries/libphonenumber/default.nix b/nixpkgs/pkgs/development/libraries/libphonenumber/default.nix
new file mode 100644
index 000000000000..edd337961727
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libphonenumber/default.nix
@@ -0,0 +1,47 @@
+{ lib, stdenv, fetchFromGitHub, cmake, gtest, boost, pkg-config, protobuf, icu, Foundation, buildPackages }:
+
+stdenv.mkDerivation rec {
+  pname = "libphonenumber";
+  version = "8.12.37";
+
+  src = fetchFromGitHub {
+    owner = "googlei18n";
+    repo = "libphonenumber";
+    rev = "v${version}";
+    sha256 = "sha256-xLxadSxVY3DjFDQrqj3BuOvdMaKdFSLjocfzovJCBB0=";
+  };
+
+  patches = [
+    # An earlier version of this patch was submitted upstream but did not get
+    # any interest there - https://github.com/google/libphonenumber/pull/2921
+    ./build-reproducibility.patch
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    boost
+    protobuf
+    icu
+    gtest
+  ] ++ lib.optional stdenv.isDarwin Foundation;
+
+  cmakeDir = "../cpp";
+  cmakeFlags =
+    lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+      "-DBUILD_GEOCODER=OFF"
+      "-DPROTOC_BIN=${buildPackages.protobuf}/bin/protoc"
+    ];
+
+  checkPhase = "./libphonenumber_test";
+
+  meta = with lib; {
+    description = "Google's i18n library for parsing and using phone numbers";
+    homepage = "https://github.com/google/libphonenumber";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ illegalprime ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libpinyin/default.nix b/nixpkgs/pkgs/development/libraries/libpinyin/default.nix
new file mode 100644
index 000000000000..2ae333d61ad8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpinyin/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchFromGitHub
+, autoreconfHook
+, glib
+, db
+, pkg-config
+}:
+
+let
+  modelData = fetchurl {
+    url = "mirror://sourceforge/libpinyin/models/model19.text.tar.gz";
+    sha256 = "02zml6m8sj5q97ibpvaj9s9yz3gfj0jnjrfhkn02qv4nwm72lhjn";
+  };
+in
+stdenv.mkDerivation rec {
+  pname = "libpinyin";
+  version = "2.8.1";
+
+  src = fetchFromGitHub {
+    owner = "libpinyin";
+    repo = "libpinyin";
+    rev = version;
+    hash = "sha256-3+CBbjCaY0Ubyphf0uCfYvF2rtc9fF1eEAM1doonjHg=";
+  };
+
+  postUnpack = ''
+    tar -xzf ${modelData} -C $sourceRoot/data
+  '';
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ];
+
+  buildInputs = [
+    glib
+    db
+  ];
+
+  meta = with lib; {
+    description = "Library for intelligent sentence-based Chinese pinyin input method";
+    homepage = "https://github.com/libpinyin/libpinyin";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ linsui ericsagnes ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libpipeline/default.nix b/nixpkgs/pkgs/development/libraries/libpipeline/default.nix
new file mode 100644
index 000000000000..3630980353a5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpipeline/default.nix
@@ -0,0 +1,20 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libpipeline";
+  version = "1.5.7";
+
+  src = fetchurl {
+    url = "mirror://savannah/libpipeline/libpipeline-${version}.tar.gz";
+    sha256 = "sha256-uLRRlJiQIqeewTF/ZKKnWxVRsqVb6gb2dwTLKi5GkLA=";
+  };
+
+  patches = lib.optionals stdenv.isDarwin [ ./fix-on-osx.patch ];
+
+  meta = with lib; {
+    homepage = "http://libpipeline.nongnu.org";
+    description = "C library for manipulating pipelines of subprocesses in a flexible and convenient way";
+    platforms = platforms.unix;
+    license = licenses.gpl3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libpipeline/fix-on-osx.patch b/nixpkgs/pkgs/development/libraries/libpipeline/fix-on-osx.patch
new file mode 100644
index 000000000000..c539e2dde970
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpipeline/fix-on-osx.patch
@@ -0,0 +1,13 @@
+diff --git a/lib/pipeline.c b/lib/pipeline.c
+index 26478f9..1612307 100644
+--- a/lib/pipeline.c
++++ b/lib/pipeline.c
+@@ -75,6 +75,8 @@
+ #   endif
+ #endif
+ 
++const char* program_name = "libpipeline";
++
+ #if defined(HAVE_SETENV) && !defined(HAVE_CLEARENV)
+ int clearenv (void)
+ {
diff --git a/nixpkgs/pkgs/development/libraries/libplacebo/default.nix b/nixpkgs/pkgs/development/libraries/libplacebo/default.nix
new file mode 100644
index 000000000000..558acc4bbbeb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libplacebo/default.nix
@@ -0,0 +1,82 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, meson
+, ninja
+, pkg-config
+, python3Packages
+, vulkan-headers
+, vulkan-loader
+, shaderc
+, lcms2
+, libGL
+, libX11
+, libunwind
+, libdovi
+, xxHash
+, fast-float
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libplacebo";
+  version = "6.338.2";
+
+  src = fetchFromGitLab {
+    domain = "code.videolan.org";
+    owner = "videolan";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-gE6yKnFvsOFh8bFYc7b+bS+zmdDU7jucr0HwhdDeFzU=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    vulkan-headers
+    python3Packages.jinja2
+    python3Packages.glad2
+  ];
+
+  buildInputs = [
+    vulkan-loader
+    shaderc
+    lcms2
+    libGL
+    libX11
+    libunwind
+    libdovi
+    xxHash
+  ] ++ lib.optionals (!stdenv.cc.isGNU) [
+    fast-float
+  ];
+
+  mesonFlags = with lib; [
+    (mesonOption "vulkan-registry" "${vulkan-headers}/share/vulkan/registry/vk.xml")
+    (mesonBool "demos" false) # Don't build and install the demo programs
+    (mesonEnable "d3d11" false) # Disable the Direct3D 11 based renderer
+    (mesonEnable "glslang" false) # rely on shaderc for GLSL compilation instead
+  ] ++ optionals stdenv.isDarwin [
+    (mesonEnable "unwind" false) # libplacebo doesn’t build with `darwin.libunwind`
+  ];
+
+  postPatch = ''
+    substituteInPlace meson.build \
+      --replace 'python_env.append' '#'
+  '';
+
+  meta = with lib; {
+    description = "Reusable library for GPU-accelerated video/image rendering primitives";
+    longDescription = ''
+      Reusable library for GPU-accelerated image/view processing primitives and
+      shaders, as well a batteries-included, extensible, high-quality rendering
+      pipeline (similar to mpv's vo_gpu). Supports Vulkan, OpenGL and Metal (via
+      MoltenVK).
+    '';
+    homepage = "https://code.videolan.org/videolan/libplacebo";
+    changelog = "https://code.videolan.org/videolan/libplacebo/-/tags/v${version}";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ primeos tadeokondrak ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libplctag/default.nix b/nixpkgs/pkgs/development/libraries/libplctag/default.nix
new file mode 100644
index 000000000000..de71d021d015
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libplctag/default.nix
@@ -0,0 +1,27 @@
+{ lib
+, stdenv
+, cmake
+, fetchFromGitHub
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libplctag";
+  version = "2.5.5";
+
+  src = fetchFromGitHub {
+    owner = "libplctag";
+    repo = "libplctag";
+    rev = "v${version}";
+    sha256 = "sha256-eWtQaYUWZNQYQOUXnbUfjrtpoO6CnNJ8WjlowA49sG0=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    homepage = "https://github.com/libplctag/libplctag";
+    description = "Library that uses EtherNet/IP or Modbus TCP to read and write tags in PLCs";
+    license = with licenses; [ lgpl2Plus mpl20 ];
+    maintainers = with maintainers; [ petterstorvik ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libplist/default.nix b/nixpkgs/pkgs/development/libraries/libplist/default.nix
new file mode 100644
index 000000000000..afd28996265c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libplist/default.nix
@@ -0,0 +1,58 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+
+, enablePython ? false
+, python3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libplist";
+  version = "2.3.0";
+
+  outputs = [ "bin" "dev" "out" ] ++ lib.optional enablePython "py";
+
+  src = fetchFromGitHub {
+    owner = "libimobiledevice";
+    repo = pname;
+    rev = version;
+    hash = "sha256-fZfDSWVRg73dN+WF6LbgRSj8vtyeKeyjC8pWXFxUmBg=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ];
+
+  buildInputs = lib.optionals enablePython [
+    python3
+    python3.pkgs.cython
+  ];
+
+  preAutoreconf = ''
+    export RELEASE_VERSION=${version}
+  '';
+
+  configureFlags = [
+    "--enable-debug"
+  ] ++ lib.optionals (!enablePython) [
+    "--without-cython"
+  ];
+
+  doCheck = true;
+
+  postFixup = lib.optionalString enablePython ''
+    moveToOutput "lib/${python3.libPrefix}" "$py"
+  '';
+
+  meta = with lib; {
+    description = "A library to handle Apple Property List format in binary or XML";
+    homepage = "https://github.com/libimobiledevice/libplist";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ infinisil ];
+    platforms = platforms.unix;
+    mainProgram = "plistutil";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libpng/12.nix b/nixpkgs/pkgs/development/libraries/libpng/12.nix
new file mode 100644
index 000000000000..e94bd026a7a6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpng/12.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchurl, zlib
+, testers
+}:
+
+assert stdenv.hostPlatform == stdenv.buildPlatform -> zlib != null;
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libpng";
+  version = "1.2.59";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libpng/libpng-${finalAttrs.version}.tar.xz";
+    sha256 = "1izw9ybm27llk8531w6h4jp4rk2rxy2s9vil16nwik5dp0amyqxl";
+  };
+
+  outputs = [ "out" "dev" "man" ];
+
+  propagatedBuildInputs = [ zlib ];
+
+  configureFlags = [ "--enable-static" ];
+
+  postInstall = ''mv "$out/bin" "$dev/bin"'';
+
+  passthru = {
+    inherit zlib;
+
+    tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+  };
+
+  meta = with lib; {
+    description = "The official reference implementation for the PNG file format";
+    homepage = "http://www.libpng.org/pub/png/libpng.html";
+    license = licenses.libpng;
+    maintainers = [ ];
+    branch = "1.2";
+    pkgConfigModules = [ "libpng" "libpng12" ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libpng/default.nix b/nixpkgs/pkgs/development/libraries/libpng/default.nix
new file mode 100644
index 000000000000..e1d412b5006e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpng/default.nix
@@ -0,0 +1,47 @@
+{ lib, stdenv, fetchurl, zlib, apngSupport ? true
+, testers
+}:
+
+assert zlib != null;
+
+let
+  patchVersion = "1.6.40";
+  patch_src = fetchurl {
+    url = "mirror://sourceforge/libpng-apng/libpng-${patchVersion}-apng.patch.gz";
+    hash = "sha256-CjykZIKTjY1sciZivtLH7gxlobViRESzztIa2NNW2y8=";
+  };
+  whenPatched = lib.optionalString apngSupport;
+
+in stdenv.mkDerivation (finalAttrs: {
+  pname = "libpng" + whenPatched "-apng";
+  version = "1.6.40";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libpng/libpng-${finalAttrs.version}.tar.xz";
+    hash = "sha256-U1tHmyRn/yMaPsbZKlJZBvuO8nl4vk9m2+BdPzoBs6E=";
+  };
+  postPatch = whenPatched "gunzip < ${patch_src} | patch -Np1";
+
+  outputs = [ "out" "dev" "man" ];
+  outputBin = "dev";
+
+  propagatedBuildInputs = [ zlib ];
+
+  doCheck = true;
+
+  passthru = {
+    inherit zlib;
+
+    tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+  };
+
+  meta = with lib; {
+    description = "The official reference implementation for the PNG file format" + whenPatched " with animation patch";
+    homepage = "http://www.libpng.org/pub/png/libpng.html";
+    changelog = "https://github.com/glennrp/libpng/blob/v1.6.40/CHANGES";
+    license = licenses.libpng2;
+    pkgConfigModules = [ "libpng" "libpng16" ];
+    platforms = platforms.all;
+    maintainers = with maintainers; [ vcunat ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libpointmatcher/default.nix b/nixpkgs/pkgs/development/libraries/libpointmatcher/default.nix
new file mode 100644
index 000000000000..01c3e3e87e43
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpointmatcher/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, cmake, eigen, boost, libnabo }:
+
+stdenv.mkDerivation rec {
+  pname = "libpointmatcher";
+  version = "1.3.1";
+
+  src = fetchFromGitHub {
+    owner = "ethz-asl";
+    repo = pname;
+    rev = version;
+    sha256 = "0lai6sr3a9dj1j4pgjjyp7mx10wixy5wpvbka8nsc2danj6xhdyd";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ eigen boost libnabo ];
+
+  cmakeFlags = [
+    "-DEIGEN_INCLUDE_DIR=${eigen}/include/eigen3"
+  ];
+
+  doCheck = true;
+  checkPhase = ''
+    ./utest/utest --path ../examples/data/
+  '';
+
+  meta = with lib; {
+    inherit (src.meta) homepage;
+    description = "An \"Iterative Closest Point\" library for 2-D/3-D mapping in robotic";
+    license = licenses.bsd3;
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ cryptix ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libportal/default.nix b/nixpkgs/pkgs/development/libraries/libportal/default.nix
new file mode 100644
index 000000000000..b5c06c609f30
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libportal/default.nix
@@ -0,0 +1,82 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, meson
+, ninja
+, pkg-config
+, gobject-introspection
+, vala
+, gi-docgen
+, glib
+, gtk3
+, gtk4
+, libsForQt5
+, variant ? null
+}:
+
+assert variant == null || variant == "gtk3" || variant == "gtk4" || variant == "qt5";
+
+stdenv.mkDerivation rec {
+  pname = "libportal" + lib.optionalString (variant != null) "-${variant}";
+  version = "0.7.1";
+
+  outputs = [ "out" "dev" ]
+    ++ lib.optional (variant != "qt5") "devdoc";
+
+  src = fetchFromGitHub {
+    owner = "flatpak";
+    repo = "libportal";
+    rev = version;
+    sha256 = "sha256-3roZJHnGFM7ClxbB7I/haexPTwYskidz9F+WV3RL9Ho=";
+  };
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gi-docgen
+  ] ++ lib.optionals (variant != "qt5") [
+    gobject-introspection
+    vala
+  ];
+
+  propagatedBuildInputs = [
+    glib
+  ] ++ lib.optionals (variant == "gtk3") [
+    gtk3
+  ] ++ lib.optionals (variant == "gtk4") [
+    gtk4
+  ] ++ lib.optionals (variant == "qt5") [
+    libsForQt5.qtbase
+    libsForQt5.qtx11extras
+  ];
+
+  mesonFlags = [
+    (lib.mesonEnable "backend-gtk3" (variant == "gtk3"))
+    (lib.mesonEnable "backend-gtk4" (variant == "gtk4"))
+    (lib.mesonEnable "backend-qt5" (variant == "qt5"))
+    (lib.mesonBool "vapi" (variant != "qt5"))
+    (lib.mesonBool "introspection" (variant != "qt5"))
+    (lib.mesonBool "docs" (variant != "qt5")) # requires introspection=true
+  ];
+
+  postFixup = ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  # we don't have any binaries
+  dontWrapQtApps = true;
+
+  meta = with lib; {
+    description = "Flatpak portal library";
+    homepage = "https://github.com/flatpak/libportal";
+    license = licenses.lgpl3Plus;
+    maintainers = with maintainers; [ jtojnar ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libpostal/0001-test-adding-header-to-fix-warning.patch b/nixpkgs/pkgs/development/libraries/libpostal/0001-test-adding-header-to-fix-warning.patch
new file mode 100644
index 000000000000..cddd20d29e95
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpostal/0001-test-adding-header-to-fix-warning.patch
@@ -0,0 +1,24 @@
+From bfdb6b8f87cc1cae9ba47870ff23deae0bb8ba51 Mon Sep 17 00:00:00 2001
+From: Al <albarrentine@gmail.com>
+Date: Sun, 17 Dec 2017 20:17:01 -0500
+Subject: [PATCH] [test] adding header to fix warning
+
+---
+ test/test_expand.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/test_expand.c b/test/test_expand.c
+index 59ed9af7..2b211728 100644
+--- a/test/test_expand.c
++++ b/test/test_expand.c
+@@ -4,6 +4,7 @@
+ #include <stdarg.h>
+ 
+ #include "greatest.h"
++#include "../src/string_utils.h"
+ #include "../src/libpostal.h"
+ 
+ SUITE(libpostal_expansion_tests);
+-- 
+2.42.0
+
diff --git a/nixpkgs/pkgs/development/libraries/libpostal/default.nix b/nixpkgs/pkgs/development/libraries/libpostal/default.nix
new file mode 100644
index 000000000000..fbeb60022a1d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpostal/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "libpostal";
+  version = "1.1";
+
+  src = fetchFromGitHub {
+    owner = "openvenues";
+    repo = "libpostal";
+    rev = "v${version}";
+    sha256 = "sha256-gQTD2LQibaB2TK0SbzoILAljAGExURvDcF3C/TfDXqk=";
+  };
+
+  patches = [
+    # Fix darwin compilation with XCode 12 https://github.com/openvenues/libpostal/issues/511
+    (fetchpatch {
+      name = "Fix-C-compilation-macOS.patch";
+      url = "https://github.com/openvenues/libpostal/commit/9fcf066e38121b5c1439fc6bdc9a7e02234c8622.patch";
+      hash = "sha256-VpboGK+5sc1XrxMB051KWc8vP7Eu2g7zmTirzSaerns=";
+    })
+    # https://github.com/openvenues/libpostal/commit/bfdb6b8f87cc1cae9ba47870ff23deae0bb8ba51.patch
+    # with extra hunk removed so it applies
+    ./0001-test-adding-header-to-fix-warning.patch
+  ];
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  configureFlags = [
+    "--disable-data-download"
+  ] ++ lib.optionals stdenv.hostPlatform.isAarch64 [ "--disable-sse2" ];
+
+  meta = with lib; {
+    description = "A C library for parsing/normalizing street addresses around the world. Powered by statistical NLP and open geo data";
+    homepage = "https://github.com/openvenues/libpostal";
+    license = licenses.mit;
+    maintainers = [ maintainers.Thra11 ];
+    mainProgram = "libpostal_data";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libpqxx/6.nix b/nixpkgs/pkgs/development/libraries/libpqxx/6.nix
new file mode 100644
index 000000000000..1c2a98fcb3c9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpqxx/6.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, postgresql, doxygen, xmlto, python3, gnused }:
+
+stdenv.mkDerivation rec {
+  pname = "libpqxx";
+  version = "6.4.8";
+
+  src = fetchFromGitHub {
+    owner = "jtv";
+    repo = pname;
+    rev = version;
+    hash = "sha256-ybnW9ip1QVadmbYLP+gvo49k9ExHfnsOhSnI6NjsAQk=";
+  };
+
+  nativeBuildInputs = [ gnused python3 ];
+  buildInputs = [ postgresql doxygen xmlto ];
+
+  preConfigure = ''
+    patchShebangs .
+  '';
+
+  configureFlags = [ "--enable-shared" ];
+
+  meta = {
+    description = "A C++ library to access PostgreSQL databases";
+    homepage = "https://pqxx.org/development/libpqxx/";
+    license = lib.licenses.bsd3;
+    platforms = lib.platforms.unix;
+    maintainers = [ lib.maintainers.eelco ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libpqxx/default.nix b/nixpkgs/pkgs/development/libraries/libpqxx/default.nix
new file mode 100644
index 000000000000..acb0013035cb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpqxx/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchFromGitHub, postgresql, python3 }:
+
+stdenv.mkDerivation rec {
+  pname = "libpqxx";
+  version = "7.7.5";
+
+  src = fetchFromGitHub {
+    owner = "jtv";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-mvGPMbk4b8NmPvzy5hS+Au69NtDGha8ONTEQf6I3VZE=";
+  };
+
+  nativeBuildInputs = [ python3 ];
+  buildInputs = [ postgresql ];
+
+  preConfigure = ''
+    patchShebangs ./tools/splitconfig
+  '';
+
+  configureFlags = [ "--enable-shared --disable-documentation" ];
+  CXXFLAGS = [ "-std=c++17" ];
+
+  meta = {
+    description = "A C++ library to access PostgreSQL databases";
+    homepage = "https://pqxx.org/development/libpqxx/";
+    license = lib.licenses.bsd3;
+    platforms = lib.platforms.unix;
+    maintainers = [ lib.maintainers.eelco ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libproxy/default.nix b/nixpkgs/pkgs/development/libraries/libproxy/default.nix
new file mode 100644
index 000000000000..5c7a31625023
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libproxy/default.nix
@@ -0,0 +1,82 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, pkg-config
+, cmake
+, zlib
+, dbus
+, networkmanager
+, enableJavaScript ? stdenv.isDarwin || lib.meta.availableOn stdenv.hostPlatform duktape
+, duktape
+, pcre
+, gsettings-desktop-schemas
+, glib
+, makeWrapper
+, python3
+, SystemConfiguration
+, CoreFoundation
+, JavaScriptCore
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libproxy";
+  version = "0.4.18";
+
+  src = fetchFromGitHub {
+    owner = "libproxy";
+    repo = "libproxy";
+    rev = version;
+    hash = "sha256-pqj1LwRdOK2CUu3hYIsogQIXxWzShDuKEbDTbtWkgnQ=";
+  };
+
+  patches = lib.optionals stdenv.isDarwin [
+    # https://github.com/libproxy/libproxy/pull/189
+    (fetchpatch {
+      url = "https://github.com/libproxy/libproxy/commit/4331b9db427ce2c25ff5eeb597bec4bc35ed1a0b.patch";
+      sha256 = "sha256-uTh3rYVvEke1iWVHsT3Zj2H1F+gyLrffcmyt0JEKaCA=";
+    })
+  ];
+
+  outputs = [ "out" "dev" "py3" ];
+
+  nativeBuildInputs = [
+    pkg-config
+    cmake
+    makeWrapper
+  ];
+
+  buildInputs = [
+    pcre
+    python3
+    zlib
+  ] ++ lib.optionals enableJavaScript [
+    (if stdenv.hostPlatform.isDarwin then JavaScriptCore else duktape)
+  ] ++ (if stdenv.hostPlatform.isDarwin then [
+    SystemConfiguration
+    CoreFoundation
+  ] else [
+    glib
+    dbus
+    networkmanager
+  ]);
+
+  cmakeFlags = [
+    "-DWITH_PYTHON2=OFF"
+    "-DPYTHON3_SITEPKG_DIR=${placeholder "py3"}/${python3.sitePackages}"
+  ] ++ lib.optional (enableJavaScript && !stdenv.hostPlatform.isDarwin) "-DWITH_MOZJS=ON";
+
+  postFixup = lib.optionalString stdenv.isLinux ''
+    # config_gnome3 uses the helper to find GNOME proxy settings
+    wrapProgram $out/libexec/pxgsettings --prefix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}"
+  '';
+
+  doCheck = false; # fails 1 out of 10 tests
+
+  meta = with lib; {
+    platforms = platforms.linux ++ platforms.darwin;
+    license = licenses.lgpl21;
+    homepage = "https://libproxy.github.io/libproxy/";
+    description = "A library that provides automatic proxy configuration management";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libpseudo/default.nix b/nixpkgs/pkgs/development/libraries/libpseudo/default.nix
new file mode 100644
index 000000000000..58931a816188
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpseudo/default.nix
@@ -0,0 +1,29 @@
+{lib, stdenv, fetchurl, pkg-config, glib, ncurses}:
+stdenv.mkDerivation rec {
+  pname = "libpseudo";
+  version = "1.2.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libpseudo/libpseudo-${version}.tar.gz";
+    sha256 = "0d3pw0m3frycr3x5kzqcaj4r2qh43iv6b0fpd6l4yk0aa4a9560n";
+  };
+
+  patchPhase = ''
+    sed -i -e s@/usr/local@$out@ -e /ldconfig/d Makefile
+  '';
+
+  preInstall = ''
+    mkdir -p $out/include
+    mkdir -p $out/lib
+  '';
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ glib ncurses ];
+
+  meta = with lib; {
+    homepage = "http://libpseudo.sourceforge.net/";
+    description = "Simple, thread-safe messaging between threads";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libpsl/default.nix b/nixpkgs/pkgs/development/libraries/libpsl/default.nix
new file mode 100644
index 000000000000..3d0a3f208714
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpsl/default.nix
@@ -0,0 +1,84 @@
+{ lib, stdenv
+, fetchurl
+, autoreconfHook
+, docbook_xsl
+, docbook_xml_dtd_43
+, gtk-doc
+, lzip
+, libidn2
+, libunistring
+, libxslt
+, pkg-config
+, python3
+, valgrind
+, publicsuffix-list
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libpsl";
+  version = "0.21.5";
+
+  src = fetchurl {
+    url = "https://github.com/rockdaboot/libpsl/releases/download/${version}/libpsl-${version}.tar.lz";
+    hash = "sha256-mp9qjG7bplDPnqVUdc0XLdKEhzFoBOnHMgLZdXLNOi0=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    docbook_xsl
+    docbook_xml_dtd_43
+    gtk-doc
+    lzip
+    pkg-config
+    python3
+    libxslt
+  ];
+
+  buildInputs = [
+    libidn2
+    libunistring
+    libxslt
+  ];
+
+  propagatedBuildInputs = [
+    publicsuffix-list
+  ];
+
+  postPatch = ''
+    patchShebangs src/psl-make-dafsa
+  '';
+
+  preAutoreconf = ''
+    gtkdocize
+  '';
+
+  configureFlags = [
+    # "--enable-gtk-doc"
+    "--enable-man"
+    "--with-psl-distfile=${publicsuffix-list}/share/publicsuffix/public_suffix_list.dat"
+    "--with-psl-file=${publicsuffix-list}/share/publicsuffix/public_suffix_list.dat"
+    "--with-psl-testfile=${publicsuffix-list}/share/publicsuffix/test_psl.txt"
+  ];
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "C library for the Publix Suffix List";
+    longDescription = ''
+      libpsl is a C library for the Publix Suffix List (PSL). A "public suffix"
+      is a domain name under which Internet users can directly register own
+      names. Browsers and other web clients can use it to avoid privacy-leaking
+      "supercookies" and "super domain" certificates, for highlighting parts of
+      the domain in a user interface or sorting domain lists by site.
+    '';
+    homepage = "https://rockdaboot.github.io/libpsl/";
+    changelog = "https://raw.githubusercontent.com/rockdaboot/${pname}/${pname}-${version}/NEWS";
+    license = licenses.mit;
+    maintainers = [ maintainers.c0bw3b ];
+    mainProgram = "psl";
+    platforms = platforms.unix;
+    pkgConfigModules = [ "libpsl" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libpst/default.nix b/nixpkgs/pkgs/development/libraries/libpst/default.nix
new file mode 100644
index 000000000000..d6d33957b9a6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpst/default.nix
@@ -0,0 +1,52 @@
+{ lib
+, stdenv
+, fetchurl
+, autoreconfHook
+, bzip2
+, doxygen
+, gettext
+, imagemagick
+, libgsf
+, pkg-config
+, xmlto
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libpst";
+  version = "0.6.76";
+
+  src = fetchurl {
+    url = "http://www.five-ten-sg.com/libpst/packages/${finalAttrs.pname}-${finalAttrs.version}.tar.gz";
+    hash = "sha256-PSkb7rvbSNK5NGCLwGGVtkHaY9Ko9eDThvLp1tBaC0I=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    doxygen
+    gettext
+    pkg-config
+    xmlto
+  ];
+
+  buildInputs = [
+    bzip2
+    imagemagick
+    libgsf
+  ];
+
+  configureFlags = [
+    "--disable-static"
+    "--enable-libpst-shared"
+    "--enable-python=no"
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    homepage = "https://www.five-ten-sg.com/libpst/";
+    description = "A library to read PST (MS Outlook Personal Folders) files";
+    license = licenses.gpl2Plus;
+    maintainers = [ ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libptytty/default.nix b/nixpkgs/pkgs/development/libraries/libptytty/default.nix
new file mode 100644
index 000000000000..3ed0cf6a39d0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libptytty/default.nix
@@ -0,0 +1,44 @@
+{ stdenv
+, lib
+, fetchurl
+, cmake
+}:
+
+let
+  isCross = !stdenv.buildPlatform.canExecute stdenv.hostPlatform;
+  isStatic = stdenv.hostPlatform.isStatic;
+  isMusl = stdenv.hostPlatform.isMusl;
+in
+
+stdenv.mkDerivation rec {
+  pname = "libptytty";
+  version = "2.0";
+
+  src = fetchurl {
+    url = "http://dist.schmorp.de/libptytty/${pname}-${version}.tar.gz";
+    sha256 = "1xrikmrsdkxhdy9ggc0ci6kg5b1hn3bz44ag1mk5k1zjmlxfscw0";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = lib.optional isStatic "-DBUILD_SHARED_LIBS=OFF"
+    ++ lib.optional (isCross || isStatic) "-DTTY_GID_SUPPORT=OFF"
+    # Musl lacks UTMP/WTMP built-in support
+    ++ lib.optionals isMusl [
+      "-DUTMP_SUPPORT=OFF"
+      "-DWTMP_SUPPORT=OFF"
+      "-DLASTLOG_SUPPORT=OFF"
+    ];
+
+  meta = with lib; {
+    description = "OS independent and secure pty/tty and utmp/wtmp/lastlog";
+    homepage = "http://dist.schmorp.de/libptytty";
+    maintainers = with maintainers; [ rnhmjoj ];
+    platforms = platforms.unix;
+    license = licenses.gpl2;
+    # pkgsMusl.pkgsStatic errors as:
+    #   ln: failed to create symbolic link './include': File exists
+    broken = isStatic && isMusl;
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/libpulsar/default.nix b/nixpkgs/pkgs/development/libraries/libpulsar/default.nix
new file mode 100644
index 000000000000..d87ef2b72802
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpulsar/default.nix
@@ -0,0 +1,102 @@
+{ lib
+, clang-tools
+, llvmPackages
+, boost179
+, protobuf
+, python3Support ? false
+, python3
+, log4cxxSupport ? false
+, log4cxx
+, snappySupport ? false
+, snappy
+, zlibSupport ? true
+, zlib
+, zstdSupport ? true
+, zstd
+, gtest
+, gtestSupport ? false
+, cmake
+, curl
+, fetchurl
+, jsoncpp
+, openssl
+, pkg-config
+, stdenv
+}:
+
+let
+  /*
+    Check if null or false
+    Example:
+    let result = enableFeature null
+    => "OFF"
+    let result = enableFeature false
+    => "OFF"
+    let result = enableFeature «derivation»
+    => "ON"
+  */
+  enableCmakeFeature = p: if (p == null || p == false) then "OFF" else "ON";
+
+  # Not really sure why I need to do this.. If I call clang-tools without the override it defaults to a different version and fails
+  clangTools = clang-tools.override { inherit stdenv llvmPackages; };
+  # If boost has python enabled, then boost-python package will be installed which is used by libpulsars python wrapper
+  boost = if python3Support then boost179.override { inherit stdenv; enablePython = python3Support; python = python3; } else boost179;
+  defaultOptionals = [ boost protobuf ]
+    ++ lib.optional python3Support python3
+    ++ lib.optional snappySupport snappy.dev
+    ++ lib.optional zlibSupport zlib
+    ++ lib.optional zstdSupport zstd
+    ++ lib.optional log4cxxSupport log4cxx;
+
+in
+stdenv.mkDerivation rec {
+  pname = "libpulsar";
+  version = "2.10.2";
+
+  src = fetchurl {
+    hash = "sha256-IONnsSDbnX2qz+Xya0taHYSViTOiRI36AfcxmY3dNpo=";
+    url = "mirror://apache/pulsar/pulsar-${version}/apache-pulsar-${version}-src.tar.gz";
+  };
+
+  sourceRoot = "apache-pulsar-${version}-src/pulsar-client-cpp";
+
+  # clang-tools needed for clang-format
+  nativeBuildInputs = [ cmake pkg-config clangTools ]
+    ++ defaultOptionals
+    ++ lib.optional gtestSupport gtest.dev;
+
+  buildInputs = [ jsoncpp openssl curl ]
+    ++ defaultOptionals;
+
+  # Needed for GCC on Linux
+  env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=return-type" ];
+
+  cmakeFlags = [
+    "-DBUILD_TESTS=${enableCmakeFeature gtestSupport}"
+    "-DBUILD_PYTHON_WRAPPER=${enableCmakeFeature python3Support}"
+    "-DUSE_LOG4CXX=${enableCmakeFeature log4cxxSupport}"
+    "-DClangTools_PATH=${clangTools}/bin"
+  ];
+
+  enableParallelBuilding = true;
+  doInstallCheck = true;
+  installCheckPhase = ''
+    echo ${lib.escapeShellArg ''
+      #include <pulsar/Client.h>
+      int main (int argc, char **argv) {
+        pulsar::Client client("pulsar://localhost:6650");
+        return 0;
+      }
+    ''} > test.cc
+    $CXX test.cc -L $out/lib -I $out/include -lpulsar -o test
+  '';
+
+  meta = with lib; {
+    homepage = "https://pulsar.apache.org/docs/en/client-libraries-cpp";
+    description = "Apache Pulsar C++ library";
+
+    platforms = platforms.all;
+    license = licenses.asl20;
+    maintainers = [ maintainers.corbanr ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libpwquality/default.nix b/nixpkgs/pkgs/development/libraries/libpwquality/default.nix
new file mode 100644
index 000000000000..fade2a9194ae
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpwquality/default.nix
@@ -0,0 +1,57 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, autoreconfHook
+, perl
+, cracklib
+, enablePAM ? stdenv.hostPlatform.isLinux
+, pam
+, enablePython ? false
+, python
+}:
+
+# python binding generates a shared library which are unavailable with musl build
+assert enablePython -> !stdenv.hostPlatform.isStatic;
+
+stdenv.mkDerivation rec {
+  pname = "libpwquality";
+  version = "1.4.5";
+
+  outputs = [ "out" "dev" "lib" "man" ] ++ lib.optionals enablePython [ "py" ];
+
+  src = fetchFromGitHub {
+    owner = "libpwquality";
+    repo = "libpwquality";
+    rev = "${pname}-${version}";
+    sha256 = "sha256-YjvHzd4iEBvg+qHOVJ7/y9HqyeT+QDalNE/jdNM9BNs=";
+  };
+
+  patches = [
+    # ensure python site-packages goes in $py output
+    ./python-binding-prefix.patch
+  ];
+
+  nativeBuildInputs = [ autoreconfHook perl ] ++ lib.optionals enablePython [ python ];
+  buildInputs = [ cracklib ] ++ lib.optionals enablePAM [ pam ];
+
+  configureFlags = lib.optionals (!enablePython) [ "--disable-python-bindings" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/libpwquality/libpwquality";
+    description = "Password quality checking and random password generation library";
+    longDescription = ''
+      The libpwquality library purpose is to provide common functions for
+      password quality checking and also scoring them based on their apparent
+      randomness. The library also provides a function for generating random
+      passwords with good pronounceability. The library supports reading and
+      parsing of a configuration file.
+
+      In the package there are also very simple utilities that use the library
+      function and PAM module that can be used instead of pam_cracklib. The
+      module supports all the options of pam_cracklib.
+    '';
+    license = with licenses; [ bsd3 /* or */ gpl2Plus ];
+    maintainers = with maintainers; [ jk ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libpwquality/python-binding-prefix.patch b/nixpkgs/pkgs/development/libraries/libpwquality/python-binding-prefix.patch
new file mode 100644
index 000000000000..a8f77142e1db
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpwquality/python-binding-prefix.patch
@@ -0,0 +1,13 @@
+diff --git a/python/Makefile.am b/python/Makefile.am
+index 1d00c0c..0987690 100644
+--- a/python/Makefile.am
++++ b/python/Makefile.am
+@@ -14,7 +14,7 @@ all-local:
+ 	CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV)
+ 
+ install-exec-local:
+-	CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --prefix=${DESTDIR}${prefix}
++	CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --prefix=${DESTDIR}${py}
+ 
+ clean-local:
+ 	rm -rf py$(PYTHONREV)
diff --git a/nixpkgs/pkgs/development/libraries/libqaccessibilityclient/default.nix b/nixpkgs/pkgs/development/libraries/libqaccessibilityclient/default.nix
new file mode 100644
index 000000000000..e05400114d06
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libqaccessibilityclient/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchurl, cmake, qtbase, extra-cmake-modules }:
+
+stdenv.mkDerivation rec {
+  pname = "libqaccessibilityclient";
+  version = "0.5.0";
+
+  src = fetchurl {
+    url = "mirror://kde/stable/libqaccessibilityclient/libqaccessibilityclient-${version}.tar.xz";
+    hash = "sha256-cEdyVDo7AFuUBhpT6vn51klE5oGLBMWcD7ClA8gaxKA=";
+  };
+
+  nativeBuildInputs = [ cmake extra-cmake-modules ];
+  buildInputs = [ qtbase ];
+  cmakeFlags = ["-DQT_MAJOR_VERSION=${lib.versions.major qtbase.version}"];
+
+  outputs = [ "out" "dev" ];
+
+  dontWrapQtApps = true;
+
+  meta = with lib; {
+    description = "Accessibilty tools helper library, used e.g. by screen readers";
+    homepage = "https://github.com/KDE/libqaccessibilityclient";
+    maintainers = with maintainers; [ artturin ];
+    license = with licenses; [ lgpl3Only /* or */ lgpl21Only ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libqalculate/default.nix b/nixpkgs/pkgs/development/libraries/libqalculate/default.nix
new file mode 100644
index 000000000000..84623e7459fc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libqalculate/default.nix
@@ -0,0 +1,82 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, intltool
+, pkg-config
+, doxygen
+, autoreconfHook
+, buildPackages
+, curl
+, gettext
+, libiconv
+, readline
+, libxml2
+, mpfr
+, icu
+, gnuplot
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libqalculate";
+  version = "4.9.0";
+
+  src = fetchFromGitHub {
+    owner = "qalculate";
+    repo = "libqalculate";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-6W65dg2pZeio3ZVgVLQZrz/eReYcPiYf52zjcaRfE8E=";
+  };
+
+  outputs = [ "out" "dev" "doc" ];
+
+  nativeBuildInputs = [
+    intltool
+    pkg-config
+    autoreconfHook
+    doxygen
+  ];
+  depsBuildBuild = [
+    buildPackages.stdenv.cc
+  ];
+
+  buildInputs = [
+    curl
+    gettext
+    libiconv
+    readline
+  ];
+  propagatedBuildInputs = [
+    libxml2
+    mpfr
+    icu
+  ];
+  enableParallelBuilding = true;
+
+  preConfigure = ''
+    intltoolize -f
+  '';
+
+  patchPhase = ''
+    substituteInPlace libqalculate/Calculator-plot.cc \
+      --replace 'commandline = "gnuplot"' 'commandline = "${gnuplot}/bin/gnuplot"' \
+      --replace '"gnuplot - ' '"${gnuplot}/bin/gnuplot - '
+  '' + lib.optionalString stdenv.cc.isClang ''
+    substituteInPlace src/qalc.cc \
+      --replace 'printf(_("aborted"))' 'printf("%s", _("aborted"))'
+  '';
+
+  preBuild = ''
+    pushd docs/reference
+    doxygen Doxyfile
+    popd
+  '';
+
+  meta = with lib; {
+    description = "An advanced calculator library";
+    homepage = "http://qalculate.github.io";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ gebner doronbehar alyaeanyx ];
+    mainProgram = "qalc";
+    platforms = platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libqb/default.nix b/nixpkgs/pkgs/development/libraries/libqb/default.nix
new file mode 100644
index 000000000000..8e798e4a38a4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libqb/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, libxml2 }:
+
+stdenv.mkDerivation rec {
+  pname = "libqb";
+  version = "2.0.8";
+
+  src = fetchFromGitHub {
+    owner = "ClusterLabs";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-ZjxC7W4U8T68mZy/OvWj/e4W9pJIj2lVDoEjxXYr/G8=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  buildInputs = [ libxml2 ];
+
+  postPatch = ''
+    sed -i '/# --enable-new-dtags:/,/--enable-new-dtags is required/ d' configure.ac
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/clusterlabs/libqb";
+    description = "A library providing high performance logging, tracing, ipc, and poll";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libqglviewer/default.nix b/nixpkgs/pkgs/development/libraries/libqglviewer/default.nix
new file mode 100644
index 000000000000..fd10ccc5375c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libqglviewer/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl, qmake, qtbase, libGLU, AGL }:
+
+stdenv.mkDerivation rec {
+  pname = "libqglviewer";
+  version = "2.9.1";
+
+  src = fetchurl {
+    url = "http://www.libqglviewer.com/src/libQGLViewer-${version}.tar.gz";
+    sha256 = "sha256-J4+DKgstPvvg1pUhGd+8YFh5C3oPGHaQmDfLZzzkP/M=";
+  };
+
+  nativeBuildInputs = [ qmake ];
+  buildInputs = [ qtbase libGLU ]
+    ++ lib.optional stdenv.isDarwin AGL;
+
+  dontWrapQtApps = true;
+
+  postPatch = ''
+    cd QGLViewer
+  '';
+
+  meta = with lib; {
+    description = "C++ library based on Qt that eases the creation of OpenGL 3D viewers";
+    homepage = "http://libqglviewer.com";
+    license = licenses.gpl2;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libqmi/default.nix b/nixpkgs/pkgs/development/libraries/libqmi/default.nix
new file mode 100644
index 000000000000..58fadd30ee8d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libqmi/default.nix
@@ -0,0 +1,97 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, meson
+, ninja
+, pkg-config
+, gobject-introspection
+, gtk-doc
+, docbook-xsl-nons
+, docbook_xml_dtd_43
+, help2man
+, glib
+, python3
+, mesonEmulatorHook
+, libgudev
+, bash-completion
+, libmbim
+, libqrtr-glib
+, buildPackages
+, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
+, withMan ? stdenv.buildPlatform.canExecute stdenv.hostPlatform
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libqmi";
+  version = "1.34.0";
+
+  outputs = [ "out" "dev" ]
+    ++ lib.optional withIntrospection "devdoc";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "mobile-broadband";
+    repo = "libqmi";
+    rev = version;
+    hash = "sha256-l9ev9ZOWicVNZ/Wj//KNd3NHcefIrLVriqJhEpwWvtQ=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    python3
+  ] ++ lib.optionals withMan [
+    help2man
+  ] ++ lib.optionals withIntrospection [
+    gobject-introspection
+    gtk-doc
+    docbook-xsl-nons
+    docbook_xml_dtd_43
+  ] ++ lib.optionals (withIntrospection && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
+  ];
+
+  buildInputs = [
+    bash-completion
+    libmbim
+  ] ++ lib.optionals withIntrospection [
+    libgudev
+  ];
+
+  propagatedBuildInputs = [
+    glib
+  ] ++ lib.optionals withIntrospection [
+    libqrtr-glib
+  ];
+
+  mesonFlags = [
+    "-Dudevdir=${placeholder "out"}/lib/udev"
+    (lib.mesonBool "gtk_doc" withIntrospection)
+    (lib.mesonBool "introspection" withIntrospection)
+    (lib.mesonBool "man" withMan)
+    (lib.mesonBool "qrtr" withIntrospection)
+    (lib.mesonBool "udev" withIntrospection)
+  ];
+
+  doCheck = true;
+
+  postPatch = ''
+    patchShebangs \
+      build-aux/qmi-codegen/qmi-codegen
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.freedesktop.org/wiki/Software/libqmi/";
+    description = "Modem protocol helper library";
+    maintainers = teams.freedesktop.members;
+    platforms = platforms.linux;
+    license = with licenses; [
+      # Library
+      lgpl2Plus
+      # Tools
+      gpl2Plus
+    ];
+    changelog = "https://gitlab.freedesktop.org/mobile-broadband/libqmi/-/blob/${version}/NEWS";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libqofono/0001-NixOS-Skip-tests-they-re-shock-full-of-hardcoded-FHS.patch b/nixpkgs/pkgs/development/libraries/libqofono/0001-NixOS-Skip-tests-they-re-shock-full-of-hardcoded-FHS.patch
new file mode 100644
index 000000000000..b93562a663ce
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libqofono/0001-NixOS-Skip-tests-they-re-shock-full-of-hardcoded-FHS.patch
@@ -0,0 +1,29 @@
+From 8b508d427c4fd472639ba8d4a0d3b8ab69e3f2e3 Mon Sep 17 00:00:00 2001
+From: Samuel Dionne-Riel <samuel@dionne-riel.com>
+Date: Tue, 30 Mar 2021 16:37:52 -0400
+Subject: [PATCH] [NixOS] Skip tests, they're shock-full of hardcoded FHS paths
+
+---
+ libqofono.pro | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/libqofono.pro b/libqofono.pro
+index 60d0b89..638a4a8 100644
+--- a/libqofono.pro
++++ b/libqofono.pro
+@@ -1,5 +1,5 @@
+ TEMPLATE = subdirs
+-SUBDIRS += src plugin test ofonotest
++SUBDIRS += src plugin
+ OTHER_FILES += \
+   rpm/libqofono-qt5.spec \
+   TODO \
+@@ -7,5 +7,3 @@ OTHER_FILES += \
+ 
+ src.target = src-target
+ plugin.depends = src-target
+-test.depends = src-target
+-ofonotest.depends = src-target
+-- 
+2.28.0
+
diff --git a/nixpkgs/pkgs/development/libraries/libqofono/0001-NixOS-provide-mobile-broadband-provider-info-path.patch b/nixpkgs/pkgs/development/libraries/libqofono/0001-NixOS-provide-mobile-broadband-provider-info-path.patch
new file mode 100644
index 000000000000..94b4c61befe5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libqofono/0001-NixOS-provide-mobile-broadband-provider-info-path.patch
@@ -0,0 +1,34 @@
+From 04106010ae2a13b3a2a93e210062998ee51778ca Mon Sep 17 00:00:00 2001
+From: Samuel Dionne-Riel <samuel@dionne-riel.com>
+Date: Tue, 30 Mar 2021 15:47:38 -0400
+Subject: [PATCH] [NixOS] provide mobile-broadband-provider-info path
+
+---
+ src/qofonoconnectioncontext.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/qofonoconnectioncontext.cpp b/src/qofonoconnectioncontext.cpp
+index b5877ed..455167c 100644
+--- a/src/qofonoconnectioncontext.cpp
++++ b/src/qofonoconnectioncontext.cpp
+@@ -346,7 +346,7 @@ bool QOfonoConnectionContext::validateProvisioning(const QString &providerString
+     QXmlQuery query;
+     QString provider = providerString;
+ 
+-    query.setFocus(QUrl("/usr/share/mobile-broadband-provider-info/serviceproviders.xml"));
++    query.setFocus(QUrl("@mobile-broadband-provider-info@/share/mobile-broadband-provider-info/serviceproviders.xml"));
+ 
+     if (provider.contains("\'")) {
+         provider = provider.replace("\'", "&apos;");
+@@ -457,7 +457,7 @@ void QOfonoConnectionContext::provision(const QString &provider, const QString &
+ {
+ #ifdef QOFONO_PROVISIONING
+     QXmlQuery query;
+-    query.setFocus(QUrl("/usr/share/mobile-broadband-provider-info/serviceproviders.xml"));
++    query.setFocus(QUrl("@mobile-broadband-provider-info@/share/mobile-broadband-provider-info/serviceproviders.xml"));
+ 
+     QString providerStr = provider;
+     if (providerStr.contains("\'")) {
+-- 
+2.28.0
+
diff --git a/nixpkgs/pkgs/development/libraries/libqofono/default.nix b/nixpkgs/pkgs/development/libraries/libqofono/default.nix
new file mode 100644
index 000000000000..361421466e89
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libqofono/default.nix
@@ -0,0 +1,58 @@
+{ lib
+, substituteAll
+, mkDerivation
+, fetchFromGitLab
+, mobile-broadband-provider-info
+, qmake
+, qtbase
+, qtdeclarative
+}:
+
+mkDerivation rec {
+  pname = "libqofono";
+  version = "0.103";
+
+  src = fetchFromGitLab {
+    domain = "git.sailfishos.org";
+    owner = "mer-core";
+    repo = "libqofono";
+    rev = version;
+    sha256 = "1ly5aj412ljcjvhqyry6nhiglbzzhczsy1a6w4i4fja60b2m1z45";
+  };
+
+  patches = [
+    (substituteAll {
+      src = ./0001-NixOS-provide-mobile-broadband-provider-info-path.patch;
+      inherit mobile-broadband-provider-info;
+    })
+    ./0001-NixOS-Skip-tests-they-re-shock-full-of-hardcoded-FHS.patch
+  ];
+
+  # Replaces paths from the Qt store path to this library's store path.
+  postPatch = ''
+    substituteInPlace src/src.pro \
+      --replace /usr $out \
+      --replace '$$[QT_INSTALL_PREFIX]' "$out" \
+      --replace 'target.path = $$[QT_INSTALL_LIBS]' "target.path = $out/lib"
+
+    substituteInPlace plugin/plugin.pro \
+      --replace '$$[QT_INSTALL_QML]' $out'/${qtbase.qtQmlPrefix}'
+  '';
+
+  nativeBuildInputs = [
+    qmake
+  ];
+
+  buildInputs = [
+    qtbase
+    qtdeclarative
+  ];
+
+  meta = with lib; {
+    description = "Library for accessing the ofono daemon, and declarative plugin for it";
+    homepage = "https://git.sailfishos.org/mer-core/libqofono/";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ samueldr ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libqrtr-glib/default.nix b/nixpkgs/pkgs/development/libraries/libqrtr-glib/default.nix
new file mode 100644
index 000000000000..9309c48a8c6a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libqrtr-glib/default.nix
@@ -0,0 +1,58 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, meson
+, mesonEmulatorHook
+, ninja
+, pkg-config
+, gobject-introspection
+, gtk-doc
+, docbook-xsl-nons
+, docbook_xml_dtd_43
+, glib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libqrtr-glib";
+  version = "1.2.2";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "mobile-broadband";
+    repo = "libqrtr-glib";
+    rev = version;
+    sha256 = "kHLrOXN6wgBrHqipo2KfAM5YejS0/bp7ziBSpt0s1i0=";
+  };
+
+  strictDeps = true;
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gobject-introspection
+    gtk-doc
+    docbook-xsl-nons
+    docbook_xml_dtd_43
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
+  ];
+
+  buildInputs = [
+    glib
+  ];
+
+  meta = with lib; {
+    homepage = "https://gitlab.freedesktop.org/mobile-broadband/libqrtr-glib";
+    description = "Qualcomm IPC Router protocol helper library";
+    maintainers = teams.freedesktop.members;
+    platforms = platforms.linux;
+    license = licenses.lgpl2Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libqtav/default.nix b/nixpkgs/pkgs/development/libraries/libqtav/default.nix
new file mode 100644
index 000000000000..afae47c96d3d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libqtav/default.nix
@@ -0,0 +1,71 @@
+{ mkDerivation
+, lib
+, fetchFromGitHub
+, extra-cmake-modules
+, qtbase
+, qtmultimedia
+, qttools
+, libGL
+, libX11
+, libass
+, openal
+, ffmpeg_4
+, libuchardet
+, alsa-lib
+, libpulseaudio
+, libva
+}:
+
+mkDerivation rec {
+  pname = "libqtav";
+  version = "unstable-2020-09-10";
+
+  nativeBuildInputs = [ extra-cmake-modules qttools ];
+  buildInputs = [
+    qtbase
+    qtmultimedia
+    libGL
+    libX11
+    libass
+    openal
+    ffmpeg_4
+    libuchardet
+    alsa-lib
+    libpulseaudio
+    libva
+  ];
+
+  src = fetchFromGitHub {
+    sha256 = "0qwrk40dihkbwmm7krz6qaqyn9v3qdjnd2k9b4s3a67x4403pib3";
+    rev = "2a470d2a8d2fe22fae969bee5d594909a07b350a";
+    repo = "QtAV";
+    owner = "wang-bin";
+    fetchSubmodules = true;
+  };
+
+  # Make sure libqtav finds its libGL dependency at both link and run time
+  # by adding libGL to rpath. Not sure why it wasn't done automatically like
+  # the other libraries as `libGL` is part of our `buildInputs`.
+  NIX_CFLAGS_LINK = "-Wl,-rpath,${libGL}/lib";
+
+  cmakeFlags = [
+    # RPATH of binary /nix/store/.../bin/... contains a forbidden reference to /build/
+    "-DCMAKE_SKIP_BUILD_RPATH=ON"
+  ];
+
+  preFixup = ''
+    mkdir -p "$out/bin"
+    cp -a "./bin/"* "$out/bin"
+  '';
+
+  stripDebugList = [ "lib" "libexec" "bin" "qml" ];
+
+  meta =  with lib; {
+    description = "A multimedia playback framework based on Qt + FFmpeg";
+    #license = licenses.lgpl21; # For the libraries / headers only.
+    license = licenses.gpl3; # With the examples (under bin) and most likely some of the optional dependencies used.
+    homepage = "http://www.qtav.org/";
+    maintainers = [ maintainers.jraygauthier ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libqtdbusmock/default.nix b/nixpkgs/pkgs/development/libraries/libqtdbusmock/default.nix
new file mode 100644
index 000000000000..d9993947b553
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libqtdbusmock/default.nix
@@ -0,0 +1,93 @@
+{ stdenv
+, lib
+, fetchbzr
+, testers
+, cmake
+, cmake-extras
+, dbus
+, dbus-test-runner
+, gtest
+, libqtdbustest
+, networkmanager
+, pkg-config
+, procps
+, python3
+, qtbase
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libqtdbusmock";
+  version = "unstable-2017-03-16";
+
+  src = fetchbzr {
+    url = "lp:libqtdbusmock";
+    rev = "49";
+    sha256 = "sha256-q3jL8yGLgcNxXHPh9M9cTVtUvonrBUPNxuPJIvu7Q/s=";
+  };
+
+  postPatch = ''
+    # Look for the new(?) name
+    substituteInPlace CMakeLists.txt \
+      --replace 'NetworkManager' 'libnm'
+
+    # Workaround for "error: expected unqualified-id before 'public'" on "**signals"
+    sed -i -e '/add_definitions/a -DQT_NO_KEYWORDS' CMakeLists.txt
+  '' + lib.optionalString (!finalAttrs.finalPackage.doCheck) ''
+    # Don't build tests when we're not running them
+    sed -i -e '/add_subdirectory(tests)/d' CMakeLists.txt
+  '';
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    cmake-extras
+    libqtdbustest
+    networkmanager
+    qtbase
+  ];
+
+  nativeCheckInputs = [
+    dbus
+    dbus-test-runner
+    procps
+    (python3.withPackages (ps: with ps; [
+      python-dbusmock
+    ]))
+  ];
+
+  checkInputs = [
+    gtest
+  ];
+
+  dontWrapQtApps = true;
+
+  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
+
+  enableParallelChecking = false;
+
+  checkPhase = ''
+    runHook preCheck
+
+    dbus-test-runner -t make -p test -p "''${enableParallelChecking:+-j $NIX_BUILD_CORES}"
+
+    runHook postCheck
+  '';
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    description = "Library for mocking DBus interactions using Qt";
+    homepage = "https://launchpad.net/libqtdbusmock";
+    license = licenses.lgpl3Only;
+    platforms = platforms.unix;
+    maintainers = teams.lomiri.members;
+    pkgConfigModules = [
+      "libqtdbusmock-1"
+    ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libqtdbustest/default.nix b/nixpkgs/pkgs/development/libraries/libqtdbustest/default.nix
new file mode 100644
index 000000000000..fe6a3e041798
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libqtdbustest/default.nix
@@ -0,0 +1,102 @@
+{ stdenv
+, lib
+, fetchbzr
+, fetchpatch
+, testers
+, cmake
+, cmake-extras
+, dbus
+, dbus-test-runner
+, gtest
+, pkg-config
+, procps
+, python3
+, qtbase
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libqtdbustest";
+  version = "unstable-2017-01-06";
+
+  src = fetchbzr {
+    url = "lp:libqtdbustest";
+    rev = "42";
+    sha256 = "sha256-5MQdGGtEVE/pM9u0B0xFXyITiRln9p+8/MLtrrCZqi8=";
+  };
+
+  patches = [
+    # Tests are overly pedantic when looking for launched process names in `ps`, break on python wrapper vs real python
+    # Just check if basename + arguments match, like libqtdbusmock does
+    ./less-pedantic-process-finding.patch
+
+    # Disable QProcess start timeout
+    (fetchpatch {
+      url = "https://salsa.debian.org/debian-ayatana-team/libqtdbustest/-/raw/0788df10bc6f2aa47c2b73fc1df944686a9ace1e/debian/patches/1003_no-QProcess-waitForstarted-timeout.patch";
+      hash = "sha256-ThDbn6URvkj5ARDMj+xO0fb1Qh2YQRzVy24O03KglHI=";
+    })
+
+    # More robust dbus address reading
+    (fetchpatch {
+      url = "https://salsa.debian.org/debian-ayatana-team/libqtdbustest/-/raw/7e55c79cd032c702b30d834c1fb0b65661fc6eeb/debian/patches/1004_make-reading-address-from-dbus-daemon-more-robust.patch";
+      hash = "sha256-hq8pdducp/udxoGWGt1dgL/7VHcbJO/oT1dOY1zew8M=";
+    })
+  ];
+
+  strictDeps = true;
+
+  postPatch =  lib.optionalString (!finalAttrs.finalPackage.doCheck) ''
+    # Don't build tests when we're not running them
+    sed -i -e '/add_subdirectory(tests)/d' CMakeLists.txt
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    cmake-extras
+    qtbase
+  ];
+
+  nativeCheckInputs = [
+    dbus
+    dbus-test-runner
+    procps
+    (python3.withPackages (ps: with ps; [
+      python-dbusmock
+    ]))
+  ];
+
+  checkInputs = [
+    gtest
+  ];
+
+  dontWrapQtApps = true;
+
+  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
+
+  enableParallelChecking = false;
+
+  checkPhase = ''
+    runHook preCheck
+
+    dbus-test-runner -t make -p test -p "''${enableParallelChecking:+-j $NIX_BUILD_CORES}"
+
+    runHook postCheck
+  '';
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    description = "Library for testing DBus interactions using Qt";
+    homepage = "https://launchpad.net/libqtdbustest";
+    license = licenses.lgpl3Only;
+    platforms = platforms.unix;
+    maintainers = teams.lomiri.members;
+    mainProgram = "qdbus-simple-test-runner";
+    pkgConfigModules = [
+      "libqtdbustest-1"
+    ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libqtdbustest/less-pedantic-process-finding.patch b/nixpkgs/pkgs/development/libraries/libqtdbustest/less-pedantic-process-finding.patch
new file mode 100644
index 000000000000..b50fc5d1e476
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libqtdbustest/less-pedantic-process-finding.patch
@@ -0,0 +1,86 @@
+diff '--color=auto' -ur '--color=never' a/tests/libqtdbustest/TestDBusTestRunner.cpp b/tests/libqtdbustest/TestDBusTestRunner.cpp
+--- a/tests/libqtdbustest/TestDBusTestRunner.cpp	2023-01-20 21:36:16.948292559 +0100
++++ b/tests/libqtdbustest/TestDBusTestRunner.cpp	2023-01-20 21:55:40.554530221 +0100
+@@ -44,7 +44,7 @@
+ TEST_F(TestDBusTestRunner, StartsSessionService) {
+ 	QSharedPointer<QProcessDBusService> process(
+ 			new QProcessDBusService("test.session.name",
+-					QDBusConnection::SessionBus, "/usr/bin/python3",
++					QDBusConnection::SessionBus, "python3",
+ 					QStringList() << "-m" << "dbusmock" << "test.session.name"
+ 							<< "/test/object" << "test.Interface"));
+ 
+@@ -58,15 +58,14 @@
+ 	pgrep.waitForFinished();
+ 	pgrep.waitForReadyRead();
+ 
+-	EXPECT_EQ(
+-			"/usr/bin/python3 -m dbusmock test.session.name /test/object test.Interface",
+-			QString::fromUtf8(pgrep.readAll().trimmed()).toStdString());
++	EXPECT_TRUE(
++			pgrep.readAll().contains("python3 -m dbusmock test.session.name /test/object test.Interface"));
+ }
+ 
+ TEST_F(TestDBusTestRunner, StartsSystemService) {
+ 	QSharedPointer<QProcessDBusService> process(
+ 			new QProcessDBusService("test.system.name",
+-					QDBusConnection::SystemBus, "/usr/bin/python3",
++					QDBusConnection::SystemBus, "python3",
+ 					QStringList() << "-m" << "dbusmock" << "-s"
+ 							<< "test.system.name" << "/test/object"
+ 							<< "test.Interface"));
+@@ -81,9 +80,8 @@
+ 	pgrep.waitForFinished();
+ 	pgrep.waitForReadyRead();
+ 
+-	EXPECT_EQ(
+-			"/usr/bin/python3 -m dbusmock -s test.system.name /test/object test.Interface",
+-			QString::fromUtf8(pgrep.readAll().trimmed()).toStdString());
++	EXPECT_TRUE(
++			pgrep.readAll().contains("python3 -m dbusmock -s test.system.name /test/object test.Interface"));
+ }
+ 
+ TEST_F(TestDBusTestRunner, SetsEnvironmentVariables) {
+diff '--color=auto' -ur '--color=never' a/tests/libqtdbustest/TestQProcessDBusService.cpp b/tests/libqtdbustest/TestQProcessDBusService.cpp
+--- a/tests/libqtdbustest/TestQProcessDBusService.cpp	2023-01-20 21:36:16.948292559 +0100
++++ b/tests/libqtdbustest/TestQProcessDBusService.cpp	2023-01-20 21:54:34.633384937 +0100
+@@ -45,7 +45,7 @@
+ 
+ TEST_F(TestQProcessDBusService, WaitsForServiceAppeared) {
+ 	QProcessDBusService process("test.name", QDBusConnection::SessionBus,
+-			"/usr/bin/python3",
++			"python3",
+ 			QStringList() << "-m" << "dbusmock" << "test.name" << "/test/object"
+ 					<< "test.Interface");
+ 
+@@ -58,14 +58,13 @@
+ 	pgrep.waitForFinished();
+ 	pgrep.waitForReadyRead();
+ 
+-	EXPECT_EQ(
+-			"/usr/bin/python3 -m dbusmock test.name /test/object test.Interface",
+-			QString::fromUtf8(pgrep.readAll().trimmed()).toStdString());
++	EXPECT_TRUE(
++			pgrep.readAll().contains("python3 -m dbusmock test.name /test/object test.Interface"));
+ }
+ 
+ TEST_F(TestQProcessDBusService, ThrowsErrorForFailToStart) {
+ 	QProcessDBusService process("test.name", QDBusConnection::SessionBus,
+-			"/usr/bin/python3",
++			"python3",
+ 			QStringList() << "-m" << "dbusmock" << "not.test.name"
+ 					<< "/test/object" << "test.Interface");
+ 
+diff '--color=auto' -ur '--color=never' a/tests/libqtdbustest/TestSuicidalProcess.cpp b/tests/libqtdbustest/TestSuicidalProcess.cpp
+--- a/tests/libqtdbustest/TestSuicidalProcess.cpp	2023-01-20 21:36:16.948292559 +0100
++++ b/tests/libqtdbustest/TestSuicidalProcess.cpp	2023-01-20 21:55:07.219951081 +0100
+@@ -51,8 +51,7 @@
+ 	pgrep.waitForFinished();
+ 	pgrep.waitForReadyRead();
+ 
+-	EXPECT_EQ("sleep 5",
+-			QString::fromUtf8(pgrep.readAll().trimmed()).toStdString());
++	EXPECT_TRUE(pgrep.readAll().contains("sleep 5"));
+ }
+ 
+ } // namespace
diff --git a/nixpkgs/pkgs/development/libraries/libquotient/default.nix b/nixpkgs/pkgs/development/libraries/libquotient/default.nix
new file mode 100644
index 000000000000..b461a3c07864
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libquotient/default.nix
@@ -0,0 +1,47 @@
+{ stdenv, lib, fetchFromGitHub, cmake, olm, openssl, qtbase, qtmultimedia, qtkeychain }:
+
+let
+  isQt6 = lib.versions.major qtbase.version == "6";
+in stdenv.mkDerivation rec {
+  pname = "libquotient";
+  version = "0.8.1.2";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "quotient-im";
+    repo = "libQuotient";
+    rev = version;
+    hash = "sha256-qJTikc42sFUlb4g0sAEg6v9d4k1lhbn3MZPvghm56E8=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  propagatedBuildInputs = [ qtbase qtkeychain olm openssl qtmultimedia ];
+
+  cmakeFlags = [
+    "-DQuotient_ENABLE_E2EE=ON"
+    (lib.cmakeBool "BUILD_WITH_QT6" isQt6)
+  ];
+
+  # https://github.com/quotient-im/libQuotient/issues/551
+  postPatch = ''
+    substituteInPlace Quotient.pc.in \
+      --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
+      --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
+  '';
+
+  dontWrapQtApps = true;
+
+  postInstall = ''
+    # causes cyclic dependency but is not used
+    rm $out/share/ndk-modules/Android.mk
+  '';
+
+  meta = with lib; {
+    description = "A Qt5/Qt6 library to write cross-platform clients for Matrix";
+    homepage = "https://quotient-im.github.io/libQuotient/";
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ colemickens matthiasbeyer ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libr3/default.nix b/nixpkgs/pkgs/development/libraries/libr3/default.nix
new file mode 100644
index 000000000000..34ac547f4920
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libr3/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv
+, fetchFromGitHub
+, pcre
+, pkg-config
+, check
+, autoreconfHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "r3";
+  version = "1.3.4";
+
+  src = fetchFromGitHub {
+    owner = "c9s";
+    repo = "r3";
+    rev = version;
+    sha256 = "09cixbms817p6nb77wz3rxp0znnac8ybycvsrrzgwlbfn58a3zwl";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  buildInputs = [ check ];
+  propagatedBuildInputs = [ pcre ];
+
+  strictDeps = true;
+
+  meta = {
+    description = "A high-performance path dispatching library";
+    homepage = "https://github.com/c9s/r3";
+    license = [ lib.licenses.mit ];
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/libraqm/default.nix b/nixpkgs/pkgs/development/libraries/libraqm/default.nix
new file mode 100644
index 000000000000..4ce422858f5b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libraqm/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, pkg-config
+, meson
+, ninja
+, freetype
+, harfbuzz
+, fribidi
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libraqm";
+  version = "0.10.1";
+
+  src = fetchFromGitHub {
+    owner = "HOST-Oman";
+    repo = "libraqm";
+    rev = "v${version}";
+    sha256 = "sha256-H9W+7Mob3o5ctxfp5UhIxatSdXqqvkpyEibJx9TO7a8=";
+  };
+
+  buildInputs = [ freetype harfbuzz fribidi ];
+
+  nativeBuildInputs = [ pkg-config meson ninja ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "A library for complex text layout";
+    homepage = "https://github.com/HOST-Oman/libraqm";
+    license = licenses.mit;
+    maintainers = with maintainers; [ sifmelcara ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libraspberrypi/default.nix b/nixpkgs/pkgs/development/libraries/libraspberrypi/default.nix
new file mode 100644
index 000000000000..14f02d8481e9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libraspberrypi/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libraspberrypi";
+  version = "unstable-2022-06-16";
+
+  src = fetchFromGitHub {
+    owner = "raspberrypi";
+    repo = "userland";
+    rev = "54fd97ae4066a10b6b02089bc769ceed328737e0";
+    hash = "sha512-f7tBgIykcIdkwcFjBKk5ooD/5Bsyrd/0OFr7LNCwWFYeE4DH3XA7UR7YjArkwqUVCVBByr82EOaacw0g1blOkw==";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  cmakeFlags = [
+    # -DARM64=ON disables all targets that only build on 32-bit ARM; this allows
+    # the package to build on aarch64 and other architectures
+    "-DARM64=${if stdenv.hostPlatform.isAarch32 then "OFF" else "ON"}"
+    "-DVMCS_INSTALL_PREFIX=${placeholder "out"}"
+  ];
+
+  meta = with lib; {
+    description = "Userland tools & libraries for interfacing with Raspberry Pi hardware";
+    homepage = "https://github.com/raspberrypi/userland";
+    license = licenses.bsd3;
+    platforms = [ "armv6l-linux" "armv7l-linux" "aarch64-linux" "x86_64-linux" ];
+    maintainers = with maintainers; [ dezgeg tkerber ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/librasterlite2/default.nix b/nixpkgs/pkgs/development/libraries/librasterlite2/default.nix
new file mode 100644
index 000000000000..de9fa02d44db
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/librasterlite2/default.nix
@@ -0,0 +1,90 @@
+{ lib
+, stdenv
+, fetchurl
+, pkg-config
+, validatePkgConfig
+, cairo
+, curl
+, fontconfig
+, freetype
+, freexl
+, geos
+, giflib
+, libgeotiff
+, libjpeg
+, libpng
+, librttopo
+, libspatialite
+, libtiff
+, libwebp
+, libxml2
+, lz4
+, minizip
+, openjpeg
+, pixman
+, proj
+, sqlite
+, zstd
+, ApplicationServices
+}:
+
+stdenv.mkDerivation rec {
+  pname = "librasterlite2";
+  version = "1.1.0-beta1";
+
+  src = fetchurl {
+    url = "https://www.gaia-gis.it/gaia-sins/librasterlite2-sources/librasterlite2-${version}.tar.gz";
+    hash = "sha256-9yhM38B600OjFOSHjfAwCHSwFF2dMxsGOwlrSC5+RPQ=";
+  };
+
+  # Fix error: unknown type name 'time_t'
+  postPatch = ''
+    sed -i '49i #include <time.h>' headers/rasterlite2_private.h
+  '';
+
+  nativeBuildInputs = [
+    pkg-config
+    validatePkgConfig
+    geos # for geos-config
+  ];
+
+  buildInputs = [
+    cairo
+    curl
+    fontconfig
+    freetype
+    freexl
+    giflib
+    geos
+    libgeotiff
+    libjpeg
+    libpng
+    librttopo
+    libspatialite
+    libtiff
+    libwebp
+    libxml2
+    lz4
+    minizip
+    openjpeg
+    pixman
+    proj
+    sqlite
+    zstd
+  ] ++ lib.optional stdenv.isDarwin ApplicationServices;
+
+  enableParallelBuilding = true;
+
+  # Failed tests:
+  # - check_sql_stmt
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Advanced library supporting raster handling methods";
+    homepage = "https://www.gaia-gis.it/fossil/librasterlite2";
+    # They allow any of these
+    license = with licenses; [ gpl2Plus lgpl21Plus mpl11 ];
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ sikmir ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libraw/default.nix b/nixpkgs/pkgs/development/libraries/libraw/default.nix
new file mode 100644
index 000000000000..d8e9f1f5a2f5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libraw/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, lcms2
+, pkg-config
+
+# for passthru.tests
+, deepin
+, freeimage
+, hdrmerge
+, imagemagick
+, python3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libraw";
+  version = "0.21.2";
+
+  src = fetchFromGitHub {
+    owner = "LibRaw";
+    repo = "LibRaw";
+    rev = version;
+    hash = "sha256-p9CmOCulvV7+KKn1lXwpcysOo0+mD5UgPqy2ki0cIFE=";
+  };
+
+  outputs = [ "out" "lib" "dev" "doc" ];
+
+  propagatedBuildInputs = [ lcms2 ];
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  enableParallelBuilding = true;
+
+  passthru.tests = {
+    inherit imagemagick hdrmerge freeimage;
+    inherit (deepin) deepin-image-viewer;
+    inherit (python3.pkgs) rawkit;
+  };
+
+  meta = with lib; {
+    description = "Library for reading RAW files obtained from digital photo cameras (CRW/CR2, NEF, RAF, DNG, and others)";
+    homepage = "https://www.libraw.org/";
+    license = with licenses; [ cddl lgpl2Plus ];
+    platforms = platforms.unix;
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/libraw1394/default.nix b/nixpkgs/pkgs/development/libraries/libraw1394/default.nix
new file mode 100644
index 000000000000..184cb2e7de4a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libraw1394/default.nix
@@ -0,0 +1,18 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libraw1394";
+  version = "2.1.2";
+
+  src = fetchurl {
+    url = "mirror://kernel/linux/libs/ieee1394/${pname}-${version}.tar.gz";
+    sha256 = "0z5md84941ky5l7afayx2z6j0sk0mildxbjajq6niznd44ky7i6x";
+  };
+
+  meta = with lib; {
+    description = "Library providing direct access to the IEEE 1394 bus through the Linux 1394 subsystem's raw1394 user space interface";
+    homepage = "https://ieee1394.wiki.kernel.org/index.php/Libraries#libraw1394";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/librclone/default.nix b/nixpkgs/pkgs/development/libraries/librclone/default.nix
new file mode 100644
index 000000000000..bb3053e19d53
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/librclone/default.nix
@@ -0,0 +1,35 @@
+{ lib
+, stdenv
+, buildGoModule
+, rclone
+}:
+
+let
+  ext = stdenv.hostPlatform.extensions.sharedLibrary;
+in buildGoModule rec {
+  pname = "librclone";
+  inherit (rclone) version src vendorHash;
+
+  patches = rclone.patches or [ ];
+
+  buildPhase = ''
+    runHook preBuild
+    cd librclone
+    go build --buildmode=c-shared -o librclone${ext} github.com/rclone/rclone/librclone
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    install -Dt $out/lib librclone${ext}
+    install -Dt $out/include librclone.h
+    runHook postInstall
+  '';
+
+  meta = {
+    description = "Rclone as a C library";
+    homepage = "https://github.com/rclone/rclone/tree/master/librclone";
+    maintainers = with lib.maintainers; [ dotlambda ];
+    inherit (rclone.meta) license platforms;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/librdf/raptor.nix b/nixpkgs/pkgs/development/libraries/librdf/raptor.nix
new file mode 100644
index 000000000000..1dde9402f902
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/librdf/raptor.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchurl, libxml2, curl }:
+
+stdenv.mkDerivation rec {
+  pname = "raptor";
+  version = "1.4.21";
+
+  src = fetchurl {
+    url = "http://download.librdf.org/source/raptor-${version}.tar.gz";
+    sha256 = "db3172d6f3c432623ed87d7d609161973d2f7098e3d2233d0702fbcc22cfd8ca";
+  };
+
+  buildInputs = [ libxml2 curl ];
+
+  preBuild = ''
+    sed -e '/curl\/types/d' -i src/*.c src/*.h
+  '';
+
+  meta = {
+    description = "The RDF Parser Toolkit";
+    homepage = "https://librdf.org/raptor";
+    license = with lib.licenses; [ lgpl21 asl20 ];
+    maintainers = [ lib.maintainers.marcweber ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/librdf/raptor2.nix b/nixpkgs/pkgs/development/libraries/librdf/raptor2.nix
new file mode 100644
index 000000000000..4503a0cc43ed
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/librdf/raptor2.nix
@@ -0,0 +1,57 @@
+{ lib
+, stdenv
+, libxml2
+, libxslt
+, pkg-config
+, cmake
+, fetchFromGitHub
+, perl
+, bison
+, flex
+, fetchpatch
+, static ? stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+  pname = "raptor2";
+  version = "unstable-2022-06-06";
+
+  src = fetchFromGitHub {
+    owner = "dajobe";
+    repo = "raptor";
+    rev = "3cca62a33da68143b687c9e486eefc7c7cbb4586";
+    sha256 = "sha256-h03IyFH1GHPqajfHBBTb19lCEu+VXzQLGC1wiEGVvgY=";
+  };
+
+  cmakeFlags = [
+    # Build defaults to static libraries.
+    "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
+  ];
+
+  patches = [
+    # https://github.com/dajobe/raptor/pull/52
+    (fetchpatch {
+      name = "fix-cmake-generated-pc-file";
+      url = "https://github.com/dajobe/raptor/commit/fa1ef9a27d8762f5588ac2e92554a188e73dee9f.diff";
+      sha256 = "sha256-zXIbrYGgC9oTpiD0WUikT4vRdc9b6bsyfnDkwUSlqao=";
+    })
+    # pull upstream fix for libxml2-2.11 API compatibility:
+    #   https://github.com/dajobe/raptor/pull/58
+    (fetchpatch {
+      name = "libxml2-2.11.patch";
+      url = "https://github.com/dajobe/raptor/commit/4dbc4c1da2a033c497d84a1291c46f416a9cac51.patch";
+      hash = "sha256-fHfvncGymzMtxjwtakCNSr/Lem12UPIHAAcAac648w4=";
+    })
+  ];
+
+  nativeBuildInputs = [ pkg-config cmake perl bison flex ];
+  buildInputs = [ libxml2 libxslt ];
+
+  meta = {
+    description = "The RDF Parser Toolkit";
+    homepage = "https://librdf.org/raptor";
+    license = with lib.licenses; [ lgpl21 asl20 ];
+    maintainers = with lib.maintainers; [ marcweber ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/librdf/rasqal.nix b/nixpkgs/pkgs/development/libraries/librdf/rasqal.nix
new file mode 100644
index 000000000000..8d935bb08530
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/librdf/rasqal.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchurl, librdf_raptor2, gmp, pkg-config, pcre, libxml2, perl }:
+
+stdenv.mkDerivation rec {
+  pname = "rasqal";
+  version = "0.9.33";
+
+  src = fetchurl {
+    url = "http://download.librdf.org/source/rasqal-${version}.tar.gz";
+    sha256 = "0z6rrwn4jsagvarg8d5zf0j352kjgi33py39jqd29gbhcnncj939";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ gmp pcre libxml2 ];
+
+  propagatedBuildInputs = [ librdf_raptor2 ];
+
+  postInstall = "rm -rvf $out/share/gtk-doc";
+
+  nativeCheckInputs = [ perl ];
+  doCheck = false; # fails with "No testsuite plan file sparql-query-plan.ttl could be created in build/..."
+  doInstallCheck = false; # fails with "rasqal-config does not support (--help|--version)"
+
+  meta = {
+    description = "Library that handles Resource Description Framework (RDF)";
+    homepage = "https://librdf.org/rasqal";
+    license = with lib.licenses; [ lgpl21 asl20 ];
+    maintainers = with lib.maintainers; [ marcweber ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/librdf/redland.nix b/nixpkgs/pkgs/development/libraries/librdf/redland.nix
new file mode 100644
index 000000000000..252a5037f77c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/librdf/redland.nix
@@ -0,0 +1,48 @@
+{ lib, stdenv, fetchurl, pkg-config, openssl, libxslt, perl
+, curl, pcre, libxml2, librdf_rasqal, gmp
+, libmysqlclient, withMysql ? false
+, postgresql, withPostgresql ? false
+, sqlite, withSqlite ? true
+, db, withBdb ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "redland";
+  version = "1.0.17";
+
+  src = fetchurl {
+    url = "http://download.librdf.org/source/redland-${version}.tar.gz";
+    sha256 = "de1847f7b59021c16bdc72abb4d8e2d9187cd6124d69156f3326dd34ee043681";
+  };
+
+  nativeBuildInputs = [ perl pkg-config ];
+
+  buildInputs = [ openssl libxslt curl pcre libxml2 gmp ]
+    ++ lib.optional withMysql libmysqlclient
+    ++ lib.optional withSqlite sqlite
+    ++ lib.optional withPostgresql postgresql
+    ++ lib.optional withBdb db;
+
+  propagatedBuildInputs = [ librdf_rasqal ];
+
+  postInstall = "rm -rvf $out/share/gtk-doc";
+
+  configureFlags =
+    [ "--with-threads" ]
+    ++ lib.optionals withBdb [
+      "--with-bdb-include=${db.dev}/include"
+      "--with-bdb-lib=${db.out}/lib"
+    ];
+
+  # Fix broken DT_NEEDED in lib/redland/librdf_storage_sqlite.so.
+  NIX_CFLAGS_LINK = "-lraptor2";
+
+  doCheck = false; # fails 1 out of 17 tests with a segmentation fault
+
+  meta = with lib; {
+    description = "C libraries that provide support for the Resource Description Framework (RDF)";
+    homepage = "https://librdf.org/";
+    platforms = platforms.unix;
+    license = licenses.asl20;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libre/default.nix b/nixpkgs/pkgs/development/libraries/libre/default.nix
new file mode 100644
index 000000000000..92749a35e93a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libre/default.nix
@@ -0,0 +1,39 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, zlib
+, openssl
+, cmake
+, SystemConfiguration
+}:
+
+stdenv.mkDerivation rec {
+  version = "3.9.0";
+  pname = "libre";
+  src = fetchFromGitHub {
+    owner = "baresip";
+    repo = "re";
+    rev = "v${version}";
+    sha256 = "sha256-oFaCeVaUrAN83DT8m4gvXSaKzxq5AJw2RHwOelm8HAU=";
+  };
+
+  buildInputs = [
+    openssl
+    zlib
+  ] ++ lib.optionals stdenv.isDarwin [
+    SystemConfiguration
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  makeFlags = [ "USE_ZLIB=1" "USE_OPENSSL=1" "PREFIX=$(out)" ]
+    ++ lib.optional (stdenv.cc.cc != null) "SYSROOT_ALT=${stdenv.cc.cc}"
+    ++ lib.optional (stdenv.cc.libc != null) "SYSROOT=${lib.getDev stdenv.cc.libc}"
+  ;
+  enableParallelBuilding = true;
+  meta = {
+    description = "A library for real-time communications with async IO support and a complete SIP stack";
+    homepage = "https://github.com/baresip/re";
+    maintainers = with lib.maintainers; [ elohmeier raskin ];
+    license = lib.licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/librealsense/default.nix b/nixpkgs/pkgs/development/libraries/librealsense/default.nix
new file mode 100644
index 000000000000..fe35759da63a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/librealsense/default.nix
@@ -0,0 +1,89 @@
+{ stdenv
+, config
+, lib
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, libusb1
+, ninja
+, pkg-config
+, gcc
+, mesa
+, gtk3
+, glfw
+, libGLU
+, curl
+, cudaSupport ? config.cudaSupport, cudaPackages ? { }
+, enablePython ? false, pythonPackages ? null
+, enableGUI ? false,
+}:
+
+assert cudaSupport -> (cudaPackages?cudatoolkit && cudaPackages.cudatoolkit != null);
+assert enablePython -> pythonPackages != null;
+
+stdenv.mkDerivation rec {
+  pname = "librealsense";
+  version = "2.54.2";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "IntelRealSense";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-EbnIHnsUgsqN/SVv4m9H7K8gfwni+u82+M55QBstAGI=";
+  };
+
+  buildInputs = [
+    libusb1
+    gcc.cc.lib
+  ] ++ lib.optional cudaSupport cudaPackages.cudatoolkit
+    ++ lib.optionals enablePython (with pythonPackages; [ python pybind11 ])
+    ++ lib.optionals enableGUI [ mesa gtk3 glfw libGLU curl ];
+
+  patches = [
+    ./py_pybind11_no_external_download.patch
+    ./install-presets.patch
+    # https://github.com/IntelRealSense/librealsense/pull/11917
+    (fetchpatch {
+      name = "fix-gcc13-missing-cstdint.patch";
+      url = "https://github.com/IntelRealSense/librealsense/commit/b59b13671658910fc453a4a6bbd61f13ba6e83cc.patch";
+      hash = "sha256-zaW8HG8rfsApI5S/3x+x9Fx8xhyTIPNn/fJVFtkmlEA=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    ninja
+    pkg-config
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_EXAMPLES=ON"
+    "-DBUILD_GRAPHICAL_EXAMPLES=${lib.boolToString enableGUI}"
+    "-DBUILD_GLSL_EXTENSIONS=${lib.boolToString enableGUI}"
+    "-DCHECK_FOR_UPDATES=OFF" # activated by BUILD_GRAPHICAL_EXAMPLES, will make it download and compile libcurl
+  ] ++ lib.optionals enablePython [
+    "-DBUILD_PYTHON_BINDINGS:bool=true"
+    "-DXXNIX_PYTHON_SITEPACKAGES=${placeholder "out"}/${pythonPackages.python.sitePackages}"
+  ] ++ lib.optional cudaSupport "-DBUILD_WITH_CUDA:bool=true";
+
+  # ensure python package contains its __init__.py. for some reason the install
+  # script does not do this, and it's questionable if intel knows it should be
+  # done
+  # ( https://github.com/IntelRealSense/meta-intel-realsense/issues/20 )
+  postInstall = ''
+    substituteInPlace $out/lib/cmake/realsense2/realsense2Targets.cmake \
+    --replace "\''${_IMPORT_PREFIX}/include" "$dev/include"
+  '' + lib.optionalString enablePython  ''
+    cp ../wrappers/python/pyrealsense2/__init__.py $out/${pythonPackages.python.sitePackages}/pyrealsense2
+  '';
+
+  meta = with lib; {
+    description = "A cross-platform library for Intel® RealSense™ depth cameras (D400 series and the SR300)";
+    homepage = "https://github.com/IntelRealSense/librealsense";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ brian-dawn pbsds ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/librealsense/install-presets.patch b/nixpkgs/pkgs/development/libraries/librealsense/install-presets.patch
new file mode 100644
index 000000000000..347aa4345323
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/librealsense/install-presets.patch
@@ -0,0 +1,13 @@
+diff --git a/tools/realsense-viewer/CMakeLists.txt b/tools/realsense-viewer/CMakeLists.txt
+index 44be6278f..1a4531dff 100644
+--- a/tools/realsense-viewer/CMakeLists.txt
++++ b/tools/realsense-viewer/CMakeLists.txt
+@@ -253,7 +253,7 @@ install(
+ )
+ #https://cmake.org/cmake/help/latest/command/install.html
+ install(DIRECTORY presets/
+-    DESTINATION $ENV{HOME}/Documents/librealsense2/presets
++    DESTINATION $ENV{out}/share/librealsense2/presets
+     FILES_MATCHING PATTERN "*.preset"
+ )
+ endif()
diff --git a/nixpkgs/pkgs/development/libraries/librealsense/py_pybind11_no_external_download.patch b/nixpkgs/pkgs/development/libraries/librealsense/py_pybind11_no_external_download.patch
new file mode 100644
index 000000000000..c91945fa1523
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/librealsense/py_pybind11_no_external_download.patch
@@ -0,0 +1,15 @@
+diff --git a/CMake/global_config.cmake b/CMake/global_config.cmake
+index 350f7a268..2cf125c67 100644
+--- a/CMake/global_config.cmake
++++ b/CMake/global_config.cmake
+@@ -69,7 +69,8 @@ macro(global_set_flags)
+ 
+     if(BUILD_PYTHON_BINDINGS)
+         include(libusb_config)
+-        include(CMake/external_pybind11.cmake)
++        find_package(pybind11 REQUIRED)
++        set(PYTHON_INSTALL_DIR "${XXNIX_PYTHON_SITEPACKAGES}/pyrealsense2" CACHE PATH "Installation directory for Python bindings")
+     endif()
+ 
+     if(CHECK_FOR_UPDATES)
+
diff --git a/nixpkgs/pkgs/development/libraries/librecast/default.nix b/nixpkgs/pkgs/development/libraries/librecast/default.nix
new file mode 100644
index 000000000000..563a77f3a29c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/librecast/default.nix
@@ -0,0 +1,30 @@
+{
+  stdenv,
+  fetchFromGitea,
+  lcrq,
+  lib,
+  libsodium,
+}:
+stdenv.mkDerivation (finalAttrs: {
+  name = "librecast";
+  version = "0.7.0";
+
+  src = fetchFromGitea {
+    domain = "codeberg.org";
+    owner = "librecast";
+    repo = "librecast";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-NlwYJJn1yewx92y6UKJcj6R2MnPn+XuEiKOmsR2oE3g=";
+  };
+  buildInputs = [ lcrq libsodium ];
+  installFlags = [ "PREFIX=$(out)" ];
+
+  meta = {
+    changelog = "https://codeberg.org/librecast/librecast/src/tag/v${finalAttrs.version}/CHANGELOG.md";
+    description = "IPv6 multicast library";
+    homepage = "https://librecast.net/librecast.html";
+    license = [ lib.licenses.gpl2 lib.licenses.gpl3 ];
+    maintainers = with lib.maintainers; [ albertchae aynish DMills27 jasonodoom jleightcap ];
+    platforms = lib.platforms.gnu;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libredwg/default.nix b/nixpkgs/pkgs/development/libraries/libredwg/default.nix
new file mode 100644
index 000000000000..7759917d9750
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libredwg/default.nix
@@ -0,0 +1,80 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, autoreconfHook
+, writeShellScript
+, pkg-config
+, texinfo
+, pcre2
+, swig
+, libxml2
+, ncurses
+, enablePython ? false
+, python ? null
+}:
+let
+  isPython3 = enablePython && python.pythonAtLeast "3";
+in
+stdenv.mkDerivation rec {
+  pname = "libredwg";
+  version = "0.12.5.6313";
+
+  src = fetchFromGitHub {
+    owner = "LibreDWG";
+    repo = pname;
+    rev = version;
+    hash = "sha256-TM+cZ7N5PD6UG9cvy0XFa0sNYc3apbAJvEMh3husjRk=";
+    fetchSubmodules = true;
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "CVE-2023-26157.patch";
+      url = "https://github.com/LibreDWG/libredwg/commit/c8cf03ce4c2315b146caf582ea061c0460193bcc.patch";
+      hash = "sha256-EEF3YYPW+6SvXRiAw3zz6tWU9w/qmGtc09Tf8wn7hVc=";
+    })
+  ];
+
+  postPatch = let
+    printVersion = writeShellScript "print-version" ''
+      echo -n ${lib.escapeShellArg version}
+    '';
+  in ''
+    # avoid git dependency
+    cp ${printVersion} build-aux/git-version-gen
+    # failing to build otherwise since glibc-2.38
+    sed '1i#include <string.h>' -i programs/dwg2SVG.c
+  '';
+
+  preConfigure = lib.optionalString (stdenv.isDarwin && enablePython) ''
+    # prevent configure picking up stack_size from distutils.sysconfig
+    export PYTHON_EXTRA_LDFLAGS=" "
+  '';
+
+  nativeBuildInputs = [ autoreconfHook pkg-config texinfo ]
+    ++ lib.optional enablePython swig;
+
+  buildInputs = [ pcre2 ]
+    ++ lib.optionals enablePython [ python ]
+    # configurePhase fails with python 3 when ncurses is missing
+    ++ lib.optional isPython3 ncurses
+  ;
+
+  # prevent python tests from running when not building with python
+  configureFlags = lib.optional (!enablePython) "--disable-python";
+
+  # example_r13.dxf roundtrip fail: expect 5286, got 5285 entities
+  doCheck = !(stdenv.isLinux && stdenv.isAarch64);
+
+  # the "xmlsuite" test requires the libxml2 c library as well as the python module
+  nativeCheckInputs = lib.optionals enablePython [ libxml2 libxml2.dev ];
+
+  meta = with lib; {
+    description = "Free implementation of the DWG file format";
+    homepage = "https://savannah.gnu.org/projects/libredwg/";
+    maintainers = with maintainers; [ tweber ];
+    license = licenses.gpl3Plus;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/librelp/default.nix b/nixpkgs/pkgs/development/libraries/librelp/default.nix
new file mode 100644
index 000000000000..59836861e7cd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/librelp/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchFromGitHub
+, autoreconfHook
+, gnutls
+, openssl
+, pkg-config
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "librelp";
+  version = "1.11.0";
+
+  src = fetchFromGitHub {
+    owner = "rsyslog";
+    repo = "librelp";
+    rev = "v${version}";
+    sha256 = "sha256-VJlvFiOsIyiu0kBU8NkObtt9j2ElrSzJtvE8wtSlOus=";
+  };
+
+  nativeBuildInputs = [ pkg-config autoreconfHook ];
+  buildInputs = [ gnutls zlib openssl ];
+
+  meta = with lib; {
+    description = "A reliable logging library";
+    homepage = "https://www.librelp.com/";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/librem/default.nix b/nixpkgs/pkgs/development/libraries/librem/default.nix
new file mode 100644
index 000000000000..8a1d24948aa4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/librem/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, zlib, openssl, libre
+, cmake }:
+
+stdenv.mkDerivation rec {
+  version = "2.12.0";
+  pname = "librem";
+  src = fetchFromGitHub {
+    owner = "baresip";
+    repo = "rem";
+    rev = "v${version}";
+    sha256 = "sha256-MsXSUxFH89EqxMe4285xFV1Tsqmv2l5RnEeli48O3XQ=";
+  };
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ zlib openssl libre ];
+  cmakeFlags = [
+    "-DRE_INCLUDE_DIR=${libre}/include/re"
+  ];
+  makeFlags = [
+    "LIBRE_MK=${libre}/share/re/re.mk"
+    "PREFIX=$(out)"
+    "AR=${stdenv.cc.targetPrefix}ar"
+  ]
+  ++ lib.optional (stdenv.cc.cc != null) "SYSROOT_ALT=${lib.getDev stdenv.cc.cc}"
+  ++ lib.optional (stdenv.cc.libc != null) "SYSROOT=${lib.getDev stdenv.cc.libc}"
+  ;
+  enableParallelBuilding = true;
+  meta = {
+    description = "A library for real-time audio and video processing";
+    homepage = "https://github.com/baresip/rem";
+    maintainers = with lib.maintainers; [ elohmeier raskin ];
+    license = lib.licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libremidi/default.nix b/nixpkgs/pkgs/development/libraries/libremidi/default.nix
new file mode 100644
index 000000000000..3fad374e87be
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libremidi/default.nix
@@ -0,0 +1,44 @@
+{ alsa-lib
+, cmake
+, CoreAudio
+, CoreFoundation
+, CoreMIDI
+, CoreServices
+, fetchFromGitHub
+, lib
+, stdenv
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libremidi";
+  version = "4.2.4";
+
+  src = fetchFromGitHub {
+    owner = "jcelerier";
+    repo = "libremidi";
+    rev = "v${version}";
+    hash = "sha256-AWONCZa4tVZ7HMze9WSVzHQUXIrn1i6ZZ4Hgufkrep8=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = lib.optional stdenv.isLinux alsa-lib
+    ++ lib.optionals stdenv.isDarwin [
+    CoreAudio
+    CoreFoundation
+    CoreMIDI
+    CoreServices
+  ];
+
+  postInstall = ''
+    cp -r $src/include $out
+  '';
+
+  meta = {
+    description = "A modern C++ MIDI real-time & file I/O library";
+    homepage = "https://github.com/jcelerier/libremidi";
+    maintainers = [ ];
+    license = lib.licenses.bsd2;
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/librep/default.nix b/nixpkgs/pkgs/development/libraries/librep/default.nix
new file mode 100644
index 000000000000..84f610ce2474
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/librep/default.nix
@@ -0,0 +1,55 @@
+{ lib
+, stdenv
+, fetchurl
+, autoreconfHook
+, gdbm
+, gmp
+, libffi
+, pkg-config
+, readline
+, texinfo
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "librep";
+  version = "0.92.7";
+
+  src = fetchurl {
+    url = "https://download.tuxfamily.org/librep/librep_${finalAttrs.version}.tar.xz";
+    hash = "sha256-SKGWeax8BTCollfeGP/knFdZpf9w/IRJKLDl0AOVrK4=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+    texinfo
+  ];
+
+  buildInputs = [
+    gdbm
+    gmp
+    libffi
+    readline
+  ];
+
+  strictDeps = true;
+
+  # ensure libsystem/ctype functions don't get duplicated when using clang
+  configureFlags = lib.optionals stdenv.isDarwin [ "CFLAGS=-std=gnu89" ];
+
+  setupHook = ./setup-hook.sh;
+
+  meta = {
+    homepage = "http://sawfish.tuxfamily.org/";
+    description = "Fast, lightweight, and versatile Lisp environment";
+    longDescription = ''
+      librep is a Lisp system for UNIX, comprising an interpreter, a byte-code
+      compiler, and a virtual machine. It can serve as an application extension
+      language but is also suitable for standalone scripts.
+    '';
+    license = lib.licenses.gpl2Plus;
+    maintainers = [ lib.maintainers.AndersonTorres ];
+    platforms = lib.platforms.unix;
+  };
+})
+# TODO: investigate fetchFromGithub
diff --git a/nixpkgs/pkgs/development/libraries/librep/setup-hook.sh b/nixpkgs/pkgs/development/libraries/librep/setup-hook.sh
new file mode 100644
index 000000000000..4d875b693304
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/librep/setup-hook.sh
@@ -0,0 +1,5 @@
+addRepDLLoadPath () {
+    addToSearchPath REP_DL_LOAD_PATH $1/lib/rep
+}
+
+addEnvHooks "$hostOffset" addRepDLLoadPath
diff --git a/nixpkgs/pkgs/development/libraries/libresample/default.nix b/nixpkgs/pkgs/development/libraries/libresample/default.nix
new file mode 100644
index 000000000000..f466229cfe8e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libresample/default.nix
@@ -0,0 +1,29 @@
+{lib, stdenv, fetchurl, cmake}:
+
+let
+  patch = fetchurl {
+    url = "mirror://debian/pool/main/libr/libresample/libresample_0.1.3-3.diff.gz";
+    sha256 = "063w8rqxw87fc89gas47vk0ll7xl8cy7d8g70gm1l62bqkkajklx";
+  };
+in
+stdenv.mkDerivation rec {
+  pname = "libresample";
+  version = "0.1.3";
+  src = fetchurl {
+    url = "mirror://debian/pool/main/libr/libresample/libresample_${version}.orig.tar.gz";
+    sha256 = "05a8mmh1bw5afqx0kfdqzmph4x2npcs4idx0p0v6q95lwf22l8i0";
+  };
+  patches = [ patch ];
+  preConfigure = ''
+    cat debian/patches/1001_shlib-cmake.patch | patch -p1
+  '';
+  nativeBuildInputs = [ cmake ];
+
+  meta = {
+    description = "A real-time library for sampling rate conversion library";
+    license = lib.licenses.lgpl2Plus;
+    homepage = "https://ccrma.stanford.edu/~jos/resample/Free_Resampling_Software.html";
+    maintainers = [ lib.maintainers.sander ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libressl/default.nix b/nixpkgs/pkgs/development/libraries/libressl/default.nix
new file mode 100644
index 000000000000..740d84072d1e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libressl/default.nix
@@ -0,0 +1,117 @@
+{ stdenv
+, fetchurl
+, lib
+, cmake
+, cacert
+, fetchpatch
+, buildShared ? !stdenv.hostPlatform.isStatic
+}:
+
+let
+  ldLibPathEnvName = if stdenv.isDarwin
+    then "DYLD_LIBRARY_PATH"
+    else "LD_LIBRARY_PATH";
+
+  generic =
+    { version
+    , hash
+    , patches ? []
+    , knownVulnerabilities ? []
+    }: stdenv.mkDerivation rec
+  {
+    pname = "libressl";
+    inherit version;
+
+    src = fetchurl {
+      url = "mirror://openbsd/LibreSSL/${pname}-${version}.tar.gz";
+      inherit hash;
+    };
+
+    nativeBuildInputs = [ cmake ];
+
+    cmakeFlags = [
+      "-DENABLE_NC=ON"
+      # Ensure that the output libraries do not require an executable stack.
+      # Without this define, assembly files in libcrypto do not include a
+      # .note.GNU-stack section, and if that section is missing from any object,
+      # the linker will make the stack executable.
+      "-DCMAKE_C_FLAGS=-DHAVE_GNU_STACK"
+      # libressl will append this to the regular prefix for libdir
+      "-DCMAKE_INSTALL_LIBDIR=lib"
+    ] ++ lib.optional buildShared "-DBUILD_SHARED_LIBS=ON";
+
+    # The autoconf build is broken as of 2.9.1, resulting in the following error:
+    # libressl-2.9.1/tls/.libs/libtls.a', needed by 'handshake_table'.
+    # Fortunately LibreSSL provides a CMake build as well, so opt for CMake by
+    # removing ./configure pre-config.
+    preConfigure = ''
+      rm configure
+      substituteInPlace CMakeLists.txt \
+        --replace 'exec_prefix \''${prefix}' "exec_prefix ${placeholder "bin"}" \
+        --replace 'libdir      \''${exec_prefix}' 'libdir \''${prefix}'
+    '';
+
+    inherit patches;
+
+    # Since 2.9.x the default location can't be configured from the build using
+    # DEFAULT_CA_FILE anymore, instead we have to patch the default value.
+    postPatch = ''
+      patchShebangs tests/
+      ${lib.optionalString (lib.versionAtLeast version "2.9.2") ''
+        substituteInPlace ./tls/tls_config.c --replace '"/etc/ssl/cert.pem"' '"${cacert}/etc/ssl/certs/ca-bundle.crt"'
+      ''}
+    '';
+
+    doCheck = !(stdenv.hostPlatform.isPower64 || stdenv.hostPlatform.isRiscV);
+    preCheck = ''
+      export PREVIOUS_${ldLibPathEnvName}=$${ldLibPathEnvName}
+      export ${ldLibPathEnvName}="$${ldLibPathEnvName}:$(realpath tls/):$(realpath ssl/):$(realpath crypto/)"
+    '';
+    postCheck = ''
+      export ${ldLibPathEnvName}=$PREVIOUS_${ldLibPathEnvName}
+    '';
+
+    outputs = [ "bin" "dev" "out" "man" "nc" ];
+
+    postFixup = ''
+      moveToOutput "bin/nc" "$nc"
+      moveToOutput "bin/openssl" "$bin"
+      moveToOutput "bin/ocspcheck" "$bin"
+      moveToOutput "share/man/man1/nc.1.gz" "$nc"
+    '';
+
+    meta = with lib; {
+      description = "Free TLS/SSL implementation";
+      homepage    = "https://www.libressl.org";
+      license = with licenses; [ publicDomain bsdOriginal bsd0 bsd3 gpl3 isc openssl ];
+      platforms   = platforms.all;
+      maintainers = with maintainers; [ thoughtpolice fpletz ];
+      inherit knownVulnerabilities;
+
+      # OpenBSD believes that PowerPC should be always-big-endian;
+      # this assumption seems to have propagated into recent
+      # releases of libressl.  Since libressl is aliased to many
+      # other packages (e.g. netcat) it's important to fail early
+      # here, otherwise it's very difficult to figure out why
+      # libressl is getting dragged into a failing build.
+      badPlatforms = with lib.systems.inspect.patterns;
+        [ (lib.recursiveUpdate isPower64 isLittleEndian) ];
+    };
+  };
+
+in {
+  libressl_3_6 = generic {
+    version = "3.6.3";
+    hash = "sha256-h7G7426e7I0K5fBMg9NrLFsOWBeEx+sIFwJe0p6t6jc=";
+  };
+
+  libressl_3_7 = generic {
+    version = "3.7.3";
+    hash = "sha256-eUjIVqkMglvXJotvhWdKjc0lS65C4iF4GyTj+NwzXbM=";
+  };
+
+  libressl_3_8 = generic {
+    version = "3.8.2";
+    hash = "sha256-bUuNW7slofgzZjnlbsUIgFLUOpUlZpeoXEzpEyPCWVQ=";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/librest/1.0.nix b/nixpkgs/pkgs/development/libraries/librest/1.0.nix
new file mode 100644
index 000000000000..1e134f62bad7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/librest/1.0.nix
@@ -0,0 +1,99 @@
+{ lib
+, stdenv
+, fetchpatch
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, gi-docgen
+, glib
+, json-glib
+, libsoup_3
+, libxml2
+, gobject-introspection
+, gnome
+}:
+
+stdenv.mkDerivation rec {
+  pname = "rest";
+  version = "0.9.1";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "kmalwQ7OOD4ZPft/+we1CcwfUVIauNrXavlu0UISwuM=";
+  };
+
+  patches = [
+    # Pick up MR 30 (https://gitlab.gnome.org/GNOME/librest/-/merge_requests/30) to fix GOA crashes with libsoup 3
+    (fetchpatch {
+      url = "https://gitlab.gnome.org/GNOME/librest/-/commit/fbad64abe28a96f591a30e3a5d3189c10172a414.patch";
+      hash = "sha256-r8+h84Y/AdM1IOMRcBVwDvfqapqOY8ZtRXdOIQvFR9w=";
+    })
+    (fetchpatch {
+      url = "https://gitlab.gnome.org/GNOME/librest/-/commit/8049048a0f7d52b3f4101c7123797fed099d4cc8.patch";
+      hash = "sha256-AMhHKzzOoTIlkRwN4KfUwdhxlqvtRgiVjKRfnG7KZwc=";
+    })
+  ];
+
+  strictDeps = true;
+  depsBuildBuild = [ pkg-config ];
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gi-docgen
+    gobject-introspection
+  ];
+
+  propagatedBuildInputs = [
+    glib
+    json-glib
+    libsoup_3
+    libxml2
+  ];
+
+  mesonFlags = [
+    "-Dexamples=false"
+
+    # Remove when https://gitlab.gnome.org/GNOME/librest/merge_requests/2 is merged.
+    "-Dca_certificates=true"
+    "-Dca_certificates_path=/etc/ssl/certs/ca-certificates.crt"
+  ];
+
+  postPatch = ''
+    # https://gitlab.gnome.org/GNOME/librest/-/merge_requests/19
+    substituteInPlace meson.build \
+      --replace "con." "conf."
+
+    # Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake)
+    # it should be a build-time dep for build
+    # TODO: send upstream
+    substituteInPlace docs/meson.build \
+      --replace "'gi-docgen', ver" "'gi-docgen', native:true, ver"
+  '';
+
+  postFixup = ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  separateDebugInfo = true;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      attrPath = "librest_1_0";
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    description = "Helper library for RESTful services";
+    homepage = "https://wiki.gnome.org/Projects/Librest";
+    license = licenses.lgpl21Only;
+    platforms = platforms.unix;
+    maintainers = teams.gnome.members;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/librest/default.nix b/nixpkgs/pkgs/development/libraries/librest/default.nix
new file mode 100644
index 000000000000..19f7ced5986f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/librest/default.nix
@@ -0,0 +1,63 @@
+{ lib
+, stdenv
+, fetchurl
+, pkg-config
+, glib
+, libsoup
+, libxml2
+, gobject-introspection
+, gtk-doc
+, docbook-xsl-nons
+, docbook_xml_dtd_412
+, gnome
+}:
+
+stdenv.mkDerivation rec {
+  pname = "rest";
+  version = "0.8.1";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "0513aad38e5d3cedd4ae3c551634e3be1b9baaa79775e53b2dba9456f15b01c9";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+    gobject-introspection
+  ] ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [
+    gtk-doc
+    docbook-xsl-nons
+    docbook_xml_dtd_412
+  ];
+
+  propagatedBuildInputs = [
+    glib
+    libsoup
+    libxml2
+  ];
+
+  configureFlags = [
+    (lib.enableFeature (stdenv.hostPlatform == stdenv.buildPlatform) "gtk-doc")
+    # Remove when https://gitlab.gnome.org/GNOME/librest/merge_requests/2 is merged.
+    "--with-ca-certificates=/etc/ssl/certs/ca-certificates.crt"
+  ];
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      attrPath = "librest";
+      versionPolicy = "odd-unstable";
+      freeze = true;
+    };
+  };
+
+  meta = with lib; {
+    description = "Helper library for RESTful services";
+    homepage = "https://wiki.gnome.org/Projects/Librest";
+    license = licenses.lgpl21Only;
+    platforms = platforms.unix;
+    maintainers = teams.gnome.members;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/librevenge/default.nix b/nixpkgs/pkgs/development/libraries/librevenge/default.nix
new file mode 100644
index 000000000000..1dd71d1e311b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/librevenge/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchurl, boost, pkg-config, cppunit, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "librevenge";
+  version = "0.0.5";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/libwpd/librevenge/librevenge-${version}/librevenge-${version}.tar.xz";
+    sha256 = "sha256-EG0MRLtkCLE0i54EZWZvqDuBYXdmWiLNAX6IbBqu6zQ=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [
+    boost
+    cppunit
+    zlib
+  ];
+
+  # Clang and gcc-7 generate warnings, and
+  # -Werror causes these warnings to be interpreted as errors
+  # Simplest solution: disable -Werror
+  configureFlags = [ "--disable-werror" ];
+
+  # Fix an issue with boost 1.59
+  # This is fixed upstream so please remove this when updating
+  postPatch = ''
+    sed -i 's,-DLIBREVENGE_BUILD,\0 -DBOOST_ERROR_CODE_HEADER_ONLY,g' src/lib/Makefile.in
+  '';
+
+  meta = with lib; {
+    description = "A base library for writing document import filters";
+    license = licenses.mpl20;
+    maintainers = with maintainers; [ raskin ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/librime/default.nix b/nixpkgs/pkgs/development/libraries/librime/default.nix
new file mode 100644
index 000000000000..95d88384b79e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/librime/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchFromGitHub, cmake, boost, glog, leveldb, marisa, opencc,
+  yaml-cpp, gtest, capnproto, pkg-config, plugins ? [ ] }:
+
+let
+  copySinglePlugin = plug: "cp -r ${plug} plugins/${plug.name}";
+  copyPlugins = ''
+    mkdir -p plugins
+    ${lib.concatMapStringsSep "\n" copySinglePlugin plugins}
+    chmod +w -R plugins/*
+  '';
+in
+stdenv.mkDerivation rec {
+  pname = "librime";
+  version = "1.10.0";
+
+  src = fetchFromGitHub {
+    owner = "rime";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-tflWBfH1+1AFvkq0A6mgsKl+jq6m5c83GA56LWxdnlw=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [ boost glog leveldb marisa opencc yaml-cpp gtest capnproto ]
+              ++ plugins; # for propagated build inputs
+
+  preConfigure = copyPlugins;
+
+  meta = with lib; {
+    homepage    = "https://rime.im/";
+    description = "Rime Input Method Engine, the core library";
+    license     = licenses.bsd3;
+    maintainers = with maintainers; [ vonfry ];
+    platforms   = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/librist/darwin.patch b/nixpkgs/pkgs/development/libraries/librist/darwin.patch
new file mode 100644
index 000000000000..6a5cc8459a36
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/librist/darwin.patch
@@ -0,0 +1,16 @@
+diff --git a/tools/srp_shared.c b/tools/srp_shared.c
+index f782126..23e82a5 100644
+--- a/tools/srp_shared.c
++++ b/tools/srp_shared.c
+@@ -173,7 +173,11 @@ void user_verifier_lookup(char * username,
+ 	if (stat(srpfile, &buf) != 0)
+ 		return;
+ 
++#if defined(__APPLE__)
++	*generation = ((uint64_t)buf.st_mtimespec.tv_sec << 32) | buf.st_mtimespec.tv_nsec;
++#else
+ 	*generation = ((uint64_t)buf.st_mtim.tv_sec << 32) | buf.st_mtim.tv_nsec;
++#endif
+ #endif
+ 
+ 	if (!lookup_data || !hashversion)
diff --git a/nixpkgs/pkgs/development/libraries/librist/default.nix b/nixpkgs/pkgs/development/libraries/librist/default.nix
new file mode 100644
index 000000000000..3f56ff324876
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/librist/default.nix
@@ -0,0 +1,48 @@
+{ stdenv
+, lib
+, fetchFromGitLab
+, meson
+, ninja
+, pkg-config
+, cjson
+, cmocka
+, mbedtls
+}:
+
+stdenv.mkDerivation rec {
+  pname = "librist";
+  version = "0.2.10";
+
+  src = fetchFromGitLab {
+    domain = "code.videolan.org";
+    owner = "rist";
+    repo = "librist";
+    rev = "v${version}";
+    hash = "sha256-8N4wQXxjNZuNGx/c7WVAV5QS48Bff5G3t11UkihT+K0=";
+  };
+
+  patches = [
+    # https://github.com/NixOS/nixpkgs/pull/257020
+    ./darwin.patch
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+  ];
+
+  buildInputs = [
+    cjson
+    cmocka
+    mbedtls
+  ];
+
+  meta = with lib; {
+    description = "A library that can be used to easily add the RIST protocol to your application.";
+    homepage = "https://code.videolan.org/rist/librist";
+    license = with licenses; [ bsd2 mit isc ];
+    maintainers = with maintainers; [ raphaelr sebtm ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libroxml/default.nix b/nixpkgs/pkgs/development/libraries/libroxml/default.nix
new file mode 100644
index 000000000000..647e4c188a05
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libroxml/default.nix
@@ -0,0 +1,20 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libroxml";
+  version = "2.3.0";
+
+  src = fetchurl {
+    url = "http://download.libroxml.net/pool/v2.x/libroxml-${version}.tar.gz";
+    sha256  = "0y0vc9n4rfbimjp28nx4kdfzz08j5xymh5xjy84l9fhfac5z5a0x";
+  };
+
+  meta = with lib; {
+    description = "This library is minimum, easy-to-use, C implementation for xml file parsing";
+    homepage = "https://www.libroxml.net/";
+    license = licenses.lgpl3;
+    maintainers = with maintainers; [ mpickering ];
+    mainProgram = "roxml";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/librsb/default.nix b/nixpkgs/pkgs/development/libraries/librsb/default.nix
new file mode 100644
index 000000000000..d9dc209a7139
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/librsb/default.nix
@@ -0,0 +1,88 @@
+{ lib, stdenv, fetchurl
+, gfortran
+, pkg-config, libtool
+, m4, gnum4
+, file
+# Memory Hierarchy (End-user can provide this.)
+, memHierarchy ? ""
+# Headers/Libraries
+, blas, zlib
+# RPC headers (rpc/xdr.h)
+, openmpi
+, help2man
+, doxygen
+, octave
+}:
+
+stdenv.mkDerivation rec {
+  pname = "librsb";
+  version = "1.2.0.10";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
+    sha256 = "sha256-7Enz94p8Q/yeEJdlk9EAqkmxhjMJ7Y+jzLt6rVLS97g=";
+  };
+
+  # The default configure flags are still present when building
+  # --disable-static --disable-dependency-tracking
+  # Along with the --prefix=... flag (but we want that one).
+  configureFlags = [
+    "--enable-static"
+    "--enable-doc-build"
+    "--enable-octave-testing"
+    "--enable-sparse-blas-interface"
+    "--enable-fortran-module-install"
+    "--enable-pkg-config-install"
+    "--enable-matrix-types=all"
+    "--with-zlib=${zlib}/lib/libz.so"
+    "--with-memhinfo=${memHierarchy}"
+  ];
+
+  # Ensure C/Fortran code is position-independent.
+  env.NIX_CFLAGS_COMPILE = toString [ "-fPIC" "-Ofast" ];
+  FCFLAGS = [ "-fPIC" "-Ofast" ];
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [
+    gfortran
+    pkg-config libtool
+    m4 gnum4
+    file
+    blas zlib
+    openmpi
+    octave
+    help2man # Turn "--help" into a man-page
+    doxygen # Build documentation
+  ];
+
+  # Need to run cleanall target to remove any previously-generated files.
+  preBuild = ''
+    make cleanall
+  '';
+
+  nativeCheckInputs = [
+    octave
+  ];
+  checkTarget = "tests";
+
+  meta = with lib; {
+    homepage = "https://librsb.sourceforge.net/";
+    description = "Shared memory parallel sparse matrix and sparse BLAS library";
+    longDescription = ''
+      Library for sparse matrix computations featuring the Recursive Sparse
+      Blocks (RSB) matrix format. This format allows cache efficient and
+      multi-threaded (that is, shared memory parallel) operations on large
+      sparse matrices.
+      librsb implements the Sparse BLAS standard, as specified in the BLAS
+      Forum documents.
+      Contains libraries and header files for developing applications that
+      want to make use of librsb.
+    '';
+    license = with licenses; [ lgpl3Plus ];
+    maintainers = with maintainers; [ KarlJoad ];
+    platforms = platforms.all;
+    # ./rsb_common.h:56:10: fatal error: 'omp.h' file not found
+    broken = stdenv.isDarwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/librseq/default.nix b/nixpkgs/pkgs/development/libraries/librseq/default.nix
new file mode 100644
index 000000000000..890c0dd25ff2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/librseq/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, fetchFromGitHub
+, autoreconfHook, linuxHeaders
+}:
+
+stdenv.mkDerivation rec {
+  pname = "librseq";
+  version = "0.1.0pre71_${builtins.substring 0 7 src.rev}";
+
+  src = fetchFromGitHub {
+    owner  = "compudj";
+    repo   = "librseq";
+    rev    = "170f840b498e1aff068b90188727a656111bfc2f";
+    sha256 = "0rdx59y8y9x8cfmmx5gl66gibkzpk3kw5lrrqhrxan8zr37a055y";
+  };
+
+  outputs = [ "out" "dev" "man" ];
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ linuxHeaders ];
+
+  installTargets = [ "install" "install-man" ];
+
+  doCheck = true;
+  separateDebugInfo = true;
+  enableParallelBuilding = true;
+
+  patchPhase = ''
+    patchShebangs tests
+  '';
+
+  # The share/ subdir only contains a doc/ with a README.md that just describes
+  # how to compile the library, which clearly isn't very useful! So just get
+  # rid of it anyway.
+  postInstall = ''
+    rm -rf $out/share
+  '';
+
+  meta = with lib; {
+    description = "Userspace library for the Linux Restartable Sequence API";
+    homepage    = "https://github.com/compudj/librseq";
+    license     = licenses.lgpl21Only;
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ thoughtpolice ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/librsvg/default.nix b/nixpkgs/pkgs/development/libraries/librsvg/default.nix
new file mode 100644
index 000000000000..415f097f3318
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/librsvg/default.nix
@@ -0,0 +1,226 @@
+{ lib
+, stdenv
+, fetchurl
+, pkg-config
+, glib
+, gdk-pixbuf
+, installShellFiles
+, pango
+, cairo
+, libxml2
+, bzip2
+, libintl
+, ApplicationServices
+, Foundation
+, libobjc
+, rustPlatform
+, rustc
+, cargo-auditable-cargo-wrapper
+, gi-docgen
+, python3Packages
+, gnome
+, vala
+, writeScript
+, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
+, buildPackages
+, gobject-introspection
+, _experimental-update-script-combinators
+, common-updater-scripts
+, jq
+, nix
+
+# for passthru.tests
+, enlightenment
+, ffmpeg
+, gegl
+, gimp
+, imagemagick
+, imlib2
+, vips
+, xfce
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "librsvg";
+  version = "2.57.1";
+
+  outputs = [ "out" "dev" ] ++ lib.optionals withIntrospection [
+    "devdoc"
+  ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/librsvg/${lib.versions.majorMinor finalAttrs.version}/librsvg-${finalAttrs.version}.tar.xz";
+    hash = "sha256-B0Zxo+1vvNZ8ripA5TkQf08JfKikqxqJTAXiUk/zQO8=";
+  };
+
+  cargoDeps = rustPlatform.fetchCargoTarball {
+    inherit (finalAttrs) src;
+    name = "librsvg-deps-${finalAttrs.version}";
+    hash = "sha256-zICI7sps5KYe8/yWXbCJv529KxGLjoyDOmpCgVAIsTs=";
+    # TODO: move this to fetchCargoTarball
+    dontConfigure = true;
+  };
+
+  strictDeps = true;
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    gdk-pixbuf
+    installShellFiles
+    pkg-config
+    rustc
+    cargo-auditable-cargo-wrapper
+    python3Packages.docutils
+    vala
+    rustPlatform.cargoSetupHook
+  ] ++ lib.optionals withIntrospection [
+    gobject-introspection
+    gi-docgen
+  ];
+
+  buildInputs = [
+    libxml2
+    bzip2
+    pango
+    libintl
+    vala # for share/vala/Makefile.vapigen
+  ] ++ lib.optionals stdenv.isDarwin [
+    ApplicationServices
+    Foundation
+    libobjc
+  ];
+
+  propagatedBuildInputs = [
+    glib
+    gdk-pixbuf
+    cairo
+  ];
+
+  configureFlags = [
+    (lib.enableFeature withIntrospection "introspection")
+    (lib.enableFeature withIntrospection "vala")
+
+    "--enable-always-build-tests"
+  ] ++ lib.optional stdenv.isDarwin "--disable-Bsymbolic"
+    ++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "RUST_TARGET=${stdenv.hostPlatform.rust.rustcTarget}";
+
+  doCheck = false; # all tests fail on libtool-generated rsvg-convert not being able to find coreutils
+
+  GDK_PIXBUF_QUERYLOADERS = writeScript "gdk-pixbuf-loader-loaders-wrapped" ''
+    ${lib.optionalString (stdenv.hostPlatform.emulatorAvailable buildPackages) (stdenv.hostPlatform.emulator buildPackages)} ${lib.getDev gdk-pixbuf}/bin/gdk-pixbuf-query-loaders
+  '';
+
+  # librsvg only links Foundation, but it also requiers libobjc. The Framework.tbd in the 11.0 SDK
+  # reexports libobjc, but the one in the 10.12 SDK does not, so link it manually.
+  env = lib.optionalAttrs (stdenv.isDarwin && stdenv.isx86_64) {
+    NIX_LDFLAGS = "-lobjc";
+  };
+
+  preConfigure = ''
+    PKG_CONFIG_VAPIGEN_VAPIGEN="$(type -p vapigen)"
+    export PKG_CONFIG_VAPIGEN_VAPIGEN
+  '';
+
+  # It wants to add loaders and update the loaders.cache in gdk-pixbuf
+  # Patching the Makefiles to it creates rsvg specific loaders and the
+  # relevant loader.cache here.
+  # The loaders.cache can be used by setting GDK_PIXBUF_MODULE_FILE to
+  # point to this file in a wrapper.
+  postConfigure = ''
+    GDK_PIXBUF=$out/lib/gdk-pixbuf-2.0/2.10.0
+    mkdir -p $GDK_PIXBUF/loaders
+    sed -i gdk-pixbuf-loader/Makefile \
+      -e "s#gdk_pixbuf_moduledir = .*#gdk_pixbuf_moduledir = $GDK_PIXBUF/loaders#" \
+      -e "s#gdk_pixbuf_cache_file = .*#gdk_pixbuf_cache_file = $GDK_PIXBUF/loaders.cache#" \
+      -e "s#\$(GDK_PIXBUF_QUERYLOADERS)#GDK_PIXBUF_MODULEDIR=$GDK_PIXBUF/loaders \$(GDK_PIXBUF_QUERYLOADERS)#"
+
+    # Fix thumbnailer path
+    sed -e "s#@bindir@\(/gdk-pixbuf-thumbnailer\)#${gdk-pixbuf}/bin\1#g" \
+        -i gdk-pixbuf-loader/librsvg.thumbnailer.in
+
+    # 'error: linker `cc` not found' when cross-compiling
+    export RUSTFLAGS="-Clinker=$CC"
+  '' + lib.optionalString ((stdenv.buildPlatform != stdenv.hostPlatform) && (stdenv.hostPlatform.emulatorAvailable buildPackages)) ''
+    # the replacement is the native conditional
+    substituteInPlace gdk-pixbuf-loader/Makefile \
+      --replace 'RUN_QUERY_LOADER_TEST = false' 'RUN_QUERY_LOADER_TEST = test -z "$(DESTDIR)"' \
+  '';
+
+  # Not generated when cross compiling.
+  postInstall = let emulator = stdenv.hostPlatform.emulator buildPackages; in
+    lib.optionalString (stdenv.hostPlatform.emulatorAvailable buildPackages) ''
+      # Merge gdkpixbuf and librsvg loaders
+      cat ${lib.getLib gdk-pixbuf}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache $GDK_PIXBUF/loaders.cache > $GDK_PIXBUF/loaders.cache.tmp
+      mv $GDK_PIXBUF/loaders.cache.tmp $GDK_PIXBUF/loaders.cache
+
+      installShellCompletion --cmd rsvg-convert \
+        --bash <(${emulator} $out/bin/rsvg-convert --completion bash) \
+        --fish <(${emulator} $out/bin/rsvg-convert --completion fish) \
+        --zsh <(${emulator} $out/bin/rsvg-convert --completion zsh)
+    '';
+
+  postFixup = lib.optionalString withIntrospection ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  passthru = {
+    updateScript =
+      let
+        updateSource = gnome.updateScript {
+          packageName = "librsvg";
+        };
+
+        updateLockfile = {
+          command = [
+            "sh"
+            "-c"
+            ''
+              PATH=${lib.makeBinPath [
+                common-updater-scripts
+                jq
+                nix
+              ]}
+              # update-source-version does not allow updating to the same version so we need to clear it temporarily.
+              # Get the current version so that we can restore it later.
+              latestVersion=$(nix-instantiate --eval -A librsvg.version | jq --raw-output)
+              # Clear the version. Provide hash so that we do not need to do pointless TOFU.
+              # Needs to be a fake SRI hash that is non-zero, since u-s-v uses zero as a placeholder.
+              # Also cannot be here verbatim or u-s-v would be confused what to replace.
+              update-source-version librsvg 0 "sha256-${lib.fixedWidthString 44 "B" "="}" --source-key=cargoDeps > /dev/null
+              update-source-version librsvg "$latestVersion" --source-key=cargoDeps > /dev/null
+            ''
+          ];
+          # Experimental feature: do not copy!
+          supportedFeatures = [ "silent" ];
+        };
+      in
+      _experimental-update-script-combinators.sequence [
+        updateSource
+        updateLockfile
+      ];
+    tests = {
+      inherit
+        gegl
+        gimp
+        imagemagick
+        imlib2
+        vips;
+      inherit (enlightenment) efl;
+      inherit (xfce) xfwm4;
+      ffmpeg = ffmpeg.override { withSvg = true; };
+    };
+  };
+
+  meta = with lib; {
+    description = "A small library to render SVG images to Cairo surfaces";
+    homepage = "https://wiki.gnome.org/Projects/LibRsvg";
+    license = licenses.lgpl2Plus;
+    maintainers = teams.gnome.members;
+    mainProgram = "rsvg-convert";
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/librsync/default.nix b/nixpkgs/pkgs/development/libraries/librsync/default.nix
new file mode 100644
index 000000000000..5139c397de3a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/librsync/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub, cmake, perl, zlib, bzip2, popt }:
+
+stdenv.mkDerivation rec {
+  pname = "librsync";
+  version = "2.3.4";
+
+  src = fetchFromGitHub {
+    owner = "librsync";
+    repo = "librsync";
+    rev = "v${version}";
+    sha256 = "sha256-fiOby8tOhv0KJ+ZwAWfh/ynqHlYC9kNqKfxNl3IhzR8=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ perl zlib bzip2 popt ];
+
+  dontStrip = stdenv.hostPlatform != stdenv.buildPlatform;
+
+  meta = with lib; {
+    description = "Implementation of the rsync remote-delta algorithm";
+    homepage = "https://librsync.sourceforge.net/";
+    changelog = "https://github.com/librsync/librsync/releases/tag/v${version}";
+    license = licenses.lgpl2Plus;
+    mainProgram = "rdiff";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/librtprocess/default.nix b/nixpkgs/pkgs/development/libraries/librtprocess/default.nix
new file mode 100644
index 000000000000..dabb5e62e45d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/librtprocess/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, cmake, llvmPackages }:
+
+stdenv.mkDerivation rec {
+  pname = "librtprocess";
+  version = "0.12.0";
+
+  src = fetchFromGitHub {
+    owner = "CarVac";
+    repo = "librtprocess";
+    rev = version;
+    hash = "sha256-/1o6SWUor+ZBQ6RsK2PoDRu03jcVRG58PNYFttriH2w=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = lib.optionals stdenv.isDarwin [ llvmPackages.openmp ];
+
+  meta = with lib; {
+    description = "Highly optimized library for processing RAW images";
+    homepage = "https://github.com/CarVac/librtprocess";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ hjones2199 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/librttopo/default.nix b/nixpkgs/pkgs/development/libraries/librttopo/default.nix
new file mode 100644
index 000000000000..5d768db366df
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/librttopo/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, stdenv
+, fetchFromGitea
+, autoreconfHook
+, validatePkgConfig
+, geos
+}:
+
+stdenv.mkDerivation rec {
+  pname = "librttopo";
+  version = "1.1.0";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitea {
+    domain = "git.osgeo.org/gitea";
+    owner = "rttopo";
+    repo = "librttopo";
+    rev = "librttopo-${version}";
+    sha256 = "0h7lzlkn9g4xky6h81ndy0aa6dxz8wb6rnl8v3987jy1i6pr072p";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    validatePkgConfig
+    geos # for geos-config
+  ];
+
+  buildInputs = [ geos ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "RT Topology Library";
+    homepage = "https://git.osgeo.org/gitea/rttopo/librttopo";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; teams.geospatial.members ++ [ dotlambda ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libs3/default.nix b/nixpkgs/pkgs/development/libraries/libs3/default.nix
new file mode 100644
index 000000000000..b9f9278fad8c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libs3/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, curl, libxml2 }:
+
+stdenv.mkDerivation {
+  pname = "libs3";
+  version = "unstable-2019-04-10";
+
+  src = fetchFromGitHub {
+    owner = "bji";
+    repo = "libs3";
+    rev = "287e4bee6fd430ffb52604049de80a27a77ff6b4";
+    hash = "sha256-xgiY8oJlRMiXB1fw5dhNidfaq18YVwaJ8aErKU11O6U=";
+  };
+
+  patches = [
+    (fetchpatch { # Fix compilation with openssl 3.0
+      url = "https://github.com/bji/libs3/pull/112/commits/3c3a1cf915e62b730db854d8007ba835cb38677c.patch";
+      hash = "sha256-+rWRh8dOznHlamc/T9qbgN0E2Rww3Hn94UeErxNDccs=";
+    })
+  ];
+
+  buildInputs = [ curl libxml2 ];
+
+  makeFlags = [ "DESTDIR=${placeholder "out"}" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/bji/libs3";
+    description = "A library for interfacing with amazon s3";
+    license = licenses.lgpl3Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libsamplerate/default.nix b/nixpkgs/pkgs/development/libraries/libsamplerate/default.nix
new file mode 100644
index 000000000000..5f0863bc49c8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsamplerate/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchurl, pkg-config, libsndfile, ApplicationServices, Carbon, CoreServices }:
+
+let
+  inherit (lib) optionals optionalString;
+
+in stdenv.mkDerivation rec {
+  pname = "libsamplerate";
+  version = "0.1.9";
+
+  src = fetchurl {
+    url = "http://www.mega-nerd.com/SRC/${pname}-${version}.tar.gz";
+    sha256 = "1ha46i0nbibq0pl0pjwcqiyny4hj8lp1bnl4dpxm64zjw9lb2zha";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libsndfile ]
+    ++ optionals stdenv.isDarwin [ ApplicationServices CoreServices ];
+
+  configureFlags = [ "--disable-fftw" ];
+
+  outputs = [ "bin" "dev" "out" ];
+
+  postConfigure = optionalString stdenv.isDarwin ''
+    # need headers from the Carbon.framework in /System/Library/Frameworks to
+    # compile this on darwin -- not sure how to handle
+    NIX_CFLAGS_COMPILE+=" -I${Carbon}/Library/Frameworks/Carbon.framework/Headers"
+
+    substituteInPlace examples/Makefile --replace "-fpascal-strings" ""
+  '';
+
+  meta = with lib; {
+    description = "Sample Rate Converter for audio";
+    homepage    = "http://www.mega-nerd.com/SRC/index.html";
+    license     = licenses.bsd2;
+    maintainers = with maintainers; [ lovek323 ];
+    platforms   = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libsass/default.nix b/nixpkgs/pkgs/development/libraries/libsass/default.nix
new file mode 100644
index 000000000000..57e58adb8c7e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsass/default.nix
@@ -0,0 +1,57 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, autoreconfHook
+, testers
+
+# for passthru.tests
+, gtk3
+, gtk4
+, sassc
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libsass";
+  version = "3.6.5"; # also check sassc for updates
+
+  src = fetchFromGitHub {
+    owner = "sass";
+    repo = finalAttrs.pname;
+    rev = finalAttrs.version;
+    sha256 = "1cxj6r85d5f3qxdwzxrmkx8z875hig4cr8zsi30w6vj23cyds3l2";
+    # Remove unicode file names which leads to different checksums on HFS+
+    # vs. other filesystems because of unicode normalisation.
+    postFetch = ''
+      rm -r $out/test/e2e/unicode-pwd
+    '';
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "CVE-2022-26592.CVE-2022-43357.CVE-2022-43358.patch";
+      url = "https://github.com/sass/libsass/pull/3184/commits/5bb0ea0c4b2ebebe542933f788ffacba459a717a.patch";
+      hash = "sha256-DR6pKFWL70uJt//drzq34LeTzT8rUqgUTpgfUHpD2s4=";
+    })
+  ];
+
+  preConfigure = ''
+    export LIBSASS_VERSION=${finalAttrs.version}
+  '';
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  passthru.tests = {
+    inherit gtk3 gtk4 sassc;
+    pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+  };
+
+  meta = with lib; {
+    description = "A C/C++ implementation of a Sass compiler";
+    homepage = "https://github.com/sass/libsass";
+    license = licenses.mit;
+    maintainers = with maintainers; [ codyopel offline ];
+    pkgConfigModules = [ "libsass" ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libsbsms/common.nix b/nixpkgs/pkgs/development/libraries/libsbsms/common.nix
new file mode 100644
index 000000000000..f206f68de42a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsbsms/common.nix
@@ -0,0 +1,36 @@
+{ lib
+, stdenv
+, fetchurl
+, substituteAll
+, pname
+, version
+, url
+, sha256
+, homepage
+}:
+
+stdenv.mkDerivation rec {
+  inherit pname version;
+
+  src = fetchurl {
+    inherit url sha256;
+  };
+
+  patches = [
+    # Fix buidling on platforms other than x86
+    (substituteAll {
+      src = ./configure.patch;
+      msse = lib.optionalString stdenv.isx86_64 "-msse";
+    })
+  ];
+
+  doCheck = true;
+
+  meta = {
+    inherit homepage;
+    description = "Subband sinusoidal modeling library for time stretching and pitch scaling audio";
+    maintainers =  with lib.maintainers; [ yuu ];
+    license = lib.licenses.gpl2;
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libsbsms/configure.patch b/nixpkgs/pkgs/development/libraries/libsbsms/configure.patch
new file mode 100644
index 000000000000..cfb9d2d08e6b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsbsms/configure.patch
@@ -0,0 +1,22 @@
+diff --git a/configure b/configure
+index 3d40335..faa3ac6 100755
+--- a/configure
++++ b/configure
+@@ -14722,7 +14722,7 @@ if ${ax_cv_cxx_flags__msse+:} false; then :
+ else
+ 
+       ax_save_FLAGS=$CXXFLAGS
+-      CXXFLAGS="-msse"
++      CXXFLAGS="@msse@"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+@@ -14747,7 +14747,7 @@ eval ax_check_compiler_flags=$ax_cv_cxx_flags__msse
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5
+ $as_echo "$ax_check_compiler_flags" >&6; }
+ if test "x$ax_check_compiler_flags" = xyes; then
+-	SBSMS_CFLAGS="$SBSMS_CFLAGS -msse"
++	SBSMS_CFLAGS="$SBSMS_CFLAGS @msse@"
+ else
+ 	as_fn_error $? "Need a version of gcc with -msse" "$LINENO" 5
+ fi
diff --git a/nixpkgs/pkgs/development/libraries/libsbsms/default.nix b/nixpkgs/pkgs/development/libraries/libsbsms/default.nix
new file mode 100644
index 000000000000..6c014ea6223c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsbsms/default.nix
@@ -0,0 +1,22 @@
+let
+  pname = "libsbsms";
+in
+pkgs: rec {
+  libsbsms_2_0_2 = pkgs.callPackage ./common.nix rec {
+    inherit pname;
+    version = "2.0.2";
+    url = "mirror://sourceforge/sbsms/${pname}-${version}.tar.gz";
+    sha256 = "sha256-zqs9lwZkszcFe0a89VKD1Q0ynaY2v4PQ7nw24iNBru4=";
+    homepage = "https://sourceforge.net/projects/sbsms/files/sbsms";
+  };
+
+  libsbsms_2_3_0 = pkgs.callPackage ./common.nix rec {
+    inherit pname;
+    version = "2.3.0";
+    url = "https://github.com/claytonotey/${pname}/archive/refs/tags/${version}.tar.gz";
+    sha256 = "sha256-T4jRUrwG/tvanV1lUX1AJUpzEMkFBgGpMSIwnUWv0sk=";
+    homepage = "https://github.com/claytonotey/libsbsms";
+  };
+
+  libsbsms = libsbsms_2_0_2;
+}
diff --git a/nixpkgs/pkgs/development/libraries/libschrift/default.nix b/nixpkgs/pkgs/development/libraries/libschrift/default.nix
new file mode 100644
index 000000000000..443550e8a0a1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libschrift/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch }:
+
+stdenv.mkDerivation rec {
+  pname = "libschrift";
+  version = "0.10.2";
+
+  src = fetchFromGitHub {
+    owner = "tomolt";
+    repo = pname;
+    rev = "v" + version;
+    sha256 = "01hgvkcb46kr9jzc4ah0js0jy9kr0ll18j2k0c5zil55l3a9rqw1";
+  };
+
+  postPatch = ''
+    substituteInPlace config.mk \
+      --replace "PREFIX = /usr/local" "PREFIX = $out"
+  '';
+
+  makeFlags = [ "libschrift.a" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/tomolt/libschrift";
+    description = "A lightweight TrueType font rendering library";
+    license = licenses.isc;
+    platforms = platforms.all;
+    maintainers = [ maintainers.sternenseemann ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libsciter/default.nix b/nixpkgs/pkgs/development/libraries/libsciter/default.nix
new file mode 100644
index 000000000000..9e9c0aece0ba
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsciter/default.nix
@@ -0,0 +1,45 @@
+{ lib
+, glib
+, cairo
+, libuuid
+, pango
+, gtk3
+, stdenv
+, fetchurl
+, autoPatchelfHook
+}:
+
+stdenv.mkDerivation {
+  pname = "libsciter";
+  version = "4.4.8.23-bis"; # Version specified in GitHub commit title
+
+  src = fetchurl {
+    url = "https://github.com/c-smile/sciter-sdk/raw/9f1724a45f5a53c4d513b02ed01cdbdab08fa0e5/bin.lnx/x64/libsciter-gtk.so";
+    sha256 = "a1682fbf55e004f1862d6ace31b5220121d20906bdbf308d0a9237b451e4db86";
+  };
+
+  nativeBuildInputs = [
+    autoPatchelfHook
+  ];
+
+  buildInputs = [ glib cairo libuuid pango gtk3 ];
+
+  dontUnpack = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    install -m755 -D $src $out/lib/libsciter-gtk.so
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "https://sciter.com";
+    description = "Embeddable HTML/CSS/JavaScript engine for modern UI development";
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ leixb ];
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+    license = licenses.unfree;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libscrypt/default.nix b/nixpkgs/pkgs/development/libraries/libscrypt/default.nix
new file mode 100644
index 000000000000..6adc2124a3ab
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libscrypt/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "libscrypt";
+  version = "1.22";
+
+  src = fetchFromGitHub {
+    owner = "technion";
+    repo = "libscrypt";
+    rev = "v${version}";
+    sha256 = "sha256-QWWqC10bENemG5FYEog87tT7IxDaBJUDqu6j/sO3sYE=";
+  };
+
+  buildFlags = lib.optional stdenv.isDarwin "LDFLAGS= LDFLAGS_EXTRA= CFLAGS_EXTRA=";
+
+  installFlags = [ "PREFIX=$(out)" ];
+  installTargets = lib.optional stdenv.isDarwin "install-osx";
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Shared library that implements scrypt() functionality";
+    homepage = "https://lolware.net/2014/04/29/libscrypt.html";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ davidak ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libsearpc/default.nix b/nixpkgs/pkgs/development/libraries/libsearpc/default.nix
new file mode 100644
index 000000000000..9ae8d87f8872
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsearpc/default.nix
@@ -0,0 +1,41 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+, python3
+, glib
+, jansson
+}:
+
+stdenv.mkDerivation rec {
+  version = "3.3-20230626";
+  commit = "783141fb694f3bd1f8bd8a783670dd25a53b9fc1";
+  pname = "libsearpc";
+
+  src = fetchFromGitHub {
+    owner = "haiwen";
+    repo = "libsearpc";
+    rev = commit;
+    sha256 = "sha256-nYYp3EyA8nufhbWaw4Lv/c4utGYaxC+PoFyamUEVJx4=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+    python3
+  ];
+
+  propagatedBuildInputs = [
+    glib
+    jansson
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/haiwen/libsearpc";
+    description = "A simple and easy-to-use C language RPC framework based on GObject System";
+    license = licenses.lgpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ greizgh ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libseccomp/default.nix b/nixpkgs/pkgs/development/libraries/libseccomp/default.nix
new file mode 100644
index 000000000000..e5a8f42940e0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libseccomp/default.nix
@@ -0,0 +1,55 @@
+{ lib, stdenv, fetchurl, getopt, util-linuxMinimal, which, gperf, nix-update-script }:
+
+stdenv.mkDerivation rec {
+  pname = "libseccomp";
+  version = "2.5.5";
+
+  src = fetchurl {
+    url = "https://github.com/seccomp/libseccomp/releases/download/v${version}/libseccomp-${version}.tar.gz";
+    hash = "sha256-JIosik2bmFiqa69ScSw0r+/PnJ6Ut23OAsHJqiX7M3U=";
+  };
+
+  outputs = [ "out" "lib" "dev" "man" "pythonsrc" ];
+
+  nativeBuildInputs = [ gperf ];
+  buildInputs = [ getopt ];
+
+  patchPhase = ''
+    patchShebangs .
+  '';
+
+  nativeCheckInputs = [ util-linuxMinimal which ];
+  doCheck = true;
+
+  # Hack to ensure that patchelf --shrink-rpath get rids of a $TMPDIR reference.
+  preFixup = "rm -rfv src";
+
+  # Copy the python module code into a tarball that we can export and use as the
+  # src input for buildPythonPackage calls
+  postInstall = ''
+    cp -R ./src/python/ tmp-pythonsrc/
+    tar -zcf $pythonsrc --mtime="@$SOURCE_DATE_EPOCH" --sort=name --transform s/tmp-pythonsrc/python-foundationdb/ ./tmp-pythonsrc/
+  '';
+
+  passthru = {
+    updateScript = nix-update-script { };
+  };
+
+  meta = with lib; {
+    description = "High level library for the Linux Kernel seccomp filter";
+    homepage = "https://github.com/seccomp/libseccomp";
+    license = licenses.lgpl21Only;
+    platforms = platforms.linux;
+    badPlatforms = [
+      "alpha-linux"
+      "loongarch64-linux"
+      "m68k-linux"
+      "microblaze-linux"
+      "microblazeel-linux"
+      "riscv32-linux"
+      "sparc-linux"
+      "sparc64-linux"
+    ];
+    maintainers = with maintainers; [ thoughtpolice ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libsecret/default.nix b/nixpkgs/pkgs/development/libraries/libsecret/default.nix
new file mode 100644
index 000000000000..733fcafaf290
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsecret/default.nix
@@ -0,0 +1,129 @@
+{ stdenv
+, lib
+, fetchurl
+, glib
+, meson
+, ninja
+, pkg-config
+, gettext
+, libxslt
+, python3
+, docbook-xsl-nons
+, docbook_xml_dtd_42
+, libgcrypt
+, gobject-introspection
+, buildPackages
+, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
+, vala
+, gi-docgen
+, gnome
+, gjs
+, libintl
+, dbus
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libsecret";
+  version = "0.21.2";
+
+  outputs = [ "out" "dev" ] ++ lib.optional withIntrospection "devdoc";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    hash = "sha256-5KNBSWoIFeZMjTuPq6sz17rn796rd7hDZpcx1bGB3O4=";
+  };
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gettext
+    libxslt # for xsltproc for building man pages
+    docbook-xsl-nons
+    docbook_xml_dtd_42
+    libintl
+    vala
+    glib
+  ] ++ lib.optionals withIntrospection [
+    gi-docgen
+    gobject-introspection
+  ];
+
+  buildInputs = [
+    libgcrypt
+  ];
+
+  propagatedBuildInputs = [
+    glib
+  ];
+
+  nativeCheckInputs = [
+    python3
+    python3.pkgs.dbus-python
+    python3.pkgs.pygobject3
+    dbus
+    gjs
+  ];
+
+  mesonFlags = [
+    (lib.mesonBool "introspection" withIntrospection)
+    (lib.mesonBool "gtk_doc" withIntrospection)
+  ];
+
+  doCheck = stdenv.isLinux && withIntrospection;
+  separateDebugInfo = true;
+
+  postPatch = ''
+    patchShebangs ./tool/test-*.sh
+  '';
+
+  preCheck = ''
+    # Our gobject-introspection patches make the shared library paths absolute
+    # in the GIR files. When running tests, the library is not yet installed,
+    # though, so we need to replace the absolute path with a local one during build.
+    # We are using a symlink that will be overwitten during installation.
+    mkdir -p $out/lib $out/lib
+    ln -s "$PWD/libsecret/libmock-service.so" "$out/lib/libmock-service.so"
+    ln -s "$PWD/libsecret/libsecret-1.so.0" "$out/lib/libsecret-1.so.0"
+  '';
+
+  checkPhase = ''
+    runHook preCheck
+
+    dbus-run-session \
+      --config-file=${dbus}/share/dbus-1/session.conf \
+      meson test --print-errorlogs --timeout-multiplier 0
+
+    runHook postCheck
+  '';
+
+  postCheck = ''
+    # This is test-only so it won’t be overwritten during installation.
+    rm "$out/lib/libmock-service.so"
+  '';
+
+  postFixup = ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      # Does not seem to use the odd-unstable policy: https://gitlab.gnome.org/GNOME/libsecret/issues/30
+      versionPolicy = "none";
+    };
+  };
+
+  meta = {
+    description = "A library for storing and retrieving passwords and other secrets";
+    homepage = "https://wiki.gnome.org/Projects/Libsecret";
+    license = lib.licenses.lgpl21Plus;
+    mainProgram = "secret-tool";
+    inherit (glib.meta) platforms maintainers;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libsegfault/default.nix b/nixpkgs/pkgs/development/libraries/libsegfault/default.nix
new file mode 100644
index 000000000000..721570f330b3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsegfault/default.nix
@@ -0,0 +1,45 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, meson
+, ninja
+, boost
+, libbacktrace
+, unstableGitUpdater
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libsegfault";
+  version = "unstable-2022-11-13";
+
+  src = fetchFromGitHub {
+    owner = "jonathanpoelen";
+    repo = "libsegfault";
+    rev = "8bca5964613695bf829c96f7a3a14dbd8304fe1f";
+    sha256 = "vKtY6ZEkyK2K+BzJCSo30f9MpERpPlUnarFIlvJ1Giw=";
+  };
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin) "-DBOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED=1";
+
+  nativeBuildInputs = [
+    meson
+    ninja
+  ];
+
+  buildInputs = [
+    boost
+    libbacktrace
+  ];
+
+  passthru = {
+    updateScript = unstableGitUpdater { };
+  };
+
+  meta = with lib; {
+    description = "Implementation of libSegFault.so with Boost.stracktrace";
+    homepage = "https://github.com/jonathanpoelen/libsegfault";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ jtojnar ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libserdes/default.nix b/nixpkgs/pkgs/development/libraries/libserdes/default.nix
new file mode 100644
index 000000000000..2a48c9a89770
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libserdes/default.nix
@@ -0,0 +1,70 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, perl
+, which
+, boost
+, rdkafka
+, jansson
+, curl
+, avro-c
+, avro-cpp
+, nix-update-script }:
+
+stdenv.mkDerivation rec {
+  pname = "libserdes";
+  version = "7.6.0";
+
+  src = fetchFromGitHub {
+    owner = "confluentinc";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-rg4SWa9nIDT6JrnnCDwdiFE1cvpUn0HWHn+bPkXMHQ4=";
+  };
+
+  outputs = [ "dev" "out" ];
+
+  nativeBuildInputs = [ perl which ];
+
+  buildInputs = [ boost rdkafka jansson curl avro-c avro-cpp ];
+
+  makeFlags = [ "GEN_PKG_CONFIG=y" ];
+
+  postPatch = ''
+    patchShebangs configure lds-gen.pl
+  '' + lib.optionalString (stdenv.cc.libcxx != null) ''
+    # fix for https://github.com/NixOS/nixpkgs/issues/166205
+    # llvm12+ isn't adding libc++abi
+    substituteInPlace src-cpp/Makefile \
+      --replace "LIBS += -lstdc++" "LIBS += -lc++ -l${stdenv.cc.libcxx.cxxabi.libName}"
+  '';
+
+  # Has a configure script but it’s not Autoconf so steal some bits from multiple-outputs.sh:
+  setOutputFlags = false;
+
+  preConfigure = ''
+    configureFlagsArray+=(
+      "--libdir=''${!outputLib}/lib"
+      "--includedir=''${!outputInclude}/include"
+    )
+  '';
+
+  preInstall = ''
+    installFlagsArray+=("pkgconfigdir=''${!outputDev}/lib/pkgconfig")
+  '';
+
+  # Header files get installed with executable bit for some reason; get rid of it.
+  postInstall = ''
+    chmod -x ''${!outputInclude}/include/libserdes/*.h
+  '';
+
+  passthru.updateScript = nix-update-script { };
+
+  meta = with lib; {
+    description = "A schema-based serializer/deserializer C/C++ library with support for Avro and the Confluent Platform Schema Registry";
+    homepage = "https://github.com/confluentinc/libserdes";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ liff ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libserialport/default.nix b/nixpkgs/pkgs/development/libraries/libserialport/default.nix
new file mode 100644
index 000000000000..79f46ffca1f8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libserialport/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchurl, pkg-config, udev, darwin }:
+
+stdenv.mkDerivation rec {
+  pname = "libserialport";
+  version = "0.1.1";
+
+  src = fetchurl {
+    url = "https://sigrok.org/download/source/libserialport/${pname}-${version}.tar.gz";
+    sha256 = "17ajlwgvyyrap8z7f16zcs59pksvncwbmd3mzf98wj7zqgczjaja";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = lib.optional stdenv.isLinux udev
+    ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.IOKit;
+
+  meta = with lib; {
+    description = "Cross-platform shared library for serial port access";
+    homepage = "https://sigrok.org/";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux ++ platforms.darwin;
+    maintainers = [ maintainers.bjornfor ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libshout/default.nix b/nixpkgs/pkgs/development/libraries/libshout/default.nix
new file mode 100644
index 000000000000..e9547cc2af93
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libshout/default.nix
@@ -0,0 +1,49 @@
+{ lib, stdenv, fetchurl, fetchpatch, pkg-config
+, libvorbis, libtheora, speex }:
+
+# need pkg-config so that libshout installs ${out}/lib/pkgconfig/shout.pc
+
+stdenv.mkDerivation rec {
+  pname = "libshout";
+  version = "2.4.6";
+
+  src = fetchurl {
+    url = "https://downloads.xiph.org/releases/libshout/${pname}-${version}.tar.gz";
+    sha256 = "sha256-OcvU8O/f3cl1XYghfkf48tcQj6dn+dWKK6JqFtj3yRA=";
+  };
+
+  patches = [
+    # Fixes building libshout with clang. Can be dropped once the following MR is merged:
+    # https://gitlab.xiph.org/xiph/icecast-libshout/-/merge_requests/4.
+    (fetchpatch {
+      url = "https://gitlab.xiph.org/xiph/icecast-libshout/-/commit/600fa105a799986efcccddfedfdfd3e9a1988cd0.patch";
+      hash = "sha256-XjogfcQJBPZX9MPAbNJyXaFZNekL1pabvtTT7N+cz+s=";
+    })
+    (fetchpatch {
+      url = "https://gitlab.xiph.org/xiph/icecast-libshout/-/commit/8ab2de318d55c9d0987ffae7d9b94b365af732c1.patch";
+      hash = "sha256-0+Wp2Xu59ESCJfoDcwAJHuAJyzMsaBe7f8Js3/ren2g=";
+    })
+  ];
+
+  outputs = [ "out" "dev" "doc" ];
+
+  depsBuildBuild = [ pkg-config ];
+  nativeBuildInputs = [ pkg-config ];
+  propagatedBuildInputs = [ libvorbis libtheora speex ];
+
+  meta = {
+    description = "icecast 'c' language bindings";
+
+    longDescription = ''
+      Libshout is a library for communicating with and sending data to an icecast
+      server.  It handles the socket connection, the timing of the data, and prevents
+      bad data from getting to the icecast server.
+    '';
+
+    homepage = "https://www.icecast.org";
+    license = lib.licenses.gpl2;
+    maintainers = with lib.maintainers; [ jcumming ];
+    mainProgram = "shout";
+    platforms = with lib.platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libshumate/default.nix b/nixpkgs/pkgs/development/libraries/libshumate/default.nix
new file mode 100644
index 000000000000..4722781c1933
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libshumate/default.nix
@@ -0,0 +1,92 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, gi-docgen
+, meson
+, ninja
+, pkg-config
+, vala
+, gobject-introspection
+, glib
+, cairo
+, sqlite
+, libsoup_3
+, gtk4
+, libsysprof-capture
+, xvfb-run
+, gnome
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libshumate";
+  version = "1.1.3";
+
+  outputs = [ "out" "dev" "devdoc" ];
+  outputBin = "devdoc"; # demo app
+
+  src = fetchFromGitLab {
+    domain = "gitlab.gnome.org";
+    owner = "GNOME";
+    repo = "libshumate";
+    rev = version;
+    sha256 = "+h0dKLECtvfsxwD5aRTIgiNI9jG/tortUJYFiYMe60g=";
+  };
+
+  nativeBuildInputs = [
+    gi-docgen
+    meson
+    ninja
+    pkg-config
+    vala
+    gobject-introspection
+  ];
+
+  buildInputs = [
+    glib
+    cairo
+    sqlite
+    libsoup_3
+    gtk4
+    libsysprof-capture
+  ];
+
+  nativeCheckInputs = [
+    xvfb-run
+  ];
+
+  mesonFlags = [
+    "-Ddemos=true"
+  ];
+
+  doCheck = !stdenv.isDarwin;
+
+  checkPhase = ''
+    runHook preCheck
+
+    env \
+      HOME="$TMPDIR" \
+      GTK_A11Y=none \
+      xvfb-run meson test --print-errorlogs
+
+    runHook postCheck
+  '';
+
+  postFixup = ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput share/doc/libshumate-1.0 "$devdoc"
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+    };
+  };
+
+  meta = with lib; {
+    description = "GTK toolkit providing widgets for embedded maps";
+    homepage = "https://gitlab.gnome.org/GNOME/libshumate";
+    license = licenses.lgpl21Plus;
+    maintainers = teams.gnome.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libsidplayfp/default.nix b/nixpkgs/pkgs/development/libraries/libsidplayfp/default.nix
new file mode 100644
index 000000000000..ba1b003442ff
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsidplayfp/default.nix
@@ -0,0 +1,114 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, makeFontsConf
+, nix-update-script
+, testers
+, autoreconfHook
+, docSupport ? true
+, doxygen
+, graphviz
+, libexsid
+, libgcrypt
+, perl
+, pkg-config
+, unittest-cpp
+, xa
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libsidplayfp";
+  version = "2.6.0";
+
+  src = fetchFromGitHub {
+    owner = "libsidplayfp";
+    repo = "libsidplayfp";
+    rev = "v${finalAttrs.version}";
+    fetchSubmodules = true;
+    hash = "sha256-6Gbujz20EHQ7s9GaPpEPju+WqePjpduJqb5hcrswTm8=";
+  };
+
+  outputs = [
+    "out"
+  ] ++ lib.optionals docSupport [
+    "doc"
+  ];
+
+  postPatch = ''
+    patchShebangs .
+  '';
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    autoreconfHook
+    perl
+    pkg-config
+    xa
+  ] ++ lib.optionals docSupport [
+    doxygen
+    graphviz
+  ];
+
+  buildInputs = [
+    libexsid
+    libgcrypt
+  ];
+
+  checkInputs = [
+    unittest-cpp
+  ];
+
+  enableParallelBuilding = true;
+
+  configureFlags = [
+    (lib.strings.enableFeature true "hardsid")
+    (lib.strings.withFeature true "gcrypt")
+    (lib.strings.withFeature true "exsid")
+    (lib.strings.enableFeature finalAttrs.finalPackage.doCheck "tests")
+  ];
+
+  # Make Doxygen happy with the setup, reduce log noise
+  FONTCONFIG_FILE = lib.optionalString docSupport (makeFontsConf { fontDirectories = [ ]; });
+
+  preBuild = ''
+    # Reduce noise from fontconfig during doc building
+    export XDG_CACHE_HOME=$TMPDIR
+  '';
+
+  buildFlags = [
+    "all"
+  ] ++ lib.optionals docSupport [
+    "doc"
+  ];
+
+  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
+
+  postInstall = lib.optionalString docSupport ''
+    mkdir -p $doc/share/doc/libsidplayfp
+    mv docs/html $doc/share/doc/libsidplayfp/
+  '';
+
+  passthru = {
+    tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+    updateScript = nix-update-script { };
+  };
+
+  meta = with lib; {
+    description = "A library to play Commodore 64 music derived from libsidplay2";
+    longDescription = ''
+      libsidplayfp is a C64 music player library which integrates
+      the reSID SID chip emulation into a cycle-based emulator
+      environment, constantly aiming to improve emulation of the
+      C64 system and the SID chips.
+    '';
+    homepage = "https://github.com/libsidplayfp/libsidplayfp";
+    license = with licenses; [ gpl2Plus ];
+    maintainers = with maintainers; [ ramkromberg OPNA2608 ];
+    platforms = platforms.all;
+    pkgConfigModules = [
+      "libsidplayfp"
+      "libstilview"
+    ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libsieve/default.nix b/nixpkgs/pkgs/development/libraries/libsieve/default.nix
new file mode 100644
index 000000000000..8253d1df74fe
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsieve/default.nix
@@ -0,0 +1,17 @@
+{lib, stdenv, fetchurl}:
+stdenv.mkDerivation rec {
+  version = "2.3.1";
+  pname = "libsieve";
+
+  src = fetchurl {
+    url = "https://github.com/downloads/sodabrew/libsieve/libsieve-${version}.tar.gz";
+    sha256 = "1gllhl9hbmc86dq3k98d4kjs5bwk0p2rlk7ywqj3fjn7jw6mbhcj";
+  };
+
+  meta = with lib; {
+    description = "An interpreter for RFC 3028 Sieve and various extensions";
+    homepage = "http://sodabrew.com/libsieve/";
+    license = licenses.lgpl21;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libsigcxx/3.0.nix b/nixpkgs/pkgs/development/libraries/libsigcxx/3.0.nix
new file mode 100644
index 000000000000..5515901a1cf2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsigcxx/3.0.nix
@@ -0,0 +1,44 @@
+{ stdenv
+, lib
+, fetchurl
+, pkg-config
+, meson
+, ninja
+, gnome
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libsigc++";
+  version = "3.6.0";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "w9I7N9/W458uCfCRt3sVQfv6F8Twtr9cibrvcikIDhc=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [
+    pkg-config
+    meson
+    ninja
+  ];
+
+  doCheck = true;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      attrPath = "libsigcxx30";
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://libsigcplusplus.github.io/libsigcplusplus/";
+    description = "A typesafe callback system for standard C++";
+    license = licenses.lgpl21Plus;
+    maintainers = teams.gnome.members;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libsigcxx/default.nix b/nixpkgs/pkgs/development/libraries/libsigcxx/default.nix
new file mode 100644
index 000000000000..c73cbaa55dc3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsigcxx/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchurl, pkg-config, meson, ninja, gnome }:
+
+stdenv.mkDerivation rec {
+  pname = "libsigc++";
+  version = "2.12.1";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-qdvuMjNR0Qm3ruB0qcuJyj57z4rY7e8YUfTPNZvVCEM=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ pkg-config meson ninja ];
+
+  doCheck = true;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      attrPath = "libsigcxx";
+      versionPolicy = "odd-unstable";
+      freeze = "2.99.1";
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://libsigcplusplus.github.io/libsigcplusplus/";
+    description = "A typesafe callback system for standard C++";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libsignal-protocol-c/default.nix b/nixpkgs/pkgs/development/libraries/libsignal-protocol-c/default.nix
new file mode 100644
index 000000000000..203d3613af85
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsignal-protocol-c/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchFromGitHub, cmake, openssl }:
+
+stdenv.mkDerivation rec {
+  pname = "libsignal-protocol-c";
+  version = "2.3.3";
+
+  src = fetchFromGitHub {
+    owner = "signalapp";
+    repo = "libsignal-protocol-c";
+    rev = "v${version}";
+    sha256 = "0z5p03vk15i6h870azfjgyfgxhv31q2vq6rfhnybrnkxq2wqzwhk";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ openssl ];
+
+  cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
+
+  outputs = [ "out" "dev" ];
+
+  meta = with lib; {
+    description = "Signal Protocol C Library";
+    homepage = "https://github.com/signalapp/libsignal-protocol-c";
+    license = licenses.gpl3;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ orivej ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libsignon-glib/default.nix b/nixpkgs/pkgs/development/libraries/libsignon-glib/default.nix
new file mode 100644
index 000000000000..9f0496262f2a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsignon-glib/default.nix
@@ -0,0 +1,57 @@
+{ lib, stdenv, fetchgit, nix-update-script, pkg-config, meson, ninja, vala, python3, gtk-doc, docbook_xsl, docbook_xml_dtd_43, docbook_xml_dtd_412, glib, check, gobject-introspection }:
+
+stdenv.mkDerivation rec {
+  pname = "libsignon-glib";
+  version = "2.1";
+
+  outputs = [ "out" "dev" "devdoc" "py" ];
+
+  src = fetchgit {
+    url = "https://gitlab.com/accounts-sso/${pname}";
+    rev = "refs/tags/${version}";
+    sha256 = "0gnx9gqsh0hcfm1lk7w60g64mkn1iicga5f5xcy1j9a9byacsfd0";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [
+    check
+    docbook_xml_dtd_412
+    docbook_xml_dtd_43
+    docbook_xsl
+    gobject-introspection
+    gtk-doc
+    meson
+    ninja
+    pkg-config
+    python3
+    vala
+  ];
+
+  buildInputs = [
+    glib
+    python3.pkgs.pygobject3
+  ];
+
+  mesonFlags = [
+    "-Dintrospection=true"
+    "-Dpy-overrides-dir=${placeholder "py"}/${python3.sitePackages}/gi/overrides"
+  ];
+
+  postPatch = ''
+    chmod +x build-aux/gen-error-map.py
+    patchShebangs build-aux/gen-error-map.py
+  '';
+
+  passthru = {
+    updateScript = nix-update-script { };
+  };
+
+  meta = with lib; {
+    description = "A library for managing single signon credentials which can be used from GLib applications";
+    homepage = "https://gitlab.com/accounts-sso/libsignon-glib";
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.linux;
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/libsigsegv/default.nix b/nixpkgs/pkgs/development/libraries/libsigsegv/default.nix
new file mode 100644
index 000000000000..84c2f19e5e29
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsigsegv/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchurl
+, enableSigbusFix ? false # required by kernels < 3.18.6
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libsigsegv";
+  version = "2.14";
+
+  src = fetchurl {
+    url = "mirror://gnu/libsigsegv/libsigsegv-${version}.tar.gz";
+    sha256 = "sha256-zaw5QYAzZM+BqQhJm+t5wgDq1gtrW0DK0ST9HgbKopU=";
+  };
+
+  patches = if enableSigbusFix then [ ./sigbus_fix.patch ] else null;
+
+  doCheck = true; # not cross;
+
+  meta = {
+    homepage = "https://www.gnu.org/software/libsigsegv/";
+    description = "Library to handle page faults in user mode";
+
+    longDescription = ''
+      GNU libsigsegv is a library for handling page faults in user mode. A
+      page fault occurs when a program tries to access to a region of memory
+      that is currently not available. Catching and handling a page fault is
+      a useful technique for implementing pageable virtual memory,
+      memory-mapped access to persistent databases, generational garbage
+      collectors, stack overflow handlers, distributed shared memory, and
+      more.
+    '';
+
+    license = lib.licenses.gpl2Plus;
+
+    maintainers = [ ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libsigsegv/sigbus_fix.patch b/nixpkgs/pkgs/development/libraries/libsigsegv/sigbus_fix.patch
new file mode 100644
index 000000000000..6f1c399041dd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsigsegv/sigbus_fix.patch
@@ -0,0 +1,8 @@
+--- a/src/signals.h	2017-08-23 14:07:05.000000000 +0100
++++ b/src/signals.h	2017-08-23 14:06:53.000000000 +0100
+@@ -18,4 +18,4 @@
+ /* List of signals that are sent when an invalid virtual memory address
+    is accessed, or when the stack overflows.  */
+ #define SIGSEGV_FOR_ALL_SIGNALS(var,body) \
+-  { int var; var = SIGSEGV; { body } }
++  { int var; var = SIGSEGV; { body } var = SIGBUS; { body } }
diff --git a/nixpkgs/pkgs/development/libraries/libsixel/default.nix b/nixpkgs/pkgs/development/libraries/libsixel/default.nix
new file mode 100644
index 000000000000..d4fa2a4d6ffe
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsixel/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, meson
+, ninja
+, gdk-pixbuf
+, gd
+, libjpeg
+, pkg-config
+}:
+stdenv.mkDerivation rec {
+  pname = "libsixel";
+  version = "1.10.3";
+
+  src = fetchFromGitHub {
+    owner = "libsixel";
+    repo = "libsixel";
+    rev = "v${version}";
+    sha256 = "1nny4295ipy4ajcxmmh04c796hcds0y7z7rv3qd17mj70y8j0r2d";
+  };
+
+  buildInputs = [
+    gdk-pixbuf gd
+  ];
+
+  nativeBuildInputs = [
+    meson ninja pkg-config
+  ];
+
+  doCheck = true;
+
+  mesonFlags = [
+    "-Dtests=enabled"
+    # build system seems to be broken here, it still seems to handle jpeg
+    # through some other ways.
+    "-Djpeg=disabled"
+    "-Dpng=disabled"
+  ];
+
+  meta = with lib; {
+    description = "The SIXEL library for console graphics, and converter programs";
+    homepage = "https://github.com/libsixel/libsixel";
+    maintainers = with maintainers; [ vrthra ];
+    license = licenses.mit;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libskk/default.nix b/nixpkgs/pkgs/development/libraries/libskk/default.nix
new file mode 100644
index 000000000000..c4b36704cb97
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libskk/default.nix
@@ -0,0 +1,49 @@
+{ lib, stdenv, fetchFromGitHub,
+  libtool, gettext, pkg-config,
+  vala, gnome-common, gobject-introspection,
+  libgee, json-glib, skk-dicts, libxkbcommon }:
+
+stdenv.mkDerivation rec {
+  pname = "libskk";
+  version = "1.0.5";
+
+  src = fetchFromGitHub {
+    owner = "ueno";
+    repo = "libskk";
+    rev = version;
+    sha256 = "0y279pcgs3jrsi9vzx086xhz9jbz23dqqijp4agygc9ackp9sxy5";
+  };
+
+  buildInputs = [ skk-dicts libxkbcommon ];
+  nativeBuildInputs = [ vala gnome-common gobject-introspection libtool gettext pkg-config ];
+  propagatedBuildInputs = [ libgee json-glib ];
+
+  preConfigure = ''
+    ./autogen.sh
+  '';
+
+  # link SKK-JISYO.L from skkdicts for the bundled tool `skk`
+  preInstall = ''
+    dictDir=$out/share/skk
+    mkdir -p $dictDir
+    ln -s ${skk-dicts}/share/SKK-JISYO.L $dictDir/
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "A library to deal with Japanese kana-to-kanji conversion method";
+    longDescription = ''
+      Libskk is a library that implements basic features of SKK including:
+      new word registration, completion, numeric conversion, abbrev mode, kuten input,
+      hankaku-katakana input, Lisp expression evaluation (concat only), and re-conversion.
+      It also supports various typing rules including: romaji-to-kana, AZIK, TUT-Code, and NICOLA,
+      as well as various dictionary types including: file dictionary (such as SKK-JISYO.[SML]),
+      user dictionary, skkserv, and CDB format dictionary.
+    '';
+    homepage = "https://github.com/ueno/libskk";
+    license = lib.licenses.gpl3Plus;
+    maintainers = with lib.maintainers; [ yuriaisaka ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libslirp/default.nix b/nixpkgs/pkgs/development/libraries/libslirp/default.nix
new file mode 100644
index 000000000000..9ce3241e8fbb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libslirp/default.nix
@@ -0,0 +1,39 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, meson
+, ninja
+, pkg-config
+, glib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libslirp";
+  version = "4.7.0";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "slirp";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-avUbgXPPV3IhUwZyARxCvctbVlLqDKWmMhAjdVBA3jY=";
+  };
+
+  separateDebugInfo = true;
+
+  nativeBuildInputs = [ meson ninja pkg-config ];
+
+  buildInputs = [ glib ];
+
+  postPatch = ''
+    echo ${version} > .tarball-version
+  '';
+
+  meta = with lib; {
+    description = "General purpose TCP-IP emulator";
+    homepage = "https://gitlab.freedesktop.org/slirp/libslirp";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ orivej ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libsmartcols/default.nix b/nixpkgs/pkgs/development/libraries/libsmartcols/default.nix
new file mode 100644
index 000000000000..077055cbb9a4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsmartcols/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, python3, gtk-doc}:
+
+stdenv.mkDerivation rec {
+  pname = "libsmartcols";
+  version = "2.36.1";
+
+  nativeBuildInputs = [ autoreconfHook pkg-config python3 gtk-doc ];
+
+  src = fetchFromGitHub {
+    owner = "karelzak";
+    repo = "util-linux";
+    rev = "v${version}";
+    sha256 = "0z7nv054pqhlihqiw0vk3h40j0cxk1yxf8zzh0ddmvk6834cnyxs";
+  };
+
+  configureFlags = [ "--disable-all-programs" "--enable-libsmartcols" ];
+
+  buildPhase = ''
+    make libsmartcols.la
+  '';
+
+  installTargets = [ "install-am" "install-pkgconfigDATA" ];
+
+  meta = {
+    description = "smart column output alignment library";
+    homepage = "https://github.com/karelzak/util-linux/tree/master/libsmartcols";
+    license = lib.licenses.gpl2Plus;
+    platforms = lib.platforms.linux ++ lib.platforms.darwin;
+    maintainers = with lib.maintainers; [ rb2k ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/libsmi/default.nix b/nixpkgs/pkgs/development/libraries/libsmi/default.nix
new file mode 100644
index 000000000000..14139d849dc7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsmi/default.nix
@@ -0,0 +1,20 @@
+{ lib, stdenv , fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libsmi";
+  version = "0.5.0";
+
+  src = fetchurl {
+    url = "https://www.ibr.cs.tu-bs.de/projects/libsmi/download/${pname}-${version}.tar.gz";
+    sha256 = "1lslaxr2qcj6hf4naq5n5mparfhmswsgq4wa7zm2icqvvgdcq6pj";
+  };
+
+  env.NIX_CFLAGS_COMPILE = "-std=gnu90";
+
+  meta = with lib; {
+    description = "A Library to Access SMI MIB Information";
+    homepage = "https://www.ibr.cs.tu-bs.de/projects/libsmi/index.html";
+    license = licenses.free;
+    platforms = lib.platforms.linux ++ lib.platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libsnark/default.nix b/nixpkgs/pkgs/development/libraries/libsnark/default.nix
new file mode 100644
index 000000000000..54360cad4ed9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsnark/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, openssl, boost, gmp, procps }:
+
+stdenv.mkDerivation rec {
+  pname = "libsnark";
+  version = "unstable-2018-01-15";
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ openssl boost gmp ] ++ lib.optional stdenv.hostPlatform.isLinux procps;
+
+  cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "-DWITH_PROCPS=OFF" ]
+    ++ lib.optionals (stdenv.hostPlatform.isDarwin || !stdenv.hostPlatform.isx86) [ "-DWITH_SUPERCOP=OFF" ]
+    ++ lib.optionals (!stdenv.hostPlatform.isx86) [ "-DCURVE=ALT_BN128" ];
+
+  src = fetchFromGitHub {
+    rev = "9e6b19ff15bc19fba5da1707ba18e7f160e5ed07";
+    owner           = "scipr-lab";
+    repo            = "libsnark";
+    sha256          = "13f02qp2fmfhvxlp4xi69m0l8r5nq913l2f0zwdk7hl46lprfdca";
+    fetchSubmodules = true;
+  };
+
+  meta = with lib; {
+    description = "C++ library for zkSNARKs";
+    homepage = "https://github.com/scipr-lab/libsnark";
+    license = licenses.mit;
+    platforms = lib.platforms.linux ++ lib.platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libsndfile/default.nix b/nixpkgs/pkgs/development/libraries/libsndfile/default.nix
new file mode 100644
index 000000000000..02dbd633281c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsndfile/default.nix
@@ -0,0 +1,96 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, autogen, pkg-config, python3
+, flac, lame, libmpg123, libogg, libopus, libvorbis
+, alsa-lib, Carbon, AudioToolbox
+
+# for passthru.tests
+, audacity
+, freeswitch
+, gst_all_1
+, libsamplerate
+, moc
+, pipewire
+, pulseaudio
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libsndfile";
+  version = "1.2.2";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = version;
+    hash = "sha256-MOOX/O0UaoeMaQPW9PvvE0izVp+6IoE5VbtTx0RvMkI=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook autogen pkg-config python3 ];
+  buildInputs = [ flac lame libmpg123 libogg libopus libvorbis ]
+    ++ lib.optionals stdenv.isLinux [ alsa-lib ]
+    ++ lib.optionals stdenv.isDarwin [ Carbon AudioToolbox ];
+
+  enableParallelBuilding = true;
+
+  outputs = [ "bin" "dev" "out" "man" "doc" ];
+
+  # need headers from the Carbon.framework in /System/Library/Frameworks to
+  # compile this on darwin -- not sure how to handle
+  preConfigure = lib.optionalString stdenv.isDarwin
+    ''
+      NIX_CFLAGS_COMPILE+=" -I$SDKROOT/System/Library/Frameworks/Carbon.framework/Versions/A/Headers"
+    '';
+
+  # Needed on Darwin.
+  NIX_CFLAGS_LINK = "-logg -lvorbis";
+
+  doCheck = true;
+  preCheck = ''
+    patchShebangs tests/test_wrapper.sh tests/pedantic-header-test.sh
+
+    substituteInPlace tests/test_wrapper.sh \
+      --replace '/usr/bin/env' "$(type -P env)"
+  '';
+
+  passthru.tests = {
+    inherit
+      audacity
+      freeswitch
+      libsamplerate
+      moc
+      pipewire
+      pulseaudio;
+    inherit (python3.pkgs)
+      soundfile
+      wavefile;
+    inherit (gst_all_1) gst-plugins-bad;
+    lame = (lame.override { sndfileFileIOSupport = true; });
+  };
+
+  meta = with lib; {
+    description = "A C library for reading and writing files containing sampled sound";
+    homepage    = "https://libsndfile.github.io/libsndfile/";
+    changelog   = "https://github.com/libsndfile/libsndfile/releases/tag/${version}";
+    license     = licenses.lgpl2Plus;
+    maintainers = with maintainers; [ lovek323 ];
+    platforms   = platforms.unix;
+
+    longDescription = ''
+      Libsndfile is a C library for reading and writing files containing
+      sampled sound (such as MS Windows WAV and the Apple/SGI AIFF format)
+      through one standard library interface.  It is released in source
+      code format under the GNU Lesser General Public License.
+
+      The library was written to compile and run on a Linux system but
+      should compile and run on just about any Unix (including macOS).
+      There are also pre-compiled binaries available for 32 and 64 bit
+      windows.
+
+      It was designed to handle both little-endian (such as WAV) and
+      big-endian (such as AIFF) data, and to compile and run correctly on
+      little-endian (such as Intel and DEC/Compaq Alpha) processor systems
+      as well as big-endian processor systems such as Motorola 68k, Power
+      PC, MIPS and SPARC.  Hopefully the design of the library will also
+      make it easy to extend for reading and writing new sound file
+      formats.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libsodium/default.nix b/nixpkgs/pkgs/development/libraries/libsodium/default.nix
new file mode 100644
index 000000000000..4570b10db39c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsodium/default.nix
@@ -0,0 +1,49 @@
+{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libsodium";
+  version = "1.0.19";
+
+  src = fetchurl {
+    url = "https://download.libsodium.org/libsodium/releases/${finalAttrs.pname}-${finalAttrs.version}.tar.gz";
+    hash = "sha256-AY15/goEXMoHMx03vQy1ey6DjFG8SP2DehRy5QBou+o=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    # Drop -Ofast as it breaks floating point arithmetics in downstream
+    # users.
+    (fetchpatch {
+      name = "drop-Ofast.patch";
+      url  = "https://github.com/jedisct1/libsodium/commit/ffd1e374989197b44d815ac8b5d8f0b43b6ce534.patch";
+      hash = "sha256-jG0VirIoFBwYmRx6zHSu2xe6pXYwbeqNVhPJxO6eJEY=";
+    })
+  ];
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  separateDebugInfo = stdenv.isLinux && stdenv.hostPlatform.libc != "musl";
+
+  enableParallelBuilding = true;
+  hardeningDisable = lib.optional (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isx86_32) "stackprotector";
+
+  # FIXME: the hardeingDisable attr above does not seems effective, so
+  # the need to disable stackprotector via configureFlags
+  configureFlags = lib.optional (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isx86_32) "--disable-ssp";
+
+  doCheck = true;
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    description = "A modern and easy-to-use crypto library";
+    homepage = "https://doc.libsodium.org/";
+    license = licenses.isc;
+    maintainers = with maintainers; [ raskin ];
+    pkgConfigModules = [ "libsodium" ];
+    platforms = platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libsolv/default.nix b/nixpkgs/pkgs/development/libraries/libsolv/default.nix
new file mode 100644
index 000000000000..6af948f67828
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsolv/default.nix
@@ -0,0 +1,55 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, ninja
+, pkg-config
+, zlib
+, xz
+, bzip2
+, zchunk
+, zstd
+, expat
+, withRpm ? !stdenv.isDarwin
+, rpm
+, db
+}:
+
+stdenv.mkDerivation rec {
+  version = "0.7.28";
+  pname = "libsolv";
+
+  src = fetchFromGitHub {
+    owner = "openSUSE";
+    repo = "libsolv";
+    rev = version;
+    sha256 = "sha256-cL7SDwCzXM2qJQfiu/3nfAiFbcFNn1YXD23Sl3n9nzY=";
+  };
+
+  cmakeFlags = [
+    "-DENABLE_COMPLEX_DEPS=true"
+    "-DENABLE_LZMA_COMPRESSION=true"
+    "-DENABLE_BZIP2_COMPRESSION=true"
+    "-DENABLE_ZSTD_COMPRESSION=true"
+    "-DENABLE_ZCHUNK_COMPRESSION=true"
+    "-DWITH_SYSTEM_ZCHUNK=true"
+  ] ++ lib.optionals withRpm [
+    "-DENABLE_COMPS=true"
+    "-DENABLE_PUBKEY=true"
+    "-DENABLE_RPMDB=true"
+    "-DENABLE_RPMDB_BYRPMHEADER=true"
+    "-DENABLE_RPMMD=true"
+  ];
+
+  nativeBuildInputs = [ cmake ninja pkg-config ];
+  buildInputs = [ zlib xz bzip2 zchunk zstd expat db ]
+    ++ lib.optional withRpm rpm;
+
+  meta = with lib; {
+    description = "A free package dependency solver";
+    homepage = "https://github.com/openSUSE/libsolv";
+    license = licenses.bsd3;
+    platforms = platforms.linux ++ platforms.darwin;
+    maintainers = with maintainers; [ copumpkin ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libsoundio/default.nix b/nixpkgs/pkgs/development/libraries/libsoundio/default.nix
new file mode 100644
index 000000000000..b7de8bf04e88
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsoundio/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, cmake, alsa-lib, libjack2, libpulseaudio, AudioUnit }:
+
+stdenv.mkDerivation rec {
+  version = "2.0.0";
+  pname = "libsoundio";
+
+  src = fetchFromGitHub {
+    owner = "andrewrk";
+    repo = "libsoundio";
+    rev = version;
+    sha256 = "12l4rvaypv87vigdrmjz48d4d6sq4gfxf5asvnc4adyabxb73i4x";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ libjack2 ]
+    ++ lib.optionals stdenv.isLinux [ libpulseaudio alsa-lib ]
+    ++ lib.optional stdenv.isDarwin AudioUnit;
+
+  cmakeFlags = lib.optionals stdenv.isDarwin [
+    "-DBUILD_TESTS=OFF"
+  ];
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-strict-prototypes";
+
+  meta = with lib; {
+    description = "Cross platform audio input and output";
+    homepage = "http://libsound.io/";
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.andrewrk ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libsoup/3.x.nix b/nixpkgs/pkgs/development/libraries/libsoup/3.x.nix
new file mode 100644
index 000000000000..6d1545af4079
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsoup/3.x.nix
@@ -0,0 +1,108 @@
+{ stdenv
+, lib
+, fetchurl
+, glib
+, meson
+, ninja
+, pkg-config
+, gnome
+, libsysprof-capture
+, sqlite
+, buildPackages
+, gobject-introspection
+, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
+, vala
+, libpsl
+, python3
+, gi-docgen
+, brotli
+, libnghttp2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libsoup";
+  version = "3.4.4";
+
+  outputs = [ "out" "dev" ] ++ lib.optional withIntrospection "devdoc";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-KRxncl827ZDqQ+//JQZLacWi0ZgUiEd8BcSBo7Swxao=";
+  };
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    glib
+    python3
+  ] ++ lib.optionals withIntrospection [
+    gi-docgen
+    gobject-introspection
+    vala
+  ];
+
+  buildInputs = [
+    sqlite
+    libpsl
+    glib.out
+    brotli
+    libnghttp2
+  ] ++ lib.optionals stdenv.isLinux [
+    libsysprof-capture
+  ];
+
+  propagatedBuildInputs = [
+    glib
+  ];
+
+  mesonFlags = [
+    "-Dtls_check=false" # glib-networking is a runtime dependency, not a compile-time dependency
+    "-Dgssapi=disabled"
+    "-Dntlm=disabled"
+    # Requires wstest from autobahn-testsuite.
+    "-Dautobahn=disabled"
+    # Requires gnutls, not added for closure size.
+    "-Dpkcs11_tests=disabled"
+
+    (lib.mesonEnable "docs" withIntrospection)
+    (lib.mesonEnable "introspection" withIntrospection)
+    (lib.mesonEnable "sysprof" stdenv.isLinux)
+    (lib.mesonEnable "vapi" withIntrospection)
+  ];
+
+  # TODO: For some reason the pkg-config setup hook does not pick this up.
+  PKG_CONFIG_PATH = "${libnghttp2.dev}/lib/pkgconfig";
+
+  # HSTS tests fail.
+  doCheck = false;
+  separateDebugInfo = true;
+
+  postPatch = ''
+    patchShebangs libsoup/
+  '';
+
+  postFixup = ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      attrPath = "libsoup_3";
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = {
+    description = "HTTP client/server library for GNOME";
+    homepage = "https://wiki.gnome.org/Projects/libsoup";
+    license = lib.licenses.lgpl2Plus;
+    inherit (glib.meta) maintainers platforms;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libsoup/default.nix b/nixpkgs/pkgs/development/libraries/libsoup/default.nix
new file mode 100644
index 000000000000..11e1a5a40f1e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsoup/default.nix
@@ -0,0 +1,104 @@
+{ stdenv
+, lib
+, fetchurl
+, glib
+, libxml2
+, meson
+, ninja
+, pkg-config
+, gnome
+, libsysprof-capture
+, gobject-introspection
+, vala
+, libpsl
+, brotli
+, gnomeSupport ? true
+, sqlite
+, buildPackages
+, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libsoup";
+  version = "2.74.3";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-5Ld8Qc/EyMWgNfzcMgx7xs+3XvfFoDQVPfFBP6HZLxM=";
+  };
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    glib
+  ] ++ lib.optionals withIntrospection [
+    gobject-introspection
+    vala
+  ];
+
+  buildInputs = [
+    sqlite
+    libpsl
+    glib.out
+    brotli
+  ] ++ lib.optionals stdenv.isLinux [
+    libsysprof-capture
+  ];
+
+  propagatedBuildInputs = [
+    glib
+    libxml2
+  ];
+
+  mesonFlags = [
+    "-Dtls_check=false" # glib-networking is a runtime dependency, not a compile-time dependency
+    "-Dgssapi=disabled"
+    "-Dvapi=${if withIntrospection then "enabled" else "disabled"}"
+    "-Dintrospection=${if withIntrospection then "enabled" else "disabled"}"
+    "-Dgnome=${lib.boolToString gnomeSupport}"
+    "-Dntlm=disabled"
+  ] ++ lib.optionals (!stdenv.isLinux) [
+    "-Dsysprof=disabled"
+  ];
+
+  env.NIX_CFLAGS_COMPILE = "-lpthread";
+
+  doCheck = false; # ERROR:../tests/socket-test.c:37:do_unconnected_socket_test: assertion failed (res == SOUP_STATUS_OK): (2 == 200)
+  separateDebugInfo = true;
+
+  postPatch = ''
+    # fixes finding vapigen when cross-compiling
+    # the commit is in 3.0.6
+    # https://gitlab.gnome.org/GNOME/libsoup/-/commit/5280e936d0a76f94dbc5d8489cfbdc0a06343f65
+    substituteInPlace meson.build \
+      --replace "required: vapi_opt)" "required: vapi_opt, native: false)"
+
+    patchShebangs libsoup/
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+      freeze = true;
+    };
+  };
+
+  meta = {
+    description = "HTTP client/server library for GNOME";
+    homepage = "https://wiki.gnome.org/Projects/libsoup";
+    license = lib.licenses.lgpl2Plus;
+    inherit (glib.meta) maintainers platforms;
+    pkgConfigModules = [
+      "libsoup-2.4"
+      "libsoup-gnome-2.4"
+    ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libspatialaudio/default.nix b/nixpkgs/pkgs/development/libraries/libspatialaudio/default.nix
new file mode 100644
index 000000000000..a97a46f357a6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libspatialaudio/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, cmake, fetchFromGitHub, libmysofa, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "libspatialaudio";
+  version = "0.3.0";
+
+  src = fetchFromGitHub {
+    owner = "videolabs";
+    repo = "libspatialaudio";
+    rev = version;
+    hash = "sha256-sPnQPD41AceXM4uGqWXMYhuQv0TUkA6TZP8ChxUFIoI=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ libmysofa zlib ];
+
+  postFixup = ''
+    substituteInPlace "''${!outputDev}/lib/pkgconfig/spatialaudio.pc" \
+      --replace '-L${lib.getDev libmysofa}' '-L${lib.getLib libmysofa}'
+  '';
+
+  meta = with lib; {
+    description =
+      "Ambisonic encoding / decoding and binauralization library in C++";
+    homepage = "https://github.com/videolabs/libspatialaudio";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ krav ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libspatialindex/default.nix b/nixpkgs/pkgs/development/libraries/libspatialindex/default.nix
new file mode 100644
index 000000000000..e1f93c822471
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libspatialindex/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake }:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libspatialindex";
+  version = "1.9.3";
+
+  src = fetchFromGitHub {
+    owner = "libspatialindex";
+    repo = "libspatialindex";
+    rev = finalAttrs.version;
+    hash = "sha256-zsvS0IkCXyuNLCQpccKdAsFKoq0l+y66ifXlTHLNTkc=";
+  };
+
+  patches = [
+    # Allow building static libs
+    (fetchpatch {
+      name = "fix-static-lib-build.patch";
+      url = "https://github.com/libspatialindex/libspatialindex/commit/caee28d84685071da3ff3a4ea57ff0b6ae64fc87.patch";
+      hash = "sha256-nvTW/t9tw1ZLeycJY8nj7rQgZogxQb765Ca2b9NDvRo=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [
+    "-DSIDX_BUILD_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Extensible spatial index library in C++";
+    homepage = "https://libspatialindex.org";
+    license = licenses.mit;
+    maintainers = teams.geospatial.members;
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libspatialite/default.nix b/nixpkgs/pkgs/development/libraries/libspatialite/default.nix
new file mode 100644
index 000000000000..b8d1fe45e44e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libspatialite/default.nix
@@ -0,0 +1,69 @@
+{ lib
+, stdenv
+, fetchurl
+, pkg-config
+, validatePkgConfig
+, freexl
+, geos
+, librttopo
+, libxml2
+, minizip
+, proj
+, sqlite
+, libiconv
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libspatialite";
+  version = "5.1.0";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "https://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-${version}.tar.gz";
+    hash = "sha256-Q74t00na/+AW3RQAxdEShYKMIv6jXKUQnyHz7VBgUIA=";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+    validatePkgConfig
+    geos # for geos-config
+  ];
+
+  buildInputs = [
+    freexl
+    geos
+    librttopo
+    libxml2
+    minizip
+    proj
+    sqlite
+  ] ++ lib.optionals stdenv.isDarwin [
+    libiconv
+  ];
+
+  enableParallelBuilding = true;
+
+  postInstall = lib.optionalString stdenv.isDarwin ''
+    ln -s $out/lib/mod_spatialite.{so,dylib}
+  '';
+
+  # Failed tests (linux & darwin):
+  # - check_virtualtable6
+  # - check_drop_rename
+  doCheck = false;
+
+  preCheck = ''
+    export LD_LIBRARY_PATH=$(pwd)/src/.libs
+    export DYLD_LIBRARY_PATH=$(pwd)/src/.libs
+  '';
+
+  meta = with lib; {
+    description = "Extensible spatial index library in C++";
+    homepage = "https://www.gaia-gis.it/fossil/libspatialite";
+    # They allow any of these
+    license = with licenses; [ gpl2Plus lgpl21Plus mpl11 ];
+    platforms = platforms.unix;
+    maintainers = with maintainers; teams.geospatial.members ++ [ dotlambda ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libspectre/default.nix b/nixpkgs/pkgs/development/libraries/libspectre/default.nix
new file mode 100644
index 000000000000..9299e4dbfb13
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libspectre/default.nix
@@ -0,0 +1,38 @@
+{ fetchurl, lib, stdenv, pkg-config, ghostscript, cairo }:
+
+stdenv.mkDerivation rec {
+  pname = "libspectre";
+  version = "0.2.12";
+
+  src = fetchurl {
+    url = "https://libspectre.freedesktop.org/releases/${pname}-${version}.tar.gz";
+    hash = "sha256-VadRfNNXK9JWXfDPRQlEoE1Sc7J567NpqJU5GVfw+WA=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [
+    # Need `libgs.so'.
+    ghostscript
+  ];
+
+  doCheck = true;
+
+  checkInputs = [
+    cairo
+  ];
+
+  meta = {
+    homepage = "http://libspectre.freedesktop.org/";
+    description = "PostScript rendering library";
+
+    longDescription = ''
+      libspectre is a small library for rendering Postscript
+      documents.  It provides a convenient easy to use API for
+      handling and rendering Postscript documents.
+    '';
+
+    license = lib.licenses.gpl2Plus;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libspectrum/default.nix b/nixpkgs/pkgs/development/libraries/libspectrum/default.nix
new file mode 100644
index 000000000000..3dda20ab6128
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libspectrum/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl, perl, pkg-config, audiofile, bzip2, glib, libgcrypt, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "libspectrum";
+  version = "1.5.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/fuse-emulator/${pname}-${version}.tar.gz";
+    sha256 = "sha256-o1PLRumxooEGHYFjU+oBDQpv545qF6oLe3QnHKXkrPw=";
+  };
+
+  nativeBuildInputs = [ perl pkg-config ];
+
+  buildInputs = [ audiofile bzip2 glib libgcrypt zlib ];
+
+  enableParallelBuilding = true;
+  doCheck = true;
+
+  meta = with lib; {
+    homepage = "https://fuse-emulator.sourceforge.net/libspectrum.php";
+    description = "ZX Spectrum input and output support library";
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ orivej ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libspelling/default.nix b/nixpkgs/pkgs/development/libraries/libspelling/default.nix
new file mode 100644
index 000000000000..812dddcc4a17
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libspelling/default.nix
@@ -0,0 +1,63 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, meson
+, ninja
+, pkg-config
+, gobject-introspection
+, vala
+, gi-docgen
+, glib
+, gtk4
+, gtksourceview5
+, enchant
+, icu
+, nix-update-script
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libspelling";
+  version = "0.2.0";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchFromGitLab {
+    domain = "gitlab.gnome.org";
+    owner = "chergert";
+    repo = "libspelling";
+    rev = version;
+    hash = "sha256-OOSQgdtnEx6/5yKwavCGdY/5L0Mr3XW0Srmd42ZTdUk=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gobject-introspection
+    vala
+    gi-docgen
+  ];
+
+  buildInputs = [
+    glib
+    gtk4
+    gtksourceview5
+    enchant
+    icu
+  ];
+
+  postFixup = ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  passthru.updateScript = nix-update-script { };
+
+  meta = with lib; {
+    description = "Spellcheck library for GTK 4";
+    homepage = "https://gitlab.gnome.org/chergert/libspelling";
+    license = licenses.lgpl21Plus;
+    changelog = "https://gitlab.gnome.org/chergert/libspelling/-/raw/${version}/NEWS";
+    maintainers = with maintainers; [ chuangzhu ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libspf2/default.nix b/nixpkgs/pkgs/development/libraries/libspf2/default.nix
new file mode 100644
index 000000000000..d8746f72f3b5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libspf2/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "libspf2";
+  version = "2.2.13";
+
+  src = fetchFromGitHub {
+    owner = "helsinki-systems";
+    repo = "libspf2";
+    rev = "v${version}";
+    hash = "sha256-tkCHP3B1sBb0+scHBjX5lCvaeSrZryfaGKye02LFlYs=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+  strictDeps = true;
+
+  postPatch = ''
+    # disable static bins compilation
+    sed -i \
+      -e '/bin_PROGRAMS/s/spfquery_static//' src/spfquery/Makefile.am \
+      -e '/bin_PROGRAMS/s/spftest_static//' src/spftest/Makefile.am \
+      -e '/bin_PROGRAMS/s/spfd_static//' src/spfd/Makefile.am \
+      -e '/bin_PROGRAMS/s/spf_example_static//' src/spf_example/Makefile.am
+  '';
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Implementation of the Sender Policy Framework for SMTP " +
+                  "authorization (Helsinki Systems fork)";
+    homepage = "https://github.com/helsinki-systems/libspf2";
+    license = with licenses; [ lgpl21Plus bsd2 ];
+    maintainers = with maintainers; [ pacien ] ++ teams.helsinki-systems.members;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libspiro/default.nix b/nixpkgs/pkgs/development/libraries/libspiro/default.nix
new file mode 100644
index 000000000000..780ca0ebdc73
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libspiro/default.nix
@@ -0,0 +1,22 @@
+{lib, stdenv, pkg-config, autoreconfHook, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "libspiro";
+  version = "20221101";
+
+  src = fetchFromGitHub {
+    owner = "fontforge";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-/9UCrdq69RO22593qiA8pZ4qfY9UVGqlGYB9zatsOgw=";
+  };
+
+  nativeBuildInputs = [ pkg-config autoreconfHook ];
+
+  meta = with lib; {
+    description = "A library that simplifies the drawing of beautiful curves";
+    homepage = "https://github.com/fontforge/libspiro";
+    license = licenses.gpl3Plus;
+    maintainers = [ maintainers.erictapen ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libspnav/configure-socket-path.patch b/nixpkgs/pkgs/development/libraries/libspnav/configure-socket-path.patch
new file mode 100644
index 000000000000..9a8ef0d49811
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libspnav/configure-socket-path.patch
@@ -0,0 +1,47 @@
+diff --git a/spnav.c b/spnav.c
+index f9e10f8..27149f7 100644
+--- a/spnav.c
++++ b/spnav.c
+@@ -36,7 +36,7 @@ OF SUCH DAMAGE.
+ #include <sys/select.h>
+ #include "spnav.h"
+ 
+-#define SPNAV_SOCK_PATH "/var/run/spnav.sock"
++#define DEFAULT_SPNAV_SOCK_PATH "/run/spnav.sock"
+ 
+ #ifdef USE_X11
+ #include <X11/Xlib.h>
+@@ -70,6 +70,24 @@ static struct event_node *ev_queue, *ev_queue_tail;
+ /* AF_UNIX socket used for alternative communication with daemon */
+ static int sock = -1;
+ 
++static char *spath = NULL;
++
++static char *socket_path()
++{
++	char *xdg_runtime_dir;
++	if((xdg_runtime_dir = getenv("XDG_RUNTIME_DIR"))) {
++		if ( spath == NULL ) {
++			spath = malloc(strlen(xdg_runtime_dir) + strlen("/spnav.sock") + 1);
++			if ( spath != NULL ) {
++				sprintf(spath, "%s/spnav.sock", xdg_runtime_dir);
++			}
++		}
++		if(access(spath, F_OK) != -1){
++			return spath;
++		}
++	}
++	return DEFAULT_SPNAV_SOCK_PATH;
++}
+ 
+ int spnav_open(void)
+ {
+@@ -92,7 +110,7 @@ int spnav_open(void)
+ 
+ 	memset(&addr, 0, sizeof addr);
+ 	addr.sun_family = AF_UNIX;
+-	strncpy(addr.sun_path, SPNAV_SOCK_PATH, sizeof(addr.sun_path));
++	strncpy(addr.sun_path, socket_path(), sizeof(addr.sun_path));
+ 
+ 
+ 	if(connect(s, (struct sockaddr*)&addr, sizeof addr) == -1) {
diff --git a/nixpkgs/pkgs/development/libraries/libspnav/default.nix b/nixpkgs/pkgs/development/libraries/libspnav/default.nix
new file mode 100644
index 000000000000..d67b12a726b4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libspnav/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, lib, fetchFromGitHub, libX11, fixDarwinDylibNames }:
+
+stdenv.mkDerivation rec {
+  version = "0.2.3";
+  pname = "libspnav";
+
+  src = fetchFromGitHub {
+    owner = "FreeSpacenav";
+    repo = "libspnav";
+    rev = "${pname}-${version}";
+    sha256 = "098h1jhlj87axpza5zgy58prp0zn94wyrbch6x0s7q4mzh7dc8ba";
+  };
+
+  nativeBuildInputs = lib.optional stdenv.isDarwin fixDarwinDylibNames;
+  buildInputs = [ libX11 ];
+
+  patches = [
+    # Changes the socket path from /run/spnav.sock to $XDG_RUNTIME_DIR/spnav.sock
+    # to allow for a user service
+    ./configure-socket-path.patch
+  ];
+
+  configureFlags = [ "--disable-debug"];
+  makeFlags = [
+    "CC=${stdenv.cc.targetPrefix}cc"
+    "AR=${stdenv.cc.targetPrefix}ar"
+  ];
+
+  preInstall = ''
+    mkdir -p $out/{lib,include}
+  '';
+
+  meta = with lib; {
+    homepage = "https://spacenav.sourceforge.net/";
+    description = "Device driver and SDK for 3Dconnexion 3D input devices";
+    longDescription = "A free, compatible alternative, to the proprietary 3Dconnexion device driver and SDK, for their 3D input devices (called 'space navigator', 'space pilot', 'space traveller', etc)";
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ sohalt ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libspng/default.nix b/nixpkgs/pkgs/development/libraries/libspng/default.nix
new file mode 100644
index 000000000000..5377c75b1842
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libspng/default.nix
@@ -0,0 +1,57 @@
+{ lib
+, fetchFromGitHub
+, stdenv
+, zlib
+, ninja
+, meson
+, pkg-config
+, cmake
+, libpng
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libspng";
+  version = "0.7.4";
+
+  src = fetchFromGitHub {
+    owner = "randy408";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-BiRuPQEKVJYYgfUsglIuxrBoJBFiQ0ygQmAFrVvCz4Q=";
+  };
+
+  doCheck = true;
+
+  mesonBuildType = "release";
+
+  mesonFlags = [
+    # this is required to enable testing
+    # https://github.com/randy408/libspng/blob/bc383951e9a6e04dbc0766f6737e873e0eedb40b/tests/README.md#testing
+    "-Ddev_build=true"
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  nativeCheckInputs = [
+    cmake
+    libpng
+  ];
+
+  buildInputs = [
+    zlib
+  ];
+
+  nativeBuildInputs = [
+    ninja
+    meson
+    pkg-config
+  ];
+
+  meta = with lib; {
+    description = "Simple, modern libpng alternative";
+    homepage = "https://libspng.org/";
+    license = with licenses; [ bsd2 ];
+    maintainers = with maintainers; [ humancalico ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libsrs2/default.nix b/nixpkgs/pkgs/development/libraries/libsrs2/default.nix
new file mode 100644
index 000000000000..3da48f772545
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsrs2/default.nix
@@ -0,0 +1,18 @@
+{ stdenv, lib, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libsrs2";
+  version = "1.0.18";
+
+  src = fetchurl {
+    url = "https://www.libsrs2.org/srs/libsrs2-${version}.tar.gz";
+    sha256 = "9d1191b705d7587a5886736899001d04168392bbb6ed6345a057ade50943a492";
+  };
+
+  meta = {
+    description = "The next generation SRS library from the original designer of SRS";
+    license = with lib.licenses; [ gpl2 bsd3 ];
+    homepage = "https://www.libsrs2.org/";
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libssh/default.nix b/nixpkgs/pkgs/development/libraries/libssh/default.nix
new file mode 100644
index 000000000000..15f8fab50889
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libssh/default.nix
@@ -0,0 +1,58 @@
+{ lib
+, stdenv
+, fetchurl
+, pkg-config
+, cmake
+, zlib
+, openssl
+, libsodium
+
+# for passthru.tests
+, ffmpeg
+, sshping
+, wireshark
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libssh";
+  version = "0.10.6";
+
+  src = fetchurl {
+    url = "https://www.libssh.org/files/${lib.versions.majorMinor version}/libssh-${version}.tar.xz";
+    hash = "sha256-GGHUmPW28XQbarxz5ghHhJHtz5ydS2Yw7vbnRZbencE=";
+  };
+
+  # Do not split 'dev' output until lib/cmake/libssh/libssh-config.cmake
+  # is fixed to point INTERFACE_INCLUDE_DIRECTORIES to .dev output.
+  # Otherwise it breaks `plasma5Packages.kio-extras`:
+  #   https://hydra.nixos.org/build/221540008/nixlog/3/tail
+  #outputs = [ "out" "dev" ];
+
+  postPatch = ''
+    # Fix headers to use libsodium instead of NaCl
+    sed -i 's,nacl/,sodium/,g' ./include/libssh/curve25519.h src/curve25519.c
+  '';
+
+  # Don’t build examples, which are not installed and require additional dependencies not
+  # included in `buildInputs` such as libX11.
+  cmakeFlags = [ "-DWITH_EXAMPLES=OFF" ];
+
+  # single output, otherwise cmake and .pc files point to the wrong directory
+  # outputs = [ "out" "dev" ];
+
+  buildInputs = [ zlib openssl libsodium ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  passthru.tests = {
+    inherit ffmpeg sshping wireshark;
+  };
+
+  meta = with lib; {
+    description = "SSH client library";
+    homepage = "https://libssh.org";
+    license = licenses.lgpl2Plus;
+    maintainers = with maintainers; [ sander ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libssh2/CVE-2023-48795.patch b/nixpkgs/pkgs/development/libraries/libssh2/CVE-2023-48795.patch
new file mode 100644
index 000000000000..c89e4a137b72
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libssh2/CVE-2023-48795.patch
@@ -0,0 +1,459 @@
+From d34d9258b8420b19ec3f97b4cc5bf7aa7d98e35a Mon Sep 17 00:00:00 2001
+From: Michael Buckley <michael@buckleyisms.com>
+Date: Thu, 30 Nov 2023 15:08:02 -0800
+Subject: [PATCH] src: add 'strict KEX' to fix CVE-2023-48795 "Terrapin Attack"
+
+Refs:
+https://terrapin-attack.com/
+https://seclists.org/oss-sec/2023/q4/292
+https://osv.dev/list?ecosystem=&q=CVE-2023-48795
+https://github.com/advisories/GHSA-45x7-px36-x8w8
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-48795
+
+Fixes #1290
+Closes #1291
+---
+ src/kex.c          | 63 +++++++++++++++++++++++------------
+ src/libssh2_priv.h | 18 +++++++---
+ src/packet.c       | 83 +++++++++++++++++++++++++++++++++++++++++++---
+ src/packet.h       |  2 +-
+ src/session.c      |  3 ++
+ src/transport.c    | 12 ++++++-
+ 6 files changed, 149 insertions(+), 32 deletions(-)
+
+diff --git a/src/kex.c b/src/kex.c
+index 8e7b7f0af3..a7b301e157 100644
+--- a/src/kex.c
++++ b/src/kex.c
+@@ -3032,6 +3032,13 @@ kex_method_extension_negotiation = {
+     0,
+ };
+ 
++static const LIBSSH2_KEX_METHOD
++kex_method_strict_client_extension = {
++    "kex-strict-c-v00@openssh.com",
++    NULL,
++    0,
++};
++
+ static const LIBSSH2_KEX_METHOD *libssh2_kex_methods[] = {
+ #if LIBSSH2_ED25519
+     &kex_method_ssh_curve25519_sha256,
+@@ -3050,6 +3057,7 @@ static const LIBSSH2_KEX_METHOD *libssh2_kex_methods[] = {
+     &kex_method_diffie_helman_group1_sha1,
+     &kex_method_diffie_helman_group_exchange_sha1,
+     &kex_method_extension_negotiation,
++    &kex_method_strict_client_extension,
+     NULL
+ };
+ 
+@@ -3302,13 +3310,13 @@ static int kexinit(LIBSSH2_SESSION * session)
+     return 0;
+ }
+ 
+-/* kex_agree_instr
++/* _libssh2_kex_agree_instr
+  * Kex specific variant of strstr()
+  * Needle must be preceded by BOL or ',', and followed by ',' or EOL
+  */
+-static unsigned char *
+-kex_agree_instr(unsigned char *haystack, size_t haystack_len,
+-                const unsigned char *needle, size_t needle_len)
++unsigned char *
++_libssh2_kex_agree_instr(unsigned char *haystack, size_t haystack_len,
++                         const unsigned char *needle, size_t needle_len)
+ {
+     unsigned char *s;
+     unsigned char *end_haystack;
+@@ -3393,7 +3401,7 @@ static int kex_agree_hostkey(LIBSSH2_SESSION * session,
+         while(s && *s) {
+             unsigned char *p = (unsigned char *) strchr((char *) s, ',');
+             size_t method_len = (p ? (size_t)(p - s) : strlen((char *) s));
+-            if(kex_agree_instr(hostkey, hostkey_len, s, method_len)) {
++            if(_libssh2_kex_agree_instr(hostkey, hostkey_len, s, method_len)) {
+                 const LIBSSH2_HOSTKEY_METHOD *method =
+                     (const LIBSSH2_HOSTKEY_METHOD *)
+                     kex_get_method_by_name((char *) s, method_len,
+@@ -3427,9 +3435,9 @@ static int kex_agree_hostkey(LIBSSH2_SESSION * session,
+     }
+ 
+     while(hostkeyp && (*hostkeyp) && (*hostkeyp)->name) {
+-        s = kex_agree_instr(hostkey, hostkey_len,
+-                            (unsigned char *) (*hostkeyp)->name,
+-                            strlen((*hostkeyp)->name));
++        s = _libssh2_kex_agree_instr(hostkey, hostkey_len,
++                                     (unsigned char *) (*hostkeyp)->name,
++                                     strlen((*hostkeyp)->name));
+         if(s) {
+             /* So far so good, but does it suit our purposes? (Encrypting vs
+                Signing) */
+@@ -3463,6 +3471,12 @@ static int kex_agree_kex_hostkey(LIBSSH2_SESSION * session, unsigned char *kex,
+ {
+     const LIBSSH2_KEX_METHOD **kexp = libssh2_kex_methods;
+     unsigned char *s;
++    const unsigned char *strict =
++        (unsigned char *)"kex-strict-s-v00@openssh.com";
++
++    if(_libssh2_kex_agree_instr(kex, kex_len, strict, 28)) {
++        session->kex_strict = 1;
++    }
+ 
+     if(session->kex_prefs) {
+         s = (unsigned char *) session->kex_prefs;
+@@ -3470,7 +3484,7 @@ static int kex_agree_kex_hostkey(LIBSSH2_SESSION * session, unsigned char *kex,
+         while(s && *s) {
+             unsigned char *q, *p = (unsigned char *) strchr((char *) s, ',');
+             size_t method_len = (p ? (size_t)(p - s) : strlen((char *) s));
+-            q = kex_agree_instr(kex, kex_len, s, method_len);
++            q = _libssh2_kex_agree_instr(kex, kex_len, s, method_len);
+             if(q) {
+                 const LIBSSH2_KEX_METHOD *method = (const LIBSSH2_KEX_METHOD *)
+                     kex_get_method_by_name((char *) s, method_len,
+@@ -3504,9 +3518,9 @@ static int kex_agree_kex_hostkey(LIBSSH2_SESSION * session, unsigned char *kex,
+     }
+ 
+     while(*kexp && (*kexp)->name) {
+-        s = kex_agree_instr(kex, kex_len,
+-                            (unsigned char *) (*kexp)->name,
+-                            strlen((*kexp)->name));
++        s = _libssh2_kex_agree_instr(kex, kex_len,
++                                     (unsigned char *) (*kexp)->name,
++                                     strlen((*kexp)->name));
+         if(s) {
+             /* We've agreed on a key exchange method,
+              * Can we agree on a hostkey that works with this kex?
+@@ -3550,7 +3564,7 @@ static int kex_agree_crypt(LIBSSH2_SESSION * session,
+             unsigned char *p = (unsigned char *) strchr((char *) s, ',');
+             size_t method_len = (p ? (size_t)(p - s) : strlen((char *) s));
+ 
+-            if(kex_agree_instr(crypt, crypt_len, s, method_len)) {
++            if(_libssh2_kex_agree_instr(crypt, crypt_len, s, method_len)) {
+                 const LIBSSH2_CRYPT_METHOD *method =
+                     (const LIBSSH2_CRYPT_METHOD *)
+                     kex_get_method_by_name((char *) s, method_len,
+@@ -3572,9 +3586,9 @@ static int kex_agree_crypt(LIBSSH2_SESSION * session,
+     }
+ 
+     while(*cryptp && (*cryptp)->name) {
+-        s = kex_agree_instr(crypt, crypt_len,
+-                            (unsigned char *) (*cryptp)->name,
+-                            strlen((*cryptp)->name));
++        s = _libssh2_kex_agree_instr(crypt, crypt_len,
++                                     (unsigned char *) (*cryptp)->name,
++                                     strlen((*cryptp)->name));
+         if(s) {
+             endpoint->crypt = *cryptp;
+             return 0;
+@@ -3614,7 +3628,7 @@ static int kex_agree_mac(LIBSSH2_SESSION * session,
+             unsigned char *p = (unsigned char *) strchr((char *) s, ',');
+             size_t method_len = (p ? (size_t)(p - s) : strlen((char *) s));
+ 
+-            if(kex_agree_instr(mac, mac_len, s, method_len)) {
++            if(_libssh2_kex_agree_instr(mac, mac_len, s, method_len)) {
+                 const LIBSSH2_MAC_METHOD *method = (const LIBSSH2_MAC_METHOD *)
+                     kex_get_method_by_name((char *) s, method_len,
+                                            (const LIBSSH2_COMMON_METHOD **)
+@@ -3635,8 +3649,9 @@ static int kex_agree_mac(LIBSSH2_SESSION * session,
+     }
+ 
+     while(*macp && (*macp)->name) {
+-        s = kex_agree_instr(mac, mac_len, (unsigned char *) (*macp)->name,
+-                            strlen((*macp)->name));
++        s = _libssh2_kex_agree_instr(mac, mac_len,
++                                     (unsigned char *) (*macp)->name,
++                                     strlen((*macp)->name));
+         if(s) {
+             endpoint->mac = *macp;
+             return 0;
+@@ -3667,7 +3682,7 @@ static int kex_agree_comp(LIBSSH2_SESSION *session,
+             unsigned char *p = (unsigned char *) strchr((char *) s, ',');
+             size_t method_len = (p ? (size_t)(p - s) : strlen((char *) s));
+ 
+-            if(kex_agree_instr(comp, comp_len, s, method_len)) {
++            if(_libssh2_kex_agree_instr(comp, comp_len, s, method_len)) {
+                 const LIBSSH2_COMP_METHOD *method =
+                     (const LIBSSH2_COMP_METHOD *)
+                     kex_get_method_by_name((char *) s, method_len,
+@@ -3689,8 +3704,9 @@ static int kex_agree_comp(LIBSSH2_SESSION *session,
+     }
+ 
+     while(*compp && (*compp)->name) {
+-        s = kex_agree_instr(comp, comp_len, (unsigned char *) (*compp)->name,
+-                            strlen((*compp)->name));
++        s = _libssh2_kex_agree_instr(comp, comp_len,
++                                     (unsigned char *) (*compp)->name,
++                                     strlen((*compp)->name));
+         if(s) {
+             endpoint->comp = *compp;
+             return 0;
+@@ -3871,6 +3887,7 @@ _libssh2_kex_exchange(LIBSSH2_SESSION * session, int reexchange,
+                 session->local.kexinit = key_state->oldlocal;
+                 session->local.kexinit_len = key_state->oldlocal_len;
+                 key_state->state = libssh2_NB_state_idle;
++                session->state &= ~LIBSSH2_STATE_INITIAL_KEX;
+                 session->state &= ~LIBSSH2_STATE_KEX_ACTIVE;
+                 session->state &= ~LIBSSH2_STATE_EXCHANGING_KEYS;
+                 return -1;
+@@ -3896,6 +3913,7 @@ _libssh2_kex_exchange(LIBSSH2_SESSION * session, int reexchange,
+                 session->local.kexinit = key_state->oldlocal;
+                 session->local.kexinit_len = key_state->oldlocal_len;
+                 key_state->state = libssh2_NB_state_idle;
++                session->state &= ~LIBSSH2_STATE_INITIAL_KEX;
+                 session->state &= ~LIBSSH2_STATE_KEX_ACTIVE;
+                 session->state &= ~LIBSSH2_STATE_EXCHANGING_KEYS;
+                 return -1;
+@@ -3944,6 +3962,7 @@ _libssh2_kex_exchange(LIBSSH2_SESSION * session, int reexchange,
+         session->remote.kexinit = NULL;
+     }
+ 
++    session->state &= ~LIBSSH2_STATE_INITIAL_KEX;
+     session->state &= ~LIBSSH2_STATE_KEX_ACTIVE;
+     session->state &= ~LIBSSH2_STATE_EXCHANGING_KEYS;
+ 
+diff --git a/src/libssh2_priv.h b/src/libssh2_priv.h
+index 7660366954..18d9ab2130 100644
+--- a/src/libssh2_priv.h
++++ b/src/libssh2_priv.h
+@@ -736,6 +736,9 @@ struct _LIBSSH2_SESSION
+     /* key signing algorithm preferences -- NULL yields server order */
+     char *sign_algo_prefs;
+ 
++    /* Whether to use the OpenSSH Strict KEX extension */
++    int kex_strict;
++
+     /* (remote as source of data -- packet_read ) */
+     libssh2_endpoint_data remote;
+ 
+@@ -908,6 +911,7 @@ struct _LIBSSH2_SESSION
+     int fullpacket_macstate;
+     size_t fullpacket_payload_len;
+     int fullpacket_packet_type;
++    uint32_t fullpacket_required_type;
+ 
+     /* State variables used in libssh2_sftp_init() */
+     libssh2_nonblocking_states sftpInit_state;
+@@ -948,10 +952,11 @@ struct _LIBSSH2_SESSION
+ };
+ 
+ /* session.state bits */
+-#define LIBSSH2_STATE_EXCHANGING_KEYS   0x00000001
+-#define LIBSSH2_STATE_NEWKEYS           0x00000002
+-#define LIBSSH2_STATE_AUTHENTICATED     0x00000004
+-#define LIBSSH2_STATE_KEX_ACTIVE        0x00000008
++#define LIBSSH2_STATE_INITIAL_KEX       0x00000001
++#define LIBSSH2_STATE_EXCHANGING_KEYS   0x00000002
++#define LIBSSH2_STATE_NEWKEYS           0x00000004
++#define LIBSSH2_STATE_AUTHENTICATED     0x00000008
++#define LIBSSH2_STATE_KEX_ACTIVE        0x00000010
+ 
+ /* session.flag helpers */
+ #ifdef MSG_NOSIGNAL
+@@ -1182,6 +1187,11 @@ ssize_t _libssh2_send(libssh2_socket_t socket, const void *buffer,
+ int _libssh2_kex_exchange(LIBSSH2_SESSION * session, int reexchange,
+                           key_exchange_state_t * state);
+ 
++unsigned char *_libssh2_kex_agree_instr(unsigned char *haystack,
++                                        size_t haystack_len,
++                                        const unsigned char *needle,
++                                        size_t needle_len);
++
+ /* Let crypt.c/hostkey.c expose their method structs */
+ const LIBSSH2_CRYPT_METHOD **libssh2_crypt_methods(void);
+ const LIBSSH2_HOSTKEY_METHOD **libssh2_hostkey_methods(void);
+diff --git a/src/packet.c b/src/packet.c
+index eccb8c56a8..6da14e9fa1 100644
+--- a/src/packet.c
++++ b/src/packet.c
+@@ -624,14 +624,13 @@ packet_authagent_open(LIBSSH2_SESSION * session,
+  * layer when it has received a packet.
+  *
+  * The input pointer 'data' is pointing to allocated data that this function
+- * is asked to deal with so on failure OR success, it must be freed fine.
+- * The only exception is when the return code is LIBSSH2_ERROR_EAGAIN.
++ * will be freed unless return the code is LIBSSH2_ERROR_EAGAIN.
+  *
+  * This function will always be called with 'datalen' greater than zero.
+  */
+ int
+ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data,
+-                    size_t datalen, int macstate)
++                    size_t datalen, int macstate, uint32_t seq)
+ {
+     int rc = 0;
+     unsigned char *message = NULL;
+@@ -676,6 +675,70 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data,
+         break;
+     }
+ 
++    if(session->state & LIBSSH2_STATE_INITIAL_KEX) {
++        if(msg == SSH_MSG_KEXINIT) {
++            if(!session->kex_strict) {
++                if(datalen < 17) {
++                    LIBSSH2_FREE(session, data);
++                    session->packAdd_state = libssh2_NB_state_idle;
++                    return _libssh2_error(session,
++                                          LIBSSH2_ERROR_BUFFER_TOO_SMALL,
++                                          "Data too short extracting kex");
++                }
++                else {
++                    const unsigned char *strict =
++                    (unsigned char *)"kex-strict-s-v00@openssh.com";
++                    struct string_buf buf;
++                    unsigned char *algs = NULL;
++                    size_t algs_len = 0;
++
++                    buf.data = (unsigned char *)data;
++                    buf.dataptr = buf.data;
++                    buf.len = datalen;
++                    buf.dataptr += 17; /* advance past type and cookie */
++
++                    if(_libssh2_get_string(&buf, &algs, &algs_len)) {
++                        LIBSSH2_FREE(session, data);
++                        session->packAdd_state = libssh2_NB_state_idle;
++                        return _libssh2_error(session,
++                                              LIBSSH2_ERROR_BUFFER_TOO_SMALL,
++                                              "Algs too short");
++                    }
++
++                    if(algs_len == 0 ||
++                       _libssh2_kex_agree_instr(algs, algs_len, strict, 28)) {
++                        session->kex_strict = 1;
++                    }
++                }
++            }
++
++            if(session->kex_strict && seq) {
++                LIBSSH2_FREE(session, data);
++                session->socket_state = LIBSSH2_SOCKET_DISCONNECTED;
++                session->packAdd_state = libssh2_NB_state_idle;
++                libssh2_session_disconnect(session, "strict KEX violation: "
++                                           "KEXINIT was not the first packet");
++
++                return _libssh2_error(session, LIBSSH2_ERROR_SOCKET_DISCONNECT,
++                                      "strict KEX violation: "
++                                      "KEXINIT was not the first packet");
++            }
++        }
++
++        if(session->kex_strict && session->fullpacket_required_type &&
++            session->fullpacket_required_type != msg) {
++            LIBSSH2_FREE(session, data);
++            session->socket_state = LIBSSH2_SOCKET_DISCONNECTED;
++            session->packAdd_state = libssh2_NB_state_idle;
++            libssh2_session_disconnect(session, "strict KEX violation: "
++                                       "unexpected packet type");
++
++            return _libssh2_error(session, LIBSSH2_ERROR_SOCKET_DISCONNECT,
++                                  "strict KEX violation: "
++                                  "unexpected packet type");
++        }
++    }
++
+     if(session->packAdd_state == libssh2_NB_state_allocated) {
+         /* A couple exceptions to the packet adding rule: */
+         switch(msg) {
+@@ -1364,6 +1427,15 @@ _libssh2_packet_ask(LIBSSH2_SESSION * session, unsigned char packet_type,
+ 
+             return 0;
+         }
++        else if(session->kex_strict &&
++                (session->state & LIBSSH2_STATE_INITIAL_KEX)) {
++            libssh2_session_disconnect(session, "strict KEX violation: "
++                                       "unexpected packet type");
++
++            return _libssh2_error(session, LIBSSH2_ERROR_SOCKET_DISCONNECT,
++                                  "strict KEX violation: "
++                                  "unexpected packet type");
++        }
+         packet = _libssh2_list_next(&packet->node);
+     }
+     return -1;
+@@ -1425,7 +1497,10 @@ _libssh2_packet_require(LIBSSH2_SESSION * session, unsigned char packet_type,
+     }
+ 
+     while(session->socket_state == LIBSSH2_SOCKET_CONNECTED) {
+-        int ret = _libssh2_transport_read(session);
++        int ret;
++        session->fullpacket_required_type = packet_type;
++        ret = _libssh2_transport_read(session);
++        session->fullpacket_required_type = 0;
+         if(ret == LIBSSH2_ERROR_EAGAIN)
+             return ret;
+         else if(ret < 0) {
+diff --git a/src/packet.h b/src/packet.h
+index 1d90b8af12..955351e5f6 100644
+--- a/src/packet.h
++++ b/src/packet.h
+@@ -72,6 +72,6 @@ int _libssh2_packet_burn(LIBSSH2_SESSION * session,
+ int _libssh2_packet_write(LIBSSH2_SESSION * session, unsigned char *data,
+                           unsigned long data_len);
+ int _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data,
+-                        size_t datalen, int macstate);
++                        size_t datalen, int macstate, uint32_t seq);
+ 
+ #endif /* LIBSSH2_PACKET_H */
+diff --git a/src/session.c b/src/session.c
+index 35e7929fe7..9d89ade8ec 100644
+--- a/src/session.c
++++ b/src/session.c
+@@ -469,6 +469,8 @@ libssh2_session_init_ex(LIBSSH2_ALLOC_FUNC((*my_alloc)),
+         session->abstract = abstract;
+         session->api_timeout = 0; /* timeout-free API by default */
+         session->api_block_mode = 1; /* blocking API by default */
++        session->state = LIBSSH2_STATE_INITIAL_KEX;
++        session->fullpacket_required_type = 0;
+         session->packet_read_timeout = LIBSSH2_DEFAULT_READ_TIMEOUT;
+         session->flag.quote_paths = 1; /* default behavior is to quote paths
+                                           for the scp subsystem */
+@@ -1223,6 +1225,7 @@ libssh2_session_disconnect_ex(LIBSSH2_SESSION *session, int reason,
+                               const char *desc, const char *lang)
+ {
+     int rc;
++    session->state &= ~LIBSSH2_STATE_INITIAL_KEX;
+     session->state &= ~LIBSSH2_STATE_EXCHANGING_KEYS;
+     BLOCK_ADJUST(rc, session,
+                  session_disconnect(session, reason, desc, lang));
+diff --git a/src/transport.c b/src/transport.c
+index 21be9d2b80..a8bb588a4b 100644
+--- a/src/transport.c
++++ b/src/transport.c
+@@ -186,6 +186,7 @@ fullpacket(LIBSSH2_SESSION * session, int encrypted /* 1 or 0 */ )
+     struct transportpacket *p = &session->packet;
+     int rc;
+     int compressed;
++    uint32_t seq = session->remote.seqno;
+ 
+     if(session->fullpacket_state == libssh2_NB_state_idle) {
+         session->fullpacket_macstate = LIBSSH2_MAC_CONFIRMED;
+@@ -317,7 +318,7 @@ fullpacket(LIBSSH2_SESSION * session, int encrypted /* 1 or 0 */ )
+     if(session->fullpacket_state == libssh2_NB_state_created) {
+         rc = _libssh2_packet_add(session, p->payload,
+                                  session->fullpacket_payload_len,
+-                                 session->fullpacket_macstate);
++                                 session->fullpacket_macstate, seq);
+         if(rc == LIBSSH2_ERROR_EAGAIN)
+             return rc;
+         if(rc) {
+@@ -328,6 +329,11 @@ fullpacket(LIBSSH2_SESSION * session, int encrypted /* 1 or 0 */ )
+ 
+     session->fullpacket_state = libssh2_NB_state_idle;
+ 
++    if(session->kex_strict &&
++        session->fullpacket_packet_type == SSH_MSG_NEWKEYS) {
++        session->remote.seqno = 0;
++    }
++
+     return session->fullpacket_packet_type;
+ }
+ 
+@@ -1093,6 +1099,10 @@ int _libssh2_transport_send(LIBSSH2_SESSION *session,
+ 
+     session->local.seqno++;
+ 
++    if(session->kex_strict && data[0] == SSH_MSG_NEWKEYS) {
++        session->local.seqno = 0;
++    }
++
+     ret = LIBSSH2_SEND(session, p->outbuf, total_length,
+                        LIBSSH2_SOCKET_SEND_FLAGS(session));
+     if(ret < 0)
diff --git a/nixpkgs/pkgs/development/libraries/libssh2/default.nix b/nixpkgs/pkgs/development/libraries/libssh2/default.nix
new file mode 100644
index 000000000000..f7a51da9fa67
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libssh2/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchurl, openssl, zlib, windows }:
+
+stdenv.mkDerivation rec {
+  pname = "libssh2";
+  version = "1.11.0";
+
+  src = fetchurl {
+    url = "https://www.libssh2.org/download/libssh2-${version}.tar.gz";
+    sha256 = "sha256-NzYWHkHiaTMk3rOMJs/cPv5iCdY0ukJY2xzs/2pa1GE=";
+  };
+
+  patches = [
+    # fetchpatch cannot be used due to infinite recursion
+    # https://github.com/libssh2/libssh2/commit/d34d9258b8420b19ec3f97b4cc5bf7aa7d98e35a
+    ./CVE-2023-48795.patch
+  ];
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  propagatedBuildInputs = [ openssl ]; # see Libs: in libssh2.pc
+  buildInputs = [ zlib ]
+    ++ lib.optional stdenv.hostPlatform.isMinGW windows.mingw_w64;
+
+  meta = with lib; {
+    description = "A client-side C library implementing the SSH2 protocol";
+    homepage = "https://www.libssh2.org";
+    platforms = platforms.all;
+    license = with licenses; [ bsd3 libssh2 ];
+    maintainers = with maintainers; [ SuperSandro2000 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libstatgrab/default.nix b/nixpkgs/pkgs/development/libraries/libstatgrab/default.nix
new file mode 100644
index 000000000000..d2a94d7168a8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libstatgrab/default.nix
@@ -0,0 +1,25 @@
+{ lib
+, stdenv
+, fetchurl
+, IOKit
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libstatgrab";
+  version = "0.92.1";
+
+  src = fetchurl {
+    url = "https://ftp.i-scream.org/pub/i-scream/libstatgrab/${pname}-${version}.tar.gz";
+    sha256 = "sha256-VoiqSmhVR9cXSoo3PqnY7pJ+dm48wwK97jRSPCxdbBE=";
+  };
+
+  buildInputs = lib.optional stdenv.isDarwin IOKit;
+
+  meta = with lib; {
+    homepage = "https://www.i-scream.org/libstatgrab/";
+    description = "A library that provides cross platforms access to statistics about the running system";
+    maintainers = with maintainers; [ ];
+    license = licenses.gpl2;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libstemmer/default.nix b/nixpkgs/pkgs/development/libraries/libstemmer/default.nix
new file mode 100644
index 000000000000..3f66ee92a72e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libstemmer/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchFromGitHub, perl, buildPackages }:
+
+stdenv.mkDerivation rec {
+  pname = "libstemmer";
+  version = "2.2.0";
+
+  src = fetchFromGitHub {
+    owner = "snowballstem";
+    repo = "snowball";
+    rev = "v${version}";
+    sha256 = "sha256-qXrypwv/I+5npvGHGsHveijoui0ZnoGYhskCfLkewVE=";
+  };
+
+  nativeBuildInputs = [ perl ];
+
+  prePatch = ''
+    patchShebangs .
+  '' + lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
+    substituteInPlace GNUmakefile \
+      --replace './snowball' '${lib.getBin buildPackages.libstemmer}/bin/snowball'
+  '';
+
+  makeTarget = "libstemmer.a";
+
+  installPhase = ''
+    runHook preInstall
+    install -Dt $out/lib libstemmer.a
+    install -Dt $out/include include/libstemmer.h
+    install -Dt $out/bin {snowball,stemwords}
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Snowball Stemming Algorithms";
+    homepage = "https://snowballstem.org/";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ fpletz ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libstroke/default.nix b/nixpkgs/pkgs/development/libraries/libstroke/default.nix
new file mode 100644
index 000000000000..698fa5c579f7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libstroke/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, fetchurl
+, automake
+, autoconf
+, libX11
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libstroke";
+  version = "0.5.1";
+
+  src = fetchurl {
+    url = "https://web.archive.org/web/20161204100704/http://etla.net/libstroke/${pname}-${version}.tar.gz";
+    sha256 = "0bbpqzsqh9zrc6cg62f6vp1p4dzvv37blsd0gdlzdskgwvyzba8d";
+  };
+
+  nativeBuildInputs = [ automake autoconf ];
+  buildInputs = [ libX11 ];
+
+  # libstroke ships with an ancient config.sub that doesn't know about x86_64, so regenerate it.
+  # Also, modern automake doesn't like things and returns error code 63.  But it generates the file.
+  preConfigure = ''
+      rm config.sub
+      autoconf
+      automake -a || true
+    '';
+
+  meta = {
+    description = "A library for simple gesture recognition";
+    homepage = "https://web.archive.org/web/20161204100704/http://etla.net/libstroke/";
+    license = lib.licenses.gpl2;
+
+    longDescription =
+      '' libstroke, last updated in 2001, still successfully provides a basic
+        gesture recognition engine based around a 3x3 grid.  It's simple and
+        easy to work with, and notably used by FVWM.
+      '';
+
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libstrophe/default.nix b/nixpkgs/pkgs/development/libraries/libstrophe/default.nix
new file mode 100644
index 000000000000..880d468cae05
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libstrophe/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, libtool
+, openssl
+, expat
+, pkg-config
+, check
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libstrophe";
+  version = "0.12.3";
+
+  src = fetchFromGitHub {
+    owner = "strophe";
+    repo = pname;
+    rev = version;
+    sha256 = "EDgdKJ7wqUoThy0t1r39p2lbn64uvTDoIqNCzhpWnZ8=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ openssl expat libtool check ];
+
+  dontDisableStatic = true;
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "A simple, lightweight C library for writing XMPP clients";
+    longDescription = ''
+      libstrophe is a lightweight XMPP client library written in C. It has
+      minimal dependencies and is configurable for various environments. It
+      runs well on both Linux, Unix, and Windows based platforms.
+    '';
+    homepage = "https://strophe.im/libstrophe/";
+    license = with licenses; [ gpl3Only mit ];
+    platforms = platforms.unix;
+    broken = stdenv.isDarwin;
+    maintainers = with maintainers; [ devhell flosse ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/libsurvive/default.nix b/nixpkgs/pkgs/development/libraries/libsurvive/default.nix
new file mode 100644
index 000000000000..dc282886b963
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsurvive/default.nix
@@ -0,0 +1,51 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, freeglut
+, lapack
+, libusb1
+, blas
+, zlib
+, eigen
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libsurvive";
+  version = "1.01";
+
+  src = fetchFromGitHub {
+    owner = "cntools";
+    repo = pname;
+    rev = "v${version}";
+    # Fixes 'Unknown CMake command "cnkalman_generate_code"'
+    fetchSubmodules = true;
+    sha256 = "sha256-NcxdTKra+YkLt/iu9+1QCeQZLV3/qlhma2Ns/+ZYVsk=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [
+    freeglut
+    lapack
+    libusb1
+    blas
+    zlib
+    eigen
+  ];
+
+  # https://github.com/cntools/libsurvive/issues/272
+  postPatch = ''
+    substituteInPlace survive.pc.in \
+      libs/cnkalman/cnkalman.pc.in libs/cnkalman/libs/cnmatrix/cnmatrix.pc.in \
+      --replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
+  '';
+
+  meta = with lib; {
+    description = "Open Source Lighthouse Tracking System";
+    homepage = "https://github.com/cntools/libsurvive";
+    license = licenses.mit;
+    maintainers = with maintainers; [ expipiplus1 prusnak ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libsv/default.nix b/nixpkgs/pkgs/development/libraries/libsv/default.nix
new file mode 100644
index 000000000000..9c6279937560
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsv/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "libsv";
+  version = "1.2";
+
+  src = fetchFromGitHub {
+    owner = "uael";
+    repo = "sv";
+    rev = "v${version}";
+    sha256 = "sha256-sc7WTRY8XTm5+J+zlS7tGa2f+2d7apj+XHyBafZXXeE=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "Public domain cross-platform semantic versioning in C99";
+    homepage = "https://github.com/uael/sv";
+    license = licenses.unlicense;
+    maintainers = [];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libsvm/default.nix b/nixpkgs/pkgs/development/libraries/libsvm/default.nix
new file mode 100644
index 000000000000..cd14660fb9f7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsvm/default.nix
@@ -0,0 +1,56 @@
+{ lib
+, stdenv
+, fetchurl
+, fixDarwinDylibNames
+, llvmPackages
+, withOpenMP ? true
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libsvm";
+  version = "3.32";
+
+  src = fetchurl {
+    url = "https://www.csie.ntu.edu.tw/~cjlin/libsvm/libsvm-${version}.tar.gz";
+    sha256 = "sha256-hkTMZRjKiLvFDYyOrRc08aubbxcBcEXvmuOHc6plPa0=";
+  };
+
+  patches = lib.optionals withOpenMP [ ./openmp.patch ];
+
+  buildInputs = lib.optionals (stdenv.cc.isClang && withOpenMP) [ llvmPackages.openmp ];
+
+  buildFlags = [ "lib" "all" ];
+
+  outputs = [ "out" "bin" "dev" ];
+
+  nativeBuildInputs = lib.optionals stdenv.isDarwin [ fixDarwinDylibNames ];
+
+  installPhase =
+    let
+      libSuff = stdenv.hostPlatform.extensions.sharedLibrary;
+      soVersion = "3";
+      libName = if stdenv.isDarwin then "libsvm.${soVersion}${libSuff}" else "libsvm${libSuff}.${soVersion}";
+    in
+    ''
+      runHook preInstall
+
+      install -D libsvm.so.${soVersion} $out/lib/${libName}
+      ln -s $out/lib/${libName} $out/lib/libsvm${libSuff}
+
+      install -Dt $bin/bin/ svm-scale svm-train svm-predict
+
+      install -Dm644 -t $dev/include svm.h
+      mkdir $dev/include/libsvm
+      ln -s $dev/include/svm.h $dev/include/libsvm/svm.h
+
+      runHook postInstall
+    '';
+
+  meta = with lib; {
+    description = "A library for support vector machines";
+    homepage = "https://www.csie.ntu.edu.tw/~cjlin/libsvm/";
+    license = licenses.bsd3;
+    maintainers = [ ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libsvm/openmp.patch b/nixpkgs/pkgs/development/libraries/libsvm/openmp.patch
new file mode 100644
index 000000000000..b48fbae1f43f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsvm/openmp.patch
@@ -0,0 +1,13 @@
+--- /Makefile	1970-01-01 01:00:01.000000000 +0100
++++ /Makefile	1970-01-01 01:00:01.000000000 +0100
+@@ -9,8 +9,8 @@
+ endif
+ 
+ # Uncomment the following lines to enable parallelization with OpenMP
+-# CFLAGS += -fopenmp
+-# SHARED_LIB_FLAG += -fopenmp
++CFLAGS += -fopenmp
++SHARED_LIB_FLAG += -fopenmp
+ 
+ all: svm-train svm-predict svm-scale
+ 
diff --git a/nixpkgs/pkgs/development/libraries/libsystemtap/default.nix b/nixpkgs/pkgs/development/libraries/libsystemtap/default.nix
new file mode 100644
index 000000000000..4ec9fea5a0e6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libsystemtap/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchgit
+, gettext
+, python3
+, elfutils
+}:
+
+stdenv.mkDerivation {
+  pname = "libsystemtap";
+  version = "5.0";
+
+  src = fetchgit {
+    url = "git://sourceware.org/git/systemtap.git";
+    rev = "release-5.0";
+    hash = "sha256-dIBpySBTFn01CNtYwbXEramUlcYHPF6O/Ffr1BxdAH0=";
+  };
+
+  dontBuild = true;
+
+  nativeBuildInputs = [ gettext python3 elfutils ];
+
+  installPhase = ''
+    mkdir -p $out/include
+    cp -r includes/* $out/include/
+  '';
+
+  meta = with lib; {
+    description = "Statically defined probes development files";
+    homepage = "https://sourceware.org/systemtap/";
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+    maintainers = [ lib.maintainers.farlion ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libtap/default.nix b/nixpkgs/pkgs/development/libraries/libtap/default.nix
new file mode 100644
index 000000000000..47ca65e8490e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libtap/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl, pkg-config, cmake, perl }:
+
+stdenv.mkDerivation rec {
+
+  pname = "libtap";
+  version = "1.14.0";
+
+  src = fetchurl {
+    url = "https://web-cpan.shlomifish.org/downloads/${pname}-${version}.tar.xz";
+    sha256 = "1ga7rqmppa8ady665736cx443icscqlgflkqmxd4xbkzypmdj9bk";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  propagatedBuildInputs = [ cmake perl ];
+
+  meta = with lib; {
+    description = "A library to implement a test protocol";
+    longDescription = ''
+      libtap is a library to implement the Test Anything Protocol for
+      C originally created by Nik Clayton. This is a maintenance
+      branch by Shlomi Fish.
+    '';
+    homepage = "https://www.shlomifish.org/open-source/projects/libtap/";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.AndersonTorres ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libtar/default.nix b/nixpkgs/pkgs/development/libraries/libtar/default.nix
new file mode 100644
index 000000000000..c6c89ecb4f08
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libtar/default.nix
@@ -0,0 +1,51 @@
+{ lib, stdenv, fetchgit, fetchpatch, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  version = "1.2.20";
+  pname = "libtar";
+
+  # Maintenance repo for libtar (Arch Linux uses this)
+  src = fetchgit {
+    url = "git://repo.or.cz/libtar.git";
+    rev = "refs/tags/v${version}";
+    sha256 = "1pjsqnqjaqgkzf1j8m6y5h76bwprffsjjj6gk8rh2fjsha14rqn9";
+  };
+
+  patches = let
+    fp =  name: sha256:
+      fetchpatch {
+        url = "https://sources.debian.net/data/main/libt/libtar/1.2.20-4/debian/patches/${name}.patch";
+        inherit sha256;
+      };
+    in [
+      (fetchpatch {
+        name = "no_static_buffers.patch";
+        url = "https://src.fedoraproject.org/rpms/libtar/raw/e25b692fc7ceaa387dafb865b472510754f51bd2/f/libtar-1.2.20-no-static-buffer.patch";
+        sha256 = "sha256-QcWOgdkNlALb+YDVneT1zCNAMf4d8IUm2kUUUy2VvJs=";
+      })
+      (fp "no_maxpathlen"             "11riv231wpbdb1cm4nbdwdsik97wny5sxcwdgknqbp61ibk572b7")
+      (fp "CVE-2013-4420"             "0d010190bqgr2ggy02qwxvjaymy9a22jmyfwdfh4086v876cbxpq")
+      (fp "th_get_size-unsigned-int"  "1ravbs5yrfac98mnkrzciw9hd2fxq4dc07xl3wx8y2pv1bzkwm41")
+      (fetchpatch {
+        name = "CVE-2021-33643_CVE-2021-33644.patch";
+        url = "https://src.fedoraproject.org/rpms/libtar/raw/e25b692fc7ceaa387dafb865b472510754f51bd2/f/libtar-1.2.20-CVE-2021-33643-CVE-2021-33644.patch";
+        sha256 = "sha256-HdjotTvKJNntkdcV+kR08Ht/MyNeB6qUT0qo67BBOVA=";
+      })
+      (fetchpatch {
+        name = "CVE-2021-33645_CVE-2021-33646_CVE-2021-33640.patch";
+        url = "https://src.fedoraproject.org/rpms/libtar/raw/e25b692fc7ceaa387dafb865b472510754f51bd2/f/libtar-1.2.20-CVE-2021-33645-CVE-2021-33646.patch";
+        sha256 = "sha256-p9DEFAL5Y+Ldy5c9Wj9h/BSg4TDxIxCjCQJD+wGQ7oI=";
+      })
+    ];
+
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ ];
+
+  meta = with lib; {
+    description = "C library for manipulating POSIX tar files";
+    homepage = "https://repo.or.cz/libtar";
+    license = licenses.bsd3;
+    platforms = with platforms; linux ++ darwin;
+    maintainers = [ maintainers.bjornfor ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libtasn1/default.nix b/nixpkgs/pkgs/development/libraries/libtasn1/default.nix
new file mode 100644
index 000000000000..a0b9cebef4d7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libtasn1/default.nix
@@ -0,0 +1,57 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, perl
+, texinfo
+
+# for passthru.tests
+, gnutls
+, samba
+, qemu
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libtasn1";
+  version = "4.19.0";
+
+  src = fetchurl {
+    url = "mirror://gnu/libtasn1/libtasn1-${version}.tar.gz";
+    sha256 = "sha256-FhPwrBz0hNbsDOO4wG1WJjzHJC8cI7MNgtI940WmP3o=";
+  };
+
+  # Patch borrowed from alpine to work around a specific test failure with musl libc
+  # Upstream is patching this test in their own CI because that CI is using alpine and thus musl
+  # https://github.com/gnutls/libtasn1/commit/06e7433c4e587e2ba6df521264138585a63d07c7#diff-037ea159eb0a7cb0ac23b851e66bee30fb838ee8d0d99fa331a1ba65283d37f7R293
+  patches = lib.optional stdenv.hostPlatform.isMusl (fetchpatch {
+    url = "https://git.alpinelinux.org/aports/plain/main/libtasn1/failed-test.patch?id=aaed9995acc1511d54d5d93e1ea3776caf4aa488";
+    sha256 = "sha256-GTfwqEelEsGtLEcBwGRfBZZz1vKXRfWXtMx/409YqX8=";
+  });
+
+  outputs = [ "out" "dev" "devdoc" ];
+  outputBin = "dev";
+
+  nativeBuildInputs = [ texinfo perl ];
+
+  doCheck = true;
+  preCheck = if stdenv.isDarwin then
+    "export DYLD_LIBRARY_PATH=`pwd`/lib/.libs"
+  else
+    null;
+
+  passthru.tests = {
+    inherit gnutls samba qemu;
+  };
+
+  meta = with lib; {
+    homepage = "https://www.gnu.org/software/libtasn1/";
+    description = "An ASN.1 library";
+    longDescription = ''
+      Libtasn1 is the ASN.1 library used by GnuTLS, GNU Shishi and some
+      other packages.  The goal of this implementation is to be highly
+      portable, and only require an ANSI C89 platform.
+    '';
+    license = licenses.lgpl2Plus;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libtcod/default.nix b/nixpkgs/pkgs/development/libraries/libtcod/default.nix
new file mode 100644
index 000000000000..3674f25b4659
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libtcod/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromBitbucket, cmake, SDL, libGLU, libGL, upx, zlib }:
+
+stdenv.mkDerivation {
+
+  pname = "libtcod";
+  version = "1.5.1";
+
+  src = fetchFromBitbucket {
+    owner = "libtcod";
+    repo = "libtcod";
+    rev = "1.5.1";
+    sha256 = "1ibsnmnim712npxkqklc5ibnd32hgsx2yzyfzzc5fis5mhinbl63";
+  };
+
+  prePatch = ''
+    sed -i CMakeLists.txt \
+      -e "s,SET(ROOT_DIR.*,SET(ROOT_DIR $out),g" \
+      -e "s,SET(INSTALL_DIR.*,SET(INSTALL_DIR $out),g"
+    echo 'INSTALL(DIRECTORY include DESTINATION .)' >> CMakeLists.txt
+  '';
+
+  cmakeFlags = [ "-DLIBTCOD_SAMPLES=OFF" ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ SDL libGLU libGL upx zlib ];
+
+  meta = {
+    description = "API for roguelike games";
+    homepage = "http://roguecentral.org/doryen/libtcod/";
+    license = lib.licenses.bsd3;
+    platforms = lib.platforms.linux;
+    maintainers = with lib.maintainers; [ AndersonTorres ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libtelnet/default.nix b/nixpkgs/pkgs/development/libraries/libtelnet/default.nix
new file mode 100644
index 000000000000..eebaee394ee0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libtelnet/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook, zlib }:
+
+stdenv.mkDerivation {
+  pname = "libtelnet";
+  version = "0.21+45f2d5c";
+
+  src = fetchFromGitHub {
+    owner = "seanmiddleditch";
+    repo = "libtelnet";
+    rev = "45f2d5cfcf383312280e61c85b107285fed260cf";
+    sha256 = "1lp6gdbndsp2w8mhy88c2jknxj2klvnggvq04ln7qjg8407ifpda";
+  };
+
+  nativeBuildInputs = [ pkg-config autoreconfHook ];
+  buildInputs = [ zlib ];
+
+  meta = {
+    description = "Simple RFC-complient TELNET implementation as a C library";
+    homepage = "https://github.com/seanmiddleditch/libtelnet";
+    license = lib.licenses.publicDomain;
+    maintainers = [ lib.maintainers.tomberek ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libtermkey/default.nix b/nixpkgs/pkgs/development/libraries/libtermkey/default.nix
new file mode 100644
index 000000000000..a96baf0d9f3e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libtermkey/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, lib, fetchzip, libtool, pkg-config, ncurses, unibilium }:
+
+stdenv.mkDerivation rec {
+  pname = "libtermkey";
+  version = "0.22";
+
+  src = fetchzip {
+    url = "http://www.leonerd.org.uk/code/libtermkey/libtermkey-${version}.tar.gz";
+    sha256 = "02dks6bj7n23lj005yq41azf95wh3hapmgc2lzyh12vigkjh67rg";
+  };
+
+  makeFlags = [ "PREFIX=$(out)" "LIBTOOL=${libtool}/bin/libtool" ];
+
+  nativeBuildInputs = [ libtool pkg-config ];
+  buildInputs = [ ncurses unibilium ];
+
+  strictDeps = true;
+
+  meta = with lib; {
+    description = "Terminal keypress reading library";
+    homepage = "http://www.leonerd.org.uk/code/libtermkey";
+    license = licenses.mit;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libthai/default.nix b/nixpkgs/pkgs/development/libraries/libthai/default.nix
new file mode 100644
index 000000000000..a88b427e3349
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libthai/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchurl, makeWrapper, installShellFiles, pkg-config, libdatrie }:
+
+stdenv.mkDerivation rec {
+  pname = "libthai";
+  version = "0.1.29";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "https://github.com/tlwg/libthai/releases/download/v${version}/libthai-${version}.tar.xz";
+    sha256 = "sha256-/IDMfctQ4RMCtBfOvSTy0wqLmHKS534AMme5EA0PS80=";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [ installShellFiles (lib.getBin libdatrie) pkg-config ];
+
+  buildInputs = [ libdatrie ];
+
+  postInstall = ''
+    installManPage man/man3/*.3
+  '';
+
+  meta = with lib; {
+    homepage = "https://linux.thai.net/projects/libthai/";
+    description = "Set of Thai language support routines";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ ];
+    pkgConfigModules = [ "libthai" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libtheora/default.nix b/nixpkgs/pkgs/development/libraries/libtheora/default.nix
new file mode 100644
index 000000000000..45b7e4caaf1d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libtheora/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchurl, libogg, libvorbis, pkg-config, autoreconfHook, fetchpatch }:
+
+stdenv.mkDerivation rec {
+  pname = "libtheora";
+  version = "1.1.1";
+
+  src = fetchurl {
+    url = "https://downloads.xiph.org/releases/theora/${pname}-${version}.tar.gz";
+    sha256 = "0swiaj8987n995rc7hw0asvpwhhzpjiws8kr3s6r44bqqib2k5a0";
+  };
+
+  patches = [
+    # fix error in autoconf scripts
+    (fetchpatch {
+      url = "https://github.com/xiph/theora/commit/28cc6dbd9b2a141df94f60993256a5fca368fa54.diff";
+      sha256 = "16jqrq4h1b3krj609vbpzd5845cvkbh3mwmjrcdg35m490p19x9k";
+    })
+  ] ++ lib.optionals stdenv.hostPlatform.isMinGW [
+    ./mingw-remove-export.patch
+  ];
+
+  configureFlags = [ "--disable-examples" ];
+
+  outputs = [ "out" "dev" "devdoc" ];
+  outputDoc = "devdoc";
+
+  nativeBuildInputs = [ pkg-config autoreconfHook ];
+  propagatedBuildInputs = [ libogg libvorbis ];
+
+  meta = with lib; {
+    homepage = "https://www.theora.org/";
+    description = "Library for Theora, a free and open video compression format";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.unix ++ platforms.windows;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libtheora/mingw-remove-export.patch b/nixpkgs/pkgs/development/libraries/libtheora/mingw-remove-export.patch
new file mode 100644
index 000000000000..bf0ffc07fc43
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libtheora/mingw-remove-export.patch
@@ -0,0 +1,18 @@
+diff --git a/win32/xmingw32/libtheoradec-all.def b/win32/xmingw32/libtheoradec-all.def
+index 566eeb3..4a2e766 100644
+--- a/win32/xmingw32/libtheoradec-all.def
++++ b/win32/xmingw32/libtheoradec-all.def
+@@ -1,4 +1,3 @@
+-EXPORTS

+ ; Old alpha API

+ 	theora_version_string @ 1

+ 	theora_version_number @ 2

+diff --git a/win32/xmingw32/libtheoraenc-all.def b/win32/xmingw32/libtheoraenc-all.def
+index 36d2dad..d1da2f4 100644
+--- a/win32/xmingw32/libtheoraenc-all.def
++++ b/win32/xmingw32/libtheoraenc-all.def
+@@ -1,4 +1,3 @@
+-EXPORTS

+ ; Old alpha API

+ 	theora_encode_init @ 1

+ 	theora_encode_YUVin @ 2

diff --git a/nixpkgs/pkgs/development/libraries/libthreadar/default.nix b/nixpkgs/pkgs/development/libraries/libthreadar/default.nix
new file mode 100644
index 000000000000..05aff273400e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libthreadar/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchurl, gcc-unwrapped }:
+
+stdenv.mkDerivation rec {
+  version = "1.4.0";
+  pname = "libthreadar";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libthreadar/${pname}-${version}.tar.gz";
+    sha256 = "sha256-LkcVF4AnuslzpIg/S8sGNJQye6iGcQRGqCqAhg8aN5E=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  buildInputs = [ gcc-unwrapped ];
+
+  CXXFLAGS = [ "-std=c++14" ];
+
+  configureFlags = [
+    "--disable-build-html"
+  ];
+
+  postInstall = ''
+    # Disable html help
+    rm -r "$out"/share
+  '';
+
+  meta = with lib; {
+    homepage = "https://libthreadar.sourceforge.net/";
+    description = "A C++ library that provides several classes to manipulate threads";
+    longDescription = ''
+      Libthreadar is a C++ library providing a small set of C++ classes to manipulate
+      threads in a very simple and efficient way from your C++ code.
+    '';
+    maintainers = with maintainers; [ izorkin ];
+    license = licenses.lgpl3;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libticables2/default.nix b/nixpkgs/pkgs/development/libraries/libticables2/default.nix
new file mode 100644
index 000000000000..d3f2e86a964f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libticables2/default.nix
@@ -0,0 +1,74 @@
+{ stdenv
+, lib
+, fetchurl
+, fetchpatch
+, pkg-config
+, autoreconfHook
+, glib
+, libusb1
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libticables2";
+  version = "1.3.5";
+  src = fetchurl {
+    url = "mirror://sourceforge/tilp/${pname}-${version}.tar.bz2";
+    sha256 = "08j5di0cgix9vcpdv7b8xhxdjkk9zz7fqfnv3l4apk3jdr8vcvqc";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "add-support-for-aarch64-macos-target-triple.patch";
+      url = "https://github.com/debrouxl/tilibs/commit/ef41c51363b11521460f33e8c332db7b0a9ca085.patch";
+      stripLen = 2;
+      sha256 = "sha256-oTR1ACEZI0fjErpnFXTCnfLT1mo10Ypy0q0D8NOPNsM=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ];
+
+  buildInputs = [
+    libusb1
+    glib
+  ];
+
+  configureFlags = [
+    "--enable-libusb10"
+  ];
+
+  postInstall = ''
+    mkdir -p $out/etc/udev/rules.d
+    cat > $out/etc/udev/rules.d/69-libsane.rules << EOF
+      ACTION!="add", GOTO="libticables_end"
+
+      # serial device (assume TI calculator)
+      KERNEL=="ttyS[0-3]", ENV{ID_PDA}="1"
+      # parallel device (assume TI calculator)
+      SUBSYSTEM=="ppdev", ENV{ID_PDA}="1"
+      # SilverLink
+      SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="e001", ENV{ID_PDA}="1"
+      # TI-84+ DirectLink
+      SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="e003", ENV{ID_PDA}="1"
+      # TI-89 Titanium DirectLink
+      SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="e004", ENV{ID_PDA}="1"
+      # TI-84+ SE DirectLink
+      SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="e008", ENV{ID_PDA}="1"
+      # TI-Nspire DirectLink
+      SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="e012", ENV{ID_PDA}="1"
+
+      LABEL="libticables_end"
+    EOF
+  '';
+
+  meta = with lib; {
+    changelog = "http://lpg.ticalc.org/prj_tilp/news.html";
+    description = "This library is part of the TiLP framework";
+    homepage = "http://lpg.ticalc.org/prj_tilp/";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ siraben luc65r ];
+    platforms = with platforms; linux ++ darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libticalcs2/default.nix b/nixpkgs/pkgs/development/libraries/libticalcs2/default.nix
new file mode 100644
index 000000000000..2488a5bbb0b4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libticalcs2/default.nix
@@ -0,0 +1,50 @@
+{ stdenv
+, lib
+, fetchurl
+, pkg-config
+, autoreconfHook
+, glib
+, libticonv
+, libtifiles2
+, libticables2
+, xz
+, bzip2
+, acl
+, libobjc
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libticalcs2";
+  version = "1.1.9";
+  src = fetchurl {
+    url = "mirror://sourceforge/tilp/${pname}-${version}.tar.bz2";
+    sha256 = "08c9wgrdnyqcs45mx1bjb8riqq81bzfkhgaijxzn96rhpj40fy3n";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ];
+
+  buildInputs = [
+    glib
+    libticonv
+    libtifiles2
+    libticables2
+    xz
+    bzip2
+  ] ++ lib.optionals stdenv.isLinux [
+    acl
+  ] ++ lib.optionals stdenv.isDarwin [
+    libobjc
+  ];
+
+  meta = with lib; {
+    changelog = "http://lpg.ticalc.org/prj_tilp/news.html";
+    description = "This library is part of the TiLP framework";
+    homepage = "http://lpg.ticalc.org/prj_tilp/";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ siraben luc65r ];
+    platforms = with platforms; linux ++ darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libtickit/001-skip-test-18term-builder-on-macos.patch b/nixpkgs/pkgs/development/libraries/libtickit/001-skip-test-18term-builder-on-macos.patch
new file mode 100644
index 000000000000..3ecdf75f06f8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libtickit/001-skip-test-18term-builder-on-macos.patch
@@ -0,0 +1,27 @@
+From 6179359c0b9247ae981b8b2a2897eabc921147fd Mon Sep 17 00:00:00 2001
+From: Gustavo Coutinho de Souza <dev@onemoresuza.mailer.me>
+Date: Tue, 8 Aug 2023 15:45:43 -0300
+Subject: [PATCH] test: skip test 18 if on MacOS
+
+---
+ t/18term-builder.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/t/18term-builder.c b/t/18term-builder.c
+index 8b23ab4..c1b64a2 100644
+--- a/t/18term-builder.c
++++ b/t/18term-builder.c
+@@ -21,6 +21,11 @@ static void output(TickitTerm *tt, const char *bytes, size_t len, void *user)
+ 
+ int main(int argc, char *argv[])
+ {
++
++  #if defined(__APPLE__) || defined(__MACH__)
++    skip_all("the test does not seem to work on MacOS");
++    return exit_status();
++  #endif
+   // getstr override
+   {
+     /* We need a termtype that isn't xterm, but that will actually load.
+-- 
+2.41.0
diff --git a/nixpkgs/pkgs/development/libraries/libtickit/default.nix b/nixpkgs/pkgs/development/libraries/libtickit/default.nix
new file mode 100644
index 000000000000..54386e57a0ac
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libtickit/default.nix
@@ -0,0 +1,65 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, pkg-config
+, libtool
+, perl
+, libtermkey
+, unibilium
+}:
+let
+  version = "0.4.3";
+in
+stdenv.mkDerivation {
+  pname = "libtickit";
+  inherit version;
+
+  src = fetchFromGitHub {
+    owner = "leonerd";
+    repo = "libtickit";
+    rev = "v${version}";
+    hash = "sha256-QCrym8g5J1qwsFpU/PB8zZIWdM3YzOySknISSbQE4Sc=";
+  };
+
+  patches = [
+    # Disabled on darwin, since test assumes TERM=linux
+    ./001-skip-test-18term-builder-on-macos.patch
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+    libtool
+  ];
+
+  buildInputs = [
+    libtermkey
+    unibilium
+  ];
+
+  nativeCheckInputs = [ perl ];
+
+  makeFlags = [
+    "LIBTOOL=${lib.getExe libtool}"
+  ];
+
+  installFlags = [
+    "PREFIX=${placeholder "out"}"
+  ];
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "A terminal interface construction kit";
+    longDescription = ''
+      This library provides an abstracted mechanism for building interactive full-screen terminal
+      programs. It provides a full set of output drawing functions, and handles keyboard and mouse
+      input events.
+    '';
+    homepage = "https://www.leonerd.org.uk/code/libtickit/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ onemoresuza ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libticonv/default.nix b/nixpkgs/pkgs/development/libraries/libticonv/default.nix
new file mode 100644
index 000000000000..0c075406dee2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libticonv/default.nix
@@ -0,0 +1,38 @@
+{ stdenv
+, lib
+, fetchurl
+, pkg-config
+, autoreconfHook
+, glib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libticonv";
+  version = "1.1.5";
+  src = fetchurl {
+    url = "mirror://sourceforge/tilp/${pname}-${version}.tar.bz2";
+    sha256 = "0y080v12bm81wgjm6fnw7q0yg7scphm8hhrls9njcszj7fkscv9i";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ];
+
+  buildInputs = [
+    glib
+  ];
+
+  configureFlags = [
+    "--enable-iconv"
+  ];
+
+  meta = with lib; {
+    changelog = "http://lpg.ticalc.org/prj_tilp/news.html";
+    description = "This library is part of the TiLP framework";
+    homepage = "http://lpg.ticalc.org/prj_tilp/";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ siraben luc65r ];
+    platforms = with platforms; linux ++ darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libtiff/4.5.nix b/nixpkgs/pkgs/development/libraries/libtiff/4.5.nix
new file mode 100644
index 000000000000..3b24c6f1a2e1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libtiff/4.5.nix
@@ -0,0 +1,86 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, fetchpatch
+
+, autoreconfHook
+, pkg-config
+, sphinx
+
+, libdeflate
+, libjpeg
+, xz
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libtiff";
+  version = "4.5.1";
+
+  src = fetchFromGitLab {
+    owner = "libtiff";
+    repo = "libtiff";
+    rev = "v${version}";
+    hash = "sha256-qQEthy6YhNAQmdDMyoCIvK8f3Tx25MgqhJZW74CB93E=";
+  };
+
+  patches = [
+    # cf. https://bugzilla.redhat.com/2224974
+    (fetchpatch {
+      name = "CVE-2023-40745.patch";
+      url = "https://gitlab.com/libtiff/libtiff/-/commit/bdf7b2621c62e04d0408391b7d5611502a752cd0.diff";
+      hash = "sha256-HdU02YJ1/T3dnCT+yG03tUyAHkgeQt1yjZx/auCQxyw=";
+    })
+    # cf. https://bugzilla.redhat.com/2224971
+    (fetchpatch {
+      name = "CVE-2023-41175.patch";
+      url = "https://gitlab.com/libtiff/libtiff/-/commit/965fa243004e012adc533ae8e38db3055f101a7f.diff";
+      hash = "sha256-Pvg6JfJWOIaTrfFF0YSREZkS9saTG9IsXnsXtcyKILA=";
+    })
+    # FreeImage needs this patch
+    ./headers-4.5.patch
+    # libc++abi 11 has an `#include <version>`, this picks up files name
+    # `version` in the project's include paths
+    ./rename-version-4.5.patch
+  ];
+
+  postPatch = ''
+    mv VERSION VERSION.txt
+  '';
+
+  outputs = [ "bin" "dev" "dev_private" "out" "man" "doc" ];
+
+  postFixup = ''
+    moveToOutput include/tif_config.h $dev_private
+    moveToOutput include/tif_dir.h $dev_private
+    moveToOutput include/tif_hash_set.h $dev_private
+    moveToOutput include/tiffiop.h $dev_private
+  '';
+
+  # If you want to change to a different build system, please make
+  # sure cross-compilation works first!
+  nativeBuildInputs = [ autoreconfHook pkg-config sphinx ];
+
+  propagatedBuildInputs = [
+    libdeflate
+    libjpeg
+    xz
+    zlib
+  ];
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Library and utilities for working with the TIFF image file format";
+    homepage = "https://libtiff.gitlab.io/libtiff";
+    changelog = "https://libtiff.gitlab.io/libtiff/v${version}.html";
+    # XXX not enabled for now to keep hydra builds running,
+    # but we have to keep an eye on security updates in supported version
+    #knownVulnerabilities = [ "support for version 4.5 ended in Sept 2023" ];
+    maintainers = with maintainers; [ yarny ];
+    license = licenses.libtiff;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libtiff/default.nix b/nixpkgs/pkgs/development/libraries/libtiff/default.nix
new file mode 100644
index 000000000000..8e735369e076
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libtiff/default.nix
@@ -0,0 +1,91 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, nix-update-script
+
+, autoreconfHook
+, pkg-config
+, sphinx
+
+, libdeflate
+, libjpeg
+, xz
+, zlib
+
+  # for passthru.tests
+, libgeotiff
+, python3Packages
+, imagemagick
+, graphicsmagick
+, gdal
+, openimageio
+, freeimage
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libtiff";
+  version = "4.6.0";
+
+  # if you update this, please consider adding patches and/or
+  # setting `knownVulnerabilities` in libtiff `4.5.nix`
+
+  src = fetchFromGitLab {
+    owner = "libtiff";
+    repo = "libtiff";
+    rev = "v${version}";
+    hash = "sha256-qCg5qjsPPynCHIg0JsPJldwVdcYkI68zYmyNAKUCoyw=";
+  };
+
+  patches = [
+    # FreeImage needs this patch
+    ./headers.patch
+    # libc++abi 11 has an `#include <version>`, this picks up files name
+    # `version` in the project's include paths
+    ./rename-version.patch
+  ];
+
+  postPatch = ''
+    mv VERSION VERSION.txt
+  '';
+
+  outputs = [ "bin" "dev" "dev_private" "out" "man" "doc" ];
+
+  postFixup = ''
+    moveToOutput include/tif_config.h $dev_private
+    moveToOutput include/tif_dir.h $dev_private
+    moveToOutput include/tif_hash_set.h $dev_private
+    moveToOutput include/tiffiop.h $dev_private
+  '';
+
+  # If you want to change to a different build system, please make
+  # sure cross-compilation works first!
+  nativeBuildInputs = [ autoreconfHook pkg-config sphinx ];
+
+  # TODO: opengl support (bogus configure detection)
+  propagatedBuildInputs = [
+    libdeflate
+    libjpeg
+    xz
+    zlib
+  ];
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  passthru = {
+    tests = {
+      inherit libgeotiff imagemagick graphicsmagick gdal openimageio freeimage;
+      inherit (python3Packages) pillow imread;
+    };
+    updateScript = nix-update-script { };
+  };
+
+  meta = with lib; {
+    description = "Library and utilities for working with the TIFF image file format";
+    homepage = "https://libtiff.gitlab.io/libtiff";
+    changelog = "https://libtiff.gitlab.io/libtiff/v${version}.html";
+    license = licenses.libtiff;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libtiff/headers-4.5.patch b/nixpkgs/pkgs/development/libraries/libtiff/headers-4.5.patch
new file mode 100644
index 000000000000..49af1abb0a54
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libtiff/headers-4.5.patch
@@ -0,0 +1,16 @@
+export private headers for freeimage
+--- i/libtiff/Makefile.am
++++ w/libtiff/Makefile.am
+@@ -36,8 +36,12 @@ EXTRA_DIST = \
+ 	tiffconf.h.cmake.in
+
+ libtiffinclude_HEADERS = \
++	tif_config.h \
++	tif_dir.h \
++	tif_hash_set.h \
+ 	tiff.h \
+ 	tiffio.h \
++	tiffiop.h \
+ 	tiffvers.h
+
+ if HAVE_CXX
diff --git a/nixpkgs/pkgs/development/libraries/libtiff/headers.patch b/nixpkgs/pkgs/development/libraries/libtiff/headers.patch
new file mode 100644
index 000000000000..933e06f32326
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libtiff/headers.patch
@@ -0,0 +1,16 @@
+export private headers for freeimage
+--- i/libtiff/Makefile.am
++++ w/libtiff/Makefile.am
+@@ -36,8 +36,12 @@ EXTRA_DIST = \
+ 	tif_win32_versioninfo.rc
+
+ libtiffinclude_HEADERS = \
++	tif_config.h \
++	tif_dir.h \
++	tif_hash_set.h \
+ 	tiff.h \
+ 	tiffio.h \
++	tiffiop.h \
+ 	tiffvers.h
+
+ if HAVE_CXX
diff --git a/nixpkgs/pkgs/development/libraries/libtiff/rename-version-4.5.patch b/nixpkgs/pkgs/development/libraries/libtiff/rename-version-4.5.patch
new file mode 100644
index 000000000000..3e93569d4245
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libtiff/rename-version-4.5.patch
@@ -0,0 +1,21 @@
+fix case-insensitive build
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -34,7 +34,7 @@ docfiles = \
+ 	README.md \
+ 	RELEASE-DATE \
+ 	TODO \
+-	VERSION
++	VERSION.txt
+
+ EXTRA_DIST = \
+ 	cmake \
+@@ -61,7 +61,7 @@ SUBDIRS = port libtiff tools build contrib test doc
+
+ release:
+	(rm -f $(top_srcdir)/RELEASE-DATE && echo $(LIBTIFF_RELEASE_DATE) > $(top_srcdir)/RELEASE-DATE)
+-	(rm -f $(top_srcdir)/VERSION && echo $(LIBTIFF_VERSION) > $(top_srcdir)/VERSION)
++	(rm -f $(top_srcdir)/VERSION.txt && echo $(LIBTIFF_VERSION) > $(top_srcdir)/VERSION.txt)
+	(rm -f $(top_srcdir)/libtiff/tiffvers.h && sed 's,LIBTIFF_VERSION,$(LIBTIFF_VERSION),;s,LIBTIFF_RELEASE_DATE,$(LIBTIFF_RELEASE_DATE),;s,LIBTIFF_MAJOR_VERSION,$(LIBTIFF_MAJOR_VERSION),;s,LIBTIFF_MINOR_VERSION,$(LIBTIFF_MINOR_VERSION),;s,LIBTIFF_MICRO_VERSION,$(LIBTIFF_MICRO_VERSION),' $(top_srcdir)/libtiff/tiffvers.h.in > $(top_srcdir)/libtiff/tiffvers.h)
+
+ pkgconfigdir = $(libdir)/pkgconfig
diff --git a/nixpkgs/pkgs/development/libraries/libtiff/rename-version.patch b/nixpkgs/pkgs/development/libraries/libtiff/rename-version.patch
new file mode 100644
index 000000000000..04fa1bfc88c7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libtiff/rename-version.patch
@@ -0,0 +1,21 @@
+fix case-insensitive build
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -34,7 +34,7 @@ docfiles = \
+ 	README.md \
+ 	RELEASE-DATE \
+ 	TODO \
+-	VERSION
++	VERSION.txt
+ 
+ EXTRA_DIST = \
+ 	placeholder.h \
+@@ -68,7 +68,7 @@ NEW_LIBTIFF_RELEASE_DATE=$(shell date +"%Y%m%d")
+ release:
+ 	@(echo --- Setting release date to $(NEW_LIBTIFF_RELEASE_DATE) and release version to $(LIBTIFF_VERSION) ---)
+ 	(rm -f $(top_srcdir)/RELEASE-DATE && echo $(NEW_LIBTIFF_RELEASE_DATE) > $(top_srcdir)/RELEASE-DATE)
+-	(rm -f $(top_srcdir)/VERSION && echo $(LIBTIFF_VERSION) > $(top_srcdir)/VERSION)
++	(rm -f $(top_srcdir)/VERSION && echo $(LIBTIFF_VERSION) > $(top_srcdir)/VERSION.txt)
+ 	(rm -f $(top_builddir)/libtiff/tiffvers.h && sed 's,LIBTIFF_VERSION,$(LIBTIFF_VERSION),;s,LIBTIFF_RELEASE_DATE,$(NEW_LIBTIFF_RELEASE_DATE),;s,LIBTIFF_MAJOR_VERSION,$(LIBTIFF_MAJOR_VERSION),;s,LIBTIFF_MINOR_VERSION,$(LIBTIFF_MINOR_VERSION),;s,LIBTIFF_MICRO_VERSION,$(LIBTIFF_MICRO_VERSION),' $(top_srcdir)/libtiff/tiffvers.h.in > $(top_builddir)/libtiff/tiffvers.h && sed -i 's,@,,g' $(top_builddir)/libtiff/tiffvers.h)
+ 
+ pkgconfigdir = $(libdir)/pkgconfig
diff --git a/nixpkgs/pkgs/development/libraries/libtifiles2/default.nix b/nixpkgs/pkgs/development/libraries/libtifiles2/default.nix
new file mode 100644
index 000000000000..874cbc87c875
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libtifiles2/default.nix
@@ -0,0 +1,38 @@
+{ stdenv
+, lib
+, fetchurl
+, pkg-config
+, autoreconfHook
+, glib
+, libarchive
+, libticonv
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libtifiles2";
+  version = "1.1.7";
+  src = fetchurl {
+    url = "mirror://sourceforge/tilp/${pname}-${version}.tar.bz2";
+    sha256 = "10n9mhlabmaw3ha5ckllxfy6fygs2pmlmj5v6w5v62bvx54kpils";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ];
+
+  buildInputs = [
+    glib
+    libarchive
+    libticonv
+  ];
+
+  meta = with lib; {
+    changelog = "http://lpg.ticalc.org/prj_tilp/news.html";
+    description = "This library is part of the TiLP framework";
+    homepage = "http://lpg.ticalc.org/prj_tilp/";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ siraben luc65r ];
+    platforms = with platforms; linux ++ darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libtiger/default.nix b/nixpkgs/pkgs/development/libraries/libtiger/default.nix
new file mode 100644
index 000000000000..7876c23bcc1d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libtiger/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, lib, fetchurl, autoreconfHook, pkg-config
+, libkate, pango, cairo, darwin
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libtiger";
+  version = "0.3.4";
+
+  src = fetchurl {
+    url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/libtiger/libtiger-${version}.tar.gz";
+    sha256 = "0rj1bmr9kngrgbxrjbn4f4f9pww0wmf6viflinq7ava7zdav4hkk";
+  };
+
+  patches = [
+    ./pkg-config.patch
+  ];
+
+  postPatch = ''
+    substituteInPlace configure.ac --replace "-Werror" "-Wno-error"
+  '';
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ libkate pango cairo ]
+    ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.ApplicationServices;
+
+  meta = {
+    homepage = "https://code.google.com/archive/p/libtiger/";
+    description = "A rendering library for Kate streams using Pango and Cairo";
+    platforms = lib.platforms.unix;
+    license = lib.licenses.lgpl21Plus;
+    maintainers = with lib.maintainers; [ matthewbauer ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libtiger/pkg-config.patch b/nixpkgs/pkgs/development/libraries/libtiger/pkg-config.patch
new file mode 100644
index 000000000000..68c892544615
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libtiger/pkg-config.patch
@@ -0,0 +1,37 @@
+From 3ebeb0932edc01b7768216dc7d3b3c5aac21fba0 Mon Sep 17 00:00:00 2001
+From: Alyssa Ross <hi@alyssa.is>
+Date: Sun, 26 Feb 2023 17:21:48 +0000
+Subject: [PATCH] configure.ac: detect pkg-config properly
+
+When cross compiling, the relevant pkg-config program might be prefixed
+with the name of the host platform, so the previous check was not
+correct.  Detect pkg-config properly, using the appropriate macro.
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 2f63684..bf2faf7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -46,7 +46,7 @@ AC_CHECK_FUNCS([select nanosleep usleep])
+ 
+ AC_TYPE_SIZE_T
+ 
+-AC_CHECK_PROG(HAVE_PKG_CONFIG,pkg-config,yes)
++PKG_PROG_PKG_CONFIG
+ 
+ AC_ARG_ENABLE(doc, [  --disable-doc           Disable building documentation (default enabled)])
+ if test "x$enable_doc" != "xno"
+@@ -57,7 +57,7 @@ else
+ fi
+ AM_CONDITIONAL(HAVE_DOXYGEN,test "${HAVE_DOXYGEN}" = "yes")
+ 
+-if test "x$HAVE_PKG_CONFIG" = "xyes"
++if test "x$PKG_CONFIG" != "x"
+ then
+   PKG_CHECK_MODULES(KATE,kate >= 0.2.0)
+   PKG_CHECK_MODULES(PANGOCAIRO,pangocairo >= 1.16)
+-- 
+2.37.1
+
diff --git a/nixpkgs/pkgs/development/libraries/libtins/default.nix b/nixpkgs/pkgs/development/libraries/libtins/default.nix
new file mode 100644
index 000000000000..b27ad6634797
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libtins/default.nix
@@ -0,0 +1,54 @@
+{ boost, cmake, fetchFromGitHub, fetchpatch, gtest, libpcap, openssl, lib, stdenv }:
+
+stdenv.mkDerivation rec {
+  pname = "libtins";
+  version = "4.4";
+
+  src = fetchFromGitHub {
+    owner = "mfontanini";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-mXbinXh/CO0SZZ71+K+FozbHCCoi12+AIa2o+P0QmUw=";
+  };
+
+  patches = [
+    # Pull gcc-13 fixes:
+    #   https://github.com/mfontanini/libtins/pull/496
+    # TODO: remove when upgrade to the next version.
+    (fetchpatch {
+      name = "gcc-13.patch";
+      url = "https://github.com/mfontanini/libtins/commit/812be7966d445ec56e88eab512f8fd2d57152427.patch";
+      hash = "sha256-5RCFPe95r1CBrAocjTPR2SvUlgaGa1aBc8RazyxUj3M=";
+    })
+  ];
+
+  postPatch = ''
+    rm -rf googletest
+    cp -r ${gtest.src} googletest
+    chmod -R a+w googletest
+  '';
+
+  nativeBuildInputs = [ cmake gtest ];
+  buildInputs = [
+    openssl
+    libpcap
+    boost
+  ];
+
+  configureFlags = [
+    "--with-boost-libdir=${boost.out}/lib"
+    "--with-boost=${boost.dev}"
+  ];
+
+  doCheck = true;
+  checkTarget = "tests test";
+
+  meta = with lib; {
+    description = "High-level, multiplatform C++ network packet sniffing and crafting library";
+    homepage = "https://libtins.github.io/";
+    changelog = "https://raw.githubusercontent.com/mfontanini/${pname}/v${version}/CHANGES.md";
+    license = lib.licenses.bsd2;
+    maintainers = with maintainers; [ fdns ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libtomcrypt/default.nix b/nixpkgs/pkgs/development/libraries/libtomcrypt/default.nix
new file mode 100644
index 000000000000..9bfd42e7a71c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libtomcrypt/default.nix
@@ -0,0 +1,50 @@
+{ lib, stdenv, fetchurl, fetchpatch, libtool, libtommath }:
+
+stdenv.mkDerivation rec {
+  pname = "libtomcrypt";
+  version = "1.18.2";
+
+  src = fetchurl {
+    url = "https://github.com/libtom/libtomcrypt/releases/download/v${version}/crypt-${version}.tar.xz";
+    sha256 = "113vfrgapyv72lalhd3nkw7jnks8az0gcb5wqn9hj19nhcxlrbcn";
+  };
+
+  # Fixes a build failure on aarch64-darwin. Define for all Darwin targets for when x86_64-darwin
+  # upgrades to a newer SDK.
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-DTARGET_OS_IPHONE=0";
+
+  patches = [
+    (fetchpatch {
+      name = "CVE-2019-17362.patch";
+      url = "https://github.com/libtom/libtomcrypt/pull/508/commits/25c26a3b7a9ad8192ccc923e15cf62bf0108ef94.patch";
+      sha256 = "1bwsj0pwffxw648wd713z3xcyrbxc2z646psrzp38ys564fjh5zf";
+    })
+  ];
+
+  nativeBuildInputs = [ libtool libtommath ];
+
+  postPatch = ''
+    substituteInPlace makefile.shared --replace "LIBTOOL:=glibtool" "LIBTOOL:=libtool"
+  '';
+
+  preBuild = ''
+    makeFlagsArray+=(PREFIX=$out \
+      CFLAGS="-DUSE_LTM -DLTM_DESC -DLTC_PTHREAD" \
+      EXTRALIBS=\"-ltommath\" \
+      INSTALL_GROUP=$(id -g) \
+      INSTALL_USER=$(id -u))
+  '';
+
+  makefile = "makefile.shared";
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "A fairly comprehensive, modular and portable cryptographic toolkit";
+    homepage = "https://www.libtom.net/LibTomCrypt/";
+    changelog = "https://github.com/libtom/libtomcrypt/raw/v${version}/changes";
+    license = with licenses; [ publicDomain wtfpl ];
+    maintainers = with maintainers; [ ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libtommath/default.nix b/nixpkgs/pkgs/development/libraries/libtommath/default.nix
new file mode 100644
index 000000000000..3ec1ba7b79b3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libtommath/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchurl, libtool }:
+
+stdenv.mkDerivation rec {
+  pname = "libtommath";
+  version = "1.2.1";
+
+  src = fetchurl {
+    url = "https://github.com/libtom/libtommath/releases/download/v${version}/ltm-${version}.tar.xz";
+    sha256 = "sha256-mGAl17N0J2/uLjDpnzZJ5KwNuKAiV6N+4Q6ucqvtDR8=";
+  };
+
+  nativeBuildInputs = [ libtool ];
+
+  postPatch = ''
+    substituteInPlace makefile.shared --replace glibtool libtool
+    substituteInPlace makefile_include.mk --replace "shell arch" "shell uname -m"
+  '';
+
+  preBuild = ''
+    makeFlagsArray=(PREFIX=$out \
+      INSTALL_GROUP=$(id -g) \
+      INSTALL_USER=$(id -u))
+  '';
+
+  makefile = "makefile.shared";
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) "-DTARGET_OS_IPHONE=0";
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://www.libtom.net/LibTomMath/";
+    description = "A library for integer-based number-theoretic applications";
+    license = with licenses; [ publicDomain wtfpl ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libtorrent-rasterbar/1.2.nix b/nixpkgs/pkgs/development/libraries/libtorrent-rasterbar/1.2.nix
new file mode 100644
index 000000000000..adea75b02e94
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libtorrent-rasterbar/1.2.nix
@@ -0,0 +1,54 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, automake, autoconf
+, zlib, boost, openssl, libtool, python, libiconv, ncurses, SystemConfiguration
+}:
+
+let
+  version = "1.2.11";
+
+  # Make sure we override python, so the correct version is chosen
+  # for the bindings, if overridden
+  boostPython = boost.override { enablePython = true; inherit python; };
+
+in stdenv.mkDerivation {
+  pname = "libtorrent-rasterbar";
+  inherit version;
+
+  src = fetchFromGitHub {
+    owner = "arvidn";
+    repo = "libtorrent";
+    rev = "v${version}";
+    sha256 = "05qm8mcyxsnb6zb8nckln1gkk8ncwzfhsz7d7p3fhx6gdsc8j71b";
+  };
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ automake autoconf libtool pkg-config ];
+
+  buildInputs = [ boostPython openssl zlib python libiconv ncurses ]
+    ++ lib.optionals stdenv.isDarwin [ SystemConfiguration ];
+
+  preConfigure = "./autotool.sh";
+
+  postInstall = ''
+    moveToOutput "include" "$dev"
+    moveToOutput "lib/${python.libPrefix}" "$python"
+  '';
+
+  outputs = [ "out" "dev" "python" ];
+
+  configureFlags = [
+    "--enable-python-binding"
+    "--with-libiconv=yes"
+    "--with-boost=${boostPython.dev}"
+    "--with-boost-libdir=${boostPython.out}/lib"
+  ];
+
+  meta = with lib; {
+    homepage = "https://libtorrent.org/";
+    description = "A C++ BitTorrent implementation focusing on efficiency and scalability";
+    license = licenses.bsd3;
+    maintainers = [ ];
+    broken = stdenv.isDarwin;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libtorrent-rasterbar/default.nix b/nixpkgs/pkgs/development/libraries/libtorrent-rasterbar/default.nix
new file mode 100644
index 000000000000..83c84fac602b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libtorrent-rasterbar/default.nix
@@ -0,0 +1,63 @@
+{ lib, stdenv, fetchFromGitHub, cmake
+, zlib, boost, openssl, python, ncurses, SystemConfiguration
+}:
+
+let
+  version = "2.0.9";
+
+  # Make sure we override python, so the correct version is chosen
+  boostPython = boost.override { enablePython = true; inherit python; };
+
+in stdenv.mkDerivation {
+  pname = "libtorrent-rasterbar";
+  inherit version;
+
+  src = fetchFromGitHub {
+    owner = "arvidn";
+    repo = "libtorrent";
+    rev = "v${version}";
+    sha256 = "sha256-kUpeofullQ70uK/YZUD0ikHCquFTGwev7MxBYj0oHeU=";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ boostPython openssl zlib python ncurses ]
+    ++ lib.optionals stdenv.isDarwin [ SystemConfiguration ];
+
+  # https://github.com/arvidn/libtorrent/issues/6865
+  postPatch = ''
+    substituteInPlace cmake/Modules/GeneratePkgConfig.cmake \
+      --replace @CMAKE_INSTALL_PREFIX@/'$<'1: '$<'1:
+    substituteInPlace cmake/Modules/GeneratePkgConfig/target-compile-settings.cmake.in \
+      --replace 'set(_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@")' \
+                'set(_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@")
+                 set(_INSTALL_FULL_LIBDIR "@CMAKE_INSTALL_FULL_LIBDIR@")'
+    substituteInPlace cmake/Modules/GeneratePkgConfig/pkg-config.cmake.in \
+      --replace '$'{prefix}/@_INSTALL_LIBDIR@ @_INSTALL_FULL_LIBDIR@
+  '';
+
+  postInstall = ''
+    moveToOutput "include" "$dev"
+    moveToOutput "lib/${python.libPrefix}" "$python"
+  '';
+
+  postFixup = ''
+    substituteInPlace "$dev/lib/cmake/LibtorrentRasterbar/LibtorrentRasterbarTargets-release.cmake" \
+      --replace "\''${_IMPORT_PREFIX}/lib" "$out/lib"
+  '';
+
+  outputs = [ "out" "dev" "python" ];
+
+  cmakeFlags = [
+    "-Dpython-bindings=on"
+  ];
+
+  meta = with lib; {
+    homepage = "https://libtorrent.org/";
+    description = "A C++ BitTorrent implementation focusing on efficiency and scalability";
+    license = licenses.bsd3;
+    maintainers = [ ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libtoxcore/default.nix b/nixpkgs/pkgs/development/libraries/libtoxcore/default.nix
new file mode 100644
index 000000000000..87d6633f124e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libtoxcore/default.nix
@@ -0,0 +1,61 @@
+{ lib
+, stdenv
+, fetchurl
+, cmake
+, libsodium
+, ncurses
+, libopus
+, libvpx
+, check
+, libconfig
+, pkg-config
+}:
+
+let buildToxAV = !stdenv.isAarch32;
+in stdenv.mkDerivation rec {
+  pname = "libtoxcore";
+  version = "0.2.18";
+
+  src =
+    # We need the prepared sources tarball.
+    fetchurl {
+      url =
+        "https://github.com/TokTok/c-toxcore/releases/download/v${version}/c-toxcore-${version}.tar.gz";
+      sha256 = "sha256-8pQFN5mIY1k+KLxqa19W8JZ19s2KKDJre8MbSDbAiUI=";
+    };
+
+  cmakeFlags = [
+    "-DDHT_BOOTSTRAP=ON"
+    "-DBOOTSTRAP_DAEMON=ON"
+  ] ++ lib.optional buildToxAV "-DMUST_BUILD_TOXAV=ON";
+
+  buildInputs = [
+    libsodium
+    ncurses
+    libconfig
+  ] ++ lib.optionals buildToxAV [
+    libopus
+    libvpx
+  ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  doCheck = true;
+  nativeCheckInputs = [ check ];
+
+  postInstall = ''
+    substituteInPlace $out/lib/pkgconfig/toxcore.pc \
+      --replace '=''${prefix}/' '=' \
+
+  '';
+  # We might be getting the wrong pkg-config file anyway:
+  # https://github.com/TokTok/c-toxcore/issues/2334
+
+  meta = with lib; {
+    description = "P2P FOSS instant messaging application aimed to replace Skype";
+    homepage = "https://tox.chat";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ peterhoeg ehmry ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libtsm/default.nix b/nixpkgs/pkgs/development/libraries/libtsm/default.nix
new file mode 100644
index 000000000000..c8e00cf4a941
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libtsm/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchFromGitHub, libxkbcommon, pkg-config, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "libtsm";
+  version = "4.0.2";
+
+  src = fetchFromGitHub {
+    owner = "Aetf";
+    repo = "libtsm";
+    rev = "v${version}";
+    sha256 = "sha256-BYMRPjGRVSnYzkdbxypkuE0YkeVLPJ32iGZ1b0R6wto=";
+  };
+
+  buildInputs = [ libxkbcommon ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  # https://github.com/Aetf/libtsm/issues/20
+  postPatch = ''
+    substituteInPlace etc/libtsm.pc.in \
+      --replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
+      --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
+  '';
+
+  meta = with lib; {
+    description = "Terminal-emulator State Machine";
+    homepage = "https://www.freedesktop.org/wiki/Software/kmscon/libtsm/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libu2f-host/default.nix b/nixpkgs/pkgs/development/libraries/libu2f-host/default.nix
new file mode 100644
index 000000000000..9acbaa479063
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libu2f-host/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchurl, fetchpatch, pkg-config, json_c, hidapi }:
+
+stdenv.mkDerivation rec {
+  pname = "libu2f-host";
+  version = "1.1.10";
+
+  src = fetchurl {
+    url = "https://developers.yubico.com/${pname}/Releases/${pname}-${version}.tar.xz";
+    sha256 = "0vrivl1dwql6nfi48z6dy56fwy2z13d7abgahgrs2mcmqng7hra2";
+  };
+
+  patches = [
+    # remove after updating to next release
+    (fetchpatch {
+      name = "json-c-0.14-support.patch";
+      url = "https://github.com/Yubico/libu2f-host/commit/840f01135d2892f45e71b9e90405de587991bd03.patch";
+      sha256 = "0xplx394ppsbsb4h4l8b9m4dv9shbl0zyck3y26vbm9i1g981ki7";
+    })
+  ];
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ json_c hidapi ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "A C library and command-line tool that implements the host-side of the U2F protocol";
+    homepage = "https://developers.yubico.com/libu2f-host";
+    license = with licenses; [ gpl3Plus lgpl21Plus ];
+    mainProgram = "u2f-host";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libu2f-server/default.nix b/nixpkgs/pkgs/development/libraries/libu2f-server/default.nix
new file mode 100644
index 000000000000..aac71bda3698
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libu2f-server/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl, fetchpatch, pkg-config, json_c, openssl, check, file, help2man, which, gengetopt }:
+
+stdenv.mkDerivation rec {
+  pname = "libu2f-server";
+  version = "1.1.0";
+  src = fetchurl {
+    url = "https://developers.yubico.com/libu2f-server/Releases/${pname}-${version}.tar.xz";
+    sha256 = "0xx296nmmqa57w0v5p2kasl5zr1ms2gh6qi4lhv6xvzbmjp3rkcd";
+  };
+
+  patches = [
+    # remove after updating to next release
+    (fetchpatch {
+      name = "json-c-0.14-support.patch";
+      url = "https://github.com/Yubico/libu2f-server/commit/f7c4983b31909299c47bf9b2627c84b6bfe225de.patch";
+      sha256 = "10q66w3paii1yhfdmjskpip078fk9p3sjllbqx1yx71qbjki55b0";
+    })
+  ];
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ json_c openssl check file help2man which gengetopt ];
+
+  meta = with lib; {
+    homepage = "https://developers.yubico.com/libu2f-server/";
+    description = "A C library that implements the server-side of the U2F protocol";
+    license = licenses.bsd2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ philandstuff ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libubox/default.nix b/nixpkgs/pkgs/development/libraries/libubox/default.nix
new file mode 100644
index 000000000000..09837cd0c1d8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libubox/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, lib, fetchgit, cmake, pkg-config, json_c, with_lua ? false, lua5_1, with_ustream_ssl ? false, ustream-ssl }:
+
+stdenv.mkDerivation {
+  pname = "libubox";
+  version = "unstable-2023-12-18";
+
+  src = fetchgit {
+    url = "https://git.openwrt.org/project/libubox.git";
+    rev = "6339204c212b2c3506554a8842030df5ec6fe9c6";
+    hash = "sha256-QgpORITt6MYgfzUpaI2T0Ge2a0iVHjDhdYI/nZ2HbJ8=";
+  };
+
+  cmakeFlags = [ "-DBUILD_EXAMPLES=OFF" (if with_lua then "-DLUAPATH=${placeholder "out"}/lib/lua" else "-DBUILD_LUA=OFF") ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ json_c ] ++ lib.optional with_lua lua5_1 ++ lib.optional with_ustream_ssl ustream-ssl;
+
+  postInstall = lib.optionalString with_ustream_ssl ''
+    for fin in $(find ${ustream-ssl} -type f); do
+      fout="''${fin/"${ustream-ssl}"/"''${out}"}"
+      ln -s "$fin" "$fout"
+    done
+  '';
+
+  meta = with lib; {
+    description = "C utility functions for OpenWrt";
+    homepage = "https://git.openwrt.org/?p=project/libubox.git;a=summary";
+    license = licenses.isc;
+    maintainers = with maintainers; [ fpletz mkg20001 ];
+    mainProgram = "jshn";
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libuchardet/default.nix b/nixpkgs/pkgs/development/libraries/libuchardet/default.nix
new file mode 100644
index 000000000000..14bf7f7c09c7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libuchardet/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchurl, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "uchardet";
+  version = "0.0.8";
+
+  outputs = [ "bin" "out" "man" "dev" ];
+
+  src = fetchurl {
+    url = "https://www.freedesktop.org/software/${pname}/releases/${pname}-${version}.tar.xz";
+    sha256 = "sha256-6Xpgz8AKHBR6Z0sJe7FCKr2fp4otnOPz/cwueKNKxfA=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  doCheck = !stdenv.isi686; # tests fail on i686
+
+  meta = with lib; {
+    description = "Mozilla's Universal Charset Detector C/C++ API";
+    homepage = "https://www.freedesktop.org/wiki/Software/uchardet/";
+    license = licenses.mpl11;
+    maintainers = with maintainers; [ ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libucl/default.nix b/nixpkgs/pkgs/development/libraries/libucl/default.nix
new file mode 100644
index 000000000000..f684b52a1105
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libucl/default.nix
@@ -0,0 +1,58 @@
+{ lib, stdenv
+, fetchFromGitHub
+, pkg-config
+, autoreconfHook
+, curl
+, lua
+, openssl
+, features ? {
+    urls = false;
+    # Upstream enables regex by default
+    regex = true;
+    # Signature support is broken with openssl 1.1.1: https://github.com/vstakhov/libucl/issues/203
+    signatures = false;
+    lua = false;
+    utils = false;
+  }
+}:
+
+let
+  featureDeps = {
+    urls = [ curl ];
+    signatures = [ openssl ];
+    lua = [ lua ];
+  };
+in
+stdenv.mkDerivation rec {
+  pname = "libucl";
+  version = "0.9.0";
+
+  src = fetchFromGitHub {
+    owner = "vstakhov";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-uMkILLG2SC+Q+w7jb0PMsaTET2z1V9Ar0lQhXS1K2+g=";
+  };
+
+  nativeBuildInputs = [ pkg-config autoreconfHook ];
+
+  buildInputs = with lib;
+    concatLists (
+      mapAttrsToList (feat: enabled:
+        optionals enabled (featureDeps."${feat}" or [])
+      ) features
+    );
+
+  enableParallelBuilding = true;
+
+  configureFlags = with lib;
+    mapAttrsToList (feat: enabled: strings.enableFeature enabled feat) features;
+
+  meta = with lib; {
+    description = "Universal configuration library parser";
+    homepage = "https://github.com/vstakhov/libucl";
+    license = licenses.bsd2;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ jpotier ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libucontext/default.nix b/nixpkgs/pkgs/development/libraries/libucontext/default.nix
new file mode 100644
index 000000000000..1ce0e443b352
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libucontext/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "libucontext";
+  version = "1.2";
+
+  src = fetchFromGitHub {
+    owner = "kaniini";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-fk3ZKkp3dsyeF6SOWSccr5MkKEwS4AAuosD/h+6wjSw=";
+  };
+
+  makeFlags = [ "DESTDIR=$(out)" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/kaniini/libucontext";
+    description = "ucontext implementation featuring glibc-compatible ABI";
+    license = licenses.isc;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.yuka ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libudev-zero/default.nix b/nixpkgs/pkgs/development/libraries/libudev-zero/default.nix
new file mode 100644
index 000000000000..ffacc906b4ea
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libudev-zero/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "libudev-zero";
+  version = "1.0.3";
+
+  src = fetchFromGitHub {
+    owner = "illiliti";
+    repo = "libudev-zero";
+    rev = version;
+    sha256 = "sha256-NXDof1tfr66ywYhCBDlPa+8DUfFj6YH0dvSaxHFqsXI=";
+  };
+
+  makeFlags = [ "PREFIX=$(out)" "AR=${stdenv.cc.targetPrefix}ar" ];
+
+  # Just let the installPhase build stuff, because there's no
+  # non-install target that builds everything anyway.
+  dontBuild = true;
+
+  installTargets = lib.optionals stdenv.hostPlatform.isStatic "install-static";
+
+  meta = with lib; {
+    homepage = "https://github.com/illiliti/libudev-zero";
+    description = "Daemonless replacement for libudev";
+    changelog = "https://github.com/illiliti/libudev-zero/releases/tag/${version}";
+    maintainers = with maintainers; [ qyliss shamilton ];
+    license = licenses.isc;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libudfread/default.nix b/nixpkgs/pkgs/development/libraries/libudfread/default.nix
new file mode 100644
index 000000000000..d4f9a0d06b46
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libudfread/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchurl, autoreconfHook, }:
+
+stdenv.mkDerivation rec {
+  pname = "libudfread";
+  version = "1.1.2";
+
+  src = fetchurl {
+    url =
+      "https://code.videolan.org/videolan/${pname}/-/archive/${version}/${pname}-${version}.tar.gz";
+    sha256 = "1idsfxff1x264n8jd7077qrd61rycsd09fwmc4ar7l4qmhk6gw9b";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  meta = with lib; {
+    description = "UDF reader";
+    homepage = "https://code.videolan.org/videolan/libudfread";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ chkno ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libuecc/default.nix b/nixpkgs/pkgs/development/libraries/libuecc/default.nix
new file mode 100644
index 000000000000..1cc3ac8ebea1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libuecc/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchgit, cmake }:
+
+stdenv.mkDerivation rec {
+  version = "7";
+  pname = "libuecc";
+
+  src = fetchgit {
+    url = "git://git.universe-factory.net/libuecc";
+    rev = "refs/tags/v${version}";
+    sha256 = "1sm05aql75sh13ykgsv3ns4x4zzw9lvzid6misd22gfgf6r9n5fs";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "Very small Elliptic Curve Cryptography library";
+    homepage = "https://git.universe-factory.net/libuecc";
+    license = licenses.bsd2;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ fpletz ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libuev/default.nix b/nixpkgs/pkgs/development/libraries/libuev/default.nix
new file mode 100644
index 000000000000..a124c25a2040
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libuev/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "libuev";
+  version = "2.4.1";
+
+  src = fetchFromGitHub {
+    owner = "troglobit";
+    repo = "libuev";
+    rev = "v${version}";
+    hash = "sha256-x1Sk7IuhlBQPFL7Rq4tmEanBxI/WaQ2L5fpUyEWOoi8=";
+  };
+
+  nativeBuildInputs = [ pkg-config autoreconfHook ];
+
+  meta = with lib; {
+    description = "Lightweight event loop library for Linux epoll() family APIs";
+    homepage = "https://codedocs.xyz/troglobit/libuev/";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ vifino ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libui/default.nix b/nixpkgs/pkgs/development/libraries/libui/default.nix
new file mode 100644
index 000000000000..a798977b1f41
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libui/default.nix
@@ -0,0 +1,53 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, gtk3, Cocoa }:
+
+let
+  backend   = if stdenv.isDarwin then "darwin" else "unix";
+in
+
+stdenv.mkDerivation rec {
+  pname = "libui";
+  version   = "4.1a";
+  src  = fetchFromGitHub {
+    owner  = "andlabs";
+    repo   = "libui";
+    rev    = "alpha4.1";
+    sha256 = "0bm6xvqk4drg2kw6d304x6mlfal7gh8mbl5a9f0509smmdzgdkwm";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  propagatedBuildInputs = lib.optional stdenv.isLinux gtk3
+    ++ lib.optionals stdenv.isDarwin [ Cocoa ];
+
+  preConfigure = lib.optionalString stdenv.isDarwin ''
+    sed -i 's/set(CMAKE_OSX_DEPLOYMENT_TARGET "10.8")//' ./CMakeLists.txt
+  '';
+
+  installPhase = ''
+    mkdir -p $out/{include,lib}
+    mkdir -p $out/lib/pkgconfig
+  '' + lib.optionalString stdenv.isLinux ''
+    mv ./out/libui.so.0 $out/lib/
+    ln -s $out/lib/libui.so.0 $out/lib/libui.so
+  '' + lib.optionalString stdenv.isDarwin ''
+    mv ./out/libui.A.dylib $out/lib/
+    ln -s $out/lib/libui.A.dylib $out/lib/libui.dylib
+  '' + ''
+    cp $src/ui.h $out/include
+    cp $src/ui_${backend}.h $out/include
+
+    cp ${./libui.pc} $out/lib/pkgconfig/libui.pc
+    substituteInPlace $out/lib/pkgconfig/libui.pc \
+      --subst-var-by out $out \
+      --subst-var-by version "${version}"
+  '';
+  postInstall = lib.optionalString stdenv.isDarwin ''
+    install_name_tool -id $out/lib/libui.A.dylib $out/lib/libui.A.dylib
+  '';
+
+  meta = with lib; {
+    homepage    = "https://github.com/andlabs/libui";
+    description = "Simple and portable (but not inflexible) GUI library in C that uses the native GUI technologies of each platform it supports";
+    license     = licenses.mit;
+    platforms   = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libui/libui.pc b/nixpkgs/pkgs/development/libraries/libui/libui.pc
new file mode 100644
index 000000000000..42ee86fb550f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libui/libui.pc
@@ -0,0 +1,11 @@
+prefix=@out@
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${exec_prefix}/include
+
+Name: libui
+Description: Simple and portable (but not inflexible) GUI library
+Version: @version@
+
+Libs: -L${libdir} -lui
+Cflags: -I${includedir}
diff --git a/nixpkgs/pkgs/development/libraries/libuinputplus/0001-Add-cmake-install-directives.patch b/nixpkgs/pkgs/development/libraries/libuinputplus/0001-Add-cmake-install-directives.patch
new file mode 100644
index 000000000000..cd6f43d37705
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libuinputplus/0001-Add-cmake-install-directives.patch
@@ -0,0 +1,40 @@
+From 265e406e254c8d84016b12b344d8df71d1765dd1 Mon Sep 17 00:00:00 2001
+From: Jappie Klooster <jappieklooster@hotmail.com>
+Date: Fri, 2 Apr 2021 16:33:18 -0400
+Subject: [PATCH] Add cmake install directives
+
+To make nix builds work, it expect a make install command to
+be available.
+Adding these directives seems to fix the build.
+
+If it's no trouble to you, please consider adding them.
+---
+ CMakeLists.txt | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index cbfc9c1..948c432 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -7,6 +7,8 @@ set(SOURCE_FILES
+         uInput.cpp uInputSetup.cpp uInputResource.cpp
+         uInput.hpp CommonIncludes.hpp uInputSetup.hpp)
+ 
++include(GNUInstallDirs)
++
+ add_library(uInputPlus ${SOURCE_FILES})
+ target_include_directories(uInputPlus PUBLIC .)
+ 
+@@ -15,3 +17,9 @@ target_link_libraries(uInputPlus_test uInputPlus)
+ 
+ configure_file(uInputPlus.pc.in uInputPlus.pc @ONLY)
+ 
++
++install(TARGETS uInputPlus
++        LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
++install(FILES uInput.hpp CommonIncludes.hpp uInputSetup.hpp
++        DESTINATION include/)
++
+-- 
+2.29.2
+
diff --git a/nixpkgs/pkgs/development/libraries/libuinputplus/default.nix b/nixpkgs/pkgs/development/libraries/libuinputplus/default.nix
new file mode 100644
index 000000000000..28110b577047
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libuinputplus/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config }:
+stdenv.mkDerivation rec {
+  pname = "libuinputplus";
+  version = "2021-04-02";
+
+  # adds missing cmake install directives
+  # https://github.com/YukiWorkshop/libuInputPlus/pull/7
+  patches = [ ./0001-Add-cmake-install-directives.patch];
+
+  src  = fetchFromGitHub {
+    owner  = "YukiWorkshop";
+    repo   = "libuInputPlus";
+    rev    = "f7f18eb339bba61a43f2cad481a9b1a453a66957";
+    sha256 = "0sind2ghhy4h9kfkr5hsmhcq0di4ifwqyv4gac96rgj5mwvs33lp";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  meta = with lib; {
+    inherit (src.meta) homepage;
+    description = "Easy-to-use uinput library in C++";
+    license = licenses.mit;
+    maintainers = with maintainers; [ willibutz ];
+    platforms = with platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libuiohook/default.nix b/nixpkgs/pkgs/development/libraries/libuiohook/default.nix
new file mode 100644
index 000000000000..3f1f48317fdc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libuiohook/default.nix
@@ -0,0 +1,71 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, nixosTests
+, cmake
+, pkg-config
+, AppKit
+, ApplicationServices
+, Carbon
+, libX11
+, libxkbcommon
+, xinput
+, xorg
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libuiohook";
+  version = "1.2.2";
+
+  src = fetchFromGitHub {
+    owner = "kwhat";
+    repo = pname;
+    rev = version;
+    sha256 = "1qlz55fp4i9dd8sdwmy1m8i4i1jy1s09cpmlxzrgf7v34w72ncm7";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs =
+    if stdenv.isDarwin then [ AppKit ApplicationServices Carbon ]
+    else [
+      libX11
+      libxkbcommon
+      xinput
+    ] ++
+    (with xorg; [
+      libXau
+      libXdmcp
+      libXi
+      libXinerama
+      libXt
+      libXtst
+      libXext
+      libxkbfile
+    ]);
+
+  outputs = [ "out" "test" ];
+
+  # We build the tests, but they're only installed when using the "test" output.
+  # This will produce a "uiohook_tests" binary which can be run to test the
+  # functionality of the library on the current system.
+  # Running the test binary requires a running X11 session.
+  cmakeFlags = [
+    "-DENABLE_TEST:BOOL=ON"
+  ];
+
+  postInstall = ''
+    mkdir -p $test/share
+    cp ./uiohook_tests $test/share
+  '';
+
+  meta = with lib; {
+    description = "A C library to provide global keyboard and mouse hooks from userland";
+    homepage = "https://github.com/kwhat/libuiohook";
+    license = licenses.gpl3Only;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ anoa ];
+  };
+
+  passthru.tests.libuiohook = nixosTests.libuiohook;
+}
diff --git a/nixpkgs/pkgs/development/libraries/libuldaq/0001-uldaq.patch b/nixpkgs/pkgs/development/libraries/libuldaq/0001-uldaq.patch
new file mode 100644
index 000000000000..97375283cd64
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libuldaq/0001-uldaq.patch
@@ -0,0 +1,28 @@
+diff --git a/Makefile.am b/Makefile.am
+index 0e69cd4..b4a1f1a 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -26,7 +26,7 @@ dist_pkgconfig_DATA=libuldaq.pc
+ # fpga/USB_DIO32HS.bin
+ 
+ if OS_LINUX
+-rulesdatadir=/lib/udev/rules.d/
++rulesdatadir=$(libdir)/udev/rules.d/
+ dist_rulesdata_DATA=rules/50-uldaq.rules
+ endif
+ 
+@@ -42,14 +42,6 @@ dist-up: dist
+ 	mkdir -p $(reldir)
+ 	cp $(distdir).tar.bz2 $(reldir)
+ 
+-if OS_LINUX
+-install-data-hook:
+-	udevadm control --reload-rules && \
+-	test -f "/etc/redhat-release" && echo "/usr/local/lib" > /etc/ld.so.conf.d/uldaq.conf || echo "" && \
+-	test -f "/etc/arch-release" && echo "/usr/local/lib" > /etc/ld.so.conf.d/uldaq.conf || echo "" && \
+-	ldconfig
+-endif
+-
+ if OS_LINUX
+ uninstall-hook:
+ 	test -f "/etc/ld.so.conf.d/uldaq.conf" &&  rm "/etc/ld.so.conf.d/uldaq.conf" || echo ""
diff --git a/nixpkgs/pkgs/development/libraries/libuldaq/default.nix b/nixpkgs/pkgs/development/libraries/libuldaq/default.nix
new file mode 100644
index 000000000000..fb234ef60d14
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libuldaq/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, libusb1, ...}:
+
+stdenv.mkDerivation rec {
+  pname = "libuldaq";
+  version = "1.2.1";
+
+  src = fetchFromGitHub {
+    owner = "mccdaq";
+    repo = "uldaq";
+    rev = "v${version}";
+    sha256 = "sha256-DA1mxu94z5xDpGK9OBwD02HXlOATv/slqZ4lz5GM7QM=";
+  };
+
+  patches = [
+    # Patch needed for `make install` to succeed
+    ./0001-uldaq.patch
+  ];
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  buildInputs = [ libusb1 ];
+
+  meta = with lib; {
+    description = "Library to talk to uldaq devices";
+    longDescription = ''
+      Library used to communicate with USB data acquisition (DAQ)
+      devices from Measurement Computing
+    '';
+    homepage = "https://github.com/mccdaq/uldaq";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.simonkampe ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libunarr/default.nix b/nixpkgs/pkgs/development/libraries/libunarr/default.nix
new file mode 100644
index 000000000000..c1e0881bf3ff
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libunarr/default.nix
@@ -0,0 +1,33 @@
+{ lib
+, stdenv
+, fetchurl
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libunarr";
+  version = "1.1.1";
+
+  src = fetchurl {
+    url = "https://github.com/selmf/unarr/releases/download/v${version}/unarr-${version}.tar.xz";
+    hash = "sha256-Mo76BOqZbdOJFrEkeozxdqwpuFyvkhdONNMZmN5BdNI=";
+  };
+
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace CMakeLists.txt \
+      --replace "-flto" "" \
+      --replace "AppleClang" "Clang"
+  '';
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/selmf/unarr";
+    description = "A lightweight decompression library with support for rar, tar and zip archives";
+    license = licenses.lgpl3Plus;
+    maintainers = with maintainers; [ wegank ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libunibreak/default.nix b/nixpkgs/pkgs/development/libraries/libunibreak/default.nix
new file mode 100644
index 000000000000..f740bd82bb73
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libunibreak/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "libunibreak";
+  version = "5.1";
+
+  src = let
+      rev_version = lib.replaceStrings ["."] ["_"] version;
+  in fetchFromGitHub {
+    owner = "adah1972";
+    repo = pname;
+    rev = "libunibreak_${rev_version}";
+    sha256 = "sha256-hjgT5DCQ6KFXKlxk9LLzxGHz6B71X/3Ot7ipK3KY85A=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  meta = with lib; {
+    homepage = "https://github.com/adah1972/libunibreak";
+    description = "Implementation of line breaking and word breaking algorithms as in the Unicode standard";
+    license = licenses.zlib;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.coroa ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libunicode/default.nix b/nixpkgs/pkgs/development/libraries/libunicode/default.nix
new file mode 100644
index 000000000000..725dacebcc25
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libunicode/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchFromGitHub, fetchzip, cmake, catch2, fmt, python3 }:
+
+let
+  ucd-version = "15.0.0";
+
+  ucd-src = fetchzip {
+    url = "https://www.unicode.org/Public/${ucd-version}/ucd/UCD.zip";
+    hash = "sha256-jj6bX46VcnH7vpc9GwM9gArG+hSPbOGL6E4SaVd0s60=";
+    stripRoot = false;
+  };
+in stdenv.mkDerivation (final: {
+  pname = "libunicode";
+  version = "0.4.0";
+
+  src = fetchFromGitHub {
+    owner = "contour-terminal";
+    repo = "libunicode";
+    rev = "v${final.version}";
+    hash = "sha256-Us3T4fnGsArdsVB7IUhwdex43C+H1+lfL8yK9enhf2c=";
+  };
+
+  # Fix: set_target_properties Can not find target to add properties to: Catch2, et al.
+  patches = [ ./remove-target-properties.diff ];
+
+  nativeBuildInputs = [ cmake python3 ];
+  buildInputs = [ catch2 fmt ];
+
+  cmakeFlags = [ "-DLIBUNICODE_UCD_DIR=${ucd-src}" ];
+
+  meta = with lib; {
+    description = "Modern C++17 Unicode library";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ moni ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libunicode/remove-target-properties.diff b/nixpkgs/pkgs/development/libraries/libunicode/remove-target-properties.diff
new file mode 100644
index 000000000000..4bf665cf3e7c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libunicode/remove-target-properties.diff
@@ -0,0 +1,19 @@
+diff --git a/src/libunicode/CMakeLists.txt b/src/libunicode/CMakeLists.txt
+index 6c5ac20..9fa13a3 100644
+--- a/src/libunicode/CMakeLists.txt
++++ b/src/libunicode/CMakeLists.txt
+@@ -223,10 +223,10 @@ if(LIBUNICODE_TESTING)
+     # supress conversion warnings for Catch2
+     # https://github.com/catchorg/Catch2/issues/2583
+     # https://github.com/SFML/SFML/blob/e45628e2ebc5843baa3739781276fa85a54d4653/test/CMakeLists.txt#L18-L22
+-    set_target_properties(Catch2 PROPERTIES COMPILE_OPTIONS "" EXPORT_COMPILE_COMMANDS OFF)
+-    set_target_properties(Catch2WithMain PROPERTIES EXPORT_COMPILE_COMMANDS OFF)
+-    get_target_property(CATCH2_INCLUDE_DIRS Catch2 INTERFACE_INCLUDE_DIRECTORIES)
+-    target_include_directories(Catch2 SYSTEM INTERFACE ${CATCH2_INCLUDE_DIRS})
++    # set_target_properties(Catch2 PROPERTIES COMPILE_OPTIONS "" EXPORT_COMPILE_COMMANDS OFF)
++    # set_target_properties(Catch2WithMain PROPERTIES EXPORT_COMPILE_COMMANDS OFF)
++    # get_target_property(CATCH2_INCLUDE_DIRS Catch2 INTERFACE_INCLUDE_DIRECTORIES)
++    # target_include_directories(Catch2 SYSTEM INTERFACE ${CATCH2_INCLUDE_DIRS})
+ 
+     target_link_libraries(unicode_test unicode Catch2::Catch2WithMain fmt::fmt-header-only)
+     add_test(unicode_test unicode_test)
diff --git a/nixpkgs/pkgs/development/libraries/libuninameslist/default.nix b/nixpkgs/pkgs/development/libraries/libuninameslist/default.nix
new file mode 100644
index 000000000000..3cbb78d83ce9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libuninameslist/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv
+, fetchFromGitHub
+, autoreconfHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libuninameslist";
+  version = "20230916";
+
+  src = fetchFromGitHub {
+    owner = "fontforge";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-8mLXTvi4KbU4NiCPaJINTeFbnTAabGDg8ufpSHSqy0Y=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/fontforge/libuninameslist/";
+    description = "A Library of Unicode names and annotation data";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ erictapen ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libunique/1.1.6-G_CONST_RETURN.patch b/nixpkgs/pkgs/development/libraries/libunique/1.1.6-G_CONST_RETURN.patch
new file mode 100644
index 000000000000..1cc5b6e01be4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libunique/1.1.6-G_CONST_RETURN.patch
@@ -0,0 +1,143 @@
+From 557b0e5045c9eadb556ce11e16965cf0d0787438 Mon Sep 17 00:00:00 2001
+From: Stef Walter <stefw@collabora.co.uk>
+Date: Tue, 14 Jun 2011 12:33:45 +0100
+Subject: [PATCH] Remove G_CONST_RETURN usage, now that its gone in glib.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=652545
+
+[Alexandre Rostovtsev <tetromino@gmail.com>: backported to unique-1.1]
+---
+ unique/uniqueapp.c       |    4 ++--
+ unique/uniquebackend.c   |    4 ++--
+ unique/uniquebackend.h   |    4 ++--
+ unique/uniqueinternals.h |    4 ++--
+ unique/uniquemessage.c   |    4 ++--
+ unique/uniquemessage.h   |    4 ++--
+ 6 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/unique/uniqueapp.c b/unique/uniqueapp.c
+index b40a86c..e8edc94 100644
+--- a/unique/uniqueapp.c
++++ b/unique/uniqueapp.c
+@@ -781,7 +781,7 @@ unique_app_watch_window (UniqueApp *app,
+ }
+ 
+ 
+-G_CONST_RETURN gchar *
++const gchar *
+ unique_command_to_string (UniqueApp *app,
+                           gint       command)
+ {
+@@ -863,7 +863,7 @@ unique_command_from_string (UniqueApp   *app,
+   return retval;
+ }
+ 
+-G_CONST_RETURN gchar *
++const gchar *
+ unique_response_to_string (UniqueResponse response)
+ {
+   GEnumClass *enum_class;
+diff --git a/unique/uniquebackend.c b/unique/uniquebackend.c
+index a76e42e..68e2735 100644
+--- a/unique/uniquebackend.c
++++ b/unique/uniquebackend.c
+@@ -111,7 +111,7 @@ unique_backend_set_name (UniqueBackend *backend,
+  *
+  * Return value: FIXME
+  */
+-G_CONST_RETURN gchar *
++const gchar *
+ unique_backend_get_name (UniqueBackend *backend)
+ {
+   g_return_val_if_fail (UNIQUE_IS_BACKEND (backend), NULL);
+@@ -154,7 +154,7 @@ unique_backend_set_startup_id (UniqueBackend *backend,
+  *
+  * Return value: FIXME
+  */
+-G_CONST_RETURN gchar *
++const gchar *
+ unique_backend_get_startup_id (UniqueBackend *backend)
+ {
+   g_return_val_if_fail (UNIQUE_IS_BACKEND (backend), NULL);
+diff --git a/unique/uniquebackend.h b/unique/uniquebackend.h
+index a50ce4e..b19ad3e 100644
+--- a/unique/uniquebackend.h
++++ b/unique/uniquebackend.h
+@@ -94,10 +94,10 @@ GType                 unique_backend_get_type       (void) G_GNUC_CONST;
+ 
+ UniqueBackend *       unique_backend_create         (void);
+ 
+-G_CONST_RETURN gchar *unique_backend_get_name       (UniqueBackend     *backend);
++const gchar *         unique_backend_get_name       (UniqueBackend     *backend);
+ void                  unique_backend_set_name       (UniqueBackend     *backend,
+                                                      const gchar       *name);
+-G_CONST_RETURN gchar *unique_backend_get_startup_id (UniqueBackend     *backend);
++const gchar *         unique_backend_get_startup_id (UniqueBackend     *backend);
+ void                  unique_backend_set_startup_id (UniqueBackend     *backend,
+                                                      const gchar       *startup_id);
+ GdkScreen *           unique_backend_get_screen     (UniqueBackend     *backend);
+diff --git a/unique/uniqueinternals.h b/unique/uniqueinternals.h
+index 3cec152..ccae0cd 100644
+--- a/unique/uniqueinternals.h
++++ b/unique/uniqueinternals.h
+@@ -44,11 +44,11 @@ UniqueResponse unique_app_emit_message_received (UniqueApp         *app,
+  * and then back into an id
+  */
+ UniqueResponse        unique_response_from_string  (const gchar    *response);
+-G_CONST_RETURN gchar *unique_response_to_string    (UniqueResponse  response);
++const gchar *         unique_response_to_string    (UniqueResponse  response);
+ 
+ gint                  unique_command_from_string   (UniqueApp      *app,
+                                                     const gchar    *command);
+-G_CONST_RETURN gchar *unique_command_to_string     (UniqueApp      *app,
++const gchar *         unique_command_to_string     (UniqueApp      *app,
+                                                     gint            command);
+ 
+ G_END_DECLS
+diff --git a/unique/uniquemessage.c b/unique/uniquemessage.c
+index c74392d..2b2a9fc 100644
+--- a/unique/uniquemessage.c
++++ b/unique/uniquemessage.c
+@@ -185,7 +185,7 @@ unique_message_data_set (UniqueMessageData *message_data,
+  *
+  * Since: 1.0.2
+  */
+-G_CONST_RETURN guchar *
++const guchar *
+ unique_message_data_get (UniqueMessageData *message_data,
+                          gsize             *length)
+ {
+@@ -525,7 +525,7 @@ unique_message_data_get_screen (UniqueMessageData *message_data)
+  *   owned by the #UniqueMessageData structure and should not be
+  *   modified or freed
+  */
+-G_CONST_RETURN gchar *
++const gchar *
+ unique_message_data_get_startup_id (UniqueMessageData *message_data)
+ {
+   g_return_val_if_fail (message_data != NULL, NULL);
+diff --git a/unique/uniquemessage.h b/unique/uniquemessage.h
+index d3e9c3c..93eee21 100644
+--- a/unique/uniquemessage.h
++++ b/unique/uniquemessage.h
+@@ -48,7 +48,7 @@ void                   unique_message_data_free           (UniqueMessageData *me
+ void                   unique_message_data_set            (UniqueMessageData *message_data,
+                                                            const guchar      *data,
+                                                            gsize              length);
+-G_CONST_RETURN guchar *unique_message_data_get            (UniqueMessageData *message_data,
++const guchar *         unique_message_data_get            (UniqueMessageData *message_data,
+                                                            gsize             *length);
+ 
+ gboolean               unique_message_data_set_text       (UniqueMessageData *message_data,
+@@ -63,7 +63,7 @@ void                   unique_message_data_set_filename   (UniqueMessageData *me
+ gchar *                unique_message_data_get_filename   (UniqueMessageData *message_data);
+ 
+ GdkScreen *            unique_message_data_get_screen     (UniqueMessageData *message_data);
+-G_CONST_RETURN gchar * unique_message_data_get_startup_id (UniqueMessageData *message_data);
++const gchar *          unique_message_data_get_startup_id (UniqueMessageData *message_data);
+ guint                  unique_message_data_get_workspace  (UniqueMessageData *message_data);
+ 
+ G_END_DECLS
+-- 
+1.7.6
+
diff --git a/nixpkgs/pkgs/development/libraries/libunique/1.1.6-compiler-warnings.patch b/nixpkgs/pkgs/development/libraries/libunique/1.1.6-compiler-warnings.patch
new file mode 100644
index 000000000000..f47e66267d50
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libunique/1.1.6-compiler-warnings.patch
@@ -0,0 +1,50 @@
+From 9df132a70d54b768a8e1d0335d24b85ac9b3fb76 Mon Sep 17 00:00:00 2001
+From: Emmanuele Bassi <ebassi@linux.intel.com>
+Date: Sun, 27 Mar 2011 08:42:22 +0000
+Subject: Remove compiler warnings
+
+(cherry picked from commit f791ed16b19dddc7fbaf90d8f797520e67883021)
+
+Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
+---
+diff --git a/unique/dbus/uniquebackend-dbus.c b/unique/dbus/uniquebackend-dbus.c
+index 3ae1bed..69faa00 100644
+--- a/unique/dbus/uniquebackend-dbus.c
++++ b/unique/dbus/uniquebackend-dbus.c
+@@ -84,7 +84,6 @@ unique_backend_dbus_register_proxy (UniqueBackendDBus *backend_dbus)
+ static gboolean
+ unique_backend_dbus_request_name (UniqueBackend *backend)
+ {
+-  UniqueBackendDBus *backend_dbus;
+   const gchar *name;
+   DBusGConnection *connection;
+   DBusGProxy *proxy;
+@@ -97,8 +96,6 @@ unique_backend_dbus_request_name (UniqueBackend *backend)
+   if (!connection)
+     return FALSE;
+ 
+-  backend_dbus = UNIQUE_BACKEND_DBUS (backend);
+-
+   retval = TRUE;
+   name = unique_backend_get_name (backend);
+   g_assert (name != NULL);
+@@ -207,10 +204,14 @@ unique_backend_dbus_send_message (UniqueBackend     *backend,
+                                         cmd, data, time_,
+                                         &resp,
+                                         &error);
+-  if (error)
++  if (!res)
+     {
+-      g_warning ("Error while sending message: %s", error->message);
+-      g_error_free (error);
++      if (error)
++        {
++          g_warning ("Error while sending message: %s", error->message);
++          g_error_free (error);
++        }
++
+       g_free (cmd);
+       
+       return UNIQUE_RESPONSE_INVALID;
+--
+cgit v0.9
diff --git a/nixpkgs/pkgs/development/libraries/libunique/1.1.6-fix-test.patch b/nixpkgs/pkgs/development/libraries/libunique/1.1.6-fix-test.patch
new file mode 100644
index 000000000000..b2e85e4d71a5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libunique/1.1.6-fix-test.patch
@@ -0,0 +1,26 @@
+From caf736f4b84808393b0d7030ae6128a3322a71e2 Mon Sep 17 00:00:00 2001
+From: Tobias Mueller <tobiasmue@gnome.org>
+Date: Mon, 12 Apr 2010 13:01:42 +0000
+Subject: test-unique: Resolve format string issues
+
+Provide a proper literal format string to not expose potential vulnerabilites.
+Fixes bug 615522.
+---
+diff --git a/tests/test-unique.c b/tests/test-unique.c
+index b7cde45..c9958c9 100644
+--- a/tests/test-unique.c
++++ b/tests/test-unique.c
+@@ -82,9 +82,11 @@ app_message_cb (UniqueApp         *app,
+                                    GTK_DIALOG_DESTROY_WITH_PARENT,
+                                    GTK_MESSAGE_INFO,
+                                    GTK_BUTTONS_CLOSE,
++                                   "%s",
+                                    title);
+   if (message)
+     gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
++                                              "%s",
+                                               message);
+ 
+   gtk_window_set_urgency_hint (GTK_WINDOW (dialog), TRUE);
+--
+cgit v0.9
diff --git a/nixpkgs/pkgs/development/libraries/libunique/1.1.6-include-terminator.patch b/nixpkgs/pkgs/development/libraries/libunique/1.1.6-include-terminator.patch
new file mode 100644
index 000000000000..927771e7311b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libunique/1.1.6-include-terminator.patch
@@ -0,0 +1,37 @@
+From 30ca2903a8ed4eed974ea744e4b9bd96198c425d Mon Sep 17 00:00:00 2001
+From: Rodney Lorrimar <r.lorrimar@fugro-fsi.com.au>
+Date: Mon, 21 Dec 2009 02:07:46 +0000
+Subject: Include NUL terminator in unique_message_data_get_filename()
+
+https://bugzilla.gnome.org/show_bug.cgi?id=605104
+
+Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
+---
+diff --git a/unique/uniqueinternals.h b/unique/uniqueinternals.h
+index ace40ed..3cec152 100644
+--- a/unique/uniqueinternals.h
++++ b/unique/uniqueinternals.h
+@@ -13,7 +13,7 @@ G_BEGIN_DECLS
+ struct _UniqueMessageData
+ {
+   guchar *data;
+-  gint length;
++  gint length;  /* length of data not including NUL terminator */
+ 
+   GdkScreen *screen;
+   gchar *startup_id;
+diff --git a/unique/uniquemessage.c b/unique/uniquemessage.c
+index 10f6df5..c74392d 100644
+--- a/unique/uniquemessage.c
++++ b/unique/uniquemessage.c
+@@ -493,7 +493,7 @@ unique_message_data_get_filename (UniqueMessageData *message_data)
+ {
+   g_return_val_if_fail (message_data != NULL, NULL);
+ 
+-  return g_memdup (message_data->data, message_data->length);
++  return g_memdup (message_data->data, message_data->length + 1);
+ }
+ 
+ /**
+--
+cgit v0.9
diff --git a/nixpkgs/pkgs/development/libraries/libunique/3.x.nix b/nixpkgs/pkgs/development/libraries/libunique/3.x.nix
new file mode 100644
index 000000000000..780ae7418dde
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libunique/3.x.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl, pkg-config
+, dbus, dbus-glib, gtk3, gobject-introspection
+, gtk-doc, docbook_xml_dtd_45, docbook_xsl
+, libxslt, libxml2 }:
+
+stdenv.mkDerivation rec {
+
+  majorVer = "3.0";
+  minorVer = "2";
+  version = "${majorVer}.${minorVer}";
+  pname = "libunique3";
+  srcName = "libunique-${version}";
+
+  src = fetchurl {
+    url = "http://ftp.gnome.org/pub/GNOME/sources/libunique/${majorVer}/${srcName}.tar.xz";
+    sha256 = "0f70lkw66v9cj72q0iw1s2546r6bwwcd8idcm3621fg2fgh2rw58";
+  };
+
+  nativeBuildInputs = [ pkg-config gobject-introspection ];
+  buildInputs = [ dbus dbus-glib gtk3 gtk-doc docbook_xml_dtd_45 docbook_xsl libxslt libxml2 ];
+
+  meta = {
+    homepage = "https://wiki.gnome.org/Attic/LibUnique";
+    description = "A library for writing single instance applications";
+    license = lib.licenses.lgpl21;
+    maintainers = [ lib.maintainers.AndersonTorres ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libunique/default.nix b/nixpkgs/pkgs/development/libraries/libunique/default.nix
new file mode 100644
index 000000000000..13dc13e5e968
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libunique/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchurl, pkg-config, glib, gtk2, dbus-glib }:
+
+stdenv.mkDerivation rec {
+  pname = "libunique";
+  version = "1.1.6";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.bz2";
+    sha256 = "1fsgvmncd9caw552lyfg8swmsd6bh4ijjsph69bwacwfxwf09j75";
+  };
+
+  # Don't make deprecated usages hard errors
+  prePatch = ''
+    substituteInPlace configure --replace "-Werror" "";
+  '';
+
+  # glib-2.62 deprecations
+  env.NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS";
+
+  # Patches from Gentoo portage
+  patches = [
+    ./1.1.6-compiler-warnings.patch
+    ./1.1.6-fix-test.patch
+    ./1.1.6-G_CONST_RETURN.patch
+    ./1.1.6-include-terminator.patch
+  ] ++ [ ./gcc7-bug.patch ];
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ glib gtk2 dbus-glib ];
+
+  doCheck = true;
+
+  meta = {
+    homepage = "https://wiki.gnome.org/Attic/LibUnique";
+    description = "A library for writing single instance applications";
+    license = lib.licenses.lgpl21;
+    platforms = with lib.platforms; linux ++ darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libunique/gcc7-bug.patch b/nixpkgs/pkgs/development/libraries/libunique/gcc7-bug.patch
new file mode 100644
index 000000000000..2b0587510bc0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libunique/gcc7-bug.patch
@@ -0,0 +1,18 @@
+gcc-7 newly detects this class of bugs.
+In this particular case it's clear that the inention was
+to detect if the string is non-NULL *and* non-empty.
+
+
+diff --git a/unique/uniqueapp.c b/unique/uniqueapp.c
+index b40a86c..66a7226 100644
+--- a/unique/uniqueapp.c
++++ b/unique/uniqueapp.c
+@@ -176,7 +176,7 @@ set_startup_id (UniqueBackend *backend,
+ {
+   gchar *id;
+ 
+-  if (startup_id && startup_id != '\0')
++  if (startup_id && *startup_id != '\0')
+     id = g_strdup (startup_id);
+   else
+     {
diff --git a/nixpkgs/pkgs/development/libraries/libunistring/default.nix b/nixpkgs/pkgs/development/libraries/libunistring/default.nix
new file mode 100644
index 000000000000..51eb5558d626
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libunistring/default.nix
@@ -0,0 +1,74 @@
+{ fetchurl, lib, stdenv, libiconv }:
+
+# Note: this package is used for bootstrapping fetchurl, and thus
+# cannot use fetchpatch! All mutable patches (generated by GitHub or
+# cgit) that are needed here should be included directly in Nixpkgs as
+# files.
+
+stdenv.mkDerivation rec {
+  pname = "libunistring";
+  version = "1.1";
+
+  src = fetchurl {
+    url = "mirror://gnu/libunistring/${pname}-${version}.tar.gz";
+    sha256 = "sha256-oiUr7uyDCsREufaNazitiD2xmRnbNbUiIs+CfDhb22o=";
+  };
+
+  outputs = [ "out" "dev" "info" "doc" ];
+
+  strictDeps = true;
+  propagatedBuildInputs = lib.optional (!stdenv.isLinux) libiconv;
+
+  configureFlags = [
+    "--with-libiconv-prefix=${libiconv}"
+  ];
+
+  doCheck = false;
+
+  /* This seems to cause several random failures like these, which I assume
+     is because of bad or missing target dependencies in their build system:
+
+        ./unistdio/test-u16-vasnprintf2.sh: line 16: ./test-u16-vasnprintf1: No such file or directory
+        FAIL unistdio/test-u16-vasnprintf2.sh (exit status: 1)
+
+        FAIL: unistdio/test-u16-vasnprintf3.sh
+        ======================================
+
+        ./unistdio/test-u16-vasnprintf3.sh: line 16: ./test-u16-vasnprintf1: No such file or directory
+        FAIL unistdio/test-u16-vasnprintf3.sh (exit status: 1)
+  */
+  enableParallelChecking = false;
+  enableParallelBuilding = true;
+
+  meta = {
+    homepage = "https://www.gnu.org/software/libunistring/";
+
+    description = "Unicode string library";
+
+    longDescription = ''
+      This library provides functions for manipulating Unicode strings
+      and for manipulating C strings according to the Unicode
+      standard.
+
+      GNU libunistring is for you if your application involves
+      non-trivial text processing, such as upper/lower case
+      conversions, line breaking, operations on words, or more
+      advanced analysis of text.  Text provided by the user can, in
+      general, contain characters of all kinds of scripts.  The text
+      processing functions provided by this library handle all scripts
+      and all languages.
+
+      libunistring is for you if your application already uses the ISO
+      C / POSIX <ctype.h>, <wctype.h> functions and the text it
+      operates on is provided by the user and can be in any language.
+
+      libunistring is also for you if your application uses Unicode
+      strings as internal in-memory representation.
+    '';
+
+    license = lib.licenses.lgpl3Plus;
+
+    maintainers = [ ];
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libunity/default.nix b/nixpkgs/pkgs/development/libraries/libunity/default.nix
new file mode 100644
index 000000000000..c27fce32ec00
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libunity/default.nix
@@ -0,0 +1,70 @@
+{ lib
+, stdenv
+, fetchgit
+, pkg-config
+, glib
+, vala
+, dee
+, gobject-introspection
+, libdbusmenu
+, gtk3
+, intltool
+, python3
+, autoreconfHook
+}:
+
+stdenv.mkDerivation {
+  pname = "libunity";
+  version = "unstable-2021-02-01";
+
+  outputs = [ "out" "dev" "py" ];
+
+  # Obtained from https://git.launchpad.net/ubuntu/+source/libunity/log/
+  src = fetchgit {
+    url = "https://git.launchpad.net/ubuntu/+source/libunity";
+    rev = "import/7.1.4+19.04.20190319-5";
+    sha256 = "LHUs6kl1srS6Xektx+jmm4SXLR47VuQ9IhYbBxf2Wc8=";
+  };
+
+  patches = [
+    # Fix builf with latest Vala
+    # https://code.launchpad.net/~jtojnar/libunity/libunity
+    # Did not send upstream because Ubuntu is stuck on Vala 0.48.
+    ./fix-vala.patch
+  ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+    gobject-introspection
+    intltool
+    pkg-config
+    python3
+    vala
+  ];
+
+  buildInputs = [
+    glib
+    gtk3
+  ];
+
+  propagatedBuildInputs = [
+    dee
+    libdbusmenu
+  ];
+
+  preConfigure = ''
+    intltoolize
+  '';
+
+  configureFlags = [
+    "--with-pygi-overrides-dir=${placeholder "py"}/${python3.sitePackages}/gi/overrides"
+  ];
+
+  meta = with lib; {
+    description = "A library for instrumenting and integrating with all aspects of the Unity shell";
+    homepage = "https://launchpad.net/libunity";
+    license = licenses.lgpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libunity/fix-vala.patch b/nixpkgs/pkgs/development/libraries/libunity/fix-vala.patch
new file mode 100644
index 000000000000..555c2ad7bcb0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libunity/fix-vala.patch
@@ -0,0 +1,12 @@
+--- a/protocol/protocol-icon.vala	2013-08-27 12:53:57 +0000
++++ b/protocol/protocol-icon.vala	2021-04-13 22:34:41 +0000
+@@ -185,7 +185,7 @@
+   }
+ 
+   /* Added to GIcon interface in 2.37 */
+-  private Variant serialize ()
++  private Variant? serialize ()
+   {
+     Variant? ret = null;
+     return ret;
+
diff --git a/nixpkgs/pkgs/development/libraries/libunwind/default.nix b/nixpkgs/pkgs/development/libraries/libunwind/default.nix
new file mode 100644
index 000000000000..19d6f0f6cd02
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libunwind/default.nix
@@ -0,0 +1,50 @@
+{ stdenv, lib, fetchFromGitHub, fetchpatch, autoreconfHook, xz, buildPackages }:
+
+stdenv.mkDerivation rec {
+  pname = "libunwind";
+  version = "1.7.2";
+
+  src = fetchFromGitHub {
+    owner = "libunwind";
+    repo = "libunwind";
+    rev = "v${version}";
+    hash = "sha256-z5YCue0zadQnMEbGFniFvDjXNy6dSHQDQnXRXS6Uh/Y=";
+  };
+
+  postPatch = if (stdenv.cc.isClang || stdenv.hostPlatform.isStatic) then ''
+    substituteInPlace configure.ac --replace "-lgcc_s" ""
+  '' else lib.optionalString stdenv.hostPlatform.isMusl ''
+    substituteInPlace configure.ac --replace "-lgcc_s" "-lgcc_eh"
+  '';
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  outputs = [ "out" "dev" "devman" ];
+
+  # Without latex2man, no man pages are installed despite being
+  # prebuilt in the source tarball.
+  configureFlags = [ "LATEX2MAN=${buildPackages.coreutils}/bin/true" ]
+  # See https://github.com/libunwind/libunwind/issues/693
+  ++ lib.optionals (with stdenv.hostPlatform; isAarch64 && isMusl && !isStatic) [
+    "CFLAGS=-mno-outline-atomics"
+  ];
+
+  propagatedBuildInputs = [ xz ];
+
+  postInstall = ''
+    find $out -name \*.la | while read file; do
+      sed -i 's,-llzma,${xz.out}/lib/liblzma.la,' $file
+    done
+  '';
+
+  doCheck = false; # fails
+
+  meta = with lib; {
+    homepage = "https://www.nongnu.org/libunwind";
+    description = "A portable and efficient API to determine the call-chain of a program";
+    maintainers = with maintainers; [ orivej ];
+    # https://github.com/libunwind/libunwind#libunwind
+    platforms = [ "aarch64-linux" "armv5tel-linux" "armv6l-linux" "armv7a-linux" "armv7l-linux" "i686-freebsd13" "i686-linux" "loongarch64-linux" "mips64el-linux" "mipsel-linux" "powerpc64-linux" "powerpc64le-linux" "riscv64-linux" "s390x-linux" "x86_64-freebsd13" "x86_64-linux" "x86_64-solaris" ];
+    license = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/liburcu/default.nix b/nixpkgs/pkgs/development/libraries/liburcu/default.nix
new file mode 100644
index 000000000000..722a1534e92c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liburcu/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl, perl }:
+
+stdenv.mkDerivation rec {
+  version = "0.14.0";
+  pname = "liburcu";
+
+  src = fetchurl {
+    url = "https://lttng.org/files/urcu/userspace-rcu-${version}.tar.bz2";
+    sha256 = "sha256-ykO/Jh1NOSz/IN+uRAg2YDvwCfziT9ybJpfYN6IjnU8=";
+  };
+
+  outputs = [ "out" "dev" "doc" ];
+
+  nativeCheckInputs = [ perl ];
+
+  preCheck = "patchShebangs tests/unit";
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Userspace RCU (read-copy-update) library";
+    homepage = "https://lttng.org/urcu";
+    changelog = "https://github.com/urcu/userspace-rcu/raw/v${version}/ChangeLog";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.bjornfor ];
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/liburing/default.nix b/nixpkgs/pkgs/development/libraries/liburing/default.nix
new file mode 100644
index 000000000000..a42aab3d59e8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liburing/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, fetchgit }:
+
+stdenv.mkDerivation rec {
+  pname = "liburing";
+  version = "2.5";
+
+  src = fetchgit {
+    url    = "http://git.kernel.dk/${pname}";
+    rev    = "liburing-${version}";
+    sha256 = "sha256-hPyEZ0P1rfos53OCNd2OYFiqmv6TgpWaj5/xPLccCvM=";
+  };
+
+  separateDebugInfo = true;
+  enableParallelBuilding = true;
+  # Upstream's configure script is not autoconf generated, but a hand written one.
+  setOutputFlags = false;
+  configureFlags = [
+    "--includedir=${placeholder "dev"}/include"
+    "--mandir=${placeholder "man"}/share/man"
+  ];
+
+  # Doesn't recognize platform flags
+  configurePlatforms = [];
+
+  outputs = [ "out" "bin" "dev" "man" ];
+
+  postInstall = ''
+    # Copy the examples into $bin. Most reverse dependency of this package should
+    # reference only the $out output
+    mkdir -p $bin/bin
+    cp ./examples/io_uring-cp examples/io_uring-test $bin/bin
+    cp ./examples/link-cp $bin/bin/io_uring-link-cp
+  '' + lib.optionalString stdenv.hostPlatform.isGnu ''
+    cp ./examples/ucontext-cp $bin/bin/io_uring-ucontext-cp
+  '';
+
+  meta = with lib; {
+    description = "Userspace library for the Linux io_uring API";
+    homepage    = "https://git.kernel.dk/cgit/liburing/";
+    license     = licenses.lgpl21;
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ thoughtpolice nickcao ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libusb-compat/0.1.nix b/nixpkgs/pkgs/development/libraries/libusb-compat/0.1.nix
new file mode 100644
index 000000000000..db80cfd81d06
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libusb-compat/0.1.nix
@@ -0,0 +1,45 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+, libusb1
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libusb-compat";
+  version = "0.1.8";
+
+  outputs = [ "out" "dev" ]; # get rid of propagating systemd closure
+  outputBin = "dev";
+
+  src = fetchFromGitHub {
+    owner = "libusb";
+    repo = "libusb-compat-0.1";
+    rev = "v${version}";
+    sha256 = "sha256-pAPERYSxoc47gwpPUoMkrbK8TOXyx03939vlFN0hHRg=";
+  };
+
+  patches = lib.optional stdenv.hostPlatform.isMusl ./fix-headers.patch;
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  buildInputs = [ libusb1 ];
+
+  # without this, libusb-compat is unable to find libusb1
+  postFixup = ''
+    find $out/lib -name \*.so\* -type f -exec \
+      patchelf --set-rpath ${lib.makeLibraryPath buildInputs} {} \;
+  '';
+
+  meta = with lib; {
+    homepage = "https://libusb.info/";
+    description = "cross-platform user-mode USB device library";
+    longDescription = ''
+      libusb is a cross-platform user-mode library that provides access to USB devices.
+      The current API is of 1.0 version (libusb-1.0 API), this library is a wrapper exposing the legacy API.
+    '';
+    license = licenses.lgpl2Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libusb-compat/fix-headers.patch b/nixpkgs/pkgs/development/libraries/libusb-compat/fix-headers.patch
new file mode 100644
index 000000000000..ea9cbc34978e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libusb-compat/fix-headers.patch
@@ -0,0 +1,10 @@
+--- libusb-compat-0.1.5.orig/libusb/usb.h
++++ libusb-compat-0.1.5/libusb/usb.h
+@@ -25,6 +25,7 @@
+ #ifndef __USB_H__
+ #define __USB_H__
+ 
++#include <sys/types.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <limits.h>
diff --git a/nixpkgs/pkgs/development/libraries/libusb1/default.nix b/nixpkgs/pkgs/development/libraries/libusb1/default.nix
new file mode 100644
index 000000000000..910368954617
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libusb1/default.nix
@@ -0,0 +1,63 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, autoreconfHook
+, pkg-config
+, enableUdev ? stdenv.isLinux && !stdenv.hostPlatform.isStatic
+, udev
+, libobjc
+, IOKit
+, Security
+, withExamples ? false
+, withStatic ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libusb";
+  version = "1.0.27";
+
+  src = fetchFromGitHub {
+    owner = "libusb";
+    repo = "libusb";
+    rev = "v${version}";
+    sha256 = "sha256-OtzYxWwiba0jRK9X+4deWWDDTeZWlysEt0qMyGUarDo=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ pkg-config autoreconfHook ];
+  propagatedBuildInputs =
+    lib.optional enableUdev udev ++
+    lib.optionals stdenv.isDarwin [ libobjc IOKit Security ];
+
+  dontDisableStatic = withStatic;
+
+  # libusb-1.0.rc:11: fatal error: opening dependency file .deps/libusb-1.0.Tpo: No such file or directory
+  dontAddDisableDepTrack = stdenv.hostPlatform.isWindows;
+
+  configureFlags =
+    lib.optional (!enableUdev) "--disable-udev"
+    ++ lib.optional (withExamples) "--enable-examples-build";
+
+  preFixup = lib.optionalString enableUdev ''
+    sed 's,-ludev,-L${lib.getLib udev}/lib -ludev,' -i $out/lib/libusb-1.0.la
+  '';
+
+  postInstall = lib.optionalString withExamples ''
+    mkdir -p $out/{bin,sbin,examples/bin}
+    cp -r examples/.libs/* $out/examples/bin
+    ln -s $out/examples/bin/fxload $out/sbin/fxload
+  '';
+
+  meta = with lib; {
+    homepage = "https://libusb.info/";
+    description = "cross-platform user-mode USB device library";
+    longDescription = ''
+      libusb is a cross-platform user-mode library that provides access to USB devices.
+    '';
+    platforms = platforms.all;
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ prusnak realsnick ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libusbgx/default.nix b/nixpkgs/pkgs/development/libraries/libusbgx/default.nix
new file mode 100644
index 000000000000..676870aee504
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libusbgx/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, lib, fetchFromGitHub, cmake, bash-completion, pkg-config, libconfig, autoreconfHook }:
+stdenv.mkDerivation {
+  pname = "libusbgx";
+  version = "unstable-2021-10-31";
+  src = fetchFromGitHub {
+    owner = "linux-usb-gadgets";
+    repo = "libusbgx";
+    rev = "060784424609d5a4e3bce8355f788c93f09802a5";
+    sha256 = "172qh8gva17jr18ldhf9zi960w2bqzmp030w6apxq57c9nv6d8k7";
+  };
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ libconfig ];
+  meta = {
+    description = "C library encapsulating the kernel USB gadget-configfs userspace API functionality";
+    license = with lib.licenses; [
+      lgpl21Plus # library
+      gpl2Plus # examples
+    ];
+    maintainers = with lib.maintainers; [ lheckemann ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libusbmuxd/default.nix b/nixpkgs/pkgs/development/libraries/libusbmuxd/default.nix
new file mode 100644
index 000000000000..5fa18444d0f4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libusbmuxd/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+, libplist
+, libimobiledevice-glue
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libusbmuxd";
+  version = "2.0.2+date=2023-04-30";
+
+  src = fetchFromGitHub {
+    owner = "libimobiledevice";
+    repo = pname;
+    rev = "f47c36f5bd2a653a3bd7fb1cf1d2c50b0e6193fb";
+    hash = "sha256-ojFnFD0lcdJLP27oFukwzkG5THx1QE+tRBsaMj4ZCc4=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ];
+
+  buildInputs = [
+    libplist
+    libimobiledevice-glue
+  ];
+
+  preAutoreconf = ''
+    export RELEASE_VERSION=${version}
+  '';
+
+  meta = with lib; {
+    description = "A client library to multiplex connections from and to iOS devices";
+    homepage = "https://github.com/libimobiledevice/libusbmuxd";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ infinisil ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libusbsio/default.nix b/nixpkgs/pkgs/development/libraries/libusbsio/default.nix
new file mode 100644
index 000000000000..090683898a16
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libusbsio/default.nix
@@ -0,0 +1,58 @@
+{ lib
+, stdenv
+, fetchzip
+, pkg-config
+, fixDarwinDylibNames
+, libusb1
+, systemdMinimal
+, darwin
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libusbsio";
+  version = "2.1.11";
+
+  src = fetchzip {
+    url = "https://www.nxp.com/downloads/en/libraries/libusbsio-${version}-src.zip";
+    sha256 = "sha256-qgoeaGWTWdTk5XpJwoauckEQlqB9lp5x2+TN09vQttI=";
+  };
+
+  postPatch = ''
+    rm -r bin/*
+  '';
+
+  makeFlags = [
+    "CC=${stdenv.cc.targetPrefix}cc"
+    "BINDIR="
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+  ] ++ lib.optionals stdenv.isDarwin [
+    fixDarwinDylibNames
+  ];
+
+  buildInputs = [
+    libusb1
+  ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
+    AppKit
+    CoreFoundation
+    IOKit
+  ]) ++ lib.optionals stdenv.isLinux [
+    systemdMinimal # libudev
+  ];
+
+  installPhase = ''
+    runHook preInstall
+    install -D bin/libusbsio${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/libusbsio${stdenv.hostPlatform.extensions.sharedLibrary}
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.nxp.com/design/software/development-software/library-for-windows-macos-and-ubuntu-linux:LIBUSBSIO";
+    description = "Library for communicating with devices connected via the USB bridge on LPC-Link2 and MCU-Link debug probes on supported NXP microcontroller evaluation boards";
+    platforms = platforms.all;
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ frogamic sbruder ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libutempter/default.nix b/nixpkgs/pkgs/development/libraries/libutempter/default.nix
new file mode 100644
index 000000000000..717418e686b4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libutempter/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchurl, lib, glib }:
+
+stdenv.mkDerivation rec {
+  pname = "libutempter";
+  version = "1.2.1";
+
+  src = fetchurl {
+    url = "http://ftp.altlinux.org/pub/people/ldv/utempter/libutempter-${version}.tar.gz";
+    sha256 = "sha256-ln/vNy85HeUBhDrYdXDGz12r2WUfAPF4MJD7wSsqNMs=";
+  };
+
+  buildInputs = [ glib ];
+
+  patches = [ ./exec_path.patch ];
+
+  patchFlags = [ "-p2" ];
+
+  prePatch = ''
+    substituteInPlace Makefile --replace 2711 0711
+  '';
+
+  makeFlags = [
+    "libdir=\${out}/lib"
+    "libexecdir=\${out}/lib"
+    "includedir=\${out}/include"
+    "mandir=\${out}/share/man"
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/altlinux/libutempter";
+    description = "Interface for terminal emulators such as screen and xterm to record user sessions to utmp and wtmp files";
+    longDescription = ''
+      The bundled utempter binary must be able to run as a user belonging to group utmp.
+      On NixOS systems, this can be achieved by creating a setguid wrapper.
+    '';
+    license = licenses.lgpl21Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.msteen ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libutempter/exec_path.patch b/nixpkgs/pkgs/development/libraries/libutempter/exec_path.patch
new file mode 100644
index 000000000000..da3fe110fb67
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libutempter/exec_path.patch
@@ -0,0 +1,32 @@
+diff --git a/libutempter/iface.c b/libutempter/iface.c
+index 37c74a8..6f44c9a 100644
+--- a/libutempter/iface.c
++++ b/libutempter/iface.c
+@@ -43,7 +43,7 @@
+        __result; }))
+ #endif
+ 
+-#define UTEMPTER_DEFAULT_PATHNAME	LIBEXECDIR "/utempter/utempter"
++#define UTEMPTER_DEFAULT_PATHNAME	"utempter"
+ 
+ static const char *utempter_pathname;
+ static int saved_fd = -1;
+@@ -57,8 +57,8 @@ do_child(int master_fd, const char *path, char *const *argv)
+ 		_exit(EXIT_FAILURE);
+ 	}
+ 
+-	execv(path, argv);
+-	print_dbg("execv: %s", strerror(errno));
++	execvp(path, argv);
++	print_dbg("execvp: %s", strerror(errno));
+ 
+ 	while (EACCES == errno) {
+ 		/* try saved group ID */
+@@ -73,7 +73,7 @@ do_child(int master_fd, const char *path, char *const *argv)
+ 		if (setgid(sgid))
+ 			break;
+ 
+-		(void) execv(path, argv);
++		(void) execvp(path, argv);
+ 		break;
+ 	}
diff --git a/nixpkgs/pkgs/development/libraries/libuv/default.nix b/nixpkgs/pkgs/development/libraries/libuv/default.nix
new file mode 100644
index 000000000000..a150bddc626d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libuv/default.nix
@@ -0,0 +1,126 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, autoconf
+, automake
+, libtool
+, pkg-config
+, pkgsStatic
+
+# for passthru.tests
+, bind
+, cmake
+, knot-resolver
+, lispPackages
+, luajitPackages
+, mosquitto
+, neovim
+, nodejs
+, ocamlPackages
+, python3
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  version = "1.47.0";
+  pname = "libuv";
+
+  src = fetchFromGitHub {
+    owner = "libuv";
+    repo = "libuv";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-J6qvq///A/tr+/vNRVCwCc80/VHKWQTYF6Mt1I+dBCU=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  postPatch = let
+    toDisable = [
+      "getnameinfo_basic" "udp_send_hang_loop" # probably network-dependent
+      "tcp_connect_timeout" # tries to reach out to 8.8.8.8
+      "spawn_setuid_fails" "spawn_setgid_fails" "fs_chown" # user namespaces
+      "getaddrinfo_fail" "getaddrinfo_fail_sync" "tcp_connect6_link_local"
+      "threadpool_multiple_event_loops" # times out on slow machines
+      "get_passwd" # passed on NixOS but failed on other Linuxes
+      "tcp_writealot" "udp_multicast_join" "udp_multicast_join6" "metrics_pool_events" # times out sometimes
+      "fs_fstat" # https://github.com/libuv/libuv/issues/2235#issuecomment-1012086927
+
+      # Assertion failed in test/test-tcp-bind6-error.c on line 60: r == UV_EADDRINUSE
+      # Assertion failed in test/test-tcp-bind-error.c on line 99: r == UV_EADDRINUSE
+      "tcp_bind6_error_addrinuse" "tcp_bind_error_addrinuse_listen"
+    ] ++ lib.optionals stdenv.isDarwin [
+        # Sometimes: timeout (no output), failed uv_listen. Someone
+        # should report these failures to libuv team. There tests should
+        # be much more robust.
+        "process_title" "emfile" "poll_duplex" "poll_unidirectional"
+        "ipc_listen_before_write" "ipc_listen_after_write" "ipc_tcp_connection"
+        "tcp_alloc_cb_fail" "tcp_ping_pong" "tcp_ref3" "tcp_ref4"
+        "tcp_bind6_error_inval" "tcp_bind6_error_addrinuse" "tcp_read_stop"
+        "tcp_unexpected_read" "tcp_write_to_half_open_connection"
+        "tcp_oob" "tcp_close_accept" "tcp_create_early_accept"
+        "tcp_create_early" "tcp_close" "tcp_bind_error_inval"
+        "tcp_bind_error_addrinuse" "tcp_shutdown_after_write"
+        "tcp_open" "tcp_write_queue_order" "tcp_try_write" "tcp_writealot"
+        "multiple_listen" "delayed_accept" "udp_recv_in_a_row"
+        "shutdown_close_tcp" "shutdown_eof" "shutdown_twice" "callback_stack"
+        "tty_pty" "condvar_5" "hrtime" "udp_multicast_join"
+        # Tests that fail when sandboxing is enabled.
+        "fs_event_close_in_callback" "fs_event_watch_dir" "fs_event_error_reporting"
+        "fs_event_watch_dir_recursive" "fs_event_watch_file"
+        "fs_event_watch_file_current_dir" "fs_event_watch_file_exact_path"
+        "process_priority" "udp_create_early_bad_bind"
+    ] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
+        # fail on macos < 10.15 (starting in libuv 1.47.0)
+        "fs_write_alotof_bufs_with_offset" "fs_write_multiple_bufs" "fs_read_bufs"
+    ] ++ lib.optionals stdenv.isAarch32 [
+      # I observe this test failing with some regularity on ARMv7:
+      # https://github.com/libuv/libuv/issues/1871
+      "shutdown_close_pipe"
+    ];
+    tdRegexp = lib.concatStringsSep "\\|" toDisable;
+    in lib.optionalString (finalAttrs.finalPackage.doCheck) ''
+      sed '/${tdRegexp}/d' -i test/test-list.h
+    '';
+
+  nativeBuildInputs = [ automake autoconf libtool pkg-config ];
+
+  preConfigure = ''
+    LIBTOOLIZE=libtoolize ./autogen.sh
+  '';
+
+  enableParallelBuilding = true;
+
+  # separateDebugInfo breaks static build
+  # https://github.com/NixOS/nixpkgs/issues/219466
+  separateDebugInfo = !stdenv.hostPlatform.isStatic;
+
+  doCheck =
+    # routinely hangs on powerpc64le
+    !stdenv.hostPlatform.isPower64;
+
+  # Some of the tests use localhost networking.
+  __darwinAllowLocalNetworking = true;
+
+  passthru.tests = {
+    inherit bind cmake knot-resolver mosquitto neovim nodejs;
+    inherit (lispPackages) cl-libuv;
+    luajit-libluv = luajitPackages.libluv;
+    luajit-luv = luajitPackages.luv;
+    ocaml-luv = ocamlPackages.luv;
+    python-pyuv = python3.pkgs.pyuv;
+    python-uvloop = python3.pkgs.uvloop;
+    static = pkgsStatic.libuv;
+    pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+  };
+
+  meta = with lib; {
+    description = "A multi-platform support library with a focus on asynchronous I/O";
+    homepage    = "https://libuv.org/";
+    changelog   = "https://github.com/libuv/libuv/blob/v${finalAttrs.version}/ChangeLog";
+    pkgConfigModules = [ "libuv" ];
+    maintainers = with maintainers; [ marsam ];
+    platforms   = platforms.all;
+    license     = with licenses; [ mit isc bsd2 bsd3 cc-by-40 ];
+  };
+
+})
diff --git a/nixpkgs/pkgs/development/libraries/libuvc/default.nix b/nixpkgs/pkgs/development/libraries/libuvc/default.nix
new file mode 100644
index 000000000000..e7ff4bb7f288
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libuvc/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, libusb1
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libuvc";
+  version = "unstable-2020-11-29";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = "5cddef71b17d41f7e98875a840c50d9704c3d2b2";
+    sha256 = "0kranb0x1k5qad8rwxnn1w9963sbfj2cfzdgpfmlivb04544m2j7";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [ libusb1 ];
+
+  meta = with lib; {
+    homepage = "https://ken.tossell.net/libuvc/";
+    description = "Cross-platform library for USB video devices";
+    platforms = platforms.linux;
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ prusnak ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libva/1.nix b/nixpkgs/pkgs/development/libraries/libva/1.nix
new file mode 100644
index 000000000000..63be647f015a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libva/1.nix
@@ -0,0 +1,52 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, autoreconfHook
+, libX11
+, pkg-config
+, libXext
+, libdrm
+, libXfixes
+, wayland
+, wayland-scanner
+, libffi
+, libGL
+, mesa
+, minimal ? false
+, libva1-minimal
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libva" + lib.optionalString minimal "-minimal";
+  # nixpkgs-update: no auto update
+  version = "1.8.3";
+
+  src = fetchFromGitHub {
+    owner = "intel";
+    repo = "libva";
+    rev = version;
+    sha256 = "sha256-ur59cqdZqXIY2dDUSie9XsxyRomVBxIW2IVKAgWYC38=";
+  };
+
+  outputs = [ "dev" "out" ];
+
+  nativeBuildInputs = [ autoreconfHook pkg-config wayland-scanner ];
+
+  buildInputs = [ libdrm ]
+    ++ lib.optionals (!minimal) [ libva1-minimal libX11 libXext libXfixes wayland libffi libGL ];
+  # TODO: share libs between minimal and !minimal - perhaps just symlink them
+
+  # Add FHS paths for non-NixOS applications.
+  configureFlags = [ "--with-drivers-path=${mesa.drivers.driverLink}/lib/dri:/usr/lib/dri:/usr/lib32/dri" ]
+    ++ lib.optionals (!minimal) [ "--enable-glx" ];
+
+  installFlags = [ "dummy_drv_video_ladir=$(out)/lib/dri" ];
+
+  meta = with lib; {
+    homepage = "https://www.freedesktop.org/wiki/Software/vaapi/";
+    license = licenses.mit;
+    description = "VAAPI library: Video Acceleration API";
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ SuperSandro2000 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libva/default.nix b/nixpkgs/pkgs/development/libraries/libva/default.nix
new file mode 100644
index 000000000000..f3d58613b25d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libva/default.nix
@@ -0,0 +1,65 @@
+{ stdenv, lib, fetchFromGitHub, meson, pkg-config, ninja, wayland-scanner
+, libdrm
+, minimal ? false
+, libX11, libXext, libXfixes, wayland, libffi, libGL
+, mesa
+# for passthru.tests
+, intel-compute-runtime
+, intel-media-driver
+, mpv
+, intel-vaapi-driver
+, vlc
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libva" + lib.optionalString minimal "-minimal";
+  version = "2.20.0";
+
+  src = fetchFromGitHub {
+    owner  = "intel";
+    repo   = "libva";
+    rev    = finalAttrs.version;
+    sha256 = "sha256-ENAsytjqvS8xHZyZLPih3bzBgQ1f/j+s3dWZs1GTWHs=";
+  };
+
+  outputs = [ "dev" "out" ];
+
+  depsBuildBuild = [ pkg-config ];
+
+  nativeBuildInputs = [ meson pkg-config ninja ]
+    ++ lib.optional (!minimal) wayland-scanner;
+
+  buildInputs = [ libdrm ]
+    ++ lib.optionals (!minimal) [ libX11 libXext libXfixes wayland libffi libGL ];
+
+  mesonFlags = [
+    # Add FHS and Debian paths for non-NixOS applications
+    "-Ddriverdir=${mesa.drivers.driverLink}/lib/dri:/usr/lib/dri:/usr/lib32/dri:/usr/lib/x86_64-linux-gnu/dri:/usr/lib/i386-linux-gnu/dri"
+  ];
+
+  passthru.tests = {
+    # other drivers depending on libva and selected application users.
+    # Please get a confirmation from the maintainer before adding more applications.
+    inherit intel-compute-runtime intel-media-driver intel-vaapi-driver mpv vlc;
+    pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+  };
+
+  meta = with lib; {
+    description = "An implementation for VA-API (Video Acceleration API)";
+    longDescription = ''
+      VA-API is an open-source library and API specification, which provides
+      access to graphics hardware acceleration capabilities for video
+      processing. It consists of a main library (this package) and
+      driver-specific acceleration backends for each supported hardware vendor.
+    '';
+    homepage = "https://01.org/linuxmedia/vaapi";
+    changelog = "https://raw.githubusercontent.com/intel/libva/${finalAttrs.version}/NEWS";
+    license = licenses.mit;
+    maintainers = with maintainers; [ SuperSandro2000 ];
+    pkgConfigModules = [ "libva" "libva-drm" ] ++ lib.optionals (!minimal) [
+      "libva-glx" "libva-wayland" "libva-x11"
+    ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libva/utils.nix b/nixpkgs/pkgs/development/libraries/libva/utils.nix
new file mode 100644
index 000000000000..777119378d34
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libva/utils.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config
+, libdrm, libva, libX11, libXext, libXfixes, wayland
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libva-utils";
+  version = "2.20.1";
+
+  src = fetchFromGitHub {
+    owner  = "intel";
+    repo   = "libva-utils";
+    rev    = version;
+    sha256 = "sha256-ZX6ahKnOB5ZEg36iIWskq3q26GVg/trsCAKKttEKZ1s=";
+  };
+
+  nativeBuildInputs = [ meson ninja pkg-config ];
+
+  buildInputs = [ libdrm libva libX11 libXext libXfixes wayland ];
+
+  meta = with lib; {
+    description = "A collection of utilities and examples for VA-API";
+    longDescription = ''
+      libva-utils is a collection of utilities and examples to exercise VA-API
+      in accordance with the libva project.
+    '';
+    homepage = "https://github.com/intel/libva-utils";
+    changelog = "https://raw.githubusercontent.com/intel/libva-utils/${version}/NEWS";
+    license = licenses.mit;
+    maintainers = with maintainers; [ SuperSandro2000 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libvarlink/default.nix b/nixpkgs/pkgs/development/libraries/libvarlink/default.nix
new file mode 100644
index 000000000000..941ee900edb2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libvarlink/default.nix
@@ -0,0 +1,52 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, meson
+, ninja
+, python3
+, nix-update-script
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libvarlink";
+  version = "23";
+
+  src = fetchFromGitHub {
+    owner = "varlink";
+    repo = finalAttrs.pname;
+    rev = finalAttrs.version;
+    sha256 = "sha256-oUy9HhybNMjRBWoqqal1Mw8cC5RddgN4izxAl0cgnKE=";
+  };
+
+  nativeBuildInputs = [ meson ninja python3 ];
+
+  postPatch = ''
+    # test-object: ../lib/test-object.c:129: main: Assertion `setlocale(LC_NUMERIC, "de_DE.UTF-8") != 0' failed.
+    # PR that added it https://github.com/varlink/libvarlink/pull/27
+    substituteInPlace lib/test-object.c \
+      --replace 'assert(setlocale(LC_NUMERIC, "de_DE.UTF-8") != 0);' ""
+
+    patchShebangs lib/test-symbols.sh varlink-wrapper.py
+  '';
+
+  doCheck = true;
+
+  passthru = {
+    updateScript = nix-update-script { };
+    tests = {
+      version = testers.testVersion {
+        package = finalAttrs.finalPackage;
+        command = "varlink --version";
+      };
+    };
+  };
+
+  meta = with lib; {
+    description = "C implementation of the Varlink protocol and command line tool";
+    homepage = "https://github.com/varlink/libvarlink";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ artturin ];
+    platforms = platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libvdpau-va-gl/default.nix b/nixpkgs/pkgs/development/libraries/libvdpau-va-gl/default.nix
new file mode 100644
index 000000000000..7a042a172c82
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libvdpau-va-gl/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, libX11, libpthreadstubs, libXau, libXdmcp
+, libXext, libvdpau, glib, libva, libGLU }:
+
+stdenv.mkDerivation rec {
+  pname = "libvdpau-va-gl";
+  version = "0.4.2";
+
+  src = fetchFromGitHub {
+    owner = "i-rinat";
+    repo = "libvdpau-va-gl";
+    rev = "v${version}";
+    sha256 = "0asndybfv8xb0fx73sjjw5kydqrahqkm6n04lh589pbf18s5qlld";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ libX11 libpthreadstubs libXau libXdmcp libXext libvdpau glib libva libGLU ];
+
+  doCheck = false; # fails. needs DRI access
+
+  meta = with lib; {
+    homepage = "https://github.com/i-rinat/libvdpau-va-gl";
+    description = "VDPAU driver with OpenGL/VAAPI backend";
+    license = licenses.lgpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ abbradar ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libvdpau/default.nix b/nixpkgs/pkgs/development/libraries/libvdpau/default.nix
new file mode 100644
index 000000000000..906a3c59234a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libvdpau/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchurl, pkg-config, xorg, mesa, meson, ninja }:
+
+stdenv.mkDerivation rec {
+  pname = "libvdpau";
+  version = "1.5";
+
+  src = fetchurl {
+    url = "https://gitlab.freedesktop.org/vdpau/libvdpau/-/archive/${version}/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-pdUKQrjCiP68BxUatkOsjeBqGERpZcckH4m06BCCGRM=";
+  };
+  patches = [ ./installdir.patch ];
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ meson ninja pkg-config ];
+  buildInputs = with xorg; [ xorgproto libXext ];
+
+  propagatedBuildInputs = [ xorg.libX11 ];
+
+  mesonFlags = lib.optionals stdenv.isLinux
+    [ "-Dmoduledir=${mesa.drivers.driverLink}/lib/vdpau" ];
+
+  NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-lX11";
+
+  meta = with lib; {
+    homepage = "https://www.freedesktop.org/wiki/Software/VDPAU/";
+    description = "Library to use the Video Decode and Presentation API for Unix (VDPAU)";
+    license = licenses.mit; # expat version
+    platforms = platforms.unix;
+    maintainers = [ maintainers.vcunat ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libvdpau/installdir.patch b/nixpkgs/pkgs/development/libraries/libvdpau/installdir.patch
new file mode 100644
index 000000000000..859715f70d39
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libvdpau/installdir.patch
@@ -0,0 +1,9 @@
+--- a/trace/meson.build	2020-02-15 16:34:58.698832000 +0100
++++ b/trace/meson.build	2020-02-15 16:39:05.359952802 +0100
+@@ -4,5 +4,5 @@
+     dependencies : libdl,
+     version : '1.0.0',
+     install : true,
+-    install_dir : moduledir,
++    install_dir : get_option('prefix') + '/lib/libvdpau',
+ )
diff --git a/nixpkgs/pkgs/development/libraries/libversion/default.nix b/nixpkgs/pkgs/development/libraries/libversion/default.nix
new file mode 100644
index 000000000000..4efe91096576
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libversion/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchFromGitHub, cmake, lib }:
+
+stdenv.mkDerivation rec {
+  pname = "libversion";
+  version = "3.0.3";
+
+  src = fetchFromGitHub {
+    owner = "repology";
+    repo = "libversion";
+    rev = version;
+    hash = "sha256-REmXD0NFd7Af01EU/f2IGoTKiju6ErTI7WUinvrAzaA=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  checkTarget = "test";
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Advanced version string comparison library";
+    homepage = "https://github.com/repology/libversion";
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ ryantm ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libverto/default.nix b/nixpkgs/pkgs/development/libraries/libverto/default.nix
new file mode 100644
index 000000000000..d161f2b92b2b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libverto/default.nix
@@ -0,0 +1,54 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, glib
+, libev
+, libevent
+, pkg-config
+, glibSupport ? true
+, libevSupport ? true
+, libeventSupport ? true
+}:
+
+let
+  inherit (lib) optional;
+in
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libverto";
+  version = "0.3.2";
+
+  src = fetchFromGitHub {
+    owner = "latchset";
+    repo = "libverto";
+    rev = finalAttrs.version;
+    hash = "sha256-csoJ0WdKyrza8kBSMKoaItKvcbijI6Wl8nWCbywPScQ=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ];
+
+  buildInputs =
+    optional glibSupport glib
+    ++ optional libevSupport libev
+    ++ optional libeventSupport libevent;
+
+  meta = with lib; {
+    homepage = "https://github.com/latchset/libverto";
+    description = "Asynchronous event loop abstraction library";
+    longDescription = ''
+      Libverto exists to solve an important problem: many applications and
+      libraries are unable to write asynchronous code because they are unable to
+      pick an event loop. This is particularly true of libraries who want to be
+      useful to many applications who use loops that do not integrate with one
+      another or which use home-grown loops. libverto provides a loop-neutral
+      async api which allows the library to expose asynchronous interfaces and
+      offload the choice of the main loop to the application.
+    '';
+    license = licenses.mit;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libvgm/default.nix b/nixpkgs/pkgs/development/libraries/libvgm/default.nix
new file mode 100644
index 000000000000..0d7c098255f2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libvgm/default.nix
@@ -0,0 +1,122 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, unstableGitUpdater
+, cmake
+, libiconv
+, zlib
+, enableShared ? true
+
+, enableAudio ? true
+, withWaveWrite ? true
+, withWinMM ? stdenv.hostPlatform.isWindows
+, withDirectSound ? stdenv.hostPlatform.isWindows
+, withXAudio2 ? stdenv.hostPlatform.isWindows
+, withWASAPI ? stdenv.hostPlatform.isWindows
+, withOSS ? stdenv.hostPlatform.isFreeBSD
+, withSADA ? stdenv.hostPlatform.isSunOS
+, withALSA ? stdenv.hostPlatform.isLinux
+, alsa-lib
+, withPulseAudio ? stdenv.hostPlatform.isLinux
+, libpulseaudio
+, withCoreAudio ? stdenv.hostPlatform.isDarwin
+, CoreAudio
+, AudioToolbox
+, withLibao ? true
+, libao
+
+, enableEmulation ? true
+, withAllEmulators ? true
+, emulators ? [ ]
+
+, enableLibplayer ? true
+
+, enableTools ? false
+}:
+
+assert enableTools -> enableAudio && enableEmulation && enableLibplayer;
+
+let
+  inherit (lib) optional optionals;
+  onOff = val: if val then "ON" else "OFF";
+in
+stdenv.mkDerivation {
+  pname = "libvgm";
+  version = "unstable-2024-01-03";
+
+  src = fetchFromGitHub {
+    owner = "ValleyBell";
+    repo = "libvgm";
+    rev = "223b6f9d629feda1982dc4bbeebd19fa63b987fb";
+    hash = "sha256-CrqgDuOsY+Hpp41De6oWJduj8d8ftMUanMEWJKh79rw=";
+  };
+
+  outputs = [
+    "out"
+    "dev"
+  ] ++ optional enableTools "bin";
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  propagatedBuildInputs = [
+    libiconv
+    zlib
+  ] ++ optionals withALSA [
+    alsa-lib
+  ] ++ optionals withPulseAudio [
+    libpulseaudio
+  ] ++ optionals withCoreAudio [
+    CoreAudio
+    AudioToolbox
+  ] ++ optionals withLibao [
+    libao
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_LIBAUDIO=${onOff enableAudio}"
+    "-DBUILD_LIBEMU=${onOff enableEmulation}"
+    "-DBUILD_LIBPLAYER=${onOff enableLibplayer}"
+    "-DBUILD_TESTS=${onOff enableTools}"
+    "-DBUILD_PLAYER=${onOff enableTools}"
+    "-DBUILD_VGM2WAV=${onOff enableTools}"
+    "-DLIBRARY_TYPE=${if enableShared then "SHARED" else "STATIC"}"
+    "-DUSE_SANITIZERS=ON"
+  ] ++ optionals enableAudio [
+    "-DAUDIODRV_WAVEWRITE=${onOff withWaveWrite}"
+    "-DAUDIODRV_WINMM=${onOff withWinMM}"
+    "-DAUDIODRV_DSOUND=${onOff withDirectSound}"
+    "-DAUDIODRV_XAUDIO2=${onOff withXAudio2}"
+    "-DAUDIODRV_WASAPI=${onOff withWASAPI}"
+    "-DAUDIODRV_OSS=${onOff withOSS}"
+    "-DAUDIODRV_SADA=${onOff withSADA}"
+    "-DAUDIODRV_ALSA=${onOff withALSA}"
+    "-DAUDIODRV_PULSE=${onOff withPulseAudio}"
+    "-DAUDIODRV_APPLE=${onOff withCoreAudio}"
+    "-DAUDIODRV_LIBAO=${onOff withLibao}"
+  ] ++ optionals enableEmulation ([
+    "-DSNDEMU__ALL=${onOff withAllEmulators}"
+  ] ++ optionals (!withAllEmulators)
+    (lib.lists.forEach emulators (x: "-DSNDEMU_${x}=ON"))
+  ) ++ optionals enableTools [
+    "-DUTIL_CHARCNV_ICONV=ON"
+    "-DUTIL_CHARCNV_WINAPI=${onOff stdenv.hostPlatform.isWindows}"
+  ];
+
+  passthru.updateScript = unstableGitUpdater {
+    url = "https://github.com/ValleyBell/libvgm.git";
+  };
+
+  meta = with lib; {
+    homepage = "https://github.com/ValleyBell/libvgm";
+    description = "More modular rewrite of most components from VGMPlay";
+    license =
+      if (enableEmulation && (withAllEmulators || (lib.lists.any (core: core == "WSWAN_ALL") emulators))) then
+        licenses.unfree # https://github.com/ValleyBell/libvgm/issues/43
+      else
+        licenses.gpl2Only;
+    maintainers = with maintainers; [ OPNA2608 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libviper/default.nix b/nixpkgs/pkgs/development/libraries/libviper/default.nix
new file mode 100644
index 000000000000..4caa26aadc6a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libviper/default.nix
@@ -0,0 +1,39 @@
+{lib, stdenv, fetchurl, pkg-config, glib, ncurses, gpm}:
+stdenv.mkDerivation rec {
+  pname = "libviper";
+  version = "1.4.6";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libviper/libviper-${version}.tar.gz";
+    sha256 = "1jvm7wdgw6ixyhl0pcfr9lnr9g6sg6whyrs9ihjiz0agvqrgvxwc";
+  };
+
+  postPatch = ''
+    sed -i -e s@/usr/local@$out@ -e /ldconfig/d -e '/cd vdk/d' Makefile
+
+    # Fix pending upstream inclusion for ncurses-6.3 support:
+    #   https://github.com/TragicWarrior/libviper/pull/16
+    # Not applied as it due to unrelated code changes in context.
+    substituteInPlace viper_msgbox.c --replace \
+      'mvwprintw(window,height-3,tmp,prompt);' \
+      'mvwprintw(window,height-3,tmp,"%s",prompt);'
+    substituteInPlace w_decorate.c --replace \
+      'mvwprintw(window,0,x,title);' \
+      'mvwprintw(window,0,x,"%s",title);'
+  '';
+
+  preInstall = ''
+    mkdir -p $out/include
+    mkdir -p $out/lib
+  '';
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ glib ncurses gpm];
+
+  meta = with lib; {
+    homepage = "http://libviper.sourceforge.net/";
+    description = "Simple window creation and management facilities for the console";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libviperfx/default.nix b/nixpkgs/pkgs/development/libraries/libviperfx/default.nix
new file mode 100644
index 000000000000..580329754b66
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libviperfx/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "libviperfx";
+  version = "unstable-2018-01-15";
+
+  src = fetchFromGitHub {
+    owner = "vipersaudio";
+    repo = "viperfx_core_binary";
+    rev = "6f7d0da725affe854f083baf5d90c70e172e4488";
+    sha256 = "sha256-hfX46Kk91eQgiO3uhew91I6eEHxazhdGwSkhfNZ+HvQ=";
+  };
+
+  dontBuild = true;
+
+  installPhase = ''
+    runHook preInstall
+    install -D libviperfx_x64_linux.so $out/lib/libviperfx.so
+    install -D README.md $out/share/licenses/libviperfx/LICENSE
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/vipersaudio/viperfx_core_binary";
+    description = "The ViPER FX core";
+    license = licenses.unfreeRedistributable;
+    maintainers = with maintainers; [ rewine ];
+    platforms = [ "x86_64-linux" ];
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libvirt-glib/default.nix b/nixpkgs/pkgs/development/libraries/libvirt-glib/default.nix
new file mode 100644
index 000000000000..b01a9a788bad
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libvirt-glib/default.nix
@@ -0,0 +1,77 @@
+{ lib
+, stdenv
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, gettext
+, vala
+, libcap_ng
+, libvirt
+, libxml2
+, buildPackages
+, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
+, gobject-introspection
+, withDocs ? stdenv.hostPlatform == stdenv.buildPlatform
+, gtk-doc
+, docbook-xsl-nons
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libvirt-glib";
+  version = "5.0.0";
+
+  outputs = [ "out" "dev" ] ++ lib.optional withDocs "devdoc";
+
+  src = fetchurl {
+    url = "https://libvirt.org/sources/glib/${pname}-${version}.tar.xz";
+    sha256 = "m/7DRjgkFqNXXYcpm8ZBsqRkqlGf2bEofjGKpDovO4s=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gettext
+    vala
+    gobject-introspection
+  ] ++ lib.optionals withIntrospection [
+    gobject-introspection
+  ] ++ lib.optionals withDocs [
+    gtk-doc
+    docbook-xsl-nons
+  ];
+
+  buildInputs = [
+    libvirt
+    libxml2
+  ] ++ lib.optionals stdenv.isLinux [
+    libcap_ng
+  ];
+
+  strictDeps = true;
+
+  # The build system won't let us build with docs or introspection
+  # unless we're building natively, but will still do a mandatory
+  # check for the dependencies for those things unless we explicitly
+  # disable the options.
+  mesonFlags = [
+    (lib.mesonEnable "docs" withDocs)
+    (lib.mesonEnable "introspection" withIntrospection)
+  ];
+
+  meta = with lib; {
+    description = "Library for working with virtual machines";
+    longDescription = ''
+      libvirt-glib wraps libvirt to provide a high-level object-oriented API better
+      suited for glib-based applications, via three libraries:
+
+      - libvirt-glib    - GLib main loop integration & misc helper APIs
+      - libvirt-gconfig - GObjects for manipulating libvirt XML documents
+      - libvirt-gobject - GObjects for managing libvirt objects
+    '';
+    homepage = "https://libvirt.org/";
+    license = licenses.lgpl2Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libvirt/0001-meson-patch-in-an-install-prefix-for-building-on-nix.patch b/nixpkgs/pkgs/development/libraries/libvirt/0001-meson-patch-in-an-install-prefix-for-building-on-nix.patch
new file mode 100644
index 000000000000..45e54673a0ef
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libvirt/0001-meson-patch-in-an-install-prefix-for-building-on-nix.patch
@@ -0,0 +1,473 @@
+From ad42041cfedcf25716429d2aad16641e0e2a012f Mon Sep 17 00:00:00 2001
+From: Euan Kemp <euank@euank.com>
+Date: Thu, 14 Jan 2021 00:32:00 -0800
+Subject: [PATCH] meson: patch in an install prefix for building on nix
+
+Used in the nixpkgs version of libvirt so that we can install things in
+the nix store, but read them from the root filesystem.
+---
+ meson.build                       |  9 ++++++++
+ meson_options.txt                 |  2 ++
+ src/ch/meson.build                |  6 ++---
+ src/interface/meson.build         |  2 +-
+ src/libxl/meson.build             | 18 +++++++--------
+ src/locking/meson.build           |  8 +++----
+ src/lxc/meson.build               | 10 ++++----
+ src/meson.build                   | 18 +++++++--------
+ src/network/meson.build           | 14 ++++++------
+ src/node_device/meson.build       |  2 +-
+ src/nwfilter/meson.build          |  6 ++---
+ src/nwfilter/xml/meson.build      |  2 +-
+ src/qemu/meson.build              | 38 +++++++++++++++----------------
+ src/remote/meson.build            | 10 ++++----
+ src/secret/meson.build            |  4 ++--
+ src/security/apparmor/meson.build |  8 +++----
+ src/storage/meson.build           |  6 ++---
+ tools/meson.build                 |  2 +-
+ 18 files changed, 88 insertions(+), 77 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 9016c0458a..b26e690194 100644
+--- a/meson.build
++++ b/meson.build
+@@ -39,6 +39,8 @@ if host_machine.system() == 'windows'
+   conf.set('WINVER', '0x0600') # Win Vista / Server 2008
+ endif
+ 
++# patched in for nix
++install_prefix = get_option('install_prefix')
+ 
+ # set various paths
+ 
+@@ -57,6 +59,13 @@ else
+   sysconfdir = prefix / get_option('sysconfdir')
+ endif
+ 
++# nix: don't prefix the localstatedir; some things need to write to it, so it
++# can't be in the nix store, and that's what the prefix is.
++# We'll prefix things ourselves where needed
++localstatedir = get_option('localstatedir')
++# Same for sysconfidr
++sysconfdir = get_option('sysconfdir')
++
+ # if --prefix is /usr, don't use /usr/var for localstatedir or /usr/etc for
+ # sysconfdir as this makes a lot of things break in testing situations
+ if prefix == '/usr'
+diff --git a/meson_options.txt b/meson_options.txt
+index 5b43cdbd6b..e9dff18441 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,3 +1,5 @@
++option('install_prefix', type: 'string', value: '', description: 'prefix for nix store installation')
++
+ option('no_git', type: 'boolean', value: false, description: 'Disable git submodule update')
+ option('packager', type: 'string', value: '', description: 'Extra packager name')
+ option('packager_version', type: 'string', value: '', description: 'Extra packager version')
+diff --git a/src/ch/meson.build b/src/ch/meson.build
+index 66b77907b0..6aa9bbc548 100644
+--- a/src/ch/meson.build
++++ b/src/ch/meson.build
+@@ -64,8 +64,8 @@ if conf.has('WITH_CH')
+   }
+ 
+   virt_install_dirs += [
+-    localstatedir / 'lib' / 'libvirt' / 'ch',
+-    localstatedir / 'log' / 'libvirt' / 'ch',
+-    runstatedir / 'libvirt' / 'ch',
++    install_prefix + localstatedir / 'lib' / 'libvirt' / 'ch',
++    install_prefix + localstatedir / 'log' / 'libvirt' / 'ch',
++    install_prefix + runstatedir / 'libvirt' / 'ch',
+   ]
+ endif
+diff --git a/src/interface/meson.build b/src/interface/meson.build
+index 828f274422..2a6b1f8c5e 100644
+--- a/src/interface/meson.build
++++ b/src/interface/meson.build
+@@ -56,6 +56,6 @@ if conf.has('WITH_INTERFACE')
+   }
+ 
+   virt_install_dirs += [
+-    runstatedir / 'libvirt' / 'interface',
++    install_prefix + runstatedir / 'libvirt' / 'interface',
+   ]
+ endif
+diff --git a/src/libxl/meson.build b/src/libxl/meson.build
+index 0cc277db82..48d8c5b962 100644
+--- a/src/libxl/meson.build
++++ b/src/libxl/meson.build
+@@ -79,14 +79,14 @@ if conf.has('WITH_LIBXL')
+   }
+ 
+   virt_install_dirs += [
+-    confdir / 'libxl',
+-    confdir / 'libxl' / 'autostart',
+-    localstatedir / 'lib' / 'libvirt' / 'libxl',
+-    localstatedir / 'lib' / 'libvirt' / 'libxl' / 'channel',
+-    localstatedir / 'lib' / 'libvirt' / 'libxl' / 'channel' / 'target',
+-    localstatedir / 'lib' / 'libvirt' / 'libxl' / 'dump',
+-    localstatedir / 'lib' / 'libvirt' / 'libxl' / 'save',
+-    localstatedir / 'log' / 'libvirt' / 'libxl',
+-    runstatedir / 'libvirt' / 'libxl',
++    install_prefix + confdir / 'libxl',
++    install_prefix + confdir / 'libxl' / 'autostart',
++    install_prefix + localstatedir / 'lib' / 'libvirt' / 'libxl',
++    install_prefix + localstatedir / 'lib' / 'libvirt' / 'libxl' / 'channel',
++    install_prefix + localstatedir / 'lib' / 'libvirt' / 'libxl' / 'channel' / 'target',
++    install_prefix + localstatedir / 'lib' / 'libvirt' / 'libxl' / 'dump',
++    install_prefix + localstatedir / 'lib' / 'libvirt' / 'libxl' / 'save',
++    install_prefix + localstatedir / 'log' / 'libvirt' / 'libxl',
++    install_prefix + runstatedir / 'libvirt' / 'libxl',
+   ]
+ endif
+diff --git a/src/locking/meson.build b/src/locking/meson.build
+index 72f7780438..abe70d20d5 100644
+--- a/src/locking/meson.build
++++ b/src/locking/meson.build
+@@ -238,14 +238,14 @@ if conf.has('WITH_LIBVIRTD')
+   }
+ 
+   virt_install_dirs += [
+-    localstatedir / 'lib' / 'libvirt' / 'lockd',
+-    localstatedir / 'lib' / 'libvirt' / 'lockd' / 'files',
+-    runstatedir / 'libvirt' / 'lockd',
++    install_prefix + localstatedir / 'lib' / 'libvirt' / 'lockd',
++    install_prefix + localstatedir / 'lib' / 'libvirt' / 'lockd' / 'files',
++    install_prefix + runstatedir / 'libvirt' / 'lockd',
+   ]
+ 
+   if conf.has('WITH_SANLOCK')
+     virt_install_dirs += [
+-      localstatedir / 'lib' / 'libvirt' / 'sanlock',
++      install_prefix + localstatedir / 'lib' / 'libvirt' / 'sanlock',
+     ]
+   endif
+ endif
+diff --git a/src/lxc/meson.build b/src/lxc/meson.build
+index 99d4a34213..aae477c1ee 100644
+--- a/src/lxc/meson.build
++++ b/src/lxc/meson.build
+@@ -176,10 +176,10 @@ if conf.has('WITH_LXC')
+   }
+ 
+   virt_install_dirs += [
+-    confdir / 'lxc',
+-    confdir / 'lxc' / 'autostart',
+-    localstatedir / 'lib' / 'libvirt' / 'lxc',
+-    localstatedir / 'log' / 'libvirt' / 'lxc',
+-    runstatedir / 'libvirt' / 'lxc',
++    install_prefix + confdir / 'lxc',
++    install_prefix + confdir / 'lxc' / 'autostart',
++    install_prefix + localstatedir / 'lib' / 'libvirt' / 'lxc',
++    install_prefix + localstatedir / 'log' / 'libvirt' / 'lxc',
++    install_prefix + runstatedir / 'libvirt' / 'lxc',
+   ]
+ endif
+diff --git a/src/meson.build b/src/meson.build
+index b2d951d36c..305716010f 100644
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -210,7 +210,7 @@ openrc_init_files = []
+ 
+ # virt_install_dirs:
+ #   list of directories to create during installation
+-virt_install_dirs = [ confdir ]
++virt_install_dirs = [ install_prefix + confdir ]
+ 
+ # driver_source_files:
+ #   driver source files to check
+@@ -663,7 +663,7 @@ endforeach
+ 
+ virt_conf_files += 'libvirt.conf'
+ 
+-install_data(virt_conf_files, install_dir: confdir)
++install_data(virt_conf_files, install_dir: install_prefix + confdir)
+ install_data(virt_aug_files, install_dir: virt_aug_dir)
+ 
+ # augeas_test_data:
+@@ -723,7 +723,7 @@ foreach data : virt_daemon_confs
+     output: '@0@.conf'.format(data['name']),
+     configuration: daemon_conf,
+     install: true,
+-    install_dir: confdir,
++    install_dir: install_prefix + confdir,
+   )
+ 
+   if data.get('with_ip', false)
+@@ -847,7 +847,7 @@ if conf.has('WITH_LIBVIRTD')
+ 
+       install_data(
+         init_file,
+-        install_dir: sysconfdir / 'init.d',
++        install_dir: install_prefix + sysconfdir / 'init.d',
+         install_mode: 'rwxr-xr-x',
+         rename: [ init['name'] ],
+       )
+@@ -855,7 +855,7 @@ if conf.has('WITH_LIBVIRTD')
+       if init.has_key('confd')
+         install_data(
+           init['confd'],
+-          install_dir: sysconfdir / 'conf.d',
++          install_dir: install_prefix + sysconfdir / 'conf.d',
+           rename: [ init['name'] ],
+         )
+       endif
+@@ -882,10 +882,10 @@ endif
+ # Install empty directories
+ 
+ virt_install_dirs += [
+-  localstatedir / 'cache' / 'libvirt',
+-  localstatedir / 'lib' / 'libvirt' / 'images',
+-  localstatedir / 'lib' / 'libvirt' / 'filesystems',
+-  localstatedir / 'lib' / 'libvirt' / 'boot',
++  install_prefix + localstatedir / 'cache' / 'libvirt',
++  install_prefix + localstatedir / 'lib' / 'libvirt' / 'images',
++  install_prefix + localstatedir / 'lib' / 'libvirt' / 'filesystems',
++  install_prefix + localstatedir / 'lib' / 'libvirt' / 'boot',
+ ]
+ 
+ meson.add_install_script(
+diff --git a/src/network/meson.build b/src/network/meson.build
+index b5eff0c3ab..a0f26d624e 100644
+--- a/src/network/meson.build
++++ b/src/network/meson.build
+@@ -73,11 +73,11 @@ 'in_file': files('virtnetworkd.init.in'),
+   }
+ 
+   virt_install_dirs += [
+-    confdir / 'qemu' / 'networks',
+-    confdir / 'qemu' / 'networks' / 'autostart',
+-    localstatedir / 'lib' / 'libvirt' / 'network',
+-    localstatedir / 'lib' / 'libvirt' / 'dnsmasq',
+-    runstatedir / 'libvirt' / 'network',
++    install_prefix + confdir / 'qemu' / 'networks',
++    install_prefix + confdir / 'qemu' / 'networks' / 'autostart',
++    install_prefix + localstatedir / 'lib' / 'libvirt' / 'network',
++    install_prefix + localstatedir / 'lib' / 'libvirt' / 'dnsmasq',
++    install_prefix + runstatedir / 'libvirt' / 'network',
+   ]
+ 
+   configure_file(
+@@ -85,12 +85,12 @@ input: 'default.xml.in',
+     output: '@BASENAME@',
+     copy: true,
+     install: true,
+-    install_dir: confdir / 'qemu' / 'networks',
++    install_dir: install_prefix + confdir / 'qemu' / 'networks',
+   )
+ 
+   meson.add_install_script(
+     meson_python_prog.full_path(), python3_prog.full_path(), meson_install_symlink_prog.full_path(),
+-    confdir / 'qemu' / 'networks' / 'autostart',
++    install_prefix + confdir / 'qemu' / 'networks' / 'autostart',
+     '../default.xml', 'default.xml',
+   )
+ 
+diff --git a/src/node_device/meson.build b/src/node_device/meson.build
+index 1c95975c37..a7831242db 100644
+--- a/src/node_device/meson.build
++++ b/src/node_device/meson.build
+@@ -64,6 +64,6 @@ if conf.has('WITH_NODE_DEVICES')
+   }
+ 
+   virt_install_dirs += [
+-    runstatedir / 'libvirt' / 'nodedev',
++    install_prefix + runstatedir / 'libvirt' / 'nodedev',
+   ]
+ endif
+diff --git a/src/nwfilter/meson.build b/src/nwfilter/meson.build
+index 55cf8fcce4..d331086f2e 100644
+--- a/src/nwfilter/meson.build
++++ b/src/nwfilter/meson.build
+@@ -62,9 +62,9 @@ if conf.has('WITH_NWFILTER')
+   }
+ 
+   virt_install_dirs += [
+-    confdir / 'nwfilter',
+-    runstatedir / 'libvirt' / 'nwfilter-binding',
+-    runstatedir / 'libvirt' / 'nwfilter',
++    install_prefix + confdir / 'nwfilter',
++    install_prefix + runstatedir / 'libvirt' / 'nwfilter-binding',
++    install_prefix + runstatedir / 'libvirt' / 'nwfilter',
+   ]
+ 
+   subdir('xml')
+diff --git a/src/nwfilter/xml/meson.build b/src/nwfilter/xml/meson.build
+index 0d96c54ebe..66c92a1016 100644
+--- a/src/nwfilter/xml/meson.build
++++ b/src/nwfilter/xml/meson.build
+@@ -25,4 +25,4 @@ nwfilter_xml_files = [
+   'qemu-announce-self.xml',
+ ]
+ 
+-install_data(nwfilter_xml_files, install_dir: sysconfdir / 'libvirt' / 'nwfilter')
++install_data(nwfilter_xml_files, install_dir: install_prefix + sysconfdir / 'libvirt' / 'nwfilter')
+diff --git a/src/qemu/meson.build b/src/qemu/meson.build
+index 39f0f615cc..5f6f30f82b 100644
+--- a/src/qemu/meson.build
++++ b/src/qemu/meson.build
+@@ -200,25 +200,25 @@ if conf.has('WITH_QEMU')
+   endif
+ 
+   virt_install_dirs += [
+-    confdir / 'qemu',
+-    confdir / 'qemu' / 'autostart',
+-    localstatedir / 'cache' / 'libvirt' / 'qemu',
+-    localstatedir / 'lib' / 'libvirt' / 'qemu',
+-    localstatedir / 'lib' / 'libvirt' / 'qemu' / 'channel',
+-    localstatedir / 'lib' / 'libvirt' / 'qemu' / 'channel' / 'target',
+-    localstatedir / 'lib' / 'libvirt' / 'qemu' / 'checkpoint',
+-    localstatedir / 'lib' / 'libvirt' / 'qemu' / 'dump',
+-    localstatedir / 'lib' / 'libvirt' / 'qemu' / 'nvram',
+-    localstatedir / 'lib' / 'libvirt' / 'qemu' / 'ram',
+-    localstatedir / 'lib' / 'libvirt' / 'qemu' / 'save',
+-    localstatedir / 'lib' / 'libvirt' / 'qemu' / 'snapshot',
+-    localstatedir / 'lib' / 'libvirt' / 'swtpm',
+-    localstatedir / 'log' / 'libvirt' / 'qemu',
+-    localstatedir / 'log' / 'swtpm' / 'libvirt' / 'qemu',
+-    runstatedir / 'libvirt' / 'qemu',
+-    runstatedir / 'libvirt' / 'qemu' / 'dbus',
+-    runstatedir / 'libvirt' / 'qemu' / 'passt',
+-    runstatedir / 'libvirt' / 'qemu' / 'slirp',
+-    runstatedir / 'libvirt' / 'qemu' / 'swtpm',
++    install_prefix + confdir / 'qemu',
++    install_prefix + confdir / 'qemu' / 'autostart',
++    install_prefix + localstatedir / 'cache' / 'libvirt' / 'qemu',
++    install_prefix + localstatedir / 'lib' / 'libvirt' / 'qemu',
++    install_prefix + localstatedir / 'lib' / 'libvirt' / 'qemu' / 'channel',
++    install_prefix + localstatedir / 'lib' / 'libvirt' / 'qemu' / 'channel' / 'target',
++    install_prefix + localstatedir / 'lib' / 'libvirt' / 'qemu' / 'checkpoint',
++    install_prefix + localstatedir / 'lib' / 'libvirt' / 'qemu' / 'dump',
++    install_prefix + localstatedir / 'lib' / 'libvirt' / 'qemu' / 'nvram',
++    install_prefix + localstatedir / 'lib' / 'libvirt' / 'qemu' / 'ram',
++    install_prefix + localstatedir / 'lib' / 'libvirt' / 'qemu' / 'save',
++    install_prefix + localstatedir / 'lib' / 'libvirt' / 'qemu' / 'snapshot',
++    install_prefix + localstatedir / 'lib' / 'libvirt' / 'swtpm',
++    install_prefix + localstatedir / 'log' / 'libvirt' / 'qemu',
++    install_prefix + localstatedir / 'log' / 'swtpm' / 'libvirt' / 'qemu',
++    install_prefix + runstatedir / 'libvirt' / 'qemu',
++    install_prefix + runstatedir / 'libvirt' / 'qemu' / 'dbus',
++    install_prefix + runstatedir / 'libvirt' / 'qemu' / 'passt',
++    install_prefix + runstatedir / 'libvirt' / 'qemu' / 'slirp',
++    install_prefix + runstatedir / 'libvirt' / 'qemu' / 'swtpm',
+   ]
+ endif
+diff --git a/src/remote/meson.build b/src/remote/meson.build
+index b2aafe6320..6972d254ca 100644
+--- a/src/remote/meson.build
++++ b/src/remote/meson.build
+@@ -235,9 +235,9 @@ if conf.has('WITH_REMOTE')
+     }
+ 
+     virt_install_dirs += [
+-      localstatedir / 'log' / 'libvirt',
+-      runstatedir / 'libvirt',
+-      runstatedir / 'libvirt' / 'common',
++      install_prefix + localstatedir / 'log' / 'libvirt',
++      install_prefix + runstatedir / 'libvirt',
++      install_prefix + runstatedir / 'libvirt' / 'common',
+     ]
+ 
+     logrotate_conf = configuration_data()
+@@ -251,7 +251,7 @@ if conf.has('WITH_REMOTE')
+       )
+       install_data(
+         log_file,
+-        install_dir: sysconfdir / 'logrotate.d',
++        install_dir: install_prefix + sysconfdir / 'logrotate.d',
+         rename: [ name ],
+       )
+     endforeach
+@@ -301,7 +301,7 @@ endif
+ if conf.has('WITH_SASL')
+   install_data(
+     'libvirtd.sasl',
+-    install_dir: sysconfdir / 'sasl2',
++    install_dir: install_prefix + sysconfdir / 'sasl2',
+     rename: [ 'libvirt.conf' ],
+   )
+ endif
+diff --git a/src/secret/meson.build b/src/secret/meson.build
+index 1bda59849b..392bc2cb2e 100644
+--- a/src/secret/meson.build
++++ b/src/secret/meson.build
+@@ -45,7 +45,7 @@ if conf.has('WITH_SECRETS')
+   }
+ 
+   virt_install_dirs += [
+-    confdir / 'secrets',
+-    runstatedir / 'libvirt' / 'secrets',
++    install_prefix + confdir / 'secrets',
++    install_prefix + runstatedir / 'libvirt' / 'secrets',
+   ]
+ endif
+diff --git a/src/security/apparmor/meson.build b/src/security/apparmor/meson.build
+index b9257c816d..98701755d8 100644
+--- a/src/security/apparmor/meson.build
++++ b/src/security/apparmor/meson.build
+@@ -57,7 +57,7 @@ foreach name : apparmor_gen_profiles
+     output: name,
+     configuration: apparmor_gen_profiles_conf,
+     install: true,
+-    install_dir: apparmor_dir,
++    install_dir: install_prefix + apparmor_dir,
+   )
+ endforeach
+
+@@ -68,13 +68,13 @@ foreach name : apparmor_gen_abstractions
+     command: apparmor_gen_cmd,
+     capture: true,
+     install: true,
+-    install_dir: apparmor_dir / 'abstractions',
++    install_dir: install_prefix + apparmor_dir / 'abstractions',
+   )
+ endforeach
+
+ install_data(
+   [ 'TEMPLATE.qemu', 'TEMPLATE.lxc' ],
+-  install_dir: apparmor_dir / 'libvirt',
++  install_dir: install_prefix + apparmor_dir / 'libvirt',
+ )
+
+ if not conf.has('WITH_APPARMOR_3')
+@@ -83,7 +83,7 @@ if not conf.has('WITH_APPARMOR_3')
+   # files in order to limit the amount of filesystem clutter.
+   install_data(
+     'usr.lib.libvirt.virt-aa-helper.local',
+-    install_dir: apparmor_dir / 'local',
++    install_dir: install_prefix + apparmor_dir / 'local',
+     rename: 'usr.lib.libvirt.virt-aa-helper',
+   )
+ endif
+diff --git a/src/storage/meson.build b/src/storage/meson.build
+index 26e7ff1a1a..ad5c6eddc3 100644
+--- a/src/storage/meson.build
++++ b/src/storage/meson.build
+@@ -127,9 +127,9 @@ if conf.has('WITH_STORAGE')
+   }
+ 
+   virt_install_dirs += [
+-    confdir / 'storage',
+-    confdir / 'storage' / 'autostart',
+-    runstatedir / 'libvirt' / 'storage',
++    install_prefix + confdir / 'storage',
++    install_prefix + confdir / 'storage' / 'autostart',
++    install_prefix + runstatedir / 'libvirt' / 'storage',
+   ]
+ endif
+ 
+diff --git a/tools/meson.build b/tools/meson.build
+index f4b4a16c29..059c73a955 100644
+--- a/tools/meson.build
++++ b/tools/meson.build
+@@ -120,7 +120,7 @@ if conf.has('WITH_LOGIN_SHELL')
+     install_rpath: libvirt_rpath,
+   )
+ 
+-  install_data('virt-login-shell.conf', install_dir: sysconfdir / 'libvirt')
++  install_data('virt-login-shell.conf', install_dir: install_prefix + sysconfdir / 'libvirt')
+ endif
+ 
+ if host_machine.system() == 'windows'
+-- 
+2.35.1
+
diff --git a/nixpkgs/pkgs/development/libraries/libvirt/0002-substitute-zfs-and-zpool-commands.patch b/nixpkgs/pkgs/development/libraries/libvirt/0002-substitute-zfs-and-zpool-commands.patch
new file mode 100644
index 000000000000..9f380533ee45
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libvirt/0002-substitute-zfs-and-zpool-commands.patch
@@ -0,0 +1,27 @@
+From dc5e3df2fd29a547ef0f9545e190a0ce3a73c95c Mon Sep 17 00:00:00 2001
+From: Tako Marks <me@github.tako.mx>
+Date: Tue, 6 Sep 2022 20:19:26 +0200
+Subject: [PATCH] substitute zfs and zpool commands
+
+---
+ src/storage/storage_backend_zfs.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/storage/storage_backend_zfs.c b/src/storage/storage_backend_zfs.c
+index 2a5d74357d..460b3025c4 100644
+--- a/src/storage/storage_backend_zfs.c
++++ b/src/storage/storage_backend_zfs.c
+@@ -33,8 +33,8 @@
+ 
+ VIR_LOG_INIT("storage.storage_backend_zfs");
+ 
+-#define ZFS "zfs"
+-#define ZPOOL "zpool"
++#define ZFS "@zfs@"
++#define ZPOOL "@zpool@"
+ 
+ /*
+  * Some common flags of zfs and zpool commands we use:
+-- 
+2.36.2
+
diff --git a/nixpkgs/pkgs/development/libraries/libvirt/default.nix b/nixpkgs/pkgs/development/libraries/libvirt/default.nix
new file mode 100644
index 000000000000..72d94ee32989
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libvirt/default.nix
@@ -0,0 +1,386 @@
+{ lib
+, bash
+, bash-completion
+, bridge-utils
+, coreutils
+, curl
+, darwin
+, dbus
+, dnsmasq
+, docutils
+, fetchFromGitLab
+, gettext
+, glib
+, gnutls
+, iproute2
+, iptables
+, libgcrypt
+, libpcap
+, libtasn1
+, libxml2
+, libxslt
+, makeWrapper
+, meson
+, ninja
+, openssh
+, perl
+, perlPackages
+, polkit
+, pkg-config
+, pmutils
+, python3
+, readline
+, rpcsvc-proto
+, stdenv
+, substituteAll
+, xhtml1
+, yajl
+, writeScript
+, nixosTests
+
+  # Linux
+, acl ? null
+, attr ? null
+, audit ? null
+, dmidecode ? null
+, fuse3 ? null
+, kmod ? null
+, libapparmor ? null
+, libcap_ng ? null
+, libnl ? null
+, libpciaccess ? null
+, libtirpc ? null
+, lvm2 ? null
+, numactl ? null
+, numad ? null
+, parted ? null
+, systemd ? null
+, util-linux ? null
+
+  # Darwin
+, gmp
+, libiconv
+, qemu
+, Carbon
+, AppKit
+
+  # Options
+, enableCeph ? false
+, ceph
+, enableGlusterfs ? false
+, glusterfs
+, enableIscsi ? false
+, openiscsi
+, libiscsi
+, enableXen ? false
+, xen
+, enableZfs ? stdenv.isLinux
+, zfs
+}:
+
+let
+  inherit (stdenv) isDarwin isLinux isx86_64;
+  binPath = lib.makeBinPath ([
+    dnsmasq
+  ] ++ lib.optionals isLinux [
+    bridge-utils
+    dmidecode
+    dnsmasq
+    iproute2
+    iptables
+    kmod
+    lvm2
+    numactl
+    numad
+    openssh
+    pmutils
+    systemd
+  ] ++ lib.optionals enableIscsi [
+    libiscsi
+    openiscsi
+  ] ++ lib.optionals enableZfs [
+    zfs
+  ]);
+in
+
+assert enableXen -> isLinux && isx86_64;
+assert enableCeph -> isLinux;
+assert enableGlusterfs -> isLinux;
+assert enableZfs -> isLinux;
+
+# if you update, also bump <nixpkgs/pkgs/development/python-modules/libvirt/default.nix> and SysVirt in <nixpkgs/pkgs/top-level/perl-packages.nix>
+stdenv.mkDerivation rec {
+  pname = "libvirt";
+  # NOTE: You must also bump:
+  # <nixpkgs/pkgs/development/python-modules/libvirt/default.nix>
+  # SysVirt in <nixpkgs/pkgs/top-level/perl-packages.nix>
+  version = "10.0.0";
+
+  src = fetchFromGitLab {
+    owner = pname;
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-xFl8AHcbeuydWzhJNnwZ3Bd7TQiTU8hjBxaALXvcLgE=";
+    fetchSubmodules = true;
+  };
+
+  patches = [
+    ./0001-meson-patch-in-an-install-prefix-for-building-on-nix.patch
+  ] ++ lib.optionals enableZfs [
+    (substituteAll {
+      src = ./0002-substitute-zfs-and-zpool-commands.patch;
+      zfs = "${zfs}/bin/zfs";
+      zpool = "${zfs}/bin/zpool";
+    })
+  ];
+
+  # remove some broken tests
+  postPatch = ''
+    sed -i '/commandtest/d' tests/meson.build
+    sed -i '/virnetsockettest/d' tests/meson.build
+    # delete only the first occurrence of this
+    sed -i '0,/qemuxml2argvtest/{/qemuxml2argvtest/d;}' tests/meson.build
+
+  '' + lib.optionalString isLinux ''
+    for binary in mount umount mkfs; do
+      substituteInPlace meson.build \
+        --replace "find_program('$binary'" "find_program('${lib.getBin util-linux}/bin/$binary'"
+    done
+
+  '' + ''
+    substituteInPlace meson.build \
+      --replace "'dbus-daemon'," "'${lib.getBin dbus}/bin/dbus-daemon',"
+  '' + lib.optionalString isLinux ''
+    sed -i 's,define PARTED "parted",define PARTED "${parted}/bin/parted",' \
+      src/storage/storage_backend_disk.c \
+      src/storage/storage_util.c
+  '' + lib.optionalString isDarwin ''
+    # Darwin doesn’t support -fsemantic-interposition, but the problem doesn’t seem to affect Mach-O.
+    # See https://gitlab.com/libvirt/libvirt/-/merge_requests/235
+    sed -i "s/not supported_cc_flags.contains('-fsemantic-interposition')/false/" meson.build
+    sed -i '/qemufirmwaretest/d' tests/meson.build
+    sed -i '/qemuhotplugtest/d' tests/meson.build
+    sed -i '/qemuvhostusertest/d' tests/meson.build
+    sed -i '/qemuxml2xmltest/d' tests/meson.build
+  '';
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    meson
+    docutils
+    libxml2 # for xmllint
+    libxslt # for xsltproc
+    gettext
+    makeWrapper
+    ninja
+    pkg-config
+    perl
+    perlPackages.XMLXPath
+  ]
+  ++ lib.optional (!isDarwin) rpcsvc-proto
+  # NOTE: needed for rpcgen
+  ++ lib.optional isDarwin darwin.developer_cmds;
+
+  buildInputs = [
+    bash
+    bash-completion
+    curl
+    dbus
+    glib
+    gnutls
+    libgcrypt
+    libpcap
+    libtasn1
+    libxml2
+    python3
+    readline
+    xhtml1
+    yajl
+  ] ++ lib.optionals isLinux [
+    acl
+    attr
+    audit
+    fuse3
+    libapparmor
+    libcap_ng
+    libnl
+    libpciaccess
+    libtirpc
+    lvm2
+    numactl
+    numad
+    parted
+    systemd
+    util-linux
+  ] ++ lib.optionals isDarwin [
+    AppKit
+    Carbon
+    gmp
+    libiconv
+  ]
+  ++ lib.optionals enableCeph [ ceph ]
+  ++ lib.optionals enableGlusterfs [ glusterfs ]
+  ++ lib.optionals enableIscsi [ libiscsi openiscsi ]
+  ++ lib.optionals enableXen [ xen ]
+  ++ lib.optionals enableZfs [ zfs ];
+
+  preConfigure =
+    let
+      overrides = {
+        QEMU_BRIDGE_HELPER = "/run/wrappers/bin/qemu-bridge-helper";
+        QEMU_PR_HELPER = "/run/libvirt/nix-helpers/qemu-pr-helper";
+      };
+
+      patchBuilder = var: value: ''
+        sed -i meson.build -e "s|conf.set_quoted('${var}',.*|conf.set_quoted('${var}','${value}')|"
+      '';
+    in
+    ''
+      PATH="${binPath}:$PATH"
+      # the path to qemu-kvm will be stored in VM's .xml and .save files
+      # do not use "''${qemu_kvm}/bin/qemu-kvm" to avoid bound VMs to particular qemu derivations
+      substituteInPlace src/lxc/lxc_conf.c \
+        --replace 'lxc_path,' '"/run/libvirt/nix-emulators/libvirt_lxc",'
+
+      substituteInPlace build-aux/meson.build \
+        --replace "gsed" "sed" \
+        --replace "gmake" "make" \
+        --replace "ggrep" "grep"
+
+      substituteInPlace src/util/virpolkit.h \
+        --replace '"/usr/bin/pkttyagent"' '"${if isLinux then polkit.bin else "/usr"}/bin/pkttyagent"'
+
+      substituteInPlace src/util/virpci.c \
+         --replace '/lib/modules' '${if isLinux then "/run/booted-system/kernel-modules" else ""}/lib/modules'
+
+      patchShebangs .
+    ''
+    + (lib.concatStringsSep "\n" (lib.mapAttrsToList patchBuilder overrides));
+
+  mesonAutoFeatures = "disabled";
+
+  mesonFlags =
+    let
+      cfg = option: val: "-D${option}=${val}";
+      feat = option: enable: cfg option (if enable then "enabled" else "disabled");
+      driver = name: feat "driver_${name}";
+      storage = name: feat "storage_${name}";
+    in
+    [
+      "--sysconfdir=/var/lib"
+      (cfg "install_prefix" (placeholder "out"))
+      (cfg "localstatedir" "/var")
+      (cfg "runstatedir" "/run")
+
+      (cfg "init_script" (if isDarwin then "none" else "systemd"))
+      (cfg "qemu_datadir" (lib.optionalString isDarwin "${qemu}/share/qemu"))
+
+      (feat "apparmor" isLinux)
+      (feat "attr" isLinux)
+      (feat "audit" isLinux)
+      (feat "bash_completion" true)
+      (feat "blkid" isLinux)
+      (feat "capng" isLinux)
+      (feat "curl" true)
+      (feat "docs" true)
+      (feat "expensive_tests" true)
+      (feat "firewalld" isLinux)
+      (feat "firewalld_zone" isLinux)
+      (feat "fuse" isLinux)
+      (feat "glusterfs" enableGlusterfs)
+      (feat "host_validate" true)
+      (feat "libiscsi" enableIscsi)
+      (feat "libnl" isLinux)
+      (feat "libpcap" true)
+      (feat "libssh2" true)
+      (feat "login_shell" isLinux)
+      (feat "nss" (isLinux && !stdenv.hostPlatform.isMusl))
+      (feat "numactl" isLinux)
+      (feat "numad" isLinux)
+      (feat "pciaccess" isLinux)
+      (feat "polkit" isLinux)
+      (feat "readline" true)
+      (feat "secdriver_apparmor" isLinux)
+      (feat "tests" true)
+      (feat "udev" isLinux)
+      (feat "yajl" true)
+
+      (driver "ch" isLinux)
+      (driver "esx" true)
+      (driver "interface" isLinux)
+      (driver "libvirtd" true)
+      (driver "libxl" enableXen)
+      (driver "lxc" isLinux)
+      (driver "network" true)
+      (driver "openvz" isLinux)
+      (driver "qemu" true)
+      (driver "remote" true)
+      (driver "secrets" true)
+      (driver "test" true)
+      (driver "vbox" true)
+      (driver "vmware" true)
+
+      (storage "dir" true)
+      (storage "disk" isLinux)
+      (storage "fs" isLinux)
+      (storage "gluster" enableGlusterfs)
+      (storage "iscsi" enableIscsi)
+      (storage "iscsi_direct" enableIscsi)
+      (storage "lvm" isLinux)
+      (storage "mpath" isLinux)
+      (storage "rbd" enableCeph)
+      (storage "scsi" true)
+      (storage "vstorage" isLinux)
+      (storage "zfs" enableZfs)
+    ];
+
+  doCheck = true;
+
+  postInstall = ''
+    substituteInPlace $out/bin/virt-xml-validate \
+      --replace xmllint ${libxml2}/bin/xmllint
+
+    substituteInPlace $out/libexec/libvirt-guests.sh \
+      --replace 'ON_BOOT="start"'       'ON_BOOT=''${ON_BOOT:-start}' \
+      --replace 'ON_SHUTDOWN="suspend"' 'ON_SHUTDOWN=''${ON_SHUTDOWN:-suspend}' \
+      --replace 'PARALLEL_SHUTDOWN=0'   'PARALLEL_SHUTDOWN=''${PARALLEL_SHUTDOWN:-0}' \
+      --replace "$out/bin"              '${gettext}/bin' \
+      --replace 'lock/subsys'           'lock' \
+      --replace 'gettext.sh'            'gettext.sh
+    # Added in nixpkgs:
+    gettext() { "${gettext}/bin/gettext" "$@"; }
+    '
+  '' + lib.optionalString isLinux ''
+    for f in $out/lib/systemd/system/*.service ; do
+      substituteInPlace $f --replace /bin/kill ${coreutils}/bin/kill
+    done
+    rm $out/lib/systemd/system/{virtlockd,virtlogd}.*
+    wrapProgram $out/sbin/libvirtd \
+      --prefix PATH : /run/libvirt/nix-emulators:${binPath}
+  '';
+
+  passthru.updateScript = writeScript "update-libvirt" ''
+    #!/usr/bin/env nix-shell
+    #!nix-shell -i bash -p curl jq common-updater-scripts
+
+    set -eu -o pipefail
+
+    libvirtVersion=$(curl https://gitlab.com/api/v4/projects/192693/repository/tags | jq -r '.[].name|select(. | contains("rc") | not)' | head -n1 | sed "s/v//g")
+    sysvirtVersion=$(curl https://gitlab.com/api/v4/projects/192677/repository/tags | jq -r '.[].name|select(. | contains("rc") | not)' | head -n1 | sed "s/v//g")
+    update-source-version ${pname} "$libvirtVersion"
+    update-source-version python3Packages.${pname} "$libvirtVersion"
+    update-source-version perlPackages.SysVirt "$sysvirtVersion" --file="pkgs/top-level/perl-packages.nix"
+  '';
+
+  passthru.tests.libvirtd = nixosTests.libvirtd;
+
+  meta = with lib; {
+    description = "A toolkit to interact with the virtualization capabilities of recent versions of Linux and other OSes";
+    homepage = "https://libvirt.org/";
+    changelog = "https://gitlab.com/libvirt/libvirt/-/raw/v${version}/NEWS.rst";
+    license = licenses.lgpl2Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ fpletz globin lovesegfault ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libvisio/default.nix b/nixpkgs/pkgs/development/libraries/libvisio/default.nix
new file mode 100644
index 000000000000..b9856e90edc9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libvisio/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, fetchurl
+, boost
+, libwpd
+, libwpg
+, pkg-config
+, zlib
+, gperf
+, librevenge
+, libxml2
+, icu
+, perl
+, cppunit
+, doxygen
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libvisio";
+  version = "0.1.7";
+
+  outputs = [ "out" "bin" "dev" "doc" ];
+
+  src = fetchurl {
+    url = "https://dev-www.libreoffice.org/src/libvisio/${pname}-${version}.tar.xz";
+    sha256 = "0k7adcbbf27l7n453cca1m6s9yj6qvb5j6bsg2db09ybf3w8vbwg";
+  };
+
+  strictDeps = true;
+  nativeBuildInputs = [ pkg-config doxygen perl gperf ];
+  buildInputs = [ boost libwpd libwpg zlib librevenge libxml2 icu cppunit ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "A library providing ability to interpret and import visio diagrams into various applications";
+    homepage = "https://wiki.documentfoundation.org/DLP/Libraries/libvisio";
+    license = licenses.mpl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ nickcao ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libvisio2svg/default.nix b/nixpkgs/pkgs/development/libraries/libvisio2svg/default.nix
new file mode 100644
index 000000000000..b2a68ed58680
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libvisio2svg/default.nix
@@ -0,0 +1,39 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, freetype
+, libemf2svg
+, librevenge
+, libvisio
+, libwmf
+, libxml2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libvisio2svg";
+  version = "0.5.5";
+
+  src = fetchFromGitHub {
+    owner = "kakwa";
+    repo = pname;
+    rev = version;
+    sha256 = "14m37mmib1596c76j9w178jqhwxyih2sy5w5q9xglh8cmlfn1hfx";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ libxml2 freetype librevenge libvisio libwmf libemf2svg ];
+
+  cmakeFlags = [
+    # file RPATH_CHANGE could not write new RPATH
+    "-DCMAKE_SKIP_BUILD_RPATH=ON"
+  ];
+
+  meta = with lib; {
+    description = "Library and tools to convert Microsoft Visio documents (VSS and VSD) to SVG";
+    homepage = "https://github.com/kakwa/libvisio2svg";
+    maintainers = with maintainers; [ erdnaxe ];
+    license = licenses.gpl2Only;
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libvisual/default.nix b/nixpkgs/pkgs/development/libraries/libvisual/default.nix
new file mode 100644
index 000000000000..52ea32f75832
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libvisual/default.nix
@@ -0,0 +1,58 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, SDL
+, autoreconfHook
+, glib
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libvisual";
+  version = "0.4.1";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libvisual/${pname}-${version}.tar.gz";
+    hash = "sha256-qhKHdBf3bTZC2fTHIzAjgNgzF1Y51jpVZB0Bkopd230=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    # pull upstream fix for SDL1 cross-compilation.
+    #   https://github.com/Libvisual/libvisual/pull/238
+    (fetchpatch {
+      name = "sdl-cross-prereq.patch";
+      url = "https://github.com/Libvisual/libvisual/commit/7902d24aa1a552619a5738339b3823e90dd3b865.patch";
+      hash = "sha256-84u8klHDAw/q4d+9L4ROAr7XsbXItHrhaEKkTEMSPcc=";
+      # remove extra libvisual prefix
+      stripLen = 1;
+      # pull in only useful configure.ac changes.
+      excludes = [ "Makefile.am" ];
+    })
+    (fetchpatch {
+      name = "sdl-cross-pc.patch";
+      url = "https://github.com/Libvisual/libvisual/commit/f79a2e8d21ad1d7fe26e2aa83cea4c9f48f9e392.patch";
+      hash = "sha256-8c7SdLxXC8K9BAwj7DzozsZAcbs5l1xuBqky9LJ1MfM=";
+      # remove extra libvisual prefix
+      stripLen = 1;
+    })
+  ];
+
+  strictDeps = true;
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ SDL glib ];
+
+  configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    # Remove once "sdl-cross-prereq.patch" patch above is removed.
+    "--disable-lv-tool"
+  ];
+
+  meta = {
+    description = "An abstraction library for audio visualisations";
+    homepage = "https://sourceforge.net/projects/libvisual/";
+    license = lib.licenses.lgpl21Plus;
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libvmaf/default.nix b/nixpkgs/pkgs/development/libraries/libvmaf/default.nix
new file mode 100644
index 000000000000..0c71611e4772
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libvmaf/default.nix
@@ -0,0 +1,53 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, ffmpeg-full
+, libaom
+, meson
+, nasm
+, ninja
+, testers
+, xxd
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libvmaf";
+  version = "3.0.0";
+
+  src = fetchFromGitHub {
+    owner = "netflix";
+    repo = "vmaf";
+    rev = "v${finalAttrs.version}";
+    sha256 = "sha256-6mwU2so1YM2pyWkJbDHVl443GgWtQazbBv3gTMBq5NA=";
+  };
+
+  sourceRoot = "${finalAttrs.src.name}/libvmaf";
+
+  nativeBuildInputs = [ meson ninja nasm xxd ];
+
+  mesonFlags = [ "-Denable_avx512=true" ];
+
+  outputs = [ "out" "dev" ];
+  doCheck = false;
+
+  passthru.tests = {
+    inherit libaom ffmpeg-full;
+    version = testers.testVersion {
+      package = finalAttrs.finalPackage;
+    };
+    pkg-config = testers.hasPkgConfigModules {
+      package = finalAttrs.finalPackage;
+      moduleNames = [ "libvmaf" ];
+    };
+  };
+
+  meta = with lib; {
+    description = "Perceptual video quality assessment based on multi-method fusion (VMAF)";
+    homepage = "https://github.com/Netflix/vmaf";
+    changelog = "https://github.com/Netflix/vmaf/blob/v${finalAttrs.version}/CHANGELOG.md";
+    license = licenses.bsd2Patent;
+    maintainers = [ maintainers.cfsmp3 maintainers.marsam ];
+    mainProgram = "vmaf";
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libvmi/default.nix b/nixpkgs/pkgs/development/libraries/libvmi/default.nix
new file mode 100644
index 000000000000..b1eb5764dba4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libvmi/default.nix
@@ -0,0 +1,49 @@
+{ lib, stdenv,
+  fetchFromGitHub,
+  autoreconfHook,
+  bison,
+  flex,
+  glib,
+  pkg-config,
+  json_c,
+  xen,
+  libvirt,
+  xenSupport ? true }:
+
+stdenv.mkDerivation rec {
+  pname = "libvmi";
+  version = "0.12.0";
+  libVersion = "0.0.12";
+
+  src = fetchFromGitHub {
+    owner = "libvmi";
+    repo = "libvmi";
+    rev = "v${version}";
+    sha256 = "0wbi2nasb1gbci6cq23g6kq7i10rwi1y7r44rl03icr5prqjpdyv";
+  };
+
+  buildInputs = [ glib libvirt json_c ] ++ (lib.optional xenSupport xen);
+  nativeBuildInputs = [ autoreconfHook bison flex pkg-config ];
+
+  configureFlags = lib.optional (!xenSupport) "--disable-xen";
+
+  # libvmi uses dlopen() for the xen libraries, however autoPatchelfHook doesn't work here
+  postFixup = lib.optionalString xenSupport ''
+    libvmi="$out/lib/libvmi.so.${libVersion}"
+    oldrpath=$(patchelf --print-rpath "$libvmi")
+    patchelf --set-rpath "$oldrpath:${lib.makeLibraryPath [ xen ]}" "$libvmi"
+  '';
+
+  meta = with lib; {
+    homepage = "https://libvmi.com/";
+    description = "A C library for virtual machine introspection";
+    longDescription = ''
+      LibVMI is a C library with Python bindings that makes it easy to monitor the low-level
+      details of a running virtual machine by viewing its memory, trapping on hardware events,
+      and accessing the vCPU registers.
+    '';
+    license = with licenses; [ gpl3 lgpl3 ];
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libvncserver/default.nix b/nixpkgs/pkgs/development/libraries/libvncserver/default.nix
new file mode 100644
index 000000000000..4880c835a1eb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libvncserver/default.nix
@@ -0,0 +1,59 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, libjpeg
+, openssl
+, zlib
+, libgcrypt
+, libpng
+, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
+, systemd
+, Carbon
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libvncserver";
+  version = "0.9.14";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "LibVNC";
+    repo = "libvncserver";
+    rev = "LibVNCServer-${version}";
+    sha256 = "sha256-kqVZeCTp+Z6BtB6nzkwmtkJ4wtmjlSQBg05lD02cVvQ=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  cmakeFlags = [
+    "-DWITH_SYSTEMD=${if withSystemd then "ON" else "OFF"}"
+  ];
+
+  buildInputs = [
+    libjpeg
+    openssl
+    libgcrypt
+    libpng
+  ] ++ lib.optionals withSystemd [
+    systemd
+  ] ++ lib.optionals stdenv.isDarwin [
+    Carbon
+  ];
+
+  propagatedBuildInputs = [
+    zlib
+  ];
+
+  meta = with lib; {
+    description = "VNC server library";
+    homepage = "https://libvnc.github.io/";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ raskin ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libvoikko/default.nix b/nixpkgs/pkgs/development/libraries/libvoikko/default.nix
new file mode 100644
index 000000000000..3f5f4ef5c858
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libvoikko/default.nix
@@ -0,0 +1,40 @@
+{ stdenv
+, lib
+, autoreconfHook
+, hfst-ospell
+, fetchFromGitHub
+, pkg-config
+, python3
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libvoikko";
+  version = "4.3.2";
+
+  src = fetchFromGitHub {
+    owner = "voikko";
+    repo = "corevoikko";
+    rev = "refs/tags/rel-libvoikko-${finalAttrs.version}";
+    hash = "sha256-0MIQ54dCxyAfdgYWmmTVF+Yfa15K2sjJyP1JNxwHP2M=";
+  };
+
+  sourceRoot = "${finalAttrs.src.name}/libvoikko";
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+    python3
+  ];
+
+  buildInputs = [
+    hfst-ospell
+  ];
+
+  meta = with lib; {
+    homepage = "https://voikko.puimula.org/";
+    description = "Finnish language processing library";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ lurkki ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libvorbis/default.nix b/nixpkgs/pkgs/development/libraries/libvorbis/default.nix
new file mode 100644
index 000000000000..42e7328a8ec1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libvorbis/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchurl, libogg, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "libvorbis";
+  version = "1.3.7";
+
+  src = fetchurl {
+    url = "https://downloads.xiph.org/releases/vorbis/${pname}-${version}.tar.xz";
+    sha256 = "0jwmf87x5sdis64rbv0l87mdpah1rbilkkxszipbzg128f9w8g5k";
+  };
+
+  outputs = [ "out" "dev" "doc" ];
+
+  nativeBuildInputs = [ pkg-config ];
+  propagatedBuildInputs = [ libogg ];
+
+  doCheck = true;
+
+  # strip -mno-ieee-fp flag from configure and configure.ac when using
+  # clang as the flag is not recognized by the compiler
+  preConfigure = lib.optionalString (stdenv.cc.isClang or false) ''
+    sed s/\-mno\-ieee\-fp// -i {configure,configure.ac}
+  '';
+
+  meta = with lib; {
+    description = "Vorbis audio compression reference implementation";
+    homepage = "https://xiph.org/vorbis/";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.ehmry ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libvori/default.nix b/nixpkgs/pkgs/development/libraries/libvori/default.nix
new file mode 100644
index 000000000000..9483c2a0bb7a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libvori/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, lib, fetchurl, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "libvori";
+  version = "220621";
+
+  src = fetchurl {
+    url = "https://brehm-research.de/files/${pname}-${version}.tar.gz";
+    hash = "sha256-HPqYxWSBS92s8cDn8RWCE311hmj2MH5us5LHIxeYTBQ=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "Library for Voronoi integration of electron densities";
+    homepage = "https://brehm-research.de/libvori.php";
+    license = with licenses; [ lgpl3Only ];
+    platforms = platforms.unix;
+    maintainers = [ maintainers.sheepforce ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libvpx/1_8.nix b/nixpkgs/pkgs/development/libraries/libvpx/1_8.nix
new file mode 100644
index 000000000000..643dcb4d8f40
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libvpx/1_8.nix
@@ -0,0 +1,185 @@
+{ lib, stdenv, fetchFromGitHub, perl, yasm
+, vp8DecoderSupport ? true # VP8 decoder
+, vp8EncoderSupport ? true # VP8 encoder
+, vp9DecoderSupport ? true # VP9 decoder
+, vp9EncoderSupport ? true # VP9 encoder
+, extraWarningsSupport ? false # emit non-fatal warnings
+, werrorSupport ? false # treat warnings as errors (not available with all compilers)
+, debugSupport ? false # debug mode
+, gprofSupport ? false # gprof profiling instrumentation
+, gcovSupport ? false # gcov coverage instrumentation
+, sizeLimitSupport ? true # limit max size to allow in the decoder
+, optimizationsSupport ? true # compiler optimization flags
+, runtimeCpuDetectSupport ? true # detect cpu capabilities at runtime
+, thumbSupport ? false # build arm assembly in thumb mode
+, examplesSupport ? true # build examples (vpxdec & vpxenc are part of examples)
+, debugLibsSupport ? false # include debug version of each library
+, postprocSupport ? true # postprocessing
+, multithreadSupport ? true # multithreaded decoding & encoding
+, internalStatsSupport ? false # output of encoder internal stats for debug, if supported (encoders)
+, spatialResamplingSupport ? true # spatial sampling (scaling)
+, realtimeOnlySupport ? false # build for real-time encoding
+, ontheflyBitpackingSupport ? false # on-the-fly bitpacking in real-time encoding
+, errorConcealmentSupport ? false # decoder conceals losses
+, smallSupport ? false # favor smaller binary over speed
+, postprocVisualizerSupport ? false # macro block/block level visualizers
+, unitTestsSupport ? false, curl ? null, coreutils ? null # unit tests
+, webmIOSupport ? true # input from and output to webm container
+, libyuvSupport ? true # libyuv
+, decodePerfTestsSupport ? false # build decoder perf tests with unit tests
+, encodePerfTestsSupport ? false # build encoder perf tests with unit tests
+, multiResEncodingSupport ? false # multiple-resolution encoding
+, temporalDenoisingSupport ? true # use temporal denoising instead of spatial denoising
+, coefficientRangeCheckingSupport ? false # decoder checks if intermediate transform coefficients are in valid range
+, vp9HighbitdepthSupport ? true # 10/12 bit color support in VP9
+# Experimental features
+, experimentalSpatialSvcSupport ? false # Spatial scalable video coding
+, experimentalFpMbStatsSupport ? false
+, experimentalEmulateHardwareSupport ? false
+}:
+
+let
+  inherit (stdenv) is64bit isMips isDarwin isCygwin;
+  inherit (lib) enableFeature optional optionals;
+in
+
+assert vp8DecoderSupport || vp8EncoderSupport || vp9DecoderSupport || vp9EncoderSupport;
+assert internalStatsSupport && (vp9DecoderSupport || vp9EncoderSupport) -> postprocSupport;
+/* If spatialResamplingSupport not enabled, build will fail with undeclared variable errors.
+   Variables called in vpx_scale/generic/vpx_scale.c are declared by vpx_scale/vpx_scale_rtcd.pl,
+   but is only executed if spatialResamplingSupport is enabled */
+assert spatialResamplingSupport;
+assert postprocVisualizerSupport -> postprocSupport;
+assert unitTestsSupport -> curl != null && coreutils != null;
+assert vp9HighbitdepthSupport -> (vp9DecoderSupport || vp9EncoderSupport);
+assert isCygwin -> unitTestsSupport && webmIOSupport && libyuvSupport;
+
+stdenv.mkDerivation rec {
+  pname = "libvpx";
+  version = "1.8.2";
+
+  src = fetchFromGitHub {
+    owner = "webmproject";
+    repo = "libvpx";
+    rev = "v${version}";
+    sha256 = "0gyq4fkbd2fv7m1mm9xrvn6rk6f4jsmbv8bnlhingmnrvyncnmnr";
+  };
+
+  patches = [
+#    ./CVE-2019-9232.CVE-2019-9325.CVE-2019-9371.CVE-2019-9433.patch
+  ];
+
+  postPatch = ''
+    patchShebangs --build \
+      build/make/*.sh \
+      build/make/*.pl \
+      build/make/*.pm \
+      test/*.sh \
+      configure
+  '';
+
+  outputs = [ "bin" "dev" "out" ];
+  setOutputFlags = false;
+
+  configurePlatforms = [];
+  configureFlags = [
+    (enableFeature (vp8EncoderSupport || vp8DecoderSupport) "vp8")
+    (enableFeature vp8EncoderSupport "vp8-encoder")
+    (enableFeature vp8DecoderSupport "vp8-decoder")
+    (enableFeature (vp9EncoderSupport || vp9DecoderSupport) "vp9")
+    (enableFeature vp9EncoderSupport "vp9-encoder")
+    (enableFeature vp9DecoderSupport "vp9-decoder")
+    (enableFeature extraWarningsSupport "extra-warnings")
+    (enableFeature werrorSupport "werror")
+    "--disable-install-docs"
+    (enableFeature examplesSupport "install-bins")
+    "--enable-install-libs"
+    "--disable-install-srcs"
+    (enableFeature debugSupport "debug")
+    (enableFeature gprofSupport "gprof")
+    (enableFeature gcovSupport "gcov")
+    # Required to build shared libraries
+    (enableFeature (!isCygwin) "pic")
+    (enableFeature optimizationsSupport "optimizations")
+    (enableFeature runtimeCpuDetectSupport "runtime-cpu-detect")
+    (enableFeature thumbSupport "thumb")
+    "--enable-libs"
+    (enableFeature examplesSupport "examples")
+    "--disable-docs"
+    "--as=yasm"
+    # Limit default decoder max to WHXGA
+    (if sizeLimitSupport then "--size-limit=5120x3200" else null)
+    "--disable-codec-srcs"
+    (enableFeature debugLibsSupport "debug-libs")
+    (enableFeature isMips "dequant-tokens")
+    (enableFeature isMips "dc-recon")
+    (enableFeature postprocSupport "postproc")
+    (enableFeature (postprocSupport && (vp9DecoderSupport || vp9EncoderSupport)) "vp9-postproc")
+    (enableFeature multithreadSupport "multithread")
+    (enableFeature internalStatsSupport "internal-stats")
+    (enableFeature spatialResamplingSupport "spatial-resampling")
+    (enableFeature realtimeOnlySupport "realtime-only")
+    (enableFeature ontheflyBitpackingSupport "onthefly-bitpacking")
+    (enableFeature errorConcealmentSupport "error-concealment")
+    # Shared libraries are only supported on ELF platforms
+    (if isDarwin || isCygwin then
+       "--enable-static --disable-shared"
+     else
+       "--enable-shared")
+    (enableFeature smallSupport "small")
+    (enableFeature postprocVisualizerSupport "postproc-visualizer")
+    (enableFeature unitTestsSupport "unit-tests")
+    (enableFeature webmIOSupport "webm-io")
+    (enableFeature libyuvSupport "libyuv")
+    (enableFeature decodePerfTestsSupport "decode-perf-tests")
+    (enableFeature encodePerfTestsSupport "encode-perf-tests")
+    (enableFeature multiResEncodingSupport "multi-res-encoding")
+    (enableFeature temporalDenoisingSupport "temporal-denoising")
+    (enableFeature (temporalDenoisingSupport && (vp9DecoderSupport || vp9EncoderSupport)) "vp9-temporal-denoising")
+    (enableFeature coefficientRangeCheckingSupport "coefficient-range-checking")
+    (enableFeature (vp9HighbitdepthSupport && is64bit) "vp9-highbitdepth")
+    (enableFeature (experimentalSpatialSvcSupport ||
+                    experimentalFpMbStatsSupport ||
+                    experimentalEmulateHardwareSupport) "experimental")
+  ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "--enable-external-build"
+    # libvpx darwin targets include darwin version (ie. ARCH-darwinXX-gcc, XX being the darwin version)
+    # See all_platforms: https://github.com/webmproject/libvpx/blob/master/configure
+    # Darwin versions: 10.4=8, 10.5=9, 10.6=10, 10.7=11, 10.8=12, 10.9=13, 10.10=14
+    "--force-target=${stdenv.hostPlatform.config}${
+            if stdenv.hostPlatform.isDarwin then
+              if      stdenv.hostPlatform.osxMinVersion == "10.10" then "14"
+              else if stdenv.hostPlatform.osxMinVersion == "10.9"  then "13"
+              else if stdenv.hostPlatform.osxMinVersion == "10.8"  then "12"
+              else if stdenv.hostPlatform.osxMinVersion == "10.7"  then "11"
+              else if stdenv.hostPlatform.osxMinVersion == "10.6"  then "10"
+              else if stdenv.hostPlatform.osxMinVersion == "10.5"  then "9"
+              else "8"
+            else ""}-gcc"
+    (lib.optionalString stdenv.hostPlatform.isCygwin "--enable-static-msvcrt")
+  ] # Experimental features
+    ++ optional experimentalSpatialSvcSupport "--enable-spatial-svc"
+    ++ optional experimentalFpMbStatsSupport "--enable-fp-mb-stats"
+    ++ optional experimentalEmulateHardwareSupport "--enable-emulate-hardware";
+
+  nativeBuildInputs = [ perl yasm ];
+
+  buildInputs = [ ]
+    ++ optionals unitTestsSupport [ coreutils curl ];
+
+  NIX_LDFLAGS = [
+    "-lpthread" # fixes linker errors
+  ];
+
+  enableParallelBuilding = true;
+
+  postInstall = ''moveToOutput bin "$bin" '';
+
+  meta = with lib; {
+    description = "WebM VP8/VP9 codec SDK";
+    homepage    = "https://www.webmproject.org/";
+    license     = licenses.bsd3;
+    maintainers = with maintainers; [ codyopel ];
+    platforms   = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libvpx/default.nix b/nixpkgs/pkgs/development/libraries/libvpx/default.nix
new file mode 100644
index 000000000000..dda6b13c1bf6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libvpx/default.nix
@@ -0,0 +1,195 @@
+{ lib, stdenv, fetchFromGitHub, perl, yasm
+, vp8DecoderSupport ? true # VP8 decoder
+, vp8EncoderSupport ? true # VP8 encoder
+, vp9DecoderSupport ? true # VP9 decoder
+, vp9EncoderSupport ? true # VP9 encoder
+, extraWarningsSupport ? false # emit non-fatal warnings
+, werrorSupport ? false # treat warnings as errors (not available with all compilers)
+, debugSupport ? false # debug mode
+, gprofSupport ? false # gprof profiling instrumentation
+, gcovSupport ? false # gcov coverage instrumentation
+, sizeLimitSupport ? true # limit max size to allow in the decoder
+, optimizationsSupport ? true # compiler optimization flags
+, runtimeCpuDetectSupport ? true # detect cpu capabilities at runtime
+, thumbSupport ? false # build arm assembly in thumb mode
+, examplesSupport ? true # build examples (vpxdec & vpxenc are part of examples)
+, debugLibsSupport ? false # include debug version of each library
+, postprocSupport ? true # postprocessing
+, multithreadSupport ? true # multithreaded decoding & encoding
+, internalStatsSupport ? false # output of encoder internal stats for debug, if supported (encoders)
+, spatialResamplingSupport ? true # spatial sampling (scaling)
+, realtimeOnlySupport ? false # build for real-time encoding
+, ontheflyBitpackingSupport ? false # on-the-fly bitpacking in real-time encoding
+, errorConcealmentSupport ? false # decoder conceals losses
+, smallSupport ? false # favor smaller binary over speed
+, postprocVisualizerSupport ? false # macro block/block level visualizers
+, unitTestsSupport ? false, curl ? null, coreutils ? null # unit tests
+, webmIOSupport ? true # input from and output to webm container
+, libyuvSupport ? true # libyuv
+, decodePerfTestsSupport ? false # build decoder perf tests with unit tests
+, encodePerfTestsSupport ? false # build encoder perf tests with unit tests
+, multiResEncodingSupport ? false # multiple-resolution encoding
+, temporalDenoisingSupport ? true # use temporal denoising instead of spatial denoising
+, coefficientRangeCheckingSupport ? false # decoder checks if intermediate transform coefficients are in valid range
+, vp9HighbitdepthSupport ? true # 10/12 bit color support in VP9
+# Experimental features
+, experimentalSpatialSvcSupport ? false # Spatial scalable video coding
+, experimentalFpMbStatsSupport ? false
+, experimentalEmulateHardwareSupport ? false
+}:
+
+let
+  inherit (stdenv) is64bit isMips isDarwin isCygwin;
+  inherit (lib) enableFeature optional optionals;
+
+  # libvpx darwin targets include darwin version (ie. ARCH-darwinXX-gcc, XX being the darwin version)
+  # See all_platforms: https://github.com/webmproject/libvpx/blob/master/configure
+  # Darwin versions: 10.4=8, 10.5=9, 10.6=10, 10.7=11, 10.8=12, 10.9=13, 10.10=14
+  darwinVersion =
+    /**/ if stdenv.hostPlatform.osxMinVersion == "10.10" then "14"
+    else if stdenv.hostPlatform.osxMinVersion == "10.9"  then "13"
+    else if stdenv.hostPlatform.osxMinVersion == "10.8"  then "12"
+    else if stdenv.hostPlatform.osxMinVersion == "10.7"  then "11"
+    else if stdenv.hostPlatform.osxMinVersion == "10.6"  then "10"
+    else if stdenv.hostPlatform.osxMinVersion == "10.5"  then "9"
+    else "8";
+
+  kernel =
+    # Build system doesn't understand BSD, so pretend to be Linux.
+    /**/ if stdenv.isBSD then "linux"
+    else if stdenv.isDarwin then "darwin${darwinVersion}"
+    else stdenv.hostPlatform.parsed.kernel.name;
+
+in
+
+assert vp8DecoderSupport || vp8EncoderSupport || vp9DecoderSupport || vp9EncoderSupport;
+assert internalStatsSupport && (vp9DecoderSupport || vp9EncoderSupport) -> postprocSupport;
+/* If spatialResamplingSupport not enabled, build will fail with undeclared variable errors.
+   Variables called in vpx_scale/generic/vpx_scale.c are declared by vpx_scale/vpx_scale_rtcd.pl,
+   but is only executed if spatialResamplingSupport is enabled */
+assert spatialResamplingSupport;
+assert postprocVisualizerSupport -> postprocSupport;
+assert unitTestsSupport -> curl != null && coreutils != null;
+assert vp9HighbitdepthSupport -> (vp9DecoderSupport || vp9EncoderSupport);
+assert isCygwin -> unitTestsSupport && webmIOSupport && libyuvSupport;
+
+stdenv.mkDerivation rec {
+  pname = "libvpx";
+  version = "1.14.0";
+
+  src = fetchFromGitHub {
+    owner = "webmproject";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-duU1exUg7JiKCtZfNxyb/y40hxsXeTIMShf9YounTWA=";
+  };
+
+  postPatch = ''
+    patchShebangs --build \
+      build/make/*.sh \
+      build/make/*.pl \
+      build/make/*.pm \
+      test/*.sh \
+      configure
+
+    # When cross-compiling (for aarch64-multiplatform), the compiler errors out on these flags.
+    # Since they're 'just' warnings, it's fine to just remove them.
+    substituteInPlace configure \
+      --replace "check_add_cflags -Wparentheses-equality" "" \
+      --replace "check_add_cflags -Wunreachable-code-loop-increment" "" \
+      --replace "check_cflags -Wshorten-64-to-32 && add_cflags_only -Wshorten-64-to-32" ""
+  '';
+
+  outputs = [ "bin" "dev" "out" ];
+  setOutputFlags = false;
+
+  configurePlatforms = [];
+  configureFlags = [
+    (enableFeature (vp8EncoderSupport || vp8DecoderSupport) "vp8")
+    (enableFeature vp8EncoderSupport "vp8-encoder")
+    (enableFeature vp8DecoderSupport "vp8-decoder")
+    (enableFeature (vp9EncoderSupport || vp9DecoderSupport) "vp9")
+    (enableFeature vp9EncoderSupport "vp9-encoder")
+    (enableFeature vp9DecoderSupport "vp9-decoder")
+    (enableFeature extraWarningsSupport "extra-warnings")
+    (enableFeature werrorSupport "werror")
+    "--disable-install-docs"
+    (enableFeature examplesSupport "install-bins")
+    "--enable-install-libs"
+    "--disable-install-srcs"
+    (enableFeature debugSupport "debug")
+    (enableFeature gprofSupport "gprof")
+    (enableFeature gcovSupport "gcov")
+    # Required to build shared libraries
+    (enableFeature (!isCygwin) "pic")
+    (enableFeature optimizationsSupport "optimizations")
+    (enableFeature runtimeCpuDetectSupport "runtime-cpu-detect")
+    (enableFeature thumbSupport "thumb")
+    "--enable-libs"
+    (enableFeature examplesSupport "examples")
+    "--disable-docs"
+    "--as=yasm"
+    # Limit default decoder max to WHXGA
+    (if sizeLimitSupport then "--size-limit=5120x3200" else null)
+    "--disable-codec-srcs"
+    (enableFeature debugLibsSupport "debug-libs")
+    (enableFeature isMips "dequant-tokens")
+    (enableFeature isMips "dc-recon")
+    (enableFeature postprocSupport "postproc")
+    (enableFeature (postprocSupport && (vp9DecoderSupport || vp9EncoderSupport)) "vp9-postproc")
+    (enableFeature multithreadSupport "multithread")
+    (enableFeature internalStatsSupport "internal-stats")
+    (enableFeature spatialResamplingSupport "spatial-resampling")
+    (enableFeature realtimeOnlySupport "realtime-only")
+    (enableFeature ontheflyBitpackingSupport "onthefly-bitpacking")
+    (enableFeature errorConcealmentSupport "error-concealment")
+    # Shared libraries are only supported on ELF platforms
+    (if isDarwin || isCygwin then
+       "--enable-static --disable-shared"
+     else
+       "--enable-shared")
+    (enableFeature smallSupport "small")
+    (enableFeature postprocVisualizerSupport "postproc-visualizer")
+    (enableFeature unitTestsSupport "unit-tests")
+    (enableFeature webmIOSupport "webm-io")
+    (enableFeature libyuvSupport "libyuv")
+    (enableFeature decodePerfTestsSupport "decode-perf-tests")
+    (enableFeature encodePerfTestsSupport "encode-perf-tests")
+    (enableFeature multiResEncodingSupport "multi-res-encoding")
+    (enableFeature temporalDenoisingSupport "temporal-denoising")
+    (enableFeature (temporalDenoisingSupport && (vp9DecoderSupport || vp9EncoderSupport)) "vp9-temporal-denoising")
+    (enableFeature coefficientRangeCheckingSupport "coefficient-range-checking")
+    (enableFeature (vp9HighbitdepthSupport && is64bit) "vp9-highbitdepth")
+    (enableFeature (experimentalSpatialSvcSupport ||
+                    experimentalFpMbStatsSupport ||
+                    experimentalEmulateHardwareSupport) "experimental")
+  ] ++ optionals (stdenv.isBSD || stdenv.hostPlatform != stdenv.buildPlatform) [
+    "--force-target=${stdenv.hostPlatform.parsed.cpu.name}-${kernel}-gcc"
+    (lib.optionalString stdenv.hostPlatform.isCygwin "--enable-static-msvcrt")
+  ] # Experimental features
+    ++ optional experimentalSpatialSvcSupport "--enable-spatial-svc"
+    ++ optional experimentalFpMbStatsSupport "--enable-fp-mb-stats"
+    ++ optional experimentalEmulateHardwareSupport "--enable-emulate-hardware";
+
+  nativeBuildInputs = [ perl yasm ];
+
+  buildInputs = [ ]
+    ++ optionals unitTestsSupport [ coreutils curl ];
+
+  NIX_LDFLAGS = [
+    "-lpthread" # fixes linker errors
+  ];
+
+  enableParallelBuilding = true;
+
+  postInstall = ''moveToOutput bin "$bin" '';
+
+  meta = with lib; {
+    description = "WebM VP8/VP9 codec SDK";
+    homepage    = "https://www.webmproject.org/";
+    changelog   = "https://github.com/webmproject/libvpx/raw/v${version}/CHANGELOG";
+    license     = licenses.bsd3;
+    maintainers = with maintainers; [ codyopel ];
+    platforms   = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libvterm-neovim/default.nix b/nixpkgs/pkgs/development/libraries/libvterm-neovim/default.nix
new file mode 100644
index 000000000000..0e92d28046aa
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libvterm-neovim/default.nix
@@ -0,0 +1,35 @@
+{ lib
+, stdenv
+, fetchurl
+, perl
+, libtool
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libvterm-neovim";
+  # Releases are not tagged, look at commit history to find latest release
+  version = "0.3.3";
+
+  src = fetchurl {
+    url = "https://launchpad.net/libvterm/trunk/v${lib.versions.majorMinor version}/+download/libvterm-${version}.tar.gz";
+    hash = "sha256-CRVvQ90hKL00fL7r5Q2aVx0yxk4M8Y0hEZeUav9yJuA=";
+  };
+
+  nativeBuildInputs = [ perl libtool ];
+
+  makeFlags = [
+    "CC=${stdenv.cc.targetPrefix}cc"
+    "LIBTOOL=${libtool}/bin/libtool"
+    "PREFIX=$(out)"
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "VT220/xterm/ECMA-48 terminal emulator library";
+    homepage = "http://www.leonerd.org.uk/code/libvterm/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ rvolosatovs ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libvterm/default.nix b/nixpkgs/pkgs/development/libraries/libvterm/default.nix
new file mode 100644
index 000000000000..f1e217f2b3e5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libvterm/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchurl, pkg-config, glib, ncurses }:
+
+stdenv.mkDerivation rec {
+  pname = "libvterm";
+  version = "0.99.7";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libvterm/${pname}-${version}.tar.gz";
+    sha256 = "10gaqygmmwp0cwk3j8qflri5caf8vl3f7pwfl2svw5whv8wkn0k2";
+  };
+
+  preInstall = ''
+    mkdir -p $out/include $out/lib
+  '';
+
+  postPatch = ''
+    substituteInPlace Makefile \
+      --replace "gcc" "${stdenv.cc.targetPrefix}cc" \
+      --replace "ldconfig" "" \
+      --replace "/usr" "$out"
+
+    makeFlagsArray+=("PKG_CFG=`${stdenv.cc.targetPrefix}pkg-config --cflags glib-2.0`")
+  '';
+
+  # For headers
+  propagatedBuildInputs = [ glib ];
+
+  strictDeps = true;
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ ncurses ];
+
+  meta = with lib; {
+    homepage = "http://libvterm.sourceforge.net/";
+    description = "Terminal emulator library to mimic both vt100 and rxvt";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libwacom/default.nix b/nixpkgs/pkgs/development/libraries/libwacom/default.nix
new file mode 100644
index 000000000000..ed5413464e1d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libwacom/default.nix
@@ -0,0 +1,77 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, meson
+, ninja
+, glib
+, pkg-config
+, udev
+, libevdev
+, libgudev
+, libxml2
+, python3
+, valgrind
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libwacom";
+  version = "2.9.0";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "linuxwacom";
+    repo = "libwacom";
+    rev = "libwacom-${version}";
+    hash = "sha256-oM3dd22hQaAXdNoO2Q2JvO2lJCkmfw8f0NWxYcVT3lA=";
+  };
+
+  postPatch = ''
+    patchShebangs test/check-files-in-git.sh
+  '';
+
+  nativeBuildInputs = [
+    pkg-config
+    meson
+    ninja
+    python3
+  ];
+
+  buildInputs = [
+    glib
+    udev
+    libevdev
+    libgudev
+  ];
+
+  doCheck = stdenv.hostPlatform == stdenv.buildPlatform
+            && lib.meta.availableOn stdenv.hostPlatform valgrind
+            && !stdenv.hostPlatform.isPower  # one test times out
+  ;
+
+  mesonFlags = [
+    "-Dtests=${if doCheck then "enabled" else "disabled"}"
+  ];
+
+  checkInputs = [
+    libxml2
+  ];
+
+  nativeCheckInputs = [
+    valgrind
+    (python3.withPackages (ps: with ps; [
+      ps.libevdev
+      pytest
+      pyudev
+    ]))
+  ];
+
+  meta = with lib; {
+    platforms = platforms.linux;
+    homepage = "https://linuxwacom.github.io/";
+    changelog = "https://github.com/linuxwacom/libwacom/blob/${src.rev}/NEWS";
+    description = "Libraries, configuration, and diagnostic tools for Wacom tablets running under Linux";
+    maintainers = teams.freedesktop.members;
+    license = licenses.hpnd;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libwacom/surface.nix b/nixpkgs/pkgs/development/libraries/libwacom/surface.nix
new file mode 100644
index 000000000000..22707a375954
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libwacom/surface.nix
@@ -0,0 +1,37 @@
+{ lib
+, fetchFromGitHub
+, libwacom
+}:
+
+let
+  libwacom-surface = fetchFromGitHub {
+    owner = "linux-surface";
+    repo = "libwacom-surface";
+    rev = "v2.7.0-1";
+    hash = "sha256-LgJ8YFQQN05kyd6kxBakIIiGgZ9icW27xKK3Dz6TwLs=";
+  };
+in libwacom.overrideAttrs (old: {
+  pname = "libwacom-surface";
+
+  # These patches will not be included upstream:
+  # https://github.com/linux-surface/libwacom/issues/2
+  patches = old.patches or [ ] ++ map (p: "${libwacom-surface}/patches/v2/${p}") [
+    "0001-Add-support-for-BUS_VIRTUAL.patch"
+    "0002-Add-support-for-Intel-Management-Engine-bus.patch"
+    "0003-data-Add-Microsoft-Surface-Pro-3.patch"
+    "0004-data-Add-Microsoft-Surface-Pro-4.patch"
+    "0005-data-Add-Microsoft-Surface-Pro-5.patch"
+    "0006-data-Add-Microsoft-Surface-Pro-6.patch"
+    "0007-data-Add-Microsoft-Surface-Pro-7.patch"
+    "0008-data-Add-Microsoft-Surface-Book.patch"
+    "0009-data-Add-Microsoft-Surface-Book-2-13.5.patch"
+    "0010-data-Add-Microsoft-Surface-Book-2-15.patch"
+    "0011-data-Add-Microsoft-Surface-Book-3-13.5.patch"
+    "0012-data-Add-Microsoft-Surface-Book-3-15.patch"
+  ];
+
+  meta = old.meta // {
+    homepage = "https://github.com/linux-surface/libwacom-surface";
+    maintainers = with lib.maintainers; [ dotlambda ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libwbxml/default.nix b/nixpkgs/pkgs/development/libraries/libwbxml/default.nix
new file mode 100644
index 000000000000..b5dc8c18208a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libwbxml/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchFromGitHub, lib, cmake, expat }:
+
+stdenv.mkDerivation rec {
+  pname = "libwbxml";
+  version = "0.11.8";
+
+  src = fetchFromGitHub {
+    owner = "libwbxml";
+    repo = "libwbxml";
+    rev = "${pname}-${version}";
+    sha256 = "sha256-WCVKfIk6R2rVaz1SbJL9eLqNC0f4VzL74Sw2IKdDE9I=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ expat ];
+
+  postPatch = ''
+    sed -i 's/^SET.*$//' cmake/CMakeLists.txt
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/libwbxml/libwbxml";
+    description = "The WBXML Library (aka libwbxml) contains a library and its associated tools to Parse, Encode and Handle WBXML documents";
+    maintainers = with maintainers; [ mh ];
+    platforms = platforms.linux;
+    license = licenses.lgpl21Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libwebp/default.nix b/nixpkgs/pkgs/development/libraries/libwebp/default.nix
new file mode 100644
index 000000000000..2605dabf125a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libwebp/default.nix
@@ -0,0 +1,77 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, libtool
+, threadingSupport ? true # multi-threading
+, openglSupport ? false, freeglut, libGL, libGLU # OpenGL (required for vwebp)
+, pngSupport ? true, libpng # PNG image format
+, jpegSupport ? true, libjpeg # JPEG image format
+, tiffSupport ? true, libtiff # TIFF image format
+, gifSupport ? true, giflib # GIF image format
+, alignedSupport ? false # Force aligned memory operations
+, swap16bitcspSupport ? false # Byte swap for 16bit color spaces
+, experimentalSupport ? false # Experimental code
+, libwebpmuxSupport ? true # Build libwebpmux
+, libwebpdemuxSupport ? true # Build libwebpdemux
+, libwebpdecoderSupport ? true # Build libwebpdecoder
+
+# for passthru.tests
+, freeimage
+, gd
+, graphicsmagick
+, haskellPackages
+, imagemagick
+, imlib2
+, libjxl
+, opencv
+, python3
+, vips
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libwebp";
+  version = "1.3.2";
+
+  src = fetchFromGitHub {
+    owner  = "webmproject";
+    repo   = pname;
+    rev    = "v${version}";
+    hash   = "sha256-UYO2Fmm8nzQR8VBC26wEwWd3qZTD+6MHKcmKBoNcpEE=";
+  };
+
+  configureFlags = [
+    (lib.enableFeature threadingSupport "threading")
+    (lib.enableFeature openglSupport "gl")
+    (lib.enableFeature pngSupport "png")
+    (lib.enableFeature jpegSupport "jpeg")
+    (lib.enableFeature tiffSupport "tiff")
+    (lib.enableFeature gifSupport "gif")
+    (lib.enableFeature alignedSupport "aligned")
+    (lib.enableFeature swap16bitcspSupport "swap-16bit-csp")
+    (lib.enableFeature experimentalSupport "experimental")
+    (lib.enableFeature libwebpmuxSupport "libwebpmux")
+    (lib.enableFeature libwebpdemuxSupport "libwebpdemux")
+    (lib.enableFeature libwebpdecoderSupport "libwebpdecoder")
+  ];
+
+  nativeBuildInputs = [ autoreconfHook libtool ];
+  buildInputs = [ ]
+    ++ lib.optionals openglSupport [ freeglut libGL libGLU ]
+    ++ lib.optionals pngSupport [ libpng ]
+    ++ lib.optionals jpegSupport [ libjpeg ]
+    ++ lib.optionals tiffSupport [ libtiff ]
+    ++ lib.optionals gifSupport [ giflib ];
+
+  enableParallelBuilding = true;
+
+  passthru.tests = {
+    inherit freeimage gd graphicsmagick imagemagick imlib2 libjxl opencv vips;
+    inherit (python3.pkgs) pillow imread;
+    haskell-webp = haskellPackages.webp;
+  };
+
+  meta = with lib; {
+    description = "Tools and library for the WebP image format";
+    homepage = "https://developers.google.com/speed/webp/";
+    license = licenses.bsd3;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ ajs124 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libwebsockets/default.nix b/nixpkgs/pkgs/development/libraries/libwebsockets/default.nix
new file mode 100644
index 000000000000..af028888b23b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libwebsockets/default.nix
@@ -0,0 +1,73 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, openssl
+, zlib
+, libuv
+  # External poll is required for e.g. mosquitto, but discouraged by the maintainer.
+, withExternalPoll ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libwebsockets";
+  version = "4.3.3";
+
+  src = fetchFromGitHub {
+    owner = "warmcat";
+    repo = "libwebsockets";
+    rev = "v${version}";
+    hash = "sha256-IXA9NUh55GtZmn4BhCXntVdHcKZ34iZIJ/0wlySj0/M=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  buildInputs = [ openssl zlib libuv ];
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [
+    "-DLWS_WITH_PLUGINS=ON"
+    "-DLWS_WITH_IPV6=ON"
+    "-DLWS_WITH_SOCKS5=ON"
+    "-DDISABLE_WERROR=ON"
+    "-DLWS_BUILD_HASH=no_hash"
+  ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "-DLWS_WITHOUT_TESTAPPS=ON"
+  ++ lib.optional withExternalPoll "-DLWS_WITH_EXTERNAL_POLL=ON"
+  ++ (
+    if stdenv.hostPlatform.isStatic then
+      [ "-DLWS_WITH_SHARED=OFF" ]
+    else
+      [ "-DLWS_WITH_STATIC=OFF" "-DLWS_LINK_TESTAPPS_DYNAMIC=ON" ]
+  );
+
+  postInstall = ''
+    # Fix path that will be incorrect on move to "dev" output.
+    substituteInPlace "$out/lib/cmake/libwebsockets/LibwebsocketsTargets-release.cmake" \
+      --replace "\''${_IMPORT_PREFIX}" "$out"
+
+    # The package builds a few test programs that are not usually necessary.
+    # Move those to the dev output.
+    moveToOutput "bin/libwebsockets-test-*" "$dev"
+    moveToOutput "share/libwebsockets-test-*" "$dev"
+  '';
+
+  # $out/share/libwebsockets-test-server/plugins/libprotocol_*.so refers to crtbeginS.o
+  disallowedReferences = [ stdenv.cc.cc ];
+
+  meta = with lib; {
+    description = "Light, portable C library for websockets";
+    longDescription = ''
+      Libwebsockets is a lightweight pure C library built to
+      use minimal CPU and memory resources, and provide fast
+      throughput in both directions.
+    '';
+    homepage = "https://libwebsockets.org/";
+    # Relicensed from LGPLv2.1+ to MIT with 4.0. Licensing situation
+    # is tricky, see https://github.com/warmcat/libwebsockets/blob/main/LICENSE
+    license = with licenses; [ mit publicDomain bsd3 asl20 ];
+    maintainers = with maintainers; [ mindavi ];
+    platforms = platforms.all;
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/libwhereami/default.nix b/nixpkgs/pkgs/development/libraries/libwhereami/default.nix
new file mode 100644
index 000000000000..455e59d89718
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libwhereami/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, cmake, boost, curl, leatherman }:
+
+stdenv.mkDerivation rec {
+  pname = "libwhereami";
+  version = "0.5.0";
+
+  src = fetchFromGitHub {
+    sha256 = "05fc28dri2h858kxbvldk5b6wd5is3fjcdsiqj3nxf95i66bb3xp";
+    rev = version;
+    repo = "libwhereami";
+    owner = "puppetlabs";
+  };
+
+  env.NIX_CFLAGS_COMPILE = "-Wno-error";
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ boost curl leatherman ];
+
+  meta = with lib; {
+    inherit (src.meta) homepage;
+    description = "Library to report hypervisor information from inside a VM";
+    license = licenses.asl20;
+    maintainers = [ maintainers.womfoo ];
+    platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ]; # fails on aarch64
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/libwmf/default.nix b/nixpkgs/pkgs/development/libraries/libwmf/default.nix
new file mode 100644
index 000000000000..b42e09894db8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libwmf/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config
+, freetype, glib, imagemagick, libjpeg, libpng, libxml2, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libwmf";
+  version = "0.2.13";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "caolanm";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-vffohx57OvQKu8DfNXNBm9bPsA8KgkQWs/3mmFn7L6M=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ zlib imagemagick libpng glib freetype libjpeg libxml2 ];
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "WMF library from wvWare";
+    homepage = "https://wvware.sourceforge.net/libwmf.html";
+    downloadPage = "https://github.com/caolanm/libwmf/releases";
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libwnck/2.nix b/nixpkgs/pkgs/development/libraries/libwnck/2.nix
new file mode 100644
index 000000000000..a1f54006beb5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libwnck/2.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl, pkg-config, gtk2, intltool, xorg }:
+
+stdenv.mkDerivation rec {
+  pname = "libwnck";
+  version = "2.31.0";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "17isfjvrzgj5znld2a7zsk9vd39q9wnsysnw5jr8iz410z935xw3";
+  };
+
+  outputs = [ "out" "dev" "devdoc" ];
+  outputBin = "dev";
+
+  nativeBuildInputs = [ pkg-config intltool ];
+  buildInputs = [ gtk2 xorg.libX11 xorg.libXres ];
+  # ?another optional: startup-notification
+
+  configureFlags = [ "--disable-introspection" ]; # not needed anywhere AFAIK
+
+  meta = {
+    description = "A library for creating task lists and pagers";
+    homepage = "https://gitlab.gnome.org/GNOME/libwnck";
+    license = lib.licenses.lgpl21;
+    maintainers = with lib.maintainers; [ johnazoidberg ];
+    # ./xutils.h:31:10: fatal error: 'gdk/gdkx.h' file not found
+    # #include <gdk/gdkx.h>
+    broken = stdenv.isDarwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libwnck/default.nix b/nixpkgs/pkgs/development/libraries/libwnck/default.nix
new file mode 100644
index 000000000000..2f535930ed03
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libwnck/default.nix
@@ -0,0 +1,87 @@
+{ stdenv
+, lib
+, fetchurl
+, fetchpatch
+, meson
+, mesonEmulatorHook
+, ninja
+, pkg-config
+, gtk-doc
+, docbook_xsl
+, docbook_xml_dtd_412
+, libX11
+, glib
+, gtk3
+, pango
+, cairo
+, libXres
+, libstartup_notification
+, gettext
+, gobject-introspection
+, gnome
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libwnck";
+  version = "43.0";
+
+  outputs = [ "out" "dev" "devdoc" ];
+  outputBin = "dev";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.major version}/${pname}-${version}.tar.xz";
+    sha256 = "kFvNuFhH1rj4hh5WswzW3GHq5n7O9M2ZSp+SWiaiwf4=";
+  };
+
+  patches = [
+    # bamfdaemon crashes with libwnck3 43.0
+    # https://bugs.launchpad.net/ubuntu/+source/libwnck3/+bug/1990263
+    (fetchpatch {
+      url = "https://gitlab.gnome.org/GNOME/libwnck/-/commit/6ceb684442eb26e3bdb8a38bf52264ad55f96a7b.patch";
+      sha256 = "/1wCnElCrZB7XTDW/l3dxMKZ9czGnukbGu4/aQStoXE=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gettext
+    gobject-introspection
+    gtk-doc
+    docbook_xsl
+    docbook_xml_dtd_412
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
+  ];
+
+  buildInputs = [
+    libX11
+    libstartup_notification
+    pango
+    cairo
+    libXres
+  ];
+
+  propagatedBuildInputs = [
+    glib
+    gtk3
+  ];
+
+  mesonFlags = [
+    "-Dgtk_doc=true"
+  ];
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+    };
+  };
+
+  meta = with lib; {
+    description = "Library to manage X windows and workspaces (via pagers, tasklists, etc.)";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ liff ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libwpd/0.8.nix b/nixpkgs/pkgs/development/libraries/libwpd/0.8.nix
new file mode 100644
index 000000000000..abac656f8e47
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libwpd/0.8.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchurl, pkg-config, glib, libgsf, libxml2, bzip2 }:
+
+stdenv.mkDerivation rec {
+  pname = "libwpd";
+  version = "0.8.14";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libwpd/libwpd-${version}.tar.gz";
+    sha256 = "1syli6i5ma10cwzpa61a18pyjmianjwsf6pvmvzsh5md6yk4yx01";
+  };
+
+  patches = [ ./gcc-0.8.patch ];
+
+  buildInputs = [ glib libgsf libxml2 ];
+
+  nativeBuildInputs = [ pkg-config bzip2 ];
+
+  meta = with lib; {
+    description = "Library for importing WordPerfect documents";
+    homepage = "https://libwpd.sourceforge.net";
+    license = with licenses; [ lgpl21 mpl20 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libwpd/default.nix b/nixpkgs/pkgs/development/libraries/libwpd/default.nix
new file mode 100644
index 000000000000..99d81870cce0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libwpd/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchurl, zlib, pkg-config, glib, libgsf, libxml2, librevenge, boost }:
+
+stdenv.mkDerivation rec {
+  pname = "libwpd";
+  version = "0.10.3";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libwpd/libwpd-${version}.tar.xz";
+    hash = "sha256-JGWwtmL9xdTjvrzcmnkCdxP7Ypyiv/BKPJJR/exC3Qk=";
+  };
+
+  patches = [ ./gcc-1.0.patch ];
+
+  buildInputs = [ glib libgsf libxml2 zlib librevenge boost ];
+
+  nativeBuildInputs = [ pkg-config ];
+
+  meta = with lib; {
+    description = "A library for importing and exporting WordPerfect documents";
+    homepage = "https://libwpd.sourceforge.net/";
+    license = licenses.lgpl21;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libwpd/gcc-0.8.patch b/nixpkgs/pkgs/development/libraries/libwpd/gcc-0.8.patch
new file mode 100644
index 000000000000..05eb3293ed7c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libwpd/gcc-0.8.patch
@@ -0,0 +1,13 @@
+diff --git a/src/lib/WPXTable.h b/src/lib/WPXTable.h
+index 6d1e921..0234ad7 100644
+--- a/src/lib/WPXTable.h
++++ b/src/lib/WPXTable.h
+@@ -76,7 +76,7 @@ public:
+ 	WPXTableList & operator=(const WPXTableList & tableList);
+ 	virtual ~WPXTableList();
+ 
+-	WPXTable * operator[](size_t i) { return (*m_tableList)[i]; }
++	WPXTable * operator[](std::size_t i) { return (*m_tableList)[i]; }
+ 	void add(WPXTable *table) { m_tableList->push_back(table); }
+ 
+ private:
diff --git a/nixpkgs/pkgs/development/libraries/libwpd/gcc-1.0.patch b/nixpkgs/pkgs/development/libraries/libwpd/gcc-1.0.patch
new file mode 100644
index 000000000000..3059450b4531
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libwpd/gcc-1.0.patch
@@ -0,0 +1,12 @@
+diff -Naur libwpd-0.10.3/src/lib/WPXTable.h libwpd-0.10.3-modified/src/lib/WPXTable.h
+--- libwpd-0.10.3/src/lib/WPXTable.h	2018-12-25 16:19:19.000000000 +0000
++++ libwpd-0.10.3-modified/src/lib/WPXTable.h	2024-01-21 05:41:23.623457028 +0000
+@@ -53,7 +53,7 @@
+ 	~WPXTable();
+ 	void insertRow();
+ 	void insertCell(unsigned char colSpan, unsigned char rowSpan, unsigned char borderBits);
+-	const WPXTableCell  *getCell(size_t i, size_t j)
++	const WPXTableCell  *getCell(std::size_t i, std::size_t j)
+ 	{
+ 		return &(m_tableRows[i])[j];
+ 	}
diff --git a/nixpkgs/pkgs/development/libraries/libwpe/default.nix b/nixpkgs/pkgs/development/libraries/libwpe/default.nix
new file mode 100644
index 000000000000..9978082fc60e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libwpe/default.nix
@@ -0,0 +1,41 @@
+{ stdenv
+, lib
+, fetchurl
+, meson
+, pkg-config
+, libxkbcommon
+, libGL
+, ninja
+, libX11
+, webkitgtk
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libwpe";
+  version = "1.14.2";
+
+  src = fetchurl {
+    url = "https://wpewebkit.org/releases/libwpe-${version}.tar.xz";
+    sha256 = "sha256-iuOAIsUMs0DJb9vuEhfx5Gq1f7wci6mBQlZau+2+Iu8=";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+    meson
+    ninja
+  ];
+
+  buildInputs = [
+    libxkbcommon
+    libGL
+    libX11
+  ];
+
+  meta = with lib; {
+    description = "General-purpose library for WPE WebKit";
+    license = licenses.bsd2;
+    homepage = "https://wpewebkit.org";
+    maintainers = webkitgtk.meta.maintainers ++ (with maintainers; [ matthewbauer ]);
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libwpe/fdo.nix b/nixpkgs/pkgs/development/libraries/libwpe/fdo.nix
new file mode 100644
index 000000000000..3e2fada38c32
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libwpe/fdo.nix
@@ -0,0 +1,54 @@
+{ stdenv
+, lib
+, fetchurl
+, meson
+, pkg-config
+, ninja
+, wayland
+, libepoxy
+, glib
+, libwpe
+, libxkbcommon
+, libGL
+, libX11
+, webkitgtk
+ }:
+
+stdenv.mkDerivation rec {
+  pname = "wpebackend-fdo";
+  version = "1.14.2";
+
+  src = fetchurl {
+    url = "https://wpewebkit.org/releases/wpebackend-fdo-${version}.tar.xz";
+    sha256 = "k8l2aumGTurq7isKdPIsvKCN9CwaG9tVsIbyUo44DTg=";
+  };
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+    meson
+    ninja
+    wayland
+  ];
+
+  buildInputs = [
+    wayland
+    libepoxy
+    glib
+    libwpe
+    libxkbcommon
+    libGL
+    libX11
+  ];
+
+  meta = with lib; {
+    description = "Freedesktop.org backend for WPE WebKit";
+    license = licenses.bsd2;
+    homepage = "https://wpewebkit.org";
+    maintainers = webkitgtk.meta.maintainers ++ (with maintainers; [ matthewbauer ]);
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libwpg/default.nix b/nixpkgs/pkgs/development/libraries/libwpg/default.nix
new file mode 100644
index 000000000000..ada7f984a4a2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libwpg/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl, pkg-config, libwpd, zlib, librevenge, boost }:
+
+stdenv.mkDerivation rec {
+  pname = "libwpg";
+  version = "0.3.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libwpg/${pname}-${version}.tar.xz";
+    hash = "sha256-tV/alEDR4HBjDrJIfYuGl89BLCFKJ8runfac7HwATeM=";
+  };
+
+  buildInputs = [ libwpd zlib librevenge boost ];
+  nativeBuildInputs = [ pkg-config ];
+
+  meta = with lib; {
+    homepage = "https://libwpg.sourceforge.net";
+    description = "C++ library to parse WPG";
+    license = with licenses; [ lgpl21 mpl20 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libwps/default.nix b/nixpkgs/pkgs/development/libraries/libwps/default.nix
new file mode 100644
index 000000000000..f5af2e8284c8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libwps/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchurl, boost, pkg-config, librevenge, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "libwps";
+  version = "0.4.14";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libwps/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-xVEdlAngO446F50EZcHMKW7aBvyDcTVu9Egs2oaIadE=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ boost librevenge zlib ];
+
+  env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-fallthrough";
+
+  meta = with lib; {
+    homepage = "https://libwps.sourceforge.net/";
+    description = "Microsoft Works document format import filter library";
+    platforms = platforms.unix;
+    license = licenses.lgpl21;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libwtk-sdl2/default.nix b/nixpkgs/pkgs/development/libraries/libwtk-sdl2/default.nix
new file mode 100644
index 000000000000..bdfe404c547c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libwtk-sdl2/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+, boost
+, SDL2
+, SDL2_ttf
+, SDL2_image
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libwtk-sdl2";
+  version = "unstable-2023-02-28";
+
+  src = fetchFromGitHub {
+    owner = "muesli4";
+    repo = "libwtk-sdl2";
+    rev = "0504f8342c8c97d0c8b43d33751427c564ad8d44";
+    sha256 = "sha256-NAjsDQ4/hklYRfa85uleOr50tmc6UJVo2xiDnEbmIxk=";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+    autoreconfHook
+  ];
+  buildInputs = [
+    boost
+    SDL2
+    SDL2_ttf
+    SDL2_image
+  ];
+  # From some reason, this is needed as otherwise SDL.h is not found
+  NIX_CFLAGS_COMPILE = "-I${SDL2.dev}/include/SDL2";
+
+  outputs = [ "out" "dev" "lib" ];
+
+  meta = with lib; {
+    description = "Simplistic SDL2 GUI framework in early developement";
+    homepage = "https://github.com/muesli4/libwtk-sdl2";
+    # See: https://github.com/muesli4/mpd-touch-screen-gui/tree/master/LICENSES
+    license = licenses.lgpl3Plus;
+    maintainers = with maintainers; [ doronbehar ];
+    /* Partial darwin build failure log (from ofborg):
+    geometry.cpp:95:34: error: no member named 'abs' in namespace 'std'
+       >     return { std::abs(v.w), std::abs(v.h) };
+       >                             ~~~~~^
+    */
+    platforms = platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libx86/constants.patch b/nixpkgs/pkgs/development/libraries/libx86/constants.patch
new file mode 100644
index 000000000000..10fc829d6743
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libx86/constants.patch
@@ -0,0 +1,20 @@
+--- libx86/lrmi.c	2008-09-06 12:24:36.070136428 +0200
++++ libx86/lrmi.c	2008-09-06 12:28:10.584287458 +0200
+@@ -56,5 +56,17 @@
+ 
+ #if defined(__linux__)
++#ifndef TF_MASK
++#define TF_MASK X86_EFLAGS_TF
++#endif
++#ifndef IF_MASK
++#define IF_MASK X86_EFLAGS_IF
++#endif
++#ifndef IOPL_MASK
++#define IOPL_MASK X86_EFLAGS_IOPL
++#endif
++#ifndef VIF_MASK
++#define VIF_MASK X86_EFLAGS_VIF
++#endif
+ #define DEFAULT_VM86_FLAGS 	(IF_MASK | IOPL_MASK)
+ #elif defined(__NetBSD__) || defined(__FreeBSD__)
+ #define DEFAULT_VM86_FLAGS  (PSL_I | PSL_IOPL)
diff --git a/nixpkgs/pkgs/development/libraries/libx86/default.nix b/nixpkgs/pkgs/development/libraries/libx86/default.nix
new file mode 100644
index 000000000000..1abefa8f4374
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libx86/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libx86";
+  version = "1.1";
+  src = fetchurl {
+    url = "https://www.codon.org.uk/~mjg59/libx86/downloads/${pname}-${version}.tar.gz";
+    sha256 = "0j6h6bc02c6qi0q7c1ncraz4d1hkm5936r35rfsp4x1jrc233wav";
+  };
+  patches = [./constants.patch ./non-x86.patch ];
+
+  # using BACKEND=x86emu on 64bit systems fixes:
+  #  http://www.mail-archive.com/suspend-devel@lists.sourceforge.net/msg02355.html
+  makeFlags = [
+    "DESTDIR=$(out)"
+  ] ++ lib.optional (!stdenv.isi686) "BACKEND=x86emu";
+
+  preBuild = ''
+    sed -i lrmi.c -e 's@defined(__i386__)@(defined(__i386__) || defined(__x86_64__))@'
+    sed -e s@/usr@@ -i Makefile
+  '';
+
+  meta = with lib; {
+    description = "Real-mode x86 code emulator";
+    maintainers = with maintainers; [ raskin ];
+    platforms = [ "x86_64-linux" "i686-linux" ];
+    license = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libx86/non-x86.patch b/nixpkgs/pkgs/development/libraries/libx86/non-x86.patch
new file mode 100644
index 000000000000..286057c4ba87
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libx86/non-x86.patch
@@ -0,0 +1,38 @@
+diff -Naur libx86-1.1+ds1.orig/Makefile libx86-1.1+ds1/Makefile
+--- libx86-1.1+ds1.orig/Makefile	2008-05-19 12:28:59.000000000 +0300
++++ libx86-1.1+ds1/Makefile	2012-02-20 01:32:03.750068423 +0200
+@@ -5,6 +5,7 @@
+ ifeq ($(BACKEND),x86emu)
+ 	OBJECTS += thunk.o x86emu/decode.o x86emu/debug.o x86emu/fpu.o \
+ 	x86emu/ops.o x86emu/ops2.o x86emu/prim_ops.o x86emu/sys.o
++	CFLAGS += -DX86EMU -fno-delete-null-pointer-checks
+ else
+ 	OBJECTS += lrmi.o
+ endif
+diff -Naur libx86-1.1+ds1.orig/thunk.c libx86-1.1+ds1/thunk.c
+--- libx86-1.1+ds1.orig/thunk.c	2008-04-03 03:48:00.000000000 +0300
++++ libx86-1.1+ds1/thunk.c	2012-02-20 01:12:56.468820192 +0200
+@@ -32,6 +32,7 @@
+ #define TRUE 1
+ #define FALSE 0
+ 
++#ifndef X86EMU
+ #define __BUILDIO(bwl,bw,type) \
+ static inline void out##bwl##_local(unsigned long port, unsigned type value) {        __asm__ __volatile__("out" #bwl " %" #bw "0, %w1" : : "a"(value), "Nd"(port)); \
+ }\
+@@ -44,6 +45,15 @@
+ __BUILDIO(b,b,char)
+ __BUILDIO(w,w,short)
+ __BUILDIO(l,,int)
++#else
++/* use libc functions */
++#define inb_local inb
++#define inw_local inw
++#define inl_local inl
++#define outb_local outb
++#define outw_local outw
++#define outl_local outl
++#endif /* X86EMU */
+ 
+ 
+ char *mmap_addr = SHMERRORPTR;
diff --git a/nixpkgs/pkgs/development/libraries/libx86/src-for-default.nix b/nixpkgs/pkgs/development/libraries/libx86/src-for-default.nix
new file mode 100644
index 000000000000..b7e432d8109c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libx86/src-for-default.nix
@@ -0,0 +1,7 @@
+rec {
+   pname="libx86";
+   version="1.1";
+   hash="0j6h6bc02c6qi0q7c1ncraz4d1hkm5936r35rfsp4x1jrc233wav";
+   url="http://www.codon.org.uk/~mjg59/libx86/downloads/libx86-${version}.tar.gz";
+   advertisedUrl="http://www.codon.org.uk/~mjg59/libx86/downloads/libx86-${version}.tar.gz";
+}
diff --git a/nixpkgs/pkgs/development/libraries/libx86/src-info-for-default.nix b/nixpkgs/pkgs/development/libraries/libx86/src-info-for-default.nix
new file mode 100644
index 000000000000..9861e21f6559
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libx86/src-info-for-default.nix
@@ -0,0 +1,4 @@
+{
+  downloadPage = "http://www.codon.org.uk/~mjg59/libx86/downloads/?C=M;O=D";
+  baseName = "libx86";
+}
diff --git a/nixpkgs/pkgs/development/libraries/libx86emu/default.nix b/nixpkgs/pkgs/development/libraries/libx86emu/default.nix
new file mode 100644
index 000000000000..c4df61bd22bb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libx86emu/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub, perl }:
+
+stdenv.mkDerivation rec {
+  pname = "libx86emu";
+  version = "3.5";
+
+  src = fetchFromGitHub {
+    owner = "wfeldt";
+    repo = "libx86emu";
+    rev = version;
+    sha256 = "sha256-dKT/Ey+vardXu/+coaC69TTUXjJLsLBKgCx9VY8f0oY=";
+  };
+
+  nativeBuildInputs = [ perl ];
+
+  postUnpack = "rm $sourceRoot/git2log";
+  patchPhase = ''
+    # VERSION is usually generated using Git
+    echo "${version}" > VERSION
+    substituteInPlace Makefile --replace "/usr" "/"
+  '';
+
+  buildFlags = [ "shared" ];
+  enableParallelBuilding = true;
+
+  installFlags = [ "DESTDIR=$(out)" "LIBDIR=/lib" ];
+
+  meta = with lib; {
+    description = "x86 emulation library";
+    license = licenses.bsd2;
+    homepage = "https://github.com/wfeldt/libx86emu";
+    maintainers = with maintainers; [ bobvanderlinden ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libxc/default.nix b/nixpkgs/pkgs/development/libraries/libxc/default.nix
new file mode 100644
index 000000000000..b3f20d02c533
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libxc/default.nix
@@ -0,0 +1,49 @@
+{ lib, stdenv, fetchFromGitLab, cmake, gfortran, perl }:
+
+stdenv.mkDerivation rec {
+  pname = "libxc";
+  version = "6.2.2";
+
+  src = fetchFromGitLab {
+    owner = "libxc";
+    repo = "libxc";
+    rev = version;
+    hash = "sha256-JYhuyW95I7Q0edLIe7H//+ej5vh6MdAGxXjmNxDMuhQ=";
+  };
+
+  # Timeout increase has already been included upstream in master.
+  # Check upon updates if this can be removed.
+  postPatch = ''
+    substituteInPlace testsuite/CMakeLists.txt \
+        --replace "PROPERTIES TIMEOUT 1" "PROPERTIES TIMEOUT 30"
+  '';
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ perl cmake gfortran ];
+
+  preConfigure = ''
+    patchShebangs ./
+  '';
+
+  cmakeFlags = [
+    "-DENABLE_FORTRAN=ON"
+    "-DBUILD_SHARED_LIBS=ON"
+    "-DENABLE_XHOST=OFF"
+    # Force compilation of higher derivatives
+    "-DDISABLE_VXC=0"
+    "-DDISABLE_FXC=0"
+    "-DDISABLE_KXC=0"
+    "-DDISABLE_LXC=0"
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Library of exchange-correlation functionals for density-functional theory";
+    homepage = "https://www.tddft.org/programs/Libxc/";
+    license = licenses.mpl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ markuskowa ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libxcomp/default.nix b/nixpkgs/pkgs/development/libraries/libxcomp/default.nix
new file mode 100644
index 000000000000..b66fe5c5a21a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libxcomp/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, libjpeg, libpng, libX11, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "libxcomp";
+  version = "3.5.99.16";
+
+  src = fetchurl {
+    sha256 = "1m3z9w3h6qpgk265xf030w7lcs181jgw2cdyzshb7l97mn1f7hh2";
+    url = "https://code.x2go.org/releases/source/nx-libs/nx-libs-${version}-lite.tar.gz";
+  };
+
+  buildInputs = [ libjpeg libpng libX11 zlib ];
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  preAutoreconf = ''
+    cd nxcomp/
+    sed -i 's|/src/.libs/libXcomp.a|/src/.libs/libXcomp.la|' test/Makefile.am
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "NX compression library";
+    homepage = "http://wiki.x2go.org/doku.php/wiki:libs:nx-libs";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libxcrypt/check_passthru_matches.py b/nixpkgs/pkgs/development/libraries/libxcrypt/check_passthru_matches.py
new file mode 100644
index 000000000000..ebe728e9a69b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libxcrypt/check_passthru_matches.py
@@ -0,0 +1,70 @@
+import tarfile
+import sys
+
+
+def process_columns(line: list[str]) -> tuple[str, list[str]]:
+    match line:
+        case [name, h_prefix, nrbytes, flags]:
+            return (h_prefix, flags.lower().split(","))
+        case other:
+            raise Exception("Unsupported hashes.conf line format", other)
+
+
+def find_tar_file(tar: tarfile.TarFile, requested_name: str):
+    """Attempts to find a single file with given name in tarball."""
+    all_names = tar.getnames()
+
+    if requested_name in all_names:
+        return requested_name
+
+    requested_suffix = f"/{requested_name}"
+    candidate_names = [name for name in all_names if name.endswith(requested_suffix)]
+    match candidate_names:
+        case [real_name]:
+            return real_name
+        case other:
+            raise KeyError(
+                f"Could not locate a single {requested_name} in the contents of the tarball."
+            )
+
+
+hashes_path = "lib/hashes.conf"
+
+
+def main() -> None:
+    match sys.argv:
+        case [_name, src, enable_hashes, "--", *enabled_crypt_scheme_ids]:
+            pass
+        case other:
+            raise Exception(
+                "Incorrect number of arguments. Usage: check_passthru_matches.py <src> <enable_hashes> -- <enabled_crypt_scheme_ids...>"
+            )
+
+    with tarfile.open(src, "r") as tar:
+        real_hashes_path = find_tar_file(tar, hashes_path)
+        config = tar.extractfile(real_hashes_path).read().decode("utf-8")
+
+    formats = [
+        process_columns(columns)
+        for line in config.splitlines()
+        if not line.startswith("#") and len(columns := line.split()) > 0
+    ]
+    expected_supported_formats = set(
+        prefix
+        for (prefix, flags) in formats
+        if enable_hashes in flags or enable_hashes == "all"
+    )
+    passthru_supported_schemes = set(
+        f"${scheme}$" for scheme in enabled_crypt_scheme_ids
+    )
+
+    assert (
+        len(expected_supported_formats - passthru_supported_schemes) == 0
+    ), f"libxcrypt package enables the following crypt schemes that are not listed in passthru.enabledCryptSchemeIds: {expected_supported_formats - passthru_supported_schemes}"
+    assert (
+        len(passthru_supported_schemes - expected_supported_formats) == 0
+    ), f"libxcrypt package lists the following crypt schemes in passthru.enabledCryptSchemeIds that are not supported: {passthru_supported_schemes - expected_supported_formats}"
+
+
+if __name__ == "__main__":
+    main()
diff --git a/nixpkgs/pkgs/development/libraries/libxcrypt/default.nix b/nixpkgs/pkgs/development/libraries/libxcrypt/default.nix
new file mode 100644
index 000000000000..067141883977
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libxcrypt/default.nix
@@ -0,0 +1,71 @@
+{ lib, stdenv, fetchurl, perl
+# Update the enabled crypt scheme ids in passthru when the enabled hashes change
+, enableHashes ? "strong"
+, nixosTests
+, runCommand
+, python3
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libxcrypt";
+  version = "4.4.36";
+
+  src = fetchurl {
+    url = "https://github.com/besser82/libxcrypt/releases/download/v${finalAttrs.version}/libxcrypt-${finalAttrs.version}.tar.xz";
+    hash = "sha256-5eH0yu4KAd4q7ibjE4gH1tPKK45nKHlm0f79ZeH9iUM=";
+  };
+
+  outputs = [
+    "out"
+    "man"
+  ];
+
+  configureFlags = [
+    "--enable-hashes=${enableHashes}"
+    "--enable-obsolete-api=glibc"
+    "--disable-failure-tokens"
+    # required for musl, android, march=native
+    "--disable-werror"
+  ];
+
+  # fixes: can't build x86_64-w64-mingw32 shared library unless -no-undefined is specified
+  makeFlags = lib.optionals stdenv.hostPlatform.isWindows [ "LDFLAGS=-no-undefined"] ;
+
+  nativeBuildInputs = [
+    perl
+  ];
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  passthru = {
+    tests = {
+      inherit (nixosTests) login shadow;
+
+      passthruMatches = runCommand "libxcrypt-test-passthru-matches" { } ''
+        ${python3.interpreter} "${./check_passthru_matches.py}" ${lib.escapeShellArgs ([ finalAttrs.src enableHashes "--" ] ++ finalAttrs.passthru.enabledCryptSchemeIds)}
+        touch "$out"
+      '';
+    };
+    enabledCryptSchemeIds = [
+      # https://github.com/besser82/libxcrypt/blob/v4.4.35/lib/hashes.conf
+      "y"   # yescrypt
+      "gy"  # gost_yescrypt
+      "7"   # scrypt
+      "2b"  # bcrypt
+      "2y"  # bcrypt_y
+      "2a"  # bcrypt_a
+      "6"   # sha512crypt
+    ];
+  };
+
+  meta = with lib; {
+    changelog = "https://github.com/besser82/libxcrypt/blob/v${finalAttrs.version}/NEWS";
+    description = "Extended crypt library for descrypt, md5crypt, bcrypt, and others";
+    homepage = "https://github.com/besser82/libxcrypt/";
+    platforms = platforms.all;
+    maintainers = with maintainers; [ dottedmag hexa ];
+    license = licenses.lgpl21Plus;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libxdg-basedir/default.nix b/nixpkgs/pkgs/development/libraries/libxdg-basedir/default.nix
new file mode 100644
index 000000000000..7786ec7908ff
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libxdg-basedir/default.nix
@@ -0,0 +1,29 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libxdg-basedir";
+  version = "1.2.3";
+
+  src = fetchFromGitHub {
+    owner = "devnev";
+    repo = pname;
+    rev = "refs/tags/libxdg-basedir-${version}";
+    hash = "sha256-ewtUKDdE6k9Q9hglWwhbTU3DTxvIN41t+zf2Gch9Dkk=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  meta = with lib; {
+    description = "Implementation of the XDG Base Directory specification";
+    homepage = "https://github.com/devnev/libxdg-basedir";
+    license = licenses.mit;
+    maintainers = with maintainers; [ nickcao ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libxkbcommon/default.nix b/nixpkgs/pkgs/development/libraries/libxkbcommon/default.nix
new file mode 100644
index 000000000000..b4683f673fba
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libxkbcommon/default.nix
@@ -0,0 +1,72 @@
+{ lib
+, stdenv
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, bison
+, doxygen
+, xkeyboard_config
+, libxcb
+, libxml2
+, python3
+, libX11
+  # To enable the "interactive-wayland" subcommand of xkbcli. This is the
+  # wayland equivalent of `xev` on X11.
+, withWaylandTools ? stdenv.isLinux
+, wayland
+, wayland-protocols
+, wayland-scanner
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libxkbcommon";
+  version = "1.5.0";
+
+  src = fetchurl {
+    url = "https://xkbcommon.org/download/${pname}-${version}.tar.xz";
+    sha256 = "sha256-Vg8RxLu8oQ9JXz7306aqTKYrT4+wtS59RZ0Yom5G4Bc=";
+  };
+
+  outputs = [ "out" "dev" "doc" ];
+
+  depsBuildBuild = [ pkg-config ];
+  nativeBuildInputs = [ meson ninja pkg-config bison doxygen ]
+    ++ lib.optional withWaylandTools wayland-scanner;
+  buildInputs = [ xkeyboard_config libxcb libxml2 ]
+    ++ lib.optionals withWaylandTools [ wayland wayland-protocols ];
+  nativeCheckInputs = [ python3 ];
+
+  mesonFlags = [
+    "-Dxkb-config-root=${xkeyboard_config}/etc/X11/xkb"
+    "-Dxkb-config-extra-path=/etc/xkb" # default=$sysconfdir/xkb ($out/etc)
+    "-Dx-locale-root=${libX11.out}/share/X11/locale"
+    "-Denable-wayland=${lib.boolToString withWaylandTools}"
+  ];
+
+  doCheck = true;
+  preCheck = ''
+    patchShebangs ../test/
+  '';
+
+  meta = with lib; {
+    description = "A library to handle keyboard descriptions";
+    longDescription = ''
+      libxkbcommon is a keyboard keymap compiler and support library which
+      processes a reduced subset of keymaps as defined by the XKB (X Keyboard
+      Extension) specification. It also contains a module for handling Compose
+      and dead keys.
+    ''; # and a separate library for listing available keyboard layouts.
+    homepage = "https://xkbcommon.org";
+    changelog = "https://github.com/xkbcommon/libxkbcommon/blob/xkbcommon-${version}/NEWS";
+    license = licenses.mit;
+    maintainers = with maintainers; [ primeos ttuegel ];
+    mainProgram = "xkbcli";
+    platforms = with platforms; unix;
+    pkgConfigModules = [
+      "xkbcommon"
+      "xkbcommon-x11"
+      "xkbregistry"
+    ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libxklavier/default.nix b/nixpkgs/pkgs/development/libraries/libxklavier/default.nix
new file mode 100644
index 000000000000..3fa295279f0c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libxklavier/default.nix
@@ -0,0 +1,50 @@
+{ lib, stdenv, fetchgit, fetchpatch, autoreconfHook, pkg-config, gtk-doc, xkeyboard_config, libxml2, xorg, docbook_xsl
+, glib, isocodes, gobject-introspection
+, withDoc ? (stdenv.buildPlatform == stdenv.hostPlatform)
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libxklavier";
+  version = "5.4";
+
+  src = fetchgit {
+    url = "https://gitlab.freedesktop.org/archived-projects/libxklavier.git";
+    rev = "${pname}-${version}";
+    sha256 = "1w1x5mrgly2ldiw3q2r6y620zgd89gk7n90ja46775lhaswxzv7a";
+  };
+
+  patches = [
+    ./honor-XKB_CONFIG_ROOT.patch
+  ] ++ lib.optionals stdenv.isDarwin [
+    (fetchpatch {
+      url = "https://gitlab.freedesktop.org/archived-projects/libxklavier/-/commit/1387c21a788ec1ea203c8392ea1460fc29d83f70.patch";
+      sha256 = "sha256-fyWu7sVfDv/ozjhLSLCVsv+iNFawWgJqHUsQHHSkQn4=";
+    })
+  ];
+
+  outputs = [ "out" "dev" ] ++ lib.optionals withDoc [ "devdoc" ];
+
+  # TODO: enable xmodmap support, needs xmodmap DB
+  propagatedBuildInputs = with xorg; [ libX11 libXi xkeyboard_config libxml2 libICE glib libxkbfile isocodes ];
+
+  nativeBuildInputs = [ autoreconfHook pkg-config gtk-doc docbook_xsl gobject-introspection ];
+
+  preAutoreconf = ''
+    export NOCONFIGURE=1
+    gtkdocize
+  '';
+
+  configureFlags = [
+    "--with-xkb-base=${xkeyboard_config}/etc/X11/xkb"
+    "--with-xkb-bin-base=${xorg.xkbcomp}/bin"
+    "--disable-xmodmap-support"
+    "${if withDoc then "--enable-gtk-doc" else "--disable-gtk-doc"}"
+  ];
+
+  meta = with lib; {
+    description = "Library providing high-level API for X Keyboard Extension known as XKB";
+    homepage = "http://freedesktop.org/wiki/Software/LibXklavier";
+    license = licenses.lgpl2Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libxklavier/honor-XKB_CONFIG_ROOT.patch b/nixpkgs/pkgs/development/libraries/libxklavier/honor-XKB_CONFIG_ROOT.patch
new file mode 100644
index 000000000000..93b768eeb202
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libxklavier/honor-XKB_CONFIG_ROOT.patch
@@ -0,0 +1,89 @@
+From 999a419f4b36764a7269650a7f965d48bd4b73f7 Mon Sep 17 00:00:00 2001
+From: Louis Bettens <louis@bettens.info>
+Date: Sat, 28 Dec 2019 14:30:58 +0100
+Subject: [PATCH] honor $XKB_CONFIG_ROOT
+
+---
+ libxklavier/xklavier_config_xkb.c | 30 +++++++++++++++++++++++++-----
+ 1 file changed, 25 insertions(+), 5 deletions(-)
+
+diff --git a/libxklavier/xklavier_config_xkb.c b/libxklavier/xklavier_config_xkb.c
+index baec569..00e8de5 100644
+--- a/libxklavier/xklavier_config_xkb.c
++++ b/libxklavier/xklavier_config_xkb.c
+@@ -45,6 +45,18 @@
+ #define XK_XKB_KEYS
+ #include <X11/keysymdef.h>
+ 
++static const gchar *
++xkl_xkb_get_base_path(void)
++{
++	const gchar *base_path;
++
++	base_path = g_getenv ("XKB_CONFIG_ROOT");
++	if (!base_path)
++		base_path = XKB_BASE;
++
++	return base_path;
++}
++
+ #ifdef LIBXKBFILE_PRESENT
+ static XkbRF_RulesPtr xkl_rules;
+ 
+@@ -65,7 +77,8 @@ xkl_rules_set_load(XklEngine * engine)
+ 
+ 	locale = setlocale(LC_ALL, NULL);
+ 
+-	g_snprintf(file_name, sizeof file_name, XKB_BASE "/rules/%s", rf);
++	g_snprintf(file_name, sizeof file_name, "%s/rules/%s",
++		   xkl_xkb_get_base_path(), rf);
+ 	xkl_debug(160, "Loading rules from [%s]\n", file_name);
+ 
+ 	rules_set = XkbRF_Load(file_name, locale, True, True);
+@@ -98,10 +111,14 @@ gboolean
+ xkl_xkb_load_config_registry(XklConfigRegistry * config,
+ 			     gboolean if_extras_needed)
+ {
+-	return xkl_config_registry_load_helper(config,
++	const gchar *rules_path = g_strdup_printf("%s/rules",
++					  xkl_xkb_get_base_path());
++	gboolean ok = xkl_config_registry_load_helper(config,
+ 					       XKB_DEFAULT_RULESET,
+-					       XKB_BASE "/rules",
++					       rules_path,
+ 					       if_extras_needed);
++	g_free(rules_path);
++	return ok;
+ }
+ 
+ #ifdef LIBXKBFILE_PRESENT
+@@ -249,6 +266,7 @@ xkl_config_get_keyboard(XklEngine * engine,
+ 		pid_t cpid, pid;
+ 		int status = 0;
+ 		FILE *tmpxkb;
++		const gchar *opt_I;
+ 
+ 		xkl_debug(150, "tmp XKB/XKM file names: [%s]/[%s]\n",
+ 			  xkb_fn, xkm_fn);
+@@ -296,14 +314,16 @@ xkl_config_get_keyboard(XklEngine * engine,
+ 				break;
+ 			case 0:
+ 				/* child */
++				opt_I = g_strdup_printf("-I%s", xkl_xkb_get_base_path());
+ 				xkl_debug(160, "Executing %s\n", XKBCOMP);
+ 				xkl_debug(160, "%s %s %s %s %s %s %s %s\n",
+ 					  XKBCOMP, XKBCOMP, "-w0", "-I",
+-					  "-I" XKB_BASE, "-xkm", xkb_fn,
++					  opt_I, "-xkm", xkb_fn,
+ 					  xkm_fn);
+ 				execl(XKBCOMP, XKBCOMP, "-w0", "-I",
+-				      "-I" XKB_BASE, "-xkm", xkb_fn,
++				      opt_I, "-xkm", xkb_fn,
+ 				      xkm_fn, NULL);
++				g_free(opt_I);
+ 				xkl_debug(0, "Could not exec %s: %d\n",
+ 					  XKBCOMP, errno);
+ 				exit(1);
+-- 
+2.24.1
+
diff --git a/nixpkgs/pkgs/development/libraries/libxl/default.nix b/nixpkgs/pkgs/development/libraries/libxl/default.nix
new file mode 100644
index 000000000000..601c27c98eed
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libxl/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libxl";
+  version = "3.9.4.3";
+
+  src = fetchurl {
+    url = "https://www.libxl.com/download/${pname}-lin-${version}.tar.gz";
+    sha256 = "sha256-U8hXoqBzjSGigOXc29LZQk3KrGiYvBPBJPg5qihcAsY=";
+  };
+
+  dontConfigure = true;
+  dontBuild = true;
+
+  installPhase = ''
+    mkdir $out
+    cp -rva include_c include_cpp license.txt $out/
+    cp -rva lib64 $out/lib
+  '';
+
+  meta = with lib; {
+    description = "A library for parsing Excel files";
+    homepage    = "https://www.libxl.com/";
+    license     = licenses.unfree;
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [  ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libxls/default.nix b/nixpkgs/pkgs/development/libraries/libxls/default.nix
new file mode 100644
index 000000000000..4c9b77d7c387
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libxls/default.nix
@@ -0,0 +1,42 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, autoconf-archive }:
+
+stdenv.mkDerivation rec {
+  pname = "libxls";
+  version = "1.6.2";
+
+  src = fetchFromGitHub {
+    owner = "libxls";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-vjmYByk+IDBon8xGR1+oNaEQTiJK+IVpDXsG1IyVNoY=";
+  };
+
+  patches = [
+    # Fix cross-compilation
+    (fetchpatch {
+      url = "https://github.com/libxls/libxls/commit/007e63c1f5e19bc73292f267c85d7dd14e9ecb38.patch";
+      sha256 = "sha256-PjPHuXth4Yaq9nVfk5MYJMRo5B0R6YA1KEqgwfjF3PM=";
+    })
+  ];
+
+  nativeBuildInputs = [ autoreconfHook autoconf-archive ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Extract Cell Data From Excel xls files";
+    homepage = "https://github.com/libxls/libxls";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ abbradar ];
+    mainProgram = "xls2csv";
+    platforms = platforms.unix;
+    knownVulnerabilities = [
+      "CVE-2023-38851"
+      "CVE-2023-38852"
+      "CVE-2023-38853"
+      "CVE-2023-38854"
+      "CVE-2023-38855"
+      "CVE-2023-38856"
+    ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libxlsxwriter/default.nix b/nixpkgs/pkgs/development/libraries/libxlsxwriter/default.nix
new file mode 100644
index 000000000000..3716090a30d7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libxlsxwriter/default.nix
@@ -0,0 +1,49 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, minizip
+, python3
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libxlsxwriter";
+  version = "1.1.5";
+
+  src = fetchFromGitHub {
+    owner = "jmcnamara";
+    repo = "libxlsxwriter";
+    rev = "RELEASE_${version}";
+    hash = "sha256-fC03LwZIUkEsAs9TN0n2z0iSOGPAtVCeuW5rxC7Ek7Q=";
+  };
+
+  nativeBuildInputs = [
+    python3.pkgs.pytest
+  ];
+
+  buildInputs = [
+    minizip
+    zlib
+  ];
+
+  makeFlags = [
+    "PREFIX=${placeholder "out"}"
+    "USE_SYSTEM_MINIZIP=1"
+  ];
+
+  # TEST 428/429 worksheet:worksheet_table15 *** buffer overflow detected ***: terminated
+  hardeningDisable = [ "fortify3" ];
+
+  doCheck = true;
+
+  checkTarget = "test";
+
+  meta = with lib; {
+    description = "C library for creating Excel XLSX files";
+    homepage = "https://libxlsxwriter.github.io/";
+    changelog = "https://github.com/jmcnamara/libxlsxwriter/blob/${src.rev}/Changes.txt";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ dotlambda ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libxmi/default.nix b/nixpkgs/pkgs/development/libraries/libxmi/default.nix
new file mode 100644
index 000000000000..2d2a0089c443
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libxmi/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchurl, libtool }:
+
+stdenv.mkDerivation rec {
+  pname = "libxmi";
+  version = "1.2";
+
+  src = fetchurl {
+    url = "mirror://gnu/libxmi/${pname}-${version}.tar.gz";
+    sha256 = "03d4ikh29l38rl1wavb0icw7m5pp7yilnv7bb2k8qij1dinsymlx";
+  };
+
+  # For the x86_64 GNU/Linux arch to be recognized by 'configure'
+  preConfigure = "cp ${libtool}/share/libtool/build-aux/config.sub .";
+
+  meta = {
+    description = "Library for rasterizing 2-D vector graphics";
+    homepage = "https://www.gnu.org/software/libxmi/";
+    license = lib.licenses.gpl2Plus;
+    platforms = lib.platforms.unix;
+    maintainers = [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libxml2/default.nix b/nixpkgs/pkgs/development/libraries/libxml2/default.nix
new file mode 100644
index 000000000000..ce7e51c04f48
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libxml2/default.nix
@@ -0,0 +1,146 @@
+{ stdenv
+, lib
+, fetchurl
+, zlib
+, pkg-config
+, autoreconfHook
+, xz
+, libintl
+, python
+, gettext
+, ncurses
+, findXMLCatalogs
+, libiconv
+# Python limits cross-compilation to an allowlist of host OSes.
+# https://github.com/python/cpython/blob/dfad678d7024ab86d265d84ed45999e031a03691/configure.ac#L534-L562
+, pythonSupport ? enableShared &&
+    (stdenv.hostPlatform == stdenv.buildPlatform || stdenv.hostPlatform.isCygwin || stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isWasi)
+, icuSupport ? false
+, icu
+, enableShared ? !stdenv.hostPlatform.isMinGW && !stdenv.hostPlatform.isStatic
+, enableStatic ? !enableShared
+, gnome
+}:
+
+let
+  # Newer versions fail with minimal python, probably because
+  # https://gitlab.gnome.org/GNOME/libxml2/-/commit/b706824b612adb2c8255819c9a55e78b52774a3c
+  # This case is encountered "temporarily" during stdenv bootstrapping on darwin.
+  # Beware that the old version has known security issues, so the final set shouldn't use it.
+  oldVer = python.pname == "python3-minimal";
+in
+  assert oldVer -> stdenv.isDarwin; # reduce likelihood of using old libxml2 unintentionally
+
+let
+libxml = stdenv.mkDerivation rec {
+  pname = "libxml2";
+  version = "2.12.4";
+
+  outputs = [ "bin" "dev" "out" "doc" ]
+    ++ lib.optional pythonSupport "py"
+    ++ lib.optional (enableStatic && enableShared) "static";
+  outputMan = "bin";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/libxml2/${lib.versions.majorMinor version}/libxml2-${version}.tar.xz";
+    hash = "sha256-SXNg5CPPC9merNt8YhXeqS5tbonulAOTwrrg53y5t9A=";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    pkg-config
+    autoreconfHook
+  ];
+
+  buildInputs = lib.optionals pythonSupport [
+    python
+  ] ++ lib.optionals (pythonSupport && python?isPy2 && python.isPy2) [
+    gettext
+  ] ++ lib.optionals (pythonSupport && python?isPy3 && python.isPy3) [
+    ncurses
+  ] ++ lib.optionals (stdenv.isDarwin && pythonSupport && python?isPy2 && python.isPy2) [
+    libintl
+  ] ++ lib.optionals stdenv.isFreeBSD [
+    # Libxml2 has an optional dependency on liblzma.  However, on impure
+    # platforms, it may end up using that from /usr/lib, and thus lack a
+    # RUNPATH for that, leading to undefined references for its users.
+    xz
+  ];
+
+  propagatedBuildInputs = [
+    zlib
+    findXMLCatalogs
+  ] ++ lib.optionals stdenv.isDarwin [
+    libiconv
+  ] ++ lib.optionals icuSupport [
+    icu
+  ];
+
+  configureFlags = [
+    "--exec-prefix=${placeholder "dev"}"
+    (lib.enableFeature enableStatic "static")
+    (lib.enableFeature enableShared "shared")
+    (lib.withFeature icuSupport "icu")
+    (lib.withFeature pythonSupport "python")
+    (lib.optionalString pythonSupport "PYTHON=${python.pythonOnBuildForHost.interpreter}")
+  ];
+
+  installFlags = lib.optionals pythonSupport [
+    "pythondir=\"${placeholder "py"}/${python.sitePackages}\""
+    "pyexecdir=\"${placeholder "py"}/${python.sitePackages}\""
+  ];
+
+  enableParallelBuilding = true;
+
+  doCheck =
+    (stdenv.hostPlatform == stdenv.buildPlatform) &&
+    stdenv.hostPlatform.libc != "musl";
+  preCheck = lib.optional stdenv.isDarwin ''
+    export DYLD_LIBRARY_PATH="$PWD/.libs:$DYLD_LIBRARY_PATH"
+  '';
+
+  preConfigure = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") ''
+    MACOSX_DEPLOYMENT_TARGET=10.16
+  '';
+
+  preInstall = lib.optionalString pythonSupport ''
+    substituteInPlace python/libxml2mod.la --replace "$dev/${python.sitePackages}" "$py/${python.sitePackages}"
+  '';
+
+  postFixup = ''
+    moveToOutput bin/xml2-config "$dev"
+    moveToOutput lib/xml2Conf.sh "$dev"
+  '' + lib.optionalString (enableStatic && enableShared) ''
+    moveToOutput lib/libxml2.a "$static"
+  '';
+
+  passthru = {
+    inherit version;
+    pythonSupport = pythonSupport;
+
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "none";
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://gitlab.gnome.org/GNOME/libxml2";
+    description = "XML parsing library for C";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ eelco jtojnar ];
+  };
+};
+in
+if oldVer then
+  libxml.overrideAttrs (attrs: rec {
+    version = "2.10.1";
+    src = fetchurl {
+      url = "mirror://gnome/sources/libxml2/${lib.versions.majorMinor version}/libxml2-${version}.tar.xz";
+      sha256 = "21a9e13cc7c4717a6c36268d0924f92c3f67a1ece6b7ff9d588958a6db9fb9d8";
+    };
+  })
+else
+  libxml
diff --git a/nixpkgs/pkgs/development/libraries/libxmlb/default.nix b/nixpkgs/pkgs/development/libraries/libxmlb/default.nix
new file mode 100644
index 000000000000..522d3546b8e0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libxmlb/default.nix
@@ -0,0 +1,79 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, docbook_xml_dtd_43
+, docbook-xsl-nons
+, glib
+, gobject-introspection
+, gtk-doc
+, meson
+, ninja
+, pkg-config
+, python3
+, shared-mime-info
+, nixosTests
+, xz
+, zstd
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libxmlb";
+  version = "0.3.15";
+
+  outputs = [ "out" "lib" "dev" "devdoc" "installedTests" ];
+
+  src = fetchFromGitHub {
+    owner = "hughsie";
+    repo = "libxmlb";
+    rev = version;
+    hash = "sha256-S0wBVhfRa81mAmqpYYAKAyKLnfnVsXJEcGA21i5tdzo=";
+  };
+
+  patches = [
+    ./installed-tests-path.patch
+  ];
+
+  nativeBuildInputs = [
+    docbook_xml_dtd_43
+    docbook-xsl-nons
+    gobject-introspection
+    gtk-doc
+    meson
+    ninja
+    pkg-config
+    python3
+    shared-mime-info
+  ];
+
+  buildInputs = [
+    glib
+    xz
+    zstd
+  ];
+
+  mesonFlags = [
+    "--libexecdir=${placeholder "out"}/libexec"
+    "-Dgtkdoc=true"
+    "-Dinstalled_test_prefix=${placeholder "installedTests"}"
+  ];
+
+  preCheck = ''
+    export XDG_DATA_DIRS=$XDG_DATA_DIRS:${shared-mime-info}/share
+  '';
+
+  doCheck = true;
+
+  passthru = {
+    tests = {
+      installed-tests = nixosTests.installed-tests.libxmlb;
+    };
+  };
+
+  meta = with lib; {
+    description = "A library to help create and query binary XML blobs";
+    homepage = "https://github.com/hughsie/libxmlb";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libxmlb/installed-tests-path.patch b/nixpkgs/pkgs/development/libraries/libxmlb/installed-tests-path.patch
new file mode 100644
index 000000000000..e9bd27e1fff1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libxmlb/installed-tests-path.patch
@@ -0,0 +1,20 @@
+--- a/meson.build
++++ b/meson.build
+@@ -111,7 +111,7 @@ else
+   datadir = join_paths(prefix, get_option('datadir'))
+   libexecdir = join_paths(prefix, get_option('libexecdir'))
+-  installed_test_bindir = join_paths(libexecdir, 'installed-tests', meson.project_name())
+-  installed_test_datadir = join_paths(datadir, 'installed-tests', meson.project_name())
++  installed_test_bindir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests', meson.project_name())
++  installed_test_datadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests', meson.project_name())
+ endif
+ 
+ gio = dependency('gio-2.0', version : '>= 2.45.8')
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -3,4 +3,5 @@ option('introspection', type : 'boolean', value : true, description : 'generate
+ option('tests', type : 'boolean', value : true, description : 'enable tests')
+ option('stemmer', type : 'boolean', value : false, description : 'enable stemmer support')
+ option('cli', type : 'boolean', value : true, description : 'build and install the xb-tool CLI')
+ option('zstd', type : 'boolean', value : true, description : 'enable zstd support')
++option('installed_test_prefix', type: 'string', value: '', description: 'Prefix for installed tests')
diff --git a/nixpkgs/pkgs/development/libraries/libxmlxx/default.nix b/nixpkgs/pkgs/development/libraries/libxmlxx/default.nix
new file mode 100644
index 000000000000..9ec4090f60f0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libxmlxx/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchurl, pkg-config, libxml2, glibmm, perl, gnome }:
+
+stdenv.mkDerivation rec {
+  pname = "libxml++";
+  version = "2.40.1";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "1sb3akryklvh2v6m6dihdnbpf1lkx441v972q9hlz1sq6bfspm2a";
+  };
+
+  configureFlags = [
+    # remove if library is updated
+    "CXXFLAGS=-std=c++11"
+  ];
+
+  outputs = [ "out" "devdoc" ];
+
+  nativeBuildInputs = [ pkg-config perl ];
+
+  propagatedBuildInputs = [ libxml2 glibmm ];
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      attrPath = "libxmlxx";
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+      freeze = true;
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://libxmlplusplus.sourceforge.net/";
+    description = "C++ wrapper for the libxml2 XML parser library";
+    license = licenses.lgpl2Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libxmlxx/v3.nix b/nixpkgs/pkgs/development/libraries/libxmlxx/v3.nix
new file mode 100644
index 000000000000..02c990ae3547
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libxmlxx/v3.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv, fetchurl, pkg-config, libxml2, glibmm, perl, gnome }:
+
+stdenv.mkDerivation rec {
+  pname = "libxml++";
+  version = "3.0.1";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/libxml++/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "19kik79fmg61nv0by0a5f9wchrcfjwzvih4v2waw01hqflhqvp0r";
+  };
+
+  outputs = [ "out" "dev" "doc" "devdoc" ];
+
+  nativeBuildInputs = [ pkg-config perl ];
+
+  buildInputs = [ glibmm ];
+
+  propagatedBuildInputs = [ libxml2 ];
+
+  postFixup = ''
+    substituteInPlace $dev/lib/pkgconfig/libxml++-3.0.pc \
+      --replace 'docdir=''${datarootdir}' "docdir=$doc/share"
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      attrPath = "libxmlxx3";
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+      freeze = true;
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://libxmlplusplus.sourceforge.net/";
+    description = "C++ wrapper for the libxml2 XML parser library, version 3";
+    license = licenses.lgpl2Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ loskutov ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libxmp/default.nix b/nixpkgs/pkgs/development/libraries/libxmp/default.nix
new file mode 100644
index 000000000000..1cd4e5aa03a9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libxmp/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libxmp";
+  version = "4.6.0";
+
+  meta = with lib; {
+    description = "Extended module player library";
+    homepage    = "https://xmp.sourceforge.net/";
+    longDescription = ''
+      Libxmp is a library that renders module files to PCM data. It supports
+      over 90 mainstream and obscure module formats including Protracker (MOD),
+      Scream Tracker 3 (S3M), Fast Tracker II (XM), and Impulse Tracker (IT).
+    '';
+    license     = licenses.lgpl21Plus;
+    platforms   = platforms.all;
+  };
+
+  src = fetchurl {
+    url = "mirror://sourceforge/xmp/libxmp/${pname}-${version}.tar.gz";
+    sha256 = "sha256-LTxF/lI7UJB+ieYPmjt/TMmquD7J27p3Q+r/vNyzXqY=";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libxnd/default.nix b/nixpkgs/pkgs/development/libraries/libxnd/default.nix
new file mode 100644
index 000000000000..1fac0d86d4c7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libxnd/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, libndtypes
+}:
+
+stdenv.mkDerivation {
+  pname = "libxnd";
+  version = "unstable-2019-08-01";
+
+  src = fetchFromGitHub {
+    owner = "xnd-project";
+    repo = "xnd";
+    rev = "6f305cd40d90b4f3fc2fe51ae144b433d186a6cc";
+    sha256 = "1n31d64qwlc7m3qkzbafhp0dgrvgvkdx89ykj63kll7r1n3yk59y";
+  };
+
+  buildInputs = [ libndtypes ];
+
+  # Override linker with cc (symlink to either gcc or clang)
+  # Library expects to use cc for linking
+  configureFlags = [
+      # Override linker with cc (symlink to either gcc or clang)
+      # Library expects to use cc for linking
+      "LD=${stdenv.cc.targetPrefix}cc"
+      # needed for tests
+      "--with-includes=${libndtypes}/include"
+      "--with-libs=${libndtypes}/lib"
+  ];
+
+  # other packages which depend on libxnd seem to expect overflow.h, but
+  # it doesn't seem to be included in the installed headers. for now this
+  # works, but the generic name of the header could produce problems
+  # with collisions down the line.
+  postInstall = ''
+    cp libxnd/overflow.h $out/include/overflow.h
+  '';
+
+  doCheck = true;
+
+  meta = {
+    description = "C library for managing typed memory blocks and Python container module";
+    homepage = "https://xnd.io/";
+    license = lib.licenses.bsdOriginal;
+    maintainers = with lib.maintainers; [ costrouc ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libxslt/default.nix b/nixpkgs/pkgs/development/libraries/libxslt/default.nix
new file mode 100644
index 000000000000..95ecbbc44dee
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libxslt/default.nix
@@ -0,0 +1,91 @@
+{ lib
+, stdenv
+, fetchurl
+, pkg-config
+, autoreconfHook
+, libxml2
+, findXMLCatalogs
+, gettext
+, python
+, ncurses
+, libxcrypt
+, libgcrypt
+, cryptoSupport ? false
+, pythonSupport ? libxml2.pythonSupport
+, gnome
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libxslt";
+  version = "1.1.39";
+
+  outputs = [ "bin" "dev" "out" "doc" "devdoc" ] ++ lib.optional pythonSupport "py";
+  outputMan = "bin";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    hash = "sha256-KiCtYhFIM5sHWcTU6WcZNi3uZMmgltu6YlugU4RjSfA=";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    pkg-config
+    autoreconfHook
+  ];
+
+  buildInputs = [
+    libxml2.dev libxcrypt
+  ] ++ lib.optionals stdenv.isDarwin [
+    gettext
+  ] ++ lib.optionals pythonSupport [
+    libxml2.py
+    python
+    ncurses
+  ] ++ lib.optionals cryptoSupport [
+    libgcrypt
+  ];
+
+  propagatedBuildInputs = [
+    findXMLCatalogs
+  ];
+
+  configureFlags = [
+    "--without-debug"
+    "--without-mem-debug"
+    "--without-debugger"
+    (lib.withFeature pythonSupport "python")
+    (lib.optionalString pythonSupport "PYTHON=${python.pythonOnBuildForHost.interpreter}")
+  ] ++ lib.optionals (!cryptoSupport) [
+    "--without-crypto"
+  ];
+
+  enableParallelBuilding = true;
+
+  postFixup = ''
+    moveToOutput bin/xslt-config "$dev"
+    moveToOutput lib/xsltConf.sh "$dev"
+  '' + lib.optionalString pythonSupport ''
+    mkdir -p $py/nix-support
+    echo ${libxml2.py} >> $py/nix-support/propagated-build-inputs
+    moveToOutput ${python.sitePackages} "$py"
+  '';
+
+  passthru = {
+    inherit pythonSupport;
+
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "none";
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://gitlab.gnome.org/GNOME/libxslt";
+    description = "A C library and tools to do XSL transformations";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ eelco jtojnar ];
+    broken = pythonSupport && !libxml2.pythonSupport; # see #73102 for why this is not an assert
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libxsmm/default.nix b/nixpkgs/pkgs/development/libraries/libxsmm/default.nix
new file mode 100644
index 000000000000..6530ee7f67ae
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libxsmm/default.nix
@@ -0,0 +1,57 @@
+{ lib, stdenv, fetchFromGitHub, gfortran
+, python3, util-linux, which
+
+, enableStatic ? stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libxsmm";
+  version = "1.16.3";
+
+  src = fetchFromGitHub {
+    owner = "hfp";
+    repo = "libxsmm";
+    rev = version;
+    sha256 = "sha256-PpMiD/PeQ0pe5hqFG6VFHWpR8y3wnO2z1dJfHHeItlQ=";
+  };
+
+  outputs = [ "out" "dev" "doc" ];
+  nativeBuildInputs = [
+    gfortran
+    python3
+    util-linux
+    which
+  ];
+
+  enableParallelBuilding = true;
+
+  dontConfigure = true;
+
+  makeFlags = let
+    static = if enableStatic then "1" else "0";
+  in [
+    "OMP=1"
+    "PREFIX=$(out)"
+    "STATIC=${static}"
+  ];
+
+  postInstall = ''
+    mkdir -p $dev/lib/pkgconfig
+    mv $out/lib/*.pc $dev/lib/pkgconfig
+
+    moveToOutput "share/libxsmm" "$doc"
+  '';
+
+  prePatch = ''
+    patchShebangs .
+  '';
+
+  meta = with lib; {
+    broken = (stdenv.isLinux && stdenv.isAarch64);
+    description = "Library targeting Intel Architecture for specialized dense and sparse matrix operations, and deep learning primitives";
+    license = licenses.bsd3;
+    homepage = "https://github.com/hfp/libxsmm";
+    platforms = platforms.linux;
+    maintainers = with lib.maintainers; [ chessai ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libyaml/default.nix b/nixpkgs/pkgs/development/libraries/libyaml/default.nix
new file mode 100644
index 000000000000..9a9c5e0311f1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libyaml/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv
+, fetchFromGitHub
+, autoreconfHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libyaml";
+  version = "0.2.5";
+
+  src = fetchFromGitHub {
+    owner = "yaml";
+    repo = "libyaml";
+    rev = version;
+    sha256 = "18zsnsxc53pans4a01cs4401a2cjk3qi098hi440pj4zijifgcsb";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  meta = with lib; {
+    homepage = "https://pyyaml.org/";
+    description = "A YAML 1.1 parser and emitter written in C";
+    license = licenses.mit;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libyang/default.nix b/nixpkgs/pkgs/development/libraries/libyang/default.nix
new file mode 100644
index 000000000000..d220bcee1e6e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libyang/default.nix
@@ -0,0 +1,57 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+
+# build time
+, cmake
+, pkg-config
+
+# run time
+, pcre2
+
+# update script
+, gitUpdater
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libyang";
+  version = "2.1.128";
+
+  src = fetchFromGitHub {
+    owner = "CESNET";
+    repo = "libyang";
+    rev = "v${version}";
+    sha256 = "sha256-qwEHGUizjsWQZSwQkh7Clevd1OQfj1mse7Q8YiRCMyQ=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    pcre2
+  ];
+
+  cmakeFlags = [
+    "-DCMAKE_INSTALL_LIBDIR=lib"
+    "-DCMAKE_INSTALL_INCLUDEDIR=include"
+  ];
+
+  passthru.updateScript = gitUpdater {
+    rev-prefix = "v";
+  };
+
+  meta = with lib; {
+    description = "YANG data modelling language parser and toolkit";
+    longDescription = ''
+      libyang is a YANG data modelling language parser and toolkit written (and
+      providing API) in C. The library is used e.g. in libnetconf2, Netopeer2,
+      sysrepo or FRRouting projects.
+    '';
+    homepage = "https://github.com/CESNET/libyang";
+    license = with licenses; [ bsd3 ];
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ woffs ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libykclient/default.nix b/nixpkgs/pkgs/development/libraries/libykclient/default.nix
new file mode 100644
index 000000000000..6aacfc5ea2fa
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libykclient/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, help2man, curl }:
+
+stdenv.mkDerivation {
+  pname = "libykclient";
+  version = "unstable-2019-03-18";
+  src = fetchFromGitHub {
+    owner = "Yubico";
+    repo = "yubico-c-client";
+    rev = "ad9eda6aac4c3f81784607c30b971f4a050b5c2e";
+    sha256 = "01b19jgv2lypih6lhw9yjjsfl8q1ahl955vhr2ai8ccshh0050yj";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config help2man ];
+  buildInputs = [ curl ];
+
+  meta = with lib; {
+    description = "Yubikey C client library";
+    homepage = "https://developers.yubico.com/yubico-c-client";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ dtzWill ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libykneomgr/default.nix b/nixpkgs/pkgs/development/libraries/libykneomgr/default.nix
new file mode 100644
index 000000000000..d0fc1cfd9fbd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libykneomgr/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl, pkg-config, pcsclite, libzip, help2man }:
+
+stdenv.mkDerivation rec {
+  pname = "libykneomgr";
+  version = "0.1.8";
+
+  src = fetchurl {
+    url = "https://developers.yubico.com/libykneomgr/Releases/${pname}-${version}.tar.gz";
+    sha256 = "12gqblz400kr11m1fdr1vvwr85lgy5v55zy0cf782whpk8lyyj97";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ pcsclite libzip help2man ];
+
+  configureFlags = [
+    "--with-backend=pcsc"
+  ];
+
+  meta = with lib; {
+    description = "A C library to interact with the CCID-part of the Yubikey NEO";
+    homepage = "https://developers.yubico.com/libykneomgr";
+    license = licenses.bsd3;
+    mainProgram = "ykneomgr";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libytnef/default.nix b/nixpkgs/pkgs/development/libraries/libytnef/default.nix
new file mode 100644
index 000000000000..43734b19b890
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libytnef/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, lib, fetchFromGitHub, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "libytnef";
+  version = "2.1.2";
+
+  src = fetchFromGitHub {
+    owner = "Yeraze";
+    repo = "ytnef";
+    rev = "v${version}";
+    hash = "sha256-kQb45Da0T7wWi1IivA8Whk+ECL2nyFf7Gc0gK1HKj2c=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  meta = with lib; {
+    inherit (src.meta) homepage;
+    description = "Yeraze's TNEF Stream Reader - for winmail.dat files";
+    license = licenses.gpl2Plus;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ fpletz ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libyubikey/default.nix b/nixpkgs/pkgs/development/libraries/libyubikey/default.nix
new file mode 100644
index 000000000000..3b05be00d905
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libyubikey/default.nix
@@ -0,0 +1,18 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libyubikey";
+  version = "1.13";
+
+  src = fetchurl {
+    url = "https://developers.yubico.com/yubico-c/Releases/${pname}-${version}.tar.gz";
+    sha256 = "009l3k2zyn06dbrlja2d4p2vfnzjhlcqxi88v02mlrnb17mx1v84";
+  };
+
+  meta = with lib; {
+    homepage = "http://opensource.yubico.com/yubico-c/";
+    description = "C library for manipulating Yubico YubiKey One-Time Passwords (OTPs)";
+    license = licenses.bsd2;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libyuv/default.nix b/nixpkgs/pkgs/development/libraries/libyuv/default.nix
new file mode 100644
index 000000000000..cc9f78ccae6f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libyuv/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, stdenv
+, fetchgit
+, cmake
+, libjpeg
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libyuv";
+  version = "1787"; # Defined in: include/libyuv/version.h
+
+  src = fetchgit {
+    url = "https://chromium.googlesource.com/libyuv/libyuv.git";
+    rev = "eb6e7bb63738e29efd82ea3cf2a115238a89fa51"; # refs/heads/stable
+    sha256 = "sha256-DtRYoaAXb9ZD2OLiKbzKzH5vzuu+Lzu4eHaDgPB9hjU=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  # NEON does not work on aarch64, we disable it
+  cmakeFlags = lib.optionals stdenv.isAarch64 ["-DCMAKE_CXX_FLAGS=-DLIBYUV_DISABLE_NEON"];
+
+  buildInputs = [ libjpeg ];
+
+  patches = [
+    ./link-library-against-libjpeg.patch
+  ];
+
+  postPatch = ''
+    mkdir -p $out/lib/pkgconfig
+    cp ${./yuv.pc} $out/lib/pkgconfig/libyuv.pc
+
+    substituteInPlace $out/lib/pkgconfig/libyuv.pc \
+      --replace "@PREFIX@" "$out" \
+      --replace "@VERSION@" "$version"
+  '';
+
+  meta = with lib; {
+    homepage = "https://chromium.googlesource.com/libyuv/libyuv";
+    description = "Open source project that includes YUV scaling and conversion functionality";
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ leixb ];
+    license = licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libyuv/link-library-against-libjpeg.patch b/nixpkgs/pkgs/development/libraries/libyuv/link-library-against-libjpeg.patch
new file mode 100644
index 000000000000..d0f3d2968462
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libyuv/link-library-against-libjpeg.patch
@@ -0,0 +1,11 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 636531ee..af1b0e4e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -39,6 +39,7 @@ INCLUDE ( FindJPEG )
+ if (JPEG_FOUND)
+   include_directories( ${JPEG_INCLUDE_DIR} )
+   target_link_libraries( yuvconvert ${JPEG_LIBRARY} )
++  target_link_libraries( ${ly_lib_shared} ${JPEG_LIBRARY} )
+   add_definitions( -DHAVE_JPEG )
+ endif()
diff --git a/nixpkgs/pkgs/development/libraries/libyuv/yuv.pc b/nixpkgs/pkgs/development/libraries/libyuv/yuv.pc
new file mode 100644
index 000000000000..ecce62ed0efd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libyuv/yuv.pc
@@ -0,0 +1,13 @@
+prefix=@PREFIX@
+exec_prefix=${prefix}
+libdir=${prefix}/lib
+includedir=${prefix}/include
+
+Name: yuv
+Description: WebM Project Yuv codec implementation
+Version: @VERSION@
+Requires:
+Conflicts:
+Libs: -L${libdir} -lyuv -lm
+Libs.private: -lm -lpthread
+Cflags: -I${includedir}
diff --git a/nixpkgs/pkgs/development/libraries/libz/default.nix b/nixpkgs/pkgs/development/libraries/libz/default.nix
new file mode 100644
index 000000000000..6b3e1dacdc00
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libz/default.nix
@@ -0,0 +1,30 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, unstableGitUpdater
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libz";
+  version = "unstable-2018-03-31";
+
+  src = fetchFromGitLab {
+    owner = "sortix";
+    repo = "libz";
+    rev = "752c1630421502d6c837506d810f7918ac8cdd27";
+    hash = "sha256-AQuZ0BOl1iP5Nub+tVwctlE2tfJe4Sq/KDGkjwBbsV4=";
+  };
+
+  outputs = [ "out" "dev" ];
+  outputDoc = "dev"; # single tiny man3 page
+
+  passthru.updateScript = unstableGitUpdater { };
+
+  meta = {
+    homepage = "https://sortix.org/libz/";
+    description = "A clean fork of zlib";
+    license = [ lib.licenses.zlib ];
+    maintainers = with lib.maintainers; [ AndersonTorres ];
+    platforms = lib.platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libzapojit/default.nix b/nixpkgs/pkgs/development/libraries/libzapojit/default.nix
new file mode 100644
index 000000000000..8acb5e858df8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libzapojit/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchurl, pkg-config, glib, intltool, json-glib, librest, libsoup, gnome, gnome-online-accounts, gobject-introspection }:
+
+stdenv.mkDerivation rec {
+  pname = "libzapojit";
+  version = "0.0.3";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "0zn3s7ryjc3k1abj4k55dr2na844l451nrg9s6cvnnhh569zj99x";
+  };
+
+  nativeBuildInputs = [ pkg-config intltool gobject-introspection ];
+  propagatedBuildInputs = [ glib json-glib librest libsoup gnome-online-accounts ]; # zapojit-0.0.pc
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    description = "GObject wrapper for the SkyDrive and Hotmail REST APIs";
+    homepage = "https://wiki.gnome.org/Projects/Zapojit";
+    license = licenses.lgpl21Plus;
+    maintainers = teams.gnome.members;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libzdb/default.nix b/nixpkgs/pkgs/development/libraries/libzdb/default.nix
new file mode 100644
index 000000000000..cfd4d38ac574
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libzdb/default.nix
@@ -0,0 +1,24 @@
+{lib, stdenv, fetchurl, sqlite}:
+
+stdenv.mkDerivation rec
+{
+  version = "3.2.3";
+  pname = "libzdb";
+
+  src = fetchurl
+  {
+    url = "https://www.tildeslash.com/libzdb/dist/libzdb-${version}.tar.gz";
+    sha256 = "sha256-oZV4Jvq3clSE/Ft0eApqfQ2Lf14uVNJuEGs5ngqGvrA=";
+  };
+
+  buildInputs = [ sqlite ];
+
+  meta =
+  {
+    homepage = "http://www.tildeslash.com/libzdb/";
+    description = "A small, easy to use Open Source Database Connection Pool Library";
+    license = lib.licenses.gpl3;
+    platforms = lib.platforms.linux;
+    maintainers = [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libzen/default.nix b/nixpkgs/pkgs/development/libraries/libzen/default.nix
new file mode 100644
index 000000000000..ecc3736d1fbb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libzen/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchurl, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  version = "0.4.41";
+  pname = "libzen";
+  src = fetchurl {
+    url = "https://mediaarea.net/download/source/libzen/${version}/libzen_${version}.tar.bz2";
+    sha256 = "sha256-6yN9fT3Kbca6BocZQgon3gk0p4PMrrKGdWKzWvOQHi0=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+  configureFlags = [ "--enable-shared" ];
+
+  sourceRoot = "ZenLib/Project/GNU/Library";
+
+  preConfigure = "sh autogen.sh";
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Shared library for libmediainfo and mediainfo";
+    homepage = "https://mediaarea.net/";
+    license = licenses.bsd2;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.devhell ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libzim/default.nix b/nixpkgs/pkgs/development/libraries/libzim/default.nix
new file mode 100644
index 000000000000..50cb0847089b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libzim/default.nix
@@ -0,0 +1,59 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, icu
+, meson
+, ninja
+, pkg-config
+, python3
+, xapian
+, xz
+, zstd
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libzim";
+  version = "9.1.0";
+
+  src = fetchFromGitHub {
+    owner = "openzim";
+    repo = pname;
+    rev = "refs/tags/${version}";
+    hash = "sha256-yWnW/+CaQwbemrNLzvQpXw5yvW2Q6LtwDgvA58+fVUs=";
+  };
+
+  nativeBuildInputs = [
+    ninja
+    meson
+    pkg-config
+    python3
+  ];
+
+  buildInputs = [
+    icu
+    zstd
+  ];
+
+  propagatedBuildInputs = [
+    xapian
+    xz
+  ];
+
+  postPatch = ''
+    patchShebangs scripts
+  '';
+
+  mesonFlags = [
+    # Tests are located at https://github.com/openzim/zim-testing-suite
+    # "...some tests need up to 16GB of memory..."
+    "-Dtest_data_dir=none"
+  ];
+
+  meta = with lib; {
+    description = "Reference implementation of the ZIM specification";
+    homepage = "https://github.com/openzim/libzim";
+    changelog = "https://github.com/openzim/libzim/releases/tag/${version}";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ fab ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libzip/default.nix b/nixpkgs/pkgs/development/libraries/libzip/default.nix
new file mode 100644
index 000000000000..b34318476033
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libzip/default.nix
@@ -0,0 +1,65 @@
+{ lib, stdenv
+, cmake
+, fetchpatch2
+, fetchurl
+, perl
+, zlib
+, groff
+, withBzip2 ? false
+, bzip2
+, withLZMA ? false
+, xz
+, withOpenssl ? false
+, openssl
+, withZstd ? false
+, zstd
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libzip";
+  version = "1.10.1";
+
+  src = fetchurl {
+    url = "https://libzip.org/download/${finalAttrs.pname}-${finalAttrs.version}.tar.gz";
+    sha256 = "sha256-lmmuXf46xbOJdTbchGaodMjPLA47H90I11snOIQpk2M=";
+  };
+
+  patches = [
+    # https://github.com/nih-at/libzip/issues/404
+    (fetchpatch2 {
+      name = "Check-for-zstd_TARGET-before-using-it-in-a-regex.patch";
+      url = "https://github.com/nih-at/libzip/commit/c719428916b4d19e838f873b1a177b126a080d61.patch";
+      hash = "sha256-4ksbXEM8kNvs3wtbIaXLEQNSKaxl0es/sIg0EINaTHE=";
+    })
+  ];
+
+  outputs = [ "out" "dev" "man" ];
+
+  nativeBuildInputs = [ cmake perl groff ];
+  propagatedBuildInputs = [ zlib ];
+  buildInputs = lib.optionals withLZMA [ xz ]
+    ++ lib.optionals withBzip2 [ bzip2 ]
+    ++ lib.optionals withOpenssl [ openssl ]
+    ++ lib.optionals withZstd [ zstd ];
+
+  # Don't build the regression tests because they don't build with
+  # pkgsStatic and are not executed anyway.
+  cmakeFlags = [ "-DBUILD_REGRESS=0" ];
+
+  preCheck = ''
+    # regress/runtest is a generated file
+    patchShebangs regress
+  '';
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    homepage = "https://libzip.org/";
+    description = "A C library for reading, creating and modifying zip archives";
+    license = licenses.bsd3;
+    pkgConfigModules = [ "libzip" ];
+    platforms = platforms.unix;
+    changelog = "https://github.com/nih-at/libzip/blob/v${finalAttrs.version}/NEWS.md";
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/libzmf/default.nix b/nixpkgs/pkgs/development/libraries/libzmf/default.nix
new file mode 100644
index 000000000000..378a7202f371
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libzmf/default.nix
@@ -0,0 +1,24 @@
+{lib, stdenv, fetchurl, boost, icu, libpng, librevenge, zlib, doxygen, pkg-config, cppunit}:
+
+stdenv.mkDerivation rec {
+  pname = "libzmf";
+  version = "0.0.2";
+
+  src = fetchurl {
+    url = "http://dev-www.libreoffice.org/src/libzmf/${pname}-${version}.tar.xz";
+    sha256 = "08mg5kmkjrmqrd8j5rkzw9vdqlvibhb1ynp6bmfxnzq5rcq1l197";
+  };
+
+  buildInputs = [ boost icu libpng librevenge zlib cppunit ];
+  nativeBuildInputs = [ doxygen pkg-config ];
+  configureFlags = [ "--disable-werror" ];
+
+  meta = {
+    description = "A library that parses the file format of Zoner Callisto/Draw documents";
+    license = lib.licenses.mpl20;
+    maintainers = [lib.maintainers.raskin];
+    platforms = lib.platforms.unix;
+    homepage = "https://wiki.documentfoundation.org/DLP/Libraries/libzmf";
+    downloadPage = "http://dev-www.libreoffice.org/src/libzmf/";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libzra/default.nix b/nixpkgs/pkgs/development/libraries/libzra/default.nix
new file mode 100644
index 000000000000..feb0f1840b4d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libzra/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libzra";
+  version = "unstable-2020-09-11";
+
+  src = fetchFromGitHub {
+    owner = "zraorg";
+    repo = "zra";
+    rev = "57abf2774dfc4624f14a0bc5bba71f044ce54a38";
+    sha256 = "10rlqj6ma02005gdcp57wp48d6cg0vkbv4vl9ai0zlgxyx1g6kc4";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  # in submodule dev as of 1.4.7
+  postPatch = ''
+    (cd submodule/zstd && patch -Np1 < ${./fix-pkg-config.patch})
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/zraorg/ZRA";
+    description = "Library for ZStandard random access";
+    platforms = platforms.all;
+    maintainers = [ maintainers.ivar ];
+    license = licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/libzra/fix-pkg-config.patch b/nixpkgs/pkgs/development/libraries/libzra/fix-pkg-config.patch
new file mode 100644
index 000000000000..5b0d40a4233f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libzra/fix-pkg-config.patch
@@ -0,0 +1,150 @@
+From 7be7e35d61d8d499599623502a35460d410de114 Mon Sep 17 00:00:00 2001
+From: Alexander Shpilkin <ashpilkin@gmail.com>
+Date: Thu, 26 May 2022 16:03:27 +0300
+Subject: [PATCH] Squashed commit of the following:
+
+commit 9aacb9d5da65a64c3845937a6f9eede329d43989
+Author: W. Felix Handte <w@felixhandte.com>
+Date:   Tue Dec 8 20:46:02 2020 -0500
+
+    Apply Same Strategy to CMake
+
+    (cherry picked from commit a75f9ce3e924564ab358c2c1aa95b6268383ec42)
+
+commit e21b7ad0d98d1322ea92f99fcd1f85e2d6b6f6b7
+Author: W. Felix Handte <w@felixhandte.com>
+Date:   Tue Dec 8 20:10:05 2020 -0500
+
+    Avoid Use of Regexes in Building Package-Config File
+
+    (cherry picked from commit b521183c74795bd9bdd9bdebe74af01cae4d3d43)
+---
+ build/cmake/lib/CMakeLists.txt | 29 ++++++++++++++++++++++++----
+ lib/Makefile                   | 35 ++++++++++++++++------------------
+ lib/libzstd.pc.in              |  6 +++---
+ 3 files changed, 44 insertions(+), 26 deletions(-)
+
+diff --git a/build/cmake/lib/CMakeLists.txt b/build/cmake/lib/CMakeLists.txt
+index 32ae7525..466c2c7b 100644
+--- a/build/cmake/lib/CMakeLists.txt
++++ b/build/cmake/lib/CMakeLists.txt
+@@ -137,12 +137,33 @@ endif ()
+ if (UNIX)
+     # pkg-config
+     set(PREFIX "${CMAKE_INSTALL_PREFIX}")
+-    set(LIBDIR "${CMAKE_INSTALL_LIBDIR}")
+-    set(INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}")
++    set(EXEC_PREFIX "\\$$\{prefix}")
++    set(LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}")
++    set(INCLUDEDIR "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
+     set(VERSION "${zstd_VERSION}")
++
++    string(LENGTH "${PREFIX}" PREFIX_LENGTH)
++    string(SUBSTRING "${LIBDIR}" 0 ${PREFIX_LENGTH} LIBDIR_PREFIX)
++    string(SUBSTRING "${LIBDIR}" ${PREFIX_LENGTH} -1 LIBDIR_SUFFIX)
++    string(SUBSTRING "${INCLUDEDIR}" 0 ${PREFIX_LENGTH} INCLUDEDIR_PREFIX)
++    string(SUBSTRING "${INCLUDEDIR}" ${PREFIX_LENGTH} -1 INCLUDEDIR_SUFFIX)
++
++    if ("${INCLUDEDIR_PREFIX}" STREQUAL "${PREFIX}")
++        set(INCLUDEDIR_PREFIX "\\$$\{prefix}")
++    endif()
++    if ("${LIBDIR_PREFIX}" STREQUAL "${PREFIX}")
++        set(LIBDIR_PREFIX "\\$$\{exec_prefix}")
++    endif()
++
+     add_custom_target(libzstd.pc ALL
+-            ${CMAKE_COMMAND} -DIN="${LIBRARY_DIR}/libzstd.pc.in" -DOUT="libzstd.pc"
+-            -DPREFIX="${PREFIX}" -DLIBDIR="${LIBDIR}" -DINCLUDEDIR="${INCLUDEDIR}" -DVERSION="${VERSION}"
++            ${CMAKE_COMMAND}
++            -DIN="${LIBRARY_DIR}/libzstd.pc.in"
++            -DOUT="libzstd.pc"
++            -DPREFIX="${PREFIX}"
++            -DEXEC_PREFIX="${EXEC_PREFIX}"
++            -DINCLUDEDIR="${INCLUDEDIR_PREFIX}${INCLUDEDIR_SUFFIX}"
++            -DLIBDIR="${LIBDIR_PREFIX}${LIBDIR_SUFFIX}"
++            -DVERSION="${VERSION}"
+             -P "${CMAKE_CURRENT_SOURCE_DIR}/pkgconfig.cmake"
+             COMMENT "Creating pkg-config file")
+ 
+diff --git a/lib/Makefile b/lib/Makefile
+index 4a9ab799..2893ec21 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -257,6 +257,8 @@ ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD Ne
+ 
+ all: libzstd.pc
+ 
++HAS_EXPLICIT_EXEC_PREFIX := $(if $(or $(EXEC_PREFIX),$(exec_prefix)),1,)
++
+ DESTDIR     ?=
+ # directory variables : GNU conventions prefer lowercase
+ # see https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html
+@@ -270,24 +272,17 @@ LIBDIR      ?= $(libdir)
+ includedir  ?= $(PREFIX)/include
+ INCLUDEDIR  ?= $(includedir)
+ 
+-PCLIBDIR ?= $(shell echo "$(LIBDIR)" | sed -n $(SED_ERE_OPT) -e "s@^$(EXEC_PREFIX)(/|$$)@@p")
+-PCINCDIR ?= $(shell echo "$(INCLUDEDIR)" | sed -n $(SED_ERE_OPT) -e "s@^$(PREFIX)(/|$$)@@p")
++PCINCDIR := $(patsubst $(PREFIX)%,%,$(INCLUDEDIR))
++PCLIBDIR := $(patsubst $(EXEC_PREFIX)%,%,$(LIBDIR))
+ 
+-ifeq (,$(PCLIBDIR))
+-# Additional prefix check is required, since the empty string is technically a
+-# valid PCLIBDIR
+-ifeq (,$(shell echo "$(LIBDIR)" | sed -n $(SED_ERE_OPT) -e "\\@^$(EXEC_PREFIX)(/|$$)@ p"))
+-$(error configured libdir ($(LIBDIR)) is outside of prefix ($(PREFIX)), can't generate pkg-config file)
+-endif
+-endif
++# If we successfully stripped off a prefix, we'll add a reference to the
++# relevant pc variable.
++PCINCPREFIX := $(if $(findstring $(INCLUDEDIR),$(PCINCDIR)),,$${prefix})
++PCLIBPREFIX := $(if $(findstring $(LIBDIR),$(PCLIBDIR)),,$${exec_prefix})
+ 
+-ifeq (,$(PCINCDIR))
+-# Additional prefix check is required, since the empty string is technically a
+-# valid PCINCDIR
+-ifeq (,$(shell echo "$(INCLUDEDIR)" | sed -n $(SED_ERE_OPT) -e "\\@^$(PREFIX)(/|$$)@ p"))
+-$(error configured includedir ($(INCLUDEDIR)) is outside of exec_prefix ($(EXEC_PREFIX)), can't generate pkg-config file)
+-endif
+-endif
++# If no explicit EXEC_PREFIX was set by the caller, write it out as a reference
++# to PREFIX, rather than as a resolved value.
++PCEXEC_PREFIX := $(if $(HAS_EXPLICIT_EXEC_PREFIX),$(EXEC_PREFIX),$${prefix})
+ 
+ ifneq (,$(filter $(shell uname),FreeBSD NetBSD DragonFly))
+ PKGCONFIGDIR ?= $(PREFIX)/libdata/pkgconfig
+@@ -308,9 +303,11 @@ INSTALL_DATA    ?= $(INSTALL) -m 644
+ libzstd.pc:
+ libzstd.pc: libzstd.pc.in
+ 	@echo creating pkgconfig
+-	$(Q)@sed $(SED_ERE_OPT) -e 's|@PREFIX@|$(PREFIX)|' \
+-          -e 's|@LIBDIR@|$(PCLIBDIR)|' \
+-          -e 's|@INCLUDEDIR@|$(PCINCDIR)|' \
++	$(Q)@sed $(SED_ERE_OPT) \
++	        -e 's|@PREFIX@|$(PREFIX)|' \
++	        -e 's|@EXEC_PREFIX@|$(PCEXEC_PREFIX)|' \
++          -e 's|@INCLUDEDIR@|$(PCINCPREFIX)$(PCINCDIR)|' \
++          -e 's|@LIBDIR@|$(PCLIBPREFIX)$(PCLIBDIR)|' \
+           -e 's|@VERSION@|$(VERSION)|' \
+           $< >$@
+ 
+diff --git a/lib/libzstd.pc.in b/lib/libzstd.pc.in
+index 8ec0235a..8465c977 100644
+--- a/lib/libzstd.pc.in
++++ b/lib/libzstd.pc.in
+@@ -3,9 +3,9 @@
+ #   BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
+ 
+ prefix=@PREFIX@
+-exec_prefix=${prefix}
+-includedir=${prefix}/@INCLUDEDIR@
+-libdir=${exec_prefix}/@LIBDIR@
++exec_prefix=@EXEC_PREFIX@
++includedir=@INCLUDEDIR@
++libdir=@LIBDIR@
+ 
+ Name: zstd
+ Description: fast lossless compression algorithm library
+-- 
+2.36.0
+
diff --git a/nixpkgs/pkgs/development/libraries/lief/default.nix b/nixpkgs/pkgs/development/libraries/lief/default.nix
new file mode 100644
index 000000000000..4b691ba3d888
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lief/default.nix
@@ -0,0 +1,57 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, python
+, cmake
+, ninja
+}:
+
+let
+  pyEnv = python.withPackages (ps: [ ps.setuptools ps.tomli ps.pip ps.setuptools ]);
+in
+stdenv.mkDerivation rec {
+  pname = "lief";
+  version = "0.13.2";
+
+  src = fetchFromGitHub {
+    owner = "lief-project";
+    repo = "LIEF";
+    rev = version;
+    sha256 = "sha256-lH4SqwPB2Jp/wUI2Cll67PQbHbwMqpNuLy/ei8roiHg=";
+  };
+
+  outputs = [ "out" "py" ];
+
+  nativeBuildInputs = [
+    cmake
+    ninja
+  ];
+
+  # Not a propagatedBuildInput because only the $py output needs it; $out is
+  # just the library itself (e.g. C/C++ headers).
+  buildInputs = [
+    python
+  ];
+
+  env.CXXFLAGS = toString (lib.optional stdenv.isDarwin [ "-faligned-allocation" "-fno-aligned-new" "-fvisibility=hidden" ]);
+
+  postBuild = ''
+    pushd ../api/python
+    ${pyEnv.interpreter} setup.py build --parallel=$NIX_BUILD_CORES
+    popd
+  '';
+
+  postInstall = ''
+    pushd ../api/python
+    ${pyEnv.interpreter} setup.py install --skip-build --root=/ --prefix=$py
+    popd
+  '';
+
+  meta = with lib; {
+    description = "Library to Instrument Executable Formats";
+    homepage = "https://lief.quarkslab.com/";
+    license = [ licenses.asl20 ];
+    platforms = with platforms; linux ++ darwin;
+    maintainers = with maintainers; [ lassulus genericnerdyusername ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/lightgbm/default.nix b/nixpkgs/pkgs/development/libraries/lightgbm/default.nix
new file mode 100644
index 000000000000..55d04fb4f374
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lightgbm/default.nix
@@ -0,0 +1,150 @@
+{ config, stdenv, lib, fetchFromGitHub, cmake, gtest, doCheck ? true
+, cudaSupport ? config.cudaSupport or false, openclSupport ? false
+, mpiSupport ? false, javaWrapper ? false, hdfsSupport ? false, pythonLibrary ? false
+, rLibrary ? false, cudaPackages, opencl-headers, ocl-icd, boost
+, llvmPackages, openmpi, openjdk, swig, hadoop, R, rPackages, pandoc }:
+
+assert doCheck -> mpiSupport != true;
+assert openclSupport -> cudaSupport != true;
+assert cudaSupport -> openclSupport != true;
+
+stdenv.mkDerivation rec {
+  pnameBase = "lightgbm";
+  # prefix with r when building the R library
+  # The R package build results in a special binary file
+  # that contains a subset of the .so file use for the CLI
+  # and python version. In general, the CRAN version from
+  # nixpkgs's r-modules should be used, but this non-standard
+  # build allows for enabling CUDA support and other features
+  # which aren't included in the CRAN release. Build with:
+  # nix-build -E "with (import $NIXPKGS{}); \
+  #   let \
+  #     lgbm = lightgbm.override{rLibrary = true; doCheck = false;}; \
+  #   in \
+  #   rWrapper.override{ packages = [ lgbm ]; }"
+  pname = lib.optionalString rLibrary "r-" + pnameBase;
+  version = "4.1.0";
+
+  src = fetchFromGitHub {
+    owner = "microsoft";
+    repo = pnameBase;
+    rev = "v${version}";
+    fetchSubmodules = true;
+    hash = "sha256-AhXe/Mlor/i0y84wI9jVPKSnyVbSyAV52Y4yiNm7yLQ=";
+  };
+
+  nativeBuildInputs = [ cmake ]
+    ++ lib.optionals stdenv.isDarwin [ llvmPackages.openmp ]
+    ++ lib.optionals openclSupport [ opencl-headers ocl-icd boost ]
+    ++ lib.optionals mpiSupport [ openmpi ]
+    ++ lib.optionals hdfsSupport [ hadoop ]
+    ++ lib.optionals (hdfsSupport || javaWrapper) [ openjdk ]
+    ++ lib.optionals javaWrapper [ swig ]
+    ++ lib.optionals rLibrary [ R pandoc ];
+
+  buildInputs = [ gtest ]
+    ++ lib.optional cudaSupport cudaPackages.cudatoolkit;
+
+  propagatedBuildInputs = lib.optionals rLibrary [
+    rPackages.data_table
+    rPackages.rmarkdown
+    rPackages.jsonlite
+    rPackages.Matrix
+    rPackages.R6
+  ];
+
+  # Skip APPLE in favor of linux build for .so files
+  postPatch = ''
+    export PROJECT_SOURCE_DIR=./
+    substituteInPlace CMakeLists.txt \
+      --replace "find_package(GTest CONFIG)" "find_package(GTest REQUIRED)" \
+      --replace "OpenCL_INCLUDE_DIRS}" "OpenCL_INCLUDE_DIRS}" \
+      --replace "elseif(APPLE)" "elseif(APPLESKIP)"
+    substituteInPlace \
+      external_libs/compute/include/boost/compute/cl.hpp \
+      external_libs/compute/include/boost/compute/cl_ext.hpp \
+      --replace "include <OpenCL/" "include <CL/"
+    substituteInPlace build_r.R \
+      --replace "shQuote(normalizePath" "shQuote(type = 'cmd', string = normalizePath" \
+      --replace "file.path(getwd(), \"lightgbm_r\")" "'$out/tmp'" \
+      --replace \
+        "install_args <- c(\"CMD\", \"INSTALL\", \"--no-multiarch\", \"--with-keep.source\", tarball)" \
+        "install_args <- c(\"CMD\", \"INSTALL\", \"--no-multiarch\", \"--with-keep.source\", \"-l $out/library\", tarball)"
+  '';
+
+  cmakeFlags = lib.optionals doCheck [ "-DBUILD_CPP_TEST=ON" ]
+    ++ lib.optionals cudaSupport [ "-DUSE_CUDA=1" "-DCMAKE_CXX_COMPILER=${cudaPackages.cudatoolkit.cc}/bin/cc" ]
+    ++ lib.optionals openclSupport [ "-DUSE_GPU=ON" ]
+    ++ lib.optionals mpiSupport [ "-DUSE_MPI=ON" ]
+    ++ lib.optionals hdfsSupport [
+      "-DUSE_HDFS=ON"
+      "-DHDFS_LIB=${hadoop}/lib/hadoop-${hadoop.version}/lib/native/libhdfs.so"
+      "-DHDFS_INCLUDE_DIR=${hadoop}/lib/hadoop-${hadoop.version}/include" ]
+    ++ lib.optionals javaWrapper [
+      "-DUSE_SWIG=ON"
+      # RPATH of binary /nix/store/.../bin/... contains a forbidden reference to /build/
+      "-DCMAKE_SKIP_BUILD_RPATH=ON" ]
+    ++ lib.optionals rLibrary [ "-D__BUILD_FOR_R=ON" ]
+    ++ lib.optionals pythonLibrary [ "-D__BUILD_FOR_PYTHON=ON" ];
+
+  configurePhase = lib.optionals rLibrary ''
+    export R_LIBS_SITE="$out/library:$R_LIBS_SITE''${R_LIBS_SITE:+:}"
+  '';
+
+  # set the R package buildPhase to null because lightgbm has a
+  # custom builder script that builds and installs in one step
+  buildPhase = lib.optionals rLibrary ''
+  '';
+
+  inherit doCheck;
+
+  installPhase = ''
+      runHook preInstall
+    '' + lib.optionalString (!rLibrary) ''
+      mkdir -p $out
+      mkdir -p $out/lib
+      mkdir -p $out/bin
+      cp -r ../include $out
+      install -Dm755 ../lib_lightgbm.so $out/lib/lib_lightgbm.so
+    '' + lib.optionalString (!rLibrary && !pythonLibrary) ''
+      install -Dm755 ../lightgbm $out/bin/lightgbm
+    '' + lib.optionalString javaWrapper ''
+      cp -r java $out
+      cp -r com $out
+      cp -r lightgbmlib.jar $out
+    '' + ''
+    '' + lib.optionalString rLibrary ''
+      mkdir $out
+      mkdir $out/tmp
+      mkdir $out/library
+      mkdir $out/library/lightgbm
+    '' + lib.optionalString (rLibrary && (!openclSupport)) ''
+      Rscript build_r.R \
+        -j$NIX_BUILD_CORES
+      rm -rf $out/tmp
+    '' + lib.optionalString (rLibrary && openclSupport) ''
+      Rscript build_r.R --use-gpu \
+        --opencl-library=${ocl-icd}/lib/libOpenCL.so \
+        --opencl-include-dir=${opencl-headers}/include \
+        --boost-librarydir=${boost} \
+        -j$NIX_BUILD_CORES
+      rm -rf $out/tmp
+    '' + ''
+      runHook postInstall
+    '';
+
+  postFixup = lib.optionalString rLibrary ''
+    if test -e $out/nix-support/propagated-build-inputs; then
+        ln -s $out/nix-support/propagated-build-inputs $out/nix-support/propagated-user-env-packages
+    fi
+  '';
+
+  meta = with lib; {
+    description =
+      "LightGBM is a gradient boosting framework that uses tree based learning algorithms.";
+    homepage = "https://github.com/microsoft/LightGBM";
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ nviets ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/lightning/default.nix b/nixpkgs/pkgs/development/libraries/lightning/default.nix
new file mode 100644
index 000000000000..c7a3b31a9032
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lightning/default.nix
@@ -0,0 +1,34 @@
+{ lib
+, stdenv
+, fetchurl
+, libopcodes
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "lightning";
+  version = "2.2.2";
+
+  src = fetchurl {
+    url = "mirror://gnu/lightning/${finalAttrs.pname}-${finalAttrs.version}.tar.gz";
+    hash = "sha256-CsqCQt6tF9YhF7z8sHjmqeqFbMgXQoE8noOUvM5zs+I=";
+  };
+
+  nativeCheckInputs = [ libopcodes ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    homepage = "https://www.gnu.org/software/lightning/";
+    description = "Run-time code generation library";
+    longDescription = ''
+      GNU lightning is a library that generates assembly language code at
+      run-time; it is very fast, making it ideal for Just-In-Time compilers, and
+      it abstracts over the target CPU, as it exposes to the clients a
+      standardized RISC instruction set inspired by the MIPS and SPARC chips.
+    '';
+    maintainers = with maintainers; [ AndersonTorres ];
+    license = licenses.lgpl3Plus;
+    platforms = platforms.unix;
+    broken = stdenv.isDarwin; # failing tests
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/lime/default.nix b/nixpkgs/pkgs/development/libraries/lime/default.nix
new file mode 100644
index 000000000000..0ac3e0f81ecd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lime/default.nix
@@ -0,0 +1,48 @@
+{ bctoolbox
+, belle-sip
+, cmake
+, fetchFromGitLab
+, lib
+, bc-soci
+, sqlite
+, stdenv
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lime";
+  version = "5.2.98";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.linphone.org";
+    owner = "public";
+    group = "BC";
+    repo = pname;
+    rev = version;
+    hash = "sha256-LdwXBJpwSA/PoCXL+c1pcX1V2Fq/eR6nNmwBKDM1Vr8=";
+  };
+
+  buildInputs = [
+    # Made by BC
+    bctoolbox
+    belle-sip
+
+    # Vendored by BC
+    bc-soci
+
+    sqlite
+  ];
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [
+    "-DENABLE_STATIC=NO" # Do not build static libraries
+    "-DENABLE_UNIT_TESTS=NO" # Do not build test executables
+  ];
+
+  meta = with lib; {
+    description = "End-to-end encryption library for instant messaging. Part of the Linphone project.";
+    homepage = "https://www.linphone.org/technical-corner/lime";
+    license = licenses.gpl3Only;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ jluttine ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/linbox/default.nix b/nixpkgs/pkgs/development/libraries/linbox/default.nix
new file mode 100644
index 000000000000..6367b93b1a21
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/linbox/default.nix
@@ -0,0 +1,69 @@
+{ lib, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, givaro
+, pkg-config
+, blas
+, lapack
+, fflas-ffpack
+, gmpxx
+, withSage ? false # sage support
+}:
+
+assert (!blas.isILP64) && (!lapack.isILP64);
+
+stdenv.mkDerivation rec {
+  pname = "linbox";
+  version = "1.7.0";
+
+  src = fetchFromGitHub {
+    owner = "linbox-team";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-mW84a98KPLqcHMjX3LIYTmVe0ngUdz6RJLpoDaAqKU8=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ];
+
+  buildInputs = [
+    givaro
+    blas
+    gmpxx
+    fflas-ffpack
+  ];
+
+  configureFlags = [
+    "--with-blas-libs=-lblas"
+    "--disable-optimization"
+  ] ++ lib.optionals stdenv.isx86_64 [
+    # disable SIMD instructions (which are enabled *when available* by default)
+    "--${if stdenv.hostPlatform.sse3Support   then "enable" else "disable"}-sse3"
+    "--${if stdenv.hostPlatform.ssse3Support  then "enable" else "disable"}-ssse3"
+    "--${if stdenv.hostPlatform.sse4_1Support then "enable" else "disable"}-sse41"
+    "--${if stdenv.hostPlatform.sse4_2Support then "enable" else "disable"}-sse42"
+    "--${if stdenv.hostPlatform.avxSupport    then "enable" else "disable"}-avx"
+    "--${if stdenv.hostPlatform.avx2Support   then "enable" else "disable"}-avx2"
+    "--${if stdenv.hostPlatform.fmaSupport    then "enable" else "disable"}-fma"
+    "--${if stdenv.hostPlatform.fma4Support   then "enable" else "disable"}-fma4"
+  ] ++ lib.optionals withSage [
+    "--enable-sage"
+  ];
+
+  # https://github.com/linbox-team/linbox/issues/304
+  hardeningDisable = [ "fortify3" ];
+
+  doCheck = true;
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "C++ library for exact, high-performance linear algebra";
+    license = licenses.lgpl21Plus;
+    maintainers = teams.sage.members;
+    platforms = platforms.unix;
+    homepage = "https://linalg.org/";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/linenoise-ng/default.nix b/nixpkgs/pkgs/development/libraries/linenoise-ng/default.nix
new file mode 100644
index 000000000000..276756822746
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/linenoise-ng/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "linenoise-ng";
+  version = "1.0.1";
+
+  src = fetchFromGitHub {
+    owner = "arangodb";
+    repo = "linenoise-ng";
+    rev = "v${version}";
+    sha256 = "176iz0kj0p8d8i3jqps4z8xkxwl3f1986q88i9xg5fvqgpzsxp20";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = {
+    homepage = "https://github.com/arangodb/linenoise-ng";
+    description = "A small, portable GNU readline replacement for Linux, Windows and MacOS which is capable of handling UTF-8 characters";
+    maintainers = with lib.maintainers; [ ];
+    platforms = lib.platforms.all;
+    license = lib.licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/linenoise/default.nix b/nixpkgs/pkgs/development/libraries/linenoise/default.nix
new file mode 100644
index 000000000000..a934ec19d7c1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/linenoise/default.nix
@@ -0,0 +1,49 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, validatePkgConfig
+}:
+
+stdenv.mkDerivation {
+  pname = "linenoise";
+  version = "1.0-34-g93b2db9";
+
+  src = fetchFromGitHub {
+    owner = "antirez";
+    repo = "linenoise";
+    rev = "1.0-34-g93b2db9";
+    hash = "sha256-GsrYg16gpjHkkmpCU3yGzqNS/buZl+JoWALLvwzmT4A=";
+  };
+
+  nativeBuildInputs = [ validatePkgConfig ];
+
+  buildPhase = ''
+    runHook preBuild
+
+    $CC -c -o linenoise.o linenoise.c
+    $CC -shared -o liblinenoise.so linenoise.o
+    $AR rcs liblinenoise.a linenoise.o
+
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    install -d $out/lib/pkgconfig $out/include
+    install -m644 linenoise.h     $out/include/
+    install -m644 liblinenoise.a  $out/lib/
+    install -m644 liblinenoise.so $out/lib/
+    substituteAll ${./linenoise.pc.in} $out/lib/pkgconfig/linenoise.pc
+
+    runHook postInstall
+  '';
+
+  meta = {
+    homepage = "https://github.com/antirez/linenoise";
+    description = "A minimal, zero-config, BSD licensed, readline replacement";
+    maintainers = with lib.maintainers; [ fstamour remexre ];
+    platforms = lib.platforms.unix;
+    license = lib.licenses.bsd2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/linenoise/linenoise.pc.in b/nixpkgs/pkgs/development/libraries/linenoise/linenoise.pc.in
new file mode 100644
index 000000000000..feb917dab0d9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/linenoise/linenoise.pc.in
@@ -0,0 +1,10 @@
+prefix=@out@
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: linenoise
+Description: A minimal, zero-config, BSD licensed, readline replacement.
+Version: @version@
+Libs: -L${libdir} -llinenoise
+Cflags: -I${includedir}
diff --git a/nixpkgs/pkgs/development/libraries/liquid-dsp/default.nix b/nixpkgs/pkgs/development/libraries/liquid-dsp/default.nix
new file mode 100644
index 000000000000..6667aa4882e0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liquid-dsp/default.nix
@@ -0,0 +1,32 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, cctools
+, autoSignDarwinBinariesHook
+, fixDarwinDylibNames
+}:
+
+stdenv.mkDerivation rec {
+  pname = "liquid-dsp";
+  version = "1.6.0";
+
+  src = fetchFromGitHub {
+    owner = "jgaeddert";
+    repo = "liquid-dsp";
+    rev = "v${version}";
+    sha256 = "sha256-3UKAwhYaYZ42+d+wiW/AB6x5TSOel8d++d3HeZqAg/8=";
+  };
+
+  configureFlags = lib.optionals stdenv.isDarwin [ "LIBTOOL=${cctools}/bin/libtool" ];
+
+  nativeBuildInputs = [ autoreconfHook ]
+    ++ lib.optionals stdenv.isDarwin [ cctools autoSignDarwinBinariesHook fixDarwinDylibNames ];
+
+  meta = {
+    homepage = "https://liquidsdr.org/";
+    description = "Digital signal processing library for software-defined radios";
+    license = lib.licenses.mit;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/liquidfun/default.nix b/nixpkgs/pkgs/development/libraries/liquidfun/default.nix
new file mode 100644
index 000000000000..6ab138016d19
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liquidfun/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, requireFile, cmake, libGLU, libGL, libX11, libXi }:
+
+stdenv.mkDerivation rec {
+  pname = "liquidfun";
+  version = "1.1.0";
+
+  src = requireFile {
+    url = "https://github.com/google/liquidfun/releases/download/v${version}/liquidfun-${version}";
+    sha256 = "5011a000eacd6202a47317c489e44aa753a833fb562d970e7b8c0da9de01df86";
+    name = "liquidfun-${version}.tar.gz";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ libGLU libGL libX11 libXi ];
+
+  sourceRoot = "liquidfun/Box2D";
+
+  preConfigurePhases = "preConfigure";
+
+  preConfigure = ''
+    sed -i Box2D/Common/b2Settings.h -e 's@b2_maxPolygonVertices .*@b2_maxPolygonVertices 15@'
+    substituteInPlace Box2D/CMakeLists.txt --replace "Common/b2GrowableStack.h" "Common/b2GrowableStack.h Common/b2GrowableBuffer.h"
+  '';
+
+  configurePhase = ''
+    mkdir Build
+    cd Build;
+    cmake -DBOX2D_INSTALL=ON -DBOX2D_BUILD_SHARED=ON -DCMAKE_INSTALL_PREFIX=$out ..
+  '';
+
+  meta = with lib; {
+    description = "2D physics engine based on Box2D";
+    maintainers = with maintainers; [ qknight ];
+    platforms = platforms.linux;
+    hydraPlatforms = [ ];
+    license = licenses.bsd2;
+    homepage = "https://google.github.io/liquidfun/";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/lirc/default.nix b/nixpkgs/pkgs/development/libraries/lirc/default.nix
new file mode 100644
index 000000000000..80c9d1f1d810
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lirc/default.nix
@@ -0,0 +1,97 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, autoreconfHook
+, pkg-config
+, help2man
+, python3
+, linuxHeaders
+
+, alsa-lib
+, libxslt
+, systemd
+, libusb-compat-0_1
+, libftdi1
+, libICE
+, libSM
+, libX11
+}:
+
+let
+  pythonEnv = python3.pythonOnBuildForHost.withPackages (p: with p; [ pyyaml setuptools ]);
+in
+stdenv.mkDerivation rec {
+  pname = "lirc";
+  version = "0.10.2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/lirc/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-PUTsgnSIHPJi8WCAVkHwgn/8wgreDYXn5vO5Dg09Iio=";
+  };
+
+  patches = [
+    # Fix installation of Python bindings
+    (fetchpatch {
+      url = "https://sourceforge.net/p/lirc/tickets/339/attachment/0001-Fix-Python-bindings.patch";
+      sha256 = "088a39x8c1qd81qwvbiqd6crb2lk777wmrs8rdh1ga06lglyvbly";
+    })
+
+    # Add a workaround for linux-headers-5.18 until upstream adapts:
+    #   https://sourceforge.net/p/lirc/git/merge-requests/45/
+    ./linux-headers-5.18.patch
+  ];
+
+  postPatch = ''
+    patchShebangs .
+
+    # fix overriding PYTHONPATH
+    sed -i 's,^PYTHONPATH *= *,PYTHONPATH := $(PYTHONPATH):,' \
+      Makefile.in
+    sed -i 's,PYTHONPATH=,PYTHONPATH=$(PYTHONPATH):,' \
+      doc/Makefile.in
+
+    # Pull fix for new pyyaml pending upstream inclusion
+    #   https://sourceforge.net/p/lirc/git/merge-requests/39/
+    substituteInPlace python-pkg/lirc/database.py --replace 'yaml.load(' 'yaml.safe_load('
+
+    # cant import '/build/lirc-0.10.1/python-pkg/lirc/_client.so' while cross-compiling to check the version
+    substituteInPlace python-pkg/setup.py \
+      --replace "VERSION='0.0.0'" "VERSION='${version}'"
+  '';
+
+  preConfigure = ''
+    export PKGCONFIG="$PKG_CONFIG"
+  '';
+
+  strictDeps = true;
+
+  nativeBuildInputs = [ autoreconfHook help2man libxslt pythonEnv pkg-config ];
+
+  buildInputs = [ alsa-lib systemd libusb-compat-0_1 libftdi1 libICE libSM libX11 ];
+
+  DEVINPUT_HEADER = "${linuxHeaders}/include/linux/input-event-codes.h";
+
+  configureFlags = [
+    "--sysconfdir=/etc"
+    "--localstatedir=/var"
+    "--with-systemdsystemunitdir=$(out)/lib/systemd/system"
+    "--enable-uinput" # explicit activation because build env has no uinput
+    "--enable-devinput" # explicit activation because build env has no /dev/input
+    "--with-lockdir=/run/lirc/lock" # /run/lock is not writable for 'lirc' user
+    "PYTHON=${pythonEnv.interpreter}"
+  ];
+
+  installFlags = [
+    "sysconfdir=$out/etc"
+    "localstatedir=$TMPDIR"
+  ];
+
+  meta = with lib; {
+    description = "Allows to receive and send infrared signals";
+    homepage = "https://www.lirc.org/";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ pSub ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/lirc/linux-headers-5.18.patch b/nixpkgs/pkgs/development/libraries/lirc/linux-headers-5.18.patch
new file mode 100644
index 000000000000..733c423b7a83
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lirc/linux-headers-5.18.patch
@@ -0,0 +1,35 @@
+--- a/daemons/lircd.cpp
++++ b/daemons/lircd.cpp
+@@ -110,6 +110,17 @@ int clock_gettime(int clk_id, struct timespec *t){
+ #endif
+ #define WHITE_SPACE " \t"
+ 
++/* Defines removed in linux-headers-5.18:
++     https://sourceforge.net/p/lirc/git/merge-requests/45/
++ */
++#ifndef LIRC_CAN_SET_REC_FILTER
++#    define LIRC_CAN_SET_REC_FILTER 0x08000000
++#endif
++
++#ifndef LIRC_CAN_NOTIFY_DECODE
++#    define LIRC_CAN_NOTIFY_DECODE 0x01000000
++#endif
++
+ static const logchannel_t logchannel = LOG_APP;
+ 
+ /** How long we sleep while waiting for busy write sockets. */
+--- a/tools/lirc-lsplugins.cpp
++++ b/tools/lirc-lsplugins.cpp
+@@ -21,6 +21,12 @@
+ #include "config.h"
+ #include "lirc_private.h"
+ 
++/* Defines removed in linux-headers-5.18:
++     https://sourceforge.net/p/lirc/git/merge-requests/45/
++ */
++#ifndef LIRC_CAN_NOTIFY_DECODE
++#    define LIRC_CAN_NOTIFY_DECODE 0x01000000
++#endif
+ 
+ #define USAGE \
+ 	"\nSynopsis:\n" \
diff --git a/nixpkgs/pkgs/development/libraries/litehtml/default.nix b/nixpkgs/pkgs/development/libraries/litehtml/default.nix
new file mode 100644
index 000000000000..3927f7cce4a5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/litehtml/default.nix
@@ -0,0 +1,46 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, gumbo
+}:
+
+stdenv.mkDerivation rec {
+  pname = "litehtml";
+  version = "0.6";
+
+  src = fetchFromGitHub {
+    owner = "litehtml";
+    repo = "litehtml";
+    rev = "v${version}";
+    hash = "sha256-9571d3k8RkzEpMWPuIejZ7njLmYstSwFUaSqT3sk6uQ=";
+  };
+
+  # Don't search for non-existant gumbo cmake config
+  # This will mislead cmake that litehtml is not found
+  # Affects build of pkgs that depend on litehtml
+  postPatch = ''
+    substituteInPlace cmake/litehtmlConfig.cmake \
+      --replace "find_dependency(gumbo)" ""
+  '';
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = [
+    gumbo
+  ];
+
+  cmakeFlags = [
+    "-DEXTERNAL_GUMBO=ON"
+  ];
+
+  meta = with lib; {
+    description = "Fast and lightweight HTML/CSS rendering engine";
+    homepage = "http://www.litehtml.com/";
+    license = licenses.bsd3;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ fgaz ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/llhttp/default.nix b/nixpkgs/pkgs/development/libraries/llhttp/default.nix
new file mode 100644
index 000000000000..fbf7198f1d55
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/llhttp/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchFromGitHub, cmake, testers }:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "llhttp";
+  version = "9.1.3";
+
+  src = fetchFromGitHub {
+    owner = "nodejs";
+    repo = "llhttp";
+    rev = "release/v${finalAttrs.version}";
+    hash = "sha256-QacjukWkRCuQA4qzUq45521YOBLPuOSKNR1pVxgxe9o=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_STATIC_LIBS=ON"
+  ];
+
+  passthru.tests.pkg-config = testers.hasPkgConfigModules {
+    package = finalAttrs.finalPackage;
+  };
+
+  meta = with lib; {
+    description = "Port of http_parser to llparse";
+    homepage = "https://llhttp.org/";
+    changelog = "https://github.com/nodejs/llhttp/releases/tag/release/v${finalAttrs.version}";
+    license = licenses.mit;
+    pkgConfigModules = [ "libllhttp" ];
+    maintainers = [ maintainers.marsam ];
+    platforms = platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/lmdb/bin-ext.patch b/nixpkgs/pkgs/development/libraries/lmdb/bin-ext.patch
new file mode 100644
index 000000000000..2d5af99772c0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lmdb/bin-ext.patch
@@ -0,0 +1,21 @@
+diff --git a/libraries/liblmdb/Makefile b/libraries/liblmdb/Makefile
+index 612484e..2e6b562 100644
+--- a/libraries/liblmdb/Makefile
++++ b/libraries/liblmdb/Makefile
+@@ -27,6 +27,7 @@ CFLAGS	= $(THREADS) $(OPT) $(W) $(XCFLAGS)
+ LDLIBS	=
+ SOLIBS	=
+ SOEXT	= .so
++BINEXT  =
+ prefix	= /usr/local
+ exec_prefix = $(prefix)
+ bindir = $(exec_prefix)/bin
+@@ -49,7 +50,7 @@ install: $(ILIBS) $(IPROGS) $(IHDRS)
+ 	mkdir -p $(DESTDIR)$(libdir)
+ 	mkdir -p $(DESTDIR)$(includedir)
+ 	mkdir -p $(DESTDIR)$(mandir)/man1
+-	for f in $(IPROGS); do cp $$f $(DESTDIR)$(bindir); done
++	for f in $(IPROGS); do cp $$f$(BINEXT) $(DESTDIR)$(bindir); done
+ 	for f in $(ILIBS); do cp $$f $(DESTDIR)$(libdir); done
+ 	for f in $(IHDRS); do cp $$f $(DESTDIR)$(includedir); done
+ 	for f in $(IDOCS); do cp $$f $(DESTDIR)$(mandir)/man1; done
diff --git a/nixpkgs/pkgs/development/libraries/lmdb/default.nix b/nixpkgs/pkgs/development/libraries/lmdb/default.nix
new file mode 100644
index 000000000000..8c65d02bf565
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lmdb/default.nix
@@ -0,0 +1,74 @@
+{ lib, stdenv, fetchFromGitLab, windows }:
+
+stdenv.mkDerivation rec {
+  pname = "lmdb";
+  version = "0.9.32";
+
+  src = fetchFromGitLab {
+    domain = "git.openldap.org";
+    owner = "openldap";
+    repo = "openldap";
+    rev = "LMDB_${version}";
+    sha256 = "sha256-29ZrGIiGqrvX+WsPRs2V25hPmAJSHTHaGo19nMldsb8=";
+  };
+
+  postUnpack = "sourceRoot=\${sourceRoot}/libraries/liblmdb";
+
+  patches = [ ./hardcoded-compiler.patch ./bin-ext.patch ];
+  patchFlags = [ "-p3" ];
+
+  # Don't attempt the .so if static, as it would fail.
+  postPatch = lib.optionalString stdenv.hostPlatform.isStatic ''
+    sed 's/^ILIBS\>.*/ILIBS = liblmdb.a/' -i Makefile
+  '';
+
+  outputs = [ "bin" "out" "dev" ];
+
+  buildInputs = lib.optional stdenv.hostPlatform.isWindows windows.pthreads;
+
+  makeFlags = [
+    "prefix=$(out)"
+    "CC=${stdenv.cc.targetPrefix}cc"
+    "AR=${stdenv.cc.targetPrefix}ar"
+  ]
+    ++ lib.optional stdenv.isDarwin "LDFLAGS=-Wl,-install_name,$(out)/lib/liblmdb.so"
+    ++ lib.optionals stdenv.hostPlatform.isWindows [ "SOEXT=.dll" "BINEXT=.exe" ];
+
+  doCheck = true;
+  checkTarget = "test";
+
+  postInstall = ''
+    moveToOutput bin "$bin"
+  ''
+    # add lmdb.pc (dynamic only)
+    + ''
+    mkdir -p "$dev/lib/pkgconfig"
+    cat > "$dev/lib/pkgconfig/lmdb.pc" <<EOF
+    Name: lmdb
+    Description: ${meta.description}
+    Version: ${version}
+
+    Cflags: -I$dev/include
+    Libs: -L$out/lib -llmdb
+    EOF
+
+    # Expected by Rust libraries.
+    ln -s lmdb.pc "$dev/lib/pkgconfig/liblmdb.pc"
+  '';
+
+  meta = with lib; {
+    description = "Lightning memory-mapped database";
+    longDescription = ''
+      LMDB is an ultra-fast, ultra-compact key-value embedded data store
+      developed by Symas for the OpenLDAP Project. It uses memory-mapped files,
+      so it has the read performance of a pure in-memory database while still
+      offering the persistence of standard disk-based databases, and is only
+      limited to the size of the virtual address space.
+    '';
+    homepage = "https://symas.com/lmdb/";
+    changelog = "https://git.openldap.org/openldap/openldap/-/blob/LMDB_${version}/libraries/liblmdb/CHANGES";
+    maintainers = with maintainers; [ jb55 vcunat ];
+    license = licenses.openldap;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/lmdb/hardcoded-compiler.patch b/nixpkgs/pkgs/development/libraries/lmdb/hardcoded-compiler.patch
new file mode 100644
index 000000000000..ddb247b7f113
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lmdb/hardcoded-compiler.patch
@@ -0,0 +1,26 @@
+commit 029031a68873bc3784a8561bd8e049efbd34f9d0 (HEAD)
+Author: Vladimír Čunát <vcunat@gmail.com>
+Date:   Sun Apr 1 11:05:31 2018 +0200
+
+    make: gcc -> $(CC)
+
+diff --git a/libraries/liblmdb/Makefile b/libraries/liblmdb/Makefile
+index f254511..612484e 100644
+--- a/libraries/liblmdb/Makefile
++++ b/libraries/liblmdb/Makefile
+@@ -102,13 +102,13 @@ COV_OBJS=xmdb.o xmidl.o
+ 
+ coverage: xmtest
+ 	for i in mtest*.c [0-9]*.c; do j=`basename \$$i .c`; $(MAKE) $$j.o; \
+-		gcc -o x$$j $$j.o $(COV_OBJS) -pthread $(COV_FLAGS); \
++		$(CC) -o x$$j $$j.o $(COV_OBJS) -pthread $(COV_FLAGS); \
+ 		rm -rf testdb; mkdir testdb; ./x$$j; done
+ 	gcov xmdb.c
+ 	gcov xmidl.c
+ 
+ xmtest:	mtest.o xmdb.o xmidl.o
+-	gcc -o xmtest mtest.o xmdb.o xmidl.o -pthread $(COV_FLAGS)
++	$(CC) -o xmtest mtest.o xmdb.o xmidl.o -pthread $(COV_FLAGS)
+ 
+ xmdb.o: mdb.c lmdb.h midl.h
+ 	$(CC) $(CFLAGS) -fPIC $(CPPFLAGS) -O0 $(COV_FLAGS) -c mdb.c -o $@
diff --git a/nixpkgs/pkgs/development/libraries/lmdbxx/default.nix b/nixpkgs/pkgs/development/libraries/lmdbxx/default.nix
new file mode 100644
index 000000000000..4fc1573eea1a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lmdbxx/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv
+, fetchFromGitHub
+, lmdb }:
+
+stdenv.mkDerivation rec {
+  pname = "lmdbxx";
+  version = "1.0.0";
+
+  src = fetchFromGitHub {
+    owner = "hoytech";
+    repo = "lmdbxx";
+    rev = version;
+    sha256 = "sha256-7CxQZdgHVvmof6wVR9Mzic6tg89XJT3Z1ICGRs7PZYo=";
+  };
+
+  buildInputs = [ lmdb ];
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  meta = {
+    homepage = "https://github.com/hoytech/lmdbxx#readme";
+    description = "C++11 wrapper for the LMDB embedded B+ tree database library";
+    license = lib.licenses.unlicense;
+    maintainers = with lib.maintainers; [ fgaz ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/log4cplus/default.nix b/nixpkgs/pkgs/development/libraries/log4cplus/default.nix
new file mode 100644
index 000000000000..df5fab1839cd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/log4cplus/default.nix
@@ -0,0 +1,18 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "log4cplus";
+  version = "2.1.1";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/log4cplus/log4cplus-${version}.tar.bz2";
+    sha256 = "sha256-ZZfeeCd15OD7qP3K2TjDcJ/YOagITEtu3648xQRuJog=";
+  };
+
+  meta = {
+    homepage = "http://log4cplus.sourceforge.net/";
+    description = "A port the log4j library from Java to C++";
+    license = lib.licenses.asl20;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/log4cpp/default.nix b/nixpkgs/pkgs/development/libraries/log4cpp/default.nix
new file mode 100644
index 000000000000..c4255babca56
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/log4cpp/default.nix
@@ -0,0 +1,20 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "log4cpp";
+  version = "1.1.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/log4cpp/${pname}-${version}.tar.gz";
+    sha256 = "sha256-aWETZZ5CZUBiUnSoslEFLMBDBtjuXEKgx2OfOcqQydY=";
+  };
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage    = "https://log4cpp.sourceforge.net/";
+    description = "A logging framework for C++ patterned after Apache log4j";
+    license     = licenses.lgpl21Plus;
+    platforms   = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/log4cxx/default.nix b/nixpkgs/pkgs/development/libraries/log4cxx/default.nix
new file mode 100644
index 000000000000..d557d5d07e4e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/log4cxx/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchurl, libtool, cmake, libxml2, cppunit, boost
+, apr, aprutil, db, expat
+}:
+
+stdenv.mkDerivation rec {
+  pname = "log4cxx";
+  version = "1.2.0";
+
+  src = fetchurl {
+    url = "mirror://apache/logging/log4cxx/${version}/apache-${pname}-${version}.tar.gz";
+    hash = "sha256-CfR0iqVnXvXAdwvtv14ASIZokzxak1pDrFuFviQ2xIo=";
+  };
+
+  postPatch = ''
+    substituteInPlace CMakeLists.txt --replace "\\\''${prefix}/" ""
+  '';
+
+  buildInputs = [ libxml2 cppunit boost apr aprutil db expat ];
+  nativeBuildInputs = [ libtool cmake ];
+
+  meta = {
+    homepage = "https://logging.apache.org/log4cxx/index.html";
+    description = "A logging framework for C++ patterned after Apache log4j";
+    license = lib.licenses.asl20;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/log4shib/default.nix b/nixpkgs/pkgs/development/libraries/log4shib/default.nix
new file mode 100644
index 000000000000..42a428b35c7e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/log4shib/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchgit, autoreconfHook }:
+
+stdenv.mkDerivation {
+  pname = "log4shib";
+  version = "1.0.9";
+
+  src = fetchgit {
+    url = "https://git.shibboleth.net/git/cpp-log4shib.git";
+    rev = "a1afe19b7b49c32fcb03e6d72809501b8965cf85";
+    sha256 = "06rrc5l6qxlc8abzim2jcxwz2c577qrjqx15cbfqq1zfqagj9hix";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  CXXFLAGS = "-std=c++11";
+
+  meta = with lib; {
+    description = "A forked version of log4cpp that has been created for the Shibboleth project";
+    maintainers = [ ];
+    license = licenses.lgpl21;
+    homepage = "http://log4cpp.sf.net";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/loki/default.nix b/nixpkgs/pkgs/development/libraries/loki/default.nix
new file mode 100644
index 000000000000..55be8f9451d1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/loki/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "loki";
+  version = "0.1.7";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/loki-lib/Loki/Loki%20${version}/loki-${version}.tar.gz";
+    sha256 = "1xhwna961fl4298ac5cc629x5030zlw31vx4h8zws290amw5860g";
+  };
+
+  buildPhase = ''
+    substituteInPlace Makefile.common --replace /usr $out
+    make build-shared
+  '';
+
+  env.NIX_CFLAGS_COMPILE = toString [
+    "-std=c++11"
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "A C++ library of designs, containing flexible implementations of common design patterns and idioms";
+    homepage = "https://loki-lib.sourceforge.net";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ peterhoeg ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/loudmouth/default.nix b/nixpkgs/pkgs/development/libraries/loudmouth/default.nix
new file mode 100644
index 000000000000..d1a8c4887249
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/loudmouth/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl, openssl, libidn, glib, pkg-config, zlib, darwin }:
+
+stdenv.mkDerivation rec {
+  version = "1.5.3";
+  pname = "loudmouth";
+
+  src = fetchurl {
+    url = "https://mcabber.com/files/loudmouth/${pname}-${version}.tar.bz2";
+    sha256 = "0b6kd5gpndl9nzis3n6hcl0ldz74bnbiypqgqa1vgb0vrcar8cjl";
+  };
+
+  configureFlags = [ "--with-ssl=openssl" ];
+
+  propagatedBuildInputs = [ openssl libidn glib zlib ];
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = lib.optionals (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11") [
+    darwin.apple_sdk.frameworks.AppKit
+    darwin.apple_sdk.frameworks.Foundation
+  ];
+
+  meta = with lib; {
+    description = "A lightweight C library for the Jabber protocol";
+    platforms = platforms.all;
+    downloadPage = "http://mcabber.com/files/loudmouth/";
+    license = licenses.lgpl21;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/lpcnetfreedv/default.nix b/nixpkgs/pkgs/development/libraries/lpcnetfreedv/default.nix
new file mode 100644
index 000000000000..b3b1d7059d81
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lpcnetfreedv/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub, fetchurl, cmake, codec2 }:
+
+let
+  dataVersion = "191005_v1.0";
+  data = fetchurl {
+    url = "http://rowetel.com/downloads/deep/lpcnet_${dataVersion}.tgz";
+    sha256 = "sha256-UJRAkkdR/dh/+qVoPuPd3ZN69cgzuRBMzOZdUWFJJsg=";
+  };
+in
+stdenv.mkDerivation rec {
+  pname = "lpcnetfreedv";
+  version = "unstable-2022-08-22";
+
+  src = fetchFromGitHub {
+    owner = "drowe67";
+    repo = "LPCNet";
+    rev = "67a6eb74d0c07faddcdce199856862cc45779d25";
+    sha256 = "sha256-eHYZoDgoZBuuLvQn9X7H/zmK5onOAniOgY1/8RVn8gk=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  postPatch = ''
+    mkdir build
+    ln -s ${data} build/lpcnet_${dataVersion}.tgz
+  '';
+
+  meta = with lib; {
+    homepage = "https://freedv.org/";
+    description = "Experimental Neural Net speech coding for FreeDV";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ mvs ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/lrdf/default.nix b/nixpkgs/pkgs/development/libraries/lrdf/default.nix
new file mode 100644
index 000000000000..bd78a4329a59
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lrdf/default.nix
@@ -0,0 +1,36 @@
+{ config, lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook
+, librdf_raptor2, ladspaH, openssl, zlib
+, doCheck ? config.doCheckByDefault or false, ladspaPlugins
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lrdf";
+  version = "0.6.1";
+
+  src = fetchFromGitHub {
+    owner = "swh";
+    repo = "LRDF";
+    rev = "v${version}";
+    sha256 = "00wzkfb8y0aqd519ypz067cq099dpc89w69zw8ln39vl6f9x2pd4";
+  };
+
+  postPatch = lib.optionalString doCheck ''
+    sed -i -e 's:usr/local:${ladspaPlugins}:' examples/{instances,remove}_test.c
+  '';
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  propagatedBuildInputs = [ librdf_raptor2 ];
+
+  inherit doCheck;
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "Lightweight RDF library with special support for LADSPA plugins";
+    homepage = "https://sourceforge.net/projects/lrdf/";
+    license = lib.licenses.gpl2;
+    maintainers = [ lib.maintainers.marcweber ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/luabind/0.9.1-discover-luajit.patch b/nixpkgs/pkgs/development/libraries/luabind/0.9.1-discover-luajit.patch
new file mode 100644
index 000000000000..eab2bda7b9ca
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/luabind/0.9.1-discover-luajit.patch
@@ -0,0 +1,22 @@
+diff --git a/cmake/Modules/FindLua52.cmake b/cmake/Modules/FindLua52.cmake
+index f4398e4..17377c0 100644
+--- a/cmake/Modules/FindLua52.cmake
++++ b/cmake/Modules/FindLua52.cmake
+@@ -61,7 +61,7 @@ FIND_PATH(LUA_INCLUDE_DIR lua.h
+ )
+ 
+ FIND_LIBRARY(_LUA_LIBRARY_RELEASE
+-  NAMES lua52 lua5.2 lua-5.2 lua
++  NAMES lua52 lua5.2 lua-5.2 lua luajit-5.1
+   HINTS
+   $ENV{LUA_DIR}
+   PATH_SUFFIXES lib64 lib
+@@ -75,7 +75,7 @@ FIND_LIBRARY(_LUA_LIBRARY_RELEASE
+ )
+ 
+ FIND_LIBRARY(_LUA_LIBRARY_DEBUG
+-  NAMES lua52-d lua5.2-d lua-5.2-d lua-d
++  NAMES lua52-d lua5.2-d lua-5.2-d lua-d luajit-5.1-d
+   HINTS
+   $ENV{LUA_DIR}
+   PATH_SUFFIXES lib64 lib
diff --git a/nixpkgs/pkgs/development/libraries/luabind/default.nix b/nixpkgs/pkgs/development/libraries/luabind/default.nix
new file mode 100644
index 000000000000..f7f0878bdffa
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/luabind/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchFromGitHub, lua, boost, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "luabind";
+  version = "0.9.1";
+
+  src = fetchFromGitHub {
+    owner = "Oberon00";
+    repo = "luabind";
+    rev = "49814f6b47ed99e273edc5198a6ebd7fa19e813a";
+    sha256 = "sha256-JcOsoQHRvdzF2rsZBW6egOwIy7+7C4wy0LiYmbV590Q";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ boost ];
+
+  propagatedBuildInputs = [ lua ];
+
+  passthru = {
+    inherit lua;
+  };
+
+  patches = [./0.9.1-discover-luajit.patch];
+
+  meta = {
+    homepage = "https://github.com/Oberon00/luabind";
+    description = "A library that helps you create bindings between C++ and Lua";
+    license = lib.licenses.mit;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/luabridge/default.nix b/nixpkgs/pkgs/development/libraries/luabridge/default.nix
new file mode 100644
index 000000000000..c16f56065ca7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/luabridge/default.nix
@@ -0,0 +1,35 @@
+{ lib
+, stdenvNoCC
+, fetchFromGitHub
+}:
+
+stdenvNoCC.mkDerivation rec {
+  pname = "luabridge";
+  version = "2.8";
+
+  src = fetchFromGitHub {
+    owner = "vinniefalco";
+    repo = "LuaBridge";
+    rev = version;
+    sha256 = "sha256-gXrBNzE41SH98Xz480+uHQlxHjMHzs23AImxil5LZ0g=";
+  };
+
+  dontConfigure = true;
+  dontBuild = true;
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/include
+    cp -r Source/LuaBridge $out/include
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "A lightweight, dependency-free library for binding Lua to C++";
+    homepage = "https://github.com/vinniefalco/LuaBridge";
+    changelog = "https://github.com/vinniefalco/LuaBridge/blob/${version}/CHANGES.md";
+    platforms = platforms.unix;
+    license = licenses.mit;
+    maintainers = with maintainers; [ ivar ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/lucene++/default.nix b/nixpkgs/pkgs/development/libraries/lucene++/default.nix
new file mode 100644
index 000000000000..7755692d2c04
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lucene++/default.nix
@@ -0,0 +1,57 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, boost, gtest, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "lucene++";
+  version = "3.0.8";
+
+  src = fetchFromGitHub {
+    owner = "luceneplusplus";
+    repo = "LucenePlusPlus";
+    rev = "rel_${version}";
+    sha256 = "12v7r62f7pqh5h210pb74sfx6h70lj4pgfpva8ya2d55fn0qxrr2";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ boost gtest zlib ];
+
+  cmakeFlags = [ "-DCMAKE_INSTALL_LIBDIR=lib" ];
+
+  patches = [
+    (fetchpatch {
+      name = "pkgconfig_use_correct_LIBDIR_for_destination_library";
+      url = "https://github.com/luceneplusplus/LucenePlusPlus/commit/39cd44bd54e918d25ee464477992ad0dc234dcba.patch";
+      sha256 = "sha256-PP6ENNhPJMWrYDlTnr156XV8d5aX/VNX8v4vvi9ZiWo";
+    })
+    (fetchpatch {
+      name = "fix-visibility-on-mac.patch";
+      url = "https://github.com/luceneplusplus/LucenePlusPlus/commit/bc436842227aea561b68c6ae89fbd1fdefcac7b3.patch";
+      sha256 = "sha256-/S7tFZ4ht5p0cv036xF2NKZQwExbPaGINyWZiUg/lS4=";
+    })
+  ];
+
+  postPatch = ''
+    substituteInPlace src/test/CMakeLists.txt \
+      --replace "add_subdirectory(gtest)" ""
+  '';
+
+  doCheck = true;
+
+  checkPhase = ''
+    runHook preCheck
+    LD_LIBRARY_PATH=$PWD/src/contrib:$PWD/src/core \
+            src/test/lucene++-tester
+    runHook postCheck
+  '';
+
+  postInstall = ''
+    mv $out/include/pkgconfig $out/lib/
+    cp $src/src/contrib/include/*h $out/include/lucene++/
+  '';
+
+  meta = {
+    description = "C++ port of the popular Java Lucene search engine";
+    homepage = "https://github.com/luceneplusplus/LucenePlusPlus";
+    license = with lib.licenses; [ asl20 lgpl3Plus ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/luksmeta/default.nix b/nixpkgs/pkgs/development/libraries/luksmeta/default.nix
new file mode 100644
index 000000000000..afefcfed82c7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/luksmeta/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, asciidoc
+, cryptsetup
+}:
+
+stdenv.mkDerivation rec {
+  pname = "luksmeta";
+  version = "9";
+
+  src = fetchFromGitHub {
+    owner = "latchset";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "10nslwk7m1qwskd12c204ipa3cbad0q6fn0v084z2f7q6xxbkd2d";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config asciidoc ];
+  buildInputs = [ cryptsetup ];
+
+  meta = {
+    description = "Simple library for storing metadata in the LUKSv1 header";
+    homepage = "https://github.com/latchset/luksmeta/";
+    maintainers = with lib.maintainers; [ fpletz ];
+    license = lib.licenses.lgpl21Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/lyra/default.nix b/nixpkgs/pkgs/development/libraries/lyra/default.nix
new file mode 100644
index 000000000000..bb0c61ba1251
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lyra/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, installShellFiles, meson, ninja }:
+
+stdenv.mkDerivation rec {
+  pname = "lyra";
+  version = "1.6.1";
+
+  src = fetchFromGitHub {
+    owner = "bfgroup";
+    repo = "lyra";
+    rev = version;
+    sha256 = "sha256-tS2SPLiKaL8C35AmOXyJPstFUfynkE/A53rurqiySbI=";
+  };
+
+  nativeBuildInputs = [ meson ninja ];
+
+  postPatch = "sed -i s#/usr#$out#g meson.build";
+
+  postInstall = ''
+    mkdir -p $out/include
+    cp -R $src/include/* $out/include
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/bfgroup/Lyra";
+    description = "A simple to use, composable, command line parser for C++ 11 and beyond";
+    platforms = platforms.unix;
+    license = licenses.boost;
+    maintainers = with maintainers; [ davidtwco ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/lzo/default.nix b/nixpkgs/pkgs/development/libraries/lzo/default.nix
new file mode 100644
index 000000000000..480e2bb909cd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/lzo/default.nix
@@ -0,0 +1,37 @@
+{lib, stdenv, fetchurl}:
+
+stdenv.mkDerivation rec {
+  pname = "lzo";
+  version = "2.10";
+
+  src = fetchurl {
+    url = "https://www.oberhumer.com/opensource/lzo/download/${pname}-${version}.tar.gz";
+    sha256 = "0wm04519pd3g8hqpjqhfr72q8qmbiwqaxcs3cndny9h86aa95y60";
+  };
+
+  configureFlags = lib.optional (!stdenv.hostPlatform.isStatic) "--enable-shared" ;
+
+  enableParallelBuilding = true;
+
+  doCheck = true; # not cross;
+
+  strictDeps = true;
+
+  meta = with lib; {
+    description = "Real-time data (de)compression library";
+    longDescription = ''
+      LZO is a portable lossless data compression library written in ANSI C.
+      Both the source code and the compressed data format are designed to be
+      portable across platforms.
+      LZO offers pretty fast compression and *extremely* fast decompression.
+      While it favours speed over compression ratio, it includes slower
+      compression levels achieving a quite competitive compression ratio
+      while still decompressing at this very high speed.
+    '';
+
+    homepage = "http://www.oberhumer.com/opensource/lzo";
+    license = licenses.gpl2Plus;
+
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mac/default.nix b/nixpkgs/pkgs/development/libraries/mac/default.nix
new file mode 100644
index 000000000000..8bb245342ca5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mac/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchurl, fetchpatch, yasm }:
+
+stdenv.mkDerivation rec {
+  pname = "mac";
+  version = "4.11-u4-b5-s7";
+
+  src = fetchurl {
+    url = "https://www.deb-multimedia.org/pool/main/m/monkeys-audio/monkeys-audio_${version}.orig.tar.gz";
+    sha256 = "16i96cw5r3xbsivjigqp15vv32wa38k86mxq11qx1pzmpryqpqkk";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "mac-4.11.4.5.7-gcc6.patch";
+      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-sound/mac/files/mac-4.11.4.5.7-gcc6.patch?id=1bd4e0e30e4d8a8862217d7067323851b34c7fe4";
+      sha256 = "093b8m8p8s6dmc62fc8vb4hlmjc2ncb4rdgc82g0a8gg6w5kcj8x";
+    })
+    (fetchpatch {
+      name = "mac-4.11.4.5.7-output.patch";
+      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-sound/mac/files/mac-4.11.4.5.7-output.patch?id=1bd4e0e30e4d8a8862217d7067323851b34c7fe4";
+      sha256 = "0njmwj6d9jqi4pz4fax02w37gk22vda0grszrs2nn97zzmjl36zk";
+    })
+  ];
+
+  CXXFLAGS = "-DSHNTOOL";
+
+  nativeBuildInputs = [ yasm ];
+
+  meta = with lib; {
+    description = "APE codec and decompressor";
+    homepage = "https://www.deb-multimedia.org/dists/testing/main/binary-amd64/package/monkeys-audio.php";
+    license = licenses.unfreeRedistributable;
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/maeparser/default.nix b/nixpkgs/pkgs/development/libraries/maeparser/default.nix
new file mode 100644
index 000000000000..16459987c13f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/maeparser/default.nix
@@ -0,0 +1,30 @@
+{ fetchFromGitHub
+, lib
+, stdenv
+, boost
+, zlib
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "maeparser";
+  version = "1.3.1";
+
+  src = fetchFromGitHub {
+    owner = "schrodinger";
+    repo = "maeparser";
+    rev = "v${version}";
+    sha256 = "sha256-+eCTOU0rqFQC87wcxgINGLsULfbIr/wKxQTkRR59JVc=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ boost zlib ];
+
+  meta = with lib; {
+    homepage = "https://github.com/schrodinger/maeparser";
+    description = "Maestro file parser";
+    maintainers = [ maintainers.rmcgibbo ];
+    license = licenses.mit;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/magic-enum/default.nix b/nixpkgs/pkgs/development/libraries/magic-enum/default.nix
new file mode 100644
index 000000000000..ccf439ca9190
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/magic-enum/default.nix
@@ -0,0 +1,31 @@
+{ fetchFromGitHub
+, lib
+, stdenv
+, cmake
+}:
+stdenv.mkDerivation rec{
+  pname = "magic-enum";
+  version = "0.8.2";
+  src = fetchFromGitHub {
+    owner = "Neargye";
+    repo = "magic_enum";
+    rev = "v${version}";
+    sha256 = "sha256-k4zCEQxO0N/o1hDYxw5p9u0BMwP/5oIoe/4yw7oqEo0=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  # disable tests until upstream fixes build issues with gcc 12
+  # see https://github.com/Neargye/magic_enum/issues/235
+  doCheck = false;
+  cmakeFlags = [
+    "-DMAGIC_ENUM_OPT_BUILD_TESTS=OFF"
+  ];
+
+  meta = with lib;{
+    description = "Static reflection for enums (to string, from string, iteration) for modern C++";
+    homepage = "https://github.com/Neargye/magic_enum";
+    license = licenses.mit;
+    maintainers = with maintainers; [ Alper-Celik ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mailcore2/default.nix b/nixpkgs/pkgs/development/libraries/mailcore2/default.nix
new file mode 100644
index 000000000000..86b4a320b68f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mailcore2/default.nix
@@ -0,0 +1,72 @@
+{ stdenv, lib, fetchFromGitHub, cmake, libetpan, icu, cyrus_sasl, libctemplate
+, libuchardet, pkg-config, glib, html-tidy, libxml2, libuuid, openssl
+, darwin
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mailcore2";
+
+  version = "0.6.4";
+
+  src = fetchFromGitHub {
+    owner  = "MailCore";
+    repo   = "mailcore2";
+    rev    = version;
+    sha256 = "0a69q11z194fdfwyazjyyylx57sqs9j4lz7jwh5qcws8syqgb23z";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [
+    libetpan cyrus_sasl libctemplate libuchardet
+    html-tidy libxml2 openssl
+  ] ++ lib.optionals stdenv.isLinux [
+    glib
+    icu
+    libuuid
+  ] ++ lib.optionals stdenv.isDarwin [
+    darwin.apple_sdk.frameworks.Foundation
+  ];
+
+  postPatch = ''
+    substituteInPlace CMakeLists.txt \
+       --replace " icule iculx" "" \
+       --replace "tidy/tidy.h" "tidy.h" \
+       --replace "/usr/include/tidy" "${html-tidy}/include" \
+       --replace "/usr/include/libxml2" "${libxml2.dev}/include/libxml2"
+    substituteInPlace src/core/basetypes/MCHTMLCleaner.cpp \
+      --replace buffio.h tidybuffio.h
+    substituteInPlace src/core/basetypes/MCString.cpp \
+      --replace "xmlErrorPtr" "const xmlError *"
+  '' + lib.optionalString (!stdenv.isDarwin) ''
+    substituteInPlace src/core/basetypes/MCICUTypes.h \
+      --replace "__CHAR16_TYPE__ UChar" "char16_t UChar"
+  '';
+
+  cmakeFlags = lib.optionals (!stdenv.isDarwin) [
+    "-DBUILD_SHARED_LIBS=ON"
+  ];
+
+  installPhase = ''
+    mkdir $out
+    cp -r src/include $out
+
+    mkdir $out/lib
+    cp src/libMailCore.* $out/lib
+  '';
+
+  doCheck = !stdenv.isDarwin;
+  checkPhase = ''
+    (
+      cd unittest
+      TZ=PST8PDT ./unittestcpp ../../unittest/data
+    )
+  '';
+
+  meta = with lib; {
+    description = "A simple and asynchronous API to work with e-mail protocols IMAP, POP and SMTP";
+    homepage    = "http://libmailcore.com";
+    license     = licenses.bsd3;
+    maintainers = with maintainers; [ ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/malcontent/better-separation.patch b/nixpkgs/pkgs/development/libraries/malcontent/better-separation.patch
new file mode 100644
index 000000000000..24effe9dde04
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/malcontent/better-separation.patch
@@ -0,0 +1,61 @@
+commit 05666e70f1ef63632aea8b1aed84351a6e30d0d5
+Author: Jan Tojnar <jtojnar@gmail.com>
+Date:   Thu Jul 23 18:49:03 2020 +0200
+
+    Improve separation between malcontent and malcontent-ui packages
+    
+    These artefacts go into both packages by default:
+    
+    * malcontent-control – a CLI tool
+    * PAM module
+    * gettext locale data
+    * help pages ✨
+    * AccountService/D-Bus interfaces
+    * Polkit com.endlessm.ParentalControls rules and policy
+    
+    Items marked with ✨ will go to ui package, while the rest is installed with the base library.
+    
+    See also the packaging done by upstream in Endless:
+    https://github.com/endlessm/malcontent/tree/5482b7eb99aee9b8c344629bc078e193d3c26ffc/debian
+    
+    Cannot upstream this since they are worried about maintainability:
+    https://gitlab.freedesktop.org/pwithnall/malcontent/merge_requests/38#note_437946
+
+diff --git a/meson.build b/meson.build
+index 038dd35..e3c77f0 100644
+--- a/meson.build
++++ b/meson.build
+@@ -123,9 +123,8 @@ test_env = [
+   'LC_ALL=C.UTF-8',
+ ]
+ 
+-subdir('accounts-service')
+-subdir('help')
+ if not get_option('use_system_libmalcontent')
++  subdir('accounts-service')
+   subdir('libmalcontent')
+ else
+   libmalcontent_api_version = '0'
+@@ -143,14 +142,19 @@ if get_option('ui').enabled()
+   )
+   subdir('libmalcontent-ui')
+ endif
+-subdir('malcontent-client')
++if not get_option('use_system_libmalcontent')
++  subdir('malcontent-client')
++endif
+ if get_option('ui').enabled()
+   subdir('malcontent-control')
++  subdir('help')
+ 
+   gnome.post_install(
+     gtk_update_icon_cache: true,
+     update_desktop_database: true,
+   )
+ endif
+-subdir('pam')
+-subdir('po')
++if not get_option('use_system_libmalcontent')
++  subdir('pam')
++  subdir('po')
++endif
diff --git a/nixpkgs/pkgs/development/libraries/malcontent/default.nix b/nixpkgs/pkgs/development/libraries/malcontent/default.nix
new file mode 100644
index 000000000000..d897230f8f37
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/malcontent/default.nix
@@ -0,0 +1,104 @@
+{ lib, stdenv
+, fetchFromGitLab
+, fetchpatch
+, meson
+, ninja
+, pkg-config
+, gobject-introspection
+, wrapGAppsNoGuiHook
+, glib
+, coreutils
+, accountsservice
+, dbus
+, pam
+, polkit
+, glib-testing
+, python3
+, nixosTests
+}:
+
+stdenv.mkDerivation rec {
+  pname = "malcontent";
+  version = "0.11.1";
+
+  outputs = [ "bin" "out" "lib" "pam" "dev" "man" "installedTests" ];
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "pwithnall";
+    repo = "malcontent";
+    rev = version;
+    hash = "sha256-NZwVCnQrEG2gecUjuWe1+cyWFR3OdYJCmj87V14Uwjw=";
+  };
+
+  patches = [
+    # Allow installing installed tests to a separate output.
+    ./installed-tests-path.patch
+
+    # Do not build things that are part of malcontent-ui package
+    ./better-separation.patch
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gobject-introspection
+    wrapGAppsNoGuiHook
+  ];
+
+  buildInputs = [
+    accountsservice
+    dbus
+    pam
+    polkit
+    glib-testing
+    (python3.withPackages (pp: with pp; [
+      pygobject3
+    ]))
+  ];
+
+  propagatedBuildInputs = [
+    glib
+  ];
+
+  mesonFlags = [
+    "-Dinstalled_tests=true"
+    "-Dinstalled_test_prefix=${placeholder "installedTests"}"
+    "-Dpamlibdir=${placeholder "pam"}/lib/security"
+    "-Dui=disabled"
+  ];
+
+  postPatch = ''
+    substituteInPlace libmalcontent/tests/app-filter.c \
+      --replace "/usr/bin/true" "${coreutils}/bin/true" \
+      --replace "/bin/true" "${coreutils}/bin/true" \
+      --replace "/usr/bin/false" "${coreutils}/bin/false" \
+      --replace "/bin/false" "${coreutils}/bin/false"
+  '';
+
+  postInstall = ''
+    # `giDiscoverSelf` only picks up paths in `out` output.
+    # This needs to be in `postInstall` so that it runs before
+    # `gappsWrapperArgsHook` that runs as one of `preFixupPhases`.
+    addToSearchPath GI_TYPELIB_PATH "$lib/lib/girepository-1.0"
+  '';
+
+  passthru = {
+    tests = {
+      installedTests = nixosTests.installed-tests.malcontent;
+    };
+  };
+
+  meta = with lib; {
+    # We need to install Polkit & AccountsService data files in `out`
+    # but `buildEnv` only uses `bin` when both `bin` and `out` are present.
+    outputsToInstall = [ "bin" "out" "man" ];
+
+    description = "Parental controls library";
+    homepage = "https://gitlab.freedesktop.org/pwithnall/malcontent";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ jtojnar ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/malcontent/installed-tests-path.patch b/nixpkgs/pkgs/development/libraries/malcontent/installed-tests-path.patch
new file mode 100644
index 000000000000..5d26c0f864f8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/malcontent/installed-tests-path.patch
@@ -0,0 +1,56 @@
+diff --git a/libmalcontent/tests/meson.build b/libmalcontent/tests/meson.build
+index 610bc35..13e0713 100644
+--- a/libmalcontent/tests/meson.build
++++ b/libmalcontent/tests/meson.build
+@@ -72,9 +72,9 @@ test_programs = [
+   ], deps],
+ ]
+ 
+-installed_tests_metadir = join_paths(datadir, 'installed-tests',
++installed_tests_metadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests',
+                                      'libmalcontent-' + libmalcontent_api_version)
+-installed_tests_execdir = join_paths(libexecdir, 'installed-tests',
++installed_tests_execdir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests',
+                                      'libmalcontent-' + libmalcontent_api_version)
+ 
+ foreach program: test_programs
+@@ -105,4 +105,4 @@ foreach program: test_programs
+     env: envs,
+     args: ['--tap'],
+   )
+-endforeach
+\ No newline at end of file
++endforeach
+diff --git a/meson_options.txt b/meson_options.txt
+index d516c70..583cb94 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -4,6 +4,12 @@ option(
+   value: false,
+   description: 'enable installed tests'
+ )
++option(
++  'installed_test_prefix',
++  type: 'string',
++  value: '',
++  description: 'Prefix for installed tests'
++)
+ option(
+   'pamlibdir',
+   type: 'string',
+diff --git a/pam/tests/meson.build b/pam/tests/meson.build
+index 0560dcb..a74dab2 100644
+--- a/pam/tests/meson.build
++++ b/pam/tests/meson.build
+@@ -12,9 +12,9 @@ test_programs = [
+   ['pam_malcontent', [], deps],
+ ]
+ 
+-installed_tests_metadir = join_paths(datadir, 'installed-tests',
++installed_tests_metadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests',
+                                      'libmalcontent-' + libmalcontent_api_version)
+-installed_tests_execdir = join_paths(libexecdir, 'installed-tests',
++installed_tests_execdir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests',
+                                      'libmalcontent-' + libmalcontent_api_version)
+ 
+ foreach program: test_programs
diff --git a/nixpkgs/pkgs/development/libraries/malcontent/ui.nix b/nixpkgs/pkgs/development/libraries/malcontent/ui.nix
new file mode 100644
index 000000000000..59950a75c745
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/malcontent/ui.nix
@@ -0,0 +1,76 @@
+{ lib, stdenv
+, meson
+, ninja
+, pkg-config
+, gobject-introspection
+, itstool
+, wrapGAppsHook4
+, glib
+, accountsservice
+, dbus
+, flatpak
+, malcontent
+, gtk4
+, libadwaita
+, appstream
+, desktop-file-utils
+, polkit
+, glib-testing
+}:
+
+stdenv.mkDerivation rec {
+  pname = "malcontent-ui";
+
+  inherit (malcontent) version src;
+
+  outputs = [ "out" "lib" "dev" ];
+
+  patches = [
+    # Allow installing installed tests to a separate output.
+    ./installed-tests-path.patch
+
+    # Do not build things that are part of malcontent package
+    ./better-separation.patch
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gobject-introspection
+    itstool
+    desktop-file-utils
+    wrapGAppsHook4
+  ];
+
+  buildInputs = [
+    appstream
+    dbus
+    polkit
+    glib-testing
+    flatpak
+  ];
+
+  propagatedBuildInputs = [
+    accountsservice
+    malcontent
+    glib
+    gtk4
+    libadwaita
+  ];
+
+  mesonFlags = [
+    "-Dinstalled_tests=true"
+    "-Dinstalled_test_prefix=${placeholder "installedTests"}"
+    "-Duse_system_libmalcontent=true"
+    "-Dui=enabled"
+  ];
+
+  meta = with lib; {
+    description = "UI components for parental controls library";
+    homepage = "https://gitlab.freedesktop.org/pwithnall/malcontent";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ jtojnar ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mapbox-gl-native/default.nix b/nixpkgs/pkgs/development/libraries/mapbox-gl-native/default.nix
new file mode 100644
index 000000000000..01d51bdf7461
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mapbox-gl-native/default.nix
@@ -0,0 +1,69 @@
+{ lib, mkDerivation, fetchFromGitHub, fetchpatch, cmake, pkg-config
+, qtbase, curl, libuv, glfw3, rapidjson }:
+
+mkDerivation rec {
+  pname = "mapbox-gl-native";
+  version = "1.6.0";
+
+  src = fetchFromGitHub {
+    owner = "mapbox";
+    repo = "mapbox-gl-native";
+    rev = "maps-v${version}";
+    sha256 = "027rw23yvd5a6nl9b5hsanddc44nyb17l2whdcq9fxb9n6vcda4c";
+    fetchSubmodules = true;
+  };
+
+  patches = [
+    # https://github.com/mapbox/mapbox-gl-native/pull/16591
+    (fetchpatch {
+      name = "add-support-for-qmapboxgl-installation.patch";
+      url = "https://github.com/mapbox/mapbox-gl-native/commit/e18467d755f470b26f61f6893eddd76ecf0816e6.patch";
+      sha256 = "0gs7wmkvyhf2db4cwbsq31sprsh1avi70ggvi32bk0wn3cw4d79b";
+    })
+    (fetchpatch {
+      name = "add-support-for-using-qmapboxgl-as-a-proper-cmake-dependency.patch";
+      url = "https://github.com/mapbox/mapbox-gl-native/commit/ab27b9b8207754ef731b588d187c470ffb084455.patch";
+      sha256 = "1lr5p1g4qaizs57vjqry9aq8k1ki59ks0y975chlnrm2sffp140r";
+    })
+    (fetchpatch {
+      name = "skip-license-check.patch";
+      url = "https://git.alpinelinux.org/aports/plain/testing/mapbox-gl-native/0002-skip-license-check.patch?id=6751a93dca26b0b3ceec9eb151272253a2fe497e";
+      sha256 = "1yybwzxbvn0lqb1br1fyg7763p2h117s6mkmywkl4l7qg9daa7ba";
+    })
+    (fetchpatch {
+      name = "fix-compilation.patch";
+      url = "https://aur.archlinux.org/cgit/aur.git/plain/fix-compilation.patch?h=mapbox-gl-native";
+      hash = "sha256-KgJHyoIdKdnQo+gedns3C+mEXlaTH/UtyQsaYR1T3iI=";
+    })
+    (fetchpatch {
+      name = "fix-narrowing-conversion.patch";
+      url = "https://github.com/mapbox/mapbox-gl-native/commit/2955d0e479f57a39a0af4a0fa7ca7683455cca58.patch";
+      hash = "sha256-Jk7OLb9/mVtc2mm0AL1h9zcSiQ54jogNI+q6ojY0HEo=";
+    })
+  ];
+
+  postPatch = ''
+    # don't use vendored rapidjson
+    rm -r vendor/mapbox-base/extras/rapidjson
+  '';
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ curl libuv glfw3 qtbase rapidjson ];
+
+  cmakeFlags = [
+    "-DMBGL_WITH_QT=ON"
+    "-DMBGL_WITH_QT_LIB_ONLY=ON"
+    "-DMBGL_WITH_QT_HEADLESS=OFF"
+  ];
+  env.NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations -Wno-error=type-limits";
+
+  meta = with lib; {
+    # Does not build against gcc-13, the repository is archived upstream.
+    broken = true;
+    description = "Interactive, thoroughly customizable maps in native Android, iOS, macOS, Node.js, and Qt applications, powered by vector tiles and OpenGL";
+    homepage = "https://mapbox.com/mobile";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ Thra11 dotlambda ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mapbox-gl-qml/default.nix b/nixpkgs/pkgs/development/libraries/mapbox-gl-qml/default.nix
new file mode 100644
index 000000000000..1d068a90d3b3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mapbox-gl-qml/default.nix
@@ -0,0 +1,38 @@
+{ lib
+, mkDerivation
+, fetchFromGitHub
+, cmake
+, pkg-config
+, curl
+, qtbase
+, qtlocation
+, maplibre-gl-native
+}:
+
+mkDerivation rec {
+  pname = "mapbox-gl-qml";
+  version = "2.1.1";
+
+  src = fetchFromGitHub {
+    owner = "rinigus";
+    repo = "mapbox-gl-qml";
+    rev = version;
+    hash = "sha256-zZcD85nOZZ067FRvSuzE8lr2gyuVxpcZGp44D4ayc3Q=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ curl qtlocation maplibre-gl-native ];
+
+  postPatch = ''
+    substituteInPlace src/CMakeLists.txt \
+      --replace ' ''${QT_INSTALL_QML}' " $out/${qtbase.qtQmlPrefix}"
+  '';
+
+  meta = with lib; {
+    description = "Unofficial Mapbox GL Native bindings for Qt QML";
+    homepage = "https://github.com/rinigus/mapbox-gl-qml";
+    license = licenses.lgpl3Only;
+    maintainers = with maintainers; [ Thra11 dotlambda ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/maplibre-gl-native/default.nix b/nixpkgs/pkgs/development/libraries/maplibre-gl-native/default.nix
new file mode 100644
index 000000000000..3b2e988d4795
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/maplibre-gl-native/default.nix
@@ -0,0 +1,77 @@
+{ lib
+, mkDerivation
+, fetchFromGitHub
+, fetchpatch
+, fetchpatch2
+, cmake
+, pkg-config
+, qtbase
+, curl
+, libuv
+, glfw3
+, rapidjson
+, stdenv
+}:
+
+mkDerivation rec {
+  pname = "maplibre-gl-native";
+  version = "2.0.1";
+
+  src = fetchFromGitHub {
+    owner = "maplibre";
+    repo = "maplibre-gl-native";
+    rev = "qt-v${version}";
+    fetchSubmodules = true;
+    hash = "sha256-g5J873U/6mrl27iquPl3BdEGhMxkOdfP15dHr27wa48=";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "skip-license-check.patch";
+      url = "https://git.alpinelinux.org/aports/plain/testing/mapbox-gl-native/0002-skip-license-check.patch?id=6751a93dca26b0b3ceec9eb151272253a2fe497e";
+      sha256 = "1yybwzxbvn0lqb1br1fyg7763p2h117s6mkmywkl4l7qg9daa7ba";
+    })
+    (fetchpatch2 {
+      name = "cstdint.patch";
+      url = "https://git.alpinelinux.org/aports/plain/community/maplibre-gl-native/cstdint.patch?id=ae8edc6b02df388ef37a69c12a5df25dd8550238";
+      hash = "sha256-o7wT/rk5vgwxEutAyIEAxwfKNxCoBtkhVcLjc7uTsYc=";
+    })
+  ];
+
+  postPatch = ''
+    # don't use vendored rapidjson
+    rm -r vendor/mapbox-base/extras/rapidjson
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    curl
+    libuv
+    glfw3
+    qtbase
+    rapidjson
+  ];
+
+  cmakeFlags = [
+    "-DMBGL_WITH_QT=ON"
+    "-DMBGL_WITH_QT_LIB_ONLY=ON"
+    "-DMBGL_WITH_QT_HEADLESS=OFF"
+  ];
+
+  env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [
+    # Needed with GCC 12 but problematic with some old GCCs
+    "-Wno-error=use-after-free"
+  ]);
+
+  meta = with lib; {
+    description = "Open-source alternative to Mapbox GL Native";
+    homepage = "https://maplibre.org/";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ dotlambda ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mapnik/catch2-src.patch b/nixpkgs/pkgs/development/libraries/mapnik/catch2-src.patch
new file mode 100644
index 000000000000..04c6f7add217
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mapnik/catch2-src.patch
@@ -0,0 +1,14 @@
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index 0705ddce1..771291b88 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -7,8 +7,7 @@ include(FetchContent)
+ 
+ FetchContent_Declare(
+   Catch2
+-  GIT_REPOSITORY https://github.com/catchorg/Catch2.git
+-  GIT_TAG        v2.13.7)
++  SOURCE_DIR @catch2_src@)
+ FetchContent_MakeAvailable(Catch2)
+ 
+ if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.19.0") 
diff --git a/nixpkgs/pkgs/development/libraries/mapnik/cmake-harfbuzz.patch b/nixpkgs/pkgs/development/libraries/mapnik/cmake-harfbuzz.patch
new file mode 100644
index 000000000000..aa08f351aa69
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mapnik/cmake-harfbuzz.patch
@@ -0,0 +1,26 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ffb86d4ac..1775b986f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -177,19 +177,8 @@ endif()
+ 
+ mapnik_find_package(Freetype REQUIRED)
+ 
+-# try to find harfbuzz with the native configuration and fallback to our "own" FindHarfBuzz
+-mapnik_find_package(harfbuzz CONFIG QUIET)
+-if(harfbuzz_FOUND)
+-    message(STATUS "Found harfbuzz native cmake")
+-    list(APPEND MAPNIK_OPTIONAL_LIBS harfbuzz::harfbuzz)
+-else()
+-    # Use pkg-config when harfbuzz is not found.
+-    # It might be possible that in future version harfbuzz could only be found via pkg-config.
+-    # harfbuzz related discussion: https://github.com/harfbuzz/harfbuzz/issues/2653
+-    message(STATUS "harfbuzz not found via cmake. Searching via pkg-config...")
+-    mapnik_pkg_check_modules(harfbuzz REQUIRED IMPORTED_TARGET harfbuzz>=${HARFBUZZ_MIN_VERSION})
+-    list(APPEND MAPNIK_OPTIONAL_LIBS PkgConfig::harfbuzz)
+-endif()
++pkg_check_modules(harfbuzz REQUIRED IMPORTED_TARGET harfbuzz)
++list(APPEND MAPNIK_OPTIONAL_LIBS PkgConfig::harfbuzz)
+ 
+ if(USE_EXTERNAL_MAPBOX_GEOMETRY)
+     # this is used to provide a way to specify include dirs with CACHE VARIABLES
diff --git a/nixpkgs/pkgs/development/libraries/mapnik/datasource-ogr-test-should-fail.patch b/nixpkgs/pkgs/development/libraries/mapnik/datasource-ogr-test-should-fail.patch
new file mode 100644
index 000000000000..1df64216d20b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mapnik/datasource-ogr-test-should-fail.patch
@@ -0,0 +1,13 @@
+diff --git a/test/unit/datasource/ogr.cpp b/test/unit/datasource/ogr.cpp
+index 8441ecc55..8dabc67b0 100644
+--- a/test/unit/datasource/ogr.cpp
++++ b/test/unit/datasource/ogr.cpp
+@@ -30,7 +30,7 @@
+ #include <mapnik/image_util.hpp>
+ #include <mapnik/datasource_cache.hpp>
+ 
+-TEST_CASE("ogr")
++TEST_CASE("ogr", "[!shouldfail]")
+ {
+     const bool have_ogr_plugin = mapnik::datasource_cache::instance().plugin_registered("ogr");
+     if (have_ogr_plugin)
diff --git a/nixpkgs/pkgs/development/libraries/mapnik/default.nix b/nixpkgs/pkgs/development/libraries/mapnik/default.nix
new file mode 100644
index 000000000000..14ecb984da59
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mapnik/default.nix
@@ -0,0 +1,116 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, buildPackages
+, cmake
+, pkg-config
+, substituteAll
+, boost
+, cairo
+, freetype
+, gdal
+, harfbuzz
+, icu
+, libjpeg
+, libpng
+, libtiff
+, libwebp
+, libxml2
+, proj
+, python3
+, sqlite
+, zlib
+, catch2
+, postgresql
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mapnik";
+  version = "unstable-2023-11-28";
+
+  src = fetchFromGitHub {
+    owner = "mapnik";
+    repo = "mapnik";
+    rev = "2e1b32512b1f8b52331994f2a809d8a383c0c984";
+    hash = "sha256-qGdUfu6gFWum/Id/W3ICeGZroMQ3Tz9PQf1tt+gaaXM=";
+    fetchSubmodules = true;
+  };
+
+  postPatch = ''
+    substituteInPlace configure \
+      --replace '$PYTHON scons/scons.py' ${buildPackages.scons}/bin/scons
+    rm -r scons
+  '';
+
+  # a distinct dev output makes python-mapnik fail
+  outputs = [ "out" ];
+
+  patches = [
+    # The lib/cmake/harfbuzz/harfbuzz-config.cmake file in harfbuzz.dev is faulty,
+    # as it provides the wrong libdir. The workaround is to just rely on
+    # pkg-config to locate harfbuzz shared object files.
+    # Upstream HarfBuzz wants to drop CMake support anyway.
+    # See discussion: https://github.com/mapnik/mapnik/issues/4265
+    ./cmake-harfbuzz.patch
+    # prevent CMake from trying to get libraries on the Internet
+    (substituteAll {
+      src = ./catch2-src.patch;
+      catch2_src = catch2.src;
+    })
+    # Disable broken test
+    # See discussion: https://github.com/mapnik/mapnik/issues/4329#issuecomment-1248778398
+    ./datasource-ogr-test-should-fail.patch
+    # Account for full paths when generating libmapnik.pc
+    ./export-pkg-config-full-paths.patch
+  ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [
+    boost
+    cairo
+    freetype
+    gdal
+    harfbuzz
+    icu
+    libjpeg
+    libpng
+    libtiff
+    libwebp
+    proj
+    python3
+    sqlite
+    zlib
+    libxml2
+    postgresql
+  ];
+
+  cmakeFlags = [
+    # Would require qt otherwise.
+    "-DBUILD_DEMO_VIEWER:BOOL=OFF"
+  ];
+
+  doCheck = true;
+
+  # mapnik-config is currently not build with CMake. So we use the SCons for
+  # this one. We can't add SCons to nativeBuildInputs though, as stdenv would
+  # then try to build everything with scons.
+  preBuild = ''
+    cd ..
+    ${buildPackages.scons}/bin/scons utils/mapnik-config
+    cd build
+  '';
+
+  preInstall = ''
+    mkdir -p $out/bin
+    cp ../utils/mapnik-config/mapnik-config $out/bin/mapnik-config
+  '';
+
+  meta = with lib; {
+    description = "An open source toolkit for developing mapping applications";
+    homepage = "https://mapnik.org";
+    maintainers = with maintainers; [ hrdinka hummeltech ];
+    license = licenses.lgpl21Plus;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mapnik/export-pkg-config-full-paths.patch b/nixpkgs/pkgs/development/libraries/mapnik/export-pkg-config-full-paths.patch
new file mode 100644
index 000000000000..ec80423689d3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mapnik/export-pkg-config-full-paths.patch
@@ -0,0 +1,15 @@
+diff --git a/cmake/MapnikExportPkgConfig.cmake b/cmake/MapnikExportPkgConfig.cmake
+index e459f80ef..ec18a71a2 100644
+--- a/cmake/MapnikExportPkgConfig.cmake
++++ b/cmake/MapnikExportPkgConfig.cmake
+@@ -65,8 +65,8 @@ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=${prefix}
+ includedir=${prefix}/include
+ libdir=${exec_prefix}/lib
+-fonts_dir=${prefix}/@FONTS_INSTALL_DIR@
+-plugins_dir=${prefix}/@PLUGINS_INSTALL_DIR@
++fonts_dir=@FONTS_INSTALL_DIR@
++plugins_dir=@PLUGINS_INSTALL_DIR@
+ 
+ Name: @_lib_name@
+ Description: @_description@
diff --git a/nixpkgs/pkgs/development/libraries/marisa/default.nix b/nixpkgs/pkgs/development/libraries/marisa/default.nix
new file mode 100644
index 000000000000..4a3f8be04172
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/marisa/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "marisa";
+  version = "0.2.6";
+
+  src = fetchFromGitHub {
+    owner = "s-yata";
+    repo = "marisa-trie";
+    rev = "v${version}";
+    sha256 = "1hy8hfksizk1af6kg8z3b9waiz6d5ggd73fiqcvmhfgra36dscyq";
+  };
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  meta = with lib; {
+    homepage    = "https://github.com/s-yata/marisa-trie";
+    description = "Static and space-efficient trie data structure library";
+    license     = licenses.bsd3;
+    maintainers = with maintainers; [ sifmelcara ];
+    platforms   = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/marl/default.nix b/nixpkgs/pkgs/development/libraries/marl/default.nix
new file mode 100644
index 000000000000..4545264aad9e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/marl/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, cmake, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "marl";
+  version = "1.0.0";  # Based on marl's CHANGES.md
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = pname;
+    sha256 = "0pnbarbyv82h05ckays2m3vgxzdhpcpg59bnzsddlb5v7rqhw51w";
+    rev = "40209e952f5c1f3bc883d2b7f53b274bd454ca53";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  # Turn on the flag to install after building the library.
+  cmakeFlags = ["-DMARL_INSTALL=ON"];
+
+  meta = with lib; {
+    homepage = "https://github.com/google/marl";
+    description = "A hybrid thread / fiber task scheduler written in C++ 11";
+    platforms = platforms.all;
+    license = licenses.asl20;
+    maintainers = with maintainers; [ breakds ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mathgl/default.nix b/nixpkgs/pkgs/development/libraries/mathgl/default.nix
new file mode 100644
index 000000000000..811395d27588
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mathgl/default.nix
@@ -0,0 +1,35 @@
+{ lib
+, stdenv
+, fetchurl
+, cmake
+, zlib
+, libpng
+, libGL
+}:
+stdenv.mkDerivation rec {
+  pname = "mathgl";
+  version = "8.0.1";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/mathgl/mathgl-${version}.tar.gz";
+    sha256 = "sha256-yoS/lIDDntMRLpIMFs49jyiYaY9iiW86V3FBKGIqVao=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = [
+    zlib
+    libpng
+    libGL
+  ];
+
+  meta = with lib; {
+    description = "A library for scientific data visualization";
+    homepage = "https://mathgl.sourceforge.net/";
+    license = with licenses; [ gpl3 lgpl3 ];
+    platforms = platforms.linux;
+    maintainers = [ maintainers.GabrielDougherty ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/matio/default.nix b/nixpkgs/pkgs/development/libraries/matio/default.nix
new file mode 100644
index 000000000000..aebd14780636
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/matio/default.nix
@@ -0,0 +1,18 @@
+{ lib, stdenv, fetchurl }:
+stdenv.mkDerivation rec {
+  pname = "matio";
+  version = "1.5.26";
+  src = fetchurl {
+    url = "mirror://sourceforge/matio/${pname}-${version}.tar.gz";
+    sha256 = "sha256-i0fCn1jkaNunpVVTccanKtTGqosV9FmysLZaMDwGOTM=";
+  };
+
+  meta = with lib; {
+    description = "A C library for reading and writing Matlab MAT files";
+    homepage = "http://matio.sourceforge.net/";
+    license = licenses.bsd2;
+    maintainers = [ ];
+    mainProgram = "matdump";
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/matrix-sdk-crypto-nodejs/Cargo-beta.3.lock b/nixpkgs/pkgs/development/libraries/matrix-sdk-crypto-nodejs/Cargo-beta.3.lock
new file mode 100644
index 000000000000..b5045040a3d5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/matrix-sdk-crypto-nodejs/Cargo-beta.3.lock
@@ -0,0 +1,5564 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "addr2line"
+version = "0.17.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b"
+dependencies = [
+ "gimli",
+]
+
+[[package]]
+name = "adler"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
+
+[[package]]
+name = "adler32"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234"
+
+[[package]]
+name = "aead"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877"
+dependencies = [
+ "generic-array",
+ "rand_core 0.6.3",
+]
+
+[[package]]
+name = "aes"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bfe0133578c0986e1fe3dfcd4af1cc5b2dd6c3dbf534d69916ce16a2701d40ba"
+dependencies = [
+ "cfg-if",
+ "cipher 0.4.3",
+ "cpufeatures",
+]
+
+[[package]]
+name = "ahash"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47"
+dependencies = [
+ "getrandom 0.2.7",
+ "once_cell",
+ "version_check",
+]
+
+[[package]]
+name = "aho-corasick"
+version = "0.7.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "android_system_properties"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "ansi_term"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "anyhow"
+version = "1.0.65"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "98161a4e3e2184da77bb14f02184cdd111e83bbbcc9979dfee3c44b9a85f5602"
+
+[[package]]
+name = "anymap2"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d301b3b94cb4b2f23d7917810addbbaff90738e0ca2be692bd027e70d7e0330c"
+
+[[package]]
+name = "app_dirs2"
+version = "2.5.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "47a8d2d8dbda5fca0a522259fb88e4f55d2b10ad39f5f03adeebf85031eba501"
+dependencies = [
+ "jni",
+ "ndk-context",
+ "winapi",
+ "xdg",
+]
+
+[[package]]
+name = "arc-swap"
+version = "1.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "983cd8b9d4b02a6dc6ffa557262eb5858a27a0038ffffe21a0f133eaa819a164"
+
+[[package]]
+name = "arrayref"
+version = "0.3.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544"
+
+[[package]]
+name = "arrayvec"
+version = "0.4.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9"
+dependencies = [
+ "nodrop",
+]
+
+[[package]]
+name = "arrayvec"
+version = "0.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "askama"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fb98f10f371286b177db5eeb9a6e5396609555686a35e1d4f7b9a9c6d8af0139"
+dependencies = [
+ "askama_derive",
+ "askama_escape",
+ "askama_shared",
+]
+
+[[package]]
+name = "askama_derive"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87bf87e6e8b47264efa9bde63d6225c6276a52e05e91bf37eaa8afd0032d6b71"
+dependencies = [
+ "askama_shared",
+ "proc-macro2",
+ "syn",
+]
+
+[[package]]
+name = "askama_escape"
+version = "0.10.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "619743e34b5ba4e9703bba34deac3427c72507c7159f5fd030aea8cac0cfe341"
+
+[[package]]
+name = "askama_shared"
+version = "0.12.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bf722b94118a07fcbc6640190f247334027685d4e218b794dbfe17c32bf38ed0"
+dependencies = [
+ "askama_escape",
+ "mime",
+ "mime_guess",
+ "nom",
+ "proc-macro2",
+ "quote",
+ "serde",
+ "syn",
+ "toml",
+]
+
+[[package]]
+name = "assert-json-diff"
+version = "2.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "47e4f2b81832e72834d7518d8487a0396a28cc408186a2e8854c0f98011faf12"
+dependencies = [
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "assert_matches"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9"
+
+[[package]]
+name = "assign"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5f093eed78becd229346bf859eec0aa4dd7ddde0757287b2b4107a1f09c80002"
+
+[[package]]
+name = "async-channel"
+version = "1.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e14485364214912d3b19cc3435dde4df66065127f05fa0d75c712f36f12c2f28"
+dependencies = [
+ "concurrent-queue",
+ "event-listener",
+ "futures-core",
+]
+
+[[package]]
+name = "async-lock"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e97a171d191782fba31bb902b14ad94e24a68145032b7eedf871ab0bc0d077b6"
+dependencies = [
+ "event-listener",
+]
+
+[[package]]
+name = "async-once-cell"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f61305cacf1d0c5c9d3ee283d22f8f1f8c743a18ceb44a1b102bd53476c141de"
+
+[[package]]
+name = "async-stream"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dad5c83079eae9969be7fadefe640a1c566901f05ff91ab221de4b6f68d9507e"
+dependencies = [
+ "async-stream-impl",
+ "futures-core",
+]
+
+[[package]]
+name = "async-stream-impl"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "async-trait"
+version = "0.1.57"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76464446b8bc32758d7e88ee1a804d9914cd9b1cb264c029899680b0be29826f"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "atomic"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b88d82667eca772c4aa12f0f1348b3ae643424c8876448f3f7bd5787032e234c"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "atty"
+version = "0.2.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
+dependencies = [
+ "hermit-abi",
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "autocfg"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+
+[[package]]
+name = "axum"
+version = "0.5.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c9e3356844c4d6a6d6467b8da2cffb4a2820be256f50a3a386c9d152bab31043"
+dependencies = [
+ "async-trait",
+ "axum-core",
+ "bitflags",
+ "bytes",
+ "futures-util",
+ "http",
+ "http-body",
+ "hyper",
+ "itoa 1.0.3",
+ "matchit",
+ "memchr",
+ "mime",
+ "percent-encoding",
+ "pin-project-lite",
+ "serde",
+ "serde_json",
+ "sync_wrapper",
+ "tokio",
+ "tower",
+ "tower-http",
+ "tower-layer",
+ "tower-service",
+]
+
+[[package]]
+name = "axum-core"
+version = "0.2.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9f0c0a60006f2a293d82d571f635042a72edf927539b7685bd62d361963839b"
+dependencies = [
+ "async-trait",
+ "bytes",
+ "futures-util",
+ "http",
+ "http-body",
+ "mime",
+ "tower-layer",
+ "tower-service",
+]
+
+[[package]]
+name = "backoff"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1"
+dependencies = [
+ "futures-core",
+ "getrandom 0.2.7",
+ "instant",
+ "pin-project-lite",
+ "rand 0.8.5",
+ "tokio",
+]
+
+[[package]]
+name = "backtrace"
+version = "0.3.66"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cab84319d616cfb654d03394f38ab7e6f0919e181b1b57e1fd15e7fb4077d9a7"
+dependencies = [
+ "addr2line",
+ "cc",
+ "cfg-if",
+ "libc",
+ "miniz_oxide 0.5.3",
+ "object",
+ "rustc-demangle",
+]
+
+[[package]]
+name = "base64"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
+
+[[package]]
+name = "base64ct"
+version = "1.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ea2b2456fd614d856680dcd9fcc660a51a820fa09daef2e49772b56a193c8474"
+
+[[package]]
+name = "benchmarks"
+version = "1.0.0"
+dependencies = [
+ "criterion",
+ "matrix-sdk-crypto",
+ "matrix-sdk-sled",
+ "matrix-sdk-test",
+ "pprof",
+ "ruma",
+ "serde_json",
+ "tempfile",
+ "tokio",
+]
+
+[[package]]
+name = "bincode"
+version = "1.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "bit-set"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1"
+dependencies = [
+ "bit-vec",
+]
+
+[[package]]
+name = "bit-vec"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "blake3"
+version = "1.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a08e53fc5a564bb15bfe6fae56bd71522205f1f91893f9c0116edad6496c183f"
+dependencies = [
+ "arrayref",
+ "arrayvec 0.7.2",
+ "cc",
+ "cfg-if",
+ "constant_time_eq",
+ "digest 0.10.3",
+]
+
+[[package]]
+name = "block-buffer"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "block-buffer"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "block-padding"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0a90ec2df9600c28a01c56c4784c9207a96d2451833aeceb8cc97e4c9548bb78"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "bs58"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3"
+
+[[package]]
+name = "bstr"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223"
+dependencies = [
+ "lazy_static",
+ "memchr",
+ "regex-automata",
+ "serde",
+]
+
+[[package]]
+name = "bumpalo"
+version = "3.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d"
+
+[[package]]
+name = "bytemuck"
+version = "1.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2f5715e491b5a1598fc2bef5a606847b5dc1d48ea625bd3c02c00de8285591da"
+
+[[package]]
+name = "byteorder"
+version = "1.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
+
+[[package]]
+name = "bytes"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db"
+
+[[package]]
+name = "cache-padded"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c"
+
+[[package]]
+name = "camino"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "88ad0e1e3e88dd237a156ab9f571021b8a158caa0ae44b1968a241efb5144c1e"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "cargo-platform"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "cargo_metadata"
+version = "0.15.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "406c859255d568f4f742b3146d51851f3bfd49f734a2c289d9107c4395ee0062"
+dependencies = [
+ "camino",
+ "cargo-platform",
+ "semver",
+ "serde",
+ "serde_json",
+ "thiserror",
+]
+
+[[package]]
+name = "cassowary"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53"
+
+[[package]]
+name = "cast"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
+
+[[package]]
+name = "cbc"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6"
+dependencies = [
+ "cipher 0.4.3",
+]
+
+[[package]]
+name = "cc"
+version = "1.0.73"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11"
+
+[[package]]
+name = "cesu8"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "chacha20"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c80e5460aa66fe3b91d40bcbdab953a597b60053e34d684ac6903f863b680a6"
+dependencies = [
+ "cfg-if",
+ "cipher 0.3.0",
+ "cpufeatures",
+ "zeroize",
+]
+
+[[package]]
+name = "chacha20poly1305"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a18446b09be63d457bbec447509e85f662f32952b035ce892290396bc0b0cff5"
+dependencies = [
+ "aead",
+ "chacha20",
+ "cipher 0.3.0",
+ "poly1305",
+ "zeroize",
+]
+
+[[package]]
+name = "checked_int_cast"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "17cc5e6b5ab06331c33589842070416baa137e8b0eb912b008cfd4a78ada7919"
+
+[[package]]
+name = "chrono"
+version = "0.4.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bfd4d1b31faaa3a89d7934dbded3111da0d2ef28e3ebccdb4f0179f5929d1ef1"
+dependencies = [
+ "iana-time-zone",
+ "js-sys",
+ "num-integer",
+ "num-traits",
+ "time 0.1.44",
+ "wasm-bindgen",
+ "winapi",
+]
+
+[[package]]
+name = "cipher"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "cipher"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d1873270f8f7942c191139cb8a40fd228da6c3fd2fc376d7e92d47aa14aeb59e"
+dependencies = [
+ "crypto-common",
+ "inout",
+]
+
+[[package]]
+name = "clap"
+version = "2.34.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
+dependencies = [
+ "ansi_term",
+ "atty",
+ "bitflags",
+ "strsim 0.8.0",
+ "textwrap 0.11.0",
+ "unicode-width",
+ "vec_map",
+]
+
+[[package]]
+name = "clap"
+version = "3.2.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "86447ad904c7fb335a790c9d7fe3d0d971dc523b8ccd1561a520de9a85302750"
+dependencies = [
+ "atty",
+ "bitflags",
+ "clap_derive 3.2.18",
+ "clap_lex 0.2.4",
+ "indexmap",
+ "once_cell",
+ "strsim 0.10.0",
+ "termcolor",
+ "textwrap 0.15.1",
+]
+
+[[package]]
+name = "clap"
+version = "4.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "335867764ed2de42325fafe6d18b8af74ba97ee0c590fa016f157535b42ab04b"
+dependencies = [
+ "atty",
+ "bitflags",
+ "clap_derive 4.0.18",
+ "clap_lex 0.3.0",
+ "once_cell",
+ "strsim 0.10.0",
+ "termcolor",
+]
+
+[[package]]
+name = "clap_derive"
+version = "3.2.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65"
+dependencies = [
+ "heck 0.4.0",
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "clap_derive"
+version = "4.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "16a1b0f6422af32d5da0c58e2703320f379216ee70198241c84173a8c5ac28f3"
+dependencies = [
+ "heck 0.4.0",
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "clap_lex"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5"
+dependencies = [
+ "os_str_bytes",
+]
+
+[[package]]
+name = "clap_lex"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8"
+dependencies = [
+ "os_str_bytes",
+]
+
+[[package]]
+name = "clipboard-win"
+version = "4.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c4ab1b92798304eedc095b53942963240037c0516452cb11aeba709d420b2219"
+dependencies = [
+ "error-code",
+ "str-buf",
+ "winapi",
+]
+
+[[package]]
+name = "cmake"
+version = "0.1.48"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e8ad8cef104ac57b68b89df3208164d228503abbdce70f6880ffa3d970e7443a"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "color_quant"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b"
+
+[[package]]
+name = "combine"
+version = "4.6.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4"
+dependencies = [
+ "bytes",
+ "memchr",
+]
+
+[[package]]
+name = "concurrent-queue"
+version = "1.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af4780a44ab5696ea9e28294517f1fffb421a83a25af521333c838635509db9c"
+dependencies = [
+ "cache-padded",
+]
+
+[[package]]
+name = "console"
+version = "0.15.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "89eab4d20ce20cea182308bca13088fecea9c05f6776cf287205d41a0ed3c847"
+dependencies = [
+ "encode_unicode",
+ "libc",
+ "once_cell",
+ "terminal_size",
+ "unicode-width",
+ "winapi",
+]
+
+[[package]]
+name = "console_error_panic_hook"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc"
+dependencies = [
+ "cfg-if",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "const-oid"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3"
+
+[[package]]
+name = "const_format"
+version = "0.2.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "939dc9e2eb9077e0679d2ce32de1ded8531779360b003b4a972a7a39ec263495"
+dependencies = [
+ "const_format_proc_macros",
+]
+
+[[package]]
+name = "const_format_proc_macros"
+version = "0.2.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef196d5d972878a48da7decb7686eded338b4858fbabeed513d63a7c98b2b82d"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-xid",
+]
+
+[[package]]
+name = "constant_time_eq"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
+
+[[package]]
+name = "convert_case"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fb4a24b1aaf0fd0ce8b45161144d6f42cd91677fd5940fd431183eb023b3a2b8"
+
+[[package]]
+name = "core-foundation"
+version = "0.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc"
+
+[[package]]
+name = "cpp_demangle"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eeaa953eaad386a53111e47172c2fedba671e5684c8dd601a5f474f4f118710f"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "cpufeatures"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc948ebb96241bb40ab73effeb80d9f93afaad49359d159a5e61be51619fe813"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "crc32fast"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "criterion"
+version = "0.3.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b01d6de93b2b6c65e17c634a26653a29d107b3c98c607c765bf38d041531cd8f"
+dependencies = [
+ "atty",
+ "cast",
+ "clap 2.34.0",
+ "criterion-plot",
+ "csv",
+ "futures",
+ "itertools",
+ "lazy_static",
+ "num-traits",
+ "oorandom",
+ "plotters",
+ "rayon",
+ "regex",
+ "serde",
+ "serde_cbor",
+ "serde_derive",
+ "serde_json",
+ "tinytemplate",
+ "tokio",
+ "walkdir",
+]
+
+[[package]]
+name = "criterion-plot"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2673cc8207403546f45f5fd319a974b1e6983ad1a3ee7e6041650013be041876"
+dependencies = [
+ "cast",
+ "itertools",
+]
+
+[[package]]
+name = "crossbeam-channel"
+version = "0.5.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521"
+dependencies = [
+ "cfg-if",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-deque"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc"
+dependencies = [
+ "cfg-if",
+ "crossbeam-epoch",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-epoch"
+version = "0.9.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "045ebe27666471bb549370b4b0b3e51b07f56325befa4284db65fc89c02511b1"
+dependencies = [
+ "autocfg",
+ "cfg-if",
+ "crossbeam-utils",
+ "memoffset",
+ "once_cell",
+ "scopeguard",
+]
+
+[[package]]
+name = "crossbeam-utils"
+version = "0.8.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51887d4adc7b564537b15adcfb307936f8075dfcd5f00dde9a9f1d29383682bc"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+]
+
+[[package]]
+name = "crossterm"
+version = "0.23.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2102ea4f781910f8a5b98dd061f4c2023f479ce7bb1236330099ceb5a93cf17"
+dependencies = [
+ "bitflags",
+ "crossterm_winapi",
+ "libc",
+ "mio",
+ "parking_lot 0.12.1",
+ "signal-hook",
+ "signal-hook-mio",
+ "winapi",
+]
+
+[[package]]
+name = "crossterm_winapi"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2ae1b35a484aa10e07fe0638d02301c5ad24de82d310ccbd2f3693da5f09bf1c"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "crypto-common"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
+dependencies = [
+ "generic-array",
+ "typenum",
+]
+
+[[package]]
+name = "csv"
+version = "1.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1"
+dependencies = [
+ "bstr",
+ "csv-core",
+ "itoa 0.4.8",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "csv-core"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "ctor"
+version = "0.1.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cdffe87e1d521a10f9696f833fe502293ea446d7f256c06128293a4119bdf4cb"
+dependencies = [
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "ctr"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d14f329cfbaf5d0e06b5e87fff7e265d2673c5ea7d2c27691a2c107db1442a0"
+dependencies = [
+ "cipher 0.4.3",
+]
+
+[[package]]
+name = "curve25519-dalek"
+version = "3.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0"
+dependencies = [
+ "byteorder",
+ "digest 0.9.0",
+ "rand_core 0.5.1",
+ "serde",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "darling"
+version = "0.14.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4529658bdda7fd6769b8614be250cdcfc3aeb0ee72fe66f9e41e5e5eb73eac02"
+dependencies = [
+ "darling_core",
+ "darling_macro",
+]
+
+[[package]]
+name = "darling_core"
+version = "0.14.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "649c91bc01e8b1eac09fb91e8dbc7d517684ca6be8ebc75bb9cafc894f9fdb6f"
+dependencies = [
+ "fnv",
+ "ident_case",
+ "proc-macro2",
+ "quote",
+ "strsim 0.10.0",
+ "syn",
+]
+
+[[package]]
+name = "darling_macro"
+version = "0.14.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ddfc69c5bfcbd2fc09a0f38451d2daf0e372e367986a83906d1b0dbc88134fb5"
+dependencies = [
+ "darling_core",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "dashmap"
+version = "5.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "907076dfda823b0b36d2a1bb5f90c96660a5bbcd7729e10727f07858f22c4edc"
+dependencies = [
+ "cfg-if",
+ "hashbrown",
+ "lock_api",
+ "once_cell",
+ "parking_lot_core 0.9.3",
+]
+
+[[package]]
+name = "deadpool"
+version = "0.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "421fe0f90f2ab22016f32a9881be5134fdd71c65298917084b0c7477cbc3856e"
+dependencies = [
+ "async-trait",
+ "deadpool-runtime",
+ "num_cpus",
+ "retain_mut",
+ "tokio",
+]
+
+[[package]]
+name = "deadpool-runtime"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eaa37046cc0f6c3cc6090fbdbf73ef0b8ef4cfcc37f6befc0020f63e8cf121e1"
+
+[[package]]
+name = "debugid"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d"
+dependencies = [
+ "uuid 1.1.2",
+]
+
+[[package]]
+name = "deflate"
+version = "0.8.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73770f8e1fe7d64df17ca66ad28994a0a623ea497fa69486e14984e715c5d174"
+dependencies = [
+ "adler32",
+ "byteorder",
+]
+
+[[package]]
+name = "deflate"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c86f7e25f518f4b81808a2cf1c50996a61f5c2eb394b2393bd87f2a4780a432f"
+dependencies = [
+ "adler32",
+]
+
+[[package]]
+name = "der"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c"
+dependencies = [
+ "const-oid",
+]
+
+[[package]]
+name = "derivative"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "derive_builder"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3"
+dependencies = [
+ "derive_builder_macro",
+]
+
+[[package]]
+name = "derive_builder_core"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4"
+dependencies = [
+ "darling",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "derive_builder_macro"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68"
+dependencies = [
+ "derive_builder_core",
+ "syn",
+]
+
+[[package]]
+name = "dialoguer"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a92e7e37ecef6857fdc0c0c5d42fd5b0938e46590c2183cc92dd310a6d078eb1"
+dependencies = [
+ "console",
+ "tempfile",
+ "zeroize",
+]
+
+[[package]]
+name = "digest"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "digest"
+version = "0.10.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506"
+dependencies = [
+ "block-buffer 0.10.2",
+ "crypto-common",
+ "subtle",
+]
+
+[[package]]
+name = "dirs"
+version = "4.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059"
+dependencies = [
+ "dirs-sys",
+]
+
+[[package]]
+name = "dirs-next"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1"
+dependencies = [
+ "cfg-if",
+ "dirs-sys-next",
+]
+
+[[package]]
+name = "dirs-sys"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6"
+dependencies = [
+ "libc",
+ "redox_users",
+ "winapi",
+]
+
+[[package]]
+name = "dirs-sys-next"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"
+dependencies = [
+ "libc",
+ "redox_users",
+ "winapi",
+]
+
+[[package]]
+name = "discard"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0"
+
+[[package]]
+name = "displaydoc"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "ed25519"
+version = "1.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e9c280362032ea4203659fc489832d0204ef09f247a0506f170dafcac08c369"
+dependencies = [
+ "serde",
+ "signature",
+]
+
+[[package]]
+name = "ed25519-dalek"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d"
+dependencies = [
+ "curve25519-dalek",
+ "ed25519",
+ "rand 0.7.3",
+ "serde",
+ "serde_bytes",
+ "sha2 0.9.9",
+ "zeroize",
+]
+
+[[package]]
+name = "either"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797"
+
+[[package]]
+name = "encode_unicode"
+version = "0.3.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
+
+[[package]]
+name = "encoding_rs"
+version = "0.8.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "endian-type"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d"
+
+[[package]]
+name = "errno"
+version = "0.2.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1"
+dependencies = [
+ "errno-dragonfly",
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "errno-dragonfly"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
+dependencies = [
+ "cc",
+ "libc",
+]
+
+[[package]]
+name = "error-code"
+version = "2.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21"
+dependencies = [
+ "libc",
+ "str-buf",
+]
+
+[[package]]
+name = "event-listener"
+version = "2.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0"
+
+[[package]]
+name = "example-appservice-autojoin"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "matrix-sdk-appservice",
+ "tokio",
+ "tracing",
+ "tracing-subscriber",
+]
+
+[[package]]
+name = "example-autojoin"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "matrix-sdk",
+ "tokio",
+ "tracing-subscriber",
+]
+
+[[package]]
+name = "example-command-bot"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "matrix-sdk",
+ "tokio",
+ "tracing-subscriber",
+ "url",
+]
+
+[[package]]
+name = "example-cross-signing-bootstrap"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "matrix-sdk",
+ "tokio",
+ "tracing-subscriber",
+ "url",
+]
+
+[[package]]
+name = "example-custom-events"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "dirs",
+ "matrix-sdk",
+ "serde",
+ "tokio",
+ "tracing-subscriber",
+]
+
+[[package]]
+name = "example-emoji-verification"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "clap 4.0.18",
+ "futures",
+ "matrix-sdk",
+ "tokio",
+ "tracing-subscriber",
+ "url",
+]
+
+[[package]]
+name = "example-get-profiles"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "matrix-sdk",
+ "tokio",
+ "tracing-subscriber",
+ "url",
+]
+
+[[package]]
+name = "example-getting-started"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "dirs",
+ "matrix-sdk",
+ "tokio",
+ "tracing-subscriber",
+]
+
+[[package]]
+name = "example-image-bot"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "matrix-sdk",
+ "mime",
+ "tokio",
+ "tracing-subscriber",
+ "url",
+]
+
+[[package]]
+name = "example-login"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "matrix-sdk",
+ "tokio",
+ "tracing-subscriber",
+ "url",
+]
+
+[[package]]
+name = "example-timeline"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "clap 4.0.18",
+ "futures",
+ "futures-signals",
+ "matrix-sdk",
+ "tokio",
+ "tracing-subscriber",
+ "url",
+]
+
+[[package]]
+name = "extension-trait"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5129068fe3183546eaa0529af88ab0afbcddec2a373db69e94a20b8d5f6c4d74"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "eyre"
+version = "0.6.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c2b6b5a29c02cdc822728b7d7b8ae1bab3e3b05d44522770ddd49722eeac7eb"
+dependencies = [
+ "indenter",
+ "once_cell",
+]
+
+[[package]]
+name = "fancy-regex"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d6b8560a05112eb52f04b00e5d3790c0dd75d9d980eb8a122fb23b92a623ccf"
+dependencies = [
+ "bit-set",
+ "regex",
+]
+
+[[package]]
+name = "fastrand"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499"
+dependencies = [
+ "instant",
+]
+
+[[package]]
+name = "fd-lock"
+version = "3.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e11dcc7e4d79a8c89b9ab4c6f5c30b1fc4a83c420792da3542fd31179ed5f517"
+dependencies = [
+ "cfg-if",
+ "rustix",
+ "windows-sys",
+]
+
+[[package]]
+name = "findshlibs"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "40b9e59cd0f7e0806cca4be089683ecb6434e602038df21fe6bf6711b2f07f64"
+dependencies = [
+ "cc",
+ "lazy_static",
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "flate2"
+version = "1.0.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6"
+dependencies = [
+ "crc32fast",
+ "miniz_oxide 0.5.3",
+]
+
+[[package]]
+name = "fnv"
+version = "1.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
+
+[[package]]
+name = "foreign-types"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
+dependencies = [
+ "foreign-types-shared",
+]
+
+[[package]]
+name = "foreign-types-shared"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
+
+[[package]]
+name = "form_urlencoded"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8"
+dependencies = [
+ "percent-encoding",
+]
+
+[[package]]
+name = "fs-err"
+version = "2.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "64db3e262960f0662f43a6366788d5f10f7f244b8f7d7d987f560baf5ded5c50"
+
+[[package]]
+name = "fs2"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213"
+dependencies = [
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "fs_extra"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394"
+
+[[package]]
+name = "futures"
+version = "0.3.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f21eda599937fba36daeb58a22e8f5cee2d14c4a17b5b7739c7c8e5e3b8230c"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-executor",
+ "futures-io",
+ "futures-sink",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-channel"
+version = "0.3.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "30bdd20c28fadd505d0fd6712cdfcb0d4b5648baf45faef7f852afb2399bb050"
+dependencies = [
+ "futures-core",
+ "futures-sink",
+]
+
+[[package]]
+name = "futures-core"
+version = "0.3.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4e5aa3de05362c3fb88de6531e6296e85cde7739cccad4b9dfeeb7f6ebce56bf"
+
+[[package]]
+name = "futures-executor"
+version = "0.3.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ff63c23854bee61b6e9cd331d523909f238fc7636290b96826e9cfa5faa00ab"
+dependencies = [
+ "futures-core",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-io"
+version = "0.3.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbf4d2a7a308fd4578637c0b17c7e1c7ba127b8f6ba00b29f717e9655d85eb68"
+
+[[package]]
+name = "futures-lite"
+version = "1.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48"
+dependencies = [
+ "fastrand",
+ "futures-core",
+ "futures-io",
+ "memchr",
+ "parking",
+ "pin-project-lite",
+ "waker-fn",
+]
+
+[[package]]
+name = "futures-macro"
+version = "0.3.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42cd15d1c7456c04dbdf7e88bcd69760d74f3a798d6444e16974b505b0e62f17"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "futures-signals"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a3acc659ba666cff13fdf65242d16428f2f11935b688f82e4024ad39667a5132"
+dependencies = [
+ "discard",
+ "futures-channel",
+ "futures-core",
+ "futures-util",
+ "log",
+ "pin-project",
+ "serde",
+]
+
+[[package]]
+name = "futures-sink"
+version = "0.3.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "21b20ba5a92e727ba30e72834706623d94ac93a725410b6a6b6fbc1b07f7ba56"
+
+[[package]]
+name = "futures-task"
+version = "0.3.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a6508c467c73851293f390476d4491cf4d227dbabcd4170f3bb6044959b294f1"
+
+[[package]]
+name = "futures-timer"
+version = "3.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c"
+
+[[package]]
+name = "futures-util"
+version = "0.3.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "44fb6cb1be61cc1d2e43b262516aafcf63b241cffdb1d3fa115f91d9c7b09c90"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-io",
+ "futures-macro",
+ "futures-sink",
+ "futures-task",
+ "memchr",
+ "pin-project-lite",
+ "pin-utils",
+ "slab",
+]
+
+[[package]]
+name = "fxhash"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
+dependencies = [
+ "byteorder",
+]
+
+[[package]]
+name = "generic-array"
+version = "0.14.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9"
+dependencies = [
+ "typenum",
+ "version_check",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.1.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "libc",
+ "wasi 0.9.0+wasi-snapshot-preview1",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.2.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "libc",
+ "wasi 0.11.0+wasi-snapshot-preview1",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "gif"
+version = "0.11.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3edd93c6756b4dfaf2709eafcc345ba2636565295c198a9cfbf75fa5e3e00b06"
+dependencies = [
+ "color_quant",
+ "weezl",
+]
+
+[[package]]
+name = "gimli"
+version = "0.26.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d"
+
+[[package]]
+name = "glob"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
+
+[[package]]
+name = "gloo-utils"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "40913a05c8297adca04392f707b1e73b12ba7b8eab7244a4961580b1fd34063c"
+dependencies = [
+ "js-sys",
+ "serde",
+ "serde_json",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "goblin"
+version = "0.5.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a7666983ed0dd8d21a6f6576ee00053ca0926fb281a5522577a4dbd0f1b54143"
+dependencies = [
+ "log",
+ "plain",
+ "scroll",
+]
+
+[[package]]
+name = "h2"
+version = "0.3.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ca32592cf21ac7ccab1825cd87f6c9b3d9022c44d086172ed0966bec8af30be"
+dependencies = [
+ "bytes",
+ "fnv",
+ "futures-core",
+ "futures-sink",
+ "futures-util",
+ "http",
+ "indexmap",
+ "slab",
+ "tokio",
+ "tokio-util",
+ "tracing",
+]
+
+[[package]]
+name = "half"
+version = "1.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7"
+
+[[package]]
+name = "hashbrown"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
+dependencies = [
+ "ahash",
+]
+
+[[package]]
+name = "heck"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c"
+dependencies = [
+ "unicode-segmentation",
+]
+
+[[package]]
+name = "heck"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"
+
+[[package]]
+name = "hermit-abi"
+version = "0.1.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "hkdf"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437"
+dependencies = [
+ "hmac",
+]
+
+[[package]]
+name = "hmac"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
+dependencies = [
+ "digest 0.10.3",
+]
+
+[[package]]
+name = "http"
+version = "0.2.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399"
+dependencies = [
+ "bytes",
+ "fnv",
+ "itoa 1.0.3",
+]
+
+[[package]]
+name = "http-body"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1"
+dependencies = [
+ "bytes",
+ "http",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "http-range-header"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29"
+
+[[package]]
+name = "http-types"
+version = "2.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e9b187a72d63adbfba487f48095306ac823049cb504ee195541e91c7775f5ad"
+dependencies = [
+ "anyhow",
+ "async-channel",
+ "base64",
+ "futures-lite",
+ "http",
+ "infer",
+ "pin-project-lite",
+ "rand 0.7.3",
+ "serde",
+ "serde_json",
+ "serde_qs",
+ "serde_urlencoded",
+ "url",
+]
+
+[[package]]
+name = "httparse"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904"
+
+[[package]]
+name = "httpdate"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421"
+
+[[package]]
+name = "hyper"
+version = "0.14.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac"
+dependencies = [
+ "bytes",
+ "futures-channel",
+ "futures-core",
+ "futures-util",
+ "h2",
+ "http",
+ "http-body",
+ "httparse",
+ "httpdate",
+ "itoa 1.0.3",
+ "pin-project-lite",
+ "socket2",
+ "tokio",
+ "tower-service",
+ "tracing",
+ "want",
+]
+
+[[package]]
+name = "hyper-rustls"
+version = "0.23.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d87c48c02e0dc5e3b849a2041db3029fd066650f8f717c07bf8ed78ccb895cac"
+dependencies = [
+ "http",
+ "hyper",
+ "rustls",
+ "tokio",
+ "tokio-rustls",
+]
+
+[[package]]
+name = "hyper-tls"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
+dependencies = [
+ "bytes",
+ "hyper",
+ "native-tls",
+ "tokio",
+ "tokio-native-tls",
+]
+
+[[package]]
+name = "iana-time-zone"
+version = "0.1.47"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c495f162af0bf17656d0014a0eded5f3cd2f365fdd204548c2869db89359dc7"
+dependencies = [
+ "android_system_properties",
+ "core-foundation-sys",
+ "js-sys",
+ "once_cell",
+ "wasm-bindgen",
+ "winapi",
+]
+
+[[package]]
+name = "ident_case"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
+
+[[package]]
+name = "idna"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6"
+dependencies = [
+ "unicode-bidi",
+ "unicode-normalization",
+]
+
+[[package]]
+name = "image"
+version = "0.23.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24ffcb7e7244a9bf19d35bf2883b9c080c4ced3c07a9895572178cdb8f13f6a1"
+dependencies = [
+ "bytemuck",
+ "byteorder",
+ "color_quant",
+ "gif",
+ "jpeg-decoder 0.1.22",
+ "num-iter",
+ "num-rational 0.3.2",
+ "num-traits",
+ "png 0.16.8",
+ "scoped_threadpool",
+ "tiff 0.6.1",
+]
+
+[[package]]
+name = "image"
+version = "0.24.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7e30ca2ecf7666107ff827a8e481de6a132a9b687ed3bb20bb1c144a36c00964"
+dependencies = [
+ "bytemuck",
+ "byteorder",
+ "color_quant",
+ "gif",
+ "jpeg-decoder 0.2.6",
+ "num-rational 0.4.1",
+ "num-traits",
+ "png 0.17.5",
+ "scoped_threadpool",
+ "tiff 0.7.3",
+]
+
+[[package]]
+name = "indenter"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683"
+
+[[package]]
+name = "indexed_db_futures"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d26ac735f676c52305becf53264b91cea9866a8de61ccbf464405b377b9cbca9"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "uuid 0.8.2",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+]
+
+[[package]]
+name = "indexmap"
+version = "1.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e"
+dependencies = [
+ "autocfg",
+ "hashbrown",
+ "serde",
+]
+
+[[package]]
+name = "indoc"
+version = "1.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "adab1eaa3408fb7f0c777a73e7465fd5656136fc93b670eb6df3c88c2c1344e3"
+
+[[package]]
+name = "infer"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "64e9829a50b42bb782c1df523f78d332fe371b10c661e78b7a3c34b0198e9fac"
+
+[[package]]
+name = "inferno"
+version = "0.11.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9709543bd6c25fdc748da2bed0f6855b07b7e93a203ae31332ac2101ab2f4782"
+dependencies = [
+ "ahash",
+ "atty",
+ "indexmap",
+ "itoa 1.0.3",
+ "log",
+ "num-format",
+ "once_cell",
+ "quick-xml",
+ "rgb",
+ "str_stack",
+]
+
+[[package]]
+name = "inout"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5"
+dependencies = [
+ "block-padding",
+ "generic-array",
+]
+
+[[package]]
+name = "instant"
+version = "0.1.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "io-lifetimes"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ea37f355c05dde75b84bba2d767906ad522e97cd9e2eef2be7a4ab7fb442c06"
+
+[[package]]
+name = "ipnet"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b"
+
+[[package]]
+name = "itertools"
+version = "0.10.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3"
+dependencies = [
+ "either",
+]
+
+[[package]]
+name = "itoa"
+version = "0.4.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
+
+[[package]]
+name = "itoa"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754"
+
+[[package]]
+name = "jack-in"
+version = "0.2.0"
+dependencies = [
+ "app_dirs2",
+ "dialoguer",
+ "eyre",
+ "futures",
+ "futures-signals",
+ "log4rs",
+ "matrix-sdk",
+ "matrix-sdk-common",
+ "matrix-sdk-sled",
+ "sanitize-filename-reader-friendly",
+ "serde_json",
+ "structopt",
+ "tokio",
+ "tracing",
+ "tracing-flame",
+ "tracing-subscriber",
+ "tui-logger",
+ "tuirealm",
+]
+
+[[package]]
+name = "jni"
+version = "0.19.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec"
+dependencies = [
+ "cesu8",
+ "combine",
+ "jni-sys",
+ "log",
+ "thiserror",
+ "walkdir",
+]
+
+[[package]]
+name = "jni-sys"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
+
+[[package]]
+name = "jpeg-decoder"
+version = "0.1.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "229d53d58899083193af11e15917b5640cd40b29ff475a1fe4ef725deb02d0f2"
+dependencies = [
+ "rayon",
+]
+
+[[package]]
+name = "jpeg-decoder"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9478aa10f73e7528198d75109c8be5cd7d15fb530238040148d5f9a22d4c5b3b"
+dependencies = [
+ "rayon",
+]
+
+[[package]]
+name = "js-sys"
+version = "0.3.60"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47"
+dependencies = [
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "js_int"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d937f95470b270ce8b8950207715d71aa8e153c0d44c6684d59397ed4949160a"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "js_option"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "68421373957a1593a767013698dbf206e2b221eefe97a44d98d18672ff38423c"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "lazy-regex"
+version = "2.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6b12f2eb6ed7d39405c5eb25a034b4c106a9ad87a6d9be3298de6c5f32fd57d"
+dependencies = [
+ "lazy-regex-proc_macros",
+ "once_cell",
+ "regex",
+]
+
+[[package]]
+name = "lazy-regex-proc_macros"
+version = "2.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2496e5264069bc726ccf37eb76b9cd89406ae110d836c3f76729f99c8a23293"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "regex",
+ "syn",
+]
+
+[[package]]
+name = "lazy_static"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+
+[[package]]
+name = "libc"
+version = "0.2.132"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5"
+
+[[package]]
+name = "libloading"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd"
+dependencies = [
+ "cfg-if",
+ "winapi",
+]
+
+[[package]]
+name = "linux-raw-sys"
+version = "0.0.46"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d"
+
+[[package]]
+name = "lock_api"
+version = "0.4.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f80bf5aacaf25cbfc8210d1cfb718f2bf3b11c4c54e5afe36c236853a8ec390"
+dependencies = [
+ "autocfg",
+ "scopeguard",
+]
+
+[[package]]
+name = "log"
+version = "0.4.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "log-mdc"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a94d21414c1f4a51209ad204c1776a3d0765002c76c6abcb602a6f09f1e881c7"
+
+[[package]]
+name = "log4rs"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "893eaf59f4bef8e2e94302adf56385db445a0306b9823582b0b8d5a06d8822f3"
+dependencies = [
+ "anyhow",
+ "arc-swap",
+ "chrono",
+ "derivative",
+ "fnv",
+ "log",
+ "log-mdc",
+ "parking_lot 0.12.1",
+ "thiserror",
+ "thread-id",
+]
+
+[[package]]
+name = "lru"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "936d98d2ddd79c18641c6709e7bb09981449694e402d1a0f0f657ea8d61f4a51"
+dependencies = [
+ "hashbrown",
+]
+
+[[package]]
+name = "maplit"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d"
+
+[[package]]
+name = "matchers"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"
+dependencies = [
+ "regex-automata",
+]
+
+[[package]]
+name = "matches"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"
+
+[[package]]
+name = "matchit"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73cbba799671b762df5a175adf59ce145165747bb891505c43d09aefbbf38beb"
+
+[[package]]
+name = "matrix-sdk"
+version = "0.6.2"
+dependencies = [
+ "anyhow",
+ "anymap2",
+ "assert_matches",
+ "async-once-cell",
+ "async-stream",
+ "async-trait",
+ "backoff",
+ "bytes",
+ "ctor",
+ "dashmap",
+ "derive_builder",
+ "dirs",
+ "event-listener",
+ "eyre",
+ "futures",
+ "futures-core",
+ "futures-signals",
+ "futures-util",
+ "getrandom 0.2.7",
+ "http",
+ "hyper",
+ "image 0.24.3",
+ "indexmap",
+ "matches",
+ "matrix-sdk-base",
+ "matrix-sdk-common",
+ "matrix-sdk-indexeddb",
+ "matrix-sdk-sled",
+ "matrix-sdk-test",
+ "mime",
+ "once_cell",
+ "rand 0.8.5",
+ "reqwest",
+ "ruma",
+ "serde",
+ "serde_json",
+ "tempfile",
+ "thiserror",
+ "tokio",
+ "tokio-stream",
+ "tower",
+ "tracing",
+ "tracing-subscriber",
+ "url",
+ "wasm-bindgen-test",
+ "wasm-timer",
+ "wiremock",
+ "zeroize",
+]
+
+[[package]]
+name = "matrix-sdk-appservice"
+version = "0.1.0"
+dependencies = [
+ "axum",
+ "dashmap",
+ "http",
+ "http-body",
+ "hyper",
+ "matrix-sdk",
+ "matrix-sdk-test",
+ "regex",
+ "ruma",
+ "serde",
+ "serde_json",
+ "serde_yaml",
+ "thiserror",
+ "tokio",
+ "tower",
+ "tracing",
+ "tracing-subscriber",
+ "url",
+ "wiremock",
+]
+
+[[package]]
+name = "matrix-sdk-base"
+version = "0.6.1"
+dependencies = [
+ "assign",
+ "async-stream",
+ "async-trait",
+ "ctor",
+ "dashmap",
+ "futures",
+ "futures-channel",
+ "futures-core",
+ "futures-signals",
+ "futures-util",
+ "http",
+ "lru",
+ "matrix-sdk-common",
+ "matrix-sdk-crypto",
+ "matrix-sdk-store-encryption",
+ "matrix-sdk-test",
+ "once_cell",
+ "ruma",
+ "serde",
+ "serde_json",
+ "thiserror",
+ "tokio",
+ "tracing",
+ "tracing-subscriber",
+ "wasm-bindgen-test",
+ "zeroize",
+]
+
+[[package]]
+name = "matrix-sdk-common"
+version = "0.6.0"
+dependencies = [
+ "async-lock",
+ "futures-core",
+ "futures-util",
+ "instant",
+ "matrix-sdk-test",
+ "ruma",
+ "serde",
+ "tokio",
+ "wasm-bindgen-futures",
+ "wasm-bindgen-test",
+ "wasm-timer",
+]
+
+[[package]]
+name = "matrix-sdk-crypto"
+version = "0.6.0"
+dependencies = [
+ "aes",
+ "anyhow",
+ "async-trait",
+ "atomic",
+ "base64",
+ "bs58",
+ "byteorder",
+ "cfg-if",
+ "ctr",
+ "dashmap",
+ "event-listener",
+ "futures",
+ "futures-core",
+ "futures-signals",
+ "futures-util",
+ "hmac",
+ "http",
+ "indoc",
+ "matches",
+ "matrix-sdk-common",
+ "matrix-sdk-qrcode",
+ "matrix-sdk-test",
+ "olm-rs",
+ "pbkdf2",
+ "proptest",
+ "rand 0.8.5",
+ "ruma",
+ "serde",
+ "serde_json",
+ "sha2 0.10.3",
+ "thiserror",
+ "tokio",
+ "tracing",
+ "vodozemac",
+ "zeroize",
+]
+
+[[package]]
+name = "matrix-sdk-crypto-ffi"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "base64",
+ "hmac",
+ "http",
+ "js_int",
+ "matrix-sdk-common",
+ "matrix-sdk-crypto",
+ "matrix-sdk-sled",
+ "pbkdf2",
+ "rand 0.8.5",
+ "ruma",
+ "serde",
+ "serde_json",
+ "sha2 0.10.3",
+ "tempfile",
+ "thiserror",
+ "tokio",
+ "tracing",
+ "tracing-subscriber",
+ "uniffi",
+ "uniffi_build",
+ "uniffi_macros",
+ "vodozemac",
+ "zeroize",
+]
+
+[[package]]
+name = "matrix-sdk-crypto-js"
+version = "0.1.0-alpha.0"
+dependencies = [
+ "anyhow",
+ "console_error_panic_hook",
+ "http",
+ "js-sys",
+ "matrix-sdk-common",
+ "matrix-sdk-crypto",
+ "matrix-sdk-indexeddb",
+ "matrix-sdk-qrcode",
+ "ruma",
+ "serde_json",
+ "tracing",
+ "tracing-subscriber",
+ "vodozemac",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "zeroize",
+]
+
+[[package]]
+name = "matrix-sdk-crypto-nodejs"
+version = "0.6.0"
+dependencies = [
+ "http",
+ "matrix-sdk-common",
+ "matrix-sdk-crypto",
+ "matrix-sdk-sled",
+ "napi",
+ "napi-build",
+ "napi-derive",
+ "ruma",
+ "serde_json",
+ "tracing-subscriber",
+ "vodozemac",
+ "zeroize",
+]
+
+[[package]]
+name = "matrix-sdk-ffi"
+version = "0.2.0"
+dependencies = [
+ "anyhow",
+ "extension-trait",
+ "futures-core",
+ "futures-signals",
+ "futures-util",
+ "matrix-sdk",
+ "once_cell",
+ "sanitize-filename-reader-friendly",
+ "serde",
+ "serde_json",
+ "thiserror",
+ "tokio",
+ "tokio-stream",
+ "tracing",
+ "tracing-subscriber",
+ "uniffi",
+ "uniffi_build",
+ "uniffi_macros",
+]
+
+[[package]]
+name = "matrix-sdk-indexeddb"
+version = "0.2.0"
+dependencies = [
+ "anyhow",
+ "async-trait",
+ "base64",
+ "dashmap",
+ "derive_builder",
+ "getrandom 0.2.7",
+ "gloo-utils",
+ "indexed_db_futures",
+ "js-sys",
+ "matrix-sdk-base",
+ "matrix-sdk-common",
+ "matrix-sdk-crypto",
+ "matrix-sdk-store-encryption",
+ "matrix-sdk-test",
+ "ruma",
+ "serde",
+ "serde_json",
+ "thiserror",
+ "tracing",
+ "uuid 1.1.2",
+ "wasm-bindgen",
+ "wasm-bindgen-test",
+ "web-sys",
+]
+
+[[package]]
+name = "matrix-sdk-integration-testing"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "assign",
+ "ctor",
+ "matrix-sdk",
+ "once_cell",
+ "tempfile",
+ "tokio",
+ "tracing",
+ "tracing-subscriber",
+]
+
+[[package]]
+name = "matrix-sdk-qrcode"
+version = "0.4.0"
+dependencies = [
+ "base64",
+ "byteorder",
+ "image 0.23.14",
+ "qrcode",
+ "ruma-common",
+ "thiserror",
+ "vodozemac",
+]
+
+[[package]]
+name = "matrix-sdk-sled"
+version = "0.2.0"
+dependencies = [
+ "async-stream",
+ "async-trait",
+ "dashmap",
+ "derive_builder",
+ "fs_extra",
+ "futures-core",
+ "futures-util",
+ "glob",
+ "matrix-sdk-base",
+ "matrix-sdk-common",
+ "matrix-sdk-crypto",
+ "matrix-sdk-store-encryption",
+ "matrix-sdk-test",
+ "once_cell",
+ "ruma",
+ "serde",
+ "serde_json",
+ "sled",
+ "tempfile",
+ "thiserror",
+ "tokio",
+ "tracing",
+]
+
+[[package]]
+name = "matrix-sdk-store-encryption"
+version = "0.2.0"
+dependencies = [
+ "anyhow",
+ "blake3",
+ "chacha20poly1305",
+ "displaydoc",
+ "getrandom 0.2.7",
+ "hmac",
+ "pbkdf2",
+ "rand 0.8.5",
+ "serde",
+ "serde_json",
+ "sha2 0.10.3",
+ "thiserror",
+ "zeroize",
+]
+
+[[package]]
+name = "matrix-sdk-test"
+version = "0.6.0"
+dependencies = [
+ "http",
+ "matrix-sdk-test-macros",
+ "once_cell",
+ "ruma",
+ "serde",
+ "serde_json",
+ "tokio",
+ "wasm-bindgen-test",
+]
+
+[[package]]
+name = "matrix-sdk-test-macros"
+version = "0.3.0"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "memchr"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
+
+[[package]]
+name = "memmap2"
+version = "0.5.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "95af15f345b17af2efc8ead6080fb8bc376f8cec1b35277b935637595fe77498"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "memoffset"
+version = "0.6.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "mime"
+version = "0.3.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d"
+
+[[package]]
+name = "mime_guess"
+version = "2.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef"
+dependencies = [
+ "mime",
+ "unicase",
+]
+
+[[package]]
+name = "minimal-lexical"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
+
+[[package]]
+name = "miniz_oxide"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "791daaae1ed6889560f8c4359194f56648355540573244a5448a83ba1ecc7435"
+dependencies = [
+ "adler32",
+]
+
+[[package]]
+name = "miniz_oxide"
+version = "0.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b"
+dependencies = [
+ "adler",
+ "autocfg",
+]
+
+[[package]]
+name = "miniz_oxide"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc"
+dependencies = [
+ "adler",
+]
+
+[[package]]
+name = "mio"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf"
+dependencies = [
+ "libc",
+ "log",
+ "wasi 0.11.0+wasi-snapshot-preview1",
+ "windows-sys",
+]
+
+[[package]]
+name = "napi"
+version = "2.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "743fece4c26c5132f8559080145fde9ba88700c0f1aa30a1ab3e057ab105814d"
+dependencies = [
+ "bitflags",
+ "ctor",
+ "napi-sys",
+ "once_cell",
+ "thread_local",
+ "tokio",
+]
+
+[[package]]
+name = "napi-build"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "882a73d9ef23e8dc2ebbffb6a6ae2ef467c0f18ac10711e4cc59c5485d41df0e"
+
+[[package]]
+name = "napi-derive"
+version = "2.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "39f3d8b02ef355898ea98f69082d9a183c8701c836942c2daf3e92364e88a0fa"
+dependencies = [
+ "convert_case",
+ "napi-derive-backend",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "napi-derive-backend"
+version = "1.0.38"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c35640513eb442fcbd1653a1c112fb6b2cc12b54d82f9c141f5859c721cab36"
+dependencies = [
+ "convert_case",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "regex",
+ "syn",
+]
+
+[[package]]
+name = "napi-sys"
+version = "2.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "529671ebfae679f2ce9630b62dd53c72c56b3eb8b2c852e7e2fa91704ff93d67"
+dependencies = [
+ "libloading",
+]
+
+[[package]]
+name = "native-tls"
+version = "0.2.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9"
+dependencies = [
+ "lazy_static",
+ "libc",
+ "log",
+ "openssl",
+ "openssl-probe",
+ "openssl-sys",
+ "schannel",
+ "security-framework",
+ "security-framework-sys",
+ "tempfile",
+]
+
+[[package]]
+name = "ndk-context"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b"
+
+[[package]]
+name = "nibble_vec"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43"
+dependencies = [
+ "smallvec",
+]
+
+[[package]]
+name = "nix"
+version = "0.24.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc"
+dependencies = [
+ "bitflags",
+ "cfg-if",
+ "libc",
+]
+
+[[package]]
+name = "nodrop"
+version = "0.1.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb"
+
+[[package]]
+name = "nom"
+version = "7.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36"
+dependencies = [
+ "memchr",
+ "minimal-lexical",
+]
+
+[[package]]
+name = "nu-ansi-term"
+version = "0.46.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"
+dependencies = [
+ "overload",
+ "winapi",
+]
+
+[[package]]
+name = "num-format"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bafe4179722c2894288ee77a9f044f02811c86af699344c498b0840c698a2465"
+dependencies = [
+ "arrayvec 0.4.12",
+ "itoa 0.4.8",
+]
+
+[[package]]
+name = "num-integer"
+version = "0.1.45"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
+dependencies = [
+ "autocfg",
+ "num-traits",
+]
+
+[[package]]
+name = "num-iter"
+version = "0.1.43"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252"
+dependencies = [
+ "autocfg",
+ "num-integer",
+ "num-traits",
+]
+
+[[package]]
+name = "num-rational"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07"
+dependencies = [
+ "autocfg",
+ "num-integer",
+ "num-traits",
+]
+
+[[package]]
+name = "num-rational"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0"
+dependencies = [
+ "autocfg",
+ "num-integer",
+ "num-traits",
+]
+
+[[package]]
+name = "num-traits"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "num_cpus"
+version = "1.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1"
+dependencies = [
+ "hermit-abi",
+ "libc",
+]
+
+[[package]]
+name = "num_threads"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "object"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "olm-rs"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd6c2c7054110ce4d7b4756d7b7fe507fea9413968ad0ef8f1d043d504aec725"
+dependencies = [
+ "getrandom 0.2.7",
+ "olm-sys",
+ "serde",
+ "serde_json",
+ "zeroize",
+]
+
+[[package]]
+name = "olm-sys"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2afecf25624989021f9f0f157f7152102fd147b89445d08449739f216002d339"
+dependencies = [
+ "cmake",
+ "fs_extra",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "074864da206b4973b84eb91683020dbefd6a8c3f0f38e054d93954e891935e4e"
+
+[[package]]
+name = "oorandom"
+version = "11.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575"
+
+[[package]]
+name = "opaque-debug"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
+
+[[package]]
+name = "openssl"
+version = "0.10.41"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "618febf65336490dfcf20b73f885f5651a0c89c64c2d4a8c3662585a70bf5bd0"
+dependencies = [
+ "bitflags",
+ "cfg-if",
+ "foreign-types",
+ "libc",
+ "once_cell",
+ "openssl-macros",
+ "openssl-sys",
+]
+
+[[package]]
+name = "openssl-macros"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "openssl-probe"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
+
+[[package]]
+name = "openssl-sys"
+version = "0.9.75"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5f9bd0c2710541a3cda73d6f9ac4f1b240de4ae261065d309dbe73d9dceb42f"
+dependencies = [
+ "autocfg",
+ "cc",
+ "libc",
+ "pkg-config",
+ "vcpkg",
+]
+
+[[package]]
+name = "os_str_bytes"
+version = "6.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff"
+
+[[package]]
+name = "overload"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
+
+[[package]]
+name = "parking"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72"
+
+[[package]]
+name = "parking_lot"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99"
+dependencies = [
+ "instant",
+ "lock_api",
+ "parking_lot_core 0.8.5",
+]
+
+[[package]]
+name = "parking_lot"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
+dependencies = [
+ "lock_api",
+ "parking_lot_core 0.9.3",
+]
+
+[[package]]
+name = "parking_lot_core"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216"
+dependencies = [
+ "cfg-if",
+ "instant",
+ "libc",
+ "redox_syscall",
+ "smallvec",
+ "winapi",
+]
+
+[[package]]
+name = "parking_lot_core"
+version = "0.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "redox_syscall",
+ "smallvec",
+ "windows-sys",
+]
+
+[[package]]
+name = "password-hash"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700"
+dependencies = [
+ "base64ct",
+ "rand_core 0.6.3",
+ "subtle",
+]
+
+[[package]]
+name = "paste"
+version = "1.0.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1de2e551fb905ac83f73f7aedf2f0cb4a0da7e35efa24a202a936269f1f18e1"
+
+[[package]]
+name = "pbkdf2"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917"
+dependencies = [
+ "digest 0.10.3",
+ "hmac",
+ "password-hash",
+ "sha2 0.10.3",
+]
+
+[[package]]
+name = "percent-encoding"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
+
+[[package]]
+name = "pin-project"
+version = "1.0.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc"
+dependencies = [
+ "pin-project-internal",
+]
+
+[[package]]
+name = "pin-project-internal"
+version = "1.0.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"
+
+[[package]]
+name = "pin-utils"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
+
+[[package]]
+name = "pkcs7"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1f7364e6d0e236473de91e042395d71e0e64715f99a60620b014a4a4c7d1619b"
+dependencies = [
+ "der",
+ "spki",
+]
+
+[[package]]
+name = "pkg-config"
+version = "0.3.25"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae"
+
+[[package]]
+name = "plain"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6"
+
+[[package]]
+name = "plotters"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "716b4eeb6c4a1d3ecc956f75b43ec2e8e8ba80026413e70a3f41fd3313d3492b"
+dependencies = [
+ "num-traits",
+ "plotters-backend",
+ "plotters-svg",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "plotters-backend"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "193228616381fecdc1224c62e96946dfbc73ff4384fba576e052ff8c1bea8142"
+
+[[package]]
+name = "plotters-svg"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f9a81d2759aae1dae668f783c308bc5c8ebd191ff4184aaa1b37f65a6ae5a56f"
+dependencies = [
+ "plotters-backend",
+]
+
+[[package]]
+name = "png"
+version = "0.16.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c3287920cb847dee3de33d301c463fba14dda99db24214ddf93f83d3021f4c6"
+dependencies = [
+ "bitflags",
+ "crc32fast",
+ "deflate 0.8.6",
+ "miniz_oxide 0.3.7",
+]
+
+[[package]]
+name = "png"
+version = "0.17.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc38c0ad57efb786dd57b9864e5b18bae478c00c824dc55a38bbc9da95dde3ba"
+dependencies = [
+ "bitflags",
+ "crc32fast",
+ "deflate 1.0.0",
+ "miniz_oxide 0.5.3",
+]
+
+[[package]]
+name = "poly1305"
+version = "0.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede"
+dependencies = [
+ "cpufeatures",
+ "opaque-debug",
+ "universal-hash",
+]
+
+[[package]]
+name = "pprof"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d6472bfed9475542ac46c518734a8d06d71b0f6cb2c17f904aa301711a57786f"
+dependencies = [
+ "backtrace",
+ "cfg-if",
+ "criterion",
+ "findshlibs",
+ "inferno",
+ "libc",
+ "log",
+ "nix",
+ "once_cell",
+ "parking_lot 0.12.1",
+ "smallvec",
+ "symbolic-demangle",
+ "tempfile",
+ "thiserror",
+]
+
+[[package]]
+name = "ppv-lite86"
+version = "0.2.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872"
+
+[[package]]
+name = "proc-macro-crate"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9"
+dependencies = [
+ "once_cell",
+ "thiserror",
+ "toml",
+]
+
+[[package]]
+name = "proc-macro-error"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
+dependencies = [
+ "proc-macro-error-attr",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "version_check",
+]
+
+[[package]]
+name = "proc-macro-error-attr"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "version_check",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.43"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "proptest"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e0d9cc07f18492d879586c92b485def06bc850da3118075cd45d50e9c95b0e5"
+dependencies = [
+ "bitflags",
+ "byteorder",
+ "lazy_static",
+ "num-traits",
+ "quick-error",
+ "rand 0.8.5",
+ "rand_chacha 0.3.1",
+ "rand_xorshift",
+ "regex-syntax",
+]
+
+[[package]]
+name = "prost"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "399c3c31cdec40583bb68f0b18403400d01ec4289c383aa047560439952c4dd7"
+dependencies = [
+ "bytes",
+ "prost-derive",
+]
+
+[[package]]
+name = "prost-derive"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7345d5f0e08c0536d7ac7229952590239e77abf0a0100a1b1d890add6ea96364"
+dependencies = [
+ "anyhow",
+ "itertools",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "pulldown-cmark"
+version = "0.9.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2d9cc634bc78768157b5cbfe988ffcd1dcba95cd2b2f03a88316c08c6d00ed63"
+dependencies = [
+ "bitflags",
+ "memchr",
+ "unicase",
+]
+
+[[package]]
+name = "qrcode"
+version = "0.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "16d2f1455f3630c6e5107b4f2b94e74d76dea80736de0981fd27644216cff57f"
+dependencies = [
+ "checked_int_cast",
+ "image 0.23.14",
+]
+
+[[package]]
+name = "quick-error"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3"
+
+[[package]]
+name = "quick-xml"
+version = "0.23.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9279fbdacaad3baf559d8cabe0acc3d06e30ea14931af31af79578ac0946decc"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "radix_trie"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd"
+dependencies = [
+ "endian-type",
+ "nibble_vec",
+]
+
+[[package]]
+name = "rand"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
+dependencies = [
+ "getrandom 0.1.16",
+ "libc",
+ "rand_chacha 0.2.2",
+ "rand_core 0.5.1",
+ "rand_hc",
+]
+
+[[package]]
+name = "rand"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
+dependencies = [
+ "libc",
+ "rand_chacha 0.3.1",
+ "rand_core 0.6.3",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
+dependencies = [
+ "ppv-lite86",
+ "rand_core 0.5.1",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
+dependencies = [
+ "ppv-lite86",
+ "rand_core 0.6.3",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
+dependencies = [
+ "getrandom 0.1.16",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"
+dependencies = [
+ "getrandom 0.2.7",
+]
+
+[[package]]
+name = "rand_hc"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
+dependencies = [
+ "rand_core 0.5.1",
+]
+
+[[package]]
+name = "rand_xorshift"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f"
+dependencies = [
+ "rand_core 0.6.3",
+]
+
+[[package]]
+name = "rayon"
+version = "1.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d"
+dependencies = [
+ "autocfg",
+ "crossbeam-deque",
+ "either",
+ "rayon-core",
+]
+
+[[package]]
+name = "rayon-core"
+version = "1.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f"
+dependencies = [
+ "crossbeam-channel",
+ "crossbeam-deque",
+ "crossbeam-utils",
+ "num_cpus",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.2.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
+dependencies = [
+ "bitflags",
+]
+
+[[package]]
+name = "redox_users"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b"
+dependencies = [
+ "getrandom 0.2.7",
+ "redox_syscall",
+ "thiserror",
+]
+
+[[package]]
+name = "regex"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
+dependencies = [
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.6.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244"
+
+[[package]]
+name = "remove_dir_all"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "reqwest"
+version = "0.11.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b75aa69a3f06bbcc66ede33af2af253c6f7a86b1ca0033f60c580a27074fbf92"
+dependencies = [
+ "base64",
+ "bytes",
+ "encoding_rs",
+ "futures-core",
+ "futures-util",
+ "h2",
+ "http",
+ "http-body",
+ "hyper",
+ "hyper-rustls",
+ "hyper-tls",
+ "ipnet",
+ "js-sys",
+ "lazy_static",
+ "log",
+ "mime",
+ "native-tls",
+ "percent-encoding",
+ "pin-project-lite",
+ "rustls",
+ "rustls-pemfile",
+ "serde",
+ "serde_json",
+ "serde_urlencoded",
+ "tokio",
+ "tokio-native-tls",
+ "tokio-rustls",
+ "tokio-socks",
+ "tower-service",
+ "url",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+ "webpki-roots",
+ "winreg",
+]
+
+[[package]]
+name = "retain_mut"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4389f1d5789befaf6029ebd9f7dac4af7f7e3d61b69d4f30e2ac02b57e7712b0"
+
+[[package]]
+name = "rgb"
+version = "0.8.33"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3b221de559e4a29df3b957eec92bc0de6bc8eaf6ca9cfed43e5e1d67ff65a34"
+dependencies = [
+ "bytemuck",
+]
+
+[[package]]
+name = "ring"
+version = "0.16.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc"
+dependencies = [
+ "cc",
+ "libc",
+ "once_cell",
+ "spin",
+ "untrusted",
+ "web-sys",
+ "winapi",
+]
+
+[[package]]
+name = "ruma"
+version = "0.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8dc348e3a4a18abc4e97fffa5e2e623f6edd50ba3a1dd5f47eb249fea713b69f"
+dependencies = [
+ "assign",
+ "js_int",
+ "js_option",
+ "ruma-appservice-api",
+ "ruma-client-api",
+ "ruma-common",
+ "ruma-federation-api",
+]
+
+[[package]]
+name = "ruma-appservice-api"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d4f8cecdd4e2729656fc4126b6b5b218834d4025e0ed0e5063087a0231098a5c"
+dependencies = [
+ "ruma-common",
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "ruma-client-api"
+version = "0.15.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d1e72bc731b4dc8b569aa83915f13e419144b67110d858c65bb74aa05e2dc4b7"
+dependencies = [
+ "assign",
+ "bytes",
+ "http",
+ "js_int",
+ "maplit",
+ "percent-encoding",
+ "ruma-common",
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "ruma-common"
+version = "0.10.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "716889595f4edc3cfeb94d9f122e413f73e37d7d80ea1c14196e1004241a3889"
+dependencies = [
+ "base64",
+ "bytes",
+ "form_urlencoded",
+ "getrandom 0.2.7",
+ "http",
+ "indexmap",
+ "itoa 1.0.3",
+ "js-sys",
+ "js_int",
+ "js_option",
+ "percent-encoding",
+ "pulldown-cmark",
+ "rand 0.8.5",
+ "regex",
+ "ruma-identifiers-validation",
+ "ruma-macros",
+ "serde",
+ "serde_json",
+ "thiserror",
+ "tracing",
+ "url",
+ "uuid 1.1.2",
+ "wildmatch",
+]
+
+[[package]]
+name = "ruma-federation-api"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f905d12f6144c7a754bd0339fa6893698c03d03a908abb20cc6eeb4ec7f9466"
+dependencies = [
+ "js_int",
+ "ruma-common",
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "ruma-identifiers-validation"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eabac62d16465a87435579c779d74dceabb93b09e44c766af6085050f3cc4275"
+dependencies = [
+ "js_int",
+ "thiserror",
+]
+
+[[package]]
+name = "ruma-macros"
+version = "0.10.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0f82e91eb61cd86d9287303133ee55b54618eccb75a522cc22a42c15f5bda340"
+dependencies = [
+ "once_cell",
+ "proc-macro-crate",
+ "proc-macro2",
+ "quote",
+ "ruma-identifiers-validation",
+ "serde",
+ "syn",
+ "toml",
+]
+
+[[package]]
+name = "rustc-demangle"
+version = "0.1.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342"
+
+[[package]]
+name = "rustix"
+version = "0.35.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72c825b8aa8010eb9ee99b75f05e10180b9278d161583034d7574c9d617aeada"
+dependencies = [
+ "bitflags",
+ "errno",
+ "io-lifetimes",
+ "libc",
+ "linux-raw-sys",
+ "windows-sys",
+]
+
+[[package]]
+name = "rustls"
+version = "0.20.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5aab8ee6c7097ed6057f43c187a62418d0c05a4bd5f18b3571db50ee0f9ce033"
+dependencies = [
+ "log",
+ "ring",
+ "sct",
+ "webpki",
+]
+
+[[package]]
+name = "rustls-pemfile"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0864aeff53f8c05aa08d86e5ef839d3dfcf07aeba2db32f12db0ef716e87bd55"
+dependencies = [
+ "base64",
+]
+
+[[package]]
+name = "rustyline"
+version = "10.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d1cd5ae51d3f7bf65d7969d579d502168ef578f289452bd8ccc91de28fda20e"
+dependencies = [
+ "bitflags",
+ "cfg-if",
+ "clipboard-win",
+ "dirs-next",
+ "fd-lock",
+ "libc",
+ "log",
+ "memchr",
+ "nix",
+ "radix_trie",
+ "scopeguard",
+ "unicode-segmentation",
+ "unicode-width",
+ "utf8parse",
+ "winapi",
+]
+
+[[package]]
+name = "rustyline-derive"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "107c3d5d7f370ac09efa62a78375f94d94b8a33c61d8c278b96683fb4dbf2d8d"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "ryu"
+version = "1.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09"
+
+[[package]]
+name = "same-file"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "sanitize-filename-reader-friendly"
+version = "2.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b750e71aac86f4b238844ac9416e7339a8de1225eb1ebe5fba89890f634c46bf"
+dependencies = [
+ "const_format",
+]
+
+[[package]]
+name = "schannel"
+version = "0.1.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2"
+dependencies = [
+ "lazy_static",
+ "windows-sys",
+]
+
+[[package]]
+name = "scoped-tls"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2"
+
+[[package]]
+name = "scoped_threadpool"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8"
+
+[[package]]
+name = "scopeguard"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
+
+[[package]]
+name = "scroll"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "04c565b551bafbef4157586fa379538366e4385d42082f255bfd96e4fe8519da"
+dependencies = [
+ "scroll_derive",
+]
+
+[[package]]
+name = "scroll_derive"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bdbda6ac5cd1321e724fa9cee216f3a61885889b896f073b8f82322789c5250e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "sct"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4"
+dependencies = [
+ "ring",
+ "untrusted",
+]
+
+[[package]]
+name = "security-framework"
+version = "2.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c"
+dependencies = [
+ "bitflags",
+ "core-foundation",
+ "core-foundation-sys",
+ "libc",
+ "security-framework-sys",
+]
+
+[[package]]
+name = "security-framework-sys"
+version = "2.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
+[[package]]
+name = "semver"
+version = "1.0.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93f6841e709003d68bb2deee8c343572bf446003ec20a583e76f7b15cebf3711"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "serde"
+version = "1.0.144"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_bytes"
+version = "0.11.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "serde_cbor"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5"
+dependencies = [
+ "half",
+ "serde",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.144"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.85"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44"
+dependencies = [
+ "itoa 1.0.3",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "serde_qs"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c7715380eec75f029a4ef7de39a9200e0a63823176b759d055b613f5a87df6a6"
+dependencies = [
+ "percent-encoding",
+ "serde",
+ "thiserror",
+]
+
+[[package]]
+name = "serde_urlencoded"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
+dependencies = [
+ "form_urlencoded",
+ "itoa 1.0.3",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "serde_yaml"
+version = "0.9.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a09f551ccc8210268ef848f0bab37b306e87b85b2e017b899e7fb815f5aed62"
+dependencies = [
+ "indexmap",
+ "itoa 1.0.3",
+ "ryu",
+ "serde",
+ "unsafe-libyaml",
+]
+
+[[package]]
+name = "sha2"
+version = "0.9.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800"
+dependencies = [
+ "block-buffer 0.9.0",
+ "cfg-if",
+ "cpufeatures",
+ "digest 0.9.0",
+ "opaque-debug",
+]
+
+[[package]]
+name = "sha2"
+version = "0.10.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "899bf02746a2c92bf1053d9327dadb252b01af1f81f90cdb902411f518bc7215"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest 0.10.3",
+]
+
+[[package]]
+name = "sharded-slab"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31"
+dependencies = [
+ "lazy_static",
+]
+
+[[package]]
+name = "signal-hook"
+version = "0.3.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a253b5e89e2698464fc26b545c9edceb338e18a89effeeecfea192c3025be29d"
+dependencies = [
+ "libc",
+ "signal-hook-registry",
+]
+
+[[package]]
+name = "signal-hook-mio"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af"
+dependencies = [
+ "libc",
+ "mio",
+ "signal-hook",
+]
+
+[[package]]
+name = "signal-hook-registry"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "signature"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f0ea32af43239f0d353a7dd75a22d94c329c8cdaafdcb4c1c1335aa10c298a4a"
+
+[[package]]
+name = "slab"
+version = "0.4.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "sled"
+version = "0.34.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f96b4737c2ce5987354855aed3797279def4ebf734436c6aa4552cf8e169935"
+dependencies = [
+ "crc32fast",
+ "crossbeam-epoch",
+ "crossbeam-utils",
+ "fs2",
+ "fxhash",
+ "libc",
+ "log",
+ "parking_lot 0.11.2",
+]
+
+[[package]]
+name = "sled-state-inspector"
+version = "0.1.0"
+dependencies = [
+ "atty",
+ "clap 3.2.22",
+ "futures",
+ "matrix-sdk-base",
+ "matrix-sdk-sled",
+ "ruma",
+ "rustyline",
+ "rustyline-derive",
+ "serde",
+ "serde_json",
+ "syntect",
+]
+
+[[package]]
+name = "slog"
+version = "2.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06"
+
+[[package]]
+name = "smallvec"
+version = "1.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1"
+
+[[package]]
+name = "socket2"
+version = "0.4.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "10c98bba371b9b22a71a9414e420f92ddeb2369239af08200816169d5e2dd7aa"
+dependencies = [
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "spin"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
+
+[[package]]
+name = "spki"
+version = "0.5.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27"
+dependencies = [
+ "der",
+]
+
+[[package]]
+name = "stable_deref_trait"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
+
+[[package]]
+name = "static_assertions"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
+
+[[package]]
+name = "str-buf"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0"
+
+[[package]]
+name = "str_stack"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9091b6114800a5f2141aee1d1b9d6ca3592ac062dc5decb3764ec5895a47b4eb"
+
+[[package]]
+name = "strsim"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
+
+[[package]]
+name = "strsim"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
+
+[[package]]
+name = "structopt"
+version = "0.3.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10"
+dependencies = [
+ "clap 2.34.0",
+ "lazy_static",
+ "structopt-derive",
+]
+
+[[package]]
+name = "structopt-derive"
+version = "0.4.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0"
+dependencies = [
+ "heck 0.3.3",
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "subtle"
+version = "2.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
+
+[[package]]
+name = "symbolic-common"
+version = "9.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3e555b2c3ebd97b963c8a3e94ce5e5137ba42da4a26687f81c700d8de1c997f0"
+dependencies = [
+ "debugid",
+ "memmap2",
+ "stable_deref_trait",
+ "uuid 1.1.2",
+]
+
+[[package]]
+name = "symbolic-demangle"
+version = "9.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "71a1425bccf0a24c68c9faea6c4f1f84b4865a3dd5976454d8a796c80216e38a"
+dependencies = [
+ "cpp_demangle",
+ "rustc-demangle",
+ "symbolic-common",
+]
+
+[[package]]
+name = "syn"
+version = "1.0.99"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "sync_wrapper"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "20518fe4a4c9acf048008599e464deb21beeae3d3578418951a189c235a7a9a8"
+
+[[package]]
+name = "synstructure"
+version = "0.12.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+ "unicode-xid",
+]
+
+[[package]]
+name = "syntect"
+version = "5.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c6c454c27d9d7d9a84c7803aaa3c50cd088d2906fe3c6e42da3209aa623576a8"
+dependencies = [
+ "bincode",
+ "bitflags",
+ "fancy-regex",
+ "flate2",
+ "fnv",
+ "lazy_static",
+ "once_cell",
+ "regex-syntax",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "thiserror",
+ "walkdir",
+]
+
+[[package]]
+name = "tempfile"
+version = "3.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4"
+dependencies = [
+ "cfg-if",
+ "fastrand",
+ "libc",
+ "redox_syscall",
+ "remove_dir_all",
+ "winapi",
+]
+
+[[package]]
+name = "termcolor"
+version = "1.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "terminal_size"
+version = "0.1.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df"
+dependencies = [
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "textwrap"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
+dependencies = [
+ "unicode-width",
+]
+
+[[package]]
+name = "textwrap"
+version = "0.15.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "949517c0cf1bf4ee812e2e07e08ab448e3ae0d23472aee8a06c985f0c8815b16"
+
+[[package]]
+name = "thiserror"
+version = "1.0.33"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3d0a539a918745651435ac7db7a18761589a94cd7e94cd56999f828bf73c8a57"
+dependencies = [
+ "thiserror-impl",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "1.0.33"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c251e90f708e16c49a16f4917dc2131e75222b72edfa9cb7f7c58ae56aae0c09"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "thread-id"
+version = "4.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5fdfe0627923f7411a43ec9ec9c39c3a9b4151be313e0922042581fb6c9b717f"
+dependencies = [
+ "libc",
+ "redox_syscall",
+ "winapi",
+]
+
+[[package]]
+name = "thread_local"
+version = "1.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180"
+dependencies = [
+ "once_cell",
+]
+
+[[package]]
+name = "tiff"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a53f4706d65497df0c4349241deddf35f84cee19c87ed86ea8ca590f4464437"
+dependencies = [
+ "jpeg-decoder 0.1.22",
+ "miniz_oxide 0.4.4",
+ "weezl",
+]
+
+[[package]]
+name = "tiff"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7259662e32d1e219321eb309d5f9d898b779769d81b76e762c07c8e5d38fcb65"
+dependencies = [
+ "flate2",
+ "jpeg-decoder 0.2.6",
+ "weezl",
+]
+
+[[package]]
+name = "time"
+version = "0.1.44"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255"
+dependencies = [
+ "libc",
+ "wasi 0.10.0+wasi-snapshot-preview1",
+ "winapi",
+]
+
+[[package]]
+name = "time"
+version = "0.3.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c3f9a28b618c3a6b9251b6908e9c99e04b9e5c02e6581ccbb67d59c34ef7f9b"
+dependencies = [
+ "itoa 1.0.3",
+ "libc",
+ "num_threads",
+]
+
+[[package]]
+name = "tinytemplate"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc"
+dependencies = [
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "tinyvec"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50"
+dependencies = [
+ "tinyvec_macros",
+]
+
+[[package]]
+name = "tinyvec_macros"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
+
+[[package]]
+name = "tokio"
+version = "1.21.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a9e03c497dc955702ba729190dc4aac6f2a0ce97f913e5b1b5912fc5039d9099"
+dependencies = [
+ "autocfg",
+ "bytes",
+ "libc",
+ "memchr",
+ "mio",
+ "num_cpus",
+ "pin-project-lite",
+ "socket2",
+ "tokio-macros",
+ "winapi",
+]
+
+[[package]]
+name = "tokio-macros"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "tokio-native-tls"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b"
+dependencies = [
+ "native-tls",
+ "tokio",
+]
+
+[[package]]
+name = "tokio-rustls"
+version = "0.23.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59"
+dependencies = [
+ "rustls",
+ "tokio",
+ "webpki",
+]
+
+[[package]]
+name = "tokio-socks"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51165dfa029d2a65969413a6cc96f354b86b464498702f174a4efa13608fd8c0"
+dependencies = [
+ "either",
+ "futures-util",
+ "thiserror",
+ "tokio",
+]
+
+[[package]]
+name = "tokio-stream"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df54d54117d6fdc4e4fea40fe1e4e566b3505700e148a6827e59b34b0d2600d9"
+dependencies = [
+ "futures-core",
+ "pin-project-lite",
+ "tokio",
+]
+
+[[package]]
+name = "tokio-util"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cc463cd8deddc3770d20f9852143d50bf6094e640b485cb2e189a2099085ff45"
+dependencies = [
+ "bytes",
+ "futures-core",
+ "futures-sink",
+ "pin-project-lite",
+ "tokio",
+ "tracing",
+]
+
+[[package]]
+name = "toml"
+version = "0.5.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "tower"
+version = "0.4.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c"
+dependencies = [
+ "futures-core",
+ "futures-util",
+ "pin-project",
+ "pin-project-lite",
+ "tokio",
+ "tower-layer",
+ "tower-service",
+ "tracing",
+]
+
+[[package]]
+name = "tower-http"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c530c8675c1dbf98facee631536fa116b5fb6382d7dd6dc1b118d970eafe3ba"
+dependencies = [
+ "bitflags",
+ "bytes",
+ "futures-core",
+ "futures-util",
+ "http",
+ "http-body",
+ "http-range-header",
+ "pin-project-lite",
+ "tower",
+ "tower-layer",
+ "tower-service",
+]
+
+[[package]]
+name = "tower-layer"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0"
+
+[[package]]
+name = "tower-service"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52"
+
+[[package]]
+name = "tracing"
+version = "0.1.36"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307"
+dependencies = [
+ "cfg-if",
+ "log",
+ "pin-project-lite",
+ "tracing-attributes",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-attributes"
+version = "0.1.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "11c75893af559bc8e10716548bdef5cb2b983f8e637db9d0e15126b61b484ee2"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "tracing-core"
+version = "0.1.30"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a"
+dependencies = [
+ "once_cell",
+ "valuable",
+]
+
+[[package]]
+name = "tracing-flame"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0bae117ee14789185e129aaee5d93750abe67fdc5a9a62650452bfe4e122a3a9"
+dependencies = [
+ "lazy_static",
+ "tracing",
+ "tracing-subscriber",
+]
+
+[[package]]
+name = "tracing-log"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922"
+dependencies = [
+ "lazy_static",
+ "log",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-subscriber"
+version = "0.3.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70"
+dependencies = [
+ "matchers",
+ "nu-ansi-term",
+ "once_cell",
+ "regex",
+ "sharded-slab",
+ "smallvec",
+ "thread_local",
+ "time 0.3.14",
+ "tracing",
+ "tracing-core",
+ "tracing-log",
+]
+
+[[package]]
+name = "try-lock"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642"
+
+[[package]]
+name = "tui"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "96fe69244ec2af261bced1d9046a6fee6c8c2a6b0228e59e5ba39bc8ba4ed729"
+dependencies = [
+ "bitflags",
+ "cassowary",
+ "crossterm",
+ "unicode-segmentation",
+ "unicode-width",
+]
+
+[[package]]
+name = "tui-logger"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c9564fd9c18a1f9a20fb8613494744778e357aa0cd5c7d85fdf699a4e5b4962"
+dependencies = [
+ "chrono",
+ "fxhash",
+ "lazy_static",
+ "log",
+ "parking_lot 0.12.1",
+ "slog",
+ "tui",
+]
+
+[[package]]
+name = "tuirealm"
+version = "1.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f0241dbec136199389efb5420fc88dd62cf2543a994547726cabcb76d7e94336"
+dependencies = [
+ "bitflags",
+ "crossterm",
+ "lazy-regex",
+ "thiserror",
+ "tui",
+ "tuirealm_derive",
+]
+
+[[package]]
+name = "tuirealm_derive"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e0adcdaf59881626555558eae08f8a53003c8a1961723b4d7a10c51599abbc81"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "typenum"
+version = "1.15.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987"
+
+[[package]]
+name = "unicase"
+version = "2.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6"
+dependencies = [
+ "version_check",
+]
+
+[[package]]
+name = "unicode-bidi"
+version = "0.3.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992"
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf"
+
+[[package]]
+name = "unicode-normalization"
+version = "0.1.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "854cbdc4f7bc6ae19c820d44abdc3277ac3e1b2b93db20a636825d9322fb60e6"
+dependencies = [
+ "tinyvec",
+]
+
+[[package]]
+name = "unicode-segmentation"
+version = "1.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99"
+
+[[package]]
+name = "unicode-width"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
+
+[[package]]
+name = "unicode-xid"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04"
+
+[[package]]
+name = "uniffi"
+version = "0.21.0"
+source = "git+https://github.com/mozilla/uniffi-rs?rev=779e955f21a70e4aba43a7408f1841dcdf728b32#779e955f21a70e4aba43a7408f1841dcdf728b32"
+dependencies = [
+ "anyhow",
+ "bytes",
+ "camino",
+ "cargo_metadata",
+ "log",
+ "once_cell",
+ "paste",
+ "static_assertions",
+ "uniffi_macros",
+]
+
+[[package]]
+name = "uniffi_bindgen"
+version = "0.21.0"
+source = "git+https://github.com/mozilla/uniffi-rs?rev=779e955f21a70e4aba43a7408f1841dcdf728b32#779e955f21a70e4aba43a7408f1841dcdf728b32"
+dependencies = [
+ "anyhow",
+ "askama",
+ "bincode",
+ "camino",
+ "clap 3.2.22",
+ "fs-err",
+ "goblin",
+ "heck 0.4.0",
+ "once_cell",
+ "paste",
+ "serde",
+ "serde_json",
+ "toml",
+ "uniffi_meta",
+ "weedle2",
+]
+
+[[package]]
+name = "uniffi_build"
+version = "0.21.0"
+source = "git+https://github.com/mozilla/uniffi-rs?rev=779e955f21a70e4aba43a7408f1841dcdf728b32#779e955f21a70e4aba43a7408f1841dcdf728b32"
+dependencies = [
+ "anyhow",
+ "camino",
+ "uniffi_bindgen",
+]
+
+[[package]]
+name = "uniffi_macros"
+version = "0.21.0"
+source = "git+https://github.com/mozilla/uniffi-rs?rev=779e955f21a70e4aba43a7408f1841dcdf728b32#779e955f21a70e4aba43a7408f1841dcdf728b32"
+dependencies = [
+ "bincode",
+ "camino",
+ "fs-err",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "serde",
+ "syn",
+ "toml",
+ "uniffi_build",
+ "uniffi_meta",
+]
+
+[[package]]
+name = "uniffi_meta"
+version = "0.21.0"
+source = "git+https://github.com/mozilla/uniffi-rs?rev=779e955f21a70e4aba43a7408f1841dcdf728b32#779e955f21a70e4aba43a7408f1841dcdf728b32"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "universal-hash"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05"
+dependencies = [
+ "generic-array",
+ "subtle",
+]
+
+[[package]]
+name = "unsafe-libyaml"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "931179334a56395bcf64ba5e0ff56781381c1a5832178280c7d7f91d1679aeb0"
+
+[[package]]
+name = "untrusted"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
+
+[[package]]
+name = "url"
+version = "2.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643"
+dependencies = [
+ "form_urlencoded",
+ "idna",
+ "percent-encoding",
+ "serde",
+]
+
+[[package]]
+name = "utf8parse"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "936e4b492acfd135421d8dca4b1aa80a7bfc26e702ef3af710e0752684df5372"
+
+[[package]]
+name = "uuid"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7"
+dependencies = [
+ "getrandom 0.2.7",
+]
+
+[[package]]
+name = "uuid"
+version = "1.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd6469f4314d5f1ffec476e05f17cc9a78bc7a27a6a857842170bdf8d6f98d2f"
+dependencies = [
+ "getrandom 0.2.7",
+]
+
+[[package]]
+name = "valuable"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
+
+[[package]]
+name = "vcpkg"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
+
+[[package]]
+name = "vec_map"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
+
+[[package]]
+name = "version_check"
+version = "0.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
+
+[[package]]
+name = "vodozemac"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f6f20153a1c82ac5f1243b62e80f067ae608facc415c6ef82f88426a61c79886"
+dependencies = [
+ "aes",
+ "arrayvec 0.7.2",
+ "base64",
+ "cbc",
+ "ed25519-dalek",
+ "hkdf",
+ "hmac",
+ "pkcs7",
+ "prost",
+ "rand 0.7.3",
+ "serde",
+ "serde_json",
+ "sha2 0.10.3",
+ "subtle",
+ "thiserror",
+ "x25519-dalek",
+ "zeroize",
+]
+
+[[package]]
+name = "waker-fn"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca"
+
+[[package]]
+name = "walkdir"
+version = "2.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56"
+dependencies = [
+ "same-file",
+ "winapi",
+ "winapi-util",
+]
+
+[[package]]
+name = "want"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
+dependencies = [
+ "log",
+ "try-lock",
+]
+
+[[package]]
+name = "wasi"
+version = "0.9.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
+
+[[package]]
+name = "wasi"
+version = "0.10.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
+
+[[package]]
+name = "wasi"
+version = "0.11.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268"
+dependencies = [
+ "cfg-if",
+ "wasm-bindgen-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142"
+dependencies = [
+ "bumpalo",
+ "log",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-futures"
+version = "0.4.33"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f"
+
+[[package]]
+name = "wasm-bindgen-test"
+version = "0.3.33"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09d2fff962180c3fadf677438054b1db62bee4aa32af26a45388af07d1287e1d"
+dependencies = [
+ "console_error_panic_hook",
+ "js-sys",
+ "scoped-tls",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "wasm-bindgen-test-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-test-macro"
+version = "0.3.33"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4683da3dfc016f704c9f82cf401520c4f1cb3ee440f7f52b3d6ac29506a49ca7"
+dependencies = [
+ "proc-macro2",
+ "quote",
+]
+
+[[package]]
+name = "wasm-command-bot"
+version = "0.1.0"
+dependencies = [
+ "console_error_panic_hook",
+ "matrix-sdk",
+ "url",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "wasm-bindgen-test",
+ "web-sys",
+]
+
+[[package]]
+name = "wasm-timer"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f"
+dependencies = [
+ "futures",
+ "js-sys",
+ "parking_lot 0.11.2",
+ "pin-utils",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+]
+
+[[package]]
+name = "web-sys"
+version = "0.3.59"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed055ab27f941423197eb86b2035720b1a3ce40504df082cac2ecc6ed73335a1"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "webpki"
+version = "0.22.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd"
+dependencies = [
+ "ring",
+ "untrusted",
+]
+
+[[package]]
+name = "webpki-roots"
+version = "0.22.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1c760f0d366a6c24a02ed7816e23e691f5d92291f94d15e836006fd11b04daf"
+dependencies = [
+ "webpki",
+]
+
+[[package]]
+name = "weedle2"
+version = "4.0.0"
+source = "git+https://github.com/mozilla/uniffi-rs?rev=779e955f21a70e4aba43a7408f1841dcdf728b32#779e955f21a70e4aba43a7408f1841dcdf728b32"
+dependencies = [
+ "nom",
+]
+
+[[package]]
+name = "weezl"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb"
+
+[[package]]
+name = "wildmatch"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ee583bdc5ff1cf9db20e9db5bb3ff4c3089a8f6b8b31aff265c9aba85812db86"
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-util"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
+[[package]]
+name = "windows-sys"
+version = "0.36.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2"
+dependencies = [
+ "windows_aarch64_msvc",
+ "windows_i686_gnu",
+ "windows_i686_msvc",
+ "windows_x86_64_gnu",
+ "windows_x86_64_msvc",
+]
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.36.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.36.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.36.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.36.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.36.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680"
+
+[[package]]
+name = "winreg"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "wiremock"
+version = "0.5.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cc3c7b7557dbfdad6431b5a51196c9110cef9d83f6a9b26699f35cdc0ae113ec"
+dependencies = [
+ "assert-json-diff",
+ "async-trait",
+ "base64",
+ "deadpool",
+ "futures",
+ "futures-timer",
+ "http-types",
+ "hyper",
+ "log",
+ "once_cell",
+ "regex",
+ "serde",
+ "serde_json",
+ "tokio",
+]
+
+[[package]]
+name = "x25519-dalek"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2392b6b94a576b4e2bf3c5b2757d63f10ada8020a2e4d08ac849ebcf6ea8e077"
+dependencies = [
+ "curve25519-dalek",
+ "rand_core 0.5.1",
+ "serde",
+ "zeroize",
+]
+
+[[package]]
+name = "xdg"
+version = "2.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c4583db5cbd4c4c0303df2d15af80f0539db703fa1c68802d4cbbd2dd0f88f6"
+dependencies = [
+ "dirs",
+]
+
+[[package]]
+name = "xshell"
+version = "0.1.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eaad2035244c56da05573d4d7fda5f903c60a5f35b9110e157a14a1df45a9f14"
+dependencies = [
+ "xshell-macros",
+]
+
+[[package]]
+name = "xshell-macros"
+version = "0.1.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4916a4a3cad759e499a3620523bf9545cc162d7a06163727dde97ce9aaa4cf39"
+
+[[package]]
+name = "xtask"
+version = "0.1.0"
+dependencies = [
+ "camino",
+ "clap 4.0.18",
+ "serde",
+ "serde_json",
+ "uniffi_bindgen",
+ "xshell",
+]
+
+[[package]]
+name = "zeroize"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd"
+dependencies = [
+ "zeroize_derive",
+]
+
+[[package]]
+name = "zeroize_derive"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f8f187641dad4f680d25c4bfc4225b418165984179f26ca76ec4fb6441d3a17"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+ "synstructure",
+]
diff --git a/nixpkgs/pkgs/development/libraries/matrix-sdk-crypto-nodejs/Cargo-beta.6.lock b/nixpkgs/pkgs/development/libraries/matrix-sdk-crypto-nodejs/Cargo-beta.6.lock
new file mode 100644
index 000000000000..437f13e5e786
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/matrix-sdk-crypto-nodejs/Cargo-beta.6.lock
@@ -0,0 +1,6253 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "addr2line"
+version = "0.19.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97"
+dependencies = [
+ "gimli",
+]
+
+[[package]]
+name = "adler"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
+
+[[package]]
+name = "adler32"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234"
+
+[[package]]
+name = "aead"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877"
+dependencies = [
+ "generic-array",
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "aes"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241"
+dependencies = [
+ "cfg-if",
+ "cipher 0.4.4",
+ "cpufeatures",
+]
+
+[[package]]
+name = "ahash"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47"
+dependencies = [
+ "getrandom 0.2.9",
+ "once_cell",
+ "version_check",
+]
+
+[[package]]
+name = "ahash"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f"
+dependencies = [
+ "cfg-if",
+ "getrandom 0.2.9",
+ "once_cell",
+ "version_check",
+]
+
+[[package]]
+name = "aho-corasick"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "android_log-sys"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85965b6739a430150bdd138e2374a98af0c3ee0d030b3bb7fc3bddff58d0102e"
+
+[[package]]
+name = "android_system_properties"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "anes"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299"
+
+[[package]]
+name = "anstream"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e579a7752471abc2a8268df8b20005e3eadd975f585398f17efcfd8d4927371"
+dependencies = [
+ "anstyle",
+ "anstyle-parse",
+ "anstyle-query",
+ "anstyle-wincon",
+ "colorchoice",
+ "is-terminal",
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d"
+
+[[package]]
+name = "anstyle-parse"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee"
+dependencies = [
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle-query"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b"
+dependencies = [
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "anstyle-wincon"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4bcd8291a340dd8ac70e18878bc4501dd7b4ff970cfa21c207d36ece51ea88fd"
+dependencies = [
+ "anstyle",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "anyhow"
+version = "1.0.70"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4"
+
+[[package]]
+name = "anymap2"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d301b3b94cb4b2f23d7917810addbbaff90738e0ca2be692bd027e70d7e0330c"
+
+[[package]]
+name = "arrayref"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545"
+
+[[package]]
+name = "arrayvec"
+version = "0.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "askama"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fb98f10f371286b177db5eeb9a6e5396609555686a35e1d4f7b9a9c6d8af0139"
+dependencies = [
+ "askama_derive",
+ "askama_escape",
+ "askama_shared",
+]
+
+[[package]]
+name = "askama_derive"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87bf87e6e8b47264efa9bde63d6225c6276a52e05e91bf37eaa8afd0032d6b71"
+dependencies = [
+ "askama_shared",
+ "proc-macro2",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "askama_escape"
+version = "0.10.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "619743e34b5ba4e9703bba34deac3427c72507c7159f5fd030aea8cac0cfe341"
+
+[[package]]
+name = "askama_shared"
+version = "0.12.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bf722b94118a07fcbc6640190f247334027685d4e218b794dbfe17c32bf38ed0"
+dependencies = [
+ "askama_escape",
+ "mime",
+ "mime_guess",
+ "nom",
+ "proc-macro2",
+ "quote",
+ "serde",
+ "syn 1.0.109",
+ "toml 0.5.11",
+]
+
+[[package]]
+name = "assert-json-diff"
+version = "2.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "47e4f2b81832e72834d7518d8487a0396a28cc408186a2e8854c0f98011faf12"
+dependencies = [
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "assert_matches"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9"
+
+[[package]]
+name = "assign"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5f093eed78becd229346bf859eec0aa4dd7ddde0757287b2b4107a1f09c80002"
+
+[[package]]
+name = "async-channel"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833"
+dependencies = [
+ "concurrent-queue",
+ "event-listener",
+ "futures-core",
+]
+
+[[package]]
+name = "async-compression"
+version = "0.3.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "942c7cd7ae39e91bde4820d74132e9862e62c2f386c3aa90ccf55949f5bad63a"
+dependencies = [
+ "flate2",
+ "futures-core",
+ "memchr",
+ "pin-project-lite",
+ "tokio",
+]
+
+[[package]]
+name = "async-executor"
+version = "1.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb"
+dependencies = [
+ "async-lock",
+ "async-task",
+ "concurrent-queue",
+ "fastrand",
+ "futures-lite",
+ "slab",
+]
+
+[[package]]
+name = "async-global-executor"
+version = "2.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776"
+dependencies = [
+ "async-channel",
+ "async-executor",
+ "async-io",
+ "async-lock",
+ "blocking",
+ "futures-lite",
+ "once_cell",
+]
+
+[[package]]
+name = "async-io"
+version = "1.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af"
+dependencies = [
+ "async-lock",
+ "autocfg",
+ "cfg-if",
+ "concurrent-queue",
+ "futures-lite",
+ "log",
+ "parking",
+ "polling",
+ "rustix",
+ "slab",
+ "socket2",
+ "waker-fn",
+]
+
+[[package]]
+name = "async-lock"
+version = "2.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7"
+dependencies = [
+ "event-listener",
+]
+
+[[package]]
+name = "async-process"
+version = "1.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a9d28b1d97e08915212e2e45310d47854eafa69600756fc735fb788f75199c9"
+dependencies = [
+ "async-io",
+ "async-lock",
+ "autocfg",
+ "blocking",
+ "cfg-if",
+ "event-listener",
+ "futures-lite",
+ "rustix",
+ "signal-hook",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "async-std"
+version = "1.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d"
+dependencies = [
+ "async-channel",
+ "async-global-executor",
+ "async-io",
+ "async-lock",
+ "async-process",
+ "crossbeam-utils",
+ "futures-channel",
+ "futures-core",
+ "futures-io",
+ "futures-lite",
+ "gloo-timers",
+ "kv-log-macro",
+ "log",
+ "memchr",
+ "once_cell",
+ "pin-project-lite",
+ "pin-utils",
+ "slab",
+ "wasm-bindgen-futures",
+]
+
+[[package]]
+name = "async-stream"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51"
+dependencies = [
+ "async-stream-impl",
+ "futures-core",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "async-stream-impl"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.15",
+]
+
+[[package]]
+name = "async-task"
+version = "4.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae"
+
+[[package]]
+name = "async-trait"
+version = "0.1.68"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.15",
+]
+
+[[package]]
+name = "atomic"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b88d82667eca772c4aa12f0f1348b3ae643424c8876448f3f7bd5787032e234c"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "atomic-waker"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3"
+
+[[package]]
+name = "atty"
+version = "0.2.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
+dependencies = [
+ "hermit-abi 0.1.19",
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "autocfg"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+
+[[package]]
+name = "axum"
+version = "0.6.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "113713495a32dd0ab52baf5c10044725aa3aec00b31beda84218e469029b72a3"
+dependencies = [
+ "async-trait",
+ "axum-core",
+ "bitflags 1.3.2",
+ "bytes",
+ "futures-util",
+ "http",
+ "http-body",
+ "hyper",
+ "itoa",
+ "matchit",
+ "memchr",
+ "mime",
+ "percent-encoding",
+ "pin-project-lite",
+ "rustversion",
+ "serde",
+ "serde_json",
+ "serde_path_to_error",
+ "sync_wrapper",
+ "tower",
+ "tower-layer",
+ "tower-service",
+]
+
+[[package]]
+name = "axum-core"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c"
+dependencies = [
+ "async-trait",
+ "bytes",
+ "futures-util",
+ "http",
+ "http-body",
+ "mime",
+ "rustversion",
+ "tower-layer",
+ "tower-service",
+]
+
+[[package]]
+name = "backoff"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1"
+dependencies = [
+ "futures-core",
+ "getrandom 0.2.9",
+ "instant",
+ "pin-project-lite",
+ "rand 0.8.5",
+ "tokio",
+]
+
+[[package]]
+name = "backtrace"
+version = "0.3.67"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca"
+dependencies = [
+ "addr2line",
+ "cc",
+ "cfg-if",
+ "libc",
+ "miniz_oxide 0.6.2",
+ "object",
+ "rustc-demangle",
+]
+
+[[package]]
+name = "base64"
+version = "0.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
+
+[[package]]
+name = "base64"
+version = "0.21.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a"
+
+[[package]]
+name = "base64ct"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"
+
+[[package]]
+name = "benchmarks"
+version = "1.0.0"
+dependencies = [
+ "criterion",
+ "matrix-sdk-crypto",
+ "matrix-sdk-sled",
+ "matrix-sdk-test",
+ "pprof",
+ "ruma",
+ "serde_json",
+ "tempfile",
+ "tokio",
+]
+
+[[package]]
+name = "bincode"
+version = "1.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "bitflags"
+version = "2.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24a6904aef64d73cf10ab17ebace7befb918b82164785cb89907993be7f83813"
+
+[[package]]
+name = "bitmaps"
+version = "3.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "703642b98a00b3b90513279a8ede3fcfa479c126c5fb46e78f3051522f021403"
+
+[[package]]
+name = "blake3"
+version = "1.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42ae2468a89544a466886840aa467a25b766499f4f04bf7d9fcd10ecee9fccef"
+dependencies = [
+ "arrayref",
+ "arrayvec",
+ "cc",
+ "cfg-if",
+ "constant_time_eq",
+ "digest 0.10.6",
+]
+
+[[package]]
+name = "block-buffer"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "block-buffer"
+version = "0.10.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "block-padding"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "blocking"
+version = "1.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77231a1c8f801696fc0123ec6150ce92cffb8e164a02afb9c8ddee0e9b65ad65"
+dependencies = [
+ "async-channel",
+ "async-lock",
+ "async-task",
+ "atomic-waker",
+ "fastrand",
+ "futures-lite",
+ "log",
+]
+
+[[package]]
+name = "bs58"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3"
+
+[[package]]
+name = "bumpalo"
+version = "3.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b1ce199063694f33ffb7dd4e0ee620741495c32833cde5aa08f02a0bf96f0c8"
+
+[[package]]
+name = "bytemuck"
+version = "1.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea"
+
+[[package]]
+name = "byteorder"
+version = "1.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
+
+[[package]]
+name = "bytes"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be"
+
+[[package]]
+name = "bytesize"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38fcc2979eff34a4b84e1cf9a1e3da42a7d44b3b690a40cdcb23e3d556cfb2e5"
+
+[[package]]
+name = "camino"
+version = "1.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c530edf18f37068ac2d977409ed5cd50d53d73bc653c7647b48eb78976ac9ae2"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "cargo-platform"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "cargo_metadata"
+version = "0.15.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a"
+dependencies = [
+ "camino",
+ "cargo-platform",
+ "semver",
+ "serde",
+ "serde_json",
+ "thiserror",
+]
+
+[[package]]
+name = "cast"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
+
+[[package]]
+name = "cbc"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6"
+dependencies = [
+ "cipher 0.4.4",
+]
+
+[[package]]
+name = "cc"
+version = "1.0.79"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "chacha20"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c80e5460aa66fe3b91d40bcbdab953a597b60053e34d684ac6903f863b680a6"
+dependencies = [
+ "cfg-if",
+ "cipher 0.3.0",
+ "cpufeatures",
+ "zeroize",
+]
+
+[[package]]
+name = "chacha20poly1305"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a18446b09be63d457bbec447509e85f662f32952b035ce892290396bc0b0cff5"
+dependencies = [
+ "aead",
+ "chacha20",
+ "cipher 0.3.0",
+ "poly1305",
+ "zeroize",
+]
+
+[[package]]
+name = "checked_int_cast"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "17cc5e6b5ab06331c33589842070416baa137e8b0eb912b008cfd4a78ada7919"
+
+[[package]]
+name = "chrono"
+version = "0.4.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b"
+dependencies = [
+ "iana-time-zone",
+ "js-sys",
+ "num-integer",
+ "num-traits",
+ "time 0.1.45",
+ "wasm-bindgen",
+ "winapi",
+]
+
+[[package]]
+name = "ciborium"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b0c137568cc60b904a7724001b35ce2630fd00d5d84805fbb608ab89509d788f"
+dependencies = [
+ "ciborium-io",
+ "ciborium-ll",
+ "serde",
+]
+
+[[package]]
+name = "ciborium-io"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "346de753af073cc87b52b2083a506b38ac176a44cfb05497b622e27be899b369"
+
+[[package]]
+name = "ciborium-ll"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "213030a2b5a4e0c0892b6652260cf6ccac84827b83a85a534e178e3906c4cf1b"
+dependencies = [
+ "ciborium-io",
+ "half",
+]
+
+[[package]]
+name = "cipher"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "cipher"
+version = "0.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
+dependencies = [
+ "crypto-common",
+ "inout",
+]
+
+[[package]]
+name = "clap"
+version = "3.2.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5"
+dependencies = [
+ "atty",
+ "bitflags 1.3.2",
+ "clap_derive 3.2.18",
+ "clap_lex 0.2.4",
+ "indexmap",
+ "once_cell",
+ "strsim",
+ "termcolor",
+ "textwrap",
+]
+
+[[package]]
+name = "clap"
+version = "4.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "956ac1f6381d8d82ab4684768f89c0ea3afe66925ceadb4eeb3fc452ffc55d62"
+dependencies = [
+ "clap_builder",
+ "clap_derive 4.2.0",
+ "once_cell",
+]
+
+[[package]]
+name = "clap_builder"
+version = "4.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "84080e799e54cff944f4b4a4b0e71630b0e0443b25b985175c7dddc1a859b749"
+dependencies = [
+ "anstream",
+ "anstyle",
+ "bitflags 1.3.2",
+ "clap_lex 0.4.1",
+ "strsim",
+]
+
+[[package]]
+name = "clap_derive"
+version = "3.2.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65"
+dependencies = [
+ "heck",
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "clap_derive"
+version = "4.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f9644cd56d6b87dbe899ef8b053e331c0637664e9e21a33dfcdc36093f5c5c4"
+dependencies = [
+ "heck",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.15",
+]
+
+[[package]]
+name = "clap_lex"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5"
+dependencies = [
+ "os_str_bytes",
+]
+
+[[package]]
+name = "clap_lex"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1"
+
+[[package]]
+name = "cmake"
+version = "0.1.50"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "codespan-reporting"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e"
+dependencies = [
+ "termcolor",
+ "unicode-width",
+]
+
+[[package]]
+name = "color_quant"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b"
+
+[[package]]
+name = "colorchoice"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
+
+[[package]]
+name = "concurrent-queue"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c"
+dependencies = [
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "console_error_panic_hook"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc"
+dependencies = [
+ "cfg-if",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "const-oid"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3"
+
+[[package]]
+name = "const_format"
+version = "0.2.30"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7309d9b4d3d2c0641e018d449232f2e28f1b22933c137f157d3dbc14228b8c0e"
+dependencies = [
+ "const_format_proc_macros",
+]
+
+[[package]]
+name = "const_format_proc_macros"
+version = "0.2.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d897f47bf7270cf70d370f8f98c1abb6d2d4cf60a6845d30e05bfb90c6568650"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-xid",
+]
+
+[[package]]
+name = "constant_time_eq"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "13418e745008f7349ec7e449155f419a61b92b58a99cc3616942b926825ec76b"
+
+[[package]]
+name = "convert_case"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca"
+dependencies = [
+ "unicode-segmentation",
+]
+
+[[package]]
+name = "core-foundation"
+version = "0.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa"
+
+[[package]]
+name = "cpp_demangle"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2c76f98bdfc7f66172e6c7065f981ebb576ffc903fe4c0561d9f0c2509226dc6"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "cpufeatures"
+version = "0.2.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "crc32fast"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "criterion"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7c76e09c1aae2bc52b3d2f29e13c6572553b30c4aa1b8a49fd70de6412654cb"
+dependencies = [
+ "anes",
+ "atty",
+ "cast",
+ "ciborium",
+ "clap 3.2.23",
+ "criterion-plot",
+ "futures",
+ "itertools",
+ "lazy_static",
+ "num-traits",
+ "oorandom",
+ "plotters",
+ "rayon",
+ "regex",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "tinytemplate",
+ "tokio",
+ "walkdir",
+]
+
+[[package]]
+name = "criterion-plot"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1"
+dependencies = [
+ "cast",
+ "itertools",
+]
+
+[[package]]
+name = "crossbeam-channel"
+version = "0.5.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200"
+dependencies = [
+ "cfg-if",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-deque"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef"
+dependencies = [
+ "cfg-if",
+ "crossbeam-epoch",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-epoch"
+version = "0.9.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695"
+dependencies = [
+ "autocfg",
+ "cfg-if",
+ "crossbeam-utils",
+ "memoffset",
+ "scopeguard",
+]
+
+[[package]]
+name = "crossbeam-utils"
+version = "0.8.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "crypto-common"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
+dependencies = [
+ "generic-array",
+ "typenum",
+]
+
+[[package]]
+name = "ctor"
+version = "0.1.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096"
+dependencies = [
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "ctor"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd4056f63fce3b82d852c3da92b08ea59959890813a7f4ce9c0ff85b10cf301b"
+dependencies = [
+ "quote",
+ "syn 2.0.15",
+]
+
+[[package]]
+name = "ctr"
+version = "0.9.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835"
+dependencies = [
+ "cipher 0.4.4",
+]
+
+[[package]]
+name = "curve25519-dalek"
+version = "3.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0"
+dependencies = [
+ "byteorder",
+ "digest 0.9.0",
+ "rand_core 0.5.1",
+ "serde",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "cxx"
+version = "1.0.94"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93"
+dependencies = [
+ "cc",
+ "cxxbridge-flags",
+ "cxxbridge-macro",
+ "link-cplusplus",
+]
+
+[[package]]
+name = "cxx-build"
+version = "1.0.94"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b"
+dependencies = [
+ "cc",
+ "codespan-reporting",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "scratch",
+ "syn 2.0.15",
+]
+
+[[package]]
+name = "cxxbridge-flags"
+version = "1.0.94"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb"
+
+[[package]]
+name = "cxxbridge-macro"
+version = "1.0.94"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.15",
+]
+
+[[package]]
+name = "dashmap"
+version = "5.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "907076dfda823b0b36d2a1bb5f90c96660a5bbcd7729e10727f07858f22c4edc"
+dependencies = [
+ "cfg-if",
+ "hashbrown",
+ "lock_api",
+ "once_cell",
+ "parking_lot_core 0.9.7",
+]
+
+[[package]]
+name = "deadpool"
+version = "0.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "421fe0f90f2ab22016f32a9881be5134fdd71c65298917084b0c7477cbc3856e"
+dependencies = [
+ "async-trait",
+ "deadpool-runtime",
+ "num_cpus",
+ "retain_mut",
+ "tokio",
+]
+
+[[package]]
+name = "deadpool-runtime"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eaa37046cc0f6c3cc6090fbdbf73ef0b8ef4cfcc37f6befc0020f63e8cf121e1"
+dependencies = [
+ "tokio",
+]
+
+[[package]]
+name = "deadpool-sqlite"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e026821eaacbce25ff0d54405e4421d71656fcae3e4a9323461280fcda6dbc7d"
+dependencies = [
+ "deadpool",
+ "deadpool-sync",
+ "rusqlite",
+]
+
+[[package]]
+name = "deadpool-sync"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1bea344b64b32537fde6e0f0179b1ede34d435636719dd40fe6a0f28218a61c"
+dependencies = [
+ "deadpool",
+]
+
+[[package]]
+name = "debugid"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d"
+dependencies = [
+ "uuid",
+]
+
+[[package]]
+name = "deflate"
+version = "0.8.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73770f8e1fe7d64df17ca66ad28994a0a623ea497fa69486e14984e715c5d174"
+dependencies = [
+ "adler32",
+ "byteorder",
+]
+
+[[package]]
+name = "der"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c"
+dependencies = [
+ "const-oid",
+]
+
+[[package]]
+name = "digest"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "digest"
+version = "0.10.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f"
+dependencies = [
+ "block-buffer 0.10.4",
+ "crypto-common",
+ "subtle",
+]
+
+[[package]]
+name = "dirs"
+version = "4.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059"
+dependencies = [
+ "dirs-sys",
+]
+
+[[package]]
+name = "dirs-sys"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6"
+dependencies = [
+ "libc",
+ "redox_users",
+ "winapi",
+]
+
+[[package]]
+name = "displaydoc"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "ed25519"
+version = "1.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7"
+dependencies = [
+ "serde",
+ "signature",
+]
+
+[[package]]
+name = "ed25519-dalek"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d"
+dependencies = [
+ "curve25519-dalek",
+ "ed25519",
+ "rand 0.7.3",
+ "serde",
+ "serde_bytes",
+ "sha2 0.9.9",
+ "zeroize",
+]
+
+[[package]]
+name = "either"
+version = "1.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91"
+
+[[package]]
+name = "encoding_rs"
+version = "0.8.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "errno"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a"
+dependencies = [
+ "errno-dragonfly",
+ "libc",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "errno-dragonfly"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
+dependencies = [
+ "cc",
+ "libc",
+]
+
+[[package]]
+name = "event-listener"
+version = "2.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0"
+
+[[package]]
+name = "example-appservice-autojoin"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "matrix-sdk-appservice",
+ "tokio",
+ "tracing",
+ "tracing-subscriber",
+]
+
+[[package]]
+name = "example-autojoin"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "matrix-sdk",
+ "tokio",
+ "tracing-subscriber",
+]
+
+[[package]]
+name = "example-command-bot"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "matrix-sdk",
+ "tokio",
+ "tracing-subscriber",
+ "url",
+]
+
+[[package]]
+name = "example-cross-signing-bootstrap"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "matrix-sdk",
+ "tokio",
+ "tracing-subscriber",
+ "url",
+]
+
+[[package]]
+name = "example-custom-events"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "dirs",
+ "matrix-sdk",
+ "serde",
+ "tokio",
+ "tracing-subscriber",
+]
+
+[[package]]
+name = "example-emoji-verification"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "clap 4.2.4",
+ "futures",
+ "matrix-sdk",
+ "tokio",
+ "tracing-subscriber",
+ "url",
+]
+
+[[package]]
+name = "example-get-profiles"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "matrix-sdk",
+ "tokio",
+ "tracing-subscriber",
+ "url",
+]
+
+[[package]]
+name = "example-getting-started"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "dirs",
+ "matrix-sdk",
+ "tokio",
+ "tracing-subscriber",
+]
+
+[[package]]
+name = "example-image-bot"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "matrix-sdk",
+ "mime",
+ "tokio",
+ "tracing-subscriber",
+ "url",
+]
+
+[[package]]
+name = "example-login"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "matrix-sdk",
+ "tokio",
+ "tracing-subscriber",
+ "url",
+]
+
+[[package]]
+name = "example-persist-session"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "dirs",
+ "matrix-sdk",
+ "rand 0.8.5",
+ "serde",
+ "serde_json",
+ "tokio",
+ "tracing-subscriber",
+]
+
+[[package]]
+name = "example-timeline"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "clap 4.2.4",
+ "futures",
+ "matrix-sdk",
+ "tokio",
+ "tracing-subscriber",
+ "url",
+]
+
+[[package]]
+name = "extension-trait"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd65f1b59dd22d680c7a626cc4a000c1e03d241c51c3e034d2bc9f1e90734f9b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.15",
+]
+
+[[package]]
+name = "eyeball"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1015c5225a75e0ab3d325e934456d92fdd57f440e8c81d09018878d4f651cd46"
+dependencies = [
+ "futures-core",
+ "readlock",
+]
+
+[[package]]
+name = "eyeball-im"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "29e6dff0ac9894dcc183064377dfeb4137bcffa9f9ec3dbc10f8e7fba34c0ac7"
+dependencies = [
+ "futures-core",
+ "imbl",
+ "tokio",
+ "tokio-stream",
+]
+
+[[package]]
+name = "eyre"
+version = "0.6.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c2b6b5a29c02cdc822728b7d7b8ae1bab3e3b05d44522770ddd49722eeac7eb"
+dependencies = [
+ "indenter",
+ "once_cell",
+]
+
+[[package]]
+name = "fallible-iterator"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7"
+
+[[package]]
+name = "fallible-streaming-iterator"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a"
+
+[[package]]
+name = "fastrand"
+version = "1.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be"
+dependencies = [
+ "instant",
+]
+
+[[package]]
+name = "fdeflate"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d329bdeac514ee06249dabc27877490f17f5d371ec693360768b838e19f3ae10"
+dependencies = [
+ "simd-adler32",
+]
+
+[[package]]
+name = "findshlibs"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "40b9e59cd0f7e0806cca4be089683ecb6434e602038df21fe6bf6711b2f07f64"
+dependencies = [
+ "cc",
+ "lazy_static",
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "fixedbitset"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80"
+
+[[package]]
+name = "flate2"
+version = "1.0.25"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841"
+dependencies = [
+ "crc32fast",
+ "miniz_oxide 0.6.2",
+]
+
+[[package]]
+name = "fnv"
+version = "1.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
+
+[[package]]
+name = "foreign-types"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
+dependencies = [
+ "foreign-types-shared",
+]
+
+[[package]]
+name = "foreign-types-shared"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
+
+[[package]]
+name = "form_urlencoded"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8"
+dependencies = [
+ "percent-encoding",
+]
+
+[[package]]
+name = "fs-err"
+version = "2.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0845fa252299212f0389d64ba26f34fa32cfe41588355f21ed507c59a0f64541"
+
+[[package]]
+name = "fs2"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213"
+dependencies = [
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "fs_extra"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
+
+[[package]]
+name = "futf"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843"
+dependencies = [
+ "mac",
+ "new_debug_unreachable",
+]
+
+[[package]]
+name = "futures"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-executor",
+ "futures-io",
+ "futures-sink",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-channel"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2"
+dependencies = [
+ "futures-core",
+ "futures-sink",
+]
+
+[[package]]
+name = "futures-core"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c"
+
+[[package]]
+name = "futures-executor"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0"
+dependencies = [
+ "futures-core",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-io"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964"
+
+[[package]]
+name = "futures-lite"
+version = "1.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce"
+dependencies = [
+ "fastrand",
+ "futures-core",
+ "futures-io",
+ "memchr",
+ "parking",
+ "pin-project-lite",
+ "waker-fn",
+]
+
+[[package]]
+name = "futures-macro"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.15",
+]
+
+[[package]]
+name = "futures-sink"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e"
+
+[[package]]
+name = "futures-task"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65"
+
+[[package]]
+name = "futures-timer"
+version = "3.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c"
+
+[[package]]
+name = "futures-util"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-io",
+ "futures-macro",
+ "futures-sink",
+ "futures-task",
+ "memchr",
+ "pin-project-lite",
+ "pin-utils",
+ "slab",
+]
+
+[[package]]
+name = "fxhash"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
+dependencies = [
+ "byteorder",
+]
+
+[[package]]
+name = "generic-array"
+version = "0.14.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
+dependencies = [
+ "typenum",
+ "version_check",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.1.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "libc",
+ "wasi 0.9.0+wasi-snapshot-preview1",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "libc",
+ "wasi 0.11.0+wasi-snapshot-preview1",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "gif"
+version = "0.11.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3edd93c6756b4dfaf2709eafcc345ba2636565295c198a9cfbf75fa5e3e00b06"
+dependencies = [
+ "color_quant",
+ "weezl",
+]
+
+[[package]]
+name = "gif"
+version = "0.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045"
+dependencies = [
+ "color_quant",
+ "weezl",
+]
+
+[[package]]
+name = "gimli"
+version = "0.27.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4"
+
+[[package]]
+name = "glob"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
+
+[[package]]
+name = "gloo-timers"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "gloo-utils"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a8e8fc851e9c7b9852508bc6e3f690f452f474417e8545ec9857b7f7377036b5"
+dependencies = [
+ "js-sys",
+ "serde",
+ "serde_json",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "goblin"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d6b4de4a8eb6c46a8c77e1d3be942cb9a8bf073c22374578e5ba4b08ed0ff68"
+dependencies = [
+ "log",
+ "plain",
+ "scroll",
+]
+
+[[package]]
+name = "h2"
+version = "0.3.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "17f8a914c2987b688368b5138aa05321db91f4090cf26118185672ad588bce21"
+dependencies = [
+ "bytes",
+ "fnv",
+ "futures-core",
+ "futures-sink",
+ "futures-util",
+ "http",
+ "indexmap",
+ "slab",
+ "tokio",
+ "tokio-util",
+ "tracing",
+]
+
+[[package]]
+name = "half"
+version = "1.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7"
+
+[[package]]
+name = "hashbrown"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
+dependencies = [
+ "ahash 0.7.6",
+]
+
+[[package]]
+name = "hashlink"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "69fe1fcf8b4278d860ad0548329f892a3631fb63f82574df68275f34cdbe0ffa"
+dependencies = [
+ "hashbrown",
+]
+
+[[package]]
+name = "heck"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
+
+[[package]]
+name = "hermit-abi"
+version = "0.1.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "hermit-abi"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "hermit-abi"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286"
+
+[[package]]
+name = "hkdf"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437"
+dependencies = [
+ "hmac",
+]
+
+[[package]]
+name = "hmac"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
+dependencies = [
+ "digest 0.10.6",
+]
+
+[[package]]
+name = "html5ever"
+version = "0.26.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bea68cab48b8459f17cf1c944c67ddc572d272d9f2b274140f223ecb1da4a3b7"
+dependencies = [
+ "log",
+ "mac",
+ "markup5ever",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "http"
+version = "0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482"
+dependencies = [
+ "bytes",
+ "fnv",
+ "itoa",
+]
+
+[[package]]
+name = "http-body"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1"
+dependencies = [
+ "bytes",
+ "http",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "http-types"
+version = "2.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e9b187a72d63adbfba487f48095306ac823049cb504ee195541e91c7775f5ad"
+dependencies = [
+ "anyhow",
+ "async-channel",
+ "base64 0.13.1",
+ "futures-lite",
+ "http",
+ "infer",
+ "pin-project-lite",
+ "rand 0.7.3",
+ "serde",
+ "serde_json",
+ "serde_qs",
+ "serde_urlencoded",
+ "url",
+]
+
+[[package]]
+name = "httparse"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904"
+
+[[package]]
+name = "httpdate"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421"
+
+[[package]]
+name = "hyper"
+version = "0.14.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4"
+dependencies = [
+ "bytes",
+ "futures-channel",
+ "futures-core",
+ "futures-util",
+ "h2",
+ "http",
+ "http-body",
+ "httparse",
+ "httpdate",
+ "itoa",
+ "pin-project-lite",
+ "socket2",
+ "tokio",
+ "tower-service",
+ "tracing",
+ "want",
+]
+
+[[package]]
+name = "hyper-rustls"
+version = "0.23.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c"
+dependencies = [
+ "http",
+ "hyper",
+ "rustls",
+ "tokio",
+ "tokio-rustls",
+]
+
+[[package]]
+name = "hyper-timeout"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1"
+dependencies = [
+ "hyper",
+ "pin-project-lite",
+ "tokio",
+ "tokio-io-timeout",
+]
+
+[[package]]
+name = "hyper-tls"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
+dependencies = [
+ "bytes",
+ "hyper",
+ "native-tls",
+ "tokio",
+ "tokio-native-tls",
+]
+
+[[package]]
+name = "iana-time-zone"
+version = "0.1.56"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c"
+dependencies = [
+ "android_system_properties",
+ "core-foundation-sys",
+ "iana-time-zone-haiku",
+ "js-sys",
+ "wasm-bindgen",
+ "windows",
+]
+
+[[package]]
+name = "iana-time-zone-haiku"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca"
+dependencies = [
+ "cxx",
+ "cxx-build",
+]
+
+[[package]]
+name = "idna"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6"
+dependencies = [
+ "unicode-bidi",
+ "unicode-normalization",
+]
+
+[[package]]
+name = "image"
+version = "0.23.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24ffcb7e7244a9bf19d35bf2883b9c080c4ced3c07a9895572178cdb8f13f6a1"
+dependencies = [
+ "bytemuck",
+ "byteorder",
+ "color_quant",
+ "gif 0.11.4",
+ "jpeg-decoder 0.1.22",
+ "num-iter",
+ "num-rational 0.3.2",
+ "num-traits",
+ "png 0.16.8",
+ "scoped_threadpool",
+ "tiff 0.6.1",
+]
+
+[[package]]
+name = "image"
+version = "0.24.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "527909aa81e20ac3a44803521443a765550f09b5130c2c2fa1ea59c2f8f50a3a"
+dependencies = [
+ "bytemuck",
+ "byteorder",
+ "color_quant",
+ "gif 0.12.0",
+ "jpeg-decoder 0.3.0",
+ "num-rational 0.4.1",
+ "num-traits",
+ "png 0.17.8",
+ "tiff 0.8.1",
+]
+
+[[package]]
+name = "imbl"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c2806b69cd9f4664844027b64465eacb444c67c1db9c778e341adff0c25cdb0d"
+dependencies = [
+ "bitmaps",
+ "imbl-sized-chunks",
+ "rand_core 0.6.4",
+ "rand_xoshiro",
+ "serde",
+ "version_check",
+]
+
+[[package]]
+name = "imbl-sized-chunks"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6957ea0b2541c5ca561d3ef4538044af79f8a05a1eb3a3b148936aaceaa1076"
+dependencies = [
+ "bitmaps",
+]
+
+[[package]]
+name = "indenter"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683"
+
+[[package]]
+name = "indexed_db_futures"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bfbcff6ae46750b15cc594bfd277b188cbddcfdc1817848f97f03f26f8625b9e"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "uuid",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+]
+
+[[package]]
+name = "indexmap"
+version = "1.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
+dependencies = [
+ "autocfg",
+ "hashbrown",
+ "serde",
+]
+
+[[package]]
+name = "indoc"
+version = "1.0.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bfa799dd5ed20a7e349f3b4639aa80d74549c81716d9ec4f994c9b5815598306"
+
+[[package]]
+name = "infer"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "64e9829a50b42bb782c1df523f78d332fe371b10c661e78b7a3c34b0198e9fac"
+
+[[package]]
+name = "inferno"
+version = "0.11.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2fb7c1b80a1dfa604bb4a649a5c5aeef3d913f7c520cb42b40e534e8a61bcdfc"
+dependencies = [
+ "ahash 0.8.3",
+ "indexmap",
+ "is-terminal",
+ "itoa",
+ "log",
+ "num-format",
+ "once_cell",
+ "quick-xml",
+ "rgb",
+ "str_stack",
+]
+
+[[package]]
+name = "inout"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5"
+dependencies = [
+ "block-padding",
+ "generic-array",
+]
+
+[[package]]
+name = "instant"
+version = "0.1.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "io-lifetimes"
+version = "1.0.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220"
+dependencies = [
+ "hermit-abi 0.3.1",
+ "libc",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "ipnet"
+version = "2.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f"
+
+[[package]]
+name = "is-terminal"
+version = "0.4.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f"
+dependencies = [
+ "hermit-abi 0.3.1",
+ "io-lifetimes",
+ "rustix",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "itertools"
+version = "0.10.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
+dependencies = [
+ "either",
+]
+
+[[package]]
+name = "itoa"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6"
+
+[[package]]
+name = "jpeg-decoder"
+version = "0.1.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "229d53d58899083193af11e15917b5640cd40b29ff475a1fe4ef725deb02d0f2"
+dependencies = [
+ "rayon",
+]
+
+[[package]]
+name = "jpeg-decoder"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e"
+dependencies = [
+ "rayon",
+]
+
+[[package]]
+name = "js-sys"
+version = "0.3.61"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730"
+dependencies = [
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "js_int"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d937f95470b270ce8b8950207715d71aa8e153c0d44c6684d59397ed4949160a"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "js_option"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "68421373957a1593a767013698dbf206e2b221eefe97a44d98d18672ff38423c"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "konst"
+version = "0.2.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "330f0e13e6483b8c34885f7e6c9f19b1a7bd449c673fbb948a51c99d66ef74f4"
+dependencies = [
+ "konst_macro_rules",
+ "konst_proc_macros",
+]
+
+[[package]]
+name = "konst_macro_rules"
+version = "0.2.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a4933f3f57a8e9d9da04db23fb153356ecaf00cbd14aee46279c33dc80925c37"
+
+[[package]]
+name = "konst_proc_macros"
+version = "0.2.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "984e109462d46ad18314f10e392c286c3d47bce203088a09012de1015b45b737"
+
+[[package]]
+name = "kv-log-macro"
+version = "1.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f"
+dependencies = [
+ "log",
+]
+
+[[package]]
+name = "lazy_static"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+
+[[package]]
+name = "libc"
+version = "0.2.142"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6a987beff54b60ffa6d51982e1aa1146bc42f19bd26be28b0586f252fccf5317"
+
+[[package]]
+name = "libloading"
+version = "0.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
+dependencies = [
+ "cfg-if",
+ "winapi",
+]
+
+[[package]]
+name = "libm"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb"
+
+[[package]]
+name = "libsqlite3-sys"
+version = "0.25.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "29f835d03d717946d28b1d1ed632eb6f0e24a299388ee623d0c23118d3e8a7fa"
+dependencies = [
+ "cc",
+ "pkg-config",
+ "vcpkg",
+]
+
+[[package]]
+name = "link-cplusplus"
+version = "1.0.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "linux-raw-sys"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "36eb31c1778188ae1e64398743890d0877fef36d11521ac60406b42016e8c2cf"
+
+[[package]]
+name = "lock_api"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df"
+dependencies = [
+ "autocfg",
+ "scopeguard",
+]
+
+[[package]]
+name = "log"
+version = "0.4.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
+dependencies = [
+ "cfg-if",
+ "value-bag",
+]
+
+[[package]]
+name = "log-panics"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "68f9dd8546191c1850ecf67d22f5ff00a935b890d0e84713159a55495cc2ac5f"
+dependencies = [
+ "backtrace",
+ "log",
+]
+
+[[package]]
+name = "mac"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
+
+[[package]]
+name = "maplit"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d"
+
+[[package]]
+name = "markup5ever"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a2629bb1404f3d34c2e921f21fd34ba00b206124c81f65c50b43b6aaefeb016"
+dependencies = [
+ "log",
+ "phf 0.10.1",
+ "phf_codegen",
+ "string_cache",
+ "string_cache_codegen",
+ "tendril",
+]
+
+[[package]]
+name = "matchers"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"
+dependencies = [
+ "regex-automata",
+]
+
+[[package]]
+name = "matchit"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b87248edafb776e59e6ee64a79086f65890d3510f2c656c000bf2a7e8a0aea40"
+
+[[package]]
+name = "matrix-pickle"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b18185b3f64cc8d44840dbf92d92aeb05c1ef97094f51a32c1afd36a4415d225"
+dependencies = [
+ "matrix-pickle-derive",
+ "thiserror",
+]
+
+[[package]]
+name = "matrix-pickle-derive"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cef08fbb48d0d5125d3885e422c426b5be84067c63ceb5d8b32f9130143f5b81"
+dependencies = [
+ "proc-macro-crate",
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "matrix-sdk"
+version = "0.6.2"
+dependencies = [
+ "anyhow",
+ "anymap2",
+ "assert_matches",
+ "async-stream",
+ "async-trait",
+ "backoff",
+ "bytes",
+ "bytesize",
+ "chrono",
+ "ctor 0.2.0",
+ "dashmap",
+ "dirs",
+ "event-listener",
+ "eyeball",
+ "eyeball-im",
+ "eyre",
+ "futures",
+ "futures-core",
+ "futures-util",
+ "getrandom 0.2.9",
+ "gloo-timers",
+ "http",
+ "hyper",
+ "image 0.24.6",
+ "imbl",
+ "indexmap",
+ "matrix-sdk-base",
+ "matrix-sdk-common",
+ "matrix-sdk-indexeddb",
+ "matrix-sdk-sled",
+ "matrix-sdk-test",
+ "mime",
+ "mime_guess",
+ "once_cell",
+ "pin-project-lite",
+ "rand 0.8.5",
+ "reqwest",
+ "ruma",
+ "serde",
+ "serde_html_form",
+ "serde_json",
+ "tempfile",
+ "thiserror",
+ "tokio",
+ "tower",
+ "tracing",
+ "tracing-subscriber",
+ "url",
+ "uuid",
+ "wasm-bindgen-test",
+ "wiremock",
+ "zeroize",
+]
+
+[[package]]
+name = "matrix-sdk-appservice"
+version = "0.1.0"
+dependencies = [
+ "axum",
+ "dashmap",
+ "http",
+ "http-body",
+ "hyper",
+ "matrix-sdk",
+ "matrix-sdk-test",
+ "regex",
+ "ruma",
+ "serde",
+ "serde_html_form",
+ "serde_json",
+ "serde_yaml",
+ "thiserror",
+ "tokio",
+ "tower",
+ "tracing",
+ "tracing-subscriber",
+ "url",
+ "wiremock",
+]
+
+[[package]]
+name = "matrix-sdk-base"
+version = "0.6.1"
+dependencies = [
+ "assert_matches",
+ "assign",
+ "async-stream",
+ "async-trait",
+ "bitflags 2.2.1",
+ "ctor 0.2.0",
+ "dashmap",
+ "eyeball",
+ "futures",
+ "futures-core",
+ "futures-util",
+ "http",
+ "matrix-sdk-common",
+ "matrix-sdk-crypto",
+ "matrix-sdk-store-encryption",
+ "matrix-sdk-test",
+ "once_cell",
+ "ruma",
+ "serde",
+ "serde_json",
+ "thiserror",
+ "tokio",
+ "tracing",
+ "tracing-subscriber",
+ "wasm-bindgen-test",
+ "zeroize",
+]
+
+[[package]]
+name = "matrix-sdk-common"
+version = "0.6.0"
+dependencies = [
+ "futures-core",
+ "futures-util",
+ "gloo-timers",
+ "instant",
+ "matrix-sdk-test",
+ "ruma",
+ "serde",
+ "serde_json",
+ "tokio",
+ "wasm-bindgen-futures",
+ "wasm-bindgen-test",
+]
+
+[[package]]
+name = "matrix-sdk-crypto"
+version = "0.6.0"
+dependencies = [
+ "aes",
+ "anyhow",
+ "assert_matches",
+ "async-std",
+ "async-trait",
+ "atomic",
+ "base64 0.21.0",
+ "bs58",
+ "byteorder",
+ "cfg-if",
+ "ctor 0.2.0",
+ "ctr",
+ "dashmap",
+ "event-listener",
+ "eyeball",
+ "futures",
+ "futures-core",
+ "futures-util",
+ "hmac",
+ "http",
+ "indoc",
+ "itertools",
+ "matrix-sdk-common",
+ "matrix-sdk-qrcode",
+ "matrix-sdk-test",
+ "olm-rs",
+ "pbkdf2",
+ "proptest",
+ "rand 0.8.5",
+ "rmp-serde",
+ "ruma",
+ "serde",
+ "serde_json",
+ "sha2 0.10.6",
+ "thiserror",
+ "tokio",
+ "tokio-stream",
+ "tracing",
+ "tracing-subscriber",
+ "vodozemac",
+ "zeroize",
+]
+
+[[package]]
+name = "matrix-sdk-crypto-ffi"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "assert_matches",
+ "base64 0.21.0",
+ "futures-util",
+ "hmac",
+ "http",
+ "js_int",
+ "matrix-sdk-common",
+ "matrix-sdk-crypto",
+ "matrix-sdk-sqlite",
+ "pbkdf2",
+ "rand 0.8.5",
+ "ruma",
+ "serde",
+ "serde_json",
+ "sha2 0.10.6",
+ "tempfile",
+ "thiserror",
+ "tokio",
+ "tracing",
+ "tracing-subscriber",
+ "uniffi",
+ "vodozemac",
+ "zeroize",
+]
+
+[[package]]
+name = "matrix-sdk-crypto-js"
+version = "0.1.0-alpha.0"
+dependencies = [
+ "anyhow",
+ "console_error_panic_hook",
+ "futures-util",
+ "http",
+ "js-sys",
+ "matrix-sdk-common",
+ "matrix-sdk-crypto",
+ "matrix-sdk-indexeddb",
+ "matrix-sdk-qrcode",
+ "ruma",
+ "serde_json",
+ "tracing",
+ "tracing-subscriber",
+ "vodozemac",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "zeroize",
+]
+
+[[package]]
+name = "matrix-sdk-crypto-nodejs"
+version = "0.6.0"
+dependencies = [
+ "http",
+ "matrix-sdk-common",
+ "matrix-sdk-crypto",
+ "matrix-sdk-sled",
+ "matrix-sdk-sqlite",
+ "napi",
+ "napi-build",
+ "napi-derive",
+ "ruma",
+ "serde_json",
+ "tracing-subscriber",
+ "vodozemac",
+ "zeroize",
+]
+
+[[package]]
+name = "matrix-sdk-ffi"
+version = "0.2.0"
+dependencies = [
+ "anyhow",
+ "base64 0.21.0",
+ "extension-trait",
+ "eyeball",
+ "eyeball-im",
+ "futures-core",
+ "futures-util",
+ "log-panics",
+ "matrix-sdk",
+ "matrix-sdk-sled",
+ "matrix-sdk-sqlite",
+ "mime",
+ "once_cell",
+ "opentelemetry",
+ "opentelemetry-otlp",
+ "ruma",
+ "sanitize-filename-reader-friendly",
+ "serde_json",
+ "thiserror",
+ "tokio",
+ "tokio-stream",
+ "tracing",
+ "tracing-android",
+ "tracing-core",
+ "tracing-opentelemetry",
+ "tracing-subscriber",
+ "uniffi",
+ "url",
+ "zeroize",
+]
+
+[[package]]
+name = "matrix-sdk-indexeddb"
+version = "0.2.0"
+dependencies = [
+ "anyhow",
+ "assert_matches",
+ "async-trait",
+ "base64 0.21.0",
+ "dashmap",
+ "getrandom 0.2.9",
+ "gloo-utils",
+ "indexed_db_futures",
+ "js-sys",
+ "matrix-sdk-base",
+ "matrix-sdk-common",
+ "matrix-sdk-crypto",
+ "matrix-sdk-store-encryption",
+ "matrix-sdk-test",
+ "ruma",
+ "serde",
+ "serde_json",
+ "thiserror",
+ "tokio",
+ "tracing",
+ "uuid",
+ "wasm-bindgen",
+ "wasm-bindgen-test",
+ "web-sys",
+]
+
+[[package]]
+name = "matrix-sdk-integration-testing"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "assign",
+ "ctor 0.2.0",
+ "matrix-sdk",
+ "once_cell",
+ "tempfile",
+ "tokio",
+ "tracing",
+ "tracing-subscriber",
+]
+
+[[package]]
+name = "matrix-sdk-qrcode"
+version = "0.4.0"
+dependencies = [
+ "base64 0.21.0",
+ "byteorder",
+ "image 0.23.14",
+ "qrcode",
+ "ruma-common",
+ "thiserror",
+ "vodozemac",
+]
+
+[[package]]
+name = "matrix-sdk-sled"
+version = "0.2.0"
+dependencies = [
+ "assert_matches",
+ "async-stream",
+ "async-trait",
+ "dashmap",
+ "fs_extra",
+ "futures-core",
+ "futures-util",
+ "glob",
+ "matrix-sdk-base",
+ "matrix-sdk-common",
+ "matrix-sdk-crypto",
+ "matrix-sdk-store-encryption",
+ "matrix-sdk-test",
+ "once_cell",
+ "ruma",
+ "serde",
+ "serde_json",
+ "sled",
+ "tempfile",
+ "thiserror",
+ "tokio",
+ "tracing",
+]
+
+[[package]]
+name = "matrix-sdk-sqlite"
+version = "0.1.0"
+dependencies = [
+ "assert_matches",
+ "async-stream",
+ "async-trait",
+ "ctor 0.2.0",
+ "dashmap",
+ "deadpool-sqlite",
+ "fs_extra",
+ "futures-core",
+ "futures-util",
+ "glob",
+ "matrix-sdk-base",
+ "matrix-sdk-common",
+ "matrix-sdk-crypto",
+ "matrix-sdk-store-encryption",
+ "matrix-sdk-test",
+ "once_cell",
+ "rmp-serde",
+ "ruma",
+ "rusqlite",
+ "serde",
+ "serde_json",
+ "tempfile",
+ "thiserror",
+ "tokio",
+ "tracing",
+ "tracing-subscriber",
+ "vodozemac",
+]
+
+[[package]]
+name = "matrix-sdk-store-encryption"
+version = "0.2.0"
+dependencies = [
+ "anyhow",
+ "blake3",
+ "chacha20poly1305",
+ "displaydoc",
+ "getrandom 0.2.9",
+ "hmac",
+ "pbkdf2",
+ "rand 0.8.5",
+ "rmp-serde",
+ "serde",
+ "serde_json",
+ "sha2 0.10.6",
+ "thiserror",
+ "zeroize",
+]
+
+[[package]]
+name = "matrix-sdk-test"
+version = "0.6.0"
+dependencies = [
+ "http",
+ "matrix-sdk-test-macros",
+ "once_cell",
+ "ruma",
+ "serde",
+ "serde_json",
+ "tokio",
+ "wasm-bindgen-test",
+]
+
+[[package]]
+name = "matrix-sdk-test-macros"
+version = "0.3.0"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "memchr"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
+
+[[package]]
+name = "memmap2"
+version = "0.5.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "memoffset"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "mime"
+version = "0.3.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
+
+[[package]]
+name = "mime_guess"
+version = "2.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef"
+dependencies = [
+ "mime",
+ "unicase",
+]
+
+[[package]]
+name = "minimal-lexical"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
+
+[[package]]
+name = "miniz_oxide"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "791daaae1ed6889560f8c4359194f56648355540573244a5448a83ba1ecc7435"
+dependencies = [
+ "adler32",
+]
+
+[[package]]
+name = "miniz_oxide"
+version = "0.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b"
+dependencies = [
+ "adler",
+ "autocfg",
+]
+
+[[package]]
+name = "miniz_oxide"
+version = "0.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa"
+dependencies = [
+ "adler",
+]
+
+[[package]]
+name = "miniz_oxide"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7"
+dependencies = [
+ "adler",
+ "simd-adler32",
+]
+
+[[package]]
+name = "mio"
+version = "0.8.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9"
+dependencies = [
+ "libc",
+ "log",
+ "wasi 0.11.0+wasi-snapshot-preview1",
+ "windows-sys 0.45.0",
+]
+
+[[package]]
+name = "multimap"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a"
+
+[[package]]
+name = "napi"
+version = "2.12.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "69b29acdc6cc5c918c3eabd51d241b1c6dfa8914f3552fcfd76e1d7536934581"
+dependencies = [
+ "bitflags 2.2.1",
+ "ctor 0.2.0",
+ "napi-derive",
+ "napi-sys",
+ "once_cell",
+ "tokio",
+]
+
+[[package]]
+name = "napi-build"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "882a73d9ef23e8dc2ebbffb6a6ae2ef467c0f18ac10711e4cc59c5485d41df0e"
+
+[[package]]
+name = "napi-derive"
+version = "2.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af2ac63101a19228b0881694cac07468d642fd10e4f943a9c9feebeebf1a4787"
+dependencies = [
+ "convert_case",
+ "napi-derive-backend",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "napi-derive-backend"
+version = "1.0.49"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0e32b5bc4d803e40b783b0aa3fe488eac8711cfaa4c5c9915293dfd3d0b99925"
+dependencies = [
+ "convert_case",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "regex",
+ "semver",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "napi-sys"
+version = "2.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "166b5ef52a3ab5575047a9fe8d4a030cdd0f63c96f071cd6907674453b07bae3"
+dependencies = [
+ "libloading",
+]
+
+[[package]]
+name = "native-tls"
+version = "0.2.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e"
+dependencies = [
+ "lazy_static",
+ "libc",
+ "log",
+ "openssl",
+ "openssl-probe",
+ "openssl-sys",
+ "schannel",
+ "security-framework",
+ "security-framework-sys",
+ "tempfile",
+]
+
+[[package]]
+name = "new_debug_unreachable"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
+
+[[package]]
+name = "nix"
+version = "0.26.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a"
+dependencies = [
+ "bitflags 1.3.2",
+ "cfg-if",
+ "libc",
+ "static_assertions",
+]
+
+[[package]]
+name = "nom"
+version = "7.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
+dependencies = [
+ "memchr",
+ "minimal-lexical",
+]
+
+[[package]]
+name = "nu-ansi-term"
+version = "0.46.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"
+dependencies = [
+ "overload",
+ "winapi",
+]
+
+[[package]]
+name = "num-format"
+version = "0.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3"
+dependencies = [
+ "arrayvec",
+ "itoa",
+]
+
+[[package]]
+name = "num-integer"
+version = "0.1.45"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
+dependencies = [
+ "autocfg",
+ "num-traits",
+]
+
+[[package]]
+name = "num-iter"
+version = "0.1.43"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252"
+dependencies = [
+ "autocfg",
+ "num-integer",
+ "num-traits",
+]
+
+[[package]]
+name = "num-rational"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07"
+dependencies = [
+ "autocfg",
+ "num-integer",
+ "num-traits",
+]
+
+[[package]]
+name = "num-rational"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0"
+dependencies = [
+ "autocfg",
+ "num-integer",
+ "num-traits",
+]
+
+[[package]]
+name = "num-traits"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
+dependencies = [
+ "autocfg",
+ "libm",
+]
+
+[[package]]
+name = "num_cpus"
+version = "1.15.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b"
+dependencies = [
+ "hermit-abi 0.2.6",
+ "libc",
+]
+
+[[package]]
+name = "object"
+version = "0.30.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "olm-rs"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd6c2c7054110ce4d7b4756d7b7fe507fea9413968ad0ef8f1d043d504aec725"
+dependencies = [
+ "getrandom 0.2.9",
+ "olm-sys",
+ "serde",
+ "serde_json",
+ "zeroize",
+]
+
+[[package]]
+name = "olm-sys"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2afecf25624989021f9f0f157f7152102fd147b89445d08449739f216002d339"
+dependencies = [
+ "cmake",
+ "fs_extra",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.17.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3"
+
+[[package]]
+name = "oorandom"
+version = "11.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575"
+
+[[package]]
+name = "opaque-debug"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
+
+[[package]]
+name = "openssl"
+version = "0.10.51"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "97ea2d98598bf9ada7ea6ee8a30fb74f9156b63bbe495d64ec2b87c269d2dda3"
+dependencies = [
+ "bitflags 1.3.2",
+ "cfg-if",
+ "foreign-types",
+ "libc",
+ "once_cell",
+ "openssl-macros",
+ "openssl-sys",
+]
+
+[[package]]
+name = "openssl-macros"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.15",
+]
+
+[[package]]
+name = "openssl-probe"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
+
+[[package]]
+name = "openssl-sys"
+version = "0.9.86"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "992bac49bdbab4423199c654a5515bd2a6c6a23bf03f2dd3bdb7e5ae6259bc69"
+dependencies = [
+ "cc",
+ "libc",
+ "pkg-config",
+ "vcpkg",
+]
+
+[[package]]
+name = "opentelemetry"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "69d6c3d7288a106c0a363e4b0e8d308058d56902adefb16f4936f417ffef086e"
+dependencies = [
+ "opentelemetry_api",
+ "opentelemetry_sdk",
+]
+
+[[package]]
+name = "opentelemetry-http"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1edc79add46364183ece1a4542592ca593e6421c60807232f5b8f7a31703825d"
+dependencies = [
+ "async-trait",
+ "bytes",
+ "http",
+ "opentelemetry_api",
+ "reqwest",
+]
+
+[[package]]
+name = "opentelemetry-otlp"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d1c928609d087790fc936a1067bdc310ae702bdf3b090c3f281b713622c8bbde"
+dependencies = [
+ "async-trait",
+ "futures",
+ "futures-util",
+ "http",
+ "opentelemetry",
+ "opentelemetry-http",
+ "opentelemetry-proto",
+ "prost",
+ "reqwest",
+ "thiserror",
+ "tokio",
+ "tonic",
+]
+
+[[package]]
+name = "opentelemetry-proto"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d61a2f56df5574508dd86aaca016c917489e589ece4141df1b5e349af8d66c28"
+dependencies = [
+ "futures",
+ "futures-util",
+ "opentelemetry",
+ "prost",
+ "tonic",
+ "tonic-build",
+]
+
+[[package]]
+name = "opentelemetry_api"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c24f96e21e7acc813c7a8394ee94978929db2bcc46cf6b5014fc612bf7760c22"
+dependencies = [
+ "fnv",
+ "futures-channel",
+ "futures-util",
+ "indexmap",
+ "js-sys",
+ "once_cell",
+ "pin-project-lite",
+ "thiserror",
+]
+
+[[package]]
+name = "opentelemetry_sdk"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ca41c4933371b61c2a2f214bf16931499af4ec90543604ec828f7a625c09113"
+dependencies = [
+ "async-trait",
+ "crossbeam-channel",
+ "dashmap",
+ "fnv",
+ "futures-channel",
+ "futures-executor",
+ "futures-util",
+ "once_cell",
+ "opentelemetry_api",
+ "percent-encoding",
+ "rand 0.8.5",
+ "thiserror",
+ "tokio",
+ "tokio-stream",
+]
+
+[[package]]
+name = "os_str_bytes"
+version = "6.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ceedf44fb00f2d1984b0bc98102627ce622e083e49a5bacdb3e514fa4238e267"
+
+[[package]]
+name = "overload"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
+
+[[package]]
+name = "parking"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e"
+
+[[package]]
+name = "parking_lot"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99"
+dependencies = [
+ "instant",
+ "lock_api",
+ "parking_lot_core 0.8.6",
+]
+
+[[package]]
+name = "parking_lot"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
+dependencies = [
+ "lock_api",
+ "parking_lot_core 0.9.7",
+]
+
+[[package]]
+name = "parking_lot_core"
+version = "0.8.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc"
+dependencies = [
+ "cfg-if",
+ "instant",
+ "libc",
+ "redox_syscall 0.2.16",
+ "smallvec",
+ "winapi",
+]
+
+[[package]]
+name = "parking_lot_core"
+version = "0.9.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "redox_syscall 0.2.16",
+ "smallvec",
+ "windows-sys 0.45.0",
+]
+
+[[package]]
+name = "password-hash"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700"
+dependencies = [
+ "base64ct",
+ "rand_core 0.6.4",
+ "subtle",
+]
+
+[[package]]
+name = "paste"
+version = "1.0.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79"
+
+[[package]]
+name = "pbkdf2"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917"
+dependencies = [
+ "digest 0.10.6",
+ "hmac",
+ "password-hash",
+ "sha2 0.10.6",
+]
+
+[[package]]
+name = "percent-encoding"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
+
+[[package]]
+name = "petgraph"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4"
+dependencies = [
+ "fixedbitset",
+ "indexmap",
+]
+
+[[package]]
+name = "phf"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259"
+dependencies = [
+ "phf_shared 0.10.0",
+]
+
+[[package]]
+name = "phf"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "928c6535de93548188ef63bb7c4036bd415cd8f36ad25af44b9789b2ee72a48c"
+dependencies = [
+ "phf_macros",
+ "phf_shared 0.11.1",
+]
+
+[[package]]
+name = "phf_codegen"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd"
+dependencies = [
+ "phf_generator 0.10.0",
+ "phf_shared 0.10.0",
+]
+
+[[package]]
+name = "phf_generator"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6"
+dependencies = [
+ "phf_shared 0.10.0",
+ "rand 0.8.5",
+]
+
+[[package]]
+name = "phf_generator"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1181c94580fa345f50f19d738aaa39c0ed30a600d95cb2d3e23f94266f14fbf"
+dependencies = [
+ "phf_shared 0.11.1",
+ "rand 0.8.5",
+]
+
+[[package]]
+name = "phf_macros"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "92aacdc5f16768709a569e913f7451034034178b05bdc8acda226659a3dccc66"
+dependencies = [
+ "phf_generator 0.11.1",
+ "phf_shared 0.11.1",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "phf_shared"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096"
+dependencies = [
+ "siphasher",
+]
+
+[[package]]
+name = "phf_shared"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e1fb5f6f826b772a8d4c0394209441e7d37cbbb967ae9c7e0e8134365c9ee676"
+dependencies = [
+ "siphasher",
+]
+
+[[package]]
+name = "pin-project"
+version = "1.0.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc"
+dependencies = [
+ "pin-project-internal",
+]
+
+[[package]]
+name = "pin-project-internal"
+version = "1.0.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"
+
+[[package]]
+name = "pin-utils"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
+
+[[package]]
+name = "pkcs7"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1f7364e6d0e236473de91e042395d71e0e64715f99a60620b014a4a4c7d1619b"
+dependencies = [
+ "der",
+ "spki",
+]
+
+[[package]]
+name = "pkg-config"
+version = "0.3.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160"
+
+[[package]]
+name = "plain"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6"
+
+[[package]]
+name = "plotters"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2538b639e642295546c50fcd545198c9d64ee2a38620a628724a3b266d5fbf97"
+dependencies = [
+ "num-traits",
+ "plotters-backend",
+ "plotters-svg",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "plotters-backend"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "193228616381fecdc1224c62e96946dfbc73ff4384fba576e052ff8c1bea8142"
+
+[[package]]
+name = "plotters-svg"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f9a81d2759aae1dae668f783c308bc5c8ebd191ff4184aaa1b37f65a6ae5a56f"
+dependencies = [
+ "plotters-backend",
+]
+
+[[package]]
+name = "png"
+version = "0.16.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c3287920cb847dee3de33d301c463fba14dda99db24214ddf93f83d3021f4c6"
+dependencies = [
+ "bitflags 1.3.2",
+ "crc32fast",
+ "deflate",
+ "miniz_oxide 0.3.7",
+]
+
+[[package]]
+name = "png"
+version = "0.17.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aaeebc51f9e7d2c150d3f3bfeb667f2aa985db5ef1e3d212847bdedb488beeaa"
+dependencies = [
+ "bitflags 1.3.2",
+ "crc32fast",
+ "fdeflate",
+ "flate2",
+ "miniz_oxide 0.7.1",
+]
+
+[[package]]
+name = "polling"
+version = "2.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce"
+dependencies = [
+ "autocfg",
+ "bitflags 1.3.2",
+ "cfg-if",
+ "concurrent-queue",
+ "libc",
+ "log",
+ "pin-project-lite",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "poly1305"
+version = "0.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede"
+dependencies = [
+ "cpufeatures",
+ "opaque-debug",
+ "universal-hash",
+]
+
+[[package]]
+name = "pprof"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "196ded5d4be535690899a4631cc9f18cdc41b7ebf24a79400f46f48e49a11059"
+dependencies = [
+ "backtrace",
+ "cfg-if",
+ "criterion",
+ "findshlibs",
+ "inferno",
+ "libc",
+ "log",
+ "nix",
+ "once_cell",
+ "parking_lot 0.12.1",
+ "smallvec",
+ "symbolic-demangle",
+ "tempfile",
+ "thiserror",
+]
+
+[[package]]
+name = "ppv-lite86"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
+
+[[package]]
+name = "precomputed-hash"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
+
+[[package]]
+name = "prettyplease"
+version = "0.1.25"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86"
+dependencies = [
+ "proc-macro2",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "proc-macro-crate"
+version = "1.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919"
+dependencies = [
+ "once_cell",
+ "toml_edit",
+]
+
+[[package]]
+name = "proc-macro-error"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
+dependencies = [
+ "proc-macro-error-attr",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+ "version_check",
+]
+
+[[package]]
+name = "proc-macro-error-attr"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "version_check",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.56"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "proptest"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "29f1b898011ce9595050a68e60f90bad083ff2987a695a42357134c8381fba70"
+dependencies = [
+ "bitflags 1.3.2",
+ "byteorder",
+ "lazy_static",
+ "num-traits",
+ "quick-error",
+ "rand 0.8.5",
+ "rand_chacha 0.3.1",
+ "rand_xorshift",
+ "regex-syntax 0.6.29",
+ "unarray",
+]
+
+[[package]]
+name = "prost"
+version = "0.11.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd"
+dependencies = [
+ "bytes",
+ "prost-derive",
+]
+
+[[package]]
+name = "prost-build"
+version = "0.11.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270"
+dependencies = [
+ "bytes",
+ "heck",
+ "itertools",
+ "lazy_static",
+ "log",
+ "multimap",
+ "petgraph",
+ "prettyplease",
+ "prost",
+ "prost-types",
+ "regex",
+ "syn 1.0.109",
+ "tempfile",
+ "which",
+]
+
+[[package]]
+name = "prost-derive"
+version = "0.11.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4"
+dependencies = [
+ "anyhow",
+ "itertools",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "prost-types"
+version = "0.11.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13"
+dependencies = [
+ "prost",
+]
+
+[[package]]
+name = "pulldown-cmark"
+version = "0.9.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2d9cc634bc78768157b5cbfe988ffcd1dcba95cd2b2f03a88316c08c6d00ed63"
+dependencies = [
+ "bitflags 1.3.2",
+ "memchr",
+ "unicase",
+]
+
+[[package]]
+name = "qrcode"
+version = "0.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "16d2f1455f3630c6e5107b4f2b94e74d76dea80736de0981fd27644216cff57f"
+dependencies = [
+ "checked_int_cast",
+ "image 0.23.14",
+]
+
+[[package]]
+name = "quick-error"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3"
+
+[[package]]
+name = "quick-xml"
+version = "0.26.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f50b1c63b38611e7d4d7f68b82d3ad0cc71a2ad2e7f61fc10f1328d917c93cd"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "rand"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
+dependencies = [
+ "getrandom 0.1.16",
+ "libc",
+ "rand_chacha 0.2.2",
+ "rand_core 0.5.1",
+ "rand_hc",
+]
+
+[[package]]
+name = "rand"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
+dependencies = [
+ "libc",
+ "rand_chacha 0.3.1",
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
+dependencies = [
+ "ppv-lite86",
+ "rand_core 0.5.1",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
+dependencies = [
+ "ppv-lite86",
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
+dependencies = [
+ "getrandom 0.1.16",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
+dependencies = [
+ "getrandom 0.2.9",
+]
+
+[[package]]
+name = "rand_hc"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
+dependencies = [
+ "rand_core 0.5.1",
+]
+
+[[package]]
+name = "rand_xorshift"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f"
+dependencies = [
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "rand_xoshiro"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa"
+dependencies = [
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "rayon"
+version = "1.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b"
+dependencies = [
+ "either",
+ "rayon-core",
+]
+
+[[package]]
+name = "rayon-core"
+version = "1.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d"
+dependencies = [
+ "crossbeam-channel",
+ "crossbeam-deque",
+ "crossbeam-utils",
+ "num_cpus",
+]
+
+[[package]]
+name = "readlock"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed5b7f359207e69e1395440120fa3b07c59bb92c4ec077804cd10d7ebbe4c01a"
+
+[[package]]
+name = "redox_syscall"
+version = "0.2.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
+dependencies = [
+ "bitflags 1.3.2",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29"
+dependencies = [
+ "bitflags 1.3.2",
+]
+
+[[package]]
+name = "redox_users"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b"
+dependencies = [
+ "getrandom 0.2.9",
+ "redox_syscall 0.2.16",
+ "thiserror",
+]
+
+[[package]]
+name = "regex"
+version = "1.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax 0.7.1",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
+dependencies = [
+ "regex-syntax 0.6.29",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.6.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
+
+[[package]]
+name = "regex-syntax"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c"
+
+[[package]]
+name = "reqwest"
+version = "0.11.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "27b71749df584b7f4cac2c426c127a7c785a5106cc98f7a8feb044115f0fa254"
+dependencies = [
+ "async-compression",
+ "base64 0.21.0",
+ "bytes",
+ "encoding_rs",
+ "futures-core",
+ "futures-util",
+ "h2",
+ "http",
+ "http-body",
+ "hyper",
+ "hyper-rustls",
+ "hyper-tls",
+ "ipnet",
+ "js-sys",
+ "log",
+ "mime",
+ "native-tls",
+ "once_cell",
+ "percent-encoding",
+ "pin-project-lite",
+ "rustls",
+ "rustls-pemfile",
+ "serde",
+ "serde_json",
+ "serde_urlencoded",
+ "tokio",
+ "tokio-native-tls",
+ "tokio-rustls",
+ "tokio-socks",
+ "tokio-util",
+ "tower-service",
+ "url",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+ "webpki-roots",
+ "winreg",
+]
+
+[[package]]
+name = "retain_mut"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4389f1d5789befaf6029ebd9f7dac4af7f7e3d61b69d4f30e2ac02b57e7712b0"
+
+[[package]]
+name = "rgb"
+version = "0.8.36"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "20ec2d3e3fc7a92ced357df9cebd5a10b6fb2aa1ee797bf7e9ce2f17dffc8f59"
+dependencies = [
+ "bytemuck",
+]
+
+[[package]]
+name = "ring"
+version = "0.16.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc"
+dependencies = [
+ "cc",
+ "libc",
+ "once_cell",
+ "spin",
+ "untrusted",
+ "web-sys",
+ "winapi",
+]
+
+[[package]]
+name = "rmp"
+version = "0.8.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "44519172358fd6d58656c86ab8e7fbc9e1490c3e8f14d35ed78ca0dd07403c9f"
+dependencies = [
+ "byteorder",
+ "num-traits",
+ "paste",
+]
+
+[[package]]
+name = "rmp-serde"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c5b13be192e0220b8afb7222aa5813cb62cc269ebb5cac346ca6487681d2913e"
+dependencies = [
+ "byteorder",
+ "rmp",
+ "serde",
+]
+
+[[package]]
+name = "ruma"
+version = "0.8.2"
+source = "git+https://github.com/ruma/ruma?rev=0143bd9b9f5dcfcaa835afb76f342c12f014f945#0143bd9b9f5dcfcaa835afb76f342c12f014f945"
+dependencies = [
+ "assign",
+ "js_int",
+ "js_option",
+ "ruma-appservice-api",
+ "ruma-client-api",
+ "ruma-common",
+ "ruma-federation-api",
+ "ruma-push-gateway-api",
+]
+
+[[package]]
+name = "ruma-appservice-api"
+version = "0.8.1"
+source = "git+https://github.com/ruma/ruma?rev=0143bd9b9f5dcfcaa835afb76f342c12f014f945#0143bd9b9f5dcfcaa835afb76f342c12f014f945"
+dependencies = [
+ "js_int",
+ "ruma-common",
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "ruma-client-api"
+version = "0.16.2"
+source = "git+https://github.com/ruma/ruma?rev=0143bd9b9f5dcfcaa835afb76f342c12f014f945#0143bd9b9f5dcfcaa835afb76f342c12f014f945"
+dependencies = [
+ "assign",
+ "bytes",
+ "http",
+ "js_int",
+ "js_option",
+ "maplit",
+ "ruma-common",
+ "serde",
+ "serde_html_form",
+ "serde_json",
+]
+
+[[package]]
+name = "ruma-common"
+version = "0.11.3"
+source = "git+https://github.com/ruma/ruma?rev=0143bd9b9f5dcfcaa835afb76f342c12f014f945#0143bd9b9f5dcfcaa835afb76f342c12f014f945"
+dependencies = [
+ "base64 0.21.0",
+ "bytes",
+ "form_urlencoded",
+ "getrandom 0.2.9",
+ "html5ever",
+ "http",
+ "indexmap",
+ "js-sys",
+ "js_int",
+ "js_option",
+ "konst",
+ "percent-encoding",
+ "phf 0.11.1",
+ "pulldown-cmark",
+ "rand 0.8.5",
+ "regex",
+ "ruma-identifiers-validation",
+ "ruma-macros",
+ "serde",
+ "serde_html_form",
+ "serde_json",
+ "thiserror",
+ "tracing",
+ "url",
+ "uuid",
+ "wildmatch",
+]
+
+[[package]]
+name = "ruma-federation-api"
+version = "0.7.1"
+source = "git+https://github.com/ruma/ruma?rev=0143bd9b9f5dcfcaa835afb76f342c12f014f945#0143bd9b9f5dcfcaa835afb76f342c12f014f945"
+dependencies = [
+ "js_int",
+ "ruma-common",
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "ruma-identifiers-validation"
+version = "0.9.1"
+source = "git+https://github.com/ruma/ruma?rev=0143bd9b9f5dcfcaa835afb76f342c12f014f945#0143bd9b9f5dcfcaa835afb76f342c12f014f945"
+dependencies = [
+ "js_int",
+ "thiserror",
+]
+
+[[package]]
+name = "ruma-macros"
+version = "0.11.3"
+source = "git+https://github.com/ruma/ruma?rev=0143bd9b9f5dcfcaa835afb76f342c12f014f945#0143bd9b9f5dcfcaa835afb76f342c12f014f945"
+dependencies = [
+ "once_cell",
+ "proc-macro-crate",
+ "proc-macro2",
+ "quote",
+ "ruma-identifiers-validation",
+ "serde",
+ "syn 1.0.109",
+ "toml 0.7.3",
+]
+
+[[package]]
+name = "ruma-push-gateway-api"
+version = "0.7.1"
+source = "git+https://github.com/ruma/ruma?rev=0143bd9b9f5dcfcaa835afb76f342c12f014f945#0143bd9b9f5dcfcaa835afb76f342c12f014f945"
+dependencies = [
+ "js_int",
+ "ruma-common",
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "rusqlite"
+version = "0.28.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "01e213bc3ecb39ac32e81e51ebe31fd888a940515173e3a18a35f8c6e896422a"
+dependencies = [
+ "bitflags 1.3.2",
+ "fallible-iterator",
+ "fallible-streaming-iterator",
+ "hashlink",
+ "libsqlite3-sys",
+ "smallvec",
+]
+
+[[package]]
+name = "rustc-demangle"
+version = "0.1.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
+
+[[package]]
+name = "rustix"
+version = "0.37.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9b864d3c18a5785a05953adeed93e2dca37ed30f18e69bba9f30079d51f363f"
+dependencies = [
+ "bitflags 1.3.2",
+ "errno",
+ "io-lifetimes",
+ "libc",
+ "linux-raw-sys",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "rustls"
+version = "0.20.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f"
+dependencies = [
+ "log",
+ "ring",
+ "sct",
+ "webpki",
+]
+
+[[package]]
+name = "rustls-pemfile"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b"
+dependencies = [
+ "base64 0.21.0",
+]
+
+[[package]]
+name = "rustversion"
+version = "1.0.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06"
+
+[[package]]
+name = "ryu"
+version = "1.0.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041"
+
+[[package]]
+name = "same-file"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "sanitize-filename-reader-friendly"
+version = "2.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b750e71aac86f4b238844ac9416e7339a8de1225eb1ebe5fba89890f634c46bf"
+dependencies = [
+ "const_format",
+]
+
+[[package]]
+name = "schannel"
+version = "0.1.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3"
+dependencies = [
+ "windows-sys 0.42.0",
+]
+
+[[package]]
+name = "scoped-tls"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294"
+
+[[package]]
+name = "scoped_threadpool"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8"
+
+[[package]]
+name = "scopeguard"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
+
+[[package]]
+name = "scratch"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1"
+
+[[package]]
+name = "scroll"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "04c565b551bafbef4157586fa379538366e4385d42082f255bfd96e4fe8519da"
+dependencies = [
+ "scroll_derive",
+]
+
+[[package]]
+name = "scroll_derive"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bdbda6ac5cd1321e724fa9cee216f3a61885889b896f073b8f82322789c5250e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "sct"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4"
+dependencies = [
+ "ring",
+ "untrusted",
+]
+
+[[package]]
+name = "security-framework"
+version = "2.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254"
+dependencies = [
+ "bitflags 1.3.2",
+ "core-foundation",
+ "core-foundation-sys",
+ "libc",
+ "security-framework-sys",
+]
+
+[[package]]
+name = "security-framework-sys"
+version = "2.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
+[[package]]
+name = "semver"
+version = "1.0.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "serde"
+version = "1.0.160"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_bytes"
+version = "0.11.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.160"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.15",
+]
+
+[[package]]
+name = "serde_html_form"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "53192e38d5c88564b924dbe9b60865ecbb71b81d38c4e61c817cffd3e36ef696"
+dependencies = [
+ "form_urlencoded",
+ "indexmap",
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.96"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1"
+dependencies = [
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "serde_path_to_error"
+version = "0.1.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f7f05c1d5476066defcdfacce1f52fc3cae3af1d3089727100c02ae92e5abbe0"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "serde_qs"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c7715380eec75f029a4ef7de39a9200e0a63823176b759d055b613f5a87df6a6"
+dependencies = [
+ "percent-encoding",
+ "serde",
+ "thiserror",
+]
+
+[[package]]
+name = "serde_spanned"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0efd8caf556a6cebd3b285caf480045fcc1ac04f6bd786b09a6f11af30c4fcf4"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "serde_urlencoded"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
+dependencies = [
+ "form_urlencoded",
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "serde_yaml"
+version = "0.9.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9d684e3ec7de3bf5466b32bd75303ac16f0736426e5a4e0d6e489559ce1249c"
+dependencies = [
+ "indexmap",
+ "itoa",
+ "ryu",
+ "serde",
+ "unsafe-libyaml",
+]
+
+[[package]]
+name = "sha2"
+version = "0.9.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800"
+dependencies = [
+ "block-buffer 0.9.0",
+ "cfg-if",
+ "cpufeatures",
+ "digest 0.9.0",
+ "opaque-debug",
+]
+
+[[package]]
+name = "sha2"
+version = "0.10.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest 0.10.6",
+]
+
+[[package]]
+name = "sharded-slab"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31"
+dependencies = [
+ "lazy_static",
+]
+
+[[package]]
+name = "signal-hook"
+version = "0.3.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "732768f1176d21d09e076c23a93123d40bba92d50c4058da34d45c8de8e682b9"
+dependencies = [
+ "libc",
+ "signal-hook-registry",
+]
+
+[[package]]
+name = "signal-hook-registry"
+version = "1.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "signature"
+version = "1.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c"
+
+[[package]]
+name = "simd-adler32"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "238abfbb77c1915110ad968465608b68e869e0772622c9656714e73e5a1a522f"
+
+[[package]]
+name = "siphasher"
+version = "0.3.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de"
+
+[[package]]
+name = "slab"
+version = "0.4.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "sled"
+version = "0.34.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f96b4737c2ce5987354855aed3797279def4ebf734436c6aa4552cf8e169935"
+dependencies = [
+ "crc32fast",
+ "crossbeam-epoch",
+ "crossbeam-utils",
+ "fs2",
+ "fxhash",
+ "libc",
+ "log",
+ "parking_lot 0.11.2",
+]
+
+[[package]]
+name = "sliding-sync-integration-test"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "assert_matches",
+ "eyeball",
+ "eyeball-im",
+ "futures",
+ "matrix-sdk",
+ "matrix-sdk-integration-testing",
+ "tokio",
+ "uuid",
+]
+
+[[package]]
+name = "smallvec"
+version = "1.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"
+
+[[package]]
+name = "socket2"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662"
+dependencies = [
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "spin"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
+
+[[package]]
+name = "spki"
+version = "0.5.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27"
+dependencies = [
+ "der",
+]
+
+[[package]]
+name = "stable_deref_trait"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
+
+[[package]]
+name = "static_assertions"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
+
+[[package]]
+name = "str_stack"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9091b6114800a5f2141aee1d1b9d6ca3592ac062dc5decb3764ec5895a47b4eb"
+
+[[package]]
+name = "string_cache"
+version = "0.8.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b"
+dependencies = [
+ "new_debug_unreachable",
+ "once_cell",
+ "parking_lot 0.12.1",
+ "phf_shared 0.10.0",
+ "precomputed-hash",
+ "serde",
+]
+
+[[package]]
+name = "string_cache_codegen"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988"
+dependencies = [
+ "phf_generator 0.10.0",
+ "phf_shared 0.10.0",
+ "proc-macro2",
+ "quote",
+]
+
+[[package]]
+name = "strsim"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
+
+[[package]]
+name = "subtle"
+version = "2.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
+
+[[package]]
+name = "symbolic-common"
+version = "10.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b55cdc318ede251d0957f07afe5fed912119b8c1bc5a7804151826db999e737"
+dependencies = [
+ "debugid",
+ "memmap2",
+ "stable_deref_trait",
+ "uuid",
+]
+
+[[package]]
+name = "symbolic-demangle"
+version = "10.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "79be897be8a483a81fff6a3a4e195b4ac838ef73ca42d348b3f722da9902e489"
+dependencies = [
+ "cpp_demangle",
+ "rustc-demangle",
+ "symbolic-common",
+]
+
+[[package]]
+name = "syn"
+version = "1.0.109"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "syn"
+version = "2.0.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "sync_wrapper"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160"
+
+[[package]]
+name = "tempfile"
+version = "3.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998"
+dependencies = [
+ "cfg-if",
+ "fastrand",
+ "redox_syscall 0.3.5",
+ "rustix",
+ "windows-sys 0.45.0",
+]
+
+[[package]]
+name = "tendril"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0"
+dependencies = [
+ "futf",
+ "mac",
+ "utf-8",
+]
+
+[[package]]
+name = "termcolor"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "textwrap"
+version = "0.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d"
+
+[[package]]
+name = "thiserror"
+version = "1.0.40"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac"
+dependencies = [
+ "thiserror-impl",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "1.0.40"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.15",
+]
+
+[[package]]
+name = "thread_local"
+version = "1.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+]
+
+[[package]]
+name = "tiff"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a53f4706d65497df0c4349241deddf35f84cee19c87ed86ea8ca590f4464437"
+dependencies = [
+ "jpeg-decoder 0.1.22",
+ "miniz_oxide 0.4.4",
+ "weezl",
+]
+
+[[package]]
+name = "tiff"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7449334f9ff2baf290d55d73983a7d6fa15e01198faef72af07e2a8db851e471"
+dependencies = [
+ "flate2",
+ "jpeg-decoder 0.3.0",
+ "weezl",
+]
+
+[[package]]
+name = "time"
+version = "0.1.45"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a"
+dependencies = [
+ "libc",
+ "wasi 0.10.0+wasi-snapshot-preview1",
+ "winapi",
+]
+
+[[package]]
+name = "time"
+version = "0.3.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890"
+dependencies = [
+ "itoa",
+ "serde",
+ "time-core",
+ "time-macros",
+]
+
+[[package]]
+name = "time-core"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd"
+
+[[package]]
+name = "time-macros"
+version = "0.2.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36"
+dependencies = [
+ "time-core",
+]
+
+[[package]]
+name = "tinytemplate"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc"
+dependencies = [
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "tinyvec"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50"
+dependencies = [
+ "tinyvec_macros",
+]
+
+[[package]]
+name = "tinyvec_macros"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
+
+[[package]]
+name = "tokio"
+version = "1.27.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d0de47a4eecbe11f498978a9b29d792f0d2692d1dd003650c24c76510e3bc001"
+dependencies = [
+ "autocfg",
+ "bytes",
+ "libc",
+ "mio",
+ "num_cpus",
+ "pin-project-lite",
+ "socket2",
+ "tokio-macros",
+ "windows-sys 0.45.0",
+]
+
+[[package]]
+name = "tokio-io-timeout"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf"
+dependencies = [
+ "pin-project-lite",
+ "tokio",
+]
+
+[[package]]
+name = "tokio-macros"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "61a573bdc87985e9d6ddeed1b3d864e8a302c847e40d647746df2f1de209d1ce"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.15",
+]
+
+[[package]]
+name = "tokio-native-tls"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2"
+dependencies = [
+ "native-tls",
+ "tokio",
+]
+
+[[package]]
+name = "tokio-rustls"
+version = "0.23.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59"
+dependencies = [
+ "rustls",
+ "tokio",
+ "webpki",
+]
+
+[[package]]
+name = "tokio-socks"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51165dfa029d2a65969413a6cc96f354b86b464498702f174a4efa13608fd8c0"
+dependencies = [
+ "either",
+ "futures-util",
+ "thiserror",
+ "tokio",
+]
+
+[[package]]
+name = "tokio-stream"
+version = "0.1.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313"
+dependencies = [
+ "futures-core",
+ "pin-project-lite",
+ "tokio",
+ "tokio-util",
+]
+
+[[package]]
+name = "tokio-util"
+version = "0.7.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2"
+dependencies = [
+ "bytes",
+ "futures-core",
+ "futures-sink",
+ "pin-project-lite",
+ "tokio",
+ "tracing",
+]
+
+[[package]]
+name = "toml"
+version = "0.5.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "toml"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b403acf6f2bb0859c93c7f0d967cb4a75a7ac552100f9322faf64dc047669b21"
+dependencies = [
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "toml_edit",
+]
+
+[[package]]
+name = "toml_datetime"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "toml_edit"
+version = "0.19.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13"
+dependencies = [
+ "indexmap",
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "winnow",
+]
+
+[[package]]
+name = "tonic"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f219fad3b929bef19b1f86fbc0358d35daed8f2cac972037ac0dc10bbb8d5fb"
+dependencies = [
+ "async-stream",
+ "async-trait",
+ "axum",
+ "base64 0.13.1",
+ "bytes",
+ "futures-core",
+ "futures-util",
+ "h2",
+ "http",
+ "http-body",
+ "hyper",
+ "hyper-timeout",
+ "percent-encoding",
+ "pin-project",
+ "prost",
+ "prost-derive",
+ "tokio",
+ "tokio-stream",
+ "tokio-util",
+ "tower",
+ "tower-layer",
+ "tower-service",
+ "tracing",
+ "tracing-futures",
+]
+
+[[package]]
+name = "tonic-build"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5bf5e9b9c0f7e0a7c027dcfaba7b2c60816c7049171f679d99ee2ff65d0de8c4"
+dependencies = [
+ "prettyplease",
+ "proc-macro2",
+ "prost-build",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "tower"
+version = "0.4.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c"
+dependencies = [
+ "futures-core",
+ "futures-util",
+ "indexmap",
+ "pin-project",
+ "pin-project-lite",
+ "rand 0.8.5",
+ "slab",
+ "tokio",
+ "tokio-util",
+ "tower-layer",
+ "tower-service",
+ "tracing",
+]
+
+[[package]]
+name = "tower-layer"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0"
+
+[[package]]
+name = "tower-service"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52"
+
+[[package]]
+name = "tracing"
+version = "0.1.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8"
+dependencies = [
+ "cfg-if",
+ "log",
+ "pin-project-lite",
+ "tracing-attributes",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-android"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "12612be8f868a09c0ceae7113ff26afe79d81a24473a393cb9120ece162e86c0"
+dependencies = [
+ "android_log-sys",
+ "tracing",
+ "tracing-subscriber",
+]
+
+[[package]]
+name = "tracing-attributes"
+version = "0.1.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "tracing-core"
+version = "0.1.30"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a"
+dependencies = [
+ "once_cell",
+ "valuable",
+]
+
+[[package]]
+name = "tracing-futures"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2"
+dependencies = [
+ "pin-project",
+ "tracing",
+]
+
+[[package]]
+name = "tracing-log"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922"
+dependencies = [
+ "lazy_static",
+ "log",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-opentelemetry"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "21ebb87a95ea13271332df069020513ab70bdb5637ca42d6e492dc3bbbad48de"
+dependencies = [
+ "once_cell",
+ "opentelemetry",
+ "tracing",
+ "tracing-core",
+ "tracing-log",
+ "tracing-subscriber",
+]
+
+[[package]]
+name = "tracing-subscriber"
+version = "0.3.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77"
+dependencies = [
+ "matchers",
+ "nu-ansi-term",
+ "once_cell",
+ "regex",
+ "sharded-slab",
+ "smallvec",
+ "thread_local",
+ "time 0.3.20",
+ "tracing",
+ "tracing-core",
+ "tracing-log",
+]
+
+[[package]]
+name = "try-lock"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed"
+
+[[package]]
+name = "typenum"
+version = "1.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba"
+
+[[package]]
+name = "unarray"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94"
+
+[[package]]
+name = "unicase"
+version = "2.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6"
+dependencies = [
+ "version_check",
+]
+
+[[package]]
+name = "unicode-bidi"
+version = "0.3.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460"
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4"
+
+[[package]]
+name = "unicode-normalization"
+version = "0.1.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921"
+dependencies = [
+ "tinyvec",
+]
+
+[[package]]
+name = "unicode-segmentation"
+version = "1.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36"
+
+[[package]]
+name = "unicode-width"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
+
+[[package]]
+name = "unicode-xid"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c"
+
+[[package]]
+name = "uniffi"
+version = "0.23.0"
+source = "git+https://github.com/mozilla/uniffi-rs?rev=aa91307b6ac27aae6d5c7ad971b762df952d2745#aa91307b6ac27aae6d5c7ad971b762df952d2745"
+dependencies = [
+ "anyhow",
+ "camino",
+ "clap 3.2.23",
+ "uniffi_bindgen",
+ "uniffi_build",
+ "uniffi_core",
+ "uniffi_macros",
+]
+
+[[package]]
+name = "uniffi-bindgen"
+version = "0.1.0"
+dependencies = [
+ "uniffi",
+]
+
+[[package]]
+name = "uniffi_bindgen"
+version = "0.23.0"
+source = "git+https://github.com/mozilla/uniffi-rs?rev=aa91307b6ac27aae6d5c7ad971b762df952d2745#aa91307b6ac27aae6d5c7ad971b762df952d2745"
+dependencies = [
+ "anyhow",
+ "askama",
+ "camino",
+ "fs-err",
+ "glob",
+ "goblin",
+ "heck",
+ "once_cell",
+ "paste",
+ "serde",
+ "serde_json",
+ "toml 0.5.11",
+ "uniffi_meta",
+ "uniffi_testing",
+ "weedle2",
+]
+
+[[package]]
+name = "uniffi_build"
+version = "0.23.0"
+source = "git+https://github.com/mozilla/uniffi-rs?rev=aa91307b6ac27aae6d5c7ad971b762df952d2745#aa91307b6ac27aae6d5c7ad971b762df952d2745"
+dependencies = [
+ "anyhow",
+ "camino",
+ "uniffi_bindgen",
+]
+
+[[package]]
+name = "uniffi_checksum_derive"
+version = "0.23.0"
+source = "git+https://github.com/mozilla/uniffi-rs?rev=aa91307b6ac27aae6d5c7ad971b762df952d2745#aa91307b6ac27aae6d5c7ad971b762df952d2745"
+dependencies = [
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "uniffi_core"
+version = "0.23.0"
+source = "git+https://github.com/mozilla/uniffi-rs?rev=aa91307b6ac27aae6d5c7ad971b762df952d2745#aa91307b6ac27aae6d5c7ad971b762df952d2745"
+dependencies = [
+ "anyhow",
+ "bytes",
+ "camino",
+ "cargo_metadata",
+ "log",
+ "once_cell",
+ "paste",
+ "static_assertions",
+]
+
+[[package]]
+name = "uniffi_macros"
+version = "0.23.0"
+source = "git+https://github.com/mozilla/uniffi-rs?rev=aa91307b6ac27aae6d5c7ad971b762df952d2745#aa91307b6ac27aae6d5c7ad971b762df952d2745"
+dependencies = [
+ "bincode",
+ "camino",
+ "fs-err",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "serde",
+ "syn 1.0.109",
+ "toml 0.5.11",
+ "uniffi_build",
+ "uniffi_meta",
+]
+
+[[package]]
+name = "uniffi_meta"
+version = "0.23.0"
+source = "git+https://github.com/mozilla/uniffi-rs?rev=aa91307b6ac27aae6d5c7ad971b762df952d2745#aa91307b6ac27aae6d5c7ad971b762df952d2745"
+dependencies = [
+ "anyhow",
+ "bytes",
+ "serde",
+ "siphasher",
+ "uniffi_checksum_derive",
+ "uniffi_core",
+]
+
+[[package]]
+name = "uniffi_testing"
+version = "0.23.0"
+source = "git+https://github.com/mozilla/uniffi-rs?rev=aa91307b6ac27aae6d5c7ad971b762df952d2745#aa91307b6ac27aae6d5c7ad971b762df952d2745"
+dependencies = [
+ "anyhow",
+ "camino",
+ "cargo_metadata",
+ "fs-err",
+ "once_cell",
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "universal-hash"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05"
+dependencies = [
+ "generic-array",
+ "subtle",
+]
+
+[[package]]
+name = "unsafe-libyaml"
+version = "0.2.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1865806a559042e51ab5414598446a5871b561d21b6764f2eabb0dd481d880a6"
+
+[[package]]
+name = "untrusted"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
+
+[[package]]
+name = "url"
+version = "2.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643"
+dependencies = [
+ "form_urlencoded",
+ "idna",
+ "percent-encoding",
+ "serde",
+]
+
+[[package]]
+name = "utf-8"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
+
+[[package]]
+name = "utf8parse"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
+
+[[package]]
+name = "uuid"
+version = "1.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b55a3fef2a1e3b3a00ce878640918820d3c51081576ac657d23af9fc7928fdb"
+dependencies = [
+ "getrandom 0.2.9",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "valuable"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
+
+[[package]]
+name = "value-bag"
+version = "1.0.0-alpha.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2209b78d1249f7e6f3293657c9779fe31ced465df091bbd433a1cf88e916ec55"
+dependencies = [
+ "ctor 0.1.26",
+ "version_check",
+]
+
+[[package]]
+name = "vcpkg"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
+
+[[package]]
+name = "version_check"
+version = "0.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
+
+[[package]]
+name = "vodozemac"
+version = "0.3.0"
+source = "git+https://github.com/matrix-org/vodozemac?rev=fb609ca1e4df5a7a818490ae86ac694119e41e71#fb609ca1e4df5a7a818490ae86ac694119e41e71"
+dependencies = [
+ "aes",
+ "arrayvec",
+ "base64 0.13.1",
+ "cbc",
+ "ed25519-dalek",
+ "hkdf",
+ "hmac",
+ "matrix-pickle",
+ "pkcs7",
+ "prost",
+ "rand 0.7.3",
+ "serde",
+ "serde_json",
+ "sha2 0.10.6",
+ "subtle",
+ "thiserror",
+ "x25519-dalek",
+ "zeroize",
+]
+
+[[package]]
+name = "waker-fn"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca"
+
+[[package]]
+name = "walkdir"
+version = "2.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698"
+dependencies = [
+ "same-file",
+ "winapi-util",
+]
+
+[[package]]
+name = "want"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
+dependencies = [
+ "log",
+ "try-lock",
+]
+
+[[package]]
+name = "wasi"
+version = "0.9.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
+
+[[package]]
+name = "wasi"
+version = "0.10.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
+
+[[package]]
+name = "wasi"
+version = "0.11.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.84"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b"
+dependencies = [
+ "cfg-if",
+ "wasm-bindgen-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.84"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9"
+dependencies = [
+ "bumpalo",
+ "log",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-futures"
+version = "0.4.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.84"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.84"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.84"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d"
+
+[[package]]
+name = "wasm-bindgen-test"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6db36fc0f9fb209e88fb3642590ae0205bb5a56216dabd963ba15879fe53a30b"
+dependencies = [
+ "console_error_panic_hook",
+ "js-sys",
+ "scoped-tls",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "wasm-bindgen-test-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-test-macro"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0734759ae6b3b1717d661fe4f016efcfb9828f5edb4520c18eaee05af3b43be9"
+dependencies = [
+ "proc-macro2",
+ "quote",
+]
+
+[[package]]
+name = "wasm-command-bot"
+version = "0.1.0"
+dependencies = [
+ "console_error_panic_hook",
+ "matrix-sdk",
+ "url",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "wasm-bindgen-test",
+ "web-sys",
+]
+
+[[package]]
+name = "web-sys"
+version = "0.3.61"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "webpki"
+version = "0.22.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd"
+dependencies = [
+ "ring",
+ "untrusted",
+]
+
+[[package]]
+name = "webpki-roots"
+version = "0.22.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87"
+dependencies = [
+ "webpki",
+]
+
+[[package]]
+name = "weedle2"
+version = "4.0.0"
+source = "git+https://github.com/mozilla/uniffi-rs?rev=aa91307b6ac27aae6d5c7ad971b762df952d2745#aa91307b6ac27aae6d5c7ad971b762df952d2745"
+dependencies = [
+ "nom",
+]
+
+[[package]]
+name = "weezl"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb"
+
+[[package]]
+name = "which"
+version = "4.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269"
+dependencies = [
+ "either",
+ "libc",
+ "once_cell",
+]
+
+[[package]]
+name = "wildmatch"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ee583bdc5ff1cf9db20e9db5bb3ff4c3089a8f6b8b31aff265c9aba85812db86"
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-util"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
+[[package]]
+name = "windows"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
+dependencies = [
+ "windows-targets 0.48.0",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.42.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
+dependencies = [
+ "windows_aarch64_gnullvm 0.42.2",
+ "windows_aarch64_msvc 0.42.2",
+ "windows_i686_gnu 0.42.2",
+ "windows_i686_msvc 0.42.2",
+ "windows_x86_64_gnu 0.42.2",
+ "windows_x86_64_gnullvm 0.42.2",
+ "windows_x86_64_msvc 0.42.2",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.45.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
+dependencies = [
+ "windows-targets 0.42.2",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
+dependencies = [
+ "windows-targets 0.48.0",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"
+dependencies = [
+ "windows_aarch64_gnullvm 0.42.2",
+ "windows_aarch64_msvc 0.42.2",
+ "windows_i686_gnu 0.42.2",
+ "windows_i686_msvc 0.42.2",
+ "windows_x86_64_gnu 0.42.2",
+ "windows_x86_64_gnullvm 0.42.2",
+ "windows_x86_64_msvc 0.42.2",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5"
+dependencies = [
+ "windows_aarch64_gnullvm 0.48.0",
+ "windows_aarch64_msvc 0.48.0",
+ "windows_i686_gnu 0.48.0",
+ "windows_i686_msvc 0.48.0",
+ "windows_x86_64_gnu 0.48.0",
+ "windows_x86_64_gnullvm 0.48.0",
+ "windows_x86_64_msvc 0.48.0",
+]
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
+
+[[package]]
+name = "winnow"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ae8970b36c66498d8ff1d66685dc86b91b29db0c7739899012f63a63814b4b28"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "winreg"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "wiremock"
+version = "0.5.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd7b0b5b253ebc0240d6aac6dd671c495c467420577bf634d3064ae7e6fa2b4c"
+dependencies = [
+ "assert-json-diff",
+ "async-trait",
+ "base64 0.21.0",
+ "deadpool",
+ "futures",
+ "futures-timer",
+ "http-types",
+ "hyper",
+ "log",
+ "once_cell",
+ "regex",
+ "serde",
+ "serde_json",
+ "tokio",
+]
+
+[[package]]
+name = "x25519-dalek"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2392b6b94a576b4e2bf3c5b2757d63f10ada8020a2e4d08ac849ebcf6ea8e077"
+dependencies = [
+ "curve25519-dalek",
+ "rand_core 0.5.1",
+ "serde",
+ "zeroize",
+]
+
+[[package]]
+name = "xshell"
+version = "0.1.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eaad2035244c56da05573d4d7fda5f903c60a5f35b9110e157a14a1df45a9f14"
+dependencies = [
+ "xshell-macros",
+]
+
+[[package]]
+name = "xshell-macros"
+version = "0.1.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4916a4a3cad759e499a3620523bf9545cc162d7a06163727dde97ce9aaa4cf39"
+
+[[package]]
+name = "xtask"
+version = "0.1.0"
+dependencies = [
+ "camino",
+ "clap 4.2.4",
+ "fs_extra",
+ "serde",
+ "serde_json",
+ "uniffi",
+ "uniffi_bindgen",
+ "xshell",
+]
+
+[[package]]
+name = "zeroize"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd"
+dependencies = [
+ "zeroize_derive",
+]
+
+[[package]]
+name = "zeroize_derive"
+version = "1.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.15",
+]
diff --git a/nixpkgs/pkgs/development/libraries/matrix-sdk-crypto-nodejs/beta3.nix b/nixpkgs/pkgs/development/libraries/matrix-sdk-crypto-nodejs/beta3.nix
new file mode 100644
index 000000000000..e92dccd640f5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/matrix-sdk-crypto-nodejs/beta3.nix
@@ -0,0 +1,13 @@
+import ./generic.nix {
+  version = "0.1.0-beta.3";
+  hash = "sha256-0p+1cMn9PU+Jk2JW7G+sdzxhMaI3gEAk5w2nm05oBSU=";
+  outputHashes = {
+    "uniffi-0.21.0" = "sha256-blKCfCsSNtr8NtO7Let7VJ/9oGuW9Eu8j9A6/oHUcP0=";
+  };
+  cargoLock = ./Cargo-beta.3.lock;
+  patches = [
+    # This is needed because two versions of indexed_db_futures are present (which will fail to vendor, see https://github.com/rust-lang/cargo/issues/10310).
+    # (matrix-sdk-crypto-nodejs doesn't use this dependency, we only need to remove it to vendor the dependencies successfully.)
+    ./remove-duplicate-dependency.patch
+  ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/matrix-sdk-crypto-nodejs/default.nix b/nixpkgs/pkgs/development/libraries/matrix-sdk-crypto-nodejs/default.nix
new file mode 100644
index 000000000000..9955e2af84b9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/matrix-sdk-crypto-nodejs/default.nix
@@ -0,0 +1,11 @@
+import ./generic.nix {
+  version = "0.1.0-beta.6";
+  hash = "sha256-0oLk7yq/XELS0GkeZj7PxY3KKXfzws0djF3KmxYisY0=";
+  outputHashes = {
+    "ruma-0.8.2" = "sha256-bKvcElIVugj+gZZhPFPGfCqva4fo1IqW/e9gf+q/Tfw=";
+    "uniffi-0.23.0" = "sha256-4WUp3PQm3ZgqHNMvz9+PBtNAeiq6m4PBViwXpQDglLk=";
+    "vodozemac-0.3.0" = "sha256-tAimsVD8SZmlVybb7HvRffwlNsfb7gLWGCplmwbLIVE=";
+  };
+  cargoLock = ./Cargo-beta.6.lock;
+  patches = [];
+}
diff --git a/nixpkgs/pkgs/development/libraries/matrix-sdk-crypto-nodejs/generic.nix b/nixpkgs/pkgs/development/libraries/matrix-sdk-crypto-nodejs/generic.nix
new file mode 100644
index 000000000000..b7cac02bb6c5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/matrix-sdk-crypto-nodejs/generic.nix
@@ -0,0 +1,60 @@
+{ version, hash, outputHashes, cargoLock, patches }:
+
+{ lib, stdenv, fetchFromGitHub
+, cargo, rustPlatform, rustc, napi-rs-cli, nodejs, libiconv
+}:
+
+stdenv.mkDerivation rec {
+  pname = "matrix-sdk-crypto-nodejs";
+  inherit version patches;
+
+  src = fetchFromGitHub {
+    owner = "matrix-org";
+    repo = "matrix-rust-sdk";
+    rev = "${pname}-v${version}";
+    inherit hash;
+  };
+
+
+  cargoDeps = rustPlatform.importCargoLock {
+    lockFile = cargoLock;
+    inherit outputHashes;
+  };
+
+  nativeBuildInputs = [
+    rustPlatform.cargoSetupHook
+    cargo
+    rustc
+    napi-rs-cli
+    nodejs
+  ];
+
+  buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
+
+  buildPhase = ''
+    runHook preBuild
+
+    cd bindings/${pname}
+    npm run release-build --offline
+
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    local -r outPath="$out/lib/node_modules/@matrix-org/${pname}"
+    mkdir -p "$outPath"
+    cp package.json index.js index.d.ts matrix-sdk-crypto.*.node "$outPath"
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "A no-network-IO implementation of a state machine that handles E2EE for Matrix clients";
+    homepage = "https://github.com/matrix-org/matrix-rust-sdk/tree/${src.rev}/bindings/matrix-sdk-crypto-nodejs";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ winter ];
+    inherit (nodejs.meta) platforms;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/matrix-sdk-crypto-nodejs/remove-duplicate-dependency.patch b/nixpkgs/pkgs/development/libraries/matrix-sdk-crypto-nodejs/remove-duplicate-dependency.patch
new file mode 100644
index 000000000000..4e4dd6308778
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/matrix-sdk-crypto-nodejs/remove-duplicate-dependency.patch
@@ -0,0 +1,55 @@
+diff --git a/Cargo.lock b/Cargo.lock
+index 208ef4ff..b5045040 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -2124,19 +2124,6 @@ dependencies = [
+  "web-sys",
+ ]
+ 
+-[[package]]
+-name = "indexed_db_futures"
+-version = "0.2.3"
+-source = "git+https://github.com/Hywan/rust-indexed-db?branch=feat-factory-nodejs#5dab67890cea0ab88b967031adc09179a537d77c"
+-dependencies = [
+- "cfg-if",
+- "js-sys",
+- "uuid 0.8.2",
+- "wasm-bindgen",
+- "wasm-bindgen-futures",
+- "web-sys",
+-]
+-
+ [[package]]
+ name = "indexmap"
+ version = "1.9.1"
+@@ -2726,8 +2713,7 @@ dependencies = [
+  "derive_builder",
+  "getrandom 0.2.7",
+  "gloo-utils",
+- "indexed_db_futures 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+- "indexed_db_futures 0.2.3 (git+https://github.com/Hywan/rust-indexed-db?branch=feat-factory-nodejs)",
++ "indexed_db_futures",
+  "js-sys",
+  "matrix-sdk-base",
+  "matrix-sdk-common",
+diff --git a/crates/matrix-sdk-indexeddb/Cargo.toml b/crates/matrix-sdk-indexeddb/Cargo.toml
+index 5b0ef4f4..da73979b 100644
+--- a/crates/matrix-sdk-indexeddb/Cargo.toml
++++ b/crates/matrix-sdk-indexeddb/Cargo.toml
+@@ -16,7 +16,7 @@ rustdoc-args = ["--cfg", "docsrs"]
+ [features]
+ default = ["e2e-encryption"]
+ e2e-encryption = ["matrix-sdk-base/e2e-encryption", "dep:matrix-sdk-crypto", "dashmap"]
+-experimental-nodejs = ["indexed_db_futures_nodejs"]
++experimental-nodejs = []
+ 
+ [dependencies]
+ anyhow = "1.0.57"
+@@ -26,7 +26,6 @@ dashmap = { version = "5.2.0", optional = true }
+ derive_builder = "0.11.2"
+ gloo-utils = { version = "0.1", features = ["serde"] }
+ indexed_db_futures = "0.2.3"
+-indexed_db_futures_nodejs = { version = "0.2.3", package = "indexed_db_futures", git = "https://github.com/Hywan/rust-indexed-db", branch = "feat-factory-nodejs", optional = true }
+ js-sys = { version = "0.3.58" }
+ matrix-sdk-base = { version = "0.6.0", path = "../matrix-sdk-base", features = ["js"] }
+ matrix-sdk-crypto = { version = "0.6.0", path = "../matrix-sdk-crypto", features = ["js"], optional = true }
diff --git a/nixpkgs/pkgs/development/libraries/maui-core/default.nix b/nixpkgs/pkgs/development/libraries/maui-core/default.nix
new file mode 100644
index 000000000000..b173498189d6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/maui-core/default.nix
@@ -0,0 +1,45 @@
+{ lib
+, pkgs
+, mkDerivation
+, libcanberra
+, pulseaudio
+, fetchFromGitHub
+, cmake
+, extra-cmake-modules
+, kio
+, kidletime
+}:
+
+mkDerivation rec {
+  pname = "maui-core";
+  version = "0.6.6";
+
+  src = fetchFromGitHub {
+    owner = "Nitrux";
+    repo = pname;
+    rev = "refs/tags/v${version}";
+    sha256 = "sha256-o0Xwh9w0cClMw85FwpQB9CNWoSnzARxs6aGfvCA4BhA=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    extra-cmake-modules
+  ];
+
+  buildInputs = [
+    kidletime
+    kio
+    libcanberra
+    pulseaudio
+  ];
+
+  meta = with lib; {
+    description = "Core libraries to manage the desktop to be shared between Maui Settings and Cask";
+    homepage = "https://github.com/Nitrux/maui-core";
+    # Missing license information https://github.com/Nitrux/maui-core/issues/1
+    license = licenses.unfree;
+    maintainers = with maintainers; [ onny ];
+    platforms = platforms.linux;
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/maxflow/default.nix b/nixpkgs/pkgs/development/libraries/maxflow/default.nix
new file mode 100644
index 000000000000..9c53a16d3724
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/maxflow/default.nix
@@ -0,0 +1,27 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "maxflow";
+  version = "3.0.5";
+
+  src = fetchFromGitHub {
+    owner = "gerddie";
+    repo = pname;
+    rev = version;
+    hash = "sha256-a84SxGMnfBEaoMEeeIFffTOtErSN5yzZBrAUDjkalGY=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "Software for computing mincut/maxflow in a graph";
+    homepage = "https://github.com/gerddie/maxflow";
+    license = licenses.gpl3Plus;
+    platforms = platforms.all;
+    maintainers = [ maintainers.tadfisher ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mbedtls/2.nix b/nixpkgs/pkgs/development/libraries/mbedtls/2.nix
new file mode 100644
index 000000000000..97d62fad3ced
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mbedtls/2.nix
@@ -0,0 +1,6 @@
+{ callPackage }:
+
+callPackage ./generic.nix {
+  version = "2.28.7";
+  hash = "sha256-JI0Frbz4HkPqrLQNrSIj1ikN8201h4kd1wTwyPotERw=";
+}
diff --git a/nixpkgs/pkgs/development/libraries/mbedtls/3.nix b/nixpkgs/pkgs/development/libraries/mbedtls/3.nix
new file mode 100644
index 000000000000..267349ac5d7b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mbedtls/3.nix
@@ -0,0 +1,6 @@
+{ callPackage }:
+
+callPackage ./generic.nix {
+  version = "3.5.2";
+  hash = "sha256-lVGmnSYccNmRS6vfF/fDiny5cYRPc/wJBpgciFLPUvM=";
+}
diff --git a/nixpkgs/pkgs/development/libraries/mbedtls/generic.nix b/nixpkgs/pkgs/development/libraries/mbedtls/generic.nix
new file mode 100644
index 000000000000..2e79a593b7c3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mbedtls/generic.nix
@@ -0,0 +1,59 @@
+{ lib
+, stdenv
+, version
+, hash
+, fetchFromGitHub
+
+, cmake
+, ninja
+, perl # Project uses Perl for scripting and testing
+, python3
+
+, enableThreading ? true # Threading can be disabled to increase security https://tls.mbed.org/kb/development/thread-safety-and-multi-threading
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mbedtls";
+  inherit version;
+
+  src = fetchFromGitHub {
+    owner = "Mbed-TLS";
+    repo = "mbedtls";
+    rev = "${pname}-${version}";
+    inherit hash;
+  };
+
+  nativeBuildInputs = [ cmake ninja perl python3 ];
+
+  strictDeps = true;
+
+  postConfigure = lib.optionalString enableThreading ''
+    perl scripts/config.pl set MBEDTLS_THREADING_C    # Threading abstraction layer
+    perl scripts/config.pl set MBEDTLS_THREADING_PTHREAD    # POSIX thread wrapper layer for the threading layer.
+  '';
+
+  cmakeFlags = [
+    "-DUSE_SHARED_MBEDTLS_LIBRARY=${if stdenv.hostPlatform.isStatic then "off" else "on"}"
+
+    # Avoid a dependency on jsonschema and jinja2 by not generating source code
+    # using python. In releases, these generated files are already present in
+    # the repository and do not need to be regenerated. See:
+    # https://github.com/Mbed-TLS/mbedtls/releases/tag/v3.3.0 below "Requirement changes".
+    "-DGEN_FILES=off"
+  ];
+
+  doCheck = true;
+
+  # Parallel checking causes test failures
+  # https://github.com/Mbed-TLS/mbedtls/issues/4980
+  enableParallelChecking = false;
+
+  meta = with lib; {
+    homepage = "https://www.trustedfirmware.org/projects/mbed-tls/";
+    changelog = "https://github.com/Mbed-TLS/mbedtls/blob/${pname}-${version}/ChangeLog";
+    description = "Portable cryptographic and TLS library, formerly known as PolarSSL";
+    license = [ licenses.asl20 /* or */ licenses.gpl2Plus ];
+    platforms = platforms.all;
+    maintainers = with maintainers; [ raphaelr ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mdds/default.nix b/nixpkgs/pkgs/development/libraries/mdds/default.nix
new file mode 100644
index 000000000000..ea60c32a08cd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mdds/default.nix
@@ -0,0 +1,40 @@
+{ lib,
+  stdenv,
+  fetchFromGitLab,
+  autoreconfHook,
+  boost,
+  llvmPackages,
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "mdds";
+  version = "2.1.1";
+
+  src = fetchFromGitLab {
+    owner = "mdds";
+    repo = "mdds";
+    rev = finalAttrs.version;
+    hash = "sha256-a412LpgDiYM8TMToaUrTlHtblYS1HehzrDOwvIAAxiA=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  buildInputs = lib.optionals stdenv.cc.isClang [ llvmPackages.openmp ];
+
+  nativeCheckInputs = [ boost ];
+
+  postInstall = ''
+    mkdir -p $out/lib/
+    mv $out/share/pkgconfig $out/lib/
+  '';
+
+  meta = with lib; {
+    homepage = "https://gitlab.com/mdds/mdds";
+    description = "A collection of multi-dimensional data structure and indexing algorithms";
+    changelog = "https://gitlab.com/mdds/mdds/-/blob/${finalAttrs.version}/CHANGELOG";
+    license = licenses.mit;
+    maintainers = [ maintainers.AndersonTorres ];
+    platforms = platforms.unix;
+  };
+})
+# TODO: multi-output
diff --git a/nixpkgs/pkgs/development/libraries/mdk-sdk/default.nix b/nixpkgs/pkgs/development/libraries/mdk-sdk/default.nix
new file mode 100644
index 000000000000..0e935fe844b2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mdk-sdk/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, fetchurl, autoPatchelfHook
+, alsa-lib, gcc-unwrapped, libX11, libcxx, libdrm, libglvnd, libpulseaudio, libxcb, mesa, wayland, xz, zlib
+, libva, libvdpau, addOpenGLRunpath
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mdk-sdk";
+  version = "0.25.0";
+
+  src = fetchurl {
+    url = "https://github.com/wang-bin/mdk-sdk/releases/download/v${version}/mdk-sdk-linux-x64.tar.xz";
+    hash = "sha256-0m0Rg5Gv7o748iXqHafHvHYX5jHjjnmYE09TbG4PNNY=";
+  };
+
+  nativeBuildInputs = [ autoPatchelfHook ];
+
+  buildInputs = [
+    alsa-lib gcc-unwrapped libX11 libcxx libdrm libglvnd libpulseaudio libxcb mesa wayland xz zlib
+  ];
+
+  appendRunpaths = lib.makeLibraryPath [
+    libva libvdpau addOpenGLRunpath.driverLink
+  ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/lib
+    cp -r include $out
+    cp -d lib/amd64/libmdk* $out/lib
+    ln -s . $out/lib/amd64
+    cp -r lib/cmake $out/lib
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "multimedia development kit";
+    homepage = "https://github.com/wang-bin/mdk-sdk";
+    license = licenses.unfree;
+    maintainers = with maintainers; [ orivej ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/medfile/default.nix b/nixpkgs/pkgs/development/libraries/medfile/default.nix
new file mode 100644
index 000000000000..9593781f2270
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/medfile/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl, cmake, hdf5 }:
+
+stdenv.mkDerivation rec {
+  pname = "medfile";
+  version = "4.1.1";
+
+  src = fetchurl {
+    url = "http://files.salome-platform.org/Salome/other/med-${version}.tar.gz";
+    sha256 = "sha256-3CtdVOvwZm4/8ul0BB0qsNqQYGEyNTcCOrFl1XM4ndA=";
+  };
+
+  patches = [
+    ./hdf5-1.14.patch
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ hdf5 ];
+
+  checkPhase = "make test";
+
+  postInstall = "rm -r $out/bin/testc";
+
+  meta = with lib; {
+    description = "Library to read and write MED files";
+    homepage = "http://salome-platform.org/";
+    platforms = platforms.linux;
+    license = licenses.lgpl3Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/medfile/hdf5-1.14.patch b/nixpkgs/pkgs/development/libraries/medfile/hdf5-1.14.patch
new file mode 100644
index 000000000000..294e87c023a7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/medfile/hdf5-1.14.patch
@@ -0,0 +1,86 @@
+--- a/config/cmake_files/medMacros.cmake
++++ b/config/cmake_files/medMacros.cmake
+@@ -447,7 +447,7 @@ MACRO(MED_FIND_HDF5)
+     ##
+     ## Requires 1.10.x version
+     ##
+-    IF (NOT HDF_VERSION_MAJOR_REF EQUAL 1 OR NOT HDF_VERSION_MINOR_REF EQUAL 10 OR NOT HDF_VERSION_RELEASE_REF GREATER 1)
++    IF (HDF5_VERSION VERSION_LESS 1.10.2)
+         MESSAGE(FATAL_ERROR "HDF5 version is ${HDF_VERSION_REF}. Only versions >= 1.10.2 are supported.")
+     ENDIF()
+     ##
+--- a/src/ci/MEDfileCompatibility.c
++++ b/src/ci/MEDfileCompatibility.c
+@@ -71,7 +71,7 @@ MEDfileCompatibility(const char* const filename,
+   _hversionMMR=10000*_hmajeur+100*_hmineur+_hrelease;
+   /* ISCRUTE(_hversionMMR); */
+   /* ISCRUTE(HDF_VERSION_NUM_REF); */
+-  if ( (_hversionMMR >= HDF_VERSION_NUM_REF) && (_hmineur == HDF_VERSION_MINOR_REF) ) *hdfok = MED_TRUE;
++  if ( ((_hversionMMR >= HDF_VERSION_NUM_REF) && (_hmineur == HDF_VERSION_MINOR_REF)) || _hversionMMR > HDF_VERSION_NUM_REF ) *hdfok = MED_TRUE;
+ 
+   /* TODO : Vérifier si la version mineure HDF du fichier est supérieure
+      à la version mineure de la bibliothèque HDF utilisée :
+@@ -113,7 +113,7 @@ MEDfileCompatibility(const char* const filename,
+ #if MED_NUM_MAJEUR != 4
+ #error "Don't forget to update the test version here when you change the major version of the library !"
+ #endif
+-#if H5_VERS_MINOR > 10
++#if H5_VERS_MINOR > 14
+ #error "Don't forget to check the compatibility version of the library, depending on the internal hdf model choice !"
+ #error "Cf. _MEDfileCreate ..."
+ #endif
+--- a/src/hdfi/_MEDfileCreate.c
++++ b/src/hdfi/_MEDfileCreate.c
+@@ -159,7 +159,7 @@ med_idt _MEDfileCreate(const char * const filename, const med_access_mode access
+    * En HDF5-1.10.0p1 cela n'a aucun effet ! 
+    * Un test autoconf permet de fixer un intervalle de version HDF à MED.
+    */
+-#if H5_VERS_MINOR > 10
++#if H5_VERS_MINOR > 14
+ #error "Don't forget to change the compatibility version of the library !"
+ #endif
+    
+--- a/src/hdfi/_MEDfileOpen.c
++++ b/src/hdfi/_MEDfileOpen.c
+@@ -72,7 +72,7 @@ med_idt _MEDfileOpen(const char * const filename,const med_access_mode accessmod
+ 
+    •   The creation order tracking property, H5P_CRT_ORDER_TRACKED, has been set in the group creation property list (see H5Pset_link_creation_order). 
+   */
+-#if H5_VERS_MINOR > 10
++#if H5_VERS_MINOR > 14
+ #error "Don't forget to change the compatibility version of the library !"
+ #endif
+ /* L'avantage de bloquer le modèle interne HDF5 
+--- a/src/hdfi/_MEDmemFileOpen.c
++++ b/src/hdfi/_MEDmemFileOpen.c
+@@ -434,7 +434,7 @@ med_idt _MEDmemFileOpen(const char * const filename, med_memfile * const memfile
+     goto ERROR;
+   }
+ 
+-#if H5_VERS_MINOR > 10
++#if H5_VERS_MINOR > 14
+ #error "Don't forget to change the compatibility version of the library !"
+ #endif
+   if ( H5Pset_libver_bounds( _fapl, H5F_LIBVER_18, H5F_LIBVER_18) ) {
+--- a/src/hdfi/_MEDparFileCreate.c
++++ b/src/hdfi/_MEDparFileCreate.c
+@@ -64,7 +64,7 @@ med_idt _MEDparFileCreate(const char * const filename, const med_access_mode acc
+    * En HDF5-1.10.0p1 cela n'a aucun effet ! 
+    * Un test autoconf permet de fixer un intervalle de version HDF à MED.
+    */
+-#if H5_VERS_MINOR > 10
++#if H5_VERS_MINOR > 14
+ #error "Don't forget to change the compatibility version of the library !"
+ #endif
+    
+--- a/src/hdfi/_MEDparFileOpen.c
++++ b/src/hdfi/_MEDparFileOpen.c
+@@ -55,7 +55,7 @@ med_idt _MEDparFileOpen(const char * const filename,const med_access_mode access
+     MED_ERR_(_fid,MED_ERR_INIT,MED_ERR_PROPERTY,MED_ERR_PARALLEL_MSG);
+     goto ERROR;
+   }
+-#if H5_VERS_MINOR > 10
++#if H5_VERS_MINOR > 14
+ #error "Don't forget to change the compatibility version of the library !"
+ #endif
+   if ( H5Pset_libver_bounds( _fapl, H5F_LIBVER_18, H5F_LIBVER_18 ) ) {
diff --git a/nixpkgs/pkgs/development/libraries/mediastreamer/default.nix b/nixpkgs/pkgs/development/libraries/mediastreamer/default.nix
new file mode 100644
index 000000000000..f1c109b244b3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mediastreamer/default.nix
@@ -0,0 +1,95 @@
+{ bctoolbox
+, bzrtp
+, cmake
+, fetchFromGitLab
+, ffmpeg_4
+, glew
+, gsm
+, lib
+, libX11
+, libXext
+, libopus
+, libpulseaudio
+, libv4l
+, libvpx
+, ortp
+, python3
+, qtbase
+, qtdeclarative
+, speex
+, srtp
+, stdenv
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mediastreamer2";
+  version = "5.2.111";
+
+  dontWrapQtApps = true;
+
+  src = fetchFromGitLab {
+    domain = "gitlab.linphone.org";
+    owner = "public";
+    group = "BC";
+    repo = pname;
+    rev = version;
+    hash = "sha256-Le52tsyzOpepmvb+GOGCPwwTriPUjhYpa6GM+y/6USA=";
+  };
+
+  patches = [
+    # Plugins directory is normally fixed during compile time. This patch makes
+    # it possible to set the plugins directory run time with an environment
+    # variable MEDIASTREAMER_PLUGINS_DIR. This makes it possible to construct a
+    # plugin directory with desired plugins and wrap executables so that the
+    # environment variable points to that directory.
+    ./plugins_dir.patch
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    python3
+    qtbase
+    qtdeclarative
+  ];
+
+  propagatedBuildInputs = [
+    # Made by BC
+    bctoolbox
+    bzrtp
+    ortp
+
+    ffmpeg_4
+    glew
+    libX11
+    libXext
+    libpulseaudio
+    libv4l
+    speex
+    srtp
+
+    # Optional
+    gsm  # GSM audio codec
+    libopus  # Opus audio codec
+    libvpx  # VP8 video codec
+  ];
+
+  strictDeps = true;
+
+  cmakeFlags = [
+    "-DENABLE_STATIC=NO" # Do not build static libraries
+    "-DENABLE_QT_GL=ON" # Build necessary MSQOGL plugin for Linphone desktop
+    "-DCMAKE_C_FLAGS=-DGIT_VERSION=\"v${version}\""
+    "-DENABLE_STRICT=NO" # Disable -Werror
+    "-DENABLE_UNIT_TESTS=NO" # Do not build test executables
+  ];
+
+  NIX_LDFLAGS = "-lXext";
+
+  meta = with lib; {
+    description = "A powerful and lightweight streaming engine specialized for voice/video telephony applications. Part of the Linphone project";
+    homepage = "https://www.linphone.org/technical-corner/mediastreamer2";
+    license = licenses.gpl3Only;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ jluttine ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mediastreamer/msopenh264.nix b/nixpkgs/pkgs/development/libraries/mediastreamer/msopenh264.nix
new file mode 100644
index 000000000000..83a96175cba5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mediastreamer/msopenh264.nix
@@ -0,0 +1,48 @@
+{ autoreconfHook
+, cmake
+, fetchFromGitLab
+, fetchpatch
+, mediastreamer
+, openh264
+, pkg-config
+, lib
+, stdenv
+}:
+
+stdenv.mkDerivation rec {
+  pname = "msopenh264";
+  version = "linphone-4.4.1";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.linphone.org";
+    owner = "public";
+    group = "BC";
+    repo = pname;
+    rev = "5603a432be2ed10f5d5a5ce068ef83ab2a996d6b";
+    sha256 = "sha256-AqZ7tsNZw2Djgyo1JBJbT/c3eQVyEn6r3CT6DQLD/B8=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ mediastreamer openh264 ];
+
+  # Do not build static libraries
+  cmakeFlags = [
+    "-DENABLE_STATIC=NO"
+    "-DCMAKE_SKIP_INSTALL_RPATH=ON"
+  ];
+
+  # CMAKE_INSTALL_PREFIX has no effect so let's install manually. See:
+  # https://gitlab.linphone.org/BC/public/msopenh264/issues/1
+  installPhase = ''
+    mkdir -p $out/lib/mediastreamer/plugins
+    cp src/libmsopenh264.so $out/lib/mediastreamer/plugins/
+  '';
+
+  meta = with lib; {
+    description = "H.264 encoder/decoder plugin for mediastreamer2. Part of the Linphone project.";
+    homepage = "https://www.linphone.org/technical-corner/mediastreamer2";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ jluttine ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mediastreamer/plugins_dir.patch b/nixpkgs/pkgs/development/libraries/mediastreamer/plugins_dir.patch
new file mode 100644
index 000000000000..43e398aafee4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mediastreamer/plugins_dir.patch
@@ -0,0 +1,18 @@
+diff --git a/src/base/msfactory.c b/src/base/msfactory.c
+index 14f868e3..2e3445a1 100644
+--- a/src/base/msfactory.c
++++ b/src/base/msfactory.c
+@@ -770,7 +770,12 @@ void ms_factory_uninit_plugins(MSFactory *factory){
+ }
+ 
+ void ms_factory_init_plugins(MSFactory *obj) {
+-	if (obj->plugins_dir == NULL) {
++	char *package_plugins_dir;
++	// Force plugin dir from environment variable if set
++	package_plugins_dir = getenv("MEDIASTREAMER_PLUGINS_DIR");
++	if (package_plugins_dir != NULL) {
++		ms_factory_set_plugins_dir(obj, package_plugins_dir);
++	} else if (obj->plugins_dir == NULL) {
+ #ifdef __APPLE__
+ 	char *dir = getPluginsDir();
+ 	if (dir != NULL) {
diff --git a/nixpkgs/pkgs/development/libraries/memorymapping/default.nix b/nixpkgs/pkgs/development/libraries/memorymapping/default.nix
new file mode 100644
index 000000000000..91af205f0320
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/memorymapping/default.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation {
+  pname = "memorymapping";
+  version = "unstable-2014-02-20";
+
+  src = fetchFromGitHub {
+    owner = "NimbusKit";
+    repo = "memorymapping";
+    rev = "fc285afe13cb9d56a40c647b8ed6d6bd40636af7";
+    sha256 = "sha256-9u/QvK9TDsKxcubINH2OAbx5fXXkKF0+YT7LoLDaF0M=";
+  };
+
+  dontConfigure = true;
+
+  buildPhase = ''
+    runHook preBuild
+
+    $CC -c src/fmemopen.c
+    $AR rcs libmemorymapping.a fmemopen.o
+    sed -e '1i#include <stdio.h>' -i src/fmemopen.h
+
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    install -D libmemorymapping.a "$out"/lib/libmemorymapping.a
+    install -D src/fmemopen.h "$out"/include/fmemopen.h
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "https://nimbuskit.github.io/memorymapping/";
+    description = "fmemopen for Mac OS and iOS";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ veprbl ];
+    # Uses BSD-style funopen() to implement glibc-style fmemopen().
+    # Add more BSDs if you need to.
+    platforms = platforms.darwin;
+    broken = stdenv.isAarch64;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/memorymapping/setup-hook.sh b/nixpkgs/pkgs/development/libraries/memorymapping/setup-hook.sh
new file mode 100644
index 000000000000..5ee3470fe370
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/memorymapping/setup-hook.sh
@@ -0,0 +1,6 @@
+useMemorymapping () {
+  export NIX_CFLAGS_COMPILE="${NIX_CFLAGS_COMPILE-}${NIX_CFLAGS_COMPILE:+ }-include fmemopen.h";
+  export NIX_LDFLAGS="${NIX_LDFLAGS-}${NIX_LDFLAGS:+ }-lmemorymapping";
+}
+
+postHooks+=(useMemorymapping)
diff --git a/nixpkgs/pkgs/development/libraries/memstream/default.nix b/nixpkgs/pkgs/development/libraries/memstream/default.nix
new file mode 100644
index 000000000000..90505a56a931
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/memstream/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "memstream";
+  version = "0.1";
+
+  src = fetchurl {
+    url = "https://piumarta.com/software/memstream/memstream-${version}.tar.gz";
+    sha256 = "0kvdb897g7nyviaz72arbqijk2g2wa61cmi3l5yh48rzr49r3a3a";
+  };
+
+  dontConfigure = true;
+
+  postBuild = ''
+    $AR rcs libmemstream.a memstream.o
+  '';
+
+  doCheck = true;
+  checkPhase = ''
+    runHook preCheck
+
+    ./test | grep "This is a test of memstream"
+
+    runHook postCheck
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    install -D libmemstream.a "$out"/lib/libmemstream.a
+    install -D memstream.h "$out"/include/memstream.h
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.piumarta.com/software/memstream/";
+    description = "memstream.c is an implementation of the POSIX function open_memstream() for BSD and BSD-like operating systems";
+    license = licenses.mit;
+    maintainers = with maintainers; [ veprbl ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/memstream/setup-hook.sh b/nixpkgs/pkgs/development/libraries/memstream/setup-hook.sh
new file mode 100644
index 000000000000..09aabe748841
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/memstream/setup-hook.sh
@@ -0,0 +1,6 @@
+useMemstream () {
+  export NIX_CFLAGS_COMPILE="${NIX_CFLAGS_COMPILE-}${NIX_CFLAGS_COMPILE:+ }-include memstream.h";
+  export NIX_LDFLAGS="${NIX_LDFLAGS-}${NIX_LDFLAGS:+ }-lmemstream";
+}
+
+postHooks+=(useMemstream)
diff --git a/nixpkgs/pkgs/development/libraries/menu-cache/default.nix b/nixpkgs/pkgs/development/libraries/menu-cache/default.nix
new file mode 100644
index 000000000000..e05d387846a6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/menu-cache/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchurl, fetchpatch, glib, pkg-config, libfm-extra }:
+
+stdenv.mkDerivation rec {
+  pname = "menu-cache";
+  version = "1.1.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/lxde/menu-cache-${version}.tar.xz";
+    sha256 = "1iry4zlpppww8qai2cw4zid4081hh7fz8nzsp5lqyffbkm2yn0pd";
+  };
+
+  patches = [
+    # Pull patch pending upstream inclusion for -fno-common toolchain support:
+    #   https://github.com/lxde/menu-cache/pull/19
+    (fetchpatch {
+      name = "fno-common.patch";
+      url = "https://github.com/lxde/menu-cache/commit/1ce739649b4d66339a03fc0ec9ee7a2f7c141780.patch";
+      sha256 = "08x3h0w2pl8ifj83v9jkf4j3zxcwsyzh251divlhhnwx0rw1pyn7";
+    })
+  ];
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ glib libfm-extra ];
+
+  meta = with lib; {
+    description = "Library to read freedesktop.org menu files";
+    homepage = "https://blog.lxde.org/tag/menu-cache/";
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.ttuegel ];
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mesa-glu/default.nix b/nixpkgs/pkgs/development/libraries/mesa-glu/default.nix
new file mode 100644
index 000000000000..bcff20f1847c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mesa-glu/default.nix
@@ -0,0 +1,50 @@
+{ lib, stdenv, fetchurl
+, meson, ninja
+, pkg-config, libGL, ApplicationServices
+, testers
+, gitUpdater
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "glu";
+  version = "9.0.3";
+
+  src = let
+    inherit (finalAttrs) pname version;
+  in fetchurl {
+    url = "https://mesa.freedesktop.org/archive/${pname}/${pname}-${version}.tar.xz";
+    hash = "sha256-vUP+EvN0sRkusV/iDkX/RWubwmq1fw7ukZ+Wyg+KMw8=";
+  };
+
+  nativeBuildInputs = [ meson ninja pkg-config ];
+  propagatedBuildInputs = [ libGL ]
+    ++ lib.optional stdenv.isDarwin ApplicationServices;
+
+  outputs = [ "out" "dev" ];
+
+  mesonFlags = lib.optionals stdenv.isDarwin [
+    "-Dgl_provider=gl" # glvnd is default
+  ];
+
+  enableParallelBuilding = true;
+
+  passthru = {
+    tests = {
+      pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+    };
+    updateScript = gitUpdater {
+      # No nicer place to find latest release.
+      url = "https://gitlab.freedesktop.org/mesa/glu";
+    rev-prefix = "glu-";
+    };
+  };
+
+  meta = {
+    description = "OpenGL utility library";
+    homepage = "https://cgit.freedesktop.org/mesa/glu/";
+    license = lib.licenses.sgi-b-20;
+    pkgConfigModules = [ "glu" ];
+    platforms = lib.platforms.unix;
+    broken = stdenv.hostPlatform.isAndroid;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/mesa/backports/0001-dri-added-build-dependencies-for-systems-using-non-s.patch b/nixpkgs/pkgs/development/libraries/mesa/backports/0001-dri-added-build-dependencies-for-systems-using-non-s.patch
new file mode 100644
index 000000000000..c0b239c92598
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mesa/backports/0001-dri-added-build-dependencies-for-systems-using-non-s.patch
@@ -0,0 +1,56 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: "duncan.hopkins" <duncan.hopkins@foundry.com>
+Date: Tue, 17 Oct 2023 09:34:31 +0100
+Subject: [PATCH] dri: added build dependencies for systems using non-standard
+ prefixed X11 libs.
+
+To get MacOS to build, some extra dependencies need to be added to a couple of build targets.
+This mainly shows up when not installing the dependencies in the default prefix locations.
+On MacOS, this happens when using a custom build of brew to install the dependencies to 'odd' locations.
+
+Reviewed-by: Adam Jackson <ajax@redhat.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25992>
+---
+ src/gallium/targets/dri/meson.build | 2 +-
+ src/glx/meson.build                 | 2 +-
+ src/loader/meson.build              | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/gallium/targets/dri/meson.build b/src/gallium/targets/dri/meson.build
+index 66619bba0db..6d3ef197e74 100644
+--- a/src/gallium/targets/dri/meson.build
++++ b/src/gallium/targets/dri/meson.build
+@@ -49,7 +49,7 @@ libgallium_dri = shared_library(
+   link_depends : gallium_dri_link_depends,
+   link_with : [
+     libdri, libmesa, libgalliumvl,
+-    libgallium, libglapi, libpipe_loader_static, libws_null, libwsw, libswdri,
++    libgallium, libglapi, libloader, libpipe_loader_static, libws_null, libwsw, libswdri,
+     libswkmsdri,
+   ],
+   dependencies : [
+diff --git a/src/glx/meson.build b/src/glx/meson.build
+index 7ec3e3e0d88..1a5e9833956 100644
+--- a/src/glx/meson.build
++++ b/src/glx/meson.build
+@@ -136,7 +136,7 @@ libglx = static_library(
+   ],
+   dependencies : [
+     idep_mesautil, idep_xmlconfig,
+-    dep_libdrm, dep_dri2proto, dep_glproto, dep_x11, dep_glvnd, dep_xxf86vm, dep_xshmfence
++    dep_libdrm, dep_dri2proto, dep_glproto, dep_x11, dep_xext, dep_glvnd, dep_xxf86vm, dep_xshmfence
+   ],
+ )
+ 
+diff --git a/src/loader/meson.build b/src/loader/meson.build
+index 35f9991ba2f..043cc852112 100644
+--- a/src/loader/meson.build
++++ b/src/loader/meson.build
+@@ -47,6 +47,6 @@ libloader = static_library(
+   c_args : loader_c_args,
+   gnu_symbol_visibility : 'hidden',
+   include_directories : [inc_include, inc_src, inc_util],
+-  dependencies : [dep_libdrm, dep_thread, dep_xcb_xrandr],
++  dependencies : [dep_libdrm, dep_thread, dep_xcb, dep_xcb_xrandr],
+   build_by_default : false,
+ )
diff --git a/nixpkgs/pkgs/development/libraries/mesa/backports/0002-util-Update-util-libdrm.h-stubs-to-allow-loader.c-to.patch b/nixpkgs/pkgs/development/libraries/mesa/backports/0002-util-Update-util-libdrm.h-stubs-to-allow-loader.c-to.patch
new file mode 100644
index 000000000000..5a48ace8fbbc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mesa/backports/0002-util-Update-util-libdrm.h-stubs-to-allow-loader.c-to.patch
@@ -0,0 +1,103 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: "duncan.hopkins" <duncan.hopkins@foundry.com>
+Date: Tue, 17 Oct 2023 14:36:39 +0100
+Subject: [PATCH] util: Update util/libdrm.h stubs to allow loader.c to compile
+ on MacOS.
+
+MacOS does not have the libdrm libraries so is missing xf86drm.h.
+util/libdrm.h already has a collection of stubs for systems that do not support the libraries.
+
+A compile on MacOS will fail with the source that uses newer drm functions and structures.
+Update adds in missing items that MacOS code needs to compile and run.
+New code is copied from the public repository: https://gitlab.freedesktop.org/mesa/drm/-/blob/main/xf86drm.h
+
+Reviewed-by: Adam Jackson <ajax@redhat.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25992>
+---
+ src/util/libdrm.h | 57 +++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 57 insertions(+)
+
+diff --git a/src/util/libdrm.h b/src/util/libdrm.h
+index cc153cf88ab..e3af494b8d1 100644
+--- a/src/util/libdrm.h
++++ b/src/util/libdrm.h
+@@ -44,22 +44,79 @@
+ #define DRM_BUS_PLATFORM  2
+ #define DRM_BUS_HOST1X    3
+ 
++typedef struct _drmPciDeviceInfo {
++    uint16_t vendor_id;
++    uint16_t device_id;
++    uint16_t subvendor_id;
++    uint16_t subdevice_id;
++    uint8_t revision_id;
++} drmPciDeviceInfo, *drmPciDeviceInfoPtr;
++
++#define DRM_PLATFORM_DEVICE_NAME_LEN 512
++
++typedef struct _drmPlatformBusInfo {
++    char fullname[DRM_PLATFORM_DEVICE_NAME_LEN];
++} drmPlatformBusInfo, *drmPlatformBusInfoPtr;
++
++typedef struct _drmPlatformDeviceInfo {
++    char **compatible; /* NULL terminated list of compatible strings */
++} drmPlatformDeviceInfo, *drmPlatformDeviceInfoPtr;
++
++#define DRM_HOST1X_DEVICE_NAME_LEN 512
++
++typedef struct _drmHost1xBusInfo {
++    char fullname[DRM_HOST1X_DEVICE_NAME_LEN];
++} drmHost1xBusInfo, *drmHost1xBusInfoPtr;
++
++typedef struct _drmPciBusInfo {
++   uint16_t domain;
++   uint8_t bus;
++   uint8_t dev;
++   uint8_t func;
++} drmPciBusInfo, *drmPciBusInfoPtr;
++
+ typedef struct _drmDevice {
+     char **nodes; /* DRM_NODE_MAX sized array */
+     int available_nodes; /* DRM_NODE_* bitmask */
+     int bustype;
++    union {
++       drmPciBusInfoPtr pci;
++       drmPlatformBusInfoPtr platform;
++       drmHost1xBusInfoPtr host1x;
++    } businfo;
++    union {
++        drmPciDeviceInfoPtr pci;
++    } deviceinfo;
+     /* ... */
+ } drmDevice, *drmDevicePtr;
+ 
++static inline int
++drmGetDevice2(int fd, uint32_t flags, drmDevicePtr *device)
++{
++   return -ENOENT;
++}
++
+ static inline int
+ drmGetDevices2(uint32_t flags, drmDevicePtr devices[], int max_devices)
+ {
+    return -ENOENT;
+ }
+ 
++static inline int
++drmGetDeviceFromDevId(dev_t dev_id, uint32_t flags, drmDevicePtr *device)
++{
++   return -ENOENT;
++}
++
++static inline void
++drmFreeDevice(drmDevicePtr *device) {}
++
+ static inline void
+ drmFreeDevices(drmDevicePtr devices[], int count) {}
+ 
++static inline char*
++drmGetDeviceNameFromFd2(int fd) { return NULL;}
++
+ typedef struct _drmVersion {
+     int     version_major;        /**< Major version */
+     int     version_minor;        /**< Minor version */
diff --git a/nixpkgs/pkgs/development/libraries/mesa/backports/0003-glx-fix-automatic-zink-fallback-loading-between-hw-a.patch b/nixpkgs/pkgs/development/libraries/mesa/backports/0003-glx-fix-automatic-zink-fallback-loading-between-hw-a.patch
new file mode 100644
index 000000000000..c7bde6411d8e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mesa/backports/0003-glx-fix-automatic-zink-fallback-loading-between-hw-a.patch
@@ -0,0 +1,53 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: "duncan.hopkins" <duncan.hopkins@foundry.com>
+Date: Wed, 1 Nov 2023 11:31:13 +0000
+Subject: [PATCH] glx: fix automatic zink fallback loading between hw and sw
+ drivers on MacOS
+
+The combination of defines used when compile the code on MacOS is hiding variables.
+Patch allows basic MacOS build to compile and run.
+
+Reviewed-by: Adam Jackson <ajax@redhat.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25992>
+---
+ src/glx/glxext.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/src/glx/glxext.c b/src/glx/glxext.c
+index 7712e54c1d6..454f2c36a77 100644
+--- a/src/glx/glxext.c
++++ b/src/glx/glxext.c
+@@ -878,12 +878,16 @@ __glXInitialize(Display * dpy)
+ 
+    dpyPriv->glXDrawHash = __glxHashCreate();
+ 
++   Bool zink = False;
++   Bool try_zink = False;
++
+ #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
+    Bool glx_direct = !debug_get_bool_option("LIBGL_ALWAYS_INDIRECT", false);
+    Bool glx_accel = !debug_get_bool_option("LIBGL_ALWAYS_SOFTWARE", false);
+    const char *env = getenv("MESA_LOADER_DRIVER_OVERRIDE");
+-   Bool zink = env && !strcmp(env, "zink");
+-   Bool try_zink = False;
++
++   zink = env && !strcmp(env, "zink");
++   try_zink = False;
+ 
+    dpyPriv->drawHash = __glxHashCreate();
+ 
+@@ -928,12 +932,14 @@ __glXInitialize(Display * dpy)
+ 
+    if (!AllocAndFetchScreenConfigs(dpy, dpyPriv, zink | try_zink)) {
+       Bool fail = True;
++#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
+       if (try_zink) {
+          free(dpyPriv->screens);
+          dpyPriv->driswDisplay->destroyDisplay(dpyPriv->driswDisplay);
+          dpyPriv->driswDisplay = driswCreateDisplay(dpy, false);
+          fail = !AllocAndFetchScreenConfigs(dpy, dpyPriv, False);
+       }
++#endif
+       if (fail) {
+          free(dpyPriv);
+          return NULL;
diff --git a/nixpkgs/pkgs/development/libraries/mesa/default.nix b/nixpkgs/pkgs/development/libraries/mesa/default.nix
new file mode 100644
index 000000000000..38b73f56cab6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mesa/default.nix
@@ -0,0 +1,395 @@
+{ stdenv, lib, fetchurl, fetchpatch, buildPackages
+, meson, pkg-config, ninja
+, intltool, bison, flex, file, python3Packages, wayland-scanner
+, expat, libdrm, xorg, wayland, wayland-protocols, openssl
+, llvmPackages, libffi, libomxil-bellagio, libva-minimal
+, libelf, libvdpau
+, libglvnd, libunwind, lm_sensors
+, vulkan-loader, glslang
+, galliumDrivers ?
+  if stdenv.isLinux then
+    [
+      "d3d12" # WSL emulated GPU (aka Dozen)
+      "nouveau" # Nvidia
+      "radeonsi" # new AMD (GCN+)
+      "r300" # very old AMD
+      "r600" # less old AMD
+      "swrast" # software renderer (aka LLVMPipe)
+      "svga" # VMWare virtualized GPU
+      "virgl" # QEMU virtualized GPU (aka VirGL)
+      "zink" # generic OpenGL over Vulkan, experimental
+    ] ++ lib.optionals (stdenv.isAarch64 || stdenv.isAarch32) [
+      "etnaviv" # Vivante GPU designs (mostly NXP/Marvell SoCs)
+      "freedreno" # Qualcomm Adreno (all Qualcomm SoCs)
+      "lima" # ARM Mali 4xx
+      "panfrost" # ARM Mali Midgard and up (T/G series)
+      "vc4" # Broadcom VC4 (Raspberry Pi 0-3)
+    ] ++ lib.optionals stdenv.isAarch64 [
+      "tegra" # Nvidia Tegra SoCs
+      "v3d" # Broadcom VC5 (Raspberry Pi 4)
+    ] ++ lib.optionals stdenv.hostPlatform.isx86 [
+      "iris" # new Intel, could work on non-x86 with PCIe cards, but doesn't build as of 22.3.4
+      "crocus" # Intel legacy, x86 only
+      "i915" # Intel extra legacy, x86 only
+    ]
+  else [ "auto" ]
+, vulkanDrivers ?
+  if stdenv.isLinux then
+    [
+      "amd" # AMD (aka RADV)
+      "microsoft-experimental" # WSL virtualized GPU (aka DZN/Dozen)
+      "swrast" # software renderer (aka Lavapipe)
+    ]
+    ++ lib.optionals (stdenv.hostPlatform.isAarch -> lib.versionAtLeast stdenv.hostPlatform.parsed.cpu.version "6") [
+      # QEMU virtualized GPU (aka VirGL)
+      # Requires ATOMIC_INT_LOCK_FREE == 2.
+      "virtio"
+    ]
+    ++ lib.optionals stdenv.isAarch64 [
+      "broadcom" # Broadcom VC5 (Raspberry Pi 4, aka V3D)
+      "freedreno" # Qualcomm Adreno (all Qualcomm SoCs)
+      "imagination-experimental" # PowerVR Rogue (currently N/A)
+      "panfrost" # ARM Mali Midgard and up (T/G series)
+    ]
+    ++ lib.optionals stdenv.hostPlatform.isx86 [
+      "intel" # Intel (aka ANV), could work on non-x86 with PCIe cards, but doesn't build
+      "intel_hasvk" # Intel Haswell/Broadwell, "legacy" Vulkan driver (https://www.phoronix.com/news/Intel-HasVK-Drop-Dead-Code)
+    ]
+  else [ "auto" ]
+, eglPlatforms ? [ "x11" ] ++ lib.optionals stdenv.isLinux [ "wayland" ]
+, vulkanLayers ? lib.optionals (!stdenv.isDarwin) [ "device-select" "overlay" "intel-nullhw" ] # No Vulkan support on Darwin
+, OpenGL, Xplugin
+, withValgrind ? lib.meta.availableOn stdenv.hostPlatform valgrind-light && !valgrind-light.meta.broken, valgrind-light
+, withLibunwind ? lib.meta.availableOn stdenv.hostPlatform libunwind
+, enableGalliumNine ? stdenv.isLinux
+, enableOSMesa ? stdenv.isLinux
+, enableOpenCL ? stdenv.isLinux && stdenv.isx86_64
+, enablePatentEncumberedCodecs ? true
+, jdupes
+, rust-bindgen
+, rustc
+, spirv-llvm-translator
+, zstd
+, directx-headers
+, udev
+}:
+
+/** Packaging design:
+  - The basic mesa ($out) contains headers and libraries (GLU is in libGLU now).
+    This or the mesa attribute (which also contains GLU) are small (~ 2 MB, mostly headers)
+    and are designed to be the buildInput of other packages.
+  - DRI drivers are compiled into $drivers output, which is much bigger and
+    depends on LLVM. These should be searched at runtime in
+    "/run/opengl-driver{,-32}/lib/*" and so are kind-of impure (given by NixOS).
+    (I suppose on non-NixOS one would create the appropriate symlinks from there.)
+  - libOSMesa is in $osmesa (~4 MB)
+*/
+
+let
+  version = "23.3.5";
+  hash = "sha256-acyxJ4ZB/1utccoPhmGIrrGpKq3E27nTX1CuvsW4tQ8=";
+
+  # Release calendar: https://www.mesa3d.org/release-calendar.html
+  # Release frequency: https://www.mesa3d.org/releasing.html#schedule
+  branch = lib.versions.major version;
+
+  withLibdrm = lib.meta.availableOn stdenv.hostPlatform libdrm;
+
+  haveWayland = lib.elem "wayland" eglPlatforms;
+  haveZink = lib.elem "zink" galliumDrivers;
+  haveDozen = (lib.elem "d3d12" galliumDrivers) || (lib.elem "microsoft-experimental" vulkanDrivers);
+self = stdenv.mkDerivation {
+  pname = "mesa";
+  inherit version;
+
+  src = fetchurl {
+    urls = [
+      "https://archive.mesa3d.org/mesa-${version}.tar.xz"
+      "https://mesa.freedesktop.org/archive/mesa-${version}.tar.xz"
+      "ftp://ftp.freedesktop.org/pub/mesa/mesa-${version}.tar.xz"
+      "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"
+    ];
+    inherit hash;
+  };
+
+  # TODO:
+  #  revive ./dricore-gallium.patch when it gets ported (from Ubuntu), as it saved
+  #  ~35 MB in $drivers; watch https://launchpad.net/ubuntu/+source/mesa/+changelog
+  patches = [
+    # fixes pkgsMusl.mesa build
+    ./musl.patch
+
+    ./opencl.patch
+
+    # Backports to fix build
+    # FIXME: remove when applied upstream
+
+    # Fix build on macOS
+    ./backports/0001-dri-added-build-dependencies-for-systems-using-non-s.patch
+    ./backports/0002-util-Update-util-libdrm.h-stubs-to-allow-loader.c-to.patch
+    ./backports/0003-glx-fix-automatic-zink-fallback-loading-between-hw-a.patch
+  ];
+
+  postPatch = ''
+    patchShebangs .
+
+    # The drirc.d directory cannot be installed to $drivers as that would cause a cyclic dependency:
+    substituteInPlace src/util/xmlconfig.c --replace \
+      'DATADIR "/drirc.d"' '"${placeholder "out"}/share/drirc.d"'
+    substituteInPlace src/util/meson.build --replace \
+      "get_option('datadir')" "'${placeholder "out"}/share'"
+    substituteInPlace src/amd/vulkan/meson.build --replace \
+      "get_option('datadir')" "'${placeholder "out"}/share'"
+  '';
+
+  outputs = [ "out" "dev" "drivers" ]
+    ++ lib.optional enableOSMesa "osmesa"
+    ++ lib.optional stdenv.isLinux "driversdev"
+    ++ lib.optional enableOpenCL "opencl"
+    # the Dozen drivers depend on libspirv2dxil, but link it statically, and
+    # libspirv2dxil itself is pretty chonky, so relocate it to its own output
+    # in case anything wants to use it at some point
+    ++ lib.optional haveDozen "spirv2dxil";
+
+  # FIXME: this fixes rusticl/iris segfaulting on startup, _somehow_.
+  # Needs more investigating.
+  separateDebugInfo = true;
+
+  preConfigure = ''
+    PATH=${llvmPackages.libllvm.dev}/bin:$PATH
+  '';
+
+  # TODO: Figure out how to enable opencl without having a runtime dependency on clang
+  mesonFlags = [
+    "--sysconfdir=/etc"
+    "--datadir=${placeholder "drivers"}/share" # Vendor files
+
+    # Don't build in debug mode
+    # https://gitlab.freedesktop.org/mesa/mesa/blob/master/docs/meson.html#L327
+    "-Db_ndebug=true"
+
+    "-Ddri-search-path=${libglvnd.driverLink}/lib/dri"
+
+    "-Dplatforms=${lib.concatStringsSep "," eglPlatforms}"
+    "-Dgallium-drivers=${lib.concatStringsSep "," galliumDrivers}"
+    "-Dvulkan-drivers=${lib.concatStringsSep "," vulkanDrivers}"
+
+    "-Ddri-drivers-path=${placeholder "drivers"}/lib/dri"
+    "-Dvdpau-libs-path=${placeholder "drivers"}/lib/vdpau"
+    "-Domx-libs-path=${placeholder "drivers"}/lib/bellagio"
+    "-Dva-libs-path=${placeholder "drivers"}/lib/dri"
+    "-Dd3d-drivers-path=${placeholder "drivers"}/lib/d3d"
+
+    "-Dgallium-nine=${lib.boolToString enableGalliumNine}" # Direct3D in Wine
+    "-Dosmesa=${lib.boolToString enableOSMesa}" # used by wine
+    "-Dmicrosoft-clc=disabled" # Only relevant on Windows (OpenCL 1.2 API on top of D3D12)
+
+    # To enable non-mesa gbm backends to be found (e.g. Nvidia)
+    "-Dgbm-backends-path=${libglvnd.driverLink}/lib/gbm:${placeholder "out"}/lib/gbm"
+
+    # meson auto_features enables these features, but we do not want them
+    "-Dandroid-libbacktrace=disabled"
+
+  ] ++ lib.optionals stdenv.isLinux [
+    "-Dglvnd=true"
+
+    # Enable RT for Intel hardware
+    # https://gitlab.freedesktop.org/mesa/mesa/-/issues/9080
+    (lib.mesonEnable "intel-clc" (stdenv.buildPlatform == stdenv.hostPlatform))
+  ] ++ lib.optionals stdenv.isDarwin [
+    # Disable features that are explicitly unsupported on the platform
+    "-Dgbm=disabled"
+    "-Dxlib-lease=disabled"
+    "-Degl=disabled"
+    "-Dgallium-vdpau=disabled"
+    "-Dgallium-va=disabled"
+    "-Dgallium-xa=disabled"
+    "-Dlmsensors=disabled"
+  ] ++ lib.optionals enableOpenCL [
+    # Clover, old OpenCL frontend
+    "-Dgallium-opencl=icd"
+    "-Dopencl-spirv=true"
+
+    # Rusticl, new OpenCL frontend
+    "-Dgallium-rusticl=true" "-Drust_std=2021"
+    "-Dclang-libdir=${llvmPackages.clang-unwrapped.lib}/lib"
+  ]  ++ lib.optionals (!withValgrind) [
+    "-Dvalgrind=disabled"
+  ]  ++ lib.optionals (!withLibunwind) [
+    "-Dlibunwind=disabled"
+  ] ++ lib.optional enablePatentEncumberedCodecs
+    "-Dvideo-codecs=h264dec,h264enc,h265dec,h265enc,vc1dec"
+  ++ lib.optional (vulkanLayers != []) "-D vulkan-layers=${builtins.concatStringsSep "," vulkanLayers}";
+
+  buildInputs = with xorg; [
+    expat glslang llvmPackages.libllvm libglvnd xorgproto
+    libX11 libXext libxcb libXt libXfixes libxshmfence libXrandr
+    libffi libvdpau libelf libXvMC
+    libpthreadstubs openssl /*or another sha1 provider*/
+    zstd
+  ] ++ lib.optionals withLibunwind [
+    libunwind
+  ] ++ [
+    python3Packages.python # for shebang
+  ] ++ lib.optionals haveWayland [ wayland wayland-protocols ]
+    ++ lib.optionals stdenv.isLinux [ libomxil-bellagio libva-minimal udev lm_sensors ]
+    ++ lib.optionals enableOpenCL [ llvmPackages.libclc llvmPackages.clang llvmPackages.clang-unwrapped spirv-llvm-translator ]
+    ++ lib.optional withValgrind valgrind-light
+    ++ lib.optional haveZink vulkan-loader
+    ++ lib.optional haveDozen directx-headers;
+
+  depsBuildBuild = [ pkg-config ]
+    ++ lib.optional enableOpenCL buildPackages.stdenv.cc;
+
+  nativeBuildInputs = [
+    meson pkg-config ninja
+    intltool bison flex file
+    python3Packages.python python3Packages.mako python3Packages.ply
+    jdupes glslang
+  ] ++ lib.optionals enableOpenCL [ rust-bindgen rustc ]
+    ++ lib.optional haveWayland wayland-scanner;
+
+  propagatedBuildInputs = with xorg; [
+    libXdamage libXxf86vm
+  ] ++ lib.optional withLibdrm libdrm
+    ++ lib.optionals stdenv.isDarwin [ OpenGL Xplugin ];
+
+  doCheck = false;
+
+  postInstall = ''
+    # Some installs don't have any drivers so this directory is never created.
+    mkdir -p $drivers $osmesa
+  '' + lib.optionalString stdenv.isLinux ''
+    mkdir -p $drivers/lib
+
+    if [ -n "$(shopt -s nullglob; echo "$out/lib/libxatracker"*)" -o -n "$(shopt -s nullglob; echo "$out/lib/libvulkan_"*)" ]; then
+      # move gallium-related stuff to $drivers, so $out doesn't depend on LLVM
+      mv -t $drivers/lib       \
+        $out/lib/libpowervr_rogue* \
+        $out/lib/libxatracker* \
+        $out/lib/libvulkan_*
+    fi
+
+    if [ -n "$(shopt -s nullglob; echo "$out"/lib/lib*_mesa*)" ]; then
+      # Move other drivers to a separate output
+      mv -t $drivers/lib $out/lib/lib*_mesa*
+    fi
+
+    # Update search path used by glvnd
+    for js in $drivers/share/glvnd/egl_vendor.d/*.json; do
+      substituteInPlace "$js" --replace '"libEGL_' '"'"$drivers/lib/libEGL_"
+    done
+
+    # Update search path used by Vulkan (it's pointing to $out but
+    # drivers are in $drivers)
+    for js in $drivers/share/vulkan/icd.d/*.json; do
+      substituteInPlace "$js" --replace "$out" "$drivers"
+    done
+  '' + lib.optionalString enableOpenCL ''
+    # Move OpenCL stuff
+    mkdir -p $opencl/lib
+    mv -t "$opencl/lib/"     \
+      $out/lib/gallium-pipe   \
+      $out/lib/lib*OpenCL*
+
+    # We construct our own .icd files that contain absolute paths.
+    mkdir -p $opencl/etc/OpenCL/vendors/
+    echo $opencl/lib/libMesaOpenCL.so > $opencl/etc/OpenCL/vendors/mesa.icd
+    echo $opencl/lib/libRusticlOpenCL.so > $opencl/etc/OpenCL/vendors/rusticl.icd
+  '' + lib.optionalString enableOSMesa ''
+    # move libOSMesa to $osmesa, as it's relatively big
+    mkdir -p $osmesa/lib
+    mv -t $osmesa/lib/ $out/lib/libOSMesa*
+  '' + lib.optionalString (vulkanLayers != []) ''
+    mv -t $drivers/lib $out/lib/libVkLayer*
+    for js in $drivers/share/vulkan/{im,ex}plicit_layer.d/*.json; do
+      substituteInPlace "$js" --replace '"libVkLayer_' '"'"$drivers/lib/libVkLayer_"
+    done
+  '' + lib.optionalString haveDozen ''
+    mkdir -p $spirv2dxil/{bin,lib}
+    mv -t $spirv2dxil/lib $out/lib/libspirv_to_dxil*
+    mv -t $spirv2dxil/bin $out/bin/spirv2dxil
+  '';
+
+  postFixup = lib.optionalString stdenv.isLinux ''
+    # set the default search path for DRI drivers; used e.g. by X server
+    for pc in lib/pkgconfig/{dri,d3d}.pc; do
+      [ -f "$dev/$pc" ] && substituteInPlace "$dev/$pc" --replace "$drivers" "${libglvnd.driverLink}"
+    done
+
+    # remove pkgconfig files for GL/EGL; they are provided by libGL.
+    rm -f $dev/lib/pkgconfig/{gl,egl}.pc
+
+    # Move development files for libraries in $drivers to $driversdev
+    mkdir -p $driversdev/include
+    mv $dev/include/xa_* $dev/include/d3d* -t $driversdev/include || true
+    mkdir -p $driversdev/lib/pkgconfig
+    for pc in lib/pkgconfig/{xatracker,d3d}.pc; do
+      if [ -f "$dev/$pc" ]; then
+        substituteInPlace "$dev/$pc" --replace $out $drivers
+        mv $dev/$pc $driversdev/$pc
+      fi
+    done
+
+    # Don't depend on build python
+    patchShebangs --host --update $out/bin/*
+
+    # NAR doesn't support hard links, so convert them to symlinks to save space.
+    jdupes --hard-links --link-soft --recurse "$drivers"
+
+    # add RPATH so the drivers can find the moved libgallium and libdricore9
+    # moved here to avoid problems with stripping patchelfed files
+    for lib in $drivers/lib/*.so* $drivers/lib/*/*.so*; do
+      if [[ ! -L "$lib" ]]; then
+        patchelf --set-rpath "$(patchelf --print-rpath $lib):$drivers/lib" "$lib"
+      fi
+    done
+    # add RPATH here so Zink can find libvulkan.so
+    ${lib.optionalString haveZink ''
+      patchelf --add-rpath ${vulkan-loader}/lib $drivers/lib/dri/zink_dri.so
+    ''}
+  '';
+
+  env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ "-fno-common" ] ++ lib.optionals enableOpenCL [
+    "-UPIPE_SEARCH_DIR"
+    "-DPIPE_SEARCH_DIR=\"${placeholder "opencl"}/lib/gallium-pipe\""
+  ]);
+
+  passthru = {
+    inherit (libglvnd) driverLink;
+    inherit llvmPackages;
+
+    libdrm = if withLibdrm then libdrm else null;
+
+    tests = lib.optionalAttrs stdenv.isLinux {
+      devDoesNotDependOnLLVM = stdenv.mkDerivation {
+        name = "mesa-dev-does-not-depend-on-llvm";
+        buildCommand = ''
+          echo ${self.dev} >>$out
+        '';
+        disallowedRequisites = [ llvmPackages.llvm self.drivers ];
+      };
+    };
+  };
+
+  meta = with lib; {
+    description = "An open source 3D graphics library";
+    longDescription = ''
+      The Mesa project began as an open-source implementation of the OpenGL
+      specification - a system for rendering interactive 3D graphics. Over the
+      years the project has grown to implement more graphics APIs, including
+      OpenGL ES (versions 1, 2, 3), OpenCL, OpenMAX, VDPAU, VA API, XvMC, and
+      Vulkan.  A variety of device drivers allows the Mesa libraries to be used
+      in many different environments ranging from software emulation to
+      complete hardware acceleration for modern GPUs.
+    '';
+    homepage = "https://www.mesa3d.org/";
+    changelog = "https://www.mesa3d.org/relnotes/${version}.html";
+    license = licenses.mit; # X11 variant, in most files
+    platforms = platforms.mesaPlatforms;
+    maintainers = with maintainers; [ primeos vcunat ]; # Help is welcome :)
+  };
+};
+
+in self
diff --git a/nixpkgs/pkgs/development/libraries/mesa/musl.patch b/nixpkgs/pkgs/development/libraries/mesa/musl.patch
new file mode 100644
index 000000000000..687a159c1788
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mesa/musl.patch
@@ -0,0 +1,59 @@
+diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h
+index 06ca90564f0..bb244f8f358 100644
+--- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h
++++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h
+@@ -30,6 +30,7 @@
+ 
+ #include <amdgpu.h>
+ #include <pthread.h>
++#include <sys/types.h>
+ #include "util/list.h"
+ #include "util/rwlock.h"
+ #include "ac_gpu_info.h"
+diff --git a/src/gallium/drivers/freedreno/freedreno_util.h b/src/gallium/drivers/freedreno/freedreno_util.h
+index 22f99c41909..2f3195926be 100644
+--- a/src/gallium/drivers/freedreno/freedreno_util.h
++++ b/src/gallium/drivers/freedreno/freedreno_util.h
+@@ -108,6 +108,8 @@ extern bool fd_binning_enabled;
+ #include <sys/types.h>
+ #include <sys/syscall.h>
+ 
++#define gettid() ((pid_t)syscall(SYS_gettid))
++
+ #define DBG(fmt, ...)                                                          \
+    do {                                                                        \
+       if (FD_DBG(MSGS))                                                        \
+diff --git a/src/gallium/frontends/nine/nine_debug.c b/src/gallium/frontends/nine/nine_debug.c
+index f3a6a945025..f4a6c41a612 100644
+--- a/src/gallium/frontends/nine/nine_debug.c
++++ b/src/gallium/frontends/nine/nine_debug.c
+@@ -65,7 +65,7 @@ _nine_debug_printf( unsigned long flag,
+ {
+     static boolean first = TRUE;
+     static unsigned long dbg_flags = DBG_ERROR | DBG_WARN;
+-    unsigned long tid = 0;
++    pthread_t tid = 0;
+ 
+     if (first) {
+         first = FALSE;
+@@ -74,7 +74,7 @@ _nine_debug_printf( unsigned long flag,
+ 
+ #if defined(HAVE_PTHREAD)
+     if (dbg_flags & DBG_TID)
+-        tid = (unsigned long)pthread_self();
++        tid = pthread_self();
+ #endif
+ 
+     if (dbg_flags & flag) {
+diff --git a/src/util/rand_xor.c b/src/util/rand_xor.c
+index 81b64f1ea71..56ebd2eccdf 100644
+--- a/src/util/rand_xor.c
++++ b/src/util/rand_xor.c
+@@ -28,6 +28,7 @@
+ #if defined(HAVE_GETRANDOM)
+ #include <sys/random.h>
+ #endif
++#include <sys/types.h>         /* size_t, ssize_t */
+ #include <unistd.h>
+ #include <fcntl.h>
+ #endif
diff --git a/nixpkgs/pkgs/development/libraries/mesa/opencl.patch b/nixpkgs/pkgs/development/libraries/mesa/opencl.patch
new file mode 100644
index 000000000000..cd27f0a2e86f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mesa/opencl.patch
@@ -0,0 +1,66 @@
+diff --git a/meson.build b/meson.build
+index fbb0b29322d..b4825056449 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1805,7 +1805,7 @@ endif
+ 
+ dep_clang = null_dep
+ if with_clc
+-  llvm_libdir = dep_llvm.get_variable(cmake : 'LLVM_LIBRARY_DIR', configtool: 'libdir')
++  llvm_libdir = get_option('clang-libdir')
+ 
+   dep_clang = cpp.find_library('clang-cpp', dirs : llvm_libdir, required : false)
+ 
+diff --git a/meson_options.txt b/meson_options.txt
+index e885ba61a8a..591ed957c85 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -23,6 +23,12 @@ option(
+   description : 'the window system EGL assumes for EGL_DEFAULT_DISPLAY',
+ )
+ 
++option(
++  'clang-libdir',
++  type : 'string',
++  value : '',
++  description : 'Locations to search for clang libraries.'
++)
+ option(
+   'android-stub',
+   type : 'boolean',
+diff --git a/src/gallium/targets/opencl/meson.build b/src/gallium/targets/opencl/meson.build
+index 7c14135898e..74dc6850603 100644
+--- a/src/gallium/targets/opencl/meson.build
++++ b/src/gallium/targets/opencl/meson.build
+@@ -39,7 +39,8 @@ if dep_llvm.version().version_compare('>=10.0.0')
+   polly_isl_dep = cpp.find_library('PollyISL', dirs : llvm_libdir, required : false)
+ endif
+ 
+-dep_clang = cpp.find_library('clang-cpp', dirs : llvm_libdir, required : false)
++clang_libdir = get_option('clang-libdir')
++dep_clang = cpp.find_library('clang-cpp', dirs : clang_libdir, required : false)
+ 
+ # meson will return clang-cpp from system dirs if it's not found in llvm_libdir
+ linker_rpath_arg = '-Wl,--rpath=@0@'.format(llvm_libdir)
+@@ -123,7 +124,7 @@ if with_opencl_icd
+     configuration : _config,
+     input : 'mesa.icd.in',
+     output : 'mesa.icd',
+-    install : true,
++    install : false,
+     install_tag : 'runtime',
+     install_dir : join_paths(get_option('sysconfdir'), 'OpenCL', 'vendors'),
+   )
+diff --git a/src/gallium/targets/rusticl/meson.build b/src/gallium/targets/rusticl/meson.build
+index b2963fe6dfa..99d6d801b94 100644
+--- a/src/gallium/targets/rusticl/meson.build
++++ b/src/gallium/targets/rusticl/meson.build
+@@ -76,7 +76,7 @@ configure_file(
+   configuration : _config,
+   input : 'rusticl.icd.in',
+   output : 'rusticl.icd',
+-  install : true,
++  install : false,
+   install_tag : 'runtime',
+   install_dir : join_paths(get_option('sysconfdir'), 'OpenCL', 'vendors'),
+ )
diff --git a/nixpkgs/pkgs/development/libraries/mesa/stubs.nix b/nixpkgs/pkgs/development/libraries/mesa/stubs.nix
new file mode 100644
index 000000000000..773897548a42
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mesa/stubs.nix
@@ -0,0 +1,87 @@
+{ stdenv
+, libglvnd
+, mesa
+, OpenGL
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libGL";
+  inherit (if stdenv.hostPlatform.isDarwin then mesa else libglvnd) version;
+  outputs = [ "out" "dev" ];
+
+  # On macOS, libglvnd is not supported, so we just use what mesa
+  # build. We need to also include OpenGL.framework, and some
+  # extra tricks to go along with. We add mesa’s libGLX to support
+  # the X extensions to OpenGL.
+  buildCommand = if stdenv.hostPlatform.isDarwin then ''
+    mkdir -p $out/nix-support $dev
+    echo ${OpenGL} >> $out/nix-support/propagated-build-inputs
+    ln -s ${mesa.out}/lib $out/lib
+
+    mkdir -p $dev/lib/pkgconfig $dev/nix-support
+    echo "$out" > $dev/nix-support/propagated-build-inputs
+    ln -s ${mesa.dev}/include $dev/include
+
+    cat <<EOF >$dev/lib/pkgconfig/gl.pc
+  Name: gl
+  Description: gl library
+  Version: ${mesa.version}
+  Libs: -L${mesa.out}/lib -lGL
+  Cflags: -I${mesa.dev}/include
+  EOF
+
+    cat <<EOF >$dev/lib/pkgconfig/glesv1_cm.pc
+  Name: glesv1_cm
+  Description: glesv1_cm library
+  Version: ${mesa.version}
+  Libs: -L${mesa.out}/lib -lGLESv1_CM
+  Cflags: -I${mesa.dev}/include
+  EOF
+
+    cat <<EOF >$dev/lib/pkgconfig/glesv2.pc
+  Name: glesv2
+  Description: glesv2 library
+  Version: ${mesa.version}
+  Libs: -L${mesa.out}/lib -lGLESv2
+  Cflags: -I${mesa.dev}/include
+  EOF
+  ''
+
+  # Otherwise, setup gl stubs to use libglvnd.
+  else ''
+    mkdir -p $out/nix-support
+    ln -s ${libglvnd.out}/lib $out/lib
+
+    mkdir -p $dev/{,lib/pkgconfig,nix-support}
+    echo "$out ${libglvnd} ${libglvnd.dev}" > $dev/nix-support/propagated-build-inputs
+    ln -s ${libglvnd.dev}/include $dev/include
+
+    genPkgConfig() {
+      local name="$1"
+      local lib="$2"
+
+      cat <<EOF >$dev/lib/pkgconfig/$name.pc
+    Name: $name
+    Description: $lib library
+    Version: ${libglvnd.version}
+    Libs: -L${libglvnd.out}/lib -l$lib
+    Cflags: -I${libglvnd.dev}/include
+    EOF
+    }
+
+    genPkgConfig gl GL
+    genPkgConfig egl EGL
+    genPkgConfig glesv1_cm GLESv1_CM
+    genPkgConfig glesv2 GLESv2
+  '';
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = {
+    description = "Stub bindings using " + (if stdenv.hostPlatform.isDarwin then "mesa" else "libglvnd");
+    pkgConfigModules = [ "gl" "egl" "glesv1_cm" "glesv2" ];
+  } // {
+    inherit (if stdenv.hostPlatform.isDarwin then mesa.meta else libglvnd.meta) homepage license platforms;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/meshoptimizer/default.nix b/nixpkgs/pkgs/development/libraries/meshoptimizer/default.nix
new file mode 100644
index 000000000000..2c4617d15fc6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/meshoptimizer/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchFromGitHub, cmake, nix-update-script }:
+
+let
+  basis_universal = fetchFromGitHub {
+    owner = "zeux";
+    repo = "basis_universal";
+    rev = "8903f6d69849fd782b72a551a4dd04a264434e20";
+    hash = "sha256-o3dCxAAkpMoNkvkM7qD75cPn/obDc/fJ8u7KLPm1G6g=";
+  };
+in stdenv.mkDerivation rec {
+  pname = "meshoptimizer";
+  version = "0.20";
+  src = fetchFromGitHub {
+    owner = "zeux";
+    repo = "meshoptimizer";
+    rev = "v${version}";
+    hash = "sha256-QCxpM2g8WtYSZHkBzLTJNQ/oHb5j/n9rjaVmZJcCZIA=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  outputs = [ "bin" "dev" "out" ];
+
+  cmakeFlags = [
+    "-DMESHOPT_BUILD_GLTFPACK=ON"
+    "-DMESHOPT_BASISU_PATH=${basis_universal}"
+  ] ++ lib.optional (!stdenv.hostPlatform.isStatic)
+    "-DMESHOPT_BUILD_SHARED_LIBS:BOOL=ON";
+
+  passthru.updateScript = nix-update-script { };
+
+  meta = with lib; {
+    description = "Mesh optimization library that makes meshes smaller and faster to render";
+    homepage = "https://github.com/zeux/meshoptimizer";
+    license = licenses.mit;
+    maintainers = [ maintainers.lillycham ];
+    platforms = platforms.all;
+    mainProgram = "gltfpack";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/microsoft-gsl/default.nix b/nixpkgs/pkgs/development/libraries/microsoft-gsl/default.nix
new file mode 100644
index 000000000000..59df670e9ec5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/microsoft-gsl/default.nix
@@ -0,0 +1,50 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, gtest
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "microsoft-gsl";
+  version = "4.0.0";
+
+  src = fetchFromGitHub {
+    owner = "Microsoft";
+    repo = "GSL";
+    rev = "v${version}";
+    hash = "sha256-cXDFqt2KgMFGfdh6NGE+JmP4R0Wm9LNHM0eIblYe6zU=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ gtest ];
+
+  # error: unsafe buffer access
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-unsafe-buffer-usage";
+
+  patches = [
+    # nvcc doesn't recognize the "gsl" attribute namespace (microsoft/onnxruntime#13573)
+    # only affects nvcc
+    (fetchpatch {
+      url = "https://raw.githubusercontent.com/microsoft/onnxruntime/4bfa69def85476b33ccfaf68cf070f3fb65d39f7/cmake/patches/gsl/1064.patch";
+      hash = "sha256-0jESA+VENWQms9HGE0jRiZZuWLJehBlbArxSaQbYOrM=";
+    })
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "C++ Core Guideline support library";
+    longDescription = ''
+      The Guideline Support Library (GSL) contains functions and types that are suggested for
+      use by the C++ Core Guidelines maintained by the Standard C++ Foundation.
+      This package contains Microsoft's implementation of GSL.
+    '';
+    homepage = "https://github.com/Microsoft/GSL";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ thoughtpolice yuriaisaka ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mimalloc/default.nix b/nixpkgs/pkgs/development/libraries/mimalloc/default.nix
new file mode 100644
index 000000000000..e0e1421c476e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mimalloc/default.nix
@@ -0,0 +1,59 @@
+{ lib, stdenv, fetchFromGitHub, cmake, ninja
+, secureBuild ? false
+}:
+
+let
+  soext = stdenv.hostPlatform.extensions.sharedLibrary;
+in
+stdenv.mkDerivation rec {
+  pname   = "mimalloc";
+  version = "2.1.2";
+
+  src = fetchFromGitHub {
+    owner  = "microsoft";
+    repo   = pname;
+    rev    = "v${version}";
+    sha256 = "sha256-kYhfufffM4r+ZVgcjnulqFlf1756pirlPysGZnUBzt8=";
+  };
+
+  doCheck = !stdenv.hostPlatform.isStatic;
+  preCheck = let
+    ldLibraryPathEnv = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH";
+  in ''
+    export ${ldLibraryPathEnv}="$(pwd)/build:''${${ldLibraryPathEnv}}"
+  '';
+
+  nativeBuildInputs = [ cmake ninja ];
+  cmakeFlags = [ "-DMI_INSTALL_TOPLEVEL=ON" ]
+    ++ lib.optionals secureBuild [ "-DMI_SECURE=ON" ]
+    ++ lib.optionals stdenv.hostPlatform.isStatic [ "-DMI_BUILD_SHARED=OFF" ]
+    ++ lib.optionals (!doCheck) [ "-DMI_BUILD_TESTS=OFF" ]
+  ;
+
+  postInstall = let
+    rel = lib.versions.majorMinor version;
+    suffix = if stdenv.isLinux then "${soext}.${rel}" else ".${rel}${soext}";
+  in ''
+    # first, move headers and cmake files, that's easy
+    mkdir -p $dev/lib
+    mv $out/lib/cmake $dev/lib/
+
+    find $dev $out -type f
+  '' + (lib.optionalString secureBuild ''
+    # pretend we're normal mimalloc
+    ln -sfv $out/lib/libmimalloc-secure${suffix} $out/lib/libmimalloc${suffix}
+    ln -sfv $out/lib/libmimalloc-secure${suffix} $out/lib/libmimalloc${soext}
+    ln -sfv $out/lib/libmimalloc-secure.a $out/lib/libmimalloc.a
+    ln -sfv $out/lib/mimalloc-secure.o $out/lib/mimalloc.o
+  '');
+
+  outputs = [ "out" "dev" ];
+
+  meta = with lib; {
+    description = "Compact, fast, general-purpose memory allocator";
+    homepage    = "https://github.com/microsoft/mimalloc";
+    license     = licenses.bsd2;
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ kamadorueda thoughtpolice ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mimetic/default.nix b/nixpkgs/pkgs/development/libraries/mimetic/default.nix
new file mode 100644
index 000000000000..668b2fdf10c9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mimetic/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl, fetchpatch, cutee }:
+
+stdenv.mkDerivation rec {
+  pname = "mimetic";
+  version = "0.9.8";
+
+  src = fetchurl {
+    url    = "http://www.codesink.org/download/${pname}-${version}.tar.gz";
+    sha256 = "003715lvj4nx23arn1s9ss6hgc2yblkwfy5h94li6pjz2a6xc1rs";
+  };
+
+  buildInputs = [ cutee ];
+
+  patches = [
+    # Fix build with gcc11
+    (fetchpatch {
+      url = "https://github.com/tat/mimetic/commit/bf84940f9021950c80846e6b1a5f8b0b55991b00.patch";
+      sha256 = "sha256-1JW9zPg67BgNsdIjK/jp9j7QMg50eRMz5FsDsbbzBlI=";
+    })
+  ] ++ lib.optional stdenv.isAarch64 ./narrowing.patch;
+
+  meta = with lib; {
+    description = "MIME handling library";
+    homepage    = "https://www.codesink.org/mimetic_mime_library.html";
+    license     = licenses.mit;
+    maintainers = with maintainers; [ leenaars];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mimetic/narrowing.patch b/nixpkgs/pkgs/development/libraries/mimetic/narrowing.patch
new file mode 100644
index 000000000000..676e29376c7d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mimetic/narrowing.patch
@@ -0,0 +1,32 @@
+diff -ru a/mimetic/codec/base64.cxx b/mimetic/codec/base64.cxx
+--- a/mimetic/codec/base64.cxx	2014-06-17 10:12:00.000000000 +0200
++++ b/mimetic/codec/base64.cxx	2020-07-30 20:54:10.212742011 +0200
+@@ -14,19 +14,19 @@
+     "0123456789+/=";
+ 
+ const char Base64::sDecTable[] = {
+-        -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+-        -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+-        -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+-        -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+-        -1,-1,-1,62,-1,-1,-1,63,52,53,
+-        54,55,56,57,58,59,60,61,-1,-1,
+-        -1, eq_sign, -1,-1,-1, 0, 1, 2, 3, 4, 
++        255,255,255,255,255,255,255,255,255,255,
++        255,255,255,255,255,255,255,255,255,255,
++        255,255,255,255,255,255,255,255,255,255,
++        255,255,255,255,255,255,255,255,255,255,
++        255,255,255,62,255,255,255,63,52,53,
++        54,55,56,57,58,59,60,61,255,255,
++        255, eq_sign, 255,255,255, 0, 1, 2, 3, 4, 
+          5, 6, 7, 8, 9,10,11,12,13,14,
+         15,16,17,18,19,20,21,22,23,24,
+-        25,-1,-1,-1,-1,-1,-1,26,27,28,
++        25,255,255,255,255,255,255,26,27,28,
+         29,30,31,32,33,34,35,36,37,38,
+         39,40,41,42,43,44,45,46,47,48,
+-        49,50,51,-1
++        49,50,51,255
+ };
+ 
+ const int Base64::sDecTableSz = sizeof(Base64::sDecTable) / sizeof(char);
diff --git a/nixpkgs/pkgs/development/libraries/miniaudio/default.nix b/nixpkgs/pkgs/development/libraries/miniaudio/default.nix
new file mode 100644
index 000000000000..d8567177be61
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/miniaudio/default.nix
@@ -0,0 +1,29 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+}:
+stdenv.mkDerivation rec {
+  pname = "miniaudio";
+  version = "0.11.21";
+
+  src = fetchFromGitHub {
+    owner = "mackron";
+    repo = "miniaudio";
+    rev = version;
+    hash = "sha256-EOIykyUXYcdDeTYb/Mf3xgcxEpKS4us213tEFwm5mEI=";
+  };
+
+  installPhase = ''
+    mkdir -p $out
+    cp -r $src/* $out/
+  '';
+
+  meta = with lib; {
+    description = "Single header audio playback and capture library written in C";
+    homepage = "https://github.com/mackron/miniaudio";
+    changelog = "https://github.com/mackron/miniaudio/blob/${src.rev}/CHANGES.md";
+    license = with licenses; [ unlicense /* or */ mit0 ];
+    maintainers = [ maintainers.jansol ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/miniball/default.nix b/nixpkgs/pkgs/development/libraries/miniball/default.nix
new file mode 100644
index 000000000000..13a814684a42
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/miniball/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation {
+  pname = "miniball";
+  version = "3.0";
+
+  src = fetchurl {
+    url = "https://www.inf.ethz.ch/personal/gaertner/miniball/Miniball.hpp";
+    sha256 = "1piap5v8wqq0aachrq6j50qkr01gzpyndl6vf661vyykrfq0nnd2";
+  };
+
+  dontUnpack = true;
+
+  installPhase = ''
+    mkdir -p $out/include
+    cp $src $out/include/miniball.hpp
+  '';
+
+  meta = {
+    description = "Smallest Enclosing Balls of Points";
+    homepage = "https://www.inf.ethz.ch/personal/gaertner/miniball.html";
+    license = lib.licenses.gpl3;
+    maintainers = [ lib.maintainers.erikryb ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/minilibx/default.nix b/nixpkgs/pkgs/development/libraries/minilibx/default.nix
new file mode 100644
index 000000000000..0551993e438a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/minilibx/default.nix
@@ -0,0 +1,62 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, installShellFiles
+, libX11
+, libXext
+, unstableGitUpdater
+}:
+
+stdenv.mkDerivation {
+  pname = "minilibx";
+  version = "unstable-2021-10-30";
+
+  src = fetchFromGitHub {
+    owner = "42Paris";
+    repo = "minilibx-linux";
+    rev = "7dc53a411a7d4ae286c60c6229bd1e395b0efb82";
+    hash = "sha256-aRYMpaPC7dC6EHmmXugvwcQnaizRCQZKFcQX0K2MLM4=";
+  };
+
+  outputs = [ "out" "dev" "man" ];
+
+  nativeBuildInputs = [
+    installShellFiles
+  ];
+
+  buildInputs = [
+    libX11
+    libXext
+  ];
+
+  dontConfigure = true;
+
+  makefile = "Makefile.mk";
+
+  makeFlags = [
+    "CC=${stdenv.cc.targetPrefix}cc"
+  ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/{include,lib}
+    cp mlx*.h $out/include
+    cp libmlx*.a $out/lib
+    installManPage man/man*/*
+
+    runHook postInstall
+  '';
+
+  passthru = {
+    updateScript = unstableGitUpdater { };
+  };
+
+  meta = with lib; {
+    description = "A simple X-Window (X11R6) programming API in C";
+    homepage = "https://github.com/42Paris/minilibx-linux";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ wegank ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/minixml/default.nix b/nixpkgs/pkgs/development/libraries/minixml/default.nix
new file mode 100644
index 000000000000..1c9a4ab110b4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/minixml/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "mxml";
+  version = "3.3.1";
+
+  src = fetchFromGitHub {
+    owner = "michaelrsweet";
+    repo = "mxml";
+    rev = "v${version}";
+    sha256 = "sha256-l7GUA+vlSECi/72eU3Y9COpGtLTRh3vYcHUi+uRkCn8=";
+  };
+
+  # remove the -arch flags which are set by default in the build
+  configureFlags = lib.optionals stdenv.isDarwin [
+    "--with-archflags=\"-mmacosx-version-min=10.14\""
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "A small XML library";
+    homepage = "https://www.msweet.org/mxml/";
+    license = licenses.asl20;
+    platforms = platforms.all;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/miniz/default.nix b/nixpkgs/pkgs/development/libraries/miniz/default.nix
new file mode 100644
index 000000000000..8592dc5f1224
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/miniz/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "miniz";
+  version = "2.2.0";
+
+  src = fetchFromGitHub {
+    owner = "richgel999";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-7hc/yNJh4sD5zGQLeHjowbUtV/1mUDQre1tp9yKMSSY=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  postFixup = ''
+    substituteInPlace "$out"/share/pkgconfig/miniz.pc \
+      --replace '=''${prefix}//' '=/' \
+      --replace '=''${exec_prefix}//' '=/'
+  '';
+
+  meta = with lib; {
+    description = "Single C source file zlib-replacement library";
+    homepage = "https://github.com/richgel999/miniz";
+    license = licenses.mit;
+    maintainers = with maintainers; [ astro ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/minizip-ng/default.nix b/nixpkgs/pkgs/development/libraries/minizip-ng/default.nix
new file mode 100644
index 000000000000..5be1f2e51925
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/minizip-ng/default.nix
@@ -0,0 +1,63 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, gtest
+, pkg-config
+, zlib
+, bzip2
+, xz
+, zstd
+, openssl
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "minizip-ng";
+  version = "4.0.3";
+
+  src = fetchFromGitHub {
+    owner = "zlib-ng";
+    repo = finalAttrs.pname;
+    rev = finalAttrs.version;
+    hash = "sha256-rP3WficGQZ2sSYnU9Tj0lVl36ShwV76fn/1lv+TrK2c=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ zlib bzip2 xz zstd openssl ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
+    "-DMZ_OPENSSL=ON"
+    "-DMZ_BUILD_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
+    "-DMZ_BUILD_UNIT_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
+    "-DMZ_LIB_SUFFIX='-ng'"
+  ] ++ lib.optionals stdenv.isDarwin [
+    # missing header file
+    "-DMZ_LIBCOMP=OFF"
+  ];
+
+  postInstall = ''
+    # make lib findable as libminizip-ng even if compat is enabled
+    for ext in so dylib a ; do
+      if [ -e $out/lib/libminizip.$ext ] && [ ! -e $out/lib/libminizip-ng.$ext ]; then
+        ln -s $out/lib/libminizip.$ext $out/lib/libminizip-ng.$ext
+      fi
+    done
+    if [ ! -e $out/include/minizip-ng ]; then
+      ln -s $out/include $out/include/minizip-ng
+    fi
+  '';
+
+  doCheck = stdenv.buildPlatform == stdenv.hostPlatform;
+  nativeCheckInputs = [ gtest ];
+  enableParallelChecking = false;
+
+  meta = with lib; {
+    description = "Fork of the popular zip manipulation library found in the zlib distribution";
+    homepage = "https://github.com/zlib-ng/minizip-ng";
+    license = licenses.zlib;
+    maintainers = with maintainers; [ gebner ris ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/minizip/default.nix b/nixpkgs/pkgs/development/libraries/minizip/default.nix
new file mode 100644
index 000000000000..586dd113f1d1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/minizip/default.nix
@@ -0,0 +1,19 @@
+{ lib, stdenv, zlib, autoreconfHook, fetchpatch }:
+
+stdenv.mkDerivation {
+  pname = "minizip";
+  inherit (zlib) src version;
+
+  patchFlags = [ "-p3" ];
+
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ zlib ];
+
+  sourceRoot = "zlib-${zlib.version}/contrib/minizip";
+
+  meta = {
+    description = "Compression library implementing the deflate compression method found in gzip and PKZIP";
+    inherit (zlib.meta) license homepage;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mitama-cpp-result/default.nix b/nixpkgs/pkgs/development/libraries/mitama-cpp-result/default.nix
new file mode 100644
index 000000000000..9ae718de4db5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mitama-cpp-result/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "mitama-cpp-result";
+  version = "9.3.0";
+
+  src = fetchFromGitHub {
+    owner = "LoliGothick";
+    repo = "mitama-cpp-result";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-CWYVPpmPIZZTsqXKh+Ft3SlQ4C9yjUof1mJ8Acn5kmM=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/LoliGothick/mitama-cpp-result";
+    description = "A Library that provides `result<T, E>` and `maybe<T>` and monadic functions for them";
+    longDescription = ''
+      mitama-cpp-result is the C++17 libraries for error handling without exceptions.
+
+      mitama-cpp-result provides `result<T, E>`, `maybe<T>`, and associated monadic functions
+      (like Result and Option in Programming Language Rust).
+    '';
+    license = licenses.mit;
+    maintainers = with maintainers; [ ken-matsui ];
+    platforms = platforms.unix;
+  };
+})
+# TODO [ ken-matsui ]: tests
diff --git a/nixpkgs/pkgs/development/libraries/mlib/default.nix b/nixpkgs/pkgs/development/libraries/mlib/default.nix
new file mode 100644
index 000000000000..f3415adadf74
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mlib/default.nix
@@ -0,0 +1,39 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mlib";
+  version = "0.7.2";
+
+  src = fetchFromGitHub {
+    owner = "P-p-H-d";
+    repo = pname;
+    rev = "V${version}";
+    hash = "sha256-wt/wLtvAZ19ZiLIjPrKbqVztLyXEa8hy6cEkaCO+tuY=";
+  };
+
+  makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "PREFIX=$(out)" ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Library of generic and type safe containers in pure C language";
+    longDescription = ''
+      M*LIB (M star lib) is a C library enabling to define and use generic and
+      type safe container, aka handling generic containers in in pure C
+      language. The objects within the containers can be trivial or very
+      complex: they can have their own constructor, destructor, operators or can
+      be basic C type like the C type 'int'. This makes it possible to construct
+      fully recursive objects (container-of[...]-container-of-type-T), without
+      erasing type information (typically using void pointers or resorting to C
+      macro to access the container).
+    '';
+    homepage = "https://github.com/P-p-H-d/mlib";
+    changelog = "https://github.com/P-p-H-d/mlib/releases/tag/${src.rev}";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ azahi ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mlt/default.nix b/nixpkgs/pkgs/development/libraries/mlt/default.nix
new file mode 100644
index 000000000000..abe368f2ea62
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mlt/default.nix
@@ -0,0 +1,139 @@
+{ config
+, lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, which
+, ffmpeg
+, fftw
+, frei0r
+, libdv
+, libjack2
+, libsamplerate
+, libvorbis
+, libxml2
+, makeWrapper
+, movit
+, opencv4
+, rtaudio
+, rubberband
+, sox
+, vid-stab
+, darwin
+, cudaSupport ? config.cudaSupport
+, cudaPackages ? { }
+, enableJackrack ? stdenv.isLinux
+, glib
+, ladspa-sdk
+, ladspaPlugins
+, enablePython ? false
+, python3
+, swig
+, qt ? null
+, enableSDL1 ? stdenv.isLinux
+, SDL
+, enableSDL2 ? true
+, SDL2
+, gitUpdater
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mlt";
+  version = "7.22.0";
+
+  src = fetchFromGitHub {
+    owner = "mltframework";
+    repo = "mlt";
+    rev = "v${version}";
+    hash = "sha256-vJKpeEdQIWBQRRdDui5ibSZtD8qUlDZBD+UQE+0cQqk=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    which
+    makeWrapper
+  ] ++ lib.optionals cudaSupport [
+    cudaPackages.cuda_nvcc
+  ] ++ lib.optionals enablePython [
+    python3
+    swig
+  ] ++ lib.optionals (qt != null) [
+    qt.wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    ffmpeg
+    fftw
+    frei0r
+    libdv
+    libjack2
+    libsamplerate
+    libvorbis
+    libxml2
+    movit
+    opencv4
+    rtaudio
+    rubberband
+    sox
+    vid-stab
+  ] ++ lib.optionals stdenv.isDarwin [
+    darwin.apple_sdk_11_0.frameworks.Accelerate
+  ] ++ lib.optionals cudaSupport [
+    cudaPackages.cuda_cudart
+  ] ++ lib.optionals enableJackrack [
+    glib
+    ladspa-sdk
+    ladspaPlugins
+  ] ++ lib.optionals (qt != null) [
+    qt.qtbase
+    qt.qtsvg
+    (qt.qt5compat or null)
+  ] ++ lib.optionals enableSDL1 [
+    SDL
+  ] ++ lib.optionals enableSDL2 [
+    SDL2
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  cmakeFlags = [
+    # RPATH of binary /nix/store/.../bin/... contains a forbidden reference to /build/
+    "-DCMAKE_SKIP_BUILD_RPATH=ON"
+    "-DMOD_OPENCV=ON"
+  ] ++ lib.optionals enablePython [
+    "-DSWIG_PYTHON=ON"
+  ] ++ lib.optionals (qt != null) [
+    "-DMOD_QT${lib.versions.major qt.qtbase.version}=ON"
+  ];
+
+  preFixup = ''
+    wrapProgram $out/bin/melt \
+      --prefix FREI0R_PATH : ${frei0r}/lib/frei0r-1 \
+      ${lib.optionalString enableJackrack "--prefix LADSPA_PATH : ${ladspaPlugins}/lib/ladspa"} \
+      ${lib.optionalString (qt != null) "\${qtWrapperArgs[@]}"}
+
+  '';
+
+  postFixup = ''
+    substituteInPlace "$dev"/lib/pkgconfig/mlt-framework-7.pc \
+      --replace '=''${prefix}//' '=/'
+  '';
+
+  passthru = {
+    inherit ffmpeg;
+  };
+
+  passthru.updateScript = gitUpdater {
+    rev-prefix = "v";
+  };
+
+  meta = with lib; {
+    description = "Open source multimedia framework, designed for television broadcasting";
+    homepage = "https://www.mltframework.org/";
+    license = with licenses; [ lgpl21Plus gpl2Plus ];
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mm-common/default.nix b/nixpkgs/pkgs/development/libraries/mm-common/default.nix
new file mode 100644
index 000000000000..cbc0f86e31b1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mm-common/default.nix
@@ -0,0 +1,55 @@
+{ lib
+, stdenv
+, fetchurl
+, bash
+, gnome
+, meson
+, python3
+, ninja
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mm-common";
+  version = "1.0.6";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "tVxGA3282rxc7js4nqEcw5EK22jr6IPpR3hHqmYIYuc=";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    meson
+    python3
+    ninja
+  ];
+
+  # for shebangs
+  buildInputs = [
+    python3
+    bash
+  ];
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "none";
+    };
+  };
+
+  meta = with lib; {
+    description = "Common build files of GLib/GTK C++ bindings";
+    longDescription = ''
+      The mm-common module provides the build infrastructure and utilities
+      shared among the GNOME C++ binding libraries. It is only a required
+      dependency for building the C++ bindings from the gnome.org version
+      control repository. An installation of mm-common is not required for
+      building tarball releases, unless configured to use maintainer-mode.
+    '';
+    homepage = "https://www.gtkmm.org";
+    license = licenses.gpl2Plus;
+    maintainers = teams.gnome.members;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mongoc/default.nix b/nixpkgs/pkgs/development/libraries/mongoc/default.nix
new file mode 100644
index 000000000000..85b41061228e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mongoc/default.nix
@@ -0,0 +1,62 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, openssl
+, zlib
+, zstd
+, icu
+, cyrus_sasl
+, snappy
+, darwin
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mongoc";
+  version = "1.26.0";
+
+  src = fetchFromGitHub {
+    owner = "mongodb";
+    repo = "mongo-c-driver";
+    rev = "refs/tags/${version}";
+    hash = "sha256-uXHCd7KDnx3n6KO0opoITpf8LtUS67bc94tPHioeb4o=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    openssl
+    zlib
+    zstd
+    icu
+    cyrus_sasl
+    snappy
+  ] ++ lib.optionals stdenv.isDarwin [
+    darwin.apple_sdk_11_0.frameworks.Security
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_VERSION=${version}"
+    "-DENABLE_UNINSTALL=OFF"
+    "-DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF"
+    "-DCMAKE_INSTALL_LIBDIR=lib"
+  ];
+
+  # remove forbidden reference to $TMPDIR
+  preFixup = ''
+    rm -rf src/{libmongoc,libbson}
+  '';
+
+  meta = with lib; {
+    description = "The official C client library for MongoDB";
+    homepage = "http://mongoc.org";
+    license = licenses.asl20;
+    mainProgram = "mongoc-stat";
+    maintainers = with maintainers; [ archer-65 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mongocxx/default.nix b/nixpkgs/pkgs/development/libraries/mongocxx/default.nix
new file mode 100644
index 000000000000..ad96e81159a7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mongocxx/default.nix
@@ -0,0 +1,57 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, mongoc
+, openssl
+, cyrus_sasl
+, cmake
+, validatePkgConfig
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "mongocxx";
+  version = "3.8.1";
+
+  src = fetchFromGitHub {
+    owner = "mongodb";
+    repo = "mongo-cxx-driver";
+    rev = "refs/tags/r${finalAttrs.version}";
+    hash = "sha256-fBZg69jsvXzhllpcPBGXkjYyvUQImnGNkb2Ek5Oi0p4=";
+  };
+
+  postPatch = ''
+    substituteInPlace src/bsoncxx/config/CMakeLists.txt \
+      src/mongocxx/config/CMakeLists.txt \
+      --replace "\\\''${prefix}/" ""
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    validatePkgConfig
+  ];
+
+  buildInputs = [
+    mongoc
+    openssl
+    cyrus_sasl
+  ];
+
+  cmakeFlags = [
+    "-DCMAKE_CXX_STANDARD=20"
+    "-DBUILD_VERSION=${finalAttrs.version}"
+    "-DENABLE_UNINSTALL=OFF"
+  ];
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    description = "The official C++ client library for MongoDB";
+    homepage = "http://mongocxx.org";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ adriandole ];
+    pkgConfigModules = [ "libmongocxx" "libbsoncxx" ];
+    platforms = platforms.all;
+    badPlatforms = [ "x86_64-darwin" ]; # needs sdk >= 10.14
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/mono-addins/default.nix b/nixpkgs/pkgs/development/libraries/mono-addins/default.nix
new file mode 100644
index 000000000000..158b39a8186a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mono-addins/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, mono4, gtk-sharp-2_0 }:
+
+stdenv.mkDerivation rec {
+  pname = "mono-addins";
+  version = "1.3.3";
+
+  src = fetchFromGitHub {
+    owner = "mono";
+    repo = "mono-addins";
+
+    rev = "mono-addins-${version}";
+    sha256 = "018g3bd8afjc39h22h2j5r6ldsdn08ynx7wg889gdvnxg3hrxgl2";
+  };
+
+  nativeBuildInputs = [ pkg-config autoreconfHook ];
+
+  # Use msbuild when https://github.com/NixOS/nixpkgs/pull/43680 is merged
+  buildInputs = [ mono4 gtk-sharp-2_0 ];
+
+  dontStrip = true;
+
+  meta = with lib; {
+    homepage = "https://www.mono-project.com/archived/monoaddins/";
+    description = "A generic framework for creating extensible applications";
+    longDescription = ''
+      Mono.Addins is a generic framework for creating extensible applications,
+      and for creating libraries which extend those applications.
+    '';
+    platforms = platforms.linux;
+    license = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/monocypher/default.nix b/nixpkgs/pkgs/development/libraries/monocypher/default.nix
new file mode 100644
index 000000000000..b37cfffabc0e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/monocypher/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchurl, fetchpatch }:
+
+stdenv.mkDerivation rec {
+  pname = "monocypher";
+  version = "4.0.2";
+
+  src = fetchurl {
+    url = "https://monocypher.org/download/monocypher-${version}.tar.gz";
+    hash = "sha256-ONBxeXOMDJBnfbo863p7hJa8/qdYuhpT6AP+0wrgh5w=";
+  };
+
+  installFlags = [ "PREFIX=$(out)" ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Boring crypto that simply works";
+    homepage = "https://monocypher.org";
+    license = with licenses; [ bsd2 cc0 ];
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ sikmir ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/motif/Add-X.Org-to-bindings-file.patch b/nixpkgs/pkgs/development/libraries/motif/Add-X.Org-to-bindings-file.patch
new file mode 100644
index 000000000000..84b62dcd4eb0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/motif/Add-X.Org-to-bindings-file.patch
@@ -0,0 +1,7 @@
+--- a/bindings/xmbind.alias
++++ b/bindings/xmbind.alias
+@@ -62,3 +62,4 @@
+ "Sun Microsystems, Inc."				sun
+ ! "Sun Microsystems, Inc."				sun_at
+ "Tektronix, Inc."					tek
++"The X.Org Foundation"				tpc
diff --git a/nixpkgs/pkgs/development/libraries/motif/Remove-unsupported-weak-refs-on-darwin.patch b/nixpkgs/pkgs/development/libraries/motif/Remove-unsupported-weak-refs-on-darwin.patch
new file mode 100644
index 000000000000..801310ba41ce
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/motif/Remove-unsupported-weak-refs-on-darwin.patch
@@ -0,0 +1,12 @@
+--- a/lib/Xm/XmP.h
++++ b/lib/Xm/XmP.h
+@@ -1437,7 +1437,7 @@ extern void _XmDestroyParentCallback(
+ 
+ #endif /* NO_XM_1_2_BC */
+ 
+-#if __GNUC__
++#if __GNUC__ && ! __APPLE__
+ #  define XM_DEPRECATED  __attribute__((__deprecated__))
+ #  define XM_ALIAS(sym)  __attribute__((__weak__,alias(#sym)))
+ #else
+
diff --git a/nixpkgs/pkgs/development/libraries/motif/default.nix b/nixpkgs/pkgs/development/libraries/motif/default.nix
new file mode 100644
index 000000000000..92d0098fc984
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/motif/default.nix
@@ -0,0 +1,52 @@
+{ lib, stdenv, fetchurl, fetchpatch, pkg-config, libtool
+, xbitmaps, libXext, libXft, libXrender, libXmu, libXt
+, expat, libjpeg, libpng, libiconv
+, flex
+, libXp, libXau
+, demoSupport ? false
+}:
+# refer to the gentoo package
+
+stdenv.mkDerivation rec {
+  pname = "motif";
+  version = "2.3.8";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/motif/${pname}-${version}.tar.gz";
+    sha256 = "1rxwkrhmj8sfg7dwmkhq885valwqbh26d79033q7vb7fcqv756w5";
+  };
+
+  buildInputs = [
+    libtool
+    xbitmaps libXext libXft libXrender libXmu libXt
+    expat libjpeg libpng libiconv
+  ];
+
+  nativeBuildInputs = [ pkg-config flex ];
+
+  propagatedBuildInputs = [ libXp libXau ];
+
+  prePatch = lib.optionalString (!demoSupport) ''
+    sed '/^SUBDIRS =,^$/s/\<demos\>//' -i Makefile.{am,in}
+  '';
+
+  patches = [
+    ./Remove-unsupported-weak-refs-on-darwin.patch
+    ./Add-X.Org-to-bindings-file.patch
+    (fetchpatch rec {
+      name = "fix-format-security.patch";
+      url = "https://raw.githubusercontent.com/void-linux/void-packages/b9a1110dabb01c052dadc1abae1413bd4afe3652/srcpkgs/motif/patches/02-${name}";
+      sha256 = "13vzpf8yxvhf4gl7q0yzlr6ak1yzx382fsqsrv5lc8jbbg4nwrrq";
+    })
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://motif.ics.com";
+    description = "Unix standard widget-toolkit and window-manager";
+    platforms = platforms.unix;
+    license = with licenses; [ lgpl21Plus ];
+    maintainers = with maintainers; [ qyliss ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/movit/default.nix b/nixpkgs/pkgs/development/libraries/movit/default.nix
new file mode 100644
index 000000000000..4601e04f03c9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/movit/default.nix
@@ -0,0 +1,57 @@
+{ lib
+, stdenv
+, fetchurl
+, pkg-config
+, SDL2
+, fftw
+, gtest
+, darwin
+, eigen
+, libepoxy
+}:
+
+stdenv.mkDerivation rec {
+  pname = "movit";
+  version = "1.7.1";
+
+  src = fetchurl {
+    url = "https://movit.sesse.net/${pname}-${version}.tar.gz";
+    sha256 = "sha256-szBztwXwzLasSULPURUVFUB7QLtOmi3QIowcLLH7wRo=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  GTEST_DIR = "${gtest.src}/googletest";
+
+  nativeBuildInputs = [
+    pkg-config
+  ];
+
+  buildInputs = [
+    SDL2
+    fftw
+    gtest
+  ] ++ lib.optionals stdenv.isDarwin [
+    darwin.apple_sdk.frameworks.OpenGL
+    darwin.libobjc
+  ];
+
+  propagatedBuildInputs = [
+    eigen
+    libepoxy
+  ];
+
+  env = lib.optionalAttrs stdenv.isDarwin {
+    NIX_LDFLAGS = "-framework OpenGL";
+  };
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "High-performance, high-quality video filters for the GPU";
+    homepage = "https://movit.sesse.net";
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mp4v2/default.nix b/nixpkgs/pkgs/development/libraries/mp4v2/default.nix
new file mode 100644
index 000000000000..b9b0589bd80d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mp4v2/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, lib, fetchFromGitHub, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "mp4v2";
+  version = "5.0.1";
+
+  src = fetchFromGitHub {
+    # 2020-06-20: THE current upstream, maintained and used in distros fork.
+    owner = "TechSmith";
+    repo = "mp4v2";
+    rev = "Release-ThirdParty-MP4v2-${version}";
+    sha256 = "sha256-OP+oVTH9pqYfHtYL1Kjrs1qey/J40ijLi5Gu8GJnvSY=";
+  };
+
+  env.NIX_CFLAGS_COMPILE = "-Wno-error=narrowing";
+
+  # `faac' expects `mp4.h'.
+  postInstall = "ln -s mp4v2/mp4v2.h $out/include/mp4.h";
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "Provides functions to read, create, and modify mp4 files";
+    longDescription = ''
+      MP4v2 library provides an API to work with mp4 files
+      as defined by ISO-IEC:14496-1:2001 MPEG-4 Systems.
+      This container format is derived from Apple's QuickTime format.
+    '';
+    homepage = "https://github.com/TechSmith/mp4v2";
+    maintainers = [ lib.maintainers.Anton-Latukha ];
+    platforms = lib.platforms.unix;
+    license = lib.licenses.mpl11;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mpdecimal/default.nix b/nixpkgs/pkgs/development/libraries/mpdecimal/default.nix
new file mode 100644
index 000000000000..3a2e4b1fe7d0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mpdecimal/default.nix
@@ -0,0 +1,55 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "mpdecimal";
+  version = "2.5.1";
+  outputs = [ "out" "cxx" "doc" "dev" ];
+
+  src = fetchurl {
+    url = "https://www.bytereef.org/software/mpdecimal/releases/mpdecimal-${version}.tar.gz";
+    hash = "sha256-n5zUwEH5m1xJ/7e1nZ8S2VtoPYhYVgiqVqYwdmeysh8=";
+  };
+
+  configureFlags = [ "LD=${stdenv.cc.targetPrefix}cc" ];
+
+  postInstall = ''
+    mkdir -p $cxx/lib
+    mv $out/lib/*c++* $cxx/lib
+
+    mkdir -p $dev/nix-support
+    echo -n $cxx >> $dev/nix-support/propagated-build-inputs
+  '';
+
+  meta = {
+    description = "Library for arbitrary precision decimal floating point arithmetic";
+
+    longDescription =  ''
+      libmpdec is a fast C/C++ library for correctly-rounded arbitrary
+      precision decimal floating point arithmetic.  It is a complete
+      implementation of Mike Cowlishaw/IBM's General Decimal Arithmetic
+      Specification. The full specification is available here:
+
+      http://speleotrove.com/decimal/
+
+      libmpdec will - with minor restrictions - also conform to the IEEE
+      754-2008 Standard for Floating-Point Arithmetic, provided that the
+      appropriate context parameters are set.
+
+      libmpdec++ is a complete implementation of the General Decimal Arithmetic
+      Specification.  libmpdec++ is mostly a header library around libmpdec's C
+      functions.
+    '';
+
+    homepage = "https://www.bytereef.org/mpdecimal/index.html";
+
+    downloadPage = "https://www.bytereef.org/mpdecimal/download.html";
+
+    changelog = "https://www.bytereef.org/mpdecimal/changelog.html";
+
+    license = lib.licenses.bsd2;
+
+    maintainers = with lib.maintainers; [ kaction ];
+
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mpfi/default.nix b/nixpkgs/pkgs/development/libraries/mpfi/default.nix
new file mode 100644
index 000000000000..4bc568523c9f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mpfi/default.nix
@@ -0,0 +1,34 @@
+{lib, stdenv, fetchFromGitLab, autoreconfHook, texinfo, mpfr}:
+stdenv.mkDerivation rec {
+  pname = "mpfi";
+  version = "1.5.4";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.inria.fr";
+    owner = "mpfi";
+    repo = "mpfi";
+
+    # Apparently there is an upstream off-by-one-commit error in tagging
+    # Conditional to allow auto-updaters to try new releases
+    # TODO: remove the conditional after an upstream update
+    # rev = version;
+    rev = if version == "1.5.4" then
+      "feab26bc54529417af983950ddbffb3a4c334d4f"
+    else version;
+
+    sha256 = "sha256-aj/QmJ38ifsW36JFQcbp55aIQRvOpiqLHwEh/aFXsgo=";
+  };
+
+  sourceRoot = "source/mpfi";
+
+  nativeBuildInputs = [ autoreconfHook texinfo ];
+  buildInputs = [ mpfr ];
+
+  meta = {
+    description = "A multiple precision interval arithmetic library based on MPFR";
+    homepage = "http://perso.ens-lyon.fr/nathalie.revol/software.html";
+    license = lib.licenses.lgpl21Plus;
+    maintainers = [lib.maintainers.raskin];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mpfr/default.nix b/nixpkgs/pkgs/development/libraries/mpfr/default.nix
new file mode 100644
index 000000000000..dec33a63d155
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mpfr/default.nix
@@ -0,0 +1,78 @@
+{ lib
+, stdenv
+, fetchurl
+, gmp
+, writeScript
+}:
+
+# Note: this package is used for bootstrapping fetchurl, and thus
+# cannot use fetchpatch! All mutable patches (generated by GitHub or
+# cgit) that are needed here should be included directly in Nixpkgs as
+# files.
+
+stdenv.mkDerivation rec {
+  version = "4.2.1";
+  pname = "mpfr";
+
+  src = fetchurl {
+    urls = [
+      "https://www.mpfr.org/${pname}-${version}/${pname}-${version}.tar.xz"
+      "mirror://gnu/mpfr/${pname}-${version}.tar.xz"
+    ];
+    hash = "sha256-J3gHNTpnJpeJlpRa8T5Sgp46vXqaW3+yeTiU4Y8fy7I=";
+  };
+
+  outputs = [ "out" "dev" "doc" "info" ];
+
+  strictDeps = true;
+  # mpfr.h requires gmp.h
+  propagatedBuildInputs = [ gmp ];
+
+  configureFlags = lib.optional stdenv.hostPlatform.isSunOS "--disable-thread-safe"
+    ++ lib.optional stdenv.hostPlatform.is64bit "--with-pic"
+    ++ lib.optionals stdenv.hostPlatform.isPower64 [
+      # Without this, the `tget_set_d128` test experiences a link
+      # error due to missing `__dpd_trunctdkf`.
+      "--disable-decimal-float"
+    ];
+
+  doCheck = true; # not cross;
+
+  enableParallelBuilding = true;
+
+  passthru = {
+    updateScript = writeScript "update-mpfr" ''
+      #!/usr/bin/env nix-shell
+      #!nix-shell -i bash -p curl pcre common-updater-scripts
+
+      set -eu -o pipefail
+
+      # Expect the text in format of '<title>GNU MPFR version 4.1.1</title>'
+      new_version="$(curl -s https://www.mpfr.org/mpfr-current/ |
+          pcregrep -o1 '<title>GNU MPFR version ([0-9.]+)</title>')"
+      update-source-version ${pname} "$new_version"
+    '';
+  };
+
+  meta = {
+    homepage = "https://www.mpfr.org/";
+    description = "Library for multiple-precision floating-point arithmetic";
+
+    longDescription = ''
+      The GNU MPFR library is a C library for multiple-precision
+      floating-point computations with correct rounding.  MPFR is
+      based on the GMP multiple-precision library.
+
+      The main goal of MPFR is to provide a library for
+      multiple-precision floating-point computation which is both
+      efficient and has a well-defined semantics.  It copies the good
+      ideas from the ANSI/IEEE-754 standard for double-precision
+      floating-point arithmetic (53-bit mantissa).
+    '';
+
+    license = lib.licenses.lgpl2Plus;
+
+    maintainers = [ ];
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mpich/default.nix b/nixpkgs/pkgs/development/libraries/mpich/default.nix
new file mode 100644
index 000000000000..db9c727f8e0b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mpich/default.nix
@@ -0,0 +1,78 @@
+{ stdenv, lib, fetchurl, perl, gfortran
+, openssh, hwloc, python3
+# either libfabric or ucx work for ch4backend on linux. On darwin, neither of
+# these libraries currently build so this argument is ignored on Darwin.
+, ch4backend
+# Process managers to build (`--with-pm`),
+# cf. https://github.com/pmodels/mpich/blob/b80a6d7c24defe7cdf6c57c52430f8075a0a41d6/README.vin#L562-L586
+, withPm ? [ "hydra" "gforker" ]
+, pmix
+# PMIX support is likely incompatible with process managers (`--with-pm`)
+# https://github.com/NixOS/nixpkgs/pull/274804#discussion_r1432601476
+, pmixSupport ? false
+} :
+
+let
+  withPmStr = if withPm != [ ] then builtins.concatStringsSep ":" withPm else "no";
+in
+
+assert (ch4backend.pname == "ucx" || ch4backend.pname == "libfabric");
+
+stdenv.mkDerivation  rec {
+  pname = "mpich";
+  version = "4.2.0";
+
+  src = fetchurl {
+    url = "https://www.mpich.org/static/downloads/${version}/mpich-${version}.tar.gz";
+    sha256 = "sha256-pkpmeBueUxKtBS0yaJ4jJS90WyfuiBisKsDIIJvAuQ4=";
+  };
+
+  outputs = [ "out" "doc" "man" ];
+
+  configureFlags = [
+    "--enable-shared"
+    "--with-pm=${withPmStr}"
+  ] ++ lib.optionals (lib.versionAtLeast gfortran.version "10") [
+    "FFLAGS=-fallow-argument-mismatch" # https://github.com/pmodels/mpich/issues/4300
+    "FCFLAGS=-fallow-argument-mismatch"
+  ] ++ lib.optionals pmixSupport [
+    "--with-pmix"
+  ];
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ gfortran python3 ];
+  buildInputs = [ perl openssh hwloc ]
+    ++ lib.optional (!stdenv.isDarwin) ch4backend
+    ++ lib.optional pmixSupport pmix;
+
+
+  doCheck = true;
+
+  preFixup = ''
+    # Ensure the default compilers are the ones mpich was built with
+    sed -i 's:CC="gcc":CC=${stdenv.cc}/bin/gcc:' $out/bin/mpicc
+    sed -i 's:CXX="g++":CXX=${stdenv.cc}/bin/g++:' $out/bin/mpicxx
+    sed -i 's:FC="gfortran":FC=${gfortran}/bin/gfortran:' $out/bin/mpifort
+  '';
+
+  meta = with lib; {
+    # As far as we know, --with-pmix silently disables all of `--with-pm`
+    broken = pmixSupport && withPm != [ ];
+
+    description = "Implementation of the Message Passing Interface (MPI) standard";
+
+    longDescription = ''
+      MPICH2 is a free high-performance and portable implementation of
+      the Message Passing Interface (MPI) standard, both version 1 and
+      version 2.
+    '';
+    homepage = "http://www.mcs.anl.gov/mpi/mpich2/";
+    license = {
+      url = "http://git.mpich.org/mpich.git/blob/a385d6d0d55e83c3709ae851967ce613e892cd21:/COPYRIGHT";
+      fullName = "MPICH license (permissive)";
+    };
+    maintainers = [ maintainers.markuskowa ];
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mpir/default.nix b/nixpkgs/pkgs/development/libraries/mpir/default.nix
new file mode 100644
index 000000000000..6dd105bdb302
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mpir/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchurl, m4, which, yasm, autoreconfHook, fetchpatch, buildPackages }:
+
+stdenv.mkDerivation rec {
+  pname = "mpir";
+  version = "3.0.0";
+
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+
+  nativeBuildInputs = [ m4 which yasm autoreconfHook ];
+
+  src = fetchurl {
+    url = "https://mpir.org/mpir-${version}.tar.bz2";
+    sha256 = "1fvmhrqdjs925hzr2i8bszm50h00gwsh17p2kn2pi51zrxck9xjj";
+  };
+
+  patches = [
+    # Fixes configure check failures with clang 16 due to implicit definitions of `exit`, which
+    # is an error with newer versions of clang.
+    (fetchpatch {
+      url = "https://github.com/wbhart/mpir/commit/bbc43ca6ae0bec4f64e69c9cd4c967005d6470eb.patch";
+      hash = "sha256-vW+cDK5Hq2hKEyprOJaNbj0bT2FJmMcyZHPE8GUNUWc=";
+    })
+  ];
+
+  configureFlags = [ "--enable-cxx" ]
+    ++ lib.optionals stdenv.isLinux [ "--enable-fat" ];
+
+  meta = {
+    description = "A highly optimised library for bignum arithmetic forked from GMP";
+    license = lib.licenses.lgpl3Plus;
+    maintainers = [lib.maintainers.raskin];
+    platforms = lib.platforms.unix;
+    downloadPage = "https://mpir.org/downloads.html";
+    homepage = "https://mpir.org/";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mps/default.nix b/nixpkgs/pkgs/development/libraries/mps/default.nix
new file mode 100644
index 000000000000..3cc6d9ce3510
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mps/default.nix
@@ -0,0 +1,37 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, sqlite
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mps";
+  version = "1.118.0";
+
+  src = fetchFromGitHub {
+    owner = "Ravenbrook";
+    repo = "mps";
+    rev = "refs/tags/release-${version}";
+    hash = "sha256-3ql3jWLccgnQHKf23B1en+nJ9rxqmHcWd7aBr93YER0=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ sqlite ];
+
+  # needed for 1.116.0 to build with gcc7
+  env.NIX_CFLAGS_COMPILE = toString [
+    "-Wno-implicit-fallthrough"
+    "-Wno-error=clobbered"
+    "-Wno-error=cast-function-type"
+  ];
+
+
+  meta = {
+    description = "A flexible memory management and garbage collection library";
+    homepage    = "https://www.ravenbrook.com/project/mps";
+    license     = lib.licenses.sleepycat;
+    platforms   = lib.platforms.linux;
+    maintainers = [ lib.maintainers.thoughtpolice ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mqtt_cpp/default.nix b/nixpkgs/pkgs/development/libraries/mqtt_cpp/default.nix
new file mode 100644
index 000000000000..fca89f8d0f68
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mqtt_cpp/default.nix
@@ -0,0 +1,30 @@
+{
+  lib,
+  stdenv,
+  fetchFromGitHub,
+  cmake,
+  boost,
+}:
+stdenv.mkDerivation (finalAttrs: {
+  pname = "mqtt_cpp";
+  version = "13.2.1";
+
+  src = fetchFromGitHub {
+    owner = "redboltz";
+    repo = "mqtt_cpp";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-E5dMZ0uJ1AOwiGTxD4qhbO72blplmXHh1gTYGE34H+0=";
+  };
+
+  nativeBuildInputs = [cmake];
+
+  buildInputs = [boost];
+
+  meta = with lib; {
+    description = "MQTT client/server for C++14 based on Boost.Asio";
+    homepage = "https://github.com/redboltz/mqtt_cpp";
+    license = licenses.boost;
+    maintainers = with maintainers; [spalf];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/msgpack-c/default.nix b/nixpkgs/pkgs/development/libraries/msgpack-c/default.nix
new file mode 100644
index 000000000000..41d174bce7d9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/msgpack-c/default.nix
@@ -0,0 +1,44 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, gtest
+, zlib
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "msgpack-c";
+  version = "6.0.0";
+
+  src = fetchFromGitHub {
+    owner = "msgpack";
+    repo = "msgpack-c";
+    rev = "refs/tags/c-${finalAttrs.version}";
+    hash = "sha256-TfC37QKwqvHxsLPgsEqJYkb7mpRQekbntbBPV4v4FO8=";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  cmakeFlags = [
+    "-DMSGPACK_BUILD_EXAMPLES=OFF" # examples are not installed even if built
+  ] ++ lib.optional (!finalAttrs.finalPackage.doCheck) "-DMSGPACK_BUILD_TESTS=OFF";
+
+  checkInputs = [
+    gtest
+    zlib
+  ];
+
+  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
+
+  meta = with lib; {
+    description = "MessagePack implementation for C";
+    homepage = "https://github.com/msgpack/msgpack-c";
+    changelog = "https://github.com/msgpack/msgpack-c/blob/${finalAttrs.src.rev}/CHANGELOG.md";
+    license = licenses.boost;
+    maintainers = with maintainers; [ nickcao ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/msgpack-cxx/default.nix b/nixpkgs/pkgs/development/libraries/msgpack-cxx/default.nix
new file mode 100644
index 000000000000..25ce9a5520d2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/msgpack-cxx/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, boost
+, zlib
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "msgpack-cxx";
+  version = "6.1.0";
+
+  src = fetchFromGitHub {
+    owner = "msgpack";
+    repo = "msgpack-c";
+    rev = "refs/tags/cpp-${finalAttrs.version}";
+    hash = "sha256-VqzFmm3MmMhWyooOsz1d9gwwbn/fnnxpkCFwqKR6los=";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = [
+    boost
+  ];
+
+  cmakeFlags = [
+    "-DMSGPACK_BUILD_DOCS=OFF" # docs are not installed even if built
+  ] ++ lib.optional finalAttrs.finalPackage.doCheck "-DMSGPACK_BUILD_TESTS=ON";
+
+  checkInputs = [
+    zlib
+  ];
+
+  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
+
+  meta = with lib; {
+    description = "MessagePack implementation for C++";
+    homepage = "https://github.com/msgpack/msgpack-c";
+    changelog = "https://github.com/msgpack/msgpack-c/blob/${finalAttrs.src.rev}/CHANGELOG.md";
+    license = licenses.boost;
+    maintainers = with maintainers; [ nickcao ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/msgpack/default.nix b/nixpkgs/pkgs/development/libraries/msgpack/default.nix
new file mode 100644
index 000000000000..d040eff11a32
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/msgpack/default.nix
@@ -0,0 +1,12 @@
+{ callPackage, fetchFromGitHub, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  version = "3.3.0";
+
+  src = fetchFromGitHub {
+    owner  = "msgpack";
+    repo   = "msgpack-c";
+    rev    = "cpp-${version}";
+    sha256 = "02dxgzxlwn8g9ca2j4m0rjvdq1k2iciy6ickj615daz5w8pcjajd";
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/msgpack/generic.nix b/nixpkgs/pkgs/development/libraries/msgpack/generic.nix
new file mode 100644
index 000000000000..a784bc026361
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/msgpack/generic.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, cmake
+, version, src, patches ? [ ]
+, ...
+}:
+
+stdenv.mkDerivation {
+  pname = "msgpack";
+  inherit version;
+
+  inherit src patches;
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "-DMSGPACK_BUILD_EXAMPLES=OFF";
+
+  meta = with lib; {
+    description = "MessagePack implementation for C and C++";
+    homepage    = "https://msgpack.org";
+    license     = licenses.asl20;
+    maintainers = with maintainers; [ redbaron ];
+    platforms   = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/msgpuck/default.nix b/nixpkgs/pkgs/development/libraries/msgpuck/default.nix
new file mode 100644
index 000000000000..cc7b056bb988
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/msgpuck/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "msgpuck";
+  version = "2.0";
+
+  src = fetchFromGitHub {
+    owner = "rtsisyk";
+    repo = "msgpuck";
+    rev = version;
+    sha256 = "0cjq86kncn3lv65vig9cqkqqv2p296ymcjjbviw0j1s85cfflps0";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  meta = with lib; {
+     description = "A simple and efficient MsgPack binary serialization library in a self-contained header file";
+     homepage = "https://github.com/rtsisyk/msgpuck";
+     license = licenses.bsd2;
+     platforms = platforms.all;
+     maintainers = with maintainers; [ izorkin ];
+ };
+}
diff --git a/nixpkgs/pkgs/development/libraries/msilbc/default.nix b/nixpkgs/pkgs/development/libraries/msilbc/default.nix
new file mode 100644
index 000000000000..b5eaee26aa03
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/msilbc/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchurl, ilbc, mediastreamer, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "msilbc";
+  version = "2.1.2";
+
+  src = fetchurl {
+    url = "mirror://savannah/linphone/plugins/sources/${pname}-${version}.tar.gz";
+    sha256 = "07j02y994ybh274fp7ydjvi76h34y2c34ndwjpjfcwwr03b48cfp";
+  };
+
+  propagatedBuildInputs = [ ilbc mediastreamer ];
+  nativeBuildInputs = [ pkg-config ];
+
+  configureFlags = [
+    "ILBC_LIBS=ilbc" "ILBC_CFLAGS=-I${ilbc}/include"
+    "MEDIASTREAMER_LIBS=mediastreamer" "MEDIASTREAMER_CFLAGS=-I${mediastreamer}/include"
+  ];
+
+  meta = with lib; {
+    description = "Mediastreamer plugin for the iLBC audio codec";
+    platforms = platforms.linux;
+    license = licenses.gpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mtdev/default.nix b/nixpkgs/pkgs/development/libraries/mtdev/default.nix
new file mode 100644
index 000000000000..9e6a45e2975a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mtdev/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchurl, evdev-proto }:
+
+stdenv.mkDerivation rec {
+  pname = "mtdev";
+  version = "1.1.6";
+
+  src = fetchurl {
+    url = "https://bitmath.org/code/mtdev/${pname}-${version}.tar.bz2";
+    sha256 = "1q700h9dqcm3zl6c3gj0qxxjcx6ibw2c51wjijydhwdcm26v5mqm";
+  };
+
+  buildInputs = lib.optional stdenv.hostPlatform.isFreeBSD evdev-proto;
+
+  meta = with lib; {
+    homepage = "https://bitmath.org/code/mtdev/";
+    description = "Multitouch Protocol Translation Library";
+    longDescription = ''
+      The mtdev is a stand-alone library which transforms all variants of
+      kernel MT events to the slotted type B protocol. The events put into
+      mtdev may be from any MT device, specifically type A without contact
+      tracking, type A with contact tracking, or type B with contact tracking.
+      See the kernel documentation for further details.
+    '';
+    license = licenses.mit;
+    platforms = with platforms; freebsd ++ linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mtxclient/default.nix b/nixpkgs/pkgs/development/libraries/mtxclient/default.nix
new file mode 100644
index 000000000000..13816faefce9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mtxclient/default.nix
@@ -0,0 +1,66 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, pkg-config
+, coeurl
+, curl
+, libevent
+, nlohmann_json
+, olm
+, openssl
+, re2
+, spdlog
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mtxclient";
+  version = "0.9.2";
+
+  src = fetchFromGitHub {
+    owner = "Nheko-Reborn";
+    repo = "mtxclient";
+    rev = "v${version}";
+    hash = "sha256-r+bD2L5+3AwkdYa3FwsM+yf7V5w+6ZJC92CMdVeYLJQ=";
+  };
+
+  postPatch = ''
+    # See https://github.com/gabime/spdlog/issues/1897
+    sed -i '1a add_compile_definitions(SPDLOG_FMT_EXTERNAL)' CMakeLists.txt
+  '';
+
+  cmakeFlags = [
+    # Network requiring tests can't be disabled individually:
+    # https://github.com/Nheko-Reborn/mtxclient/issues/22
+    "-DBUILD_LIB_TESTS=OFF"
+    "-DBUILD_LIB_EXAMPLES=OFF"
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    coeurl
+    curl
+    libevent
+    nlohmann_json
+    olm
+    openssl
+    re2
+    spdlog
+  ];
+
+  meta = with lib; {
+    description = "Client API library for the Matrix protocol.";
+    homepage = "https://github.com/Nheko-Reborn/mtxclient";
+    license = licenses.mit;
+    maintainers = with maintainers; [ fpletz pstn ];
+    platforms = platforms.all;
+    # Should be fixable if a higher clang version is used, see:
+    # https://github.com/NixOS/nixpkgs/pull/85922#issuecomment-619287177
+    broken = stdenv.hostPlatform.isDarwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/multipart-parser-c/default.nix b/nixpkgs/pkgs/development/libraries/multipart-parser-c/default.nix
new file mode 100644
index 000000000000..89665f2efc9a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/multipart-parser-c/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv
+, fetchFromGitHub
+}:
+
+stdenv.mkDerivation rec {
+  pname = "multipart-parser-c";
+  version = "unstable-2015-12-14";
+
+  src = fetchFromGitHub {
+    owner = "iafonov";
+    repo = pname;
+    rev = "772639cf10db6d9f5a655ee9b7eb20b815fab396";
+    sha256 = "056r63vj8f1rwf3wk7jmwhm8ba25l6h1gs6jnkh0schbwcvi56xl";
+  };
+
+  buildPhase = ''
+    make solib
+  '';
+
+  installPhase = ''
+    mkdir -p $out/lib
+    mv lib*${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/
+
+    mkdir -p $out/include
+    mv *.h $out/include/
+  '';
+
+  meta = {
+    description = "Http multipart parser implemented in C ";
+    homepage = "https://github.com/iafonov/multipart-parser-c";
+    license = [ lib.licenses.mit ];
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/muparserx/default.nix b/nixpkgs/pkgs/development/libraries/muparserx/default.nix
new file mode 100644
index 000000000000..8a7d2c8f3646
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/muparserx/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "muparserx";
+  version = "4.0.12";
+
+  src = fetchFromGitHub {
+    owner = "beltoforion";
+    repo = "muparserx";
+    rev = "v${version}";
+    sha256 = "sha256-rekPXmncNdVX6LvPQP1M2Pzs3pyiCCcLPLnPFiyWJ4s=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  doCheck = true;
+  checkPhase = ''
+    echo "***Muparserx self-test***"
+    echo "quit" | ./example > test_result.log
+    cat test_result.log
+    if grep -Fqi "failed" test_result.log; then
+      echo ">=1 muparserx tests failed"
+      exit 1
+    else
+      echo -e "\nmuparserx tests succeeded"
+    fi
+  '';
+
+  meta = with lib; {
+    description = "A C++ Library for Parsing Expressions with Strings, Complex Numbers, Vectors, Matrices and more";
+    homepage = "https://beltoforion.de/en/muparserx/";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ drewrisinger ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mustache-hpp/default.nix b/nixpkgs/pkgs/development/libraries/mustache-hpp/default.nix
new file mode 100644
index 000000000000..ce6dd1d21a9b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mustache-hpp/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "mustache";
+  version = "4.1";
+
+  src = fetchFromGitHub {
+    owner = "kainjow";
+    repo = "Mustache";
+    rev = "v${version}";
+    sha256 = "0r9rbk6v1wpld2ismfsk2lkhbyv3dkf0p03hkjivbj05qkfhvlbb";
+  };
+
+  dontBuild = true;
+
+  installPhase = ''
+    mkdir -p $out/include
+    cp mustache.hpp $out/include
+  '';
+
+  meta = with lib; {
+    description = "Mustache text templates for modern C++";
+    homepage = "https://github.com/kainjow/Mustache";
+    license = licenses.boost;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mustache-tcl/default.nix b/nixpkgs/pkgs/development/libraries/mustache-tcl/default.nix
new file mode 100644
index 000000000000..063c8ea36f71
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mustache-tcl/default.nix
@@ -0,0 +1,32 @@
+{ lib, fetchFromGitHub, tcl, tcllib }:
+
+tcl.mkTclDerivation rec {
+  pname = "mustache-tcl";
+  version = "1.1.3.4";
+
+  src = fetchFromGitHub {
+    owner = "ianka";
+    repo = "mustache.tcl";
+    rev = "v${version}";
+    sha256 = "sha256-apM57LEZ0Y9hXcEPWrKYOoTVtP5QSqiaQrjTHQc3pc4=";
+  };
+
+  buildInputs = [
+    tcllib
+  ];
+
+  unpackPhase = ''
+    mkdir -p $out/lib/mustache-tcl
+    cp $src/mustache.tcl $out/lib/mustache-tcl/mustache.tcl
+    cp $src/pkgIndex.tcl $out/lib/mustache-tcl/pkgIndex.tcl
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/ianka/mustache.tcl";
+    description = "Tcl implementation of the mustache templating language";
+    license = licenses.bsd2;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ nat-418 ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/mutest/default.nix b/nixpkgs/pkgs/development/libraries/mutest/default.nix
new file mode 100644
index 000000000000..f8e02b65774c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mutest/default.nix
@@ -0,0 +1,40 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, meson
+, ninja
+, unstableGitUpdater
+}:
+
+stdenv.mkDerivation {
+  pname = "mutest";
+  version = "0-unstable-2023-02-24";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "ebassi";
+    repo = "mutest";
+    rev = "18a20071773f7c4b75e82a931ef9b916b273b3e5";
+    sha256 = "z0kASte0/I48Fgxhblu24MjGHidWomhfFOhfStGtPn4=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+  ];
+
+  doCheck = true;
+
+  passthru = {
+    updateScript = unstableGitUpdater { };
+  };
+
+  meta = with lib; {
+    homepage = "https://github.com/ebassi/mutest";
+    description = "A BDD testing framework for C, inspired by Mocha";
+    license = licenses.mit;
+    maintainers = with maintainers; [ jtojnar ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mvapich/default.nix b/nixpkgs/pkgs/development/libraries/mvapich/default.nix
new file mode 100644
index 000000000000..2182c4083376
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mvapich/default.nix
@@ -0,0 +1,75 @@
+{ lib, stdenv, fetchurl, pkg-config, bison, numactl, libxml2
+, perl, gfortran, slurm, openssh, hwloc, zlib, makeWrapper
+# InfiniBand dependencies
+, opensm, rdma-core
+# OmniPath dependencies
+, libpsm2, libfabric
+# Compile with slurm as a process manager
+, useSlurm ? false
+# Network type for MVAPICH2
+, network ? "ethernet"
+} :
+
+assert builtins.elem network [ "ethernet" "infiniband" "omnipath" ];
+
+stdenv.mkDerivation rec {
+  pname = "mvapich";
+  version = "2.3.7";
+
+  src = fetchurl {
+    url = "http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-${version}.tar.gz";
+    sha256 = "sha256-w5pEkvS+UN9hAHhXSLoolOI85FCpQSgYHVFtpXV3Ua4=";
+  };
+
+  outputs = [ "out" "doc" "man" ];
+
+  nativeBuildInputs = [ pkg-config bison makeWrapper gfortran ];
+  propagatedBuildInputs = [ numactl rdma-core zlib opensm ];
+  buildInputs = with lib; [
+    numactl
+    libxml2
+    perl
+    openssh
+    hwloc
+  ] ++ optionals (network == "infiniband") [ rdma-core opensm ]
+    ++ optionals (network == "omnipath") [ libpsm2 libfabric ]
+    ++ optional useSlurm slurm;
+
+  configureFlags = with lib; [
+    "--with-pm=hydra"
+    "--enable-fortran=all"
+    "--enable-cxx"
+    "--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" "--disable-ibv-dlopen" ]
+    ++ optionals (network == "omnipath") ["--with-device=ch3:psm" "--with-psm2=${libpsm2}"];
+
+  doCheck = true;
+
+  preFixup = ''
+    # /tmp/nix-build... ends up in the RPATH, fix it manually
+    for entry in $out/bin/mpichversion $out/bin/mpivars; do
+      echo "fix rpath: $entry"
+      patchelf --allowed-rpath-prefixes ${builtins.storeDir} --shrink-rpath $entry
+    done
+
+    # Ensure the default compilers are the ones mvapich was built with
+    substituteInPlace $out/bin/mpicc --replace 'CC="gcc"' 'CC=${stdenv.cc}/bin/cc'
+    substituteInPlace $out/bin/mpicxx --replace 'CXX="g++"' 'CXX=${stdenv.cc}/bin/c++'
+    substituteInPlace $out/bin/mpifort --replace 'FC="gfortran"' 'FC=${gfortran}/bin/gfortran'
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "MPI-3.1 implementation optimized for Infiband transport";
+    homepage = "https://mvapich.cse.ohio-state.edu";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.markuskowa ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mygui/default.nix b/nixpkgs/pkgs/development/libraries/mygui/default.nix
new file mode 100644
index 000000000000..c785e640ccb0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mygui/default.nix
@@ -0,0 +1,70 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, boost
+, freetype
+, libuuid
+, ois
+, withOgre ? false
+, ogre
+, libGL
+, libGLU
+, libX11
+, Cocoa
+}:
+
+let
+  renderSystem = if withOgre then "3" else "4";
+in
+stdenv.mkDerivation rec {
+  pname = "mygui";
+  version = "3.4.2";
+
+  src = fetchFromGitHub {
+    owner = "MyGUI";
+    repo = "mygui";
+    rev = "MyGUI${version}";
+    hash = "sha256-yBV0ImOFJlqBPqqOjXYe4SFO2liSGZCEwvehED5Ubj4=";
+  };
+
+  patches = [
+    ./disable-framework.patch
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    boost
+    freetype
+    libuuid
+    ois
+  ] ++ lib.optionals withOgre [
+    ogre
+  ] ++ lib.optionals (!withOgre && stdenv.isLinux) [
+    libGL
+    libGLU
+  ] ++ lib.optionals stdenv.isLinux [
+    libX11
+  ] ++ lib.optionals stdenv.isDarwin [
+    Cocoa
+  ];
+
+  # Tools are disabled due to compilation failures.
+  cmakeFlags = [
+    "-DMYGUI_BUILD_TOOLS=OFF"
+    "-DMYGUI_BUILD_DEMOS=OFF"
+    "-DMYGUI_RENDERSYSTEM=${renderSystem}"
+  ];
+
+  meta = with lib; {
+    homepage = "http://mygui.info/";
+    description = "Library for creating GUIs for games and 3D applications";
+    license = licenses.mit;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mygui/disable-framework.patch b/nixpkgs/pkgs/development/libraries/mygui/disable-framework.patch
new file mode 100644
index 000000000000..d497c862ac8a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mygui/disable-framework.patch
@@ -0,0 +1,20 @@
+diff --git a/CMake/Utils/MyGUIConfigTargets.cmake b/CMake/Utils/MyGUIConfigTargets.cmake
+index 7e279c986..b33f097c0 100644
+--- a/CMake/Utils/MyGUIConfigTargets.cmake
++++ b/CMake/Utils/MyGUIConfigTargets.cmake
+@@ -418,15 +418,6 @@ function(mygui_config_lib PROJECTNAME)
+ 		if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "Intel")
+ 			# add GCC visibility flags to shared library build
+ 			set_target_properties(${PROJECTNAME} PROPERTIES COMPILE_FLAGS "${MYGUI_GCC_VISIBILITY_FLAGS}")
+-			if (APPLE)
+-				# deal with Mac OS X's framework system
+-				set_target_properties(${PROJECTNAME} PROPERTIES FRAMEWORK TRUE)
+-				set_target_properties(${PROJECTNAME} PROPERTIES PUBLIC_HEADER "${${PROJECTNAME}_HEADERS}")
+-				set_target_properties(${PROJECTNAME} PROPERTIES OUTPUT_NAME ${PROJECTNAME})
+-				set_target_properties(${PROJECTNAME} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE)
+-				set_target_properties(${PROJECTNAME} PROPERTIES BUILD_WITH_INSTALL_NAME_DIR TRUE)
+-				set_target_properties(${PROJECTNAME} PROPERTIES INSTALL_NAME_DIR "@executable_path/../lib")
+-			endif (APPLE)
+ 		endif ()
+ 	endif (MYGUI_STATIC)
+ 	mygui_install_target(${PROJECTNAME} "")
diff --git a/nixpkgs/pkgs/development/libraries/mypaint-brushes/1.0.nix b/nixpkgs/pkgs/development/libraries/mypaint-brushes/1.0.nix
new file mode 100644
index 000000000000..73acfd9287f7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mypaint-brushes/1.0.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv
+, autoconf
+, automake
+, fetchFromGitHub
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mypaint-brushes";
+  version = "1.3.1";
+
+  src = fetchFromGitHub {
+    owner = "mypaint";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1c95l1vfz7sbrdlzrbz7h1p6s1k113kyjfd9wfnxlm0p6562cz3j";
+  };
+
+  nativeBuildInputs = [
+    autoconf
+    automake
+    pkg-config
+  ];
+
+  preConfigure = "./autogen.sh";
+
+  meta = with lib; {
+    homepage = "http://mypaint.org/";
+    description = "Brushes used by MyPaint and other software using libmypaint";
+    license = licenses.cc0;
+    maintainers = with maintainers; [ jtojnar ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mypaint-brushes/default.nix b/nixpkgs/pkgs/development/libraries/mypaint-brushes/default.nix
new file mode 100644
index 000000000000..acdee52b85ef
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mypaint-brushes/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv
+, autoconf
+, automake
+, fetchFromGitHub
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mypaint-brushes";
+  version = "2.0.2";
+
+  src = fetchFromGitHub {
+    owner = "mypaint";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0kcqz13vzpy24dhmrx9hbs6s7hqb8y305vciznm15h277sabpmw9";
+  };
+
+  nativeBuildInputs = [
+    autoconf
+    automake
+    pkg-config
+  ];
+
+  preConfigure = "./autogen.sh";
+
+  meta = with lib; {
+    homepage = "http://mypaint.org/";
+    description = "Brushes used by MyPaint and other software using libmypaint";
+    license = licenses.cc0;
+    maintainers = with maintainers; [ jtojnar ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/mythes/default.nix b/nixpkgs/pkgs/development/libraries/mythes/default.nix
new file mode 100644
index 000000000000..4683940b9cc6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mythes/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl, hunspell, ncurses, pkg-config, perl }:
+
+stdenv.mkDerivation rec {
+  pname = "mythes";
+  version = "1.2.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/hunspell/mythes-${version}.tar.gz";
+    sha256 = "0prh19wy1c74kmzkkavm9qslk99gz8h8wmjvwzjc6lf8v2az708y";
+  };
+
+  buildInputs = [ hunspell ];
+  nativeBuildInputs = [ ncurses pkg-config perl ];
+
+  meta = {
+    homepage = "https://hunspell.sourceforge.net/";
+    description = "Thesaurus library from Hunspell project";
+    license = lib.licenses.bsd3;
+    inherit (hunspell.meta) platforms;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/nanodbc/default.nix b/nixpkgs/pkgs/development/libraries/nanodbc/default.nix
new file mode 100644
index 000000000000..7fca00c1d459
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nanodbc/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub, catch2, cmake, unixODBC }:
+
+stdenv.mkDerivation rec {
+  pname = "nanodbc";
+  version = "2.14.0";
+
+  src = fetchFromGitHub {
+    owner = "nanodbc";
+    repo = "nanodbc";
+    rev = "v${version}";
+    hash = "sha256-dVUOwA7LfLqcQq2nc6OAha0krmgTy5RUHupBVrNdo4g=";
+  };
+
+  postPatch = ''
+    cp ${catch2}/include/catch2/catch.hpp test/catch/catch.hpp
+  '';
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ unixODBC ];
+
+  cmakeFlags = if (stdenv.hostPlatform.isStatic) then
+    [ "-DBUILD_STATIC_LIBS=ON" ]
+  else
+    [ "-DBUILD_SHARED_LIBS=ON" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/nanodbc/nanodbc";
+    changelog = "https://github.com/nanodbc/nanodbc/raw/v${version}/CHANGELOG.md";
+    description = "Small C++ wrapper for the native C ODBC API";
+    license = licenses.mit;
+    maintainers = [ maintainers.bzizou ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/nanoflann/default.nix b/nixpkgs/pkgs/development/libraries/nanoflann/default.nix
new file mode 100644
index 000000000000..b740e83f4c25
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nanoflann/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, buildExamples ? false
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  version = "1.5.4";
+  pname = "nanoflann";
+
+  src = fetchFromGitHub {
+    owner = "jlblancoc";
+    repo = "nanoflann";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-7Vt/x9jHRqtVTv0MbHxIwd1/cTUB4aIgOiI+7cz0iu0=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [
+    (lib.cmakeBool "BUILD_EXAMPLES" buildExamples)
+  ];
+
+  doCheck = true;
+  checkTarget = "test";
+
+  meta = {
+    homepage = "https://github.com/jlblancoc/nanoflann";
+    description = "Header only C++ library for approximate nearest neighbor search";
+    longDescription = ''
+      nanoflann is a C++11 header-only library for building KD-Trees of datasets
+      with different topologies: R2, R3 (point clouds), SO(2) and SO(3) (2D and
+      3D rotation groups). No support for approximate NN is provided. nanoflann
+      does not require compiling or installing. You just need to #include
+      <nanoflann.hpp> in your code.
+
+      This library is a fork of the flann library by Marius Muja and David
+      G. Lowe, and born as a child project of MRPT. Following the original
+      license terms, nanoflann is distributed under the BSD license. Please, for
+      bugs use the issues button or fork and open a pull request.
+    '';
+    changelog = "https://github.com/jlblancoc/nanoflann/blob/v${finalAttrs.version}/CHANGELOG.md";
+    license = lib.licenses.bsd2;
+    maintainers = [ lib.maintainers.AndersonTorres ];
+    platforms = lib.platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/nanomsg/default.nix b/nixpkgs/pkgs/development/libraries/nanomsg/default.nix
new file mode 100644
index 000000000000..d7b7409dad14
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nanomsg/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, cmake, fetchFromGitHub, fetchpatch }:
+
+stdenv.mkDerivation rec {
+  version = "1.1.5";
+  pname = "nanomsg";
+
+  src = fetchFromGitHub {
+    owner = "nanomsg";
+    repo = "nanomsg";
+    rev = version;
+    sha256 = "01ddfzjlkf2dgijrmm3j3j8irccsnbgfvjcnwslsfaxnrmrq5s64";
+  };
+
+  patches = [
+    # Add pkgconfig fix from https://github.com/nanomsg/nanomsg/pull/1085
+    (fetchpatch {
+      url = "https://github.com/nanomsg/nanomsg/commit/e3323f19579529d272cb1d55bd6b653c4f34c064.patch";
+      sha256 = "URz7TAqqpKxqjgvQqNX4WNSShwiEzAvO2h0hCZ2NhVY=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  # https://github.com/nanomsg/nanomsg/issues/1082
+  postPatch = ''
+    substituteInPlace src/pkgconfig.in \
+      --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
+  '';
+
+  meta = with lib; {
+    description= "Socket library that provides several common communication patterns";
+    homepage = "https://nanomsg.org/";
+    license = licenses.mit;
+    mainProgram = "nanocat";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/nanopb/default.nix b/nixpkgs/pkgs/development/libraries/nanopb/default.nix
new file mode 100644
index 000000000000..5353bac3e1a3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nanopb/default.nix
@@ -0,0 +1,76 @@
+{ callPackage
+, cmake
+, fetchFromGitHub
+, lib
+, protobuf
+, python3
+, stdenv
+, buildPackages
+, mallocBuild ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "nanopb";
+  version = "0.4.6";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-B9J+GkgOBR4iZaP6/2ykcjbkifoyhkuukkjK/CLBZj0=";
+  };
+
+  nativeBuildInputs = [ cmake python3 python3.pkgs.wrapPython ];
+
+  pythonPath = with python3.pkgs; [ python3.pkgs.protobuf six ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON" # generate $out/lib/libprotobuf-nanopb.so{.0,}
+    "-DBUILD_STATIC_LIBS=ON" # generate $out/lib/libprotobuf-nanopb.a
+    "-Dnanopb_PROTOC_PATH=${buildPackages.protobuf}/bin/protoc"
+  ] ++ lib.optional mallocBuild "-DCMAKE_C_FLAGS=-DPB_ENABLE_MALLOC 1";
+
+  postInstall = ''
+    mkdir -p $out/share/nanopb/generator/proto
+    cp ../generator/proto/nanopb.proto $out/share/nanopb/generator/proto/nanopb.proto
+    cp ../pb_common.c ../pb_decode.c ../pb_encode.c $out/include/
+  '';
+
+  postFixup = ''
+    wrapPythonPrograms
+  '';
+
+  passthru.tests = {
+    simple-proto2 = callPackage ./test-simple-proto2 {};
+    simple-proto3 = callPackage ./test-simple-proto3 {};
+    message-with-annotations = callPackage ./test-message-with-annotations {};
+    message-with-options = callPackage ./test-message-with-options {};
+  };
+
+  meta = with lib; {
+    inherit (protobuf.meta) platforms;
+
+    description = "Protocol Buffers with small code size";
+    homepage = "https://jpa.kapsi.fi/nanopb/";
+    license = licenses.zlib;
+    maintainers = with maintainers; [ kalbasit ];
+
+    longDescription = ''
+      Nanopb is a small code-size Protocol Buffers implementation in ansi C. It
+      is especially suitable for use in microcontrollers, but fits any memory
+      restricted system.
+
+      - Homepage: jpa.kapsi.fi/nanopb
+      - Documentation: jpa.kapsi.fi/nanopb/docs
+      - Downloads: jpa.kapsi.fi/nanopb/download
+      - Forum: groups.google.com/forum/#!forum/nanopb
+
+      In order to use the nanopb options in your proto files, you'll need to
+      tell protoc where to find the nanopb.proto file.
+      You can do so with the --proto_path (-I) option to add the directory
+      ''${nanopb}/share/nanopb/generator/proto like so:
+
+      protoc --proto_path=. --proto_path=''${nanopb}/share/nanopb/generator/proto --plugin=protoc-gen-nanopb=''${nanopb}/bin/protoc-gen-nanopb --nanopb_out=out file.proto
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/nanopb/test-message-with-annotations/default.nix b/nixpkgs/pkgs/development/libraries/nanopb/test-message-with-annotations/default.nix
new file mode 100644
index 000000000000..9eca4dbb9368
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nanopb/test-message-with-annotations/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, protobuf, nanopb }:
+
+stdenv.mkDerivation {
+  name = "nanopb-test-message-with-annotations";
+  meta.timeout = 60;
+  src = ./.;
+
+  # protoc requires any .proto file to be compiled to reside within it's
+  # proto_path. By default the current directory is automatically added to the
+  # proto_path. I tried using --proto_path ${./.} ${./simple.proto} and it did
+  # not work because they end up in the store at different locations.
+  dontInstall = true;
+  buildPhase = ''
+    mkdir $out
+
+    ${protobuf}/bin/protoc --proto_path=. --proto_path=${nanopb}/share/nanopb/generator/proto --plugin=protoc-gen-nanopb=${nanopb}/bin/protoc-gen-nanopb --nanopb_out=$out withannotations.proto
+  '';
+
+  doCheck = true;
+  checkPhase = ''
+    grep -q WithAnnotations $out/withannotations.pb.c || (echo "error: WithAnnotations not found in $out/withannotations.pb.c"; exit 1)
+    grep -q WithAnnotations $out/withannotations.pb.h || (echo "error: WithAnnotations not found in $out/withannotations.pb.h"; exit 1)
+    grep -q "pb_byte_t uuid\[16\]" $out/withannotations.pb.h || (echo "error: uuid is not of type pb_byte_t and of size 16 in $out/withannotations.pb.h"; exit 1)
+    grep -q "FIXED_LENGTH_BYTES, uuid" $out/withannotations.pb.h || (echo "error: uuid is not of fixed lenght bytes in $out/withannotations.pb.h"; exit 1)
+    grep -q "#define WithAnnotations_size" $out/withannotations.pb.h || (echo "error: the size of WithAnnotations is not known in $out/withannotations.pb.h"; exit 1)
+  '';
+}
diff --git a/nixpkgs/pkgs/development/libraries/nanopb/test-message-with-annotations/withannotations.proto b/nixpkgs/pkgs/development/libraries/nanopb/test-message-with-annotations/withannotations.proto
new file mode 100644
index 000000000000..d8109e877d68
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nanopb/test-message-with-annotations/withannotations.proto
@@ -0,0 +1,7 @@
+syntax = "proto3";
+
+import "nanopb.proto";
+
+message WithAnnotations {
+  bytes uuid = 1 [(nanopb).max_size = 16, (nanopb).fixed_length = true];
+}
diff --git a/nixpkgs/pkgs/development/libraries/nanopb/test-message-with-options/default.nix b/nixpkgs/pkgs/development/libraries/nanopb/test-message-with-options/default.nix
new file mode 100644
index 000000000000..0030158df91b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nanopb/test-message-with-options/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, protobuf, nanopb }:
+
+stdenv.mkDerivation {
+  name = "nanopb-test-message-with-options";
+  meta.timeout = 60;
+  src = ./.;
+
+  # protoc requires any .proto file to be compiled to reside within it's
+  # proto_path. By default the current directory is automatically added to the
+  # proto_path. I tried using --proto_path ${./.} ${./simple.proto} and it did
+  # not work because they end up in the store at different locations.
+  dontInstall = true;
+  buildPhase = ''
+    mkdir $out
+
+    ${protobuf}/bin/protoc --plugin=protoc-gen-nanopb=${nanopb}/bin/protoc-gen-nanopb --nanopb_out=$out withoptions.proto
+  '';
+
+  doCheck = true;
+  checkPhase = ''
+    grep -q WithOptions $out/withoptions.pb.c || (echo "error: WithOptions not found in $out/withoptions.pb.c"; exit 1)
+    grep -q WithOptions $out/withoptions.pb.h || (echo "error: WithOptions not found in $out/withoptions.pb.h"; exit 1)
+    grep -q "pb_byte_t uuid\[16\]" $out/withoptions.pb.h || (echo "error: uuid is not of type pb_byte_t and of size 16 in $out/withoptions.pb.h"; exit 1)
+    grep -q "FIXED_LENGTH_BYTES, uuid" $out/withoptions.pb.h || (echo "error: uuid is not of fixed lenght bytes in $out/withoptions.pb.h"; exit 1)
+    grep -q "#define WithOptions_size" $out/withoptions.pb.h || (echo "error: the size of WithOptions is not known in $out/withoptions.pb.h"; exit 1)
+  '';
+}
diff --git a/nixpkgs/pkgs/development/libraries/nanopb/test-message-with-options/withoptions.options b/nixpkgs/pkgs/development/libraries/nanopb/test-message-with-options/withoptions.options
new file mode 100644
index 000000000000..ecf98a217367
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nanopb/test-message-with-options/withoptions.options
@@ -0,0 +1 @@
+ WithOptions.uuid max_size:16 fixed_length:true
diff --git a/nixpkgs/pkgs/development/libraries/nanopb/test-message-with-options/withoptions.proto b/nixpkgs/pkgs/development/libraries/nanopb/test-message-with-options/withoptions.proto
new file mode 100644
index 000000000000..5a5da3a1c973
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nanopb/test-message-with-options/withoptions.proto
@@ -0,0 +1,5 @@
+syntax = "proto3";
+
+message WithOptions {
+  bytes uuid = 1;
+}
diff --git a/nixpkgs/pkgs/development/libraries/nanopb/test-simple-proto2/default.nix b/nixpkgs/pkgs/development/libraries/nanopb/test-simple-proto2/default.nix
new file mode 100644
index 000000000000..d1d3e1a855a7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nanopb/test-simple-proto2/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, protobuf, nanopb }:
+
+stdenv.mkDerivation {
+  name = "nanopb-test-simple-proto2";
+  meta.timeout = 60;
+  src = ./.;
+
+  # protoc requires any .proto file to be compiled to reside within it's
+  # proto_path. By default the current directory is automatically added to the
+  # proto_path. I tried using --proto_path ${./.} ${./simple.proto} and it did
+  # not work because they end up in the store at different locations.
+  dontInstall = true;
+  buildPhase = ''
+    mkdir $out
+
+    ${protobuf}/bin/protoc --plugin=protoc-gen-nanopb=${nanopb}/bin/protoc-gen-nanopb --nanopb_out=$out simple.proto
+  '';
+
+  doCheck = true;
+  checkPhase = ''
+    grep -q SimpleMessage $out/simple.pb.c || (echo "ERROR: SimpleMessage not found in $out/simple.pb.c"; exit 1)
+    grep -q SimpleMessage $out/simple.pb.h || (echo "ERROR: SimpleMessage not found in $out/simple.pb.h"; exit 1)
+  '';
+}
diff --git a/nixpkgs/pkgs/development/libraries/nanopb/test-simple-proto2/simple.proto b/nixpkgs/pkgs/development/libraries/nanopb/test-simple-proto2/simple.proto
new file mode 100644
index 000000000000..b02936b1ae26
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nanopb/test-simple-proto2/simple.proto
@@ -0,0 +1,5 @@
+syntax = "proto2";
+
+message SimpleMessage {
+  required int32 lucky_number = 1;
+}
diff --git a/nixpkgs/pkgs/development/libraries/nanopb/test-simple-proto3/default.nix b/nixpkgs/pkgs/development/libraries/nanopb/test-simple-proto3/default.nix
new file mode 100644
index 000000000000..71507054458f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nanopb/test-simple-proto3/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, protobuf, nanopb }:
+
+stdenv.mkDerivation {
+  name = "nanopb-test-simple-proto3";
+  meta.timeout = 60;
+  src = ./.;
+
+  # protoc requires any .proto file to be compiled to reside within it's
+  # proto_path. By default the current directory is automatically added to the
+  # proto_path. I tried using --proto_path ${./.} ${./simple.proto} and it did
+  # not work because they end up in the store at different locations.
+  dontInstall = true;
+  buildPhase = ''
+    mkdir $out
+
+    ${protobuf}/bin/protoc --plugin=protoc-gen-nanopb=${nanopb}/bin/protoc-gen-nanopb --nanopb_out=$out simple.proto
+  '';
+
+  doCheck = true;
+  checkPhase = ''
+    grep -q SimpleMessage $out/simple.pb.c || (echo "ERROR: SimpleMessage not found in $out/simple.pb.c"; exit 1)
+    grep -q SimpleMessage $out/simple.pb.h || (echo "ERROR: SimpleMessage not found in $out/simple.pb.h"; exit 1)
+  '';
+}
diff --git a/nixpkgs/pkgs/development/libraries/nanopb/test-simple-proto3/simple.proto b/nixpkgs/pkgs/development/libraries/nanopb/test-simple-proto3/simple.proto
new file mode 100644
index 000000000000..6b99cdb5daa7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nanopb/test-simple-proto3/simple.proto
@@ -0,0 +1,5 @@
+syntax = "proto3";
+
+message SimpleMessage {
+  int32 lucky_number = 1;
+}
diff --git a/nixpkgs/pkgs/development/libraries/nanosvg/default.nix b/nixpkgs/pkgs/development/libraries/nanosvg/default.nix
new file mode 100644
index 000000000000..2033069d77e2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nanosvg/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation {
+  pname = "nanosvg";
+  version = "unstable-2022-12-04";
+
+  src = fetchFromGitHub {
+    owner = "memononen";
+    repo = "nanosvg";
+    rev = "9da543e8329fdd81b64eb48742d8ccb09377aed1";
+    hash = "sha256-VOiN6583DtzGYPRkl19VG2QvSzl4T9HaynBuNcvZf94=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "Simple stupid SVG parser";
+    homepage = "https://github.com/memononen/nanosvg";
+    license = licenses.zlib;
+    platforms = platforms.all;
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/ncnn/cmakelists.patch b/nixpkgs/pkgs/development/libraries/ncnn/cmakelists.patch
new file mode 100644
index 000000000000..a43d7b0c4b72
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ncnn/cmakelists.patch
@@ -0,0 +1,35 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 785e2cd..459024d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -589,7 +589,8 @@ endif()
+ if(NCNN_VULKAN)
+     if(NCNN_SYSTEM_GLSLANG)
+         find_package(Threads)
+-        find_package(glslang QUIET)
++        find_package(SPIRV-Tools-opt REQUIRED)
++        find_package(glslang REQUIRED)
+         if(glslang_FOUND)
+             add_library(glslang ALIAS glslang::glslang)
+             add_library(SPIRV ALIAS glslang::SPIRV)
+@@ -601,7 +602,6 @@ if(NCNN_VULKAN)
+                 set(NCNN_SYSTEM_GLSLANG OFF)
+             else()
+                 include("${GLSLANG_TARGET_DIR}/OSDependentTargets.cmake")
+-                include("${GLSLANG_TARGET_DIR}/OGLCompilerTargets.cmake")
+                 if(EXISTS "${GLSLANG_TARGET_DIR}/HLSLTargets.cmake")
+                     # hlsl support can be optional
+                     include("${GLSLANG_TARGET_DIR}/HLSLTargets.cmake")
+diff --git a/src/ncnn.pc.in b/src/ncnn.pc.in
+index b580fce..be2becd 100644
+--- a/src/ncnn.pc.in
++++ b/src/ncnn.pc.in
+@@ -1,6 +1,6 @@
+ prefix=${pcfiledir}/../..

+-librarydir=${prefix}/@CMAKE_INSTALL_LIBDIR@

+-includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@

++librarydir=@CMAKE_INSTALL_FULL_LIBDIR@

++includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@

+ 

+ Name: @CMAKE_PROJECT_NAME@

+ Description: high-performance neural network inference framework optimized for the mobile platform

diff --git a/nixpkgs/pkgs/development/libraries/ncnn/default.nix b/nixpkgs/pkgs/development/libraries/ncnn/default.nix
new file mode 100644
index 000000000000..71b4bbc8fd42
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ncnn/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, vulkan-headers
+, vulkan-loader
+, glslang
+, opencv
+, protobuf
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ncnn";
+  version = "20240102";
+
+  src = fetchFromGitHub {
+    owner = "Tencent";
+    repo = pname;
+    rev = version;
+    hash = "sha256-kk70oLY+2QJOkyYq10whLRMxBuibQMWMOBA9dcbKf/I=";
+  };
+
+  patches = [
+    ./cmakelists.patch
+  ];
+
+  cmakeFlags = [
+    "-DNCNN_CMAKE_VERBOSE=1" # Only for debugging the build
+    "-DNCNN_SHARED_LIB=1"
+    "-DNCNN_ENABLE_LTO=1"
+    "-DNCNN_VULKAN=1"
+    "-DNCNN_BUILD_EXAMPLES=0"
+    "-DNCNN_BUILD_TOOLS=0"
+    "-DNCNN_SYSTEM_GLSLANG=1"
+    "-DNCNN_PYTHON=0" # Should be an attribute
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ vulkan-headers vulkan-loader glslang opencv protobuf ];
+
+  meta = with lib; {
+    description = "ncnn is a high-performance neural network inference framework optimized for the mobile platform";
+    homepage = "https://github.com/Tencent/ncnn";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ tilcreator ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/nco/default.nix b/nixpkgs/pkgs/development/libraries/nco/default.nix
new file mode 100644
index 000000000000..87f0b8b3a031
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nco/default.nix
@@ -0,0 +1,62 @@
+{ antlr2
+, coreutils
+, curl
+, fetchFromGitHub
+, flex
+, gsl
+, lib
+, libtool
+, netcdf
+, netcdfcxx4
+, stdenv
+, udunits
+, which
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "nco";
+  version = "5.2.0";
+
+  src = fetchFromGitHub {
+    owner = "nco";
+    repo = "nco";
+    rev = finalAttrs.version;
+    hash = "sha256-eYGGIf7OXaLFu4XleCMw1Y4rCjGkWhOnvqixGExk1kk=";
+  };
+
+  nativeBuildInputs = [
+    antlr2
+    flex
+    which
+  ];
+
+  buildInputs = [
+    coreutils
+    curl
+    gsl
+    netcdf
+    netcdfcxx4
+    udunits
+  ];
+
+  postPatch = ''
+    substituteInPlace src/nco/nco_fl_utl.c \
+      --replace "/bin/cp" "${coreutils}/bin/cp"
+
+    substituteInPlace src/nco/nco_fl_utl.c \
+      --replace "/bin/mv" "${coreutils}/bin/mv"
+  '';
+
+  makeFlags = lib.optionals stdenv.isDarwin [ "LIBTOOL=${libtool}/bin/libtool" ];
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "NetCDF Operator toolkit";
+    homepage = "https://nco.sourceforge.net/";
+    license = lib.licenses.bsd3;
+    longDescription = "The NCO (netCDF Operator) toolkit manipulates and analyzes data stored in netCDF-accessible formats, including DAP, HDF4, and HDF5";
+    maintainers = with lib.maintainers; [ bzizou ];
+    platforms = lib.platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/ncurses/default.nix b/nixpkgs/pkgs/development/libraries/ncurses/default.nix
new file mode 100644
index 000000000000..2d383c876cba
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ncurses/default.nix
@@ -0,0 +1,203 @@
+{ lib
+, stdenv
+, fetchurl
+, buildPackages
+, ncurses
+, pkg-config
+, abiVersion ? "6"
+, enableStatic ? stdenv.hostPlatform.isStatic
+, withCxx ? !stdenv.hostPlatform.useAndroidPrebuilt
+, mouseSupport ? false, gpm
+, unicodeSupport ? true
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  version = "6.4";
+  pname = "ncurses" + lib.optionalString (abiVersion == "5") "-abi5-compat";
+
+  src = fetchurl {
+    url = "https://invisible-island.net/archives/ncurses/ncurses-${finalAttrs.version}.tar.gz";
+    hash = "sha256-aTEoPZrIfFBz8wtikMTHXyFjK7T8NgOsgQCBK+0kgVk=";
+  };
+
+  outputs = [ "out" "dev" "man" ];
+  setOutputFlags = false; # some aren't supported
+
+  configureFlags = [
+    (lib.withFeature (!enableStatic) "shared")
+    "--without-debug"
+    "--enable-pc-files"
+    "--enable-symlinks"
+    "--with-manpage-format=normal"
+    "--disable-stripping"
+    "--with-versioned-syms"
+  ] ++ lib.optional unicodeSupport "--enable-widec"
+    ++ lib.optional (!withCxx) "--without-cxx"
+    ++ lib.optional (abiVersion == "5") "--with-abi-version=5"
+    ++ lib.optional stdenv.hostPlatform.isNetBSD "--enable-rpath"
+    ++ lib.optionals stdenv.hostPlatform.isWindows [
+      "--enable-sp-funcs"
+      "--enable-term-driver"
+  ] ++ lib.optionals (stdenv.hostPlatform.isUnix && stdenv.hostPlatform.isStatic) [
+      # For static binaries, the point is to have a standalone binary with
+      # minimum dependencies. So here we make sure that binaries using this
+      # package won't depend on a terminfo database located in the Nix store.
+      "--with-terminfo-dirs=${lib.concatStringsSep ":" [
+        "/etc/terminfo" # Debian, Fedora, Gentoo
+        "/lib/terminfo" # Debian
+        "/usr/share/terminfo" # upstream default, probably all FHS-based distros
+        "/run/current-system/sw/share/terminfo" # NixOS
+      ]}"
+  ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
+    "--with-build-cc=${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}cc"
+  ];
+
+  # Only the C compiler, and explicitly not C++ compiler needs this flag on solaris:
+  CFLAGS = lib.optionalString stdenv.isSunOS "-D_XOPEN_SOURCE_EXTENDED";
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    pkg-config
+  ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
+   # for `tic`, build already depends on for build `cc` so it's weird the build doesn't just build `tic`.
+    ncurses
+  ];
+
+  buildInputs = lib.optional (mouseSupport && stdenv.isLinux) gpm;
+
+  preConfigure = ''
+    export PKG_CONFIG_LIBDIR="$dev/lib/pkgconfig"
+    mkdir -p "$PKG_CONFIG_LIBDIR"
+    configureFlagsArray+=(
+      "--libdir=$out/lib"
+      "--includedir=$dev/include"
+      "--bindir=$dev/bin"
+      "--mandir=$man/share/man"
+      "--with-pkg-config-libdir=$PKG_CONFIG_LIBDIR"
+    )
+  ''
+  + lib.optionalString stdenv.isSunOS ''
+    sed -i -e '/-D__EXTENSIONS__/ s/-D_XOPEN_SOURCE=\$cf_XOPEN_SOURCE//' \
+           -e '/CPPFLAGS="$CPPFLAGS/s/ -D_XOPEN_SOURCE_EXTENDED//' \
+        configure
+    CFLAGS=-D_XOPEN_SOURCE_EXTENDED
+  '';
+
+  enableParallelBuilding = true;
+
+  doCheck = false;
+
+  postFixup = let
+    abiVersion-extension = if stdenv.isDarwin then "${abiVersion}.$dylibtype" else "$dylibtype.${abiVersion}"; in
+  ''
+    # Determine what suffixes our libraries have
+    suffix="$(awk -F': ' 'f{print $3; f=0} /default library suffix/{f=1}' config.log)"
+  ''
+  # When building a wide-character (Unicode) build, create backward
+  # compatibility links from the the "normal" libraries to the
+  # wide-character libraries (e.g. libncurses.so to libncursesw.so).
+  + lib.optionalString unicodeSupport ''
+    libs="$(ls $dev/lib/pkgconfig | tr ' ' '\n' | sed "s,\(.*\)$suffix\.pc,\1,g")"
+    suffixes="$(echo "$suffix" | awk '{for (i=1; i < length($0); i++) {x=substr($0, i+1, length($0)-i); print x}}')"
+
+    # Get the path to the config util
+    cfg=$(basename $dev/bin/ncurses*-config)
+
+    # symlink the full suffixed include directory
+    ln -svf . $dev/include/ncurses$suffix
+
+    for newsuffix in $suffixes ""; do
+      # Create a non-abi versioned config util links
+      ln -svf $cfg $dev/bin/ncurses$newsuffix-config
+
+      # Allow for end users who #include <ncurses?w/*.h>
+      ln -svf . $dev/include/ncurses$newsuffix
+
+      for library in $libs; do
+        for dylibtype in so dll dylib; do
+          if [ -e "$out/lib/lib''${library}$suffix.$dylibtype" ]; then
+            ln -svf lib''${library}$suffix.$dylibtype $out/lib/lib$library$newsuffix.$dylibtype
+            ln -svf lib''${library}$suffix.${abiVersion-extension} $out/lib/lib$library$newsuffix.${abiVersion-extension}
+            if [ "ncurses" = "$library" ]
+            then
+              # make libtinfo symlinks
+              ln -svf lib''${library}$suffix.$dylibtype $out/lib/libtinfo$newsuffix.$dylibtype
+              ln -svf lib''${library}$suffix.${abiVersion-extension} $out/lib/libtinfo$newsuffix.${abiVersion-extension}
+            fi
+          fi
+        done
+        for statictype in a dll.a la; do
+          if [ -e "$out/lib/lib''${library}$suffix.$statictype" ]; then
+            ln -svf lib''${library}$suffix.$statictype $out/lib/lib$library$newsuffix.$statictype
+            if [ "ncurses" = "$library" ]
+            then
+              # make libtinfo symlinks
+              ln -svf lib''${library}$suffix.$statictype $out/lib/libtinfo$newsuffix.$statictype
+            fi
+          fi
+        done
+        ln -svf ''${library}$suffix.pc $dev/lib/pkgconfig/$library$newsuffix.pc
+      done
+    done
+    ''
+    # Unconditional patches. Leading newline is to avoid mass rebuilds.
+    + ''
+
+    # add pkg-config aliases for libraries that are built-in to libncurses(w)
+    for library in tinfo tic; do
+      for suffix in "" ${lib.optionalString unicodeSupport "w"}; do
+        ln -svf ncurses$suffix.pc $dev/lib/pkgconfig/$library$suffix.pc
+      done
+    done
+
+    # move some utilities to $bin
+    # these programs are used at runtime and don't really belong in $dev
+    moveToOutput "bin/clear" "$out"
+    moveToOutput "bin/reset" "$out"
+    moveToOutput "bin/tabs" "$out"
+    moveToOutput "bin/tic" "$out"
+    moveToOutput "bin/tput" "$out"
+    moveToOutput "bin/tset" "$out"
+    moveToOutput "bin/captoinfo" "$out"
+    moveToOutput "bin/infotocap" "$out"
+    moveToOutput "bin/infocmp" "$out"
+  '';
+
+  preFixup = lib.optionalString (!stdenv.hostPlatform.isCygwin && !enableStatic) ''
+    rm "$out"/lib/*.a
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.gnu.org/software/ncurses/";
+    description = "Free software emulation of curses in SVR4 and more";
+    longDescription = ''
+      The Ncurses (new curses) library is a free software emulation of curses in
+      System V Release 4.0, and more. It uses Terminfo format, supports pads and
+      color and multiple highlights and forms characters and function-key
+      mapping, and has all the other SYSV-curses enhancements over BSD Curses.
+
+      The ncurses code was developed under GNU/Linux. It has been in use for
+      some time with OpenBSD as the system curses library, and on FreeBSD and
+      NetBSD as an external package. It should port easily to any
+      ANSI/POSIX-conforming UNIX. It has even been ported to OS/2 Warp!
+    '';
+    license = licenses.mit;
+    pkgConfigModules = let
+      base = [
+        "form"
+        "menu"
+        "ncurses"
+        "panel"
+      ] ++ lib.optional withCxx "ncurses++";
+    in base ++ lib.optionals unicodeSupport (map (p: p + "w") base);
+    platforms = platforms.all;
+  };
+
+  passthru = {
+    ldflags = "-lncurses";
+    inherit unicodeSupport abiVersion;
+    tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/ndi/default.nix b/nixpkgs/pkgs/development/libraries/ndi/default.nix
new file mode 100644
index 000000000000..06eb1b815069
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ndi/default.nix
@@ -0,0 +1,77 @@
+{ lib, stdenv, requireFile, avahi, obs-studio-plugins }:
+
+let
+  versionJSON = lib.importJSON ./version.json;
+  ndiPlatform =
+    if stdenv.isAarch64 then "aarch64-rpi4-linux-gnueabi"
+    else if stdenv.isAarch32 then "arm-rpi2-linux-gnueabihf"
+    else if stdenv.isx86_64 then "x86_64-linux-gnu"
+    else if stdenv.isi686 then "i686-linux-gnu"
+    else throw "unsupported platform for NDI SDK";
+in
+stdenv.mkDerivation rec {
+  pname = "ndi";
+  version = versionJSON.version;
+  majorVersion = builtins.head (builtins.splitVersion version);
+  installerName = "Install_NDI_SDK_v${majorVersion}_Linux";
+
+  src = requireFile rec {
+    name    = "${installerName}.tar.gz";
+    sha256  = versionJSON.hash;
+    message = ''
+      In order to use NDI SDK version ${version}, you need to comply with
+      NewTek's license and download the appropriate Linux tarball from:
+
+        ${meta.homepage}
+
+      Once you have downloaded the file, please use the following command and
+      re-run the installation:
+
+        \$ nix-prefetch-url file://\$PWD/${name}
+    '';
+  };
+
+  buildInputs = [ avahi ];
+
+  unpackPhase = ''
+    unpackFile $src
+    echo y | ./${installerName}.sh
+    sourceRoot="NDI SDK for Linux";
+  '';
+
+  installPhase = ''
+    mkdir $out
+    mv bin/${ndiPlatform} $out/bin
+    for i in $out/bin/*; do
+      if [ -L "$i" ]; then continue; fi
+      patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$i"
+    done
+    patchelf --set-rpath "${avahi}/lib:${stdenv.cc.libc}/lib" $out/bin/ndi-record
+    mv lib/${ndiPlatform} $out/lib
+    for i in $out/lib/*; do
+      if [ -L "$i" ]; then continue; fi
+      patchelf --set-rpath "${avahi}/lib:${stdenv.cc.libc}/lib" "$i"
+    done
+    mv include examples $out/
+    mkdir -p $out/share/doc/${pname}-${version}
+    mv licenses $out/share/doc/${pname}-${version}/licenses
+    mv documentation/* $out/share/doc/${pname}-${version}/
+  '';
+
+  # Stripping breaks ndi-record.
+  dontStrip = true;
+
+  passthru.tests = {
+    inherit (obs-studio-plugins) obs-ndi;
+  };
+  passthru.updateScript = ./update.py;
+
+  meta = with lib; {
+    homepage = "https://ndi.video/ndi-sdk/";
+    description = "NDI Software Developer Kit";
+    platforms = ["x86_64-linux" "i686-linux" "aarch64-linux" "armv7l-linux"];
+    hydraPlatforms = [];
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+    license = licenses.unfree;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ndi/update.py b/nixpkgs/pkgs/development/libraries/ndi/update.py
new file mode 100755
index 000000000000..e80260210368
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ndi/update.py
@@ -0,0 +1,77 @@
+#!/usr/bin/env nix-shell
+#! nix-shell -i python -p "python3.withPackages (ps: with ps; [ ps.absl-py ps.requests ])"
+
+import hashlib
+import io
+import json
+import os.path
+import tarfile
+
+import requests
+from absl import app, flags
+
+BASE_NAME = "Install_NDI_SDK_v5_Linux"
+NDI_SDK_URL = f"https://downloads.ndi.tv/SDK/NDI_SDK_Linux/{BASE_NAME}.tar.gz"
+NDI_EXEC = f"{BASE_NAME}.sh"
+
+NDI_ARCHIVE_MAGIC = b"__NDI_ARCHIVE_BEGIN__\n"
+
+FLAG_out = flags.DEFINE_string("out", None, "Path to read/write version.json from/to.")
+
+
+def find_version_json() -> str:
+    if FLAG_out.value:
+        return FLAG_out.value
+    try_paths = ["pkgs/development/libraries/ndi/version.json", "version.json"]
+    for path in try_paths:
+        if os.path.exists(path):
+            return path
+    raise Exception(
+        "Couldn't figure out where to write version.json; try specifying --out"
+    )
+
+
+def fetch_tarball() -> bytes:
+    r = requests.get(NDI_SDK_URL)
+    r.raise_for_status()
+    return r.content
+
+
+def read_version(tarball: bytes) -> str:
+    # Find the inner script.
+    outer_tarfile = tarfile.open(fileobj=io.BytesIO(tarball), mode="r:gz")
+    eula_script = outer_tarfile.extractfile(NDI_EXEC).read()
+
+    # Now find the archive embedded within the script.
+    archive_start = eula_script.find(NDI_ARCHIVE_MAGIC) + len(NDI_ARCHIVE_MAGIC)
+    inner_tarfile = tarfile.open(
+        fileobj=io.BytesIO(eula_script[archive_start:]), mode="r:gz"
+    )
+
+    # Now find Version.txt...
+    version_txt = (
+        inner_tarfile.extractfile("NDI SDK for Linux/Version.txt")
+        .read()
+        .decode("utf-8")
+    )
+    _, _, version = version_txt.strip().partition(" v")
+    return version
+
+
+def main(argv):
+    tarball = fetch_tarball()
+
+    sha256 = hashlib.sha256(tarball).hexdigest()
+    version = {
+        "hash": f"sha256:{sha256}",
+        "version": read_version(tarball),
+    }
+
+    out_path = find_version_json()
+    with open(out_path, "w") as f:
+        json.dump(version, f)
+        f.write("\n")
+
+
+if __name__ == "__main__":
+    app.run(main)
diff --git a/nixpkgs/pkgs/development/libraries/ndi/version.json b/nixpkgs/pkgs/development/libraries/ndi/version.json
new file mode 100644
index 000000000000..686abdb2c2b7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ndi/version.json
@@ -0,0 +1 @@
+{"hash": "sha256:4ff4b92f2c5f42d234aa7d142e2de7e9b045c72b46ad5149a459d48efd9218de", "version": "5.6.0"}
diff --git a/nixpkgs/pkgs/development/libraries/ndn-cxx/default.nix b/nixpkgs/pkgs/development/libraries/ndn-cxx/default.nix
new file mode 100644
index 000000000000..d7b31426c4f6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ndn-cxx/default.nix
@@ -0,0 +1,63 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, doxygen
+, pkg-config
+, python3
+, python3Packages
+, wafHook
+, boost179
+, openssl
+, sqlite
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ndn-cxx";
+  version = "0.8.1";
+
+  src = fetchFromGitHub {
+    owner = "named-data";
+    repo = "ndn-cxx";
+    rev = "${pname}-${version}";
+    sha256 = "sha256-nnnxlkYVTSRB6ZcuIUDFol999+amGtqegHXK+06ITK8=";
+  };
+
+  nativeBuildInputs = [ doxygen pkg-config python3 python3Packages.sphinx wafHook ];
+
+  buildInputs = [ boost179 openssl sqlite ];
+
+  wafConfigureFlags = [
+    "--with-openssl=${openssl.dev}"
+    "--boost-includes=${boost179.dev}/include"
+    "--boost-libs=${boost179.out}/lib"
+    "--with-tests"
+  ];
+
+  doCheck = false; # some tests fail in upstream, some fail because of the sandbox environment
+  checkPhase = ''
+    runHook preCheck
+    LD_PRELOAD=build/libndn-cxx.so build/unit-tests
+    runHook postCheck
+  '';
+
+  meta = with lib; {
+    homepage = "https://named-data.net/";
+    description = "A Named Data Networking (NDN) or Content Centric Networking (CCN) abstraction";
+    longDescription = ''
+      ndn-cxx is a C++ library, implementing Named Data Networking (NDN)
+      primitives that can be used to implement various NDN applications.
+      NDN operates by addressing and delivering Content Objects directly
+      by Name instead of merely addressing network end-points. In addition,
+      the NDN security model explicitly secures individual Content Objects
+      rather than securing the connection or “pipe”. Named and secured
+      content resides in distributed caches automatically populated on
+      demand or selectively pre-populated. When requested by name, NDN
+      delivers named content to the user from the nearest cache, thereby
+      traversing fewer network hops, eliminating redundant requests,
+      and consuming less resources overall.
+    '';
+    license = licenses.lgpl3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ sjmackenzie bertof ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ndpi/default.nix b/nixpkgs/pkgs/development/libraries/ndpi/default.nix
new file mode 100644
index 000000000000..94e249425717
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ndpi/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, stdenv
+, autoreconfHook
+, fetchFromGitHub
+, json_c
+, libpcap
+, libtool
+, pkg-config
+, which
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "ndpi";
+  version = "4.8";
+
+  src = fetchFromGitHub {
+    owner = "ntop";
+    repo = "nDPI";
+    rev = "refs/tags/${finalAttrs.version}";
+    hash = "sha256-V3hRDQ141pbR5jJK2QlP7BF2CEbuzqIvo+iTx3EGhRY=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    libtool
+    pkg-config
+    which
+  ];
+
+  buildInputs = [
+    json_c
+    libpcap
+  ];
+
+  meta = with lib; {
+    description = "A library for deep-packet inspection";
+    longDescription = ''
+      nDPI is a library for deep-packet inspection based on OpenDPI.
+    '';
+    homepage = "https://www.ntop.org/products/deep-packet-inspection/ndpi/";
+    changelog = "https://github.com/ntop/nDPI/blob/${finalAttrs.version}/CHANGELOG.md";
+    license = with licenses; [ lgpl3Plus bsd3 ];
+    maintainers = with maintainers; [ takikawa ];
+    mainProgram = "ndpiReader";
+    platforms = with platforms; unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/neardal/default.nix b/nixpkgs/pkgs/development/libraries/neardal/default.nix
new file mode 100644
index 000000000000..485c803d4cbe
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/neardal/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, pkg-config, glib, readline, makeWrapper }:
+
+stdenv.mkDerivation {
+  pname = "neardal";
+  version = "unstable-0.7-post-git-2015-09-30";
+
+  src = fetchFromGitHub {
+    owner = "connectivity";
+    repo = "neardal";
+    rev = "5b1c8b5c2c45c10f11cee12fbcb397f8953850d7";
+    sha256 = "12qwg7qiw2wfpaxfg2fjkmj5lls0g33xp6w433g8bnkvwlq4s29g";
+  };
+
+  nativeBuildInputs = [ pkg-config makeWrapper autoconf automake ];
+  buildInputs = [ glib readline ];
+
+  preConfigure = ''
+    substituteInPlace "ncl/Makefile.am" --replace "noinst_PROGRAMS" "bin_PROGRAMS"
+    substituteInPlace "demo/Makefile.am" --replace "noinst_PROGRAMS" "bin_PROGRAMS"
+    sh autogen.sh
+  '';
+
+  configureFlags = [ "--disable-dependency-tracking" "--disable-traces" ];
+
+  meta = with lib; {
+    broken = true; # 2022-11-13
+    description = "C APIs to exchange datas with the NFC daemon 'Neard'";
+    license = licenses.lgpl2;
+    homepage = "https://01.org/linux-nfc";
+    maintainers = with maintainers; [ ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/neatvnc/default.nix b/nixpkgs/pkgs/development/libraries/neatvnc/default.nix
new file mode 100644
index 000000000000..281689c60b67
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/neatvnc/default.nix
@@ -0,0 +1,66 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, meson
+, ninja
+, pkg-config
+, aml
+, ffmpeg
+, gnutls
+, libjpeg_turbo
+, mesa
+, pixman
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "neatvnc";
+  version = "0.7.2";
+
+  src = fetchFromGitHub {
+    owner = "any1";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-S2LMD15MYd/t/Z8B1OQ0hVrZQLR6Gf4LB45mhmDwblg=";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+  ];
+
+  buildInputs = [
+    aml
+    ffmpeg
+    gnutls
+    libjpeg_turbo
+    mesa
+    pixman
+    zlib
+  ];
+
+  mesonFlags = [
+    (lib.mesonBool "tests" true)
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "A VNC server library";
+    longDescription = ''
+      This is a liberally licensed VNC server library that's intended to be
+      fast and neat. Goals:
+      - Speed
+      - Clean interface
+      - Interoperability with the Freedesktop.org ecosystem
+    '';
+    inherit (src.meta) homepage;
+    changelog = "https://github.com/any1/neatvnc/releases/tag/v${version}";
+    license = licenses.isc;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ nickcao ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/nemo-qml-plugin-dbus/default.nix b/nixpkgs/pkgs/development/libraries/nemo-qml-plugin-dbus/default.nix
new file mode 100644
index 000000000000..a07a692f295e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nemo-qml-plugin-dbus/default.nix
@@ -0,0 +1,33 @@
+{ mkDerivation, lib, fetchFromGitLab, qmake, qtbase }:
+
+mkDerivation rec {
+  pname = "nemo-qml-plugin-dbus";
+  version = "2.1.24";
+
+  src = fetchFromGitLab {
+    domain = "git.sailfishos.org";
+    owner = "mer-core";
+    repo = "nemo-qml-plugin-dbus";
+    rev = version;
+    sha256 = "1ilg929456d3k0xkvxa5r4k7i4kkw9i8kgah5xx1yq0d9wka0l77";
+  };
+
+  nativeBuildInputs = [ qmake ];
+
+  postPatch = ''
+    substituteInPlace dbus.pro --replace ' tests' ""
+    substituteInPlace src/nemo-dbus/nemo-dbus.pro \
+      --replace /usr $out \
+      --replace '$$[QT_INSTALL_LIBS]' $out'/lib'
+    substituteInPlace src/plugin/plugin.pro \
+      --replace '$$[QT_INSTALL_QML]' $out'/${qtbase.qtQmlPrefix}'
+  '';
+
+  meta = with lib; {
+    description = "Nemo DBus plugin for qml";
+    homepage = "https://git.sailfishos.org/mer-core/nemo-qml-plugin-dbus/";
+    license = licenses.lgpl2Only;
+    maintainers = [ maintainers.Thra11 ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/neon/darwin-fix-configure.patch b/nixpkgs/pkgs/development/libraries/neon/darwin-fix-configure.patch
new file mode 100644
index 000000000000..b8bbd288f7a2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/neon/darwin-fix-configure.patch
@@ -0,0 +1,12 @@
+diff -Nuar neon-0.29.6/configure neon-0.29.6-darwin-fix-configure/configure
+--- neon-0.29.6/configure	2011-05-03 14:25:31.000000000 +0200
++++ neon-0.29.6-darwin-fix-configure/configure	2012-06-06 23:32:21.000000000 +0200
+@@ -4184,7 +4184,7 @@
+ case x"$ne_cv_os_uname" in #(
+   x"Darwin") :
+ 
+-  CPPFLAGS="$CPPFLAGS -no-cpp-precomp"
++  CPPFLAGS="$CPPFLAGS"
+   LDFLAGS="$LDFLAGS -flat_namespace"
+   # poll has various issues in various Darwin releases
+   if test x${ac_cv_func_poll+set} != xset; then
diff --git a/nixpkgs/pkgs/development/libraries/neon/default.nix b/nixpkgs/pkgs/development/libraries/neon/default.nix
new file mode 100644
index 000000000000..f26dbf5ace45
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/neon/default.nix
@@ -0,0 +1,54 @@
+{ lib, stdenv, fetchurl, libxml2, pkg-config
+, compressionSupport ? true, zlib ? null
+, sslSupport ? true, openssl ? null
+, static ? stdenv.hostPlatform.isStatic
+, shared ? !stdenv.hostPlatform.isStatic
+, bash
+}:
+
+assert compressionSupport -> zlib != null;
+assert sslSupport -> openssl != null;
+assert static || shared;
+
+let
+   inherit (lib) optionals;
+in
+
+stdenv.mkDerivation rec {
+  version = "0.32.5";
+  pname = "neon";
+
+  src = fetchurl {
+    url = "https://notroj.github.io/${pname}/${pname}-${version}.tar.gz";
+    sha256 = "sha256-SHLhL4Alct7dSwL4cAZYFLLVFB99va9wju2rgmtRpYo=";
+  };
+
+  patches = optionals stdenv.isDarwin [ ./darwin-fix-configure.patch ];
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [libxml2 openssl bash]
+    ++ lib.optional compressionSupport zlib;
+
+  strictDeps = true;
+
+  configureFlags = [
+    (lib.enableFeature shared "shared")
+    (lib.enableFeature static "static")
+    (lib.withFeature compressionSupport "zlib")
+    (lib.withFeature sslSupport "ssl")
+  ];
+
+  preConfigure = ''
+    export PKG_CONFIG="$(command -v "$PKG_CONFIG")"
+  '';
+
+  passthru = {inherit compressionSupport sslSupport;};
+
+  meta = with lib; {
+    description = "An HTTP and WebDAV client library";
+    homepage = "https://notroj.github.io/neon/";
+    changelog = "https://github.com/notroj/${pname}/blob/${version}/NEWS";
+    platforms = platforms.unix;
+    license = licenses.lgpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/netcdf-cxx4/cmake-h5free.patch b/nixpkgs/pkgs/development/libraries/netcdf-cxx4/cmake-h5free.patch
new file mode 100644
index 000000000000..7d1723c3ef98
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/netcdf-cxx4/cmake-h5free.patch
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 60c699d..606b972 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -402,7 +402,7 @@ ELSE(MSVC)
+   FIND_PACKAGE(HDF5 COMPONENTS C HL REQUIRED)
+ ENDIF(MSVC)
+ 
+-CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5free_memory "" HAVE_H5FREE_MEMORY)
++CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARIES} H5free_memory "" HAVE_H5FREE_MEMORY)
+ IF(NOT HAVE_H5FREE_MEMORY)
+   MESSAGE(STATUS "Plugin support requires libhdf5 with H5Free support. Your libhdf5 install does not provide H5Free.  Please install a newer version of libhdf5 if you require plugin compression support.")
+   SET(NC_HAS_DEF_VAR_FILTER "")
diff --git a/nixpkgs/pkgs/development/libraries/netcdf-cxx4/default.nix b/nixpkgs/pkgs/development/libraries/netcdf-cxx4/default.nix
new file mode 100644
index 000000000000..945eb219229f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/netcdf-cxx4/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchFromGitHub, netcdf, hdf5, curl, cmake, ninja }:
+stdenv.mkDerivation rec {
+  pname = "netcdf-cxx4";
+  version = "4.3.1";
+
+  src = fetchFromGitHub {
+    owner = "Unidata";
+    repo = "netcdf-cxx4";
+    rev = "v${version}";
+    sha256 = "sha256-GZ6n7dW3l8Kqrk2Xp2mxRTUWWQj0XEd2LDTG9EtrfhY=";
+  };
+
+  patches = [
+    # This fix is included upstream, remove with next upgrade
+    ./cmake-h5free.patch
+  ];
+
+  preConfigure = ''
+    cmakeFlags+="-Dabs_top_srcdir=$(readlink -f ./)"
+  '';
+
+  nativeBuildInputs = [ cmake ninja ];
+  buildInputs = [ netcdf hdf5 curl ];
+
+  doCheck = true;
+  enableParallelChecking = false;
+  preCheck = ''
+    export HDF5_PLUGIN_PATH=${netcdf}/lib/hdf5-plugins
+  '';
+
+  meta = {
+    description = "C++ API to manipulate netcdf files";
+    homepage = "https://www.unidata.ucar.edu/software/netcdf/";
+    license = lib.licenses.free;
+    platforms = lib.platforms.unix;
+    broken = stdenv.isDarwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/netcdf-fortran/default.nix b/nixpkgs/pkgs/development/libraries/netcdf-fortran/default.nix
new file mode 100644
index 000000000000..d64d631f94ce
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/netcdf-fortran/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, netcdf, hdf5, curl, gfortran, CoreFoundation }:
+stdenv.mkDerivation rec {
+  pname = "netcdf-fortran";
+  version = "4.4.5";
+
+  src = fetchFromGitHub {
+    owner = "Unidata";
+    repo = "netcdf-fortran";
+    rev = "v${version}";
+    sha256 = "sha256-nC93NcA4VJbrqaLwyhjP10j/t6rQSYcAzKBxclpZVe0=";
+  };
+
+  nativeBuildInputs = [ gfortran ];
+  buildInputs = [ netcdf hdf5 curl ]
+    ++ 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/";
+    license = licenses.free;
+    maintainers = [ maintainers.bzizou ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/netcdf/default.nix b/nixpkgs/pkgs/development/libraries/netcdf/default.nix
new file mode 100644
index 000000000000..0796e7997d50
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/netcdf/default.nix
@@ -0,0 +1,86 @@
+{ lib, stdenv
+, fetchurl, unzip
+, hdf5
+, bzip2
+, libzip
+, zstd
+, szipSupport ? false
+, szip
+, libxml2
+, m4
+, curl # for DAP
+, removeReferencesTo
+}:
+
+let
+  inherit (hdf5) mpiSupport mpi;
+in stdenv.mkDerivation rec {
+  pname = "netcdf" + lib.optionalString mpiSupport "-mpi";
+  version = "4.9.2";
+
+  src = fetchurl {
+    url = "https://downloads.unidata.ucar.edu/netcdf-c/${version}/netcdf-c-${version}.tar.gz";
+    hash = "sha256-zxG6u725lj8J9VB54LAZ9tA3H1L44SZKW6jp/asabEg=";
+  };
+
+  postPatch = ''
+    patchShebangs .
+
+    # this test requires the net
+    for a in ncdap_test/Makefile.am ncdap_test/Makefile.in; do
+      substituteInPlace $a --replace testurl.sh " "
+    done
+
+    # Prevent building the tests from prepending `#!/bin/bash` and wiping out the patched shenbangs.
+    substituteInPlace nczarr_test/Makefile.in \
+      --replace '#!/bin/bash' '${stdenv.shell}'
+  '';
+
+  nativeBuildInputs = [ m4 removeReferencesTo ];
+
+  buildInputs = [
+    curl
+    hdf5
+    libxml2
+    mpi
+    bzip2
+    libzip
+    zstd
+  ] ++ lib.optional szipSupport szip;
+
+  passthru = {
+    inherit mpiSupport mpi;
+  };
+
+  configureFlags = [
+      "--enable-netcdf-4"
+      "--enable-dap"
+      "--enable-shared"
+      "--disable-dap-remote-tests"
+      "--with-plugin-dir=${placeholder "out"}/lib/hdf5-plugins"
+  ]
+  ++ (lib.optionals mpiSupport [ "--enable-parallel-tests" "CC=${lib.getDev mpi}/bin/mpicc" ]);
+
+  enableParallelBuilding = true;
+
+  disallowedReferences = [ stdenv.cc ];
+
+  postFixup = ''
+    remove-references-to -t ${stdenv.cc} "$(readlink -f $out/lib/libnetcdf.settings)"
+  '';
+
+  doCheck = !mpiSupport;
+  nativeCheckInputs = [ unzip ];
+
+  preCheck = ''
+    export HOME=$TEMP
+  '';
+
+  meta = {
+    description = "Libraries for the Unidata network Common Data Format";
+    platforms = lib.platforms.unix;
+    homepage = "https://www.unidata.ucar.edu/software/netcdf/";
+    changelog = "https://docs.unidata.ucar.edu/netcdf-c/${version}/RELEASE_NOTES.html";
+    license = lib.licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/nettle/cygwin.patch b/nixpkgs/pkgs/development/libraries/nettle/cygwin.patch
new file mode 100644
index 000000000000..d5036237c8d5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nettle/cygwin.patch
@@ -0,0 +1,12 @@
+Cygwin sucks.  Patch suggested by Niel Möller.
+
+--- nettle-2.0/examples/setup-env	2009-06-08 20:27:12.000000000 +0200
++++ nettle-2.0/examples/setup-env	2009-09-18 16:58:03.000000000 +0200
+@@ -3,5 +3,5 @@
+ set -e
+ 
+ if [ -x rsa-keygen ] ; then
+-  ./rsa-keygen -r rsa-decrypt -o testkey || exit 1
++  ./rsa-keygen -r rsa-decrypt.exe -o testkey || exit 1
+ fi
+
diff --git a/nixpkgs/pkgs/development/libraries/nettle/default.nix b/nixpkgs/pkgs/development/libraries/nettle/default.nix
new file mode 100644
index 000000000000..3a1297f89763
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nettle/default.nix
@@ -0,0 +1,10 @@
+{ callPackage, fetchurl }:
+
+callPackage ./generic.nix rec {
+  version = "3.9.1";
+
+  src = fetchurl {
+    url = "mirror://gnu/nettle/nettle-${version}.tar.gz";
+    hash = "sha256-zP7/mBsMpxu9b7ywVPQHxg/7ZEOJpb6A1nFtW1UMbOM=";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/nettle/generic.nix b/nixpkgs/pkgs/development/libraries/nettle/generic.nix
new file mode 100644
index 000000000000..44afdf45513f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nettle/generic.nix
@@ -0,0 +1,68 @@
+{ lib, stdenv, buildPackages, gmp, gnum4
+
+# Version specific args
+, version, src
+}:
+
+stdenv.mkDerivation {
+  pname = "nettle";
+
+  inherit version src;
+
+  outputs = [ "out" "dev" ];
+  outputBin = "dev";
+
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+  nativeBuildInputs = [ gnum4 ];
+  propagatedBuildInputs = [ gmp ];
+
+  configureFlags =
+    # runtime selection of HW-accelerated code; it's default since 3.7
+    [ "--enable-fat" ]
+    # Make sure the right <gmp.h> is found, and not the incompatible
+    # /usr/include/mp.h from OpenSolaris.  See
+    # <https://lists.gnu.org/archive/html/hydra-users/2012-08/msg00000.html>
+    # for details.
+    ++ lib.optional stdenv.isSunOS "--with-include-path=${gmp.dev}/include";
+
+  doCheck = (stdenv.hostPlatform.system != "i686-cygwin" && !stdenv.isDarwin);
+
+  enableParallelBuilding = true;
+
+  patches = lib.optional (stdenv.hostPlatform.system == "i686-cygwin")
+              ./cygwin.patch;
+
+  meta = with lib; {
+    description = "Cryptographic library";
+
+    longDescription = ''
+        Nettle is a cryptographic library that is designed to fit
+        easily in more or less any context: In crypto toolkits for
+        object-oriented languages (C++, Python, Pike, ...), in
+        applications like LSH or GNUPG, or even in kernel space.  In
+        most contexts, you need more than the basic cryptographic
+        algorithms, you also need some way to keep track of available
+        algorithms, their properties and variants.  You often have
+        some algorithm selection process, often dictated by a protocol
+        you want to implement.
+
+        And as the requirements of applications differ in subtle and
+        not so subtle ways, an API that fits one application well can
+        be a pain to use in a different context.  And that is why
+        there are so many different cryptographic libraries around.
+
+        Nettle tries to avoid this problem by doing one thing, the
+        low-level crypto stuff, and providing a simple but general
+        interface to it.  In particular, Nettle doesn't do algorithm
+        selection.  It doesn't do memory allocation. It doesn't do any
+        I/O.
+     '';
+
+     license = licenses.gpl2Plus;
+
+     homepage = "https://www.lysator.liu.se/~nisse/nettle/";
+
+     platforms = platforms.all;
+     maintainers = [ maintainers.vcunat ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/networking-ts-cxx/default.nix b/nixpkgs/pkgs/development/libraries/networking-ts-cxx/default.nix
new file mode 100644
index 000000000000..7dc6d4b11fee
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/networking-ts-cxx/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "networking-ts-cxx";
+  version = "2019-02-27";
+
+  # Used until https://github.com/chriskohlhoff/networking-ts-impl/issues/17 is
+  # resolved and we can generate in Nix.
+  src = fetchFromGitHub {
+    owner = "chriskohlhoff";
+    repo = "networking-ts-impl";
+    rev = "c97570e7ceef436581be3c138868a19ad96e025b";
+    sha256 = "12b5lg989nn1b8v6x9fy3cxsf3hs5hr67bd1mfyh8pjikir7zv6j";
+  };
+
+  installPhase = ''
+    mkdir -p $out/{include,lib/pkgconfig}
+    cp -r include $out/
+    substituteAll ${./networking_ts.pc.in} $out/lib/pkgconfig/networking_ts.pc
+  '';
+
+  meta = with lib; {
+    description = "Experimental implementation of the C++ Networking Technical Specification";
+    homepage = "https://github.com/chriskohlhoff/networking-ts-impl";
+    license = licenses.boost;
+    maintainers = with maintainers; [ bhipple ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/networking-ts-cxx/networking_ts.pc.in b/nixpkgs/pkgs/development/libraries/networking-ts-cxx/networking_ts.pc.in
new file mode 100644
index 000000000000..d52f68f4c155
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/networking-ts-cxx/networking_ts.pc.in
@@ -0,0 +1,8 @@
+prefix=@out@
+includedir=${prefix}/include
+
+Name: networking_ts
+Description: Experimental implementation of the C++ Networking Technical Specification
+URL: https://github.com/chriskohlhoff/networking-ts-impl
+Version: ${networking_ts_version}
+Cflags: -isystem${includedir}
diff --git a/nixpkgs/pkgs/development/libraries/newt/default.nix b/nixpkgs/pkgs/development/libraries/newt/default.nix
new file mode 100644
index 000000000000..e5dbb563cfb5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/newt/default.nix
@@ -0,0 +1,60 @@
+{ lib, fetchurl, stdenv, slang, popt, python }:
+
+let
+  pythonIncludePath = "${lib.getDev python}/include/python";
+in
+stdenv.mkDerivation rec {
+  pname = "newt";
+  version = "0.52.24";
+
+  src = fetchurl {
+    url = "https://releases.pagure.org/${pname}/${pname}-${version}.tar.gz";
+    sha256 = "sha256-Xe1+Ih+F9kJSHEmxgmyN4ZhFqjcrr11jClF3S1RPvbs=";
+  };
+
+  postPatch = ''
+    sed -i -e s,/usr/bin/install,install, -e s,-I/usr/include/slang,, Makefile.in po/Makefile
+
+    substituteInPlace configure \
+      --replace "/usr/include/python" "${pythonIncludePath}"
+    substituteInPlace configure.ac \
+      --replace "/usr/include/python" "${pythonIncludePath}"
+
+    substituteInPlace Makefile.in \
+      --replace "ar rv" "${stdenv.cc.targetPrefix}ar rv"
+  '';
+
+  strictDeps = true;
+  nativeBuildInputs = [ python ];
+  buildInputs = [ slang popt ];
+
+  NIX_LDFLAGS = "-lncurses";
+
+  preConfigure = ''
+    # If CPP is set explicitly, configure and make will not agree about which
+    # programs to use at different stages.
+    unset CPP
+  '';
+
+  configureFlags = lib.optionals stdenv.isDarwin [
+    "--disable-nls"
+  ];
+
+  makeFlags = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
+    "CROSS_COMPILE=${stdenv.cc.targetPrefix}"
+  ];
+
+  postFixup = lib.optionalString stdenv.isDarwin ''
+    install_name_tool -id $out/lib/libnewt.so.${version} $out/lib/libnewt.so.${version}
+    install_name_tool -change libnewt.so.${version} $out/lib/libnewt.so.${version} $out/bin/whiptail
+  '';
+
+  meta = with lib; {
+    description = "Library for color text mode, widget based user interfaces";
+    homepage = "https://pagure.io/newt";
+    changelog = "https://pagure.io/newt/blob/master/f/CHANGES";
+    license = licenses.lgpl2;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ viric ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/nghttp2/default.nix b/nixpkgs/pkgs/development/libraries/nghttp2/default.nix
new file mode 100644
index 000000000000..f4ae615b6e94
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nghttp2/default.nix
@@ -0,0 +1,103 @@
+{ lib
+, stdenv
+, fetchurl
+, installShellFiles
+, pkg-config
+
+# Optional dependencies
+, enableApp ? with stdenv.hostPlatform; !isWindows && !isStatic
+, c-aresMinimal, libev, openssl, zlib
+, enableGetAssets ? false, libxml2
+, enableHpack ? false, jansson
+, enableHttp3 ? false, ngtcp2, nghttp3, quictls
+, enableJemalloc ? false, jemalloc
+, enablePython ? false, python3, ncurses
+
+# Unit tests ; we have to set TZDIR, which is a GNUism.
+, enableTests ? stdenv.hostPlatform.isGnu, cunit, tzdata
+
+# downstream dependencies, for testing
+, curl
+, libsoup
+}:
+
+# 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.
+
+assert enableGetAssets -> enableApp;
+assert enableHpack -> enableApp;
+assert enableHttp3 -> enableApp;
+assert enableJemalloc -> enableApp;
+
+stdenv.mkDerivation rec {
+  pname = "nghttp2";
+  version = "1.59.0";
+
+  src = fetchurl {
+    url = "https://github.com/${pname}/${pname}/releases/download/v${version}/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-A1P8u6ENKl9304ouSS5eZ3tjexdxI0WkcyXDw1+0d/g=";
+  };
+
+  outputs = [ "out" "dev" "lib" "doc" "man" ];
+
+  nativeBuildInputs = [ pkg-config ]
+    ++ lib.optionals (enableApp) [ installShellFiles ];
+
+  buildInputs = lib.optionals enableApp [ c-aresMinimal libev zlib ]
+    ++ lib.optionals (enableApp && !enableHttp3) [ openssl ]
+    ++ lib.optionals (enableGetAssets) [ libxml2 ]
+    ++ lib.optionals (enableHpack) [ jansson ]
+    ++ lib.optionals (enableJemalloc) [ jemalloc ]
+    ++ lib.optionals (enableHttp3) [ ngtcp2 nghttp3 quictls ]
+    ++ lib.optionals (enablePython) [ python3 ];
+
+  enableParallelBuilding = true;
+
+  configureFlags = [
+    "--disable-examples"
+    (lib.enableFeature enableApp "app")
+    (lib.enableFeature enableHttp3 "http3")
+  ];
+
+  # Unit tests require CUnit and setting TZDIR environment variable
+  doCheck = enableTests;
+  nativeCheckInputs = lib.optionals (enableTests) [ cunit tzdata ];
+  preCheck = lib.optionalString (enableTests) ''
+    export TZDIR=${tzdata}/share/zoneinfo
+  '';
+
+  postInstall = lib.optionalString (enableApp) ''
+    installShellCompletion --bash doc/bash_completion/{h2load,nghttp,nghttpd,nghttpx}
+  '' + lib.optionalString (!enableApp) ''
+    rm -r $out/bin
+  '' + lib.optionalString (enablePython) ''
+    patchShebangs $out/share/nghttp2
+  '' + lib.optionalString (!enablePython) ''
+    rm -r $out/share
+  '';
+
+  passthru.tests = {
+    inherit curl libsoup;
+  };
+
+  meta = with lib; {
+    description = "HTTP/2 C library and tools";
+    longDescription = ''
+      nghttp2 is an implementation of the HyperText Transfer Protocol version 2 in C.
+      The framing layer of HTTP/2 is implemented as a reusable C library. On top of that,
+      we have implemented an HTTP/2 client, server and proxy. We have also developed
+      load test and benchmarking tools for HTTP/2.
+      An HPACK encoder and decoder are available as a public API.
+      We have Python bindings of this library, but we do not have full code coverage yet.
+      An experimental high level C++ library is also available.
+    '';
+
+    homepage = "https://nghttp2.org/";
+    changelog = "https://github.com/nghttp2/nghttp2/releases/tag/v${version}";
+    # News articles with changes summary can be found here: https://nghttp2.org/blog/archives/
+    license = licenses.mit;
+    maintainers = with maintainers; [ c0bw3b ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/nghttp3/default.nix b/nixpkgs/pkgs/development/libraries/nghttp3/default.nix
new file mode 100644
index 000000000000..76de14079deb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nghttp3/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv, fetchFromGitHub
+, cmake
+, cunit, ncurses
+, curlHTTP3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "nghttp3";
+  version = "1.1.0";
+
+  src = fetchFromGitHub {
+    owner = "ngtcp2";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-B/5r0mRpOEi5DQ7OUAAcDmAm1nnak6qNz4qjDrzWlDc=";
+  };
+
+  outputs = [ "out" "dev" "doc" ];
+
+  nativeBuildInputs = [ cmake ];
+  nativeCheckInputs = [ cunit ncurses ];
+
+  cmakeFlags = [
+    "-DENABLE_STATIC_LIB=OFF"
+  ];
+
+  doCheck = true;
+  enableParallelBuilding = true;
+
+  passthru.tests = {
+    inherit curlHTTP3;
+  };
+
+  meta = with lib; {
+    homepage = "https://github.com/ngtcp2/nghttp3";
+    description = "nghttp3 is an implementation of HTTP/3 mapping over QUIC and QPACK in C.";
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ izorkin ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ngt/default.nix b/nixpkgs/pkgs/development/libraries/ngt/default.nix
new file mode 100644
index 000000000000..e42ee750cc09
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ngt/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+, llvmPackages
+, enableAVX ? stdenv.hostPlatform.avxSupport
+}:
+
+stdenv.mkDerivation rec {
+  pname = "NGT";
+  version = "1.12.3-alpha";
+
+  src = fetchFromGitHub {
+    owner = "yahoojapan";
+    repo = "NGT";
+    rev = "29c88ff6cd5824d3196986d1f50b834565b6c9dd";
+    sha256 = "sha256-nu0MJNpaenOB4+evoSVLKmPIuZXVj1Rm9x53+TfhezY=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ llvmPackages.openmp ];
+
+  NIX_ENFORCE_NO_NATIVE = ! enableAVX;
+  __AVX2__ = if enableAVX then 1 else 0;
+
+  meta = with lib; {
+    homepage = "https://github.com/yahoojapan/NGT";
+    description = "Nearest Neighbor Search with Neighborhood Graph and Tree for High-dimensional Data";
+    platforms = platforms.linux ++ platforms.darwin;
+    license = licenses.asl20;
+    maintainers = with maintainers; [ tomberek ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ngtcp2/default.nix b/nixpkgs/pkgs/development/libraries/ngtcp2/default.nix
new file mode 100644
index 000000000000..948fb0c071f4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ngtcp2/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, fetchFromGitHub
+, cmake
+, cunit, ncurses
+, libev, nghttp3, quictls
+, withJemalloc ? false, jemalloc
+, curlHTTP3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ngtcp2";
+  version = "1.2.0";
+
+  src = fetchFromGitHub {
+    owner = "ngtcp2";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-/lHsHkSySKyZZdjTTYCo0a6cwcMcbOWNvAEcO36/kEw=";
+  };
+
+  outputs = [ "out" "dev" "doc" ];
+
+  nativeBuildInputs = [ cmake ];
+  nativeCheckInputs = [ cunit ncurses ];
+  buildInputs = [ libev nghttp3 quictls ] ++ lib.optional withJemalloc jemalloc;
+
+  cmakeFlags = [
+    "-DENABLE_STATIC_LIB=OFF"
+  ];
+
+  doCheck = true;
+  enableParallelBuilding = true;
+
+  passthru.tests = {
+    inherit curlHTTP3;
+  };
+
+  meta = with lib; {
+    homepage = "https://github.com/ngtcp2/ngtcp2";
+    description = "ngtcp2 project is an effort to implement QUIC protocol which is now being discussed in IETF QUICWG for its standardization.";
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ izorkin ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ngtcp2/gnutls.nix b/nixpkgs/pkgs/development/libraries/ngtcp2/gnutls.nix
new file mode 100644
index 000000000000..04b220bacee1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ngtcp2/gnutls.nix
@@ -0,0 +1,53 @@
+{ lib, stdenv, fetchFromGitHub
+, autoreconfHook, pkg-config
+, gnutls
+, cunit, ncurses, knot-dns
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ngtcp2";
+  version = "1.3.0";
+
+  src = fetchFromGitHub {
+    owner = "ngtcp2";
+    repo = "ngtcp2";
+    rev = "v${version}";
+    hash = "sha256-KKfr5AjaC56yUNdk928H1PyP79GnQJ2pIZcZQTgLhEQ=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ gnutls ];
+
+  configureFlags = [ "--with-gnutls=yes" ];
+  enableParallelBuilding = true;
+
+  doCheck = true;
+  nativeCheckInputs = [ cunit ]
+    ++ lib.optional stdenv.isDarwin ncurses;
+
+  passthru.tests = knot-dns.passthru.tests; # the only consumer so far
+
+  meta = with lib; {
+    homepage = "https://github.com/ngtcp2/ngtcp2";
+    description = "an effort to implement RFC9000 QUIC protocol.";
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ vcunat/* for knot-dns */ ];
+  };
+}
+
+/*
+  Why split from ./default.nix?
+
+  ngtcp2 libs contain helpers to plug into various crypto libs (gnutls, patched openssl, ...).
+  Building multiple of them while keeping closures separable would be relatively complicated.
+  Separating the builds is easier for now; the missed opportunity to share the 0.3--0.4 MB
+  library isn't such a big deal.
+
+  Moreover upstream still commonly does incompatible changes, so agreeing
+  on a single version might be hard sometimes.  That's why it seemed simpler
+  to completely separate the nix expressions, too.
+*/
+
diff --git a/nixpkgs/pkgs/development/libraries/nix-plugins/default.nix b/nixpkgs/pkgs/development/libraries/nix-plugins/default.nix
new file mode 100644
index 000000000000..8714c6b4037a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nix-plugins/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchFromGitHub, nix, cmake, pkg-config, boost }:
+
+stdenv.mkDerivation rec {
+  pname = "nix-plugins";
+  version = "14.0.0";
+
+  src = fetchFromGitHub {
+    owner = "shlevy";
+    repo = "nix-plugins";
+    rev = version;
+    hash = "sha256-RDKAuLwcZ3Pbn5JUDmGBcfD0xbM6Jud2ouXh/YKpfS8=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [ nix boost ];
+
+  meta = {
+    description = "Collection of miscellaneous plugins for the nix expression language";
+    homepage = "https://github.com/shlevy/nix-plugins";
+    license = lib.licenses.mit;
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/nlohmann_json/default.nix b/nixpkgs/pkgs/development/libraries/nlohmann_json/default.nix
new file mode 100644
index 000000000000..339db2bb0879
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nlohmann_json/default.nix
@@ -0,0 +1,48 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+}:
+let
+  testData = fetchFromGitHub {
+    owner = "nlohmann";
+    repo = "json_test_data";
+    rev = "v3.1.0";
+    hash = "sha256-bG34W63ew7haLnC82A3lS7bviPDnApLipaBjJAjLcVk=";
+  };
+in stdenv.mkDerivation (finalAttrs: {
+  pname = "nlohmann_json";
+  version = "3.11.3";
+
+  src = fetchFromGitHub {
+    owner = "nlohmann";
+    repo = "json";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-7F0Jon+1oWL7uqet5i1IgHX0fUw/+z0QwEcA3zs5xHg=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [
+    "-DJSON_BuildTests=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
+    "-DJSON_FastTests=ON"
+    "-DJSON_MultipleHeaders=ON"
+  ] ++ lib.optional finalAttrs.finalPackage.doCheck "-DJSON_TestDataDirectory=${testData}";
+
+  doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
+
+  # skip tests that require git or modify “installed files”
+  preCheck = ''
+    checkFlagsArray+=("ARGS=-LE 'not_reproducible|git_required'")
+  '';
+
+  postInstall = "rm -rf $out/lib64";
+
+  meta = with lib; {
+    description = "JSON for Modern C++";
+    homepage = "https://json.nlohmann.me";
+    changelog = "https://github.com/nlohmann/json/blob/develop/ChangeLog.md";
+    license = licenses.mit;
+    platforms = platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/nlopt/default.nix b/nixpkgs/pkgs/development/libraries/nlopt/default.nix
new file mode 100644
index 000000000000..2fae17a23236
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nlopt/default.nix
@@ -0,0 +1,42 @@
+{ lib, stdenv, fetchFromGitHub, cmake, octave ? null, libiconv }:
+
+stdenv.mkDerivation rec {
+  pname = "nlopt";
+  version = "2.7.1";
+
+  src = fetchFromGitHub {
+    owner = "stevengj";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-TgieCX7yUdTAEblzXY/gCN0r6F9TVDh4RdNDjQdXZ1o=";
+  };
+
+  nativeBuildInputs = [ cmake ] ++ lib.optionals stdenv.isDarwin [ libiconv ];
+  buildInputs = [ octave ];
+
+  configureFlags = [
+    "--with-cxx"
+    "--enable-shared"
+    "--with-pic"
+    "--without-guile"
+    "--without-python"
+    "--without-matlab"
+  ] ++ lib.optionals (octave != null) [
+    "--with-octave"
+    "M_INSTALL_DIR=$(out)/${octave.sitePath}/m"
+    "OCT_INSTALL_DIR=$(out)/${octave.sitePath}/oct"
+  ];
+
+  postFixup = ''
+    substituteInPlace $out/lib/cmake/nlopt/NLoptLibraryDepends.cmake --replace \
+      'INTERFACE_INCLUDE_DIRECTORIES "''${_IMPORT_PREFIX}/' 'INTERFACE_INCLUDE_DIRECTORIES "'
+  '';
+
+  meta = {
+    homepage = "https://nlopt.readthedocs.io/en/latest/";
+    description = "Free open-source library for nonlinear optimization";
+    license = lib.licenses.lgpl21Plus;
+    hydraPlatforms = lib.platforms.linux;
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/nng/default.nix b/nixpkgs/pkgs/development/libraries/nng/default.nix
new file mode 100644
index 000000000000..e6b851817eff
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nng/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, cmake, ninja, mbedtlsSupport ? true, mbedtls }:
+
+stdenv.mkDerivation rec {
+  pname = "nng";
+  version = "1.7.2";
+
+  src = fetchFromGitHub {
+    owner = "nanomsg";
+    repo = "nng";
+    rev = "v${version}";
+    hash = "sha256-CG6Gw/Qrbi96koF2VxKMYPMPT2Zj9U97vNk2JdrfRro=";
+  };
+
+  nativeBuildInputs = [ cmake ninja ]
+    ++ lib.optionals mbedtlsSupport [ mbedtls ];
+
+  buildInputs = lib.optionals mbedtlsSupport [ mbedtls ];
+
+  cmakeFlags = [ "-G Ninja" "-DNNG_ENABLE_TLS=ON" ]
+    ++ lib.optionals mbedtlsSupport [ "-DMBEDTLS_ROOT_DIR=${mbedtls}" ];
+
+  meta = with lib; {
+    homepage = "https://nng.nanomsg.org/";
+    description = "Nanomsg next generation";
+    license = licenses.mit;
+    mainProgram = "nngcat";
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ nviets ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/notcurses/default.nix b/nixpkgs/pkgs/development/libraries/notcurses/default.nix
new file mode 100644
index 000000000000..67c640ddb265
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/notcurses/default.nix
@@ -0,0 +1,79 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, libdeflate
+, libunistring
+, ncurses
+, pandoc
+, pkg-config
+, zlib
+, multimediaSupport ? true, ffmpeg
+, qrcodegenSupport ? true, qrcodegen
+}:
+
+stdenv.mkDerivation rec {
+  pname = "notcurses";
+  version = "3.0.9";
+
+  src = fetchFromGitHub {
+    owner = "dankamongmen";
+    repo = "notcurses";
+    rev = "v${version}";
+    sha256 = "sha256-8SJeqLcV4xp968YgGsJccsgpB5wwaJDaoWsaYxf8upM=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [
+    cmake
+    pandoc
+    pkg-config
+  ];
+
+  buildInputs = [
+    libdeflate
+    libunistring
+    ncurses
+    zlib
+  ]
+  ++ lib.optional qrcodegenSupport qrcodegen
+  ++ lib.optional multimediaSupport ffmpeg;
+
+  cmakeFlags =
+    lib.optional (qrcodegenSupport) "-DUSE_QRCODEGEN=ON"
+    ++ lib.optional (!multimediaSupport) "-DUSE_MULTIMEDIA=none";
+
+  # https://github.com/dankamongmen/notcurses/issues/2661
+  postPatch = ''
+    substituteInPlace tools/notcurses-core.pc.in \
+      --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
+      --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
+    substituteInPlace tools/notcurses-ffi.pc.in \
+      --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
+      --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
+    substituteInPlace tools/notcurses++.pc.in \
+      --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
+      --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
+    substituteInPlace tools/notcurses.pc.in \
+      --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
+      --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/dankamongmen/notcurses";
+    description = "Blingful TUIs and character graphics";
+    longDescription = ''
+      Notcurses is a library facilitating complex TUIs on modern terminal
+      emulators, supporting vivid colors, multimedia, and Unicode to the maximum
+      degree possible. Things can be done with Notcurses that simply can't be
+      done with NCURSES.
+
+      It is not a source-compatible X/Open Curses implementation, nor a
+      replacement for NCURSES on existing systems.
+    '';
+    license = licenses.asl20;
+    maintainers = with maintainers; [ AndersonTorres ];
+    inherit (ncurses.meta) platforms;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/notify-sharp/default.nix b/nixpkgs/pkgs/development/libraries/notify-sharp/default.nix
new file mode 100644
index 000000000000..1cd69074911b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/notify-sharp/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchFromGitLab, pkg-config, autoreconfHook
+, mono, gtk-sharp-3_0, dbus-sharp-1_0, dbus-sharp-glib-1_0 }:
+
+stdenv.mkDerivation rec {
+  pname = "notify-sharp";
+  version = "3.0.3";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.gnome.org";
+    owner = "Archive";
+    repo = "notify-sharp";
+
+    rev = version;
+    sha256 = "1vm7mnmxdwrgy4mr07lfva8sa6a32f2ah5x7w8yzcmahaks3sj5m";
+  };
+
+  nativeBuildInputs = [
+    pkg-config autoreconfHook
+  ];
+
+  buildInputs = [
+    mono gtk-sharp-3_0
+    dbus-sharp-1_0 dbus-sharp-glib-1_0
+  ];
+
+  dontStrip = true;
+
+  postPatch = ''
+    sed -i 's#^[ \t]*DOCDIR=.*$#DOCDIR=$out/lib/monodoc#' ./configure.ac
+  '';
+
+  meta = with lib; {
+    description = "D-Bus for .NET";
+    platforms = platforms.linux;
+    license = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/npapi-sdk/default.nix b/nixpkgs/pkgs/development/libraries/npapi-sdk/default.nix
new file mode 100644
index 000000000000..6611f99bdfc2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/npapi-sdk/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "npapi-sdk";
+
+  version = "0.27.2";
+
+  src = fetchurl {
+    url = "https://bitbucket.org/mgorny/npapi-sdk/downloads/${pname}-${version}.tar.bz2";
+
+    sha256 = "0xxfcsjmmgbbyl9zwpzdshbx27grj5fnzjfmldmm9apws2yk9gq1";
+  };
+
+  meta = with lib; {
+    description = "A bundle of NPAPI headers by Mozilla";
+
+    homepage = "https://bitbucket.org/mgorny/npapi-sdk"; # see also https://github.com/mozilla/npapi-sdk
+    license = licenses.bsd3;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/npth/default.nix b/nixpkgs/pkgs/development/libraries/npth/default.nix
new file mode 100644
index 000000000000..208924bfd7b5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/npth/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "npth";
+  version = "1.6";
+
+  src = fetchurl {
+    url = "mirror://gnupg/npth/npth-${version}.tar.bz2";
+    sha256 = "1lg2lkdd3z1s3rpyf88786l243adrzyk9p4q8z9n41ygmpcsp4qk";
+  };
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "The New GNU Portable Threads Library";
+    longDescription = ''
+      This is a library to provide the GNU Pth API and thus a non-preemptive
+      threads implementation.
+
+      In contrast to GNU Pth is is based on the system's standard threads
+      implementation.  This allows the use of libraries which are not
+      compatible to GNU Pth.  Experience with a Windows Pth emulation showed
+      that this is a solid way to provide a co-routine based framework.
+    '';
+    homepage = "http://www.gnupg.org";
+    license = licenses.lgpl3;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/nrf5-sdk/default.nix b/nixpkgs/pkgs/development/libraries/nrf5-sdk/default.nix
new file mode 100644
index 000000000000..c8667287a002
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nrf5-sdk/default.nix
@@ -0,0 +1,37 @@
+{ lib
+, stdenv
+, fetchzip
+}:
+
+stdenv.mkDerivation rec {
+  pname = "nrf5-sdk";
+  version = "17.1.0";
+
+  urlHash = "ddde560";
+
+  src = fetchzip {
+    url = "https://nsscprodmedia.blob.core.windows.net/prod/software-and-other-downloads/sdks/nrf5/binaries/nrf5_sdk_${version}_${urlHash}.zip";
+    sha256 = "sha256-q4WQ7X7/z/42/qcii+mOLnobqcbUy0tInkOfRH/Gwus=";
+  };
+
+  dontConfigure = true;
+  dontBuild = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/share/nRF5_SDK
+    mv * $out/share/nRF5_SDK
+    rm $out/share/nRF5_SDK/*.msi
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Nordic Semiconductor nRF5 Software Development Kit";
+    homepage = "https://www.nordicsemi.com/Products/Development-software/nRF5-SDK";
+    license = licenses.unfree;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ stargate01 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/nspr/0001-Makefile-use-SOURCE_DATE_EPOCH-for-reproducibility.patch b/nixpkgs/pkgs/development/libraries/nspr/0001-Makefile-use-SOURCE_DATE_EPOCH-for-reproducibility.patch
new file mode 100644
index 000000000000..d7fec73910fb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nspr/0001-Makefile-use-SOURCE_DATE_EPOCH-for-reproducibility.patch
@@ -0,0 +1,84 @@
+From e5cc8f7c387e3238ebb8239e2555c933a41502c0 Mon Sep 17 00:00:00 2001
+From: Graham Christensen <graham@grahamc.com>
+Date: Thu, 7 Mar 2019 08:11:32 -0500
+Subject: [PATCH] Makefile: use SOURCE_DATE_EPOCH for reproducibility
+
+---
+ nspr/lib/ds/Makefile.in        | 4 ++--
+ nspr/lib/libc/src/Makefile.in  | 4 ++--
+ nspr/lib/prstreams/Makefile.in | 4 ++--
+ nspr/pr/src/Makefile.in        | 6 +++---
+ 4 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/nspr/lib/ds/Makefile.in b/nspr/lib/ds/Makefile.in
+index e737791..d56b0a7 100644
+--- a/nspr/lib/ds/Makefile.in
++++ b/nspr/lib/ds/Makefile.in
+@@ -101,8 +101,8 @@ ECHO = echo
+ TINC = $(OBJDIR)/_pl_bld.h
+ PROD = $(notdir $(SHARED_LIBRARY))
+ NOW = $(MOD_DEPTH)/config/$(OBJDIR)/now
+-SH_DATE = $(shell date "+%Y-%m-%d %T")
+-SH_NOW = $(shell $(NOW))
++SH_DATE = $(shell date "+%Y-%m-%d %T" --date $(SOURCE_DATE_EPOCH))
++SH_NOW = $(SOURCE_DATE_EPOCH)000000
+ 
+ ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
+ 	SUF = i64
+diff --git a/nspr/lib/libc/src/Makefile.in b/nspr/lib/libc/src/Makefile.in
+index e8a6d9f..0485737 100644
+--- a/nspr/lib/libc/src/Makefile.in
++++ b/nspr/lib/libc/src/Makefile.in
+@@ -103,8 +103,8 @@ ECHO = echo
+ TINC = $(OBJDIR)/_pl_bld.h
+ PROD = $(notdir $(SHARED_LIBRARY))
+ NOW = $(MOD_DEPTH)/config/$(OBJDIR)/now
+-SH_DATE = $(shell date "+%Y-%m-%d %T")
+-SH_NOW = $(shell $(NOW))
++SH_DATE = $(shell date "+%Y-%m-%d %T" --date $(SOURCE_DATE_EPOCH))
++SH_NOW = $(SOURCE_DATE_EPOCH)000000
+ 
+ ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
+ 	SUF = i64
+diff --git a/nspr/lib/prstreams/Makefile.in b/nspr/lib/prstreams/Makefile.in
+index aeb2944..83ae423 100644
+--- a/nspr/lib/prstreams/Makefile.in
++++ b/nspr/lib/prstreams/Makefile.in
+@@ -105,8 +105,8 @@ ECHO = echo
+ TINC = $(OBJDIR)/_pl_bld.h
+ PROD = $(notdir $(SHARED_LIBRARY))
+ NOW = $(MOD_DEPTH)/config/$(OBJDIR)/now
+-SH_DATE = $(shell date "+%Y-%m-%d %T")
+-SH_NOW = $(shell $(NOW))
++SH_DATE = $(shell date "+%Y-%m-%d %T" --date $(SOURCE_DATE_EPOCH))
++SH_NOW = $(SOURCE_DATE_EPOCH)000000
+ 
+ ifeq ($(OS_ARCH), WINNT)
+ 	SUF = i64
+diff --git a/nspr/pr/src/Makefile.in b/nspr/pr/src/Makefile.in
+index 19c5a69..989cc8c 100644
+--- a/nspr/pr/src/Makefile.in
++++ b/nspr/pr/src/Makefile.in
+@@ -46,7 +46,7 @@ MKSHLIB += -M $(MAPFILE)
+ endif
+ #
+ # In Solaris 2.6 or earlier, -lrt is called -lposix4.
+-# 
++#
+ LIBRT_TEST=$(firstword $(sort 5.7 $(OS_RELEASE)))
+ ifeq (5.7, $(LIBRT_TEST))
+ LIBRT=-lrt
+@@ -311,8 +311,8 @@ PROD = $(notdir $(SHARED_LIBRARY))
+ endif
+ 
+ NOW = $(MOD_DEPTH)/config/$(OBJDIR)/now
+-SH_DATE = $(shell date "+%Y-%m-%d %T")
+-SH_NOW = $(shell $(NOW))
++SH_DATE = $(shell date "+%Y-%m-%d %T" --date $(SOURCE_DATE_EPOCH))
++SH_NOW = $(SOURCE_DATE_EPOCH)000000
+ 
+ ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
+ 	SUF = i64
+-- 
+2.19.2
+
diff --git a/nixpkgs/pkgs/development/libraries/nspr/default.nix b/nixpkgs/pkgs/development/libraries/nspr/default.nix
new file mode 100644
index 000000000000..59a3b4975793
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nspr/default.nix
@@ -0,0 +1,59 @@
+{ lib
+, stdenv
+, fetchurl
+, CoreServices
+, buildPackages
+, nixosTests
+}:
+
+stdenv.mkDerivation rec {
+  pname = "nspr";
+  version = "4.35";
+
+  src = fetchurl {
+    url = "mirror://mozilla/nspr/releases/v${version}/src/nspr-${version}.tar.gz";
+    hash = "sha256-fqMpfqWWm10lpd2NR/JEPNqI6e50YwH24eFCb4pqvI8=";
+  };
+
+  patches = [
+    ./0001-Makefile-use-SOURCE_DATE_EPOCH-for-reproducibility.patch
+  ];
+
+  outputs = [ "out" "dev" ];
+  outputBin = "dev";
+
+  preConfigure = ''
+    cd nspr
+  '' + lib.optionalString stdenv.isDarwin ''
+    substituteInPlace configure --replace '@executable_path/' "$out/lib/"
+    substituteInPlace configure.in --replace '@executable_path/' "$out/lib/"
+  '';
+
+  HOST_CC = "cc";
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+  configureFlags = [
+    "--enable-optimize"
+    "--disable-debug"
+  ] ++ lib.optional stdenv.is64bit "--enable-64bit";
+
+  postInstall = ''
+    find $out -name "*.a" -delete
+    moveToOutput share "$dev" # just aclocal
+  '';
+
+  buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ];
+
+  enableParallelBuilding = true;
+
+  passthru.tests = {
+    inherit (nixosTests) firefox firefox-esr-115;
+  };
+
+  meta = with lib; {
+    homepage = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/Reference/NSPR_functions";
+    description = "Netscape Portable Runtime, a platform-neutral API for system-level and libc-like functions";
+    maintainers = with maintainers; [ ajs124 hexa ];
+    platforms = platforms.all;
+    license = licenses.mpl20;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/nss/85_security_load_3.85+.patch b/nixpkgs/pkgs/development/libraries/nss/85_security_load_3.85+.patch
new file mode 100644
index 000000000000..bc3f48e66744
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nss/85_security_load_3.85+.patch
@@ -0,0 +1,76 @@
+diff --git nss/cmd/shlibsign/shlibsign.c nss/cmd/shlibsign/shlibsign.c
+index ad8f3b84e..74676d039 100644
+--- nss/cmd/shlibsign/shlibsign.c
++++ nss/cmd/shlibsign/shlibsign.c
+@@ -875,6 +875,8 @@ main(int argc, char **argv)
+         goto cleanup;
+     }
+     lib = PR_LoadLibrary(libname);
++    if (!lib)
++        lib = PR_LoadLibrary(NIX_NSS_LIBDIR"libsoftokn3.so");
+     assert(lib != NULL);
+     if (!lib) {
+         PR_fprintf(PR_STDERR, "loading softokn3 failed");
+diff --git nss/lib/pk11wrap/pk11load.c nss/lib/pk11wrap/pk11load.c
+index 119c8c512..720d39ccc 100644
+--- nss/lib/pk11wrap/pk11load.c
++++ nss/lib/pk11wrap/pk11load.c
+@@ -486,6 +486,15 @@ secmod_LoadPKCS11Module(SECMODModule *mod, SECMODModule **oldModule)
+ #else
+         library = PR_LoadLibrary(mod->dllName);
+ #endif // defined(_WIN32)
++#ifndef NSS_STATIC_SOFTOKEN
++        if ((library == NULL) &&
++            !rindex(mod->dllName, PR_GetDirectorySeparator())) {
++            library = PORT_LoadLibraryFromOrigin(my_shlib_name,
++                (PRFuncPtr) &softoken_LoadDSO,
++                mod->dllName);
++        }
++#endif
++
+         mod->library = (void *)library;
+ 
+         if (library == NULL) {
+diff --git nss/lib/util/secload.c nss/lib/util/secload.c
+index 1cebae4e2..9194bb761 100644
+--- nss/lib/util/secload.c
++++ nss/lib/util/secload.c
+@@ -70,9 +70,14 @@ loader_LoadLibInReferenceDir(const char* referencePath, const char* name)
+ 
+     /* Remove the trailing filename from referencePath and add the new one */
+     c = strrchr(referencePath, PR_GetDirectorySeparator());
++    if (!c) { /* referencePath doesn't contain a / means that dladdr gave us argv[0]
++               * and program was called from $PATH. Hack to get libs from NIX_NSS_LIBDIR */
++        referencePath = NIX_NSS_LIBDIR;
++        c = (char*) &referencePath[sizeof(NIX_NSS_LIBDIR) - 1]; /* last / */
++    }
+     if (c) {
+         size_t referencePathSize = 1 + c - referencePath;
+-        fullName = (char*)PORT_Alloc(strlen(name) + referencePathSize + 1);
++        fullName = (char*) PORT_Alloc(strlen(name) + referencePathSize + 5);
+         if (fullName) {
+             memcpy(fullName, referencePath, referencePathSize);
+             strcpy(fullName + referencePathSize, name);
+@@ -82,6 +87,11 @@ loader_LoadLibInReferenceDir(const char* referencePath, const char* name)
+ #endif
+             libSpec.type = PR_LibSpec_Pathname;
+             libSpec.value.pathname = fullName;
++            if ((referencePathSize >= 4) &&
++                (strncmp(fullName + referencePathSize - 4, "bin", 3) == 0)) {
++                memcpy(fullName + referencePathSize -4, "lib", 3);
++            }
++            strcpy(fullName + referencePathSize, name);
+             dlh = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW | PR_LD_LOCAL
+ #ifdef PR_LD_ALT_SEARCH_PATH
+                                                        /* allow library's dependencies to be found in the same directory
+@@ -89,6 +99,10 @@ loader_LoadLibInReferenceDir(const char* referencePath, const char* name)
+                                                        | PR_LD_ALT_SEARCH_PATH
+ #endif
+             );
++            if (!dlh) {
++                strcpy(fullName + referencePathSize, name);
++                dlh = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW | PR_LD_LOCAL);
++            }
+             PORT_Free(fullName);
+         }
+     }
diff --git a/nixpkgs/pkgs/development/libraries/nss/esr.nix b/nixpkgs/pkgs/development/libraries/nss/esr.nix
new file mode 100644
index 000000000000..63308f385036
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nss/esr.nix
@@ -0,0 +1,4 @@
+import ./generic.nix {
+  version = "3.90.1";
+  hash = "sha256-5Fx0p2WP/LbGIqfhm6+zEab71UZPWBubCUGBEKQIsX8=";
+}
diff --git a/nixpkgs/pkgs/development/libraries/nss/fix-cross-compilation.patch b/nixpkgs/pkgs/development/libraries/nss/fix-cross-compilation.patch
new file mode 100644
index 000000000000..42b0620f48d9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nss/fix-cross-compilation.patch
@@ -0,0 +1,11 @@
+--- nss/nss.gyp
++++ nss/nss.gyp
+@@ -280,7 +280,7 @@
+                   'outputs/': [['exclude', 'nssdbm3']]
+                 }],
+               ],
+-              'action': ['<(python)', '<(DEPTH)/coreconf/shlibsign.py', '<@(_inputs)']
++              'action': ['true']
+             }
+           ],
+         },
diff --git a/nixpkgs/pkgs/development/libraries/nss/generic.nix b/nixpkgs/pkgs/development/libraries/nss/generic.nix
new file mode 100644
index 000000000000..cab8a0ff2bc1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nss/generic.nix
@@ -0,0 +1,196 @@
+{ version, hash }:
+{ lib
+, stdenv
+, fetchFromGitHub
+, nspr
+, perl
+, zlib
+, sqlite
+, ninja
+, darwin
+, fixDarwinDylibNames
+, buildPackages
+, useP11kit ? true
+, p11-kit
+, # allow FIPS mode. Note that this makes the output non-reproducible.
+  # https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_Tech_Notes/nss_tech_note6
+  enableFIPS ? false
+, nixosTests
+, nss_latest
+}:
+
+let
+  underscoreVersion = lib.replaceStrings [ "." ] [ "_" ] version;
+in
+stdenv.mkDerivation rec {
+  pname = "nss";
+  inherit version;
+
+  src = fetchFromGitHub {
+    owner = "nss-dev";
+    repo = "nss";
+    rev = "NSS_${lib.replaceStrings ["."] ["_"] version}_RTM";
+    inherit hash;
+  };
+
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+
+  nativeBuildInputs = [ perl ninja (buildPackages.python3.withPackages (ps: with ps; [ gyp ])) ]
+    ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.cctools fixDarwinDylibNames ];
+
+  buildInputs = [ zlib sqlite ];
+
+  propagatedBuildInputs = [ nspr ];
+
+  patches = [
+    # Based on http://patch-tracker.debian.org/patch/series/dl/nss/2:3.15.4-1/85_security_load.patch
+    ./85_security_load_3.85+.patch
+    ./fix-cross-compilation.patch
+  ] ++ lib.optionals (lib.versionOlder version "3.91") [
+    # https://bugzilla.mozilla.org/show_bug.cgi?id=1836925
+    # https://phabricator.services.mozilla.com/D180068
+    ./remove-c25519-support.patch
+  ];
+
+  postPatch = ''
+    patchShebangs .
+
+    for f in coreconf/config.gypi build.sh; do
+      substituteInPlace "$f" --replace "/usr/bin/env" "${buildPackages.coreutils}/bin/env"
+    done
+
+    substituteInPlace coreconf/config.gypi --replace "/usr/bin/grep" "${buildPackages.coreutils}/bin/env grep"
+  '' + lib.optionalString stdenv.hostPlatform.isDarwin ''
+    substituteInPlace coreconf/Darwin.mk --replace '@executable_path/$(notdir $@)' "$out/lib/\$(notdir \$@)"
+    substituteInPlace coreconf/config.gypi --replace "'DYLIB_INSTALL_NAME_BASE': '@executable_path'" "'DYLIB_INSTALL_NAME_BASE': '$out/lib'"
+  '';
+
+  outputs = [ "out" "dev" "tools" ];
+
+  buildPhase =
+    let
+      getArch = platform:
+        if platform.isx86_64 then "x64"
+        else if platform.isx86_32 then "ia32"
+        else if platform.isAarch32 then "arm"
+        else if platform.isAarch64 then "arm64"
+        else if platform.isPower && platform.is64bit then
+          (
+            if platform.isLittleEndian then "ppc64le" else "ppc64"
+          )
+        else platform.parsed.cpu.name;
+      # yes, this is correct. nixpkgs uses "host" for the platform the binary will run on whereas nss uses "host" for the platform that the build is running on
+      target = getArch stdenv.hostPlatform;
+      host = getArch stdenv.buildPlatform;
+    in
+    ''
+      runHook preBuild
+
+      sed -i 's|nss_dist_dir="$dist_dir"|nss_dist_dir="'$out'"|;s|nss_dist_obj_dir="$obj_dir"|nss_dist_obj_dir="'$out'"|' build.sh
+      ./build.sh -v --opt \
+        --with-nspr=${nspr.dev}/include:${nspr.out}/lib \
+        --system-sqlite \
+        --enable-legacy-db \
+        --target ${target} \
+        -Dhost_arch=${host} \
+        -Duse_system_zlib=1 \
+        --enable-libpkix \
+        -j $NIX_BUILD_CORES \
+        ${lib.optionalString enableFIPS "--enable-fips"} \
+        ${lib.optionalString stdenv.isDarwin "--clang"} \
+        ${lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) "--disable-tests"}
+
+      runHook postBuild
+    '';
+
+  env.NIX_CFLAGS_COMPILE = toString ([
+    "-Wno-error"
+    "-DNIX_NSS_LIBDIR=\"${placeholder "out"}/lib/\""
+  ] ++ lib.optionals stdenv.hostPlatform.is64bit [
+    "-DNSS_USE_64=1"
+  ] ++ lib.optionals stdenv.hostPlatform.isILP32 [
+    "-DNS_PTR_LE_32=1" # See RNG_RandomUpdate() in drdbg.c
+  ]);
+
+  installPhase = ''
+    runHook preInstall
+
+    rm -rf $out/private
+    find $out -name "*.TOC" -delete
+    mv $out/public $out/include
+
+    ln -s lib $out/lib64
+
+    # Upstream issue: https://bugzilla.mozilla.org/show_bug.cgi?id=530672
+    # https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/nss/files/nss-3.32-gentoo-fixups.patch?id=af1acce6c6d2c3adb17689261dfe2c2b6771ab8a
+    NSS_MAJOR_VERSION=`grep "NSS_VMAJOR" lib/nss/nss.h | awk '{print $3}'`
+    NSS_MINOR_VERSION=`grep "NSS_VMINOR" lib/nss/nss.h | awk '{print $3}'`
+    NSS_PATCH_VERSION=`grep "NSS_VPATCH" lib/nss/nss.h | awk '{print $3}'`
+    PREFIX="$out"
+
+    mkdir -p $out/lib/pkgconfig
+    sed -e "s,%prefix%,$PREFIX," \
+        -e "s,%exec_prefix%,$PREFIX," \
+        -e "s,%libdir%,$PREFIX/lib64," \
+        -e "s,%includedir%,$dev/include/nss," \
+        -e "s,%NSS_VERSION%,$NSS_MAJOR_VERSION.$NSS_MINOR_VERSION.$NSS_PATCH_VERSION,g" \
+        -e "s,%NSPR_VERSION%,4.16,g" \
+        pkg/pkg-config/nss.pc.in > $out/lib/pkgconfig/nss.pc
+    chmod 0644 $out/lib/pkgconfig/nss.pc
+
+    sed -e "s,@prefix@,$PREFIX," \
+        -e "s,@MOD_MAJOR_VERSION@,$NSS_MAJOR_VERSION," \
+        -e "s,@MOD_MINOR_VERSION@,$NSS_MINOR_VERSION," \
+        -e "s,@MOD_PATCH_VERSION@,$NSS_PATCH_VERSION," \
+        pkg/pkg-config/nss-config.in > $out/bin/nss-config
+    chmod 0755 $out/bin/nss-config
+  '';
+
+  postInstall = lib.optionalString useP11kit ''
+    # Replace built-in trust with p11-kit connection
+    ln -sf ${p11-kit}/lib/pkcs11/p11-kit-trust.so $out/lib/libnssckbi.so
+  '';
+
+  postFixup =
+    let
+      isCross = stdenv.hostPlatform != stdenv.buildPlatform;
+      nss = if isCross then buildPackages.nss.tools else "$out";
+    in
+    (lib.optionalString enableFIPS (''
+      for libname in freebl3 nssdbm3 softokn3
+      do libfile="$out/lib/lib$libname${stdenv.hostPlatform.extensions.sharedLibrary}"'' +
+    (if stdenv.isDarwin
+    then ''
+      DYLD_LIBRARY_PATH=$out/lib:${nspr.out}/lib \
+    '' else ''
+      LD_LIBRARY_PATH=$out/lib:${nspr.out}/lib \
+    '') + ''
+          ${nss}/bin/shlibsign -v -i "$libfile"
+      done
+    '')) +
+    ''
+      moveToOutput bin "$tools"
+      moveToOutput bin/nss-config "$dev"
+      moveToOutput lib/libcrmf.a "$dev" # needed by firefox, for example
+      rm -f "$out"/lib/*.a
+
+      runHook postInstall
+    '';
+
+  passthru.updateScript = ./update.sh;
+
+  passthru.tests = lib.optionalAttrs (lib.versionOlder version nss_latest.version) {
+    inherit (nixosTests) firefox-esr-115;
+  } // lib.optionalAttrs (lib.versionAtLeast version nss_latest.version) {
+    inherit (nixosTests) firefox;
+  };
+
+  meta = with lib; {
+    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; [ hexa ajs124 ];
+    license = licenses.mpl20;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/nss/latest.nix b/nixpkgs/pkgs/development/libraries/nss/latest.nix
new file mode 100644
index 000000000000..dfc8a21e206c
--- /dev/null
+++ b/nixpkgs/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.98";
+  hash = "sha256-0p1HzspxyzhzX46O7ax8tmYiaFEBeqEqEvman4NIiQc=";
+}
diff --git a/nixpkgs/pkgs/development/libraries/nss/remove-c25519-support.patch b/nixpkgs/pkgs/development/libraries/nss/remove-c25519-support.patch
new file mode 100644
index 000000000000..d5dba016278f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nss/remove-c25519-support.patch
@@ -0,0 +1,69 @@
+diff --git a/nss/lib/freebl/Makefile b/nss/lib/freebl/Makefile
+index 74e8e65..aa9dd95 100644
+--- nss/lib/freebl/Makefile
++++ nss/lib/freebl/Makefile
+@@ -568,7 +568,6 @@ ifneq ($(shell $(CC) -? 2>&1 >/dev/null </dev/null | sed -e 's/:.*//;1q'),lcc)
+             HAVE_INT128_SUPPORT = 1
+             DEFINES += -DHAVE_INT128_SUPPORT
+     else ifeq (1,$(CC_IS_GCC))
+-        SUPPORTS_VALE_CURVE25519 = 1
+         ifneq (,$(filter 4.6 4.7 4.8 4.9,$(word 1,$(GCC_VERSION)).$(word 2,$(GCC_VERSION))))
+             HAVE_INT128_SUPPORT = 1
+             DEFINES += -DHAVE_INT128_SUPPORT
+@@ -593,11 +592,6 @@ ifndef HAVE_INT128_SUPPORT
+     DEFINES += -DKRML_VERIFIED_UINT128
+ endif
+ 
+-ifdef SUPPORTS_VALE_CURVE25519
+-    VERIFIED_SRCS += Hacl_Curve25519_64.c
+-    DEFINES += -DHACL_CAN_COMPILE_INLINE_ASM
+-endif
+-
+ ifndef NSS_DISABLE_CHACHAPOLY
+     ifeq ($(CPU_ARCH),x86_64)
+         ifndef NSS_DISABLE_AVX2
+diff --git a/nss/lib/freebl/freebl.gyp b/nss/lib/freebl/freebl.gyp
+index 65f9a80..23940ef 100644
+--- nss/lib/freebl/freebl.gyp
++++ nss/lib/freebl/freebl.gyp
+@@ -866,12 +866,6 @@
+           }],
+         ],
+       }],
+-      [ 'supports_vale_curve25519==1', {
+-        'defines': [
+-          # The Makefile does version-tests on GCC, but we're not doing that here.
+-          'HACL_CAN_COMPILE_INLINE_ASM',
+-        ],
+-      }],
+       [ 'OS=="linux" or OS=="android"', {
+         'conditions': [
+           [ 'target_arch=="x64"', {
+@@ -934,11 +928,6 @@
+   'variables': {
+     'module': 'nss',
+     'conditions': [
+-      [ 'target_arch=="x64" and cc_is_gcc==1', {
+-        'supports_vale_curve25519%': 1,
+-      }, {
+-        'supports_vale_curve25519%': 0,
+-      }],
+       [ 'target_arch=="x64" or target_arch=="arm64" or target_arch=="aarch64"', {
+         'have_int128_support%': 1,
+       }, {
+diff --git a/nss/lib/freebl/freebl_base.gypi b/nss/lib/freebl/freebl_base.gypi
+index d198c44..34b6b3c 100644
+--- nss/lib/freebl/freebl_base.gypi
++++ nss/lib/freebl/freebl_base.gypi
+@@ -151,11 +151,6 @@
+         'ecl/curve25519_32.c',
+       ],
+     }],
+-    ['supports_vale_curve25519==1', {
+-      'sources': [
+-        'verified/Hacl_Curve25519_64.c',
+-      ],
+-    }],
+     ['(target_arch!="ppc64" and target_arch!="ppc64le") or disable_altivec==1', {
+       'sources': [
+         # Gyp does not support per-file cflags, so working around like this.
diff --git a/nixpkgs/pkgs/development/libraries/nss/update.sh b/nixpkgs/pkgs/development/libraries/nss/update.sh
new file mode 100755
index 000000000000..600dbdff004c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nss/update.sh
@@ -0,0 +1,10 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p curl gnugrep gnused coreutils common-updater-scripts
+
+set -x
+
+base_url="https://ftp.mozilla.org/pub/security/nss/releases/"
+
+version="$(curl -sSL ${base_url}  | grep 'RTM' | grep -v WITH_CKBI | sed 's|.*>\(NSS_[0-9]*_[0-9]*_*[0-9]*_*[0-9]*_RTM\)/.*|\1|g' | sed 's|NSS_||g' | sed 's|_RTM||g' | sed 's|_|.|g' | sort -V | tail -1)"
+hash="$(nix-hash --type sha256 --base32 ${base_url}/NSS_${version/\./_}_RTM/src/nss-${version}.tar.gz)"
+update-source-version nss "${version}" "${hash}"
diff --git a/nixpkgs/pkgs/development/libraries/nss_wrapper/default.nix b/nixpkgs/pkgs/development/libraries/nss_wrapper/default.nix
new file mode 100644
index 000000000000..324c5269dfbc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nss_wrapper/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl, cmake, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "nss_wrapper";
+  version = "1.1.15";
+
+  src = fetchurl {
+    url = "mirror://samba/cwrap/nss_wrapper-${version}.tar.gz";
+    sha256 = "sha256-Nvh0gypPIVjgT2mqd+VRXhbPbjv4GWjV3YSW231pBq0=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  meta = with lib; {
+    description = "A wrapper for the user, group and hosts NSS API";
+    homepage = "https://git.samba.org/?p=nss_wrapper.git;a=summary;";
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+    broken = stdenv.isDarwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/nsync/default.nix b/nixpkgs/pkgs/development/libraries/nsync/default.nix
new file mode 100644
index 000000000000..a984058e9b10
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nsync/default.nix
@@ -0,0 +1,31 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "nsync";
+  version = "1.26.0";
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = pname;
+    rev = version;
+    hash = "sha256-pE9waDI+6LQwbyPJ4zROoF93Vt6+SETxxJ/UxeZE5WE=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  # Needed for case-insensitive filesystems like on macOS
+  # because a file named BUILD exists already.
+  cmakeBuildDir = "build_dir";
+
+  meta = {
+    homepage = "https://github.com/google/nsync";
+    description = "C library that exports various synchronization primitives";
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ puffnfresh Luflosi ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ntbtls/default.nix b/nixpkgs/pkgs/development/libraries/ntbtls/default.nix
new file mode 100644
index 000000000000..888b1fe4b3df
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ntbtls/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl, gettext, libgpg-error, libgcrypt, libksba, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "ntbtls";
+  version = "0.3.2";
+
+  src = fetchurl {
+    url = "mirror://gnupg/ntbtls/ntbtls-${version}.tar.bz2";
+    sha256 = "sha256-vfy5kCSs7JxsS5mK1juzkh30z+5KdyrWwMoyTbvysHw=";
+  };
+
+  outputs = [ "dev" "out" ];
+
+  buildInputs = [ libgcrypt libgpg-error libksba zlib ]
+    ++ lib.optional stdenv.isDarwin gettext;
+
+  postInstall = ''
+    moveToOutput "bin/ntbtls-config" $dev
+  '';
+
+  meta = with lib; {
+    description = "A tiny TLS 1.2 only implementation";
+    homepage = "https://www.gnupg.org/software/ntbtls/";
+    license = licenses.gpl3Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ joachifm ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ntirpc/default.nix b/nixpkgs/pkgs/development/libraries/ntirpc/default.nix
new file mode 100644
index 000000000000..39acba13d73e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ntirpc/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchFromGitHub, cmake
+, krb5, liburcu , libtirpc, libnsl
+} :
+
+stdenv.mkDerivation rec {
+  pname = "ntirpc";
+  version = "5.0";
+
+  src = fetchFromGitHub {
+    owner = "nfs-ganesha";
+    repo = "ntirpc";
+    rev = "v${version}";
+    sha256 = "sha256-xqnfo07EHwendzibIz187vdaenHwxg078D6zJvoyewc=";
+  };
+
+  postPatch = ''
+    substituteInPlace ntirpc/netconfig.h --replace "/etc/netconfig" "$out/etc/netconfig"
+    sed '1i#include <assert.h>' -i src/work_pool.c
+  '';
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ krb5 liburcu libnsl ];
+
+  postInstall = ''
+    mkdir -p $out/etc
+
+    # Library needs a netconfig to run.
+    # Steal the file from libtirpc
+    cp ${libtirpc}/etc/netconfig $out/etc/
+  '';
+
+  meta = with lib; {
+    description = "Transport-independent RPC (TI-RPC)";
+    homepage = "https://github.com/nfs-ganesha/ntirpc";
+    maintainers = [ maintainers.markuskowa ];
+    platforms = platforms.linux;
+    license = licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ntl/default.nix b/nixpkgs/pkgs/development/libraries/ntl/default.nix
new file mode 100644
index 000000000000..8fa37141628c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ntl/default.nix
@@ -0,0 +1,81 @@
+{ stdenv
+, lib
+, fetchurl
+, perl
+, gmp
+, gf2x ? null
+# I asked the ntl maintainer weather or not to include gf2x by default:
+# > If I remember correctly, gf2x is now thread safe, so there's no reason not to use it.
+, withGf2x ? true
+, tune ? false # tune for current system; non reproducible and time consuming
+}:
+
+assert withGf2x -> gf2x != null;
+
+stdenv.mkDerivation rec {
+  pname = "ntl";
+  version = "11.5.1";
+
+  src = fetchurl {
+    url = "http://www.shoup.net/ntl/ntl-${version}.tar.gz";
+    sha256 = "sha256-IQ0GwxMGy8bq9oFEU8Vsd22djo3zbXTrMG9qUj0caoo=";
+  };
+
+  buildInputs = [
+    gmp
+  ];
+
+  nativeBuildInputs = [
+    perl # needed for ./configure
+  ];
+
+  sourceRoot = "${pname}-${version}/src";
+
+  enableParallelBuilding = true;
+
+  dontAddPrefix = true; # DEF_PREFIX instead
+
+  # Written in perl, does not support autoconf-style
+  # --build=/--host= options:
+  #   Error: unrecognized option: --build=x86_64-unknown-linux-gnu
+  configurePlatforms = [ ];
+
+  # reference: http://shoup.net/ntl/doc/tour-unix.html
+  configureFlags = [
+    "DEF_PREFIX=$(out)"
+    "SHARED=on" # genereate a shared library (as well as static)
+    "NATIVE=off" # don't target code to current hardware (reproducibility, portability)
+    "TUNE=${
+      if tune then
+        "auto"
+      else if stdenv.hostPlatform.isx86 then
+        "x86" # "chooses options that should be well suited for most x86 platforms"
+      else
+        "generic" # "chooses options that should be OK for most platforms"
+    }"
+    "CXX=${stdenv.cc.targetPrefix}c++"
+  ] ++ lib.optionals withGf2x [
+    "NTL_GF2X_LIB=on"
+    "GF2X_PREFIX=${gf2x}"
+  ];
+
+  doCheck = true; # takes some time
+
+  meta = with lib; {
+    description = "A Library for doing Number Theory";
+    longDescription = ''
+      NTL is a high-performance, portable C++ library providing data
+      structures and algorithms for manipulating signed, arbitrary
+      length integers, and for vectors, matrices, and polynomials over
+      the integers and over finite fields.
+    '';
+    # Upstream contact: maintainer is victorshoup on GitHub. Alternatively the
+    # email listed on the homepage.
+    homepage = "http://www.shoup.net/ntl/";
+    # also locally at "${src}/doc/tour-changes.html";
+    changelog = "https://www.shoup.net/ntl/doc/tour-changes.html";
+    maintainers = teams.sage.members;
+    license = licenses.gpl2Plus;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/numcpp/default.nix b/nixpkgs/pkgs/development/libraries/numcpp/default.nix
new file mode 100644
index 000000000000..6b0b0304d423
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/numcpp/default.nix
@@ -0,0 +1,48 @@
+{
+  lib,
+  stdenv,
+  fetchFromGitHub,
+  cmake,
+  boost,
+  python3,
+  gtest,
+}:
+stdenv.mkDerivation (finalAttrs: {
+  pname = "numcpp";
+  version = "2.12.1";
+
+  src = fetchFromGitHub {
+    owner = "dpilger26";
+    repo = "NumCpp";
+    rev = "Version_${finalAttrs.version}";
+    hash = "sha256-1LGyDvT+PiGRXn7NorcYUjSPzNuRv/YXhQWIaOa7xdo=";
+  };
+
+  nativeCheckInputs = [gtest python3];
+
+  nativeBuildInputs = [cmake];
+
+  buildInputs = [boost];
+
+  cmakeFlags = lib.optionals finalAttrs.finalPackage.doCheck [
+    "-DBUILD_TESTS=ON"
+    "-DBUILD_MULTIPLE_TEST=ON"
+  ];
+
+  doCheck = !stdenv.isDarwin && !stdenv.hostPlatform.isStatic;
+
+  postInstall = ''
+    substituteInPlace $out/share/NumCpp/cmake/NumCppConfig.cmake \
+      --replace "\''${PACKAGE_PREFIX_DIR}/" ""
+  '';
+
+  NIX_CFLAGS_COMPILE="-Wno-error";
+
+  meta = with lib; {
+    description = "A Templatized Header Only C++ Implementation of the Python NumPy Library";
+    homepage = "https://github.com/dpilger26/NumCpp";
+    license = licenses.mit;
+    maintainers = with maintainers; [spalf];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/nuraft/default.nix b/nixpkgs/pkgs/development/libraries/nuraft/default.nix
new file mode 100644
index 000000000000..e26d9f467e7f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nuraft/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, boost, asio, openssl, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "nuraft";
+  version = "2.1.0";
+
+  src = fetchFromGitHub {
+    owner = "eBay";
+    repo = "NuRaft";
+    rev = "v${version}";
+    sha256 = "sha256-puO8E7tSLqB0oq/NlzEZqQgIZKm7ZUb4HhR0XuI9dco=";
+  };
+
+  patches = [
+    # Fix gcc-13 build failure:
+    #   https://github.com/eBay/NuRaft/pull/435
+    (fetchpatch {
+      name = "gcc-13.patch";
+      url = "https://github.com/eBay/NuRaft/commit/fddf33a4d8cd7fcd0306cc838a30893a4df3d58f.patch";
+      hash = "sha256-JOtR3llE4QwQM7PBx+ILR87zsPB0GZ/aIKbSdHIrePA=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ boost asio openssl zlib ];
+
+  meta = with lib; {
+    homepage = "https://github.com/eBay/NuRaft";
+    description = "C++ implementation of Raft core logic as a replication library";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ wheelsandmetal ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/nuspell/default.nix b/nixpkgs/pkgs/development/libraries/nuspell/default.nix
new file mode 100644
index 000000000000..c9e6aeeba363
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nuspell/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, icu, catch2_3 }:
+
+stdenv.mkDerivation rec {
+  pname = "nuspell";
+  version = "5.1.4";
+
+  src = fetchFromGitHub {
+    owner = "nuspell";
+    repo = "nuspell";
+    rev = "v${version}";
+    hash = "sha256-KteLH031QP8MunQXsodzsPhD/YN9n3O7b2kb/1mFQRY=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ catch2_3 ];
+  propagatedBuildInputs = [ icu ];
+
+  cmakeFlags = [ "-DBUILD_TESTING=YES" ];
+  doCheck = true;
+
+  outputs = [ "out" "lib" "dev" ];
+
+  meta = with lib; {
+    description = "Free and open source C++ spell checking library";
+    homepage = "https://nuspell.github.io/";
+    platforms = platforms.all;
+    maintainers = with maintainers; [ fpletz ];
+    license = licenses.lgpl3Plus;
+    changelog = "https://github.com/nuspell/nuspell/blob/v${version}/CHANGELOG.md";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/nuspell/wrapper.nix b/nixpkgs/pkgs/development/libraries/nuspell/wrapper.nix
new file mode 100644
index 000000000000..b3a929545f24
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nuspell/wrapper.nix
@@ -0,0 +1,13 @@
+{ stdenv, lib, nuspell, makeWrapper, dicts ? [] }:
+
+let
+  searchPath = lib.makeSearchPath "share/hunspell" dicts;
+in
+stdenv.mkDerivation {
+  name = (lib.appendToName "with-dicts" nuspell).name;
+  nativeBuildInputs = [ makeWrapper ];
+  buildCommand = ''
+    makeWrapper ${nuspell}/bin/nuspell $out/bin/nuspell --prefix DICPATH : ${lib.escapeShellArg searchPath}
+  '';
+  meta = removeAttrs nuspell.meta ["outputsToInstall"];
+}
diff --git a/nixpkgs/pkgs/development/libraries/nv-codec-headers/10_x.nix b/nixpkgs/pkgs/development/libraries/nv-codec-headers/10_x.nix
new file mode 100644
index 000000000000..b1fe1611301f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nv-codec-headers/10_x.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchgit }:
+
+stdenv.mkDerivation rec {
+  pname = "nv-codec-headers";
+  version = "10.0.26.2";
+
+  src = fetchgit {
+    url = "https://git.videolan.org/git/ffmpeg/nv-codec-headers.git";
+    rev = "n${version}";
+    sha256 = "0n5jlwjfv5irx1if1g0n52m279bw7ab6bd3jz2v4vwg9cdzbxx85";
+  };
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  meta = {
+    description = "FFmpeg version of headers for NVENC";
+    homepage = "https://ffmpeg.org/";
+    license = lib.licenses.mit;
+    maintainers = [ lib.maintainers.MP2E ];
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/nv-codec-headers/11_x.nix b/nixpkgs/pkgs/development/libraries/nv-codec-headers/11_x.nix
new file mode 100644
index 000000000000..fba333ff6dbe
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nv-codec-headers/11_x.nix
@@ -0,0 +1,27 @@
+{ stdenv
+, lib
+, fetchgit
+}:
+
+stdenv.mkDerivation rec {
+  pname = "nv-codec-headers";
+  version = "11.1.5.2";
+
+  src = fetchgit {
+    url = "https://git.videolan.org/git/ffmpeg/nv-codec-headers.git";
+    rev = "n${version}";
+    sha256 = "sha256-KzaqwpzISHB7tSTruynEOJmSlJnAFK2h7/cRI/zkNPk=";
+  };
+
+  makeFlags = [
+    "PREFIX=$(out)"
+  ];
+
+  meta = with lib; {
+    description = "FFmpeg version of headers for NVENC";
+    homepage = "https://git.videolan.org/?p=ffmpeg/nv-codec-headers.git";
+    license = licenses.mit;
+    maintainers = with maintainers; [ MP2E ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/nv-codec-headers/12_x.nix b/nixpkgs/pkgs/development/libraries/nv-codec-headers/12_x.nix
new file mode 100644
index 000000000000..dcbb34e33cdb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nv-codec-headers/12_x.nix
@@ -0,0 +1,27 @@
+{ stdenv
+, lib
+, fetchgit
+}:
+
+stdenv.mkDerivation rec {
+  pname = "nv-codec-headers";
+  version = "12.1.14.0";
+
+  src = fetchgit {
+    url = "https://git.videolan.org/git/ffmpeg/nv-codec-headers.git";
+    rev = "n${version}";
+    sha256 = "sha256-WJYuFmMGSW+B32LwE7oXv/IeTln6TNEeXSkquHh85Go=";
+  };
+
+  makeFlags = [
+    "PREFIX=$(out)"
+  ];
+
+  meta = with lib; {
+    description = "FFmpeg version of headers for NVENC";
+    homepage = "https://git.videolan.org/?p=ffmpeg/nv-codec-headers.git";
+    license = licenses.mit;
+    maintainers = with maintainers; [ MP2E ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/nv-codec-headers/default.nix b/nixpkgs/pkgs/development/libraries/nv-codec-headers/default.nix
new file mode 100644
index 000000000000..9b8323e6c978
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nv-codec-headers/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchgit }:
+
+stdenv.mkDerivation rec {
+  pname = "nv-codec-headers";
+  version = "9.1.23.1";
+
+  src = fetchgit {
+    url = "https://git.videolan.org/git/ffmpeg/nv-codec-headers.git";
+    rev = "n${version}";
+    sha256 = "1xfvb3mhz6wfx9c732888xa82ivaig903lhvvrqqzs31qfznsplh";
+  };
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  meta = {
+    description = "FFmpeg version of headers for NVENC";
+    homepage = "https://ffmpeg.org/";
+    license = lib.licenses.mit;
+    maintainers = [ lib.maintainers.MP2E ];
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/nvidia-optical-flow-sdk/default.nix b/nixpkgs/pkgs/development/libraries/nvidia-optical-flow-sdk/default.nix
new file mode 100644
index 000000000000..813821bfb71c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nvidia-optical-flow-sdk/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub, cudaPackages }:
+
+stdenv.mkDerivation {
+  pname = "nvidia-optical-flow-sdk";
+  version = "2.0";
+
+  src = fetchFromGitHub {
+    owner = "NVIDIA";
+    repo = "NVIDIAOpticalFlowSDK";
+    rev = "edb50da3cf849840d680249aa6dbef248ebce2ca";
+    sha256 = "0hv0m0k9wl2wjhhl886j7ymngnf2xz7851nfh57s1gy5bv9lgdgz";
+  };
+
+  # # We only need the header files. The library files are
+  # # in the nvidia_x11 driver.
+  installPhase = ''
+    mkdir -p $out/include
+    cp -R * $out/include
+  '';
+
+  # Makes setupCudaHook propagate nvidia-optical-flow-sdk together with cuda
+  # packages. Currently used by opencv4.cxxdev, hopefully can be removed in the
+  # future
+  nativeBuildInputs = [
+    cudaPackages.markForCudatoolkitRootHook
+  ];
+
+  meta = with lib; {
+    description = "Nvidia optical flow headers for computing the relative motion of pixels between images";
+    homepage = "https://developer.nvidia.com/opticalflow-sdk";
+    license = licenses.bsd3; # applies to the header files only
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/nvidia-vaapi-driver/0001-hardcode-install_dir.patch b/nixpkgs/pkgs/development/libraries/nvidia-vaapi-driver/0001-hardcode-install_dir.patch
new file mode 100644
index 000000000000..05de63806fb0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nvidia-vaapi-driver/0001-hardcode-install_dir.patch
@@ -0,0 +1,34 @@
+From 4e8bd61c216969615a492043092bd8298dcd1410 Mon Sep 17 00:00:00 2001
+From: Nick Cao <nickcao@nichi.co>
+Date: Mon, 6 Nov 2023 09:33:45 -0500
+Subject: [PATCH] hardcode install_dir
+
+partially revert https://github.com/elFarto/nvidia-vaapi-driver/commit/60ab79608ae35bd929d3e1387d226547d18e6bed
+---
+ meson.build | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 990c2b2..f5e63d7 100644
+--- a/meson.build
++++ b/meson.build
+@@ -71,7 +71,6 @@ if gst_codecs_deps.found()
+ endif
+ 
+ nvidia_incdir = include_directories('nvidia-include')
+-nvidia_install_dir = libva_deps.get_variable(pkgconfig: 'driverdir')
+ 
+ shared_library(
+     'nvidia_drv_video',
+@@ -80,7 +79,7 @@ shared_library(
+     dependencies: deps,
+     include_directories: nvidia_incdir,
+     install: true,
+-    install_dir: nvidia_install_dir,
++    install_dir: get_option('libdir') / 'dri',
+     gnu_symbol_visibility: 'hidden',
+ )
+ 
+-- 
+2.42.0
+
diff --git a/nixpkgs/pkgs/development/libraries/nvidia-vaapi-driver/default.nix b/nixpkgs/pkgs/development/libraries/nvidia-vaapi-driver/default.nix
new file mode 100644
index 000000000000..60ef649ec5ad
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/nvidia-vaapi-driver/default.nix
@@ -0,0 +1,57 @@
+{ stdenv
+, fetchFromGitHub
+, lib
+, meson
+, ninja
+, pkg-config
+, libdrm
+, libGL
+, gst_all_1
+, nv-codec-headers-11
+, libva
+, addOpenGLRunpath
+}:
+
+stdenv.mkDerivation rec {
+  pname = "nvidia-vaapi-driver";
+  version = "0.0.11";
+
+  src = fetchFromGitHub {
+    owner = "elFarto";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-mVVRpCyT374P1Vql0yPY0e5tNktHNJ8XHoixvxp3b20=";
+  };
+
+  patches = [
+    ./0001-hardcode-install_dir.patch
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    addOpenGLRunpath
+  ];
+
+  buildInputs = [
+    libdrm
+    libGL
+    gst_all_1.gstreamer
+    gst_all_1.gst-plugins-bad
+    nv-codec-headers-11
+    libva
+  ];
+
+  postFixup = ''
+    addOpenGLRunpath "$out/lib/dri/nvidia_drv_video.so"
+  '';
+
+  meta = with lib;{
+    homepage = "https://github.com/elFarto/nvidia-vaapi-driver";
+    description = "A VA-API implemention using NVIDIA's NVDEC";
+    changelog = "https://github.com/elFarto/nvidia-vaapi-driver/releases/tag/v${version}";
+    license = licenses.mit;
+    maintainers = with maintainers;[ nickcao ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/oatpp/default.nix b/nixpkgs/pkgs/development/libraries/oatpp/default.nix
new file mode 100644
index 000000000000..3f554807d0d3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/oatpp/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "oatpp";
+  version = "1.3.0";
+
+  src = fetchFromGitHub {
+    owner = "oatpp";
+    repo = "oatpp";
+    rev = version;
+    sha256 = "sha256-k6RPg53z9iTrrKZXOm5Ga9qxI32mHgB+4d6y+IUvJC0=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  # Tests fail on darwin. See https://github.com/NixOS/nixpkgs/pull/105419#issuecomment-735826894
+  doCheck = !stdenv.isDarwin;
+
+  meta = with lib; {
+    homepage = "https://oatpp.io/";
+    description = "Light and powerful C++ web framework for highly scalable and resource-efficient web applications";
+    license = licenses.asl20;
+    maintainers = [ maintainers.ivar ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ocl-icd/default.nix b/nixpkgs/pkgs/development/libraries/ocl-icd/default.nix
new file mode 100644
index 000000000000..dfacf433b77f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ocl-icd/default.nix
@@ -0,0 +1,39 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, ruby
+, opencl-headers
+, addOpenGLRunpath
+, autoreconfHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ocl-icd";
+  version = "2.3.2";
+
+  src = fetchFromGitHub {
+    owner = "OCL-dev";
+    repo = "ocl-icd";
+    rev = "v${version}";
+    sha256 = "sha256-nx9Zz5DpS29g1HRIwPAQi6i+d7Blxd53WQ7Sb1a3FHg=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    ruby
+  ];
+
+  buildInputs = [ opencl-headers ];
+
+  configureFlags = [
+    "--enable-custom-vendordir=/run/opengl-driver/etc/OpenCL/vendors"
+  ];
+
+  meta = with lib; {
+    description = "OpenCL ICD Loader for ${opencl-headers.name}";
+    homepage    = "https://github.com/OCL-dev/ocl-icd";
+    license     = licenses.bsd2;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ r-burns ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/octomap/default.nix b/nixpkgs/pkgs/development/libraries/octomap/default.nix
new file mode 100644
index 000000000000..6b1816d8addc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/octomap/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "octomap";
+  version = "1.9.8";
+
+  src = fetchFromGitHub {
+    owner = "OctoMap";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-qE5i4dGugm7tR5tgDCpbla/R7hYR/PI8BzrZQ4y6Yz8=";
+  };
+
+  sourceRoot = "${src.name}/octomap";
+
+  nativeBuildInputs = [ cmake ];
+
+  env.NIX_CFLAGS_COMPILE = toString [
+    # Needed with GCC 12
+    "-Wno-error=deprecated-declarations"
+  ];
+
+  meta = with lib; {
+    description = "A probabilistic, flexible, and compact 3D mapping library for robotic systems";
+    homepage = "https://octomap.github.io/";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ lopsided98 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ode/default.nix b/nixpkgs/pkgs/development/libraries/ode/default.nix
new file mode 100644
index 000000000000..6ae60b7b2d3a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ode/default.nix
@@ -0,0 +1,33 @@
+{ lib
+, stdenv
+, fetchurl
+, darwin
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "ode";
+  version = "0.16.4";
+
+  src = fetchurl {
+    url = "https://bitbucket.org/odedevs/ode/downloads/ode-${finalAttrs.version}.tar.gz";
+    hash = "sha256-cQN7goHGyGsKVXKfkNXbaXq+TL7B2BGBV+ANSOwlNGc=";
+  };
+
+  buildInputs = lib.optionals stdenv.isDarwin [
+    darwin.apple_sdk.frameworks.CoreServices
+    darwin.apple_sdk.frameworks.GLUT
+  ];
+
+  env.CXXFLAGS = lib.optionalString stdenv.cc.isClang (toString [
+    "-std=c++14"
+    "-Wno-error=c++11-narrowing"
+  ]);
+
+  meta = with lib; {
+    description = "Open Dynamics Engine";
+    homepage = "https://www.ode.org";
+    license = with licenses; [ bsd3 lgpl21Only lgpl3Only zlib ];
+    maintainers = with maintainers; [ wegank ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/odpic/default.nix b/nixpkgs/pkgs/development/libraries/odpic/default.nix
new file mode 100644
index 000000000000..89502e6c3eb7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/odpic/default.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, fetchFromGitHub, fixDarwinDylibNames, oracle-instantclient, libaio }:
+
+let
+  version = "5.1.0";
+  libPath = lib.makeLibraryPath [ oracle-instantclient.lib ];
+
+in
+stdenv.mkDerivation {
+  inherit version;
+
+  pname = "odpic";
+
+  src = fetchFromGitHub {
+    owner = "oracle";
+    repo = "odpi";
+    rev = "v${version}";
+    sha256 = "sha256-J7v6nNwAXy0j2mXc9RcO/V54WutA9TvTGUubHkpNBWo=";
+  };
+
+  nativeBuildInputs = lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+  buildInputs = [ oracle-instantclient ]
+    ++ lib.optionals stdenv.isLinux [ libaio ];
+
+  dontPatchELF = true;
+  makeFlags = [ "PREFIX=$(out)" "CC=${stdenv.cc.targetPrefix}cc" "LD=${stdenv.cc.targetPrefix}cc" ];
+
+  postFixup = ''
+    ${lib.optionalString (stdenv.isLinux) ''
+      patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $out/lib/libodpic${stdenv.hostPlatform.extensions.sharedLibrary})" $out/lib/libodpic${stdenv.hostPlatform.extensions.sharedLibrary}
+    ''}
+    ${lib.optionalString (stdenv.isDarwin) ''
+      install_name_tool -add_rpath "${libPath}" $out/lib/libodpic${stdenv.hostPlatform.extensions.sharedLibrary}
+    ''}
+  '';
+
+  meta = with lib; {
+    description = "Oracle ODPI-C library";
+    homepage = "https://oracle.github.io/odpi/";
+    maintainers = with maintainers; [ mkazulak ];
+    license = licenses.asl20;
+    platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
+    hydraPlatforms = [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ogdf/default.nix b/nixpkgs/pkgs/development/libraries/ogdf/default.nix
new file mode 100644
index 000000000000..e88fc796ba77
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ogdf/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv, fetchFromGitHub, cmake, doxygen }:
+
+stdenv.mkDerivation rec {
+  pname = "ogdf";
+  version = "2022.02";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = "dogwood-202202";
+    sha256 = "sha256-zkQ6sS0EUmiigv3T7To+tG3XbFbR3XEbFo15oQ0bWf0=";
+  };
+
+  nativeBuildInputs = [ cmake doxygen ];
+
+  cmakeFlags = [
+    "-DCMAKE_CXX_FLAGS=-fPIC"
+    "-DBUILD_SHARED_LIBS=ON"
+    "-DOGDF_WARNING_ERRORS=OFF"
+  ];
+
+  meta = with lib; {
+    description = "Open Graph Drawing Framework/Open Graph algorithms and Data structure Framework";
+    homepage = "http://www.ogdf.net";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.ianwookim ];
+    platforms = platforms.all;
+    longDescription = ''
+      OGDF stands both for Open Graph Drawing Framework (the original name) and
+      Open Graph algorithms and Data structures Framework.
+
+      OGDF is a self-contained C++ library for graph algorithms, in particular
+      for (but not restricted to) automatic graph drawing. It offers sophisticated
+      algorithms and data structures to use within your own applications or
+      scientific projects.
+
+      OGDF is developed and supported by Osnabrück University, TU Dortmund,
+      University of Cologne, University of Konstanz, and TU Ilmenau.
+    '';
+   };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ogre/default.nix b/nixpkgs/pkgs/development/libraries/ogre/default.nix
new file mode 100644
index 000000000000..f6cd2987aa0d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ogre/default.nix
@@ -0,0 +1,109 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, unzip
+, SDL2
+, boost
+, freetype
+, libpng
+, ois
+, pugixml
+, zziplib
+  # linux
+, freeglut
+, libGL
+, libGLU
+, libICE
+, libSM
+, libX11
+, libXaw
+, libXmu
+, libXrandr
+, libXrender
+, libXt
+, libXxf86vm
+, xorgproto
+  # darwin
+, darwin
+  # optional
+, withNvidiaCg ? false
+, nvidia_cg_toolkit
+, withSamples ? false
+}:
+
+let
+  common = { version, hash }: stdenv.mkDerivation {
+    pname = "ogre";
+    inherit version;
+
+    src = fetchFromGitHub {
+      owner = "OGRECave";
+      repo = "ogre";
+      rev = "v${version}";
+      inherit hash;
+    };
+
+    nativeBuildInputs = [
+      cmake
+      pkg-config
+      unzip
+    ];
+
+    buildInputs = [
+      SDL2
+      boost
+      freetype
+      libpng
+      ois
+      pugixml
+      zziplib
+    ] ++ lib.optionals stdenv.isLinux [
+      freeglut
+      libGL
+      libGLU
+      libICE
+      libSM
+      libX11
+      libXaw
+      libXmu
+      libXrandr
+      libXrender
+      libXt
+      libXxf86vm
+      xorgproto
+    ] ++ lib.optionals stdenv.isDarwin [
+      darwin.apple_sdk.frameworks.Cocoa
+    ] ++ lib.optionals withNvidiaCg [
+      nvidia_cg_toolkit
+    ];
+
+    cmakeFlags = [
+      "-DOGRE_BUILD_COMPONENT_OVERLAY_IMGUI=FALSE"
+      "-DOGRE_BUILD_DEPENDENCIES=OFF"
+      "-DOGRE_BUILD_SAMPLES=${toString withSamples}"
+    ] ++ lib.optionals stdenv.isDarwin [
+      "-DOGRE_BUILD_LIBS_AS_FRAMEWORKS=FALSE"
+    ];
+
+    meta = {
+      description = "3D Object-Oriented Graphics Rendering Engine";
+      homepage = "https://www.ogre3d.org/";
+      maintainers = with lib.maintainers; [ raskin wegank ];
+      platforms = lib.platforms.unix;
+      license = lib.licenses.mit;
+    };
+  };
+in
+{
+  ogre_14 = common {
+    version = "14.1.2";
+    hash = "sha256-qPoC5VXA9IC1xiFLrvE7cqCZFkuiEM0OMowUXDlmhF4=";
+  };
+
+  ogre_13 = common {
+    version = "13.6.5";
+    hash = "sha256-8VQqePrvf/fleHijVIqWWfwOusGjVR40IIJ13o+HwaE=";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ois/default.nix b/nixpkgs/pkgs/development/libraries/ois/default.nix
new file mode 100644
index 000000000000..0a384b03bb2a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ois/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, lib, fetchFromGitHub, cmake, libX11, Cocoa, IOKit, Kernel }:
+
+stdenv.mkDerivation rec {
+  pname = "ois";
+  version = "1.5.1";
+
+  src = fetchFromGitHub {
+    owner = "wgois";
+    repo = "OIS";
+    rev = "v${version}";
+    sha256 = "sha256-ir6p+Tzf8L5VOW/rsG4yelsth7INbhABO2T7pfMHcFo=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = lib.optionals stdenv.isLinux [ libX11 ]
+    ++ lib.optionals stdenv.isDarwin [ Cocoa IOKit Kernel ];
+
+  cmakeFlags = [
+    "-DCMAKE_INSTALL_LIBDIR=lib"
+  ];
+
+  meta = with lib; {
+    description = "Object-oriented C++ input system";
+    maintainers = [ maintainers.raskin ];
+    platforms = platforms.unix;
+    license = licenses.zlib;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/okapi/default.nix b/nixpkgs/pkgs/development/libraries/okapi/default.nix
new file mode 100644
index 000000000000..b7a75ad6d1b9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/okapi/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, rustPlatform, fetchurl, Security }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "okapi";
+  version = "1.6.0";
+
+  src = fetchurl {
+    url = "https://github.com/trinsic-id/okapi/releases/download/v${version}/okapi-vendor-${version}.tar.gz";
+    sha256 = "sha256-wszpCzh1VhqBlox7ywWi6WKUmxQUTsf5N5IiJumlEbM=";
+  };
+
+  cargoVendorDir = "vendor";
+  doCheck = false;
+
+  buildInputs = lib.optionals stdenv.isDarwin [ Security ];
+
+  postInstall = ''
+    cp -r include $out
+  '';
+
+  meta = with lib; {
+    description = "Okapi Library";
+    longDescription = ''
+      Collection of tools that support workflows for working
+      with authentic data and identity management
+    '';
+    homepage = "https://github.com/trinsic-id/okapi";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ tmarkovski ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/olm/default.nix b/nixpkgs/pkgs/development/libraries/olm/default.nix
new file mode 100644
index 000000000000..bb7553c2eb3e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/olm/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchFromGitLab, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "olm";
+  version = "3.2.16";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.matrix.org";
+    owner = "matrix-org";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-JX20mpuLO+UoNc8iQlXEHAbH9sfblkBbM1gE27Ve0ac=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  doCheck = true;
+
+  postPatch = ''
+    substituteInPlace olm.pc.in \
+      --replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
+      --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
+  '';
+
+  meta = with lib; {
+    description = "Implements double cryptographic ratchet and Megolm ratchet";
+    homepage = "https://gitlab.matrix.org/matrix-org/olm";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ tilpner oxzi ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/omorfi/default.nix b/nixpkgs/pkgs/development/libraries/omorfi/default.nix
new file mode 100644
index 000000000000..6002ea464673
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/omorfi/default.nix
@@ -0,0 +1,92 @@
+{ lib
+, stdenv
+, autoreconfHook
+, cg3
+, fetchFromGitHub
+, fetchpatch
+, hfst
+, hfst-ospell
+, icu
+, libvoikko
+, makeWrapper
+, pkg-config
+, python3
+, zip
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "omorfi";
+  version = "0.9.9";
+
+  src = fetchFromGitHub {
+    owner = "flammie";
+    repo = "omorfi";
+    rev = "refs/tags/v${finalAttrs.version}";
+    hash = "sha256-UoqdwNWCNOPX6u1YBlnXUcB/fmcvcy/HXbYciVrMBOY=";
+  };
+
+  patches = [
+    # allow building with python311.
+    # patch is incorporated upstream and should be removed on the next update
+    (fetchpatch {
+      name = "python311.patch";
+      url = "https://github.com/flammie/omorfi/commit/9736452ae6624060dbea0876a722c3731e776357.patch";
+      hash = "sha256-Q4fi5HMmO0fq8YI833vgv2EYp//9Um/xFoRk28WrUMk=";
+    })
+  ];
+
+  # Fix for omorfi-hyphenate.sh file not found error
+  postInstall = ''
+    ln -s $out/share/omorfi/{omorfi.hyphenate-rules.hfst,omorfi.hyphenate.hfst}
+  '';
+
+  nativeBuildInputs = [
+    autoreconfHook
+    cg3
+    makeWrapper
+    pkg-config
+    python3
+    zip
+    python3.pkgs.wrapPython
+  ];
+
+  buildInputs = [
+    python3.pkgs.hfst
+    hfst-ospell
+    libvoikko
+  ];
+
+  # Supplied pkg-config file doesn't properly expose these
+  propagatedBuildInputs = [
+    hfst
+    icu
+  ];
+
+  # Wrap shell scripts so they find the Python scripts
+  # omorfi.bash inexplicably fails when wrapped
+  preFixup = ''
+    wrapPythonProgramsIn "$out/bin" "$out ${python3.pkgs.hfst}"
+    for i in "$out/bin"/*.{sh,bash}; do
+      if [ $(basename "$i") != "omorfi.bash" ]; then
+        wrapProgram "$i" --prefix "PATH" : "$out/bin/"
+      fi
+    done
+  '';
+
+  # Enable all features
+  configureFlags = [
+    "--enable-labeled-segments"
+    "--enable-lemmatiser"
+    "--enable-segmenter"
+    "--enable-hyphenator"
+  ];
+
+  meta = with lib; {
+    description = "Analysis for Finnish text";
+    homepage = "https://github.com/flammie/omorfi";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ lurkki ];
+    # Darwin build fails due to hfst not being found
+    broken = stdenv.isDarwin;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/oneDNN/2.nix b/nixpkgs/pkgs/development/libraries/oneDNN/2.nix
new file mode 100644
index 000000000000..8851b09214f1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/oneDNN/2.nix
@@ -0,0 +1,45 @@
+{ cmake
+, fetchFromGitHub
+, lib
+, stdenv
+}:
+
+# This was originally called mkl-dnn, then it was renamed to dnnl, and it has
+# just recently been renamed again to oneDNN. See here for details:
+# https://github.com/oneapi-src/oneDNN#oneapi-deep-neural-network-library-onednn
+stdenv.mkDerivation (finalAttrs: {
+  pname = "oneDNN";
+  version = "2.7.5";
+
+  src = fetchFromGitHub {
+    owner = "oneapi-src";
+    repo = "oneDNN";
+    rev = "v${finalAttrs.version}";
+    sha256 = "sha256-oMPBORAdL2rk2ewyUrInYVHYBRvuvNX4p4rwykO3Rhs=";
+  };
+
+  outputs = [ "out" "dev" "doc" ];
+
+  nativeBuildInputs = [ cmake ];
+
+  # Tests fail on some Hydra builders, because they do not support SSE4.2.
+  doCheck = false;
+
+  # Fixup bad cmake paths
+  postInstall = ''
+    substituteInPlace $out/lib/cmake/dnnl/dnnl-config.cmake \
+      --replace "\''${PACKAGE_PREFIX_DIR}/" ""
+
+    substituteInPlace $out/lib/cmake/dnnl/dnnl-targets.cmake \
+      --replace "\''${_IMPORT_PREFIX}/" ""
+  '';
+
+  meta = {
+    changelog = "https://github.com/oneapi-src/oneDNN/releases/tag/v${finalAttrs.version}";
+    description = "oneAPI Deep Neural Network Library (oneDNN)";
+    homepage = "https://01.org/oneDNN";
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ alexarice bhipple ];
+    platforms = lib.platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/oneDNN/default.nix b/nixpkgs/pkgs/development/libraries/oneDNN/default.nix
new file mode 100644
index 000000000000..2518cecb9b6c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/oneDNN/default.nix
@@ -0,0 +1,45 @@
+{ cmake
+, fetchFromGitHub
+, lib
+, stdenv
+}:
+
+# This was originally called mkl-dnn, then it was renamed to dnnl, and it has
+# just recently been renamed again to oneDNN. See here for details:
+# https://github.com/oneapi-src/oneDNN#oneapi-deep-neural-network-library-onednn
+stdenv.mkDerivation (finalAttrs: {
+  pname = "oneDNN";
+  version = "3.3.1";
+
+  src = fetchFromGitHub {
+    owner = "oneapi-src";
+    repo = "oneDNN";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-br2ssI4MRk9O6u+5voBmxBZtmTFPKoJJe3ZEN2blq7Y=";
+  };
+
+  outputs = [ "out" "dev" "doc" ];
+
+  nativeBuildInputs = [ cmake ];
+
+  # Tests fail on some Hydra builders, because they do not support SSE4.2.
+  doCheck = false;
+
+  # Fixup bad cmake paths
+  postInstall = ''
+    substituteInPlace $out/lib/cmake/dnnl/dnnl-config.cmake \
+      --replace "\''${PACKAGE_PREFIX_DIR}/" ""
+
+    substituteInPlace $out/lib/cmake/dnnl/dnnl-targets.cmake \
+      --replace "\''${_IMPORT_PREFIX}/" ""
+  '';
+
+  meta = {
+    changelog = "https://github.com/oneapi-src/oneDNN/releases/tag/v${finalAttrs.version}";
+    description = "oneAPI Deep Neural Network Library (oneDNN)";
+    homepage = "https://01.org/oneDNN";
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ bhipple ];
+    platforms = lib.platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/oniguruma/default.nix b/nixpkgs/pkgs/development/libraries/oniguruma/default.nix
new file mode 100644
index 000000000000..a1a9dc875735
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/oniguruma/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "oniguruma";
+  version = "6.9.9";
+
+  # Note: do not use fetchpatch or fetchFromGitHub to keep this package available in __bootPackages
+  src = fetchurl {
+    url = "https://github.com/kkos/oniguruma/releases/download/v${version}/onig-${version}.tar.gz";
+    sha256 = "sha256-YBYr07n8b0iG1MegeSX/03QWdzL1Xc6MSRv9nNgYps8=";
+  };
+
+  outputs = [ "dev" "lib" "out" ];
+  outputBin = "dev"; # onig-config
+
+  nativeBuildInputs = [ autoreconfHook ];
+  configureFlags = [ "--enable-posix-api=yes" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/kkos/oniguruma";
+    description = "Regular expressions library";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ artturin ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/onnxruntime/0001-eigen-allow-dependency-injection.patch b/nixpkgs/pkgs/development/libraries/onnxruntime/0001-eigen-allow-dependency-injection.patch
new file mode 100644
index 000000000000..41a7cf54abaa
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/onnxruntime/0001-eigen-allow-dependency-injection.patch
@@ -0,0 +1,45 @@
+From a29cffa646356228d6ec7bd7ce21fe3ab90fdd19 Mon Sep 17 00:00:00 2001
+From: Someone Serge <sergei.kozlukov@aalto.fi>
+Date: Wed, 7 Feb 2024 16:59:09 +0000
+Subject: [PATCH] eigen: allow dependency injection
+
+---
+ cmake/external/eigen.cmake | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/cmake/external/eigen.cmake b/cmake/external/eigen.cmake
+index c0f7ddc50e..996b83d18a 100644
+--- a/cmake/external/eigen.cmake
++++ b/cmake/external/eigen.cmake
+@@ -1,4 +1,3 @@
+-
+ if (onnxruntime_USE_PREINSTALLED_EIGEN)
+     add_library(eigen INTERFACE)
+     file(TO_CMAKE_PATH ${eigen_SOURCE_PATH} eigen_INCLUDE_DIRS)
+@@ -10,14 +9,21 @@ else ()
+             URL ${DEP_URL_eigen}
+             URL_HASH SHA1=${DEP_SHA1_eigen}
+             PATCH_COMMAND ${Patch_EXECUTABLE} --ignore-space-change --ignore-whitespace < ${PROJECT_SOURCE_DIR}/patches/eigen/Fix_Eigen_Build_Break.patch
++            FIND_PACKAGE_ARGS NAMES Eigen3
+         )
+     else()
+         FetchContent_Declare(
+             eigen
+             URL ${DEP_URL_eigen}
+             URL_HASH SHA1=${DEP_SHA1_eigen}
++            FIND_PACKAGE_ARGS NAMES Eigen3
+         )
+     endif()
+-    FetchContent_Populate(eigen)
+-    set(eigen_INCLUDE_DIRS  "${eigen_SOURCE_DIR}")
++    FetchContent_MakeAvailable(eigen)
++    add_library(eigen ALIAS Eigen3::Eigen)
++
++    # Onnxruntime doesn't always use `eigen` as a target in
++    # `target_link_libraries`, sometimes it just uses
++    # `target_include_directories`:
++    get_target_property(eigen_INCLUDE_DIRS Eigen3::Eigen INTERFACE_INCLUDE_DIRECTORIES)
+ endif()
+-- 
+2.42.0
+
diff --git a/nixpkgs/pkgs/development/libraries/onnxruntime/default.nix b/nixpkgs/pkgs/development/libraries/onnxruntime/default.nix
new file mode 100644
index 000000000000..af4d061d015b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/onnxruntime/default.nix
@@ -0,0 +1,261 @@
+{ config
+, stdenv
+, lib
+, fetchFromGitHub
+, Foundation
+, abseil-cpp
+, cmake
+, eigen
+, gtest
+, libpng
+, nlohmann_json
+, nsync
+, pkg-config
+, python3Packages
+, re2
+, zlib
+, microsoft-gsl
+, iconv
+, protobuf_21
+, pythonSupport ? true
+, cudaSupport ? config.cudaSupport
+, cudaPackages ? {}
+}@inputs:
+
+
+let
+  version = "1.16.3";
+
+  stdenv = throw "Use effectiveStdenv instead";
+  effectiveStdenv = if cudaSupport then cudaPackages.backendStdenv else inputs.stdenv;
+
+  cudaCapabilities = cudaPackages.cudaFlags.cudaCapabilities;
+  # E.g. [ "80" "86" "90" ]
+  cudaArchitectures = (builtins.map cudaPackages.cudaFlags.dropDot cudaCapabilities);
+  cudaArchitecturesString = lib.strings.concatStringsSep ";" cudaArchitectures;
+
+  howard-hinnant-date = fetchFromGitHub {
+    owner = "HowardHinnant";
+    repo = "date";
+    rev = "v2.4.1";
+    sha256 = "sha256-BYL7wxsYRI45l8C3VwxYIIocn5TzJnBtU0UZ9pHwwZw=";
+  };
+
+  mp11 = fetchFromGitHub {
+    owner = "boostorg";
+    repo = "mp11";
+    rev = "boost-1.79.0";
+    hash = "sha256-ZxgPDLvpISrjpEHKpLGBowRKGfSwTf6TBfJD18yw+LM=";
+  };
+
+  safeint = fetchFromGitHub {
+    owner = "dcleblanc";
+    repo = "safeint";
+    rev = "ff15c6ada150a5018c5ef2172401cb4529eac9c0";
+    hash = "sha256-PK1ce4C0uCR4TzLFg+elZdSk5DdPCRhhwT3LvEwWnPU=";
+  };
+
+  pytorch_cpuinfo = fetchFromGitHub {
+    owner = "pytorch";
+    repo = "cpuinfo";
+    # There are no tags in the repository
+    rev = "5916273f79a21551890fd3d56fc5375a78d1598d";
+    hash = "sha256-nXBnloVTuB+AVX59VDU/Wc+Dsx94o92YQuHp3jowx2A=";
+  };
+
+  flatbuffers = fetchFromGitHub {
+    owner = "google";
+    repo = "flatbuffers";
+    rev = "v1.12.0";
+    hash = "sha256-L1B5Y/c897Jg9fGwT2J3+vaXsZ+lfXnskp8Gto1p/Tg=";
+  };
+
+  gtest' = gtest.overrideAttrs (oldAttrs: rec {
+    version = "1.13.0";
+    src = fetchFromGitHub {
+      owner = "google";
+      repo = "googletest";
+      rev = "v${version}";
+      hash = "sha256-LVLEn+e7c8013pwiLzJiiIObyrlbBHYaioO/SWbItPQ=";
+    };
+  });
+
+  onnx = fetchFromGitHub {
+    owner = "onnx";
+    repo = "onnx";
+    rev = "refs/tags/v1.14.1";
+    hash = "sha256-ZVSdk6LeAiZpQrrzLxphMbc1b3rNUMpcxcXPP8s/5tE=";
+  };
+
+   cutlass = fetchFromGitHub {
+    owner = "NVIDIA";
+    repo = "cutlass";
+    rev = "v3.0.0";
+    sha256 = "sha256-YPD5Sy6SvByjIcGtgeGH80TEKg2BtqJWSg46RvnJChY=";
+   };
+in
+effectiveStdenv.mkDerivation rec {
+  pname = "onnxruntime";
+  inherit version;
+
+  src = fetchFromGitHub {
+    owner = "microsoft";
+    repo = "onnxruntime";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-bTW9Pc3rvH+c8VIlDDEtAXyA3sajVyY5Aqr6+SxaMF4=";
+    fetchSubmodules = true;
+  };
+
+  patches = [
+    # If you stumble on these patches trying to update onnxruntime, check
+    # `git blame` and ping the introducers.
+
+    # Context: we want the upstream to
+    # - always try find_package first (FIND_PACKAGE_ARGS),
+    # - use MakeAvailable instead of the low-level Populate,
+    # - use Eigen3::Eigen as the target name (as declared by libeigen/eigen).
+    ./0001-eigen-allow-dependency-injection.patch
+  ] ++ lib.optionals cudaSupport [
+    # We apply the referenced 1064.patch ourselves to our nix dependency.
+    #  FIND_PACKAGE_ARGS for CUDA was added in https://github.com/microsoft/onnxruntime/commit/87744e5 so it might be possible to delete this patch after upgrading to 1.17.0
+    ./nvcc-gsl.patch
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    python3Packages.python
+    protobuf_21
+  ] ++ lib.optionals pythonSupport (with python3Packages; [
+    pip
+    python
+    pythonOutputDistHook
+    setuptools
+    wheel
+  ]) ++ lib.optionals cudaSupport [
+    cudaPackages.cuda_nvcc
+  ];
+
+  buildInputs = [
+    eigen
+    libpng
+    zlib
+    nlohmann_json
+    microsoft-gsl
+  ] ++ lib.optionals pythonSupport (with python3Packages; [
+    gtest'
+    numpy
+    pybind11
+    packaging
+  ]) ++ lib.optionals effectiveStdenv.isDarwin [
+    Foundation
+    iconv
+  ] ++ lib.optionals cudaSupport (with cudaPackages; [
+    cuda_cccl # cub/cub.cuh
+    libcublas # cublas_v2.h
+    libcurand # curand.h
+    libcusparse # cusparse.h
+    libcufft # cufft.h
+    cudnn # cudnn.h
+    cuda_cudart
+  ]);
+
+  nativeCheckInputs = lib.optionals pythonSupport (with python3Packages; [
+    pytest
+    sympy
+    onnx
+  ]);
+
+  # TODO: build server, and move .so's to lib output
+  # Python's wheel is stored in a separate dist output
+  outputs = [ "out" "dev" ] ++ lib.optionals pythonSupport [ "dist" ];
+
+  enableParallelBuilding = true;
+
+  cmakeDir = "../cmake";
+
+  cmakeFlags = [
+    "-DABSL_ENABLE_INSTALL=ON"
+    "-DFETCHCONTENT_FULLY_DISCONNECTED=ON"
+    "-DFETCHCONTENT_QUIET=OFF"
+    "-DFETCHCONTENT_SOURCE_DIR_ABSEIL_CPP=${abseil-cpp.src}"
+    "-DFETCHCONTENT_SOURCE_DIR_DATE=${howard-hinnant-date}"
+    "-DFETCHCONTENT_SOURCE_DIR_FLATBUFFERS=${flatbuffers}"
+    "-DFETCHCONTENT_SOURCE_DIR_GOOGLE_NSYNC=${nsync.src}"
+    "-DFETCHCONTENT_SOURCE_DIR_MP11=${mp11}"
+    "-DFETCHCONTENT_SOURCE_DIR_ONNX=${onnx}"
+    "-DFETCHCONTENT_SOURCE_DIR_PYTORCH_CPUINFO=${pytorch_cpuinfo}"
+    "-DFETCHCONTENT_SOURCE_DIR_RE2=${re2.src}"
+    "-DFETCHCONTENT_SOURCE_DIR_SAFEINT=${safeint}"
+    "-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS"
+    "-Donnxruntime_BUILD_SHARED_LIB=ON"
+    "-Donnxruntime_BUILD_UNIT_TESTS=ON"
+    "-Donnxruntime_ENABLE_LTO=ON"
+    "-Donnxruntime_USE_FULL_PROTOBUF=OFF"
+    (lib.cmakeBool "onnxruntime_USE_CUDA" cudaSupport)
+    (lib.cmakeBool "onnxruntime_USE_NCCL" cudaSupport)
+  ] ++ lib.optionals pythonSupport [
+    "-Donnxruntime_ENABLE_PYTHON=ON"
+  ] ++ lib.optionals cudaSupport [
+    (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_CUTLASS" cutlass)
+    (lib.cmakeFeature "onnxruntime_CUDNN_HOME" cudaPackages.cudnn)
+    (lib.cmakeFeature "CMAKE_CUDA_ARCHITECTURES" cudaArchitecturesString)
+  ];
+
+  env = lib.optionalAttrs effectiveStdenv.cc.isClang {
+    NIX_CFLAGS_COMPILE = toString [
+      "-Wno-error=deprecated-declarations"
+      "-Wno-error=unused-but-set-variable"
+    ];
+  };
+
+  doCheck = !cudaSupport;
+
+  requiredSystemFeatures = lib.optionals cudaSupport [ "big-parallel" ];
+
+  postPatch = ''
+    substituteInPlace cmake/libonnxruntime.pc.cmake.in \
+      --replace-fail '$'{prefix}/@CMAKE_INSTALL_ @CMAKE_INSTALL_
+  '' + lib.optionalString (effectiveStdenv.hostPlatform.system == "aarch64-linux") ''
+    # https://github.com/NixOS/nixpkgs/pull/226734#issuecomment-1663028691
+    rm -v onnxruntime/test/optimizer/nhwc_transformer_test.cc
+  '';
+
+  postBuild = lib.optionalString pythonSupport ''
+    ${python3Packages.python.interpreter} ../setup.py bdist_wheel
+  '';
+
+  postInstall = ''
+    # perform parts of `tools/ci_build/github/linux/copy_strip_binary.sh`
+    install -m644 -Dt $out/include \
+      ../include/onnxruntime/core/framework/provider_options.h \
+      ../include/onnxruntime/core/providers/cpu/cpu_provider_factory.h \
+      ../include/onnxruntime/core/session/onnxruntime_*.h
+  '';
+
+  passthru = {
+    protobuf = protobuf_21;
+    tests = lib.optionalAttrs pythonSupport {
+      python = python3Packages.onnxruntime;
+    };
+  };
+
+  meta = with lib; {
+    description = "Cross-platform, high performance scoring engine for ML models";
+    longDescription = ''
+      ONNX Runtime is a performance-focused complete scoring engine
+      for Open Neural Network Exchange (ONNX) models, with an open
+      extensible architecture to continually address the latest developments
+      in AI and Deep Learning. ONNX Runtime stays up to date with the ONNX
+      standard with complete implementation of all ONNX operators, and
+      supports all ONNX releases (1.2+) with both future and backwards
+      compatibility.
+    '';
+    homepage = "https://github.com/microsoft/onnxruntime";
+    changelog = "https://github.com/microsoft/onnxruntime/releases/tag/v${version}";
+    # https://github.com/microsoft/onnxruntime/blob/master/BUILD.md#architectures
+    platforms = platforms.unix;
+    license = licenses.mit;
+    maintainers = with maintainers; [ jonringer puffnfresh ck3d cbourjau ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/onnxruntime/nvcc-gsl.patch b/nixpkgs/pkgs/development/libraries/onnxruntime/nvcc-gsl.patch
new file mode 100644
index 000000000000..948de62e7e75
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/onnxruntime/nvcc-gsl.patch
@@ -0,0 +1,32 @@
+diff --git a/cmake/external/onnxruntime_external_deps.cmake b/cmake/external/onnxruntime_external_deps.cmake
+index 9effd1a2db..faff5e8de7 100644
+--- a/cmake/external/onnxruntime_external_deps.cmake
++++ b/cmake/external/onnxruntime_external_deps.cmake
+@@ -280,21 +280,12 @@ if (NOT WIN32)
+   endif()
+ endif()
+ 
+-if(onnxruntime_USE_CUDA)
+-  FetchContent_Declare(
+-    GSL
+-    URL ${DEP_URL_microsoft_gsl}
+-    URL_HASH SHA1=${DEP_SHA1_microsoft_gsl}
+-    PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/gsl/1064.patch
+-  )
+-else()
+-  FetchContent_Declare(
+-    GSL
+-    URL ${DEP_URL_microsoft_gsl}
+-    URL_HASH SHA1=${DEP_SHA1_microsoft_gsl}
+-    FIND_PACKAGE_ARGS 4.0 NAMES Microsoft.GSL
+-  )
+-endif()
++FetchContent_Declare(
++  GSL
++  URL ${DEP_URL_microsoft_gsl}
++  URL_HASH SHA1=${DEP_SHA1_microsoft_gsl}
++  FIND_PACKAGE_ARGS 4.0 NAMES Microsoft.GSL
++)
+ 
+ FetchContent_Declare(
+     safeint
diff --git a/nixpkgs/pkgs/development/libraries/opae/default.nix b/nixpkgs/pkgs/development/libraries/opae/default.nix
new file mode 100644
index 000000000000..339edf234f53
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opae/default.nix
@@ -0,0 +1,51 @@
+{ lib, stdenv, fetchFromGitHub, cmake
+, libuuid, json_c
+, doxygen, perl, python3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "opae";
+  version = "1.0.0";
+
+  # the tag has a silly name for some reason. drop this in the future if
+  # possible
+  tver    = "${version}-5";
+
+  src = fetchFromGitHub {
+    owner  = "opae";
+    repo   = "opae-sdk";
+    rev    = "refs/tags/${tver}";
+    sha256 = "1dmkpnr9dqxwjhbdzx2r3fdfylvinda421yyg319am5gzlysxwi8";
+  };
+
+  doCheck = false;
+
+  env.NIX_CFLAGS_COMPILE = toString [
+    "-Wno-error=format-truncation"
+    "-Wno-error=address-of-packed-member"
+    "-Wno-array-bounds"
+  ];
+
+  nativeBuildInputs = [ cmake doxygen perl python3.pkgs.sphinx ];
+  buildInputs = [ libuuid json_c python3 ];
+
+  # Set the Epoch to 1980; otherwise the Python wheel/zip code
+  # gets very angry
+  preConfigure = ''
+    find . -type f | while read file; do
+      touch -d @315532800 $file;
+    done
+  '';
+
+  cmakeFlags = [ "-DBUILD_ASE=1" ];
+
+  meta = with lib; {
+    description = "Open Programmable Acceleration Engine SDK";
+    homepage    = "https://01.org/opae";
+    license     = licenses.bsd3;
+    platforms   = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ thoughtpolice ];
+    # Needs a major update, not compatible with gcc-11.
+    broken = true;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/open62541/default.nix b/nixpkgs/pkgs/development/libraries/open62541/default.nix
new file mode 100644
index 000000000000..b8c22a73dd4e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/open62541/default.nix
@@ -0,0 +1,163 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, pkg-config
+, check
+, libxcrypt
+, subunit
+, python3Packages
+, nix-update-script
+
+, withDoc ? false
+, graphviz-nox
+
+, withExamples ? false
+
+, withEncryption ? false # or "openssl" or "mbedtls"
+, openssl
+, mbedtls
+
+, withPubSub ? false
+
+# for passthru.tests only
+, open62541
+}:
+
+let
+  encryptionBackend = {
+    inherit openssl mbedtls;
+  }."${withEncryption}" or (throw "Unsupported encryption backend: ${withEncryption}");
+in
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "open62541";
+  version = "1.3.9";
+
+  src = fetchFromGitHub {
+    owner = "open62541";
+    repo = "open62541";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-FnLMR54xjIyYRqwCnvMJsNgsVwH7hVAixCNGhfIZPiw=";
+    fetchSubmodules = true;
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "Ensure-absolute-paths-in-pkg-config-file.patch";
+      url = "https://github.com/open62541/open62541/commit/023d4b6b8bdec987f8f3ffee6c09801bbee4fa2d.patch";
+      sha256 = "sha256-mq4h32js2RjI0Ljown/01SXA3gc+7+zX8meIcvDPvoA=";
+    })
+  ];
+
+  cmakeFlags = [
+    "-DOPEN62541_VERSION=v${finalAttrs.version}"
+
+    "-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
+    "-DUA_NAMESPACE_ZERO=FULL"
+
+    "-DUA_BUILD_UNIT_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
+  ]
+  ++ lib.optional withExamples "-DUA_BUILD_EXAMPLES=ON"
+  ++ lib.optional (withEncryption != false)
+    "-DUA_ENABLE_ENCRYPTION=${lib.toUpper withEncryption}"
+  ++ lib.optional withPubSub "-DUA_ENABLE_PUBSUB=ON"
+  ;
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    python3Packages.python
+  ]
+  ++ lib.optionals withDoc (with python3Packages; [
+    sphinx
+    sphinx_rtd_theme
+    graphviz-nox
+  ]);
+
+  buildInputs = lib.optional (withEncryption != false) encryptionBackend;
+
+  buildFlags = [ "all" ] ++ lib.optional withDoc "doc";
+
+  doCheck = true;
+
+  checkInputs = [
+    check
+    libxcrypt
+    subunit
+  ];
+
+  # Tests must run sequentially to avoid port collisions on localhost
+  enableParallelChecking = false;
+
+  preCheck = let
+    disabledTests = lib.optionals withPubSub [
+      # "Cannot set socket option IP_ADD_MEMBERSHIP"
+      "pubsub_publish"
+      "check_pubsub_get_state"
+      "check_pubsub_publish_rt_levels"
+      "check_pubsub_subscribe_config_freeze"
+      "check_pubsub_subscribe_rt_levels"
+      "check_pubsub_multiple_subscribe_rt_levels"
+    ];
+    regex = "^(${builtins.concatStringsSep "|" disabledTests})\$";
+  in lib.optionalString (disabledTests != []) ''
+    checkFlagsArray+=(ARGS="-E ${lib.escapeRegex regex}")
+  '';
+
+  postInstall = lib.optionalString withDoc ''
+    # excluded files, see doc/CMakeLists.txt
+    rm -r doc/{_sources/,CMakeFiles/,cmake_install.cmake}
+
+    # doc is not installed automatically
+    mkdir -p $out/share/doc/open62541
+    cp -r doc/ $out/share/doc/open62541/html
+  '' + lib.optionalString withExamples ''
+    # install sources of examples
+    mkdir -p $out/share/open62541
+    cp -r ../examples $out/share/open62541
+
+    ${lib.optionalString (!stdenv.hostPlatform.isWindows) ''
+    # remove .exe suffix
+    mv -v $out/bin/ua_server_ctt.exe $out/bin/ua_server_ctt
+    ''}
+
+    # remove duplicate libraries in build/bin/, which cause forbidden
+    # references to /build/ in ua_server_ctt
+    rm -r bin/libopen62541*
+  '';
+
+  passthru.updateScript = nix-update-script { };
+
+  passthru.tests = let
+    open62541Full = encBackend: open62541.override {
+      withDoc = true;
+      # if (withExamples && withPubSub), one of the example currently fails to build
+      #withExamples = true;
+      withEncryption = encBackend;
+      withPubSub = true;
+    };
+  in {
+    open62541Full = open62541Full false;
+    open62541Full-openssl = open62541Full "openssl";
+    open62541Full-mbedtls = open62541Full "mbedtls";
+  };
+
+  meta = with lib; {
+    description = "Open source implementation of OPC UA";
+    longDescription = ''
+      open62541 (http://open62541.org) is an open source and free implementation
+      of OPC UA (OPC Unified Architecture) written in the common subset of the
+      C99 and C++98 languages.
+      The library is usable with all major compilers and provides the necessary
+      tools to implement dedicated OPC UA clients and servers, or to integrate
+      OPC UA-based communication into existing applications.
+    '';
+    homepage = "https://www.open62541.org";
+    changelog = "https://github.com/open62541/open62541/releases/tag/v${finalAttrs.version}";
+    license = licenses.mpl20;
+    maintainers = with maintainers; [ panicgh ];
+    platforms = platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/openal-soft/default.nix b/nixpkgs/pkgs/development/libraries/openal-soft/default.nix
new file mode 100644
index 000000000000..496b7ac60fe0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openal-soft/default.nix
@@ -0,0 +1,60 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, removeReferencesTo
+, alsaSupport ? !stdenv.isDarwin, alsa-lib
+, dbusSupport ? !stdenv.isDarwin, dbus
+, pipewireSupport ? !stdenv.isDarwin, pipewire
+, pulseSupport ? !stdenv.isDarwin, libpulseaudio
+, CoreServices, AudioUnit, AudioToolbox
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openal-soft";
+  version = "1.23.1";
+
+  src = fetchFromGitHub {
+    owner = "kcat";
+    repo = "openal-soft";
+    rev = version;
+    sha256 = "sha256-jwY1NzNJdWIvVv7TvJyg4cIGFLWGZhL3BkMI1NbOEG0=";
+  };
+
+  patches = [
+    # this will make it find its own data files (e.g. HRTF profiles)
+    # without any other configuration
+    ./search-out.patch
+  ];
+  postPatch = ''
+    substituteInPlace core/helpers.cpp \
+      --replace "@OUT@" $out
+  '';
+
+  strictDeps = true;
+
+  nativeBuildInputs = [ cmake pkg-config removeReferencesTo ];
+
+  buildInputs = lib.optional alsaSupport alsa-lib
+    ++ lib.optional dbusSupport dbus
+    ++ lib.optional pipewireSupport pipewire
+    ++ lib.optional pulseSupport libpulseaudio
+    ++ lib.optionals stdenv.isDarwin [ CoreServices AudioUnit AudioToolbox ];
+
+  cmakeFlags = [
+    # Automatically links dependencies without having to rely on dlopen, thus
+    # removes the need for NIX_LDFLAGS.
+    "-DALSOFT_DLOPEN=OFF"
+  ] ++ lib.optionals stdenv.hostPlatform.isLinux [
+    # https://github.com/NixOS/nixpkgs/issues/183774
+    "-DOSS_INCLUDE_DIR=${stdenv.cc.libc}/include"
+  ];
+
+  postInstall = lib.optional pipewireSupport ''
+    remove-references-to -t ${pipewire.dev} $(readlink -f $out/lib/*.so)
+  '';
+
+  meta = with lib; {
+    description = "OpenAL alternative";
+    homepage = "https://openal-soft.org/";
+    license = licenses.lgpl2;
+    maintainers = with maintainers; [ftrvxmtrx];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/openal-soft/search-out.patch b/nixpkgs/pkgs/development/libraries/openal-soft/search-out.patch
new file mode 100644
index 000000000000..5813cd48ee67
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openal-soft/search-out.patch
@@ -0,0 +1,12 @@
+diff --git a/alc/helpers.cpp b/alc/helpers.cpp
+index 8c1c856..19bbc0f 100644
+--- a/core/helpers.cpp
++++ b/core/helpers.cpp
+@@ -402,6 +402,7 @@ al::vector<std::string> SearchDataFiles(const char *ext, const char *subdir)
+ 
+         DirectorySearch(path.c_str(), ext, &results);
+     }
++    DirectorySearch("@OUT@/share/", ext, &results);
+ 
+     return results;
+ }
diff --git a/nixpkgs/pkgs/development/libraries/openbabel/2.nix b/nixpkgs/pkgs/development/libraries/openbabel/2.nix
new file mode 100644
index 000000000000..0cc752d993fb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openbabel/2.nix
@@ -0,0 +1,37 @@
+{stdenv, lib, fetchFromGitHub, fetchpatch, cmake, zlib, libxml2, eigen, python3, cairo, pcre, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "openbabel";
+  version = "2.4.1";
+
+  src = fetchFromGitHub {
+    owner = "openbabel";
+    repo = "openbabel";
+    rev = "openbabel-${lib.replaceStrings ["."] ["-"] version}";
+    sha256 = "sha256-+pXsWMzex7rB1mm6dnTHzAcyw9jImgx1OZuLeCvbeJ0=";
+  };
+
+  patches = [
+    # ARM / AArch64 fixes.
+    (fetchpatch {
+      url = "https://github.com/openbabel/openbabel/commit/ee11c98a655296550710db1207b294f00e168216.patch";
+      sha256 = "0wjqjrkr4pfirzzicdvlyr591vppydk572ix28jd2sagnfnf566g";
+    })
+  ];
+
+  postPatch = ''
+    sed '1i#include <ctime>' -i include/openbabel/obutil.h # gcc12
+  '';
+
+  buildInputs = [ zlib libxml2 eigen python3 cairo pcre ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  meta = with lib; {
+    description = "A toolbox designed to speak the many languages of chemical data";
+    homepage = "http://openbabel.org";
+    platforms = platforms.all;
+    maintainers = with maintainers; [ danielbarter ];
+    license = licenses.gpl2Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/openbabel/default.nix b/nixpkgs/pkgs/development/libraries/openbabel/default.nix
new file mode 100644
index 000000000000..fe12bbffa531
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openbabel/default.nix
@@ -0,0 +1,49 @@
+{ stdenv, lib, fetchFromGitHub, cmake, zlib, libxml2, eigen, python, cairo, pcre, pkg-config, swig, rapidjson }:
+
+stdenv.mkDerivation rec {
+  pname = "openbabel";
+  version = "3.1.1";
+
+  src = fetchFromGitHub {
+    owner = "openbabel";
+    repo = "openbabel";
+    rev = "openbabel-${lib.replaceStrings ["."] ["-"] version}";
+    sha256 = "sha256-wQpgdfCyBAoh4pmj9j7wPTlMtraJ62w/EShxi/olVMY=";
+  };
+
+  postPatch = ''
+    sed '1i#include <ctime>' -i include/openbabel/obutil.h # gcc12
+  '';
+
+  buildInputs = [ zlib libxml2 eigen python cairo pcre swig rapidjson ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  pythonMajorMinor = "${python.sourceVersion.major}.${python.sourceVersion.minor}";
+
+  cmakeFlags = [
+    "-DRUN_SWIG=ON"
+    "-DPYTHON_BINDINGS=ON"
+  ];
+
+  postFixup = ''
+    cat <<EOF > $out/lib/python$pythonMajorMinor/site-packages/setup.py
+    from distutils.core import setup
+
+    setup(
+        name = 'pyopenbabel',
+        version = '${version}',
+        packages = ['openbabel'],
+        package_data = {'openbabel' : ['_openbabel.so']}
+    )
+    EOF
+  '';
+
+  meta = with lib; {
+    description = "A toolbox designed to speak the many languages of chemical data";
+    homepage = "http://openbabel.org";
+    platforms = platforms.all;
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ danielbarter ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/openbsm/bsm-add-audit_token_to_pid.patch b/nixpkgs/pkgs/development/libraries/openbsm/bsm-add-audit_token_to_pid.patch
new file mode 100644
index 000000000000..77b9e1febddc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openbsm/bsm-add-audit_token_to_pid.patch
@@ -0,0 +1,24 @@
+Subject: Add audit_token_to_pid()
+
+Description: Apple provides audit_token_to_pid to get the pid of an
+audit token. Unfortunately, they have never released this to the
+OpenBSM project.
+
+diff -r -u -p1 a/bsm/libbsm.h b/bsm/libbsm.h
+--- a/bsm/libbsm.h	      2009-04-15 16:45:54.000000000 -0500
++++ b/bsm/libbsm.h	      2018-05-11 04:11:14.063083147 -0500
+@@ -1298,1 +1298,2 @@ int audit_set_stat(au_stat_t *stats, siz
+ int audit_send_trigger(int *trigger);
++pid_t audit_token_to_pid(audit_token_t atoken);
+
+diff -r -u -p1 a/libbsm/bsm_wrappers.c b/libbsm/bsm_wrappers.c
+--- a/libbsm/bsm_wrappers.c	       2009-04-15 16:46:06.000000000 -0500
++++ b/libbsm/bsm_wrappers.c	       2018-05-11 04:10:15.710820393 -0500
+@@ -823,1 +823,6 @@ audit_get_car(char *path, size_t sz)
+ }
++
++pid_t audit_token_to_pid(audit_token_t atoken)
++{
++	return atoken.val[5];
++}
+ 
\ No newline at end of file
diff --git a/nixpkgs/pkgs/development/libraries/openbsm/default.nix b/nixpkgs/pkgs/development/libraries/openbsm/default.nix
new file mode 100644
index 000000000000..627e9b830714
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openbsm/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchFromGitHub, lib }:
+
+stdenv.mkDerivation rec {
+  pname = "openbsm";
+  version = "1.1";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = lib.toUpper (builtins.replaceStrings ["." "-"] ["_" "_"] "${pname}-${version}");
+    sha256 = "0b98359hd8mm585sh145ss828pg2y8vgz38lqrb7nypapiyqdnd1";
+  };
+
+  patches = lib.optionals stdenv.isDarwin [ ./bsm-add-audit_token_to_pid.patch ];
+
+  preConfigure = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") ''
+    MACOSX_DEPLOYMENT_TARGET=10.16
+  '';
+
+  configureFlags = [ "ac_cv_file__usr_include_mach_audit_triggers_defs=no" ];
+
+  meta = {
+    description = "An implementation of Sun's Basic Security Module (BSM) security audit API and file format";
+    homepage = "http://www.openbsm.org/";
+    platforms = lib.platforms.unix;
+    maintainers = with lib.maintainers; [ matthewbauer ];
+    license = lib.licenses.bsd2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/opencascade-occt/default.nix b/nixpkgs/pkgs/development/libraries/opencascade-occt/default.nix
new file mode 100644
index 000000000000..2a8d49d9d134
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opencascade-occt/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl, fetchpatch, cmake, ninja, tcl, tk,
+  libGL, libGLU, libXext, libXmu, libXi, darwin }:
+
+stdenv.mkDerivation rec {
+  pname = "opencascade-occt";
+  version = "7.6.2";
+  commit = "V${builtins.replaceStrings ["."] ["_"] version}";
+
+  src = fetchurl {
+    name = "occt-${commit}.tar.gz";
+    url = "https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=${commit};sf=tgz";
+    sha256 = "sha256-n3KFrN/mN1SVXfuhEUAQ1fJzrCvhiclxfEIouyj9Z18=";
+  };
+
+  nativeBuildInputs = [ cmake ninja ];
+  buildInputs = [ tcl tk libGL libGLU libXext libXmu libXi ]
+    ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Cocoa;
+
+  meta = with lib; {
+    description = "Open CASCADE Technology, libraries for 3D modeling and numerical simulation";
+    homepage = "https://www.opencascade.org/";
+    license = licenses.lgpl21;  # essentially...
+    # The special exception defined in the file OCCT_LGPL_EXCEPTION.txt
+    # are basically about making the license a little less share-alike.
+    maintainers = with maintainers; [ amiloradovsky gebner ];
+    platforms = platforms.all;
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/opencl-clang/default.nix b/nixpkgs/pkgs/development/libraries/opencl-clang/default.nix
new file mode 100644
index 000000000000..70b80e3a84dd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opencl-clang/default.nix
@@ -0,0 +1,119 @@
+{ lib
+, stdenv
+, applyPatches
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, git
+, llvmPackages_14
+, spirv-llvm-translator
+, buildWithPatches ? true
+}:
+
+let
+  addPatches = component: pkg: pkg.overrideAttrs (oldAttrs: {
+    postPatch = oldAttrs.postPatch or "" + ''
+      for p in ${passthru.patchesOut}/${component}/*; do
+        patch -p1 -i "$p"
+      done
+    '';
+  });
+
+  llvmPkgs = llvmPackages_14;
+  inherit (llvmPkgs) llvm;
+  spirv-llvm-translator' = spirv-llvm-translator.override { inherit llvm; };
+  libclang = if buildWithPatches then passthru.libclang else llvmPkgs.libclang;
+
+  passthru = rec {
+    spirv-llvm-translator = spirv-llvm-translator';
+    llvm = addPatches "llvm" llvmPkgs.llvm;
+    libclang = addPatches "clang" llvmPkgs.libclang;
+
+    clang-unwrapped = libclang.out;
+    clang = llvmPkgs.clang.override {
+      cc = clang-unwrapped;
+    };
+
+    patchesOut = stdenv.mkDerivation {
+      pname = "opencl-clang-patches";
+      inherit version src;
+      # Clang patches assume the root is the llvm root dir
+      # but clang root in nixpkgs is the clang sub-directory
+      postPatch = ''
+        for filename in patches/clang/*.patch; do
+          substituteInPlace "$filename" \
+            --replace "a/clang/" "a/" \
+            --replace "b/clang/" "b/"
+        done
+      '';
+
+      installPhase = ''
+        [ -d patches ] && cp -r patches/ $out || mkdir $out
+        mkdir -p $out/clang $out/llvm
+      '';
+    };
+  };
+
+  version = "unstable-2023-06-12";
+  src = applyPatches {
+    src = fetchFromGitHub {
+      owner = "intel";
+      repo = "opencl-clang";
+      # https://github.com/intel/opencl-clang/compare/ocl-open-140
+      rev = "cf95b338d14685e4f3402ab1828bef31d48f1fd6";
+      hash = "sha256-To1RlQX9IJ+1zAwEXaW7ua3VNfjK9mu7pgsRPsfa8g8=";
+    };
+
+    patches = [
+      # Build script tries to find Clang OpenCL headers under ${llvm}
+      # Work around it by specifying that directory manually.
+      ./opencl-headers-dir.patch
+
+      # fix CMake throwing errors
+      (fetchpatch {
+        url = "https://github.com/intel/opencl-clang/commit/321e3b99c1a8d54c8475f5ae998452069cc5eb71.patch";
+        hash = "sha256-cATbH+AMVtcabhl3EkzAH7w3wGreUV53hQYHVUUEP4g=";
+      })
+    ];
+
+    postPatch = ''
+      # fix not be able to find clang from PATH
+      substituteInPlace cl_headers/CMakeLists.txt \
+        --replace " NO_DEFAULT_PATH" ""
+    '' + lib.optionalString stdenv.isDarwin ''
+      # Uses linker flags that are not supported on Darwin.
+      sed -i -e '/SET_LINUX_EXPORTS_FILE/d' CMakeLists.txt
+      substituteInPlace CMakeLists.txt \
+        --replace '-Wl,--no-undefined' ""
+    '';
+  };
+in
+
+stdenv.mkDerivation {
+  pname = "opencl-clang";
+  inherit version src;
+
+  nativeBuildInputs = [ cmake git llvm.dev ];
+
+  buildInputs = [ libclang llvm spirv-llvm-translator' ];
+
+  cmakeFlags = [
+    "-DPREFERRED_LLVM_VERSION=${lib.getVersion llvm}"
+    "-DOPENCL_HEADERS_DIR=${libclang.lib}/lib/clang/${lib.getVersion libclang}/include/"
+
+    "-DLLVMSPIRV_INCLUDED_IN_LLVM=OFF"
+    "-DSPIRV_TRANSLATOR_DIR=${spirv-llvm-translator'}"
+  ];
+
+  inherit passthru;
+
+  meta = with lib; {
+    homepage = "https://github.com/intel/opencl-clang/";
+    description = "A clang wrapper library with an OpenCL-oriented API and the ability to compile OpenCL C kernels to SPIR-V modules";
+    license = licenses.ncsa;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.all;
+    # error: invalid value 'CL3.0' in '-cl-std=CL3.0'
+    broken = stdenv.isDarwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/opencl-clang/opencl-headers-dir.patch b/nixpkgs/pkgs/development/libraries/opencl-clang/opencl-headers-dir.patch
new file mode 100644
index 000000000000..70343b8ee197
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opencl-clang/opencl-headers-dir.patch
@@ -0,0 +1,25 @@
+diff --git a/cl_headers/CMakeLists.txt b/cl_headers/CMakeLists.txt
+index 3dd2ea4..aeae6e9 100644
+--- a/cl_headers/CMakeLists.txt
++++ b/cl_headers/CMakeLists.txt
+@@ -11,12 +11,14 @@ add_custom_command(
+ )
+ endfunction(copy_file)
+ 
+-if(USE_PREBUILT_LLVM)
+-    set(OPENCL_HEADERS_DIR
+-      "${LLVM_LIBRARY_DIRS}/clang/${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}/include/")
+-else(USE_PREBUILT_LLVM)
+-    set(OPENCL_HEADERS_DIR "${CLANG_SOURCE_DIR}/lib/Headers")
+-endif(USE_PREBUILT_LLVM)
++if(NOT DEFINED OPENCL_HEADERS_DIR)
++  if(USE_PREBUILT_LLVM)
++      set(OPENCL_HEADERS_DIR
++        "${LLVM_LIBRARY_DIRS}/clang/${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}/include/")
++  else(USE_PREBUILT_LLVM)
++      set(OPENCL_HEADERS_DIR "${CLANG_SOURCE_DIR}/lib/Headers")
++  endif(USE_PREBUILT_LLVM)
++endif()
+ copy_file(${OPENCL_HEADERS_DIR}/opencl-c.h opencl-c.h)
+ 
+ add_custom_target (
diff --git a/nixpkgs/pkgs/development/libraries/opencl-clhpp/default.nix b/nixpkgs/pkgs/development/libraries/opencl-clhpp/default.nix
new file mode 100644
index 000000000000..8410aa4aa063
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opencl-clhpp/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchFromGitHub, cmake, python3, opencl-headers }:
+
+stdenv.mkDerivation rec {
+  pname = "opencl-clhpp";
+  version = "2.0.15";
+
+  src = fetchFromGitHub {
+    owner = "KhronosGroup";
+    repo = "OpenCL-CLHPP";
+    rev = "v${version}";
+    sha256 = "sha256-A12GdevbMaO2QkGAk3VsXzwcDkF+6dEapse2xfdqzPM=";
+  };
+
+  nativeBuildInputs = [ cmake python3 ];
+
+  propagatedBuildInputs = [ opencl-headers ];
+
+  strictDeps = true;
+
+  cmakeFlags = [
+    "-DBUILD_EXAMPLES=OFF"
+    "-DBUILD_TESTS=OFF"
+  ];
+
+  meta = with lib; {
+    description = "OpenCL Host API C++ bindings";
+    homepage = "http://github.khronos.org/OpenCL-CLHPP/";
+    license = licenses.mit;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/opencl-headers/default.nix b/nixpkgs/pkgs/development/libraries/opencl-headers/default.nix
new file mode 100644
index 000000000000..6a00c86105a8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opencl-headers/default.nix
@@ -0,0 +1,39 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, hashcat
+, ocl-icd
+, tesseract
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "opencl-headers";
+  version = "2023.12.14";
+
+  src = fetchFromGitHub {
+    owner = "KhronosGroup";
+    repo = "OpenCL-Headers";
+    rev = "v${finalAttrs.version}";
+    sha256 = "sha256-wF9KQjzYKJf6ulXRy80o53bp6lTtm8q1NubKbcH+RY0=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  passthru.tests = {
+    inherit ocl-icd tesseract hashcat;
+    pkg-config = testers.hasPkgConfigModules {
+      package = finalAttrs.finalPackage;
+      moduleNames = [ "OpenCL-Headers" ];
+    };
+  };
+
+  meta = with lib; {
+    description = "Khronos OpenCL headers version ${finalAttrs.version}";
+    homepage = "https://www.khronos.org/registry/cl/";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = [ ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/opencollada/default.nix b/nixpkgs/pkgs/development/libraries/opencollada/default.nix
new file mode 100644
index 000000000000..340b1299e832
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opencollada/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchFromGitHub, fetchurl, cmake, pkg-config, libxml2, pcre
+, darwin}:
+
+stdenv.mkDerivation rec {
+  pname = "opencollada";
+
+  version = "1.6.68";
+
+  src = fetchFromGitHub {
+    owner = "KhronosGroup";
+    repo = "OpenCOLLADA";
+    rev = "v${version}";
+    sha256 = "1ym16fxx9qhf952vva71sdzgbm7ifis0h1n5fj1bfdj8zvvkbw5w";
+  };
+
+  patches = [
+    # fix build with gcc 13
+    (fetchurl {
+      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/opencollada/files/opencollada-1.6.68-gcc13.patch?id=b76590f9fb8615da3da9d783ad841c0e3881a27b";
+      hash = "sha256-uimeLGHgXaFi61mmoaloJ5vo83c8EIQmtHEMngC2Nq4=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AGL ]);
+
+  propagatedBuildInputs = [ libxml2 pcre ];
+
+  postPatch = ''
+    patch -p1 < ${./pcre.patch}
+  '' + lib.optionalString stdenv.isDarwin ''
+    substituteInPlace GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp \
+      --replace math.h cmath
+  '';
+
+  meta = {
+    description = "A library for handling the COLLADA file format";
+    homepage = "https://github.com/KhronosGroup/OpenCOLLADA/";
+    maintainers = [ lib.maintainers.eelco ];
+    platforms = lib.platforms.unix;
+    license = lib.licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/opencollada/pcre.patch b/nixpkgs/pkgs/development/libraries/opencollada/pcre.patch
new file mode 100644
index 000000000000..39408f5a61e3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opencollada/pcre.patch
@@ -0,0 +1,14 @@
+diff --git a/COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h b/COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h
+index 22f2598b..269c50ca 100644
+--- a/COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h
++++ b/COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h
+@@ -13,8 +13,7 @@
+ 

+ #include "COLLADABUPrerequisites.h"

+ 

+-struct real_pcre;
+-typedef struct real_pcre pcre;
++#include "pcre.h"
+ 

+ 

+ namespace COLLADABU

diff --git a/nixpkgs/pkgs/development/libraries/opencolorio/1.x.nix b/nixpkgs/pkgs/development/libraries/opencolorio/1.x.nix
new file mode 100644
index 000000000000..0355b9977448
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opencolorio/1.x.nix
@@ -0,0 +1,51 @@
+{ stdenv, lib, fetchFromGitHub, cmake, boost, pkg-config, lcms2, tinyxml, git }:
+
+stdenv.mkDerivation rec {
+  pname = "opencolorio";
+  version = "1.1.1";
+
+  src = fetchFromGitHub {
+    owner = "imageworks";
+    repo = "OpenColorIO";
+    rev = "v${version}";
+    sha256 = "12srvxca51czpfjl0gabpidj9n84mw78ivxy5w75qhq2mmc798sb";
+  };
+
+  outputs = [ "bin" "out" "dev" ];
+
+  # TODO: Investigate whether git can be dropped: It's only used to apply patches
+  nativeBuildInputs = [ cmake pkg-config git ];
+
+  buildInputs = [ lcms2 tinyxml ] ++ lib.optional stdenv.isDarwin boost;
+
+  postPatch = ''
+    substituteInPlace src/core/CMakeLists.txt --replace "-Werror" ""
+    substituteInPlace src/pyglue/CMakeLists.txt --replace "-Werror" ""
+  '';
+
+  cmakeFlags = [
+    "-DUSE_EXTERNAL_LCMS=ON"
+    "-DUSE_EXTERNAL_TINYXML=ON"
+    # External yaml-cpp 0.6.* not compatible: https://github.com/imageworks/OpenColorIO/issues/517
+    "-DUSE_EXTERNAL_YAML=OFF"
+  ] ++ lib.optional stdenv.isDarwin "-DOCIO_USE_BOOST_PTR=ON"
+    ++ lib.optional (!stdenv.hostPlatform.isx86) "-DOCIO_USE_SSE=OFF"
+    ++ lib.optional (stdenv.isDarwin && stdenv.isAarch64) "-DCMAKE_OSX_ARCHITECTURES=arm64";
+
+  postInstall = ''
+    moveToOutput bin "$bin"
+    moveToOutput cmake "$dev"
+    mv $out/OpenColorIOConfig.cmake $dev/cmake/
+
+    substituteInPlace "$dev/cmake/OpenColorIO-release.cmake" \
+      --replace "$out/bin" "$bin/bin"
+  '';
+
+  meta = with lib; {
+    homepage = "https://opencolorio.org";
+    description = "A color management framework for visual effects and animation";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/opencolorio/broken-cmake-zlib-version.patch b/nixpkgs/pkgs/development/libraries/opencolorio/broken-cmake-zlib-version.patch
new file mode 100644
index 000000000000..e60ebc9e1efe
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opencolorio/broken-cmake-zlib-version.patch
@@ -0,0 +1,17 @@
+diff --git a/src/cmake/Config.cmake.in b/src/cmake/Config.cmake.in
+index c122b013..04f36bf0 100644
+--- a/src/cmake/Config.cmake.in
++++ b/src/cmake/Config.cmake.in
+@@ -43,11 +43,7 @@ if (NOT @BUILD_SHARED_LIBS@) # NOT @BUILD_SHARED_LIBS@
+         # ZLIB_VERSION_STRING is still available for backward compatibility.
+         # See https://cmake.org/cmake/help/git-stage/module/FindZLIB.html
+ 
+-        if (@ZLIB_VERSION@) # @ZLIB_VERSION@
+-            find_dependency(ZLIB @ZLIB_VERSION@)
+-        else()
+-            find_dependency(ZLIB @ZLIB_VERSION_STRING@)
+-        endif()
++        find_dependency(ZLIB)
+     endif()
+ 
+     if (NOT TARGET MINIZIP::minizip-ng)
diff --git a/nixpkgs/pkgs/development/libraries/opencolorio/default.nix b/nixpkgs/pkgs/development/libraries/opencolorio/default.nix
new file mode 100644
index 000000000000..21f50a6fe8a3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opencolorio/default.nix
@@ -0,0 +1,94 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, expat
+, yaml-cpp
+, pystring
+, imath
+, minizip-ng
+# Only required on Linux
+, glew
+, freeglut
+# Only required on Darwin
+, Carbon
+, GLUT
+, Cocoa
+# Python bindings
+, pythonBindings ? true # Python bindings
+, python3Packages
+# Build apps
+, buildApps ? true # Utility applications
+, lcms2
+, openexr_3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "opencolorio";
+  version = "2.3.0";
+
+  src = fetchFromGitHub {
+    owner = "AcademySoftwareFoundation";
+    repo = "OpenColorIO";
+    rev = "v${version}";
+    sha256 = "sha256-E4TmMEFzI3nKqiDFaAkNx44uo84sacvZqjbfWe3A8fE=";
+  };
+
+  patches = [
+    (fetchpatch {
+      # Taken from https://github.com/AcademySoftwareFoundation/OpenColorIO/pull/1891.
+      name = "opencolorio-yaml-cpp-8.0-compat.patch";
+      url = "https://github.com/AcademySoftwareFoundation/OpenColorIO/commit/e99b4afcf0408d8ec56fdf2b9380327c9284db00.patch";
+      sha256 = "sha256-7eIvVWKcpE0lmuYdNqFQFHkW/sSSzQ//LNIMOC28KZg=";
+    })
+    # Workaround for https://gitlab.kitware.com/cmake/cmake/-/issues/25200.
+    # Needed for zlib >= 1.3 && cmake < 3.27.4.
+    ./broken-cmake-zlib-version.patch
+  ];
+
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    # these tests don't like being run headless on darwin. no builtin
+    # way of skipping tests so this is what we're reduced to.
+    substituteInPlace tests/cpu/Config_tests.cpp \
+      --replace 'OCIO_ADD_TEST(Config, virtual_display)' 'static void _skip_virtual_display()' \
+      --replace 'OCIO_ADD_TEST(Config, virtual_display_with_active_displays)' 'static void _skip_virtual_display_with_active_displays()'
+  '';
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [
+    expat
+    yaml-cpp
+    pystring
+    imath
+    minizip-ng
+  ] ++ lib.optionals stdenv.hostPlatform.isLinux [ glew freeglut ]
+    ++ lib.optionals stdenv.hostPlatform.isDarwin [ Carbon GLUT Cocoa ]
+    ++ lib.optionals pythonBindings [ python3Packages.python python3Packages.pybind11 ]
+    ++ lib.optionals buildApps [
+      lcms2
+      openexr_3
+    ];
+
+  cmakeFlags = [
+    "-DOCIO_INSTALL_EXT_PACKAGES=NONE"
+    "-DOCIO_USE_SSE2NEON=OFF"
+    # GPU test fails with: freeglut (GPU tests): failed to open display ''
+    "-DOCIO_BUILD_GPU_TESTS=OFF"
+    "-Dminizip-ng_INCLUDE_DIR=${minizip-ng}/include/minizip-ng"
+  ] ++ lib.optional (!pythonBindings) "-DOCIO_BUILD_PYTHON=OFF"
+    ++ lib.optional (!buildApps) "-DOCIO_BUILD_APPS=OFF";
+
+  # precision issues on non-x86
+  doCheck = stdenv.isx86_64;
+  # Tends to fail otherwise.
+  enableParallelChecking = false;
+
+  meta = with lib; {
+    homepage = "https://opencolorio.org";
+    description = "A color management framework for visual effects and animation";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.rytone ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/opencomposite/default.nix b/nixpkgs/pkgs/development/libraries/opencomposite/default.nix
new file mode 100644
index 000000000000..935e59a53a41
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opencomposite/default.nix
@@ -0,0 +1,65 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+
+, cmake
+
+, glm
+, libGL
+, openxr-loader
+, python3
+, vulkan-headers
+, vulkan-loader
+, xorg
+
+, nix-update-script
+}:
+
+stdenv.mkDerivation {
+  pname = "opencomposite";
+  version = "unstable-2024-02-05";
+
+  src = fetchFromGitLab {
+    owner = "znixian";
+    repo = "OpenOVR";
+    rev = "c1649b0e4f3c4f51c12904c0b818263006d56f00";
+    hash = "sha256-K8Vtd60cKmhEKMBrlNZxoC73m1BY0014ejJM2mWkwsA=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = [
+    glm
+    libGL
+    openxr-loader
+    python3
+    vulkan-headers
+    vulkan-loader
+    xorg.libX11
+  ];
+
+  cmakeFlags = [
+    "-DUSE_SYSTEM_OPENXR=ON"
+    "-DUSE_SYSTEM_GLM=ON"
+  ];
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/lib/opencomposite
+    cp -r bin/ $out/lib/opencomposite
+    runHook postInstall
+  '';
+
+  passthru.updateScript = nix-update-script {
+    extraArgs = [ "--version=branch=openxr" ];
+  };
+
+  meta = with lib; {
+    description = "Reimplementation of OpenVR, translating calls to OpenXR";
+    homepage = "https://gitlab.com/znixian/OpenOVR";
+    license = with licenses; [ gpl3Only ];
+    maintainers = with maintainers; [ Scrumplex ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/opencomposite/helper.nix b/nixpkgs/pkgs/development/libraries/opencomposite/helper.nix
new file mode 100644
index 000000000000..f19f5e868139
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opencomposite/helper.nix
@@ -0,0 +1,18 @@
+{ writeShellApplication
+
+, monado
+, opencomposite
+}:
+writeShellApplication {
+  name = "opencomposite-helper";
+  text = ''
+    # Tell Proton to use OpenComposite instead of OpenVR
+    export VR_OVERRIDE=${opencomposite}/lib/opencomposite
+    # Help OpenComposite find the OpenXR runtime
+    export XR_RUNTIME_JSON=${monado}/share/openxr/1/openxr_monado.json
+    # Tell Steam Pressure Vessel to allow access to Monado
+    export PRESSURE_VESSEL_FILESYSTEMS_RW=$XDG_RUNTIME_DIR/monado_comp_ipc
+    exec "$@"
+  '';
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/opencore-amr/default.nix b/nixpkgs/pkgs/development/libraries/opencore-amr/default.nix
new file mode 100644
index 000000000000..38a50b75027b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opencore-amr/default.nix
@@ -0,0 +1,18 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "opencore-amr";
+  version = "0.1.6";
+  src = fetchurl {
+    url = "mirror://sourceforge/opencore-amr/opencore-amr/opencore-amr-${version}.tar.gz";
+    hash = "sha256-SD60BhCI4rNLNY5HVAtdSVqWzUaONhBQ+uYVsYCdxKE=";
+  };
+
+  meta = {
+    homepage = "https://opencore-amr.sourceforge.io/";
+    description = "Library of OpenCORE Framework implementation of Adaptive Multi Rate Narrowband and Wideband (AMR-NB and AMR-WB) speech codec.
+    Library of VisualOn implementation of Adaptive Multi Rate Wideband (AMR-WB)";
+    license = lib.licenses.asl20;
+    maintainers = [ lib.maintainers.kiloreux ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/opencsg/default.nix b/nixpkgs/pkgs/development/libraries/opencsg/default.nix
new file mode 100644
index 000000000000..7625db9a5953
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opencsg/default.nix
@@ -0,0 +1,54 @@
+{lib, stdenv, fetchurl, libGLU, libGL, freeglut, glew, libXmu, libXext, libX11
+, qmake, GLUT, fixDarwinDylibNames }:
+
+stdenv.mkDerivation rec {
+  version = "1.4.2";
+  pname = "opencsg";
+  src = fetchurl {
+    url = "http://www.opencsg.org/OpenCSG-${version}.tar.gz";
+    sha256 = "1ysazynm759gnw1rdhn9xw9nixnzrlzrc462340a6iif79fyqlnr";
+  };
+
+  nativeBuildInputs = [ qmake ]
+    ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+  buildInputs = [ glew ]
+    ++ lib.optionals stdenv.isLinux [ libGLU libGL freeglut libXmu libXext libX11 ]
+    ++ lib.optional stdenv.isDarwin GLUT;
+
+  doCheck = false;
+
+  patches = [ ./fix-pro-files.patch ];
+
+  preConfigure = ''
+    rm example/Makefile src/Makefile
+    qmakeFlags=("''${qmakeFlags[@]}" "INSTALLDIR=$out")
+  '';
+
+  postInstall = ''
+    install -D license.txt "$out/share/doc/opencsg/license.txt"
+  '' + lib.optionalString stdenv.isDarwin ''
+    mkdir -p $out/Applications
+    mv $out/bin/*.app $out/Applications
+    rmdir $out/bin || true
+  '';
+
+  dontWrapQtApps = true;
+
+  postFixup = lib.optionalString stdenv.isDarwin ''
+    app=$out/Applications/opencsgexample.app/Contents/MacOS/opencsgexample
+    install_name_tool -change \
+      $(otool -L $app | awk '/opencsg.+dylib/ { print $1 }') \
+      $(otool -D $out/lib/libopencsg.dylib | tail -n 1) \
+      $app
+  '';
+
+  meta = with lib; {
+    description = "Constructive Solid Geometry library";
+    homepage = "http://www.opencsg.org/";
+    platforms = platforms.unix;
+    maintainers = [ maintainers.raskin ];
+    license = licenses.gpl2;
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/opencsg/fix-pro-files.patch b/nixpkgs/pkgs/development/libraries/opencsg/fix-pro-files.patch
new file mode 100644
index 000000000000..462b44c8f40c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opencsg/fix-pro-files.patch
@@ -0,0 +1,21 @@
+diff -ur OpenCSG-1.4.2-pristine/example/example.pro OpenCSG-1.4.2/example/example.pro
+--- OpenCSG-1.4.2-pristine/example/example.pro	2016-09-27 06:11:16.000000000 +0900
++++ OpenCSG-1.4.2/example/example.pro	2019-05-07 10:45:18.785251737 +0900
+@@ -6,7 +6,9 @@
+ INCLUDEPATH += ../include
+ LIBS += -L../lib -lopencsg -lGLEW
+ 
+-INSTALLDIR = /usr/local
++isEmpty(INSTALLDIR) {
++  INSTALLDIR = /usr/local
++}
+ INSTALLS += target
+ target.path = $$INSTALLDIR/bin
+ 
+diff -ur OpenCSG-1.4.2-pristine/opencsg.pro OpenCSG-1.4.2/opencsg.pro
+--- OpenCSG-1.4.2-pristine/opencsg.pro	2016-09-27 06:11:16.000000000 +0900
++++ OpenCSG-1.4.2/opencsg.pro	2019-05-07 10:44:50.578698165 +0900
+@@ -1,2 +1,3 @@
+ TEMPLATE = subdirs
+ SUBDIRS  = src example
++CONFIG   += ordered
diff --git a/nixpkgs/pkgs/development/libraries/openct/default.nix b/nixpkgs/pkgs/development/libraries/openct/default.nix
new file mode 100644
index 000000000000..e4b6110e1c15
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openct/default.nix
@@ -0,0 +1,42 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, pcsclite, libusb-compat-0_1
+, doxygen, libxslt
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openct";
+  version = "0.6.20";
+
+  src = fetchFromGitHub {
+    owner = "OpenSC";
+    repo = "openct";
+    rev = "${pname}-${version}";
+    sha256 = "09wxq0jxdxhci3zr7jd3zcxjkl3j0r1v00k3q8gqrg9gighh8nk2";
+  };
+
+  postPatch = ''
+    sed -i 's,$(DESTDIR),$(out),g' etc/Makefile.am
+  '';
+
+  configureFlags = [
+    "--enable-api-doc"
+    "--enable-usb"
+    "--enable-pcsc"
+    "--localstatedir=/var"
+    "--sysconfdir=/etc"
+  ];
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ pcsclite libusb-compat-0_1 doxygen libxslt ];
+
+  preInstall = ''
+    mkdir -p $out/etc
+  '';
+
+  meta = with lib; {
+    broken = stdenv.isDarwin;
+    homepage = "https://github.com/OpenSC/openct/";
+    license = licenses.lgpl21;
+    description = "Drivers for several smart card readers";
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/opencv/3.x.nix b/nixpkgs/pkgs/development/libraries/opencv/3.x.nix
new file mode 100644
index 000000000000..377ebb3acdb5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opencv/3.x.nix
@@ -0,0 +1,303 @@
+{ lib, stdenv
+, fetchFromGitHub
+, fetchpatch
+, callPackage
+, cmake, pkg-config, unzip, zlib, pcre, hdf5
+, glog, boost, gflags, protobuf_21
+, config
+
+, enableJPEG      ? true, libjpeg
+, enablePNG       ? true, libpng
+, enableTIFF      ? true, libtiff
+, enableWebP      ? true, libwebp
+, enableEXR ?     !stdenv.isDarwin, openexr_3
+, enableEigen     ? true, eigen
+, enableOpenblas  ? true, openblas, blas, lapack
+, enableContrib   ? true
+
+, enableCuda      ? config.cudaSupport
+, cudaPackages ? { }
+, enableUnfree    ? false
+, enableIpp       ? false
+, enablePython    ? false, pythonPackages ? null
+, enableGtk2      ? false, gtk2
+, enableGtk3      ? false, gtk3
+, enableFfmpeg    ? false, ffmpeg
+, enableGStreamer ? false, gst_all_1
+, enableTesseract ? false, tesseract, leptonica
+, enableTbb       ? false, tbb
+, enableOvis      ? false, ogre
+, enableGPhoto2   ? false, libgphoto2
+, enableDC1394    ? false, libdc1394
+, enableDocs      ? false, doxygen, graphviz-nox
+
+, AVFoundation, Cocoa, VideoDecodeAcceleration, bzip2, CoreMedia, MediaToolbox, Accelerate
+}:
+
+assert blas.implementation == "openblas" && lapack.implementation == "openblas";
+
+assert enablePython -> pythonPackages != null;
+
+let
+  inherit (cudaPackages) cudatoolkit;
+  inherit (cudaPackages.cudaFlags) cudaCapabilities;
+
+  version = "3.4.18";
+
+  src = fetchFromGitHub {
+    owner  = "opencv";
+    repo   = "opencv";
+    rev    = version;
+    hash   = "sha256-PgwAZNoPknFT0jCLt3TCzend6OYFY3iUIzDf/FptAYA=";
+  };
+
+  contribSrc = fetchFromGitHub {
+    owner  = "opencv";
+    repo   = "opencv_contrib";
+    rev    = version;
+    hash   = "sha256-TEF/GHglOmsshlC6q4iw14ZMpvA0SaKwlidomAN+sRc=";
+  };
+
+  # Contrib must be built in order to enable Tesseract support:
+  buildContrib = enableContrib || enableTesseract;
+
+  useSystemProtobuf = ! stdenv.isDarwin;
+
+  # See opencv/3rdparty/ippicv/ippicv.cmake
+  ippicv = {
+    src = fetchFromGitHub {
+      owner  = "opencv";
+      repo   = "opencv_3rdparty";
+      rev    = "32e315a5b106a7b89dbed51c28f8120a48b368b4";
+      sha256 = "19w9f0r16072s59diqxsr5q6nmwyz9gnxjs49nglzhd66p3ddbkp";
+    } + "/ippicv";
+    files = let name = platform : "ippicv_2019_${platform}_general_20180723.tgz"; in
+      if stdenv.hostPlatform.system == "x86_64-linux" then
+      { ${name "lnx_intel64"} = "c0bd78adb4156bbf552c1dfe90599607"; }
+      else if stdenv.hostPlatform.system == "i686-linux" then
+      { ${name "lnx_ia32"}    = "4f38432c30bfd6423164b7a24bbc98a0"; }
+      else if stdenv.hostPlatform.system == "x86_64-darwin" then
+      { ${name "mac_intel64"} = "fe6b2bb75ae0e3f19ad3ae1a31dfa4a2"; }
+      else
+      throw "ICV is not available for this platform (or not yet supported by this package)";
+    dst = ".cache/ippicv";
+  };
+
+  # See opencv_contrib/modules/xfeatures2d/cmake/download_vgg.cmake
+  vgg = {
+    src = fetchFromGitHub {
+      owner  = "opencv";
+      repo   = "opencv_3rdparty";
+      rev    = "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d";
+      sha256 = "0r9fam8dplyqqsd3qgpnnfgf9l7lj44di19rxwbm8mxiw0rlcdvy";
+    };
+    files = {
+      "vgg_generated_48.i"  = "e8d0dcd54d1bcfdc29203d011a797179";
+      "vgg_generated_64.i"  = "7126a5d9a8884ebca5aea5d63d677225";
+      "vgg_generated_80.i"  = "7cd47228edec52b6d82f46511af325c5";
+      "vgg_generated_120.i" = "151805e03568c9f490a5e3a872777b75";
+    };
+    dst = ".cache/xfeatures2d/vgg";
+  };
+
+  # See opencv_contrib/modules/xfeatures2d/cmake/download_boostdesc.cmake
+  boostdesc = {
+    src = fetchFromGitHub {
+      owner  = "opencv";
+      repo   = "opencv_3rdparty";
+      rev    = "34e4206aef44d50e6bbcd0ab06354b52e7466d26";
+      sha256 = "13yig1xhvgghvxspxmdidss5lqiikpjr0ddm83jsi0k85j92sn62";
+    };
+    files = {
+      "boostdesc_bgm.i"          = "0ea90e7a8f3f7876d450e4149c97c74f";
+      "boostdesc_bgm_bi.i"       = "232c966b13651bd0e46a1497b0852191";
+      "boostdesc_bgm_hd.i"       = "324426a24fa56ad9c5b8e3e0b3e5303e";
+      "boostdesc_binboost_064.i" = "202e1b3e9fec871b04da31f7f016679f";
+      "boostdesc_binboost_128.i" = "98ea99d399965c03d555cef3ea502a0b";
+      "boostdesc_binboost_256.i" = "e6dcfa9f647779eb1ce446a8d759b6ea";
+      "boostdesc_lbgm.i"         = "0ae0675534aa318d9668f2a179c2a052";
+    };
+    dst = ".cache/xfeatures2d/boostdesc";
+  };
+
+  # See opencv_contrib/modules/face/CMakeLists.txt
+  face = {
+    src = fetchFromGitHub {
+      owner  = "opencv";
+      repo   = "opencv_3rdparty";
+      rev    = "8afa57abc8229d611c4937165d20e2a2d9fc5a12";
+      sha256 = "061lsvqdidq9xa2hwrcvwi9ixflr2c2lfpc8drr159g68zi8bp4v";
+    };
+    files = {
+      "face_landmark_model.dat" = "7505c44ca4eb54b4ab1e4777cb96ac05";
+    };
+    dst = ".cache/data";
+  };
+
+  # See opencv/cmake/OpenCVDownload.cmake
+  installExtraFiles = extra : with lib; ''
+    mkdir -p "${extra.dst}"
+  '' + concatStrings (mapAttrsToList (name : md5 : ''
+    ln -s "${extra.src}/${name}" "${extra.dst}/${md5}-${name}"
+  '') extra.files);
+
+  opencvFlag = name: enabled: "-DWITH_${name}=${printEnabled enabled}";
+
+  printEnabled = enabled : if enabled then "ON" else "OFF";
+in
+
+stdenv.mkDerivation {
+  pname = "opencv";
+  inherit version src;
+
+  postUnpack = lib.optionalString buildContrib ''
+    cp --no-preserve=mode -r "${contribSrc}/modules" "$NIX_BUILD_TOP/opencv_contrib"
+  '';
+
+  # Ensures that we use the system OpenEXR rather than the vendored copy of the source included with OpenCV.
+  patches = [
+    ./cmake-don-t-use-OpenCVFindOpenEXR.patch
+  ];
+
+  # This prevents cmake from using libraries in impure paths (which
+  # causes build failure on non NixOS)
+  # Also, work around https://github.com/NixOS/nixpkgs/issues/26304 with
+  # what appears to be some stray headers in dnn/misc/tensorflow
+  # in contrib when generating the Python bindings:
+  postPatch = ''
+    sed -i '/Add these standard paths to the search paths for FIND_LIBRARY/,/^\s*$/{d}' CMakeLists.txt
+    sed -i -e 's|if len(decls) == 0:|if len(decls) == 0 or "opencv2/" not in hdr:|' ./modules/python/src2/gen2.py
+  '';
+
+  preConfigure =
+    lib.optionalString enableIpp (installExtraFiles ippicv) + (
+    lib.optionalString buildContrib ''
+      cmakeFlagsArray+=("-DOPENCV_EXTRA_MODULES_PATH=$NIX_BUILD_TOP/opencv_contrib")
+
+      ${installExtraFiles vgg}
+      ${installExtraFiles boostdesc}
+      ${installExtraFiles face}
+    '');
+
+  postConfigure = ''
+    [ -e modules/core/version_string.inc ]
+    echo '"(build info elided)"' > modules/core/version_string.inc
+  '';
+
+  buildInputs =
+       [ zlib pcre hdf5 glog boost gflags ]
+    ++ lib.optional useSystemProtobuf protobuf_21
+    ++ lib.optional enablePython pythonPackages.python
+    ++ lib.optional enableGtk2 gtk2
+    ++ lib.optional enableGtk3 gtk3
+    ++ lib.optional enableJPEG libjpeg
+    ++ lib.optional enablePNG libpng
+    ++ lib.optional enableTIFF libtiff
+    ++ lib.optional enableWebP libwebp
+    ++ lib.optionals enableEXR [ openexr_3 ]
+    ++ lib.optional enableFfmpeg ffmpeg
+    ++ lib.optionals (enableFfmpeg && stdenv.isDarwin)
+                     [ VideoDecodeAcceleration bzip2 ]
+    ++ lib.optionals enableGStreamer (with gst_all_1; [ gstreamer gst-plugins-base ])
+    ++ lib.optional enableOvis ogre
+    ++ lib.optional enableGPhoto2 libgphoto2
+    ++ lib.optional enableDC1394 libdc1394
+    ++ lib.optional enableEigen eigen
+    ++ lib.optional enableOpenblas openblas
+    # There is seemingly no compile-time flag for Tesseract.  It's
+    # simply enabled automatically if contrib is built, and it detects
+    # tesseract & leptonica.
+    ++ lib.optionals enableTesseract [ tesseract leptonica ]
+    ++ lib.optional enableTbb tbb
+    ++ lib.optionals stdenv.isDarwin [
+      bzip2 AVFoundation Cocoa VideoDecodeAcceleration CoreMedia MediaToolbox Accelerate
+    ]
+    ++ lib.optionals enableDocs [ doxygen graphviz-nox ];
+
+  propagatedBuildInputs = lib.optional enablePython pythonPackages.numpy
+    ++ lib.optional enableCuda cudatoolkit;
+
+  nativeBuildInputs = [ cmake pkg-config unzip ];
+
+  # Configure can't find the library without this.
+  OpenBLAS_HOME = lib.optionalString enableOpenblas openblas;
+
+  cmakeFlags = [
+    "-DWITH_OPENMP=ON"
+    "-DBUILD_PROTOBUF=${printEnabled (!useSystemProtobuf)}"
+    "-DPROTOBUF_UPDATE_FILES=${printEnabled useSystemProtobuf}"
+    "-DOPENCV_ENABLE_NONFREE=${printEnabled enableUnfree}"
+    "-DBUILD_TESTS=OFF"
+    "-DBUILD_PERF_TESTS=OFF"
+    "-DBUILD_DOCS=${printEnabled enableDocs}"
+    (opencvFlag "IPP" enableIpp)
+    (opencvFlag "TIFF" enableTIFF)
+    (opencvFlag "WEBP" enableWebP)
+    (opencvFlag "JPEG" enableJPEG)
+    (opencvFlag "PNG" enablePNG)
+    (opencvFlag "OPENEXR" enableEXR)
+    (opencvFlag "CUDA" enableCuda)
+    (opencvFlag "CUBLAS" enableCuda)
+    (opencvFlag "TBB" enableTbb)
+  ] ++ lib.optionals enableCuda [
+    "-DCUDA_FAST_MATH=ON"
+    "-DCUDA_HOST_COMPILER=${cudatoolkit.cc}/bin/cc"
+    "-DCUDA_NVCC_FLAGS=--expt-relaxed-constexpr"
+    "-DCUDA_ARCH_BIN=${lib.concatStringsSep ";" cudaCapabilities}"
+    "-DCUDA_ARCH_PTX=${lib.last cudaCapabilities}"
+  ] ++ lib.optionals stdenv.isDarwin [
+    "-DWITH_OPENCL=OFF"
+    "-DWITH_LAPACK=OFF"
+
+    # Disable unnecessary vendoring that's enabled by default only for Darwin.
+    # Note that the opencvFlag feature flags listed above still take
+    # precedence, so we can safely list everything here.
+    "-DBUILD_ZLIB=OFF"
+    "-DBUILD_TIFF=OFF"
+    "-DBUILD_JASPER=OFF"
+    "-DBUILD_JPEG=OFF"
+    "-DBUILD_PNG=OFF"
+    "-DBUILD_WEBP=OFF"
+  ] ++ lib.optionals enablePython [
+    "-DOPENCV_SKIP_PYTHON_LOADER=ON"
+  ] ++ lib.optionals enableEigen [
+    # Autodetection broken by https://github.com/opencv/opencv/pull/13337
+    "-DEIGEN_INCLUDE_PATH=${eigen}/include/eigen3"
+  ];
+
+  postBuild = lib.optionalString enableDocs ''
+    make doxygen
+  '';
+
+  # By default $out/lib/pkgconfig/opencv.pc looks something like this:
+  #
+  #   prefix=/nix/store/10pzq1a8fkh8q4sysj8n6mv0w0nl0miq-opencv-3.4.1
+  #   exec_prefix=${prefix}
+  #   libdir=${exec_prefix}//nix/store/10pzq1a8fkh8q4sysj8n6mv0w0nl0miq-opencv-3.4.1/lib
+  #   ...
+  #   Libs: -L${exec_prefix}//nix/store/10pzq1a8fkh8q4sysj8n6mv0w0nl0miq-opencv-3.4.1/lib ...
+  #
+  # Note that ${exec_prefix} is set to $out but that $out is also appended to
+  # ${exec_prefix}. This causes linker errors in downstream packages so we strip
+  # of $out after the ${exec_prefix} prefix:
+  postInstall = ''
+    sed -i "s|{exec_prefix}/$out|{exec_prefix}|" \
+      "$out/lib/pkgconfig/opencv.pc"
+  '';
+
+  hardeningDisable = [ "bindnow" "relro" ];
+
+  passthru = lib.optionalAttrs enablePython { pythonPath = []; } // {
+    tests = lib.optionalAttrs enableCuda {
+      no-libstdcxx-errors = callPackage ./libstdcxx-test.nix { attrName = "opencv3"; };
+    };
+  };
+
+  meta = with lib; {
+    description = "Open Computer Vision Library with more than 500 algorithms";
+    homepage = "https://opencv.org/";
+    license = with licenses; if enableUnfree then unfree else bsd3;
+    maintainers = with maintainers; [mdaiter basvandijk];
+    platforms = with platforms; linux ++ darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/opencv/4.x.nix b/nixpkgs/pkgs/development/libraries/opencv/4.x.nix
new file mode 100644
index 000000000000..7bb2649ff894
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opencv/4.x.nix
@@ -0,0 +1,525 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, pkg-config
+, unzip
+, zlib
+, pcre
+, hdf5
+, boost
+, gflags
+, protobuf_21
+, config
+, ocl-icd
+, buildPackages
+, qimgv
+, opencv4
+
+, enableJPEG ? true
+, libjpeg
+, enablePNG ? true
+, libpng
+, enableTIFF ? true
+, libtiff
+, enableWebP ? true
+, libwebp
+, enableEXR ? !stdenv.isDarwin
+, openexr
+, ilmbase
+, enableJPEG2000 ? true
+, openjpeg
+, enableEigen ? true
+, eigen
+, enableBlas ? true
+, blas
+, enableContrib ? true
+
+, enableCuda ? config.cudaSupport
+, enableCublas ? enableCuda
+, enableCudnn ? false # NOTE: CUDNN has a large impact on closure size so we disable it by default
+, enableCufft ? enableCuda
+, cudaPackages ? {}
+, nvidia-optical-flow-sdk
+
+, enableLto ? true
+, enableUnfree ? false
+, enableIpp ? false
+, enablePython ? false
+, pythonPackages
+, enableGtk2 ? false
+, gtk2
+, enableGtk3 ? false
+, gtk3
+, enableVtk ? false
+, vtk
+, enableFfmpeg ? true
+, ffmpeg
+, enableGStreamer ? true
+, gst_all_1
+, enableTesseract ? false
+, tesseract
+, leptonica
+, enableTbb ? false
+, tbb
+, enableOvis ? false
+, ogre
+, enableGPhoto2 ? false
+, libgphoto2
+, enableDC1394 ? false
+, libdc1394
+, enableDocs ? false
+, doxygen
+, graphviz-nox
+
+, AVFoundation
+, Cocoa
+, VideoDecodeAcceleration
+, CoreMedia
+, MediaToolbox
+, Accelerate
+, bzip2
+, callPackage
+}@inputs:
+
+let
+  version = "4.7.0";
+
+  # It's necessary to consistently use backendStdenv when building with CUDA
+  # support, otherwise we get libstdc++ errors downstream
+  stdenv = throw "Use effectiveStdenv instead";
+  effectiveStdenv = if enableCuda then cudaPackages.backendStdenv else inputs.stdenv;
+
+  src = fetchFromGitHub {
+    owner = "opencv";
+    repo = "opencv";
+    rev = version;
+    sha256 = "sha256-jUeGsu8+jzzCnIFbVMCW8DcUeGv/t1yCY/WXyW+uGDI=";
+  };
+
+  contribSrc = fetchFromGitHub {
+    owner = "opencv";
+    repo = "opencv_contrib";
+    rev = version;
+    sha256 = "sha256-meya0J3RdOIeMM46e/6IOVwrKn3t/c0rhwP2WQaybkE=";
+  };
+
+  testDataSrc = fetchFromGitHub {
+    owner = "opencv";
+    repo = "opencv_extra";
+    rev = version;
+    sha256 = "sha256-6hAdJdaUgtRGQanQKuY/q6fcXWXFZ3K/oLbGxvksry0=";
+  };
+
+  # Contrib must be built in order to enable Tesseract support:
+  buildContrib = enableContrib || enableTesseract || enableOvis;
+
+  # See opencv/3rdparty/ippicv/ippicv.cmake
+  ippicv = {
+    src = fetchFromGitHub {
+      owner = "opencv";
+      repo = "opencv_3rdparty";
+      rev = "a56b6ac6f030c312b2dce17430eef13aed9af274";
+      sha256 = "1msbkc3zixx61rcg6a04i1bcfhw1phgsrh93glq1n80hgsk3nbjq";
+    } + "/ippicv";
+    files = let name = platform: "ippicv_2019_${platform}_general_20180723.tgz"; in
+      if effectiveStdenv.hostPlatform.system == "x86_64-linux" then
+        { ${name "lnx_intel64"} = "c0bd78adb4156bbf552c1dfe90599607"; }
+      else if effectiveStdenv.hostPlatform.system == "i686-linux" then
+        { ${name "lnx_ia32"} = "4f38432c30bfd6423164b7a24bbc98a0"; }
+      else if effectiveStdenv.hostPlatform.system == "x86_64-darwin" then
+        { ${name "mac_intel64"} = "fe6b2bb75ae0e3f19ad3ae1a31dfa4a2"; }
+      else
+        throw "ICV is not available for this platform (or not yet supported by this package)";
+    dst = ".cache/ippicv";
+  };
+
+  # See opencv_contrib/modules/xfeatures2d/cmake/download_vgg.cmake
+  vgg = {
+    src = fetchFromGitHub {
+      owner = "opencv";
+      repo = "opencv_3rdparty";
+      rev = "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d";
+      sha256 = "0r9fam8dplyqqsd3qgpnnfgf9l7lj44di19rxwbm8mxiw0rlcdvy";
+    };
+    files = {
+      "vgg_generated_48.i" = "e8d0dcd54d1bcfdc29203d011a797179";
+      "vgg_generated_64.i" = "7126a5d9a8884ebca5aea5d63d677225";
+      "vgg_generated_80.i" = "7cd47228edec52b6d82f46511af325c5";
+      "vgg_generated_120.i" = "151805e03568c9f490a5e3a872777b75";
+    };
+    dst = ".cache/xfeatures2d/vgg";
+  };
+
+  # See opencv_contrib/modules/xfeatures2d/cmake/download_boostdesc.cmake
+  boostdesc = {
+    src = fetchFromGitHub {
+      owner = "opencv";
+      repo = "opencv_3rdparty";
+      rev = "34e4206aef44d50e6bbcd0ab06354b52e7466d26";
+      sha256 = "13yig1xhvgghvxspxmdidss5lqiikpjr0ddm83jsi0k85j92sn62";
+    };
+    files = {
+      "boostdesc_bgm.i" = "0ea90e7a8f3f7876d450e4149c97c74f";
+      "boostdesc_bgm_bi.i" = "232c966b13651bd0e46a1497b0852191";
+      "boostdesc_bgm_hd.i" = "324426a24fa56ad9c5b8e3e0b3e5303e";
+      "boostdesc_binboost_064.i" = "202e1b3e9fec871b04da31f7f016679f";
+      "boostdesc_binboost_128.i" = "98ea99d399965c03d555cef3ea502a0b";
+      "boostdesc_binboost_256.i" = "e6dcfa9f647779eb1ce446a8d759b6ea";
+      "boostdesc_lbgm.i" = "0ae0675534aa318d9668f2a179c2a052";
+    };
+    dst = ".cache/xfeatures2d/boostdesc";
+  };
+
+  # See opencv_contrib/modules/face/CMakeLists.txt
+  face = {
+    src = fetchFromGitHub {
+      owner = "opencv";
+      repo = "opencv_3rdparty";
+      rev = "8afa57abc8229d611c4937165d20e2a2d9fc5a12";
+      sha256 = "061lsvqdidq9xa2hwrcvwi9ixflr2c2lfpc8drr159g68zi8bp4v";
+    };
+    files = {
+      "face_landmark_model.dat" = "7505c44ca4eb54b4ab1e4777cb96ac05";
+    };
+    dst = ".cache/data";
+  };
+
+  # See opencv/modules/gapi/cmake/DownloadADE.cmake
+  ade = rec {
+    src = fetchurl {
+      url = "https://github.com/opencv/ade/archive/${name}";
+      sha256 = "sha256-TjLRbFbC7MDY9PxIy560ryviBI58cbQwqgc7A7uOHkg=";
+    };
+    name = "v0.1.2a.zip";
+    md5 = "fa4b3e25167319cb0fa9432ef8281945";
+    dst = ".cache/ade";
+  };
+
+  # See opencv_contrib/modules/wechat_qrcode/CMakeLists.txt
+  wechat_qrcode = {
+    src = fetchFromGitHub {
+      owner = "opencv";
+      repo = "opencv_3rdparty";
+      rev = "a8b69ccc738421293254aec5ddb38bd523503252";
+      sha256 = "sha256-/n6zHwf0Rdc4v9o4rmETzow/HTv+81DnHP+nL56XiTY=";
+    };
+    files = {
+      "detect.caffemodel" = "238e2b2d6f3c18d6c3a30de0c31e23cf";
+      "detect.prototxt" = "6fb4976b32695f9f5c6305c19f12537d";
+      "sr.caffemodel" = "cbfcd60361a73beb8c583eea7e8e6664";
+      "sr.prototxt" = "69db99927a70df953b471daaba03fbef";
+    };
+    dst = ".cache/wechat_qrcode";
+  };
+
+  # See opencv/cmake/OpenCVDownload.cmake
+  installExtraFiles = extra: with lib; ''
+    mkdir -p "${extra.dst}"
+  '' + concatStrings (flip mapAttrsToList extra.files (name: md5: ''
+    ln -s "${extra.src}/${name}" "${extra.dst}/${md5}-${name}"
+  ''));
+  installExtraFile = extra: ''
+    mkdir -p "${extra.dst}"
+    ln -s "${extra.src}" "${extra.dst}/${extra.md5}-${extra.name}"
+  '';
+
+  opencvFlag = name: enabled: "-DWITH_${name}=${printEnabled enabled}";
+
+  runAccuracyTests = true;
+  runPerformanceTests = false;
+  printEnabled = enabled: if enabled then "ON" else "OFF";
+  withOpenblas = (enableBlas && blas.provider.pname == "openblas");
+  #multithreaded openblas conflicts with opencv multithreading, which manifest itself in hung tests
+  #https://github.com/OpenMathLib/OpenBLAS/wiki/Faq/4bded95e8dc8aadc70ce65267d1093ca7bdefc4c#multi-threaded
+  openblas_ = blas.provider.override { singleThreaded = true; };
+
+  inherit (cudaPackages) cudaFlags cudaVersion;
+  inherit (cudaFlags) cudaCapabilities;
+
+in
+
+effectiveStdenv.mkDerivation {
+  pname = "opencv";
+  inherit version src;
+
+  outputs = [
+    "out"
+    "cxxdev"
+    "package_tests"
+  ];
+  cudaPropagateToOutput = "cxxdev";
+
+  postUnpack = lib.optionalString buildContrib ''
+    cp --no-preserve=mode -r "${contribSrc}/modules" "$NIX_BUILD_TOP/source/opencv_contrib"
+  '';
+
+  # Ensures that we use the system OpenEXR rather than the vendored copy of the source included with OpenCV.
+  patches = [
+    ./cmake-don-t-use-OpenCVFindOpenEXR.patch
+  ] ++ lib.optionals enableContrib [
+    (fetchpatch {
+      name = "CVE-2023-2617.patch";
+      url = "https://github.com/opencv/opencv_contrib/commit/ccc277247ac1a7aef0a90353edcdec35fbc5903c.patch";
+      stripLen = 2;
+      extraPrefix = [ "opencv_contrib/" ];
+      sha256 = "sha256-drZ+DVn+Pk4zAZJ+LgX5u3Tz7MU0AEI/73EVvxDP3AU=";
+    })
+    (fetchpatch {
+      name = "CVE-2023-2618.patch";
+      url = "https://github.com/opencv/opencv_contrib/commit/ec406fa4748fb4b0630c1b986469e7918d5e8953.patch";
+      stripLen = 2;
+      extraPrefix = [ "opencv_contrib/" ];
+      sha256 = "sha256-cB5Tsh2fDOsc0BNtSzd6U/QoCjkd9yMW1QutUU69JJ0=";
+    })
+  ] ++ lib.optional enableCuda ./cuda_opt_flow.patch;
+
+  # This prevents cmake from using libraries in impure paths (which
+  # causes build failure on non NixOS)
+  postPatch = ''
+    sed -i '/Add these standard paths to the search paths for FIND_LIBRARY/,/^\s*$/{d}' CMakeLists.txt
+  '';
+
+  preConfigure =
+    installExtraFile ade +
+    lib.optionalString enableIpp (installExtraFiles ippicv) + (
+      lib.optionalString buildContrib ''
+        cmakeFlagsArray+=("-DOPENCV_EXTRA_MODULES_PATH=$NIX_BUILD_TOP/source/opencv_contrib")
+
+        ${installExtraFiles vgg}
+        ${installExtraFiles boostdesc}
+        ${installExtraFiles face}
+        ${installExtraFiles wechat_qrcode}
+      ''
+    );
+
+  postConfigure = ''
+    [ -e modules/core/version_string.inc ]
+    echo '"(build info elided)"' > modules/core/version_string.inc
+  '';
+
+  buildInputs = [ zlib pcre boost gflags protobuf_21 ]
+    ++ lib.optional enablePython pythonPackages.python
+    ++ lib.optional (effectiveStdenv.buildPlatform == effectiveStdenv.hostPlatform) hdf5
+    ++ lib.optional enableGtk2 gtk2
+    ++ lib.optional enableGtk3 gtk3
+    ++ lib.optional enableVtk vtk
+    ++ lib.optional enableJPEG libjpeg
+    ++ lib.optional enablePNG libpng
+    ++ lib.optional enableTIFF libtiff
+    ++ lib.optional enableWebP libwebp
+    ++ lib.optionals enableEXR [ openexr ilmbase ]
+    ++ lib.optional enableJPEG2000 openjpeg
+    ++ lib.optional enableFfmpeg ffmpeg
+    ++ lib.optionals (enableFfmpeg && effectiveStdenv.isDarwin)
+      [ VideoDecodeAcceleration bzip2 ]
+    ++ lib.optionals enableGStreamer (with gst_all_1; [ gstreamer gst-plugins-base gst-plugins-good ])
+    ++ lib.optional enableOvis ogre
+    ++ lib.optional enableGPhoto2 libgphoto2
+    ++ lib.optional enableDC1394 libdc1394
+    ++ lib.optional enableEigen eigen
+    ++ lib.optional enableBlas blas.provider
+    # There is seemingly no compile-time flag for Tesseract.  It's
+    # simply enabled automatically if contrib is built, and it detects
+    # tesseract & leptonica.
+    ++ lib.optionals enableTesseract [ tesseract leptonica ]
+    ++ lib.optional enableTbb tbb
+    ++ lib.optionals effectiveStdenv.isDarwin [
+      bzip2 AVFoundation Cocoa VideoDecodeAcceleration CoreMedia MediaToolbox Accelerate
+    ]
+    ++ lib.optionals enableDocs [ doxygen graphviz-nox ]
+    ++ lib.optionals enableCuda (with cudaPackages; [
+      cuda_cudart.lib
+      cuda_cudart.dev
+      cuda_cccl.dev # <thrust/*>
+      libnpp.dev # npp.h
+      libnpp.lib
+      libnpp.static
+      nvidia-optical-flow-sdk
+    ] ++ lib.optionals enableCublas [
+      # May start using the default $out instead once
+      # https://github.com/NixOS/nixpkgs/issues/271792
+      # has been addressed
+      libcublas.static
+      libcublas.lib
+      libcublas.dev # cublas_v2.h
+    ] ++ lib.optionals enableCudnn [
+      cudnn.dev # cudnn.h
+      cudnn.lib
+      cudnn.static
+    ] ++ lib.optionals enableCufft [
+      libcufft.dev # cufft.h
+      libcufft.lib
+      libcufft.static
+    ]);
+
+  propagatedBuildInputs = lib.optionals enablePython [ pythonPackages.numpy ];
+
+  nativeBuildInputs = [ cmake pkg-config unzip ]
+  ++ lib.optionals enablePython [
+    pythonPackages.pip
+    pythonPackages.wheel
+    pythonPackages.setuptools
+  ] ++ lib.optionals enableCuda [
+    cudaPackages.cuda_nvcc
+  ];
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString enableEXR "-I${ilmbase.dev}/include/OpenEXR";
+
+  # Configure can't find the library without this.
+  OpenBLAS_HOME = lib.optionalString withOpenblas openblas_.dev;
+  OpenBLAS = lib.optionalString withOpenblas openblas_;
+
+  cmakeFlags = [
+    "-DOPENCV_GENERATE_PKGCONFIG=ON"
+    "-DWITH_OPENMP=ON"
+    "-DBUILD_PROTOBUF=OFF"
+    "-DProtobuf_PROTOC_EXECUTABLE=${lib.getExe buildPackages.protobuf_21}"
+    "-DPROTOBUF_UPDATE_FILES=ON"
+    "-DOPENCV_ENABLE_NONFREE=${printEnabled enableUnfree}"
+    "-DBUILD_TESTS=${printEnabled runAccuracyTests}"
+    "-DBUILD_PERF_TESTS=${printEnabled runPerformanceTests}"
+    "-DCMAKE_SKIP_BUILD_RPATH=ON"
+    "-DBUILD_DOCS=${printEnabled enableDocs}"
+    # "OpenCV disables pkg-config to avoid using of host libraries. Consider using PKG_CONFIG_LIBDIR to specify target SYSROOT"
+    # but we have proper separation of build and host libs :), fixes cross
+    "-DOPENCV_ENABLE_PKG_CONFIG=ON"
+    (opencvFlag "IPP" enableIpp)
+    (opencvFlag "TIFF" enableTIFF)
+    (opencvFlag "WEBP" enableWebP)
+    (opencvFlag "JPEG" enableJPEG)
+    (opencvFlag "PNG" enablePNG)
+    (opencvFlag "OPENEXR" enableEXR)
+    (opencvFlag "OPENJPEG" enableJPEG2000)
+    "-DWITH_JASPER=OFF" # OpenCV falls back to a vendored copy of Jasper when OpenJPEG is disabled
+    (opencvFlag "TBB" enableTbb)
+
+    # CUDA options
+    (opencvFlag "CUDA" enableCuda)
+    (opencvFlag "CUDA_FAST_MATH" enableCuda)
+    (opencvFlag "CUBLAS" enableCublas)
+    (opencvFlag "CUDNN" enableCudnn)
+    (opencvFlag "CUFFT" enableCufft)
+
+    # LTO options
+    (opencvFlag "ENABLE_LTO" enableLto)
+    (opencvFlag "ENABLE_THIN_LTO" (
+      enableLto && (
+        # Only clang supports thin LTO, so we must either be using clang through the effectiveStdenv,
+        effectiveStdenv.cc.isClang ||
+          # or through the backend effectiveStdenv.
+          (enableCuda && effectiveStdenv.cc.isClang)
+      )
+    ))
+  ] ++ lib.optionals enableCuda [
+    "-DCUDA_FAST_MATH=ON"
+    "-DCUDA_NVCC_FLAGS=--expt-relaxed-constexpr"
+
+    # OpenCV respects at least three variables:
+    # -DCUDA_GENERATION takes a single arch name, e.g. Volta
+    # -DCUDA_ARCH_BIN takes a semi-colon separated list of real arches, e.g. "8.0;8.6"
+    # -DCUDA_ARCH_PTX takes the virtual arch, e.g. "8.6"
+    "-DCUDA_ARCH_BIN=${lib.concatStringsSep ";" cudaCapabilities}"
+    "-DCUDA_ARCH_PTX=${lib.last cudaCapabilities}"
+
+    "-DNVIDIA_OPTICAL_FLOW_2_0_HEADERS_PATH=${nvidia-optical-flow-sdk}"
+  ] ++ lib.optionals effectiveStdenv.isDarwin [
+    "-DWITH_OPENCL=OFF"
+    "-DWITH_LAPACK=OFF"
+
+    # Disable unnecessary vendoring that's enabled by default only for Darwin.
+    # Note that the opencvFlag feature flags listed above still take
+    # precedence, so we can safely list everything here.
+    "-DBUILD_ZLIB=OFF"
+    "-DBUILD_TIFF=OFF"
+    "-DBUILD_OPENJPEG=OFF"
+    "-DBUILD_JASPER=OFF"
+    "-DBUILD_JPEG=OFF"
+    "-DBUILD_PNG=OFF"
+    "-DBUILD_WEBP=OFF"
+  ] ++ lib.optionals (!effectiveStdenv.isDarwin) [
+    "-DOPENCL_LIBRARY=${ocl-icd}/lib/libOpenCL.so"
+  ] ++ lib.optionals enablePython [
+    "-DOPENCV_SKIP_PYTHON_LOADER=ON"
+  ];
+
+  postBuild = lib.optionalString enableDocs ''
+    make doxygen
+  '';
+
+  preInstall =
+    lib.optionalString (runAccuracyTests || runPerformanceTests) ''
+    mkdir $package_tests
+    cp -R $src/samples $package_tests/
+    ''
+    + lib.optionalString runAccuracyTests "mv ./bin/*test* $package_tests/ \n"
+    + lib.optionalString runPerformanceTests "mv ./bin/*perf* $package_tests/";
+
+  # By default $out/lib/pkgconfig/opencv4.pc looks something like this:
+  #
+  #   prefix=/nix/store/g0wnfyjjh4rikkvp22cpkh41naa43i4i-opencv-4.0.0
+  #   exec_prefix=${prefix}
+  #   libdir=${exec_prefix}//nix/store/g0wnfyjjh4rikkvp22cpkh41naa43i4i-opencv-4.0.0/lib
+  #   includedir_old=${prefix}//nix/store/g0wnfyjjh4rikkvp22cpkh41naa43i4i-opencv-4.0.0/include/opencv4/opencv
+  #   includedir_new=${prefix}//nix/store/g0wnfyjjh4rikkvp22cpkh41naa43i4i-opencv-4.0.0/include/opencv4
+  #   ...
+  #   Libs: -L${exec_prefix}//nix/store/g0wnfyjjh4rikkvp22cpkh41naa43i4i-opencv-4.0.0/lib ...
+  # Note that ${exec_prefix} is set to $out but that $out is also appended to
+  # ${exec_prefix}. This causes linker errors in downstream packages so we strip
+  # of $out after the ${exec_prefix} and ${prefix} prefixes:
+  postInstall = ''
+    sed -i "s|{exec_prefix}/$out|{exec_prefix}|;s|{prefix}/$out|{prefix}|" \
+      "$out/lib/pkgconfig/opencv4.pc"
+    mkdir "$cxxdev"
+  ''
+  # fix deps not progagating from opencv4.cxxdev if cuda is disabled
+  # see https://github.com/NixOS/nixpkgs/issues/276691
+  + lib.optionalString (!enableCuda) ''
+    mkdir -p "$cxxdev/nix-support"
+    echo "''${!outputDev}" >> "$cxxdev/nix-support/propagated-build-inputs"
+  ''
+  # install python distribution information, so other packages can `import opencv`
+  + lib.optionalString enablePython ''
+    pushd $NIX_BUILD_TOP/$sourceRoot/modules/python/package
+    python -m pip wheel --verbose --no-index --no-deps --no-clean --no-build-isolation --wheel-dir dist .
+
+    pushd dist
+    python -m pip install ./*.whl --no-index --no-warn-script-location --prefix="$out" --no-cache
+
+    # the cv2/__init__.py just tries to check provide "nice user feedback" if the installation is bad
+    # however, this also causes infinite recursion when used by other packages
+    rm -r $out/${pythonPackages.python.sitePackages}/cv2
+
+    popd
+    popd
+  '';
+
+  passthru = {
+    cudaSupport = enableCuda;
+
+    tests = {
+      inherit (gst_all_1) gst-plugins-bad;
+    }
+    // lib.optionalAttrs (!effectiveStdenv.isDarwin) { inherit qimgv; }
+    // lib.optionalAttrs (!enablePython) { pythonEnabled = pythonPackages.opencv4; }
+    // lib.optionalAttrs (effectiveStdenv.buildPlatform != "x86_64-darwin") {
+      opencv4-tests = callPackage ./tests.nix {
+        inherit enableGStreamer enableGtk2 enableGtk3 runAccuracyTests runPerformanceTests testDataSrc;
+        inherit opencv4;
+      };
+    }
+    // lib.optionalAttrs (enableCuda) {
+      no-libstdcxx-errors = callPackage ./libstdcxx-test.nix { attrName = "opencv4"; };
+    };
+  } // lib.optionalAttrs enablePython { pythonPath = [ ]; };
+
+  meta = with lib; {
+    description = "Open Computer Vision Library with more than 500 algorithms";
+    homepage = "https://opencv.org/";
+    license = with licenses; if enableUnfree then unfree else bsd3;
+    maintainers = with maintainers; [ basvandijk ];
+    platforms = with platforms; linux ++ darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/opencv/cmake-don-t-use-OpenCVFindOpenEXR.patch b/nixpkgs/pkgs/development/libraries/opencv/cmake-don-t-use-OpenCVFindOpenEXR.patch
new file mode 100644
index 000000000000..abeb0d9fde4b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opencv/cmake-don-t-use-OpenCVFindOpenEXR.patch
@@ -0,0 +1,31 @@
+diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake
+index 00886cc131..e412771322 100644
+--- a/cmake/OpenCVFindLibsGrfmt.cmake
++++ b/cmake/OpenCVFindLibsGrfmt.cmake
+@@ -257,23 +257,12 @@ endif()
+ # --- OpenEXR (optional) ---
+ if(WITH_OPENEXR)
+   ocv_clear_vars(HAVE_OPENEXR)
+-  if(NOT BUILD_OPENEXR)
+-    ocv_clear_internal_cache_vars(OPENEXR_INCLUDE_PATHS OPENEXR_LIBRARIES OPENEXR_ILMIMF_LIBRARY OPENEXR_VERSION)
+-    include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindOpenEXR.cmake")
+-  endif()
++  pkg_check_modules(OPENEXR OpenEXR)
+ 
+   if(OPENEXR_FOUND)
+     set(HAVE_OPENEXR YES)
+-  else()
+-    ocv_clear_vars(OPENEXR_INCLUDE_PATHS OPENEXR_LIBRARIES OPENEXR_ILMIMF_LIBRARY OPENEXR_VERSION)
+-
+-    set(OPENEXR_LIBRARIES IlmImf)
+-    add_subdirectory("${OpenCV_SOURCE_DIR}/3rdparty/openexr")
+-    if(OPENEXR_VERSION)  # check via TARGET doesn't work
+-      set(BUILD_OPENEXR ON)
+-      set(HAVE_OPENEXR YES)
+-      set(BUILD_OPENEXR ON)
+-    endif()
++    set(OPENEXR_INCLUDE_PATHS ${OPENEXR_INCLUDE_DIRS})
++    set(OPENEXR_LIBRARIES ${OPENEXR_LIBRARIES})
+   endif()
+ endif()
+ 
diff --git a/nixpkgs/pkgs/development/libraries/opencv/cuda_opt_flow.patch b/nixpkgs/pkgs/development/libraries/opencv/cuda_opt_flow.patch
new file mode 100644
index 000000000000..2f97abd51bbf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opencv/cuda_opt_flow.patch
@@ -0,0 +1,27 @@
+diff --unified --recursive --text a/opencv_contrib/cudaoptflow/CMakeLists.txt b/opencv_contrib/cudaoptflow/CMakeLists.txt
+--- a/opencv_contrib/cudaoptflow/CMakeLists.txt	2021-06-12 01:35:47.536395972 +0300
++++ b/opencv_contrib/cudaoptflow/CMakeLists.txt	2021-06-12 01:36:02.029498597 +0300
+@@ -12,19 +12,6 @@
+   set(NVIDIA_OPTICAL_FLOW_2_0_HEADERS_COMMIT "edb50da3cf849840d680249aa6dbef248ebce2ca")
+   set(NVIDIA_OPTICAL_FLOW_2_0_HEADERS_MD5 "a73cd48b18dcc0cc8933b30796074191")
+   set(NVIDIA_OPTICAL_FLOW_2_0_HEADERS_PATH "${OpenCV_BINARY_DIR}/3rdparty/NVIDIAOpticalFlowSDK_2_0_Headers")
+-  ocv_download(FILENAME "${NVIDIA_OPTICAL_FLOW_2_0_HEADERS_COMMIT}.zip"
+-                 HASH ${NVIDIA_OPTICAL_FLOW_2_0_HEADERS_MD5}
+-                 URL "https://github.com/NVIDIA/NVIDIAOpticalFlowSDK/archive/"
+-                 DESTINATION_DIR "${NVIDIA_OPTICAL_FLOW_2_0_HEADERS_PATH}"
+-                 STATUS NVIDIA_OPTICAL_FLOW_2_0_HEADERS_DOWNLOAD_SUCCESS
+-                 ID "NVIDIA_OPTICAL_FLOW"
+-                 UNPACK RELATIVE_URL)
+-
+-  if(NOT NVIDIA_OPTICAL_FLOW_2_0_HEADERS_DOWNLOAD_SUCCESS)
+-    message(STATUS "Failed to download NVIDIA_Optical_Flow_2_0 Headers")
+-  else()
+-    message(STATUS "Building with NVIDIA Optical Flow API 2.0")
+-    add_definitions(-DHAVE_NVIDIA_OPTFLOW=2)
+-    ocv_include_directories(SYSTEM "${NVIDIA_OPTICAL_FLOW_2_0_HEADERS_PATH}/NVIDIAOpticalFlowSDK-${NVIDIA_OPTICAL_FLOW_2_0_HEADERS_COMMIT}")
+-  endif()
+-endif()
+\ No newline at end of file
++  add_definitions(-DHAVE_NVIDIA_OPTFLOW=2)
++  ocv_include_directories(SYSTEM "${NVIDIA_OPTICAL_FLOW_2_0_HEADERS_PATH}")
++endif()
diff --git a/nixpkgs/pkgs/development/libraries/opencv/default.nix b/nixpkgs/pkgs/development/libraries/opencv/default.nix
new file mode 100644
index 000000000000..06cc02c47c94
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opencv/default.nix
@@ -0,0 +1,84 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, unzip
+, zlib
+, enableGtk2 ? false, gtk2
+, enableJPEG ? true, libjpeg
+, enablePNG ? true, libpng
+, enableTIFF ? true, libtiff
+, enableEXR ? (!stdenv.isDarwin), openexr, ilmbase
+, enableFfmpeg ? false, ffmpeg
+, enableGStreamer ? false, gst_all_1
+, enableEigen ? true, eigen
+, enableUnfree ? false
+, AVFoundation, Cocoa, QTKit, Accelerate
+}:
+
+let
+  opencvFlag = name: enabled: "-DWITH_${name}=${if enabled then "ON" else "OFF"}";
+
+in
+
+stdenv.mkDerivation rec {
+  pname = "opencv";
+  version = "2.4.13.7";
+
+  src = fetchFromGitHub {
+    owner = "opencv";
+    repo = "opencv";
+    rev = version;
+    sha256 = "062js7zhh4ixi2wk61wyi23qp9zsk5vw24iz2i5fab2hp97y5zq3";
+  };
+
+  patches =
+    [ # Don't include a copy of the CMake status output in the
+      # build. This causes a runtime dependency on GCC.
+      ./no-build-info.patch
+    ];
+
+  # This prevents cmake from using libraries in impure paths (which causes build failure on non NixOS)
+  postPatch = ''
+    sed -i '/Add these standard paths to the search paths for FIND_LIBRARY/,/^\s*$/{d}' CMakeLists.txt
+  '';
+
+  outputs = [ "out" "dev" ];
+
+  buildInputs =
+       [ zlib ]
+    ++ lib.optional enableGtk2 gtk2
+    ++ lib.optional enableJPEG libjpeg
+    ++ lib.optional enablePNG libpng
+    ++ lib.optional enableTIFF libtiff
+    ++ lib.optionals enableEXR [ openexr ilmbase ]
+    ++ lib.optional enableFfmpeg ffmpeg
+    ++ lib.optionals enableGStreamer (with gst_all_1; [ gstreamer gst-plugins-base ])
+    ++ lib.optional enableEigen eigen
+    ++ lib.optionals stdenv.isDarwin [ AVFoundation Cocoa QTKit Accelerate ]
+    ;
+
+  nativeBuildInputs = [ cmake pkg-config unzip ];
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString enableEXR "-I${ilmbase.dev}/include/OpenEXR";
+
+  cmakeFlags = [
+    (opencvFlag "TIFF" enableTIFF)
+    (opencvFlag "JPEG" enableJPEG)
+    (opencvFlag "PNG" enablePNG)
+    (opencvFlag "OPENEXR" enableEXR)
+    (opencvFlag "GSTREAMER" enableGStreamer)
+  ] ++ lib.optional (!enableUnfree) "-DBUILD_opencv_nonfree=OFF";
+
+  hardeningDisable = [ "bindnow" "relro" ];
+
+  # Fix pkg-config file that gets broken with multiple outputs
+  postFixup = ''
+    sed -i $dev/lib/pkgconfig/opencv.pc -e "s|includedir_old=.*|includedir_old=$dev/include/opencv|"
+    sed -i $dev/lib/pkgconfig/opencv.pc -e "s|includedir_new=.*|includedir_new=$dev/include|"
+  '';
+
+  meta = with lib; {
+    description = "Open Computer Vision Library with more than 500 algorithms";
+    homepage = "https://opencv.org/";
+    license = if enableUnfree then licenses.unfree else licenses.bsd3;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/opencv/libstdcxx-test.nix b/nixpkgs/pkgs/development/libraries/opencv/libstdcxx-test.nix
new file mode 100644
index 000000000000..d8cc483da9a8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opencv/libstdcxx-test.nix
@@ -0,0 +1,17 @@
+{ python3Packages, runCommand, attrName }:
+
+runCommand "${python3Packages.${attrName}.name}-libstdcxx-test"
+{
+  nativeBuildInputs = [
+    (python3Packages.python.withPackages (ps: [
+      (ps.${attrName}.override { enableCuda = true; })
+      ps.scikit-image
+    ]))
+  ];
+} ''
+  python << EOF
+  import cv2
+  from skimage.transform import pyramid_reduce
+  EOF
+  touch $out
+''
diff --git a/nixpkgs/pkgs/development/libraries/opencv/no-build-info.patch b/nixpkgs/pkgs/development/libraries/opencv/no-build-info.patch
new file mode 100644
index 000000000000..4ee9701583a0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opencv/no-build-info.patch
@@ -0,0 +1,14 @@
+diff -ru -x '*~' opencv-2.4.13-orig/modules/core/src/system.cpp opencv-2.4.13/modules/core/src/system.cpp
+--- opencv-2.4.13-orig/modules/core/src/system.cpp	1970-01-01 01:00:01.000000000 +0100
++++ opencv-2.4.13/modules/core/src/system.cpp	2016-10-02 18:44:53.674181762 +0200
+@@ -442,9 +442,7 @@
+ 
+ const std::string& getBuildInformation()
+ {
+-    static std::string build_info =
+-#include "version_string.inc"
+-    ;
++    static std::string build_info = "(build info elided)";
+     return build_info;
+ }
+ 
diff --git a/nixpkgs/pkgs/development/libraries/opencv/tests.nix b/nixpkgs/pkgs/development/libraries/opencv/tests.nix
new file mode 100644
index 000000000000..d1966b1a4aa8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opencv/tests.nix
@@ -0,0 +1,70 @@
+{ opencv4
+, testDataSrc
+, stdenv
+, lib
+, runCommand
+, gst_all_1
+, runAccuracyTests
+, runPerformanceTests
+, enableGStreamer
+, enableGtk2
+, enableGtk3
+, xvfb-run
+}:
+let
+  testNames = [
+    "calib3d"
+    "core"
+    "features2d"
+    "flann"
+    "imgcodecs"
+    "imgproc"
+    "ml"
+    "objdetect"
+    "photo"
+    "stitching"
+    "video"
+    #"videoio" # - a lot of GStreamer warnings and failed tests
+    #"dnn" #- some caffe tests failed, probably because github workflow also downloads additional models
+  ] ++ lib.optionals (!stdenv.isAarch64 && enableGStreamer) [ "gapi" ]
+  ++ lib.optionals (enableGtk2 || enableGtk3) [ "highgui" ];
+  perfTestNames = [
+    "calib3d"
+    "core"
+    "features2d"
+    "imgcodecs"
+    "imgproc"
+    "objdetect"
+    "photo"
+    "stitching"
+    "video"
+  ] ++ lib.optionals (!stdenv.isAarch64 && enableGStreamer) [ "gapi" ];
+  testRunner = lib.optionalString (!stdenv.isDarwin) "${lib.getExe xvfb-run} -a ";
+  testsPreparation = ''
+    touch $out
+    # several tests want a write access, so we have to copy files
+    tmpPath="$(mktemp -d "/tmp/opencv_extra_XXXXXX")"
+    cp -R ${testDataSrc} $tmpPath/opencv_extra
+    chmod -R +w $tmpPath/opencv_extra
+    export OPENCV_TEST_DATA_PATH="$tmpPath/opencv_extra/testdata"
+    export OPENCV_SAMPLES_DATA_PATH="${opencv4.package_tests}/samples/data"
+
+    #ignored tests because of gtest error - "Test code is not available due to compilation error with GCC 11"
+    export GTEST_FILTER="-AsyncAPICancelation/cancel*"
+  '';
+  accuracyTests = lib.optionalString runAccuracyTests ''
+    ${ builtins.concatStringsSep "\n"
+      (map (test: "${testRunner}${opencv4.package_tests}/opencv_test_${test} --test_threads=$NIX_BUILD_CORES --gtest_filter=$GTEST_FILTER" ) testNames)
+    }
+  '';
+  performanceTests = lib.optionalString runPerformanceTests ''
+    ${ builtins.concatStringsSep "\n"
+      (map (test: "${testRunner}${opencv4.package_tests}/opencv_perf_${test} --perf_impl=plain --perf_min_samples=10 --perf_force_samples=10 --perf_verify_sanity --skip_unstable=1 --gtest_filter=$GTEST_FILTER") perfTestNames)
+    }
+  '';
+in
+runCommand "opencv4-tests"
+{
+  nativeBuildInputs = lib.optionals enableGStreamer (with gst_all_1; [ gstreamer gst-plugins-base gst-plugins-good ]);
+}
+  (testsPreparation + accuracyTests + performanceTests)
diff --git a/nixpkgs/pkgs/development/libraries/opendbx/default.nix b/nixpkgs/pkgs/development/libraries/opendbx/default.nix
new file mode 100644
index 000000000000..b7a4a34390d9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opendbx/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchurl, readline, libmysqlclient, postgresql, sqlite }:
+
+let inherit (lib) getDev; in
+
+stdenv.mkDerivation rec {
+  pname = "opendbx";
+  version = "1.4.6";
+
+  src = fetchurl {
+    url = "https://linuxnetworks.de/opendbx/download/opendbx-${version}.tar.gz";
+    sha256 = "0z29h6zx5f3gghkh1a0060w6wr572ci1rl2a3480znf728wa0ii2";
+  };
+
+  preConfigure = ''
+    export CPPFLAGS="-I${getDev libmysqlclient}/include/mysql"
+    export LDFLAGS="-L${libmysqlclient}/lib/mysql -L${postgresql}/lib"
+    configureFlagsArray=(--with-backends="mysql pgsql sqlite3")
+  '';
+
+  buildInputs = [ readline libmysqlclient postgresql sqlite ];
+
+  env.NIX_CFLAGS_COMPILE = toString [
+    # Needed with GCC 12
+    "-std=c++14"
+  ];
+
+  meta = with lib; {
+    broken = stdenv.isDarwin;
+    description = "Extremely lightweight but extensible database access library written in C";
+    license = licenses.lgpl21;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/opendht/default.nix b/nixpkgs/pkgs/development/libraries/opendht/default.nix
new file mode 100644
index 000000000000..7209c2d2e253
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opendht/default.nix
@@ -0,0 +1,78 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, Security
+, cmake
+, pkg-config
+, asio
+, nettle
+, gnutls
+, msgpack-cxx
+, readline
+, libargon2
+, jsoncpp
+, restinio
+, http-parser
+, openssl
+, fmt
+, enableProxyServerAndClient ? false
+, enablePushNotifications ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "opendht";
+  version = "3.1.4";
+
+  src = fetchFromGitHub {
+    owner = "savoirfairelinux";
+    repo = "opendht";
+    rev = "v${version}";
+    hash = "sha256-KtsQ25uStmlf7RZLAcabhPMyGbxKxvpR6Vm632+EBvw=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    asio
+    fmt
+    nettle
+    gnutls
+    msgpack-cxx
+    readline
+    libargon2
+  ] ++ lib.optionals enableProxyServerAndClient [
+    jsoncpp
+    restinio
+    http-parser
+    openssl
+  ] ++ lib.optionals stdenv.isDarwin [
+    Security
+  ];
+
+  cmakeFlags = lib.optionals enableProxyServerAndClient [
+    "-DOPENDHT_PROXY_SERVER=ON"
+    "-DOPENDHT_PROXY_CLIENT=ON"
+  ] ++ lib.optionals enablePushNotifications [
+    "-DOPENDHT_PUSH_NOTIFICATIONS=ON"
+  ];
+
+  # https://github.com/savoirfairelinux/opendht/issues/612
+  postPatch = ''
+    substituteInPlace CMakeLists.txt \
+      --replace '\$'{exec_prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
+      --replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
+  '';
+
+  outputs = [ "out" "lib" "dev" "man" ];
+
+  meta = with lib; {
+    description = "A C++11 Kademlia distributed hash table implementation";
+    homepage = "https://github.com/savoirfairelinux/opendht";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ taeer olynch thoughtpolice ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/opendkim/default.nix b/nixpkgs/pkgs/development/libraries/opendkim/default.nix
new file mode 100644
index 000000000000..00b5d624153a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opendkim/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, libbsd, openssl, libmilter
+, autoreconfHook, perl, makeWrapper, unbound }:
+
+stdenv.mkDerivation rec {
+  pname = "opendkim";
+  version = "2.11.0-Beta2";
+
+  src = fetchFromGitHub {
+    owner = "trusteddomainproject";
+    repo = "OpenDKIM";
+    rev = "rel-opendkim-${lib.replaceStrings ["."] ["-"] version}";
+    sha256 = "0nx3in8sa6xna4vfacj8g60hfzk61jpj2ldag80xzxip9c3rd2pw";
+  };
+
+  configureFlags= [
+    "--with-milter=${libmilter}"
+    "ac_cv_func_malloc_0_nonnull=yes"
+    "ac_cv_func_realloc_0_nonnull=yes"
+  ] ++ lib.optional stdenv.isDarwin "--with-unbound=${unbound}";
+
+  nativeBuildInputs = [ autoreconfHook pkg-config makeWrapper ];
+
+  buildInputs = [ libbsd openssl libmilter perl ] ++ lib.optional stdenv.isDarwin unbound;
+
+  postInstall = ''
+    wrapProgram $out/sbin/opendkim-genkey \
+      --prefix PATH : ${openssl.bin}/bin
+  '';
+
+  meta = with lib; {
+    description = "C library for producing DKIM-aware applications and an open source milter for providing DKIM service";
+    homepage = "http://www.opendkim.org/";
+    maintainers = with maintainers; [ abbradar ];
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/opendmarc/default.nix b/nixpkgs/pkgs/development/libraries/opendmarc/default.nix
new file mode 100644
index 000000000000..5a61af6c4dba
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opendmarc/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, libmilter, perl, perlPackages, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  pname = "opendmarc";
+  version = "1.4.2";
+
+  src = fetchFromGitHub {
+    owner = "trusteddomainproject";
+    repo = "opendmarc";
+    rev = "rel-opendmarc-${builtins.replaceStrings [ "." ] [ "-" ] version}";
+    hash = "sha256-vnWtTvHhzCed7P6rN3wAz6zfRvtV0cLn5GhDxLF8H3c=";
+  };
+
+  outputs = [ "bin" "dev" "out" "doc" ];
+
+  buildInputs = [ perl ];
+  nativeBuildInputs = [ autoreconfHook makeWrapper ];
+
+  postPatch = ''
+    substituteInPlace configure.ac --replace '	docs/Makefile' ""
+    patchShebangs contrib reports
+  '';
+
+  configureFlags = [
+    "--with-milter=${libmilter}"
+  ];
+
+  postFixup = ''
+    for b in $bin/bin/opendmarc-{expire,import,params,reports}; do
+      wrapProgram $b --set PERL5LIB ${perlPackages.makeFullPerlPath (with perlPackages; [ Switch DBI DBDmysql HTTPMessage ])}
+    done
+  '';
+
+  meta = with lib; {
+    description = "A free open source software implementation of the DMARC specification";
+    homepage = "http://www.trusteddomain.org/opendmarc/";
+    license = with licenses; [ bsd3 sendmail ];
+    maintainers = teams.helsinki-systems.members;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/openexr/3.nix b/nixpkgs/pkgs/development/libraries/openexr/3.nix
new file mode 100644
index 000000000000..826c7b2c854f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openexr/3.nix
@@ -0,0 +1,55 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, imath
+, libdeflate
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openexr";
+  version = "3.2.1";
+
+  src = fetchFromGitHub {
+    owner = "AcademySoftwareFoundation";
+    repo = "openexr";
+    rev = "v${version}";
+    hash = "sha256-ycn2RbHM/vIDUGGGnfNZ0Zm0qjjKRRNhkMD11PkpGF0=";
+  };
+
+  outputs = [ "bin" "dev" "out" "doc" ];
+
+  patches =
+    # Disable broken test on musl libc
+    # https://github.com/AcademySoftwareFoundation/openexr/issues/1556
+    lib.optional stdenv.hostPlatform.isMusl ./disable-iex-test.patch
+  ;
+
+  # tests are determined to use /var/tmp on unix
+  postPatch = ''
+    cat <(find . -name tmpDir.h) <(echo src/test/OpenEXRCoreTest/main.cpp) | while read -r f ; do
+      substituteInPlace $f --replace '/var/tmp' "$TMPDIR"
+    done
+  '';
+
+  cmakeFlags = lib.optional stdenv.hostPlatform.isStatic "-DCMAKE_SKIP_RPATH=ON";
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  propagatedBuildInputs = [ imath libdeflate ];
+
+  # Without 'sse' enforcement tests fail on i686 as due to excessive precision as:
+  #   error reading back channel B pixel 21,-76 got -nan expected -nan
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isi686 "-msse2 -mfpmath=sse";
+
+  # https://github.com/AcademySoftwareFoundation/openexr/issues/1400
+  doCheck = !stdenv.isAarch32;
+
+  meta = with lib; {
+    description = "A high dynamic-range (HDR) image file format";
+    homepage = "https://www.openexr.com";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ paperdigits ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/openexr/default.nix b/nixpkgs/pkgs/development/libraries/openexr/default.nix
new file mode 100644
index 000000000000..6d45ca33e982
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openexr/default.nix
@@ -0,0 +1,69 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, zlib
+, ilmbase
+, fetchpatch
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openexr";
+  version = "2.5.10";
+
+  outputs = [ "bin" "dev" "out" "doc" ];
+
+  src = fetchFromGitHub {
+    owner = "AcademySoftwareFoundation";
+    repo = "openexr";
+    rev = "v${version}";
+    hash = "sha256-xdC+T79ZQBx/XhuIXtP93Roj0N9lF+E65ReEKQ4kIsg=";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "CVE-2021-45942.patch";
+      url = "https://github.com/AcademySoftwareFoundation/openexr/commit/11cad77da87c4fa2aab7d58dd5339e254db7937e.patch";
+      stripLen = 4;
+      extraPrefix = "OpenEXR/IlmImf/";
+      sha256 = "1wa2jn6sa0n3phaqvklnlbgk1bz60y756ad4jk4d757pzpnannsy";
+    })
+    (fetchpatch {
+      name = "CVE-2021-3933.patch";
+      url = "https://github.com/AcademySoftwareFoundation/openexr/commit/5db6f7aee79e3e75e8c3780b18b28699614dd08e.patch";
+      stripLen = 4;
+      extraPrefix = "OpenEXR/IlmImf/";
+      sha256 = "sha256-DrpldpNgN5pWKzIuuPIrynGX3EpP8YhJlu+lLfNFGxQ=";
+    })
+
+    # GCC 13 fixes
+    ./gcc-13.patch
+  ];
+
+  postPatch = ''
+    # tests are determined to use /var/tmp on unix
+    find . -name tmpDir.h | while read -r f ; do
+      substituteInPlace $f --replace '/var/tmp' "$TMPDIR"
+    done
+    # On slower machines this test can take more than the default 1500 seconds
+    echo 'set_tests_properties(OpenEXR.IlmImf PROPERTIES TIMEOUT 3000)' >> OpenEXR/IlmImfTest/CMakeLists.txt
+  '';
+
+  cmakeFlags = [
+    "-DCMAKE_CTEST_ARGUMENTS=--timeout;3600"
+  ] ++ lib.optional stdenv.hostPlatform.isStatic "-DCMAKE_SKIP_RPATH=ON";
+
+  nativeBuildInputs = [ cmake ];
+  propagatedBuildInputs = [ ilmbase zlib ];
+
+  # https://github.com/AcademySoftwareFoundation/openexr/issues/1400
+  # https://github.com/AcademySoftwareFoundation/openexr/issues/1281
+  doCheck = !stdenv.isAarch32 && !stdenv.isi686;
+
+  meta = with lib; {
+    description = "A high dynamic-range (HDR) image file format";
+    homepage = "https://www.openexr.com/";
+    license = licenses.bsd3;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/openexr/disable-iex-test.patch b/nixpkgs/pkgs/development/libraries/openexr/disable-iex-test.patch
new file mode 100644
index 000000000000..f8fff65aceb4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openexr/disable-iex-test.patch
@@ -0,0 +1,13 @@
+diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt
+index 44d9185d..8ffcd2b2 100644
+--- a/src/test/CMakeLists.txt
++++ b/src/test/CMakeLists.txt
+@@ -4,7 +4,7 @@
+ # We require this to get object library link library support and
+ # combined python 2 + 3 support
+ 
+-add_subdirectory(IexTest)
++#add_subdirectory(IexTest)
+ add_subdirectory(OpenEXRCoreTest)
+ add_subdirectory(OpenEXRTest)
+ add_subdirectory(OpenEXRUtilTest)
diff --git a/nixpkgs/pkgs/development/libraries/openexr/gcc-13.patch b/nixpkgs/pkgs/development/libraries/openexr/gcc-13.patch
new file mode 100644
index 000000000000..6264a8df2433
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openexr/gcc-13.patch
@@ -0,0 +1,25 @@
+From 8aa103fe6e815514990e59708468eabc36f7f332 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=A9clairevoyant?=
+ <848000+eclairevoyant@users.noreply.github.com>
+Date: Fri, 5 Jan 2024 18:12:16 -0500
+Subject: [PATCH] gcc13
+
+---
+ OpenEXR/IlmImf/ImfTiledMisc.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/OpenEXR/IlmImf/ImfTiledMisc.cpp b/OpenEXR/IlmImf/ImfTiledMisc.cpp
+index 06ea3144..749537d4 100644
+--- a/OpenEXR/IlmImf/ImfTiledMisc.cpp
++++ b/OpenEXR/IlmImf/ImfTiledMisc.cpp
+@@ -46,6 +46,7 @@
+ #include <ImfTileDescription.h>
+ #include <algorithm>
+ #include <limits>
++#include <cstdint>
+ 
+ #include "ImfNamespace.h"
+ 
+-- 
+2.42.0
+
diff --git a/nixpkgs/pkgs/development/libraries/openexrid-unstable/default.nix b/nixpkgs/pkgs/development/libraries/openexrid-unstable/default.nix
new file mode 100644
index 000000000000..c961dfd069a6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openexrid-unstable/default.nix
@@ -0,0 +1,54 @@
+{ lib, stdenv, fetchFromGitHub, re2, openfx, zlib, ilmbase, libGLU, libGL, openexr }:
+
+stdenv.mkDerivation {
+  pname = "openexrid-unstable";
+  version = "2017-09-17";
+
+  src = fetchFromGitHub {
+    owner = "MercenariesEngineering";
+    repo = "openexrid";
+    rev = "bec0081548a096f9bcdd1504970c96264b0fc050";
+    sha256 = "0h4b74lv59p4hhrvrqdmlnchn2i0v5id4kl8xc7j26l9884q0383";
+  };
+
+  outputs = [ "dev" "out" "lib" ];
+
+  patches = [ ./openexrid.patch ];
+
+  postPatch = ''
+    substituteInPlace openexrid/makefile \
+        --replace g++ c++
+  '';
+
+  env.NIX_CFLAGS_COMPILE = ''-I${ilmbase.dev}/include/OpenEXR
+                       -I${openexr.dev}/include/OpenEXR
+                       -I${openfx.dev}/include/OpenFX
+                      '';
+
+  buildInputs = [ re2 openfx zlib ilmbase libGLU libGL openexr ];
+
+  enableParallelBuilding = true;
+
+  buildPhase = ''
+      mkdir openexrid/release
+
+      PREFIX=$out make -C openexrid install
+
+      mkdir $dev;
+      mkdir $lib;
+  '';
+
+  installPhase = ''
+      find $out
+      mv $out/include $dev/
+      mv $out/lib $lib/
+  '';
+
+  meta = with lib; {
+    description = "OpenEXR files able to isolate any object of a CG image with a perfect antialiazing";
+    homepage = "https://github.com/MercenariesEngineering/openexrid";
+    maintainers = [ maintainers.guibou ];
+    platforms = platforms.all;
+    license = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/openexrid-unstable/openexrid.patch b/nixpkgs/pkgs/development/libraries/openexrid-unstable/openexrid.patch
new file mode 100644
index 000000000000..bbbf75b575dc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openexrid-unstable/openexrid.patch
@@ -0,0 +1,35 @@
+diff --git a/makefile b/makefile
+index 7a92771..31ef664 100644
+--- a/makefile
++++ b/makefile
+@@ -8,8 +8,8 @@ _openexrid:
+ _openfx:
+ 	make -C openfx
+ 
+-_test: _openexrid
+-	make -C test
++#_test: _openexrid
++#	make -C test
+ 
+ clean:
+ 	make -C openfx clean
+diff --git a/makefile.config b/makefile.config
+index 0c6cdfa..0166c4c 100644
+--- a/makefile.config
++++ b/makefile.config
+@@ -4,7 +4,7 @@
+ 
+ PREFIX ?= ~/openexrid
+ 
+-OFX_INCLUDE ?= /usr/include/openfx
++OFX_INCLUDE ?= /usr/include/OpenFX
+ EXR_INCLUDE ?= /usr/include/OpenEXR
+ EXR_LIB ?= /usr/lib
+ RE2_INCLUDE ?= /usr/include
+@@ -13,5 +13,5 @@ RE2_LIB ?= /usr/lib
+ VERSION ?= release
+ CPPFLAGS += -O3 -Wall -DNDEBUG -fPIC -I $(EXR_INCLUDE) -I $(OFX_INCLUDE) -I $(RE2_INCLUDE) -Dlinux
+ LDFLAGS += -L$(EXR_LIB) -L$(RE2_LIB) -L../openexrid/$(VERSION) -lpthread
+-LDFLAGS += -Wl,-Bstatic -lopenexrid -lIlmImf -lIlmThread -lIex -lImath -lHalf -lz -lre2 -Wl,-Bdynamic
++LDFLAGS += -lopenexrid -lIlmImf -lIlmThread -lIex -lImath -lHalf -lz -lre2 -Wl,-Bdynamic
+ 
diff --git a/nixpkgs/pkgs/development/libraries/openfec/default.nix b/nixpkgs/pkgs/development/libraries/openfec/default.nix
new file mode 100644
index 000000000000..dd6b0ce10c0b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openfec/default.nix
@@ -0,0 +1,53 @@
+{ stdenv
+, lib
+, fetchzip
+, cmake
+, gitUpdater
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openfec";
+  version = "1.4.2.9";
+
+  src = fetchzip {
+    url = "https://github.com/roc-streaming/openfec/archive/refs/tags/v${version}.tar.gz";
+    hash = "sha256-A/U9Nh8tspRoT3bYePJLUrNa9jxiL0r2Xaf64wWbmVA=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  cmakeFlags = [ "-DDEBUG:STRING=OFF" ];
+
+  installPhase =
+    let so = stdenv.hostPlatform.extensions.sharedLibrary;
+    in ''
+      # This is pretty horrible but sadly there is not installation procedure
+      # provided.
+      mkdir -p $dev/include
+      cp -R ../src/* $dev/include
+      find $dev/include -type f -a ! -iname '*.h' -delete
+
+      install -D -m755 -t $out/lib ../bin/Release/libopenfec${so}
+    '' + lib.optionalString stdenv.isDarwin ''
+      install_name_tool -id $out/lib/libopenfec${so} $out/lib/libopenfec${so}
+    '' + ''
+      ln -s libopenfec${so} $out/lib/libopenfec${so}.1
+    '';
+
+  passthru.updateScript = gitUpdater {
+    url = "https://github.com/roc-streaming/openfec.git";
+    rev-prefix = "v";
+  };
+
+  meta = with lib; {
+    description = "Application-level Forward Erasure Correction codes";
+    homepage = "https://github.com/roc-streaming/openfec";
+    license = licenses.cecill-c;
+    maintainers = with maintainers; [ bgamari ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/openfst/default.nix b/nixpkgs/pkgs/development/libraries/openfst/default.nix
new file mode 100644
index 000000000000..cf4984229129
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openfst/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchurl, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "openfst";
+  version = "1.8.2";
+
+  src = fetchurl {
+    url = "http://www.openfst.org/twiki/pub/FST/FstDownload/${pname}-${version}.tar.gz";
+    sha256 = "sha256-3ph782JHIcXVujIa+VdRiY5PS7Qcijbi1k8GJ2Vti0I=";
+  };
+
+  configureFlags = [
+    "--enable-compact-fsts"
+    "--enable-compress"
+    "--enable-const-fsts"
+    "--enable-far"
+    "--enable-linear-fsts"
+    "--enable-lookahead-fsts"
+    "--enable-mpdt"
+    "--enable-ngram-fsts"
+    "--enable-pdt"
+  ];
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  meta = with lib; {
+    description = "Library for working with finite-state transducers";
+    longDescription = ''
+      Library for constructing, combining, optimizing, and searching weighted finite-state transducers (FSTs).
+      FSTs have key applications in speech recognition and synthesis, machine translation, optical character recognition,
+      pattern matching, string processing, machine learning, information extraction and retrieval among others
+    '';
+    homepage = "https://www.openfst.org/twiki/bin/view/FST/WebHome";
+    license = licenses.asl20;
+    maintainers = [ maintainers.dfordivam ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/openfx/default.nix b/nixpkgs/pkgs/development/libraries/openfx/default.nix
new file mode 100644
index 000000000000..2bfb08708588
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openfx/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation {
+  pname = "openfx";
+  version = "1.4";
+
+  src = fetchFromGitHub {
+    owner = "AcademySoftwareFoundation";
+    repo = "openfx";
+    rev = "OFX_Release_1_4_TAG";
+    sha256 = "0k9ggzr6bisn77mipjfvawg3mv4bz50b63v8f7w1jhldi1sfy548";
+  };
+
+  outputs = [ "dev" "out" ];
+
+  enableParallelBuilding = true;
+
+  buildPhase = ''
+      mkdir $dev
+      mkdir $out
+      '';
+
+  installPhase = ''
+     mkdir -p $dev/include/OpenFX/
+     cp -r include/* $dev/include/OpenFX/
+  '';
+
+  meta = with lib; {
+    description = "Image processing plug-in standard";
+    homepage = "https://openeffects.org/";
+    license = licenses.bsd3;
+    platforms = platforms.all;
+    maintainers = [ maintainers.guibou ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/opengrm-ngram/default.nix b/nixpkgs/pkgs/development/libraries/opengrm-ngram/default.nix
new file mode 100644
index 000000000000..b84e4159f3e7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opengrm-ngram/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, autoreconfHook, fetchurl, openfst }:
+
+stdenv.mkDerivation rec {
+  pname = "opengrm-ngram";
+  version = "1.3.14";
+
+  src = fetchurl {
+    url = "http://www.openfst.org/twiki/pub/GRM/NGramDownload/ngram-${version}.tar.gz";
+    sha256 = "sha256-ivMPDy6CPM17hWCToLOVzUgcWZiEt2pjYeizeBLYnYc=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  buildInputs = [ openfst ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Library to make and modify n-gram language models encoded as weighted finite-state transducers";
+    homepage = "https://www.openfst.org/twiki/bin/view/GRM/NGramLibrary";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ mic92 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/openh264/default.nix b/nixpkgs/pkgs/development/libraries/openh264/default.nix
new file mode 100644
index 000000000000..c250b31ecd71
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openh264/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, nasm, windows }:
+
+stdenv.mkDerivation rec {
+  pname = "openh264";
+  version = "2.4.0";
+
+  src = fetchFromGitHub {
+    owner = "cisco";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-vPVHXATsSWmqKOAj09WRR5jCi2NU2lq0j4K15KBzARY=";
+  };
+
+  nativeBuildInputs = [ nasm ];
+
+  buildInputs = lib.optional stdenv.hostPlatform.isWindows windows.pthreads;
+
+  makeFlags = [
+    "PREFIX=${placeholder "out"}"
+    "ARCH=${stdenv.hostPlatform.linuxArch}"
+  ] ++ lib.optional stdenv.hostPlatform.isWindows "OS=mingw_nt";
+
+  enableParallelBuilding = true;
+
+  hardeningDisable = lib.optional stdenv.hostPlatform.isWindows "stackprotector";
+
+  meta = with lib; {
+    description = "A codec library which supports H.264 encoding and decoding";
+    homepage = "https://www.openh264.org";
+    license = licenses.bsd2;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/openhmd/default.nix b/nixpkgs/pkgs/development/libraries/openhmd/default.nix
new file mode 100644
index 000000000000..ce0630bee62f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openhmd/default.nix
@@ -0,0 +1,64 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, hidapi
+, SDL2
+, libGL
+, glew
+, withExamples ? true
+}:
+
+let examplesOnOff = if withExamples then "ON" else "OFF"; in
+
+stdenv.mkDerivation rec {
+  pname = "openhmd";
+  version = "0.3.0";
+
+  src = fetchFromGitHub {
+    owner = "OpenHMD";
+    repo = "OpenHMD";
+    rev = version;
+    sha256 = "1hkpdl4zgycag5k8njvqpx01apxmm8m8pvhlsxgxpqiqy9a38ccg";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [
+    hidapi
+  ] ++ lib.optionals withExamples [
+    SDL2
+    glew
+    libGL
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_BOTH_STATIC_SHARED_LIBS=ON"
+    "-DOPENHMD_EXAMPLE_SIMPLE=${examplesOnOff}"
+    "-DOPENHMD_EXAMPLE_SDL=${examplesOnOff}"
+    "-DOpenGL_GL_PREFERENCE=GLVND"
+
+    # RPATH of binary /nix/store/.../bin/... contains a forbidden reference to /build/
+    "-DCMAKE_SKIP_BUILD_RPATH=ON"
+  ];
+
+  postInstall = lib.optionalString withExamples ''
+    mkdir -p $out/bin
+    install -D examples/simple/simple $out/bin/openhmd-example-simple
+    install -D examples/opengl/openglexample $out/bin/openhmd-example-opengl
+  '';
+
+  meta = with lib; {
+    homepage = "http://www.openhmd.net"; # https does not work
+    description = "Library API and drivers immersive technology";
+    longDescription = ''
+      OpenHMD is a very simple FLOSS C library and a set of drivers
+      for interfacing with Virtual Reality (VR) Headsets aka
+      Head-mounted Displays (HMDs), controllers and trackers like
+      Oculus Rift, HTC Vive, Windows Mixed Reality, and etc.
+    '';
+    license = licenses.boost;
+    maintainers = with maintainers; [ oxij ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/openimagedenoise/default.nix b/nixpkgs/pkgs/development/libraries/openimagedenoise/default.nix
new file mode 100644
index 000000000000..532ee7a09571
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openimagedenoise/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchzip, cmake, tbb, python3, ispc }:
+
+stdenv.mkDerivation rec {
+  pname = "openimagedenoise";
+  version = "1.4.3";
+
+  # The release tarballs include pretrained weights, which would otherwise need to be fetched with git-lfs
+  src = fetchzip {
+    url = "https://github.com/OpenImageDenoise/oidn/releases/download/v${version}/oidn-${version}.src.tar.gz";
+    sha256 = "sha256-i73w/Vkr5TPLB1ulPbPU4OVGwdNlky1brfarueD7akE=";
+  };
+
+  nativeBuildInputs = [ cmake python3 ispc ];
+  buildInputs = [ tbb ];
+
+  cmakeFlags = [
+    "-DTBB_ROOT=${tbb}"
+    "-DTBB_INCLUDE_DIR=${tbb.dev}/include"
+  ];
+
+  meta = with lib; {
+    homepage = "https://openimagedenoise.github.io";
+    description = "High-Performance Denoising Library for Ray Tracing";
+    license = licenses.asl20;
+    maintainers = [ maintainers.leshainc ];
+    platforms = platforms.unix;
+    changelog = "https://github.com/OpenImageDenoise/oidn/blob/v${version}/CHANGELOG.md";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/openimageio/default.nix b/nixpkgs/pkgs/development/libraries/openimageio/default.nix
new file mode 100644
index 000000000000..7d2e78794d8a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openimageio/default.nix
@@ -0,0 +1,76 @@
+{ lib, stdenv
+, fetchFromGitHub
+, boost
+, cmake
+, giflib
+, libjpeg
+, libpng
+, libtiff
+, opencolorio
+, openexr
+, robin-map
+, unzip
+, fmt
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openimageio";
+  version = "2.5.5.0";
+
+  src = fetchFromGitHub {
+    owner = "OpenImageIO";
+    repo = "oiio";
+    rev = "v${version}";
+    hash = "sha256-FtUZqk1m9ahdnwhrBeMFkUbV0dangMY/w9ShevCASfo=";
+  };
+
+  # Workaround broken zlib version detecion in CMake < 3.37.
+  postPatch = ''
+    substituteInPlace ./src/cmake/Config.cmake.in \
+      --replace " @ZLIB_VERSION@" ""
+  '';
+
+  outputs = [ "bin" "out" "dev" "doc" ];
+
+  nativeBuildInputs = [
+    cmake
+    unzip
+  ];
+
+  buildInputs = [
+    boost
+    giflib
+    libjpeg
+    libpng
+    libtiff
+    opencolorio
+    openexr
+    robin-map
+  ];
+
+  propagatedBuildInputs = [
+    fmt
+  ];
+
+  cmakeFlags = [
+    "-DUSE_PYTHON=OFF"
+    "-DUSE_QT=OFF"
+    # GNUInstallDirs
+    "-DCMAKE_INSTALL_LIBDIR=lib" # needs relative path for pkg-config
+    # Do not install a copy of fmt header files
+    "-DINTERNALIZE_FMT=OFF"
+  ];
+
+  postFixup = ''
+    substituteInPlace $dev/lib/cmake/OpenImageIO/OpenImageIOTargets-*.cmake \
+      --replace "\''${_IMPORT_PREFIX}/lib/lib" "$out/lib/lib"
+  '';
+
+  meta = with lib; {
+    homepage = "https://openimageio.org";
+    description = "A library and tools for reading and writing images";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ goibhniu ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/openjpeg/default.nix b/nixpkgs/pkgs/development/libraries/openjpeg/default.nix
new file mode 100644
index 000000000000..d528e2fc0302
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openjpeg/default.nix
@@ -0,0 +1,82 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, pkg-config
+, libdeflate, libpng, libtiff, zlib, lcms2, jpylyzer
+, jpipLibSupport ? false # JPIP library & executables
+, jpipServerSupport ? false, curl, fcgi # JPIP Server
+, jdk
+, poppler
+}:
+
+let
+  mkFlag = optSet: flag: "-D${flag}=${if optSet then "ON" else "OFF"}";
+in
+
+stdenv.mkDerivation rec {
+  pname = "openjpeg";
+  version = "2.5.0";
+
+  src = fetchFromGitHub {
+    owner = "uclouvain";
+    repo = "openjpeg";
+    rev = "v${version}";
+    sha256 = "sha256-/0o3Fl6/jx5zu854TCqMyOz/8mnEyEC9lpZ6ij/tbHc=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    # modernise cmake files, also fixes them for multiple outputs
+    # https://github.com/uclouvain/openjpeg/pull/1424
+    (fetchpatch {
+      name = "uclouvain-openjpeg-pull-1424.patch";
+      url = "https://github.com/uclouvain/openjpeg/compare/52927287402a9f7353de8854c88f931051211e2f...9d4f70cfe99626f82f9c8dcbf45f07709e3511b2.patch";
+      sha256 = "sha256-CxVRt1u4HVOMUjWiZ2plmZC29t/zshCpSY+N4Wlrlvg=";
+    })
+    # fix cmake files cross compilation
+    (fetchpatch {
+      url = "https://github.com/uclouvain/openjpeg/commit/c6ceb84c221b5094f1e8a4c0c247dee3fb5074e8.patch";
+      sha256 = "sha256-gBUtmO/7RwSWEl7rc8HGr8gNtvNFdhjEwm0Dd51p5O8=";
+    })
+  ];
+
+  cmakeFlags = [
+    "-DCMAKE_INSTALL_NAME_DIR=\${CMAKE_INSTALL_PREFIX}/lib"
+    "-DBUILD_SHARED_LIBS=ON"
+    "-DBUILD_CODEC=ON"
+    "-DBUILD_THIRDPARTY=OFF"
+    (mkFlag jpipLibSupport "BUILD_JPIP")
+    (mkFlag jpipServerSupport "BUILD_JPIP_SERVER")
+    "-DBUILD_VIEWER=OFF"
+    "-DBUILD_JAVA=OFF"
+    (mkFlag doCheck "BUILD_TESTING")
+  ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [ libpng libtiff zlib lcms2 ]
+    ++ lib.optionals jpipServerSupport [ curl fcgi ]
+    ++ lib.optional (jpipLibSupport) jdk;
+
+  doCheck = (!stdenv.isAarch64 && !stdenv.hostPlatform.isPower64); # tests fail on aarch64-linux and powerpc64
+  nativeCheckInputs = [ jpylyzer ];
+  checkPhase = ''
+    substituteInPlace ../tools/ctest_scripts/travis-ci.cmake \
+      --replace "JPYLYZER_EXECUTABLE=" "JPYLYZER_EXECUTABLE=\"$(command -v jpylyzer)\" # "
+    OPJ_SOURCE_DIR=.. ctest -S ../tools/ctest_scripts/travis-ci.cmake
+  '';
+
+  passthru = {
+    incDir = "openjpeg-${lib.versions.majorMinor version}";
+    tests = {
+      inherit poppler;
+    };
+  };
+
+  meta = with lib; {
+    description = "Open-source JPEG 2000 codec written in C language";
+    homepage = "https://www.openjpeg.org/";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ codyopel ];
+    platforms = platforms.all;
+    changelog = "https://github.com/uclouvain/openjpeg/blob/v${version}/CHANGELOG.md";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/openldap/default.nix b/nixpkgs/pkgs/development/libraries/openldap/default.nix
new file mode 100644
index 000000000000..aa04ff683bfd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openldap/default.nix
@@ -0,0 +1,141 @@
+{ lib
+, stdenv
+, fetchurl
+
+# dependencies
+, cyrus_sasl
+, groff
+, libsodium
+, libtool
+, openssl
+, systemdMinimal
+, libxcrypt
+
+# passthru
+, nixosTests
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openldap";
+  version = "2.6.7";
+
+  src = fetchurl {
+    url = "https://www.openldap.org/software/download/OpenLDAP/openldap-release/${pname}-${version}.tgz";
+    hash = "sha256-zXdfYlyUTteKPaGKA7A7CO6nPIqryXtBuzNumhCVSTA=";
+  };
+
+  # TODO: separate "out" and "bin"
+  outputs = [
+    "out"
+    "dev"
+    "man"
+    "devdoc"
+  ];
+
+  __darwinAllowLocalNetworking = true;
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [
+    groff
+  ];
+
+  buildInputs = [
+    (cyrus_sasl.override {
+      inherit openssl;
+    })
+    libsodium
+    libtool
+    openssl
+  ] ++ lib.optionals (stdenv.isLinux) [
+    libxcrypt # causes linking issues on *-darwin
+    systemdMinimal
+  ];
+
+  preConfigure = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") ''
+    MACOSX_DEPLOYMENT_TARGET=10.16
+  '';
+
+  configureFlags = [
+    "--enable-argon2"
+    "--enable-crypt"
+    "--enable-modules"
+    "--enable-overlays"
+  ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "--with-yielding_select=yes"
+    "ac_cv_func_memcmp_working=yes"
+  ] ++ lib.optional stdenv.isFreeBSD "--with-pic";
+
+  env.NIX_CFLAGS_COMPILE = toString [ "-DLDAPI_SOCK=\"/run/openldap/ldapi\"" ];
+
+  makeFlags= [
+    "CC=${stdenv.cc.targetPrefix}cc"
+    "STRIP="  # Disable install stripping as it breaks cross-compiling. We strip binaries anyway in fixupPhase.
+    "STRIP_OPTS="
+    "prefix=${placeholder "out"}"
+    "sysconfdir=/etc"
+    "systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
+    # contrib modules require these
+    "moduledir=${placeholder "out"}/lib/modules"
+    "mandir=${placeholder "out"}/share/man"
+  ];
+
+  extraContribModules = [
+    # https://git.openldap.org/openldap/openldap/-/tree/master/contrib/slapd-modules
+    "passwd/sha2"
+    "passwd/pbkdf2"
+    "passwd/totp"
+  ];
+
+  postBuild = ''
+    for module in $extraContribModules; do
+      make $makeFlags CC=$CC -C contrib/slapd-modules/$module
+    done
+  '';
+
+  preCheck = ''
+    substituteInPlace tests/scripts/all \
+      --replace "/bin/rm" "rm"
+
+    # skip flaky tests
+    rm -f tests/scripts/test063-delta-multiprovider
+
+    # https://bugs.openldap.org/show_bug.cgi?id=10009
+    # can probably be re-added once https://github.com/cyrusimap/cyrus-sasl/pull/772
+    # has made it to a release
+    rm -f tests/scripts/test076-authid-rewrite
+  '';
+
+  doCheck = true;
+
+  # The directory is empty and serve no purpose.
+  preFixup = ''
+    rm -r $out/var
+  '';
+
+  installFlags = [
+    "prefix=${placeholder "out"}"
+    "sysconfdir=${placeholder "out"}/etc"
+    "moduledir=${placeholder "out"}/lib/modules"
+    "INSTALL=install"
+  ];
+
+  postInstall = ''
+    for module in $extraContribModules; do
+      make $installFlags install -C contrib/slapd-modules/$module
+    done
+    chmod +x "$out"/lib/*.{so,dylib}
+  '';
+
+  passthru.tests = {
+    inherit (nixosTests) openldap;
+  };
+
+  meta = with lib; {
+    homepage = "https://www.openldap.org/";
+    description = "An open source implementation of the Lightweight Directory Access Protocol";
+    license = licenses.openldap;
+    maintainers = with maintainers; [ hexa ] ++ teams.helsinki-systems.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/openmpi/default.nix b/nixpkgs/pkgs/development/libraries/openmpi/default.nix
new file mode 100644
index 000000000000..8c54c13c9139
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openmpi/default.nix
@@ -0,0 +1,136 @@
+{ lib, stdenv, fetchurl, removeReferencesTo, gfortran, perl, libnl
+, rdma-core, zlib, numactl, libevent, hwloc, targetPackages, symlinkJoin
+, libpsm2, libfabric, pmix, ucx, ucc, makeWrapper
+, config
+# Enable CUDA support
+, cudaSupport ? config.cudaSupport, cudaPackages
+
+# Enable the Sun Grid Engine bindings
+, enableSGE ? false
+
+# Pass PATH/LD_LIBRARY_PATH to point to current mpirun by default
+, enablePrefix ? false
+
+# Enable libfabric support (necessary for Omnipath networks) on x86_64 linux
+, fabricSupport ? stdenv.isLinux && stdenv.isx86_64
+
+# Enable Fortran support
+, fortranSupport ? true
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openmpi";
+  version = "4.1.6";
+
+  src = with lib.versions; fetchurl {
+    url = "https://www.open-mpi.org/software/ompi/v${major version}.${minor version}/downloads/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-90CZRIVRbetjtTEa8SLCZRefUyig2FelZ7hdsAsR5BU=";
+  };
+
+  postPatch = ''
+    patchShebangs ./
+
+    # Ensure build is reproducible
+    ts=`date -d @$SOURCE_DATE_EPOCH`
+    sed -i 's/OPAL_CONFIGURE_USER=.*/OPAL_CONFIGURE_USER="nixbld"/' configure
+    sed -i 's/OPAL_CONFIGURE_HOST=.*/OPAL_CONFIGURE_HOST="localhost"/' configure
+    sed -i "s/OPAL_CONFIGURE_DATE=.*/OPAL_CONFIGURE_DATE=\"$ts\"/" configure
+    find -name "Makefile.in" -exec sed -i "s/\`date\`/$ts/" \{} \;
+  '';
+
+  outputs = [ "out" "man" "dev" ];
+
+  buildInputs = [ zlib ]
+    ++ lib.optionals stdenv.isLinux [ libnl numactl pmix ucx ucc ]
+    ++ lib.optionals cudaSupport [ cudaPackages.cuda_cudart ]
+    ++ [ libevent hwloc ]
+    ++ lib.optional (stdenv.isLinux || stdenv.isFreeBSD) rdma-core
+    ++ lib.optionals fabricSupport [ libpsm2 libfabric ];
+
+  nativeBuildInputs = [ perl removeReferencesTo makeWrapper ]
+    ++ lib.optionals cudaSupport [ cudaPackages.cuda_nvcc ]
+    ++ lib.optionals fortranSupport [ gfortran ];
+
+  configureFlags = lib.optional (!cudaSupport) "--disable-mca-dso"
+    ++ lib.optional (!fortranSupport) "--disable-mpi-fortran"
+    ++ lib.optionals stdenv.isLinux  [
+      "--with-libnl=${lib.getDev libnl}"
+      "--with-pmix=${lib.getDev pmix}"
+      "--with-pmix-libdir=${pmix}/lib"
+      "--enable-mpi-cxx"
+    ] ++ lib.optional enableSGE "--with-sge"
+    ++ lib.optional enablePrefix "--enable-mpirun-prefix-by-default"
+    # TODO: add UCX support, which is recommended to use with cuda for the most robust OpenMPI build
+    # https://github.com/openucx/ucx
+    # https://www.open-mpi.org/faq/?category=buildcuda
+    ++ lib.optionals cudaSupport [ "--with-cuda=${cudaPackages.cuda_cudart}" "--enable-dlopen" ]
+    ++ lib.optionals fabricSupport [ "--with-psm2=${lib.getDev libpsm2}" "--with-libfabric=${lib.getDev libfabric}" ]
+    ;
+
+  enableParallelBuilding = true;
+
+  postInstall = ''
+    find $out/lib/ -name "*.la" -exec rm -f \{} \;
+
+    for f in mpi shmem osh; do
+      for i in f77 f90 CC c++ cxx cc fort; do
+        moveToOutput "bin/$f$i" "''${!outputDev}"
+        echo "move $fi$i"
+        moveToOutput "share/openmpi/$f$i-wrapper-data.txt" "''${!outputDev}"
+      done
+    done
+
+    for i in ortecc orte-info ompi_info oshmem_info opal_wrapper; do
+      moveToOutput "bin/$i" "''${!outputDev}"
+    done
+
+    moveToOutput "share/openmpi/ortecc-wrapper-data.txt" "''${!outputDev}"
+   '';
+
+  postFixup = ''
+    remove-references-to -t $dev $(readlink -f $out/lib/libopen-pal${stdenv.hostPlatform.extensions.sharedLibrary})
+    remove-references-to -t $man $(readlink -f $out/lib/libopen-pal${stdenv.hostPlatform.extensions.sharedLibrary})
+
+    # The path to the wrapper is hard coded in libopen-pal.so, which we just cleared.
+    wrapProgram $dev/bin/opal_wrapper \
+      --set OPAL_INCLUDEDIR $dev/include \
+      --set OPAL_PKGDATADIR $dev/share/openmpi
+
+    # default compilers should be indentical to the
+    # compilers at build time
+
+    echo "$dev/share/openmpi/mpicc-wrapper-data.txt"
+    sed -i 's:compiler=.*:compiler=${targetPackages.stdenv.cc}/bin/${targetPackages.stdenv.cc.targetPrefix}cc:' \
+      $dev/share/openmpi/mpicc-wrapper-data.txt
+
+    echo "$dev/share/openmpi/ortecc-wrapper-data.txt"
+    sed -i 's:compiler=.*:compiler=${targetPackages.stdenv.cc}/bin/${targetPackages.stdenv.cc.targetPrefix}cc:' \
+       $dev/share/openmpi/ortecc-wrapper-data.txt
+
+    echo "$dev/share/openmpi/mpic++-wrapper-data.txt"
+    sed -i 's:compiler=.*:compiler=${targetPackages.stdenv.cc}/bin/${targetPackages.stdenv.cc.targetPrefix}c++:' \
+       $dev/share/openmpi/mpic++-wrapper-data.txt
+  '' + lib.optionalString fortranSupport ''
+
+    echo "$dev/share/openmpi/mpifort-wrapper-data.txt"
+    sed -i 's:compiler=.*:compiler=${gfortran}/bin/${gfortran.targetPrefix}gfortran:'  \
+       $dev/share/openmpi/mpifort-wrapper-data.txt
+
+  '';
+
+  doCheck = true;
+
+  passthru = {
+    inherit cudaSupport;
+    cudatoolkit = cudaPackages.cudatoolkit; # For backward compatibility only
+  };
+
+  meta = with lib; {
+    homepage = "https://www.open-mpi.org/";
+    description = "Open source MPI-3 implementation";
+    longDescription = "The Open MPI Project is an open source MPI-3 implementation that is developed and maintained by a consortium of academic, research, and industry partners. Open MPI is therefore able to combine the expertise, technologies, and resources from all across the High Performance Computing community in order to build the best MPI library available. Open MPI offers advantages for system and software vendors, application developers and computer science researchers.";
+    maintainers = with maintainers; [ markuskowa ];
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/openpa/default.nix b/nixpkgs/pkgs/development/libraries/openpa/default.nix
new file mode 100644
index 000000000000..23f025e2aa63
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openpa/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchurl, file }:
+
+stdenv.mkDerivation rec {
+  pname = "openpa";
+  version = "1.0.4";
+
+  src = fetchurl {
+    url = "https://trac.mpich.org/projects/${pname}/raw-attachment/wiki/Downloads/${pname}-${version}.tar.gz";
+    sha256 = "0flyi596hm6fv7xyw2iykx3s65p748s62bf15624xcnwpfrh8ncy";
+  };
+
+  prePatch = "substituteInPlace configure --replace /usr/bin/file ${file}/bin/file";
+
+  doCheck = true;
+
+  meta = {
+    description = "Atomic primitives for high performance, concurrent software";
+    homepage = "https://trac.mpich.org/projects/openpa";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ leenaars ];
+    platforms = lib.platforms.unix;
+    longDescription = ''
+      OPA (or sometimes OpenPA or Open Portable Atomics) is an
+      open source library intended to provide a consistent C API for performing
+      atomic operations on a variety of platforms. The main goal of the project is to
+      enable the portable usage of atomic operations in concurrent software.
+      Developers of client software can worry about implementing and improving their
+      concurrent algorithms instead of fiddling with inline assembly syntax and
+      learning new assembly dialects in order improve or maintain application
+      portability.
+    '';
+   };
+}
diff --git a/nixpkgs/pkgs/development/libraries/openpam/default.nix b/nixpkgs/pkgs/development/libraries/openpam/default.nix
new file mode 100644
index 000000000000..3d1cff05a085
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openpam/default.nix
@@ -0,0 +1,19 @@
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  pname = "openpam";
+  version = "20170430";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/openpam/openpam/Resedacea/${pname}-${version}.tar.gz";
+    sha256 = "0pz8kf9mxj0k8yp8jgmhahddz58zv2b7gnyjwng75xgsx4i55xi2";
+  };
+
+  meta = with lib; {
+    homepage = "https://www.openpam.org";
+    description = "An open source PAM library that focuses on simplicity, correctness, and cleanliness";
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ matthewbauer ];
+    license = licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/opensaml-cpp/default.nix b/nixpkgs/pkgs/development/libraries/opensaml-cpp/default.nix
new file mode 100644
index 000000000000..9e8ab07b3aa4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opensaml-cpp/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchgit, autoreconfHook, pkg-config
+, boost, openssl, log4shib, xercesc, xml-security-c, xml-tooling-c, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "opensaml-cpp";
+  version = "3.0.1";
+
+  src = fetchgit {
+    url = "https://git.shibboleth.net/git/cpp-opensaml.git";
+    rev = version;
+    sha256 = "0ms3sqmwqkrqb92d7jy2hqwnz5yd7cbrz73n321jik0jilrwl5w8";
+  };
+
+  buildInputs = [
+    boost openssl log4shib xercesc xml-security-c xml-tooling-c zlib
+  ];
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  configureFlags = [ "--with-xmltooling=${xml-tooling-c}" ];
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString (!stdenv.isDarwin) "-std=c++14";
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage    = "https://shibboleth.net/products/opensaml-cpp.html";
+    description = "A low-level library written in C++ that provides support for producing and consuming SAML messages";
+    platforms   = platforms.unix;
+    license     = licenses.asl20;
+    maintainers = [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/openscenegraph/default.nix b/nixpkgs/pkgs/development/libraries/openscenegraph/default.nix
new file mode 100644
index 000000000000..62f45de2bebf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openscenegraph/default.nix
@@ -0,0 +1,93 @@
+{ stdenv, lib, fetchFromGitHub, fetchpatch, fetchurl, cmake, pkg-config, doxygen,
+  libX11, libXinerama, libXrandr, libGLU, libGL,
+  glib, libxml2, pcre, zlib,
+  AGL, Accelerate, Carbon, Cocoa, Foundation,
+  boost,
+  jpegSupport ? true, libjpeg,
+  exrSupport ? false, openexr_3,
+  gifSupport ? true, giflib,
+  pngSupport ? true, libpng,
+  tiffSupport ? true, libtiff,
+  gdalSupport ? false, gdal,
+  curlSupport ? true, curl,
+  colladaSupport ? false, collada-dom,
+  opencascadeSupport ? false, opencascade-occt,
+  ffmpegSupport ? false, ffmpeg,
+  nvttSupport ? false, nvidia-texture-tools,
+  freetypeSupport ? true, freetype,
+  svgSupport ? false, librsvg,
+  pdfSupport ? false, poppler,
+  vncSupport ? false, libvncserver,
+  lasSupport ? false, libLAS,
+  luaSupport ? false, lua,
+  sdlSupport ? false, SDL2,
+  restSupport ? false, asio,
+  withApps ? false,
+  withExamples ? false, fltk,
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openscenegraph";
+  version = "3.6.5";
+
+  src = fetchFromGitHub {
+    owner = "openscenegraph";
+    repo = "OpenSceneGraph";
+    rev = "OpenSceneGraph-${version}";
+    sha256 = "00i14h82qg3xzcyd8p02wrarnmby3aiwmz0z43l50byc9f8i05n1";
+  };
+
+  nativeBuildInputs = [ pkg-config cmake doxygen ];
+
+  buildInputs = lib.optionals (!stdenv.isDarwin) [
+    libX11 libXinerama libXrandr libGLU libGL
+  ] ++ [
+    glib libxml2 pcre zlib
+  ] ++ lib.optional jpegSupport libjpeg
+    ++ lib.optional exrSupport openexr_3
+    ++ lib.optional gifSupport giflib
+    ++ lib.optional pngSupport libpng
+    ++ lib.optional tiffSupport libtiff
+    ++ lib.optional gdalSupport gdal
+    ++ lib.optional curlSupport curl
+    ++ lib.optional colladaSupport collada-dom
+    ++ lib.optional opencascadeSupport opencascade-occt
+    ++ lib.optional ffmpegSupport ffmpeg
+    ++ lib.optional nvttSupport nvidia-texture-tools
+    ++ lib.optional freetypeSupport freetype
+    ++ lib.optional svgSupport librsvg
+    ++ lib.optional pdfSupport poppler
+    ++ lib.optional vncSupport libvncserver
+    ++ lib.optional lasSupport libLAS
+    ++ lib.optional luaSupport lua
+    ++ lib.optional sdlSupport SDL2
+    ++ lib.optional restSupport asio
+    ++ lib.optionals withExamples [ fltk ]
+    ++ lib.optionals (!stdenv.isDarwin) [  ]
+    ++ lib.optionals stdenv.isDarwin [ AGL Accelerate Carbon Cocoa Foundation ]
+    ++ lib.optional (restSupport || colladaSupport) boost
+    ;
+
+  patches = [
+    (fetchpatch {
+      name = "opencascade-api-patch";
+      url = "https://github.com/openscenegraph/OpenSceneGraph/commit/bc2daf9b3239c42d7e51ecd7947d31a92a7dc82b.patch";
+      hash = "sha256-VR8YKOV/YihB5eEGZOGaIfJNrig1EPS/PJmpKsK284c=";
+    })
+    # OpenEXR 3 support: https://github.com/openscenegraph/OpenSceneGraph/issues/1075
+    (fetchurl {
+      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-games/openscenegraph/files/openscenegraph-3.6.5-openexr3.patch?id=0f642d8f09b589166f0e0c0fc84df7673990bf3f";
+      hash = "sha256-fdNbkg6Vp7DeDBTe5Zso8qJ5v9uPSXHpQ5XlGkvputk=";
+    })
+  ];
+
+  cmakeFlags = lib.optional (!withApps) "-DBUILD_OSG_APPLICATIONS=OFF" ++ lib.optional withExamples "-DBUILD_OSG_EXAMPLES=ON";
+
+  meta = with lib; {
+    description = "A 3D graphics toolkit";
+    homepage = "http://www.openscenegraph.org/";
+    maintainers = with maintainers; [ aanderse raskin ];
+    platforms = with platforms; linux ++ darwin;
+    license = "OpenSceneGraph Public License - free LGPL-based license";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/openslide/default.nix b/nixpkgs/pkgs/development/libraries/openslide/default.nix
new file mode 100644
index 000000000000..71c2017f9e5a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openslide/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook
+, pkg-config, cairo, glib, gdk-pixbuf, libjpeg
+, libpng, libtiff, libxml2, openjpeg, sqlite, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openslide";
+  version = "3.4.1";
+
+  src = fetchFromGitHub {
+    owner = "openslide";
+    repo = "openslide";
+    rev = "v${version}";
+    sha256 = "1g4hhjr4cbx754cwi9wl84k33bkg232w8ajic7aqhzm8x182hszp";
+  };
+
+  buildInputs = [ cairo glib gdk-pixbuf libjpeg libpng libtiff libxml2 openjpeg sqlite zlib ];
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  meta = with lib; {
+    homepage = "https://openslide.org";
+    description = "A C library that provides a simple interface to read whole-slide images.";
+    license = licenses.lgpl21;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ lromor ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/openslp/CVE-2016-4912.patch b/nixpkgs/pkgs/development/libraries/openslp/CVE-2016-4912.patch
new file mode 100644
index 000000000000..06223deda89b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openslp/CVE-2016-4912.patch
@@ -0,0 +1,11 @@
+--- a/common/slp_xmalloc.c
++++ b/common/slp_xmalloc.c
+@@ -206,7 +206,7 @@ void * _xrealloc(const char * file, int line, void * ptr, size_t size)
+          if (newptr == 0)
+             return 0;
+          memcpy(newptr, ptr, x->size);
+-         _xfree(file, line, x);
++         _xfree(file, line, ptr);
+       }
+       return newptr;
+    }
diff --git a/nixpkgs/pkgs/development/libraries/openslp/CVE-2019-5544.patch b/nixpkgs/pkgs/development/libraries/openslp/CVE-2019-5544.patch
new file mode 100644
index 000000000000..2afc0aed3302
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openslp/CVE-2019-5544.patch
@@ -0,0 +1,165 @@
+diff -ur openslp-2.0.0.orig/common/slp_buffer.c openslp-2.0.0/common/slp_buffer.c
+--- openslp-2.0.0.orig/common/slp_buffer.c	2012-12-10 15:31:53.000000000 -0800
++++ openslp-2.0.0/common/slp_buffer.c	2019-11-26 21:54:20.000000000 -0800
+@@ -30,6 +30,13 @@
+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  *-------------------------------------------------------------------------*/
+ 
++/* Copyright (c) 2019 VMware, Inc.
++ * SPDX-License-Identifier: BSD-3-Clause
++ * This file is provided under the BSD-3-Clause license.
++ * See COPYING file for more details and other copyrights
++ * that may apply.
++ */
++
+ /** Functions for managing SLP message buffers.
+  *
+  * This file provides a higher level abstraction over malloc and free that
+@@ -153,4 +160,20 @@
+    xfree(buf);
+ }
+ 
++/** Report remaining free buffer size in bytes.
++ *
++ * Check if buffer is allocated and if so return bytes left in a
++ * @c SLPBuffer object.
++ *
++ * @param[in] buf The SLPBuffer to be freed.
++ */
++size_t
++RemainingBufferSpace(SLPBuffer buf)
++{
++   if (buf->allocated == 0) {
++      return 0;
++   }
++   return buf->end - buf->curpos;
++}
++
+ /*=========================================================================*/
+diff -ur openslp-2.0.0.orig/common/slp_buffer.h openslp-2.0.0/common/slp_buffer.h
+--- openslp-2.0.0.orig/common/slp_buffer.h	2012-11-28 09:07:04.000000000 -0800
++++ openslp-2.0.0/common/slp_buffer.h	2019-11-26 21:54:32.000000000 -0800
+@@ -30,6 +30,13 @@
+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  *-------------------------------------------------------------------------*/
+ 
++/* Copyright (c) 2019 VMware, Inc.
++ * SPDX-License-Identifier: BSD-3-Clause
++ * This file is provided under the BSD-3-Clause license.
++ * See COPYING file for more details and other copyrights
++ * that may apply.
++ */
++
+ /** Header file that defines SLP message buffer management routines.
+  *
+  * Includes structures, constants and functions that used to handle memory 
+@@ -78,6 +85,8 @@
+ 
+ SLPBuffer SLPBufferListAdd(SLPBuffer * list, SLPBuffer buf);
+ 
++size_t RemainingBufferSpace(SLPBuffer buf);
++
+ /*! @} */
+ 
+ #endif /* SLP_BUFFER_H_INCLUDED */
+diff -ur openslp-2.0.0.orig/slpd/slpd_process.c openslp-2.0.0/slpd/slpd_process.c
+--- openslp-2.0.0.orig/slpd/slpd_process.c	2012-12-12 09:38:54.000000000 -0800
++++ openslp-2.0.0/slpd/slpd_process.c	2019-11-26 21:55:10.000000000 -0800
+@@ -30,6 +30,13 @@
+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  *-------------------------------------------------------------------------*/
+ 
++/* Copyright (c) 2019 VMware, Inc.
++ * SPDX-License-Identifier: BSD-3-Clause
++ * This file is provided under the BSD-3-Clause license.
++ * See COPYING file for more details and other copyrights
++ * that may apply.
++ */
++
+ /** Processes incoming SLP messages.
+  *
+  * @file       slpd_process.c
+@@ -514,13 +521,27 @@
+    {
+       for (i = 0; i < db->urlcount; i++)
+       {
+-         /* urlentry is the url from the db result */
+          urlentry = db->urlarray[i];
++         if (urlentry->opaque != NULL) {
++            const int64_t newsize = size + urlentry->opaquelen;
++            if (urlentry->opaquelen <= 0 || newsize > INT_MAX)
++            {
++               SLPDLog("Invalid opaquelen %d or sizeo of opaque url is too big, size=%d\n",
++                       urlentry->opaquelen, size);
++               errorcode = SLP_ERROR_PARSE_ERROR;
++               goto FINISHED;
++            }
++            size +=  urlentry->opaquelen;
++         }
++         else
++         {
++            /* urlentry is the url from the db result */
++            size += urlentry->urllen + 6; /*  1 byte for reserved  */
++                                          /*  2 bytes for lifetime */
++                                          /*  2 bytes for urllen   */
++                                          /*  1 byte for authcount */
++          }
+ 
+-         size += urlentry->urllen + 6; /*  1 byte for reserved  */
+-                                       /*  2 bytes for lifetime */
+-                                       /*  2 bytes for urllen   */
+-                                       /*  1 byte for authcount */
+ #ifdef ENABLE_SLPv2_SECURITY
+          /* make room to include the authblock that was asked for */
+          if (G_SlpdProperty.securityEnabled
+@@ -594,7 +615,7 @@
+          urlentry = db->urlarray[i];
+ 
+ #ifdef ENABLE_SLPv1
+-         if (urlentry->opaque == 0)
++         if (urlentry->opaque == NULL)
+          {
+             /* url-entry reserved */
+             *result->curpos++ = 0;
+@@ -606,8 +627,18 @@
+             PutUINT16(&result->curpos, urlentry->urllen);
+ 
+             /* url-entry url */
+-            memcpy(result->curpos, urlentry->url, urlentry->urllen);
+-            result->curpos += urlentry->urllen;
++            if (RemainingBufferSpace(result) >= urlentry->urllen)
++            {
++               memcpy(result->curpos, urlentry->url, urlentry->urllen);
++               result->curpos = result->curpos + urlentry->urllen;
++            }
++            else
++            {
++                SLPDLog("Url too big (ask: %d have %" PRId64 "), failing request\n",
++                        urlentry->opaquelen, (int64_t) RemainingBufferSpace(result));
++                errorcode = SLP_ERROR_PARSE_ERROR;
++                goto FINISHED;
++            }
+ 
+             /* url-entry auths */
+             *result->curpos++ = 0;
+@@ -621,8 +652,18 @@
+ 
+             /* TRICKY: Fix up the lifetime. */
+             TO_UINT16(urlentry->opaque + 1, urlentry->lifetime);
+-            memcpy(result->curpos, urlentry->opaque, urlentry->opaquelen);
+-            result->curpos += urlentry->opaquelen;
++            if (RemainingBufferSpace(result) >= urlentry->opaquelen)
++            {
++               memcpy(result->curpos, urlentry->opaque, urlentry->opaquelen);
++               result->curpos = result->curpos + urlentry->opaquelen;
++             }
++             else
++             {
++               SLPDLog("Opaque Url too big (ask: %d have %" PRId64 "), failing request\n",
++                       urlentry->opaquelen, (int64_t) RemainingBufferSpace(result));
++               errorcode = SLP_ERROR_PARSE_ERROR;
++               goto FINISHED;
++             }
+          }
+       }
+    }
diff --git a/nixpkgs/pkgs/development/libraries/openslp/default.nix b/nixpkgs/pkgs/development/libraries/openslp/default.nix
new file mode 100644
index 000000000000..6e03138adfae
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openslp/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchurl, fetchpatch }:
+
+stdenv.mkDerivation rec {
+  pname = "openslp";
+  version = "2.0.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/openslp/${version}/${version}/openslp-${version}.tar.gz";
+    sha256 = "16splwmqp0400w56297fkipaq9vlbhv7hapap8z09gp5m2i3fhwj";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "openslp-2.0.0-null-pointer-deref.patch";
+      url = "https://src.fedoraproject.org/rpms/openslp/raw/696fd55ae4fcea7beda0a25131dca8bfb14bbdf9/f/openslp-2.0.0-null-pointer-deref.patch";
+      sha256 = "186f3rj3z2lf5h1lpbhqk0szj2a9far1p3mjqg6422f29yjfnz6a";
+    })
+    (fetchpatch {
+      name = "openslp-2.0.0-CVE-2016-7567.patch";
+      url = "https://src.fedoraproject.org/rpms/openslp/raw/696fd55ae4fcea7beda0a25131dca8bfb14bbdf9/f/openslp-2.0.0-cve-2016-7567.patch";
+      sha256 = "0zp61axx93b7nrbsyhn2x4dnw7n9y6g4rys21hyqxk4khrnc2yr9";
+    })
+    ./CVE-2016-4912.patch
+    ./CVE-2019-5544.patch
+  ];
+
+  meta = with lib; {
+    homepage = "http://www.openslp.org/";
+    description = "An open-source implementation of the IETF Service Location Protocol";
+    maintainers = with maintainers; [ ttuegel ];
+    license = licenses.bsd3;
+    platforms = platforms.all;
+    # never built on aarch64-darwin since first introduction in nixpkgs
+    broken = stdenv.isDarwin && stdenv.isAarch64;
+    knownVulnerabilities = [
+      "CVE-2023-29552: UDP Reflection Attack with ampliciation factor of up to 2200"
+    ];
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/openssl/1.1/nix-ssl-cert-file.patch b/nixpkgs/pkgs/development/libraries/openssl/1.1/nix-ssl-cert-file.patch
new file mode 100644
index 000000000000..9e871cfb1d31
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openssl/1.1/nix-ssl-cert-file.patch
@@ -0,0 +1,15 @@
+diff --git a/crypto/x509/by_file.c b/crypto/x509/by_file.c
+index 244512c935..f0b70d7ea1 100644
+--- a/crypto/x509/by_file.c
++++ b/crypto/x509/by_file.c
+@@ -46,7 +46,9 @@ static int by_file_ctrl(X509_LOOKUP *ctx, int cmd, const char *argp,
+     switch (cmd) {
+     case X509_L_FILE_LOAD:
+         if (argl == X509_FILETYPE_DEFAULT) {
+-            file = ossl_safe_getenv(X509_get_default_cert_file_env());
++            file = ossl_safe_getenv("NIX_SSL_CERT_FILE");
++            if (!file)
++                file = ossl_safe_getenv(X509_get_default_cert_file_env());
+             if (file)
+                 ok = (X509_load_cert_crl_file(ctx, file,
+                                               X509_FILETYPE_PEM) != 0);
diff --git a/nixpkgs/pkgs/development/libraries/openssl/3.0/legacy.cnf b/nixpkgs/pkgs/development/libraries/openssl/3.0/legacy.cnf
new file mode 100644
index 000000000000..a6485a8c3796
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openssl/3.0/legacy.cnf
@@ -0,0 +1,395 @@
+# Taken from OpenSSL 3.0.7 and modified according to: https://wiki.openssl.org/index.php/OpenSSL_3.0#Programming_in_OpenSSL_3.0
+#
+# OpenSSL example configuration file.
+# See doc/man5/config.pod for more info.
+#
+# This is mostly being used for generation of certificate requests,
+# but may be used for auto loading of providers
+
+# Note that you can include other files from the main configuration
+# file using the .include directive.
+#.include filename
+
+# This definition stops the following lines choking if HOME isn't
+# defined.
+HOME			= .
+
+ # Use this in order to automatically load providers.
+openssl_conf = openssl_init
+
+# Comment out the next line to ignore configuration errors
+config_diagnostics = 1
+
+# Extra OBJECT IDENTIFIER info:
+# oid_file       = $ENV::HOME/.oid
+oid_section = new_oids
+
+# To use this configuration file with the "-extfile" option of the
+# "openssl x509" utility, name here the section containing the
+# X.509v3 extensions to use:
+# extensions		=
+# (Alternatively, use a configuration file that has only
+# X.509v3 extensions in its main [= default] section.)
+
+[ new_oids ]
+# We can add new OIDs in here for use by 'ca', 'req' and 'ts'.
+# Add a simple OID like this:
+# testoid1=1.2.3.4
+# Or use config file substitution like this:
+# testoid2=${testoid1}.5.6
+
+# Policies used by the TSA examples.
+tsa_policy1 = 1.2.3.4.1
+tsa_policy2 = 1.2.3.4.5.6
+tsa_policy3 = 1.2.3.4.5.7
+
+# For FIPS
+# Optionally include a file that is generated by the OpenSSL fipsinstall
+# application. This file contains configuration data required by the OpenSSL
+# fips provider. It contains a named section e.g. [fips_sect] which is
+# referenced from the [provider_sect] below.
+# Refer to the OpenSSL security policy for more information.
+# .include fipsmodule.cnf
+
+[openssl_init]
+providers = provider_sect
+
+# List of providers to load
+[provider_sect]
+default = default_sect
+legacy = legacy_sect
+
+# The fips section name should match the section name inside the
+# included fipsmodule.cnf.
+# fips = fips_sect
+
+# If no providers are activated explicitly, the default one is activated implicitly.
+# See man 7 OSSL_PROVIDER-default for more details.
+#
+# If you add a section explicitly activating any other provider(s), you most
+# probably need to explicitly activate the default provider, otherwise it
+# becomes unavailable in openssl.  As a consequence applications depending on
+# OpenSSL may not work correctly which could lead to significant system
+# problems including inability to remotely access the system.
+[default_sect]
+activate = 1
+
+[legacy_sect]
+activate = 1
+
+####################################################################
+[ ca ]
+default_ca	= CA_default		# The default ca section
+
+####################################################################
+[ CA_default ]
+
+dir		= ./demoCA		# Where everything is kept
+certs		= $dir/certs		# Where the issued certs are kept
+crl_dir		= $dir/crl		# Where the issued crl are kept
+database	= $dir/index.txt	# database index file.
+#unique_subject	= no			# Set to 'no' to allow creation of
+					# several certs with same subject.
+new_certs_dir	= $dir/newcerts		# default place for new certs.
+
+certificate	= $dir/cacert.pem 	# The CA certificate
+serial		= $dir/serial 		# The current serial number
+crlnumber	= $dir/crlnumber	# the current crl number
+					# must be commented out to leave a V1 CRL
+crl		= $dir/crl.pem 		# The current CRL
+private_key	= $dir/private/cakey.pem# The private key
+
+x509_extensions	= usr_cert		# The extensions to add to the cert
+
+# Comment out the following two lines for the "traditional"
+# (and highly broken) format.
+name_opt 	= ca_default		# Subject Name options
+cert_opt 	= ca_default		# Certificate field options
+
+# Extension copying option: use with caution.
+# copy_extensions = copy
+
+# Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs
+# so this is commented out by default to leave a V1 CRL.
+# crlnumber must also be commented out to leave a V1 CRL.
+# crl_extensions	= crl_ext
+
+default_days	= 365			# how long to certify for
+default_crl_days= 30			# how long before next CRL
+default_md	= default		# use public key default MD
+preserve	= no			# keep passed DN ordering
+
+# A few difference way of specifying how similar the request should look
+# For type CA, the listed attributes must be the same, and the optional
+# and supplied fields are just that :-)
+policy		= policy_match
+
+# For the CA policy
+[ policy_match ]
+countryName		= match
+stateOrProvinceName	= match
+organizationName	= match
+organizationalUnitName	= optional
+commonName		= supplied
+emailAddress		= optional
+
+# For the 'anything' policy
+# At this point in time, you must list all acceptable 'object'
+# types.
+[ policy_anything ]
+countryName		= optional
+stateOrProvinceName	= optional
+localityName		= optional
+organizationName	= optional
+organizationalUnitName	= optional
+commonName		= supplied
+emailAddress		= optional
+
+####################################################################
+[ req ]
+default_bits		= 2048
+default_keyfile 	= privkey.pem
+distinguished_name	= req_distinguished_name
+attributes		= req_attributes
+x509_extensions	= v3_ca	# The extensions to add to the self signed cert
+
+# Passwords for private keys if not present they will be prompted for
+# input_password = secret
+# output_password = secret
+
+# This sets a mask for permitted string types. There are several options.
+# default: PrintableString, T61String, BMPString.
+# pkix	 : PrintableString, BMPString (PKIX recommendation before 2004)
+# utf8only: only UTF8Strings (PKIX recommendation after 2004).
+# nombstr : PrintableString, T61String (no BMPStrings or UTF8Strings).
+# MASK:XXXX a literal mask value.
+# WARNING: ancient versions of Netscape crash on BMPStrings or UTF8Strings.
+string_mask = utf8only
+
+# req_extensions = v3_req # The extensions to add to a certificate request
+
+[ req_distinguished_name ]
+countryName			= Country Name (2 letter code)
+countryName_default		= AU
+countryName_min			= 2
+countryName_max			= 2
+
+stateOrProvinceName		= State or Province Name (full name)
+stateOrProvinceName_default	= Some-State
+
+localityName			= Locality Name (eg, city)
+
+0.organizationName		= Organization Name (eg, company)
+0.organizationName_default	= Internet Widgits Pty Ltd
+
+# we can do this but it is not needed normally :-)
+#1.organizationName		= Second Organization Name (eg, company)
+#1.organizationName_default	= World Wide Web Pty Ltd
+
+organizationalUnitName		= Organizational Unit Name (eg, section)
+#organizationalUnitName_default	=
+
+commonName			= Common Name (e.g. server FQDN or YOUR name)
+commonName_max			= 64
+
+emailAddress			= Email Address
+emailAddress_max		= 64
+
+# SET-ex3			= SET extension number 3
+
+[ req_attributes ]
+challengePassword		= A challenge password
+challengePassword_min		= 4
+challengePassword_max		= 20
+
+unstructuredName		= An optional company name
+
+[ usr_cert ]
+
+# These extensions are added when 'ca' signs a request.
+
+# This goes against PKIX guidelines but some CAs do it and some software
+# requires this to avoid interpreting an end user certificate as a CA.
+
+basicConstraints=CA:FALSE
+
+# This is typical in keyUsage for a client certificate.
+# keyUsage = nonRepudiation, digitalSignature, keyEncipherment
+
+# PKIX recommendations harmless if included in all certificates.
+subjectKeyIdentifier=hash
+authorityKeyIdentifier=keyid,issuer
+
+# This stuff is for subjectAltName and issuerAltname.
+# Import the email address.
+# subjectAltName=email:copy
+# An alternative to produce certificates that aren't
+# deprecated according to PKIX.
+# subjectAltName=email:move
+
+# Copy subject details
+# issuerAltName=issuer:copy
+
+# This is required for TSA certificates.
+# extendedKeyUsage = critical,timeStamping
+
+[ v3_req ]
+
+# Extensions to add to a certificate request
+
+basicConstraints = CA:FALSE
+keyUsage = nonRepudiation, digitalSignature, keyEncipherment
+
+[ v3_ca ]
+
+
+# Extensions for a typical CA
+
+
+# PKIX recommendation.
+
+subjectKeyIdentifier=hash
+
+authorityKeyIdentifier=keyid:always,issuer
+
+basicConstraints = critical,CA:true
+
+# Key usage: this is typical for a CA certificate. However since it will
+# prevent it being used as an test self-signed certificate it is best
+# left out by default.
+# keyUsage = cRLSign, keyCertSign
+
+# Include email address in subject alt name: another PKIX recommendation
+# subjectAltName=email:copy
+# Copy issuer details
+# issuerAltName=issuer:copy
+
+# DER hex encoding of an extension: beware experts only!
+# obj=DER:02:03
+# Where 'obj' is a standard or added object
+# You can even override a supported extension:
+# basicConstraints= critical, DER:30:03:01:01:FF
+
+[ crl_ext ]
+
+# CRL extensions.
+# Only issuerAltName and authorityKeyIdentifier make any sense in a CRL.
+
+# issuerAltName=issuer:copy
+authorityKeyIdentifier=keyid:always
+
+[ proxy_cert_ext ]
+# These extensions should be added when creating a proxy certificate
+
+# This goes against PKIX guidelines but some CAs do it and some software
+# requires this to avoid interpreting an end user certificate as a CA.
+
+basicConstraints=CA:FALSE
+
+# This is typical in keyUsage for a client certificate.
+# keyUsage = nonRepudiation, digitalSignature, keyEncipherment
+
+# PKIX recommendations harmless if included in all certificates.
+subjectKeyIdentifier=hash
+authorityKeyIdentifier=keyid,issuer
+
+# This stuff is for subjectAltName and issuerAltname.
+# Import the email address.
+# subjectAltName=email:copy
+# An alternative to produce certificates that aren't
+# deprecated according to PKIX.
+# subjectAltName=email:move
+
+# Copy subject details
+# issuerAltName=issuer:copy
+
+# This really needs to be in place for it to be a proxy certificate.
+proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:3,policy:foo
+
+####################################################################
+[ tsa ]
+
+default_tsa = tsa_config1	# the default TSA section
+
+[ tsa_config1 ]
+
+# These are used by the TSA reply generation only.
+dir		= ./demoCA		# TSA root directory
+serial		= $dir/tsaserial	# The current serial number (mandatory)
+crypto_device	= builtin		# OpenSSL engine to use for signing
+signer_cert	= $dir/tsacert.pem 	# The TSA signing certificate
+					# (optional)
+certs		= $dir/cacert.pem	# Certificate chain to include in reply
+					# (optional)
+signer_key	= $dir/private/tsakey.pem # The TSA private key (optional)
+signer_digest  = sha256			# Signing digest to use. (Optional)
+default_policy	= tsa_policy1		# Policy if request did not specify it
+					# (optional)
+other_policies	= tsa_policy2, tsa_policy3	# acceptable policies (optional)
+digests     = sha1, sha256, sha384, sha512  # Acceptable message digests (mandatory)
+accuracy	= secs:1, millisecs:500, microsecs:100	# (optional)
+clock_precision_digits  = 0	# number of digits after dot. (optional)
+ordering		= yes	# Is ordering defined for timestamps?
+				# (optional, default: no)
+tsa_name		= yes	# Must the TSA name be included in the reply?
+				# (optional, default: no)
+ess_cert_id_chain	= no	# Must the ESS cert id chain be included?
+				# (optional, default: no)
+ess_cert_id_alg		= sha1	# algorithm to compute certificate
+				# identifier (optional, default: sha1)
+
+[insta] # CMP using Insta Demo CA
+# Message transfer
+server = pki.certificate.fi:8700
+# proxy = # set this as far as needed, e.g., http://192.168.1.1:8080
+# tls_use = 0
+path = pkix/
+
+# Server authentication
+recipient = "/C=FI/O=Insta Demo/CN=Insta Demo CA" # or set srvcert or issuer
+ignore_keyusage = 1 # potentially needed quirk
+unprotected_errors = 1 # potentially needed quirk
+extracertsout = insta.extracerts.pem
+
+# Client authentication
+ref = 3078 # user identification
+secret = pass:insta # can be used for both client and server side
+
+# Generic message options
+cmd = ir # default operation, can be overridden on cmd line with, e.g., kur
+
+# Certificate enrollment
+subject = "/CN=openssl-cmp-test"
+newkey = insta.priv.pem
+out_trusted = insta.ca.crt
+certout = insta.cert.pem
+
+[pbm] # Password-based protection for Insta CA
+# Server and client authentication
+ref = $insta::ref # 3078
+secret = $insta::secret # pass:insta
+
+[signature] # Signature-based protection for Insta CA
+# Server authentication
+trusted = insta.ca.crt # does not include keyUsage digitalSignature
+
+# Client authentication
+secret = # disable PBM
+key = $insta::newkey # insta.priv.pem
+cert = $insta::certout # insta.cert.pem
+
+[ir]
+cmd = ir
+
+[cr]
+cmd = cr
+
+[kur]
+# Certificate update
+cmd = kur
+oldcert = $insta::certout # insta.cert.pem
+
+[rr]
+# Certificate revocation
+cmd = rr
+oldcert = $insta::certout # insta.cert.pem
diff --git a/nixpkgs/pkgs/development/libraries/openssl/3.0/nix-ssl-cert-file.patch b/nixpkgs/pkgs/development/libraries/openssl/3.0/nix-ssl-cert-file.patch
new file mode 100644
index 000000000000..e7090f49db6a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openssl/3.0/nix-ssl-cert-file.patch
@@ -0,0 +1,15 @@
+diff --git a/crypto/x509/by_file.c b/crypto/x509/by_file.c
+index 37d73ca84c..e328896234 100644
+--- a/crypto/x509/by_file.c
++++ b/crypto/x509/by_file.c
+@@ -54,7 +54,9 @@ static int by_file_ctrl_ex(X509_LOOKUP *ctx, int cmd, const char *argp,
+     switch (cmd) {
+     case X509_L_FILE_LOAD:
+         if (argl == X509_FILETYPE_DEFAULT) {
+-            file = ossl_safe_getenv(X509_get_default_cert_file_env());
++            file = ossl_safe_getenv("NIX_SSL_CERT_FILE");
++            if (!file)
++                file = ossl_safe_getenv(X509_get_default_cert_file_env());
+             if (file)
+                 ok = (X509_load_cert_crl_file_ex(ctx, file, X509_FILETYPE_PEM,
+                                                  libctx, propq) != 0);
diff --git a/nixpkgs/pkgs/development/libraries/openssl/3.0/openssl-disable-kernel-detection.patch b/nixpkgs/pkgs/development/libraries/openssl/3.0/openssl-disable-kernel-detection.patch
new file mode 100644
index 000000000000..04585565a331
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openssl/3.0/openssl-disable-kernel-detection.patch
@@ -0,0 +1,25 @@
+diff --git a/Configure b/Configure
+index a558e5ab1a..9a884f0b0f 100755
+--- a/Configure
++++ b/Configure
+@@ -1714,20 +1714,6 @@ unless ($disabled{devcryptoeng}) {
+ 
+ unless ($disabled{ktls}) {
+     $config{ktls}="";
+-    my $cc = $config{CROSS_COMPILE}.$config{CC};
+-    if ($target =~ m/^linux/) {
+-        system("printf '#include <sys/types.h>\n#include <linux/tls.h>' | $cc -E - >/dev/null 2>&1");
+-        if ($? != 0) {
+-            disable('too-old-kernel', 'ktls');
+-        }
+-    } elsif ($target =~ m/^BSD/) {
+-        system("printf '#include <sys/types.h>\n#include <sys/ktls.h>' | $cc -E - >/dev/null 2>&1");
+-        if ($? != 0) {
+-            disable('too-old-freebsd', 'ktls');
+-        }
+-    } else {
+-        disable('not-linux-or-freebsd', 'ktls');
+-    }
+ }
+ 
+ push @{$config{openssl_other_defines}}, "OPENSSL_NO_KTLS" if ($disabled{ktls});
diff --git a/nixpkgs/pkgs/development/libraries/openssl/3.2/use-etc-ssl-certs-darwin.patch b/nixpkgs/pkgs/development/libraries/openssl/3.2/use-etc-ssl-certs-darwin.patch
new file mode 100644
index 000000000000..e8b07b4ae599
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openssl/3.2/use-etc-ssl-certs-darwin.patch
@@ -0,0 +1,13 @@
+diff --git a/include/internal/common.h b/include/internal/common.h
+index 15666f1..d91e25b 100644
+--- a/include/internal/common.h
++++ b/include/internal/common.h
+@@ -83,7 +83,7 @@ __owur static ossl_inline int ossl_assert_int(int expr, const char *exprstr,
+ # ifndef OPENSSL_SYS_VMS
+ #  define X509_CERT_AREA          OPENSSLDIR
+ #  define X509_CERT_DIR           OPENSSLDIR "/certs"
+-#  define X509_CERT_FILE          OPENSSLDIR "/cert.pem"
++#  define X509_CERT_FILE          "/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt"
+ #  define X509_PRIVATE_DIR        OPENSSLDIR "/private"
+ #  define CTLOG_FILE              OPENSSLDIR "/ct_log_list.cnf"
+ # else
diff --git a/nixpkgs/pkgs/development/libraries/openssl/3.2/use-etc-ssl-certs.patch b/nixpkgs/pkgs/development/libraries/openssl/3.2/use-etc-ssl-certs.patch
new file mode 100644
index 000000000000..13a36fbcd031
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openssl/3.2/use-etc-ssl-certs.patch
@@ -0,0 +1,13 @@
+diff --git a/include/internal/common.h b/include/internal/common.h
+index 15666f1..d91e25b 100644
+--- a/include/internal/common.h
++++ b/include/internal/common.h
+@@ -83,7 +83,7 @@ __owur static ossl_inline int ossl_assert_int(int expr, const char *exprstr,
+ # ifndef OPENSSL_SYS_VMS
+ #  define X509_CERT_AREA          OPENSSLDIR
+ #  define X509_CERT_DIR           OPENSSLDIR "/certs"
+-#  define X509_CERT_FILE          OPENSSLDIR "/cert.pem"
++#  define X509_CERT_FILE          "/etc/ssl/certs/ca-certificates.crt"
+ #  define X509_PRIVATE_DIR        OPENSSLDIR "/private"
+ #  define CTLOG_FILE              OPENSSLDIR "/ct_log_list.cnf"
+ # else
diff --git a/nixpkgs/pkgs/development/libraries/openssl/default.nix b/nixpkgs/pkgs/development/libraries/openssl/default.nix
new file mode 100644
index 000000000000..7af5085410f7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openssl/default.nix
@@ -0,0 +1,311 @@
+{ lib, stdenv, fetchurl, buildPackages, perl, coreutils, writeShellScript
+, makeWrapper
+, withCryptodev ? false, cryptodev
+, withZlib ? false, zlib
+, enableSSL2 ? false
+, enableSSL3 ? false
+, enableKTLS ? stdenv.isLinux
+, static ? stdenv.hostPlatform.isStatic
+# path to openssl.cnf file. will be placed in $etc/etc/ssl/openssl.cnf to replace the default
+, conf ? null
+, removeReferencesTo
+, testers
+}:
+
+# 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
+  common = { version, hash, patches ? [], withDocs ? false, extraMeta ? {} }:
+   stdenv.mkDerivation (finalAttrs: {
+    pname = "openssl";
+    inherit version;
+
+    src = fetchurl {
+      url = "https://www.openssl.org/source/${finalAttrs.pname}-${version}.tar.gz";
+      inherit hash;
+    };
+
+    inherit patches;
+
+    postPatch = ''
+      patchShebangs Configure
+    '' + lib.optionalString (lib.versionOlder version "1.1.1") ''
+      patchShebangs test/*
+      for a in test/t* ; do
+        substituteInPlace "$a" \
+          --replace /bin/rm rm
+      done
+    ''
+    # config is a configure script which is not installed.
+    + lib.optionalString (lib.versionAtLeast version "1.1.1") ''
+      substituteInPlace config --replace '/usr/bin/env' '${buildPackages.coreutils}/bin/env'
+    '' + lib.optionalString (lib.versionAtLeast version "1.1.1" && stdenv.hostPlatform.isMusl) ''
+      substituteInPlace crypto/async/arch/async_posix.h \
+        --replace '!defined(__ANDROID__) && !defined(__OpenBSD__)' \
+                  '!defined(__ANDROID__) && !defined(__OpenBSD__) && 0'
+    ''
+    # Move ENGINESDIR into OPENSSLDIR for static builds, in order to move
+    # it to the separate etc output.
+    + lib.optionalString static ''
+      substituteInPlace Configurations/unix-Makefile.tmpl \
+        --replace 'ENGINESDIR=$(libdir)/engines-{- $sover_dirname -}' \
+                  'ENGINESDIR=$(OPENSSLDIR)/engines-{- $sover_dirname -}'
+    '';
+
+    outputs = [ "bin" "dev" "out" "man" ]
+      ++ lib.optional withDocs "doc"
+      # Separate output for the runtime dependencies of the static build.
+      # Specifically, move OPENSSLDIR into this output, as its path will be
+      # compiled into 'libcrypto.a'. This makes it a runtime dependency of
+      # any package that statically links openssl, so we want to keep that
+      # output minimal.
+      ++ lib.optional static "etc";
+    setOutputFlags = false;
+    separateDebugInfo =
+      !stdenv.hostPlatform.isDarwin &&
+      !(stdenv.hostPlatform.useLLVM or false) &&
+      stdenv.cc.isGNU;
+
+    nativeBuildInputs =
+         lib.optional (!stdenv.hostPlatform.isWindows) makeWrapper
+      ++ [ perl ]
+      ++ lib.optionals static [ removeReferencesTo ];
+    buildInputs = lib.optional withCryptodev cryptodev
+      ++ lib.optional withZlib zlib;
+
+    # TODO(@Ericson2314): Improve with mass rebuild
+    configurePlatforms = [];
+    configureScript = {
+        armv5tel-linux = "./Configure linux-armv4 -march=armv5te";
+        armv6l-linux = "./Configure linux-armv4 -march=armv6";
+        armv7l-linux = "./Configure linux-armv4 -march=armv7-a";
+        x86_64-darwin  = "./Configure darwin64-x86_64-cc";
+        aarch64-darwin = "./Configure darwin64-arm64-cc";
+        x86_64-linux = "./Configure linux-x86_64";
+        x86_64-solaris = "./Configure solaris64-x86_64-gcc";
+        riscv64-linux = "./Configure linux64-riscv64";
+      }.${stdenv.hostPlatform.system} or (
+        if stdenv.hostPlatform == stdenv.buildPlatform
+          then "./config"
+        else if stdenv.hostPlatform.isBSD
+          then if stdenv.hostPlatform.isx86_64 then "./Configure BSD-x86_64"
+          else if stdenv.hostPlatform.isx86_32
+            then "./Configure BSD-x86" + lib.optionalString stdenv.hostPlatform.isElf "-elf"
+          else "./Configure BSD-generic${toString stdenv.hostPlatform.parsed.cpu.bits}"
+        else if stdenv.hostPlatform.isMinGW
+          then "./Configure mingw${lib.optionalString
+                                     (stdenv.hostPlatform.parsed.cpu.bits != 32)
+                                     (toString stdenv.hostPlatform.parsed.cpu.bits)}"
+        else if stdenv.hostPlatform.isLinux
+          then if stdenv.hostPlatform.isx86_64 then "./Configure linux-x86_64"
+          else if stdenv.hostPlatform.isMips32 then "./Configure linux-mips32"
+          else if stdenv.hostPlatform.isMips64n32 then "./Configure linux-mips64"
+          else if stdenv.hostPlatform.isMips64n64 then "./Configure linux64-mips64"
+          else "./Configure linux-generic${toString stdenv.hostPlatform.parsed.cpu.bits}"
+        else if stdenv.hostPlatform.isiOS
+          then "./Configure ios${toString stdenv.hostPlatform.parsed.cpu.bits}-cross"
+        else
+          throw "Not sure what configuration to use for ${stdenv.hostPlatform.config}"
+      );
+
+    # OpenSSL doesn't like the `--enable-static` / `--disable-shared` flags.
+    dontAddStaticConfigureFlags = true;
+    configureFlags = [
+      "shared" # "shared" builds both shared and static libraries
+      "--libdir=lib"
+      (if !static then
+         "--openssldir=etc/ssl"
+       else
+         # Move OPENSSLDIR to the 'etc' output for static builds. Prepend '/.'
+         # to the path to make it appear absolute before variable expansion,
+         # else the 'prefix' would be prepended to it.
+         "--openssldir=/.$(etc)/etc/ssl"
+      )
+    ] ++ lib.optionals withCryptodev [
+      "-DHAVE_CRYPTODEV"
+      "-DUSE_CRYPTODEV_DIGESTS"
+    ] ++ lib.optional enableSSL2 "enable-ssl2"
+      ++ lib.optional enableSSL3 "enable-ssl3"
+      # We select KTLS here instead of the configure-time detection (which we patch out).
+      # KTLS should work on FreeBSD 13+ as well, so we could enable it if someone tests it.
+      ++ lib.optional (lib.versionAtLeast version "3.0.0" && enableKTLS) "enable-ktls"
+      ++ lib.optional (lib.versionAtLeast version "1.1.1" && stdenv.hostPlatform.isAarch64) "no-afalgeng"
+      # OpenSSL needs a specific `no-shared` configure flag.
+      # See https://wiki.openssl.org/index.php/Compilation_and_Installation#Configure_Options
+      # for a comprehensive list of configuration options.
+      ++ lib.optional (lib.versionAtLeast version "1.1.1" && static) "no-shared"
+      ++ lib.optional (lib.versionAtLeast version "3.0.0" && static) "no-module"
+      # This introduces a reference to the CTLOG_FILE which is undesired when
+      # trying to build binaries statically.
+      ++ lib.optional static "no-ct"
+      ++ lib.optional withZlib "zlib"
+      ++ lib.optionals (stdenv.hostPlatform.isMips && stdenv.hostPlatform ? gcc.arch) [
+      # This is necessary in order to avoid openssl adding -march
+      # flags which ultimately conflict with those added by
+      # cc-wrapper.  Openssl assumes that it can scan CFLAGS to
+      # detect any -march flags, using this perl code:
+      #
+      #   && !grep { $_ =~ /-m(ips|arch=)/ } (@{$config{CFLAGS}})
+      #
+      # The following bogus CFLAGS environment variable triggers the
+      # the code above, inhibiting `./Configure` from adding the
+      # conflicting flags.
+      "CFLAGS=-march=${stdenv.hostPlatform.gcc.arch}"
+    ];
+
+    makeFlags = [
+      "MANDIR=$(man)/share/man"
+      # This avoids conflicts between man pages of openssl subcommands (for
+      # example 'ts' and 'err') man pages and their equivalent top-level
+      # command in other packages (respectively man-pages and moreutils).
+      # This is done in ubuntu and archlinux, and possiibly many other distros.
+      "MANSUFFIX=ssl"
+    ];
+
+    enableParallelBuilding = true;
+
+    postInstall =
+    (if static then ''
+      # OPENSSLDIR has a reference to self
+      remove-references-to -t $out $out/lib/*.a
+    '' else ''
+      # If we're building dynamic libraries, then don't install static
+      # libraries.
+      if [ -n "$(echo $out/lib/*.so $out/lib/*.dylib $out/lib/*.dll)" ]; then
+          rm "$out/lib/"*.a
+      fi
+
+      # 'etc' is a separate output on static builds only.
+      etc=$out
+    '') + ''
+      mkdir -p $bin
+      mv $out/bin $bin/bin
+
+    '' + lib.optionalString (!stdenv.hostPlatform.isWindows)
+      # makeWrapper is broken for windows cross (https://github.com/NixOS/nixpkgs/issues/120726)
+    ''
+      # c_rehash is a legacy perl script with the same functionality
+      # as `openssl rehash`
+      # this wrapper script is created to maintain backwards compatibility without
+      # depending on perl
+      makeWrapper $bin/bin/openssl $bin/bin/c_rehash \
+        --add-flags "rehash"
+    '' + ''
+
+      mkdir $dev
+      mv $out/include $dev/
+
+      # remove dependency on Perl at runtime
+      rm -r $etc/etc/ssl/misc
+
+      rmdir $etc/etc/ssl/{certs,private}
+
+      ${lib.optionalString (conf != null) "cat ${conf} > $etc/etc/ssl/openssl.cnf"}
+    '';
+
+    postFixup = lib.optionalString (!stdenv.hostPlatform.isWindows) ''
+      # Check to make sure the main output and the static runtime dependencies
+      # don't depend on perl
+      if grep -r '${buildPackages.perl}' $out $etc; then
+        echo "Found an erroneous dependency on perl ^^^" >&2
+        exit 1
+      fi
+    '';
+
+    passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+    meta = with lib; {
+      homepage = "https://www.openssl.org/";
+      changelog = "https://github.com/openssl/openssl/blob/openssl-${version}/CHANGES.md";
+      description = "A cryptographic library that implements the SSL and TLS protocols";
+      license = licenses.openssl;
+      mainProgram = "openssl";
+      maintainers = with maintainers; [ thillux ];
+      pkgConfigModules = [
+        "libcrypto"
+        "libssl"
+        "openssl"
+      ];
+      platforms = platforms.all;
+    } // extraMeta;
+  });
+
+in {
+  # intended version "policy":
+  # - 1.1 as long as some package exists, which does not build without it
+  # - latest 3.x LTS
+  # - latest 3.x non-LTS as preview/for development
+  #
+  # - other versions in between only when reasonable need is stated for some package
+  # - backport every security critical fix release e.g. 3.0.y -> 3.0.y+1 but no new version, e.g. 3.1 -> 3.2
+
+  # If you do upgrade here, please update in pkgs/top-level/release.nix
+  # the permitted insecure version to ensure it gets cached for our users
+  # and backport this to stable release (23.05).
+  openssl_1_1 = common {
+    version = "1.1.1w";
+    hash = "sha256-zzCYlQy02FOtlcCEHx+cbT3BAtzPys1SHZOSUgi3asg=";
+    patches = [
+      ./1.1/nix-ssl-cert-file.patch
+
+      (if stdenv.hostPlatform.isDarwin
+       then ./use-etc-ssl-certs-darwin.patch
+       else ./use-etc-ssl-certs.patch)
+    ];
+    withDocs = true;
+    extraMeta = {
+      knownVulnerabilities = [
+        "OpenSSL 1.1 is reaching its end of life on 2023/09/11 and cannot be supported through the NixOS 23.05 release cycle. https://www.openssl.org/blog/blog/2023/03/28/1.1.1-EOL/"
+      ];
+    };
+  };
+
+  openssl_3 = common {
+    version = "3.0.13";
+    hash = "sha256-iFJXU/edO+wn0vp8ZqoLkrOqlJja/ZPXz6SzeAza4xM=";
+
+    patches = [
+      ./3.0/nix-ssl-cert-file.patch
+
+      # openssl will only compile in KTLS if the current kernel supports it.
+      # This patch disables build-time detection.
+      ./3.0/openssl-disable-kernel-detection.patch
+
+      (if stdenv.hostPlatform.isDarwin
+       then ./use-etc-ssl-certs-darwin.patch
+       else ./use-etc-ssl-certs.patch)
+    ];
+
+    withDocs = true;
+
+    extraMeta = with lib; {
+      license = licenses.asl20;
+    };
+  };
+
+  openssl_3_2 = common {
+    version = "3.2.1";
+    hash = "sha256-g8cyn+UshQZ3115dCwyiRTCbl+jsvP3B39xKufrDWzk=";
+
+    patches = [
+      ./3.0/nix-ssl-cert-file.patch
+
+      # openssl will only compile in KTLS if the current kernel supports it.
+      # This patch disables build-time detection.
+      ./3.0/openssl-disable-kernel-detection.patch
+
+      (if stdenv.hostPlatform.isDarwin
+       then ./3.2/use-etc-ssl-certs-darwin.patch
+       else ./3.2/use-etc-ssl-certs.patch)
+    ];
+
+    withDocs = true;
+
+    extraMeta = with lib; {
+      license = licenses.asl20;
+    };
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/openssl/use-etc-ssl-certs-darwin.patch b/nixpkgs/pkgs/development/libraries/openssl/use-etc-ssl-certs-darwin.patch
new file mode 100644
index 000000000000..2c98ccfa7ed0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openssl/use-etc-ssl-certs-darwin.patch
@@ -0,0 +1,13 @@
+diff --git a/include/internal/cryptlib.h b/include/internal/cryptlib.h
+index 329ef62..9a8df64 100644
+--- a/include/internal/cryptlib.h
++++ b/include/internal/cryptlib.h
+@@ -56,7 +56,7 @@ DEFINE_LHASH_OF(MEM);
+ # ifndef OPENSSL_SYS_VMS
+ #  define X509_CERT_AREA          OPENSSLDIR
+ #  define X509_CERT_DIR           OPENSSLDIR "/certs"
+-#  define X509_CERT_FILE          OPENSSLDIR "/cert.pem"
++#  define X509_CERT_FILE          "/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt"
+ #  define X509_PRIVATE_DIR        OPENSSLDIR "/private"
+ #  define CTLOG_FILE              OPENSSLDIR "/ct_log_list.cnf"
+ # else
diff --git a/nixpkgs/pkgs/development/libraries/openssl/use-etc-ssl-certs.patch b/nixpkgs/pkgs/development/libraries/openssl/use-etc-ssl-certs.patch
new file mode 100644
index 000000000000..67d199681f96
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openssl/use-etc-ssl-certs.patch
@@ -0,0 +1,13 @@
+diff --git a/include/internal/cryptlib.h b/include/internal/cryptlib.h
+index 329ef62..9a8df64 100644
+--- a/include/internal/cryptlib.h
++++ b/include/internal/cryptlib.h
+@@ -56,7 +56,7 @@ DEFINE_LHASH_OF(MEM);
+ # ifndef OPENSSL_SYS_VMS
+ #  define X509_CERT_AREA          OPENSSLDIR
+ #  define X509_CERT_DIR           OPENSSLDIR "/certs"
+-#  define X509_CERT_FILE          OPENSSLDIR "/cert.pem"
++#  define X509_CERT_FILE          "/etc/ssl/certs/ca-certificates.crt"
+ #  define X509_PRIVATE_DIR        OPENSSLDIR "/private"
+ #  define CTLOG_FILE              OPENSSLDIR "/ct_log_list.cnf"
+ # else
diff --git a/nixpkgs/pkgs/development/libraries/opensubdiv/default.nix b/nixpkgs/pkgs/development/libraries/opensubdiv/default.nix
new file mode 100644
index 000000000000..17b7c286229b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opensubdiv/default.nix
@@ -0,0 +1,88 @@
+{ config, lib, stdenv, fetchFromGitHub, cmake, pkg-config, xorg, libGLU
+, libGL, glew, ocl-icd, python3
+, cudaSupport ? config.cudaSupport
+, cudaPackages
+, openclSupport ? !cudaSupport
+, darwin
+}:
+
+stdenv.mkDerivation rec {
+  pname = "opensubdiv";
+  version = "3.5.1";
+
+  src = fetchFromGitHub {
+    owner = "PixarAnimationStudios";
+    repo = "OpenSubdiv";
+    rev = "v${lib.replaceStrings ["."] ["_"] version}";
+    sha256 = "sha256-uDKCT0Uoa5WQekMUFm2iZmzm+oWAZ6IWMwfpchkUZY0=";
+  };
+
+  outputs = [ "out" "dev" "static" ];
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ] ++ lib.optional cudaSupport [
+    cudaPackages.cuda_nvcc
+  ];
+  buildInputs =
+    [ libGLU libGL python3
+      # FIXME: these are not actually needed, but the configure script wants them.
+      glew xorg.libX11 xorg.libXrandr xorg.libXxf86vm xorg.libXcursor
+      xorg.libXinerama xorg.libXi
+    ]
+    ++ lib.optionals (openclSupport && !stdenv.isDarwin) [ ocl-icd ]
+    ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
+      OpenCL
+      Cocoa
+      CoreVideo
+      IOKit
+      AppKit
+      AGL
+      MetalKit
+    ])
+    ++ lib.optionals cudaSupport [
+      cudaPackages.cuda_cudart
+    ];
+
+  # It's important to set OSD_CUDA_NVCC_FLAGS,
+  # because otherwise OSD might piggyback unwanted architectures:
+  # https://github.com/PixarAnimationStudios/OpenSubdiv/blob/7d0ab5530feef693ac0a920585b5c663b80773b3/CMakeLists.txt#L602
+  preConfigure = lib.optionalString cudaSupport ''
+    cmakeFlagsArray+=(
+      -DOSD_CUDA_NVCC_FLAGS="${lib.concatStringsSep " " cudaPackages.cudaFlags.gencode}"
+    )
+  '';
+
+  cmakeFlags =
+    [ "-DNO_TUTORIALS=1"
+      "-DNO_REGRESSION=1"
+      "-DNO_EXAMPLES=1"
+      (lib.cmakeBool "NO_METAL" (!stdenv.isDarwin))
+      (lib.cmakeBool "NO_OPENCL" (!openclSupport))
+      (lib.cmakeBool "NO_CUDA" (!cudaSupport))
+    ] ++ lib.optionals (!stdenv.isDarwin) [
+      "-DGLEW_INCLUDE_DIR=${glew.dev}/include"
+      "-DGLEW_LIBRARY=${glew.dev}/lib"
+    ] ++ lib.optionals cudaSupport [
+    ] ++ lib.optionals (!openclSupport) [
+    ];
+
+  preBuild = let maxBuildCores = 16; in lib.optionalString cudaSupport ''
+    # https://github.com/PixarAnimationStudios/OpenSubdiv/issues/1313
+    NIX_BUILD_CORES=$(( NIX_BUILD_CORES < ${toString maxBuildCores} ? NIX_BUILD_CORES : ${toString maxBuildCores} ))
+  '';
+
+  postInstall = ''
+    moveToOutput "lib/*.a" $static
+  '';
+
+  meta = {
+    description = "An Open-Source subdivision surface library";
+    homepage = "http://graphics.pixar.com/opensubdiv";
+    broken = openclSupport && cudaSupport;
+    platforms = lib.platforms.unix;
+    maintainers = [ lib.maintainers.eelco ];
+    license = lib.licenses.asl20;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/opentracing-cpp/default.nix b/nixpkgs/pkgs/development/libraries/opentracing-cpp/default.nix
new file mode 100644
index 000000000000..a85aa6d14e46
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opentracing-cpp/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+stdenv.mkDerivation rec {
+  pname = "opentracing-cpp";
+  version = "1.6.0";
+  src = fetchFromGitHub {
+    owner = "opentracing";
+    repo = "opentracing-cpp";
+    rev = "v${version}";
+    sha256 = "09wdwbz8gbjgyqi764cyb6aw72wng6hwk44xpl432gl7whrrysvi";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = {
+    description = "C++ implementation of the OpenTracing API";
+    homepage = "https://opentracing.io";
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ rob ];
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/openturns/default.nix b/nixpkgs/pkgs/development/libraries/openturns/default.nix
new file mode 100644
index 000000000000..a2fa42caea60
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openturns/default.nix
@@ -0,0 +1,82 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, swig
+, boost
+, spectra
+, libxml2
+, tbb
+, hmat-oss
+, nlopt
+, cminpack
+, ceres-solver
+, dlib
+, hdf5
+, primesieve
+, pagmo2
+, ipopt
+, Accelerate
+# tests take an hour to build on a 48-core machine
+, runTests ? false
+, enablePython ? false
+, python3Packages
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openturns";
+  version = "1.22";
+
+  src = fetchFromGitHub {
+    owner = "openturns";
+    repo = "openturns";
+    rev = "v${version}";
+    sha256 = "sha256-ku3/mPoa1YJVJB99R/kWlOubIO+OZAiKfPqS/DrtJQk=";
+  };
+
+  nativeBuildInputs = [ cmake ] ++ lib.optional enablePython python3Packages.sphinx;
+  buildInputs = [
+    swig
+    boost
+    spectra
+    libxml2
+    tbb
+    hmat-oss
+    nlopt
+    cminpack
+    ceres-solver
+    dlib
+    hdf5
+    primesieve
+    pagmo2
+    ipopt
+  ] ++ lib.optionals enablePython [
+    python3Packages.python
+    python3Packages.matplotlib
+    python3Packages.psutil
+    python3Packages.dill
+  ] ++ lib.optional stdenv.isDarwin Accelerate;
+
+  cmakeFlags = [
+    "-DOPENTURNS_SYSCONFIG_PATH=$out/etc"
+    "-DCMAKE_UNITY_BUILD=ON"
+    "-DCMAKE_UNITY_BUILD_BATCH_SIZE=32"
+    "-DSWIG_COMPILE_FLAGS='-O1'"
+    "-DUSE_SPHINX=${if enablePython then "ON" else "OFF"}"
+    "-DBUILD_PYTHON=${if enablePython then "ON" else "OFF"}"
+  ];
+
+  doCheck = runTests;
+
+  checkTarget = "tests check";
+
+  meta = with lib; {
+    description = "Multivariate probabilistic modeling and uncertainty treatment library";
+    license = with licenses; [ lgpl3 gpl3 ];
+    homepage = "https://openturns.github.io/www/";
+    changelog = "https://github.com/openturns/openturns/raw/v${version}/ChangeLog";
+    maintainers = with maintainers; [ gdinh ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/openvdb/default.nix b/nixpkgs/pkgs/development/libraries/openvdb/default.nix
new file mode 100644
index 000000000000..c5397b259a30
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openvdb/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv, fetchFromGitHub, cmake, boost, jemalloc, c-blosc, tbb, zlib }:
+
+stdenv.mkDerivation rec
+{
+  pname = "openvdb";
+  version = "11.0.0";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "AcademySoftwareFoundation";
+    repo = "openvdb";
+    rev = "v${version}";
+    sha256 = "sha256-wDDjX0nKZ4/DIbEX33PoxR43dJDj2NF3fm+Egug62GQ=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ boost tbb jemalloc c-blosc zlib ];
+
+  cmakeFlags = [ "-DOPENVDB_CORE_STATIC=OFF" ];
+
+  # error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.13 or newer
+  env = lib.optionalAttrs (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13" && lib.versionAtLeast tbb.version "2021.8.0") {
+    NIX_CFLAGS_COMPILE = "-faligned-allocation";
+  };
+
+  postFixup = ''
+    substituteInPlace $dev/lib/cmake/OpenVDB/FindOpenVDB.cmake \
+      --replace \''${OPENVDB_LIBRARYDIR} $out/lib \
+      --replace \''${OPENVDB_INCLUDEDIR} $dev/include
+  '';
+
+  meta = with lib; {
+    description = "An open framework for voxel";
+    homepage = "https://www.openvdb.org";
+    maintainers = [ maintainers.guibou ];
+    platforms = platforms.unix;
+    license = licenses.mpl20;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/openvino/default.nix b/nixpkgs/pkgs/development/libraries/openvino/default.nix
new file mode 100644
index 000000000000..186e1048823a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openvino/default.nix
@@ -0,0 +1,195 @@
+{ lib
+, gcc12Stdenv
+, fetchFromGitHub
+, fetchpatch2
+, fetchurl
+, cudaSupport ? opencv.cudaSupport or false
+
+# build
+, addOpenGLRunpath
+, autoPatchelfHook
+, cmake
+, git
+, libarchive
+, pkg-config
+, python
+, shellcheck
+, sphinx
+
+# runtime
+, flatbuffers
+, libusb1
+, libxml2
+, ocl-icd
+, opencv
+, protobuf
+, pugixml
+, snappy
+, tbb
+, cudaPackages
+}:
+
+let
+  inherit (lib)
+    cmakeBool
+  ;
+
+  stdenv = gcc12Stdenv;
+
+  # See GNA_VERSION in cmake/dependencies.cmake
+  gna_version = "03.05.00.2116";
+  gna = fetchurl {
+    url = "https://storage.openvinotoolkit.org/dependencies/gna/gna_${gna_version}.zip";
+    hash = "sha256-lgNQVncCvaFydqxMBg11JPt8587XhQBL2GHIH/K/4sU=";
+  };
+
+  tbbbind_version = "2_5";
+  tbbbind = fetchurl {
+    url = "https://storage.openvinotoolkit.org/dependencies/thirdparty/linux/tbbbind_${tbbbind_version}_static_lin_v4.tgz";
+    hash = "sha256-Tr8wJGUweV8Gb7lhbmcHxrF756ZdKdNRi1eKdp3VTuo=";
+  };
+in
+
+stdenv.mkDerivation rec {
+  pname = "openvino";
+  version = "2023.3.0";
+
+  src = fetchFromGitHub {
+    owner = "openvinotoolkit";
+    repo = "openvino";
+    rev = "refs/tags/${version}";
+    fetchSubmodules = true;
+    hash = "sha256-dXlQhar5gz+1iLmDYXUY0jZKh4rJ+khRpoZQphJXfcU=";
+  };
+
+  patches = [
+    (fetchpatch2 {
+      name = "enable-js-toggle.patch";
+      url = "https://github.com/openvinotoolkit/openvino/commit/0a8f1383826d949c497fe3d05fef9ad2b662fa7e.patch";
+      hash = "sha256-mQYunouPo3tRlD5Yp4EUth324ccNnVX8zmjPHvJBYKw=";
+    })
+  ];
+
+  outputs = [
+    "out"
+    "python"
+  ];
+
+  nativeBuildInputs = [
+    addOpenGLRunpath
+    autoPatchelfHook
+    cmake
+    git
+    libarchive
+    pkg-config
+    (python.withPackages (ps: with ps; [
+      cython
+      pybind11
+      setuptools
+    ]))
+    shellcheck
+    sphinx
+  ] ++ lib.optionals cudaSupport [
+    cudaPackages.cuda_nvcc
+  ];
+
+  postPatch = ''
+    mkdir -p temp/gna_${gna_version}
+    pushd temp/
+    bsdtar -xf ${gna}
+    autoPatchelf gna_${gna_version}
+    echo "${gna.url}" > gna_${gna_version}/ie_dependency.info
+    popd
+
+    mkdir -p temp/tbbbind_${tbbbind_version}
+    pushd temp/tbbbind_${tbbbind_version}
+    bsdtar -xf ${tbbbind}
+    echo "${tbbbind.url}" > ie_dependency.info
+    popd
+  '';
+
+  dontUseCmakeBuildDir = true;
+
+  cmakeFlags = [
+    "-Wno-dev"
+    "-DCMAKE_MODULE_PATH:PATH=${placeholder "out"}/lib/cmake"
+    "-DCMAKE_PREFIX_PATH:PATH=${placeholder "out"}"
+    "-DOpenCV_DIR=${opencv}/lib/cmake/opencv4/"
+    "-DProtobuf_LIBRARIES=${protobuf}/lib/libprotobuf${stdenv.hostPlatform.extensions.sharedLibrary}"
+
+    (cmakeBool "CMAKE_VERBOSE_MAKEFILE" true)
+    (cmakeBool "NCC_SYLE" false)
+    (cmakeBool "BUILD_TESTING" false)
+    (cmakeBool "ENABLE_CPPLINT" false)
+    (cmakeBool "ENABLE_TESTING" false)
+    (cmakeBool "ENABLE_SAMPLES" false)
+
+    # features
+    (cmakeBool "ENABLE_INTEL_CPU" true)
+    (cmakeBool "ENABLE_INTEL_GNA" true)
+    (cmakeBool "ENABLE_JS" false)
+    (cmakeBool "ENABLE_LTO" true)
+    (cmakeBool "ENABLE_ONEDNN_FOR_GPU" false)
+    (cmakeBool "ENABLE_OPENCV" true)
+    (cmakeBool "ENABLE_PYTHON" true)
+
+    # system libs
+    (cmakeBool "ENABLE_SYSTEM_FLATBUFFERS" true)
+    (cmakeBool "ENABLE_SYSTEM_OPENCL" true)
+    (cmakeBool "ENABLE_SYSTEM_PROTOBUF" false)
+    (cmakeBool "ENABLE_SYSTEM_PUGIXML" true)
+    (cmakeBool "ENABLE_SYSTEM_SNAPPY" true)
+    (cmakeBool "ENABLE_SYSTEM_TBB" true)
+  ];
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isAarch64 "-Wno-narrowing";
+
+  autoPatchelfIgnoreMissingDeps = [
+    "libngraph_backend.so"
+  ];
+
+  buildInputs = [
+    flatbuffers
+    libusb1
+    libxml2
+    ocl-icd
+    opencv.cxxdev
+    pugixml
+    snappy
+    tbb
+  ] ++ lib.optionals cudaSupport [
+    cudaPackages.cuda_cudart
+  ];
+
+  enableParallelBuilding = true;
+
+  postInstall = ''
+    mkdir -p $python
+    mv $out/python/* $python/
+    rmdir $out/python
+  '';
+
+  postFixup = ''
+    # Link to OpenCL
+    find $out -type f \( -name '*.so' -or -name '*.so.*' \) | while read lib; do
+      addOpenGLRunpath "$lib"
+    done
+  '';
+
+  meta = with lib; {
+    description = "OpenVINO™ Toolkit repository";
+    longDescription = ''
+      This toolkit allows developers to deploy pre-trained deep learning models through a high-level C++ Inference Engine API integrated with application logic.
+
+      This open source version includes several components: namely Model Optimizer, nGraph and Inference Engine, as well as CPU, GPU, MYRIAD,
+      multi device and heterogeneous plugins to accelerate deep learning inferencing on Intel® CPUs and Intel® Processor Graphics.
+      It supports pre-trained models from the Open Model Zoo, along with 100+ open source and public models in popular formats such as Caffe*, TensorFlow*, MXNet* and ONNX*.
+    '';
+    homepage = "https://docs.openvinotoolkit.org/";
+    license = with licenses; [ asl20 ];
+    platforms = platforms.all;
+    broken = (stdenv.isLinux && stdenv.isAarch64) # requires scons, then fails with *** Source directory cannot be under variant directory.
+      || stdenv.isDarwin; # Cannot find macos sdk
+    maintainers = with maintainers; [ tfmoraes ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/openvr/default.nix b/nixpkgs/pkgs/development/libraries/openvr/default.nix
new file mode 100644
index 000000000000..5bdb10549001
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openvr/default.nix
@@ -0,0 +1,67 @@
+{ AppKit
+, cmake
+, fetchFromGitHub
+, fetchpatch2
+, Foundation
+, jsoncpp
+, lib
+, libGL
+, stdenv
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "openvr";
+  version = "2.2.3";
+
+  src = fetchFromGitHub {
+    owner = "ValveSoftware";
+    repo = "openvr";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-Dpl88Te+EoVasoCtwERGrYt3xK8o03h15r8IVxxPPCw=";
+  };
+
+  patches = [
+    # https://github.com/ValveSoftware/openvr/pull/594
+    (fetchpatch2 {
+      name = "use-correct-CPP11-definition-for-vsprintf_s.patch";
+      url = "https://github.com/ValveSoftware/openvr/commit/0fa21ba17748efcca1816536e27bdca70141b074.patch";
+      hash = "sha256-0sPNDx5qKqCzN35FfArbgJ0cTztQp+SMLsXICxneLx4=";
+    })
+    # https://github.com/ValveSoftware/openvr/pull/1716
+    (fetchpatch2 {
+      name = "add-ability-to-build-with-system-installed-jsoncpp.patch";
+      url = "https://github.com/ValveSoftware/openvr/commit/54a58e479f4d63e62e9118637cd92a2013a4fb95.patch";
+      hash = "sha256-aMojjbNjLvsGev0JaBx5sWuMv01sy2tG/S++I1NUi7U=";
+    })
+  ];
+
+  postUnpack = ''
+    # Move in-tree jsoncpp out to complement the patch above
+    # fetchpatch2 is not able to handle these renames
+    mkdir source/thirdparty
+    mv source/src/json source/thirdparty/jsoncpp
+  '';
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = [
+    jsoncpp
+    libGL
+  ] ++ lib.optionals stdenv.isDarwin [
+    AppKit
+    Foundation
+  ];
+
+  cmakeFlags = [ "-DUSE_SYSTEM_JSONCPP=ON" "-DBUILD_SHARED=1" ];
+
+  meta = {
+    broken = stdenv.isDarwin;
+    description = "An API and runtime that allows access to VR hardware from multiple vendors without requiring that applications have specific knowledge of the hardware they are targeting";
+    homepage = "https://github.com/ValveSoftware/openvr";
+    license = lib.licenses.bsd3;
+    maintainers = with lib.maintainers; [ Scrumplex ];
+    platforms = lib.platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/openwsman/default.nix b/nixpkgs/pkgs/development/libraries/openwsman/default.nix
new file mode 100644
index 000000000000..4df98d28fd09
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openwsman/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
+, curl, libxml2, pam, sblim-sfcc }:
+
+stdenv.mkDerivation rec {
+  pname = "openwsman";
+  version = "2.7.2";
+
+  src = fetchFromGitHub {
+    owner  = "Openwsman";
+    repo   = "openwsman";
+    rev    = "v${version}";
+    sha256 = "sha256-CH2pqWs64Dznim3IljmsthKEQfACVlaAKQ/07MgryHo=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [ curl libxml2 pam sblim-sfcc ];
+
+  cmakeFlags = [
+    "-DCMAKE_BUILD_RUBY_GEM=no"
+    "-DBUILD_PYTHON=no"
+    "-DBUILD_PYTHON3=yes"
+  ];
+
+  preConfigure = ''
+    cmakeFlags="$cmakeFlags -DPACKAGE_ARCHITECTURE=$(uname -m)";
+  '';
+
+  configureFlags = [ "--disable-more-warnings" ];
+
+  meta = with lib; {
+    description  = "Openwsman server implementation and client API with bindings";
+    downloadPage = "https://github.com/Openwsman/openwsman/releases";
+    homepage     = "https://openwsman.github.io";
+    license      = licenses.bsd3;
+    maintainers  = with maintainers; [ deepfire ];
+    platforms    = platforms.linux; # PAM is not available on Darwin
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/openxr-loader/default.nix b/nixpkgs/pkgs/development/libraries/openxr-loader/default.nix
new file mode 100644
index 000000000000..3c739d30d386
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openxr-loader/default.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, fetchFromGitHub, cmake, python3, libX11, libXxf86vm, libXrandr, vulkan-headers, libGL, vulkan-loader, wayland, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "openxr-loader";
+  version = "1.0.33";
+
+  src = fetchFromGitHub {
+    owner = "KhronosGroup";
+    repo = "OpenXR-SDK-Source";
+    rev = "release-${version}";
+    sha256 = "sha256-26CRpxiTfZOq6sQSl0H53UmYzPY/6mP33EPObdkwnQs=";
+  };
+
+  nativeBuildInputs = [ cmake python3 pkg-config ];
+  buildInputs = [ libX11 libXxf86vm libXrandr vulkan-headers libGL vulkan-loader wayland ];
+
+  cmakeFlags = [ "-DBUILD_TESTS=ON" ];
+
+  outputs = [ "out" "dev" "layers" ];
+
+  # https://github.com/KhronosGroup/OpenXR-SDK-Source/issues/305
+  postPatch = ''
+    substituteInPlace src/loader/openxr.pc.in \
+      --replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
+  '';
+
+  postInstall = ''
+    mkdir -p "$layers/share"
+    mv "$out/share/openxr" "$layers/share"
+    # Use absolute paths in manifests so no LD_LIBRARY_PATH shenanigans are necessary
+    for file in "$layers/share/openxr/1/api_layers/explicit.d/"*; do
+        substituteInPlace "$file" --replace '"library_path": "lib' "\"library_path\": \"$layers/lib/lib"
+    done
+    mkdir -p "$layers/lib"
+    mv "$out/lib/libXrApiLayer"* "$layers/lib"
+  '';
+
+  meta = with lib; {
+    description = "Khronos OpenXR loader";
+    homepage    = "https://www.khronos.org/openxr";
+    platforms   = platforms.linux;
+    license     = licenses.asl20;
+    maintainers = [ maintainers.ralith ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/openzwave/default.nix b/nixpkgs/pkgs/development/libraries/openzwave/default.nix
new file mode 100644
index 000000000000..07fe1db82925
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/openzwave/default.nix
@@ -0,0 +1,58 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch
+, doxygen, fontconfig, graphviz-nox, libxml2, pkg-config, which
+, systemd }:
+
+stdenv.mkDerivation rec {
+  pname = "openzwave";
+  version = "1.6";
+
+  src = fetchFromGitHub {
+    owner = "OpenZWave";
+    repo = "open-zwave";
+    rev = "v${version}";
+    sha256 = "0xgs4mmr0480c269wx9xkk67ikjzxkh8xcssrdx0f5xcl1lyd333";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "fix-strncat-build-failure.patch";
+      url = "https://github.com/OpenZWave/open-zwave/commit/601e5fb16232a7984885e67fdddaf5b9c9dd8105.patch";
+      sha256 = "1n1k5arwk1dyc12xz6xl4n8yw28vghzhv27j65z1nca4zqsxgza1";
+    })
+    (fetchpatch {
+      name = "fix-text-uninitialized.patch";
+      url = "https://github.com/OpenZWave/open-zwave/commit/3b029a467e83bc7f0054e4dbba1e77e6eac7bc7f.patch";
+      sha256 = "183mrzjh1zx2b2wzkj4jisiw8br7g7bbs167afls4li0fm01d638";
+    })
+  ];
+
+  outputs = [ "out" "doc" ];
+
+  nativeBuildInputs = [ doxygen fontconfig graphviz-nox libxml2 pkg-config which ];
+
+  buildInputs = [ systemd ];
+
+  hardeningDisable = [ "format" ];
+
+  enableParallelBuilding = true;
+
+  makeFlags = [
+    "PREFIX=${placeholder "out"}"
+  ];
+
+  FONTCONFIG_FILE="${fontconfig.out}/etc/fonts/fonts.conf";
+  FONTCONFIG_PATH="${fontconfig.out}/etc/fonts/";
+
+  postPatch = ''
+    substituteInPlace cpp/src/Options.cpp \
+      --replace /etc/openzwave $out/etc/openzwave
+  '';
+
+  meta = with lib; {
+    description = "C++ library to control Z-Wave Networks via a USB Z-Wave Controller";
+    homepage = "http://www.openzwave.net/";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/oracle-instantclient/default.nix b/nixpkgs/pkgs/development/libraries/oracle-instantclient/default.nix
new file mode 100644
index 000000000000..87381141d98f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/oracle-instantclient/default.nix
@@ -0,0 +1,149 @@
+{ lib
+, stdenv
+, fetchurl
+, autoPatchelfHook
+, fixDarwinDylibNames
+, unzip
+, libaio
+, makeWrapper
+, odbcSupport ? true
+, unixODBC
+}:
+
+assert odbcSupport -> unixODBC != null;
+
+let
+  inherit (lib) optional optionals optionalString;
+
+  throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}";
+
+  # assemble list of components
+  components = [ "basic" "sdk" "sqlplus" "tools" ] ++ optional odbcSupport "odbc";
+
+  # determine the version number, there might be different ones per architecture
+  version = {
+    x86_64-linux = "21.10.0.0.0";
+    aarch64-linux = "19.10.0.0.0";
+    x86_64-darwin = "19.8.0.0.0";
+  }.${stdenv.hostPlatform.system} or throwSystem;
+
+  directory = {
+    x86_64-linux = "2110000";
+    aarch64-linux = "191000";
+    x86_64-darwin = "198000";
+  }.${stdenv.hostPlatform.system} or throwSystem;
+
+  # hashes per component and architecture
+  hashes = {
+    x86_64-linux = {
+      basic = "sha256-uo0QBOmx7TQyroD+As60IhjEkz//+0Cm1tWvLI3edaE=";
+      sdk = "sha256-TIBFi1jHLJh+SUNFvuL7aJpxh61hG6gXhFIhvdPgpts=";
+      sqlplus = "sha256-mF9kLjhZXe/fasYDfmZrYPL2CzAp3xDbi624RJDA4lM=";
+      tools = "sha256-ay8ynzo1fPHbCg9GoIT5ja//iZPIZA2yXI/auVExiRY=";
+      odbc = "sha256-3M6/cEtUrIFzQay8eHNiLGE+L0UF+VTmzp4cSBcrzlk=";
+    };
+    aarch64-linux = {
+      basic = "sha256-DNntH20BAmo5kOz7uEgW2NXaNfwdvJ8l8oMnp50BOsY=";
+      sdk = "sha256-8VpkNyLyFMUfQwbZpSDV/CB95RoXfaMr8w58cRt/syw=";
+      sqlplus = "sha256-iHcyijHhAvjsAqN9R+Rxo2R47k940VvPbScc2MWYn0Q=";
+      tools = "sha256-4QY0EwcnctwPm6ZGDZLudOFM4UycLFmRIluKGXVwR0M=";
+      odbc = "sha256-T+RIIKzZ9xEg/E72pfs5xqHz2WuIWKx/oRfDrQbw3ms=";
+    };
+    x86_64-darwin = {
+      basic = "sha256-V+1BmPOhDYPNXdwkcsBY1MOwt4Yka66/a7/HORzBIIc=";
+      sdk = "sha256-D6iuTEQYqmbOh1z5LnKN16ga6vLmjnkm4QK15S/Iukw=";
+      sqlplus = "sha256-08uoiwoKPZmTxLZLYRVp0UbN827FXdhOukeDUXvTCVk=";
+      tools = "sha256-1xFFGZapFq9ogGQ6ePSv4PrXl5qOAgRZWAp4mJ5uxdU=";
+      odbc = "sha256-S6+5P4daK/+nXwoHmOkj4DIkHtwdzO5GOkCCI612bRY=";
+    };
+  }.${stdenv.hostPlatform.system} or throwSystem;
+
+  # rels per component and architecture, optional
+  rels = { }.${stdenv.hostPlatform.system} or { };
+
+  # convert platform to oracle architecture names
+  arch = {
+    x86_64-linux = "linux.x64";
+    aarch64-linux = "linux.arm64";
+    x86_64-darwin = "macos.x64";
+  }.${stdenv.hostPlatform.system} or throwSystem;
+
+  shortArch = {
+    x86_64-linux = "linux";
+    aarch64-linux = "linux";
+    x86_64-darwin = "mac";
+  }.${stdenv.hostPlatform.system} or throwSystem;
+
+  # calculate the filename of a single zip file
+  srcFilename = component: arch: version: rel:
+    "instantclient-${component}-${arch}-${version}" +
+    (optionalString (rel != "") "-${rel}") +
+    "dbru.zip"; # ¯\_(ツ)_/¯
+
+  # fetcher for the non clickthrough artifacts
+  fetcher = srcFilename: hash: fetchurl {
+    url = "https://download.oracle.com/otn_software/${shortArch}/instantclient/${directory}/${srcFilename}";
+    sha256 = hash;
+  };
+
+  # assemble srcs
+  srcs = map
+    (component:
+      (fetcher (srcFilename component arch version rels.${component} or "") hashes.${component} or ""))
+    components;
+
+  pname = "oracle-instantclient";
+  extLib = stdenv.hostPlatform.extensions.sharedLibrary;
+in
+stdenv.mkDerivation {
+  inherit pname version srcs;
+
+  buildInputs = [ stdenv.cc.cc.lib ]
+    ++ optional stdenv.isLinux libaio
+    ++ optional odbcSupport unixODBC;
+
+  nativeBuildInputs = [ makeWrapper unzip ]
+    ++ optional stdenv.isLinux autoPatchelfHook
+    ++ optional stdenv.isDarwin fixDarwinDylibNames;
+
+  outputs = [ "out" "dev" "lib" ];
+
+  unpackCmd = "unzip $curSrc";
+
+  installPhase = ''
+    mkdir -p "$out/"{bin,include,lib,"share/java","share/${pname}-${version}/demo/"} $lib/lib
+    install -Dm755 {adrci,genezi,uidrvci,sqlplus,exp,expdp,imp,impdp} $out/bin
+
+    # cp to preserve symlinks
+    cp -P *${extLib}* $lib/lib
+
+    install -Dm644 *.jar $out/share/java
+    install -Dm644 sdk/include/* $out/include
+    install -Dm644 sdk/demo/* $out/share/${pname}-${version}/demo
+
+    # provide alias
+    ln -sfn $out/bin/sqlplus $out/bin/sqlplus64
+  '';
+
+  postFixup = optionalString stdenv.isDarwin ''
+    for exe in "$out/bin/"* ; do
+      if [ ! -L "$exe" ]; then
+        install_name_tool -add_rpath "$lib/lib" "$exe"
+      fi
+    done
+  '';
+
+  meta = with lib; {
+    description = "Oracle instant client libraries and sqlplus CLI";
+    longDescription = ''
+      Oracle instant client provides access to Oracle databases (OCI,
+      OCCI, Pro*C, ODBC or JDBC). This package includes the sqlplus
+      command line SQL client.
+    '';
+    sourceProvenance = with sourceTypes; [ binaryBytecode ];
+    license = licenses.unfree;
+    platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
+    maintainers = with maintainers; [ dylanmtaylor ];
+    hydraPlatforms = [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/orcania/default.nix b/nixpkgs/pkgs/development/libraries/orcania/default.nix
new file mode 100644
index 000000000000..f0334ea4de16
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/orcania/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub, cmake, check, subunit }:
+stdenv.mkDerivation rec {
+  pname = "orcania";
+  version = "2.3.3";
+
+  src = fetchFromGitHub {
+    owner = "babelouest";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-Cz3IE5UrfoWjMxQ/+iR1bLsYxf5DVN+7aJqLBcPjduA=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  nativeCheckInputs = [ check subunit ];
+
+  cmakeFlags = [ "-DBUILD_ORCANIA_TESTING=on" ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Potluck with different functions for different purposes that can be shared among C programs";
+    homepage = "https://github.com/babelouest/orcania";
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ johnazoidberg ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/orocos-kdl/default.nix b/nixpkgs/pkgs/development/libraries/orocos-kdl/default.nix
new file mode 100644
index 000000000000..05a3cefaeceb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/orocos-kdl/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, cmake, eigen }:
+
+stdenv.mkDerivation rec {
+  pname = "orocos-kdl";
+  version = "1.5.1";
+
+  src = fetchFromGitHub {
+    owner = "orocos";
+    repo = "orocos_kinematics_dynamics";
+    rev = "v${version}";
+    sha256 = "15ky7vw461005axx96d0f4zxdnb9dxl3h082igyd68sbdb8r1419";
+    # Needed to build Python bindings
+    fetchSubmodules = true;
+  };
+
+  sourceRoot = "${src.name}/orocos_kdl";
+
+  nativeBuildInputs = [ cmake ];
+  propagatedBuildInputs = [ eigen ];
+
+  meta = with lib; {
+    description = "Kinematics and Dynamics Library";
+    homepage = "https://www.orocos.org/kdl.html";
+    license = licenses.lgpl21Only;
+    maintainers = with maintainers; [ lopsided98 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ortp/default.nix b/nixpkgs/pkgs/development/libraries/ortp/default.nix
new file mode 100644
index 000000000000..1c65fa1981f1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ortp/default.nix
@@ -0,0 +1,36 @@
+{ bctoolbox
+, cmake
+, fetchFromGitLab
+, lib
+, stdenv
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ortp";
+  version = "5.2.109";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.linphone.org";
+    owner = "public";
+    group = "BC";
+    repo = pname;
+    rev = version;
+    hash = "sha256-EgUPICdKi8c/E6uonZB4DKyOZ3Od4JM5/bR2U6cq9ew=";
+  };
+
+  # Do not build static libraries
+  cmakeFlags = [ "-DENABLE_STATIC=NO" ];
+
+  env.NIX_CFLAGS_COMPILE = "-Wno-error=stringop-truncation";
+
+  buildInputs = [ bctoolbox ];
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "A Real-Time Transport Protocol (RFC3550) stack. Part of the Linphone project.";
+    homepage = "https://linphone.org/technical-corner/ortp";
+    license = licenses.gpl3Plus;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ jluttine ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/osip/default.nix b/nixpkgs/pkgs/development/libraries/osip/default.nix
new file mode 100644
index 000000000000..f7cedc96b7c7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/osip/default.nix
@@ -0,0 +1,17 @@
+{lib, stdenv, fetchurl}:
+stdenv.mkDerivation rec {
+  version = "5.3.1";
+  src = fetchurl {
+    url = "mirror://gnu/osip/libosip2-${version}.tar.gz";
+    sha256 = "sha256-/oL+hBYIJmrBWlwRGCFtoAxVTVAG4odaisN1Kx5q3Hk=";
+  };
+  pname = "libosip2";
+
+  meta = {
+    license = lib.licenses.lgpl21Plus;
+    homepage = "https://www.gnu.org/software/osip/";
+    description = "The GNU oSIP library, an implementation of the Session Initiation Protocol (SIP)";
+    maintainers = with lib.maintainers; [ raskin ];
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/osm-gps-map/default.nix b/nixpkgs/pkgs/development/libraries/osm-gps-map/default.nix
new file mode 100644
index 000000000000..9fa4bf10f47f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/osm-gps-map/default.nix
@@ -0,0 +1,28 @@
+{ cairo, fetchzip, glib, gnome, gtk3, gobject-introspection, pkg-config, lib, stdenv }:
+
+stdenv.mkDerivation rec {
+  pname = "osm-gps-map";
+  version = "1.2.0";
+
+  src = fetchzip {
+    url = "https://github.com/nzjrs/osm-gps-map/releases/download/${version}/osm-gps-map-${version}.tar.gz";
+    sha256 = "sha256-ciw28YXhR+GC6B2VPC+ZxjyhadOk3zYGuOssSgqjwH0=";
+  };
+
+  outputs = [ "out" "dev" "doc" ];
+
+  nativeBuildInputs = [ pkg-config gobject-introspection ];
+
+  buildInputs = [
+    cairo glib
+    gnome.gnome-common gtk3 gnome.libsoup
+  ];
+
+  meta = with lib; {
+    description = "GTK widget for displaying OpenStreetMap tiles";
+    homepage = "https://nzjrs.github.io/osm-gps-map";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ hrdinka ];
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/p11-kit/default.nix b/nixpkgs/pkgs/development/libraries/p11-kit/default.nix
new file mode 100644
index 000000000000..ab9bfcbc1d97
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/p11-kit/default.nix
@@ -0,0 +1,98 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, meson
+, ninja
+, pkg-config
+, libtasn1
+, libxslt
+, docbook-xsl-nons
+, docbook_xml_dtd_43
+, gettext
+, mesonEmulatorHook
+, libffi
+, libintl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "p11-kit";
+  version = "0.25.3";
+
+  src = fetchFromGitHub {
+    owner = "p11-glue";
+    repo = pname;
+    rev = version;
+    hash = "sha256-zIbkw0pwt4TdyjncnSDeTN6Gsx7cc+x7Un4rnagZxQk=";
+    fetchSubmodules = true;
+  };
+
+  outputs = [ "out" "bin" "dev" ];
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    libtasn1 # asn1Parser
+    libxslt # xsltproc
+    docbook-xsl-nons
+    docbook_xml_dtd_43
+    gettext
+  ] ++ lib.optionals
+    (!stdenv.buildPlatform.canExecute stdenv.hostPlatform
+      && !stdenv.hostPlatform.isMinGW) [
+    mesonEmulatorHook
+  ];
+
+  buildInputs = [
+    libffi
+    libtasn1
+    libintl
+  ];
+
+  mesonFlags = [
+    "--sysconfdir=/etc"
+    (lib.mesonBool "man" true)
+    (lib.mesonEnable "systemd" false)
+    (lib.mesonOption "bashcompdir" "${placeholder "bin"}/share/bash-completion/completions")
+    (lib.mesonOption "trust_paths" (lib.concatStringsSep ":" [
+      "/etc/ssl/trust-source" # p11-kit trust source
+      "/etc/ssl/certs/ca-certificates.crt" # NixOS + Debian/Ubuntu/Arch/Gentoo...
+      "/etc/pki/tls/certs/ca-bundle.crt" # Fedora/CentOS
+      "/var/lib/ca-certificates/ca-bundle.pem" # openSUSE
+      "/etc/ssl/cert.pem" # Darwin/macOS
+    ]))
+  ];
+
+  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
+
+  postPatch = ''
+    # Install sample config files to $out/etc even though they will be loaded from /etc.
+    substituteInPlace p11-kit/meson.build \
+      --replace 'install_dir: prefix / p11_system_config' "install_dir: '$out/etc/pkcs11'"
+  '';
+
+  preCheck = ''
+    # Tests run in fakeroot for non-root users (with Nix single-user install)
+    if [ "$(id -u)" != "0" ]; then
+      export FAKED_MODE=1
+    fi
+  '';
+
+  meta = with lib; {
+    description = "Library for loading and sharing PKCS#11 modules";
+    longDescription = ''
+      Provides a way to load and enumerate PKCS#11 modules.
+      Provides a standard configuration setup for installing
+      PKCS#11 modules in such a way that they're discoverable.
+    '';
+    homepage = "https://p11-glue.github.io/p11-glue/p11-kit.html";
+    changelog = [
+      "https://github.com/p11-glue/p11-kit/raw/${version}/NEWS"
+      "https://github.com/p11-glue/p11-kit/releases/tag/${version}"
+    ];
+    platforms = platforms.all;
+    license = licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/packr/default.nix b/nixpkgs/pkgs/development/libraries/packr/default.nix
new file mode 100644
index 000000000000..1a5bacad59f8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/packr/default.nix
@@ -0,0 +1,76 @@
+{ stdenv
+, buildGoModule
+, fetchFromGitHub
+, lib
+, symlinkJoin
+}:
+
+let p2 = buildGoModule rec {
+  pname = "packr2";
+  version = "2.8.0";
+
+  src = fetchFromGitHub {
+    owner = "gobuffalo";
+    repo = "packr";
+    rev = "v${version}";
+    hash = "sha256-UfnL3Lnq3ocXrTqKtmyar6BoKUUHHKMOFCiD5wX26PQ=";
+  }+"/v2";
+
+  subPackages = [ "packr2" ];
+
+  vendorHash = "sha256-N3u+DmEe0r72zFPb8El/MwjyIcTehQRE+MgusIII2Is=";
+
+  doCheck = false;
+
+  meta = with lib; {
+    description = "The simple and easy way to embed static files into Go binaries";
+    homepage = "https://github.com/gobuffalo/packr";
+    license = licenses.mit;
+    maintainers = with maintainers; [ mmahut ];
+
+    # golang.org/x/sys needs to be updated due to:
+    #
+    #   https://github.com/golang/go/issues/49219
+    #
+    # but this package is no longer maintained.
+    #
+    broken = stdenv.isDarwin;
+  };
+};
+p1 = buildGoModule rec {
+  pname = "packr1";
+  version = "2.8.0";
+
+  src = fetchFromGitHub {
+    owner = "gobuffalo";
+    repo = "packr";
+    rev = "v${version}";
+    hash = "sha256-UfnL3Lnq3ocXrTqKtmyar6BoKUUHHKMOFCiD5wX26PQ=";
+  };
+
+  subPackages = [ "packr" ];
+
+  vendorHash = "sha256-6mlV3q7irI0aoeB91OYSD3RvmwYcNXRNkSYowjmSflQ=";
+
+  doCheck = false;
+
+  meta = with lib; {
+    description = "The simple and easy way to embed static files into Go binaries";
+    homepage = "https://github.com/gobuffalo/packr";
+    license = licenses.mit;
+    maintainers = with maintainers; [ mmahut ];
+
+    # golang.org/x/sys needs to be updated due to:
+    #
+    #   https://github.com/golang/go/issues/49219
+    #
+    # but this package is no longer maintained.
+    #
+    broken = stdenv.isDarwin;
+  };
+};
+in
+symlinkJoin{
+    name = "packr";
+    paths = [p1 p2];
+}
diff --git a/nixpkgs/pkgs/development/libraries/pagmo2/default.nix b/nixpkgs/pkgs/development/libraries/pagmo2/default.nix
new file mode 100644
index 000000000000..4bbf6f77288f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pagmo2/default.nix
@@ -0,0 +1,50 @@
+{ fetchFromGitHub
+, lib, stdenv
+, cmake
+, eigen
+, nlopt
+, ipopt
+, boost
+, tbb
+ # tests pass but take 30+ minutes
+, runTests ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "pagmo2";
+  version = "2.19.0";
+
+  src = fetchFromGitHub {
+     owner = "esa";
+     repo = "pagmo2";
+     rev = "v${version}";
+     sha256 = "sha256-z5kg2xKZ666EPK844yp+hi4iGisaIPme9xNdzsAEEjw=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ eigen nlopt boost tbb ] ++ lib.optional (!stdenv.isDarwin) ipopt;
+
+  cmakeFlags = [
+    "-DPAGMO_BUILD_TESTS=${if runTests then "ON" else "OFF"}"
+    "-DPAGMO_WITH_EIGEN3=yes"
+    "-DPAGMO_WITH_NLOPT=yes"
+    "-DNLOPT_LIBRARY=${nlopt}/lib/libnlopt${stdenv.hostPlatform.extensions.sharedLibrary}"
+  ] ++ lib.optionals stdenv.isLinux [
+    "-DPAGMO_WITH_IPOPT=yes"
+    "-DCMAKE_CXX_FLAGS='-fuse-ld=gold'"
+  ] ++ lib.optionals stdenv.isDarwin [
+    # FIXME: fails ipopt test with Invalid_Option on darwin, so disable.
+    "-DPAGMO_WITH_IPOPT=no"
+    "-DLLVM_USE_LINKER=gold"
+  ];
+
+  doCheck = runTests;
+
+  meta = with lib; {
+    homepage = "https://esa.github.io/pagmo2/";
+    description = "Scientific library for massively parallel optimization";
+    license = licenses.gpl3Plus;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.costrouc ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/paho-mqtt-c/default.nix b/nixpkgs/pkgs/development/libraries/paho-mqtt-c/default.nix
new file mode 100644
index 000000000000..149432788221
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/paho-mqtt-c/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, cmake, openssl }:
+
+stdenv.mkDerivation rec {
+  pname = "paho.mqtt.c";
+  version = "1.3.13";
+
+  src = fetchFromGitHub {
+    owner = "eclipse";
+    repo = "paho.mqtt.c";
+    rev = "v${version}";
+    hash = "sha256-dKQnepQAryAjImh2rX1jdgiKBtJQy9wzk/7rGQjUtPg=";
+  };
+
+  postPatch = ''
+    substituteInPlace src/MQTTVersion.c \
+      --replace "namebuf[60]" "namebuf[120]" \
+      --replace "lib%s" "$out/lib/lib%s"
+  '';
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ openssl ];
+
+  cmakeFlags = [ "-DPAHO_WITH_SSL=TRUE" ];
+
+  meta = with lib; {
+    description = "Eclipse Paho MQTT C Client Library";
+    homepage = "https://www.eclipse.org/paho/";
+    license = licenses.epl20;
+    maintainers = with maintainers; [ sikmir ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/paho-mqtt-cpp/default.nix b/nixpkgs/pkgs/development/libraries/paho-mqtt-cpp/default.nix
new file mode 100644
index 000000000000..62d9aa597792
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/paho-mqtt-cpp/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, cmake, openssl, paho-mqtt-c }:
+
+stdenv.mkDerivation rec {
+  pname = "paho.mqtt.cpp";
+  version = "1.3.2";
+
+  src = fetchFromGitHub {
+    owner = "eclipse";
+    repo = "paho.mqtt.cpp";
+    rev = "v${version}";
+    hash = "sha256-c2umToT4w+L7bgzp1bCEcb0ECHvxKZ2t6JI5SmUySPo=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ openssl paho-mqtt-c ];
+
+  meta = with lib; {
+    description = "Eclipse Paho MQTT C++ Client Library";
+    homepage = "https://www.eclipse.org/paho/";
+    license = licenses.epl10;
+    maintainers = with maintainers; [ sikmir ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pango/default.nix b/nixpkgs/pkgs/development/libraries/pango/default.nix
new file mode 100644
index 000000000000..0fae50cdbfed
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pango/default.nix
@@ -0,0 +1,128 @@
+{ lib
+, stdenv
+, fetchurl
+, pkg-config
+, cairo
+, harfbuzz
+, libintl
+, libthai
+, darwin
+, fribidi
+, gnome
+, gi-docgen
+, makeFontsConf
+, freefont_ttf
+, meson
+, ninja
+, glib
+, python3
+, x11Support? !stdenv.isDarwin, libXft
+, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
+, buildPackages, gobject-introspection
+}:
+
+stdenv.mkDerivation rec {
+  pname = "pango";
+  version = "1.51.0";
+
+  outputs = [ "bin" "out" "dev" ] ++ lib.optional withIntrospection "devdoc";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "dO/BCa5vkDu+avd+qirGCUuO4kWi4j8TKnqPCGLRqfU=";
+  };
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    meson ninja
+    glib # for glib-mkenum
+    pkg-config
+    python3
+  ] ++ lib.optionals withIntrospection [
+    gi-docgen
+    gobject-introspection
+  ];
+
+  buildInputs = [
+    fribidi
+    libthai
+  ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
+    ApplicationServices
+    Carbon
+    CoreGraphics
+    CoreText
+  ]);
+
+  propagatedBuildInputs = [
+    cairo
+    glib
+    libintl
+    harfbuzz
+  ] ++ lib.optionals x11Support [
+    libXft
+  ];
+
+  mesonFlags = [
+    (lib.mesonBool "gtk_doc" withIntrospection)
+    (lib.mesonEnable "introspection" withIntrospection)
+    (lib.mesonEnable "xft" x11Support)
+  ];
+
+  # Fontconfig error: Cannot load default config file
+  FONTCONFIG_FILE = makeFontsConf {
+    fontDirectories = [ freefont_ttf ];
+  };
+
+  # Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake)
+  # it should be a build-time dep for build
+  # TODO: send upstream
+  postPatch = ''
+    substituteInPlace docs/meson.build \
+      --replace "'gi-docgen', req" "'gi-docgen', native:true, req"
+  '';
+
+  doCheck = false; # test-font: FAIL
+
+  postFixup = ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      # 1.90 is alpha for API 2.
+      freeze = "1.90.0";
+    };
+  };
+
+  meta = with lib; {
+    description = "A library for laying out and rendering of text, with an emphasis on internationalization";
+
+    longDescription = ''
+      Pango is a library for laying out and rendering of text, with an
+      emphasis on internationalization.  Pango can be used anywhere
+      that text layout is needed, though most of the work on Pango so
+      far has been done in the context of the GTK widget toolkit.
+      Pango forms the core of text and font handling for GTK.
+    '';
+
+    homepage = "https://www.pango.org/";
+    license = licenses.lgpl2Plus;
+
+    maintainers = with maintainers; [ raskin ] ++ teams.gnome.members;
+    platforms = platforms.unix;
+
+    pkgConfigModules = [
+      "pango"
+      "pangocairo"
+      "pangofc"
+      "pangoft2"
+      "pangoot"
+      "pangoxft"
+    ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pangolin/default.nix b/nixpkgs/pkgs/development/libraries/pangolin/default.nix
new file mode 100644
index 000000000000..4618a6d43187
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pangolin/default.nix
@@ -0,0 +1,54 @@
+{ stdenv, lib, fetchFromGitHub, cmake, pkg-config, doxygen, libGL, glew
+, xorg, ffmpeg_4, libjpeg, libpng, libtiff, eigen
+, Carbon ? null, Cocoa ? null
+}:
+
+stdenv.mkDerivation rec {
+  pname = "pangolin";
+
+  version = "0.9.1";
+
+  src = fetchFromGitHub {
+    owner = "stevenlovegrove";
+    repo = "Pangolin";
+    rev = "v${version}";
+    sha256 = "sha256-B5YuNcJZHjR3dlVs66rySi68j29O3iMtlQvCjTUZBeY=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config doxygen ];
+
+  buildInputs = [
+    libGL
+    glew
+    xorg.libX11
+    ffmpeg_4
+    libjpeg
+    libpng
+    libtiff
+    eigen
+  ]
+  ++ lib.optionals stdenv.isDarwin [ Carbon Cocoa ];
+
+  # The tests use cmake's findPackage to find the installed version of
+  # pangolin, which isn't what we want (or available).
+  doCheck = false;
+  cmakeFlags = [ "-DBUILD_TESTS=OFF" ];
+
+  meta = {
+    description = "A lightweight portable rapid development library for managing OpenGL display / interaction and abstracting video input";
+    longDescription = ''
+      Pangolin is a lightweight portable rapid development library for managing
+      OpenGL display / interaction and abstracting video input. At its heart is
+      a simple OpenGl viewport manager which can help to modularise 3D
+      visualisation without adding to its complexity, and offers an advanced
+      but intuitive 3D navigation handler. Pangolin also provides a mechanism
+      for manipulating program variables through config files and ui
+      integration, and has a flexible real-time plotter for visualising
+      graphical data.
+    '';
+    homepage = "https://github.com/stevenlovegrove/Pangolin";
+    license = lib.licenses.mit;
+    maintainers = [ lib.maintainers.expipiplus1 ];
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pangomm/2.42.2-add-missing-include-attrlist.cc.patch b/nixpkgs/pkgs/development/libraries/pangomm/2.42.2-add-missing-include-attrlist.cc.patch
new file mode 100644
index 000000000000..019c2dec2bc9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pangomm/2.42.2-add-missing-include-attrlist.cc.patch
@@ -0,0 +1,12 @@
+diff --git a/untracked/pango/pangomm/attrlist.cc b/untracked/pango/pangomm/attrlist.cc
+index 76c3341..0c6d68d 100755
+--- a/untracked/pango/pangomm/attrlist.cc
++++ b/untracked/pango/pangomm/attrlist.cc
+@@ -3,6 +3,7 @@
+ 
+ #include <glibmm.h>
+ 
++#include <pango-1.0/pango/pango-markup.h>
+ #include <pangomm/attrlist.h>
+ #include <pangomm/private/attrlist_p.h>
+ 
diff --git a/nixpkgs/pkgs/development/libraries/pangomm/2.42.nix b/nixpkgs/pkgs/development/libraries/pangomm/2.42.nix
new file mode 100644
index 000000000000..267e46c48c3d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pangomm/2.42.nix
@@ -0,0 +1,55 @@
+{ lib, stdenv, fetchurl, pkg-config, meson, ninja, python3, pango, glibmm, cairomm, gnome
+, ApplicationServices }:
+
+stdenv.mkDerivation rec {
+  pname = "pangomm";
+  version= "2.42.2";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-GyTJJiSuEnXMtXdYF10198Oa0zQtjAtLpg8NmEnS0Io=";
+  };
+
+  patches = [
+    # Fixes a missing include leading to build failures while compiling `attrlist.cc` (as outlined by @dslm4515 [1])
+    # Note that the files in that directory are generated and not tracked in Git [2], which is why we can't simply
+    # try to cherry-pick an upstream patch from future versions.
+    # [1]: https://github.com/dslm4515/BMLFS/issues/16#issuecomment-914624797
+    # [2]: https://github.com/GNOME/pangomm/tree/master/untracked
+    ./2.42.2-add-missing-include-attrlist.cc.patch
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ pkg-config meson ninja python3 ] ++ lib.optionals stdenv.isDarwin [
+    ApplicationServices
+  ];
+  propagatedBuildInputs = [ pango glibmm cairomm ];
+
+  doCheck = true;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+      freeze = true;
+    };
+  };
+
+  meta = with lib; {
+    broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
+    description = "C++ interface to the Pango text rendering library";
+    homepage    = "https://www.pango.org/";
+    license     = with licenses; [ lgpl2 lgpl21 ];
+    maintainers = with maintainers; [ lovek323 raskin ];
+    platforms   = platforms.unix;
+
+    longDescription = ''
+      Pango is a library for laying out and rendering of text, with an
+      emphasis on internationalization.  Pango can be used anywhere
+      that text layout is needed, though most of the work on Pango so
+      far has been done in the context of the GTK widget toolkit.
+      Pango forms the core of text and font handling for GTK.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pangomm/2.48.nix b/nixpkgs/pkgs/development/libraries/pangomm/2.48.nix
new file mode 100644
index 000000000000..0e8bbe80dd84
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pangomm/2.48.nix
@@ -0,0 +1,65 @@
+{ stdenv
+, lib
+, fetchurl
+, pkg-config
+, meson
+, ninja
+, python3
+, pango
+, glibmm_2_68
+, cairomm_1_16
+, gnome
+, ApplicationServices
+}:
+
+stdenv.mkDerivation rec {
+  pname = "pangomm";
+  version= "2.50.2";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-G8WrTqMoBEJYDWgxgibas2zu38Moj52DcRz3z6tQqfs=";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+    meson
+    ninja
+    python3
+  ] ++ lib.optionals stdenv.isDarwin [
+    ApplicationServices
+  ];
+
+  propagatedBuildInputs = [
+    pango
+    glibmm_2_68
+    cairomm_1_16
+  ];
+
+  doCheck = true;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      attrPath = "${pname}_2_48";
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    description = "C++ interface to the Pango text rendering library";
+    longDescription = ''
+      Pango is a library for laying out and rendering of text, with an
+      emphasis on internationalization.  Pango can be used anywhere
+      that text layout is needed, though most of the work on Pango so
+      far has been done in the context of the GTK widget toolkit.
+      Pango forms the core of text and font handling for GTK.
+    '';
+    homepage = "https://www.pango.org/";
+    license = licenses.lgpl21Plus;
+    maintainers = teams.gnome.members ++ (with maintainers; [ lovek323 raskin ]);
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pangomm/default.nix b/nixpkgs/pkgs/development/libraries/pangomm/default.nix
new file mode 100644
index 000000000000..02a76869cf1e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pangomm/default.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, fetchurl, pkg-config, meson, ninja, python3, pango, glibmm, cairomm, gnome
+, ApplicationServices }:
+
+stdenv.mkDerivation rec {
+  pname = "pangomm";
+  version= "2.46.4";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-uSAWZhUmQk3kuTd/FRL1l4H0H7FsnAJn1hM7oc1o2yI=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ pkg-config meson ninja python3 ] ++ lib.optionals stdenv.isDarwin [
+    ApplicationServices
+  ];
+  propagatedBuildInputs = [ pango glibmm cairomm ];
+
+  doCheck = true;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+      freeze = true;
+    };
+  };
+
+  meta = with lib; {
+    description = "C++ interface to the Pango text rendering library";
+    homepage    = "https://www.pango.org/";
+    license     = with licenses; [ lgpl2 lgpl21 ];
+    maintainers = with maintainers; [ lovek323 raskin ];
+    platforms   = platforms.unix;
+
+    longDescription = ''
+      Pango is a library for laying out and rendering of text, with an
+      emphasis on internationalization.  Pango can be used anywhere
+      that text layout is needed, though most of the work on Pango so
+      far has been done in the context of the GTK widget toolkit.
+      Pango forms the core of text and font handling for GTK.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/parquet-cpp/api.patch b/nixpkgs/pkgs/development/libraries/parquet-cpp/api.patch
new file mode 100644
index 000000000000..3fd567ea098f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/parquet-cpp/api.patch
@@ -0,0 +1,12 @@
+diff --git a/src/parquet/arrow/reader.cc b/src/parquet/arrow/reader.cc
+--- a/src/parquet/arrow/reader.cc
++++ b/src/parquet/arrow/reader.cc
+@@ -1421,7 +1421,7 @@ Status StructImpl::DefLevelsToNullArray(std::shared_ptr<Buffer>* null_bitmap_out
+   const int16_t* def_levels_data;
+   size_t def_levels_length;
+   RETURN_NOT_OK(GetDefLevels(&def_levels_data, &def_levels_length));
+-  RETURN_NOT_OK(AllocateEmptyBitmap(pool_, def_levels_length, &null_bitmap));
++  RETURN_NOT_OK(GetEmptyBitmap(pool_, def_levels_length, &null_bitmap));
+   uint8_t* null_bitmap_ptr = null_bitmap->mutable_data();
+   for (size_t i = 0; i < def_levels_length; i++) {
+     if (def_levels_data[i] < struct_def_level_) {
diff --git a/nixpkgs/pkgs/development/libraries/parson/default.nix b/nixpkgs/pkgs/development/libraries/parson/default.nix
new file mode 100644
index 000000000000..a1f5c9a7285d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/parson/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub, meson, ninja }:
+
+stdenv.mkDerivation {
+  pname = "parson";
+  version = "1.5.3";
+
+  src = fetchFromGitHub {
+    owner = "kgabis";
+    repo = "parson";
+    rev = "ba29f4eda9ea7703a9f6a9cf2b0532a2605723c3"; # upstream doesn't use tags
+    hash = "sha256-IEmCa0nauUzG+zcLpr++ySD7i21zVJh/35r9RaQkok0=";
+  };
+
+  nativeBuildInputs = [ meson ninja ];
+
+  meta = with lib; {
+    description = "Lightweight JSON library written in C";
+    homepage = "https://github.com/kgabis/parson";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = [ maintainers.marsam ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/partio/default.nix b/nixpkgs/pkgs/development/libraries/partio/default.nix
new file mode 100644
index 000000000000..472478e37100
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/partio/default.nix
@@ -0,0 +1,63 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, unzip
+, cmake
+, freeglut
+, libGLU
+, libGL
+, zlib
+, swig
+, doxygen
+, xorg
+, python3
+, darwin
+}:
+
+stdenv.mkDerivation rec {
+  pname = "partio";
+  version = "1.17.1";
+
+  src = fetchFromGitHub {
+    owner = "wdas";
+    repo = "partio";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-3t3y3r4R/ePw2QE747rqumbrYRm1wNkSKN3n8MPPIVg=";
+  };
+
+  outputs = [ "dev" "out" "lib" ];
+
+  nativeBuildInputs = [
+    unzip
+    cmake
+    doxygen
+  ];
+
+  buildInputs = [
+    zlib
+    swig
+    xorg.libXi
+    xorg.libXmu
+    python3
+  ] ++ lib.optionals stdenv.isDarwin [
+    darwin.apple_sdk.frameworks.Cocoa
+    darwin.apple_sdk.frameworks.GLUT
+  ] ++ lib.optionals (!stdenv.isDarwin) [
+    freeglut
+    libGLU
+    libGL
+  ];
+
+  # TODO:
+  # Sexpr support
+
+  strictDeps = true;
+
+  meta = with lib; {
+    description = "C++ (with python bindings) library for easily reading/writing/manipulating common animation particle formats such as PDB, BGEO, PTC";
+    homepage = "https://github.com/wdas/partio";
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.guibou ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pc-ble-driver/default.nix b/nixpkgs/pkgs/development/libraries/pc-ble-driver/default.nix
new file mode 100644
index 000000000000..7a7b8475d7c4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pc-ble-driver/default.nix
@@ -0,0 +1,54 @@
+{ lib, stdenv, fetchpatch, fetchFromGitHub
+, cmake, git
+, asio, catch2, spdlog
+, IOKit, udev
+}:
+
+stdenv.mkDerivation rec {
+  pname = "pc-ble-driver";
+  version = "4.1.4";
+
+  src = fetchFromGitHub {
+    owner = "NordicSemiconductor";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-srH7Gdiy9Lsv68fst/9jhifx03R2e+4kMia6pU/oCZg=";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "support-arm.patch";
+      url = "https://github.com/NordicSemiconductor/pc-ble-driver/commit/76a6b31dba7a13ceae40587494cbfa01a29192f4.patch";
+      hash = "sha256-bvK1BXjdlhIXV8R4PiCGaq8oSLzgjMmTgAwssm8N2sk=";
+    })
+     # Fix build with GCC 11
+    (fetchpatch {
+      url = "https://github.com/NordicSemiconductor/pc-ble-driver/commit/37258e65bdbcd0b4369ae448faf650dd181816ec.patch";
+      hash = "sha256-gOdzIW8YJQC+PE4FJd644I1+I7CMcBY8wpF6g02eI5g=";
+    })
+  ];
+
+  cmakeFlags = [
+    "-DNRF_BLE_DRIVER_VERSION=${version}"
+  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
+    "-DARCH=arm64"
+  ];
+
+  nativeBuildInputs = [ cmake git ];
+  buildInputs = [ asio catch2 spdlog ];
+
+  propagatedBuildInputs = [
+
+  ] ++ lib.optionals stdenv.isDarwin [
+    IOKit
+  ] ++ lib.optionals stdenv.isLinux [
+    udev
+  ];
+
+  meta = with lib; {
+    description = "Desktop library for Bluetooth low energy development";
+    homepage = "https://github.com/NordicSemiconductor/pc-ble-driver";
+    license = licenses.unfreeRedistributable;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pcaudiolib/default.nix b/nixpkgs/pkgs/development/libraries/pcaudiolib/default.nix
new file mode 100644
index 000000000000..c6e67d39c195
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pcaudiolib/default.nix
@@ -0,0 +1,56 @@
+{ config
+, lib
+, stdenv
+, fetchFromGitHub
+, alsa-lib
+, autoconf
+, automake
+, libpulseaudio
+, libtool
+, pkg-config
+, portaudio
+, which
+, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "pcaudiolib";
+  version = "1.2";
+
+  src = fetchFromGitHub {
+    owner = "espeak-ng";
+    repo = finalAttrs.pname;
+    rev = finalAttrs.version;
+    hash = "sha256-ZG/HBk5DHaZP/H3M01vDr3M2nP9awwsPuKpwtalz3EE=";
+  };
+
+  nativeBuildInputs = [
+    autoconf
+    automake
+    libtool
+    pkg-config
+    which
+  ];
+
+  buildInputs = [
+    portaudio
+  ]
+  ++ lib.optional stdenv.isLinux alsa-lib
+  ++ lib.optional pulseaudioSupport libpulseaudio;
+
+  # touch ChangeLog to avoid below error on darwin:
+  # Makefile.am: error: required file './ChangeLog.md' not found
+  preConfigure = lib.optionalString stdenv.isDarwin ''
+    touch ChangeLog
+  '' + ''
+    ./autogen.sh
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/espeak-ng/pcaudiolib";
+    description = "Provides a C API to different audio devices";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ aske ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/pcg-c/default.nix b/nixpkgs/pkgs/development/libraries/pcg-c/default.nix
new file mode 100644
index 000000000000..04aa6c7afbc9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pcg-c/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchzip }:
+
+stdenv.mkDerivation rec {
+  version = "0.94";
+  pname = "pcg-c";
+
+  src = fetchzip {
+    url = "http://www.pcg-random.org/downloads/${pname}-${version}.zip";
+    sha256 = "0smm811xbvs03a5nc2668zd0178wnyri2h023pqffy767bpy1vlv";
+  };
+
+  enableParallelBuilding = true;
+
+  patches = [
+    ./prefix-variable.patch
+    ];
+
+  preInstall = ''
+    sed -i s,/usr/local,$out, Makefile
+    mkdir -p $out/lib $out/include
+  '';
+
+  meta = {
+    description = "A family of better random number generators";
+    homepage = "https://www.pcg-random.org/";
+    license = lib.licenses.asl20;
+    longDescription = ''
+      PCG is a family of simple fast space-efficient statistically good
+      algorithms for random number generation. Unlike many general-purpose RNGs,
+      they are also hard to predict.
+    '';
+    platforms = lib.platforms.unix;
+    maintainers = [ lib.maintainers.linus ];
+    broken = stdenv.isi686; # https://github.com/imneme/pcg-c/issues/11
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pcg-c/prefix-variable.patch b/nixpkgs/pkgs/development/libraries/pcg-c/prefix-variable.patch
new file mode 100644
index 000000000000..bfdcdfa7b17e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pcg-c/prefix-variable.patch
@@ -0,0 +1,15 @@
+diff --git a/Makefile b/Makefile
+index dddea44..fdb9401 100644
+--- a/Makefile
++++ b/Makefile
+@@ -30,8 +30,8 @@ all:
+ PREFIX = /usr/local
+ 
+ install: all
+-	install src/libpcg_random.a $PREFIX/lib
+-	install -m 0644 include/pcg_variants.h $PREFIX/include
++	install src/libpcg_random.a ${PREFIX}/lib
++	install -m 0644 include/pcg_variants.h ${PREFIX}/include
+ 
+ test:   all
+ 	cd test-low; $(MAKE) test
diff --git a/nixpkgs/pkgs/development/libraries/pcl/default.nix b/nixpkgs/pkgs/development/libraries/pcl/default.nix
new file mode 100644
index 000000000000..624ca4aa6672
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pcl/default.nix
@@ -0,0 +1,78 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, wrapQtAppsHook
+, cmake
+, qhull
+, flann
+, boost
+, vtk
+, eigen
+, pkg-config
+, qtbase
+, libusb1
+, libpcap
+, libtiff
+, libXt
+, libpng
+, Cocoa
+, AGL
+, OpenGL
+, config
+, cudaSupport ? config.cudaSupport, cudaPackages
+}:
+
+stdenv.mkDerivation rec {
+  pname = "pcl";
+  version = "1.13.0";
+
+  src = fetchFromGitHub {
+    owner = "PointCloudLibrary";
+    repo = "pcl";
+    rev = "${pname}-${version}";
+    sha256 = "sha256-JDiDAmdpwUR3Sff63ehyvetIFXAgGOrI+HEaZ5lURps=";
+  };
+
+  # remove attempt to prevent (x86/x87-specific) extended precision use
+  # when SSE not detected
+  postPatch = lib.optionalString (!stdenv.hostPlatform.isx86) ''
+    sed -i '/-ffloat-store/d' cmake/pcl_find_sse.cmake
+  '';
+
+  nativeBuildInputs = [
+    pkg-config
+    cmake
+    wrapQtAppsHook
+  ]
+  ++ lib.optionals cudaSupport [ cudaPackages.cuda_nvcc ];
+
+  buildInputs = [
+    eigen
+    libusb1
+    libpcap
+    qtbase
+    libXt
+  ]
+  ++ lib.optionals stdenv.isDarwin [ Cocoa AGL ];
+
+  propagatedBuildInputs = [
+    boost
+    flann
+    libpng
+    libtiff
+    qhull
+    vtk
+  ];
+
+  cmakeFlags = lib.optionals stdenv.isDarwin [
+    "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks"
+  ] ++ lib.optionals cudaSupport [ "-DWITH_CUDA=true" ];
+
+  meta = {
+    homepage = "https://pointclouds.org/";
+    description = "Open project for 2D/3D image and point cloud processing";
+    license = lib.licenses.bsd3;
+    maintainers = with lib.maintainers; [ viric ];
+    platforms = with lib.platforms; linux ++ darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pcmsolver/default.nix b/nixpkgs/pkgs/development/libraries/pcmsolver/default.nix
new file mode 100644
index 000000000000..a957d517bf7a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pcmsolver/default.nix
@@ -0,0 +1,50 @@
+{ lib, stdenv, fetchFromGitHub, cmake, perl, gfortran, python3
+, boost, eigen, zlib
+} :
+
+stdenv.mkDerivation rec {
+  pname = "pcmsolver";
+  version = "1.3.0";
+
+  src = fetchFromGitHub  {
+    owner = "PCMSolver";
+    repo = pname;
+    rev = "v${version}";
+    sha256= "0jrxr8z21hjy7ik999hna9rdqy221kbkl3qkb06xw7g80rc9x9yr";
+  };
+
+  # Glibc 2.34 changed SIGSTKSZ to a dynamic value, which breaks
+  # PCMsolver. Replace SIGSTKZ by the backward-compatible _SC_SIGSTKSZ.
+  postPatch = ''
+    substituteInPlace external/Catch/catch.hpp \
+      --replace SIGSTKSZ _SC_SIGSTKSZ
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    gfortran
+    perl
+    python3
+  ];
+
+  buildInputs = [
+    boost
+    eigen
+    zlib
+  ];
+
+  cmakeFlags = [ "-DENABLE_OPENMP=ON" ];
+
+  hardeningDisable = [ "format" ];
+
+  # Requires files, that are not installed.
+  doCheck = false;
+
+  meta = with lib; {
+    description = "An API for the Polarizable Continuum Model";
+    homepage = "https://pcmsolver.readthedocs.io/en/stable/";
+    license = licenses.lgpl3Only;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.sheepforce ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pcre/default.nix b/nixpkgs/pkgs/development/libraries/pcre/default.nix
new file mode 100644
index 000000000000..52219152845b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pcre/default.nix
@@ -0,0 +1,65 @@
+{ lib, stdenv, fetchurl
+, pcre, windows ? null
+, variant ? null
+}:
+
+assert lib.elem variant [ null "cpp" "pcre16" "pcre32" ];
+
+stdenv.mkDerivation rec {
+  pname = "pcre"
+    + lib.optionalString (variant == "cpp") "-cpp"
+    + lib.optionalString (variant != "cpp" && variant != null) variant;
+  version = "8.45";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/pcre/pcre/${version}/pcre-${version}.tar.bz2";
+    sha256 = "sha256-Ta5v3NK7C7bDe1+Xwzwr6VTadDmFNpzdrDVG4yGL/7g=";
+  };
+
+  outputs = [ "bin" "dev" "out" "doc" "man" ];
+
+  # Disable jit on Apple Silicon, https://github.com/zherczeg/sljit/issues/51
+  configureFlags = lib.optional (!(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)) "--enable-jit=auto" ++ [
+    "--enable-unicode-properties"
+    "--disable-cpp"
+  ]
+    ++ lib.optional (variant != null) "--enable-${variant}";
+
+  # https://bugs.exim.org/show_bug.cgi?id=2173
+  patches = [ ./stacksize-detection.patch ];
+
+  preCheck = ''
+    patchShebangs RunGrepTest
+  '';
+
+  doCheck = !(with stdenv.hostPlatform; isCygwin || isFreeBSD) && stdenv.hostPlatform == stdenv.buildPlatform;
+    # XXX: test failure on Cygwin
+    # we are running out of stack on both freeBSDs on Hydra
+
+  postFixup = ''
+    moveToOutput bin/pcre-config "$dev"
+  '' + lib.optionalString (variant != null) ''
+    ln -sf -t "$out/lib/" '${pcre.out}'/lib/libpcre{,posix}.{so.*.*.*,*dylib,*a}
+  '';
+
+  meta = {
+    homepage = "http://www.pcre.org/";
+    description = "A library for Perl Compatible Regular Expressions";
+    license = lib.licenses.bsd3;
+
+    longDescription = ''
+      The PCRE library is a set of functions that implement regular
+      expression pattern matching using the same syntax and semantics as
+      Perl 5. PCRE has its own native API, as well as a set of wrapper
+      functions that correspond to the POSIX regular expression API. The
+      PCRE library is free, even for building proprietary software.
+    '';
+
+    platforms = lib.platforms.all;
+    maintainers = with lib.maintainers; [ ];
+    pkgConfigModules = [
+      "libpcre"
+      "libpcreposix"
+    ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pcre/stacksize-detection.patch b/nixpkgs/pkgs/development/libraries/pcre/stacksize-detection.patch
new file mode 100644
index 000000000000..4bc97069b1e2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pcre/stacksize-detection.patch
@@ -0,0 +1,16 @@
+diff --git a/pcre_exec.c b/pcre_exec.c
+--- a/pcre_exec.c
++++ b/pcre_exec.c
+@@ -509,6 +509,12 @@
+                  (e.g. stopped by repeated call or recursion limit)
+ */
+ 
++#ifdef __GNUC__
++static int
++match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode,
++  PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb,
++  unsigned int rdepth) __attribute__((noinline,noclone));
++#endif
+ static int
+ match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode,
+   PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb,
diff --git a/nixpkgs/pkgs/development/libraries/pcre2/default.nix b/nixpkgs/pkgs/development/libraries/pcre2/default.nix
new file mode 100644
index 000000000000..2113b52047d6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pcre2/default.nix
@@ -0,0 +1,44 @@
+{ lib
+, stdenv
+, fetchurl
+, withJitSealloc ? true
+}:
+
+stdenv.mkDerivation rec {
+  pname = "pcre2";
+  version = "10.42";
+
+  src = fetchurl {
+    url = "https://github.com/PhilipHazel/pcre2/releases/download/pcre2-${version}/pcre2-${version}.tar.bz2";
+    hash = "sha256-jTbNjLbqKkwrs1j/ZBGwx4hjOipF2rvxrrS3AdG16EA=";
+  };
+
+  configureFlags = [
+    "--enable-pcre2-16"
+    "--enable-pcre2-32"
+    # only enable jit on supported platforms which excludes Apple Silicon, see https://github.com/zherczeg/sljit/issues/51
+    "--enable-jit=${if stdenv.hostPlatform.isS390x then "no" else "auto"}"
+  ]
+  # fix pcre jit in systemd units that set MemoryDenyWriteExecute=true like gitea
+  ++ lib.optional withJitSealloc "--enable-jit-sealloc";
+
+  outputs = [ "bin" "dev" "out" "doc" "man" "devdoc" ];
+
+  postFixup = ''
+    moveToOutput bin/pcre2-config "$dev"
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.pcre.org/";
+    description = "Perl Compatible Regular Expressions";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ ttuegel ];
+    platforms = platforms.all;
+    pkgConfigModules = [
+      "libpcre2-posix"
+      "libpcre2-8"
+      "libpcre2-16"
+      "libpcre2-32"
+    ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pdal/default.nix b/nixpkgs/pkgs/development/libraries/pdal/default.nix
new file mode 100644
index 000000000000..edb2c866bdc1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pdal/default.nix
@@ -0,0 +1,146 @@
+{ lib
+, stdenv
+, callPackage
+, fetchFromGitHub
+, fetchpatch
+, testers
+
+, enableE57 ? lib.meta.availableOn stdenv.hostPlatform libe57format
+
+, cmake
+, curl
+, gdal
+, hdf5-cpp
+, LASzip
+, libe57format
+, libgeotiff
+, libtiff
+, libxml2
+, openscenegraph
+, pkg-config
+, postgresql
+, proj
+, tiledb
+, xercesc
+, zlib
+, zstd
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "pdal";
+  version = "2.6.2";
+
+  src = fetchFromGitHub {
+    owner = "PDAL";
+    repo = "PDAL";
+    rev = finalAttrs.version;
+    sha256 = "sha256-bYTSmrel8MLza+OxO+aOSsnkahjjqRRqUiVwAk23Gxk=";
+  };
+
+  patches = [
+    # Fix running tests
+    # https://github.com/PDAL/PDAL/issues/4280
+    (fetchpatch {
+      url = "https://patch-diff.githubusercontent.com/raw/PDAL/PDAL/pull/4291.patch";
+      sha256 = "sha256-jFS+trwMRBfm+MpT0CcuD/hdYmfyuQj2zyoe06B6G9U=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    curl
+    gdal
+    hdf5-cpp
+    LASzip
+    libgeotiff
+    libtiff
+    libxml2
+    openscenegraph
+    postgresql
+    proj
+    tiledb
+    xercesc
+    zlib
+    zstd
+  ] ++ lib.optionals enableE57 [
+    libe57format
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_PLUGIN_E57=${if enableE57 then "ON" else "OFF"}"
+    "-DBUILD_PLUGIN_HDF=ON"
+    "-DBUILD_PLUGIN_PGPOINTCLOUD=ON"
+    "-DBUILD_PLUGIN_TILEDB=ON"
+    "-DWITH_COMPLETION=ON"
+    "-DWITH_TESTS=ON"
+    "-DBUILD_PGPOINTCLOUD_TESTS=OFF"
+
+    # Plugins can probably not be made work easily:
+    "-DBUILD_PLUGIN_CPD=OFF"
+    "-DBUILD_PLUGIN_FBX=OFF" # Autodesk FBX SDK is gratis+proprietary; not packaged in nixpkgs
+    "-DBUILD_PLUGIN_GEOWAVE=OFF"
+    "-DBUILD_PLUGIN_I3S=OFF"
+    "-DBUILD_PLUGIN_ICEBRIDGE=OFF"
+    "-DBUILD_PLUGIN_MATLAB=OFF"
+    "-DBUILD_PLUGIN_MBIO=OFF"
+    "-DBUILD_PLUGIN_MRSID=OFF"
+    "-DBUILD_PLUGIN_NITF=OFF"
+    "-DBUILD_PLUGIN_OCI=OFF"
+    "-DBUILD_PLUGIN_RDBLIB=OFF" # Riegl rdblib is proprietary; not packaged in nixpkgs
+    "-DBUILD_PLUGIN_RIVLIB=OFF"
+  ];
+
+  doCheck = true;
+
+  disabledTests = [
+    # Tests failing due to TileDB library implementation, disabled also
+    # by upstream CI.
+    # See: https://github.com/PDAL/PDAL/blob/bc46bc77f595add4a6d568a1ff923d7fe20f7e74/.github/workflows/linux.yml#L81
+    "pdal_io_tiledb_writer_test"
+    "pdal_io_tiledb_reader_test"
+    "pdal_io_tiledb_time_writer_test"
+    "pdal_io_tiledb_time_reader_test"
+    "pdal_io_tiledb_bit_fields_test"
+    "pdal_io_tiledb_utils_test"
+    "pdal_io_e57_read_test"
+    "pdal_io_e57_write_test"
+    "pdal_io_stac_reader_test"
+
+    # Segfault
+    "pdal_io_hdf_reader_test"
+
+    # Failure
+    "pdal_app_plugin_test"
+  ];
+
+  checkPhase = ''
+    runHook preCheck
+    # tests are flaky and they seem to fail less often when they don't run in
+    # parallel
+    ctest -j 1 --output-on-failure -E '^${lib.concatStringsSep "|" finalAttrs.disabledTests}$'
+    runHook postCheck
+  '';
+
+  passthru.tests = {
+    version = testers.testVersion {
+      package = finalAttrs.finalPackage;
+      command = "pdal --version";
+      version = "pdal ${finalAttrs.finalPackage.version}";
+    };
+    pdal = callPackage ./tests.nix { pdal = finalAttrs.finalPackage; };
+    pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+  };
+
+  meta = with lib; {
+    description = "PDAL is Point Data Abstraction Library. GDAL for point cloud data";
+    homepage = "https://pdal.io";
+    license = licenses.bsd3;
+    maintainers = teams.geospatial.members;
+    platforms = platforms.all;
+    pkgConfigModules = [ "pdal" ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/pdal/tests.nix b/nixpkgs/pkgs/development/libraries/pdal/tests.nix
new file mode 100644
index 000000000000..1f71626856b3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pdal/tests.nix
@@ -0,0 +1,10 @@
+{ runCommand, pdal }:
+
+let
+  inherit (pdal) pname;
+in
+runCommand "${pname}-tests" { meta.timeout = 60; }
+  ''
+    ${pdal}/bin/pdal --drivers
+    touch $out
+  ''
diff --git a/nixpkgs/pkgs/development/libraries/pdfhummus/default.nix b/nixpkgs/pkgs/development/libraries/pdfhummus/default.nix
new file mode 100644
index 000000000000..bfba4ad09620
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pdfhummus/default.nix
@@ -0,0 +1,56 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, qtbase
+, zlib
+, freetype
+, libjpeg
+, libtiff
+, libpng
+}:
+
+stdenv.mkDerivation rec {
+  pname = "pdfhummus";
+  version = "4.6.3";
+
+  src = fetchFromGitHub {
+    owner = "galkahana";
+    repo = "PDF-Writer";
+    rev = "v${version}";
+    hash = "sha256-6Hp5hacMpVdsiUvMSXBQ5432tPrkHSOiVoWa91sv38k=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = [
+    qtbase
+  ];
+
+  propagatedBuildInputs = [
+    zlib
+    freetype
+    libjpeg
+    libtiff
+    libpng
+  ];
+
+  dontWrapQtApps = true;
+
+  cmakeFlags = [
+    "-DUSE_BUNDLED=OFF"
+    # Use bundled LibAesgm
+    "-DUSE_UNBUNDLED_FALLBACK_BUNDLED=ON"
+  ];
+
+  meta = with lib; {
+    description = "A Fast and Free C++ Library for Creating, Parsing an Manipulating PDF Files and Streams";
+    homepage = "https://www.pdfhummus.com";
+    license = licenses.asl20;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ rewine ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/pe-parse/default.nix b/nixpkgs/pkgs/development/libraries/pe-parse/default.nix
new file mode 100644
index 000000000000..7560f2297cfa
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pe-parse/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "pe-parse";
+  version = "2.1.1";
+
+  src = fetchFromGitHub {
+    owner = "trailofbits";
+    repo = "pe-parse";
+    rev = "v${version}";
+    hash = "sha256-XegSZWRoQg6NEWuTSFI1RMvN3GbpLDrZrloPU2XdK2M=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    $out/bin/dump-pe ../tests/assets/example.exe
+  '';
+
+  meta = with lib; {
+    description = "A principled, lightweight parser for Windows portable executable files";
+    homepage = "https://github.com/trailofbits/pe-parse";
+    changelog = "https://github.com/trailofbits/pe-parse/releases/tag/v${version}";
+    license = licenses.mit;
+    maintainers = with maintainers; [ arturcygan ];
+    mainProgram = "dump-pe";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pffft/default.nix b/nixpkgs/pkgs/development/libraries/pffft/default.nix
new file mode 100644
index 000000000000..b68b6d486823
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pffft/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "pffft";
+  version = "unstable-2022-04-10";
+
+  src = fetchFromGitHub {
+    owner = "marton78";
+    repo = pname;
+    rev = "08f5ed2618ac06d7dcc83d209d7253dc215274d5";
+    sha256 = "sha256-9LfLQ17IRsbEwGQJZzhW2Av4en1KuJVicLrS2AyjUZY=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "Pretty Fast FFT (PFFFT) library";
+    homepage = "https://github.com/marton78/pffft";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ sikmir ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/phash/default.nix b/nixpkgs/pkgs/development/libraries/phash/default.nix
new file mode 100644
index 000000000000..73097db5ccc6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/phash/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, cimg, imagemagick }:
+
+stdenv.mkDerivation rec {
+  pname = "pHash";
+  version = "0.9.6";
+
+  buildInputs = [ cimg ];
+
+  # CImg.h calls to external binary `convert` from the `imagemagick` package
+  # at runtime
+  propagatedBuildInputs = [ imagemagick ];
+
+  nativeBuildInputs = [ pkg-config ];
+
+  configureFlags = ["--enable-video-hash=no" "--enable-audio-hash=no"];
+  postInstall = ''
+    cp ${cimg}/include/CImg.h $out/include/
+  '';
+
+  src = fetchFromGitHub {
+    owner = "clearscene";
+    repo = "pHash";
+    rev = version;
+    sha256 = "sha256-frISiZ89ei7XfI5F2nJJehfQZsk0Mlb4n91q/AiZ2vA=";
+  };
+
+  meta = with lib; {
+    description = "Compute the perceptual hash of an image";
+    license = licenses.gpl3;
+    maintainers = [maintainers.imalsogreg];
+    platforms = platforms.all;
+    homepage = "http://www.phash.org";
+    downloadPage = "https://github.com/clearscene/pHash";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/phonetisaurus/default.nix b/nixpkgs/pkgs/development/libraries/phonetisaurus/default.nix
new file mode 100644
index 000000000000..9ba00833d623
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/phonetisaurus/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv
+, fetchFromGitHub
+, openfst
+, pkg-config
+, python3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "phonetisaurus";
+  version = "0.9.1";
+
+  src = fetchFromGitHub {
+    owner = "AdolfVonKleist";
+    repo = pname;
+    rev = version;
+    sha256 = "1b18s5zz0l0fhqh9n9jnmgjz2hzprwzf6hx5a12zibmmam3qyriv";
+  };
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ python3 openfst ];
+
+  meta = with lib; {
+    description = "Framework for Grapheme-to-phoneme models for speech recognition using the OpenFst framework";
+    inherit (src.meta) homepage;
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ mic92 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/phonon/backends/gst-plugin-paths.patch b/nixpkgs/pkgs/development/libraries/phonon/backends/gst-plugin-paths.patch
new file mode 100644
index 000000000000..39c1b9c0d290
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/phonon/backends/gst-plugin-paths.patch
@@ -0,0 +1,13 @@
+Index: phonon-gstreamer-4.9.0/gstreamer/backend.cpp
+===================================================================
+--- phonon-gstreamer-4.9.0.orig/gstreamer/backend.cpp
++++ phonon-gstreamer-4.9.0/gstreamer/backend.cpp
+@@ -85,6 +85,8 @@ Backend::Backend(QObject *parent, const
+         "--gst-debug-no-color"
+     };
+ 
++    qputenv("GST_PLUGIN_PATH_1_0", GST_PLUGIN_PATH_1_0);
++
+     int argc = sizeof(args) / sizeof(*args);
+     char **argv = const_cast<char**>(args);
+     GError *err = 0;
diff --git a/nixpkgs/pkgs/development/libraries/phonon/backends/gstreamer.nix b/nixpkgs/pkgs/development/libraries/phonon/backends/gstreamer.nix
new file mode 100644
index 000000000000..a94234aec41b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/phonon/backends/gstreamer.nix
@@ -0,0 +1,70 @@
+{ stdenv, lib, fetchurl, fetchpatch, cmake, gst_all_1, phonon, pkg-config
+, extra-cmake-modules, qttools, qtbase, qtx11extras
+, debug ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "phonon-backend-gstreamer";
+  version = "4.10.0";
+
+  src = fetchurl {
+    url = "mirror://kde/stable/phonon/${pname}/${version}/${pname}-${version}.tar.xz";
+    sha256 = "1wk1ip2w7fkh65zk6rilj314dna0hgsv2xhjmpr5w08xa8sii1y5";
+  };
+
+  patches = [
+    # Hardcode paths to useful plugins so the backend doesn't depend
+    # on system paths being set.
+    ./gst-plugin-paths.patch
+
+    # Work around https://bugs.kde.org/show_bug.cgi?id=445196 until a new release.
+    (fetchpatch {
+      url = "https://invent.kde.org/libraries/phonon-gstreamer/-/commit/bbbb160f30a394655cff9398d17961142388b0f2.patch";
+      sha256 = "sha256-tNBqVt67LNb9SQogS9ol8/xYIZvVSoVUgXQahMfkFh8=";
+    })
+  ];
+
+  dontWrapQtApps = true;
+
+  env.NIX_CFLAGS_COMPILE = let
+    gstPluginPaths = lib.makeSearchPathOutput "lib" "/lib/gstreamer-1.0"
+      (with gst_all_1; [
+        gstreamer
+        gst-plugins-base
+        gst-plugins-good
+        gst-plugins-ugly
+        gst-plugins-bad
+        gst-libav
+      ]);
+    in toString [
+      # This flag should be picked up through pkg-config, but it isn't.
+      "-I${gst_all_1.gstreamer.dev}/lib/gstreamer-1.0/include"
+
+      ''-DGST_PLUGIN_PATH_1_0="${gstPluginPaths}"''
+    ];
+
+  buildInputs = with gst_all_1; [
+    gstreamer
+    gst-plugins-base
+    phonon
+    qtbase
+    qtx11extras
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    extra-cmake-modules
+    qttools
+  ];
+
+  cmakeBuildType = if debug then "Debug" else "Release";
+
+  meta = with lib; {
+    homepage = "https://phonon.kde.org/";
+    description = "GStreamer backend for Phonon";
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ ttuegel ];
+    license = licenses.lgpl21;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/phonon/backends/vlc.nix b/nixpkgs/pkgs/development/libraries/phonon/backends/vlc.nix
new file mode 100644
index 000000000000..a50a07dde1a1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/phonon/backends/vlc.nix
@@ -0,0 +1,40 @@
+{ stdenv, lib, fetchurl, cmake, phonon, pkg-config, libvlc
+, extra-cmake-modules, qttools, qtbase, qtx11extras
+, debug ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "phonon-backend-vlc";
+  version = "0.11.3";
+
+  src = fetchurl {
+    url = "mirror://kde/stable/phonon/${pname}/${version}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-Xmn97MsGDH5rWSTO8uZb7loIrOQScAW5U0TtMHfcY5c=";
+  };
+
+  buildInputs = [
+    phonon
+    libvlc
+    qtbase
+    qtx11extras
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    qttools
+    extra-cmake-modules
+  ];
+
+  dontWrapQtApps = true;
+
+  cmakeBuildType = if debug then "Debug" else "Release";
+
+  meta = with lib; {
+    homepage = "https://community.kde.org/Phonon";
+    # Dev repo is at https://invent.kde.org/libraries/phonon-vlc
+    description = "GStreamer backend for Phonon";
+    platforms = platforms.linux;
+    license = with licenses; [ bsd3 lgpl21Plus ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/phonon/default.nix b/nixpkgs/pkgs/development/libraries/phonon/default.nix
new file mode 100644
index 000000000000..dd20b6dcebe6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/phonon/default.nix
@@ -0,0 +1,90 @@
+{ stdenv
+, lib
+, fetchurl
+, cmake
+, libGLU
+, libGL
+, pkg-config
+, libpulseaudio
+, extra-cmake-modules
+, qtbase
+, qttools
+, debug ? false
+}:
+
+let
+  soname = "phonon4qt5";
+  buildsystemdir = "share/cmake/${soname}";
+in
+
+stdenv.mkDerivation rec {
+  pname = "phonon";
+  version = "4.11.1";
+
+  meta = {
+    homepage = "https://community.kde.org/Phonon";
+    description = "Multimedia API for Qt";
+    license = lib.licenses.lgpl2;
+    platforms = lib.platforms.unix;
+    maintainers = with lib.maintainers; [ ttuegel ];
+  };
+
+  src = fetchurl {
+    url = "mirror://kde/stable/phonon/${version}/phonon-${version}.tar.xz";
+    sha256 = "0bfy8iqmjhlg3ma3iqd3kxjc2zkzpjgashbpf5x17y0dc2i1whxl";
+  };
+
+  buildInputs = [
+    libGLU
+    libGL
+    libpulseaudio
+    qtbase
+    qttools
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    extra-cmake-modules
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  env.NIX_CFLAGS_COMPILE = toString ([
+    "-fPIC"
+  ] ++ lib.optionals stdenv.cc.isClang [
+    "-Wno-error=enum-constexpr-conversion"
+  ]);
+
+  cmakeBuildType = if debug then "Debug" else "Release";
+
+  dontWrapQtApps = true;
+
+  preConfigure = ''
+    cmakeFlags+=" -DPHONON_QT_MKSPECS_INSTALL_DIR=''${!outputDev}/mkspecs"
+    cmakeFlags+=" -DPHONON_QT_IMPORTS_INSTALL_DIR=''${!outputBin}/$qtQmlPrefix"
+    cmakeFlags+=" -DPHONON_QT_PLUGIN_INSTALL_DIR=''${!outputBin}/$qtPluginPrefix/designer"
+  '';
+
+  postPatch = ''
+    sed -i PhononConfig.cmake.in \
+        -e "/get_filename_component(rootDir/ s/^.*$//" \
+        -e "/^set(PHONON_INCLUDE_DIR/ s|\''${rootDir}/||" \
+        -e "/^set(PHONON_LIBRARY_DIR/ s|\''${rootDir}/||" \
+        -e "/^set(PHONON_BUILDSYSTEM_DIR/ s|\''${rootDir}|''${!outputDev}|"
+
+    sed -i cmake/FindPhononInternal.cmake \
+        -e "/set(INCLUDE_INSTALL_DIR/ c set(INCLUDE_INSTALL_DIR \"''${!outputDev}/include\")"
+
+    sed -i cmake/FindPhononInternal.cmake \
+        -e "/set(PLUGIN_INSTALL_DIR/ c set(PLUGIN_INSTALL_DIR \"$qtPluginPrefix/..\")"
+
+    sed -i CMakeLists.txt \
+        -e "/set(BUILDSYSTEM_INSTALL_DIR/ c set(BUILDSYSTEM_INSTALL_DIR \"''${!outputDev}/${buildsystemdir}\")"
+  '';
+
+  postFixup = ''
+    sed -i "''${!outputDev}/lib/pkgconfig/${soname}.pc" \
+        -e "/^exec_prefix=/ c exec_prefix=''${!outputBin}/bin"
+  '';
+}
diff --git a/nixpkgs/pkgs/development/libraries/physfs/default.nix b/nixpkgs/pkgs/development/libraries/physfs/default.nix
new file mode 100644
index 000000000000..28b81867d203
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physfs/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchFromGitHub, cmake, doxygen, zlib, Foundation }:
+
+let
+  generic = version: sha256:
+  stdenv.mkDerivation rec {
+    pname = "physfs";
+    inherit version;
+
+    src = fetchFromGitHub {
+      owner = "icculus";
+      repo = "physfs";
+      rev = "release-${version}";
+      inherit sha256;
+    };
+
+    nativeBuildInputs = [ cmake doxygen ];
+
+    buildInputs = [ zlib ]
+      ++ lib.optionals stdenv.isDarwin [ Foundation ];
+
+    doInstallCheck = true;
+
+    installCheckPhase = ''
+      ./test_physfs --version
+    '';
+
+    meta = with lib; {
+      homepage = "https://icculus.org/physfs/";
+      description = "Library to provide abstract access to various archives";
+      changelog = "https://github.com/icculus/physfs/releases/tag/release-${version}";
+      license = licenses.zlib;
+      platforms = platforms.all;
+    };
+  };
+
+in {
+  physfs_2 = generic "2.1.1" "sha256-hmS/bfszit3kD6B2BjnuV50XKueq2GcRaqyAKLkvfLc=";
+  physfs   = generic "3.2.0" "sha256-FhFIshX7G3uHEzvHGlDIrXa7Ux6ThQNzVssaENs+JMw=";
+}
diff --git a/nixpkgs/pkgs/development/libraries/physics/apfel/cmake.patch b/nixpkgs/pkgs/development/libraries/physics/apfel/cmake.patch
new file mode 100644
index 000000000000..5bc342aeb48c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/apfel/cmake.patch
@@ -0,0 +1,14 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -46,8 +46,8 @@ message(STATUS "APFEL: APFEL_DOWNLOAD_PDFS=${APFEL_DOWNLOAD_PDFS}")
+ # CONFIG SCRIPT ========================================================
+ set(prefix ${CMAKE_INSTALL_PREFIX})
+ set(exec_prefix "${prefix}")
+-set(includedir "${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
+-set(libdir "${prefix}/${CMAKE_INSTALL_LIBDIR}")
++set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
++set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}")
+ set(PACKAGE_VERSION "${apfel_VERSION}")
+ configure_file("${PROJECT_SOURCE_DIR}/bin/apfel-config.in" "${PROJECT_BINARY_DIR}/bin/apfel-config")
+ configure_file("${PROJECT_SOURCE_DIR}/bin/apfel.in" "${PROJECT_BINARY_DIR}/bin/apfel")
diff --git a/nixpkgs/pkgs/development/libraries/physics/apfel/default.nix b/nixpkgs/pkgs/development/libraries/physics/apfel/default.nix
new file mode 100644
index 000000000000..e1192cdcd05e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/apfel/default.nix
@@ -0,0 +1,59 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, gfortran
+, lhapdf
+, python3
+, swig
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "apfel";
+  version = "3.1.1";
+
+  src = fetchFromGitHub {
+    owner = "scarrazza";
+    repo = "apfel";
+    rev = version;
+    hash = "sha256-0Ix7KwEZUG/NmGJ380DVJbUA0PcoEJDlcGSc09l5Tbc=";
+  };
+
+  patches = [
+    # https://github.com/scarrazza/apfel/pull/54
+    ./cmake.patch
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    swig
+  ];
+  buildInputs = [
+    gfortran
+    lhapdf
+    python3
+    zlib
+  ];
+
+  cmakeFlags = [
+    "-DAPFEL_DOWNLOAD_PDFS=OFF"
+    "-DAPFEL_Python_SITEARCH=autoprefix"
+  ];
+
+  doCheck = true;
+  nativeCheckInputs = [
+    lhapdf.pdf_sets.NNPDF23_nlo_as_0118
+    lhapdf.pdf_sets.NNPDF31_nnlo_as_0118
+  ];
+
+  env.NIX_CFLAGS_COMPILE = "-DAPFEL_VERSION=${version}";
+
+  meta = with lib; {
+    description = "A PDF Evolution Library";
+    homepage = "https://apfel.mi.infn.it/";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ veprbl ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/physics/apfelgrid/default.nix b/nixpkgs/pkgs/development/libraries/physics/apfelgrid/default.nix
new file mode 100644
index 000000000000..92b6ae003fca
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/apfelgrid/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, apfel, applgrid, lhapdf, root5 }:
+
+stdenv.mkDerivation rec {
+  pname = "apfelgrid";
+  version = "1.0.1";
+
+  src = fetchFromGitHub {
+    owner = "nhartland";
+    repo = "APFELgrid";
+    rev = "v${version}";
+    sha256 = "0l0cyxd00kmb5aggzwsxg83ah0qiwav0shbxkxwrz3dvw78n89jk";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ apfel applgrid lhapdf root5 ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Ultra-fast theory predictions for collider observables";
+    license     = licenses.mit;
+    homepage    = "https://nhartland.github.io/APFELgrid/";
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ veprbl ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/physics/applgrid/bad_code.patch b/nixpkgs/pkgs/development/libraries/physics/applgrid/bad_code.patch
new file mode 100644
index 000000000000..e90000efe2db
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/applgrid/bad_code.patch
@@ -0,0 +1,50 @@
+diff --git a/appl_grid/appl_grid.h b/appl_grid/appl_grid.h
+index 5059622..a0651c9 100644
+--- a/appl_grid/appl_grid.h
++++ b/appl_grid/appl_grid.h
+@@ -56,7 +56,7 @@ public:
+   class exception : public std::exception { 
+   public:
+     exception(const std::string& s) { std::cerr << what() << " " << s << std::endl; }; 
+-    exception(std::ostream& s)      { std::cerr << what() << " " << s << std::endl; }; 
++    exception(std::ostream& s)      { s << what() << " " << std::endl; }; 
+     virtual const char* what() const throw() { return "appl::grid::exception"; }
+   };
+ 
+diff --git a/appl_grid/appl_pdf.h b/appl_grid/appl_pdf.h
+index c71fd84..2525527 100644
+--- a/appl_grid/appl_pdf.h
++++ b/appl_grid/appl_pdf.h
+@@ -51,7 +51,7 @@ public:
+   class exception : public std::exception { 
+   public: 
+     exception(const std::string& s="") { std::cerr << what() << " " << s << std::endl; }; 
+-    exception(std::ostream& s)         { std::cerr << what() << " " << s << std::endl; }; 
++    exception(std::ostream& s)         { s << " " << std::endl; }; 
+     const char* what() const throw() { return "appl::appl_pdf::exception "; }
+   };
+   
+diff --git a/src/appl_igrid.h b/src/appl_igrid.h
+index d25288e..be354df 100644
+--- a/src/appl_igrid.h
++++ b/src/appl_igrid.h
+@@ -52,7 +52,7 @@ private:
+   class exception { 
+   public:
+     exception(const std::string& s) { std::cerr << s << std::endl; }; 
+-    exception(std::ostream& s)      { std::cerr << s << std::endl; }; 
++    exception(std::ostream& s)      { s << std::endl; }; 
+   };
+ 
+   typedef double (igrid::*transform_t)(double) const;
+diff --git a/src/lumi_pdf.cxx b/src/lumi_pdf.cxx
+--- a/src/lumi_pdf.cxx
++++ b/src/lumi_pdf.cxx
+@@ -235,6 +235,6 @@ void lumi_pdf::write(const std::string& filename) const {
+ // std::string lumi_pdf::summary(std::ostream& s=std::cout) const { 
+ std::string lumi_pdf::summary() const { 
+   std::stringstream s;
+-  s << "lumi_pdf::lumi_pdf() " << s << "\tsize " << m_combinations.size() << " lookup size " << m_lookup.size() << " " << this; 
++  s << "lumi_pdf::lumi_pdf() " << "\tsize " << m_combinations.size() << " lookup size " << m_lookup.size() << " " << this; 
+   return s.str();
+ }
diff --git a/nixpkgs/pkgs/development/libraries/physics/applgrid/default.nix b/nixpkgs/pkgs/development/libraries/physics/applgrid/default.nix
new file mode 100644
index 000000000000..105a6b4953f7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/applgrid/default.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, fetchurl, gfortran, hoppet, lhapdf, root5, zlib, Cocoa }:
+
+stdenv.mkDerivation rec {
+  pname = "applgrid";
+  version = "1.4.70";
+
+  src = fetchurl {
+    url = "https://www.hepforge.org/archive/applgrid/${pname}-${version}.tgz";
+    sha256 = "1yw9wrk3vjv84kd3j4s1scfhinirknwk6xq0hvj7x2srx3h93q9p";
+  };
+
+  nativeBuildInputs = [ gfortran ];
+
+  # For some reason zlib was only needed after bump to gfortran8
+  buildInputs = [ hoppet lhapdf root5 zlib ] ++ lib.optionals stdenv.isDarwin [ Cocoa ];
+
+  patches = [
+    ./bad_code.patch
+  ];
+
+  preConfigure = ''
+    substituteInPlace src/Makefile.in \
+      --replace "-L\$(subst /libgfortran.a, ,\$(FRTLIB) )" "-L${gfortran.cc.lib}/lib"
+  '' + (lib.optionalString stdenv.isDarwin ''
+    substituteInPlace src/Makefile.in \
+      --replace "gfortran -print-file-name=libgfortran.a" "gfortran -print-file-name=libgfortran.dylib"
+  '');
+
+  enableParallelBuilding = false; # broken
+
+  # Install private headers required by APFELgrid
+  postInstall = ''
+    for header in src/*.h; do
+      install -Dm644 "$header" "$out"/include/appl_grid/"`basename $header`"
+    done
+  '';
+
+  meta = with lib; {
+    description = "The APPLgrid project provides a fast and flexible way to reproduce the results of full NLO calculations with any input parton distribution set in only a few milliseconds rather than the weeks normally required to gain adequate statistics";
+    license     = licenses.gpl3;
+    homepage    = "http://applgrid.hepforge.org";
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ veprbl ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/physics/cernlib/0001-Use-strerror-rather-than-sys_errlist-to-fix-compilat.patch b/nixpkgs/pkgs/development/libraries/physics/cernlib/0001-Use-strerror-rather-than-sys_errlist-to-fix-compilat.patch
new file mode 100644
index 000000000000..bc8c77f913c6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/cernlib/0001-Use-strerror-rather-than-sys_errlist-to-fix-compilat.patch
@@ -0,0 +1,94 @@
+From a69607c511b6da94cde477283b129cbc9cfdd5a3 Mon Sep 17 00:00:00 2001
+From: Maximilian Bosch <maximilian@mbosch.me>
+Date: Tue, 11 Aug 2020 12:32:06 +0200
+Subject: [PATCH] Use `strerror` rather than `sys_errlist` to fix compilation
+ w/glibc-2.32
+
+To quote the release-notes[1]:
+
+  All programs should use
+  strerror or strerror_r instead.
+
+[1] https://sourceware.org/pipermail/libc-announce/2020/000029.html
+---
+ 2006/src/packlib/cspack/sysreq/serror.c         | 10 +---------
+ 2006/src/packlib/cspack/sysreq/socket.c         |  2 +-
+ 2006/src/packlib/kernlib/kernbit/z268/systems.c |  4 ++--
+ 2006/src/pawlib/paw/piafs/piafc.c               |  5 +----
+ 4 files changed, 5 insertions(+), 16 deletions(-)
+
+diff --git a/2006/src/packlib/cspack/sysreq/serror.c b/2006/src/packlib/cspack/sysreq/serror.c
+index 3667c42a..c560e499 100644
+--- a/2006/src/packlib/cspack/sysreq/serror.c
++++ b/2006/src/packlib/cspack/sysreq/serror.c
+@@ -176,15 +176,7 @@ int     n;
+         }
+         else {
+ #if !defined(vms)
+-                if ((n>0) && (n<sys_nerr)) {
+-                        return(sys_errlist[n]);
+-                }
+-                else {
+-                        (void) sprintf(buf,"%s: %d\n",
+- sys_serrlist[SEMAXERR+1-SEBASEOFF],
+-                            n);
+-                        return(buf);
+-                }
++          return strerror(n);
+ #else /* vms */
+ /*
+  * There are (were) some bugs is DEC C compilers (/OPT), just check
+diff --git a/2006/src/packlib/cspack/sysreq/socket.c b/2006/src/packlib/cspack/sysreq/socket.c
+index ceb5bd63..34c2a7bc 100644
+--- a/2006/src/packlib/cspack/sysreq/socket.c
++++ b/2006/src/packlib/cspack/sysreq/socket.c
+@@ -412,7 +412,7 @@ char *
+ s_errmsg()                              /* return last error message    */
+ {
+ #if !defined(vms)
+-        return(sys_errlist[errno]);
++        return(strerror(errno));
+ #else /* vms */
+ #if defined(MULTINET) && (MULTINET == 1)
+         return(vms_errno_string());
+diff --git a/2006/src/packlib/kernlib/kernbit/z268/systems.c b/2006/src/packlib/kernlib/kernbit/z268/systems.c
+index 98459459..d1ad63ed 100644
+--- a/2006/src/packlib/kernlib/kernbit/z268/systems.c
++++ b/2006/src/packlib/kernlib/kernbit/z268/systems.c
+@@ -134,7 +134,7 @@ int     *ovflw;
+ #endif /* hpux */
+ 
+ 	if ( (ps=(FILE *)popen(command,"r"))==NULL ) {
+-		fprintf(stderr,"systems(): popen(): %s\n",sys_errlist[errno] );
++		fprintf(stderr,"systems(): popen(): %s\n",strerror(errno) );
+ 		*rc= -errno;
+ 		*chars=0        ;
+                 *l=0        ;
+@@ -144,7 +144,7 @@ int     *ovflw;
+ 	rcode = fread(buf, 1, buflen , ps );
+ 	if ( rcode < 0 ) {
+ 		fprintf(stderr,"systems(): pipe fread(): %s\n",
+-                                                       sys_errlist[errno] );
++                                                       strerror(errno) );
+ 		buf[0]='\n';
+ 		*rc= -errno;
+                 *chars=0        ;
+diff --git a/2006/src/pawlib/paw/piafs/piafc.c b/2006/src/pawlib/paw/piafs/piafc.c
+index b163f80c..4d8d5528 100644
+--- a/2006/src/pawlib/paw/piafs/piafc.c
++++ b/2006/src/pawlib/paw/piafs/piafc.c
+@@ -1795,10 +1795,7 @@ static void fatalperror(char *msg)
+    extern char  *sys_errlist[];
+ #endif
+ 
+-   if ((unsigned) errno < sys_nerr)
+-      sprintf(buf, "%s: %s", msg, sys_errlist[errno]);
+-   else
+-      sprintf(buf, "%s: Error %d", msg, errno);
++   sprintf(buf, "%s: %s", msg, strerror(errno));
+ 
+    fatal(buf);
+ }
+-- 
+2.25.4
+
diff --git a/nixpkgs/pkgs/development/libraries/physics/cernlib/default.nix b/nixpkgs/pkgs/development/libraries/physics/cernlib/default.nix
new file mode 100644
index 000000000000..b589524113d2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/cernlib/default.nix
@@ -0,0 +1,103 @@
+{ lib, stdenv, fetchurl, gfortran, imake, makedepend, motif, xorg, libxcrypt }:
+
+stdenv.mkDerivation rec {
+  version = "2006";
+  pname = "cernlib";
+
+  src = fetchurl {
+    urls = [
+      "https://ftp.riken.jp/cernlib/download/${version}_source/tar/${version}_src.tar.gz"
+      "https://cernlib.web.cern.ch/cernlib/download/${version}_source/tar/${version}_src.tar.gz"
+    ];
+    sha256 = "0awla1rl96z82br7slcmg8ks1d2a7slk6dj79ywb871j2ksi3fky";
+  };
+
+  buildInputs = with xorg; [ gfortran motif libX11 libXft libXt libxcrypt ];
+  nativeBuildInputs = [ imake makedepend ];
+  sourceRoot = ".";
+
+  patches = [ ./patch.patch ./0001-Use-strerror-rather-than-sys_errlist-to-fix-compilat.patch ];
+
+  postPatch = ''
+    echo 'InstallBinSubdirs(packlib scripts)' >> 2006/src/Imakefile
+    substituteInPlace 2006/src/config/site.def \
+      --replace "# define MakeCmd gmake" "# define MakeCmd make"
+    substituteInPlace 2006/src/config/lnxLib.rules \
+      --replace "# lib" "// lib"
+
+    substituteInPlace 2006/src/config/linux.cf \
+      --replace "# ifdef Hasgfortran" "# if 1" \
+      --replace "# define CcCmd			gcc4" "# define CcCmd			gcc"
+    substituteInPlace 2006/src/scripts/cernlib \
+      --replace "-lnsl" ""
+
+    # binutils 2.37 fix
+    substituteInPlace 2006/src/config/Imake.tmpl --replace "clq" "cq"
+  '';
+
+  preConfigure = ''
+    export CERN=`pwd`
+    export CERN_LEVEL=${version}
+    export CERN_ROOT=$CERN/$CERN_LEVEL
+    export CVSCOSRC=`pwd`/$CERN_LEVEL/src
+    export PATH=$PATH:$CERN_ROOT/bin
+  '';
+
+  FFLAGS = lib.optionals (lib.versionAtLeast gfortran.version "10.0.0") [
+    # Fix https://github.com/vmc-project/geant3/issues/17
+    "-fallow-invalid-boz"
+
+    # Fix for gfortran 10
+    "-fallow-argument-mismatch"
+  ];
+
+  NIX_CFLAGS = [ "-Wno-return-type" ];
+
+  # Workaround build failure on -fno-common toolchains:
+  # ld: libpacklib.a(kedit.o):kuip/klink1.h:11: multiple definition of `klnkaddr';
+  #   libzftplib.a(zftpcdf.o):zftp/zftpcdf.c:155: first defined here
+  env.NIX_CFLAGS_COMPILE = "-fcommon";
+
+  makeFlags = [
+    "FORTRANOPTIONS=$(FFLAGS)"
+    "CCOPTIONS=$(NIX_CFLAGS)"
+  ];
+
+  configurePhase = ''
+    runHook preConfigure
+
+    cd $CERN_ROOT
+    mkdir -p build
+    cd $CERN_ROOT/build
+    $CVSCOSRC/config/imake_boot
+
+    runHook postConfigure
+  '';
+
+  preBuild = ''
+    make -j $NIX_BUILD_CORES $makeFlags bin/kuipc
+    make -j $NIX_BUILD_CORES $makeFlags scripts/Makefile
+    pushd scripts
+    make -j $NIX_BUILD_CORES $makeFlags bin/cernlib
+    popd
+  '';
+
+  installTargets = [ "install.bin" "install.lib" "install.include" ];
+  installFlags = [
+    "CERN_BINDIR=${placeholder "out"}/bin"
+    "CERN_INCLUDEDIR=${placeholder "out"}/include"
+    "CERN_LIBDIR=${placeholder "out"}/lib"
+    "CERN_SHLIBDIR=${placeholder "out"}/libexec"
+  ];
+
+  setupHook = ./setup-hook.sh;
+
+  meta = {
+    homepage = "http://cernlib.web.cern.ch";
+    description = "Legacy collection of libraries and modules for data analysis in high energy physics";
+    broken = stdenv.isDarwin;
+    platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
+    maintainers = with lib.maintainers; [ veprbl ];
+    license = lib.licenses.gpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/physics/cernlib/patch.patch b/nixpkgs/pkgs/development/libraries/physics/cernlib/patch.patch
new file mode 100644
index 000000000000..2d75b6bf0f88
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/cernlib/patch.patch
@@ -0,0 +1,186 @@
+diff --git a/2006/src/config/Imake.tmpl b/2006/src/config/Imake.tmpl
+index 054fb04..a3b3828 100644
+--- a/2006/src/config/Imake.tmpl
++++ b/2006/src/config/Imake.tmpl
+@@ -455,7 +455,7 @@ XCOMM the platform-specific parameters - edit site.def to change
+ #define NoRConst NO /* YES if const for structs of funcs is bad */
+ #endif
+ #ifndef InstPgmFlags
+-#define InstPgmFlags -s
++#define InstPgmFlags
+ #endif
+ #ifndef InstBinFlags
+ #define InstBinFlags -m 0755
+diff --git a/2006/src/config/biglib.rules b/2006/src/config/biglib.rules
+index c90e58a..9173bdc 100644
+--- a/2006/src/config/biglib.rules
++++ b/2006/src/config/biglib.rules
+@@ -368,7 +368,7 @@ define build-object-list						@@\
+ @ (set -e;\							@@\
+ 	 case '${MFLAGS}' in *[i]*) set +e;; esac; \		@@\
+ 	 subdirs=Quote(dirs);\					@@\
+-	 list=`/bin/pwd`/$@;\					@@\
++	 list=`pwd`/$@;\					@@\
+ 	 for dir in $$subdirs; do \				@@\
+ 	  (set -e;cd $$dir;SedCmd -e "\=^[^/]=s=^.=$$dir/&=" $@ >> $$list);\@@\
+ 	 done) || (rm $@; exit 1)				@@\
+diff --git a/2006/src/config/imake_boot b/2006/src/config/imake_boot
+index b52d0d3..69cf1b3 100755
+--- a/2006/src/config/imake_boot
++++ b/2006/src/config/imake_boot
+@@ -10,8 +10,8 @@ if [ "$CVSCOSRC" = "" ] ; then
+ fi
+ if [ -f Imakefile ] ; then
+ 	imake -DUseInstalled -I$CVSCOSRC/config \
+-		-DTOPDIR=`/bin/pwd` -DCURDIR= -fImakefile
++		-DTOPDIR=`pwd` -DCURDIR= -fImakefile
+ else
+ 	imake -DUseInstalled -I$CVSCOSRC/config \
+-		-DTOPDIR=`/bin/pwd` -DCURDIR= -f$CVSCOSRC/Imakefile
++		-DTOPDIR=`pwd` -DCURDIR= -f$CVSCOSRC/Imakefile
+ fi
+diff --git a/2006/src/config/linux-lp64.cf b/2006/src/config/linux-lp64.cf
+index e071b2f..3cc5c3b 100644
+--- a/2006/src/config/linux-lp64.cf
++++ b/2006/src/config/linux-lp64.cf
+@@ -173,7 +173,7 @@
+ #define FortranCmd		g77
+ #define XargsCmd		xargs
+ #define FortranSaveFlags	/* */ /* Everything static !? */
+-#define DefaultFCOptions	-fno-automatic -fno-second-underscore -fugly-complex
++#define DefaultFCOptions	-fno-automatic -fno-second-underscore
+ #define CernlibSystem	        -DCERNLIB_LINUX -DCERNLIB_UNIX -DCERNLIB_LNX -DCERNLIB_QMGLIBC -DCERNLIB_QMLXIA64
+ 
+ # endif
+diff --git a/2006/src/config/linux.cf b/2006/src/config/linux.cf
+index cc0bee5..a8dd954 100644
+--- a/2006/src/config/linux.cf
++++ b/2006/src/config/linux.cf
+@@ -258,7 +258,7 @@ endif									@@\
+ #define FortranCmd		g77
+ #define XargsCmd		xargs
+ #define FortranSaveFlags	/* */ /* Everything static !? */
+-#define DefaultFCOptions	-fno-automatic -fno-second-underscore -fugly-complex
++#define DefaultFCOptions	-fno-automatic -fno-second-underscore
+ #define CernlibSystem	        -DCERNLIB_LINUX -DCERNLIB_UNIX -DCERNLIB_LNX -DCERNLIB_QMGLIBC
+ 
+ # endif
+diff --git a/2006/src/packlib/kuip/code_kuip/kkern.c b/2006/src/packlib/kuip/code_kuip/kkern.c
+index 3a5579f..5f3c352 100644
+--- a/2006/src/packlib/kuip/code_kuip/kkern.c
++++ b/2006/src/packlib/kuip/code_kuip/kkern.c
+@@ -543,24 +543,6 @@ char *str0dup( const char *str )
+ 
+ 
+ /*
+- * like strdup() but string is n characters long and not terminated
+- */
+-char *strndup( const char *str,
+-              size_t len )
+-{
+-  size_t bytes = len + 1;
+-  char *p;
+-
+-  if( bytes < ALLOC_MIN_BYTES )
+-    bytes = ALLOC_MIN_BYTES;
+-
+-  p = strncpy( malloc( bytes ), str, len );
+-  p[len] = '\0';
+-  return p;
+-}
+-
+-
+-/*
+  * strdup() of character representation of integer n
+  */
+ char *stridup( int n )
+diff --git a/2006/src/packlib/kuip/code_kuip/kmenu.c b/2006/src/packlib/kuip/code_kuip/kmenu.c
+index f135b07..23007a8 100644
+--- a/2006/src/packlib/kuip/code_kuip/kmenu.c
++++ b/2006/src/packlib/kuip/code_kuip/kmenu.c
+@@ -1404,7 +1404,7 @@ void interactive_find( char *expr, int keym )
+          printf ("See also:\n    ");
+          for (i = 0; i < nval; i++) {
+              if (i == ncmd) continue;
+-             printf (flis_name[i]);
++             printf ("%s", flis_name[i]);
+              if (i < nval-1)
+                 printf (", ");
+              else
+diff --git a/2006/src/packlib/kuip/kuip/kstring.h b/2006/src/packlib/kuip/kuip/kstring.h
+index 7811f15..12a1344 100644
+--- a/2006/src/packlib/kuip/kuip/kstring.h
++++ b/2006/src/packlib/kuip/kuip/kstring.h
+@@ -21,7 +21,6 @@ extern "C" {
+  */
+ 
+ #ifndef WIN32
+-extern void* memmove( void* dst, const void* src, size_t n );
+ #endif
+ 
+ /* GF. make conform to kkern.c#if !defined(__convexc__)*/
+@@ -46,7 +45,6 @@ extern char* str4dup( const char* str1, const char* str2, const char* str3,
+                      const char* str4 );
+ extern char* str5dup( const char* str1, const char* str2, const char* str3,
+                      const char* str4, const char* str5 );
+-extern char* strndup( const char* buf, size_t n );
+ extern char* stridup( int i );
+ 
+ extern char* mstrcat( char* ptr, const char* str );
+diff --git a/2006/src/pawlib/paw/cpaw/bugrep.c b/2006/src/pawlib/paw/cpaw/bugrep.c
+index d503a45..d26e30f 100644
+--- a/2006/src/pawlib/paw/cpaw/bugrep.c
++++ b/2006/src/pawlib/paw/cpaw/bugrep.c
+@@ -432,51 +432,7 @@ br_add_config( char * tmp_file )
+ 
+ static int
+ br_mail_file( char *addr, char *subj, char *file )
+-#if (defined(CERNLIB_UNIX))&&(!defined(CERNLIB_WINNT))&&(!defined(CERNLIB_MACOSX))
+-{
+-        FILE            *mfp, *fp;
+-        char            line[1024], my_addr[L_cuserid];
+-        time_t          clock;
+-        struct tm       *ts;
+-
+-        fp = fopen( file, "r" );
+-        if ( fp == NULL ) {
+-                printf( "BUGREPORT: cannot (re)open temporary file\n" );
+-                return MAIL_ERROR;
+-        }
+-
+-        cuserid( my_addr );
+-
+-        sprintf( line, "/usr/lib/sendmail -t" );
+-        mfp = popen( line, "w" );
+-
+-        if ( mfp == NULL ) {
+-                printf( "BUGREPORT: cannot run sendmail\n" );
+-                return MAIL_ERROR;
+-        }
+-
+-
+-        clock = time( (time_t *) 0 );
+-        ts = localtime( &clock );
+-        strftime( line, sizeof( line ),
+-                "%a, %d %h %y %H:%M:%S", ts );
+-        fprintf ( mfp, "To: %s\n", addr );
+-        fprintf ( mfp, "Bcc: %s\n", my_addr );
+-        fprintf ( mfp, "Date: %s\n", line );
+-        fprintf ( mfp, "Subject: %s\n", subj );
+-        fprintf ( mfp, "\n" );
+-
+-        while( fgets( line, sizeof( line ), fp ) != NULL ) {
+-                fputs( line, mfp );
+-        }
+-        fclose( fp );
+-
+-        pclose( mfp );
+-
+-        return MAIL_OK;
+-}
+-#endif
+-#if defined(CERNLIB_MACOSX)
++#if (defined(CERNLIB_UNIX))&&(!defined(CERNLIB_WINNT))
+ {
+         FILE            *mfp, *fp;
+         char            line[1024], *my_addr;
diff --git a/nixpkgs/pkgs/development/libraries/physics/cernlib/setup-hook.sh b/nixpkgs/pkgs/development/libraries/physics/cernlib/setup-hook.sh
new file mode 100644
index 000000000000..d83759327760
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/cernlib/setup-hook.sh
@@ -0,0 +1,3 @@
+export CERN_LEVEL=@version@
+export CERN=@out@
+export CERN_ROOT=$CERN/$CERN_LEVEL
diff --git a/nixpkgs/pkgs/development/libraries/physics/clhep/default.nix b/nixpkgs/pkgs/development/libraries/physics/clhep/default.nix
new file mode 100644
index 000000000000..589233a19593
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/clhep/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, stdenv
+, fetchurl
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "clhep";
+  version = "2.4.7.1";
+
+  src = fetchurl {
+    url = "https://proj-clhep.web.cern.ch/proj-clhep/dist1/clhep-${version}.tgz";
+    hash = "sha256-HIMEp3cqxrmRlfEwA3jG4930rQfIXWSgRQVlKruKVfk=";
+  };
+
+  prePatch = ''
+    cd CLHEP
+  '';
+
+  postPatch = ''
+    substituteInPlace CMakeLists.txt \
+      --replace "clhep_ensure_out_of_source_build()" ""
+  '';
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  meta = with lib; {
+    description = "Set of HEP-specific foundation and utility classes such as random generators, physics vectors, geometry and linear algebra";
+    homepage = "https://cern.ch/clhep";
+    license = with licenses; [ gpl3Only lgpl3Only ];
+    maintainers = with maintainers; [ veprbl ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/physics/fastjet-contrib/default.nix b/nixpkgs/pkgs/development/libraries/physics/fastjet-contrib/default.nix
new file mode 100644
index 000000000000..9a42e693da28
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/fastjet-contrib/default.nix
@@ -0,0 +1,46 @@
+{ lib, stdenv, fetchurl, fastjet }:
+
+stdenv.mkDerivation rec {
+  pname = "fastjet-contrib";
+  version = "1.053";
+
+  src = fetchurl {
+    url = "https://fastjet.hepforge.org/contrib/downloads/fjcontrib-${version}.tar.gz";
+    sha256 = "sha256-sSokjgsUOTTJnjt8jdgyZRIvbGwJUzwqA99E9e/x5vo=";
+  };
+
+  buildInputs = [ fastjet ];
+
+  postPatch = ''
+    for f in Makefile.in */Makefile; do
+      substituteInPlace "$f" --replace "CXX=g++" ""
+    done
+    patchShebangs ./utils/check.sh ./utils/install-sh
+  '';
+
+  # Written in shell manually, does not support autoconf-style
+  # --build=/--host= options:
+  #   Error: --build=x86_64-unknown-linux-gnu: unrecognised argument
+  configurePlatforms = [ ];
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  postBuild = ''
+    make fragile-shared
+  '';
+
+  postInstall = ''
+    make fragile-shared-install
+  '';
+
+  meta = with lib; {
+    description = "Third party extensions for FastJet";
+    homepage = "http://fastjet.fr/";
+    changelog = "https://phab.hepforge.org/source/fastjetsvn/browse/contrib/tags/${version}/NEWS?as=source&blame=off";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ veprbl ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/physics/fastjet/default.nix b/nixpkgs/pkgs/development/libraries/physics/fastjet/default.nix
new file mode 100644
index 000000000000..d9cd1661af8a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/fastjet/default.nix
@@ -0,0 +1,32 @@
+{ lib
+, stdenv
+, fetchurl
+, python ? null
+, withPython ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fastjet";
+  version = "3.4.2";
+
+  src = fetchurl {
+    url = "http://fastjet.fr/repo/fastjet-${version}.tar.gz";
+    hash = "sha256-s9MxVbVc5D9CDNbZm1Jaz3vcJZOnu36omKnds9jKOOM=";
+  };
+
+  buildInputs = lib.optional withPython python;
+
+  configureFlags = [
+    "--enable-allcxxplugins"
+  ] ++ lib.optional withPython "--enable-pyext";
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "A software package for jet finding in pp and e+e− collisions";
+    license     = lib.licenses.gpl2Plus;
+    homepage    = "http://fastjet.fr/";
+    platforms   = lib.platforms.unix;
+    maintainers = with lib.maintainers; [ veprbl ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/physics/fastnlo-toolkit/default.nix b/nixpkgs/pkgs/development/libraries/physics/fastnlo-toolkit/default.nix
new file mode 100644
index 000000000000..66a3bf5128f5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/fastnlo-toolkit/default.nix
@@ -0,0 +1,81 @@
+{ lib
+, stdenv
+, fetchurl
+, boost
+, gfortran
+, lhapdf
+, ncurses
+, perl
+, python ? null
+, swig
+, yoda
+, zlib
+, withPython ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fastnlo-toolkit";
+  version = "2.5.0-2826";
+
+  src = fetchurl {
+    url = "https://fastnlo.hepforge.org/code/v25/fastnlo_toolkit-${version}.tar.gz";
+    sha256 = "sha256-7aIMYCOkHC/17CHYiEfrxvtSJxTDivrS7BQ32cGiEy0=";
+  };
+
+  buildInputs = [
+    boost
+    gfortran
+    gfortran.cc.lib
+    lhapdf
+    yoda
+  ] ++ lib.optional withPython python
+    ++ lib.optional (withPython && python.isPy3k) ncurses;
+
+  propagatedBuildInputs = [
+    zlib
+  ] ++ lib.optional withPython swig;
+
+  preConfigure = ''
+    substituteInPlace ./fastnlotoolkit/Makefile.in \
+      --replace "-fext-numeric-literals" ""
+
+    # disable test that fails due to strict floating-point number comparison
+    echo "#!/usr/bin/env perl" > check/fnlo-tk-stattest.pl.in
+    chmod +x check/fnlo-tk-stattest.pl.in
+  '';
+
+  configureFlags = [
+    "--with-yoda=${yoda}"
+  ] ++ lib.optional withPython "--enable-pyext";
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+  nativeCheckInputs = [
+    perl
+    lhapdf.pdf_sets.CT10nlo
+  ];
+  preCheck = ''
+    patchShebangs --build check
+  '';
+  enableParallelChecking = false;
+
+  meta = with lib; {
+    homepage = "http://fastnlo.hepforge.org";
+    description = "Fast pQCD calculations for hadron-induced processes";
+    longDescription = ''
+      The fastNLO project provides computer code to create and evaluate fast
+      interpolation tables of pre-computed coefficients in perturbation theory
+      for observables in hadron-induced processes.
+
+      This allows fast theory predictions of these observables for arbitrary
+      parton distribution functions (of regular shape), renormalization or
+      factorization scale choices, and/or values of alpha_s(Mz) as e.g. needed
+      in PDF fits or in systematic studies. Very time consuming complete
+      recalculations are thus avoided.
+    '';
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ veprbl ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/physics/geant4/datasets-hook.sh b/nixpkgs/pkgs/development/libraries/physics/geant4/datasets-hook.sh
new file mode 100644
index 000000000000..8aed8b8832b3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/geant4/datasets-hook.sh
@@ -0,0 +1,5 @@
+@name@ () {
+    export G4@envvar@DATA="@datadir@"
+}
+
+postHooks+=(@name@)
diff --git a/nixpkgs/pkgs/development/libraries/physics/geant4/datasets.nix b/nixpkgs/pkgs/development/libraries/physics/geant4/datasets.nix
new file mode 100644
index 000000000000..bfe1cf1139ae
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/geant4/datasets.nix
@@ -0,0 +1,119 @@
+{ lib, stdenv, fetchurl, geant4 }:
+
+let
+  mkDataset = { pname, version, sha256, envvar }:
+    stdenv.mkDerivation {
+      inherit pname version;
+      geant_version = geant4.version;
+
+      src = fetchurl {
+        url = "https://cern.ch/geant4-data/datasets/${pname}.${version}.tar.gz";
+        inherit sha256;
+      };
+
+      preferLocalBuild = true;
+      dontBuild = true;
+      dontConfigure = true;
+
+      datadir = "${placeholder "out"}/share/Geant4-${geant4.version}/data/${pname}${version}";
+      installPhase = ''
+        mkdir -p $datadir
+        mv ./* $datadir
+      '';
+
+      inherit envvar;
+      setupHook = ./datasets-hook.sh;
+
+      meta = with lib; {
+        description = "Data files for the Geant4 toolkit";
+        homepage = "https://geant4.web.cern.ch/support/download";
+        license = licenses.g4sl;
+        platforms = platforms.all;
+      };
+    };
+in
+  builtins.listToAttrs (map (a: { name = a.pname; value = mkDataset a; }) [
+    {
+      pname = "G4NDL";
+      version = "4.7";
+      sha256 = "sha256-fn09JiEQLcYU91OtkocwopDRlmDu2WMEqdJLRT1nAwk=";
+      envvar = "NEUTRONHP";
+    }
+
+    {
+      pname = "G4EMLOW";
+      version = "8.5";
+      sha256 = "sha256-ZrrKSaxdReKsEMEltPsmYiXlEYA+ZpgZCc6c0+m873M=";
+      envvar = "LE";
+    }
+
+    {
+      pname = "G4PhotonEvaporation";
+      version = "5.7";
+      sha256 = "sha256-dh5C5W/93j2YOfn52BAmB8a0wDKRUe5Rggb07p535+U=";
+      envvar = "LEVELGAMMA";
+    }
+
+    {
+      pname = "G4RadioactiveDecay";
+      version = "5.6";
+      sha256 = "sha256-OIYHfJyOWph4PmcY4cMlZ4me6y27M+QC1Edrwv5PDfE=";
+      envvar = "RADIOACTIVE";
+    }
+
+    {
+      pname = "G4SAIDDATA";
+      version = "2.0";
+      sha256 = "sha256-HSao55uqceRNV1m59Vpn6Lft4xdRMWqekDfYAJDHLpE=";
+      envvar = "SAIDXS";
+    }
+
+    {
+      pname = "G4PARTICLEXS";
+      version = "4.0";
+      sha256 = "sha256-k4EDlwPD8rD9NqtJmTYqLItP+QgMMi+QtOMZKBEzypU=";
+      envvar = "PARTICLEXS";
+    }
+
+    {
+      pname = "G4ABLA";
+      version = "3.3";
+      sha256 = "sha256-HgQbMlLunO+IbWJPdT5pMwOqMtfl7zu6h7NPNtkuorE=";
+      envvar = "ABLA";
+    }
+
+    {
+      pname = "G4INCL";
+      version = "1.2";
+      sha256 = "sha256-+ICxYHPuCpLXSU8ydqbVLU3h02d6DUx8WHADlu0OGn4=";
+      envvar = "INCL";
+    }
+
+    {
+      pname = "G4PII";
+      version = "1.3";
+      sha256 = "sha256-YiWtkCZ19DgcmMa6JfxaBs6HVJqpeWNNPQNJHWYW6SY=";
+      envvar = "PII";
+    }
+
+    {
+      pname = "G4ENSDFSTATE";
+      version = "2.3";
+      sha256 = "sha256-lETF4IIHkavTzKrOEFsOR3kPrc4obhEUmDTnnEqOkgM=";
+      envvar = "ENSDFSTATE";
+    }
+
+    {
+      pname = "G4RealSurface";
+      version = "2.2";
+      sha256 = "sha256-mVTe4AEvUzEmf3g2kOkS5y21v1Lqm6vs0S6iIoIXaCA=";
+      envvar = "REALSURFACE";
+    }
+
+    {
+      pname = "G4TENDL";
+      version = "1.4";
+      sha256 = "sha256-S3J0AgzItO1Wm4ku8YwuCI7c22tm850lWFzO4l2XIeA=";
+      envvar = "PARTICLEHP";
+    }
+  ])
diff --git a/nixpkgs/pkgs/development/libraries/physics/geant4/default.nix b/nixpkgs/pkgs/development/libraries/physics/geant4/default.nix
new file mode 100644
index 000000000000..9dcaea8be041
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/geant4/default.nix
@@ -0,0 +1,143 @@
+{ enableMultiThreading ? true
+, enableInventor       ? false
+, enableQT             ? false # deprecated name
+, enableQt             ? enableQT
+, enableXM             ? false
+, mesa
+, enableOpenGLX11      ? !mesa.meta.broken
+, enablePython         ? false
+, enableRaytracerX11   ? false
+
+# Standard build environment with cmake.
+, lib, stdenv, fetchurl, fetchpatch, cmake
+
+, clhep
+, expat
+, xercesc
+, zlib
+
+# For enableQt.
+, qtbase
+, wrapQtAppsHook
+
+# For enableXM.
+, motif
+
+# For enableInventor
+, coin3d
+, soxt
+, libXpm
+
+# For enableQt, enableXM, enableOpenGLX11, enableRaytracerX11.
+, libGLU, libGL
+, libXext
+, libXmu
+
+# For enablePython
+, boost
+, python3
+
+# For tests
+, callPackage
+}:
+
+let
+  boost_python = boost.override { enablePython = true; python = python3; };
+in
+
+lib.warnIf (enableQT != false) "geant4: enableQT is deprecated, please use enableQt"
+
+stdenv.mkDerivation rec {
+  version = "11.2.1";
+  pname = "geant4";
+
+  src = fetchurl {
+    url = "https://cern.ch/geant4-data/releases/geant4-v${version}.tar.gz";
+    hash = "sha256-g122VD1csugBZ1lYllvpaHf2bWkHu1IZVLWYt4Xerl4=";
+  };
+
+  # Fix broken paths in a .pc
+  postPatch = ''
+    substituteInPlace source/externals/ptl/cmake/Modules/PTLPackageConfigHelpers.cmake \
+      --replace '${"$"}{prefix}/${"$"}{PTL_INSTALL_' '${"$"}{PTL_INSTALL_'
+  '';
+
+  cmakeFlags = [
+    "-DGEANT4_INSTALL_DATA=OFF"
+    "-DGEANT4_USE_GDML=ON"
+    "-DGEANT4_USE_G3TOG4=ON"
+    "-DGEANT4_USE_QT=${if enableQt then "ON" else "OFF"}"
+    "-DGEANT4_USE_XM=${if enableXM then "ON" else "OFF"}"
+    "-DGEANT4_USE_OPENGL_X11=${if enableOpenGLX11 then "ON" else "OFF"}"
+    "-DGEANT4_USE_INVENTOR=${if enableInventor then "ON" else "OFF"}"
+    "-DGEANT4_USE_PYTHON=${if enablePython then "ON" else "OFF"}"
+    "-DGEANT4_USE_RAYTRACER_X11=${if enableRaytracerX11 then "ON" else "OFF"}"
+    "-DGEANT4_USE_SYSTEM_CLHEP=ON"
+    "-DGEANT4_USE_SYSTEM_EXPAT=ON"
+    "-DGEANT4_USE_SYSTEM_ZLIB=ON"
+    "-DGEANT4_BUILD_MULTITHREADED=${if enableMultiThreading then "ON" else "OFF"}"
+  ] ++ lib.optionals (enableOpenGLX11 && stdenv.isDarwin) [
+    "-DXQuartzGL_INCLUDE_DIR=${libGL.dev}/include"
+    "-DXQuartzGL_gl_LIBRARY=${libGL}/lib/libGL.dylib"
+  ] ++ lib.optionals (enableMultiThreading && enablePython) [
+    "-DGEANT4_BUILD_TLS_MODEL=global-dynamic"
+  ] ++ lib.optionals enableInventor [
+    "-DINVENTOR_INCLUDE_DIR=${coin3d}/include"
+    "-DINVENTOR_LIBRARY_RELEASE=${coin3d}/lib/libCoin.so"
+  ];
+
+  nativeBuildInputs =  [
+    cmake
+  ];
+
+  propagatedNativeBuildInputs = lib.optionals enableQt [
+    wrapQtAppsHook
+  ];
+  dontWrapQtApps = true; # no binaries
+
+  buildInputs =
+    lib.optionals enableOpenGLX11 [ libGLU libXext libXmu ]
+    ++ lib.optionals enableInventor [ libXpm coin3d soxt motif ]
+    ++ lib.optionals enablePython [ boost_python python3 ];
+
+  propagatedBuildInputs = [ clhep expat xercesc zlib ]
+    ++ lib.optionals enableOpenGLX11 [ libGL ]
+    ++ lib.optionals enableXM [ motif ]
+    ++ lib.optionals enableQt [ qtbase ];
+
+  postFixup = ''
+    # Don't try to export invalid environment variables.
+    sed -i 's/export G4\([A-Z]*\)DATA/#export G4\1DATA/' "$out"/bin/geant4.sh
+  '' + lib.optionalString enableQt ''
+    wrapQtAppsHook
+  '';
+
+  setupHook = ./geant4-hook.sh;
+
+  passthru = {
+    data = callPackage ./datasets.nix {};
+
+    tests = callPackage ./tests.nix {};
+
+    inherit enableQt;
+  };
+
+  # Set the myriad of envars required by Geant4 if we use a nix-shell.
+  shellHook = ''
+    source $out/nix-support/setup-hook
+  '';
+
+  meta = with lib; {
+    broken = (stdenv.isLinux && stdenv.isAarch64);
+    description = "A toolkit for the simulation of the passage of particles through matter";
+    longDescription = ''
+      Geant4 is a toolkit for the simulation of the passage of particles through matter.
+      Its areas of application include high energy, nuclear and accelerator physics, as well as studies in medical and space science.
+      The two main reference papers for Geant4 are published in Nuclear Instruments and Methods in Physics Research A 506 (2003) 250-303, and IEEE Transactions on Nuclear Science 53 No. 1 (2006) 270-278.
+    '';
+    homepage = "http://www.geant4.org";
+    license = licenses.g4sl;
+    maintainers = with maintainers; [ omnipotententity veprbl ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/physics/geant4/geant4-hook.sh b/nixpkgs/pkgs/development/libraries/physics/geant4/geant4-hook.sh
new file mode 100644
index 000000000000..0b775d432831
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/geant4/geant4-hook.sh
@@ -0,0 +1 @@
+source @out@/bin/geant4.sh
diff --git a/nixpkgs/pkgs/development/libraries/physics/geant4/tests.nix b/nixpkgs/pkgs/development/libraries/physics/geant4/tests.nix
new file mode 100644
index 000000000000..7d68780e2eb2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/geant4/tests.nix
@@ -0,0 +1,31 @@
+{ stdenv, cmake, geant4 }:
+
+{
+  example_B1 = stdenv.mkDerivation {
+    name = "${geant4.name}-test-example_B1";
+
+    inherit (geant4) src;
+
+    nativeBuildInputs = [ cmake ];
+    buildInputs = [ geant4 ];
+    nativeCheckInputs = with geant4.data; [
+      G4EMLOW
+      G4ENSDFSTATE
+      G4PARTICLEXS
+      G4PhotonEvaporation
+    ];
+
+    prePatch = ''
+      cd examples/basic/B1
+    '';
+
+    doCheck = true;
+    checkPhase = ''
+      runHook preCheck
+
+      ./exampleB1 ../run2.mac
+
+      runHook postCheck
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/physics/hepmc2/default.nix b/nixpkgs/pkgs/development/libraries/physics/hepmc2/default.nix
new file mode 100644
index 000000000000..e2ab42c418a0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/hepmc2/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "hepmc";
+  version = "2.06.11";
+
+  src = fetchurl {
+    url = "http://hepmc.web.cern.ch/hepmc/releases/HepMC-${version}.tar.gz";
+    sha256 = "1pp89bs05nv60wjk1690ndwh4dsd5mk20bzsd4a2lklysdifvb6f";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [
+    "-Dmomentum:STRING=GEV"
+    "-Dlength:STRING=MM"
+  ];
+
+  meta = with lib; {
+    description = "The HepMC package is an object oriented event record written in C++ for High Energy Physics Monte Carlo Generators";
+    license     = licenses.lgpl21;
+    homepage    = "http://hepmc.web.cern.ch/hepmc/";
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ veprbl ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/physics/hepmc3/default.nix b/nixpkgs/pkgs/development/libraries/physics/hepmc3/default.nix
new file mode 100644
index 000000000000..f803bea98f60
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/hepmc3/default.nix
@@ -0,0 +1,63 @@
+{ lib
+, stdenv
+, fetchurl
+, cmake
+, coreutils
+, python
+, root
+}:
+
+let
+  pythonVersion = with lib.versions; "${major python.version}${minor python.version}";
+  withPython = python != null;
+  # ensure that root is built with the same python interpreter, as it links against numpy
+  root_py = if withPython then root.override { inherit python; } else root;
+in
+
+stdenv.mkDerivation rec {
+  pname = "hepmc3";
+  version = "3.2.7";
+
+  src = fetchurl {
+    url = "http://hepmc.web.cern.ch/hepmc/releases/HepMC3-${version}.tar.gz";
+    sha256 = "sha256-WH+qZVbMVMzYmtNUIUYbR2HXgJvBei5y9QNNrqFCIys=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ]
+  ++ lib.optional withPython python.pkgs.pythonImportsCheckHook;
+
+  buildInputs = [
+    root_py
+  ]
+  ++ lib.optional withPython python;
+
+  # error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11.0'
+  preConfigure = lib.optionalString (stdenv.isDarwin && lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") ''
+    MACOSX_DEPLOYMENT_TARGET=10.16
+  '';
+
+  cmakeFlags = [
+    "-DHEPMC3_ENABLE_PYTHON=${if withPython then "ON" else "OFF"}"
+  ] ++ lib.optionals withPython [
+    "-DHEPMC3_PYTHON_VERSIONS=${if python.isPy3k then "3.X" else "2.X"}"
+    "-DHEPMC3_Python_SITEARCH${pythonVersion}=${placeholder "out"}/${python.sitePackages}"
+  ];
+
+  postInstall = ''
+    substituteInPlace "$out"/bin/HepMC3-config \
+      --replace 'greadlink' '${coreutils}/bin/readlink' \
+      --replace 'readlink' '${coreutils}/bin/readlink'
+  '';
+
+  pythonImportsCheck = [ "pyHepMC3" ];
+
+  meta = with lib; {
+    description = "The HepMC package is an object oriented, C++ event record for High Energy Physics Monte Carlo generators and simulation";
+    license = licenses.gpl3;
+    homepage = "http://hepmc.web.cern.ch/hepmc/";
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ veprbl ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/physics/herwig/default.nix b/nixpkgs/pkgs/development/libraries/physics/herwig/default.nix
new file mode 100644
index 000000000000..c5849f93c5e3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/herwig/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchurl, boost, fastjet, gfortran, gsl, lhapdf, thepeg, zlib, autoconf, automake, libtool }:
+
+stdenv.mkDerivation rec {
+  pname = "herwig";
+  version = "7.3.0";
+
+  src = fetchurl {
+    url = "https://www.hepforge.org/archive/herwig/Herwig-${version}.tar.bz2";
+    hash = "sha256-JiSBnS3/EFupUuobXPEutvSSbUlRd0pBkHaZ4vVnaGw=";
+  };
+
+  nativeBuildInputs = [ autoconf automake libtool gfortran ];
+
+  buildInputs = [ boost fastjet gsl thepeg zlib ]
+    # There is a bug that requires for default PDF's to be present during the build
+    ++ (with lhapdf.pdf_sets; [ CT14lo CT14nlo ]);
+
+  postPatch = ''
+    patchShebangs ./
+
+    # Fix failing "make install" being unable to find HwEvtGenInterface.so
+    substituteInPlace src/defaults/decayers.in.in \
+      --replace "read EvtGenDecayer.in" ""
+  '';
+
+  configureFlags = [
+    "--with-thepeg=${thepeg}"
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "A multi-purpose particle physics event generator";
+    homepage = "https://herwig.hepforge.org/";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ veprbl ];
+    platforms = platforms.unix;
+    broken = stdenv.isAarch64; # doesn't compile: ignoring return value of 'FILE* freopen...
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/physics/hoppet/default.nix b/nixpkgs/pkgs/development/libraries/physics/hoppet/default.nix
new file mode 100644
index 000000000000..af90192878d7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/hoppet/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchurl, gfortran, perl }:
+
+stdenv.mkDerivation rec {
+  pname = "hoppet";
+  version = "1.2.0";
+
+  src = fetchurl {
+    url = "https://hoppet.hepforge.org/downloads/${pname}-${version}.tgz";
+    sha256 = "0j7437rh4xxbfzmkjr22ry34xm266gijzj6mvrq193fcsfzipzdz";
+  };
+
+  nativeBuildInputs = [ perl gfortran  ];
+
+  enableParallelBuilding = true;
+
+  preConfigure = ''
+    patchShebangs .
+  '';
+
+  meta = with lib; {
+    description = "Higher Order Perturbative Parton Evolution Toolkit";
+    license     = licenses.gpl2;
+    homepage    = "https://hoppet.hepforge.org";
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ veprbl ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/physics/lhapdf/default.nix b/nixpkgs/pkgs/development/libraries/physics/lhapdf/default.nix
new file mode 100644
index 000000000000..0482846f077a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/lhapdf/default.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, fetchurl, python, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  pname = "lhapdf";
+  version = "6.5.4";
+
+  src = fetchurl {
+    url = "https://www.hepforge.org/archive/lhapdf/LHAPDF-${version}.tar.gz";
+    sha256 = "sha256-JEOksyzDsFl8gki9biVwOs6ckaeiU8X2CxtUKO+chp4=";
+  };
+
+  # The Apple SDK only exports locale_t from xlocale.h whereas glibc
+  # had decided that xlocale.h should be a part of locale.h
+  postPatch = lib.optionalString (stdenv.isDarwin && stdenv.cc.isGNU) ''
+    substituteInPlace src/GridPDF.cc --replace '#include <locale>' '#include <xlocale.h>'
+  '';
+
+  nativeBuildInputs = [ makeWrapper ]
+    ++ lib.optionals (python != null && lib.versionAtLeast python.version "3.10") [ python.pkgs.cython ];
+  buildInputs = [ python ];
+
+  configureFlags = lib.optionals (python == null) [ "--disable-python" ];
+
+  preBuild = lib.optionalString (python != null && lib.versionAtLeast python.version "3.10") ''
+    rm wrappers/python/lhapdf.cpp
+  '';
+
+  enableParallelBuilding = true;
+
+  passthru = {
+    pdf_sets = import ./pdf_sets.nix { inherit lib stdenv fetchurl; };
+  };
+
+  postInstall = ''
+    wrapProgram $out/bin/lhapdf --prefix PYTHONPATH : "$(toPythonPath "$out")"
+  '';
+
+  meta = with lib; {
+    description = "A general purpose interpolator, used for evaluating Parton Distribution Functions from discretised data files";
+    license     = licenses.gpl2;
+    homepage    = "http://lhapdf.hepforge.org";
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ veprbl ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/physics/lhapdf/maintainer.sh b/nixpkgs/pkgs/development/libraries/physics/lhapdf/maintainer.sh
new file mode 100755
index 000000000000..dc182ec99ea6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/lhapdf/maintainer.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+set -xe
+
+: ${SED:="$(nix-build '<nixpkgs>' -A gnused --no-out-link)/bin/sed"}
+
+BASE_URL="https://lhapdfsets.web.cern.ch/current/"
+
+for pdf_set in `curl -L $BASE_URL 2>/dev/null | "$SED" -n -e 's/.*<a href=".*\/\([^"/]*\.tar\.gz\)".*/\1/p' | sort -u`; do
+    echo -n "    \"${pdf_set%.tar.gz}\" = \""
+    nix-prefetch-url "${BASE_URL}${pdf_set}" 2>/dev/null | tr -d '\n'
+    echo "\";"
+done
diff --git a/nixpkgs/pkgs/development/libraries/physics/lhapdf/pdf_sets.nix b/nixpkgs/pkgs/development/libraries/physics/lhapdf/pdf_sets.nix
new file mode 100644
index 000000000000..286cf8355b64
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/lhapdf/pdf_sets.nix
@@ -0,0 +1,1369 @@
+{ lib, stdenv, fetchurl }:
+
+let
+  mkPdfSet = name: sha256:
+    stdenv.mkDerivation {
+      inherit name;
+
+      src = fetchurl {
+        url = "https://lhapdfsets.web.cern.ch/lhapdfsets/current/${name}.tar.gz";
+        inherit sha256;
+      };
+
+      preferLocalBuild = true;
+
+      installPhase = ''
+        mkdir -p $out/${name}/
+        cp * $out/${name}/
+      '';
+
+      setupHook = ./pdfset-hook.sh;
+    };
+in
+  lib.mapAttrs mkPdfSet {
+    "ABMP15_3_nnlo" = "028q5xixxjxhb8sr7l5v5mwh9mkszm5m59fgnpb69yxvv40a70v0";
+    "ABMP15_4_nnlo" = "11zjp4dxmgp69kdkmdwqkpsajvwjrbwylmwgs56mgjb0vgb8wk0i";
+    "ABMP15_5_nnlo" = "0z47g5fwh53gg5ws5bbip5q2m5mm7vl09q2w58g6ah9dk25r10ll";
+    "ABMP16_3_nlo" = "1ylppc7clyk74mr7qgk0r2cknj2m58y38r3h1dfhjjjmdkw1g1sn";
+    "ABMP16_3_nnlo" = "0bwirm3wqyjj6i3asya7kjmmjhqi69l1rnc6gnq7v136ajmv96y0";
+    "ABMP16_4_nlo" = "0wx00x98wgvhwsj2fg4kp76n9fhv2s5mbar75dsp6xs4v0d1w1g3";
+    "ABMP16_4_nnlo" = "1cw52ijyrhgvyqc28pp278bavy9acvs6qywysgc7qjifygb14mca";
+    "ABMP16_5_nlo" = "0s7yz85fjfkmmxj3xdkhz5658n3nx8rr4yjz4hrqbcy00zdcscr2";
+    "ABMP16_5_nnlo" = "0iyypvj4645g7nh8w6v88pz37p81bxilgc4p7wlkaa90hiq0wrk0";
+    "ABMP16als112_5_nnlo" = "17kg6gvl09p5gm99yb9d8hkl1q51904qflsziv3r5ybxs18ym5g8";
+    "ABMP16als113_5_nnlo" = "1gaiyq70zxx7c7c0gkkad3ygbhdwc563al2a6ksy78q8is3bhdy9";
+    "ABMP16als114_5_nlo" = "0vnwbz6v2d02d5r34ysd7b4d22h948f3zri2n3yj93k6za9y42gw";
+    "ABMP16als114_5_nnlo" = "1gd41d8ay8i8m35qfqsm96jcv8vx6hpdsrdzsj415f4zpw5j29fm";
+    "ABMP16als115_5_nlo" = "0pyk43d6v3hzcq487nzj5awd2zhcjbg9ak0pcs1lykhvxwm227hz";
+    "ABMP16als115_5_nnlo" = "0i70z8i0qgzr875szdh8sa6x3xcdkvrfsba97a6ha7b6km4p1yjk";
+    "ABMP16als116_5_nlo" = "0nyrcb3hbzngj5j3yhpwlnz8a7dx7higngzmp26kmcrr4bmhiq6w";
+    "ABMP16als116_5_nnlo" = "11rph6vmmvvsi8msfp2agb7747n7xjgxb7z766i5jkvnggbmz75m";
+    "ABMP16als117_5_nlo" = "1pfjdxxdwrwz5n5206jcv61l8ycliwigqgram6hlm8ibl9a828cy";
+    "ABMP16als117_5_nnlo" = "1sz9hy2m983aiwyssg60v4kq1zvz4xxvbzrgsdik1qv13bj4wx9w";
+    "ABMP16als118_5_nlo" = "0ddaf2a7v3kdynsmls6zxld9zflv9m8qkp8gibc5xd6vqsg64f8x";
+    "ABMP16als118_5_nnlo" = "1slvr5ygwwryk63mah45xp5x31qwrf0gkrnh4p9fvl4rdkji6z0z";
+    "ABMP16als119_5_nlo" = "1brv76x4z0r0vrxr51gqvfzn4d03srhvab6dmxhhj3sy23qnbxg5";
+    "ABMP16als119_5_nnlo" = "1iqs1bi8r22awflf698cj39q8s2w86fwvdfgqb6sr8csm36ih6qp";
+    "ABMP16als120_5_nlo" = "133vy2zhvh49fa9xkp889mxy6xbriv10q8r4lx74wb9d1kqwfx81";
+    "ABMP16als120_5_nnlo" = "051bqfyh2017vnvlisvkm1ik6x7n829p8205f5algsw7wi1s7b9v";
+    "ABMP16als121_5_nlo" = "1l41qgba24rslg6ascsn1i0y0y0d7yh6hszhclxqyn07gzwq7p78";
+    "ABMP16als122_5_nlo" = "1ivy4m9fah8i0ipfxfq8caxa7pz8y86wgrqydg9wal9qin8n8xcd";
+    "ABMP16als123_5_nlo" = "0gcf7dqr1gzjfa6iy0qzivyibw72qpagfda0a5aksd0h6aap5mxc";
+    "ABMP16free_3_nlo" = "1hxlbmc2kzd8yai7ipyc95khdsawdcnzxzr0vkk3h42fxczx9y6q";
+    "ABMP16free_4_nlo" = "1ckwbyj18bgvpv16r6lx3866ca4frq6rxmzvz14ak6h8mpwvcnmq";
+    "ABMP16free_5_nlo" = "0sbkrn3g4048bn0y5bm6dqpn1za3761n6x40k7i4pdi0b1g7zlc0";
+    "ATLAS-epWZ12-EIG" = "010ddmyfrmscgd1xdjsxsjc773jlvbh3s6mjbwk9zd298i3bf4kx";
+    "ATLAS-epWZ12-VAR" = "1r9ip8549dzhs02skm8v00g6nsh7q1rwd3syz3bd6cl4sqhs0k37";
+    "ATLAS-epWZ16-EIG" = "0b1zzp8p0kh4xjn76nm6waqlvdpqvnwyqsnnqdp2n7b9r9ssryyf";
+    "ATLAS-epWZ16-THEO" = "0b0wqa203b2x159y54xhf9yh34lkchp48vp9693k51g9aznx8gjm";
+    "ATLAS-epWZ16-VAR" = "1zkhlv8yxfla46gj57119w9prsd3zyy5vg275bayfwa6b71gmc0b";
+    "ATLAS-epWZtop18-EIG" = "069rysd9mf3cshx7xkcv7735ydh2g6szvljbfkcqwckaqjg2x3v5";
+    "ATLAS-epWZtop18-VAR" = "0hpyp52dwl8fnw47pyw8g7fsz97wr6sk4yli6sx0zbj8yy2j28yj";
+    "ATLASepWZVjet20-EIG" = "0lvd3zkmisx95rbjx7r9wkk0s0mxvaybp3pk66sxrxf1bj1l9r52";
+    "ATLASepWZVjet20-MOD" = "1iyb50isdsy3a5wnlm0185z9bfs6nxwlcl1aqlh4h3j1dbmz4ba9";
+    "ATLASepWZVjet20-PAR" = "1kfqii7sbcs8zdsyd9kiy3r233nawc9yfc23fb6ql0xcwfzpyb1d";
+    "CJ12max" = "1vk2zkaiqbl6fixaxy7mrggmmxv7lvnw736lxm5sh25dapg6s8ag";
+    "CJ12mid" = "0s2558ihypn0l9qqx25qwnawbc7fkbi2wwwhbyb108rjk2klaf8v";
+    "CJ12min" = "1kdla638m3axr65ndid9irmqhby4gl084r297xw3jxxlrb0b7hj9";
+    "CJ15lo" = "0hww26wbcb3i61z41s518gj41mn5gcikb08pdzyb5vyrl63b39bf";
+    "CJ15nlo" = "0acmyr5zpb7yzs2pikhgf8nx8l7csmai4sv361l7x3miqir56ss4";
+    "CSKK_nnlo_EIG" = "0fdc2a7xax7xl5n5f3ff5dcf7zbpk43z4kfy3ffij2qykrwfx7bp";
+    "CSKK_nnlo_THEO" = "0srs535f9xydqfzyy208304yxah1rg1r5ilx8hk9nvgaiy7kwnvq";
+    "CSKK_nnlo_VAR" = "1iyiam3kbjrckh0sw290hwi04h5cqif081afgd16f0a44wbcjsi1";
+    "CT09MC1" = "18ap08vh1f4ivibq5z57wv7lwvw1pzwl865xznzzcr0jy4f59103";
+    "CT09MC2" = "04yxg4bl0dcgh6hb9g223wm084w0q1y2lbd4z7w8vmvvvn579ij8";
+    "CT09MCS" = "01vjpdgy79gvk3w4blwjgfqpf50mjdi5kmfcgnlnwxp5q0804pgf";
+    "CT10" = "17glhnqj4yknqy70zs7m097n1qq9fqljj3mna6qxchmgql04dvxw";
+    "CT10as" = "1709bb3ky4mpn4cgx9lda8swmvb2pl70ly1gzk4ahgsflkb8iaj3";
+    "CT10f3" = "0ijrx0wm03r0yg6f0n4vwp1c3kypdjpmmnv12gk79y193bfk362l";
+    "CT10f4" = "14icbh8lg9290wfalr1bsx0zff1df19x0qrjqh8n0y9ckqmkbh6l";
+    "CT10nlo" = "14ib003sxpxc8awywjckbw124aqhmi70wg4hlwc2nvdh46sqk11b";
+    "CT10nlo_as_0112" = "0n2abywijgjys56kz5qm30arh3v5k685l0gayl4mdablbw0ccaca";
+    "CT10nlo_as_0113" = "123kbzzfjlparffgmqpimygzjcn0wi1vnyrkjfjn2kwcdjazz8dp";
+    "CT10nlo_as_0114" = "17lgcbf7914dfb89d4v8fal69zq7gmadvha8gpz0wfw4p0pq765b";
+    "CT10nlo_as_0115" = "0rgpc3mcsd18yg4j41k9hhvbjbi3d1zrd9fq1314m4qvviq6d9j7";
+    "CT10nlo_as_0116" = "15xyhmipv9xbiz3jaqdj59nyczn35nq14183xz4py68l2v20smqi";
+    "CT10nlo_as_0117" = "1qf9azafrwqpyp5flc912g2frfpi899vb032yrrgqj2l1flg474x";
+    "CT10nlo_as_0118" = "1jra85s6df6vvmljkf8gg2jkj3r6b1yl6aidzlm3j59di0fk9xp8";
+    "CT10nlo_as_0119" = "0y7k0w592j777jpbrh8v2zh1l6n38xbxjvyiv5x4pvwi6zrp9ppf";
+    "CT10nlo_as_0120" = "0mh1hdmic5c3krlb1xypy0n6r86r7da0ay9183xwb68d1kh4j630";
+    "CT10nlo_as_0121" = "1gwvgj3bwv8fz8mbmgnfsy0bvsm4h9d898mf1kcaaivh56sfial8";
+    "CT10nlo_as_0122" = "1jkkqcmjynd30paxc9z9gpmxkfhs6ad3x5sms5980jx291rc8hgd";
+    "CT10nlo_as_0123" = "0gppcp49275pg3yv37mzkx7az6298wwy7gqla3gzxfzlas0ybg0b";
+    "CT10nlo_as_0124" = "1irl19q4wyw36dwhln1m4y7y40by5xgdjqpgj7sqaix8jvijc9bz";
+    "CT10nlo_as_0125" = "17c6n2prdsry2phqmaykrf1yc02mvhacb87r7yl0nhkhx80kysk2";
+    "CT10nlo_as_0126" = "183p4fd85zs2c1j0zwfsa08wq6v780xvwbg44bpm52m4ih1dgqy3";
+    "CT10nlo_as_0127" = "1vcpadkf90x9qiqaplc25hld7qljk5d3lzs1dssqi5fh1kci8qd1";
+    "CT10nlo_nf3" = "1dfzas3z075riwx26bkmvjck42pjgbm32d1flg5rccsxjn4pmmm0";
+    "CT10nlo_nf4" = "0npv1h5gi2vhgxzcbcsl740z2p7j9p8pg3jwfb0yz88wlbj5bkah";
+    "CT10nnlo" = "1la35l1b3hxdkihh9vkibfh68rghcfgq48q27x2b05dfhcvcz9lz";
+    "CT10nnlo_as_0110" = "0j1f6lbjhwcpgfb8kwzsij0hfmzb3dggi6zwwv9f2w39ax2rfb8i";
+    "CT10nnlo_as_0111" = "1519hvpi1zrjk8p31ksna39n9l8v02ggj5q775q243p9qyfayxlf";
+    "CT10nnlo_as_0112" = "0asnbr0va5p1j81kmv8ar267aciap638kcb48cs5ghz9fvhxp197";
+    "CT10nnlo_as_0113" = "1j5cfbv1d5q2hscyrvig6xkk7gfv4x5cxn1142qmd8pdm9ky2fdb";
+    "CT10nnlo_as_0114" = "03rkvf4ljv7bnzp0fyyrypbbx4rxd1y6id3dfvg4w22s65kp0csm";
+    "CT10nnlo_as_0115" = "1d8rkwvnymx4pi0v1s2vbc880mggdmfnzjppd7fghjqj4lkkanyi";
+    "CT10nnlo_as_0116" = "039i2bq4xr6hlvg0syzmyfv4lm7lrwr59myrhd609dybiky4aqd8";
+    "CT10nnlo_as_0117" = "0q3a5lbpxh24zv7ypbc680kqrkwy5m7xbgx5v44b6cdzlib6lvsn";
+    "CT10nnlo_as_0118" = "0b11mpgrkqn2n37asg8qg3qmhdhbr8lmj8qjixxpca0h1j7m71a5";
+    "CT10nnlo_as_0119" = "1j411yqrlbhqmby8mplgghmb4zxclf1h3pdsffx9iv8sq1q6dy2i";
+    "CT10nnlo_as_0120" = "1djf9qfqrywpsyv0w6igidg9a4ca739dvqgc7qz7qg2bpclbaly9";
+    "CT10nnlo_as_0121" = "0nlm5iwcvb02fd7kan4yp60qbc0fgir4dii3xg03n42xzqixy2qm";
+    "CT10nnlo_as_0122" = "1kwq04i5ln8wv32vf4akjnzid3jdq67zccfg7xriqrwd9367x5kv";
+    "CT10nnlo_as_0123" = "0w4fmsmyci09v0cxnmhdbqxv3xq3wa9ma7m4g39sg2gdsxqz1rgd";
+    "CT10nnlo_as_0124" = "0yzrj1pdigssi39z21k9jxbiahhc1785rjxhq7xl8zx38paspbg7";
+    "CT10nnlo_as_0125" = "0qvdvj3wkbkw0b0zv79ybds2pk5z9kbriwsm5ffpnycrfkzrm2kd";
+    "CT10nnlo_as_0126" = "1cf8bqi1g4c3xqg5k9m4fa8v8bcnwkzblmfn7zc396pgbzhhz610";
+    "CT10nnlo_as_0127" = "0zknrx60h8jdf2pfg2zq6xk73hn86gcv69ml78ik5ms0y5gp21av";
+    "CT10nnlo_as_0128" = "09yn8l3nv29frj3xn9pafiz2iamccp8ii8j7hmp63iaji6c7m5fg";
+    "CT10nnlo_as_0129" = "1ypq63r5myz2phn4y5sbb5dbxvycwis8jixjl0n95xmqlx5zhixi";
+    "CT10nnlo_as_0130" = "0ilr6ijbbh1zki66ma006h1qhdq7wmzm0ipki78bk01jnr5yl5sg";
+    "CT10w" = "1qkwz1drbkxcb4gskkfn0r7fsa6g9hjlc8716m633x35kha1v52j";
+    "CT10was" = "00s4n3nkngwyhh82l132v88c4jgkg03ff4x7m7nna21lvkv4wkb3";
+    "CT10wf3" = "1r43pzb1291bjcmahgfh0f86pvb3nhdpxw7gikqmypdmck0n2mqf";
+    "CT10wf4" = "18bf9k0jp95y9yz0m896sdzy9q1fyp0r4f5hrv4jq4d1z84zdis5";
+    "CT10wnlo" = "17wsw6p0h618q68swn9mjsahfyqikjgsiykiby7y27ryairv709n";
+    "CT10wnlo_as_0112" = "0p7mh56zyqh9i72llbmjchwm50ifa358snd8i1nqr3r6lr5265hb";
+    "CT10wnlo_as_0113" = "0nl4lk3cscsn6p50b3qqaabqfnkn5xgjmcxvfrr1n4njh411kmln";
+    "CT10wnlo_as_0114" = "1vck1i34dspbzskzpbqxbq11gp79drlrik52waklvsl5110xawnv";
+    "CT10wnlo_as_0115" = "070cl0prprqqkkzwxnvyw7r4ivvs8slb98v5yza0gvpwck0blnzn";
+    "CT10wnlo_as_0116" = "0v50pyjqpcrarbx886la0hr6vwvnavsldm9amcdp1vlck5w8mmg9";
+    "CT10wnlo_as_0117" = "108sb5h79mpgkvdzqlx830dykba5kw9zqgxa60i7bcyjnv0277si";
+    "CT10wnlo_as_0118" = "0zf335291hwfmdbhgl5v2y5pbc9slm7dmjfkijdv0jm33drpkcg2";
+    "CT10wnlo_as_0119" = "0kvwc0k5y51p4qvlb6hhxvn9c2n8x0xn0xyp5zkz75ad3vaz9yvn";
+    "CT10wnlo_as_0120" = "0yvbcni3xf718xild7s9g6cxw7dwa38f4iqdm5z7dd9ahxyw9rxv";
+    "CT10wnlo_as_0121" = "1z0mlrbdn8a9n6h0jpha3p1lqz4iamrwa80svqn9y4qii9h5pjkn";
+    "CT10wnlo_as_0122" = "1dh5czjvyjnwlzc14vz91693pr3nyls5g926g347rdrkqkjq8dcz";
+    "CT10wnlo_as_0123" = "0nf7qpgb83ahm5dkzr10xafhcx4lvb3zlxnz70jczl1jd4v2cld9";
+    "CT10wnlo_as_0124" = "14h07z06csxb6v6ai1w5ba0kygnsrzdwxr2nx1kcn93axcsqqbhv";
+    "CT10wnlo_as_0125" = "0g0w6mwy5y4l36cn4z8gfmigzharyn5xqk5ricasracrnf7ydix2";
+    "CT10wnlo_as_0126" = "0dbkkyimpll9r3979vbk4xqi5cfhzr6b28x6j73fbxxxi1xfavl5";
+    "CT10wnlo_as_0127" = "1svmgs55kg74rifjyns38lggv1c18mzmpmvsv116rrllklb19pfp";
+    "CT10wnlo_nf3" = "1m13if0d9xijq695x41snpwwrsgs5a0jvil6j2ww8cspc33d7vr3";
+    "CT10wnlo_nf4" = "1b9lz23rn2w7fqwxxgf6fcg620ac58dnb1ssj3ml3vfn7z88yx43";
+    "CT14MC1nlo" = "0z82q7xr9agq8iyw7w2rcclh27mry5snn5jswn3cxpgnalls50rx";
+    "CT14MC1nnlo" = "0fj6hjdv82fp4iv7iyk9gna7sksnpkgqx0bsrl2wjbigm4ys031g";
+    "CT14MC2nlo" = "1x6a6js1jpvkykagz6w3klh6hb2wf56r3kh65i6qlnzak4m7b8sq";
+    "CT14MC2nnlo" = "0hbdz8agjm16mm51hclpl2nsa5ji88zpqdsn682xgihq64kahsnb";
+    "CT14llo" = "0sz2ni8xcjjg8034qjrhb77ak1akzlf5fwq00qs9c196lk5b2x7s";
+    "CT14llo_NF3" = "07zzs3jprh0haqx5bcsii213m99m2nh9vki76d9cbhicyzx23pc1";
+    "CT14llo_NF4" = "0bxkw5qms6dpab0zf1hhd8dllrjip2izbv23aqpg72d5rqxb6ny4";
+    "CT14llo_NF6" = "060fx2xrc90id3nb7rlmrvkxlyafx3g7nhdb5jmbr3hxwrzrq674";
+    "CT14lo" = "0y36qkjqd75zf1w1hs1q51qxgin7sm3bhmcbwczwrb17c3vb4m2m";
+    "CT14lo_NF3" = "06iad9lrpxsy0d365vrjv6gjlgggakylrmj1px17y6s796jq6c6g";
+    "CT14lo_NF4" = "18c03j26mbapjidq01s4yrfdh0i7j75gbswdhwcllwdvcg3gnki1";
+    "CT14lo_NF6" = "09ncggqnqcdpzakm16dzxd6ikay9gd5k8si80k52hrr9m2gf36ci";
+    "CT14nlo" = "137i0n7g9rgfsf5rx65d50njwsqawprazp5an513kmz1cwq0cqmd";
+    "CT14nlo_NF3" = "0pmamazh9i8pahalasr7mwx67ixbgrbsh8004grg0cimr2y4iwjj";
+    "CT14nlo_NF4" = "1k7sy8lpzkwy0dc4ig9i9134k854fk0r0lann6pj3jsxs0l6h5km";
+    "CT14nlo_NF6" = "1gfwr0sjbq41gx3057hqy8v6ysivjf1xrh6fp3qqn6m13gy2kbas";
+    "CT14nlo_as_0111" = "0kgg9r635grdwp152ylzklawzy8nf2ywlp75bjc1yyagg765k6jv";
+    "CT14nlo_as_0112" = "0j0bxx0gjdnj41gjasgd153gd811wyhsza56fvzrpka820bkk6rg";
+    "CT14nlo_as_0113" = "06if5wk1asazvff57ah944mnzkh5460yqkkwcs8zhnwx2kbq9v85";
+    "CT14nlo_as_0114" = "1szy7jwjvdvqqpjvcra1f0wn8qgrja6wx4kwcq9vf60pns7mzk7v";
+    "CT14nlo_as_0115" = "1kkahzmrbdr7s06v093arnss0xpxv7byqqx2f5aqh4fzimwp9n7v";
+    "CT14nlo_as_0116" = "0qpkmmpq1b33grf85jzkanwpa02j1cam39pkxchql95hv2jlgw4l";
+    "CT14nlo_as_0117" = "0381620r6h9s2qby52jvys4z8m6jfafa5qnia2fq3q1pc0xp1q2p";
+    "CT14nlo_as_0118" = "13hgxmjx6bv7njb6jdlypy1z61nqf5m5bavxsbrmwwfxlsl4jdzn";
+    "CT14nlo_as_0119" = "06pjl10js0xq7p14ifjn7xhndxyb39sxyc9ksd6wx55i6zyqf08l";
+    "CT14nlo_as_0120" = "1wyygxxjlcsh1qg6npk5szfbf59k4j80hnxnxhah9x9wrg5kg9j2";
+    "CT14nlo_as_0121" = "064afbxxqx4rsa3l73rki8wxa08a1rb53qyf3nwwjb4zb426jfgg";
+    "CT14nlo_as_0122" = "172xvndzcm8s4hzjgrq3szg6j7z4s2f4pgr07vr178zvn9986ham";
+    "CT14nlo_as_0123" = "0q2dansvna4p04ilb1sajz3s5mi89jgd8badqh6r72g26s96dman";
+    "CT14nnlo" = "1y3gd5wzpwv024xcrn70bz6h62n96mgqqwyl5r7q6czw0is52dzq";
+    "CT14nnloIC" = "1wnpwy0mz0c5y29wi497jcn5k47bndd0h65d6a18qcfk0l15rfzx";
+    "CT14nnlo_NF3" = "0ijns9bjkw8zcinba7rflc7ic03mn5701lqfrxqjyq4q6kh8fia7";
+    "CT14nnlo_NF4" = "0fhyzaxnm17pi7wfh5hwaic9q4y0hb05ripd6r648wnnhhi353xy";
+    "CT14nnlo_NF6" = "1dvabji3vrqk8ngln72xqiahm8fai3klgv5yz64b3bfxcr04wmg9";
+    "CT14nnlo_as_0111" = "1hl88j40czr73h9fbz0zbliawlqwng7ikrmq01hsfns190axm8w9";
+    "CT14nnlo_as_0112" = "1w9344v9ihr0w8vrfhhxn81gcnr0qm6ihwwijvcdds09jpdlp6vr";
+    "CT14nnlo_as_0113" = "11symfb1ljislbksrars1k766fa2n1inbarzbw3kp01vxpw8gxf5";
+    "CT14nnlo_as_0114" = "1s1zz0ibr72jvx9c7w3kcryiywnmg264gprn020yxl9sqfzm0kzz";
+    "CT14nnlo_as_0115" = "19c4c4s7djav1zai2nlxbvy8fzg8hqlynri1y4hyhc8hhl00lwb4";
+    "CT14nnlo_as_0116" = "1shjwky7jjwcci0frra2lfc0wycvza7na89c4bsqiksnk413v2z3";
+    "CT14nnlo_as_0117" = "1mp5xxv810khs59zg4kfsdj5qp6ny0878fbz7jf101mpyhdawf0m";
+    "CT14nnlo_as_0118" = "1mvyv13agnmc2c47i9yl8ki5d0qac3l6ipn3nf5rwxjgah495rv6";
+    "CT14nnlo_as_0119" = "02b14lrx3zpbl5s4nj1rvh30i9xdji37yvvg2xwjiw3i56vl8b2l";
+    "CT14nnlo_as_0120" = "0wf29wz9k2v39pbzh91bxwifbs4cn0gsnjdzm24cpgq7bnhyszn3";
+    "CT14nnlo_as_0121" = "1w12xmxqclrrwvfb2g3zvivkq858n0lpp0bzfibvh4wamdyyx3an";
+    "CT14nnlo_as_0122" = "1hgghn4ad7fj3ya17qnka3xcwz7sp4fl0vpcbqkrs9mbbz570fjc";
+    "CT14nnlo_as_0123" = "0m66gwhw2n668sg4srq683qbavwabrk4f4vfcsbppzbcgm7i4yz7";
+    "CT14qed_inc_neutron" = "0ph835nfx98i74nncmspj7qb5798yciq76hqvc505n5zd0hwp87x";
+    "CT14qed_inc_proton" = "0gv0rlr6l62gidqp02ifn75d1ribvbihgpaqc92fww73zwilr7l0";
+    "CT14qed_neutron" = "0ck1vmqk17i7rq42hra79cz2rm8ngxv4da6dvz62l6m2nrga3l2k";
+    "CT14qed_proton" = "1gijxkq5gpsljijblzd13kgr7xjjvnjv18v02jivylf73igsakd7";
+    "CT18ANLO" = "16lbhgkbiym3njiffxdcm3hf7kkm33hyj2w1hwgb3mvxx2sja31c";
+    "CT18ANLO_as_0110" = "1lkxicxmphi4mdc23vig4a5l4gp0n53jblzsl7bvrixbkhd5arv8";
+    "CT18ANLO_as_0111" = "1jk8siawnpnclgjc0jhx89ipym0jp94mrklwkn0awh0hgqxd26ra";
+    "CT18ANLO_as_0112" = "0rpfx10b5hjwzmlqzkk1zkk38ysn5jfgipk71zl5da6qk1ih5v2s";
+    "CT18ANLO_as_0113" = "0chhqgjddrb731y6haa94yypki6pzpjq5rvja61gfbghbvnc02fs";
+    "CT18ANLO_as_0114" = "0nvl1a588jvmh7a7przrzpvf9prrpvv610jmsnfrcp4i98ipdn1p";
+    "CT18ANLO_as_0115" = "1f757zlavyjxjwyda8rnkzg9kagmciywvvvdcsbks9ij3m4fcw5z";
+    "CT18ANLO_as_0116" = "13bdsnwkqzjq63m02vmb7z03rx6chcyy3br4m52gja0qz03rxhyj";
+    "CT18ANLO_as_0117" = "0w5pmqry5rd5jsfwiv43cy5z3hlk7gzllnk0vn1qgsjrgd284hj9";
+    "CT18ANLO_as_0118" = "1g137nw812zqdkr97hdwvfi4c4bxfazy1wyk30gwgrhqs6xdsmyp";
+    "CT18ANLO_as_0119" = "06pjg9nsq6pvda1yg6lg2qi15i3h2radampgk23rbz9g6zn5hw39";
+    "CT18ANLO_as_0120" = "0jh6f5jj81sppv5fhm8ccgzwpacfr1nql3r5466z0bl201fc9x6x";
+    "CT18ANLO_as_0121" = "0jh4x2y4rcp3l825dl3a89apmb0f94jrk0pl93lv8xg34f8jrb2i";
+    "CT18ANLO_as_0122" = "0ma8r5vgdw9hj6cafkj8fbpq8i18cbild4aw4q9lrsszwwcrlv9i";
+    "CT18ANLO_as_0123" = "1mv75gga1gdmnwkaxc0c89jxgapc38376xv5yxfqy2dn03pad9im";
+    "CT18ANLO_as_0124" = "0913a748xm6lbdci8vicz08h323hbkc4z1bjq1wq8qfrl1cx02ic";
+    "CT18ANNLO" = "1kbsbvvkkchhwwjdrj4d91lbykid4dcy4ghanpdd9x0nfm5b4sgk";
+    "CT18ANNLO_as_0110" = "1inx20r83pfmwxfhyy3hhj2csp016d9cnald1rf8vl9riqxvx0j4";
+    "CT18ANNLO_as_0111" = "0zzi0b27xp4xykbwd2y7l2ka1k4kfvhaq7y2w82fky2b842ixsmg";
+    "CT18ANNLO_as_0112" = "0y031rslsmwxs76rz184mrjb07pdcxrf07yl5yab1y24vymqj4dy";
+    "CT18ANNLO_as_0113" = "1pgrcb6sbahl2jf3v08bki28w9x0ag5n3zj1fi0jc69fxwgkczzq";
+    "CT18ANNLO_as_0114" = "0ifzf428gxlmhc8wvpj3qaqr0cl6pripiabmnb5av43d5avwhagr";
+    "CT18ANNLO_as_0115" = "1bxf5rs33kfl3q570wm49ad0drlanzq8wkrbd85qjlvyhy52j8vs";
+    "CT18ANNLO_as_0116" = "0l43qn45wfj2lljpp8kri1n2p99lxj3gbbqh2p2s7v0my5ds5p06";
+    "CT18ANNLO_as_0117" = "0nfh9y2w8lvlqbghxx4i7j7gxq5bm67h3vz1wajg86zndarkq6mz";
+    "CT18ANNLO_as_0118" = "0m8s96rgnnl5xk7g3l2pf5qx7dwb8kgn18b9nyr8cyqxn90mh3vr";
+    "CT18ANNLO_as_0119" = "1lpkcrcfmn0kc9g21ca90j1shcf3ii89yrr17rgwynmylwvizs2y";
+    "CT18ANNLO_as_0120" = "0lmn2p57k7yvr5mpzykljhkpnb1c71f4ya2s4zbp2x84fqfg5wbk";
+    "CT18ANNLO_as_0121" = "0arbvp0sc67fsf7slhlv96iwq89yjqqkv84pf76fqdvrrjsmyn61";
+    "CT18ANNLO_as_0122" = "1nbkgb0wmjh2bfx944sqb810sn4bb0ppxgv2aw2y93jbfyx7x4ry";
+    "CT18ANNLO_as_0123" = "1rlxn70mc299v596y0dwp9a1pdy1yz0r8367cjw5l97y46yxhjrh";
+    "CT18ANNLO_as_0124" = "0sfkvhyxp9sqf75wj91h9h59vcs2y2n4qchsg0marjy849xxh6qb";
+    "CT18NLO" = "04y2p6vz484l3yv6381pfavqs3xh78h3jn6bg7ncp5vywwqp44n9";
+    "CT18NLO_as_0110" = "0nrydk44sp7hgabn6xk6r2hnkir7mgddcsbbnqmpwmq3x0xz27pn";
+    "CT18NLO_as_0111" = "17xwzcj4n1bmfwz02n2g8afzxc4lp5diij00f2w50pqh2w7vj6g9";
+    "CT18NLO_as_0112" = "0a6lsmpz3c1z7dm593nb3r9q7dgpskkls2i6wpdlrrg6s6cr8rmq";
+    "CT18NLO_as_0113" = "1kwz9yp0vzyiwy9avxjwibdc6jla32vddf23pvfiv0qjcwfnp6ii";
+    "CT18NLO_as_0114" = "161q98jr59vn1qldhd83qxx0qjq1rahgamwfqd3hw6dn6wy39970";
+    "CT18NLO_as_0115" = "1dp0683zfn7mg0bj1l5m7i9kdbyxjl0ahhwppvgi5gs5kbmhbs9n";
+    "CT18NLO_as_0116" = "0hpi5s175cpz251nav0v34l6qsfqj6181mhhp80kghyyvl7l22sw";
+    "CT18NLO_as_0117" = "1v32wxdsvms23sghcszw6csd08kw0xppjzwjnbdsc8k6w67r546m";
+    "CT18NLO_as_0118" = "1vd7vc7f49in1i5398p12b9vklxbsif89wv2q93k6m91kb38rm45";
+    "CT18NLO_as_0119" = "1h0dlys71cngsxl9dj9l5amikxrvzzb7bins2a6wn6s7zgfyvlck";
+    "CT18NLO_as_0120" = "126jfwml027mnpbr6ad7s8d94j3n1sv6fbdy5r5vcb64nyncjach";
+    "CT18NLO_as_0121" = "1khffdgqdfl1g4cxp4fnyb900722s6pwzys7cdxmwhzi9f0rwgw8";
+    "CT18NLO_as_0122" = "1w7q35igi7fnkrwnr1dnfq646qicz4549c6ddqbkyil10arvq7fk";
+    "CT18NLO_as_0123" = "1bl6rf69gjnblvfdh5p8flax9qb65vk25hcfjw2r7qwdz3dxs6sr";
+    "CT18NLO_as_0124" = "18mhpn4l3qqg9v79z2vz4jc8w3za726fndfl6sbc9mf94jy72chm";
+    "CT18NNLO" = "1shkah5ma0hp101aklkz2p8n9y4i4sv6zwa5ifzyj3bgz1020l5f";
+    "CT18NNLO_as_0110" = "0v7nsjcm1q7hgj726zlvfydl3arqkwyddd20z3g0nwdqcimv3qs9";
+    "CT18NNLO_as_0111" = "118444ygv03ryhbb28njbsayvv0rdlcb9djja6p62kk6rnbwi1wz";
+    "CT18NNLO_as_0112" = "0djxkvwk628sxgf62bff40m2m6vgzs08jss61f90rscvj6gxid5b";
+    "CT18NNLO_as_0113" = "1xg7qs33h8zgj4007r8g4drhm95551slhwv62dzyv9pwy5vrvgdn";
+    "CT18NNLO_as_0114" = "0i1g7kwfs39ps9ml0ckkcq7x4g1n764q1r06ilq7bci3m073cffn";
+    "CT18NNLO_as_0115" = "16q0hc3p0325bq9zgskkpf9qfyhmz9q0rk3b0jrzpc0d4vk7b5r5";
+    "CT18NNLO_as_0116" = "1mhnx8szpp4sfy592f8vzvjlzr9y46qndv3c42hf0jsygx5pc5cr";
+    "CT18NNLO_as_0117" = "1bmcnjfzwf4bl70qyx6csix3ps46pd32yb2h33y2f144vp8bmkpg";
+    "CT18NNLO_as_0118" = "1r1dmj42qrqprhq06i0h4kpjc1riql963n32icl0mfwjq9wpfa0g";
+    "CT18NNLO_as_0119" = "1rxyd21h407zmjn3nnr4cqvinw2nwcdhid6cbr0wif8p2b3gasic";
+    "CT18NNLO_as_0120" = "1llhnfijc7v6v4dkbsfgj2c3m0y4q42mvaynz06v2j3aqv3wzhza";
+    "CT18NNLO_as_0121" = "19dqq2jz5daq59gv2zdvygyvwi9sx6i3ih82yl82yy82gbw2568h";
+    "CT18NNLO_as_0122" = "0p8w4ypaxrpsyz3dn7f0964wgvd30iy4r1haa88hqwx74qrkb4pc";
+    "CT18NNLO_as_0123" = "1c1sw5md5xp8l6b3qxbnf994kz2rd60p4bl3s3l2af7f77w57wfv";
+    "CT18NNLO_as_0124" = "0ldf7dnzdlwqh0gmb6an0b8cwcjpkiaih49aa77j2irw2yja5p41";
+    "CT18XNLO" = "1k0cli4j0z5hj24pk9f78flhlvsdfya51hgh90jv4myniapk616l";
+    "CT18XNLO_as_0110" = "07k9ga6n2gf9qz0flvrd4if0mssddrq1bbk0rpxsy8wfp41cjsl8";
+    "CT18XNLO_as_0111" = "1ysz50r2nc57c7srgqw1dcvyfr9h578dkz24sbimxq54akp9jkxy";
+    "CT18XNLO_as_0112" = "11wvnvsc6a5c2ygq39avai4xk2mrnfnvi4fqzmkjdcm0kby0swpb";
+    "CT18XNLO_as_0113" = "0cyv8y2m3514np7f3fwpf3g1mzy2cz905sc5lrjqff5djwjc23yg";
+    "CT18XNLO_as_0114" = "16vj7hhg3psmyr4vqvy8mz4bg7rp6jc6b64n2dfpq5jvb15w2fbv";
+    "CT18XNLO_as_0115" = "0ylw7d9g041fgrjfvq0i0ycpxwbm3s4jdgm5mkjk6yj0s4mrrqcy";
+    "CT18XNLO_as_0116" = "0mcfgih55zja7k0cdi1yd7gx1gjr6cpzz28gz4fxyxi2l4paxh2k";
+    "CT18XNLO_as_0117" = "0klzf5bchabcjc0c8h6f09g37jy6vwrpq7q8iwrfcmar2slx26r2";
+    "CT18XNLO_as_0118" = "0hd1bhlkmnchcv0xbrqjc3paa7fqp249sxi9hg71x3qbh03ab036";
+    "CT18XNLO_as_0119" = "1xlxw18hcsv7bij4dvnj9dfm8sai5xm9jggb8g7flmvkmcskgzmg";
+    "CT18XNLO_as_0120" = "1ixdg56qgm5701al85zkp81xx3h9hsipqka8l3sh0ghp563qxk32";
+    "CT18XNLO_as_0121" = "1msa7pp1a77wmvxa9mhr0sgjj4yv1msb0igqj53ahzgisyl3lnml";
+    "CT18XNLO_as_0122" = "1kin5bf9bcxadqibqfzb03bxdrj759mlgpbpjvvpxg4ishj0b7yv";
+    "CT18XNLO_as_0123" = "1mir3cpvbc30l3m84j1ql1d8phrx7nf0qd5xbq9jfl4gx1kjfw8c";
+    "CT18XNLO_as_0124" = "0ims3sl32rria896ckm9fg5dsmbf6ivcfl3drnqpl328ynrkbzlr";
+    "CT18XNNLO" = "0j7bwzkhax4cm3wnbhqdv48j4wha9zdd7v77ihlgcvcmk79rx1fa";
+    "CT18XNNLO_as_0110" = "1cxlps6kvm08lkgvrqjd8080ykc1dvd56986iwwzd0s6whlpfsi0";
+    "CT18XNNLO_as_0111" = "0bbp4qz3n9pwcfn6m623q2qqmx2wcgpy6759wzwpjnifym832j95";
+    "CT18XNNLO_as_0112" = "16p36jf8c8pliaxd6s30cmmmxg9slnmb2527vnwkka0kp9qw3ffq";
+    "CT18XNNLO_as_0113" = "15d4qx8x56kcg6p8980bslhfilkld8yf1mwpdzyf8v8ns50wrbw5";
+    "CT18XNNLO_as_0114" = "1zsfys0xkgf8zlbzzjmh1wvzxwjqi4rvgik26s5y4ibr68gshvaj";
+    "CT18XNNLO_as_0115" = "1x00d2q2lnl5w0l052v9cvkywav26b4r072dpn1jiak6n52yqqaw";
+    "CT18XNNLO_as_0116" = "1gm9m0rl9vghswcb4xgp54lc3h8wkh6c077625m9y0166xbv5x2d";
+    "CT18XNNLO_as_0117" = "0630arl5qwjhxw0avzlc0mr4hwi09ki8xfn4zvfccgpy2nd85q5b";
+    "CT18XNNLO_as_0118" = "1nx75pf5krazrk3ff3lb6zjnxz2qmffrk5vcf06iq5qci9zi5l0q";
+    "CT18XNNLO_as_0119" = "0dzjj9f2qkpwfr9pm3pfj6jw5ih2jis8wzc8d0vyh5mm084jlk6a";
+    "CT18XNNLO_as_0120" = "17pp23l0brnd0phq23888qbkf1c5j1lcskrbm3v3f2cd8p7jcvvw";
+    "CT18XNNLO_as_0121" = "0hlfx8zsxc1x6glny4cp2vpba8jgjix9cpsfixff9vkbqpm2ppk0";
+    "CT18XNNLO_as_0122" = "1918l55khrfyb3lcxsbbf9w6v8j54klszl2c32nmna0apf8zc3qm";
+    "CT18XNNLO_as_0123" = "02kak35pj6c4hml75na7452ryashfclglhahclzkpq8gs72l5w91";
+    "CT18XNNLO_as_0124" = "03wym12nvwdcr13dz6d2gr4bz3csffnn21zfdld42fsyq4glx431";
+    "CT18ZNLO" = "0iv8laks2ymn5fygk6k9lxm3s7fld5g292n9bfkhn3nmcfxczi03";
+    "CT18ZNLO_as_0110" = "1d0j9nmn9mk90698pxqlpgz7c7cyxswc88n89cr2h8mgcg2w8g2v";
+    "CT18ZNLO_as_0111" = "17l7j1j2x529mhk0andkdh83k9z6kg9v3ccfna08i7d4iilsdfrs";
+    "CT18ZNLO_as_0112" = "1b8mi0jwln2wvysrkbm1fvay053d17dzvlj9fkz36xmr03bv5mvj";
+    "CT18ZNLO_as_0113" = "13dkpjvh5a3p565mhpxqnhijl3jd2zr03np5psknvl121gr007fk";
+    "CT18ZNLO_as_0114" = "0drryvq2x42xpf9bmd6n4vz1f8ddh83c3rynnzm54qssxmfkb073";
+    "CT18ZNLO_as_0115" = "1wdj056rf02jksa2l2panvkijvvwr6rsb8kh3g2bvx0yjhff8g1c";
+    "CT18ZNLO_as_0116" = "1ibf0841irsa4vq9sg0kvrhvakyyshpvs38frz9v3zjbc012cldz";
+    "CT18ZNLO_as_0117" = "0l2nabywfsvb1sk44rqgrwf8h0lxkz8qf6pmzr8jc3zhq1fv04sl";
+    "CT18ZNLO_as_0118" = "0dnksqqshxqr0y3qr3diyvhfq1jxy1x0hrjw8xk76jzm61xi96x1";
+    "CT18ZNLO_as_0119" = "0qljv4d1qfc9rx3p4a8dghij11dv1mi03y30wdilfxrf98znvdyj";
+    "CT18ZNLO_as_0120" = "1w0p5gai8qhfjh4jxhyl26xrp8n210cp2a7zjd4id1s4pcvpzvn7";
+    "CT18ZNLO_as_0121" = "1ija1nqc4pbprcc3ddhl9rxxbaxngjr256zxiy7gg3wmg6364hjl";
+    "CT18ZNLO_as_0122" = "0d7h3vli13m1pm5w91js8skv198aqz9kjkx7w0sa4v2vhvz1rdyh";
+    "CT18ZNLO_as_0123" = "14cl8fmkl6jav7byqwcfa1z2ml6lnn6pzp0w4nqy75gc7wxsba0m";
+    "CT18ZNLO_as_0124" = "18riha0fflfbsgh7nnc3ghm8cpzpcss0z6l48d28bbq0i7caqad7";
+    "CT18ZNNLO" = "0zsqrpab6vgcinsxjq3rqdadig5flxzk61wc1aa9rwnkbpm1paa5";
+    "CT18ZNNLO_as_0110" = "06qzlfshx8gwrhnmjfvz6sxq7h2is1dqvx5sz8jxrr1gl7gl92h9";
+    "CT18ZNNLO_as_0111" = "08k101cn9x9y44zcpn6iql85qqx89rv7xjhvak4y6s309p9rlnzi";
+    "CT18ZNNLO_as_0112" = "1c72mz93kha8mdfdcwj8fs8dqqylxmmc4vs7fjf9h7xbrqzmss7m";
+    "CT18ZNNLO_as_0113" = "0z7s1kmlrv99r5mb6p1xwrydx0s896kr3va0ld3gq39a0f6bqvfz";
+    "CT18ZNNLO_as_0114" = "0ir6n8i170czq7h3badim28540478cq5fb5vv4kdi0ncypsasr4d";
+    "CT18ZNNLO_as_0115" = "0dncvhp99v5s9746ql37gdm65byih9ppg30c77k50i2485a1zfap";
+    "CT18ZNNLO_as_0116" = "0qihfcsgxv66l781dmvmmpbr0s0c52s90jfmz5y52gyy1lplw569";
+    "CT18ZNNLO_as_0117" = "0agqd4vgj53w9p7ghfkrskqyvg7lw5g9ilj0fid0jia8adfh58xp";
+    "CT18ZNNLO_as_0118" = "07y1l00igx7d2yaj9gi60fvqz1p8f8z44fmxm84fpjikajabff5v";
+    "CT18ZNNLO_as_0119" = "16nnwwj16c8fmqh5mwnihzvbgfj3cnvw01i1il1gr0g4zqpn0yhi";
+    "CT18ZNNLO_as_0120" = "0yy0lxwm41aa727wdrq27l6ih7fdaqwiy4bkrbh0zrns0km9r958";
+    "CT18ZNNLO_as_0121" = "0yg70dx2wi9wf5914shfqaf2j90dnkfnbp1pq2jzxd0h0sxhlphj";
+    "CT18ZNNLO_as_0122" = "1bd4193ggv4nb48d0mw2n93ia30h4myfy197k9b0m3qc90xjq77z";
+    "CT18ZNNLO_as_0123" = "0r2vri1brq0xcrpj0cg9hf9kwhkh2czmimrsg5bfvx35adiiis19";
+    "CT18ZNNLO_as_0124" = "1wq0nz9jfb5fmzwnnh0xyra2j62kb5xpmh2nyy8ih4lvxhgi16mg";
+    "EPPS16_B_90CL_Au_hess" = "0ab3pnv8fq45mdp29m6lfmrhhnr88k6qvkq6lwxmn17k39v8j9w4";
+    "EPPS16_B_90CL_Pb_hess" = "1cjc79sygpxnir3qw9n6cdwvd3flfn11ajqs5y64svrpsqcx5ng0";
+    "EPPS16_B_c_90CL_Au_hess" = "1ijvnglq4wrjhhvksyd60s7c6nv50vwyk5vd8c3gs0qr8yz1fk69";
+    "EPPS16_B_c_90CL_Pb_hess" = "1347cqsfkim0xcds5imxmsdxh8x0h2n97x5zwpf035rbdk5mkr4n";
+    "EPPS16_B_d_90CL_Au_hess" = "088jrj6xf1ph19sypa5dizllydfzi6ikxq2gisdlxpj1qnwjymsg";
+    "EPPS16_B_d_90CL_Pb_hess" = "0x12r31l0nvqsc2ml1zkil0w1iji52xgbnxn3wss9pnmswrf3cah";
+    "EPPS16_B_u_90CL_Au_hess" = "1pq7agglirpk2w566c1ql15ps1aglmnph2p2dfa535zlv89s7c0d";
+    "EPPS16_B_u_90CL_Pb_hess" = "137jkcbikmcjaxp8rpr5j193cmr329mcvyy7j0s0a6ynglhpr76k";
+    "EPPS16_D_90CL_Au_hess" = "01ggm0xxwd3nc95cjcf36sy0pdb0xvk6bkiaq328w2sfajccr5mk";
+    "EPPS16_D_90CL_Pb_hess" = "1z3zam84m2kbs7zinn87xhlca90d5zwk8j72yj19nx3r92brnq8h";
+    "EPPS16_D_c_90CL_Au_hess" = "18sviyvm3rm9n7x79w1sx8j9mcc6dnc2il8hsw2avjgy2aqmwj87";
+    "EPPS16_D_c_90CL_Pb_hess" = "1ryv83iq1lrphgxvdsmh70j6iky993sax0s9cfrswpjyl2pcilq2";
+    "EPPS16_D_d_90CL_Au_hess" = "15j6s9mj1ci9wjgsfhbxfikcyxc5pilv56cyzxjhgjhfgwvi1xyz";
+    "EPPS16_D_d_90CL_Pb_hess" = "1qjyb57fhf6d3g7l48jcl6jizj2c5g63xahzanrmkm9r538hvhcc";
+    "EPPS16_D_u_90CL_Au_hess" = "0jjk2rccvv0ngxn7wf33j21y72wvs4dhwl56yhmf7bfzd6v70rp2";
+    "EPPS16_D_u_90CL_Pb_hess" = "09npz68wwvcsvd6h8lsgmlr19l0af4h4rppcd6jlwd88c2zpb3r3";
+    "EPPS16_Jpsi_90CL_Au_hess" = "0msvkihdmhap0bbiydxbp552k1sgk20wadvc2s2h9jldakdx0pk9";
+    "EPPS16_Jpsi_90CL_Pb_hess" = "13vc490k1769gbph3xn1lffj0ilvhz78by3lhw45lwkra4vx5zp4";
+    "EPPS16_Jpsi_c_90CL_Au_hess" = "069lzrnm5kx56rblr4lxqvr014nrf2yyf1iw42s37q2xsxpjip87";
+    "EPPS16_Jpsi_c_90CL_Pb_hess" = "1895iqzmcnaqkidcy96z4766wppycp1riwg9clg71cb404wz74as";
+    "EPPS16_Jpsi_d_90CL_Au_hess" = "0ndh23dyaszam144dsdbg4281c61vai8avgi4y7x8kb0paha4icm";
+    "EPPS16_Jpsi_d_90CL_Pb_hess" = "0xflijnwabg931z19v8c18dzh1lbqivkg94kpwm8j135ya1vpmm2";
+    "EPPS16_Jpsi_u_90CL_Au_hess" = "1hagv9akwm337kq3kvkpkdkcpnic7klnigh9pyif1gm16i1q40jf";
+    "EPPS16_Jpsi_u_90CL_Pb_hess" = "0dw68rky105lyaagkzkmfx6l9jk763m293m7s972jhnl5037bj74";
+    "EPPS16nlo_CT14nlo_Ag108" = "1p7gckhv44h04rvknd6fdizy9c1jqfwic7ppf0ra14ic8wp1g7wg";
+    "EPPS16nlo_CT14nlo_Al27" = "0hxyakfgknmixxndfj14i44afp5gcfz9afjvjdaj702sv42a7qa8";
+    "EPPS16nlo_CT14nlo_Au197" = "1g272110y3a1fr6raxdfhagn68i0lcnwbdhiiqg4j6wb6v4m3p6i";
+    "EPPS16nlo_CT14nlo_Be9" = "0zxsdmvz919ajwwb917613byshhpr876jcg9kik0pkz8c4ddr2z0";
+    "EPPS16nlo_CT14nlo_C12" = "0mjmjk9n36aikhm8i6zwzfszyb5zcy1syn13vs2rm12x535j6dm5";
+    "EPPS16nlo_CT14nlo_Ca40" = "18vd67splj75sjijfvhyq0q6068yr8l083sczamwpmy8z3l798ih";
+    "EPPS16nlo_CT14nlo_Cu64" = "0g64gpc5cssmwl1sn7cl0ramsg2zfq7snr9bzr41q2dznbvqahgd";
+    "EPPS16nlo_CT14nlo_Fe56" = "0dxfzpx99ha9g27bxx6xzxxh87va91qqwq6hnz1qsligjfx7q4yz";
+    "EPPS16nlo_CT14nlo_He4" = "1ln5kz3270kyx6m3ji6q5xyp5a23f3kbwh9z9dmdwwsw7q9n8way";
+    "EPPS16nlo_CT14nlo_Li6" = "04rviiml0rnym9qppsczcydw37r923ljx8hj63vv6dxng0g617qb";
+    "EPPS16nlo_CT14nlo_Pb208" = "1b2zibpigdvvkg29zh7zm32jpdr2prm35jasafh17pfpwlfc55mb";
+    "EPPS16nlo_CT14nlo_Pt195" = "14v1gicvm8i8z9d98rlv5rbhaglkbi9fhs3z465p4d764al6znnc";
+    "EPPS16nlo_CT14nlo_Sn119" = "10nxn6rdp7svsrkdcdwxryjmirn1s871yj1w493adpfcy3chqw9k";
+    "EPPS16nlo_CT14nlo_W184" = "1x8ndmkzmnl79vz1bgi9972190x03asvgnls6qiz746xl37q4ky7";
+    "GKG18_DPDF_FitA_LO" = "0ql03hp30wfaw9gfyska0v5vf4p3n2dsxvkapjqnyfl01ad6vjw2";
+    "GKG18_DPDF_FitA_NLO" = "0n9khzvhyxfwbl758vzy8jgyqkgcgl328m657vlami3w22hmpbrz";
+    "GKG18_DPDF_FitB_LO" = "0s15ia8mcn00xl28rhdxjigpq0ai80a831366sx0w7qx44bb5n0p";
+    "GKG18_DPDF_FitB_NLO" = "0qlv7p1fx3gq2cqrvamlpn6r54nssbk7rrx1znhfdzx3x9v1ii1q";
+    "GRVPI0" = "0i5icsw9hf4jm25d0szxqc3r1131n417lv8b4gslg93xqj4ry1hf";
+    "GRVPI1" = "05j3mcrb0sq4nzv7y0k68f2m3v8vnd13mzbhq43gjq712cbj126p";
+    "H1PDF2017" = "10yfikq1mlw6bzhbvwblajicpqzhi06gl1aabhxr6mcf9vby4zw8";
+    "HERAPDF15LO_EIG" = "12cqj3vqwi86sfgxkiwbd7rnpw1awnbqbc852b0x32d9j18nz9c2";
+    "HERAPDF15NLO_ALPHAS" = "06yiid611zi5i9snqrkjr3g4z2n1gwkvqjs606ha0b4nrwlpnkhc";
+    "HERAPDF15NLO_EIG" = "0h5brmk7w70dgbwhjikfpprni924c2f3kxsmxzcm2qlrlgj0nswd";
+    "HERAPDF15NLO_VAR" = "049bfsgkcfnz4z7vzkl4vr6ivp9kvak2f07nmarm8q2wwd6pjjqy";
+    "HERAPDF15NNLO_ALPHAS" = "09qf93b336yak3aqnfqlvz5j6xvvrsqkc4ag41xh4prpswj8fmrc";
+    "HERAPDF15NNLO_EIG" = "1yf48sr7nak6lph2s1vd3s91mrw0da9kjxlvqzcg3n9j48l3f3r0";
+    "HERAPDF15NNLO_VAR" = "0di4b75ag82iysyrv5wfvn8728jdi8mkq96ycpq534078ps2n3bd";
+    "HERAPDF20_AG_NLO_EIG" = "0jr2s4dj5w9xwidrqbqi8af2dqycm4vr36qy3x5javllp4dn04cr";
+    "HERAPDF20_AG_NNLO_EIG" = "11cdhjwz4qm2hxf8i5kl38ny4nbsrd2vf3jkwz17lrgls716wh00";
+    "HERAPDF20_HiQ2_NLO_EIG" = "09wwkv8lk7gy14avvamk3sqdsvig2bvnzha5d4v5s2ln7g6g7vhq";
+    "HERAPDF20_HiQ2_NLO_VAR" = "1cgprisw1bksi8nryqqsy6ac097ywxdgj5yg796izari7j72p4bh";
+    "HERAPDF20_HiQ2_NNLO_EIG" = "05670fr76fx14gp4ywywz71scr6f25jk14i4k84gpcb2l6rnbv9g";
+    "HERAPDF20_HiQ2_NNLO_VAR" = "15nxgq5hy6ncvqma6ai8k7601bfw97p0h9db2gqbbyyvxf2ldnc7";
+    "HERAPDF20_Jets_NLO_EIG" = "1c2n2cn9l8x9jc8c4dh2whgz3378nnnvb3448cgpv0qfm589ygxy";
+    "HERAPDF20_Jets_NLO_VAR_Duv" = "0z2pkmlpffy29x2bh0086m1ybbb94x507fkr4khmdb4d0h33ppdw";
+    "HERAPDF20_Jets_NLO_VAR_fsdn" = "1ya4hbr3shjggpqi6h3g9j3jnbmmgrva2djbsaxgp7icii39yf1a";
+    "HERAPDF20_Jets_NLO_VAR_fshdn" = "1sl2sq27xx40mj4zn00vc44k3vf1yxb7fwpqp0p3lqlp9gcwlycp";
+    "HERAPDF20_Jets_NLO_VAR_fshup" = "0qs8g45s70d0l3g7xh0bqhk65ac9g003bjpacd9v97gzpm6jvr45";
+    "HERAPDF20_Jets_NLO_VAR_fsup" = "17ix21qwjkp9gy9gvn3143d8ganzg9r78n6q47wdfxh12jzvgc7k";
+    "HERAPDF20_Jets_NLO_VAR_haddn" = "15rbsdddm5ayg5r0gljxxcmrrvzhfdr44ky2d6a70wjr2g6lc5yc";
+    "HERAPDF20_Jets_NLO_VAR_hadup" = "1x3rnr2hkcfglpmv732blziygzvdlw2rkks1ap9majnayh01vvfk";
+    "HERAPDF20_Jets_NLO_VAR_mbdn" = "1fi0rp4gpqj7yjmv6b68ac7m8v4f9m4q9kd6nq4ndk2gp11i6799";
+    "HERAPDF20_Jets_NLO_VAR_mbup" = "062dfx73lihlhndn5xjlsimfxalxbfhn1xyqzbk7bsqj9mffmwli";
+    "HERAPDF20_Jets_NLO_VAR_mcdn" = "092hwkx9kliib8lf405sy9bvxg6xgydnsxl92yjqwyicajihhij4";
+    "HERAPDF20_Jets_NLO_VAR_mcup" = "0qcirk0sqnkfyb3pdxlpkl51pbj2gybw7kgw9xzmj4j3jdg2zjqg";
+    "HERAPDF20_Jets_NLO_VAR_q0dn" = "1xv319ai4pwy1mcy6i3wk3mp4nkdpjb2zcnz17gxvdx2l6z1bz5m";
+    "HERAPDF20_Jets_NLO_VAR_q0up" = "0bfsqx23jsrjjsczl5j90hp3njvlwaw8mypj1si83mr1z0s9q4rx";
+    "HERAPDF20_Jets_NLO_VAR_q2mdn" = "16qfw118c3lh91zsg2nb49xjynbd9w1rh4y5ybr35v38i4acpdab";
+    "HERAPDF20_Jets_NLO_VAR_q2mup" = "1q80h7r0cklpz1jam3nzxs7h3i8jpgpc03l7c3g4mkz61ynh0ida";
+    "HERAPDF20_LO_EIG" = "1r6ylwi2yszsk5dmw27734s0ghkvdawmqa6fik1k3j82d9s22mkl";
+    "HERAPDF20_NLO_ALPHAS_110" = "0zmmg0k33bf52skbz42cgxdjw0ap33fyf0h1kfd9ciw4gra2rakn";
+    "HERAPDF20_NLO_ALPHAS_111" = "1mlc33kfs4zlmn305hifjh2d85byvym1mzdj9bc3nlypv4zcszlf";
+    "HERAPDF20_NLO_ALPHAS_112" = "0wswbdmkyv0a6fw531s1s7jnskzxsvwh9bydvgiav53pfpibsyx6";
+    "HERAPDF20_NLO_ALPHAS_113" = "0qx7kh3cmqz59sm6vjcvi2hj5c7d816mc7jfhqr03hvavqcsla14";
+    "HERAPDF20_NLO_ALPHAS_114" = "1n2434j9gvdz24h30sng8z5jmc9hhnm9nbr3hi82n6ssnwabsl97";
+    "HERAPDF20_NLO_ALPHAS_115" = "05wk9glb6xpg5n689slihcfkdvm3kgwpxw8dxp4rp8zyvrsh6l6f";
+    "HERAPDF20_NLO_ALPHAS_116" = "133vvg5bh1lx6zcacnaphkj11608wafim4rb6lcqx4mkpxabmzxa";
+    "HERAPDF20_NLO_ALPHAS_117" = "18n1s7qqzf67lg8gphpm606dvz802i6xmlz5if5jdhjz8r3qklzf";
+    "HERAPDF20_NLO_ALPHAS_118" = "07xj5j7k54bwi9xq51cf8zanqlkjcbdrvw9k8ch3h40bk961c5pz";
+    "HERAPDF20_NLO_ALPHAS_119" = "0njyfp84kf51m9rw9z3d3figp23043p5ml7cdb45dvh9hbpssh40";
+    "HERAPDF20_NLO_ALPHAS_120" = "02paa7bng9nycd8dd2zf2099592mbaz8c4a5hamcmvzqfz0sdy7d";
+    "HERAPDF20_NLO_ALPHAS_121" = "07hmbvpm96pm5yp9bsx9aksznksh6k4qrw0k28bns0wjn75khxsl";
+    "HERAPDF20_NLO_ALPHAS_122" = "1pjn3h1wr6l6sy7kjvk72qc409dr939z787q2qbaph7xh5rf7k2s";
+    "HERAPDF20_NLO_ALPHAS_123" = "09hz6pw4nklwf94krna7g80659v9c2c0f5rf99mnx900xyhk7pxa";
+    "HERAPDF20_NLO_ALPHAS_124" = "1d9gmc3g0j32kgwyfddmx9f3gxwrgnq3xcbrabdx9cw554ysd6sg";
+    "HERAPDF20_NLO_ALPHAS_125" = "0mi2q9yhkcdpj7336kbs1vw4zvm8c9fryz0c7hdj246kj26rb0mv";
+    "HERAPDF20_NLO_ALPHAS_126" = "067rng6gv24qf1j8lz37115mc42k8wjpzrfcw4jw2d1yg22ci0lb";
+    "HERAPDF20_NLO_ALPHAS_127" = "0v3xcdr8wsradqf3bzayvvlsdjzr54qa2kbqb5pyvfi3rafrwrmi";
+    "HERAPDF20_NLO_ALPHAS_128" = "0ywnd9c6bq5bp02s3b3pql8a74wm472p11alqi4b4pmlzphzk1ix";
+    "HERAPDF20_NLO_ALPHAS_129" = "055ya2wxscbzp2w3zx2a5xgs94wl60bm6c2vxrs2rgnab72382j9";
+    "HERAPDF20_NLO_ALPHAS_130" = "0k91azhwxrfni5yfasn83f67ma9w8fax2k1k9xc8pvgmbh3c14wi";
+    "HERAPDF20_NLO_EIG" = "1ryamdwblj1ysbha672q2z9qai62h6cibb0laizfq2nq4j4ml3vz";
+    "HERAPDF20_NLO_FF3A_EIG" = "1fs6ldnwflmn5ysqkq9aky2xskd0dvq372h48x89h4vmsvd302wn";
+    "HERAPDF20_NLO_FF3A_VAR" = "0jd9wgrhchqjcjrkh5hjx7x8agm43jq5p8dmyvk0rniz9zybx64d";
+    "HERAPDF20_NLO_FF3B_EIG" = "0r04zjfaaq686g3bd6c753vkcwsbgdcfzr67ngm7vsz27zscbjbz";
+    "HERAPDF20_NLO_FF3B_VAR" = "12qrfld8958gvk9c2q8l0mvccx6wkrgnsiapgzl37s6s6zcgid10";
+    "HERAPDF20_NLO_VAR" = "0q5ih9ac3z6n158h6q149h0ggkfjrdn5rqwf7nzi3j50fhs63swj";
+    "HERAPDF20_NNLO_ALPHAS_110" = "1828i4ybdzs7zj62lzsifgshxdas81vjvhfg86ixry4xqkfprlfg";
+    "HERAPDF20_NNLO_ALPHAS_111" = "011d1a900jjpa78ph05sdy353gfmrr8azpngcf0cjigcn4fwdna6";
+    "HERAPDF20_NNLO_ALPHAS_112" = "0xb2bnigwlhs0vs3fwzsz66zidchwgs97kn6vjfhxnik8xdfkyb8";
+    "HERAPDF20_NNLO_ALPHAS_113" = "13b8gh0qwpy574ra6184vgff3wba0blr44lxj56xrkaql9zi1jx1";
+    "HERAPDF20_NNLO_ALPHAS_114" = "09n30p5pbw2wyjss2jjz1h4nl9scin42s91sxdcrwinnc3y5n1in";
+    "HERAPDF20_NNLO_ALPHAS_115" = "0nlimqmfhx2ijx48ylciih5diwlsb5zzkli82rgnnxci3r4ycjq4";
+    "HERAPDF20_NNLO_ALPHAS_116" = "0nr8svx60zrf42nxg74v0h759y9lwg54892xpdmswg7mw0nwcrm9";
+    "HERAPDF20_NNLO_ALPHAS_117" = "0xiqdr2r5dyyp5q56b3w04wy3raqrh1mjsv1fm05xswxn2xwyhlq";
+    "HERAPDF20_NNLO_ALPHAS_118" = "0d0w0f077g11s4clx1556y9xx5nn1dgm8zcp0bk92v4lapngf33c";
+    "HERAPDF20_NNLO_ALPHAS_119" = "1w9nl0pnfc1cii4knmqdq4cnh6shhhgj8pg4a42bx20lvqc3aqgb";
+    "HERAPDF20_NNLO_ALPHAS_120" = "1lksn0rcxq2scwpnps8dawlzijhvwbg0pn2is4r29igbqck2jvb3";
+    "HERAPDF20_NNLO_ALPHAS_121" = "03d58rbibvgcvmsw86q3030qnw5nnvq8p6diqscd9srb8br06p8m";
+    "HERAPDF20_NNLO_ALPHAS_122" = "0541yx5fcadw7rggpypd8kg393m5hwzsw5jangsmsrsby1rc2m4a";
+    "HERAPDF20_NNLO_ALPHAS_123" = "1ckc8s04jf7x19xpwwb8g60likrlz3dp91qzaafljvbd9b27aa61";
+    "HERAPDF20_NNLO_ALPHAS_124" = "13dx2wh0dhxsjjk6ak7wy1gr8g297dpc9xvkxvb5ayd0rzmhjlwb";
+    "HERAPDF20_NNLO_ALPHAS_125" = "0yh6jakycsqhh4h6jqrilw1afmk1jkcq2px978z4qcz4y0m6bx4a";
+    "HERAPDF20_NNLO_ALPHAS_126" = "0045sa1kl4w75ja6an38i2a3fi78q6xg22av536l9h1c8j82ql13";
+    "HERAPDF20_NNLO_ALPHAS_127" = "1f5l9cy59dc3rc9xqrsq85g0mbhyaqkbpzi40f3gjg6bxjlgb4rx";
+    "HERAPDF20_NNLO_ALPHAS_128" = "1c2pbd4zam5av582r777197638l6i5a0chmw9ci7l05lzm19nzmi";
+    "HERAPDF20_NNLO_ALPHAS_129" = "1aipmxxn7s1r66m6gmrjgr2yca7sxvpf8r86s4a5j768akkgmlld";
+    "HERAPDF20_NNLO_ALPHAS_130" = "1g2q3438bivd20i685jmx565cq108yv72vhxmpmhysh4qwvwpqqw";
+    "HERAPDF20_NNLO_EIG" = "12zn49jx7qjr8apgpbhknzll4vwlz3x9y1ai908ix2h86pgap2ml";
+    "HERAPDF20_NNLO_VAR" = "152h21khvkhxwx87c5lqwzpakmahcpj1ixw6kgl0wrrwjknvfgxn";
+    "JAM19FF_kaon_nlo" = "05mcahzr0k5w0hqfbn902lmkwxlkbf8wrk6akpqnfsyqpbmhja5k";
+    "JAM19FF_pion_nlo" = "06krcf0c9jbbpwf1rk1xd5z7rz904ji984xz05kv9p1j1vgk0ha0";
+    "JAM19PDF_proton_nlo" = "1zrcijik60rci6km5d8pn8ivww8w3v8pb1m5dshqjs51lhf56ayp";
+    "JAM20-SIDIS_FF_hadron_nlo" = "0bx3igckr2dszxskz5f952vl0q7kwvxgyb28yksjk75325dp2f9c";
+    "JAM20-SIDIS_FF_kaon_nlo" = "060r6ah5843vm1r3rhjvlgp7w45z39cqgibfc2g2m1q7mwjqccjy";
+    "JAM20-SIDIS_FF_pion_nlo" = "0fpkbl5fw76wgk8l599kf51mqa0fy92bq9ksfjfks0c4m6ah1g5i";
+    "JAM20-SIDIS_PDF_proton_nlo" = "1g1g9n2ij58yzvgrw8g1f8jbqyhj9yvbvl9iqjxllkhkb2zbllpl";
+    "JAM21PionPDFnlo" = "0zn7p9ny6072dkhsiaq64f2gdzpqbqc06d9a21rvvg3cgsba9jg3";
+    "JAM21PionPDFnlo_pT" = "1wxpkk1wzx1z1kwxfj6kz14pxlckb96aqaq2fa4sf1a0ph1ibrc8";
+    "JAM21PionPDFnlonll_cosine" = "0nbmdc0744kl6r7r9lfs20gffpjyxpcfpkp7f336fn1mcl89wggn";
+    "JAM21PionPDFnlonll_double_Mellin" = "1n8fqar0dddc92054kg3pl1xlh6z7smm3glv5fvfxr933bxli5g8";
+    "JAM21PionPDFnlonll_expansion" = "0dmmalgmp4xjwimyfx0sa8yafzzm0xzqk557qwkli3ramzwrwy8p";
+    "JR14NLO08FF" = "16azkqxf1yw1j32ay6j01gf8n9n7qm56jh4yzgjag0zdhm01lbip";
+    "JR14NLO08VF" = "1ilw38pp4vy8c8v1glfi4ixca73wjkdg3di1wh9p8xqrifdb096p";
+    "JR14NNLO08FF" = "1w0pywmjb4xi7bsvv1mdd4q2adf1g7khspfbkphmlh8zipx29nxx";
+    "JR14NNLO08VF" = "0kzszj1r141fcg9vbf53480224nxcc5wfk9zmpmzbmrxzi0w127r";
+    "JR14NNLO20FF" = "0wc3qib90dpd1wgiymrn5lzwhqmh58ji2s92vpj2v9v4spws7pdq";
+    "JR14NNLO20VF" = "18l4ipn80gmh9kdw7a1k49fwgbl7b1frgc0hsa04vbwnv6hm73hn";
+    "LUXlep-NNPDF31_nlo_as_0118_luxqed" = "09ch6mjfn6rjsd31jfb59j92ngqiy0x19qamyxh0jwk0sbyr1dpw";
+    "LUXqed17_plus_PDF4LHC15_nnlo_100" = "18y3pa6gjmcv2s21si9a5dvbq6xxqphbqz5qiy39c62g2zf8512c";
+    "LUXqed17_plus_PDF4LHC15_nnlo_30" = "1bnwlxr8p4xmr36zd2flhqssil6w7jh50k46j0mxfnd8jgxgwn6n";
+    "LUXqed_plus_PDF4LHC15_nnlo_100" = "08jzl4wcsrr9agycq1r5kd5bqxsx4b637nxk34s82vs7vwpq7qib";
+    "MAPFF10NLOPIm" = "0w875dh5klqgggcr84g0g7qmh4q2xim8nrf0xdnfc665xww7v4my";
+    "MAPFF10NLOPIp" = "1493k3p7b03sw0n7va60vqxcry2b3xgpww6fnk2gx8b4w1632yn2";
+    "MAPFF10NLOPIsum" = "0x6sashkhg1hs7wy6fyln12s1f4yavvc90zv4k7rclbah4hr75wm";
+    "METAv10LHC" = "1vn4wnx1blz6wylbzirswdqqf0knmyh1pcfh62wvj695mh7i0w16";
+    "METAv10LHCH" = "1p4wy7m1ksz0r1fylwz3cbq7jl8s58v817n3d898l83ic2ghp4vj";
+    "METAv10LHCHfull" = "1w623939fjdyx1316rxyaavf6kmxff19himr00br57jrw3v49nfg";
+    "METAv10LHCas0116" = "0y1l6djkmx8zcsii9j9krwhvgh071a9y5d4m1rkqpbqf6dnq9kll";
+    "METAv10LHCas0120" = "1g1izkf3j0vdrjskbjzh8lzsdn1bqssidr0gsapyzlx0dzc2ixdp";
+    "MMHT2014lo68cl" = "03wrjv448zdqblv4zx5b2p4m0nj8h4igabh8pzskj0327w7g91lm";
+    "MMHT2014lo_asmzsmallrange" = "16ki4aib5dslb7lx6w9nzx18nh0sgh41zbiw4hszf2qxn3asdyhz";
+    "MMHT2014nlo68cl" = "039zw5zrzm661bgjv7d0imzhfv3j3ixnrssi13ynfpin9v2izy6g";
+    "MMHT2014nlo68cl_nf3" = "0bjmng4ifdswi88kf59zzxpdq8ka80m01208nb2ij3dkpw0n5hnf";
+    "MMHT2014nlo68cl_nf4" = "01g0bbfwxaqhgpv0yz17fvwa4q1a1vh9867kp9fyavn600kd91ds";
+    "MMHT2014nlo68cl_nf4as5" = "1wdrk7b1hs6s8f2gxp7b3c1qrxvncs41h4aph1dhf8zffn3653yy";
+    "MMHT2014nlo68clas118" = "1nv7h2j31z061mgph5154qgxn8rl5sdgwzzs3d3clxfshh5gcccn";
+    "MMHT2014nlo68clas118_nf3" = "1d7k0vablssy1vfimsvxdiklaachw44lg37fgj1im52k81qxzd3n";
+    "MMHT2014nlo68clas118_nf4" = "1s8gv434b4mz6y5rv4kms69ghliafcmih09icj4qwk66hj7pn5lj";
+    "MMHT2014nlo68clas118_nf4as5" = "00zvf9zkrp9lk9psqvzsn04l1rw1xmq37bd2c8mqc2px3zdq9q0f";
+    "MMHT2014nlo_asmzlargerange" = "186jz5r74qas28x04daqkxhs5p31i68hhy8a7q6lzd5nh42x6kk0";
+    "MMHT2014nlo_asmzsmallrange" = "1x347h5g8d2k73wg6naj6zs7m2glankiwjgzy0gmmrnz3pyryq6x";
+    "MMHT2014nlo_asmzsmallrange_nf3" = "0ckw5971pwvvix8idw2m6j7w6bjivqpa1ynm6ml0bhc75cmm6l4i";
+    "MMHT2014nlo_asmzsmallrange_nf4" = "1asnk3pl3dw1sh76k0s95jb57cv5k90zjgpbkr3nnrbhvnkizl5a";
+    "MMHT2014nlo_mbrange_nf3" = "0bghvriw01jxmzcm9isz7in43ph7vz6zzr0rmmi81snrwvg8918h";
+    "MMHT2014nlo_mbrange_nf4" = "1gad7269hz4jj3946yyqzmcx3zyxx2p4r0h88x3lfrm0rd0fg00d";
+    "MMHT2014nlo_mbrange_nf5" = "03id7bfds16kbnd0nwjla8sn4pl3q3qa5v0a3pykdwj14k9igi3n";
+    "MMHT2014nlo_mcrange_nf3" = "1zfmdclsgwf6517v88zg34wby40606sspcghh4yahc2bbznd6a63";
+    "MMHT2014nlo_mcrange_nf4" = "0hzhkv81a0z3ichj5kfhwnhc720xw48h63llijl0pcfv8qqpvl19";
+    "MMHT2014nlo_mcrange_nf5" = "148hg5dc60yhfmwsm0svasxc7l1py6ggj7lzv0mrshl07rwfh62a";
+    "MMHT2014nloas118_mbrange_nf3" = "03w1wish6ig3mw9j195rakxsjr7gr46qz8dh009sigqcgp3s9fad";
+    "MMHT2014nloas118_mbrange_nf4" = "1lbj3r1bbxx2y1ybnxpd0cw7jzkdz0rb1grn1pmwmrl0l13s7j59";
+    "MMHT2014nloas118_mbrange_nf5" = "12q0gkqzhxqwrvy8lpg66ldsxnwr8id6jv6k4dj6f0p93qif5wr8";
+    "MMHT2014nloas118_mcrange_nf3" = "093yh7wa3p4028x5zxw15pwkrkjxzfl7kcdm7jqlf08zwm52clyx";
+    "MMHT2014nloas118_mcrange_nf4" = "0q0y77i0fgdvjk9y76kqzxpn22jbzsh64qbx8186ri9fqzfi868i";
+    "MMHT2014nloas118_mcrange_nf5" = "187wsfm49ack0jh9rwy5h29b1511b17myqn28bm6nbn7r4rfvnkz";
+    "MMHT2014nnlo68cl" = "0sss77zwv94vcy4ghv6493vbw08xwm264dk081w34jc4ifa0vg90";
+    "MMHT2014nnlo68cl_nf3" = "06paq3nzs87babpksabnkqi38gvvyfvpqlh8p18140zrdpdffaj2";
+    "MMHT2014nnlo68cl_nf4" = "0lbqpdy66v3ns6ax9vj1ix4wjn2pwlw5y1z26hlbrxz3l8hbizg1";
+    "MMHT2014nnlo68cl_nf4as5" = "1bh5nsral3lrlqq6afvq9ahkfmhfw3mq0m0qcvsx4ma5jx5rv7dv";
+    "MMHT2014nnlo_asmzlargerange" = "00l2jqccsl3jfwdj7lndr4b5cpx44krjvnm3h0hjw6hkv4irxb5s";
+    "MMHT2014nnlo_asmzsmallrange" = "1x36pv9nhj74whibb16bc414ypcks6nd1s7q1jc0fb7ndf5rijy6";
+    "MMHT2014nnlo_asmzsmallrange_nf3" = "0svpc51n25cbz2b43zbd60bfckrlz3q2jn3x668xnha9qsd3c2vq";
+    "MMHT2014nnlo_asmzsmallrange_nf4" = "15jggp2nbm828nprxyyinmp7kfxngpm0apg446hvwd8hg7blb1a4";
+    "MMHT2014nnlo_mbrange_nf3" = "0r9gi5cw76zn0lq3fcs7s2xxh6jl9y5vdv31bhv6mac9jmhjb458";
+    "MMHT2014nnlo_mbrange_nf4" = "190wva3k49mymflbm1v5xd449j38jm7ylfcdiflym8pgkdvwcgyl";
+    "MMHT2014nnlo_mbrange_nf5" = "19mnv9nz01lmbiv01qmflhg24kldhqpmcc8mgp7bnkhicgivb5ib";
+    "MMHT2014nnlo_mcrange_nf3" = "0zskxladqr40v6wqafbl1pl04vq43babqf437c4xxg4sz9435l3l";
+    "MMHT2014nnlo_mcrange_nf4" = "0sny8r9zap8gnjh9id1klr59d9hs0bb40pf8hpy8q5pg6052vx3q";
+    "MMHT2014nnlo_mcrange_nf5" = "1l340c1x4fz647bhybrvbb6z00mla81b78jfqpnwd4vwfxnqmq9y";
+    "MMHT2015qed_nlo" = "130fmxnaashvwwaaiz5b787ldz8l78ar5h2h038xvisdjkxvdqni";
+    "MMHT2015qed_nlo_elastic" = "1whplgg2s55wjii1hd32hzd5wsqbgvjjbnfw4fzjmnx4vwn63n2j";
+    "MMHT2015qed_nlo_inelastic" = "1b24flby6n9q2cg4haldmjs8ql35lhlw0bgynwja1v2n0fbf550y";
+    "MMHT2015qed_nnlo" = "1ypqiz0yz6hnxfml7ym83k4qqvqsbl39abbr38galns8xzzpi03m";
+    "MMHT2015qed_nnlo_elastic" = "17in1cz5j7mm9qjk8i27fif6x276lcqmccl7kfz8a5yn73xxzja4";
+    "MMHT2015qed_nnlo_inelastic" = "1ngk4p7w8l8b8sfg6hlm8ypxz97i1iwzlrc48szy7bi99kn8rmy1";
+    "MRST2004qed_neutron" = "12vna0ic6gh313k22b44b0k9kd939v7zjl2hj65k1075j23mq425";
+    "MRST2004qed_proton" = "10z0cr8pnr0lfxxi916naiz381a2cqn461jblfzvvddwqmqbllbc";
+    "MRST2007lomod" = "13ar6hzw9al20zlm8lg0hvwmgrmv0dbam820gm36rj8p7i33qlr6";
+    "MRSTMCal" = "0kbyp4rypw8jm28zfpvf0grvfvxmsrp3grwsmfxpa2c38x6la3rq";
+    "MSHT20lo_as130" = "0ivjvqabk9jnrlrczjlqywmijx5ql8wy579j77qkl1vhv7sqccm1";
+    "MSHT20nlo_as118" = "1qwbwcq8p4hrprz4ib18mp5142b0lbyyzc1bf5a4iq5jjvi5qm93";
+    "MSHT20nlo_as120" = "10y1a6iryahrafzdqskypjrnad6xxq08gm72pa9yc61xdy6andc6";
+    "MSHT20nlo_as120_mbrange_nf3" = "0548pw6lkwwqhlrg7c4cyqh76bcyz78yh06fs7crdbx7hfl47cj7";
+    "MSHT20nlo_as120_mbrange_nf4" = "0pg49mad4845llj49a1piaggd8wpwb2s4ar7jydlhrv7im886by4";
+    "MSHT20nlo_as120_mbrange_nf5" = "0148agm89p7pwzdfjk8gjdaicll30xhz6sawca632kp5qwyd4g3d";
+    "MSHT20nlo_as120_mcrange_nf3" = "187hgg8klk5jhcadiy8viyrfi0jfb3i18jckv6d7nsapixz1wgkz";
+    "MSHT20nlo_as120_mcrange_nf4" = "12pjy0igjcsih100g238v143kq5cjjm5a13cghcipgcz2w4ldglf";
+    "MSHT20nlo_as120_mcrange_nf5" = "00mipn9ndnw1k4nx6pmxb95wddmh98hg9k0317vlirxrf2n2jy7g";
+    "MSHT20nlo_as120_nf3" = "1zy0j9qc28xpav3gx24r6r02zfz49r11ic66hkyq83d3q3fj751b";
+    "MSHT20nlo_as120_nf4" = "0fpyf9s9ppb6w49chsmb2xfp9gwkx3ky9v8gwwqxli9fpzsc2ywn";
+    "MSHT20nlo_as_largerange" = "1f57dvxas2c6qnv38ysnsyf0y8imafnrxkcqh3b0an19mkln5mmg";
+    "MSHT20nlo_as_smallrange" = "1rygvj33g84whl24kgpqa47g11c48l93jlnpzqq8f5zr1ijqcq7i";
+    "MSHT20nlo_as_smallrange_nf3" = "1d6cr1akc25mwfyghvn1986i60l76fxb8fd02h7f4pl4lmnn6i8n";
+    "MSHT20nlo_as_smallrange_nf4" = "08js1l5g6knjx3813i0rf34xfjkbn3mdsrbawzkn00vf49xzcxdj";
+    "MSHT20nlo_mbrange_nf3" = "1bwl4inshg5h3sslss4lgvcqahb5q0n794ag73hyacxd1kmx7d2z";
+    "MSHT20nlo_mbrange_nf4" = "1sm995pzzr601wcs4rjgjs6alm74vc23szgmkqa5dvxghw7x8w55";
+    "MSHT20nlo_mbrange_nf5" = "1sal7iqma7770593ifxypl9zapvba693asc8m2fjsbgpbfjjid60";
+    "MSHT20nlo_mcrange_nf3" = "0lmv6m8m7zv0s8kjfm8parr9xlfy39dhwxn71z33f5x6cyp08zlg";
+    "MSHT20nlo_mcrange_nf4" = "0875zfv0dws8n44fqawa1jp5p8b9vky8yyq48wijhrcph8qbxbrx";
+    "MSHT20nlo_mcrange_nf5" = "0qjvam29zwibx54fgijry58vdwqkiwyavdwn736bmckjycncnv8p";
+    "MSHT20nlo_nf3" = "1v0mzsa2sxp0g3m3d8yqcs7dgi74am6cpx79f341ahpwybz5x829";
+    "MSHT20nlo_nf4" = "1lyii55adqaah6sm8b778q8scaq5yjycq3s8jdi3k48z8m23zqng";
+    "MSHT20nnlo_as118" = "1yz0003ixjg97974648qba5d37vb4fhzzmq4k9xh4c37pnc3kgyn";
+    "MSHT20nnlo_as_largerange" = "014a9x6zsw3w7b6w3v6lg8qxdjicxslr79bnagi6ci0skqs2v7z9";
+    "MSHT20nnlo_as_smallrange" = "1bv7cbdynp6dm5c9v7r32gqy1lch4428apw426pr0d7xpm0abnxv";
+    "MSHT20nnlo_as_smallrange_nf3" = "0n1j9dd069qdmgmd85m7wp29g96cnbgsdxrvlh6y51q063lkqbwb";
+    "MSHT20nnlo_as_smallrange_nf4" = "1jkdl3rd933czz753qbi7yvszg376r6bvwq2inqbslnzfkfav5bh";
+    "MSHT20nnlo_mbrange_nf3" = "095zcxhpfhlsb67ki4j6a8z4d1r5hzx92xlzprwkwd4v5ya4f732";
+    "MSHT20nnlo_mbrange_nf4" = "1114z5a0pk9svps918zifff23difxf37rbmr3jnzxnyp1vfgzws7";
+    "MSHT20nnlo_mbrange_nf5" = "12i6m01bmnzqadi6jg5gmah1jliq4wr4p0vpjgmpgyagsk4drx4b";
+    "MSHT20nnlo_mcrange_nf3" = "01wq537083dr9ibiahwdwdaxj0j2ys211m478w9wgvihdjjvjvvv";
+    "MSHT20nnlo_mcrange_nf4" = "04abrnlnbr94lksn29w9ws9a3b6sqkqvi9awmbk4715dxk2amnpk";
+    "MSHT20nnlo_mcrange_nf5" = "0za255xi66a1mfch2b91qqmsr305m0kvs4rzvqlzf7k0v141j90y";
+    "MSHT20nnlo_nf3" = "10yx59r32q4rl0yn4gpc29z8xskbvizkdr7k219qf16lnv892jpa";
+    "MSHT20nnlo_nf4" = "17d10rba8b0aqi1npnx93j1995has5sw2l4izd6lly3yhjynbgp6";
+    "MSHT20qed_nnlo" = "05c2hjgysyvkcyqg1lq3y00hqixgc8w984zivxkr76nj5csyf6m3";
+    "MSHT20qed_nnlo_elastic" = "0in0y27gn4k9h6ya77krhizv8rg3i6s3d6h4bk0fhz91hbi4l3gh";
+    "MSHT20qed_nnlo_inelastic" = "0vna0gbadf92w3xngb8gnsxd3lil8m029as8260wlki2axm4gqlw";
+    "MSHT20qed_nnlo_neutron" = "1hiq7m8j7736477vfs18mqwhkxyvjmcrs7jiqysa8v6rmhb4bali";
+    "MSHT20qed_nnlo_neutron_elastic" = "06dbvsysszpbvabgafb569vq88q1sm9mvz1iwv1m2b9vzin2ixiy";
+    "MSHT20qed_nnlo_neutron_inelastic" = "0gfh6nhl4vq4qz1jhnv5vhhz4h4wlkwgj4ffjqll6jqa5anfhbqr";
+    "MSTW2008CPdeutnlo68cl" = "1x2y7hl8ckplx175bp3wi04xafm44dd7vzfgnmvvai1x0072xi51";
+    "MSTW2008CPdeutnnlo68cl" = "1szsdqjkmny30mpw4pdzi97vj7i55agxm285dvnkzp06ycgp1ld3";
+    "MSTW2008lo68cl" = "0j12mv286r4ds9v7piqh4n44yjnc51hm74lqa4vv5xznxhibng7l";
+    "MSTW2008lo68cl_nf3" = "1s5z55b2aj37bx0p305lcgrdclgvyl99xgfrl0rhmdgr2byg33wi";
+    "MSTW2008lo68cl_nf4" = "0m539ihcz3dxy4gpfbam5badhhsimywlbgnczbybph8yn1118j9r";
+    "MSTW2008lo68cl_nf4as5" = "0vl1q7xnr425sscbk4djqi56jbpzpi8l3z2nknfqiy3l7ykg23ng";
+    "MSTW2008lo90cl" = "0af5j0s1i8yn0mjs4nb77migihw643lhd7dfl184v6wik3031yg3";
+    "MSTW2008lo90cl_nf3" = "1a6kc1lgswjk800jzcqlbpwzz4rs3g6agckhnlr8cizmp9p7risk";
+    "MSTW2008lo90cl_nf4" = "1bdjl58gslhw539650qwi7vbvsr22hpxpca17rkbqz9szh0ljhym";
+    "MSTW2008lo90cl_nf4as5" = "1crsm7dfcs0fn1i2ng18wy23z2ap01xr2rsnafqlra0q135m6hfp";
+    "MSTW2008nlo68cl" = "0pdvb5nshjjw7ddmdmj1v88m3jlk3vwfnab0pf2kf8hfx10hbv4q";
+    "MSTW2008nlo68cl_asmz+68cl" = "0gwmxs0f7raxvmpn12zavzqsrp3x0a82y1vq2kf9p9fq17in55yn";
+    "MSTW2008nlo68cl_asmz+68clhalf" = "1rmda4zpm6cs9kyxkhwpz38iv6g259156bmka4dc4zyfg1lcw85d";
+    "MSTW2008nlo68cl_asmz-68cl" = "15mmdnd3wwlrs5pwwhfa9f88vjpgza8vwxwxpyadxsmhx9jk79hy";
+    "MSTW2008nlo68cl_asmz-68clhalf" = "0dd7llc6ip6myy2yvf16riqs334f20l8wkmkksq53xngmz9qf263";
+    "MSTW2008nlo68cl_nf3" = "1j82imyylvnf3x39x1mb19hhp2nbcq2lk82hf7sj72c557l3qpjk";
+    "MSTW2008nlo68cl_nf4" = "08f008by768c8v3cmrsbgxpglqdj58nwwf22dmk2mbf2jq449s0n";
+    "MSTW2008nlo68cl_nf4as5" = "0hrqmmnp20vpj6dpz3bvm531i0pvl06als8irqz91cknv6zsvxf9";
+    "MSTW2008nlo90cl" = "1d3p4cialrngci9kn7225zcmyrr547dskzi74dfgdhbqc0256a2r";
+    "MSTW2008nlo90cl_asmz+90cl" = "19cd358yqklc8bxv0mg69cq3sf6zah7di0q9ilfqbiddmw1flw3p";
+    "MSTW2008nlo90cl_asmz+90clhalf" = "0ngn8f149agvmc54nrxjxqa0rifbd8a1hbcgpa443l75bmd9sqcp";
+    "MSTW2008nlo90cl_asmz-90cl" = "0fnqj7ywnp9nz5733ggjwmhxpy15zs2xgxjz7ixmql5mmaz3sxb6";
+    "MSTW2008nlo90cl_asmz-90clhalf" = "1jrp9q8li7a4bwhgh7q9h9zc0sdhck957zn14q9ca9kjsflyb9f5";
+    "MSTW2008nlo90cl_nf3" = "02ihabrcgp474wkq4w2fshpiqdznjaxyg5vawv52yj6hxifyy5a9";
+    "MSTW2008nlo90cl_nf4" = "1wrdl79qy8mimqk48705f3sd651zy130k1dmvvzwvdsjd9y8q58w";
+    "MSTW2008nlo90cl_nf4as5" = "18d1pvijcyfxkipmd2v2zrkxdbhxygkcyn3p8vz0vzq5q7s1s7r2";
+    "MSTW2008nlo_asmzrange" = "161364fvc8w8ggad58r1c58b0kngqa1bjpabaqi5cigmzazj3rl8";
+    "MSTW2008nlo_mbrange" = "1b7z4mm3f8wjjbxb8hs8l7kclh1yfz5yffzdsch2i09c7wh79616";
+    "MSTW2008nlo_mbrange_nf4" = "02s7ljzwamsha87i6nsd4kdfb9ky4k6m8xpqa1iz9wgrcy4pmw5p";
+    "MSTW2008nlo_mcrange" = "1bndxfi27r8k0m4r26bfsflbbrjc4s2vp5ixy7qidkw33g6mqh96";
+    "MSTW2008nlo_mcrange_fixasmz" = "10s2sfhdx5668cffwb0sbh5m54zq0inmpfnhkj0zk9ij4f5y815f";
+    "MSTW2008nlo_mcrange_fixasmz_nf3" = "0zwnicbmmqbak5sw92njpmvxpjnnhwl1ggvlj8q39hn5w5kdy1kq";
+    "MSTW2008nlo_mcrange_nf3" = "01mlzqwk30glr95g7n2y3yvvy7s6mkbdb5cqwl1m7k8d6m18n49g";
+    "MSTW2008nnlo68cl" = "0y6lv1wkhydfnlakjrrrjapxaapa0bcbmfx0w9c4psgy156kv1fv";
+    "MSTW2008nnlo68cl_asmz+68cl" = "0fhkbkshrc29kz0fc9vi2dqsg6irjm4sfw4sp0s4wkj766wg19nz";
+    "MSTW2008nnlo68cl_asmz+68clhalf" = "1z0fplsv1fij4fgrz7npr34hcmc2qkf7g398bq1smvb6b2qy5jb8";
+    "MSTW2008nnlo68cl_asmz-68cl" = "1qhjhdzpy67665ccwv0n3g7jlyb2vfk60cphjr0jb1adgv9fxa7q";
+    "MSTW2008nnlo68cl_asmz-68clhalf" = "0rlsis3r7l32jdiq2yhx1mz7q6qlzlsrarljvrmxf0g0g2d8nr4c";
+    "MSTW2008nnlo68cl_nf3" = "07nrz7afd1mcsqc3lqv9vk2phs1nfxdl63qh1bc0g7nznxwmmn97";
+    "MSTW2008nnlo68cl_nf4" = "1kd62hzk2p3q56kj79bs101arp55ajlyhwwa3vq3yp37i3ynz9ds";
+    "MSTW2008nnlo68cl_nf4as5" = "0x19rq5k9c97vzskqppf4k0fjahwiw2c1nb6iy5c2fq8mj1pz2gj";
+    "MSTW2008nnlo90cl" = "13xqlfys37b8chinah2yqmzd0clzli06p7vjk30ha22wgwm02dq3";
+    "MSTW2008nnlo90cl_asmz+90cl" = "0pd6imc3hvq7vgyv1db9y8rvpgz4ffwqv6rqzp27c7ipxg0wjyz0";
+    "MSTW2008nnlo90cl_asmz+90clhalf" = "1xn52ppixjg22ybd8ggf0azb3zg5zyilqjss033g0k9crq4a6y2v";
+    "MSTW2008nnlo90cl_asmz-90cl" = "10wxgh52zs0fp0bwd0b6csnz9x6mvp45gvjhk0y1dhgfwbcvw9y9";
+    "MSTW2008nnlo90cl_asmz-90clhalf" = "1kmvp1yfgsx4jhsjc4drg82cq4xs6as4grwrymfkrqnvhcg86vap";
+    "MSTW2008nnlo90cl_nf3" = "0vw0cmszwp49fsskacccl921za88cl5cfy0sqckgxzs4hx21x43n";
+    "MSTW2008nnlo90cl_nf4" = "1b3fy8mfclgsmvpyzfs34fjry6djmkjcjppdxni1ipjyp1bcaia3";
+    "MSTW2008nnlo90cl_nf4as5" = "05phi752spikwq74i0hfid7lsqi51hdvwxm520kdmbdz2pblbz4f";
+    "MSTW2008nnlo_asmzrange" = "1nj68qhvlsqi7299d9rrsmq7pr6bdil4gzr6yla2cgn4wwiggdwn";
+    "MSTW2008nnlo_mbrange" = "0jnmy4i593wz80lbm0r0cwdj9xw496p3in0lq8ksr4yjwz0agpbk";
+    "MSTW2008nnlo_mbrange_nf4" = "0lw3p4q0ixj7plcmwqh43lfgv1i7ljar3f3k1v6f0imyvz8swfgr";
+    "MSTW2008nnlo_mcrange" = "17v549iq2wn5zvxfdvq8pf5f7zvgnpa72i6gxvxzfqwkji7mv522";
+    "MSTW2008nnlo_mcrange_fixasmz" = "05c8z2q2866550clx2mwb1jvhpn0agkyg82vvrswi3h4hgkvlfjx";
+    "MSTW2008nnlo_mcrange_fixasmz_nf3" = "0r86xsl1wfphwdj2hhlilkwc2949m7bcn42dms14g7w45i24g6id";
+    "MSTW2008nnlo_mcrange_nf3" = "1c9lsggncwghvw9mgd18h50ljrnlpp1p5r2zlzf8z3g8i4f3aaih";
+    "NNFF10_KAm_lo" = "19wn44svz61lhk33kzc6id18w6qbkw4bfnwncar19phrjjp965v6";
+    "NNFF10_KAm_nlo" = "191db9pj5yspiqc7598r147j9wvfc4s6cm0q805m5vmzpfg2cgr6";
+    "NNFF10_KAm_nnlo" = "1hm8vhk1p31zdn72bgcyyq0w5qii1ba0cf81wjlbhwv4fadfd4sy";
+    "NNFF10_KAp_lo" = "13yas11c7xxij45zrd3r6njjvx33kn9lg8i28ki0y4nw6ss21w3b";
+    "NNFF10_KAp_nlo" = "1jza83klbcb3j2pcg2xhgj2imh4llb6hsfkbfj294q0isqypgzsv";
+    "NNFF10_KAp_nnlo" = "0xwl34a31ajxwlgx6bhzzyf9b2xiq7bpv51p4zi6k1xihs91vwzc";
+    "NNFF10_KAsum_lo" = "128cj81qp09hn99dnkm9q06wf2dr7xjq9qmwvrmdizrd8cwfa4l1";
+    "NNFF10_KAsum_nlo" = "19pglfl1i5qg8sj3hg0qnhr1f66isfbrv7f901hnxniibbdjxib2";
+    "NNFF10_KAsum_nnlo" = "1769ybc49a94appmiw0bbn3kkvcpw82sggxgvvda5jq9m36m9yzb";
+    "NNFF10_PIm_lo" = "095xl0cs6p5z44hydfa963ylxvzqxdwwj1n8jn7n0c48rwssx357";
+    "NNFF10_PIm_nlo" = "1fn8863092fn4aqacprbsdxlgz27q6pam08pccwq9ps0dwjn7cc5";
+    "NNFF10_PIm_nnlo" = "0j4p50k821pphy8i6s73h3c29d7jb3bp5s4l8rl3bfb0nfx4p6hq";
+    "NNFF10_PIp_lo" = "0hhw2ympx1a8d3sl953k27yzww0j2f5m9b865gv1ybb3l9ccv1i6";
+    "NNFF10_PIp_nlo" = "18k3s7i1xvh8717n5cdllbb6zs8svh2bkw0k2zf4ql5ijiypvc10";
+    "NNFF10_PIp_nnlo" = "16mywhpc3439dpk2c1i6gxrv9khyyg0kl4gsc41qyi3r4d7k6n2c";
+    "NNFF10_PIsum_lo" = "1yh3hxfmgzgpwqidmzlc189syjbsj4vyswc4kch7yykxw4dqf6sa";
+    "NNFF10_PIsum_nlo" = "12rgg0nc9rjvwfpf0y9kl1w9814a4pv4b17p46h8qm6kfyqqwjia";
+    "NNFF10_PIsum_nnlo" = "19iz4q31apgm2il9478c7zmmc6kgz2wyp84qja761jvyl6z0img5";
+    "NNFF10_PRm_lo" = "0c5pavhf5flx2nmld2dprgp1lsbvsrjw5mqdzvgkks7ibvq0ap5j";
+    "NNFF10_PRm_nlo" = "0nfwhp9hacnm95w2qa5hvmfwaj7drc0w7lxqw1lrdp074bpd0ma3";
+    "NNFF10_PRm_nnlo" = "084dz4xxmydf71vkhcrmj03jkwyj56jxvmbzm22mdh2dxmkz3l1g";
+    "NNFF10_PRp_lo" = "014m0vjzrr4rbi84qxzmrym07kc4wax29fs66mfxkmrimxpb9l21";
+    "NNFF10_PRp_nlo" = "0lrzw2618kgk7vsksbr1qxqc4h9lza573bz6208hwdgkmh7awasc";
+    "NNFF10_PRp_nnlo" = "0bv07hh5rxvqw58jcam3piiiy19w325nrwivrifyv5wii8sybz8r";
+    "NNFF10_PRsum_lo" = "1a9m77rl49wzzgdkr6x618bzcm2p50f915bbggknx5xjw550dqd1";
+    "NNFF10_PRsum_nlo" = "1qambqywda7lvvkd6kx2r1g60v6lnqcamdd51396id33fvw3k45h";
+    "NNFF10_PRsum_nnlo" = "1kijaxw6v1w33q6l89raz7ic59zcmd3nx5djp83lyg134a15crmw";
+    "NNFF11_HadronSum_nlo" = "1n9fb71kl7y8rp1smyal28wdvdx1b410mhqkxmavnr1fs85hkh85";
+    "NNPDF21_lo_as_0119_100" = "19qw2hp1yk82qgcrpx8wp2fg8wklaj6rr653m6mndhhr0aa0w80v";
+    "NNPDF21_lo_as_0130_100" = "0p5cw77dg5pkhl3d0y6r3k8vhw4m467wf3gd8kp2l5vcbdwb4izv";
+    "NNPDF21_lostar_as_0119_100" = "0i23axf0xl11nb2dn6p34bnm1xfisnn3a82db9dz863n60gqb5x4";
+    "NNPDF21_lostar_as_0130_100" = "1aka01747071l53jx4v7rgmfj5danzjillbwincgi1b28mw78yhq";
+    "NNPDF23_lo_as_0119_qed" = "02d85an11mr66yg3vi5fq4919ymbrh9h8b8qzzzm9dvfarzmbwxi";
+    "NNPDF23_lo_as_0130_qed" = "0qsxxw3nds42924xqnhs56wmd8ihmrip28glj47q9r9i3kgw3lv0";
+    "NNPDF23_nlo_FFN_NF4_as_0116" = "1d5wccg8l5xmdr8pvks6851zxrlgq1rk2y5dgp10k6r108059rgn";
+    "NNPDF23_nlo_FFN_NF4_as_0116_mc" = "1sc13cqah6di97fmlnb6qw454jyrp0i9jv2pfxvi8ix2vzd6km00";
+    "NNPDF23_nlo_FFN_NF4_as_0117" = "1gkzb46fnf9k97fgbbxljdnklffwnxmg58z01x55iklq4sn2aww3";
+    "NNPDF23_nlo_FFN_NF4_as_0117_mc" = "0nc3fx9ggqybymw5kglwq3kmznc9hm28sp58gs1l4gwx3xiy0bj6";
+    "NNPDF23_nlo_FFN_NF4_as_0118" = "1zlcqh0nfy8yf2cnzs0iy615nbmhpa2zh4carvifcqd4lv4azkp6";
+    "NNPDF23_nlo_FFN_NF4_as_0118_mc" = "0518z8jakc9r74kzanraf2n8haminfipp2rvr1288ymhsl5bxyp0";
+    "NNPDF23_nlo_FFN_NF4_as_0119" = "1k5mcql2411020m6vq26ck8ig3q01j79ndjgci2biq743m8nlvm2";
+    "NNPDF23_nlo_FFN_NF4_as_0119_mc" = "06yv9mwgvhag5442581r7by3nsxcy7c76llgaalphbzszqr2vy0p";
+    "NNPDF23_nlo_FFN_NF4_as_0120" = "1m97g47p44vq3izjji6agwmj2fwdvgddzy8w40mqqbr9fk19lbyi";
+    "NNPDF23_nlo_FFN_NF4_as_0120_mc" = "0bjllckv61jc1y6f8c1gqdh36r15glqn8fqp99q0kckaxyszy5vw";
+    "NNPDF23_nlo_FFN_NF5_as_0116" = "0x4kjj791hkwng4l5dvch8z0ig1nkliirlz9mkv02g54qrilnkmy";
+    "NNPDF23_nlo_FFN_NF5_as_0116_mc" = "055clf0m8l8gnby2lgwh4wkyqciskwp54y34vb1kwfbhdf71zmnj";
+    "NNPDF23_nlo_FFN_NF5_as_0117" = "1cplvrizlsjcixsjzlm2drssbjsrzj9bvq0k5mnv79r3p1xdp997";
+    "NNPDF23_nlo_FFN_NF5_as_0117_mc" = "17nic3kw991dbrhyjyxpk0zzv8rjh0r0whd6nl8v6wsf5q5h0ny2";
+    "NNPDF23_nlo_FFN_NF5_as_0118" = "07fgr71x2zk2ywcbnw0ikv0p9kzsmd83kdidfs49vm7azcbm0qfw";
+    "NNPDF23_nlo_FFN_NF5_as_0118_mc" = "0s365gsidichyj9x5926q1gm0x1bp52chv7fkpirflrrsywf0lc3";
+    "NNPDF23_nlo_FFN_NF5_as_0119" = "1qspxbwswz7ssqj2rx2jdg0bkj8prawwshvjd26ifz9i0l9qnqc0";
+    "NNPDF23_nlo_FFN_NF5_as_0119_mc" = "0aqyhrcrzs3kqhj1hndilpibvdwfw9qhg1x0cypx97h16n37j46x";
+    "NNPDF23_nlo_FFN_NF5_as_0120" = "1k9savpyg2iqr1ab4i5y7q1qhd8zxq413040h2v46jl8mp7x6bjn";
+    "NNPDF23_nlo_FFN_NF5_as_0120_mc" = "01g7mh7v62s47cwdf6ws6j37gxl4mrb26ivdzzwmhy6ydiw8ka53";
+    "NNPDF23_nlo_as_0114" = "0mmq32kddspgpacx2qj086das9z2bxh3l37qvp9yf84gqzjj7mml";
+    "NNPDF23_nlo_as_0115" = "0jn1gv137d2x3vxq7ny0qc0hnfmcd4hs3cxkyn7j26w7p59q81x7";
+    "NNPDF23_nlo_as_0116" = "1mnq360acd5vfwz9z8fzynldchkqrfiqhsxvi3s9a263h3p44bsa";
+    "NNPDF23_nlo_as_0116_mc" = "0ngw2hls52bax6dmis3nfa2ix8q8nh2d9mwjax4cjdkmmf7rdn2g";
+    "NNPDF23_nlo_as_0117" = "01wkq68b8zl3mznzvc4p7p9b4ik2bnqgjq97mw2287i448mnj9jn";
+    "NNPDF23_nlo_as_0117_mc" = "1s2g55240gh9j32ach9rban0iw4hjmw5haj1c21wgyh4nqiqlfwr";
+    "NNPDF23_nlo_as_0117_qed" = "1l2rbxn9fw72nmhqazfkh568q4df0q2jp0pn0fj368wdpf36fk0b";
+    "NNPDF23_nlo_as_0117_qed_neutron" = "17rpz4bdp3fxvafiz32aawxw64prkhqwqpnfnbqsigcslm18bwnc";
+    "NNPDF23_nlo_as_0118" = "01kax3g4d8nd6n1gip70d02kl3kvbqib93b99xgwc1f0np85p3r0";
+    "NNPDF23_nlo_as_0118_mc" = "0qhs7r4zzw68grrmfh7qdad49w4y4mvf55qnp86piri5vi8lklwk";
+    "NNPDF23_nlo_as_0118_qed" = "10xfv8nkg2jjy3yg9m9gakz6lixdvmahdy1z12znqyr1br57bdhy";
+    "NNPDF23_nlo_as_0118_qed_neutron" = "1zffxfykx2v3dniypsvyyqbz5pb4dcww653amaxv96hplw3fvr0h";
+    "NNPDF23_nlo_as_0119" = "1v24iwddahxy6sd43bxv6ywf8n7302qkwl9hv7d074q1d932kgr1";
+    "NNPDF23_nlo_as_0119_mc" = "0l95fgr5bwhsh0h3qqlnx9czkgmrf5y084zlzk3qhix3ldh8zbp4";
+    "NNPDF23_nlo_as_0119_qed" = "0rayscazcacy89lzg0ynpwrl9g4pnjwwp0l0vwc3gjz9cwznmwsk";
+    "NNPDF23_nlo_as_0119_qed_mc" = "1cc3candpavcfbv681zpg8gmwbh3g14vqkhs2s6v7rr9xhx6zqv1";
+    "NNPDF23_nlo_as_0119_qed_neutron" = "12h4x97yglcklrvwh937xa5bgqahq949a5wm3nyjbvrfsw9n330i";
+    "NNPDF23_nlo_as_0120" = "0f8lwydw45vy7c0mqmz60hpc0b40czx0gx35liyrhcbjvj9129m7";
+    "NNPDF23_nlo_as_0120_mc" = "0kqiizf0c0mbdavnv7ivk89kga84j7p7xprqi10589ggplchx8ag";
+    "NNPDF23_nlo_as_0121" = "17603srm35158sdwrqijyxm614splx7k6bjyzphgvznnkwpgi0i3";
+    "NNPDF23_nlo_as_0122" = "0c16498ngx436k9mb8fwkhhvcbdyjd4m0jh54v2n1dl354jz60sm";
+    "NNPDF23_nlo_as_0123" = "1j6d7k8d04gfx532iipd4vzm0nldbvy86pg8asgv4xrh80c1zslc";
+    "NNPDF23_nlo_as_0124" = "0dwv41kc9qsvvp22gvxi56gj13dnklgfp4ndrm0475q6gvfz25ak";
+    "NNPDF23_nlo_collider_as_0116" = "1hl7xw8jz0gijxh9cjkxv1rb1xncb1622ghf6wnsaarlqr4947ky";
+    "NNPDF23_nlo_collider_as_0117" = "08krhmjbgza9f4mbq7cdj9g7hh260aaniqqi5awbgp7idbn3nccj";
+    "NNPDF23_nlo_collider_as_0118" = "17645h9l8z8nk7pdaxdhvcfmcvi8ib8yylhiijkkw9yrywb5pakm";
+    "NNPDF23_nlo_collider_as_0119" = "0csf74lpxgzg48v6962falxd8n2nc9xdrqnxxwadqqyrnrfs06dw";
+    "NNPDF23_nlo_collider_as_0120" = "17xqx8hnwy7a67ah0ds8m3nv3cbq20vri83nlwahwfsbig7w505x";
+    "NNPDF23_nlo_noLHC_as_0116" = "02nhh7n2qzx3ak7ih2d3vw3a4dffxbbpv9wrh2yhz30zbrqqlzv2";
+    "NNPDF23_nlo_noLHC_as_0117" = "14j8hx346krwbi2fyyk77k60d7dlk2xlsc6zd543y03jdpk4ahlx";
+    "NNPDF23_nlo_noLHC_as_0118" = "0vwi6h1fkwjg28p2f3br1g601i8ca4dpfjs9vxg80kjzkif6k310";
+    "NNPDF23_nlo_noLHC_as_0119" = "02l15h62gn0njnj459pkp3k1nhiaivlknmbxb3giqpg6wmm2m9y1";
+    "NNPDF23_nlo_noLHC_as_0120" = "13lxmwmywg7wrwhgp0cb41b42479fgfa1bz3aqkbrnf6gi6pviln";
+    "NNPDF23_nnlo_FFN_NF4_as_0116" = "0j4ng2vl955vnq40zv5v9sb0wk8qari61v7995p2l0sxz268sz50";
+    "NNPDF23_nnlo_FFN_NF4_as_0117" = "1wjqlv6mbl2lgvwr5av47amrs8gnqkpkxzq91jvpaxkya3bmglc3";
+    "NNPDF23_nnlo_FFN_NF4_as_0118" = "113s8lxrmif79c6f11pnk5jz7q4lq7108gcfx84nanpksr9dmi6m";
+    "NNPDF23_nnlo_FFN_NF4_as_0119" = "1688qacmp9kl50q1vzffcprf9ydbi2bb2brc68jvid5f7bjkyfmw";
+    "NNPDF23_nnlo_FFN_NF4_as_0120" = "1i3cjnz5zgk8jw5jcrqy6kxx1i5v2a2lgy2fdck3j19cvn0iqqr9";
+    "NNPDF23_nnlo_FFN_NF5_as_0116" = "0v6ap405v9zapbi5sqldvs5lyhz5wsh4cxl8ssxj0l4789qm24hb";
+    "NNPDF23_nnlo_FFN_NF5_as_0117" = "153f95cqd0hkxfy9p81mf2dfdp13h3fhhp0qyxmiknhqm10ykdxq";
+    "NNPDF23_nnlo_FFN_NF5_as_0118" = "0fch9i9qj1k8h3sdwfdcd75idi0bv2q7a338dvj4697xqpxf2mj4";
+    "NNPDF23_nnlo_FFN_NF5_as_0119" = "03r72mrbvy9jkkbmgvp2776xxgjx0jyxsv4bvpxmhscpym9mjvq7";
+    "NNPDF23_nnlo_FFN_NF5_as_0120" = "0rsflim77kdp849pg6f87rq6j0wirj4gayvrnvi4xvfjlk1mxkll";
+    "NNPDF23_nnlo_as_0114" = "1p32hw48zwmvj9i5iyg9pqhf11zwf7m7g5q8prfj8825dvsgql94";
+    "NNPDF23_nnlo_as_0115" = "0smmwd7xla73sb3bci46grj1kfd751pybkf7fz3w3qdkp5jjglqp";
+    "NNPDF23_nnlo_as_0116" = "14blxcfb2jbdgwh73f2spvqxy5dhn5v6ygwi346dzwswipwbixir";
+    "NNPDF23_nnlo_as_0117" = "0di0a5dkskalllnh90ngfb046z5hm9ihjra1r1ck06v9ryam2w9c";
+    "NNPDF23_nnlo_as_0117_qed" = "0dvzz7ac45j4m655k0i3ycy6xwfm6y6801qsb5bgp1kdv7g2pj3z";
+    "NNPDF23_nnlo_as_0117_qed_neutron" = "0v05yw5nc1r7vh8sjag4fmdklkn4jmcdpsmgvwm7sblgfc6gnssm";
+    "NNPDF23_nnlo_as_0118" = "14p9y1ryc1j26gl01sn60pmrfpnkm81bhark2g98xz8dmfmjp7iq";
+    "NNPDF23_nnlo_as_0118_qed" = "15mcq4q20ijmf06pcc626jlk22fm8c473p4i80bmi27h5x2pl56i";
+    "NNPDF23_nnlo_as_0118_qed_neutron" = "15vsjjc1i2x6lb0603h6knj68si8cvxml2xk97pw343qn3p8h4ka";
+    "NNPDF23_nnlo_as_0119" = "1qzap9zlpwyyshh8hc0gm82y9rl9hpy232j03gd6vwmcw5pgm2d2";
+    "NNPDF23_nnlo_as_0119_qed" = "1cqvdmq0hm9rh6749bn08i6c94gshpjafmwv8siizdlm8v9af442";
+    "NNPDF23_nnlo_as_0119_qed_mc" = "0a77i8grscxwnybgikik94ldiddrif3yy6d4bqb6x1aj4hr9i5ag";
+    "NNPDF23_nnlo_as_0119_qed_neutron" = "182jqm5019n94givs4rwblpz02hp90mbizp0b5svrxf21zdyrmbx";
+    "NNPDF23_nnlo_as_0120" = "1v8ykgxnqbvfra57xpamhgbcjvj89dndhk62pmji004gvqpmwi61";
+    "NNPDF23_nnlo_as_0121" = "1fv1m86ya7zi77ajd8r1nls2zcr7n6s3wqrdiwq5ikxidqxc6cgy";
+    "NNPDF23_nnlo_as_0122" = "0bn6bmvs8w9qsqcpq8y8a7w64xbkvrqwiikm5shjprwqy9xbspyf";
+    "NNPDF23_nnlo_as_0123" = "0w7sqyyf98ymxpgqfh8gr9g1pdwr2pw12zc8gqykn5nkjbbmijgy";
+    "NNPDF23_nnlo_as_0124" = "1hilgda0gqyj81a5h0mxrl5g9ahlm1n6mhd3ajkicxz2fvxm2n1l";
+    "NNPDF23_nnlo_collider_as_0116" = "07m2jwjwzjc4bdsx9dkrp41qn04f9z3k2m6n4q308hwdq9lmcm99";
+    "NNPDF23_nnlo_collider_as_0117" = "0i4kggkkkp407r33a2nsdy329zxpx8h6dq0h0wwpvq1kmyrjk6i4";
+    "NNPDF23_nnlo_collider_as_0118" = "027wlw7lk04grz5qavyymj21ik4zr9fy9yk2kwjc9gx2ycp3sj2z";
+    "NNPDF23_nnlo_collider_as_0119" = "0jq3q3sh1p8rn1qap77794v9hh3j0b7pmfl24wxvpc4dly4al0vs";
+    "NNPDF23_nnlo_collider_as_0120" = "1s0jic8amasmxczdflbbhn6071nx8cxr3ynfrinllp36d92pmgsx";
+    "NNPDF23_nnlo_noLHC_as_0116" = "0jzn78p2gygsqip50jfnnrmwl7issbp4vzpf71cbvj39ihsmavy0";
+    "NNPDF23_nnlo_noLHC_as_0117" = "0zns2yy50c0bm91y8xaafmzhgx1wafvmv39cykw7xwsnkgclh487";
+    "NNPDF23_nnlo_noLHC_as_0118" = "0v5bdc8d9w5g606h42rpn6zw31y1a5nk9akgfd1lyrhilvh7ayck";
+    "NNPDF23_nnlo_noLHC_as_0119" = "1zacfd5jc5wvcig0g8g4jkr77zcxvzcvppa4ci81c1n8d0whnr5s";
+    "NNPDF23_nnlo_noLHC_as_0120" = "1lx7m8ajwvhkzxck2ngxng1g90fpay5r5iwdnk2w7xgp1hb1ayc3";
+    "NNPDF30_lo_as_0118" = "12adhizxskpjzdr6inc2hi6bxrs8ns3bnyihz09hfh9q53d5ayik";
+    "NNPDF30_lo_as_0118_nf_3" = "1gjaiwqdhlswf1qmw39xr6g0w4bnnbinfpwl9c37jnggk6dxwdjz";
+    "NNPDF30_lo_as_0118_nf_4" = "121xn280f5xx04q0rr4ina9iqzbc1v8cay78km836kqvgb3pcpyx";
+    "NNPDF30_lo_as_0118_nf_6" = "1s77g0bf1qjb9rn1svnpfx10laxx87lw660ark9fhhx14zgybs3i";
+    "NNPDF30_lo_as_0130" = "0nvpwbmdzm8fn4wlb2rhzar71kk4myfddpqsqhd7wb1fqxkj5b7y";
+    "NNPDF30_lo_as_0130_nf_3" = "10diiahiy3yk6y7m1r4bd6nr1kf4mnccgj5qyq2lw49highn4s8k";
+    "NNPDF30_lo_as_0130_nf_4" = "0j3b3rj5pr2ws3yaq6h74hhsjy7lv3d2x5nryc55q22xfkgf451i";
+    "NNPDF30_lo_as_0130_nf_6" = "0w7k4a9ir4xvfh3v6dba70rhwkkq7qk16z178wld26zl6a7gw1hk";
+    "NNPDF30_nlo_as_0115" = "15g9alyc317qydqy3g7sqlh6pc4pxn3xmhmzv9lcw2ghg3gn35fi";
+    "NNPDF30_nlo_as_0115_nf_3" = "05b5xl89jvk6bgp86yl5hwdh3x8211czdsbianqkfix35rqrvlx3";
+    "NNPDF30_nlo_as_0115_nf_4" = "02p9lhvricjl5r79pkcm2fv14p9gw1d2qizka4w254ang3i1hcm0";
+    "NNPDF30_nlo_as_0115_nf_6" = "1iabf2qszv1270ac2sr2bqs7rb3gm58fj388saqbhnra4p2kv9fw";
+    "NNPDF30_nlo_as_0117" = "01my1m7vx7yax8ldnjp7s1mz1w3x3m0h1gdd8mamfrvphaghwp4x";
+    "NNPDF30_nlo_as_0117_atlas" = "0vjfh6kihsypvkpg3fwqf96kd2ldq0azcl72ia6w1nr52rsqc27l";
+    "NNPDF30_nlo_as_0117_cms" = "1sbaq99731ihrkp9a2fj6lxj9dr2c9j4vp2335249nrkinfpf4mq";
+    "NNPDF30_nlo_as_0117_cons" = "14qwjsa633v3h0sbizmhifrwdm7fmglyk608lq4ims8y7nn491nq";
+    "NNPDF30_nlo_as_0117_hera" = "05gs9ril5vkm7xrnz5pvjd6pk8ivgk0bl4bh45gx658fgg2snhiy";
+    "NNPDF30_nlo_as_0117_nf_3" = "0jc8p8h9pny0l7j3hv55iwaw684ymj0hl62d6bxlvw8sqvhxcqyl";
+    "NNPDF30_nlo_as_0117_nf_4" = "0a37b46ach3m0gqniwk79qk963w0m96dknda2rhp1glpg5xdxl0z";
+    "NNPDF30_nlo_as_0117_nf_6" = "1hjj6k5g2fia7xq5piy0dhsqs9lwriasmppjwil9wxnwklnwmr2m";
+    "NNPDF30_nlo_as_0117_nojet" = "0z3s8ixmq2l4znv2dn0dcz9rq5f9b3jgnlwmvjzcab3wvj1za687";
+    "NNPDF30_nlo_as_0117_nolhc" = "1x9nbnxm72wzaky4rvlrq1kmqs86ypphqwvsng33n0zdd9yr82pr";
+    "NNPDF30_nlo_as_0118" = "0b51qb2i3h9d7hrviarfszwljsy88m8ibzgz7dd5gn88k9kardrm";
+    "NNPDF30_nlo_as_0118_1000" = "17yla3w0rqy1a5hxq3bfq94ddda2qv6zzj76lfrm4zahl6m02kdy";
+    "NNPDF30_nlo_as_0118_atlas" = "034h2wgakbm3mx70034nwb44ii38rca7xv3az3fhcnjbpg9vnf0p";
+    "NNPDF30_nlo_as_0118_cms" = "08g9315fpc4khwfjf76vvyqa9nannvwq0bpc42f9f7yc0pck71qa";
+    "NNPDF30_nlo_as_0118_cons" = "1lw0fhy9gwk3zr7vq7qh9p6zprbyd4faln3npnxs2snncic1mnz6";
+    "NNPDF30_nlo_as_0118_hera" = "1833gd9h3gg75hblxf5qh5hp61k7n9vavb91ll9lbqmcbfr34aas";
+    "NNPDF30_nlo_as_0118_hera_1000" = "0lljb96d3q25yw3fz3cbk2in90q6srpc4alkz95nyrvgp25xgbgy";
+    "NNPDF30_nlo_as_0118_hessian" = "0h8d2zc02ccr1rmlsf4xd5a41irbs9q9wx68caj2xy0i7qr8rsmp";
+    "NNPDF30_nlo_as_0118_mc" = "12nnyzh2f6mv4gq4x4b8nlqx34lbj5y2y60zivfdbcpyg2spj5y8";
+    "NNPDF30_nlo_as_0118_nf_3" = "10f5md8bhf44n5x6r7ln8c58a9ylm4mfgxg30vd0d8mvjc3zpsng";
+    "NNPDF30_nlo_as_0118_nf_4" = "0q14zqkzqy2hgh8wli5db7dsqgsljgbc717da661wj8kqa23w4r4";
+    "NNPDF30_nlo_as_0118_nf_6" = "08ajfn1r27hdarff464j2gpi7ffjjxs6pwzh3vil8lpjij5y7d4l";
+    "NNPDF30_nlo_as_0118_nojet" = "0zzzk72n7nq1mcaalbv7mpfpb9kh095j0zazbzfjf2k6r3p0v082";
+    "NNPDF30_nlo_as_0118_nolhc" = "1p7iac75znr1li8qg9xf1my37i70flhvjkfjmrb5b0h3hk9agb1r";
+    "NNPDF30_nlo_as_0118_nolhc_1000" = "04mgjfq1ncy90gqljfdzw1iwzav5infkfv7zj2rid088n3qfs91p";
+    "NNPDF30_nlo_as_0119" = "0p0kgw17c97p99zy3ffr6g7pphhc8ccdhcq4iip5drqm4hc6nb58";
+    "NNPDF30_nlo_as_0119_atlas" = "1hpx2jm4y6kz9b4j42ags98j115hd2s41km670979z9zxmj2qm5q";
+    "NNPDF30_nlo_as_0119_cms" = "1j0135mxdiyn22iqrmg0d44w2w7ql1cdacprxgdz4jfb0ppn68rx";
+    "NNPDF30_nlo_as_0119_cons" = "00qvhq9ypqv62zvlg32k3x5gibl5jh0b78hyrpvxf1l3y2b77nw1";
+    "NNPDF30_nlo_as_0119_hera" = "008f4m8p9gi4w61mgjiqqpw346rgqxaayc1rncy2fggl4gs64yi1";
+    "NNPDF30_nlo_as_0119_nf_3" = "1bh0sl8pjy5n90j5dz9c80n3vy21hdsv8vxwbqkq0b2lkv8gzw5g";
+    "NNPDF30_nlo_as_0119_nf_4" = "0swgnmbxz0g3ziib1992s0454jfsdi7l0x3lrvs5qzzjk6rg6qgd";
+    "NNPDF30_nlo_as_0119_nf_6" = "001awj8h76wybmxj9vvkxgqixzak4zbhsvjmj2lscb2v5qq3y68r";
+    "NNPDF30_nlo_as_0119_nojet" = "1x961nmad1rxmf4yzbz2drpi5hfac2ag1bs1jbvvlw3p04xr2c38";
+    "NNPDF30_nlo_as_0119_nolhc" = "1yx6f4n577zqwhp0i440r6zk06702jg4kkib9nmgws3jl5f28big";
+    "NNPDF30_nlo_as_0121" = "10k01z1amzp3jmfvfb2snrm8d04vr31kly1m30pw4fv0qn78idlw";
+    "NNPDF30_nlo_as_0121_nf_3" = "1gb40ycnf42fkrbdwfhb8wp56nmzxyi7fzbqgvlkby7pn86m2f7m";
+    "NNPDF30_nlo_as_0121_nf_4" = "18ywp6b9f83rxmh7gfn648wslvvf5g4ffm83rradp308smr1sv6p";
+    "NNPDF30_nlo_as_0121_nf_6" = "12dps7n3glrzwb8vsfghwbvnh1yyxvjnvqfilbrrcy0dm3sams7b";
+    "NNPDF30_nlo_nf_4_pdfas" = "0hrx872m52bb894c32jrvlvm9lcpy3yllj5ps52nmywqd8n1simj";
+    "NNPDF30_nlo_nf_5_pdfas" = "0q25jxvwpz8inkax0j2zq9pj8swqfn4jmkhs4ibkl6xs78bhjfb8";
+    "NNPDF30_nnlo_as_0115" = "03apmzw7krj77zdyl6sxwqg5fyv3vicp8iax445qdx8ld9kv225w";
+    "NNPDF30_nnlo_as_0115_nf_3" = "08y1gjzkpnjn6mn247n7a9ya8z6pml3602p08rjha4ljggxhyffq";
+    "NNPDF30_nnlo_as_0115_nf_4" = "19mjfk1rib9dxbsn0473ggi6akwv1zs9y3q9nzjg47mdjqlspb2q";
+    "NNPDF30_nnlo_as_0115_nf_6" = "1zcjjbjwjgbkrhgh0kira7wzwmy5vvi1n15wycg33yk09m06db6b";
+    "NNPDF30_nnlo_as_0117" = "1225gj4ihmphnfav2h38rz17lj1dyi9j1lazqlwww8vizl8933bz";
+    "NNPDF30_nnlo_as_0117_atlas" = "0i9nc7q1cwl8cxxaj1xaz28wmj09q5bjmh19p1fcbcln7hklvj5x";
+    "NNPDF30_nnlo_as_0117_cms" = "01ffhsw191nrr58x6wnjizx7bbijkknicvgk73pjbwyr67gfj581";
+    "NNPDF30_nnlo_as_0117_cons" = "1blfi0p231r5j34wspk192fmbv34gbvx3bkisjh7wxpiab80qdws";
+    "NNPDF30_nnlo_as_0117_hera" = "0ds02aj1q6y4dndfk9l9fyxci0dhpwr7jx1jq1qb9g5bb7bbhzz1";
+    "NNPDF30_nnlo_as_0117_nf_3" = "087rz8bz3j2h7yk7rknlqz3rpbczgx2r2zdag8pjccdqi9jnk9pg";
+    "NNPDF30_nnlo_as_0117_nf_4" = "1w44bwx6m6g8r990vl6f505bgf3v583mi19r0nfh2pahx2k2djaw";
+    "NNPDF30_nnlo_as_0117_nf_6" = "1l7gwbsl2haqaj6hqsnnqwrnxrkdv1h63qbs7iwfdq6474ndzwsf";
+    "NNPDF30_nnlo_as_0117_nojet" = "1nmv44arab9gfhs02jf4zijdb0644pvdmi6k809bxbfhir9sry8v";
+    "NNPDF30_nnlo_as_0117_nolhc" = "0zn2b05jv9da7394in14mswvma48y26lvpw7rwh7wmyw323rxpfv";
+    "NNPDF30_nnlo_as_0118" = "09xxi0vq90n9vfzq72c0mbf4yz4zif3kl6xwcjdb8r620ihwrnfw";
+    "NNPDF30_nnlo_as_0118_1000" = "1iy5inrsfpn70w65hy42pmz0630pbrgg4l48qgsamcjgqdhd3n84";
+    "NNPDF30_nnlo_as_0118_atlas" = "013jm6f2hnmzc2di7spf6zp31fwhm6c9sddwql36hww63w8sys71";
+    "NNPDF30_nnlo_as_0118_cms" = "1w0ax68rg5877s35zlg13c451fcz2rij4adzwhz4yf4skkbgflng";
+    "NNPDF30_nnlo_as_0118_cons" = "1qniswwj6cmcs7bm4n11jx2disqcwszl08cb7im824nvrcjka2pg";
+    "NNPDF30_nnlo_as_0118_hera" = "05j5yrra93dxh1nah19hszd0q3pj4zfica8a7vm5akbfn02rccj6";
+    "NNPDF30_nnlo_as_0118_hera_1000" = "0ssiw9fk5fqwg77rbycrxrclldws35n6gj4a4sj6d9yc87vz1g7z";
+    "NNPDF30_nnlo_as_0118_hessian" = "1hb32bamwlx5il8g2sf5gy6xjr7r4rky7xgvdhf5ndq7v3n1ncx1";
+    "NNPDF30_nnlo_as_0118_mc" = "1gxl4c5z2vh382y8l2kpr8vy4fqvbxvrw6xjc6dp229ak89cd6c2";
+    "NNPDF30_nnlo_as_0118_nf_3" = "0iccjcds9j9pp8s3mwrshhzl5anklax4rgcwm5im90hipj450rgj";
+    "NNPDF30_nnlo_as_0118_nf_4" = "002r0179jsl0l43psvw3hd1drg9fcrlzw57sbyndlswvq4zkyzyc";
+    "NNPDF30_nnlo_as_0118_nf_6" = "1mwh2dxymayxa2khxjfxqmbhaj85jdnz548wmq6fyrxr63cfmw07";
+    "NNPDF30_nnlo_as_0118_nojet" = "0nly14fxfww78qihrd8b6wk3da24x5sxkb13h8l2cgdxkq90fxbd";
+    "NNPDF30_nnlo_as_0118_nolhc" = "11yvr5h66v37376d5p2m2g8fajdycv9baqq6mjfphf4a2abrl7m5";
+    "NNPDF30_nnlo_as_0118_nolhc_1000" = "1bi0mxs6v1izlbvich55vi7qab72v1sizd4wj13787w47ffqm89p";
+    "NNPDF30_nnlo_as_0119" = "11bvbqqjbyz0vjd4kh5qyd0a4rb62l103n10d1cyffgdfxxsk8f9";
+    "NNPDF30_nnlo_as_0119_atlas" = "1fm46crfparx2swpxnyscpwqgicxb4skhclnc5xaijcpzraflzp7";
+    "NNPDF30_nnlo_as_0119_cms" = "0i2d4wq7bsbfp8hqdr88nbii980zhfmpg6758czz7swd5yv8076a";
+    "NNPDF30_nnlo_as_0119_cons" = "0v54zyz410rg3wcdw44japzynzvvrbjrspk91d0129rdv2xz51cg";
+    "NNPDF30_nnlo_as_0119_hera" = "09w3krirq117cnhfkxlb8pld3xb5g2r3nhgc11v3ksavq746jhvk";
+    "NNPDF30_nnlo_as_0119_nf_3" = "1k00h1c0lv6884lb02qmqki7sfmxkqpj88fkvf057frk120f59ah";
+    "NNPDF30_nnlo_as_0119_nf_4" = "0pqjvaw2ad3g9zzjdyhh72580jrj4p8hxlvy9h6q9hhpwdihnnmh";
+    "NNPDF30_nnlo_as_0119_nf_6" = "096fc9958s3z559knxqccwj3vylxviq2g58rwirj3qdjvy96y2cc";
+    "NNPDF30_nnlo_as_0119_nojet" = "0l5crj00jm2vxgyr5nhs6h1n64xnxwpanrsjk8f8qfis37s68ar7";
+    "NNPDF30_nnlo_as_0119_nolhc" = "1nl4gkjjz3kpq1sbzqk2d0d50vmb3ks7j5z14hqf9dib2xr39jl1";
+    "NNPDF30_nnlo_as_0121" = "1c0ddbjskxw4rq1p8sp63vayxkvcnls062qp16wvrrbw7zkj1jaa";
+    "NNPDF30_nnlo_as_0121_nf_3" = "1sj9g0wg6x2cvwp45i726dcs44hpqjiqa011xzindnjh8cq7m6xn";
+    "NNPDF30_nnlo_as_0121_nf_4" = "1j4khzpw52vc26n7a95xg1wyqz720fnz2kbb8l9a5bsbmxmaa7xv";
+    "NNPDF30_nnlo_as_0121_nf_6" = "1kln7zjgl0hwl621wnhhsih0m8f9ir2i8ligfg2s0qp8s3787lrg";
+    "NNPDF30_nnlo_nf_4_pdfas" = "0s460v9712ahz09fhzhlnsnkl9arsy3l82g1z6xjz4la8fwkr9wq";
+    "NNPDF30_nnlo_nf_5_pdfas" = "1vjfm9j39m4389b0r51axlbzdbkpk2vbs3vks3yqcr3hr09g9myk";
+    "NNPDF31_lo_as_0118" = "1jq8ad68kym717qinwdldvrjnry9sfsfq7lvfv6ipm1sdzixqm96";
+    "NNPDF31_lo_as_0130" = "1lg49cbg43yrpb7fgqfk0d55m28rrw781mks3zn9m24fv0hiyzqp";
+    "NNPDF31_lo_pch_as_0118" = "0xm3fyvrm77hd2layrfwc74vncc470gvf7hx8nzd2sw3ai1g9h7x";
+    "NNPDF31_lo_pch_as_0130" = "18fip94c0ywzj543qq154z2wnllbn8jw61nx6l8v9wmg2sdzi6zi";
+    "NNPDF31_nlo_as_0116" = "0i6bpa2wf52vsc6x5nlsmncal1ghqpsyz7pya2a2zg0k7z6dfcsp";
+    "NNPDF31_nlo_as_0118" = "0vwbgaxs5gj5cnyncmc7m3650pd6bplwdga3fnyy1vrrh3mpsngh";
+    "NNPDF31_nlo_as_0118_1000" = "0ql0phs563ck7bx7cm5x242icfb2jrlsxhsv80m0hxyr3fhyc06h";
+    "NNPDF31_nlo_as_0118_C1p6" = "0nn6krh6vk8rxiwhpnn3nbxian8hw8d1vq31ywh9560hbi3vpcrl";
+    "NNPDF31_nlo_as_0118_hessian" = "10v2ayms2mhm9zi7k0fw9rshawc7njdlbjs8rfg5hiqn1adss4w3";
+    "NNPDF31_nlo_as_0118_luxqed" = "19fdqxfmx8kzcgq13dk4k1nhkgqpnm5xgahp13hwz1i2vcp6xq87";
+    "NNPDF31_nlo_as_0118_mc" = "1yw21cs6p85ij8lm9k0cvlm651a3x9f73f23ysxjgh1r5kqnhz9y";
+    "NNPDF31_nlo_as_0118_nf_4" = "0qywlyd34yqb2r8ch9wjimyfi1jr3rdhxliwrmns0558hbd47a3z";
+    "NNPDF31_nlo_as_0118_nf_6" = "1pb22z2s0ir130dk5pkxwyid37i6mf8jpr7k7nlfi45gl9zy5ldd";
+    "NNPDF31_nlo_as_0120" = "1b5wsab66karm1ay5vxpjw21g2ywhnzqnlahxnvnaf80izha35hl";
+    "NNPDF31_nlo_hessian_pdfas" = "0sxka18qp99gjj9abml2ba4877zavijmjfzg6m0qczx9m8v9m3xg";
+    "NNPDF31_nlo_pch_as_0116" = "1wqpq2qj5czvcj754nd6c7rrss8skjx58vp2gj2bc5n95jv1qazn";
+    "NNPDF31_nlo_pch_as_0118" = "113xpp3xvpfpivlj6p7av4czfbfnh6bk2kd4d2635ddvy0clqkpf";
+    "NNPDF31_nlo_pch_as_0118_1000" = "1sbjqkwq7iy7fnk3r9ga1rzadzy8x3ld933vcih87is09bzg5rfl";
+    "NNPDF31_nlo_pch_as_0118_hessian" = "0xmz2hc3n8alhf210axv3amf7klhbyl1dd1z2yyx6c3pcvcrf80m";
+    "NNPDF31_nlo_pch_as_0118_mc" = "1w1jifp5f7ypf5xqdw1mkx1d6shknryhqzk8rk8naf37bms68mfn";
+    "NNPDF31_nlo_pch_as_0118_nf_3" = "0m7rq7k8x6bsakkw3kmcicq04c39flrw1axv72dqaf9xci9w3pii";
+    "NNPDF31_nlo_pch_as_0118_nf_4" = "0k77chw866shjkc0ml6kb4az75sdcvdd897r8d56jl72d2lkxp3m";
+    "NNPDF31_nlo_pch_as_0118_nf_6" = "0bdc60dxj7jmqacbbaxp2m9qzg82r6pgn7h9pi2k15d07qm6fc4d";
+    "NNPDF31_nlo_pch_as_0120" = "15s1b5w52c3q1nfzckdxmdwrnxw08pprmphc1p33am9v7cwwq2jk";
+    "NNPDF31_nlo_pch_hessian_pdfas" = "0qdswml17bg68y67yw2zbwwp233nxpd1qpc23rqjwyzk2r7qk9bg";
+    "NNPDF31_nlo_pch_pdfas" = "196pcdwsi5p9g88g1c8958qkdj6qmzvl7rsg3j8zll6274m42s4c";
+    "NNPDF31_nlo_pdfas" = "1as7bkp56pwpn2vinxdnhzlnvnxx5ng0mlpmwzz5n7gsinyaz1x9";
+    "NNPDF31_nnlo_as_0108" = "03kg0i43wxf794c4xhvismks6c7nw9hq9ihn58sz628lqcjmsccq";
+    "NNPDF31_nnlo_as_0110" = "04a5gf6nyd58h9sad8zv46vmb074dx7j19r23lbc9w1di23sk104";
+    "NNPDF31_nnlo_as_0112" = "1xkjjm49nlm72f4l3ynrm4g2ayzask22saaf6p1p61lx0jv1hjyd";
+    "NNPDF31_nnlo_as_0114" = "1j4q47qscyw52swmnn0a3lr0avfsjvy20ca50xfhjsvla6wd9lpg";
+    "NNPDF31_nnlo_as_0116" = "1k2d4jzg5jfs6f2mscpvalmh7i5fypx98lnb5wjycprlwd3nr3i9";
+    "NNPDF31_nnlo_as_0117" = "0b6d1xlq4qwjalvrc7ppavw44w5zf0fn3rbsvh3k4qy9r19wk5fb";
+    "NNPDF31_nnlo_as_0118" = "1bw2ksmxdfbwdcimc0ld87hanbqy514sridrcarqwgqh9yv5n0qp";
+    "NNPDF31_nnlo_as_0118_1000" = "026d0xygh046y10jxsfc91hr4qxgark12m393r0afip69dzdsrx0";
+    "NNPDF31_nnlo_as_0118_CMSW1" = "0vqjyziilfzi0gz3a2rv0i6hk3ri3krc2zcdjwfa61z1mg5syi4a";
+    "NNPDF31_nnlo_as_0118_CMSW1_hessian_100" = "1jc8k64pj1mfcw8v9qq9v8m222d09bgfkla7viqzzzbdhy5f6yy1";
+    "NNPDF31_nnlo_as_0118_CMSW2" = "14acp7w3sx5v4ly5wa32vpsk8xw2rh8g5gl7x3f72c0s5jcs4n81";
+    "NNPDF31_nnlo_as_0118_CMSW2_hessian_100" = "0ykaw8x0i6k8vlbms2inm9zm860apsi5mf4wkxha416v4chrpd04";
+    "NNPDF31_nnlo_as_0118_CMSW3" = "1snkandx6apar3sp0c182n770rxn2s64pc07h5k18627cnvpzing";
+    "NNPDF31_nnlo_as_0118_CMSW3_hessian_100" = "03n59yvpgciipkv3k0yr0ab3myhx263n90ah3q3h8hdszkf80ri1";
+    "NNPDF31_nnlo_as_0118_CMSW4" = "1zpnvawdj20izx0mx9a3xz0d0an6i65axbzg5z7fkiq0p09rfx70";
+    "NNPDF31_nnlo_as_0118_CMSW4_hessian_100" = "1qczy2935iq2h4mfq0mv53v2vlfsyvhkff36c5dkdlkrzfkvpl8x";
+    "NNPDF31_nnlo_as_0118_collider" = "1y2axnkjwx7yg301mj1yx1x937j7mhsnbbdpip94pl3vm5hz10dk";
+    "NNPDF31_nnlo_as_0118_hessian" = "0jvzl1bs0mh9c7ypkdgw0s06qn9jkww1d124lc7aq48w1g4n0zyy";
+    "NNPDF31_nnlo_as_0118_luxqed" = "10fwxncr1y7hnja5nxywldpkzrijxz5ayldqjc21jamyhyj3qsh7";
+    "NNPDF31_nnlo_as_0118_mc" = "0sg939j6xn7d5g46547np3123srgz44h9clh29ybl5cnmccv23cl";
+    "NNPDF31_nnlo_as_0118_mc_138" = "1kbxhjzrr4802kcpi7m2g2dx4ywvs9rqjispjwbjc60rqkqispyv";
+    "NNPDF31_nnlo_as_0118_mc_164" = "0i9yxnbps63nz6ala4jk6qmpxlg6p46w6jja8qn73hp0n69w2acz";
+    "NNPDF31_nnlo_as_0118_mc_hessian_pdfas" = "1b9ijn595qfq32yz9rlnn2br7lssbk8ka39ripfcfyf33v9sv460";
+    "NNPDF31_nnlo_as_0118_nf_4" = "0l796ns5xm0biyl0jra5z6y7vddv52v48wlbdywsq54082scfpl0";
+    "NNPDF31_nnlo_as_0118_nf_4_mc_hessian" = "1bw0x75pah1kp387s8m0rv2qc54k5pbncbv507d5278hhfsn68qa";
+    "NNPDF31_nnlo_as_0118_nf_6" = "0dbxxk0p001sk6sb9nf5ipzi39w65vf4c4g8cbhll7p4fqi8f8dy";
+    "NNPDF31_nnlo_as_0118_noLHC" = "18y9mnp1gmvdbikgfdybw8wz2w5x60wk8lya13g7z6nhbfs08qa4";
+    "NNPDF31_nnlo_as_0118_noZpt" = "1jwhkz8b1x6a2qi62jvprcp1rmcq5aq7s31qhw0skcpx8r6r6gnb";
+    "NNPDF31_nnlo_as_0118_nojets" = "1bg714agc25p7zw2yydvl340sns7fhszpbphzap6fc0jsg511zh5";
+    "NNPDF31_nnlo_as_0118_notop" = "1v675r4qk0wz1hg000fw79nmf1zjqi2ghvgjgs7hyzzbh5g4l3ds";
+    "NNPDF31_nnlo_as_0118_proton" = "0ipsp8kk59fb3w9d1y4pq85f4fl6789rypjfbpp44gcy8hzshbm7";
+    "NNPDF31_nnlo_as_0118_wEMC" = "0savd87jahlac4ag3qfamhnpa7mpnm00j104f3ci17gdax1sds50";
+    "NNPDF31_nnlo_as_0119" = "1s7ildlffbh6cpmzlmafxzbbrlgggfqxsv4qic99yvgqvdgqar8w";
+    "NNPDF31_nnlo_as_0120" = "1z6lqcq1dgvqnpwlfymlf9yhcaqc2p8ny7wv4xs57639dsp5xarb";
+    "NNPDF31_nnlo_as_0122" = "0482r1hip6c4kpq24xzi8nw8awky0669k4plgpgv0av12l4bh9c9";
+    "NNPDF31_nnlo_as_0124" = "0cf3djgs4gayzwy8p0qvynripz3hxd3866m8ldlhxnjmcsgcps11";
+    "NNPDF31_nnlo_hessian_pdfas" = "1m5wdnj7hvg2a51w1qmhm934glhjf9db0x5nry5blp90y5x0v185";
+    "NNPDF31_nnlo_pch_as_0116" = "1i8yzqywg4hcf53vcp25fg8llybis3pz6xbp5ajpyjvrvsgii1pc";
+    "NNPDF31_nnlo_pch_as_0118" = "01rsx0ss67772b20dnnw463328pgbd57d8zcj3lqymlb4a6fq8f7";
+    "NNPDF31_nnlo_pch_as_0118_1000" = "187xkvp7y1wssgpb21r1w4yxn6m1280jac9nmiavrma06jfd57c1";
+    "NNPDF31_nnlo_pch_as_0118_hessian" = "0fs5d450hc15hqs6xv9nxfsnhwszmg9ybjypgwa9kn4s4kkaz1wl";
+    "NNPDF31_nnlo_pch_as_0118_mc" = "06vgb01l1yigln7cn9y3lslg35grwvydpd8g04xn4pj4pj2vjrs0";
+    "NNPDF31_nnlo_pch_as_0118_mc_138" = "0za3v1mg8gb631039kg5mkr9zhn390dkyim9p663srpk85j7h5g5";
+    "NNPDF31_nnlo_pch_as_0118_mc_164" = "1xc02sbmhyjr4gjwim4p0gg90zh26zdmnz89395pxzbq2navcraz";
+    "NNPDF31_nnlo_pch_as_0118_nf_3" = "14xb6m1wqc5f7xjiklwnshn7ljrlg6kmbzr2rib44pgbj6pnl2xn";
+    "NNPDF31_nnlo_pch_as_0118_nf_4" = "1sg823n82j9ijqx4ldysh0g53pjzn4sysvag837ywfyns4p5qy9k";
+    "NNPDF31_nnlo_pch_as_0118_nf_6" = "14ls2yd1n2pqvdvq18qmhizms3a8pwqvksdkvwn0m1379lkss106";
+    "NNPDF31_nnlo_pch_as_0120" = "09zc56cmpj9iw0qp2bm9a8d86r0mdagg1vrpf2xqza4fr841r5km";
+    "NNPDF31_nnlo_pch_hessian_pdfas" = "08baysni2lhbpr1scx7h0zf64gyncj2ahcv4y86142gl4zqrafvp";
+    "NNPDF31_nnlo_pch_pdfas" = "09mw3gr7dz0vwdnralaplvlz2c464lmdizf673xsb0wlm12pqf6g";
+    "NNPDF31_nnlo_pdfas" = "0l92q3xhdk5nrnhkmrirxnvplj531rdpnblnacd759cl4hgxcs2q";
+    "NNPDF40_lo_as_01180" = "0m630n5i7s0qnlxzk6ka43qfp6ipz2jgzr7ys42hdb66kg3z5lkc";
+    "NNPDF40_lo_pch_as_01180" = "0wrvmcgdaipi7vy7j85yszaa3c57hs3xll9lfn9cdbjscvmsx6x5";
+    "NNPDF40_nlo_as_01170" = "14j21qryc25k1jk4ypdcr3cgfkhyy4hsb57hy8x5pggfwc2w3f36";
+    "NNPDF40_nlo_as_01180" = "0399bnxvgl2h2ini198jmzjjb179f6dpxfv5x8imlfl515llivx2";
+    "NNPDF40_nlo_as_01180_nf_4" = "01kwziiyg8vbl26znv7khqdckm501d7ccxlkq1y0cd9s1f5ff8xi";
+    "NNPDF40_nlo_as_01180_nf_6" = "1gv8anb3vqpzdymp9g69702x64pbh6l2rn9257hdpz4i4m98rsjy";
+    "NNPDF40_nlo_as_01190" = "0wf8p2i4mxs3hkqvxg1clj082yinbdgccr6qx5kbwkzsck4yybar";
+    "NNPDF40_nlo_nf_4_pdfas" = "1ia9glingyds6bj6yxy867ahriqdhfkxczzc4nki933h6jbj74bf";
+    "NNPDF40_nlo_pch_as_01180" = "0gad0hjq9kwiymc9pljj4z52jsg794m3knb38zj9icgjk0p9lwxm";
+    "NNPDF40_nlo_pch_as_01180_nf_3" = "15j3vvc0vaf13d8cnyr4h7gwb7iznrcajnw59ryx6ksz7cn84sy4";
+    "NNPDF40_nnlo_as_01160" = "0y9115xlg14m1ahfffiam4zp0axga86bhzfxf0xiaxb36yzbmdhw";
+    "NNPDF40_nnlo_as_01170" = "1h6if1zw9dqlfnn7glbl5flj792i7fqiy7pprhwk93k4snh3800i";
+    "NNPDF40_nnlo_as_01175" = "1dkzzhmkmzm92gmb83lyirj3clicrg70h5grzh0j8nfcw0xlz4rm";
+    "NNPDF40_nnlo_as_01180" = "1bhysjkji0k7xy9njarkfvxff05kjl1byhkknxv0875p2znzkpva";
+    "NNPDF40_nnlo_as_01180_1000" = "04yai94qwd7187wg26icwf2wbwi20747l6zikd66ygsz9n34xn9y";
+    "NNPDF40_nnlo_as_01180_hessian" = "0cmpqgaz341hif0gdkzq8mnfh9apxn1zxjwa12fk5svbig9i1a81";
+    "NNPDF40_nnlo_as_01180_nf_4" = "1aj5y3fyvna2jwxbsrgr2cbc452aprxnwv78vh3ph20jlnww20pd";
+    "NNPDF40_nnlo_as_01180_nf_6" = "0bf6s6s0w7l592bm87mazwff05d8s4qlblzl9yj91am3xlv0cvn1";
+    "NNPDF40_nnlo_as_01185" = "0y1xn9qcv2l81sbz9rayzrpd1bjsdyixr42lzfgmqbq45sw2m04n";
+    "NNPDF40_nnlo_as_01190" = "1ibz4yfrw1n8plq4gi03yxi9afaca2yprxfk2y9lvbkycn608d0q";
+    "NNPDF40_nnlo_as_01200" = "1cfcn819aali7ylv9y6yb2ggqy0yghyj0dys9lf9gv5wiqjwh5q2";
+    "NNPDF40_nnlo_hessian_pdfas" = "1b5jvhdk7fmnz8gl38i3408h2qrqcsr7s9v7bh6ilc7x52xsg65k";
+    "NNPDF40_nnlo_nf_4_pdfas" = "1ssp315xcqpc4md5gijbi2c02r6hpazp8yw1661r4m7xy5qm62wc";
+    "NNPDF40_nnlo_pch_as_01180" = "173l2178plrir9fb3bq17l4dw5qfy9clic4m54wqg7y3r71bmv7p";
+    "NNPDF40_nnlo_pch_as_01180_nf_3" = "1mh0pl1f1ayx1fjj0q1fw9s7wc7gmj7a46jli87s4g5nxrhyki9f";
+    "NNPDF40_nnlo_pdfas" = "16d81h0pzxzgwwrfjghmradx4bijf08xbrdn79y9bxf6czacm8n6";
+    "NNPDFpol10_100" = "0r5qfa8cyanalphgjdsh57s3viqv9i10v51p1pyamj1f90gb9pr8";
+    "NNPDFpol11_100" = "0nny1lpw37jcillpfxjx82hq7wlzp4yksxialmc2ivr192qqdda8";
+    "PDF4LHC15_nlo_100" = "0m9d4zy7608iryqy1ypgkr1d3yhw2wv1nrrc70zrfih7x0fp7lz7";
+    "PDF4LHC15_nlo_100_pdfas" = "05wyqyh9y32sxflq69igcnnsl0ifnkyw3vnnnjn6kscl8h8hs7lp";
+    "PDF4LHC15_nlo_30" = "05n0i1mr7v7ssvxvdmv9fn621rinl08frz71apjj7wfdm7s7bk72";
+    "PDF4LHC15_nlo_30_pdfas" = "0xi4xydx0x4ina0wmqv9jf4978xhd8x0l91dwfxh5vy39r5x4lm4";
+    "PDF4LHC15_nlo_asvar" = "14hdgj5g8ia7y6hi40zbh925dacrk7hd6cli6lkhlqzxl755nbs3";
+    "PDF4LHC15_nlo_mc" = "09p7y0z04r6wdkf8gi3yj85qk5hmp0mmhab8c7a7lly4731fyf42";
+    "PDF4LHC15_nlo_mc_pdfas" = "0sds9rkvbjkk7pardwq959qqbrvgwswxmsqcfppky2p0qmdsjs0s";
+    "PDF4LHC15_nlo_nf4_30" = "1ysy6dqlacg4bwb2f16p1aza5gwm9qnhmc0g0mhsdw4d2i4ml5yg";
+    "PDF4LHC15_nnlo_100" = "1gcq3qrf39dhq2pmpjrj3z0i0ycrk76mjdwmgfvzdxysp530ax54";
+    "PDF4LHC15_nnlo_100_pdfas" = "16r8far43ymsd64a4bbqlj56qvbjmcyxbawv4lkfxysjvbydxj4w";
+    "PDF4LHC15_nnlo_30" = "10cm4wa0mk34rnvsr5q8g9w7fs9cblsryms2nl370wdvcrhzsxph";
+    "PDF4LHC15_nnlo_30_pdfas" = "13xln0y8l0qcj9951glj4f1kqfaagj8gwkxzlvdkgjnj1scdy6yj";
+    "PDF4LHC15_nnlo_asvar" = "03fh1jcbmvla7n2jj3zq4ibwvq66h0rniply7h93d94zawcgsy4v";
+    "PDF4LHC15_nnlo_mc" = "0c6nfkv3x1p5iw514knjvqcs1dcaryf74qqg1za8x234yr5ndi3p";
+    "PDF4LHC15_nnlo_mc_pdfas" = "0l8hlcz69cdii7mpgargi9nsx7iy746nad5pnn7pvycrc40marij";
+    "PDF4LHC21_40" = "037bs1l7zr3z8zi6wzh5kxgml84bl64258fr2sm0dzv9yxh8lvp5";
+    "PDF4LHC21_40_nf4" = "0m2ki4qmgl1ggim2inlgynjzqr4ya3qgjph63jf72kia8ks2hfl0";
+    "PDF4LHC21_40_pdfas" = "0pigpix2x2bv1a5ib17zjlfjqygjpjra0pgvmf6knm7mbgwxhqm3";
+    "PDF4LHC21_40_pdfas_nf4" = "0dayiilh94cszqiphr487589qacawfp4za2cngr3da03yg1aswbd";
+    "PDF4LHC21_mc" = "17fbwk7fp2m3fd0xzp94sp7m0mmjmzakg870rbhg8vi88bimmwry";
+    "PDF4LHC21_mc_nf4" = "1n7h45yxw2mwppf6zblc8v415khy9vgrackmbfkm5lb9c79faas6";
+    "PDF4LHC21_mc_pdfas" = "1pn9a7z0xl1bn18z461j90sjglccswimm4p23nyq0fxal5ziidbl";
+    "PDF4LHC21_mc_pdfas_nf4" = "1andl5n1lw5iyd337czph5abd0sqc3l90b21g67af96am5pprcpk";
+    "TUJU19_nlo_119_50" = "1q1dhsxz1kq75rpzv6gg6p6bzvvv0d44pc4y3wsiy9g14aff85vq";
+    "TUJU19_nlo_12_6" = "006j6y4xbjss9apzagjcc3r1z6s61a1hzafhcyriiffqhn8bg50k";
+    "TUJU19_nlo_131_54" = "0ymf35alyar6fwagmdny2zz2aag576f38kail7gh2lvqpmjmv6np";
+    "TUJU19_nlo_197_79" = "0rq57sjcwljz8fz2m5bz0hm1670jp080zawmavmagmzvmyxbpnpj";
+    "TUJU19_nlo_1_1" = "0fp4syfjgl0y58hrr3g515j96yp7ncbrnzj1h7i5h3fphxzayhcz";
+    "TUJU19_nlo_208_82" = "16g5fjpa1r6pml6jnmzikwafdc0vgj8j3b0ivjz0bsqxms66msg9";
+    "TUJU19_nlo_27_13" = "1ffipy7g22mjbhy7wpjipfka84k4iw52bni4gw2a6aan5qljlcii";
+    "TUJU19_nlo_2_1" = "1l17drwy3vv8s7g9fdivxs2z6m88h7fpamnr5y0y6nbkh6bja2s6";
+    "TUJU19_nlo_3_2" = "1qm010yjnj9amj2j89v6s5s42q18q8b6md35c9mbv88ibqbsdnvn";
+    "TUJU19_nlo_40_20" = "0xylrincss1ijkfxnk7hl72c1rzpzm14hcarddh9pd57z7i1gv4c";
+    "TUJU19_nlo_4_2" = "0adqxh47pnhgmq9r89wcqaldfrqll5gpjzqncqd5ba8301i3d98m";
+    "TUJU19_nlo_56_26" = "04q8c3gkbxib5fz20f7rwn33sqapcmsj6fwwihi6ca8n1rl6hw6h";
+    "TUJU19_nlo_64_29" = "1yyl70v8s16s2v630wamyfk8lwdw53cbp5hipgwdw1sfs33pj1mj";
+    "TUJU19_nlo_7_3" = "17qfnf8bv6c5q6xkl68c6n1gxp81gang5w71gvn9m5d6pn2wiicj";
+    "TUJU19_nnlo_119_50" = "186fja2z84csh6zsp0lpy5mch5swmwaf7mvq8kf073jxlrkrws42";
+    "TUJU19_nnlo_12_6" = "0k5q6a8jidhmnjgll1l71dxx85lzd7w4v9bsmi42qladkd71vblv";
+    "TUJU19_nnlo_131_54" = "0inwqb1v390xkjzhc7gy4hng07jzbbhpq99f4zpkzx115xs57l74";
+    "TUJU19_nnlo_197_79" = "09c9b1kqzw28rqgxfxq2mvwna8yb6f2y90332f05jpvfk3mmr7n2";
+    "TUJU19_nnlo_1_1" = "0qmvcbsyi333b9dd42xjdq62a7dfa3hvfcbk48fg4m179mzhp588";
+    "TUJU19_nnlo_208_82" = "1xpwnl342g8ahhp3lm7p2xhzlx5qzhjvz6g1w1nqrd818w3994zn";
+    "TUJU19_nnlo_27_13" = "18fsbp1nh4zx2wgg9r7ian0mvhvf4y8ssqv33vqvn0vwk7gqw7jf";
+    "TUJU19_nnlo_2_1" = "1p0b74w1a9906lqbxbc8dkk5bcdhnbqc82lnhsr4qfi8sxih2l9i";
+    "TUJU19_nnlo_3_2" = "132w4cv8r7958sad6jakfppsywifwzzacsfyn81qvv76xzc2hm3w";
+    "TUJU19_nnlo_40_20" = "0fkbwxh0smj1icjfn58fsfh52ny35pmqjs7cs3qnw6dk5p95qx6k";
+    "TUJU19_nnlo_4_2" = "12vm0dl8ylz38zzi6rsyy24h3yg30nq6l464nl5fr6jdkvkbz2f0";
+    "TUJU19_nnlo_56_26" = "1kqc6v6qq6wl3nls31gn5nrzwfl9kshm2bbak771c3xvjsgvjpdy";
+    "TUJU19_nnlo_64_29" = "166k8swsysr7x5rgivi6k04q4p8njb2ny7xj7xjqhkgxrznc8jzq";
+    "TUJU19_nnlo_7_3" = "0q9vswr0s3k15abghx3cccf1ays0601n1438pwqgd5xz8981ngm5";
+    "abkm09_3_nlo" = "0h268l7j1zkxm2nacari10f86lpha511xhgrg0q9r8hc47sw2vxs";
+    "abkm09_3_nnlo" = "1gzhvblckskscql53pfxp79qclhhhhm45sqjhc9jrm1bp3x52w8i";
+    "abkm09_4_nlo" = "0yq3gy0qgnk5dh0hh3ldrf5bqzx5wpkhw509nvz5arlh0bfwhyg4";
+    "abkm09_4_nnlo" = "1b8470v2n5v87mmhp2dhmfh7iv3280ad67z2vyl0sfv87iic409j";
+    "abkm09_5_nlo" = "1nhck955mw94h3pyhm2vd3q60qxwsmclkfqdscp06fc3avyvrzfv";
+    "abkm09_5_nnlo" = "0wklkcjknn7ys1akg56zxdrkd7ardlc5qnbjq51mva1nf2bxk0np";
+    "abm11_3n_nlo" = "06r54q3ph851a0hyn4di1ifwjmdkdklf3wlsdpz7qn0w4w3xcg29";
+    "abm11_3n_nnlo" = "03rgkj2hyn3zmj8yxllfnc2iqr12j8shjcpdjka33v270lim3gq2";
+    "abm11_4n_nlo" = "02r9ba7rz8f5438rfckzny5amnq9qjgl164x8il6xqh5crxn4vb3";
+    "abm11_4n_nnlo" = "0z6a9wxy6018qm9nyyip9wdq46j7rh2if5xch19h4qx20gx6m48a";
+    "abm11_5n_as_nlo" = "0x2w81w9cz955k9dd45872k98my57w83cjdsv4gvjb64d1hsygzq";
+    "abm11_5n_as_nnlo" = "0091vwjkc686d1dnfn2dpa7jb56p8gli2z687fpx5f8yhjzpbh80";
+    "abm11_5n_nlo" = "1bpf37mg5wgcf1id2am98l5mj162xrnb8k16ppfx3qxlakp0iabl";
+    "abm11_5n_nnlo" = "1mpk322mqs078pk2nxxk8fa29ka6cxzsf65ffiny38678djmfqd2";
+    "abm12lhc_3_nnlo" = "09k90vhjq7p0i0aaq2697pq2dc86bkmnv4q8zyqxjp3wnqx1v95f";
+    "abm12lhc_4_nnlo" = "1hciv1z9b5fiz7swv21gr0rshijj9yj2n8x4l54v9g0jyd061jaz";
+    "abm12lhc_5_nnlo" = "00xxkrhbfkxhg33mkpwwk5nsdp4nmi0zmllx5z5ygxl24rinsq9j";
+    "cteq61" = "14hbc855b3wsjk7ypg86md46cjm1bj7n4hins9nr8kgzs69i6vss";
+    "cteq66" = "09i69ac3gkrai5jmazjyjvi5sl8k2vm48m90ijn6pl24p31qf68y";
+    "cteq6l1" = "1b5m7g7wawk72h76l9yr3gx3n67jggna1004lwffvj43gffwkjap";
+    "nCTEQ15FullNuc_108_54" = "107klcpsr9d4dwavcqqs3849k90mdb3bdjam3pd79cmsy7ncr2hf";
+    "nCTEQ15FullNuc_119_59" = "14az155s3xfl8nscwpajzwj0dy94dadc4qdc64njlg3xlnxsgxy7";
+    "nCTEQ15FullNuc_12_6" = "14z11wyzclx5k6dl46zr0jp6mja178bvd547cqqfy811nbzmmri3";
+    "nCTEQ15FullNuc_131_54" = "1984nphc6sqizaq1c1laphw3hdvkp5k7sy7g563wq18578fifbmk";
+    "nCTEQ15FullNuc_14_7" = "11i2xcd6ncp2aqw3y8pgcp63zkaj383ciwvqpzmjnqraiqqqa77i";
+    "nCTEQ15FullNuc_184_74" = "1m311m5bkzq00qf117dli9xrmcmx8qqh716wff1yj8ri4c4h9m8x";
+    "nCTEQ15FullNuc_197_79" = "0vi29fdxaj7fnpc01k3y2ylb7ngpdnmbnzgxdnr6p9bj5wfa69z5";
+    "nCTEQ15FullNuc_197_98" = "0qjkdfgpbcmwc39wzyfb07wrqnkkwn7v8235y1m25x4wy5bbpjbg";
+    "nCTEQ15FullNuc_1_1" = "0nx1n814mkikd01pxmpndk2qxpwqwd55cbn6z1kgxm8qlhhhd2zw";
+    "nCTEQ15FullNuc_207_103" = "09py38s7shcyy07p5mxfiil5wlxijzbv9k4l3x0g1v191k0vi3m6";
+    "nCTEQ15FullNuc_208_82" = "1c9r5wr43291rw965axdzpshzjhnynsrlf28kfr17v7vpd9dykl4";
+    "nCTEQ15FullNuc_20_10" = "19vhxi7ch9vxa1vyjpxknk69hnnm2n5wpz4qybg1cznk59dvpi28";
+    "nCTEQ15FullNuc_27_13" = "09pflgyxl2ydzrmys7rv0mmvl32z3dmdx63wpilrw592aa70bc2i";
+    "nCTEQ15FullNuc_3_2" = "1l2js36nh4jawwkpiq386blgwbmgi9ccvvzbwq92jb5kpd2fvh7z";
+    "nCTEQ15FullNuc_40_18" = "11pw23fbrz97i9278cxrvc0a4wbdyhz788axq8jn7yka9mg9kch6";
+    "nCTEQ15FullNuc_40_20" = "0raiqn6w90n17irf4l197my77999ygqwhim9lnjqgbn68yjqfqf3";
+    "nCTEQ15FullNuc_4_2" = "0fip3n3pjd94rz3f4gcv2szrx5k72m5b8xcmsgjfd1671r5kmlkd";
+    "nCTEQ15FullNuc_56_26" = "13msj49c1lfisgcigvc4wr32w597jwir8cggrcdq74b0d0ab85ch";
+    "nCTEQ15FullNuc_64_32" = "1spgcb340nz8by8051hngnh6pa1wjf19vi5a40xr8gyprdzhwb4a";
+    "nCTEQ15FullNuc_6_3" = "0v5yabjw3xkjq5c1zjqmj3wwb7yz1blkprxnrpvai54v17w3sk3r";
+    "nCTEQ15FullNuc_7_3" = "1ncarbncfkqk6l3rx3zg34a3sj7mpm2diqsafyldpn92cw66bcs2";
+    "nCTEQ15FullNuc_84_42" = "1z719mcx5lnx2ciwlnxxhgc4s00jrr9sfrxcimh69sj14hmzgx0d";
+    "nCTEQ15FullNuc_9_4" = "180ipb4m2zy54h7n4s0jwqk9k6562bygvnv7mg9dp2f7vf5317a1";
+    "nCTEQ15HIX_108_47" = "0iqv6rsvvr5mqiaddn2cs6psrslw6ncqxca993v0z0hng9ahnnwd";
+    "nCTEQ15HIX_119_50" = "0gxdr596gk69sb76r90p5ksvx9bk4axj21qrsyxjf1bmgdg2rv72";
+    "nCTEQ15HIX_12_6" = "0vkkz3hq0irvfb08cpdijfvv17bcvzaba5c1bf8kwx1i2zl5s6xz";
+    "nCTEQ15HIX_131_54" = "0pbm6390cdglxqzrpl2slv65m943m32i10c49pf70fg68x3l2dff";
+    "nCTEQ15HIX_14_7" = "1yshwpa3zzzmf7s5v3c3130ysm1wciicz202hrraz4px102h8a06";
+    "nCTEQ15HIX_184_74" = "1wy1691pc776kv456cbjl5x5rg2z7cycyfny24caq1qvjifvbr94";
+    "nCTEQ15HIX_197_79" = "0ckbp8cw49ch78q4nsm1fccn6nizpipdp8q85nnipql53xsnr4zm";
+    "nCTEQ15HIX_1_1" = "13sfws9cmrsnp26mx4m2n03gary2m10l67bd8xic8pykgpr8c695";
+    "nCTEQ15HIX_208_82" = "0fqvzpqszkyqb4f2y44hrdj7rvadbqj6y8fzkl9xzk432lalm8w5";
+    "nCTEQ15HIX_27_13" = "0z356q82x6cm52f3qym7vkajlkf2amkz87as0jvfiygvi4gnilcn";
+    "nCTEQ15HIX_2_1" = "117dgz8nx1j64xgqlp40zmgpg0z8b0p1j75d1llvshmksba43avb";
+    "nCTEQ15HIX_3_2" = "1k1hxpcg39hrh629ml2kwnhir6pq41rpic48njq2lagmrcdpbn52";
+    "nCTEQ15HIX_40_20" = "0q1ggww4a5cdf802737kh7igb0br3q50xw205v4b5p7v237wsiym";
+    "nCTEQ15HIX_4_2" = "0n9zf4yxvp3b3ryxbkdw0yilsb21nrjh40ms883d6j42slzhf37f";
+    "nCTEQ15HIX_56_26" = "1z39vjgp6jryvqaxv6jq05jj0lfxsj212g17amch65pgxm4l7cwg";
+    "nCTEQ15HIX_64_29" = "1iy1g1226irrjxz9wwabwd6x0712dm1aap7ka6fy9wwwbn87f6d8";
+    "nCTEQ15HIX_6_3" = "0ljq0h0cdwbfvlpd40v2nypklimw4hh6k999mnyxqfvq47m13ffl";
+    "nCTEQ15HIX_7_3" = "1y9k2snzymzgs26ayfn2c8n6isqzqq14pzf05xvlxmc3k1fbsfyx";
+    "nCTEQ15HIX_84_36" = "130g553b22s7plgy51n56az05v1pnfgrg5knpg1knx8xr8a9xhh5";
+    "nCTEQ15HIX_9_4" = "05igk9g2i1gm7d7npdwd7y3k7xf39scx1mwiw4m39b52kbq7kszp";
+    "nCTEQ15HIX_FullNuc_108_47" = "1h2x2h2n02nwinf8ba3yyqa61384p4g29ib8vnrzwzc7q34940i0";
+    "nCTEQ15HIX_FullNuc_119_50" = "0m5z036py2m1863k62pzysjdr92dhyiwmb8lxgky5skd7514rrsd";
+    "nCTEQ15HIX_FullNuc_12_6" = "13rsl7lczf5qzjgy8m3dp4f1gyib2ffvf86iwci91sq51sma5kk9";
+    "nCTEQ15HIX_FullNuc_131_54" = "1bsi3y6b7sxykwablgghqc89s3vxrvjr9y4bvhwcm21c2i4y6vbp";
+    "nCTEQ15HIX_FullNuc_14_7" = "0w93qfiqdnzvrry9ddpbqcy6y16sszxfmvvgdy6r8i8py8dzfkyr";
+    "nCTEQ15HIX_FullNuc_184_74" = "1q93f9rvlc4z3hzfhdmmxlyqfschrf99a0xyrc78rq1z2pfgmm9b";
+    "nCTEQ15HIX_FullNuc_197_79" = "0kb2lnvh8mq25i5pkfis86ggs0s6hmpmyqqgimhcsamk8xnf2pcv";
+    "nCTEQ15HIX_FullNuc_1_1" = "1nk792chip0iamc6dlqgqqlc2qlxlbgvgnhsvbmzkmmzvp2ji961";
+    "nCTEQ15HIX_FullNuc_208_82" = "1l038nhnwc0pd7sq4yki3sjrrn66bsvqkvba2j3kf4f852gsyswr";
+    "nCTEQ15HIX_FullNuc_27_13" = "1gdb09429xn5n07qqjch9x1cnq4xinf05wla8fsq69qr7bcdq9mp";
+    "nCTEQ15HIX_FullNuc_2_1" = "0fnbpwv8qzgchc2r2gcjgw9yh4r94vm1rzbwj1f6ahbwrsl4rfp3";
+    "nCTEQ15HIX_FullNuc_3_2" = "1r1s7ljwa169nbgc1439cj0gkaqza6ilx3x4gyq2jg9byz30khzx";
+    "nCTEQ15HIX_FullNuc_40_20" = "13p7mnh2h8abih8y24rfapnrsd036pc8xy8qm82j8g4bk0j5jacx";
+    "nCTEQ15HIX_FullNuc_4_2" = "0j1w7d11ybmpfci79lz99i94szxf5xn6z4kxvh8hly3qlcgn636j";
+    "nCTEQ15HIX_FullNuc_56_26" = "08wds8afv0fzlaxck5i2d3pzvi5nqnc1jmq58fpnc7i0g238wl8k";
+    "nCTEQ15HIX_FullNuc_64_29" = "0w4hn5iwqa65lnf6mhihx5qrq4wpcqw04ii3jphy79l58j3i1iam";
+    "nCTEQ15HIX_FullNuc_6_3" = "1ki2cfsg0wmvfkzv2j9akiyl4d4b8v3d6f65iryxakjkhqj6vvgx";
+    "nCTEQ15HIX_FullNuc_7_3" = "14mx5lh278p3zdc572bhxw9sc6n7ga0ak0ch85h3lx9zwg2a1m5i";
+    "nCTEQ15HIX_FullNuc_84_36" = "0hyxyhb2mn64fwmijigw8m3v5zlj52hf2hicvx4gcq0lw063jxj4";
+    "nCTEQ15HIX_FullNuc_9_4" = "17pydzll5lgs974gz4bchl2wxc9ixfpnqjrsidzksl4jf03gn77z";
+    "nCTEQ15WZSIH_108_54" = "02z08pzvl8fa0bi6ddrlbknj0iryimw02r40z0nn7p8xf99qabhz";
+    "nCTEQ15WZSIH_119_59" = "0r03k6j6nd2mvdkidw4gx1xm1s9hil9z5kanxsn2hzp30ab971db";
+    "nCTEQ15WZSIH_12_6" = "00d4lis1qas1k8yzfb3dbqgvy9ynv7h9lx67ys3mj1ws5fqyn5al";
+    "nCTEQ15WZSIH_131_54" = "10frai6qmzvp8xpkanl1qlpnc6chf6k5j70f4pw4abw8ycbjymij";
+    "nCTEQ15WZSIH_14_7" = "02qd5x041p6n8rzv5l446481jb9vkc5nrc018vcg41735azr0d0p";
+    "nCTEQ15WZSIH_16_8" = "164ciyxkrxp33r5nrkl86gq0jvdzm90hf602raamn1b5l5yrnadl";
+    "nCTEQ15WZSIH_184_74" = "00nrwb8q6sa3zwbdc9mx4jz5ndibml84lfz8gad9vhy20zayyh3q";
+    "nCTEQ15WZSIH_197_79" = "03hzr05vhb0l58iv9c2743c688ygagy1bi5a7zqn8nilsmykbvag";
+    "nCTEQ15WZSIH_197_98" = "1mdlhp643z0gkjpj2jdi5zdd4qxxjqsy93rkv69cn1x5abawdl8l";
+    "nCTEQ15WZSIH_1_1" = "13wskph284niaxqx92yaa4jg749ry6y98ds1ifvwc9970iccdnk2";
+    "nCTEQ15WZSIH_207_103" = "0mpc6msqqjbcs756zd426xgzxmmmcmk8cp8wh2mpagib1drrg1x8";
+    "nCTEQ15WZSIH_208_82" = "130bs9y9337pmgwi1ix0ar2xvhfhl4rs0626kbin5yrxhdy7rpha";
+    "nCTEQ15WZSIH_27_13" = "1r01sbzixlrqxkjp9kx3s4zgsd48myivyc70p7ha83i1qrq50g7w";
+    "nCTEQ15WZSIH_2_1" = "1qlh3zxbg13sq187k1fmssan00ifmqr0q2l7i45vc8jz3mk70098";
+    "nCTEQ15WZSIH_3_1" = "057zyvlxz3hwlwgydccl2y124bvc6iwqqgav2jqw0r53a39rc25g";
+    "nCTEQ15WZSIH_40_20" = "11psi56yk2yd75v396j68hfdacsnxvng2bw4v9g4afbjv9697jgr";
+    "nCTEQ15WZSIH_4_2" = "0g4rvlgksw5gf6a7zh7yzsi2sq5jqkwbrx6d7jgz7zpg8jkg4qrz";
+    "nCTEQ15WZSIH_56_26" = "12d0bj92b615kzadxwivp1q0j906m2rlcxfflwgwg21sv9axhi4l";
+    "nCTEQ15WZSIH_56_28" = "12yx9v87y59qf14005fmj55n38xnhlvc7qgcrgfsicmdbx3ncm5x";
+    "nCTEQ15WZSIH_64_32" = "02w3a4sbygc72acxnfc6lhird4nxcgq5dprfldg10h7f9lr7441y";
+    "nCTEQ15WZSIH_6_3" = "05x3cknlnc1kbqnmi3hk6fjgx07dhl7b36rg3abaqn4yg65i79sj";
+    "nCTEQ15WZSIH_7_3" = "0d6cmpv6csysr96knip033mw7sg56ls1gcq8gvz2qy7isj167gx7";
+    "nCTEQ15WZSIH_84_42" = "15zva7n91p6s98kkhcfsvws20s26fl1bvjql8m1n1c2d5pr29wj5";
+    "nCTEQ15WZSIH_9_4" = "04cs89s2m99p31jkc2k4f5i5rr0l4fpa6a41d59zvknhgfy74yvw";
+    "nCTEQ15WZSIH_FullNuc_108_54" = "1wk8vhhlzj3wrb994s66q5zmwxhcy9vxpyks36s3jr5729jxk1j1";
+    "nCTEQ15WZSIH_FullNuc_119_59" = "1rrkj7inah6bg03mmxgza39z40ghdr8km9hy5v5b69bvqcyr42a3";
+    "nCTEQ15WZSIH_FullNuc_12_6" = "14wgacbimifnaji6byq1cds9zz266a63bvv616b0n06391plvzff";
+    "nCTEQ15WZSIH_FullNuc_131_54" = "0k6gncwq4l5avlnr4qpvakklysi6g855yqksylc42ndlgjm4jxfy";
+    "nCTEQ15WZSIH_FullNuc_14_7" = "1mlffwsn3f942flxvvi0rp63xlcrq88ir9vffmkzh3br3qpm4q41";
+    "nCTEQ15WZSIH_FullNuc_16_8" = "1ga0kijnlzjz98j32bakcan89bfhbhq8y08d84d90xpgaqkpb9z2";
+    "nCTEQ15WZSIH_FullNuc_184_74" = "1nhly8065kabzjjkapr75vafx46f1zl21xc6fdcv15a2qwx54n0p";
+    "nCTEQ15WZSIH_FullNuc_197_79" = "0l9c684f427b8hhwm68swh78n6104nbpdxq6v50zipwc6df0j6w9";
+    "nCTEQ15WZSIH_FullNuc_197_98" = "0vc285bd21arpmaykb6baspzr8ak42yx9h4j0sx2vj07l648g5hi";
+    "nCTEQ15WZSIH_FullNuc_1_1" = "13gbjq46f5cdpdr902nxv261hqw041f7ryxbwgvxr3k2zm7h8fw0";
+    "nCTEQ15WZSIH_FullNuc_207_103" = "08m08pcz0f72nd7zcrvi8cl5va49djlvdff1w4is4gmsb44khyv2";
+    "nCTEQ15WZSIH_FullNuc_208_82" = "04x5icmidi1p3j8bdarl3sj0ak6g2ygyc5wmkkn9g80qqn4mxwva";
+    "nCTEQ15WZSIH_FullNuc_27_13" = "0x4iv1kxb5lp514qm1nr3k32m68aw7sgy12nhdjhy2dv018snd8n";
+    "nCTEQ15WZSIH_FullNuc_2_1" = "177qv17wv15sr1zcm2p6av20h32cjkspf4jj3jvvvgvks947n7dl";
+    "nCTEQ15WZSIH_FullNuc_3_1" = "0aawk1ppg3nhl5n6gpdi6l1rw53l2x2sv3fwjz5821b6d7cmb9f6";
+    "nCTEQ15WZSIH_FullNuc_40_20" = "1271dlp580a5gm29sv6b8plpc8d06j57x2xrfjyp7kafxa1158ii";
+    "nCTEQ15WZSIH_FullNuc_4_2" = "0sv20zpzbinrz5biia1g3jzgyq0wbqaqrmrhhcyg2yxg9z48vgca";
+    "nCTEQ15WZSIH_FullNuc_56_26" = "1wz1vwy2q85qz85kdy9gzzhnvv0jy4iazzavf9janz2xzw7833gg";
+    "nCTEQ15WZSIH_FullNuc_56_28" = "01y0f2bz5yxmfd719fq8s1i3q5wb0dd81l0qkllpa961db83zmz2";
+    "nCTEQ15WZSIH_FullNuc_64_32" = "1a93nqx26pj9kyvy66dmm4ib2pl5qwf03420q84zdl1hlcgaszzc";
+    "nCTEQ15WZSIH_FullNuc_6_3" = "157j927a4x53gcam5kmpcpkyk76qgdlszxa4bcj9wlqrygwxsk3k";
+    "nCTEQ15WZSIH_FullNuc_7_3" = "0l369wpd3gcb6i452w2hsjvidz80xl623xf1g1p8d2485nrvh6jm";
+    "nCTEQ15WZSIH_FullNuc_84_42" = "1nikb7yk35s27g43k1wlgcfxqfyjf40csn8a6aiabliqdfjacaqv";
+    "nCTEQ15WZSIH_FullNuc_9_4" = "0nnxf32kllwvm3fyjlswnyjx8cpsanx15qwsn03z6d67wx2f87sw";
+    "nCTEQ15WZ_108_47" = "0v1s95f0wxyz73pfv5z6hc4mslxb7ml6imjmkhn2p9yx5mvk94qf";
+    "nCTEQ15WZ_108_54" = "0zqw1p1sls58v7aacmwamlic0vsjyjijfam6bas5lh92rrmcf9h6";
+    "nCTEQ15WZ_119_50" = "1wwx1rsjhd8rqrvyq68r70issnsby8zrlr8d76br3622mxqr83a7";
+    "nCTEQ15WZ_119_59" = "11hckxdqyfrbsv3lc12q8zjysr2nw9mhx438ff13azp93ha7h1v6";
+    "nCTEQ15WZ_12_6" = "0naqqy223p6gyw2r1qy5fs185dhmxzmb3zmkx3bbccqnspk7qcnz";
+    "nCTEQ15WZ_131_54" = "0fi4sjv7rs90yac1zmnlf38dv5ry9zwzxrjwakpzh00irxw0cz8r";
+    "nCTEQ15WZ_14_7" = "1k4sc588n3rd8fvcvwhxzc405iqj28xzv7y1md45kz1c7m6qy4cj";
+    "nCTEQ15WZ_16_8" = "0ndjlgbggbk3zk5bm9nm726ci1v8b3qfy3gag14jmp7q780zyhmy";
+    "nCTEQ15WZ_184_74" = "08cdkqbjihls2sg4waj9rxg7nvs0mjzxfv3dx1jppiw6f7ljjzrr";
+    "nCTEQ15WZ_197_79" = "0ss7wgvx8rv03x1g10c516i0yd65njc7qjh19maij49aizf1fd4l";
+    "nCTEQ15WZ_197_98" = "0vlyjqlj9plniim0z7mdhia307i296iha94l8b3iqgzyp9553gly";
+    "nCTEQ15WZ_1_0" = "13wnm5sz1sf3hng70j8d3ml53knrx9b7wrg2h6x947jl51flrkh4";
+    "nCTEQ15WZ_1_1" = "0pllq4zdgjaklad9j87vilx8gapzfhjh478gcw479ahgjcbbbxxp";
+    "nCTEQ15WZ_207_103" = "088d8sr9mq9q4bi0ipxznbm3k2b2k347bj9k5fxsb27f4dl5d0jp";
+    "nCTEQ15WZ_207_82" = "0cxagqav2q6kwq83syiad67nmzzkmrg9q0hlshbz6bjlcqmdi4jr";
+    "nCTEQ15WZ_208_82" = "1c7vacsr2m6r7dy1b439c46xgxjqvq1gj9y68p2vargm5az444sz";
+    "nCTEQ15WZ_20_10" = "1y38sqjgsjrfhmyhf688jir2hgkk871sjz8dm89lm5g7m5c1mgmq";
+    "nCTEQ15WZ_27_13" = "0gb2zg5j3jcqjisa3nzsbif4rfi8vshl5vq2vq93d2132qgpzq3l";
+    "nCTEQ15WZ_2_1" = "04nhmrvy2m4a2i8b5qadsg8h51k171df1kb7mdqn3hjzga7lg0j7";
+    "nCTEQ15WZ_3_1" = "00aansn8jjh8yqyhr2fx8h453nahrdf8j1j0qgny1n1mhad4mc56";
+    "nCTEQ15WZ_3_2" = "1pk6gp5a1g15zn5w00l89liz4w7w4xsmpcdk4x50vc7k5phy6vj7";
+    "nCTEQ15WZ_40_18" = "0m58lby911lxqy6rvvs959qg5gjbppnfxl34hn81glc0lr90qiz6";
+    "nCTEQ15WZ_40_20" = "0dnk9yikivxd557bpi9j7dbpwkf4sk49bg8lf0lxf86bdmi2l330";
+    "nCTEQ15WZ_4_2" = "00rr4qwwp7i419sy5wr6f2lz82121ilrvvj0js45bvcqknx26c7i";
+    "nCTEQ15WZ_56_26" = "09qjjavqjwrh9adkz6yhcjjiy55dg6c7imnbsi8qxi8xspz8nqq3";
+    "nCTEQ15WZ_56_28" = "0pdqsrj4dphjb50r3v95wp1drc8rkdgsbisgg430dj9xaa703ijr";
+    "nCTEQ15WZ_64_29" = "1qjvvfzv5nfjp1k1kdv2kz5pjssr2avrnjlxznqvlxwgs7rv8p7v";
+    "nCTEQ15WZ_64_32" = "172whqdyyvqxyr3lijw2v45y8nvc0vk7z47i9xfmcydi2qfz8g3s";
+    "nCTEQ15WZ_6_3" = "0kr0cf8aqwsn4x8kjwihsynvb99i8bdp4g91digbgcfpp02jyvgd";
+    "nCTEQ15WZ_7_3" = "1c76h9xfflfihqyxi9a6dlmg1gwwr2wh93mfac3a3jnx73981gq3";
+    "nCTEQ15WZ_84_36" = "1cvykpl9r41dwahjv3kik98y6sx53wiyyzywqc87mhnlx1x5876f";
+    "nCTEQ15WZ_84_42" = "1jslkk9wc0fzbm6s5czpmaf004pndwc2ggwnxgkga2idn45204xz";
+    "nCTEQ15WZ_9_4" = "0farphic6jyzc5x3ja715wdmvv5rfcgil1c49i8fxqlap5mlgv89";
+    "nCTEQ15WZ_9_4_iso" = "01zxmn50r14n1a5gq75pia8mz4ibyqhyjl5d31kv3h69xgdrlizc";
+    "nCTEQ15WZ_FullNuc_108_47" = "0yl5ll4j3mr6nhiz9ynn9w3hybgwdypg0b8zwsxz1rjcr3c8bmz5";
+    "nCTEQ15WZ_FullNuc_108_54" = "1c8cdilw9n91apqj9lrv9j6hf6mcg3ndndchc96d5svrqlqk4fg6";
+    "nCTEQ15WZ_FullNuc_119_50" = "19lb71cmmi4fvpb0bxmz0ipjlzg6b5hrlwiml4bj5r65km46whyk";
+    "nCTEQ15WZ_FullNuc_119_59" = "0r9cwy2znpl59ynv2av6whjl3igm4b19rzh6sjqsm6a85d5jjdpc";
+    "nCTEQ15WZ_FullNuc_12_6" = "1972j8lziq1ckwq2s7qpcf9g7mg3762kfrnbdjf4ilfw5b2b9i9n";
+    "nCTEQ15WZ_FullNuc_131_54" = "06w9yl6a11ir8qjyxaakyzs8b51hf3jhm8nj5nvrh4f6cicp1g66";
+    "nCTEQ15WZ_FullNuc_14_7" = "095x9pphc9lx71hlhpwcb71p8wx3b1pnv6qd3s6992visismyb02";
+    "nCTEQ15WZ_FullNuc_16_8" = "005h4mbf9c7d9w61pmgghpxb5yh63i6cbyxyylngznbbbaxggjcc";
+    "nCTEQ15WZ_FullNuc_184_74" = "0niyiq85bmbr596gfrsmf79rksql7n2gqdxw72yrki5ywc3iy4sr";
+    "nCTEQ15WZ_FullNuc_197_79" = "0vbgg6m0b1wlrsx2c5xxga0crz0nwvcq9a88f032yjzihh6rscjd";
+    "nCTEQ15WZ_FullNuc_197_98" = "0sf4q5bb4b44zkbxq51pf0xhpldr5dj5d0gqpqs40qkdlmkb9z7k";
+    "nCTEQ15WZ_FullNuc_1_0" = "1il9j3ggn9kc8k8jpql46lw5c9lq45ngaip45vqppgvl3zcrc4fv";
+    "nCTEQ15WZ_FullNuc_1_1" = "0nxvm11qlapnpdkkymqhy86axcvcx84r9hk0dswa2ji5gmk18jww";
+    "nCTEQ15WZ_FullNuc_207_103" = "05qqg6ckkhv30nfbs5rdpiwz7dkgywjrd8a9gr3skvlayj2bisni";
+    "nCTEQ15WZ_FullNuc_207_82" = "0s27py7i2h0va79q9ivmgrpwk5pxrjx9csyad76fc7pmvi4xsgjl";
+    "nCTEQ15WZ_FullNuc_208_82" = "1xygz9px4jwz3vkbx86384775vhiqqv5l2rp2qi42zy8y8ijwaqd";
+    "nCTEQ15WZ_FullNuc_20_10" = "06bgr8r6pz8cpvqbncjaazxw7j2qzhh183brs7r5mi6yckg318gz";
+    "nCTEQ15WZ_FullNuc_27_13" = "1qrs82jscmxyhqkd4fa2kjglzgig23kqwc7r2n8p23352ggcsn9x";
+    "nCTEQ15WZ_FullNuc_2_1" = "0jxam0p1ypd3x8l83d2f14h2av9wk1r69prfhl6pgd6pdh3nx2gh";
+    "nCTEQ15WZ_FullNuc_3_1" = "0kjgsiidi33p442bpp1g6sss62qn4pj90ag4hcmdqsdf5m9vpc5s";
+    "nCTEQ15WZ_FullNuc_3_2" = "0srxdvk5jh4ga4r8hniikzanfa8fh65xc4g51arxwd9sda4n0mqb";
+    "nCTEQ15WZ_FullNuc_40_18" = "1x7d1cpglijq4rag57m8sp6qyzn3c7r3zs5z9jqarsaqc9wv2ypw";
+    "nCTEQ15WZ_FullNuc_40_20" = "1l58bvdhqs9i4mgc39dw9c13rsh5vq5vh6zq8xk35150cbysiwza";
+    "nCTEQ15WZ_FullNuc_4_2" = "0s1zdn5r9hk7bjk2ggn7bhrzq2iaxspdhmwi9rq1xbsk7n8k3wif";
+    "nCTEQ15WZ_FullNuc_56_26" = "15ilca90cvw7p3w1xr15jynqnvnyw8zhpydhyq11x1kc647bgirm";
+    "nCTEQ15WZ_FullNuc_56_28" = "16bs4yq4jr4y3431csabgps6330gcw1ymgm2161z4nmmyp988w1g";
+    "nCTEQ15WZ_FullNuc_64_29" = "17wqyn8g5zbrm6ywvqn2y5kphy9xwbgijwlzxsni5k821nzmjyxn";
+    "nCTEQ15WZ_FullNuc_64_32" = "0ivyka1g2cj6ign8wm28pzim3saas3bvnxqhixxkr91m1gl40b86";
+    "nCTEQ15WZ_FullNuc_6_3" = "00v5wydvrvw1fgbzc436cap7amk8yr7dj5wf3ykyd6415vxmlzl3";
+    "nCTEQ15WZ_FullNuc_7_3" = "06z2p0gx988q5w4d3c0qx6pj7lp6mqlz1qrnwy5lf4i4i4vcqkkx";
+    "nCTEQ15WZ_FullNuc_84_36" = "0rfn82f8f9f6bgngrs67maip2kfhy42i4ppa904d7dspyqkgfa31";
+    "nCTEQ15WZ_FullNuc_84_42" = "14lyhhc5jwccqnz85msaqzdx7cn2vxkvm2l9mf1p2kmgy7p5jis3";
+    "nCTEQ15WZ_FullNuc_9_4" = "1895lr4yydzk4cry5wnjhpl6gs2kcspjlm2mv2y00sb7gzinjs94";
+    "nCTEQ15WZ_FullNuc_9_4_iso" = "0kvjk4wvw98w7y02ishjacn9frncspl6rsxlzcd4y2pdk1ckr29i";
+    "nCTEQ15_108_54" = "1bjx2d61qjhabfx28pfi64hf8br4gl67nzir3ygdpwdcah4k6lz8";
+    "nCTEQ15_119_59" = "0g7wffsyjh84r2wv8w67skx8gwdb3clv9c1dlpijwqmpkcm3b8q5";
+    "nCTEQ15_12_6" = "1xnnqp38zz3b61jb38hz54wv09w06fwwnb66sf93r1agcajvv1vi";
+    "nCTEQ15_131_54" = "062sg81yrrdsc376gpq01xzsb6114sp6814ah9jbrd08qqxh04p2";
+    "nCTEQ15_14_7" = "164p2fhlsmkcc6fibi28lysbfn8q5vds4f0k0kppi96absgrfa70";
+    "nCTEQ15_184_74" = "1zqyvla6dj93cgfjw5z97b6wh6qy8pkrvcbwirjva769210rax75";
+    "nCTEQ15_197_79" = "0mp1gddlwxk2vdyhra5lafvblc82g6n2p19lmjwkmnrmjqdqsz12";
+    "nCTEQ15_197_98" = "0z2ymk9y0syzqj88mnr2kjn104602ajg17s31d9vi29lggy4cn44";
+    "nCTEQ15_1_1" = "14dlybcc038ssv2xbyhing27b9zx07nkqvgf66ysbb83ym5dvibs";
+    "nCTEQ15_207_103" = "1zpxky925n9jssdr036dyax8wxa0d478l4mjl50bjmzqhr8wl7hv";
+    "nCTEQ15_208_82" = "01jf2mrknx5igs0cvhm7xr25gr6z93bvj12cbq53k15fk5niyglv";
+    "nCTEQ15_20_10" = "1vhk2lmpf5kci9173v5qh2gsz7zghvjb11x1mln8yqcdxaq4az8x";
+    "nCTEQ15_27_13" = "1md9xv99m6jcdqldhbbypdix581nmhpyanvr049l5c1a2ab5nbpa";
+    "nCTEQ15_3_2" = "0nq1aj4hxjih4z4xlhjfbza2dp2fyhwbccjgmgh2za5y7rzgz9fk";
+    "nCTEQ15_40_18" = "1gb4kfs207izq4dij9pqbmwm10vx6f1h7pdnf749jysmf6nayndh";
+    "nCTEQ15_40_20" = "0b44nkk315a9zaq3280wmsj67rkxw4jyk9v37s859fikr5v7s0sv";
+    "nCTEQ15_4_2" = "0c8r4vq3phi40v5h4p3nm7by72pz27zqwd67z9slmf1jy1yilnly";
+    "nCTEQ15_56_26" = "0ndyjjh7sxnhkamx182rpax0kcc2iqzwnmh391m5wh629zk0av8i";
+    "nCTEQ15_64_32" = "0ixbr2d30v6slqvp6gpry1159rx5m4hd1msymgli1w9k7pp7xjz5";
+    "nCTEQ15_6_3" = "14ars149pssaiyhaln9zm7vz3wzj2597cy2xasyhlrfqhlgrq056";
+    "nCTEQ15_7_3" = "13b9wbm2hqx4lixq3dad1y3cr6didcch8kg7mqm9lgbism7dwaqw";
+    "nCTEQ15_84_42" = "12vkqpvjjyh0x0hbn7r4gx5za01yqs9a7lqirdxd15k04fp5rnjr";
+    "nCTEQ15_9_4" = "1rkxhxwp0v9dm6f71c5635ihlspfx0sj666maif4iaw1sf4hazln";
+    "nCTEQ15_B_90CL_Au_hess" = "13sdn1ng4nd6935dksk7jin8yilp29zys3d0jvf7m7vx8gyxi187";
+    "nCTEQ15_B_90CL_Pb_hess" = "1j11x8y5sbs5lz4z06wcl702ijvh1bcb4i222jdcq9gh9j40xn17";
+    "nCTEQ15_B_c_90CL_Au_hess" = "0k0pn3yqb632j254h8w9wbdvcasnfxr7d9g47drqw3f4w1as3s16";
+    "nCTEQ15_B_c_90CL_Pb_hess" = "0gvvwnc298qgxhpj4wgnzcrgz0wqlj5r7sfsl1fj21zhm3kc45jl";
+    "nCTEQ15_B_d_90CL_Au_hess" = "0lzfa2gsl5cs2i6y833lhvf2pifzkysj9jgq22v9iyyz5q0nbsh4";
+    "nCTEQ15_B_d_90CL_Pb_hess" = "0zp7dirc2l42f9zjyq1a2qbnir1bbj1firmg3s856mn7sp3p4i0k";
+    "nCTEQ15_B_u_90CL_Au_hess" = "1w2ifnl9waqvsaz1yg696mmqxcijm2bphq8zp3rcbimck3rmr978";
+    "nCTEQ15_B_u_90CL_Pb_hess" = "0j95dg6kyvd30qgivd9495glcd152cr1j3zh1cg76s6sdzfkhvs5";
+    "nCTEQ15_D_90CL_Au_hess" = "0y3n008i22g9ny0v8z6hyc47730xb6qldkpall6p8icn8yzfdga9";
+    "nCTEQ15_D_90CL_Pb_hess" = "0mp1plqxsd6j0ybnf7yrl4hgl68a85q56vdjhs911xah1bgrpix1";
+    "nCTEQ15_D_c_90CL_Au_hess" = "1xk6ngc488n9immd9nbv8ygvxav5n7b7902k44rkxnw42kbx2c4m";
+    "nCTEQ15_D_c_90CL_Pb_hess" = "1ldig46l08n00jvj0dl36jsnpjl2ycv3jdr9d9g375rwgv671kad";
+    "nCTEQ15_D_d_90CL_Au_hess" = "059fz4rfhydnk25hmabavwi346cy2hzxaw2ciq8jx64fmawb3v79";
+    "nCTEQ15_D_d_90CL_Pb_hess" = "0zgs89yjypn2sd97948z2r78sydadivvw6wy7pwi3a5b0yx1zpzn";
+    "nCTEQ15_D_u_90CL_Au_hess" = "0j8sfih3r2wps1l7vapnllh88ibw7672f646m5p67aw5k2an4f8j";
+    "nCTEQ15_D_u_90CL_Pb_hess" = "0d2nxsabard1yq8f2v9a7kwk0fzv549hx1k15k0dfif9523i6xqf";
+    "nCTEQ15_Jpsi_90CL_Au_hess" = "0x75jizpqi8vss62xb2913vdhvckq2b468iqxd0ggr0fic1f8q9a";
+    "nCTEQ15_Jpsi_90CL_Pb_hess" = "09a9s6gmf7q9rk8c88iskra5kxaiz131s5650964znxv29lpzlqm";
+    "nCTEQ15_Jpsi_c_90CL_Au_hess" = "0mh3ikdkca7xc5bc2knjbyr7dkgbydnaa4i1gqln0i29b89j5nw0";
+    "nCTEQ15_Jpsi_c_90CL_Pb_hess" = "1gs39gla77sqgry1799l9kapc1c48pzxgfba6p70fdbwdac45n3j";
+    "nCTEQ15_Jpsi_d_90CL_Au_hess" = "1qn4f4nn8avjrsdqgab25053zadwx7vlr27w8bsmcxg25si104y9";
+    "nCTEQ15_Jpsi_d_90CL_Pb_hess" = "107w4yiv6dl8gqfx0mpbnii06wzf15ih2kqmb8hkmz988x49l65q";
+    "nCTEQ15_Jpsi_u_90CL_Au_hess" = "1mdm8qlzkyzrszsng49ns9hq7zdqaal61vbi64449fkvmxd0a7mk";
+    "nCTEQ15_Jpsi_u_90CL_Pb_hess" = "1y0bcr3g9znjz2c3s4487yjl1ipf0ls05krfpdn8gcsxymf4cirm";
+    "nCTEQ15npFullNuc_108_54" = "1g8id10rpys9566r8h92diqrr43mww6q8nhvlns0kfjkvkr22m9y";
+    "nCTEQ15npFullNuc_119_59" = "0df499pvfls1281zkvngrhicnc0ac0bfwamzs027k7f2y6ygkfb4";
+    "nCTEQ15npFullNuc_12_6" = "0mb3zixcikagsqzpxb7jzrcg05dln37d7anz5359ssjyd6p1mqyi";
+    "nCTEQ15npFullNuc_131_54" = "0i83f1wg81nr742jf9407w7fbknigz6pyx64h7p65x82s4wmj9gf";
+    "nCTEQ15npFullNuc_14_7" = "1k2554rg82msxzkarjx85p6di3kmfqxmbfxpasi1x74laz38663n";
+    "nCTEQ15npFullNuc_184_74" = "1pnl4y2arxf87b1pp95b9jajzlqdyzs7mv82xhmw9fcn9yliy5s0";
+    "nCTEQ15npFullNuc_197_79" = "0d5c6g4185k6pwm5bs5fqlwc97l0gvf6bhk9l8a5vc039dggsgkj";
+    "nCTEQ15npFullNuc_197_98" = "0ql9xnwggsqibld13yisvsdkkymzph8wnqffnxhlyp5digwhl64v";
+    "nCTEQ15npFullNuc_1_1" = "1fq80hzfy16gs00knvl0g0yqrys27vzyk8h5jzs1ra981zgcw1zp";
+    "nCTEQ15npFullNuc_207_103" = "04bg7hnngfsckk92gdrxbrxhsbb1ac1s7dscj7ycdy64fxn4lq8x";
+    "nCTEQ15npFullNuc_208_82" = "0f9ddimq9av2jr3yr15n630bi30bxh5nxrsbrcfw9cx8dwnjscwb";
+    "nCTEQ15npFullNuc_20_10" = "03dv3z7j69l97xacd38wbp7iyyi36g0bbc2xmxhm3l64rjs21bmz";
+    "nCTEQ15npFullNuc_27_13" = "03lb2dznl5dpv0cwsl08dlrh7x26yi9acx3n70imr13gspfxp8ag";
+    "nCTEQ15npFullNuc_3_2" = "0rqjxc8q53jndxjrxd293r1m8gin3vif33jzr35y2ail9bhkjyzp";
+    "nCTEQ15npFullNuc_40_18" = "1827gpzdrxdkg9ikk7pjgv9h983mwzk21p60635l1zhwby5p4mn6";
+    "nCTEQ15npFullNuc_40_20" = "11mjdibgypwpphm1wmf4z311wg4lp37010vwyys8q6d927jzikn2";
+    "nCTEQ15npFullNuc_4_2" = "12gx03drv7hnmsgk6sni7mc7c4rbpag5gn2czyha1n19v13rry93";
+    "nCTEQ15npFullNuc_56_26" = "1hq6qv19gqzjv57msdajb9kc0lv5jvl3b6x2fc905lg0dc7h2ab5";
+    "nCTEQ15npFullNuc_64_32" = "15gq3l91p69dba5gfxvh7j4npwl7rwkakjnsv9lx84hvys7hgba9";
+    "nCTEQ15npFullNuc_6_3" = "1gcxs7vcjcdyniczd1rprvzlc1p9yf08sy1fcrny2jfbxkfndqwx";
+    "nCTEQ15npFullNuc_7_3" = "09kwf5kbshw4pwh6iilqy1mzgvlg83jhakmvvgz27f569f20ci68";
+    "nCTEQ15npFullNuc_84_42" = "0ah349jih2ia0x14mnrygzzw38prfgcmbxyw1hdvzqvgk73wazwa";
+    "nCTEQ15npFullNuc_9_4" = "0gsh5jmyn7jlasp9ixx7imvkbp5rxmvfa480vy0bnxwjwz0924ia";
+    "nCTEQ15np_108_54" = "16hsl5ihcbx7wvrabrff5h422zfhlfrpskn5dy8s1phhla4r4ff3";
+    "nCTEQ15np_119_59" = "1bwhbfhw5xyb1dm18vxm095l1d9l9v0yl072qdbb6z9l29pa71dp";
+    "nCTEQ15np_12_6" = "0zv9g7r648f1h1f9qifii0mk2afdvphbfib3hp2sf960zb0d0nsv";
+    "nCTEQ15np_131_54" = "19sn6ig1c5smxi845qyflrrqaivm4pphwbxpz2zd9r0qhn032mlm";
+    "nCTEQ15np_14_7" = "07pyaik3h2yi05hn49fv3x191i4x6429bb6kywy999bzfrkjndcp";
+    "nCTEQ15np_184_74" = "1s2vmirmi1npw3pkxpzxjf9i69gmrl1dqrm2s0cfzl6286h87scb";
+    "nCTEQ15np_197_79" = "0p7lnffr4gy8qad8nsm6qfaw05s9pndkw0n9yb6v5i6mqg0j3cgd";
+    "nCTEQ15np_197_98" = "0vmjvjqkdn5cixsnvl9lvg07lrq17yw5pf2mdbzkrrfblqki6g0x";
+    "nCTEQ15np_1_1" = "1fndfff1lialb2qy08qp44w4605j9c2acrwpdb16k3awj88kx7mf";
+    "nCTEQ15np_207_103" = "1fcaw2hqxnzhs9glrh9lxvpfh0sn3mwahgd8d7hnfikrw93v0sbz";
+    "nCTEQ15np_208_82" = "0glf5nw1mr42icmbcjliz627nlsb7a5hyp591ng9y7dh41hxr01w";
+    "nCTEQ15np_20_10" = "1ka5hnq9cmr4l12ajmw4fpgdzcf0pjlw2pk4lkw6ai1h5h5absa5";
+    "nCTEQ15np_27_13" = "02dmzdqqh58h7232s2hcjnpd76rll8vxynq1bx059mvxak5lr5kw";
+    "nCTEQ15np_3_2" = "0jxg5f5n4yp4zbdkm9y7xd40m89pbw5687hz7mylpn9n3phsi58y";
+    "nCTEQ15np_40_18" = "0yp65xq318qw6xh3wm0n4s4a3s4ahvl14kq3cmwq9b954c5a5vkl";
+    "nCTEQ15np_40_20" = "1c367xb361p5mdwyda5iwswg7wb6s6gjibdv27n2kq41p1qp41y0";
+    "nCTEQ15np_4_2" = "04q9gq8163lhfjrrp0ysqyb5sx2nkw5mpz70daqnxvybavbkg7mm";
+    "nCTEQ15np_56_26" = "1qgh3g6xwk9jc6sd7kjj89w8mr89bhpdaiml5g7lvdqn39l95ng6";
+    "nCTEQ15np_64_32" = "02966xmh15i7kg9iif19p5c27rv369yikpm1xqclf8dz45a7xsry";
+    "nCTEQ15np_6_3" = "1rr7wr9wwsjfgnrnfvm7nrplhb38zym6qiyg2sagq7saw6kqpprz";
+    "nCTEQ15np_7_3" = "0ndqi05g88b769p1chfc6maz6wvs33rx45r4k8f68n79yy6kvrh1";
+    "nCTEQ15np_84_42" = "0v968jw1m9ky1mh82w1bjidvg7r7cx23bnpv0vr4c1kqz0n5hb5s";
+    "nCTEQ15np_9_4" = "0akxbyrs4y8gmnjiwma8z8ryrzmaw6dj148iq7ihsllwar3hp3p0";
+    "nNNPDF10_nlo_as_0118_Ag108" = "1xqhzgvkicxd9wy4lnhqw6brsksxqsq429r6bb0ghn1ll5ln4qzx";
+    "nNNPDF10_nlo_as_0118_Al27" = "0z836h7a5abbwq988zdvvf8yhr92krzzmys6lkkgkcffdf2pc0zq";
+    "nNNPDF10_nlo_as_0118_Au197" = "1f6vn6n0zz8wml8zn7n2n6wj5y41yanw9b9av51m5kiq4n1r9lrk";
+    "nNNPDF10_nlo_as_0118_Be9" = "1jy2cix4gkx648dypdqfj7xi8gdlflh20xlasmwl78av5j7s7rs5";
+    "nNNPDF10_nlo_as_0118_C12" = "1c6fvp82cs3464akqf0skrqpcvyp75yqp39zxafzgbqd4wc3pv9f";
+    "nNNPDF10_nlo_as_0118_Ca40" = "0r903a01085yhfagnljvjaqfn190r3q0ggvx87kh54xsbv1wkvbl";
+    "nNNPDF10_nlo_as_0118_Cu64" = "1vq8a6drcp606fkx8mml2qq37if59cakmcq73y4n7c7swp6q51r3";
+    "nNNPDF10_nlo_as_0118_D2" = "07kjzhyh6n6723h2fylgwm7w7ljxz4m6fs9bgwjxp987i00msrra";
+    "nNNPDF10_nlo_as_0118_Fe56" = "1smkjmymykhlp0vvlpsp6p6p44pw5aa705sw9lcyxmg8ccy9kmpj";
+    "nNNPDF10_nlo_as_0118_He4" = "0mdxsh41m0vzcdq4axvz81m9ra0p6dff88k09gjb4adx9vv52mjc";
+    "nNNPDF10_nlo_as_0118_Li6" = "1hrryxhhg9xxg817brrd39k5wz6iq1fv6z8sdabrpxn0nwr1bj7r";
+    "nNNPDF10_nlo_as_0118_N1" = "01h7g4w3nc09jyi7g8j5yx2yzqair3ysbx9rx244k1rjx6jppian";
+    "nNNPDF10_nlo_as_0118_N14" = "1ny3znivkkl7xhdw8pxkdadwc957236rh60wviiyw4cdqjb6a3iq";
+    "nNNPDF10_nlo_as_0118_Pb208" = "066w59xm6lkwrm3glssc6n3qyvv38mx47mkx39p8z9r2spb8igks";
+    "nNNPDF10_nlo_as_0118_Sn119" = "1mqx7wj095v0799wxbvfxvb6bl1qh5wdkf14a8gqsj0f5qjnpmyw";
+    "nNNPDF10_nlo_as_0118_Xe131" = "0mz9fgxfyx1asi2vxs1xfwn8z51z08naiq1ycl77f4yp6wim6s54";
+    "nNNPDF10_nnlo_as_0118_Ag108" = "08vy16fskrvc62y3h0hsikmi6q86njwfm2msmajxbd7vzcv5wkkn";
+    "nNNPDF10_nnlo_as_0118_Al27" = "0vm95lawgsncsx10ypy99746sz34y6shblkj9pgn6si2cy8gpcwp";
+    "nNNPDF10_nnlo_as_0118_Au197" = "0b3ld033f2hwjaqp5p5pzmmzfid8hl416a1q8fc0zmd2lfiamsac";
+    "nNNPDF10_nnlo_as_0118_Be9" = "10skffir8hqfv2wj01ghc14lfs516kmh59q3v48nw3a724kxr93a";
+    "nNNPDF10_nnlo_as_0118_C12" = "12rrpcq9bvwcncj1hk28wkym5zzdjkf0d0pdj1nx9asm6vpbjsdv";
+    "nNNPDF10_nnlo_as_0118_Ca40" = "0k914fnqsv45f16s6zmdwbnbnhj5lxnrk9pbnnaap4vk7vx7101j";
+    "nNNPDF10_nnlo_as_0118_Cu64" = "137n1nsq75g0n4hmbqfl1gihngfrz0rqd2gwj24m5byhbylwlg83";
+    "nNNPDF10_nnlo_as_0118_D2" = "0xa17gjjh0mphg1h711vb6p2pjln0lqy7401lamnib2z7p7mss0m";
+    "nNNPDF10_nnlo_as_0118_Fe56" = "0h0qwbckdcppqgbhfy3kyy9p4nryh3p45sjmlxhm94mlznipjwrd";
+    "nNNPDF10_nnlo_as_0118_He4" = "022h44i8k2ybvm9lkgc4lkcv4z7r0xzlrq2bxyqkfmpp5fpp7gkw";
+    "nNNPDF10_nnlo_as_0118_Li6" = "11bci8mnv57a583ayrpvvnz4lsxz43z23iqgqjc3b3rychgiz57a";
+    "nNNPDF10_nnlo_as_0118_N1" = "174gscxa2acqpgf2mks5xpim1jcpb0vg76pggxazm376vyyjk883";
+    "nNNPDF10_nnlo_as_0118_N14" = "1g2gwnbfzlfa094px1rnjgk8py8qzwq7bi68n7p49bqjj88km3av";
+    "nNNPDF10_nnlo_as_0118_Pb208" = "0bdi3z36ckf788v3ld3ngvchyxzsxcfl9fj7rzs2lwkg80rclgd9";
+    "nNNPDF10_nnlo_as_0118_Sn119" = "0k7lnr1ils38sqybipmf13n582wb0cf9rr288ibrbmx15rkk5c3w";
+    "nNNPDF10_nnlo_as_0118_Xe131" = "17k1afk6j53nl83ixyy6nyds3wy5agacdyn62bwp7ykfs8x97s4n";
+    "nNNPDF20_nlo_as_0118_Ag108" = "1fb2h6752vn0v66h12dhhk2izxjs4b10mdqx17djrvpkzl97hf8d";
+    "nNNPDF20_nlo_as_0118_Al27" = "1lfkg84hf0chgk0qzp45ch23pzjixkzxxh3x7xphcmnpri4cgl3r";
+    "nNNPDF20_nlo_as_0118_Au197" = "08ll61b96iggm1qnr9q2qdzyxasxn9mlshnxz7kzigfsnqqnkfbw";
+    "nNNPDF20_nlo_as_0118_Be9" = "1g4vlr9p6i6n87bx6w2i5d4qkhymldkyxj1i2qnl8v467vhsz6la";
+    "nNNPDF20_nlo_as_0118_C12" = "15366p04rh31nnd6zxcmcs9ki5fwzn8d8cvzms45apnw928k6pqn";
+    "nNNPDF20_nlo_as_0118_Ca40" = "1abxkr4r5psi6n8rrsbf97gwwkh1dg9jqfd46hn2725r22c6k8l4";
+    "nNNPDF20_nlo_as_0118_Cu64" = "1nkkiwx22b649pmyfykn2ggdq99y985mnkv3fnkm8i43scwbswvb";
+    "nNNPDF20_nlo_as_0118_D2" = "0gvf9qqgr4ixm9cf2654xyvkc624k5ijqwdds61frljlhd49yqm1";
+    "nNNPDF20_nlo_as_0118_Fe56" = "1ci132hc8mpsj0zjr9fichnkapagjs6q9pqli0yzgnnv6l2aih3a";
+    "nNNPDF20_nlo_as_0118_He4" = "1phq7m6lbx87s4whs2xygigq7fz1qhzj3nd9anx5r67w7q99rcad";
+    "nNNPDF20_nlo_as_0118_Li6" = "0pwdqrmivpm0j7hrg6h2qqshpna2vjlslxnz0sd100kc3lfq7xab";
+    "nNNPDF20_nlo_as_0118_N1" = "09y7pd3nnys49w25gb4524x5xkahillvaypjgncbn8n5x1a11nsr";
+    "nNNPDF20_nlo_as_0118_N14" = "0nb3kcmhbyncp9frs27ww550mjl3f7yiahyyrm3aik93ycpm16n7";
+    "nNNPDF20_nlo_as_0118_O16" = "1wmi63l6cpj3nx0vwiqaa1pfw0im5ps96g7842428skzrg0q4yx3";
+    "nNNPDF20_nlo_as_0118_Pb208" = "1rwb7vca0y1aj38mz8m3wg07q9hq66qd5j3y6hs9bh0jz6hkifzh";
+    "nNNPDF20_nlo_as_0118_Sn119" = "1dan86ckd5padipp4x12x8msfg5p97b8hwxm78gfyf88kq725m6z";
+    "nNNPDF20_nlo_as_0118_W184" = "0wzd8vw2svf3mzpyy1wryr5jz3anhykp5z3cx4hdljprws2b8nll";
+    "nNNPDF20_nlo_as_0118_Xe131" = "1a62qi3qy5kli9q80p2w80mj5v3ps2g6p40zxlgm65q5mphkx1qi";
+    "nNNPDF30_nlo_as_0118_A108_Z54" = "0n67w44rmz5s6cg2h58d8sf51dsfd0i5g09dh08mgfcn640bqlqw";
+    "nNNPDF30_nlo_as_0118_A119_Z59" = "1zj5gn5021ig0j6p7jpyy683avg0890blmr90yjm6skqzxfjq48i";
+    "nNNPDF30_nlo_as_0118_A12_Z6" = "0jvaq9a1w19dybv2hzvn8swk4i4z16lab9yfhbywq0vixyfn1swd";
+    "nNNPDF30_nlo_as_0118_A131_Z54" = "01mcqnixjw5m9di508aq8fp74f3aqnvhc1bjirfvi3ca0jz0c1jz";
+    "nNNPDF30_nlo_as_0118_A14_Z7" = "0hqpni9fxbf5qfamcirglr04cbwx58pwylqh8hqm3vc03ap3nmjd";
+    "nNNPDF30_nlo_as_0118_A16_Z8" = "0f0h3hckxg4xgfd6ldblavhcidzdy2b5660a5nvv96y63sdsx2x4";
+    "nNNPDF30_nlo_as_0118_A184_Z74" = "01jsbla72c3b6gbc7w4nx5bb5ws3g864avznb9vxmmk3prib7n8x";
+    "nNNPDF30_nlo_as_0118_A197_Z79" = "1gm7nx0cn3lmjlsy6c7dr5vzyfmi1fcdib9656d4039m0ningrhg";
+    "nNNPDF30_nlo_as_0118_A208_Z82" = "0r1spnj4qmjwpjybqv9aa6w3wybvgk4qzivzwz4s9bacz0kb3z4n";
+    "nNNPDF30_nlo_as_0118_A27_Z13" = "17vmr3pwjp1prb83yngada7sw8553sv39dnncksabnklfp1l5x59";
+    "nNNPDF30_nlo_as_0118_A2_Z1" = "1g97mc7c14hnkfsfvg4n9jmb4l461i9lka643s626hw0gcq053f5";
+    "nNNPDF30_nlo_as_0118_A31_Z15" = "0h5rx9113yq6jw1l2alwyvw77vv733y5mcpa3m9773s7y61w3fpk";
+    "nNNPDF30_nlo_as_0118_A40_Z20" = "1937kk4039hi9cslw4417174s83rs4n9vm16ay70pp1c8bcqzp6l";
+    "nNNPDF30_nlo_as_0118_A4_Z2" = "147npkmbvzk6j95hnnil6jafc2gxjqavaawl9cilr93f9h64w54w";
+    "nNNPDF30_nlo_as_0118_A56_Z26" = "06dxsapqirmajh107j24b3w2nhqz39gs9c2pglq71fc53i0fra5a";
+    "nNNPDF30_nlo_as_0118_A64_Z29" = "1drvfd3i1drrb15m3vk9sm2lzx2x01da44gdq3wbc90nxvzc7d56";
+    "nNNPDF30_nlo_as_0118_A6_Z3" = "0zp1cixj6ixayzdra2i5qyfn2b6y6qfxd5d1l101n8sgf4bdh6fb";
+    "nNNPDF30_nlo_as_0118_A9_Z4" = "07i30jk29cgdbdk4n5acdki5aihaki5w0mqibjww1hy7mwh4y45w";
+    "nNNPDF30_nlo_as_0118_p" = "0k4bs4zhlm7l14mbd2q9n0n7rdnpqwgnfwj289ql62v3kh8mnn18";
+    "xFitterPI_NLO_EIG" = "1v6mfhmcrmdvica0wlc2ilfca1srxc7vjyli113wjvpd7wfpnvj5";
+    "xFitterPI_NLO_VAR" = "09mlsww89hhm2s96rlkqbkfwwf9qkblw7n3nnrgas6l1kn2hxq1i";
+  }
diff --git a/nixpkgs/pkgs/development/libraries/physics/lhapdf/pdfset-hook.sh b/nixpkgs/pkgs/development/libraries/physics/lhapdf/pdfset-hook.sh
new file mode 100644
index 000000000000..c499d370d866
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/lhapdf/pdfset-hook.sh
@@ -0,0 +1,5 @@
+@name@ () {
+  addToSearchPath LHAPDF_DATA_PATH "@out@"
+}
+
+postHooks+=(@name@)
diff --git a/nixpkgs/pkgs/development/libraries/physics/mela/default.nix b/nixpkgs/pkgs/development/libraries/physics/mela/default.nix
new file mode 100644
index 000000000000..e48a2f4638bc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/mela/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, gfortran }:
+
+stdenv.mkDerivation rec {
+  pname = "mela";
+  version = "2.0.1";
+
+  src = fetchFromGitHub {
+    owner = "vbertone";
+    repo = "MELA";
+    rev = version;
+    sha256 = "01sgd4mwx4n58x95brphp4dskqkkx8434bvsr38r5drg9na5nc9y";
+  };
+
+  nativeBuildInputs = [ gfortran ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "a Mellin Evolution LibrAry";
+    license     = licenses.gpl3;
+    homepage    = "https://github.com/vbertone/MELA";
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ veprbl ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/physics/nlojet/default.nix b/nixpkgs/pkgs/development/libraries/physics/nlojet/default.nix
new file mode 100644
index 000000000000..c477f98ae7b9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/nlojet/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "nlojet++";
+  version = "4.1.3";
+
+  src = fetchurl {
+    url = "https://desy.de/~znagy/hep-programs/nlojet++/nlojet++-${version}.tar.gz";
+    sha256 = "18qfn5kjzvnyh29x40zm2maqzfmrnay9r58n8pfpq5lcphdhhv8p";
+  };
+
+  patches = [
+    ./nlojet_clang_fix.patch
+  ];
+
+  # error: no member named 'finite' in the global namespace; did you mean simply 'finite'?
+  env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) "-Dfinite=isfinite";
+
+  meta = {
+    homepage    = "http://www.desy.de/~znagy/Site/NLOJet++.html";
+    license     = lib.licenses.gpl2;
+    description = "Implementation of calculation of the hadron jet cross sections";
+    platforms   = lib.platforms.unix;
+    maintainers = with lib.maintainers; [ veprbl ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/physics/nlojet/nlojet_clang_fix.patch b/nixpkgs/pkgs/development/libraries/physics/nlojet/nlojet_clang_fix.patch
new file mode 100644
index 000000000000..917c57e8cb47
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/nlojet/nlojet_clang_fix.patch
@@ -0,0 +1,30 @@
+diff -rupN nlojet++-4.1.3-orig/nlo-hep/hep-lorentz/bits/hep-lorentzvector_complex.h nlojet++-4.1.3/nlo-hep/hep-lorentz/bits/hep-lorentzvector_complex.h
+--- nlojet++-4.1.3-orig/nlo-hep/hep-lorentz/bits/hep-lorentzvector_complex.h	2010-05-11 11:06:00.000000000 -0400
++++ nlojet++-4.1.3/nlo-hep/hep-lorentz/bits/hep-lorentzvector_complex.h	2014-08-23 03:22:51.000000000 -0400
+@@ -26,8 +26,11 @@
+ namespace nlo {
+ 
+   //   Spacializations
++  template<>
+   class lorentzvector<std::complex<float> >;
++  template<>
+   class lorentzvector<std::complex<double> >;
++  template<>
+   class lorentzvector<std::complex<long double> >;
+   
+   template<>
+diff -rupN nlojet++-4.1.3-orig/nlo-hep/hep-lorentz/bits/hep-threevector_complex.h nlojet++-4.1.3/nlo-hep/hep-lorentz/bits/hep-threevector_complex.h
+--- nlojet++-4.1.3-orig/nlo-hep/hep-lorentz/bits/hep-threevector_complex.h	2010-05-11 11:06:00.000000000 -0400
++++ nlojet++-4.1.3/nlo-hep/hep-lorentz/bits/hep-threevector_complex.h	2014-08-23 03:23:09.000000000 -0400
+@@ -26,8 +26,11 @@
+ namespace nlo {
+   
+   //    Specializations
++  template<>
+   class threevector<std::complex<float> >;
++  template<>
+   class threevector<std::complex<double> >;
++  template<>
+   class threevector<std::complex<long double> >;
+   
+   template<>
diff --git a/nixpkgs/pkgs/development/libraries/physics/pythia/default.nix b/nixpkgs/pkgs/development/libraries/physics/pythia/default.nix
new file mode 100644
index 000000000000..917dbf40a37d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/pythia/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchurl, boost, fastjet, fixDarwinDylibNames, hepmc, lhapdf, rsync, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "pythia";
+  version = "8.310";
+
+  src = fetchurl {
+    url = "https://pythia.org/download/pythia83/pythia${builtins.replaceStrings ["."] [""] version}.tgz";
+    sha256 = "sha256-kMgRq+ej0v/b+bSuq1HPbgpai++04++oBvPVucMR4ic=";
+  };
+
+  nativeBuildInputs = [ rsync ]
+    ++ lib.optionals stdenv.isDarwin [ fixDarwinDylibNames ];
+  buildInputs = [ boost fastjet hepmc zlib lhapdf ];
+
+  configureFlags = [
+    "--enable-shared"
+    "--with-lhapdf6=${lhapdf}"
+  ] ++ (if lib.versions.major hepmc.version == "3" then [
+    "--with-hepmc3=${hepmc}"
+  ] else [
+    "--with-hepmc2=${hepmc}"
+  ]);
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "A program for the generation of high-energy physics events";
+    license = licenses.gpl2Only;
+    homepage = "https://pythia.org";
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ veprbl ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/physics/qcdnum/default.nix b/nixpkgs/pkgs/development/libraries/physics/qcdnum/default.nix
new file mode 100644
index 000000000000..e25b98498ddb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/qcdnum/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl, gfortran, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "QCDNUM";
+  version = "18-00-00";
+
+  src = fetchurl {
+    url = "http://www.nikhef.nl/user/h24/qcdnum-files/download/qcdnum${builtins.replaceStrings ["-"] [""] version}.tar.gz";
+    hash = "sha256-4Qj5JreEA1LkCAunGRTTQD7YEYNk+HcQ4iH97DIO4gA=";
+  };
+
+  nativeBuildInputs = [ gfortran ];
+  buildInputs = [ zlib ];
+
+  FFLAGS = [
+    "-std=legacy" # fix build with gfortran 10
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "A very fast QCD evolution program written in FORTRAN77";
+    license     = lib.licenses.gpl3;
+    homepage    = "https://www.nikhef.nl/~h24/qcdnum/index.html";
+    platforms   = lib.platforms.unix;
+    maintainers = with lib.maintainers; [ veprbl ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/physics/rivet/default.nix b/nixpkgs/pkgs/development/libraries/physics/rivet/default.nix
new file mode 100644
index 000000000000..76a4d71b38e4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/rivet/default.nix
@@ -0,0 +1,81 @@
+{ lib, stdenv, fetchurl, fetchpatch, fastjet, fastjet-contrib, ghostscript, hepmc, imagemagick, less, python3, rsync, texliveBasic, yoda, which, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  pname = "rivet";
+  version = "3.1.9";
+
+  src = fetchurl {
+    url = "https://www.hepforge.org/archive/rivet/Rivet-${version}.tar.bz2";
+    hash = "sha256-9lMgRdph7rKtwgqavEFmtLLUGrLByltQDNYWuxuS57E=";
+  };
+
+  latex = texliveBasic.withPackages (ps: with ps; [
+    collection-pstricks
+    collection-fontsrecommended
+    l3kernel
+    l3packages
+    mathastext
+    pgf
+    relsize
+    sansmath
+    sfmath
+    siunitx
+    xcolor
+    xkeyval
+    xstring
+  ]);
+
+  nativeBuildInputs = [ rsync makeWrapper ];
+  buildInputs = [ hepmc imagemagick python3 latex python3.pkgs.yoda ];
+  propagatedBuildInputs = [ fastjet fastjet-contrib ];
+
+  preConfigure = ''
+    substituteInPlace bin/rivet-build.in \
+      --replace 'num_jobs=$(getconf _NPROCESSORS_ONLN)' 'num_jobs=''${NIX_BUILD_CORES:-$(getconf _NPROCESSORS_ONLN)}' \
+      --replace 'which' '"${which}/bin/which"' \
+      --replace 'mycxx=' 'mycxx=${stdenv.cc}/bin/${if stdenv.cc.isClang or false then "clang++" else "g++"}  #' \
+      --replace 'mycxxflags="' "mycxxflags=\"$NIX_CFLAGS_COMPILE $NIX_CXXSTDLIB_COMPILE $NIX_CFLAGS_LINK "
+  '';
+
+  preInstall = ''
+    substituteInPlace bin/make-plots \
+      --replace '"which"' '"${which}/bin/which"' \
+      --replace '"latex"' '"'$latex'/bin/latex"' \
+      --replace '"dvips"' '"'$latex'/bin/dvips"' \
+      --replace '"ps2pdf"' '"${ghostscript}/bin/ps2pdf"' \
+      --replace '"ps2eps"' '"${ghostscript}/bin/ps2eps"' \
+      --replace '"kpsewhich"' '"'$latex'/bin/kpsewhich"' \
+      --replace '"convert"' '"${imagemagick.out}/bin/convert"'
+    substituteInPlace bin/rivet \
+      --replace '"less"' '"${less}/bin/less"'
+    substituteInPlace bin/rivet-mkhtml \
+      --replace '"make-plots"' \"$out/bin/make-plots\" \
+      --replace '"rivet-cmphistos"' \"$out/bin/rivet-cmphistos\" \
+      --replace 'ch_cmd = [sys.executable, os.path.join(os.path.dirname(__file__),' 'ch_cmd = [('
+  '';
+
+  configureFlags = [
+    "--with-fastjet=${fastjet}"
+    "--with-yoda=${yoda}"
+  ] ++ (if lib.versions.major hepmc.version == "3" then [
+    "--with-hepmc3=${hepmc}"
+  ] else [
+    "--with-hepmc=${hepmc}"
+  ]);
+
+  enableParallelBuilding = true;
+
+  postInstall = ''
+    for prog in "$out"/bin/*; do
+      wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out")
+    done
+  '';
+
+  meta = with lib; {
+    description = "A framework for comparison of experimental measurements from high-energy particle colliders to theory predictions";
+    license     = licenses.gpl3;
+    homepage    = "https://rivet.hepforge.org";
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ veprbl ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/physics/thepeg/default.nix b/nixpkgs/pkgs/development/libraries/physics/thepeg/default.nix
new file mode 100644
index 000000000000..b55d6869e4da
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/thepeg/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchurl, autoreconfHook, boost, fastjet, gsl, hepmc2, lhapdf, rivet, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "thepeg";
+  version = "2.3.0";
+
+  src = fetchurl {
+    url = "https://www.hepforge.org/archive/thepeg/ThePEG-${version}.tar.bz2";
+    hash = "sha256-rDWXmuicKWCMqSwVakn/aKrOeloSoMkvCgGoM9LTRXI=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  buildInputs = [ boost fastjet gsl hepmc2 lhapdf rivet zlib ];
+
+  configureFlags = [
+    "--with-hepmc=${hepmc2}"
+    "--with-rivet=${rivet}"
+    "--without-javagui"
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Toolkit for High Energy Physics Event Generation";
+    homepage = "https://herwig.hepforge.org/";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ veprbl ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/physics/yoda/default.nix b/nixpkgs/pkgs/development/libraries/physics/yoda/default.nix
new file mode 100644
index 000000000000..68f4e3714e09
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/physics/yoda/default.nix
@@ -0,0 +1,68 @@
+{ lib
+, stdenv
+, fetchurl
+, python
+, root
+, makeWrapper
+, zlib
+, withRootSupport ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "yoda";
+  version = "1.9.9";
+
+  src = fetchurl {
+    url = "https://www.hepforge.org/archive/yoda/YODA-${version}.tar.bz2";
+    hash = "sha256-68rVU2mhztzuOi3gWUB8hRZSukRJURP1wJ2MLlf1Fqo=";
+  };
+
+  nativeBuildInputs = with python.pkgs; [
+    cython
+    makeWrapper
+  ];
+
+  buildInputs = [
+    python
+  ] ++ (with python.pkgs; [
+    numpy
+    matplotlib
+  ]) ++ lib.optionals withRootSupport [
+    root
+  ];
+
+  propagatedBuildInputs = [
+    zlib
+  ];
+
+  enableParallelBuilding = true;
+
+  postPatch = ''
+    touch pyext/yoda/*.{pyx,pxd}
+    patchShebangs .
+
+    substituteInPlace pyext/yoda/plotting/script_generator.py \
+      --replace '/usr/bin/env python' '${python.interpreter}'
+  '';
+
+  postInstall = ''
+    for prog in "$out"/bin/*; do
+      wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out")
+    done
+  '';
+
+  hardeningDisable = [ "format" ];
+
+  doInstallCheck = true;
+
+  installCheckTarget = "check";
+
+  meta = with lib; {
+    description = "Provides small set of data analysis (specifically histogramming) classes";
+    license = licenses.gpl3Only;
+    homepage = "https://yoda.hepforge.org";
+    changelog = "https://gitlab.com/hepcedar/yoda/-/blob/yoda-${version}/ChangeLog";
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ veprbl ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pico-sdk/default.nix b/nixpkgs/pkgs/development/libraries/pico-sdk/default.nix
new file mode 100644
index 000000000000..cd860c3629f0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pico-sdk/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "pico-sdk";
+  version = "1.5.1";
+
+  src = fetchFromGitHub {
+    owner = "raspberrypi";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-JNcxd86XNNiPkvipVFR3X255boMmq+YcuJXUP4JwInU=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  # SDK contains libraries and build-system to develop projects for RP2040 chip
+  # We only need to compile pioasm binary
+  sourceRoot = "${src.name}/tools/pioasm";
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/lib/pico-sdk
+    cp -a ../../../* $out/lib/pico-sdk/
+    chmod 755 $out/lib/pico-sdk/tools/pioasm/build/pioasm
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/raspberrypi/pico-sdk";
+    description = "SDK provides the headers, libraries and build system necessary to write programs for the RP2040-based devices";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ muscaln ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pinocchio/default.nix b/nixpkgs/pkgs/development/libraries/pinocchio/default.nix
new file mode 100644
index 000000000000..add7ef6fde22
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pinocchio/default.nix
@@ -0,0 +1,70 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, boost
+, eigen
+, collisionSupport ? !stdenv.isDarwin
+, hpp-fcl
+, urdfdom
+, pythonSupport ? false
+, python3Packages
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "pinocchio";
+  version = "2.7.0";
+
+  src = fetchFromGitHub {
+    owner = "stack-of-tasks";
+    repo = finalAttrs.pname;
+    rev = "v${finalAttrs.version}";
+    fetchSubmodules = true;
+    hash = "sha256-yhrG+MilGJkvwLUNTAgNhDqUWGjPswjrbg38yOLsmHc=";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  propagatedBuildInputs = [
+    urdfdom
+  ] ++ lib.optionals (!pythonSupport) [
+    boost
+    eigen
+  ] ++ lib.optionals (!pythonSupport && collisionSupport) [
+    hpp-fcl
+  ] ++ lib.optionals pythonSupport [
+    python3Packages.boost
+    python3Packages.eigenpy
+  ] ++ lib.optionals (pythonSupport && collisionSupport) [
+    python3Packages.hpp-fcl
+  ];
+
+  cmakeFlags = lib.optionals collisionSupport [
+    "-DBUILD_WITH_COLLISION_SUPPORT=ON"
+  ] ++ lib.optionals pythonSupport [
+    "-DBUILD_WITH_LIBPYTHON=ON"
+  ] ++ lib.optionals (pythonSupport && stdenv.isDarwin) [
+    # AssertionError: '.' != '/tmp/nix-build-pinocchio-2.7.0.drv/sou[84 chars].dae'
+    "-DCMAKE_CTEST_ARGUMENTS='--exclude-regex;test-py-bindings_geometry_model_urdf'"
+  ] ++ lib.optionals (!pythonSupport) [
+    "-DBUILD_PYTHON_INTERFACE=OFF"
+  ];
+
+  doCheck = true;
+
+  pythonImportsCheck = lib.optionals (!pythonSupport) [
+    "pinocchio"
+  ];
+
+  meta = with lib; {
+    description = "A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives";
+    homepage = "https://github.com/stack-of-tasks/pinocchio";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ nim65s wegank ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/piper-phonemize/default.nix b/nixpkgs/pkgs/development/libraries/piper-phonemize/default.nix
new file mode 100644
index 000000000000..b08495cae74c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/piper-phonemize/default.nix
@@ -0,0 +1,70 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+
+# build
+, cmake
+, pkg-config
+
+# runtime
+, espeak-ng
+, onnxruntime
+}:
+
+let
+  espeak-ng' = espeak-ng.overrideAttrs (oldAttrs: {
+    version = "1.52-dev";
+    src = fetchFromGitHub {
+      owner = "rhasspy";
+      repo = "espeak-ng";
+      rev = "0f65aa301e0d6bae5e172cc74197d32a6182200f";
+      hash = "sha256-2V0D3QO+v9OqffpNmwJQd3NIBd/IFeLkjaJ3Y0HHw7E=";
+    };
+
+    patches = [
+      (fetchpatch {
+        url = "https://github.com/espeak-ng/espeak-ng/commit/497c6217d696c1190c3e8b992ff7b9110eb3bedd.patch";
+        hash = "sha256-KfzqnRyQfz6nuMKnsHoUzb9rn9h/Pg54mupW1Cr+Zx0=";
+      })
+      ./espeak-mbrola.patch
+    ];
+  });
+in
+stdenv.mkDerivation rec {
+  pname = "piper-phonemize";
+  version = "2023.11.14-4";
+
+  src = fetchFromGitHub {
+    owner = "rhasspy";
+    repo = "piper-phonemize";
+    rev = "refs/tags/${version}";
+    hash = "sha256-pj1DZUhy3XWGn+wNtxKKDWET9gsfofEB0NZ+EEQz9q0=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  cmakeFlags = [
+    "-DONNXRUNTIME_DIR=${onnxruntime.dev}"
+    "-DESPEAK_NG_DIR=${espeak-ng'}"
+  ];
+
+  buildInputs = [
+    espeak-ng'
+    onnxruntime
+  ];
+
+  passthru = {
+    espeak-ng = espeak-ng';
+  };
+
+  meta = with lib; {
+    description = "C++ library for converting text to phonemes for Piper";
+    homepage = "https://github.com/rhasspy/piper-phonemize";
+    license = licenses.mit;
+    maintainers = with maintainers; [ hexa ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/piper-phonemize/espeak-mbrola.patch b/nixpkgs/pkgs/development/libraries/piper-phonemize/espeak-mbrola.patch
new file mode 100644
index 000000000000..9d3f0aeb4abe
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/piper-phonemize/espeak-mbrola.patch
@@ -0,0 +1,26 @@
+diff --git a/src/libespeak-ng/mbrowrap.c b/src/libespeak-ng/mbrowrap.c
+index ae137873..9015cc01 100644
+--- a/src/libespeak-ng/mbrowrap.c
++++ b/src/libespeak-ng/mbrowrap.c
+@@ -206,7 +206,7 @@ static int start_mbrola(const char *voice_path)
+ 		signal(SIGTERM, SIG_IGN);
+ 
+ 		snprintf(charbuf, sizeof(charbuf), "%g", mbr_volume);
+-		execlp("mbrola", "mbrola", "-e", "-v", charbuf,
++		execlp("@mbrola/bin/mbrola", "mbrola", "-e", "-v", charbuf,
+ 		       voice_path, "-", "-.wav", (char *)NULL);
+ 		/* if execution reaches this point then the exec() failed */
+ 		snprintf(mbr_errorbuf, sizeof(mbr_errorbuf),
+diff --git a/src/libespeak-ng/synth_mbrola.c b/src/libespeak-ng/synth_mbrola.c
+index 734631b7..46d1f13e 100644
+--- a/src/libespeak-ng/synth_mbrola.c
++++ b/src/libespeak-ng/synth_mbrola.c
+@@ -85,7 +85,7 @@ espeak_ng_STATUS LoadMbrolaTable(const char *mbrola_voice, const char *phtrans,
+ 	if (!load_MBR())
+ 		return ENS_MBROLA_NOT_FOUND;
+ 
+-	sprintf(path, "%s/mbrola/%s", path_home, mbrola_voice);
++	sprintf(path, "@mbrola@/share/mbrola/voices/%s/%s", mbrola_voice, mbrola_voice);
+ #if PLATFORM_POSIX
+ 	// if not found, then also look in
+ 	//   usr/share/mbrola/xx, /usr/share/mbrola/xx/xx, /usr/share/mbrola/voices/xx
diff --git a/nixpkgs/pkgs/development/libraries/pipewire/0.2.nix b/nixpkgs/pkgs/development/libraries/pipewire/0.2.nix
new file mode 100644
index 000000000000..cf2448bddfcb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pipewire/0.2.nix
@@ -0,0 +1,54 @@
+{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, doxygen, graphviz
+, glib, dbus, gst_all_1, alsa-lib, ffmpeg_4, libjack2, udev, libva, xorg
+, sbc, SDL2, makeFontsConf
+}:
+
+let
+  fontsConf = makeFontsConf {
+    fontDirectories = [ ];
+  };
+in stdenv.mkDerivation rec {
+  pname = "pipewire";
+  version = "0.2.7";
+
+  src = fetchFromGitHub {
+    owner = "PipeWire";
+    repo = "pipewire";
+    rev = version;
+    sha256 = "1q5wrqnhhs6r49p8yvkw1pl0cnsd4rndxy4h5lvdydwgf1civcwc";
+  };
+
+  outputs = [ "out" "lib" "dev" "doc" ];
+
+  nativeBuildInputs = [
+    meson ninja pkg-config doxygen graphviz
+  ];
+  buildInputs = [
+    glib dbus gst_all_1.gst-plugins-base gst_all_1.gstreamer
+    alsa-lib ffmpeg_4 libjack2 udev libva xorg.libX11 sbc SDL2
+  ];
+
+  # Workaround build on gcc-10+ and clang11+:
+  #  spa/plugins/bluez5/libspa-bluez5.so.p/bluez5-monitor.c.o:(.bss+0x0):
+  #    multiple definition of `spa_a2dp_sink_factory'
+  env.NIX_CFLAGS_COMPILE = toString [ "-fcommon" ];
+
+  mesonFlags = [
+    "-Ddocs=true"
+    "-Dgstreamer=enabled"
+  ];
+
+  PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "${placeholder "out"}/lib/systemd/user";
+
+  FONTCONFIG_FILE = fontsConf; # Fontconfig error: Cannot load default config file
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Server and user space API to deal with multimedia pipelines";
+    homepage = "https://pipewire.org/";
+    license = licenses.lgpl21;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pipewire/0060-libjack-path.patch b/nixpkgs/pkgs/development/libraries/pipewire/0060-libjack-path.patch
new file mode 100644
index 000000000000..7fde3dbb8faa
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pipewire/0060-libjack-path.patch
@@ -0,0 +1,26 @@
+diff --git a/src/modules/meson.build b/src/modules/meson.build
+index 5d2dc9984..35f5773aa 100644
+--- a/src/modules/meson.build
++++ b/src/modules/meson.build
+@@ -169,6 +169,7 @@ if build_module_jack_tunnel
+     install_dir : modules_install_dir,
+     install_rpath: modules_install_dir,
+     dependencies : [mathlib, dl_lib, pipewire_dep],
++    c_args: '-DNIXPKGS_LIBJACK_PATH="@0@"'.format(jack_dep.get_variable('libdir'))
+   )
+   build_module_jackdbus_detect = dbus_dep.found()
+   if build_module_jackdbus_detect
+diff --git a/src/modules/module-jack-tunnel/weakjack.h b/src/modules/module-jack-tunnel/weakjack.h
+index 42580f798..e7aadd3cc 100644
+--- a/src/modules/module-jack-tunnel/weakjack.h
++++ b/src/modules/module-jack-tunnel/weakjack.h
+@@ -164,8 +164,7 @@ static inline int weakjack_load(struct weakjack *jack, const char *lib)
+ 
+ 		search_dirs = getenv("LIBJACK_PATH");
+ 		if (!search_dirs)
+-			search_dirs = PREFIX "/lib64/:" PREFIX "/lib/:"
+-				"/usr/lib64/:/usr/lib/:" LIBDIR;
++			search_dirs = NIXPKGS_LIBJACK_PATH;
+ 
+ 		while ((p = pw_split_walk(search_dirs, ":", &len, &state))) {
+ 			int pathlen;
diff --git a/nixpkgs/pkgs/development/libraries/pipewire/0070-installed-tests-path.patch b/nixpkgs/pkgs/development/libraries/pipewire/0070-installed-tests-path.patch
new file mode 100644
index 000000000000..b2bcb421befb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pipewire/0070-installed-tests-path.patch
@@ -0,0 +1,29 @@
+diff --git a/meson.build b/meson.build
+index 2107c19ec..20ccdfd9f 100644
+--- a/meson.build
++++ b/meson.build
+@@ -380,8 +380,8 @@ lilv_lib = dependency('lilv-0', required: get_option('lv2'))
+ summary({'lilv (for lv2 plugins)': lilv_lib.found()}, bool_yn: true)
+ cdata.set('HAVE_LILV', lilv_lib.found())
+ 
+-installed_tests_metadir = pipewire_datadir / 'installed-tests' / pipewire_name
+-installed_tests_execdir = pipewire_libexecdir / 'installed-tests' / pipewire_name
++installed_tests_metadir = get_option('installed_test_prefix') / 'share' / 'installed-tests' / pipewire_name
++installed_tests_execdir = get_option('installed_test_prefix') / 'libexec' / 'installed-tests' / pipewire_name
+ installed_tests_enabled = get_option('installed_tests').allowed()
+ installed_tests_template = files('template.test.in')
+ 
+diff --git a/meson_options.txt b/meson_options.txt
+index 961ae2a76..a36e9e45f 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -22,6 +22,9 @@ option('installed_tests',
+        description: 'Install manual and automated test executables',
+        type: 'feature',
+        value: 'disabled')
++option('installed_test_prefix',
++       description: 'Prefix for installed tests',
++       type: 'string')
+ option('gstreamer',
+        description: 'Build GStreamer plugins',
+        type: 'feature',
diff --git a/nixpkgs/pkgs/development/libraries/pipewire/default.nix b/nixpkgs/pkgs/development/libraries/pipewire/default.nix
new file mode 100644
index 000000000000..4cfcf9b3a6d8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pipewire/default.nix
@@ -0,0 +1,213 @@
+{ stdenv
+, lib
+, fetchFromGitLab
+, python3
+, meson
+, ninja
+, eudev
+, systemd
+, enableSystemd ? true
+, pkg-config
+, docutils
+, doxygen
+, graphviz
+, glib
+, dbus
+, alsa-lib
+, libjack2
+, libusb1
+, udev
+, libsndfile
+, vulkan-headers
+, vulkan-loader
+, webrtc-audio-processing
+, webrtc-audio-processing_1
+, ncurses
+, readline # meson can't find <7 as those versions don't have a .pc file
+, lilv
+, makeFontsConf
+, nixosTests
+, withValgrind ? lib.meta.availableOn stdenv.hostPlatform valgrind
+, valgrind
+, libcameraSupport ? true
+, libcamera
+, libdrm
+, gstreamerSupport ? true
+, gst_all_1
+, ffmpegSupport ? true
+, ffmpeg
+, bluezSupport ? true
+, bluez
+, sbc
+, libfreeaptx
+, liblc3
+, fdk_aac
+, libopus
+, ldacbtSupport ? bluezSupport && lib.meta.availableOn stdenv.hostPlatform ldacbt
+, ldacbt
+, nativeHspSupport ? true
+, nativeHfpSupport ? true
+, nativeModemManagerSupport ? true
+, modemmanager
+, ofonoSupport ? true
+, hsphfpdSupport ? true
+, pulseTunnelSupport ? true
+, libpulseaudio
+, zeroconfSupport ? true
+, avahi
+, raopSupport ? true
+, openssl
+, rocSupport ? true
+, roc-toolkit
+, x11Support ? true
+, libcanberra
+, xorg
+, mysofaSupport ? true
+, libmysofa
+, tinycompress
+, ffadoSupport ? x11Support && stdenv.buildPlatform.canExecute stdenv.hostPlatform
+, ffado
+, libselinux
+}:
+
+# Bluetooth codec only makes sense if general bluetooth enabled
+assert ldacbtSupport -> bluezSupport;
+
+stdenv.mkDerivation(finalAttrs: {
+  pname = "pipewire";
+  version = "1.0.3";
+
+  outputs = [
+    "out"
+    "jack"
+    "dev"
+    "doc"
+    "man"
+    "installedTests"
+  ];
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "pipewire";
+    repo = "pipewire";
+    rev = finalAttrs.version;
+    sha256 = "sha256-QVw7Q+RNo8BBy/uxoZeSQQn/vQcIl1bOiA9fYMR0+oI=";
+  };
+
+  patches = [
+    # Load libjack from a known location
+    ./0060-libjack-path.patch
+    # Move installed tests into their own output.
+    ./0070-installed-tests-path.patch
+  ];
+
+  strictDeps = true;
+  nativeBuildInputs = [
+    docutils
+    doxygen
+    graphviz
+    meson
+    ninja
+    pkg-config
+    python3
+    glib
+  ];
+
+  buildInputs = [
+    alsa-lib
+    dbus
+    glib
+    libjack2
+    libusb1
+    libselinux
+    libsndfile
+    lilv
+    ncurses
+    readline
+    udev
+    vulkan-headers
+    vulkan-loader
+    tinycompress
+  ] ++ (if enableSystemd then [ systemd ] else [ eudev ])
+  ++ (if lib.meta.availableOn stdenv.hostPlatform webrtc-audio-processing_1 then [ webrtc-audio-processing_1 ] else [ webrtc-audio-processing ])
+  ++ lib.optionals gstreamerSupport [ gst_all_1.gst-plugins-base gst_all_1.gstreamer ]
+  ++ lib.optionals libcameraSupport [ libcamera libdrm ]
+  ++ lib.optional ffmpegSupport ffmpeg
+  ++ lib.optionals bluezSupport [ bluez libfreeaptx liblc3 sbc fdk_aac libopus ]
+  ++ lib.optional ldacbtSupport ldacbt
+  ++ lib.optional nativeModemManagerSupport modemmanager
+  ++ lib.optional pulseTunnelSupport libpulseaudio
+  ++ lib.optional zeroconfSupport avahi
+  ++ lib.optional raopSupport openssl
+  ++ lib.optional rocSupport roc-toolkit
+  ++ lib.optionals x11Support [ libcanberra xorg.libX11 xorg.libXfixes ]
+  ++ lib.optional mysofaSupport libmysofa
+  ++ lib.optional ffadoSupport ffado;
+
+  # Valgrind binary is required for running one optional test.
+  nativeCheckInputs = lib.optional withValgrind valgrind;
+
+  mesonFlags = [
+    (lib.mesonEnable "docs" true)
+    (lib.mesonOption "udevrulesdir" "lib/udev/rules.d")
+    (lib.mesonEnable "installed_tests" true)
+    (lib.mesonOption "installed_test_prefix" (placeholder "installedTests"))
+    (lib.mesonOption "libjack-path" "${placeholder "jack"}/lib")
+    (lib.mesonEnable "libcamera" libcameraSupport)
+    (lib.mesonEnable "libffado" ffadoSupport)
+    (lib.mesonEnable "roc" rocSupport)
+    (lib.mesonEnable "libpulse" pulseTunnelSupport)
+    (lib.mesonEnable "avahi" zeroconfSupport)
+    (lib.mesonEnable "gstreamer" gstreamerSupport)
+    (lib.mesonEnable "systemd-system-service" enableSystemd)
+    (lib.mesonEnable "udev" (!enableSystemd))
+    (lib.mesonEnable "ffmpeg" ffmpegSupport)
+    (lib.mesonEnable "bluez5" bluezSupport)
+    (lib.mesonEnable "bluez5-backend-hsp-native" nativeHspSupport)
+    (lib.mesonEnable "bluez5-backend-hfp-native" nativeHfpSupport)
+    (lib.mesonEnable "bluez5-backend-native-mm" nativeModemManagerSupport)
+    (lib.mesonEnable "bluez5-backend-ofono" ofonoSupport)
+    (lib.mesonEnable "bluez5-backend-hsphfpd" hsphfpdSupport)
+    # source code is not easily obtainable
+    (lib.mesonEnable "bluez5-codec-lc3plus" false)
+    (lib.mesonEnable "bluez5-codec-lc3" bluezSupport)
+    (lib.mesonEnable "bluez5-codec-ldac" ldacbtSupport)
+    (lib.mesonOption "sysconfdir" "/etc")
+    (lib.mesonEnable "raop" raopSupport)
+    (lib.mesonOption "session-managers" "")
+    (lib.mesonEnable "vulkan" true)
+    (lib.mesonEnable "x11" x11Support)
+    (lib.mesonEnable "x11-xfixes" x11Support)
+    (lib.mesonEnable "libcanberra" x11Support)
+    (lib.mesonEnable "libmysofa" mysofaSupport)
+    (lib.mesonEnable "sdl2" false) # required only to build examples, causes dependency loop
+    (lib.mesonBool "rlimits-install" false) # installs to /etc, we won't use this anyway
+    (lib.mesonEnable "compress-offload" true)
+    (lib.mesonEnable "man" true)
+  ];
+
+  # Fontconfig error: Cannot load default config file
+  FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ ]; };
+
+  doCheck = true;
+
+  postUnpack = ''
+    patchShebangs source/doc/*.py
+    patchShebangs source/doc/input-filter-h.sh
+  '';
+
+  postInstall = ''
+    moveToOutput "bin/pw-jack" "$jack"
+  '';
+
+  passthru.tests.installed-tests = nixosTests.installed-tests.pipewire;
+
+  meta = with lib; {
+    description = "Server and user space API to deal with multimedia pipelines";
+    changelog = "https://gitlab.freedesktop.org/pipewire/pipewire/-/releases/${version}";
+    homepage = "https://pipewire.org/";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ kranzes k900 ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/pipewire/wireplumber.nix b/nixpkgs/pkgs/development/libraries/pipewire/wireplumber.nix
new file mode 100644
index 000000000000..a5bdb729a102
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pipewire/wireplumber.nix
@@ -0,0 +1,81 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, nix-update-script
+# base build deps
+, meson
+, pkg-config
+, ninja
+# docs build deps
+, python3
+, doxygen
+, graphviz
+# GI build deps
+, gobject-introspection
+# runtime deps
+, glib
+, systemd
+, lua5_4
+, pipewire
+# options
+, enableDocs ? true
+, enableGI ? true
+}:
+
+stdenv.mkDerivation rec {
+  pname = "wireplumber";
+  version = "0.4.17";
+
+  outputs = [ "out" "dev" ] ++ lib.optional enableDocs "doc";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "pipewire";
+    repo = "wireplumber";
+    rev = version;
+    hash = "sha256-vhpQT67+849WV1SFthQdUeFnYe/okudTQJoL3y+wXwI=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    pkg-config
+    ninja
+  ] ++ lib.optionals enableDocs [
+    graphviz
+  ] ++ lib.optionals enableGI [
+    gobject-introspection
+  ] ++ lib.optionals (enableDocs || enableGI) [
+    doxygen
+    (python3.pythonOnBuildForHost.withPackages (ps: with ps;
+      lib.optionals enableDocs [ sphinx sphinx-rtd-theme breathe ]
+      ++ lib.optionals enableGI [ lxml ]
+    ))
+  ];
+
+  buildInputs = [
+    glib
+    systemd
+    lua5_4
+    pipewire
+  ];
+
+  mesonFlags = [
+    (lib.mesonBool "system-lua" true)
+    (lib.mesonEnable "elogind" false)
+    (lib.mesonEnable "doc" enableDocs)
+    (lib.mesonEnable "introspection" enableGI)
+    (lib.mesonBool "systemd-system-service" true)
+    (lib.mesonOption "systemd-system-unit-dir" "${placeholder "out"}/lib/systemd/system")
+    (lib.mesonOption "sysconfdir" "/etc")
+  ];
+
+  passthru.updateScript = nix-update-script { };
+
+  meta = with lib; {
+    description = "A modular session / policy manager for PipeWire";
+    homepage = "https://pipewire.org";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ k900 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pixman/default.nix b/nixpkgs/pkgs/development/libraries/pixman/default.nix
new file mode 100644
index 000000000000..1b5aaaaa06d4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pixman/default.nix
@@ -0,0 +1,76 @@
+{ lib
+, stdenv
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, libpng
+, glib /*just passthru*/
+
+# for passthru.tests
+, cairo
+, qemu
+, scribus
+, tigervnc
+, wlroots
+, xwayland
+
+, gitUpdater
+}:
+
+stdenv.mkDerivation rec {
+  pname = "pixman";
+  version = "0.43.2";
+
+  src = fetchurl {
+    urls = [
+      "mirror://xorg/individual/lib/${pname}-${version}.tar.gz"
+      "https://cairographics.org/releases/${pname}-${version}.tar.gz"
+    ];
+    hash = "sha256-6nkpflQY+1KNBGbotbkdG+iIV/o3BvSXd7KSWnKumSQ=";
+  };
+
+  separateDebugInfo = !stdenv.hostPlatform.isStatic;
+
+  nativeBuildInputs = [ meson ninja pkg-config ];
+
+  buildInputs = [ libpng ];
+
+  # Default "enabled" value attempts to enable CPU features on all
+  # architectures and requires used to disable them:
+  #   https://gitlab.freedesktop.org/pixman/pixman/-/issues/88
+  mesonAutoFeatures = "auto";
+  mesonFlags = [
+    "-Diwmmxt=disabled"
+  ]
+  # Disable until https://gitlab.freedesktop.org/pixman/pixman/-/issues/46 is resolved
+  ++ lib.optional (stdenv.isAarch64 && !stdenv.cc.isGNU) "-Da64-neon=disabled";
+
+  preConfigure = ''
+    # https://gitlab.freedesktop.org/pixman/pixman/-/issues/62
+    export OMP_NUM_THREADS=$((NIX_BUILD_CORES > 184 ? 184 : NIX_BUILD_CORES))
+  '';
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  postInstall = glib.flattenInclude;
+
+  passthru = {
+    tests = {
+      inherit cairo qemu scribus tigervnc wlroots xwayland;
+    };
+    updateScript = gitUpdater {
+      url = "https://gitlab.freedesktop.org/pixman/pixman.git";
+      rev-prefix = "pixman-";
+    };
+  };
+
+  meta = with lib; {
+    homepage = "http://pixman.org";
+    description = "A low-level library for pixel manipulation";
+    license = licenses.mit;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pkcs11helper/default.nix b/nixpkgs/pkgs/development/libraries/pkcs11helper/default.nix
new file mode 100644
index 000000000000..3723a6806ad9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pkcs11helper/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, openssl, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "pkcs11-helper";
+  version = "1.30.0";
+
+  src = fetchFromGitHub {
+    owner = "OpenSC";
+    repo = "pkcs11-helper";
+    rev = "${pname}-${version}";
+    hash = "sha256-FP3y/YHsPPqey4QfxIiC4QjruuK1K2Bg+2QL2gXDT+k=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ openssl ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/OpenSC/pkcs11-helper";
+    license = with licenses; [ bsd3 gpl2Only ];
+    description = "Library that simplifies the interaction with PKCS#11 providers";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pkger/default.nix b/nixpkgs/pkgs/development/libraries/pkger/default.nix
new file mode 100644
index 000000000000..073c57c013da
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pkger/default.nix
@@ -0,0 +1,29 @@
+{ buildGoModule
+, fetchFromGitHub
+, lib
+
+}:
+
+buildGoModule rec {
+  pname = "pkger";
+  version = "0.17.1";
+
+  src = fetchFromGitHub {
+    owner = "markbates";
+    repo = "pkger";
+    rev = "v${version}";
+    hash = "sha256-nBuOC+uVw+hYSssgTkPRJZEBkufhQgU5D6jsZZre7Is=";
+  };
+
+  vendorHash = "sha256-9+2s84bqoNU3aaxmWYzIuFKPA3Tw9phXu5Csaaq/L60=";
+
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Embed static files in Go binaries (replacement for gobuffalo/packr) ";
+    homepage = "https://github.com/markbates/pkger";
+    changelog = "https://github.com/markbates/pkger/releases/tag/v${version}";
+    license = licenses.mit;
+    maintainers = with maintainers; [ flokli ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/plasma-wayland-protocols/default.nix b/nixpkgs/pkgs/development/libraries/plasma-wayland-protocols/default.nix
new file mode 100644
index 000000000000..9f2798ce51b6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/plasma-wayland-protocols/default.nix
@@ -0,0 +1,27 @@
+{ mkDerivation
+, fetchurl
+, lib
+, extra-cmake-modules
+, qtbase
+}:
+
+mkDerivation rec {
+  pname = "plasma-wayland-protocols";
+  version = "1.12.0";
+
+  src = fetchurl {
+    url = "mirror://kde/stable/${pname}/${pname}-${version}.tar.xz";
+    hash = "sha256-FIO/0nnLkTyDV5tdccWPmVh2T5ukMDs2R+EAfLcNT54=";
+  };
+
+  nativeBuildInputs = [ extra-cmake-modules ];
+
+  buildInputs = [ qtbase ];
+
+  meta = {
+    description = "Plasma Wayland Protocols";
+    license = lib.licenses.lgpl21Plus;
+    platforms = qtbase.meta.platforms;
+    maintainers = [ lib.maintainers.ttuegel ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/platform-folders/default.nix b/nixpkgs/pkgs/development/libraries/platform-folders/default.nix
new file mode 100644
index 000000000000..5479502abb23
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/platform-folders/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchFromGitHub, cmake, gitUpdater }:
+
+stdenv.mkDerivation rec {
+  pname = "platform-folders";
+  version = "4.2.0";
+
+  src = fetchFromGitHub {
+    owner = "sago007";
+    repo = "PlatformFolders";
+    rev = version;
+    hash = "sha256-ruhAP9kjwm6pIFJ5a6oy6VE5W39bWQO3qSrT5IUtiwA=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
+  ];
+
+  passthru.updateScript = gitUpdater { };
+
+  meta = with lib; {
+    description = "A C++ library to look for standard platform directories so that you do not need to write platform-specific code";
+    homepage = "https://github.com/sago007/PlatformFolders";
+    license = licenses.mit;
+    maintainers = with maintainers; [ lilyinstarlight ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/plib/default.nix b/nixpkgs/pkgs/development/libraries/plib/default.nix
new file mode 100644
index 000000000000..b420c17c8888
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/plib/default.nix
@@ -0,0 +1,55 @@
+{ fetchurl, fetchpatch, lib, stdenv, libGLU, libGL, freeglut, SDL
+, libXi, libSM, libXmu, libXext, libX11 }:
+
+stdenv.mkDerivation rec {
+  pname = "plib";
+  version = "1.8.5";
+
+  src = fetchurl {
+    # XXX: The author doesn't use the orthodox SF way to store tarballs.
+    url = "https://plib.sourceforge.net/dist/${pname}-${version}.tar.gz";
+    sha256 = "0cha71mflpa10vh2l7ipyqk67dq2y0k5xbafwdks03fwdyzj4ns8";
+  };
+
+  patches = [
+    (fetchpatch {
+      url = "https://sources.debian.net/data/main/p/plib/1.8.5-7/debian/patches/04_CVE-2011-4620.diff";
+      sha256 = "1b7y0vqqdzd48q68ldlzw0zzqy9mg4c10a754r4hi3ldjmcplf0j";
+    })
+    (fetchpatch {
+      url = "https://sources.debian.net/data/main/p/plib/1.8.5-7/debian/patches/05_CVE-2012-4552.diff";
+      sha256 = "0b6cwdwii5b5vy78sbw5cw1s96l4jyzr4dk69v63pa0wwi2b5dki";
+    })
+    (fetchpatch {
+      url = "https://sources.debian.org/data/main/p/plib/1.8.5-13/debian/patches/08_CVE-2021-38714.patch";
+      sha256 = "sha256-3f1wZn0QqK/hPWCg1KEzbB95IGoxBjLZoCOFlW98t5w=";
+    })
+  ];
+
+  propagatedBuildInputs = [
+    libGLU libGL freeglut SDL
+
+    # The following libs ought to be propagated build inputs of Mesa.
+    libXi libSM libXmu libXext libX11
+  ];
+
+  meta = {
+    description = "A suite of portable game libraries";
+
+    longDescription = ''
+      PLIB includes sound effects, music, a complete 3D engine, font
+      rendering, a simple Windowing library, a game scripting
+      language, a GUI, networking, 3D math library and a collection of
+      handy utility functions.  All are 100% portable across nearly
+      all modern computing platforms.  What's more, it's all available
+      on line - and completely free.  Each library component is fairly
+      independent of the others - so if you want to use SDL, GTK,
+      GLUT, or FLTK instead of PLIB's 'PW' windowing library, you can.
+    '';
+
+    license = lib.licenses.lgpl2Plus;
+
+    homepage = "https://plib.sourceforge.net/";
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/plog/default.nix b/nixpkgs/pkgs/development/libraries/plog/default.nix
new file mode 100644
index 000000000000..45b0fa49a1ab
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/plog/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "plog";
+  version = "1.1.10";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "SergiusTheBest";
+    repo = pname;
+    rev = version;
+    hash = "sha256-NZphrg9OB1FTY2ifu76AXeCyGwW2a2BkxMGjZPf4uM8=";
+  };
+
+  strictDeps = true;
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  cmakeFlags = [
+    "-DPLOG_BUILD_SAMPLES=NO"
+  ];
+
+  meta = with lib; {
+    description = "Portable, simple and extensible C++ logging library";
+    homepage = "https://github.com/SergiusTheBest/plog";
+    license = licenses.mit;
+    platforms = platforms.linux ++ platforms.darwin;
+    maintainers = with maintainers; [ raphaelr erdnaxe ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/plplot/default.nix b/nixpkgs/pkgs/development/libraries/plplot/default.nix
new file mode 100644
index 000000000000..66c498418d98
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/plplot/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, stdenv
+, fetchurl
+, cmake
+, enableWX ? false
+, wxGTK32
+, Cocoa
+, enableXWin ? false
+, xorg
+}:
+
+stdenv.mkDerivation rec {
+  pname   = "plplot";
+  version = "5.15.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/${pname}/${pname}/${version}%20Source/${pname}-${version}.tar.gz";
+    sha256 = "0ywccb6bs1389zjfmc9zwdvdsvlpm7vg957whh6b5a96yvcf8bdr";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = lib.optional enableWX wxGTK32
+    ++ lib.optional (enableWX && stdenv.isDarwin) Cocoa
+    ++ lib.optional enableXWin xorg.libX11;
+
+  passthru = {
+    inherit (xorg) libX11;
+    inherit
+      enableWX
+      enableXWin
+    ;
+  };
+
+  cmakeFlags = [
+    "-DBUILD_TEST=ON"
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Cross-platform scientific graphics plotting library";
+    homepage    = "https://plplot.org";
+    maintainers = with maintainers; [ bcdarwin ];
+    platforms   = platforms.unix;
+    license     = licenses.lgpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pmix/default.nix b/nixpkgs/pkgs/development/libraries/pmix/default.nix
new file mode 100644
index 000000000000..78605179f710
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pmix/default.nix
@@ -0,0 +1,88 @@
+{ lib, stdenv, fetchFromGitHub, perl, autoconf, automake
+, removeReferencesTo, libtool, python3, flex, libevent
+, targetPackages, makeWrapper
+, hwloc, munge, zlib, pandoc, gitMinimal
+} :
+
+stdenv.mkDerivation rec {
+  pname = "pmix";
+  version = "5.0.1";
+
+  src = fetchFromGitHub {
+    repo = "openpmix";
+    owner = "openpmix";
+    rev = "v${version}";
+    hash = "sha256-ZuuzQ8j5zqQ/9mBFEODAaoX9/doWB9Nt9Sl75JkJyqU=";
+    fetchSubmodules = true;
+  };
+
+  outputs = [ "out" "dev" ];
+
+  postPatch = ''
+    patchShebangs ./autogen.pl
+    patchShebangs ./config
+  '';
+
+  nativeBuildInputs = [
+    pandoc
+    perl
+    autoconf
+    automake
+    libtool
+    flex
+    gitMinimal
+    python3
+    removeReferencesTo
+    makeWrapper
+  ];
+
+  buildInputs = [ libevent hwloc munge zlib ];
+
+  configureFlags = [
+    "--with-libevent=${lib.getDev libevent}"
+    "--with-libevent-libdir=${lib.getLib libevent}/lib"
+    "--with-munge=${munge}"
+    "--with-hwloc=${lib.getDev hwloc}"
+    "--with-hwloc-libdir=${lib.getLib hwloc}/lib"
+  ];
+
+  preConfigure = ''
+    ./autogen.pl
+  '';
+
+  postInstall = ''
+    find $out/lib/ -name "*.la" -exec rm -f \{} \;
+
+    moveToOutput "bin/pmix_info" "''${!outputDev}"
+    moveToOutput "bin/pmixcc" "''${!outputDev}"
+    moveToOutput "share/pmix/pmixcc-wrapper-data.txt" "''${!outputDev}"
+
+    # The path to the pmixcc-wrapper-data.txt is hard coded and
+    # points to $out instead of dev. Use wrapper to fix paths.
+    wrapProgram $dev/bin/pmixcc \
+      --set PMIX_INCLUDEDIR $dev/include \
+      --set PMIX_PKGDATADIR $dev/share/pmix
+  '';
+
+  postFixup = ''
+    # The build info (parameters to ./configure) are hardcoded
+    # into the library. This clears all references to $dev/include.
+    remove-references-to -t $dev $(readlink -f $out/lib/libpmix.so)
+
+    # Pin the compiler to the current version in a cross compiler friendly way.
+    # Same pattern as for openmpi (see https://github.com/NixOS/nixpkgs/pull/58964#discussion_r275059427).
+    sed -i 's:compiler=.*:compiler=${targetPackages.stdenv.cc}/bin/${targetPackages.stdenv.cc.targetPrefix}cc:' \
+      $dev/share/pmix/pmixcc-wrapper-data.txt
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Process Management Interface for HPC environments";
+    homepage = "https://openpmix.github.io/";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.markuskowa ];
+    platforms = platforms.linux;
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/png++/default.nix b/nixpkgs/pkgs/development/libraries/png++/default.nix
new file mode 100644
index 000000000000..dfd74e495e76
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/png++/default.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, fetchurl, libpng
+, docSupport ? true, doxygen ? null
+}:
+assert docSupport -> doxygen != null;
+
+stdenv.mkDerivation rec {
+  pname = "pngpp";
+  version = "0.2.10";
+
+  src = fetchurl {
+    url = "mirror://savannah/pngpp/png++-${version}.tar.gz";
+    sha256 = "1qgf8j25r57wjqlnzdkm8ya5x1bmj6xjvapv8f2visqnmcbg52lr";
+  };
+
+  doCheck = true;
+  checkTarget = "test";
+  preCheck = ''
+    patchShebangs test/test.sh
+    substituteInPlace test/test.sh --replace "exit 1" "exit 0"
+  '';
+
+  postCheck = "cat test/test.log";
+
+  buildInputs = lib.optional docSupport doxygen;
+
+  propagatedBuildInputs = [ libpng ];
+
+  preConfigure = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace error.hpp --replace "#if (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE" "#if (__clang__ || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE"
+  '' + ''
+    sed "s|\(PNGPP := .\)|PREFIX := ''${out}\n\\1|" -i Makefile
+  '';
+
+  makeFlags = lib.optional docSupport "docs";
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://www.nongnu.org/pngpp/";
+    description = "C++ wrapper for libpng library";
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.ramkromberg ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/poco/default.nix b/nixpkgs/pkgs/development/libraries/poco/default.nix
new file mode 100644
index 000000000000..2358d19240a2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/poco/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, zlib, pcre2, expat, sqlite, openssl, unixODBC, libmysqlclient }:
+
+stdenv.mkDerivation rec {
+  pname = "poco";
+
+  version = "1.12.5p2";
+
+  src = fetchFromGitHub {
+    owner = "pocoproject";
+    repo = "poco";
+    sha256 = "sha256-UAseNOC9n+OooDl4E67qcndJ02fAgmp2d8Ii/IyPvhg=";
+    rev = "poco-${version}-release";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [ unixODBC libmysqlclient ];
+  propagatedBuildInputs = [ zlib pcre2 expat sqlite openssl ];
+
+  outputs = [ "out" "dev" ];
+
+  MYSQL_DIR = libmysqlclient;
+  MYSQL_INCLUDE_DIR = "${MYSQL_DIR}/include/mysql";
+
+  configureFlags = [
+    "--unbundled"
+  ];
+
+  postFixup = ''
+    grep -rlF INTERFACE_INCLUDE_DIRECTORIES "$dev/lib/cmake/Poco" | while read -r f; do
+      substituteInPlace "$f" \
+        --replace "$"'{_IMPORT_PREFIX}/include' ""
+    done
+  '';
+
+  meta = with lib; {
+    homepage = "https://pocoproject.org/";
+    description = "Cross-platform C++ libraries with a network/internet focus";
+    license = licenses.boost;
+    maintainers = with maintainers; [ orivej tomodachi94 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/podofo/0.10.x.nix b/nixpkgs/pkgs/development/libraries/podofo/0.10.x.nix
new file mode 100644
index 000000000000..6c4356e9add9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/podofo/0.10.x.nix
@@ -0,0 +1,67 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, expat
+, fontconfig
+, freetype
+, libidn
+, libjpeg
+, libpng
+, libtiff
+, libxml2
+, lua5
+, openssl
+, pkg-config
+, zlib
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "podofo";
+  version = "0.10.3";
+
+  src = fetchFromGitHub {
+    owner = "podofo";
+    repo = "podofo";
+    rev = finalAttrs.version;
+    hash = "sha256-B+YNTo2rZAL4PqDo+lFOQiWM9bl/TIn8xrJyefrIAYE=";
+  };
+
+  outputs = [ "out" "dev" "lib" ];
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    expat
+    fontconfig
+    freetype
+    libidn
+    libjpeg
+    libpng
+    libtiff
+    libxml2
+    lua5
+    openssl
+    zlib
+  ];
+
+  cmakeFlags = [
+    "-DPODOFO_BUILD_STATIC=${if stdenv.hostPlatform.isStatic then "ON" else "OFF"}"
+    "-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON"
+  ];
+
+  postInstall = ''
+    moveToOutput lib "$lib"
+  '';
+
+  meta = {
+    homepage = "https://github.com/podofo/podofo";
+    description = "A library to work with the PDF file format";
+    platforms = lib.platforms.all;
+    license = with lib.licenses; [ gpl2Plus lgpl2Plus ];
+    maintainers = [];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/podofo/default.nix b/nixpkgs/pkgs/development/libraries/podofo/default.nix
new file mode 100644
index 000000000000..1243763421c0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/podofo/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchurl, cmake, zlib, freetype, libjpeg, libtiff, fontconfig
+, openssl, libpng, lua5, pkg-config, libidn, expat
+}:
+
+stdenv.mkDerivation rec {
+  version = "0.9.8";
+  pname = "podofo";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/podofo/${pname}-${version}.tar.gz";
+    sha256 = "sha256-XeYH4V8ZK4rZBzgwB1nYjeoPXM3OO/AASKDJMrxkUVQ=";
+  };
+
+  outputs = [ "out" "dev" "lib" ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [ zlib freetype libjpeg libtiff fontconfig openssl libpng
+                  libidn expat lua5 ];
+
+  cmakeFlags = [
+    "-DPODOFO_BUILD_SHARED=ON"
+    "-DPODOFO_BUILD_STATIC=OFF"
+    "-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON"
+  ];
+
+  postInstall = ''
+    moveToOutput lib "$lib"
+  '';
+
+  meta = with lib; {
+    homepage = "https://podofo.sourceforge.net";
+    description = "A library to work with the PDF file format";
+    platforms = platforms.all;
+    license = with licenses; [ gpl2Plus lgpl2Plus ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/polkit-qt-1/default.nix b/nixpkgs/pkgs/development/libraries/polkit-qt-1/default.nix
new file mode 100644
index 000000000000..e6cb90994d9e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/polkit-qt-1/default.nix
@@ -0,0 +1,37 @@
+{ stdenv
+, lib
+, mkDerivation
+, fetchurl
+, cmake
+, pkg-config
+, polkit
+, glib
+, pcre
+, libselinux
+, libsepol
+, util-linux
+}:
+
+mkDerivation rec {
+  pname = "polkit-qt-1";
+  version = "0.114.0";
+
+  src = fetchurl {
+    url = "mirror://kde/stable/${pname}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-LrDyJEWIgpX/or+8DDaThHoPlzu2sMPkzOAhi+fjkH4=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [
+    glib
+    pcre
+    polkit
+  ] ++ lib.optionals stdenv.isLinux [ libselinux libsepol util-linux ];
+
+  meta = with lib; {
+    description = "A Qt wrapper around PolKit";
+    maintainers = with maintainers; [ ttuegel ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/polkit/default.nix b/nixpkgs/pkgs/development/libraries/polkit/default.nix
new file mode 100644
index 000000000000..dabba056b487
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/polkit/default.nix
@@ -0,0 +1,184 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, pkg-config
+, glib
+, expat
+, pam
+, meson
+, mesonEmulatorHook
+, ninja
+, perl
+, python3
+, fetchpatch
+, gettext
+, duktape
+, gobject-introspection
+, libxslt
+, docbook-xsl-nons
+, dbus
+, docbook_xml_dtd_412
+, gtk-doc
+, coreutils
+, useSystemd ? lib.meta.availableOn stdenv.hostPlatform systemdMinimal
+, systemdMinimal
+, elogind
+, buildPackages
+, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
+# A few tests currently fail on musl (polkitunixusertest, polkitunixgrouptest, polkitidentitytest segfault).
+# Not yet investigated; it may be due to the "Make netgroup support optional"
+# patch not updating the tests correctly yet, or doing something wrong,
+# or being unrelated to that.
+, doCheck ? (stdenv.isLinux && !stdenv.hostPlatform.isMusl)
+}:
+
+let
+  system = "/run/current-system/sw";
+  setuid = "/run/wrappers/bin";
+in
+stdenv.mkDerivation rec {
+  pname = "polkit";
+  version = "123";
+
+  outputs = [ "bin" "dev" "out" ]; # small man pages in $bin
+
+  # Tarballs do not contain subprojects.
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "polkit";
+    repo = "polkit";
+    rev = version;
+    hash = "sha256-/kjWkh6w2FYgtYWzw3g3GlWJKKpkJ3cqwfE0iDqJctw=";
+  };
+
+  patches = [
+    # Allow changing base for paths in pkg-config file as before.
+    # https://gitlab.freedesktop.org/polkit/polkit/-/merge_requests/100
+    (fetchpatch {
+      url = "https://gitlab.freedesktop.org/polkit/polkit/-/commit/7ba07551dfcd4ef9a87b8f0d9eb8b91fabcb41b3.patch";
+      sha256 = "ebbLILncq1hAZTBMsLm+vDGw6j0iQ0crGyhzyLZQgKA=";
+    })
+  ];
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    glib
+    pkg-config
+    gettext
+    meson
+    ninja
+    perl
+
+    # man pages
+    libxslt
+    docbook-xsl-nons
+    docbook_xml_dtd_412
+  ] ++ lib.optionals withIntrospection [
+    gobject-introspection
+    gtk-doc
+  ] ++ lib.optionals (withIntrospection && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
+  ];
+
+  buildInputs = [
+    expat
+    pam
+    dbus
+    duktape
+  ] ++ lib.optionals stdenv.isLinux [
+    # On Linux, fall back to elogind when systemd support is off.
+    (if useSystemd then systemdMinimal else elogind)
+  ];
+
+  propagatedBuildInputs = [
+    glib # in .pc Requires
+  ];
+
+  nativeCheckInputs = [
+    dbus
+    (python3.pythonOnBuildForHost.withPackages (pp: with pp; [
+      dbus-python
+      (python-dbusmock.overridePythonAttrs (attrs: {
+        # Avoid dependency cycle.
+        doCheck = false;
+      }))
+    ]))
+  ];
+
+  mesonFlags = [
+    "--datadir=${system}/share"
+    "--sysconfdir=/etc"
+    "-Dsystemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
+    "-Dpolkitd_user=polkituser" #TODO? <nixos> config.ids.uids.polkituser
+    "-Dos_type=redhat" # only affects PAM includes
+    "-Dintrospection=${lib.boolToString withIntrospection}"
+    "-Dtests=${lib.boolToString doCheck}"
+    "-Dgtk_doc=${lib.boolToString withIntrospection}"
+    "-Dman=true"
+  ] ++ lib.optionals stdenv.isLinux [
+    "-Dsession_tracking=${if useSystemd then "libsystemd-login" else "libelogind"}"
+  ];
+
+  # HACK: We want to install policy files files to $out/share but polkit
+  # should read them from /run/current-system/sw/share on a NixOS system.
+  # Similarly for config files in /etc.
+  # With autotools, it was possible to override Make variables
+  # at install time but Meson does not support this
+  # so we need to convince it to install all files to a temporary
+  # location using DESTDIR and then move it to proper one in postInstall.
+  env.DESTDIR = "dest";
+
+  inherit doCheck;
+
+  postPatch = ''
+    patchShebangs test/polkitbackend/polkitbackendjsauthoritytest-wrapper.py
+
+    # ‘libpolkit-agent-1.so’ should call the setuid wrapper on
+    # NixOS.  Hard-coding the path is kinda ugly.  Maybe we can just
+    # call through $PATH, but that might have security implications.
+    substituteInPlace src/polkitagent/polkitagentsession.c \
+      --replace   'PACKAGE_PREFIX "/lib/polkit-1/'   '"${setuid}/'
+    substituteInPlace test/data/etc/polkit-1/rules.d/10-testing.rules \
+      --replace   /bin/true ${coreutils}/bin/true \
+      --replace   /bin/false ${coreutils}/bin/false
+  '';
+
+  postConfigure = lib.optionalString doCheck ''
+    # Unpacked by meson
+    chmod +x subprojects/mocklibc-1.0/bin/mocklibc
+    patchShebangs subprojects/mocklibc-1.0/bin/mocklibc
+  '';
+
+  checkPhase = ''
+    runHook preCheck
+
+    # tests need access to the system bus
+    dbus-run-session --config-file=${./system_bus.conf} -- sh -c 'DBUS_SYSTEM_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS meson test --print-errorlogs'
+
+    runHook postCheck
+  '';
+
+  postInstall = ''
+    # Move stuff from DESTDIR to proper location.
+    # We need to be careful with the ordering to merge without conflicts.
+    for o in $(getAllOutputNames); do
+        mv "$DESTDIR/''${!o}" "''${!o}"
+    done
+    mv "$DESTDIR/etc" "$out"
+    mv "$DESTDIR${system}/share"/* "$out/share"
+    # Ensure we did not forget to install anything.
+    rmdir --parents --ignore-fail-on-non-empty "$DESTDIR${builtins.storeDir}" "$DESTDIR${system}/share"
+    ! test -e "$DESTDIR"
+  '';
+
+  meta = with lib; {
+    homepage = "https://gitlab.freedesktop.org/polkit/polkit/";
+    description = "A toolkit for defining and handling the policy that allows unprivileged processes to speak to privileged processes";
+    license = licenses.lgpl2Plus;
+    platforms = platforms.linux;
+    maintainers = teams.freedesktop.members ++ (with maintainers; [ ]);
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/polkit/system_bus.conf b/nixpkgs/pkgs/development/libraries/polkit/system_bus.conf
new file mode 100644
index 000000000000..435b4740a2f7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/polkit/system_bus.conf
@@ -0,0 +1,58 @@
+<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+  <!-- Our well-known bus type, do not change this -->
+  <type>system</type>
+
+  <!-- Fork into daemon mode -->
+  <fork/>
+
+  <!-- Enable logging to syslog -->
+  <syslog/>
+
+  <!-- Only allow socket-credentials-based authentication -->
+  <auth>EXTERNAL</auth>
+
+  <!-- Only listen on a local socket. (abstract=/path/to/socket 
+       means use abstract namespace, don't really create filesystem 
+       file; only Linux supports this. Use path=/whatever on other 
+       systems.) -->
+  <listen>unix:path=/tmp/system_bus_socket</listen>
+
+  <policy context="default">
+    <!-- All users can connect to system bus -->
+    <allow user="*"/>
+
+    <!-- Holes must be punched in service configuration files for
+         name ownership and sending method calls -->
+    <deny own="*"/>
+    <deny send_type="method_call"/>
+
+    <!-- Signals and reply messages (method returns, errors) are allowed
+         by default -->
+    <allow send_type="signal"/>
+    <allow send_requested_reply="true" send_type="method_return"/>
+    <allow send_requested_reply="true" send_type="error"/>
+
+    <!-- All messages may be received by default -->
+    <allow receive_type="method_call"/>
+    <allow receive_type="method_return"/>
+    <allow receive_type="error"/>
+    <allow receive_type="signal"/>
+
+    <!-- Allow anyone to talk to the message bus -->
+    <allow send_destination="org.freedesktop.DBus"
+           send_interface="org.freedesktop.DBus" />
+    <allow send_destination="org.freedesktop.DBus"
+           send_interface="org.freedesktop.DBus.Introspectable"/>
+    <!-- But disallow some specific bus services -->
+    <deny send_destination="org.freedesktop.DBus"
+          send_interface="org.freedesktop.DBus"
+          send_member="UpdateActivationEnvironment"/>
+    <deny send_destination="org.freedesktop.DBus"
+          send_interface="org.freedesktop.DBus.Debug.Stats"/>
+    <deny send_destination="org.freedesktop.DBus"
+          send_interface="org.freedesktop.systemd1.Activator"/>
+  </policy>
+
+</busconfig>
diff --git a/nixpkgs/pkgs/development/libraries/poly2tri-c/default.nix b/nixpkgs/pkgs/development/libraries/poly2tri-c/default.nix
new file mode 100644
index 000000000000..a0f084606906
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/poly2tri-c/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv
+, fetchFromGitLab
+, autoreconfHook
+, pkg-config
+, glib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "poly2tri-c";
+  version = "0.1.0";
+
+  outputs = [ "bin" "out" "dev" ];
+
+  src = fetchFromGitLab {
+    domain = "gitlab.gnome.org";
+    owner = "jtojnar";
+    repo = pname;
+    rev = "p2tc-${version}";
+    sha256 = "158vm3wqfxs22b74kqc4prlvjny38qqm3kz5wrgasmx0qciwh0g8";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ];
+
+  buildInputs = [
+    glib
+  ];
+
+  env.NIX_CFLAGS_COMPILE = toString [
+    "--std=gnu99"
+    "-Wno-error"
+  ];
+
+  meta = with lib; {
+    description = "Library for generating, refining and rendering 2-Dimensional Constrained Delaunay Triangulations";
+    homepage = "https://code.google.com/archive/p/poly2tri-c/";
+    license = licenses.bsd3;
+    maintainers = with lib.maintainers; [ jtojnar ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/popl/default.nix b/nixpkgs/pkgs/development/libraries/popl/default.nix
new file mode 100644
index 000000000000..b72b97172e37
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/popl/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, stdenvNoCC
+, fetchFromGitHub
+}:
+
+stdenvNoCC.mkDerivation rec {
+  pname = "popl";
+  version = "1.3.0";
+
+  src = fetchFromGitHub {
+    owner = "badaix";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-AkqFRPK0tVdalL+iyMou0LIUkPkFnYYdSqwEbFbgzqI=";
+  };
+
+  dontConfigure = true;
+  dontBuild = true;
+  dontFixup = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dm644 $src/include/popl.hpp $out/include/popl.hpp
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Header-only C++ program options parser library";
+    homepage = "https://github.com/badaix/popl";
+    changelog = "https://github.com/badaix/popl/releases/tag/${src.rev}";
+    license = licenses.mit;
+    maintainers = with maintainers; [ azahi ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/poppler/default.nix b/nixpkgs/pkgs/development/libraries/poppler/default.nix
new file mode 100644
index 000000000000..3a37fcb87e6b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/poppler/default.nix
@@ -0,0 +1,150 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchFromGitLab
+, cairo
+, cmake
+, boost
+, cups-filters
+, curl
+, fontconfig
+, freetype
+, inkscape
+, lcms
+, libiconv
+, libintl
+, libjpeg
+, ninja
+, openjpeg
+, pkg-config
+, python3
+, scribus
+, zlib
+, withData ? true, poppler_data
+, qt5Support ? false, qt6Support ? false, qtbase ? null
+, introspectionSupport ? false, gobject-introspection ? null
+, gpgmeSupport ? false, gpgme ? null
+, utils ? false, nss ? null
+, minimal ? false
+, suffix ? "glib"
+}:
+
+let
+  mkFlag = optset: flag: "-DENABLE_${flag}=${if optset then "on" else "off"}";
+
+  # unclear relationship between test data repo versions and poppler
+  # versions, though files don't appear to be updated after they're
+  # added, so it's probably safe to just always use the latest available
+  # version.
+  testData = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "poppler";
+    repo = "test";
+    rev = "400f3ff05b2b1c0ae17797a0bd50e75e35c1f1b1";
+    hash = "sha256-Y4aNOJLqo4g6tTW6TAb60jAWtBhRgT/JXsub12vi3aU=";
+  };
+in
+stdenv.mkDerivation (finalAttrs: rec {
+  pname = "poppler-${suffix}";
+  version = "24.01.0"; # beware: updates often break cups-filters build, check scribus too!
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "https://poppler.freedesktop.org/poppler-${version}.tar.xz";
+    hash = "sha256-x972k6ekkoMPSdSXqAzGuchctXsV6b4tLWFRU7ecrgg=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    ninja
+    pkg-config
+    python3
+  ];
+
+  buildInputs = [
+    boost
+    libiconv
+    libintl
+  ] ++ lib.optionals withData [
+    poppler_data
+  ];
+
+  # TODO: reduce propagation to necessary libs
+  propagatedBuildInputs = [
+    zlib
+    freetype
+    fontconfig
+    libjpeg
+    openjpeg
+  ] ++ lib.optionals (!minimal) [
+    cairo
+    lcms
+    curl
+    nss
+  ] ++ lib.optionals (qt5Support || qt6Support) [
+    qtbase
+  ] ++ lib.optionals introspectionSupport [
+    gobject-introspection
+  ] ++ lib.optionals gpgmeSupport [
+    gpgme
+  ];
+
+  cmakeFlags = [
+    (mkFlag true "UNSTABLE_API_ABI_HEADERS") # previously "XPDF_HEADERS"
+    (mkFlag (!minimal) "GLIB")
+    (mkFlag (!minimal) "CPP")
+    (mkFlag (!minimal) "LIBCURL")
+    (mkFlag (!minimal) "LCMS")
+    (mkFlag (!minimal) "LIBTIFF")
+    (mkFlag (!minimal) "NSS3")
+    (mkFlag utils "UTILS")
+    (mkFlag qt5Support "QT5")
+    (mkFlag qt6Support "QT6")
+    (mkFlag gpgmeSupport "GPGME")
+  ] ++ lib.optionals finalAttrs.finalPackage.doCheck [
+    "-DTESTDATADIR=${testData}"
+  ];
+  disallowedReferences = lib.optional finalAttrs.finalPackage.doCheck testData;
+
+  dontWrapQtApps = true;
+
+  # Workaround #54606
+  preConfigure = lib.optionalString stdenv.isDarwin ''
+    sed -i -e '1i cmake_policy(SET CMP0025 NEW)' CMakeLists.txt
+  '';
+
+  # Work around gpgme trying to write to $HOME during qt5 and qt6 tests:
+  preCheck = lib.optionalString gpgmeSupport ''
+    HOME_orig="$HOME"
+    export HOME="$(mktemp -d)"
+  '';
+
+  postCheck = lib.optionalString gpgmeSupport ''
+    export HOME="$HOME_orig"
+    unset -v HOME_orig
+  '';
+
+  doCheck = true;
+
+  passthru = {
+    inherit testData;
+    tests = {
+      # These depend on internal poppler code that frequently changes.
+      inherit inkscape cups-filters scribus;
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://poppler.freedesktop.org/";
+    changelog = "https://gitlab.freedesktop.org/poppler/poppler/-/blob/poppler-${version}/NEWS";
+    description = "A PDF rendering library";
+    longDescription = ''
+      Poppler is a PDF rendering library based on the xpdf-3.0 code base. In
+      addition it provides a number of tools that can be installed separately.
+    '';
+    license = licenses.gpl2Plus;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ ttuegel ] ++ teams.freedesktop.members;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/popt/1.16-cygwin.patch b/nixpkgs/pkgs/development/libraries/popt/1.16-cygwin.patch
new file mode 100644
index 000000000000..9c084f0b8eaa
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/popt/1.16-cygwin.patch
@@ -0,0 +1,11 @@
+--- origsrc/poptconfig.c	2009-05-20 08:18:07.000000000 -0500
++++ src/poptconfig.c	2012-03-29 18:13:46.869286100 -0500
+@@ -42,7 +42,7 @@ extern int glob_pattern_p (const char *_
+ /*@=declundef =exportheader =incondefs =protoparammatch =redecl =type @*/
+ #endif	/* __LCLINT__ */
+ 
+-#if !defined(__GLIBC__)
++#if !defined(__GLIBC__) && !defined(__CYGWIN__)
+ /* Return nonzero if PATTERN contains any metacharacters.
+    Metacharacters can be quoted with backslashes if QUOTE is nonzero.  */
+ static int
diff --git a/nixpkgs/pkgs/development/libraries/popt/1.16-vpath.patch b/nixpkgs/pkgs/development/libraries/popt/1.16-vpath.patch
new file mode 100644
index 000000000000..4cfa1c8fb4db
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/popt/1.16-vpath.patch
@@ -0,0 +1,34 @@
+--- origsrc/Doxyfile.in	2008-04-26 16:57:32.000000000 -0500
++++ src/Doxyfile.in	2012-03-29 18:15:56.649709100 -0500
+@@ -460,14 +460,14 @@ WARN_LOGFILE           =
+ # with spaces.
+ 
+ INPUT                  = \
+-                        ./popt.c \
+-                        ./popt.h \
+-                        ./poptconfig.c \
+-                        ./popthelp.c \
+-                        ./poptint.c \
+-                        ./poptint.h \
+-                        ./poptparse.c \
+-			./system.h
++                        @srcdir@/popt.c \
++                        @srcdir@/popt.h \
++                        @srcdir@/poptconfig.c \
++                        @srcdir@/popthelp.c \
++                        @srcdir@/poptint.c \
++                        @srcdir@/poptint.h \
++                        @srcdir@/poptparse.c \
++			@srcdir@/system.h
+ 
+ # If the value of the INPUT tag contains directories, you can use the 
+ # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+@@ -658,7 +658,7 @@ HTML_HEADER            =
+ # each generated HTML page. If it is left blank doxygen will generate a 
+ # standard footer.
+ 
+-HTML_FOOTER            = footer_no_timestamp.html
++HTML_FOOTER            = @srcdir@/footer_no_timestamp.html
+ 
+ # The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
+ # style sheet that is used by each HTML page. It can be used to 
diff --git a/nixpkgs/pkgs/development/libraries/popt/default.nix b/nixpkgs/pkgs/development/libraries/popt/default.nix
new file mode 100644
index 000000000000..fdccb4d09336
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/popt/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "popt";
+  version = "1.19";
+
+  src = fetchurl {
+    url = "https://ftp.osuosl.org/pub/rpm/popt/releases/popt-1.x/popt-${version}.tar.gz";
+    sha256 = "sha256-wlpIOPyOTByKrLi9Yg7bMISj1jv4mH/a08onWMYyQPk=";
+  };
+
+  patches = lib.optionals stdenv.isCygwin [
+    ./1.16-cygwin.patch
+    ./1.16-vpath.patch
+  ] ++ lib.optionals stdenv.hostPlatform.isMinGW [
+    # Do not require <sys/ioctl.h>
+    (fetchpatch2 {
+      url = "https://aur.archlinux.org/cgit/aur.git/plain/get-w32-console-maxcols.mingw32.patch?h=mingw-w64-popt&id=63f2cdb0de116362c49681cef20f7a8b4355e85a";
+      sha256 = "zv43l1RBqNzT/JG+jQaMVFaFv+ZYPuIiAtKUDzJJBbc=";
+      stripLen = 1;
+      extraPrefix = "src/";
+    })
+
+    # Do not try to detect setuid, it is not a thing.
+    (fetchpatch2 {
+      url = "https://github.com/rpm-software-management/popt/commit/905544c5d9767894edaf71a1e3ce5126944c5695.patch";
+      sha256 = "3PmcxeiEZ/Hof0zoVFSytEXvQ8gE8Sp5UdagExPVICU=";
+      stripLen = 1;
+      extraPrefix = "src/";
+      revert = true;
+    })
+  ];
+
+  doCheck = false; # fails
+
+  meta = with lib; {
+    homepage = "https://github.com/rpm-software-management/popt";
+    description = "Command line option parsing library";
+    maintainers = with maintainers; [ qyliss ];
+    license = licenses.mit;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/portaudio/default.nix b/nixpkgs/pkgs/development/libraries/portaudio/default.nix
new file mode 100644
index 000000000000..a109aad97b9d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/portaudio/default.nix
@@ -0,0 +1,67 @@
+{ lib
+, stdenv
+, fetchurl
+, alsa-lib
+, libjack2
+, pkg-config
+, which
+, AudioUnit
+, AudioToolbox
+, CoreAudio
+, CoreServices
+, Carbon }:
+
+stdenv.mkDerivation rec {
+  pname = "portaudio";
+  version = "190700_20210406";
+
+  src = fetchurl {
+    url = "https://files.portaudio.com/archives/pa_stable_v${version}.tgz";
+    sha256 = "1vrdrd42jsnffh6rq8ap2c6fr4g9fcld89z649fs06bwqx1bzvs7";
+  };
+
+  strictDeps = true;
+  nativeBuildInputs = [ pkg-config which ];
+  buildInputs = [ libjack2 ] ++ lib.optionals (!stdenv.isDarwin) [ alsa-lib ];
+
+  configureFlags = [ "--disable-mac-universal" "--enable-cxx" ];
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=nullability-inferred-on-nested-type -Wno-error=nullability-completeness-on-arrays -Wno-error=implicit-const-int-float-conversion";
+
+  propagatedBuildInputs = lib.optionals stdenv.isDarwin [ AudioUnit AudioToolbox CoreAudio CoreServices Carbon ];
+
+  # Disable parallel build as it fails as:
+  #   make: *** No rule to make target '../../../lib/libportaudio.la',
+  #     needed by 'libportaudiocpp.la'.  Stop.
+  # Next release should address it with
+  #     https://github.com/PortAudio/portaudio/commit/28d2781d9216115543aa3f0a0ffb7b4ee0fac551.patch
+  enableParallelBuilding = false;
+
+  postPatch = ''
+    # workaround for the configure script which expects an absolute path
+    export AR=$(which $AR)
+  '';
+
+  # not sure why, but all the headers seem to be installed by the make install
+  installPhase = ''
+    make install
+  '' + lib.optionalString (!stdenv.isDarwin) ''
+    # fixup .pc file to find alsa library
+    sed -i "s|-lasound|-L${alsa-lib.out}/lib -lasound|" "$out/lib/pkgconfig/"*.pc
+  '' + lib.optionalString stdenv.isDarwin ''
+    cp include/pa_mac_core.h $out/include/pa_mac_core.h
+  '';
+
+  meta = with lib; {
+    description = "Portable cross-platform Audio API";
+    homepage    = "https://www.portaudio.com/";
+    # Not exactly a bsd license, but alike
+    license     = licenses.mit;
+    maintainers = with maintainers; [ lovek323 ];
+    platforms   = platforms.unix;
+  };
+
+  passthru = {
+    api_version = 19;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/portmidi/default.nix b/nixpkgs/pkgs/development/libraries/portmidi/default.nix
new file mode 100644
index 000000000000..8e743f6a54b3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/portmidi/default.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, fetchFromGitHub, unzip, cmake, alsa-lib, Carbon, CoreAudio, CoreFoundation, CoreMIDI, CoreServices }:
+
+stdenv.mkDerivation rec {
+  pname = "portmidi";
+  version = "2.0.4";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-uqBeh9vBP6+V+FN4lfeGxePQcpZMDYUuAo/d9a5rQxU=";
+  };
+
+  cmakeFlags = [
+    "-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=Release"
+    "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=Release"
+    "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=Release"
+  ];
+
+  patches = [
+    # Add missing header include
+    ./missing-header.diff
+  ];
+
+  postInstall = let ext = stdenv.hostPlatform.extensions.sharedLibrary; in ''
+    ln -s libportmidi${ext} "$out/lib/libporttime${ext}"
+  '';
+
+  nativeBuildInputs = [ unzip cmake ];
+  buildInputs = lib.optionals stdenv.isLinux [
+    alsa-lib
+  ] ++ lib.optionals stdenv.isDarwin [
+    Carbon CoreAudio CoreFoundation CoreMIDI CoreServices
+  ];
+
+  hardeningDisable = [ "format" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/PortMidi/portmidi";
+    description = "Platform independent library for MIDI I/O";
+    license = licenses.mit;
+    maintainers = with maintainers; [ emilytrau ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/portmidi/missing-header.diff b/nixpkgs/pkgs/development/libraries/portmidi/missing-header.diff
new file mode 100644
index 000000000000..1fa1f147014e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/portmidi/missing-header.diff
@@ -0,0 +1,12 @@
+diff --git a/porttime/ptmacosx_mach.c b/porttime/ptmacosx_mach.c
+index 10c3554..712a974 100755
+--- a/porttime/ptmacosx_mach.c
++++ b/porttime/ptmacosx_mach.c
+@@ -12,6 +12,7 @@
+ 

+ #include "porttime.h"

+ #include "sys/time.h"

++#include "sys/qos.h"

+ #include "pthread.h"

+ 

+ #ifndef NSEC_PER_MSEC

diff --git a/nixpkgs/pkgs/development/libraries/ppl/default.nix b/nixpkgs/pkgs/development/libraries/ppl/default.nix
new file mode 100644
index 000000000000..d49f3e6bd538
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ppl/default.nix
@@ -0,0 +1,68 @@
+{ fetchurl, fetchpatch, lib, stdenv, gmpxx, perl, gnum4 }:
+
+let version = "1.2"; in
+
+stdenv.mkDerivation {
+  pname = "ppl";
+  inherit version;
+
+  src = fetchurl {
+    url = "http://bugseng.com/products/ppl/download/ftp/releases/${version}/ppl-${version}.tar.bz2";
+    sha256 = "1wgxcbgmijgk11df43aiqfzv31r3bkxmgb4yl68g21194q60nird";
+  };
+
+  patches = [(fetchpatch {
+    name = "clang5-support.patch";
+    url = "https://raw.githubusercontent.com/sagemath/sage/9.2/build/pkgs/ppl/patches/clang5-support.patch";
+    sha256 = "1zj90hm25pkgvk4jlkfzh18ak9b98217gbidl3731fdccbw6hr87";
+  })];
+
+  postPatch = lib.optionalString stdenv.cc.isClang ''
+    substituteInPlace src/PIP_Tree.cc \
+      --replace "std::auto_ptr" "std::unique_ptr"
+    substituteInPlace src/Powerset_inlines.hh src/Pointset_Powerset_inlines.hh \
+      --replace "std::mem_fun_ref" "std::mem_fn"
+  '';
+
+  nativeBuildInputs = [ perl gnum4 ];
+  propagatedBuildInputs = [ gmpxx ];
+
+  configureFlags = [ "--disable-watchdog" ] ++
+    lib.optionals stdenv.isDarwin [
+      "CPPFLAGS=-fexceptions"
+      "--disable-ppl_lcdd" "--disable-ppl_lpsol" "--disable-ppl_pips"
+    ];
+
+  # Beware!  It took ~6 hours to compile PPL and run its tests on a 1.2 GHz
+  # x86_64 box.  Nevertheless, being a dependency of GCC, it probably ought
+  # to be tested.
+  doCheck = false;
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "The Parma Polyhedra Library";
+
+    longDescription = ''
+      The Parma Polyhedra Library (PPL) provides numerical abstractions
+      especially targeted at applications in the field of analysis and
+      verification of complex systems.  These abstractions include convex
+      polyhedra, defined as the intersection of a finite number of (open or
+      closed) halfspaces, each described by a linear inequality (strict or
+      non-strict) with rational coefficients; some special classes of
+      polyhedra shapes that offer interesting complexity/precision tradeoffs;
+      and grids which represent regularly spaced points that satisfy a set of
+      linear congruence relations.  The library also supports finite
+      powersets and products of (any kind of) polyhedra and grids and a mixed
+      integer linear programming problem solver using an exact-arithmetic
+      version of the simplex algorithm.
+    '';
+
+    homepage = "http://bugseng.com/products/ppl/";
+
+    license = lib.licenses.gpl3Plus;
+
+    maintainers = [ ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pplite/default.nix b/nixpkgs/pkgs/development/libraries/pplite/default.nix
new file mode 100644
index 000000000000..c9c0d1863382
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pplite/default.nix
@@ -0,0 +1,19 @@
+{ stdenv, lib, fetchurl, flint, gmp }:
+
+stdenv.mkDerivation {
+  pname = "pplite";
+  version = "0.11";
+
+  src = fetchurl {
+    url = "https://github.com/ezaffanella/PPLite/raw/main/releases/pplite-0.11.tar.gz";
+    hash = "sha256-6IS5zVab8X+gnhK8/qbPH5FODFaG6vIsIG9TTEpfHEI=";
+  };
+
+  buildInputs = [ flint gmp ];
+
+  meta = {
+    homepage = "https://github.com/ezaffanella/PPLite";
+    description = "Convex polyhedra library for Abstract Interpretation";
+    license = lib.licenses.gpl3Only;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/precice/default.nix b/nixpkgs/pkgs/development/libraries/precice/default.nix
new file mode 100644
index 000000000000..873386e90abd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/precice/default.nix
@@ -0,0 +1,47 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, gcc, boost, eigen, libxml2, mpi, python3, petsc, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "precice";
+  version = "3.0.0";
+
+  src = fetchFromGitHub {
+    owner = "precice";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-RuZ18BFdusMHC+Yuapc2N8cEetLu32e28J34HH+gHOg=";
+  };
+
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/precice/precice/commit/9dffe04144ab0f6a92fbff9be91cda71718b9c8e.patch";
+      hash = "sha256-kSvIfBQH1mBA5CFJo9Usiypol0u9VgHMlUEHK/uHVNQ=";
+    })
+  ];
+
+  cmakeFlags = [
+    "-DPRECICE_PETScMapping=OFF"
+    "-DBUILD_SHARED_LIBS=ON"
+    "-DPYTHON_LIBRARIES=${python3.libPrefix}"
+    "-DPYTHON_INCLUDE_DIR=${python3}/include/${python3.libPrefix}"
+  ];
+
+  env.NIX_CFLAGS_COMPILE = toString (
+    lib.optionals stdenv.isDarwin [ "-D_GNU_SOURCE" ]
+    # libxml2-2.12 changed const qualifiers
+    ++ [ "-fpermissive" ]
+  );
+
+  nativeBuildInputs = [ cmake gcc pkg-config python3 python3.pkgs.numpy  ];
+  buildInputs = [ boost eigen libxml2 mpi petsc ];
+
+  meta = {
+    description = "preCICE stands for Precise Code Interaction Coupling Environment";
+    homepage = "https://precice.org/";
+    license = with lib.licenses; [ gpl3 ];
+    maintainers = with lib.maintainers; [ Scriptkiddi ];
+    mainProgram = "binprecice";
+    platforms = lib.platforms.unix;
+  };
+}
+
+
diff --git a/nixpkgs/pkgs/development/libraries/presage/default.nix b/nixpkgs/pkgs/development/libraries/presage/default.nix
new file mode 100644
index 000000000000..8f7e15867099
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/presage/default.nix
@@ -0,0 +1,76 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, autoreconfHook
+, dbus
+, doxygen
+, fontconfig
+, gettext
+, graphviz
+, help2man
+, pkg-config
+, sqlite
+, tinyxml
+, cppunit
+}:
+
+stdenv.mkDerivation rec {
+  pname = "presage";
+  version = "0.9.1";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/presage/presage/${version}/presage-${version}.tar.gz";
+    sha256 = "0rm3b3zaf6bd7hia0lr1wyvi1rrvxkn7hg05r5r1saj0a3ingmay";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "gcc6.patch";
+      url = "https://git.alpinelinux.org/aports/plain/community/presage/gcc6.patch?id=40e2044c9ecb36eacb3a1fd043f09548d210dc01";
+      sha256 = "0243nx1ygggmsly7057vndb4pkjxg9rpay5gyqqrq9jjzjzh63dj";
+    })
+    ./fixed-cppunit-detection.patch
+    # fix gcc11 build
+    (fetchpatch {
+      name = "presage-0.9.1-gcc11.patch";
+      url = "https://build.opensuse.org/public/source/openSUSE:Factory/presage/presage-0.9.1-gcc11.patch?rev=3f8b4b19c99276296d6ea595cc6c431f";
+      sha256 = "sha256-pLrIFXvJHRvv4x9gBIfal4Y68lByDE3XE2NZNiAXe9k=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+    doxygen
+    fontconfig
+    gettext
+    graphviz
+    help2man
+    pkg-config
+  ];
+
+  preBuild = ''
+    export FONTCONFIG_FILE=${fontconfig.out}/etc/fonts/fonts.conf
+  '';
+
+  buildInputs = [
+    dbus
+    sqlite
+    tinyxml
+  ];
+
+  nativeCheckInputs = [
+    cppunit
+  ];
+
+  doCheck = true;
+
+  checkTarget = "check";
+
+  meta = with lib; {
+    description = "An intelligent predictive text entry system";
+    homepage = "https://presage.sourceforge.io/";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ dotlambda ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/presage/fixed-cppunit-detection.patch b/nixpkgs/pkgs/development/libraries/presage/fixed-cppunit-detection.patch
new file mode 100644
index 000000000000..27238d2956d1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/presage/fixed-cppunit-detection.patch
@@ -0,0 +1,46 @@
+From 5624aa156c551ab2b81bb86279844397ed690653 Mon Sep 17 00:00:00 2001
+From: Matteo Vescovi <matteo.vescovi@yahoo.co.uk>
+Date: Sun, 21 Jan 2018 17:17:12 +0000
+Subject: [PATCH] Fixed cppunit detection.
+
+---
+ configure.ac | 16 +++++++++++-----
+ 1 file changed, 11 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index a02e9f1..1538a51 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -204,10 +204,16 @@ AM_CONDITIONAL([USE_SQLITE], [test "x$use_sqlite" = "xyes"])
+ dnl ==================
+ dnl Checks for CppUnit
+ dnl ==================
+-AM_PATH_CPPUNIT([1.9.6],
+-                [],
+-                [AC_MSG_WARN([CppUnit not found. Unit tests will not be built. CppUnit can be obtained from http://cppunit.sourceforge.net.])])
+-AM_CONDITIONAL([HAVE_CPPUNIT], [test "$CPPUNIT_LIBS"])
++PKG_CHECK_MODULES([CPPUNIT],
++                  [cppunit >= 1.9],
++                  [have_cppunit=yes],
++                  [AM_PATH_CPPUNIT([1.9],
++                                   [have_cppunit=yes],
++                                   [AC_MSG_WARN([CppUnit not found. Unit tests will not be built. CppUnit can be obtained from http://cppunit.sourceforge.net.])])
++                  ])
++AC_SUBST([CPPUNIT_CFLAGS])
++AC_SUBST([CPPUNIT_LIBS])
++AM_CONDITIONAL([HAVE_CPPUNIT], [test "x$have_cppunit" = "xyes"])
+ 
+ 
+ dnl ============================
+@@ -592,7 +598,7 @@ then
+ else
+     build_demo_application="no"
+ fi
+-if test "$CPPUNIT_LIBS"
++if test "x$have_cppunit" = "xyes"
+ then
+     build_unit_tests="yes"
+ else
+-- 
+2.31.1
+
diff --git a/nixpkgs/pkgs/development/libraries/prime-server/default.nix b/nixpkgs/pkgs/development/libraries/prime-server/default.nix
new file mode 100644
index 000000000000..946fbb0dff18
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/prime-server/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
+, curl, zeromq, czmq, libsodium }:
+
+stdenv.mkDerivation rec {
+  pname = "prime-server";
+  version = "0.7.0";
+
+  src = fetchFromGitHub {
+    owner = "kevinkreiser";
+    repo = "prime_server";
+    rev = version;
+    sha256 = "0izmmvi3pvidhlrgfpg4ccblrw6fil3ddxg5cfxsz4qbh399x83w";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ curl zeromq czmq libsodium ];
+
+  # https://github.com/kevinkreiser/prime_server/issues/95
+  env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=unused-variable" ];
+
+  meta = with lib; {
+    description = "Non-blocking (web)server API for distributed computing and SOA based on zeromq";
+    homepage = "https://github.com/kevinkreiser/prime_server";
+    license = licenses.bsd2;
+    maintainers = [ maintainers.Thra11 ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/process-cpp/default.nix b/nixpkgs/pkgs/development/libraries/process-cpp/default.nix
new file mode 100644
index 000000000000..f73f72e4545d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/process-cpp/default.nix
@@ -0,0 +1,50 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, cmake
+, boost
+, properties-cpp
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "process-cpp";
+  version = "unstable-2021-05-11";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.com";
+    owner = "ubports";
+    repo = "development/core/lib-cpp/process-cpp";
+    rev = "ee6d99a3278343f5fdcec7ed3dad38763e257310";
+    sha256 = "sha256-jDYXKCzrg/ZGFC2xpyfkn/f7J3t0cdOwHK2mLlYWNN0=";
+  };
+
+  postPatch = ''
+    # Excludes tests from tainting nativeBuildInputs with their dependencies when not being run
+    # Tests fail upon verifying OOM score adjustment via /proc/<pid>/oom_score
+    # [ RUN      ] LinuxProcess.adjusting_proc_oom_score_adj_works
+    # /build/source/tests/linux_process_test.cpp:83: Failure
+    # Value of: is_approximately_equal(oom_score.value, core::posix::linux::proc::process::OomScoreAdj::max_value())
+    #   Actual: false (333 > 10)
+    # Expected: true
+    sed -i '/tests/d' CMakeLists.txt
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    boost
+    properties-cpp
+  ];
+
+  meta = with lib; {
+    description = "A simple convenience library for handling processes in C++11";
+    homepage = "https://gitlab.com/ubports/development/core/lib-cpp/process-cpp";
+    license = with licenses; [ gpl3Only lgpl3Only ];
+    maintainers = with maintainers; [ onny ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/proj-datumgrid/default.nix b/nixpkgs/pkgs/development/libraries/proj-datumgrid/default.nix
new file mode 100644
index 000000000000..2fa5a4d268cc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/proj-datumgrid/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "proj-datumgrid";
+  version = "world-1.0";
+
+  src = fetchFromGitHub {
+    owner = "OSGeo";
+    repo = "proj-datumgrid";
+    rev = version;
+    sha256 = "132wp77fszx33wann0fjkmi1isxvsb0v9iw0gd9sxapa9h6hf3am";
+  };
+
+  sourceRoot = "${src.name}/scripts";
+
+  buildPhase = ''
+    $CC nad2bin.c -o nad2bin
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp nad2bin $out/bin/
+  '';
+
+  meta = with lib; {
+    description = "Repository for proj datum grids";
+    homepage = "https://proj4.org";
+    license = licenses.mit;
+    maintainers = with maintainers; [ ];
+    mainProgram = "nad2bin";
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/proj/7.nix b/nixpkgs/pkgs/development/libraries/proj/7.nix
new file mode 100644
index 000000000000..cfd115638802
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/proj/7.nix
@@ -0,0 +1,63 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, sqlite
+, libtiff
+, curl
+, gtest
+, fetchpatch
+}:
+
+stdenv.mkDerivation rec {
+  pname = "proj";
+  version = "7.2.1";
+
+  src = fetchFromGitHub {
+    owner = "OSGeo";
+    repo = "PROJ";
+    rev = version;
+    sha256 = "0mymvfvs8xggl4axvlj7kc1ksd9g94kaz6w1vdv0x2y5mqk93gx9";
+  };
+
+  patches = [
+    (fetchpatch { # https://github.com/OSGeo/PROJ/issues/2557
+      name = "gie_self_tests-fail.diff"; # included in >= 8.0.1
+      url = "https://github.com/OSGeo/PROJ/commit/6f1a3c4648bf06862dca0b3725cbb3b7ee0284e3.diff";
+      sha256 = "0gapny0a9c3r0x9szjgn86sspjrrf4vwbija77b17w6ci5cq4pdf";
+    })
+    ./tests-sqlite-3.39.patch
+  ];
+
+  postPatch = lib.optionalString (version == "7.2.1") ''
+    substituteInPlace CMakeLists.txt \
+      --replace "MAJOR 7 MINOR 2 PATCH 0" "MAJOR 7 MINOR 2 PATCH 1"
+  '';
+
+  outputs = [ "out" "dev"];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [ sqlite libtiff curl ];
+
+  nativeCheckInputs = [ gtest ];
+
+  cmakeFlags = [
+    "-DUSE_EXTERNAL_GTEST=ON"
+  ];
+  CXXFLAGS = [
+    # GCC 13: error: 'int64_t' in namespace 'std' does not name a type
+    "-include cstdint"
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Cartographic Projections Library";
+    homepage = "https://proj4.org";
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ dotlambda ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/proj/default.nix b/nixpkgs/pkgs/development/libraries/proj/default.nix
new file mode 100644
index 000000000000..326f219cddda
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/proj/default.nix
@@ -0,0 +1,78 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, pkg-config
+, buildPackages
+, callPackage
+, sqlite
+, libtiff
+, curl
+, gtest
+, nlohmann_json
+, python3
+, cacert
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "proj";
+  version = "9.3.1";
+
+  src = fetchFromGitHub {
+    owner = "OSGeo";
+    repo = "PROJ";
+    rev = finalAttrs.version;
+    hash = "sha256-M8Zgy5xnmZu7mzxXXGqaIfe7o7iMf/1sOJVOBsTvtdQ=";
+  };
+
+  patches = [
+    # https://github.com/OSGeo/PROJ/pull/3252
+    ./only-add-curl-for-static-builds.patch
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [ sqlite libtiff curl nlohmann_json ];
+
+  nativeCheckInputs = [ cacert gtest ];
+
+  cmakeFlags = [
+    "-DUSE_EXTERNAL_GTEST=ON"
+    "-DRUN_NETWORK_DEPENDENT_TESTS=OFF"
+    "-DNLOHMANN_JSON_ORIGIN=external"
+    "-DEXE_SQLITE3=${buildPackages.sqlite}/bin/sqlite3"
+  ];
+  CXXFLAGS = [
+    # GCC 13: error: 'int64_t' in namespace 'std' does not name a type
+    "-include cstdint"
+  ];
+
+  preCheck =
+    let
+      libPathEnvVar = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH";
+    in
+      ''
+        export HOME=$TMPDIR
+        export TMP=$TMPDIR
+        export ${libPathEnvVar}=$PWD/lib
+      '';
+
+  doCheck = true;
+
+  passthru.tests = {
+    python = python3.pkgs.pyproj;
+    proj = callPackage ./tests.nix { proj = finalAttrs.finalPackage; };
+  };
+
+  meta = with lib; {
+    changelog = "https://github.com/OSGeo/PROJ/blob/${finalAttrs.src.rev}/NEWS";
+    description = "Cartographic Projections Library";
+    homepage = "https://proj.org/";
+    license = licenses.mit;
+    maintainers = with maintainers; teams.geospatial.members ++ [ dotlambda ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/proj/only-add-curl-for-static-builds.patch b/nixpkgs/pkgs/development/libraries/proj/only-add-curl-for-static-builds.patch
new file mode 100644
index 000000000000..394476787a91
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/proj/only-add-curl-for-static-builds.patch
@@ -0,0 +1,37 @@
+From 54b1dbc550b3daa2a7834a9bfd73a0c2f8aeba6a Mon Sep 17 00:00:00 2001
+From: Even Rouault <even.rouault@spatialys.com>
+Date: Tue, 5 Jul 2022 19:40:53 +0200
+Subject: [PATCH] proj-config.cmake generation: only add find_dependency(CURL)
+ for static builds
+
+---
+ cmake/project-config.cmake.in | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/cmake/project-config.cmake.in b/cmake/project-config.cmake.in
+index 3f359668..db886396 100644
+--- a/cmake/project-config.cmake.in
++++ b/cmake/project-config.cmake.in
+@@ -19,11 +19,15 @@ include(CMakeFindDependencyMacro)
+ # Cf https://gitlab.kitware.com/cmake/cmake/-/issues/17612
+ cmake_policy(PUSH)
+ cmake_policy(SET CMP0012 NEW)
+-if("@ENABLE_TIFF@")
+-    set(PROJ_CONFIG_FIND_TIFF_DEP ON)
++if(NOT "@BUILD_SHARED_LIBS@")
++    if("@ENABLE_TIFF@")
++        set(PROJ_CONFIG_FIND_TIFF_DEP ON)
++    endif()
+ endif()
+-if("@CURL_ENABLED@")
+-    set(PROJ_CONFIG_FIND_CURL_DEP ON)
++if(NOT "@BUILD_SHARED_LIBS@")
++    if("@CURL_ENABLED@")
++        set(PROJ_CONFIG_FIND_CURL_DEP ON)
++    endif()
+ endif()
+ cmake_policy(POP)
+ 
+-- 
+2.41.0
+
diff --git a/nixpkgs/pkgs/development/libraries/proj/tests-sqlite-3.39.patch b/nixpkgs/pkgs/development/libraries/proj/tests-sqlite-3.39.patch
new file mode 100644
index 000000000000..0654ff5eadb6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/proj/tests-sqlite-3.39.patch
@@ -0,0 +1,13 @@
+Drop tests that time out with newest sqlite.
+https://github.com/OSGeo/PROJ/issues/3254
+
+--- a/test/cli/CMakeLists.txt
++++ b/test/cli/CMakeLists.txt
+@@ -16 +15,0 @@
+-proj_add_test_script_sh("testprojinfo" PROJINFO_BIN)
+--- a/test/unit/CMakeLists.txt
++++ b/test/unit/CMakeLists.txt
+@@ -144,3 +143,0 @@
+-add_test(NAME proj_test_cpp_api COMMAND proj_test_cpp_api)
+-set_property(TEST proj_test_cpp_api
+-  PROPERTY ENVIRONMENT ${PROJ_TEST_ENVIRONMENT})
diff --git a/nixpkgs/pkgs/development/libraries/proj/tests.nix b/nixpkgs/pkgs/development/libraries/proj/tests.nix
new file mode 100644
index 000000000000..38126f06dd4d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/proj/tests.nix
@@ -0,0 +1,11 @@
+{ runCommand, proj }:
+
+let
+  inherit (proj) pname;
+in
+runCommand "${pname}-tests" { meta.timeout = 60; }
+  ''
+    ${proj}/bin/projinfo EPSG:4326 \
+      | grep '+proj=longlat +datum=WGS84 +no_defs +type=crs'
+    touch $out
+  ''
diff --git a/nixpkgs/pkgs/development/libraries/prometheus-client-c/default.nix b/nixpkgs/pkgs/development/libraries/prometheus-client-c/default.nix
new file mode 100644
index 000000000000..f9f580c9717c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/prometheus-client-c/default.nix
@@ -0,0 +1,78 @@
+{ lib, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, libmicrohttpd
+}:
+let
+  build =
+    { pname
+    , subdir
+    , buildInputs ? [ ]
+    , description
+    }:
+    stdenv.mkDerivation rec {
+      inherit pname;
+      version = "0.1.1";
+
+      src = fetchFromGitHub {
+        owner = "digitalocean";
+        repo = "prometheus-client-c";
+        rev = "v${version}";
+        sha256 = "0g69s24xwrv5974acshrhnp6i8rpby8c6bhz15m3d8kpgjw3cm8f";
+      };
+
+      nativeBuildInputs = [ cmake ];
+      inherit buildInputs;
+
+      # These patches will be in 0.1.2
+      patches = [
+        # Required so CMAKE_INSTALL_PREFIX is honored, otherwise it
+        # installs headers in /usr/include (absolute)
+        (
+          fetchpatch {
+            url = "https://github.com/digitalocean/prometheus-client-c/commit/5fcedeb506b7d47dd7bab35797f2c3f23db6fe10.patch";
+            sha256 = "10hzg8v5jcgxz224kdq0nha9vs78wz098b0ys7gig2iwgrg018fy";
+          }
+        )
+        (
+          fetchpatch {
+            url = "https://github.com/digitalocean/prometheus-client-c/commit/0c15e7e45ad0c3726593591fdd7d8f2fde845fe3.patch";
+            sha256 = "06899v1xz3lpsdxww4p3q7pv8nrymnibncdc472056znr5fidlp0";
+          }
+        )
+      ];
+
+      # Workaround build failure on -fno-common toolchains like upstream
+      # gcc-10. Otherwise build fails as:
+      #   ld: CMakeFiles/prom.dir/src/prom_process_stat.c.o:(.bss+0x0): multiple definition of
+      #     `prom_process_start_time_seconds'; CMakeFiles/prom.dir/src/prom_collector.c.o:(.bss+0x0): first defined here
+      # Should be fixed in 1.2.0 and later: https://github.com/digitalocean/prometheus-client-c/pull/25
+      env.NIX_CFLAGS_COMPILE = "-fcommon";
+
+      preConfigure = ''
+        cd ${subdir}
+      '';
+
+      meta = {
+        homepage = "https://github.com/digitalocean/prometheus-client-c/";
+        inherit description;
+        platforms = lib.platforms.unix;
+        license = lib.licenses.asl20;
+        maintainers = [ lib.maintainers.cfsmp3 ];
+      };
+    };
+in
+rec {
+  libprom = build {
+    pname = "libprom";
+    subdir = "prom";
+    description = "A Prometheus Client in C";
+  };
+  libpromhttp = build {
+    pname = "libpromhttp";
+    subdir = "promhttp";
+    buildInputs = [ libmicrohttpd libprom ];
+    description = "A Prometheus HTTP Endpoint in C";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/prometheus-cpp/default.nix b/nixpkgs/pkgs/development/libraries/prometheus-cpp/default.nix
new file mode 100644
index 000000000000..dda515932f2c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/prometheus-cpp/default.nix
@@ -0,0 +1,46 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, gbenchmark
+, gtest
+, civetweb
+, zlib
+, curl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "prometheus-cpp";
+  version = "1.1.0";
+
+  src = fetchFromGitHub {
+    owner = "jupp0r";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-qx6oBxd0YrUyFq+7ArnKBqOwrl5X8RS9nErhRDUJ7+8=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ gbenchmark gtest zlib curl ];
+  propagatedBuildInputs = [ civetweb ];
+  strictDeps = true;
+
+  cmakeFlags = [
+    "-DUSE_THIRDPARTY_LIBRARIES=OFF"
+    "-DBUILD_SHARED_LIBS=ON"
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  postInstall = ''
+    mkdir -p $dev/lib/pkgconfig
+    substituteAll ${./prometheus-cpp.pc.in} $dev/lib/pkgconfig/prometheus-cpp.pc
+  '';
+
+  meta = {
+    description = "Prometheus Client Library for Modern C++";
+    homepage = "https://github.com/jupp0r/prometheus-cpp";
+    license = [ lib.licenses.mit ];
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/prometheus-cpp/prometheus-cpp.pc.in b/nixpkgs/pkgs/development/libraries/prometheus-cpp/prometheus-cpp.pc.in
new file mode 100644
index 000000000000..c373f4153b55
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/prometheus-cpp/prometheus-cpp.pc.in
@@ -0,0 +1,10 @@
+prefix=@out@
+includedir=${prefix}/include
+libdir=${prefix}/lib
+
+Name: prometheus-cpp
+Description: Prometheus Client Library for Modern C++
+URL: https://github.com/jupp0r/prometheus-cpp
+Version: @version@
+Cflags: -isystem${includedir}
+Libs: -Wl,-rpath,${libdir} -L${libdir} -lprometheus-cpp-core -lprometheus-cpp-pull -lprometheus-cpp-push
diff --git a/nixpkgs/pkgs/development/libraries/properties-cpp/default.nix b/nixpkgs/pkgs/development/libraries/properties-cpp/default.nix
new file mode 100644
index 000000000000..65ad4ed6a293
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/properties-cpp/default.nix
@@ -0,0 +1,63 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, gitUpdater
+, testers
+, cmake
+, pkg-config
+, gtest
+, doxygen
+, graphviz
+, lomiri
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "properties-cpp";
+  version = "0.0.3";
+
+  src = fetchFromGitLab {
+    owner = "ubports";
+    repo = "development/core/lib-cpp/properties-cpp";
+    rev = finalAttrs.version;
+    hash = "sha256-C/BDEuKNMQHOjATO5aWBptjIlgfv6ykzjFAsHb6uP3Q=";
+  };
+
+  postPatch = lib.optionalString (!finalAttrs.finalPackage.doCheck) ''
+    sed -i "/add_subdirectory(tests)/d" CMakeLists.txt
+  '';
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    cmake
+    doxygen
+    graphviz
+    pkg-config
+  ];
+
+  buildInputs = [
+    lomiri.cmake-extras
+  ];
+
+  checkInputs = [
+    gtest
+  ];
+
+  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
+
+  passthru = {
+    tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+    updateScript = gitUpdater { };
+  };
+
+  meta = with lib; {
+    homepage = "https://gitlab.com/ubports/development/core/lib-cpp/properties-cpp";
+    description = "A very simple convenience library for handling properties and signals in C++11";
+    license = licenses.lgpl3Only;
+    maintainers = with maintainers; [ edwtjo ];
+    platforms = platforms.linux;
+    pkgConfigModules = [
+      "properties-cpp"
+    ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/protobuf/21.nix b/nixpkgs/pkgs/development/libraries/protobuf/21.nix
new file mode 100644
index 000000000000..09a8c81b3d13
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/protobuf/21.nix
@@ -0,0 +1,6 @@
+{ callPackage, ... } @ args:
+
+callPackage ./generic.nix ({
+  version = "21.12";
+  hash = "sha256-VZQEFHq17UsTH5CZZOcJBKiScGV2xPJ/e6gkkVliRCU=";
+} // args)
diff --git a/nixpkgs/pkgs/development/libraries/protobuf/23.nix b/nixpkgs/pkgs/development/libraries/protobuf/23.nix
new file mode 100644
index 000000000000..abb2cc2f4460
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/protobuf/23.nix
@@ -0,0 +1,6 @@
+{ callPackage, ... } @ args:
+
+callPackage ./generic.nix ({
+  version = "23.4";
+  hash = "sha256-eI+mrsZAOLEsdyTC3B+K+GjD3r16CmPx1KJ2KhCwFdg=";
+} // args)
diff --git a/nixpkgs/pkgs/development/libraries/protobuf/24.nix b/nixpkgs/pkgs/development/libraries/protobuf/24.nix
new file mode 100644
index 000000000000..6741b8afe52e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/protobuf/24.nix
@@ -0,0 +1,6 @@
+{ callPackage, ... } @ args:
+
+callPackage ./generic.nix ({
+  version = "24.4";
+  hash = "sha256-I+Xtq4GOs++f/RlVff9MZuolXrMLmrZ2z6mkBayqQ2s=";
+} // args)
diff --git a/nixpkgs/pkgs/development/libraries/protobuf/25.nix b/nixpkgs/pkgs/development/libraries/protobuf/25.nix
new file mode 100644
index 000000000000..782906d0b5b7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/protobuf/25.nix
@@ -0,0 +1,6 @@
+{ callPackage, ... } @ args:
+
+callPackage ./generic.nix ({
+  version = "25.3";
+  hash = "sha256-N/mO9a6NyC0GwxY3/u1fbFbkfH7NTkyuIti6L3bc+7k=";
+} // args)
diff --git a/nixpkgs/pkgs/development/libraries/protobuf/3.20.nix b/nixpkgs/pkgs/development/libraries/protobuf/3.20.nix
new file mode 100644
index 000000000000..bae3550f8f05
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/protobuf/3.20.nix
@@ -0,0 +1,6 @@
+{ callPackage, ... } @ args:
+
+callPackage ./generic-v3.nix ({
+  version = "3.20.3";
+  sha256 = "sha256-u/1Yb8+mnDzc3OwirpGESuhjkuKPgqDAvlgo3uuzbbk=";
+} // args)
diff --git a/nixpkgs/pkgs/development/libraries/protobuf/generic-v3.nix b/nixpkgs/pkgs/development/libraries/protobuf/generic-v3.nix
new file mode 100644
index 000000000000..9dc7f70c2fe2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/protobuf/generic-v3.nix
@@ -0,0 +1,59 @@
+{ lib, stdenv
+, fetchFromGitHub
+, autoreconfHook, zlib, gtest, buildPackages
+, version, sha256
+, ...
+}:
+
+let
+mkProtobufDerivation = buildProtobuf: stdenv: stdenv.mkDerivation {
+  pname = "protobuf";
+  inherit version;
+
+  # make sure you test also -A pythonPackages.protobuf
+  src = fetchFromGitHub {
+    owner = "protocolbuffers";
+    repo = "protobuf";
+    rev = "v${version}";
+    inherit sha256;
+  };
+
+  postPatch = ''
+    rm -rf gmock
+    cp -r ${gtest.src}/googlemock gmock
+    cp -r ${gtest.src}/googletest googletest
+    chmod -R a+w gmock
+    chmod -R a+w googletest
+    ln -s ../googletest gmock/gtest
+  '' + lib.optionalString stdenv.isDarwin ''
+    substituteInPlace src/google/protobuf/testing/googletest.cc \
+      --replace 'tmpnam(b)' '"'$TMPDIR'/foo"'
+  '';
+
+  nativeBuildInputs = [ autoreconfHook buildPackages.which buildPackages.stdenv.cc buildProtobuf ];
+
+  buildInputs = [ zlib ];
+  configureFlags = lib.optional (buildProtobuf != null) "--with-protoc=${buildProtobuf}/bin/protoc";
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  dontDisableStatic = true;
+
+  meta = {
+    description = "Google's data interchange format";
+    longDescription =
+      ''Protocol Buffers are a way of encoding structured data in an efficient
+        yet extensible format. Google uses Protocol Buffers for almost all of
+        its internal RPC protocols and file formats.
+      '';
+    homepage = "https://developers.google.com/protocol-buffers/";
+    license = lib.licenses.bsd3;
+    mainProgram = "protoc";
+    platforms = lib.platforms.unix;
+  };
+};
+in mkProtobufDerivation(if (stdenv.buildPlatform != stdenv.hostPlatform)
+                        then (mkProtobufDerivation null buildPackages.stdenv)
+                        else null) stdenv
diff --git a/nixpkgs/pkgs/development/libraries/protobuf/generic.nix b/nixpkgs/pkgs/development/libraries/protobuf/generic.nix
new file mode 100644
index 000000000000..cf00d1d50beb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/protobuf/generic.nix
@@ -0,0 +1,114 @@
+# The cmake version of this build is meant to enable both cmake and .pc being exported
+# this is important because grpc exports a .cmake file which also expects for protobuf
+# to have been exported through cmake as well.
+{ lib
+, stdenv
+, abseil-cpp
+, buildPackages
+, cmake
+, fetchFromGitHub
+, fetchpatch
+, gtest
+, zlib
+, version
+, hash
+
+  # downstream dependencies
+, python3
+, grpc
+, enableShared ? !stdenv.hostPlatform.isStatic
+
+, ...
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "protobuf";
+  inherit version;
+
+  src = fetchFromGitHub {
+    owner = "protocolbuffers";
+    repo = "protobuf";
+    rev = "v${version}";
+    inherit hash;
+  };
+
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace src/google/protobuf/testing/googletest.cc \
+      --replace 'tmpnam(b)' '"'$TMPDIR'/foo"'
+  '';
+
+  patches = lib.optionals (lib.versionOlder version "22") [
+    # fix protobuf-targets.cmake installation paths, and allow for CMAKE_INSTALL_LIBDIR to be absolute
+    # https://github.com/protocolbuffers/protobuf/pull/10090
+    (fetchpatch {
+      url = "https://github.com/protocolbuffers/protobuf/commit/a7324f88e92bc16b57f3683403b6c993bf68070b.patch";
+      hash = "sha256-SmwaUjOjjZulg/wgNmR/F5b8rhYA2wkKAjHIOxjcQdQ=";
+    })
+  ] ++ lib.optionals stdenv.hostPlatform.isStatic [
+    ./static-executables-have-no-rpath.patch
+  ];
+
+  nativeBuildInputs = [
+    cmake
+  ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    # protoc of the same version must be available for build. For non-cross builds, it's able to
+    # re-use the executable generated as part of the build
+    buildPackages."protobuf_${lib.versions.major version}"
+  ];
+
+  buildInputs = [
+    gtest
+    zlib
+  ];
+
+  propagatedBuildInputs = [
+    abseil-cpp
+  ];
+
+  strictDeps = true;
+
+  cmakeDir = if lib.versionOlder version "22" then "../cmake" else null;
+  cmakeFlags = [
+    "-Dprotobuf_USE_EXTERNAL_GTEST=ON"
+    "-Dprotobuf_ABSL_PROVIDER=package"
+  ] ++ lib.optionals enableShared [
+    "-Dprotobuf_BUILD_SHARED_LIBS=ON"
+  ]
+  # Tests fail to build on 32-bit platforms; fixed in 22.x
+  # https://github.com/protocolbuffers/protobuf/issues/10418
+  ++ lib.optionals (stdenv.hostPlatform.is32bit && lib.versionOlder version "22") [
+    "-Dprotobuf_BUILD_TESTS=OFF"
+  ];
+
+  # FIXME: investigate.  24.x and 23.x have different errors.
+  # At least some of it is not reproduced on some other machine; example:
+  # https://hydra.nixos.org/build/235677717/nixlog/4/tail
+  # Also AnyTest.TestPackFromSerializationExceedsSizeLimit fails on 32-bit platforms
+  # https://github.com/protocolbuffers/protobuf/issues/8460
+  doCheck = !(stdenv.isDarwin && lib.versionAtLeast version "23") && !stdenv.hostPlatform.is32bit;
+
+  passthru = {
+    tests = {
+      pythonProtobuf = python3.pkgs.protobuf.override (_: {
+        protobuf = finalAttrs.finalPackage;
+      });
+      inherit grpc;
+    };
+
+    inherit abseil-cpp;
+  };
+
+  meta = {
+    description = "Google's data interchange format";
+    longDescription = ''
+      Protocol Buffers are a way of encoding structured data in an efficient
+      yet extensible format. Google uses Protocol Buffers for almost all of
+      its internal RPC protocols and file formats.
+    '';
+    license = lib.licenses.bsd3;
+    platforms = lib.platforms.all;
+    homepage = "https://protobuf.dev/";
+    maintainers = with lib.maintainers; [ jonringer ];
+    mainProgram = "protoc";
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/protobuf/static-executables-have-no-rpath.patch b/nixpkgs/pkgs/development/libraries/protobuf/static-executables-have-no-rpath.patch
new file mode 100644
index 000000000000..cd2474e14590
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/protobuf/static-executables-have-no-rpath.patch
@@ -0,0 +1,18 @@
+diff --git a/cmake/install.cmake b/cmake/install.cmake
+index 26a55be8b..b6823c3f9 100644
+--- a/cmake/install.cmake
++++ b/cmake/install.cmake
+@@ -32,13 +32,6 @@ if (protobuf_BUILD_PROTOC_BINARIES)
+   install(TARGETS protoc EXPORT protobuf-targets
+     RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc
+     BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc)
+-  if (UNIX AND NOT APPLE)
+-    set_property(TARGET protoc
+-      PROPERTY INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
+-  elseif (APPLE)
+-    set_property(TARGET protoc
+-      PROPERTY INSTALL_RPATH "@loader_path/../lib")
+-  endif()
+ endif (protobuf_BUILD_PROTOC_BINARIES)
+ 
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc ${CMAKE_CURRENT_BINARY_DIR}/protobuf-lite.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
diff --git a/nixpkgs/pkgs/development/libraries/protobufc/default.nix b/nixpkgs/pkgs/development/libraries/protobufc/default.nix
new file mode 100644
index 000000000000..d152512783f0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/protobufc/default.nix
@@ -0,0 +1,35 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+, protobuf
+, zlib
+, buildPackages
+}:
+
+stdenv.mkDerivation rec {
+  pname = "protobuf-c";
+  version = "unstable-2023-07-08";
+
+  src = fetchFromGitHub {
+    owner = "protobuf-c";
+    repo = "protobuf-c";
+    rev = "fa86fddbd000316772d1deb5a8d1201fa7599ef7";
+    hash = "sha256-pmqZYFREPgSrWPekymTglhtAv6gQR1gP3dOl3hqjYig=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  buildInputs = [ protobuf zlib ];
+
+  env.PROTOC = lib.getExe buildPackages.protobuf;
+
+  meta = with lib; {
+    homepage = "https://github.com/protobuf-c/protobuf-c/";
+    description = "C bindings for Google's Protocol Buffers";
+    license = licenses.bsd2;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ nickcao ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/protolock/default.nix b/nixpkgs/pkgs/development/libraries/protolock/default.nix
new file mode 100644
index 000000000000..c1b54306dca8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/protolock/default.nix
@@ -0,0 +1,26 @@
+{ lib, buildGoModule, fetchFromGitHub }:
+
+buildGoModule rec {
+  pname = "protolock";
+  version = "0.17.0";
+
+  src = fetchFromGitHub {
+    owner = "nilslice";
+    repo = "protolock";
+    rev = "v${version}";
+    sha256 = "sha256-+7kU4nCBwCA6mnjFrejPrIILYUSfYpq13d+0MmNZoBg=";
+  };
+
+  vendorHash = "sha256-lJhtZQ9S7/h3dSZ72O2l8oHHf3tEmGKC2PPAms09Itc=";
+
+  postInstall = ''
+    rm $out/bin/plugin*
+  '';
+
+  meta = with lib; {
+    description = "Protocol Buffer companion tool. Track your .proto files and prevent changes to messages and services which impact API compatibility. https://protolock.dev";
+    homepage = "https://github.com/nilslice/protolock";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ groodt ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/prototypejs/default.nix b/nixpkgs/pkgs/development/libraries/prototypejs/default.nix
new file mode 100644
index 000000000000..fd06b49604ad
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/prototypejs/default.nix
@@ -0,0 +1,23 @@
+{ lib, fetchurl, ... }:
+let
+  version = "1.7.3.0";
+in fetchurl {
+  name = "prototype-${version}.js";
+  url = "https://ajax.googleapis.com/ajax/libs/prototype/${version}/prototype.js";
+  sha256 = "0q43vvrsb22h4jvavs1gk3v4ps61yx9k85b5n6q9mxivhmxprg26";
+
+  meta = with lib; {
+    description = "A foundation for ambitious web user interfaces";
+    longDescription = ''
+      Prototype takes the complexity out of client-side web
+      programming. Built to solve real-world problems, it adds
+      useful extensions to the browser scripting environment
+      and provides elegant APIs around the clumsy interfaces
+      of Ajax and the Document Object Model.
+    '';
+    homepage = "http://prototypejs.org/";
+    downloadPage = "http://prototypejs.org/download/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ das_j ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/protozero/default.nix b/nixpkgs/pkgs/development/libraries/protozero/default.nix
new file mode 100644
index 000000000000..1e35ab700a08
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/protozero/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "protozero";
+  version = "1.7.1";
+
+  src = fetchFromGitHub {
+    owner = "mapbox";
+    repo = "protozero";
+    rev = "v${version}";
+    sha256 = "sha256-R8lGewsEOxPNbKlkIeiM4yIwUcTzi2Dm0+xJ2WrBTBQ=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "Minimalistic protocol buffer decoder and encoder in C++";
+    homepage = "https://github.com/mapbox/protozero";
+    license = with licenses; [ bsd2 asl20 ];
+    changelog = [
+      "https://github.com/mapbox/protozero/releases/tag/v${version}"
+      "https://github.com/mapbox/protozero/blob/v${version}/CHANGELOG.md"
+    ];
+    maintainers = with maintainers; [ das-g ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pslib/default.nix b/nixpkgs/pkgs/development/libraries/pslib/default.nix
new file mode 100644
index 000000000000..94dead43a43e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pslib/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchurl, cmake, pkg-config, zlib, libpng, libjpeg, giflib, libtiff
+}:
+
+stdenv.mkDerivation rec {
+  pname = "pslib";
+  version = "0.4.6";
+
+  src = fetchurl {
+    name = "${pname}-snixource-${version}.tar.gz";
+    url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
+    sha256 = "0m191ckqj1kj2yvxiilqw26x4vrn7pnlc2vy636yphjxr02q8bk4";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ zlib libpng libjpeg giflib libtiff ];
+
+  doCheck = true;
+
+  outputs = [ "out" "dev" "doc" ];
+
+  installPhase = ''
+    mkdir -p $out/lib
+    for path in *.so *.so.* *.o *.o.*; do
+      mv $path $out/lib/
+    done
+    mkdir -p $dev/include
+    mv ../include/libps $dev/include
+    if test -d nix-support; then
+      mv nix-support $dev
+    fi
+    mkdir -p $doc/share/doc/${pname}
+    cp -r ../doc/. $doc/share/doc/${pname}
+  '';
+
+  meta = with lib; {
+    description = "A C-library for generating multi page PostScript documents";
+    homepage = "https://pslib.sourceforge.net/";
+    changelog =
+      "https://sourceforge.net/p/pslib/git/ci/master/tree/pslib/ChangeLog";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ ShamrockLee ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/psol/default.nix b/nixpkgs/pkgs/development/libraries/psol/default.nix
new file mode 100644
index 000000000000..b6b9d0bac513
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/psol/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenvNoCC, fetchurl }:
+
+stdenvNoCC.mkDerivation rec {
+  pname = "psol";
+  version = "1.13.35.2"; # Latest stable, 2018-02-05
+
+  src = fetchurl {
+    url = "https://dl.google.com/dl/page-speed/psol/${version}-x64.tar.gz";
+    hash = "sha256-3zujyPxU4ThF0KHap6bj2YMSbCORKFG7+Lo1vmRqQ08=";
+  };
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out
+    mv include lib -t $out
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "PageSpeed Optimization Libraries";
+    homepage = "https://developers.google.com/speed/pagespeed/psol";
+    license = licenses.asl20;
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+    # WARNING: This only works with Linux because the pre-built PSOL binary is only supplied for Linux.
+    # TODO: Build PSOL from source to support more platforms.
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/psqlodbc/default.nix b/nixpkgs/pkgs/development/libraries/psqlodbc/default.nix
new file mode 100644
index 000000000000..d8c2b3dec1a4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/psqlodbc/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl, libiodbc, postgresql, openssl }:
+
+stdenv.mkDerivation rec {
+  pname = "psqlodbc";
+  version = "16.00.0000";
+
+  src = fetchurl {
+    url = "https://ftp.postgresql.org/pub/odbc/versions/src/psqlodbc-${version}.tar.gz";
+    hash = "sha256-r9iS+J0uzujT87IxTxvVvy0CIBhyxuNDHlwxCW7KTIs=";
+  };
+
+  buildInputs = [ libiodbc postgresql openssl ];
+
+  configureFlags = [
+    "--with-iodbc=${libiodbc}"
+    "--with-libpq=${lib.getDev postgresql}/bin/pg_config"
+  ];
+
+  meta = with lib; {
+    homepage = "https://odbc.postgresql.org/";
+    description = "ODBC driver for PostgreSQL";
+    license = licenses.lgpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pstreams/default.nix b/nixpkgs/pkgs/development/libraries/pstreams/default.nix
new file mode 100644
index 000000000000..2baa3b355023
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pstreams/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv
+, fetchgit
+}:
+
+stdenv.mkDerivation rec {
+  pname = "PStreams";
+  version = "1.0.1";
+
+  src = fetchgit {
+    url = "https://git.code.sf.net/p/pstreams/code";
+    rev = let dot2Underscore = lib.strings.stringAsChars (c: if c == "." then "_" else c);
+          in "RELEASE_${dot2Underscore version}";
+    sha256 = "0r8aj0nh5mkf8cvnzl8bdy4nm7i74vs83axxfimcd74kjfn0irys";
+  };
+
+  makeFlags = [ "prefix=${placeholder "out"}" ];
+  dontBuild = true;
+  doCheck = true;
+
+  preInstall = "rm INSTALL";
+    # `make install` fails on case-insensitive file systems (e.g. APFS by
+    # default) because this target exists
+
+  meta = with lib; {
+    description = "POSIX Process Control in C++";
+    longDescription = ''
+      PStreams allows you to run another program from your C++ application and
+      to transfer data between the two programs similar to shell pipelines.
+
+      In the simplest case, a PStreams class is like a C++ wrapper for the
+      POSIX.2 functions popen(3) and pclose(3), using C++ iostreams instead of
+      C's stdio library.
+    '';
+    homepage = "https://pstreams.sourceforge.net/";
+    downloadPage = "https://pstreams.sourceforge.net/download/";
+    maintainers = with maintainers; [ arthur ];
+    license = licenses.boost;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ptex/default.nix b/nixpkgs/pkgs/development/libraries/ptex/default.nix
new file mode 100644
index 000000000000..a5827fe188c5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ptex/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub, zlib, cmake }:
+
+stdenv.mkDerivation rec
+{
+  pname = "ptex";
+  version = "2.4.2";
+
+  src = fetchFromGitHub {
+    owner = "wdas";
+    repo = "ptex";
+    rev = "v${version}";
+    sha256 = "sha256-PR1ld9rXmL6BK4llznAsD5PNvi3anFMz2i9NDsG95DQ=";
+  };
+
+  outputs = [ "bin" "dev" "out" "lib" ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ zlib ];
+
+  meta = with lib; {
+    description = "Per-Face Texture Mapping for Production Rendering";
+    homepage = "http://ptex.us/";
+    license = licenses.bsd3;
+    platforms = platforms.all;
+    maintainers = [ maintainers.guibou ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pth/default.nix b/nixpkgs/pkgs/development/libraries/pth/default.nix
new file mode 100644
index 000000000000..c75b0d1db2d8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pth/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "pth";
+  version = "2.0.7";
+
+  src = fetchurl {
+    url = "mirror://gnu/pth/pth-${version}.tar.gz";
+    sha256 = "0ckjqw5kz5m30srqi87idj7xhpw6bpki43mj07bazjm2qmh3cdbj";
+  };
+
+  preConfigure = lib.optionalString stdenv.isAarch32 ''
+    configureFlagsArray=("CFLAGS=-DJB_SP=8 -DJB_PC=9")
+  '' + lib.optionalString (stdenv.hostPlatform.libc == "glibc") ''
+    configureFlagsArray+=("ac_cv_check_sjlj=ssjlj")
+  '';
+
+  # Fails parallel build due to missing dependency on autogenrated
+  # 'pth_p.h' file:
+  #     ./shtool scpp -o pth_p.h ...
+  #     ./libtool --mode=compile --quiet gcc -c -I. -O2 -pipe pth_uctx.c
+  #     pth_uctx.c:31:10: fatal error: pth_p.h: No such file
+  enableParallelBuilding = false;
+
+  meta = with lib; {
+    description = "The GNU Portable Threads library";
+    homepage = "https://www.gnu.org/software/pth";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pugixml/default.nix b/nixpkgs/pkgs/development/libraries/pugixml/default.nix
new file mode 100644
index 000000000000..403c90357755
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pugixml/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, lib, fetchFromGitHub, cmake, check, validatePkgConfig, shared ? false }:
+
+stdenv.mkDerivation rec {
+  pname = "pugixml";
+  version = "1.13";
+
+  src = fetchFromGitHub {
+    owner = "zeux";
+    repo = "pugixml";
+    rev = "v${version}";
+    sha256 = "sha256-MAXm/9ANj6TjO1Skpg20RYt88bf6w1uPwRwOHXiXsWw=";
+  };
+
+  outputs = [ "out" ] ++ lib.optionals shared [ "dev" ];
+
+  nativeBuildInputs = [ cmake validatePkgConfig ];
+
+  cmakeFlags = [
+    "-DBUILD_TESTS=ON"
+    "-DBUILD_SHARED_LIBS=${if shared then "ON" else "OFF"}"
+  ];
+
+  nativeCheckInputs = [ check ];
+
+  preConfigure = ''
+    # Enable long long support (required for filezilla)
+    sed -ire '/PUGIXML_HAS_LONG_LONG/ s/^\/\///' src/pugiconfig.hpp
+  '';
+
+  meta = with lib; {
+    description = "Light-weight, simple and fast XML parser for C++ with XPath support";
+    homepage = "https://pugixml.org";
+    license = licenses.mit;
+    maintainers = with maintainers; [ pSub ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pulseaudio-qt/default.nix b/nixpkgs/pkgs/development/libraries/pulseaudio-qt/default.nix
new file mode 100644
index 000000000000..9605b5875ec3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pulseaudio-qt/default.nix
@@ -0,0 +1,37 @@
+{ stdenv
+, lib
+, fetchurl
+, cmake
+, pkg-config
+, extra-cmake-modules
+, wrapQtAppsHook
+, pulseaudio
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "pulseaudio-qt";
+  version = "1.3.0";
+
+  src = fetchurl {
+    url = "mirror://kde/stable/${finalAttrs.pname}/${finalAttrs.pname}-${lib.versions.majorMinor finalAttrs.version}.tar.xz";
+    sha256 = "1i4yb0v1mmhih8c2i61hybg6q60qys3pc5wbjb7a0vwl1mihgsxw";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    extra-cmake-modules
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    pulseaudio
+  ];
+
+  meta = with lib; {
+    description = "Pulseaudio bindings for Qt";
+    homepage    = "https://invent.kde.org/libraries/pulseaudio-qt";
+    license     = with licenses; [ lgpl2 ];
+    maintainers = with maintainers; [ doronbehar ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/pupnp/default.nix b/nixpkgs/pkgs/development/libraries/pupnp/default.nix
new file mode 100644
index 000000000000..2410c22ad216
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pupnp/default.nix
@@ -0,0 +1,47 @@
+{ fetchFromGitHub
+, lib
+, stdenv
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libupnp";
+  version = "1.14.18";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "pupnp";
+    repo = "pupnp";
+    rev = "release-${version}";
+    sha256 = "sha256-eQKtZioZjI53J1fsoer032pzqebbK5IabOnkAXwBPos=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  postPatch = ''
+    # Wrong paths in pkg-config file generated by CMake
+    # https://github.com/pupnp/pupnp/pull/205/files#r588946478
+    substituteInPlace CMakeLists.txt \
+      --replace '\''${exec_prefix}/' "" \
+      --replace '\''${prefix}/' ""
+  '';
+
+  meta = {
+    description = "An open source UPnP development kit for Linux";
+
+    longDescription = ''
+      The Linux SDK for UPnP Devices (libupnp) provides developers
+      with an API and open source code for building control points,
+      devices, and bridges that are compliant with Version 1.0 of the
+      UPnP Device Architecture Specification.
+    '';
+
+    license = lib.licenses.bsd3;
+
+    homepage = "https://pupnp.github.io/pupnp/";
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pxlib/default.nix b/nixpkgs/pkgs/development/libraries/pxlib/default.nix
new file mode 100644
index 000000000000..6b31ef3257dd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pxlib/default.nix
@@ -0,0 +1,20 @@
+{ lib, stdenv, fetchurl, intltool }:
+
+stdenv.mkDerivation rec {
+  pname = "pxlib";
+  version = "0.6.8";
+  src = fetchurl {
+    url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
+    sha256 = "1yafwz4z5h30hqvk51wpgbjlmq9f2z2znvfim87ydrfrqfjmi6sz";
+  };
+
+  nativeBuildInputs = [ intltool ];
+
+  meta = with lib; {
+    description = "Library to read and write Paradox files";
+    homepage = "https://pxlib.sourceforge.net/";
+    license = licenses.gpl2;
+    platforms = platforms.all;
+    maintainers = [ maintainers.winpat ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/py3c/default.nix b/nixpkgs/pkgs/development/libraries/py3c/default.nix
new file mode 100644
index 000000000000..f4d2aa95a2e8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/py3c/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchFromGitHub, python3 }:
+
+stdenv.mkDerivation rec {
+  pname = "py3c";
+  version = "1.4";
+
+  src = fetchFromGitHub {
+    owner = "encukou";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-v8+0J56sZVbGdBlOotObUa10/zFMTvfXdMYRsKhyZaY=";
+  };
+
+  postPatch = ''
+    # clang and gcc-11 complain about 'register' keywords used by
+    # python-2.7. Let's avoid blanket -Werror.
+    substituteInPlace test/setup.py \
+      --replace "'-Werror', " ""
+  '';
+
+  makeFlags = [
+    "prefix=${placeholder "out"}"
+  ];
+
+  doCheck = true;
+
+  nativeCheckInputs = [
+    python3
+  ];
+
+  checkTarget = "test-python";
+
+  meta = with lib; {
+    homepage = "https://github.com/encukou/py3c";
+    description = "Python 2/3 compatibility layer for C extensions";
+    license = licenses.mit;
+    maintainers = with maintainers; [ ajs124 dotlambda ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pyotherside/default.nix b/nixpkgs/pkgs/development/libraries/pyotherside/default.nix
new file mode 100644
index 000000000000..eeb73472253a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pyotherside/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchFromGitHub
+, python3, qmake, qtbase, qtquickcontrols, qtsvg, ncurses }:
+
+stdenv.mkDerivation rec {
+  pname = "pyotherside";
+  version = "1.6.0";
+
+  src = fetchFromGitHub {
+    owner = "thp";
+    repo = "pyotherside";
+    rev = version;
+    sha256 = "sha256-IIvL704snJIJbigAgJZ3WWg5a/mX/8qzgFN+dBEClG8=";
+  };
+
+  nativeBuildInputs = [ qmake ];
+  buildInputs = [
+    python3 qtbase qtquickcontrols qtsvg ncurses
+  ];
+
+  dontWrapQtApps = true;
+
+  patches = [ ./qml-path.patch ];
+  installTargets = [ "sub-src-install_subtargets" ];
+
+  meta = with lib; {
+    description = "Asynchronous Python 3 Bindings for Qt 5";
+    homepage = "https://thp.io/2011/pyotherside/";
+    license = licenses.isc;
+    maintainers = [ maintainers.mic92 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/pyotherside/qml-path.patch b/nixpkgs/pkgs/development/libraries/pyotherside/qml-path.patch
new file mode 100644
index 000000000000..9f7208909970
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pyotherside/qml-path.patch
@@ -0,0 +1,12 @@
+diff -Naur --strip-trailing-cr source.org/src/src.pro source/src/src.pro
+--- source.org/src/src.pro	1970-01-01 01:00:01.000000000 +0100
++++ source/src/src.pro	2019-01-17 19:14:46.256821852 +0000
+@@ -10,7 +10,7 @@
+ CONFIG += qt plugin
+ QT += qml quick svg
+ 
+-target.path = $$[QT_INSTALL_QML]/$$PLUGIN_IMPORT_PATH
++target.path = $$NIX_OUTPUT_QML/$$PLUGIN_IMPORT_PATH
+ INSTALLS += target
+ 
+ qmldir.files += $$_PRO_FILE_PWD_/qmldir $$_PRO_FILE_PWD_/pyotherside.qmltypes
diff --git a/nixpkgs/pkgs/development/libraries/pystring/default.nix b/nixpkgs/pkgs/development/libraries/pystring/default.nix
new file mode 100644
index 000000000000..3a1e64c0b000
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/pystring/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, lib, fetchFromGitHub, fetchpatch, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "pystring";
+  version = "1.1.3";
+
+  src = fetchFromGitHub {
+    owner = "imageworks";
+    repo = "pystring";
+    rev = "v${version}";
+    sha256 = "1w31pjiyshqgk6zd6m3ab3xfgb0ribi77r6fwrry2aw8w1adjknf";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "pystring-cmake-configuration.patch";
+      url = "https://github.com/imageworks/pystring/commit/4f653fc35421129eae8a2c424901ca7170059370.patch";
+      sha256 = "1hynzz76ff4vvmi6kwixsmjswkpyj6s4vv05d7nw0zscj4cdp8k3";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/imageworks/pystring/";
+    description = "A collection of C++ functions which match the interface and behavior of python's string class methods using std::string";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.rytone ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/python-qt/default.nix b/nixpkgs/pkgs/development/libraries/python-qt/default.nix
new file mode 100644
index 000000000000..d238b8137d33
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/python-qt/default.nix
@@ -0,0 +1,52 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, python, qmake,
+  qtwebengine, qtxmlpatterns,
+  qttools, unzip }:
+
+stdenv.mkDerivation rec {
+  pname = "python-qt";
+  version = "3.4.2";
+
+  src = fetchFromGitHub {
+    owner = "MeVisLab";
+    repo = "pythonqt";
+    rev = "v${version}";
+    hash = "sha256-xJYOD07ACOKtY3psmfHNSCjm6t0fr8JU9CrL0w5P5G0=";
+  };
+
+  # https://github.com/CsoundQt/CsoundQt/blob/develop/BUILDING.md#pythonqt
+  postPatch = ''
+    substituteInPlace build/python.prf \
+      --replace "PYTHON_VERSION=2.7" "PYTHON_VERSION=${python.pythonVersion}"
+  '';
+
+  hardeningDisable = [ "all" ];
+
+  nativeBuildInputs = [ qmake qtwebengine qtxmlpatterns qttools unzip ];
+
+  buildInputs = [ python ];
+
+  qmakeFlags = [
+    "PythonQt.pro"
+    "PYTHON_DIR=${python}"
+  ];
+
+  dontWrapQtApps = true;
+
+  unpackCmd = "unzip $src";
+
+  installPhase = ''
+    mkdir -p $out/include/PythonQt
+    cp -r ./lib $out
+    cp -r ./src/* $out/include/PythonQt
+    cp -r ./build $out/include/PythonQt
+    cp -r ./extensions $out/include/PythonQt
+  '';
+
+  meta = with lib; {
+    description = "PythonQt is a dynamic Python binding for the Qt framework. It offers an easy way to embed the Python scripting language into your C++ Qt applications";
+    homepage = "https://pythonqt.sourceforge.net/";
+    license = licenses.lgpl21;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ hlolli ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qca/default.nix b/nixpkgs/pkgs/development/libraries/qca/default.nix
new file mode 100644
index 000000000000..66cdfe28eb31
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qca/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchurl, cmake, openssl, pkg-config, qtbase, qt5compat ? null }:
+
+let
+  isQt6 = lib.versions.major qtbase.version == "6";
+in stdenv.mkDerivation rec {
+  pname = "qca";
+  version = "2.3.8";
+
+  src = fetchurl {
+    url = "mirror://kde/stable/qca/${version}/qca-${version}.tar.xz";
+    sha256 = "sha256-SHWcqGoCAkYdkIumYTQ4DMO7fSD+08AxufwCiXlqgmQ=";
+  };
+
+  buildInputs = [ openssl qtbase qt5compat ];
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  dontWrapQtApps = true;
+
+  # tells CMake to use this CA bundle file if it is accessible
+  preConfigure = "export QC_CERTSTORE_PATH=/etc/ssl/certs/ca-certificates.crt";
+
+  cmakeFlags = [
+    (lib.cmakeBool "QT6" isQt6)
+    # tricks CMake into using this CA bundle file if it is not accessible (in a sandbox)
+    "-Dqca_CERTSTORE=/etc/ssl/certs/ca-certificates.crt"
+  ];
+
+  meta = with lib; {
+    description = "Qt Cryptographic Architecture";
+    homepage = "https://invent.kde.org/libraries/qca";
+    maintainers = with maintainers; [ ttuegel ];
+    license = licenses.lgpl21Plus;
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qcoro/default.nix b/nixpkgs/pkgs/development/libraries/qcoro/default.nix
new file mode 100644
index 000000000000..e178dd5240d6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qcoro/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, libpthreadstubs
+, qtbase
+, qtwebsockets
+, wrapQtAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "qcoro";
+  version = "0.10.0";
+
+  src = fetchFromGitHub {
+    owner = "danvratil";
+    repo = "qcoro";
+    rev = "v${version}";
+    sha256 = "sha256-C4k5ClsMwzxURAQBGV5WBwlRr5N0SvUMJobZ+ROT0EY=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [
+    wrapQtAppsHook
+    cmake
+  ];
+
+  buildInputs = [
+    qtbase
+    qtwebsockets
+    libpthreadstubs
+  ];
+
+  meta = with lib; {
+    description = "Library for using C++20 coroutines in connection with certain asynchronous Qt actions";
+    homepage = "https://github.com/danvratil/qcoro";
+    license = licenses.mit;
+    maintainers = with maintainers; [ smitop ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qdjango/default.nix b/nixpkgs/pkgs/development/libraries/qdjango/default.nix
new file mode 100644
index 000000000000..8036373a826a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qdjango/default.nix
@@ -0,0 +1,73 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, testers
+, doxygen
+, qmake
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "qdjango";
+  version = "unstable-2018-03-07";
+
+  src = fetchFromGitHub {
+    owner = "jlaine";
+    repo = "qdjango";
+    rev = "bda4755ece9d173a67b880e498027fcdc51598a8";
+    hash = "sha256-5MfRfsIlv73VMvKMBCLviXFovyGH0On5ukLIEy7zwkk=";
+  };
+
+  outputs = [ "out" "dev" "doc" ];
+
+  postPatch = ''
+    # HTML docs depend on regular docs
+    substituteInPlace qdjango.pro \
+      --replace 'dist.depends = docs' 'htmldocs.depends = docs'
+  '' + lib.optionalString stdenv.hostPlatform.isDarwin ''
+    # tst_Auth:constIterator (tests/db/auth/tst_auth.cpp:624) fails on Darwin?
+    # QVERIFY(&*(it += 2) == 0) evals to false
+    substituteInPlace tests/db/db.pro \
+      --replace 'auth' ""
+  '';
+
+  qmakeFlags = [
+    # Uses Qt testing infrastructure via QMake CONFIG testcase,
+    # defaults to installing all testcase targets under Qt prefix
+    # https://github.com/qt/qtbase/blob/29400a683f96867133b28299c0d0bd6bcf40df35/mkspecs/features/testcase.prf#L110-L120
+    "CONFIG+=no_testcase_installs"
+
+    # Qmake-generated pkg-config files default to Qt prefix
+    "QMAKE_PKGCONFIG_PREFIX=${placeholder "out"}"
+  ];
+
+  nativeBuildInputs = [
+    doxygen
+    qmake
+  ];
+
+  dontWrapQtApps = true;
+
+  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
+
+  preCheck = lib.optionalString stdenv.hostPlatform.isDarwin ''
+    # at this point in the build, install_name for dylibs hasn't been patched yet so we need to set the library path.
+    # for some reason, this doesn't work when just exporting the needed paths even though the autogenerated wrappers
+    # should at most prepend paths? just patch them into the wrappers instead
+    substituteInPlace $(find tests -name target_wrapper.sh) \
+      --replace 'DYLD_LIBRARY_PATH=' "DYLD_LIBRARY_PATH=$PWD/src/db:$PWD/src/http:"
+  '';
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    description = "Qt-based C++ web framework";
+    homepage = "https://github.com/jlaine/qdjango";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ OPNA2608 ];
+    platforms = platforms.all;
+    pkgConfigModules = [
+      "qdjango-db"
+      "qdjango-http"
+    ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/qgnomeplatform/default.nix b/nixpkgs/pkgs/development/libraries/qgnomeplatform/default.nix
new file mode 100644
index 000000000000..4c75b475c17c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qgnomeplatform/default.nix
@@ -0,0 +1,79 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, nix-update-script
+, cmake
+, pkg-config
+, adwaita-qt
+, adwaita-qt6
+, glib
+, gtk3
+, qtbase
+, qtwayland
+, pantheon
+, substituteAll
+, gsettings-desktop-schemas
+, useQt6 ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "qgnomeplatform";
+  version = "0.8.4";
+
+  src = fetchFromGitHub {
+    owner = "FedoraQt";
+    repo = "QGnomePlatform";
+    rev = version;
+    sha256 = "sha256-DaIBtWmce+58OOhqFG5802c3EprBAtDXhjiSPIImoOM=";
+  };
+
+  patches = [
+    # Hardcode GSettings schema path to avoid crashes from missing schemas
+    (substituteAll {
+      src = ./hardcode-gsettings.patch;
+      gds_gsettings_path = glib.getSchemaPath gsettings-desktop-schemas;
+    })
+
+    # Backport cursor fix for Qt6 apps
+    # Ajusted from https://github.com/FedoraQt/QGnomePlatform/pull/138
+    ./qt6-cursor-fix.patch
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    glib
+    gtk3
+    qtbase
+    qtwayland
+  ] ++ lib.optionals (!useQt6) [
+    adwaita-qt
+  ] ++ lib.optionals useQt6 [
+    adwaita-qt6
+  ];
+
+  # Qt setup hook complains about missing `wrapQtAppsHook` otherwise.
+  dontWrapQtApps = true;
+
+  cmakeFlags = [
+    "-DGLIB_SCHEMAS_DIR=${glib.getSchemaPath gsettings-desktop-schemas}"
+    "-DQT_PLUGINS_DIR=${placeholder "out"}/${qtbase.qtPluginPrefix}"
+  ] ++ lib.optionals useQt6 [
+    "-DUSE_QT6=true"
+  ];
+
+  passthru = {
+    updateScript = nix-update-script { };
+  };
+
+  meta = with lib; {
+    description = "QPlatformTheme for a better Qt application inclusion in GNOME";
+    homepage = "https://github.com/FedoraQt/QGnomePlatform";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qgnomeplatform/hardcode-gsettings.patch b/nixpkgs/pkgs/development/libraries/qgnomeplatform/hardcode-gsettings.patch
new file mode 100644
index 000000000000..40f7f98f25c7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qgnomeplatform/hardcode-gsettings.patch
@@ -0,0 +1,25 @@
+diff --git a/src/common/gnomesettings.cpp b/src/common/gnomesettings.cpp
+index 717cc9b..ee255ea 100644
+--- a/src/common/gnomesettings.cpp
++++ b/src/common/gnomesettings.cpp
+@@ -150,10 +150,18 @@ GnomeSettingsPrivate::GnomeSettingsPrivate(QObject *parent)
+     : GnomeSettings(parent)
+     , m_usePortal(checkUsePortalSupport())
+     , m_canUseFileChooserPortal(!m_usePortal)
+-    , m_gnomeDesktopSettings(g_settings_new("org.gnome.desktop.wm.preferences"))
+-    , m_settings(g_settings_new("org.gnome.desktop.interface"))
+     , m_fallbackFont(new QFont(QLatin1String("Sans"), 10))
+ {
++    g_autoptr(GSettingsSchemaSource) schemaSource = nullptr;
++    g_autoptr(GSettingsSchema) gnomeDesktopSchema = nullptr;
++    g_autoptr(GSettingsSchema) settingsSchema = nullptr;
++
++    schemaSource = g_settings_schema_source_new_from_directory("@gds_gsettings_path@", g_settings_schema_source_get_default(), true, nullptr);
++    gnomeDesktopSchema = g_settings_schema_source_lookup(schemaSource, "org.gnome.desktop.wm.preferences", false);
++    m_gnomeDesktopSettings = g_settings_new_full(gnomeDesktopSchema, nullptr, nullptr);
++    settingsSchema = g_settings_schema_source_lookup(schemaSource, "org.gnome.desktop.interface", false);
++    m_settings = g_settings_new_full(settingsSchema, nullptr, nullptr);
++
+     gtk_init(nullptr, nullptr);
+ 
+     // Set log handler to suppress false GtkDialog warnings
diff --git a/nixpkgs/pkgs/development/libraries/qgnomeplatform/qt6-cursor-fix.patch b/nixpkgs/pkgs/development/libraries/qgnomeplatform/qt6-cursor-fix.patch
new file mode 100644
index 000000000000..40438aae33ed
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qgnomeplatform/qt6-cursor-fix.patch
@@ -0,0 +1,53 @@
+diff --git a/src/common/gnomesettings.cpp b/src/common/gnomesettings.cpp
+index 961f75d..d947eb2 100644
+--- a/src/common/gnomesettings.cpp
++++ b/src/common/gnomesettings.cpp
+@@ -210,7 +210,7 @@ GnomeSettingsPrivate::GnomeSettingsPrivate(QObject *parent)
+                                               QStringLiteral("SettingChanged"), this, SLOT(portalSettingChanged(QString,QString,QDBusVariant)));
+     }
+ 
+-    if (QGuiApplication::platformName() != QStringLiteral("xcb")) {
++    if (true) {
+         cursorSizeChanged();
+         cursorThemeChanged();
+     }
+@@ -347,11 +347,11 @@ void GnomeSettingsPrivate::gsettingPropertyChanged(GSettings *settings, gchar *k
+     } else if (changedProperty == QStringLiteral("monospace-font-name")) {
+         gnomeSettings->fontChanged();
+     } else if (changedProperty == QStringLiteral("cursor-size")) {
+-        if (QGuiApplication::platformName() != QStringLiteral("xcb")) {
++        if (true) {
+             gnomeSettings->cursorSizeChanged();
+         }
+     } else if (changedProperty == QStringLiteral("cursor-theme")) {
+-        if (QGuiApplication::platformName() != QStringLiteral("xcb")) {
++        if (true) {
+             gnomeSettings->cursorThemeChanged();
+         }
+     // Org.gnome.wm.preferences
+@@ -393,13 +393,23 @@ void GnomeSettingsPrivate::cursorBlinkTimeChanged()
+ void GnomeSettingsPrivate::cursorSizeChanged()
+ {
+     int cursorSize = getSettingsProperty<int>(QStringLiteral("cursor-size"));
+-    qputenv("XCURSOR_SIZE", QString::number(cursorSize).toUtf8());
++    if (QGuiApplication::platformName() != QStringLiteral("xcb")) {
++        qputenv("XCURSOR_SIZE", QString::number(cursorSize).toUtf8());
++    }
++#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
++    m_hints[QPlatformTheme::MouseCursorSize] = QSize(cursorSize, cursorSize);
++#endif
+ }
+ 
+ void GnomeSettingsPrivate::cursorThemeChanged()
+ {
+     const QString cursorTheme = getSettingsProperty<QString>(QStringLiteral("cursor-theme"));
+-    qputenv("XCURSOR_THEME", cursorTheme.toUtf8());
++    if (QGuiApplication::platformName() != QStringLiteral("xcb")) {
++        qputenv("XCURSOR_THEME", cursorTheme.toUtf8());
++    }
++#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
++    m_hints[QPlatformTheme::MouseCursorTheme] = cursorTheme;
++#endif
+ }
+ 
+ void GnomeSettingsPrivate::fontChanged()
diff --git a/nixpkgs/pkgs/development/libraries/qhull/default.nix b/nixpkgs/pkgs/development/libraries/qhull/default.nix
new file mode 100644
index 000000000000..a7f1bc271155
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qhull/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchFromGitHub, cmake, fixDarwinDylibNames }:
+
+stdenv.mkDerivation rec {
+  pname = "qhull";
+  version = "2020.2";
+
+  src = fetchFromGitHub {
+    owner = "qhull";
+    repo = "qhull";
+    rev = version;
+    sha256 = "sha256-djUO3qzY8ch29AuhY3Bn1ajxWZ4/W70icWVrxWRAxRc=";
+  };
+
+  nativeBuildInputs = [ cmake ]
+    ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+  meta = with lib; {
+    homepage = "http://www.qhull.org/";
+    description = "Compute the convex hull, Delaunay triangulation, Voronoi diagram and more";
+    license = licenses.qhull;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ orivej ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qjson/default.nix b/nixpkgs/pkgs/development/libraries/qjson/default.nix
new file mode 100644
index 000000000000..4308b46c5c1f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qjson/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub, cmake, qtbase }:
+
+stdenv.mkDerivation rec {
+  version = "0.9.0";
+  pname = "qjson";
+
+  src = fetchFromGitHub {
+    owner = "flavio";
+    repo = "qjson";
+    rev = version;
+    sha256 = "1f4wnxzx0qdmxzc7hqk28m0sva7z9p9xmxm6aifvjlp0ha6pmfxs";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ qtbase ];
+  dontWrapQtApps = true;
+
+  meta = with lib; {
+    description = "Lightweight data-interchange format";
+    homepage = "https://qjson.sourceforge.net/";
+    license = licenses.lgpl21;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qmarkdowntextedit/default.nix b/nixpkgs/pkgs/development/libraries/qmarkdowntextedit/default.nix
new file mode 100644
index 000000000000..f3ac9693807b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qmarkdowntextedit/default.nix
@@ -0,0 +1,35 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, qmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "qmarkdowntextedit";
+  version = "unstable-2023-04-02";
+
+  src = fetchFromGitHub {
+    owner = "pbek";
+    repo = pname;
+    rev = "a23cc53e7e40e9dcfd0f815b2b3b6a5dc7304405";
+    hash = "sha256-EYBX2SJa8o4R/zEjSFbmFxhLI726WY21XmCkWIqPeFc=";
+  };
+
+  nativeBuildInputs = [ qmake ];
+
+  dontWrapQtApps = true;
+
+  qmakeFlags = [
+    "qmarkdowntextedit-lib.pro"
+    "PREFIX=${placeholder "out"}"
+    "LIBDIR=${placeholder "out"}/lib"
+  ];
+
+  meta = with lib; {
+    description = "C++ Qt QPlainTextEdit widget with markdown highlighting and some other goodies";
+    homepage = "https://github.com/pbek/qmarkdowntextedit";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ rewine ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qmenumodel/default.nix b/nixpkgs/pkgs/development/libraries/qmenumodel/default.nix
new file mode 100644
index 000000000000..7d1384df364b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qmenumodel/default.nix
@@ -0,0 +1,99 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, gitUpdater
+, testers
+, cmake
+, cmake-extras
+, dbus
+, dbus-test-runner
+, glib
+, pkg-config
+, python3
+, qtbase
+, qtdeclarative
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "qmenumodel";
+  version = "0.9.2";
+
+  src = fetchFromGitHub {
+    owner = "AyatanaIndicators";
+    repo = "qmenumodel";
+    rev = finalAttrs.version;
+    hash = "sha256-zbKAfq9R5fD2IqVYOAhy903QX1TDom9m6Ib2qpkFMak=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  postPatch = ''
+    substituteInPlace libqmenumodel/src/qmenumodel.pc.in \
+      --replace "\''${exec_prefix}/@CMAKE_INSTALL_LIBDIR@" "\''${prefix}/lib" \
+      --replace "\''${prefix}/@CMAKE_INSTALL_INCLUDEDIR@" "\''${prefix}/include"
+
+    substituteInPlace libqmenumodel/QMenuModel/CMakeLists.txt \
+      --replace "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" "\''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}"
+  '' + lib.optionalString finalAttrs.finalPackage.doCheck ''
+    patchShebangs tests/{client,script}/*.py
+  '';
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    cmake-extras
+    glib
+    qtbase
+    qtdeclarative
+  ];
+
+  nativeCheckInputs = [
+    dbus
+    dbus-test-runner
+    (python3.withPackages (ps: with ps; [
+      dbus-python
+      pygobject3
+    ]))
+  ];
+
+  dontWrapQtApps = true;
+
+  cmakeFlags = [
+    "-DENABLE_TESTS=${lib.boolToString finalAttrs.finalPackage.doCheck}"
+  ];
+
+  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
+
+  # Tests have been flaky sometimes, hoping that not running in parallel helps
+  enableParallelChecking = false;
+
+  preCheck = ''
+    # Tests all need some Qt stuff
+    export QT_PLUGIN_PATH=${lib.getBin qtbase}/${qtbase.qtPluginPrefix}
+  '';
+
+  passthru = {
+    tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+    updateScript = gitUpdater { };
+  };
+
+  meta = with lib; {
+    description = "Qt5 renderer for Ayatana Indicators";
+    longDescription = ''
+      QMenuModel - a Qt/QML binding for GMenuModel
+      (see http://developer.gnome.org/gio/unstable/GMenuModel.html)
+    '';
+    homepage = "https://github.com/AyatanaIndicators/qmenumodel";
+    license = licenses.lgpl3Only;
+    maintainers = teams.lomiri.members;
+    platforms = platforms.linux;
+    pkgConfigModules = [
+      "qmenumodel"
+    ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/qmlbox2d/default.nix b/nixpkgs/pkgs/development/libraries/qmlbox2d/default.nix
new file mode 100644
index 000000000000..e1e69b9f10b4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qmlbox2d/default.nix
@@ -0,0 +1,32 @@
+{lib, stdenv, qtdeclarative, fetchFromGitHub, qmake }:
+stdenv.mkDerivation {
+  pname = "qml-box2d";
+  version = "unstable-2018-04-06";
+  src = fetchFromGitHub {
+    owner = "qml-box2d";
+    repo = "qml-box2d";
+    sha256 = "0gb8limy6ck23z3k0k2j7c4c4s95p40f6lbzk4szq7fjnnw22kb7";
+    rev = "b7212d5640701f93f0cd88fbd3a32c619030ae62";
+  };
+
+  dontWrapQtApps = true;
+  nativeBuildInputs = [ qmake ];
+
+  buildInputs = [ qtdeclarative ];
+
+  patchPhase = ''
+    substituteInPlace box2d.pro \
+      --replace '$$[QT_INSTALL_QML]' "/$qtQmlPrefix/"
+    qmakeFlags="$qmakeFlags PREFIXSHORTCUT=$out"
+    '';
+
+  installFlags = [ "INSTALL_ROOT=$(out)" ];
+
+  meta = with lib; {
+    description = "A QML plugin for Box2D engine";
+    homepage = "https://github.com/qml-box2d/qml-box2d";
+    maintainers = [ maintainers.guibou ];
+    platforms = platforms.linux;
+    license = licenses.zlib;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qmltermwidget/default.nix b/nixpkgs/pkgs/development/libraries/qmltermwidget/default.nix
new file mode 100644
index 000000000000..863d5f25d286
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qmltermwidget/default.nix
@@ -0,0 +1,67 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, qmake
+, qtbase
+, qtmultimedia
+, utmp
+}:
+
+stdenv.mkDerivation {
+  pname = "qmltermwidget";
+  version = "unstable-2022-01-09";
+
+  src = fetchFromGitHub {
+    owner = "Swordfish90";
+    repo = "qmltermwidget";
+    rev = "63228027e1f97c24abb907550b22ee91836929c5";
+    hash = "sha256-aVaiRpkYvuyomdkQYAgjIfi6a3wG2a6hNH1CfkA2WKQ=";
+  };
+
+  nativeBuildInputs = [
+    qmake
+  ];
+
+  buildInputs = [
+    qtbase
+    qtmultimedia
+  ] ++ lib.optional stdenv.isDarwin utmp;
+
+  patches = [
+    # Changes required to make it compatible with lomiri-terminal-app
+    # QML-exposed colorscheme, scrollbar & clipboard functionality
+    # Remove when https://github.com/Swordfish90/qmltermwidget/pull/39 merged
+    (fetchpatch {
+      name = "0001-qmltermwidget-lomiri-submissions.patch";
+      url = "https://github.com/Swordfish90/qmltermwidget/compare/63228027e1f97c24abb907550b22ee91836929c5..ffc6b2b2a20ca785f93300eca93c25c4b74ece17.patch";
+      hash = "sha256-1GjC2mdfP3NpePDWZaT8zvIq3vwWIZs+iQ9o01iQtD4=";
+    })
+
+    # A fix to the above series of patches, to fix a crash in lomiri-terminal-app
+    # Remove (and update the above fetchpatch) when https://github.com/gber/qmltermwidget/pull/1 merged
+    (fetchpatch {
+      name = "0002-qmltermwidget-Mark-ColorSchemeManager-singleton-as-C++-owned.patch";
+      url = "https://github.com/gber/qmltermwidget/commit/f3050bda066575eebdcff70fc1c3a393799e1d6d.patch";
+      hash = "sha256-O8fEpVLYMze6q4ps7RDGbNukRmZZBjLwqmvRqpp+H+Y=";
+    })
+
+    # Some files are copied twice to the output which makes the build fails
+    ./do-not-copy-artifacts-twice.patch
+  ];
+
+  postPatch = ''
+    substituteInPlace qmltermwidget.pro \
+      --replace '$$[QT_INSTALL_QML]' '$$PREFIX/${qtbase.qtQmlPrefix}/'
+  '';
+
+  dontWrapQtApps = true;
+
+  meta = {
+    description = "A QML port of qtermwidget";
+    homepage = "https://github.com/Swordfish90/qmltermwidget";
+    license = lib.licenses.gpl2Plus;
+    platforms = with lib.platforms; linux ++ darwin;
+    maintainers = with lib.maintainers; [ OPNA2608 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qmltermwidget/do-not-copy-artifacts-twice.patch b/nixpkgs/pkgs/development/libraries/qmltermwidget/do-not-copy-artifacts-twice.patch
new file mode 100644
index 000000000000..a10c4b16055a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qmltermwidget/do-not-copy-artifacts-twice.patch
@@ -0,0 +1,10 @@
+diff --git a/qmltermwidget.pro b/qmltermwidget.pro
+index c9594a9..aa1a804 100644
+--- a/qmltermwidget.pro
++++ b/qmltermwidget.pro
+@@ -62,4 +62,4 @@ kblayouts2.path = $$INSTALL_DIR/$$PLUGIN_IMPORT_PATH/kb-layouts/historic
+ scrollbar.files = $$PWD/src/QMLTermScrollbar.qml
+ scrollbar.path = $$INSTALL_DIR/$$PLUGIN_IMPORT_PATH
+ 
+-INSTALLS += target qmldir assets colorschemes colorschemes2 kblayouts kblayouts2 scrollbar
++INSTALLS += target qmldir assets
diff --git a/nixpkgs/pkgs/development/libraries/qoauth/default.nix b/nixpkgs/pkgs/development/libraries/qoauth/default.nix
new file mode 100644
index 000000000000..51e91499cbdb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qoauth/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub, qtbase, qmake, qca-qt5 }:
+
+stdenv.mkDerivation rec {
+  pname = "qoauth";
+  version = "2.0.0";
+
+  src = fetchFromGitHub {
+    owner = "ayoy";
+    repo = "qoauth";
+    rev = "v${version}";
+    name = "qoauth-${version}.tar.gz";
+    sha256 = "1b2jdqs526ac635yb2whm049spcsk7almnnr6r5b4yqhq922anw3";
+  };
+
+  postPatch = ''
+    sed -i src/src.pro \
+        -e 's/lib64/lib/g' \
+        -e '/features.path =/ s|$$\[QMAKE_MKSPECS\]|$$NIX_OUTPUT_DEV/mkspecs|'
+  '';
+
+  buildInputs = [ qtbase qca-qt5 ];
+  nativeBuildInputs = [ qmake ];
+
+  env.NIX_CFLAGS_COMPILE = "-I${qca-qt5}/include/Qca-qt5/QtCrypto";
+  NIX_LDFLAGS = "-lqca-qt5";
+
+  dontWrapQtApps = true;
+
+  meta = with lib; {
+    description = "Qt library for OAuth authentication";
+    inherit (qtbase.meta) platforms;
+    license = licenses.lgpl21;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qoi/default.nix b/nixpkgs/pkgs/development/libraries/qoi/default.nix
new file mode 100644
index 000000000000..b218fca11d1f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qoi/default.nix
@@ -0,0 +1,51 @@
+{ fetchFromGitHub
+, lib
+, stb
+, stdenv
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "qoi";
+  version = "unstable-2023-08-10";  # no upstream version yet.
+
+  src = fetchFromGitHub {
+    owner = "phoboslab";
+    repo = "qoi";
+    rev = "19b3b4087b66963a3699ee45f05ec9ef205d7c0e";
+    hash = "sha256-E1hMtjMuDS2zma2s5hlHby/sroRGhtyZm9gLQ+VztsM=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ stb ];
+
+  buildPhase = ''
+    runHook preBuild
+
+    make CFLAGS_CONV="-I${stb}/include/stb -O3" qoiconv
+
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    # Conversion utility for images->qoi. Not usually needed for development.
+    mkdir -p ${placeholder "out"}/bin
+    install qoiconv ${placeholder "out"}/bin
+
+    # The actual single-header implementation. Nothing to compile, just install.
+    mkdir -p ${placeholder "dev"}/include/
+    install qoi.h ${placeholder "dev"}/include
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "'Quite OK Image Format' for fast, lossless image compression";
+    homepage = "https://qoiformat.org/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ hzeller ];
+    platforms = platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/qpdf/default.nix b/nixpkgs/pkgs/development/libraries/qpdf/default.nix
new file mode 100644
index 000000000000..872faafdd1ff
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qpdf/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub, libjpeg, zlib, cmake, perl }:
+
+stdenv.mkDerivation rec {
+  pname = "qpdf";
+  version = "11.8.0";
+
+  src = fetchFromGitHub {
+    owner = "qpdf";
+    repo = "qpdf";
+    rev = "v${version}";
+    hash = "sha256-EoFCRAWia8LAaLdoBW0ByndzIAjSvQ7bJFh0SZ/FKtY=";
+  };
+
+  nativeBuildInputs = [ cmake perl ];
+
+  buildInputs = [ zlib libjpeg ];
+
+  preConfigure = ''
+    patchShebangs qtest/bin/qtest-driver
+    patchShebangs run-qtest
+    # qtest needs to know where the source code is
+    substituteInPlace CMakeLists.txt --replace "run-qtest" "run-qtest --top $src --code $src --bin $out"
+  '';
+
+  doCheck = true;
+
+  meta = with lib; {
+    homepage = "https://qpdf.sourceforge.io/";
+    description = "A C++ library and set of programs that inspect and manipulate the structure of PDF files";
+    license = licenses.asl20; # as of 7.0.0, people may stay at artistic2
+    maintainers = with maintainers; [ abbradar ];
+    platforms = platforms.all;
+    changelog = "https://github.com/qpdf/qpdf/blob/v${version}/ChangeLog";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qrcodegen/default.nix b/nixpkgs/pkgs/development/libraries/qrcodegen/default.nix
new file mode 100644
index 000000000000..53ed6eeb80ec
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qrcodegen/default.nix
@@ -0,0 +1,52 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "qrcodegen";
+  version = "1.8.0";
+
+  src = fetchFromGitHub {
+    owner = "nayuki";
+    repo = "QR-Code-generator";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-aci5SFBRNRrSub4XVJ2luHNZ2pAUegjgQ6pD9kpkaTY=";
+  };
+
+  sourceRoot = "${finalAttrs.src.name}/c";
+
+  nativeBuildInputs = lib.optionals stdenv.cc.isClang [
+    stdenv.cc.cc.libllvm.out
+  ];
+
+  makeFlags = lib.optionals stdenv.cc.isClang [ "AR=llvm-ar" ];
+
+  doCheck = true;
+  checkPhase = ''
+    runHook preCheck
+
+    ./qrcodegen-test
+
+    runHook postCheck
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dt $out/lib/ libqrcodegen.a
+    install -Dt $out/include/qrcodegen/ qrcodegen.h
+
+    runHook postInstall
+  '';
+
+  meta = {
+    homepage = "https://www.nayuki.io/page/qr-code-generator-library";
+    description = "High-quality QR Code generator library in many languages";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ AndersonTorres ];
+    platforms = lib.platforms.unix;
+  };
+})
+# TODO: build the other languages
+# TODO: multiple outputs
diff --git a/nixpkgs/pkgs/development/libraries/qrencode/default.nix b/nixpkgs/pkgs/development/libraries/qrencode/default.nix
new file mode 100644
index 000000000000..83c20fcd5120
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qrencode/default.nix
@@ -0,0 +1,51 @@
+{ lib, stdenv, fetchurl, pkg-config, SDL2, libpng, libiconv, libobjc }:
+
+stdenv.mkDerivation (finalAttrs: rec {
+  pname = "qrencode";
+  version = "4.1.1";
+
+  outputs = [ "bin" "out" "man" "dev" ];
+
+  src = fetchurl {
+    url = "https://fukuchi.org/works/qrencode/qrencode-${version}.tar.gz";
+    sha256 = "sha256-2kSO1PUqumvLDNSMrA3VG4aSvMxM0SdDFAL8pvgXHo4=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ libiconv libpng ]
+    ++ lib.optionals stdenv.isDarwin [ libobjc ];
+
+  nativeCheckInputs = [ SDL2 ];
+
+  doCheck = false;
+
+  checkPhase = ''
+    runHook preCheck
+
+    pushd tests
+    ./test_basic.sh
+    popd
+
+    runHook postCheck
+  '';
+
+  passthru.tests = finalAttrs.finalPackage.overrideAttrs (_: {
+    configureFlags = [ "--with-tests" ];
+    doCheck = true;
+  });
+
+  meta = with lib; {
+    homepage = "https://fukuchi.org/works/qrencode/";
+    description = "C library for encoding data in a QR Code symbol";
+    longDescription = ''
+      Libqrencode is a C library for encoding data in a QR Code symbol,
+      a kind of 2D symbology that can be scanned by handy terminals
+      such as a mobile phone with CCD.
+    '';
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ adolfogc yana ];
+    platforms = platforms.all;
+    mainProgram = "qrencode";
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/qrupdate/default.nix b/nixpkgs/pkgs/development/libraries/qrupdate/default.nix
new file mode 100644
index 000000000000..12531286d33d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qrupdate/default.nix
@@ -0,0 +1,52 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, lapack
+, which
+, gfortran
+, blas
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "qrupdate";
+  version = "1.1.5";
+
+  src = fetchFromGitHub {
+    owner = "mpimd-csc";
+    repo = "qrupdate-ng";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-dHxLPrN00wwozagY2JyfZkD3sKUD2+BcnbjNgZepzFg=";
+  };
+
+  cmakeFlags = assert (blas.isILP64 == lapack.isILP64); [
+    "-DCMAKE_Fortran_FLAGS=${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"
+    ])}"
+  ];
+
+  doCheck = true;
+
+  nativeBuildInputs = [
+    cmake
+    which
+    gfortran
+  ];
+  buildInputs = [
+    blas
+    lapack
+  ];
+
+  meta = with lib; {
+    description = "Library for fast updating of qr and cholesky decompositions";
+    homepage = "https://github.com/mpimd-csc/qrupdate-ng";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ doronbehar ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/qscintilla/default.nix b/nixpkgs/pkgs/development/libraries/qscintilla/default.nix
new file mode 100644
index 000000000000..394446feb017
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qscintilla/default.nix
@@ -0,0 +1,76 @@
+{ stdenv
+, lib
+, fetchurl
+, unzip
+, qtbase
+, qtmacextras ? null
+, qmake
+, fixDarwinDylibNames
+, darwin
+}:
+
+let
+  stdenv' = if stdenv.isDarwin then
+    darwin.apple_sdk_11_0.stdenv
+  else
+    stdenv
+  ;
+in stdenv'.mkDerivation rec {
+  pname = "qscintilla-qt5";
+  version = "2.13.2";
+
+  src = fetchurl {
+    url = "https://www.riverbankcomputing.com/static/Downloads/QScintilla/${version}/QScintilla_src-${version}.tar.gz";
+    sha256 = "sha256-tsfl8ntR0l8J/mz4Sumn8Idq8NZdjMtVEQnm57JYhfQ=";
+  };
+
+  sourceRoot = "QScintilla_src-${version}/src";
+
+  buildInputs = [ qtbase ];
+
+  propagatedBuildInputs = lib.optionals stdenv.isDarwin [ qtmacextras ];
+
+  nativeBuildInputs = [ unzip qmake ]
+    ++ lib.optionals stdenv.isDarwin [ fixDarwinDylibNames ];
+
+  # Make sure that libqscintilla2.so is available in $out/lib since it is expected
+  # by some packages such as sqlitebrowser
+  postFixup = ''
+    ln -s $out/lib/libqscintilla2_qt5.so $out/lib/libqscintilla2.so
+  '';
+
+  dontWrapQtApps = true;
+
+  preConfigure = ''
+    substituteInPlace qscintilla.pro \
+      --replace '$$[QT_INSTALL_LIBS]'         $out/lib \
+      --replace '$$[QT_INSTALL_HEADERS]'      $out/include \
+      --replace '$$[QT_INSTALL_TRANSLATIONS]' $out/translations \
+      --replace '$$[QT_HOST_DATA]/mkspecs'    $out/mkspecs \
+      --replace '$$[QT_INSTALL_DATA]'         $out/share
+  '';
+
+  meta = with lib; {
+    description = "A Qt port of the Scintilla text editing library";
+    longDescription = ''
+      QScintilla is a port to Qt of Neil Hodgson's Scintilla C++ editor
+      control.
+
+      As well as features found in standard text editing components,
+      QScintilla includes features especially useful when editing and
+      debugging source code. These include support for syntax styling,
+      error indicators, code completion and call tips. The selection
+      margin can contain markers like those used in debuggers to
+      indicate breakpoints and the current line. Styling choices are
+      more open than with many editors, allowing the use of
+      proportional fonts, bold and italics, multiple foreground and
+      background colours and multiple fonts.
+    '';
+    homepage = "https://www.riverbankcomputing.com/software/qscintilla/intro";
+    license = with licenses; [ gpl3 ]; # and commercial
+    maintainers = with maintainers; [ peterhoeg ];
+    platforms = platforms.unix;
+    # ld: library not found for -lcups
+    broken = stdenv.isDarwin && lib.versionAtLeast qtbase.version "6";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/default.nix b/nixpkgs/pkgs/development/libraries/qt-5/5.15/default.nix
new file mode 100644
index 000000000000..6334217f7458
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/default.nix
@@ -0,0 +1,387 @@
+/*
+
+# Updates
+
+Run `./fetch.sh` to update package sources from Git.
+Check for any minor version changes.
+
+*/
+
+{ makeScopeWithSplicing', generateSplicesForMkScope
+, lib, stdenv, fetchurl, fetchgit, fetchpatch, fetchFromGitHub, makeSetupHook, makeWrapper
+, bison, cups ? null, harfbuzz, libGL, perl, python3
+, gstreamer, gst-plugins-base, gtk3, dconf
+, llvmPackages_15, overrideSDK, overrideLibcxx
+, darwin
+
+  # options
+, developerBuild ? false
+, decryptSslTraffic ? false
+, debug ? false
+, config
+}:
+
+let
+
+  srcs = import ./srcs.nix { inherit lib fetchgit fetchFromGitHub; } // { __attrsFailEvaluation = true; };
+
+  qtCompatVersion = srcs.qtbase.version;
+
+  patches = {
+    qtbase = lib.optionals stdenv.isDarwin [
+      ./qtbase.patch.d/0001-qtbase-mkspecs-mac.patch
+
+      # Patch framework detection to support X.framework/X.tbd,
+      # extending the current support for X.framework/X.
+      ./qtbase.patch.d/0012-qtbase-tbd-frameworks.patch
+
+      ./qtbase.patch.d/0014-aarch64-darwin.patch
+    ] ++ [
+      ./qtbase.patch.d/0003-qtbase-mkspecs.patch
+      ./qtbase.patch.d/0004-qtbase-replace-libdir.patch
+      ./qtbase.patch.d/0005-qtbase-cmake.patch
+      ./qtbase.patch.d/0006-qtbase-gtk3.patch
+      ./qtbase.patch.d/0007-qtbase-xcursor.patch
+      ./qtbase.patch.d/0008-qtbase-tzdir.patch
+      ./qtbase.patch.d/0009-qtbase-qtpluginpath.patch
+      ./qtbase.patch.d/0010-qtbase-assert.patch
+      ./qtbase.patch.d/0011-fix-header_module.patch
+    ];
+    qtdeclarative = [
+      ./qtdeclarative.patch
+      # prevent headaches from stale qmlcache data
+      ./qtdeclarative-default-disable-qmlcache.patch
+      # add version specific QML import path
+      ./qtdeclarative-qml-paths.patch
+    ];
+    qtlocation = lib.optionals stdenv.cc.isClang [
+      # Fix build with Clang 16
+      (fetchpatch {
+        url = "https://github.com/boostorg/numeric_conversion/commit/50a1eae942effb0a9b90724323ef8f2a67e7984a.patch";
+        stripLen = 1;
+        extraPrefix = "src/3rdparty/mapbox-gl-native/deps/boost/1.65.1/";
+        hash = "sha256-UEvIXzn387f9BAeBdhheStD/4M7en+rmqX8C6gstl6k=";
+      })
+    ];
+    qtmultimedia = lib.optionals stdenv.isDarwin [
+      # build patch for qtmultimedia with xcode 15
+      (fetchpatch {
+        url = "https://raw.githubusercontent.com/Homebrew/formula-patches/3f509180/qt5/qt5-qtmultimedia-xcode15.patch";
+        stripLen = 1;
+        hash = "sha256-HrEqfmm8WbapWgLM0L4AKW8168pwT2zYI8HOJruEPSs=";
+      })
+    ];
+    qtpim = [
+      ## Upstream patches after the Qt6 transition that apply without problems & fix bugs
+
+      # Fixes QList -> QSet conversion
+      (fetchpatch {
+        url = "https://github.com/qt/qtpim/commit/f337e281e28904741a3b1ac23d15c3a83ef2bbc9.patch";
+        hash = "sha256-zlxD45JnbhIgdJxMmGxGMUBcQPcgzpu3s4bLX939jL0=";
+      })
+      # Fixes invalid syntax from a previous bad patch in tests
+      (fetchpatch {
+        url = "https://github.com/qt/qtpim/commit/2aefdd8bd28a4decf9ef8381f5b255f39f1ee90c.patch";
+        hash = "sha256-mg93QF3hi50igw1/Ok7fEs9iCaN6co1+p2/5fQtxTmc=";
+      })
+      # Unit test account for QList index change
+      (fetchpatch {
+        url = "https://github.com/qt/qtpim/commit/79b41af6a4117f5efb0298289e20c30b4d0b0b2e.patch";
+        hash = "sha256-u+cLl4lu6r2+j5GAiasqbB6/OZPz5A6GpSB33vd/VBg=";
+      })
+      # Remove invalid method overload which confuses the QML engine
+      (fetchpatch {
+        url = "https://github.com/qt/qtpim/commit/5679a6141c76ae7d64c3acc8a87b1adb048289e0.patch";
+        hash = "sha256-z8f8kLhC9CqBOfGPL8W9KJq7MwALAAicXfRkHiQEVJ4=";
+      })
+      # Specify enum flag type properly in unit test
+      (fetchpatch {
+        url = "https://github.com/qt/qtpim/commit/a43cc24e57db8d3c3939fa540d67da3294dcfc5c.patch";
+        hash = "sha256-SsYkxX6prxi8VRZr4az+wqawcRN8tR3UuIFswJL+3T4=";
+      })
+      # Update qHash methods to return size_t instead of uint
+      (fetchpatch {
+        url = "https://github.com/qt/qtpim/commit/9c698155d82fc2b68a87c59d0443c33f9085b117.patch";
+        hash = "sha256-rb8D8taaglhQikYSAPrtLvazgIw8Nga/a9+J21k8gIo=";
+      })
+      # Mark virtual methods with override keyword
+      (fetchpatch {
+        url = "https://github.com/qt/qtpim/commit/f34cf2ff2b0f428d5b8a70763b29088075ebbd1c.patch";
+        hash = "sha256-tNPOEVpx1eqHx5T23ueW32KxMQ/SB+TBCJ4PZ6SA3LI=";
+      })
+      # Fix calendardemo example
+      (fetchpatch {
+        url = "https://github.com/qt/qtpim/commit/a66590d473753bc49105d3132fb9e4150c92a14a.patch";
+        hash = "sha256-RPRtGQ24NQYewnv6+IqYITpwD/XxuK68a1iKgFmKm3c=";
+      })
+      # Make the tests pass on big endian systems
+      (fetchpatch {
+        url = "https://github.com/qt/qtpim/commit/7802f038ed1391078e27fa3f37d785a69314537b.patch";
+        hash = "sha256-hogUXyPXjGE0q53PWOjiQbQ2YzOsvrJ7mo9djGIbjVQ=";
+      })
+      # Fix some deprecated QChar constructor issues in unit tests
+      (fetchpatch {
+        url = "https://github.com/qt/qtpim/commit/114615812dcf9398c957b0833e860befe15f840f.patch";
+        hash = "sha256-yZ1qs8y5DSq8FDXRPyuSPRIzjEUTWAhpVide/b+xaLQ=";
+      })
+      # Accessors should be const
+      (fetchpatch {
+        url = "https://github.com/qt/qtpim/commit/a2bf7cdf05c264b5dd2560f799760b5508f154e4.patch";
+        hash = "sha256-+YfPrKyOKnPkqFokwW/aDsEivg4TzdJwQpDdAtM+rQE=";
+      })
+      # Enforce detail access constraints in contact operations by default
+      (fetchpatch {
+        url = "https://github.com/qt/qtpim/commit/8765a35233aa21a932ee92bbbb92a5f8edd4dc68.patch";
+        hash = "sha256-vp/enerVecEXz4zyxQ66DG+fVVWxI4bYnLj92qaaqNk=";
+      })
+      # Fixes broken file generation, which breaks reverse dependencies that try to find one of its modules
+      (fetchpatch {
+        url = "https://github.com/qt/qtpim/commit/4b2bdce30bd0629c9dc0567af6eeaa1d038f3152.patch";
+        hash = "sha256-2dXhkZyxPvY2KQq2veerAlpXkpU5/FeArWRlm1aOcEY=";
+      })
+
+      ## Patches that haven't been upstreamed
+
+      # Fix tst_QContactManager::compareVariant_data test
+      (fetchpatch {
+        url = "https://salsa.debian.org/qt-kde-team/qt/qtpim/-/raw/360682f88457b5ae7c92f32f574e51ccc5edbea0/debian/patches/1001_fix-qtdatetime-null-comparison.patch";
+        hash = "sha256-k/rO9QjwSlRChwFTZLkxDjZWqFkua4FNbaNf1bJKLxc=";
+      })
+      # Avoid crash while parsing vCards from different threads
+      (fetchpatch {
+        url = "https://salsa.debian.org/qt-kde-team/qt/qtpim/-/raw/360682f88457b5ae7c92f32f574e51ccc5edbea0/debian/patches/1002_Avoid-crash-while-parsing-vcards-from-different-threads.patch";
+        hash = "sha256-zhayAoWgcmKosEGVBy2k6a2e6BxyVwfGX18tBbzqEk8=";
+      })
+      # Adapt to JSON parser behavior change in Qt 5.15
+      (fetchpatch {
+        url = "https://salsa.debian.org/qt-kde-team/qt/qtpim/-/raw/360682f88457b5ae7c92f32f574e51ccc5edbea0/debian/patches/1003_adapt_to_json_parser_change.patch";
+        hash = "sha256-qAIa48hmDd8vMH/ywqW+22vISKai76XnjgFuB+tQbIU=";
+      })
+      # Fix version being 0.0.0
+      (fetchpatch {
+        url = "https://salsa.debian.org/qt-kde-team/qt/qtpim/-/raw/360682f88457b5ae7c92f32f574e51ccc5edbea0/debian/patches/2000_revert_module_version.patch";
+        hash = "sha256-6wg/eVu9J83yvIO428U1FX3otz58tAy6pCvp7fqOBKU=";
+      })
+    ];
+    qtscript = [ ./qtscript.patch ];
+    qtserialport = [ ./qtserialport.patch ];
+    qtsystems = [
+      # Enable building with udisks support
+      (fetchpatch {
+        url = "https://salsa.debian.org/qt-kde-team/qt/qtsystems/-/raw/a23fd92222c33479d7f3b59e48116def6b46894c/debian/patches/2001_build_with_udisk.patch";
+        hash = "sha256-B/z/+tai01RU/bAJSCp5a0/dGI8g36nwso8MiJv27YM=";
+      })
+    ];
+    qtwebengine = [
+      (fetchpatch {
+        url = "https://raw.githubusercontent.com/Homebrew/formula-patches/a6f16c6daea3b5a1f7bc9f175d1645922c131563/qt5/qt5-webengine-python3.patch";
+        hash = "sha256-rUSDwTucXVP3Obdck7LRTeKZ+JYQSNhQ7+W31uHZ9yM=";
+      })
+      (fetchpatch {
+        url = "https://raw.githubusercontent.com/Homebrew/formula-patches/7ae178a617d1e0eceb742557e63721af949bd28a/qt5/qt5-webengine-chromium-python3.patch";
+        stripLen = 1;
+        extraPrefix = "src/3rdparty/";
+        hash = "sha256-MZGYeMdGzwypfKoSUaa56K3inbcGRx7he/+AFyk5ekA=";
+      })
+      (fetchpatch {
+        url = "https://raw.githubusercontent.com/Homebrew/formula-patches/7ae178a617d1e0eceb742557e63721af949bd28a/qt5/qt5-webengine-gcc12.patch";
+        stripLen = 1;
+        extraPrefix = "src/3rdparty/";
+        hash = "sha256-s4GsGMJTBNWw2gTJuIEP3tqT82AmTsR2mbj59m2p6rM=";
+      })
+      ./qtwebengine-link-pulseaudio.patch
+    ] ++ lib.optionals stdenv.isDarwin [
+      ./qtwebengine-darwin-no-platform-check.patch
+      ./qtwebengine-mac-dont-set-dsymutil-path.patch
+      ./qtwebengine-darwin-checks.patch
+    ];
+    qtwebkit = [
+      (fetchpatch {
+        name = "qtwebkit-bison-3.7-build.patch";
+        url = "https://github.com/qtwebkit/qtwebkit/commit/d92b11fea65364fefa700249bd3340e0cd4c5b31.patch";
+        sha256 = "0h8ymfnwgkjkwaankr3iifiscsvngqpwb91yygndx344qdiw9y0n";
+      })
+      (fetchpatch {
+        name = "qtwebkit-glib-2.68.patch";
+        url = "https://github.com/qtwebkit/qtwebkit/pull/1058/commits/5b698ba3faffd4e198a45be9fe74f53307395e4b.patch";
+        sha256 = "0a3xv0h4lv8wggckgy8cg8xnpkg7n9h45312pdjdnnwy87xvzss0";
+      })
+      (fetchpatch {
+        name = "qtwebkit-darwin-handle.patch";
+        url = "https://github.com/qtwebkit/qtwebkit/commit/5c272a21e621a66862821d3ae680f27edcc64c19.patch";
+        sha256 = "9hjqLyABz372QDgoq7nXXXQ/3OXBGcYN1/92ekcC3WE=";
+      })
+      (fetchpatch {
+        name = "qtwebkit-libxml2-api-change.patch";
+        url = "https://github.com/WebKit/WebKit/commit/1bad176b2496579d760852c80cff3ad9fb7c3a4b.patch";
+        sha256 = "WZEj+UuKhgJBM7auhND3uddk1wWdTY728jtiWVe7CSI=";
+      })
+      ./qtwebkit.patch
+      ./qtwebkit-icu68.patch
+      ./qtwebkit-cstdint.patch
+    ] ++ lib.optionals stdenv.isDarwin [
+      ./qtwebkit-darwin-no-readline.patch
+      ./qtwebkit-darwin-no-qos-classes.patch
+    ];
+    qttools = [ ./qttools.patch ];
+  };
+
+  addPackages = self:
+    let
+      qtModule = callPackage ../qtModule.nix {
+        inherit patches;
+        # Use a variant of mkDerivation that does not include wrapQtApplications
+        # to avoid cyclic dependencies between Qt modules.
+        mkDerivation =
+          (callPackage ../mkDerivation.nix { wrapQtAppsHook = null; }) stdenv.mkDerivation;
+      };
+
+      callPackage = self.newScope { inherit qtCompatVersion qtModule srcs stdenv; };
+    in {
+
+      inherit callPackage qtCompatVersion qtModule srcs;
+
+      mkDerivationWith = callPackage ../mkDerivation.nix { };
+
+      mkDerivation = callPackage ({ mkDerivationWith }: mkDerivationWith stdenv.mkDerivation) { };
+
+      qtbase = callPackage ../modules/qtbase.nix {
+        inherit (srcs.qtbase) src version;
+        patches = patches.qtbase;
+        inherit bison cups harfbuzz libGL;
+        withGtk3 = !stdenv.isDarwin; inherit dconf gtk3;
+        inherit developerBuild decryptSslTraffic;
+        inherit (darwin.apple_sdk_11_0.frameworks) AGL AppKit ApplicationServices AVFoundation Carbon Cocoa CoreAudio CoreBluetooth
+          CoreLocation CoreServices DiskArbitration Foundation OpenGL MetalKit IOKit;
+        libobjc = darwin.apple_sdk_11_0.objc4;
+        xcbuild = darwin.apple_sdk_11_0.xcodebuild;
+      };
+
+      qt3d = callPackage ../modules/qt3d.nix {};
+      qtcharts = callPackage ../modules/qtcharts.nix {};
+      qtconnectivity = callPackage ../modules/qtconnectivity.nix {
+        inherit (darwin.apple_sdk_11_0.frameworks) IOBluetooth;
+      };
+      qtdatavis3d = callPackage ../modules/qtdatavis3d.nix {};
+      qtdeclarative = callPackage ../modules/qtdeclarative.nix {};
+      qtdoc = callPackage ../modules/qtdoc.nix {};
+      qtgamepad = callPackage ../modules/qtgamepad.nix {
+        inherit (darwin.apple_sdk_11_0.frameworks) GameController;
+      };
+      qtgraphicaleffects = callPackage ../modules/qtgraphicaleffects.nix {};
+      qtimageformats = callPackage ../modules/qtimageformats.nix {};
+      qtlocation = callPackage ../modules/qtlocation.nix {};
+      qtlottie = callPackage ../modules/qtlottie.nix {};
+      qtmacextras = callPackage ../modules/qtmacextras.nix {};
+      qtmultimedia = callPackage ../modules/qtmultimedia.nix {
+        inherit gstreamer gst-plugins-base;
+      };
+      qtnetworkauth = callPackage ../modules/qtnetworkauth.nix {};
+      qtpim = callPackage ../modules/qtpim.nix {};
+      qtpositioning = callPackage ../modules/qtpositioning.nix {};
+      qtquick1 = null;
+      qtquickcontrols = callPackage ../modules/qtquickcontrols.nix {};
+      qtquickcontrols2 = callPackage ../modules/qtquickcontrols2.nix {};
+      qtremoteobjects = callPackage ../modules/qtremoteobjects.nix {};
+      qtscript = callPackage ../modules/qtscript.nix {};
+      qtsensors = callPackage ../modules/qtsensors.nix {};
+      qtserialbus = callPackage ../modules/qtserialbus.nix {};
+      qtserialport = callPackage ../modules/qtserialport.nix {};
+      qtspeech = callPackage ../modules/qtspeech.nix {};
+      qtsvg = callPackage ../modules/qtsvg.nix {};
+      qtsystems = callPackage ../modules/qtsystems.nix {};
+      qtscxml = callPackage ../modules/qtscxml.nix {};
+      qttools = callPackage ../modules/qttools.nix {};
+      qttranslations = callPackage ../modules/qttranslations.nix {};
+      qtvirtualkeyboard = callPackage ../modules/qtvirtualkeyboard.nix {};
+      qtwayland = callPackage ../modules/qtwayland.nix {};
+      qtwebchannel = callPackage ../modules/qtwebchannel.nix {};
+      qtwebengine = callPackage ../modules/qtwebengine.nix {
+        # The version of Chromium used by Qt WebEngine 5.15.x does not build with clang 16 due
+        # to the following errors:
+        # * -Wenum-constexpr-conversion: This is a downgradable error in clang 16, but it is planned
+        #   to be made into a hard error in a future version of clang. Patches are not available for
+        #   the version of v8 used by Chromium in Qt WebEngine, and fixing the code is non-trivial.
+        # * -Wincompatible-function-pointer-types: This is also a downgradable error generated
+        #   starting with clang 16. Patches are available upstream that can be backported.
+        # Because the first error is non-trivial to fix and suppressing it risks future breakage,
+        # clang is pinned to clang 15. That also makes fixing the second set of errors unnecessary.
+        stdenv =
+          let stdenv' = if stdenv.cc.isClang then overrideLibcxx llvmPackages_15.stdenv else stdenv;
+          in if stdenv'.isDarwin then overrideSDK stdenv' "11.0" else stdenv';
+        inherit (srcs.qtwebengine) version;
+        python = python3;
+        postPatch = ''
+          # update catapult for python3 compatibility
+          rm -r src/3rdparty/chromium/third_party/catapult
+          cp -r ${srcs.catapult} src/3rdparty/chromium/third_party/catapult
+        '';
+        inherit (darwin) cctools xnu;
+        inherit (darwin.apple_sdk_11_0) libpm libunwind;
+        inherit (darwin.apple_sdk_11_0.libs) sandbox;
+        inherit (darwin.apple_sdk_11_0.frameworks) ApplicationServices AVFoundation Foundation ForceFeedback GameController AppKit
+          ImageCaptureCore CoreBluetooth IOBluetooth CoreWLAN Quartz Cocoa LocalAuthentication
+          MediaPlayer MediaAccessibility SecurityInterface Vision CoreML OpenDirectory Accelerate;
+        libobjc = darwin.apple_sdk_11_0.objc4;
+      };
+      qtwebglplugin = callPackage ../modules/qtwebglplugin.nix {};
+      qtwebkit = callPackage ../modules/qtwebkit.nix {
+        inherit (darwin) ICU;
+        inherit (darwin.apple_sdk_11_0.frameworks) OpenGL;
+      };
+      qtwebsockets = callPackage ../modules/qtwebsockets.nix {};
+      qtwebview = callPackage ../modules/qtwebview.nix {
+        inherit (darwin.apple_sdk_11_0.frameworks) CoreFoundation WebKit;
+      };
+      qtx11extras = callPackage ../modules/qtx11extras.nix {};
+      qtxmlpatterns = callPackage ../modules/qtxmlpatterns.nix {};
+
+      env = callPackage ../qt-env.nix {};
+      full = callPackage ({ env, qtbase }: env "qt-full-${qtbase.version}") { }
+      # `with self` is ok to use here because having these spliced is unnecessary
+      (with self; [
+        qt3d qtcharts qtconnectivity qtdeclarative qtdoc qtgraphicaleffects
+        qtimageformats qtlocation qtmultimedia qtquickcontrols qtquickcontrols2
+        qtscript qtsensors qtserialport qtsvg qttools qttranslations
+        qtvirtualkeyboard qtwebchannel qtwebengine qtwebsockets
+        qtwebview qtx11extras qtxmlpatterns qtlottie qtdatavis3d
+      ] ++ lib.optional (!stdenv.isDarwin) qtwayland
+        ++ lib.optional (stdenv.isDarwin) qtmacextras);
+
+      qmake = callPackage ({ qtbase }: makeSetupHook {
+        name = "qmake-hook";
+        ${if stdenv.buildPlatform == stdenv.hostPlatform
+          then "propagatedBuildInputs"
+          else "depsTargetTargetPropagated"} = [ qtbase.dev ];
+        substitutions = {
+          inherit debug;
+          fix_qmake_libtool = ../hooks/fix-qmake-libtool.sh;
+        };
+      } ../hooks/qmake-hook.sh) { };
+
+      wrapQtAppsHook = callPackage ({ makeBinaryWrapper, qtbase, qtwayland }: makeSetupHook {
+        name = "wrap-qt5-apps-hook";
+        propagatedBuildInputs = [ qtbase.dev makeBinaryWrapper ]
+          ++ lib.optional stdenv.isLinux qtwayland.dev;
+      } ../hooks/wrap-qt-apps-hook.sh) { };
+    };
+
+  baseScope = makeScopeWithSplicing' {
+    otherSplices = generateSplicesForMkScope "qt5";
+    f = addPackages;
+  };
+
+  bootstrapScope = baseScope.overrideScope(final: prev: {
+    qtbase = prev.qtbase.override { qttranslations = null; };
+    qtdeclarative = null;
+  });
+
+  finalScope = baseScope.overrideScope(final: prev: {
+    # qttranslations causes eval-time infinite recursion when
+    # cross-compiling; disabled for now.
+    qttranslations =
+      if stdenv.buildPlatform == stdenv.hostPlatform
+      then bootstrapScope.qttranslations
+      else null;
+  });
+in finalScope
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/fetch.sh b/nixpkgs/pkgs/development/libraries/qt-5/5.15/fetch.sh
new file mode 100755
index 000000000000..7225b432c574
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/fetch.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p nix-prefetch-scripts jq
+
+set -eox pipefail
+
+here="$(dirname "${BASH_SOURCE[0]}")"
+modules="${here}/modules"
+srcs="${here}/srcs-generated.json"
+
+while read -r module; do
+    if [[ -z "$module" ]]; then continue; fi
+    url="https://invent.kde.org/qt/qt/${module}.git"
+    nix-prefetch-git --url $url --rev refs/heads/kde/5.15 --fetch-submodules \
+        | jq "{key: \"${module}\", value: {url,rev,sha256}}"
+done < "$modules" | jq -s 'from_entries' > "${srcs}.tmp"
+
+mv "${srcs}.tmp" "$srcs"
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/modules b/nixpkgs/pkgs/development/libraries/qt-5/5.15/modules
new file mode 100644
index 000000000000..ccc7dbcb8151
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/modules
@@ -0,0 +1,40 @@
+qt3d
+qtactiveqt
+qtandroidextras
+qtbase
+qtcharts
+qtconnectivity
+qtdatavis3d
+qtdeclarative
+qtdoc
+qtgamepad
+qtgraphicaleffects
+qtimageformats
+qtlocation
+qtlottie
+qtmacextras
+qtmultimedia
+qtnetworkauth
+qtpurchasing
+qtquick3d
+qtquickcontrols
+qtquickcontrols2
+qtquicktimeline
+qtremoteobjects
+qtscxml
+qtsensors
+qtserialbus
+qtserialport
+qtspeech
+qtsvg
+qttools
+qttranslations
+qtvirtualkeyboard
+qtwayland
+qtwebchannel
+qtwebglplugin
+qtwebsockets
+qtwebview
+qtwinextras
+qtx11extras
+qtxmlpatterns
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0001-qtbase-mkspecs-mac.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0001-qtbase-mkspecs-mac.patch
new file mode 100644
index 000000000000..9d2a47c7c348
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0001-qtbase-mkspecs-mac.patch
@@ -0,0 +1,485 @@
+From 5ec1d1009d9943f20e82ffc087deabb31d447e75 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Milan=20P=C3=A4ssler?= <me@pbb.lc>
+Date: Fri, 3 Apr 2020 21:07:58 +0200
+Subject: [PATCH 01/11] qtbase-mkspecs-mac
+
+---
+ mkspecs/common/mac.conf               |   2 +-
+ mkspecs/features/mac/default_post.prf | 206 --------------------------
+ mkspecs/features/mac/default_pre.prf  |  58 --------
+ mkspecs/features/mac/sdk.mk           |  25 ----
+ mkspecs/features/mac/sdk.prf          |  61 --------
+ 5 files changed, 1 insertion(+), 351 deletions(-)
+ delete mode 100644 mkspecs/features/mac/sdk.mk
+ delete mode 100644 mkspecs/features/mac/sdk.prf
+
+diff --git a/mkspecs/common/mac.conf b/mkspecs/common/mac.conf
+index 61bea952b2..9909dae726 100644
+--- a/mkspecs/common/mac.conf
++++ b/mkspecs/common/mac.conf
+@@ -23,7 +23,7 @@ QMAKE_INCDIR_OPENGL     = \
+ 
+ QMAKE_FIX_RPATH         = install_name_tool -id
+ 
+-QMAKE_LFLAGS_RPATH      = -Wl,-rpath,
++QMAKE_LFLAGS_RPATH      =
+ QMAKE_LFLAGS_GCSECTIONS = -Wl,-dead_strip
+ 
+ QMAKE_LFLAGS_REL_RPATH  =
+diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf
+index abc6d82ade..59b94fe5b6 100644
+--- a/mkspecs/features/mac/default_post.prf
++++ b/mkspecs/features/mac/default_post.prf
+@@ -1,9 +1,5 @@
+ load(default_post)
+ 
+-# Recompute SDK version in case the user set it explicitly
+-sdk_version = $$QMAKE_MAC_SDK_VERSION
+-QMAKE_MAC_SDK_VERSION = $$xcodeSDKInfo(SDKVersion)
+-
+ contains(TEMPLATE, .*app) {
+     !macx-xcode:if(isEmpty(BUILDS)|build_pass) {
+         # Detect changes to the platform SDK
+@@ -16,36 +12,6 @@ contains(TEMPLATE, .*app) {
+         QMAKE_EXTRA_INCLUDES += $$shell_quote($$PWD/sdk.mk)
+     }
+ 
+-    # Detect incompatible SDK versions
+-
+-    isEmpty(QT_MAC_SDK_VERSION_MIN): \
+-        QT_MAC_SDK_VERSION_MIN = $$QT_MAC_SDK_VERSION
+-
+-    !versionAtLeast(QMAKE_MAC_SDK_VERSION, $$QT_MAC_SDK_VERSION_MIN): \
+-        warning("Qt requires at least version $$QT_MAC_SDK_VERSION_MIN of the platform SDK," \
+-              "you're building against version $${QMAKE_MAC_SDK_VERSION}. Please upgrade.")
+-
+-    !isEmpty(QT_MAC_SDK_VERSION_MAX) {
+-        # For Qt developers only
+-        !isEmpty($$list($$(QT_MAC_SDK_NO_VERSION_CHECK))): \
+-            CONFIG += sdk_no_version_check
+-
+-        QMAKE_MAC_SDK_MAJOR_VERSION = $$replace(QMAKE_MAC_SDK_VERSION, "(\\d+)(\\.\\d+)(\\.\\d+)?", \\1)
+-
+-        !sdk_no_version_check:!versionAtMost(QMAKE_MAC_SDK_MAJOR_VERSION, $$QT_MAC_SDK_VERSION_MAX) {
+-            warning("Qt has only been tested with version $$QT_MAC_SDK_VERSION_MAX"\
+-                    "of the platform SDK, you're using $${QMAKE_MAC_SDK_MAJOR_VERSION}.")
+-            warning("This is an unsupported configuration. You may experience build issues," \
+-                    "and by using")
+-            warning("the $$QMAKE_MAC_SDK_VERSION SDK you are opting in to new features" \
+-                    "that Qt has not been prepared for.")
+-
+-            warning("Please downgrade the SDK you use to build your app to version" \
+-                    "$$QT_MAC_SDK_VERSION_MAX, or configure")
+-            warning("with CONFIG+=sdk_no_version_check when running qmake" \
+-                    "to silence this warning.")
+-        }
+-    }
+ }
+ 
+ !no_objective_c:CONFIG += objective_c
+@@ -73,230 +39,6 @@ qt {
+     }
+ }
+ 
+-# Add the same default rpaths as Xcode does for new projects.
+-# This is especially important for iOS/tvOS/watchOS where no other option is possible.
+-!no_default_rpath {
+-    uikit: QMAKE_RPATHDIR += @executable_path/Frameworks
+-    else: QMAKE_RPATHDIR += @executable_path/../Frameworks
+-    equals(TEMPLATE, lib):!plugin:lib_bundle: QMAKE_RPATHDIR += @loader_path/Frameworks
+-}
+-
+-# Don't pass -headerpad_max_install_names when using Bitcode.
+-# In that case the linker emits a warning stating that the flag is ignored when
+-# used with bitcode, for reasons that cannot be determined (rdar://problem/20748962).
+-# Using this flag is also unnecessary in practice on UIKit platforms since they
+-# are sandboxed, and only UIKit platforms support bitcode to begin with.
+-!bitcode: QMAKE_LFLAGS += $$QMAKE_LFLAGS_HEADERPAD
+-
+-app_extension_api_only {
+-    QMAKE_CFLAGS              += $$QMAKE_CFLAGS_APPLICATION_EXTENSION
+-    QMAKE_CXXFLAGS            += $$QMAKE_CFLAGS_APPLICATION_EXTENSION
+-    QMAKE_CXXFLAGS_PRECOMPILE += $$QMAKE_CFLAGS_APPLICATION_EXTENSION
+-    QMAKE_LFLAGS              += $$QMAKE_CFLAGS_APPLICATION_EXTENSION
+-}
+-
+-macos {
+-    !isEmpty(QMAKE_APPLE_DEVICE_ARCHS) {
+-        # If the user has requested a specific set of architectures,
+-        # build all of those by default, but limited to only those.
+-        CONFIG -= only_active_arch
+-    } else {
+-        # Otherwise allow building all of the architectures available
+-        # in Qt, but only build the active arch (unless the user has
+-        # manually overridden this via CONFIG -= only_active_arch).
+-        QMAKE_APPLE_DEVICE_ARCHS = $$QT_ARCHS
+-    }
+-}
+-
+-macx-xcode {
+-    qmake_pkginfo_typeinfo.name = QMAKE_PKGINFO_TYPEINFO
+-    !isEmpty(QMAKE_PKGINFO_TYPEINFO): \
+-        qmake_pkginfo_typeinfo.value = $$QMAKE_PKGINFO_TYPEINFO
+-    else: \
+-        qmake_pkginfo_typeinfo.value = "????"
+-    QMAKE_MAC_XCODE_SETTINGS += qmake_pkginfo_typeinfo
+-
+-    bundle_version = $$VERSION
+-    isEmpty(bundle_version): bundle_version = 1.0.0
+-
+-    l = $$split(bundle_version, '.') 0 0  # make sure there are at least three
+-    VER_MAJ = $$member(l, 0, 0)
+-    VER_MIN = $$member(l, 1, 1)
+-    VER_PAT = $$member(l, 2, 2)
+-    unset(l)
+-
+-    qmake_full_version.name = QMAKE_FULL_VERSION
+-    qmake_full_version.value = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT}
+-    QMAKE_MAC_XCODE_SETTINGS += qmake_full_version
+-
+-    qmake_short_version.name = QMAKE_SHORT_VERSION
+-    qmake_short_version.value = $${VER_MAJ}.$${VER_MIN}
+-    QMAKE_MAC_XCODE_SETTINGS += qmake_short_version
+-
+-    !isEmpty(QMAKE_XCODE_DEBUG_INFORMATION_FORMAT) {
+-        debug_information_format.name = DEBUG_INFORMATION_FORMAT
+-        debug_information_format.value = $$QMAKE_XCODE_DEBUG_INFORMATION_FORMAT
+-        debug_information_format.build = debug
+-        QMAKE_MAC_XCODE_SETTINGS += debug_information_format
+-    }
+-
+-    QMAKE_XCODE_ARCHS =
+-
+-    arch_device.name = "ARCHS[sdk=$${device.sdk}*]"
+-    arch_device.value = $$QMAKE_APPLE_DEVICE_ARCHS
+-    QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_DEVICE_ARCHS
+-    QMAKE_MAC_XCODE_SETTINGS += arch_device
+-
+-    simulator {
+-        arch_simulator.name = "ARCHS[sdk=$${simulator.sdk}*]"
+-        arch_simulator.value = $$QMAKE_APPLE_SIMULATOR_ARCHS
+-        QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_SIMULATOR_ARCHS
+-        QMAKE_MAC_XCODE_SETTINGS += arch_simulator
+-    }
+-
+-    only_active_arch.name = ONLY_ACTIVE_ARCH
+-    only_active_arch.value = YES
+-    only_active_arch.build = debug
+-    QMAKE_MAC_XCODE_SETTINGS += only_active_arch
+-} else {
+-    device|!simulator: VALID_DEVICE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS
+-    simulator: VALID_SIMULATOR_ARCHS = $$QMAKE_APPLE_SIMULATOR_ARCHS
+-    VALID_ARCHS = $$VALID_DEVICE_ARCHS $$VALID_SIMULATOR_ARCHS
+-
+-    single_arch: VALID_ARCHS = $$first(VALID_ARCHS)
+-
+-    macos {
+-        only_active_arch: DEFAULT_ARCHS = $$system("uname -m")
+-        else: DEFAULT_ARCHS = $$VALID_ARCHS
+-    }
+-
+-    ARCHS = $(filter $(EXPORT_VALID_ARCHS), \
+-        $(if $(ARCHS), $(ARCHS), \
+-            $(if $(EXPORT_DEFAULT_ARCHS), $(EXPORT_DEFAULT_ARCHS), \
+-        $(EXPORT_VALID_ARCHS))))
+-    ARCH_ARGS = $(foreach arch, $(if $(EXPORT_ARCHS), $(EXPORT_ARCHS), $(EXPORT_VALID_ARCHS)), -arch $(arch))
+-
+-    QMAKE_EXTRA_VARIABLES += VALID_ARCHS DEFAULT_ARCHS ARCHS ARCH_ARGS
+-
+-    arch_flags = $(EXPORT_ARCH_ARGS)
+-
+-    QMAKE_CFLAGS += $$arch_flags
+-    QMAKE_CXXFLAGS += $$arch_flags
+-    QMAKE_LFLAGS += $$arch_flags
+-
+-    QMAKE_PCH_ARCHS = $$VALID_ARCHS
+-
+-    macos: deployment_target = $$QMAKE_MACOSX_DEPLOYMENT_TARGET
+-    ios: deployment_target = $$QMAKE_IOS_DEPLOYMENT_TARGET
+-    tvos: deployment_target = $$QMAKE_TVOS_DEPLOYMENT_TARGET
+-    watchos: deployment_target = $$QMAKE_WATCHOS_DEPLOYMENT_TARGET
+-
+-    # If we're doing a simulator and device build, device and simulator
+-    # architectures use different paths and flags for the sysroot and
+-    # deployment target switch, so we must multiplex them across multiple
+-    # architectures using -Xarch. Otherwise we fall back to the simple path.
+-    # This is not strictly necessary, but results in cleaner command lines
+-    # and makes it easier for people to override EXPORT_VALID_ARCHS to limit
+-    # individual rules to a different set of architecture(s) from the overall
+-    # build (such as machtest in QtCore).
+-    simulator:device {
+-        QMAKE_XARCH_CFLAGS =
+-        QMAKE_XARCH_LFLAGS =
+-        QMAKE_EXTRA_VARIABLES += QMAKE_XARCH_CFLAGS QMAKE_XARCH_LFLAGS
+-
+-        for (arch, VALID_ARCHS) {
+-            contains(VALID_SIMULATOR_ARCHS, $$arch) {
+-                sdk = $$simulator.sdk
+-                version_identifier = $$simulator.deployment_identifier
+-            } else {
+-                sdk = $$device.sdk
+-                version_identifier = $$device.deployment_identifier
+-            }
+-
+-            version_min_flags = \
+-                -Xarch_$${arch} \
+-                -m$${version_identifier}-version-min=$$deployment_target
+-            QMAKE_XARCH_CFLAGS_$${arch} = $$version_min_flags \
+-                -Xarch_$${arch} \
+-                -isysroot$$xcodeSDKInfo(Path, $$sdk)
+-            QMAKE_XARCH_LFLAGS_$${arch} = $$version_min_flags \
+-                -Xarch_$${arch} \
+-                -isysroot$$xcodeSDKInfo(Path, $$sdk)
+-
+-            QMAKE_XARCH_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS_$${arch})
+-            QMAKE_XARCH_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS_$${arch})
+-
+-            QMAKE_EXTRA_VARIABLES += \
+-                QMAKE_XARCH_CFLAGS_$${arch} \
+-                QMAKE_XARCH_LFLAGS_$${arch}
+-        }
+-
+-        QMAKE_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS)
+-        QMAKE_CXXFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS)
+-        QMAKE_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS)
+-    } else {
+-        simulator {
+-            version_identifier = $$simulator.deployment_identifier
+-            sysroot_path  = $$xcodeSDKInfo(Path, $$simulator.sdk)
+-        } else {
+-            version_identifier = $$device.deployment_identifier
+-            sysroot_path  = $$xcodeSDKInfo(Path, $$device.sdk)
+-        }
+-        version_min_flag = -m$${version_identifier}-version-min=$$deployment_target
+-        QMAKE_CFLAGS += -isysroot $$sysroot_path $$version_min_flag
+-        QMAKE_CXXFLAGS += -isysroot $$sysroot_path $$version_min_flag
+-        QMAKE_LFLAGS += -isysroot $$sysroot_path $$version_min_flag
+-    }
+-
+-    # Enable precompiled headers for multiple architectures
+-    QMAKE_CFLAGS_USE_PRECOMPILE =
+-    for (arch, VALID_ARCHS) {
+-        icc_pch_style: \
+-            use_flag = "-pch-use "
+-        else: \
+-            use_flag = -include
+-
+-        # Only use Xarch with multi-arch, as the option confuses ccache
+-        count(VALID_ARCHS, 1, greaterThan): \
+-            QMAKE_CFLAGS_USE_PRECOMPILE += \
+-                -Xarch_$${arch}
+-
+-        QMAKE_CFLAGS_USE_PRECOMPILE += \
+-            $${use_flag}${QMAKE_PCH_OUTPUT_$${arch}}
+-    }
+-    icc_pch_style {
+-        QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE -include ${QMAKE_PCH_INPUT}
+-        QMAKE_CFLAGS_USE_PRECOMPILE =
+-    } else {
+-        QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+-        QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+-        QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+-    }
+-
+-    QMAKE_PCH_OUTPUT_EXT = _${QMAKE_PCH_ARCH}$${QMAKE_PCH_OUTPUT_EXT}
+-}
+-
+-!equals(sdk_version, $$QMAKE_MAC_SDK_VERSION) {
+-    # Explicit SDK version has been set, respect that
+-    QMAKE_LFLAGS += -Wl,-sdk_version -Wl,$$sdk_version
+-}
+-
+-cache(QMAKE_XCODE_DEVELOPER_PATH, stash)
+-!isEmpty(QMAKE_XCODE_VERSION): \
+-    cache(QMAKE_XCODE_VERSION, stash)
+-
+-QMAKE_XCODE_LIBRARY_SUFFIX = $$qtPlatformTargetSuffix()
+-
+-xcode_product_bundle_identifier_setting.name = PRODUCT_BUNDLE_IDENTIFIER
+-xcode_product_bundle_identifier_setting.value = $$QMAKE_TARGET_BUNDLE_PREFIX
+-isEmpty(xcode_product_bundle_identifier_setting.value): \
+-    xcode_product_bundle_identifier_setting.value = "com.yourcompany"
+-xcode_product_bundle_target = $$QMAKE_BUNDLE
+-isEmpty(xcode_product_bundle_target): \
+-    xcode_product_bundle_target = ${PRODUCT_NAME:rfc1034identifier}
+-xcode_product_bundle_identifier_setting.value = "$${xcode_product_bundle_identifier_setting.value}.$${xcode_product_bundle_target}"
+-QMAKE_MAC_XCODE_SETTINGS += xcode_product_bundle_identifier_setting
+-
+ !macx-xcode {
+     generate_xcode_project.commands = @$(QMAKE) -spec macx-xcode \"$(EXPORT__PRO_FILE_)\" $$QMAKE_ARGS
+     generate_xcode_project.target = xcodeproj
+diff --git a/mkspecs/features/mac/default_pre.prf b/mkspecs/features/mac/default_pre.prf
+index 2c91ba6679..a6ab233825 100644
+--- a/mkspecs/features/mac/default_pre.prf
++++ b/mkspecs/features/mac/default_pre.prf
+@@ -21,61 +21,3 @@ macos {
+ }
+ 
+ load(default_pre)
+-
+-isEmpty(QMAKE_XCODE_DEVELOPER_PATH) {
+-    # Get path of Xcode's Developer directory
+-    QMAKE_XCODE_DEVELOPER_PATH = $$system("/usr/bin/xcode-select --print-path 2>/dev/null")
+-    isEmpty(QMAKE_XCODE_DEVELOPER_PATH): \
+-        error("Xcode path is not set. Please use xcode-select to choose Xcode installation path.")
+-
+-    # Make sure Xcode path is valid
+-    !exists($$QMAKE_XCODE_DEVELOPER_PATH): \
+-        error("Xcode is not installed in $${QMAKE_XCODE_DEVELOPER_PATH}. Please use xcode-select to choose Xcode installation path.")
+-}
+-
+-isEmpty(QMAKE_XCODEBUILD_PATH): \
+-    QMAKE_XCODEBUILD_PATH = $$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null")
+-
+-!isEmpty(QMAKE_XCODEBUILD_PATH) {
+-    # Make sure Xcode is set up properly
+-    !system("/usr/bin/xcrun xcodebuild -license check 2>/dev/null"): \
+-        error("Xcode not set up properly. You need to confirm the license agreement by running 'sudo xcrun xcodebuild -license accept'.")
+-
+-    isEmpty(QMAKE_XCODE_VERSION) {
+-        # Extract Xcode version using xcodebuild
+-        xcode_version = $$system("/usr/bin/xcrun xcodebuild -version")
+-        QMAKE_XCODE_VERSION = $$member(xcode_version, 1)
+-        isEmpty(QMAKE_XCODE_VERSION): error("Could not resolve Xcode version.")
+-        unset(xcode_version)
+-    }
+-}
+-
+-isEmpty(QMAKE_TARGET_BUNDLE_PREFIX) {
+-    QMAKE_XCODE_PREFERENCES_FILE = $$(HOME)/Library/Preferences/com.apple.dt.Xcode.plist
+-    exists($$QMAKE_XCODE_PREFERENCES_FILE): \
+-        QMAKE_TARGET_BUNDLE_PREFIX = $$system("/usr/libexec/PlistBuddy -c 'print IDETemplateOptions:bundleIdentifierPrefix' $$QMAKE_XCODE_PREFERENCES_FILE 2>/dev/null")
+-
+-    !isEmpty(_QMAKE_CACHE_):!isEmpty(QMAKE_TARGET_BUNDLE_PREFIX): \
+-        cache(QMAKE_TARGET_BUNDLE_PREFIX)
+-}
+-
+-QMAKE_ASSET_CATALOGS_APP_ICON = AppIcon
+-
+-# Make the default debug info format for static debug builds
+-# DWARF instead of DWARF with dSYM. This cuts down build times
+-# for application debug builds significantly, as Xcode doesn't
+-# have to pull out all the DWARF info from the Qt static libs
+-# and put it into a dSYM file. We don't need that dSYM file in
+-# the first place, since the information is available in the
+-# object files inside the archives (static libraries).
+-macx-xcode:qtConfig(static): \
+-    QMAKE_XCODE_DEBUG_INFORMATION_FORMAT = dwarf
+-
+-# This variable is used by the xcode_dynamic_library_suffix
+-# feature, which allows Xcode to choose the Qt libraries to link to
+-# at build time, depending on the current Xcode SDK and configuration.
+-QMAKE_XCODE_LIBRARY_SUFFIX_SETTING = QT_LIBRARY_SUFFIX
+-
+-xcode_copy_phase_strip_setting.name = COPY_PHASE_STRIP
+-xcode_copy_phase_strip_setting.value = NO
+-QMAKE_MAC_XCODE_SETTINGS += xcode_copy_phase_strip_setting
+diff --git a/mkspecs/features/mac/sdk.mk b/mkspecs/features/mac/sdk.mk
+--- a/mkspecs/features/mac/sdk.mk
++++ b/mkspecs/features/mac/sdk.mk
+@@ -1,27 +0,0 @@
+-
+-ifeq ($(QT_MAC_SDK_NO_VERSION_CHECK),)
+-    CHECK_SDK_COMMAND = /usr/bin/xcrun --sdk $(EXPORT_QMAKE_MAC_SDK) -show-sdk-version 2>/dev/null
+-    CURRENT_MAC_SDK_VERSION := $(shell DEVELOPER_DIR=$(EXPORT_QMAKE_XCODE_DEVELOPER_PATH) $(CHECK_SDK_COMMAND))
+-    ifneq ($(CURRENT_MAC_SDK_VERSION),$(EXPORT_QMAKE_MAC_SDK_VERSION))
+-        # We don't want to complain about out of date SDK unless the target needs to be remade.
+-        # This covers use-cases such as running 'make check' after moving the build to a
+-        # computer without Xcode or with a different Xcode version.
+-        TARGET_UP_TO_DATE := $(shell QT_MAC_SDK_NO_VERSION_CHECK=1 $(MAKE) --question $(QMAKE_TARGET) && echo 1 || echo 0)
+-        ifeq ($(TARGET_UP_TO_DATE),0)
+-            ifneq ($(findstring missing DEVELOPER_DIR path,$(CURRENT_MAC_SDK_VERSION)),)
+-                $(info The developer dir $(EXPORT_QMAKE_XCODE_DEVELOPER_PATH) is no longer valid.)
+-            else ifneq ($(findstring SDK "$(EXPORT_QMAKE_MAC_SDK)" cannot be located,$(CURRENT_MAC_SDK_VERSION)),)
+-                $(info The developer dir $(EXPORT_QMAKE_XCODE_DEVELOPER_PATH) no longer contains the $(EXPORT_QMAKE_MAC_SDK_VERSION) platform SDK.)
+-            else ifneq ($(CURRENT_MAC_SDK_VERSION),)
+-                $(info The $(EXPORT_QMAKE_MAC_SDK) platform SDK has been changed from version $(EXPORT_QMAKE_MAC_SDK_VERSION) to version $(CURRENT_MAC_SDK_VERSION).)
+-            else
+-                $(info Unknown error resolving current platform SDK version.)
+-            endif
+-            $(info This requires a fresh build of your project. Please wipe the build directory)
+-            ifneq ($(EXPORT__QMAKE_STASH_),)
+-                $(info including the qmake cache in $(EXPORT__QMAKE_STASH_))
+-            endif
+-            $(error ^)
+-        endif
+-    endif
+-endif
+diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf
+deleted file mode 100644
+index 3a9c2778bb..0000000000
+--- a/mkspecs/features/mac/sdk.prf
++++ /dev/null
+@@ -1,61 +0,0 @@
+-
+-isEmpty(QMAKE_MAC_SDK): \
+-    error("QMAKE_MAC_SDK must be set when using CONFIG += sdk.")
+-
+-contains(QMAKE_MAC_SDK, .*/.*): \
+-    error("QMAKE_MAC_SDK can only contain short-form SDK names (eg. macosx, iphoneos)")
+-
+-defineReplace(xcodeSDKInfo) {
+-    info = $$1
+-    equals(info, "Path"): \
+-        infoarg = --show-sdk-path
+-    equals(info, "PlatformPath"): \
+-        infoarg = --show-sdk-platform-path
+-    equals(info, "SDKVersion"): \
+-        infoarg = --show-sdk-version
+-    sdk = $$2
+-    isEmpty(sdk): \
+-        sdk = $$QMAKE_MAC_SDK
+-
+-    isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}) {
+-        QMAKE_MAC_SDK.$${sdk}.$${info} = $$system("/usr/bin/xcrun --sdk $$sdk $$infoarg 2>/dev/null")
+-        # --show-sdk-platform-path won't work for Command Line Tools; this is fine
+-        # only used by the XCTest backend to testlib
+-        isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}):if(!isEmpty(QMAKE_XCODEBUILD_PATH)|!equals(infoarg, "--show-sdk-platform-path")): \
+-            error("Could not resolve SDK $$info for \'$$sdk\' using $$infoarg")
+-        cache(QMAKE_MAC_SDK.$${sdk}.$${info}, set stash, QMAKE_MAC_SDK.$${sdk}.$${info})
+-    }
+-
+-    return($$eval(QMAKE_MAC_SDK.$${sdk}.$${info}))
+-}
+-
+-QMAKE_MAC_SDK_PATH = $$xcodeSDKInfo(Path)
+-QMAKE_MAC_SDK_PLATFORM_PATH = $$xcodeSDKInfo(PlatformPath)
+-QMAKE_MAC_SDK_VERSION = $$xcodeSDKInfo(SDKVersion)
+-
+-isEmpty(QMAKE_EXPORT_INCDIR_OPENGL) {
+-    QMAKE_EXPORT_INCDIR_OPENGL = $$QMAKE_INCDIR_OPENGL
+-    sysrootified =
+-    for(val, QMAKE_INCDIR_OPENGL): sysrootified += $${QMAKE_MAC_SDK_PATH}$$val
+-    QMAKE_INCDIR_OPENGL = $$sysrootified
+-}
+-
+-QMAKESPEC_NAME = $$basename(QMAKESPEC)
+-
+-# Resolve SDK version of various tools
+-for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_LINK QMAKE_LINK_SHLIB QMAKE_ACTOOL QMAKE_LINK_C QMAKE_LINK_C_SHLIB)) {
+-    tool_variable = QMAKE_MAC_SDK.$${QMAKESPEC_NAME}.$${QMAKE_MAC_SDK}.$${tool}
+-    !isEmpty($$tool_variable) {
+-        $$tool = $$eval($$tool_variable)
+-        next()
+-    }
+-
+-    value = $$eval($$tool)
+-    isEmpty(value): next()
+-
+-    sysrooted = $$system("/usr/bin/xcrun -sdk $$QMAKE_MAC_SDK -find $$first(value) 2>/dev/null")
+-    isEmpty(sysrooted): next()
+-
+-    $$tool = $$sysrooted $$member(value, 1, -1)
+-    cache($$tool_variable, set stash, $$tool)
+-}
+diff --git a/mkspecs/features/mac/toolchain.prf b/mkspecs/features/mac/toolchain.prf
+deleted file mode 100644
+index df191eb13c..0000000000
+--- a/mkspecs/features/mac/toolchain.prf
++++ /dev/null
+@@ -1,5 +0,0 @@
+-# Ensure that we process sdk.prf first, as it will update QMAKE_CXX,
+-# which the default path determination uses.
+-sdk: load(sdk)
+-
+-load(toolchain)
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0003-qtbase-mkspecs.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0003-qtbase-mkspecs.patch
new file mode 100644
index 000000000000..1c9012c0f2e8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0003-qtbase-mkspecs.patch
@@ -0,0 +1,490 @@
+From 03a5a7eab673d18d00c9b5eb8c7d5b790079e8ff Mon Sep 17 00:00:00 2001
+From: OPNA2608 <christoph.neidahl@gmail.com>
+Date: Mon, 12 Apr 2021 20:20:46 +0200
+Subject: [PATCH 03/11] qtbase-mkspecs
+
+---
+ mkspecs/features/create_cmake.prf             | 51 +++---------
+ .../data/cmake/Qt5BasicConfig.cmake.in        | 80 +------------------
+ mkspecs/features/qml_module.prf               |  2 +-
+ mkspecs/features/qml_plugin.prf               |  2 +-
+ mkspecs/features/qt_app.prf                   |  2 +-
+ mkspecs/features/qt_build_paths.prf           |  4 +-
+ mkspecs/features/qt_docs.prf                  | 10 +--
+ mkspecs/features/qt_example_installs.prf      |  2 +-
+ mkspecs/features/qt_functions.prf             | 27 ++++---
+ mkspecs/features/qt_installs.prf              | 22 ++---
+ mkspecs/features/qt_plugin.prf                |  2 +-
+ 11 files changed, 52 insertions(+), 152 deletions(-)
+
+diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
+index 24ed125f12..f0666a1986 100644
+--- a/mkspecs/features/create_cmake.prf
++++ b/mkspecs/features/create_cmake.prf
+@@ -21,7 +21,7 @@ load(cmake_functions)
+ # at cmake time whether package has been found via a symlink, and correct
+ # that to an absolute path. This is only done for installations to
+ # the /usr or / prefix.
+-CMAKE_INSTALL_LIBS_DIR = $$cmakeTargetPath($$[QT_INSTALL_LIBS])
++CMAKE_INSTALL_LIBS_DIR = $$cmakeTargetPath($$NIX_OUTPUT_OUT/lib/)
+ contains(CMAKE_INSTALL_LIBS_DIR, ^(/usr)?/lib(64)?.*): CMAKE_USR_MOVE_WORKAROUND = $$CMAKE_INSTALL_LIBS_DIR
+ 
+ CMAKE_OUT_DIR = $$MODULE_BASE_OUTDIR/lib/cmake
+@@ -77,45 +77,20 @@ split_incpath {
+         $$cmake_extra_source_includes.output
+ }
+ 
+-CMAKE_INCLUDE_DIR = $$cmakeRelativePath($$[QT_INSTALL_HEADERS], $$[QT_INSTALL_PREFIX])
+-contains(CMAKE_INCLUDE_DIR, "^\\.\\./.*") {
+-    CMAKE_INCLUDE_DIR = $$[QT_INSTALL_HEADERS]/
+-    CMAKE_INCLUDE_DIR_IS_ABSOLUTE = True
+-}
++CMAKE_INCLUDE_DIR = $$NIX_OUTPUT_DEV/include/
++CMAKE_INCLUDE_DIR_IS_ABSOLUTE = True
+ 
+-CMAKE_LIB_DIR = $$cmakeRelativePath($$[QT_INSTALL_LIBS], $$[QT_INSTALL_PREFIX])
+-contains(CMAKE_LIB_DIR,"^\\.\\./.*") {
+-    CMAKE_LIB_DIR = $$[QT_INSTALL_LIBS]/
+-    CMAKE_LIB_DIR_IS_ABSOLUTE = True
+-} else {
+-    CMAKE_RELATIVE_INSTALL_LIBS_DIR = $$cmakeRelativePath($$[QT_INSTALL_PREFIX], $$[QT_INSTALL_LIBS])
+-    # We need to go up another two levels because the CMake files are
+-    # installed in $${CMAKE_LIB_DIR}/cmake/Qt5$${CMAKE_MODULE_NAME}
+-    CMAKE_RELATIVE_INSTALL_DIR = "$${CMAKE_RELATIVE_INSTALL_LIBS_DIR}../../"
+-}
++CMAKE_BIN_DIR = $$NIX_OUTPUT_BIN/bin/
++CMAKE_BIN_DIR_IS_ABSOLUTE = True
+ 
+-CMAKE_BIN_DIR = $$cmakeRelativePath($$[QT_HOST_BINS], $$[QT_INSTALL_PREFIX])
+-contains(CMAKE_BIN_DIR, "^\\.\\./.*") {
+-    CMAKE_BIN_DIR = $$[QT_HOST_BINS]/
+-    CMAKE_BIN_DIR_IS_ABSOLUTE = True
+-}
++CMAKE_LIB_DIR = $$NIX_OUTPUT_OUT/lib/
++CMAKE_LIB_DIR_IS_ABSOLUTE = True
+ 
+-CMAKE_PLUGIN_DIR = $$cmakeRelativePath($$[QT_INSTALL_PLUGINS], $$[QT_INSTALL_PREFIX])
+-contains(CMAKE_PLUGIN_DIR, "^\\.\\./.*") {
+-    CMAKE_PLUGIN_DIR = $$[QT_INSTALL_PLUGINS]/
+-    CMAKE_PLUGIN_DIR_IS_ABSOLUTE = True
+-}
++CMAKE_PLUGIN_DIR = $$NIX_OUTPUT_PLUGIN/
++CMAKE_PLUGIN_DIR_IS_ABSOLUTE = True
+ 
+-win32:!static:!staticlib {
+-    CMAKE_DLL_DIR = $$cmakeRelativePath($$[QT_INSTALL_BINS], $$[QT_INSTALL_PREFIX])
+-    contains(CMAKE_DLL_DIR, "^\\.\\./.*") {
+-        CMAKE_DLL_DIR = $$[QT_INSTALL_BINS]/
+-        CMAKE_DLL_DIR_IS_ABSOLUTE = True
+-    }
+-} else {
+-    CMAKE_DLL_DIR = $$CMAKE_LIB_DIR
+-    CMAKE_DLL_DIR_IS_ABSOLUTE = $$CMAKE_LIB_DIR_IS_ABSOLUTE
+-}
++CMAKE_DLL_DIR = $$NIX_OUTPUT_OUT/lib/
++CMAKE_DLL_DIR_IS_ABSOLUTE = True
+ 
+ static|staticlib:CMAKE_STATIC_TYPE = true
+ 
+@@ -258,7 +233,7 @@ contains(CONFIG, plugin) {
+ 
+     cmake_qt5_plugin_file.files = $$cmake_target_file.output
+     static|staticlib: cmake_qt5_plugin_file.files += $$cmake_qt5_plugin_import_file.output
+-    cmake_qt5_plugin_file.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME}
++    cmake_qt5_plugin_file.path = $$NIX_OUTPUT_OUT/lib/cmake/Qt5$${CMAKE_MODULE_NAME}
+     INSTALLS += cmake_qt5_plugin_file
+ 
+     return()
+@@ -400,7 +375,7 @@ exists($$cmake_macros_file.input) {
+     cmake_qt5_module_files.files += $$cmake_macros_file.output
+ }
+ 
+-cmake_qt5_module_files.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME}
++cmake_qt5_module_files.path = $$NIX_OUTPUT_OUT/lib/cmake/Qt5$${CMAKE_MODULE_NAME}
+ 
+ # We are generating cmake files. Most developers of Qt are not aware of cmake,
+ # so we require automatic tests to be available. The only module which should
+diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+index db18dbece6..8246f37931 100644
+--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
++++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+@@ -2,30 +2,6 @@ if (CMAKE_VERSION VERSION_LESS 3.1.0)
+     message(FATAL_ERROR \"Qt 5 $${CMAKE_MODULE_NAME} module requires at least CMake version 3.1.0\")
+ endif()
+ 
+-!!IF !isEmpty(CMAKE_USR_MOVE_WORKAROUND)
+-!!IF !isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+-set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
+-!!ELSE
+-get_filename_component(_IMPORT_PREFIX \"${CMAKE_CURRENT_LIST_FILE}\" PATH)
+-# Use original install prefix when loaded through a
+-# cross-prefix symbolic link such as /lib -> /usr/lib.
+-get_filename_component(_realCurr \"${_IMPORT_PREFIX}\" REALPATH)
+-get_filename_component(_realOrig \"$$CMAKE_INSTALL_LIBS_DIR/cmake/Qt5$${CMAKE_MODULE_NAME}\" REALPATH)
+-if(_realCurr STREQUAL _realOrig)
+-    get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$CMAKE_INSTALL_LIBS_DIR/$${CMAKE_RELATIVE_INSTALL_LIBS_DIR}\" ABSOLUTE)
+-else()
+-    get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
+-endif()
+-unset(_realOrig)
+-unset(_realCurr)
+-unset(_IMPORT_PREFIX)
+-!!ENDIF
+-!!ELIF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+-get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
+-!!ELSE
+-set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
+-!!ENDIF
+-
+ !!IF !equals(TEMPLATE, aux)
+ # For backwards compatibility only. Use Qt5$${CMAKE_MODULE_NAME}_VERSION instead.
+ set(Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING "$$eval(QT.$${MODULE}.VERSION)")
+@@ -145,11 +121,7 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
+       IsDebugAndRelease)
+     set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
+ 
+-!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
+-    set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
+-!!ELSE
+     set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
+-!!ENDIF
+     _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
+     set(_deps
+         ${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}
+@@ -209,11 +181,7 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
+ !!ENDIF
+ 
+ !!IF !isEmpty(CMAKE_WINDOWS_BUILD)
+-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+-    set(imported_implib \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
+-!!ELSE
+     set(imported_implib \"IMPORTED_IMPLIB_${Configuration}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
+-!!ENDIF
+     _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_implib})
+     if(NOT \"${IMPLIB_LOCATION}\" STREQUAL \"\")
+         set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
+@@ -229,24 +197,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+ !!IF !no_module_headers
+ !!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
+     set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS
+-      \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework\"
+-      \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Headers\"
++      \"$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework\"
++      \"$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Headers\"
+     )
+ !!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
+     set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
+-        \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/\"
+-        \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\"
+-    )
+-!!ELSE
+-    set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
+-!!ENDIF
+-!!ELSE
+-!!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE)
+-    set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}\")
+-!!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
+-    set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
+-        \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION\"
+-        \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION/$${MODULE_INCNAME}\"
++      \"$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Versions/$$section(VERSION, .,0, 0)/Headers/$$VERSION/\"
++      \"$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Versions/$$section(VERSION, .,0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\"
+     )
+ !!ELSE
+     set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
+@@ -262,7 +219,6 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+     set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
+ !!ENDIF
+ !!ENDIF
+-!!ENDIF
+ !!IF !isEmpty(CMAKE_ADD_SOURCE_INCLUDE_DIRS)
+     include(\"${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake\" OPTIONAL)
+ !!ENDIF
+@@ -491,25 +447,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+ !!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD)
+ !!IF isEmpty(CMAKE_DEBUG_TYPE)
+ !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
+-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+-    if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
+-!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE
+     if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
+-!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
+         _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" $${CMAKE_DEBUG_AND_RELEASE})
+ !!ELSE // CMAKE_STATIC_WINDOWS_BUILD
+     if (EXISTS
+-!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
+-        \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_DEBUG}\"
+-!!ELSE
+         \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\"
+-!!ENDIF
+       AND EXISTS
+-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+-        \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
+-!!ELSE
+         \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
+-!!ENDIF
+         _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE})
+ !!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
+     endif()
+@@ -528,25 +472,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+ !!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD)
+ !!IF isEmpty(CMAKE_RELEASE_TYPE)
+ !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
+-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+-    if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
+-!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE
+     if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
+-!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
+         _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" $${CMAKE_DEBUG_AND_RELEASE})
+ !!ELSE // CMAKE_STATIC_WINDOWS_BUILD
+     if (EXISTS
+-!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
+-        \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_RELEASE}\"
+-!!ELSE
+         \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\"
+-!!ENDIF
+       AND EXISTS
+-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+-        \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
+-!!ELSE
+         \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
+-!!ENDIF
+         _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE})
+ !!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
+     endif()
+@@ -573,11 +505,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+           IsDebugAndRelease)
+         set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
+ 
+-!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE)
+-        set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
+-!!ELSE
+         set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
+-!!ENDIF
+         _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
+         set_target_properties(Qt5::${Plugin} PROPERTIES
+             \"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
+diff --git a/mkspecs/features/qml_module.prf b/mkspecs/features/qml_module.prf
+index 3d6cd9b3db..ca8b0b2701 100644
+--- a/mkspecs/features/qml_module.prf
++++ b/mkspecs/features/qml_module.prf
+@@ -51,7 +51,7 @@ builtin_resources {
+ # Install rules
+ qmldir.base = $$qmldir_path
+ qmldir.files = $$qmldir_file
+-qmldir.path = $$[QT_INSTALL_QML]/$$TARGETPATH
++qmldir.path = $$NIX_OUTPUT_QML/$$TARGETPATH
+ 
+ qmlfiles.base = $$_PRO_FILE_PWD_
+ qmlfiles.files = $$fq_aux_qml_files
+diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf
+index 1b67435787..24a1f78c17 100644
+--- a/mkspecs/features/qml_plugin.prf
++++ b/mkspecs/features/qml_plugin.prf
+@@ -50,7 +50,7 @@ load(qt_build_paths)
+ 
+ DESTDIR = $$MODULE_BASE_OUTDIR/qml/$$TARGETPATH
+ 
+-target.path = $$[QT_INSTALL_QML]/$$TARGETPATH
++target.path = $$NIX_OUTPUT_QML/$$TARGETPATH
+ INSTALLS += target
+ 
+ # Some final setup
+diff --git a/mkspecs/features/qt_app.prf b/mkspecs/features/qt_app.prf
+index 8354f30eea..62028fef8e 100644
+--- a/mkspecs/features/qt_app.prf
++++ b/mkspecs/features/qt_app.prf
+@@ -30,7 +30,7 @@ host_build:force_bootstrap {
+     target.path = $$[QT_HOST_BINS]
+ } else {
+     !build_pass:qtConfig(debug_and_release): CONFIG += release
+-    target.path = $$[QT_INSTALL_BINS]
++    target.path = $$NIX_OUTPUT_BIN/bin
+     CONFIG += relative_qt_rpath  # Qt's tools and apps should be relocatable
+ }
+ INSTALLS += target
+diff --git a/mkspecs/features/qt_build_paths.prf b/mkspecs/features/qt_build_paths.prf
+index 3bb3823a8e..655b7b7db8 100644
+--- a/mkspecs/features/qt_build_paths.prf
++++ b/mkspecs/features/qt_build_paths.prf
+@@ -24,6 +24,6 @@ exists($$MODULE_BASE_INDIR/.git): \
+ !force_independent {
+     # If the module is not built independently, everything ends up in qtbase.
+     # This is the case in non-prefix builds, except for selected modules.
+-    MODULE_BASE_OUTDIR = $$[QT_HOST_PREFIX]
+-    MODULE_QMAKE_OUTDIR = $$[QT_HOST_PREFIX]
++    MODULE_BASE_OUTDIR = $$NIX_OUTPUT_OUT
++    MODULE_QMAKE_OUTDIR = $$NIX_OUTPUT_OUT
+ }
+diff --git a/mkspecs/features/qt_docs.prf b/mkspecs/features/qt_docs.prf
+index 095bf15dac..4cc977bea5 100644
+--- a/mkspecs/features/qt_docs.prf
++++ b/mkspecs/features/qt_docs.prf
+@@ -65,7 +65,7 @@ QMAKE_DOCS_OUTPUTDIR = $$QMAKE_DOCS_BASE_OUTDIR/$$QMAKE_DOCS_TARGETDIR
+ 
+ QDOC += -outputdir $$shell_quote($$QMAKE_DOCS_OUTPUTDIR)
+ !build_online_docs: \
+-    QDOC += -installdir $$shell_quote($$[QT_INSTALL_DOCS])
++    QDOC += -installdir $$shell_quote($$NIX_OUTPUT_DOC)
+ PREP_DOC_INDEXES =
+ DOC_INDEXES =
+ !isEmpty(QTREPOS) {
+@@ -84,8 +84,8 @@ DOC_INDEXES =
+         DOC_INDEXES += -indexdir $$shell_quote($$qrep/doc)
+ } else {
+     prepare_docs: \
+-        PREP_DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS/get])
+-    DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS/get])
++        PREP_DOC_INDEXES += -indexdir $$shell_quote($$NIX_OUTPUT_DOC)
++    DOC_INDEXES += -indexdir $$shell_quote($$NIX_OUTPUT_DOC)
+ }
+ 
+ qtattributionsscanner.target = qtattributionsscanner
+@@ -108,12 +108,12 @@ prepare_docs {
+     qch_docs.commands = $$QHELPGENERATOR $$shell_quote($$QMAKE_DOCS_OUTPUTDIR/$${QMAKE_DOCS_TARGET}.qhp) -o $$shell_quote($$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch)
+ 
+     inst_html_docs.files = $$QMAKE_DOCS_OUTPUTDIR
+-    inst_html_docs.path = $$[QT_INSTALL_DOCS]
++    inst_html_docs.path = $$NIX_OUTPUT_DOC
+     inst_html_docs.CONFIG += no_check_exist directory no_default_install no_build
+     INSTALLS += inst_html_docs
+ 
+     inst_qch_docs.files = $$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch
+-    inst_qch_docs.path = $$[QT_INSTALL_DOCS]
++    inst_qch_docs.path = $$NIX_OUTPUT_DOC
+     inst_qch_docs.CONFIG += no_check_exist no_default_install no_build
+     INSTALLS += inst_qch_docs
+ 
+diff --git a/mkspecs/features/qt_example_installs.prf b/mkspecs/features/qt_example_installs.prf
+index 15b373ba40..5c373fe1d5 100644
+--- a/mkspecs/features/qt_example_installs.prf
++++ b/mkspecs/features/qt_example_installs.prf
+@@ -91,7 +91,7 @@ sourcefiles += \
+     $$SOURCES $$HEADERS $$FORMS $$RESOURCES $$TRANSLATIONS \
+     $$DBUS_ADAPTORS $$DBUS_INTERFACES
+ addInstallFiles(sources.files, $$sourcefiles)
+-sources.path = $$[QT_INSTALL_EXAMPLES]/$$probase
++sources.path = $$NIX_OUTPUT_DEV/share/examples/$$probase
+ INSTALLS += sources
+ 
+ check_examples {
+diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
+index 7777e615bd..b0c6880a74 100644
+--- a/mkspecs/features/qt_functions.prf
++++ b/mkspecs/features/qt_functions.prf
+@@ -87,19 +87,22 @@ defineTest(qtHaveModule) {
+ defineTest(qtPrepareTool) {
+     cmd = $$eval(QT_TOOL.$${2}.binary)
+     isEmpty(cmd) {
+-        cmd = $$[QT_HOST_BINS]/$$2
+-        exists($${cmd}.pl) {
+-            $${1}_EXE = $${cmd}.pl
+-            cmd = perl -w $$system_path($${cmd}.pl)
+-        } else: contains(QMAKE_HOST.os, Windows) {
+-            $${1}_EXE = $${cmd}.exe
+-            cmd = $$system_path($${cmd}.exe)
+-        } else:contains(QMAKE_HOST.os, Darwin) {
+-            BUNDLENAME = $${cmd}.app/Contents/MacOS/$$2
+-            exists($$BUNDLENAME) {
+-                cmd = $$BUNDLENAME
++        cmd = $$system("command -v $${2}")
++        isEmpty(cmd) {
++            cmd = $$system("command -v $${2}.pl")
++            !isEmpty(cmd) {
++                $${1}_EXE = $$cmd
++                cmd = perl -w $$system_path($${cmd})
++            } else: contains(QMAKE_HOST.os, Windows) {
++                cmd = $$system("command -v $${2}.exe")
++                $${1}_EXE = $$cmd
++            } else: contains(QMAKE_HOST.os, Darwin) {
++                cmd = $$system("command -v $${2}.app")
++                !isEmpty(cmd) {
++                    cmd = $${cmd}/Contents/MacOS/$${2}
++                    $${1}_EXE = $$cmd
++                }
+             }
+-            $${1}_EXE = $$cmd
+         } else {
+             $${1}_EXE = $$cmd
+         }
+diff --git a/mkspecs/features/qt_installs.prf b/mkspecs/features/qt_installs.prf
+index 1ebca17366..a8f958eae8 100644
+--- a/mkspecs/features/qt_installs.prf
++++ b/mkspecs/features/qt_installs.prf
+@@ -12,16 +12,10 @@
+ #library
+ !qt_no_install_library {
+     win32 {
+-       host_build: \
+-           dlltarget.path = $$[QT_HOST_BINS]
+-       else: \
+-           dlltarget.path = $$[QT_INSTALL_BINS]
++       dlltarget.path = $$NIX_OUTPUT_BIN/bin
+        INSTALLS += dlltarget
+     }
+-    host_build: \
+-        target.path = $$[QT_HOST_LIBS]
+-    else: \
+-        target.path = $$[QT_INSTALL_LIBS]
++    target.path = $$NIX_OUTPUT_OUT/lib
+     !static: target.CONFIG = no_dll
+     INSTALLS += target
+ }
+@@ -29,35 +23,35 @@
+ #headers
+ qt_install_headers {
+     gen_headers.files = $$SYNCQT.GENERATED_HEADER_FILES
+-    gen_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME
++    gen_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME
+     INSTALLS += gen_headers
+ 
+     targ_headers.files = $$SYNCQT.HEADER_FILES $$SYNCQT.INJECTED_HEADER_FILES
+-    targ_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME
++    targ_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME
+     INSTALLS += targ_headers
+ 
+     private_headers.files = $$SYNCQT.PRIVATE_HEADER_FILES $$SYNCQT.INJECTED_PRIVATE_HEADER_FILES
+-    private_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/private
++    private_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/private
+     generated_privates: \
+         private_headers.CONFIG += no_check_exist
+     INSTALLS += private_headers
+ 
+     qpa_headers.files = $$SYNCQT.QPA_HEADER_FILES
+-    qpa_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/qpa
++    qpa_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/qpa
+     INSTALLS += qpa_headers
+ }
+ 
+ #module
+ qt_install_module {
+     !isEmpty(MODULE_PRI) {
+-        pritarget.path = $$[QT_HOST_DATA]/mkspecs/modules
++        pritarget.path = $$NIX_OUTPUT_DEV/mkspecs/modules
+         pritarget.files = $$MODULE_PRI
+         INSTALLS += pritarget
+     } else: isEmpty(MODULE_PRIVATE_PRI) {
+         warning("Project $$basename(_PRO_FILE_) is a module, but has not defined MODULE_PRI, which is required for Qt to expose the module to other projects.")
+     }
+     !isEmpty(MODULE_PRIVATE_PRI) {
+-        privpritarget.path = $$[QT_HOST_DATA]/mkspecs/modules
++        privpritarget.path = $$NIX_OUTPUT_DEV/mkspecs/modules
+         privpritarget.files = $$MODULE_PRIVATE_PRI
+         INSTALLS += privpritarget
+     }
+diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf
+index 573d717eea..024c624cb6 100644
+--- a/mkspecs/features/qt_plugin.prf
++++ b/mkspecs/features/qt_plugin.prf
+@@ -88,7 +88,7 @@ CONFIG(static, static|shared)|prefix_build {
+     }
+ }
+ 
+-target.path = $$[QT_INSTALL_PLUGINS]/$$PLUGIN_TYPE
++target.path = $$NIX_OUTPUT_PLUGIN/$$PLUGIN_TYPE
+ INSTALLS += target
+ 
+ qt_libinfix_plugins: TARGET = $$TARGET$$QT_LIBINFIX
+-- 
+2.29.3
+
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0004-qtbase-replace-libdir.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0004-qtbase-replace-libdir.patch
new file mode 100644
index 000000000000..bbfc93897873
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0004-qtbase-replace-libdir.patch
@@ -0,0 +1,68 @@
+From 30d3906ff5e8671e9c97c5336c6c549656c0e293 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Milan=20P=C3=A4ssler?= <me@pbb.lc>
+Date: Sat, 4 Apr 2020 00:27:41 +0200
+Subject: [PATCH 04/11] qtbase-replace-libdir
+
+---
+ mkspecs/features/qt_common.prf | 20 ++------------------
+ mkspecs/features/qt_module.prf |  5 +----
+ 2 files changed, 3 insertions(+), 22 deletions(-)
+
+diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf
+index 8df94aa4ee..414029f31c 100644
+--- a/mkspecs/features/qt_common.prf
++++ b/mkspecs/features/qt_common.prf
+@@ -31,32 +31,16 @@ contains(TEMPLATE, .*lib)|contains(TEMPLATE, aux) {
+         rplbase = $$dirname(_QMAKE_SUPER_CACHE_)/[^/][^/]*
+     else: \
+         rplbase = $$MODULE_BASE_OUTDIR
+-    host_build {
+-        qqt_libdir = \$\$\$\$[QT_HOST_LIBS]
+-        qt_libdir = $$[QT_HOST_LIBS]
+-    } else {
+-        qqt_libdir = \$\$\$\$[QT_INSTALL_LIBS]
+-        qt_libdir = $$[QT_INSTALL_LIBS]
+-    }
++    qt_libdir = $$NIX_OUTPUT_OUT/lib
+     contains(QMAKE_DEFAULT_LIBDIRS, $$qt_libdir) {
+-        lib_replace0.match = $$rplbase/lib/
+-        lib_replace0.replace = $$qqt_libdir/
+-        lib_replace0.CONFIG = path
+-        QMAKE_PRL_INSTALL_REPLACE += lib_replace0
+         lib_replace.match = "[^ ']*$$rplbase/lib"
+         lib_replace.replace =
+     } else {
+         lib_replace.match = $$rplbase/lib
+-        lib_replace.replace = $$qqt_libdir
++        lib_replace.replace = $$qt_libdir
+     }
+     lib_replace.CONFIG = path
+     QMAKE_PRL_INSTALL_REPLACE += lib_replace
+-    !equals(qt_libdir, $$rplbase/lib) {
+-        qtlibdir_replace.match = $$qt_libdir
+-        qtlibdir_replace.replace = $$qqt_libdir
+-        qtlibdir_replace.CONFIG = path
+-        QMAKE_PRL_INSTALL_REPLACE += qtlibdir_replace
+-    }
+ }
+ contains(TEMPLATE, .*lib)|darwin {
+     if(!host_build|!cross_compile):qtConfig(reduce_exports): CONFIG += hide_symbols
+diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
+index 828a9621b9..b9e5d35026 100644
+--- a/mkspecs/features/qt_module.prf
++++ b/mkspecs/features/qt_module.prf
+@@ -305,10 +305,7 @@ load(qt_targets)
+ }
+ !lib_bundle:unix {
+     CONFIG += create_libtool
+-    host_build: \
+-        QMAKE_LIBTOOL_LIBDIR = $$[QT_HOST_LIBS]
+-    else: \
+-        QMAKE_LIBTOOL_LIBDIR = "=$$[QT_INSTALL_LIBS/raw]"
++    QMAKE_LIBTOOL_LIBDIR = $$NIX_OUTPUT_OUT/lib
+     !isEmpty(lib_replace0.match) {
+         ltlib_replace0.match = $$lib_replace0.match
+         ltlib_replace0.replace = $$QMAKE_LIBTOOL_LIBDIR/
+-- 
+2.25.4
+
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0005-qtbase-cmake.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0005-qtbase-cmake.patch
new file mode 100644
index 000000000000..19646df1666f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0005-qtbase-cmake.patch
@@ -0,0 +1,194 @@
+From 7871fbcefc7596a458cec005edafd9d4962baea3 Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@mailbox.org>
+Date: Tue, 17 Sep 2019 05:34:28 -0500
+Subject: [PATCH 05/11] qtbase-cmake
+
+---
+ mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in  |  2 +-
+ mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in |  4 ++--
+ src/corelib/Qt5CoreConfigExtras.cmake.in             | 10 +++++-----
+ src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in    |  2 +-
+ .../Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in  |  2 +-
+ src/dbus/Qt5DBusConfigExtras.cmake.in                | 12 ++----------
+ src/gui/Qt5GuiConfigExtras.cmake.in                  |  6 +++---
+ src/widgets/Qt5WidgetsConfigExtras.cmake.in          |  2 +-
+ 8 files changed, 16 insertions(+), 24 deletions(-)
+
+diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+index b6c3ab8609..edb6a89316 100644
+--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
++++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+@@ -513,7 +513,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
+           IsDebugAndRelease)
+         set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
+ 
+-        set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
++        set(imported_location \"${PLUGIN_LOCATION}\")
+         _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
+         set_target_properties(Qt5::${Plugin} PROPERTIES
+             \"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
+diff --git a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
+index b550a52c60..dbd3243885 100644
+--- a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
++++ b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
+@@ -53,10 +53,10 @@ set_property(TARGET Qt5::$$CMAKE_PLUGIN_NAME PROPERTY INTERFACE_SOURCES
+ !!ENDIF
+ 
+ !!IF !isEmpty(CMAKE_RELEASE_TYPE)
+-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE})
++_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_DIR}$${CMAKE_PLUGIN_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE})
+ !!ENDIF
+ !!IF !isEmpty(CMAKE_DEBUG_TYPE)
+-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE})
++_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_DIR}$${CMAKE_PLUGIN_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE})
+ !!ENDIF
+ 
+ list(APPEND Qt5$${CMAKE_MODULE_NAME}_PLUGINS Qt5::$$CMAKE_PLUGIN_NAME)
+diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
+index 4c1c3a612b..bb8ab08143 100644
+--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
++++ b/src/corelib/Qt5CoreConfigExtras.cmake.in
+@@ -6,7 +6,7 @@ if (NOT TARGET Qt5::qmake)
+     add_executable(Qt5::qmake IMPORTED)
+ 
+ !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
+-    set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\")
++    set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\")
+ !!ELSE
+     set(imported_location \"$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\")
+ !!ENDIF
+@@ -21,7 +21,7 @@ if (NOT TARGET Qt5::moc)
+     add_executable(Qt5::moc IMPORTED)
+ 
+ !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
+-    set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\")
++    set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\")
+ !!ELSE
+     set(imported_location \"$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\")
+ !!ENDIF
+@@ -38,7 +38,7 @@ if (NOT TARGET Qt5::rcc)
+     add_executable(Qt5::rcc IMPORTED)
+ 
+ !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
+-    set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\")
++    set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\")
+ !!ELSE
+     set(imported_location \"$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\")
+ !!ENDIF
+@@ -121,7 +121,7 @@ if (NOT TARGET Qt5::WinMain)
+ !!IF !isEmpty(CMAKE_RELEASE_TYPE)
+     set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
+ !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+-    set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\")
++    set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\")
+ !!ELSE
+     set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\")
+ !!ENDIF
+@@ -135,7 +135,7 @@ if (NOT TARGET Qt5::WinMain)
+     set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
+ 
+ !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+-    set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\")
++    set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\")
+ !!ELSE
+     set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\")
+ !!ENDIF
+diff --git a/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in b/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in
+index c357237d0e..6f0c75de3c 100644
+--- a/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in
++++ b/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in
+@@ -1,6 +1,6 @@
+ 
+ !!IF isEmpty(CMAKE_HOST_DATA_DIR_IS_ABSOLUTE)
+-set(_qt5_corelib_extra_includes \"${_qt5Core_install_prefix}/$${CMAKE_HOST_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\")
++set(_qt5_corelib_extra_includes \"$$NIX_OUTPUT_DEV/$${CMAKE_HOST_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\")
+ !!ELSE
+ set(_qt5_corelib_extra_includes \"$${CMAKE_HOST_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\")
+ !!ENDIF
+diff --git a/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in b/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in
+index 706304cf34..546420f6ad 100644
+--- a/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in
++++ b/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in
+@@ -1,6 +1,6 @@
+ 
+ !!IF isEmpty(CMAKE_INSTALL_DATA_DIR_IS_ABSOLUTE)
+-set(_qt5_corelib_extra_includes \"${_qt5Core_install_prefix}/$${CMAKE_INSTALL_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\")
++set(_qt5_corelib_extra_includes \"$$NIX_OUTPUT_DEV/$${CMAKE_INSTALL_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\")
+ !!ELSE
+ set(_qt5_corelib_extra_includes \"$${CMAKE_INSTALL_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\")
+ !!ENDIF
+diff --git a/src/dbus/Qt5DBusConfigExtras.cmake.in b/src/dbus/Qt5DBusConfigExtras.cmake.in
+index a814678f7b..b13b964ec8 100644
+--- a/src/dbus/Qt5DBusConfigExtras.cmake.in
++++ b/src/dbus/Qt5DBusConfigExtras.cmake.in
+@@ -2,11 +2,7 @@
+ if (NOT TARGET Qt5::qdbuscpp2xml)
+     add_executable(Qt5::qdbuscpp2xml IMPORTED)
+ 
+-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
+-    set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\")
+-!!ELSE
+-    set(imported_location \"$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\")
+-!!ENDIF
++    set(imported_location \"$$NIX_OUTPUT_DEV/bin/qdbuscpp2xml$$CMAKE_BIN_SUFFIX\")
+     _qt5_DBus_check_file_exists(${imported_location})
+ 
+     set_target_properties(Qt5::qdbuscpp2xml PROPERTIES
+@@ -17,11 +13,7 @@ endif()
+ if (NOT TARGET Qt5::qdbusxml2cpp)
+     add_executable(Qt5::qdbusxml2cpp IMPORTED)
+ 
+-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
+-    set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\")
+-!!ELSE
+-    set(imported_location \"$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\")
+-!!ENDIF
++    set(imported_location \"$$NIX_OUTPUT_DEV/bin/qdbusxml2cpp$$CMAKE_BIN_SUFFIX\")
+     _qt5_DBus_check_file_exists(${imported_location})
+ 
+     set_target_properties(Qt5::qdbusxml2cpp PROPERTIES
+diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in
+index 84dbbfebd4..8ad0720c5c 100644
+--- a/src/gui/Qt5GuiConfigExtras.cmake.in
++++ b/src/gui/Qt5GuiConfigExtras.cmake.in
+@@ -2,7 +2,7 @@
+ !!IF !isEmpty(CMAKE_ANGLE_EGL_DLL_RELEASE)
+ 
+ !!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE)
+-set(Qt5Gui_EGL_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR/QtANGLE\")
++set(Qt5Gui_EGL_INCLUDE_DIRS \"$$NIX_OUTPUT_DEV/$$CMAKE_INCLUDE_DIR/QtANGLE\")
+ !!ELSE
+ set(Qt5Gui_EGL_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR/QtANGLE\")
+ !!ENDIF
+@@ -17,13 +17,13 @@ macro(_populate_qt5gui_gl_target_properties TargetName Configuration LIB_LOCATIO
+     set_property(TARGET Qt5::${TargetName} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
+ 
+ !!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
+-    set(imported_location \"${_qt5Gui_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
++    set(imported_location \"$$NIX_OUTPUT_OUT/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
+ !!ELSE
+     set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
+ !!ENDIF
+ 
+ !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+-    set(imported_implib \"${_qt5Gui_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
++    set(imported_implib \"$$NIX_OUTPUT_OUT/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
+ !!ELSE
+     set(imported_implib \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
+ !!ENDIF
+diff --git a/src/widgets/Qt5WidgetsConfigExtras.cmake.in b/src/widgets/Qt5WidgetsConfigExtras.cmake.in
+index 83d8004a08..ca0b8e4bfb 100644
+--- a/src/widgets/Qt5WidgetsConfigExtras.cmake.in
++++ b/src/widgets/Qt5WidgetsConfigExtras.cmake.in
+@@ -3,7 +3,7 @@ if (NOT TARGET Qt5::uic)
+     add_executable(Qt5::uic IMPORTED)
+ 
+ !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
+-    set(imported_location \"${_qt5Widgets_install_prefix}/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
++    set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
+ !!ELSE
+     set(imported_location \"$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
+ !!ENDIF
+-- 
+2.25.4
+
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0006-qtbase-gtk3.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0006-qtbase-gtk3.patch
new file mode 100644
index 000000000000..48f4c9b3f99e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0006-qtbase-gtk3.patch
@@ -0,0 +1,48 @@
+From 7a9f4f875053aed8ab387161eea623bf8325cfa8 Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@mailbox.org>
+Date: Tue, 17 Sep 2019 05:35:33 -0500
+Subject: [PATCH 06/11] qtbase-gtk3
+
+---
+ src/plugins/platformthemes/gtk3/main.cpp | 17 ++++++++++++++++-
+ 1 file changed, 16 insertions(+), 1 deletion(-)
+
+diff --git a/src/plugins/platformthemes/gtk3/main.cpp b/src/plugins/platformthemes/gtk3/main.cpp
+index 860fc3a26e..8cd4663d49 100644
+--- a/src/plugins/platformthemes/gtk3/main.cpp
++++ b/src/plugins/platformthemes/gtk3/main.cpp
+@@ -39,6 +39,7 @@
+ 
+ #include <qpa/qplatformthemeplugin.h>
+ #include "qgtk3theme.h"
++#include <QFile>
+ 
+ QT_BEGIN_NAMESPACE
+ 
+@@ -54,8 +55,22 @@ public:
+ QPlatformTheme *QGtk3ThemePlugin::create(const QString &key, const QStringList &params)
+ {
+     Q_UNUSED(params);
+-    if (!key.compare(QLatin1String(QGtk3Theme::name), Qt::CaseInsensitive))
++    if (!key.compare(QLatin1String(QGtk3Theme::name), Qt::CaseInsensitive)) {
++
++#ifdef NIXPKGS_QGTK3_XDG_DATA_DIRS
++        QStringList XDG_DATA_DIRS = QFile::decodeName(qgetenv("XDG_DATA_DIRS")).split(':');
++        XDG_DATA_DIRS << QLatin1String(NIXPKGS_QGTK3_XDG_DATA_DIRS);
++        qputenv("XDG_DATA_DIRS", QFile::encodeName(XDG_DATA_DIRS.join(':')));
++#endif
++
++#ifdef NIXPKGS_QGTK3_GIO_EXTRA_MODULES
++        QStringList GIO_EXTRA_MODULES = QFile::decodeName(qgetenv("GIO_EXTRA_MODULES")).split(':');
++        GIO_EXTRA_MODULES << QLatin1String(NIXPKGS_QGTK3_GIO_EXTRA_MODULES);
++        qputenv("GIO_EXTRA_MODULES", QFile::encodeName(GIO_EXTRA_MODULES.join(':')));
++#endif
++
+         return new QGtk3Theme;
++    }
+ 
+     return nullptr;
+ }
+-- 
+2.25.4
+
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0007-qtbase-xcursor.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0007-qtbase-xcursor.patch
new file mode 100644
index 000000000000..617b0684df65
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0007-qtbase-xcursor.patch
@@ -0,0 +1,29 @@
+From 707098eada20ba074e642a73248de74407bc261c Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@mailbox.org>
+Date: Tue, 17 Sep 2019 05:35:58 -0500
+Subject: [PATCH 07/11] qtbase-xcursor
+
+---
+ src/plugins/platforms/xcb/qxcbcursor.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/plugins/platforms/xcb/qxcbcursor.cpp b/src/plugins/platforms/xcb/qxcbcursor.cpp
+index 42c7a52bd4..ba670ddb44 100644
+--- a/src/plugins/platforms/xcb/qxcbcursor.cpp
++++ b/src/plugins/platforms/xcb/qxcbcursor.cpp
+@@ -317,10 +317,10 @@ QXcbCursor::QXcbCursor(QXcbConnection *conn, QXcbScreen *screen)
+ #if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
+     static bool function_ptrs_not_initialized = true;
+     if (function_ptrs_not_initialized) {
+-        QLibrary xcursorLib(QLatin1String("Xcursor"), 1);
++        QLibrary xcursorLib(QLatin1String(NIXPKGS_LIBXCURSOR), 1);
+         bool xcursorFound = xcursorLib.load();
+         if (!xcursorFound) { // try without the version number
+-            xcursorLib.setFileName(QLatin1String("Xcursor"));
++            xcursorLib.setFileName(QLatin1String(NIXPKGS_LIBXCURSOR));
+             xcursorFound = xcursorLib.load();
+         }
+         if (xcursorFound) {
+-- 
+2.25.4
+
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0008-qtbase-tzdir.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0008-qtbase-tzdir.patch
new file mode 100644
index 000000000000..319de315bfb7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0008-qtbase-tzdir.patch
@@ -0,0 +1,64 @@
+From da003b582ee8823b29b1ff5c0aca8e06e7741b94 Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@mailbox.org>
+Date: Tue, 17 Sep 2019 05:36:25 -0500
+Subject: [PATCH 08/11] qtbase-tzdir
+
+---
+ src/corelib/time/qtimezoneprivate_tz.cpp | 31 +++++++++++++++---------
+ 1 file changed, 19 insertions(+), 12 deletions(-)
+
+diff --git a/src/corelib/time/qtimezoneprivate_tz.cpp b/src/corelib/time/qtimezoneprivate_tz.cpp
+index 01f9a6cce0..910338205a 100644
+--- a/src/corelib/time/qtimezoneprivate_tz.cpp
++++ b/src/corelib/time/qtimezoneprivate_tz.cpp
+@@ -77,7 +77,11 @@ typedef QHash<QByteArray, QTzTimeZone> QTzTimeZoneHash;
+ // Parse zone.tab table, assume lists all installed zones, if not will need to read directories
+ static QTzTimeZoneHash loadTzTimeZones()
+ {
+-    QString path = QStringLiteral("/usr/share/zoneinfo/zone.tab");
++    // Try TZDIR first, in case we're running on NixOS.
++    QString path = QFile::decodeName(qgetenv("TZDIR")) + QStringLiteral("/zone.tab");
++    // Fallback to traditional paths in case we are not on NixOS.
++    if (!QFile::exists(path))
++        path = QStringLiteral("/usr/share/zoneinfo/zone.tab");
+     if (!QFile::exists(path))
+         path = QStringLiteral("/usr/lib/zoneinfo/zone.tab");
+ 
+@@ -672,20 +676,23 @@ QTzTimeZoneCacheEntry QTzTimeZoneCache::findEntry(const QByteArray &ianaId)
+         if (!tzif.open(QIODevice::ReadOnly))
+             return ret;
+     } else {
+-        // Open named tz, try modern path first, if fails try legacy path
+-        tzif.setFileName(QLatin1String("/usr/share/zoneinfo/") + QString::fromLocal8Bit(ianaId));
++        // Try TZDIR first, in case we're running on NixOS
++        tzif.setFileName(QFile::decodeName(qgetenv("TZDIR")) + QStringLiteral("/") + QString::fromLocal8Bit(ianaId));
+         if (!tzif.open(QIODevice::ReadOnly)) {
+-            tzif.setFileName(QLatin1String("/usr/lib/zoneinfo/") + QString::fromLocal8Bit(ianaId));
++            tzif.setFileName(QLatin1String("/usr/share/zoneinfo/") + QString::fromLocal8Bit(ianaId));
+             if (!tzif.open(QIODevice::ReadOnly)) {
+-                // ianaId may be a POSIX rule, taken from $TZ or /etc/TZ
+-                const QByteArray zoneInfo = ianaId.split(',').at(0);
+-                const char *begin = zoneInfo.constBegin();
+-                if (PosixZone::parse(begin, zoneInfo.constEnd()).hasValidOffset()
+-                    && (begin == zoneInfo.constEnd()
+-                        || PosixZone::parse(begin, zoneInfo.constEnd()).hasValidOffset())) {
+-                    ret.m_posixRule = ianaId;
++                tzif.setFileName(QLatin1String("/usr/lib/zoneinfo/") + QString::fromLocal8Bit(ianaId));
++                if (!tzif.open(QIODevice::ReadOnly)) {
++                    // ianaId may be a POSIX rule, taken from $TZ or /etc/TZ
++                    const QByteArray zoneInfo = ianaId.split(',').at(0);
++                    const char *begin = zoneInfo.constBegin();
++                    if (PosixZone::parse(begin, zoneInfo.constEnd()).hasValidOffset()
++                        && (begin == zoneInfo.constEnd()
++                            || PosixZone::parse(begin, zoneInfo.constEnd()).hasValidOffset())) {
++                        ret.m_posixRule = ianaId;
++                    }
++                    return ret;
+                 }
+-                return ret;
+             }
+         }
+     }
+-- 
+2.25.4
+
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0009-qtbase-qtpluginpath.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0009-qtbase-qtpluginpath.patch
new file mode 100644
index 000000000000..28013ec10482
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0009-qtbase-qtpluginpath.patch
@@ -0,0 +1,33 @@
+From 9fc6efaf774a8716932c98c0b0ea6408ed2614c2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Milan=20P=C3=A4ssler?= <me@pbb.lc>
+Date: Sun, 10 May 2020 12:47:28 +0200
+Subject: [PATCH 09/11] qtbase-qtpluginpath
+
+---
+ src/corelib/kernel/qcoreapplication.cpp | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
+index 5fdcc9b914..1a126ef359 100644
+--- a/src/corelib/kernel/qcoreapplication.cpp
++++ b/src/corelib/kernel/qcoreapplication.cpp
+@@ -2691,6 +2691,16 @@ QStringList QCoreApplication::libraryPathsLocked()
+         QStringList *app_libpaths = new QStringList;
+         coreappdata()->app_libpaths.reset(app_libpaths);
+ 
++        // Add library paths derived from PATH
++        const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(':');
++        const QString plugindir = QStringLiteral("../" NIXPKGS_QT_PLUGIN_PREFIX);
++        for (const QString &path: paths) {
++            if (!path.isEmpty()) {
++                app_libpaths->append(QDir::cleanPath(path + QDir::separator() + plugindir));
++            }
++        }
++
++
+         auto setPathsFromEnv = [&](QString libPathEnv) {
+             if (!libPathEnv.isEmpty()) {
+                 QStringList paths = libPathEnv.split(QDir::listSeparator(), Qt::SkipEmptyParts);
+-- 
+2.25.4
+
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0010-qtbase-assert.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0010-qtbase-assert.patch
new file mode 100644
index 000000000000..c5b099c4ca35
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0010-qtbase-assert.patch
@@ -0,0 +1,32 @@
+From 015845b3c320d02691f28373097d1e6dbbac79f7 Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@mailbox.org>
+Date: Tue, 17 Sep 2019 05:37:04 -0500
+Subject: [PATCH 10/11] qtbase-assert
+
+---
+ src/testlib/qtestassert.h | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/testlib/qtestassert.h b/src/testlib/qtestassert.h
+index 6498ea84ef..d821ced7fc 100644
+--- a/src/testlib/qtestassert.h
++++ b/src/testlib/qtestassert.h
+@@ -44,10 +44,13 @@
+ 
+ QT_BEGIN_NAMESPACE
+ 
+-
++#if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS)
++#define QTEST_ASSERT(cond) do { } while ((false) && (cond))
++#define QTEST_ASSERT_X(cond, where, what) do { } while ((false) && (cond))
++#else
+ #define QTEST_ASSERT(cond) do { if (!(cond)) qt_assert(#cond,__FILE__,__LINE__); } while (false)
+-
+ #define QTEST_ASSERT_X(cond, where, what) do { if (!(cond)) qt_assert_x(where, what,__FILE__,__LINE__); } while (false)
++#endif
+ 
+ QT_END_NAMESPACE
+ 
+-- 
+2.25.4
+
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0011-fix-header_module.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0011-fix-header_module.patch
new file mode 100644
index 000000000000..bdb6a3616567
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0011-fix-header_module.patch
@@ -0,0 +1,22 @@
+From 2bce8511877db1db532e1437e7140b1d55633f86 Mon Sep 17 00:00:00 2001
+From: Will Dietz <w@wdtz.org>
+Date: Mon, 30 Sep 2019 20:15:40 -0500
+Subject: [PATCH 11/11] fix header_module
+
+---
+ mkspecs/features/qt_module.prf | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
+index 0b2a30d159..37271e09d9 100644
+--- a/mkspecs/features/qt_module.prf
++++ b/mkspecs/features/qt_module.prf
+@@ -84,7 +84,7 @@ header_module {
+         qt_no_install_library
+ 
+     # Allow creation of .prl, .la and .pc files.
+-    target.path = $$[QT_INSTALL_LIBS]
++    target.path = $$NIX_OUTPUT_OUT/lib
+     target.CONFIG += dummy_install
+     INSTALLS    += target
+ } else {
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0012-qtbase-tbd-frameworks.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0012-qtbase-tbd-frameworks.patch
new file mode 100644
index 000000000000..8a5939978a6b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0012-qtbase-tbd-frameworks.patch
@@ -0,0 +1,15 @@
+diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in
+index 84dbbfebd4..615bfed124 100644
+--- a/src/gui/Qt5GuiConfigExtras.cmake.in
++++ b/src/gui/Qt5GuiConfigExtras.cmake.in
+@@ -119,6 +119,10 @@ macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs)
+             if (NOT EXISTS "${Qt5Gui_${_cmake_lib_name}_LIBRARY}")
+                 set(Qt5Gui_${_cmake_lib_name}_LIBRARY)
+             endif()
++            set(Qt5Gui_${_cmake_lib_name}_LIBRARY "${Qt5Gui_${_cmake_lib_name}_LIBRARY}/${_lib}.tbd")
++            if (NOT EXISTS "${Qt5Gui_${_cmake_lib_name}_LIBRARY}")
++                set(Qt5Gui_${_cmake_lib_name}_LIBRARY)
++            endif()
+ !!ENDIF
+             if (NOT Qt5Gui_${_cmake_lib_name}_LIBRARY)
+                 # The above find_library call doesn\'t work for finding
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0014-aarch64-darwin.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0014-aarch64-darwin.patch
new file mode 100644
index 000000000000..f0809f8f9a3f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0014-aarch64-darwin.patch
@@ -0,0 +1,275 @@
+From abc52460201bc5c7603505bb187138b0c59291aa Mon Sep 17 00:00:00 2001
+From: Mushroom <mushroom@watchingyour.tv>
+Date: Sun, 20 Dec 2020 00:11:41 +0000
+Subject: [PATCH] [QtBase] Split macOS platforms by architecture
+
+Currently macOS only has one platform, which forces the default arch to
+x86_64. This patch splits the platforms by architecture, and defaults to
+the same as the host.
+
+This stops M1-based macs from compiling x64 binaries by default,
+instead making them compile native binaries.
+
+[ChangeLog][QtBase][Platform Specific Changes][OS X] Split macOS
+platforms so it doesn't default to the x64 architecture every time
+
+Change-Id: I34891b107bb24f68371df1c8f087eb0ad5b5dd95
+---
+ configure                                     |  9 +++-
+ .../clang-macx-desktop.conf}                  |  8 ++--
+ mkspecs/common/macx.conf                      |  1 -
+ .../Info.plist.app                            |  0
+ .../Info.plist.dSYM.in                        |  0
+ .../Info.plist.disable_highdpi                |  0
+ .../Info.plist.lib                            |  0
+ mkspecs/macx-clang-arm64/qmake.conf           |  7 ++++
+ .../qplatformdefs.h                           |  0
+ mkspecs/macx-clang-x64/Info.plist.app         | 24 +++++++++++
+ mkspecs/macx-clang-x64/Info.plist.dSYM.in     | 18 ++++++++
+ .../macx-clang-x64/Info.plist.disable_highdpi |  8 ++++
+ mkspecs/macx-clang-x64/Info.plist.lib         | 20 +++++++++
+ mkspecs/macx-clang-x64/qmake.conf             |  7 ++++
+ mkspecs/macx-clang-x64/qplatformdefs.h        | 41 +++++++++++++++++++
+ 15 files changed, 137 insertions(+), 6 deletions(-)
+ rename mkspecs/{macx-clang/qmake.conf => common/clang-macx-desktop.conf} (83%)
+ rename mkspecs/{macx-clang => macx-clang-arm64}/Info.plist.app (100%)
+ rename mkspecs/{macx-clang => macx-clang-arm64}/Info.plist.dSYM.in (100%)
+ rename mkspecs/{macx-clang => macx-clang-arm64}/Info.plist.disable_highdpi (100%)
+ rename mkspecs/{macx-clang => macx-clang-arm64}/Info.plist.lib (100%)
+ create mode 100644 mkspecs/macx-clang-arm64/qmake.conf
+ rename mkspecs/{macx-clang => macx-clang-arm64}/qplatformdefs.h (100%)
+ create mode 100644 mkspecs/macx-clang-x64/Info.plist.app
+ create mode 100644 mkspecs/macx-clang-x64/Info.plist.dSYM.in
+ create mode 100644 mkspecs/macx-clang-x64/Info.plist.disable_highdpi
+ create mode 100644 mkspecs/macx-clang-x64/Info.plist.lib
+ create mode 100644 mkspecs/macx-clang-x64/qmake.conf
+ create mode 100644 mkspecs/macx-clang-x64/qplatformdefs.h
+
+diff --git a/configure b/configure
+index b6c9b462f24..a86f2ceaa5b 100755
+--- a/configure
++++ b/configure
+@@ -556,7 +556,14 @@ PLATFORM_NOTES=
+ if [ -z "$PLATFORM" ]; then
+     case "$UNAME_SYSTEM:$UNAME_RELEASE" in
+      Darwin:*)
+-        PLATFORM=macx-clang
++        case "$UNAME_MACHINE" in
++            arm64)
++                PLATFORM=macx-clang-arm64
++                ;;
++            *)
++                PLATFORM=macx-clang-x64
++                ;;
++        esac
+         ;;
+      AIX:*)
+         #PLATFORM=aix-g++
+diff --git a/mkspecs/macx-clang/qmake.conf b/mkspecs/common/clang-macx-desktop.conf
+similarity index 83%
+rename from mkspecs/macx-clang/qmake.conf
+rename to mkspecs/common/clang-macx-desktop.conf
+index 0cf1f31b60d..042319a2aa3 100644
+--- a/mkspecs/macx-clang/qmake.conf
++++ b/mkspecs/common/clang-macx-desktop.conf
+@@ -24,9 +24,9 @@ QMAKE_LIBS_X11 = -lX11 -lXext -lm
+ QMAKE_LIBDIR_X11 = /opt/X11/lib
+ QMAKE_INCDIR_X11 = /opt/X11/include
+ 
+-include(../common/macx.conf)
+-include(../common/gcc-base-mac.conf)
+-include(../common/clang.conf)
+-include(../common/clang-mac.conf)
++include(macx.conf)
++include(gcc-base-mac.conf)
++include(clang.conf)
++include(clang-mac.conf)
+ 
+ load(qt_config)
+diff --git a/mkspecs/macx-clang/Info.plist.app b/mkspecs/macx-clang-arm64/Info.plist.app
+similarity index 100%
+rename from mkspecs/macx-clang/Info.plist.app
+rename to mkspecs/macx-clang-arm64/Info.plist.app
+diff --git a/mkspecs/macx-clang/Info.plist.dSYM.in b/mkspecs/macx-clang-arm64/Info.plist.dSYM.in
+similarity index 100%
+rename from mkspecs/macx-clang/Info.plist.dSYM.in
+rename to mkspecs/macx-clang-arm64/Info.plist.dSYM.in
+diff --git a/mkspecs/macx-clang/Info.plist.disable_highdpi b/mkspecs/macx-clang-arm64/Info.plist.disable_highdpi
+similarity index 100%
+rename from mkspecs/macx-clang/Info.plist.disable_highdpi
+rename to mkspecs/macx-clang-arm64/Info.plist.disable_highdpi
+diff --git a/mkspecs/macx-clang/Info.plist.lib b/mkspecs/macx-clang-arm64/Info.plist.lib
+similarity index 100%
+rename from mkspecs/macx-clang/Info.plist.lib
+rename to mkspecs/macx-clang-arm64/Info.plist.lib
+diff --git a/mkspecs/macx-clang-arm64/qmake.conf b/mkspecs/macx-clang-arm64/qmake.conf
+new file mode 100644
+index 00000000000..0cc2361e696
+--- /dev/null
++++ b/mkspecs/macx-clang-arm64/qmake.conf
+@@ -0,0 +1,7 @@
++#
++# qmake configuration for Clang on OS X (arm64)
++#
++
++QMAKE_APPLE_DEVICE_ARCHS=arm64
++
++include(../common/clang-macx-desktop.conf)
+diff --git a/mkspecs/macx-clang/qplatformdefs.h b/mkspecs/macx-clang-arm64/qplatformdefs.h
+similarity index 100%
+rename from mkspecs/macx-clang/qplatformdefs.h
+rename to mkspecs/macx-clang-arm64/qplatformdefs.h
+diff --git a/mkspecs/macx-clang-x64/Info.plist.app b/mkspecs/macx-clang-x64/Info.plist.app
+new file mode 100644
+index 00000000000..fa592af0897
+--- /dev/null
++++ b/mkspecs/macx-clang-x64/Info.plist.app
+@@ -0,0 +1,24 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
++<plist version="1.0">
++<dict>
++	<key>CFBundleExecutable</key>
++	<string>${EXECUTABLE_NAME}</string>
++	<key>CFBundleIconFile</key>
++	<string>${ASSETCATALOG_COMPILER_APPICON_NAME}</string>
++	<key>CFBundleIdentifier</key>
++	<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
++	<key>CFBundlePackageType</key>
++	<string>APPL</string>
++	<key>CFBundleSignature</key>
++	<string>${QMAKE_PKGINFO_TYPEINFO}</string>
++	<key>LSMinimumSystemVersion</key>
++	<string>${MACOSX_DEPLOYMENT_TARGET}</string>
++	<key>NOTE</key>
++	<string>This file was generated by Qt/QMake.</string>
++	<key>NSPrincipalClass</key>
++	<string>NSApplication</string>
++	<key>NSSupportsAutomaticGraphicsSwitching</key>
++	<true/>
++</dict>
++</plist>
+diff --git a/mkspecs/macx-clang-x64/Info.plist.dSYM.in b/mkspecs/macx-clang-x64/Info.plist.dSYM.in
+new file mode 100644
+index 00000000000..a8c8d0d4fb5
+--- /dev/null
++++ b/mkspecs/macx-clang-x64/Info.plist.dSYM.in
+@@ -0,0 +1,18 @@
++<?xml version=\"1.0\" encoding=\"UTF-8\"?>
++<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
++<plist version=\"1.0\">
++	<dict>
++		<key>CFBundleIdentifier</key>
++		<string>com.apple.xcode.dsym.$${BUNDLEIDENTIFIER}</string>
++		<key>CFBundlePackageType</key>
++		<string>dSYM</string>
++		<key>CFBundleSignature</key>
++		<string>????</string>
++!!IF !isEmpty(VERSION)
++		<key>CFBundleShortVersionString</key>
++		<string>$${VER_MAJ}.$${VER_MIN}</string>
++		<key>CFBundleVersion</key>
++		<string>$${VER_MAJ}.$${VER_MIN}.$${VER_PAT}</string>
++!!ENDIF
++	</dict>
++</plist>
+diff --git a/mkspecs/macx-clang-x64/Info.plist.disable_highdpi b/mkspecs/macx-clang-x64/Info.plist.disable_highdpi
+new file mode 100644
+index 00000000000..a9b89888ad4
+--- /dev/null
++++ b/mkspecs/macx-clang-x64/Info.plist.disable_highdpi
+@@ -0,0 +1,8 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
++<plist version="1.0">
++<dict>
++	<key>NSHighResolutionCapable</key>
++	<string>NO</string>
++</dict>
++</plist>
+diff --git a/mkspecs/macx-clang-x64/Info.plist.lib b/mkspecs/macx-clang-x64/Info.plist.lib
+new file mode 100644
+index 00000000000..34752ec40d9
+--- /dev/null
++++ b/mkspecs/macx-clang-x64/Info.plist.lib
+@@ -0,0 +1,20 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
++<plist version="1.0">
++<dict>
++	<key>CFBundleExecutable</key>
++	<string>${EXECUTABLE_NAME}</string>
++	<key>CFBundleIdentifier</key>
++	<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
++	<key>CFBundlePackageType</key>
++	<string>FMWK</string>
++	<key>CFBundleShortVersionString</key>
++	<string>${QMAKE_SHORT_VERSION}</string>
++	<key>CFBundleSignature</key>
++	<string>${QMAKE_PKGINFO_TYPEINFO}</string>
++	<key>CFBundleVersion</key>
++	<string>${QMAKE_FULL_VERSION}</string>
++	<key>NOTE</key>
++	<string>Please, do NOT change this file -- It was generated by Qt/QMake.</string>
++</dict>
++</plist>
+diff --git a/mkspecs/macx-clang-x64/qmake.conf b/mkspecs/macx-clang-x64/qmake.conf
+new file mode 100644
+index 00000000000..1ac373b53b4
+--- /dev/null
++++ b/mkspecs/macx-clang-x64/qmake.conf
+@@ -0,0 +1,7 @@
++#
++# qmake configuration for Clang on OS X (arm64)
++#
++
++QMAKE_APPLE_DEVICE_ARCHS=x86_64
++
++include(../common/clang-macx-desktop.conf)
+diff --git a/mkspecs/macx-clang-x64/qplatformdefs.h b/mkspecs/macx-clang-x64/qplatformdefs.h
+new file mode 100644
+index 00000000000..063491dd900
+--- /dev/null
++++ b/mkspecs/macx-clang-x64/qplatformdefs.h
+@@ -0,0 +1,41 @@
++/****************************************************************************
++**
++** Copyright (C) 2016 The Qt Company Ltd.
++** Contact: https://www.qt.io/licensing/
++**
++** This file is part of the qmake spec of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:LGPL$
++** Commercial License Usage
++** Licensees holding valid commercial Qt licenses may use this file in
++** accordance with the commercial license agreement provided with the
++** Software or, alternatively, in accordance with the terms contained in
++** a written agreement between you and The Qt Company. For licensing terms
++** and conditions see https://www.qt.io/terms-conditions. For further
++** information use the contact form at https://www.qt.io/contact-us.
++**
++** GNU Lesser General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU Lesser
++** General Public License version 3 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL3 included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU Lesser General Public License version 3 requirements
++** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU
++** General Public License version 2.0 or (at your option) the GNU General
++** Public license version 3 or any later version approved by the KDE Free
++** Qt Foundation. The licenses are as published by the Free Software
++** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
++** included in the packaging of this file. Please review the following
++** information to ensure the GNU General Public License requirements will
++** be met: https://www.gnu.org/licenses/gpl-2.0.html and
++** https://www.gnu.org/licenses/gpl-3.0.html.
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++
++#include "../common/mac/qplatformdefs.h"
++
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtdeclarative-default-disable-qmlcache.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtdeclarative-default-disable-qmlcache.patch
new file mode 100644
index 000000000000..03668d960c78
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtdeclarative-default-disable-qmlcache.patch
@@ -0,0 +1,13 @@
+diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp
+index 1d66e75..827567a 100644
+--- a/src/qml/qml/qqmltypeloader.cpp
++++ b/src/qml/qml/qqmltypeloader.cpp
+@@ -727,7 +727,7 @@ bool QQmlTypeLoader::Blob::isDebugging() const
+ 
+ bool QQmlTypeLoader::Blob::diskCacheEnabled() const
+ {
+-    return (!disableDiskCache() && !isDebugging()) || forceDiskCache();
++    return forceDiskCache();
+ }
+ 
+ bool QQmlTypeLoader::Blob::qmldirDataAvailable(const QQmlRefPointer<QQmlQmldirData> &data, QList<QQmlError> *errors)
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtdeclarative-qml-paths.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtdeclarative-qml-paths.patch
new file mode 100644
index 000000000000..e207fa4df3bd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtdeclarative-qml-paths.patch
@@ -0,0 +1,33 @@
+diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp
+index 289f11d006..9b0a48c6c7 100644
+--- a/src/qml/qml/qqmlimport.cpp
++++ b/src/qml/qml/qqmlimport.cpp
+@@ -1897,17 +1897,22 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e)
+     addImportPath(installImportsPath);
+ 
+     // env import paths
+-    if (Q_UNLIKELY(!qEnvironmentVariableIsEmpty("QML2_IMPORT_PATH"))) {
+-        const QString envImportPath = qEnvironmentVariable("QML2_IMPORT_PATH");
++    auto addEnvImportPath = [this](const char *var) {
+ #if defined(Q_OS_WIN)
+         QLatin1Char pathSep(';');
+ #else
+         QLatin1Char pathSep(':');
+ #endif
+-        QStringList paths = envImportPath.split(pathSep, Qt::SkipEmptyParts);
+-        for (int ii = paths.count() - 1; ii >= 0; --ii)
+-            addImportPath(paths.at(ii));
+-    }
++        if (Q_UNLIKELY(!qEnvironmentVariableIsEmpty(var))) {
++            const QString envImportPath = qEnvironmentVariable(var);
++            QStringList paths = envImportPath.split(pathSep, Qt::SkipEmptyParts);
++            for (int ii = paths.count() - 1; ii >= 0; --ii)
++                addImportPath(paths.at(ii));
++        }
++    };
++
++    addEnvImportPath("QML2_IMPORT_PATH");
++    addEnvImportPath("NIXPKGS_QT5_QML_IMPORT_PATH");
+ 
+     addImportPath(QStringLiteral("qrc:/qt-project.org/imports"));
+     addImportPath(QCoreApplication::applicationDirPath());
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtdeclarative.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtdeclarative.patch
new file mode 100644
index 000000000000..d9c721e6946c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtdeclarative.patch
@@ -0,0 +1,114 @@
+diff --git a/src/particles/particles.pro b/src/particles/particles.pro
+index aaaa83419a..58aee00036 100644
+--- a/src/particles/particles.pro
++++ b/src/particles/particles.pro
+@@ -20,6 +20,6 @@ QMLTYPES_FILENAME = plugins.qmltypes
+ QMLTYPES_INSTALL_DIR = $$[QT_INSTALL_QML]/QtQuick/Particles.2
+ QML_IMPORT_NAME = QtQuick.Particles
+ IMPORT_VERSION = 2.$$QT_MINOR_VERSION
+-CONFIG += qmltypes install_qmltypes install_metatypes
++CONFIG += qmltypes install_qmltypes
+ 
+ load(qt_module)
+diff --git a/src/qml/qml.pro b/src/qml/qml.pro
+index e39a8319b6..90c0331278 100644
+--- a/src/qml/qml.pro
++++ b/src/qml/qml.pro
+@@ -72,6 +72,6 @@ QMLTYPES_FILENAME = plugins.qmltypes
+ QMLTYPES_INSTALL_DIR = $$[QT_INSTALL_QML]/QtQml
+ QML_IMPORT_NAME = QtQml
+ IMPORT_VERSION = 2.$$QT_MINOR_VERSION
+-CONFIG += qmltypes install_qmltypes install_metatypes
++CONFIG += qmltypes install_qmltypes
+ 
+ load(qt_module)
+diff --git a/src/qmlmodels/qmlmodels.pro b/src/qmlmodels/qmlmodels.pro
+index 4ac093556d..112e2c2be0 100644
+--- a/src/qmlmodels/qmlmodels.pro
++++ b/src/qmlmodels/qmlmodels.pro
+@@ -68,6 +68,6 @@ QMLTYPES_FILENAME = plugins.qmltypes
+ QMLTYPES_INSTALL_DIR = $$[QT_INSTALL_QML]/QtQml/Models.2
+ QML_IMPORT_NAME = QtQml.Models
+ IMPORT_VERSION = 2.$$QT_MINOR_VERSION
+-CONFIG += qmltypes install_qmltypes install_metatypes
++CONFIG += qmltypes install_qmltypes
+ 
+ load(qt_module)
+diff --git a/src/qmltest/qmltest.pro b/src/qmltest/qmltest.pro
+index c2e8068fc6..79dba368f7 100644
+--- a/src/qmltest/qmltest.pro
++++ b/src/qmltest/qmltest.pro
+@@ -34,7 +34,7 @@ QMLTYPES_FILENAME = plugins.qmltypes
+ QMLTYPES_INSTALL_DIR = $$[QT_INSTALL_QML]/Qt/test/qtestroot
+ QML_IMPORT_NAME = Qt.test.qtestroot
+ QML_IMPORT_VERSION = 1.0
+-CONFIG += qmltypes install_qmltypes install_metatypes
++CONFIG += qmltypes install_qmltypes
+ 
+ # Install qmldir
+ qmldir.files = $$PWD/qmldir
+diff --git a/src/qmlworkerscript/qmlworkerscript.pro b/src/qmlworkerscript/qmlworkerscript.pro
+index 84466062e1..79885455cc 100644
+--- a/src/qmlworkerscript/qmlworkerscript.pro
++++ b/src/qmlworkerscript/qmlworkerscript.pro
+@@ -23,6 +23,6 @@ QMLTYPES_FILENAME = plugins.qmltypes
+ QMLTYPES_INSTALL_DIR = $$[QT_INSTALL_QML]/QtQml/WorkerScript.2
+ QML_IMPORT_NAME = QtQml.WorkerScript
+ IMPORT_VERSION = 2.$$QT_MINOR_VERSION
+-CONFIG += qmltypes install_qmltypes install_metatypes
++CONFIG += qmltypes install_qmltypes
+ 
+ load(qt_module)
+diff --git a/src/quick/quick.pro b/src/quick/quick.pro
+index f2d49cf939..c401b04c4e 100644
+--- a/src/quick/quick.pro
++++ b/src/quick/quick.pro
+@@ -52,4 +52,4 @@ QMLTYPES_FILENAME = plugins.qmltypes
+ QMLTYPES_INSTALL_DIR = $$[QT_INSTALL_QML]/QtQuick.2
+ QML_IMPORT_NAME = QtQuick
+ IMPORT_VERSION = 2.$$QT_MINOR_VERSION
+-CONFIG += qmltypes install_qmltypes install_metatypes
++CONFIG += qmltypes install_qmltypes
+diff --git a/src/quickshapes/quickshapes.pro b/src/quickshapes/quickshapes.pro
+index 4dbd3e5e46..0c6b186fc8 100644
+--- a/src/quickshapes/quickshapes.pro
++++ b/src/quickshapes/quickshapes.pro
+@@ -36,4 +36,4 @@ QMLTYPES_FILENAME = plugins.qmltypes
+ QMLTYPES_INSTALL_DIR = $$[QT_INSTALL_QML]/QtQuick/Shapes
+ QML_IMPORT_NAME = QtQuick.Shapes
+ IMPORT_VERSION = 1.$$QT_MINOR_VERSION
+-CONFIG += qmltypes install_qmltypes install_metatypes
++CONFIG += qmltypes install_qmltypes
+diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp
+index 005db4248..685c5b1b2 100644
+--- a/src/qml/qml/qqmlimport.cpp
++++ b/src/qml/qml/qqmlimport.cpp
+@@ -1760,6 +1760,15 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e)
+     QString installImportsPath =  QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath);
+     addImportPath(installImportsPath);
+ 
++    // Add import paths derived from PATH
++    const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(':');
++    const QString qmldir = QStringLiteral("../" NIXPKGS_QML2_IMPORT_PREFIX);
++    for (const QString &path: paths) {
++        if (!path.isEmpty()) {
++            addImportPath(QDir::cleanPath(path + QDir::separator() + qmldir));
++        }
++    }
++
+     // env import paths
+     if (Q_UNLIKELY(!qEnvironmentVariableIsEmpty("QML2_IMPORT_PATH"))) {
+         const QString envImportPath = qEnvironmentVariable("QML2_IMPORT_PATH");
+diff --git a/tools/qmlcachegen/qmlcache.prf b/tools/qmlcachegen/qmlcache.prf
+index 537eaf62ea..e21de58f64 100644
+--- a/tools/qmlcachegen/qmlcache.prf
++++ b/tools/qmlcachegen/qmlcache.prf
+@@ -26,7 +26,7 @@ defineReplace(qmlCacheOutputFileName) {
+ }
+ 
+ qmlcacheinst.base = $$QMLCACHE_DESTDIR
+-qmlcacheinst.path = $$[QT_INSTALL_QML]/$$TARGETPATH
++qmlcacheinst.path = $$NIX_OUTPUT_QML/$$TARGETPATH
+ qmlcacheinst.CONFIG = no_check_exist
+ 
+ qmlcachegen.input = CACHEGEN_FILES
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtscript.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtscript.patch
new file mode 100644
index 000000000000..5508dec1280e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtscript.patch
@@ -0,0 +1,13 @@
+diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h
+index 1f6d25e..087c3fb 100644
+--- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h
++++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h
+@@ -81,7 +81,7 @@
+ #include <pthread.h>
+ #elif PLATFORM(GTK)
+ #include <wtf/gtk/GOwnPtr.h>
+-typedef struct _GMutex GMutex;
++typedef union _GMutex GMutex;
+ typedef struct _GCond GCond;
+ #endif
+ 
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtserialport.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtserialport.patch
new file mode 100644
index 000000000000..f25524e80bcf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtserialport.patch
@@ -0,0 +1,22 @@
+diff --git a/src/serialport/qtudev_p.h b/src/serialport/qtudev_p.h
+index af2dab2..8e17f64 100644
+--- a/src/serialport/qtudev_p.h
++++ b/src/serialport/qtudev_p.h
+@@ -111,9 +111,17 @@ inline QFunctionPointer resolveSymbol(QLibrary *udevLibrary, const char *symbolN
+ inline bool resolveSymbols(QLibrary *udevLibrary)
+ {
+     if (!udevLibrary->isLoaded()) {
++#ifdef NIXPKGS_LIBUDEV
++        udevLibrary->setFileNameAndVersion(QLatin1String(NIXPKGS_LIBUDEV), 1);
++#else
+         udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 1);
++#endif
+         if (!udevLibrary->load()) {
++#ifdef NIXPKGS_LIBUDEV
++            udevLibrary->setFileNameAndVersion(QLatin1String(NIXPKGS_LIBUDEV), 0);
++#else
+             udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 0);
++#endif
+             if (!udevLibrary->load()) {
+                 qWarning("Failed to load the library: %s, supported version(s): %i and %i", qPrintable(udevLibrary->fileName()), 1, 0);
+                 return false;
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/qttools.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qttools.patch
new file mode 100644
index 000000000000..8ae12198ca25
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qttools.patch
@@ -0,0 +1,15 @@
+--- a/src/macdeployqt/shared/shared.cpp
++++ b/src/macdeployqt/shared/shared.cpp
+@@ -1241,6 +1241,12 @@ bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf
+     if (!QFile(qmlImportScannerPath).exists())
+         qmlImportScannerPath = QCoreApplication::applicationDirPath() + "/qmlimportscanner";
+ 
++#ifdef NIXPKGS_QMLIMPORTSCANNER
++    // Fallback: Nixpkgs hardcoded path
++    if (!QFile(qmlImportScannerPath).exists())
++        qmlImportScannerPath = NIXPKGS_QMLIMPORTSCANNER;
++#endif
++
+     // Verify that we found a qmlimportscanner binary
+     if (!QFile(qmlImportScannerPath).exists()) {
+         LogError() << "qmlimportscanner not found at" << qmlImportScannerPath;
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebengine-darwin-checks.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebengine-darwin-checks.patch
new file mode 100644
index 000000000000..213fb624dab1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebengine-darwin-checks.patch
@@ -0,0 +1,29 @@
+diff --git a/configure.pri b/configure.pri
+index 3a33bdc82..c1460b8b5 100644
+--- a/configure.pri
++++ b/configure.pri
+@@ -442,24 +442,6 @@ defineTest(qtwebengine_isWindowsPlatformSupported) {
+ }
+ 
+ defineTest(qtwebengine_isMacOsPlatformSupported) {
+-    !qtwebengine_isMinXcodeVersion(10, 0, 0) {
+-        qtwebengine_platformError("requires at least version 10.0.0, but using Xcode version $${QMAKE_XCODE_VERSION}.")
+-        return(false)
+-    }
+-    !clang|intel_icc {
+-        qtwebengine_platformError("requires Clang.")
+-        return(false)
+-    }
+-    # We require macOS 10.13 (darwin version 17.0.0) or newer.
+-    darwin_major_version = $$section(QMAKE_HOST.version, ., 0, 0)
+-    lessThan(darwin_major_version, 17) {
+-        qtwebengine_platformError("requires macOS version 10.13 or newer.")
+-        return(false)
+-    }
+-    !qtwebengine_isMinOSXSDKVersion(10, 13): {
+-        qtwebengine_platformError("requires a macOS SDK version of 10.13 or newer. Current version is $${WEBENGINE_OSX_SDK_PRODUCT_VERSION}.")
+-        return(false)
+-    }
+     CONFIG(debug, debug|release):isUniversal(){
+         qtwebengine_platformError("Universal builds can not be done with debug configuration due to large binary size.")
+         return(false)
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebengine-darwin-no-platform-check.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebengine-darwin-no-platform-check.patch
new file mode 100644
index 000000000000..86663ee80b57
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebengine-darwin-no-platform-check.patch
@@ -0,0 +1,12 @@
+diff a/src/buildtools/config/mac_osx.pri b/src/buildtools/config/mac_osx.pri
+--- a/src/buildtools/config/mac_osx.pri
++++ b/src/buildtools/config/mac_osx.pri
+@@ -5,8 +5,6 @@ load(functions)
+ # otherwise query for it.
+ QMAKE_MAC_SDK_VERSION = $$eval(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.SDKVersion)
+ isEmpty(QMAKE_MAC_SDK_VERSION) {
+-     QMAKE_MAC_SDK_VERSION = $$system("/usr/bin/xcodebuild -sdk $${QMAKE_MAC_SDK} -version SDKVersion 2>/dev/null")
+-     isEmpty(QMAKE_MAC_SDK_VERSION): error("Could not resolve SDK version for \'$${QMAKE_MAC_SDK}\'")
+ }
+ 
+ # chromium/build/mac/find_sdk.py expects the SDK version (mac_sdk_min) in Major.Minor format.
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebengine-link-pulseaudio.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebengine-link-pulseaudio.patch
new file mode 100644
index 000000000000..052ec89dbc17
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebengine-link-pulseaudio.patch
@@ -0,0 +1,8 @@
+--- a/src/core/config/common.pri
++++ b/src/core/config/common.pri
+@@ -47,3 +47,5 @@
+
+ !qtConfig(webengine-nodejs10): gn_args += use_rollup=false
+ gn_args += enable_ipc_logging=false
++
++gn_args += link_pulseaudio=true
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebengine-mac-dont-set-dsymutil-path.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebengine-mac-dont-set-dsymutil-path.patch
new file mode 100644
index 000000000000..dcdf5f57ffdc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebengine-mac-dont-set-dsymutil-path.patch
@@ -0,0 +1,12 @@
+diff a/src/3rdparty/chromium/build/toolchain/mac/BUILD.gn b/src/3rdparty/chromium/build/toolchain/mac/BUILD.gn
+--- a/src/3rdparty/chromium/build/toolchain/mac/BUILD.gn
++++ b/src/3rdparty/chromium/build/toolchain/mac/BUILD.gn
+@@ -184,8 +184,6 @@ template("mac_toolchain") {
+     # If dSYMs are enabled, this flag will be added to the link tools.
+     if (_enable_dsyms) {
+       dsym_switch = " -Wcrl,dsym,{{root_out_dir}} "
+-      dsym_switch += "-Wcrl,dsymutilpath," +
+-                     "${prefix}dsymutil" + " "
+ 
+       dsym_output_dir =
+           "{{root_out_dir}}/{{target_output_name}}{{output_extension}}.dSYM"
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebkit-cstdint.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebkit-cstdint.patch
new file mode 100644
index 000000000000..6ef551575e12
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebkit-cstdint.patch
@@ -0,0 +1,11 @@
+diff -up qtwebkit-5.212.0-alpha4/Source/ThirdParty/ANGLE/src/common/mathutil.h.me qtwebkit-5.212.0-alpha4/Source/ThirdParty/ANGLE/src/common/mathutil.h
+--- qtwebkit-5.212.0-alpha4/Source/ThirdParty/ANGLE/src/common/mathutil.h.me	2023-02-20 15:40:04.045911245 +0100
++++ qtwebkit-5.212.0-alpha4/Source/ThirdParty/ANGLE/src/common/mathutil.h	2023-02-20 15:40:39.038549787 +0100
+@@ -16,6 +16,7 @@
+ #include <algorithm>
+ #include <string.h>
+ #include <stdlib.h>
++#include <cstdint>
+ 
+ namespace gl
+ {
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebkit-darwin-no-qos-classes.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebkit-darwin-no-qos-classes.patch
new file mode 100644
index 000000000000..a7087f517623
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebkit-darwin-no-qos-classes.patch
@@ -0,0 +1,11 @@
+diff --git a/Source/cmake/OptionsQt.cmake b/Source/cmake/OptionsQt.cmake
+--- a/Source/cmake/OptionsQt.cmake
++++ b/Source/cmake/OptionsQt.cmake
+@@ -683,7 +683,6 @@ if (WIN32 AND COMPILER_IS_GCC_OR_CLANG)
+ endif ()
+ 
+ if (APPLE)
+-    SET_AND_EXPOSE_TO_BUILD(HAVE_QOS_CLASSES 1)
+ endif ()
+ 
+ if (ENABLE_MATHML)
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebkit-darwin-no-readline.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebkit-darwin-no-readline.patch
new file mode 100644
index 000000000000..4871032f6f2c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebkit-darwin-no-readline.patch
@@ -0,0 +1,30 @@
+diff --git a/Source/JavaScriptCore/shell/CMakeLists.txt b/Source/JavaScriptCore/shell/CMakeLists.txt
+--- a/Source/JavaScriptCore/shell/CMakeLists.txt
++++ b/Source/JavaScriptCore/shell/CMakeLists.txt
+@@ -9,7 +9,6 @@ set(JSC_LIBRARIES
+ )
+ 
+ if (WTF_OS_MAC_OS_X)
+-    list(APPEND JSC_LIBRARIES edit)
+ endif ()
+ 
+ if ("${JavaScriptCore_LIBRARY_TYPE}" MATCHES "STATIC")
+diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h
+--- a/Source/WTF/wtf/Platform.h
++++ b/Source/WTF/wtf/Platform.h
+@@ -563,7 +563,6 @@
+ #if PLATFORM(IOS)
+ 
+ #define HAVE_NETWORK_EXTENSION 1
+-#define HAVE_READLINE 1
+ #if USE(APPLE_INTERNAL_SDK)
+ #define USE_CFNETWORK 1
+ #endif
+@@ -650,7 +649,6 @@
+ #define HAVE_MADV_DONTNEED 1
+ #define HAVE_MERGESORT 1
+ #define HAVE_PTHREAD_SETNAME_NP 1
+-#define HAVE_READLINE 1
+ #define HAVE_SYS_TIMEB_H 1
+ 
+ #if !PLATFORM(GTK) && !PLATFORM(QT)
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebkit-icu68.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebkit-icu68.patch
new file mode 100644
index 000000000000..73463d7567a3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebkit-icu68.patch
@@ -0,0 +1,170 @@
+Regressed by https://github.com/unicode-org/icu/commit/c3fe7e09d844
+
+In file included from Source/WebCore/platform/text/TextAllInOne.cpp:31:
+Source/WebCore/platform/text/TextCodecICU.cpp:311:42: error: use of undeclared identifier 'TRUE'
+        ucnv_setFallback(m_converterICU, TRUE);
+                                         ^
+In file included from Source/WebCore/platform/text/TextAllInOne.cpp:40:
+In file included from Source/WebCore/platform/text/icu/UTextProvider.cpp:27:
+Source/WebCore/platform/text/icu/UTextProvider.h:83:28: error: use of undeclared identifier 'TRUE'
+            isAccessible = TRUE;
+                           ^
+Source/WebCore/platform/text/icu/UTextProvider.h:88:28: error: use of undeclared identifier 'FALSE'
+            isAccessible = FALSE;
+                           ^
+Source/WebCore/platform/text/icu/UTextProvider.h:97:28: error: use of undeclared identifier 'TRUE'
+            isAccessible = TRUE;
+                           ^
+Source/WebCore/platform/text/icu/UTextProvider.h:102:28: error: use of undeclared identifier 'FALSE'
+            isAccessible = FALSE;
+                           ^
+In file included from Source/WebCore/platform/text/TextAllInOne.cpp:41:
+Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:103:20: error: use of undeclared identifier 'TRUE'
+            return TRUE;
+                   ^
+Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:108:20: error: use of undeclared identifier 'FALSE'
+            return FALSE;
+                   ^
+Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:114:20: error: use of undeclared identifier 'TRUE'
+            return TRUE;
+                   ^
+Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:119:20: error: use of undeclared identifier 'FALSE'
+            return FALSE;
+                   ^
+Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:147:12: error: use of undeclared identifier 'TRUE'
+    return TRUE;
+           ^
+Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:339:16: error: use of undeclared identifier 'FALSE'
+        return FALSE;
+               ^
+Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:359:12: error: use of undeclared identifier 'TRUE'
+    return TRUE;
+           ^
+In file included from Source/WebCore/platform/text/TextAllInOne.cpp:42:
+Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp:128:16: error: use of undeclared identifier 'FALSE'
+        return FALSE;
+               ^
+Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp:148:12: error: use of undeclared identifier 'TRUE'
+    return TRUE;
+           ^
+
+--- a/Source/WebCore/platform/text/TextCodecICU.cpp
++++ b/Source/WebCore/platform/text/TextCodecICU.cpp
+@@ -308,7 +308,7 @@ void TextCodecICU::createICUConverter() const
+     m_converterICU = ucnv_open(m_canonicalConverterName, &err);
+     ASSERT(U_SUCCESS(err));
+     if (m_converterICU)
+-        ucnv_setFallback(m_converterICU, TRUE);
++        ucnv_setFallback(m_converterICU, true);
+ }
+ 
+ int TextCodecICU::decodeToBuffer(UChar* target, UChar* targetLimit, const char*& source, const char* sourceLimit, int32_t* offsets, bool flush, UErrorCode& err)
+--- a/Source/WebCore/platform/text/icu/UTextProvider.h
++++ b/Source/WebCore/platform/text/icu/UTextProvider.h
+@@ -80,12 +80,12 @@ inline bool uTextAccessInChunkOrOutOfRange(UText* text
+             // Ensure chunk offset is well formed if computed offset exceeds int32_t range.
+             ASSERT(offset < std::numeric_limits<int32_t>::max());
+             text->chunkOffset = offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0;
+-            isAccessible = TRUE;
++            isAccessible = true;
+             return true;
+         }
+         if (nativeIndex >= nativeLength && text->chunkNativeLimit == nativeLength) {
+             text->chunkOffset = text->chunkLength;
+-            isAccessible = FALSE;
++            isAccessible = false;
+             return true;
+         }
+     } else {
+@@ -94,12 +94,12 @@ inline bool uTextAccessInChunkOrOutOfRange(UText* text
+             // Ensure chunk offset is well formed if computed offset exceeds int32_t range.
+             ASSERT(offset < std::numeric_limits<int32_t>::max());
+             text->chunkOffset = offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0;
+-            isAccessible = TRUE;
++            isAccessible = true;
+             return true;
+         }
+         if (nativeIndex <= 0 && !text->chunkNativeStart) {
+             text->chunkOffset = 0;
+-            isAccessible = FALSE;
++            isAccessible = false;
+             return true;
+         }
+     }
+--- a/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp
++++ b/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp
+@@ -100,23 +100,23 @@ static UBool uTextLatin1Access(UText* uText, int64_t i
+         if (index < uText->chunkNativeLimit && index >= uText->chunkNativeStart) {
+             // Already inside the buffer. Set the new offset.
+             uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart);
+-            return TRUE;
++            return true;
+         }
+         if (index >= length && uText->chunkNativeLimit == length) {
+             // Off the end of the buffer, but we can't get it.
+             uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart);
+-            return FALSE;
++            return false;
+         }
+     } else {
+         if (index <= uText->chunkNativeLimit && index > uText->chunkNativeStart) {
+             // Already inside the buffer. Set the new offset.
+             uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart);
+-            return TRUE;
++            return true;
+         }
+         if (!index && !uText->chunkNativeStart) {
+             // Already at the beginning; can't go any farther.
+             uText->chunkOffset = 0;
+-            return FALSE;
++            return false;
+         }
+     }
+     
+@@ -144,7 +144,7 @@ static UBool uTextLatin1Access(UText* uText, int64_t i
+ 
+     uText->nativeIndexingLimit = uText->chunkLength;
+ 
+-    return TRUE;
++    return true;
+ }
+ 
+ static int32_t uTextLatin1Extract(UText* uText, int64_t start, int64_t limit, UChar* dest, int32_t destCapacity, UErrorCode* status)
+@@ -336,7 +336,7 @@ static int64_t uTextLatin1ContextAwareNativeLength(UTe
+ static UBool uTextLatin1ContextAwareAccess(UText* text, int64_t nativeIndex, UBool forward)
+ {
+     if (!text->context)
+-        return FALSE;
++        return false;
+     int64_t nativeLength = uTextLatin1ContextAwareNativeLength(text);
+     UBool isAccessible;
+     if (uTextAccessInChunkOrOutOfRange(text, nativeIndex, nativeLength, forward, isAccessible))
+@@ -356,7 +356,7 @@ static UBool uTextLatin1ContextAwareAccess(UText* text
+         ASSERT(newContext == UTextProviderContext::PriorContext);
+         textLatin1ContextAwareSwitchToPriorContext(text, nativeIndex, nativeLength, forward);
+     }
+-    return TRUE;
++    return true;
+ }
+ 
+ static int32_t uTextLatin1ContextAwareExtract(UText*, int64_t, int64_t, UChar*, int32_t, UErrorCode* errorCode)
+--- a/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp
++++ b/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp
+@@ -125,7 +125,7 @@ static inline int64_t uTextUTF16ContextAwareNativeLeng
+ static UBool uTextUTF16ContextAwareAccess(UText* text, int64_t nativeIndex, UBool forward)
+ {
+     if (!text->context)
+-        return FALSE;
++        return false;
+     int64_t nativeLength = uTextUTF16ContextAwareNativeLength(text);
+     UBool isAccessible;
+     if (uTextAccessInChunkOrOutOfRange(text, nativeIndex, nativeLength, forward, isAccessible))
+@@ -145,7 +145,7 @@ static UBool uTextUTF16ContextAwareAccess(UText* text,
+         ASSERT(newContext == UTextProviderContext::PriorContext);
+         textUTF16ContextAwareSwitchToPriorContext(text, nativeIndex, nativeLength, forward);
+     }
+-    return TRUE;
++    return true;
+ }
+ 
+ static int32_t uTextUTF16ContextAwareExtract(UText*, int64_t, int64_t, UChar*, int32_t, UErrorCode* errorCode)
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebkit.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebkit.patch
new file mode 100644
index 000000000000..b94a4b76cbab
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtwebkit.patch
@@ -0,0 +1,12 @@
+diff --git a/Source/WebKit2/PlatformQt.cmake b/Source/WebKit2/PlatformQt.cmake
+--- a/Source/WebKit2/PlatformQt.cmake
++++ b/Source/WebKit2/PlatformQt.cmake
+@@ -261,6 +261,7 @@
+ list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES
+     ${GLIB_INCLUDE_DIRS}
+     ${GSTREAMER_INCLUDE_DIRS}
++    ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
+     ${Qt5Quick_INCLUDE_DIRS}
+     ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
+     ${SQLITE_INCLUDE_DIR}
+
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/srcs-generated.json b/nixpkgs/pkgs/development/libraries/qt-5/5.15/srcs-generated.json
new file mode 100644
index 000000000000..55ff3497baba
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/srcs-generated.json
@@ -0,0 +1,202 @@
+{
+  "qt3d": {
+    "url": "https://invent.kde.org/qt/qt/qt3d.git",
+    "rev": "e1b1a0d2970fd384bd52c734a72536d8452ad070",
+    "sha256": "14q7xf6n8giz5v1s23ndibiv4d6g0ds4v88bx5v984319qxyvpqh"
+  },
+  "qtactiveqt": {
+    "url": "https://invent.kde.org/qt/qt/qtactiveqt.git",
+    "rev": "4fc1cba4c415d84a5879da29f7c459b70fbc15e9",
+    "sha256": "0mrw7rr6fnjkjxx882ga253kzn4di1agikyq6h9ixwfn2j242qlq"
+  },
+  "qtandroidextras": {
+    "url": "https://invent.kde.org/qt/qt/qtandroidextras.git",
+    "rev": "12d064b16117c6f3418b494c927ef72cf1927929",
+    "sha256": "1rcpldpzwbmyww50rh58avmhgj93ks40bwm0bqz7dgwakm4n76lj"
+  },
+  "qtbase": {
+    "url": "https://invent.kde.org/qt/qt/qtbase.git",
+    "rev": "8907dedc858cc344d770a2e826d6acc516429540",
+    "sha256": "185fmglzb3blfpk6vjd716xr4cx4grxpbqji5idddl4887w18s91"
+  },
+  "qtcharts": {
+    "url": "https://invent.kde.org/qt/qt/qtcharts.git",
+    "rev": "393a84ad5b16a9ec93d8a44bebf1ae86e881bc06",
+    "sha256": "1ki307wkm3wxf3jc508zgdr5p7fb297hf0rdg5x1hyv7qb03bvxx"
+  },
+  "qtconnectivity": {
+    "url": "https://invent.kde.org/qt/qt/qtconnectivity.git",
+    "rev": "70020cb64f71dcf2fd65a8a167cb785d2127e159",
+    "sha256": "10kajc98avdz8a7f5ifrrrzwrkdlbsdmiamh7blsnfcix1063ihq"
+  },
+  "qtdatavis3d": {
+    "url": "https://invent.kde.org/qt/qt/qtdatavis3d.git",
+    "rev": "c887477198cae44585fe9db371db0ddf4c3b205e",
+    "sha256": "0fkw096w81lzdj7zgc6xfy719lh10x3f7mqm832mjq86h8f3gyc5"
+  },
+  "qtdeclarative": {
+    "url": "https://invent.kde.org/qt/qt/qtdeclarative.git",
+    "rev": "792a55bb701d233116c3731c7a53ffdb8c67e407",
+    "sha256": "1d87mkl3dj3ysham1rrfxw07jvc5jqh8g2w8psv5858i29aclyqn"
+  },
+  "qtdoc": {
+    "url": "https://invent.kde.org/qt/qt/qtdoc.git",
+    "rev": "8a3dfe33cb4f1e81b609f41716a3f0610a50db72",
+    "sha256": "18x3gn6wv8vm5wfa6hjfzbkxcpclnwi4s3mbbc3hj9yar53hznqp"
+  },
+  "qtgamepad": {
+    "url": "https://invent.kde.org/qt/qt/qtgamepad.git",
+    "rev": "8ed95136b3c265b01db6cc33869228f41878e173",
+    "sha256": "1m774ah9c1didj60rph6p4gibyqgynmdqngqkq1bv1p7m2jkq1ss"
+  },
+  "qtgraphicaleffects": {
+    "url": "https://invent.kde.org/qt/qt/qtgraphicaleffects.git",
+    "rev": "e33716bd6bb8926688fef20cb568e11618d08a35",
+    "sha256": "1klm5rhx6lpc0knhc15lz6sj07znv2d601gbi360wfqkvbi3g78p"
+  },
+  "qtimageformats": {
+    "url": "https://invent.kde.org/qt/qt/qtimageformats.git",
+    "rev": "142040e8a652e708ff6e004361f6bcfe85fefdf9",
+    "sha256": "1vc1ahanm40bh8qj3x2x4d4niihsrjai298alxfcxinfrsmw9m32"
+  },
+  "qtlocation": {
+    "url": "https://invent.kde.org/qt/qt/qtlocation.git",
+    "rev": "5b27b8921f1f2de93573df903c47aee634209f80",
+    "sha256": "1w8hq3mdlrdkkykhza4dx0f21j6k697xqqvpm2g2xyk2izadq2m0"
+  },
+  "qtlottie": {
+    "url": "https://invent.kde.org/qt/qt/qtlottie.git",
+    "rev": "db33cc9a4c0bad1006dbc9ed46d71b80ee284df3",
+    "sha256": "1wjzhk6zn0vh9fjldpi5gi7qlpgfc2gcznh3a7icpbx7n9cc9qh5"
+  },
+  "qtmacextras": {
+    "url": "https://invent.kde.org/qt/qt/qtmacextras.git",
+    "rev": "4cb89b861dbdbe8733c62bcdadc0a8d6617528a5",
+    "sha256": "1pygs8l1nk7mgqcgv7ilwx87i9i8jxwxn2h8fcqqvgn96c5sd9kg"
+  },
+  "qtmultimedia": {
+    "url": "https://invent.kde.org/qt/qt/qtmultimedia.git",
+    "rev": "36603a39aa590c12cbe2b192b56b29edd09a7a6b",
+    "sha256": "1i6hfddkwf0x74kxz5vrjkc3r507m6icr59p8b6n1bms5y5731j6"
+  },
+  "qtnetworkauth": {
+    "url": "https://invent.kde.org/qt/qt/qtnetworkauth.git",
+    "rev": "3fccc9b8fdaff1252fb4a9c516868d0bbbd4384d",
+    "sha256": "0h0i6r5w2vdmm9nxyk8vzdim739fja4ddf42s9pa25r1vs6i9rdw"
+  },
+  "qtpurchasing": {
+    "url": "https://invent.kde.org/qt/qt/qtpurchasing.git",
+    "rev": "f563e7f2d1668a3d216e9d396e050df25fd15532",
+    "sha256": "1kbzf8nadia31sfc4r53p3p733i85w23yznwp2fc2117z81vd9p7"
+  },
+  "qtquick3d": {
+    "url": "https://invent.kde.org/qt/qt/qtquick3d.git",
+    "rev": "d4f5966ba085a1146a04f2ea8449bbf14833a593",
+    "sha256": "05617q59ldzavm79bf3vgz2sc4paa6d4s0q7adqzpnib6pryr2xj"
+  },
+  "qtquickcontrols": {
+    "url": "https://invent.kde.org/qt/qt/qtquickcontrols.git",
+    "rev": "1ca962198a703f591efc7c8f7540fc4120746a00",
+    "sha256": "1r4z0lfcs1mhdmxgd7saw49p5y2009a0vxn043v0z2w47yrqprb6"
+  },
+  "qtquickcontrols2": {
+    "url": "https://invent.kde.org/qt/qt/qtquickcontrols2.git",
+    "rev": "134ca5dbef9d137a9c46faa79b0225bc650d9283",
+    "sha256": "09r6a0vdpyxzrhx6h49v9nyky3xzgm0z1wd320qi3zh7baxxrzm4"
+  },
+  "qtquicktimeline": {
+    "url": "https://invent.kde.org/qt/qt/qtquicktimeline.git",
+    "rev": "58f4f22662023efe6f223d5ef4a6d0be3708182b",
+    "sha256": "15braxxp4ldvfqxz7a1xywskycmkwv88cypgaxfipkis9jvaykdi"
+  },
+  "qtremoteobjects": {
+    "url": "https://invent.kde.org/qt/qt/qtremoteobjects.git",
+    "rev": "f64e34be9ac4b7e92c63e47235c04471a1d40c93",
+    "sha256": "1hjg1vimipszcdk89ivq1iym05m9yz2li6chyg52n1wqjm628gx1"
+  },
+  "qtscxml": {
+    "url": "https://invent.kde.org/qt/qt/qtscxml.git",
+    "rev": "3f56c6b4bd1e3883581340243b4a7289807fffc9",
+    "sha256": "15yhdp77p4i1as53cssx038hwmqjh2zgh35hrad4mhk4g6za85na"
+  },
+  "qtsensors": {
+    "url": "https://invent.kde.org/qt/qt/qtsensors.git",
+    "rev": "3011b16d63cadbb473b6aa3a535b9f0e33170c09",
+    "sha256": "06d5x03bzbal4npbdl8y74fdizl9phz76q29f798196hjyb0kz05"
+  },
+  "qtserialbus": {
+    "url": "https://invent.kde.org/qt/qt/qtserialbus.git",
+    "rev": "c64de6ad9f646aaa66fca0500d21cde802a7bb17",
+    "sha256": "09jp80yrql450bz7c2rfjyyfy0zd59kmrc0lww5ws0lyp95n116y"
+  },
+  "qtserialport": {
+    "url": "https://invent.kde.org/qt/qt/qtserialport.git",
+    "rev": "c3a7debff7a4c6ddaedb795290180dd99d7ac4be",
+    "sha256": "1aslr9msddnrkxrlzplbzpfydjkiw1haa67mcsmr2phxkfh05329"
+  },
+  "qtspeech": {
+    "url": "https://invent.kde.org/qt/qt/qtspeech.git",
+    "rev": "c41437acf07c2c4703351b07925fce3ce0e6b75d",
+    "sha256": "1ihv2k4swbhd4kiaprrjgq8kmx3vrg64y2dqkvg6nd26dfwhxr0f"
+  },
+  "qtsvg": {
+    "url": "https://invent.kde.org/qt/qt/qtsvg.git",
+    "rev": "5b1b4a99d6bc98c42a11b7a3f6c9f0b0f9e56f34",
+    "sha256": "0ji4kaphlqmlpcvcvlqklhzmdlwv712cvsdxnv41fdab6b49yghw"
+  },
+  "qttools": {
+    "url": "https://invent.kde.org/qt/qt/qttools.git",
+    "rev": "bd0ceb7de5d0c918ae596150e95b069dca8b9150",
+    "sha256": "100qhcdcnnx0l3sl9zl5p3l7707h7vdbjjk7dmy7ap1r0218m5zy"
+  },
+  "qttranslations": {
+    "url": "https://invent.kde.org/qt/qt/qttranslations.git",
+    "rev": "f7745c117041e7adf9705e1de8d71086c160dd9f",
+    "sha256": "0nx8qdg3m4wf8pynh4pr1j0m0p1y5pws7fnx5mpqccvwgj4bwrdj"
+  },
+  "qtvirtualkeyboard": {
+    "url": "https://invent.kde.org/qt/qt/qtvirtualkeyboard.git",
+    "rev": "8b885af5ad3c2f2ff500c060a41e312ea7276e50",
+    "sha256": "0mh4bva1msczgwl2x3b960rml5rmxnvvzi1wk94cc51888vyajiv"
+  },
+  "qtwayland": {
+    "url": "https://invent.kde.org/qt/qt/qtwayland.git",
+    "rev": "c84d171fa84065fb3b4b6b3d33e7707676d87e47",
+    "sha256": "0vxqp5577xig4m0x9pmc04svjy58pi5f0wvc1b4sk61jhj8vib23"
+  },
+  "qtwebchannel": {
+    "url": "https://invent.kde.org/qt/qt/qtwebchannel.git",
+    "rev": "6d2f0c3a36d9b2cdcd759a464c608365a0afda98",
+    "sha256": "1aqhvniysjc14xqcwvqhylcd4lpsl5vsym0spfahxs55s9jsvbyl"
+  },
+  "qtwebglplugin": {
+    "url": "https://invent.kde.org/qt/qt/qtwebglplugin.git",
+    "rev": "8f879e6bcf941a612c568fbfe2b49ddb1bb409cd",
+    "sha256": "02glac0m95naxl5c6n22xclxhp7fjl1whf6sf3388h41wwdhv11c"
+  },
+  "qtwebsockets": {
+    "url": "https://invent.kde.org/qt/qt/qtwebsockets.git",
+    "rev": "9a7b9972a54137d5f2e0d49559fe58d07c90662e",
+    "sha256": "1hcf18cls9kmq4xjxzjm2viqs80pxr4ykrzx0vg1bd83bc509vqp"
+  },
+  "qtwebview": {
+    "url": "https://invent.kde.org/qt/qt/qtwebview.git",
+    "rev": "53fa44709992faae54e4f5c8a128cea7b6f0cbd5",
+    "sha256": "12w6znmy2hijcnwqqva8abydcryh6jcp8lhx0kz0m3cvhwpq1fbx"
+  },
+  "qtwinextras": {
+    "url": "https://invent.kde.org/qt/qt/qtwinextras.git",
+    "rev": "ee931eba5d129284d5c33157cd7d0b9232fbee7b",
+    "sha256": "17fyfkm8qfl9jmlq3ppnqwdx47230bk2laikfbq2188vn42yxnqv"
+  },
+  "qtx11extras": {
+    "url": "https://invent.kde.org/qt/qt/qtx11extras.git",
+    "rev": "aaa54153970d1d63a44b873cad5f62ffa71ef9b8",
+    "sha256": "0q34pi4mqqi4vzk57f59xsk303jgpk1fkxvnvm9r08jkckxxbisw"
+  },
+  "qtxmlpatterns": {
+    "url": "https://invent.kde.org/qt/qt/qtxmlpatterns.git",
+    "rev": "6e0917d518e07f737cc663b8d632c8021634fd3b",
+    "sha256": "062riy66z3v1fxrdnbdhafqdv67xqz12pscidj4fhhp9fzi92a45"
+  }
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/srcs.nix b/nixpkgs/pkgs/development/libraries/qt-5/5.15/srcs.nix
new file mode 100644
index 000000000000..5ac474afeda3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/srcs.nix
@@ -0,0 +1,94 @@
+{ lib, fetchgit, fetchFromGitHub }:
+
+let
+  version = "5.15.12";
+
+  mk = name: args:
+    {
+      inherit version;
+      src = fetchgit {
+        inherit (args) url rev sha256;
+        fetchLFS = false;
+        fetchSubmodules = true;
+        deepClone = false;
+        leaveDotGit = false;
+      };
+    };
+in
+lib.mapAttrs mk (lib.importJSON ./srcs-generated.json)
+// {
+  # qtpim has no official releases
+  qtpim = {
+    version = "unstable-2020-11-02";
+    src = fetchFromGitHub {
+      owner = "qt";
+      repo = "qtpim";
+      # Last commit before Qt5 support was broken
+      rev = "f9a8f0fc914c040d48bbd0ef52d7a68eea175a98";
+      hash = "sha256-/1g+vvHjuRLB1vsm41MrHbBZ+88Udca0iEcbz0Q1BNQ=";
+    };
+  };
+
+  # Has no kde/5.15 branch
+  qtpositioning = rec {
+    version = "5.15.2";
+    src = fetchFromGitHub {
+      owner = "qt";
+      repo = "qtpositioning";
+      rev = "v${version}";
+      hash = "sha256-L/P+yAQItm3taPpCNoOOm7PNdOFZiIwJJYflk6JDWvU=";
+    };
+  };
+
+  # qtwebkit does not have an official release tarball on the qt mirror and is
+  # mostly maintained by the community.
+  qtwebkit = rec {
+    src = fetchFromGitHub {
+      owner = "qt";
+      repo = "qtwebkit";
+      rev = "v${version}";
+      sha256 = "0x8rng96h19xirn7qkz3lydal6v4vn00bcl0s3brz36dfs0z8wpg";
+    };
+    version = "5.212.0-alpha4";
+  };
+
+  # qtsystems has no official releases
+  qtsystems = {
+    version = "unstable-2019-01-03";
+    src = fetchFromGitHub {
+      owner = "qt";
+      repo = "qtsystems";
+      rev = "e3332ee38d27a134cef6621fdaf36687af1b6f4a";
+      hash = "sha256-P8MJgWiDDBCYo+icbNva0LODy0W+bmQTS87ggacuMP0=";
+    };
+  };
+
+  catapult = fetchgit {
+    url = "https://chromium.googlesource.com/catapult";
+    rev = "5eedfe23148a234211ba477f76fc2ea2e8529189";
+    hash = "sha256-LPfBCEB5tJOljXpptsNk0sHGtJf/wIRL7fccN79Nh6o=";
+  };
+
+  qtscript = rec {
+    version = "5.15.16";
+
+    src = fetchFromGitHub {
+      owner = "qt";
+      repo = "qtscript";
+      rev = "v${version}-lts";
+      hash = "sha256-4Jqsmk5EBQ2Biv69yYCNx7l7AWFikRMBfl0fbZcsSaA=";
+    };
+  };
+
+  qtwebengine = rec {
+    version = "5.15.16";
+
+    src = fetchFromGitHub {
+      owner = "qt";
+      repo = "qtwebengine";
+      rev = "v${version}-lts";
+      hash = "sha256-Arg/tfJcx9+CSV1VXBieHNoCSwmWNTnyBdgSkthOdfA=";
+      fetchSubmodules = true;
+    };
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/README.md b/nixpkgs/pkgs/development/libraries/qt-5/README.md
new file mode 100644
index 000000000000..b2ef74d0aef1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/README.md
@@ -0,0 +1,81 @@
+# Qt 5 Maintainer's Notes
+
+## Minor Updates
+
+Let `$major` be the major version number, e.g. `5.9`.
+
+1. Change the version number in the `$major/fetch.sh`.
+2. Run `./maintainers/scripts/fetch-kde-qt.sh pkgs/development/libraries/qt-5/$major`
+   from the top of the Nixpkgs tree.
+
+See below if it is necessary to update any patches.
+
+## Major Updates
+
+Let `$major` be the new major version number, e.g. `5.10`.
+
+1. Copy the subdirectory from the previous major version to `$major`.
+2. Change the version number in `$major/fetch.sh`.
+3. Run `./maintainers/scripts/fetch-kde-qt.sh pkgs/development/libraries/qt-5/$major`
+   from the top of the Nixpkgs tree.
+4. Add a top-level attribute in `pkgs/top-level/all-packages.nix` for the new
+   major version.
+5. Change the `qt5` top-level attribute to point to the new major version.
+6. If the previous major version is _not_ a long-term support release,
+   remove it from Nixpkgs.
+
+See below if it is necessary to update any patches.
+
+## Patches
+
+Nixpkgs maintains several patches for Qt which cannot be submitted upstream. To
+facilitate maintenance, a fork of the upstream repository is created for each patched module:
+
+- [qtbase](https://github.com/ttuegel/qtbase)
+- [qtwebkit](https://github.com/ttuegel/qtwebkit)
+- [qttools](https://github.com/ttuegel/qttools)
+- [qtscript](https://github.com/ttuegel/qtscript)
+- [qtserialport](https://github.com/ttuegel/qtserialport)
+- [qtdeclarative](https://github.com/ttuegel/qtdeclarative)
+- [qtwebengine](https://github.com/ttuegel/qtwebengine)
+
+In each repository, the patches are contained in a branch named `nixpkgs/$major`
+for each major version. Please make a pull request to add or update any patch
+which will be maintained in Nixpkgs.
+
+The forked repository for each module is used to create a single patch in
+Nixpkgs. To recreate the patch for module `$module` (e.g. `qtbase`) at version
+`$version` (e.g. `5.9.1`) in the branch `$major` (e.g. `5.9`),
+
+1. Clone the fork for `$module` from the list above.
+2. Checkout the active branch, `git checkout nixpkgs/$major`.
+3. Compare the patched branch to the release tag,
+   `git diff v$version > $module.patch`.
+4. Copy `$module.patch` into the Nixpkgs tree.
+
+### Minor Version Updates
+
+To update module `$module` to version `$version` from an older version in the
+same branch `$major`,
+
+1. Clone the fork for `$module` from the list above.
+2. Checkout the active branch, `git checkout nixpkgs/$major`.
+3. Merge the new version into the active branch,
+   `git merge --no-ff v$version`.
+4. Fix any conflicts.
+5. Open a pull request for the changes.
+6. Follow the instructions above to recreate the module patch in Nixpkgs.
+
+### Major Version Updates
+
+To update module `$module` from `$oldversion` in branch `$oldmajor` to version
+`$version` in branch `$major`,
+
+1. Clone the fork for `$module` from the list above.
+2. Checkout a new branch for the new major version,
+   `git checkout -b nixpkgs/$major nixpkgs/$oldmajor`.
+3. Rebase the patches from `$oldversion` onto the new branch,
+   `git rebase v$oldversion --onto v$version`.
+4. Fix any conflicts.
+5. Open a pull request for the changes.
+6. Follow the instructions above to recreate the module patch in Nixpkgs.
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/hooks/fix-qmake-libtool.sh b/nixpkgs/pkgs/development/libraries/qt-5/hooks/fix-qmake-libtool.sh
new file mode 100644
index 000000000000..6aaeda052d70
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/hooks/fix-qmake-libtool.sh
@@ -0,0 +1,25 @@
+# Fix libtool libraries generated by qmake.
+# qmake started inserting filenames of shared objects instead of the appropriate
+# linker flags. fixQmakeLibtool searches for broken libtool libraries and
+# replaces the filenames with the linker flags that should have been there.
+fixQmakeLibtool() {
+    if [ -d "$1" ]; then
+        find "$1" -name '*.la' | while read la; do
+            set +e
+            framework_libs=$(grep '^dependency_libs' "$la" | grep -Eo -- '-framework +\w+' | tr '\n' ' ')
+            set -e
+            sed -i "$la" \
+                -e '/^dependency_libs/ s,\(/[^ ]\+\)/lib\([^/ ]\+\)\.so,-L\1 -l\2,g' \
+                -e '/^dependency_libs/ s,-framework \+\w\+,,g'
+            if [ ! -z "$framework_libs" ]; then
+                if grep '^inherited_linker_flags=' $la >/dev/null; then
+                    sed -i "$la" -e "s/^\(inherited_linker_flags='[^']*\)/\1 $framework_libs/"
+                else
+                    echo "inherited_linker_flags='$framework_libs'" >> "$la"
+                fi
+            fi
+        done
+    fi
+}
+
+fixupOutputHooks+=('fixQmakeLibtool $prefix')
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/hooks/fix-qt-builtin-paths.sh b/nixpkgs/pkgs/development/libraries/qt-5/hooks/fix-qt-builtin-paths.sh
new file mode 100644
index 000000000000..0f17856b4c7d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/hooks/fix-qt-builtin-paths.sh
@@ -0,0 +1,64 @@
+# fixQtBuiltinPaths
+#
+# Usage: fixQtBuiltinPaths _dir_ _pattern_
+#
+# Fix Qt builtin paths in files matching _pattern_ under _dir_.
+#
+fixQtBuiltinPaths() {
+    local dir="$1"
+    local pattern="$2"
+    local bin="${!outputBin}"
+    local dev="${!outputDev}"
+    local doc="${!outputDoc}"
+    local lib="${!outputLib}"
+
+    if [ -d "$dir" ]; then
+        find "$dir" -name "$pattern" | while read pr_; do
+            if grep -q '\$\$\[QT_' "${pr_:?}"; then
+                echo "fixQtBuiltinPaths: Fixing Qt builtin paths in \`${pr_:?}'..."
+                sed -i "${pr_:?}" \
+                    -e "s|\\\$\\\$\\[QT_HOST_BINS[^]]*\\]|"'$$'"NIX_OUTPUT_DEV/bin|g" \
+                    -e "s|\\\$\\\$\\[QT_HOST_DATA[^]]*\\]/mkspecs|$dev/mkspecs|g" \
+                    -e "s|\\\$\\\$\\[QT_HOST_PREFIX[^]]*\\]|"'$$'"NIX_OUTPUT_DEV|g" \
+                    -e "s|\\\$\\\$\\[QT_INSTALL_ARCHDATA[^]]*\\]|$lib|g" \
+                    -e "s|\\\$\\\$\\[QT_INSTALL_BINS[^]]*\\]|$bin/bin|g" \
+                    -e "s|\\\$\\\$\\[QT_INSTALL_CONFIGURATION[^]]*\\]|$bin|g" \
+                    -e "s|\\\$\\\$\\[QT_INSTALL_DATA[^]]*\\]|$lib|g" \
+                    -e "s|\\\$\\\$\\[QT_INSTALL_DOCS[^]]*\\]|$doc/share/doc|g" \
+                    -e "s|\\\$\\\$\\[QT_INSTALL_EXAMPLES[^]]*\\]|$doc/examples|g" \
+                    -e "s|\\\$\\\$\\[QT_INSTALL_HEADERS[^]]*\\]|$dev/include|g" \
+                    -e "s|\\\$\\\$\\[QT_INSTALL_LIBS[^]]*\\]|$lib/lib|g" \
+                    -e "s|\\\$\\\$\\[QT_INSTALL_LIBEXECS[^]]*\\]|$lib/libexec|g" \
+                    -e "s|\\\$\\\$\\[QT_INSTALL_PLUGINS[^]]*\\]|$bin/$qtPluginPrefix|g" \
+                    -e "s|\\\$\\\$\\[QT_INSTALL_PREFIX[^]]*\\]|"'$$'"NIX_OUTPUT_LIB|g" \
+                    -e "s|\\\$\\\$\\[QT_INSTALL_TESTS[^]]*\\]|$dev/tests|g" \
+                    -e "s|\\\$\\\$\\[QT_INSTALL_TRANSLATIONS[^]]*\\]|$lib/translations|g" \
+                    -e "s|\\\$\\\$\\[QT_INSTALL_QML[^]]*\\]|$bin/$qtQmlPrefix|g"
+            fi
+        done
+    elif [ -e "$dir" ]; then
+        if grep -q '\$\$\[QT_' "${dir:?}"; then
+            echo "fixQtBuiltinPaths: Fixing Qt builtin paths in \`${dir:?}'..."
+            sed -i "${dir:?}" \
+                -e "s|\\\$\\\$\\[QT_HOST_BINS[^]]*\\]|"'$$'"NIX_OUTPUT_DEV/bin|g" \
+                -e "s|\\\$\\\$\\[QT_HOST_DATA[^]]*\\]/mkspecs|$dev/mkspecs|g" \
+                -e "s|\\\$\\\$\\[QT_HOST_PREFIX[^]]*\\]|"'$$'"NIX_OUTPUT_DEV|g" \
+                -e "s|\\\$\\\$\\[QT_INSTALL_ARCHDATA[^]]*\\]|$lib|g" \
+                -e "s|\\\$\\\$\\[QT_INSTALL_BINS[^]]*\\]|$bin/bin|g" \
+                -e "s|\\\$\\\$\\[QT_INSTALL_CONFIGURATION[^]]*\\]|$bin|g" \
+                -e "s|\\\$\\\$\\[QT_INSTALL_DATA[^]]*\\]|$lib|g" \
+                -e "s|\\\$\\\$\\[QT_INSTALL_DOCS[^]]*\\]|$doc/share/doc|g" \
+                -e "s|\\\$\\\$\\[QT_INSTALL_EXAMPLES[^]]*\\]|$doc/examples|g" \
+                -e "s|\\\$\\\$\\[QT_INSTALL_HEADERS[^]]*\\]|$dev/include|g" \
+                -e "s|\\\$\\\$\\[QT_INSTALL_LIBS[^]]*\\]|$lib/lib|g" \
+                -e "s|\\\$\\\$\\[QT_INSTALL_LIBEXECS[^]]*\\]|$lib/libexec|g" \
+                -e "s|\\\$\\\$\\[QT_INSTALL_PLUGINS[^]]*\\]|$bin/$qtPluginPrefix|g" \
+                -e "s|\\\$\\\$\\[QT_INSTALL_PREFIX[^]]*\\]|"'$$'"NIX_OUTPUT_LIB|g" \
+                -e "s|\\\$\\\$\\[QT_INSTALL_TESTS[^]]*\\]|$dev/tests|g" \
+                -e "s|\\\$\\\$\\[QT_INSTALL_TRANSLATIONS[^]]*\\]|$lib/translations|g" \
+                -e "s|\\\$\\\$\\[QT_INSTALL_QML[^]]*\\]|$bin/$qtQmlPrefix|g"
+        fi
+    else
+        echo "fixQtBuiltinPaths: Warning: \`$dir' does not exist"
+    fi
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/hooks/fix-qt-module-paths.sh b/nixpkgs/pkgs/development/libraries/qt-5/hooks/fix-qt-module-paths.sh
new file mode 100644
index 000000000000..33682f6f3c69
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/hooks/fix-qt-module-paths.sh
@@ -0,0 +1,36 @@
+# fixQtModulePaths
+#
+# Usage: fixQtModulePaths _dir_
+#
+# Find Qt module definitions in directory _dir_ and patch the module paths.
+#
+fixQtModulePaths () {
+    local dir="$1"
+    local bin="${!outputBin}"
+    local dev="${!outputDev}"
+    local lib="${!outputLib}"
+
+    if [ -d "$dir" ]; then
+        find "$dir" -name 'qt_*.pri' | while read pr; do
+            if grep -q '\$\$QT_MODULE_' "${pr:?}"; then
+                echo "fixQtModulePaths: Fixing module paths in \`${pr:?}'..."
+                sed -i "${pr:?}" \
+                    -e "s|\\\$\\\$QT_MODULE_LIB_BASE|$lib/lib|g" \
+                    -e "s|\\\$\\\$QT_MODULE_HOST_LIB_BASE|$lib/lib|g" \
+                    -e "s|\\\$\\\$QT_MODULE_INCLUDE_BASE|$dev/include|g" \
+                    -e "s|\\\$\\\$QT_MODULE_BIN_BASE|$dev/bin|g"
+            fi
+        done
+    elif [ -e "$dir" ]; then
+        echo "fixQtModulePaths: Warning: \`$dir' is not a directory"
+    else
+        echo "fixQtModulePaths: Warning: \`$dir' does not exist"
+    fi
+
+    if [ "z$bin" != "z$dev" ]; then
+        if [ -d "$bin/bin" ]; then
+            mkdir -p "$dev/bin"
+            lndir -silent "$bin/bin" "$dev/bin"
+        fi
+    fi
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/hooks/move-qt-dev-tools.sh b/nixpkgs/pkgs/development/libraries/qt-5/hooks/move-qt-dev-tools.sh
new file mode 100644
index 000000000000..85489c85105b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/hooks/move-qt-dev-tools.sh
@@ -0,0 +1,34 @@
+updateToolPath() {
+    local tool="$1"
+    local target="$2"
+    local original="${!outputBin}/$tool"
+    local actual="${!outputDev}/$tool"
+    if grep -q "$original" "$target"; then
+        echo "updateToolPath: Updating \`$original' in \`$target\'..."
+        sed -i "$target" -e "s|$original|$actual|"
+    fi
+}
+
+moveQtDevTools() {
+    if [ -n "$devTools" ]; then
+        for tool in $devTools; do
+            moveToOutput "$tool" "${!outputDev}"
+        done
+
+        if [ -d "${!outputDev}/mkspecs" ]; then
+            find "${!outputDev}/mkspecs" -name '*.pr?' | while read pr_; do
+                for tool in $devTools; do
+                    updateToolPath "$tool" "$pr_"
+                done
+            done
+        fi
+
+        if [ -d "${!outputDev}/lib/cmake" ]; then
+            find "${!outputDev}/lib/cmake" -name '*.cmake' | while read cmake; do
+                for tool in $devTools; do
+                    updateToolPath "$tool" "$cmake"
+                done
+            done
+        fi
+    fi
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/hooks/qmake-hook.sh b/nixpkgs/pkgs/development/libraries/qt-5/hooks/qmake-hook.sh
new file mode 100644
index 000000000000..56607df6b4b9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/hooks/qmake-hook.sh
@@ -0,0 +1,54 @@
+. @fix_qmake_libtool@
+
+qmakeFlags=( ${qmakeFlags-} )
+
+qmakePrePhase() {
+    qmakeFlags_orig=( "${qmakeFlags[@]}" )
+
+    # These flags must be added _before_ the flags specified in the derivation.
+    qmakeFlags=( \
+        "PREFIX=$out" \
+        "NIX_OUTPUT_OUT=$out" \
+        "NIX_OUTPUT_DEV=${!outputDev}" \
+        "NIX_OUTPUT_BIN=${!outputBin}" \
+        "NIX_OUTPUT_DOC=${!outputDev}/${qtDocPrefix:?}" \
+        "NIX_OUTPUT_QML=${!outputBin}/${qtQmlPrefix:?}" \
+        "NIX_OUTPUT_PLUGIN=${!outputBin}/${qtPluginPrefix:?}" \
+    )
+
+    if [ -n "@debug@" ]; then
+        qmakeFlags+=( "CONFIG+=debug" )
+    else
+        qmakeFlags+=( "CONFIG+=release" )
+    fi
+
+    # do the stripping ourselves (needed for separateDebugInfo)
+    qmakeFlags+=( "CONFIG+=nostrip" )
+
+    qmakeFlags+=( "${qmakeFlags_orig[@]}" )
+}
+prePhases+=" qmakePrePhase"
+
+qmakeConfigurePhase() {
+    runHook preConfigure
+
+    echo "QMAKEPATH=$QMAKEPATH"
+    echo qmake "${qmakeFlags[@]}"
+    qmake "${qmakeFlags[@]}"
+
+    if ! [[ -v enableParallelBuilding ]]; then
+        enableParallelBuilding=1
+        echo "qmake: enabled parallel building"
+    fi
+
+    if ! [[ -v enableParallelInstalling ]]; then
+        enableParallelInstalling=1
+        echo "qmake: enabled parallel installing"
+    fi
+
+    runHook postConfigure
+}
+
+if [ -z "${dontUseQmakeConfigure-}" -a -z "${configurePhase-}" ]; then
+    configurePhase=qmakeConfigurePhase
+fi
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/hooks/qtbase-setup-hook.sh b/nixpkgs/pkgs/development/libraries/qt-5/hooks/qtbase-setup-hook.sh
new file mode 100644
index 000000000000..1b57d676e1fc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/hooks/qtbase-setup-hook.sh
@@ -0,0 +1,112 @@
+if [[ -n "${__nix_qtbase-}" ]]; then
+    # Throw an error if a different version of Qt was already set up.
+    if [[ "$__nix_qtbase" != "@dev@" ]]; then
+        echo >&2 "Error: detected mismatched Qt dependencies:"
+        echo >&2 "    @dev@"
+        echo >&2 "    $__nix_qtbase"
+        exit 1
+    fi
+else # Only set up Qt once.
+__nix_qtbase="@dev@"
+
+qtPluginPrefix=@qtPluginPrefix@
+qtQmlPrefix=@qtQmlPrefix@
+qtDocPrefix=@qtDocPrefix@
+
+. @fix_qt_builtin_paths@
+. @fix_qt_module_paths@
+
+# Disable debug symbols if qtbase was built without debugging.
+# This stops -dev paths from leaking into other outputs.
+if [ -z "@debug@" ]; then
+    NIX_CFLAGS_COMPILE="${NIX_CFLAGS_COMPILE-}${NIX_CFLAGS_COMPILE:+ }-DQT_NO_DEBUG"
+fi
+
+# Integration with CMake:
+# Set the CMake build type corresponding to how qtbase was built.
+if [ -n "@debug@" ]; then
+    cmakeBuildType="Debug"
+else
+    cmakeBuildType="Release"
+fi
+
+providesQtRuntime() {
+    [ -d "$1/$qtPluginPrefix" ] || [ -d "$1/$qtQmlPrefix" ]
+}
+
+# Build tools are often confused if QMAKE is unset.
+QMAKE=@dev@/bin/qmake
+export QMAKE
+
+QMAKEPATH=
+export QMAKEPATH
+
+QMAKEMODULES=
+export QMAKEMODULES
+
+declare -Ag qmakePathSeen=()
+qmakePathHook() {
+    # Skip this path if we have seen it before.
+    # MUST use 'if' because 'qmakePathSeen[$]' may be unset.
+    if [ -n "${qmakePathSeen[$1]-}" ]; then return; fi
+    qmakePathSeen[$1]=1
+    if [ -d "$1/mkspecs" ]
+    then
+        QMAKEMODULES="${QMAKEMODULES}${QMAKEMODULES:+:}/mkspecs"
+        QMAKEPATH="${QMAKEPATH}${QMAKEPATH:+:}$1"
+    fi
+}
+envBuildHostHooks+=(qmakePathHook)
+
+# Propagate any runtime dependency of the building package.
+# Each dependency is propagated to the user environment and as a build
+# input so that it will be re-propagated to the user environment by any
+# package depending on the building package. (This is necessary in case
+# the building package does not provide runtime dependencies itself and so
+# would not be propagated to the user environment.)
+declare -Ag qtEnvHostTargetSeen=()
+qtEnvHostTargetHook() {
+    # Skip this path if we have seen it before.
+    # MUST use 'if' because 'qmakePathSeen[$]' may be unset.
+    if [ -n "${qtEnvHostTargetSeen[$1]-}" ]; then return; fi
+    qtEnvHostTargetSeen[$1]=1
+    if providesQtRuntime "$1" && [ "z${!outputBin}" != "z${!outputDev}" ]
+    then
+        propagatedBuildInputs+=" $1"
+    fi
+}
+envHostTargetHooks+=(qtEnvHostTargetHook)
+
+postPatchMkspecs() {
+    # Prevent this hook from running multiple times
+    dontPatchMkspecs=1
+
+    local bin="${!outputBin}"
+    local dev="${!outputDev}"
+    local doc="${!outputDoc}"
+    local lib="${!outputLib}"
+
+    moveToOutput "mkspecs" "$dev"
+
+    if [ -d "$dev/mkspecs/modules" ]; then
+        fixQtModulePaths "$dev/mkspecs/modules"
+    fi
+
+    if [ -d "$dev/mkspecs" ]; then
+        fixQtBuiltinPaths "$dev/mkspecs" '*.pr?'
+    fi
+}
+if [ -z "${dontPatchMkspecs-}" ]; then
+    postPhases="${postPhases-}${postPhases:+ }postPatchMkspecs"
+fi
+
+qtPreHook() {
+    # Check that wrapQtAppsHook is used, or it is explicitly disabled.
+    if [[ -z "$__nix_wrapQtAppsHook" && -z "$dontWrapQtApps" ]]; then
+        echo >&2 "Error: wrapQtAppsHook is not used, and dontWrapQtApps is not set."
+        exit 1
+    fi
+}
+prePhases+=" qtPreHook"
+
+fi
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/hooks/qttools-setup-hook.sh b/nixpkgs/pkgs/development/libraries/qt-5/hooks/qttools-setup-hook.sh
new file mode 100644
index 000000000000..c320a7974471
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/hooks/qttools-setup-hook.sh
@@ -0,0 +1 @@
+qmakeFlags+=( "QMAKE_LRELEASE=@dev@/bin/lrelease" )
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/hooks/wrap-qt-apps-hook.sh b/nixpkgs/pkgs/development/libraries/qt-5/hooks/wrap-qt-apps-hook.sh
new file mode 100644
index 000000000000..94df0a1a8e66
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/hooks/wrap-qt-apps-hook.sh
@@ -0,0 +1,107 @@
+if [[ -z "${__nix_wrapQtAppsHook-}" ]]; then
+__nix_wrapQtAppsHook=1  # Don't run this hook more than once.
+
+# Inherit arguments given in mkDerivation
+qtWrapperArgs=( ${qtWrapperArgs-} )
+
+qtHostPathSeen=()
+
+qtUnseenHostPath() {
+    for pkg in "${qtHostPathSeen[@]}"
+    do
+        if [ "${pkg:?}" == "$1" ]
+        then
+            return 1
+        fi
+    done
+
+    qtHostPathSeen+=("$1")
+    return 0
+}
+
+qtHostPathHook() {
+    qtUnseenHostPath "$1" || return 0
+
+    local pluginDir="$1/${qtPluginPrefix:?}"
+    if [ -d "$pluginDir" ]
+    then
+        qtWrapperArgs+=(--prefix QT_PLUGIN_PATH : "$pluginDir")
+    fi
+
+    local qmlDir="$1/${qtQmlPrefix:?}"
+    if [ -d "$qmlDir" ]
+    then
+        qtWrapperArgs+=(--prefix NIXPKGS_QT5_QML_IMPORT_PATH : "$qmlDir")
+    fi
+}
+addEnvHooks "$targetOffset" qtHostPathHook
+
+makeQtWrapper() {
+    local original="$1"
+    local wrapper="$2"
+    shift 2
+    makeWrapper "$original" "$wrapper" "${qtWrapperArgs[@]}" "$@"
+}
+
+wrapQtApp() {
+    local program="$1"
+    shift 1
+    wrapProgram "$program" "${qtWrapperArgs[@]}" "$@"
+}
+
+qtOwnPathsHook() {
+    local xdgDataDir="${!outputBin}/share"
+    if [ -d "$xdgDataDir" ]
+    then
+        qtWrapperArgs+=(--prefix XDG_DATA_DIRS : "$xdgDataDir")
+    fi
+
+    local xdgConfigDir="${!outputBin}/etc/xdg"
+    if [ -d "$xdgConfigDir" ]
+    then
+        qtWrapperArgs+=(--prefix XDG_CONFIG_DIRS : "$xdgConfigDir")
+    fi
+
+    qtHostPathHook "${!outputBin}"
+}
+
+preFixupPhases+=" qtOwnPathsHook"
+
+# Note: $qtWrapperArgs still gets defined even if ${dontWrapQtApps-} is set.
+wrapQtAppsHook() {
+    # skip this hook when requested
+    [ -z "${dontWrapQtApps-}" ] || return 0
+
+    # guard against running multiple times (e.g. due to propagation)
+    [ -z "$wrapQtAppsHookHasRun" ] || return 0
+    wrapQtAppsHookHasRun=1
+
+    local targetDirs=( "$prefix/bin" "$prefix/sbin" "$prefix/libexec" "$prefix/Applications" "$prefix/"*.app )
+    echo "wrapping Qt applications in ${targetDirs[@]}"
+
+    for targetDir in "${targetDirs[@]}"
+    do
+        [ -d "$targetDir" ] || continue
+
+        find "$targetDir" ! -type d -executable -print0 | while IFS= read -r -d '' file
+        do
+            isELF "$file" || isMachO "$file" || continue
+
+            if [ -f "$file" ]
+            then
+                echo "wrapping $file"
+                wrapQtApp "$file"
+            elif [ -h "$file" ]
+            then
+                target="$(readlink -e "$file")"
+                echo "wrapping $file -> $target"
+                rm "$file"
+                makeQtWrapper "$target" "$file"
+            fi
+        done
+    done
+}
+
+fixupOutputHooks+=(wrapQtAppsHook)
+
+fi
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/mkDerivation.nix b/nixpkgs/pkgs/development/libraries/qt-5/mkDerivation.nix
new file mode 100644
index 000000000000..a90e229e688d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/mkDerivation.nix
@@ -0,0 +1,15 @@
+{ wrapQtAppsHook }:
+
+mkDerivation:
+
+args:
+
+let
+  args_ = {
+
+    nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ wrapQtAppsHook ];
+
+  };
+in
+
+mkDerivation (args // args_)
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qt3d.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qt3d.nix
new file mode 100644
index 000000000000..f394ff6627e0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qt3d.nix
@@ -0,0 +1,9 @@
+{ lib, stdenv, qtModule, qtbase, qtdeclarative }:
+
+qtModule {
+  pname = "qt3d";
+  propagatedBuildInputs = [ qtbase qtdeclarative ];
+  outputs = [ "out" "dev" "bin" ];
+  # error: use of undeclared identifier 'stat64'
+  env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) "-Dstat64=stat";
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtbase.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtbase.nix
new file mode 100644
index 000000000000..594489a0d750
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtbase.nix
@@ -0,0 +1,425 @@
+{ stdenv, lib
+, src, patches, version, qtCompatVersion
+
+, coreutils, bison, flex, gdb, gperf, lndir, perl, pkg-config, python3
+, which
+  # darwin support
+, libiconv, libobjc, xcbuild, AGL, AppKit, ApplicationServices, AVFoundation, Carbon, Cocoa, CoreAudio, CoreBluetooth
+, CoreLocation, CoreServices, DiskArbitration, Foundation, OpenGL, MetalKit, IOKit
+
+, dbus, fontconfig, freetype, glib, harfbuzz, icu, libdrm, libX11, libXcomposite
+, libXcursor, libXext, libXi, libXrender, libinput, libjpeg, libpng , libxcb
+, libxkbcommon, libxml2, libxslt, openssl, pcre2, sqlite, udev, xcbutil
+, xcbutilimage, xcbutilkeysyms, xcbutilrenderutil, xcbutilwm , zlib, at-spi2-core
+
+  # optional dependencies
+, cups ? null, postgresql ? null
+, withGtk3 ? false, dconf, gtk3
+, withQttranslation ? true, qttranslations ? null
+
+  # options
+, libGLSupported ? !stdenv.isDarwin
+, libGL
+  # qmake detection for libmysqlclient does not seem to work when cross compiling
+, mysqlSupport ? stdenv.hostPlatform == stdenv.buildPlatform
+, libmysqlclient
+, buildExamples ? false
+, buildTests ? false
+, debug ? false
+, developerBuild ? false
+, decryptSslTraffic ? false
+, testers
+, buildPackages
+}:
+
+let
+  debugSymbols = debug || developerBuild;
+  qtPlatformCross = plat: with plat;
+    if isLinux
+    then "linux-generic-g++"
+    else throw "Please add a qtPlatformCross entry for ${plat.config}";
+in
+
+stdenv.mkDerivation (finalAttrs: ({
+  pname = "qtbase";
+  inherit qtCompatVersion src version;
+  debug = debugSymbols;
+
+  propagatedBuildInputs = [
+    libxml2 libxslt openssl sqlite zlib
+
+    # Text rendering
+    harfbuzz icu
+
+    # Image formats
+    libjpeg libpng
+    pcre2
+  ] ++ (
+    if stdenv.isDarwin then [
+      # TODO: move to buildInputs, this should not be propagated.
+      AGL AppKit ApplicationServices AVFoundation Carbon Cocoa CoreAudio CoreBluetooth
+      CoreLocation CoreServices DiskArbitration Foundation OpenGL
+      libobjc libiconv MetalKit IOKit
+    ] else [
+      dbus glib udev
+
+      # Text rendering
+      fontconfig freetype
+
+      libdrm
+
+      # X11 libs
+      libX11 libXcomposite libXext libXi libXrender libxcb libxkbcommon xcbutil
+      xcbutilimage xcbutilkeysyms xcbutilrenderutil xcbutilwm
+    ] ++ lib.optional libGLSupported libGL
+  );
+
+  buildInputs = [ python3 at-spi2-core ]
+    ++ lib.optionals (!stdenv.isDarwin)
+    (
+      [ libinput ]
+      ++ lib.optional withGtk3 gtk3
+    )
+    ++ lib.optional developerBuild gdb
+    ++ lib.optional (cups != null) cups
+    ++ lib.optional (mysqlSupport) libmysqlclient
+    ++ lib.optional (postgresql != null) postgresql;
+
+  nativeBuildInputs = [ bison flex gperf lndir perl pkg-config which ]
+    ++ lib.optionals stdenv.isDarwin [ xcbuild ];
+
+  } // lib.optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform) {
+    # `qtbase` expects to find `cc` (with no prefix) in the
+    # `$PATH`, so the following is needed even if
+    # `stdenv.buildPlatform.canExecute stdenv.hostPlatform`
+    depsBuildBuild = [ buildPackages.stdenv.cc ];
+  } // {
+
+  propagatedNativeBuildInputs = [ lndir ];
+
+  # libQt5Core links calls CoreFoundation APIs that call into the system ICU. Binaries linked
+  # against it will crash during build unless they can access `/usr/share/icu/icudtXXl.dat`.
+  propagatedSandboxProfile = lib.optionalString stdenv.isDarwin ''
+    (allow file-read* (subpath "/usr/share/icu"))
+  '';
+
+  enableParallelBuilding = true;
+
+  outputs = [ "bin" "dev" "out" ];
+
+  inherit patches;
+
+  fix_qt_builtin_paths = ../hooks/fix-qt-builtin-paths.sh;
+  fix_qt_module_paths = ../hooks/fix-qt-module-paths.sh;
+  preHook = ''
+    . "$fix_qt_builtin_paths"
+    . "$fix_qt_module_paths"
+    . ${../hooks/move-qt-dev-tools.sh}
+    . ${../hooks/fix-qmake-libtool.sh}
+  '';
+
+  postPatch = ''
+    for prf in qml_plugin.prf qt_plugin.prf qt_docs.prf qml_module.prf create_cmake.prf; do
+        substituteInPlace "mkspecs/features/$prf" \
+            --subst-var qtPluginPrefix \
+            --subst-var qtQmlPrefix \
+            --subst-var qtDocPrefix
+    done
+
+    substituteInPlace configure --replace /bin/pwd pwd
+    substituteInPlace src/corelib/global/global.pri --replace /bin/ls ${coreutils}/bin/ls
+    sed -e 's@/\(usr\|opt\)/@/var/empty/@g' -i mkspecs/*/*.conf
+
+    sed -i '/PATHS.*NO_DEFAULT_PATH/ d' src/corelib/Qt5Config.cmake.in
+    sed -i '/PATHS.*NO_DEFAULT_PATH/ d' src/corelib/Qt5CoreMacros.cmake
+    sed -i 's/NO_DEFAULT_PATH//' src/gui/Qt5GuiConfigExtras.cmake.in
+    sed -i '/PATHS.*NO_DEFAULT_PATH/ d' mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+
+    # https://bugs.gentoo.org/803470
+    sed -i 's/-lpthread/-pthread/' mkspecs/common/linux.conf src/corelib/configure.json
+
+    patchShebangs ./bin
+  '' + (
+    if stdenv.isDarwin then ''
+        sed -i \
+            -e 's|/usr/bin/xcode-select|xcode-select|' \
+            -e 's|/usr/bin/xcrun|xcrun|' \
+            -e 's|/usr/bin/xcodebuild|xcodebuild|' \
+            -e 's|QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`|QMAKE_CXX="clang++"\nQMAKE_CONF_COMPILER="clang++"|' \
+            ./configure
+            substituteInPlace ./mkspecs/common/mac.conf \
+                --replace "/System/Library/Frameworks/OpenGL.framework/" "${OpenGL}/Library/Frameworks/OpenGL.framework/" \
+                --replace "/System/Library/Frameworks/AGL.framework/" "${AGL}/Library/Frameworks/AGL.framework/"
+    '' else lib.optionalString libGLSupported ''
+      sed -i mkspecs/common/linux.conf \
+          -e "/^QMAKE_INCDIR_OPENGL/ s|$|${libGL.dev or libGL}/include|" \
+          -e "/^QMAKE_LIBDIR_OPENGL/ s|$|${libGL.out}/lib|"
+    '' + lib.optionalString (stdenv.hostPlatform.isx86_32 && stdenv.cc.isGNU) ''
+      sed -i mkspecs/common/gcc-base-unix.conf \
+          -e "/^QMAKE_LFLAGS_SHLIB/ s/-shared/-shared -static-libgcc/"
+    ''
+  );
+
+  qtPluginPrefix = "lib/qt-${qtCompatVersion}/plugins";
+  qtQmlPrefix = "lib/qt-${qtCompatVersion}/qml";
+  qtDocPrefix = "share/doc/qt-${qtCompatVersion}";
+
+  setOutputFlags = false;
+  preConfigure = ''
+    export LD_LIBRARY_PATH="$PWD/lib:$PWD/plugins/platforms''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
+
+    NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QT_PLUGIN_PREFIX=\"$qtPluginPrefix\""
+
+    # paralellize compilation of qtmake, which happens within ./configure
+    export MAKEFLAGS+=" -j$NIX_BUILD_CORES"
+
+    ./bin/syncqt.pl -version $version
+  '' + lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
+    # QT's configure script will refuse to use pkg-config unless these two environment variables are set
+    export PKG_CONFIG_SYSROOT_DIR=/
+    export PKG_CONFIG_LIBDIR=${lib.getLib pkg-config}/lib
+    echo "QMAKE_LFLAGS=''${LDFLAGS}" >> mkspecs/devices/${qtPlatformCross stdenv.hostPlatform}/qmake.conf
+    echo "QMAKE_CFLAGS=''${CFLAGS}" >> mkspecs/devices/${qtPlatformCross stdenv.hostPlatform}/qmake.conf
+    echo "QMAKE_CXXFLAGS=''${CXXFLAGS}" >> mkspecs/devices/${qtPlatformCross stdenv.hostPlatform}/qmake.conf
+  '';
+
+  postConfigure = ''
+    qmakeCacheInjectNixOutputs() {
+        local cache="$1/.qmake.stash"
+        echo "qmakeCacheInjectNixOutputs: $cache"
+        if ! [ -f "$cache" ]; then
+            echo >&2 "qmakeCacheInjectNixOutputs: WARNING: $cache does not exist"
+        fi
+        cat >>"$cache" <<EOF
+    NIX_OUTPUT_BIN = $bin
+    NIX_OUTPUT_DEV = $dev
+    NIX_OUTPUT_OUT = $out
+    NIX_OUTPUT_DOC = $dev/$qtDocPrefix
+    NIX_OUTPUT_QML = $bin/$qtQmlPrefix
+    NIX_OUTPUT_PLUGIN = $bin/$qtPluginPrefix
+    EOF
+    }
+
+    find . -name '.qmake.conf' | while read conf; do
+        qmakeCacheInjectNixOutputs "$(dirname $conf)"
+    done
+  '';
+
+  env = {
+    NIX_CFLAGS_COMPILE = toString ([
+      "-Wno-error=sign-compare" # freetype-2.5.4 changed signedness of some struct fields
+    ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
+      "-Wno-warn=free-nonheap-object"
+      "-Wno-free-nonheap-object"
+      "-w"
+    ] ++ [
+      ''-DNIXPKGS_QTCOMPOSE="${libX11.out}/share/X11/locale"''
+      ''-DLIBRESOLV_SO="${stdenv.cc.libc.out}/lib/libresolv"''
+      ''-DNIXPKGS_LIBXCURSOR="${libXcursor.out}/lib/libXcursor"''
+    ] ++ lib.optional libGLSupported ''-DNIXPKGS_MESA_GL="${libGL.out}/lib/libGL"''
+    ++ lib.optional stdenv.isLinux "-DUSE_X11"
+    ++ lib.optionals (stdenv.hostPlatform.system == "x86_64-darwin") [
+      # ignore "is only available on macOS 10.12.2 or newer" in obj-c code
+      "-Wno-error=unguarded-availability"
+    ]
+    ++ lib.optionals withGtk3 [
+      ''-DNIXPKGS_QGTK3_XDG_DATA_DIRS="${gtk3}/share/gsettings-schemas/${gtk3.name}"''
+      ''-DNIXPKGS_QGTK3_GIO_EXTRA_MODULES="${dconf.lib}/lib/gio/modules"''
+    ] ++ lib.optional decryptSslTraffic "-DQT_DECRYPT_SSL_TRAFFIC");
+  } // lib.optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform) {
+    NIX_CFLAGS_COMPILE_FOR_BUILD = toString ([
+      "-Wno-warn=free-nonheap-object"
+      "-Wno-free-nonheap-object"
+      "-w"
+    ]);
+  };
+
+  prefixKey = "-prefix ";
+
+  # PostgreSQL autodetection fails sporadically because Qt omits the "-lpq" flag
+  # if dependency paths contain the string "pq", which can occur in the hash.
+  # To prevent these failures, we need to override PostgreSQL detection.
+  PSQL_LIBS = lib.optionalString (postgresql != null) "-L${postgresql.lib}/lib -lpq";
+
+  } // lib.optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform) {
+  configurePlatforms = [ ];
+  } // {
+  # TODO Remove obsolete and useless flags once the build will be totally mastered
+  configureFlags = [
+    "-plugindir $(out)/$(qtPluginPrefix)"
+    "-qmldir $(out)/$(qtQmlPrefix)"
+    "-docdir $(out)/$(qtDocPrefix)"
+
+    "-verbose"
+    "-confirm-license"
+    "-opensource"
+
+    "-release"
+    "-shared"
+    "-accessibility"
+    "-optimized-qmake"
+    # for separateDebugInfo
+    "-no-strip"
+    "-system-proxies"
+    "-pkg-config"
+
+    "-gui"
+    "-widgets"
+    "-opengl desktop"
+    "-icu"
+    "-L" "${icu.out}/lib"
+    "-I" "${icu.dev}/include"
+    "-pch"
+  ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "-device ${qtPlatformCross stdenv.hostPlatform}"
+    "-device-option CROSS_COMPILE=${stdenv.cc.targetPrefix}"
+  ]
+  ++ lib.optional debugSymbols "-debug"
+  ++ lib.optionals developerBuild [
+    "-developer-build"
+    "-no-warnings-are-errors"
+  ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
+    "-no-warnings-are-errors"
+  ] ++ (if (!stdenv.hostPlatform.isx86_64) then [
+    "-no-sse2"
+  ] else [
+    "-sse2"
+    "${lib.optionalString (!stdenv.hostPlatform.sse3Support)   "-no"}-sse3"
+    "${lib.optionalString (!stdenv.hostPlatform.ssse3Support)  "-no"}-ssse3"
+    "${lib.optionalString (!stdenv.hostPlatform.sse4_1Support) "-no"}-sse4.1"
+    "${lib.optionalString (!stdenv.hostPlatform.sse4_2Support) "-no"}-sse4.2"
+    "${lib.optionalString (!stdenv.hostPlatform.avxSupport)    "-no"}-avx"
+    "${lib.optionalString (!stdenv.hostPlatform.avx2Support)   "-no"}-avx2"
+    ]
+  ) ++ [
+    "-no-mips_dsp"
+    "-no-mips_dspr2"
+  ] ++ [
+    "-system-zlib"
+    "-L" "${zlib.out}/lib"
+    "-I" "${zlib.dev}/include"
+    "-system-libjpeg"
+    "-L" "${libjpeg.out}/lib"
+    "-I" "${libjpeg.dev}/include"
+    "-system-harfbuzz"
+    "-L" "${harfbuzz.out}/lib"
+    "-I" "${harfbuzz.dev}/include"
+    "-system-pcre"
+    "-openssl-linked"
+    "-L" "${lib.getLib openssl}/lib"
+    "-I" "${openssl.dev}/include"
+    "-system-sqlite"
+    ''-${if mysqlSupport then "plugin" else "no"}-sql-mysql''
+    ''-${if postgresql != null then "plugin" else "no"}-sql-psql''
+
+    "-make libs"
+    "-make tools"
+    ''-${lib.optionalString (!buildExamples) "no"}make examples''
+    ''-${lib.optionalString (!buildTests) "no"}make tests''
+  ]
+    ++ (
+      if stdenv.isDarwin then [
+      "-no-fontconfig"
+      "-qt-freetype"
+      "-qt-libpng"
+      "-no-framework"
+    ] else [
+      "-rpath"
+    ] ++ [
+      "-xcb"
+      "-qpa xcb"
+      "-L" "${libX11.out}/lib"
+      "-I" "${libX11.out}/include"
+      "-L" "${libXext.out}/lib"
+      "-I" "${libXext.out}/include"
+      "-L" "${libXrender.out}/lib"
+      "-I" "${libXrender.out}/include"
+
+      "-libinput"
+
+      ''-${lib.optionalString (cups == null) "no-"}cups''
+      "-dbus-linked"
+      "-glib"
+    ] ++ [
+      "-system-libpng"
+    ] ++ lib.optional withGtk3 "-gtk"
+      ++ [
+        "-inotify"
+    ] ++ lib.optionals (cups != null) [
+      "-L" "${cups.lib}/lib"
+      "-I" "${cups.dev}/include"
+    ] ++ lib.optionals (mysqlSupport) [
+      "-L" "${libmysqlclient}/lib"
+      "-I" "${libmysqlclient}/include"
+    ] ++ lib.optional (withQttranslation && (qttranslations != null)) [
+      # depends on x11
+      "-translationdir" "${qttranslations}/translations"
+    ]
+  );
+
+  # Move selected outputs.
+  postInstall = ''
+    moveToOutput "mkspecs" "$dev"
+  '';
+
+  devTools = [
+    "bin/fixqt4headers.pl"
+    "bin/moc"
+    "bin/qdbuscpp2xml"
+    "bin/qdbusxml2cpp"
+    "bin/qlalr"
+    "bin/qmake"
+    "bin/rcc"
+    "bin/syncqt.pl"
+    "bin/uic"
+  ];
+
+  postFixup = ''
+    # Don't retain build-time dependencies like gdb.
+    sed '/QMAKE_DEFAULT_.*DIRS/ d' -i $dev/mkspecs/qconfig.pri
+    fixQtModulePaths "''${!outputDev}/mkspecs/modules"
+    fixQtBuiltinPaths "''${!outputDev}" '*.pr?'
+
+    # Move development tools to $dev
+    moveQtDevTools
+    moveToOutput bin "$dev"
+
+    # fixup .pc file (where to find 'moc' etc.)
+    sed -i "$dev/lib/pkgconfig/Qt5Core.pc" \
+      -e "/^host_bins=/ c host_bins=$dev/bin"
+  '';
+
+  dontStrip = debugSymbols;
+
+  setupHook = ../hooks/qtbase-setup-hook.sh;
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    homepage = "https://www.qt.io/";
+    description = "A cross-platform application framework for C++";
+    license = with licenses; [ fdl13Plus gpl2Plus lgpl21Plus lgpl3Plus ];
+    maintainers = with maintainers; [ qknight ttuegel periklis bkchr ];
+    pkgConfigModules = [
+      "Qt5Concurrent"
+      "Qt5Core"
+      "Qt5DBus"
+      "Qt5Gui"
+      "Qt5Network"
+      "Qt5OpenGL"
+      "Qt5OpenGLExtensions"
+      "Qt5PrintSupport"
+      #"Qt5Qml"
+      #"Qt5QmlModels"
+      #"Qt5Quick"
+      #"Qt5QuickTest"
+      #"Qt5QuickWidgets"
+      "Qt5Sql"
+      "Qt5Test"
+      "Qt5Widgets"
+      "Qt5Xml"
+    ];
+    platforms = platforms.unix;
+  };
+
+}))
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtcharts.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtcharts.nix
new file mode 100644
index 000000000000..75766649a404
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtcharts.nix
@@ -0,0 +1,7 @@
+{ qtModule, qtbase, qtdeclarative }:
+
+qtModule {
+  pname = "qtcharts";
+  propagatedBuildInputs = [ qtbase qtdeclarative ];
+  outputs = [ "out" "dev" "bin" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtconnectivity.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtconnectivity.nix
new file mode 100644
index 000000000000..81efb4bee04b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtconnectivity.nix
@@ -0,0 +1,13 @@
+{ qtModule, lib, stdenv, qtbase, qtdeclarative, bluez, IOBluetooth }:
+
+qtModule {
+  pname = "qtconnectivity";
+  buildInputs = lib.optional stdenv.isLinux bluez;
+  propagatedBuildInputs = [
+    qtbase
+    qtdeclarative
+  ] ++ lib.optionals stdenv.isDarwin [
+    IOBluetooth
+  ];
+  outputs = [ "out" "dev" "bin" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtdatavis3d.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtdatavis3d.nix
new file mode 100644
index 000000000000..d79320ea139f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtdatavis3d.nix
@@ -0,0 +1,9 @@
+{ lib, stdenv, qtModule, qtbase, qtdeclarative }:
+
+qtModule {
+  pname = "qtdatavis3d";
+  propagatedBuildInputs = [ qtbase qtdeclarative ];
+  outputs = [ "out" "dev" "bin" ];
+  # error: use of undeclared identifier 'stat64'
+  env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) "-Dstat64=stat";
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtdeclarative.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtdeclarative.nix
new file mode 100644
index 000000000000..f4249b7f9505
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtdeclarative.nix
@@ -0,0 +1,26 @@
+{ lib
+, stdenv
+, qtModule, python3, qtbase, qtsvg }:
+
+qtModule {
+  pname = "qtdeclarative";
+  propagatedBuildInputs = [ qtbase qtsvg ];
+  nativeBuildInputs = [ python3 ];
+  outputs = [ "out" "dev" "bin" ];
+  preConfigure = ''
+    NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QML2_IMPORT_PREFIX=\"$qtQmlPrefix\""
+  '';
+  configureFlags = [ "-qml-debug" ];
+  devTools = [
+    "bin/qml"
+    "bin/qmlcachegen"
+    "bin/qmleasing"
+    "bin/qmlimportscanner"
+    "bin/qmllint"
+    "bin/qmlmin"
+    "bin/qmlplugindump"
+    "bin/qmlprofiler"
+    "bin/qmlscene"
+    "bin/qmltestrunner"
+  ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtdoc.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtdoc.nix
new file mode 100644
index 000000000000..93620e42667e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtdoc.nix
@@ -0,0 +1,7 @@
+{ qtModule, qtdeclarative }:
+
+qtModule {
+  pname = "qtdoc";
+  propagatedBuildInputs = [ qtdeclarative ];
+  outputs = [ "out" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtgamepad.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtgamepad.nix
new file mode 100644
index 000000000000..398572673171
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtgamepad.nix
@@ -0,0 +1,10 @@
+{ lib, stdenv, qtModule, qtbase, qtdeclarative, GameController, pkg-config }:
+
+qtModule {
+  pname = "qtgamepad";
+  propagatedBuildInputs = [ qtbase qtdeclarative ]
+    ++ lib.optional stdenv.isDarwin GameController;
+  buildInputs = [ ];
+  nativeBuildInputs = [ pkg-config ];
+  outputs = [ "out" "dev" "bin" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtgraphicaleffects.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtgraphicaleffects.nix
new file mode 100644
index 000000000000..2fe865492e36
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtgraphicaleffects.nix
@@ -0,0 +1,7 @@
+{ qtModule, qtdeclarative }:
+
+qtModule {
+  pname = "qtgraphicaleffects";
+  propagatedBuildInputs = [ qtdeclarative ];
+  outputs = [ "out" "dev" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtimageformats.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtimageformats.nix
new file mode 100644
index 000000000000..4775bb0b0383
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtimageformats.nix
@@ -0,0 +1,20 @@
+{ lib
+, stdenv
+, qtModule
+, qtbase
+, libwebp
+, jasper
+, libmng
+, libtiff
+}:
+
+qtModule {
+  pname = "qtimageformats";
+  propagatedBuildInputs = [
+    qtbase libwebp
+  ] ++ lib.optionals (!jasper.meta.broken) [
+    jasper
+  ] ++ [
+    libmng libtiff
+  ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtlocation.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtlocation.nix
new file mode 100644
index 000000000000..a9897648d8e6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtlocation.nix
@@ -0,0 +1,13 @@
+{ lib, stdenv, qtModule, qtbase, qtmultimedia }:
+
+qtModule {
+  pname = "qtlocation";
+  propagatedBuildInputs = [ qtbase qtmultimedia ];
+  outputs = [ "bin" "out" "dev" ];
+  qmakeFlags = lib.optionals stdenv.isDarwin [
+     # boost uses std::auto_ptr which has been disabled in clang with libcxx
+     # This flag re-enables this feature
+     # https://libcxx.llvm.org/docs/UsingLibcxx.html#c-17-specific-configuration-macros
+     "QMAKE_CXXFLAGS+=-D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR"
+  ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtlottie.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtlottie.nix
new file mode 100644
index 000000000000..4231fcb26b1c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtlottie.nix
@@ -0,0 +1,9 @@
+{ qtModule
+, qtbase
+, qtdeclarative
+}:
+
+qtModule {
+  pname = "qtlottie";
+  propagatedBuildInputs = [ qtbase qtdeclarative ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtmacextras.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtmacextras.nix
new file mode 100644
index 000000000000..da0f5f760bf7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtmacextras.nix
@@ -0,0 +1,10 @@
+{ lib, qtModule, qtbase }:
+
+qtModule {
+  pname = "qtmacextras";
+  propagatedBuildInputs = [ qtbase ];
+  meta = with lib; {
+    maintainers = with maintainers; [ periklis ];
+    platforms = platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtmultimedia.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtmultimedia.nix
new file mode 100644
index 000000000000..d5dc16c52823
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtmultimedia.nix
@@ -0,0 +1,24 @@
+{ qtModule
+, lib
+, stdenv
+, qtbase
+, qtdeclarative
+, pkg-config
+, alsa-lib
+, gstreamer
+, gst-plugins-base
+, libpulseaudio
+, wayland
+}:
+
+qtModule {
+  pname = "qtmultimedia";
+  propagatedBuildInputs = [ qtbase qtdeclarative ];
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ gstreamer gst-plugins-base ]
+    # https://github.com/NixOS/nixpkgs/pull/169336 regarding libpulseaudio
+    ++ lib.optionals stdenv.isLinux [ libpulseaudio alsa-lib wayland ];
+  outputs = [ "bin" "dev" "out" ];
+  qmakeFlags = [ "GST_VERSION=1.0" ];
+  NIX_LDFLAGS = lib.optionalString (stdenv.isDarwin) "-lobjc";
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtnetworkauth.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtnetworkauth.nix
new file mode 100644
index 000000000000..bec5f354a23a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtnetworkauth.nix
@@ -0,0 +1,6 @@
+{ qtModule, qtbase }:
+
+qtModule {
+  pname = "qtnetworkauth";
+  propagatedBuildInputs = [ qtbase ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtpim.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtpim.nix
new file mode 100644
index 000000000000..01692d9f2ec3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtpim.nix
@@ -0,0 +1,27 @@
+{ qtModule
+, lib
+, qtbase
+, qtdeclarative
+}:
+
+qtModule {
+  pname = "qtpim";
+
+  outputs = [
+    "out"
+    "dev"
+  ];
+
+  propagatedBuildInputs = [
+    qtbase
+    qtdeclarative
+  ];
+
+  qmakeFlags = [
+    "CONFIG+=git_build"
+  ];
+
+  meta = {
+    maintainers = with lib.maintainers; [ OPNA2608 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtpositioning.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtpositioning.nix
new file mode 100644
index 000000000000..20f059976323
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtpositioning.nix
@@ -0,0 +1,14 @@
+{ qtModule
+, qtbase
+, qtdeclarative
+, qtserialport
+, pkg-config
+, openssl
+}:
+
+qtModule {
+  pname = "qtpositioning";
+  propagatedBuildInputs = [ qtbase qtdeclarative qtserialport ];
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ openssl ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtquickcontrols.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtquickcontrols.nix
new file mode 100644
index 000000000000..3b78a2a6c87e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtquickcontrols.nix
@@ -0,0 +1,6 @@
+{ qtModule, qtdeclarative }:
+
+qtModule {
+  pname = "qtquickcontrols";
+  propagatedBuildInputs = [ qtdeclarative ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtquickcontrols2.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtquickcontrols2.nix
new file mode 100644
index 000000000000..59070629ddc7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtquickcontrols2.nix
@@ -0,0 +1,7 @@
+{ qtModule, qtdeclarative }:
+
+qtModule {
+  pname = "qtquickcontrols2";
+  propagatedBuildInputs = [ qtdeclarative ];
+  outputs = [ "out" "dev" "bin" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtremoteobjects.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtremoteobjects.nix
new file mode 100644
index 000000000000..fde78848c854
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtremoteobjects.nix
@@ -0,0 +1,8 @@
+{ qtModule, qtbase, qtdeclarative }:
+
+qtModule {
+  pname = "qtremoteobjects";
+  propagatedBuildInputs = [ qtbase qtdeclarative ];
+  # cycle is detected in build when adding "dev" "bin" too
+  outputs = [ "out" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtscript.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtscript.nix
new file mode 100644
index 000000000000..07993b72a6d3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtscript.nix
@@ -0,0 +1,6 @@
+{ qtModule, qtbase, qttools }:
+
+qtModule {
+  pname = "qtscript";
+  propagatedBuildInputs = [ qtbase qttools ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtscxml.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtscxml.nix
new file mode 100644
index 000000000000..3314934db2ff
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtscxml.nix
@@ -0,0 +1,7 @@
+{ qtModule, qtbase, qtdeclarative }:
+
+qtModule {
+  pname = "qtscxml";
+  propagatedBuildInputs = [ qtbase qtdeclarative ];
+  outputs = [ "out" "dev" "bin" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtsensors.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtsensors.nix
new file mode 100644
index 000000000000..fdea92035b90
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtsensors.nix
@@ -0,0 +1,7 @@
+{ qtModule, qtbase, qtdeclarative }:
+
+qtModule {
+  pname = "qtsensors";
+  propagatedBuildInputs = [ qtbase qtdeclarative ];
+  outputs = [ "out" "dev" "bin" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtserialbus.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtserialbus.nix
new file mode 100644
index 000000000000..3a7285d0a8b0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtserialbus.nix
@@ -0,0 +1,6 @@
+{ qtModule, qtbase, qtserialport }:
+
+qtModule {
+  pname = "qtserialbus";
+  propagatedBuildInputs = [ qtbase qtserialport ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtserialport.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtserialport.nix
new file mode 100644
index 000000000000..7907f91b986b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtserialport.nix
@@ -0,0 +1,7 @@
+{ qtModule, stdenv, lib, qtbase, systemd }:
+
+qtModule {
+  pname = "qtserialport";
+  propagatedBuildInputs = [ qtbase ];
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isLinux "-DNIXPKGS_LIBUDEV=\"${lib.getLib systemd}/lib/libudev\"";
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtspeech.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtspeech.nix
new file mode 100644
index 000000000000..94e66cf40044
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtspeech.nix
@@ -0,0 +1,9 @@
+{ lib, qtModule, stdenv, speechd, pkg-config }:
+
+qtModule {
+  pname = "qtspeech";
+  propagatedBuildInputs = [ ];
+  buildInputs = lib.optionals stdenv.isLinux [ speechd ];
+  nativeBuildInputs = [ pkg-config ];
+  outputs = [ "out" "dev" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtsvg.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtsvg.nix
new file mode 100644
index 000000000000..418c69fb2ebf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtsvg.nix
@@ -0,0 +1,7 @@
+{ qtModule, qtbase }:
+
+qtModule {
+  pname = "qtsvg";
+  propagatedBuildInputs = [ qtbase ];
+  outputs = [ "out" "dev" "bin" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtsystems.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtsystems.nix
new file mode 100644
index 000000000000..921172c2856b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtsystems.nix
@@ -0,0 +1,54 @@
+{ qtModule
+, stdenv
+, lib
+, bluez
+, libevdev
+, libX11
+, pkg-config
+, qtbase
+, udev
+, wrapQtAppsHook
+}:
+
+qtModule {
+  pname = "qtsystems";
+
+  outputs = [
+    "out"
+    "dev"
+  ] ++ lib.optionals stdenv.hostPlatform.isLinux [
+    "bin"
+  ];
+
+  propagatedBuildInputs = [
+    qtbase
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+    wrapQtAppsHook
+  ];
+
+  buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
+    bluez
+    libevdev
+    libX11
+    udev
+  ];
+
+  qmakeFlags = [
+    "CONFIG+=git_build"
+  ] ++ lib.optionals stdenv.hostPlatform.isLinux [
+    "CONFIG+=ofono"
+    "CONFIG+=udisks"
+    "CONFIG+=upower"
+  ];
+
+  postFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
+    wrapQtApp $bin/bin/servicefw
+  '';
+
+  meta = {
+    maintainers = with lib.maintainers; [ OPNA2608 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qttools.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qttools.nix
new file mode 100644
index 000000000000..37e4348ed2c2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qttools.nix
@@ -0,0 +1,42 @@
+{ qtModule, stdenv, lib, qtbase, qtdeclarative }:
+
+qtModule {
+  pname = "qttools";
+  propagatedBuildInputs = [ qtbase qtdeclarative ];
+  outputs = [ "out" "dev" "bin" ];
+
+  # fixQtBuiltinPaths overwrites a builtin path we should keep
+  postPatch = ''
+    sed -i "src/linguist/linguist.pro" \
+        -e '/^cmake_linguist_config_version_file.input =/ s|$$\[QT_HOST_DATA.*\]|${lib.getDev qtbase}|'
+    sed -i "src/qtattributionsscanner/qtattributionsscanner.pro" \
+        -e '/^cmake_qattributionsscanner_config_version_file.input =/ s|$$\[QT_HOST_DATA.*\]|${lib.getDev qtbase}|'
+  '';
+
+  devTools = [
+    "bin/qcollectiongenerator"
+    "bin/linguist"
+    "bin/assistant"
+    "bin/qdoc"
+    "bin/lconvert"
+    "bin/designer"
+    "bin/qtattributionsscanner"
+    "bin/lrelease"
+    "bin/lrelease-pro"
+    "bin/pixeltool"
+    "bin/lupdate"
+    "bin/lupdate-pro"
+    "bin/qtdiag"
+    "bin/qhelpgenerator"
+    "bin/qtplugininfo"
+    "bin/qthelpconverter"
+    "bin/lprodump"
+    "bin/qdistancefieldgenerator"
+  ] ++ lib.optionals stdenv.isDarwin [
+    "bin/macdeployqt"
+  ];
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && qtdeclarative != null) ''-DNIXPKGS_QMLIMPORTSCANNER="${qtdeclarative.dev}/bin/qmlimportscanner"'';
+
+  setupHook = ../hooks/qttools-setup-hook.sh;
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qttranslations.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qttranslations.nix
new file mode 100644
index 000000000000..bcd52cdc4a8f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qttranslations.nix
@@ -0,0 +1,7 @@
+{ qtModule, qttools }:
+
+qtModule {
+  pname = "qttranslations";
+  nativeBuildInputs = [ qttools ];
+  outputs = [ "out" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtvirtualkeyboard.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtvirtualkeyboard.nix
new file mode 100644
index 000000000000..0bfc242d15b8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtvirtualkeyboard.nix
@@ -0,0 +1,6 @@
+{ qtModule, qtbase, qtdeclarative, qtsvg, hunspell  }:
+
+qtModule {
+  pname = "qtvirtualkeyboard";
+  propagatedBuildInputs = [ qtbase qtdeclarative qtsvg hunspell ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtwayland-app_id.patch b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtwayland-app_id.patch
new file mode 100644
index 000000000000..24d081aa602b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtwayland-app_id.patch
@@ -0,0 +1,36 @@
+Ensure that the correct `app_id` for Wayland is set. The upstream implementation
+uses `QFileInfo::baseName()`[1] which strips everything away after the first dot.
+This means that `.foo-wrapped` has an empty `app_id` because `baseName` returns
+an empty string in this case.
+
+The patch basically checks whether the program has the form `.foo-wrapped` (i.e. got
+wrapped by `makeWrapper`) and if that's the case, `foo` will be the correct `app_id`.
+
+[1] https://doc.qt.io/qt-5/qfileinfo.html#baseName
+
+diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
+index ba881cb..b3fd031 100644
+--- a/src/client/qwaylandwindow.cpp
++++ b/src/client/qwaylandwindow.cpp
+@@ -167,7 +167,20 @@ void QWaylandWindow::initWindow()
+                                                                                  Qt::SkipEmptyParts);
+ 
+                 if (domainName.isEmpty()) {
+-                    mShellSurface->setAppId(fi.baseName());
++                    auto baseName = fi.baseName();
++                    if (baseName.isEmpty()) {
++                        auto fileName = fi.fileName();
++                        if (fileName.endsWith("-wrapped") && fileName.startsWith(".")) {
++                            do {
++                                auto len = fileName.length();
++                                fileName = fileName.right(len - 1);
++                                fileName = fileName.left(len - 9);
++                            } while (fileName.endsWith("-wrapped") && fileName.startsWith("."));
++                            mShellSurface->setAppId(fileName);
++                        }
++                    } else {
++                        mShellSurface->setAppId(baseName);
++                    }
+                 } else {
+                     QString appId;
+                     for (int i = 0; i < domainName.count(); ++i)
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtwayland.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtwayland.nix
new file mode 100644
index 000000000000..347a5cf64342
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtwayland.nix
@@ -0,0 +1,15 @@
+{ qtModule, qtbase, qtquickcontrols, wayland, wayland-scanner, pkg-config }:
+
+qtModule {
+  pname = "qtwayland";
+  propagatedBuildInputs = [ qtbase qtquickcontrols ];
+  buildInputs = [ wayland ];
+  nativeBuildInputs = [ pkg-config wayland-scanner ];
+  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).
+    ./qtwayland-app_id.patch
+  ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtwebchannel.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtwebchannel.nix
new file mode 100644
index 000000000000..e7d6be534409
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtwebchannel.nix
@@ -0,0 +1,12 @@
+{ lib
+, stdenv
+, qtModule
+, qtbase
+, qtdeclarative
+}:
+
+qtModule {
+  pname = "qtwebchannel";
+  propagatedBuildInputs = [ qtbase qtdeclarative ];
+  outputs = [ "out" "dev" ] ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [ "bin" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtwebengine.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtwebengine.nix
new file mode 100644
index 000000000000..3503067aca75
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtwebengine.nix
@@ -0,0 +1,327 @@
+{ qtModule
+, qtdeclarative, qtquickcontrols, qtlocation, qtwebchannel
+
+, bison, flex, git, gperf, ninja, pkg-config, python, which, python3
+, nodejs, qtbase, perl
+, buildPackages
+, pkgsBuildTarget
+, pkgsBuildBuild
+
+, xorg, libXcursor, libXScrnSaver, libXrandr, libXtst
+, fontconfig, freetype, harfbuzz, icu, dbus, libdrm
+, zlib, minizip, libjpeg, libpng, libtiff, libwebp, libopus
+, jsoncpp, protobuf, libvpx, srtp, snappy, nss, libevent
+, alsa-lib
+, pulseaudio
+, libcap
+, pciutils
+, systemd
+, enableProprietaryCodecs ? true
+, gn
+, cctools, libobjc, libpm, libunwind, sandbox, xnu
+, ApplicationServices, AVFoundation, Foundation, ForceFeedback, GameController, AppKit
+, ImageCaptureCore, CoreBluetooth, IOBluetooth, CoreWLAN, Quartz, Cocoa, LocalAuthentication
+, MediaPlayer, MediaAccessibility, SecurityInterface, Vision, CoreML, OpenDirectory, Accelerate
+, cups, openbsm, runCommand, xcbuild, writeScriptBin
+, ffmpeg_4 ? null
+, lib, stdenv, fetchpatch
+, version ? null
+, qtCompatVersion
+, pipewireSupport ? stdenv.isLinux
+, pipewire_0_2
+, postPatch ? ""
+, nspr
+, lndir
+, dbusSupport ? !stdenv.isDarwin, expat
+}:
+
+let
+  # qtwebengine expects to find an executable in $PATH which runs on
+  # the build platform yet knows about the host `.pc` files.  Most
+  # configury allows setting $PKG_CONFIG to point to an
+  # arbitrarily-named script which serves this purpose; however QT
+  # insists that it is named `pkg-config` with no target prefix.  So
+  # we re-wrap the host platform's pkg-config.
+  pkg-config-wrapped-without-prefix = stdenv.mkDerivation {
+    name = "pkg-config-wrapper-without-target-prefix";
+    dontUnpack = true;
+    dontBuild = true;
+    installPhase = ''
+      mkdir -p $out/bin
+      ln -s '${buildPackages.pkg-config}/bin/${buildPackages.pkg-config.targetPrefix}pkg-config' $out/bin/pkg-config
+    '';
+  };
+
+  qtPlatformCross = plat: with plat;
+    if isLinux
+    then "linux-generic-g++"
+    else throw "Please add a qtPlatformCross entry for ${plat.config}";
+
+in
+
+qtModule ({
+  pname = "qtwebengine";
+  nativeBuildInputs = [
+    bison flex git gperf ninja pkg-config python which gn nodejs
+  ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
+    perl
+    lndir (lib.getDev pkgsBuildTarget.targetPackages.qt5.qtbase)
+    pkgsBuildBuild.pkg-config
+    (lib.getDev pkgsBuildTarget.targetPackages.qt5.qtquickcontrols)
+    pkg-config-wrapped-without-prefix
+  ] ++ lib.optional stdenv.isDarwin xcbuild;
+  doCheck = true;
+  outputs = [ "bin" "dev" "out" ];
+
+  enableParallelBuilding = true;
+
+  # Don’t use the gn setup hook
+  dontUseGnConfigure = true;
+
+  # ninja builds some components with -Wno-format,
+  # which cannot be set at the same time as -Wformat-security
+  hardeningDisable = [ "format" ];
+
+  postPatch = ''
+    # Patch Chromium build tools
+    (
+      cd src/3rdparty/chromium;
+
+      # Manually fix unsupported shebangs
+      substituteInPlace third_party/harfbuzz-ng/src/src/update-unicode-tables.make \
+        --replace "/usr/bin/env -S make -f" "/usr/bin/make -f" || true
+
+      # TODO: be more precise
+      patchShebangs .
+
+      # Fix compatibility with python3.11
+      substituteInPlace tools/metrics/ukm/ukm_model.py \
+        --replace "r'^(?i)(|true|false)$'" "r'(?i)^(|true|false)$'"
+      substituteInPlace tools/grit/grit/util.py \
+        --replace "mode = 'rU'" "mode = 'r'"
+    )
+  ''
+  # Prevent Chromium build script from making the path to `clang` relative to
+  # the build directory.  `clang_base_path` is the value of `QMAKE_CLANG_DIR`
+  # from `src/core/config/mac_osx.pri`.
+  + lib.optionalString stdenv.isDarwin ''
+    substituteInPlace ./src/3rdparty/chromium/build/toolchain/mac/BUILD.gn \
+      --replace 'prefix = rebase_path("$clang_base_path/bin/", root_build_dir)' 'prefix = "$clang_base_path/bin/"'
+  ''
+  # Patch library paths in Qt sources
+  + ''
+    sed -i \
+      -e "s,QLibraryInfo::location(QLibraryInfo::DataPath),QLatin1String(\"$out\"),g" \
+      -e "s,QLibraryInfo::location(QLibraryInfo::TranslationsPath),QLatin1String(\"$out/translations\"),g" \
+      -e "s,QLibraryInfo::location(QLibraryInfo::LibraryExecutablesPath),QLatin1String(\"$out/libexec\"),g" \
+      src/core/web_engine_library_info.cpp
+  ''
+  # Patch library paths in Chromium sources
+  + lib.optionalString (!stdenv.isDarwin) ''
+    sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${lib.getLib systemd}/lib/\1!' \
+      src/3rdparty/chromium/device/udev_linux/udev?_loader.cc
+
+    sed -i -e '/libpci_loader.*Load/s!"\(libpci\.so\)!"${pciutils}/lib/\1!' \
+      src/3rdparty/chromium/gpu/config/gpu_info_collector_linux.cc
+  '' + lib.optionalString stdenv.isDarwin (''
+    substituteInPlace src/buildtools/config/mac_osx.pri \
+      --replace 'QMAKE_CLANG_DIR = "/usr"' 'QMAKE_CLANG_DIR = "${stdenv.cc}"'
+
+    # Following is required to prevent a build error:
+    # ninja: error: '/nix/store/z8z04p0ph48w22rqzx7ql67gy8cyvidi-SDKs/MacOSX10.12.sdk/usr/include/mach/exc.defs', needed by 'gen/third_party/crashpad/crashpad/util/mach/excUser.c', missing and no known rule to make it
+    substituteInPlace src/3rdparty/chromium/third_party/crashpad/crashpad/util/BUILD.gn \
+      --replace '$sysroot/usr' "${xnu}"
+
+    # Apple has some secret stuff they don't share with OpenBSM
+    substituteInPlace src/3rdparty/chromium/base/mac/mach_port_rendezvous.cc \
+      --replace "audit_token_to_pid(request.trailer.msgh_audit)" "request.trailer.msgh_audit.val[5]"
+    substituteInPlace src/3rdparty/chromium/third_party/crashpad/crashpad/util/mach/mach_message.cc \
+      --replace "audit_token_to_pid(audit_trailer->msgh_audit)" "audit_trailer->msgh_audit.val[5]"
+
+    # ld: warning: directory not found for option '-L/nix/store/...-xcodebuild-0.1.2-pre/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/lib'
+    # ld: fatal warning(s) induced error (-fatal_warnings)
+    substituteInPlace src/3rdparty/chromium/build/config/compiler/BUILD.gn \
+      --replace "-Wl,-fatal_warnings" ""
+  '') + postPatch;
+
+  env = {
+    NIX_CFLAGS_COMPILE =
+      toString (
+        lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
+          "-w "
+        ] ++ lib.optionals stdenv.cc.isGNU [
+          # with gcc8, -Wclass-memaccess became part of -Wall and this exceeds the logging limit
+          "-Wno-class-memaccess"
+        ] ++ lib.optionals (stdenv.hostPlatform.gcc.arch or "" == "sandybridge") [
+          # it fails when compiled with -march=sandybridge https://github.com/NixOS/nixpkgs/pull/59148#discussion_r276696940
+          # TODO: investigate and fix properly
+          "-march=westmere"
+        ] ++ lib.optionals stdenv.cc.isClang [
+          "-Wno-elaborated-enum-base"
+        ]);
+  } // lib.optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform) {
+    NIX_CFLAGS_LINK = "-Wl,--no-warn-search-mismatch";
+    "NIX_CFLAGS_LINK_${buildPackages.stdenv.cc.suffixSalt}" = "-Wl,--no-warn-search-mismatch";
+  };
+
+  preConfigure = ''
+    export NINJAFLAGS=-j$NIX_BUILD_CORES
+
+    if [ -d "$PWD/tools/qmake" ]; then
+        QMAKEPATH="$PWD/tools/qmake''${QMAKEPATH:+:}$QMAKEPATH"
+    fi
+  '' + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
+    export QMAKE_CC=$CC
+    export QMAKE_CXX=$CXX
+    export QMAKE_LINK=$CXX
+    export QMAKE_AR=$AR
+  '';
+
+  qmakeFlags = [ "--" "-system-ffmpeg" ]
+    ++ lib.optional (pipewireSupport && stdenv.buildPlatform == stdenv.hostPlatform) "-webengine-webrtc-pipewire"
+    ++ lib.optional enableProprietaryCodecs "-proprietary-codecs";
+
+  propagatedBuildInputs = [
+    qtdeclarative qtquickcontrols qtlocation qtwebchannel
+
+    # Image formats
+    libjpeg libpng libtiff libwebp
+
+    # Video formats
+    srtp libvpx
+
+    # Audio formats
+    libopus
+
+    # Text rendering
+    harfbuzz icu
+
+    libevent
+    ffmpeg_4
+  ] ++ lib.optionals (!stdenv.isDarwin) [
+    dbus zlib minizip snappy nss protobuf jsoncpp
+
+    # Audio formats
+    alsa-lib
+    pulseaudio
+
+    # Text rendering
+    fontconfig freetype
+
+    libcap
+    pciutils
+
+    # X11 libs
+    xorg.xrandr libXScrnSaver libXcursor libXrandr xorg.libpciaccess libXtst
+    xorg.libXcomposite xorg.libXdamage libdrm xorg.libxkbfile
+
+  ] ++ lib.optionals pipewireSupport [
+    # Pipewire
+    pipewire_0_2
+  ]
+
+  # FIXME These dependencies shouldn't be needed but can't find a way
+  # around it. Chromium pulls this in while bootstrapping GN.
+  ++ lib.optionals stdenv.isDarwin [
+    libobjc
+    cctools
+
+    # frameworks
+    ApplicationServices
+    AVFoundation
+    Foundation
+    ForceFeedback
+    GameController
+    AppKit
+    ImageCaptureCore
+    CoreBluetooth
+    IOBluetooth
+    CoreWLAN
+    Quartz
+    Cocoa
+    LocalAuthentication
+    MediaPlayer
+    MediaAccessibility
+    SecurityInterface
+    Vision
+    CoreML
+    OpenDirectory
+    Accelerate
+
+    openbsm
+    libunwind
+  ];
+
+  buildInputs = lib.optionals stdenv.isDarwin [
+    cups
+    libpm
+    sandbox
+
+    # `sw_vers` is used by `src/3rdparty/chromium/build/config/mac/sdk_info.py`
+    # to get some information about the host platform.
+    (writeScriptBin "sw_vers" ''
+      #!${stdenv.shell}
+
+      while [ $# -gt 0 ]; do
+        case "$1" in
+          -buildVersion) echo "17E199";;
+        *) break ;;
+
+        esac
+        shift
+      done
+    '')
+  ];
+
+  dontUseNinjaBuild = true;
+  dontUseNinjaInstall = true;
+
+  postInstall = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
+    mkdir -p $out/libexec
+  '' + lib.optionalString stdenv.isLinux ''
+    cat > $out/libexec/qt.conf <<EOF
+    [Paths]
+    Prefix = ..
+    EOF
+
+  '' + ''
+    # Fix for out-of-sync QtWebEngine and Qt releases (since 5.15.3)
+    sed 's/${lib.head (lib.splitString "-" version)} /${qtCompatVersion} /' -i "$out"/lib/cmake/*/*Config.cmake
+  '';
+
+  requiredSystemFeatures = [ "big-parallel" ];
+
+  meta = with lib; {
+    description = "A web engine based on the Chromium web browser";
+    maintainers = with maintainers; [ matthewbauer ];
+
+    # qtwebengine-5.15.8: "QtWebEngine can only be built for x86,
+    # x86-64, ARM, Aarch64, and MIPSel architectures."
+    platforms = with lib.systems.inspect.patterns;
+      let inherit (lib.systems.inspect) patternLogicalAnd;
+      in concatMap (patternLogicalAnd isUnix) (lib.concatMap lib.toList [
+        isx86_32
+        isx86_64
+        isAarch32
+        isAarch64
+        (patternLogicalAnd isMips isLittleEndian)
+      ]);
+
+    # This build takes a long time; particularly on slow architectures
+    timeout = 24 * 3600;
+  };
+
+} // lib.optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform) {
+  configurePlatforms = [ ];
+  # to get progress output in `nix-build` and `nix build -L`
+  preBuild = ''
+    export TERM=dumb
+  '';
+  depsBuildBuild = [
+    pkgsBuildBuild.stdenv
+    zlib
+    nss
+    nspr
+  ];
+
+})
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtwebglplugin.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtwebglplugin.nix
new file mode 100644
index 000000000000..b2d93300a664
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtwebglplugin.nix
@@ -0,0 +1,6 @@
+{ qtModule, qtbase, qtwebsockets }:
+
+qtModule {
+  pname = "qtwebglplugin";
+  propagatedBuildInputs = [ qtbase qtwebsockets ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtwebkit.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtwebkit.nix
new file mode 100644
index 000000000000..9c5d347d110b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtwebkit.nix
@@ -0,0 +1,63 @@
+{ qtModule, stdenv, lib, fetchurl
+, qtbase, qtdeclarative, qtlocation, qtmultimedia, qtsensors, qtwebchannel
+, fontconfig, libwebp, libxml2, libxslt
+, sqlite, systemd, glib, gst_all_1, cmake
+, bison, flex, gdb, gperf, perl, pkg-config, python38, ruby
+, ICU, OpenGL
+}:
+
+let
+  hyphen = stdenv.mkDerivation rec {
+    pname = "hyphen";
+    version = "2.8.8";
+    src = fetchurl {
+      url = "http://dev-www.libreoffice.org/src/5ade6ae2a99bc1e9e57031ca88d36dad-hyphen-${version}.tar.gz";
+      sha256 = "304636d4eccd81a14b6914d07b84c79ebb815288c76fe027b9ebff6ff24d5705";
+    };
+    postPatch = ''
+      patchShebangs tests
+    '';
+    buildInputs = [ perl ];
+  };
+in
+qtModule {
+  pname = "qtwebkit";
+  propagatedBuildInputs = [ qtbase qtdeclarative qtlocation qtsensors qtwebchannel ]
+    ++ lib.optional stdenv.isDarwin qtmultimedia;
+  buildInputs = [ fontconfig libwebp libxml2 libxslt sqlite glib gst_all_1.gstreamer gst_all_1.gst-plugins-base hyphen ]
+    ++ lib.optionals stdenv.isDarwin [ ICU OpenGL ];
+  nativeBuildInputs = [ bison flex gdb gperf perl pkg-config python38 ruby cmake ];
+
+  cmakeFlags = [ "-DPORT=Qt" ]
+    ++ lib.optionals stdenv.isDarwin [
+      "-DQt5Multimedia_DIR=${lib.getDev qtmultimedia}/lib/cmake/Qt5Multimedia"
+      "-DQt5MultimediaWidgets_DIR=${lib.getDev qtmultimedia}/lib/cmake/Qt5MultimediaWidgets"
+      "-DMACOS_FORCE_SYSTEM_XML_LIBRARIES=OFF"
+    ];
+
+  env.NIX_CFLAGS_COMPILE = toString ([
+    # with gcc7 this warning blows the log over Hydra's limit
+    "-Wno-expansion-to-defined"
+  ]
+  # with gcc8, -Wclass-memaccess became part of -Wall and this too exceeds the logging limit
+  ++ lib.optional stdenv.cc.isGNU "-Wno-class-memaccess"
+  # with clang this warning blows the log over Hydra's limit
+  ++ lib.optional stdenv.isDarwin "-Wno-inconsistent-missing-override"
+  ++ lib.optional (!stdenv.isDarwin) ''-DNIXPKGS_LIBUDEV="${lib.getLib systemd}/lib/libudev"'');
+
+  doCheck = false; # fails 13 out of 13 tests (ctest)
+
+  # remove forbidden references to $TMPDIR
+  preFixup = lib.optionalString stdenv.isLinux ''
+    patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$out"/libexec/*
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = {
+    maintainers = with lib.maintainers; [ abbradar periklis ];
+    knownVulnerabilities = [
+      "QtWebkit upstream is unmaintained and receives no security updates, see https://blogs.gnome.org/mcatanzaro/2022/11/04/stop-using-qtwebkit/"
+    ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtwebsockets.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtwebsockets.nix
new file mode 100644
index 000000000000..a355662aed6c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtwebsockets.nix
@@ -0,0 +1,7 @@
+{ qtModule, qtbase, qtdeclarative }:
+
+qtModule {
+  pname = "qtwebsockets";
+  propagatedBuildInputs = [ qtbase qtdeclarative ];
+  outputs = [ "out" "dev" "bin" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtwebview.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtwebview.nix
new file mode 100644
index 000000000000..fd8755390973
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtwebview.nix
@@ -0,0 +1,12 @@
+{ lib, stdenv, qtModule, qtdeclarative, qtwebengine, CoreFoundation, WebKit }:
+
+qtModule {
+  pname = "qtwebview";
+  propagatedBuildInputs = [ qtdeclarative qtwebengine ];
+  buildInputs = lib.optionals stdenv.isDarwin [
+    CoreFoundation
+    WebKit
+  ];
+  outputs = [ "out" "dev" "bin" ];
+  NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-framework CoreFoundation -framework WebKit";
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtx11extras.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtx11extras.nix
new file mode 100644
index 000000000000..8d5aa2fd235f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtx11extras.nix
@@ -0,0 +1,6 @@
+{ qtModule, qtbase }:
+
+qtModule {
+  pname = "qtx11extras";
+  propagatedBuildInputs = [ qtbase ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtxmlpatterns.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtxmlpatterns.nix
new file mode 100644
index 000000000000..ae4ea52dcd8a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtxmlpatterns.nix
@@ -0,0 +1,7 @@
+{ qtModule, qtbase, qtdeclarative }:
+
+qtModule {
+  pname = "qtxmlpatterns";
+  propagatedBuildInputs = [ qtbase qtdeclarative ];
+  devTools = [ "bin/xmlpatterns" "bin/xmlpatternsvalidator" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/qt-env.nix b/nixpkgs/pkgs/development/libraries/qt-5/qt-env.nix
new file mode 100644
index 000000000000..b4a201c08cc4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/qt-env.nix
@@ -0,0 +1,21 @@
+{ buildEnv, qtbase }: name: paths:
+
+buildEnv {
+  inherit name;
+  paths = [ qtbase ] ++ paths;
+
+  pathsToLink = [ "/bin" "/mkspecs" "/include" "/lib" "/share" ];
+  extraOutputsToInstall = [ "out" "dev" ];
+
+  postBuild = ''
+    rm "$out/bin/qmake"
+    cp "${qtbase.dev}/bin/qmake" "$out/bin"
+    cat >"$out/bin/qt.conf" <<EOF
+    [Paths]
+    Prefix = $out
+    Plugins = ${qtbase.qtPluginPrefix}
+    Qml2Imports = ${qtbase.qtQmlPrefix}
+    Documentation = ${qtbase.qtDocPrefix}
+    EOF
+  '';
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/qtModule.nix b/nixpkgs/pkgs/development/libraries/qt-5/qtModule.nix
new file mode 100644
index 000000000000..54d24e46092f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/qtModule.nix
@@ -0,0 +1,94 @@
+{ lib
+, stdenv
+, buildPackages
+, mkDerivation
+, perl
+, qmake
+, patches
+, srcs
+, pkgsHostTarget
+}:
+
+let inherit (lib) licenses maintainers platforms; in
+
+args:
+
+let
+  inherit (args) pname;
+  version = args.version or srcs.${pname}.version;
+  src = args.src or srcs.${pname}.src;
+in
+
+mkDerivation (args // {
+  inherit pname version src;
+  patches = (args.patches or []) ++ (patches.${pname} or []);
+
+  nativeBuildInputs =
+    (args.nativeBuildInputs or []) ++ [
+      perl qmake
+    ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
+      pkgsHostTarget.qt5.qtbase.dev
+    ];
+  propagatedBuildInputs =
+    (lib.warnIf (args ? qtInputs) "qt5.qtModule's qtInputs argument is deprecated" args.qtInputs or []) ++
+    (args.propagatedBuildInputs or []);
+} // lib.optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform) {
+  depsBuildBuild = [ buildPackages.stdenv.cc ] ++ (args.depsBuildBuild or []);
+} // {
+
+  outputs = args.outputs or [ "out" "dev" ];
+  setOutputFlags = args.setOutputFlags or false;
+
+  preHook = ''
+    . ${./hooks/move-qt-dev-tools.sh}
+    . ${./hooks/fix-qt-builtin-paths.sh}
+  '';
+
+  preConfigure = ''
+    ${args.preConfigure or ""}
+
+    fixQtBuiltinPaths . '*.pr?'
+  '' + lib.optionalString (builtins.compareVersions "5.15.0" version <= 0)
+  # Note: We use ${version%%-*} to remove any tag from the end of the version
+  # string. Version tags are added by Nixpkgs maintainers and not reflected in
+  # the source version.
+  ''
+    if [[ -z "$dontCheckQtModuleVersion" ]] \
+        && grep -q '^MODULE_VERSION' .qmake.conf 2>/dev/null \
+        && ! grep -q -F "''${version%%-*}" .qmake.conf 2>/dev/null
+    then
+      echo >&2 "error: could not find version ''${version%%-*} in .qmake.conf"
+      echo >&2 "hint: check .qmake.conf and update the package version in Nixpkgs"
+      exit 1
+    fi
+
+    if [[ -z "$dontSyncQt" && -f sync.profile ]]; then
+      syncqt.pl -version "''${version%%-*}"
+    fi
+  '';
+
+  dontWrapQtApps = args.dontWrapQtApps or true;
+
+  postFixup = ''
+    if [ -d "''${!outputDev}/lib/pkgconfig" ]; then
+        find "''${!outputDev}/lib/pkgconfig" -name '*.pc' | while read pc; do
+            sed -i "$pc" \
+                -e "/^prefix=/ c prefix=''${!outputLib}" \
+                -e "/^exec_prefix=/ c exec_prefix=''${!outputBin}" \
+                -e "/^includedir=/ c includedir=''${!outputDev}/include"
+        done
+    fi
+
+    moveQtDevTools
+
+    ${args.postFixup or ""}
+  '';
+
+  meta = {
+    homepage = "https://www.qt.io";
+    description = "A cross-platform application framework for C++";
+    license = with licenses; [ fdl13Plus gpl2Plus lgpl21Plus lgpl3Plus ];
+    maintainers = with maintainers; [ qknight ttuegel periklis bkchr ];
+    platforms = platforms.unix;
+  } // (args.meta or {});
+})
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/default.nix b/nixpkgs/pkgs/development/libraries/qt-6/default.nix
new file mode 100644
index 000000000000..3f1cf19c29ab
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/default.nix
@@ -0,0 +1,214 @@
+{ newScope
+, lib
+, stdenv
+, generateSplicesForMkScope
+, makeScopeWithSplicing'
+, fetchurl
+, fetchpatch
+, fetchpatch2
+, makeSetupHook
+, makeWrapper
+, gst_all_1
+, libglvnd
+, darwin
+, overrideSDK
+, buildPackages
+, python3
+, config
+
+  # options
+, developerBuild ? false
+, debug ? false
+}:
+
+let
+  srcs = import ./srcs.nix {
+    inherit fetchurl;
+    mirror = "mirror://qt";
+  };
+
+  addPackages = self:
+    let
+      callPackage = self.newScope ({
+        inherit (self) qtModule;
+        inherit srcs python3;
+        stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv;
+      });
+    in
+    {
+
+      inherit callPackage srcs;
+
+      qtModule = callPackage ./qtModule.nix { };
+
+      qtbase = callPackage ./modules/qtbase.nix {
+        withGtk3 = true;
+        inherit (srcs.qtbase) src version;
+        inherit developerBuild;
+        inherit (darwin.apple_sdk_11_0.frameworks)
+          AGL AVFoundation AppKit Contacts CoreBluetooth EventKit GSS MetalKit;
+        patches = [
+          ./patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch
+          ./patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch
+          ./patches/0003-qtbase-qmake-fix-includedir-in-generated-pkg-config.patch
+          ./patches/0004-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch
+          ./patches/0005-qtbase-qt-cmake-always-use-cmake-from-path.patch
+          ./patches/0006-qtbase-find-tools-in-PATH.patch
+          ./patches/0007-qtbase-pass-to-qmlimportscanner-the-QML2_IMPORT_PATH.patch
+          ./patches/0008-qtbase-allow-translations-outside-prefix.patch
+          ./patches/0009-qtbase-find-qmlimportscanner-in-macdeployqt-via-envi.patch
+          ./patches/0010-qtbase-check-in-the-QML-folder-of-this-library-does-.patch
+          ./patches/0011-qtbase-derive-plugin-load-path-from-PATH.patch
+          # Revert "macOS: Silence warning about supporting secure state restoration"
+          # fix build with macOS sdk < 12.0
+          (fetchpatch2 {
+            url = "https://github.com/qt/qtbase/commit/fc1549c01445bb9c99d3ba6de8fa9da230614e72.patch";
+            revert = true;
+            hash = "sha256-cjB2sC4cvZn0UEc+sm6ZpjyC78ssqB1Kb5nlZQ15M4A=";
+          })
+        ];
+      };
+      env = callPackage ./qt-env.nix { };
+      full = callPackage ({ env, qtbase }: env "qt-full-${qtbase.version}"
+      # `with self` is ok to use here because having these spliced is unnecessary
+      ( with self;[
+        qt3d
+        qt5compat
+        qtcharts
+        qtconnectivity
+        qtdatavis3d
+        qtdeclarative
+        qtdoc
+        qtgraphs
+        qtgrpc
+        qthttpserver
+        qtimageformats
+        qtlanguageserver
+        qtlocation
+        qtlottie
+        qtmultimedia
+        qtmqtt
+        qtnetworkauth
+        qtpositioning
+        qtsensors
+        qtserialbus
+        qtserialport
+        qtshadertools
+        qtspeech
+        qtquick3d
+        qtquick3dphysics
+        qtquickeffectmaker
+        qtquicktimeline
+        qtremoteobjects
+        qtsvg
+        qtscxml
+        qttools
+        qttranslations
+        qtvirtualkeyboard
+        qtwebchannel
+        qtwebengine
+        qtwebsockets
+        qtwebview
+      ] ++ lib.optionals (!stdenv.isDarwin) [ qtwayland libglvnd ])) { };
+
+      qt3d = callPackage ./modules/qt3d.nix { };
+      qt5compat = callPackage ./modules/qt5compat.nix { };
+      qtcharts = callPackage ./modules/qtcharts.nix { };
+      qtconnectivity = callPackage ./modules/qtconnectivity.nix {
+        inherit (darwin.apple_sdk_11_0.frameworks) IOBluetooth PCSC;
+      };
+      qtdatavis3d = callPackage ./modules/qtdatavis3d.nix { };
+      qtdeclarative = callPackage ./modules/qtdeclarative.nix { };
+      qtdoc = callPackage ./modules/qtdoc.nix { };
+      qtgraphs = callPackage ./modules/qtgraphs.nix { };
+      qtgrpc = callPackage ./modules/qtgrpc.nix { };
+      qthttpserver = callPackage ./modules/qthttpserver.nix { };
+      qtimageformats = callPackage ./modules/qtimageformats.nix { };
+      qtlanguageserver = callPackage ./modules/qtlanguageserver.nix { };
+      qtlocation = callPackage ./modules/qtlocation.nix { };
+      qtlottie = callPackage ./modules/qtlottie.nix { };
+      qtmultimedia = callPackage ./modules/qtmultimedia.nix {
+        inherit (gst_all_1) gstreamer gst-plugins-base gst-plugins-good gst-libav gst-vaapi;
+        inherit (darwin.apple_sdk_11_0.frameworks) VideoToolbox;
+      };
+      qtmqtt = callPackage ./modules/qtmqtt.nix { };
+      qtnetworkauth = callPackage ./modules/qtnetworkauth.nix { };
+      qtpositioning = callPackage ./modules/qtpositioning.nix { };
+      qtsensors = callPackage ./modules/qtsensors.nix { };
+      qtserialbus = callPackage ./modules/qtserialbus.nix { };
+      qtserialport = callPackage ./modules/qtserialport.nix { };
+      qtshadertools = callPackage ./modules/qtshadertools.nix { };
+      qtspeech = callPackage ./modules/qtspeech.nix {
+        inherit (darwin.apple_sdk_11_0.frameworks) Cocoa;
+      };
+      qtquick3d = callPackage ./modules/qtquick3d.nix { };
+      qtquick3dphysics = callPackage ./modules/qtquick3dphysics.nix { };
+      qtquickeffectmaker = callPackage ./modules/qtquickeffectmaker.nix { };
+      qtquicktimeline = callPackage ./modules/qtquicktimeline.nix { };
+      qtremoteobjects = callPackage ./modules/qtremoteobjects.nix { };
+      qtsvg = callPackage ./modules/qtsvg.nix { };
+      qtscxml = callPackage ./modules/qtscxml.nix { };
+      qttools = callPackage ./modules/qttools.nix { };
+      qttranslations = callPackage ./modules/qttranslations.nix { };
+      qtvirtualkeyboard = callPackage ./modules/qtvirtualkeyboard.nix { };
+      qtwayland = callPackage ./modules/qtwayland.nix { };
+      qtwebchannel = callPackage ./modules/qtwebchannel.nix { };
+      qtwebengine = callPackage ./modules/qtwebengine.nix {
+        inherit (darwin) autoSignDarwinBinariesHook bootstrap_cmds cctools xnu;
+        inherit (darwin.apple_sdk_11_0) libpm libunwind;
+        inherit (darwin.apple_sdk_11_0.libs) sandbox;
+        inherit (darwin.apple_sdk_11_0.frameworks)
+          AGL AVFoundation Accelerate Cocoa CoreLocation CoreML ForceFeedback
+          GameController ImageCaptureCore LocalAuthentication
+          MediaAccessibility MediaPlayer MetalKit Network OpenDirectory Quartz
+          ReplayKit SecurityInterface Vision;
+        qtModule = callPackage ({ qtModule }: qtModule.override {
+          stdenv = if stdenv.isDarwin
+            then overrideSDK stdenv { darwinMinVersion = "10.13"; darwinSdkVersion = "11.0"; }
+            else stdenv;
+        }) { };
+        xcbuild = buildPackages.xcbuild.override {
+          productBuildVer = "20A2408";
+        };
+      };
+      qtwebsockets = callPackage ./modules/qtwebsockets.nix { };
+      qtwebview = callPackage ./modules/qtwebview.nix {
+        inherit (darwin.apple_sdk_11_0.frameworks) WebKit;
+      };
+
+      wrapQtAppsHook = callPackage ({ makeBinaryWrapper }: makeSetupHook
+        {
+          name = "wrap-qt6-apps-hook";
+          propagatedBuildInputs = [ makeBinaryWrapper ];
+        } ./hooks/wrap-qt-apps-hook.sh) { };
+
+      qmake = callPackage ({ qtbase }: makeSetupHook
+        {
+          name = "qmake6-hook";
+          propagatedBuildInputs = [ qtbase.dev ];
+          substitutions = {
+            inherit debug;
+            fix_qmake_libtool = ./hooks/fix-qmake-libtool.sh;
+          };
+        } ./hooks/qmake-hook.sh) { };
+    } // lib.optionalAttrs config.allowAliases {
+      # Convert to a throw on 03-01-2023 and backport the change.
+      # Warnings show up in various cli tool outputs, throws do not.
+      # Remove completely before 24.05
+      overrideScope' = lib.warnIf (lib.isInOldestRelease 2311) "qt6 now uses makeScopeWithSplicing which does not have \"overrideScope'\", use \"overrideScope\"." self.overrideScope;
+    };
+
+  baseScope = makeScopeWithSplicing' {
+    otherSplices = generateSplicesForMkScope "qt6";
+    f = addPackages;
+  };
+
+  bootstrapScope = baseScope.overrideScope(final: prev: {
+    qtbase = prev.qtbase.override { qttranslations = null; };
+    qtdeclarative = null;
+  });
+
+  finalScope = baseScope.overrideScope(final: prev: {
+    qttranslations = bootstrapScope.qttranslations;
+  });
+in finalScope
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/fetch.sh b/nixpkgs/pkgs/development/libraries/qt-6/fetch.sh
new file mode 100644
index 000000000000..d7ef146a1957
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/fetch.sh
@@ -0,0 +1 @@
+WGET_ARGS=( https://download.qt.io/official_releases/qt/6.6/6.6.2/submodules/ -A '*.tar.xz' )
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/hooks/fix-qmake-libtool.sh b/nixpkgs/pkgs/development/libraries/qt-6/hooks/fix-qmake-libtool.sh
new file mode 100644
index 000000000000..44bf10a0db06
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/hooks/fix-qmake-libtool.sh
@@ -0,0 +1,25 @@
+# Fix libtool libraries generated by qmake.
+# qmake started inserting filenames of shared objects instead of the appropriate
+# linker flags. fixQmakeLibtool searches for broken libtool libraries and
+# replaces the filenames with the linker flags that should have been there.
+fixQmakeLibtool() {
+    if [ -d "$1" ]; then
+        find "$1" -name '*.la' | while read la; do
+            set +e
+            framework_libs=$(grep '^dependency_libs' "$la" | grep -Eo -- '-framework +\w+' | tr '\n' ' ')
+            set -e
+            sed -i "$la" \
+                -e '/^dependency_libs/ s,\(/[^ ]\+\)/lib\([^/ ]\+\)\.so,-L\1 -l\2,g' \
+                -e '/^dependency_libs/ s,-framework \+\w\+,,g'
+            if [ ! -z "$framework_libs" ]; then
+                if grep '^inherited_linker_flags=' $la >/dev/null; then
+                    sed -i "$la" -e "s/^\(inherited_linker_flags='[^']*\)/\1 $framework_libs/"
+                else
+                    echo "inherited_linker_flags='$framework_libs'" >>"$la"
+                fi
+            fi
+        done
+    fi
+}
+
+fixupOutputHooks+=('fixQmakeLibtool $prefix')
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/hooks/fix-qt-builtin-paths.sh b/nixpkgs/pkgs/development/libraries/qt-6/hooks/fix-qt-builtin-paths.sh
new file mode 100644
index 000000000000..d6f8ab32f799
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/hooks/fix-qt-builtin-paths.sh
@@ -0,0 +1,63 @@
+# fixQtBuiltinPaths
+#
+# Usage: fixQtBuiltinPaths _dir_ _pattern_
+#
+# Fix Qt builtin paths in files matching _pattern_ under _dir_.
+#
+fixQtBuiltinPaths() {
+    local dir="$1"
+    local pattern="$2"
+    local lib="${!outputLib}"
+
+    if [ -d "$dir" ]; then
+        find "$dir" -name "$pattern" | while read pr_; do
+            if grep -q '\$\$\[QT_' "${pr_:?}"; then
+                echo "fixQtBuiltinPaths: Fixing Qt builtin paths in \`${pr_:?}'..."
+                sed -i "${pr_:?}" \
+                    -e "s|\\\$\\\$\\[QT_HOST_BINS[^]]*\\]|$lib/bin|g" \
+                    -e "s|\\\$\\\$\\[QT_HOST_LIBEXECS[^]]*\\]|$lib/libexec|g" \
+                    -e "s|\\\$\\\$\\[QT_HOST_DATA[^]]*\\]/mkspecs|$lib/mkspecs|g" \
+                    -e "s|\\\$\\\$\\[QT_HOST_PREFIX[^]]*\\]|$lib|g" \
+                    -e "s|\\\$\\\$\\[QT_INSTALL_ARCHDATA[^]]*\\]|$lib|g" \
+                    -e "s|\\\$\\\$\\[QT_INSTALL_BINS[^]]*\\]|$lib/bin|g" \
+                    -e "s|\\\$\\\$\\[QT_INSTALL_CONFIGURATION[^]]*\\]|$lib|g" \
+                    -e "s|\\\$\\\$\\[QT_INSTALL_DATA[^]]*\\]|$lib|g" \
+                    -e "s|\\\$\\\$\\[QT_INSTALL_DOCS[^]]*\\]|$lib/share/doc|g" \
+                    -e "s|\\\$\\\$\\[QT_INSTALL_EXAMPLES[^]]*\\]|$lib/examples|g" \
+                    -e "s|\\\$\\\$\\[QT_INSTALL_HEADERS[^]]*\\]|$lib/include|g" \
+                    -e "s|\\\$\\\$\\[QT_INSTALL_LIBS[^]]*\\]|$lib/lib|g" \
+                    -e "s|\\\$\\\$\\[QT_INSTALL_LIBEXECS[^]]*\\]|$lib/libexec|g" \
+                    -e "s|\\\$\\\$\\[QT_INSTALL_PLUGINS[^]]*\\]|$lib/$qtPluginPrefix|g" \
+                    -e "s|\\\$\\\$\\[QT_INSTALL_PREFIX[^]]*\\]|$lib|g" \
+                    -e "s|\\\$\\\$\\[QT_INSTALL_TESTS[^]]*\\]|$lib/tests|g" \
+                    -e "s|\\\$\\\$\\[QT_INSTALL_TRANSLATIONS[^]]*\\]|$lib/translations|g" \
+                    -e "s|\\\$\\\$\\[QT_INSTALL_QML[^]]*\\]|$lib/$qtQmlPrefix|g"
+            fi
+        done
+    elif [ -e "$dir" ]; then
+        if grep -q '\$\$\[QT_' "${dir:?}"; then
+            echo "fixQtBuiltinPaths: Fixing Qt builtin paths in \`${dir:?}'..."
+            sed -i "${dir:?}" \
+                -e "s|\\\$\\\$\\[QT_HOST_BINS[^]]*\\]|$lib/bin|g" \
+                -e "s|\\\$\\\$\\[QT_HOST_LIBEXECS[^]]*\\]|$lib/libexec|g" \
+                -e "s|\\\$\\\$\\[QT_HOST_DATA[^]]*\\]/mkspecs|$lib/mkspecs|g" \
+                -e "s|\\\$\\\$\\[QT_HOST_PREFIX[^]]*\\]|$lib|g" \
+                -e "s|\\\$\\\$\\[QT_INSTALL_ARCHDATA[^]]*\\]|$lib|g" \
+                -e "s|\\\$\\\$\\[QT_INSTALL_BINS[^]]*\\]|$lib/bin|g" \
+                -e "s|\\\$\\\$\\[QT_INSTALL_CONFIGURATION[^]]*\\]|$lib|g" \
+                -e "s|\\\$\\\$\\[QT_INSTALL_DATA[^]]*\\]|$lib|g" \
+                -e "s|\\\$\\\$\\[QT_INSTALL_DOCS[^]]*\\]|$lib/share/doc|g" \
+                -e "s|\\\$\\\$\\[QT_INSTALL_EXAMPLES[^]]*\\]|$lib/examples|g" \
+                -e "s|\\\$\\\$\\[QT_INSTALL_HEADERS[^]]*\\]|$lib/include|g" \
+                -e "s|\\\$\\\$\\[QT_INSTALL_LIBS[^]]*\\]|$lib/lib|g" \
+                -e "s|\\\$\\\$\\[QT_INSTALL_LIBEXECS[^]]*\\]|$lib/libexec|g" \
+                -e "s|\\\$\\\$\\[QT_INSTALL_PLUGINS[^]]*\\]|$lib/$qtPluginPrefix|g" \
+                -e "s|\\\$\\\$\\[QT_INSTALL_PREFIX[^]]*\\]|$lib|g" \
+                -e "s|\\\$\\\$\\[QT_INSTALL_TESTS[^]]*\\]|$lib/tests|g" \
+                -e "s|\\\$\\\$\\[QT_INSTALL_TRANSLATIONS[^]]*\\]|$lib/translations|g" \
+                -e "s|\\\$\\\$\\[QT_INSTALL_QML[^]]*\\]|$lib/$qtQmlPrefix|g"
+        fi
+    else
+        echo "fixQtBuiltinPaths: Warning: \`$dir' does not exist"
+    fi
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/hooks/fix-qt-module-paths.sh b/nixpkgs/pkgs/development/libraries/qt-6/hooks/fix-qt-module-paths.sh
new file mode 100644
index 000000000000..4884f45b9930
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/hooks/fix-qt-module-paths.sh
@@ -0,0 +1,27 @@
+# fixQtModulePaths
+#
+# Usage: fixQtModulePaths _dir_
+#
+# Find Qt module definitions in directory _dir_ and patch the module paths.
+#
+fixQtModulePaths() {
+    local dir="$1"
+    local lib="${!outputLib}"
+
+    if [ -d "$dir" ]; then
+        find "$dir" -name 'qt_*.pri' | while read pr; do
+            if grep -q '\$\$QT_MODULE_' "${pr:?}"; then
+                echo "fixQtModulePaths: Fixing module paths in \`${pr:?}'..."
+                sed -i "${pr:?}" \
+                    -e "s|\\\$\\\$QT_MODULE_LIB_BASE|$lib/lib|g" \
+                    -e "s|\\\$\\\$QT_MODULE_HOST_LIB_BASE|$lib/lib|g" \
+                    -e "s|\\\$\\\$QT_MODULE_INCLUDE_BASE|$lib/include|g" \
+                    -e "s|\\\$\\\$QT_MODULE_BIN_BASE|$lib/bin|g"
+            fi
+        done
+    elif [ -e "$dir" ]; then
+        echo "fixQtModulePaths: Warning: \`$dir' is not a directory"
+    else
+        echo "fixQtModulePaths: Warning: \`$dir' does not exist"
+    fi
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/hooks/qmake-hook.sh b/nixpkgs/pkgs/development/libraries/qt-6/hooks/qmake-hook.sh
new file mode 100644
index 000000000000..8c4ce096443f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/hooks/qmake-hook.sh
@@ -0,0 +1,53 @@
+. @fix_qmake_libtool@
+
+qmakeFlags=(${qmakeFlags-})
+
+qmakePrePhase() {
+    qmakeFlags_orig=("${qmakeFlags[@]}")
+
+    # These flags must be added _before_ the flags specified in the derivation.
+    # TODO: these flags also need a patch which isn't applied
+    # can we either remove these flags or update the qt5 patch?
+    # "NIX_OUTPUT_DOC=${!outputDev}/${qtDocPrefix:?}" \
+    qmakeFlags=(
+        "PREFIX=$out"
+        "NIX_OUTPUT_OUT=$out"
+        "NIX_OUTPUT_DEV=${!outputDev}"
+        "NIX_OUTPUT_BIN=${!outputBin}"
+        "NIX_OUTPUT_QML=${!outputBin}/${qtQmlPrefix:?}"
+        "NIX_OUTPUT_PLUGIN=${!outputBin}/${qtPluginPrefix:?}"
+    )
+
+    if [ -n "@debug@" ]; then
+        qmakeFlags+=("CONFIG+=debug")
+    else
+        qmakeFlags+=("CONFIG+=release")
+    fi
+
+    qmakeFlags+=("${qmakeFlags_orig[@]}")
+}
+prePhases+=" qmakePrePhase"
+
+qmakeConfigurePhase() {
+    runHook preConfigure
+
+    echo "QMAKEPATH=$QMAKEPATH"
+    echo qmake "${qmakeFlags[@]}"
+    qmake "${qmakeFlags[@]}"
+
+    if ! [[ -v enableParallelBuilding ]]; then
+        enableParallelBuilding=1
+        echo "qmake: enabled parallel building"
+    fi
+
+    if ! [[ -v enableParallelInstalling ]]; then
+        enableParallelInstalling=1
+        echo "qmake: enabled parallel installing"
+    fi
+
+    runHook postConfigure
+}
+
+if [ -z "${dontUseQmakeConfigure-}" -a -z "${configurePhase-}" ]; then
+    configurePhase=qmakeConfigurePhase
+fi
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh b/nixpkgs/pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh
new file mode 100644
index 000000000000..9bc68e6cd3d6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh
@@ -0,0 +1,105 @@
+if [[ -n "${__nix_qtbase-}" ]]; then
+    # Throw an error if a different version of Qt was already set up.
+    if [[ "$__nix_qtbase" != "@out@" ]]; then
+        echo >&2 "Error: detected mismatched Qt dependencies:"
+        echo >&2 "    @out@"
+        echo >&2 "    $__nix_qtbase"
+        exit 1
+    fi
+else # Only set up Qt once.
+    __nix_qtbase="@out@"
+
+    qtPluginPrefix=@qtPluginPrefix@
+    qtQmlPrefix=@qtQmlPrefix@
+
+    . @fix_qt_builtin_paths@
+    . @fix_qt_module_paths@
+
+    # Disable debug symbols if qtbase was built without debugging.
+    # This stops -dev paths from leaking into other outputs.
+    if [ -z "@debug@" ]; then
+        NIX_CFLAGS_COMPILE="${NIX_CFLAGS_COMPILE-}${NIX_CFLAGS_COMPILE:+ }-DQT_NO_DEBUG"
+    fi
+
+    # Integration with CMake:
+    # Set the CMake build type corresponding to how qtbase was built.
+    if [ -n "@debug@" ]; then
+        cmakeBuildType="Debug"
+    else
+        cmakeBuildType="Release"
+    fi
+
+    # Build tools are often confused if QMAKE is unset.
+    export QMAKE=@out@/bin/qmake
+
+    export QMAKEPATH=
+
+    export QMAKEMODULES=
+
+    declare -Ag qmakePathSeen=()
+    qmakePathHook() {
+        # Skip this path if we have seen it before.
+        # MUST use 'if' because 'qmakePathSeen[$]' may be unset.
+        if [ -n "${qmakePathSeen[$1]-}" ]; then return; fi
+        qmakePathSeen[$1]=1
+        if [ -d "$1/mkspecs" ]; then
+            QMAKEMODULES="${QMAKEMODULES}${QMAKEMODULES:+:}/mkspecs"
+            QMAKEPATH="${QMAKEPATH}${QMAKEPATH:+:}$1"
+        fi
+    }
+    envBuildHostHooks+=(qmakePathHook)
+
+    export QTTOOLSPATH=
+
+    declare -Ag qttoolsPathSeen=()
+    qtToolsHook() {
+        # Skip this path if we have seen it before.
+        # MUST use 'if' because 'qttoolsPathSeen[$]' may be unset.
+        if [ -n "${qttoolsPathSeen[$1]-}" ]; then return; fi
+        qttoolsPathSeen[$1]=1
+        if [ -d "$1/libexec" ]; then
+            QTTOOLSPATH="${QTTOOLSPATH}${QTTOOLSPATH:+:}$1/libexec"
+        fi
+    }
+    addEnvHooks "$hostOffset" qtToolsHook
+
+    postPatchMkspecs() {
+        # Prevent this hook from running multiple times
+        dontPatchMkspecs=1
+
+        local lib="${!outputLib}"
+        local dev="${!outputDev}"
+
+        moveToOutput "mkspecs/modules" "$dev"
+
+        if [ -d "$dev/mkspecs/modules" ]; then
+            fixQtModulePaths "$dev/mkspecs/modules"
+        fi
+
+        if [ -d "$lib/mkspecs" ]; then
+            fixQtBuiltinPaths "$lib/mkspecs" '*.pr?'
+        fi
+
+        if [ -d "$lib/lib" ]; then
+            fixQtBuiltinPaths "$lib/lib" '*.pr?'
+        fi
+    }
+    if [ -z "${dontPatchMkspecs-}" ]; then
+        postPhases="${postPhases-}${postPhases:+ }postPatchMkspecs"
+    fi
+
+    qtPreHook() {
+        # Check that wrapQtAppsHook is used, or it is explicitly disabled.
+        if [[ -z "$__nix_wrapQtAppsHook" && -z "$dontWrapQtApps" ]]; then
+            echo >&2 "Error: wrapQtAppsHook is not used, and dontWrapQtApps is not set."
+            exit 1
+        fi
+    }
+    prePhases+=" qtPreHook"
+
+    addQtModulePrefix() {
+        addToSearchPath QT_ADDITIONAL_PACKAGES_PREFIX_PATH $1
+    }
+    addEnvHooks "$hostOffset" addQtModulePrefix
+
+fi
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/hooks/wrap-qt-apps-hook.sh b/nixpkgs/pkgs/development/libraries/qt-6/hooks/wrap-qt-apps-hook.sh
new file mode 100644
index 000000000000..2d858055693c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/hooks/wrap-qt-apps-hook.sh
@@ -0,0 +1,99 @@
+if [[ -z "${__nix_wrapQtAppsHook-}" ]]; then
+    __nix_wrapQtAppsHook=1 # Don't run this hook more than once.
+
+    # Inherit arguments given in mkDerivation
+    qtWrapperArgs=(${qtWrapperArgs-})
+
+    qtHostPathSeen=()
+
+    qtUnseenHostPath() {
+        for pkg in "${qtHostPathSeen[@]}"; do
+            if [ "${pkg:?}" == "$1" ]; then
+                return 1
+            fi
+        done
+
+        qtHostPathSeen+=("$1")
+        return 0
+    }
+
+    qtHostPathHook() {
+        qtUnseenHostPath "$1" || return 0
+
+        if ! [ -v qtPluginPrefix ]; then
+            echo "wrapQtAppsHook qtHostPathHook: qtPluginPrefix is unset. hint: add qt6.qtbase to buildInputs"
+        fi
+
+        local pluginDir="$1/${qtPluginPrefix:?}"
+        if [ -d "$pluginDir" ]; then
+            qtWrapperArgs+=(--prefix QT_PLUGIN_PATH : "$pluginDir")
+        fi
+
+        local qmlDir="$1/${qtQmlPrefix:?}"
+        if [ -d "$qmlDir" ]; then
+            qtWrapperArgs+=(--prefix NIXPKGS_QT6_QML_IMPORT_PATH : "$qmlDir")
+        fi
+    }
+    addEnvHooks "$targetOffset" qtHostPathHook
+
+    makeQtWrapper() {
+        local original="$1"
+        local wrapper="$2"
+        shift 2
+        makeWrapper "$original" "$wrapper" "${qtWrapperArgs[@]}" "$@"
+    }
+
+    wrapQtApp() {
+        local program="$1"
+        shift 1
+        wrapProgram "$program" "${qtWrapperArgs[@]}" "$@"
+    }
+
+    qtOwnPathsHook() {
+        local xdgDataDir="${!outputBin}/share"
+        if [ -d "$xdgDataDir" ]; then
+            qtWrapperArgs+=(--prefix XDG_DATA_DIRS : "$xdgDataDir")
+        fi
+
+        local xdgConfigDir="${!outputBin}/etc/xdg"
+        if [ -d "$xdgConfigDir" ]; then
+            qtWrapperArgs+=(--prefix XDG_CONFIG_DIRS : "$xdgConfigDir")
+        fi
+
+        qtHostPathHook "${!outputBin}"
+    }
+
+    preFixupPhases+=" qtOwnPathsHook"
+
+    # Note: $qtWrapperArgs still gets defined even if ${dontWrapQtApps-} is set.
+    wrapQtAppsHook() {
+        # skip this hook when requested
+        [ -z "${dontWrapQtApps-}" ] || return 0
+
+        # guard against running multiple times (e.g. due to propagation)
+        [ -z "$wrapQtAppsHookHasRun" ] || return 0
+        wrapQtAppsHookHasRun=1
+
+        local targetDirs=("$prefix/bin" "$prefix/sbin" "$prefix/libexec" "$prefix/Applications" "$prefix/"*.app)
+        echo "wrapping Qt applications in ${targetDirs[@]}"
+
+        for targetDir in "${targetDirs[@]}"; do
+            [ -d "$targetDir" ] || continue
+
+            find "$targetDir" ! -type d -executable -print0 | while IFS= read -r -d '' file; do
+                if [ -f "$file" ]; then
+                    echo "wrapping $file"
+                    wrapQtApp "$file"
+                elif [ -h "$file" ]; then
+                    target="$(readlink -e "$file")"
+                    echo "wrapping $file -> $target"
+                    rm "$file"
+                    makeQtWrapper "$target" "$file"
+                fi
+            done
+        done
+    }
+
+    fixupOutputHooks+=(wrapQtAppsHook)
+
+fi
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qt3d.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qt3d.nix
new file mode 100644
index 000000000000..f1df7f6fc254
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qt3d.nix
@@ -0,0 +1,11 @@
+{ qtModule
+, qtbase
+, qtdeclarative
+, qtmultimedia
+, assimp
+}:
+
+qtModule {
+  pname = "qt3d";
+  propagatedBuildInputs = [ qtbase qtdeclarative qtmultimedia assimp ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qt5compat.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qt5compat.nix
new file mode 100644
index 000000000000..d2049d7fc3e5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qt5compat.nix
@@ -0,0 +1,13 @@
+{ qtModule
+, qtbase
+, qtdeclarative
+, libiconv
+, icu
+, openssl
+}:
+
+qtModule {
+  pname = "qt5compat";
+  propagatedBuildInputs = [ qtbase qtdeclarative ];
+  buildInputs = [ libiconv icu openssl ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtbase.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtbase.nix
new file mode 100644
index 000000000000..4b541ca6fec2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtbase.nix
@@ -0,0 +1,265 @@
+{ stdenv
+, lib
+, src
+, patches ? [ ]
+, version
+, coreutils
+, bison
+, flex
+, gdb
+, gperf
+, lndir
+, perl
+, pkg-config
+, which
+, cmake
+, ninja
+, xmlstarlet
+, libproxy
+, xorg
+, zstd
+, double-conversion
+, util-linux
+, systemd
+, systemdSupport ? stdenv.isLinux
+, libb2
+, md4c
+, mtdev
+, lksctp-tools
+, libselinux
+, libsepol
+, vulkan-headers
+, vulkan-loader
+, libthai
+, libdrm
+, libdatrie
+, lttng-ust
+, libepoxy
+, libiconv
+, dbus
+, fontconfig
+, freetype
+, glib
+, harfbuzz
+, icu
+, libX11
+, libXcomposite
+, libXext
+, libXi
+, libXrender
+, libinput
+, libjpeg
+, libpng
+, libxcb
+, libxkbcommon
+, libxml2
+, libxslt
+, openssl
+, pcre
+, pcre2
+, sqlite
+, udev
+, xcbutil
+, xcbutilimage
+, xcbutilkeysyms
+, xcbutilrenderutil
+, xcbutilwm
+, zlib
+, at-spi2-core
+, unixODBC
+, unixODBCDrivers
+  # darwin
+, moveBuildTree
+, xcbuild
+, AGL
+, AVFoundation
+, AppKit
+, Contacts
+, CoreBluetooth
+, EventKit
+, GSS
+, MetalKit
+  # optional dependencies
+, cups
+, libmysqlclient
+, postgresql
+, withGtk3 ? false
+, dconf
+, gtk3
+  # options
+, libGLSupported ? stdenv.isLinux
+, libGL
+, debug ? false
+, developerBuild ? false
+, qttranslations ? null
+}:
+
+let
+  debugSymbols = debug || developerBuild;
+in
+stdenv.mkDerivation rec {
+  pname = "qtbase";
+
+  inherit src version;
+
+  debug = debugSymbols;
+
+  propagatedBuildInputs = [
+    libxml2
+    libxslt
+    openssl
+    sqlite
+    zlib
+    unixODBC
+    # Text rendering
+    harfbuzz
+    icu
+    # Image formats
+    libjpeg
+    libpng
+    pcre2
+    pcre
+    libproxy
+    zstd
+    double-conversion
+    libb2
+    md4c
+    dbus
+    glib
+    # unixODBC drivers
+    unixODBCDrivers.psql
+    unixODBCDrivers.sqlite
+    unixODBCDrivers.mariadb
+  ] ++ lib.optionals systemdSupport [
+    systemd
+  ] ++ lib.optionals stdenv.isLinux [
+    util-linux
+    mtdev
+    lksctp-tools
+    libselinux
+    libsepol
+    lttng-ust
+    vulkan-headers
+    vulkan-loader
+    libthai
+    libdrm
+    libdatrie
+    udev
+    # Text rendering
+    fontconfig
+    freetype
+    # X11 libs
+    libX11
+    libXcomposite
+    libXext
+    libXi
+    libXrender
+    libxcb
+    libxkbcommon
+    xcbutil
+    xcbutilimage
+    xcbutilkeysyms
+    xcbutilrenderutil
+    xcbutilwm
+    xorg.libXdmcp
+    xorg.libXtst
+    xorg.xcbutilcursor
+    libepoxy
+  ] ++ lib.optionals stdenv.isDarwin [
+    AGL
+    AVFoundation
+    AppKit
+    Contacts
+    CoreBluetooth
+    EventKit
+    GSS
+    MetalKit
+  ] ++ lib.optional libGLSupported libGL;
+
+  buildInputs = [
+    at-spi2-core
+  ] ++ lib.optionals (!stdenv.isDarwin) [
+    libinput
+  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
+    AppKit
+    CoreBluetooth
+  ]
+  ++ lib.optional withGtk3 gtk3
+  ++ lib.optional developerBuild gdb
+  ++ lib.optional (cups != null) cups
+  ++ lib.optional (libmysqlclient != null) libmysqlclient
+  ++ lib.optional (postgresql != null) postgresql;
+
+  nativeBuildInputs = [ bison flex gperf lndir perl pkg-config which cmake xmlstarlet ninja ]
+    ++ lib.optionals stdenv.isDarwin [ moveBuildTree ];
+
+  propagatedNativeBuildInputs = [ lndir ];
+
+  strictDeps = true;
+
+  enableParallelBuilding = true;
+
+  inherit patches;
+
+  # https://bugreports.qt.io/browse/QTBUG-97568
+  postPatch = ''
+    substituteInPlace src/corelib/CMakeLists.txt --replace-fail "/bin/ls" "${coreutils}/bin/ls"
+  '' + lib.optionalString stdenv.isDarwin ''
+    substituteInPlace cmake/QtPublicAppleHelpers.cmake --replace-fail "/usr/bin/xcrun" "${xcbuild}/bin/xcrun"
+  '';
+
+  fix_qt_builtin_paths = ../hooks/fix-qt-builtin-paths.sh;
+  fix_qt_module_paths = ../hooks/fix-qt-module-paths.sh;
+  preHook = ''
+    . "$fix_qt_builtin_paths"
+    . "$fix_qt_module_paths"
+  '';
+
+  qtPluginPrefix = "lib/qt-6/plugins";
+  qtQmlPrefix = "lib/qt-6/qml";
+
+  cmakeFlags = [
+    "-DQT_EMBED_TOOLCHAIN_COMPILER=OFF"
+    "-DINSTALL_PLUGINSDIR=${qtPluginPrefix}"
+    "-DINSTALL_QMLDIR=${qtQmlPrefix}"
+    "-DQT_FEATURE_libproxy=ON"
+    "-DQT_FEATURE_system_sqlite=ON"
+    "-DQT_FEATURE_openssl_linked=ON"
+  ] ++ lib.optionals (!stdenv.isDarwin) [
+    "-DQT_FEATURE_sctp=ON"
+    "-DQT_FEATURE_journald=${if systemdSupport then "ON" else "OFF"}"
+    "-DQT_FEATURE_vulkan=ON"
+  ] ++ lib.optionals stdenv.isDarwin [
+    # error: 'path' is unavailable: introduced in macOS 10.15
+    "-DQT_FEATURE_cxx17_filesystem=OFF"
+  ] ++ lib.optional (qttranslations != null) "-DINSTALL_TRANSLATIONSDIR=${qttranslations}/translations";
+
+  env.NIX_LDFLAGS = toString (lib.optionals stdenv.isDarwin [
+    # Undefined symbols for architecture arm64: "___gss_c_nt_hostbased_service_oid_desc"
+    "-framework GSS"
+  ]);
+
+  env.NIX_CFLAGS_COMPILE = "-DNIXPKGS_QT_PLUGIN_PREFIX=\"${qtPluginPrefix}\"";
+
+  outputs = [ "out" "dev" ];
+
+  moveToDev = false;
+
+  postFixup = ''
+    moveToOutput      "mkspecs/modules" "$dev"
+    fixQtModulePaths  "$dev/mkspecs/modules"
+    fixQtBuiltinPaths "$out" '*.pr?'
+  '';
+
+  dontStrip = debugSymbols;
+
+  setupHook = ../hooks/qtbase-setup-hook.sh;
+
+  meta = with lib; {
+    homepage = "https://www.qt.io/";
+    description = "A cross-platform application framework for C++";
+    license = with licenses; [ fdl13Plus gpl2Plus lgpl21Plus lgpl3Plus ];
+    maintainers = with maintainers; [ milahu nickcao LunNova ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtcharts.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtcharts.nix
new file mode 100644
index 000000000000..e9b6c8d6b33f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtcharts.nix
@@ -0,0 +1,9 @@
+{ qtModule
+, qtbase
+, qtdeclarative
+}:
+
+qtModule {
+  pname = "qtcharts";
+  propagatedBuildInputs = [ qtbase qtdeclarative ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtconnectivity.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtconnectivity.nix
new file mode 100644
index 000000000000..46d8f925beb0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtconnectivity.nix
@@ -0,0 +1,23 @@
+{ qtModule
+, lib
+, stdenv
+, qtbase
+, qtdeclarative
+, bluez
+, pkg-config
+, IOBluetooth
+, PCSC
+}:
+
+qtModule {
+  pname = "qtconnectivity";
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = lib.optionals stdenv.isLinux [ bluez ];
+  propagatedBuildInputs = [
+    qtbase
+    qtdeclarative
+  ] ++ lib.optionals stdenv.isDarwin [
+    IOBluetooth
+    PCSC
+  ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtdatavis3d.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtdatavis3d.nix
new file mode 100644
index 000000000000..e6c12508c9d0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtdatavis3d.nix
@@ -0,0 +1,9 @@
+{ qtModule
+, qtbase
+, qtdeclarative
+}:
+
+qtModule {
+  pname = "qtdatavis3d";
+  propagatedBuildInputs = [ qtbase qtdeclarative ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix
new file mode 100644
index 000000000000..697556e30edc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix
@@ -0,0 +1,18 @@
+{ qtModule
+, qtbase
+, qtlanguageserver
+, qtshadertools
+, openssl
+, python3
+}:
+
+qtModule {
+  pname = "qtdeclarative";
+  propagatedBuildInputs = [ qtbase qtlanguageserver qtshadertools openssl python3 ];
+  patches = [
+    # prevent headaches from stale qmlcache data
+    ../patches/qtdeclarative-default-disable-qmlcache.patch
+    # add version specific QML import path
+    ../patches/qtdeclarative-qml-paths.patch
+  ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtdoc.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtdoc.nix
new file mode 100644
index 000000000000..555108caa01a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtdoc.nix
@@ -0,0 +1,26 @@
+{ qtModule
+, qtdeclarative
+, qtbase
+, qttools
+}:
+
+qtModule {
+  pname = "qtdoc";
+  # avoid fix-qt-builtin-paths hook substitute QT_INSTALL_DOCS to qtdoc's path
+  postPatch = ''
+    for file in $(grep -rl '$QT_INSTALL_DOCS'); do
+      substituteInPlace $file \
+          --replace '$QT_INSTALL_DOCS' "${qtbase}/share/doc"
+    done
+  '';
+  nativeBuildInputs = [ (qttools.override { withClang = true; }) ];
+  propagatedBuildInputs = [ qtdeclarative ];
+  cmakeFlags = [
+    "-DCMAKE_MESSAGE_LOG_LEVEL=STATUS"
+  ];
+  dontUseNinjaBuild = true;
+  buildFlags = [ "docs" ];
+  dontUseNinjaInstall = true;
+  installFlags = [ "install_docs" ];
+  outputs = [ "out" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtgraphs.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtgraphs.nix
new file mode 100644
index 000000000000..5cafb8d8d7fd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtgraphs.nix
@@ -0,0 +1,16 @@
+{ qtModule
+, qtbase
+, qtdeclarative
+, qtquick3d
+, qtquicktimeline
+}:
+
+qtModule {
+  pname = "qtgraphs";
+  propagatedBuildInputs = [
+    qtbase
+    qtdeclarative
+    qtquick3d
+    qtquicktimeline
+  ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtgrpc.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtgrpc.nix
new file mode 100644
index 000000000000..09ff7ee89196
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtgrpc.nix
@@ -0,0 +1,12 @@
+{ qtModule
+, qtbase
+, qtdeclarative
+, protobuf
+, grpc
+}:
+
+qtModule {
+  pname = "qtgrpc";
+  propagatedBuildInputs = [ qtbase qtdeclarative ];
+  buildInputs = [ protobuf grpc ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qthttpserver.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qthttpserver.nix
new file mode 100644
index 000000000000..cf32c8a7ea76
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qthttpserver.nix
@@ -0,0 +1,9 @@
+{ qtModule
+, qtbase
+, qtwebsockets
+}:
+
+qtModule {
+  pname = "qthttpserver";
+  propagatedBuildInputs = [ qtbase qtwebsockets ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtimageformats.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtimageformats.nix
new file mode 100644
index 000000000000..50420aaa7e45
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtimageformats.nix
@@ -0,0 +1,13 @@
+{ qtModule
+, qtbase
+, libwebp
+, jasper
+, libmng
+, libtiff
+}:
+
+qtModule {
+  pname = "qtimageformats";
+  propagatedBuildInputs = [ qtbase ];
+  buildInputs = [ libwebp jasper libmng libtiff ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtlanguageserver.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtlanguageserver.nix
new file mode 100644
index 000000000000..b45ab11fc3ff
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtlanguageserver.nix
@@ -0,0 +1,11 @@
+{ qtModule
+, qtbase
+}:
+
+qtModule {
+  pname = "qtlanguageserver";
+  propagatedBuildInputs = [ qtbase ];
+
+  # Doesn't have version set
+  dontCheckQtModuleVersion = true;
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtlocation.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtlocation.nix
new file mode 100644
index 000000000000..12fa89b9aaea
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtlocation.nix
@@ -0,0 +1,10 @@
+{ qtModule
+, qtbase
+, qtdeclarative
+, qtpositioning
+}:
+
+qtModule {
+  pname = "qtlocation";
+  propagatedBuildInputs = [ qtbase qtdeclarative qtpositioning ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtlottie.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtlottie.nix
new file mode 100644
index 000000000000..4231fcb26b1c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtlottie.nix
@@ -0,0 +1,9 @@
+{ qtModule
+, qtbase
+, qtdeclarative
+}:
+
+qtModule {
+  pname = "qtlottie";
+  propagatedBuildInputs = [ qtbase qtdeclarative ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtmqtt.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtmqtt.nix
new file mode 100644
index 000000000000..a9660b73710b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtmqtt.nix
@@ -0,0 +1,18 @@
+{ qtModule
+, fetchFromGitHub
+, qtbase
+}:
+
+qtModule rec {
+  pname = "qtmqtt";
+  version = "6.6.2";
+
+  src = fetchFromGitHub {
+    owner = "qt";
+    repo = "qtmqtt";
+    rev = "v${version}";
+    hash = "sha256-R8B7Vt/XzI7+17DDZ+TVbqfGKdEfUMiLa1BqzIbo4OM=";
+  };
+
+  propagatedBuildInputs = [ qtbase ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtmultimedia.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtmultimedia.nix
new file mode 100644
index 000000000000..f77fdac059ce
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtmultimedia.nix
@@ -0,0 +1,42 @@
+{ qtModule
+, lib
+, stdenv
+, qtbase
+, qtdeclarative
+, qtquick3d
+, qtshadertools
+, qtsvg
+, pkg-config
+, alsa-lib
+, gstreamer
+, gst-plugins-base
+, gst-plugins-good
+, gst-libav
+, gst-vaapi
+, ffmpeg_6
+, libva
+, libpulseaudio
+, wayland
+, libXrandr
+, elfutils
+, libunwind
+, orc
+, VideoToolbox
+}:
+
+qtModule {
+  pname = "qtmultimedia";
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libunwind orc ffmpeg_6 ]
+    ++ lib.optionals stdenv.isLinux [ libpulseaudio elfutils alsa-lib wayland libXrandr libva ];
+  propagatedBuildInputs = [ qtbase qtdeclarative qtsvg qtshadertools qtquick3d ]
+    ++ lib.optionals stdenv.isLinux [ gstreamer gst-plugins-base gst-plugins-good gst-libav gst-vaapi ]
+    ++ lib.optionals stdenv.isDarwin [ VideoToolbox ];
+
+  cmakeFlags = [ "-DENABLE_DYNAMIC_RESOLVE_VAAPI_SYMBOLS=0" ];
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin
+    "-include AudioToolbox/AudioToolbox.h";
+  NIX_LDFLAGS = lib.optionalString stdenv.isDarwin
+    "-framework AudioToolbox";
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtnetworkauth.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtnetworkauth.nix
new file mode 100644
index 000000000000..bec5f354a23a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtnetworkauth.nix
@@ -0,0 +1,6 @@
+{ qtModule, qtbase }:
+
+qtModule {
+  pname = "qtnetworkauth";
+  propagatedBuildInputs = [ qtbase ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtpositioning.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtpositioning.nix
new file mode 100644
index 000000000000..20f059976323
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtpositioning.nix
@@ -0,0 +1,14 @@
+{ qtModule
+, qtbase
+, qtdeclarative
+, qtserialport
+, pkg-config
+, openssl
+}:
+
+qtModule {
+  pname = "qtpositioning";
+  propagatedBuildInputs = [ qtbase qtdeclarative qtserialport ];
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ openssl ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtquick3d.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtquick3d.nix
new file mode 100644
index 000000000000..1c84856c0c12
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtquick3d.nix
@@ -0,0 +1,11 @@
+{ qtModule
+, qtbase
+, qtdeclarative
+, openssl
+}:
+
+qtModule {
+  pname = "qtquick3d";
+  propagatedBuildInputs = [ qtbase qtdeclarative ];
+  buildInputs = [ openssl ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtquick3dphysics.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtquick3dphysics.nix
new file mode 100644
index 000000000000..05d121cd9b78
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtquick3dphysics.nix
@@ -0,0 +1,13 @@
+{ qtModule
+, lib
+, stdenv
+, qtbase
+, qtquick3d
+}:
+
+qtModule {
+  pname = "qtquick3dphysics";
+  propagatedBuildInputs = [ qtbase qtquick3d ];
+  env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isx86_64)
+    "-faligned-allocation";
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtquickeffectmaker.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtquickeffectmaker.nix
new file mode 100644
index 000000000000..213814a017e2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtquickeffectmaker.nix
@@ -0,0 +1,9 @@
+{ qtModule
+, qtbase
+, qtquick3d
+}:
+
+qtModule {
+  pname = "qtquickeffectmaker";
+  propagatedBuildInputs = [ qtbase qtquick3d ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtquicktimeline.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtquicktimeline.nix
new file mode 100644
index 000000000000..9ac9c1f09393
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtquicktimeline.nix
@@ -0,0 +1,9 @@
+{ qtModule
+, qtbase
+, qtdeclarative
+}:
+
+qtModule {
+  pname = "qtquicktimeline";
+  propagatedBuildInputs = [ qtbase qtdeclarative ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtremoteobjects.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtremoteobjects.nix
new file mode 100644
index 000000000000..1fd3b1b7a253
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtremoteobjects.nix
@@ -0,0 +1,9 @@
+{ qtModule
+, qtbase
+, qtdeclarative
+}:
+
+qtModule {
+  pname = "qtremoteobjects";
+  propagatedBuildInputs = [ qtbase qtdeclarative ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtscxml.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtscxml.nix
new file mode 100644
index 000000000000..ece975f59e8d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtscxml.nix
@@ -0,0 +1,6 @@
+{ qtModule, qtbase, qtdeclarative }:
+
+qtModule {
+  pname = "qtscxml";
+  propagatedBuildInputs = [ qtbase qtdeclarative ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtsensors.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtsensors.nix
new file mode 100644
index 000000000000..bc49c7a77f58
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtsensors.nix
@@ -0,0 +1,10 @@
+{ qtModule
+, qtbase
+, qtdeclarative
+, qtsvg
+}:
+
+qtModule {
+  pname = "qtsensors";
+  propagatedBuildInputs = [ qtbase qtdeclarative qtsvg ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtserialbus.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtserialbus.nix
new file mode 100644
index 000000000000..3a7285d0a8b0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtserialbus.nix
@@ -0,0 +1,6 @@
+{ qtModule, qtbase, qtserialport }:
+
+qtModule {
+  pname = "qtserialbus";
+  propagatedBuildInputs = [ qtbase qtserialport ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtserialport.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtserialport.nix
new file mode 100644
index 000000000000..27b9eb9c1915
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtserialport.nix
@@ -0,0 +1,13 @@
+{ qtModule
+, stdenv
+, lib
+, qtbase
+, udev
+, pkg-config
+}:
+
+qtModule {
+  pname = "qtserialport";
+  nativeBuildInputs = [ pkg-config ];
+  propagatedBuildInputs = [ qtbase ] ++ lib.optionals stdenv.isLinux [ udev ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtshadertools.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtshadertools.nix
new file mode 100644
index 000000000000..5a4b894b9abd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtshadertools.nix
@@ -0,0 +1,8 @@
+{ qtModule
+, qtbase
+}:
+
+qtModule {
+  pname = "qtshadertools";
+  propagatedBuildInputs = [ qtbase ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtspeech.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtspeech.nix
new file mode 100644
index 000000000000..77c08fa91951
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtspeech.nix
@@ -0,0 +1,19 @@
+{ qtModule
+, lib
+, stdenv
+, qtbase
+, qtmultimedia
+, pkg-config
+, flite
+, alsa-lib
+, speechd
+, Cocoa
+}:
+
+qtModule {
+  pname = "qtspeech";
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = lib.optionals stdenv.isLinux [ flite alsa-lib speechd ];
+  propagatedBuildInputs = [ qtbase qtmultimedia ]
+    ++ lib.optionals stdenv.isDarwin [ Cocoa ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtsvg.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtsvg.nix
new file mode 100644
index 000000000000..d81634d9ef1b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtsvg.nix
@@ -0,0 +1,15 @@
+{ qtModule
+, qtbase
+, libwebp
+, jasper
+, libmng
+, zlib
+, pkg-config
+}:
+
+qtModule {
+  pname = "qtsvg";
+  propagatedBuildInputs = [ qtbase ];
+  buildInputs = [ libwebp jasper libmng zlib ];
+  nativeBuildInputs = [ pkg-config ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qttools.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qttools.nix
new file mode 100644
index 000000000000..a1aa1026e57b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qttools.nix
@@ -0,0 +1,37 @@
+{ qtModule
+, stdenv
+, lib
+, qtbase
+, qtdeclarative
+, cups
+, llvmPackages
+# clang-based c++ parser for qdoc and lupdate
+, withClang ? false
+}:
+
+qtModule {
+  pname = "qttools";
+  buildInputs = lib.optionals withClang [
+    llvmPackages.libclang
+    llvmPackages.llvm
+  ];
+  propagatedBuildInputs = [ qtbase qtdeclarative ]
+    ++ lib.optionals stdenv.isDarwin [ cups ];
+  patches = [
+    ../patches/qttools-paths.patch
+  ];
+  env.NIX_CFLAGS_COMPILE = toString [
+    "-DNIX_OUTPUT_OUT=\"${placeholder "out"}\""
+  ];
+  postPatch = ''
+    substituteInPlace \
+      src/qdoc/catch/CMakeLists.txt \
+      src/qdoc/catch_generators/CMakeLists.txt \
+      src/qdoc/catch_conversions/CMakeLists.txt \
+      --replace ''\'''${CMAKE_INSTALL_INCLUDEDIR}' "$out/include"
+  '';
+  postInstall = ''
+    mkdir -p "$dev"
+    ln -s "$out/bin" "$dev/bin"
+  '';
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qttranslations.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qttranslations.nix
new file mode 100644
index 000000000000..61c642de1085
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qttranslations.nix
@@ -0,0 +1,9 @@
+{ qtModule
+, qttools
+}:
+
+qtModule {
+  pname = "qttranslations";
+  nativeBuildInputs = [ qttools ];
+  outputs = [ "out" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtvirtualkeyboard.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtvirtualkeyboard.nix
new file mode 100644
index 000000000000..9f067900dc06
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtvirtualkeyboard.nix
@@ -0,0 +1,13 @@
+{ qtModule
+, qtbase
+, qtdeclarative
+, qtsvg
+, hunspell
+, pkg-config
+}:
+
+qtModule {
+  pname = "qtvirtualkeyboard";
+  propagatedBuildInputs = [ qtbase qtdeclarative qtsvg hunspell ];
+  nativeBuildInputs = [ pkg-config ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwayland.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwayland.nix
new file mode 100644
index 000000000000..b5f1c71fdd75
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwayland.nix
@@ -0,0 +1,14 @@
+{ qtModule
+, qtbase
+, qtdeclarative
+, wayland
+, pkg-config
+, libdrm
+}:
+
+qtModule {
+  pname = "qtwayland";
+  propagatedBuildInputs = [ qtbase qtdeclarative ];
+  buildInputs = [ wayland libdrm ];
+  nativeBuildInputs = [ pkg-config ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebchannel.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebchannel.nix
new file mode 100644
index 000000000000..bf0ba0f63385
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebchannel.nix
@@ -0,0 +1,12 @@
+{ qtModule
+, qtbase
+, qtdeclarative
+, qtwebsockets
+, openssl
+}:
+
+qtModule {
+  pname = "qtwebchannel";
+  propagatedBuildInputs = [ qtbase qtdeclarative qtwebsockets ];
+  buildInputs = [ openssl ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebengine.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebengine.nix
new file mode 100644
index 000000000000..64b5b9738caa
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebengine.nix
@@ -0,0 +1,323 @@
+{ qtModule
+, qtdeclarative
+, qtwebchannel
+, qtpositioning
+, qtwebsockets
+, buildPackages
+, bison
+, coreutils
+, flex
+, git
+, gperf
+, ninja
+, pkg-config
+, python3
+, which
+, nodejs
+, xorg
+, libXcursor
+, libXScrnSaver
+, libXrandr
+, libXtst
+, libxshmfence
+, libXi
+, fontconfig
+, freetype
+, harfbuzz
+, icu
+, dbus
+, libdrm
+, zlib
+, minizip
+, libjpeg
+, libpng
+, libtiff
+, libwebp
+, libopus
+, jsoncpp
+, protobuf
+, libvpx
+, srtp
+, snappy
+, nss
+, libevent
+, openssl
+, alsa-lib
+, pulseaudio
+, libcap
+, pciutils
+, systemd
+, pipewire
+, gn
+, ffmpeg_4
+, lib
+, stdenv
+, glib
+, libxml2
+, libxslt
+, lcms2
+, libkrb5
+, mesa
+, enableProprietaryCodecs ? true
+  # darwin
+, autoSignDarwinBinariesHook
+, bootstrap_cmds
+, cctools
+, xcbuild
+, AGL
+, AVFoundation
+, Accelerate
+, Cocoa
+, CoreLocation
+, CoreML
+, ForceFeedback
+, GameController
+, ImageCaptureCore
+, LocalAuthentication
+, MediaAccessibility
+, MediaPlayer
+, MetalKit
+, Network
+, OpenDirectory
+, Quartz
+, ReplayKit
+, SecurityInterface
+, Vision
+, openbsm
+, libunwind
+, cups
+, libpm
+, sandbox
+, xnu
+}:
+
+qtModule {
+  pname = "qtwebengine";
+  nativeBuildInputs = [
+    bison
+    coreutils
+    flex
+    git
+    gperf
+    ninja
+    pkg-config
+    (python3.withPackages (ps: with ps; [ html5lib ]))
+    which
+    gn
+    nodejs
+  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
+    autoSignDarwinBinariesHook
+  ] ++ lib.optionals stdenv.isDarwin [
+    bootstrap_cmds
+    cctools
+    xcbuild
+  ];
+  doCheck = true;
+  outputs = [ "out" "dev" ];
+
+  dontUseGnConfigure = true;
+
+  # ninja builds some components with -Wno-format,
+  # which cannot be set at the same time as -Wformat-security
+  hardeningDisable = [ "format" ];
+
+  patches = [
+    # removes macOS 12+ dependencies
+    ../patches/qtwebengine-darwin-no-low-latency-flag.patch
+    ../patches/qtwebengine-darwin-no-copy-certificate-chain.patch
+    # Don't assume /usr/share/X11, and also respect the XKB_CONFIG_ROOT
+    # environment variable, since NixOS relies on it working.
+    # See https://github.com/NixOS/nixpkgs/issues/226484 for more context.
+    ../patches/qtwebengine-xkb-includes.patch
+
+    ../patches/qtwebengine-link-pulseaudio.patch
+
+    # Override locales install path so they go to QtWebEngine's $out
+    ../patches/qtwebengine-locales-path.patch
+  ];
+
+  postPatch = ''
+    # Patch Chromium build tools
+    (
+      cd src/3rdparty/chromium;
+
+      # Manually fix unsupported shebangs
+      substituteInPlace third_party/harfbuzz-ng/src/src/update-unicode-tables.make \
+        --replace "/usr/bin/env -S make -f" "/usr/bin/make -f" || true
+      substituteInPlace third_party/webgpu-cts/src/tools/run_deno \
+        --replace "/usr/bin/env -S deno" "/usr/bin/deno" || true
+      patchShebangs .
+    )
+
+    substituteInPlace cmake/Functions.cmake \
+      --replace "/bin/bash" "${buildPackages.bash}/bin/bash"
+
+    # Patch library paths in sources
+    substituteInPlace src/core/web_engine_library_info.cpp \
+      --replace "QLibraryInfo::path(QLibraryInfo::DataPath)" "\"$out\"" \
+      --replace "QLibraryInfo::path(QLibraryInfo::TranslationsPath)" "\"$out/translations\"" \
+      --replace "QLibraryInfo::path(QLibraryInfo::LibraryExecutablesPath)" "\"$out/libexec\""
+  ''
+  + lib.optionalString stdenv.isLinux ''
+    sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${lib.getLib systemd}/lib/\1!' \
+      src/3rdparty/chromium/device/udev_linux/udev?_loader.cc
+
+    sed -i -e '/libpci_loader.*Load/s!"\(libpci\.so\)!"${pciutils}/lib/\1!' \
+      src/3rdparty/chromium/gpu/config/gpu_info_collector_linux.cc
+  ''
+  + lib.optionalString stdenv.isDarwin ''
+    substituteInPlace configure.cmake src/gn/CMakeLists.txt \
+      --replace "AppleClang" "Clang"
+    substituteInPlace cmake/Functions.cmake \
+      --replace "/usr/bin/xcrun" "${xcbuild}/bin/xcrun"
+    substituteInPlace src/3rdparty/chromium/third_party/crashpad/crashpad/util/BUILD.gn \
+      --replace "\$sysroot/usr" "${xnu}"
+  '';
+
+  cmakeFlags = [
+    "-DQT_FEATURE_qtpdf_build=ON"
+    "-DQT_FEATURE_qtpdf_widgets_build=ON"
+    "-DQT_FEATURE_qtpdf_quick_build=ON"
+    "-DQT_FEATURE_pdf_v8=ON"
+    "-DQT_FEATURE_pdf_xfa=ON"
+    "-DQT_FEATURE_pdf_xfa_bmp=ON"
+    "-DQT_FEATURE_pdf_xfa_gif=ON"
+    "-DQT_FEATURE_pdf_xfa_png=ON"
+    "-DQT_FEATURE_pdf_xfa_tiff=ON"
+    "-DQT_FEATURE_webengine_system_libevent=ON"
+    "-DQT_FEATURE_webengine_system_ffmpeg=ON"
+    # android only. https://bugreports.qt.io/browse/QTBUG-100293
+    # "-DQT_FEATURE_webengine_native_spellchecker=ON"
+    "-DQT_FEATURE_webengine_sanitizer=ON"
+    "-DQT_FEATURE_webengine_kerberos=ON"
+  ] ++ lib.optionals stdenv.isLinux [
+    "-DQT_FEATURE_webengine_system_libxml=ON"
+    "-DQT_FEATURE_webengine_webrtc_pipewire=ON"
+
+    # Appears not to work on some platforms
+    # https://github.com/Homebrew/homebrew-core/issues/104008
+    "-DQT_FEATURE_webengine_system_icu=ON"
+  ] ++ lib.optionals enableProprietaryCodecs [
+    "-DQT_FEATURE_webengine_proprietary_codecs=ON"
+  ] ++ lib.optionals stdenv.isDarwin [
+    "-DCMAKE_OSX_DEPLOYMENT_TARGET=${stdenv.hostPlatform.darwinSdkVersion}"
+  ];
+
+  propagatedBuildInputs = [
+    qtdeclarative
+    qtwebchannel
+    qtwebsockets
+    qtpositioning
+
+    # Image formats
+    libjpeg
+    libpng
+    libtiff
+    libwebp
+
+    # Video formats
+    srtp
+    libvpx
+
+    # Audio formats
+    libopus
+
+    # Text rendering
+    harfbuzz
+
+    openssl
+    glib
+    libxslt
+    lcms2
+
+    libevent
+    ffmpeg_4
+  ] ++ lib.optionals stdenv.isLinux [
+    dbus
+    zlib
+    minizip
+    snappy
+    nss
+    protobuf
+    jsoncpp
+
+    icu
+    libxml2
+
+    # Audio formats
+    alsa-lib
+    pulseaudio
+
+    # Text rendering
+    fontconfig
+    freetype
+
+    libcap
+    pciutils
+
+    # X11 libs
+    xorg.xrandr
+    libXScrnSaver
+    libXcursor
+    libXrandr
+    xorg.libpciaccess
+    libXtst
+    xorg.libXcomposite
+    xorg.libXdamage
+    libdrm
+    xorg.libxkbfile
+    libxshmfence
+    libXi
+    xorg.libXext
+
+    # Pipewire
+    pipewire
+
+    libkrb5
+    mesa
+  ] ++ lib.optionals stdenv.isDarwin [
+    AGL
+    AVFoundation
+    Accelerate
+    Cocoa
+    CoreLocation
+    CoreML
+    ForceFeedback
+    GameController
+    ImageCaptureCore
+    LocalAuthentication
+    MediaAccessibility
+    MediaPlayer
+    MetalKit
+    Network
+    OpenDirectory
+    Quartz
+    ReplayKit
+    SecurityInterface
+    Vision
+
+    openbsm
+    libunwind
+  ];
+
+  buildInputs = [
+    cups
+  ] ++ lib.optionals stdenv.isDarwin [
+    libpm
+    sandbox
+  ];
+
+  requiredSystemFeatures = [ "big-parallel" ];
+
+  preConfigure = ''
+    export NINJAFLAGS="-j$NIX_BUILD_CORES"
+  '';
+
+  meta = with lib; {
+    description = "A web engine based on the Chromium web browser";
+    platforms = [ "x86_64-darwin" "aarch64-darwin" "aarch64-linux" "armv7a-linux" "armv7l-linux" "x86_64-linux" ];
+    # This build takes a long time; particularly on slow architectures
+    # 1 hour on 32x3.6GHz -> maybe 12 hours on 4x2.4GHz
+    timeout = 24 * 3600;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebsockets.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebsockets.nix
new file mode 100644
index 000000000000..c3a346a8d78a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebsockets.nix
@@ -0,0 +1,11 @@
+{ qtModule
+, qtbase
+, qtdeclarative
+, openssl
+}:
+
+qtModule {
+  pname = "qtwebsockets";
+  propagatedBuildInputs = [ qtbase qtdeclarative ];
+  buildInputs = [ openssl ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebview.nix b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebview.nix
new file mode 100644
index 000000000000..e8ebea932f03
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/modules/qtwebview.nix
@@ -0,0 +1,14 @@
+{ lib
+, stdenv
+, qtModule
+, qtdeclarative
+, qtwebengine
+, WebKit
+}:
+
+qtModule {
+  pname = "qtwebview";
+  propagatedBuildInputs = [ qtdeclarative ]
+    ++ lib.optionals (!stdenv.isDarwin) [ qtwebengine ]
+    ++ lib.optionals stdenv.isDarwin [ WebKit ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch
new file mode 100644
index 000000000000..de35178f7929
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch
@@ -0,0 +1,50 @@
+From 90734859d2f9e6b9a1754c3e694ceb1a3c870bce Mon Sep 17 00:00:00 2001
+From: Nick Cao <nickcao@nichi.co>
+Date: Thu, 13 Apr 2023 23:42:29 +0800
+Subject: [PATCH 01/11] qtbase: qmake: always use libname instead of absolute
+ path in qmake files
+
+In generated qmake files, absolute paths to qt libraries are embedded
+and then used in linker flags. However as the libraries can be provided
+by qt modules other than the one currently being built, the ebedded
+paths can be incorrect.
+---
+ cmake/QtFinishPrlFile.cmake      | 7 ++++---
+ cmake/QtGenerateLibHelpers.cmake | 3 ---
+ 2 files changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/cmake/QtFinishPrlFile.cmake b/cmake/QtFinishPrlFile.cmake
+index 1cf9377e6ce..ac4428bd7a1 100644
+--- a/cmake/QtFinishPrlFile.cmake
++++ b/cmake/QtFinishPrlFile.cmake
+@@ -64,9 +64,10 @@ foreach(line ${lines})
+                         endif()
+                         list(APPEND adjusted_libs "-framework" "${CMAKE_MATCH_1}")
+                     else()
+-                        # Not a framework, transform the Qt module into relocatable relative path.
+-                        qt_strip_library_version_suffix(relative_lib "${relative_lib}")
+-                        list(APPEND adjusted_libs "$$[QT_INSTALL_LIBS]/${relative_lib}")
++                        # Not a framework, extract the library name and prepend an -l to make
++                        # it relocatable.
++                        qt_transform_absolute_library_paths_to_link_flags(lib_with_link_flag "${lib}")
++                        list(APPEND adjusted_libs "${lib_with_link_flag}")
+                     endif()
+                 endif()
+             else()
+diff --git a/cmake/QtGenerateLibHelpers.cmake b/cmake/QtGenerateLibHelpers.cmake
+index 3ffe354fd8d..441332d4582 100644
+--- a/cmake/QtGenerateLibHelpers.cmake
++++ b/cmake/QtGenerateLibHelpers.cmake
+@@ -73,9 +73,6 @@ function(qt_transform_absolute_library_paths_to_link_flags out_var library_path_
+             string(TOLOWER "${dir}" dir_lower)
+             # If library_path isn't in default link directories, we should add it to link flags.
+             list(FIND IMPLICIT_LINK_DIRECTORIES_LOWER "${dir_lower}" index)
+-            if(${index} EQUAL -1)
+-                list(APPEND out_list "-L\"${dir}\"")
+-            endif()
+             list(APPEND out_list "${lib_name_with_link_flag}")
+         else()
+             list(APPEND out_list "${library_path}")
+-- 
+2.42.0
+
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch
new file mode 100644
index 000000000000..6cdbec5abfc7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch
@@ -0,0 +1,485 @@
+From a804a9b1efdab0a71b9947e5c2bf9f6f5e316e0e Mon Sep 17 00:00:00 2001
+From: Nick Cao <nickcao@nichi.co>
+Date: Fri, 14 Apr 2023 21:43:04 +0800
+Subject: [PATCH 02/11] qtbase: qmake: fix mkspecs for darwin
+
+---
+ mkspecs/common/mac.conf               |   2 +-
+ mkspecs/features/mac/default_post.prf | 263 --------------------------
+ mkspecs/features/mac/default_pre.prf  |  58 ------
+ mkspecs/features/mac/sdk.mk           |  27 ---
+ mkspecs/features/mac/sdk.prf          |  61 ------
+ mkspecs/features/mac/toolchain.prf    |   5 -
+ 6 files changed, 1 insertion(+), 415 deletions(-)
+
+diff --git a/mkspecs/common/mac.conf b/mkspecs/common/mac.conf
+index 61bea952b2..9909dae726 100644
+--- a/mkspecs/common/mac.conf
++++ b/mkspecs/common/mac.conf
+@@ -23,7 +23,7 @@ QMAKE_INCDIR_OPENGL     = \
+ 
+ QMAKE_FIX_RPATH         = install_name_tool -id
+ 
+-QMAKE_LFLAGS_RPATH      = -Wl,-rpath,
++QMAKE_LFLAGS_RPATH      =
+ QMAKE_LFLAGS_GCSECTIONS = -Wl,-dead_strip
+ 
+ QMAKE_LFLAGS_REL_RPATH  =
+diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf
+index 0b64a586b9..3b40328304 100644
+--- a/mkspecs/features/mac/default_post.prf
++++ b/mkspecs/features/mac/default_post.prf
+@@ -1,9 +1,5 @@
+ load(default_post)
+ 
+-# Recompute SDK version in case the user set it explicitly
+-sdk_version = $$QMAKE_MAC_SDK_VERSION
+-QMAKE_MAC_SDK_VERSION = $$xcodeSDKInfo(SDKVersion)
+-
+ contains(TEMPLATE, .*app) {
+     !macx-xcode:if(isEmpty(BUILDS)|build_pass) {
+         # Detect changes to the platform SDK
+@@ -15,270 +11,10 @@ contains(TEMPLATE, .*app) {
+ 
+         QMAKE_EXTRA_INCLUDES += $$shell_quote($$PWD/sdk.mk)
+     }
+-
+-    # Detect incompatible SDK versions
+-    # The CMake equivalent is in cmake/QtPublicAppleHelpers.cmake.
+-
+-    isEmpty(QT_MAC_SDK_VERSION_MIN): \
+-        QT_MAC_SDK_VERSION_MIN = $$QT_MAC_SDK_VERSION
+-
+-    !versionAtLeast(QMAKE_MAC_SDK_VERSION, $$QT_MAC_SDK_VERSION_MIN): \
+-        warning("Qt requires at least version $$QT_MAC_SDK_VERSION_MIN of the platform SDK," \
+-              "you're building against version $${QMAKE_MAC_SDK_VERSION}. Please upgrade.")
+-
+-    !isEmpty(QT_MAC_SDK_VERSION_MAX) {
+-        # For Qt developers only
+-        !isEmpty($$list($$(QT_MAC_SDK_NO_VERSION_CHECK))): \
+-            CONFIG += sdk_no_version_check
+-
+-        QMAKE_MAC_SDK_MAJOR_VERSION = $$replace(QMAKE_MAC_SDK_VERSION, "(\\d+)(\\.\\d+)(\\.\\d+)?", \\1)
+-
+-        !sdk_no_version_check:!versionAtMost(QMAKE_MAC_SDK_MAJOR_VERSION, $$QT_MAC_SDK_VERSION_MAX) {
+-            warning("Qt has only been tested with version $$QT_MAC_SDK_VERSION_MAX"\
+-                    "of the platform SDK, you're using $${QMAKE_MAC_SDK_MAJOR_VERSION}.")
+-            warning("This is an unsupported configuration. You may experience build issues," \
+-                    "and by using")
+-            warning("the $$QMAKE_MAC_SDK_VERSION SDK you are opting in to new features" \
+-                    "that Qt has not been prepared for.")
+-
+-            warning("Please downgrade the SDK you use to build your app to version" \
+-                    "$$QT_MAC_SDK_VERSION_MAX, or configure")
+-            warning("with CONFIG+=sdk_no_version_check when running qmake" \
+-                    "to silence this warning.")
+-        }
+-    }
+ }
+ 
+ !no_objective_c:CONFIG += objective_c
+ 
+-# Add the same default rpaths as Xcode does for new projects.
+-# This is especially important for iOS/tvOS/watchOS where no other option is possible.
+-!no_default_rpath {
+-    uikit: QMAKE_RPATHDIR += @executable_path/Frameworks
+-    else: QMAKE_RPATHDIR += @executable_path/../Frameworks
+-    equals(TEMPLATE, lib):!plugin:lib_bundle: QMAKE_RPATHDIR += @loader_path/Frameworks
+-}
+-
+-# Don't pass -headerpad_max_install_names when using Bitcode.
+-# In that case the linker emits a warning stating that the flag is ignored when
+-# used with bitcode, for reasons that cannot be determined (rdar://problem/20748962).
+-# Using this flag is also unnecessary in practice on UIKit platforms since they
+-# are sandboxed, and only UIKit platforms support bitcode to begin with.
+-!bitcode: QMAKE_LFLAGS += $$QMAKE_LFLAGS_HEADERPAD
+-
+-app_extension_api_only {
+-    QMAKE_CFLAGS              += $$QMAKE_CFLAGS_APPLICATION_EXTENSION
+-    QMAKE_CXXFLAGS            += $$QMAKE_CFLAGS_APPLICATION_EXTENSION
+-    QMAKE_CXXFLAGS_PRECOMPILE += $$QMAKE_CFLAGS_APPLICATION_EXTENSION
+-    QMAKE_LFLAGS              += $$QMAKE_CFLAGS_APPLICATION_EXTENSION
+-}
+-
+-macos {
+-    !isEmpty(QMAKE_APPLE_DEVICE_ARCHS) {
+-        # If the user has requested a specific set of architectures,
+-        # build all of those by default, but limited to only those.
+-        CONFIG -= only_active_arch
+-    } else {
+-        # Otherwise allow building all of the architectures available
+-        # in Qt, but only build the active arch (unless the user has
+-        # manually overridden this via CONFIG -= only_active_arch).
+-        QMAKE_APPLE_DEVICE_ARCHS = $$QT_ARCHS
+-    }
+-}
+-
+-macx-xcode {
+-    qmake_pkginfo_typeinfo.name = QMAKE_PKGINFO_TYPEINFO
+-    !isEmpty(QMAKE_PKGINFO_TYPEINFO): \
+-        qmake_pkginfo_typeinfo.value = $$QMAKE_PKGINFO_TYPEINFO
+-    else: \
+-        qmake_pkginfo_typeinfo.value = "????"
+-    QMAKE_MAC_XCODE_SETTINGS += qmake_pkginfo_typeinfo
+-
+-    bundle_version = $$VERSION
+-    isEmpty(bundle_version): bundle_version = 1.0.0
+-
+-    l = $$split(bundle_version, '.') 0 0  # make sure there are at least three
+-    VER_MAJ = $$member(l, 0, 0)
+-    VER_MIN = $$member(l, 1, 1)
+-    VER_PAT = $$member(l, 2, 2)
+-    unset(l)
+-
+-    qmake_full_version.name = QMAKE_FULL_VERSION
+-    qmake_full_version.value = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT}
+-    QMAKE_MAC_XCODE_SETTINGS += qmake_full_version
+-
+-    qmake_short_version.name = QMAKE_SHORT_VERSION
+-    qmake_short_version.value = $${VER_MAJ}.$${VER_MIN}
+-    QMAKE_MAC_XCODE_SETTINGS += qmake_short_version
+-
+-    !isEmpty(QMAKE_XCODE_DEBUG_INFORMATION_FORMAT) {
+-        debug_information_format.name = DEBUG_INFORMATION_FORMAT
+-        debug_information_format.value = $$QMAKE_XCODE_DEBUG_INFORMATION_FORMAT
+-        debug_information_format.build = debug
+-        QMAKE_MAC_XCODE_SETTINGS += debug_information_format
+-    }
+-
+-    QMAKE_XCODE_ARCHS =
+-
+-    arch_device.name = "ARCHS[sdk=$${device.sdk}*]"
+-    arch_device.value = $$QMAKE_APPLE_DEVICE_ARCHS
+-    QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_DEVICE_ARCHS
+-    QMAKE_MAC_XCODE_SETTINGS += arch_device
+-
+-    ios:simulator {
+-        arch_simulator.name = "ARCHS[sdk=$${simulator.sdk}*]"
+-        arch_simulator.value = $$QMAKE_APPLE_SIMULATOR_ARCHS
+-        QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_SIMULATOR_ARCHS
+-        QMAKE_MAC_XCODE_SETTINGS += arch_simulator
+-    }
+-
+-    only_active_arch.name = ONLY_ACTIVE_ARCH
+-    only_active_arch.value = YES
+-    only_active_arch.build = debug
+-    QMAKE_MAC_XCODE_SETTINGS += only_active_arch
+-} else {
+-    device|!simulator: VALID_DEVICE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS
+-    ios:simulator: VALID_SIMULATOR_ARCHS = $$QMAKE_APPLE_SIMULATOR_ARCHS
+-    VALID_ARCHS = $$VALID_DEVICE_ARCHS $$VALID_SIMULATOR_ARCHS
+-
+-    single_arch: VALID_ARCHS = $$first(VALID_ARCHS)
+-
+-    macos {
+-        only_active_arch: DEFAULT_ARCHS = $$system("uname -m")
+-        else: DEFAULT_ARCHS = $$VALID_ARCHS
+-    }
+-
+-    ARCHS = $(filter $(EXPORT_VALID_ARCHS), \
+-        $(if $(ARCHS), $(ARCHS), \
+-            $(if $(EXPORT_DEFAULT_ARCHS), $(EXPORT_DEFAULT_ARCHS), \
+-        $(EXPORT_VALID_ARCHS))))
+-    ARCH_ARGS = $(foreach arch, $(if $(EXPORT_ARCHS), $(EXPORT_ARCHS), $(EXPORT_VALID_ARCHS)), -arch $(arch))
+-
+-    QMAKE_EXTRA_VARIABLES += VALID_ARCHS DEFAULT_ARCHS ARCHS ARCH_ARGS
+-
+-    arch_flags = $(EXPORT_ARCH_ARGS)
+-
+-    QMAKE_CFLAGS += $$arch_flags
+-    QMAKE_CXXFLAGS += $$arch_flags
+-    QMAKE_LFLAGS += $$arch_flags
+-
+-    QMAKE_PCH_ARCHS = $$VALID_ARCHS
+-
+-    macos: deployment_target = $$QMAKE_MACOSX_DEPLOYMENT_TARGET
+-    ios: deployment_target = $$QMAKE_IOS_DEPLOYMENT_TARGET
+-    tvos: deployment_target = $$QMAKE_TVOS_DEPLOYMENT_TARGET
+-    watchos: deployment_target = $$QMAKE_WATCHOS_DEPLOYMENT_TARGET
+-
+-    # If we're doing a simulator and device build, device and simulator
+-    # architectures use different paths and flags for the sysroot and
+-    # deployment target switch, so we must multiplex them across multiple
+-    # architectures using -Xarch. Otherwise we fall back to the simple path.
+-    # This is not strictly necessary, but results in cleaner command lines
+-    # and makes it easier for people to override EXPORT_VALID_ARCHS to limit
+-    # individual rules to a different set of architecture(s) from the overall
+-    # build (such as machtest in QtCore).
+-    ios:simulator:device {
+-        QMAKE_XARCH_CFLAGS =
+-        QMAKE_XARCH_LFLAGS =
+-        QMAKE_EXTRA_VARIABLES += QMAKE_XARCH_CFLAGS QMAKE_XARCH_LFLAGS
+-
+-        for (arch, VALID_ARCHS) {
+-            contains(VALID_SIMULATOR_ARCHS, $$arch) {
+-                sdk = $$simulator.sdk
+-                version_identifier = $$simulator.deployment_identifier
+-                platform_identifier = $$simulator.sdk
+-            } else {
+-                sdk = $$device.sdk
+-                version_identifier = $$device.deployment_identifier
+-                platform_identifier = $$device.sdk
+-            }
+-
+-            version_min_flags = \
+-                -Xarch_$${arch} \
+-                -m$${version_identifier}-version-min=$$deployment_target
+-            QMAKE_XARCH_CFLAGS_$${arch} = $$version_min_flags \
+-                -Xarch_$${arch} \
+-                -isysroot$$xcodeSDKInfo(Path, $$sdk)
+-            QMAKE_XARCH_LFLAGS_$${arch} = $$version_min_flags \
+-                -Xarch_$${arch} \
+-                -isysroot$$xcodeSDKInfo(Path, $$sdk)
+-
+-            QMAKE_XARCH_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS_$${arch})
+-            QMAKE_XARCH_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS_$${arch})
+-
+-            QMAKE_EXTRA_VARIABLES += \
+-                QMAKE_XARCH_CFLAGS_$${arch} \
+-                QMAKE_XARCH_LFLAGS_$${arch}
+-        }
+-
+-        QMAKE_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS)
+-        QMAKE_CXXFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS)
+-        QMAKE_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS)
+-    } else {
+-        ios:simulator {
+-            version_identifier = $$simulator.deployment_identifier
+-            platform_identifier = $$simulator.sdk
+-            sysroot_path  = $$xcodeSDKInfo(Path, $$simulator.sdk)
+-        } else {
+-            version_identifier = $$device.deployment_identifier
+-            platform_identifier = $$device.sdk
+-            sysroot_path  = $$xcodeSDKInfo(Path, $$device.sdk)
+-        }
+-        version_min_flag = -m$${version_identifier}-version-min=$$deployment_target
+-        QMAKE_CFLAGS += -isysroot $$sysroot_path $$version_min_flag
+-        QMAKE_CXXFLAGS += -isysroot $$sysroot_path $$version_min_flag
+-        QMAKE_LFLAGS += -isysroot $$sysroot_path $$version_min_flag
+-    }
+-
+-    # Enable precompiled headers for multiple architectures
+-    QMAKE_CFLAGS_USE_PRECOMPILE =
+-    for (arch, VALID_ARCHS) {
+-        icc_pch_style: \
+-            use_flag = "-pch-use "
+-        else: \
+-            use_flag = -include
+-
+-        # Only use Xarch with multi-arch, as the option confuses ccache
+-        count(VALID_ARCHS, 1, greaterThan): \
+-            QMAKE_CFLAGS_USE_PRECOMPILE += \
+-                -Xarch_$${arch}
+-
+-        QMAKE_CFLAGS_USE_PRECOMPILE += \
+-            $${use_flag}${QMAKE_PCH_OUTPUT_$${arch}}
+-    }
+-    icc_pch_style {
+-        QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE -include ${QMAKE_PCH_INPUT}
+-        QMAKE_CFLAGS_USE_PRECOMPILE =
+-    } else {
+-        QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+-        QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+-        QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+-    }
+-
+-    QMAKE_PCH_OUTPUT_EXT = _${QMAKE_PCH_ARCH}$${QMAKE_PCH_OUTPUT_EXT}
+-}
+-
+-!equals(sdk_version, $$QMAKE_MAC_SDK_VERSION) {
+-    # Explicit SDK version has been set, respect that
+-    QMAKE_LFLAGS += -Wl,-sdk_version -Wl,$$sdk_version
+-}
+-
+-cache(QMAKE_XCODE_DEVELOPER_PATH, stash)
+-!isEmpty(QMAKE_XCODE_VERSION): \
+-    cache(QMAKE_XCODE_VERSION, stash)
+-
+-QMAKE_XCODE_LIBRARY_SUFFIX = $$qtPlatformTargetSuffix()
+-
+-xcode_product_bundle_identifier_setting.name = PRODUCT_BUNDLE_IDENTIFIER
+-xcode_product_bundle_identifier_setting.value = $$QMAKE_TARGET_BUNDLE_PREFIX
+-isEmpty(xcode_product_bundle_identifier_setting.value): \
+-    xcode_product_bundle_identifier_setting.value = "com.yourcompany"
+-xcode_product_bundle_target = $$QMAKE_BUNDLE
+-isEmpty(xcode_product_bundle_target): \
+-    xcode_product_bundle_target = ${PRODUCT_NAME:rfc1034identifier}
+-xcode_product_bundle_identifier_setting.value = "$${xcode_product_bundle_identifier_setting.value}.$${xcode_product_bundle_target}"
+-QMAKE_MAC_XCODE_SETTINGS += xcode_product_bundle_identifier_setting
+-
+ !macx-xcode {
+     generate_xcode_project.commands = @$(QMAKE) -spec macx-xcode \"$(EXPORT__PRO_FILE_)\" $$QMAKE_ARGS
+     generate_xcode_project.target = xcodeproj
+diff --git a/mkspecs/features/mac/default_pre.prf b/mkspecs/features/mac/default_pre.prf
+index e3534561a5..3b01424e67 100644
+--- a/mkspecs/features/mac/default_pre.prf
++++ b/mkspecs/features/mac/default_pre.prf
+@@ -1,60 +1,2 @@
+ CONFIG = asset_catalogs rez $$CONFIG
+ load(default_pre)
+-
+-isEmpty(QMAKE_XCODE_DEVELOPER_PATH) {
+-    # Get path of Xcode's Developer directory
+-    QMAKE_XCODE_DEVELOPER_PATH = $$system("/usr/bin/xcode-select --print-path 2>/dev/null")
+-    isEmpty(QMAKE_XCODE_DEVELOPER_PATH): \
+-        error("Xcode path is not set. Please use xcode-select to choose Xcode installation path.")
+-
+-    # Make sure Xcode path is valid
+-    !exists($$QMAKE_XCODE_DEVELOPER_PATH): \
+-        error("Xcode is not installed in $${QMAKE_XCODE_DEVELOPER_PATH}. Please use xcode-select to choose Xcode installation path.")
+-}
+-
+-isEmpty(QMAKE_XCODEBUILD_PATH): \
+-    QMAKE_XCODEBUILD_PATH = $$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null")
+-
+-!isEmpty(QMAKE_XCODEBUILD_PATH) {
+-    # Make sure Xcode is set up properly
+-    !system("/usr/bin/xcrun xcodebuild -license check 2>/dev/null"): \
+-        error("Xcode not set up properly. You need to confirm the license agreement by running 'sudo xcrun xcodebuild -license accept'.")
+-
+-    isEmpty(QMAKE_XCODE_VERSION) {
+-        # Extract Xcode version using xcodebuild
+-        xcode_version = $$system("/usr/bin/xcrun xcodebuild -version")
+-        QMAKE_XCODE_VERSION = $$member(xcode_version, 1)
+-        isEmpty(QMAKE_XCODE_VERSION): error("Could not resolve Xcode version.")
+-        unset(xcode_version)
+-    }
+-}
+-
+-isEmpty(QMAKE_TARGET_BUNDLE_PREFIX) {
+-    QMAKE_XCODE_PREFERENCES_FILE = $$(HOME)/Library/Preferences/com.apple.dt.Xcode.plist
+-    exists($$QMAKE_XCODE_PREFERENCES_FILE): \
+-        QMAKE_TARGET_BUNDLE_PREFIX = $$system("/usr/libexec/PlistBuddy -c 'print IDETemplateOptions:bundleIdentifierPrefix' $$QMAKE_XCODE_PREFERENCES_FILE 2>/dev/null")
+-
+-    !isEmpty(_QMAKE_CACHE_):!isEmpty(QMAKE_TARGET_BUNDLE_PREFIX): \
+-        cache(QMAKE_TARGET_BUNDLE_PREFIX)
+-}
+-
+-QMAKE_ASSET_CATALOGS_APP_ICON = AppIcon
+-
+-# Make the default debug info format for static debug builds
+-# DWARF instead of DWARF with dSYM. This cuts down build times
+-# for application debug builds significantly, as Xcode doesn't
+-# have to pull out all the DWARF info from the Qt static libs
+-# and put it into a dSYM file. We don't need that dSYM file in
+-# the first place, since the information is available in the
+-# object files inside the archives (static libraries).
+-macx-xcode:qtConfig(static): \
+-    QMAKE_XCODE_DEBUG_INFORMATION_FORMAT = dwarf
+-
+-# This variable is used by the xcode_dynamic_library_suffix
+-# feature, which allows Xcode to choose the Qt libraries to link to
+-# at build time, depending on the current Xcode SDK and configuration.
+-QMAKE_XCODE_LIBRARY_SUFFIX_SETTING = QT_LIBRARY_SUFFIX
+-
+-xcode_copy_phase_strip_setting.name = COPY_PHASE_STRIP
+-xcode_copy_phase_strip_setting.value = NO
+-QMAKE_MAC_XCODE_SETTINGS += xcode_copy_phase_strip_setting
+diff --git a/mkspecs/features/mac/sdk.mk b/mkspecs/features/mac/sdk.mk
+index a32ceacb6c..e69de29bb2 100644
+--- a/mkspecs/features/mac/sdk.mk
++++ b/mkspecs/features/mac/sdk.mk
+@@ -1,27 +0,0 @@
+-
+-ifeq ($(QT_MAC_SDK_NO_VERSION_CHECK),)
+-    CHECK_SDK_COMMAND = /usr/bin/xcrun --sdk $(EXPORT_QMAKE_MAC_SDK) -show-sdk-version 2>/dev/null
+-    CURRENT_MAC_SDK_VERSION := $(shell DEVELOPER_DIR=$(EXPORT_QMAKE_XCODE_DEVELOPER_PATH) $(CHECK_SDK_COMMAND))
+-    ifneq ($(CURRENT_MAC_SDK_VERSION),$(EXPORT_QMAKE_MAC_SDK_VERSION))
+-        # We don't want to complain about out of date SDK unless the target needs to be remade.
+-        # This covers use-cases such as running 'make check' after moving the build to a
+-        # computer without Xcode or with a different Xcode version.
+-        TARGET_UP_TO_DATE := $(shell QT_MAC_SDK_NO_VERSION_CHECK=1 $(MAKE) --question $(QMAKE_TARGET) && echo 1 || echo 0)
+-        ifeq ($(TARGET_UP_TO_DATE),0)
+-            ifneq ($(findstring missing DEVELOPER_DIR path,$(CURRENT_MAC_SDK_VERSION)),)
+-                $(info The developer dir $(EXPORT_QMAKE_XCODE_DEVELOPER_PATH) is no longer valid.)
+-            else ifneq ($(findstring SDK "$(EXPORT_QMAKE_MAC_SDK)" cannot be located,$(CURRENT_MAC_SDK_VERSION)),)
+-                $(info The developer dir $(EXPORT_QMAKE_XCODE_DEVELOPER_PATH) no longer contains the $(EXPORT_QMAKE_MAC_SDK_VERSION) platform SDK.)
+-            else ifneq ($(CURRENT_MAC_SDK_VERSION),)
+-                $(info The $(EXPORT_QMAKE_MAC_SDK) platform SDK has been changed from version $(EXPORT_QMAKE_MAC_SDK_VERSION) to version $(CURRENT_MAC_SDK_VERSION).)
+-            else
+-                $(info Unknown error resolving current platform SDK version.)
+-            endif
+-            $(info This requires a fresh build of your project. Please wipe the build directory)
+-            ifneq ($(EXPORT__QMAKE_STASH_),)
+-                $(info including the qmake cache in $(EXPORT__QMAKE_STASH_))
+-            endif
+-            $(error ^)
+-        endif
+-    endif
+-endif
+diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf
+index 3a9c2778bb..e69de29bb2 100644
+--- a/mkspecs/features/mac/sdk.prf
++++ b/mkspecs/features/mac/sdk.prf
+@@ -1,61 +0,0 @@
+-
+-isEmpty(QMAKE_MAC_SDK): \
+-    error("QMAKE_MAC_SDK must be set when using CONFIG += sdk.")
+-
+-contains(QMAKE_MAC_SDK, .*/.*): \
+-    error("QMAKE_MAC_SDK can only contain short-form SDK names (eg. macosx, iphoneos)")
+-
+-defineReplace(xcodeSDKInfo) {
+-    info = $$1
+-    equals(info, "Path"): \
+-        infoarg = --show-sdk-path
+-    equals(info, "PlatformPath"): \
+-        infoarg = --show-sdk-platform-path
+-    equals(info, "SDKVersion"): \
+-        infoarg = --show-sdk-version
+-    sdk = $$2
+-    isEmpty(sdk): \
+-        sdk = $$QMAKE_MAC_SDK
+-
+-    isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}) {
+-        QMAKE_MAC_SDK.$${sdk}.$${info} = $$system("/usr/bin/xcrun --sdk $$sdk $$infoarg 2>/dev/null")
+-        # --show-sdk-platform-path won't work for Command Line Tools; this is fine
+-        # only used by the XCTest backend to testlib
+-        isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}):if(!isEmpty(QMAKE_XCODEBUILD_PATH)|!equals(infoarg, "--show-sdk-platform-path")): \
+-            error("Could not resolve SDK $$info for \'$$sdk\' using $$infoarg")
+-        cache(QMAKE_MAC_SDK.$${sdk}.$${info}, set stash, QMAKE_MAC_SDK.$${sdk}.$${info})
+-    }
+-
+-    return($$eval(QMAKE_MAC_SDK.$${sdk}.$${info}))
+-}
+-
+-QMAKE_MAC_SDK_PATH = $$xcodeSDKInfo(Path)
+-QMAKE_MAC_SDK_PLATFORM_PATH = $$xcodeSDKInfo(PlatformPath)
+-QMAKE_MAC_SDK_VERSION = $$xcodeSDKInfo(SDKVersion)
+-
+-isEmpty(QMAKE_EXPORT_INCDIR_OPENGL) {
+-    QMAKE_EXPORT_INCDIR_OPENGL = $$QMAKE_INCDIR_OPENGL
+-    sysrootified =
+-    for(val, QMAKE_INCDIR_OPENGL): sysrootified += $${QMAKE_MAC_SDK_PATH}$$val
+-    QMAKE_INCDIR_OPENGL = $$sysrootified
+-}
+-
+-QMAKESPEC_NAME = $$basename(QMAKESPEC)
+-
+-# Resolve SDK version of various tools
+-for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_LINK QMAKE_LINK_SHLIB QMAKE_ACTOOL QMAKE_LINK_C QMAKE_LINK_C_SHLIB)) {
+-    tool_variable = QMAKE_MAC_SDK.$${QMAKESPEC_NAME}.$${QMAKE_MAC_SDK}.$${tool}
+-    !isEmpty($$tool_variable) {
+-        $$tool = $$eval($$tool_variable)
+-        next()
+-    }
+-
+-    value = $$eval($$tool)
+-    isEmpty(value): next()
+-
+-    sysrooted = $$system("/usr/bin/xcrun -sdk $$QMAKE_MAC_SDK -find $$first(value) 2>/dev/null")
+-    isEmpty(sysrooted): next()
+-
+-    $$tool = $$sysrooted $$member(value, 1, -1)
+-    cache($$tool_variable, set stash, $$tool)
+-}
+diff --git a/mkspecs/features/mac/toolchain.prf b/mkspecs/features/mac/toolchain.prf
+index df191eb13c..e69de29bb2 100644
+--- a/mkspecs/features/mac/toolchain.prf
++++ b/mkspecs/features/mac/toolchain.prf
+@@ -1,5 +0,0 @@
+-# Ensure that we process sdk.prf first, as it will update QMAKE_CXX,
+-# which the default path determination uses.
+-sdk: load(sdk)
+-
+-load(toolchain)
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0003-qtbase-qmake-fix-includedir-in-generated-pkg-config.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0003-qtbase-qmake-fix-includedir-in-generated-pkg-config.patch
new file mode 100644
index 000000000000..53f226254a19
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0003-qtbase-qmake-fix-includedir-in-generated-pkg-config.patch
@@ -0,0 +1,26 @@
+From 6088085d3074316dd74639fc6c1233e5862aff11 Mon Sep 17 00:00:00 2001
+From: Nick Cao <nickcao@nichi.co>
+Date: Fri, 14 Apr 2023 09:34:46 +0800
+Subject: [PATCH 03/11] qtbase: qmake: fix includedir in generated pkg-config
+
+---
+ qmake/generators/makefile.cpp | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
+index 11d2f0ff7df..c78ed0d3485 100644
+--- a/qmake/generators/makefile.cpp
++++ b/qmake/generators/makefile.cpp
+@@ -3412,8 +3412,7 @@ MakefileGenerator::writePkgConfigFile()
+       << varGlue("QMAKE_PKGCONFIG_CFLAGS", "", " ", " ")
+         //      << varGlue("DEFINES","-D"," -D"," ")
+          ;
+-    if (!project->values("QMAKE_DEFAULT_INCDIRS").contains(includeDir))
+-        t << "-I${includedir}";
++    t << "-I${includedir}";
+     if (target_mode == TARG_MAC_MODE && project->isActiveConfig("lib_bundle")
+         && libDir != QLatin1String("/Library/Frameworks")) {
+             t << " -F${libdir}";
+-- 
+2.42.0
+
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0004-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0004-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch
new file mode 100644
index 000000000000..ccd0fb02fcd8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0004-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch
@@ -0,0 +1,26 @@
+From 82e243f326aea40e7f3da935d8166979b11e8063 Mon Sep 17 00:00:00 2001
+From: Nick Cao <nickcao@nichi.co>
+Date: Tue, 21 Mar 2023 15:48:49 +0800
+Subject: [PATCH 04/11] qtbase: deal with a font face at index 0 as Regular for
+ Variable fonts
+
+Reference: https://bugreports.qt.io/browse/QTBUG-111994
+---
+ src/gui/text/unix/qfontconfigdatabase.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/gui/text/unix/qfontconfigdatabase.cpp b/src/gui/text/unix/qfontconfigdatabase.cpp
+index 474644b871f..c7a117fd134 100644
+--- a/src/gui/text/unix/qfontconfigdatabase.cpp
++++ b/src/gui/text/unix/qfontconfigdatabase.cpp
+@@ -556,6 +556,7 @@ void QFontconfigDatabase::populateFontDatabase()
+             FcObjectSetAdd(os, *p);
+             ++p;
+         }
++        FcPatternAddBool(pattern, FC_VARIABLE, FcFalse);
+         fonts = FcFontList(nullptr, pattern, os);
+         FcObjectSetDestroy(os);
+         FcPatternDestroy(pattern);
+-- 
+2.42.0
+
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0005-qtbase-qt-cmake-always-use-cmake-from-path.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0005-qtbase-qt-cmake-always-use-cmake-from-path.patch
new file mode 100644
index 000000000000..ad30ebc71413
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0005-qtbase-qt-cmake-always-use-cmake-from-path.patch
@@ -0,0 +1,32 @@
+From b480022b364b262d5ff63738c02318da925f5c79 Mon Sep 17 00:00:00 2001
+From: Nick Cao <nickcao@nichi.co>
+Date: Wed, 12 Apr 2023 10:13:50 +0800
+Subject: [PATCH 05/11] qtbase: qt-cmake: always use cmake from path
+
+The generated qt-cmake scripts embeds the absolute path of cmake used
+during the build of qtbase, bloating the runtime closure of qtbase.
+---
+ bin/qt-cmake.in | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+diff --git a/bin/qt-cmake.in b/bin/qt-cmake.in
+index f719257f602..571ffe788fa 100755
+--- a/bin/qt-cmake.in
++++ b/bin/qt-cmake.in
+@@ -4,12 +4,7 @@
+ script_dir_path=`dirname $0`
+ script_dir_path=`(cd "$script_dir_path"; /bin/pwd)`
+ 
+-# Try to use original cmake, otherwise to make it relocatable, use any cmake found in PATH.
+-original_cmake_path="@CMAKE_COMMAND@"
+-cmake_path=$original_cmake_path
+-if ! test -f "$cmake_path"; then
+-    cmake_path="cmake"
+-fi
++cmake_path="cmake"
+ 
+ toolchain_path="$script_dir_path/@__GlobalConfig_relative_path_from_bin_dir_to_cmake_config_dir@/qt.toolchain.cmake"
+ 
+-- 
+2.42.0
+
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0006-qtbase-find-tools-in-PATH.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0006-qtbase-find-tools-in-PATH.patch
new file mode 100644
index 000000000000..1d60684e0700
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0006-qtbase-find-tools-in-PATH.patch
@@ -0,0 +1,45 @@
+From a8b9fae710a2bd5e743f5e16364eaa8c38dbd784 Mon Sep 17 00:00:00 2001
+From: rewine <luhongxu@deepin.org>
+Date: Wed, 29 Mar 2023 11:51:33 +0800
+Subject: [PATCH 06/11] qtbase-find-tools-in-PATH
+
+1. find qt's tools in `QTTOOLSPATH` env
+   qt assumes that all components use the same install prefix
+   we can't get the real prefix for qttools when build qtbase
+   we will add /libexec to `QTTOOLSPATH` in qtToolsHook
+   find_path will also search in 'PATH' by default
+   see `CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH`
+
+2. disable tool_dependencies_enabled
+   We can guarantee the build order of qt components in nixpkgs
+   tools in qttools always build before qtdoc
+   qdoc_bin is not a build target now, since we find it in `QTTOOLSPATH`
+---
+ cmake/QtDocsHelpers.cmake | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/cmake/QtDocsHelpers.cmake b/cmake/QtDocsHelpers.cmake
+index 48ed5a324bf..91d8d41fb1f 100644
+--- a/cmake/QtDocsHelpers.cmake
++++ b/cmake/QtDocsHelpers.cmake
+@@ -47,9 +47,14 @@ function(qt_internal_add_docs)
+         set(doc_tools_libexec "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}/${INSTALL_LIBEXECDIR}")
+     endif()
+ 
+-    set(qdoc_bin "${doc_tools_bin}/qdoc${CMAKE_EXECUTABLE_SUFFIX}")
+-    set(qtattributionsscanner_bin "${doc_tools_libexec}/qtattributionsscanner${CMAKE_EXECUTABLE_SUFFIX}")
+-    set(qhelpgenerator_bin "${doc_tools_libexec}/qhelpgenerator${CMAKE_EXECUTABLE_SUFFIX}")
++    set(tool_dependencies_enabled FALSE)
++
++    find_path(qdoc_path name qdoc PATHS ENV QTTOOLSPATH)
++    find_path(qtattributionsscanner_path name qtattributionsscanner PATHS ENV QTTOOLSPATH)
++    find_path(qhelpgenerator_path name qhelpgenerator PATHS ENV QTTOOLSPATH)
++    set(qdoc_bin "${qdoc_path}/qdoc${CMAKE_EXECUTABLE_SUFFIX}")
++    set(qtattributionsscanner_bin "${qtattributionsscanner_path}/qtattributionsscanner${CMAKE_EXECUTABLE_SUFFIX}")
++    set(qhelpgenerator_bin "${qhelpgenerator_path}/qhelpgenerator${CMAKE_EXECUTABLE_SUFFIX}")
+ 
+     get_target_property(target_type ${target} TYPE)
+     if (NOT target_type STREQUAL "INTERFACE_LIBRARY")
+-- 
+2.42.0
+
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0007-qtbase-pass-to-qmlimportscanner-the-QML2_IMPORT_PATH.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0007-qtbase-pass-to-qmlimportscanner-the-QML2_IMPORT_PATH.patch
new file mode 100644
index 000000000000..7bf2193bc208
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0007-qtbase-pass-to-qmlimportscanner-the-QML2_IMPORT_PATH.patch
@@ -0,0 +1,30 @@
+From d7a9a3b0ecdbb1b5829f25954d763d767f1c8794 Mon Sep 17 00:00:00 2001
+From: Nick Cao <nickcao@nichi.co>
+Date: Tue, 10 Oct 2023 10:12:56 -0400
+Subject: [PATCH 07/11] qtbase: pass to qmlimportscanner the QML2_IMPORT_PATH
+
+---
+ src/tools/macdeployqt/shared/shared.cpp | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/tools/macdeployqt/shared/shared.cpp b/src/tools/macdeployqt/shared/shared.cpp
+index 2ae4f998944..ba10ae02bcd 100644
+--- a/src/tools/macdeployqt/shared/shared.cpp
++++ b/src/tools/macdeployqt/shared/shared.cpp
+@@ -1297,6 +1297,13 @@ bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf
+     argumentList.append( "-importPath");
+     argumentList.append(qmlImportsPath);
+ 
++    // In a modularized installation of qt as we have in Nix, instead, we will
++    // read the paths from the environment, as they are spread in multiple
++    // locations and normally set in the environment like this
++    auto envQmlImportPaths = ::qgetenv("QML2_IMPORT_PATH").split(':');
++    for (const QString &importPath : envQmlImportPaths)
++        argumentList << "-importPath" << importPath;
++
+     // run qmlimportscanner
+     QProcess qmlImportScanner;
+     qmlImportScanner.start(qmlImportScannerPath, argumentList);
+-- 
+2.42.0
+
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0008-qtbase-allow-translations-outside-prefix.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0008-qtbase-allow-translations-outside-prefix.patch
new file mode 100644
index 000000000000..07f1973d7607
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0008-qtbase-allow-translations-outside-prefix.patch
@@ -0,0 +1,22 @@
+From 79da6bb6ff075e8cf972be8a462630f1ec86bf0a Mon Sep 17 00:00:00 2001
+From: Nick Cao <nickcao@nichi.co>
+Date: Tue, 10 Oct 2023 10:14:40 -0400
+Subject: [PATCH 08/11] qtbase: allow translations outside prefix
+
+---
+ cmake/QtBuild.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/QtBuildPathsHelpers.cmake b/cmake/QtBuildPathsHelpers.cmake
+index edc43f2f14..78fa219515 100644
+--- a/cmake/QtBuildPathsHelpers.cmake
++++ b/cmake/QtBuildPathsHelpers.cmake
+@@ -134,7 +134,7 @@ function(qt_configure_process_path name default docstring)
+             set(rel_path ".")
+         elseif(rel_path MATCHES "^\.\./")
+             # INSTALL_SYSCONFDIR is allowed to be outside the prefix.
+-            if(NOT name STREQUAL "INSTALL_SYSCONFDIR")
++            if(NOT (name STREQUAL "INSTALL_SYSCONFDIR" OR name STREQUAL "INSTALL_TRANSLATIONSDIR"))
+                 message(FATAL_ERROR
+                     "Path component '${name}' is outside computed install prefix: ${rel_path} ")
+                 return()
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0009-qtbase-find-qmlimportscanner-in-macdeployqt-via-envi.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0009-qtbase-find-qmlimportscanner-in-macdeployqt-via-envi.patch
new file mode 100644
index 000000000000..fb17a539f053
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0009-qtbase-find-qmlimportscanner-in-macdeployqt-via-envi.patch
@@ -0,0 +1,36 @@
+From d503be89320f0b89b80acb19769971e855be6ae1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Juan=20Pedro=20Bol=C3=ADvar=20Puente?= <raskolnikov@gnu.org>
+Date: Wed, 9 Aug 2023 16:16:21 +0200
+Subject: [PATCH 09/11] qtbase: find qmlimportscanner in macdeployqt via
+ environment
+
+The qmlimportscanner tool is provided by qtdeclarative. Because of the
+modularized installation in Nix, it can not be found via the usual
+mechanisms.  Also, hard-coding it like we do for Qt5 would also not
+work, as it would require making qtbase depend on qtdeclarative.
+
+Here we add an option to provide its location via the environment.
+While this means macdeployqt does not work out of the box, it provides
+a workaround for users.
+---
+ src/tools/macdeployqt/shared/shared.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/tools/macdeployqt/shared/shared.cpp b/src/tools/macdeployqt/shared/shared.cpp
+index ba10ae02bcd..320095a972d 100644
+--- a/src/tools/macdeployqt/shared/shared.cpp
++++ b/src/tools/macdeployqt/shared/shared.cpp
+@@ -1277,6 +1277,10 @@ bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf
+     if (!QFile::exists(qmlImportScannerPath))
+         qmlImportScannerPath = QCoreApplication::applicationDirPath() + "/qmlimportscanner";
+ 
++    // Fallback: Pass qml import scanner via environment variable
++    if (!QFile::exists(qmlImportScannerPath))
++        qmlImportScannerPath = ::qgetenv("NIX_QMLIMPORTSCANNER");
++
+     // Verify that we found a qmlimportscanner binary
+     if (!QFile::exists(qmlImportScannerPath)) {
+         LogError() << "qmlimportscanner not found at" << qmlImportScannerPath;
+-- 
+2.42.0
+
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0010-qtbase-check-in-the-QML-folder-of-this-library-does-.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0010-qtbase-check-in-the-QML-folder-of-this-library-does-.patch
new file mode 100644
index 000000000000..ed749cb238a5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0010-qtbase-check-in-the-QML-folder-of-this-library-does-.patch
@@ -0,0 +1,35 @@
+From c00e310092d9aeb48adf21dd22f1ee4dbdbf5ebb Mon Sep 17 00:00:00 2001
+From: Nick Cao <nickcao@nichi.co>
+Date: Tue, 10 Oct 2023 10:17:00 -0400
+Subject: [PATCH 10/11] qtbase: check in the QML folder of this library does
+ actually exist
+
+In a modularized installation, this folder will be the location where
+`qtbase` itself is installed, but `qtbase` does not have any QML
+code, and `qmlimportscanner` will complain that it does not exist.
+---
+ src/tools/macdeployqt/shared/shared.cpp | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/tools/macdeployqt/shared/shared.cpp b/src/tools/macdeployqt/shared/shared.cpp
+index 320095a972d..87ba0d4e24b 100644
+--- a/src/tools/macdeployqt/shared/shared.cpp
++++ b/src/tools/macdeployqt/shared/shared.cpp
+@@ -1297,9 +1297,12 @@ bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf
+     }
+     for (const QString &importPath : qmlImportPaths)
+         argumentList << "-importPath" << importPath;
++
+     QString qmlImportsPath = QLibraryInfo::path(QLibraryInfo::QmlImportsPath);
+-    argumentList.append( "-importPath");
+-    argumentList.append(qmlImportsPath);
++    if (QFile::exists(qmlImportsPath)) {
++        argumentList.append( "-importPath");
++        argumentList.append(qmlImportsPath);
++    }
+ 
+     // In a modularized installation of qt as we have in Nix, instead, we will
+     // read the paths from the environment, as they are spread in multiple
+-- 
+2.42.0
+
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0011-qtbase-derive-plugin-load-path-from-PATH.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0011-qtbase-derive-plugin-load-path-from-PATH.patch
new file mode 100644
index 000000000000..22530f453536
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0011-qtbase-derive-plugin-load-path-from-PATH.patch
@@ -0,0 +1,33 @@
+From f0c4d3860b75cb064d066045907622d536044096 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Milan=20P=C3=A4ssler?= <me@pbb.lc>
+Date: Sun, 10 May 2020 12:47:28 +0200
+Subject: [PATCH 11/11] qtbase: derive plugin load path from PATH
+
+---
+ src/corelib/kernel/qcoreapplication.cpp | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
+index a80efbb5622..8cf9e85da43 100644
+--- a/src/corelib/kernel/qcoreapplication.cpp
++++ b/src/corelib/kernel/qcoreapplication.cpp
+@@ -2991,6 +2991,16 @@ QStringList QCoreApplication::libraryPathsLocked()
+         QStringList *app_libpaths = new QStringList;
+         coreappdata()->app_libpaths.reset(app_libpaths);
+ 
++        // Add library paths derived from PATH
++        const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(QStringLiteral(":"));
++        const QString plugindir = QStringLiteral("../" NIXPKGS_QT_PLUGIN_PREFIX);
++        for (const QString &path: paths) {
++            if (!path.isEmpty()) {
++                app_libpaths->append(QDir::cleanPath(path + QDir::separator() + plugindir));
++            }
++        }
++
++
+         auto setPathsFromEnv = [&](QString libPathEnv) {
+             if (!libPathEnv.isEmpty()) {
+                 QStringList paths = libPathEnv.split(QDir::listSeparator(), Qt::SkipEmptyParts);
+-- 
+2.42.0
+
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/qtdeclarative-default-disable-qmlcache.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtdeclarative-default-disable-qmlcache.patch
new file mode 100644
index 000000000000..a204d52c9f0c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtdeclarative-default-disable-qmlcache.patch
@@ -0,0 +1,29 @@
+From 2d561e0a80f2d123a7348187975ee845f9dcd9e0 Mon Sep 17 00:00:00 2001
+From: Nick Cao <nickcao@nichi.co>
+Date: Tue, 10 Oct 2023 11:12:27 -0400
+Subject: [PATCH] qtdeclarative: disable qml disk cache
+
+---
+ src/qml/jsruntime/qv4engine.cpp | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
+index d1b4c4fff6..50f8a07420 100644
+--- a/src/qml/jsruntime/qv4engine.cpp
++++ b/src/qml/jsruntime/qv4engine.cpp
+@@ -2232,11 +2232,7 @@ ExecutionEngine::DiskCacheOptions ExecutionEngine::diskCacheOptions() const
+ {
+     if (forceDiskCache())
+         return DiskCache::Enabled;
+-    if (disableDiskCache() || debugger())
+-        return DiskCache::Disabled;
+-    static const DiskCacheOptions options = qmlGetConfigOption<
+-            DiskCacheOptions, transFormDiskCache>("QML_DISK_CACHE");
+-    return options;
++    return DiskCache::Disabled;
+ }
+ 
+ void ExecutionEngine::callInContext(QV4::Function *function, QObject *self,
+-- 
+2.42.0
+
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/qtdeclarative-qml-paths.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtdeclarative-qml-paths.patch
new file mode 100644
index 000000000000..39b7a30892cf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtdeclarative-qml-paths.patch
@@ -0,0 +1,12 @@
+diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp
+index 2e482c220d..4873809bec 100644
+--- a/src/qml/qml/qqmlimport.cpp
++++ b/src/qml/qml/qqmlimport.cpp
+@@ -1517,6 +1517,7 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e)
+     // env import paths
+     addEnvImportPath("QML_IMPORT_PATH");
+     addEnvImportPath("QML2_IMPORT_PATH");
++    addEnvImportPath("NIXPKGS_QT6_QML_IMPORT_PATH");
+ 
+     addImportPath(QStringLiteral("qrc:/qt/qml"));
+     addImportPath(QStringLiteral("qrc:/qt-project.org/imports"));
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/qttools-paths.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/qttools-paths.patch
new file mode 100644
index 000000000000..6e7b8488fa54
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/qttools-paths.patch
@@ -0,0 +1,27 @@
+diff --git a/src/linguist/shared/runqttool.cpp b/src/linguist/shared/runqttool.cpp
+index d355b9dc..94fef33f 100644
+--- a/src/linguist/shared/runqttool.cpp
++++ b/src/linguist/shared/runqttool.cpp
+@@ -20,9 +20,21 @@ class FMT {
+     Q_DECLARE_TR_FUNCTIONS(Linguist)
+ };
+
++static QString qtBasePath(QLibraryInfo::LibraryPath location)
++{
++  switch (location) {
++    case QLibraryInfo::BinariesPath:
++      return QLatin1String(NIX_OUTPUT_OUT) + QLatin1String("/bin");
++    case QLibraryInfo::LibraryExecutablesPath:
++      return QLatin1String(NIX_OUTPUT_OUT) + QLatin1String("/libexec");
++    default:
++      return QLibraryInfo::path(location);
++  }
++}
++
+ static QString qtToolFilePath(const QString &toolName, QLibraryInfo::LibraryPath location)
+ {
+-    QString filePath = QLibraryInfo::path(location) + QLatin1Char('/') + toolName;
++    QString filePath = qtBasePath(location) + QLatin1Char('/') + toolName;
+ #ifdef Q_OS_WIN
+     filePath.append(QLatin1String(".exe"));
+ #endif
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-copy-certificate-chain.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-copy-certificate-chain.patch
new file mode 100644
index 000000000000..c7e461945c04
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-copy-certificate-chain.patch
@@ -0,0 +1,16 @@
+diff --git a/src/3rdparty/chromium/net/cert/x509_util_apple.cc b/src/3rdparty/chromium/net/cert/x509_util_apple.cc
+index ae69948dfca..7062a9a9b97 100644
+--- a/src/3rdparty/chromium/net/cert/x509_util_apple.cc
++++ b/src/3rdparty/chromium/net/cert/x509_util_apple.cc
+@@ -139,11 +139,6 @@ SHA256HashValue CalculateFingerprint256(SecCertificateRef cert) {
+ 
+ base::ScopedCFTypeRef<CFArrayRef> CertificateChainFromSecTrust(
+     SecTrustRef trust) {
+-  if (__builtin_available(macOS 12.0, iOS 15.0, *)) {
+-    return base::ScopedCFTypeRef<CFArrayRef>(
+-        SecTrustCopyCertificateChain(trust));
+-  }
+-
+   base::ScopedCFTypeRef<CFMutableArrayRef> chain(
+       CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks));
+   const CFIndex chain_length = SecTrustGetCertificateCount(trust);
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-low-latency-flag.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-low-latency-flag.patch
new file mode 100644
index 000000000000..3df917edf5cc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-low-latency-flag.patch
@@ -0,0 +1,61 @@
+diff --git a/src/3rdparty/chromium/media/gpu/mac/vt_video_encode_accelerator_mac.cc b/src/3rdparty/chromium/media/gpu/mac/vt_video_encode_accelerator_mac.cc
+index d4b0161b2e..e5a0eb1967 100644
+--- a/src/3rdparty/chromium/media/gpu/mac/vt_video_encode_accelerator_mac.cc
++++ b/src/3rdparty/chromium/media/gpu/mac/vt_video_encode_accelerator_mac.cc
+@@ -29,12 +29,6 @@
+ #include "media/base/video_types.h"
+ #include "media/video/video_encode_accelerator.h"
+ 
+-// This is a min version of macOS where we want to support SVC encoding via
+-// EnableLowLatencyRateControl flag. The flag is actually supported since 11.3,
+-// but there we see frame drops even with ample bitrate budget. Excessive frame
+-// drops were fixed in 12.0.1.
+-#define LOW_LATENCY_FLAG_AVAILABLE_VER 12.0.1
+-
+ namespace media {
+ 
+ namespace {
+@@ -277,8 +271,6 @@ VTVideoEncodeAccelerator::GetSupportedH264Profiles() {
+   profile.rate_control_modes = VideoEncodeAccelerator::kConstantMode |
+                                VideoEncodeAccelerator::kVariableMode;
+   profile.scalability_modes.push_back(SVCScalabilityMode::kL1T1);
+-  if (__builtin_available(macOS LOW_LATENCY_FLAG_AVAILABLE_VER, *))
+-    profile.scalability_modes.push_back(SVCScalabilityMode::kL1T2);
+ 
+   for (const auto& supported_profile : kSupportedProfiles) {
+     if (VideoCodecProfileToVideoCodec(supported_profile) == VideoCodec::kH264) {
+@@ -814,14 +806,6 @@ bool VTVideoEncodeAccelerator::CreateCompressionSession(
+     encoder_values.push_back(kCFBooleanFalse);
+   }
+ 
+-  if (__builtin_available(macOS LOW_LATENCY_FLAG_AVAILABLE_VER, *)) {
+-    // Remove the validation once HEVC SVC mode is supported on macOS.
+-    if (require_low_delay_ && codec == VideoCodec::kH264) {
+-      encoder_keys.push_back(
+-          kVTVideoEncoderSpecification_EnableLowLatencyRateControl);
+-      encoder_values.push_back(kCFBooleanTrue);
+-    }
+-  }
+   base::ScopedCFTypeRef<CFDictionaryRef> encoder_spec =
+       video_toolbox::DictionaryWithKeysAndValues(
+           encoder_keys.data(), encoder_values.data(), encoder_keys.size());
+@@ -891,19 +875,8 @@ bool VTVideoEncodeAccelerator::ConfigureCompressionSession(VideoCodec codec) {
+ 
+   // Remove the validation once HEVC SVC mode is supported on macOS.
+   if (num_temporal_layers_ == 2 && codec_ == VideoCodec::kH264) {
+-    if (__builtin_available(macOS LOW_LATENCY_FLAG_AVAILABLE_VER, *)) {
+-      if (!session_property_setter.IsSupported(
+-              kVTCompressionPropertyKey_BaseLayerFrameRateFraction)) {
+-        DLOG(ERROR) << "BaseLayerFrameRateFraction is not supported";
+-        return false;
+-      }
+-      rv &= session_property_setter.Set(
+-          kVTCompressionPropertyKey_BaseLayerFrameRateFraction, 0.5);
+-      DLOG_IF(ERROR, !rv) << " Setting BaseLayerFrameRate property failed.";
+-    } else {
+       DLOG(ERROR) << "SVC encoding is not supported on this OS version.";
+       rv = false;
+-    }
+   }
+ 
+   return rv;
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-link-pulseaudio.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-link-pulseaudio.patch
new file mode 100644
index 000000000000..c4302113786e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-link-pulseaudio.patch
@@ -0,0 +1,24 @@
+From da66a74e8b8e57b4a60b2cd0d18ef3bebb15509c Mon Sep 17 00:00:00 2001
+From: Nick Cao <nickcao@nichi.co>
+Date: Tue, 10 Oct 2023 11:45:24 -0400
+Subject: [PATCH 1/2] qtwebengine: link pulseaudio
+
+---
+ src/core/CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
+index 4153ce180..e89f41798 100644
+--- a/src/core/CMakeLists.txt
++++ b/src/core/CMakeLists.txt
+@@ -340,6 +340,7 @@ foreach(arch ${archs})
+             use_static_angle=true
+             chrome_root_store_supported=false
+             trial_comparison_cert_verifier_supported=false
++            link_pulseaudio=true
+         )
+         extend_gn_list(gnArgArg
+             ARGS use_v8_context_snapshot v8_use_external_startup_data
+-- 
+2.42.0
+
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-locales-path.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-locales-path.patch
new file mode 100644
index 000000000000..fecdb93cd547
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-locales-path.patch
@@ -0,0 +1,41 @@
+From 6f0068359f32d1e7ebaa32650c3b608c008a1127 Mon Sep 17 00:00:00 2001
+From: Nick Cao <nickcao@nichi.co>
+Date: Tue, 10 Oct 2023 11:46:28 -0400
+Subject: [PATCH 2/2] qtwebengine: fix path to locales
+
+---
+ src/core/api/CMakeLists.txt          | 3 ++-
+ src/core/web_engine_library_info.cpp | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/core/api/CMakeLists.txt b/src/core/api/CMakeLists.txt
+index a3cb53e17..fcb6d70c5 100644
+--- a/src/core/api/CMakeLists.txt
++++ b/src/core/api/CMakeLists.txt
+@@ -190,7 +190,8 @@ if(QT_FEATURE_framework)
+ 
+ else()
+     install(FILES ${localeFiles}
+-        DESTINATION ${INSTALL_TRANSLATIONSDIR}/qtwebengine_locales
++        # Nixpkgs: INSTALL_TRANSLATIONSDIR points to Qt base translations store path
++        DESTINATION ${INSTALL_DATADIR}/qtwebengine_locales
+         CONFIGURATIONS ${config}
+     )
+     install(FILES ${resourceFiles}
+diff --git a/src/core/web_engine_library_info.cpp b/src/core/web_engine_library_info.cpp
+index c03c9a3b2..430fdfab2 100644
+--- a/src/core/web_engine_library_info.cpp
++++ b/src/core/web_engine_library_info.cpp
+@@ -203,7 +203,8 @@ QString localesPath()
+             candidatePaths << getResourcesPath(frameworkBundle()) % QDir::separator()
+                             % QLatin1String("qtwebengine_locales");
+ #endif
+-            candidatePaths << QLibraryInfo::path(QLibraryInfo::TranslationsPath) % QDir::separator()
++            // Nixpkgs: match the changes made in CMakeLists.txt
++            candidatePaths << QLibraryInfo::path(QLibraryInfo::DataPath) % QDir::separator()
+                             % QLatin1String("qtwebengine_locales");
+             candidatePaths << fallbackDir();
+         }
+-- 
+2.42.0
+
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-xkb-includes.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-xkb-includes.patch
new file mode 100644
index 000000000000..5056550ccecd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-xkb-includes.patch
@@ -0,0 +1,12 @@
+--- a/src/3rdparty/chromium/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc	2023-04-19 21:58:29.127258300 +0900
++++ b/src/3rdparty/chromium/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc	2023-04-19 22:01:35.860196284 +0900
+@@ -637,8 +637,7 @@
+                           .variant = layout_variant.c_str(),
+                           .options = ""};
+   std::unique_ptr<xkb_context, XkbContextDeleter> context;
+-  context.reset(xkb_context_new(XKB_CONTEXT_NO_DEFAULT_INCLUDES));
+-  xkb_context_include_path_append(context.get(), "/usr/share/X11/xkb");
++  context.reset(xkb_context_new(XKB_CONTEXT_NO_FLAGS));
+   std::unique_ptr<xkb_keymap, XkbKeymapDeleter> keymap;
+   keymap.reset(xkb_keymap_new_from_names(context.get(), &names,
+                                          XKB_KEYMAP_COMPILE_NO_FLAGS));
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/qt-env.nix b/nixpkgs/pkgs/development/libraries/qt-6/qt-env.nix
new file mode 100644
index 000000000000..f0bf8721074f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/qt-env.nix
@@ -0,0 +1,22 @@
+{ buildEnv, qtbase }: name: paths:
+
+buildEnv {
+  inherit name;
+  paths = [ qtbase ] ++ paths;
+
+  pathsToLink = [ "/bin" "/mkspecs" "/include" "/lib" "/share" "/libexec" ];
+  extraOutputsToInstall = [ "out" "dev" ];
+
+  postBuild = ''
+    for f in qmake qmake6; do
+      rm "$out/bin/$f"
+      cp "${qtbase}/bin/$f" "$out/bin"
+    done
+    cat >"$out/bin/qt.conf" <<EOF
+    [Paths]
+    Prefix = $out
+    Plugins = ${qtbase.qtPluginPrefix}
+    Qml2Imports = ${qtbase.qtQmlPrefix}
+    EOF
+  '';
+}
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/qtModule.nix b/nixpkgs/pkgs/development/libraries/qt-6/qtModule.nix
new file mode 100644
index 000000000000..5434be84fa59
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/qtModule.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, cmake
+, ninja
+, perl
+, moveBuildTree
+, srcs
+, patches ? [ ]
+}:
+
+args:
+
+let
+  inherit (args) pname;
+  version = args.version or srcs.${pname}.version;
+  src = args.src or srcs.${pname}.src;
+in
+stdenv.mkDerivation (args // {
+  inherit pname version src;
+  patches = args.patches or patches.${pname} or [ ];
+
+  buildInputs = args.buildInputs or [ ];
+  nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ cmake ninja perl ]
+    ++ lib.optionals stdenv.isDarwin [ moveBuildTree ];
+  propagatedBuildInputs =
+    (lib.warnIf (args ? qtInputs) "qt6.qtModule's qtInputs argument is deprecated" args.qtInputs or []) ++
+    (args.propagatedBuildInputs or []);
+
+  moveToDev = false;
+
+  outputs = args.outputs or [ "out" "dev" ];
+
+  dontWrapQtApps = args.dontWrapQtApps or true;
+
+  meta = with lib; {
+    homepage = "https://www.qt.io/";
+    description = "A cross-platform application framework for C++";
+    license = with licenses; [ fdl13Plus gpl2Plus lgpl21Plus lgpl3Plus ];
+    maintainers = with maintainers; [ milahu nickcao ];
+    platforms = platforms.unix;
+  } // (args.meta or { });
+})
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/srcs.nix b/nixpkgs/pkgs/development/libraries/qt-6/srcs.nix
new file mode 100644
index 000000000000..5fef072f3990
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/srcs.nix
@@ -0,0 +1,318 @@
+# DO NOT EDIT! This file is generated automatically.
+# Command: ./maintainers/scripts/fetch-kde-qt.sh pkgs/development/libraries/qt-6/fetch.sh
+{ fetchurl, mirror }:
+
+{
+  qt3d = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qt3d-everywhere-src-6.6.2.tar.xz";
+      sha256 = "10l5ldw8g8m1ig3hh78pwg749xqf2gw9vsi8p67gbkanmipfqx4i";
+      name = "qt3d-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qt5compat = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qt5compat-everywhere-src-6.6.2.tar.xz";
+      sha256 = "0rqr34lqf4mjdgjj09wzlvkxfknz8arjl9p30xpqbr2qfsmhhyz0";
+      name = "qt5compat-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtactiveqt = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtactiveqt-everywhere-src-6.6.2.tar.xz";
+      sha256 = "16vqb33s0dwxq1rrha81606fdwq1dz7az6mybgx18n7f081h3yl7";
+      name = "qtactiveqt-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtbase = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtbase-everywhere-src-6.6.2.tar.xz";
+      sha256 = "0yv78bwqzy975854h53rbiilsms62f3v02i3jqz7v8ajk1ml56xq";
+      name = "qtbase-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtcharts = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtcharts-everywhere-src-6.6.2.tar.xz";
+      sha256 = "1x7m87lxbza4ynf6dq7yshann6003302a5fxih5l5d07xri64j5i";
+      name = "qtcharts-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtconnectivity = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtconnectivity-everywhere-src-6.6.2.tar.xz";
+      sha256 = "1dzsvs0hngrz6b66r9zb4al5a4r6xxfd29i8g3jqmvw3b0452vx3";
+      name = "qtconnectivity-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtdatavis3d = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtdatavis3d-everywhere-src-6.6.2.tar.xz";
+      sha256 = "0iqw5afx8y29kjprn1hlz0zr0qwc9j0m7my75qf1av800hlnnjii";
+      name = "qtdatavis3d-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtdeclarative = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtdeclarative-everywhere-src-6.6.2.tar.xz";
+      sha256 = "0k6qndjvkkx3g8lr7f64xx86b3cwxzkgpl6fr6cp73s6qjkyk763";
+      name = "qtdeclarative-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtdoc = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtdoc-everywhere-src-6.6.2.tar.xz";
+      sha256 = "0hvv40y2h7xa7wj2cqz2rrsvy1xf2l95199vmgx4q27wgmn1xixg";
+      name = "qtdoc-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtgraphs = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtgraphs-everywhere-src-6.6.2.tar.xz";
+      sha256 = "19j9hdpxrclsdwqqblp4bk94zd2a5rvxnf548hm7r03npznjvb26";
+      name = "qtgraphs-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtgrpc = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtgrpc-everywhere-src-6.6.2.tar.xz";
+      sha256 = "1flfm8j5vw2j6xzms1b470mbqyab1nrnj4z9s4mgwnbsp4m5p85w";
+      name = "qtgrpc-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qthttpserver = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qthttpserver-everywhere-src-6.6.2.tar.xz";
+      sha256 = "1qzw96y20qr1kc9wmys61wm568jsknvlgvh09bbqjcmm6dm3lhd2";
+      name = "qthttpserver-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtimageformats = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtimageformats-everywhere-src-6.6.2.tar.xz";
+      sha256 = "1cvwm0hnspglydms6qhcp5g0ayz5pamigl52kz8km66l6s8lqn3i";
+      name = "qtimageformats-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtlanguageserver = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtlanguageserver-everywhere-src-6.6.2.tar.xz";
+      sha256 = "1bgazi44mwac20biybhp21icgwa8k7jd295j8jsfgzxbw12lq7y3";
+      name = "qtlanguageserver-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtlocation = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtlocation-everywhere-src-6.6.2.tar.xz";
+      sha256 = "05glwmasg0rlhybzpb640iibcs6gyrqbs7h1ws4b5vgcmzzdq9cy";
+      name = "qtlocation-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtlottie = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtlottie-everywhere-src-6.6.2.tar.xz";
+      sha256 = "1hqhp55jfasavk7p8xb0srbc6lnk70w2q0x4iwn28z5s5kd1cvi7";
+      name = "qtlottie-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtmultimedia = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtmultimedia-everywhere-src-6.6.2.tar.xz";
+      sha256 = "1v0430jnv97ws6cizn9mi8zr9hcg7rixd0jg7smhdq8apacjb572";
+      name = "qtmultimedia-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtnetworkauth = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtnetworkauth-everywhere-src-6.6.2.tar.xz";
+      sha256 = "1lijsdwbj8gscfllmp358n5ysa8pvhx2msh7gpxvb4x81daxbg9j";
+      name = "qtnetworkauth-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtpositioning = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtpositioning-everywhere-src-6.6.2.tar.xz";
+      sha256 = "1qn31vps9dj4g8m7d195qlsyj3p4dfqqszdc6yqq097dq5y5d9sd";
+      name = "qtpositioning-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtquick3d = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtquick3d-everywhere-src-6.6.2.tar.xz";
+      sha256 = "0f1sp7d1jzdzaxqs2l2yjprp0axcqbg2w82dza7wl4paan4rzp7w";
+      name = "qtquick3d-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtquick3dphysics = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtquick3dphysics-everywhere-src-6.6.2.tar.xz";
+      sha256 = "10209x9hbr5bc4vlhhcvvfsmsn2h3dyb4rlg0f0gpllx68mr58ac";
+      name = "qtquick3dphysics-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtquickeffectmaker = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtquickeffectmaker-everywhere-src-6.6.2.tar.xz";
+      sha256 = "0lywm71wp943dk3w8zkklyxfk97w48v670zs6pc4pj4ja0ns37q7";
+      name = "qtquickeffectmaker-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtquicktimeline = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtquicktimeline-everywhere-src-6.6.2.tar.xz";
+      sha256 = "06cr9p0hrq77ckqslxh0h3lpyw31fblyap1plcyyj8ssr1rm4klc";
+      name = "qtquicktimeline-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtremoteobjects = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtremoteobjects-everywhere-src-6.6.2.tar.xz";
+      sha256 = "0fbkjzykxpkz8myr6dy588gcmhyy3lar17v78zfam8kyxq7s5qxa";
+      name = "qtremoteobjects-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtscxml = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtscxml-everywhere-src-6.6.2.tar.xz";
+      sha256 = "0gm4805570ds3jmkbwrjigbg93zc561bd5rc52r71042zzq84j89";
+      name = "qtscxml-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtsensors = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtsensors-everywhere-src-6.6.2.tar.xz";
+      sha256 = "0a3w50bfnmxndyxnn9lsy1wxffhm2am0yjxqx3vx0gfjwv79yvsa";
+      name = "qtsensors-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtserialbus = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtserialbus-everywhere-src-6.6.2.tar.xz";
+      sha256 = "0g7sx81lrb5r2ipinnghq4iss6clkwbzjb0ck4ay6hmpw54smzww";
+      name = "qtserialbus-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtserialport = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtserialport-everywhere-src-6.6.2.tar.xz";
+      sha256 = "16j5fprmdzzc1snnj5184ihq5avg1s0jrqqcjk70dvmimsf0q7ms";
+      name = "qtserialport-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtshadertools = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtshadertools-everywhere-src-6.6.2.tar.xz";
+      sha256 = "0bxrczs9nw6az2p4n8x0f660vsmxxynx4iqgj75l4zsfzzbym2v2";
+      name = "qtshadertools-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtspeech = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtspeech-everywhere-src-6.6.2.tar.xz";
+      sha256 = "1qvf3p2p1pc5fw40d8zq0iawaaqkc0dp5yx85b1dnw1j809bn8y0";
+      name = "qtspeech-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtsvg = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtsvg-everywhere-src-6.6.2.tar.xz";
+      sha256 = "10c1dmbv5d39n1q4m67gf2h4n6wfkzrlyk8plnxbyhhvxxcis8ss";
+      name = "qtsvg-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qttools = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qttools-everywhere-src-6.6.2.tar.xz";
+      sha256 = "0ij7djy06xi4v5v29fh31gqq5rnc12vviv3qg3vqf4hiaagrxm76";
+      name = "qttools-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qttranslations = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qttranslations-everywhere-src-6.6.2.tar.xz";
+      sha256 = "0xqcad8aa9lp6wzh1rs46id6r60zdw82qj3bq9k2b89sxy8c0fna";
+      name = "qttranslations-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtvirtualkeyboard = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtvirtualkeyboard-everywhere-src-6.6.2.tar.xz";
+      sha256 = "07nqds49g2x748jsk17cnd2ph81165xnzn70jwxd0gpbi3dzshk1";
+      name = "qtvirtualkeyboard-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtwayland = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtwayland-everywhere-src-6.6.2.tar.xz";
+      sha256 = "0y6x84ckcc53ddclnrlzs08b1kvw6saw9nim0hz4wc5fyz7dbkcv";
+      name = "qtwayland-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtwebchannel = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtwebchannel-everywhere-src-6.6.2.tar.xz";
+      sha256 = "1incvisc3j758b4k82vnwci8j1bba8zf6xgmgcrsm553k4wpsz1x";
+      name = "qtwebchannel-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtwebengine = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtwebengine-everywhere-src-6.6.2.tar.xz";
+      sha256 = "15h3hniszfkxv2vnn3fnbgbar8wb41ypgn4b4iz4iy6csar8f7fn";
+      name = "qtwebengine-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtwebsockets = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtwebsockets-everywhere-src-6.6.2.tar.xz";
+      sha256 = "1y9q8jmspxbfxf07jdcg4n8zwmchccyzp0z68fxr0hnvr2dymrn0";
+      name = "qtwebsockets-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+  qtwebview = {
+    version = "6.6.2";
+    src = fetchurl {
+      url = "${mirror}/official_releases/qt/6.6/6.6.2/submodules/qtwebview-everywhere-src-6.6.2.tar.xz";
+      sha256 = "0z3p1g26yg3dr3hhavwd5wz9b8yi838xj4s57068wykd80v145wb";
+      name = "qtwebview-everywhere-src-6.6.2.tar.xz";
+    };
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qtdbusextended/default.nix b/nixpkgs/pkgs/development/libraries/qtdbusextended/default.nix
new file mode 100644
index 000000000000..22fa37611dd5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qtdbusextended/default.nix
@@ -0,0 +1,38 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, qmake
+, wrapQtAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "qtdbusextended";
+  version = "0.0.3";
+
+  src = fetchFromGitHub {
+    owner = "nemomobile";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-tUp7OhNBXwomR2tO4UOaR0vJQ3GTirMk/hRl1cMk61o=";
+  };
+
+  postPatch = ''
+    substituteInPlace src/src.pro \
+      --replace '$$[QT_INSTALL_LIBS]' "$out/lib" \
+      --replace '$$[QT_INSTALL_HEADERS]' "$out/include" \
+      --replace '$$[QMAKE_MKSPECS]' "$out/mkspecs"
+  '';
+
+  nativeBuildInputs = [
+    qmake
+    wrapQtAppsHook
+  ];
+
+  meta = with lib; {
+    description = "Qt provides several classes for DBus communication";
+    homepage = "https://github.com/nemomobile/qtdbusextended";
+    license = licenses.lgpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ rewine ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qtfeedback/default.nix b/nixpkgs/pkgs/development/libraries/qtfeedback/default.nix
new file mode 100644
index 000000000000..a329ece074ba
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qtfeedback/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, mkDerivation
+, fetchFromGitHub
+, perl
+, qmake
+, qtbase
+, qtdeclarative
+}:
+
+mkDerivation rec {
+  pname = "qtfeedback";
+  version = "unstable-2018-09-03";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "qt";
+    repo = "qtfeedback";
+    rev = "a14bd0bb1373cde86e09e3619fb9dc70f34c71f2";
+    sha256 = "0kiiffvriagql1cark6g1qxy7l9c3q3s13cx3s2plbz19nlnikj7";
+  };
+
+  nativeBuildInputs = [
+    perl
+    qmake
+  ];
+
+  buildInputs = [
+    qtdeclarative
+  ];
+
+  qmakeFlags = [ "CONFIG+=git_build" ];
+
+  doCheck = true;
+
+  postFixup = ''
+    # Drop QMAKE_PRL_BUILD_DIR because it references the build dir
+    find "$out/lib" -type f -name '*.prl' \
+      -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
+  '';
+
+  meta = with lib; {
+    description = "Qt Tactile Feedback";
+    homepage = "https://github.com/qt/qtfeedback";
+    license = with licenses; [ lgpl3Only /* or */ gpl2Plus ];
+    maintainers = with maintainers; [ dotlambda OPNA2608 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qtforkawesome/default.nix b/nixpkgs/pkgs/development/libraries/qtforkawesome/default.nix
new file mode 100644
index 000000000000..432023a2ac65
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qtforkawesome/default.nix
@@ -0,0 +1,61 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, qttools
+, perl
+, cpp-utilities
+, qtutilities
+, qtbase
+}:
+
+let
+  fork_awesome_release = fetchFromGitHub {
+    owner = "ForkAwesome";
+    repo = "Fork-Awesome";
+    rev = "1.2.0";
+    sha256 = "sha256-zG6/0dWjU7/y/oDZuSEv+54Mchng64LVyV8bluskYzc=";
+  };
+in stdenv.mkDerivation (finalAttrs: {
+  pname = "qtforkawesome";
+  version = "0.1.0";
+
+  src = fetchFromGitHub {
+    owner = "Martchus";
+    repo = "qtforkawesome";
+    rev = "v${finalAttrs.version}";
+    sha256 = "sha256-9e2TCg3itYtHZSvzCoaiIZmgsCMIoebh6C/XWtKz/2Q=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    qttools
+    perl
+    perl.pkgs.YAML
+  ];
+
+  buildInputs = [
+    qtbase
+    cpp-utilities
+    qtutilities
+  ];
+  cmakeFlags = [
+    "-DQT_PACKAGE_PREFIX=Qt${lib.versions.major qtbase.version}"
+    # Current freetype used by NixOS users doesn't support the `.woff2` font
+    # format, so we use ttf. See
+    # https://github.com/NixOS/nixpkgs/pull/174875#discussion_r883423881
+    "-DFORK_AWESOME_FONT_FILE=${fork_awesome_release}/fonts/forkawesome-webfont.ttf"
+    "-DFORK_AWESOME_ICON_DEFINITIONS=${fork_awesome_release}/src/icons/icons.yml"
+  ];
+
+  dontWrapQtApps = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/Martchus/qtforkawesome";
+    description = "Library that bundles ForkAwesome for use within Qt applications";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ doronbehar ];
+    platforms   = platforms.linux ++ platforms.darwin;
+  };
+})
+
diff --git a/nixpkgs/pkgs/development/libraries/qtinstaller/default.nix b/nixpkgs/pkgs/development/libraries/qtinstaller/default.nix
new file mode 100644
index 000000000000..0fd21a1a2968
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qtinstaller/default.nix
@@ -0,0 +1,46 @@
+{ stdenv, fetchurl, qtdeclarative , qttools, qtbase, qmake }:
+
+stdenv.mkDerivation rec {
+  pname = "qtinstaller";
+
+  propagatedBuildInputs = [ qtdeclarative qttools ];
+  nativeBuildInputs = [ qmake ];
+
+  version = "2.0.3";
+  src = fetchurl {
+    url = "http://download.qt.io/official_releases/qt-installer-framework/${version}/qt-installer-framework-opensource-${version}-src.tar.gz";
+    sha256 = "003gwjg02isw8qjyka377g1ahlisfyi44l6xfa4hvvdgqqq0hy2f";
+    name = "qt-installer-framework-opensource-src-${version}.tar.gz";
+  };
+
+  outputs = [ "out" "dev" "doc" ];
+
+  setOutputFlags = false;
+  NIX_QT_SUBMODULE = true;
+  dontWrapQtApps = true;
+
+  installPhase = ''
+    mkdir -p $out/{bin,lib,share/qt-installer-framework}
+    cp -a bin/{archivegen,binarycreator,devtool,installerbase,repogen} $out/bin
+    cp -a lib/{libinstaller.so*,lib7z.a} $out/lib
+    cp -a examples $out/share/qt-installer-framework/
+  '';
+
+  postFixup = ''
+    moveToOutput "bin/archivegen" "$out"
+    moveToOutput "bin/binarycreator" "$out"
+    moveToOutput "bin/devtool" "$out"
+    moveToOutput "bin/installerbase" "$out"
+    moveToOutput "bin/repogen" "$out"
+    moveToOutput "share" "$doc"
+    moveToOutput "lib/libinstaller.so" "$out"
+    moveToOutput "lib/libinstaller.so.1" "$out"
+    moveToOutput "lib/libinstaller.so.1.0" "$out"
+    moveToOutput "lib/libinstaller.so.1.0.0" "$out"
+  '';
+
+  meta = {
+    description = "Qt installer framework";
+    inherit (qtbase.meta) platforms license homepage;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qtkeychain/default.nix b/nixpkgs/pkgs/development/libraries/qtkeychain/default.nix
new file mode 100644
index 000000000000..564eb31a7139
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qtkeychain/default.nix
@@ -0,0 +1,64 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, qtbase
+, qttools
+, CoreFoundation
+, Security
+, libsecret
+}:
+
+stdenv.mkDerivation rec {
+  pname = "qtkeychain";
+  version = "0.14.2";
+
+  src = fetchFromGitHub {
+    owner = "frankosterfeld";
+    repo = "qtkeychain";
+    rev = version;
+    sha256 = "sha256-aRBhg4RwK2jUQWW/OmzNSMUScaFUPdbWbApD37CXPoI=";
+  };
+
+  dontWrapQtApps = true;
+
+  # HACK `propagatedSandboxProfile` does not appear to actually propagate the sandbox profile from `qtbase`
+  sandboxProfile = toString qtbase.__propagatedSandboxProfile or null;
+
+  cmakeFlags = [
+    "-DBUILD_WITH_QT6=${if lib.versions.major qtbase.version == "6" then "ON" else "OFF"}"
+    "-DQT_TRANSLATIONS_DIR=share/qt/translations"
+  ];
+
+  nativeBuildInputs = [ cmake ]
+    ++ lib.optionals (!stdenv.isDarwin) [ pkg-config ] # for finding libsecret
+  ;
+
+  buildInputs = lib.optionals (!stdenv.isDarwin) [ libsecret ]
+    ++ [ qtbase qttools ]
+    ++ lib.optionals stdenv.isDarwin [
+    CoreFoundation
+    Security
+  ];
+
+  doInstallCheck = true;
+
+  # we previously had a note in here saying to run this check manually, so we might as
+  # well do it automatically. It seems like a perfectly valid sanity check, but I
+  # have no idea *why* we might need it
+  installCheckPhase = ''
+    runHook preInstallCheck
+
+    grep --quiet -R 'set(PACKAGE_VERSION "${version}"' .
+
+    runHook postInstallCheck
+  '';
+
+  meta = {
+    description = "Platform-independent Qt API for storing passwords securely";
+    homepage = "https://github.com/frankosterfeld/qtkeychain";
+    license = lib.licenses.bsd3;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qtmpris/default.nix b/nixpkgs/pkgs/development/libraries/qtmpris/default.nix
new file mode 100644
index 000000000000..ef595efa731d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qtmpris/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, mkDerivation
+, fetchFromGitHub
+, qmake
+, qtbase
+}:
+
+mkDerivation rec {
+  pname = "qtmpris";
+  version = "1.0.6";
+
+  src = fetchFromGitHub {
+    owner = "sailfishos";
+    repo = "qtmpris";
+    rev = version;
+    hash = "sha256-kuM8hUdsa7N+eLDbwYw3ay+PWxg35zcTBOvGow1NlzI=";
+  };
+
+  postPatch = ''
+    substituteInPlace src/src.pro \
+      --replace '$$[QT_INSTALL_LIBS]'    "$out/lib" \
+      --replace '$$[QT_INSTALL_HEADERS]' "$out/include" \
+      --replace '$$[QMAKE_MKSPECS]'      "$out/mkspecs"
+  '';
+
+  nativeBuildInputs = [
+    qmake
+  ];
+
+  buildInputs = [
+    qtbase
+  ];
+
+  meta = {
+    description = "Qt and QML MPRIS interface and adaptor";
+    homepage = "https://github.com/sailfishos/qtmpris";
+    license = lib.licenses.lgpl21Plus;
+    maintainers = with lib.maintainers; [ dotlambda ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qtpbfimageplugin/default.nix b/nixpkgs/pkgs/development/libraries/qtpbfimageplugin/default.nix
new file mode 100644
index 000000000000..04cda55b30d3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qtpbfimageplugin/default.nix
@@ -0,0 +1,42 @@
+{ lib, stdenv, fetchFromGitHub, qmake, qtbase, protobuf }:
+
+stdenv.mkDerivation rec {
+  pname = "qtpbfimageplugin";
+  version = "3.0";
+
+  src = fetchFromGitHub {
+    owner = "tumic0";
+    repo = "QtPBFImagePlugin";
+    rev = version;
+    sha256 = "sha256-RYZnuHjK6/ygFsjjnOTz7glYnibTwDNlou/4cQ7HfKM=";
+  };
+
+  nativeBuildInputs = [ qmake ];
+  buildInputs = [ qtbase protobuf ];
+
+  dontWrapQtApps = true;
+
+  postPatch = ''
+    # Fix plugin dir
+    substituteInPlace pbfplugin.pro \
+      --replace "\$\$[QT_INSTALL_PLUGINS]" "$out/$qtPluginPrefix"
+  '' + lib.optionalString stdenv.isDarwin ''
+    # Fix darwin build
+    substituteInPlace pbfplugin.pro \
+      --replace '$$PROTOBUF/include' '${protobuf}/include' \
+      --replace '$$PROTOBUF/lib/libprotobuf-lite.a' '${protobuf}/lib/libprotobuf-lite.dylib'
+  '';
+
+  meta = with lib; {
+    description = "Qt image plugin for displaying Mapbox vector tiles";
+    longDescription = ''
+      QtPBFImagePlugin is a Qt image plugin that enables applications capable of
+      displaying raster MBTiles maps or raster XYZ online maps to also display PBF
+      vector tiles without (almost) any application modifications.
+    '';
+    homepage = "https://github.com/tumic0/QtPBFImagePlugin";
+    license = licenses.lgpl3Only;
+    maintainers = with maintainers; [ sikmir ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qtstyleplugin-kvantum/default.nix b/nixpkgs/pkgs/development/libraries/qtstyleplugin-kvantum/default.nix
new file mode 100644
index 000000000000..64f3b81edde9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qtstyleplugin-kvantum/default.nix
@@ -0,0 +1,81 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, qmake
+, qtbase
+, qtsvg
+, qtx11extras ? null
+, kwindowsystem ? null
+, qtwayland
+, libX11
+, libXext
+, qttools
+, wrapQtAppsHook
+, gitUpdater
+
+, qt5Kvantum ? null
+}:
+let
+  isQt6 = lib.versionAtLeast qtbase.version "6";
+in
+stdenv.mkDerivation rec {
+  pname = "qtstyleplugin-kvantum${lib.optionalString isQt6 "6"}";
+  version = "1.0.10";
+
+  src = fetchFromGitHub {
+    owner = "tsujan";
+    repo = "Kvantum";
+    rev = "V${version}";
+    sha256 = "48Blio8qHLmXSKG0c1tphXSfiwQXs0Xqwxe187nM3Ro=";
+  };
+
+  nativeBuildInputs = [
+    qmake
+    qttools
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    qtbase
+    qtsvg
+    libX11
+    libXext
+  ] ++ lib.optionals (!isQt6) [ qtx11extras kwindowsystem ]
+    ++ lib.optional isQt6 qtwayland;
+
+  sourceRoot = "${src.name}/Kvantum";
+
+  patches = [
+    (fetchpatch {
+      # add xdg dirs support
+      url = "https://github.com/tsujan/Kvantum/commit/01989083f9ee75a013c2654e760efd0a1dea4a68.patch";
+      hash = "sha256-HPx+p4Iek/Me78olty1fA0dUNceK7bwOlTYIcQu8ycc=";
+      stripLen = 1;
+    })
+  ];
+
+  postPatch = ''
+    # Fix plugin dir
+    substituteInPlace style/style.pro \
+      --replace "\$\$[QT_INSTALL_PLUGINS]" "$out/$qtPluginPrefix"
+  '';
+
+  postInstall = lib.optionalString isQt6 ''
+    # make default Kvantum themes available for Qt 6 apps
+    mkdir -p "$out/share"
+    ln -s "${qt5Kvantum}/share/Kvantum" "$out/share/Kvantum"
+  '';
+
+  passthru.updateScript = gitUpdater {
+    rev-prefix = "V";
+  };
+
+  meta = with lib; {
+    description = "SVG-based Qt5 theme engine plus a config tool and extra themes";
+    homepage = "https://github.com/tsujan/Kvantum";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ romildo Scrumplex ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qtstyleplugins/default.nix b/nixpkgs/pkgs/development/libraries/qtstyleplugins/default.nix
new file mode 100644
index 000000000000..ebc7bc081933
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qtstyleplugins/default.nix
@@ -0,0 +1,37 @@
+{ lib, mkDerivation, fetchFromGitHub, fetchpatch, qmake, pkg-config, gtk2 }:
+
+mkDerivation {
+  pname = "qtstyleplugins";
+  version = "unstable-2017-03-11";
+
+  src = fetchFromGitHub {
+    owner = "qt";
+    repo = "qtstyleplugins";
+    rev = "335dbece103e2cbf6c7cf819ab6672c2956b17b3";
+    sha256 = "085wyn85nrmzr8nv5zv7fi2kqf8rp1gnd30h72s30j55xvhmxvmy";
+  };
+
+  patches = [
+    (fetchpatch rec {
+      name = "0001-fix-build-against-Qt-5.15.patch";
+      url = "https://aur.archlinux.org/cgit/aur.git/plain/${name}?h=qt5-styleplugins";
+      sha256 = "j0CgfutqFawy11IqFnlrkfMsMD01NjX/MkfVEVxj1QM=";
+    })
+    (fetchpatch rec {
+      name = "0002-fix-gtk2-background.patch";
+      url = "https://aur.archlinux.org/cgit/aur.git/plain/${name}?h=qt5-styleplugins";
+      sha256 = "qUOkNckrSUEzXY1PUZKfbiCjhNyB5ZBw2IN/j32GKM4=";
+    })
+  ];
+
+  nativeBuildInputs = [ pkg-config qmake ];
+  buildInputs = [ gtk2 ];
+
+  meta = with lib; {
+    description = "Additional style plugins for Qt5, including BB10, GTK, Cleanlooks, Motif, Plastique";
+    homepage = "http://blog.qt.io/blog/2012/10/30/cleaning-up-styles-in-qt5-and-adding-fusion/";
+    license = licenses.lgpl21;
+    maintainers = [ ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qtutilities/default.nix b/nixpkgs/pkgs/development/libraries/qtutilities/default.nix
new file mode 100644
index 000000000000..797e9fb891b6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qtutilities/default.nix
@@ -0,0 +1,44 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, qttools
+, cpp-utilities
+, qtbase
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "qtutilities";
+  version = "6.13.4";
+
+  src = fetchFromGitHub {
+    owner = "Martchus";
+    repo = "qtutilities";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-AlDPu2mD2OrjBq3tUxQBAoqD32L9MiSjcUNGWzpj/xc=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    qttools
+  ];
+  buildInputs = [
+    qtbase
+    cpp-utilities
+  ];
+
+  cmakeFlags = [
+    "-DQT_PACKAGE_PREFIX=Qt${lib.versions.major qtbase.version}"
+    "-DBUILD_SHARED_LIBS=ON"
+  ];
+
+  dontWrapQtApps = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/Martchus/qtutilities";
+    description = "Common Qt related C++ classes and routines used by @Martchus' applications such as dialogs, widgets and models Topics";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ doronbehar ];
+    platforms   = platforms.linux ++ platforms.darwin;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/qtwebkit-plugins/default.nix b/nixpkgs/pkgs/development/libraries/qtwebkit-plugins/default.nix
new file mode 100644
index 000000000000..dd6a7606f6e2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qtwebkit-plugins/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchFromGitHub, qmake, qtwebkit, hunspell }:
+
+stdenv.mkDerivation {
+  pname = "qtwebkit-plugins";
+  version = "unstable-2017-01-25";
+
+  src = fetchFromGitHub {
+    owner = "QupZilla";
+    repo = "qtwebkit-plugins";
+    rev = "b58ee9d5b31977491662aa4e8bee16404638bf14";
+    sha256 = "04wvlhdj45g1v1a3zl0pkf9r72i22h1br10lhhrgad7ypym974gw";
+  };
+
+  nativeBuildInputs = [ qmake ];
+
+  buildInputs = [ qtwebkit hunspell ];
+
+  dontWrapQtApps = true;
+
+  postPatch = ''
+    sed -i "s,-lhunspell,-lhunspell-${lib.versions.majorMinor hunspell.version}," src/spellcheck/spellcheck.pri
+    sed -i "s,\$\$\[QT_INSTALL_PLUGINS\],$out/$qtPluginPrefix," src/src.pro
+  '';
+
+  meta = with lib; {
+    description = "Spell checking plugin using Hunspell and HTML5 Notifications plugin for QtWebKit";
+    homepage = "https://github.com/QupZilla/qtwebkit-plugins";
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ abbradar ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/quantlib/default.nix b/nixpkgs/pkgs/development/libraries/quantlib/default.nix
new file mode 100644
index 000000000000..6dcf59928615
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/quantlib/default.nix
@@ -0,0 +1,31 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, boost
+}:
+
+stdenv.mkDerivation rec {
+  pname = "quantlib";
+  version = "1.29";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "lballabio";
+    repo = "QuantLib";
+    rev = "QuantLib-v${version}";
+    sha256 = "sha256-TpVn3zPru/GtdNqDH45YdOkm7fkJzv/qay9SY3J6Jiw=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ boost ];
+
+  meta = with lib; {
+    description = "A free/open-source library for quantitative finance";
+    homepage = "https://quantlib.org";
+    platforms = platforms.unix;
+    license = licenses.bsd3;
+    maintainers = [];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/quarto/default.nix b/nixpkgs/pkgs/development/libraries/quarto/default.nix
new file mode 100644
index 000000000000..47cfae648294
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/quarto/default.nix
@@ -0,0 +1,90 @@
+{ stdenv
+, lib
+, pandoc
+, esbuild
+, deno
+, fetchurl
+, dart-sass
+, rWrapper
+, rPackages
+, extraRPackages ? []
+, makeWrapper
+, runCommand
+, python3
+, quarto
+, extraPythonPackages ? ps: with ps; []
+, sysctl
+}:
+
+stdenv.mkDerivation (final: {
+  pname = "quarto";
+  version = "1.3.450";
+  src = fetchurl {
+    url = "https://github.com/quarto-dev/quarto-cli/releases/download/v${final.version}/quarto-${final.version}-linux-amd64.tar.gz";
+    sha256 = "sha256-bcj7SzEGfQxsw9P8WkcLrKurPupzwpgIGtxoE3KVwAU=";
+  };
+
+  nativeBuildInputs = [
+    makeWrapper
+  ];
+
+  patches = [
+    ./fix-deno-path.patch
+  ];
+
+  postPatch = ''
+    # Compat for Deno >=1.26
+    substituteInPlace bin/quarto.js \
+      --replace 'Deno.setRaw(stdin.rid, ' 'Deno.stdin.setRaw(' \
+      --replace 'Deno.setRaw(Deno.stdin.rid, ' 'Deno.stdin.setRaw('
+  '';
+
+  dontStrip = true;
+
+  preFixup = ''
+    wrapProgram $out/bin/quarto \
+      --prefix PATH : ${lib.makeBinPath [ deno ]} \
+      --prefix QUARTO_PANDOC : ${pandoc}/bin/pandoc \
+      --prefix QUARTO_ESBUILD : ${esbuild}/bin/esbuild \
+      --prefix QUARTO_DART_SASS : ${dart-sass}/bin/dart-sass \
+      ${lib.optionalString (rWrapper != null) "--prefix QUARTO_R : ${rWrapper.override { packages = [ rPackages.rmarkdown ] ++ extraRPackages; }}/bin/R"} \
+      ${lib.optionalString (python3 != null) "--prefix QUARTO_PYTHON : ${python3.withPackages (ps: with ps; [ jupyter ipython ] ++ (extraPythonPackages ps))}/bin/python3"}
+  '';
+
+  installPhase = ''
+      runHook preInstall
+
+      mkdir -p $out/bin $out/share
+
+      rm -r bin/tools
+
+      mv bin/* $out/bin
+      mv share/* $out/share
+
+      runHook postInstall
+  '';
+
+  passthru.tests = {
+    quarto-check = runCommand "quarto-check" {
+      nativeBuildInputs = lib.optionals stdenv.isDarwin [ sysctl ];
+    } ''
+      export HOME="$(mktemp -d)"
+      ${quarto}/bin/quarto check
+      touch $out
+    '';
+  };
+
+  meta = with lib; {
+    description = "Open-source scientific and technical publishing system built on Pandoc";
+    longDescription = ''
+        Quarto is an open-source scientific and technical publishing system built on Pandoc.
+        Quarto documents are authored using markdown, an easy to write plain text format.
+    '';
+    homepage = "https://quarto.org/";
+    changelog = "https://github.com/quarto-dev/quarto-cli/releases/tag/v${version}";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ minijackson mrtarantoga ];
+    platforms = platforms.all;
+    sourceProvenance = with sourceTypes; [ binaryNativeCode binaryBytecode ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/quarto/fix-deno-path.patch b/nixpkgs/pkgs/development/libraries/quarto/fix-deno-path.patch
new file mode 100644
index 000000000000..895419712ad8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/quarto/fix-deno-path.patch
@@ -0,0 +1,8 @@
+--- a/bin/quarto
++++ b/bin/quarto
+@@ -125,4 +125,4 @@ fi
+ # Be sure to include any already defined QUARTO_DENO_OPTIONS
+ QUARTO_DENO_OPTIONS="--unstable --no-config --cached-only --allow-read --allow-write --allow-run --allow-env --allow-net --allow-ffi ${QUARTO_DENO_OPTIONS}"
+ 
+-"${QUARTO_DENO}" ${QUARTO_ACTION} ${QUARTO_DENO_OPTIONS} ${QUARTO_DENO_EXTRA_OPTIONS} "${QUARTO_IMPORT_ARGMAP}" "${QUARTO_TARGET}" "$@"
++deno ${QUARTO_ACTION} ${QUARTO_DENO_OPTIONS} ${QUARTO_DENO_EXTRA_OPTIONS} "${QUARTO_IMPORT_ARGMAP}" "${QUARTO_TARGET}" "$@"
diff --git a/nixpkgs/pkgs/development/libraries/quazip/default.nix b/nixpkgs/pkgs/development/libraries/quazip/default.nix
new file mode 100644
index 000000000000..c3f1f7a7834a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/quazip/default.nix
@@ -0,0 +1,29 @@
+{ fetchFromGitHub, lib, stdenv, zlib, qtbase, qt5compat ? null, cmake, fixDarwinDylibNames }:
+
+stdenv.mkDerivation rec {
+  pname = "quazip";
+  version = "1.4";
+
+  src = fetchFromGitHub {
+    owner = "stachenov";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-JPpkYvndjDcHVChAyWhpb/XiUPu/qHqDZFh5XmonXMs=";
+  };
+
+  buildInputs = [ zlib qtbase ];
+  propagatedBuildInputs = [ qt5compat ];
+  nativeBuildInputs = [ cmake ]
+    ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+  dontWrapQtApps = true;
+
+  outputs = [ "out" "dev" ];
+
+  meta = with lib; {
+    description = "Provides access to ZIP archives from Qt programs";
+    license = licenses.lgpl21Plus;
+    homepage = "https://stachenov.github.io/quazip/"; # Migrated from http://quazip.sourceforge.net/
+    platforms = with platforms; linux ++ darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/quesoglc/default.nix b/nixpkgs/pkgs/development/libraries/quesoglc/default.nix
new file mode 100644
index 000000000000..440d52d08f81
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/quesoglc/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchurl, libGLU, libGL, glew, freetype, fontconfig, fribidi, libX11 }:
+stdenv.mkDerivation rec {
+  pname = "quesoglc";
+  version = "0.7.2";
+  src = fetchurl {
+    url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.bz2";
+    sha256 = "0cf9ljdzii5d4i2m23gdmf3kn521ljcldzq69lsdywjid3pg5zjl";
+  };
+  buildInputs = [ libGLU libGL glew freetype fontconfig fribidi libX11 ];
+  # FIXME: Configure fails to use system glew.
+  meta = with lib; {
+    description = "A free implementation of the OpenGL Character Renderer";
+    longDescription = ''
+      QuesoGLC is a free (as in free speech) implementation of the OpenGL
+      Character Renderer (GLC). QuesoGLC is based on the FreeType library,
+      provides Unicode support and is designed to be easily ported to any
+      platform that supports both FreeType and the OpenGL API.
+    '';
+    homepage = "https://quesoglc.sourceforge.net/";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ astsmtl ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/quickder/default.nix b/nixpkgs/pkgs/development/libraries/quickder/default.nix
new file mode 100644
index 000000000000..68da796aa0a5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/quickder/default.nix
@@ -0,0 +1,59 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, python3
+, cmake
+, doxygen
+, graphviz
+, quickmem
+, arpa2common
+, arpa2cm
+, ensureNewerSourcesForZipFilesHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "quickder";
+  version = "1.7.1";
+
+  src = fetchFromGitLab {
+    owner = "arpa2";
+    repo = "quick-der";
+    rev = "v${version}";
+    sha256 = "sha256-f+ph5PL+uWRkswpOLDwZFWjh938wxoJ6xocJZ2WZLEk=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    doxygen
+    graphviz
+    ensureNewerSourcesForZipFilesHook
+  ];
+
+  buildInputs = [
+    arpa2cm
+    arpa2common
+    (python3.withPackages (ps: with ps; [
+      asn1ate
+      colored
+      pyparsing
+      setuptools
+      six
+    ]))
+    quickmem
+  ];
+
+
+  postPatch = ''
+    substituteInPlace setup.py --replace 'pyparsing==' 'pyparsing>='
+  '';
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Quick (and Easy) DER, a Library for parsing ASN.1";
+    homepage = "https://gitlab.com/arpa2/quick-der/";
+    license = licenses.bsd2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ leenaars ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/quickfix/default.nix b/nixpkgs/pkgs/development/libraries/quickfix/default.nix
new file mode 100644
index 000000000000..6644b9885c25
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/quickfix/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, autoconf, automake, libtool }:
+
+stdenv.mkDerivation rec {
+  pname = "quickfix";
+  version = "1.15.1";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev =  "v${version}";
+    sha256 = "1fgpwgvyw992mbiawgza34427aakn5zrik3sjld0i924a9d17qwg";
+  };
+
+  patches = [
+    # Improved C++17 compatibility
+    (fetchpatch {
+      url = "https://github.com/quickfix/quickfix/commit/a46708090444826c5f46a5dbf2ba4b069b413c58.diff";
+      sha256 = "1wlk4j0wmck0zm6a70g3nrnq8fz0id7wnyxn81f7w048061ldhyd";
+    })
+    ./disableUnitTests.patch
+  ];
+
+  # autoreconfHook does not work
+  nativeBuildInputs = [ autoconf automake libtool ];
+
+  enableParallelBuilding = true;
+
+  preConfigure = ''
+    ./bootstrap
+  '';
+
+  # More hacking out of the unittests
+  preBuild = ''
+    substituteInPlace Makefile --replace 'UnitTest++' ' '
+  '';
+
+  meta = with lib; {
+    description = "QuickFIX C++ Fix Engine Library";
+    homepage = "http://www.quickfixengine.org";
+    license = licenses.free; # similar to BSD 4-clause
+    maintainers = with maintainers; [ bhipple ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/quickfix/disableUnitTests.patch b/nixpkgs/pkgs/development/libraries/quickfix/disableUnitTests.patch
new file mode 100644
index 000000000000..41a2f698e55f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/quickfix/disableUnitTests.patch
@@ -0,0 +1,65 @@
+diff -u -r source-baseline-patchPhase/configure.ac source/configure.ac
+--- source-baseline-patchPhase/configure.ac	1970-01-01 00:00:01.000000000 +0000
++++ source/configure.ac	2021-01-12 22:49:28.948861699 +0000
+@@ -43,7 +43,7 @@
+ 
+ AC_CANONICAL_HOST
+ 
+-build_no_unit_test = no
++build_no_unit_test = yes
+ 
+ # Detect the target system
+ case "${host_os}" in
+@@ -344,8 +344,6 @@
+     examples/Makefile
+     examples/executor/Makefile
+     examples/executor/C++/Makefile
+-    examples/ordermatch/Makefile
+-    examples/ordermatch/test/Makefile
+     examples/tradeclient/Makefile
+     examples/tradeclientgui/Makefile
+     examples/tradeclientgui/banzai/Makefile
+diff -u -r source-baseline-patchPhase/examples/Makefile.am source/examples/Makefile.am
+--- source-baseline-patchPhase/examples/Makefile.am	1970-01-01 00:00:01.000000000 +0000
++++ source/examples/Makefile.am	2021-01-12 22:51:55.782568550 +0000
+@@ -1,3 +1,3 @@
+-SUBDIRS = executor ordermatch tradeclient tradeclientgui
++SUBDIRS = executor tradeclient tradeclientgui
+ 
+-EXTRA_DIST = examples.dsw configure configure.in bootstrap Makefile.am
+\ No newline at end of file
++EXTRA_DIST = examples.dsw configure configure.in bootstrap Makefile.am
+diff -u -r source-baseline-patchPhase/src/Makefile.am source/src/Makefile.am
+--- source-baseline-patchPhase/src/Makefile.am	1970-01-01 00:00:01.000000000 +0000
++++ source/src/Makefile.am	2021-01-12 22:53:02.593432380 +0000
+@@ -15,27 +15,23 @@
+ if NO_UNIT_TEST
+ noinst_PROGRAMS =
+ else
+-noinst_PROGRAMS = at ut pt
++noinst_PROGRAMS = at pt
+ endif
+ 
+ at_SOURCES = at.cpp at_application.h
+-ut_SOURCES = ut.cpp
+ pt_SOURCES = pt.cpp
+ 
+ EXTRA_DIST = getopt.c getopt-repl.h
+ 
+ at_LDADD = C++/libquickfix.la
+-ut_LDADD = C++/test/libquickfixcpptest.la C++/libquickfix.la
+ pt_LDADD = C++/libquickfix.la
+ 
+ INCLUDES =-IC++ -IC++/test -I../UnitTest++/src
+-LDFLAGS =-L../UnitTest++ -lUnitTest++
++ 
+ 
+ all-local:
+-	rm -f ../test/ut ../test/pt ../test/at ../test/ut_debug
+-	ln -s ../src/ut ../test/ut
++	rm -rf ../test/pt ../test/at ../test/ut_debug
+ 	ln -s ../src/pt ../test/pt
+ 	ln -s ../src/at ../test/at
+-	ln -s ../src/.libs/ut ../test/ut_debug
+ 
+ clean-local:
diff --git a/nixpkgs/pkgs/development/libraries/quickflux/default.nix b/nixpkgs/pkgs/development/libraries/quickflux/default.nix
new file mode 100644
index 000000000000..9f56e6793191
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/quickflux/default.nix
@@ -0,0 +1,64 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, qtbase
+, qtquickcontrols2
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "quickflux";
+  version = "1.1-unstable-2020-11-10";
+
+  src = fetchFromGitHub {
+    owner = "benlau";
+    repo = "quickflux";
+    rev = "2a37acff0416c56cb349e5bc1b841b25ff1bb6f8";
+    hash = "sha256-c0W3Qj8kY6hMcMy/v5xhwJF9+muZjotmJqhbjqQVab0=";
+  };
+
+  outputs = [
+    "out"
+    "dev"
+  ];
+
+  postPatch = ''
+    # Don't hardcode static linking, let stdenv decide
+    # Use GNUInstallDirs
+    substituteInPlace CMakeLists.txt \
+      --replace-fail 'quickflux STATIC' 'quickflux' \
+      --replace-fail 'DESTINATION include' 'DESTINATION ''${CMAKE_INSTALL_INCLUDEDIR}'
+  '';
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = [
+    qtbase
+    qtquickcontrols2
+  ];
+
+  # Only a QML module
+  dontWrapQtApps = true;
+
+  cmakeFlags = [
+    (lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
+  ];
+
+  preFixup = ''
+    # Has extra $out in includes list, breaks usage of module (complains about non-existent path in module includes)
+    substituteInPlace $out/lib/cmake/QuickFlux/QuickFluxTargets.cmake \
+      --replace "\''${_IMPORT_PREFIX}/include" '${placeholder "dev"}/include'
+  '';
+
+  meta = with lib; {
+    description = "A Flux implementation for QML";
+    homepage = "https://github.com/benlau/quickflux";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ OPNA2608 ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/quickmem/default.nix b/nixpkgs/pkgs/development/libraries/quickmem/default.nix
new file mode 100644
index 000000000000..60ea330dc014
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/quickmem/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, cmake
+, doxygen
+, graphviz
+, arpa2common
+, arpa2cm
+}:
+
+stdenv.mkDerivation rec {
+  pname = "quickmem";
+  version = "0.3.0";
+
+  src = fetchFromGitLab {
+    owner = "arpa2";
+    repo = "Quick-MEM";
+    rev = "v${version}";
+    sha256 = "sha256-cqg8QN4/I+zql7lVDDAgFA05Dmg4ylBTvPSPP7WATdc=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    doxygen
+    graphviz
+  ];
+
+  buildInputs = [
+    arpa2cm
+    arpa2common
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Memory pooling for ARPA2 projects";
+    homepage = "https://gitlab.com/arpa2/Quick-MEM/";
+    license = licenses.bsd2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ leungbk ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/quictls/default.nix b/nixpkgs/pkgs/development/libraries/quictls/default.nix
new file mode 100644
index 000000000000..110ecb4907e1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/quictls/default.nix
@@ -0,0 +1,186 @@
+{
+  buildPackages
+, cryptodev
+, enableSSL2 ? false
+, enableSSL3 ? false
+, fetchFromGitHub
+, lib
+, makeWrapper
+, perl
+, removeReferencesTo
+, static ? stdenv.hostPlatform.isStatic
+, stdenv
+, withCryptodev ? false
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "quictls";
+  version = "3.1.4-quic1";
+
+  src = fetchFromGitHub {
+    owner = "quictls";
+    repo = "openssl";
+    rev = "openssl-${finalAttrs.version}";
+    hash = "sha256-WOWoY6rmAAUvuWWXPTWsllUkew5ZIULjL1CEg/RRPsE=";
+  };
+
+  patches = [
+    ../openssl/3.0/nix-ssl-cert-file.patch
+
+    # openssl will only compile in KTLS if the current kernel supports it.
+    # This patch disables build-time detection.
+    ../openssl/3.0/openssl-disable-kernel-detection.patch
+
+    (if stdenv.hostPlatform.isDarwin
+    then ../openssl/use-etc-ssl-certs-darwin.patch
+    else ../openssl/use-etc-ssl-certs.patch)
+  ];
+
+  postPatch = ''
+    patchShebangs Configure
+  ''
+  # config is a configure script which is not installed.
+  + ''
+    substituteInPlace config --replace '/usr/bin/env' '${buildPackages.coreutils}/bin/env'
+  '' + lib.optionalString stdenv.hostPlatform.isMusl ''
+    substituteInPlace crypto/async/arch/async_posix.h \
+      --replace '!defined(__ANDROID__) && !defined(__OpenBSD__)' \
+                '!defined(__ANDROID__) && !defined(__OpenBSD__) && 0'
+  '';
+
+  nativeBuildInputs = [
+    makeWrapper
+    perl
+    removeReferencesTo
+  ];
+
+  buildInputs = lib.optionals withCryptodev [
+    cryptodev
+  ];
+
+  outputs = [ "bin" "dev" "out" "man" "doc" ];
+
+  setOutputFlags = false;
+
+  separateDebugInfo =
+    !stdenv.hostPlatform.isDarwin &&
+    !(stdenv.hostPlatform.useLLVM or false) &&
+    stdenv.cc.isGNU;
+
+  # TODO(@Ericson2314): Improve with mass rebuild
+  configurePlatforms = [ ];
+  configureScript = {
+    armv5tel-linux = "./Configure linux-armv4 -march=armv5te";
+    armv6l-linux = "./Configure linux-armv4 -march=armv6";
+    armv7l-linux = "./Configure linux-armv4 -march=armv7-a";
+    x86_64-darwin = "./Configure darwin64-x86_64-cc";
+    aarch64-darwin = "./Configure darwin64-arm64-cc";
+    x86_64-linux = "./Configure linux-x86_64";
+    x86_64-solaris = "./Configure solaris64-x86_64-gcc";
+    riscv64-linux = "./Configure linux64-riscv64";
+    mips64el-linux =
+      if stdenv.hostPlatform.isMips64n64
+      then "./Configure linux64-mips64"
+      else if stdenv.hostPlatform.isMips64n32
+      then "./Configure linux-mips64"
+      else throw "unsupported ABI for ${stdenv.hostPlatform.system}";
+  }.${stdenv.hostPlatform.system} or (
+    if stdenv.hostPlatform == stdenv.buildPlatform
+    then "./config"
+    else if stdenv.hostPlatform.isBSD && stdenv.hostPlatform.isx86_64
+    then "./Configure BSD-x86_64"
+    else if stdenv.hostPlatform.isBSD && stdenv.hostPlatform.isx86_32
+    then "./Configure BSD-x86" + lib.optionalString stdenv.hostPlatform.isElf "-elf"
+    else if stdenv.hostPlatform.isBSD
+    then "./Configure BSD-generic${toString stdenv.hostPlatform.parsed.cpu.bits}"
+    else if stdenv.hostPlatform.isMinGW
+    then "./Configure mingw${lib.optionalString
+                                   (stdenv.hostPlatform.parsed.cpu.bits != 32)
+                                   (toString stdenv.hostPlatform.parsed.cpu.bits)}"
+    else if stdenv.hostPlatform.isLinux
+    then "./Configure linux-generic${toString stdenv.hostPlatform.parsed.cpu.bits}"
+    else if stdenv.hostPlatform.isiOS
+    then "./Configure ios${toString stdenv.hostPlatform.parsed.cpu.bits}-cross"
+    else
+      throw "Not sure what configuration to use for ${stdenv.hostPlatform.config}"
+  );
+
+  # OpenSSL doesn't like the `--enable-static` / `--disable-shared` flags.
+  dontAddStaticConfigureFlags = true;
+
+  configureFlags = [
+    "shared" # "shared" builds both shared and static libraries
+    "--libdir=lib"
+    "--openssldir=etc/ssl"
+  ] ++ lib.optionals withCryptodev [
+    "-DHAVE_CRYPTODEV"
+    "-DUSE_CRYPTODEV_DIGESTS"
+  ] ++ lib.optional enableSSL2 "enable-ssl2"
+  ++ lib.optional enableSSL3 "enable-ssl3"
+  # We select KTLS here instead of the configure-time detection (which we patch out).
+  # KTLS should work on FreeBSD 13+ as well, so we could enable it if someone tests it.
+  ++ lib.optional (stdenv.isLinux && lib.versionAtLeast finalAttrs.version "3.0.0") "enable-ktls"
+  ++ lib.optional stdenv.hostPlatform.isAarch64 "no-afalgeng"
+  # OpenSSL needs a specific `no-shared` configure flag.
+  # See https://wiki.openssl.org/index.php/Compilation_and_Installation#Configure_Options
+  # for a comprehensive list of configuration options.
+  ++ lib.optional static "no-shared"
+  # This introduces a reference to the CTLOG_FILE which is undesired when
+  # trying to build binaries statically.
+  ++ lib.optional static "no-ct";
+
+  makeFlags = [
+    "MANDIR=$(man)/share/man"
+    # This avoids conflicts between man pages of openssl subcommands (for
+    # example 'ts' and 'err') man pages and their equivalent top-level
+    # command in other packages (respectively man-pages and moreutils).
+    # This is done in ubuntu and archlinux, and possiibly many other distros.
+    "MANSUFFIX=ssl"
+  ];
+
+  enableParallelBuilding = true;
+
+  postInstall = (if static then ''
+    # OPENSSLDIR has a reference to self
+    ${removeReferencesTo}/bin/remove-references-to -t $out $out/lib/*.a
+  '' else ''
+    # If we're building dynamic libraries, then don't install static
+    # libraries.
+    if [ -n "$(echo $out/lib/*.so $out/lib/*.dylib $out/lib/*.dll)" ]; then
+        rm "$out/lib/"*.a
+    fi
+  '') + ''
+    mkdir -p $bin
+    mv $out/bin $bin/bin
+
+    # c_rehash is a legacy perl script with the same functionality
+    # as `openssl rehash`
+    # this wrapper script is created to maintain backwards compatibility without
+    # depending on perl
+    makeWrapper $bin/bin/openssl $bin/bin/c_rehash \
+      --add-flags "rehash"
+
+    mkdir $dev
+    mv $out/include $dev/
+    # remove dependency on Perl at runtime
+    rm -r $out/etc/ssl/misc
+    rmdir $out/etc/ssl/{certs,private}
+  '';
+
+  postFixup = lib.optionalString (!stdenv.hostPlatform.isWindows) ''
+    # Check to make sure the main output doesn't depend on perl
+    if grep -r '${buildPackages.perl}' $out; then
+      echo "Found an erroneous dependency on perl ^^^" >&2
+      exit 1
+    fi
+  '';
+
+  meta = {
+    changelog = "https://github.com/quictls/openssl/blob/${finalAttrs.src.rev}/CHANGES.md";
+    description = "TLS/SSL and crypto library with QUIC APIs";
+    homepage = "https://quictls.github.io";
+    license = lib.licenses.openssl;
+    maintainers = with lib.maintainers; [ izorkin ];
+    platforms = lib.platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/qwlroots/default.nix b/nixpkgs/pkgs/development/libraries/qwlroots/default.nix
new file mode 100644
index 000000000000..85282afb15b5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qwlroots/default.nix
@@ -0,0 +1,69 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, pkg-config
+, wrapQtAppsHook
+, wayland-scanner
+, qtbase
+, wayland
+, wayland-protocols
+, wlr-protocols
+, pixman
+, mesa
+, vulkan-loader
+, libinput
+, xorg
+, seatd
+, wlroots
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "qwlroots";
+  version = "0.1.0";
+
+  src = fetchFromGitHub {
+    owner = "vioken";
+    repo = "qwlroots";
+    rev = finalAttrs.version;
+    hash = "sha256-ev4oCKR43XaYNTavj9XI3RAtB6RFprChpBFsrA2nVsM=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    wrapQtAppsHook
+    wayland-scanner
+  ];
+
+  buildInputs = [
+    qtbase
+    wayland
+    wayland-protocols
+    wlr-protocols
+    pixman
+    mesa
+    vulkan-loader
+    libinput
+    xorg.libXdmcp
+    xorg.xcbutilerrors
+    seatd
+  ];
+
+  propagatedBuildInputs = [
+    wlroots
+  ];
+
+  cmakeFlags = [
+    (lib.cmakeBool "PREFER_QT_5" (lib.versionOlder qtbase.version "6"))
+  ];
+
+  meta = {
+    description = "Qt and QML bindings for wlroots";
+    homepage = "https://github.com/vioken/qwlroots";
+    license = with lib.licenses; [ gpl3Only lgpl3Only asl20 ];
+    platforms = wlroots.meta.platforms;
+    maintainers = with lib.maintainers; [ rewine ];
+  };
+})
+
diff --git a/nixpkgs/pkgs/development/libraries/qwt/6_1.nix b/nixpkgs/pkgs/development/libraries/qwt/6_1.nix
new file mode 100644
index 000000000000..4e3a179e7520
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qwt/6_1.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchurl, qtbase, qtsvg, qttools, qmake }:
+
+stdenv.mkDerivation rec {
+  pname = "qwt";
+  version = "6.1.6";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/qwt/qwt-${version}.tar.bz2";
+    sha256 = "sha256-mUYNMcEV7kEXsBddiF9HwsWQ14QgbwmBXcBY++Xt4fY=";
+  };
+
+  propagatedBuildInputs = [ qtbase qtsvg qttools ];
+  nativeBuildInputs = [ qmake ];
+
+  postPatch = ''
+    sed -e "s|QWT_INSTALL_PREFIX.*=.*|QWT_INSTALL_PREFIX = $out|g" -i qwtconfig.pri
+  '';
+
+  qmakeFlags = [ "-after doc.path=$out/share/doc/qwt-${version}" ];
+
+  dontWrapQtApps = true;
+
+  meta = with lib; {
+    description = "Qt widgets for technical applications";
+    homepage = "http://qwt.sourceforge.net/";
+    # LGPL 2.1 plus a few exceptions (more liberal)
+    license = licenses.qwt;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.bjornfor ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qwt/default.nix b/nixpkgs/pkgs/development/libraries/qwt/default.nix
new file mode 100644
index 000000000000..9a2a53587e48
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qwt/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchurl, qtbase, qtsvg, qttools, qmake, fixDarwinDylibNames }:
+
+stdenv.mkDerivation rec {
+  pname = "qwt";
+  version = "6.2.0";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "mirror://sourceforge/qwt/qwt-${version}.tar.bz2";
+    sha256 = "sha256-kZT2UTlV0P1zAPZxWBdQZEYBl6urGpL6EnpnpLC3FTA=";
+  };
+
+  propagatedBuildInputs = [ qtbase qtsvg qttools ];
+  nativeBuildInputs = [ qmake ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+  postPatch = ''
+    sed -e "s|QWT_INSTALL_PREFIX.*=.*|QWT_INSTALL_PREFIX = $out|g" -i qwtconfig.pri
+  '';
+
+  qmakeFlags = [ "-after doc.path=$out/share/doc/qwt-${version}" ];
+
+  dontWrapQtApps = true;
+
+  meta = with lib; {
+    description = "Qt widgets for technical applications";
+    homepage = "http://qwt.sourceforge.net/";
+    # LGPL 2.1 plus a few exceptions (more liberal)
+    license = lib.licenses.qwt;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.bjornfor ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qxlsx/default.nix b/nixpkgs/pkgs/development/libraries/qxlsx/default.nix
new file mode 100644
index 000000000000..2626eefa8cd4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qxlsx/default.nix
@@ -0,0 +1,34 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, qtbase
+}:
+
+stdenv.mkDerivation rec {
+  pname = "qxlsx";
+  version = "1.4.7";
+
+  src = fetchFromGitHub {
+    owner = "QtExcel";
+    repo = "QXlsx";
+    rev = "v${version}";
+    hash = "sha256-E3x2IUPMRmPSTRN01sXJ0PZaN7iBzatr2vwan2sZxf0=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ qtbase ];
+
+  preConfigure = ''
+    cd QXlsx
+  '';
+
+  dontWrapQtApps = true;
+
+  meta = with lib;{
+    description = "Excel file(*.xlsx) reader/writer library using Qt 5 or 6";
+    homepage = "https://qtexcel.github.io/QXlsx";
+    license = licenses.mit;
+    maintainers = with maintainers; [ nickcao ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qxmpp/default.nix b/nixpkgs/pkgs/development/libraries/qxmpp/default.nix
new file mode 100644
index 000000000000..a2e80d415d18
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qxmpp/default.nix
@@ -0,0 +1,54 @@
+{ mkDerivation
+, lib
+, fetchFromGitHub
+, cmake
+, pkg-config
+, withGstreamer ? true
+, gst_all_1
+, withOmemo ? true
+, qca-qt5
+, libomemo-c
+}:
+
+mkDerivation rec {
+  pname = "qxmpp";
+  version = "1.6.0";
+
+  src = fetchFromGitHub {
+    owner = "qxmpp-project";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-5NPqNQuVuRz9GfrJULSmTiYHUMe6VxoaQZDHhYCguWQ=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ] ++ lib.optionals (withGstreamer || withOmemo) [
+    pkg-config
+  ];
+  buildInputs = lib.optionals withGstreamer (with gst_all_1; [
+    gstreamer
+    gst-plugins-bad
+    gst-plugins-base
+    gst-plugins-good
+  ]) ++ lib.optionals withOmemo [
+    qca-qt5
+    libomemo-c
+  ];
+  cmakeFlags = [
+    "-DBUILD_EXAMPLES=false"
+    "-DBUILD_TESTS=false"
+  ] ++ lib.optionals withGstreamer [
+    "-DWITH_GSTREAMER=ON"
+  ] ++ lib.optionals withOmemo [
+    "-DBUILD_OMEMO=ON"
+  ];
+
+  meta = with lib; {
+    description = "Cross-platform C++ XMPP client and server library";
+    homepage = "https://github.com/qxmpp-project/qxmpp";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ astro ];
+    platforms = with platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/qzxing/default.nix b/nixpkgs/pkgs/development/libraries/qzxing/default.nix
new file mode 100644
index 000000000000..4cb224e2c040
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qzxing/default.nix
@@ -0,0 +1,59 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, nix-update-script
+, testers
+, qmake
+, qtmultimedia
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "qzxing";
+  version = "3.3.0";
+
+  src = fetchFromGitHub {
+    owner = "ftylitak";
+    repo = "qzxing";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-ASgsF5ocNWAiIy2jm6ygpDkggBcEpno6iVNWYkuWcVI=";
+  };
+
+  # QMake can't find qtmultimedia in buildInputs
+  strictDeps = false;
+
+  nativeBuildInputs = [
+    qmake
+  ];
+
+  buildInputs = [
+    qtmultimedia
+  ];
+
+  dontWrapQtApps = true;
+
+  preConfigure = ''
+    cd src
+  '';
+
+  qmakeFlags = [
+    "CONFIG+=qzxing_qml"
+    "CONFIG+=qzxing_multimedia"
+    "QMAKE_PKGCONFIG_PREFIX=${placeholder "out"}"
+  ];
+
+  passthru = {
+    tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+    updateScript = nix-update-script { };
+  };
+
+  meta = with lib; {
+    description = "Qt/QML wrapper library for the ZXing library";
+    homepage = "https://github.com/ftylitak/qzxing";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ OPNA2608 ];
+    platforms = platforms.unix;
+    pkgConfigModules = [
+      "QZXing"
+    ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/rabbitmq-c/default.nix b/nixpkgs/pkgs/development/libraries/rabbitmq-c/default.nix
new file mode 100644
index 000000000000..a500e5dbc045
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rabbitmq-c/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, cmake, openssl, popt, xmlto }:
+
+stdenv.mkDerivation rec {
+  pname = "rabbitmq-c";
+  version = "0.13.0";
+
+  src = fetchFromGitHub {
+    owner = "alanxz";
+    repo = "rabbitmq-c";
+    rev = "v${version}";
+    sha256 = "sha256-4tSZ+eaLZAkSmFsGnIrRXNvn3xA/4sTKyYZ3hPUMcd0=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ openssl popt xmlto ];
+
+  # https://github.com/alanxz/rabbitmq-c/issues/733
+  postPatch = ''
+    substituteInPlace CMakeLists.txt \
+      --replace '\$'{exec_prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
+      --replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
+  '';
+
+  meta = with lib; {
+    description = "RabbitMQ C AMQP client library";
+    homepage = "https://github.com/alanxz/rabbitmq-c";
+    license = licenses.mit;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/rabbitmq-java-client/default.nix b/nixpkgs/pkgs/development/libraries/rabbitmq-java-client/default.nix
new file mode 100644
index 000000000000..92aee32c38d1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rabbitmq-java-client/default.nix
@@ -0,0 +1,36 @@
+{ fetchurl, lib, stdenv, ant, jdk, jre, python2, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  pname = "rabbitmq-java-client";
+  version = "3.3.4";
+
+  src = fetchurl {
+    url = "https://www.rabbitmq.com/releases/rabbitmq-java-client/v${version}/rabbitmq-java-client-${version}.tar.gz";
+    sha256 = "03kspkgzzjsbq6f8yl2zj5m30qwgxv3l58hrbf6gcgxb5rpfk6sh";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ ant jdk python2 ];
+
+  buildPhase = "ant dist";
+
+  installPhase = ''
+    mkdir -p $out/bin $out/share/java
+    cp build/lib/*.jar lib/*.jar $out/share/java
+
+    # There is a script in the source archive, but ours is cleaner
+    makeWrapper ${jre}/bin/java $out/bin/PerfTest \
+      --add-flags "-Djava.awt.headless=true -cp $out/share/java/\* com.rabbitmq.examples.PerfTest"
+  '';
+
+  meta = with lib; {
+    description = "RabbitMQ Java client library which allows Java code to interface to AMQP servers";
+    homepage = "https://www.rabbitmq.com/java-client.html";
+    sourceProvenance = with sourceTypes; [
+      fromSource
+      binaryBytecode  # source bundles dependencies as jars
+    ];
+    license = with licenses; [ mpl11 gpl2 ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/raft-canonical/default.nix b/nixpkgs/pkgs/development/libraries/raft-canonical/default.nix
new file mode 100644
index 000000000000..a1ce524be2f0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/raft-canonical/default.nix
@@ -0,0 +1,55 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, file, libuv, lz4, lxd }:
+
+stdenv.mkDerivation rec {
+  pname = "raft-canonical";
+  version = "0.18.1";
+
+  src = fetchFromGitHub {
+    owner = "canonical";
+    repo = "raft";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-ogTw0+ZFhMRaLAxAAXzHSlLRYFuX8W/zjqglXHfvUv4=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook file pkg-config ];
+  buildInputs = [ libuv lz4 ];
+
+  enableParallelBuilding = true;
+
+  patches = [
+    # network tests either hang indefinitely, or fail outright
+    ./disable-net-tests.patch
+
+    # missing dir check is flaky
+    ./disable-missing-dir-test.patch
+  ];
+
+  preConfigure = ''
+    substituteInPlace configure --replace /usr/bin/ " "
+  '';
+
+  doCheck = true;
+
+  outputs = [ "dev" "out" ];
+
+  passthru.tests = {
+    inherit lxd;
+  };
+
+  meta = with lib; {
+    description = ''
+      Fully asynchronous C implementation of the Raft consensus protocol
+    '';
+    longDescription = ''
+      The library has modular design: its core part implements only the core
+      Raft algorithm logic, in a fully platform independent way. On top of
+      that, a pluggable interface defines the I/O implementation for networking
+      (send/receive RPC messages) and disk persistence (store log entries and
+      snapshots).
+    '';
+    homepage = "https://github.com/canonical/raft";
+    license = licenses.asl20;
+    platforms = platforms.linux;
+    maintainers = teams.lxc.members;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/raft-canonical/disable-missing-dir-test.patch b/nixpkgs/pkgs/development/libraries/raft-canonical/disable-missing-dir-test.patch
new file mode 100644
index 000000000000..ddfec9b22e14
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/raft-canonical/disable-missing-dir-test.patch
@@ -0,0 +1,23 @@
+diff --git a/test/unit/test_uv_fs.c b/test/unit/test_uv_fs.c
+index 638c39c..c8758d2 100644
+--- a/test/unit/test_uv_fs.c
++++ b/test/unit/test_uv_fs.c
+@@ -40,18 +40,6 @@ TEST(UvFsCheckDir, exists, DirSetUp, DirTearDown, 0, NULL)
+     return MUNIT_OK;
+ }
+ 
+-/* If the directory doesn't exist, it an error is returned. */
+-TEST(UvFsCheckDir, doesNotExist, DirSetUp, DirTearDown, 0, NULL)
+-{
+-    const char *parent = data;
+-    char errmsg[RAFT_ERRMSG_BUF_SIZE];
+-    char dir[128];
+-    sprintf(errmsg, "%s/sub", parent);
+-    sprintf(errmsg, "directory '%s' does not exist", dir);
+-    CHECK_DIR_ERROR(dir, RAFT_NOTFOUND, errmsg);
+-    return MUNIT_OK;
+-}
+-
+ /* If the process can't access the directory, an error is returned. */
+ TEST(UvFsCheckDir, permissionDenied, NULL, NULL, 0, NULL)
+ {
diff --git a/nixpkgs/pkgs/development/libraries/raft-canonical/disable-net-tests.patch b/nixpkgs/pkgs/development/libraries/raft-canonical/disable-net-tests.patch
new file mode 100644
index 000000000000..7c8be29feafd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/raft-canonical/disable-net-tests.patch
@@ -0,0 +1,16 @@
+diff --git a/Makefile.am b/Makefile.am
+index 2137932..93abdb6 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -198,11 +198,7 @@ test_integration_uv_SOURCES = \
+   test/integration/test_uv_bootstrap.c \
+   test/integration/test_uv_load.c \
+   test/integration/test_uv_recover.c \
+-  test/integration/test_uv_recv.c \
+-  test/integration/test_uv_send.c \
+   test/integration/test_uv_set_term.c \
+-  test/integration/test_uv_tcp_connect.c \
+-  test/integration/test_uv_tcp_listen.c \
+   test/integration/test_uv_snapshot_put.c \
+   test/integration/test_uv_truncate.c \
+   test/integration/test_uv_work.c
diff --git a/nixpkgs/pkgs/development/libraries/randomx/default.nix b/nixpkgs/pkgs/development/libraries/randomx/default.nix
new file mode 100644
index 000000000000..4e85b3688ab7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/randomx/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "randomX";
+  version = "1.2.1";
+
+  nativeBuildInputs = [ cmake ];
+
+  src = fetchFromGitHub {
+    owner = "tevador";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-dfImzwbEfJQcaPZCoWypHiI6dishVRdqS/r+n3tfjvM=";
+  };
+
+  meta = with lib; {
+    description = "Proof of work algorithm based on random code execution";
+    homepage = "https://github.com/tevador/RandomX";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ rnhmjoj ];
+    platforms = platforms.unix;
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/rang/default.nix b/nixpkgs/pkgs/development/libraries/rang/default.nix
new file mode 100644
index 000000000000..050beef5ea30
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rang/default.nix
@@ -0,0 +1,19 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+stdenv.mkDerivation rec {
+  pname = "rang";
+  version = "3.1.0";
+  src = fetchFromGitHub {
+    owner = "agauniyal";
+    repo = "rang";
+    rev = "cabe04d6d6b05356fa8f9741704924788f0dd762";
+    sha256 = "0v2pz0l2smagr3j4abjccshg4agaccfz79m5ayvrvqq5d4rlds0s";
+  };
+  nativeBuildInputs = [ cmake ];
+  meta = with lib; {
+    description =
+      "A Minimal, Header only Modern c++ library for terminal goodies";
+    homepage = "https://agauniyal.github.io/rang/";
+    license = licenses.unlicense;
+    maintainers = [ maintainers.HaoZeke ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/range-v3/default.nix b/nixpkgs/pkgs/development/libraries/range-v3/default.nix
new file mode 100644
index 000000000000..77db5869f62a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/range-v3/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "range-v3";
+  version = "0.12.0";
+
+  src = fetchFromGitHub {
+    owner = "ericniebler";
+    repo = "range-v3";
+    rev = version;
+    hash = "sha256-bRSX91+ROqG1C3nB9HSQaKgLzOHEFy9mrD2WW3PRBWU=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  # Building the tests currently fails on AArch64 due to internal compiler
+  # errors (with GCC 9.2):
+  cmakeFlags = [ "-DRANGES_ENABLE_WERROR=OFF" ]
+    ++ lib.optional stdenv.isAarch64 "-DRANGE_V3_TESTS=OFF";
+
+  doCheck = !stdenv.isAarch64;
+  checkTarget = "test";
+
+  meta = with lib; {
+    description = "Experimental range library for C++11/14/17";
+    homepage = "https://github.com/ericniebler/range-v3";
+    changelog = "https://github.com/ericniebler/range-v3/releases/tag/${version}";
+    license = licenses.boost;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/rapidcheck/default.nix b/nixpkgs/pkgs/development/libraries/rapidcheck/default.nix
new file mode 100644
index 000000000000..68f2e5e096a8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rapidcheck/default.nix
@@ -0,0 +1,50 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, unstableGitUpdater
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "rapidcheck";
+  version = "unstable-2023-12-14";
+
+  src = fetchFromGitHub {
+    owner = "emil-e";
+    repo  = "rapidcheck";
+    rev   = "ff6af6fc683159deb51c543b065eba14dfcf329b";
+    hash = "sha256-Ixz5RpY0n8Un/Pv4XoTfbs40+70iyMbkQUjDqoLaWOg=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [
+    (lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
+    (lib.cmakeBool "RC_INSTALL_ALL_EXTRAS" true)
+  ];
+
+  passthru = {
+    updateScript = unstableGitUpdater { };
+    tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+  };
+
+  meta = with lib; {
+    description = "A C++ framework for property based testing inspired by QuickCheck";
+    inherit (finalAttrs.src.meta) homepage;
+    maintainers = with maintainers; [ ];
+    license = licenses.bsd2;
+    pkgConfigModules = [
+      "rapidcheck"
+      # Extras
+      "rapidcheck_boost"
+      "rapidcheck_boost_test"
+      "rapidcheck_catch"
+      "rapidcheck_doctest"
+      "rapidcheck_gtest"
+    ];
+    platforms = platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/rapidfuzz-cpp/default.nix b/nixpkgs/pkgs/development/libraries/rapidfuzz-cpp/default.nix
new file mode 100644
index 000000000000..f24da2c899f1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rapidfuzz-cpp/default.nix
@@ -0,0 +1,52 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, catch2_3
+, python3Packages
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "rapidfuzz-cpp";
+  version = "3.0.0";
+
+  src = fetchFromGitHub {
+    owner = "maxbachmann";
+    repo = "rapidfuzz-cpp";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-N9yGOxlk1+wgRXWLbDIXWQz+/pwbnYVs3ub4/16Nzws=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  cmakeFlags = lib.optionals finalAttrs.finalPackage.doCheck [
+    "-DRAPIDFUZZ_BUILD_TESTING=ON"
+  ];
+
+  CXXFLAGS = lib.optionals stdenv.cc.isClang [
+    # error: no member named 'fill' in namespace 'std'
+    "-include algorithm"
+  ];
+
+  nativeCheckInputs = [
+    catch2_3
+  ];
+
+  passthru = {
+    tests = {
+      /** `python3Packages.levenshtein` crucially depends on `rapidfuzz-cpp` */
+      inherit (python3Packages) levenshtein;
+    };
+  };
+
+  meta = {
+    description = "Rapid fuzzy string matching in C++ using the Levenshtein Distance";
+    homepage = "https://github.com/maxbachmann/rapidfuzz-cpp";
+    changelog = "https://github.com/maxbachmann/rapidfuzz-cpp/blob/${finalAttrs.src.rev}/CHANGELOG.md";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ dotlambda ];
+    platforms = lib.platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/rapidjson/0000-unstable-use-nixpkgs-gtest.patch b/nixpkgs/pkgs/development/libraries/rapidjson/0000-unstable-use-nixpkgs-gtest.patch
new file mode 100644
index 000000000000..df334cc91264
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rapidjson/0000-unstable-use-nixpkgs-gtest.patch
@@ -0,0 +1,35 @@
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index 11c1b04c..762eaa75 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -1,20 +1,14 @@
+-find_package(GTestSrc)
++enable_testing()
+ 
+-IF(GTESTSRC_FOUND)
+-    enable_testing()
++if (WIN32 AND (NOT CYGWIN) AND (NOT MINGW))
++    set(gtest_disable_pthreads ON)
++    set(gtest_force_shared_crt ON)
++endif()
+ 
+-    if (WIN32 AND (NOT CYGWIN) AND (NOT MINGW))
+-        set(gtest_disable_pthreads ON)
+-        set(gtest_force_shared_crt ON)
+-    endif()
++include_directories(SYSTEM ${GTEST_INCLUDE_DIR})
+ 
+-    add_subdirectory(${GTEST_SOURCE_DIR} ${CMAKE_BINARY_DIR}/googletest)
+-    include_directories(SYSTEM ${GTEST_INCLUDE_DIR})
++set(TEST_LIBRARIES gtest gtest_main)
+ 
+-    set(TEST_LIBRARIES gtest gtest_main)
+-
+-    add_custom_target(tests ALL)
+-    add_subdirectory(perftest)
+-    add_subdirectory(unittest)
+-
+-ENDIF(GTESTSRC_FOUND)
++add_custom_target(tests ALL)
++add_subdirectory(perftest)
++add_subdirectory(unittest)
diff --git a/nixpkgs/pkgs/development/libraries/rapidjson/0001-unstable-valgrind-suppress-failures.patch b/nixpkgs/pkgs/development/libraries/rapidjson/0001-unstable-valgrind-suppress-failures.patch
new file mode 100644
index 000000000000..dd06ba6a6971
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rapidjson/0001-unstable-valgrind-suppress-failures.patch
@@ -0,0 +1,36 @@
+diff --git a/test/valgrind.supp b/test/valgrind.supp
+index c9d3d226..63af7bf9 100644
+--- a/test/valgrind.supp
++++ b/test/valgrind.supp
+@@ -24,3 +24,31 @@
+    fun:*Uri*Parse_UTF16_Std*
+ }
+ 
++{
++   Suppress memcpy_chk valgrind report 5
++   Memcheck:Overlap
++   fun:__memcpy_chk
++   fun:*dtoa_normal*
++}
++
++{
++   Suppress memcpy_chk valgrind report 6
++   Memcheck:Overlap
++   fun:__memcpy_chk
++   fun:*dtoa_maxDecimalPlaces*
++}
++
++{
++   Suppress memcpy_chk valgrind report 7
++   Memcheck:Overlap
++   fun:__memcpy_chk
++   ...
++   fun:*Reader*ParseDoubleHandler*
++}
++
++{
++   Suppress memcpy_chk valgrind report 8
++   Memcheck:Overlap
++   fun:__memcpy_chk
++   fun:*Reader*ParseNumber_NormalPrecisionError*
++}
diff --git a/nixpkgs/pkgs/development/libraries/rapidjson/default.nix b/nixpkgs/pkgs/development/libraries/rapidjson/default.nix
new file mode 100644
index 000000000000..b200193aa211
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rapidjson/default.nix
@@ -0,0 +1,58 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, pkg-config
+, cmake
+, gtest
+, valgrind
+}:
+
+stdenv.mkDerivation rec {
+  pname = "rapidjson";
+  version = "1.1.0";
+
+  src = fetchFromGitHub {
+    owner = "Tencent";
+    repo = "rapidjson";
+    rev = "v${version}";
+    sha256 = "1jixgb8w97l9gdh3inihz7avz7i770gy2j2irvvlyrq3wi41f5ab";
+  };
+
+  patches = [
+    (fetchpatch {
+      url = "https://src.fedoraproject.org/rpms/rapidjson/raw/48402da9f19d060ffcd40bf2b2e6987212c58b0c/f/rapidjson-1.1.0-c++20.patch";
+      sha256 = "1qm62iad1xfsixv1li7qy475xc7gc04hmi2q21qdk6l69gk7mf82";
+    })
+    (fetchpatch {
+      name = "do-not-include-gtest-src-dir.patch";
+      url = "https://git.alpinelinux.org/aports/plain/community/rapidjson/do-not-include-gtest-src-dir.patch?id=9e5eefc7a5fcf5938a8dc8a3be8c75e9e6809909";
+      hash = "sha256-BjSZEwfCXA/9V+kxQ/2JPWbc26jQn35CfN8+8NW24s4=";
+    })
+    # One of these three tests reports memcpy overlap after update to glibc-2.38
+    ./test-skip-valgrind.diff
+  ];
+
+  postPatch = ''
+    find -name CMakeLists.txt | xargs \
+      sed -i -e "s/-Werror//g" -e "s/-march=native//g"
+  '';
+
+  nativeBuildInputs = [ pkg-config cmake ];
+
+  # for tests, adding gtest to checkInputs does not work
+  # https://github.com/NixOS/nixpkgs/pull/212200
+  buildInputs = [ gtest ];
+  cmakeFlags = [ "-DGTEST_SOURCE_DIR=${gtest.dev}/include" ];
+
+  nativeCheckInputs = [ valgrind ];
+  doCheck = !stdenv.hostPlatform.isStatic && !stdenv.isDarwin;
+
+  meta = with lib; {
+    description = "Fast JSON parser/generator for C++ with both SAX/DOM style API";
+    homepage = "http://rapidjson.org/";
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ dotlambda ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/rapidjson/test-skip-valgrind.diff b/nixpkgs/pkgs/development/libraries/rapidjson/test-skip-valgrind.diff
new file mode 100644
index 000000000000..a791d88699ff
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rapidjson/test-skip-valgrind.diff
@@ -0,0 +1,7 @@
+--- a/test/unittest/CMakeLists.txt
++++ b/test/unittest/CMakeLists.txt
+@@ -82,3 +81,0 @@
+-    add_test(NAME valgrind_unittest
+-        COMMAND valgrind --leak-check=full --error-exitcode=1 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest --gtest_filter=-SIMD.*
+-        WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
+
diff --git a/nixpkgs/pkgs/development/libraries/rapidjson/unstable.nix b/nixpkgs/pkgs/development/libraries/rapidjson/unstable.nix
new file mode 100644
index 000000000000..0f4c3d40403e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rapidjson/unstable.nix
@@ -0,0 +1,82 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, doxygen
+, graphviz
+, gtest
+, valgrind
+# One of "11" or "17"; default in source is CXX 11
+, cxxStandard ? "11"
+, buildDocs ? true
+, buildTests ? !stdenv.hostPlatform.isStatic && !stdenv.isDarwin
+, buildExamples ? true
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "rapidjson";
+  version = "unstable-2023-09-28";
+
+  outputs = [
+    "out"
+  ] ++ lib.optionals buildDocs [
+    "doc"
+  ] ++ lib.optionals buildExamples [
+    "example"
+  ];
+
+  src = fetchFromGitHub {
+    owner = "Tencent";
+    repo = "rapidjson";
+    rev = "f9d53419e912910fd8fa57d5705fa41425428c35";
+    hash = "sha256-rl7iy14jn1K2I5U2DrcZnoTQVEGEDKlxmdaOCF/3hfY=";
+  };
+
+  patches = lib.optionals buildTests [
+    ./0000-unstable-use-nixpkgs-gtest.patch
+    # https://github.com/Tencent/rapidjson/issues/2214
+    ./0001-unstable-valgrind-suppress-failures.patch
+  ];
+
+  nativeBuildInputs = [
+    cmake
+  ] ++ lib.optionals buildDocs [
+    doxygen
+    graphviz
+  ];
+
+  cmakeFlags = [
+    (lib.cmakeBool "RAPIDJSON_BUILD_DOC" buildDocs)
+    (lib.cmakeBool "RAPIDJSON_BUILD_TESTS" buildTests)
+    (lib.cmakeBool "RAPIDJSON_BUILD_EXAMPLES" buildExamples)
+    (lib.cmakeBool "RAPIDJSON_BUILD_CXX11" (cxxStandard == "11"))
+    (lib.cmakeBool "RAPIDJSON_BUILD_CXX17" (cxxStandard == "17"))
+  ] ++ lib.optionals buildTests [
+    (lib.cmakeFeature "GTEST_INCLUDE_DIR" "${lib.getDev gtest}")
+  ];
+
+  doCheck = buildTests;
+
+  nativeCheckInputs = [
+    gtest
+    valgrind
+  ];
+
+  postInstall = lib.optionalString buildExamples ''
+    mkdir -p $example/bin
+
+    find bin -type f -executable \
+      -not -name "perftest" \
+      -not -name "unittest" \
+      -exec cp -a {} $example/bin \;
+  '';
+
+  meta = with lib; {
+    description = "Fast JSON parser/generator for C++ with both SAX/DOM style API";
+    homepage = "http://rapidjson.org/";
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ Madouura ];
+    broken = (cxxStandard != "11" && cxxStandard != "17");
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/rapidxml/default.nix b/nixpkgs/pkgs/development/libraries/rapidxml/default.nix
new file mode 100644
index 000000000000..3a353b7a2bda
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rapidxml/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl, unzip }:
+
+stdenv.mkDerivation rec {
+  pname = "rapidxml";
+  version = "1.13";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/${pname}/${pname}-${version}.zip";
+    sha256 = "0w9mbdgshr6sh6a5jr10lkdycjyvapbj7wxwz8hbp0a96y3biw63";
+  };
+
+  nativeBuildInputs = [ unzip ];
+
+  installPhase = ''
+    mkdir -p $out/include/${pname}
+    cp * $out/include/${pname}
+  '';
+
+  meta = with lib; {
+    description = "Fast XML DOM-style parser in C++";
+    homepage = "https://rapidxml.sourceforge.net/";
+    license = licenses.boost;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ cpages ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/rapidyaml/default.nix b/nixpkgs/pkgs/development/libraries/rapidyaml/default.nix
new file mode 100644
index 000000000000..68449479278f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rapidyaml/default.nix
@@ -0,0 +1,28 @@
+{ lib
+, stdenv
+, cmake
+, fetchFromGitHub
+, git
+}:
+
+stdenv.mkDerivation rec {
+  pname = "rapidyaml";
+  version = "0.5.0";
+
+  src = fetchFromGitHub {
+    owner = "biojppm";
+    repo = pname;
+    fetchSubmodules = true;
+    rev = "v${version}";
+    sha256 = "sha256-1/P6Szgng94UU8cPFAtOKMS+EmiwfW/IJl2UTolDU5s=";
+  };
+
+  nativeBuildInputs = [ cmake git ];
+
+  meta = with lib; {
+    description = "A library to parse and emit YAML, and do it fast.";
+    homepage = "https://github.com/biojppm/rapidyaml";
+    license = licenses.mit;
+    maintainers = with maintainers; [ martfont ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/raylib/default.nix b/nixpkgs/pkgs/development/libraries/raylib/default.nix
new file mode 100644
index 000000000000..e655645cd866
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/raylib/default.nix
@@ -0,0 +1,81 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, fetchpatch
+, mesa
+, libGLU
+, glfw
+, libX11
+, libXi
+, libXcursor
+, libXrandr
+, libXinerama
+, alsaSupport ? stdenv.hostPlatform.isLinux
+, alsa-lib
+, pulseSupport ? stdenv.hostPlatform.isLinux
+, libpulseaudio
+, sharedLib ? true
+, includeEverything ? true
+, raylib-games
+, darwin
+}:
+let
+  inherit (darwin.apple_sdk.frameworks) Carbon Cocoa OpenGL;
+in
+stdenv.mkDerivation (finalAttrs: {
+  pname = "raylib";
+  version = "4.5.0";
+
+  src = fetchFromGitHub {
+    owner = "raysan5";
+    repo = "raylib";
+    rev = finalAttrs.version;
+    hash = "sha256-Uqqzq5shDp0AgSBT5waHBNUkEu0LRj70SNOlR5R2yAM=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ glfw ]
+    ++ lib.optionals stdenv.isLinux [ mesa libXi libXcursor libXrandr libXinerama ]
+    ++ lib.optionals stdenv.isDarwin [ Carbon Cocoa ]
+    ++ lib.optional alsaSupport alsa-lib
+    ++ lib.optional pulseSupport libpulseaudio;
+
+  propagatedBuildInputs = lib.optionals stdenv.isLinux [ libGLU libX11 ]
+    ++ lib.optionals stdenv.isDarwin [ OpenGL ];
+
+  # https://github.com/raysan5/raylib/wiki/CMake-Build-Options
+  cmakeFlags = [
+    "-DUSE_EXTERNAL_GLFW=ON"
+    "-DBUILD_EXAMPLES=OFF"
+    "-DCUSTOMIZE_BUILD=1"
+  ] ++ lib.optional includeEverything "-DINCLUDE_EVERYTHING=ON"
+  ++ lib.optional sharedLib "-DBUILD_SHARED_LIBS=ON";
+
+  passthru.tests = [ raylib-games ];
+
+  patches = [
+    # Patch version in CMakeList to 4.5.0
+    # Remove this when updating to a new revision
+    (fetchpatch {
+      url = "https://github.com/raysan5/raylib/commit/0d4db7ad7f6fd442ed165ebf8ab8b3f4033b04e7.patch";
+      hash = "sha256-RGokbQAwJAZm2FU2VNwraE3xko8E+RLLFjUfDRXeKhA=";
+    })
+  ];
+
+  # fix libasound.so/libpulse.so not being found
+  preFixup = ''
+    ${lib.optionalString alsaSupport "patchelf --add-needed ${alsa-lib}/lib/libasound.so $out/lib/libraylib.so.${finalAttrs.version}"}
+    ${lib.optionalString pulseSupport "patchelf --add-needed ${libpulseaudio}/lib/libpulse.so $out/lib/libraylib.so.${finalAttrs.version}"}
+  '';
+
+  meta = with lib; {
+    description = "A simple and easy-to-use library to enjoy videogames programming";
+    homepage = "https://www.raylib.com/";
+    license = licenses.zlib;
+    maintainers = with maintainers; [ adamlwgriffiths ];
+    platforms = platforms.all;
+    changelog = "https://github.com/raysan5/raylib/blob/${finalAttrs.version}/CHANGELOG";
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/rdkafka/default.nix b/nixpkgs/pkgs/development/libraries/rdkafka/default.nix
new file mode 100644
index 000000000000..400c7297d22b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rdkafka/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, zlib, zstd, pkg-config, python3, openssl, which }:
+
+stdenv.mkDerivation rec {
+  pname = "rdkafka";
+  version = "2.3.0";
+
+  src = fetchFromGitHub {
+    owner = "confluentinc";
+    repo = "librdkafka";
+    rev = "v${version}";
+    sha256 = "sha256-F67aKmyMmqBVG5sF8ZwqemmfvVi/0bDjaiugKKSipuA=";
+  };
+
+  nativeBuildInputs = [ pkg-config python3 which ];
+
+  buildInputs = [ zlib zstd openssl ];
+
+  env.NIX_CFLAGS_COMPILE = "-Wno-error=strict-overflow";
+
+  postPatch = ''
+    patchShebangs .
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "librdkafka - Apache Kafka C/C++ client library";
+    homepage = "https://github.com/confluentinc/librdkafka";
+    license = licenses.bsd2;
+    platforms = platforms.linux ++ platforms.darwin;
+    maintainers = with maintainers; [ commandodev ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/re2/default.nix b/nixpkgs/pkgs/development/libraries/re2/default.nix
new file mode 100644
index 000000000000..a1a22fb38e42
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/re2/default.nix
@@ -0,0 +1,74 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, ninja
+, chromium
+, grpc
+, haskellPackages
+, mercurial
+, python3Packages
+, abseil-cpp
+}:
+
+stdenv.mkDerivation rec {
+  pname = "re2";
+  version = "2023-11-01";
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "re2";
+    rev = version;
+    hash = "sha256-cKXe8r5MUag/z+seem4Zg/gmqIQjaCY7DBxiKlrnXPs=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake ninja ];
+
+  propagatedBuildInputs = [ abseil-cpp ];
+
+  postPatch = ''
+    substituteInPlace re2Config.cmake.in \
+      --replace "\''${PACKAGE_PREFIX_DIR}/" ""
+  '';
+
+  # Needed for case-insensitive filesystems (i.e. MacOS) because a file named
+  # BUILD already exists.
+  cmakeBuildDir = "build_dir";
+
+  cmakeFlags = lib.optional (!stdenv.hostPlatform.isStatic) "-DBUILD_SHARED_LIBS:BOOL=ON";
+
+  # This installs a pkg-config definition.
+  postInstall = ''
+    pushd "$src"
+    make common-install prefix="$dev" SED_INPLACE="sed -i"
+    popd
+  '';
+
+  doCheck = true;
+
+  passthru.tests = {
+    inherit
+      chromium
+      grpc
+      mercurial;
+    inherit (python3Packages)
+      fb-re2
+      google-re2;
+    haskell-re2 = haskellPackages.re2;
+  };
+
+  meta = with lib; {
+    description = "A regular expression library";
+    longDescription = ''
+      RE2 is a fast, safe, thread-friendly alternative to backtracking regular
+      expression engines like those used in PCRE, Perl, and Python. It is a C++
+      library.
+    '';
+    license = licenses.bsd3;
+    homepage = "https://github.com/google/re2";
+    maintainers = with maintainers; [ azahi networkexception ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/readline/6.3.nix b/nixpkgs/pkgs/development/libraries/readline/6.3.nix
new file mode 100644
index 000000000000..aff16c3e4184
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/readline/6.3.nix
@@ -0,0 +1,68 @@
+{ fetchurl, lib, stdenv, ncurses }:
+
+stdenv.mkDerivation {
+  pname = "readline";
+  version = "6.3p08";
+
+  src = fetchurl {
+    url = "mirror://gnu/readline/readline-6.3.tar.gz";
+    sha256 = "0hzxr9jxqqx5sxsv9vmlxdnvlr9vi4ih1avjb869hbs6p5qn1fjn";
+  };
+
+  outputs = [ "out" "dev" "man" "doc" "info" ];
+
+  strictDeps = true;
+  propagatedBuildInputs = [ ncurses ];
+
+  patchFlags = [ "-p0" ];
+
+  configureFlags = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
+    # This test requires running host code
+    "bash_cv_wcwidth_broken=no";
+
+  patches =
+    [ ./link-against-ncurses.patch
+      ./no-arch_only-6.3.patch
+    ] ++ lib.optional stdenv.hostPlatform.useAndroidPrebuilt ./android.patch
+    ++
+    (let
+       patch = nr: sha256:
+         fetchurl {
+           url = "mirror://gnu/readline/readline-6.3-patches/readline63-${nr}";
+           inherit sha256;
+         };
+     in
+       import ./readline-6.3-patches.nix patch);
+
+  env = lib.optionalAttrs stdenv.cc.isClang {
+    NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
+  };
+
+  meta = with lib; {
+    description = "Library for interactive line editing";
+
+    longDescription = ''
+      The GNU Readline library provides a set of functions for use by
+      applications that allow users to edit command lines as they are
+      typed in.  Both Emacs and vi editing modes are available.  The
+      Readline library includes additional functions to maintain a
+      list of previously-entered command lines, to recall and perhaps
+      reedit those lines, and perform csh-like history expansion on
+      previous commands.
+
+      The history facilities are also placed into a separate library,
+      the History library, as part of the build process.  The History
+      library may be used without Readline in applications which
+      desire its capabilities.
+    '';
+
+    homepage = "https://savannah.gnu.org/projects/readline/";
+
+    license = licenses.gpl3Plus;
+
+    maintainers = [ ];
+
+    platforms = platforms.unix;
+    branch = "6.3";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/readline/7.0.nix b/nixpkgs/pkgs/development/libraries/readline/7.0.nix
new file mode 100644
index 000000000000..3b643a9e15fe
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/readline/7.0.nix
@@ -0,0 +1,63 @@
+{ fetchurl, lib, stdenv, ncurses
+}:
+
+stdenv.mkDerivation rec {
+  pname = "readline";
+  version = "7.0p${toString (builtins.length upstreamPatches)}";
+
+  src = fetchurl {
+    url = "mirror://gnu/readline/readline-${meta.branch}.tar.gz";
+    sha256 = "0d13sg9ksf982rrrmv5mb6a2p4ys9rvg9r71d6il0vr8hmql63bm";
+  };
+
+  outputs = [ "out" "dev" "man" "doc" "info" ];
+
+  strictDeps = true;
+  propagatedBuildInputs = [ ncurses ];
+
+  patchFlags = [ "-p0" ];
+
+  upstreamPatches =
+    (let
+       patch = nr: sha256:
+         fetchurl {
+           url = "mirror://gnu/readline/readline-${meta.branch}-patches/readline70-${nr}";
+           inherit sha256;
+         };
+     in
+       import ./readline-7.0-patches.nix patch);
+
+  patches =
+    [ ./link-against-ncurses.patch
+      ./no-arch_only-6.3.patch
+    ]
+    ++ upstreamPatches;
+
+  meta = with lib; {
+    description = "Library for interactive line editing";
+
+    longDescription = ''
+      The GNU Readline library provides a set of functions for use by
+      applications that allow users to edit command lines as they are
+      typed in.  Both Emacs and vi editing modes are available.  The
+      Readline library includes additional functions to maintain a
+      list of previously-entered command lines, to recall and perhaps
+      reedit those lines, and perform csh-like history expansion on
+      previous commands.
+
+      The history facilities are also placed into a separate library,
+      the History library, as part of the build process.  The History
+      library may be used without Readline in applications which
+      desire its capabilities.
+    '';
+
+    homepage = "https://savannah.gnu.org/projects/readline/";
+
+    license = licenses.gpl3Plus;
+
+    maintainers = [ ];
+
+    platforms = platforms.unix;
+    branch = "7.0";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/readline/8.2.nix b/nixpkgs/pkgs/development/libraries/readline/8.2.nix
new file mode 100644
index 000000000000..72e3370576e7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/readline/8.2.nix
@@ -0,0 +1,96 @@
+{ lib, stdenv
+, fetchpatch, fetchurl
+, ncurses, termcap
+, curses-library ?
+    if stdenv.hostPlatform.isWindows
+    then termcap
+    else ncurses
+}:
+
+stdenv.mkDerivation rec {
+  pname = "readline";
+  version = "8.2p${toString (builtins.length upstreamPatches)}";
+
+  src = fetchurl {
+    url = "mirror://gnu/readline/readline-${meta.branch}.tar.gz";
+    sha256 = "sha256-P+txcfFqhO6CyhijbXub4QmlLAT0kqBTMx19EJUAfDU=";
+  };
+
+  outputs = [ "out" "dev" "man" "doc" "info" ];
+
+  strictDeps = true;
+  propagatedBuildInputs = [ curses-library ];
+
+  patchFlags = [ "-p0" ];
+
+  upstreamPatches =
+    (let
+       patch = nr: sha256:
+         fetchurl {
+           url = "mirror://gnu/readline/readline-${meta.branch}-patches/readline82-${nr}";
+           inherit sha256;
+         };
+     in
+       import ./readline-8.2-patches.nix patch);
+
+  patches = lib.optionals (curses-library.pname == "ncurses") [
+    ./link-against-ncurses.patch
+  ] ++ [
+    ./no-arch_only-8.2.patch
+  ]
+  ++ upstreamPatches
+  ++ lib.optionals stdenv.hostPlatform.isWindows [
+    (fetchpatch {
+      name = "0001-sigwinch.patch";
+      url = "https://github.com/msys2/MINGW-packages/raw/90e7536e3b9c3af55c336d929cfcc32468b2f135/mingw-w64-readline/0001-sigwinch.patch";
+      stripLen = 1;
+      hash = "sha256-sFK6EJrSNl0KLWqFv5zBXaQRuiQoYIZVoZfa8BZqfKA=";
+    })
+    (fetchpatch {
+      name = "0002-event-hook.patch";
+      url = "https://github.com/msys2/MINGW-packages/raw/3476319d2751a676b911f3de9e1ec675081c03b8/mingw-w64-readline/0002-event-hook.patch";
+      stripLen = 1;
+      hash = "sha256-F8ytYuIjBtH83ZCJdf622qjwSw+wZEVyu53E/mPsoAo=";
+    })
+    (fetchpatch {
+      name = "0003-fd_set.patch";
+      url = "https://github.com/msys2/MINGW-packages/raw/35830ab27e5ed35c2a8d486961ab607109f5af50/mingw-w64-readline/0003-fd_set.patch";
+      stripLen = 1;
+      hash = "sha256-UiaXZRPjKecpSaflBMCphI2kqOlcz1JkymlCrtpMng4=";
+    })
+    (fetchpatch {
+      name = "0004-locale.patch";
+      url = "https://github.com/msys2/MINGW-packages/raw/f768c4b74708bb397a77e3374cc1e9e6ef647f20/mingw-w64-readline/0004-locale.patch";
+      stripLen = 1;
+      hash = "sha256-dk4343KP4EWXdRRCs8GRQlBgJFgu1rd79RfjwFD/nJc=";
+    })
+  ];
+
+  meta = with lib; {
+    description = "Library for interactive line editing";
+
+    longDescription = ''
+      The GNU Readline library provides a set of functions for use by
+      applications that allow users to edit command lines as they are
+      typed in.  Both Emacs and vi editing modes are available.  The
+      Readline library includes additional functions to maintain a
+      list of previously-entered command lines, to recall and perhaps
+      reedit those lines, and perform csh-like history expansion on
+      previous commands.
+
+      The history facilities are also placed into a separate library,
+      the History library, as part of the build process.  The History
+      library may be used without Readline in applications which
+      desire its capabilities.
+    '';
+
+    homepage = "https://savannah.gnu.org/projects/readline/";
+
+    license = licenses.gpl3Plus;
+
+    maintainers = with maintainers; [ dtzWill ];
+
+    platforms = platforms.unix ++ platforms.windows;
+    branch = "8.2";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/readline/android.patch b/nixpkgs/pkgs/development/libraries/readline/android.patch
new file mode 100644
index 000000000000..7e81774be369
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/readline/android.patch
@@ -0,0 +1,16 @@
+diff --git histlib.h histlib.h
+index c938a10..925ab72 100644
+--- histlib.h
++++ histlib.h
+@@ -51,9 +51,9 @@
+ #endif
+ 
+ #ifndef member
+-#  ifndef strchr
++#  if !defined (strchr) && !defined (__STDC__)
+ extern char *strchr ();
+-#  endif
++#  endif /* !strchr && !__STDC__ */
+ #define member(c, s) ((c) ? ((char *)strchr ((s), (c)) != (char *)NULL) : 0)
+ #endif
+ 
diff --git a/nixpkgs/pkgs/development/libraries/readline/link-against-ncurses.patch b/nixpkgs/pkgs/development/libraries/readline/link-against-ncurses.patch
new file mode 100644
index 000000000000..0fd0598f4650
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/readline/link-against-ncurses.patch
@@ -0,0 +1,18 @@
+This patch is to make sure that `libncurses' is among the `NEEDED'
+dependencies of `libreadline.so' and `libhistory.so'.
+
+Failing to do that, applications linking against Readline are
+forced to explicitly link against libncurses as well; in addition,
+this trick doesn't work when using GNU ld's `--as-needed'.
+
+--- shlib/Makefile.in	2009-01-06 18:03:22.000000000 +0100
++++ shlib/Makefile.in	2009-07-27 14:43:25.000000000 +0200
+@@ -84,7 +84,7 @@ SHOBJ_LDFLAGS = @SHOBJ_LDFLAGS@
+ SHOBJ_XLDFLAGS = @SHOBJ_XLDFLAGS@
+ SHOBJ_LIBS = @SHOBJ_LIBS@
+ 
+-SHLIB_XLDFLAGS = @LDFLAGS@ @SHLIB_XLDFLAGS@
++SHLIB_XLDFLAGS = @LDFLAGS@ @SHLIB_XLDFLAGS@ -lncurses
+ SHLIB_LIBS = @SHLIB_LIBS@
+ 
+ SHLIB_DOT = @SHLIB_DOT@
diff --git a/nixpkgs/pkgs/development/libraries/readline/no-arch_only-6.3.patch b/nixpkgs/pkgs/development/libraries/readline/no-arch_only-6.3.patch
new file mode 100644
index 000000000000..7c46dbad962a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/readline/no-arch_only-6.3.patch
@@ -0,0 +1,13 @@
+diff -ru -x '*~' readline-6.3-orig/support/shobj-conf readline-6.3/support/shobj-conf
+--- support/shobj-conf	2014-02-24 03:06:29.000000000 +0100
++++ support/shobj-conf	2014-07-22 11:18:52.000000000 +0200
+@@ -194,9 +194,6 @@
+ 	# Darwin 8 == Mac OS X 10.4; Mac OS X 10.N == Darwin N+4
+ 	*)
+ 		case "${host_os}" in
+-		darwin[89]*|darwin1[012]*)
+-			SHOBJ_ARCHFLAGS='-arch_only `/usr/bin/arch`'
+-			;;
+ 		 *) 	# Mac OS X 10.9 (Mavericks) and later
+ 			SHOBJ_ARCHFLAGS=
+ 			# for 32 and 64bit universal library
diff --git a/nixpkgs/pkgs/development/libraries/readline/no-arch_only-8.2.patch b/nixpkgs/pkgs/development/libraries/readline/no-arch_only-8.2.patch
new file mode 100644
index 000000000000..06f01ec0891f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/readline/no-arch_only-8.2.patch
@@ -0,0 +1,13 @@
+diff -ru -x '*~' readline-6.3-orig/support/shobj-conf readline-6.3/support/shobj-conf
+--- support/shobj-conf	2014-02-24 03:06:29.000000000 +0100
++++ support/shobj-conf	2014-07-22 11:18:52.000000000 +0200
+@@ -159,9 +159,6 @@
+ 	# Darwin 8 == Mac OS X 10.4; Mac OS X 10.N == Darwin N+4
+ 	*)
+ 		case "${host_os}" in
+-		darwin[89]*|darwin1[012]*)
+-			SHOBJ_ARCHFLAGS=
+-			;;
+ 		 *) 	# Mac OS X 10.9 (Mavericks) and later
+ 			SHOBJ_ARCHFLAGS=
+ 			# for 32 and 64bit universal library
diff --git a/nixpkgs/pkgs/development/libraries/readline/readline-6.3-patches.nix b/nixpkgs/pkgs/development/libraries/readline/readline-6.3-patches.nix
new file mode 100644
index 000000000000..d0aaaf38f706
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/readline/readline-6.3-patches.nix
@@ -0,0 +1,12 @@
+# Automatically generated by `update-patch-set.sh'; do not edit.
+
+patch: [
+(patch "001" "0vqlj22mkbn3x42qx2iqir7capx462dhagbzdw6hwxgfxavbny8s")
+(patch "002" "19g0l6vlfcqzwfwjj1slkmxzndjp4543hwrf26g8z216lp3h9qrr")
+(patch "003" "0bx53k876w8vwf4h2s6brr1i46ym87gi71bh8zl89n0gn3cbshgc")
+(patch "004" "1k2m8dg1awmjhmivdbx1c25866gfbpg0fy4845n8cw15zc3bjis5")
+(patch "005" "0jr7c28bzn882as5i54l53bhi723s1nkvzmwlh3rj6ld4bwqhxw7")
+(patch "006" "0mp5zgx50792gigkmjap3d0zpdv5qanii8djab7j6z69qsrpl8sw")
+(patch "007" "1sjv9w0mglh395i6hlq3ck7wdxvi2wyddlyb2j0jwg7cmnibayad")
+(patch "008" "11rpqhsxd132gc8455v51ma3a5zshznb0mh2p0zc5skcab7r7h1v")
+]
diff --git a/nixpkgs/pkgs/development/libraries/readline/readline-7.0-patches.nix b/nixpkgs/pkgs/development/libraries/readline/readline-7.0-patches.nix
new file mode 100644
index 000000000000..c34ef2bf97bb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/readline/readline-7.0-patches.nix
@@ -0,0 +1,9 @@
+# Automatically generated by `update-patch-set.sh'; do not edit.
+
+patch: [
+(patch "001" "0xm3sxvwmss7ddyfb11n6pgcqd1aglnpy15g143vzcf75snb7hcs")
+(patch "002" "0n1dxmqsbjgrfxb1hgk5c6lsraw4ncbnzxlsx7m35nym6lncjiw7")
+(patch "003" "1027kmymniizcy0zbdlrczxfx3clxcdln5yq05q9yzlc6y9slhwy")
+(patch "004" "0r3bbaf12iz8m02z6p3fzww2m365fhn71xmzab2p62gj54s6h9gr")
+(patch "005" "0lxpa4f72y2nsgj6fgrhjk2nmmxvccys6aciwfxwchb5f21rq5fa")
+]
diff --git a/nixpkgs/pkgs/development/libraries/readline/readline-8.2-patches.nix b/nixpkgs/pkgs/development/libraries/readline/readline-8.2-patches.nix
new file mode 100644
index 000000000000..77d5c495bac1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/readline/readline-8.2-patches.nix
@@ -0,0 +1,14 @@
+# Automatically generated by `update-patch-set.sh'; do not edit.
+
+patch: [
+(patch "001" "1xxgfgr6hn3ads8m8xsrdi1kbx1f3s69k0danpd9x4haqhg7zydv")
+(patch "002" "0ly0siy6qy3l7hv12847adpfa34yq1w4qz9qkw6vrxv25j106rg0")
+(patch "003" "1c5cwvvkx9mfmpaapymq9cavmzh4fnagkjlchsqx4vml8sx8gx94")
+(patch "004" "1b15sndx9v5vj3x1f3h73099nlagknx4rbfpd5ldrbw2xgm2wmvr")
+(patch "005" "16ac25jz1a1mgkpfp1sydqf6qpsfh0s0dcmrnjpqbhg5va3s6av2")
+(patch "006" "18gmh6y3klh0vv28cyqz4is3rlb32pl7f1kf5r482kfjq3w5zd67")
+(patch "007" "1xmnpahs983n4w0gn3j0wr8nh1dpva33yj7fvfmhm46ph2wsa4ar")
+(patch "008" "0smjjzhwxi2ibpdisnk53lh1pzgka6rhlqyh3662xy69v34ysxx1")
+(patch "009" "05m1fwbs7mbs3pz3pg87gbbayandrrcgaqawzliqb6g1jbk8b61x")
+(patch "010" "0k3vyrjs2g6y2cfs03l2gp37fhxgqpiwvxb1c7z4q88cbb32x3km")
+]
diff --git a/nixpkgs/pkgs/development/libraries/readline/update-patch-set.sh b/nixpkgs/pkgs/development/libraries/readline/update-patch-set.sh
new file mode 120000
index 000000000000..d4f5cd2f3126
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/readline/update-patch-set.sh
@@ -0,0 +1 @@
+../../../shells/bash/update-patch-set.sh
\ No newline at end of file
diff --git a/nixpkgs/pkgs/development/libraries/readosm/default.nix b/nixpkgs/pkgs/development/libraries/readosm/default.nix
new file mode 100644
index 000000000000..8ba1f571b028
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/readosm/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl, expat, zlib, validatePkgConfig }:
+
+stdenv.mkDerivation rec {
+  pname = "readosm";
+  version = "1.1.0a";
+
+  src = fetchurl {
+    url = "https://www.gaia-gis.it/gaia-sins/readosm-${version}.tar.gz";
+    hash = "sha256-23wFHSVs7H7NTDd1q5vIINpaS/cv/U6fQLkR15dw8UU=";
+  };
+
+  nativeBuildInputs = [ validatePkgConfig ];
+
+  buildInputs = [ expat zlib ];
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "An open source library to extract valid data from within an Open Street Map input file";
+    homepage = "https://www.gaia-gis.it/fossil/readosm";
+    license = with licenses; [ mpl11 gpl2Plus lgpl21Plus ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/recastnavigation/default.nix b/nixpkgs/pkgs/development/libraries/recastnavigation/default.nix
new file mode 100644
index 000000000000..8e0fe7947f44
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/recastnavigation/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, lib, fetchFromGitHub, cmake, libGL, SDL2, libGLU, catch }:
+
+stdenv.mkDerivation rec {
+  pname = "recastai";
+  # use latest revision for the CMake build process and OpenMW
+  # OpenMW use e75adf86f91eb3082220085e42dda62679f9a3ea
+  version = "unstable-2023-01-02";
+
+  src = fetchFromGitHub {
+    owner = "recastnavigation";
+    repo = "recastnavigation";
+    rev = "405cc095ab3a2df976a298421974a2af83843baf";
+    sha256 = "sha256-WVzDI7+UuAl10Tm1Zjkea/FMk0cIe7pWg0iyFLbwAdI=";
+  };
+
+  postPatch = ''
+    cp ${catch}/include/catch/catch.hpp Tests/catch.hpp
+
+    # https://github.com/recastnavigation/recastnavigation/issues/524
+    substituteInPlace CMakeLists.txt \
+      --replace '\$'{exec_prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
+      --replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
+  '' + lib.optionalString stdenv.hostPlatform.isDarwin ''
+    # Expects SDL2.framework in specific location, which we don't have
+    # Change where SDL2 headers are searched for to match what we do have
+    substituteInPlace RecastDemo/CMakeLists.txt \
+      --replace 'include_directories(''${SDL2_LIBRARY}/Headers)' 'include_directories(${SDL2.dev}/include/SDL2)'
+  '';
+
+  doCheck = true;
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ libGL SDL2 libGLU ];
+
+  meta = with lib; {
+    homepage = "https://github.com/recastnavigation/recastnavigation";
+    description = "Navigation-mesh Toolset for Games";
+    license = licenses.zlib;
+    maintainers = with maintainers; [ marius851000 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/redis-plus-plus/0001-Fix-pkg-config-paths.patch b/nixpkgs/pkgs/development/libraries/redis-plus-plus/0001-Fix-pkg-config-paths.patch
new file mode 100644
index 000000000000..ac6490c51873
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/redis-plus-plus/0001-Fix-pkg-config-paths.patch
@@ -0,0 +1,14 @@
+diff --git a/cmake/redis++.pc.in b/cmake/redis++.pc.in
+index c98b990..46849b6 100644
+--- a/cmake/redis++.pc.in
++++ b/cmake/redis++.pc.in
+@@ -1,7 +1,5 @@
+-prefix=@CMAKE_INSTALL_PREFIX@
+-exec_prefix=${prefix}
+-libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+-includedir=${prefix}/include
++libdir=@CMAKE_INSTALL_FULL_LIBDIR@
++includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
+ 
+ Name: redis++
+ Description: This is a Redis client, based on hiredis and written in C++11. It supports scritpting, pub/sub, pipeline, transaction, Redis Cluster, Redis Sentinel, connection pool, ACL, SSL and thread safety.
diff --git a/nixpkgs/pkgs/development/libraries/redis-plus-plus/default.nix b/nixpkgs/pkgs/development/libraries/redis-plus-plus/default.nix
new file mode 100644
index 000000000000..bd40330194a7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/redis-plus-plus/default.nix
@@ -0,0 +1,42 @@
+{ lib, stdenv, fetchFromGitHub, cmake, hiredis
+, enableShared ? !stdenv.hostPlatform.isStatic
+, enableStatic ? stdenv.hostPlatform.isStatic
+}:
+
+# You must build at one type of library
+assert enableShared || enableStatic;
+
+stdenv.mkDerivation rec {
+  pname = "redis-plus-plus";
+  version = "1.3.12";
+
+  src = fetchFromGitHub {
+    owner = "sewenew";
+    repo = "redis-plus-plus";
+    rev = version;
+    sha256 = "sha256-RI7lLvRmS5BglvwRQ8OzSpYIyaKkf/DKrJ3fn1mWYfs=";
+  };
+
+  patches = [
+    ./0001-Fix-pkg-config-paths.patch
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  propagatedBuildInputs = [ hiredis ];
+
+  cmakeFlags = [
+    "-DREDIS_PLUS_PLUS_BUILD_TEST=OFF"
+  ] ++ lib.optionals (!enableShared) [
+    "-DREDIS_PLUS_PLUS_BUILD_SHARED=OFF"
+  ] ++ lib.optionals (!enableStatic) [
+    "-DREDIS_PLUS_PLUS_BUILD_STATIC=OFF"
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/sewenew/redis-plus-plus";
+    description = "Redis client written in C++";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ wheelsandmetal ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/relibc/Cargo.lock b/nixpkgs/pkgs/development/libraries/relibc/Cargo.lock
new file mode 100644
index 000000000000..b020fc4764b8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/relibc/Cargo.lock
@@ -0,0 +1,600 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+[[package]]
+name = "ansi_term"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "atty"
+version = "0.2.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "hermit-abi 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.72 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "autocfg"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "bitflags"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "cbindgen"
+version = "0.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_json 1.0.56 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
+ "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "cbitset"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "num-traits 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "cc"
+version = "1.0.58"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "cfg-if"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "clap"
+version = "2.33.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "unicode-width 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "vec_map 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "core_io"
+version = "0.1.20181107"
+dependencies = [
+ "rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "crt0"
+version = "0.1.0"
+
+[[package]]
+name = "crti"
+version = "0.1.0"
+
+[[package]]
+name = "crtn"
+version = "0.1.0"
+
+[[package]]
+name = "getrandom"
+version = "0.1.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.72 (registry+https://github.com/rust-lang/crates.io-index)",
+ "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "goblin"
+version = "0.0.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "plain 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "scroll 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "hermit-abi"
+version = "0.1.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "libc 0.2.72 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "itoa"
+version = "0.4.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "lazy_static"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "spin 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "ld_so"
+version = "0.1.0"
+
+[[package]]
+name = "libc"
+version = "0.2.72"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "log"
+version = "0.4.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "memchr"
+version = "2.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "memoffset"
+version = "0.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "num-traits"
+version = "0.2.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "plain"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "posix-regex"
+version = "0.1.0"
+
+[[package]]
+name = "ppv-lite86"
+version = "0.2.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "proc-macro2"
+version = "0.4.30"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "quote"
+version = "0.6.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "ralloc"
+version = "1.0.0"
+dependencies = [
+ "ralloc_shim 0.1.1",
+ "unborrow 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "ralloc_shim"
+version = "0.1.1"
+dependencies = [
+ "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)",
+ "sc 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rand"
+version = "0.5.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rand"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.72 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "ppv-lite86 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "rand_core"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rand_hc"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.1.56"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "redox_syscall"
+version = "0.2.0"
+source = "git+https://gitlab.redox-os.org/redox-os/syscall?rev=4115e0f43547449ce56f7d7749732813e9505955#4115e0f43547449ce56f7d7749732813e9505955"
+dependencies = [
+ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "relibc"
+version = "0.1.0"
+dependencies = [
+ "cbindgen 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cbitset 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cc 1.0.58 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core_io 0.1.20181107",
+ "goblin 0.0.21 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "memoffset 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "posix-regex 0.1.0",
+ "ralloc 1.0.0",
+ "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "redox_syscall 0.2.0 (git+https://gitlab.redox-os.org/redox-os/syscall?rev=4115e0f43547449ce56f7d7749732813e9505955)",
+ "sc 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "spin 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "remove_dir_all"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rustc_version"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "rustc_version"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "ryu"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "sc"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "scroll"
+version = "0.9.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "scroll_derive 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "scroll_derive"
+version = "0.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "semver"
+version = "0.1.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "semver"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "semver-parser"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "serde"
+version = "1.0.114"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "serde_derive 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.114"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.56"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "ryu 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "spin"
+version = "0.4.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "strsim"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "syn"
+version = "0.15.44"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "syn"
+version = "1.0.33"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "tempfile"
+version = "3.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.72 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)",
+ "remove_dir_all 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "textwrap"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "unicode-width 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "toml"
+version = "0.5.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "unborrow"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "unicode-width"
+version = "0.1.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "unicode-xid"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "unicode-xid"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "vec_map"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "wasi"
+version = "0.9.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[metadata]
+"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
+"checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
+"checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d"
+"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
+"checksum cbindgen 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2db2df1ebc842c41fd2c4ae5b5a577faf63bd5151b953db752fc686812bee318"
+"checksum cbitset 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e3a9afa72f63942dd7e7f01c67b863ce9df35c523ae10e3dddd3eec8f1e07eac"
+"checksum cc 1.0.58 (registry+https://github.com/rust-lang/crates.io-index)" = "f9a06fb2e53271d7c279ec1efea6ab691c35a2ae67ec0d91d7acec0caf13b518"
+"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
+"checksum clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bdfa80d47f954d53a35a64987ca1422f495b8d6483c0fe9f7117b36c2a792129"
+"checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb"
+"checksum goblin 0.0.21 (registry+https://github.com/rust-lang/crates.io-index)" = "6a4013e9182f2345c6b7829b9ef6e670bce0dfca12c6f974457ed2160c2c7fe9"
+"checksum hermit-abi 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9"
+"checksum itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6"
+"checksum lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1"
+"checksum libc 0.2.72 (registry+https://github.com/rust-lang/crates.io-index)" = "a9f8082297d534141b30c8d39e9b1773713ab50fdbe4ff30f750d063b3bfd701"
+"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7"
+"checksum memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400"
+"checksum memoffset 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c198b026e1bbf08a937e94c6c60f9ec4a2267f5b0d2eec9c1b21b061ce2be55f"
+"checksum num-traits 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)" = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611"
+"checksum plain 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6"
+"checksum ppv-lite86 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "237a5ed80e274dbc66f86bd59c1e25edc039660be53194b5fe0a482e0f2612ea"
+"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
+"checksum proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "beae6331a816b1f65d04c45b078fd8e6c93e8071771f41b8163255bbd8d7c8fa"
+"checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1"
+"checksum quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37"
+"checksum rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9"
+"checksum rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
+"checksum rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
+"checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b"
+"checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc"
+"checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
+"checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
+"checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84"
+"checksum redox_syscall 0.2.0 (git+https://gitlab.redox-os.org/redox-os/syscall?rev=4115e0f43547449ce56f7d7749732813e9505955)" = "<none>"
+"checksum remove_dir_all 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
+"checksum rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084"
+"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
+"checksum ryu 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e"
+"checksum sc 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "176365c8253e381ad147774b6d9730a1b3fe2d7db498af521ed7d968674a55b3"
+"checksum scroll 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2f84d114ef17fd144153d608fba7c446b0145d038985e7a8cc5d08bb0ce20383"
+"checksum scroll_derive 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8f1aa96c45e7f5a91cb7fabe7b279f02fea7126239fc40b732316e8b6a2d0fcb"
+"checksum semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac"
+"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
+"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
+"checksum serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)" = "5317f7588f0a5078ee60ef675ef96735a1442132dc645eb1d12c018620ed8cd3"
+"checksum serde_derive 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)" = "2a0be94b04690fbaed37cddffc5c134bf537c8e3329d53e982fe04c374978f8e"
+"checksum serde_json 1.0.56 (registry+https://github.com/rust-lang/crates.io-index)" = "3433e879a558dde8b5e8feb2a04899cf34fdde1fafb894687e52105fc1162ac3"
+"checksum spin 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ceac490aa12c567115b40b7b7fceca03a6c9d53d5defea066123debc83c5dc1f"
+"checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
+"checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5"
+"checksum syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)" = "e8d5d96e8cbb005d6959f119f773bfaebb5684296108fb32600c00cde305b2cd"
+"checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9"
+"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
+"checksum toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a"
+"checksum unborrow 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e92e959f029e4f8ee25d70d15ab58d2b46f98a17bc238b9265ff0c26f6f3d67f"
+"checksum unicode-width 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3"
+"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
+"checksum unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564"
+"checksum vec_map 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
+"checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
+"checksum winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
diff --git a/nixpkgs/pkgs/development/libraries/relibc/default.nix b/nixpkgs/pkgs/development/libraries/relibc/default.nix
new file mode 100644
index 000000000000..437da86e8c21
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/relibc/default.nix
@@ -0,0 +1,85 @@
+{ lib, stdenvNoCC, buildPackages }:
+
+let
+  rpath = lib.makeLibraryPath [
+    buildPackages.stdenv.cc.libc
+    "$out"
+  ];
+  bootstrapCrossRust = stdenvNoCC.mkDerivation {
+    name = "binary-redox-rust";
+
+    src = buildPackages.fetchzip {
+      name = "redox-rust-toolchain.tar.gz";
+      url = "https://www.dropbox.com/s/qt7as0j7cwnin8z/redox-rust-toolchain.tar.gz?dl=1";
+      sha256 = "1g17qp2q6b88p04yclkw6amm374pqlakrmw9kd86vw8z4g70jkxm";
+    };
+
+    dontBuild = true;
+    dontPatchELF = true;
+    dontStrip = true;
+    installPhase = ''
+      mkdir $out/
+      cp -r * $out/
+
+      find $out/ -executable -type f -exec patchelf \
+          --set-interpreter "${buildPackages.stdenv.cc.libc}/lib/ld-linux-x86-64.so.2" \
+          --set-rpath "${rpath}" \
+          "{}" \;
+      find $out/ -name "*.so" -type f -exec patchelf \
+          --set-rpath "${rpath}" \
+          "{}" \;
+    '';
+
+    meta.platforms = with lib; platforms.redox ++ platforms.linux;
+  };
+
+  redoxRustPlatform = buildPackages.makeRustPlatform {
+    rustc = bootstrapCrossRust;
+    cargo = bootstrapCrossRust;
+  };
+
+in
+redoxRustPlatform.buildRustPackage rec {
+  pname = "relibc";
+  version = "latest";
+
+  LD_LIBRARY_PATH = "${buildPackages.zlib}/lib";
+
+  src = buildPackages.fetchgit {
+    url = "https://gitlab.redox-os.org/redox-os/relibc/";
+    rev = "5af8e3ca35ad401014a867ac1a0cc3b08dee682b";
+    sha256 = "1j4wsga9psl453031izkl3clkvm31d1wg4y8f3yqqvhml2aliws5";
+    fetchSubmodules = true;
+  };
+
+  RUSTC_BOOTSTRAP = 1;
+
+  dontInstall = true;
+  dontFixup = true;
+  doCheck = false;
+
+  postBuild = ''
+    mkdir -p $out
+    DESTDIR=$out make install
+  '';
+
+  TARGET = stdenvNoCC.hostPlatform.rust.rustcTargetSpec;
+
+  cargoLock = {
+    lockFile = ./Cargo.lock;
+    outputHashes = {
+      "redox_syscall-0.2.0" = "sha256-nwbJBrhuc01fPbBgd5ShboNu0Nauqp2UjkA+sm9oCeE=";
+    };
+  };
+
+  # error: Usage of `RUSTC_WORKSPACE_WRAPPER` requires `-Z unstable-options`
+  auditable = false;
+
+  meta = with lib; {
+    homepage = "https://gitlab.redox-os.org/redox-os/relibc";
+    description = "C Library in Rust for Redox and Linux";
+    license = licenses.mit;
+    maintainers = [ maintainers.aaronjanse ];
+    platforms = platforms.redox ++ [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/rep-gtk/default.nix b/nixpkgs/pkgs/development/libraries/rep-gtk/default.nix
new file mode 100644
index 000000000000..4d8cfc0a7699
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rep-gtk/default.nix
@@ -0,0 +1,44 @@
+{ lib
+, stdenv
+, fetchurl
+, autoreconfHook
+, gtk2-x11
+, librep
+, pkg-config
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "rep-gtk";
+  version = "0.90.8.3";
+
+  src = fetchurl {
+    url = "https://download.tuxfamily.org/librep/rep-gtk/rep-gtk_${finalAttrs.version}.tar.xz";
+    hash = "sha256-qWV120V5Tu/QVkFylno47y1/7DriZExHjp99VLmf80E=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+    librep
+  ];
+
+  buildInputs = [
+    gtk2-x11
+    librep
+  ];
+
+  strictDeps = true;
+
+  patchPhase = ''
+    sed -e 's|installdir=$(repexecdir)|installdir=$(libdir)/rep|g' -i Makefile.in
+  '';
+
+  meta = {
+    homepage = "http://sawfish.tuxfamily.org";
+    description = "GTK bindings for librep";
+    license = lib.licenses.gpl2Plus;
+    maintainers = [ lib.maintainers.AndersonTorres ];
+    platforms = lib.platforms.unix;
+  };
+})
+# TODO: investigate fetchFromGithub
diff --git a/nixpkgs/pkgs/development/libraries/rep-gtk/setup-hook.sh b/nixpkgs/pkgs/development/libraries/rep-gtk/setup-hook.sh
new file mode 100644
index 000000000000..4d875b693304
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rep-gtk/setup-hook.sh
@@ -0,0 +1,5 @@
+addRepDLLoadPath () {
+    addToSearchPath REP_DL_LOAD_PATH $1/lib/rep
+}
+
+addEnvHooks "$hostOffset" addRepDLLoadPath
diff --git a/nixpkgs/pkgs/development/libraries/reproc/default.nix b/nixpkgs/pkgs/development/libraries/reproc/default.nix
new file mode 100644
index 000000000000..ae920f4cb0d2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/reproc/default.nix
@@ -0,0 +1,53 @@
+{ stdenv, lib, fetchFromGitHub, cmake, fetchpatch
+}:
+
+stdenv.mkDerivation rec {
+  pname = "reproc";
+  version = "14.2.4";
+
+  src = fetchFromGitHub {
+    owner = "DaanDeMeyer";
+    repo = "reproc";
+    rev = "v${version}";
+    sha256 = "sha256-LWzBeKhE7cSiZsK8xWzoTdrOcPiU/zEkmi40WiFytic=";
+  };
+
+  patches = [
+    (fetchpatch{
+      name = "reproc-gcc-13-2.patch";
+      url = "https://github.com/DaanDeMeyer/reproc/commit/0b23d88894ccedde04537fa23ea55cb2f8365342.patch";
+      sha256 = "sha256-QyC0UcKAWCKSvSvyZTLI2eF/TuuqbGGH6cOQrS2DiCE=";
+    })
+    (fetchpatch{
+      name = "reproc-gcc-13-1.patch";
+      url = "https://github.com/DaanDeMeyer/reproc/commit/9f399675b821e175f85ac3ee6e3fd2e6056573eb.patch";
+      sha256 = "sha256-h/gnDFPWPpUFkys10YXjjEPibgRT1atHSVwbO0kId+U=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [
+    "-DCMAKE_INSTALL_LIBDIR=lib"
+    "-DBUILD_SHARED_LIBS=ON"
+    "-DREPROC++=ON"
+    "-DREPROC_TEST=ON"
+  ];
+
+  # https://github.com/DaanDeMeyer/reproc/issues/81
+  postPatch = ''
+    substituteInPlace reproc++/reproc++.pc.in \
+      --replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
+      --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
+    substituteInPlace reproc/reproc.pc.in \
+      --replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
+      --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/DaanDeMeyer/reproc";
+    description = "A cross-platform (C99/C++11) process library";
+    license = licenses.mit;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/resolv_wrapper/default.nix b/nixpkgs/pkgs/development/libraries/resolv_wrapper/default.nix
new file mode 100644
index 000000000000..58863d6e2642
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/resolv_wrapper/default.nix
@@ -0,0 +1,20 @@
+{ lib, stdenv, fetchurl, cmake, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "resolv_wrapper";
+  version = "1.1.8";
+
+  src = fetchurl {
+    url = "mirror://samba/cwrap/resolv_wrapper-${version}.tar.gz";
+    sha256 = "sha256-+8MPd9o+EuzU72bM9at34LdEkwzNiQYkBAgvkoqOwuA=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  meta = with lib; {
+    description = "A wrapper for the user, group and hosts NSS API";
+    homepage = "https://git.samba.org/?p=uid_wrapper.git;a=summary;";
+    license = licenses.bsd3;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/retro-gtk/default.nix b/nixpkgs/pkgs/development/libraries/retro-gtk/default.nix
new file mode 100644
index 000000000000..7711dde497f0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/retro-gtk/default.nix
@@ -0,0 +1,77 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, cmake
+, meson
+, ninja
+, pkg-config
+, libepoxy
+, glib
+, gtk3
+, libpulseaudio
+, libsamplerate
+, gobject-introspection
+, vala
+, gtk-doc
+}:
+
+stdenv.mkDerivation rec {
+  pname = "retro-gtk";
+  version = "1.0.2";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/retro-gtk/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "1lnb7dwcj3lrrvdzd85dxwrlid28xf4qdbrgfjyg1wn1z6sv063i";
+  };
+
+  patches = [
+    # https://gitlab.gnome.org/GNOME/retro-gtk/-/merge_requests/150
+    ./gio-unix.patch
+    # fix build with meson 0.60 (https://gitlab.gnome.org/GNOME/retro-gtk/-/merge_requests/167)
+    (fetchpatch {
+      url = "https://gitlab.gnome.org/GNOME/retro-gtk/-/commit/8016c10e7216394bc66281f2d9be740140b6fad6.patch";
+      sha256 = "sha256-HcQnqadK5sJM5mMqi4KERkJM3H+MUl8AJAorpFDsJ68=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    gobject-introspection
+    gtk-doc
+    meson
+    ninja
+    pkg-config
+    vala
+  ];
+
+  buildInputs = [
+    libepoxy
+    glib
+    gtk3
+    libpulseaudio
+    libsamplerate
+  ];
+
+  meta = with lib; {
+    description = "The GTK Libretro frontend framework";
+    longDescription = ''
+      Libretro is a plugin format design to implement video game
+      console emulators, video games and similar multimedia
+      software. Such plugins are called Libretro cores.
+
+      RetroGTK is a framework easing the use of Libretro cores in
+      conjunction with GTK.
+
+      It encourages the cores to be installed in a well defined
+      centralized place — namely the libretro subdirectory of your lib
+      directory — and it recommends them to come with Libretro core
+      descriptors.
+    '';
+    homepage = "https://gitlab.gnome.org/GNOME/retro-gtk";
+    changelog = "https://gitlab.gnome.org/GNOME/retro-gtk/-/blob/master/NEWS";
+    license = licenses.gpl3Plus;
+    maintainers = [ maintainers.DamienCassou ];
+    platforms = platforms.all;
+    broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/retro-gtk.x86_64-darwin
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/retro-gtk/gio-unix.patch b/nixpkgs/pkgs/development/libraries/retro-gtk/gio-unix.patch
new file mode 100644
index 000000000000..91f561c6504f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/retro-gtk/gio-unix.patch
@@ -0,0 +1,11 @@
+--- a/retro-gtk/meson.build 2021-03-21 20:25:51.000000000 +0100
++++ b/retro-gtk/meson.build 2021-05-23 17:36:46.793693816 +0200
+@@ -103,6 +103,7 @@
+ retro_gtk_deps = [
+   epoxy,
+   gio,
++  gio_unix,
+   glib,
+   gmodule,
+   gobject,
+   
diff --git a/nixpkgs/pkgs/development/libraries/rinutils/default.nix b/nixpkgs/pkgs/development/libraries/rinutils/default.nix
new file mode 100644
index 000000000000..ccc4df86ecd1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rinutils/default.nix
@@ -0,0 +1,34 @@
+{ stdenv
+, lib
+, fetchurl
+, cmake
+, perl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "rinutils";
+  version = "0.10.2";
+
+  src = fetchurl {
+    url = "https://github.com/shlomif/${pname}/releases/download/${version}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-2H/hGZcit/qb1QjhNTg/8HiPvX1lXL75dXwjIS+MIXs=";
+  };
+
+  nativeBuildInputs = [ cmake perl ];
+
+  # https://github.com/shlomif/rinutils/issues/5
+  # (variable was unused at time of writing)
+  postPatch = ''
+    substituteInPlace librinutils.pc.in \
+      --replace '$'{exec_prefix}/@RINUTILS_INSTALL_MYLIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
+  '';
+
+  meta = with lib; {
+    description = "C11 / gnu11 utilities C library by Shlomi Fish / Rindolf";
+    homepage = "https://github.com/shlomif/rinutils";
+    changelog = "https://github.com/shlomif/rinutils/raw/${version}/NEWS.asciidoc";
+    license = licenses.mit;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/rlog/default.nix b/nixpkgs/pkgs/development/libraries/rlog/default.nix
new file mode 100644
index 000000000000..c8661f173e67
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rlog/default.nix
@@ -0,0 +1,18 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "rlog";
+  version = "1.4";
+
+  src = fetchurl {
+    url = "http://rlog.googlecode.com/files/rlog-${version}.tar.gz";
+    sha256 = "0y9zg0pd7vmnskwac1qdyzl282z7kb01nmn57lsg2mjdxgnywf59";
+  };
+
+  meta = {
+    homepage = "https://www.arg0.net/rlog";
+    description = "A C++ logging library used in encfs";
+    platforms = lib.platforms.linux;
+    license = lib.licenses.lgpl3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/rlottie-qml/default.nix b/nixpkgs/pkgs/development/libraries/rlottie-qml/default.nix
new file mode 100644
index 000000000000..5154c816624e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rlottie-qml/default.nix
@@ -0,0 +1,73 @@
+{ stdenv
+, lib
+, fetchFromGitLab
+, fetchpatch
+, cmake
+, qtbase
+, qtdeclarative
+, qtmultimedia
+, quazip
+, rlottie
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "rlottie-qml";
+  version = "0-unstable-2021-05-03";
+
+  src = fetchFromGitLab {
+    owner = "mymike00";
+    repo = "rlottie-qml";
+    rev = "f9506889a284039888c7a43db37e155bb7b30c40";
+    hash = "sha256-e2/4e1GGFfJMwShy6qgnUVVRxjV4WfjQwcqs09RK194=";
+  };
+
+  outputs = [
+    "out"
+    "dev"
+  ];
+
+  patches = [
+    # Remove when https://gitlab.com/mymike00/rlottie-qml/-/merge_requests/1 merged
+    (fetchpatch {
+      name = "0001-rlottie-qml-Use-upstream-QuaZip-config-module.patch";
+      url = "https://gitlab.com/mymike00/rlottie-qml/-/commit/5656211dd8ae190795e343f47a3393fd3d8d25a4.patch";
+      hash = "sha256-t2NlYVU+D8hKd+AvBWPEavAhJKlk7Q3y2iAQSYtks5k=";
+    })
+  ];
+
+  postPatch = ''
+    # Fix QML install path
+    substituteInPlace CMakeLists.txt \
+      --replace-fail 'QT_IMPORTS_DIR "/lib/''${ARCH_TRIPLET}"' 'QT_IMPORTS_DIR "''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}"' \
+      --replace-fail "\''${QT_IMPORTS_DIR}/\''${PLUGIN}" "\''${QT_IMPORTS_DIR}" \
+  '';
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = [
+    rlottie
+    qtbase
+    qtdeclarative
+    qtmultimedia
+  ];
+
+  propagatedBuildInputs = [
+    # Config module requires this
+    quazip
+  ];
+
+  # Only a QML module
+  dontWrapQtApps = true;
+
+  meta = with lib; {
+    description = "Library for using rlottie via QML";
+    homepage = "https://gitlab.com/mymike00/rlottie-qml";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ OPNA2608 ];
+    platforms = platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/rlottie/default.nix b/nixpkgs/pkgs/development/libraries/rlottie/default.nix
new file mode 100644
index 000000000000..cbc46f819e5f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rlottie/default.nix
@@ -0,0 +1,44 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, ninja
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "rlottie";
+  version = "0.2";
+
+  src = fetchFromGitHub {
+    owner = "Samsung";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "10bxr1zf9wxl55d4cw2j02r6sgqln7mbxplhhfvhw0z92fi40kr3";
+  };
+
+  patches = [
+    # Fixed build with GCC 11
+    (fetchpatch {
+       url = "https://github.com/Samsung/rlottie/commit/2d7b1fa2b005bba3d4b45e8ebfa632060e8a157a.patch";
+       hash = "sha256-2JPsj0WiBMMu0N3NUYDrHumvPN2YS8nPq5Zwagx6UWE=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake ninja pkg-config ];
+
+  cmakeFlags = [
+    (lib.cmakeFeature "LIB_INSTALL_DIR" "${placeholder "out"}/lib")
+  ];
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) "-U__ARM_NEON__";
+
+  meta = with lib; {
+    homepage = "https://github.com/Samsung/rlottie";
+    description = "A platform independent standalone c++ library for rendering vector based animations and art in realtime";
+    license = with licenses; [ mit bsd3 mpl11 ftl ];
+    platforms = platforms.all;
+    maintainers = with maintainers; [ CRTified ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/rnnoise-plugin/default.nix b/nixpkgs/pkgs/development/libraries/rnnoise-plugin/default.nix
new file mode 100644
index 000000000000..39a8f1a4b6a6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rnnoise-plugin/default.nix
@@ -0,0 +1,59 @@
+{ lib
+, stdenv
+, cmake
+, fetchFromGitHub
+, freetype
+, gtk3-x11
+, mount
+, pcre
+, pkg-config
+, webkitgtk
+, xorg
+, llvmPackages
+, WebKit
+, MetalKit
+, CoreAudioKit
+, simd
+}:
+stdenv.mkDerivation rec {
+  pname = "rnnoise-plugin";
+  version = "1.03";
+
+  src = fetchFromGitHub {
+    owner = "werman";
+    repo = "noise-suppression-for-voice";
+    rev = "v${version}";
+    sha256 = "sha256-1DgrpGYF7G5Zr9vbgtKm/Yv0HSdI7LrFYPSGKYNnNDQ=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  patches = lib.optionals stdenv.isDarwin [
+    # Ubsan seems to be broken on aarch64-darwin, it produces linker errors similar to https://github.com/NixOS/nixpkgs/issues/140751
+    ./disable-ubsan.patch
+  ];
+
+  buildInputs =
+    [
+      freetype
+      gtk3-x11
+      pcre
+      xorg.libX11
+      xorg.libXrandr
+    ] ++ lib.optionals stdenv.isLinux [
+      webkitgtk
+    ] ++ lib.optionals stdenv.isDarwin [
+      WebKit
+      MetalKit
+      CoreAudioKit
+      simd
+    ];
+
+  meta = with lib; {
+    description = "A real-time noise suppression plugin for voice based on Xiph's RNNoise";
+    homepage = "https://github.com/werman/noise-suppression-for-voice";
+    license = licenses.gpl3;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ panaeon henrikolsson sciencentistguy ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/rnnoise-plugin/disable-ubsan.patch b/nixpkgs/pkgs/development/libraries/rnnoise-plugin/disable-ubsan.patch
new file mode 100644
index 000000000000..e2c4819d141f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rnnoise-plugin/disable-ubsan.patch
@@ -0,0 +1,14 @@
+diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
+index 4c2300e..273d76e 100644
+--- a/src/common/CMakeLists.txt
++++ b/src/common/CMakeLists.txt
+@@ -33,8 +33,6 @@ if (BUILD_TESTS)
+             $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/external/catch2>
+             $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
+     target_link_libraries(common_plugin_tests PRIVATE ${LIBRARIES})
+-    target_compile_options(common_plugin_tests PRIVATE -fsanitize=undefined)
+-    target_link_options(common_plugin_tests PRIVATE -fsanitize=undefined)
+ 
+     include(CTest)
+     include(Catch)
+
diff --git a/nixpkgs/pkgs/development/libraries/rnnoise/default.nix b/nixpkgs/pkgs/development/libraries/rnnoise/default.nix
new file mode 100644
index 000000000000..af4fcf30153c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rnnoise/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, lib, fetchFromGitHub, autoreconfHook }:
+
+stdenv.mkDerivation (rec {
+  pname = "rnnoise";
+  version = "2021-01-22";
+
+  src = fetchFromGitHub {
+    owner = "xiph";
+    repo = "rnnoise";
+    rev = "1cbdbcf1283499bbb2230a6b0f126eb9b236defd";
+    sha256 = "1y0rzgmvy8bf9a431garpm2w177s6ajgf79y5ymw4yb0pik57rwb";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  postInstall = ''
+    install -Dt $out/bin examples/.libs/rnnoise_demo
+  '';
+
+  meta = with lib; {
+    description = "Recurrent neural network for audio noise reduction";
+    homepage = "https://people.xiph.org/~jm/demo/rnnoise/";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.nh2 ];
+    mainProgram = "rnnoise_demo";
+    platforms = platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/robin-map/default.nix b/nixpkgs/pkgs/development/libraries/robin-map/default.nix
new file mode 100644
index 000000000000..b4c865dbd11b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/robin-map/default.nix
@@ -0,0 +1,30 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "robin-map";
+  version = "1.2.1";
+
+  src = fetchFromGitHub {
+    owner = "Tessil";
+    repo = pname;
+    rev = "refs/tags/v${version}";
+    hash = "sha256-axVMJHTnGW2c4kGcYhEEAvKbVKYA2oxiYfwjiz7xh6Q=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  meta = with lib; {
+    description = "C++ implementation of a fast hash map and hash set using robin hood hashing";
+    homepage = "https://github.com/Tessil/robin-map";
+    changelog = "https://github.com/Tessil/robin-map/releases/tag/v${version}";
+    license = licenses.mit;
+    maintainers = with maintainers; [ goibhniu ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/rocksdb/default.nix b/nixpkgs/pkgs/development/libraries/rocksdb/default.nix
new file mode 100644
index 000000000000..c25a349ba32d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rocksdb/default.nix
@@ -0,0 +1,105 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, ninja
+, bzip2
+, lz4
+, snappy
+, zlib
+, zstd
+, windows
+, enableJemalloc ? false
+, jemalloc
+, enableShared ? !stdenv.hostPlatform.isStatic
+, sse42Support ? stdenv.hostPlatform.sse4_2Support
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "rocksdb";
+  version = "8.3.2";
+
+  src = fetchFromGitHub {
+    owner = "facebook";
+    repo = finalAttrs.pname;
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-mfIRQ8nkUbZ3Bugy3NAvOhcfzFY84J2kBUIUBcQ2/Qg=";
+  };
+
+  nativeBuildInputs = [ cmake ninja ];
+
+  propagatedBuildInputs = [ bzip2 lz4 snappy zlib zstd ];
+
+  buildInputs = lib.optional enableJemalloc jemalloc
+    ++ lib.optional stdenv.hostPlatform.isMinGW windows.mingw_w64_pthreads;
+
+  outputs = [
+    "out"
+    "tools"
+  ];
+
+  env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isGNU [
+    "-Wno-error=deprecated-copy"
+    "-Wno-error=pessimizing-move"
+    # Needed with GCC 12
+    "-Wno-error=format-truncation"
+    "-Wno-error=maybe-uninitialized"
+  ] ++ lib.optionals stdenv.cc.isClang [
+    "-Wno-error=unused-private-field"
+    "-faligned-allocation"
+  ] ++ lib.optionals (lib.versionOlder finalAttrs.version "8") [
+    "-Wno-error=unused-but-set-variable"
+  ] ++ lib.optionals (lib.versionOlder finalAttrs.version "7") [
+    "-Wno-error=deprecated-copy"
+  ]);
+
+  cmakeFlags = [
+    "-DPORTABLE=1"
+    "-DWITH_JEMALLOC=${if enableJemalloc then "1" else "0"}"
+    "-DWITH_JNI=0"
+    "-DWITH_BENCHMARK_TOOLS=0"
+    "-DWITH_TESTS=1"
+    "-DWITH_TOOLS=0"
+    "-DWITH_CORE_TOOLS=1"
+    "-DWITH_BZ2=1"
+    "-DWITH_LZ4=1"
+    "-DWITH_SNAPPY=1"
+    "-DWITH_ZLIB=1"
+    "-DWITH_ZSTD=1"
+    "-DWITH_GFLAGS=0"
+    "-DUSE_RTTI=1"
+    "-DROCKSDB_INSTALL_ON_WINDOWS=YES" # harmless elsewhere
+    (lib.optional sse42Support "-DFORCE_SSE42=1")
+    "-DFAIL_ON_WARNINGS=${if stdenv.hostPlatform.isMinGW then "NO" else "YES"}"
+  ] ++ lib.optional (!enableShared) "-DROCKSDB_BUILD_SHARED=0";
+
+  # otherwise "cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security]"
+  hardeningDisable = lib.optional stdenv.hostPlatform.isWindows "format";
+
+  preInstall = ''
+    mkdir -p $tools/bin
+    cp tools/{ldb,sst_dump}${stdenv.hostPlatform.extensions.executable} $tools/bin/
+  '' + lib.optionalString stdenv.isDarwin ''
+    ls -1 $tools/bin/* | xargs -I{} install_name_tool -change "@rpath/librocksdb.${lib.versions.major finalAttrs.version}.dylib" $out/lib/librocksdb.dylib {}
+  '' + lib.optionalString (stdenv.isLinux && enableShared) ''
+    ls -1 $tools/bin/* | xargs -I{} patchelf --set-rpath $out/lib:${stdenv.cc.cc.lib}/lib {}
+  '';
+
+  # Old version doesn't ship the .pc file, new version puts wrong paths in there.
+  postFixup = ''
+    if [ -f "$out"/lib/pkgconfig/rocksdb.pc ]; then
+      substituteInPlace "$out"/lib/pkgconfig/rocksdb.pc \
+        --replace '="''${prefix}//' '="/'
+    fi
+  '';
+
+  meta = with lib; {
+    homepage = "https://rocksdb.org";
+    description = "A library that provides an embeddable, persistent key-value store for fast storage";
+    changelog = "https://github.com/facebook/rocksdb/raw/v${finalAttrs.version}/HISTORY.md";
+    license = licenses.asl20;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ adev magenbluten ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/rote/default.nix b/nixpkgs/pkgs/development/libraries/rote/default.nix
new file mode 100644
index 000000000000..4655d54ab98e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rote/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl, ncurses }:
+
+stdenv.mkDerivation rec {
+  pname = "rote";
+  version = "0.2.8";
+
+  src = fetchurl {
+    sha256 = "05v1lw99jv4cwxl7spyi7by61j2scpdsvx809x5cga7dm5dhlmky";
+    url = "mirror://sourceforge/rote/${pname}-${version}.tar.gz";
+  };
+
+  buildInputs = [ ncurses ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Our Own Terminal Emulation Library";
+    longDescription = ''
+      ROTE is a simple C library for VT102 terminal emulation. It allows the
+      programmer to set up virtual 'screens' and send them data. The virtual
+      screens will emulate the behavior of a VT102 terminal, interpreting
+      escape sequences, control characters and such. The library supports
+      ncurses as well so that you may render the virtual screen to the real
+      screen when you need to.
+    '';
+    homepage = "https://rote.sourceforge.net/";
+    license = licenses.lgpl21;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/rtlcss/default.nix b/nixpkgs/pkgs/development/libraries/rtlcss/default.nix
new file mode 100644
index 000000000000..a553e8d33ddf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rtlcss/default.nix
@@ -0,0 +1,24 @@
+{ buildNpmPackage, fetchFromGitHub, lib, ... }:
+
+buildNpmPackage rec {
+  pname = "rtlcss";
+  version = "4.1.0";
+
+  src = fetchFromGitHub {
+    owner = "MohammadYounes";
+    repo = "rtlcss";
+    rev = "v${version}";
+    hash = "sha256-KdAf7jzt8o/YEzT/bLCXj546HX0oC90kr44u3p3qv/k=";
+  };
+
+  npmDepsHash = "sha256-ghVgvw55w7T9WxokYtlFSgCfGvcOxFzm2wQIFi+6uBY=";
+
+  dontNpmBuild = true;
+
+  meta = with lib; {
+    description = "Framework for converting Left-To-Right (LTR) Cascading Style Sheets(CSS) to Right-To-Left (RTL)";
+    homepage = "https://rtlcss.com";
+    license = licenses.mit;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/rtrlib/default.nix b/nixpkgs/pkgs/development/libraries/rtrlib/default.nix
new file mode 100644
index 000000000000..05429a72fb66
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rtrlib/default.nix
@@ -0,0 +1,29 @@
+{ lib, fetchFromGitHub, stdenv, cmake, libssh, openssl }:
+
+stdenv.mkDerivation rec {
+  pname = "rtrlib";
+  version = "0.8.0";
+
+  src = fetchFromGitHub {
+    repo = pname;
+    owner = "rtrlib";
+    rev = "v${version}";
+    sha256 = "sha256-ISb4ojcDvXY/88GbFMrA5V5+SGE6CmE5D+pokDTwotQ=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ libssh openssl ];
+
+  postFixup = ''
+    substituteInPlace "$out"/lib/pkgconfig/rtrlib.pc \
+      --replace '=''${prefix}//' '=/'
+  '';
+
+  meta = with lib; {
+    description = "An open-source C implementation of the RPKI/Router Protocol client";
+    homepage = "https://github.com/rtrlib/rtrlib";
+    license = licenses.mit;
+    maintainers = with maintainers; [ Anillc ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/rttr/default.nix b/nixpkgs/pkgs/development/libraries/rttr/default.nix
new file mode 100644
index 000000000000..10a16dd3f6b4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rttr/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchFromGitHub, cmake, ninja }:
+
+stdenv.mkDerivation rec {
+  pname = "rttr";
+  version = "0.9.6";
+
+  src = fetchFromGitHub {
+    owner = "${pname}org";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1yxad8sj40wi75hny8w6imrsx8wjasjmsipnlq559n4b6kl84ijp";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    ninja
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_EXAMPLES=OFF"
+    "-DBUILD_UNIT_TESTS=OFF"
+    "-DBUILD_PACKAGE=OFF"
+  ];
+
+  meta = with lib; {
+    broken = stdenv.isDarwin;
+    description = "C++ Reflection Library";
+    homepage = "https://www.rttr.org";
+    license = licenses.mit;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/rubberband/default.nix b/nixpkgs/pkgs/development/libraries/rubberband/default.nix
new file mode 100644
index 000000000000..7830e62ccb18
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rubberband/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchurl, pkg-config, libsamplerate, libsndfile, fftw
+, lv2, jdk
+, vamp-plugin-sdk, ladspaH, meson, ninja, darwin }:
+
+stdenv.mkDerivation rec {
+  pname = "rubberband";
+  version = "3.3.0";
+
+  src = fetchurl {
+    url = "https://breakfastquay.com/files/releases/${pname}-${version}.tar.bz2";
+    hash = "sha256-2e+J4rjvn4WxOsPC+uww4grPLJ86nIxFzmN/K8leV2w=";
+  };
+
+  nativeBuildInputs = [ pkg-config meson ninja jdk ];
+  buildInputs = [ libsamplerate libsndfile fftw vamp-plugin-sdk ladspaH lv2 ] ++ lib.optionals stdenv.isDarwin
+    (with darwin.apple_sdk.frameworks; [Accelerate CoreGraphics CoreVideo]);
+  makeFlags = [ "AR:=$(AR)" ];
+
+  # TODO: package boost-test, so we can run the test suite. (Currently it fails
+  # to find libboost_unit_test_framework.a.)
+  mesonFlags = [ "-Dtests=disabled" ];
+  doCheck = false;
+
+  meta = with lib; {
+    description = "High quality software library for audio time-stretching and pitch-shifting";
+    homepage = "https://breakfastquay.com/rubberband/";
+    # commercial license available as well, see homepage. You'll get some more optimized routines
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.goibhniu maintainers.marcweber ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/rure/Cargo.lock b/nixpkgs/pkgs/development/libraries/rure/Cargo.lock
new file mode 100644
index 000000000000..a5ba9527382e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rure/Cargo.lock
@@ -0,0 +1,61 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "aho-corasick"
+version = "1.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "libc"
+version = "0.2.153"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
+
+[[package]]
+name = "memchr"
+version = "2.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149"
+
+[[package]]
+name = "regex"
+version = "1.10.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-automata",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
+
+[[package]]
+name = "rure"
+version = "0.2.2"
+dependencies = [
+ "libc",
+ "regex",
+]
diff --git a/nixpkgs/pkgs/development/libraries/rure/default.nix b/nixpkgs/pkgs/development/libraries/rure/default.nix
new file mode 100644
index 000000000000..1771abd3367a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rure/default.nix
@@ -0,0 +1,46 @@
+{ lib
+, stdenv
+, rustPlatform
+, fetchCrate
+, fixDarwinDylibNames
+}:
+
+let
+  pin = lib.importJSON ./pin.json;
+in
+
+rustPlatform.buildRustPackage {
+  inherit (pin) pname version;
+
+  src = fetchCrate pin;
+
+  # upstream doesn't ship a Cargo.lock, is generated by the update script
+  postPatch = ''
+    cp ${./Cargo.lock} Cargo.lock
+  '';
+
+  cargoLock.lockFile = ./Cargo.lock;
+
+  outputs = [ "out" "dev" ];
+
+  # Headers are not handled by cargo nor buildRustPackage
+  postInstall = ''
+    install -Dm644 include/rure.h -t "$dev/include"
+  '';
+
+  nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
+    fixDarwinDylibNames
+  ];
+
+  passthru.updateScript = ./update.sh;
+
+  meta = {
+    description = "A C API for Rust's regular expression library";
+    homepage = "https://crates.io/crates/rure";
+    license = [
+      lib.licenses.mit
+      lib.licenses.asl20
+    ];
+    maintainers = [ lib.maintainers.sternenseemann ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/rure/pin.json b/nixpkgs/pkgs/development/libraries/rure/pin.json
new file mode 100644
index 000000000000..7e6b1101702e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rure/pin.json
@@ -0,0 +1,5 @@
+{
+  "pname": "rure",
+  "version": "0.2.2",
+  "sha256": "0n2c9b8arfgcq1l7gr8dfcmdvdbggvfd0msy6sbx3bln74wwbr06"
+}
diff --git a/nixpkgs/pkgs/development/libraries/rure/update.sh b/nixpkgs/pkgs/development/libraries/rure/update.sh
new file mode 100755
index 000000000000..6e85d7cf03a7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rure/update.sh
@@ -0,0 +1,51 @@
+#!/usr/bin/env nix-shell
+#! nix-shell -p nix jq curl cargo rsync
+#! nix-shell -i bash
+
+set -eu
+
+cd "$(dirname "$0")"
+
+crate=rure
+
+echo "Getting latest version from crates.io API" >&2
+
+curlOpts=(
+  -H "Accept: application/json"
+  -H "User-Agent: $crate update script (https://github.com/nixos/nixpkgs/)"
+)
+
+version="$(curl "${curlOpts[@]}" "https://crates.io/api/v1/crates/$crate" \
+  | jq -r .crate.max_stable_version)"
+
+echo "Prefetching latest tarball from crates.io" >&2
+
+url="https://crates.io/api/v1/crates/$crate/$version/download"
+prefetch="$(nix-prefetch-url --print-path --type sha256 --unpack "$url")"
+
+cat > pin.json <<EOF
+{
+  "pname": "$crate",
+  "version": "$version",
+  "sha256": "$(printf '%s' "$prefetch" | head -n1)"
+}
+EOF
+
+echo "Generating updated Cargo.lock" >&2
+
+tmp="$(mktemp -d)"
+
+cleanup() {
+  echo "Removing $tmp" >&2
+  rm -rf "$tmp"
+}
+
+trap cleanup EXIT
+
+rsync -a --chmod=ugo=rwX "$(printf '%s' "$prefetch" | tail -n1)/" "$tmp"
+
+pushd "$tmp"
+cargo update
+popd
+
+cp "$tmp/Cargo.lock" ./Cargo.lock
diff --git a/nixpkgs/pkgs/development/libraries/rustc-demangle/Cargo.lock b/nixpkgs/pkgs/development/libraries/rustc-demangle/Cargo.lock
new file mode 100644
index 000000000000..0268b3bdd463
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rustc-demangle/Cargo.lock
@@ -0,0 +1,67 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "arbitrary"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "237430fd6ed3740afe94eefcc278ae21e050285be882804e0d6e8695f0c94691"
+
+[[package]]
+name = "cc"
+version = "1.0.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e70cc2f62c6ce1868963827bd677764c62d07c3d9a3e1fb1177ee1a9ab199eb2"
+
+[[package]]
+name = "compiler_builtins"
+version = "0.1.49"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "20b1438ef42c655665a8ab2c1c6d605a305f031d38d9be689ddfef41a20f3aa2"
+
+[[package]]
+name = "libfuzzer-sys"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "36a9a84a6e8b55dfefb04235e55edb2b9a2a18488fcae777a6bdaa6f06f1deb3"
+dependencies = [
+ "arbitrary",
+ "cc",
+ "once_cell",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56"
+
+[[package]]
+name = "rustc-demangle"
+version = "0.1.20"
+dependencies = [
+ "compiler_builtins",
+ "rustc-std-workspace-core",
+]
+
+[[package]]
+name = "rustc-demangle-capi"
+version = "0.1.0"
+dependencies = [
+ "rustc-demangle",
+]
+
+[[package]]
+name = "rustc-demangle-fuzz"
+version = "0.0.0"
+dependencies = [
+ "libfuzzer-sys",
+ "rustc-demangle",
+]
+
+[[package]]
+name = "rustc-std-workspace-core"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1956f5517128a2b6f23ab2dadf1a976f4f5b27962e7724c2bf3d45e539ec098c"
diff --git a/nixpkgs/pkgs/development/libraries/rustc-demangle/default.nix b/nixpkgs/pkgs/development/libraries/rustc-demangle/default.nix
new file mode 100644
index 000000000000..4e142c584529
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rustc-demangle/default.nix
@@ -0,0 +1,39 @@
+{ rustPlatform, fetchFromGitHub, lib, stdenv }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "rustc-demangle";
+  version = "0.1.20";
+
+  src = fetchFromGitHub {
+    owner = "alexcrichton";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-elxclyuLmr3N66s+pR4/6OU98k1oXI2wKVJtzWPY8FI=";
+  };
+
+  cargoLock = {
+    # generated using `cargo generate-lockfile` since repo is missing lockfile
+    lockFile = ./Cargo.lock;
+  };
+
+  cargoBuildFlags = [ "-p" "rustc-demangle-capi" ];
+
+  postPatch = ''
+    ln -s ${./Cargo.lock} Cargo.lock
+  '';
+
+  postInstall = ''
+    mkdir -p $out/lib
+    cp target/${stdenv.hostPlatform.rust.rustcTargetSpec}/release/librustc_demangle.so $out/lib
+    cp -R crates/capi/include $out
+  '';
+
+  meta = with lib; {
+    description = "Rust symbol demangling";
+    homepage = "https://github.com/alexcrichton/rustc-demangle";
+    license = with licenses; [ asl20 mit ];
+    # upstream supports other platforms, but maintainer can only test on linux
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ _1000teslas ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/rustls-ffi/Cargo.lock b/nixpkgs/pkgs/development/libraries/rustls-ffi/Cargo.lock
new file mode 100644
index 000000000000..6cf2c532f33b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rustls-ffi/Cargo.lock
@@ -0,0 +1,369 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "base64"
+version = "0.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
+
+[[package]]
+name = "bumpalo"
+version = "3.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1"
+
+[[package]]
+name = "cc"
+version = "1.0.79"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "equivalent"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
+
+[[package]]
+name = "hashbrown"
+version = "0.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a"
+
+[[package]]
+name = "indexmap"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d"
+dependencies = [
+ "equivalent",
+ "hashbrown",
+]
+
+[[package]]
+name = "js-sys"
+version = "0.3.64"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a"
+dependencies = [
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "libc"
+version = "0.2.147"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
+
+[[package]]
+name = "log"
+version = "0.4.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4"
+
+[[package]]
+name = "memchr"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
+
+[[package]]
+name = "num_enum"
+version = "0.5.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9"
+dependencies = [
+ "num_enum_derive",
+]
+
+[[package]]
+name = "num_enum_derive"
+version = "0.5.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799"
+dependencies = [
+ "proc-macro-crate",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
+
+[[package]]
+name = "proc-macro-crate"
+version = "1.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919"
+dependencies = [
+ "once_cell",
+ "toml_edit",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.64"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "78803b62cbf1f46fde80d7c0e803111524b9877184cfe7c3033659490ac7a7da"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "ring"
+version = "0.16.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc"
+dependencies = [
+ "cc",
+ "libc",
+ "once_cell",
+ "spin",
+ "untrusted",
+ "web-sys",
+ "winapi",
+]
+
+[[package]]
+name = "rustls"
+version = "0.21.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07180898a28ed6a7f7ba2311594308f595e3dd2e3c3812fa0a80a47b45f17e5d"
+dependencies = [
+ "log",
+ "ring",
+ "rustls-webpki",
+ "rustversion",
+ "sct",
+]
+
+[[package]]
+name = "rustls-ffi"
+version = "0.10.0"
+dependencies = [
+ "libc",
+ "log",
+ "num_enum",
+ "rustls",
+ "rustls-pemfile",
+ "sct",
+ "webpki",
+]
+
+[[package]]
+name = "rustls-pemfile"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5eebeaeb360c87bfb72e84abdb3447159c0eaececf1bef2aecd65a8be949d1c9"
+dependencies = [
+ "base64",
+]
+
+[[package]]
+name = "rustls-webpki"
+version = "0.100.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d6207cd5ed3d8dca7816f8f3725513a34609c0c765bf652b8c3cb4cfd87db46b"
+dependencies = [
+ "ring",
+ "untrusted",
+]
+
+[[package]]
+name = "rustversion"
+version = "1.0.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc31bd9b61a32c31f9650d18add92aa83a49ba979c143eefd27fe7177b05bd5f"
+
+[[package]]
+name = "sct"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4"
+dependencies = [
+ "ring",
+ "untrusted",
+]
+
+[[package]]
+name = "spin"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
+
+[[package]]
+name = "syn"
+version = "1.0.109"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "syn"
+version = "2.0.25"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "15e3fc8c0c74267e2df136e5e5fb656a464158aa57624053375eb9c8c6e25ae2"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "toml_datetime"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b"
+
+[[package]]
+name = "toml_edit"
+version = "0.19.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c500344a19072298cd05a7224b3c0c629348b78692bf48466c5238656e315a78"
+dependencies = [
+ "indexmap",
+ "toml_datetime",
+ "winnow",
+]
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73"
+
+[[package]]
+name = "untrusted"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.87"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342"
+dependencies = [
+ "cfg-if",
+ "wasm-bindgen-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.87"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd"
+dependencies = [
+ "bumpalo",
+ "log",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.25",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.87"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.87"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.25",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.87"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1"
+
+[[package]]
+name = "web-sys"
+version = "0.3.64"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "webpki"
+version = "0.22.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd"
+dependencies = [
+ "ring",
+ "untrusted",
+]
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
+[[package]]
+name = "winnow"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "81a2094c43cc94775293eaa0e499fbc30048a6d824ac82c0351a8c0bf9112529"
+dependencies = [
+ "memchr",
+]
diff --git a/nixpkgs/pkgs/development/libraries/rustls-ffi/default.nix b/nixpkgs/pkgs/development/libraries/rustls-ffi/default.nix
new file mode 100644
index 000000000000..46c16c9cc437
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rustls-ffi/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchFromGitHub, rustPlatform, Security, apacheHttpd, curl }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "rustls-ffi";
+  version = "0.10.0";
+
+  src = fetchFromGitHub {
+    owner = "rustls";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-IDIWN5g1aaE6SDdXSm4WYK6n+BpuypPYQITuDj1WJEc=";
+  };
+
+  propagatedBuildInputs = lib.optionals stdenv.isDarwin [ Security ];
+
+  cargoLock.lockFile = ./Cargo.lock;
+  postPatch = ''
+    cp ${./Cargo.lock} Cargo.lock
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    make install DESTDIR=${placeholder "out"}
+
+    runHook postInstall
+  '';
+
+  passthru.tests = {
+    apacheHttpd = apacheHttpd.override { modTlsSupport = true; };
+    curl = curl.override { opensslSupport = false; rustlsSupport = true; };
+  };
+
+  meta = with lib; {
+    description = "C-to-rustls bindings";
+    homepage = "https://github.com/rustls/rustls-ffi/";
+    license = with lib.licenses; [ mit asl20 isc ];
+    maintainers = [ maintainers.lesuisse ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/rutabaga_gfx/default.nix b/nixpkgs/pkgs/development/libraries/rutabaga_gfx/default.nix
new file mode 100644
index 000000000000..63f1ed88ae6c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/rutabaga_gfx/default.nix
@@ -0,0 +1,63 @@
+{ lib
+, stdenv
+, fetchgit
+, fetchpatch
+, cargo
+, pkg-config
+, rustPlatform
+, aemu
+, gfxstream
+, libdrm
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "rutabaga_gfx";
+  version = "0.1.2";
+
+  src = fetchgit {
+    url = "https://chromium.googlesource.com/crosvm/crosvm";
+    rev = "v${finalAttrs.version}-rutabaga-release";
+    fetchSubmodules = true;
+    hash = "sha256-0RJDKzeU7U6hc6CLKks8QcRs3fxN+/LYUbB0t6W790M=";
+  };
+
+  patches = [
+    # Make gfxstream optional
+    # https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4860836
+    (fetchpatch {
+      url = "https://chromium.googlesource.com/crosvm/crosvm/+/c3ad0e43eb12cbf737a6049e0134d483e337363f%5E%21/?format=TEXT";
+      decode = "base64 -d";
+      hash = "sha256-Ji1bK7jnRlg0OpDfCLcTHfPSiz3zYcdgsWL4n3EoIYI=";
+    })
+  ];
+
+  nativeBuildInputs = [ cargo pkg-config rustPlatform.cargoSetupHook ];
+  buildInputs = lib.optionals (lib.meta.availableOn stdenv.hostPlatform gfxstream) ([
+    aemu
+    gfxstream
+  ] ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform libdrm) [
+    libdrm
+  ]);
+
+  cargoDeps = rustPlatform.fetchCargoTarball {
+    inherit (finalAttrs) src;
+    hash = "sha256-wuF3Isrp+u5J8jPQoPsIOWYGNKLSNa2pLfvladAWkLs=";
+  };
+
+  # make install always rebuilds
+  dontBuild = true;
+
+  makeFlags = [ "prefix=$(out)" ];
+
+  preInstall = ''
+    cd rutabaga_gfx/ffi
+  '';
+
+  meta = with lib; {
+    homepage = "https://crosvm.dev/book/appendix/rutabaga_gfx.html";
+    description = "cross-platform abstraction for GPU and display virtualization";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ qyliss ];
+    platforms = platforms.darwin ++ platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/s2geometry/default.nix b/nixpkgs/pkgs/development/libraries/s2geometry/default.nix
new file mode 100644
index 000000000000..afd5ffa0a0a2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/s2geometry/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, lib, fetchFromGitHub, fetchpatch, cmake, pkg-config, openssl, gtest }:
+
+stdenv.mkDerivation rec {
+  pname = "s2geometry";
+  version = "0.9.0";
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "s2geometry";
+    rev = "v${version}";
+    sha256 = "1mx61bnn2f6bd281qlhn667q6yfg1pxzd2js88l5wpkqlfzzhfaz";
+  };
+
+  patches = [
+    # Fix build https://github.com/google/s2geometry/issues/165
+    (fetchpatch {
+      url = "https://github.com/google/s2geometry/commit/a4dddf40647c68cd0104eafc31e9c8fb247a6308.patch";
+      sha256 = "0fp3w4bg7pgf5vv4vacp9g06rbqzhxc2fg6i5appp93q6phiinvi";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ openssl gtest ];
+
+  meta = with lib; {
+    description = "Computational geometry and spatial indexing on the sphere";
+    homepage = "http://s2geometry.io/";
+    license = licenses.asl20;
+    maintainers = [ maintainers.Thra11 ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/s2n-tls/default.nix b/nixpkgs/pkgs/development/libraries/s2n-tls/default.nix
new file mode 100644
index 000000000000..9f68c243cf50
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/s2n-tls/default.nix
@@ -0,0 +1,55 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, openssl
+, nix
+}:
+
+stdenv.mkDerivation rec {
+  pname = "s2n-tls";
+  version = "1.4.3";
+
+  src = fetchFromGitHub {
+    owner = "aws";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-E3Giiu8xiTCSAPkbxOaVL/LXZWjhAS1M/n//Pe5eOKg=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  outputs = [ "out" "dev" ];
+
+  buildInputs = [ openssl ]; # s2n-config has find_dependency(LibCrypto).
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+    "-DUNSAFE_TREAT_WARNINGS_AS_ERRORS=OFF" # disable -Werror
+  ] ++ lib.optionals stdenv.hostPlatform.isMips64 [
+    # See https://github.com/aws/s2n-tls/issues/1592 and https://github.com/aws/s2n-tls/pull/1609
+    "-DS2N_NO_PQ=ON"
+  ];
+
+  propagatedBuildInputs = [ openssl ]; # s2n-config has find_dependency(LibCrypto).
+
+  postInstall = ''
+    # Glob for 'shared' or 'static' subdir
+    for f in $out/lib/s2n/cmake/*/s2n-targets.cmake; do
+      substituteInPlace "$f" \
+        --replace 'INTERFACE_INCLUDE_DIRECTORIES "''${_IMPORT_PREFIX}/include"' 'INTERFACE_INCLUDE_DIRECTORIES ""'
+    done
+  '';
+
+  passthru.tests = {
+    inherit nix;
+  };
+
+  meta = with lib; {
+    description = "C99 implementation of the TLS/SSL protocols";
+    homepage = "https://github.com/aws/s2n-tls";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ orivej ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/safefile/default.nix b/nixpkgs/pkgs/development/libraries/safefile/default.nix
new file mode 100644
index 000000000000..1f49afbacff2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/safefile/default.nix
@@ -0,0 +1,18 @@
+{ lib, stdenv, fetchurl, path, runtimeShell }:
+stdenv.mkDerivation rec {
+  pname = "safefile";
+  version = "1.0.5";
+
+  src = fetchurl {
+    url = "http://research.cs.wisc.edu/mist/${pname}/releases/${pname}-${version}.tar.gz";
+    sha256 = "1y0gikds2nr8jk8smhrl617njk23ymmpxyjb2j1xbj0k82xspv78";
+  };
+
+  meta = with lib; {
+    description = "File open routines to safely open a file when in the presence of an attack";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ raskin ];
+    platforms = platforms.all;
+    homepage = "https://research.cs.wisc.edu/mist/safefile/";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/sbc/default.nix b/nixpkgs/pkgs/development/libraries/sbc/default.nix
new file mode 100644
index 000000000000..7cdd3072c56c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sbc/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchurl, pkg-config, libsndfile }:
+
+stdenv.mkDerivation rec {
+  pname = "sbc";
+  version = "2.0";
+
+  src = fetchurl {
+    url = "https://www.kernel.org/pub/linux/bluetooth/${pname}-${version}.tar.xz";
+    sha256 = "sha256-jxI2jh279V4UU2UgRzz7M4yEs5KTnMm2Qpg2D9SgeZI=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libsndfile ];
+
+  meta = with lib; {
+    description = "SubBand Codec Library";
+    homepage = "http://www.bluez.org/";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/sblim-sfcc/default.nix b/nixpkgs/pkgs/development/libraries/sblim-sfcc/default.nix
new file mode 100644
index 000000000000..351eb5c15479
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sblim-sfcc/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, curl }:
+
+stdenv.mkDerivation rec {
+  pname = "sblim-sfcc";
+  version = "2.2.9"; # this is technically 2.2.9-preview
+
+  src = fetchFromGitHub {
+    owner  = "kkaempf";
+    repo   = "sblim-sfcc";
+    rev    = "514a76af2020fd6dc6fc380df76cbe27786a76a2";
+    sha256 = "06c1mskl9ixbf26v88w0lvn6v2xd6n5f0jd5mckqrn9j4vmh70hs";
+  };
+
+  buildInputs = [ curl ];
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Small Footprint CIM Client Library";
+    homepage    = "https://sourceforge.net/projects/sblim/";
+    license     = licenses.cpl10;
+    maintainers = with maintainers; [ deepfire ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/schroedinger/default.nix b/nixpkgs/pkgs/development/libraries/schroedinger/default.nix
new file mode 100644
index 000000000000..5403d77eb752
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/schroedinger/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchurl, orc, pkg-config, fetchpatch, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "schroedinger";
+  version = "1.0.11";
+
+  src = fetchurl {
+    url = "https://download.videolan.org/contrib/${pname}-${version}.tar.gz";
+    sha256 = "04prr667l4sn4zx256v1z36a0nnkxfdqyln48rbwlamr6l3jlmqy";
+  };
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  nativeBuildInputs = [ pkg-config autoreconfHook ];
+  buildInputs = [ orc ];
+
+  doCheck = (!stdenv.isDarwin);
+
+  patchFlags = [ "-p0" ];
+  patches = [
+    (fetchpatch {
+      url = "https://raw.githubusercontent.com/macports/macports-ports/master/multimedia/schroedinger/files/patch-testsuite-Makefile.am.diff";
+      sha256 = "0cc8ymvgjgwy7ghca2dd8m8pxpinf27s2i8krf2m3fzv2ckq09v3";
+    })
+  ];
+
+  meta = with lib; {
+    description = "An implementation of the Dirac video codec in ANSI C";
+    homepage = "https://sourceforge.net/projects/schrodinger/";
+    maintainers = [ ];
+    license = [ licenses.mpl11 licenses.lgpl2 licenses.mit ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/astronomy/cfitsio/darwin-rpath-universal.patch b/nixpkgs/pkgs/development/libraries/science/astronomy/cfitsio/darwin-rpath-universal.patch
new file mode 100644
index 000000000000..0ea3b55ef708
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/astronomy/cfitsio/darwin-rpath-universal.patch
@@ -0,0 +1,21 @@
+diff -ruN cfitsio/configure cfitsio-rpath-universal/configure
+--- cfitsio/configure	2018-05-09 21:16:00.000000000 +0200
++++ cfitsio-rpath-universal/configure	2021-10-27 12:02:25.000000000 +0200
+@@ -4829,16 +4829,7 @@
+     SHLIB_SUFFIX=".dylib"
+     CFITSIO_SHLIB="lib\${PACKAGE}.\${CFITSIO_SONAME}.\${CFITSIO_MAJOR}.\${CFITSIO_MINOR}\${SHLIB_SUFFIX}"
+     CFITSIO_SHLIB_SONAME="lib\${PACKAGE}.\${CFITSIO_SONAME}\${SHLIB_SUFFIX}"
+-    case $host in
+-        *darwin[56789]*)
+-            SHLIB_LD="$CC -dynamiclib -install_name lib\${PACKAGE}.\${CFITSIO_SONAME}\${SHLIB_SUFFIX} -compatibility_version \${CFITSIO_SONAME} -current_version \${CFITSIO_SONAME}.\${CFITSIO_MAJOR}.\${CFITSIO_MINOR}.\${CFITSIO_MICRO}"
+-            ;;
+-        *)
+-            # Build 'Universal' binaries (i386 & x86_64 architectures) and
+-            # use rpath token on Darwin 10.x or newer:
+-            SHLIB_LD="$CC -dynamiclib $C_UNIV_SWITCH -headerpad_max_install_names -install_name @rpath/lib\${PACKAGE}.\${CFITSIO_SONAME}\${SHLIB_SUFFIX} -compatibility_version \${CFITSIO_SONAME} -current_version \${CFITSIO_SONAME}.\${CFITSIO_MAJOR}.\${CFITSIO_MINOR}.\${CFITSIO_MICRO}"
+-            ;;
+-    esac
++    SHLIB_LD="$CC -dynamiclib -install_name ${out}/lib/lib\${PACKAGE}.\${CFITSIO_SONAME}\${SHLIB_SUFFIX} -compatibility_version \${CFITSIO_SONAME} -current_version \${CFITSIO_SONAME}.\${CFITSIO_MAJOR}.\${CFITSIO_MINOR}"
+ 
+     lhea_shlib_cflags="-fPIC -fno-common"
+     ;;
diff --git a/nixpkgs/pkgs/development/libraries/science/astronomy/cfitsio/default.nix b/nixpkgs/pkgs/development/libraries/science/astronomy/cfitsio/default.nix
new file mode 100644
index 000000000000..aa8c3f54e2fe
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/astronomy/cfitsio/default.nix
@@ -0,0 +1,59 @@
+{ stdenv
+, lib
+, fetchurl
+, bzip2
+, curl
+, zlib
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "cfitsio";
+  version = "4.3.1";
+
+  src = fetchurl {
+    url = "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-${finalAttrs.version}.tar.gz";
+    hash = "sha256-R6fI7gVoe+Hh2O7rlPuI8GD7882KTfUsy4jV6w9QYr4=";
+  };
+
+  patches = [
+    ./darwin-rpath-universal.patch
+  ];
+
+  buildInputs = [
+    bzip2
+    curl
+    zlib
+  ];
+
+  configureFlags = [
+    "--with-bzip2=${bzip2.out}"
+    "--enable-reentrant"
+  ];
+
+  hardeningDisable = [ "format" ];
+
+  # Shared-only build
+  buildFlags = [ "shared" ];
+
+  postPatch = ''
+    sed -e '/^install:/s/libcfitsio.a //' -e 's@/bin/@@g' -i Makefile.in
+  '';
+
+  meta = {
+    homepage = "https://heasarc.gsfc.nasa.gov/fitsio/";
+    description = "Library for reading and writing FITS data files";
+    longDescription = ''
+      CFITSIO is a library of C and Fortran subroutines for reading and
+      writing data files in FITS (Flexible Image Transport System) data
+      format.  CFITSIO provides simple high-level routines for reading and
+      writing FITS files that insulate the programmer from the internal
+      complexities of the FITS format.  CFITSIO also provides many
+      advanced features for manipulating and filtering the information in
+      FITS files.
+    '';
+    changelog = "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/docs/changes.txt";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ xbreak hjones2199 ];
+    platforms = lib.platforms.linux ++ lib.platforms.darwin;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/default.nix b/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/default.nix
new file mode 100644
index 000000000000..f0d25defe122
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/default.nix
@@ -0,0 +1,87 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, bash
+, cmake
+, cfitsio
+, libusb1
+, kmod
+, zlib
+, boost
+, libev
+, libnova
+, curl
+, libjpeg
+, gsl
+, fftw
+, gtest
+, indi-full
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "indilib";
+  version = "2.0.6";
+
+  src = fetchFromGitHub {
+    owner = "indilib";
+    repo = "indi";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-3MeF2G/rr//c7cgGzqDzmqoNKvR+7Kkbid1g8znKPkg=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = [
+    curl
+    cfitsio
+    libev
+    libusb1
+    zlib
+    boost
+    libnova
+    libjpeg
+    gsl
+    fftw
+  ];
+
+  cmakeFlags = [
+    "-DCMAKE_INSTALL_LIBDIR=lib"
+    "-DUDEVRULES_INSTALL_DIR=lib/udev/rules.d"
+  ] ++ lib.optional finalAttrs.finalPackage.doCheck [
+    "-DINDI_BUILD_UNITTESTS=ON"
+    "-DINDI_BUILD_INTEGTESTS=ON"
+  ];
+
+  checkInputs = [ gtest ];
+
+  doCheck = true;
+
+  # Socket address collisions between tests
+  enableParallelChecking = false;
+
+  postFixup = lib.optionalString stdenv.isLinux ''
+    for f in $out/lib/udev/rules.d/*.rules
+    do
+      substituteInPlace $f --replace "/bin/sh" "${bash}/bin/sh" \
+                           --replace "/sbin/modprobe" "${kmod}/sbin/modprobe"
+    done
+  '';
+
+  passthru.tests = {
+    # make sure 3rd party drivers compile with this indilib
+    indi-full = indi-full.override {
+      indilib = finalAttrs.finalPackage;
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://www.indilib.org/";
+    description = "Implementation of the INDI protocol for POSIX operating systems";
+    changelog = "https://github.com/indilib/indi/releases/tag/v${finalAttrs.version}";
+    license = licenses.lgpl2Plus;
+    maintainers = with maintainers; [ hjones2199 sheepforce ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-3rdparty.nix b/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-3rdparty.nix
new file mode 100644
index 000000000000..9dafb64e9292
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-3rdparty.nix
@@ -0,0 +1,100 @@
+{ stdenv
+, lib
+, bash
+, cmake
+, coreutils
+, cfitsio
+, libusb1
+, zlib
+, boost
+, libnova
+, curl
+, libjpeg
+, gsl
+, fftw
+, indilib
+, libgphoto2
+, libraw
+, libftdi1
+, libdc1394
+, gpsd
+, ffmpeg
+, limesuite
+, pkg-config
+, zeromq
+, version
+, src
+, withFirmware ? false
+, firmware ? null
+}:
+
+let
+  libusb-with-fxload = libusb1.override { withExamples = true;};
+in
+
+stdenv.mkDerivation rec {
+  pname = "indi-3rdparty";
+
+  inherit version src;
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [
+    indilib libnova curl cfitsio libusb1 zlib boost gsl gpsd
+    libjpeg libgphoto2 libraw libftdi1 libdc1394 ffmpeg fftw
+    limesuite zeromq
+  ] ++ lib.optionals withFirmware [
+    firmware
+  ];
+
+  postPatch = ''
+    for f in $(find . -name "CMakeLists.txt"); do
+      substituteInPlace $f \
+        --replace "/lib/udev/rules.d" "lib/udev/rules.d" \
+        --replace "/etc/udev/rules.d" "lib/udev/rules.d" \
+        --replace "/lib/firmware" "lib/firmware"
+    done
+
+    substituteInPlace libpktriggercord/CMakeLists.txt \
+      --replace "set (PK_DATADIR /usr/share/pktriggercord)" "set (PK_DATADIR $out/share/pkgtriggercord)"
+
+    sed '1i#include <ctime>' -i indi-duino/libfirmata/src/firmata.cpp # gcc12
+  '';
+
+  cmakeFlags = [
+    "-DINDI_DATA_DIR=share/indi"
+    "-DCMAKE_INSTALL_LIBDIR=lib"
+    "-DUDEVRULES_INSTALL_DIR=lib/udev/rules.d"
+    "-DRULES_INSTALL_DIR=lib/udev/rules.d"
+  ] ++ lib.optionals (!withFirmware) [
+    "-DWITH_ATIK=off"
+    "-DWITH_APOGEE=off"
+    "-DWITH_DSI=off"
+    "-DWITH_QHY=off"
+    "-DWITH_ARMADILLO=off"
+    "-DWITH_FISHCAMP=off"
+    "-DWITH_SBIG=off"
+  ];
+
+  postFixup = lib.optionalString stdenv.isLinux ''
+    for f in $out/lib/udev/rules.d/*.rules
+    do
+      substituteInPlace $f --replace "/sbin/fxload" "${libusb-with-fxload}/sbin/fxload" \
+                           --replace "/lib/firmware/" "$out/lib/firmware/" \
+                           --replace "/bin/sleep" "${coreutils}/bin/sleep" \
+                           --replace "/bin/cat" "${coreutils}/bin/cat" \
+                           --replace "/bin/echo" "${coreutils}/bin/echo" \
+                           --replace "/bin/sh" "${bash}/bin/sh"
+    done
+  '';
+
+
+  meta = with lib; {
+    homepage = "https://www.indilib.org/";
+    description = "Third party drivers for the INDI astronomical software suite";
+    changelog = "https://github.com/indilib/indi-3rdparty/releases/tag/v${version}";
+    license = licenses.lgpl2Plus;
+    maintainers = with maintainers; [ hjones2199 sheepforce ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-firmware.nix b/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-firmware.nix
new file mode 100644
index 000000000000..1eedfd3fea0b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-firmware.nix
@@ -0,0 +1,82 @@
+{ stdenv
+, lib
+, bash
+, cmake
+, cfitsio
+, coreutils
+, libusb1
+, zlib
+, boost
+, libnova
+, curl
+, libjpeg
+, gsl
+, fftw
+, indilib
+, libgphoto2
+, libraw
+, libftdi1
+, libdc1394
+, gpsd
+, ffmpeg
+, version
+, src
+, autoPatchelfHook
+}:
+let
+  libusb-with-fxload = libusb1.override { withExamples = true;};
+in
+stdenv.mkDerivation rec {
+  pname = "indi-firmware";
+
+  inherit version src;
+
+  nativeBuildInputs = [ cmake autoPatchelfHook ];
+
+  buildInputs = [
+    indilib libnova curl cfitsio libusb1 zlib boost gsl gpsd
+    libjpeg libgphoto2 libraw libftdi1 libdc1394 ffmpeg fftw
+  ];
+
+  cmakeFlags = [
+    "-DINDI_DATA_DIR=\${CMAKE_INSTALL_PREFIX}/share/indi"
+    "-DCMAKE_INSTALL_LIBDIR=lib"
+    "-DUDEVRULES_INSTALL_DIR=lib/udev/rules.d"
+    "-DRULES_INSTALL_DIR=lib/udev/rules.d"
+    "-DFIRMWARE_INSTALL_DIR=lib/firmware"
+    "-DQHY_FIRMWARE_INSTALL_DIR=\${CMAKE_INSTALL_PREFIX}/lib/firmware/qhy"
+    "-DCONF_DIR=etc"
+    "-DBUILD_LIBS=1"
+    "-DWITH_PENTAX=off"
+    "-DWITH_AHP_XC=off"
+  ];
+
+  postPatch = ''
+    for f in {libfishcamp,libsbig,libqhy}/CMakeLists.txt
+    do
+      substituteInPlace $f --replace "/lib/firmware" "lib/firmware"
+    done
+  '';
+
+  postFixup = lib.optionalString stdenv.isLinux ''
+    for f in $out/lib/udev/rules.d/*.rules
+    do
+      substituteInPlace "$f" --replace "/sbin/fxload" "${libusb-with-fxload}/sbin/fxload" \
+                             --replace "/bin/sleep" "${coreutils}/bin/sleep" \
+                             --replace "/bin/cat" "${coreutils}/bin/cat" \
+                             --replace "/bin/echo" "${coreutils}/bin/echo" \
+                             --replace "/bin/sh" "${bash}/bin/sh" \
+                             --replace "/lib/firmware/" "$out/lib/firmware/"
+      sed -e 's|-D $env{DEVNAME}|-p $env{BUSNUM},$env{DEVNUM}|' -i "$f"
+    done
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.indilib.org/";
+    description = "Third party firmware for the INDI astronomical software suite";
+    changelog = "https://github.com/indilib/indi-3rdparty/releases/tag/v${version}";
+    license = licenses.lgpl2Plus;
+    maintainers = with maintainers; [ hjones2199 sheepforce ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-full.nix b/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-full.nix
new file mode 100644
index 000000000000..4dd80c3f0275
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-full.nix
@@ -0,0 +1,29 @@
+{ stdenv, lib, callPackage, fetchFromGitHub, indilib }:
+
+let
+  inherit (indilib) version;
+  indi-3rdparty-src = fetchFromGitHub {
+    owner = "indilib";
+    repo = "indi-3rdparty";
+    rev = "v${version}";
+    hash = "sha256-KNoyYldZWsXB9ubu0EYDgckRtpQgSCmzKlx7Erx4MRQ=";
+  };
+  indi-firmware = callPackage ./indi-firmware.nix {
+    inherit version;
+    src = indi-3rdparty-src;
+  };
+  indi-3rdparty = callPackage ./indi-3rdparty.nix {
+    inherit version;
+    src = indi-3rdparty-src;
+    withFirmware = stdenv.isx86_64 || stdenv.isAarch64;
+    firmware = indi-firmware;
+  };
+in
+callPackage ./indi-with-drivers.nix {
+  pname = "indi-full";
+  inherit version;
+  extraDrivers = [
+    indi-3rdparty
+  ] ++ lib.optional (stdenv.isx86_64 || stdenv.isAarch64) indi-firmware
+  ;
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-with-drivers.nix b/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-with-drivers.nix
new file mode 100644
index 000000000000..f1201df1d8a0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/astronomy/indilib/indi-with-drivers.nix
@@ -0,0 +1,18 @@
+{ buildEnv, makeBinaryWrapper, indilib ? indilib, pname ? "indi-with-drivers", version ? null, extraDrivers ? null }:
+
+buildEnv {
+  name = "${pname}-${version}";
+  paths = [
+    indilib
+  ]
+  ++ extraDrivers;
+
+  nativeBuildInputs = [ makeBinaryWrapper ];
+
+  postBuild = ''
+    makeBinaryWrapper ${indilib}/bin/indiserver $out/bin/indiserver --set-default INDIPREFIX $out
+  '';
+
+
+  inherit (indilib) meta;
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/astronomy/libnova/default.nix b/nixpkgs/pkgs/development/libraries/science/astronomy/libnova/default.nix
new file mode 100644
index 000000000000..f6a8d01ab845
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/astronomy/libnova/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchgit, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "libnova";
+  version = "0.16";
+
+  # pull from git repo because upstream stopped tarball releases after v0.15
+  src = fetchgit {
+    url = "https://git.code.sf.net/p/libnova/${pname}";
+    rev = "v${version}";
+    sha256 = "0icwylwkixihzni0kgl0j8dx3qhqvym6zv2hkw2dy6v9zvysrb1b";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  meta = with lib; {
+    description = "Celestial Mechanics, Astrometry and Astrodynamics Library";
+    homepage = "http://libnova.sf.net";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ hjones2199 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/astronomy/libxisf/0001-Fix-pkg-config-paths.patch b/nixpkgs/pkgs/development/libraries/science/astronomy/libxisf/0001-Fix-pkg-config-paths.patch
new file mode 100644
index 000000000000..c26a2bbc8814
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/astronomy/libxisf/0001-Fix-pkg-config-paths.patch
@@ -0,0 +1,23 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Nicolas Benes <nbenes.gh@xandea.de>
+Date: Mon, 22 May 2023 09:25:27 +0200
+Subject: [PATCH] Fix pkg-config paths
+
+
+diff --git a/libxisf.pc.in b/libxisf.pc.in
+index b0b8b53..944b068 100644
+--- a/libxisf.pc.in
++++ b/libxisf.pc.in
+@@ -1,7 +1,7 @@
+ prefix="@CMAKE_INSTALL_PREFIX@"
+ exec_prefix="${prefix}"
+-libdir="${exec_prefix}/@CMAKE_INSTALL_LIBDIR@"
+-includedir="${prefix}/@CMAKE_INSTALL_INCLUDEDIR@"
++libdir="@CMAKE_INSTALL_FULL_LIBDIR@"
++includedir="@CMAKE_INSTALL_FULL_INCLUDEDIR@"
+ 
+ Name: @PROJECT_NAME@
+ Description: @CMAKE_PROJECT_DESCRIPTION@
+-- 
+2.38.5
+
diff --git a/nixpkgs/pkgs/development/libraries/science/astronomy/libxisf/default.nix b/nixpkgs/pkgs/development/libraries/science/astronomy/libxisf/default.nix
new file mode 100644
index 000000000000..19fb83ca78be
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/astronomy/libxisf/default.nix
@@ -0,0 +1,53 @@
+{ lib
+, stdenv
+, fetchFromGitea
+, cmake
+, pkg-config
+, lz4
+, pugixml
+, zlib
+, zstd
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libxisf";
+  version = "0.2.11";
+
+  src = fetchFromGitea {
+    domain = "gitea.nouspiro.space";
+    owner = "nou";
+    repo = "libXISF";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-wXIbU9/xUyECluL6k1oKS3NBpoC/qjQdW9e485qmlgo=";
+  };
+
+  patches = [
+    ./0001-Fix-pkg-config-paths.patch
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  cmakeFlags = [
+    "-DUSE_BUNDLED_LIBS=OFF"
+  ] ++ lib.optional stdenv.hostPlatform.isStatic "-DBUILD_SHARED_LIBS=OFF";
+
+  buildInputs = [
+    lz4
+    pugixml
+    zlib
+    zstd
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Library to load and write XISF format from PixInsight";
+    homepage = "https://gitea.nouspiro.space/nou/libXISF";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ panicgh ];
+    platforms = platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/science/astronomy/stellarsolver/default.nix b/nixpkgs/pkgs/development/libraries/science/astronomy/stellarsolver/default.nix
new file mode 100644
index 000000000000..8c6eb60d1d2b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/astronomy/stellarsolver/default.nix
@@ -0,0 +1,30 @@
+{ lib, mkDerivation, fetchFromGitHub, cmake,
+  qtbase, cfitsio, gsl, wcslib, withTester ? false }:
+
+mkDerivation rec {
+  pname = "stellarsolver";
+  version = "2.5";
+
+  src = fetchFromGitHub {
+    owner = "rlancaste";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-0bFGHlkZnAZlnxlj8tY3s9yTWgkNtSsPFfudB3uvyOA=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ qtbase cfitsio gsl wcslib ];
+
+  cmakeFlags = [
+    "-DBUILD_TESTER=${if withTester then "on" else "off"}"
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/rlancaste/stellarsolver";
+    description = "Astrometric plate solving library";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ hjones2199 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/astronomy/wcslib/default.nix b/nixpkgs/pkgs/development/libraries/science/astronomy/wcslib/default.nix
new file mode 100644
index 000000000000..a2bcdfdb7c34
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/astronomy/wcslib/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl, flex }:
+
+stdenv.mkDerivation rec {
+  pname = "wcslib";
+  version = "8.2.2";
+
+  src = fetchurl {
+    url = "ftp://ftp.atnf.csiro.au/pub/software/wcslib/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-YpgiCugX9OVSJkOsTD2iYjvnCjSEsaTzcGC+4+S9eDM=";
+  };
+
+  nativeBuildInputs = [ flex ];
+
+  enableParallelBuilding = true;
+
+  outputs = [ "out" "man" ];
+
+  meta = with lib; {
+    homepage = "https://www.atnf.csiro.au/people/mcalabre/WCS/";
+    description = "World Coordinate System library for astronomy";
+    longDescription = ''
+      Library for world coordinate systems for spherical geometries
+      and their conversion to image coordinate systems. This is the
+      standard library for this purpose in astronomy.
+    '';
+    maintainers = with maintainers; [ hjones2199 ];
+    license = licenses.lgpl3Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/benchmark/papi/default.nix b/nixpkgs/pkgs/development/libraries/science/benchmark/papi/default.nix
new file mode 100644
index 000000000000..7e022bafbb40
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/benchmark/papi/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv
+, fetchurl
+}:
+
+stdenv.mkDerivation rec {
+  version = "7.0.1";
+  pname = "papi";
+
+  src = fetchurl {
+    url = "https://bitbucket.org/icl/papi/get/papi-${lib.replaceStrings ["."] ["-"] version}-t.tar.gz";
+    sha256 = "sha256-VajhmPW8sEJksfhLjBVlpBH7+AZr4fwKZPAtZxRF1Bk=";
+  };
+
+  setSourceRoot = ''
+    sourceRoot=$(echo */src)
+  '';
+
+  doCheck = true;
+  checkTarget = "test";
+
+  meta = with lib; {
+    homepage = "https://icl.utk.edu/papi/";
+    description = "Library providing access to various hardware performance counters";
+    license = licenses.bsdOriginal;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ costrouc zhaofengli ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/biology/bicgl/default.nix b/nixpkgs/pkgs/development/libraries/science/biology/bicgl/default.nix
new file mode 100644
index 000000000000..4f98874b2595
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/biology/bicgl/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, cmake, libminc, bicpl, freeglut, mesa_glu, GLUT }:
+
+stdenv.mkDerivation rec {
+  pname = "bicgl";
+  version = "unstable-2018-04-06";
+
+  owner = "BIC-MNI";
+
+  src = fetchFromGitHub {
+    inherit owner;
+    repo = pname;
+    rev = "61a035751c9244fcca1edf94d6566fa2a709ce90";
+    sha256 = "0lzirdi1mf4yl8srq7vjn746sbydz7h0wjh7wy8gycy6hq04qrg4";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ libminc bicpl mesa_glu ]
+    ++ lib.optionals stdenv.isDarwin [ GLUT ]
+    ++ lib.optionals stdenv.isLinux [ freeglut ];
+
+  cmakeFlags = [
+    "-DLIBMINC_DIR=${libminc}/lib/cmake"
+    "-DBICPL_DIR=${bicpl}/lib"
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/${owner}/${pname}";
+    description = "Brain Imaging Centre graphics library";
+    maintainers = with maintainers; [ bcdarwin ];
+    platforms = platforms.unix;
+    license = licenses.free;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/biology/bicpl/default.nix b/nixpkgs/pkgs/development/libraries/science/biology/bicpl/default.nix
new file mode 100644
index 000000000000..5cf63e342242
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/biology/bicpl/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, cmake, libminc, netpbm }:
+
+stdenv.mkDerivation rec {
+  pname = "bicpl";
+  version = "unstable-2020-10-15";
+
+  # current master is significantly ahead of most recent release, so use Git version:
+  src = fetchFromGitHub {
+    owner  = "BIC-MNI";
+    repo   = pname;
+    rev    = "a58af912a71a4c62014975b89ef37a8e72de3c9d";
+    sha256 = "0iw0pmr8xrifbx5l8a0xidfqbm1v8hwzqrw0lcmimxlzdihyri0g";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ libminc netpbm ];
+
+  cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/cmake" ];
+
+  doCheck = false;
+  # internal_volume_io.h: No such file or directory
+
+  meta = with lib; {
+    homepage = "https://github.com/BIC-MNI/bicpl";
+    description = "Brain Imaging Centre programming library";
+    maintainers = with maintainers; [ bcdarwin ];
+    platforms = platforms.unix;
+    license   = licenses.free;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/biology/bpp-core/default.nix b/nixpkgs/pkgs/development/libraries/science/biology/bpp-core/default.nix
new file mode 100644
index 000000000000..0d0e3c114920
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/biology/bpp-core/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "bpp-core";
+  version = "2.4.1";
+
+  src = fetchFromGitHub { owner = "BioPP";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0ma2cl677l7s0n5sffh66cy9lxp5wycm50f121g8rx85p95vkgwv";
+  };
+
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/BioPP/bpp-core/commit/d450e8033b06e80dff9c2236fb7ce1f3ced5dcbb.patch";
+      hash = "sha256-9t68mrK7KNs5BxljKMaA+XskCcKDNv8DNCVUYunoNdw=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  postFixup = ''
+    substituteInPlace $out/lib/cmake/bpp-core/bpp-core-targets.cmake  \
+      --replace 'set(_IMPORT_PREFIX' '#set(_IMPORT_PREFIX'
+  '';
+  # prevents cmake from exporting incorrect INTERFACE_INCLUDE_DIRECTORIES
+  # of form /nix/store/.../nix/store/.../include,
+  # probably due to relative vs absolute path issue
+
+  doCheck = !stdenv.isDarwin;
+
+  meta = with lib; {
+    homepage = "https://github.com/BioPP/bpp-core";
+    changelog = "https://github.com/BioPP/bpp-core/blob/master/ChangeLog";
+    description = "C++ bioinformatics libraries and tools";
+    maintainers = with maintainers; [ bcdarwin ];
+    license = licenses.cecill20;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/biology/bpp-phyl/default.nix b/nixpkgs/pkgs/development/libraries/science/biology/bpp-phyl/default.nix
new file mode 100644
index 000000000000..0b18dbfcf19a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/biology/bpp-phyl/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchFromGitHub, cmake, bpp-core, bpp-seq }:
+
+stdenv.mkDerivation rec {
+  pname = "bpp-phyl";
+
+  inherit (bpp-core) version;
+
+  src = fetchFromGitHub {
+    owner = "BioPP";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "192zks6wyk903n06c2lbsscdhkjnfwms8p7jblsmk3lvjhdipb20";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ bpp-core bpp-seq ];
+
+  postFixup = ''
+    substituteInPlace $out/lib/cmake/${pname}/${pname}-targets.cmake  \
+      --replace 'set(_IMPORT_PREFIX' '#set(_IMPORT_PREFIX'
+  '';
+
+  doCheck = !stdenv.isDarwin;
+
+  meta = bpp-core.meta // {
+    homepage = "https://github.com/BioPP/bpp-phyl";
+    changelog = "https://github.com/BioPP/bpp-phyl/blob/master/ChangeLog";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/biology/bpp-popgen/default.nix b/nixpkgs/pkgs/development/libraries/science/biology/bpp-popgen/default.nix
new file mode 100644
index 000000000000..2cb89b4bbd38
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/biology/bpp-popgen/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchFromGitHub, cmake, bpp-core, bpp-seq }:
+
+stdenv.mkDerivation rec {
+  pname = "bpp-popgen";
+
+  inherit (bpp-core) version;
+
+  src = fetchFromGitHub {
+    owner = "BioPP";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0bz0fhrq3dri6a0hvfc3zlvrns8mrzzlnicw5pyfa812gc1qwfvh";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ bpp-core bpp-seq ];
+
+  postFixup = ''
+    substituteInPlace $out/lib/cmake/${pname}/${pname}-targets.cmake  \
+      --replace 'set(_IMPORT_PREFIX' '#set(_IMPORT_PREFIX'
+  '';
+  # prevents cmake from exporting incorrect INTERFACE_INCLUDE_DIRECTORIES
+  # of form /nix/store/.../nix/store/.../include,
+  # probably due to relative vs absolute path issue
+
+  doCheck = !stdenv.isDarwin;
+
+  meta = bpp-core.meta // {
+    homepage = "https://github.com/BioPP/bpp-popgen";
+    changelog = "https://github.com/BioPP/bpp-popgen/blob/master/ChangeLog";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/biology/bpp-seq/default.nix b/nixpkgs/pkgs/development/libraries/science/biology/bpp-seq/default.nix
new file mode 100644
index 000000000000..2f6fbf9e362c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/biology/bpp-seq/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchFromGitHub, cmake, bpp-core }:
+
+stdenv.mkDerivation rec {
+  pname = "bpp-seq";
+
+  inherit (bpp-core) version;
+
+  src = fetchFromGitHub {
+    owner = "BioPP";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1mc09g8jswzsa4wgrfv59jxn15ys3q8s0227p1j838wkphlwn2qk";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ bpp-core ];
+
+  postFixup = ''
+    substituteInPlace $out/lib/cmake/${pname}/${pname}-targets.cmake  \
+      --replace 'set(_IMPORT_PREFIX' '#set(_IMPORT_PREFIX'
+  '';
+  # prevents cmake from exporting incorrect INTERFACE_INCLUDE_DIRECTORIES
+  # of form /nix/store/.../nix/store/.../include,
+  # probably due to relative vs absolute path issue
+
+  doCheck = !stdenv.isDarwin;
+
+  meta = bpp-core.meta // {
+    homepage = "https://github.com/BioPP/bpp-seq";
+    changelog = "https://github.com/BioPP/bpp-seq/blob/master/ChangeLog";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/biology/ciftilib/default.nix b/nixpkgs/pkgs/development/libraries/science/biology/ciftilib/default.nix
new file mode 100644
index 000000000000..85b0b1c8a0e5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/biology/ciftilib/default.nix
@@ -0,0 +1,39 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, boost
+, libxmlxx
+, pkg-config
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ciftilib";
+  version = "1.6.0";
+
+  src = fetchFromGitHub {
+    owner = "Washington-University";
+    repo = "CiftiLib";
+    rev = "v${version}";
+    hash = "sha256-xc2dpMse4SozYEV/w3rXCrh1LKpTThq5nHB2y5uAD0A=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ boost libxmlxx zlib ];
+
+  cmakeFlags = [ "-DCMAKE_CTEST_ARGUMENTS=--exclude-regex;'big|datatype-md5'" ];
+
+  # error: no member named 'file_string' in 'boost::filesystem::path'
+  env.NIX_CFLAGS_COMPILE = "-UCIFTILIB_BOOST_NO_FSV3";
+
+  doCheck = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/Washington-University/CiftiLib";
+    description = "Library for reading and writing CIFTI files";
+    maintainers = with maintainers; [ bcdarwin ];
+    platforms = platforms.unix;
+    license = licenses.bsd2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/biology/edlib/default.nix b/nixpkgs/pkgs/development/libraries/science/biology/edlib/default.nix
new file mode 100644
index 000000000000..b8ea4a55291a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/biology/edlib/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "edlib";
+  version = "unstable-2021-08-20";
+
+  src = fetchFromGitHub {
+    owner = "Martinsos";
+    repo = pname;
+    rev = "f8afceb49ab0095c852e0b8b488ae2c88e566afd";
+    hash = "sha256-P/tFbvPBtA0MYCNDabW+Ypo3ltwP4S+6lRDxwAZ1JFo=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  doCheck = true;
+  checkPhase = ''
+    runHook preCheck
+    bin/runTests
+    runHook postCheck
+  '';
+
+  meta = with lib; {
+    homepage = "https://martinsos.github.io/edlib";
+    description = "Lightweight, fast C/C++ library for sequence alignment using edit distance";
+    maintainers = with maintainers; [ bcdarwin ];
+    license = licenses.mit;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/biology/elastix/default.nix b/nixpkgs/pkgs/development/libraries/science/biology/elastix/default.nix
new file mode 100644
index 000000000000..0344559f8a8f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/biology/elastix/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, cmake, itk, Cocoa }:
+
+stdenv.mkDerivation rec {
+  pname    = "elastix";
+  version = "5.1.0";
+
+  src = fetchFromGitHub {
+    owner = "SuperElastix";
+    repo = pname;
+    rev = version;
+    hash = "sha256-wFeLU8IwiF43a9TAvecQG+QMw88PQZdJ8sI1Zz3ZeXc=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ itk ] ++ lib.optionals stdenv.isDarwin [ Cocoa ];
+
+  doCheck = !stdenv.isDarwin;  # usual dynamic linker issues
+
+  meta = with lib; {
+    homepage = "https://elastix.lumc.nl";
+    description = "Image registration toolkit based on ITK";
+    maintainers = with maintainers; [ bcdarwin ];
+    platforms = platforms.x86_64;  # libitkpng linker issues with ITK 5.1
+    license = licenses.asl20;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/biology/gifticlib/default.nix b/nixpkgs/pkgs/development/libraries/science/biology/gifticlib/default.nix
new file mode 100644
index 000000000000..306324129cbd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/biology/gifticlib/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub, cmake, expat, nifticlib, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "gifticlib";
+  version = "unstable-2020-07-07";
+
+  src = fetchFromGitHub {
+    owner = "NIFTI-Imaging";
+    repo = "gifti_clib";
+    rev = "5eae81ba1e87ef3553df3b6ba585f12dc81a0030";
+    sha256 = "0gcab06gm0irjnlrkpszzd4wr8z0fi7gx8f7966gywdp2jlxzw19";
+  };
+
+  cmakeFlags = [ "-DUSE_SYSTEM_NIFTI=ON" "-DDOWNLOAD_TEST_DATA=OFF" ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ expat nifticlib zlib ];
+
+  # without the test data, this is only a few basic tests
+  doCheck = !stdenv.isDarwin;
+  checkPhase = ''
+    runHook preCheck
+    ctest -LE 'NEEDS_DATA'
+    runHook postCheck
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.nitrc.org/projects/gifti";
+    description = "Medical imaging geometry format C API";
+    maintainers = with maintainers; [ bcdarwin ];
+    platforms = platforms.unix;
+    license = licenses.publicDomain;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/biology/htslib/default.nix b/nixpkgs/pkgs/development/libraries/science/biology/htslib/default.nix
new file mode 100644
index 000000000000..8b1aa7d01e81
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/biology/htslib/default.nix
@@ -0,0 +1,52 @@
+{ lib, stdenv, fetchurl, zlib, bzip2, xz, curl, perl }:
+
+stdenv.mkDerivation rec {
+  pname = "htslib";
+  version = "1.19.1";
+
+  src = fetchurl {
+    url = "https://github.com/samtools/htslib/releases/download/${version}/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-Ii1001dPtnsVjGmIyYDuqrqKBlb15P+3a1+lfwNZM+w=";
+  };
+
+  # perl is only used during the check phase.
+  nativeBuildInputs = [ perl ];
+
+  buildInputs = [ zlib bzip2 xz curl ];
+
+  configureFlags = if ! stdenv.hostPlatform.isStatic
+                    then [ "--enable-libcurl" ] # optional but strongly recommended
+                    else [ "--disable-libcurl" "--disable-plugins" ];
+
+
+  # In the case of static builds, we need to replace the build and install phases
+  buildPhase = lib.optional stdenv.hostPlatform.isStatic ''
+    make AR=$AR lib-static
+    make LDFLAGS=-static bgzip htsfile tabix
+  '';
+
+  installPhase = lib.optional stdenv.hostPlatform.isStatic ''
+    install -d $out/bin
+    install -d $out/lib
+    install -d $out/include/htslib
+    install -D libhts.a $out/lib
+    install  -m644 htslib/*h $out/include/htslib
+    install -D bgzip htsfile tabix $out/bin
+  '';
+
+  preCheck = ''
+    patchShebangs test/
+  '';
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "A C library for reading/writing high-throughput sequencing data";
+    license = licenses.mit;
+    homepage = "http://www.htslib.org/";
+    platforms = platforms.unix;
+    maintainers = [ maintainers.mimame ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/biology/mirtk/default.nix b/nixpkgs/pkgs/development/libraries/science/biology/mirtk/default.nix
new file mode 100644
index 000000000000..9af6793ef997
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/biology/mirtk/default.nix
@@ -0,0 +1,72 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, python3
+, boost
+, eigen
+, libGLU
+, fltk
+, itk
+, vtk
+, zlib
+, tbb
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mirtk";
+  version = "unstable-2022-07-22";
+
+  src = fetchFromGitHub {
+    owner = "BioMedIA";
+    repo = "MIRTK";
+    rev = "973ce2fe3f9508dec68892dbf97cca39067aa3d6";
+    hash = "sha256-vKgkDrbyGOcbaYlxys1duC8ZNG0Y2nqh3TtSQ06Ox0Q=";
+    fetchSubmodules = true;
+  };
+
+  cmakeFlags = [
+    "-DWITH_VTK=ON"
+    "-DBUILD_ALL_MODULES=ON"
+    "-DWITH_TBB=ON"
+    "-DWITH_ITK=ON"
+    "-DWITH_GIFTICLIB=ON"
+    "-DWITH_NIFTILIB=ON"
+  ];
+
+  # tries to download data during configuration
+  postPatch = ''
+    substituteInPlace Packages/DrawEM/CMakeLists.txt --replace "include(Atlases.cmake)" ""
+  '';
+
+  # tests don't seem to be maintained and gtest fails to link with BUILD_TESTING=ON;
+  # unclear if specific to Nixpkgs
+  doCheck = false;
+
+  postInstall = ''
+    install -Dm644 -t "$out/share/bash-completion/completions/mirtk" share/completion/bash/mirtk
+  '';
+
+  env.NIX_CFLAGS_COMPILE = "-Wno-changes-meaning";
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [
+    boost
+    eigen
+    fltk
+    itk
+    libGLU.dev
+    python3
+    tbb
+    vtk
+    zlib
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/BioMedIA/MIRTK";
+    description = "Medical image registration library and tools";
+    maintainers = with maintainers; [ bcdarwin ];
+    platforms = platforms.linux;
+    license = licenses.asl20;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/biology/nifticlib/default.nix b/nixpkgs/pkgs/development/libraries/science/biology/nifticlib/default.nix
new file mode 100644
index 000000000000..fee2ea8772b4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/biology/nifticlib/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, cmake, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "nifticlib";
+  version = "3.0.1";
+
+  src = fetchFromGitHub {
+    owner = "NIFTI-Imaging";
+    repo = "nifti_clib";
+    rev = "v${version}";
+    sha256 = "0hamm6nvbjdjjd5md4jahzvn5559frigxaiybnjkh59ckxwb1hy4";
+  };
+
+  cmakeFlags = [ "-DDOWNLOAD_TEST_DATA=OFF" ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ zlib ];
+
+  checkPhase = ''
+    runHook preCheck
+    ctest -LE 'NEEDS_DATA'
+    runHook postCheck
+  '';
+  doCheck = true;
+
+  meta = with lib; {
+    homepage = "https://nifti-imaging.github.io";
+    description = "Medical imaging format C API";
+    maintainers = with maintainers; [ bcdarwin ];
+    platforms = platforms.unix;
+    license = licenses.publicDomain;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/biology/oobicpl/default.nix b/nixpkgs/pkgs/development/libraries/science/biology/oobicpl/default.nix
new file mode 100644
index 000000000000..7f1112311d6b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/biology/oobicpl/default.nix
@@ -0,0 +1,39 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, libminc
+, bicpl
+, arguments
+, pcre-cpp }:
+
+stdenv.mkDerivation rec {
+  pname = "oobicpl";
+  version = "unstable-2020-08-12";
+
+  src = fetchFromGitHub {
+    owner  = "BIC-MNI";
+    repo   = pname;
+    rev    = "a9409da8a5bb4925438f32aff577b6333faec28b";
+    sha256 = "0b4chjhr32wbb1sash8cq1jfnr7rzdq84hif8anlrjqd3l0gw357";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ libminc bicpl arguments pcre-cpp ];
+
+  cmakeFlags = [
+    "-DLIBMINC_DIR=${libminc}/lib/cmake"
+    "-DBICPL_DIR=${bicpl}/lib"
+    "-DARGUMENTS_DIR=${arguments}/lib"
+    "-DOOBICPL_BUILD_SHARED_LIBS=TRUE"
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/BIC-MNI/oobicpl";
+    description = "Brain Imaging Centre object-oriented programming library (and tools)";
+    maintainers = with maintainers; [ bcdarwin ];
+    platforms = platforms.unix;
+    license   = licenses.free;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/chemistry/avogadrolibs/default.nix b/nixpkgs/pkgs/development/libraries/science/chemistry/avogadrolibs/default.nix
new file mode 100644
index 000000000000..7966cd4be5f6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/chemistry/avogadrolibs/default.nix
@@ -0,0 +1,72 @@
+{ lib, stdenv, fetchFromGitHub, cmake, zlib, eigen, libGL, doxygen, spglib
+, mmtf-cpp, glew, python3, libarchive, libmsym, msgpack, qttools, wrapQtAppsHook
+}:
+
+let
+  pythonWP = python3.withPackages (p: with p; [ openbabel-bindings numpy ]);
+
+  # Pure data repositories
+  moleculesRepo = fetchFromGitHub {
+    owner = "OpenChemistry";
+    repo = "molecules";
+    rev = "1.0.0";
+    sha256 = "guY6osnpv7Oqt+HE1BpIqL10POp+x8GAci2kY0bLmqg=";
+  };
+  crystalsRepo = fetchFromGitHub {
+    owner = "OpenChemistry";
+    repo = "crystals";
+    rev = "1.0.1";
+    sha256 = "sH/WuvLaYu6akOc3ssAKhnxD8KNoDxuafDSozHqJZC4=";
+  };
+
+in stdenv.mkDerivation rec {
+  pname = "avogadrolibs";
+  version = "1.98.1";
+
+  src = fetchFromGitHub {
+    owner = "OpenChemistry";
+    repo = pname;
+    rev = version;
+    hash = "sha256-BuBMWW7N5Cu9tw5Vpwk+aoIaMWwHViRzLtIG7XDWjN4=";
+  };
+
+  postUnpack = ''
+    cp -r ${moleculesRepo} molecules
+    cp -r ${crystalsRepo} crystals
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    eigen
+    zlib
+    libGL
+    spglib
+    mmtf-cpp
+    glew
+    libarchive
+    libmsym
+    msgpack
+    qttools
+  ];
+
+  # Fix the broken CMake files to use the correct paths
+  postInstall = ''
+    substituteInPlace $out/lib/cmake/${pname}/AvogadroLibsConfig.cmake \
+      --replace "$out/" ""
+
+    substituteInPlace $out/lib/cmake/${pname}/AvogadroLibsTargets.cmake \
+      --replace "_IMPORT_PREFIX}/$out" "_IMPORT_PREFIX}/"
+  '';
+
+  meta = with lib; {
+    description = "Molecule editor and visualizer";
+    maintainers = with maintainers; [ sheepforce ];
+    homepage = "https://github.com/OpenChemistry/avogadrolibs";
+    platforms = platforms.linux;
+    license = licenses.gpl2Only;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/chemistry/cppe/default.nix b/nixpkgs/pkgs/development/libraries/science/chemistry/cppe/default.nix
new file mode 100644
index 000000000000..9781ce780660
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/chemistry/cppe/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, lib, fetchFromGitHub, cmake, llvmPackages }:
+
+stdenv.mkDerivation rec {
+  pname = "cppe";
+  version = "0.3.1";
+
+  src = fetchFromGitHub {
+    owner = "maxscheurer";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-guM7+ZWDJLcAUJtPkKLvC4LYSA2eBvER7cgwPZ7FxHw=";
+  };
+
+  nativeBuildInputs = [ cmake ]
+    ++ lib.optionals stdenv.cc.isClang [ llvmPackages.openmp ];
+
+  cmakeFlags = [ "-DCMAKE_INSTALL_LIBDIR=lib" ];
+
+  meta = with lib; {
+    description = "C++ and Python library for Polarizable Embedding";
+    homepage = "https://github.com/maxscheurer/cppe";
+    license = licenses.lgpl3Only;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.sheepforce ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/chemistry/dftd4/default.nix b/nixpkgs/pkgs/development/libraries/science/chemistry/dftd4/default.nix
new file mode 100644
index 000000000000..d791a7d4e3d6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/chemistry/dftd4/default.nix
@@ -0,0 +1,54 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, gfortran
+, blas
+, lapack
+, mctc-lib
+, mstore
+, multicharge
+}:
+
+assert !blas.isILP64 && !lapack.isILP64;
+
+stdenv.mkDerivation rec {
+  pname = "dftd4";
+  version = "3.6.0";
+
+  src = fetchFromGitHub {
+    owner = "dftd4";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-VIV9953hx0MZupOARdH+P1h7JtZeJmTlqtO8si+lwdU=";
+  };
+
+  nativeBuildInputs = [ cmake gfortran ];
+
+  buildInputs = [ blas lapack mctc-lib mstore multicharge ];
+
+  outputs = [ "out" "dev" ];
+
+  # Fix the Pkg-Config files for doubled store paths
+  postPatch = ''
+    substituteInPlace config/template.pc \
+      --replace "\''${prefix}/" ""
+  '';
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
+  ];
+
+  doCheck = true;
+  preCheck = ''
+    export OMP_NUM_THREADS=2
+  '';
+
+  meta = with lib; {
+    description = "Generally Applicable Atomic-Charge Dependent London Dispersion Correction";
+    license = with licenses; [ lgpl3Plus gpl3Plus ];
+    homepage = "https://github.com/grimme-lab/dftd4";
+    platforms = platforms.linux;
+    maintainers = [ maintainers.sheepforce ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/chemistry/harminv/default.nix b/nixpkgs/pkgs/development/libraries/science/chemistry/harminv/default.nix
new file mode 100644
index 000000000000..54c0d03979ab
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/chemistry/harminv/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, gfortran
+, blas
+, lapack
+}:
+
+assert !blas.isILP64;
+assert !lapack.isILP64;
+
+stdenv.mkDerivation rec {
+  pname = "harminv";
+  version = "1.4.2";
+
+  src = fetchFromGitHub {
+    owner = "NanoComp";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-EXEt7l69etcBdDdEDlD1ODOdhTBZCVjgY1jhRUDd/W0=";
+  };
+
+  # File is missing in the git checkout but required by autotools
+  postPatch = ''
+    touch ChangeLog
+  '';
+
+  nativeBuildInputs = [ autoreconfHook gfortran ];
+
+  buildInputs = [ blas lapack ];
+
+  configureFlags = [ "--enable-shared" ];
+
+  meta = with lib; {
+    description = "Harmonic inversion algorithm of Mandelshtam: decompose signal into sum of decaying sinusoids";
+    homepage = "https://github.com/NanoComp/harminv";
+    license = with licenses; [ gpl2Only ];
+    maintainers = with maintainers; [ sheepforce markuskowa ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/chemistry/libGDSII/default.nix b/nixpkgs/pkgs/development/libraries/science/chemistry/libGDSII/default.nix
new file mode 100644
index 000000000000..c3257bad3e26
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/chemistry/libGDSII/default.nix
@@ -0,0 +1,32 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libGDSII";
+  version = "0.21";
+
+  src = fetchFromGitHub {
+    owner = "HomerReid";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-EXEt7l69etcBdDdEDlD1ODOdhTBZCVjgY1jhRUDd/W0=";
+  };
+
+  # File is missing in the repo but automake requires it
+  postPatch = ''
+    touch ChangeLog
+  '';
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  meta = with lib; {
+    description = "Library and command-line utility for reading GDSII geometry files";
+    homepage = "https://github.com/HomerReid/libGDSII";
+    license = [ licenses.gpl2Only ];
+    maintainers = with maintainers; [ sheepforce markuskowa ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/chemistry/libmsym/default.nix b/nixpkgs/pkgs/development/libraries/science/chemistry/libmsym/default.nix
new file mode 100644
index 000000000000..fdcf7d00e3ba
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/chemistry/libmsym/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, lib, fetchFromGitHub, cmake } :
+
+stdenv.mkDerivation rec {
+  pname = "libmsym";
+  version = "0.2.3";
+
+  src = fetchFromGitHub  {
+    owner = "mcodev31";
+    repo = pname;
+    rev = "v${version}";
+    sha256= "k+OEwrA/saupP/wX6Ii5My0vffiJ0X9xMCTrliMSMik=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = " molecular point group symmetry lib";
+    homepage = "https://github.com/mcodev31/libmsym";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.sheepforce ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/chemistry/libvdwxc/default.nix b/nixpkgs/pkgs/development/libraries/science/chemistry/libvdwxc/default.nix
new file mode 100644
index 000000000000..c0da65e7c788
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/chemistry/libvdwxc/default.nix
@@ -0,0 +1,52 @@
+{ stdenv
+, lib
+, fetchFromGitLab
+, gfortran
+, autoreconfHook
+, fftwMpi
+, mpi
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libvdwxc";
+  # Stable version has non-working MPI detection.
+  version = "unstable-24.02.2020";
+
+  src = fetchFromGitLab {
+    owner = "libvdwxc";
+    repo = pname;
+    rev = "92f4910c6ac88e111db2fb3a518089d0510c53b0";
+    sha256 = "1c7pjrvifncbdyngs2bv185imxbcbq64nka8gshhp8n2ns6fids6";
+  };
+
+  nativeBuildInputs = [ autoreconfHook gfortran ];
+
+  propagatedBuildInputs = [ mpi fftwMpi ];
+
+  preConfigure = ''
+    mkdir build && cd build
+
+    export PATH=$PATH:${mpi}/bin
+    configureFlagsArray+=(
+      --with-mpi=${lib.getDev mpi}
+      CC=mpicc
+      FC=mpif90
+      MPICC=mpicc
+      MPIFC=mpif90
+    )
+  '';
+
+  configureScript = "../configure";
+
+  hardeningDisable = [ "format" ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Portable C library of density functionals with van der Waals interactions for density functional theory";
+    license = with licenses; [ lgpl3Plus bsd3 ];
+    homepage = "https://libvdwxc.org/";
+    platforms = platforms.unix;
+    maintainers = [ maintainers.sheepforce ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/chemistry/mctc-lib/default.nix b/nixpkgs/pkgs/development/libraries/science/chemistry/mctc-lib/default.nix
new file mode 100644
index 000000000000..a3726ea5e5dd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/chemistry/mctc-lib/default.nix
@@ -0,0 +1,46 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, gfortran
+, pkg-config
+, json-fortran
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mctc-lib";
+  version = "0.3.1";
+
+  src = fetchFromGitHub {
+    owner = "grimme-lab";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-AXjg/ZsitdDf9fNoGVmVal1iZ4/sxjJb7A9W4yye/rg=";
+  };
+
+  nativeBuildInputs = [ gfortran pkg-config cmake ];
+
+  buildInputs = [ json-fortran ];
+
+  outputs = [ "out" "dev" ];
+
+  # Fix the Pkg-Config files for doubled store paths
+  postPatch = ''
+    substituteInPlace config/template.pc \
+      --replace "\''${prefix}/" ""
+  '';
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Modular computation tool chain library";
+    homepage = "https://github.com/grimme-lab/mctc-lib";
+    license = licenses.asl20;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.sheepforce ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/chemistry/mmtf-cpp/default.nix b/nixpkgs/pkgs/development/libraries/science/chemistry/mmtf-cpp/default.nix
new file mode 100644
index 000000000000..a93b8f32cef2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/chemistry/mmtf-cpp/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, lib, fetchFromGitHub, cmake, msgpack } :
+
+stdenv.mkDerivation rec {
+  pname = "mmtf-cpp";
+  version = "1.1.0";
+
+  src = fetchFromGitHub  {
+    owner = "rcsb";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-8JrNobvekMggS8L/VORKA32DNUdXiDrYMObjd29wQmc=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ msgpack ];
+
+  meta = with lib; {
+    description = "A library of exchange-correlation functionals with arbitrary-order derivatives";
+    homepage = "https://github.com/rcsb/mmtf-cpp";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.sheepforce ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/chemistry/molequeue/default.nix b/nixpkgs/pkgs/development/libraries/science/chemistry/molequeue/default.nix
new file mode 100644
index 000000000000..b560ac16c698
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/chemistry/molequeue/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub, cmake, qttools, wrapQtAppsHook }:
+
+stdenv.mkDerivation rec {
+  pname = "molequeue";
+  version = "0.9.0";
+
+  src = fetchFromGitHub {
+    owner = "OpenChemistry";
+    repo = pname;
+    rev = version;
+    hash = "sha256-+NoY8YVseFyBbxc3ttFWiQuHQyy1GN8zvV1jGFjmvLg=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [ qttools ];
+
+  # Fix the broken CMake files to use the correct paths
+  postInstall = ''
+    substituteInPlace $out/lib/cmake/${pname}/MoleQueueConfig.cmake \
+      --replace "$out/" ""
+  '';
+
+  meta = with lib; {
+    description = "Desktop integration of high performance computing resources";
+    maintainers = with maintainers; [ sheepforce ];
+    homepage = "https://github.com/OpenChemistry/molequeue";
+    platforms = platforms.linux;
+    license = licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/chemistry/mstore/default.nix b/nixpkgs/pkgs/development/libraries/science/chemistry/mstore/default.nix
new file mode 100644
index 000000000000..948d11435461
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/chemistry/mstore/default.nix
@@ -0,0 +1,43 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, gfortran
+, mctc-lib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mstore";
+  version = "0.2.0";
+
+  src = fetchFromGitHub {
+    owner = "grimme-lab";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-dN2BulLS/ENRFVdJIrZRxgBV8S4d5+7BjTCGnhBbf4I=";
+  };
+
+  nativeBuildInputs = [ cmake gfortran ];
+
+  buildInputs = [ mctc-lib ];
+
+  outputs = [ "out" "dev" ];
+
+  # Fix the Pkg-Config files for doubled store paths
+  postPatch = ''
+    substituteInPlace config/template.pc \
+      --replace "\''${prefix}/" ""
+  '';
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
+  ];
+
+  meta = with lib; {
+    description = "Molecular structure store for testing";
+    license = licenses.asl20;
+    homepage = "https://github.com/grimme-lab/mstore";
+    platforms = platforms.linux;
+    maintainers = [ maintainers.sheepforce ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/chemistry/multicharge/default.nix b/nixpkgs/pkgs/development/libraries/science/chemistry/multicharge/default.nix
new file mode 100644
index 000000000000..b90f073a4f2e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/chemistry/multicharge/default.nix
@@ -0,0 +1,53 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, gfortran
+, blas
+, lapack
+, mctc-lib
+, mstore
+}:
+
+assert !blas.isILP64 && !lapack.isILP64;
+
+stdenv.mkDerivation rec {
+  pname = "multicharge";
+  version = "0.2.0";
+
+  src = fetchFromGitHub {
+    owner = "grimme-lab";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-oUI5x5/Gd0EZBb1w+0jlJUF9X51FnkHFu8H7KctqXl0=";
+  };
+
+  nativeBuildInputs = [ cmake gfortran ];
+
+  buildInputs = [ blas lapack mctc-lib mstore ];
+
+  outputs = [ "out" "dev" ];
+
+  # Fix the Pkg-Config files for doubled store paths
+  postPatch = ''
+    substituteInPlace config/template.pc \
+      --replace "\''${prefix}/" ""
+  '';
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
+  ];
+
+  doCheck = true;
+  preCheck = ''
+    export OMP_NUM_THREADS=2
+  '';
+
+  meta = with lib; {
+    description = "Electronegativity equilibration model for atomic partial charges";
+    license = licenses.asl20;
+    homepage = "https://github.com/grimme-lab/multicharge";
+    platforms = platforms.linux;
+    maintainers = [ maintainers.sheepforce ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/chemistry/openmm/default.nix b/nixpkgs/pkgs/development/libraries/science/chemistry/openmm/default.nix
new file mode 100644
index 000000000000..9b37f14f1403
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/chemistry/openmm/default.nix
@@ -0,0 +1,108 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, gfortran
+, fftwSinglePrec
+, doxygen
+, swig
+, enablePython ? false
+, python3Packages
+, enableOpencl ? true
+, opencl-headers
+, ocl-icd
+, config
+, enableCuda ? config.cudaSupport
+, cudaPackages
+, addOpenGLRunpath
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openmm";
+  version = "8.1.1";
+
+  src = fetchFromGitHub {
+    owner = "openmm";
+    repo = pname;
+    rev = version;
+    hash = "sha256-pYWBniV1J+UZBOPPjuUxVevONHaclo+GvGBEpr7Zmxg=";
+  };
+
+  # "This test is stochastic and may occassionally fail". It does.
+  postPatch = ''
+    rm \
+      platforms/*/tests/Test*BrownianIntegrator.* \
+      platforms/*/tests/Test*LangevinIntegrator.* \
+      serialization/tests/TestSerializeIntegrator.cpp
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    gfortran
+    swig
+    doxygen
+    python3Packages.python
+  ] ++ lib.optional enableCuda addOpenGLRunpath;
+
+  buildInputs = [ fftwSinglePrec ]
+    ++ lib.optionals enableOpencl [ ocl-icd opencl-headers ]
+    ++ lib.optional enableCuda cudaPackages.cudatoolkit;
+
+  propagatedBuildInputs = lib.optionals enablePython (with python3Packages; [
+    setuptools
+    python
+    numpy
+    cython
+  ]);
+
+  cmakeFlags = [
+    "-DBUILD_TESTING=ON"
+    "-DOPENMM_BUILD_AMOEBA_PLUGIN=ON"
+    "-DOPENMM_BUILD_CPU_LIB=ON"
+    "-DOPENMM_BUILD_C_AND_FORTRAN_WRAPPERS=ON"
+    "-DOPENMM_BUILD_DRUDE_PLUGIN=ON"
+    "-DOPENMM_BUILD_PME_PLUGIN=ON"
+    "-DOPENMM_BUILD_RPMD_PLUGIN=ON"
+    "-DOPENMM_BUILD_SHARED_LIB=ON"
+  ] ++ lib.optionals enablePython [
+    "-DOPENMM_BUILD_PYTHON_WRAPPERS=ON"
+  ] ++ lib.optionals enableOpencl [
+    "-DOPENMM_BUILD_OPENCL_LIB=ON"
+    "-DOPENMM_BUILD_AMOEBA_OPENCL_LIB=ON"
+    "-DOPENMM_BUILD_DRUDE_OPENCL_LIB=ON"
+    "-DOPENMM_BUILD_RPMD_OPENCL_LIB=ON"
+  ] ++ lib.optionals enableCuda [
+    "-DCUDA_SDK_ROOT_DIR=${cudaPackages.cudatoolkit}"
+    "-DOPENMM_BUILD_AMOEBA_CUDA_LIB=ON"
+    "-DOPENMM_BUILD_CUDA_LIB=ON"
+    "-DOPENMM_BUILD_DRUDE_CUDA_LIB=ON"
+    "-DOPENMM_BUILD_RPMD_CUDA_LIB=ON"
+    "-DCMAKE_LIBRARY_PATH=${cudaPackages.cudatoolkit}/lib64/stubs"
+  ];
+
+  postInstall = lib.strings.optionalString enablePython ''
+      export OPENMM_LIB_PATH=$out/lib
+      export OPENMM_INCLUDE_PATH=$out/include
+      cd python
+      ${python3Packages.python.pythonOnBuildForHost.interpreter} setup.py build
+      ${python3Packages.python.pythonOnBuildForHost.interpreter} setup.py install --prefix=$out
+      mv $out/lib/python*/site-packages/OpenMM*.egg/{openmm,simtk} $out/lib/python*/site-packages/.
+    '';
+
+  postFixup = ''
+    for lib in $out/lib/plugins/*CUDA.so $out/lib/plugins/*Cuda*.so; do
+      addOpenGLRunpath "$lib"
+    done
+  '';
+
+  # Couldn't get CUDA to run properly in the sandbox
+  doCheck = !enableCuda && !enableOpencl;
+
+  meta = with lib; {
+    description = "Toolkit for molecular simulation using high performance GPU code";
+    homepage = "https://openmm.org/";
+    license = with licenses; [ gpl3Plus lgpl3Plus mit ];
+    platforms = platforms.linux;
+    maintainers = [ maintainers.sheepforce ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/chemistry/plumed/default.nix b/nixpkgs/pkgs/development/libraries/science/chemistry/plumed/default.nix
new file mode 100644
index 000000000000..b825c8270d62
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/chemistry/plumed/default.nix
@@ -0,0 +1,34 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, blas
+}:
+
+assert !blas.isILP64;
+
+stdenv.mkDerivation rec {
+  pname = "plumed";
+  version = "2.9.0";
+
+  src = fetchFromGitHub {
+    owner = "plumed";
+    repo = "plumed2";
+    rev = "v${version}";
+    hash = "sha256-yL+59f908IhbxGIylI1ydi1BPZwAapjK/vP4/h5gcHk=";
+  };
+
+  postPatch = ''
+    patchShebangs .
+  '';
+
+  buildInputs = [ blas ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Molecular metadynamics library";
+    homepage = "https://github.com/plumed/plumed2";
+    license = licenses.lgpl3Only;
+    maintainers = [ maintainers.sheepforce ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/chemistry/simple-dftd3/default.nix b/nixpkgs/pkgs/development/libraries/science/chemistry/simple-dftd3/default.nix
new file mode 100644
index 000000000000..ae5e30d73608
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/chemistry/simple-dftd3/default.nix
@@ -0,0 +1,52 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, gfortran
+, cmake
+, mctc-lib
+, mstore
+, toml-f
+, blas
+}:
+
+assert !blas.isILP64;
+
+stdenv.mkDerivation rec {
+  pname = "simple-dftd3";
+  version = "1.0.0";
+
+  src = fetchFromGitHub {
+    owner = "dftd3";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-dfXiKKCGJ69aExSKpVC3Bp//COy256R9PDyxCNmDsfo=";
+  };
+
+  nativeBuildInputs = [ cmake gfortran ];
+
+  buildInputs = [ mctc-lib mstore toml-f blas ];
+
+  outputs = [ "out" "dev" ];
+
+  # Fix the Pkg-Config files for doubled store paths
+  postPatch = ''
+    substituteInPlace config/template.pc \
+      --replace "\''${prefix}/" ""
+  '';
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
+  ];
+
+  doCheck = true;
+  preCheck = ''
+    export OMP_NUM_THREADS=2
+  '';
+
+  meta = with lib; {
+    description = "Reimplementation of the DFT-D3 program";
+    license = with licenses; [ lgpl3Only gpl3Only ];
+    homepage = "https://github.com/dftd3/simple-dftd3";
+    platforms = [ "x86_64-linux" ];
+    maintainers = [ maintainers.sheepforce ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/chemistry/simple-dftd3/python.nix b/nixpkgs/pkgs/development/libraries/science/chemistry/simple-dftd3/python.nix
new file mode 100644
index 000000000000..74f24e10f55f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/chemistry/simple-dftd3/python.nix
@@ -0,0 +1,42 @@
+{ buildPythonPackage
+, pkg-config
+, meson
+, simple-dftd3
+, cffi
+, numpy
+, toml
+, qcengine
+, pyscf
+, ase
+, pytestCheckHook
+}:
+
+buildPythonPackage {
+  inherit (simple-dftd3) pname version src meta;
+
+  # pytest is also required for installation, not only testing
+  nativeBuildInputs = [ pytestCheckHook ];
+
+  buildInputs = [ simple-dftd3 ];
+
+  propagatedBuildInputs = [
+    cffi
+    numpy
+    toml
+  ];
+
+  checkInputs = [
+    ase
+    qcengine
+    pyscf
+  ];
+
+  preConfigure = ''
+    cd python
+  '';
+
+  # The compiled CFFI is not placed correctly before pytest invocation
+  preCheck = ''
+    find . -name "_libdftd3*" -exec cp {} ./dftd3/. \;
+  '';
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/chemistry/tblite/0001-fix-multicharge-dep-needed-for-static-compilation.patch b/nixpkgs/pkgs/development/libraries/science/chemistry/tblite/0001-fix-multicharge-dep-needed-for-static-compilation.patch
new file mode 100644
index 000000000000..d2d84f42e09f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/chemistry/tblite/0001-fix-multicharge-dep-needed-for-static-compilation.patch
@@ -0,0 +1,31 @@
+From 1885a2349102742e33c5c97a8ab4bcacc032fc70 Mon Sep 17 00:00:00 2001
+From: Ryan Swart <ryan@talosystems.com>
+Date: Thu, 30 Mar 2023 15:50:23 +0800
+Subject: [PATCH] fix: multicharge dep needed for static compilation
+
+---
+ config/meson.build | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/config/meson.build b/config/meson.build
+index 4f76160..629fa5e 100644
+--- a/config/meson.build
++++ b/config/meson.build
+@@ -136,6 +136,14 @@ sdftd3_dep = dependency(
+ )
+ lib_deps += sdftd3_dep
+ 
++# Create multicharge library as subproject
++multicharge_dep = dependency(
++  'multicharge',
++  fallback: ['multicharge'],
++  default_options: ['default_library=static', 'api=false', 'python=false'],
++)
++lib_deps += multicharge_dep
++
+ # Create TOML Fortran as subproject
+ tomlf_dep = dependency(
+   'toml-f',
+-- 
+2.39.2
+
diff --git a/nixpkgs/pkgs/development/libraries/science/chemistry/tblite/default.nix b/nixpkgs/pkgs/development/libraries/science/chemistry/tblite/default.nix
new file mode 100644
index 000000000000..bea5793addbf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/chemistry/tblite/default.nix
@@ -0,0 +1,75 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, gfortran
+, blas
+, lapack
+, mctc-lib
+, mstore
+, toml-f
+, multicharge
+, dftd4
+, simple-dftd3
+}:
+
+assert !blas.isILP64 && !lapack.isILP64;
+
+stdenv.mkDerivation rec {
+  pname = "tblite";
+  version = "0.3.0";
+
+  src = fetchFromGitHub {
+    owner = "tblite";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-R7CAFG/x55k5Ieslxeq+DWq1wPip4cI+Yvn1cBbeVNs=";
+  };
+
+  patches = [
+    # toml-f 0.4 compatibility
+    (fetchpatch {
+      url = "https://github.com/tblite/tblite/commit/da759fd02b8fbf470a5c6d3df9657cca6b1d0a9a.diff";
+      hash = "sha256-VaeA2VyK+Eas432HMSpJ0lXxHBBNGpfkUO1eHeWpYl0=";
+    })
+  ];
+
+  # Fix the Pkg-Config files for doubled store paths
+  postPatch = ''
+    substituteInPlace config/template.pc \
+      --replace "\''${prefix}/" ""
+  '';
+
+  nativeBuildInputs = [ cmake gfortran ];
+
+  buildInputs = [
+    blas
+    lapack
+    mctc-lib
+    mstore
+    toml-f
+    multicharge
+    dftd4
+    simple-dftd3
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
+  ];
+
+  doCheck = true;
+  preCheck = ''
+    export OMP_NUM_THREADS=2
+  '';
+
+  meta = with lib; {
+    description = "Light-weight tight-binding framework";
+    license = with licenses; [ gpl3Plus lgpl3Plus ];
+    homepage = "https://github.com/tblite/tblite";
+    platforms = platforms.linux;
+    maintainers = [ maintainers.sheepforce ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/chemistry/tblite/python.nix b/nixpkgs/pkgs/development/libraries/science/chemistry/tblite/python.nix
new file mode 100644
index 000000000000..3a72cfaaa6a3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/chemistry/tblite/python.nix
@@ -0,0 +1,61 @@
+{ buildPythonPackage
+, fetchpatch
+, meson
+, ninja
+, pkg-config
+, tblite
+, numpy
+, simple-dftd3
+, cffi
+, gfortran
+, blas
+, lapack
+, mctc-lib
+, mstore
+, toml-f
+, multicharge
+, dftd4
+}:
+
+buildPythonPackage {
+  inherit (tblite) pname version src meta;
+
+  nativeBuildInputs = [
+    tblite
+    meson
+    ninja
+    pkg-config
+    gfortran
+    mctc-lib
+  ];
+
+  buildInputs = [
+    tblite
+    simple-dftd3
+    blas
+    lapack
+    mctc-lib
+    mstore
+    toml-f
+    multicharge
+    dftd4
+  ];
+
+  propagatedBuildInputs = [ tblite simple-dftd3 cffi numpy ];
+
+
+  patches = [
+    # Add multicharge to the meson deps; otherwise we get missing mod_multicharge errors
+    ./0001-fix-multicharge-dep-needed-for-static-compilation.patch
+
+    # Toml-f 0.4.0 compatibility https://github.com/tblite/tblite/pull/108
+    (fetchpatch {
+      url = "https://github.com/tblite/tblite/commit/e4255519b58a5198a5fa8f3073bef1c78a4bbdbe.diff";
+      hash = "sha256-BMwYsdWfK+vG3BFgzusLYfwo0WXrYSPxJoEJIyOvbPg=";
+    })
+  ];
+
+  format = "other";
+  pythonImportsCheck = [ "tblite" "tblite.interface" ];
+  mesonFlags = [ "-Dpython=true" ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/chemistry/xcfun/default.nix b/nixpkgs/pkgs/development/libraries/science/chemistry/xcfun/default.nix
new file mode 100644
index 000000000000..0534c7b46b03
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/chemistry/xcfun/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, lib, fetchFromGitHub, cmake, gfortran, python3 } :
+
+stdenv.mkDerivation rec {
+  pname = "xcfun";
+  version = "2.1.1";
+
+  src = fetchFromGitHub  {
+    owner = "dftlibs";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1bj70cnhbh6ziy02x988wwl7cbwaq17ld7qwhswqkgnnx8rpgxid";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    gfortran
+  ];
+
+  propagatedBuildInputs = [ (python3.withPackages (p: with p; [ pybind11 ])) ];
+
+  cmakeFlags = [ "-DXCFUN_MAX_ORDER=3" ];
+
+  meta = with lib; {
+    description = "A library of exchange-correlation functionals with arbitrary-order derivatives";
+    homepage = "https://github.com/dftlibs/xcfun";
+    license = licenses.mpl20;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.sheepforce ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/electronics/coloquinte/default.nix b/nixpkgs/pkgs/development/libraries/science/electronics/coloquinte/default.nix
new file mode 100644
index 000000000000..6946080c100e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/electronics/coloquinte/default.nix
@@ -0,0 +1,38 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, lemon-graph
+, eigen
+, boost
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "coloquinte";
+  version = "0.3.1";
+
+  src = fetchFromGitHub {
+    owner = "coloquinte";
+    repo = "PlaceRoute";
+    rev = finalAttrs.version;
+    hash = "sha256-bPDXaNZCNBM0qiu+46cL/zH/41lwqHPqfqTzJaERgVQ=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = [
+    lemon-graph
+    eigen
+    boost
+  ];
+
+  meta = {
+    description = "Placement library for electronic circuits";
+    homepage = "https://github.com/Coloquinte/PlaceRoute";
+    license = lib.licenses.mit;
+    platforms = lib.platforms.linux;
+    maintainers = [ lib.maintainers.coloquinte ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/science/electronics/qcsxcad/default.nix b/nixpkgs/pkgs/development/libraries/science/electronics/qcsxcad/default.nix
new file mode 100644
index 000000000000..6ac453aec2c0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/electronics/qcsxcad/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, mkDerivation
+, fetchFromGitHub
+, cmake
+, csxcad
+, tinyxml
+, vtkWithQt5
+, qtbase
+}:
+
+mkDerivation {
+  pname = "qcsxcad";
+  version = "unstable-2023-01-06";
+
+  src = fetchFromGitHub {
+    owner = "thliebig";
+    repo = "QCSXCAD";
+    rev = "1cde9d560a5000f4c24c249d2dd5ccda12de38b6";
+    hash = "sha256-kc9Vnx6jGiQC2K88ZH00b61D/DbWxAIZZwYCsINqtrY=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  cmakeFlags = [
+    "-DCSXCAD_ROOT_DIR=${csxcad}"
+    "-DENABLE_RPATH=OFF"
+  ];
+
+  buildInputs = [
+    csxcad
+    tinyxml
+    vtkWithQt5
+    qtbase
+  ];
+
+  meta = with lib; {
+    description = "Qt library for CSXCAD";
+    homepage = "https://github.com/thliebig/QCSXCAD";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ matthuszagh ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/QuadProgpp/default.nix b/nixpkgs/pkgs/development/libraries/science/math/QuadProgpp/default.nix
new file mode 100644
index 000000000000..f67d68d768a0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/QuadProgpp/default.nix
@@ -0,0 +1,33 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation {
+  pname = "quadprogpp";
+  version = "unstable-2023-01-20";
+
+  src = fetchFromGitHub {
+    owner = "liuq";
+    repo = "QuadProgpp";
+    rev = "4c51d91deb5af251957edf9454bfb74279a4544e";
+    hash = "sha256-uozwuTAOPsRwYM9KyG3V0hwcmaPpfZPID9Wdd4olsvY=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  meta = with lib; {
+    description = "A C++ library for Quadratic Programming";
+    longDescription = ''
+      QuadProg++ is a C++ library for Quadratic Programming which implements
+      the Goldfarb-Idnani active-set dual method.
+    '';
+    homepage = "https://github.com/liuq/QuadProgpp";
+    license = licenses.mit;
+    maintainers = with maintainers; [ wegank ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/amd-blis/default.nix b/nixpkgs/pkgs/development/libraries/science/math/amd-blis/default.nix
new file mode 100644
index 000000000000..f6d00411221c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/amd-blis/default.nix
@@ -0,0 +1,72 @@
+{ lib, stdenv
+, fetchFromGitHub
+, perl
+, python3
+
+# Enable BLAS interface with 64-bit integer width.
+, blas64 ? false
+
+# Target architecture. "amdzen" compiles kernels for all Zen
+# generations. To build kernels for specific Zen generations,
+# use "zen", "zen2", "zen3", or "zen4".
+, withArchitecture ? "amdzen"
+
+# Enable OpenMP-based threading.
+, withOpenMP ? true
+}:
+
+let
+  threadingSuffix = lib.optionalString withOpenMP "-mt";
+  blasIntSize = if blas64 then "64" else "32";
+
+in stdenv.mkDerivation rec {
+  pname = "amd-blis";
+  version = "4.1";
+
+  src = fetchFromGitHub {
+    owner = "amd";
+    repo = "blis";
+    rev = version;
+    hash = "sha256-1vd4uBg/+Vufqsr+MnAWSUW/THkribHNSMeq1/is8K4=";
+  };
+
+  inherit blas64;
+
+  nativeBuildInputs = [
+    perl
+    python3
+  ];
+
+  # Tests currently fail with non-Zen CPUs due to a floating point
+  # exception in one of the generic kernels. Try to re-enable the
+  # next release.
+  doCheck = false;
+
+  enableParallelBuilding = true;
+
+  configureFlags = [
+    "--enable-cblas"
+    "--blas-int-size=${blasIntSize}"
+  ] ++ lib.optionals withOpenMP [ "--enable-threading=openmp" ]
+    ++ [ withArchitecture ];
+
+  postPatch = ''
+    patchShebangs configure build/flatten-headers.py
+  '';
+
+  postInstall = ''
+    ls $out/lib
+    ln -s $out/lib/libblis${threadingSuffix}.so $out/lib/libblas.so.3
+    ln -s $out/lib/libblis${threadingSuffix}.so $out/lib/libcblas.so.3
+    ln -s $out/lib/libblas.so.3 $out/lib/libblas.so
+    ln -s $out/lib/libcblas.so.3 $out/lib/libcblas.so
+  '';
+
+  meta = with lib; {
+    description = "BLAS-compatible library optimized for AMD CPUs";
+    homepage = "https://developer.amd.com/amd-aocl/blas-library/";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.markuskowa ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/amd-libflame/default.nix b/nixpkgs/pkgs/development/libraries/science/math/amd-libflame/default.nix
new file mode 100644
index 000000000000..b03352c54e8a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/amd-libflame/default.nix
@@ -0,0 +1,62 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, gfortran
+, python3
+, amd-blis
+, aocl-utils
+
+, withOpenMP ? true
+, blas64 ? false
+, withAMDOpt ? true
+}:
+
+stdenv.mkDerivation rec {
+  pname = "amd-libflame";
+  version = "4.1";
+
+  src = fetchFromGitHub {
+    owner = "amd";
+    repo = "libflame";
+    rev = version;
+    hash = "sha256-SZk11oOAnvn1vb7ucX6U9b0YtAJNxl3tQu4ExHpwwoo=";
+  };
+
+  postPatch = ''
+    patchShebangs build
+
+    # Enforce reproducible build compiler flags
+    substituteInPlace CMakeLists.txt --replace '-mtune=native' ""
+  '';
+
+  passthru = { inherit blas64; };
+
+  nativeBuildInputs = [ cmake gfortran python3 ];
+
+  buildInputs = [ amd-blis aocl-utils ];
+
+  cmakeFlags = [
+    "-DLIBAOCLUTILS_LIBRARY_PATH=${lib.getLib aocl-utils}/lib/libaoclutils${stdenv.hostPlatform.extensions.sharedLibrary}"
+    "-DLIBAOCLUTILS_INCLUDE_PATH=${lib.getDev aocl-utils}/include"
+    "-DENABLE_BUILTIN_LAPACK2FLAME=ON"
+    "-DENABLE_CBLAS_INTERFACES=ON"
+    "-DENABLE_EXT_LAPACK_INTERFACE=ON"
+  ]
+  ++ lib.optional (!withOpenMP) "-DENABLE_MULTITHREADING=OFF"
+  ++ lib.optional blas64 "-DENABLE_ILP64=ON"
+  ++ lib.optional withAMDOpt "-DENABLE_AMD_OPT=ON";
+
+  postInstall = ''
+    ln -s $out/lib/libflame.so $out/lib/liblapack.so.3
+    ln -s $out/lib/libflame.so $out/lib/liblapacke.so.3
+  '';
+
+  meta = with lib; {
+    description = "LAPACK-compatible linear algebra library optimized for AMD CPUs";
+    homepage = "https://developer.amd.com/amd-aocl/blas-library/";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.markuskowa ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/arpack/default.nix b/nixpkgs/pkgs/development/libraries/science/math/arpack/default.nix
new file mode 100644
index 000000000000..744d565eddcd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/arpack/default.nix
@@ -0,0 +1,68 @@
+{ lib, stdenv, fetchFromGitHub, cmake
+, gfortran, blas, lapack, eigen
+, useMpi ? false
+, mpi
+, openssh
+, igraph
+}:
+
+# MPI version can only be built with LP64 interface.
+# See https://github.com/opencollab/arpack-ng#readme
+assert useMpi -> !blas.isILP64;
+
+stdenv.mkDerivation rec {
+  pname = "arpack";
+  version = "3.9.1";
+
+  src = fetchFromGitHub {
+    owner = "opencollab";
+    repo = "arpack-ng";
+    rev = version;
+    sha256 = "sha256-HCvapLba8oLqx9I5+KDAU0s/dTmdWOEilS75i4gyfC0=";
+  };
+
+  nativeBuildInputs = [ cmake gfortran ];
+  buildInputs = assert (blas.isILP64 == lapack.isILP64); [
+    blas
+    lapack
+    eigen
+  ] ++ lib.optional useMpi mpi;
+
+  nativeCheckInputs = lib.optional useMpi openssh;
+
+  doCheck = true;
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+    "-DINTERFACE64=${if blas.isILP64 then "1" else "0"}"
+    "-DMPI=${if useMpi then "ON" else "OFF"}"
+  ];
+
+  preCheck = ''
+    # Prevent tests from using all cores
+    export OMP_NUM_THREADS=2
+  '';
+
+  postFixup = lib.optionalString stdenv.isDarwin ''
+    install_name_tool -change libblas.dylib ${blas}/lib/libblas.dylib $out/lib/libarpack.dylib
+  '';
+
+  passthru = {
+    inherit (blas) isILP64;
+    tests = {
+      inherit igraph;
+    };
+  };
+
+  meta = {
+    homepage = "https://github.com/opencollab/arpack-ng";
+    changelog = "https://github.com/opencollab/arpack-ng/blob/${src.rev}/CHANGES";
+    description = ''
+      A collection of Fortran77 subroutines to solve large scale eigenvalue
+      problems.
+    '';
+    license = lib.licenses.bsd3;
+    maintainers = with lib.maintainers; [ ttuegel dotlambda ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/blas/default.nix b/nixpkgs/pkgs/development/libraries/science/math/blas/default.nix
new file mode 100644
index 000000000000..4431ab63c7b7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/blas/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, fetchurl, cmake, gfortran
+# Whether to build with ILP64 interface
+, blas64 ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "blas";
+  version = "3.12.0";
+
+  src = fetchurl {
+    url = "http://www.netlib.org/blas/${pname}-${version}.tgz";
+    sha256 = "sha256-zMQbXQiOUNsAMDF66bDJrzdXEME5KsrR/iCWAtpaWq0=";
+  };
+
+  passthru = { inherit blas64; };
+
+  nativeBuildInputs = [ cmake gfortran ];
+
+  cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ]
+    ++ lib.optional blas64 "-DBUILD_INDEX64=ON";
+
+  postInstall = let
+    canonicalExtension = if stdenv.hostPlatform.isLinux
+                       then "${stdenv.hostPlatform.extensions.sharedLibrary}.${lib.versions.major version}"
+                       else stdenv.hostPlatform.extensions.sharedLibrary;
+  in lib.optionalString blas64 ''
+    ln -s $out/lib/libblas64${canonicalExtension} $out/lib/libblas${canonicalExtension}
+  '';
+
+  preFixup = lib.optionalString stdenv.isDarwin ''
+    for fn in $(find $out/lib -name "*.so*"); do
+      if [ -L "$fn" ]; then continue; fi
+      install_name_tool -id "$fn" "$fn"
+    done
+  '';
+
+  meta = with lib; {
+    description = "Basic Linear Algebra Subprograms";
+    license = licenses.publicDomain;
+    maintainers = [ maintainers.markuskowa ];
+    homepage = "http://www.netlib.org/blas/";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/blis/default.nix b/nixpkgs/pkgs/development/libraries/science/math/blis/default.nix
new file mode 100644
index 000000000000..2c9aa745ba12
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/blis/default.nix
@@ -0,0 +1,64 @@
+{ lib, stdenv
+, fetchFromGitHub
+, perl
+, python3
+
+# Enable BLAS interface with 64-bit integer width.
+, blas64 ? false
+
+# Target architecture. x86_64 builds Intel and AMD kernels.
+, withArchitecture ? "x86_64"
+
+# Enable OpenMP-based threading.
+, withOpenMP ? true
+}:
+
+let
+  blasIntSize = if blas64 then "64" else "32";
+in stdenv.mkDerivation rec {
+  pname = "blis";
+  version = "0.9.0";
+
+  src = fetchFromGitHub {
+    owner = "flame";
+    repo = "blis";
+    rev = version;
+    sha256 = "sha256-1aHIdt5wCDrT1hBPnaUVThwjwDkJQ0G0+tao2iFXYpM=";
+  };
+
+  inherit blas64;
+
+  nativeBuildInputs = [
+    perl
+    python3
+  ];
+
+  doCheck = true;
+
+  enableParallelBuilding = true;
+
+  configureFlags = [
+    "--enable-cblas"
+    "--blas-int-size=${blasIntSize}"
+  ] ++ lib.optionals withOpenMP [ "--enable-threading=openmp" ]
+    ++ [ withArchitecture ];
+
+  postPatch = ''
+    patchShebangs configure build/flatten-headers.py
+  '';
+
+  postInstall = ''
+    ln -s $out/lib/libblis.so.4 $out/lib/libblas.so.3
+    ln -s $out/lib/libblis.so.4 $out/lib/libcblas.so.3
+    ln -s $out/lib/libblas.so.3 $out/lib/libblas.so
+    ln -s $out/lib/libcblas.so.3 $out/lib/libcblas.so
+  '';
+
+  meta = with lib; {
+    description = "BLAS-compatible linear algebra library";
+    homepage = "https://github.com/flame/blis";
+    license = licenses.bsd3;
+    maintainers = [ ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/bonmin/default.nix b/nixpkgs/pkgs/development/libraries/science/math/bonmin/default.nix
new file mode 100644
index 000000000000..5a736f976957
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/bonmin/default.nix
@@ -0,0 +1,53 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, gfortran
+, pkg-config
+, blas
+, bzip2
+, cbc
+, clp
+, ipopt
+, lapack
+, libamplsolver
+, zlib
+}:
+
+assert (!blas.isILP64) && (!lapack.isILP64);
+
+stdenv.mkDerivation rec {
+  pname = "bonmin";
+  version = "1.8.9";
+
+  src = fetchFromGitHub {
+    owner = "coin-or";
+    repo = "Bonmin";
+    rev = "releases/${version}";
+    sha256 = "sha256-nqjAQ1NdNJ/T4p8YljEWRt/uy2aDwyBeAsag0TmRc5Q=";
+  };
+
+  nativeBuildInputs = [
+    gfortran
+    pkg-config
+  ];
+  buildInputs = [
+    blas
+    bzip2
+    cbc
+    clp
+    ipopt
+    lapack
+    libamplsolver
+    zlib
+  ];
+
+  meta = with lib; {
+    description = "An open-source code for solving general MINLP (Mixed Integer NonLinear Programming) problems";
+    homepage = "https://github.com/coin-or/Bonmin";
+    license = licenses.epl10;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ aanderse ];
+    # never built on aarch64-darwin, x86_64-darwin since first introduction in nixpkgs
+    broken = stdenv.isDarwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/brial/default.nix b/nixpkgs/pkgs/development/libraries/science/math/brial/default.nix
new file mode 100644
index 000000000000..6ec28ba1c226
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/brial/default.nix
@@ -0,0 +1,46 @@
+{ lib, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+, boost
+, m4ri
+, gd
+}:
+
+stdenv.mkDerivation rec {
+  version = "1.2.12";
+  pname = "brial";
+
+  src = fetchFromGitHub {
+    owner = "BRiAl";
+    repo = "BRiAl";
+    rev = version;
+    sha256 = "sha256-y6nlqRBJRWohGDAKe/F37qBP1SgtFHR1HD+erFJReOM=";
+  };
+
+  # FIXME package boost-test and enable checks
+  doCheck = false;
+
+  configureFlags = [
+    "--with-boost-unit-test-framework=no"
+  ];
+
+  buildInputs = [
+    boost
+    m4ri
+    gd
+  ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/BRiAl/BRiAl";
+    description = "Legacy version of PolyBoRi maintained by sagemath developers";
+    license = licenses.gpl2Plus;
+    maintainers = teams.sage.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/cholmod-extra/default.nix b/nixpkgs/pkgs/development/libraries/science/math/cholmod-extra/default.nix
new file mode 100644
index 000000000000..311ffefcfaad
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/cholmod-extra/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub, gfortran, suitesparse, blas, lapack }:
+stdenv.mkDerivation rec {
+  pname = "cholmod-extra";
+  version = "1.2.0";
+
+  src = fetchFromGitHub {
+    repo = pname;
+    owner = "jluttine";
+    rev = version;
+    sha256 = "0hz1lfp0zaarvl0dv0zgp337hyd8np41kmdpz5rr3fc6yzw7vmkg";
+  };
+
+  nativeBuildInputs = [ gfortran ];
+  buildInputs = [ suitesparse blas lapack ];
+
+  makeFlags = [
+    "BLAS=-lcblas"
+  ];
+
+  installFlags = [
+    "INSTALL_LIB=$(out)/lib"
+    "INSTALL_INCLUDE=$(out)/include"
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/jluttine/cholmod-extra";
+    description = "A set of additional routines for SuiteSparse CHOLMOD Module";
+    license = with licenses; [ gpl2Plus ];
+    maintainers = with maintainers; [ jluttine ];
+    platforms = with platforms; unix;
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/clblas/default.nix b/nixpkgs/pkgs/development/libraries/science/math/clblas/default.nix
new file mode 100644
index 000000000000..a87d107b3a17
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/clblas/default.nix
@@ -0,0 +1,68 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+, gfortran
+, blas
+, boost
+, python3
+, ocl-icd
+, opencl-headers
+, Accelerate, CoreGraphics, CoreVideo, OpenCL
+}:
+
+stdenv.mkDerivation rec {
+  pname = "clblas";
+  version = "2.12";
+
+  src = fetchFromGitHub {
+    owner = "clMathLibraries";
+    repo = "clBLAS";
+    rev = "v${version}";
+    sha256 = "154mz52r5hm0jrp5fqrirzzbki14c1jkacj75flplnykbl36ibjs";
+  };
+
+  patches = [ ./platform.patch ];
+
+  postPatch = ''
+    sed -i -re 's/(set\(\s*Boost_USE_STATIC_LIBS\s+).*/\1OFF\ \)/g' src/CMakeLists.txt
+  '';
+
+  preConfigure = ''
+    cd src
+  '';
+
+  cmakeFlags = [
+     "-DBUILD_TEST=OFF"
+  ];
+
+  nativeBuildInputs = [ cmake gfortran ];
+  buildInputs = [
+    blas
+    python3
+    boost
+  ] ++ lib.optionals (!stdenv.isDarwin) [
+    ocl-icd
+    opencl-headers
+  ] ++ lib.optionals stdenv.isDarwin [
+    Accelerate
+    CoreGraphics
+    CoreVideo
+  ];
+  propagatedBuildInputs = lib.optionals stdenv.isDarwin [
+    OpenCL
+  ];
+
+  strictDeps = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/clMathLibraries/clBLAS";
+    description = "A software library containing BLAS functions written in OpenCL";
+    longDescription = ''
+      This package contains a library of BLAS functions on top of OpenCL.
+    '';
+    license = licenses.asl20;
+    maintainers = with maintainers; [ artuuge ];
+    platforms = platforms.unix;
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/clblas/platform.patch b/nixpkgs/pkgs/development/libraries/science/math/clblas/platform.patch
new file mode 100644
index 000000000000..87404a426a4b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/clblas/platform.patch
@@ -0,0 +1,34 @@
+diff --git a/src/library/tools/ktest/config.cpp b/src/library/tools/ktest/config.cpp
+index 8b20128..faf9bde 100644
+--- a/src/library/tools/ktest/config.cpp
++++ b/src/library/tools/ktest/config.cpp
+@@ -24,8 +24,6 @@
+ 
+ using namespace clMath;
+ 
+-static const char DEFAULT_PLATFORM_NAME[] = "AMD Accelerated Parallel Processing";
+-
+ Config::Config() :
+     defaultConfig_(""),
+     cpp_("ktest.cpp"),
+@@ -35,7 +33,10 @@ Config::Config() :
+     hasFuncID_(false), hasSubdims_(false),
+     skipAccuracy_(false)
+ {
+-    setPlatform(DEFAULT_PLATFORM_NAME);
++    platform_ = NULL;
++    setPlatform("");
++
++    device_ = NULL;
+     setDevice("");
+ 
+     memset(&kargs_, 0, sizeof(kargs_));
+@@ -262,7 +263,7 @@ Config::setPlatform(const std::string& name)
+             continue;
+         }
+         if (name.empty()) {
+-            found = (strcmp(pname, DEFAULT_PLATFORM_NAME) == 0);
++	    found = true;
+         }
+         else {
+             found = (strcmp(pname, name.c_str()) == 0);
diff --git a/nixpkgs/pkgs/development/libraries/science/math/clblast/default.nix b/nixpkgs/pkgs/development/libraries/science/math/clblast/default.nix
new file mode 100644
index 000000000000..23d749f1b297
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/clblast/default.nix
@@ -0,0 +1,44 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, ninja
+, opencl-headers
+, ocl-icd
+}:
+
+stdenv.mkDerivation rec {
+  pname = "clblast";
+  version = "1.6.1";
+
+  src = fetchFromGitHub {
+    owner = "CNugteren";
+    repo = "CLBlast";
+    rev = version;
+    hash = "sha256-1ddjmoLhFoLi/z2cae0HZidUTySsZQDk1T8MVPTbfi4=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    ninja
+  ];
+
+  buildInputs = [
+    opencl-headers
+    ocl-icd
+  ];
+
+  cmakeFlags = [
+    # https://github.com/NixOS/nixpkgs/issues/144170
+    "-DCMAKE_INSTALL_INCLUDEDIR=include"
+    "-DCMAKE_INSTALL_LIBDIR=lib"
+  ];
+
+  meta = with lib; {
+    description = "The tuned OpenCL BLAS library";
+    homepage = "https://github.com/CNugteren/CLBlast";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ Tungsten842 ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/cliquer/default.nix b/nixpkgs/pkgs/development/libraries/science/math/cliquer/default.nix
new file mode 100644
index 000000000000..55a1b9dcb4c9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/cliquer/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv
+, fetchFromGitHub
+, autoreconfHook
+}:
+
+stdenv.mkDerivation rec {
+  version = "1.22";
+  pname = "cliquer";
+
+  # autotoolized version of the original cliquer
+  src = fetchFromGitHub {
+    owner = "dimpase";
+    repo = "autocliquer";
+    rev = "v${version}";
+    sha256 = "00gcmrhi2fjn8b246w5a3b0pl7p6haxy5wjvd9kcqib1xanz59z4";
+  };
+
+  doCheck = true;
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  meta = with lib; {
+    description = "Routines for clique searching";
+    longDescription = ''
+      Cliquer is a set of C routines for finding cliques in an arbitrary weighted graph.
+      It uses an exact branch-and-bound algorithm developed by Patric Östergård.
+      It is designed with the aim of being efficient while still being flexible and
+      easy to use.
+    '';
+    homepage = "https://users.aalto.fi/~pat/cliquer.html";
+    downloadPage = src.meta.homepage; # autocliquer
+    license = licenses.gpl2Plus;
+    maintainers = teams.sage.members;
+    mainProgram = "cl";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/clmagma/default.nix b/nixpkgs/pkgs/development/libraries/science/math/clmagma/default.nix
new file mode 100644
index 000000000000..c5efbb757df8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/clmagma/default.nix
@@ -0,0 +1,73 @@
+{ lib, stdenv, fetchurl, gfortran, opencl-headers, clblas, ocl-icd, mkl, intel-ocl }:
+
+let
+  incfile = builtins.toFile "make.inc.custom" ''
+    CC        = g++
+    FORT      = gfortran
+
+    ARCH      = ar
+    ARCHFLAGS = cr
+    RANLIB    = ranlib
+
+    OPTS      = -fPIC -O3 -DADD_ -Wall
+    FOPTS     = -fPIC -O3 -DADD_ -Wall -x f95-cpp-input
+    F77OPTS   = -fPIC -O3 -DADD_ -Wall
+    LDOPTS    = -fPIC
+
+    -include make.check-mkl
+    -include make.check-clblas
+
+    # Gnu mkl is not available I guess?
+    #LIB       = -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -lpthread -lm -fopenmp
+    LIB        = -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lm -fopenmp
+    LIB       += -lclBLAS -lOpenCL
+
+    LIBDIR    = -L$(MKLROOT)/lib/intel64 \
+                -L$(MKLROOT)/../compiler/lib/intel64 \
+                -L$(clBLAS)/lib64
+
+    INC       = -I$(clBLAS)/include
+               #-I$(AMDAPP)/include
+  '';
+in stdenv.mkDerivation rec {
+  pname = "clmagma";
+  version = "1.3.0";
+  src = fetchurl {
+    url = "https://icl.cs.utk.edu/projectsfiles/magma/cl/clmagma-${version}.tar.gz";
+    sha256 = "1n27ny0xhwirw2ydn46pfcwy53gzia9zbam4irx44fd4d7f9ydv7";
+    name = "clmagma-${version}.tar.gz";
+  };
+
+  buildInputs = [
+    gfortran
+    clblas
+    opencl-headers
+    ocl-icd
+    mkl
+    intel-ocl
+  ];
+
+  enableParallelBuilding=true;
+
+  MKLROOT   = "${mkl}";
+  clBLAS    = "${clblas}";
+
+  # Otherwise build looks for it in /run/opengl-driver/etc/OpenCL/vendors,
+  # which is not available.
+  OPENCL_VENDOR_PATH="${intel-ocl}/etc/OpenCL/vendors";
+
+  preBuild = ''
+    # By default it tries to use GPU, and thus fails for CPUs
+    sed -i "s/CL_DEVICE_TYPE_GPU/CL_DEVICE_TYPE_DEFAULT/" interface_opencl/clmagma_runtime.cpp
+    sed -i "s%/usr/local/clmagma%/$out%" Makefile.internal
+    cp ${incfile} make.inc
+  '';
+
+  meta = with lib; {
+    description = "Matrix Algebra on GPU and Multicore Architectures, OpenCL port";
+    license = licenses.bsd3;
+    homepage = "https://icl.cs.utk.edu/magma/index.html";
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ volhovm ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/coin-utils/default.nix b/nixpkgs/pkgs/development/libraries/science/math/coin-utils/default.nix
new file mode 100644
index 000000000000..60b9de0ab33a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/coin-utils/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch }:
+
+stdenv.mkDerivation rec {
+  version = "2.11.10";
+  pname = "coinutils";
+
+  src = fetchFromGitHub {
+    owner = "coin-or";
+    repo = "CoinUtils";
+    rev = "releases/${version}";
+    hash = "sha256-Rbm45HRbRKQ6Cdup+gvKJ1xkK1HKG3irR5AIjhLer7g=";
+  };
+
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/coin-or/CoinUtils/commit/1700ed92c2bc1562aabe65dee3b4885bd5c87fb9.patch";
+      stripLen = 1;
+      extraPrefix = "CoinUtils/";
+      hash = "sha256-8S6XteZvoJlL+5MWiOrW7HXsdcnzpuEFTyzX9qg7OUY=";
+    })
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    license = licenses.epl20;
+    homepage = "https://github.com/coin-or/CoinUtils";
+    description = "Collection of classes and helper functions that are generally useful to multiple COIN-OR projects";
+    maintainers = with maintainers; [ tmarkus ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/dbcsr/default.nix b/nixpkgs/pkgs/development/libraries/science/math/dbcsr/default.nix
new file mode 100644
index 000000000000..2c576a190026
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/dbcsr/default.nix
@@ -0,0 +1,81 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, mpiCheckPhaseHook
+, pkg-config
+, fypp
+, gfortran
+, blas
+, lapack
+, python3
+, libxsmm
+, mpi
+, openssh
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dbcsr";
+  version = "2.6.0";
+
+  src = fetchFromGitHub {
+    owner = "cp2k";
+    repo = "dbcsr";
+    rev = "v${version}";
+    hash = "sha256-+xSxfrzsxBdb424F/3mIETleEPoETxU0LB0OBJrR7gw=";
+  };
+
+  postPatch = ''
+    patchShebangs .
+
+    # Force build of shared library, otherwise just static.
+    substituteInPlace src/CMakeLists.txt \
+      --replace 'add_library(dbcsr ''${DBCSR_SRCS})' 'add_library(dbcsr SHARED ''${DBCSR_SRCS})' \
+      --replace 'add_library(dbcsr_c ''${DBCSR_C_SRCS})' 'add_library(dbcsr_c SHARED ''${DBCSR_C_SRCS})'
+
+    # Avoid calling the fypp wrapper script with python again. The nix wrapper took care of that.
+    substituteInPlace cmake/fypp-sources.cmake \
+      --replace 'COMMAND ''${Python_EXECUTABLE} ''${FYPP_EXECUTABLE}' 'COMMAND ''${FYPP_EXECUTABLE}'
+  '';
+
+  nativeBuildInputs = [
+    gfortran
+    python3
+    cmake
+    pkg-config
+    fypp
+  ];
+
+  buildInputs = [ blas lapack libxsmm ];
+
+  propagatedBuildInputs = [ mpi ];
+
+  preConfigure = ''
+    export PKG_CONFIG_PATH=${libxsmm}/lib
+  '';
+
+  cmakeFlags = [
+    "-DUSE_OPENMP=ON"
+    "-DUSE_SMM=libxsmm"
+    "-DWITH_C_API=ON"
+    "-DBUILD_TESTING=ON"
+    "-DTEST_OMP_THREADS=2"
+    "-DTEST_MPI_RANKS=2"
+    "-DENABLE_SHARED=ON"
+    "-DUSE_MPI=ON"
+  ];
+
+  checkInputs = [
+    openssh
+    mpiCheckPhaseHook
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Distributed Block Compressed Sparse Row matrix library";
+    license = licenses.gpl2Only;
+    homepage = "https://github.com/cp2k/dbcsr";
+    maintainers = [ maintainers.sheepforce ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/ecos/default.nix b/nixpkgs/pkgs/development/libraries/science/math/ecos/default.nix
new file mode 100644
index 000000000000..b60bd1fe76c1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/ecos/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "ecos";
+  version = "2.0.7";
+
+  src = fetchFromGitHub {
+    owner = "embotech";
+    repo = "ecos";
+    rev = version;
+    sha256 = "1hsndim5kjvcwk5svqa4igawzahj982180xj1d7yd0dbjlgxc7w7";
+  };
+
+  buildPhase = ''
+    make all shared
+  '';
+
+  doCheck = true;
+  checkPhase = ''
+    make test
+    ./runecos
+  '';
+
+  installPhase = ''
+    mkdir -p $out/lib
+    cp lib*.a lib*.so $out/lib
+    cp -r include $out/
+  '';
+
+  meta = with lib; {
+    description = "A lightweight conic solver for second-order cone programming";
+    homepage = "https://www.embotech.com/ECOS";
+    downloadPage = "https://github.com/embotech/ecos/releases";
+    license = licenses.gpl3;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ bhipple ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/faiss/default.nix b/nixpkgs/pkgs/development/libraries/science/math/faiss/default.nix
new file mode 100644
index 000000000000..25ac539e05f2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/faiss/default.nix
@@ -0,0 +1,153 @@
+{ lib
+, config
+, fetchFromGitHub
+, symlinkJoin
+, stdenv
+, cmake
+, cudaPackages ? { }
+, cudaSupport ? config.cudaSupport
+, pythonSupport ? true
+, pythonPackages
+, llvmPackages
+, boost
+, blas
+, swig
+, addOpenGLRunpath
+, optLevel ? let
+    optLevels =
+      lib.optionals stdenv.hostPlatform.avx2Support [ "avx2" ]
+      ++ lib.optionals stdenv.hostPlatform.sse4_1Support [ "sse4" ]
+      ++ [ "generic" ];
+  in
+  # Choose the maximum available optimization level
+  builtins.head optLevels
+, faiss # To run demos in the tests
+, runCommand
+}@inputs:
+
+let
+  pname = "faiss";
+  version = "1.7.4";
+
+  inherit (cudaPackages) cudaFlags backendStdenv;
+  inherit (cudaFlags) cudaCapabilities dropDot;
+
+  stdenv = if cudaSupport then backendStdenv else inputs.stdenv;
+
+  cudaJoined = symlinkJoin {
+    name = "cuda-packages-unsplit";
+    paths = with cudaPackages; [
+      cuda_cudart # cuda_runtime.h
+      libcublas
+      libcurand
+      cuda_cccl
+    ] ++ lib.optionals (cudaPackages ? cuda_profiler_api) [
+      cuda_profiler_api # cuda_profiler_api.h
+    ] ++ lib.optionals (!(cudaPackages ? cuda_profiler_api)) [
+      cuda_nvprof # cuda_profiler_api.h
+    ];
+  };
+in
+stdenv.mkDerivation {
+  inherit pname version;
+
+  outputs = [ "out" "demos" ];
+
+  src = fetchFromGitHub {
+    owner = "facebookresearch";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-WSce9X6sLZmGM5F0ZkK54VqpIy8u1VB0e9/l78co29M=";
+  };
+
+  buildInputs = [
+    blas
+    swig
+  ] ++ lib.optionals pythonSupport [
+    pythonPackages.setuptools
+    pythonPackages.pip
+    pythonPackages.wheel
+  ] ++ lib.optionals stdenv.cc.isClang [
+    llvmPackages.openmp
+  ] ++ lib.optionals cudaSupport [
+    cudaJoined
+  ];
+
+  propagatedBuildInputs = lib.optionals pythonSupport [
+    pythonPackages.numpy
+  ];
+
+  nativeBuildInputs = [ cmake ] ++ lib.optionals cudaSupport [
+    cudaPackages.cuda_nvcc
+    addOpenGLRunpath
+  ] ++ lib.optionals pythonSupport [
+    pythonPackages.python
+  ];
+
+  passthru.extra-requires.all = [
+    pythonPackages.numpy
+  ];
+
+  cmakeFlags = [
+    "-DFAISS_ENABLE_GPU=${if cudaSupport then "ON" else "OFF"}"
+    "-DFAISS_ENABLE_PYTHON=${if pythonSupport then "ON" else "OFF"}"
+    "-DFAISS_OPT_LEVEL=${optLevel}"
+  ] ++ lib.optionals cudaSupport [
+    "-DCMAKE_CUDA_ARCHITECTURES=${builtins.concatStringsSep ";" (map dropDot cudaCapabilities)}"
+    "-DCUDAToolkit_INCLUDE_DIR=${cudaJoined}/include"
+  ];
+
+
+  # pip wheel->pip install commands copied over from opencv4
+
+  buildPhase = ''
+    make -j faiss
+    make demo_ivfpq_indexing
+  '' + lib.optionalString pythonSupport ''
+    make -j swigfaiss
+    (cd faiss/python &&
+     python -m pip wheel --verbose --no-index --no-deps --no-clean --no-build-isolation --wheel-dir dist .)
+  '';
+
+  installPhase = ''
+    make install
+    mkdir -p $demos/bin
+    cp ./demos/demo_ivfpq_indexing $demos/bin/
+  '' + lib.optionalString pythonSupport ''
+    mkdir -p $out/${pythonPackages.python.sitePackages}
+    (cd faiss/python && python -m pip install dist/*.whl --no-index --no-warn-script-location --prefix="$out" --no-cache)
+  '';
+
+  fixupPhase = lib.optionalString (pythonSupport && cudaSupport) ''
+    addOpenGLRunpath $out/${pythonPackages.python.sitePackages}/faiss/*.so
+    addOpenGLRunpath $demos/bin/*
+  '';
+
+  # Need buildPythonPackage for this one
+  # pythonImportsCheck = [
+  #   "faiss"
+  # ];
+
+  passthru = {
+    inherit cudaSupport cudaPackages pythonSupport;
+
+    tests = {
+      runDemos = runCommand "${pname}-run-demos"
+        { buildInputs = [ faiss.demos ]; }
+        # There are more demos, we run just the one that documentation mentions
+        ''
+          demo_ivfpq_indexing && touch $out
+        '';
+    } // lib.optionalAttrs pythonSupport {
+      pytest = pythonPackages.callPackage ./tests.nix { };
+    };
+  };
+
+  meta = with lib; {
+    description = "A library for efficient similarity search and clustering of dense vectors by Facebook Research";
+    homepage = "https://github.com/facebookresearch/faiss";
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ SomeoneSerge ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/faiss/tests.nix b/nixpkgs/pkgs/development/libraries/science/math/faiss/tests.nix
new file mode 100644
index 000000000000..858a980bfeaf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/faiss/tests.nix
@@ -0,0 +1,37 @@
+{ lib
+, buildPythonPackage
+, faiss
+, scipy
+, pytestCheckHook
+}:
+
+assert faiss.pythonSupport;
+
+buildPythonPackage {
+  pname = "faiss-pytest-suite";
+  inherit (faiss) version;
+
+  format = "other";
+
+  src = "${faiss.src}/tests";
+
+  dontBuild = true;
+  dontInstall = true;
+
+  # Tests that need GPUs and would fail in the sandbox
+  disabledTestPaths = lib.optionals faiss.cudaSupport [
+    "test_contrib.py"
+  ];
+
+  disabledTests = [
+    # https://github.com/facebookresearch/faiss/issues/2836
+    "test_update_codebooks_with_double"
+  ];
+
+  nativeCheckInputs = [
+    faiss
+    pytestCheckHook
+    scipy
+  ] ++
+  faiss.extra-requires.all;
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/flintqs/default.nix b/nixpkgs/pkgs/development/libraries/science/math/flintqs/default.nix
new file mode 100644
index 000000000000..c5426ed67fc7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/flintqs/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, gmp
+}:
+
+stdenv.mkDerivation rec {
+  version = "1.0";
+  pname = "flintqs";
+
+  src = fetchFromGitHub {
+    owner = "sagemath";
+    repo = "FlintQS";
+    rev = "v${version}";
+    sha256 = "1f0lnayz6j6qgasx8pbq61d2fqam0wwhsmh6h15l4vq58l1vvbwj";
+  };
+
+  preAutoreconf = ''
+    touch ChangeLog
+  '';
+
+  buildInputs = [
+    gmp
+  ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Highly optimized multi-polynomial quadratic sieve for integer factorization";
+    homepage = "https://github.com/sagemath/FlintQS";
+    license = with licenses; [ gpl2 ];
+    maintainers = teams.sage.members;
+    mainProgram = "QuadraticSieve";
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/ipopt/default.nix b/nixpkgs/pkgs/development/libraries/science/math/ipopt/default.nix
new file mode 100644
index 000000000000..a76c2f878ba7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/ipopt/default.nix
@@ -0,0 +1,43 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, pkg-config
+, blas
+, lapack
+, gfortran
+, enableAMPL ? true, libamplsolver
+}:
+
+assert (!blas.isILP64) && (!lapack.isILP64);
+
+stdenv.mkDerivation rec {
+  pname = "ipopt";
+  version = "3.14.14";
+
+  src = fetchFromGitHub {
+    owner = "coin-or";
+    repo = "Ipopt";
+    rev = "releases/${version}";
+    sha256 = "sha256-qMPdJVLIXFePhTA6qRr1Pth/BjJ62cj9y8C1HKQJGDQ=";
+  };
+
+  CXXDEFS = [ "-DHAVE_RAND" "-DHAVE_CSTRING" "-DHAVE_CSTDIO" ];
+
+  configureFlags = [
+    "--with-asl-cflags=-I${libamplsolver}/include"
+    "--with-asl-lflags=-lamplsolver"
+  ];
+
+  nativeBuildInputs = [ pkg-config gfortran ];
+  buildInputs = [ blas lapack ] ++ lib.optionals enableAMPL [ libamplsolver ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "A software package for large-scale nonlinear optimization";
+    homepage = "https://projects.coin-or.org/Ipopt";
+    license = licenses.epl10;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ abbradar ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/itpp/default.nix b/nixpkgs/pkgs/development/libraries/science/math/itpp/default.nix
new file mode 100644
index 000000000000..b5e2f4b80d3b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/itpp/default.nix
@@ -0,0 +1,53 @@
+{ lib, stdenv
+, fetchurl
+, cmake
+, gtest
+, blas
+, fftw
+, liblapack
+, gfortran
+}:
+
+stdenv.mkDerivation rec {
+  pname = "it++";
+  version = "4.3.1";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/itpp/itpp-${version}.tar.bz2";
+    sha256 = "0xxqag9wi0lg78xgw7b40rp6wxqp5grqlbs9z0ifvdfzqlhpcwah";
+  };
+
+  nativeBuildInputs = [ cmake gfortran ];
+  buildInputs = [
+    fftw
+    liblapack
+
+    # NOTE: OpenBLAS doesn't work here because IT++ doesn't pass aligned
+    # buffers, which causes segfaults in the optimized kernels :-(
+    blas
+  ];
+
+  cmakeFlags = [
+    "-DCMAKE_CXX_FLAGS=-std=c++11"
+    "-DBLAS_FOUND:BOOL=TRUE"
+    "-DBLAS_LIBRARIES:STRING=${blas}/lib/libblas.so"
+    "-DLAPACK_FOUND:BOOL=TRUE"
+    "-DLAPACK_LIBRARIES:STRING=${liblapack}/lib/liblapack.so"
+    "-DGTEST_DIR:PATH=${gtest.src}/googletest"
+  ];
+
+  doCheck = true;
+
+  checkPhase = ''
+    ./gtests/itpp_gtests
+  '';
+
+  meta = with lib; {
+    description = "IT++ is a C++ library of mathematical, signal processing and communication classes and functions";
+    homepage = "https://itpp.sourceforge.net/";
+    license = licenses.gpl3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ andrew-d ];
+    broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/itpp.x86_64-darwin
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/latte-integrale/default.nix b/nixpkgs/pkgs/development/libraries/science/math/latte-integrale/default.nix
new file mode 100644
index 000000000000..7eb485974ff2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/latte-integrale/default.nix
@@ -0,0 +1,41 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, gmp
+, ntl
+, cddlib
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "latte-integrale";
+  version = "1.7.6";
+
+  src = fetchurl {
+    url = "https://github.com/latte-int/latte/releases/download/version_${lib.replaceStrings ["."] ["_"] finalAttrs.version}/latte-int-${finalAttrs.version}.tar.gz";
+    sha256 = "sha256-AGwQ6+XVv9ybFZy6YmSkQyhh/nY84F/oIWJKt9P8IXA=";
+  };
+
+  patches = [
+    # C++17 compat
+    (fetchpatch {
+      url = "https://github.com/latte-int/latte/commit/6dbf7f07d5c9e1f3afe793f782d191d4465088ae.patch";
+      excludes = [ "code/latte/sqlite/IntegrationDB.h" ];
+      sha256 = "sha256-i7c11y54OLuJ0m7PBnhEoAzJzxC842JU7A6TOtTz06k=";
+    })
+  ];
+
+  buildInputs = [
+    gmp
+    ntl
+    cddlib
+  ];
+
+  meta = {
+    description = "Software for counting lattice points and integration over convex polytopes";
+    homepage = "https://www.math.ucdavis.edu/~latte/";
+    license = lib.licenses.gpl2;
+    maintainers = with lib.maintainers; [ amesgen ];
+    platforms = lib.platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/science/math/lcalc/default.nix b/nixpkgs/pkgs/development/libraries/science/math/lcalc/default.nix
new file mode 100644
index 000000000000..b1896917658c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/lcalc/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv
+, autoreconfHook
+, gengetopt
+, pkg-config
+, fetchFromGitLab
+, pari
+}:
+
+stdenv.mkDerivation rec {
+  version = "2.0.5";
+  pname = "lcalc";
+
+  src = fetchFromGitLab {
+    owner = "sagemath";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-RxWZ7T0I9zV7jUVnL6jV/PxEoU32KY7Q1UsOL5Lonuc=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    gengetopt
+    pkg-config
+  ];
+
+  buildInputs = [
+    pari
+  ];
+
+  configureFlags = [
+    "--with-pari"
+  ];
+
+  meta = with lib; {
+    homepage = "https://gitlab.com/sagemath/lcalc";
+    description = "A program for calculating with L-functions";
+    license = with licenses; [ gpl2 ];
+    maintainers = teams.sage.members;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/libamplsolver/default.nix b/nixpkgs/pkgs/development/libraries/science/math/libamplsolver/default.nix
new file mode 100644
index 000000000000..c0bc89b492ea
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/libamplsolver/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, substitute, fetchurl, fetchpatch }:
+
+stdenv.mkDerivation rec {
+  pname = "libamplsolver";
+  version = "20211109";
+
+  src = fetchurl {
+    url = "https://ampl.com/netlib/ampl/solvers.tgz";
+    sha256 = "sha256-LVmScuIvxmZzywPSBl9T9YcUBJP7UFAa3eWs9r4q3JM=";
+  };
+
+  patches = [
+    (substitute {
+      src = ./libamplsolver-sharedlib.patch;
+      replacements = [ "--replace" "@sharedlibext@" "${stdenv.hostPlatform.extensions.sharedLibrary}" ];
+    })
+  ];
+
+  installPhase = ''
+    runHook preInstall
+    pushd sys.$(uname -m).$(uname -s)
+    install -D -m 0644 *.h -t $out/include
+    install -D -m 0644 *${stdenv.hostPlatform.extensions.sharedLibrary}* -t $out/lib
+    install -D -m 0644 *.a -t $out/lib
+    popd
+  '' + lib.optionalString stdenv.isDarwin ''
+    install_name_tool -id $out/lib/libamplsolver.dylib $out/lib/libamplsolver.dylib
+  '' + ''
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "A library of routines that help solvers work with AMPL";
+    homepage = "https://ampl.com/netlib/ampl/";
+    license = [ licenses.mit ];
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ aanderse ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/libamplsolver/libamplsolver-sharedlib.patch b/nixpkgs/pkgs/development/libraries/science/math/libamplsolver/libamplsolver-sharedlib.patch
new file mode 100644
index 000000000000..f2af2910e89c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/libamplsolver/libamplsolver-sharedlib.patch
@@ -0,0 +1,39 @@
+Authors: Andrei Rozanski and Grace Dinh
+Last-Update: 2022-08-23
+Description: fix makefile.u in order to get libamplsover.so (Linux) or libamplsolver.dylib (Mac)
+
+--- a/makefile.u
++++ b/makefile.u
+
+@@ -26,8 +26,9 @@
+
+ .SUFFIXES: .c .o
+ CC = cc
+-CFLAGS = -O
++CFLAGS := $(CFLAGS) -pipe -DASL_BUILD -fPIC -DPIC
+ SHELL=/bin/sh
++OFILES=$(addsuffix .o,$(basename $(a)))
+
+ # Add -DNO_RUSAGE to the CFLAGS assignment if your system
+ # lacks getrusage().  This only matters for compiling xectim.c.
+@@ -86,7 +87,7 @@
+ .c.o:
+ 	$(CC) -c $(CFLAGS) $*.c
+
+-all: arith.h stdio1.h amplsolver.a funcadd0.o
++all: arith.h stdio1.h amplsolver.a funcadd0.o libamplsolver@sharedlibext@
+
+ a = \
+ 	asldate.c \
+@@ -189,6 +190,11 @@
+ # search path, e.g.
+ #	exec true
+ # or just comment out the ranlib invocation above.
++libamplsolver.so: $(OFILES)
++	$(CC) $^ -shared  -Wl,-soname,libamplsolver.so.0 $(LDFLAGS) -o $@.0
++	ln -s $@.0 $@
++libamplsolver.dylib: amplsolver.a
++	$(CC) -fpic -shared -Wl,-all_load amplsolver.a $(LDFLAGS) -o libamplsolver.dylib
+
+ Aslh = arith.h asl.h funcadd.h stdio1.h
+ auxinfo.o libnamsave.o: funcadd.h stdio1.h
\ No newline at end of file
diff --git a/nixpkgs/pkgs/development/libraries/science/math/libbraiding/default.nix b/nixpkgs/pkgs/development/libraries/science/math/libbraiding/default.nix
new file mode 100644
index 000000000000..2ee2e831f6e6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/libbraiding/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv
+, fetchFromGitHub
+, autoreconfHook
+}:
+
+stdenv.mkDerivation rec {
+  version = "1.2";
+  pname = "libbraiding";
+
+  src = fetchFromGitHub {
+    owner = "miguelmarco";
+    repo = "libbraiding";
+    rev = version;
+    sha256 = "sha256-cgg6rvlOvFqGjgbw6i7QXS+tqvfFd1MkPCEjnW/FyFs=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  # no tests included for now (2018-08-05), but can't hurt to activate
+  doCheck = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/miguelmarco/libbraiding/";
+    description = "C++ library for computations on braid groups";
+    longDescription = ''
+      A library to compute several properties of braids, including centralizer and conjugacy check.
+    '';
+    license = licenses.gpl3;
+    maintainers = teams.sage.members;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/libhomfly/default.nix b/nixpkgs/pkgs/development/libraries/science/math/libhomfly/default.nix
new file mode 100644
index 000000000000..d0f09290c3c7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/libhomfly/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, boehmgc
+}:
+
+stdenv.mkDerivation rec {
+  version = "1.02r6";
+  pname = "libhomfly";
+
+  src = fetchFromGitHub {
+    owner = "miguelmarco";
+    repo = "libhomfly";
+    rev = version;
+    sha256 = "sha256-s1Hgy6S9+uREKsgjOVQdQfnds6oSLo5UWTrt5DJnY2s=";
+  };
+
+  buildInputs = [
+    boehmgc
+  ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/miguelmarco/libhomfly/";
+    description = "Library to compute the homfly polynomial of knots and links";
+    license = licenses.unlicense;
+    maintainers = teams.sage.members;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/liblapack/default.nix b/nixpkgs/pkgs/development/libraries/science/math/liblapack/default.nix
new file mode 100644
index 000000000000..595ba2aa5713
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/liblapack/default.nix
@@ -0,0 +1,83 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, gfortran
+, cmake
+, shared ? true
+# Compile with ILP64 interface
+, blas64 ? false
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "liblapack";
+  version = "3.12.0";
+
+  src = fetchFromGitHub {
+    owner = "Reference-LAPACK";
+    repo = "lapack";
+    rev = "v${finalAttrs.version}";
+    sha256 = "sha256-xn9HL4YF8JPka1gwet5bGGo2k505H3RfWpxkUIYNecQ=";
+  };
+
+  nativeBuildInputs = [ gfortran cmake ];
+
+  # Configure stage fails on aarch64-darwin otherwise, due to either clang 11 or gfortran 10.
+  hardeningDisable = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ "stackprotector" ];
+
+  cmakeFlags = [
+    "-DCMAKE_Fortran_FLAGS=-fPIC"
+    "-DLAPACKE=ON"
+    "-DCBLAS=ON"
+    "-DBUILD_TESTING=ON"
+  ] ++ lib.optional shared "-DBUILD_SHARED_LIBS=ON"
+    ++ lib.optional blas64 "-DBUILD_INDEX64=ON"
+    # Tries to run host platform binaries during the build
+    # Will likely be disabled by default in 3.12, see:
+    # https://github.com/Reference-LAPACK/lapack/issues/757
+    ++ lib.optional (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) "-DTEST_FORTRAN_COMPILER=OFF";
+
+  passthru = { inherit blas64; };
+
+  postInstall =  let
+    canonicalExtension = if stdenv.hostPlatform.isLinux
+                       then "${stdenv.hostPlatform.extensions.sharedLibrary}.${lib.versions.major finalAttrs.version}"
+                       else stdenv.hostPlatform.extensions.sharedLibrary;
+  in lib.optionalString blas64 ''
+    ln -s $out/lib/liblapack64${canonicalExtension} $out/lib/liblapack${canonicalExtension}
+    ln -s $out/lib/liblapacke64${canonicalExtension} $out/lib/liblapacke${canonicalExtension}
+  '';
+
+  doCheck = true;
+
+  # Some CBLAS related tests fail on Darwin:
+  #  14 - CBLAS-xscblat2 (Failed)
+  #  15 - CBLAS-xscblat3 (Failed)
+  #  17 - CBLAS-xdcblat2 (Failed)
+  #  18 - CBLAS-xdcblat3 (Failed)
+  #  20 - CBLAS-xccblat2 (Failed)
+  #  21 - CBLAS-xccblat3 (Failed)
+  #  23 - CBLAS-xzcblat2 (Failed)
+  #  24 - CBLAS-xzcblat3 (Failed)
+  #
+  # Upstream issue to track:
+  # * https://github.com/Reference-LAPACK/lapack/issues/440
+  ctestArgs = lib.optionalString stdenv.isDarwin "-E '^(CBLAS-(x[sdcz]cblat[23]))$'";
+
+  checkPhase = ''
+    runHook preCheck
+    ctest ${finalAttrs.ctestArgs}
+    runHook postCheck
+  '';
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    description = "Linear Algebra PACKage";
+    homepage = "http://www.netlib.org/lapack/";
+    maintainers = with maintainers; [ markuskowa ];
+    license = licenses.bsd3;
+    pkgConfigModules = [ "lapack" ];
+    platforms = platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/science/math/liblbfgs/default.nix b/nixpkgs/pkgs/development/libraries/science/math/liblbfgs/default.nix
new file mode 100644
index 000000000000..26a1932bd192
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/liblbfgs/default.nix
@@ -0,0 +1,19 @@
+{ lib, stdenv, fetchurl }:
+stdenv.mkDerivation rec {
+  pname = "liblbfgs";
+  version = "1.10";
+
+  configureFlags = [ "--enable-sse2" ];
+  src = fetchurl {
+    url = "https://github.com/downloads/chokkan/liblbfgs/liblbfgs-${version}.tar.gz";
+    sha256 = "1kv8d289rbz38wrpswx5dkhr2yh4fg4h6sszkp3fawxm09sann21";
+  };
+
+  meta = {
+    broken = (stdenv.isLinux && stdenv.isAarch64);
+    description = "Library of Limited-memory Broyden-Fletcher-Goldfarb-Shanno (L-BFGS)";
+    homepage = "http://www.chokkan.org/software/liblbfgs/";
+    license = lib.licenses.mit;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/libtorch/bin.nix b/nixpkgs/pkgs/development/libraries/science/math/libtorch/bin.nix
new file mode 100644
index 000000000000..47a6249ebdc6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/libtorch/bin.nix
@@ -0,0 +1,104 @@
+{ callPackage
+, stdenv
+, fetchzip
+, lib
+, libcxx
+
+, addOpenGLRunpath
+, patchelf
+, fixDarwinDylibNames
+
+, cudaSupport
+}:
+
+let
+  # The binary libtorch distribution statically links the CUDA
+  # toolkit. This means that we do not need to provide CUDA to
+  # this derivation. However, we should ensure on version bumps
+  # that the CUDA toolkit for `passthru.tests` is still
+  # up-to-date.
+  version = "2.0.0";
+  device = if cudaSupport then "cuda" else "cpu";
+  srcs = import ./binary-hashes.nix version;
+  unavailable = throw "libtorch is not available for this platform";
+  libcxx-for-libtorch = if stdenv.hostPlatform.system == "x86_64-darwin" then libcxx else stdenv.cc.cc.lib;
+in stdenv.mkDerivation {
+  inherit version;
+  pname = "libtorch";
+
+  src = fetchzip srcs."${stdenv.hostPlatform.system}-${device}" or unavailable;
+
+  nativeBuildInputs =
+    if stdenv.isDarwin then [ fixDarwinDylibNames ]
+    else [ patchelf ] ++ lib.optionals cudaSupport [ addOpenGLRunpath ];
+
+  dontBuild = true;
+  dontConfigure = true;
+  dontStrip = true;
+
+  installPhase = ''
+    # Copy headers and CMake files.
+    mkdir -p $dev
+    cp -r include $dev
+    cp -r share $dev
+
+    install -Dm755 -t $out/lib lib/*${stdenv.hostPlatform.extensions.sharedLibrary}*
+
+    # We do not care about Java support...
+    rm -f $out/lib/lib*jni* 2> /dev/null || true
+
+    # Fix up library paths for split outputs
+    substituteInPlace $dev/share/cmake/Torch/TorchConfig.cmake \
+      --replace \''${TORCH_INSTALL_PREFIX}/lib "$out/lib" \
+
+    substituteInPlace \
+      $dev/share/cmake/Caffe2/Caffe2Targets-release.cmake \
+      --replace \''${_IMPORT_PREFIX}/lib "$out/lib" \
+  '';
+
+  postFixup = let
+    rpath = lib.makeLibraryPath [ stdenv.cc.cc.lib ];
+  in lib.optionalString stdenv.isLinux ''
+    find $out/lib -type f \( -name '*.so' -or -name '*.so.*' \) | while read lib; do
+      echo "setting rpath for $lib..."
+      patchelf --set-rpath "${rpath}:$out/lib" "$lib"
+      ${lib.optionalString cudaSupport ''
+        addOpenGLRunpath "$lib"
+      ''}
+    done
+  '' + lib.optionalString stdenv.isDarwin ''
+    for f in $out/lib/*.dylib; do
+        otool -L $f
+    done
+    for f in $out/lib/*.dylib; do
+      install_name_tool -id $out/lib/$(basename $f) $f || true
+      for rpath in $(otool -L $f | grep rpath | awk '{print $1}');do
+        install_name_tool -change $rpath $out/lib/$(basename $rpath) $f
+      done
+      if otool -L $f | grep /usr/lib/libc++ >& /dev/null; then
+        install_name_tool -change /usr/lib/libc++.1.dylib ${libcxx-for-libtorch.outPath}/lib/libc++.1.0.dylib $f
+      fi
+    done
+    for f in $out/lib/*.dylib; do
+        otool -L $f
+    done
+  '';
+
+  outputs = [ "out" "dev" ];
+
+  passthru.tests.cmake = callPackage ./test {
+    inherit cudaSupport;
+  };
+
+  meta = with lib; {
+    description = "C++ API of the PyTorch machine learning framework";
+    homepage = "https://pytorch.org/";
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+    # Includes CUDA and Intel MKL, but redistributions of the binary are not limited.
+    # https://docs.nvidia.com/cuda/eula/index.html
+    # https://www.intel.com/content/www/us/en/developer/articles/license/onemkl-license-faq.html
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ junjihashimoto ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/libtorch/binary-hashes.nix b/nixpkgs/pkgs/development/libraries/science/math/libtorch/binary-hashes.nix
new file mode 100644
index 000000000000..83533d89b1e8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/libtorch/binary-hashes.nix
@@ -0,0 +1,19 @@
+version : builtins.getAttr version {
+  "2.0.0" = {
+    x86_64-darwin-cpu = {
+      name = "libtorch-macos-2.0.0.zip";
+      url = "https://download.pytorch.org/libtorch/cpu/libtorch-macos-2.0.0.zip";
+      hash = "sha256-u6y5IeYoiOC0yQ/k6JCChDs9lXWccLxUorgR8L62lkM=";
+    };
+    x86_64-linux-cpu = {
+      name = "libtorch-cxx11-abi-shared-with-deps-2.0.0-cpu.zip";
+      url = "https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.0.0%2Bcpu.zip";
+      hash = "sha256-BoZQ2MC1CDVVGfX3SHC3mEpLGWO8XK7AcLcHJXDsXuc=";
+    };
+    x86_64-linux-cuda = {
+      name = "libtorch-cxx11-abi-shared-with-deps-2.0.0-cu118.zip";
+      url = "https://download.pytorch.org/libtorch/cu118/libtorch-cxx11-abi-shared-with-deps-2.0.0%2Bcu118.zip";
+      hash = "sha256-Dpw9kQdA1NI9EOT7JBKwQP4wZT6lizcnKKTQ8WVJCZc=";
+    };
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/libtorch/prefetch.sh b/nixpkgs/pkgs/development/libraries/science/math/libtorch/prefetch.sh
new file mode 100755
index 000000000000..5c6d60ae8b20
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/libtorch/prefetch.sh
@@ -0,0 +1,38 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p nix-prefetch-scripts
+
+set -eou pipefail
+
+version=$1
+
+bucket="https://download.pytorch.org/libtorch"
+CUDA_VERSION=cu116
+
+url_and_key_list=(
+  "x86_64-darwin-cpu $bucket/cpu/libtorch-macos-${version}.zip libtorch-macos-${version}.zip"
+  "x86_64-linux-cpu $bucket/cpu/libtorch-cxx11-abi-shared-with-deps-${version}%2Bcpu.zip libtorch-cxx11-abi-shared-with-deps-${version}-cpu.zip"
+  "x86_64-linux-cuda $bucket/${CUDA_VERSION}/libtorch-cxx11-abi-shared-with-deps-${version}%2B${CUDA_VERSION}.zip libtorch-cxx11-abi-shared-with-deps-${version}-${CUDA_VERSION}.zip"
+)
+
+hashfile="binary-hashes-$version.nix"
+echo "  \"$version\" = {" >> $hashfile
+
+for url_and_key in "${url_and_key_list[@]}"; do
+  key=$(echo "$url_and_key" | cut -d' ' -f1)
+  url=$(echo "$url_and_key" | cut -d' ' -f2)
+  name=$(echo "$url_and_key" | cut -d' ' -f3)
+
+  echo "prefetching ${url}..."
+  hash=$(nix hash to-sri --type sha256 $(nix-prefetch-url --unpack "$url" --name "$name"))
+
+  echo "    $key = {" >> $hashfile
+  echo "      name = \"$name\";" >> $hashfile
+  echo "      url = \"$url\";" >> $hashfile
+  echo "      hash = \"$hash\";" >> $hashfile
+  echo "    };" >> $hashfile
+
+  echo
+done
+
+echo "  };" >> $hashfile
+echo "done."
diff --git a/nixpkgs/pkgs/development/libraries/science/math/libtorch/test/CMakeLists.txt b/nixpkgs/pkgs/development/libraries/science/math/libtorch/test/CMakeLists.txt
new file mode 100644
index 000000000000..4e96704a4c17
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/libtorch/test/CMakeLists.txt
@@ -0,0 +1,5 @@
+cmake_minimum_required(VERSION 3.0)
+find_package(Torch REQUIRED)
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS}")
+add_executable(test test.cpp)
+target_link_libraries(test "${TORCH_LIBRARIES}")
diff --git a/nixpkgs/pkgs/development/libraries/science/math/libtorch/test/default.nix b/nixpkgs/pkgs/development/libraries/science/math/libtorch/test/default.nix
new file mode 100644
index 000000000000..a7940cd1db8d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/libtorch/test/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, stdenv
+, cmake
+, libtorch-bin
+, linkFarm
+, symlinkJoin
+
+, cudaSupport
+, cudaPackages ? {}
+}:
+let
+  inherit (cudaPackages) cudatoolkit cudnn;
+
+  cudatoolkit_joined = symlinkJoin {
+    name = "${cudatoolkit.name}-unsplit";
+    paths = [ cudatoolkit.out cudatoolkit.lib ];
+  };
+
+  # We do not have access to /run/opengl-driver/lib in the sandbox,
+  # so use a stub instead.
+  cudaStub = linkFarm "cuda-stub" [{
+    name = "libcuda.so.1";
+    path = "${cudatoolkit}/lib/stubs/libcuda.so";
+  }];
+
+in stdenv.mkDerivation {
+  pname = "libtorch-test";
+  version = libtorch-bin.version;
+
+  src = ./.;
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ libtorch-bin ] ++
+    lib.optionals cudaSupport [ cudnn ];
+
+  cmakeFlags = lib.optionals cudaSupport
+    [ "-DCUDA_TOOLKIT_ROOT_DIR=${cudatoolkit_joined}" ];
+
+  doCheck = true;
+
+  installPhase = ''
+    touch $out
+  '';
+
+  checkPhase = lib.optionalString cudaSupport ''
+    LD_LIBRARY_PATH=${cudaStub}''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH \
+  '' + ''
+    ./test
+  '';
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/libtorch/test/test.cpp b/nixpkgs/pkgs/development/libraries/science/math/libtorch/test/test.cpp
new file mode 100644
index 000000000000..ca238fba521d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/libtorch/test/test.cpp
@@ -0,0 +1,20 @@
+#undef NDEBUG
+#include <cassert>
+
+#include <iostream>
+
+#include <torch/torch.h>
+
+int main() {
+  torch::Tensor tensor = torch::eye(3);
+
+  float checkData[] = {
+    1, 0, 0,
+    0, 1, 0,
+    0, 0, 1
+  };
+
+  torch::Tensor check = torch::from_blob(checkData, {3, 3});
+
+  assert(tensor.allclose(check));
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/lrs/default.nix b/nixpkgs/pkgs/development/libraries/science/math/lrs/default.nix
new file mode 100644
index 000000000000..6fa8567355a9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/lrs/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl, gmp }:
+
+stdenv.mkDerivation {
+  pname = "lrs";
+  version = "7.2";
+
+  src = fetchurl {
+    url = "http://cgm.cs.mcgill.ca/~avis/C/lrslib/archive/lrslib-072.tar.gz";
+    sha256 = "1w1jsnfgny8cihndr5gfm99pvwp48qsvxkqfsi2q87gd3m57aj7w";
+  };
+
+  buildInputs = [ gmp ];
+
+  makeFlags = [
+    "prefix=${placeholder "out"}"
+    "CC:=$(CC)"
+  ];
+
+  meta = {
+    description = "Implementation of the reverse search algorithm for vertex enumeration/convex hull problems";
+    license = lib.licenses.gpl2;
+    maintainers = [ lib.maintainers.raskin ];
+    platforms = lib.platforms.linux;
+    homepage = "http://cgm.cs.mcgill.ca/~avis/C/lrs.html";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/m4ri/default.nix b/nixpkgs/pkgs/development/libraries/science/math/m4ri/default.nix
new file mode 100644
index 000000000000..26e26e4ffdbc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/m4ri/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv
+, fetchFromBitbucket
+, autoreconfHook
+}:
+
+stdenv.mkDerivation rec {
+  version = "20200125";
+  pname = "m4ri";
+
+  src = fetchFromBitbucket {
+    owner = "malb";
+    repo = "m4ri";
+    rev = "release-${version}";
+    sha256 = "1dxgbv6zdyki3h61qlv7003wzhy6x14zmcaz9x19md1i7ng07w1k";
+  };
+
+  doCheck = true;
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  meta = with lib; {
+    homepage = "https://malb.bitbucket.io/m4ri/";
+    description = "Library to do fast arithmetic with dense matrices over F_2";
+    license = licenses.gpl2Plus;
+    maintainers = teams.sage.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/m4rie/default.nix b/nixpkgs/pkgs/development/libraries/science/math/m4rie/default.nix
new file mode 100644
index 000000000000..214f27046527
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/m4rie/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv
+, fetchFromBitbucket
+, autoreconfHook
+, m4ri
+}:
+
+stdenv.mkDerivation rec {
+  version = "20200125";
+  pname = "m4rie";
+
+  src = fetchFromBitbucket {
+    owner = "malb";
+    repo = "m4rie";
+    rev = "release-${version}";
+    sha256 = "sha256-bjAcxfXsC6+jPYC472CN78jm4UljJQlkWyvsqckCDh0=";
+  };
+
+  doCheck = true;
+
+  buildInputs = [
+    m4ri
+  ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  meta = with lib; {
+    homepage = "https://malb.bitbucket.io/m4rie/";
+    description = "Library for matrix multiplication, reduction and inversion over GF(2^k) for 2 <= k <= 10";
+    longDescription = ''
+      M4RIE is a library for fast arithmetic with dense matrices over small finite fields of even characteristic.
+      It uses the M4RI library, implementing the same operations over the finite field F2.
+    '';
+    license = licenses.gpl2Plus;
+    maintainers = teams.sage.members;
+    platforms = platforms.unix;
+    # never built on aarch64-darwin since first introduction in nixpkgs
+    broken = stdenv.isDarwin && stdenv.isAarch64;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/magma/default.nix b/nixpkgs/pkgs/development/libraries/science/math/magma/default.nix
new file mode 100644
index 000000000000..9eb410595974
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/magma/default.nix
@@ -0,0 +1,53 @@
+args@{ callPackage
+, lib
+, ...
+}:
+
+# Type aliases
+# Release = {
+#  version: String
+#  hash: String
+#  supportedGpuTargets: List String
+# }
+
+let
+  inherit (lib) lists strings trivial;
+
+  computeName = version: "magma_${strings.replaceStrings [ "." ] [ "_" ] version}";
+
+  # buildMagmaPackage :: Release -> Derivation
+  buildMagmaPackage = magmaRelease: callPackage ./generic.nix (
+    (builtins.removeAttrs args [ "callPackage" ]) // {
+      inherit magmaRelease;
+    }
+  );
+
+  # Reverse the list to have the latest release first
+  # magmaReleases :: List Release
+  magmaReleases = lists.reverseList (builtins.import ./releases.nix);
+
+  # The latest release is the first element of the list and will be our default choice
+  # latestReleaseName :: String
+  latestReleaseName = computeName (builtins.head magmaReleases).version;
+
+  # Function to transform our releases into build attributes
+  # toBuildAttrs :: Release -> { name: String, value: Derivation }
+  toBuildAttrs = release: {
+    name = computeName release.version;
+    value = buildMagmaPackage release;
+  };
+
+  # Add all supported builds as attributes
+  # allBuilds :: AttrSet String Derivation
+  allBuilds = builtins.listToAttrs (lists.map toBuildAttrs magmaReleases);
+
+  # The latest release will be our default build
+  # defaultBuild :: AttrSet String Derivation
+  defaultBuild.magma = allBuilds.${latestReleaseName};
+
+  # builds :: AttrSet String Derivation
+  builds = allBuilds // defaultBuild;
+in
+
+builds
+
diff --git a/nixpkgs/pkgs/development/libraries/science/math/magma/generic.nix b/nixpkgs/pkgs/development/libraries/science/math/magma/generic.nix
new file mode 100644
index 000000000000..7ef60e0418ed
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/magma/generic.nix
@@ -0,0 +1,173 @@
+# Type aliases
+# Release = {
+#  version: String
+#  hash: String
+#  supportedGpuTargets: List String
+# }
+
+{ blas
+, cmake
+, cudaPackages
+, cudaSupport ? config.cudaSupport
+, fetchurl
+, gfortran
+, cudaCapabilities ? cudaPackages.cudaFlags.cudaCapabilities
+, gpuTargets ? [ ] # Non-CUDA targets, that is HIP
+, rocmPackages
+, lapack
+, lib
+, libpthreadstubs
+, magmaRelease
+, ninja
+, config
+  # At least one back-end has to be enabled,
+  # and we can't default to CUDA since it's unfree
+, rocmSupport ? !cudaSupport
+, static ? stdenv.hostPlatform.isStatic
+, stdenv
+, symlinkJoin
+}:
+
+
+let
+  inherit (lib) lists strings trivial;
+  inherit (cudaPackages) backendStdenv cudaFlags cudaVersion;
+  inherit (magmaRelease) version hash supportedGpuTargets;
+
+  # NOTE: The lists.subtractLists function is perhaps a bit unintuitive. It subtracts the elements
+  #   of the first list *from* the second list. That means:
+  #   lists.subtractLists a b = b - a
+
+  # For ROCm
+  # NOTE: The hip.gpuTargets are prefixed with "gfx" instead of "sm" like cudaFlags.realArches.
+  #   For some reason, Magma's CMakeLists.txt file does not handle the "gfx" prefix, so we must
+  #   remove it.
+  rocmArches = lists.map (x: strings.removePrefix "gfx" x) rocmPackages.clr.gpuTargets;
+  supportedRocmArches = lists.intersectLists rocmArches supportedGpuTargets;
+  unsupportedRocmArches = lists.subtractLists supportedRocmArches rocmArches;
+
+  supportedCustomGpuTargets = lists.intersectLists gpuTargets supportedGpuTargets;
+  unsupportedCustomGpuTargets = lists.subtractLists supportedCustomGpuTargets gpuTargets;
+
+  # Use trivial.warnIf to print a warning if any unsupported GPU targets are specified.
+  gpuArchWarner = supported: unsupported:
+    trivial.throwIf (supported == [ ])
+      (
+        "No supported GPU targets specified. Requested GPU targets: "
+        + strings.concatStringsSep ", " unsupported
+      )
+      supported;
+
+  gpuTargetString = strings.concatStringsSep "," (
+    if gpuTargets != [ ] then
+    # If gpuTargets is specified, it always takes priority.
+      gpuArchWarner supportedCustomGpuTargets unsupportedCustomGpuTargets
+    else if rocmSupport then
+      gpuArchWarner supportedRocmArches unsupportedRocmArches
+    else if cudaSupport then
+      [ ] # It's important we pass explicit -DGPU_TARGET to reset magma's defaults
+    else
+      throw "No GPU targets specified"
+  );
+
+  # E.g. [ "80" "86" "90" ]
+  cudaArchitectures = (builtins.map cudaFlags.dropDot cudaCapabilities);
+
+  cudaArchitecturesString = strings.concatStringsSep ";" cudaArchitectures;
+  minArch =
+    let
+      minArch' = builtins.head (builtins.sort strings.versionOlder cudaArchitectures);
+    in
+    # "75" -> "750"  Cf. https://bitbucket.org/icl/magma/src/f4ec79e2c13a2347eff8a77a3be6f83bc2daec20/CMakeLists.txt#lines-273
+    "${minArch'}0";
+
+in
+
+assert (builtins.match "[^[:space:]]*" gpuTargetString) != null;
+
+stdenv.mkDerivation {
+  pname = "magma";
+  inherit version;
+
+  src = fetchurl {
+    name = "magma-${version}.tar.gz";
+    url = "https://icl.cs.utk.edu/projectsfiles/magma/downloads/magma-${version}.tar.gz";
+    inherit hash;
+  };
+
+  nativeBuildInputs = [
+    cmake
+    ninja
+    gfortran
+  ] ++ lists.optionals cudaSupport [
+    cudaPackages.cuda_nvcc
+  ];
+
+  buildInputs = [
+    libpthreadstubs
+    lapack
+    blas
+  ] ++ lists.optionals cudaSupport (with cudaPackages; [
+    cuda_cudart.dev # cuda_runtime.h
+    cuda_cudart.lib # cudart
+    cuda_cudart.static # cudart_static
+    libcublas.dev # cublas_v2.h
+    libcublas.lib # cublas
+    libcusparse.dev # cusparse.h
+    libcusparse.lib # cusparse
+  ] ++ lists.optionals (strings.versionOlder cudaVersion "11.8") [
+    cuda_nvprof.dev # <cuda_profiler_api.h>
+  ] ++ lists.optionals (strings.versionAtLeast cudaVersion "11.8") [
+    cuda_profiler_api.dev # <cuda_profiler_api.h>
+  ] ++ lists.optionals (strings.versionAtLeast cudaVersion "12.0") [
+    cuda_cccl.dev # <nv/target>
+  ]) ++ lists.optionals rocmSupport [
+    rocmPackages.clr
+    rocmPackages.hipblas
+    rocmPackages.hipsparse
+    rocmPackages.llvm.openmp
+  ];
+
+  cmakeFlags = [
+    "-DGPU_TARGET=${gpuTargetString}"
+    (lib.cmakeBool "MAGMA_ENABLE_CUDA" cudaSupport)
+    (lib.cmakeBool "MAGMA_ENABLE_HIP" rocmSupport)
+  ] ++ lists.optionals static [
+    "-DBUILD_SHARED_LIBS=OFF"
+  ] ++ lists.optionals cudaSupport [
+    "-DCMAKE_CUDA_ARCHITECTURES=${cudaArchitecturesString}"
+    "-DMIN_ARCH=${minArch}" # Disarms magma's asserts
+    "-DCMAKE_C_COMPILER=${backendStdenv.cc}/bin/cc"
+    "-DCMAKE_CXX_COMPILER=${backendStdenv.cc}/bin/c++"
+  ] ++ lists.optionals rocmSupport [
+    "-DCMAKE_C_COMPILER=${rocmPackages.clr}/bin/hipcc"
+    "-DCMAKE_CXX_COMPILER=${rocmPackages.clr}/bin/hipcc"
+  ] ++ lists.optionals (cudaPackages.cudaAtLeast "12.0.0") [
+    (lib.cmakeBool "USE_FORTRAN" false)
+  ];
+
+  buildFlags = [
+    "magma"
+    "magma_sparse"
+  ];
+
+  doCheck = false;
+
+  passthru = {
+    inherit cudaPackages cudaSupport rocmSupport gpuTargets;
+  };
+
+  meta = with lib; {
+    description = "Matrix Algebra on GPU and Multicore Architectures";
+    license = licenses.bsd3;
+    homepage = "http://icl.cs.utk.edu/magma/index.html";
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ connorbaker ];
+
+    # Cf. https://bitbucket.org/icl/magma/src/fcfe5aa61c1a4c664b36a73ebabbdbab82765e9f/CMakeLists.txt#lines-20
+    broken =
+      !(cudaSupport || rocmSupport) # At least one back-end enabled
+      || (cudaSupport && rocmSupport) # Mutually exclusive
+      || (cudaSupport && strings.versionOlder cudaVersion "9");
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/magma/releases.nix b/nixpkgs/pkgs/development/libraries/science/math/magma/releases.nix
new file mode 100644
index 000000000000..59f495d67109
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/magma/releases.nix
@@ -0,0 +1,69 @@
+# NOTE: Order matters! Put the oldest version first, and the newest version last.
+# NOTE: Make sure the supportedGpuTargets are in order of oldest to newest.
+#   You can update the supportedGpuTargets by looking at the CMakeLists.txt file.
+#   HIP is here: https://bitbucket.org/icl/magma/src/f4ec79e2c13a2347eff8a77a3be6f83bc2daec20/CMakeLists.txt#lines-386
+#   CUDA works around magma's wrappers and uses FindCUDAToolkit directly
+[
+  {
+    version = "2.6.2";
+    hash = "sha256-dbVU2rAJA+LRC5cskT5Q5/iMvGLzrkMrWghsfk7aCnE=";
+    supportedGpuTargets = [
+      "700"
+      "701"
+      "702"
+      "703"
+      "704"
+      "705"
+      "801"
+      "802"
+      "803"
+      "805"
+      "810"
+      "900"
+      "902"
+      "904"
+      "906"
+      "908"
+      "909"
+      "90c"
+      "1010"
+      "1011"
+      "1012"
+      "1030"
+      "1031"
+      "1032"
+      "1033"
+    ];
+  }
+  {
+    version = "2.7.2";
+    hash = "sha256-cpvBpw5RinQi/no6VFN6R0EDWne+M0n2bqxcNiV21WA=";
+    supportedGpuTargets = [
+      "700"
+      "701"
+      "702"
+      "703"
+      "704"
+      "705"
+      "801"
+      "802"
+      "803"
+      "805"
+      "810"
+      "900"
+      "902"
+      "904"
+      "906"
+      "908"
+      "909"
+      "90c"
+      "1010"
+      "1011"
+      "1012"
+      "1030"
+      "1031"
+      "1032"
+      "1033"
+    ];
+  }
+]
diff --git a/nixpkgs/pkgs/development/libraries/science/math/metis/default.nix b/nixpkgs/pkgs/development/libraries/science/math/metis/default.nix
new file mode 100644
index 000000000000..cd221e86b148
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/metis/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchurl, unzip, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "metis";
+  version = "5.1.0";
+
+  src = fetchurl {
+    url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-${version}.tar.gz";
+    sha256 = "1cjxgh41r8k6j029yxs8msp3z6lcnpm16g5pvckk35kc7zhfpykn";
+  };
+
+  cmakeFlags = [
+    "-DGKLIB_PATH=../GKlib"
+    # remove once updated past https://github.com/KarypisLab/METIS/commit/521a2c360dc21ace5c4feb6dc0b7992433e3cb0f
+    "-DCMAKE_SKIP_BUILD_RPATH=ON"
+  ];
+  nativeBuildInputs = [ unzip cmake ];
+
+  meta = {
+    description = "Serial graph partitioning and fill-reducing matrix ordering";
+    homepage = "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview";
+    license = lib.licenses.asl20;
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/mkl/default.nix b/nixpkgs/pkgs/development/libraries/science/math/mkl/default.nix
new file mode 100644
index 000000000000..f4b168b37fe2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/mkl/default.nix
@@ -0,0 +1,186 @@
+{ lib
+, stdenv
+, callPackage
+, stdenvNoCC
+, fetchurl
+, rpmextract
+, _7zz
+, darwin
+, validatePkgConfig
+, enableStatic ? stdenv.hostPlatform.isStatic
+}:
+
+/*
+  For details on using mkl as a blas provider for python packages such as numpy,
+  numexpr, scipy, etc., see the Python section of the NixPkgs manual.
+*/
+let
+  # Release notes and download URLs are here:
+  # https://registrationcenter.intel.com/en/products/
+  version = "${mklVersion}.${rel}";
+
+  mklVersion = "2023.1.0";
+  rel = if stdenvNoCC.isDarwin then "43558" else "46342";
+
+  # Intel openmp uses its own versioning.
+  openmpVersion = "2023.1.0";
+  openmpRel = "46305";
+
+  # Thread Building Blocks release.
+  tbbVersion = "2021.9.0";
+  tbbRel = "43484";
+
+  shlibExt = stdenvNoCC.hostPlatform.extensions.sharedLibrary;
+
+  oneapi-mkl = fetchurl {
+    url = "https://yum.repos.intel.com/oneapi/intel-oneapi-mkl-${mklVersion}-${mklVersion}-${rel}.x86_64.rpm";
+    hash = "sha256-PGLPNnR+11AmmaNxldeze/l2Kw/4+mfjB+RqsPhP6oM=";
+  };
+
+  oneapi-mkl-common = fetchurl {
+    url = "https://yum.repos.intel.com/oneapi/intel-oneapi-mkl-common-${mklVersion}-${mklVersion}-${rel}.noarch.rpm";
+    hash = "sha256-wztTE2R/IdG6ujGf7KFocpRmXzlZSnEKopTBOlPPlBw=";
+  };
+
+  oneapi-mkl-common-devel = fetchurl {
+    url = "https://yum.repos.intel.com/oneapi/intel-oneapi-mkl-common-devel-${mklVersion}-${mklVersion}-${rel}.noarch.rpm";
+    hash = "sha256-MWa8mpyFM4zgDLup+EzFRM+N2Oxf0o6FBBRM8mAanbI=";
+  };
+
+  oneapi-mkl-devel = fetchurl {
+    url = "https://yum.repos.intel.com/oneapi/intel-oneapi-mkl-devel-${mklVersion}-${mklVersion}-${rel}.x86_64.rpm";
+    hash = "sha256-Arq5kXktI92031XqfV0pkzQCHaFsTRKX05iOA/fPNOs=";
+  };
+
+  oneapi-openmp = fetchurl {
+    url = "https://yum.repos.intel.com/oneapi/intel-oneapi-openmp-${mklVersion}-${mklVersion}-${openmpRel}.x86_64.rpm";
+    hash = "sha256-cyBD3P4AEvyreP4pP3BE+yyDB+ptblOQ9GYI8ysGsIM=";
+  };
+
+  oneapi-tbb = fetchurl {
+    url = "https://yum.repos.intel.com/oneapi/intel-oneapi-tbb-${tbbVersion}-${tbbVersion}-${tbbRel}.x86_64.rpm";
+    hash = "sha256-pzJpQdiYVpcKDShePak2I0uEh7u08vJgX7OBF5p5yAM=";
+  };
+
+in stdenvNoCC.mkDerivation ({
+  pname = "mkl";
+  inherit version;
+
+  dontUnpack = stdenvNoCC.isLinux;
+
+  unpackPhase = if stdenvNoCC.isDarwin then ''
+    7zz x $src
+  '' else null;
+
+  nativeBuildInputs = [ validatePkgConfig ] ++ (if stdenvNoCC.isDarwin
+    then
+      [ _7zz darwin.cctools ]
+    else
+      [ rpmextract ]);
+
+  buildPhase = if stdenvNoCC.isDarwin then ''
+    for f in bootstrapper.app/Contents/Resources/packages/*/cupPayload.cup; do
+      tar -xf $f
+    done
+    mkdir -p opt/intel
+    mv _installdir opt/intel/oneapi
+  '' else ''
+    rpmextract ${oneapi-mkl}
+    rpmextract ${oneapi-mkl-common}
+    rpmextract ${oneapi-mkl-common-devel}
+    rpmextract ${oneapi-mkl-devel}
+    rpmextract ${oneapi-openmp}
+    rpmextract ${oneapi-tbb}
+  '';
+
+  installPhase = ''
+    for f in $(find . -name 'mkl*.pc') ; do
+      bn=$(basename $f)
+      substituteInPlace $f \
+        --replace $\{MKLROOT} "$out" \
+        --replace "lib/intel64" "lib"
+
+      sed -r -i "s|^prefix=.*|prefix=$out|g" $f
+    done
+
+    for f in $(find opt/intel -name 'mkl*iomp.pc') ; do
+      substituteInPlace $f --replace "../compiler/lib" "lib"
+    done
+
+    # License
+    install -Dm0655 -t $out/share/doc/mkl opt/intel/oneapi/mkl/${mklVersion}/licensing/license.txt
+
+    # Dynamic libraries
+    mkdir -p $out/lib
+    cp -a opt/intel/oneapi/mkl/${mklVersion}/lib/${lib.optionalString stdenvNoCC.isLinux "intel64"}/*${shlibExt}* $out/lib
+    cp -a opt/intel/oneapi/compiler/${mklVersion}/${if stdenvNoCC.isDarwin then "mac" else "linux"}/compiler/lib/${lib.optionalString stdenvNoCC.isLinux "intel64_lin"}/*${shlibExt}* $out/lib
+    cp -a opt/intel/oneapi/tbb/${tbbVersion}/lib/${lib.optionalString stdenvNoCC.isLinux "intel64/gcc4.8"}/*${shlibExt}* $out/lib
+
+    # Headers
+    cp -r opt/intel/oneapi/mkl/${mklVersion}/include $out/
+
+    # CMake config
+    cp -r opt/intel/oneapi/mkl/${mklVersion}/lib/cmake $out/lib
+  '' +
+    (if enableStatic then ''
+      install -Dm0644 -t $out/lib opt/intel/oneapi/mkl/${mklVersion}/lib/${lib.optionalString stdenvNoCC.isLinux "intel64"}/*.a
+      install -Dm0644 -t $out/lib/pkgconfig opt/intel/oneapi/mkl/${mklVersion}/lib/pkgconfig/*.pc
+    '' else ''
+      cp opt/intel/oneapi/mkl/${mklVersion}/lib/${lib.optionalString stdenvNoCC.isLinux "intel64"}/*${shlibExt}* $out/lib
+      install -Dm0644 -t $out/lib/pkgconfig opt/intel/oneapi/mkl/${mklVersion}/lib/pkgconfig/*dynamic*.pc
+    '') + ''
+    # Setup symlinks for blas / lapack
+    ln -s $out/lib/libmkl_rt${shlibExt} $out/lib/libblas${shlibExt}
+    ln -s $out/lib/libmkl_rt${shlibExt} $out/lib/libcblas${shlibExt}
+    ln -s $out/lib/libmkl_rt${shlibExt} $out/lib/liblapack${shlibExt}
+    ln -s $out/lib/libmkl_rt${shlibExt} $out/lib/liblapacke${shlibExt}
+  '' + lib.optionalString stdenvNoCC.hostPlatform.isLinux ''
+    ln -s $out/lib/libmkl_rt${shlibExt} $out/lib/libblas${shlibExt}".3"
+    ln -s $out/lib/libmkl_rt${shlibExt} $out/lib/libcblas${shlibExt}".3"
+    ln -s $out/lib/libmkl_rt${shlibExt} $out/lib/liblapack${shlibExt}".3"
+    ln -s $out/lib/libmkl_rt${shlibExt} $out/lib/liblapacke${shlibExt}".3"
+  '';
+
+  # fixDarwinDylibName fails for libmkl_cdft_core.dylib because the
+  # larger updated load commands do not fit. Use install_name_tool
+  # explicitly and ignore the error.
+  postFixup = lib.optionalString stdenvNoCC.isDarwin ''
+    for f in $out/lib/*.dylib; do
+      install_name_tool -id $out/lib/$(basename $f) $f || true
+    done
+    install_name_tool -change @rpath/libiomp5.dylib $out/lib/libiomp5.dylib $out/lib/libmkl_intel_thread.dylib
+    install_name_tool -change @rpath/libtbb.12.dylib $out/lib/libtbb.12.dylib $out/lib/libmkl_tbb_thread.dylib
+    install_name_tool -change @rpath/libtbbmalloc.2.dylib $out/lib/libtbbmalloc.2.dylib $out/lib/libtbbmalloc_proxy.dylib
+  '';
+
+  # Per license agreement, do not modify the binary
+  dontStrip = true;
+  dontPatchELF = true;
+
+  passthru.tests = {
+    pkg-config-dynamic-iomp = callPackage ./test { enableStatic = false; execution = "iomp"; };
+    pkg-config-static-iomp = callPackage ./test { enableStatic = true; execution = "iomp"; };
+    pkg-config-dynamic-seq = callPackage ./test { enableStatic = false; execution = "seq"; };
+    pkg-config-static-seq = callPackage ./test { enableStatic = true; execution = "seq"; };
+  };
+
+  meta = with lib; {
+    description = "Intel OneAPI Math Kernel Library";
+    longDescription = ''
+      Intel OneAPI Math Kernel Library (Intel oneMKL) optimizes code with minimal
+      effort for future generations of Intel processors. It is compatible with your
+      choice of compilers, languages, operating systems, and linking and
+      threading models.
+    '';
+    homepage = "https://software.intel.com/en-us/mkl";
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+    license = licenses.issl;
+    platforms = [ "x86_64-linux" "x86_64-darwin" ];
+    maintainers = with maintainers; [ bhipple ];
+  };
+} // lib.optionalAttrs stdenvNoCC.isDarwin {
+  src = fetchurl {
+    url = "https://registrationcenter-download.intel.com/akdlm/IRC_NAS/087a9190-9d96-4b8c-bd2f-79159572ed89/m_onemkl_p_${mklVersion}.${rel}_offline.dmg";
+    hash = "sha256-bUaaJPSaLr60fw0DzDCjPvY/UucHlLbCSLyQxyiAi04=";
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/science/math/mkl/test/default.nix b/nixpkgs/pkgs/development/libraries/science/math/mkl/test/default.nix
new file mode 100644
index 000000000000..cb3355260d12
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/mkl/test/default.nix
@@ -0,0 +1,41 @@
+{ stdenv
+, pkg-config
+, mkl
+
+, enableStatic ? false
+, execution ? "seq"
+}:
+
+let
+  linkType = if enableStatic then "static" else "dynamic";
+in stdenv.mkDerivation {
+  pname = "mkl-test";
+  version = mkl.version;
+
+  src = ./.;
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ (mkl.override { inherit enableStatic; }) ];
+
+  doCheck = true;
+
+  buildPhase = ''
+    # Check regular Nix build.
+    gcc test.c -o test $(pkg-config --cflags --libs mkl-${linkType}-ilp64-${execution})
+
+    # Clear flags to ensure that we are purely relying on options
+    # provided by pkg-config.
+    NIX_CFLAGS_COMPILE="" \
+    NIX_LDFLAGS="" \
+      gcc test.c -o test $(pkg-config --cflags --libs mkl-${linkType}-ilp64-${execution})
+  '';
+
+  installPhase = ''
+    touch $out
+  '';
+
+  checkPhase = ''
+    ./test
+  '';
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/mkl/test/test.c b/nixpkgs/pkgs/development/libraries/science/math/mkl/test/test.c
new file mode 100644
index 000000000000..9413ac0c68e9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/mkl/test/test.c
@@ -0,0 +1,12 @@
+#include <assert.h>
+
+#include <mkl_cblas.h>
+
+int main() {
+  float u[] = {1., 2., 3.};
+  float v[] = {4., 5., 6.};
+
+  float dp = cblas_sdot(3, u, 1, v, 1);
+
+  assert(dp == 32.);
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/mongoose/default.nix b/nixpkgs/pkgs/development/libraries/science/math/mongoose/default.nix
new file mode 100644
index 000000000000..29b901277f61
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/mongoose/default.nix
@@ -0,0 +1,69 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, blas
+, llvmPackages
+}:
+
+let
+  suitesparseVersion = "7.6.0";
+in
+stdenv.mkDerivation {
+  pname = "mongoose";
+  version = "3.3.2";
+
+  outputs = [ "bin" "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "DrTimothyAldenDavis";
+    repo = "SuiteSparse";
+    rev = "v${suitesparseVersion}";
+    hash = "sha256-zZXbUNXxVi4mpI4j4GjyVYraoPFWcuep9q5jl1XdqEo=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = [
+    blas
+  ] ++ lib.optionals stdenv.cc.isClang [
+    llvmPackages.openmp
+  ];
+
+  dontUseCmakeConfigure = true;
+
+  cmakeFlags = [
+    "-DBLAS_LIBRARIES=${blas}"
+    "-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON"
+  ];
+
+  buildPhase = ''
+    runHook preConfigure
+
+    for f in SuiteSparse_config Mongoose; do
+      (cd $f && cmakeConfigurePhase && make -j$NIX_BUILD_CORES)
+    done
+
+    runHook postConfigure
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    for f in SuiteSparse_config Mongoose; do
+      (cd $f/build && make install -j$NIX_BUILD_CORES)
+    done
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Graph Coarsening and Partitioning Library";
+    homepage = "https://github.com/DrTimothyAldenDavis/SuiteSparse/tree/dev/Mongoose";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ wegank ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/openblas/default.nix b/nixpkgs/pkgs/development/libraries/science/math/openblas/default.nix
new file mode 100644
index 000000000000..7ecd6a88d13c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/openblas/default.nix
@@ -0,0 +1,269 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, perl, which
+# Most packages depending on openblas expect integer width to match
+# pointer width, but some expect to use 32-bit integers always
+# (for compatibility with reference BLAS).
+, blas64 ? null
+# Multi-threaded applications must not call a threaded OpenBLAS
+# (the only exception is when an application uses OpenMP as its
+# *only* form of multi-threading). See
+#     https://github.com/OpenMathLib/OpenBLAS/wiki/Faq/4bded95e8dc8aadc70ce65267d1093ca7bdefc4c#multi-threaded
+#     https://github.com/OpenMathLib/OpenBLAS/issues/2543
+# This flag builds a single-threaded OpenBLAS using the flags
+# stated in thre.
+, singleThreaded ? false
+, buildPackages
+# Select a specific optimization target (other than the default)
+# See https://github.com/OpenMathLib/OpenBLAS/blob/develop/TargetList.txt
+, target ? null
+# Select whether DYNAMIC_ARCH is enabled or not.
+, dynamicArch ? null
+# enable AVX512 optimized kernels.
+# These kernels have been a source of trouble in the past.
+# Use with caution.
+, enableAVX512 ? false
+, enableStatic ? stdenv.hostPlatform.isStatic
+, enableShared ? !stdenv.hostPlatform.isStatic
+
+# for passthru.tests
+, ceres-solver
+, giac
+, octave
+, opencv
+, python3
+, openmp ? null
+}:
+
+let blas64_ = blas64; in
+
+let
+  setTarget = x: if target == null then x else target;
+  setDynamicArch = x: if dynamicArch == null then x else dynamicArch;
+
+  # To add support for a new platform, add an element to this set.
+  configs = {
+    armv6l-linux = {
+      BINARY = 32;
+      TARGET = setTarget "ARMV6";
+      DYNAMIC_ARCH = setDynamicArch false;
+      USE_OPENMP = true;
+    };
+
+    armv7l-linux = {
+      BINARY = 32;
+      TARGET = setTarget "ARMV7";
+      DYNAMIC_ARCH = setDynamicArch false;
+      USE_OPENMP = true;
+    };
+
+    aarch64-darwin = {
+      BINARY = 64;
+      TARGET = setTarget "VORTEX";
+      DYNAMIC_ARCH = setDynamicArch true;
+      USE_OPENMP = false;
+      MACOSX_DEPLOYMENT_TARGET = "11.0";
+    };
+
+    aarch64-linux = {
+      BINARY = 64;
+      TARGET = setTarget "ARMV8";
+      DYNAMIC_ARCH = setDynamicArch true;
+      USE_OPENMP = true;
+    };
+
+    i686-linux = {
+      BINARY = 32;
+      TARGET = setTarget "P2";
+      DYNAMIC_ARCH = setDynamicArch true;
+      USE_OPENMP = true;
+    };
+
+    x86_64-darwin = {
+      BINARY = 64;
+      TARGET = setTarget "ATHLON";
+      DYNAMIC_ARCH = setDynamicArch true;
+      NO_AVX512 = !enableAVX512;
+      USE_OPENMP = false;
+      MACOSX_DEPLOYMENT_TARGET = "10.7";
+    };
+
+    x86_64-linux = {
+      BINARY = 64;
+      TARGET = setTarget "ATHLON";
+      DYNAMIC_ARCH = setDynamicArch true;
+      NO_AVX512 = !enableAVX512;
+      USE_OPENMP = !stdenv.hostPlatform.isMusl;
+    };
+
+    powerpc64le-linux = {
+      BINARY = 64;
+      TARGET = setTarget "POWER5";
+      DYNAMIC_ARCH = setDynamicArch true;
+      USE_OPENMP = !stdenv.hostPlatform.isMusl;
+    };
+
+    riscv64-linux = {
+      BINARY = 64;
+      TARGET = setTarget "RISCV64_GENERIC";
+      DYNAMIC_ARCH = setDynamicArch false;
+      USE_OPENMP = true;
+    };
+
+    loongarch64-linux = {
+      BINARY = 64;
+      TARGET = setTarget "LOONGSONGENERIC";
+      DYNAMIC_ARCH = setDynamicArch false;
+      USE_OPENMP = true;
+    };
+  };
+in
+
+let
+  config =
+    configs.${stdenv.hostPlatform.system}
+    or (throw "unsupported system: ${stdenv.hostPlatform.system}");
+in
+
+let
+  blas64 =
+    if blas64_ != null
+      then blas64_
+      else lib.hasPrefix "x86_64" stdenv.hostPlatform.system;
+  # Convert flag values to format OpenBLAS's build expects.
+  # `toString` is almost what we need other than bools,
+  # which we need to map {true -> 1, false -> 0}
+  # (`toString` produces empty string `""` for false instead of `0`)
+  mkMakeFlagValue = val:
+    if !builtins.isBool val then toString val
+    else if val then "1" else "0";
+  mkMakeFlagsFromConfig = lib.mapAttrsToList (var: val: "${var}=${mkMakeFlagValue val}");
+
+  shlibExt = stdenv.hostPlatform.extensions.sharedLibrary;
+
+in
+stdenv.mkDerivation rec {
+  pname = "openblas";
+  version = "0.3.26";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "OpenMathLib";
+    repo = "OpenBLAS";
+    rev = "v${version}";
+    hash = "sha256-AA3+x3SXkcg3g7bROZYLpWAbxnRedmQBZPe+rBJKxJ8=";
+  };
+
+  postPatch = ''
+    # cc1: error: invalid feature modifier 'sve2' in '-march=armv8.5-a+sve+sve2+bf16'
+    substituteInPlace Makefile.arm64 --replace "+sve2+bf16" ""
+  '';
+
+  inherit blas64;
+
+  # Some hardening features are disabled due to sporadic failures in
+  # OpenBLAS-based programs. The problem may not be with OpenBLAS itself, but
+  # with how these flags interact with hardening measures used downstream.
+  # In either case, OpenBLAS must only be used by trusted code--it is
+  # inherently unsuitable for security-conscious applications--so there should
+  # be no objection to disabling these hardening measures.
+  hardeningDisable = [
+    # don't modify or move the stack
+    "stackprotector" "pic"
+    # don't alter index arithmetic
+    "strictoverflow"
+    # don't interfere with dynamic target detection
+    "relro" "bindnow"
+  ];
+
+  nativeBuildInputs = [
+    perl
+    which
+  ];
+
+  buildInputs = lib.optional (stdenv.cc.isClang && config.USE_OPENMP) openmp;
+
+  depsBuildBuild = [
+    buildPackages.gfortran
+    buildPackages.stdenv.cc
+  ];
+
+  enableParallelBuilding = true;
+
+  makeFlags = mkMakeFlagsFromConfig (config // {
+    FC = "${stdenv.cc.targetPrefix}gfortran";
+    CC = "${stdenv.cc.targetPrefix}${if stdenv.cc.isClang then "clang" else "cc"}";
+    PREFIX = placeholder "out";
+    OPENBLAS_INCLUDE_DIR = "${placeholder "dev"}/include";
+    NUM_THREADS = 64;
+    INTERFACE64 = blas64;
+    NO_STATIC = !enableStatic;
+    NO_SHARED = !enableShared;
+    CROSS = stdenv.hostPlatform != stdenv.buildPlatform;
+    HOSTCC = "cc";
+    # Makefile.system only checks defined status
+    # This seems to be a bug in the openblas Makefile:
+    # on x86_64 it expects NO_BINARY_MODE=
+    # but on aarch64 it expects NO_BINARY_MODE=0
+    NO_BINARY_MODE = if stdenv.isx86_64
+        then toString (stdenv.hostPlatform != stdenv.buildPlatform)
+        else stdenv.hostPlatform != stdenv.buildPlatform;
+    # This disables automatic build job count detection (which honours neither enableParallelBuilding nor NIX_BUILD_CORES)
+    # and uses the main make invocation's job count, falling back to 1 if no parallelism is used.
+    # https://github.com/OpenMathLib/OpenBLAS/blob/v0.3.20/getarch.c#L1781-L1792
+    MAKE_NB_JOBS = 0;
+  } // (lib.optionalAttrs stdenv.cc.isClang {
+    LDFLAGS = "-L${lib.getLib buildPackages.gfortran.cc}/lib"; # contains `libgfortran.so`; building with clang needs this, gcc has it implicit
+  }) // (lib.optionalAttrs singleThreaded {
+    # As described on https://github.com/OpenMathLib/OpenBLAS/wiki/Faq/4bded95e8dc8aadc70ce65267d1093ca7bdefc4c#multi-threaded
+    USE_THREAD = false;
+    USE_LOCKING = true; # available with openblas >= 0.3.7
+    USE_OPENMP = false; # openblas will refuse building with both USE_OPENMP=1 and USE_THREAD=0
+  }));
+
+  doCheck = true;
+  checkTarget = "tests";
+
+  postInstall = ''
+    # Write pkgconfig aliases. Upstream report:
+    # https://github.com/OpenMathLib/OpenBLAS/issues/1740
+    for alias in blas cblas lapack; do
+      cat <<EOF > $out/lib/pkgconfig/$alias.pc
+Name: $alias
+Version: ${version}
+Description: $alias provided by the OpenBLAS package.
+Cflags: -I$dev/include
+Libs: -L$out/lib -lopenblas
+EOF
+    done
+
+    # Setup symlinks for blas / lapack
+  '' + lib.optionalString enableShared ''
+    ln -s $out/lib/libopenblas${shlibExt} $out/lib/libblas${shlibExt}
+    ln -s $out/lib/libopenblas${shlibExt} $out/lib/libcblas${shlibExt}
+    ln -s $out/lib/libopenblas${shlibExt} $out/lib/liblapack${shlibExt}
+    ln -s $out/lib/libopenblas${shlibExt} $out/lib/liblapacke${shlibExt}
+  '' + lib.optionalString (stdenv.hostPlatform.isLinux && enableShared) ''
+    ln -s $out/lib/libopenblas${shlibExt} $out/lib/libblas${shlibExt}.3
+    ln -s $out/lib/libopenblas${shlibExt} $out/lib/libcblas${shlibExt}.3
+    ln -s $out/lib/libopenblas${shlibExt} $out/lib/liblapack${shlibExt}.3
+    ln -s $out/lib/libopenblas${shlibExt} $out/lib/liblapacke${shlibExt}.3
+  '' + lib.optionalString enableStatic ''
+    ln -s $out/lib/libopenblas.a $out/lib/libblas.a
+    ln -s $out/lib/libopenblas.a $out/lib/libcblas.a
+    ln -s $out/lib/libopenblas.a $out/lib/liblapack.a
+    ln -s $out/lib/libopenblas.a $out/lib/liblapacke.a
+  '';
+
+  passthru.tests = {
+    inherit (python3.pkgs) numpy scipy;
+    inherit ceres-solver giac octave opencv;
+  };
+
+  meta = with lib; {
+    description = "Basic Linear Algebra Subprograms";
+    license = licenses.bsd3;
+    homepage = "https://github.com/OpenMathLib/OpenBLAS";
+    platforms = attrNames configs;
+    maintainers = with maintainers; [ ttuegel ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/openlibm/default.nix b/nixpkgs/pkgs/development/libraries/science/math/openlibm/default.nix
new file mode 100644
index 000000000000..21c7d45a9099
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/openlibm/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "openlibm";
+  version = "0.8.1";
+
+  src = fetchFromGitHub {
+    owner = "JuliaLang";
+    repo = "openlibm";
+    rev = "v${version}";
+    sha256 = "sha256-q7BYUU8oChjuBFbVnpT+vqIAu+BVotT4xY2Dn0hmWfc=";
+  };
+
+  makeFlags = [ "prefix=$(out)" ];
+
+  meta = {
+    description = "High quality system independent, portable, open source libm implementation";
+    homepage = "https://openlibm.org/";
+    license = lib.licenses.mit;
+    maintainers = [ lib.maintainers.ttuegel ];
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/openspecfun/default.nix b/nixpkgs/pkgs/development/libraries/science/math/openspecfun/default.nix
new file mode 100644
index 000000000000..14befd6d11fe
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/openspecfun/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchFromGitHub, gfortran }:
+
+stdenv.mkDerivation rec {
+  pname = "openspecfun";
+  version = "0.5.6";
+  src = fetchFromGitHub {
+    owner = "JuliaLang";
+    repo = "openspecfun";
+    rev = "v${version}";
+    sha256 = "sha256-4MPoRMtDTkdvDfhNXKk/80pZjXRNEPcysLNTb5ohxWk=";
+  };
+
+  makeFlags = [ "prefix=$(out)" ];
+
+  nativeBuildInputs = [ gfortran ];
+
+  meta = {
+    description = "A collection of special mathematical functions";
+    homepage = "https://github.com/JuliaLang/openspecfun";
+    license = lib.licenses.mit;
+    maintainers = [ lib.maintainers.ttuegel ];
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/or-tools/default.nix b/nixpkgs/pkgs/development/libraries/science/math/or-tools/default.nix
new file mode 100644
index 000000000000..5cbc23589895
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/or-tools/default.nix
@@ -0,0 +1,126 @@
+{ abseil-cpp
+, bzip2
+, cbc
+, cmake
+, eigen
+, ensureNewerSourcesForZipFilesHook
+, fetchFromGitHub
+, fetchpatch
+, glpk
+, lib
+, pkg-config
+, protobuf
+, python
+, re2
+, stdenv
+, swig4
+, unzip
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "or-tools";
+  version = "9.4";
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "or-tools";
+    rev = "v${version}";
+    sha256 = "sha256-joWonJGuxlgHhXLznRhC1MDltQulXzpo4Do9dec1bLY=";
+  };
+  patches = [
+    # Disable test that requires external input: https://github.com/google/or-tools/issues/3429
+    (fetchpatch {
+      url = "https://github.com/google/or-tools/commit/7072ae92ec204afcbfce17d5360a5884c136ce90.patch";
+      hash = "sha256-iWE+atp308q7pC1L1FD6sK8LvWchZ3ofxvXssguozbM=";
+    })
+    # Fix test that broke in parallel builds: https://github.com/google/or-tools/issues/3461
+    (fetchpatch {
+      url = "https://github.com/google/or-tools/commit/a26602f24781e7bfcc39612568aa9f4010bb9736.patch";
+      hash = "sha256-gM0rW0xRXMYaCwltPK0ih5mdo3HtX6mKltJDHe4gbLc=";
+    })
+    # Backport fix in cmake test configuration where pip installs newer version from PyPi over local build,
+    #  breaking checkPhase: https://github.com/google/or-tools/issues/3260
+    (fetchpatch {
+      url = "https://github.com/google/or-tools/commit/edd1544375bd55f79168db315151a48faa548fa0.patch";
+      hash = "sha256-S//1YM3IoRCp3Ghg8zMF0XXgIpVmaw4gH8cVb9eUbqM=";
+    })
+    # Don't use non-existent member of string_view. Partial patch from commit
+    # https://github.com/google/or-tools/commit/c5a2fa1eb673bf652cb9ad4f5049d054b8166e17.patch
+    ./fix-stringview-compile.patch
+  ];
+
+  # or-tools normally attempts to build Protobuf for the build platform when
+  # cross-compiling. Instead, just tell it where to find protoc.
+  postPatch = ''
+    echo "set(PROTOC_PRG $(type -p protoc))" > cmake/host.cmake
+  '';
+
+  cmakeFlags = [
+    "-DBUILD_DEPS=OFF"
+    "-DBUILD_PYTHON=ON"
+    "-DBUILD_pybind11=OFF"
+    "-DFETCH_PYTHON_DEPS=OFF"
+    "-DUSE_GLPK=ON"
+    "-DUSE_SCIP=OFF"
+    "-DPython3_EXECUTABLE=${python.pythonOnBuildForHost.interpreter}"
+  ] ++ lib.optionals stdenv.isDarwin [ "-DCMAKE_MACOSX_RPATH=OFF" ];
+  nativeBuildInputs = [
+    cmake
+    ensureNewerSourcesForZipFilesHook
+    pkg-config
+    python.pythonOnBuildForHost
+    swig4
+    unzip
+  ] ++ (with python.pythonOnBuildForHost.pkgs; [
+    pip
+    mypy-protobuf
+  ]);
+  buildInputs = [
+    bzip2
+    cbc
+    eigen
+    glpk
+    python.pkgs.absl-py
+    python.pkgs.pybind11
+    python.pkgs.setuptools
+    python.pkgs.wheel
+    re2
+    zlib
+  ];
+  propagatedBuildInputs = [
+    abseil-cpp
+    protobuf
+    (python.pkgs.protobuf.override { protobuf = protobuf; })
+    python.pkgs.numpy
+  ];
+  nativeCheckInputs = [
+    python.pkgs.matplotlib
+    python.pkgs.pandas
+    python.pkgs.virtualenv
+  ];
+
+  doCheck = true;
+
+  # This extra configure step prevents the installer from littering
+  # $out/bin with sample programs that only really function as tests,
+  # and disables the upstream installation of a zipped Python egg that
+  # can’t be imported with our Python setup.
+  installPhase = ''
+    cmake . -DBUILD_EXAMPLES=OFF -DBUILD_PYTHON=OFF -DBUILD_SAMPLES=OFF
+    cmake --install .
+    pip install --prefix="$python" python/
+  '';
+
+  outputs = [ "out" "python" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/google/or-tools";
+    license = licenses.asl20;
+    description = ''
+      Google's software suite for combinatorial optimization.
+    '';
+    maintainers = with maintainers; [ andersk ];
+    platforms = with platforms; linux ++ darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/or-tools/fix-stringview-compile.patch b/nixpkgs/pkgs/development/libraries/science/math/or-tools/fix-stringview-compile.patch
new file mode 100644
index 000000000000..760ab80a38e4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/or-tools/fix-stringview-compile.patch
@@ -0,0 +1,36 @@
+diff --git a/ortools/lp_data/lp_parser.cc b/ortools/lp_data/lp_parser.cc
+index 58286306e5..bd26c019ab 100644
+--- a/ortools/lp_data/lp_parser.cc
++++ b/ortools/lp_data/lp_parser.cc
+@@ -185,7 +185,7 @@ bool LPParser::ParseIntegerVariablesList(StringPiece line) {
+ 
+ bool LPParser::ParseConstraint(StringPiece constraint) {
+   const StatusOr<ParsedConstraint> parsed_constraint_or_status =
+-      ::operations_research::glop::ParseConstraint(constraint.as_string());
++      ::operations_research::glop::ParseConstraint(constraint);
+   if (!parsed_constraint_or_status.ok()) return false;
+   const ParsedConstraint& parsed_constraint =
+       parsed_constraint_or_status.value();
+@@ -342,10 +342,9 @@ TokenType LPParser::ConsumeToken(StringPiece* sp) {
+ 
+ }  // namespace
+ 
+-StatusOr<ParsedConstraint> ParseConstraint(absl::string_view constraint_view) {
++StatusOr<ParsedConstraint> ParseConstraint(absl::string_view constraint) {
+   ParsedConstraint parsed_constraint;
+   // Get the name, if present.
+-  StringPiece constraint{constraint_view};
+   StringPiece constraint_copy{constraint};
+   std::string consumed_name;
+   Fractional consumed_coeff;
+@@ -413,8 +412,8 @@ StatusOr<ParsedConstraint> ParseConstraint(absl::string_view constraint_view) {
+     right_bound = consumed_coeff;
+     if (ConsumeToken(&constraint, &consumed_name, &consumed_coeff) !=
+         TokenType::END) {
+-      return absl::InvalidArgumentError(absl::StrCat(
+-          "End of input was expected, found: ", constraint.as_string()));
++      return absl::InvalidArgumentError(
++          absl::StrCat("End of input was expected, found: ", constraint));
+     }
+   }
+ 
diff --git a/nixpkgs/pkgs/development/libraries/science/math/osi/default.nix b/nixpkgs/pkgs/development/libraries/science/math/osi/default.nix
new file mode 100644
index 000000000000..a6bc5a086251
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/osi/default.nix
@@ -0,0 +1,44 @@
+{ stdenv, lib, fetchFromGitHub, gfortran, pkg-config
+, blas, zlib, bzip2, coin-utils
+, withGurobi ? false, gurobi
+, withCplex ? false, cplex }:
+
+stdenv.mkDerivation rec {
+  pname = "osi";
+  version = "0.108.9";
+
+  src = fetchFromGitHub {
+    owner = "coin-or";
+    repo = "Osi";
+    rev = "releases/${version}";
+    hash = "sha256-ueIa9CL4K5ygKpkMRvfuWR0emEG6omg65ZKCsConWsw=";
+  };
+
+  buildInputs =
+    [ blas zlib bzip2 coin-utils ]
+    ++ lib.optional withGurobi gurobi
+    ++ lib.optional withCplex cplex;
+  nativeBuildInputs = [ gfortran pkg-config ];
+  configureFlags =
+    lib.optionals withGurobi [ "--with-gurobi-incdir=${gurobi}/include" "--with-gurobi-lib=-lgurobi${gurobi.libSuffix}" ]
+    ++ lib.optionals withCplex [ "--with-cplex-incdir=${cplex}/cplex/include/ilcplex" "--with-cplex-lib=-lcplex${cplex.libSuffix}" ];
+
+  NIX_LDFLAGS =
+    lib.optionalString withCplex "-L${cplex}/cplex/bin/${cplex.libArch}";
+
+  # Compile errors
+  env.NIX_CFLAGS_COMPILE = "-Wno-cast-qual";
+  hardeningDisable = [ "format" ];
+
+  enableParallelBuilding = true;
+
+  passthru = { inherit withGurobi withCplex; };
+
+  meta = with lib; {
+    description = "An abstract base class to a generic linear programming (LP) solver";
+    homepage = "https://github.com/coin-or/Osi";
+    license = licenses.epl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ abbradar ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/osqp/default.nix b/nixpkgs/pkgs/development/libraries/science/math/osqp/default.nix
new file mode 100644
index 000000000000..bf22e1d74d93
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/osqp/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "osqp";
+  version = "0.6.3";
+
+  src = fetchFromGitHub {
+    owner = "oxfordcontrol";
+    repo = "osqp";
+    rev = "v${version}";
+    sha256 = "sha256-enkK5EFyAeLaUnHNYS3oq43HsHY5IuSLgsYP0k/GW8c=";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "A quadratic programming solver using operator splitting";
+    homepage = "https://osqp.org";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ taktoa ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/p4est-sc/default.nix b/nixpkgs/pkgs/development/libraries/science/math/p4est-sc/default.nix
new file mode 100644
index 000000000000..bb5d212061f2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/p4est-sc/default.nix
@@ -0,0 +1,72 @@
+{ lib, stdenv, fetchFromGitHub, mpiCheckPhaseHook
+, autoreconfHook, pkg-config
+, p4est-sc-debugEnable ? true, p4est-sc-mpiSupport ? true
+, mpi, openssh, zlib
+}:
+
+let
+  dbg = lib.optionalString debugEnable "-dbg";
+  debugEnable = p4est-sc-debugEnable;
+  mpiSupport = p4est-sc-mpiSupport;
+  isOpenmpi = mpiSupport && mpi.pname == "openmpi";
+in
+stdenv.mkDerivation {
+  pname = "p4est-sc${dbg}";
+  version = "unstable-2021-06-14";
+
+  # fetch an untagged snapshot of the prev3-develop branch
+  src = fetchFromGitHub {
+    owner = "cburstedde";
+    repo = "libsc";
+    rev = "1ae814e3fb1cc5456652e0d77550386842cb9bfb";
+    sha256 = "14vm0b162jh8399pgpsikbwq4z5lkrw9vfzy3drqykw09n6nc53z";
+  };
+
+  strictDeps = true;
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  propagatedNativeBuildInputs = lib.optional mpiSupport mpi
+    ++ lib.optional isOpenmpi openssh
+  ;
+  propagatedBuildInputs = [ zlib ];
+  inherit debugEnable mpiSupport;
+
+  postPatch = ''
+    echo "dist_scaclocal_DATA += config/sc_v4l2.m4" >> Makefile.am
+  '';
+  preConfigure = ''
+    echo "2.8.0" > .tarball-version
+    ${lib.optionalString mpiSupport "unset CC"}
+  '';
+
+  configureFlags = [ "--enable-pthread=-pthread" ]
+    ++ lib.optional debugEnable "--enable-debug"
+    ++ lib.optional mpiSupport "--enable-mpi"
+  ;
+
+  dontDisableStatic = true;
+  enableParallelBuilding = true;
+  makeFlags = [ "V=0" ];
+
+  nativeCheckInputs = lib.optionals mpiSupport [
+    mpiCheckPhaseHook
+    openssh
+  ];
+
+  # disallow Darwin checks due to prototype incompatibility of qsort_r
+  # to be fixed in a future version of the source code
+  doCheck = !stdenv.isDarwin && stdenv.hostPlatform == stdenv.buildPlatform;
+
+  meta = {
+    branch = "prev3-develop";
+    description = "Support for parallel scientific applications";
+    longDescription = ''
+      The SC library provides support for parallel scientific applications.
+      Its main purpose is to support the p4est software library, hence
+      this package is called p4est-sc, but it works standalone, too.
+    '';
+    homepage = "https://www.p4est.org/";
+    downloadPage = "https://github.com/cburstedde/libsc.git";
+    license = lib.licenses.lgpl21Plus;
+    maintainers = [ lib.maintainers.cburstedde ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/p4est/default.nix b/nixpkgs/pkgs/development/libraries/science/math/p4est/default.nix
new file mode 100644
index 000000000000..1218c695590e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/p4est/default.nix
@@ -0,0 +1,64 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+, p4est-withMetis ? true, metis
+, p4est-sc
+}:
+
+let
+  inherit (p4est-sc) debugEnable mpiSupport;
+  dbg = lib.optionalString debugEnable "-dbg";
+  withMetis = p4est-withMetis;
+in
+stdenv.mkDerivation {
+  pname = "p4est${dbg}";
+  version = "unstable-2021-06-22";
+
+  # fetch an untagged snapshot of the prev3-develop branch
+  src = fetchFromGitHub {
+    owner = "cburstedde";
+    repo = "p4est";
+    rev = "7423ac5f2b2b64490a7a92e5ddcbd251053c4dee";
+    sha256 = "0vffnf48rzw6d0as4c3x1f31b4kapmdzr1hfj5rz5ngah72gqrph";
+  };
+
+  strictDeps = true;
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  propagatedBuildInputs = [ p4est-sc ];
+  buildInputs = lib.optional withMetis metis;
+  inherit debugEnable mpiSupport withMetis;
+
+  patches = [ ./p4est-metis.patch ];
+  postPatch = ''
+    sed -i -e "s:\(^\s*ACLOCAL_AMFLAGS.*\)\s@P4EST_SC_AMFLAGS@\s*$:\1 -I ${p4est-sc}/share/aclocal:" Makefile.am
+  '';
+  preAutoreconf = ''
+    echo "2.8.0" > .tarball-version
+  '';
+  preConfigure = lib.optionalString mpiSupport ''
+    unset CC
+  '';
+
+  configureFlags = p4est-sc.configureFlags
+    ++ [ "--with-sc=${p4est-sc}" ]
+    ++ lib.optional withMetis "--with-metis"
+  ;
+
+  inherit (p4est-sc) makeFlags dontDisableStatic enableParallelBuilding doCheck;
+
+  meta = {
+    branch = "prev3-develop";
+    description = "Parallel AMR on Forests of Octrees";
+    longDescription = ''
+      The p4est software library provides algorithms for parallel AMR.
+      AMR refers to Adaptive Mesh Refinement, a technique in scientific
+      computing to cover the domain of a simulation with an adaptive mesh.
+    '';
+    homepage = "https://www.p4est.org/";
+    downloadPage = "https://github.com/cburstedde/p4est.git";
+    license = lib.licenses.gpl2Plus;
+    maintainers = [ lib.maintainers.cburstedde ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/p4est/p4est-metis.patch b/nixpkgs/pkgs/development/libraries/science/math/p4est/p4est-metis.patch
new file mode 100644
index 000000000000..46b8dc8af08c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/p4est/p4est-metis.patch
@@ -0,0 +1,26 @@
+diff --git a/src/p4est_connectivity.c b/src/p4est_connectivity.c
+index 95339136..c93528f2 100644
+--- a/src/p4est_connectivity.c
++++ b/src/p4est_connectivity.c
+@@ -3715,6 +3715,7 @@ p4est_connectivity_reorder_newid (sc_MPI_Comm comm, int k,
+                                   sc_array_t * newid)
+ {
+   const int           n = (int) conn->num_trees;
++  int                 metis_n;
+   int                *xadj;
+   int                *adjncy;
+   int                *part;
+@@ -3862,10 +3863,12 @@ p4est_connectivity_reorder_newid (sc_MPI_Comm comm, int k,
+ 
+     P4EST_GLOBAL_INFO ("Entering metis\n");
+     /* now call metis */
++    metis_n = n;
+     P4EST_EXECUTE_ASSERT_INT
+-      (METIS_PartGraphRecursive (&n, &ncon, xadj, adjncy, NULL, NULL,
++      (METIS_PartGraphRecursive (&metis_n, &ncon, xadj, adjncy, NULL, NULL,
+                                  NULL, &k, NULL, NULL, NULL, &volume, part),
+        METIS_OK);
++    P4EST_ASSERT (metis_n == n);
+     P4EST_GLOBAL_INFO ("Done metis\n");
+ 
+     P4EST_GLOBAL_STATISTICSF ("metis volume %d\n", volume);
diff --git a/nixpkgs/pkgs/development/libraries/science/math/parmetis/default.nix b/nixpkgs/pkgs/development/libraries/science/math/parmetis/default.nix
new file mode 100644
index 000000000000..db70bf8dd7a4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/parmetis/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv
+, fetchurl
+, cmake
+, mpi
+}:
+
+stdenv.mkDerivation rec {
+  pname = "parmetis";
+  version = "4.0.3";
+
+  src = fetchurl {
+    url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/parmetis-${version}.tar.gz";
+    sha256 = "0pvfpvb36djvqlcc3lq7si0c5xpb2cqndjg8wvzg35ygnwqs5ngj";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ mpi ];
+
+  # metis and GKlib are packaged with distribution
+  # AUR https://aur.archlinux.org/packages/parmetis/ has reported that
+  # it easier to build with the included packages as opposed to using the metis
+  # package. Compilation time is short.
+  configurePhase = ''
+    make config metis_path=$PWD/metis gklib_path=$PWD/metis/GKlib prefix=$out
+  '';
+
+  meta = with lib; {
+    description = "An MPI-based parallel library that implements a variety of algorithms for partitioning unstructured graphs, meshes, and for computing fill-reducing orderings of sparse matrices";
+    homepage = "http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview";
+    platforms = platforms.all;
+    license = licenses.unfree;
+    maintainers = [ maintainers.costrouc ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/petsc/default.nix b/nixpkgs/pkgs/development/libraries/science/math/petsc/default.nix
new file mode 100644
index 000000000000..c07250c660a3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/petsc/default.nix
@@ -0,0 +1,96 @@
+{ lib
+, stdenv
+, fetchurl
+, darwin
+, gfortran
+, python3
+, blas
+, lapack
+, mpiSupport ? true
+, mpi                   # generic mpi dependency
+, openssh               # required for openmpi tests
+, petsc-withp4est ? false
+, p4est
+, zlib                  # propagated by p4est but required by petsc
+, petsc-optimized ? false
+, petsc-scalar-type ? "real"
+, petsc-precision ? "double"
+}:
+
+# This version of PETSc does not support a non-MPI p4est build
+assert petsc-withp4est -> p4est.mpiSupport;
+
+stdenv.mkDerivation rec {
+  pname = "petsc";
+  version = "3.19.4";
+
+  src = fetchurl {
+    url = "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-${version}.tar.gz";
+    sha256 = "sha256-fJQbcb5Sw7dkIU5JLfYBCdEvl/fYVMl6RN8MTZWLOQY=";
+  };
+
+  inherit mpiSupport;
+  withp4est = petsc-withp4est;
+
+  strictDeps = true;
+  nativeBuildInputs = [ python3 gfortran ]
+    ++ lib.optional mpiSupport mpi
+    ++ lib.optional (mpiSupport && mpi.pname == "openmpi") openssh
+  ;
+  buildInputs = [ blas lapack ]
+    ++ lib.optional withp4est p4est
+  ;
+
+  prePatch = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace config/install.py \
+      --replace /usr/bin/install_name_tool ${darwin.cctools}/bin/install_name_tool
+  '';
+
+  # Both OpenMPI and MPICH get confused by the sandbox environment and spew errors like this (both to stdout and stderr):
+  #     [hwloc/linux] failed to find sysfs cpu topology directory, aborting linux discovery.
+  #     [1684747490.391106] [localhost:14258:0]       tcp_iface.c:837  UCX  ERROR opendir(/sys/class/net) failed: No such file or directory
+  # These messages contaminate test output, which makes the quicktest suite to fail. The patch adds filtering for these messages.
+  patches = [ ./filter_mpi_warnings.patch ];
+
+  preConfigure = ''
+    patchShebangs ./lib/petsc/bin
+    configureFlagsArray=(
+      $configureFlagsArray
+      ${if !mpiSupport then ''
+        "--with-mpi=0"
+      '' else ''
+        "--CC=mpicc"
+        "--with-cxx=mpicxx"
+        "--with-fc=mpif90"
+        "--with-mpi=1"
+      ''}
+      ${lib.optionalString withp4est ''
+        "--with-p4est=1"
+        "--with-zlib-include=${zlib.dev}/include"
+        "--with-zlib-lib=-L${zlib}/lib -lz"
+      ''}
+      "--with-blas=1"
+      "--with-lapack=1"
+      "--with-scalar-type=${petsc-scalar-type}"
+      "--with-precision=${petsc-precision}"
+      ${lib.optionalString petsc-optimized ''
+        "--with-debugging=0"
+        COPTFLAGS='-g -O3'
+        FOPTFLAGS='-g -O3'
+        CXXOPTFLAGS='-g -O3'
+      ''}
+    )
+  '';
+
+  configureScript = "python ./configure";
+
+  enableParallelBuilding = true;
+  doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
+
+  meta = with lib; {
+    description = "Portable Extensible Toolkit for Scientific computation";
+    homepage = "https://www.mcs.anl.gov/petsc/index.html";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ cburstedde ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/petsc/filter_mpi_warnings.patch b/nixpkgs/pkgs/development/libraries/science/math/petsc/filter_mpi_warnings.patch
new file mode 100644
index 000000000000..6a3c7bee051e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/petsc/filter_mpi_warnings.patch
@@ -0,0 +1,100 @@
+diff --git a/src/snes/tutorials/makefile b/src/snes/tutorials/makefile
+index 168febb34b6..71068469066 100644
+--- a/src/snes/tutorials/makefile
++++ b/src/snes/tutorials/makefile
+@@ -13,6 +13,7 @@ include ${PETSC_DIR}/lib/petsc/conf/rules
+ #  these tests are used by the makefile in PETSC_DIR for basic tests of the install and should not be removed
+ testex5f: ex5f.PETSc
+ 	-@${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex5f -snes_rtol 1e-4 > ex5f_1.tmp 2>&1; \
++        sed -i '/hwloc\/linux/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex5f_1.tmp; \
+         if (${DIFF} output/ex5f_1.testout ex5f_1.tmp > /dev/null 2>&1) then \
+           echo "Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI process"; \
+         else \
+@@ -25,6 +26,7 @@ testex5f: ex5f.PETSc
+         ${MAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} ex5f.rm;
+ testex19: ex19.PETSc
+ 	-@${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -pc_type mg -ksp_type fgmres  > ex19_1.tmp 2>&1; \
++        sed -i '/hwloc\/linux/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
+         if (${DIFF} output/ex19_1.testout ex19_1.tmp > /dev/null 2>&1) then \
+           echo "C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process"; \
+         else \
+@@ -36,6 +38,7 @@ testex19: ex19.PETSc
+         ${RM} -f ex19_1.tmp;
+ testex19_mpi:
+ 	-@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -pc_type mg -ksp_type fgmres  > ex19_1.tmp 2>&1; \
++        sed -i '/hwloc\/linux/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
+         if (${DIFF} output/ex19_1.testout ex19_1.tmp > /dev/null 2>&1) then \
+           echo "C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI processes"; \
+         else \
+@@ -48,6 +51,7 @@ testex19_mpi:
+ #use unpreconditioned norm because HYPRE device installations use different AMG parameters
+ runex19_hypre:
+ 	-@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -snes_monitor_short -ksp_norm_type unpreconditioned -pc_type hypre > ex19_1.tmp 2>&1; \
++        sed -i '/hwloc\/linux/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
+           if (${DIFF} output/ex19_hypre.out ex19_1.tmp) then \
+             echo "C/C++ example src/snes/tutorials/ex19 run successfully with hypre"; \
+           else  \
+@@ -57,6 +61,7 @@ runex19_hypre:
+           ${RM} -f ex19_1.tmp
+ runex19_hypre_cuda:
+ 	-@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -dm_vec_type cuda -dm_mat_type aijcusparse -da_refine 3 -snes_monitor_short -ksp_norm_type unpreconditioned -pc_type hypre > ex19_1.tmp 2>&1; \
++        sed -i '/hwloc\/linux/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
+ 	   if (${DIFF} output/ex19_hypre.out ex19_1.tmp) then \
+            echo "C/C++ example src/snes/tutorials/ex19 run successfully with hypre/cuda"; \
+            else  \
+@@ -66,6 +71,7 @@ runex19_hypre_cuda:
+ 	   ${RM} -f ex19_1.tmp
+ runex19_hypre_hip:
+ 	-@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -dm_vec_type hip -da_refine 3 -snes_monitor_short -ksp_norm_type unpreconditioned -pc_type hypre > ex19_1.tmp 2>&1; \
++        sed -i '/hwloc\/linux/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
+ 	   if (${DIFF} output/ex19_hypre.out ex19_1.tmp) then \
+            echo "C/C++ example src/snes/tutorials/ex19 run successfully with hypre/hip"; \
+            else \
+@@ -75,6 +81,7 @@ runex19_hypre_hip:
+ 	   ${RM} -f ex19_1.tmp
+ runex19_cuda:
+ 	-@${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex19 -snes_monitor -dm_mat_type seqaijcusparse -dm_vec_type seqcuda -pc_type gamg -pc_gamg_esteig_ksp_max_it 10 -ksp_monitor -mg_levels_ksp_max_it 3  > ex19_1.tmp 2>&1; \
++        sed -i '/hwloc\/linux/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
+ 	   if (${DIFF} output/ex19_cuda_1.out ex19_1.tmp) then \
+            echo "C/C++ example src/snes/tutorials/ex19 run successfully with cuda"; \
+            else  \
+@@ -84,6 +91,7 @@ runex19_cuda:
+ 	   ${RM} -f ex19_1.tmp
+ runex19_ml:
+ 	-@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -snes_monitor_short -pc_type ml > ex19_1.tmp 2>&1; \
++        sed -i '/hwloc\/linux/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
+ 	   if (${DIFF} output/ex19_ml.out ex19_1.tmp) then  \
+            echo "C/C++ example src/snes/tutorials/ex19 run successfully with ml"; \
+            else \
+@@ -93,6 +101,7 @@ runex19_ml:
+            ${RM} -f ex19_1.tmp
+ runex19_fieldsplit_mumps:
+ 	-@${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex19 -pc_type fieldsplit -pc_fieldsplit_block_size 4 -pc_fieldsplit_type SCHUR -pc_fieldsplit_0_fields 0,1,2 -pc_fieldsplit_1_fields 3 -fieldsplit_0_pc_type lu -fieldsplit_1_pc_type lu -snes_monitor_short -ksp_monitor_short  -fieldsplit_0_pc_factor_mat_solver_type mumps -fieldsplit_1_pc_factor_mat_solver_type mumps > ex19_6.tmp 2>&1; \
++        sed -i '/hwloc\/linux/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_6.tmp; \
+ 	   if (${DIFF} output/ex19_fieldsplit_5.out ex19_6.tmp) then  \
+            echo "C/C++ example src/snes/tutorials/ex19 run successfully with mumps"; \
+            else  \
+@@ -102,6 +111,7 @@ runex19_fieldsplit_mumps:
+            ${RM} -f ex19_6.tmp
+ runex19_superlu_dist:
+ 	-@${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex19 -da_grid_x 20 -da_grid_y 20 -pc_type lu -pc_factor_mat_solver_type superlu_dist > ex19.tmp 2>&1; \
++        sed -i '/hwloc\/linux/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19.tmp; \
+ 	   if (${DIFF} output/ex19_superlu.out ex19.tmp) then \
+            echo "C/C++ example src/snes/tutorials/ex19 run successfully with superlu_dist"; \
+            else  \
+@@ -111,6 +121,7 @@ runex19_superlu_dist:
+ 	   ${RM} -f ex19.tmp
+ runex19_suitesparse:
+ 	-@${MPIEXEC} -n 1 ${MPIEXEC_TAIL} ./ex19 -da_refine 3 -snes_monitor_short -pc_type lu -pc_factor_mat_solver_type umfpack > ex19_1.tmp 2>&1; \
++        sed -i '/hwloc\/linux/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex19_1.tmp; \
+ 	   if (${DIFF} output/ex19_suitesparse.out ex19_1.tmp) then \
+            echo "C/C++ example src/snes/tutorials/ex19 run successfully with suitesparse"; \
+            else \
+@@ -120,6 +131,7 @@ runex19_suitesparse:
+ 	   ${RM} -f ex19_1.tmp
+ runex3k_kokkos: ex3k.PETSc
+ 	-@OMP_PROC_BIND=false ${MPIEXEC} -n 2 ${MPIEXEC_TAIL} ./ex3k -view_initial -dm_vec_type kokkos -dm_mat_type aijkokkos -use_gpu_aware_mpi 0 -snes_monitor > ex3k_1.tmp 2>&1 ;\
++        sed -i '/hwloc\/linux/d ; /ERROR opendir(\/sys\/class\/net) failed/d' ex3k_1.tmp; \
+ 	if (${DIFF} output/ex3k_1.out ex3k_1.tmp) then \
+           echo "C/C++ example src/snes/tutorials/ex3k run successfully with kokkos-kernels"; \
+         else \
diff --git a/nixpkgs/pkgs/development/libraries/science/math/planarity/default.nix b/nixpkgs/pkgs/development/libraries/science/math/planarity/default.nix
new file mode 100644
index 000000000000..3b072fecde34
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/planarity/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv
+, fetchFromGitHub
+, autoreconfHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "planarity";
+  version = "3.0.2.0";
+
+  src = fetchFromGitHub {
+    owner = "graph-algorithms";
+    repo = "edge-addition-planarity-suite";
+    rev = "Version_${version}";
+    sha256 = "sha256-cUAh2MXCSmtxFtV6iTHgSRgsq/26DjWwxhWJH1+367A=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/graph-algorithms/edge-addition-planarity-suite";
+    description = "A library for implementing graph algorithms";
+    license = licenses.bsd3;
+    maintainers = teams.sage.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/rankwidth/default.nix b/nixpkgs/pkgs/development/libraries/science/math/rankwidth/default.nix
new file mode 100644
index 000000000000..c00d579702cc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/rankwidth/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv
+, fetchurl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "rankwidth";
+  version = "0.9";
+
+  src = fetchurl {
+    url = "mirror://sageupstream/rw/rw-${version}.tar.gz";
+    sha256 = "sha256-weA1Bv4lzfy0KMBR/Fay0q/7Wwb7o/LOdWYxRmvvtEE=";
+  };
+
+  configureFlags = [
+    "--enable-executable=no" # no igraph dependency
+  ];
+
+  # check phase is empty for now (as of version 0.9)
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Calculates rank-width and rank-decompositions";
+    license = with licenses; [ gpl2Plus ];
+    maintainers = teams.sage.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/rubiks/default.nix b/nixpkgs/pkgs/development/libraries/science/math/rubiks/default.nix
new file mode 100644
index 000000000000..505457edd64f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/rubiks/default.nix
@@ -0,0 +1,81 @@
+{ lib, stdenv
+, fetchurl
+, fetchpatch
+, coreutils
+}:
+
+stdenv.mkDerivation rec {
+  pname = "rubiks";
+  version = "20070912";
+
+  src = fetchurl {
+    url = "mirror://sageupstream/rubiks/rubiks-${version}.tar.bz2";
+    sha256 = "0zdmkb0j1kyspdpsszzb2k3279xij79jkx0dxd9f3ix1yyyg3yfq";
+  };
+
+  preConfigure = ''
+    export INSTALL="${coreutils}/bin/install"
+  '';
+
+  # everything is done in `make install`
+  buildPhase = "true";
+
+  installFlags = [
+    "PREFIX=$(out)"
+  ];
+
+  patches = [
+    # Fix makefiles which use all the variables in all the wrong ways and
+    # hardcode values for some variables.
+    (fetchpatch {
+      url = "https://raw.githubusercontent.com/sagemath/sage/07d6c37d18811e2b377a9689790a7c5e24da16ba/build/pkgs/rubiks/patches/dietz-cu2-Makefile.patch";
+      sha256 = "1ry3w1mk9q4jqd91zlaa1bdiiplld4hpfjaldbhlmzlgrrc99qmq";
+    })
+    (fetchpatch {
+      url = "https://raw.githubusercontent.com/sagemath/sage/07d6c37d18811e2b377a9689790a7c5e24da16ba/build/pkgs/rubiks/patches/dietz-mcube-Makefile.patch";
+      sha256 = "0zsbh6k3kqdg82fv0kzghr1x7pafisv943gmssqscp107bhg77bz";
+    })
+    (fetchpatch {
+      url = "https://raw.githubusercontent.com/sagemath/sage/07d6c37d18811e2b377a9689790a7c5e24da16ba/build/pkgs/rubiks/patches/dietz-solver-Makefile.patch";
+      sha256 = "0vhw70ylnmydgjhwx8jjlb2slccj4pfqn6vzirkyz1wp8apsmfhp";
+    })
+    (fetchpatch {
+      url = "https://raw.githubusercontent.com/sagemath/sage/07d6c37d18811e2b377a9689790a7c5e24da16ba/build/pkgs/rubiks/patches/reid-Makefile.patch";
+      sha256 = "1r311sn012xs135s0d21qwsig2kld7rdcq19nm0zbnklviid57df";
+    })
+  ];
+
+  meta = with lib; {
+    homepage = "https://wiki.sagemath.org/spkg/rubiks";
+    description = "Several programs for working with Rubik's cubes";
+    # The individual websites are no longer available
+    longDescription = ''
+      There are several programs for working with Rubik's cubes, by three
+      different people. Look inside the directories under /src to see
+      specific info and licensing. In summary the three contributers are:
+
+
+      Michael Reid (GPL) http://www.math.ucf.edu/~reid/Rubik/optimal_solver.html
+          optimal - uses many pre-computed tables to find an optimal
+                    solution to the 3x3x3 Rubik's cube
+
+
+      Dik T. Winter (MIT License)
+          cube    - uses Kociemba's algorithm to iteratively find a short
+                    solution to the 3x3x3 Rubik's cube
+          size222 - solves a 2x2x2 Rubik's cube
+
+
+      Eric Dietz (GPL) http://www.wrongway.org/?rubiksource
+          cu2   - A fast, non-optimal 2x2x2 solver
+          cubex - A fast, non-optimal 3x3x3 solver
+          mcube - A fast, non-optimal 4x4x4 solver
+    '';
+    license = with licenses; [
+      gpl2 # Michael Reid's and Eric Dietz software
+      mit # Dik T. Winter's software
+    ];
+    maintainers = teams.sage.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/scalapack/default.nix b/nixpkgs/pkgs/development/libraries/science/math/scalapack/default.nix
new file mode 100644
index 000000000000..85aa5c4a8736
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/scalapack/default.nix
@@ -0,0 +1,75 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake
+, openssh, mpiCheckPhaseHook, mpi, blas, lapack
+} :
+
+assert blas.isILP64 == lapack.isILP64;
+
+stdenv.mkDerivation rec {
+  pname = "scalapack";
+  version = "2.2.1";
+
+  src = fetchFromGitHub {
+    owner = "Reference-ScaLAPACK";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-GNVGWrIWdfyTfbz7c31Vjt9eDlVzCd/aLHoWq2DMyX4=";
+  };
+
+  passthru = { inherit (blas) isILP64; };
+
+  # upstream patch, remove with next release
+  patches = [ (fetchpatch {
+    name = "gcc-10";
+    url = "https://github.com/Reference-ScaLAPACK/scalapack/commit/a0f76fc0c1c16646875b454b7d6f8d9d17726b5a.patch";
+    sha256 = "0civn149ikghakic30bynqg1bal097hr7i12cm4kq3ssrhq073bp";
+  })];
+
+  # Required to activate ILP64.
+  # See https://github.com/Reference-ScaLAPACK/scalapack/pull/19
+  postPatch = lib.optionalString passthru.isILP64 ''
+    sed -i 's/INTSZ = 4/INTSZ = 8/g'   TESTING/EIG/* TESTING/LIN/*
+    sed -i 's/INTGSZ = 4/INTGSZ = 8/g' TESTING/EIG/* TESTING/LIN/*
+
+    # These tests are not adapted to ILP64
+    sed -i '/xssep/d;/xsgsep/d;/xssyevr/d' TESTING/CMakeLists.txt
+  '';
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake ];
+  nativeCheckInputs = [ openssh mpiCheckPhaseHook ];
+  buildInputs = [ blas lapack ];
+  propagatedBuildInputs = [ mpi ];
+  hardeningDisable = lib.optionals (stdenv.isAarch64 && stdenv.isDarwin) [ "stackprotector" ];
+
+  # xslu and xsllt tests seem to time out on x86_64-darwin.
+  # this line is left so those who force installation on x86_64-darwin can still build
+  doCheck = !(stdenv.isx86_64 && stdenv.isDarwin);
+
+  preConfigure = ''
+    cmakeFlagsArray+=(
+      -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF
+      -DLAPACK_LIBRARIES="-llapack"
+      -DBLAS_LIBRARIES="-lblas"
+      -DCMAKE_Fortran_COMPILER=${lib.getDev mpi}/bin/mpif90
+      ${lib.optionalString passthru.isILP64 ''
+        -DCMAKE_Fortran_FLAGS="-fdefault-integer-8"
+        -DCMAKE_C_FLAGS="-DInt=long"
+      ''}
+      )
+  '';
+
+  # Increase individual test timeout from 1500s to 10000s because hydra's builds
+  # sometimes fail due to this
+  checkFlagsArray = [ "ARGS=--timeout 10000" ];
+
+  meta = with lib; {
+    homepage = "http://www.netlib.org/scalapack/";
+    description = "Library of high-performance linear algebra routines for parallel distributed memory machines";
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ costrouc markuskowa gdinh ];
+    # xslu and xsllt tests fail on x86 darwin
+    broken = stdenv.isDarwin && stdenv.isx86_64;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/scs/default.nix b/nixpkgs/pkgs/development/libraries/science/math/scs/default.nix
new file mode 100644
index 000000000000..087f4787a53b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/scs/default.nix
@@ -0,0 +1,52 @@
+{ lib, stdenv, fetchFromGitHub, blas, lapack, gfortran, fixDarwinDylibNames }:
+
+assert (!blas.isILP64) && (!lapack.isILP64);
+
+stdenv.mkDerivation rec {
+  pname = "scs";
+  version = "3.2.3";
+
+  src = fetchFromGitHub {
+    owner = "cvxgrp";
+    repo = "scs";
+    rev = version;
+    sha256 = "sha256-0g0r3DNgkPZgag0qtz79Wk3Cre1I2yaabFi3OgUzgfc=";
+  };
+
+  # Actually link and add libgfortran to the rpath
+  postPatch = ''
+    substituteInPlace scs.mk \
+      --replace "#-lgfortran" "-lgfortran" \
+      --replace "gcc" "cc"
+  '';
+
+  nativeBuildInputs = lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+  buildInputs = [ blas lapack gfortran.cc.lib ];
+
+  doCheck = true;
+
+  # Test demo requires passing data and seed; numbers chosen arbitrarily.
+  postCheck = ''
+    ./out/demo_socp_indirect 42 0.42 0.42 42
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/lib
+    cp -r include $out/
+    cp out/*.a out/*.so out/*.dylib $out/lib/
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Splitting Conic Solver";
+    longDescription = ''
+      Numerical optimization package for solving large-scale convex cone problems
+    '';
+    homepage = "https://github.com/cvxgrp/scs";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = [ maintainers.bhipple ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/spooles/allocate.patch b/nixpkgs/pkgs/development/libraries/science/math/spooles/allocate.patch
new file mode 100644
index 000000000000..71f539711e7b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/spooles/allocate.patch
@@ -0,0 +1,38 @@
+From cc153b180829c6b561765cbbb9b621d1142ff1cd Mon Sep 17 00:00:00 2001
+From: annalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com>
+Date: Tue, 28 Nov 2023 13:13:44 +0000
+Subject: [PATCH] use proper format specifier for size_t
+
+---
+ Utilities/MM.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Utilities/MM.h b/Utilities/MM.h
+index 11e86c5..301c3ec 100644
+--- a/Utilities/MM.h
++++ b/Utilities/MM.h
+@@ -33,18 +33,18 @@ if ( (count) > 0 ) { \
+    if ( (ptr = (type *)malloc((unsigned long)((count)*sizeof(type)))) \
+         == NULL ) {\
+       fprintf(stderr, \
+-              "\n ALLOCATE failure : bytes %d, line %d, file %s", \
++              "\n ALLOCATE failure : bytes %zu, line %d, file %s", \
+               (count)*sizeof(type), __LINE__, __FILE__) ; \
+       exit(-1) ; } \
+    else if ( MEMORY_DEBUG > 0 ) { \
+       fprintf(stderr, \
+-              "\n ALLOCATE : address %p, bytes %d, line %d, file %s", \
++              "\n ALLOCATE : address %p, bytes %zu, line %d, file %s", \
+               ptr, (count)*sizeof(type), __LINE__, __FILE__) ; } } \
+ else if ( (count) == 0 ) { \
+    ptr = NULL ; } \
+ else { \
+    fprintf(stderr, \
+-           "\n ALLOCATE error : bytes %d, line %d, file %s", \
++           "\n ALLOCATE error : bytes %zu, line %d, file %s", \
+            (count)*sizeof(type), __LINE__, __FILE__) ; \
+    exit(-1) ; }
+ /*
+-- 
+2.42.0
+
diff --git a/nixpkgs/pkgs/development/libraries/science/math/spooles/default.nix b/nixpkgs/pkgs/development/libraries/science/math/spooles/default.nix
new file mode 100644
index 000000000000..47738008b02d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/spooles/default.nix
@@ -0,0 +1,56 @@
+{ lib, stdenv, fetchurl, perl }:
+
+stdenv.mkDerivation rec {
+  pname = "spooles";
+  version = "2.2";
+
+  src = fetchurl {
+    url = "http://www.netlib.org/linalg/spooles/spooles.${version}.tgz";
+    sha256 = "1pf5z3vvwd8smbpibyabprdvcmax0grzvx2y0liy98c7x6h5jid8";
+  };
+
+  sourceRoot = ".";
+
+  patches = [
+    ./spooles.patch
+    # fix compiler error where NULL is used as a zero parameter
+    ./transform.patch
+    # use proper format specifier for size_t
+    ./allocate.patch
+  ];
+
+  postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
+    substituteInPlace makefile --replace "-Wl,-soname," "-Wl,-install_name,$out/lib/"
+  '';
+
+  buildPhase = ''
+    make lib
+  '';
+
+  installPhase = ''
+    mkdir -p $out/lib $out/include/spooles
+    cp libspooles.a libspooles.so.2.2 $out/lib/
+    ln -s libspooles.so.2.2 $out/lib/libspooles.so.2
+    ln -s libspooles.so.2 $out/lib/libspooles.so
+    for h in *.h; do
+      if [ $h != 'MPI.h' ]; then
+         cp $h $out/include/spooles
+         d=`basename $h .h`
+         if [ -d $d ]; then
+            mkdir $out/include/spooles/$d
+            cp $d/*.h $out/include/spooles/$d
+         fi
+      fi
+    done
+  '';
+
+  nativeBuildInputs = [ perl ];
+
+  meta = with lib; {
+    homepage = "http://www.netlib.org/linalg/spooles/";
+    description = "Library for solving sparse real and complex linear systems of equations";
+    license = licenses.publicDomain;
+    maintainers = with maintainers; [ gebner ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/spooles/spooles.patch b/nixpkgs/pkgs/development/libraries/science/math/spooles/spooles.patch
new file mode 100644
index 000000000000..71fb4a7f44e1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/spooles/spooles.patch
@@ -0,0 +1,188 @@
+diff --git a/I2Ohash/src/util.c b/I2Ohash/src/util.c
+index 72d082e..f32f667 100644
+--- a/I2Ohash/src/util.c
++++ b/I2Ohash/src/util.c
+@@ -39,9 +39,10 @@ fflush(stdout) ;
+ */
+ loc1 = (key1 + 1) % hashtable->nlist ;
+ loc2 = (key2 + 1) % hashtable->nlist ;
+-loc  = (loc1*loc2) % hashtable->nlist ;
++long int loc3  = (long int)loc1*(long int)loc2 % hashtable->nlist ;
++loc =(int) loc3;
+ #if MYDEBUG > 0
+-fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %d", loc1, loc2, loc) ;
++fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %ld, loc = %d", loc1, loc2, loc3, loc) ;
+ fflush(stdout) ;
+ #endif
+ /*
+@@ -158,9 +159,10 @@ fflush(stdout) ;
+ #endif
+ loc1 = (key1 + 1) % hashtable->nlist ;
+ loc2 = (key2 + 1) % hashtable->nlist ;
+-loc  = (loc1*loc2) % hashtable->nlist ;
++long int loc3  = (long int)loc1*(long int)loc2 % hashtable->nlist ;
++loc =(int) loc3;
+ #if MYDEBUG > 0
+-fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %d", loc1, loc2, loc) ;
++fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %ld, loc = %d", loc1, loc2, loc3, loc) ;
+ fflush(stdout) ;
+ #endif
+ /*
+diff --git a/MPI/makefile b/MPI/makefile
+index 0c09f86..d25e70a 100644
+--- a/MPI/makefile
++++ b/MPI/makefile
+@@ -2,7 +2,7 @@ all_drivers :
+ 	cd drivers ; make drivers
+ 
+ lib :
+-	cd src ; make spoolesMPI.a
++	cd src ; make makeLib
+ 
+ clean :
+ 	cd src ; make clean
+diff --git a/MPI/src/makefile b/MPI/src/makefile
+index f7650b7..71e4c49 100644
+--- a/MPI/src/makefile
++++ b/MPI/src/makefile
+@@ -42,3 +42,8 @@ $(OBJ).a : \
+ 
+ clean :
+ 	- rm -f *.a *.o
++
++makeLib :
++	perl ../../makeLib > makeG
++	make -f makeG
++	rm -f makeG
+diff --git a/MT/makefile b/MT/makefile
+index 9b86a32..d25e70a 100644
+--- a/MT/makefile
++++ b/MT/makefile
+@@ -2,7 +2,7 @@ all_drivers :
+ 	cd drivers ; make drivers
+ 
+ lib :
+-	cd src ; make spoolesMT.a
++	cd src ; make makeLib
+ 
+ clean :
+ 	cd src ; make clean
+diff --git a/Make.inc b/Make.inc
+index f99eb8f..2de8a25 100644
+--- a/Make.inc
++++ b/Make.inc
+@@ -12,7 +12,7 @@
+ # for solaris
+ #
+ # CC = gcc
+-  CC = /usr/lang-4.0/bin/cc
++#  CC = /usr/lang-4.0/bin/cc
+ #
+ # for sgi
+ #
+@@ -28,7 +28,7 @@
+ # 
+ # OPTLEVEL = 
+ # OPTLEVEL = -g -v
+-  OPTLEVEL = -O
++  OPTLEVEL = -O3
+ # OPTLEVEL = -xO5 -v
+ # OPTLEVEL = -O3
+ # OPTLEVEL = -O4
+@@ -43,7 +43,7 @@
+ #  set any load flags
+ #
+ #  LDFLAGS = -Wl,+parallel -Wl,+tm,spp2000 # for hp exemplar
+-   LDFLAGS =
++#   LDFLAGS =
+ #
+ #---------------------------------------------------------------------
+ #
+@@ -103,7 +103,7 @@
+ #  MPI install library
+ #
+ # MPI_INSTALL_DIR = 
+-  MPI_INSTALL_DIR = /usr/local/mpich-1.0.13
++#  MPI_INSTALL_DIR = /usr/lib/openmpi
+ #
+ #---------------------------------------------------------------------
+ #
+@@ -142,6 +142,6 @@
+ #  MPI include path
+ #
+ # MPI_INCLUDE_DIR = 
+-  MPI_INCLUDE_DIR = -I$(MPI_INSTALL_DIR)/include
++#  MPI_INCLUDE_DIR = -I/usr/include/mpi
+ #
+ #---------------------------------------------------------------------
+diff --git a/Utilities/src/iohb.c b/Utilities/src/iohb.c
+index ac38f7b..ac34034 100644
+--- a/Utilities/src/iohb.c
++++ b/Utilities/src/iohb.c
+@@ -1725,7 +1725,7 @@ static void upcase(char* S)
+ 
+ static void IOHBTerminate(char* message) 
+ {
+-   fprintf(stderr,message);
++   fputs(message, stderr);
+    exit(1);
+ }
+ 
+diff --git a/makeLib b/makeLib
+index 1780f39..7697b06 100755
+--- a/makeLib
++++ b/makeLib
+@@ -64,14 +64,19 @@ foreach $src ( @srcnames ) {
+    $srcname = " \\\n     " . $src ;
+    print $srcname ;
+ }
++print "\n\n.SUFFIXES: .c .o .lo .a .so" ;
+ print "\n\nOBJ_FILES = \$\{SRC:.c=.o\}" ;
++print "\n\nLOBJ_FILES = \$\{SRC:.c=.lo\}" ;
+ print "\n\n" ;
+ print <<'EOF' ;
+ .c.o :
+-	$(PURIFY) $(CC) -c $(CFLAGS) $*.c -o $(OBJ)_$*.o
++	$(PURIFY) $(CC) -c $(CFLAGS) $*.c -o $(OBJ)_$*.o $(MPI_INCLUDE_DIR)
+ 
+-../../spooles.a : ${OBJ_FILES}
+-	$(AR) $(ARFLAGS) ../../spooles.a $(OBJ)_*.o
++.c.lo :
++	$(PURIFY) $(CC) -c $(CFLAGS) $*.c -fPIC -DPIC -o $(OBJ)_$*.lo $(MPI_INCLUDE_DIR)
++
++../../libspooles.a : ${OBJ_FILES} ${LOBJ_FILES}
++	$(AR) $(ARFLAGS) ../../libspooles.a $(OBJ)_*.o
+ 	rm -f $(OBJ)_*.o
+-	$(RANLIB) ../../spooles.a
++	$(RANLIB) ../../libspooles.a
+ EOF
+diff --git a/makefile b/makefile
+index f014c7d..7c8042a 100755
+--- a/makefile
++++ b/makefile
+@@ -124,7 +124,9 @@ lib :
+ 	cd ZV               ; make lib
+ 	cd misc             ; make lib
+ #cd MPI              ; make lib
+-#cd MT               ; make lib
++	cd MT               ; make lib
++	$(CC) -shared */*/*.lo -Wl,-soname,libspooles.so.2.2 -o libspooles.so.2.2 -lpthread -lm
++	ln -s libspooles.so.2.2 libspooles.so
+ 
+ global :
+ 	cd A2/src             ; make -f makeGlobalLib
+diff --git a/timings.h b/timings.h
+index 23df189..685800b 100644
+--- a/timings.h
++++ b/timings.h
+@@ -2,9 +2,8 @@
+ #define _TIMINGS_
+ #include <sys/time.h>
+ static struct timeval  TV ;
+-static struct timezone TZ ;
+ #define MARKTIME(t) \
+-   gettimeofday(&TV, &TZ) ; \
++   gettimeofday(&TV, NULL) ; \
+    t = (TV.tv_sec + 0.000001*TV.tv_usec)
+ #endif
+ 
diff --git a/nixpkgs/pkgs/development/libraries/science/math/spooles/transform.patch b/nixpkgs/pkgs/development/libraries/science/math/spooles/transform.patch
new file mode 100644
index 000000000000..3be3babe9d65
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/spooles/transform.patch
@@ -0,0 +1,43 @@
+From c5d0574182d76af3bf286dce0bb147ae3f098916 Mon Sep 17 00:00:00 2001
+From: annalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com>
+Date: Tue, 28 Nov 2023 12:57:18 +0000
+Subject: [PATCH] fix compiler error: use zero, not NULL, in calls to IVinit
+
+---
+ ETree/src/transform.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/ETree/src/transform.c b/ETree/src/transform.c
+index 1e36981..dbdfc70 100644
+--- a/ETree/src/transform.c
++++ b/ETree/src/transform.c
+@@ -291,7 +291,7 @@ etree2 = ETree_compress(etree, mapIV) ;
+    remap the nzeros[] vector
+    -------------------------
+ */
+-temp = IVinit(nfront, NULL) ;
++temp = IVinit(nfront, 0) ;
+ IVcopy(nfront, temp, nzeros) ;
+ IV_setSize(nzerosIV, nnew) ;
+ nzeros = IV_entries(nzerosIV) ;
+@@ -453,7 +453,7 @@ etree2 = ETree_compress(etree, mapIV) ;
+    remap the nzeros[] vector
+    -------------------------
+ */
+-temp = IVinit(nfront, NULL) ;
++temp = IVinit(nfront, 0) ;
+ IVcopy(nfront, temp, nzeros) ;
+ IV_setSize(nzerosIV, nnew) ;
+ nzeros = IV_entries(nzerosIV) ;
+@@ -614,7 +614,7 @@ etree2 = ETree_compress(etree, mapIV) ;
+    remap the nzeros[] vector
+    -------------------------
+ */
+-temp = IVinit(nfront, NULL) ;
++temp = IVinit(nfront, 0) ;
+ IVcopy(nfront, temp, nzeros) ;
+ IV_setSize(nzerosIV, nnew) ;
+ nzeros = IV_entries(nzerosIV) ;
+-- 
+2.42.0
+
diff --git a/nixpkgs/pkgs/development/libraries/science/math/suitesparse-graphblas/default.nix b/nixpkgs/pkgs/development/libraries/science/math/suitesparse-graphblas/default.nix
new file mode 100644
index 000000000000..648e05376529
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/suitesparse-graphblas/default.nix
@@ -0,0 +1,37 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, gnum4
+}:
+
+stdenv.mkDerivation rec {
+  pname = "suitesparse-graphblas";
+  version = "9.0.1";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "DrTimothyAldenDavis";
+    repo = "GraphBLAS";
+    rev = "v${version}";
+    hash = "sha256-eNd6jlpW3KiRvOCKvNP5ttpgjPPXt2M2vLhk1Zn4gTE=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    gnum4
+  ];
+
+  preConfigure = ''
+    export HOME=$(mktemp -d)
+  '';
+
+  meta = with lib; {
+    description = "Graph algorithms in the language of linear algebra";
+    homepage = "https://people.engr.tamu.edu/davis/GraphBLAS.html";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ wegank ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/suitesparse/4.2.nix b/nixpkgs/pkgs/development/libraries/science/math/suitesparse/4.2.nix
new file mode 100644
index 000000000000..b8ce3eca888c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/suitesparse/4.2.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchurl, gfortran, blas, lapack }:
+
+let
+  int_t = if blas.isILP64 then "int64_t" else "int32_t";
+in
+stdenv.mkDerivation rec {
+  version = "4.2.1";
+  pname = "suitesparse";
+  src = fetchurl {
+    url = "http://www.cise.ufl.edu/research/sparse/SuiteSparse/SuiteSparse-${version}.tar.gz" ;
+    sha256 = "1ga69637x7kdkiy3w3lq9dvva7220bdangv2lch2wx1hpi83h0p8";
+  };
+
+  nativeBuildInputs = [ gfortran ];
+  buildInputs = [ blas lapack ];
+
+  preConfigure = ''
+    mkdir -p $out/lib
+    mkdir -p $out/include
+
+    sed -i "SuiteSparse_config/SuiteSparse_config.mk" \
+        -e 's/METIS .*$/METIS =/' \
+        -e 's/METIS_PATH .*$/METIS_PATH =/' \
+        -e '/CHOLMOD_CONFIG/ s/$/-DNPARTITION -DLONGBLAS=${int_t}/' \
+        -e '/UMFPACK_CONFIG/ s/$/-DLONGBLAS=${int_t}/'
+  '';
+
+  makeFlags = [
+    "PREFIX=\"$(out)\""
+    "INSTALL_LIB=$(out)/lib"
+    "INSTALL_INCLUDE=$(out)/include"
+    "BLAS=-lblas"
+    "LAPACK=-llapack"
+  ];
+
+  meta = with lib; {
+    homepage = "http://faculty.cse.tamu.edu/davis/suitesparse.html";
+    description = "A suite of sparse matrix algorithms";
+    license = with licenses; [ bsd2 gpl2Plus lgpl21Plus ];
+    maintainers = with maintainers; [ ttuegel ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/suitesparse/4.4.nix b/nixpkgs/pkgs/development/libraries/science/math/suitesparse/4.4.nix
new file mode 100644
index 000000000000..cbc24b154656
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/suitesparse/4.4.nix
@@ -0,0 +1,99 @@
+{ lib, stdenv, fetchurl, gfortran, blas, lapack
+, config
+, enableCuda ? config.cudaSupport, cudatoolkit
+}:
+
+let
+  int_t = if blas.isILP64 then "int64_t" else "int32_t";
+  SHLIB_EXT = stdenv.hostPlatform.extensions.sharedLibrary;
+in
+stdenv.mkDerivation rec {
+  version = "4.4.4";
+  pname = "suitesparse";
+
+  src = fetchurl {
+    url = "http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-${version}.tar.gz";
+    sha256 = "1zdn1y0ij6amj7smmcslkqgbqv9yy5cwmbyzqc9v6drzdzllgbpj";
+  };
+
+  preConfigure = ''
+    mkdir -p $out/lib
+    mkdir -p $out/include
+
+    sed -i "SuiteSparse_config/SuiteSparse_config.mk" \
+        -e 's/METIS .*$/METIS =/' \
+        -e 's/METIS_PATH .*$/METIS_PATH =/' \
+        -e '/CHOLMOD_CONFIG/ s/$/-DNPARTITION -DLONGBLAS=${int_t}/' \
+        -e '/UMFPACK_CONFIG/ s/$/-DLONGBLAS=${int_t}/'
+  ''
+  + lib.optionalString stdenv.isDarwin ''
+    sed -i "SuiteSparse_config/SuiteSparse_config.mk" \
+        -e 's/^[[:space:]]*\(LIB = -lm\) -lrt/\1/'
+  ''
+  + lib.optionalString enableCuda ''
+    sed -i "SuiteSparse_config/SuiteSparse_config.mk" \
+        -e 's|^[[:space:]]*\(CUDA_ROOT     =\)|CUDA_ROOT = ${cudatoolkit}|' \
+        -e 's|^[[:space:]]*\(GPU_BLAS_PATH =\)|GPU_BLAS_PATH = $(CUDA_ROOT)|' \
+        -e 's|^[[:space:]]*\(GPU_CONFIG    =\)|GPU_CONFIG = -I$(CUDA_ROOT)/include -DGPU_BLAS -DCHOLMOD_OMP_NUM_THREADS=$(NIX_BUILD_CORES) |' \
+        -e 's|^[[:space:]]*\(CUDA_PATH     =\)|CUDA_PATH = $(CUDA_ROOT)|' \
+        -e 's|^[[:space:]]*\(CUDART_LIB    =\)|CUDART_LIB = $(CUDA_ROOT)/lib64/libcudart.so|' \
+        -e 's|^[[:space:]]*\(CUBLAS_LIB    =\)|CUBLAS_LIB = $(CUDA_ROOT)/lib64/libcublas.so|' \
+        -e 's|^[[:space:]]*\(CUDA_INC_PATH =\)|CUDA_INC_PATH = $(CUDA_ROOT)/include/|' \
+        -e 's|^[[:space:]]*\(NV20          =\)|NV20 = -arch=sm_20 -Xcompiler -fPIC|' \
+        -e 's|^[[:space:]]*\(NV30          =\)|NV30 = -arch=sm_30 -Xcompiler -fPIC|' \
+        -e 's|^[[:space:]]*\(NV35          =\)|NV35 = -arch=sm_35 -Xcompiler -fPIC|' \
+        -e 's|^[[:space:]]*\(NVCC          =\) echo|NVCC = $(CUDA_ROOT)/bin/nvcc|' \
+        -e 's|^[[:space:]]*\(NVCCFLAGS     =\)|NVCCFLAGS = $(NV20) -O3 -gencode=arch=compute_20,code=sm_20 -gencode=arch=compute_30,code=sm_30 -gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_60,code=sm_60|'
+  '';
+
+  makeFlags = [
+    "PREFIX=\"$(out)\""
+    "INSTALL_LIB=$(out)/lib"
+    "INSTALL_INCLUDE=$(out)/include"
+    "BLAS=-lblas"
+    "LAPACK=-llapack"
+  ];
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin " -DNTIMER";
+
+  postInstall = ''
+    # Build and install shared library
+    (
+        cd "$(mktemp -d)"
+        for i in "$out"/lib/lib*.a; do
+          ar -x $i
+        done
+        ${if enableCuda then cudatoolkit else stdenv.cc.outPath}/bin/${if enableCuda then "nvcc" else "cc"} *.o ${if stdenv.isDarwin then "-dynamiclib" else "--shared"} -o "$out/lib/libsuitesparse${SHLIB_EXT}" -lblas ${lib.optionalString enableCuda "-lcublas"}
+    )
+    for i in umfpack cholmod amd camd colamd spqr; do
+      ln -s libsuitesparse${SHLIB_EXT} "$out"/lib/lib$i${SHLIB_EXT}
+    done
+
+    # Install documentation
+    outdoc=$out/share/doc/suitesparse-${version}
+    mkdir -p $outdoc
+    cp -r AMD/Doc $outdoc/amd
+    cp -r BTF/Doc $outdoc/bft
+    cp -r CAMD/Doc $outdoc/camd
+    cp -r CCOLAMD/Doc $outdoc/ccolamd
+    cp -r CHOLMOD/Doc $outdoc/cholmod
+    cp -r COLAMD/Doc $outdoc/colamd
+    cp -r CXSparse/Doc $outdoc/cxsparse
+    cp -r KLU/Doc $outdoc/klu
+    cp -r LDL/Doc $outdoc/ldl
+    cp -r RBio/Doc $outdoc/rbio
+    cp -r SPQR/Doc $outdoc/spqr
+    cp -r UMFPACK/Doc $outdoc/umfpack
+  '';
+
+  nativeBuildInputs = [ gfortran ];
+  buildInputs = [ blas lapack ];
+
+  meta = with lib; {
+    homepage = "http://faculty.cse.tamu.edu/davis/suitesparse.html";
+    description = "A suite of sparse matrix algorithms";
+    license = with licenses; [ bsd2 gpl2Plus lgpl21Plus ];
+    maintainers = with maintainers; [ ttuegel ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/suitesparse/default.nix b/nixpkgs/pkgs/development/libraries/science/math/suitesparse/default.nix
new file mode 100644
index 000000000000..9561cf2ed779
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/suitesparse/default.nix
@@ -0,0 +1,94 @@
+{ lib, stdenv
+, fetchFromGitHub
+, gfortran
+, blas, lapack
+, metis
+, fixDarwinDylibNames
+, gmp
+, mpfr
+, config
+, enableCuda ? config.cudaSupport
+, cudaPackages
+, openmp ? null
+}:
+
+stdenv.mkDerivation rec {
+  pname = "suitesparse";
+  version = "5.13.0";
+
+  outputs = [ "out" "dev" "doc" ];
+
+  src = fetchFromGitHub {
+    owner = "DrTimothyAldenDavis";
+    repo = "SuiteSparse";
+    rev = "v${version}";
+    sha256 = "sha256-Anen1YtXsSPhk8DpA4JtADIz9m8oXFl9umlkb4iImf8=";
+  };
+
+  nativeBuildInputs = [
+  ] ++ lib.optionals stdenv.isDarwin [
+    fixDarwinDylibNames
+  ] ++ lib.optionals enableCuda [
+    cudaPackages.cuda_nvcc
+  ];
+
+  # Use compatible indexing for lapack and blas used
+  buildInputs = assert (blas.isILP64 == lapack.isILP64); [
+    blas lapack
+    metis
+    gfortran.cc.lib
+    gmp
+    mpfr
+  ] ++ lib.optionals stdenv.cc.isClang [
+    openmp
+  ] ++ lib.optionals enableCuda [
+    cudaPackages.cuda_cudart.dev
+    cudaPackages.cuda_cudart.lib
+    cudaPackages.cuda_cccl.dev
+    cudaPackages.libcublas.dev
+    cudaPackages.libcublas.lib
+  ];
+
+  preConfigure = ''
+    # Mongoose and GraphBLAS are packaged separately
+    sed -i "Makefile" -e '/GraphBLAS\|Mongoose/d'
+  '';
+
+  makeFlags = [
+    "INSTALL=${placeholder "out"}"
+    "INSTALL_INCLUDE=${placeholder "dev"}/include"
+    "JOBS=$(NIX_BUILD_CORES)"
+    "MY_METIS_LIB=-lmetis"
+  ] ++ lib.optionals blas.isILP64 [
+    "CFLAGS=-DBLAS64"
+  ] ++ lib.optionals enableCuda [
+    "CUDA_PATH=${cudaPackages.cuda_nvcc}"
+    "CUDART_LIB=${cudaPackages.cuda_cudart.lib}/lib/libcudart.so"
+    "CUBLAS_LIB=${cudaPackages.libcublas.lib}/lib/libcublas.so"
+  ] ++ lib.optionals stdenv.isDarwin [
+    # Unless these are set, the build will attempt to use `Accelerate` on darwin, see:
+    # https://github.com/DrTimothyAldenDavis/SuiteSparse/blob/v5.13.0/SuiteSparse_config/SuiteSparse_config.mk#L368
+    "BLAS=-lblas"
+    "LAPACK=-llapack"
+  ]
+  ;
+
+  env = lib.optionalAttrs stdenv.isDarwin {
+    # Ensure that there is enough space for the `fixDarwinDylibNames` hook to
+    # update the install names of the output dylibs.
+    NIX_LDFLAGS = "-headerpad_max_install_names";
+  };
+
+  buildFlags = [
+    # Build individual shared libraries, not demos
+    "library"
+  ];
+
+  meta = with lib; {
+    homepage = "http://faculty.cse.tamu.edu/davis/suitesparse.html";
+    description = "A suite of sparse matrix algorithms";
+    license = with licenses; [ bsd2 gpl2Plus lgpl21Plus ];
+    maintainers = with maintainers; [ ttuegel ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/superlu/add-superlu-lib-as-dependency-for-the-unit-tests.patch b/nixpkgs/pkgs/development/libraries/science/math/superlu/add-superlu-lib-as-dependency-for-the-unit-tests.patch
new file mode 100644
index 000000000000..29d86238af08
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/superlu/add-superlu-lib-as-dependency-for-the-unit-tests.patch
@@ -0,0 +1,7 @@
+--- a/TESTING/MATGEN/CMakeLists.txt
++++ b/TESTING/MATGEN/CMakeLists.txt
+@@ -97,3 +97,4 @@ if(enable_complex16)
+ endif()
+ 
+ add_library(matgen ${sources})
++target_link_libraries(matgen superlu)
diff --git a/nixpkgs/pkgs/development/libraries/science/math/superlu/default.nix b/nixpkgs/pkgs/development/libraries/science/math/superlu/default.nix
new file mode 100644
index 000000000000..f99e86ffe478
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/superlu/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, fetchurl, cmake,
+  gfortran, blas, lapack}:
+
+assert (!blas.isILP64) && (!lapack.isILP64);
+
+stdenv.mkDerivation rec {
+  version = "5.2.1";
+  pname = "superlu";
+
+  src = fetchurl {
+    url = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_${version}.tar.gz";
+    sha256 = "0qzlb7cd608q62kyppd0a8c65l03vrwqql6gsm465rky23b6dyr8";
+  };
+
+  nativeBuildInputs = [ cmake gfortran ];
+
+  propagatedBuildInputs = [ blas ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=true"
+    "-DUSE_XSDK_DEFAULTS=true"
+  ];
+
+  env = lib.optionalAttrs stdenv.cc.isClang {
+    NIX_CFLAGS_COMPILE = toString [
+      "-Wno-error=implicit-function-declaration"
+      "-Wno-error=implicit-int"
+    ];
+  };
+
+  patches = [
+    ./add-superlu-lib-as-dependency-for-the-unit-tests.patch
+  ];
+
+  doCheck = true;
+  checkTarget = "test";
+
+  meta = {
+    homepage = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/";
+    license = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/License.txt";
+    description = "A library for the solution of large, sparse, nonsymmetric systems of linear equations";
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/sympow/clean-extra-logfile-output-from-pari.patch b/nixpkgs/pkgs/development/libraries/science/math/sympow/clean-extra-logfile-output-from-pari.patch
new file mode 100644
index 000000000000..cbcf18b4cdb2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/sympow/clean-extra-logfile-output-from-pari.patch
@@ -0,0 +1,39 @@
+commit 433a8b99da9d71e96434bd421c2468cbda29d37c
+Author: Mauricio Collares <mauricio@collares.org>
+Date:   Tue Mar 2 22:07:11 2021 -0300
+
+    trim logfile information from pari 2.13 output
+    
+    Pari (since commit 609fb01faf827d91dfa9136849a647a3bbfe8036) prints
+    extra logfile information such as
+    
+      [logfile is "/tmp/nix-shell.2BquN9/home/.sympow/datafiles/P02HM.txt"]
+    
+    which messes up sympow's parsing. This commit reuses the same trimming
+    mechanism already in sympow to trim this new message.
+
+diff --git a/Configure b/Configure
+index 1ef9756..776bec2 100755
+--- a/Configure
++++ b/Configure
+@@ -322,7 +322,7 @@ echo "datafiles/param_data: \$(OTHERb)" >> $FILE
+ echo "	\$(MKDIR) -p datafiles" >> $FILE
+ echo "	\$(TOUCH) datafiles/param_data" >> $FILE
+ echo "	\$(SH) armd.sh" >> $FILE
+-echo "	\$(SED) -i -e '/logfile =/d' datafiles/*.txt" >> $FILE
++echo "	\$(SED) -i -e '/logfile /d' datafiles/*.txt" >> $FILE
+ echo "sympow.1: sympow" >> $FILE
+ echo "	\$(HELP2MAN) \$(H2MFLAGS) -s 1 -n \"SYMPOW program\" -I sympow.h2m -o \$@ ./\$<" >> $FILE
+ echo "clean:" >> $FILE
+diff --git a/generate.c b/generate.c
+index dbb811f..783320c 100644
+--- a/generate.c
++++ b/generate.c
+@@ -148,6 +148,7 @@ static void trimit(char *A)
+    " -e '"
+      "/^\?/d"                           ";"
+      "/^(/d"                            ";"
++	   "/logfile /d"                      ";"
+ 	   "/Warning:/d"                      ";"
+ 	   "/^About to find TOO_BIG/d"        ";"
+ 	   "/^Now working backwards/d"        ";"
diff --git a/nixpkgs/pkgs/development/libraries/science/math/sympow/default.nix b/nixpkgs/pkgs/development/libraries/science/math/sympow/default.nix
new file mode 100644
index 000000000000..09ca356ccdc5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/sympow/default.nix
@@ -0,0 +1,84 @@
+{ lib, stdenv
+, fetchFromGitLab
+, fetchpatch
+, makeWrapper
+, which
+, autoconf
+, help2man
+, file
+, pari
+}:
+
+stdenv.mkDerivation rec {
+  version = "2.023.6";
+  pname = "sympow";
+
+  src = fetchFromGitLab {
+    group = "rezozer";
+    owner = "forks";
+    repo = "sympow";
+    rev = "v${version}";
+    sha256 = "132l0xv00ld1svvv9wh99wfra4zzjv2885h2sq0dsl98wiyvi5zl";
+  };
+
+  patches = [
+    ./clean-extra-logfile-output-from-pari.patch
+    (fetchpatch {
+      name = "null-terminate-dupdirname.patch";
+      url = "https://gitlab.com/rezozer/forks/sympow/-/merge_requests/5.diff";
+      sha256 = "sha256-yKjio+qN9teL8L+mb7WOBN/iv545vRIxW20FJU37oO4=";
+    })
+  ];
+
+  postUnpack = ''
+    patchShebangs .
+  '';
+
+  nativeBuildInputs = [
+    makeWrapper
+    which
+    autoconf
+    help2man
+    file
+    pari
+  ];
+
+  configurePhase = ''
+    runHook preConfigure
+    export PREFIX="$out"
+    export VARPREFIX="$out" # see comment on postInstall
+    ./Configure # doesn't take any options
+    runHook postConfigure
+  '';
+
+  # Usually, sympow has 3 levels of caching: statically distributed in /usr/,
+  # shared in /var and per-user in ~/.sympow. The shared cache assumes trust in
+  # other users and a shared /var is not compatible with nix's approach, so we
+  # set VARPREFIX to the read-only $out. This effectively disables shared
+  # caching. See https://trac.sagemath.org/ticket/3360#comment:36 and sympow's
+  # README for more details on caching.
+  # sympow will complain at runtime about the lack of write-permissions on the
+  # shared cache. We pass the `-quiet` flag by default to disable this.
+  postInstall = ''
+    wrapProgram "$out/bin/sympow" --add-flags '-quiet'
+  '';
+
+  # Example from the README as a sanity check.
+  doInstallCheck = true;
+  installCheckPhase = ''
+    export HOME="$TMP/home"
+    mkdir -p "$HOME"
+    "$out/bin/sympow" -sp 2p16 -curve "[1,2,3,4,5]" | grep '8.3705'
+  '';
+
+  meta = with lib; {
+    description = "Compute special values of symmetric power elliptic curve L-functions";
+    license = {
+      shortName = "sympow";
+      fullName = "Custom, BSD-like. See COPYING file.";
+      free = true;
+    };
+    maintainers = teams.sage.members;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/tensorflow-lite/default.nix b/nixpkgs/pkgs/development/libraries/science/math/tensorflow-lite/default.nix
new file mode 100644
index 000000000000..1bee7f46d37c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/tensorflow-lite/default.nix
@@ -0,0 +1,108 @@
+{ stdenv
+, bash
+, buildPackages
+, buildBazelPackage
+, fetchFromGitHub
+, lib
+}:
+let
+  buildPlatform = stdenv.buildPlatform;
+  hostPlatform = stdenv.hostPlatform;
+  pythonEnv = buildPackages.python3.withPackages (ps: [ ps.numpy ]);
+  bazelDepsSha256ByBuildAndHost = {
+    x86_64-linux = {
+      x86_64-linux = "sha256-61qmnAB80syYhURWYJOiOnoGOtNa1pPkxfznrFScPAo=";
+      aarch64-linux = "sha256-sOIYpp98wJRz3RGvPasyNEJ05W29913Lsm+oi/aq/Ag=";
+    };
+    aarch64-linux = {
+      aarch64-linux = "sha256-MJU4y9Dt9xJWKgw7iKW+9Ur856rMIHeFD5u05s+Q7rQ=";
+    };
+  };
+  bazelHostConfigName.aarch64-linux = "elinux_aarch64";
+  bazelDepsSha256ByHost =
+    bazelDepsSha256ByBuildAndHost.${buildPlatform.system} or
+      (throw "unsupported build system ${buildPlatform.system}");
+  bazelDepsSha256 = bazelDepsSha256ByHost.${hostPlatform.system} or
+      (throw "unsupported host system ${hostPlatform.system} with build system ${buildPlatform.system}");
+in
+buildBazelPackage rec {
+  name = "tensorflow-lite";
+  version = "2.13.0";
+
+  src = fetchFromGitHub {
+    owner = "tensorflow";
+    repo = "tensorflow";
+    rev = "v${version}";
+    hash = "sha256-Rq5pAVmxlWBVnph20fkAwbfy+iuBNlfFy14poDPd5h0=";
+  };
+
+  bazel = buildPackages.bazel_5;
+
+  nativeBuildInputs = [ pythonEnv buildPackages.perl ];
+
+  bazelTargets = [
+    "//tensorflow/lite:libtensorflowlite.so"
+    "//tensorflow/lite/c:tensorflowlite_c"
+    "//tensorflow/lite/tools/benchmark:benchmark_model"
+    "//tensorflow/lite/tools/benchmark:benchmark_model_performance_options"
+  ];
+
+  bazelFlags = [
+    "--config=opt"
+  ] ++ lib.optionals (hostPlatform.system != buildPlatform.system) [
+    "--config=${bazelHostConfigName.${hostPlatform.system}}"
+  ];
+
+  bazelBuildFlags = [ "--cxxopt=--std=c++17" ];
+
+  buildAttrs = {
+    installPhase = ''
+      mkdir -p $out/{bin,lib}
+
+      # copy the libs and binaries into the output dir
+      cp ./bazel-bin/tensorflow/lite/c/libtensorflowlite_c.so $out/lib
+      cp ./bazel-bin/tensorflow/lite/libtensorflowlite.so $out/lib
+      cp ./bazel-bin/tensorflow/lite/tools/benchmark/benchmark_model $out/bin
+      cp ./bazel-bin/tensorflow/lite/tools/benchmark/benchmark_model_performance_options $out/bin
+
+      find . -type f -name '*.h' | while read f; do
+        path="$out/include/''${f/.\//}"
+        install -D "$f" "$path"
+
+        # remove executable bit from headers
+        chmod -x "$path"
+      done
+    '';
+  };
+
+  fetchAttrs.sha256 = bazelDepsSha256;
+
+  PYTHON_BIN_PATH = pythonEnv.interpreter;
+
+  dontAddBazelOpts = true;
+  removeRulesCC = false;
+
+  postPatch = ''
+    rm .bazelversion
+
+    # Fix gcc-13 build failure by including missing include headers
+    sed -e '1i #include <cstdint>' -i \
+      tensorflow/lite/kernels/internal/spectrogram.cc
+  '';
+
+  preConfigure = ''
+    patchShebangs configure
+  '';
+
+  # configure script freaks out when parameters are passed
+  dontAddPrefix = true;
+  configurePlatforms = [];
+
+  meta = with lib; {
+    description = "An open source deep learning framework for on-device inference.";
+    homepage = "https://www.tensorflow.org/lite";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ mschwaig cpcloud ];
+    platforms = [ "x86_64-linux" "aarch64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/tensorrt/extension.nix b/nixpkgs/pkgs/development/libraries/science/math/tensorrt/extension.nix
new file mode 100644
index 000000000000..ffd9b672684c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/tensorrt/extension.nix
@@ -0,0 +1,156 @@
+final: prev: let
+
+  inherit (final) callPackage;
+  inherit (prev) cudatoolkit cudaVersion lib pkgs;
+
+  ### TensorRT
+
+  buildTensorRTPackage = args:
+    callPackage ./generic.nix { } args;
+
+  toUnderscore = str: lib.replaceStrings ["."] ["_"] str;
+
+  majorMinorPatch = str: lib.concatStringsSep "." (lib.take 3 (lib.splitVersion str));
+
+  tensorRTPackages = with lib; let
+    # Check whether a file is supported for our cuda version
+    isSupported = fileData: elem cudaVersion fileData.supportedCudaVersions;
+    # Return the first file that is supported. In practice there should only ever be one anyway.
+    supportedFile = files: findFirst isSupported null files;
+
+    # Compute versioned attribute name to be used in this package set
+    computeName = version: "tensorrt_${toUnderscore version}";
+
+    # Supported versions with versions as keys and file as value
+    supportedVersions = lib.recursiveUpdate
+      {
+        tensorrt = {
+          enable = false;
+          fileVersionCuda = null;
+          fileVersionCudnn = null;
+          fullVersion = "0.0.0";
+          sha256 = null;
+          tarball = null;
+          supportedCudaVersions = [ ];
+        };
+      }
+      (mapAttrs' (version: attrs: nameValuePair (computeName version) attrs)
+        (filterAttrs (version: file: file != null) (mapAttrs (version: files: supportedFile files) tensorRTVersions)));
+
+    # Add all supported builds as attributes
+    allBuilds = mapAttrs (name: file: buildTensorRTPackage (removeAttrs file ["fileVersionCuda"])) supportedVersions;
+
+    # Set the default attributes, e.g. tensorrt = tensorrt_8_4;
+    defaultName = computeName tensorRTDefaultVersion;
+    defaultBuild = lib.optionalAttrs (allBuilds ? ${defaultName}) { tensorrt = allBuilds.${computeName tensorRTDefaultVersion}; };
+  in {
+    inherit buildTensorRTPackage;
+  } // allBuilds // defaultBuild;
+
+  tarballURL =
+  {fullVersion, fileVersionCuda, fileVersionCudnn ? null} :
+    "TensorRT-${fullVersion}.Linux.x86_64-gnu.cuda-${fileVersionCuda}"
+    + lib.optionalString (fileVersionCudnn != null) ".cudnn${fileVersionCudnn}"
+    + ".tar.gz";
+
+  tensorRTVersions = {
+    "8.6.1" = [
+      rec {
+        fileVersionCuda = "12.0";
+        fullVersion = "8.6.1.6";
+        sha256 = "sha256-D4FXpfxTKZQ7M4uJNZE3M1CvqQyoEjnNrddYDNHrolQ=";
+        tarball = tarballURL { inherit fileVersionCuda fullVersion; };
+        supportedCudaVersions = [ "12.0" "12.1" ];
+      }
+    ];
+    "8.5.3" = [
+      rec {
+        fileVersionCuda = "11.8";
+        fileVersionCudnn = "8.6";
+        fullVersion = "8.5.3.1";
+        sha256 = "sha256-BNeuOYvPTUAfGxI0DVsNrX6Z/FAB28+SE0ptuGu7YDY=";
+        tarball = tarballURL { inherit fileVersionCuda fileVersionCudnn fullVersion; };
+        supportedCudaVersions = [ "11.0" "11.1" "11.2" "11.3" "11.4" "11.5" "11.6" "11.7" "11.8" ];
+      }
+      rec {
+        fileVersionCuda = "10.2";
+        fileVersionCudnn = "8.6";
+        fullVersion = "8.5.3.1";
+        sha256 = "sha256-WCt6yfOmFbrjqdYCj6AE2+s2uFpISwk6urP+2I0BnGQ=";
+        tarball = tarballURL { inherit fileVersionCuda fileVersionCudnn fullVersion; };
+        supportedCudaVersions = [ "10.2" ];
+      }
+    ];
+    "8.5.2" = [
+      rec {
+        fileVersionCuda = "11.8";
+        fileVersionCudnn = "8.6";
+        fullVersion = "8.5.2.2";
+        sha256 = "sha256-Ov5irNS/JETpEz01FIFNMs9YVmjGHL7lSXmDpgCdgao=";
+        tarball = tarballURL { inherit fileVersionCuda fileVersionCudnn fullVersion; };
+        supportedCudaVersions = [ "11.0" "11.1" "11.2" "11.3" "11.4" "11.5" "11.6" "11.7" "11.8" ];
+      }
+      rec {
+        fileVersionCuda = "10.2";
+        fileVersionCudnn = "8.6";
+        fullVersion = "8.5.2.2";
+        sha256 = "sha256-UruwQShYcHLY5d81lKNG7XaoUsZr245c+PUpUN6pC5E=";
+        tarball = tarballURL { inherit fileVersionCuda fileVersionCudnn fullVersion; };
+        supportedCudaVersions = [ "10.2" ];
+      }
+    ];
+    "8.5.1" = [
+      rec {
+        fileVersionCuda = "11.8";
+        fileVersionCudnn = "8.6";
+        fullVersion = "8.5.1.7";
+        sha256 = "sha256-Ocx/B3BX0TY3lOj/UcTPIaXb7M8RFrACC6Da4PMGMHY=";
+        tarball = tarballURL { inherit fileVersionCuda fileVersionCudnn fullVersion; };
+        supportedCudaVersions = [ "11.0" "11.1" "11.2" "11.3" "11.4" "11.5" "11.6" "11.7" "11.8" ];
+      }
+      rec {
+        fileVersionCuda = "10.2";
+        fileVersionCudnn = "8.6";
+        fullVersion = "8.5.1.7";
+        sha256 = "sha256-CcFGJhw7nFdPnSYYSxcto2MHK3F84nLQlJYjdIw8dPM=";
+        tarball = tarballURL { inherit fileVersionCuda fileVersionCudnn fullVersion; };
+        supportedCudaVersions = [ "10.2" ];
+      }
+    ];
+    "8.4.0" = [
+      rec {
+        fileVersionCuda = "11.6";
+        fileVersionCudnn = "8.3";
+        fullVersion = "8.4.0.6";
+        sha256 = "sha256-DNgHHXF/G4cK2nnOWImrPXAkOcNW6Wy+8j0LRpAH/LQ=";
+        tarball = tarballURL { inherit fileVersionCuda fileVersionCudnn fullVersion; };
+        supportedCudaVersions = [ "11.0" "11.1" "11.2" "11.3" "11.4" "11.5" "11.6" ];
+      }
+      rec {
+        fileVersionCuda = "10.2";
+        fileVersionCudnn = "8.3";
+        fullVersion = "8.4.0.6";
+        sha256 = "sha256-aCzH0ZI6BrJ0v+e5Bnm7b8mNltA7NNuIa8qRKzAQv+I=";
+        tarball = tarballURL { inherit fileVersionCuda fileVersionCudnn fullVersion; };
+        supportedCudaVersions = [ "10.2" ];
+      }
+    ];
+  };
+
+  # Default attributes
+  tensorRTDefaultVersion = {
+    "10.2" = "8.4.0";
+    "11.0" = "8.4.0";
+    "11.1" = "8.4.0";
+    "11.2" = "8.4.0";
+    "11.3" = "8.4.0";
+    "11.4" = "8.4.0";
+    "11.5" = "8.4.0";
+    "11.6" = "8.4.0";
+    "11.7" = "8.5.3";
+    "11.8" = "8.5.3";
+    "12.0" = "8.6.1";
+    "12.1" = "8.6.1";
+  }.${cudaVersion} or "8.4.0";
+
+in tensorRTPackages
diff --git a/nixpkgs/pkgs/development/libraries/science/math/tiny-cuda-nn/default.nix b/nixpkgs/pkgs/development/libraries/science/math/tiny-cuda-nn/default.nix
new file mode 100644
index 000000000000..2036c4c86253
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/tiny-cuda-nn/default.nix
@@ -0,0 +1,163 @@
+{
+  cmake,
+  cudaPackages,
+  fetchFromGitHub,
+  lib,
+  ninja,
+  python3Packages ? {},
+  pythonSupport ? false,
+  stdenv,
+  symlinkJoin,
+  which,
+}: let
+  inherit (lib) lists strings;
+  inherit (cudaPackages) backendStdenv cudaFlags;
+
+  cuda-common-redist = with cudaPackages; [
+    cuda_cudart.dev # cuda_runtime.h
+    cuda_cudart.lib
+    cuda_cccl.dev # <nv/target>
+    libcublas.dev # cublas_v2.h
+    libcublas.lib
+    libcusolver.dev # cusolverDn.h
+    libcusolver.lib
+    libcusparse.dev # cusparse.h
+    libcusparse.lib
+  ];
+
+  cuda-native-redist = symlinkJoin {
+    name = "cuda-redist";
+    paths = with cudaPackages;
+      [cuda_nvcc]
+      ++ cuda-common-redist;
+  };
+
+  cuda-redist = symlinkJoin {
+    name = "cuda-redist";
+    paths = cuda-common-redist;
+  };
+in
+  stdenv.mkDerivation (finalAttrs: {
+    pname = "tiny-cuda-nn";
+    version = "1.6";
+    strictDeps = true;
+
+    format = strings.optionalString pythonSupport "setuptools";
+
+    src = fetchFromGitHub {
+      owner = "NVlabs";
+      repo = finalAttrs.pname;
+      rev = "v${finalAttrs.version}";
+      fetchSubmodules = true;
+      hash = "sha256-qW6Fk2GB71fvZSsfu+mykabSxEKvaikZ/pQQZUycOy0=";
+    };
+
+    nativeBuildInputs =
+      [
+        cmake
+        cuda-native-redist
+        ninja
+        which
+      ]
+      ++ lists.optionals pythonSupport (with python3Packages; [
+        pip
+        setuptools
+        wheel
+      ]);
+
+    buildInputs =
+      [
+        cuda-redist
+      ]
+      ++ lib.optionals pythonSupport (
+        with python3Packages; [
+          pybind11
+          python
+        ]
+      );
+
+    propagatedBuildInputs = lib.optionals pythonSupport (
+      with python3Packages; [
+        torch
+      ]
+    );
+
+    # NOTE: We cannot use pythonImportsCheck for this module because it uses torch to immediately
+    #   initailize CUDA and GPU access is not allowed in the nix build environment.
+    # NOTE: There are no tests for the C++ library or the python bindings, so we just skip the check
+    #   phase -- we're not missing anything.
+    doCheck = false;
+
+    preConfigure = ''
+      export TCNN_CUDA_ARCHITECTURES="${
+        strings.concatStringsSep ";" (lists.map cudaFlags.dropDot cudaFlags.cudaCapabilities)
+      }"
+      export CUDA_HOME="${cuda-native-redist}"
+      export LIBRARY_PATH="${cuda-native-redist}/lib/stubs:$LIBRARY_PATH"
+      export CC="${backendStdenv.cc}/bin/cc"
+      export CXX="${backendStdenv.cc}/bin/c++"
+    '';
+
+    # When building the python bindings, we cannot re-use the artifacts from the C++ build so we
+    # skip the CMake confurePhase and the buildPhase.
+    dontUseCmakeConfigure = pythonSupport;
+
+    # The configurePhase usually puts you in the build directory, so for the python bindings we
+    # need to change directories to the source directory.
+    configurePhase = strings.optionalString pythonSupport ''
+      runHook preConfigure
+      mkdir -p "$NIX_BUILD_TOP/build"
+      cd "$NIX_BUILD_TOP/build"
+      runHook postConfigure
+    '';
+
+    buildPhase = strings.optionalString pythonSupport ''
+      runHook preBuild
+      python -m pip wheel \
+        --no-build-isolation \
+        --no-clean \
+        --no-deps \
+        --no-index \
+        --verbose \
+        --wheel-dir "$NIX_BUILD_TOP/build" \
+        "$NIX_BUILD_TOP/source/bindings/torch"
+      runHook postBuild
+    '';
+
+    installPhase =
+      ''
+        runHook preInstall
+        mkdir -p "$out/lib"
+      ''
+      # Installing the C++ library just requires copying the static library to the output directory
+      + strings.optionalString (!pythonSupport) ''
+        cp libtiny-cuda-nn.a "$out/lib/"
+      ''
+      # Installing the python bindings requires building the wheel and installing it
+      + strings.optionalString pythonSupport ''
+        python -m pip install \
+          --no-build-isolation \
+          --no-cache-dir \
+          --no-deps \
+          --no-index \
+          --no-warn-script-location \
+          --prefix="$out" \
+          --verbose \
+          ./*.whl
+      ''
+      + ''
+        runHook postInstall
+      '';
+
+    passthru = {
+      inherit cudaPackages;
+    };
+
+    meta = with lib; {
+      description = "Lightning fast C++/CUDA neural network framework";
+      homepage = "https://github.com/NVlabs/tiny-cuda-nn";
+      license = licenses.bsd3;
+      maintainers = with maintainers; [connorbaker];
+      platforms = platforms.linux;
+    };
+  })
diff --git a/nixpkgs/pkgs/development/libraries/science/math/trilinos/default.nix b/nixpkgs/pkgs/development/libraries/science/math/trilinos/default.nix
new file mode 100644
index 000000000000..1939b0a5307b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/trilinos/default.nix
@@ -0,0 +1,102 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, blas
+, boost
+, cmake
+, gfortran
+, lapack
+, mpi
+, suitesparse
+, swig
+, withMPI ? false
+}:
+
+# NOTE: Not all packages are enabled.  We specifically enable the ones
+# required to build Xyce. If the need comes, we can enable more of them.
+
+let
+  flagsBase = ''
+    -G "Unix Makefiles"
+    -DBUILD_SHARED_LIBS=ON
+    -DCMAKE_CXX_FLAGS="-O3 -fPIC"
+    -DCMAKE_C_FLAGS="-O3 -fPIC"
+    -DCMAKE_Fortran_FLAGS="-O3 -fPIC"
+    -DTrilinos_ENABLE_NOX=ON
+    -DNOX_ENABLE_LOCA=ON
+    -DTrilinos_ENABLE_EpetraExt=ON
+    -DEpetraExt_BUILD_BTF=ON
+    -DEpetraExt_BUILD_EXPERIMENTAL=ON
+    -DEpetraExt_BUILD_GRAPH_REORDERINGS=ON
+    -DTrilinos_ENABLE_TrilinosCouplings=ON
+    -DTrilinos_ENABLE_Ifpack=ON
+    -DTrilinos_ENABLE_AztecOO=ON
+    -DTrilinos_ENABLE_Belos=ON
+    -DTrilinos_ENABLE_Teuchos=ON
+    -DTeuchos_ENABLE_COMPLEX=ON
+    -DTrilinos_ENABLE_Amesos=ON
+    -DAmesos_ENABLE_KLU=ON
+    -DTrilinos_ENABLE_Amesos2=ON
+    -DAmesos2_ENABLE_KLU2=ON
+    -DAmesos2_ENABLE_Basker=ON
+    -DTrilinos_ENABLE_Sacado=ON
+    -DTrilinos_ENABLE_Stokhos=ON
+    -DTrilinos_ENABLE_Kokkos=ON
+    -DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES=OFF
+    -DTrilinos_ENABLE_CXX11=ON
+    -DTPL_ENABLE_AMD=ON
+    -DTPL_ENABLE_BLAS=ON
+    -DTPL_ENABLE_LAPACK=ON
+  '';
+  flagsParallel = ''
+    -DCMAKE_C_COMPILER=mpicc
+    -DCMAKE_CXX_COMPILER=mpic++
+    -DCMAKE_Fortran_COMPILER=mpif77
+    -DTrilinos_ENABLE_Isorropia=ON
+    -DTrilinos_ENABLE_Zoltan=ON
+    -DTPL_ENABLE_MPI=ON
+  '';
+in
+stdenv.mkDerivation rec {
+  pname = "trilinos";
+  # Xyce 7.4 requires version 12.12.1
+  # nixpkgs-update: no auto update
+  version = "12.12.1";
+
+  src = fetchFromGitHub {
+    owner = "trilinos";
+    repo = "Trilinos";
+    rev = "${pname}-release-${lib.replaceStrings [ "." ] [ "-" ] version}";
+    sha256 = "sha256-Nqjr7RAlUHm6vs87a1P84Y7BIZEL0Vs/A1Z6dykfv+o=";
+  };
+
+  nativeBuildInputs = [ cmake gfortran swig ];
+
+  buildInputs = [ blas boost lapack suitesparse ] ++ lib.optionals withMPI [ mpi ];
+
+  preConfigure =
+    if withMPI then ''
+      cmakeFlagsArray+=(${flagsBase} ${flagsParallel})
+    ''
+    else ''
+      cmakeFlagsArray+=(${flagsBase})
+    '';
+
+  passthru = {
+    inherit withMPI;
+  };
+
+  meta = with lib; {
+    description = "Engineering and scientific problems algorithms";
+    longDescription = ''
+      The Trilinos Project is an effort to develop algorithms and enabling
+      technologies within an object-oriented software framework for the
+      solution of large-scale, complex multi-physics engineering and scientific
+      problems.
+    '';
+    homepage = "https://trilinos.org";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ fbeffa ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/wcpg/default.nix b/nixpkgs/pkgs/development/libraries/science/math/wcpg/default.nix
new file mode 100644
index 000000000000..8f14b940f383
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/wcpg/default.nix
@@ -0,0 +1,44 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, blas
+, gmp
+, lapack
+, libf2c
+, mpfi
+, mpfr
+}:
+
+stdenv.mkDerivation rec {
+  pname = "wcpg";
+  version = "0.9";
+
+  src = fetchFromGitHub {
+    owner = "fixif";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-uA/ENjf4urEO+lqebkp/k54199o2434FYgPSmYCG4UA=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  buildInputs = [
+    blas
+    gmp
+    lapack
+    libf2c
+    mpfi
+    mpfr
+  ];
+
+  meta = with lib; {
+    description = "Worst-Case Peak-Gain library";
+    homepage = "https://github.com/fixif/WCPG";
+    license = licenses.cecill-b;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ wegank ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/math/zn_poly/default.nix b/nixpkgs/pkgs/development/libraries/science/math/zn_poly/default.nix
new file mode 100644
index 000000000000..bdaf6e6284ef
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/math/zn_poly/default.nix
@@ -0,0 +1,64 @@
+{ stdenv
+, lib
+, fetchFromGitLab
+, fetchpatch
+, gmp
+, python3
+, tune ? false # tune to hardware, impure
+}:
+
+stdenv.mkDerivation rec {
+  version = "0.9.2";
+  pname = "zn_poly";
+
+  # sage has picked up the maintenance (bug fixes and building, not development)
+  # from the original, now unmaintained project which can be found at
+  # http://web.maths.unsw.edu.au/~davidharvey/code/zn_poly/
+  src = fetchFromGitLab {
+    owner = "sagemath";
+    repo = "zn_poly";
+    rev = version;
+    hash = "sha256-QBItcrrpOGj22/ShTDdfZjm63bGW2xY4c71R1q8abPE=";
+  };
+
+  buildInputs = [
+    gmp
+  ];
+
+  nativeBuildInputs = [
+    python3 # needed by ./configure to create the makefile
+  ];
+
+  # name of library file ("libzn_poly.so")
+  libbasename = "libzn_poly";
+  libext = stdenv.hostPlatform.extensions.sharedLibrary;
+
+  makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
+
+  # Tuning (either autotuning or with hand-written parameters) is possible
+  # but not implemented here.
+  # It seems buggy anyways (see homepage).
+  buildFlags = [ "all" "${libbasename}${libext}" ];
+
+  configureFlags = lib.optionals (!tune) [
+    "--disable-tuning"
+  ];
+
+  # `make install` fails to install some header files and the lib file.
+  installPhase = ''
+    mkdir -p "$out/include/zn_poly"
+    mkdir -p "$out/lib"
+    cp "${libbasename}"*"${libext}" "$out/lib"
+    cp include/*.h "$out/include/zn_poly"
+  '';
+
+  doCheck = true;
+
+  meta = with lib; {
+    homepage = "https://web.maths.unsw.edu.au/~davidharvey/code/zn_poly/";
+    description = "Polynomial arithmetic over Z/nZ";
+    license = with licenses; [ gpl3 ];
+    maintainers = teams.sage.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/networking/ns-3/default.nix b/nixpkgs/pkgs/development/libraries/science/networking/ns-3/default.nix
new file mode 100644
index 000000000000..fa6e5e48f846
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/networking/ns-3/default.nix
@@ -0,0 +1,143 @@
+{ stdenv
+, breakpointHook
+, fetchFromGitLab
+, python
+, libxml2
+, sqlite
+
+, boost
+, gtk3-x11
+, root
+, glib
+, gsl
+
+, cmake
+, pkg-config
+
+
+, libpcap
+
+, jansson
+
+, harfbuzz
+, freetype
+
+  # for binding generation
+, castxml ? null
+, cppyy ? null
+
+  # can take a long time, generates > 30000 images/graphs
+, enableDoxygen ? false
+
+  # very long
+, withManual ? false
+, doxygen ? null
+, graphviz ? null
+, imagemagick ? null
+  # for manual, tetex is used to get the eps2pdf binary
+  # texlive to get latexmk. building manual still fails though
+, dia
+, tetex ? null
+, ghostscript ? null
+, texliveMedium ? null
+
+  # generates python bindings
+, pythonSupport ? true
+, ncurses ? null
+
+, lib
+}:
+
+let
+  pythonEnv = python.withPackages (ps:
+    lib.optional withManual ps.sphinx
+    ++ lib.optionals pythonSupport (with ps;[ pybindgen pygccxml cppyy])
+  );
+in
+stdenv.mkDerivation rec {
+  pname = "ns-3";
+  version = "39";
+
+  src = fetchFromGitLab {
+    owner = "nsnam";
+    repo = "ns-3-dev";
+    rev = "ns-3.${version}";
+    sha256 = "sha256-2d8xCCfxRpcCZgt7ne17F7cUo/wIxLyvjQs3izNUnmY=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config pythonEnv ];
+
+  outputs = [ "out" ];
+
+  # ncurses is a hidden dependency of waf when checking python
+  buildInputs = lib.optionals pythonSupport [ castxml ncurses ]
+    ++ lib.optionals enableDoxygen [ doxygen graphviz imagemagick ]
+    ++ lib.optionals withManual [ dia tetex ghostscript imagemagick texliveMedium ]
+    ++ [
+    libxml2
+    pythonEnv
+    sqlite.dev
+    gsl
+    boost
+    root
+    glib.out
+    glib.dev
+    libpcap
+    gtk3-x11.dev
+    harfbuzz
+    freetype
+    jansson
+  ];
+
+  propagatedBuildInputs = [ pythonEnv ];
+
+  preConfigure = ''
+     substituteInPlace src/tap-bridge/CMakeLists.txt \
+       --replace '-DTAP_CREATOR="''${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/src/tap-bridge/' "-DTAP_CREATOR=\"$out/libexec/ns3/"
+
+    substituteInPlace src/fd-net-device/CMakeLists.txt \
+      --replace '-DRAW_SOCK_CREATOR="''${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/src/fd-net-device/' "-DRAW_SOCK_CREATOR=\"$out/libexec/ns3/"
+
+    substituteInPlace src/fd-net-device/CMakeLists.txt \
+      --replace '-DTAP_DEV_CREATOR="''${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/src/fd-net-device/' "-DTAP_DEV_CREATOR=\"$out/libexec/ns3/"
+  '';
+
+  doCheck = false;
+
+  buildTargets = "build"
+    + lib.optionalString enableDoxygen " doxygen"
+    + lib.optionalString withManual "sphinx";
+
+  # to prevent fatal error: 'backward_warning.h' file not found
+  CXXFLAGS = "-D_GLIBCXX_PERMIT_BACKWARD_HASH";
+
+  # Make generated python bindings discoverable in customized python environment
+  passthru = { pythonModule = python; };
+
+  cmakeFlags = [
+    "-DPython3_LIBRARY_DIRS=${pythonEnv}/lib"
+    "-DPython3_INCLUDE_DIRS=${pythonEnv}/include"
+    "-DPython3_EXECUTABLE=${pythonEnv}/bin/python"
+    "-DNS3_PYTHON_BINDINGS=ON"
+    "-DNS3_DES_METRICS=ON"
+    "-DNS3_BINDINGS_INSTALL_DIR=${pythonEnv.sitePackages}"
+    "-DNS3_LOG=ON"
+    "-DNS3_ASSERT=ON"
+    "-DNS3_GTK3=ON"
+    "-DGTK3_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include"
+  ]
+    ++ lib.optional doCheck "-DNS3_TESTS=ON";
+
+  # strictoverflow prevents clang from discovering pyembed when bindings
+  hardeningDisable = [ "fortify" "strictoverflow" ];
+
+  meta = with lib; {
+    homepage = "http://www.nsnam.org";
+    license = licenses.gpl3;
+    description = "A discrete time event network simulator";
+    platforms = with platforms; unix;
+    maintainers = with maintainers; [ teto rgrunbla ];
+    # never built on aarch64-darwin since first introduction in nixpkgs
+    broken = (stdenv.isDarwin && stdenv.isAarch64) || (stdenv.isLinux && stdenv.isAarch64);
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/robotics/edgetpu-compiler/default.nix b/nixpkgs/pkgs/development/libraries/science/robotics/edgetpu-compiler/default.nix
new file mode 100644
index 000000000000..5e02398d1b4e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/robotics/edgetpu-compiler/default.nix
@@ -0,0 +1,59 @@
+{ autoPatchelfHook
+, dpkg
+, fetchurl
+, lib
+, libcxx
+, stdenv
+}:
+stdenv.mkDerivation rec {
+  pname = "edgetpu-compiler";
+  version = "15.0";
+
+  src = fetchurl rec {
+    url = "https://packages.cloud.google.com/apt/pool/${pname}_${version}_amd64_${sha256}.deb";
+    sha256 = "ce03822053c2bddbb8640eaa988396ae66f9bc6b9d6d671914acd1727c2b445a";
+  };
+
+  nativeBuildInputs = [
+    autoPatchelfHook
+    dpkg
+  ];
+
+  buildInputs = [
+    libcxx
+  ];
+
+  unpackPhase = ''
+    mkdir bin pkg
+
+    dpkg -x $src pkg
+
+    rm -r pkg/usr/share/lintian
+
+    cp pkg/usr/bin/edgetpu_compiler_bin/edgetpu_compiler ./bin
+    cp -r pkg/usr/share .
+
+    rm -r pkg
+  '';
+
+  dontConfigure = true;
+  dontBuild = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out
+    cp -r ./{bin,share} $out
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "A command line tool that compiles a TensorFlow Lite model into an Edge TPU compatible file.";
+    homepage = "https://coral.ai/docs/edgetpu/compiler";
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+    license = licenses.asl20;
+    maintainers = with maintainers; [ cpcloud ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/science/robotics/ispike/default.nix b/nixpkgs/pkgs/development/libraries/science/robotics/ispike/default.nix
new file mode 100644
index 000000000000..28a38b7056dd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/science/robotics/ispike/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl, cmake, boost }:
+
+stdenv.mkDerivation rec {
+  pname = "ispike";
+  version = "2.1.1";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/ispike/${pname}-${version}.tar.gz";
+    sha256 = "0khrxp43bi5kisr8j4lp9fl4r5marzf7b4inys62ac108sfb28lp";
+  };
+
+  postPatch = ''
+    sed -i "1i #include <map>" include/iSpike/YarpConnection.hpp
+  '';
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ boost ];
+
+  meta = {
+    description = "Spiking neural interface between iCub and a spiking neural simulator";
+    homepage = "https://sourceforge.net/projects/ispike/";
+    license = lib.licenses.lgpl3;
+    platforms = lib.platforms.unix;
+    maintainers = [ lib.maintainers.nico202 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/scmccid/default.nix b/nixpkgs/pkgs/development/libraries/scmccid/default.nix
new file mode 100644
index 000000000000..daa861b31ea7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/scmccid/default.nix
@@ -0,0 +1,42 @@
+{lib, stdenv, fetchurl, patchelf, libusb-compat-0_1}:
+
+assert stdenv ? cc && stdenv.cc.libc != null;
+
+stdenv.mkDerivation rec {
+  pname = "scmccid";
+  version = "5.0.11";
+
+  src = if stdenv.hostPlatform.system == "i686-linux" then (fetchurl {
+      url = "http://www.scmmicro.com/support/download/scmccid_${version}_linux.tar.gz";
+      sha256 = "1r5wkarhzl09ncgj55baizf573czw0nplh1pgddzx9xck66kh5bm";
+    })
+    else if stdenv.hostPlatform.system == "x86_64-linux" then (fetchurl {
+        url = "http://www.scmmicro.com/support/download/scmccid_${version}_linux_x64.tar.gz";
+        sha256 = "0k9lzlk01sl4ycfqgrqqy3bildz0mcr1r0kkicgjz96l4s0jgz0i";
+    })
+    else throw "Architecture not supported";
+
+  nativeBuildInputs = [ patchelf ];
+
+  installPhase = ''
+    RPATH=${libusb-compat-0_1.out}/lib:${stdenv.cc.libc.out}/lib
+
+    for a in proprietary/*/Contents/Linux/*.so*; do
+        if ! test -L $a; then
+            patchelf --set-rpath $RPATH $a
+        fi
+    done
+
+    mkdir -p $out/pcsc/drivers
+    cp -R proprietary/* $out/pcsc/drivers
+  '';
+
+  meta = {
+    homepage = "http://www.scmmicro.com/support/pc-security-support/downloads.html";
+    description = "PCSC drivers for linux, for the SCM SCR3310 v2.0 card and others";
+    sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
+    license = lib.licenses.unfree;
+    maintainers = with lib.maintainers; [viric];
+    platforms = with lib.platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/scope-lite/default.nix b/nixpkgs/pkgs/development/libraries/scope-lite/default.nix
new file mode 100644
index 000000000000..40cad6a5fc3c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/scope-lite/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, cmake, fetchFromGitHub, lib }: let
+  version = "0.2.0";
+in stdenv.mkDerivation {
+  name = "scope-lite-${version}";
+
+  src = fetchFromGitHub {
+    owner = "martinmoene";
+    repo = "scope-lite";
+    rev = "v${version}";
+    hash = "sha256-/Vu3blgyEOQRFqhQjuT/6ukV0iWA0TdPrLnt2Z/gd6E=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = {
+    description = "A migration path to C++ library extensions scope_exit, scope_fail, scope_success, unique_resource";
+    license = lib.licenses.boost;
+    maintainers = [ lib.maintainers.shlevy ];
+    homepage = "https://github.com/martinmoene/scope-lite";
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/scriptaculous/default.nix b/nixpkgs/pkgs/development/libraries/scriptaculous/default.nix
new file mode 100644
index 000000000000..e3c8ea00f446
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/scriptaculous/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchurl, unzip, ... }:
+
+stdenv.mkDerivation rec {
+  pname = "scriptaculous";
+  version = "1.9.0";
+
+  src = fetchurl {
+    url = "https://script.aculo.us/dist/scriptaculous-js-${version}.zip";
+    sha256 = "1xpnk3cq8n07lxd69k5jxh48s21zh41ihq10z4a6lcnk238rp8qz";
+  };
+
+  nativeBuildInputs = [ unzip ];
+
+  installPhase = ''
+    mkdir $out
+    cp src/*.js $out
+  '';
+
+  meta = with lib; {
+    description = "A set of JavaScript libraries to enhance the user interface of web sites";
+    longDescription = ''
+      script.aculo.us provides you with
+      easy-to-use, cross-browser user
+      interface JavaScript libraries to make
+      your web sites and web applications fly.
+    '';
+    homepage = "https://script.aculo.us/";
+    downloadPage = "https://script.aculo.us/dist/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ das_j ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/sdbus-cpp/default.nix b/nixpkgs/pkgs/development/libraries/sdbus-cpp/default.nix
new file mode 100644
index 000000000000..4d820c0e36dc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sdbus-cpp/default.nix
@@ -0,0 +1,53 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, expat
+, pkg-config
+, systemd
+}:
+
+stdenv.mkDerivation rec {
+  pname = "sdbus-cpp";
+  version = "1.4.0";
+
+  src = fetchFromGitHub {
+    owner = "kistler-group";
+    repo = "sdbus-cpp";
+    rev = "v${version}";
+    hash = "sha256-AOqwC7CABvQsG9P1PnUg2DIhNmHqYpgbKzm9C2gWNIQ=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    expat
+    systemd
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_CODE_GEN=ON"
+  ];
+
+  meta = {
+    homepage = "https://github.com/Kistler-Group/sdbus-cpp";
+    changelog = "https://github.com/Kistler-Group/sdbus-cpp/blob/v${version}/ChangeLog";
+    description = "High-level C++ D-Bus library designed to provide easy-to-use yet powerful API";
+    longDescription = ''
+      sdbus-c++ is a high-level C++ D-Bus library for Linux designed to provide
+      expressive, easy-to-use API in modern C++.
+      It adds another layer of abstraction on top of sd-bus, a nice, fresh C
+      D-Bus implementation by systemd.
+      It's been written primarily as a replacement of dbus-c++, which currently
+      suffers from a number of (unresolved) bugs, concurrency issues and
+      inherent design complexities and limitations.
+    '';
+    license = lib.licenses.lgpl2Only;
+    maintainers = [ lib.maintainers.ivar ];
+    platforms = lib.platforms.linux;
+    mainProgram = "sdbus-c++-xml2cpp";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/sealcurses/default.nix b/nixpkgs/pkgs/development/libraries/sealcurses/default.nix
new file mode 100644
index 000000000000..ad1eb0bb276d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sealcurses/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitea, cmake, pkg-config, ncurses, the-foundation }:
+
+stdenv.mkDerivation rec {
+  pname = "sealcurses";
+  version = "unstable-2023-02-06"; # No release yet
+
+  src = fetchFromGitea {
+    domain = "git.skyjake.fi";
+    owner = "skyjake";
+    repo = pname;
+    rev = "e11026ca34b03c5ab546512f82a6f705d0c29e95";
+    hash = "sha256-N+Tvg2oIcfa68FC7rKuLxGgEKz1oBEEb8NGCiBuZ8y4=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [ ncurses the-foundation ];
+
+  cmakeFlags = [ "-DCMAKE_INSTALL_LIBDIR=lib" ];
+
+  meta = with lib; {
+    description = "SDL Emulation and Adaptation Layer for Curses (ncursesw)";
+    homepage = "https://git.skyjake.fi/skyjake/sealcurses";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ sikmir ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/seasocks/default.nix b/nixpkgs/pkgs/development/libraries/seasocks/default.nix
new file mode 100644
index 000000000000..96db323f90a7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/seasocks/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, cmake, python3, zlib, catch2 }:
+
+stdenv.mkDerivation rec {
+  pname = "seasocks";
+  version = "1.4.6";
+
+  src = fetchFromGitHub {
+    owner = "mattgodbolt";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-R1McxZm2qsUoggFGfL587g+8eQf7si56xVkR8B8nehQ=";
+  };
+
+  postPatch = ''
+    cp ${catch2}/include/catch2/catch.hpp src/test/c/catch/catch2/catch.hpp
+  '';
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ zlib python3 ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/mattgodbolt/seasocks";
+    description = "Tiny embeddable C++ HTTP and WebSocket server";
+    license = licenses.bsd2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ fredeb ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/sentencepiece/default.nix b/nixpkgs/pkgs/development/libraries/sentencepiece/default.nix
new file mode 100644
index 000000000000..f2fc6a1a8676
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sentencepiece/default.nix
@@ -0,0 +1,41 @@
+{ lib
+, fetchFromGitHub
+, stdenv
+, cmake
+, gperftools
+
+, withGPerfTools ? true
+}:
+
+stdenv.mkDerivation rec {
+  pname = "sentencepiece";
+  version = "0.1.99";
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = pname;
+    rev = "refs/tags/v${version}";
+    sha256 = "sha256-RxzysZsfTdhAtJCO3JOa/bSBNnHBRWkqBdwBa8sB74I=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = lib.optionals withGPerfTools [ gperftools ];
+
+  outputs = [ "bin" "dev" "out" ];
+
+  # https://github.com/google/sentencepiece/issues/754
+  postPatch = ''
+    substituteInPlace CMakeLists.txt \
+      --replace '\$'{exec_prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
+      --replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/google/sentencepiece";
+    description = "Unsupervised text tokenizer for Neural Network-based text generation";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ pashashocky ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/sentry-native/default.nix b/nixpkgs/pkgs/development/libraries/sentry-native/default.nix
new file mode 100644
index 000000000000..95ba1dc68e51
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sentry-native/default.nix
@@ -0,0 +1,45 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, curl
+, breakpad
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "sentry-native";
+  version = "0.6.7";
+
+  src = fetchFromGitHub {
+    owner = "getsentry";
+    repo = "sentry-native";
+    rev = version;
+    hash = "sha256-pEFfs8xjc+6r+60aJF4Sjjy/oSU/+ADWgOBpS3t9rWI=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    curl
+    breakpad
+  ];
+
+  cmakeBuildType = "RelWithDebInfo";
+
+  cmakeFlags = [
+    "-DSENTRY_BREAKPAD_SYSTEM=On"
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/getsentry/sentry-native";
+    description = "Sentry SDK for C, C++ and native applications";
+    changelog = "https://github.com/getsentry/sentry-native/blob/${version}/CHANGELOG.md";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ wheelsandmetal ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/serd/default.nix b/nixpkgs/pkgs/development/libraries/serd/default.nix
new file mode 100644
index 000000000000..8bb82d480943
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/serd/default.nix
@@ -0,0 +1,62 @@
+{ lib
+, stdenv
+, fetchurl
+, doxygen
+, mandoc
+, meson
+, ninja
+, pkg-config
+, python3
+, sphinx
+, writeScript
+}:
+
+stdenv.mkDerivation rec {
+  pname = "serd";
+  version = "0.30.16";
+
+  outputs = [ "out" "dev" "doc" "man" ];
+
+  src = fetchurl {
+    url = "https://download.drobilla.net/${pname}-${version}.tar.xz";
+    hash = "sha256-9Q9IbaUZzdjQOyDJ5CQU5FkTP1okRBHY5jyu+NmskUY=";
+  };
+
+  nativeBuildInputs = [
+    doxygen
+    mandoc
+    meson
+    ninja
+    pkg-config
+    python3
+    sphinx
+  ];
+
+  postPatch = ''
+    patchShebangs .
+  '';
+
+  passthru = {
+    updateScript = writeScript "update-poke" ''
+      #!/usr/bin/env nix-shell
+      #!nix-shell -i bash -p curl pcre common-updater-scripts
+
+      set -eu -o pipefail
+
+      # Expect the text in format of 'download.drobilla.net/serd-0.30.16.tar.xz">'
+      new_version="$(curl -s https://drobilla.net/category/serd/ |
+          pcregrep -o1 'download.drobilla.net/serd-([0-9.]+).tar.xz' |
+          head -n1)"
+      update-source-version ${pname} "$new_version"
+    '';
+  };
+
+  meta = with lib; {
+    description = "A lightweight C library for RDF syntax which supports reading and writing Turtle and NTriples";
+    homepage = "https://drobilla.net/software/serd";
+    license = licenses.mit;
+    maintainers = [ maintainers.goibhniu ];
+    mainProgram = "serdi";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/serf/default.nix b/nixpkgs/pkgs/development/libraries/serf/default.nix
new file mode 100644
index 000000000000..1a2f407f9bc2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/serf/default.nix
@@ -0,0 +1,58 @@
+{ lib
+, stdenv
+, fetchurl
+, apr
+, scons
+, openssl
+, aprutil
+, zlib
+, libkrb5
+, pkg-config
+, libiconv
+, fetchpatch
+}:
+
+stdenv.mkDerivation rec {
+  pname = "serf";
+  version = "1.3.10";
+
+  src = fetchurl {
+    url = "mirror://apache/serf/${pname}-${version}.tar.bz2";
+    hash = "sha256-voHvCLqiUW7Np2p3rffe97wyJ+61eLmjO0X3tB3AZOY=";
+  };
+
+  nativeBuildInputs = [ pkg-config scons ];
+  buildInputs = [ apr openssl aprutil zlib libiconv ]
+    ++ lib.optional (!stdenv.isCygwin) libkrb5;
+
+  patches = [
+    ./scons.patch
+
+    (fetchpatch {
+      url = "https://src.fedoraproject.org/rpms/libserf/raw/rawhide/f/libserf-1.3.9-errgetfunc.patch";
+      hash = "sha256-FQJvXOIZ0iItvbbcu4kR88j74M7fOi7C/0NN3o1/ub4=";
+    })
+  ];
+
+  prefixKey = "PREFIX=";
+
+  preConfigure = ''
+    sconsFlags+=" APR=$(echo ${apr.dev}/bin/*-config)"
+    sconsFlags+=" APU=$(echo ${aprutil.dev}/bin/*-config)"
+    sconsFlags+=" CC=$CC"
+    sconsFlags+=" OPENSSL=${openssl}"
+    sconsFlags+=" ZLIB=${zlib}"
+  '' + lib.optionalString (!stdenv.isCygwin) ''
+    sconsFlags+=" GSSAPI=${libkrb5.dev}"
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "HTTP client library based on APR";
+    homepage = "https://serf.apache.org/";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ orivej raskin ];
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/serf/scons.patch b/nixpkgs/pkgs/development/libraries/serf/scons.patch
new file mode 100644
index 000000000000..7be5e4d5045d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/serf/scons.patch
@@ -0,0 +1,13 @@
+diff --git a/SConstruct b/SConstruct
+index 4358a23..6ce7776 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -155,6 +155,8 @@ if sys.platform == 'win32':
+ env = Environment(variables=opts,
+                   tools=('default', 'textfile',),
+                   CPPPATH=['.', ],
++                  AR=os.environ['AR'],
++                  ENV=os.environ,
+                   )
+ 
+ env.Append(BUILDERS = {
diff --git a/nixpkgs/pkgs/development/libraries/serialdv/default.nix b/nixpkgs/pkgs/development/libraries/serialdv/default.nix
new file mode 100644
index 000000000000..bff7a107eebe
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/serialdv/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "serialdv";
+  version ="1.1.4";
+
+  src = fetchFromGitHub {
+    owner = "f4exb";
+    repo = "serialdv";
+    rev = "v${version}";
+    sha256 = "0d88h2wjhf79nisiv96bq522hkbknzm88wsv0q9k33mzmrwnrx93";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "C++ Minimal interface to encode and decode audio with AMBE3000 based devices in packet mode over a serial link";
+    homepage = "https://github.com/f4exb/serialdv";
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ alkeryn ];
+    license = licenses.gpl3;
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/sexpp/default.nix b/nixpkgs/pkgs/development/libraries/sexpp/default.nix
new file mode 100644
index 000000000000..dd41d520d28c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sexpp/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, stdenv
+, bzip2
+, cmake
+, fetchFromGitHub
+, gtest
+, pkg-config
+, zlib
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "sexpp";
+  version = "0.8.7";
+
+  src = fetchFromGitHub {
+    owner = "rnpgp";
+    repo = "sexpp";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-E1ESN3JKCWYBt1o37d7EVcgARnwGKS6mxua+0m1RMlM=";
+  };
+
+  buildInputs = [ zlib bzip2 ];
+
+  cmakeFlags = [
+    "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
+    "-DBUILD_SHARED_LIBS=on"
+    "-DWITH_SEXP_TESTS=on"
+    "-DDOWNLOAD_GTEST=off"
+    "-DWITH_SEXP_CLI=on"
+    "-DWITH_SANITIZERS=off"
+  ];
+
+  nativeBuildInputs = [ cmake gtest pkg-config ];
+
+  outputs = [ "out" "lib" "dev" ];
+
+  preConfigure = ''
+    echo "v${finalAttrs.version}" > version.txt
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/rnpgp/sexp";
+    description = "S-expressions parser and generator C++ library, fully compliant to [https://people.csail.mit.edu/rivest/Sexp.txt]";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ ribose-jeffreylau ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/sfml/default.nix b/nixpkgs/pkgs/development/libraries/sfml/default.nix
new file mode 100644
index 000000000000..c3ecd3a9866f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sfml/default.nix
@@ -0,0 +1,71 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, libX11
+, freetype
+, libjpeg
+, openal
+, flac
+, libvorbis
+, glew
+, libXrandr
+, libXrender
+, udev
+, xcbutilimage
+, IOKit
+, Foundation
+, AppKit
+, OpenAL
+}:
+
+stdenv.mkDerivation rec {
+  pname = "sfml";
+  version = "2.5.1";
+
+  src = fetchFromGitHub {
+    owner = "SFML";
+    repo = "SFML";
+    rev = version;
+    sha256 = "sha256-Xt2Ct4vV459AsSvJxQfwMsNs6iA5y3epT95pLWJGeSk=";
+  };
+
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/macports/macports-ports/raw/4df1fc235a708ff28200ffc0a39120974ed4b6e1/multimedia/sfml/files/patch-apple-silicon.diff";
+      extraPrefix = "";
+      sha256 = "sha256-9dNawJaYtkugR+2NvhQOhgsf6w9ZXHkBgsDRh8yAJc0=";
+    })
+    (fetchpatch {
+      url = "https://github.com/SFML/SFML/commit/bf92efe9a4035fee0258386173d53556aa196e49.patch";
+      hash = "sha256-1htwPfpn7Z6s/3b+/i1tQ+btjr/tWv5m6IyDVMBNqQA=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ freetype libjpeg openal flac libvorbis glew ]
+    ++ lib.optional stdenv.isLinux udev
+    ++ lib.optionals (!stdenv.isDarwin) [ libX11 libXrandr libXrender xcbutilimage ]
+    ++ lib.optionals stdenv.isDarwin [ IOKit Foundation AppKit OpenAL ];
+
+  cmakeFlags = [
+    "-DSFML_INSTALL_PKGCONFIG_FILES=yes"
+    "-DSFML_MISC_INSTALL_PREFIX=share/SFML"
+    "-DSFML_BUILD_FRAMEWORKS=no"
+    "-DSFML_USE_SYSTEM_DEPS=yes"
+  ];
+
+  meta = with lib; {
+    homepage = "https://www.sfml-dev.org/";
+    description = "Simple and fast multimedia library";
+    longDescription = ''
+      SFML is a simple, fast, cross-platform and object-oriented multimedia API.
+      It provides access to windowing, graphics, audio and network.
+      It is written in C++, and has bindings for various languages such as C, .Net, Ruby, Python.
+    '';
+    license = licenses.zlib;
+    maintainers = [ maintainers.astsmtl ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/sfsexp/default.nix b/nixpkgs/pkgs/development/libraries/sfsexp/default.nix
new file mode 100644
index 000000000000..3d047ccd7f50
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sfsexp/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "sfsexp";
+  version = "1.4.1";
+
+  src = fetchFromGitHub {
+    owner = "mjsottile";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-uAk/8Emf23J0D3D5+eUEpWLY2fIvdQ7a80eGe9i1WQ8=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  meta = with lib; {
+    description = "Small Fast S-Expression Library";
+    homepage = "https://github.com/mjsottile/sfsexp";
+    maintainers = with maintainers; [ jb55 ];
+    license = licenses.lgpl21Plus;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/sgp4/default.nix b/nixpkgs/pkgs/development/libraries/sgp4/default.nix
new file mode 100644
index 000000000000..b2095e93aa11
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sgp4/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation {
+  pname = "sgp4";
+  version = "unstable-2022-11-13";
+
+  src = fetchFromGitHub {
+    owner = "dnwrnr";
+    repo = "sgp4";
+    rev = "6a448b4850e5fbf8c1ca03bb5f6013a9fdc1fd91";
+    hash = "sha256-gfJQOLhys5wKzZCxFVqbo+5l7jPeGPzrvYsdZKPSCJc=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "Simplified perturbations models library";
+    homepage = "https://github.com/dnwrnr/sgp4";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ alexwinter ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/shapelib/default.nix b/nixpkgs/pkgs/development/libraries/shapelib/default.nix
new file mode 100644
index 000000000000..27a3b7f5ee30
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/shapelib/default.nix
@@ -0,0 +1,26 @@
+{ lib
+, stdenv
+, fetchurl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "shapelib";
+  version = "1.6.0";
+
+  src = fetchurl {
+    url = "https://download.osgeo.org/shapelib/shapelib-${version}.tar.gz";
+    sha256 = "sha256-GVKLJDdyQXBWNzIMNnlDAxrVCIZl0fsOHqpSpxJkpsQ=";
+  };
+
+  doCheck = true;
+  preCheck = ''
+    patchShebangs tests contrib/tests
+  '';
+
+  meta = with lib; {
+    description = "C Library for reading, writing and updating ESRI Shapefiles";
+    homepage = "http://shapelib.maptools.org/";
+    license = licenses.gpl2;
+    maintainers = with maintainers; teams.geospatial.members ++ [ ehmry ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/sharness/default.nix b/nixpkgs/pkgs/development/libraries/sharness/default.nix
new file mode 100644
index 000000000000..ec064a74c72f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sharness/default.nix
@@ -0,0 +1,53 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, fetchurl
+, perl
+, perlPackages
+, sharnessExtensions ? {} }:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "sharness";
+  version = "1.2.0";
+
+  src = fetchFromGitHub {
+    owner = "felipec";
+    repo = "sharness";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-C0HVWgTm9iXDSFyXcUVRfT0ip31YGaaZ6ZvxggK/x7o=";
+  };
+
+  # Used for testing
+  nativeBuildInputs = [ perl perlPackages.IOTty ];
+
+  outputs = [ "out" "doc" ];
+
+  makeFlags = [ "prefix=$(out)" ];
+
+  extensions = lib.mapAttrsToList (k: v: "${k}.sh ${v}") sharnessExtensions;
+
+  postInstall = lib.optionalString (sharnessExtensions != {}) ''
+    extDir=$out/share/sharness/sharness.d
+    mkdir -p "$extDir"
+    linkExtensions() {
+      set -- $extensions
+      while [ $# -ge 2 ]; do
+        ln -s "$2" "$extDir/$1"
+        shift 2
+      done
+    }
+    linkExtensions
+  '';
+
+  doCheck = true;
+
+  passthru.SHARNESS_TEST_SRCDIR = finalAttrs.finalPackage + "/share/sharness";
+
+  meta = with lib; {
+    description = "Portable shell library to write, run and analyze automated tests adhering to Test Anything Protocol (TAP)";
+    homepage = "https://github.com/chriscool/sharness";
+    license = licenses.gpl2Only;
+    maintainers = [ maintainers.spacefrogg ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/shhmsg/default.nix b/nixpkgs/pkgs/development/libraries/shhmsg/default.nix
new file mode 100644
index 000000000000..901ee48adece
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/shhmsg/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "shhmsg";
+  version = "1.4.2";
+
+  src = fetchurl {
+    url = "https://shh.thathost.com/pub-unix/files/shhmsg-${version}.tar.gz";
+    sha256 = "0ax02fzqpaxr7d30l5xbndy1s5vgg1ag643c7zwiw2wj1czrxil8";
+  };
+
+  postPatch = ''
+    substituteInPlace Makefile --replace "gcc" "${stdenv.cc.targetPrefix}cc"
+  '';
+
+  installFlags = [ "INSTBASEDIR=$(out)" ];
+
+  meta = with lib; {
+    description = "A library for displaying messages";
+    homepage = "https://shh.thathost.com/pub-unix/";
+    license = licenses.artistic1;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/shhopt/default.nix b/nixpkgs/pkgs/development/libraries/shhopt/default.nix
new file mode 100644
index 000000000000..664d4f3330a0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/shhopt/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "shhopt";
+  version = "1.1.7";
+
+  src = fetchurl {
+    url = "https://shh.thathost.com/pub-unix/files/${pname}-${version}.tar.gz";
+    sha256 = "0yd6bl6qw675sxa81nxw6plhpjf9d2ywlm8a5z66zyjf28sl7sds";
+  };
+
+  postPatch = ''
+    substituteInPlace Makefile --replace "gcc" "${stdenv.cc.targetPrefix}cc"
+  '';
+
+  installFlags = [ "INSTBASEDIR=$(out)" ];
+
+  meta = with lib; {
+    description = "A library for parsing command line options";
+    homepage = "https://shh.thathost.com/pub-unix/";
+    license = licenses.artistic1;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/shibboleth-sp/default.nix b/nixpkgs/pkgs/development/libraries/shibboleth-sp/default.nix
new file mode 100644
index 000000000000..ba9956471310
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/shibboleth-sp/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchgit, autoreconfHook, boost, fcgi, openssl, opensaml-cpp, log4shib, pkg-config, xercesc, xml-security-c, xml-tooling-c }:
+
+stdenv.mkDerivation rec {
+  pname = "shibboleth-sp";
+  version = "3.0.4.1";
+
+  src = fetchgit {
+    url = "https://git.shibboleth.net/git/cpp-sp.git";
+    rev = version;
+    sha256 = "1qb4dbz5gk10b9w1rf6f4vv7c2wb3a8bfzif6yiaq96ilqad7gdr";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ boost fcgi openssl opensaml-cpp log4shib xercesc xml-security-c xml-tooling-c ];
+
+  configureFlags = [
+    "--without-apxs"
+    "--with-xmltooling=${xml-tooling-c}"
+    "--with-saml=${opensaml-cpp}"
+    "--with-fastcgi"
+  ];
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString (!stdenv.isDarwin) "-std=c++14";
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage    = "https://shibboleth.net/products/service-provider.html";
+    description = "Enables SSO and Federation web applications written with any programming language or framework";
+    platforms   = platforms.unix;
+    license     = licenses.asl20;
+    maintainers = [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/shine/default.nix b/nixpkgs/pkgs/development/libraries/shine/default.nix
new file mode 100644
index 000000000000..8e5d02e632d2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/shine/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "shine";
+  version = "3.1.1";
+
+  src = fetchFromGitHub {
+    owner = "toots";
+    repo = "shine";
+    rev = version;
+    sha256 = "06nwylqqji0i1isdprm2m5qsdj4qiywcgnp69c5b55pnw43f07qg";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  meta = with lib; {
+    description = "Fast fixed-point mp3 encoding library";
+    homepage = "https://github.com/toots/shine";
+    license = licenses.lgpl2Only;
+    maintainers = with maintainers; [ dandellion ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/signond/default.nix b/nixpkgs/pkgs/development/libraries/signond/default.nix
new file mode 100644
index 000000000000..ea57e872ab29
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/signond/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, lib, fetchFromGitLab, qmake, qtbase, wrapQtAppsHook, doxygen }:
+
+stdenv.mkDerivation rec {
+  pname = "signond";
+  version = "8.61";
+
+  src = fetchFromGitLab {
+    owner = "accounts-sso";
+    repo = pname;
+    rev = "VERSION_${version}";
+    sha256 = "sha256-d7JZmGpjIvSN9l1nvKbBZjF0OR5L5frPTGHF/pNEqHE=";
+  };
+
+  nativeBuildInputs = [
+    qmake
+    doxygen
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [ qtbase ];
+
+  preConfigure = ''
+    substituteInPlace src/signond/signond.pro \
+      --replace "/etc" "@out@/etc"
+  '';
+
+  meta = with lib; {
+    homepage = "https://gitlab.com/accounts-sso/signond";
+    description = "Signon Daemon for Qt";
+    maintainers = with maintainers; [ freezeboy ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/sigslot/default.nix b/nixpkgs/pkgs/development/libraries/sigslot/default.nix
new file mode 100644
index 000000000000..8bc51fdd9ec5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sigslot/default.nix
@@ -0,0 +1,29 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "sigslot";
+  version = "1.2.2";
+
+  src = fetchFromGitHub {
+    owner = "palacaze";
+    repo = "sigslot";
+    rev = "v${version}";
+    hash = "sha256-MKtVZLHp8UfXW8KJ3QjPMhxnt46xV+pA9NMqAX0iqiA=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  dontBuild = true;
+
+  meta = with lib; {
+    description = "A header-only, thread safe implementation of signal-slots for C++";
+    license = licenses.mit;
+    homepage = "https://github.com/palacaze/sigslot";
+    maintainers = with maintainers; [ azahi ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/silgraphite/graphite2.nix b/nixpkgs/pkgs/development/libraries/silgraphite/graphite2.nix
new file mode 100644
index 000000000000..7c1f7c0d3b40
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/silgraphite/graphite2.nix
@@ -0,0 +1,57 @@
+{ lib
+, stdenv
+, fetchurl
+, pkg-config
+, freetype
+, cmake
+, static ? stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+  version = "1.3.14";
+  pname = "graphite2";
+
+  src = fetchurl {
+    url = "https://github.com/silnrsi/graphite/releases/download/"
+      + "${version}/graphite2-${version}.tgz";
+    sha256 = "1790ajyhk0ax8xxamnrk176gc9gvhadzy78qia4rd8jzm89ir7gr";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ pkg-config cmake ];
+  buildInputs = [ freetype ];
+
+  patches = lib.optionals stdenv.isDarwin [ ./macosx.patch ];
+  postPatch = ''
+    # disable broken 'nametabletest' test, fails on gcc-13:
+    #   https://github.com/silnrsi/graphite/pull/74
+    substituteInPlace tests/CMakeLists.txt \
+      --replace 'add_subdirectory(nametabletest)' '#add_subdirectory(nametabletest)'
+
+    # support cross-compilation by using target readelf binary:
+    substituteInPlace Graphite.cmake \
+      --replace 'readelf' "${stdenv.cc.targetPrefix}readelf"
+  '';
+
+  cmakeFlags = lib.optionals static [
+    "-DBUILD_SHARED_LIBS=OFF"
+  ];
+
+  # Remove a test that fails to statically link (undefined reference to png and
+  # freetype symbols)
+  postConfigure = lib.optionalString static ''
+    sed -e '/freetype freetype.c/d' -i ../tests/examples/CMakeLists.txt
+  '';
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "An advanced font engine";
+    homepage = "https://graphite.sil.org/";
+    license = licenses.lgpl21;
+    maintainers = [ maintainers.raskin ];
+    mainProgram = "gr2fonttest";
+    platforms = platforms.unix ++ platforms.windows;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/silgraphite/macosx.patch b/nixpkgs/pkgs/development/libraries/silgraphite/macosx.patch
new file mode 100644
index 000000000000..7929c1967c82
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/silgraphite/macosx.patch
@@ -0,0 +1,13 @@
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -102,7 +102,8 @@ set_target_properties(graphite2 PROPERTIES  PUBLIC_HEADER "${GRAPHITE_HEADERS}"
+                                             VERSION ${GRAPHITE_VERSION}
+                                             LT_VERSION_CURRENT ${GRAPHITE_API_CURRENT}
+                                             LT_VERSION_REVISION ${GRAPHITE_API_REVISION}
+-                                            LT_VERSION_AGE ${GRAPHITE_API_AGE})
++                                            LT_VERSION_AGE ${GRAPHITE_API_AGE}
++                                            INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
+ 
+ if (${CMAKE_BUILD_TYPE} STREQUAL "ClangASN")
+     set(GRAPHITE_LINK_FLAGS "-fsanitize=address")
+
diff --git a/nixpkgs/pkgs/development/libraries/simdjson/default.nix b/nixpkgs/pkgs/development/libraries/simdjson/default.nix
new file mode 100644
index 000000000000..768587534778
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/simdjson/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "simdjson";
+  version = "3.6.4";
+
+  src = fetchFromGitHub {
+    owner = "simdjson";
+    repo = "simdjson";
+    rev = "v${version}";
+    sha256 = "sha256-yIZKlKp4p1HJBAdba+57sGl0ri0gGtjSgZQ16/vDE34=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [
+    "-DSIMDJSON_DEVELOPER_MODE=OFF"
+  ] ++ lib.optionals stdenv.hostPlatform.isStatic [
+    "-DBUILD_SHARED_LIBS=OFF"
+  ] ++ lib.optionals (with stdenv.hostPlatform; isPower && isBigEndian) [
+    # Assume required CPU features are available, since otherwise we
+    # just get a failed build.
+    "-DCMAKE_CXX_FLAGS=-mpower8-vector"
+  ];
+
+  meta = with lib; {
+    homepage = "https://simdjson.org/";
+    description = "Parsing gigabytes of JSON per second";
+    license = licenses.asl20;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ chessai ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/simgear/default.nix b/nixpkgs/pkgs/development/libraries/simgear/default.nix
new file mode 100644
index 000000000000..c66dfb3fdcc8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/simgear/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchurl, plib, freeglut, xorgproto, libX11, libXext, libXi
+, libICE, libSM, libXt, libXmu, libGLU, libGL, boost179, zlib, libjpeg, freealut
+, openscenegraph, openal, expat, cmake, apr, xz
+, curl
+}:
+let
+  version = "2020.3.19";
+  shortVersion = builtins.substring 0 6 version;
+in
+stdenv.mkDerivation rec {
+  pname = "simgear";
+  inherit version;
+
+  src = fetchurl {
+    url = "mirror://sourceforge/flightgear/release-${shortVersion}/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-O5N8W5RCJHjl15EUvc1seOQ6Cm/7qXVEqG1EHD+ejDo=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ plib freeglut xorgproto libX11 libXext libXi
+                  libICE libSM libXt libXmu libGLU libGL boost179 zlib libjpeg freealut
+                  openscenegraph openal expat apr curl xz ];
+
+  meta = with lib; {
+    description = "Simulation construction toolkit";
+    homepage = "https://wiki.flightgear.org/SimGear";
+    maintainers = with maintainers; [ raskin ];
+    platforms = platforms.linux;
+    license = licenses.lgpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/simpleitk/default.nix b/nixpkgs/pkgs/development/libraries/simpleitk/default.nix
new file mode 100644
index 000000000000..10e055d5acde
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/simpleitk/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, swig4
+, lua
+, elastix
+, itk
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "simpleitk";
+  version = "2.3.1";
+
+  src = fetchFromGitHub {
+    owner = "SimpleITK";
+    repo = "SimpleITK";
+    rev = "refs/tags/v${finalAttrs.version}";
+    hash = "sha256-JmZUlIdcCQ9yEqxoUwRaxvr/Q7xZm41QA3mtDtoSdyI=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    swig4
+  ];
+  buildInputs = [
+    elastix
+    lua
+    itk
+  ];
+
+  # 2.0.0: linker error building examples
+  cmakeFlags = [
+    "-DBUILD_EXAMPLES=OFF"
+    "-DBUILD_SHARED_LIBS=OFF"
+    "-DSimpleITK_USE_ELASTIX=ON"
+  ];
+
+  meta = with lib; {
+    homepage = "https://www.simpleitk.org";
+    description = "Simplified interface to ITK";
+    changelog = "https://github.com/SimpleITK/SimpleITK/releases/tag/v${finalAttrs.version}";
+    maintainers = with maintainers; [ bcdarwin ];
+    platforms = platforms.linux;
+    license = licenses.asl20;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/slang/default.nix b/nixpkgs/pkgs/development/libraries/slang/default.nix
new file mode 100644
index 000000000000..ab1d9ef50c44
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/slang/default.nix
@@ -0,0 +1,102 @@
+{ lib, stdenv, fetchurl
+, libiconv
+, libpng
+, ncurses
+, pcre
+, readline
+, zlib
+, writeScript
+}:
+
+stdenv.mkDerivation rec {
+  pname = "slang";
+  version = "2.3.3";
+
+  src = fetchurl {
+    url = "https://www.jedsoft.org/releases/slang/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-+RRQVK4TGXPGEgjqgkhtXdEOPFza0jt8SgYXdDyPWhg=";
+  };
+
+  outputs = [ "out" "dev" "man" "doc" ];
+
+  # Fix some wrong hardcoded paths
+  preConfigure = ''
+    sed -ie "s|/usr/lib/terminfo|${ncurses.out}/lib/terminfo|" configure
+    sed -ie "s|/usr/lib/terminfo|${ncurses.out}/lib/terminfo|" src/sltermin.c
+    sed -ie "s|/bin/ln|ln|" src/Makefile.in
+    sed -ie "s|-ltermcap|-lncurses|" ./configure
+  '';
+
+  configureFlags = [
+    "--with-pcre=${pcre.dev}"
+    "--with-png=${libpng.dev}"
+    "--with-readline=${readline.dev}"
+    "--with-z=${zlib.dev}"
+  ];
+
+  buildInputs = [
+    libpng
+    pcre
+    readline
+    zlib
+  ] ++ lib.optionals (stdenv.isDarwin) [ libiconv ];
+
+  propagatedBuildInputs = [ ncurses ];
+
+  buildFlags = lib.optional stdenv.hostPlatform.isStatic "static";
+  installTargets = lib.optional stdenv.hostPlatform.isStatic "install-static";
+
+  preBuild = ''
+    makeFlagsArray+=(AR_CR="${stdenv.cc.targetPrefix}ar cr")
+  '';
+
+  enableParallelBuilding = true;
+
+  postInstall = ''
+    find "$out"/lib/ -name '*.so' -exec chmod +x "{}" \;
+    sed '/^Libs:/s/$/ -lncurses/' -i "$dev"/lib/pkgconfig/slang.pc
+  '';
+
+  passthru = {
+    updateScript = writeScript "update-slang" ''
+      #!/usr/bin/env nix-shell
+      #!nix-shell -i bash -p curl pcre common-updater-scripts
+
+      set -eu -o pipefail
+
+      # Expect the text in format of 'Version 2.3.3</td>'
+      new_version="$(curl -s https://www.jedsoft.org/slang/ |
+          pcregrep -o1 'Version ([0-9.]+)</td>')"
+      update-source-version ${pname} "$new_version"
+    '';
+  };
+
+  meta = with lib; {
+    description = "A small, embeddable multi-platform programming library";
+    longDescription = ''
+      S-Lang is an interpreted language that was designed from the start to be
+      easily embedded into a program to provide it with a powerful extension
+      language. Examples of programs that use S-Lang as an extension language
+      include the jed text editor and the slrn newsreader. Although S-Lang does
+      not exist as a separate application, it is distributed with a quite
+      capable program called slsh ("slang-shell") that embeds the interpreter
+      and allows one to execute S-Lang scripts, or simply experiment with S-Lang
+      at an interactive prompt. Many of the the examples in this document are
+      presented in the context of one of the above applications.
+
+      S-Lang is also a programmer's library that permits a programmer to develop
+      sophisticated platform-independent software. In addition to providing the
+      S-Lang interpreter, the library provides facilities for screen management,
+      keymaps, low-level terminal I/O, etc. However, this document is concerned
+      only with the extension language and does not address these other features
+      of the S-Lang library. For information about the other components of the
+      library, the reader is referred to the S-Lang Library C Programmer's
+      Guide.
+    '';
+    homepage = "http://www.jedsoft.org/slang/";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ AndersonTorres ];
+    mainProgram = "slsh";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/slib/catalog-in-library-vicinity.patch b/nixpkgs/pkgs/development/libraries/slib/catalog-in-library-vicinity.patch
new file mode 100644
index 000000000000..9b803a35fbdd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/slib/catalog-in-library-vicinity.patch
@@ -0,0 +1,29 @@
+Write the catalog in under `(library-vicinity)', which is a subdir of $out,
+rather than under `(implementation-vicinity)', which is a subdir of ${scheme}.
+
+The downside is that we can't build an SLIB for several Schemes at the
+same time.
+
+--- slib/mklibcat.scm	2007-12-24 05:47:34.000000000 +0100
++++ slib/mklibcat.scm	2009-09-29 14:08:28.000000000 +0200
+@@ -17,7 +17,7 @@
+ ;promotional, or sales literature without prior written consent in
+ ;each case.
+ 
+-(let ((catpath (in-vicinity (implementation-vicinity) "slibcat")))
++(let ((catpath (in-vicinity (library-vicinity) "slibcat")))
+   (and (file-exists? catpath) (delete-file catpath))
+   (call-with-output-file catpath
+     (lambda (op)
+
+--- slib/require.scm	2009-08-03 04:09:47.000000000 +0200
++++ slib/require.scm	2009-09-29 14:13:56.000000000 +0200
+@@ -74,7 +74,7 @@
+ 
+ (define (catalog:get feature)
+   (if (not *catalog*)
+-      (let ((slibcat (catalog:try-read (implementation-vicinity) "slibcat")))
++      (let ((slibcat (catalog:try-read (library-vicinity) "slibcat")))
+ 	(cond ((not (catalog/require-version-match? slibcat))
+ 	       (slib:load-source (in-vicinity (library-vicinity) "mklibcat"))
+ 	       (set! slibcat
diff --git a/nixpkgs/pkgs/development/libraries/slib/default.nix b/nixpkgs/pkgs/development/libraries/slib/default.nix
new file mode 100644
index 000000000000..91c32b5dd3a8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/slib/default.nix
@@ -0,0 +1,64 @@
+{ lib, stdenv, fetchurl, scheme, texinfo, unzip }:
+
+stdenv.mkDerivation rec {
+  pname = "slib";
+  version = "3b7";
+
+  src = fetchurl {
+    url = "https://groups.csail.mit.edu/mac/ftpdir/scm/${pname}-${version}.zip";
+    hash = "sha256-9dXNrTNTlaWlqjfv/iiqgHiyFuo5kR9lGSlnjxrCKLY=";
+  };
+
+  patches = [
+    ./catalog-in-library-vicinity.patch
+  ];
+
+  # slib:require unsupported feature color-database
+  postPatch = ''
+    substituteInPlace Makefile \
+      --replace " clrnamdb.scm" ""
+  '';
+
+  nativeBuildInputs = [ scheme texinfo unzip ];
+  buildInputs = [ scheme ];
+
+  postInstall = ''
+    ln -s mklibcat{.scm,}
+    SCHEME_LIBRARY_PATH="$out/lib/slib" make catalogs
+
+    sed -i \
+      -e '2i export PATH="${scheme}/bin:$PATH"' \
+      -e '3i export GUILE_AUTO_COMPILE=0' \
+      $out/bin/slib
+  '';
+
+  # There's no test suite (?!).
+  doCheck = false;
+
+  setupHook = ./setup-hook.sh;
+
+  meta = {
+    description = "The SLIB Portable Scheme Library";
+
+    longDescription = ''
+      SLIB is a portable library for the programming language Scheme.  It
+      provides a platform independent framework for using packages of Scheme
+      procedures and syntax.  As distributed, SLIB contains useful packages
+      for all Scheme implementations.  Its catalog can be transparently
+      extended to accommodate packages specific to a site, implementation,
+      user, or directory.
+
+      SLIB supports Bigloo, Chez, ELK 3.0, Gambit 4.0, Guile, JScheme, Kawa,
+      Larceny, MacScheme, MIT/GNU Scheme, Pocket Scheme, RScheme, scheme->C,
+      Scheme48, SCM, SCM Mac, scsh, sisc, Stk, T3.1, umb-scheme, and VSCM.
+    '';
+
+    # Public domain + permissive (non-copyleft) licensing of some files.
+    license = lib.licenses.publicDomain;
+
+    homepage = "http://people.csail.mit.edu/jaffer/SLIB";
+
+    maintainers = [ ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/slib/setup-hook.sh b/nixpkgs/pkgs/development/libraries/slib/setup-hook.sh
new file mode 100644
index 000000000000..e820d80e7a4e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/slib/setup-hook.sh
@@ -0,0 +1,13 @@
+addSlibPath () {
+    if test -f "$1/lib/slib/slibcat"
+    then
+        export SCHEME_LIBRARY_PATH="$1/lib/slib/"
+        echo "SLIB found in \`$1'; setting \$SCHEME_LIBRARY_PATH to \`$SCHEME_LIBRARY_PATH'"
+
+        # This is needed so that `(load-from-path "slib/guile.init")' works.
+        export GUILE_LOAD_PATH="$1/lib:$GUILE_LOAD_PATH"
+        echo "SLIB: setting \$GUILE_LOAD_PATH to \`$GUILE_LOAD_PATH'"
+    fi
+}
+
+addEnvHooks "$hostOffset" addSlibPath
diff --git a/nixpkgs/pkgs/development/libraries/smarty3-i18n/default.nix b/nixpkgs/pkgs/development/libraries/smarty3-i18n/default.nix
new file mode 100644
index 000000000000..e617ba58e8b4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/smarty3-i18n/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, ... }:
+
+stdenv.mkDerivation rec {
+  pname = "smarty-i18n";
+  version = "1.0";
+
+  src = fetchFromGitHub {
+    owner = "kikimosha";
+    repo = "smarty3-i18n";
+    rev = version;
+    sha256 = "0rjxq4wka73ayna3hb5dxc5pgc8bw8p5fy507yc6cv2pl4h4nji2";
+  };
+
+  installPhase = ''
+    mkdir $out
+    cp block.t.php $out
+  '';
+
+  meta = with lib; {
+    description = "gettext for the smarty3 framework";
+    license = licenses.lgpl21;
+    homepage = "https://github.com/kikimosha/smarty3-i18n";
+    maintainers = with maintainers; [ das_j ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/smarty3/default.nix b/nixpkgs/pkgs/development/libraries/smarty3/default.nix
new file mode 100644
index 000000000000..3bf22261f219
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/smarty3/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchFromGitHub, ... }:
+
+stdenv.mkDerivation rec {
+  pname = "smarty3";
+  version = "3.1.44";
+
+  src = fetchFromGitHub {
+    owner = "smarty-php";
+    repo = "smarty";
+    rev = "v${version}";
+    sha256 = "sha256-9a9OC18jyFpmFXffYOYHZ0j01j4NCF5zwrSYr1fZwqo=";
+  };
+
+  installPhase = ''
+    mkdir $out
+    cp -r libs/* $out
+  '';
+
+  meta = with lib; {
+    description = "Smarty 3 template engine";
+    longDescription = ''
+      Smarty is a template engine for PHP, facilitating the
+      separation of presentation (HTML/CSS) from application
+      logic. This implies that PHP code is application
+      logic, and is separated from the presentation.
+    '';
+    homepage = "https://www.smarty.net";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ das_j ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/smooth/default.nix b/nixpkgs/pkgs/development/libraries/smooth/default.nix
new file mode 100644
index 000000000000..bc4a5601dc45
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/smooth/default.nix
@@ -0,0 +1,60 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, pkg-config
+
+, bzip2
+, curl
+, fribidi
+, gtk3
+, iconv
+, libcpuid
+, libjpeg
+, libpng
+, libwebp
+, libxml2
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "smooth";
+  version = "0.9.10";
+
+  src = fetchFromGitHub {
+    owner = "enzo1982";
+    repo = "smooth";
+    rev = "v${version}";
+    sha256 = "sha256-J2Do1iAbE1GBC8co/4nxOzeGJQiPRc+21fgMDpzKX+A=";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+  ];
+
+  makeFlags = [
+    "prefix=$(out)"
+    "config=systemlibbz2,systemlibcpuid,systemlibcurl,systemlibfribidi,systemlibiconv,systemlibjpeg,systemlibpng,systemlibwebp,systemlibxml2,systemzlib"
+  ];
+
+  buildInputs = [
+    bzip2
+    curl
+    fribidi
+    gtk3
+    iconv
+    libcpuid
+    libjpeg
+    libpng
+    libwebp
+    libxml2
+    zlib
+  ];
+
+  meta = with lib; {
+    description = "The smooth Class Library";
+    license = licenses.artistic2;
+    homepage = "http://www.smooth-project.org/";
+    maintainers = with maintainers; [ shamilton ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/smpeg/default.nix b/nixpkgs/pkgs/development/libraries/smpeg/default.nix
new file mode 100644
index 000000000000..099a3d838bbb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/smpeg/default.nix
@@ -0,0 +1,73 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, SDL, autoconf, automake, libtool, gtk2, m4, pkg-config, libGLU, libGL, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  pname = "smpeg";
+  version = "0.4.5";
+
+  src = fetchFromGitHub {
+    owner = "icculus";
+    repo = "smpeg";
+    rev = "release_${builtins.replaceStrings ["."] ["_"] version}";
+    sha256 = "sha256-nq/i7cFGpJXIuTwN/ScLMX7FN8NMdgdsRM9xOD3uycs=";
+  };
+
+  patches = [
+    ./format.patch
+    ./gcc6.patch
+    ./libx11.patch
+    ./gtk.patch
+    # These patches remove use of the `register` storage class specifier,
+    # allowing smpeg to build with clang 16, which defaults to C++17.
+    (fetchpatch {
+      url = "https://github.com/icculus/smpeg/commit/cc114ba0dd8644c0d6205bbce2384781daeff44b.patch";
+      hash = "sha256-GxSD82j05pw0r2SxmPYAe/BXX4iUc+iHWhB9Ap4GzfA=";
+    })
+    (fetchpatch {
+      url = "https://github.com/icculus/smpeg/commit/b369feca5bf99d6cff50d8eb316395ef48acf24f.patch";
+      hash = "sha256-U+a6dbc5cm249KlUcf4vi79yUiT4hgEvMv522K4PqUc=";
+    })
+  ];
+
+  postPatch = ''
+    substituteInPlace video/gdith.cpp \
+      --replace 'register int' 'int' \
+      --replace 'register Uint16' 'Uint16'
+  '';
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ autoconf automake libtool m4 pkg-config makeWrapper ];
+
+  buildInputs = [ SDL ] ++ lib.optionals (!stdenv.isDarwin) [ gtk2 libGLU libGL ];
+
+  outputs = [ "out" "dev" ];
+
+  preConfigure = ''
+    touch NEWS AUTHORS ChangeLog
+    sh autogen.sh
+  '';
+
+  postInstall = ''
+    sed -i -e 's,"SDL.h",<SDL/SDL.h>,' \
+    -e 's,"SDL_mutex.h",<SDL/SDL_mutex.h>,' \
+    -e 's,"SDL_audio.h",<SDL/SDL_audio.h>,' \
+    -e 's,"SDL_thread.h",<SDL/SDL_thread.h>,' \
+    -e 's,"SDL_types.h",<SDL/SDL_types.h>,' \
+      $dev/include/smpeg/*.h
+
+    moveToOutput bin/smpeg-config "$dev"
+
+    wrapProgram $dev/bin/smpeg-config \
+      --prefix PATH ":" "${pkg-config}/bin" \
+      --prefix PKG_CONFIG_PATH ":" "${lib.getDev SDL}/lib/pkgconfig"
+  '';
+
+  NIX_LDFLAGS = "-lX11";
+
+  meta = {
+    homepage = "http://icculus.org/smpeg/";
+    description = "MPEG decoding library";
+    license = lib.licenses.gpl2Plus;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/smpeg/format.patch b/nixpkgs/pkgs/development/libraries/smpeg/format.patch
new file mode 100644
index 000000000000..8486dee5cda4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/smpeg/format.patch
@@ -0,0 +1,11 @@
+--- a/plaympeg.c	2014-09-04 08:55:10.646132150 +0200
++++ b/plaympeg.c	2014-09-04 08:56:57.465210820 +0200
+@@ -262,7 +262,7 @@
+       answer[i] = c;
+     }
+     answer[i] = 0;
+-    fprintf(stderr, answer + 4);
++    fprintf(stderr, "%s", answer + 4);
+   }
+   while(answer[3] == '-');
+ 
diff --git a/nixpkgs/pkgs/development/libraries/smpeg/gcc6.patch b/nixpkgs/pkgs/development/libraries/smpeg/gcc6.patch
new file mode 100644
index 000000000000..165feb4428c2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/smpeg/gcc6.patch
@@ -0,0 +1,33 @@
+--- a/audio/hufftable.cpp
++++ b/audio/hufftable.cpp
+@@ -9,6 +9,7 @@
+ #include "config.h"
+ #endif
+ 
++#include <climits>
+ #include "MPEGaudio.h"
+ 
+ static const unsigned int
+@@ -550,11 +551,11 @@ htd33[ 31][2]={{ 16,  1},{  8,  1},{  4,
+ 
+ const HUFFMANCODETABLE MPEGaudio::ht[HTN]=
+ {
+-  { 0, 0-1, 0-1, 0,  0, htd33},
++  { 0, UINT_MAX, UINT_MAX, 0,  0, htd33},
+   { 1, 2-1, 2-1, 0,  7,htd01},
+   { 2, 3-1, 3-1, 0, 17,htd02},
+   { 3, 3-1, 3-1, 0, 17,htd03},
+-  { 4, 0-1, 0-1, 0,  0, htd33},
++  { 4, UINT_MAX, UINT_MAX, 0,  0, htd33},
+   { 5, 4-1, 4-1, 0, 31,htd05},
+   { 6, 4-1, 4-1, 0, 31,htd06},
+   { 7, 6-1, 6-1, 0, 71,htd07},
+@@ -564,7 +565,7 @@ const HUFFMANCODETABLE MPEGaudio::ht[HTN
+   {11, 8-1, 8-1, 0,127,htd11},
+   {12, 8-1, 8-1, 0,127,htd12},
+   {13,16-1,16-1, 0,511,htd13},
+-  {14, 0-1, 0-1, 0,  0, htd33},
++  {14, UINT_MAX, UINT_MAX, 0,  0, htd33},
+   {15,16-1,16-1, 0,511,htd15},
+   {16,16-1,16-1, 1,511,htd16},
+   {17,16-1,16-1, 2,511,htd16},
diff --git a/nixpkgs/pkgs/development/libraries/smpeg/gtk.patch b/nixpkgs/pkgs/development/libraries/smpeg/gtk.patch
new file mode 100644
index 000000000000..8f9f2f492ed1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/smpeg/gtk.patch
@@ -0,0 +1,15 @@
+diff '--color=auto' -Naur smpeg-r390.orig/acinclude/gtk-2.0.m4 smpeg-r390/acinclude/gtk-2.0.m4
+--- smpeg-r390.orig/acinclude/gtk-2.0.m4	1970-01-01 08:00:01.000000000 +0800
++++ smpeg-r390/acinclude/gtk-2.0.m4	2021-12-16 15:52:17.776001058 +0800
+@@ -24,10 +24,8 @@
+ 
+   no_gtk=""
+ 
+-  AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+-
+   if test x$PKG_CONFIG != xno ; then
+-    if pkg-config --atleast-pkgconfig-version 0.7 ; then
++    if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
+       :
+     else
+       echo "*** pkg-config too old; version 0.7 or better required."
diff --git a/nixpkgs/pkgs/development/libraries/smpeg/libx11.patch b/nixpkgs/pkgs/development/libraries/smpeg/libx11.patch
new file mode 100644
index 000000000000..8611073780f3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/smpeg/libx11.patch
@@ -0,0 +1,25 @@
+Index: smpeg-0.4.5+cvs20030824/Makefile.am
+===================================================================
+--- smpeg-0.4.5+cvs20030824.orig/Makefile.am
++++ smpeg-0.4.5+cvs20030824/Makefile.am
+@@ -74,7 +74,7 @@
+ 
+ # Sources for gtv
+ gtv_SOURCES = gtv.c gtv.h
+-gtv_LDADD = @GTK_LIBS@ libsmpeg.la
++gtv_LDADD = @GTK_LIBS@ @X11_LIBS@ libsmpeg.la
+ 
+ # Sources for glmovie
+ glmovie_SOURCES = glmovie-tile.c glmovie.c glmovie.h
+Index: smpeg-0.4.5+cvs20030824/configure.in
+===================================================================
+--- smpeg-0.4.5+cvs20030824.orig/configure.in
++++ smpeg-0.4.5+cvs20030824/configure.in
+@@ -215,6 +215,7 @@
+         CFLAGS="$CFLAGS $GTK_CFLAGS"
+     fi
+     AC_SUBST(GTK_LIBS)
++    PKG_CHECK_MODULES([X11], [x11])
+ fi
+ AM_CONDITIONAL(HAVE_GTK, test x$have_gtk = xyes)
+ 
diff --git a/nixpkgs/pkgs/development/libraries/smpeg2/default.nix b/nixpkgs/pkgs/development/libraries/smpeg2/default.nix
new file mode 100644
index 000000000000..24dd9c9dc400
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/smpeg2/default.nix
@@ -0,0 +1,49 @@
+{ lib, stdenv
+, autoconf
+, automake
+, darwin
+, fetchFromGitHub
+, makeWrapper
+, pkg-config
+, SDL2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "smpeg2";
+  version = "unstable-2022-05-26";
+
+  src = fetchFromGitHub {
+    owner = "icculus";
+    repo = "smpeg";
+    rev = "c5793e5f3f2765fc09c24380d7e92136a0e33d3b";
+    sha256 = "sha256-Z0u83K1GIXd0jUYo5ZyWUH2Zt7Hn8z+yr06DAtAEukw=";
+  };
+
+  nativeBuildInputs = [ autoconf automake makeWrapper pkg-config ];
+
+  buildInputs = [ SDL2 ]
+    ++ lib.optional stdenv.isDarwin darwin.libobjc;
+
+  outputs = [ "out" "dev" "man" ];
+
+  preConfigure = ''
+    sh autogen.sh
+  '';
+
+  postInstall = ''
+    moveToOutput bin/smpeg2-config "$dev"
+    wrapProgram $dev/bin/smpeg2-config \
+      --prefix PATH ":" "${pkg-config}/bin" \
+      --prefix PKG_CONFIG_PATH ":" "${SDL2.dev}/lib/pkgconfig"
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "http://icculus.org/smpeg/";
+    description = "SDL2 MPEG Player Library";
+    license = licenses.lgpl2;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ orivej ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/snap7/default.nix b/nixpkgs/pkgs/development/libraries/snap7/default.nix
new file mode 100644
index 000000000000..f83ee00d04fd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/snap7/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, lib, fetchFromGitHub, fetchzip, p7zip }:
+
+stdenv.mkDerivation rec {
+  pname = "snap7";
+  version = "1.4.2";
+
+  src = fetchzip {
+    url = "mirror://sourceforge/snap7/${version}/snap7-full-${version}.7z";
+    sha256 = "1n5gs8bwb6g9vfllf3x12r5yzqzapmlq1bmc6hl854b8vkg30y8c";
+    postFetch = ''
+      ${p7zip}/bin/7z x $downloadedFile
+      mkdir $out
+      cp -r snap7-full-${version}/* $out/
+    '';
+  };
+
+  outputs = [ "out" "dev" "doc" ];
+
+  makefile = "x86_64_linux.mk";
+  makeFlags = [ "LibInstall=$(out)/lib" ];
+
+  preBuild = "cd build/unix";
+  preInstall = ''
+    mkdir -p $out/lib
+    mkdir -p $dev/include
+    mkdir -p $doc/share
+    cp $src/examples/cpp/snap7.h $dev/include
+    cp -r $src/doc $doc/share/
+  '';
+
+  meta = with lib; {
+    homepage = "https://snap7.sourceforge.net/";
+    description = "Step7 Open Source Ethernet Communication Suite";
+    license = licenses.lgpl3;
+    maintainers = with maintainers; [ freezeboy ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/snappy/default.nix b/nixpkgs/pkgs/development/libraries/snappy/default.nix
new file mode 100644
index 000000000000..004dd388385f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/snappy/default.nix
@@ -0,0 +1,68 @@
+{ lib, stdenv, fetchFromGitHub, cmake
+, fetchpatch
+, static ? stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+  pname = "snappy";
+  version = "1.1.10";
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "snappy";
+    rev = version;
+    hash = "sha256-wYZkKVDXKCugycx/ZYhjV0BjM/NrEM0R6A4WFhs/WPU=";
+  };
+
+  patches = [
+    # Re-enable RTTI, without which other applications can't subclass
+    # snappy::Source (this breaks Ceph, as one example)
+    # https://tracker.ceph.com/issues/53060
+    # https://build.opensuse.org/package/show/openSUSE:Factory/snappy
+    (fetchpatch {
+      url = "https://build.opensuse.org/public/source/openSUSE:Factory/snappy/reenable-rtti.patch?rev=a759aa6fba405cd40025e3f0ab89941d";
+      sha256 = "sha256-RMuM5yd6zP1eekN/+vfS54EyY4cFbGDVor1E1vj3134=";
+    })
+    # Fix -Wsign-compare warning on clang.
+    (fetchpatch {
+      url = "https://github.com/google/snappy/commit/27f34a580be4a3becf5f8c0cba13433f53c21337.patch";
+      sha256 = "sha256-eq6ueeMAkd2bYmPJcKAZZzd5QlXyeWOrsxFIwR8KOpQ=";
+    })
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
+    "-DSNAPPY_BUILD_TESTS=OFF"
+    "-DSNAPPY_BUILD_BENCHMARKS=OFF"
+  ];
+
+  postInstall = ''
+    substituteInPlace "$out"/lib/cmake/Snappy/SnappyTargets.cmake \
+      --replace 'INTERFACE_INCLUDE_DIRECTORIES "''${_IMPORT_PREFIX}/include"' 'INTERFACE_INCLUDE_DIRECTORIES "'$dev'"'
+
+    mkdir -p $dev/lib/pkgconfig
+    cat <<EOF > $dev/lib/pkgconfig/snappy.pc
+      Name: snappy
+      Description: Fast compressor/decompressor library.
+      Version: ${version}
+      Libs: -L$out/lib -lsnappy
+      Cflags: -I$dev/include
+    EOF
+  '';
+
+  #checkTarget = "test";
+
+  # requires gbenchmark and gtest but it also installs them out $dev
+  doCheck = false;
+
+  meta = with lib; {
+    homepage = "https://google.github.io/snappy/";
+    license = licenses.bsd3;
+    description = "Compression/decompression library for very high speeds";
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/soci/bc-soci.nix b/nixpkgs/pkgs/development/libraries/soci/bc-soci.nix
new file mode 100644
index 000000000000..d728d61a8f57
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/soci/bc-soci.nix
@@ -0,0 +1,53 @@
+{ cmake
+, fetchFromGitLab
+, fetchpatch
+, sqlite
+, boost
+, lib
+, stdenv
+}:
+
+stdenv.mkDerivation rec {
+  pname = "bc-soci";
+  version = "linphone-4.4.1";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.linphone.org";
+    group = "BC";
+    owner = "public/external";
+    repo = "soci";
+    rev = "bc8ce0c5628dd48eca6ef5ce0a0a2f52547d88b6";
+    sha256 = "sha256-qo26aYp/G2C6UkGA1qkHQwTKD5go7TQ9JWxb9xtbe6M=";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "fix-backend-search-path.patch";
+      url = "https://github.com/SOCI/soci/commit/56c93afc467bdba8ffbe68739eea76059ea62f7a.patch";
+      sha256 = "sha256-nC/39pn3Cv5e65GgIfF3l64/AbCsfZHPUPIWETZFZAY=";
+    })
+  ];
+
+  cmakeFlags = [
+    # Do not build static libraries
+    "-DSOCI_SHARED=YES"
+    "-DSOCI_STATIC=OFF"
+
+    "-DSOCI_TESTS=NO"
+    "-DWITH_SQLITE3=YES"
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [
+    sqlite
+    boost
+  ];
+
+  meta = with lib; {
+    description = "Database access library for C++. Belledonne Communications' fork for Linphone.";
+    homepage = "https://gitlab.linphone.org/BC/public/external/soci";
+    license = licenses.boost;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ thibaultlemaire ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/soci/default.nix b/nixpkgs/pkgs/development/libraries/soci/default.nix
new file mode 100644
index 000000000000..007a4fbaf7bf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/soci/default.nix
@@ -0,0 +1,51 @@
+{ cmake
+, fetchFromGitHub
+, fetchpatch
+, sqlite
+, postgresql
+, boost
+, darwin
+, lib, stdenv
+}:
+let
+  inherit (darwin.apple_sdk_11_0.frameworks) Kerberos;
+in
+stdenv.mkDerivation rec {
+  pname = "soci";
+  version = "4.0.2";
+
+  src = fetchFromGitHub {
+    owner = "SOCI";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-NE0ApbX8HG2VAQ9cg9+kX3kJQ4PR1XvWL9BlT8NphmE=";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "fix-backend-search-path.patch";
+      url = "https://github.com/SOCI/soci/commit/56c93afc467bdba8ffbe68739eea76059ea62f7a.patch";
+      sha256 = "sha256-nC/39pn3Cv5e65GgIfF3l64/AbCsfZHPUPIWETZFZAY=";
+    })
+  ];
+
+  # Do not build static libraries
+  cmakeFlags = [ "-DSOCI_STATIC=OFF" "-DCMAKE_CXX_STANDARD=11" "-DSOCI_TESTS=off" ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [
+    sqlite
+    postgresql
+    boost
+  ] ++ lib.optionals stdenv.isDarwin [
+    Kerberos
+  ];
+
+  meta = with lib; {
+    description = "Database access library for C++";
+    homepage = "https://soci.sourceforge.net/";
+    license = licenses.boost;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ jluttine ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/socket_wrapper/default.nix b/nixpkgs/pkgs/development/libraries/socket_wrapper/default.nix
new file mode 100644
index 000000000000..0a7f5ac91eaa
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/socket_wrapper/default.nix
@@ -0,0 +1,20 @@
+{ lib, stdenv, fetchurl, cmake, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "socket_wrapper";
+  version = "1.4.2";
+
+  src = fetchurl {
+    url = "mirror://samba/cwrap/socket_wrapper-${version}.tar.gz";
+    sha256 = "sha256-CgjsJJ3Z/7s7FtV3s1LVc1YfV77uw1lhgqxuyORrmrY=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  meta = with lib; {
+    description = "A library passing all socket communications through unix sockets";
+    homepage = "https://git.samba.org/?p=socket_wrapper.git;a=summary;";
+    license = licenses.bsd3;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/sofia-sip/default.nix b/nixpkgs/pkgs/development/libraries/sofia-sip/default.nix
new file mode 100644
index 000000000000..b9f34eeb9748
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sofia-sip/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub, glib, openssl, pkg-config, autoreconfHook, SystemConfiguration }:
+
+stdenv.mkDerivation rec {
+  pname = "sofia-sip";
+  version = "1.13.17";
+
+  src = fetchFromGitHub {
+    owner = "freeswitch";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-7QmK2UxEO5lC0KBDWB3bwKTy0Nc7WrdTLjoQYzezoaY=";
+  };
+
+  buildInputs = [ glib openssl ] ++ lib.optional stdenv.isDarwin SystemConfiguration;
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  meta = with lib; {
+    description = "Open-source SIP User-Agent library, compliant with the IETF RFC3261 specification";
+    homepage = "https://github.com/freeswitch/sofia-sip";
+    platforms = platforms.unix;
+    license = licenses.lgpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/soil/default.nix b/nixpkgs/pkgs/development/libraries/soil/default.nix
new file mode 100644
index 000000000000..39a64c84ddcd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/soil/default.nix
@@ -0,0 +1,46 @@
+{ stdenv, lib
+, Carbon
+, fetchzip
+, libGL
+, libX11
+}:
+
+stdenv.mkDerivation {
+  pname = "soil";
+  version = "unstable-2020-01-04";
+
+  src = fetchzip {
+    url = "https://web.archive.org/web/20200104042737id_/http://www.lonesock.net/files/soil.zip";
+    sha256 = "1c05nwbnfdgwaz8ywn7kg2xrcvrcbpdyhcfkkiiwk69zvil0pbgd";
+  };
+
+  buildInputs = if stdenv.hostPlatform.isDarwin then [
+    Carbon
+  ] else [
+    libGL
+    libX11
+  ];
+
+  buildPhase = ''
+    cd src
+    $CC $NIX_CFLAGS_COMPILE -c *.c
+    $AR rcs libSOIL.a *.o
+  '';
+  installPhase = ''
+    mkdir -p $out/lib $out/include/SOIL
+    cp libSOIL.a $out/lib/
+    cp SOIL.h $out/include/SOIL/
+  '';
+
+  meta = with lib; {
+    description = "Simple OpenGL Image Library";
+    longDescription = ''
+      SOIL is a tiny C library used primarily for uploading textures
+      into OpenGL.
+    '';
+    homepage = "https://www.lonesock.net/soil.html";
+    license = licenses.publicDomain;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ r-burns ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/sokol/default.nix b/nixpkgs/pkgs/development/libraries/sokol/default.nix
new file mode 100644
index 000000000000..b84f42490e33
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sokol/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation {
+  pname = "sokol";
+  version = "unstable-2023-08-04";
+
+  src = fetchFromGitHub {
+    owner = "floooh";
+    repo = "sokol";
+    rev = "47d92ff86298fc96b3b84d93d0ee8c8533d3a2d2";
+    sha256 = "sha256-TsM5wK9a2ectrAY8VnrMPaxCNV3e1yW92SBBCHgs+0k=";
+  };
+
+  dontBuild = true;
+  dontConfigure = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/include/sokol
+    cp *.h $out/include/sokol/
+    cp -R util $out/include/sokol/util
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Minimal cross-platform standalone C headers";
+    homepage = "https://github.com/floooh/sokol";
+    license = licenses.zlib;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ jonnybolton ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/sol2/default.nix b/nixpkgs/pkgs/development/libraries/sol2/default.nix
new file mode 100644
index 000000000000..5ec615942545
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sol2/default.nix
@@ -0,0 +1,36 @@
+{ fetchFromGitHub
+, lib
+, stdenv
+, cmake
+, lua
+}:
+stdenv.mkDerivation (finalAttrs: {
+  pname = "sol2";
+  version = "3.3.1";
+  src = fetchFromGitHub {
+    owner = "ThePhD";
+    repo = "sol2";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-7QHZRudxq3hdsfEAYKKJydc4rv6lyN6UIt/2Zmaejx8=";
+  };
+
+  nativeBuildInputs = [ cmake lua ];
+
+  cmakeFlags = [
+    "-DSOL2_LUA_VERSION=${lua.version}"
+    "-DSOL2_BUILD_LUA=FALSE"
+  ];
+
+  meta = with lib;{
+    description = "Lua API wrapper with advanced features and top notch performance";
+    longDescription = ''
+      sol2 is a C++ library binding to Lua.
+      It currently supports all Lua versions 5.1+ (LuaJIT 2.0+ and MoonJIT included).
+      sol2 aims to be easy to use and easy to add to a project.
+      The library is header-only for easy integration with projects, and a single header can be used for drag-and-drop start up.
+    '';
+    homepage = "https://github.com/ThePhD/sol2";
+    license = licenses.mit;
+    maintainers = with maintainers; [ mrcjkb ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/sonic/default.nix b/nixpkgs/pkgs/development/libraries/sonic/default.nix
new file mode 100644
index 000000000000..ba3164db11aa
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sonic/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, fftw, installShellFiles }:
+
+stdenv.mkDerivation {
+  pname = "sonic-unstable";
+  version = "2020-12-27";
+
+  src = fetchFromGitHub {
+    owner = "waywardgeek";
+    repo = "sonic";
+    rev = "4a052d9774387a9d9b4af627f6a74e1694419960";
+    sha256 = "0ah54nizb6iwcx277w104wsfnx05vrp4sh56d2pfxhf8xghg54m6";
+  };
+
+  makeFlags = [ "PREFIX=${placeholder "out"}" "CC=${stdenv.cc.targetPrefix}cc" ];
+
+  nativeBuildInputs = [ installShellFiles ];
+
+  buildInputs = [ fftw ];
+
+  postInstall = ''
+    installManPage sonic.1
+  '' + lib.optionalString stdenv.isDarwin ''
+    install_name_tool -id $out/lib/libsonic.so.0.3.0 $out/lib/libsonic.so.0.3.0
+  '';
+
+  meta = with lib; {
+    description = "Simple library to speed up or slow down speech";
+    homepage = "https://github.com/waywardgeek/sonic";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ aske ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/sonivox/default.nix b/nixpkgs/pkgs/development/libraries/sonivox/default.nix
new file mode 100644
index 000000000000..3ad01725966c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sonivox/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "sonivox";
+  version = "3.6.12";
+
+  src = fetchFromGitHub {
+    owner = "pedrolcl";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-df3EwscTF9n1fazz5Oa3FIXgWXHruhJBzMt8Y+ELP94=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    homepage = "https://github.com/pedrolcl/sonivox";
+    description = "MIDI synthesizer library";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ orivej ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/sope/default.nix b/nixpkgs/pkgs/development/libraries/sope/default.nix
new file mode 100644
index 000000000000..fb77eebce1e9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sope/default.nix
@@ -0,0 +1,64 @@
+{ gnustep, lib, fetchFromGitHub, fetchpatch, libxml2, openssl
+, openldap, mariadb, libmysqlclient, postgresql }:
+
+gnustep.stdenv.mkDerivation rec {
+  pname = "sope";
+  version = "5.9.0";
+
+  src = fetchFromGitHub {
+    owner = "inverse-inc";
+    repo = pname;
+    rev = "SOPE-${version}";
+    hash = "sha256-JZh8sC/w2MRy3UyWYGMvU47XtWKGnLuUlCsVyyxd7zg=";
+  };
+
+  patches = [
+    (fetchpatch {  # https://github.com/Alinto/sope/pull/66
+      name = "sope-fix-gnustep-1.29.0+.patch";
+      url = "https://github.com/Alinto/sope/pull/66/commits/9ec2744cc851b11886c3ebb723138e4d672bd5c7.patch";
+      hash = "sha256-JgYRwjmjlitgzYz9Jfei5XJRThP1TunPjI0g5M2wZPA=";
+    })
+  ];
+
+  nativeBuildInputs = [ gnustep.make ];
+  buildInputs = [ gnustep.base libxml2 openssl ]
+    ++ lib.optional (openldap != null) openldap
+    ++ lib.optionals (mariadb != null) [ libmysqlclient mariadb ]
+    ++ lib.optional (postgresql != null) postgresql;
+
+  # Configure directories where files are installed to. Everything is automatically
+  # put into $out (thanks GNUstep) apart from the makefiles location which is where
+  # makefiles are read from during build but also where the SOPE makefiles are
+  # installed to in the install phase. We move them over after the installation.
+  preConfigure = ''
+    mkdir -p /build/Makefiles
+    ln -s ${gnustep.make}/share/GNUstep/Makefiles/* /build/Makefiles
+    cat <<EOF > /build/GNUstep.conf
+    GNUSTEP_MAKEFILES=/build/Makefiles
+    EOF
+  '';
+
+  configureFlags = [ "--prefix=" "--disable-debug" "--enable-xml" "--with-ssl=ssl" ]
+    ++ lib.optional (openldap != null) "--enable-openldap"
+    ++ lib.optional (mariadb != null) "--enable-mysql"
+    ++ lib.optional (postgresql != null) "--enable-postgresql";
+
+  env = {
+    GNUSTEP_CONFIG_FILE = "/build/GNUstep.conf";
+    NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
+  };
+
+  # Move over the makefiles (see comment over preConfigure)
+  postInstall = ''
+    mkdir -p $out/share/GNUstep/Makefiles
+    find /build/Makefiles -mindepth 1 -maxdepth 1 -not -type l -exec cp -r '{}' $out/share/GNUstep/Makefiles \;
+  '';
+
+  meta = with lib; {
+    description = "An extensive set of frameworks which form a complete Web application server environment";
+    license = licenses.publicDomain;
+    homepage = "https://github.com/inverse-inc/sope";
+    platforms = platforms.linux;
+    maintainers = with maintainers; [];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/soqt/default.nix b/nixpkgs/pkgs/development/libraries/soqt/default.nix
new file mode 100644
index 000000000000..fe7901bddd58
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/soqt/default.nix
@@ -0,0 +1,29 @@
+{ fetchFromGitHub, lib, stdenv, coin3d, qtbase, cmake, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "soqt";
+  version = "2020-12-05-unstable";
+
+  src = fetchFromGitHub {
+    owner = "coin3d";
+    repo = "soqt";
+    # rev = "SoQt-${version}";
+    rev = "fb8f655632bb9c9c60e0ff9fa69a5ba22d3ff99d";
+    sha256 = "sha256-YoBq8P3Tag2Sepqxf/qIcJDBhH/gladBmDUj78aacZs=";
+    fetchSubmodules = true;
+  };
+
+  buildInputs = [ coin3d qtbase ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  dontWrapQtApps = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/coin3d/soqt";
+    license = licenses.bsd3;
+    description = "Glue between Coin high-level 3D visualization library and Qt";
+    maintainers = with maintainers; [ gebner viric ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/sord/default.nix b/nixpkgs/pkgs/development/libraries/sord/default.nix
new file mode 100644
index 000000000000..6ce3ca60c0f5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sord/default.nix
@@ -0,0 +1,46 @@
+{ lib
+, stdenv
+, doxygen
+, fetchFromGitHub
+, meson
+, ninja
+, pcre2
+, pkg-config
+, python3
+, serd
+, zix
+}:
+
+stdenv.mkDerivation rec {
+  pname = "sord";
+  version = "0.16.16";
+
+  src = fetchFromGitHub {
+    owner = "drobilla";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-GDs1m8KoEhJDdCf7kacQMZzCNPoZhESJds6KupQvOkU=";
+  };
+
+  outputs = [ "out" "dev" "doc" "man" ];
+
+  nativeBuildInputs = [
+    doxygen
+    meson
+    ninja
+    pkg-config
+    python3
+  ];
+  buildInputs = [ pcre2 ];
+  propagatedBuildInputs = [ serd zix ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    homepage = "http://drobilla.net/software/sord";
+    description = "A lightweight C library for storing RDF data in memory";
+    license = with licenses; [ bsd0 isc ];
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/soundtouch/default.nix b/nixpkgs/pkgs/development/libraries/soundtouch/default.nix
new file mode 100644
index 000000000000..c337edfa0917
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/soundtouch/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, lib, fetchFromGitea, autoconf, automake, libtool }:
+
+stdenv.mkDerivation rec {
+  pname = "soundtouch";
+  version = "2.3.2";
+
+  src = fetchFromGitea {
+    domain = "codeberg.org";
+    owner = "soundtouch";
+    repo = "soundtouch";
+    rev = version;
+    sha256 = "sha256-+RprzCn0NCueHhDkk2Lgg7Ihw8JDzu25eIVoVZwF+BA=";
+  };
+
+  nativeBuildInputs = [ autoconf automake libtool ];
+
+  preConfigure = "./bootstrap";
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "A program and library for changing the tempo, pitch and playback rate of audio";
+    homepage = "https://www.surina.net/soundtouch/";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ orivej ];
+    mainProgram = "soundstretch";
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/soxt/default.nix b/nixpkgs/pkgs/development/libraries/soxt/default.nix
new file mode 100644
index 000000000000..4e155f496ec2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/soxt/default.nix
@@ -0,0 +1,24 @@
+{ fetchhg, lib, stdenv, cmake, coin3d, motif, libXext, libXmu, libGLU, libGL }:
+
+stdenv.mkDerivation {
+  pname = "soxt";
+  version = "unstable-2019-06-14";
+
+  src = fetchhg {
+    url = "https://bitbucket.org/Coin3D/soxt";
+    rev = "85e135bb266fbb17e47fc336b876a576a239c15c";
+    sha256 = "0vk5cgn53yqf7csqdnlnyyhi4mbgx4wlsq70613p5fgxlvxzhcym";
+    fetchSubrepos = true;
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ coin3d motif libGLU libGL libXext libXmu ];
+
+  meta = with lib; {
+    homepage = "https://bitbucket.org/Coin3D/coin/wiki/Home";
+    license = licenses.bsd3;
+    description = "A GUI binding for using Open Inventor with Xt/Motif";
+    maintainers = with maintainers; [ tmplt ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/span-lite/default.nix b/nixpkgs/pkgs/development/libraries/span-lite/default.nix
new file mode 100644
index 000000000000..1af8466a4d07
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/span-lite/default.nix
@@ -0,0 +1,29 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "span-lite";
+  version = "0.10.3";
+
+  src = fetchFromGitHub {
+    owner = "martinmoene";
+    repo = "span-lite";
+    rev = "v${version}";
+    hash = "sha256-WfoyyPLBqXSGGATWN/wny6P++3aCmQMOMLCARhB+R3c=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  meta = {
+    description = "A C++20-like span for C++98, C++11 and later in a single-file header-only library";
+    homepage = "https://github.com/martinmoene/span-lite";
+    license = lib.licenses.bsd1;
+    maintainers = with lib.maintainers; [ icewind1991 ];
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/spandsp/3.nix b/nixpkgs/pkgs/development/libraries/spandsp/3.nix
new file mode 100644
index 000000000000..9e916273809f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/spandsp/3.nix
@@ -0,0 +1,20 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, audiofile
+, libtiff
+, autoreconfHook
+, fetchpatch
+, buildPackages
+, callPackage
+}:
+
+(callPackage ./common.nix {}).overrideAttrs(previousAttrs: {
+  version = "3.0.0";
+  src = fetchFromGitHub {
+    owner = "freeswitch";
+    repo = previousAttrs.pname;
+    rev = "6ec23e5a7e411a22d59e5678d12c4d2942c4a4b6"; # upstream does not seem to believe in tags
+    sha256 = "03w0s99y3zibi5fnvn8lk92dggfgrr0mz5255745jfbz28b2d5y7";
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/spandsp/common.nix b/nixpkgs/pkgs/development/libraries/spandsp/common.nix
new file mode 100644
index 000000000000..6b58230b80da
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/spandsp/common.nix
@@ -0,0 +1,52 @@
+{ lib
+, stdenv
+, fetchurl
+, audiofile
+, libtiff
+, buildPackages
+, fetchpatch
+, autoreconfHook
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "spandsp";
+
+  patches = [
+    # submitted upstream: https://github.com/freeswitch/spandsp/pull/47
+    (fetchpatch {
+      url = "https://github.com/freeswitch/spandsp/commit/1f810894804d3fa61ab3fc2f3feb0599145a3436.patch";
+      hash = "sha256-Cf8aaoriAvchh5cMb75yP2gsZbZaOLha/j5mq3xlkVA=";
+    })
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ autoreconfHook ];
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+  propagatedBuildInputs = [ audiofile libtiff ];
+
+  configureFlags = [
+    # This flag is required to prevent linking error in the cross-compilation case.
+    # I think it's fair to assume that realloc(NULL, size) will return a valid memory
+    # block for most libc implementation, so let's just assume that and hope for the best.
+    "ac_cv_func_malloc_0_nonnull=yes"
+  ];
+
+  enableParallelBuilding = true;
+
+  makeFlags = [
+    "CC=${stdenv.cc.targetPrefix}cc"
+    "CC_FOR_BUILD=${buildPackages.stdenv.cc}/bin/cc"
+  ];
+
+  strictDeps = true;
+
+  meta = {
+    description = "A portable and modular SIP User-Agent with audio and video support";
+    homepage = "https://github.com/freeswitch/spandsp";
+    platforms = with lib.platforms; unix;
+    maintainers = with lib.maintainers; [ misuzu ];
+    license = lib.licenses.gpl2;
+    downloadPage = "http://www.soft-switch.org/downloads/spandsp/";
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/spandsp/default.nix b/nixpkgs/pkgs/development/libraries/spandsp/default.nix
new file mode 100644
index 000000000000..cf5e53c3f911
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/spandsp/default.nix
@@ -0,0 +1,18 @@
+{ lib
+, stdenv
+, fetchurl
+, audiofile
+, libtiff
+, buildPackages
+, fetchpatch
+, autoreconfHook
+, callPackage
+}:
+
+(callPackage ./common.nix {}).overrideAttrs(_: rec {
+  version = "0.0.6";
+  src = fetchurl {
+    url = "https://www.soft-switch.org/downloads/spandsp/spandsp-${version}.tar.gz";
+    sha256 = "0rclrkyspzk575v8fslzjpgp4y2s4x7xk3r55ycvpi4agv33l1fc";
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/sparrow3d/default.nix b/nixpkgs/pkgs/development/libraries/sparrow3d/default.nix
new file mode 100644
index 000000000000..a502b6249a16
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sparrow3d/default.nix
@@ -0,0 +1,98 @@
+{ lib
+, stdenv
+, copyPkgconfigItems
+, fetchFromGitHub
+, makePkgconfigItem
+, pkg-config
+, SDL
+, SDL_image
+, SDL_mixer
+, SDL_net
+, SDL_ttf
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "sparrow3d";
+  version = "unstable-2020-10-06";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "theZiz";
+    repo = "sparrow3d";
+    rev = "2033349d7adeba34bda2c442e1fec22377471134";
+    hash = "sha256-28j5nbTYBrMN8BQ6XrTlO1D8Viw+RiT3MAl99BAbhR4=";
+  };
+
+  pkgconfigItems = [
+    (makePkgconfigItem rec {
+      name = "sparrow3d";
+      inherit (finalAttrs) version;
+      inherit (finalAttrs.meta) description;
+
+      cflags = [ "-isystem${variables.includedir}" ];
+      libs = [
+        "-L${variables.libdir}"
+        "-lsparrow3d"
+        "-lsparrowNet"
+        "-lsparrowSound"
+      ];
+      variables = rec {
+        prefix = "@dev@";
+        exec_prefix = "@out@";
+        includedir = "${prefix}/include";
+        libdir = "${exec_prefix}/lib";
+      };
+    })
+  ];
+
+  nativeBuildInputs = [
+    copyPkgconfigItems
+    pkg-config
+  ];
+
+  propagatedBuildInputs = [
+    SDL.dev
+    SDL_image
+    SDL_ttf
+    SDL_mixer
+    SDL_net
+  ];
+
+  postConfigure = ''
+    NIX_CFLAGS_COMPILE=$(pkg-config --cflags SDL_image SDL_ttf SDL_mixer SDL_net)
+  '';
+
+  buildFlags = [ "dynamic" ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/lib
+    cp libsparrow{3d,Net,Sound}.so $out/lib
+
+    mkdir -p $dev/include
+    cp sparrow*.h $dev/include
+
+    runHook postInstall
+  '';
+
+  doCheck = true;
+
+  checkPhase = ''
+    runHook preCheck
+
+    make all_no_static
+    ./testfile.sh
+
+    runHook postCheck
+  '';
+
+  meta = {
+    homepage = "https://github.com/theZiz/sparrow3d";
+    description = "A software renderer for different open handhelds like the gp2x, wiz, caanoo and pandora";
+    license = lib.licenses.lgpl21;
+    maintainers = with lib.maintainers; [ colinsane ];
+    platforms = lib.platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/sparrow3d/sparrow3d.pc.in b/nixpkgs/pkgs/development/libraries/sparrow3d/sparrow3d.pc.in
new file mode 100644
index 000000000000..ac87c4ff278b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sparrow3d/sparrow3d.pc.in
@@ -0,0 +1,16 @@
+prefix=@out@
+includedir=${prefix}/include
+libdir=${prefix}/lib
+
+Name: sparrow3d
+Description: a software renderer for different open handhelds like the gp2x, wiz, caanoo and pandora
+URL: https://github.com/theZiz/sparrow3d
+Version: @version@
+Requires: \
+  sdl \
+  SDL_image \
+  SDL_ttf \
+  SDL_mixer \
+  SDL_net
+Cflags: -isystem${includedir}
+Libs: -L${libdir} -lsparrow3d -lsparrowNet -lsparrowSound
diff --git a/nixpkgs/pkgs/development/libraries/sparsehash/default.nix b/nixpkgs/pkgs/development/libraries/sparsehash/default.nix
new file mode 100644
index 000000000000..35208d021b83
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sparsehash/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "sparsehash";
+  version = "2.0.4";
+
+  src = fetchFromGitHub {
+    owner = "sparsehash";
+    repo = "sparsehash";
+    rev = "sparsehash-${version}";
+    sha256 = "1pf1cjvcjdmb9cd6gcazz64x0cd2ndpwh6ql2hqpypjv725xwxy7";
+  };
+
+  meta = with lib; {
+    homepage = "https://github.com/sparsehash/sparsehash";
+    description = "An extremely memory-efficient hash_map implementation";
+    platforms = platforms.all;
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ pSub ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/spdk/0001-fix-setuptools-installation.patch b/nixpkgs/pkgs/development/libraries/spdk/0001-fix-setuptools-installation.patch
new file mode 100644
index 000000000000..3c3fb50fc152
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/spdk/0001-fix-setuptools-installation.patch
@@ -0,0 +1,29 @@
+From 3f718fc1873c9c138684ea019e9bd42c9b24506c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
+Date: Tue, 28 Nov 2023 11:28:11 +0100
+Subject: [PATCH] fix setuptools installation
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
+---
+ python/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/python/Makefile b/python/Makefile
+index f835daa..b41995a 100644
+--- a/python/Makefile
++++ b/python/Makefile
+@@ -12,7 +12,7 @@ setup_cmd += --root $(DESTDIR)
+ endif
+ 
+ ifneq ($(CONFIG_PYDIR),)
+-setup_cmd += --install-purelib $(CONFIG_PYDIR)
++setup_cmd += --root / --prefix $(CONFIG_PYDIR)
+ purelibdir := $(CONFIG_PYDIR)
+ else
+ purelibdir := $(shell python3 -c "import sysconfig; print(sysconfig.get_paths()['purelib'])")
+-- 
+2.42.0
+
diff --git a/nixpkgs/pkgs/development/libraries/spdk/default.nix b/nixpkgs/pkgs/development/libraries/spdk/default.nix
new file mode 100644
index 000000000000..c62f54b14091
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/spdk/default.nix
@@ -0,0 +1,89 @@
+{ lib, stdenv
+, fetchFromGitHub
+, ncurses
+, python3
+, cunit
+, dpdk
+, libaio
+, libbsd
+, libuuid
+, numactl
+, openssl
+, pkg-config
+, zlib
+, libpcap
+, libnl
+, libelf
+, jansson
+, ensureNewerSourcesForZipFilesHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "spdk";
+
+  version = "23.09";
+
+  src = fetchFromGitHub {
+    owner = "spdk";
+    repo = "spdk";
+    rev = "v${version}";
+    sha256 = "sha256-P10NDa+MIEY8B3bu34Dq2keyuv2a24XV5Wf+Ah701b8=";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [
+    python3
+    python3.pkgs.setuptools
+    pkg-config
+    ensureNewerSourcesForZipFilesHook
+  ];
+
+  buildInputs = [
+    cunit
+    dpdk
+    jansson
+    libaio
+    libbsd
+    libelf
+    libuuid
+    libpcap
+    libnl
+    numactl
+    openssl
+    ncurses
+    zlib
+  ];
+
+  patches = [
+    # https://review.spdk.io/gerrit/c/spdk/spdk/+/20394
+    ./setuptools.patch
+    ./0001-fix-setuptools-installation.patch
+  ];
+
+  postPatch = ''
+    patchShebangs .
+  '';
+
+  enableParallelBuilding = true;
+
+  configureFlags = [
+    "--with-dpdk=${dpdk}"
+    "--pydir=${placeholder "out"}"
+  ];
+
+  postCheck = ''
+    python3 -m spdk
+  '';
+
+  env.NIX_CFLAGS_COMPILE = "-mssse3"; # Necessary to compile.
+  # otherwise does not find strncpy when compiling
+  env.NIX_LDFLAGS = "-lbsd";
+
+  meta = with lib; {
+    description = "Set of libraries for fast user-mode storage";
+    homepage = "https://spdk.io/";
+    license = licenses.bsd3;
+    platforms =  [ "x86_64-linux" ];
+    maintainers = with maintainers; [ orivej ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/spdk/setuptools.patch b/nixpkgs/pkgs/development/libraries/spdk/setuptools.patch
new file mode 100644
index 000000000000..b3e7644c0076
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/spdk/setuptools.patch
@@ -0,0 +1,25 @@
+From 3a72290ba7e2d71ca887225fc0eb8792ca863be2 Mon Sep 17 00:00:00 2001
+From: Jörg Thalheim <joerg@thalheim.io>
+Date: Tue, 24 Oct 2023 14:30:53 +0200
+Subject: [PATCH] python: drop deprecated distutils
+
+This is scheduled for removal in python 3.12: https://docs.python.org/3/whatsnew/3.12.html
+
+Change-Id: I728dc0cf4ed20f22016d3d58cca8aee3af2bcd8b
+Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
+---
+
+diff --git a/python/setup.py b/python/setup.py
+index 47e2104..ae4dff7 100755
+--- a/python/setup.py
++++ b/python/setup.py
+@@ -2,8 +2,7 @@
+ # SPDX-License-Identifier: BSD-3-Clause
+ # Copyright (C) 2023 Intel Corporation.  All rights reserved.
+ 
+-from distutils.core import setup
+-from setuptools import find_packages
++from setuptools import setup, find_packages
+ from spdk import __version__
+ 
+ 
diff --git a/nixpkgs/pkgs/development/libraries/spdlog/default.nix b/nixpkgs/pkgs/development/libraries/spdlog/default.nix
new file mode 100644
index 000000000000..ff42a5ba3b5c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/spdlog/default.nix
@@ -0,0 +1,67 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, fmt
+, catch2_3
+, staticBuild ? stdenv.hostPlatform.isStatic
+
+# tests
+, bear, tiledb
+}:
+
+stdenv.mkDerivation rec {
+  pname = "spdlog";
+  version = "1.12.0";
+
+  src = fetchFromGitHub {
+    owner = "gabime";
+    repo  = "spdlog";
+    rev   = "v${version}";
+    hash  = "sha256-cxTaOuLXHRU8xMz9gluYz0a93O0ez2xOxbloyc1m1ns=";
+  };
+
+  patches = [
+    # Fix a broken test, remove with the next release.
+    (fetchpatch {
+      url = "https://github.com/gabime/spdlog/commit/2ee8bac78e6525a8ad9a9196e65d502ce390d83a.patch";
+      hash = "sha256-L79yOkm3VY01jmxNctfneTLmOA5DEQeNNGC8LbpJiOc=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  # Required to build tests, even if they aren't executed
+  buildInputs = [ catch2_3 ];
+  propagatedBuildInputs = [ fmt ];
+
+  cmakeFlags = [
+    "-DSPDLOG_BUILD_SHARED=${if staticBuild then "OFF" else "ON"}"
+    "-DSPDLOG_BUILD_STATIC=${if staticBuild then "ON" else "OFF"}"
+    "-DSPDLOG_BUILD_EXAMPLE=OFF"
+    "-DSPDLOG_BUILD_BENCH=OFF"
+    "-DSPDLOG_BUILD_TESTS=ON"
+    "-DSPDLOG_FMT_EXTERNAL=ON"
+  ];
+
+  outputs = [ "out" "doc" "dev" ] ;
+
+  postInstall = ''
+    mkdir -p $out/share/doc/spdlog
+    cp -rv ../example $out/share/doc/spdlog
+  '';
+
+  doCheck = true;
+
+  passthru.tests = {
+    inherit bear tiledb;
+  };
+
+  meta = with lib; {
+    description    = "Very fast, header only, C++ logging library";
+    homepage       = "https://github.com/gabime/spdlog";
+    license        = licenses.mit;
+    maintainers    = with maintainers; [ obadz ];
+    platforms      = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/spectra/default.nix b/nixpkgs/pkgs/development/libraries/spectra/default.nix
new file mode 100644
index 000000000000..1fc3ccd75765
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/spectra/default.nix
@@ -0,0 +1,30 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, eigen
+}:
+
+stdenv.mkDerivation rec {
+  pname = "spectra";
+  version = "1.0.1";
+
+  src = fetchFromGitHub {
+    owner = "yixuan";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-HaJmMo4jYmO/j53/nHrL3bvdQMAvp4Nuhhe8Yc7pL88=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  propagatedBuildInputs = [ eigen ];
+
+  meta = with lib; {
+    homepage = "https://spectralib.org/";
+    description = "A C++ library for large scale eigenvalue problems, built on top of Eigen";
+    license = licenses.mpl20;
+    maintainers = with maintainers; [ vonfry ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/speech-tools/default.nix b/nixpkgs/pkgs/development/libraries/speech-tools/default.nix
new file mode 100644
index 000000000000..8bee16fef753
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/speech-tools/default.nix
@@ -0,0 +1,81 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, ncurses
+, alsa-lib
+, CoreServices
+, AudioUnit
+, Cocoa
+}:
+
+stdenv.mkDerivation rec {
+  pname = "speech_tools";
+  version = "2.5.0";
+
+  src = fetchurl {
+    url = "http://www.festvox.org/packed/festival/${lib.versions.majorMinor version}/speech_tools-${version}-release.tar.gz";
+    sha256 = "1k2xh13miyv48gh06rgsq2vj25xwj7z6vwq9ilsn8i7ig3nrgzg4";
+  };
+
+  patches = [
+    # Fix build on Apple Silicon. Remove in the next release.
+    (fetchpatch {
+      url = "https://github.com/festvox/speech_tools/commit/06141f69d21bf507a9becb5405265dc362edb0df.patch";
+      hash = "sha256-tRestCBuRhak+2ccsB6mvDxGm/TIYX4eZ3oppCOEP9s=";
+    })
+  ];
+
+  buildInputs = [
+    ncurses
+  ] ++ lib.optionals stdenv.isLinux [
+    alsa-lib
+  ] ++ lib.optionals stdenv.isDarwin [
+    CoreServices
+    AudioUnit
+    Cocoa
+  ];
+
+  makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "CXX=${stdenv.cc.targetPrefix}c++" ];
+
+  # Workaround build failure on -fno-common toolchains:
+  #   ld: libestools.a(editline.o):(.bss+0x28): multiple definition of
+  #     `editline_history_file'; libestools.a(siodeditline.o):(.data.rel.local+0x8): first defined here
+  env.NIX_CFLAGS_COMPILE = "-fcommon";
+
+  preConfigure = ''
+    sed -e s@/usr/bin/@@g -i $( grep -rl '/usr/bin/' . )
+    sed -re 's@/bin/(rm|printf|uname)@\1@g' -i $( grep -rl '/bin/' . )
+
+    # c99 makes isnan valid for float and double
+    substituteInPlace include/EST_math.h \
+      --replace '__isnanf(X)' 'isnan(X)'
+  '';
+
+  installPhase = ''
+    mkdir -p "$out"/{bin,lib}
+    for d in bin lib; do
+      for i in ./$d/*; do
+        test "$(basename "$i")" = "Makefile" ||
+          cp -r "$(readlink -f $i)" "$out/$d"
+      done
+    done
+  '';
+
+  doCheck = true;
+
+  checkTarget = "test";
+
+  meta = with lib; {
+    description = "Text-to-speech engine";
+    maintainers = with maintainers; [ raskin ];
+    platforms = platforms.unix;
+    license = licenses.free;
+  };
+
+  passthru = {
+    updateInfo = {
+      downloadPage = "http://www.festvox.org/packed/festival/";
+    };
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/speechd/default.nix b/nixpkgs/pkgs/development/libraries/speechd/default.nix
new file mode 100644
index 000000000000..9b44c8e46d0c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/speechd/default.nix
@@ -0,0 +1,120 @@
+{ stdenv
+, lib
+, substituteAll
+, pkg-config
+, fetchurl
+, python3Packages
+, gettext
+, itstool
+, libtool
+, texinfo
+, util-linux
+, autoreconfHook
+, glib
+, dotconf
+, libsndfile
+, withLibao ? true, libao
+, withPulse ? false, libpulseaudio
+, withAlsa ? false, alsa-lib
+, withOss ? false
+, withFlite ? true, flite
+, withEspeak ? true, espeak, sonic, pcaudiolib
+, mbrola
+, withPico ? true, svox
+}:
+
+let
+  inherit (python3Packages) python pyxdg wrapPython;
+in stdenv.mkDerivation rec {
+  pname = "speech-dispatcher";
+  version = "0.11.5";
+
+  src = fetchurl {
+    url = "https://github.com/brailcom/speechd/releases/download/${version}/${pname}-${version}.tar.gz";
+    sha256 = "sha256-HOR1n/q7rxrrQzpewHOb4Gdum9+66URKezvhsq8+wSs=";
+  };
+
+  patches = [
+    (substituteAll {
+      src = ./fix-paths.patch;
+      utillinux = util-linux;
+    })
+  ] ++ lib.optionals (withEspeak && espeak.mbrolaSupport) [
+    # Replace FHS paths.
+    (substituteAll {
+      src = ./fix-mbrola-paths.patch;
+      inherit espeak mbrola;
+    })
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+    autoreconfHook
+    gettext
+    libtool
+    itstool
+    texinfo
+    wrapPython
+  ];
+
+  buildInputs = [
+    glib
+    dotconf
+    libsndfile
+    libao
+    libpulseaudio
+    alsa-lib
+    python
+  ] ++ lib.optionals withEspeak [
+    espeak
+    sonic
+    pcaudiolib
+  ] ++ lib.optionals withFlite [
+    flite
+  ] ++ lib.optionals withPico [
+    svox
+  ];
+
+  pythonPath = [
+    pyxdg
+  ];
+
+  configureFlags = [
+    # Audio method falls back from left to right.
+    "--with-default-audio-method=\"libao,pulse,alsa,oss\""
+    "--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
+  ] ++ lib.optionals withPulse [
+  "--with-pulse"
+  ] ++ lib.optionals withAlsa [
+    "--with-alsa"
+  ] ++ lib.optionals withLibao [
+    "--with-libao"
+  ] ++ lib.optionals withOss [
+    "--with-oss"
+  ] ++ lib.optionals withEspeak [
+    "--with-espeak-ng"
+  ] ++ lib.optionals withPico [
+    "--with-pico"
+  ];
+
+  postPatch = ''
+    substituteInPlace src/modules/pico.c --replace "/usr/share/pico/lang" "${svox}/share/pico/lang"
+  '';
+
+  postInstall = ''
+    wrapPythonPrograms
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Common interface to speech synthesis";
+    homepage = "https://devel.freebsoft.org/speechd";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [
+      berce
+      jtojnar
+    ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/speechd/fix-mbrola-paths.patch b/nixpkgs/pkgs/development/libraries/speechd/fix-mbrola-paths.patch
new file mode 100644
index 000000000000..ea16bea9bac5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/speechd/fix-mbrola-paths.patch
@@ -0,0 +1,21 @@
+diff --git a/src/modules/espeak.c b/src/modules/espeak.c
+index 94a01197..9bb34475 100644
+--- a/src/modules/espeak.c
++++ b/src/modules/espeak.c
+@@ -898,13 +898,13 @@ static SPDVoice **espeak_list_synthesis_voices()
+ 				path = g_strdup_printf("%s/mbrola/%s", espeak_data, voicename);
+ 				if (access(path, O_RDONLY) != 0) {
+ 					g_free(path);
+-					path = g_strdup_printf("/usr/share/mbrola/%s", voicename);
++					path = g_strdup_printf("@mbrola@/share/mbrola/%s", voicename);
+ 					if (access(path, O_RDONLY) != 0) {
+ 						g_free(path);
+-						path = g_strdup_printf("/usr/share/mbrola/%s/%s", voicename, voicename);
++						path = g_strdup_printf("@mbrola@/share/mbrola/%s/%s", voicename, voicename);
+ 						if (access(path, O_RDONLY) != 0) {
+ 							g_free(path);
+-							path = g_strdup_printf("/usr/share/mbrola/voices/%s", voicename);
++							path = g_strdup_printf("@mbrola@/share/mbrola/voices/%s", voicename);
+ 							if (access(path, O_RDONLY) != 0) {
+ 								g_free(path);
+ 								espeak_mbrola[j] = NULL;
diff --git a/nixpkgs/pkgs/development/libraries/speechd/fix-paths.patch b/nixpkgs/pkgs/development/libraries/speechd/fix-paths.patch
new file mode 100644
index 000000000000..7509c1842ba8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/speechd/fix-paths.patch
@@ -0,0 +1,13 @@
+diff --git a/speech-dispatcherd.service.in b/speech-dispatcherd.service.in
+index ab14b99d..12521b1b 100644
+--- a/speech-dispatcherd.service.in
++++ b/speech-dispatcherd.service.in
+@@ -19,7 +19,7 @@ Description=Speech-Dispatcher, common interface to speech synthesizers
+ [Service]
+ Type=forking
+ ExecStart=@bindir@/speech-dispatcher -d -t 0
+-ExecReload=/bin/kill -HUP $MAINPID
++ExecReload=@utillinux@/bin/kill -HUP $MAINPID
+ 
+ [Install]
+ WantedBy=multi-user.target
diff --git a/nixpkgs/pkgs/development/libraries/speex/default.nix b/nixpkgs/pkgs/development/libraries/speex/default.nix
new file mode 100644
index 000000000000..cba0e4e76f3f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/speex/default.nix
@@ -0,0 +1,43 @@
+{ lib
+, stdenv
+, fetchurl
+, autoreconfHook
+, pkg-config
+, fftw
+, speexdsp
+, withFft ? !stdenv.hostPlatform.isMinGW
+}:
+
+stdenv.mkDerivation rec {
+  pname = "speex";
+  version = "1.2.1";
+
+  src = fetchurl {
+    url = "http://downloads.us.xiph.org/releases/speex/speex-${version}.tar.gz";
+    sha256 = "sha256-S0TU8rOKNwotmKeDKf78VqDPk9HBvnACkhe6rmYo/uo=";
+  };
+
+  postPatch = ''
+    sed -i '/AC_CONFIG_MACRO_DIR/i PKG_PROG_PKG_CONFIG' configure.ac
+  '';
+
+  outputs = [ "out" "dev" "doc" ];
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = lib.optionals withFft [ fftw ]
+    ++ [ speexdsp ];
+
+  # TODO: Remove this will help with immediate backward compatibility
+  propagatedBuildInputs = [ speexdsp ];
+
+  configureFlags = lib.optionals withFft [
+    "--with-fft=gpl-fftw3"
+  ];
+
+  meta = with lib; {
+    homepage = "https://www.speex.org/";
+    description = "An Open Source/Free Software patent-free audio compression format designed for speech";
+    license = licenses.bsd3;
+    platforms = platforms.unix ++ platforms.windows;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/speexdsp/build-fix.patch b/nixpkgs/pkgs/development/libraries/speexdsp/build-fix.patch
new file mode 100644
index 000000000000..13cd5e7d21a5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/speexdsp/build-fix.patch
@@ -0,0 +1,24 @@
+diff --git a/libspeexdsp/Makefile.am b/libspeexdsp/Makefile.am
+index d0499b9..42e8d50 100644
+--- a/libspeexdsp/Makefile.am
++++ b/libspeexdsp/Makefile.am
+@@ -29,7 +29,7 @@ noinst_HEADERS = 	arch.h 	bfin.h \
+ 	pseudofloat.h smallft.h vorbis_psy.h resample_sse.h resample_neon.h
+ 
+ libspeexdsp_la_LDFLAGS = -no-undefined -version-info @SPEEXDSP_LT_CURRENT@:@SPEEXDSP_LT_REVISION@:@SPEEXDSP_LT_AGE@
+-libspeexdsp_la_LIBADD = $(LIBM)
++libspeexdsp_la_LIBADD = @FFT_LIBS@ $(LIBM)
+ 
+ if BUILD_EXAMPLES
+ noinst_PROGRAMS = testdenoise testecho testjitter testresample
+diff --git a/speexdsp.pc.in b/speexdsp.pc.in
+index 6c6d26f..d40d856 100644
+--- a/speexdsp.pc.in
++++ b/speexdsp.pc.in
+@@ -11,5 +11,5 @@ Version: @PACKAGE_VERSION@
+ Requires: @FFT_PKGCONFIG@
+ Conflicts:
+ Libs: -L${libdir} -lspeexdsp
+-Libs.private: @LIBM@
++Libs.private: @FFT_LIBS@ @LIBM@
+ Cflags: -I${includedir}
diff --git a/nixpkgs/pkgs/development/libraries/speexdsp/default.nix b/nixpkgs/pkgs/development/libraries/speexdsp/default.nix
new file mode 100644
index 000000000000..b8f8a3bc7c5f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/speexdsp/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, stdenv
+, fetchurl
+, autoreconfHook
+, pkg-config
+, fftw
+, withFftw3 ? (!stdenv.hostPlatform.isMinGW)
+}:
+
+stdenv.mkDerivation rec {
+  pname = "speexdsp";
+  version = "1.2.1";
+
+  src = fetchurl {
+    url = "https://downloads.xiph.org/releases/speex/${pname}-${version}.tar.gz";
+    sha256 = "sha256-jHdzQ+SmOZVpxyq8OKlbJNtWiCyD29tsZCSl9K61TT0=";
+  };
+
+  patches = [ ./build-fix.patch ];
+  postPatch = "sed '3i#include <stdint.h>' -i ./include/speex/speexdsp_config_types.h.in";
+
+  outputs = [ "out" "dev" "doc" ];
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = lib.optionals withFftw3 [ fftw ];
+
+  configureFlags = lib.optionals withFftw3 [ "--with-fft=gpl-fftw3" ]
+    ++ lib.optional stdenv.isAarch64 "--disable-neon";
+
+  meta = with lib; {
+    homepage = "https://www.speex.org/";
+    description = "An Open Source/Free Software patent-free audio compression format designed for speech";
+    license = licenses.bsd3;
+    platforms = platforms.unix ++ platforms.windows;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/spglib/default.nix b/nixpkgs/pkgs/development/libraries/spglib/default.nix
new file mode 100644
index 000000000000..e33f18e50b7b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/spglib/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, lib, fetchFromGitHub, cmake, gfortran, gtest, openmp }:
+
+stdenv.mkDerivation rec {
+  pname = "spglib";
+  version = "2.3.1"; # N.B: if you change this, please update: pythonPackages.spglib
+
+  src = fetchFromGitHub {
+    owner = "spglib";
+    repo = "spglib";
+    rev = "v${version}";
+    hash = "sha256-MOre1LGf7Li+tAqtzpuEvAX6q/P0ueDlMXhhmtiE+jw=";
+  };
+
+  nativeBuildInputs = [ cmake gfortran gtest ];
+
+  buildInputs = lib.optionals stdenv.isDarwin [ openmp ];
+
+  cmakeFlags = [ "-DSPGLIB_WITH_Fortran=On" ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "C library for finding and handling crystal symmetries";
+    homepage = "https://spglib.github.io/spglib/";
+    changelog = "https://github.com/spglib/spglib/raw/v${version}/ChangeLog";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.markuskowa ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/spice-gtk/default.nix b/nixpkgs/pkgs/development/libraries/spice-gtk/default.nix
new file mode 100644
index 000000000000..d160a6a5f6dc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/spice-gtk/default.nix
@@ -0,0 +1,168 @@
+{ lib
+, stdenv
+, fetchurl
+, acl
+, cyrus_sasl
+, docbook_xsl
+, libepoxy
+, gettext
+, gobject-introspection
+, gst_all_1
+, gtk-doc
+, gtk3
+, hwdata
+, json-glib
+, libcacard
+, libcap_ng
+, libdrm
+, libjpeg_turbo
+, libopus
+, libsoup_3
+, libusb1
+, lz4
+, meson
+, mesonEmulatorHook
+, ninja
+, openssl
+, perl
+, phodav
+, pixman
+, pkg-config
+, polkit
+, python3
+, spice-protocol
+, usbredir
+, vala
+, wayland-protocols
+, wayland-scanner
+, zlib
+, wrapGAppsHook
+, withPolkit ? stdenv.isLinux
+}:
+
+# If this package is built with polkit support (withPolkit=true),
+# usb redirection requires spice-client-glib-usb-acl-helper to run setuid root.
+# The helper confirms via polkit that the user has an active session,
+# then adds a device acl entry for that user.
+# Example NixOS config to create a setuid wrapper for the helper:
+# security.wrappers.spice-client-glib-usb-acl-helper.source =
+#   "${pkgs.spice-gtk}/bin/spice-client-glib-usb-acl-helper";
+# On non-NixOS installations, make a setuid copy of the helper
+# outside the store and adjust PATH to find the setuid version.
+
+# If this package is built without polkit support (withPolkit=false),
+# usb redirection requires read-write access to usb devices.
+# This can be granted by adding users to a custom group like "usb"
+# and using a udev rule to put all usb devices in that group.
+# Example NixOS config:
+#  users.groups.usb = {};
+#  users.users.dummy.extraGroups = [ "usb" ];
+#  services.udev.extraRules = ''
+#    KERNEL=="*", SUBSYSTEMS=="usb", MODE="0664", GROUP="usb"
+#  '';
+
+stdenv.mkDerivation rec {
+  pname = "spice-gtk";
+  version = "0.42";
+
+  outputs = [ "out" "dev" "devdoc" "man" ];
+
+  src = fetchurl {
+    url = "https://www.spice-space.org/download/gtk/${pname}-${version}.tar.xz";
+    sha256 = "sha256-k4ARfxgRrR+qGBLLZgJHm2KQ1KDYzEQtREJ/f2wOelg=";
+  };
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    docbook_xsl
+    gettext
+    gobject-introspection
+    gtk-doc
+    meson
+    ninja
+    perl
+    pkg-config
+    python3
+    python3.pkgs.pyparsing
+    python3.pkgs.six
+    vala
+    wrapGAppsHook
+  ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
+    mesonEmulatorHook
+  ] ++ lib.optionals stdenv.isLinux [
+    wayland-scanner
+  ];
+
+  buildInputs = [
+    gst_all_1.gst-plugins-base
+    gst_all_1.gst-plugins-good
+    cyrus_sasl
+    libepoxy
+    gtk3
+    json-glib
+    libcacard
+    libjpeg_turbo
+    libopus
+    libsoup_3
+    libusb1
+    lz4
+    openssl
+    phodav
+    pixman
+    spice-protocol
+    usbredir
+    vala
+    zlib
+  ] ++ lib.optionals withPolkit [
+    polkit
+    acl
+  ] ++ lib.optionals stdenv.isLinux [
+    libcap_ng
+    libdrm
+    wayland-protocols
+  ];
+
+  PKG_CONFIG_POLKIT_GOBJECT_1_POLICYDIR = "${placeholder "out"}/share/polkit-1/actions";
+
+  mesonFlags = [
+    "-Dusb-acl-helper-dir=${placeholder "out"}/bin"
+    "-Dusb-ids-path=${hwdata}/share/hwdata/usb.ids"
+  ] ++ lib.optionals (!withPolkit) [
+    "-Dpolkit=disabled"
+  ] ++ lib.optionals (!stdenv.isLinux) [
+    "-Dlibcap-ng=disabled"
+    "-Degl=disabled"
+  ] ++ lib.optionals stdenv.hostPlatform.isMusl [
+    "-Dcoroutine=gthread" # Fixes "Function missing:makecontext"
+  ];
+
+  postPatch = ''
+    # get rid of absolute path to helper in store so we can use a setuid wrapper
+    substituteInPlace src/usb-acl-helper.c \
+      --replace 'ACL_HELPER_PATH"/' '"'
+    # don't try to setcap/suid in a nix builder
+    substituteInPlace src/meson.build \
+      --replace "meson.add_install_script('../build-aux/setcap-or-suid'," \
+      "# meson.add_install_script('../build-aux/setcap-or-suid',"
+
+    patchShebangs subprojects/keycodemapdb/tools/keymap-gen
+  '';
+
+  meta = with lib; {
+    description = "GTK 3 SPICE widget";
+    longDescription = ''
+      spice-gtk is a GTK 3 SPICE widget. It features glib-based
+      objects for SPICE protocol parsing and a gtk widget for embedding
+      the SPICE display into other applications such as virt-manager.
+      Python bindings are available too.
+    '';
+
+    homepage = "https://www.spice-space.org/";
+    license = licenses.lgpl21;
+    maintainers = [ maintainers.xeji ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/spice-protocol/default.nix b/nixpkgs/pkgs/development/libraries/spice-protocol/default.nix
new file mode 100644
index 000000000000..d7800859d057
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/spice-protocol/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl, meson, ninja }:
+
+stdenv.mkDerivation rec {
+  pname = "spice-protocol";
+  version = "0.14.4";
+
+  src = fetchurl {
+    url = "https://www.spice-space.org/download/releases/${pname}-${version}.tar.xz";
+    sha256 = "sha256-BP+6YQ2f1EHPxH36oTXXAJbmCxBG0hGdjbL46g0X2RI=";
+  };
+
+  nativeBuildInputs = [ meson ninja ];
+
+  postInstall = ''
+    mkdir -p $out/lib
+    ln -sv ../share/pkgconfig $out/lib/pkgconfig
+  '';
+
+  meta = with lib; {
+    description = "Protocol headers for the SPICE protocol";
+    homepage = "https://www.spice-space.org/";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ bluescreen303 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/spice/default.nix b/nixpkgs/pkgs/development/libraries/spice/default.nix
new file mode 100644
index 000000000000..d7855cd5cea5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/spice/default.nix
@@ -0,0 +1,108 @@
+{ lib, stdenv
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, pixman
+, alsa-lib
+, openssl
+, libXrandr
+, libXfixes
+, libXext
+, libXrender
+, libXinerama
+, libjpeg
+, zlib
+, spice-protocol
+, python3
+, glib
+, cyrus_sasl
+, libcacard
+, lz4
+, libopus
+, gst_all_1
+, orc
+, gdk-pixbuf
+}:
+
+stdenv.mkDerivation rec {
+  pname = "spice";
+  version = "0.15.2";
+
+  src = fetchurl {
+    url = "https://www.spice-space.org/download/releases/spice-server/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-bZ62EX8DkXRxxLwQAEq+z/SKefuF64WhxF8CM3cBW4E=";
+  };
+
+  patches = [
+    ./remove-rt-on-darwin.patch
+  ];
+
+  nativeBuildInputs = [
+    glib
+    meson
+    ninja
+    pkg-config
+    python3
+    python3.pkgs.six
+    python3.pkgs.pyparsing
+  ];
+
+  buildInputs = [
+    cyrus_sasl
+    glib
+    gst_all_1.gst-plugins-base
+    libXext
+    libXfixes
+    libXinerama
+    libXrandr
+    libXrender
+    libcacard
+    libjpeg
+    libopus
+    lz4
+    openssl
+    orc
+    pixman
+    python3.pkgs.pyparsing
+    spice-protocol
+    zlib
+  ] ++ lib.optionals stdenv.isLinux [
+    alsa-lib
+  ] ++ lib.optionals stdenv.isDarwin [
+    gdk-pixbuf
+  ];
+
+  env.NIX_CFLAGS_COMPILE = "-fno-stack-protector";
+
+  mesonFlags = [
+    "-Dgstreamer=1.0"
+  ];
+
+  postPatch = ''
+    patchShebangs build-aux
+
+    # Forgotten in 0.15.2 tarball
+    sed -i /meson.add_dist_script/d meson.build
+  '';
+
+  postInstall = ''
+    ln -s spice-server $out/include/spice
+  '';
+
+  meta = with lib; {
+    description = "Complete open source solution for interaction with virtualized desktop devices";
+    longDescription = ''
+      The Spice project aims to provide a complete open source solution for interaction
+      with virtualized desktop devices.The Spice project deals with both the virtualized
+      devices and the front-end. Interaction between front-end and back-end is done using
+      VD-Interfaces. The VD-Interfaces (VDI) enable both ends of the solution to be easily
+      utilized by a third-party component.
+    '';
+    homepage = "https://www.spice-space.org/";
+    license = licenses.lgpl21;
+
+    maintainers = with maintainers; [ bluescreen303 atemu ];
+    platforms = with platforms; linux ++ darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/spice/remove-rt-on-darwin.patch b/nixpkgs/pkgs/development/libraries/spice/remove-rt-on-darwin.patch
new file mode 100644
index 000000000000..b3696d736af7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/spice/remove-rt-on-darwin.patch
@@ -0,0 +1,18 @@
+--- a/meson.build
++++ b/meson.build
+@@ -103,11 +103,11 @@
+   spice_server_deps += dependency(dep)
+ endforeach
+ 
+-if host_machine.system() != 'windows'
++if (host_machine.system() != 'windows' and host_machine.system() != 'darwin')
+   foreach dep : ['rt', 'm']
+     spice_server_deps += compiler.find_library(dep)
+   endforeach
+-else
++elif host_machine.system() == 'windows'
+   foreach dep : ['ws2_32', 'shlwapi']
+     spice_server_deps += compiler.find_library(dep)
+   endforeach
+
+Diff finished.  Sun Oct 16 06:09:35 2022
diff --git a/nixpkgs/pkgs/development/libraries/spirv-headers/default.nix b/nixpkgs/pkgs/development/libraries/spirv-headers/default.nix
new file mode 100644
index 000000000000..64362243229b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/spirv-headers/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "spirv-headers";
+  version = "1.3.275.0";
+
+  src = fetchFromGitHub {
+    owner = "KhronosGroup";
+    repo = "SPIRV-Headers";
+    rev = "vulkan-sdk-${version}";
+    hash = "sha256-/I9dJlBE0kvFvqooKuqMETtOE72Jmva3zIGnq0o4+aE=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "Machine-readable components of the Khronos SPIR-V Registry";
+    homepage = "https://github.com/KhronosGroup/SPIRV-Headers";
+    license = licenses.mit;
+    maintainers = [ maintainers.ralith ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/sptk/default.nix b/nixpkgs/pkgs/development/libraries/sptk/default.nix
new file mode 100644
index 000000000000..07b9bf3eb3c9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sptk/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, cmake
+, fetchFromGitHub
+, fetchpatch
+}:
+
+stdenv.mkDerivation rec {
+  pname = "sptk";
+  version = "4.2";
+
+  src = fetchFromGitHub {
+    owner = "sp-nitech";
+    repo = "SPTK";
+    rev = "v${version}";
+    hash = "sha256-lIyOcN2AR3ilUZ9stpicjbwlredbwgGPwmMICxZEijU=";
+  };
+
+  patches = [
+    # Fix gcc-13 build failure:
+    #   https://github.com/sp-nitech/SPTK/pull/57
+    (fetchpatch {
+      name = "gcc-13.patch";
+      url = "https://github.com/sp-nitech/SPTK/commit/060bc2ad7a753c1f9f9114a70d4c4337b91cb7e0.patch";
+      hash = "sha256-QfzpIS63LZyTHAaMGUZh974XLRNZLQG3om7ZJJ4RlgE=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    changelog = "https://github.com/sp-nitech/SPTK/releases/tag/v${version}";
+    description = "Suite of speech signal processing tools";
+    homepage = "https://github.com/sp-nitech/SPTK";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ fab ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/sqlcipher/default.nix b/nixpkgs/pkgs/development/libraries/sqlcipher/default.nix
new file mode 100644
index 000000000000..05576b0dab14
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sqlcipher/default.nix
@@ -0,0 +1,68 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, openssl
+, tcl
+, installShellFiles
+, buildPackages
+, readline
+, ncurses
+, zlib
+, sqlite
+}:
+
+stdenv.mkDerivation rec {
+  pname = "sqlcipher";
+  version = "4.5.5";
+
+  src = fetchFromGitHub {
+    owner = "sqlcipher";
+    repo = "sqlcipher";
+    rev = "v${version}";
+    hash = "sha256-amWYkVQr+Rmcj+32lFDRq43Q+Ojj8V8B6KoURqdwGt0=";
+  };
+
+  nativeBuildInputs = [
+    installShellFiles
+    tcl
+  ];
+
+  buildInputs = [
+    readline
+    ncurses
+    openssl
+    zlib
+  ];
+
+  depsBuildBuild = [
+    buildPackages.stdenv.cc
+  ];
+
+  configureFlags = [
+    "--enable-threadsafe"
+    "--with-readline-inc=-I${lib.getDev readline}/include"
+  ];
+
+  CFLAGS = [
+    # We want feature parity with sqlite
+    sqlite.NIX_CFLAGS_COMPILE
+    "-DSQLITE_HAS_CODEC"
+  ];
+
+  BUILD_CC = "$(CC_FOR_BUILD)";
+
+  TCLLIBDIR = "${placeholder "out"}/lib/tcl${lib.versions.majorMinor tcl.version}";
+
+  postInstall = ''
+    installManPage sqlcipher.1
+  '';
+
+  meta = with lib; {
+    changelog = "https://github.com/sqlcipher/sqlcipher/blob/v${version}/CHANGELOG.md";
+    description = "SQLite extension that provides 256 bit AES encryption of database files";
+    homepage = "https://www.zetetic.net/sqlcipher/";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/sqlite/archive-version.nix b/nixpkgs/pkgs/development/libraries/sqlite/archive-version.nix
new file mode 100644
index 000000000000..601bb6a5889f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sqlite/archive-version.nix
@@ -0,0 +1,9 @@
+lib: version:
+
+let
+  fragments = lib.splitVersion version;
+  major = lib.head fragments;
+  minor = lib.concatMapStrings (lib.fixedWidthNumber 2) (lib.tail fragments);
+in
+
+major + minor + "00"
diff --git a/nixpkgs/pkgs/development/libraries/sqlite/default.nix b/nixpkgs/pkgs/development/libraries/sqlite/default.nix
new file mode 100644
index 000000000000..5152f5d0e33c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sqlite/default.nix
@@ -0,0 +1,112 @@
+{ lib, stdenv, fetchurl, zlib, readline, ncurses
+
+# for tests
+, python3Packages, sqldiff, sqlite-analyzer, tracker
+
+# uses readline & ncurses for a better interactive experience if set to true
+, interactive ? false
+
+, gitUpdater
+}:
+
+let
+  archiveVersion = import ./archive-version.nix lib;
+in
+
+stdenv.mkDerivation rec {
+  pname = "sqlite${lib.optionalString interactive "-interactive"}";
+  version = "3.45.1";
+
+  # nixpkgs-update: no auto update
+  # NB! Make sure to update ./tools.nix src (in the same directory).
+  src = fetchurl {
+    url = "https://sqlite.org/2024/sqlite-autoconf-${archiveVersion version}.tar.gz";
+    hash = "sha256-zZwnhBt6WTLJiXZR4guGxwHddAVWmJsByllvz6PUmgo=";
+  };
+
+  outputs = [ "bin" "dev" "out" ];
+  separateDebugInfo = stdenv.isLinux;
+
+  buildInputs = [ zlib ] ++ lib.optionals interactive [ readline ncurses ];
+
+  # required for aarch64 but applied for all arches for simplicity
+  preConfigure = ''
+    patchShebangs configure
+  '';
+
+  configureFlags = [ "--enable-threadsafe" ] ++ lib.optional interactive "--enable-readline";
+
+  env.NIX_CFLAGS_COMPILE = toString ([
+    "-DSQLITE_ENABLE_COLUMN_METADATA"
+    "-DSQLITE_ENABLE_DBSTAT_VTAB"
+    "-DSQLITE_ENABLE_JSON1"
+    "-DSQLITE_ENABLE_FTS3"
+    "-DSQLITE_ENABLE_FTS3_PARENTHESIS"
+    "-DSQLITE_ENABLE_FTS3_TOKENIZER"
+    "-DSQLITE_ENABLE_FTS4"
+    "-DSQLITE_ENABLE_FTS5"
+    "-DSQLITE_ENABLE_RTREE"
+    "-DSQLITE_ENABLE_STMT_SCANSTATUS"
+    "-DSQLITE_ENABLE_UNLOCK_NOTIFY"
+    "-DSQLITE_SOUNDEX"
+    "-DSQLITE_SECURE_DELETE"
+    "-DSQLITE_MAX_VARIABLE_NUMBER=250000"
+    "-DSQLITE_MAX_EXPR_DEPTH=10000"
+  ]);
+
+  # Test for features which may not be available at compile time
+  preBuild = ''
+    # Use pread(), pread64(), pwrite(), pwrite64() functions for better performance if they are available.
+    if cc -Werror=implicit-function-declaration -x c - -o "$TMPDIR/pread_pwrite_test" <<< \
+      ''$'#include <unistd.h>\nint main()\n{\n  pread(0, NULL, 0, 0);\n  pwrite(0, NULL, 0, 0);\n  return 0;\n}'; then
+      export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -DUSE_PREAD"
+    fi
+    if cc -Werror=implicit-function-declaration -x c - -o "$TMPDIR/pread64_pwrite64_test" <<< \
+      ''$'#include <unistd.h>\nint main()\n{\n  pread64(0, NULL, 0, 0);\n  pwrite64(0, NULL, 0, 0);\n  return 0;\n}'; then
+      export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -DUSE_PREAD64"
+    elif cc -D_LARGEFILE64_SOURCE -Werror=implicit-function-declaration -x c - -o "$TMPDIR/pread64_pwrite64_test" <<< \
+      ''$'#include <unistd.h>\nint main()\n{\n  pread64(0, NULL, 0, 0);\n  pwrite64(0, NULL, 0, 0);\n  return 0;\n}'; then
+      export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -DUSE_PREAD64 -D_LARGEFILE64_SOURCE"
+    fi
+
+    # Necessary for FTS5 on Linux
+    export NIX_LDFLAGS="$NIX_LDFLAGS -lm"
+
+    echo ""
+    echo "NIX_CFLAGS_COMPILE = $NIX_CFLAGS_COMPILE"
+    echo ""
+  '';
+
+  postInstall = ''
+    # Do not contaminate dependent libtool-based projects with sqlite dependencies.
+    sed -i $out/lib/libsqlite3.la -e "s/dependency_libs=.*/dependency_libs='''/"
+  '';
+
+  doCheck = false; # fails to link against tcl
+
+  passthru = {
+    tests = {
+      inherit (python3Packages) sqlalchemy;
+      inherit sqldiff sqlite-analyzer tracker;
+    };
+
+    updateScript = gitUpdater {
+      # No nicer place to look for patest version.
+      url = "https://github.com/sqlite/sqlite.git";
+      # Expect tags like "version-3.43.0".
+      rev-prefix = "version-";
+    };
+  };
+
+  meta = with lib; {
+    changelog = "https://www.sqlite.org/releaselog/${lib.replaceStrings [ "." ] [ "_" ] version}.html";
+    description = "A self-contained, serverless, zero-configuration, transactional SQL database engine";
+    downloadPage = "https://sqlite.org/download.html";
+    homepage = "https://www.sqlite.org/";
+    license = licenses.publicDomain;
+    mainProgram = "sqlite3";
+    maintainers = with maintainers; [ eelco np ];
+    platforms = platforms.unix ++ platforms.windows;
+    pkgConfigModules = [ "sqlite3" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/sqlite/sqlar.nix b/nixpkgs/pkgs/development/libraries/sqlite/sqlar.nix
new file mode 100644
index 000000000000..9063879b7e37
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sqlite/sqlar.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchurl, fuse, zlib
+, withFuse ? true }:
+
+stdenv.mkDerivation {
+  pname = "sqlar";
+  version = "2018-01-07";
+
+  src = fetchurl {
+    url = "https://www.sqlite.org/sqlar/tarball/4824e73896/sqlar-src-4824e73896.tar.gz";
+    sha256 = "09pikkbp93gqypn3da9zi0dzc47jyypkwc9vnmfzhmw7kpyv8nm9";
+  };
+
+  postPatch = ''
+    substituteInPlace Makefile \
+      --replace 'gcc' '${stdenv.cc.targetPrefix}cc'
+  '';
+
+  buildInputs = [ zlib ]
+    ++ lib.optional withFuse fuse;
+
+  buildFlags = [ "CFLAGS=-Wno-error" "sqlar" ]
+    ++ lib.optional withFuse "sqlarfs";
+
+  installPhase = ''
+    install -D -t $out/bin sqlar
+  '' + lib.optionalString withFuse ''
+    install -D -t $out/bin sqlarfs
+  '';
+
+  meta = with lib; {
+    homepage = "https://sqlite.org/sqlar";
+    description = "SQLite Archive utilities";
+    license = licenses.bsd2;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ dtzWill ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/sqlite/tools.nix b/nixpkgs/pkgs/development/libraries/sqlite/tools.nix
new file mode 100644
index 000000000000..695d2207da7d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sqlite/tools.nix
@@ -0,0 +1,46 @@
+{ lib, stdenv, fetchurl, unzip, sqlite, tcl, Foundation }:
+
+let
+  archiveVersion = import ./archive-version.nix lib;
+  mkTool = { pname, makeTarget, description, homepage, mainProgram }: stdenv.mkDerivation rec {
+    inherit pname;
+    version = "3.45.1";
+
+    # nixpkgs-update: no auto update
+    src = assert version == sqlite.version; fetchurl {
+      url = "https://sqlite.org/2024/sqlite-src-${archiveVersion version}.zip";
+      hash = "sha256-f3sUpo7bzUpX3zqMTb1W0tNUam583VDeQM6wOvM9NLo=";
+    };
+
+    nativeBuildInputs = [ unzip ];
+    buildInputs = [ tcl ] ++ lib.optional stdenv.isDarwin Foundation;
+
+    makeFlags = [ makeTarget ];
+
+    installPhase = "install -Dt $out/bin ${makeTarget}";
+
+    meta = with lib; {
+      inherit description homepage mainProgram;
+      downloadPage = "http://sqlite.org/download.html";
+      license = licenses.publicDomain;
+      maintainers = with maintainers; [ johnazoidberg ];
+      platforms = platforms.unix;
+    };
+  };
+in
+{
+  sqldiff = mkTool {
+    pname = "sqldiff";
+    makeTarget = "sqldiff";
+    description = "A tool that displays the differences between SQLite databases";
+    homepage = "https://www.sqlite.org/sqldiff.html";
+    mainProgram = "sqldiff";
+  };
+  sqlite-analyzer = mkTool {
+    pname = "sqlite-analyzer";
+    makeTarget = "sqlite3_analyzer";
+    description = "A tool that shows statistics about SQLite databases";
+    homepage = "https://www.sqlite.org/sqlanalyze.html";
+    mainProgram = "sqlite3_analyzer";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/sqlitecpp/default.nix b/nixpkgs/pkgs/development/libraries/sqlitecpp/default.nix
new file mode 100644
index 000000000000..e2c0b4ec35b9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sqlitecpp/default.nix
@@ -0,0 +1,41 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, sqlite
+, gtest
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "sqlitecpp";
+  version = "3.3.1";
+
+  src = fetchFromGitHub {
+    owner = "SRombauts";
+    repo = "sqlitecpp";
+    rev = finalAttrs.version;
+    sha256 = "sha256-8l1JRaE7w9vJ4bCSLGAk9zwYHDFeKkBi9pE5fUJfLRc=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+  buildInputs = [
+    sqlite
+    gtest
+  ];
+  doCheck = true;
+
+  cmakeFlags = [
+    "-DSQLITECPP_INTERNAL_SQLITE=OFF"
+    "-DSQLITECPP_BUILD_TESTS=ON"
+  ];
+
+  meta = with lib; {
+    homepage = "https://srombauts.github.io/SQLiteCpp/";
+    description = "C++ SQLite3 wrapper";
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.jbedo maintainers.doronbehar ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/sregex/default.nix b/nixpkgs/pkgs/development/libraries/sregex/default.nix
new file mode 100644
index 000000000000..48a1b9c3930e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sregex/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "sregex";
+  version = "0.0.1";
+
+  src = fetchFromGitHub {
+    owner = "openresty";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-HZ9O/3BQHHrTVLLlU0o1fLHxyRSesBhreT3IdGHnNsg=";
+  };
+
+  makeFlags = [ "PREFIX=$(out)" "CC:=$(CC)" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/openresty/sregex";
+    description = "A non-backtracking NFA/DFA-based Perl-compatible regex engine matching on large data streams";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/srt/default.nix b/nixpkgs/pkgs/development/libraries/srt/default.nix
new file mode 100644
index 000000000000..be81970413b8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/srt/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, openssl
+, windows
+}:
+
+stdenv.mkDerivation rec {
+  pname = "srt";
+  version = "1.5.3";
+
+  src = fetchFromGitHub {
+    owner = "Haivision";
+    repo = "srt";
+    rev = "v${version}";
+    sha256 = "sha256-HmfbBPyR+z5d9/XBvNhosk8pSSPToNtM+V0hEyb2G2w=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [
+    openssl
+  ] ++ lib.optionals stdenv.hostPlatform.isMinGW [
+    windows.mingw_w64_pthreads
+  ];
+
+  patches = lib.optionals stdenv.hostPlatform.isMinGW [
+    ./no-msvc-compat-headers.patch
+  ];
+
+  cmakeFlags = [
+    # the cmake package does not handle absolute CMAKE_INSTALL_INCLUDEDIR correctly
+    # (setting it to an absolute path causes include files to go to $out/$out/include,
+    #  because the absolute path is interpreted with root at $out).
+    "-DCMAKE_INSTALL_INCLUDEDIR=include"
+    "-DENABLE_SHARED=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
+    # TODO Remove this when https://github.com/Haivision/srt/issues/538 is fixed and available to nixpkgs
+    # Workaround for the fact that srt incorrectly disables GNUInstallDirs when LIBDIR is specified,
+    # see https://github.com/NixOS/nixpkgs/pull/54463#discussion_r249878330
+    "-UCMAKE_INSTALL_LIBDIR"
+  ];
+
+  meta = with lib; {
+    description = "Secure, Reliable, Transport";
+    homepage = "https://github.com/Haivision/srt";
+    license = licenses.mpl20;
+    maintainers = with maintainers; [ nh2 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/srt/no-msvc-compat-headers.patch b/nixpkgs/pkgs/development/libraries/srt/no-msvc-compat-headers.patch
new file mode 100644
index 000000000000..ffededc7d54e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/srt/no-msvc-compat-headers.patch
@@ -0,0 +1,10 @@
+--- srt-1.3.2/common/filelist_win32.maf.orig	2018-06-15 21:44:11.000000000 +0200
++++ srt-1.3.2/common/filelist_win32.maf	2018-09-25 20:26:36.903688700 +0200
+@@ -4,7 +4,6 @@
+ #
+ # These are included by platform_sys.h header contained in ../srtcore/filelist.maf
+ #
+-win/unistd.h
+ 
+ SOURCES
+ win_time.cpp
diff --git a/nixpkgs/pkgs/development/libraries/srtp/default.nix b/nixpkgs/pkgs/development/libraries/srtp/default.nix
new file mode 100644
index 000000000000..8bcd854f3681
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/srtp/default.nix
@@ -0,0 +1,57 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, libpcap
+, meson
+, ninja
+, openssl
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libsrtp";
+  version = "2.5.0";
+
+  src = fetchFromGitHub {
+    owner = "cisco";
+    repo = "libsrtp";
+    rev = "v${version}";
+    sha256 = "sha256-OvCw7oF1OuamP3qO2BsimeBSHq1rcXFLfK8KnbbgkMU=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+  ];
+
+  buildInputs = [
+    libpcap
+    openssl
+  ];
+
+  # rtpw tests hang
+  preConfigure = ''
+    rm test/rtpw_test.sh \
+       test/rtpw_test_gcm.sh
+  '';
+
+  mesonFlags = [
+    "-Dcrypto-library=openssl"
+    "-Dcrypto-library-kdf=disabled"
+    "-Ddoc=disabled"
+    "-Dtests=${if doCheck then "enabled" else "disabled"}"
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/cisco/libsrtp";
+    description = "Secure RTP (SRTP) Reference Implementation";
+    license = licenses.bsd3;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ r-burns ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/stargate-libcds/Makefile.patch b/nixpkgs/pkgs/development/libraries/stargate-libcds/Makefile.patch
new file mode 100644
index 000000000000..b5b116b78bec
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/stargate-libcds/Makefile.patch
@@ -0,0 +1,19 @@
+diff --git a/Makefile b/Makefile
+index 872af46..7eba8a1 100644
+--- a/Makefile
++++ b/Makefile
+@@ -156,13 +156,7 @@ test:
+ 	# Compile and run the test suite through Valgrind to check for
+ 	# memory errors, then generate an HTML code coverage report
+ 	# using gcovr
+-	$(CC) $(CC_ARGS) -O0 $(DEBUG_FLAGS) $(PLAT_FLAGS) $(GCOVARGS) \
++	$(CC) $(CC_ARGS) -O0 $(DEBUG_FLAGS) $(PLAT_FLAGS) \
+ 	    $(shell find src tests -name *.c) \
+ 	    -Iinclude \
+ 	    -o $(NAME).tests
+-	# If Valgrind exits non-zero, try running 'gdb ./libcds.tests'
+-	# to debug the test suite
+-	valgrind ./$(NAME).tests --track-origins=yes --leak-check=full
+-	mkdir html || rm -rf html/*
+-	gcovr -r . --exclude=bench --html --html-details -o html/coverage.html
+-	$(BROWSER) html/coverage.html &
diff --git a/nixpkgs/pkgs/development/libraries/stargate-libcds/default.nix b/nixpkgs/pkgs/development/libraries/stargate-libcds/default.nix
new file mode 100644
index 000000000000..b74f19e1959a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/stargate-libcds/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, stdenv
+, fetchpatch
+, fetchFromGitHub
+}:
+
+stdenv.mkDerivation rec {
+  pname = "stargate-libcds";
+  version = "1.0.0";
+
+  src = fetchFromGitHub {
+    owner = "stargateaudio";
+    repo = "libcds";
+    rev = version;
+    sha256 = "sha256-THThEzS8gGdwn3h0EBttaX5ljZH9Ma2Rcg143+GIdU8=";
+  };
+
+  # Fix 'error: unrecognized command line option' in platforms other than x86
+  PLAT_FLAGS = lib.optionalString stdenv.isx86_64 "-mfpmath=sse -mssse3";
+
+  patches = [
+    # Remove unnecessary tests (valgrind, coverage)
+    ./Makefile.patch
+
+    # Fix for building on darwin
+    (fetchpatch {
+      name = "malloc-to-stdlib.patch";
+      url = "https://github.com/stargateaudio/libcds/commit/65dc08f059deda8ba5707ba6116b616d0ad0bd8d.patch";
+      sha256 = "sha256-FIGlobUVrDYOtnHjsWyE420PoULPHEK/3T9Fv8hfTl4=";
+    })
+  ];
+
+  doCheck = true;
+
+  installPhase = ''
+    runHook preInstall
+    install -D libcds.so -t $out/lib/
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "C data structure library";
+    homepage = "https://github.com/stargateaudio/libcds";
+    maintainers = with maintainers; [ yuu ];
+    license = licenses.lgpl3Only;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/startup-notification/default.nix b/nixpkgs/pkgs/development/libraries/startup-notification/default.nix
new file mode 100644
index 000000000000..bf84345be2d1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/startup-notification/default.nix
@@ -0,0 +1,23 @@
+{lib, stdenv, fetchurl, libX11, libxcb, pkg-config, xcbutil}:
+
+stdenv.mkDerivation rec {
+  pname = "libstartup-notification";
+  version = "0.12";
+  src = fetchurl {
+    url = "https://www.freedesktop.org/software/startup-notification/releases/startup-notification-${version}.tar.gz";
+    sha256 = "3c391f7e930c583095045cd2d10eb73a64f085c7fde9d260f2652c7cb3cfbe4a";
+  };
+
+  configureFlags = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
+    "lf_cv_sane_realloc=yes"
+  ];
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libX11 libxcb xcbutil ];
+
+  meta = {
+    homepage = "https://www.freedesktop.org/software/startup-notification";
+    description = "Application startup notification and feedback library";
+    license = lib.licenses.lgpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/stb/default.nix b/nixpkgs/pkgs/development/libraries/stb/default.nix
new file mode 100644
index 000000000000..f96bb0724bf2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/stb/default.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, fetchFromGitHub, copyPkgconfigItems, makePkgconfigItem }:
+
+stdenv.mkDerivation rec {
+  pname = "stb";
+  version = "unstable-2023-01-29";
+
+  src = fetchFromGitHub {
+    owner = "nothings";
+    repo = "stb";
+    rev = "5736b15f7ea0ffb08dd38af21067c314d6a3aae9";
+    hash = "sha256-s2ASdlT3bBNrqvwfhhN6skjbmyEnUgvNOrvhgUSRj98=";
+  };
+
+  nativeBuildInputs = [ copyPkgconfigItems ];
+
+  pkgconfigItems = [
+    (makePkgconfigItem rec {
+      name = "stb";
+      version = "1";
+      cflags = [ "-I${variables.includedir}/stb" ];
+      variables = rec {
+        prefix = "${placeholder "out"}";
+        includedir = "${prefix}/include";
+      };
+      inherit (meta) description;
+    })
+  ];
+
+  dontBuild = true;
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/include/stb
+    cp *.h $out/include/stb/
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Single-file public domain libraries for C/C++";
+    homepage = "https://github.com/nothings/stb";
+    license = licenses.publicDomain;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/stduuid/default.nix b/nixpkgs/pkgs/development/libraries/stduuid/default.nix
new file mode 100644
index 000000000000..c7e31c990087
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/stduuid/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, cmake, fetchFromGitHub, lib }: let
+  version = "1.2.3";
+in stdenv.mkDerivation {
+  name = "stduuid-${version}";
+
+  src = fetchFromGitHub {
+    owner = "mariusbancila";
+    repo = "stduuid";
+    rev = "v${version}";
+    hash = "sha256-MhpKv+gH3QxiaQMx5ImiQjDGrbKUFaaoBLj5Voh78vg=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = {
+    description = "A C++17 cross-platform implementation for UUIDs";
+    license = lib.licenses.mit;
+    maintainers = [ lib.maintainers.shlevy ];
+    homepage = "https://github.com/mariusbancila/stduuid";
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/stfl/default.nix b/nixpkgs/pkgs/development/libraries/stfl/default.nix
new file mode 100644
index 000000000000..e848b4330955
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/stfl/default.nix
@@ -0,0 +1,56 @@
+{ lib, stdenv, fetchurl, ncurses, libiconv }:
+
+stdenv.mkDerivation rec {
+  pname = "stfl";
+  version = "0.24";
+
+  src = fetchurl {
+    url = "http://www.clifford.at/stfl/stfl-${version}.tar.gz";
+    sha256 = "1460d5lc780p3q38l3wc9jfr2a7zlyrcra0li65aynj738cam9yl";
+  };
+
+  makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
+
+  buildInputs = [ ncurses libiconv ];
+
+  # Silence warnings related to use of implicitly declared library functions and implicit ints.
+  # TODO: Remove and/or fix with patches the next time this package is updated.
+  env = lib.optionalAttrs stdenv.cc.isClang {
+    NIX_CFLAGS_COMPILE = toString [
+      "-Wno-error=implicit-function-declaration"
+      "-Wno-error=implicit-int"
+    ];
+  };
+
+  preBuild = ''
+    sed -i s/gcc/cc/g Makefile
+    sed -i s%ncursesw/ncurses.h%ncurses.h% stfl_internals.h
+  '' + lib.optionalString stdenv.isDarwin ''
+    sed -i s/-soname/-install_name/ Makefile
+  ''
+  # upstream builds shared library unconditionally. Also, it has no
+  # support for cross-compilation.
+  + lib.optionalString stdenv.hostPlatform.isStatic ''
+    sed -i 's/all:.*/all: libstfl.a stfl.pc/' Makefile
+    sed -i 's/\tar /\t${stdenv.cc.targetPrefix}ar /' Makefile
+    sed -i 's/\tranlib /\t${stdenv.cc.targetPrefix}ranlib /' Makefile
+    sed -i '/install -m 644 libstfl.so./d' Makefile
+    sed -i '/ln -fs libstfl.so./d' Makefile
+  '' ;
+
+  installPhase = ''
+    DESTDIR=$out prefix=\"\" make install
+  ''
+  # some programs rely on libstfl.so.0 to be present, so link it
+  + lib.optionalString (!stdenv.hostPlatform.isStatic) ''
+    ln -s $out/lib/libstfl.so.0.24 $out/lib/libstfl.so.0
+  '';
+
+  meta = {
+    homepage = "http://www.clifford.at/stfl/";
+    description = "A library which implements a curses-based widget set for text terminals";
+    maintainers = with lib.maintainers; [ lovek323 ];
+    license = lib.licenses.lgpl3;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/stxxl/default.nix b/nixpkgs/pkgs/development/libraries/stxxl/default.nix
new file mode 100644
index 000000000000..499532092f02
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/stxxl/default.nix
@@ -0,0 +1,44 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, parallelSupport ? (!stdenv.isDarwin)
+}:
+
+let
+  mkFlag = optset: flag: if optset then "-D${flag}=ON" else "-D${flag}=OFF";
+in
+
+stdenv.mkDerivation rec {
+  pname = "stxxl";
+  version = "1.4.1";
+
+  src = fetchFromGitHub {
+    owner = "stxxl";
+    repo = "stxxl";
+    rev = version;
+    sha256 = "sha256-U6DQ5mI83pyTmq5/ga5rI8v0h2/iEnNl8mxhIOpbF1I=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+    "-DBUILD_STATIC_LIBS=OFF"
+    (mkFlag parallelSupport "USE_GNU_PARALLEL")
+    (mkFlag parallelSupport "USE_OPENMP")
+  ];
+
+  passthru = {
+    inherit parallelSupport;
+  };
+
+  meta = with lib; {
+    description = "An implementation of the C++ standard template library STL for external memory (out-of-core) computations";
+    homepage = "https://github.com/stxxl/stxxl";
+    license = licenses.boost;
+    maintainers = with maintainers; [ ];
+    mainProgram = "stxxl_tool";
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/subunit/default.nix b/nixpkgs/pkgs/development/libraries/subunit/default.nix
new file mode 100644
index 000000000000..61c30ebcf033
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/subunit/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchurl, pkg-config, check, cppunit, perl, python3Packages }:
+
+# NOTE: for subunit python library see pkgs/top-level/python-packages.nix
+
+stdenv.mkDerivation rec {
+  pname = "subunit";
+  version = "1.4.2";
+
+  src = fetchurl {
+    url = "https://launchpad.net/subunit/trunk/${version}/+download/${pname}-${version}.tar.gz";
+    hash = "sha256-hlOOv6kIC97w7ICVsuXeWrsUbVu3tCSzEVKUHXYG2dI=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ check cppunit perl python3Packages.wrapPython ];
+
+  propagatedBuildInputs = with python3Packages; [ testtools testscenarios ];
+
+  postFixup = "wrapPythonPrograms";
+
+  meta = with lib; {
+    description = "A streaming protocol for test results";
+    homepage = "https://launchpad.net/subunit";
+    license = licenses.asl20;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/sundials/default.nix b/nixpkgs/pkgs/development/libraries/sundials/default.nix
new file mode 100644
index 000000000000..d53d15a3f71a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sundials/default.nix
@@ -0,0 +1,74 @@
+{ lib, stdenv
+, cmake
+, fetchurl
+, python
+, blas
+, lapack
+, gfortran
+, suitesparse
+, lapackSupport ? true
+, kluSupport ? true
+}:
+
+stdenv.mkDerivation rec {
+  pname = "sundials";
+  version = "6.7.0";
+
+  outputs = [ "out" "examples" ];
+
+  src = fetchurl {
+    url = "https://github.com/LLNL/sundials/releases/download/v${version}/sundials-${version}.tar.gz";
+    hash = "sha256-XxE6FWSp0tmP+VJJ9IcaTIFaBdu5uIZqgrE6sVjDets=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    gfortran
+  ];
+
+  buildInputs = [
+    python
+  ]
+    ++ lib.optionals (lapackSupport)
+    # Check that the same index size is used for both libraries
+    (assert (blas.isILP64 == lapack.isILP64); [
+      blas
+      lapack
+    ])
+  # KLU support is based on Suitesparse. It is tested upstream according to the
+  # section 1.1.4.2 of INSTALL_GUIDE.pdf found in the source tarball.
+  ++ lib.optionals (kluSupport) [
+    suitesparse
+  ];
+
+  cmakeFlags = [
+    "-DEXAMPLES_INSTALL_PATH=${placeholder "examples"}/share/examples"
+  ] ++ lib.optionals (lapackSupport) [
+    "-DENABLE_LAPACK=ON"
+    "-DLAPACK_LIBRARIES=${lapack}/lib/liblapack${stdenv.hostPlatform.extensions.sharedLibrary}"
+  ] ++ lib.optionals (kluSupport) [
+    "-DENABLE_KLU=ON"
+    "-DKLU_INCLUDE_DIR=${suitesparse.dev}/include"
+    "-DKLU_LIBRARY_DIR=${suitesparse}/lib"
+  ] ++ [(
+    # Use the correct index type according to lapack and blas used. They are
+    # already supposed to be compatible but we check both for extra safety. 64
+    # should be the default but we prefer to be explicit, for extra safety.
+    if blas.isILP64 then
+      "-DSUNDIALS_INDEX_SIZE=64"
+    else
+      "-DSUNDIALS_INDEX_SIZE=32"
+  )]
+  ;
+
+  doCheck = true;
+  checkTarget = "test";
+
+  meta = with lib; {
+    description = "Suite of nonlinear differential/algebraic equation solvers";
+    homepage    = "https://computing.llnl.gov/projects/sundials";
+    platforms   = platforms.all;
+    maintainers = with maintainers; [ idontgetoutmuch ];
+    license     = licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/svrcore/default.nix b/nixpkgs/pkgs/development/libraries/svrcore/default.nix
new file mode 100644
index 000000000000..fbc17a5e7b21
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/svrcore/default.nix
@@ -0,0 +1,20 @@
+{ lib, stdenv, fetchurl, pkg-config, nss, nspr }:
+
+stdenv.mkDerivation rec {
+  pname = "svrcore";
+  version = "4.0.4";
+
+  src = fetchurl {
+    url = "mirror://mozilla/directory/svrcore/releases/${version}/src/${pname}-${version}.tar.bz2";
+    sha256 = "0n3alg6bxml8952fb6h0bi0l29farvq21q6k20gy2ba90m3znwj7";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ nss nspr ];
+
+  meta = with lib; {
+    description = "Secure PIN handling using NSS crypto";
+    license = licenses.mpl11;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/swiften/build-fix.patch b/nixpkgs/pkgs/development/libraries/swiften/build-fix.patch
new file mode 100644
index 000000000000..d0ce099973c2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/swiften/build-fix.patch
@@ -0,0 +1,42 @@
+diff -wbBur swift-4.0.2/Swift/QtUI/UserSearch/QtUserSearchWindow.h swift-4.0.2.my/Swift/QtUI/UserSearch/QtUserSearchWindow.h
+--- swift-4.0.2/Swift/QtUI/UserSearch/QtUserSearchWindow.h	2018-04-06 13:06:46.000000000 +0300
++++ swift-4.0.2.my/Swift/QtUI/UserSearch/QtUserSearchWindow.h	2019-10-08 20:52:23.171475337 +0300
+@@ -9,6 +9,7 @@
+ #include <set>
+ 
+ #include <QWizard>
++#include <QAbstractItemModel>
+ 
+ #include <Swiften/Base/Override.h>
+ 
+diff -wbBur swift-4.0.2/Swiften/Network/PlatformNATTraversalWorker.cpp swift-4.0.2.my/Swiften/Network/PlatformNATTraversalWorker.cpp
+--- swift-4.0.2/Swiften/Network/PlatformNATTraversalWorker.cpp	2018-04-06 13:06:46.000000000 +0300
++++ swift-4.0.2.my/Swiften/Network/PlatformNATTraversalWorker.cpp	2019-10-08 21:12:25.284754131 +0300
+@@ -157,7 +157,7 @@
+         miniUPnPInterface = new MiniUPnPInterface();
+         miniUPnPSupported = miniUPnPInterface->isAvailable();
+     }
+-    SWIFT_LOG(debug) << "UPnP NAT traversal supported: " << miniUPnPSupported << std::endl;
++//    SWIFT_LOG(debug) << "UPnP NAT traversal supported: " << miniUPnPSupported << std::endl;
+     if (miniUPnPSupported) {
+         return miniUPnPInterface;
+     }
+@@ -168,7 +168,7 @@
+         natPMPInterface = new NATPMPInterface();
+         natPMPSupported = natPMPInterface->isAvailable();
+     }
+-    SWIFT_LOG(debug) << "NAT-PMP NAT traversal supported: " << natPMPSupported << std::endl;
++//    SWIFT_LOG(debug) << "NAT-PMP NAT traversal supported: " << natPMPSupported << std::endl;
+     if (natPMPSupported) {
+         return natPMPInterface;
+     }
+--- a/Swift/Controllers/ShowProfileController.h
++++ b/Swift/Controllers/ShowProfileController.h
+@@ -12,6 +12,7 @@
+ 
+ #pragma once
+ 
++#include <map>
+ #include <Swiften/Elements/ErrorPayload.h>
+ #include <Swiften/Elements/VCard.h>
+ #include <Swiften/JID/JID.h>
diff --git a/nixpkgs/pkgs/development/libraries/swiften/default.nix b/nixpkgs/pkgs/development/libraries/swiften/default.nix
new file mode 100644
index 000000000000..f839021c949e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/swiften/default.nix
@@ -0,0 +1,89 @@
+{ stdenv
+, lib
+, libidn
+, lua
+, miniupnpc
+, expat
+, zlib
+, fetchurl
+, fetchpatch
+, openssl
+, boost
+, scons
+}:
+
+stdenv.mkDerivation rec {
+  pname = "swiften";
+  version = "4.0.3";
+
+  src = fetchurl {
+    url = "http://swift.im/git/swift/snapshot/swift-${version}.tar.bz2";
+    hash = "sha256-aj+T6AevtR8birbsj+83nfzFC6cf72q+7nwSM0jaZrA=";
+  };
+
+  patches = [
+    ./scons.patch
+    ./build-fix.patch
+
+    # Fix build with latest boost
+    # https://swift.im/git/swift/commit/Swiften/Base/Platform.h?id=3666cbbe30e4d4e25401a5902ae359bc2c24248b
+    (fetchpatch {
+      name = "3666cbbe30e4d4e25401a5902ae359bc2c24248b.patch";
+      url = "https://swift.im/git/swift/patch/Swiften/Base/Platform.h?id=3666cbbe30e4d4e25401a5902ae359bc2c24248b";
+      sha256 = "Wh8Nnfm0/EppSJ7aH2vTNObHtodE5tM19kV1oDfm70w=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    scons
+  ];
+
+  buildInputs = [
+    libidn
+    lua
+    miniupnpc
+    expat
+    zlib
+  ];
+
+  propagatedBuildInputs = [
+    openssl
+    boost
+  ];
+
+  sconsFlags = [
+    "openssl=${openssl.dev}"
+    "boost_includedir=${boost.dev}/include"
+    "boost_libdir=${boost.out}/lib"
+    "boost_bundled_enable=false"
+    "max_jobs=1"
+    "optimize=1"
+    "debug=0"
+    "swiften_dll=1"
+  ];
+
+  postPatch = ''
+    # Ensure bundled dependencies cannot be used.
+    rm -rf 3rdParty
+
+    find . \( \
+      -name '*.py' -o -name SConscript -o -name SConstruct \
+      \) -exec 2to3 -w {} +
+  '';
+
+  installTargets = "${placeholder "out"}";
+
+  installFlags = [
+    "SWIFTEN_INSTALLDIR=${placeholder "out"}"
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "An XMPP library for C++, used by the Swift client";
+    homepage = "http://swift.im/swiften.html";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.twey ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/swiften/scons.patch b/nixpkgs/pkgs/development/libraries/swiften/scons.patch
new file mode 100644
index 000000000000..d956767696d0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/swiften/scons.patch
@@ -0,0 +1,9 @@
+--- a/BuildTools/SCons/SConscript.boot
++++ b/BuildTools/SCons/SConscript.boot
+@@ -129,5 +129 @@ vars.Add(PathVariable("sparkle_public_dsa_key", "Optional path to a public DSA k
+-env_ENV = {
+-    'PATH' : os.environ['PATH'],
+-    'LD_LIBRARY_PATH' : os.environ.get("LD_LIBRARY_PATH", ""),
+-    'TERM' : os.environ.get("TERM", ""),
+-}
++env_ENV = os.environ
diff --git a/nixpkgs/pkgs/development/libraries/swiftshader/default.nix b/nixpkgs/pkgs/development/libraries/swiftshader/default.nix
new file mode 100644
index 000000000000..36564110d283
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/swiftshader/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, fetchgit, python3, cmake, jq, libX11, libXext, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "swiftshader";
+  version = "2023-09-11";
+
+  src = fetchgit {
+    url = "https://swiftshader.googlesource.com/SwiftShader";
+    rev = "4e40d502c440cc59b25fa3a5fee0eadbab7442aa";
+    sha256 = "085bdqn80s7zw5h2pz6xff3j34hmkxb9wxzgjmzdr9c24zwp2k1c";
+  };
+
+  nativeBuildInputs = [ cmake python3 jq ];
+
+  # Make sure we include the drivers and icd files in the output as the cmake
+  # generated install command only puts in the spirv-tools stuff.
+  installPhase = ''
+    runHook preInstall
+
+    #
+    # Vulkan driver
+    #
+    vk_so_path="$out/lib/libvk_swiftshader.so"
+    mkdir -p "$(dirname "$vk_so_path")"
+    mv Linux/libvk_swiftshader.so "$vk_so_path"
+
+    vk_icd_json="$out/share/vulkan/icd.d/vk_swiftshader_icd.json"
+    mkdir -p "$(dirname "$vk_icd_json")"
+    jq ".ICD.library_path = \"$vk_so_path\"" <Linux/vk_swiftshader_icd.json >"$vk_icd_json"
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description =
+      "A high-performance CPU-based implementation of the Vulkan 1.3 graphics API";
+    homepage = "https://opensource.google/projects/swiftshader";
+    license = licenses.asl20;
+    # Should be possible to support Darwin by changing the install phase with
+    # 's/Linux/Darwin/' and 's/so/dylib/' or something similar.
+    platforms = with platforms; linux;
+    maintainers = with maintainers; [ expipiplus1 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/sword/default.nix b/nixpkgs/pkgs/development/libraries/sword/default.nix
new file mode 100644
index 000000000000..8871a66fd8c9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sword/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, fetchurl, pkg-config, icu, clucene_core, curl }:
+
+stdenv.mkDerivation rec {
+
+  pname = "sword";
+  version = "1.8.1";
+
+  src = fetchurl {
+    url = "https://www.crosswire.org/ftpmirror/pub/sword/source/v1.8/${pname}-${version}.tar.gz";
+    sha256 = "14syphc47g6svkbg018nrsgq4z6hid1zydax243g8dx747vsi6nf";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ icu clucene_core curl ];
+
+  prePatch = ''
+    patchShebangs .;
+  '';
+
+  configureFlags = [ "--without-conf" "--enable-tests=no" ];
+  CXXFLAGS = [
+    "-Wno-unused-but-set-variable"
+    # compat with icu61+ https://github.com/unicode-org/icu/blob/release-64-2/icu4c/readme.html#L554
+    "-DU_USING_ICU_NAMESPACE=1"
+  ];
+
+  meta = with lib; {
+    description = "A software framework that allows research manipulation of Biblical texts";
+    homepage = "http://www.crosswire.org/sword/";
+    longDescription = ''
+      The SWORD Project is the CrossWire Bible Society's free Bible software
+      project. Its purpose is to create cross-platform open-source tools --
+      covered by the GNU General Public License -- that allow programmers and
+      Bible societies to write new Bible software more quickly and easily. We
+      also create Bible study software for all readers, students, scholars, and
+      translators of the Bible, and have a growing collection of many hundred
+      texts in around 100 languages.
+    '';
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.unix;
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/sycl-info/default.nix b/nixpkgs/pkgs/development/libraries/sycl-info/default.nix
new file mode 100644
index 000000000000..9d86017e084e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/sycl-info/default.nix
@@ -0,0 +1,57 @@
+{ lib, stdenv
+, fetchFromGitHub
+, installShellFiles
+, cmake
+, ninja
+, ocl-icd
+, opencl-headers
+, lyra
+, nlohmann_json
+, ronn
+, doctest
+}:
+
+stdenv.mkDerivation rec {
+  pname = "sycl-info";
+  version = "unstable-2019-11-19";
+
+  src = fetchFromGitHub {
+    owner = "codeplaysoftware";
+    repo = "sycl-info";
+    rev = "b47d498ee2d6b77ec21972de5882e8e12efecd6c";
+    sha256 = "0fy0y1rcfb11p3vijd8wym6xkaicav49pv2bv2l18rma929n1m1m";
+  };
+
+  buildInputs = [
+    nlohmann_json
+    ronn
+    opencl-headers
+    ocl-icd
+    doctest
+    lyra
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    ninja
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_TESTING=ON"
+    "-DBUILD_DOCS=ON"
+    "-DBUILD_SHARED_LIBS=ON"
+    "-DLYRA_INCLUDE_DIRS=${lib.getDev lyra}/include"
+  ];
+
+  # Required for ronn to compile the manpage.
+  RUBYOPT = "-KU -E utf-8:utf-8";
+
+  meta = with lib;
+    {
+      homepage = "https://github.com/codeplaysoftware/sycl-info";
+      description = "Tool to show information about available SYCL implementations";
+      platforms = platforms.linux;
+      license = licenses.asl20;
+      maintainers = with maintainers; [ davidtwco ];
+    };
+}
diff --git a/nixpkgs/pkgs/development/libraries/symengine/default.nix b/nixpkgs/pkgs/development/libraries/symengine/default.nix
new file mode 100644
index 000000000000..cc08b7ff3c2e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/symengine/default.nix
@@ -0,0 +1,50 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, gmp
+, flint
+, mpfr
+, libmpc
+, withShared ? true
+}:
+
+stdenv.mkDerivation rec {
+  pname = "symengine";
+  version = "0.11.2";
+
+  src = fetchFromGitHub {
+    owner = "symengine";
+    repo = "symengine";
+    rev = "v${version}";
+    hash = "sha256-CwVDpDbx00r7Fys+5r1n0m/E86zTx1i4ti5JCcVp20g=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ gmp flint mpfr libmpc ];
+
+  cmakeFlags = [
+    "-DWITH_FLINT=ON"
+    "-DINTEGER_CLASS=flint"
+    "-DWITH_SYMENGINE_THREAD_SAFE=yes"
+    "-DWITH_MPC=yes"
+    "-DBUILD_FOR_DISTRIBUTION=yes"
+  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
+    # error: unrecognized instruction mnemonic, did you mean: bit, cnt, hint, ins, not?
+    "-DBUILD_TESTS=OFF"
+  ] ++ lib.optionals withShared [
+    "-DBUILD_SHARED_LIBS=ON"
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "A fast symbolic manipulation library";
+    homepage = "https://github.com/symengine/symengine";
+    platforms = platforms.unix ++ platforms.windows;
+    license = licenses.bsd3;
+    maintainers = [ maintainers.costrouc ];
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/szip/default.nix b/nixpkgs/pkgs/development/libraries/szip/default.nix
new file mode 100644
index 000000000000..f6d0c619c770
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/szip/default.nix
@@ -0,0 +1,16 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "szip";
+  version = "2.1.1";
+  src = fetchurl {
+    url = "https://support.hdfgroup.org/ftp/lib-external/szip/${version}/src/szip-${version}.tar.gz";
+    sha256 = "04nlhkzzf1gihvrfbzc6rq4kc13p92ly39dzrb4y4jrd9y5rbvi1";
+  };
+
+  meta = {
+    description = "Compression library that can be used with the hdf5 library";
+    homepage = "https://www.hdfgroup.org/doc_resource/SZIP/";
+    license = lib.licenses.unfree;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/t1lib/default.nix b/nixpkgs/pkgs/development/libraries/t1lib/default.nix
new file mode 100644
index 000000000000..66c9863c38a4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/t1lib/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchurl, fetchpatch, libX11, libXaw }:
+
+let
+  getPatch = { name, sha256 }: fetchpatch {
+    inherit name sha256;
+    url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/${name}"
+      + "?h=packages/t1lib&id=643a4c2c58e70072b5bc1e9e4624162517b58357";
+  };
+
+  patches = map getPatch [
+    { name = "lib-cleanup.diff"; sha256 = "1w3q1y4zk0y4mf2s2x9z4cd8d4af8i868c8837p40mz3dqrai4zp"; }
+    { name = "format-security.diff"; sha256 = "0cca94bif9dsc6iwpcnk1504gb3sl3nsqhni85c21q9aywyz26l3"; }
+    { name = "CVE-2011-0764.diff"; sha256 = "1j0y3f38im7srpqjg9jvx8as6sxkz8gw7hglcxnxl9qylx8mr2jh"; }
+    { name = "CVE-2011-1552_1553_1554.patch"; sha256 = "16cyq6jhyhh8912j8hapx9pq4rzxk36ljlkxlnyi7i3wr8iz1dir"; }
+    { name = "CVE-2010-2642.patch"; sha256 = "175zvyr9v1xs22k2svgxqjcpz5nihfa7j46hn9nzvkqcrhm5m9y8"; }
+      # this ^ also fixes CVE-2011-5244
+  ];
+in
+stdenv.mkDerivation rec {
+  pname = "t1lib";
+  version = "5.1.2";
+
+  src = fetchurl {
+    url = "mirror://ibiblioPubLinux/libs/graphics/${pname}-${version}.tar.gz";
+    hash = "sha256-ghMotQVPeJCg0M0vUoJScHBd82QdvUdtWNF+Vu2Ve1k=";
+  };
+  inherit patches;
+
+  buildInputs = [ libX11 libXaw ];
+  buildFlags = [ "without_doc" ];
+
+  postInstall = lib.optionalString (!stdenv.isDarwin) ''
+    # ??
+    chmod +x $out/lib/*.so.*
+  '';
+
+  meta = with lib; {
+    homepage = "http://www.t1lib.org/";
+    description = "A type 1 font rasterizer library for UNIX/X11";
+    license = with licenses; [ gpl2 lgpl2 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ta-lib/default.nix b/nixpkgs/pkgs/development/libraries/ta-lib/default.nix
new file mode 100644
index 000000000000..ea5ec66cf169
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ta-lib/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "ta-lib";
+  version = "0.4.0";
+  src = fetchFromGitHub {
+    owner = "rafa-dot-el";
+    repo = "talib";
+    rev = version;
+    sha256 = "sha256-bIzN8f9ZiOLaVzGAXcZUHUh/v9z1U+zY+MnyjJr1lSw=";
+  };
+
+  nativeBuildInputs = [ pkg-config autoreconfHook ];
+  hardeningDisable = [ "format" ];
+
+  meta = with lib; {
+    description =
+      "TA-Lib is a library that provides common functions for the technical analysis of financial market data.";
+    homepage = "https://ta-lib.org/";
+    license = lib.licenses.bsd3;
+
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ rafael ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tachyon/default.nix b/nixpkgs/pkgs/development/libraries/tachyon/default.nix
new file mode 100644
index 000000000000..64746d84572a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tachyon/default.nix
@@ -0,0 +1,77 @@
+{ lib, stdenv
+, fetchurl
+, Carbon
+, libjpeg
+, libpng
+, withJpegSupport ? true # support jpeg output
+, withPngSupport ? true # support png output
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tachyon";
+  version = "0.99.5";
+  src = fetchurl {
+    url = "http://jedi.ks.uiuc.edu/~johns/tachyon/files/${version}/${pname}-${version}.tar.gz";
+    sha256 = "sha256-CSA8ECMRFJ9d9cw2dAn5bHJXQmZtGcJNtbqZTVqBpvU=";
+  };
+  buildInputs = lib.optionals stdenv.isDarwin [
+    Carbon
+  ] ++ lib.optionals withJpegSupport [
+    libjpeg
+  ] ++ lib.optionals withPngSupport [
+    libpng
+  ];
+  preBuild = ''
+    cd unix
+  '' + lib.optionalString withJpegSupport ''
+    export USEJPEG=" -DUSEJPEG"
+    export JPEGLIB=" -ljpeg"
+  '' + lib.optionalString withPngSupport ''
+    export USEPNG=" -DUSEPNG"
+    export PNGLIB=" -lpng -lz"
+  '';
+  arch = if stdenv.hostPlatform.system == "x86_64-linux"   then "linux-64-thr"  else
+         if stdenv.hostPlatform.system == "i686-linux"     then "linux-thr"     else
+         # 2021-03-29: multithread (-DTHR -D_REENTRANT) was disabled on linux-arm
+         # because it caused Sage's 3D plotting tests to hang indefinitely.
+         # see https://github.com/NixOS/nixpkgs/pull/117465
+         if stdenv.hostPlatform.system == "aarch64-linux"  then "linux-arm"     else
+         if stdenv.hostPlatform.system == "armv7l-linux"   then "linux-arm"     else
+         if stdenv.hostPlatform.system == "x86_64-darwin"  then "macosx-thr"    else
+         if stdenv.hostPlatform.system == "i686-darwin"    then "macosx-64-thr" else
+         if stdenv.hostPlatform.system == "i686-cygwin"    then "win32"         else
+         if stdenv.hostPlatform.system == "x86_64-freebsd" then "bsd"           else
+         if stdenv.hostPlatform.system == "x686-freebsd"   then "bsd"           else
+         throw "Don't know what arch to select for tachyon build";
+  makeFlags = [ arch ];
+
+  patches = [
+    # Remove absolute paths in Make-config (and unset variables so they can be set in preBuild)
+    ./no-absolute-paths.patch
+    # Include new targets (like arm)
+    ./make-archs.patch
+  ];
+  postPatch = ''
+    # Ensure looks for nix-provided Carbon, not system frameworks
+    substituteInPlace unix/Make-arch \
+      --replace '-F/System/Library/Frameworks' ""
+  '';
+
+  installPhase = ''
+    cd ../compile/${arch}
+    mkdir -p "$out"/{bin,lib,include,share/doc/tachyon,share/tachyon}
+    cp tachyon "$out"/bin
+    cp libtachyon.* "$out/lib"
+    cd ../..
+    cp src/*.h "$out/include/"
+    cp Changes Copyright README "$out/share/doc/tachyon"
+    cp -r scenes "$out/share/tachyon/scenes"
+  '';
+  meta = {
+    description = "A Parallel / Multiprocessor Ray Tracing System";
+    license = lib.licenses.bsd3;
+    maintainers = [lib.maintainers.raskin];
+    platforms = with lib.platforms; linux ++ cygwin ++ darwin;
+    homepage = "http://jedi.ks.uiuc.edu/~johns/tachyon/";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tachyon/make-archs.patch b/nixpkgs/pkgs/development/libraries/tachyon/make-archs.patch
new file mode 100644
index 000000000000..ee81681e101f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tachyon/make-archs.patch
@@ -0,0 +1,37 @@
+diff --git a/unix/Make-arch b/unix/Make-arch
+index 08afb85..dbeb691 100644
+--- a/unix/Make-arch
++++ b/unix/Make-arch
+@@ -920,6 +920,15 @@ macosx:
+ 	"RANLIB = ranlib" \
+ 	"LIBS = -L. -ltachyon $(MISCLIB)"
+ 
++macosx-64:
++	$(MAKE) all \
++	"ARCH = macosx" \
++	"CFLAGS = -Os -m64 -ffast-math -DBsd $(MISCFLAGS)" \
++	"ARFLAGS = r" \
++	"STRIP = strip" \
++	"RANLIB = ranlib" \
++	"LIBS = -L. -ltachyon $(MISCLIB)"
++
+ macosx-thr:
+ 	$(MAKE) all \
+ 	"ARCH = macosx-thr" \
+@@ -1209,6 +1218,16 @@ linux-thr:
+ 	"RANLIB = ranlib" \
+ 	"LIBS = -L. -ltachyon $(MISCLIB) -lm -lpthread"
+ 
++# Linux Arm using gcc
++linux-arm:
++	$(MAKE) all \
++	"ARCH = linux-arm" \
++	"CFLAGS = -Wall -O3 -fomit-frame-pointer -ffast-math -DLinux $(MISCFLAGS)" \
++	"ARFLAGS = r" \
++	"STRIP = strip" \
++	"RANLIB = ranlib" \
++	"LIBS = -L. -ltachyon $(MISCLIB) -lm -lpthread"
++
+ # Linux x86 using gcc, threads, and OpenGL
+ linux-thr-ogl:
+ 	$(MAKE) all \
diff --git a/nixpkgs/pkgs/development/libraries/tachyon/no-absolute-paths.patch b/nixpkgs/pkgs/development/libraries/tachyon/no-absolute-paths.patch
new file mode 100644
index 000000000000..8ebc6560405b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tachyon/no-absolute-paths.patch
@@ -0,0 +1,60 @@
+diff --git a/unix/Make-config b/unix/Make-config
+--- a/unix/Make-config
++++ b/unix/Make-config
+@@ -18,7 +18,7 @@
+ # Bourne Shell Configuration:
+ #   set SHELL=/bin/sh or wherever your bourne shell is
+ ##########################################################################
+-SHELL=/bin/sh
++# SHELL=/bin/sh
+ 
+ 
+ 
+@@ -30,7 +30,7 @@
+ 
+ # The following line should be set to -Ixxx where xxx is your X11 include path
+ # Sun puts X11 in /usr/openwin/xxx
+-X11INC= -I/usr/openwin/include
++# X11INC= -I/usr/openwin/include
+ 
+ # Others typically use /usr/X11 or /usr/X11R6
+ #X11INC= -I/usr/X11
+@@ -105,9 +105,9 @@
+ ##########################################################################
+ # Customize MPI directories and includes as-needed.
+ # A typical MPICH installation location:
+-MPIDIR=/usr/local/mpi
+-MPIINC=$(MPIDIR)/include
+-MPILIB=$(MPIDIR)/lib
++# MPIDIR=/usr/local/mpi
++# MPIINC=$(MPIDIR)/include
++# MPILIB=$(MPIDIR)/lib
+ 
+ # MPI defines and any flags needed by the local installation.
+ # Always list -DMPI at a minimum.  
+@@ -166,9 +166,9 @@
+ #   http://www.ijg.org/files/
+ ##########################################################################
+ # Uncomment the following lines to disable JPEG support
+-USEJPEG=
+-JPEGINC=
+-JPEGLIB=
++# USEJPEG=
++# JPEGINC=
++# JPEGLIB=
+ 
+ # Uncomment the following lines to enable JPEG support
+ #USEJPEG= -DUSEJPEG
+@@ -186,9 +186,9 @@
+ #   http://www.libpng.org/
+ ##########################################################################
+ # Uncomment the following lines to disable PNG support
+-USEPNG=
+-PNGINC=
+-PNGLIB=
++# USEPNG=
++# PNGINC=
++# PNGLIB=
+ 
+ # Uncomment the following lines to enable PNG support
+ #USEPNG= -DUSEPNG
diff --git a/nixpkgs/pkgs/development/libraries/taco/default.nix b/nixpkgs/pkgs/development/libraries/taco/default.nix
new file mode 100644
index 000000000000..1bd404806f10
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/taco/default.nix
@@ -0,0 +1,54 @@
+{ stdenv
+, lib
+, fetchgit
+, cmake
+, llvmPackages
+, enablePython ? false
+, python ? null
+}:
+
+let pyEnv = python.withPackages (p: with p; [ numpy scipy ]);
+
+in stdenv.mkDerivation rec {
+  pname = "taco";
+  version = "unstable-2022-08-02";
+
+  src = fetchgit {
+    url = "https://github.com/tensor-compiler/${pname}.git";
+    rev = "2b8ece4c230a5f0f0a74bc6f48e28edfb6c1c95e";
+    fetchSubmodules = true;
+    hash = "sha256-PnBocyRLiLALuVS3Gkt/yJeslCMKyK4zdsBI8BFaTSg=";
+  };
+
+  # Remove test cases from cmake build as they violate modern C++ expectations
+  patches = [ ./taco.patch ];
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = lib.optional stdenv.isDarwin llvmPackages.openmp;
+
+  propagatedBuildInputs = lib.optional enablePython pyEnv;
+
+  cmakeFlags = [
+    "-DOPENMP=ON"
+  ] ++ lib.optional enablePython "-DPYTHON=ON" ;
+
+  postInstall = lib.strings.optionalString enablePython ''
+    mkdir -p $out/${python.sitePackages}
+    cp -r lib/pytaco $out/${python.sitePackages}/.
+  '';
+
+  # The standard CMake test suite fails a single test of the CLI interface.
+  doCheck = false;
+
+  # Cython somehow gets built with references to /build/.
+  # However, the python module works flawlessly.
+  dontFixup = enablePython;
+
+  meta = with lib; {
+    description = "Computes sparse tensor expressions on CPUs and GPUs";
+    license = licenses.mit;
+    homepage = "https://github.com/tensor-compiler/taco";
+    maintainers = [ maintainers.sheepforce ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/taco/taco.patch b/nixpkgs/pkgs/development/libraries/taco/taco.patch
new file mode 100644
index 000000000000..1fc61c2aa5ad
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/taco/taco.patch
@@ -0,0 +1,13 @@
+diff --git a/test/tests-tensor_types.cpp b/test/tests-tensor_types.cpp
+index 39d1b30a..c507da81 100644
+--- a/test/tests-tensor_types.cpp
++++ b/test/tests-tensor_types.cpp
+@@ -45,7 +45,7 @@ TYPED_TEST_P(VectorTensorTest, types) {
+   ASSERT_EQ(t, a.getComponentType());
+   ASSERT_EQ(1, a.getOrder());
+   ASSERT_EQ(5, a.getDimension(0));
+-  map<vector<int>,TypeParam> vals = {{{0}, 1.0}, {{2}, 2.0}};
++  map<vector<int>,TypeParam> vals = {{{0}, (TypeParam)1.0}, {{2}, (TypeParam)2.0}};
+   for (auto& val : vals) {
+     a.insert(val.first, val.second);
+   }
diff --git a/nixpkgs/pkgs/development/libraries/taglib-extras/default.nix b/nixpkgs/pkgs/development/libraries/taglib-extras/default.nix
new file mode 100644
index 000000000000..acb52cc53dbf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/taglib-extras/default.nix
@@ -0,0 +1,23 @@
+{lib, stdenv, fetchurl, cmake, taglib, zlib}:
+
+stdenv.mkDerivation rec {
+  pname = "taglib-extras";
+  version = "1.0.1";
+  src = fetchurl {
+    url = "https://ftp.rz.uni-wuerzburg.de/pub/unix/kde/taglib-extras/${version}/src/${pname}-${version}.tar.gz";
+    sha256 = "0cln49ws9svvvals5fzxjxlzqm0fzjfymn7yfp4jfcjz655nnm7y";
+  };
+  buildInputs = [ taglib ];
+  nativeBuildInputs = [ cmake zlib ];
+
+  # Workaround for upstream bug https://bugs.kde.org/show_bug.cgi?id=357181
+  preConfigure = ''
+    sed -i -e 's/STRLESS/VERSION_LESS/g' cmake/modules/FindTaglib.cmake
+  '';
+
+  meta = with lib; {
+    description = "Additional taglib plugins";
+    platforms = platforms.unix;
+    license = licenses.lgpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/taglib-sharp/default.nix b/nixpkgs/pkgs/development/libraries/taglib-sharp/default.nix
new file mode 100644
index 000000000000..78a4026455e6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/taglib-sharp/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, which, pkg-config, mono }:
+
+stdenv.mkDerivation rec {
+  pname = "taglib-sharp";
+  version = "2.1.0.0";
+
+  src = fetchFromGitHub {
+    owner = "mono";
+    repo = "taglib-sharp";
+    rev = "taglib-sharp-${version}";
+    sha256 = "12pk4z6ag8w7kj6vzplrlasq5lwddxrww1w1ya5ivxrfki15h5cp";
+  };
+
+  nativeBuildInputs = [ pkg-config autoreconfHook which ];
+  buildInputs = [ mono ];
+
+  dontStrip = true;
+
+  configureFlags = [ "--disable-docs" ];
+
+  meta = with lib; {
+    description = "Library for reading and writing metadata in media files";
+    homepage = "https://github.com/mono/taglib-sharp";
+    platforms = platforms.linux;
+    license = licenses.lgpl21;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/taglib/default.nix b/nixpkgs/pkgs/development/libraries/taglib/default.nix
new file mode 100644
index 000000000000..aa759ddbbb02
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/taglib/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, zlib
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "taglib";
+  version = "1.13.1";
+
+  src = fetchFromGitHub {
+    owner = "taglib";
+    repo = "taglib";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-QX0EpHGT36UsgIfRf5iALnwxe0jjLpZvCTbk8vSMFF4=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ zlib ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+    # Workaround unconditional ${prefix} until upstream is fixed:
+    #   https://github.com/taglib/taglib/issues/1098
+    "-DCMAKE_INSTALL_LIBDIR=lib"
+    "-DCMAKE_INSTALL_INCLUDEDIR=include"
+  ];
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    homepage = "https://taglib.org/";
+    description = "A library for reading and editing audio file metadata";
+    longDescription = ''
+      TagLib is a library for reading and editing the meta-data of several
+      popular audio formats. Currently it supports both ID3v1 and ID3v2 for MP3
+      files, Ogg Vorbis comments and ID3 tags and Vorbis comments in FLAC, MPC,
+      Speex, WavPack, TrueAudio, WAV, AIFF, MP4 and ASF files.
+    '';
+    license = with licenses; [ lgpl3 mpl11 ];
+    maintainers = with maintainers; [ ttuegel ];
+    pkgConfigModules = [ "taglib" "taglib_c" ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/tagparser/default.nix b/nixpkgs/pkgs/development/libraries/tagparser/default.nix
new file mode 100644
index 000000000000..c0f6f3fd42b4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tagparser/default.nix
@@ -0,0 +1,38 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, cpp-utilities
+, zlib
+, isocodes
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tagparser";
+  version = "12.1.0";
+
+  src = fetchFromGitHub {
+    owner = "Martchus";
+    repo = "tagparser";
+    rev = "v${version}";
+    hash = "sha256-83Xxj1CQsghbAsQ/3GKIYCz9lBNEBvLlx1iOKbszn8A=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [
+    cpp-utilities zlib
+  ];
+
+  cmakeFlags = [
+    "-DLANGUAGE_FILE_ISO_639_2=${isocodes}/share/iso-codes/json/iso_639-2.json"
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/Martchus/tagparser";
+    description = "C++ library for reading and writing MP4/M4A/AAC (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.matthiasbeyer ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/talloc/default.nix b/nixpkgs/pkgs/development/libraries/talloc/default.nix
new file mode 100644
index 000000000000..73cb8a65a162
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/talloc/default.nix
@@ -0,0 +1,76 @@
+{ lib, stdenv
+, fetchurl
+, python3
+, pkg-config
+, readline
+, libxslt
+, libxcrypt
+, docbook-xsl-nons
+, docbook_xml_dtd_42
+, fixDarwinDylibNames
+, wafHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "talloc";
+  version = "2.4.2";
+
+  src = fetchurl {
+    url = "mirror://samba/talloc/${pname}-${version}.tar.gz";
+    sha256 = "sha256-hez55GXiD5j5lQpS6aQR4UMgvFVfolfYdpe356mx2KY=";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+    python3
+    wafHook
+    docbook-xsl-nons
+    docbook_xml_dtd_42
+  ] ++ lib.optionals stdenv.isDarwin [
+    fixDarwinDylibNames
+  ];
+
+  buildInputs = [
+    python3
+    readline
+    libxslt
+    libxcrypt
+  ];
+
+  # otherwise the configure script fails with
+  # PYTHONHASHSEED=1 missing! Don't use waf directly, use ./configure and make!
+  preConfigure = ''
+    export PKGCONFIG="$PKG_CONFIG"
+    export PYTHONHASHSEED=1
+  '';
+
+  wafPath = "buildtools/bin/waf";
+
+  wafConfigureFlags = [
+    "--enable-talloc-compat1"
+    "--bundled-libraries=NONE"
+    "--builtin-libraries=replace"
+  ];
+
+  # python-config from build Python gives incorrect values when cross-compiling.
+  # If python-config is not found, the build falls back to using the sysconfig
+  # module, which works correctly in all cases.
+  PYTHON_CONFIG = "/invalid";
+
+  # this must not be exported before the ConfigurePhase otherwise waf whines
+  preBuild = lib.optionalString stdenv.hostPlatform.isMusl ''
+    export NIX_CFLAGS_LINK="-no-pie -shared";
+  '';
+
+  postInstall = ''
+    ${stdenv.cc.targetPrefix}ar q $out/lib/libtalloc.a bin/default/talloc.c.[0-9]*.o
+  '';
+
+  meta = with lib; {
+    description = "Hierarchical pool based memory allocator with destructors";
+    homepage = "https://tdb.samba.org/";
+    license = licenses.gpl3;
+    platforms = platforms.all;
+    maintainers = [ maintainers.matthiasbeyer ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/taskflow/default.nix b/nixpkgs/pkgs/development/libraries/taskflow/default.nix
new file mode 100644
index 000000000000..3c31d152fc70
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/taskflow/default.nix
@@ -0,0 +1,50 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, substituteAll
+, doctest
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "taskflow";
+  version = "3.6.0";
+
+  src = fetchFromGitHub {
+    owner = "taskflow";
+    repo = "taskflow";
+    rev = "v${version}";
+    hash = "sha256-Iy9BhkyJa2nFxwVXb4LAlgVAHnu+58Ago2eEgAIlZ7M=";
+  };
+
+  patches = [
+    (substituteAll {
+      src = ./unvendor-doctest.patch;
+      inherit doctest;
+    })
+  ];
+
+  postPatch = ''
+    rm -r 3rd-party
+
+    # tries to use x86 intrinsics on aarch64-darwin
+    sed -i '/^#if __has_include (<immintrin\.h>)/,/^#endif/d' taskflow/utility/os.hpp
+  '';
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  doCheck = true;
+
+  meta = {
+    description = "General-purpose Parallel and Heterogeneous Task Programming System";
+    homepage = "https://taskflow.github.io/";
+    changelog = let
+      release = lib.replaceStrings ["."] ["-"] version;
+    in "https://taskflow.github.io/taskflow/release-${release}.html";
+    license = lib.licenses.mit;
+    platforms = lib.platforms.unix;
+    maintainers = with lib.maintainers; [ dotlambda ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/taskflow/unvendor-doctest.patch b/nixpkgs/pkgs/development/libraries/taskflow/unvendor-doctest.patch
new file mode 100644
index 000000000000..85f2e1fcff98
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/taskflow/unvendor-doctest.patch
@@ -0,0 +1,21 @@
+diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt
+index 3397d798..8277191e 100644
+--- a/unittests/CMakeLists.txt
++++ b/unittests/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ enable_testing()
+ 
+-include(${TF_3RD_PARTY_DIR}/doctest/doctest.cmake)
++include(@doctest@/lib/cmake/doctest/doctest.cmake)
+ 
+ list(APPEND TF_UNITTESTS 
+   utility 
+@@ -24,7 +24,7 @@ list(APPEND TF_UNITTESTS
+ foreach(unittest IN LISTS TF_UNITTESTS)
+   add_executable(${unittest} ${unittest}.cpp)
+   target_link_libraries(${unittest} ${PROJECT_NAME} tf::default_settings)
+-  target_include_directories(${unittest} PRIVATE ${TF_3RD_PARTY_DIR}/doctest)
++  target_include_directories(${unittest} PRIVATE @doctest@/include/doctest)
+   doctest_discover_tests(${unittest})
+ endforeach()
+ 
diff --git a/nixpkgs/pkgs/development/libraries/tbb/2020_3.nix b/nixpkgs/pkgs/development/libraries/tbb/2020_3.nix
new file mode 100644
index 000000000000..55bb9849d919
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tbb/2020_3.nix
@@ -0,0 +1,107 @@
+{ lib
+, stdenv
+, fetchpatch
+, fetchurl
+, fetchFromGitHub
+, fixDarwinDylibNames
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tbb";
+  version = "2020.3";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "oneapi-src";
+    repo = "oneTBB";
+    rev = "v${version}";
+    sha256 = "prO2O5hd+Wz5iA0vfrqmyHFr0Ptzk64so5KpSpvuKmU=";
+  };
+
+  patches = [
+    # Fixes build with Musl.
+    (fetchpatch {
+      url = "https://github.com/openembedded/meta-openembedded/raw/39185eb1d1615e919e3ae14ae63b8ed7d3e5d83f/meta-oe/recipes-support/tbb/tbb/GLIBC-PREREQ-is-not-defined-on-musl.patch";
+      hash = "sha256-Oo5FSBPPBaOziWEBOlRmTmbulExMsAmQWBR5faOj1a0=";
+    })
+
+    # Fixes build with Musl.
+    (fetchpatch {
+      url = "https://github.com/openembedded/meta-openembedded/raw/39185eb1d1615e919e3ae14ae63b8ed7d3e5d83f/meta-oe/recipes-support/tbb/tbb/0001-mallinfo-is-glibc-specific-API-mark-it-so.patch";
+      hash = "sha256-xp8J/il855VTFIKCN/bFtf+vif6HzcVl4t4/L9nW/xk=";
+    })
+
+    # Fixes build with upcoming gcc-13:
+    #  https://github.com/oneapi-src/oneTBB/pull/833
+    (fetchpatch {
+      name = "gcc-13.patch";
+      url = "https://github.com/oneapi-src/oneTBB/pull/833/commits/c18342ba667d1f33f5e9a773aa86b091a9694b97.patch";
+      hash = "sha256-LWgf7Rm6Zp4TJdvMqnAkoAebbVS+WV2kB+4iY6jRka4=";
+    })
+
+    # Fixes build for aarch64-darwin
+    (fetchpatch {
+      name = "aarch64-darwin.patch";
+      url = "https://github.com/oneapi-src/oneTBB/pull/258/commits/86f6dcdc17a8f5ef2382faaef860cfa5243984fe.patch";
+      hash = "sha256-+sNU8yEsVVmQYOCKmlNiyJfKmB/U0GKAmrydwkfrDFQ=";
+    })
+  ];
+
+  nativeBuildInputs = (lib.optionals stdenv.isDarwin [
+    fixDarwinDylibNames
+  ]);
+
+  makeFlags = lib.optionals stdenv.cc.isClang [
+    "compiler=clang"
+  ] ++ (lib.optional (stdenv.buildPlatform != stdenv.hostPlatform)
+    (if stdenv.hostPlatform.isAarch64 then "arch=arm64"
+    else if stdenv.hostPlatform.isx86_64 then "arch=intel64"
+    else throw "Unsupported cross architecture"));
+
+  enableParallelBuilding = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/lib
+    cp "build/"*release*"/"*${stdenv.hostPlatform.extensions.sharedLibrary}* $out/lib/
+    mv include $out/
+    rm $out/include/index.html
+
+    runHook postInstall
+  '';
+
+  postInstall = let
+    pcTemplate = fetchurl {
+      url = "https://github.com/oneapi-src/oneTBB/raw/478de5b1887c928e52f029d706af6ea640a877be/integration/pkg-config/tbb.pc.in";
+      sha256 = "2pCad9txSpNbzac0vp/VY3x7HNySaYkbH3Rx8LK53pI=";
+    };
+  in ''
+    # Generate pkg-config file based on upstream template.
+    # It should not be necessary with tbb after 2021.2.
+    mkdir -p "$out/lib/pkgconfig"
+    substitute "${pcTemplate}" "$out/lib/pkgconfig/tbb.pc" \
+      --subst-var-by CMAKE_INSTALL_PREFIX "$out" \
+      --subst-var-by CMAKE_INSTALL_LIBDIR "lib" \
+      --subst-var-by CMAKE_INSTALL_INCLUDEDIR "include" \
+      --subst-var-by TBB_VERSION "${version}" \
+      --subst-var-by TBB_LIB_NAME "tbb"
+  '';
+
+  meta = with lib; {
+    description = "Intel Thread Building Blocks C++ Library";
+    homepage = "http://threadingbuildingblocks.org/";
+    license = licenses.asl20;
+    longDescription = ''
+      Intel Threading Building Blocks offers a rich and complete approach to
+      expressing parallelism in a C++ program. It is a library that helps you
+      take advantage of multi-core processor performance without having to be a
+      threading expert. Intel TBB is not just a threads-replacement library. It
+      represents a higher-level, task-based parallelism that abstracts platform
+      details and threading mechanisms for scalability and performance.
+    '';
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ thoughtpolice tmarkus ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tbb/default.nix b/nixpkgs/pkgs/development/libraries/tbb/default.nix
new file mode 100644
index 000000000000..5523ae429c26
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tbb/default.nix
@@ -0,0 +1,80 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tbb";
+  version = "2021.8.0";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "oneapi-src";
+    repo = "oneTBB";
+    rev = "v${version}";
+    hash = "sha256-7MjUdPB1GsPt7ZkYj7DCisq20X8psljsVCjDpCSTYT4=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  patches = [
+    # Fix musl build from https://github.com/oneapi-src/oneTBB/pull/899
+    (fetchpatch {
+      url = "https://patch-diff.githubusercontent.com/raw/oneapi-src/oneTBB/pull/899.patch";
+      hash = "sha256-kU6RRX+sde0NrQMKlNtW3jXav6J4QiVIUmD50asmBPU=";
+    })
+
+    # Fix/suppress warnings on gcc12.1 from https://github.com/oneapi-src/oneTBB/pull/866
+    (fetchpatch {
+      url = "https://patch-diff.githubusercontent.com/raw/oneapi-src/oneTBB/pull/866.patch";
+      hash = "sha256-e44Yv84Hfl5xoxWWTnLJLSGeNA1RBbah4/L43gPLS+c=";
+    })
+
+    # Fix build with GCC 13
+    (fetchpatch {
+      url = "https://github.com/oneapi-src/oneTBB/commit/154cc73ca4d359621202399cc0c3c91058e56e79.patch";
+      hash = "sha256-BVQQXgBg8T19DGw2gmFkm3KKOuzzJJNOTf/iNIcnHag=";
+    })
+    (fetchpatch {
+      url = "https://github.com/oneapi-src/oneTBB/commit/e131071769ee3df51b56b053ba6bfa06ae9eff25.patch";
+      hash = "sha256-IfV/DDb0luxE1l6TofAbQIeJEVxCxZfZqcONGwQEndY=";
+    })
+  ];
+
+  # Fix build with modern gcc
+  # In member function 'void std::__atomic_base<_IntTp>::store(__int_type, std::memory_order) [with _ITp = bool]',
+  NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [ "-Wno-error=stringop-overflow" ] ++
+    # error: variable 'val' set but not used
+    lib.optionals stdenv.cc.isClang [ "-Wno-error=unused-but-set-variable" ] ++
+    # Workaround for gcc-12 ICE when using -O3
+    # https://gcc.gnu.org/PR108854
+    lib.optionals (stdenv.cc.isGNU && stdenv.isx86_32) [ "-O2" ];
+
+  # Disable failing test on musl
+  # test/conformance/conformance_resumable_tasks.cpp:37:24: error: ‘suspend’ is not a member of ‘tbb::v1::task’; did you mean ‘tbb::detail::r1::suspend’?
+  postPatch = lib.optionalString stdenv.hostPlatform.isMusl ''
+    substituteInPlace test/CMakeLists.txt \
+      --replace 'conformance_resumable_tasks' ""
+  '';
+
+  meta = with lib; {
+    description = "Intel Thread Building Blocks C++ Library";
+    homepage = "http://threadingbuildingblocks.org/";
+    license = licenses.asl20;
+    longDescription = ''
+      Intel Threading Building Blocks offers a rich and complete approach to
+      expressing parallelism in a C++ program. It is a library that helps you
+      take advantage of multi-core processor performance without having to be a
+      threading expert. Intel TBB is not just a threads-replacement library. It
+      represents a higher-level, task-based parallelism that abstracts platform
+      details and threading mechanisms for scalability and performance.
+    '';
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ thoughtpolice tmarkus ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tbox/default.nix b/nixpkgs/pkgs/development/libraries/tbox/default.nix
new file mode 100644
index 000000000000..6f65ded6f104
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tbox/default.nix
@@ -0,0 +1,37 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tbox";
+  version = "1.7.5";
+
+  src = fetchFromGitHub {
+    owner = "tboox";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-VM6LOTVwM47caXYiH+6c7t174i0W5MY1dg2Y5yutlcc=";
+  };
+
+  configureFlags = [
+    "--hash=y"
+    "--charset=y"
+    "--float=y"
+    "--demo=n"
+  ];
+
+  postInstall = ''
+    mkdir -p $out/lib/pkgconfig
+    substituteAll ${./libtbox.pc.in} $out/lib/pkgconfig/libtbox.pc
+  '';
+
+  meta = with lib; {
+    description = "A glib-like multi-platform c library";
+    homepage = "https://docs.tboox.org";
+    license = licenses.asl20;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ rewine ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/tbox/libtbox.pc.in b/nixpkgs/pkgs/development/libraries/tbox/libtbox.pc.in
new file mode 100644
index 000000000000..19907b72c07c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tbox/libtbox.pc.in
@@ -0,0 +1,10 @@
+prefix=@out@
+exec_prefix=${prefix}
+libdir=@out@/lib
+includedir=@out@/include
+
+Name: tbox
+Description: A glib-like multi-platform c library
+Version: @version@
+Libs: -L${libdir} -ltbox
+Cflags: -I${includedir}
diff --git a/nixpkgs/pkgs/development/libraries/tcl-fcgi/default.nix b/nixpkgs/pkgs/development/libraries/tcl-fcgi/default.nix
new file mode 100644
index 000000000000..5451c5186a4e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tcl-fcgi/default.nix
@@ -0,0 +1,31 @@
+{ lib, fetchFromGitHub, tcl, tclx }:
+
+tcl.mkTclDerivation rec {
+  pname = "tcl-fcgi";
+  version = "0.5.0";
+
+  src = fetchFromGitHub {
+    owner = "mpcjanssen";
+    repo = "tcl-fcgi";
+    rev = "62452dbf3177ba9458fbb42457834ca77bdf5a82";
+    sha256 = "sha256-RLuV4ARmGWCJTmhs7DbMWENQGj3d5ZXWb821WrgG0qA=";
+  };
+
+  buildInputs = [
+    tclx
+  ];
+
+  unpackPhase = ''
+    mkdir -p $out/lib/tcl-fcgi
+    cp -r $src/tcl-src/* $out/lib/tcl-fcgi/
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/mpcjanssen/tcl-fcgi";
+    description = "Tcl interface for the FastCGI protocol";
+    license = licenses.bsd2;
+    platforms = tclx.meta.platforms;
+    maintainers = with maintainers; [ nat-418 ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/tclap/1.2.nix b/nixpkgs/pkgs/development/libraries/tclap/1.2.nix
new file mode 100644
index 000000000000..cdb2b5193291
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tclap/1.2.nix
@@ -0,0 +1,18 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "tclap";
+  version = "1.2.5";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/tclap/${pname}-${version}.tar.gz";
+    sha256 = "sha256-u2SfdtrjXo0Ny6S1Ks/U4GLXh+aoG0P3pLASdRUxZaY=";
+  };
+
+  meta = with lib; {
+    homepage = "https://tclap.sourceforge.net/";
+    description = "Templatized C++ Command Line Parser Library";
+    platforms = platforms.all;
+    license = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tclap/1.4.nix b/nixpkgs/pkgs/development/libraries/tclap/1.4.nix
new file mode 100644
index 000000000000..7a0b57659633
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tclap/1.4.nix
@@ -0,0 +1,48 @@
+{ lib
+, stdenv
+, fetchgit
+, cmake
+, doxygen
+, python3
+}:
+stdenv.mkDerivation {
+  pname = "tclap";
+
+  # This version is slightly newer than 1.4.0-rc1:
+  # See https://github.com/mirror/tclap/compare/1.4.0-rc1..3feeb7b2499b37d9cb80890cadaf7c905a9a50c6
+  version = "1.4-3feeb7b";
+
+  src = fetchgit {
+    url = "git://git.code.sf.net/p/tclap/code";
+    rev = "3feeb7b2499b37d9cb80890cadaf7c905a9a50c6"; # 1.4 branch
+    hash = "sha256-byLianB6Vf+I9ABMmsmuoGU2o5RO9c5sMckWW0F+GDM=";
+  };
+
+  postPatch = ''
+    substituteInPlace CMakeLists.txt \
+      --replace '$'{CMAKE_INSTALL_LIBDIR_ARCHIND} '$'{CMAKE_INSTALL_LIBDIR}
+    substituteInPlace packaging/pkgconfig.pc.in \
+      --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    doxygen
+    python3
+  ];
+
+  # Installing docs is broken in this package+version so we stub out some files
+  preInstall = ''
+    touch docs/manual.html
+  '';
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Templatized C++ Command Line Parser Library (v1.4)";
+    homepage = "https://tclap.sourceforge.net/";
+    license = licenses.mit;
+    maintainers = teams.deshaw.members;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tcllib/default.nix b/nixpkgs/pkgs/development/libraries/tcllib/default.nix
new file mode 100644
index 000000000000..a5bfba8b0559
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tcllib/default.nix
@@ -0,0 +1,28 @@
+{ lib
+, fetchzip
+, tcl
+, critcl
+, withCritcl ? true
+}:
+
+tcl.mkTclDerivation rec {
+  pname = "tcllib";
+  version = "1.21";
+
+  src = fetchzip {
+    url = "mirror://sourceforge/tcllib/tcllib-${version}.tar.gz";
+    hash = "sha256-p8thpRpC+9k/LvbBFaSOIpDXuhMlEWhs0qbrjtKcTzQ=";
+  };
+
+  nativeBuildInputs = lib.optional withCritcl critcl;
+
+  buildFlags = [ "all" ] ++ lib.optional withCritcl "critcl";
+
+  meta = {
+    homepage = "https://core.tcl-lang.org/tcllib/";
+    description = "Tcl-only library of standard routines for Tcl";
+    license = lib.licenses.tcltk;
+    platforms = lib.platforms.unix;
+    maintainers = with lib.maintainers; [ fgaz ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tcltls/default.nix b/nixpkgs/pkgs/development/libraries/tcltls/default.nix
new file mode 100644
index 000000000000..a0a1c0ae53cc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tcltls/default.nix
@@ -0,0 +1,25 @@
+{ lib, fetchurl, tcl, openssl }:
+
+tcl.mkTclDerivation rec {
+  pname = "tcltls";
+  version = "1.7.22";
+
+  src = fetchurl {
+    url = "https://core.tcl-lang.org/tcltls/uv/tcltls-${version}.tar.gz";
+    sha256 = "sha256-6E4reideyCxKqp0bH5eG2+Q1jIFekXU5/+f2Z/9Lw7Q=";
+  };
+
+  buildInputs = [ openssl ];
+
+  configureFlags = [
+    "--with-ssl-dir=${openssl.dev}"
+  ];
+
+  meta = {
+    homepage = "https://core.tcl-lang.org/tcltls/index";
+    description = "An OpenSSL / RSA-bsafe Tcl extension";
+    maintainers = [ lib.maintainers.agbrooks ];
+    license = lib.licenses.tcltk;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tclx/default.nix b/nixpkgs/pkgs/development/libraries/tclx/default.nix
new file mode 100644
index 000000000000..5e3a73febe9b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tclx/default.nix
@@ -0,0 +1,30 @@
+{ lib
+, fetchFromGitHub
+, tcl
+}:
+
+tcl.mkTclDerivation rec {
+  pname = "tclx";
+  version = "8.6.3";
+
+  src = fetchFromGitHub {
+    owner = "flightaware";
+    repo = "tclx";
+    rev = "v${version}";
+    hash = "sha256-bzLF6qOF9o24joWnGR7B4S+Doj7zv9iTh/mo50iFbUs=";
+  };
+
+  # required in order for tclx to properly detect tclx.tcl at runtime
+  postInstall = let
+    majorMinorVersion = lib.versions.majorMinor version;
+  in ''
+    ln -s $prefix/lib/tclx${majorMinorVersion} $prefix/lib/tclx${majorMinorVersion}/tclx${majorMinorVersion}
+  '';
+
+  meta = {
+    homepage = "https://github.com/flightaware/tclx";
+    description = "Tcl extensions";
+    license = lib.licenses.tcltk;
+    maintainers = with lib.maintainers; [ kovirobi fgaz ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tdb/default.nix b/nixpkgs/pkgs/development/libraries/tdb/default.nix
new file mode 100644
index 000000000000..1a289f7c2d61
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tdb/default.nix
@@ -0,0 +1,72 @@
+{ lib, stdenv
+, fetchurl
+, pkg-config
+, wafHook
+, python3
+, readline
+, libxslt
+, libxcrypt
+, docbook-xsl-nons
+, docbook_xml_dtd_45
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tdb";
+  version = "1.4.10";
+
+  src = fetchurl {
+    url = "mirror://samba/tdb/${pname}-${version}.tar.gz";
+    hash = "sha256-AjOOM8FsIcnilXHO9SPnaytwhjYlT28wxs8ZXUjGLa8=";
+  };
+
+  nativeBuildInputs = [
+    python3
+    pkg-config
+    wafHook
+    libxslt
+    docbook-xsl-nons
+    docbook_xml_dtd_45
+  ];
+
+  buildInputs = [
+    python3
+    readline # required to build python
+    libxcrypt
+  ];
+
+  # otherwise the configure script fails with
+  # PYTHONHASHSEED=1 missing! Don't use waf directly, use ./configure and make!
+  preConfigure = ''
+    export PKGCONFIG="$PKG_CONFIG"
+    export PYTHONHASHSEED=1
+  '';
+
+  wafPath = "buildtools/bin/waf";
+
+  wafConfigureFlags = [
+    "--bundled-libraries=NONE"
+    "--builtin-libraries=replace"
+  ];
+
+  postFixup = if stdenv.isDarwin
+    then ''install_name_tool -id $out/lib/libtdb.dylib $out/lib/libtdb.dylib''
+    else null;
+
+  # python-config from build Python gives incorrect values when cross-compiling.
+  # If python-config is not found, the build falls back to using the sysconfig
+  # module, which works correctly in all cases.
+  PYTHON_CONFIG = "/invalid";
+
+  meta = with lib; {
+    description = "The trivial database";
+    longDescription = ''
+      TDB is a Trivial Database. In concept, it is very much like GDBM,
+      and BSD's DB except that it allows multiple simultaneous writers
+      and uses locking internally to keep writers from trampling on each
+      other. TDB is also extremely small.
+    '';
+    homepage = "https://tdb.samba.org/";
+    license = licenses.lgpl3Plus;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tdlib/default.nix b/nixpkgs/pkgs/development/libraries/tdlib/default.nix
new file mode 100644
index 000000000000..d6e3aa57e986
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tdlib/default.nix
@@ -0,0 +1,40 @@
+{ fetchFromGitHub, gperf, openssl, readline, zlib, cmake, lib, stdenv }:
+
+stdenv.mkDerivation rec {
+  pname = "tdlib";
+  version = "1.8.24";
+
+  src = fetchFromGitHub {
+    owner = "tdlib";
+    repo = "td";
+
+    # The tdlib authors do not set tags for minor versions, but
+    # external programs depending on tdlib constrain the minor
+    # version, hence we set a specific commit with a known version.
+    rev = "c5c55092dd61b9eb15d6bbfd0f02c04c593450e7";
+    hash = "sha256-jqS3PGg42W15QBgpL1PNU3xJdk67g8u0THN/4hW5i88=";
+  };
+
+  buildInputs = [ gperf openssl readline zlib ];
+  nativeBuildInputs = [ cmake ];
+
+  # https://github.com/tdlib/td/issues/1974
+  postPatch = ''
+    substituteInPlace CMake/GeneratePkgConfig.cmake \
+      --replace 'function(generate_pkgconfig' \
+                'include(GNUInstallDirs)
+                 function(generate_pkgconfig' \
+      --replace '\$'{prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
+      --replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
+  '' + lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) ''
+    sed -i "/vptr/d" test/CMakeLists.txt
+  '';
+
+  meta = with lib; {
+    description = "Cross-platform library for building Telegram clients";
+    homepage = "https://core.telegram.org/tdlib/";
+    license = [ licenses.boost ];
+    platforms = platforms.unix;
+    maintainers = [ maintainers.vyorkin ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/telepathy/farstream/default.nix b/nixpkgs/pkgs/development/libraries/telepathy/farstream/default.nix
new file mode 100644
index 000000000000..072ca801f31b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/telepathy/farstream/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl, pkg-config, telepathy-glib, farstream, dbus-glib }:
+
+stdenv.mkDerivation rec {
+  pname = "telepathy-farstream";
+  version = "0.6.2";
+
+  src = fetchurl {
+    url = "https://telepathy.freedesktop.org/releases/${pname}/${pname}-${version}.tar.gz";
+    sha256 = "02ky12bb92prr5f6xmvmfq4yz2lj33li6nj4829a98hk5pr9k83g";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  propagatedBuildInputs = [ dbus-glib telepathy-glib farstream ];
+
+  meta = with lib; {
+    description = "GObject-based C library that uses Telepathy GLib, Farstream and GStreamer to handle the media streaming part of channels of type Call";
+    homepage = "https://telepathy.freedesktop.org/wiki/Components/Telepathy-Farstream/";
+    platforms = platforms.unix;
+    license = licenses.lgpl21Only;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/telepathy/glib/default.nix b/nixpkgs/pkgs/development/libraries/telepathy/glib/default.nix
new file mode 100644
index 000000000000..e1510fca92a6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/telepathy/glib/default.nix
@@ -0,0 +1,60 @@
+{ lib
+, stdenv
+, fetchurl
+, dbus-glib
+, glib
+, python3
+, pkg-config
+, libxslt
+, gobject-introspection
+, vala
+, glibcLocales
+}:
+
+stdenv.mkDerivation rec {
+  pname = "telepathy-glib";
+  version = "0.24.2";
+
+  outputs = [ "out" "dev" ];
+
+  src = fetchurl {
+    url = "${meta.homepage}/releases/telepathy-glib/${pname}-${version}.tar.gz";
+    sha256 = "sKN013HN0IESXzjDq9B5ZXZCMBxxpUPVVeK/IZGSc/A=";
+  };
+
+  strictDeps = true;
+  nativeBuildInputs = [
+    pkg-config
+    libxslt
+    gobject-introspection
+    vala
+    python3
+  ];
+
+  buildInputs = [
+    glibcLocales
+  ];
+
+  propagatedBuildInputs = [
+    dbus-glib
+    glib
+  ];
+
+  configureFlags = [
+    "--enable-vala-bindings"
+  ];
+
+  LC_ALL = "en_US.UTF-8";
+
+  enableParallelBuilding = true;
+
+  preConfigure = ''
+    substituteInPlace telepathy-glib/telepathy-glib.pc.in --replace Requires.private Requires
+  '';
+
+  meta = with lib; {
+    homepage = "https://telepathy.freedesktop.org";
+    platforms = platforms.unix;
+    license = with licenses; [ bsd2 bsd3 lgpl21Plus ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/telepathy/qt/default.nix b/nixpkgs/pkgs/development/libraries/telepathy/qt/default.nix
new file mode 100644
index 000000000000..605da19f77fc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/telepathy/qt/default.nix
@@ -0,0 +1,45 @@
+{ lib
+, stdenv
+, fetchurl
+, cmake
+, qtbase
+, pkg-config
+, python3Packages
+, dbus-glib
+, dbus
+, telepathy-farstream
+, telepathy-glib
+}:
+
+let
+  inherit (python3Packages) python dbus-python;
+in
+stdenv.mkDerivation rec {
+  pname = "telepathy-qt";
+  version = "0.9.8";
+
+  src = fetchurl {
+    url = "https://telepathy.freedesktop.org/releases/telepathy-qt/telepathy-qt-${version}.tar.gz";
+    sha256 = "bf8e2a09060addb80475a4938105b9b41d9e6837999b7a00e5351783857e18ad";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config python ];
+  propagatedBuildInputs = [ qtbase telepathy-farstream telepathy-glib ];
+  buildInputs = [ dbus-glib ];
+  nativeCheckInputs = [ dbus dbus-python ];
+
+  # No point in building tests if they are not run
+  # On 0.9.7, they do not even build with QT4
+  cmakeFlags = lib.optional (!doCheck) "-DENABLE_TESTS=OFF";
+
+  dontWrapQtApps = true;
+
+  doCheck = false; # giving up for now
+
+  meta = with lib; {
+    description = "Telepathy Qt bindings";
+    homepage = "https://telepathy.freedesktop.org/components/telepathy-qt/";
+    license = licenses.lgpl21;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/template-glib/default.nix b/nixpkgs/pkgs/development/libraries/template-glib/default.nix
new file mode 100644
index 000000000000..fae25d959d3d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/template-glib/default.nix
@@ -0,0 +1,69 @@
+{ stdenv
+, lib
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, glib
+, gobject-introspection
+, flex
+, bison
+, vala
+, gettext
+, gnome
+, gtk-doc
+, docbook_xsl
+, docbook_xml_dtd_43
+}:
+
+stdenv.mkDerivation rec {
+  pname = "template-glib";
+  version = "3.36.1";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "OxZ6Fzha10WvviD634EGxm0wxb10bVqh2b236AP2pQM=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gettext
+    flex
+    bison
+    vala
+    glib
+    gtk-doc
+    docbook_xsl
+    docbook_xml_dtd_43
+    gobject-introspection
+  ];
+
+  buildInputs = [
+    glib
+  ];
+
+  mesonFlags = [
+    "-Dgtk_doc=true"
+  ];
+
+  doCheck = true;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  meta = with lib; {
+    description = "A library for template expansion which supports calling into GObject Introspection from templates";
+    homepage = "https://gitlab.gnome.org/GNOME/template-glib";
+    license = licenses.lgpl21Plus;
+    maintainers = teams.gnome.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tepl/default.nix b/nixpkgs/pkgs/development/libraries/tepl/default.nix
new file mode 100644
index 000000000000..5ceb76b9bf7f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tepl/default.nix
@@ -0,0 +1,70 @@
+{ stdenv
+, lib
+, fetchurl
+, meson
+, mesonEmulatorHook
+, ninja
+, gnome
+, gobject-introspection
+, gtk3
+, icu
+, libgedit-amtk
+, libgedit-gtksourceview
+, pkg-config
+, gtk-doc
+, docbook-xsl-nons
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tepl";
+  version = "6.8.0";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "Rubl8b/bxS5ZVvBq3VdenHaXxnPVPTgD3+do9JC1YPA=";
+  };
+
+  strictDeps = true;
+  nativeBuildInputs = [
+    meson
+    ninja
+    gobject-introspection
+    pkg-config
+    gtk-doc
+    docbook-xsl-nons
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
+  ];
+
+  buildInputs = [
+    icu
+  ];
+
+  propagatedBuildInputs = [
+    gtk3
+    libgedit-amtk
+    libgedit-gtksourceview
+  ];
+
+  doCheck = false;
+  # TODO: one test fails because of
+  # (./test-file-metadata:20931): Tepl-WARNING **: 14:41:36.942: GVfs metadata
+  # is not supported. Fallback to TeplMetadataManager. Either GVfs is not
+  # correctly installed or GVfs metadata are not supported on this platform. In
+  # the latter case, you should configure Tepl with --disable-gvfs-metadata.
+
+  passthru.updateScript = gnome.updateScript {
+    packageName = pname;
+    versionPolicy = "odd-unstable";
+  };
+
+  meta = with lib; {
+    homepage = "https://wiki.gnome.org/Projects/Tepl";
+    description = "Text editor product line";
+    maintainers = with maintainers; [ manveru bobby285271 ];
+    license = licenses.lgpl3Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/termbench-pro/default.nix b/nixpkgs/pkgs/development/libraries/termbench-pro/default.nix
new file mode 100644
index 000000000000..11edecf31cc7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/termbench-pro/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub, cmake, fmt }:
+
+stdenv.mkDerivation {
+  pname = "termbench-pro";
+  version = "unstable-2023-01-26";
+
+  src = fetchFromGitHub {
+    owner = "contour-terminal";
+    repo = "termbench-pro";
+    rev = "a4feadd3a698e4fe2d9dd5b03d5f941534a25a91";
+    hash = "sha256-/zpJY9Mecalk7dneYZYzmFOroopFGklWw62a+LbiUVs=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ fmt ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/bin
+    mkdir -p $out/lib
+    mv termbenchpro/tbp $out/bin
+    mv libtermbench/libtermbench.a $out/lib
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Terminal Benchmarking as CLI and library";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ moni ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/termbox/default.nix b/nixpkgs/pkgs/development/libraries/termbox/default.nix
new file mode 100644
index 000000000000..51c2ca1c8084
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/termbox/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "termbox";
+  version = "1.1.4";
+  src = fetchFromGitHub {
+    owner = "termbox";
+    repo = "termbox";
+    rev = "v${version}";
+    sha256 = "075swv6ajx8m424dbmgbf6fs6nd5q004gjpvx48gkxmnf9spvykl";
+  };
+
+  makeFlags = [ "prefix=${placeholder "out"}" ];
+
+  meta = with lib; {
+    description = "Library for writing text-based user interfaces";
+    license = licenses.mit;
+    homepage = "https://github.com/termbox/termbox#readme";
+    downloadPage = "https://github.com/termbox/termbox/releases";
+    maintainers = with maintainers; [ fgaz ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/termcolor/default.nix b/nixpkgs/pkgs/development/libraries/termcolor/default.nix
new file mode 100644
index 000000000000..f29776226dc2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/termcolor/default.nix
@@ -0,0 +1,41 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "termcolor";
+  version = "2.1.0";
+
+  src = fetchFromGitHub {
+    owner = "ikalnytskyi";
+    repo = "termcolor";
+    rev = "v${version}";
+    sha256 = "sha256-2RXQ8sn2VNhQ2WZfwCCeQuM6x6C+sLA6ulAaFtaDMZw=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [ "-DTERMCOLOR_TESTS=ON" ];
+  CXXFLAGS = [
+    # GCC 13: error: 'uint8_t' has not been declared
+    "-include cstdint"
+  ];
+
+  doCheck = true;
+
+  checkPhase = ''
+    runHook preCheck
+    ./test_termcolor
+    runHook postCheck
+  '';
+
+  meta = with lib; {
+    description = "Header-only C++ library for printing colored messages";
+    homepage = "https://github.com/ikalnytskyi/termcolor";
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ prusnak ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/test-drive/default.nix b/nixpkgs/pkgs/development/libraries/test-drive/default.nix
new file mode 100644
index 000000000000..b858f39498c2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/test-drive/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, lib, fetchFromGitHub, gfortran, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "test-drive";
+  version = "0.4.0";
+
+  src = fetchFromGitHub {
+    owner = "fortran-lang";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-ObAnHFP1Hp0knf/jtGHynVF0CCqK47eqetePx4NLmlM=";
+  };
+
+  postPatch = ''
+    substituteInPlace config/template.pc \
+      --replace 'libdir=''${prefix}/@CMAKE_INSTALL_LIBDIR@' "libdir=@CMAKE_INSTALL_LIBDIR@" \
+      --replace 'includedir=''${prefix}/@CMAKE_INSTALL_INCLUDEDIR@' "includedir=@CMAKE_INSTALL_INCLUDEDIR@"
+  '';
+
+  nativeBuildInputs = [
+    gfortran
+    cmake
+  ];
+
+  meta = with lib; {
+    description = "Procedural Fortran testing framework";
+    homepage = "https://github.com/fortran-lang/test-drive";
+    license = with licenses; [ asl20 mit ] ;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.sheepforce ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tevent/default.nix b/nixpkgs/pkgs/development/libraries/tevent/default.nix
new file mode 100644
index 000000000000..1d68421c6dcd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tevent/default.nix
@@ -0,0 +1,68 @@
+{ lib, stdenv
+, fetchurl
+, python3
+, pkg-config
+, cmocka
+, readline
+, talloc
+, libxslt
+, docbook-xsl-nons
+, docbook_xml_dtd_42
+, which
+, wafHook
+, libxcrypt
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tevent";
+  version = "0.16.0";
+
+  src = fetchurl {
+    url = "mirror://samba/tevent/${pname}-${version}.tar.gz";
+    sha256 = "sha256-GqWPIQF+2ML2Bq6Eqn55W1Q57dTdX2jxo4in1vtA9oI=";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+    which
+    python3
+    libxslt
+    docbook-xsl-nons
+    docbook_xml_dtd_42
+    wafHook
+  ];
+
+  buildInputs = [
+    python3
+    cmocka
+    readline # required to build python
+    talloc
+    libxcrypt
+  ];
+
+  # otherwise the configure script fails with
+  # PYTHONHASHSEED=1 missing! Don't use waf directly, use ./configure and make!
+  preConfigure = ''
+    export PKGCONFIG="$PKG_CONFIG"
+    export PYTHONHASHSEED=1
+  '';
+
+  wafPath = "buildtools/bin/waf";
+
+  wafConfigureFlags = [
+    "--bundled-libraries=NONE"
+    "--builtin-libraries=replace"
+  ];
+
+  # python-config from build Python gives incorrect values when cross-compiling.
+  # If python-config is not found, the build falls back to using the sysconfig
+  # module, which works correctly in all cases.
+  PYTHON_CONFIG = "/invalid";
+
+  meta = with lib; {
+    description = "An event system based on the talloc memory management library";
+    homepage = "https://tevent.samba.org/";
+    license = licenses.lgpl3Plus;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/text-engine/default.nix b/nixpkgs/pkgs/development/libraries/text-engine/default.nix
new file mode 100644
index 000000000000..0a9004d01a58
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/text-engine/default.nix
@@ -0,0 +1,43 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, fetchpatch
+, meson
+, ninja
+, json-glib
+, gtk4
+, libxml2
+, gobject-introspection
+, pkg-config
+, libadwaita
+}:
+
+stdenv.mkDerivation rec {
+  pname = "text-engine";
+  version = "0.1.1";
+  src = fetchFromGitHub {
+    owner = "mjakeman";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-YSG4Vk3hrmtaJkK1WAlQcdgiDdgC4Un0t6UdaoIcUes=";
+  };
+
+  patches = [
+    # Fixes build with newer versions of clang
+    (fetchpatch {
+      url = "https://github.com/mjakeman/text-engine/commit/749c94d853c0b0e29e79a1b270ec61947b65c319.patch";
+      hash = "sha256-vs/a8IBovArw8tc1ZLUsaDHRVyA71KMB1NGENOKNOdk=";
+    })
+  ];
+
+  nativeBuildInputs = [ gobject-introspection gtk4 meson ninja pkg-config ];
+
+  buildInputs = [ libadwaita json-glib libxml2 ];
+
+  meta = with lib; {
+    description = "Rich text framework for GTK";
+    homepage = "https://github.com/mjakeman/text-engine";
+    license = with licenses; [ mpl20 lgpl21Plus ];
+    maintainers = with maintainers; [ foo-dogsquared ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tezos-rust-libs/default.nix b/nixpkgs/pkgs/development/libraries/tezos-rust-libs/default.nix
new file mode 100644
index 000000000000..e59e5858eaac
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tezos-rust-libs/default.nix
@@ -0,0 +1,51 @@
+{ lib, fetchFromGitLab, stdenv, llvmPackages_12, cargo, libiconv }:
+
+stdenv.mkDerivation rec {
+  version = "1.5";
+  pname = "tezos-rust-libs";
+  src = fetchFromGitLab {
+    owner = "tezos";
+    repo = "tezos-rust-libs";
+    rev = "v${version}";
+    sha256 = "sha256-SuCqDZDXmWdGI/GN+3nYcUk66jnW5FQQaeTB76/rvaw=";
+  };
+
+  nativeBuildInputs = [ llvmPackages_12.llvm cargo ];
+  propagatedBuildDeps = [ llvmPackages_12.libllvm ];
+  buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
+
+  buildPhase = ''
+    runHook preBuild
+
+    cargo build \
+      --target-dir target-librustzcash \
+      --package librustzcash \
+      --release
+
+    cargo build \
+      --target-dir target-wasmer \
+      --package wasmer-c-api \
+      --no-default-features \
+      --features singlepass,cranelift,wat,middlewares,universal \
+      --release
+
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/lib/tezos-rust-libs/rust
+    cp "librustzcash/include/librustzcash.h" \
+        "target-librustzcash/release/librustzcash.a" \
+        "wasmer-2.3.0/lib/c-api/wasm.h" \
+        "wasmer-2.3.0/lib/c-api/wasmer.h" \
+        "target-wasmer/release/libwasmer.a" \
+        "$out/lib/tezos-rust-libs"
+    cp -r "librustzcash/include/rust" "$out/lib/tezos-rust-libs"
+
+    runHook postInstall
+  '';
+
+  cargoVendorDir = "./vendor";
+}
diff --git a/nixpkgs/pkgs/development/libraries/the-foundation/default.nix b/nixpkgs/pkgs/development/libraries/the-foundation/default.nix
new file mode 100644
index 000000000000..9b0fe4de9e44
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/the-foundation/default.nix
@@ -0,0 +1,41 @@
+{ lib
+, stdenv
+, fetchFromGitea
+, cmake
+, pkg-config
+, curl
+, libunistring
+, openssl
+, pcre
+, zlib
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "the-foundation";
+  version = "1.7.0";
+
+  src = fetchFromGitea {
+    domain = "git.skyjake.fi";
+    owner = "skyjake";
+    repo = "the_Foundation";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-6bEd8KzOfBse5sQ2zp+cZtEAu8xIl3GqrpxSZ7h/edI=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [ curl libunistring openssl pcre zlib ];
+
+  postFixup = ''
+    substituteInPlace "$out"/lib/pkgconfig/the_Foundation.pc \
+      --replace '="''${prefix}//' '="/'
+  '';
+
+  meta = with lib; {
+    description = "Opinionated C11 library for low-level functionality";
+    homepage = "https://git.skyjake.fi/skyjake/the_Foundation";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ sikmir ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/theft/default.nix b/nixpkgs/pkgs/development/libraries/theft/default.nix
new file mode 100644
index 000000000000..3d39075dd26a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/theft/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  version = "0.4.5";
+  pname = "theft";
+
+  src = fetchFromGitHub {
+    owner  = "silentbicycle";
+    repo   = "theft";
+    rev    = "v${version}";
+    sha256 = "1n2mkawfl2bpd4pwy3mdzxwlqjjvb5bdrr2x2gldlyqdwbk7qjhd";
+  };
+
+  preConfigure = "patchShebangs ./scripts/mk_bits_lut";
+
+  doCheck = true;
+  checkTarget = "test";
+
+  installFlags = [ "PREFIX=$(out)" ];
+
+  # fix the libtheft.pc file to use the right installation
+  # directory. should be fixed upstream, too
+  postInstall = ''
+    install -m644 vendor/greatest.h $out/include/
+
+    substituteInPlace $out/lib/pkgconfig/libtheft.pc \
+      --replace "/usr/local" "$out"
+  '';
+
+  meta = with lib; {
+    description = "A C library for property-based testing";
+    homepage    = "https://github.com/silentbicycle/theft/";
+    platforms   = platforms.unix;
+    license     = licenses.isc;
+    maintainers = with maintainers; [ kquick thoughtpolice ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/thrift/0.10.nix b/nixpkgs/pkgs/development/libraries/thrift/0.10.nix
new file mode 100644
index 000000000000..3cfe56e3f7a9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/thrift/0.10.nix
@@ -0,0 +1,46 @@
+{ lib, stdenv, fetchurl, boost, zlib, libevent, openssl, python3, pkg-config, bison
+, flex
+}:
+
+stdenv.mkDerivation rec {
+  pname = "thrift";
+  version = "0.10.0";
+
+  src = fetchurl {
+    url = "https://archive.apache.org/dist/thrift/${version}/${pname}-${version}.tar.gz";
+    sha256 = "02x1xw0l669idkn6xww39j60kqxzcbmim4mvpb5h9nz8wqnx1292";
+  };
+
+  #enableParallelBuilding = true; problems on hydra
+
+  # Workaround to make the python wrapper not drop this package:
+  # pythonFull.buildEnv.override { extraLibs = [ thrift ]; }
+  pythonPath = [];
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [
+    boost zlib libevent openssl bison flex (python3.withPackages (ps: [ps.twisted]))
+  ];
+
+  preConfigure = "export PY_PREFIX=$out";
+
+  # TODO: package boost-test, so we can run the test suite. (Currently it fails
+  # to find libboost_unit_test_framework.a.)
+  configureFlags = [ "--enable-tests=no" ];
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Library for scalable cross-language services";
+    homepage = "https://thrift.apache.org/";
+    license = licenses.asl20;
+    platforms = platforms.linux ++ platforms.darwin;
+    maintainers = [ maintainers.bjornfor ];
+    knownVulnerabilities = [
+      "CVE-2018-1320"
+      "CVE-2018-11798"
+      "CVE-2019-0205"
+      "CVE-2019-0210"
+      "CVE-2020-13949"
+    ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/thrift/default.nix b/nixpkgs/pkgs/development/libraries/thrift/default.nix
new file mode 100644
index 000000000000..acb3a2404870
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/thrift/default.nix
@@ -0,0 +1,139 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, boost
+, zlib
+, libevent
+, openssl
+, python3
+, cmake
+, pkg-config
+, bison
+, flex
+, static ? stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+  pname = "thrift";
+  version = "0.18.1";
+
+  src = fetchurl {
+    url = "https://archive.apache.org/dist/thrift/${version}/${pname}-${version}.tar.gz";
+    hash = "sha256-BMbxDl14jKeOE+4u8NIVLHsHDAr1VIPWuULinP8pZyY=";
+  };
+
+  # Workaround to make the Python wrapper not drop this package:
+  # pythonFull.buildEnv.override { extraLibs = [ thrift ]; }
+  pythonPath = [];
+
+  nativeBuildInputs = [
+    bison
+    cmake
+    flex
+    pkg-config
+  ];
+
+  buildInputs = [
+    boost
+  ] ++ lib.optionals (!static) [
+    (python3.withPackages (ps: [ps.twisted]))
+  ];
+
+  propagatedBuildInputs = [
+    libevent
+    openssl
+    zlib
+  ];
+
+  postPatch = ''
+    # Python 3.10 related failures:
+    # SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats
+    # AttributeError: module 'collections' has no attribute 'Hashable'
+    substituteInPlace test/py/RunClientServer.py \
+      --replace "'FastbinaryTest.py'," "" \
+      --replace "'TestEof.py'," "" \
+      --replace "'TestFrozen.py'," ""
+  '';
+
+  preConfigure = ''
+    export PY_PREFIX=$out
+  '';
+
+  patches = [
+    # ToStringTest.cpp is failing from some reason due to locale issue, this
+    # doesn't disable all UnitTests as in Darwin.
+    ./disable-failing-test.patch
+    (fetchpatch {
+      name = "setuptools-gte-62.1.0.patch"; # https://github.com/apache/thrift/pull/2635
+      url = "https://github.com/apache/thrift/commit/c41ad9d5119e9bdae1746167e77e224f390f2c42.diff";
+      hash = "sha256-FkErrg/6vXTomS4AsCsld7t+Iccc55ZiDaNjJ3W1km0=";
+    })
+    (fetchpatch {
+      name = "thrift-install-FindLibevent.patch"; # https://github.com/apache/thrift/pull/2726
+      url = "https://github.com/apache/thrift/commit/2ab850824f75d448f2ba14a468fb77d2594998df.diff";
+      hash = "sha256-ejMKFG/cJgoPlAFzVDPI4vIIL7URqaG06/IWdQ2NkhY=";
+    })
+    (fetchpatch {
+      name = "thrift-fix-tests-OpenSSL3.patch"; # https://github.com/apache/thrift/pull/2760
+      url = "https://github.com/apache/thrift/commit/eae3ac418f36c73833746bcd53e69ed8a12f0e1a.diff";
+      hash = "sha256-0jlN4fo94cfGFUKcLFQgVMI/x7uxn5OiLiFk6txVPzs=";
+    })
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_JAVASCRIPT:BOOL=OFF"
+    "-DBUILD_NODEJS:BOOL=OFF"
+
+    # FIXME: Fails to link in static mode with undefined reference to
+    # `boost::unit_test::unit_test_main(bool (*)(), int, char**)'
+    "-DBUILD_TESTING:BOOL=${if static then "OFF" else "ON"}"
+  ] ++ lib.optionals static [
+    "-DWITH_STATIC_LIB:BOOL=ON"
+    "-DOPENSSL_USE_STATIC_LIBS=ON"
+  ];
+
+  disabledTests = [
+    "PythonTestSSLSocket"
+    "PythonThriftTNonblockingServer"
+  ] ++ lib.optionals stdenv.isDarwin [
+    # Tests that hang up in the Darwin sandbox
+    "SecurityTest"
+    "SecurityFromBufferTest"
+    "python_test"
+
+    # fails on hydra, passes locally
+    "concurrency_test"
+
+    # Tests that fail in the Darwin sandbox when trying to use network
+    "UnitTests"
+    "TInterruptTest"
+    "TServerIntegrationTest"
+    "processor"
+    "TNonblockingServerTest"
+    "TNonblockingSSLServerTest"
+    "StressTest"
+    "StressTestConcurrent"
+    "StressTestNonBlocking"
+  ];
+
+  doCheck = !static;
+
+  checkPhase = ''
+    runHook preCheck
+
+    ${lib.optionalString stdenv.isDarwin "DY"}LD_LIBRARY_PATH=$PWD/lib ctest -E "($(echo "$disabledTests" | tr " " "|"))"
+
+    runHook postCheck
+  '';
+
+  enableParallelChecking = false;
+
+  meta = with lib; {
+    description = "Library for scalable cross-language services";
+    homepage = "https://thrift.apache.org/";
+    license = licenses.asl20;
+    platforms = platforms.linux ++ platforms.darwin;
+    maintainers = with maintainers; [ bjornfor ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/thrift/disable-failing-test.patch b/nixpkgs/pkgs/development/libraries/thrift/disable-failing-test.patch
new file mode 100644
index 000000000000..4307d58ddedb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/thrift/disable-failing-test.patch
@@ -0,0 +1,12 @@
+diff --git i/lib/cpp/test/CMakeLists.txt w/lib/cpp/test/CMakeLists.txt
+index 19854e1a3..9d428a166 100644
+--- i/lib/cpp/test/CMakeLists.txt
++++ w/lib/cpp/test/CMakeLists.txt
+@@ -77,7 +77,6 @@ set(UnitTest_SOURCES
+     TMemoryBufferTest.cpp
+     TBufferBaseTest.cpp
+     Base64Test.cpp
+-    ToStringTest.cpp
+     TypedefTest.cpp
+     TServerSocketTest.cpp
+     TServerTransportTest.cpp
diff --git a/nixpkgs/pkgs/development/libraries/ti-rpc/default.nix b/nixpkgs/pkgs/development/libraries/ti-rpc/default.nix
new file mode 100644
index 000000000000..c12178d833de
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ti-rpc/default.nix
@@ -0,0 +1,52 @@
+{ fetchurl, lib, stdenv, autoreconfHook, libkrb5 }:
+
+stdenv.mkDerivation rec {
+  pname = "libtirpc";
+  version = "1.3.4";
+
+  src = fetchurl {
+    url = "http://git.linux-nfs.org/?p=steved/libtirpc.git;a=snapshot;h=refs/tags/libtirpc-${lib.replaceStrings ["."] ["-"] version};sf=tgz";
+    sha256 = "sha256-fmZxpdyl98z+QBHpEccGB8A+YktuWONw6k0p06AImDw=";
+    name = "${pname}-${version}.tar.gz";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  KRB5_CONFIG = "${libkrb5.dev}/bin/krb5-config";
+  nativeBuildInputs = [ autoreconfHook ];
+  propagatedBuildInputs = [ libkrb5 ];
+  strictDeps = true;
+
+  preConfigure = ''
+    sed -es"|/etc/netconfig|$out/etc/netconfig|g" -i doc/Makefile.in tirpc/netconfig.h
+  '';
+
+  enableParallelBuilding = true;
+
+  preInstall = ''
+    mkdir -p $out/etc
+  '';
+
+  doCheck = true;
+
+  meta = with lib; {
+    homepage = "https://sourceforge.net/projects/libtirpc/";
+    description = "The transport-independent Sun RPC implementation (TI-RPC)";
+    license = licenses.bsd3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ abbradar ];
+    longDescription = ''
+       Currently, NFS commands use the SunRPC routines provided by the
+       glibc.  These routines do not support IPv6 addresses.  Ulrich
+       Drepper, who is the maintainer of the glibc, refuses any change in
+       the glibc concerning the RPC.  He wants the RPC to become a separate
+       library.  Other OS (NetBSD, FreeBSD, Solarix, HP-UX, AIX) have
+       migrated their SunRPC library to a TI-RPC (Transport Independent
+       RPC) implementation.  This implementation allows the support of
+       other transports than UDP and TCP over IPv4.  FreeBSD provides a
+       TI-RPC library ported from NetBSD with improvements.  This library
+       already supports IPv6.  So, the FreeBSD release 5.2.1 TI-RPC has
+       been ported to replace the SunRPC of the glibc.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ticpp/default.nix b/nixpkgs/pkgs/development/libraries/ticpp/default.nix
new file mode 100644
index 000000000000..20de3d7f2b89
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ticpp/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation {
+  pname = "ticpp";
+  version = "unstable-2019-01-09";
+
+  src = fetchFromGitHub {
+    owner = "wxFormBuilder";
+    repo = "ticpp";
+    rev = "eb79120ea16b847ce9f483a298a394050f463d6b";
+    sha256 = "0xk4cy0xbkr6326cqd1vd6b2x0rfsx4iz2sq8f5jz3yl3slxgjm2";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [ "-DBUILD_TICPP_DLL=1" ];
+
+  installPhase = ''
+    cd ..
+    mkdir -p $out/lib
+    install build/*.{a,so} $out/lib
+    mkdir -p $out/include
+    install *.h $out/include
+  '';
+
+  meta = {
+    description = "Interface to TinyXML";
+    license = lib.licenses.mit;
+    homepage = "https://github.com/wxFormBuilder/ticpp";
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/tidyp/default.nix b/nixpkgs/pkgs/development/libraries/tidyp/default.nix
new file mode 100644
index 000000000000..c2a8ae0337ac
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tidyp/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "tidyp";
+  version = "1.04";
+
+  src = fetchurl {
+    # downloads from a legacy GitHub download page from ~11 years ago
+    # project does not work with autoconf anymore and the configure script cannot be generated from the source download
+    url = "https://github.com/downloads/petdance/tidyp/${pname}-${version}.tar.gz";
+    sha256 = "0f5ky0ih4vap9c6j312jn73vn8m2bj69pl2yd3a5nmv35k9zmc10";
+  };
+
+  hardeningDisable = [ "format" ];
+
+  meta = with lib; {
+    description = "A program that can validate your HTML, as well as modify it to be more clean and standard";
+    homepage = "http://tidyp.com/";
+    platforms = platforms.all;
+    maintainers = with maintainers; [ pSub ];
+    license = licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tiledb/FindMagic_EP.cmake.patch b/nixpkgs/pkgs/development/libraries/tiledb/FindMagic_EP.cmake.patch
new file mode 100644
index 000000000000..7a5a01c54588
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tiledb/FindMagic_EP.cmake.patch
@@ -0,0 +1,14 @@
+diff --git a/FindMagic_EP.cmake b/FindMagic_EP.cmake
+--- a/cmake/Modules/FindMagic_EP.cmake
++++ b/cmake/Modules/FindMagic_EP.cmake
+@@ -126,9 +126,7 @@ if(NOT TILEDB_LIBMAGIC_EP_BUILT)
+     # that was modified by tiledb to also build with cmake for nix
+     ExternalProject_Add(ep_magic
+       PREFIX "externals"
+-      GIT_REPOSITORY "https://github.com/TileDB-Inc/file-windows.git"
+-      GIT_TAG "5.38.2.tiledb"
+-      GIT_SUBMODULES_RECURSE TRUE
++      DOWNLOAD_COMMAND true
+       UPDATE_COMMAND ""
+       CMAKE_ARGS
+         -DCMAKE_INSTALL_PREFIX=${TILEDB_EP_INSTALL_PREFIX}
diff --git a/nixpkgs/pkgs/development/libraries/tiledb/default.nix b/nixpkgs/pkgs/development/libraries/tiledb/default.nix
new file mode 100644
index 000000000000..28b14d3a8a5b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tiledb/default.nix
@@ -0,0 +1,122 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+
+, cmake
+, zlib
+, lz4
+, bzip2
+, zstd
+, spdlog
+, tbb
+, openssl
+, boost
+, libpqxx
+, clang-tools
+, catch2_3
+, python3
+, gtest
+, doxygen
+, fixDarwinDylibNames
+, useAVX2 ? stdenv.hostPlatform.avx2Support
+}:
+
+let
+  # pre-fetch ExternalProject from cmake/Modules/FindMagic_EP.cmake
+  ep-file-windows = fetchFromGitHub {
+    owner = "TileDB-Inc";
+    repo   = "file-windows";
+    rev    = "5.38.2.tiledb";
+    hash = "sha256-TFn30VCuWZr252VN1T5NNCZe2VEN3xQSomS7XxxKGF8=";
+    fetchSubmodules = true;
+  };
+
+in
+stdenv.mkDerivation rec {
+  pname = "tiledb";
+  version = "2.18.2";
+
+  src = fetchFromGitHub {
+    owner = "TileDB-Inc";
+    repo = "TileDB";
+    rev = version;
+    hash = "sha256-uLiXhigYz3v7NgY38twot3sBHxZS5QCrOiPfME4wWzE=";
+  };
+
+  patches = [
+    ./FindMagic_EP.cmake.patch
+  ];
+
+  postPatch = ''
+    # copy pre-fetched external project to directory where it is expected to be
+    mkdir -p build/externals/src
+    cp -a ${ep-file-windows} build/externals/src/ep_magic
+    chmod -R u+w build/externals/src/ep_magic
+
+    # add openssl on path
+    sed -i '49i list(APPEND OPENSSL_PATHS "${openssl.dev}" "${openssl.out}")' \
+      cmake/Modules/FindOpenSSL_EP.cmake
+  '';
+
+  # upstream will hopefully fix this in some newer release
+  env.CXXFLAGS = "-include random";
+
+  # (bundled) blosc headers have a warning on some archs that it will be using
+  # unaccelerated routines.
+  cmakeFlags = [
+    "-DTILEDB_VCPKG=OFF"
+    "-DTILEDB_WEBP=OFF"
+    "-DTILEDB_WERROR=OFF"
+  ] ++ lib.optional (!useAVX2) "-DCOMPILER_SUPPORTS_AVX2=FALSE";
+
+  nativeBuildInputs = [
+    ep-file-windows
+    catch2_3
+    clang-tools
+    cmake
+    python3
+    doxygen
+  ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
+
+  nativeCheckInputs = [
+    gtest
+  ];
+
+  buildInputs = [
+    zlib
+    lz4
+    bzip2
+    zstd
+    spdlog
+    tbb
+    openssl
+    boost
+    libpqxx
+  ];
+
+  # test commands taken from
+  # https://github.com/TileDB-Inc/TileDB/blob/dev/.github/workflows/unit-test-runs.yml
+  checkPhase = ''
+    runHook preCheck
+    make -C tiledb tests -j$NIX_BUILD_CORES
+    make -C tiledb test ARGS="-R '^unit_'" -R "test_assert"
+    make -C tiledb test ARGS="-R 'test_ci_asserts'"
+    runHook postCheck
+  '';
+
+  doCheck = true;
+
+  installTargets = [ "install-tiledb" "doc" ];
+
+  postInstall = lib.optionalString stdenv.isDarwin ''
+    install_name_tool -add_rpath ${tbb}/lib $out/lib/libtiledb.dylib
+  '';
+
+  meta = with lib; {
+    description = "TileDB allows you to manage the massive dense and sparse multi-dimensional array data";
+    homepage = "https://github.com/TileDB-Inc/TileDB";
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ rakesh4g ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/timezonemap/default.nix b/nixpkgs/pkgs/development/libraries/timezonemap/default.nix
new file mode 100644
index 000000000000..25efaa6518c6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/timezonemap/default.nix
@@ -0,0 +1,76 @@
+{ stdenv
+, lib
+, autoreconfHook
+, fetchbzr
+, fetchpatch
+, pkg-config
+, gtk3
+, glib
+, file
+, gobject-introspection
+, json-glib
+, libsoup
+}:
+
+stdenv.mkDerivation rec {
+  pname = "timezonemap";
+  version = "0.4.5.1";
+
+  src = fetchbzr {
+    url = "lp:timezonemap";
+    rev = "58";
+    sha256 = "sha256-wCJXwgnN+aZVerjQCm8oT3xIcwmc4ArcEoCh9pMrt+E=";
+  };
+
+  patches = [
+    # Fix crashes when running in GLib 2.76
+    # https://bugs.launchpad.net/ubuntu/+source/libtimezonemap/+bug/2012116
+    (fetchpatch {
+      url = "https://git.launchpad.net/ubuntu/+source/libtimezonemap/plain/debian/patches/timezone-map-Never-try-to-access-to-free-d-or-null-values.patch?id=88f72f724e63df061204f6818c9a1e7d8c003e29";
+      sha256 = "sha256-M5eR0uaqpJOeW2Ya1Al+3ZciXukzHpnjJTMVvdO0dPE=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+    autoreconfHook
+    gobject-introspection
+  ];
+
+  buildInputs = [
+    gtk3
+    glib
+    json-glib
+    libsoup
+  ];
+
+  configureFlags = [
+    "CFLAGS=-Wno-error"
+    "--sysconfdir=/etc"
+    "--localstatedir=/var"
+  ];
+
+  installFlags = [
+    "sysconfdir=${placeholder "out"}/etc"
+    "localstatedir=\${TMPDIR}"
+  ];
+
+  preConfigure = ''
+    for f in {configure,m4/libtool.m4}; do
+      substituteInPlace $f\
+        --replace /usr/bin/file ${file}/bin/file
+    done
+  '';
+
+  postPatch = ''
+    sed "s|/usr/share/libtimezonemap|$out/share/libtimezonemap|g" -i ./src/tz.h
+  '';
+
+  meta = with lib; {
+    homepage = "https://launchpad.net/timezonemap";
+    description = "A GTK+3 Timezone Map Widget";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.mkg20001 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tinycbor/default.nix b/nixpkgs/pkgs/development/libraries/tinycbor/default.nix
new file mode 100644
index 000000000000..4826c2b49c1f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tinycbor/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "tinycbor";
+  version = "0.6.0";
+
+  src = fetchFromGitHub {
+    owner = "intel";
+    repo = "tinycbor";
+    rev = "v${version}";
+    sha256 = "1ph1cmsh4hm6ikd3bs45mnv9zmniyrvp2rrg8qln204kr6fngfcd";
+  };
+
+  makeFlags = [ "prefix=$(out)" ];
+
+  meta = with lib; {
+    description = "Concise Binary Object Representation (CBOR) Library";
+    homepage = "https://github.com/intel/tinycbor";
+    license = licenses.mit;
+    maintainers = with maintainers; [ oxzi ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tinycdb/default.nix b/nixpkgs/pkgs/development/libraries/tinycdb/default.nix
new file mode 100644
index 000000000000..2d9cb53e7949
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tinycdb/default.nix
@@ -0,0 +1,55 @@
+{ stdenv, lib, fetchurl }:
+let
+  isCross = stdenv.buildPlatform != stdenv.hostPlatform;
+  cross = "${stdenv.hostPlatform.config}";
+  static = stdenv.hostPlatform.isStatic;
+
+  cc = if !isCross then "cc" else "${cross}-cc";
+  ar = if !isCross then "ar" else "${cross}-ar";
+  ranlib = if !isCross then "ranlib" else "${cross}-ranlib";
+in stdenv.mkDerivation rec {
+  postPatch = ''
+    sed -i 's,set --, set -x; set --,' Makefile
+  '';
+  pname = "tinycdb";
+  version = "0.80";
+  # In general, static library (.a) goes to "dev", shared (.so) to
+  # "lib". In case of static build, there is no .so library, so "lib"
+  # output is useless and empty.
+  outputs = [ "out" "dev" "man" ] ++ lib.optional (!static) "lib";
+  separateDebugInfo = true;
+  makeFlags =
+    [ "prefix=$(out)" "CC=${cc}" "AR=${ar}" "RANLIB=${ranlib}" "static"
+  ] ++ lib.optional (!static) "shared";
+  postInstall = ''
+    mkdir -p $dev/lib $out/bin
+    mv $out/lib/libcdb.a $dev/lib
+    rmdir $out/lib
+  '' + (if static then ''
+    cp cdb $out/bin/cdb
+  '' else ''
+    mkdir -p $lib/lib
+    cp libcdb.so* $lib/lib
+    cp cdb-shared $out/bin/cdb
+  '');
+
+  src = fetchurl {
+    url = "http://www.corpit.ru/mjt/tinycdb/${pname}-${version}.tar.gz";
+    sha256 = "sha256-wyG5BekCwsqZo/+Kjd39iCMkf+Ht7IpLuF+Dhpxjn7g=";
+  };
+
+  meta = with lib; {
+
+    description = "utility to manipulate constant databases (cdb)";
+
+    longDescription = ''
+      tinycdb is a small, fast and reliable utility and subroutine
+      library for creating and reading constant databases. The database
+      structure is tuned for fast reading.
+    '';
+
+    homepage = "https://www.corpit.ru/mjt/tinycdb.html";
+    license = licenses.publicDomain;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tinyobjloader/default.nix b/nixpkgs/pkgs/development/libraries/tinyobjloader/default.nix
new file mode 100644
index 000000000000..d07a841c3c02
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tinyobjloader/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tinyobjloader";
+  version = "1.0.7";
+
+  src = fetchFromGitHub {
+    owner = "tinyobjloader";
+    repo = "tinyobjloader";
+    rev = "v${version}";
+    sha256 = "sha256-BNffbicnLTGK2GQ2/bB328LFU9fqHxrpAVj2hJaekWc=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  # https://github.com/tinyobjloader/tinyobjloader/issues/336
+  postPatch = ''
+    substituteInPlace tinyobjloader.pc.in \
+      --replace '$'{prefix}/@TINYOBJLOADER_LIBRARY_DIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
+      --replace '$'{prefix}/@TINYOBJLOADER_INCLUDE_DIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/tinyobjloader/tinyobjloader";
+    description = "Tiny but powerful single file wavefront obj loader";
+    license = licenses.mit;
+    maintainers = [ maintainers.ivar ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tinyxml/2.6.2-add-pkgconfig.patch b/nixpkgs/pkgs/development/libraries/tinyxml/2.6.2-add-pkgconfig.patch
new file mode 100644
index 000000000000..ca89685a458f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tinyxml/2.6.2-add-pkgconfig.patch
@@ -0,0 +1,13 @@
+--- a/tinyxml.pc	1970-01-01 01:00:00.000000000 +0100
++++ b/tinyxml.pc	2012-12-29 08:52:07.512266072 +0100
+@@ -0,0 +1,10 @@
++prefix=@out@
++exec_prefix=${prefix}
++libdir=${exec_prefix}/lib
++includedir=${prefix}/include
++
++Name: TinyXML
++Description: A simple, small, C++ XML parser
++Version: @version@
++Libs: -L${libdir} -ltinyxml
++Cflags: -I${includedir}
diff --git a/nixpkgs/pkgs/development/libraries/tinyxml/2.6.2-cxx.patch b/nixpkgs/pkgs/development/libraries/tinyxml/2.6.2-cxx.patch
new file mode 100644
index 000000000000..e55d0be43bcc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tinyxml/2.6.2-cxx.patch
@@ -0,0 +1,17 @@
+diff -u a/Makefile b/Makefile
+--- a/Makefile	2011-05-14 22:24:57.000000000 -0400
++++ b/Makefile	2016-04-01 14:53:05.000000000 -0400
+@@ -19,9 +19,9 @@
+ 
+ #****************************************************************************
+ 
+-CC     := gcc
+-CXX    := g++
+-LD     := g++
++CC     ?= gcc
++CXX    ?= g++
++LD     ?= g++
+ AR     := ar rc
+ RANLIB := ranlib
+ 
+Common subdirectories: a/docs and b/docs
diff --git a/nixpkgs/pkgs/development/libraries/tinyxml/2.6.2-entity.patch b/nixpkgs/pkgs/development/libraries/tinyxml/2.6.2-entity.patch
new file mode 100644
index 000000000000..3164261291ba
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tinyxml/2.6.2-entity.patch
@@ -0,0 +1,64 @@
+? entity.patch
+Index: a/tinyxml.cpp
+===================================================================
+RCS file: b/tinyxml.cpp,v
+retrieving revision 1.105
+diff -u -r1.105 a/tinyxml.cpp
+--- tinyxml.cpp	5 Jun 2010 19:06:57 -0000	1.105
++++ tinyxml.cpp	19 Jul 2010 21:24:16 -0000
+@@ -57,30 +57,7 @@
+ 	{
+ 		unsigned char c = (unsigned char) str[i];
+ 
+-		if (    c == '&' 
+-		     && i < ( (int)str.length() - 2 )
+-			 && str[i+1] == '#'
+-			 && str[i+2] == 'x' )
+-		{
+-			// Hexadecimal character reference.
+-			// Pass through unchanged.
+-			// &#xA9;	-- copyright symbol, for example.
+-			//
+-			// The -1 is a bug fix from Rob Laveaux. It keeps
+-			// an overflow from happening if there is no ';'.
+-			// There are actually 2 ways to exit this loop -
+-			// while fails (error case) and break (semicolon found).
+-			// However, there is no mechanism (currently) for
+-			// this function to return an error.
+-			while ( i<(int)str.length()-1 )
+-			{
+-				outString->append( str.c_str() + i, 1 );
+-				++i;
+-				if ( str[i] == ';' )
+-					break;
+-			}
+-		}
+-		else if ( c == '&' )
++		if ( c == '&' )
+ 		{
+ 			outString->append( entity[0].str, entity[0].strLength );
+ 			++i;
+Index: a/xmltest.cpp
+===================================================================
+RCS file: b/xmltest.cpp,v
+retrieving revision 1.89
+diff -u -r1.89 a/xmltest.cpp
+--- xmltest.cpp	5 Jun 2010 17:41:52 -0000	1.89
++++ xmltest.cpp	19 Jul 2010 21:24:16 -0000
+@@ -1340,6 +1340,16 @@
+ 		}*/
+ 	}
+ 
++	#ifdef TIXML_USE_STL
++	{
++		TiXmlDocument xml;
++		xml.Parse("<foo>foo&amp;#xa+bar</foo>");
++		std::string str;
++		str << xml;
++		XmlTest( "Entity escaping", "<foo>foo&amp;#xa+bar</foo>", str.c_str() );
++	}
++	#endif
++
+ 	/*  1417717 experiment
+ 	{
+ 		TiXmlDocument xml;
diff --git a/nixpkgs/pkgs/development/libraries/tinyxml/2.6.2.nix b/nixpkgs/pkgs/development/libraries/tinyxml/2.6.2.nix
new file mode 100644
index 000000000000..6589e718f10e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tinyxml/2.6.2.nix
@@ -0,0 +1,91 @@
+{ lib, stdenv, fetchurl, fetchpatch, unzip }:
+
+let
+  version = "2.6.2";
+  SHLIB_EXT = stdenv.hostPlatform.extensions.sharedLibrary;
+in stdenv.mkDerivation {
+  pname = "tinyxml";
+  inherit version;
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/tinyxml/tinyxml/${version}/tinyxml_2_6_2.zip";
+    sha256 = "04nmw6im2d1xp12yir8va93xns5iz816pwi25n9cql3g3i8bjsxc";
+  };
+
+  patches = [
+    # add pkg-config file
+    ./2.6.2-add-pkgconfig.patch
+
+    # https://sourceforge.net/tracker/index.php?func=detail&aid=3031828&group_id=13559&atid=313559
+    ./2.6.2-entity.patch
+
+    # Use CC, CXX, and LD from environment
+    ./2.6.2-cxx.patch
+
+    (fetchpatch {
+      name = "CVE-2023-34194.patch";
+      url = "https://salsa.debian.org/debian/tinyxml/-/raw/2366e1f23d059d4c20c43c54176b6bd78d6a83fc/debian/patches/CVE-2023-34194.patch";
+      hash = "sha256-ow4LmLQV24SAU6M1J8PXpW5c95+el3t8weM9JK5xJfg=";
+    })
+    (fetchpatch {
+      name = "CVE-2021-42260.patch";
+      url = "https://salsa.debian.org/debian/tinyxml/-/raw/dc332a9f4e05496c8342b778c14b256083beb1ee/debian/patches/CVE-2021-42260.patch";
+      hash = "sha256-pIM0uOnUQOW93w/PEPuW3yKq1mdvNT/ClCYVc2hLoY8=";
+    })
+  ];
+
+  preConfigure = "export LD=${stdenv.cc.targetPrefix}c++";
+
+  hardeningDisable = [ "format" ];
+
+  env.NIX_CFLAGS_COMPILE =
+    lib.optionalString stdenv.isDarwin "-mmacosx-version-min=10.9";
+
+  nativeBuildInputs = [ unzip ];
+  buildPhase = ''
+    # use STL (xbmc requires it)
+    sed '1i#define TIXML_USE_STL 1' -i tinyxml.h
+    sed '1i#define TIXML_USE_STL 1' -i xmltest.cpp
+
+    # build xmltest
+    make
+
+    # build the lib as a shared library
+    ''${CXX} -Wall -O2 -shared -fpic tinyxml.cpp \
+    tinyxmlerror.cpp tinyxmlparser.cpp      \
+    tinystr.cpp -o libtinyxml${SHLIB_EXT}
+  '';
+
+  doCheck = true;
+  checkPhase = ''
+    ./xmltest
+    result=$?
+    if [[ $result != 0 ]] ; then
+      exit $result
+    fi
+  '';
+
+  installPhase = ''
+    mkdir -pv $out/include/
+    mkdir -pv $out/lib/pkgconfig/
+    mkdir -pv $out/share/doc/tinyxml/
+
+    cp -v libtinyxml${SHLIB_EXT} $out/lib/
+    cp -v *.h $out/include/
+
+    substituteInPlace tinyxml.pc --replace "@out@" "$out"
+    substituteInPlace tinyxml.pc --replace "@version@" "${version}"
+    cp -v tinyxml.pc $out/lib/pkgconfig/
+
+    cp -v docs/* $out/share/doc/tinyxml/
+  '' + lib.optionalString stdenv.isDarwin ''
+    install_name_tool -id $out/lib/libtinyxml.dylib $out/lib/libtinyxml.dylib
+  '';
+
+  meta = {
+    description = "Simple, small, C++ XML parser that can be easily integrating into other programs";
+    homepage = "http://www.grinninglizard.com/tinyxml/index.html";
+    license = lib.licenses.free;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tix/default.nix b/nixpkgs/pkgs/development/libraries/tix/default.nix
new file mode 100644
index 000000000000..a46b2499964c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tix/default.nix
@@ -0,0 +1,65 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, tcl
+, tk
+}:
+
+tcl.mkTclDerivation {
+  version = "8.4.3";
+  pname = "tix";
+  src = fetchurl {
+     url = "mirror://sourceforge/tix/tix/8.4.3/Tix8.4.3-src.tar.gz";
+     sha256 = "1jq3dkyk9mqkj4cg7mdk5r0cclqsby9l2b7wrysi0zk5yw7h8bsn";
+  };
+  patches = [
+  (fetchpatch {
+    name = "tix-8.4.3-tcl8.5.patch";
+    url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-tcltk/tix/files/tix-8.4.3-tcl8.5.patch?id=56bd759df1d0c750a065b8c845e93d5dfa6b549d";
+    sha256 = "0wzqmcxxq0rqpnjgxz10spw92yhfygnlwv0h8pcx2ycnqiljz6vj";
+    })
+    # Remove duplicated definition of XLowerWindow
+    ./duplicated-xlowerwindow.patch
+    # Fix incompatible function pointer conversions and implicit definition of `panic`.
+    # `panic` is just `Tcl_Panic`, but it is not defined on Darwin due to a conflict with `mach/mach.h`.
+    ./fix-clang16.patch
+  ] ++ lib.optional (tcl.release == "8.6")
+  (fetchpatch {
+    name = "tix-8.4.3-tcl8.6.patch";
+    url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-tcltk/tix/files/tix-8.4.3-tcl8.6.patch?id=56bd759df1d0c750a065b8c845e93d5dfa6b549d";
+    sha256 = "1jaz0l22xj7x1k4rb9ia6i1psnbwk4pblgq4gfvya7gg7fbb7r36";
+    })
+  ;
+  buildInputs = [ tk ];
+  # the configure script expects to find the location of the sources of
+  # tcl and tk in {tcl,tk}Config.sh
+  # In fact, it only needs some private headers. We copy them in
+  # the private_headers folders and trick the configure script into believing
+  # the sources are here.
+  preConfigure = ''
+    mkdir -p private_headers/generic
+    < ${tcl}/lib/tclConfig.sh sed "s@TCL_SRC_DIR=.*@TCL_SRC_DIR=private_headers@" > tclConfig.sh
+    < ${tk}/lib/tkConfig.sh sed "s@TK_SRC_DIR=.*@TK_SRC_DIR=private_headers@" > tkConfig.sh
+    for i in ${tcl}/include/* ${tk.dev}/include/*; do
+      ln -s $i private_headers/generic;
+    done;
+    '';
+  addTclConfigureFlags = false;
+  configureFlags = [
+    "--with-tclconfig=."
+    "--with-tkinclude=${tk.dev}/include"
+    "--with-tkconfig=."
+    "--libdir=\${prefix}/lib"
+  ];
+
+  meta = with lib; {
+    description = "A widget library for Tcl/Tk";
+    homepage    = "https://tix.sourceforge.net/";
+    platforms   = platforms.all;
+    license     = with licenses; [
+      bsd2 # tix
+      gpl2 # patches from portage
+    ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tix/duplicated-xlowerwindow.patch b/nixpkgs/pkgs/development/libraries/tix/duplicated-xlowerwindow.patch
new file mode 100644
index 000000000000..0ea888749a2f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tix/duplicated-xlowerwindow.patch
@@ -0,0 +1,49 @@
+This is duplicated code from Tk.
+It causes errors during build since XLowerWindow is not only a function but also "defined" in tkIntXlibDecls.h.
+
+See
+https://github.com/tcltk/tk/blob/71dcaddc69769cbd3e2c4b5edb5810f974579527/generic/tkIntXlibDecls.h#L396
+and
+https://github.com/tcltk/tk/blob/71dcaddc69769cbd3e2c4b5edb5810f974579527/generic/tkIntXlibDecls.h#L1487
+
+--- a/unix/tixUnixWm.c	2005-03-25 13:15:53.000000000 -0700
++++ b/unix/tixUnixWm.c	2021-03-20 07:31:52.000000000 -0700
+@@ -24,38 +24,3 @@
+ {
+     return TCL_OK;
+ }
+-
+-#ifdef MAC_OSX_TK
+-#include "tkInt.h"
+-/*
+- *----------------------------------------------------------------------
+- *
+- * XLowerWindow --
+- *
+- *	Change the stacking order of a window.
+- *
+- * Results:
+- *	None.
+- *
+- * Side effects:
+- *	Changes the stacking order of the specified window.
+- *
+- *----------------------------------------------------------------------
+- */
+-
+-int 
+-XLowerWindow(
+-    Display* display,		/* Display. */
+-    Window window)		/* Window. */
+-{
+-    TkWindow *winPtr = *((TkWindow **) window);
+-    
+-    display->request++;
+-    if (Tk_IsTopLevel(winPtr) && !Tk_IsEmbedded(winPtr)) {
+-	TkWmRestackToplevel(winPtr, Below, NULL);
+-    } else {
+-    	/* TODO: this should generate damage */
+-    }
+-    return 0;
+-}
+-#endif
diff --git a/nixpkgs/pkgs/development/libraries/tix/fix-clang16.patch b/nixpkgs/pkgs/development/libraries/tix/fix-clang16.patch
new file mode 100644
index 000000000000..f5d8a5337de0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tix/fix-clang16.patch
@@ -0,0 +1,215 @@
+diff -ur a/generic/tixDItem.c b/generic/tixDItem.c
+--- a/generic/tixDItem.c	2004-03-27 19:44:56.000000000 -0700
++++ b/generic/tixDItem.c	2023-07-11 14:49:51.583894242 -0600
+@@ -30,7 +30,7 @@
+ 		Tcl_Interp *interp, Tk_Window tkwin, CONST84 char *value,
+ 		char *widRec, int offset));
+ 
+-static char *DItemPrintProc _ANSI_ARGS_((
++static const char *DItemPrintProc _ANSI_ARGS_((
+ 		ClientData clientData, Tk_Window tkwin, char *widRec,
+ 		int offset, Tcl_FreeProc **freeProcPtr));
+ 
+@@ -548,7 +548,7 @@
+     return TCL_OK;
+ }
+ 
+-static char *DItemPrintProc(clientData, tkwin, widRec,offset, freeProcPtr)
++static const char *DItemPrintProc(clientData, tkwin, widRec,offset, freeProcPtr)
+     ClientData clientData;
+     Tk_Window tkwin;
+     char *widRec;
+diff -ur a/generic/tixDiStyle.c b/generic/tixDiStyle.c
+--- a/generic/tixDiStyle.c	2004-03-27 19:44:56.000000000 -0700
++++ b/generic/tixDiStyle.c	2023-07-11 15:02:45.245210252 -0600
+@@ -31,7 +31,7 @@
+ static int   		DItemStyleParseProc _ANSI_ARGS_((ClientData clientData,
+ 			    Tcl_Interp *interp, Tk_Window tkwin,
+ 			    CONST84 char *value,char *widRec, int offset));
+-static char *		DItemStylePrintProc _ANSI_ARGS_((
++static const char *		DItemStylePrintProc _ANSI_ARGS_((
+ 			    ClientData clientData, Tk_Window tkwin, 
+ 			    char *widRec, int offset,
+ 			    Tcl_FreeProc **freeProcPtr));
+@@ -785,7 +785,7 @@
+ 
+     hashPtr = Tcl_CreateHashEntry(&stylePtr->base.items, (char*)iPtr, &isNew);
+     if (!isNew) {
+-	panic("DItem is already associated with style");
++	Tcl_Panic("DItem is already associated with style");
+     } else {
+ 	Tcl_SetHashValue(hashPtr, (char*)iPtr);
+     }
+@@ -801,7 +801,7 @@
+ 
+     hashPtr = Tcl_FindHashEntry(&stylePtr->base.items, (char*)iPtr);
+     if (hashPtr == NULL) {
+-	panic("DItem is not associated with style");
++	Tcl_Panic("DItem is not associated with style");
+     }
+     Tcl_DeleteHashEntry(hashPtr);
+     stylePtr->base.refCount--;
+@@ -998,7 +998,7 @@
+     return TCL_ERROR;
+ }
+ 
+-static char *DItemStylePrintProc(clientData, tkwin, widRec,offset, freeProcPtr)
++static const char *DItemStylePrintProc(clientData, tkwin, widRec,offset, freeProcPtr)
+     ClientData clientData;
+     Tk_Window tkwin;
+     char *widRec;
+diff -ur a/generic/tixForm.c b/generic/tixForm.c
+--- a/generic/tixForm.c	2004-03-27 19:44:56.000000000 -0700
++++ b/generic/tixForm.c	2023-07-11 14:53:45.695753419 -0600
+@@ -802,7 +802,7 @@
+      * Now set all the client's geometry
+      */
+     if (PlaceAllClients(masterPtr) != TCL_OK) {
+-	panic("circular dependency");
++	Tcl_Panic("circular dependency");
+     }
+ 
+     for (clientPtr = masterPtr->client; clientPtr; clientPtr=clientPtr->next) {
+diff -ur a/generic/tixGrData.c b/generic/tixGrData.c
+--- a/generic/tixGrData.c	2004-03-27 19:44:56.000000000 -0700
++++ b/generic/tixGrData.c	2023-07-11 14:54:19.644741199 -0600
+@@ -296,7 +296,7 @@
+ 	Tcl_DeleteHashEntry(cy);
+     }
+     else {
+-	panic("Inconsistent grid dataset: (%d,%d) : %x %x", x, y, cx, cy);
++	Tcl_Panic("Inconsistent grid dataset: (%d,%d) : %x %x", x, y, cx, cy);
+     }
+ 
+     return 1;
+diff -ur a/generic/tixGrid.c b/generic/tixGrid.c
+--- a/generic/tixGrid.c	2008-02-27 21:10:43.000000000 -0700
++++ b/generic/tixGrid.c	2023-07-11 14:53:59.283841038 -0600
+@@ -831,7 +831,7 @@
+ 	 * All mapped windows should have been unmapped when the
+ 	 * the entries were deleted
+ 	 */
+-	panic("tixGrid: mappedWindows not NULL");
++	Tcl_Panic("tixGrid: mappedWindows not NULL");
+     }
+ 
+     Tk_FreeOptions(configSpecs, (char *) wPtr, wPtr->dispData.display, 0);
+diff -ur a/generic/tixHList.c b/generic/tixHList.c
+--- a/generic/tixHList.c	2008-02-27 21:05:29.000000000 -0700
++++ b/generic/tixHList.c	2023-07-11 14:55:20.699375202 -0600
+@@ -2036,7 +2036,7 @@
+ 	    break;
+ 	}
+ 	if (wPtr->headerWin != NULL) {
+-	    panic("HList: header subwindow deleted illegally\n");
++	    Tcl_Panic("HList: header subwindow deleted illegally\n");
+ 	}
+ #endif
+ 	break;
+@@ -2117,7 +2117,7 @@
+ 	 * All mapped windows should have been unmapped when the
+ 	 * the entries were deleted
+ 	 */
+-	panic("tixHList: mappedWindows not NULL");
++	Tcl_Panic("tixHList: mappedWindows not NULL");
+     }
+     if (wPtr->headerWin) {
+ 	wPtr->headerWin = NULL;
+diff -ur a/generic/tixImgCmp.c b/generic/tixImgCmp.c
+--- a/generic/tixImgCmp.c	2008-02-27 21:05:29.000000000 -0700
++++ b/generic/tixImgCmp.c	2023-07-11 14:59:16.429640785 -0600
+@@ -142,8 +142,8 @@
+  * The type record for bitmap images:
+  */
+ static int		ImgCmpCreate _ANSI_ARGS_((Tcl_Interp *interp,
+-			    char *name, int argc, Tcl_Obj *CONST objv[],
+-			    Tk_ImageType *typePtr, Tk_ImageMaster master,
++			    const char *name, int argc, Tcl_Obj *CONST objv[],
++			    const Tk_ImageType *typePtr, Tk_ImageMaster master,
+ 			    ClientData *clientDataPtr));
+ static ClientData	ImgCmpGet _ANSI_ARGS_((Tk_Window tkwin,
+ 			    ClientData clientData));
+@@ -378,11 +378,11 @@
+ ImgCmpCreate(interp, name, argc, objv, typePtr, master, clientDataPtr)
+     Tcl_Interp *interp;		/* Interpreter for application containing
+ 				 * image. */
+-    char *name;			/* Name to use for image. */
++    const char *name;		/* Name to use for image. */
+     int argc;			/* Number of arguments. */
+     Tcl_Obj *CONST objv[];	/* Argument strings for options (doesn't
+ 				 * include image name or type). */
+-    Tk_ImageType *typePtr;	/* Pointer to our type record (not used). */
++    const Tk_ImageType *typePtr;/* Pointer to our type record (not used). */
+     Tk_ImageMaster master;	/* Token for image, to be used by us in
+ 				 * later callbacks. */
+     ClientData *clientDataPtr;	/* Store manager's token for image here;
+diff -ur a/generic/tixImgXpm.c b/generic/tixImgXpm.c
+--- a/generic/tixImgXpm.c	2023-07-11 15:01:05.887387236 -0600
++++ b/generic/tixImgXpm.c	2023-07-11 15:00:37.209042328 -0600
+@@ -22,8 +22,8 @@
+  */
+ 
+ static int		ImgXpmCreate _ANSI_ARGS_((Tcl_Interp *interp,
+-			    char *name, int argc, Tcl_Obj *CONST objv[],
+-			    Tk_ImageType *typePtr, Tk_ImageMaster master,
++			    const char *name, int argc, Tcl_Obj *CONST objv[],
++			    const Tk_ImageType *typePtr, Tk_ImageMaster master,
+ 			    ClientData *clientDataPtr));
+ static ClientData	ImgXpmGet _ANSI_ARGS_((Tk_Window tkwin,
+ 			    ClientData clientData));
+@@ -115,11 +115,11 @@
+ ImgXpmCreate(interp, name, argc, objv, typePtr, master, clientDataPtr)
+     Tcl_Interp *interp;		/* Interpreter for application containing
+ 				 * image. */
+-    char *name;			/* Name to use for image. */
++    const char *name;		/* Name to use for image. */
+     int argc;			/* Number of arguments. */
+     Tcl_Obj *CONST objv[];	/* Argument strings for options (doesn't
+ 				 * include image name or type). */
+-    Tk_ImageType *typePtr;	/* Pointer to our type record (not used). */
++    const Tk_ImageType *typePtr;/* Pointer to our type record (not used). */
+     Tk_ImageMaster master;	/* Token for image, to be used by us in
+ 				 * later callbacks. */
+     ClientData *clientDataPtr;	/* Store manager's token for image here;
+@@ -1213,7 +1213,7 @@
+     PixmapMaster *masterPtr = (PixmapMaster *) masterData;
+ 
+     if (masterPtr->instancePtr != NULL) {
+-	panic("tried to delete pixmap image when instances still exist");
++	Tcl_Panic("tried to delete pixmap image when instances still exist");
+     }
+     masterPtr->tkMaster = NULL;
+     if (masterPtr->imageCmd != NULL) {
+diff -ur a/generic/tixTList.c b/generic/tixTList.c
+--- a/generic/tixTList.c	2008-02-27 21:05:29.000000000 -0700
++++ b/generic/tixTList.c	2023-07-11 14:55:35.960761327 -0600
+@@ -1208,7 +1208,7 @@
+ 	    sprintf(buff, "%d", i);
+ 	    Tcl_AppendResult(interp, buff, NULL);
+ 	} else {
+-	    panic("TList list entry is invalid");
++	    Tcl_Panic("TList list entry is invalid");
+ 	}
+     } else {
+ 	Tcl_ResetResult(interp);
+diff -ur a/generic/tixUtils.c b/generic/tixUtils.c
+--- a/generic/tixUtils.c	2008-02-27 21:29:17.000000000 -0700
++++ b/generic/tixUtils.c	2023-07-11 15:01:43.718202631 -0600
+@@ -24,7 +24,7 @@
+ static int	ReliefParseProc(ClientData clientData,
+ 	Tcl_Interp *interp, Tk_Window tkwin, CONST84 char *value,
+ 	char *widRec, int offset);
+-static char *	ReliefPrintProc(ClientData clientData,
++static const char *	ReliefPrintProc(ClientData clientData,
+ 	Tk_Window tkwin, char *widRec, int offset,
+ 	Tix_FreeProc **freeProcPtr);
+ 
+@@ -637,7 +637,7 @@
+     return TCL_ERROR;
+ }
+ 
+-static char *
++static const char *
+ ReliefPrintProc(clientData, tkwin, widRec,offset, freeProcPtr)
+     ClientData clientData;
+     Tk_Window tkwin;
diff --git a/nixpkgs/pkgs/development/libraries/tk/8.5.nix b/nixpkgs/pkgs/development/libraries/tk/8.5.nix
new file mode 100644
index 000000000000..afd575915f85
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tk/8.5.nix
@@ -0,0 +1,28 @@
+{ lib
+, stdenv
+, callPackage
+, fetchurl
+, fetchpatch
+, tcl
+, ...
+} @ args:
+
+callPackage ./generic.nix (args // {
+
+  src = fetchurl {
+    url = "mirror://sourceforge/tcl/tk${tcl.version}-src.tar.gz";
+    sha256 = "1yhgcalldrjlc5q614rlzg1crgd3b52dhrk1pncdaxvl2vgg2yj0";
+  };
+
+  patches = lib.optionals stdenv.isDarwin [
+    # Define MODULE_SCOPE before including tkPort.h
+    # https://core.tcl-lang.org/tk/info/dba9f5ce3b
+    (fetchpatch {
+      name = "module_scope.patch";
+      url = "https://core.tcl-lang.org/tk/vpatch?from=ef6c6960c53ea30c&to=9b8aa74eebed509a";
+      extraPrefix = "";
+      sha256 = "0crhf4zrzdpc1jdgyv6l6mxqgmny12r3i39y1i0j8q3pbqkd04bv";
+    })
+  ];
+
+})
diff --git a/nixpkgs/pkgs/development/libraries/tk/8.6.nix b/nixpkgs/pkgs/development/libraries/tk/8.6.nix
new file mode 100644
index 000000000000..fbf456051754
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tk/8.6.nix
@@ -0,0 +1,21 @@
+{ lib
+, stdenv
+, callPackage
+, fetchurl
+, fetchpatch
+, tcl
+, ...
+} @ args:
+
+callPackage ./generic.nix (args // {
+
+  src = fetchurl {
+    url = "mirror://sourceforge/tcl/tk${tcl.version}-src.tar.gz";
+    sha256 = "sha256-LmX6BpojNlRAo8VsVWuGc7XjKig4ANjZslfj9YTOBnU=";
+  };
+
+  patches = [
+    ./tk-8_6_13-find-library.patch
+  ];
+
+})
diff --git a/nixpkgs/pkgs/development/libraries/tk/generic.nix b/nixpkgs/pkgs/development/libraries/tk/generic.nix
new file mode 100644
index 000000000000..57a9b617d950
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tk/generic.nix
@@ -0,0 +1,74 @@
+{ stdenv, lib, src, pkg-config, tcl, libXft, patches ? []
+, enableAqua ? stdenv.isDarwin, darwin
+, ... }:
+
+tcl.mkTclDerivation {
+  pname = "tk";
+  version = tcl.version;
+
+  inherit src patches;
+
+  outputs = [ "out" "man" "dev" ];
+
+  setOutputFlags = false;
+
+  preConfigure = ''
+    configureFlagsArray+=(--mandir=$man/share/man --enable-man-symlinks)
+    cd unix
+  '';
+
+  postPatch = ''
+    for file in $(find library/demos/. -type f ! -name "*.*"); do
+      substituteInPlace $file --replace "exec wish" "exec $out/bin/wish"
+    done
+  ''
+  + lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11") ''
+    substituteInPlace unix/configure* \
+      --replace " -framework UniformTypeIdentifiers" ""
+  '';
+
+  postInstall = ''
+    ln -s $out/bin/wish* $out/bin/wish
+    cp ../{unix,generic}/*.h $out/include
+    ln -s $out/lib/libtk${tcl.release}${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/libtk${stdenv.hostPlatform.extensions.sharedLibrary}
+  ''
+  + lib.optionalString (stdenv.isDarwin) ''
+    cp ../macosx/*.h $out/include
+  '';
+
+  configureFlags = [
+    "--enable-threads"
+  ] ++ lib.optional stdenv.is64bit "--enable-64bit"
+    ++ lib.optional enableAqua "--enable-aqua";
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ ];
+
+  propagatedBuildInputs = [
+    libXft
+  ] ++ lib.optionals enableAqua ([
+    darwin.apple_sdk.frameworks.Cocoa
+  ] ++ lib.optionals (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") [
+    darwin.apple_sdk.frameworks.UniformTypeIdentifiers
+  ]);
+
+  enableParallelBuilding = true;
+
+  doCheck = false; # fails. can't find itself
+
+  inherit tcl;
+
+  passthru = rec {
+    inherit (tcl) release version;
+    libPrefix = "tk${tcl.release}";
+    libdir = "lib/${libPrefix}";
+  };
+
+  meta = with lib; {
+    description = "A widget toolkit that provides a library of basic elements for building a GUI in many different programming languages";
+    homepage = "https://www.tcl.tk/";
+    license = licenses.tcltk;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ lovek323 vrthra ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tk/tk-8_6_13-find-library.patch b/nixpkgs/pkgs/development/libraries/tk/tk-8_6_13-find-library.patch
new file mode 100644
index 000000000000..a055ade80cc0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tk/tk-8_6_13-find-library.patch
@@ -0,0 +1,25 @@
+diff --git a/generic/tkWindow.c b/generic/tkWindow.c
+index fa25553..ad45598 100644
+--- a/generic/tkWindow.c
++++ b/generic/tkWindow.c
+@@ -1045,6 +1045,7 @@ TkCreateMainWindow(
+ 
+     Tcl_SetVar2(interp, "tk_patchLevel", NULL, TK_PATCH_LEVEL, TCL_GLOBAL_ONLY);
+     Tcl_SetVar2(interp, "tk_version",    NULL, TK_VERSION,     TCL_GLOBAL_ONLY);
++    Tcl_SetVar2(interp, "tk_library",    NULL, TK_LIBRARY,     TCL_GLOBAL_ONLY);
+ 
+     tsdPtr->numMainWindows++;
+     return tkwin;
+diff --git a/unix/Makefile.in b/unix/Makefile.in
+index e98070e..f417753 100644
+--- a/unix/Makefile.in
++++ b/unix/Makefile.in
+@@ -1033,7 +1033,7 @@ tkVisual.o: $(GENERIC_DIR)/tkVisual.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkVisual.c
+ 
+ tkWindow.o: $(GENERIC_DIR)/tkWindow.c tkUuid.h
+-	$(CC) -c $(CC_SWITCHES) -I. $(GENERIC_DIR)/tkWindow.c
++	$(CC) -c $(CC_SWITCHES) -I. -DTK_LIBRARY=\"${TK_LIBRARY}\" $(GENERIC_DIR)/tkWindow.c
+ 
+ tkButton.o: $(GENERIC_DIR)/tkButton.c
+ 	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkButton.c
diff --git a/nixpkgs/pkgs/development/libraries/tkimg/default.nix b/nixpkgs/pkgs/development/libraries/tkimg/default.nix
new file mode 100644
index 000000000000..094a6b5dda3d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tkimg/default.nix
@@ -0,0 +1,28 @@
+{ lib, fetchsvn, tcl, tcllib, tk, xorg }:
+
+tcl.mkTclDerivation rec {
+  pname = "tkimg";
+  version = "623";
+
+  src = fetchsvn {
+    url = "svn://svn.code.sf.net/p/tkimg/code/trunk";
+    rev = version;
+    sha256 = "sha256-6GlkqYxXmMGjiJTZS2fQNVSimcKc1BZ/lvzvtkhty+o=";
+  };
+
+  configureFlags = [
+    "--with-tcl=${tcl}/lib"
+    "--with-tk=${tk}/lib"
+    "--with-tkinclude=${tk.dev}/include"
+  ];
+
+  buildInputs = [ xorg.libX11 tcllib ];
+
+  meta = {
+    homepage = "https://sourceforge.net/projects/tkimg/";
+    description = "The Img package adds several image formats to Tcl/Tk";
+    maintainers = with lib.maintainers; [ matthewcroughan ];
+    license = lib.licenses.bsd3;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tkrzw/default.nix b/nixpkgs/pkgs/development/libraries/tkrzw/default.nix
new file mode 100644
index 000000000000..694225d9e3ba
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tkrzw/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "tkrzw";
+  version = "1.0.27";
+  # TODO: defeat multi-output reference cycles
+
+  src = fetchurl {
+    url = "https://dbmx.net/tkrzw/pkg/tkrzw-${version}.tar.gz";
+    hash = "sha256-DxLtDtscTPR1yzeOENyQPylKo+VxJTswUAE/MieEoXQ=";
+  };
+
+  postPatch = ''
+    substituteInPlace configure \
+      --replace 'PATH=".:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:$PATH"' ""
+  '';
+
+  enableParallelBuilding = true;
+
+  doCheck = false; # memory intensive
+
+  meta = with lib; {
+    description = "A set of implementations of DBM";
+    homepage = "https://dbmx.net/tkrzw/";
+    maintainers = with maintainers; [ ehmry ];
+    license = licenses.asl20;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tl-expected/default.nix b/nixpkgs/pkgs/development/libraries/tl-expected/default.nix
new file mode 100644
index 000000000000..68550b5ab474
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tl-expected/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "tl-expected";
+  version = "1.1.0";
+
+  src = fetchFromGitHub {
+    owner = "TartanLlama";
+    repo = "expected";
+    rev = "v${version}";
+    hash = "sha256-AuRU8VI5l7Th9fJ5jIc/6mPm0Vqbbt6rY8QCCNDOU50=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "C++11/14/17 std::expected with functional-style extensions";
+    homepage = "https://tl.tartanllama.xyz/en/latest/api/expected.html";
+    license = licenses.cc0;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tllist/default.nix b/nixpkgs/pkgs/development/libraries/tllist/default.nix
new file mode 100644
index 000000000000..e5cdad0aae63
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tllist/default.nix
@@ -0,0 +1,45 @@
+{ stdenv
+, lib
+, fetchFromGitea
+, meson
+, ninja
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "tllist";
+  version = "1.1.0";
+
+  src = fetchFromGitea {
+    domain = "codeberg.org";
+    owner = "dnkl";
+    repo = "tllist";
+    rev = finalAttrs.version;
+    hash = "sha256-4WW0jGavdFO3LX9wtMPzz3Z1APCPgUQOktpmwAM0SQw=";
+  };
+
+  nativeBuildInputs = [ meson ninja ];
+
+  mesonBuildType = "release";
+
+  doCheck = true;
+
+  meta = with lib; {
+    homepage = "https://codeberg.org/dnkl/tllist";
+    changelog = "https://codeberg.org/dnkl/tllist/releases/tag/${version}";
+    description = "C header file only implementation of a typed linked list";
+    longDescription = ''
+      Most C implementations of linked list are untyped. That is, their data
+      carriers are typically void *. This is error prone since your compiler
+      will not be able to help you correct your mistakes (oh, was it a
+      pointer-to-a-pointer... I thought it was just a pointer...).
+
+      tllist addresses this by using pre-processor macros to implement dynamic
+      types, where the data carrier is typed to whatever you want; both
+      primitive data types are supported as well as aggregated ones such as
+      structs, enums and unions.
+    '';
+    license = licenses.mit;
+    maintainers = with maintainers; [ fionera AndersonTorres ];
+    platforms = platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/tnt/default.nix b/nixpkgs/pkgs/development/libraries/tnt/default.nix
new file mode 100644
index 000000000000..f4787271c039
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tnt/default.nix
@@ -0,0 +1,25 @@
+{lib, stdenv, fetchurl, unzip}:
+
+stdenv.mkDerivation {
+  pname = "tnt";
+  version = "3.0.12";
+
+  src = fetchurl {
+    url = "https://math.nist.gov/tnt/tnt_3_0_12.zip";
+    sha256 = "1bzkfdb598584qlc058n8wqq9vbz714gr5r57401rsa9qaxhk5j7";
+  };
+
+  nativeBuildInputs = [ unzip ];
+
+  installPhase = ''
+      mkdir -p $out/include
+      cp *.h $out/include
+  '';
+
+  meta = {
+    homepage = "https://math.nist.gov/tnt/";
+    description = "Template Numerical Toolkit: C++ headers for array and matrices";
+    license = lib.licenses.publicDomain;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tntdb/default.nix b/nixpkgs/pkgs/development/libraries/tntdb/default.nix
new file mode 100644
index 000000000000..9080893d5e44
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tntdb/default.nix
@@ -0,0 +1,46 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, cxxtools
+, postgresql
+, libmysqlclient
+, sqlite
+, zlib
+, openssl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tntdb";
+  version = "1.4";
+
+  src = fetchFromGitHub {
+    owner = "maekitalo";
+    repo = "tntdb";
+    rev = "V${version}";
+    hash = "sha256-ciqHv077sXnvCx+TJjdY1uPrlCP7/s972koXjGLgWhU=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  buildInputs = [
+    cxxtools
+    postgresql
+    libmysqlclient
+    sqlite
+    zlib
+    openssl
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "http://www.tntnet.org/tntdb.html";
+    description = "C++ library which makes accessing SQL databases easy and robust";
+    platforms = platforms.linux;
+    license = licenses.lgpl21;
+    maintainers = [ maintainers.juliendehos ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tntnet/default.nix b/nixpkgs/pkgs/development/libraries/tntnet/default.nix
new file mode 100644
index 000000000000..03e8558a0c1e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tntnet/default.nix
@@ -0,0 +1,50 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, autoreconfHook
+, cxxtools
+, zlib
+, openssl
+, zip
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tntnet";
+  version = "3.0";
+
+  src = fetchFromGitHub {
+    owner = "maekitalo";
+    repo = "tntnet";
+    rev = "V${version}";
+    hash = "sha256-ujVPOreCGCFlYHa19yCIiZ0ed+p0jnS14DHDwKYvtc0=";
+  };
+
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/maekitalo/tntnet/commit/69adfc8ee351a0e82990c1ffa7af6dab726e1e49.patch";
+      hash = "sha256-4UdUXKQiIa9CPlGg8XmfKQ8NTWb2A3AiuPthzEthlf8=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  buildInputs = [
+    cxxtools
+    zlib
+    openssl
+    zip
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "http://www.tntnet.org/tntnet.html";
+    description = "Web server which allows users to develop web applications using C++";
+    platforms = platforms.linux;
+    license = licenses.lgpl21;
+    maintainers = [ maintainers.juliendehos ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tokyo-cabinet/default.nix b/nixpkgs/pkgs/development/libraries/tokyo-cabinet/default.nix
new file mode 100644
index 000000000000..4b3c8a363eb4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tokyo-cabinet/default.nix
@@ -0,0 +1,44 @@
+{ fetchurl, lib, stdenv, zlib, bzip2 }:
+
+stdenv.mkDerivation rec {
+  pname = "tokyocabinet";
+  version = "1.4.48";
+
+  src = fetchurl {
+    url = "https://dbmx.net/tokyocabinet/${pname}-${version}.tar.gz";
+    sha256 = "140zvr0n8kvsl0fbn2qn3f2kh3yynfwnizn4dgbj47m975yg80x0";
+  };
+
+  buildInputs = [ zlib bzip2 ];
+
+  postInstall =
+    '' sed -i "$out/lib/pkgconfig/tokyocabinet.pc" \
+           -e 's|-lz|-L${zlib.out}/lib -lz|g;
+               s|-lbz2|-L${bzip2.out}/lib -lbz2|g'
+    '';
+
+  meta = {
+    description = "Tokyo Cabinet: a modern implementation of DBM";
+
+    longDescription =
+      '' Tokyo Cabinet is a library of routines for managing a database. The
+         database is a simple data file containing records, each is a pair of
+         a key and a value.  Every key and value is serial bytes with
+         variable length.  Both binary data and character string can be used
+         as a key and a value.  There is neither concept of data tables nor
+         data types.  Records are organized in hash table, B+ tree, or
+         fixed-length array.
+
+         Tokyo Cabinet is developed as the successor of GDBM and QDBM on the
+         following purposes.  They are achieved and Tokyo Cabinet replaces
+         conventional DBM products: improves space efficiency, improves time
+         efficiency, improves parallelism, improves usability, improves
+         robustness, supports 64-bit architecture.
+      '';
+
+    license = lib.licenses.lgpl2Plus;
+
+    maintainers = [ ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tokyo-tyrant/default.nix b/nixpkgs/pkgs/development/libraries/tokyo-tyrant/default.nix
new file mode 100644
index 000000000000..6407840c443c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tokyo-tyrant/default.nix
@@ -0,0 +1,42 @@
+{ fetchurl, lib, stdenv, tokyocabinet, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "tokyotyrant";
+  version = "1.1.41";
+
+  src = fetchurl {
+    url = "https://fallabs.com/tokyotyrant/tokyotyrant-${version}.tar.gz";
+    sha256 = "13xqcinhydqmh7231qlir6pymacjwcf98drybkhd9597kzxp1bs2";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ tokyocabinet ];
+
+  doCheck = false; # FIXME
+
+  meta = {
+    description = "Network interface of the Tokyo Cabinet DBM";
+
+    longDescription =
+      '' Tokyo Tyrant is a package of network interface to the DBM called
+         Tokyo Cabinet.  Though the DBM has high performance, you might
+         bother in case that multiple processes share the same database, or
+         remote processes access the database.  Thus, Tokyo Tyrant is
+         provided for concurrent and remote connections to Tokyo Cabinet.  It
+         is composed of the server process managing a database and its access
+         library for client applications.
+
+         Tokyo Tyrant is written in the C language, and provided as API of C,
+         Perl, and Ruby.  Tokyo Tyrant is available on platforms which have
+         API conforming to C99 and POSIX.  Tokyo Tyrant is a free software
+         licensed under the GNU Lesser General Public License.
+       '';
+
+    homepage = "https://fallabs.com/tokyotyrant/";
+
+    license = lib.licenses.lgpl21Plus;
+
+    platforms = lib.platforms.gnu ++ lib.platforms.linux; # arbitrary choice
+    maintainers = [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/toml-f/default.nix b/nixpkgs/pkgs/development/libraries/toml-f/default.nix
new file mode 100644
index 000000000000..28fb3dadce48
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/toml-f/default.nix
@@ -0,0 +1,45 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, gfortran
+, cmake
+, test-drive
+}:
+
+stdenv.mkDerivation rec {
+  pname = "toml-f";
+  version = "0.4.2";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-+cac4rUNpd2w3yBdH1XoCKdJ9IgOHZioZg8AhzGY0FE=";
+  };
+
+  nativeBuildInputs = [ gfortran cmake ];
+
+  buildInputs = [ test-drive ];
+
+  outputs = [ "out" "dev" ];
+
+  # Fix the Pkg-Config files for doubled store paths
+  postPatch = ''
+    substituteInPlace config/template.pc \
+      --replace "\''${prefix}/" ""
+  '';
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "TOML parser implementation for data serialization and deserialization in Fortran";
+    license = with licenses; [ asl20 mit ];
+    homepage = "https://github.com/toml-f/toml-f";
+    platforms = [ "x86_64-linux" ];
+    maintainers = [ maintainers.sheepforce ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/toml11/default.nix b/nixpkgs/pkgs/development/libraries/toml11/default.nix
new file mode 100644
index 000000000000..641b72aa1e8c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/toml11/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "toml11";
+  version = "3.7.1";
+
+  src = fetchFromGitHub {
+    owner = "ToruNiina";
+    repo = "toml11";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-HnhXBvIjo1JXhp+hUQvjs83t5IBVbNN6o3ZGhB4WESQ=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/ToruNiina/toml11";
+    description = "TOML for Modern C++";
+    longDescription = ''
+      toml11 is a C++11 (or later) header-only toml parser/encoder depending
+      only on C++ standard library.
+
+      - It is compatible to the latest version of TOML v1.0.0.
+      - It is one of the most TOML standard compliant libraries, tested with
+        the language agnostic test suite for TOML parsers by BurntSushi.
+      - It shows highly informative error messages.
+      - It has configurable container. You can use any random-access containers
+        and key-value maps as backend containers.
+      - It optionally preserves comments without any overhead.
+      - It has configurable serializer that supports comments, inline tables,
+        literal strings and multiline strings.
+      - It supports user-defined type conversion from/into toml values.
+      - It correctly handles UTF-8 sequences, with or without BOM, both on posix
+        and Windows.
+    '';
+    license = licenses.mit;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.unix;
+  };
+})
+# TODO [ AndersonTorres ]: tests
diff --git a/nixpkgs/pkgs/development/libraries/tomlc99/default.nix b/nixpkgs/pkgs/development/libraries/tomlc99/default.nix
new file mode 100644
index 000000000000..5ed4fd07b472
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tomlc99/default.nix
@@ -0,0 +1,30 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tomlc99";
+  version = "0.pre+date=2022-04-04";
+
+  src = fetchFromGitHub {
+    owner = "cktan";
+    repo = pname;
+    rev = "4e7b082ccc44316f212597ae5b09a35cf9329e69";
+    hash = "sha256-R9OBMG/aUa80Qw/zqaks63F9ybQcThfOYRsHP4t1Gv8=";
+  };
+
+  dontConfigure = true;
+
+  installFlags = [
+    "prefix=${placeholder "out"}"
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/cktan/tomlc99";
+    description = "TOML v1.0.0-compliant library written in C99";
+    license = licenses.mit;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tomlcpp/default.nix b/nixpkgs/pkgs/development/libraries/tomlcpp/default.nix
new file mode 100644
index 000000000000..f782719f2b63
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tomlcpp/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "tomlcpp";
+  version = "0.pre+date=2022-06-25";
+
+  src = fetchFromGitHub {
+    owner = "cktan";
+    repo = pname;
+    rev = "4212f1fccf530e276a2e1b63d3f99fbfb84e86a4";
+    hash = "sha256-PM3gURXhyTZr59BWuLHvltjKOlKUSBT9/rqTeX5V//k=";
+  };
+
+  dontConfigure = true;
+
+  installFlags = [
+    "prefix=${placeholder "out"}"
+  ];
+
+  meta = with lib;{
+    homepage = "https://github.com/cktan/tomlcpp";
+    description = "No fanfare TOML C++ Library";
+    license = licenses.mit;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tomlplusplus/default.nix b/nixpkgs/pkgs/development/libraries/tomlplusplus/default.nix
new file mode 100644
index 000000000000..dda352d0769f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tomlplusplus/default.nix
@@ -0,0 +1,29 @@
+{ lib
+, stdenv
+, meson
+, cmake
+, ninja
+, fetchFromGitHub
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "tomlplusplus";
+  version = "3.4.0";
+
+  src = fetchFromGitHub {
+    owner = "marzer";
+    repo = "tomlplusplus";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-h5tbO0Rv2tZezY58yUbyRVpsfRjY3i+5TPkkxr6La8M=";
+  };
+
+  nativeBuildInputs = [ meson cmake ninja ];
+
+  meta = with lib; {
+    homepage = "https://github.com/marzer/tomlplusplus";
+    description = "Header-only TOML config file parser and serializer for C++17";
+    license = licenses.mit;
+    maintainers = with maintainers; [ Scrumplex ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/totem-pl-parser/default.nix b/nixpkgs/pkgs/development/libraries/totem-pl-parser/default.nix
new file mode 100644
index 000000000000..871b724029c8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/totem-pl-parser/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchpatch, fetchurl, meson, ninja, pkg-config, gettext, libxml2, gobject-introspection, gnome, glib }:
+
+stdenv.mkDerivation rec {
+  pname = "totem-pl-parser";
+  version = "3.26.6";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "wN8PaNXPnX2kPIHH8T8RFYNYNo+Ywi1Hci870EvTrBw=";
+  };
+
+  patches = [
+    # Upstream MR: https://gitlab.gnome.org/GNOME/totem-pl-parser/-/merge_requests/46
+    (fetchpatch {
+      url = "https://gitlab.gnome.org/GNOME/totem-pl-parser/-/commit/f4f69c9b99095416aaed18a73f7486ad9eb04aa9.patch";
+      sha256 = "sha256-Uya5fgFgauv5rIpVK3CDGCieyMus7VjcLMMe/vQ2WWY=";
+    })
+  ];
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "odd-unstable";
+    };
+  };
+
+  strictDeps = true;
+  depsBuildBuild = [ pkg-config ];
+  nativeBuildInputs = [ meson ninja pkg-config gettext glib gobject-introspection ];
+  buildInputs = [ libxml2 glib ];
+
+  mesonFlags = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
+    "-Dintrospection=false"
+  ];
+
+  meta = with lib; {
+    homepage = "https://wiki.gnome.org/Apps/Videos";
+    description = "Simple GObject-based library to parse and save a host of playlist formats";
+    maintainers = teams.gnome.members;
+    license = licenses.lgpl2;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tpm2-tss/default.nix b/nixpkgs/pkgs/development/libraries/tpm2-tss/default.nix
new file mode 100644
index 000000000000..628f32a91c69
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tpm2-tss/default.nix
@@ -0,0 +1,98 @@
+{ stdenv, lib, fetchFromGitHub, fetchurl
+, autoreconfHook, autoconf-archive, pkg-config, doxygen, perl
+, openssl, json_c, curl, libgcrypt
+, cmocka, uthash, ibm-sw-tpm2, iproute2, procps, which
+, shadow, libuuid
+}:
+let
+  # Avoid a circular dependency on Linux systems (systemd depends on tpm2-tss,
+  # tpm2-tss tests depend on procps, procps depends on systemd by default). This
+  # needs to be conditional based on isLinux because procps for other systems
+  # might not support the withSystemd option.
+  procpsWithoutSystemd = procps.override { withSystemd = false; };
+  procps_pkg = if stdenv.isLinux then procpsWithoutSystemd else procps;
+in
+
+stdenv.mkDerivation rec {
+  pname = "tpm2-tss";
+  version = "4.0.1";
+
+  src = fetchFromGitHub {
+    owner = "tpm2-software";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-75yiKVZrR1vcCwKp4tDO4A9JB0KDM0MXPJ1N85kAaRk=";
+  };
+
+  outputs = [ "out" "man" "dev" ];
+
+  nativeBuildInputs = [
+    autoreconfHook autoconf-archive pkg-config doxygen perl
+    shadow
+  ];
+
+  buildInputs = [
+    openssl json_c curl libgcrypt uthash libuuid
+  ]
+  # cmocka is checked in the configure script
+  # when unit and/or integration testing is enabled
+  # cmocka doesn't build with pkgsStatic, and we don't need it anyway
+  # when tests are not run
+  ++ lib.optional doInstallCheck cmocka;
+
+  nativeInstallCheckInputs = [
+    cmocka which openssl procps_pkg iproute2 ibm-sw-tpm2
+  ];
+
+  strictDeps = true;
+  preAutoreconf = "./bootstrap";
+
+  enableParallelBuilding = true;
+
+  patches = [
+    # Do not rely on dynamic loader path
+    # TCTI loader relies on dlopen(), this patch prefixes all calls with the output directory
+    ./no-dynamic-loader-path.patch
+    (fetchurl {
+      name = "skip-test-fapi-fix-provisioning-with-template-if-no-certificate-available.patch";
+      url = "https://github.com/tpm2-software/tpm2-tss/commit/218c0da8d9f675766b1de502a52e23a3aa52648e.patch";
+      sha256 = "sha256-dnl9ZAknCdmvix2TdQvF0fHoYeWp+jfCTg8Uc7h0voA=";
+    })
+  ];
+
+  postPatch = ''
+    patchShebangs script
+    substituteInPlace src/tss2-tcti/tctildr-dl.c \
+      --replace '@PREFIX@' $out/lib/
+    substituteInPlace ./test/unit/tctildr-dl.c \
+      --replace '@PREFIX@' $out/lib
+    substituteInPlace ./bootstrap \
+      --replace 'git describe --tags --always --dirty' 'echo "${version}"'
+  '';
+
+  configureFlags = lib.optionals doInstallCheck [
+    "--enable-unit"
+    "--enable-integration"
+  ];
+
+  postInstall = ''
+    # Do not install the upstream udev rules, they rely on specific
+    # users/groups which aren't guaranteed to exist on the system.
+    rm -R $out/lib/udev
+  '';
+
+  doCheck = false;
+  doInstallCheck = stdenv.buildPlatform == stdenv.hostPlatform;
+  # Since we rewrote the load path in the dynamic loader for the TCTI
+  # The various tcti implementation should be placed in their target directory
+  # before we could run tests, so we make turn checkPhase into installCheckPhase
+  installCheckTarget = "check";
+
+  meta = with lib; {
+    description = "OSS implementation of the TCG TPM2 Software Stack (TSS2)";
+    homepage = "https://github.com/tpm2-software/tpm2-tss";
+    license = licenses.bsd2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ baloo ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tpm2-tss/no-dynamic-loader-path.patch b/nixpkgs/pkgs/development/libraries/tpm2-tss/no-dynamic-loader-path.patch
new file mode 100644
index 000000000000..60f8c91bae85
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tpm2-tss/no-dynamic-loader-path.patch
@@ -0,0 +1,234 @@
+diff --git a/src/tss2-tcti/tctildr-dl.c b/src/tss2-tcti/tctildr-dl.c
+index 622637dc..88fc3d8f 100644
+--- a/src/tss2-tcti/tctildr-dl.c
++++ b/src/tss2-tcti/tctildr-dl.c
+@@ -92,7 +92,7 @@ handle_from_name(const char *file,
+         LOG_DEBUG("Could not load TCTI file: \"%s\": %s", file, dlerror());
+     }
+ 
+-    len = snprintf(NULL, 0, TCTI_NAME_TEMPLATE_0, file);
++    len = snprintf(NULL, 0, "@PREFIX@" TCTI_NAME_TEMPLATE_0, file);
+     if (len >= PATH_MAX) {
+         LOG_ERROR("TCTI name truncated in transform.");
+         return TSS2_TCTI_RC_BAD_VALUE;
+@@ -129,6 +129,50 @@ handle_from_name(const char *file,
+         return TSS2_TCTI_RC_BAD_VALUE;
+     }
+     *handle = dlopen(file_xfrm, RTLD_NOW);
++    if (*handle != NULL) {
++        return TSS2_RC_SUCCESS;
++    } else {
++        LOG_DEBUG("Failed to load TCTI for name \"%s\": %s", file, dlerror());
++    }
++    size = snprintf(file_xfrm,
++                    len + 1,
++                    "@PREFIX@%s",
++                    file);
++    if (size >= len + 1) {
++        LOG_ERROR("TCTI name truncated in transform.");
++        return TSS2_TCTI_RC_BAD_VALUE;
++    }
++    *handle = dlopen(file_xfrm, RTLD_NOW);
++    if (*handle != NULL) {
++        return TSS2_RC_SUCCESS;
++    } else {
++        LOG_DEBUG("Could not load TCTI file: \"%s\": %s", file, dlerror());
++    }
++    /* 'name' alone didn't work, try libtss2-tcti-<name>.so.0 */
++    size = snprintf(file_xfrm,
++                    len + 1,
++                    "@PREFIX@" TCTI_NAME_TEMPLATE_0,
++                    file);
++    if (size >= len + 1) {
++        LOG_ERROR("TCTI name truncated in transform.");
++        return TSS2_TCTI_RC_BAD_VALUE;
++    }
++    *handle = dlopen(file_xfrm, RTLD_NOW);
++    if (*handle != NULL) {
++        return TSS2_RC_SUCCESS;
++    } else {
++        LOG_DEBUG("Could not load TCTI file \"%s\": %s", file, dlerror());
++    }
++    /* libtss2-tcti-<name>.so.0 didn't work, try libtss2-tcti-<name>.so */
++    size = snprintf(file_xfrm,
++                    len + 1,
++                    "@PREFIX@" TCTI_NAME_TEMPLATE,
++                    file);
++    if (size >= len + 1) {
++        LOG_ERROR("TCTI name truncated in transform.");
++        return TSS2_TCTI_RC_BAD_VALUE;
++    }
++    *handle = dlopen(file_xfrm, RTLD_NOW);
+     if (*handle == NULL) {
+         LOG_DEBUG("Failed to load TCTI for name \"%s\": %s", file, dlerror());
+         SAFE_FREE(file_xfrm);
+diff --git a/test/unit/tctildr-dl.c b/test/unit/tctildr-dl.c
+index 4279baee..6685c811 100644
+--- a/test/unit/tctildr-dl.c
++++ b/test/unit/tctildr-dl.c
+@@ -229,6 +229,18 @@ test_get_info_default_success (void **state)
+     expect_value(__wrap_dlopen, flags, RTLD_NOW);
+     will_return(__wrap_dlopen, NULL);
+ 
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/libtss2-tcti-default.so");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
++
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/libtss2-tcti-libtss2-tcti-default.so.so.0");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
++
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/libtss2-tcti-libtss2-tcti-default.so.so");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
++
+     expect_string(__wrap_dlopen, filename, "libtss2-tcti-tabrmd.so.0");
+     expect_value(__wrap_dlopen, flags, RTLD_NOW);
+     will_return(__wrap_dlopen, HANDLE);
+@@ -261,6 +273,18 @@ test_get_info_default_info_fail (void **state)
+     expect_value(__wrap_dlopen, flags, RTLD_NOW);
+     will_return(__wrap_dlopen, NULL);
+ 
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/libtss2-tcti-default.so");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
++
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/libtss2-tcti-libtss2-tcti-default.so.so.0");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
++
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/libtss2-tcti-libtss2-tcti-default.so.so");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
++
+     expect_string(__wrap_dlopen, filename, "libtss2-tcti-tabrmd.so.0");
+     expect_value(__wrap_dlopen, flags, RTLD_NOW);
+     will_return(__wrap_dlopen, HANDLE);
+@@ -413,6 +437,15 @@ test_tcti_fail_all (void **state)
+     expect_string(__wrap_dlopen, filename, "libtss2-tcti-libtss2-tcti-default.so.so");
+     expect_value(__wrap_dlopen, flags, RTLD_NOW);
+     will_return(__wrap_dlopen, NULL);
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/libtss2-tcti-default.so");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/libtss2-tcti-libtss2-tcti-default.so.so.0");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/libtss2-tcti-libtss2-tcti-default.so.so");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
+ 
+     /* Skip over libtss2-tcti-tabrmd.so */
+     expect_string(__wrap_dlopen, filename, "libtss2-tcti-tabrmd.so.0");
+@@ -424,6 +457,15 @@ test_tcti_fail_all (void **state)
+     expect_string(__wrap_dlopen, filename, "libtss2-tcti-libtss2-tcti-tabrmd.so.0.so");
+     expect_value(__wrap_dlopen, flags, RTLD_NOW);
+     will_return(__wrap_dlopen, NULL);
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/libtss2-tcti-tabrmd.so.0");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/libtss2-tcti-libtss2-tcti-tabrmd.so.0.so.0");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/libtss2-tcti-libtss2-tcti-tabrmd.so.0.so");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
+ 
+     /* Skip over libtss2-tcti-device.so, /dev/tpmrm0 */
+     expect_string(__wrap_dlopen, filename, "libtss2-tcti-device.so.0");
+@@ -435,6 +477,15 @@ test_tcti_fail_all (void **state)
+     expect_string(__wrap_dlopen, filename, "libtss2-tcti-libtss2-tcti-device.so.0.so");
+     expect_value(__wrap_dlopen, flags, RTLD_NOW);
+     will_return(__wrap_dlopen, NULL);
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/libtss2-tcti-device.so.0");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/libtss2-tcti-libtss2-tcti-device.so.0.so.0");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/libtss2-tcti-libtss2-tcti-device.so.0.so");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
+ 
+     /* Skip over libtss2-tcti-device.so, /dev/tpm0 */
+     expect_string(__wrap_dlopen, filename, "libtss2-tcti-device.so.0");
+@@ -446,6 +497,15 @@ test_tcti_fail_all (void **state)
+     expect_string(__wrap_dlopen, filename, "libtss2-tcti-libtss2-tcti-device.so.0.so");
+     expect_value(__wrap_dlopen, flags, RTLD_NOW);
+     will_return(__wrap_dlopen, NULL);
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/libtss2-tcti-device.so.0");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/libtss2-tcti-libtss2-tcti-device.so.0.so.0");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/libtss2-tcti-libtss2-tcti-device.so.0.so");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
+ 
+     /* Skip over libtss2-tcti-swtpm.so */
+     expect_string(__wrap_dlopen, filename, "libtss2-tcti-swtpm.so.0");
+@@ -457,6 +517,15 @@ test_tcti_fail_all (void **state)
+     expect_string(__wrap_dlopen, filename, "libtss2-tcti-libtss2-tcti-swtpm.so.0.so");
+     expect_value(__wrap_dlopen, flags, RTLD_NOW);
+     will_return(__wrap_dlopen, NULL);
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/libtss2-tcti-swtpm.so.0");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/libtss2-tcti-libtss2-tcti-swtpm.so.0.so.0");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/libtss2-tcti-libtss2-tcti-swtpm.so.0.so");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
+ 
+     /* Skip over libtss2-tcti-mssim.so */
+     expect_string(__wrap_dlopen, filename, "libtss2-tcti-mssim.so.0");
+@@ -468,6 +537,15 @@ test_tcti_fail_all (void **state)
+     expect_string(__wrap_dlopen, filename, "libtss2-tcti-libtss2-tcti-mssim.so.0.so");
+     expect_value(__wrap_dlopen, flags, RTLD_NOW);
+     will_return(__wrap_dlopen, NULL);
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/libtss2-tcti-mssim.so.0");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/libtss2-tcti-libtss2-tcti-mssim.so.0.so.0");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/libtss2-tcti-libtss2-tcti-mssim.so.0.so");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
+ 
+     TSS2_RC r;
+     TSS2_TCTI_CONTEXT *tcti;
+@@ -496,6 +574,15 @@ test_info_from_name_handle_fail (void **state)
+     expect_string(__wrap_dlopen, filename, "libtss2-tcti-foo.so");
+     expect_value(__wrap_dlopen, flags, RTLD_NOW);
+     will_return(__wrap_dlopen, NULL);
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/foo");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/libtss2-tcti-foo.so.0");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/libtss2-tcti-foo.so");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
+ 
+     TSS2_RC rc = info_from_name ("foo", &info, &data);
+     assert_int_equal (rc, TSS2_TCTI_RC_NOT_SUPPORTED);
+@@ -612,6 +699,15 @@ test_tctildr_get_info_from_name (void **state)
+     expect_string(__wrap_dlopen, filename, "libtss2-tcti-foo.so");
+     expect_value(__wrap_dlopen, flags, RTLD_NOW);
+     will_return(__wrap_dlopen, NULL);
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/foo");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/libtss2-tcti-foo.so.0");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
++    expect_string(__wrap_dlopen, filename, "@PREFIX@/libtss2-tcti-foo.so");
++    expect_value(__wrap_dlopen, flags, RTLD_NOW);
++    will_return(__wrap_dlopen, NULL);
+ 
+     TSS2_RC rc = tctildr_get_info ("foo", &info, &data);
+     assert_int_equal (rc, TSS2_TCTI_RC_NOT_SUPPORTED);
diff --git a/nixpkgs/pkgs/development/libraries/tracker-miners/default.nix b/nixpkgs/pkgs/development/libraries/tracker-miners/default.nix
new file mode 100644
index 000000000000..3abd9bd24ba4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tracker-miners/default.nix
@@ -0,0 +1,144 @@
+{ stdenv
+, lib
+, fetchurl
+, asciidoc
+, docbook-xsl-nons
+, docbook_xml_dtd_45
+, gettext
+, itstool
+, libxslt
+, gexiv2
+, tracker
+, meson
+, mesonEmulatorHook
+, ninja
+, pkg-config
+, vala
+, wrapGAppsNoGuiHook
+, bzip2
+, dbus
+, exempi
+, giflib
+, glib
+, gnome
+, gst_all_1
+, icu
+, json-glib
+, libcue
+, libexif
+, libgsf
+, libgxps
+, libiptcdata
+, libjpeg
+, libosinfo
+, libpng
+, libseccomp
+, libtiff
+, libuuid
+, libxml2
+, networkmanager
+, poppler
+, systemd
+, taglib
+, upower
+, totem-pl-parser
+, e2fsprogs
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tracker-miners";
+  version = "3.6.2";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "Ctci89Uywh11fPSI+UKWBnnqj0V5Je+pdlbtTJ6bpP8=";
+  };
+
+  nativeBuildInputs = [
+    asciidoc
+    docbook-xsl-nons
+    docbook_xml_dtd_45
+    gettext
+    glib
+    itstool
+    libxslt
+    meson
+    ninja
+    pkg-config
+    vala
+    wrapGAppsNoGuiHook
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
+  ];
+
+  # TODO: add libenca, libosinfo
+  buildInputs = [
+    bzip2
+    dbus
+    exempi
+    giflib
+    gexiv2
+    totem-pl-parser
+    tracker
+    gst_all_1.gst-plugins-base
+    gst_all_1.gst-plugins-good
+    gst_all_1.gst-plugins-bad
+    gst_all_1.gst-plugins-ugly
+    gst_all_1.gstreamer
+    gst_all_1.gst-libav
+    icu
+    json-glib
+    libcue
+    libexif
+    libgsf
+    libgxps
+    libiptcdata
+    libjpeg
+    libosinfo
+    libpng
+    libtiff
+    libuuid
+    libxml2
+    poppler
+    taglib
+  ] ++ lib.optionals stdenv.isLinux [
+    libseccomp
+    networkmanager
+    systemd
+    upower
+  ] ++ lib.optionals stdenv.isDarwin [
+    e2fsprogs
+  ];
+
+  mesonFlags = [
+    # TODO: tests do not like our sandbox
+    "-Dfunctional_tests=false"
+
+    # libgrss is unmaintained and has no new releases since 2015, and an open
+    # security issue since then. Despite a patch now being availab, we're opting
+    # to be safe due to the general state of the project
+    "-Dminer_rss=false"
+  ] ++ lib.optionals (!stdenv.isLinux) [
+    "-Dbattery_detection=none"
+    "-Dnetwork_manager=disabled"
+    "-Dsystemd_user_services=false"
+  ];
+
+  postInstall = ''
+    glib-compile-schemas "$out/share/glib-2.0/schemas"
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://wiki.gnome.org/Projects/Tracker";
+    description = "Desktop-neutral user information store, search tool and indexer";
+    maintainers = teams.gnome.members;
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tracker/default.nix b/nixpkgs/pkgs/development/libraries/tracker/default.nix
new file mode 100644
index 000000000000..c349379648db
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tracker/default.nix
@@ -0,0 +1,176 @@
+{ stdenv
+, lib
+, fetchurl
+, gettext
+, meson
+, mesonEmulatorHook
+, ninja
+, pkg-config
+, asciidoc
+, gobject-introspection
+, buildPackages
+, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
+, vala
+, python3
+, gi-docgen
+, graphviz
+, libxml2
+, glib
+, wrapGAppsNoGuiHook
+, sqlite
+, libstemmer
+, gnome
+, icu
+, libuuid
+, libsoup
+, libsoup_3
+, json-glib
+, systemd
+, dbus
+, writeText
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tracker";
+  version = "3.6.0";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "Ulks/hm6/9FtvkdHW+fadQ29C2Mz/XrLYPqp2lvEDfI=";
+  };
+
+  strictDeps = true;
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    asciidoc
+    gettext
+    glib
+    wrapGAppsNoGuiHook
+    gi-docgen
+    graphviz
+    (python3.pythonOnBuildForHost.withPackages (p: [ p.pygobject3 ]))
+  ] ++ lib.optionals withIntrospection [
+    gobject-introspection
+    vala
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
+  ];
+
+  buildInputs = [
+    glib
+    libxml2
+    sqlite
+    icu
+    libsoup
+    libsoup_3
+    libuuid
+    json-glib
+    libstemmer
+    dbus
+  ] ++ lib.optionals stdenv.isLinux [
+    systemd
+  ];
+
+  nativeCheckInputs = [
+    dbus
+  ];
+
+  mesonFlags = [
+    "-Ddocs=true"
+    (lib.mesonEnable "introspection" withIntrospection)
+    (lib.mesonEnable "vapi" withIntrospection)
+    (lib.mesonBool "test_utils" withIntrospection)
+  ] ++ (
+    let
+      # https://gitlab.gnome.org/GNOME/tracker/-/blob/master/meson.build#L159
+      crossFile = writeText "cross-file.conf" ''
+        [properties]
+        sqlite3_has_fts5 = '${lib.boolToString (lib.hasInfix "-DSQLITE_ENABLE_FTS3" sqlite.NIX_CFLAGS_COMPILE)}'
+      '';
+    in
+    [
+      "--cross-file=${crossFile}"
+    ]
+  ) ++ lib.optionals (!stdenv.isLinux) [
+    "-Dsystemd_user_services=false"
+  ];
+
+  doCheck =
+    # https://gitlab.gnome.org/GNOME/tracker/-/issues/402
+    !stdenv.isDarwin
+    # https://gitlab.gnome.org/GNOME/tracker/-/issues/398
+    && !stdenv.is32bit;
+
+  postPatch = ''
+    chmod +x \
+      docs/reference/libtracker-sparql/embed-files.py \
+      docs/reference/libtracker-sparql/generate-svgs.sh
+    patchShebangs \
+      utils/data-generators/cc/generate \
+      docs/reference/libtracker-sparql/embed-files.py \
+      docs/reference/libtracker-sparql/generate-svgs.sh
+  '';
+
+  preCheck =
+    let
+      linuxDot0 = lib.optionalString stdenv.isLinux ".0";
+      darwinDot0 = lib.optionalString stdenv.isDarwin ".0";
+      extension = stdenv.hostPlatform.extensions.sharedLibrary;
+    in
+    ''
+      # (tracker-store:6194): Tracker-CRITICAL **: 09:34:07.722: Cannot initialize database: Could not open sqlite3 database:'/homeless-shelter/.cache/tracker/meta.db': unable to open database file
+      export HOME=$(mktemp -d)
+
+      # Our gobject-introspection patches make the shared library paths absolute
+      # in the GIR files. When running functional tests, the library is not yet installed,
+      # though, so we need to replace the absolute path with a local one during build.
+      # We are using a symlink that will be overridden during installation.
+      mkdir -p $out/lib
+      ln -s $PWD/src/libtracker-sparql/libtracker-sparql-3.0${darwinDot0}${extension} $out/lib/libtracker-sparql-3.0${darwinDot0}${extension}${linuxDot0}
+    '';
+
+  checkPhase = ''
+    runHook preCheck
+
+    dbus-run-session \
+      --config-file=${dbus}/share/dbus-1/session.conf \
+      meson test \
+        --timeout-multiplier 2 \
+        --print-errorlogs
+
+    runHook postCheck
+  '';
+
+  postCheck = ''
+    # Clean up out symlinks
+    rm -r $out/lib
+  '';
+
+  postFixup = ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://wiki.gnome.org/Projects/Tracker";
+    description = "Desktop-neutral user information store, search tool and indexer";
+    maintainers = teams.gnome.members;
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tre/default.nix b/nixpkgs/pkgs/development/libraries/tre/default.nix
new file mode 100644
index 000000000000..8cd0faf48673
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tre/default.nix
@@ -0,0 +1,25 @@
+{lib, stdenv, fetchurl, fetchpatch}:
+
+stdenv.mkDerivation rec {
+  pname = "tre";
+  version = "0.8.0";
+  src = fetchurl {
+    url = "https://laurikari.net/tre/${pname}-${version}.tar.gz";
+    sha256 = "1pd7qsa7vc3ybdc6h2gr4pm9inypjysf92kab945gg4qa6jp11my";
+  };
+
+  patches = [
+    (fetchpatch {
+      url = "https://sources.debian.net/data/main/t/tre/0.8.0-6/debian/patches/03-cve-2016-8859";
+      sha256 = "0navhizym6qxd4gngrsslbij8x9r3s67p1jzzhvsnq6ky49j7w3p";
+    })
+  ];
+
+  meta = {
+    description = "Lightweight and robust POSIX compliant regexp matching library";
+    homepage = "https://laurikari.net/tre/";
+    license = lib.licenses.bsd2;
+    mainProgram = "agrep";
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tremor/default.nix b/nixpkgs/pkgs/development/libraries/tremor/default.nix
new file mode 100644
index 000000000000..d17ef6c8fd7c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tremor/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitLab, autoreconfHook, pkg-config, libogg }:
+
+stdenv.mkDerivation {
+  pname = "tremor";
+  version = "unstable-2018-03-16";
+
+  src = fetchFromGitLab {
+    owner = "xiph";
+    repo = "tremor";
+    domain = "gitlab.xiph.org";
+    rev = "562307a4a7082e24553f3d2c55dab397a17c4b4f";
+    sha256 = "0m07gq4zfgigsiz8b518xyb19v7qqp76qmp7lb262825vkqzl3zq";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  propagatedBuildInputs = [ libogg ];
+
+  preConfigure = ''
+    sed -i /XIPH_PATH_OGG/d configure
+  '';
+
+  meta = {
+    homepage = "https://xiph.org/tremor/";
+    description = "Fixed-point version of the Ogg Vorbis decoder";
+    license = lib.licenses.bsd3;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/trompeloeil/default.nix b/nixpkgs/pkgs/development/libraries/trompeloeil/default.nix
new file mode 100644
index 000000000000..1a2ec33dae5f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/trompeloeil/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "trompeloeil";
+  version = "47";
+
+  src = fetchFromGitHub {
+    owner = "rollbear";
+    repo = "trompeloeil";
+    rev = "v${version}";
+    sha256 = "sha256-eVMlepthJuy9BQnR2u8PFSfuWNg8QxDOJyV5qzcztOE=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "Header only C++14 mocking framework";
+    homepage = "https://github.com/rollbear/trompeloeil";
+    license = licenses.boost;
+    maintainers = [ maintainers.bjornfor ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tsocks/default.nix b/nixpkgs/pkgs/development/libraries/tsocks/default.nix
new file mode 100644
index 000000000000..a489f679c6ce
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tsocks/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "tsocks";
+  version = "1.8beta5";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/tsocks/${pname}-${version}.tar.gz";
+    sha256 = "0ixkymiph771dcdzvssi9dr2pk1bzaw9zv85riv3xl40mzspx7c4";
+  };
+
+  patches = [ ./poll.patch ];
+
+  preConfigure = ''
+    sed -i -e "s,\\\/usr,"$(echo $out|sed -e "s,\\/,\\\\\\\/,g")",g" tsocks
+    substituteInPlace tsocks --replace /usr $out
+    export configureFlags="$configureFlags --libdir=$out/lib"
+  '';
+
+  preBuild = ''
+    # We don't need the saveme binary, it is in fact never stored and we're
+    # never injecting stuff into ld.so.preload anyway
+    sed -i \
+      -e "s,TARGETS=\(.*\)..SAVE.\(.*\),TARGETS=\1\2," \
+      -e "/SAVE/d" Makefile
+  '';
+
+  meta = with lib; {
+    description = "Transparent SOCKS v4 proxying library";
+    homepage = "https://tsocks.sourceforge.net/";
+    license = lib.licenses.gpl2;
+    maintainers = with maintainers; [ edwtjo ];
+    platforms = platforms.unix;
+    broken = stdenv.hostPlatform.isDarwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/tsocks/poll.patch b/nixpkgs/pkgs/development/libraries/tsocks/poll.patch
new file mode 100644
index 000000000000..2bfeb9f779ca
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tsocks/poll.patch
@@ -0,0 +1,26 @@
+From Ingo Hadan <ingo.hadan@sdm.de> Fri, 02 Apr 2010 21:08:50 +0200
+From: Julien Moutinho <julm+tsocks@autogeree.net>
+Date: Fri, 26 Apr 2013 01:57:26 +0200
+Subject: tsocks fails if socksified application uses poll(2) (e.g. subversion-1.5)
+
+---
+diff --git a/tsocks.c b/tsocks.c
+index 9cfdfff..470babd 100644
+--- a/tsocks.c
++++ b/tsocks.c
+@@ -657,10 +657,11 @@ int poll(POLL_SIGNATURE) {
+              * be ready for writing), otherwise we'll just let the select loop
+              * come around again (since we can't flag it for read, we don't know
+              * if there is any data to be read and can't be bothered checking) */
+-            if (conn->selectevents & WRITE) {
+-               setevents |= POLLOUT; 
++            if (conn->selectevents & POLLOUT) {
++               ufds[i].revents |= POLLOUT; 
+                nevents++;
+             }
++            ufds[i].events = conn->selectevents;
+          }
+       }
+    } while (nevents == 0);
+
+
diff --git a/nixpkgs/pkgs/development/libraries/tweeny/default.nix b/nixpkgs/pkgs/development/libraries/tweeny/default.nix
new file mode 100644
index 000000000000..257b966808d2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/tweeny/default.nix
@@ -0,0 +1,31 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "tweeny";
+  version = "3.2.0";
+
+  src = fetchFromGitHub {
+    owner = "mobius3";
+    repo = "tweeny";
+    rev = "v${finalAttrs.version}";
+    sha256 = "sha256-VmvOMK+FjYZXKH9kPUT2L7pmJMPSr5eXptCcoGWK+qo=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "A modern C++ tweening library";
+    license = licenses.mit;
+    homepage = "http://mobius3.github.io/tweeny";
+    maintainers = [ maintainers.doronbehar ];
+    platforms = with platforms; darwin ++ linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/twolame/default.nix b/nixpkgs/pkgs/development/libraries/twolame/default.nix
new file mode 100644
index 000000000000..3537dd3029b6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/twolame/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub
+, autoreconfHook, pkg-config
+, libsndfile }:
+
+stdenv.mkDerivation {
+
+  pname = "twolame";
+  version = "2017-09-27";
+
+  src = fetchFromGitHub {
+    owner = "njh";
+    repo = "twolame";
+    rev = "977c8ac55d8ca6d5f35d1d413a119dac2b3b0333";
+    sha256 = "1rq3yc8ygzdqid9zk6pixmm4w9sk2vrlx217lhn5bjaglv7iyf7x";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ libsndfile ];
+
+  doCheck = false; # fails with "../build-scripts/test-driver: line 107: -Mstrict: command not found"
+
+  meta = with lib;{
+    description = "A MP2 encoder";
+    longDescription = ''
+      TwoLAME is an optimised MPEG Audio Layer 2 (MP2) encoder based on
+      tooLAME by Mike Cheng, which in turn is based upon the ISO dist10
+      code and portions of LAME.
+    '';
+    homepage = "https://www.twolame.org/";
+    license = with licenses; [ lgpl2Plus ];
+    platforms = with platforms; unix;
+    maintainers = with maintainers; [ AndersonTorres ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ubus/default.nix b/nixpkgs/pkgs/development/libraries/ubus/default.nix
new file mode 100644
index 000000000000..2150ed7b0e82
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ubus/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, cmake, fetchgit, libubox, libjson }:
+
+stdenv.mkDerivation {
+  pname = "ubus";
+  version = "unstable-2023-12-18";
+
+  src = fetchgit {
+    url = "https://git.openwrt.org/project/ubus.git";
+    rev = "65bb027054def3b94a977229fd6ad62ddd32345b";
+    hash = "sha256-n82Ub0IiuvWbnlDCoN+0hjo/1PbplEbc56kuOYMrHxQ=";
+  };
+
+  cmakeFlags = [ "-DBUILD_LUA=OFF" ];
+  buildInputs = [ libubox libjson ];
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "OpenWrt system message/RPC bus";
+    homepage = "https://git.openwrt.org/?p=project/ubus.git;a=summary";
+    license = licenses.lgpl21Only;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ mkg20001 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ucc/default.nix b/nixpkgs/pkgs/development/libraries/ucc/default.nix
new file mode 100644
index 000000000000..68f358b3d3de
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ucc/default.nix
@@ -0,0 +1,65 @@
+{ stdenv, lib, fetchFromGitHub, libtool, automake, autoconf, ucx
+, config
+, enableCuda ? config.cudaSupport
+, cudaPackages
+, enableAvx ? stdenv.hostPlatform.avxSupport
+, enableSse41 ? stdenv.hostPlatform.sse4_1Support
+, enableSse42 ? stdenv.hostPlatform.sse4_2Support
+} :
+
+stdenv.mkDerivation rec {
+  pname = "ucc";
+  version = "1.2.0";
+
+  src = fetchFromGitHub {
+    owner = "openucx";
+    repo = "ucc";
+    rev = "v${version}";
+    sha256 = "sha256-7Mo9zU0sogGyDdWIfTgUPoR5Z8D722asC2y7sHnKbzs=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  enableParallelBuilding = true;
+
+  postPatch = ''
+
+    for comp in $(find src/components -name Makefile.am); do
+      substituteInPlace $comp \
+        --replace "/bin/bash" "${stdenv.shell}"
+    done
+  '';
+
+  nativeBuildInputs = [ libtool automake autoconf ]
+    ++ lib.optionals enableCuda [ cudaPackages.cuda_nvcc ];
+  buildInputs = [ ucx ]
+    ++ lib.optionals enableCuda [
+      cudaPackages.cuda_cccl
+      cudaPackages.cuda_cudart
+    ];
+
+
+  preConfigure = ''
+    ./autogen.sh
+  '' + lib.optionalString enableCuda ''
+    configureFlagsArray+=( "--with-nvcc-gencode=${builtins.concatStringsSep " " cudaPackages.cudaFlags.gencode}" )
+  '';
+  configureFlags = [ ]
+   ++ lib.optional enableSse41 "--with-sse41"
+   ++ lib.optional enableSse42 "--with-sse42"
+   ++ lib.optional enableAvx "--with-avx"
+   ++ lib.optional enableCuda "--with-cuda=${cudaPackages.cuda_cudart}";
+
+  postInstall = ''
+    find $out/lib/ -name "*.la" -exec rm -f \{} \;
+
+    moveToOutput bin/ucc_info $dev
+  '';
+
+  meta = with lib; {
+    description = "Collective communication operations API";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.markuskowa ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/uci/default.nix b/nixpkgs/pkgs/development/libraries/uci/default.nix
new file mode 100644
index 000000000000..43e6cb9d697d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/uci/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, cmake, fetchgit, pkg-config, libubox }:
+
+stdenv.mkDerivation {
+  pname = "uci";
+  version = "unstable-2023-08-10";
+
+  src = fetchgit {
+    url = "https://git.openwrt.org/project/uci.git";
+    rev = "5781664d5087ccc4b5ab58505883231212dbedbc";
+    hash = "sha256-8MyFaZdAMh5oMPO/5QyNT+Or57eBL3mamJLblGGoF9g=";
+  };
+
+  hardeningDisable = [ "all" ];
+  cmakeFlags = [ "-DBUILD_LUA=OFF" ];
+  buildInputs = [ libubox ];
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  meta = with lib; {
+    description = "OpenWrt Unified Configuration Interface";
+    homepage = "https://git.openwrt.org/?p=project/uci.git;a=summary";
+    license = licenses.lgpl21Only;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ mkg20001 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ucl/default.nix b/nixpkgs/pkgs/development/libraries/ucl/default.nix
new file mode 100644
index 000000000000..048f35868cda
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ucl/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "ucl";
+  version = "1.03";
+
+  src = fetchurl {
+    url = "https://www.oberhumer.com/opensource/ucl/download/ucl-${version}.tar.gz";
+    sha256 = "b865299ffd45d73412293369c9754b07637680e5c826915f097577cd27350348";
+  };
+
+  # needed to successfully compile with gcc 6
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-std=c90";
+
+  meta = {
+    homepage = "http://www.oberhumer.com/opensource/ucl/";
+    description = "Portable lossless data compression library";
+    license = lib.licenses.gpl2;
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/uclient/default.nix b/nixpkgs/pkgs/development/libraries/uclient/default.nix
new file mode 100644
index 000000000000..63a31c2bfbe9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/uclient/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, lib, fetchgit, cmake, pkg-config, libubox }:
+
+stdenv.mkDerivation {
+  pname = "uclient";
+  version = "unstable-2023-04-13";
+
+  src = fetchgit {
+    url = "https://git.openwrt.org/project/uclient.git";
+    rev = "007d945467499f43656b141171d31f5643b83a6c";
+    hash = "sha256-A47dyVc2MtOL6aImZ0b3SMWH2vzjfAXzRAOF4nfH6S0=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buidInputs = [ libubox ];
+
+  preConfigure = ''
+    sed -e 's|ubox_include_dir libubox/ustream-ssl.h|ubox_include_dir libubox/ustream-ssl.h HINTS ${libubox}/include|g' \
+        -e 's|ubox_library NAMES ubox|ubox_library NAMES ubox HINTS ${libubox}/lib|g' \
+        -i CMakeLists.txt
+  '';
+
+  meta = with lib; {
+    description = "Tiny OpenWrt fork of libnl";
+    homepage = "https://git.openwrt.org/?p=project/uclient.git;a=summary";
+    license = licenses.isc;
+    maintainers = with maintainers; [ mkg20001 ];
+    mainProgram = "uclient-fetch";
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ucommon/default.nix b/nixpkgs/pkgs/development/libraries/ucommon/default.nix
new file mode 100644
index 000000000000..09e6e2d6a03c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ucommon/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchurl, pkg-config
+, gnutls
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ucommon";
+  version = "7.0.0";
+
+  src = fetchurl {
+    url = "mirror://gnu/commoncpp/${pname}-${version}.tar.gz";
+    sha256 = "6ac9f76c2af010f97e916e4bae1cece341dc64ca28e3881ff4ddc3bc334060d7";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  # use C++14 Standard until error handling code gets updated upstream
+  CXXFLAGS = [ "-std=c++14" ];
+
+  # disable flaky networking test
+  postPatch = ''
+    substituteInPlace test/stream.cpp \
+      --replace 'ifndef UCOMMON_SYSRUNTIME' 'if 0'
+  '';
+
+  # ucommon.pc has link time depdendencies on -lusecure -lucommon -lgnutls
+  propagatedBuildInputs = [ gnutls ];
+
+  doCheck = true;
+
+  meta = {
+    description = "C++ library to facilitate using C++ design patterns";
+    homepage = "https://www.gnu.org/software/commoncpp/";
+    license = lib.licenses.lgpl3Plus;
+    maintainers = with lib.maintainers; [ ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ucx/default.nix b/nixpkgs/pkgs/development/libraries/ucx/default.nix
new file mode 100644
index 000000000000..3b923d8efdd2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ucx/default.nix
@@ -0,0 +1,86 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, doxygen, numactl
+, rdma-core, libbfd, libiberty, perl, zlib, symlinkJoin, pkg-config
+, config
+, enableCuda ? config.cudaSupport
+, cudaPackages
+, enableRocm ? config.rocmSupport
+, rocmPackages
+}:
+
+let
+  rocmList = with rocmPackages; [ rocm-core rocm-runtime rocm-device-libs clr ];
+
+  rocm = symlinkJoin {
+    name = "rocm";
+    paths = rocmList;
+  };
+
+in
+stdenv.mkDerivation rec {
+  pname = "ucx";
+  version = "1.15.0";
+
+  src = fetchFromGitHub {
+    owner = "openucx";
+    repo = "ucx";
+    rev = "v${version}";
+    sha256 = "sha256-VxIxrk9qKM6Ncfczl4p2EhXiLNgPaYTmjhqi6/w2ZNY=";
+  };
+
+  outputs = [ "out" "doc" "dev" ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+    doxygen
+    pkg-config
+  ]
+  ++ lib.optionals enableCuda [
+    cudaPackages.cuda_nvcc
+    cudaPackages.autoAddOpenGLRunpathHook
+  ];
+
+  buildInputs = [
+    libbfd
+    libiberty
+    numactl
+    perl
+    rdma-core
+    zlib
+  ] ++ lib.optionals enableCuda [
+    cudaPackages.cuda_cudart
+    cudaPackages.cuda_nvml_dev
+
+  ] ++ lib.optionals enableRocm rocmList;
+
+  LDFLAGS = lib.optionals enableCuda [
+    # Fake libnvidia-ml.so (the real one is deployed impurely)
+    "-L${cudaPackages.cuda_nvml_dev}/lib/stubs"
+  ];
+
+  configureFlags = [
+    "--with-rdmacm=${lib.getDev rdma-core}"
+    "--with-dc"
+    "--with-rc"
+    "--with-dm"
+    "--with-verbs=${lib.getDev rdma-core}"
+  ] ++ lib.optionals enableCuda [ "--with-cuda=${cudaPackages.cuda_cudart}" ]
+  ++ lib.optional enableRocm "--with-rocm=${rocm}";
+
+  postInstall = ''
+    find $out/lib/ -name "*.la" -exec rm -f \{} \;
+
+    moveToOutput bin/ucx_info $dev
+
+    moveToOutput share/ucx/examples $doc
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Unified Communication X library";
+    homepage = "https://www.openucx.org";
+    license = licenses.bsd3;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.markuskowa ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/udns/default.nix b/nixpkgs/pkgs/development/libraries/udns/default.nix
new file mode 100644
index 000000000000..518ed432b723
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/udns/default.nix
@@ -0,0 +1,56 @@
+{ lib, stdenv, fetchurl }:
+
+# this expression is mostly based on debian's packaging
+# https://tracker.debian.org/media/packages/u/udns/rules-0.4-1
+
+stdenv.mkDerivation rec {
+  pname = "udns";
+  version = "0.4";
+
+  configurePhase = "./configure --enable-ipv6";
+
+  buildPhase = "make staticlib sharedlib rblcheck_s dnsget_s";
+
+  src = fetchurl {
+    url = "http://www.corpit.ru/mjt/udns/${pname}-${version}.tar.gz";
+    sha256 = "0447fv1hmb44nnchdn6p5pd9b44x8p5jn0ahw6crwbqsg7f0hl8i";
+  };
+
+  # udns uses a very custom build and hardcodes a .so name in a few places.
+  # Instead of fighting with it to apply the standard dylib script, change
+  # the right place in the Makefile itself.
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace Makefile.in \
+      --replace --soname, -install_name,$out/lib/
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/bin
+    mkdir -p $out/include
+    mkdir -p $out/lib
+    mkdir -p $out/share/man/man1
+    mkdir -p $out/share/man/man3
+    cp dnsget_s $out/bin/dnsget
+    cp rblcheck_s $out/bin/rblcheck
+    cp udns.h $out/include/
+    cp libudns.a $out/lib/
+    cp libudns.so.0 $out/lib/
+    ln -rs $out/lib/libudns.so.0 $out/lib/libudns.so
+    cp dnsget.1 rblcheck.1 $out/share/man/man1
+    cp udns.3 $out/share/man/man3
+    runHook postInstall
+  '';
+
+  # keep man3
+  outputDevdoc = "out";
+
+  meta = with lib; {
+    homepage = "http://www.corpit.ru/mjt/udns.html";
+    description = "Async-capable DNS stub resolver library";
+    license = licenses.lgpl21Plus;
+    maintainers = [ maintainers.womfoo ];
+    platforms = platforms.unix;
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/libraries/udunits/default.nix b/nixpkgs/pkgs/development/libraries/udunits/default.nix
new file mode 100644
index 000000000000..17efccce82a9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/udunits/default.nix
@@ -0,0 +1,50 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, bison
+, expat
+, file
+, flex
+, texinfo
+}:
+
+stdenv.mkDerivation rec {
+  pname = "udunits";
+  version = "unstable-2021-03-17";
+
+  src = fetchFromGitHub {
+    owner = "Unidata";
+    repo = "UDUNITS-2";
+    rev = "c83da987387db1174cd2266b73dd5dd556f4476b";
+    hash = "sha256-+HW21+r65OroCxMK2/B5fe7zHs4hD4xyoJK2bhdJGyQ=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    texinfo
+    bison
+    flex
+    file
+  ];
+  buildInputs = [
+    expat
+  ];
+
+  meta = with lib; {
+    homepage = "https://www.unidata.ucar.edu/software/udunits/";
+    description = "A C-based package for the programatic handling of units of physical quantities";
+    longDescription = ''
+      The UDUNITS package supports units of physical quantities. Its C library
+      provides for arithmetic manipulation of units and for conversion of
+      numeric values between compatible units. The package contains an extensive
+      unit database, which is in XML format and user-extendable. The package
+      also contains a command-line utility for investigating units and
+      converting values.
+    '';
+    license = licenses.asl20;
+    maintainers = with maintainers; [ AndersonTorres pSub ];
+    platforms = platforms.all;
+    mainProgram = "udunits2";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/uhttpmock/default.nix b/nixpkgs/pkgs/development/libraries/uhttpmock/default.nix
new file mode 100644
index 000000000000..d22ff81c2530
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/uhttpmock/default.nix
@@ -0,0 +1,55 @@
+{ stdenv
+, lib
+, fetchFromGitLab
+, meson
+, mesonEmulatorHook
+, ninja
+, pkg-config
+, gobject-introspection
+, vala
+, gtk-doc
+, docbook-xsl-nons
+, glib
+, libsoup
+}:
+
+stdenv.mkDerivation rec {
+  pname = "uhttpmock";
+  version = "0.5.5";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "pwithnall";
+    repo = "uhttpmock";
+    rev = version;
+    sha256 = "NuxiVVowZ8ilP9rcgapCe9OzFCpoOfZxZiSyjTeOrts=";
+  };
+
+  strictDeps = true;
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gobject-introspection
+    vala
+    gtk-doc
+    docbook-xsl-nons
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
+  ];
+
+  buildInputs = [
+    glib
+    libsoup
+  ];
+
+  meta = with lib; {
+    description = "Project for mocking web service APIs which use HTTP or HTTPS";
+    homepage = "https://gitlab.freedesktop.org/pwithnall/uhttpmock/";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/uid_wrapper/default.nix b/nixpkgs/pkgs/development/libraries/uid_wrapper/default.nix
new file mode 100644
index 000000000000..61f7242b5d8c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/uid_wrapper/default.nix
@@ -0,0 +1,20 @@
+{ lib, stdenv, fetchurl, cmake, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "uid_wrapper";
+  version = "1.3.0";
+
+  src = fetchurl {
+    url = "mirror://samba/cwrap/uid_wrapper-${version}.tar.gz";
+    sha256 = "sha256-9+fBveUzUwBRkxQUckRT4U4CrbthSCS2/ifLuYZUt2I=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  meta = with lib; {
+    description = "A wrapper for the user, group and hosts NSS API";
+    homepage = "https://git.samba.org/?p=uid_wrapper.git;a=summary;";
+    license = licenses.bsd3;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/umockdev/default.nix b/nixpkgs/pkgs/development/libraries/umockdev/default.nix
new file mode 100644
index 000000000000..9c3026b0c9fb
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/umockdev/default.nix
@@ -0,0 +1,126 @@
+{ stdenv
+, lib
+, docbook-xsl-nons
+, fetchurl
+, fetchpatch
+, glib
+, gobject-introspection
+, gtk-doc
+, libgudev
+, libpcap
+, meson
+, mesonEmulatorHook
+, ninja
+, pkg-config
+, python3
+, substituteAll
+, systemdMinimal
+, usbutils
+, vala
+, which
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "umockdev";
+  version = "0.17.18";
+
+  outputs = [ "bin" "out" "dev" "devdoc" ];
+
+  src = fetchurl {
+    url = "https://github.com/martinpitt/umockdev/releases/download/${finalAttrs.version}/umockdev-${finalAttrs.version}.tar.xz";
+    sha256 = "sha256-RmrT4McV5W9Q6mqWUWWCPQc6hBN6y4oeObZlc2SKmF8=";
+  };
+
+  patches = [
+    # Hardcode absolute paths to libraries so that consumers
+    # do not need to set LD_LIBRARY_PATH themselves.
+    ./hardcode-paths.patch
+
+    # Replace references to udevadm with an absolute paths, so programs using
+    # umockdev will just work without having to provide it in their test environment
+    # $PATH.
+    (substituteAll {
+      src = ./substitute-udevadm.patch;
+      udevadm = "${systemdMinimal}/bin/udevadm";
+    })
+
+    (fetchpatch {
+      name = "musl.patch";
+      url = "https://github.com/martinpitt/umockdev/commit/d4efe24be59bd859b87473ea3d7efe8100bedc74.patch";
+      hash = "sha256-whf3p2e7FWN1xk5+HF9KsbMW74DPOQ0R0+FxBfCZTX0=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    docbook-xsl-nons
+    gobject-introspection
+    gtk-doc
+    meson
+    ninja
+    pkg-config
+    vala
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
+  ];
+
+  buildInputs = [
+    glib
+    systemdMinimal
+    libpcap
+  ];
+
+  checkInputs = lib.optionals finalAttrs.passthru.withGudev [
+    libgudev
+  ];
+
+  nativeCheckInputs = [
+    python3
+    usbutils
+    which
+  ];
+
+  strictDeps = true;
+
+  mesonFlags = [
+    "-Dgtk_doc=true"
+  ];
+
+  doCheck = true;
+
+  postPatch = ''
+    # Substitute the path to this derivation in the patch we apply.
+    substituteInPlace src/umockdev-wrapper \
+      --subst-var-by 'LIBDIR' "''${!outputLib}/lib"
+  '';
+
+  preCheck = ''
+    # Our patch makes the path to the `LD_PRELOAD`ed library absolute.
+    # When running tests, the library is not yet installed, though,
+    # so we need to replace the absolute path with a local one during build.
+    # We are using a symlink that will be overridden during installation.
+    mkdir -p "$out/lib"
+    ln -s "$PWD/libumockdev-preload.so.0" "$out/lib/libumockdev-preload.so.0"
+  '';
+
+  passthru = {
+    # libgudev is needed for an optional test but it itself relies on umockdev for testing.
+    withGudev = false;
+
+    tests = {
+      withGudev = finalAttrs.finalPackage.overrideAttrs (attrs: {
+        passthru = attrs.passthru // {
+          withGudev = true;
+        };
+      });
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://github.com/martinpitt/umockdev";
+    changelog = "https://github.com/martinpitt/umockdev/releases/tag/${finalAttrs.version}";
+    description = "Mock hardware devices for creating unit tests";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ flokli ];
+    platforms = with platforms; linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/umockdev/hardcode-paths.patch b/nixpkgs/pkgs/development/libraries/umockdev/hardcode-paths.patch
new file mode 100644
index 000000000000..75a5c014a996
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/umockdev/hardcode-paths.patch
@@ -0,0 +1,69 @@
+diff --git a/meson.build b/meson.build
+index 15d9e5d..a1906dd 100644
+--- a/meson.build
++++ b/meson.build
+@@ -44,6 +44,7 @@ g_ir_compiler = find_program('g-ir-compiler', required: false)
+ 
+ conf.set('PACKAGE_NAME', meson.project_name())
+ conf.set_quoted('VERSION', meson.project_version())
++conf.set_quoted('LIBDIR', get_option('prefix') / get_option('libdir'))
+ 
+ # glibc versions somewhere between 2.28 and 2.34
+ if cc.has_function('__fxstatat', prefix: '#include <sys/stat.h>')
+@@ -156,7 +157,7 @@ hacked_gir = custom_target('UMockdev-1.0 hacked gir',
+ 
+ if g_ir_compiler.found()
+ umockdev_typelib = custom_target('UMockdev-1.0 typelib',
+-  command: [g_ir_compiler, '--output', '@OUTPUT@', '-l', 'libumockdev.so.0', '@INPUT@'],
++  command: [g_ir_compiler, '--output', '@OUTPUT@', '-l', get_option('prefix') / get_option('libdir') / 'libumockdev.so.0', '@INPUT@'],
+   input: hacked_gir,
+   output: 'UMockdev-1.0.typelib',
+   install: true,
+diff --git a/src/config.vapi b/src/config.vapi
+index 5269dd0..a2ec46d 100644
+--- a/src/config.vapi
++++ b/src/config.vapi
+@@ -2,5 +2,6 @@
+ namespace Config {
+     public const string PACKAGE_NAME;
+     public const string VERSION;
++    public const string LIBDIR;
+ }
+ 
+diff --git a/src/umockdev-record.vala b/src/umockdev-record.vala
+index bf0e644..ff5ea59 100644
+--- a/src/umockdev-record.vala
++++ b/src/umockdev-record.vala
+@@ -444,7 +444,7 @@ main (string[] args)
+         preload = "";
+     else
+         preload = preload + ":";
+-    checked_setenv("LD_PRELOAD", preload + "libumockdev-preload.so.0");
++    checked_setenv("LD_PRELOAD", preload + Config.LIBDIR + "/libumockdev-preload.so.0");
+ 
+     try {
+         root_dir = DirUtils.make_tmp("umockdev.XXXXXX");
+diff --git a/src/umockdev-run.vala b/src/umockdev-run.vala
+index 7b0753e..66b778b 100644
+--- a/src/umockdev-run.vala
++++ b/src/umockdev-run.vala
+@@ -95,7 +95,7 @@ main (string[] args)
+         preload = "";
+     else
+         preload = preload + ":";
+-    checked_setenv ("LD_PRELOAD", preload + "libumockdev-preload.so.0");
++    checked_setenv ("LD_PRELOAD", preload + Config.LIBDIR + "/libumockdev-preload.so.0");
+ 
+     var testbed = new UMockdev.Testbed ();
+ 
+diff --git a/src/umockdev-wrapper b/src/umockdev-wrapper
+index 6ce4dcd..706c49a 100755
+--- a/src/umockdev-wrapper
++++ b/src/umockdev-wrapper
+@@ -1,5 +1,5 @@
+ #!/bin/sh
+ # Wrapper program to preload the libumockdev library, so that test programs can
+ # set $UMOCKDEV_DIR for redirecting sysfs and other queries to a test bed.
+-exec env LD_PRELOAD=libumockdev-preload.so.0:$LD_PRELOAD "$@"
++exec env LD_PRELOAD=@LIBDIR@/libumockdev-preload.so.0:$LD_PRELOAD "$@"
+ 
diff --git a/nixpkgs/pkgs/development/libraries/umockdev/substitute-udevadm.patch b/nixpkgs/pkgs/development/libraries/umockdev/substitute-udevadm.patch
new file mode 100644
index 000000000000..b09d151018e5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/umockdev/substitute-udevadm.patch
@@ -0,0 +1,41 @@
+From 09efbe8090f501c60975d5467fb587ed633d6a01 Mon Sep 17 00:00:00 2001
+From: Florian Klink <flokli@flokli.de>
+Date: Wed, 24 Jan 2024 14:29:28 +0200
+Subject: [PATCH] substitute udevadm
+
+---
+ src/umockdev-record.vala     | 2 +-
+ tests/test-umockdev-run.vala | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/umockdev-record.vala b/src/umockdev-record.vala
+index 2d49bc8..272f25e 100644
+--- a/src/umockdev-record.vala
++++ b/src/umockdev-record.vala
+@@ -223,7 +223,7 @@ record_device(string dev)
+     int exitcode;
+     try {
+         Process.spawn_sync(null,
+-                           {"udevadm", "info", "--query=all", "--path", dev},
++                           {"@udevadm@", "info", "--query=all", "--path", dev},
+                            null,
+                            SpawnFlags.SEARCH_PATH,
+                            null,
+diff --git a/tests/test-umockdev-run.vala b/tests/test-umockdev-run.vala
+index cd00a08..94616cb 100644
+--- a/tests/test-umockdev-run.vala
++++ b/tests/test-umockdev-run.vala
+@@ -199,8 +199,8 @@ A: size=1048576\n
+ 
+     // unfortunately the udevadm output between distros is not entirely constant
+     assert (get_program_out (
+-            "udevadm",
+-            umockdev_run_command + "-d " + umockdev_file + " -- udevadm info --query=all --name=/dev/loop23",
++            "@udevadm@",
++            umockdev_run_command + "-d " + umockdev_file + " -- @udevadm@ info --query=all --name=/dev/loop23",
+             out sout, out serr, out exit));
+ 
+     assert_cmpstr (serr, CompareOperator.EQ, "");
+-- 
+2.43.0
+
diff --git a/nixpkgs/pkgs/development/libraries/unibilium/default.nix b/nixpkgs/pkgs/development/libraries/unibilium/default.nix
new file mode 100644
index 000000000000..332b2deddf78
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/unibilium/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, lib, fetchFromGitHub, libtool, pkg-config, perl, ncurses }:
+
+stdenv.mkDerivation rec {
+  pname = "unibilium";
+  version = "2.1.1";
+
+  src = fetchFromGitHub {
+    owner = "neovim";
+    repo = "unibilium";
+    rev = "v${version}";
+    sha256 = "sha256-A/WECvma7u/Mmecvzi0cP168dt4v+zwC8CiFBkqWezA=";
+  };
+
+  makeFlags = [ "PREFIX=$(out)" "LIBTOOL=${libtool}/bin/libtool" ];
+
+  strictDeps = true;
+
+  nativeBuildInputs = [ pkg-config perl libtool ];
+  buildInputs = [ ncurses ];
+
+  meta = with lib; {
+    description = "A very basic terminfo library";
+    license = licenses.lgpl3Plus;
+    platforms = platforms.linux ++ platforms.darwin;
+    maintainers = with maintainers; [ pSub ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/unicap/default.nix b/nixpkgs/pkgs/development/libraries/unicap/default.nix
new file mode 100644
index 000000000000..f26365fa8e63
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/unicap/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchurl, libusb-compat-0_1, libraw1394, dcraw, intltool, perl, v4l-utils }:
+
+stdenv.mkDerivation rec {
+  pname = "libunicap";
+  version="0.9.12";
+
+  src = fetchurl {
+    url = "https://www.unicap-imaging.org/downloads/${pname}-${version}.tar.gz";
+    sha256 = "05zcnnm4dfc6idihfi0fq5xka6x86zi89wip2ca19yz768sd33s9";
+  };
+
+  nativeBuildInputs = [ intltool ];
+  buildInputs = [ libusb-compat-0_1 libraw1394 dcraw perl v4l-utils ];
+
+  patches = [
+    # Debian has a patch that fixes the build.
+    (fetchurl {
+      url = "https://sources.debian.net/data/main/u/unicap/0.9.12-2/debian/patches/1009_v4l1.patch";
+      sha256 = "1lgypmhdj681m7d1nmzgvh19cz8agj2f31wlnfib0ha8i3g5hg5w";
+    })
+  ];
+
+  postPatch = ''
+    find . -type f -exec sed -e '/linux\/types\.h/d' -i '{}' ';'
+    sed -e 's@/etc/udev@'"$out"'/&@' -i data/Makefile.*
+  '';
+
+  meta = with lib; {
+    description = "Universal video capture API";
+    homepage = "http://www.unicap-imaging.org/";
+    maintainers = [ maintainers.raskin ];
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/unicorn/default.nix b/nixpkgs/pkgs/development/libraries/unicorn/default.nix
new file mode 100644
index 000000000000..b6a91a7367a4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/unicorn/default.nix
@@ -0,0 +1,49 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, pkg-config
+, cmake
+, IOKit
+, cctools
+}:
+
+stdenv.mkDerivation rec {
+  pname = "unicorn";
+  version = "2.0.1.post1";
+
+  src = fetchFromGitHub {
+    owner = "unicorn-engine";
+    repo = pname;
+    rev = version;
+    hash = "sha256-Jz5C35rwnDz0CXcfcvWjkwScGNQO1uijF7JrtZhM7mI=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ] ++ lib.optionals stdenv.isDarwin [
+    cctools
+  ];
+
+  buildInputs = lib.optionals stdenv.isDarwin [
+    IOKit
+  ];
+
+  # Ensure the linker is using atomic when compiling for RISC-V, otherwise fails
+  NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isRiscV "-latomic";
+
+  cmakeFlags = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
+    # Some x86 tests are interrupted by signal 10
+    "-DCMAKE_CTEST_ARGUMENTS=--exclude-regex;test_x86"
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Lightweight multi-platform CPU emulator library";
+    homepage = "https://www.unicorn-engine.org";
+    license = licenses.gpl2Only;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ thoughtpolice luc65r ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/unittest-cpp/default.nix b/nixpkgs/pkgs/development/libraries/unittest-cpp/default.nix
new file mode 100644
index 000000000000..6a6407eb32ff
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/unittest-cpp/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "unittest-cpp";
+  version = "2.0.0";
+
+  src = fetchFromGitHub {
+    owner = "unittest-cpp";
+    repo = "unittest-cpp";
+    rev = "v${version}";
+    sha256 = "0sxb3835nly1jxn071f59fwbdzmqi74j040r81fanxyw3s1azw0i";
+  };
+
+  patches = [
+    # GCC12 Patch
+    (fetchpatch {
+      url = "https://github.com/unittest-cpp/unittest-cpp/pull/185/commits/f361c2a1034c02ba8059648f9a04662d6e2b5553.patch";
+      hash = "sha256-xyhV2VBelw/uktUXSZ3JBxgG+8/Mout/JiXEZVV2+2Y=";
+    })
+  ];
+
+  # Fix 'Version:' setting in .pc file. TODO: remove once upstreamed:
+  #     https://github.com/unittest-cpp/unittest-cpp/pull/188
+  cmakeFlags = [ "-DPACKAGE_VERSION=${version}" ];
+
+  nativeBuildInputs = [ cmake ];
+
+  doCheck = false;
+
+  meta = {
+    homepage = "https://github.com/unittest-cpp/unittest-cpp";
+    description = "Lightweight unit testing framework for C++";
+    license = lib.licenses.mit;
+    maintainers = [];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/unixODBC/default.nix b/nixpkgs/pkgs/development/libraries/unixODBC/default.nix
new file mode 100644
index 000000000000..8587ad6d2c3c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/unixODBC/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "unixODBC";
+  version = "2.3.12";
+
+  src = fetchurl {
+    urls = [
+      "ftp://ftp.unixodbc.org/pub/unixODBC/${pname}-${version}.tar.gz"
+      "https://www.unixodbc.org/${pname}-${version}.tar.gz"
+    ];
+    sha256 = "sha256-8hBQFEXOIb9ge6Ue+MEl4Q4i3/3/7Dd2RkYt9fAZFew=";
+  };
+
+  configureFlags = [ "--disable-gui" "--sysconfdir=/etc" ];
+
+  meta = with lib; {
+    description = "ODBC driver manager for Unix";
+    homepage = "https://www.unixodbc.org/";
+    license = licenses.lgpl2;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/unixODBCDrivers/default.nix b/nixpkgs/pkgs/development/libraries/unixODBCDrivers/default.nix
new file mode 100644
index 000000000000..d1b52fc5694c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/unixODBCDrivers/default.nix
@@ -0,0 +1,338 @@
+{ fetchurl, stdenv, unixODBC, cmake, postgresql, mariadb, sqlite, zlib, libxml2, dpkg, lib, openssl, libkrb5, libuuid, patchelf, libiconv, fixDarwinDylibNames, fetchFromGitHub }:
+
+# Each of these ODBC drivers can be configured in your odbcinst.ini file using
+# the various passthru and meta values. Of note are:
+#
+#   * `passthru.fancyName`, the typical name used to reference the driver
+#   * `passthru.driver`, the path to the driver within the built package
+#   * `meta.description`, a short description of the ODBC driver
+#
+# For example, you might generate it as follows:
+#
+# ''
+# [${package.fancyName}]
+# Description = ${package.meta.description}
+# Driver = ${package}/${package.driver}
+# ''
+
+{
+  psql = stdenv.mkDerivation rec {
+    pname = "psqlodbc";
+    version = "10.01.0000";
+
+    src = fetchurl {
+      url = "mirror://postgresql/odbc/versions/src/${pname}-${version}.tar.gz";
+      sha256 = "1cyams7157f3gry86x64xrplqi2vyqrq3rqka59gv4lb4rpl7jl7";
+    };
+
+    buildInputs = [ unixODBC postgresql ];
+
+    # see the top of the file for an explanation
+    passthru = {
+      fancyName = "PostgreSQL";
+      driver = "lib/psqlodbcw.so";
+    };
+
+    meta = with lib; {
+      description = "Official PostgreSQL ODBC Driver";
+      homepage = "https://odbc.postgresql.org/";
+      license = licenses.lgpl2;
+      platforms = platforms.unix;
+    };
+  };
+
+  mariadb = stdenv.mkDerivation rec {
+    pname = "mariadb-connector-odbc";
+    version = "3.1.14";
+
+    src = fetchFromGitHub {
+      owner = "mariadb-corporation";
+      repo = "mariadb-connector-odbc";
+      rev = version;
+      sha256 = "0wvy6m9qfvjii3kanf2d1rhfaww32kg0d7m57643f79qb05gd6vg";
+      # this driver only seems to build correctly when built against the mariadb-connect-c subrepo
+      # (see https://github.com/NixOS/nixpkgs/issues/73258)
+      fetchSubmodules = true;
+    };
+
+    patches = [
+      # Fix `call to undeclared function 'sleep'` with clang 16
+      ./mariadb-connector-odbc-unistd.patch
+    ];
+
+    nativeBuildInputs = [ cmake ];
+    buildInputs = [ unixODBC openssl libiconv zlib ]
+      ++ lib.optionals stdenv.isDarwin [ libkrb5 ];
+
+    preConfigure = ''
+      # we don't want to build a .pkg
+      substituteInPlace CMakeLists.txt \
+        --replace "IF(APPLE)" "IF(0)" \
+        --replace "CMAKE_SYSTEM_NAME MATCHES AIX" "APPLE"
+    '';
+
+    cmakeFlags = [
+      "-DWITH_EXTERNAL_ZLIB=ON"
+      "-DODBC_LIB_DIR=${lib.getLib unixODBC}/lib"
+      "-DODBC_INCLUDE_DIR=${lib.getDev unixODBC}/include"
+      "-DWITH_OPENSSL=ON"
+      # on darwin this defaults to ON but we want to build against unixODBC
+      "-DWITH_IODBC=OFF"
+    ];
+
+    # see the top of the file for an explanation
+    passthru = {
+      fancyName = "MariaDB";
+      driver = "lib/libmaodbc${stdenv.hostPlatform.extensions.sharedLibrary}";
+    };
+
+    meta = with lib; {
+      description = "MariaDB ODBC database driver";
+      homepage = "https://downloads.mariadb.org/connector-odbc/";
+      license = licenses.gpl2;
+      platforms = platforms.linux ++ platforms.darwin;
+    };
+  };
+
+  mysql = stdenv.mkDerivation rec {
+    pname = "mysql-connector-odbc";
+    majorVersion = "5.3";
+    version = "${majorVersion}.6";
+
+    src = fetchurl {
+      url = "https://dev.mysql.com/get/Downloads/Connector-ODBC/${majorVersion}/${pname}-${version}-src.tar.gz";
+      sha256 = "1smi4z49i4zm7cmykjkwlxxzqvn7myngsw5bc35z6gqxmi8c55xr";
+    };
+
+    nativeBuildInputs = [ cmake ];
+    buildInputs = [ unixODBC mariadb ];
+
+    cmakeFlags = [ "-DWITH_UNIXODBC=1" ];
+
+    # see the top of the file for an explanation
+    passthru = {
+      fancyName = "MySQL";
+      driver = "lib/libmyodbc3-3.51.12.so";
+    };
+
+    meta = with lib; {
+      description = "MySQL ODBC database driver";
+      homepage = "https://dev.mysql.com/downloads/connector/odbc/";
+      license = licenses.gpl2;
+      platforms = platforms.linux;
+      broken = true;
+    };
+  };
+
+  sqlite = stdenv.mkDerivation rec {
+    pname = "sqlite-connector-odbc";
+    version = "0.9993";
+
+    src = fetchurl {
+      url = "http://www.ch-werner.de/sqliteodbc/sqliteodbc-${version}.tar.gz";
+      sha256 = "0dgsj28sc7f7aprmdd0n5a1rmcx6pv7170c8dfjl0x1qsjxim6hs";
+    };
+
+    buildInputs = [ unixODBC sqlite zlib libxml2 ];
+
+    configureFlags = [ "--with-odbc=${unixODBC}" "--with-sqlite3=${sqlite.dev}" ];
+
+    installTargets = [ "install-3" ];
+
+    # move libraries to $out/lib where they're expected to be
+    postInstall = ''
+      mkdir -p "$out/lib"
+      mv "$out"/*.* "$out/lib"
+    '';
+
+    # see the top of the file for an explanation
+    passthru = {
+      fancyName = "SQLite";
+      driver = "lib/libsqlite3odbc.so";
+    };
+
+    meta = with lib; {
+      description = "ODBC driver for SQLite";
+      homepage = "http://www.ch-werner.de/sqliteodbc";
+      license = licenses.bsd2;
+      platforms = platforms.unix;
+      maintainers = with maintainers; [ vlstill ];
+    };
+  };
+
+  msodbcsql17 = stdenv.mkDerivation rec {
+    pname = "msodbcsql17";
+    version = "${versionMajor}.${versionMinor}.${versionAdditional}-1";
+
+    versionMajor = "17";
+    versionMinor = "7";
+    versionAdditional = "1.1";
+
+    src = fetchurl {
+      url = "https://packages.microsoft.com/debian/10/prod/pool/main/m/msodbcsql17/msodbcsql${versionMajor}_${version}_amd64.deb";
+      sha256 = "0vwirnp56jibm3qf0kmi4jnz1w7xfhnsfr8imr0c9hg6av4sk3a6";
+    };
+
+    nativeBuildInputs = [ dpkg patchelf ];
+
+    unpackPhase = "dpkg -x $src ./";
+    buildPhase = "";
+
+    installPhase = ''
+      mkdir -p $out
+      mkdir -p $out/lib
+      cp -r opt/microsoft/msodbcsql${versionMajor}/lib64 opt/microsoft/msodbcsql${versionMajor}/share $out/
+    '';
+
+    postFixup = ''
+      patchelf --set-rpath ${lib.makeLibraryPath [ unixODBC openssl libkrb5 libuuid stdenv.cc.cc ]} \
+        $out/lib/libmsodbcsql-${versionMajor}.${versionMinor}.so.${versionAdditional}
+    '';
+
+    # see the top of the file for an explanation
+    passthru = {
+      fancyName = "ODBC Driver ${versionMajor} for SQL Server";
+      driver = "lib/libmsodbcsql-${versionMajor}.${versionMinor}.so.${versionAdditional}";
+    };
+
+    meta = with lib; {
+      broken = stdenv.isDarwin;
+      description = "ODBC Driver ${versionMajor} for SQL Server";
+      homepage = "https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-2017";
+      sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+      license = licenses.unfree;
+      platforms = platforms.linux;
+      maintainers = with maintainers; [ spencerjanssen ];
+    };
+  };
+
+  msodbcsql18 = stdenv.mkDerivation(finalAttrs: {
+    pname = "msodbcsql${finalAttrs.versionMajor}";
+    version = "${finalAttrs.versionMajor}.${finalAttrs.versionMinor}.${finalAttrs.versionAdditional}${finalAttrs.versionSuffix}";
+
+    versionMajor = "18";
+    versionMinor = "1";
+    versionAdditional = "1.1";
+    versionSuffix = lib.optionalString stdenv.isLinux "-1";
+
+    src = fetchurl {
+      url = {
+        x86_64-linux = "https://packages.microsoft.com/debian/11/prod/pool/main/m/${finalAttrs.pname}/${finalAttrs.pname}_${finalAttrs.version}_amd64.deb";
+        aarch64-linux = "https://packages.microsoft.com/debian/11/prod/pool/main/m/${finalAttrs.pname}/${finalAttrs.pname}_${finalAttrs.version}_arm64.deb";
+        x86_64-darwin = "https://download.microsoft.com/download/6/4/0/64006503-51e3-44f0-a6cd-a9b757d0d61b/${finalAttrs.pname}-${finalAttrs.version}-amd64.tar.gz";
+        aarch64-darwin = "https://download.microsoft.com/download/6/4/0/64006503-51e3-44f0-a6cd-a9b757d0d61b/${finalAttrs.pname}-${finalAttrs.version}-arm64.tar.gz";
+      }.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}");
+      hash = {
+        x86_64-linux = "sha256:1f0rmh1aynf1sqmjclbsyh2wz5jby0fixrwz71zp6impxpwvil52";
+        aarch64-linux = "sha256:0zphnbvkqdbkcv6lvv63p7pyl68h5bs2dy6vv44wm6bi89svms4a";
+        x86_64-darwin = "sha256:1fn80byn1yihflznxcm9cpj42mpllnz54apnk9n46vzm2ng2lj6d";
+        aarch64-darwin = "sha256:116xl8r2apr5b48jnq6myj9fwqs88yccw5176yfyzh4534fznj5x";
+      }.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}");
+    };
+
+    nativeBuildInputs =
+      if stdenv.isDarwin
+      then
+        [
+          # Fix up the names encoded into the dylib, and make them absolute.
+          fixDarwinDylibNames
+        ]
+      else
+        [
+          dpkg
+          patchelf
+        ];
+
+    unpackPhase = lib.optionalString stdenv.isLinux ''
+      dpkg -x $src ./
+    '';
+
+    installPhase =
+      if stdenv.isDarwin
+      then
+        ''
+          mkdir -p $out
+          tar xf $src --strip-components=1 -C $out
+        ''
+      else
+        ''
+          mkdir -p $out
+          mkdir -p $out/lib
+          cp -r opt/microsoft/msodbcsql${finalAttrs.versionMajor}/lib64 opt/microsoft/msodbcsql${finalAttrs.versionMajor}/share $out/
+        '';
+
+    # Replace the hard-coded paths in the dylib with nixpkgs equivalents.
+    fixupPhase = lib.optionalString stdenv.isDarwin ''
+      ${stdenv.cc.bintools.targetPrefix}install_name_tool \
+        -change /usr/lib/libiconv.2.dylib ${libiconv}/lib/libiconv.2.dylib \
+        -change /opt/homebrew/lib/libodbcinst.2.dylib ${unixODBC}/lib/libodbcinst.2.dylib \
+        $out/${finalAttrs.passthru.driver}
+    '';
+
+    postFixup = lib.optionalString stdenv.isLinux ''
+      patchelf --set-rpath ${lib.makeLibraryPath [ unixODBC openssl libkrb5 libuuid stdenv.cc.cc ]} \
+        $out/${finalAttrs.passthru.driver}
+    '';
+
+    # see the top of the file for an explanation
+    passthru = {
+      fancyName = "ODBC Driver ${finalAttrs.versionMajor} for SQL Server";
+      driver = "lib/libmsodbcsql${if stdenv.isDarwin then ".${finalAttrs.versionMajor}.dylib" else "-${finalAttrs.versionMajor}.${finalAttrs.versionMinor}.so.${finalAttrs.versionAdditional}"}";
+    };
+
+    meta = with lib; {
+      description = finalAttrs.passthru.fancyName;
+      homepage = "https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver16";
+      sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+      platforms = platforms.unix;
+      license = licenses.unfree;
+      maintainers = with maintainers; [ SamirTalwar ];
+    };
+  });
+
+  redshift = stdenv.mkDerivation rec {
+    pname = "redshift-odbc";
+    version = "1.4.49.1000";
+
+    src = fetchurl {
+      url = "https://s3.amazonaws.com/redshift-downloads/drivers/odbc/${version}/AmazonRedshiftODBC-64-bit-${version}-1.x86_64.deb";
+      sha256 = "sha256-r5HvsZjB7+x+ClxtWoONkE1/NAbz90NbHfzxC6tf7jA=";
+    };
+
+    nativeBuildInputs = [ dpkg ];
+
+    unpackPhase = ''
+      dpkg -x $src src
+      cd src
+    '';
+
+    # `unixODBC` is loaded with `dlopen`, so `autoPatchElfHook` cannot see it, and `patchELF` phase would strip the manual patchelf. Thus:
+    # - Manually patchelf with `unixODCB` libraries
+    # - Disable automatic `patchELF` phase
+    installPhase = ''
+      mkdir -p $out/lib
+      cp opt/amazon/redshiftodbc/lib/64/* $out/lib
+      patchelf --set-rpath ${unixODBC}/lib/ $out/lib/libamazonredshiftodbc64.so
+    '';
+
+    dontPatchELF = true;
+
+    buildInputs = [ unixODBC ];
+
+    # see the top of the file for an explanation
+    passthru = {
+      fancyName = "Amazon Redshift (x64)";
+      driver = "lib/libamazonredshiftodbc64.so";
+    };
+
+    meta = with lib; {
+      broken = stdenv.isDarwin;
+      description = "Amazon Redshift ODBC driver";
+      homepage = "https://docs.aws.amazon.com/redshift/latest/mgmt/configure-odbc-connection.html";
+      sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+      license = licenses.unfree;
+      platforms = platforms.linux;
+      maintainers = with maintainers; [ sir4ur0n ];
+    };
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/unixODBCDrivers/mariadb-connector-odbc-unistd.patch b/nixpkgs/pkgs/development/libraries/unixODBCDrivers/mariadb-connector-odbc-unistd.patch
new file mode 100644
index 000000000000..8c976885eb62
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/unixODBCDrivers/mariadb-connector-odbc-unistd.patch
@@ -0,0 +1,12 @@
+diff -ur a/test/use_result.c b/test/use_result.c
+--- a/test/use_result.c	1969-12-31 19:00:01.000000000 -0500
++++ b/test/use_result.c	2023-09-05 00:08:12.979889343 -0400
+@@ -23,6 +23,8 @@
+   51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+ 
++#include <unistd.h>
++
+ #include "tap.h"
+ 
+ SQLINTEGER my_max_rows= 100;
diff --git a/nixpkgs/pkgs/development/libraries/unqlite/default.nix b/nixpkgs/pkgs/development/libraries/unqlite/default.nix
new file mode 100644
index 000000000000..c0e405c8849c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/unqlite/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "unqlite";
+  version = "1.1.9";
+
+  src = fetchFromGitHub {
+    owner = "symisc";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-WLsyGEt7Xe6ZrOGMO7+3TU2sBgDTSmfD1WzD70pcDjo=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    homepage = "https://unqlite.org/";
+    description = "Self-contained, serverless, zero-conf, transactional NoSQL DB library";
+    longDescription = ''
+      UnQLite is a in-process software library which implements a
+      self-contained, serverless, zero-configuration, transactional NoSQL
+      database engine. UnQLite is a document store database similar to MongoDB,
+      Redis, CouchDB etc. as well a standard Key/Value store similar to
+      BerkeleyDB, LevelDB, etc.
+
+      UnQLite is an embedded NoSQL (Key/Value store and Document-store) database
+      engine. Unlike most other NoSQL databases, UnQLite does not have a
+      separate server process. UnQLite reads and writes directly to ordinary
+      disk files. A complete database with multiple collections, is contained in
+      a single disk file. The database file format is cross-platform, you can
+      freely copy a database between 32-bit and 64-bit systems or between
+      big-endian and little-endian architectures.
+    '';
+    maintainers = with maintainers; [ AndersonTorres ];
+    license = licenses.bsd2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/updfparser/default.nix b/nixpkgs/pkgs/development/libraries/updfparser/default.nix
new file mode 100644
index 000000000000..aa25f9f2dffd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/updfparser/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchzip }:
+
+stdenv.mkDerivation rec {
+  name = "updfparser";
+  version = "unstable-2023-08-08";
+  rev = "c5ce75b9eea8ebb2746b13eeb0f335813c615115";
+
+  src = fetchzip {
+    url = "https://indefero.soutade.fr/p/updfparser/source/download/${rev}/";
+    hash = "sha256-RT7mvu43Izp0rHhKq4wR4kt0TDfzHvB2NGMR+fxO5UM=";
+    extension = "zip";
+  };
+
+  makeFlags = [ "BUILD_STATIC=1" "BUILD_SHARED=1" ];
+
+  installPhase = ''
+    runHook preInstall
+    install -Dt $out/include include/*.h
+    install -Dt $out/lib libupdfparser.so
+    install -Dt $out/lib libupdfparser.a
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "A very simple PDF parser";
+    homepage = "https://indefero.soutade.fr/p/updfparser";
+    license = licenses.lgpl3Plus;
+    maintainers = with maintainers; [ autumnal ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/urdfdom-headers/default.nix b/nixpkgs/pkgs/development/libraries/urdfdom-headers/default.nix
new file mode 100644
index 000000000000..138597ad89a6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/urdfdom-headers/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, validatePkgConfig }:
+
+stdenv.mkDerivation rec {
+  pname = "urdfdom-headers";
+  version = "1.1.0";
+
+  src = fetchFromGitHub {
+    owner = "ros";
+    repo = "urdfdom_headers";
+    rev = version;
+    hash = "sha256-ry5wDMRxR7TtupUghe9t1XP0XMvWKiOesO5RFHPrSdI=";
+  };
+
+  patches = [
+    # Fix CMake relative install dir assumptions (https://github.com/ros/urdfdom_headers/pull/66)
+    (fetchpatch {
+      url = "https://github.com/ros/urdfdom_headers/commit/c9c993147bbf18d5ec83bae684c5780281e529b4.patch";
+      hash = "sha256-BnYPdcetYSim2O1R38N0d1tY0Id++AgKNic8+dlM6Vg=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake validatePkgConfig ];
+
+  meta = with lib; {
+    description = "URDF (U-Robot Description Format) headers provides core data structure headers for URDF";
+    homepage = "https://github.com/ros/urdfdom_headers";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ lopsided98 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/urdfdom/default.nix b/nixpkgs/pkgs/development/libraries/urdfdom/default.nix
new file mode 100644
index 000000000000..6e59914044fc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/urdfdom/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, pkg-config, validatePkgConfig
+, urdfdom-headers, console-bridge, tinyxml }:
+
+stdenv.mkDerivation rec {
+  pname = "urdfdom";
+  version = "3.1.1";
+
+  src = fetchFromGitHub {
+    owner = "ros";
+    repo = pname;
+    rev = version;
+    hash = "sha256-UdkGJAXK3Q8QJaqMZBA5/FKUgWq9EVeqkqwVewTlTD8=";
+  };
+
+  patches = [
+    # Fix CMake relative install dir assumptions (https://github.com/ros/urdfdom/pull/142)
+    (fetchpatch {
+      url = "https://github.com/ros/urdfdom/commit/cbe6884d267779463bb444be851f6404e692cc0a.patch";
+      hash = "sha256-1gTRKIGqiSRion76bGecSfFJSBskYUJguUIa6ePIiX4=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake pkg-config validatePkgConfig ];
+  propagatedBuildInputs = [ urdfdom-headers console-bridge tinyxml ];
+
+  meta = with lib; {
+    description = "Provides core data structures and a simple XML parser for populating the class data structures from an URDF file";
+    homepage = "https://github.com/ros/urdfdom";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ lopsided98 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/uri/default.nix b/nixpkgs/pkgs/development/libraries/uri/default.nix
new file mode 100644
index 000000000000..039db9392671
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/uri/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchFromGitHub, cmake, doxygen }:
+
+stdenv.mkDerivation rec {
+  pname = "uri";
+  version = "1.1.0";
+
+  src = fetchFromGitHub {
+    owner = "cpp-netlib";
+    repo = "uri";
+    rev = "v${version}";
+    sha256 = "148361pixrm94q6v04k13s1msa04bx9yc3djb0lxpa7dlw19vhcd";
+  };
+
+  env.NIX_CFLAGS_COMPILE = toString ([
+    "-Wno-error=parentheses"
+    # Needed with GCC 12
+    "-Wno-error=deprecated-declarations"
+    "-Wno-error=nonnull"
+  ] ++ lib.optionals stdenv.cc.isClang [
+    # Needed with Clang 16
+    "-Wno-error=deprecated-builtins"
+  ]);
+
+  nativeBuildInputs = [ cmake doxygen ];
+
+  cmakeFlags = [
+    "-DUri_BUILD_TESTS=OFF" "-DUri_BUILD_DOCS=ON" "-DBUILD_SHARED_LIBS=ON"
+  ];
+
+  postBuild = "make doc";
+
+  postInstall = ''
+    install -vd $out/share/doc
+    cp -vR html $out/share/doc
+  '';
+
+  meta = {
+    description = "C++ URI library";
+    homepage = "https://cpp-netlib.org";
+    license = lib.licenses.boost;
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/uriparser/default.nix b/nixpkgs/pkgs/development/libraries/uriparser/default.nix
new file mode 100644
index 000000000000..01ab983e1d6e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/uriparser/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchurl, cmake, gtest }:
+
+stdenv.mkDerivation rec {
+  pname = "uriparser";
+  version = "0.9.7";
+
+  # Release tarball differs from source tarball
+  src = fetchurl {
+    url = "https://github.com/uriparser/uriparser/releases/download/${pname}-${version}/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-0n3qDItvb7l5jwfK7e8c2WpuP8XGGJWWd04Zr6fd3tc=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [
+    "-DURIPARSER_BUILD_DOCS=OFF"
+  ] ++ lib.optional (!doCheck) "-DURIPARSER_BUILD_TESTS=OFF";
+
+  nativeCheckInputs = [ gtest ];
+  doCheck = stdenv.buildPlatform == stdenv.hostPlatform;
+
+  meta = with lib; {
+    description = "Strictly RFC 3986 compliant URI parsing library";
+    longDescription = ''
+      uriparser is a strictly RFC 3986 compliant URI parsing and handling library written in C.
+      API documentation is available on uriparser website.
+    '';
+    homepage = "https://uriparser.github.io/";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ bosu ];
+    mainProgram = "uriparse";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/usbredir/default.nix b/nixpkgs/pkgs/development/libraries/usbredir/default.nix
new file mode 100644
index 000000000000..c7e8a361ee16
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/usbredir/default.nix
@@ -0,0 +1,53 @@
+{ lib
+, stdenv
+, cmake
+, fetchFromGitLab
+, pkg-config
+, meson
+, ninja
+, glib
+, libusb1
+}:
+
+stdenv.mkDerivation rec {
+  pname = "usbredir";
+  version = "0.13.0";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "spice";
+    repo = "usbredir";
+    rev = "${pname}-${version}";
+    sha256 = "sha256-zehf0DkqSSvmatbk/UB1oySjyqiFUYTuIhqb5xKeK7I=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+  ];
+
+  buildInputs = [
+    glib
+  ];
+
+  propagatedBuildInputs = [
+    libusb1
+  ];
+
+  mesonFlags = [
+    "-Dgit_werror=disabled"
+    "-Dtools=enabled"
+    "-Dfuzzing=disabled"
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  meta = with lib; {
+    description = "USB traffic redirection protocol";
+    homepage = "https://www.spice-space.org/usbredir.html";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ offline ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/usrsctp/clang-fix-build.patch b/nixpkgs/pkgs/development/libraries/usrsctp/clang-fix-build.patch
new file mode 100644
index 000000000000..eb136e8be30a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/usrsctp/clang-fix-build.patch
@@ -0,0 +1,183 @@
+diff --git a/usrsctplib/netinet/sctp_cc_functions.c b/usrsctplib/netinet/sctp_cc_functions.c
+index 57bcdaa..70cf8b7 100755
+--- a/usrsctplib/netinet/sctp_cc_functions.c
++++ b/usrsctplib/netinet/sctp_cc_functions.c
+@@ -764,7 +764,7 @@ sctp_cwnd_update_after_sack_common(struct sctp_tcb *stcb,
+ #if defined(__FreeBSD__) && !defined(__Userspace__)
+ 	int old_cwnd;
+ #endif
+-	uint32_t t_ssthresh, t_cwnd, incr;
++	uint32_t t_ssthresh, incr;
+ 	uint64_t t_ucwnd_sbw;
+ 	uint64_t t_path_mptcp;
+ 	uint64_t mptcp_like_alpha;
+@@ -773,7 +773,6 @@ sctp_cwnd_update_after_sack_common(struct sctp_tcb *stcb,
+ 
+ 	/* MT FIXME: Don't compute this over and over again */
+ 	t_ssthresh = 0;
+-	t_cwnd = 0;
+ 	t_ucwnd_sbw = 0;
+ 	t_path_mptcp = 0;
+ 	mptcp_like_alpha = 1;
+@@ -783,7 +782,6 @@ sctp_cwnd_update_after_sack_common(struct sctp_tcb *stcb,
+ 		max_path = 0;
+ 		TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
+ 			t_ssthresh += net->ssthresh;
+-			t_cwnd += net->cwnd;
+ 			/* lastsa>>3;  we don't need to devide ...*/
+ 			srtt = net->lastsa;
+ 			if (srtt > 0) {
+diff --git a/usrsctplib/netinet/sctp_indata.c b/usrsctplib/netinet/sctp_indata.c
+index 3bce9e9..42ce111 100755
+--- a/usrsctplib/netinet/sctp_indata.c
++++ b/usrsctplib/netinet/sctp_indata.c
+@@ -3320,7 +3320,6 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, struct sctp_association *asoc,
+ 	struct sctp_tmit_chunk *tp1;
+ 	int strike_flag = 0;
+ 	struct timeval now;
+-	int tot_retrans = 0;
+ 	uint32_t sending_seq;
+ 	struct sctp_nets *net;
+ 	int num_dests_sacked = 0;
+@@ -3691,7 +3690,6 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, struct sctp_association *asoc,
+ 			}
+ 
+ 			tp1->rec.data.doing_fast_retransmit = 1;
+-			tot_retrans++;
+ 			/* mark the sending seq for possible subsequent FR's */
+ 			/*
+ 			 * SCTP_PRINTF("Marking TSN for FR new value %x\n",
+diff --git a/usrsctplib/netinet/sctp_output.c b/usrsctplib/netinet/sctp_output.c
+index 6a7dff9..a914b3b 100755
+--- a/usrsctplib/netinet/sctp_output.c
++++ b/usrsctplib/netinet/sctp_output.c
+@@ -9970,7 +9970,7 @@ sctp_chunk_retransmission(struct sctp_inpcb *inp,
+ 	struct mbuf *m, *endofchain;
+ 	struct sctp_nets *net = NULL;
+ 	uint32_t tsns_sent = 0;
+-	int no_fragmentflg, bundle_at, cnt_thru;
++	int no_fragmentflg, bundle_at;
+ 	unsigned int mtu;
+ 	int error, i, one_chunk, fwd_tsn, ctl_cnt, tmr_started;
+ 	struct sctp_auth_chunk *auth = NULL;
+@@ -10046,7 +10046,6 @@ sctp_chunk_retransmission(struct sctp_inpcb *inp,
+ 		}
+ 	}
+ 	one_chunk = 0;
+-	cnt_thru = 0;
+ 	/* do we have control chunks to retransmit? */
+ 	if (m != NULL) {
+ 		/* Start a timer no matter if we succeed or fail */
+@@ -10368,7 +10367,6 @@ sctp_chunk_retransmission(struct sctp_inpcb *inp,
+ 			/* (void)SCTP_GETTIME_TIMEVAL(&net->last_sent_time); */
+ 
+ 			/* For auto-close */
+-			cnt_thru++;
+ 			if (*now_filled == 0) {
+ 				(void)SCTP_GETTIME_TIMEVAL(&asoc->time_last_sent);
+ 				*now = asoc->time_last_sent;
+@@ -13416,7 +13414,7 @@ sctp_lower_sosend(struct socket *so,
+ 	struct epoch_tracker et;
+ #endif
+ 	ssize_t sndlen = 0, max_len, local_add_more;
+-	int error, len;
++	int error;
+ 	struct mbuf *top = NULL;
+ 	int queue_only = 0, queue_only_for_init = 0;
+ 	int free_cnt_applied = 0;
+@@ -14035,7 +14033,6 @@ sctp_lower_sosend(struct socket *so,
+ 		 */
+ 		local_add_more = sndlen;
+ 	}
+-	len = 0;
+ 	if (non_blocking) {
+ 		goto skip_preblock;
+ 	}
+@@ -14265,7 +14262,6 @@ skip_preblock:
+ 				}
+ 				sctp_snd_sb_alloc(stcb, sndout);
+ 				atomic_add_int(&sp->length, sndout);
+-				len += sndout;
+ 				if (sinfo_flags & SCTP_SACK_IMMEDIATELY) {
+ 					sp->sinfo_flags |= SCTP_SACK_IMMEDIATELY;
+ 				}
+diff --git a/usrsctplib/netinet/sctp_pcb.c b/usrsctplib/netinet/sctp_pcb.c
+index 89a66bc..a952921 100755
+--- a/usrsctplib/netinet/sctp_pcb.c
++++ b/usrsctplib/netinet/sctp_pcb.c
+@@ -7943,7 +7943,7 @@ sctp_drain_mbufs(struct sctp_tcb *stcb)
+ }
+ 
+ void
+-sctp_drain()
++sctp_drain(void)
+ {
+ 	/*
+ 	 * We must walk the PCB lists for ALL associations here. The system
+diff --git a/usrsctplib/netinet/sctp_sysctl.c b/usrsctplib/netinet/sctp_sysctl.c
+index bb49e17..8b77f7e 100755
+--- a/usrsctplib/netinet/sctp_sysctl.c
++++ b/usrsctplib/netinet/sctp_sysctl.c
+@@ -61,7 +61,7 @@ FEATURE(sctp, "Stream Control Transmission Protocol");
+  */
+ 
+ void
+-sctp_init_sysctls()
++sctp_init_sysctls(void)
+ {
+ 	SCTP_BASE_SYSCTL(sctp_sendspace) = SCTPCTL_MAXDGRAM_DEFAULT;
+ 	SCTP_BASE_SYSCTL(sctp_recvspace) = SCTPCTL_RECVSPACE_DEFAULT;
+diff --git a/usrsctplib/user_socket.c b/usrsctplib/user_socket.c
+index 513a5a9..89e9eb2 100755
+--- a/usrsctplib/user_socket.c
++++ b/usrsctplib/user_socket.c
+@@ -2857,7 +2857,6 @@ sctp_userspace_ip_output(int *result, struct mbuf *o_pak,
+ 	struct mbuf *m_orig;
+ 	int iovcnt;
+ 	int len;
+-	int send_count;
+ 	struct ip *ip;
+ 	struct udphdr *udp;
+ 	struct sockaddr_in dst;
+@@ -2930,16 +2929,13 @@ sctp_userspace_ip_output(int *result, struct mbuf *o_pak,
+ 		m_adj(m, sizeof(struct ip) + sizeof(struct udphdr));
+ 	}
+ 
+-	send_count = 0;
+ 	for (iovcnt = 0; m != NULL && iovcnt < MAXLEN_MBUF_CHAIN; m = m->m_next, iovcnt++) {
+ #if !defined(_WIN32)
+ 		send_iovec[iovcnt].iov_base = (caddr_t)m->m_data;
+ 		send_iovec[iovcnt].iov_len = SCTP_BUF_LEN(m);
+-		send_count += send_iovec[iovcnt].iov_len;
+ #else
+ 		send_iovec[iovcnt].buf = (caddr_t)m->m_data;
+ 		send_iovec[iovcnt].len = SCTP_BUF_LEN(m);
+-		send_count += send_iovec[iovcnt].len;
+ #endif
+ 	}
+ 
+@@ -3002,7 +2998,6 @@ void sctp_userspace_ip6_output(int *result, struct mbuf *o_pak,
+ 	struct mbuf *m_orig;
+ 	int iovcnt;
+ 	int len;
+-	int send_count;
+ 	struct ip6_hdr *ip6;
+ 	struct udphdr *udp;
+ 	struct sockaddr_in6 dst;
+@@ -3076,16 +3071,13 @@ void sctp_userspace_ip6_output(int *result, struct mbuf *o_pak,
+ 	  m_adj(m, sizeof(struct ip6_hdr));
+ 	}
+ 
+-	send_count = 0;
+ 	for (iovcnt = 0; m != NULL && iovcnt < MAXLEN_MBUF_CHAIN; m = m->m_next, iovcnt++) {
+ #if !defined(_WIN32)
+ 		send_iovec[iovcnt].iov_base = (caddr_t)m->m_data;
+ 		send_iovec[iovcnt].iov_len = SCTP_BUF_LEN(m);
+-		send_count += send_iovec[iovcnt].iov_len;
+ #else
+ 		send_iovec[iovcnt].buf = (caddr_t)m->m_data;
+ 		send_iovec[iovcnt].len = SCTP_BUF_LEN(m);
+-		send_count += send_iovec[iovcnt].len;
+ #endif
+ 	}
+ 	if (m != NULL) {
diff --git a/nixpkgs/pkgs/development/libraries/usrsctp/default.nix b/nixpkgs/pkgs/development/libraries/usrsctp/default.nix
new file mode 100644
index 000000000000..9723f887b82b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/usrsctp/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, lib, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "usrsctp";
+  version = "0.9.5.0";
+
+  src = fetchFromGitHub {
+    owner = "sctplab";
+    repo = "usrsctp";
+    rev = version;
+    sha256 = "10ndzkip8blgkw572n3dicl6mgjaa7kygwn3vls80liq92vf1sa9";
+  };
+
+  patches = [
+    # usrsctp fails to build with clang 15+ due to set but unused variable and missing prototype
+    # errors. These issues are fixed in the master branch, but a new release with them has not
+    # been made. The following patch can be dropped once a release has been made.
+    ./clang-fix-build.patch
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  # https://github.com/sctplab/usrsctp/issues/662
+  postPatch = ''
+    substituteInPlace usrsctplib/CMakeLists.txt \
+      --replace '$'{exec_prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
+      --replace '$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/sctplab/usrsctp";
+    description = "A portable SCTP userland stack";
+    maintainers = with maintainers; [ misuzu ];
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ustr/default.nix b/nixpkgs/pkgs/development/libraries/ustr/default.nix
new file mode 100644
index 000000000000..b0e4ab6c064e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ustr/default.nix
@@ -0,0 +1,42 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "ustr";
+  version = "1.0.4";
+
+  src = fetchurl {
+    url = "http://www.and.org/ustr/${version}/${pname}-${version}.tar.bz2";
+    sha256 = "1i623ygdj7rkizj7985q9d6vj5amwg686aqb5j3ixpkqkyp6xbrx";
+  };
+
+  # Fixes bogus warnings that failed libsemanage
+  patches = [ ./va_args.patch ];
+
+  # Work around gcc5 switch to gnu11
+  env.NIX_CFLAGS_COMPILE = "-std=gnu89";
+
+  # Fix detection of stdint.h
+  postPatch = ''
+    sed -i 's,\(have_stdint_h\)=0,\1=1,g' Makefile
+    sed -i 's,\(USTR_CONF_HAVE_STDINT_H\) 0,\1 1,g' ustr-import.in
+  '';
+
+  preBuild = ''
+    makeFlagsArray+=("prefix=$out")
+    makeFlagsArray+=("LDCONFIG=echo")
+    makeFlagsArray+=("HIDE=")
+  '';
+
+  # Remove debug libraries
+  postInstall = ''
+    find $out/lib -name \*debug\* -delete
+  '';
+
+  meta = with lib; {
+    homepage = "http://www.and.org/ustr/";
+    description = "Micro String API for C language";
+    license = licenses.bsd2;
+    maintainers = [ ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/ustr/va_args.patch b/nixpkgs/pkgs/development/libraries/ustr/va_args.patch
new file mode 100644
index 000000000000..f75b537485d8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ustr/va_args.patch
@@ -0,0 +1,23 @@
+diff --git a/ustr-compiler.h b/ustr-compiler.h
+index 9e71276..c5f847a 100644
+--- a/ustr-compiler.h
++++ b/ustr-compiler.h
+@@ -11,17 +11,11 @@
+ #define USTR_CONF_HAVE_ATTR_FMT 1
+ #endif
+ 
++#include <stdarg.h>
+ /* We assume this is enough,
+  * C99 specifies that va_copy() exists and is a macro */
+-#ifdef va_copy
+ # define USTR_CONF_HAVE_VA_COPY 1
+ # define USTR__VA_COPY(x, y)   va_copy(x, y)
+-#elif __va_copy
+-# define USTR_CONF_HAVE_VA_COPY 1
+-# define USTR__VA_COPY(x, y) __va_copy(x, y)
+-#else
+-# define USTR_CONF_HAVE_VA_COPY 0
+-#endif
+ 
+ #ifndef USTR_CONF_HAVE_ATTR_NONNULL
+ #if defined(__GNUC__) && (__GNUC__ > 3) /* not sure */
diff --git a/nixpkgs/pkgs/development/libraries/ustream-ssl/default.nix b/nixpkgs/pkgs/development/libraries/ustream-ssl/default.nix
new file mode 100644
index 000000000000..638685434463
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ustream-ssl/default.nix
@@ -0,0 +1,45 @@
+{ stdenv
+, lib
+, fetchgit
+, cmake
+, pkg-config
+, libubox-nossl
+, ssl_implementation
+, additional_buildInputs ? [ ]
+}:
+
+stdenv.mkDerivation {
+  pname = "ustream-ssl";
+  version = "unstable-2023-11-11";
+
+  src = fetchgit {
+    url = "https://git.openwrt.org/project/ustream-ssl.git";
+    rev = "263b9a97cf7e1e2467319c23832b705fc01190b5";
+    hash = "sha256-RLHU6swNbS3DL3QbKnwU4BbD0EFGKCrHHp0hbnoSssw=";
+  };
+
+  preConfigure = ''
+    sed -r \
+        -e "s|ubox_include_dir libubox/ustream.h|ubox_include_dir libubox/ustream.h HINTS ${libubox-nossl}/include|g" \
+        -e "s|ubox_library NAMES ubox|ubox_library NAMES ubox HINTS ${libubox-nossl}/lib|g" \
+        -e "s|^  FIND_LIBRARY\((.+)\)|  FIND_LIBRARY\(\1 HINTS ${if ssl_implementation ? lib then ssl_implementation.lib else ssl_implementation.out}\)|g" \
+        -i CMakeLists.txt
+  '';
+
+  cmakeFlags = [ "-D${lib.toUpper ssl_implementation.pname}=ON" ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ ssl_implementation ] ++ additional_buildInputs;
+
+  passthru = {
+    inherit ssl_implementation;
+  };
+
+  meta = with lib; {
+    description = "ustream SSL wrapper";
+    homepage = "https://git.openwrt.org/?p=project/ustream-ssl.git;a=summary";
+    license = licenses.isc;
+    maintainers = with maintainers; [ fpletz mkg20001 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/utf8cpp/default.nix b/nixpkgs/pkgs/development/libraries/utf8cpp/default.nix
new file mode 100644
index 000000000000..60ae45d2cd8e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/utf8cpp/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "utf8cpp";
+  version = "4.0.5";
+
+  src = fetchFromGitHub {
+    owner = "nemtrif";
+    repo = "utfcpp";
+    rev = "v${version}";
+    fetchSubmodules = true;
+    hash = "sha256-Z27/31obVErsmW1b1SVcr45nKlFu01RqqpTMwS0LqJ8=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    homepage = "https://github.com/nemtrif/utfcpp";
+    changelog = "https://github.com/nemtrif/utfcpp/releases/tag/v${version}";
+    description = "UTF-8 with C++ in a Portable Way";
+    license = licenses.boost;
+    maintainers = with maintainers; [ jobojeha ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/utf8proc/default.nix b/nixpkgs/pkgs/development/libraries/utf8proc/default.nix
new file mode 100644
index 000000000000..7bdb9747472b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/utf8proc/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchFromGitHub, cmake
+  # passthru.tests
+, tmux
+, fcft
+, arrow-cpp
+}:
+
+stdenv.mkDerivation rec {
+  pname = "utf8proc";
+  version = "2.9.0";
+
+  src = fetchFromGitHub {
+    owner = "JuliaStrings";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-Sgh8vTbclUV+lFZdR29PtNUy8F+9L/OAXk647B+l2mg=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+    "-DUTF8PROC_ENABLE_TESTING=ON"
+  ];
+
+  doCheck = true;
+
+  passthru.tests = {
+    inherit fcft tmux arrow-cpp;
+  };
+
+  meta = with lib; {
+    description = "A clean C library for processing UTF-8 Unicode data";
+    homepage = "https://juliastrings.github.io/utf8proc/";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = [ maintainers.ftrvxmtrx maintainers.sternenseemann ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/uthash/default.nix b/nixpkgs/pkgs/development/libraries/uthash/default.nix
new file mode 100644
index 000000000000..f697e8c7a125
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/uthash/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchFromGitHub, perl }:
+
+stdenv.mkDerivation rec {
+  pname = "uthash";
+  version = "2.3.0";
+
+  src = fetchFromGitHub {
+    owner = "troydhanson";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-F0M5ENT3bMn3dD16Oaq9mBFYOWzVliVWupAIrLc2nkQ=";
+  };
+
+  doCheck = true;
+  nativeCheckInputs = [ perl ];
+  checkTarget = "all";
+  preCheck = "cd tests";
+
+  installPhase = ''
+    install -Dm644 $src/include/*.h -t $out/include
+  '';
+
+  meta = with lib; {
+    description = "A hash table for C structures";
+    homepage    = "http://troydhanson.github.io/uthash";
+    license     = licenses.bsd2; # it's one-clause, actually, as it's source-only
+    platforms   = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/uthenticode/default.nix b/nixpkgs/pkgs/development/libraries/uthenticode/default.nix
new file mode 100644
index 000000000000..68a896d13649
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/uthenticode/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, lib, fetchFromGitHub, cmake, gtest, openssl, pe-parse }:
+
+stdenv.mkDerivation rec {
+  pname = "uthenticode";
+  version = "2.0.1";
+
+  src = fetchFromGitHub {
+    owner = "trailofbits";
+    repo = "uthenticode";
+    rev = "v${version}";
+    hash = "sha256-NGVOGXMRlgpSRw56jr63rJc/5/qCmPjtAFa0D21ogd4=";
+  };
+
+  cmakeFlags = [ "-DBUILD_TESTS=1" "-DUSE_EXTERNAL_GTEST=1" ];
+
+  nativeBuildInputs = [ cmake ];
+  nativeCheckInputs = [ gtest ];
+  buildInputs = [ pe-parse openssl ];
+
+  doCheck = true;
+  checkPhase = "test/uthenticode_test";
+
+  meta = with lib; {
+    description = "A small cross-platform library for verifying Authenticode digital signatures.";
+    homepage = "https://github.com/trailofbits/uthenticode";
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ arturcygan ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/v8/darwin.patch b/nixpkgs/pkgs/development/libraries/v8/darwin.patch
new file mode 100644
index 000000000000..629d5e4dc392
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/v8/darwin.patch
@@ -0,0 +1,22 @@
+diff --git a/toolchain/gcc_toolchain.gni b/toolchain/gcc_toolchain.gni
+index 80e2a362a..df138c87b 100644
+--- a/build/toolchain/gcc_toolchain.gni
++++ b/build/toolchain/gcc_toolchain.gni
+@@ -355,6 +355,8 @@ template("gcc_toolchain") {
+         # AIX does not support either -D (deterministic output) or response
+         # files.
+         command = "$ar -X64 {{arflags}} -r -c -s {{output}} {{inputs}}"
++      } else if (current_os == "mac") {
++        command = "$ar {{arflags}} -r -c -s {{output}} {{inputs}}"
+       } else {
+         rspfile = "{{output}}.rsp"
+         rspfile_content = "{{inputs}}"
+@@ -546,7 +548,7 @@ template("gcc_toolchain") {
+ 
+       start_group_flag = ""
+       end_group_flag = ""
+-      if (current_os != "aix") {
++      if (current_os != "aix" && current_os != "mac") {
+         # the "--start-group .. --end-group" feature isn't available on the aix ld.
+         start_group_flag = "-Wl,--start-group"
+         end_group_flag = "-Wl,--end-group "
diff --git a/nixpkgs/pkgs/development/libraries/v8/default.nix b/nixpkgs/pkgs/development/libraries/v8/default.nix
new file mode 100644
index 000000000000..7edf2cdf7c46
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/v8/default.nix
@@ -0,0 +1,181 @@
+{ stdenv, lib, fetchgit, fetchFromGitHub
+, gn, ninja, python3, glib, pkg-config, icu
+, xcbuild, darwin
+, fetchpatch
+, llvmPackages
+, symlinkJoin
+}:
+
+# Use update.sh to update all checksums.
+
+let
+  version = "9.7.106.18";
+  v8Src = fetchgit {
+    url = "https://chromium.googlesource.com/v8/v8";
+    rev = version;
+    sha256 = "0cb3w733w1xn6zq9dsr43nx6llcg9hrmb2dkxairarj9c0igpzyh";
+  };
+
+  git_url = "https://chromium.googlesource.com";
+
+  # This data is from the DEPS file in the root of a V8 checkout.
+  deps = {
+    "base/trace_event/common" = fetchgit {
+      url    = "${git_url}/chromium/src/base/trace_event/common.git";
+      rev    = "7f36dbc19d31e2aad895c60261ca8f726442bfbb";
+      sha256 = "01b2fhbxznqbakxv42ivrzg6w8l7i9yrd9nf72d6p5xx9dm993j4";
+    };
+    "build" = fetchgit {
+      url    = "${git_url}/chromium/src/build.git";
+      rev    = "cf325916d58a194a935c26a56fcf6b525d1e2bf4";
+      sha256 = "1ix4h1cpx9bvgln8590xh7lllhsd9w1hd5k9l1gx5yxxrmywd3s4";
+    };
+    "third_party/googletest/src" = fetchgit {
+      url    = "${git_url}/external/github.com/google/googletest.git";
+      rev    = "16f637fbf4ffc3f7a01fa4eceb7906634565242f";
+      sha256 = "11012k3c3mxzdwcw2iparr9lrckafpyhqzclsj26hmfbgbdi0rrh";
+    };
+    "third_party/icu" = fetchgit {
+      url    = "${git_url}/chromium/deps/icu.git";
+      rev    = "eedbaf76e49d28465d9119b10c30b82906e606ff";
+      sha256 = "0mppvx7wf9zlqjsfaa1cf06brh1fjb6nmiib0lhbb9hd55mqjdjj";
+    };
+    "third_party/zlib" = fetchgit {
+      url    = "${git_url}/chromium/src/third_party/zlib.git";
+      rev    = "6da1d53b97c89b07e47714d88cab61f1ce003c68";
+      sha256 = "0v7ylmbwfwv6w6wp29qdf77kjjnfr2xzin08n0v1yvbhs01h5ppy";
+    };
+    "third_party/jinja2" = fetchgit {
+      url    = "${git_url}/chromium/src/third_party/jinja2.git";
+      rev    = "ee69aa00ee8536f61db6a451f3858745cf587de6";
+      sha256 = "1fsnd5h0gisfp8bdsfd81kk5v4mkqf8z368c7qlm1qcwc4ri4x7a";
+    };
+    "third_party/markupsafe" = fetchgit {
+      url    = "${git_url}/chromium/src/third_party/markupsafe.git";
+      rev    = "1b882ef6372b58bfd55a3285f37ed801be9137cd";
+      sha256 = "1jnjidbh03lhfaawimkjxbprmsgz4snr0jl06630dyd41zkdw5kr";
+    };
+  };
+
+  # See `gn_version` in DEPS.
+  gnSrc = fetchgit {
+    url = "https://gn.googlesource.com/gn";
+    rev = "8926696a4186279489cc2b8d768533e61bba73d7";
+    sha256 = "1084lnyb0a1khbgjvak05fcx6jy973wqvsf77n0alxjys18sg2yk";
+  };
+
+  myGn = gn.overrideAttrs (oldAttrs: {
+    version = "for-v8";
+    src = gnSrc;
+  });
+
+in
+
+stdenv.mkDerivation rec {
+  pname = "v8";
+  inherit version;
+
+  doCheck = true;
+
+  patches = [
+    ./darwin.patch
+  ];
+
+  src = v8Src;
+
+  postUnpack = ''
+    ${lib.concatStringsSep "\n" (
+      lib.mapAttrsToList (n: v: ''
+        mkdir -p $sourceRoot/${n}
+        cp -r ${v}/* $sourceRoot/${n}
+      '') deps)}
+    chmod u+w -R .
+  '';
+
+  postPatch = ''
+    ${lib.optionalString stdenv.isAarch64 ''
+      substituteInPlace build/toolchain/linux/BUILD.gn \
+        --replace 'toolprefix = "aarch64-linux-gnu-"' 'toolprefix = ""'
+    ''}
+    ${lib.optionalString stdenv.isDarwin ''
+      substituteInPlace build/config/compiler/compiler.gni \
+        --replace 'strip_absolute_paths_from_debug_symbols = true' \
+                  'strip_absolute_paths_from_debug_symbols = false'
+      substituteInPlace build/config/compiler/BUILD.gn \
+        --replace 'current_toolchain == host_toolchain || !use_xcode_clang' \
+                  'false'
+    ''}
+    ${lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) ''
+      substituteInPlace build/config/compiler/BUILD.gn \
+        --replace "-Wl,-fatal_warnings" ""
+    ''}
+    touch build/config/gclient_args.gni
+    sed '1i#include <utility>' -i src/heap/cppgc/prefinalizer-handler.h # gcc12
+  '';
+
+  llvmCcAndBintools = symlinkJoin { name = "llvmCcAndBintools"; paths = [ stdenv.cc llvmPackages.llvm ]; };
+
+  gnFlags = [
+    "use_custom_libcxx=false"
+    "is_clang=${lib.boolToString stdenv.cc.isClang}"
+    "use_sysroot=false"
+    # "use_system_icu=true"
+    "clang_use_chrome_plugins=false"
+    "is_component_build=false"
+    "v8_use_external_startup_data=false"
+    "v8_monolithic=true"
+    "is_debug=true"
+    "is_official_build=false"
+    "treat_warnings_as_errors=false"
+    "v8_enable_i18n_support=true"
+    "use_gold=false"
+    # ''custom_toolchain="//build/toolchain/linux/unbundle:default"''
+    ''host_toolchain="//build/toolchain/linux/unbundle:default"''
+    ''v8_snapshot_toolchain="//build/toolchain/linux/unbundle:default"''
+  ] ++ lib.optional stdenv.cc.isClang ''clang_base_path="${llvmCcAndBintools}"''
+  ++ lib.optional stdenv.isDarwin ''use_lld=false'';
+
+  env.NIX_CFLAGS_COMPILE = "-O2";
+  FORCE_MAC_SDK_MIN = stdenv.hostPlatform.sdkVer or "10.12";
+
+  nativeBuildInputs = [
+    myGn
+    ninja
+    pkg-config
+    python3
+  ] ++ lib.optionals stdenv.isDarwin [
+    xcbuild
+    llvmPackages.llvm
+    python3.pkgs.setuptools
+  ];
+  buildInputs = [ glib icu ];
+
+  ninjaFlags = [ ":d8" "v8_monolith" ];
+
+  enableParallelBuilding = true;
+
+  installPhase = ''
+    install -D d8 $out/bin/d8
+    install -D -m644 obj/libv8_monolith.a $out/lib/libv8.a
+    install -D -m644 icudtl.dat $out/share/v8/icudtl.dat
+    ln -s libv8.a $out/lib/libv8_monolith.a
+    cp -r ../../include $out
+
+    mkdir -p $out/lib/pkgconfig
+    cat > $out/lib/pkgconfig/v8.pc << EOF
+    Name: v8
+    Description: V8 JavaScript Engine
+    Version: ${version}
+    Libs: -L$out/lib -lv8 -pthread
+    Cflags: -I$out/include
+    EOF
+  '';
+
+  meta = with lib; {
+    homepage = "https://v8.dev/";
+    description = "Google's open source JavaScript engine";
+    maintainers = with maintainers; [ proglodyte matthewbauer ];
+    platforms = platforms.unix;
+    license = licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/v8/update.sh b/nixpkgs/pkgs/development/libraries/v8/update.sh
new file mode 100755
index 000000000000..c3fbab6faf19
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/v8/update.sh
@@ -0,0 +1,62 @@
+#!/usr/bin/env nix-shell
+#! nix-shell -i bash -p curl -p nix-prefetch-git -p jq
+VERSION_OVERVIEW=https://omahaproxy.appspot.com/all?os=linux
+TARGET_CHANNEL=stable
+
+set -eo pipefail
+
+if [ -n "$1" ]; then
+  v8_version="$1"
+  shift
+else
+  v8_version=$(curl -s "$VERSION_OVERVIEW" | awk -F "," "\$2 ~ /${TARGET_CHANNEL}/ { print \$11 }")
+fi
+
+if [ -n "$1" ]; then
+  file_path="$1"
+else
+  file_path=default.nix
+fi
+
+echo "Using V8 version --> $v8_version"
+
+prefetched=$(nix-prefetch-git --no-deepClone https://chromium.googlesource.com/v8/v8 "refs/tags/${v8_version}")
+
+path=$(echo "$prefetched" | jq -r .path)
+sha256=$(echo "$prefetched" | jq -r .sha256)
+sed -e "s#\\(version = \\)\"[0-9\.]*\"#\1\"$v8_version\"#" -i ${file_path}
+sed -e "/v8Src = fetchgit/ { n; n; n; s/\".*\"/\"${sha256}\"/  }" -i ${file_path}
+
+deps="$path/DEPS"
+
+echo "$deps"
+
+echo "Processing gn"
+gn_rev=$(sed -ne "s/.*'gn_version': 'git_revision:\([^']*\).*/\1/p" < "$deps")
+gn_sha256=$(nix-prefetch-git --no-deepClone https://gn.googlesource.com/gn "$gn_rev" 2>/dev/null | jq -r .sha256)
+sed -e "/gnSrc = fetchgit/ { n; n; s/\".*\"/\"${gn_rev}\"/; n; s/\".*\"/\"${gn_sha256}\"/  }" -i ${file_path}
+
+sed -ne '/" = fetchgit {/ { s/.*"\(.*\)".*/\1/; p }' < ${file_path} | while read dep; do
+    echo "Processing dependency --> $dep"
+    escaped_dep=$(echo "$dep" | sed -e 's#/#\\/#g')
+    dep_rev=$(sed -ne "/'${escaped_dep}':/ { n; s#.*+ '##; s#'.*##;  p }" "$deps")
+
+    if [ "$dep_rev" = "" ]; then
+        echo "Failed to resolve dependency $dep, not listed in DEPS file"
+        rm -f "$deps"
+        exit 2
+    fi
+
+    repo_url=$(sed -ne "/\"${escaped_dep}\" = fetchgit/ { n; s/.*\"\(.*\)\".*/\1/; s#\${git_url}#https://chromium.googlesource.com#; p }"  ${file_path})
+    sha256=$(nix-prefetch-git --no-deepClone "$repo_url" "$dep_rev" 2>/dev/null | jq -r .sha256)
+
+    if [ "$sha256" = "" ]; then
+        echo "Failed to get sha256 via nix-prefetch-git $repo_url $dep_rev"
+        rm -f "$deps"
+        exit 2
+    fi
+
+    sed -e "/\"${escaped_dep}\" = fetchgit/ { n; n; s/\".*\"/\"${dep_rev}\"/; n; s/\".*\"/\"${sha256}\"/  }" -i ${file_path}
+done
+
+echo done.
diff --git a/nixpkgs/pkgs/development/libraries/vaapi-intel-hybrid/default.nix b/nixpkgs/pkgs/development/libraries/vaapi-intel-hybrid/default.nix
new file mode 100644
index 000000000000..aec3bcc6af2e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vaapi-intel-hybrid/default.nix
@@ -0,0 +1,52 @@
+{ lib, stdenv, fetchurl, fetchFromGitHub, autoreconfHook, pkg-config, cmrt, libdrm, libva, libX11, libGL, wayland }:
+
+stdenv.mkDerivation rec {
+  pname = "intel-hybrid-driver";
+  version = "1.0.2";
+
+  src = fetchFromGitHub {
+    owner = "intel";
+    repo = "intel-hybrid-driver";
+    rev = version;
+    sha256 = "sha256-uYX7RoU1XVzcC2ea3z/VBjmT47xmzK67Y4LaiFXyJZ8=";
+  };
+
+  patches = [
+    # driver_init: load libva-x11.so for any ABI version
+    (fetchurl {
+      url = "https://github.com/01org/intel-hybrid-driver/pull/26.diff";
+      sha256 = "1ql4mbi5x1d2a5c8mkjvciaq60zj8nhx912992winbhfkyvpb3gx";
+    })
+  ];
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  buildInputs = [ cmrt libdrm libva libX11 libGL wayland ];
+
+  enableParallelBuilding = true;
+
+  # Workaround build failure on -fno-common toolchains like upstream gcc-10.
+  env.NIX_CFLAGS_COMPILE = "-fcommon";
+
+  configureFlags = [
+    "--enable-drm"
+    "--enable-x11"
+    "--enable-wayland"
+  ];
+
+  postPatch = ''
+    patchShebangs ./src/shaders/gpp.py
+  '';
+
+  preConfigure = ''
+    sed -i -e "s,LIBVA_DRIVERS_PATH=.*,LIBVA_DRIVERS_PATH=$out/lib/dri," configure
+  '';
+
+  meta = with lib; {
+    homepage = "https://01.org/linuxmedia";
+    description = "Intel driver for the VAAPI library with partial HW acceleration";
+    license = licenses.mit;
+    maintainers = with maintainers; [ tadfisher ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/vaapi-vdpau/default.nix b/nixpkgs/pkgs/development/libraries/vaapi-vdpau/default.nix
new file mode 100644
index 000000000000..2e3976e3a4d2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vaapi-vdpau/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchurl, fetchpatch, libvdpau, libGLU, libGL, libva, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "libva-vdpau-driver";
+  version = "0.7.4";
+
+  src = fetchurl {
+    url = "https://www.freedesktop.org/software/vaapi/releases/${pname}/${pname}-${version}.tar.bz2";
+    sha256 = "1fcvgshzyc50yb8qqm6v6wn23ghimay23ci0p8sm8gxcy211jp0m";
+  };
+
+  patches = [
+    (fetchpatch { url = "https://src.fedoraproject.org/rpms/libva-vdpau-driver/raw/0ad71107e28a60ea453ac70e895cf64342bd58d0/f/libva-vdpau-driver-0.7.4-glext-85.patch";
+                  sha256 = "0f0v7cl7kna3jcfnxw48b9mfl0hpacw72df9vym96sa2206vqlb0"; })
+    (fetchpatch { url = "https://src.fedoraproject.org/rpms/libva-vdpau-driver/raw/0ad71107e28a60ea453ac70e895cf64342bd58d0/f/libva-vdpau-driver-0.7.4-drop-h264-api.patch";
+                  sha256 = "0q5w83jbf4qqmhwf54h906pzxgvhqv7g2vrkw7jzgnrxhhj9sj60"; })
+    (fetchpatch { url = "https://src.fedoraproject.org/rpms/libva-vdpau-driver/raw/0ad71107e28a60ea453ac70e895cf64342bd58d0/f/libva-vdpau-driver-0.7.4-fix_type.patch";
+                  sha256 = "0s5dk6aa4sm0iyicnf2fwfsrqbvr58nbp77mhjg5bvwlar7znqv7"; })
+    (fetchpatch { url = "https://src.fedoraproject.org/rpms/libva-vdpau-driver/raw/0ad71107e28a60ea453ac70e895cf64342bd58d0/f/sigfpe-crash.patch";
+                  sha256 = "15snqf60ib0xb3cnav5b2r55qv8lv2fa4p6jwxajh8wbvqpw0ibz"; })
+    (fetchpatch { url = "https://src.fedoraproject.org/rpms/libva-vdpau-driver/raw/0ad71107e28a60ea453ac70e895cf64342bd58d0/f/implement-vaquerysurfaceattributes.patch";
+                  sha256 = "1dapx3bqqblw6l2iqqw1yff6qifam8q4m2rq343kwb3dqhy2ymy5"; })
+    (fetchpatch { url = "https://github.com/gentoo/gentoo/raw/34d5cc6fcf1d76c1c2833cb534717246c221214c/x11-libs/libva-vdpau-driver/files/libva-vdpau-driver-0.7.4-include-linux-videodev2.h.patch";
+                  sha256 = "1m4is6lk580mppsx2mvdv1xifj6gvx724si4qynsm9qrdfdc9fby"; })
+  ];
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libvdpau libGLU libGL libva ];
+
+  postPatch = ''
+    sed -i -e "s,LIBVA_DRIVERS_PATH=.*,LIBVA_DRIVERS_PATH=$out/lib/dri," configure
+  '';
+
+  meta = with lib; {
+    homepage = "https://cgit.freedesktop.org/vaapi/vdpau-driver";
+    license = licenses.gpl2Plus;
+    description = "VDPAU driver for the VAAPI library";
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/valhalla/default.nix b/nixpkgs/pkgs/development/libraries/valhalla/default.nix
new file mode 100644
index 000000000000..3a699cd0823d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/valhalla/default.nix
@@ -0,0 +1,102 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, pkg-config
+, boost
+, curl
+, geos
+, libspatialite
+, luajit
+, prime-server
+, protobuf
+, python3
+, sqlite
+, zeromq
+, zlib
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "valhalla";
+  version = "3.4.0";
+
+  src = fetchFromGitHub {
+    owner = "valhalla";
+    repo = "valhalla";
+    rev = finalAttrs.version;
+    hash = "sha256-1X9vsWsgnzmXn7bCMhN2PNwtfV0RRdzRFZIrQN2PLfA=";
+    fetchSubmodules = true;
+  };
+
+  patches = [
+    # Fix build
+    (fetchpatch {
+      url = "https://github.com/valhalla/valhalla/commit/e4845b68e8ef8de9eabb359b23bf34c879e21f2b.patch";
+      hash = "sha256-xCufmXHGj1JxaMwm64JT9FPY+o0+x4glfJSYLdvHI8U=";
+    })
+
+    # Fix gcc-13 build:
+    #   https://github.com/valhalla/valhalla/pull/4154
+    (fetchpatch {
+      name = "gcc-13.patch";
+      url = "https://github.com/valhalla/valhalla/commit/ed93f30272377cc6803533a1bb94fe81d14af81c.patch";
+      hash = "sha256-w4pnOqk/Jj3unVuesE64QSecrUIVSqwK69t9xNVc4GA=";
+    })
+  ];
+
+  postPatch = ''
+    substituteInPlace src/bindings/python/CMakeLists.txt \
+      --replace "\''${Python_SITEARCH}" "${placeholder "out"}/${python3.sitePackages}"
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  cmakeFlags = [
+    "-DENABLE_TESTS=OFF"
+    "-DENABLE_BENCHMARKS=OFF"
+  ];
+
+  env.NIX_CFLAGS_COMPILE = toString [
+    # Needed for date submodule with GCC 12 https://github.com/HowardHinnant/date/issues/750
+    "-Wno-error=stringop-overflow"
+  ];
+
+  buildInputs = [
+    boost
+    curl
+    geos
+    libspatialite
+    luajit
+    prime-server
+    protobuf
+    python3
+    sqlite
+    zeromq
+    zlib
+  ];
+
+  postFixup = ''
+    substituteInPlace "$out"/lib/pkgconfig/libvalhalla.pc \
+      --replace '=''${prefix}//' '=/' \
+      --replace '=''${exec_prefix}//' '=/'
+  '';
+
+  passthru.tests = {
+    pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+  };
+
+  meta = with lib; {
+    changelog = "https://github.com/valhalla/valhalla/blob/${finalAttrs.src.rev}/CHANGELOG.md";
+    description = "Open Source Routing Engine for OpenStreetMap";
+    homepage = "https://valhalla.readthedocs.io/";
+    license = licenses.mit;
+    maintainers = [ maintainers.Thra11 ];
+    pkgConfigModules = [ "libvalhalla" ];
+    platforms = platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/vapoursynth-mvtools/default.nix b/nixpkgs/pkgs/development/libraries/vapoursynth-mvtools/default.nix
new file mode 100644
index 000000000000..54d9bad1644f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vapoursynth-mvtools/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook,
+  vapoursynth, nasm, fftwFloat
+}:
+
+stdenv.mkDerivation rec {
+  pname = "vapoursynth-mvtools";
+  version = "23";
+
+  src = fetchFromGitHub {
+    owner  = "dubhater";
+    repo   = "vapoursynth-mvtools";
+    rev    = "v${version}";
+    sha256 = "0lngkvxnzn82rz558nvl96rvclrck07ja1pny7wcfixp9b68ppkn";
+  };
+
+  nativeBuildInputs = [ pkg-config autoreconfHook ];
+  buildInputs = [
+    nasm vapoursynth fftwFloat
+  ];
+
+  configureFlags = [ "--libdir=$(out)/lib/vapoursynth" ];
+
+  meta = with lib; {
+    description = "A set of filters for motion estimation and compensation";
+    homepage = "https://github.com/dubhater/vapoursynth-mvtools";
+    license  = licenses.gpl2;
+    maintainers = with maintainers; [ rnhmjoj ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/vapoursynth/0001-Call-weak-function-to-allow-adding-preloaded-plugins.patch b/nixpkgs/pkgs/development/libraries/vapoursynth/0001-Call-weak-function-to-allow-adding-preloaded-plugins.patch
new file mode 100644
index 000000000000..72ec48f020b2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vapoursynth/0001-Call-weak-function-to-allow-adding-preloaded-plugins.patch
@@ -0,0 +1,74 @@
+From 439e2effe1cc372925daf6d5c28569663ffb93ed Mon Sep 17 00:00:00 2001
+From: Tadeo Kondrak <me@tadeo.ca>
+Date: Mon, 25 Jan 2021 11:17:44 -0700
+Subject: [PATCH] Call weak function to allow adding preloaded plugins after
+ compile
+
+---
+ src/core/vscore.cpp | 19 +++++++++++++++++++
+ src/core/vscore.h   |  5 +++++
+ 2 files changed, 24 insertions(+)
+
+diff --git a/src/core/vscore.cpp b/src/core/vscore.cpp
+index f8e69062..4ce4c623 100644
+--- a/src/core/vscore.cpp
++++ b/src/core/vscore.cpp
+@@ -1791,6 +1791,20 @@ void VSCore::destroyFilterInstance(VSNode *node) {
+     freeDepth--;
+ }
+ 
++extern "C" {
++void __attribute__((weak)) VSLoadPluginsNix(void (*load)(void *data, const char *path), void *data);
++
++struct VSLoadPluginsNixCallbackData {
++    VSCore *core;
++    const char *filter;
++};
++
++static void VSLoadPluginsNixCallback(void *data, const char *path) {
++    auto callbackData = static_cast<VSLoadPluginsNixCallbackData *>(data);
++    callbackData->core->loadAllPluginsInPath(path, callbackData->filter);
++}
++}
++
+ VSCore::VSCore(int flags) :
+     numFilterInstances(1),
+     numFunctionInstances(0),
+@@ -1918,6 +1932,11 @@ VSCore::VSCore(int flags) :
+     } // If neither exists, an empty string will do.
+ #endif
+ 
++    if (VSLoadPluginsNix != nullptr) {
++        VSLoadPluginsNixCallbackData data{this, filter.c_str()};
++        VSLoadPluginsNix(VSLoadPluginsNixCallback, &data);
++    }
++
+     VSMap *settings = readSettings(configFile);
+     const char *error = vs_internal_vsapi.mapGetError(settings);
+     if (error) {
+diff --git a/src/core/vscore.h b/src/core/vscore.h
+index 2ce0f56b..2982b133 100644
+--- a/src/core/vscore.h
++++ b/src/core/vscore.h
+@@ -985,6 +985,9 @@ public:
+     std::string getV3ArgString() const;
+ };
+ 
++extern "C" {
++static void VSLoadPluginsNixCallback(void *data, const char *path);
++}
+ 
+ struct VSPlugin {
+     friend struct VSPluginFunction;
+@@ -1140,6 +1143,8 @@ public:
+ 
+     explicit VSCore(int flags);
+     void freeCore();
++
++    friend void VSLoadPluginsNixCallback(void *data, const char *path);
+ };
+ 
+ #endif // VSCORE_H
+-- 
+2.32.0
+
diff --git a/nixpkgs/pkgs/development/libraries/vapoursynth/default.nix b/nixpkgs/pkgs/development/libraries/vapoursynth/default.nix
new file mode 100644
index 000000000000..242294462ed6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vapoursynth/default.nix
@@ -0,0 +1,67 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook, makeWrapper
+, runCommandCC, runCommand, vapoursynth, writeText, patchelf, buildEnv
+, zimg, libass, python3, libiconv, testers
+, ApplicationServices
+}:
+
+stdenv.mkDerivation rec {
+  pname = "vapoursynth";
+  version = "65";
+
+  src = fetchFromGitHub {
+    owner  = "vapoursynth";
+    repo   = "vapoursynth";
+    rev    = "R${version}";
+    sha256 = "sha256-HrTXhRoKSFeLXYQM7W2FvYf7yCD1diSZGtPop9urrSk=";
+  };
+
+  patches = [
+    ./0001-Call-weak-function-to-allow-adding-preloaded-plugins.patch
+  ];
+
+  nativeBuildInputs = [ pkg-config autoreconfHook makeWrapper ];
+  buildInputs = [
+    zimg libass
+    (python3.withPackages (ps: with ps; [ sphinx cython ]))
+  ] ++ lib.optionals stdenv.isDarwin [ libiconv ApplicationServices ];
+
+  enableParallelBuilding = true;
+
+  passthru = rec {
+    # If vapoursynth is added to the build inputs of mpv and then
+    # used in the wrapping of it, we want to know once inside the
+    # wrapper, what python3 version was used to build vapoursynth so
+    # the right python3.sitePackages will be used there.
+    inherit python3;
+
+    withPlugins = import ./plugin-interface.nix {
+      inherit lib python3 buildEnv writeText runCommandCC stdenv runCommand
+        vapoursynth makeWrapper withPlugins;
+    };
+
+    tests.version = testers.testVersion {
+      package = vapoursynth;
+      # Check Core version to prevent false positive with API version
+      version = "Core R${version}";
+    };
+  };
+
+  postInstall = ''
+    wrapProgram $out/bin/vspipe \
+        --prefix PYTHONPATH : $out/${python3.sitePackages}
+
+    # VapourSynth does not include any plugins by default
+    # and emits a warning when the system plugin directory does not exist.
+    mkdir $out/lib/vapoursynth
+  '';
+
+  meta = with lib; {
+    broken = stdenv.isDarwin; # see https://github.com/NixOS/nixpkgs/pull/189446 for partial fix
+    description = "A video processing framework with the future in mind";
+    homepage    = "http://www.vapoursynth.com/";
+    license     = licenses.lgpl21;
+    platforms   = platforms.x86_64;
+    maintainers = with maintainers; [ rnhmjoj sbruder tadeokondrak ];
+    mainProgram = "vspipe";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/vapoursynth/editor.nix b/nixpkgs/pkgs/development/libraries/vapoursynth/editor.nix
new file mode 100644
index 000000000000..2b4b1d5767b1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vapoursynth/editor.nix
@@ -0,0 +1,59 @@
+{ lib, mkDerivation, fetchFromGitHub, makeWrapper, runCommand
+, python3, vapoursynth
+, qmake, qtbase, qtwebsockets
+}:
+
+let
+  unwrapped = mkDerivation rec {
+    pname = "vapoursynth-editor";
+    version = "R19-mod-4";
+
+    src = fetchFromGitHub {
+      owner = "YomikoR";
+      repo = pname;
+      rev = lib.toLower version;
+      sha256 = "sha256-+/9j9DJDGXbuTvE8ZXIu6wjcof39SyatS36Q6y9hLPg=";
+    };
+
+    nativeBuildInputs = [ qmake ];
+    buildInputs = [ qtbase vapoursynth qtwebsockets ];
+
+    dontWrapQtApps = true;
+
+    preConfigure = "cd pro";
+
+    preFixup = ''
+      cd ../build/release*
+      mkdir -p $out/bin
+      for bin in vsedit{,-job-server{,-watcher}}; do
+          mv $bin $out/bin
+          wrapQtApp $out/bin/$bin
+      done
+    '';
+
+    passthru = { inherit withPlugins; };
+
+    meta = with lib; {
+      description = "Cross-platform editor for VapourSynth scripts";
+      homepage = "https://github.com/YomikoR/VapourSynth-Editor";
+      license = licenses.mit;
+      maintainers = with maintainers; [ tadeokondrak ];
+      platforms = platforms.all;
+    };
+  };
+
+  withPlugins = plugins: let
+    vapoursynthWithPlugins = vapoursynth.withPlugins plugins;
+  in runCommand "${unwrapped.name}-with-plugins" {
+    nativeBuildInputs = [ makeWrapper ];
+    passthru = { withPlugins = plugins': withPlugins (plugins ++ plugins'); };
+  } ''
+    mkdir -p $out/bin
+    for bin in vsedit{,-job-server{,-watcher}}; do
+        makeWrapper ${unwrapped}/bin/$bin $out/bin/$bin \
+            --prefix PYTHONPATH : ${vapoursynthWithPlugins}/${python3.sitePackages} \
+            --prefix LD_LIBRARY_PATH : ${vapoursynthWithPlugins}/lib
+    done
+  '';
+in
+  withPlugins []
diff --git a/nixpkgs/pkgs/development/libraries/vapoursynth/plugin-interface.nix b/nixpkgs/pkgs/development/libraries/vapoursynth/plugin-interface.nix
new file mode 100644
index 000000000000..f962634b131e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vapoursynth/plugin-interface.nix
@@ -0,0 +1,114 @@
+{ lib, python3, buildEnv, writeText, runCommandCC, stdenv, runCommand
+, vapoursynth, makeWrapper, withPlugins }:
+
+plugins: let
+  pythonEnvironment = python3.buildEnv.override {
+    extraLibs = plugins;
+  };
+
+  getRecursivePropagatedBuildInputs = pkgs: lib.flatten
+    (map
+      (pkg: let cleanPropagatedBuildInputs = lib.filter lib.isDerivation pkg.propagatedBuildInputs;
+        in cleanPropagatedBuildInputs ++ (getRecursivePropagatedBuildInputs cleanPropagatedBuildInputs))
+      pkgs);
+
+  deepPlugins = lib.unique (plugins ++ (getRecursivePropagatedBuildInputs plugins));
+
+  pluginsEnv = buildEnv {
+    name = "vapoursynth-plugins-env";
+    pathsToLink = [ "/lib/vapoursynth" ];
+    paths = deepPlugins;
+  };
+
+  pluginLoader = let
+    source = writeText "vapoursynth-nix-plugins.c" ''
+      void VSLoadPluginsNix(void (*load)(void *data, const char *path), void *data) {
+      ${lib.concatMapStringsSep "" (path: "load(data, \"${path}/lib/vapoursynth\");") deepPlugins}
+      }
+    '';
+  in
+  runCommandCC "vapoursynth-plugin-loader" {
+    executable = true;
+    preferLocalBuild = true;
+    allowSubstitutes = false;
+  } ''
+    mkdir -p $out/lib
+    $CC -shared -fPIC ${source} -o "$out/lib/libvapoursynth-nix-plugins${ext}"
+  '';
+
+  ext = stdenv.hostPlatform.extensions.sharedLibrary;
+in
+runCommand "${vapoursynth.name}-with-plugins" {
+  nativeBuildInputs = [ makeWrapper ];
+  passthru = {
+    inherit python3;
+    inherit (vapoursynth) src version;
+    withPlugins = plugins': withPlugins (plugins ++ plugins');
+  };
+} ''
+  mkdir -p \
+    $out/bin \
+    $out/lib/pkgconfig \
+    $out/lib/vapoursynth \
+    $out/${python3.sitePackages}
+
+  for textFile in \
+      lib/pkgconfig/vapoursynth{,-script}.pc \
+      lib/libvapoursynth.la \
+      lib/libvapoursynth-script.la \
+      ${python3.sitePackages}/vapoursynth.la
+  do
+      substitute ${vapoursynth}/$textFile $out/$textFile \
+          --replace "${vapoursynth}" "$out"
+  done
+
+  for binaryPlugin in ${pluginsEnv}/lib/vapoursynth/*; do
+      ln -s $binaryPlugin $out/''${binaryPlugin#"${pluginsEnv}/"}
+  done
+
+  for pythonPlugin in ${pythonEnvironment}/${python3.sitePackages}/*; do
+      ln -s $pythonPlugin $out/''${pythonPlugin#"${pythonEnvironment}/"}
+  done
+
+  for binaryFile in \
+      lib/libvapoursynth${ext} \
+      lib/libvapoursynth-script${ext}.0.0.0
+  do
+    old_rpath=$(patchelf --print-rpath ${vapoursynth}/$binaryFile)
+    new_rpath="$old_rpath:$out/lib"
+    patchelf \
+        --set-rpath "$new_rpath" \
+        --output $out/$binaryFile \
+        ${vapoursynth}/$binaryFile
+    patchelf \
+        --add-needed libvapoursynth-nix-plugins${ext} \
+        $out/$binaryFile
+  done
+
+  for binaryFile in \
+      ${python3.sitePackages}/vapoursynth${ext} \
+      bin/.vspipe-wrapped
+  do
+      old_rpath=$(patchelf --print-rpath ${vapoursynth}/$binaryFile)
+      new_rpath="''${old_rpath//"${vapoursynth}"/"$out"}"
+      patchelf \
+          --set-rpath "$new_rpath" \
+          --output $out/$binaryFile \
+          ${vapoursynth}/$binaryFile
+  done
+
+  ln -s \
+      ${pluginLoader}/lib/libvapoursynth-nix-plugins${ext} \
+      $out/lib/libvapoursynth-nix-plugins${ext}
+  ln -s ${vapoursynth}/include $out/include
+  ln -s ${vapoursynth}/lib/vapoursynth/* $out/lib/vapoursynth
+  ln -s \
+      libvapoursynth-script${ext}.0.0.0 \
+      $out/lib/libvapoursynth-script${ext}
+  ln -s \
+      libvapoursynth-script${ext}.0.0.0 \
+      $out/lib/libvapoursynth-script${ext}.0
+
+  makeWrapper $out/bin/.vspipe-wrapped $out/bin/vspipe \
+      --prefix PYTHONPATH : $out/${python3.sitePackages}
+''
diff --git a/nixpkgs/pkgs/development/libraries/vc/0.7.nix b/nixpkgs/pkgs/development/libraries/vc/0.7.nix
new file mode 100644
index 000000000000..50eaddda890e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vc/0.7.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "Vc";
+  version = "0.7.5";
+
+  src = fetchFromGitHub {
+    owner = "VcDevel";
+    repo = "Vc";
+    rev = version;
+    sha256 = "190s4r2n3jsivl4j2m288j3rqmgjj6gl308hi9mzwyhcfn17q8br";
+  };
+
+  # Avoid requesting an unreasonable intrinsic
+  patches = lib.optional stdenv.cc.isClang ./vc_0_7_clang_fix.patch;
+
+  nativeBuildInputs = [ cmake ];
+
+  postPatch = ''
+    sed -i '/OptimizeForArchitecture()/d' cmake/VcMacros.cmake
+    sed -i '/AutodetectHostArchitecture()/d' print_target_architecture.cmake
+  '';
+
+  meta = with lib; {
+    description = "Library for multiprecision complex arithmetic with exact rounding";
+    homepage = "https://github.com/VcDevel/Vc";
+    license = licenses.bsd3;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ abbradar ];
+    # never built on aarch64-darwin since first introduction in nixpkgs
+    broken = (stdenv.isDarwin && stdenv.isAarch64) || (stdenv.isLinux && stdenv.isAarch64);
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/vc/default.nix b/nixpkgs/pkgs/development/libraries/vc/default.nix
new file mode 100644
index 000000000000..02b202365b9b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vc/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "Vc";
+  version = "1.4.4";
+
+  src = fetchFromGitHub {
+    owner = "VcDevel";
+    repo = "Vc";
+    rev = version;
+    sha256 = "sha256-tbHDGbul68blBAvok17oz7AfhHpEY9Y7RIEsqCQvOJ0=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  postPatch = ''
+    sed -i '/OptimizeForArchitecture()/d' cmake/VcMacros.cmake
+    sed -i '/AutodetectHostArchitecture()/d' print_target_architecture.cmake
+  '';
+
+  meta = with lib; {
+    description = "Library for multiprecision complex arithmetic with exact rounding";
+    homepage = "https://github.com/VcDevel/Vc";
+    license = licenses.bsd3;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ abbradar ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/vc/vc_0_7_clang_fix.patch b/nixpkgs/pkgs/development/libraries/vc/vc_0_7_clang_fix.patch
new file mode 100644
index 000000000000..29ea6f529490
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vc/vc_0_7_clang_fix.patch
@@ -0,0 +1,28 @@
+diff -ur a/sse/intrinsics.h b/sse/intrinsics.h
+--- a/sse/intrinsics.h	2021-11-12 22:09:50.000000000 -0500
++++ b/sse/intrinsics.h	2021-11-12 22:14:08.000000000 -0500
+@@ -498,16 +498,6 @@
+         case 0:
+             f = _mm_cvtss_f32(v);
+             break;
+-#if defined VC_IMPL_SSE4_1 && !defined VC_MSVC
+-        default:
+-#ifdef VC_GCC
+-            f = __builtin_ia32_vec_ext_v4sf(static_cast<__v4sf>(v), (i));
+-#else
+-            // MSVC fails to compile this because it can't optimize i to an immediate
+-            _MM_EXTRACT_FLOAT(f, v, i);
+-#endif
+-            break;
+-#else
+         case 1:
+             f = _mm_cvtss_f32(_mm_castsi128_ps(_mm_srli_si128(_mm_castps_si128(v), 4)));
+             break;
+@@ -517,7 +507,6 @@
+         case 3:
+             f = _mm_cvtss_f32(_mm_castsi128_ps(_mm_srli_si128(_mm_castps_si128(v), 12)));
+             break;
+-#endif
+         }
+         return f;
+     }
diff --git a/nixpkgs/pkgs/development/libraries/vcdimager/default.nix b/nixpkgs/pkgs/development/libraries/vcdimager/default.nix
new file mode 100644
index 000000000000..5c3140a177c3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vcdimager/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, lib, fetchurl, pkg-config, libcdio, libxml2, popt
+, libiconv, darwin }:
+
+stdenv.mkDerivation rec {
+  pname = "vcdimager";
+  version = "2.0.1";
+
+  src = fetchurl {
+    url = "mirror://gnu/vcdimager/${pname}-${version}.tar.gz";
+    sha256 = "0ypnb1vp49nmzp5571ynlz6n1gh90f23w3z4x95hb7c2p7pmylb7";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ libxml2 popt libiconv ]
+             ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ IOKit DiskArbitration ]);
+
+  propagatedBuildInputs = [ libcdio ];
+
+  meta = with lib; {
+    homepage = "https://www.gnu.org/software/vcdimager/";
+    description = "Full-featured mastering suite for authoring, disassembling and analyzing Video CDs and Super Video CDs";
+    platforms = platforms.unix;
+    license = licenses.gpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/vcg/default.nix b/nixpkgs/pkgs/development/libraries/vcg/default.nix
new file mode 100644
index 000000000000..62b39c05395e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vcg/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchFromGitHub, eigen }:
+
+stdenv.mkDerivation rec {
+  pname = "vcg";
+  version = "2023.12";
+
+  src = fetchFromGitHub {
+    owner = "cnr-isti-vclab";
+    repo = "vcglib";
+    rev = version;
+    sha256 = "sha256-U3pu1k2pCH+G4CtacaDQ9SgkFX5A9/O/qrdpgWvB1+U=";
+  };
+
+  propagatedBuildInputs = [ eigen ];
+
+  installPhase = ''
+    mkdir -p $out/include
+    cp -r vcg wrap $out/include
+    find $out -name \*.h -exec sed -i 's,<eigenlib/,<eigen3/,g' {} \;
+  '';
+
+  meta = with lib; {
+    homepage = "https://vcg.isti.cnr.it/vcglib/install.html";
+    description = "C++ library for manipulation, processing and displaying with OpenGL of triangle and tetrahedral meshes";
+    license = licenses.gpl3;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ abbradar ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/vectorscan/default.nix b/nixpkgs/pkgs/development/libraries/vectorscan/default.nix
new file mode 100644
index 000000000000..12fa0735b27f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vectorscan/default.nix
@@ -0,0 +1,59 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, ragel
+, util-linux
+, python3
+, boost
+, enableShared ? !stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+  pname = "vectorscan";
+  version = "5.4.10.1";
+
+  src = fetchFromGitHub {
+    owner = "VectorCamp";
+    repo = "vectorscan";
+    rev = "vectorscan/${version}";
+    hash = "sha256-x6FefOrUvpN/A4GXTd+3SGZEAQL6pXt83ufxRIY3Q9k=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    ragel
+    python3
+  ] ++ lib.optional stdenv.isLinux util-linux;
+
+  buildInputs = [
+    boost
+  ];
+
+  cmakeFlags = lib.optional enableShared "-DBUILD_STATIC_AND_SHARED=ON"
+    ++ [ "-DFAT_RUNTIME=${if stdenv.hostPlatform.isLinux then "ON" else "OFF"}" ]
+    ++ lib.optional stdenv.hostPlatform.avx2Support "-DBUILD_AVX2=ON"
+    ++ lib.optional stdenv.hostPlatform.avx512Support "-DBUILD_AVX512=ON"
+  ;
+
+  meta = with lib; {
+    description = "A portable fork of the high-performance regular expression matching library";
+    longDescription = ''
+      A fork of Intel's Hyperscan, modified to run on more platforms. Currently
+      ARM NEON/ASIMD is 100% functional, and Power VSX are in development.
+      ARM SVE2 will be implemented when hardware becomes accessible to the
+      developers. More platforms will follow in the future, on demand/request.
+
+      Vectorscan will follow Intel's API and internal algorithms where possible,
+      but will not hesitate to make code changes where it is thought of giving
+      better performance or better portability. In addition, the code will be
+      gradually simplified and made more uniform and all architecture specific
+      code will be abstracted away.
+    '';
+    homepage = "https://www.vectorcamp.gr/vectorscan/";
+    changelog = "https://github.com/VectorCamp/vectorscan/blob/${src.rev}/CHANGELOG-vectorscan.md";
+    platforms = platforms.unix;
+    license = with licenses; [ bsd3 /* and */ bsd2 /* and */ licenses.boost ];
+    maintainers = with maintainers; [ tnias vlaci ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/vid-stab/default.nix b/nixpkgs/pkgs/development/libraries/vid-stab/default.nix
new file mode 100644
index 000000000000..a1eb5cf53e5d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vid-stab/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, cmake, openmp }:
+
+stdenv.mkDerivation rec {
+  pname = "vid.stab";
+  version = "unstable-2022-05-30";
+
+  src = fetchFromGitHub {
+    owner = "georgmartius";
+    repo = pname;
+    rev = "90c76aca2cb06c3ff6f7476a7cd6851b39436656";
+    sha256 = "sha256-p1VRnkBeUpET3O2FmaJMyN5/EoSOQLdmRIVbzZcQaKY=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  propagatedBuildInputs = lib.optionals stdenv.cc.isClang [ openmp ];
+
+  meta = with lib; {
+    description = "Video stabilization library";
+    homepage = "http://public.hronopik.de/vid.stab/";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ codyopel ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/vigra/default.nix b/nixpkgs/pkgs/development/libraries/vigra/default.nix
new file mode 100644
index 000000000000..677406d275a8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vigra/default.nix
@@ -0,0 +1,60 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, boost
+, cmake
+, fftw
+, fftwSinglePrec
+, hdf5
+, ilmbase
+, libjpeg
+, libpng
+, libtiff
+, openexr
+, python3
+}:
+
+let
+  python = python3.withPackages (py: with py; [ numpy ]);
+in
+stdenv.mkDerivation rec {
+  pname = "vigra";
+  version = "unstable-2022-01-11";
+
+  src = fetchFromGitHub {
+    owner = "ukoethe";
+    repo = "vigra";
+    rev = "093d57d15c8c237adf1704d96daa6393158ce299";
+    sha256 = "sha256-pFANoT00Wkh1/Dyd2x75IVTfyaoVA7S86tafUSr29Og=";
+  };
+
+  env.NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR";
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [
+    boost
+    fftw
+    fftwSinglePrec
+    hdf5
+    ilmbase
+    libjpeg
+    libpng
+    libtiff
+    openexr
+    python
+  ];
+
+  preConfigure = "cmakeFlags+=\" -DVIGRANUMPY_INSTALL_DIR=$out/${python.sitePackages}\"";
+
+  cmakeFlags = [ "-DWITH_OPENEXR=1" ]
+    ++ lib.optionals (stdenv.hostPlatform.system == "x86_64-linux")
+    [ "-DCMAKE_CXX_FLAGS=-fPIC" "-DCMAKE_C_FLAGS=-fPIC" ];
+
+  meta = with lib; {
+    description = "Novel computer vision C++ library with customizable algorithms and data structures";
+    homepage = "https://hci.iwr.uni-heidelberg.de/vigra";
+    license = licenses.mit;
+    maintainers = [ maintainers.viric ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/virglrenderer/default.nix b/nixpkgs/pkgs/development/libraries/virglrenderer/default.nix
new file mode 100644
index 000000000000..fa67cbb7edd7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/virglrenderer/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchurl, meson, ninja, pkg-config, python3
+, libGLU, libepoxy, libX11, libdrm, mesa, gitUpdater
+}:
+
+stdenv.mkDerivation rec {
+  pname = "virglrenderer";
+  version = "1.0.1";
+
+  src = fetchurl {
+    url = "https://gitlab.freedesktop.org/virgl/virglrenderer/-/archive/${version}/virglrenderer-${version}.tar.bz2";
+    hash = "sha256-U8uPrdCPUmDuV4M/wkiFZUgUOLx6jjTz4RTRLMnZ25o=";
+  };
+
+  separateDebugInfo = true;
+
+  buildInputs = [ libGLU libepoxy libX11 libdrm mesa ];
+
+  nativeBuildInputs = [ meson ninja pkg-config python3 ];
+
+  passthru = {
+    updateScript = gitUpdater {
+      url = "https://gitlab.freedesktop.org/virgl/virglrenderer.git";
+      rev-prefix = "virglrenderer-";
+    };
+  };
+
+  meta = with lib; {
+    description = "A virtual 3D GPU library that allows a qemu guest to use the host GPU for accelerated 3D rendering";
+    homepage = "https://virgil3d.github.io/";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.xeji ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/virtualpg/default.nix b/nixpkgs/pkgs/development/libraries/virtualpg/default.nix
new file mode 100644
index 000000000000..277ca47d66e3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/virtualpg/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl, validatePkgConfig, postgresql, sqlite }:
+
+stdenv.mkDerivation rec {
+  pname = "virtualpg";
+  version = "2.0.1";
+
+  src = fetchurl {
+    url = "https://www.gaia-gis.it/gaia-sins/virtualpg-${version}.tar.gz";
+    hash = "sha256-virr64yf8nQ4IIX1HUIugjhYvKT2vC+pCYFkZMah4Is=";
+  };
+
+  nativeBuildInputs = [
+    validatePkgConfig
+    postgresql  # for pg_config
+  ];
+
+  buildInputs = [ postgresql sqlite ];
+
+  meta = with lib; {
+    description = "Loadable dynamic extension to both SQLite and SpatiaLite";
+    homepage = "https://www.gaia-gis.it/fossil/virtualpg";
+    license = with licenses; [ mpl11 gpl2Plus lgpl21Plus ];
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ sikmir ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/vk-bootstrap/default.nix b/nixpkgs/pkgs/development/libraries/vk-bootstrap/default.nix
new file mode 100644
index 000000000000..bc43da3567d8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vk-bootstrap/default.nix
@@ -0,0 +1,43 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, vulkan-headers
+, glfw
+, catch2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "vk-bootstrap";
+  version = "0.7";
+  outputs = [ "out" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "charles-lunarg";
+    repo = "vk-bootstrap";
+    rev = "v${version}";
+    hash = "sha256-X3ANqfplrCF1R494+H5/plcwMH7rbW6zpLA4MZrYaoE=";
+  };
+
+  postPatch = ''
+    # Upstream uses cmake FetchContent to resolve glfw and catch2
+    # needed for examples and tests
+    sed -iE 's=add_subdirectory(ext)==g' CMakeLists.txt
+    sed -iE 's=Catch2==g' tests/CMakeLists.txt
+  '';
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ vulkan-headers glfw catch2 ];
+
+  cmakeFlags = [
+    "-DVK_BOOTSTRAP_VULKAN_HEADER_DIR=${vulkan-headers}/include"
+  ];
+
+  meta = with lib; {
+    description = "Vulkan Bootstrapping Library";
+    license = licenses.mit;
+    homepage = "https://github.com/charles-lunarg/vk-bootstrap";
+    maintainers = with maintainers; [ shamilton ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/vkd3d-proton/default.nix b/nixpkgs/pkgs/development/libraries/vkd3d-proton/default.nix
new file mode 100644
index 000000000000..7616db1e021e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vkd3d-proton/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv, fetchFromGitHub, meson, ninja, wine, glslang }:
+
+let
+  # these are both embedded in the output files
+  rev = "83308675078e9ea263fa8c37af95afdd15b3ab71";
+  # git describe --tags
+  shortRev = builtins.substring 0 8 rev;
+  realVersion = "v2.8-302-g${shortRev}";
+in
+
+stdenv.mkDerivation rec {
+  pname = "vkd3d-proton";
+  version = "unstable-2023-04-21";
+
+  nativeBuildInputs = [ meson ninja wine glslang ];
+
+  src = fetchFromGitHub {
+    owner = "HansKristian-Work";
+    repo = pname;
+    inherit rev;
+    sha256 = "sha256-iLpVvYmWhqy0rbbyJoT+kxzIqp68Vsb/TkihGtQQucU=";
+    fetchSubmodules = true;
+  };
+
+  prePatch = ''
+    substituteInPlace meson.build \
+      --replace "vkd3d_build = vcs_tag(" \
+                "vkd3d_build = vcs_tag( fallback : '${shortRev}'", \
+      --replace "vkd3d_version = vcs_tag(" \
+                "vkd3d_version = vcs_tag( fallback : '${realVersion}'",
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/HansKristian-Work/vkd3d-proton";
+    description =
+      "A fork of VKD3D, which aims to implement the full Direct3D 12 API on top of Vulkan";
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ expipiplus1 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/vkd3d/default.nix b/nixpkgs/pkgs/development/libraries/vkd3d/default.nix
new file mode 100644
index 000000000000..087a56df970f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vkd3d/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitLab, autoreconfHook, pkg-config, wine, flex, bison
+, vulkan-headers, spirv-headers, vulkan-loader }:
+
+stdenv.mkDerivation rec {
+  pname = "vkd3d";
+  version = "1.10";
+
+  nativeBuildInputs = [ autoreconfHook pkg-config wine flex bison ];
+  buildInputs = [ vulkan-loader vulkan-headers spirv-headers ];
+
+  src = fetchFromGitLab {
+    domain = "gitlab.winehq.org";
+    owner = "wine";
+    repo = pname;
+    rev = "${pname}-${version}";
+    sha256 = "sha256-/5tc8agqpRbFRnfv8O1fBo2SPNOuO6exs0BZ9MnOTA0=";
+  };
+
+  meta = with lib; {
+    homepage = "https://gitlab.winehq.org/wine/vkd3d";
+    description = "A 3D graphics library with an API very similar, but not identical, to Direct3D 12";
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ expipiplus1 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/vmime/default.nix b/nixpkgs/pkgs/development/libraries/vmime/default.nix
new file mode 100644
index 000000000000..c2b585965b05
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vmime/default.nix
@@ -0,0 +1,33 @@
+{lib, stdenv, fetchFromGitHub
+, gsasl, gnutls, pkg-config, cmake, zlib, libtasn1, libgcrypt, gtk3
+# this will not work on non-nixos systems
+, sendmailPath ? "/run/wrappers/bin/sendmail"
+}:
+
+stdenv.mkDerivation rec {
+  pname = "vmime";
+  # XXX: using unstable rev for now to comply with the removal of
+  # deprecated symbols in the latest release of gsasl
+  version = "unstable-2022-03-26";
+  src = fetchFromGitHub {
+    owner = "kisli";
+    repo = "vmime";
+    rev = "fc69321d5304c73be685c890f3b30528aadcfeaf";
+    sha256 = "sha256-DUcGQcT7hp5Rs2Z5C8wo+3BYwWqED0KrF3h3vgLiiow=";
+  };
+
+  buildInputs = [ gsasl gnutls zlib libtasn1 libgcrypt gtk3 ];
+  nativeBuildInputs = [ pkg-config cmake ];
+
+  cmakeFlags = [
+    "-DVMIME_SENDMAIL_PATH=${sendmailPath}"
+  ];
+
+  meta = {
+    homepage = "https://www.vmime.org/";
+    description = "Free mail library for C++";
+    license = lib.licenses.gpl3;
+    maintainers = with lib.maintainers; [viric];
+    platforms = with lib.platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/vmmlib/default.nix b/nixpkgs/pkgs/development/libraries/vmmlib/default.nix
new file mode 100644
index 000000000000..921284bca481
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vmmlib/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, boost, lapack
+, Accelerate, CoreGraphics, CoreVideo
+}:
+
+stdenv.mkDerivation rec {
+  version = "1.6.2";
+  pname = "vmmlib";
+
+  src = fetchFromGitHub {
+    owner = "VMML";
+    repo = "vmmlib";
+    rev = "release-${version}";
+    sha256 = "0sn6jl1r5k6ka0vkjsdnn14hb95dqq8158dapby6jk72wqj9kdml";
+  };
+
+  patches = [
+    ./disable-cpack.patch   #disable the need of cpack/rpm
+  ];
+
+  nativeBuildInputs = [ pkg-config cmake ];
+  buildInputs = [ boost lapack ]
+    ++ lib.optionals stdenv.isDarwin [ Accelerate CoreGraphics CoreVideo ];
+
+  doCheck = !stdenv.isDarwin;
+
+  checkTarget = "test";
+
+  meta = with lib; {
+    broken = stdenv.isDarwin;
+    description = "A vector and matrix math library implemented using C++ templates";
+
+    longDescription = ''vmmlib is a vector and matrix math library implemented
+            using C++ templates. Its basic functionality includes a vector
+            and a matrix class, with additional functionality for the
+            often-used 3d and 4d vectors and 3x3 and 4x4 matrices.
+            More advanced functionality include solvers, frustum
+            computations and frustum culling classes, and spatial data structures'';
+
+    license     = licenses.bsd2;
+    homepage    = "https://github.com/VMML/vmmlib/";
+    maintainers = [ maintainers.adev ];
+    platforms   = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/vmmlib/disable-cpack.patch b/nixpkgs/pkgs/development/libraries/vmmlib/disable-cpack.patch
new file mode 100644
index 000000000000..8b9a7983a928
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vmmlib/disable-cpack.patch
@@ -0,0 +1,11 @@
+diff -ur a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt	1970-01-01 00:00:01.000000000 +0000
++++ b/CMakeLists.txt	2016-02-19 08:49:30.053759000 +0000
+@@ -178,6 +178,5 @@
+ install(FILES ${DOCS} DESTINATION share/vmmlib COMPONENT dev)
+ 
+ include(DoxygenRule) # must be after all targets
+-include(CPackConfig)
+ include(CTest)
+-include(PackageConfig)
++
diff --git a/nixpkgs/pkgs/development/libraries/vo-aacenc/default.nix b/nixpkgs/pkgs/development/libraries/vo-aacenc/default.nix
new file mode 100644
index 000000000000..fb8dd43fe032
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vo-aacenc/default.nix
@@ -0,0 +1,19 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "vo-aacenc";
+  version = "0.1.3";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/opencore-amr/fdk-aac/${pname}-${version}.tar.gz";
+    sha256 = "sha256-5Rp0d6NZ8Y33xPgtGV2rThTnQUy9SM95zBlfxEaFDzY=";
+  };
+
+  meta = with lib; {
+    description = "VisualOn AAC encoder library";
+    homepage    = "https://sourceforge.net/projects/opencore-amr/";
+    license     = licenses.asl20;
+    maintainers = [ maintainers.baloo ];
+    platforms   = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/vo-amrwbenc/default.nix b/nixpkgs/pkgs/development/libraries/vo-amrwbenc/default.nix
new file mode 100644
index 000000000000..e07b8cb7688d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vo-amrwbenc/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
+
+stdenv.mkDerivation rec{
+  pname = "vo-amrwbenc";
+  version = "0.1.3";
+
+  src = fetchFromGitHub {
+    owner = "mstorsjo";
+    repo = "vo-amrwbenc";
+    rev = "v${version}";
+    sha256 = "sha256-oHhoJAI47VqBGk9cO3G5oqnHpWxA2jnJs103MwcYj+w=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  meta = {
+    homepage = "https://sourceforge.net/projects/opencore-amr/";
+    description = "VisualOn Adaptive Multi Rate Wideband (AMR-WB) encoder";
+    license = lib.licenses.asl20;
+    maintainers = [ ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/volk/2.5.0.nix b/nixpkgs/pkgs/development/libraries/volk/2.5.0.nix
new file mode 100644
index 000000000000..35216cb7e31c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/volk/2.5.0.nix
@@ -0,0 +1,60 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, python3
+, enableModTool ? true
+, removeReferencesTo
+, fetchpatch
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "volk";
+  # Version 2.5.1 seems to cause a build issue for aarch64-darwin, see:
+  # https://github.com/NixOS/nixpkgs/pull/160152#issuecomment-1043380478A
+  version = "2.5.0";
+
+  src = fetchFromGitHub {
+    owner = "gnuradio";
+    repo = "volk";
+    rev = "v${finalAttrs.version}";
+    sha256 = "sha256-XvX6emv30bSB29EFm6aC+j8NGOxWqHCNv0Hxtdrq/jc=";
+    fetchSubmodules = true;
+  };
+
+  patches = [
+    (fetchpatch {
+      url = "https://raw.githubusercontent.com/macports/macports-ports/e83a55ef196d4283be438c052295b2fc44f3df5b/science/volk/files/patch-cpu_features-add-support-for-ARM64.diff";
+      sha256 = "sha256-MNUntVvKZC4zuQsxGQCItaUaaQ1d31re2qjyPFbySmI=";
+      extraPrefix = "";
+    })
+  ];
+
+  cmakeFlags = lib.optionals (!enableModTool) [
+    "-DENABLE_MODTOOL=OFF"
+  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
+    # offset 14335 in1: -1.03372 in2: -1.03371 tolerance was: 1e-05
+    # volk_32f_log2_32f: fail on arch neon
+    "-DCMAKE_CTEST_ARGUMENTS=--exclude-regex;qa_volk_32f_log2_32f"
+  ];
+
+  postInstall = lib.optionalString (!stdenv.isDarwin) ''
+    ${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc} $(readlink -f $out/lib/libvolk.so)
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    python3
+    python3.pkgs.mako
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    homepage = "http://libvolk.org/";
+    description = "The Vector Optimized Library of Kernels";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ doronbehar ];
+    platforms = platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/volk/default.nix b/nixpkgs/pkgs/development/libraries/volk/default.nix
new file mode 100644
index 000000000000..02240ac1febf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/volk/default.nix
@@ -0,0 +1,58 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, python3
+, enableModTool ? true
+, removeReferencesTo
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "volk";
+  version = "3.0.0";
+
+  src = fetchFromGitHub {
+    owner = "gnuradio";
+    repo = "volk";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-kI4IuO6TLplo5lLAGIPWQWtePcjIEWB9XaJDA6WlqSg=";
+    fetchSubmodules = true;
+  };
+  patches = [
+    # Remove a failing test
+    (fetchpatch {
+      url = "https://github.com/gnuradio/volk/commit/fe2e4a73480bf2ac2e566052ea682817dddaf61f.patch";
+      hash = "sha256-Vko/Plk7u6UAr32lieU+T9G34Dkg9EW3Noi/NArpRL4=";
+    })
+  ];
+
+  cmakeFlags = lib.optionals (!enableModTool) [
+    "-DENABLE_MODTOOL=OFF"
+  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
+    "-DVOLK_CPU_FEATURES=OFF"
+    # offset 17912 in1: -0.0366274 in2: -0.0366173 tolerance was: 1e-05
+    # volk_32f_log2_32f: fail on arch neon
+    "-DCMAKE_CTEST_ARGUMENTS=--exclude-regex;qa_volk_32f_log2_32f"
+  ];
+
+  postInstall = lib.optionalString (!stdenv.isDarwin) ''
+    ${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc} $(readlink -f $out/lib/libvolk.so)
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    python3
+    python3.pkgs.mako
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    homepage = "http://libvolk.org/";
+    description = "The Vector Optimized Library of Kernels";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ doronbehar ];
+    platforms = platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/volume-key/default.nix b/nixpkgs/pkgs/development/libraries/volume-key/default.nix
new file mode 100644
index 000000000000..2c2774521762
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/volume-key/default.nix
@@ -0,0 +1,48 @@
+{ lib, stdenv, fetchgit, autoreconfHook, pkg-config, gettext, python3
+, ncurses, swig, glib, util-linux, cryptsetup, nss, gpgme
+, autoconf, automake, libtool
+, buildPackages
+}:
+
+stdenv.mkDerivation rec {
+  pname = "volume_key";
+  version = "0.3.11";
+
+  src = fetchgit {
+    url = "https://pagure.io/volume_key.git";
+    rev = "volume_key-${version}";
+    sha256 = "1sqdbcih1c39bjiv4mm1m7acc3lfh2i2hf2r9i7rk8adfzq8awma";
+  };
+
+  outputs = [ "out" "man" "dev" "py" ];
+
+  strictDeps = true;
+
+  nativeBuildInputs = [ autoreconfHook gettext gpgme pkg-config swig ];
+
+  buildInputs = [ glib cryptsetup nss util-linux ncurses ];
+
+  configureFlags = [
+    "--with-gpgme-prefix=${gpgme.dev}"
+  ];
+
+  preConfigure = ''
+    export PYTHON="${buildPackages.python3}/bin/python"
+    export PYTHON3_CONFIG="${python3}/bin/python3-config"
+  '';
+
+  makeFlags = [
+    "pyexecdir=$(py)/${python3.sitePackages}"
+    "pythondir=$(py)/${python3.sitePackages}"
+  ];
+
+  doCheck = false; # fails 1 out of 1 tests, needs `certutil`
+
+  meta = with lib; {
+    description = "A library for manipulating storage volume encryption keys and storing them separately from volumes to handle forgotten passphrases, and the associated command-line tool";
+    homepage = "https://pagure.io/volume_key/";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/vrb/default.nix b/nixpkgs/pkgs/development/libraries/vrb/default.nix
new file mode 100644
index 000000000000..1ebc37cdf2f3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vrb/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "vrb";
+  version = "0.5.1";
+
+  src = fetchurl {
+    url = "http://vrb.sourceforge.net/download/${pname}-${version}.tar.bz2";
+    sha256 = "d579ed1998ef2d78e2ef8481a748d26e1fa12cdda806d2e31d8ec66ffb0e289f";
+  };
+
+  patches = [
+    ./removed_options.patch
+    ./unused-but-set-variable.patch
+  ];
+
+  postPatch = ''
+    patchShebangs configure
+  '';
+
+  postInstall = ''
+    mkdir -p $out/share/man/man3
+    cp -p vrb/man/man3/*.3 $out/share/man/man3/
+  '';
+
+  meta = with lib; {
+    description = "A virtual ring buffer library written in C";
+    license     = licenses.lgpl21;
+    homepage    = "http://vrb.sourceforge.net/";
+    maintainers = [ maintainers.bobvanderlinden ];
+    platforms   = platforms.linux;
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/vrb/removed_options.patch b/nixpkgs/pkgs/development/libraries/vrb/removed_options.patch
new file mode 100644
index 000000000000..eda88e751843
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vrb/removed_options.patch
@@ -0,0 +1,13 @@
+--- a/configure	2010-10-05 16:32:59.000000000 +0200
++++ b/configure	2010-10-05 16:33:08.000000000 +0200
+@@ -341,8 +341,8 @@
+     pgm_warn=( "${pgm_warn[@]}" -Winline )
+ fi
+ 
+-lib_feat=( -fomit-frame-pointer -funsigned-char -funsigned-bitfields -fgnu-linker -frerun-loop-opt -finline -finline-functions -fmove-all-movables )
+-pgm_feat=( -fomit-frame-pointer -funsigned-char -funsigned-bitfields -fgnu-linker -frerun-loop-opt -finline -finline-functions -fmove-all-movables )
++lib_feat=( -fomit-frame-pointer -funsigned-char -funsigned-bitfields -frerun-loop-opt -finline -finline-functions )
++pgm_feat=( -fomit-frame-pointer -funsigned-char -funsigned-bitfields -frerun-loop-opt -finline -finline-functions )
+ 
+ lib_cp_opt=( -pipe )
+ pgm_cp_opt=( -pipe )
diff --git a/nixpkgs/pkgs/development/libraries/vrb/unused-but-set-variable.patch b/nixpkgs/pkgs/development/libraries/vrb/unused-but-set-variable.patch
new file mode 100644
index 000000000000..43429255e8cd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vrb/unused-but-set-variable.patch
@@ -0,0 +1,19 @@
+--- a/vrb/src/bin/vbuf.c1	2011-06-13 22:14:24.000000000 +0200
++++ b/vrb/src/bin/vbuf.c	2011-06-13 22:14:43.000000000 +0200
+@@ -426,7 +426,6 @@
+     int			opt_progress		;
+     int			output_fd		;
+     int			poll_time		;
+-    int			poll_num		;
+     int			poll_write		;
+     int			poll_read		;
+ 
+@@ -861,7 +860,7 @@
+ 	    poll_time = display_time - get_time_ms();
+ 	    if ( poll_time < 0 ) poll_time = 0;
+ 	}
+-	poll_num = poll( poll_list, 2, poll_time );
++	poll( poll_list, 2, poll_time );
+ 
+ 	//-----------------------
+ 	// Check for poll events.
diff --git a/nixpkgs/pkgs/development/libraries/vrpn/default.nix b/nixpkgs/pkgs/development/libraries/vrpn/default.nix
new file mode 100644
index 000000000000..e233269fafd1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vrpn/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, unzip
+, cmake
+, darwin
+, libGLU
+, libGL
+}:
+
+stdenv.mkDerivation rec {
+  pname = "vrpn";
+  version = "07.35";
+
+  src = fetchFromGitHub {
+    owner = "vrpn";
+    repo = "vrpn";
+    rev = "version_${version}";
+    hash = "sha256-vvlwhm5XHWD4Nh1hwY427pe36RQaqTDJiEtkCxHeCig=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    unzip
+  ];
+
+  buildInputs = lib.optionals stdenv.isDarwin [
+    darwin.apple_sdk.frameworks.CoreFoundation
+    darwin.apple_sdk.frameworks.GLUT
+    darwin.apple_sdk.frameworks.IOKit
+    darwin.apple_sdk.frameworks.OpenGL
+  ] ++ lib.optionals stdenv.isLinux [
+    libGLU
+    libGL
+  ];
+
+  meta = with lib; {
+    description = "Virtual Reality Peripheral Network";
+    longDescription = ''
+      The Virtual-Reality Peripheral Network (VRPN) is a set of classes
+      within a library and a set of servers that are designed to implement
+      a network-transparent interface between application programs and the
+      set of physical devices (tracker, etc.) used in a virtual-reality
+      (VR) system.
+    '';
+    homepage = "https://github.com/vrpn/vrpn";
+    license = licenses.boost; # see https://github.com/vrpn/vrpn/wiki/License
+    platforms = platforms.darwin ++ platforms.linux;
+    maintainers = with maintainers; [ ludo ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/vsqlite/default.nix b/nixpkgs/pkgs/development/libraries/vsqlite/default.nix
new file mode 100644
index 000000000000..6981de6aa074
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vsqlite/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchurl, boost, sqlite }:
+
+stdenv.mkDerivation rec {
+  pname = "vsqlite";
+  version = "0.3.13";
+
+  src = fetchurl {
+    url = "https://evilissimo.fedorapeople.org/releases/vsqlite--/0.3.13/vsqlite++-${version}.tar.gz";
+    sha256 = "17fkj0d2jh0xkjpcayhs1xvbnh1d69f026i7vs1zqnbiwbkpz237";
+  };
+
+  buildInputs = [ boost sqlite ];
+
+  prePatch = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace Makefile.in \
+        --replace '-Wl,--as-needed' "" \
+        --replace '-Wl,-soname -Wl,libvsqlitepp.so.3' \
+                  "-Wl,-install_name,$out/lib/libvsqlitepp.3.dylib"
+  '';
+
+  meta = with lib; {
+    homepage = "http://vsqlite.virtuosic-bytes.com/";
+    description = "C++ wrapper library for sqlite";
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/vte/default.nix b/nixpkgs/pkgs/development/libraries/vte/default.nix
new file mode 100644
index 000000000000..be55952fe2e1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vte/default.nix
@@ -0,0 +1,139 @@
+{ stdenv
+, lib
+, fetchurl
+, fetchpatch
+, gettext
+, pkg-config
+, meson
+, ninja
+, gnome
+, glib
+, gtk3
+, gtk4
+, gtkVersion ? "3"
+, gobject-introspection
+, vala
+, python3
+, gi-docgen
+, libxml2
+, gnutls
+, gperf
+, pango
+, pcre2
+, cairo
+, fribidi
+, zlib
+, icu
+, systemd
+, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd
+, nixosTests
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "vte";
+  version = "0.74.2";
+
+  outputs = [ "out" "dev" ]
+    ++ lib.optional (gtkVersion != null) "devdoc";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/vte/${lib.versions.majorMinor finalAttrs.version}/vte-${finalAttrs.version}.tar.xz";
+    sha256 = "sha256-pTX7Kpj+qKJEnNGgLMz1GQEx3d/1LnFa/azj/rU26uc=";
+  };
+
+  patches = [
+    # VTE needs a small patch to work with musl:
+    # https://gitlab.gnome.org/GNOME/vte/issues/72
+    # Taken from https://git.alpinelinux.org/aports/tree/community/vte3
+    (fetchpatch {
+      name = "0001-Add-W_EXITCODE-macro-for-non-glibc-systems.patch";
+      url = "https://git.alpinelinux.org/aports/plain/community/vte3/fix-W_EXITCODE.patch?id=4d35c076ce77bfac7655f60c4c3e4c86933ab7dd";
+      sha256 = "FkVyhsM0mRUzZmS2Gh172oqwcfXv6PyD6IEgjBhy2uU=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    gettext
+    gobject-introspection
+    gperf
+    libxml2
+    meson
+    ninja
+    pkg-config
+    vala
+    python3
+    gi-docgen
+  ];
+
+  buildInputs = [
+    cairo
+    fribidi
+    gnutls
+    pango # duplicated with propagatedBuildInputs to support gtkVersion == null
+    pcre2
+    zlib
+    icu
+  ] ++ lib.optionals systemdSupport [
+    systemd
+  ];
+
+  # Required by vte-2.91.pc.
+  propagatedBuildInputs = lib.optionals (gtkVersion != null) [
+    (assert (gtkVersion == "3" || gtkVersion == "4");
+    if gtkVersion == "3" then gtk3 else gtk4)
+    glib
+    pango
+  ];
+
+  mesonFlags = [
+    "-Ddocs=true"
+    (lib.mesonBool "gtk3" (gtkVersion == "3"))
+    (lib.mesonBool "gtk4" (gtkVersion == "4"))
+  ] ++ lib.optionals (!systemdSupport) [
+    "-D_systemd=false"
+  ] ++ lib.optionals stdenv.isDarwin [
+    # -Bsymbolic-functions is not supported on darwin
+    "-D_b_symbolic_functions=false"
+  ];
+
+  # error: argument unused during compilation: '-pie' [-Werror,-Wunused-command-line-argument]
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isMusl "-Wno-unused-command-line-argument";
+
+  postPatch = ''
+    patchShebangs perf/*
+    patchShebangs src/box_drawing_generate.sh
+    patchShebangs src/parser-seq.py
+    patchShebangs src/modes.py
+  '';
+
+  postFixup = ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = "vte";
+      versionPolicy = "odd-unstable";
+    };
+    tests = {
+      inherit (nixosTests.terminal-emulators) gnome-terminal lxterminal mlterm roxterm sakura stupidterm terminator termite xfce4-terminal;
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://www.gnome.org/";
+    description = "A library implementing a terminal emulator widget for GTK";
+    longDescription = ''
+      VTE is a library (libvte) implementing a terminal emulator widget for
+      GTK, and a minimal sample application (vte) using that.  Vte is
+      mainly used in gnome-terminal, but can also be used to embed a
+      console/terminal in games, editors, IDEs, etc. VTE supports Unicode and
+      character set conversion, as well as emulating any terminal known to
+      the system's terminfo database.
+    '';
+    license = licenses.lgpl3Plus;
+    maintainers = with maintainers; [ astsmtl antono ] ++ teams.gnome.members;
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/vtk/9.x.nix b/nixpkgs/pkgs/development/libraries/vtk/9.x.nix
new file mode 100644
index 000000000000..3734c20f0e05
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vtk/9.x.nix
@@ -0,0 +1,5 @@
+import ./generic.nix {
+  majorVersion = "9.2";
+  minorVersion = "6";
+  sourceSha256 = "sha256-BvyNScTlb0mMQPyzilY+2NTsMTWNAQHomI8LtNU53RI=";
+}
diff --git a/nixpkgs/pkgs/development/libraries/vtk/generic.nix b/nixpkgs/pkgs/development/libraries/vtk/generic.nix
new file mode 100644
index 000000000000..73fc650844db
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vtk/generic.nix
@@ -0,0 +1,116 @@
+{ majorVersion, minorVersion, sourceSha256, patchesToFetch ? [] }:
+{ stdenv, lib, fetchurl, cmake, libGLU, libGL, libX11, xorgproto, libXt, libpng, libtiff
+, fetchpatch
+, enableQt ? false, qtx11extras, qttools, qtdeclarative, qtEnv
+, enablePython ? false, python ? throw "vtk: Python support requested, but no python interpreter was given."
+# Darwin support
+, AGL, Cocoa, CoreServices, DiskArbitration, IOKit, CFNetwork, Security, GLUT, OpenGL
+, ApplicationServices, CoreText, IOSurface, ImageIO, xpc, libobjc
+}:
+
+let
+  inherit (lib) optionalString optionals optional;
+
+  version = "${majorVersion}.${minorVersion}";
+  pythonMajor = lib.substring 0 1 python.pythonVersion;
+
+in stdenv.mkDerivation {
+  pname = "vtk${optionalString enableQt "-qvtk"}";
+  inherit version;
+
+  src = fetchurl {
+    url = "https://www.vtk.org/files/release/${majorVersion}/VTK-${version}.tar.gz";
+    sha256 = sourceSha256;
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ libpng libtiff ]
+    ++ optionals enableQt [ (qtEnv "qvtk-qt-env" [ qtx11extras qttools qtdeclarative ]) ]
+    ++ optionals stdenv.isLinux [
+      libGLU
+      xorgproto
+      libXt
+    ] ++ optionals stdenv.isDarwin [
+      xpc
+      AGL
+      Cocoa
+      CoreServices
+      DiskArbitration
+      IOKit
+      CFNetwork
+      Security
+      ApplicationServices
+      CoreText
+      IOSurface
+      ImageIO
+      OpenGL
+      GLUT
+    ] ++ optionals enablePython [
+      python
+    ];
+  propagatedBuildInputs = optionals stdenv.isDarwin [ libobjc ]
+    ++ optionals stdenv.isLinux [ libX11 libGL ];
+    # see https://github.com/NixOS/nixpkgs/pull/178367#issuecomment-1238827254
+
+  patches = map fetchpatch patchesToFetch;
+
+  # GCC 13: error: 'int64_t' in namespace 'std' does not name a type
+  postPatch = ''
+    sed '1i#include <cstdint>' \
+      -i ThirdParty/libproj/vtklibproj/src/proj_json_streaming_writer.hpp \
+      -i IO/Image/vtkSEPReader.h
+  ''
+  + optionalString stdenv.isDarwin ''
+    sed -i 's|COMMAND vtkHashSource|COMMAND "DYLD_LIBRARY_PATH=''${VTK_BINARY_DIR}/lib" ''${VTK_BINARY_DIR}/bin/vtkHashSource-${majorVersion}|' ./Parallel/Core/CMakeLists.txt
+    sed -i 's/fprintf(output, shift)/fprintf(output, "%s", shift)/' ./ThirdParty/libxml2/vtklibxml2/xmlschemas.c
+    sed -i 's/fprintf(output, shift)/fprintf(output, "%s", shift)/g' ./ThirdParty/libxml2/vtklibxml2/xpath.c
+  '';
+
+  dontWrapQtApps = true;
+
+  # Shared libraries don't work, because of rpath troubles with the current
+  # nixpkgs cmake approach. It wants to call a binary at build time, just
+  # built and requiring one of the shared objects.
+  # At least, we use -fPIC for other packages to be able to use this in shared
+  # objects.
+  cmakeFlags = [
+    "-DCMAKE_C_FLAGS=-fPIC"
+    "-DCMAKE_CXX_FLAGS=-fPIC"
+    "-DVTK_MODULE_USE_EXTERNAL_vtkpng=ON"
+    "-DVTK_MODULE_USE_EXTERNAL_vtktiff=1"
+  ] ++ lib.optionals (!stdenv.isDarwin) [
+    "-DOPENGL_INCLUDE_DIR=${libGL}/include"
+  ] ++ [
+    "-DCMAKE_INSTALL_LIBDIR=lib"
+    "-DCMAKE_INSTALL_INCLUDEDIR=include"
+    "-DCMAKE_INSTALL_BINDIR=bin"
+    "-DVTK_VERSIONED_INSTALL=OFF"
+  ] ++ optionals enableQt [
+    "-DVTK_GROUP_ENABLE_Qt:STRING=YES"
+  ]
+    ++ optionals stdenv.isDarwin [ "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks" ]
+    ++ optionals enablePython [
+      "-DVTK_WRAP_PYTHON:BOOL=ON"
+      "-DVTK_PYTHON_VERSION:STRING=${pythonMajor}"
+    ];
+
+  env = lib.optionalAttrs stdenv.cc.isClang {
+    NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-function-pointer-types";
+  };
+
+  postInstall = optionalString enablePython ''
+    substitute \
+      ${./vtk.egg-info} \
+      $out/${python.sitePackages}/vtk-${version}.egg-info \
+      --subst-var-by VTK_VER "${version}"
+  '';
+
+  meta = with lib; {
+    description = "Open source libraries for 3D computer graphics, image processing and visualization";
+    homepage = "https://www.vtk.org/";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ knedlsepp tfmoraes lheckemann ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/vtk/vtk.egg-info b/nixpkgs/pkgs/development/libraries/vtk/vtk.egg-info
new file mode 100644
index 000000000000..c932fce54070
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vtk/vtk.egg-info
@@ -0,0 +1,5 @@
+Metadata-Version: 2.1
+Name: vtk
+Version: @VTK_VER@
+Summary: VTK is an open-source toolkit for 3D computer graphics, image processing, and visualization
+Platform: UNKNOWN
diff --git a/nixpkgs/pkgs/development/libraries/vulkan-headers/default.nix b/nixpkgs/pkgs/development/libraries/vulkan-headers/default.nix
new file mode 100644
index 000000000000..dc17404c8480
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vulkan-headers/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+stdenv.mkDerivation rec {
+  pname = "vulkan-headers";
+  version = "1.3.275.0";
+
+  nativeBuildInputs = [ cmake ];
+
+  src = fetchFromGitHub {
+    owner = "KhronosGroup";
+    repo = "Vulkan-Headers";
+    rev = "vulkan-sdk-${version}";
+    hash = "sha256-kBOkj7mr4stPXUCBhNJpNL3A+9BebEwrIBEIroxdH8Y=";
+  };
+
+  passthru.updateScript = ./update.sh;
+
+  meta = with lib; {
+    description = "Vulkan Header files and API registry";
+    homepage    = "https://www.lunarg.com";
+    platforms   = platforms.unix ++ platforms.windows;
+    license     = licenses.asl20;
+    maintainers = [ maintainers.ralith ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/vulkan-headers/update.sh b/nixpkgs/pkgs/development/libraries/vulkan-headers/update.sh
new file mode 100755
index 000000000000..dd3fac2ee4dd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vulkan-headers/update.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p nix-update
+
+set -euf -o pipefail
+
+SDK_PACKAGES=(
+    "vulkan-headers"
+    "vulkan-loader"
+    "vulkan-validation-layers"
+    "vulkan-tools"
+    "vulkan-tools-lunarg"
+    "vulkan-extension-layer"
+    "vulkan-utility-libraries"
+    "vulkan-volk"
+    "spirv-headers"
+    "spirv-cross"
+    "spirv-tools"
+)
+
+nix-update glslang --version-regex '(\d+\.\d+\.\d+)' --commit
+
+for P in "${SDK_PACKAGES[@]}"; do
+    nix-update "$P" --version-regex "(?:vulkan-sdk-)(.*)" --commit
+done
diff --git a/nixpkgs/pkgs/development/libraries/vulkan-loader/default.nix b/nixpkgs/pkgs/development/libraries/vulkan-loader/default.nix
new file mode 100644
index 000000000000..958cc2dadc7b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vulkan-loader/default.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, libX11, libxcb
+, libXrandr, wayland, moltenvk, vulkan-headers, addOpenGLRunpath }:
+
+stdenv.mkDerivation rec {
+  pname = "vulkan-loader";
+  version = "1.3.275.0";
+
+  src = fetchFromGitHub {
+    owner = "KhronosGroup";
+    repo = "Vulkan-Loader";
+    rev = "vulkan-sdk-${version}";
+    hash = "sha256-53PUXAWiK38ciV6oMvD7ZHdXi4RU4r0RmDWUUHU3mE0=";
+  };
+
+  patches = [ ./fix-pkgconfig.patch ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ vulkan-headers ]
+    ++ lib.optionals stdenv.isLinux [ libX11 libxcb libXrandr wayland ];
+
+  cmakeFlags = [ "-DCMAKE_INSTALL_INCLUDEDIR=${vulkan-headers}/include" ]
+    ++ lib.optional stdenv.isDarwin "-DSYSCONFDIR=${moltenvk}/share"
+    ++ lib.optional stdenv.isLinux "-DSYSCONFDIR=${addOpenGLRunpath.driverLink}/share"
+    ++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "-DUSE_GAS=OFF";
+
+  outputs = [ "out" "dev" ];
+
+  doInstallCheck = true;
+
+  installCheckPhase = ''
+    grep -q "${vulkan-headers}/include" $dev/lib/pkgconfig/vulkan.pc || {
+      echo vulkan-headers include directory not found in pkg-config file
+      exit 1
+    }
+  '';
+
+  meta = with lib; {
+    description = "LunarG Vulkan loader";
+    homepage    = "https://www.lunarg.com";
+    platforms   = platforms.unix ++ platforms.windows;
+    license     = licenses.asl20;
+    maintainers = [ maintainers.ralith ];
+    broken = (version != vulkan-headers.version);
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/vulkan-loader/fix-pkgconfig.patch b/nixpkgs/pkgs/development/libraries/vulkan-loader/fix-pkgconfig.patch
new file mode 100644
index 000000000000..b9c5e8ad4536
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vulkan-loader/fix-pkgconfig.patch
@@ -0,0 +1,14 @@
+diff --git a/loader/vulkan.pc.in b/loader/vulkan.pc.in
+index 153815577..584b15273 100644
+--- a/loader/vulkan.pc.in
++++ b/loader/vulkan.pc.in
+@@ -1,7 +1,5 @@
+-prefix=@CMAKE_INSTALL_PREFIX@
+-exec_prefix=${prefix}
+-libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR_PC@
+-includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR_PC@
++libdir=@CMAKE_INSTALL_LIBDIR@
++includedir=@CMAKE_INSTALL_INCLUDEDIR@
+
+ Name: @CMAKE_PROJECT_NAME@
+ Description: Vulkan Loader
diff --git a/nixpkgs/pkgs/development/libraries/vulkan-utility-libraries/default.nix b/nixpkgs/pkgs/development/libraries/vulkan-utility-libraries/default.nix
new file mode 100644
index 000000000000..301311e12412
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vulkan-utility-libraries/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchFromGitHub, cmake, python3, vulkan-headers }:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "vulkan-utility-libraries";
+  version = "1.3.275.0";
+
+  src = fetchFromGitHub {
+    owner = "KhronosGroup";
+    repo = "Vulkan-Utility-Libraries";
+    rev = "vulkan-sdk-${finalAttrs.version}";
+    hash = "sha256-gvia+Xb9BpOjPARKo3Sgp85Bfh1roFZ2PzCtXVFYeIU=";
+  };
+
+  nativeBuildInputs = [ cmake python3 ];
+  buildInputs = [ vulkan-headers ];
+
+  meta = with lib; {
+    description = "A set of utility libraries for Vulkan";
+    homepage = "https://github.com/KhronosGroup/Vulkan-Utility-Libraries";
+    platforms = platforms.all;
+    license = licenses.asl20;
+    maintainers = with maintainers; [ nickcao ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/vxl/default.nix b/nixpkgs/pkgs/development/libraries/vxl/default.nix
new file mode 100644
index 000000000000..48b075add0b2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vxl/default.nix
@@ -0,0 +1,50 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, unzip
+, cmake
+, libtiff
+, expat
+, zlib
+, libpng
+, libjpeg
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "vxl";
+  version = "3.5.0";
+
+  src = fetchFromGitHub {
+    owner = "vxl";
+    repo = "vxl";
+    rev = "refs/tags/v${finalAttrs.version}";
+    sha256 = "sha256-4kMpIrywEZzt0JH95LHeDLrDneii0R/Uw9GsWkvED+E=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    unzip
+  ];
+  buildInputs = [
+    libtiff
+    expat
+    zlib
+    libpng
+    libjpeg
+  ];
+
+  # test failure on aarch64-linux; unknown reason:
+  cmakeFlags = lib.optionals stdenv.isAarch64 [ "-DCMAKE_CTEST_ARGUMENTS='-E vgl_test_frustum_3d'" ];
+
+  doCheck = true;
+
+  meta = {
+    description = "C++ Libraries for Computer Vision Research and Implementation";
+    homepage = "https://vxl.sourceforge.net";
+    # license appears contradictory; see https://github.com/vxl/vxl/issues/752
+    # (and see https://github.com/InsightSoftwareConsortium/ITK/pull/1920/files for potential patch)
+    license = [ lib.licenses.unfree ];
+    maintainers = with lib.maintainers; [ viric ];
+    platforms = with lib.platforms; linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/waffle/default.nix b/nixpkgs/pkgs/development/libraries/waffle/default.nix
new file mode 100644
index 000000000000..b24c8262794f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/waffle/default.nix
@@ -0,0 +1,71 @@
+{ stdenv
+, fetchFromGitLab
+, lib
+, cmake
+, meson
+, ninja
+, bash-completion
+, libGL
+, libglvnd
+, makeWrapper
+, pkg-config
+, python3
+, x11Support ? true, libxcb, libX11
+, waylandSupport ? true, wayland, wayland-protocols
+, useGbm ? true, mesa, udev
+}:
+
+stdenv.mkDerivation rec {
+  pname = "waffle";
+  version = "1.8.0";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "mesa";
+    repo = "waffle";
+    rev = "v${version}";
+    sha256 = "sha256-GVULv/TkCS9CgSFWlskIamw5Z402n684G6jeTLMCPNc=";
+  };
+
+  buildInputs = [
+    bash-completion
+    libGL
+  ] ++ lib.optionals (with stdenv.hostPlatform; isUnix && !isDarwin) [
+    libglvnd
+  ] ++ lib.optionals x11Support [
+    libX11
+    libxcb
+  ] ++ lib.optionals waylandSupport [
+    wayland
+    wayland-protocols
+  ] ++ lib.optionals useGbm [
+    udev
+    mesa
+  ];
+
+  dontUseCmakeConfigure = true;
+
+  nativeBuildInputs = [
+    cmake
+    makeWrapper
+    meson
+    ninja
+    pkg-config
+    python3
+  ];
+
+  PKG_CONFIG_BASH_COMPLETION_COMPLETIONSDIR= "${placeholder "out"}/share/bash-completion/completions";
+
+  postInstall = ''
+    wrapProgram $out/bin/wflinfo \
+      --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libGL libglvnd ]}
+  '';
+
+  meta = with lib; {
+    description = "A cross-platform C library that allows one to defer selection of an OpenGL API and window system until runtime";
+    homepage = "https://www.waffle-gl.org/";
+    license = licenses.bsd2;
+    platforms = platforms.mesaPlatforms;
+    maintainers = with maintainers; [ Flakebi ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/wangle/default.nix b/nixpkgs/pkgs/development/libraries/wangle/default.nix
new file mode 100644
index 000000000000..4afbb38094e2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/wangle/default.nix
@@ -0,0 +1,68 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, boost
+, libevent
+, double-conversion
+, glog
+, fmt_8
+, gflags
+, openssl
+, fizz
+, folly
+, gtest
+, libsodium
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "wangle";
+  version = "2023.04.03.00";
+
+  src = fetchFromGitHub {
+    owner = "facebook";
+    repo = "wangle";
+    rev = "v${version}";
+    sha256 = "sha256-ISf/ezcJKCNv5UEGSf+OmHjV+QkanbTNoAm2ci1qy0o=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeDir = "../wangle";
+
+  cmakeFlags = [
+    "-Wno-dev"
+  ] ++ lib.optionals stdenv.isDarwin [
+    "-DBUILD_TESTS=off" # Tests fail on Darwin due to missing utimensat
+    "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14" # For aligned allocation
+  ];
+
+  buildInputs = [
+    fmt_8
+    libsodium
+    zlib
+    boost
+    double-conversion
+    fizz
+    folly
+    gtest
+    glog
+    gflags
+    libevent
+    openssl
+  ];
+
+  meta = with lib; {
+    description = "An open-source C++ networking library";
+    longDescription = ''
+      Wangle is a framework providing a set of common client/server
+      abstractions for building services in a consistent, modular, and
+      composable way.
+    '';
+    homepage = "https://github.com/facebook/wangle";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ pierreis kylesferrazza ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/wapp/default.nix b/nixpkgs/pkgs/development/libraries/wapp/default.nix
new file mode 100644
index 000000000000..8c414a28f122
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/wapp/default.nix
@@ -0,0 +1,32 @@
+{ lib, fetchurl, tcl }:
+
+tcl.mkTclDerivation {
+  pname = "wapp";
+  version = "unstable-2023-05-05";
+
+  src = fetchurl {
+    url = "https://wapp.tcl-lang.org/home/raw/72d0d081e3e6a4aea91ddf429a85cbdf40f9a32d46cccfe81bb75ee50e6cf9cf?at=wapp.tcldir?ci=9d3368116c59ef16";
+    hash = "sha256-poG7dvaiOXMi4oWMQ5t3v7SYEqZLUY/TsWXrTL62xd0=";
+  };
+
+  dontUnpack = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/lib/wapp
+    cp $src $out/lib/wapp/wapp.tcl
+    cat <<EOF > $out/lib/wapp/pkgIndex.tcl
+    package ifneeded wapp 1.0 [list source [file join \$dir wapp.tcl]]
+    EOF
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "https://wapp.tcl-lang.org/home/doc/trunk/README.md";
+    description = "A framework for writing web applications in Tcl";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ nat-418 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/wasilibc/default.nix b/nixpkgs/pkgs/development/libraries/wasilibc/default.nix
new file mode 100644
index 000000000000..c0714a78556a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/wasilibc/default.nix
@@ -0,0 +1,68 @@
+{ stdenv
+, buildPackages
+, fetchFromGitHub
+, lib
+, firefox-unwrapped
+, firefox-esr-unwrapped
+}:
+
+let
+  pname = "wasilibc";
+  version = "21";
+in
+stdenv.mkDerivation {
+  inherit pname version;
+
+  src = buildPackages.fetchFromGitHub {
+    owner = "WebAssembly";
+    repo = "wasi-libc";
+    rev = "refs/tags/wasi-sdk-${version}";
+    hash = "sha256-1LsMpO29y79twVrUsuM/JvC7hK8O6Yey4Ard/S3Mvvc=";
+    fetchSubmodules = true;
+  };
+
+  outputs = [ "out" "dev" "share" ];
+
+  # clang-13: error: argument unused during compilation: '-rtlib=compiler-rt' [-Werror,-Wunused-command-line-argument]
+  postPatch = ''
+    substituteInPlace Makefile \
+      --replace "-Werror" ""
+  '';
+
+  preBuild = ''
+    export SYSROOT_LIB=${builtins.placeholder "out"}/lib
+    export SYSROOT_INC=${builtins.placeholder "dev"}/include
+    export SYSROOT_SHARE=${builtins.placeholder "share"}/share
+    mkdir -p "$SYSROOT_LIB" "$SYSROOT_INC" "$SYSROOT_SHARE"
+    makeFlagsArray+=(
+      "SYSROOT_LIB:=$SYSROOT_LIB"
+      "SYSROOT_INC:=$SYSROOT_INC"
+      "SYSROOT_SHARE:=$SYSROOT_SHARE"
+      # https://bugzilla.mozilla.org/show_bug.cgi?id=1773200
+      "BULK_MEMORY_SOURCES:="
+    )
+
+  '';
+
+  enableParallelBuilding = true;
+
+  # We just build right into the install paths, per the `preBuild`.
+  dontInstall = true;
+
+  preFixup = ''
+    ln -s $share/share/undefined-symbols.txt $out/lib/wasi.imports
+  '';
+
+  passthru.tests = {
+    inherit firefox-unwrapped firefox-esr-unwrapped;
+  };
+
+  meta = with lib; {
+    changelog = "https://github.com/WebAssembly/wasi-sdk/releases/tag/wasi-sdk-${version}";
+    description = "WASI libc implementation for WebAssembly";
+    homepage = "https://wasi.dev";
+    platforms = platforms.wasi;
+    maintainers = with maintainers; [ matthewbauer rvolosatovs ];
+    license = with licenses; [ asl20-llvm mit ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/wavpack/default.nix b/nixpkgs/pkgs/development/libraries/wavpack/default.nix
new file mode 100644
index 000000000000..bb0a43d24c0f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/wavpack/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchFromGitHub, gettext, autoreconfHook, libiconv }:
+
+stdenv.mkDerivation rec {
+  pname = "wavpack";
+  version = "5.6.0";
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ libiconv ];
+
+  # autogen.sh:9
+  preAutoreconf = "cp ${gettext}/share/gettext/config.rpath .";
+
+  src = fetchFromGitHub {
+    owner = "dbry";
+    repo = "WavPack";
+    rev = version;
+    hash = "sha256-fWAGE87JTNTnYoxrkMf3I8C53kZrQiiBy3Zyg0cw8Og=";
+  };
+
+  outputs = [ "out" "dev" "doc" "man" ];
+
+  meta = with lib; {
+    description = "Hybrid audio compression format";
+    homepage    = "https://www.wavpack.com/";
+    changelog   = "https://github.com/dbry/WavPack/releases/tag/${version}";
+    license     = licenses.bsd3;
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ codyopel ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/wayland/darwin.patch b/nixpkgs/pkgs/development/libraries/wayland/darwin.patch
new file mode 100644
index 000000000000..965294dfa5ff
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/wayland/darwin.patch
@@ -0,0 +1,74 @@
+diff --git a/meson.build b/meson.build
+index 35c3b95..f27e472 100644
+--- a/meson.build
++++ b/meson.build
+@@ -16,7 +16,7 @@ config_h.set_quoted('PACKAGE', meson.project_name())
+ config_h.set_quoted('PACKAGE_VERSION', meson.project_version())
+ 
+ cc_args = []
+-if host_machine.system() != 'freebsd'
++if host_machine.system() not in ['darwin', 'freebsd']
+ 	cc_args += ['-D_POSIX_C_SOURCE=200809L']
+ endif
+ add_project_arguments(cc_args, language: 'c')
+@@ -52,7 +52,7 @@ foreach f: have_funcs
+ endforeach
+ config_h.set10('HAVE_XUCRED_CR_PID', cc.has_member('struct xucred', 'cr_pid', prefix : '#include <sys/ucred.h>'))
+ have_broken_msg_cmsg_cloexec = false
+-if host_machine.system() == 'freebsd'
++if host_machine.system() in ['darwin', 'freebsd']
+ 	have_broken_msg_cmsg_cloexec = not cc.compiles('''
+ #include <sys/param.h> /* To get __FreeBSD_version. */
+ #if __FreeBSD_version < 1300502 || \
+@@ -69,7 +69,7 @@ endif
+ config_h.set10('HAVE_BROKEN_MSG_CMSG_CLOEXEC', have_broken_msg_cmsg_cloexec)
+ 
+ if get_option('libraries')
+-	if host_machine.system() == 'freebsd'
++	if host_machine.system() in ['darwin', 'freebsd']
+ 		# When building for FreeBSD, epoll(7) is provided by a userspace
+ 		# wrapper around kqueue(2).
+ 		epoll_dep = dependency('epoll-shim')
+diff --git a/src/event-loop.c b/src/event-loop.c
+index 37cf95d..49a38cb 100644
+--- a/src/event-loop.c
++++ b/src/event-loop.c
+@@ -48,6 +48,13 @@
+ 
+ #define TIMER_REMOVED -2
+ 
++#ifdef __APPLE__
++struct itimerspec {
++	struct timespec it_interval;
++	struct timespec it_value;
++};
++#endif
++
+ struct wl_event_loop;
+ struct wl_event_source_interface;
+ struct wl_event_source_timer;
+diff --git a/src/wayland-os.c b/src/wayland-os.c
+index a9066ca..483fe64 100644
+--- a/src/wayland-os.c
++++ b/src/wayland-os.c
+@@ -69,17 +69,19 @@ wl_os_socket_cloexec(int domain, int type, int protocol)
+ {
+ 	int fd;
+ 
++#ifdef SOCK_CLOEXEC
+ 	fd = socket(domain, type | SOCK_CLOEXEC, protocol);
+ 	if (fd >= 0)
+ 		return fd;
+ 	if (errno != EINVAL)
+ 		return -1;
++#endif
+ 
+ 	fd = socket(domain, type, protocol);
+ 	return set_cloexec_or_close(fd);
+ }
+ 
+-#if defined(__FreeBSD__)
++#if defined(__APPLE__) || defined(__FreeBSD__)
+ int
+ wl_os_socket_peercred(int sockfd, uid_t *uid, gid_t *gid, pid_t *pid)
+ {
diff --git a/nixpkgs/pkgs/development/libraries/wayland/default.nix b/nixpkgs/pkgs/development/libraries/wayland/default.nix
new file mode 100644
index 000000000000..52a1d9db3d28
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/wayland/default.nix
@@ -0,0 +1,126 @@
+{ lib
+, stdenv
+, fetchurl
+, meson
+, pkg-config
+, ninja
+, wayland-scanner
+, expat
+, libxml2
+, withLibraries ? stdenv.isLinux || stdenv.isDarwin
+, withTests ? stdenv.isLinux
+, libffi
+, epoll-shim
+, withDocumentation ? withLibraries && stdenv.hostPlatform == stdenv.buildPlatform
+, graphviz-nox
+, doxygen
+, libxslt
+, xmlto
+, python3
+, docbook_xsl
+, docbook_xml_dtd_45
+, docbook_xml_dtd_42
+}:
+
+# Documentation is only built when building libraries.
+assert withDocumentation -> withLibraries;
+
+# Tests are only built when building libraries.
+assert withTests -> withLibraries;
+
+let
+  isCross = stdenv.buildPlatform != stdenv.hostPlatform;
+in
+stdenv.mkDerivation rec {
+  pname = "wayland";
+  version = "1.22.0";
+
+  src = fetchurl {
+    url = "https://gitlab.freedesktop.org/wayland/wayland/-/releases/${version}/downloads/${pname}-${version}.tar.xz";
+    hash = "sha256-FUCvHqaYpHHC2OnSiDMsfg/TYMjx0Sk267fny8JCWEI=";
+  };
+
+  patches = [
+    ./darwin.patch
+  ];
+
+  postPatch = lib.optionalString withDocumentation ''
+    patchShebangs doc/doxygen/gen-doxygen.py
+  '' + lib.optionalString stdenv.hostPlatform.isStatic ''
+    # delete line containing os-wrappers-test, disables
+    # the building of os-wrappers-test
+    sed -i '/os-wrappers-test/d' tests/meson.build
+  '';
+
+  outputs = [ "out" "bin" "dev" ] ++ lib.optionals withDocumentation [ "doc" "man" ];
+  separateDebugInfo = true;
+
+  mesonFlags = [
+    "-Ddocumentation=${lib.boolToString withDocumentation}"
+    "-Dlibraries=${lib.boolToString withLibraries}"
+    "-Dtests=${lib.boolToString withTests}"
+  ];
+
+  depsBuildBuild = [
+    pkg-config
+  ];
+
+  nativeBuildInputs = [
+    meson
+    pkg-config
+    ninja
+  ] ++ lib.optionals isCross [
+    wayland-scanner
+  ] ++ lib.optionals withDocumentation [
+    (graphviz-nox.override { pango = null; }) # To avoid an infinite recursion
+    doxygen
+    libxslt
+    xmlto
+    python3
+    docbook_xml_dtd_45
+    docbook_xsl
+  ];
+
+  buildInputs = [
+    expat
+    libxml2
+  ] ++ lib.optionals withLibraries [
+    libffi
+  ] ++ lib.optionals (withLibraries && !stdenv.hostPlatform.isLinux) [
+    epoll-shim
+  ] ++ lib.optionals withDocumentation [
+    docbook_xsl
+    docbook_xml_dtd_45
+    docbook_xml_dtd_42
+  ];
+
+  postFixup = ''
+    # The pkg-config file is required for cross-compilation:
+    mkdir -p $bin/lib/pkgconfig/
+    cat <<EOF > $bin/lib/pkgconfig/wayland-scanner.pc
+    wayland_scanner=$bin/bin/wayland-scanner
+
+    Name: Wayland Scanner
+    Description: Wayland scanner
+    Version: ${version}
+    EOF
+  '';
+
+  passthru = { inherit withLibraries; };
+
+  meta = with lib; {
+    description = "Core Wayland window system code and protocol";
+    longDescription = ''
+      Wayland is a project to define a protocol for a compositor to talk to its
+      clients as well as a library implementation of the protocol.
+      The wayland protocol is essentially only about input handling and buffer
+      management, but also handles drag and drop, selections, window management
+      and other interactions that must go through the compositor (but not
+      rendering).
+    '';
+    homepage = "https://wayland.freedesktop.org/";
+    license = licenses.mit; # Expat version
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ primeos codyopel qyliss ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/wayland/protocols.nix b/nixpkgs/pkgs/development/libraries/wayland/protocols.nix
new file mode 100644
index 000000000000..9625f3a5ee1b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/wayland/protocols.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, fetchurl
+, pkg-config
+, meson, ninja, wayland-scanner
+, python3, wayland
+}:
+
+stdenv.mkDerivation rec {
+  pname = "wayland-protocols";
+  version = "1.33";
+
+  # https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/48
+  doCheck = stdenv.hostPlatform == stdenv.buildPlatform && stdenv.hostPlatform.linker == "bfd" && wayland.withLibraries;
+
+  src = fetchurl {
+    url = "https://gitlab.freedesktop.org/wayland/${pname}/-/releases/${version}/downloads/${pname}-${version}.tar.xz";
+    hash = "sha256-lPDFCwkNbmGgP2IEhGexmrvoUb5OEa57NvZfi5jDljo=";
+  };
+
+  postPatch = lib.optionalString doCheck ''
+    patchShebangs tests/
+  '';
+
+  depsBuildBuild = [ pkg-config ];
+  nativeBuildInputs = [ meson ninja wayland-scanner ];
+  nativeCheckInputs = [ python3 wayland ];
+
+  mesonFlags = [ "-Dtests=${lib.boolToString doCheck}" ];
+
+  meta = {
+    description = "Wayland protocol extensions";
+    longDescription = ''
+      wayland-protocols contains Wayland protocols that add functionality not
+      available in the Wayland core protocol. Such protocols either add
+      completely new functionality, or extend the functionality of some other
+      protocol either in Wayland core, or some other protocol in
+      wayland-protocols.
+    '';
+    homepage    = "https://gitlab.freedesktop.org/wayland/wayland-protocols";
+    license     = lib.licenses.mit; # Expat version
+    platforms   = lib.platforms.all;
+    maintainers = with lib.maintainers; [ primeos ];
+  };
+
+  passthru.version = version;
+}
diff --git a/nixpkgs/pkgs/development/libraries/waylandpp/default.nix b/nixpkgs/pkgs/development/libraries/waylandpp/default.nix
new file mode 100644
index 000000000000..551712f89f5f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/waylandpp/default.nix
@@ -0,0 +1,65 @@
+{ lib, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, makeFontsConf
+, pkg-config
+, pugixml
+, wayland
+, libGL
+, libffi
+, buildPackages
+, docSupport ? true
+, doxygen
+, graphviz
+}:
+
+stdenv.mkDerivation rec {
+  pname = "waylandpp";
+  version = "1.0.0";
+
+  src = fetchFromGitHub {
+    owner = "NilsBrause";
+    repo = pname;
+    rev = version;
+    hash = "sha256-Dw2RnLLyhykikHps1in+euHksO+ERbATbfmbUFOJklg=";
+  };
+
+  patches = [
+    # Pull fixes for gcc-13 compatibility:
+    #   https://github.com/NilsBrause/waylandpp/pull/71
+    # Without the change `kodi` fails to find `uint32_t` in `waylandpp`
+    # headers.
+    (fetchpatch {
+      name = "gcc-13.patch";
+      url = "https://github.com/NilsBrause/waylandpp/commit/3c441910aa25f57df2a4db55f75f5d99cea86620.patch";
+      hash = "sha256-bxHMP09zCwUKD0M63C1FqQySAN9hr+7t/DyFDRwdtCo=";
+    })
+  ];
+
+  cmakeFlags = [
+    "-DCMAKE_INSTALL_DATADIR=${placeholder "dev"}"
+  ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "-DWAYLAND_SCANNERPP=${buildPackages.waylandpp}/bin/wayland-scanner++"
+  ];
+
+  # Complains about not being able to find the fontconfig config file otherwise
+  FONTCONFIG_FILE = lib.optional docSupport (makeFontsConf { fontDirectories = [ ]; });
+
+  nativeBuildInputs = [ cmake pkg-config ] ++ lib.optionals docSupport [ doxygen graphviz ];
+  buildInputs = [ pugixml wayland libGL libffi ];
+
+  outputs = [ "bin" "dev" "lib" "out" ] ++ lib.optionals docSupport [ "doc" "devman" ];
+
+  # Resolves the warning "Fontconfig error: No writable cache directories"
+  preBuild = ''
+    export XDG_CACHE_HOME="$(mktemp -d)"
+  '';
+
+  meta = with lib; {
+    description = "Wayland C++ binding";
+    homepage = "https://github.com/NilsBrause/waylandpp/";
+    license = with lib.licenses; [ bsd2 hpnd ];
+    maintainers = with lib.maintainers; [ minijackson ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/waylib/default.nix b/nixpkgs/pkgs/development/libraries/waylib/default.nix
new file mode 100644
index 000000000000..9aa211ffd3e0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/waylib/default.nix
@@ -0,0 +1,74 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, pkg-config
+, wayland-scanner
+, wrapQtAppsHook
+, qtbase
+, qtquick3d
+, qwlroots
+, wayland
+, wayland-protocols
+, wlr-protocols
+, pixman
+, libdrm
+, nixos-artwork
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "waylib";
+  version = "0.1.1";
+
+  src = fetchFromGitHub {
+    owner = "vioken";
+    repo = "waylib";
+    rev = finalAttrs.version;
+    hash = "sha256-3IdrChuXQyQGhJ/7kTqmkV0PyuSNP53Y0Po01Fc9Qi0=";
+  };
+
+  postPatch = ''
+    substituteInPlace examples/tinywl/OutputDelegate.qml \
+      --replace "/usr/share/wallpapers/deepin/desktop.jpg" \
+                "${nixos-artwork.wallpapers.simple-blue}/share/backgrounds/nixos/nix-wallpaper-simple-blue.png"
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    wayland-scanner
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    qtbase
+    qtquick3d
+    wayland
+    wayland-protocols
+    wlr-protocols
+    pixman
+    libdrm
+  ];
+
+  propagatedBuildInputs = [
+    qwlroots
+  ];
+
+  cmakeFlags = [
+    (lib.cmakeBool "INSTALL_TINYWL" true)
+  ];
+
+  strictDeps = true;
+
+  outputs = [ "out" "dev" "bin" ];
+
+  meta = {
+    description = "A wrapper for wlroots based on Qt";
+    homepage = "https://github.com/vioken/waylib";
+    license = with lib.licenses; [ gpl3Only lgpl3Only asl20 ];
+    outputsToInstall = [ "out" ];
+    platforms = lib.platforms.linux;
+    maintainers = with lib.maintainers; [ rewine ];
+  };
+})
+
diff --git a/nixpkgs/pkgs/development/libraries/wayqt/default.nix b/nixpkgs/pkgs/development/libraries/wayqt/default.nix
new file mode 100644
index 000000000000..47e11c9f10d0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/wayqt/default.nix
@@ -0,0 +1,61 @@
+{ stdenv
+, lib
+, fetchFromGitLab
+, substituteAll
+, meson
+, pkg-config
+, qttools
+, ninja
+, qtbase
+, qtwayland
+, wayland
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "wayqt";
+  version = "0.2.0";
+
+  src = fetchFromGitLab {
+    owner = "desktop-frameworks";
+    repo = "wayqt";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-qlRRkqhKlcsd9lzlqfE0V0gjudELyENu4IH1NfO/+pI=";
+  };
+
+  patches = [
+    # qmake get qtbase's path, but wayqt need qtwayland
+    (substituteAll {
+      src = ./fix-qtwayland-header-path.diff;
+      qtWaylandPath = "${qtwayland}/include";
+    })
+  ];
+
+  nativeBuildInputs = [
+    meson
+    pkg-config
+    qttools
+    ninja
+  ];
+
+  buildInputs = [
+    qtbase
+    qtwayland
+    wayland
+  ];
+
+  mesonFlags = [
+    "-Duse_qt_version=qt6"
+  ];
+
+  dontWrapQtApps = true;
+
+  outputs = [ "out" "dev" ];
+
+  meta = {
+    homepage = "https://gitlab.com/desktop-frameworks/wayqt";
+    description = "Qt-based library to handle Wayland and Wlroots protocols to be used with any Qt project";
+    maintainers = with lib.maintainers; [ rewine ];
+    platforms = lib.platforms.linux;
+    license = lib.licenses.mit;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/wayqt/fix-qtwayland-header-path.diff b/nixpkgs/pkgs/development/libraries/wayqt/fix-qtwayland-header-path.diff
new file mode 100644
index 000000000000..648cecd918e8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/wayqt/fix-qtwayland-header-path.diff
@@ -0,0 +1,16 @@
+diff --git a/meson.build b/meson.build
+index 5c09644..fc65d37 100644
+--- a/meson.build
++++ b/meson.build
+@@ -39,9 +39,8 @@ elif get_option('use_qt_version') == 'qt6'
+ 		private_headers: [ 'Gui', 'WaylandClient', 'WaylandGlobalPrivate' ],
+ 	)
+ 
+-	qmake = find_program( [ 'qmake-qt6', 'qmake6' ], required: true )
+-	ret = run_command( qmake, '-query', 'QT_INSTALL_HEADERS', check: true )
+-	QtHeaderPath = ret.stdout().strip()
++	qmake = find_program( [ 'qmake-qt6', 'qmake6' ], required: false )
++	QtHeaderPath = '@qtWaylandPath@'
+ 
+ 	QtGlobal = '@0@/QtWaylandGlobal/@1@'.format( QtHeaderPath, QtDeps.version() )
+ 
diff --git a/nixpkgs/pkgs/development/libraries/webkit2-sharp/default.nix b/nixpkgs/pkgs/development/libraries/webkit2-sharp/default.nix
new file mode 100644
index 000000000000..de10fff43da0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/webkit2-sharp/default.nix
@@ -0,0 +1,57 @@
+{
+  stdenv,
+  autoreconfHook,
+  fetchFromGitHub,
+  gtk-sharp-3_0,
+  lib,
+  libxslt,
+  mono,
+  pkg-config,
+  webkitgtk,
+}:
+
+stdenv.mkDerivation rec {
+  pname = "webkit2-sharp";
+  version = "a59fd76dd730432c76b12ee6347ea66567107ab9";
+
+  src = fetchFromGitHub {
+    owner = "hbons";
+    repo = "webkit2-sharp";
+    rev = version;
+    sha256 = "sha256:0a7vx81zvzn2wq4q2mqrxvlps1mqk28lm1gpfndqryxm4iiw28vc";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    libxslt
+    mono
+    pkg-config
+  ];
+
+  buildInputs = [
+    gtk-sharp-3_0
+    webkitgtk
+  ];
+
+  postPatch = ''
+    # Workaround build failure with WebKitGTK 2.40.0
+    # https://github.com/hbons/webkit2-sharp/issues/6
+    substituteInPlace sources/webkit2-sharp-api.raw --replace \
+      '<field cname="parentInstance" access="public" writeable="false" readable="true" name="ParentInstance" type="GtkContainer*"/>' \
+      '<field cname="parent" access="public" writeable="false" readable="true" name="Parent" type="GtkContainer*"/>'
+  '';
+
+  ac_cv_path_MONODOCER = "no";
+  installFlagsArray = ["GAPIXMLDIR=/tmp/gapixml"];
+
+  passthru = {
+    inherit webkitgtk;
+  };
+
+  meta = {
+    description = "C# bindings for WebKit 2 with GTK+ 3";
+    homepage = "https://github.com/hbons/webkit2-sharp";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ kevincox ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/webkitgtk/default.nix b/nixpkgs/pkgs/development/libraries/webkitgtk/default.nix
new file mode 100644
index 000000000000..58f0f190ae27
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/webkitgtk/default.nix
@@ -0,0 +1,249 @@
+{ lib
+, stdenv
+, runCommand
+, fetchurl
+, perl
+, python3
+, ruby
+, gi-docgen
+, bison
+, gperf
+, cmake
+, ninja
+, pkg-config
+, gettext
+, gobject-introspection
+, gnutls
+, libgcrypt
+, libgpg-error
+, gtk3
+, wayland
+, wayland-protocols
+, libwebp
+, libwpe
+, libwpe-fdo
+, enchant2
+, xorg
+, libxkbcommon
+, libavif
+, libepoxy
+, libjxl
+, at-spi2-core
+, libxml2
+, libsoup
+, libsecret
+, libxslt
+, harfbuzz
+, libpthreadstubs
+, nettle
+, libtasn1
+, p11-kit
+, libidn
+, libedit
+, readline
+, apple_sdk
+, libGL
+, libGLU
+, mesa
+, libintl
+, lcms2
+, libmanette
+, openjpeg
+, geoclue2
+, sqlite
+, gst-plugins-base
+, gst-plugins-bad
+, woff2
+, bubblewrap
+, libseccomp
+, systemd
+, xdg-dbus-proxy
+, substituteAll
+, glib
+, unifdef
+, addOpenGLRunpath
+, enableGeoLocation ? true
+, withLibsecret ? true
+, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd
+, testers
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "webkitgtk";
+  version = "2.42.5";
+  name = "${finalAttrs.pname}-${finalAttrs.version}+abi=${if lib.versionAtLeast gtk3.version "4.0" then "6.0" else "4.${if lib.versions.major libsoup.version == "2" then "0" else "1"}"}";
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  # https://github.com/NixOS/nixpkgs/issues/153528
+  # Can't be linked within a 4GB address space.
+  separateDebugInfo = stdenv.isLinux && !stdenv.is32bit;
+
+  src = fetchurl {
+    url = "https://webkitgtk.org/releases/webkitgtk-${finalAttrs.version}.tar.xz";
+    hash = "sha256-tkJ4wfILjP2/tf9XPDfYcaunSh2ybZs5906JU/5h50k=";
+  };
+
+  patches = lib.optionals stdenv.isLinux [
+    (substituteAll {
+      src = ./fix-bubblewrap-paths.patch;
+      inherit (builtins) storeDir;
+      inherit (addOpenGLRunpath) driverLink;
+    })
+
+    # Hardcode path to WPE backend
+    # https://github.com/NixOS/nixpkgs/issues/110468
+    (substituteAll {
+      src = ./fdo-backend-path.patch;
+      wpebackend_fdo = libwpe-fdo;
+    })
+  ];
+
+  preConfigure = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
+    # Ignore gettext in cmake_prefix_path so that find_program doesn't
+    # pick up the wrong gettext. TODO: Find a better solution for
+    # this, maybe make cmake not look up executables in
+    # CMAKE_PREFIX_PATH.
+    cmakeFlags+=" -DCMAKE_IGNORE_PATH=${lib.getBin gettext}/bin"
+  '';
+
+  nativeBuildInputs = [
+    bison
+    cmake
+    gettext
+    gobject-introspection
+    gperf
+    ninja
+    perl
+    perl.pkgs.FileCopyRecursive # used by copy-user-interface-resources.pl
+    pkg-config
+    python3
+    ruby
+    gi-docgen
+    glib # for gdbus-codegen
+    unifdef
+  ] ++ lib.optionals stdenv.isLinux [
+    wayland # for wayland-scanner
+  ];
+
+  buildInputs = [
+    at-spi2-core
+    enchant2
+    libavif
+    libepoxy
+    libjxl
+    gnutls
+    gst-plugins-bad
+    gst-plugins-base
+    harfbuzz
+    libGL
+    libGLU
+    mesa # for libEGL headers
+    libgcrypt
+    libgpg-error
+    libidn
+    libintl
+    lcms2
+    libpthreadstubs
+    libtasn1
+    libwebp
+    libxkbcommon
+    libxml2
+    libxslt
+    nettle
+    openjpeg
+    p11-kit
+    sqlite
+    woff2
+  ] ++ (with xorg; [
+    libXdamage
+    libXdmcp
+    libXt
+    libXtst
+  ]) ++ lib.optionals stdenv.isDarwin [
+    libedit
+    readline
+  ] ++ lib.optional (stdenv.isDarwin && !stdenv.isAarch64) (
+    # Pull a header that contains a definition of proc_pid_rusage().
+    # (We pick just that one because using the other headers from `sdk` is not
+    # compatible with our C++ standard library. This header is already in
+    # the standard library on aarch64)
+    runCommand "webkitgtk_headers" { } ''
+      install -Dm444 "${lib.getDev apple_sdk.sdk}"/include/libproc.h "$out"/include/libproc.h
+    ''
+  ) ++ lib.optionals stdenv.isLinux [
+    libseccomp
+    libmanette
+    wayland
+    libwpe
+    libwpe-fdo
+  ] ++ lib.optionals systemdSupport [
+    systemd
+  ] ++ lib.optionals enableGeoLocation [
+    geoclue2
+  ] ++ lib.optionals withLibsecret [
+    libsecret
+  ] ++ lib.optionals (lib.versionAtLeast gtk3.version "4.0") [
+    xorg.libXcomposite
+    wayland-protocols
+  ];
+
+  propagatedBuildInputs = [
+    gtk3
+    libsoup
+  ];
+
+  cmakeFlags = let
+    cmakeBool = x: if x then "ON" else "OFF";
+  in [
+    "-DENABLE_INTROSPECTION=ON"
+    "-DPORT=GTK"
+    "-DUSE_LIBHYPHEN=OFF"
+    "-DUSE_SOUP2=${cmakeBool (lib.versions.major libsoup.version == "2")}"
+    "-DUSE_LIBSECRET=${cmakeBool withLibsecret}"
+  ] ++ lib.optionals stdenv.isLinux [
+    # Have to be explicitly specified when cross.
+    # https://github.com/WebKit/WebKit/commit/a84036c6d1d66d723f217a4c29eee76f2039a353
+    "-DBWRAP_EXECUTABLE=${lib.getExe bubblewrap}"
+    "-DDBUS_PROXY_EXECUTABLE=${lib.getExe xdg-dbus-proxy}"
+  ] ++ lib.optionals stdenv.isDarwin [
+    "-DENABLE_GAMEPAD=OFF"
+    "-DENABLE_GTKDOC=OFF"
+    "-DENABLE_MINIBROWSER=OFF"
+    "-DENABLE_QUARTZ_TARGET=ON"
+    "-DENABLE_X11_TARGET=OFF"
+    "-DUSE_APPLE_ICU=OFF"
+    "-DUSE_OPENGL_OR_ES=OFF"
+  ] ++ lib.optionals (lib.versionAtLeast gtk3.version "4.0") [
+    "-DUSE_GTK4=ON"
+  ] ++ lib.optionals (!systemdSupport) [
+    "-DENABLE_JOURNALD_LOG=OFF"
+  ];
+
+  postPatch = ''
+    patchShebangs .
+  '';
+
+  postFixup = ''
+    # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
+    moveToOutput "share/doc" "$devdoc"
+  '';
+
+  requiredSystemFeatures = [ "big-parallel" ];
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    description = "Web content rendering engine, GTK port";
+    homepage = "https://webkitgtk.org/";
+    license = licenses.bsd2;
+    pkgConfigModules = [
+      "javascriptcoregtk-4.0"
+      "webkit2gtk-4.0"
+      "webkit2gtk-web-extension-4.0"
+    ];
+    platforms = platforms.linux ++ platforms.darwin;
+    maintainers = teams.gnome.members;
+    broken = stdenv.isDarwin;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/webkitgtk/fdo-backend-path.patch b/nixpkgs/pkgs/development/libraries/webkitgtk/fdo-backend-path.patch
new file mode 100644
index 000000000000..48e7d9cca745
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/webkitgtk/fdo-backend-path.patch
@@ -0,0 +1,11 @@
+--- a/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
++++ b/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
+@@ -84,7 +84,7 @@ void WebProcessPool::platformInitializeWebProcess(const WebProcessProxy& process
+ 
+ #if PLATFORM(WAYLAND)
+     if (WebCore::PlatformDisplay::sharedDisplay().type() == WebCore::PlatformDisplay::Type::Wayland && parameters.dmaBufRendererBufferMode.isEmpty()) {
+-        wpe_loader_init("libWPEBackend-fdo-1.0.so.1");
++        wpe_loader_init("@wpebackend_fdo@/lib/libWPEBackend-fdo-1.0.so.1");
+         if (AcceleratedBackingStoreWayland::checkRequirements()) {
+             parameters.hostClientFileDescriptor = UnixFileDescriptor { wpe_renderer_host_create_client(), UnixFileDescriptor::Adopt };
+             parameters.implementationLibraryName = FileSystem::fileSystemRepresentation(String::fromLatin1(wpe_loader_get_loaded_implementation_library_name()));
diff --git a/nixpkgs/pkgs/development/libraries/webkitgtk/fix-bubblewrap-paths.patch b/nixpkgs/pkgs/development/libraries/webkitgtk/fix-bubblewrap-paths.patch
new file mode 100644
index 000000000000..9be2d74af1bd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/webkitgtk/fix-bubblewrap-paths.patch
@@ -0,0 +1,17 @@
+diff --git a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
+index 0a201fe176..fa3690c12a 100644
+--- a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
++++ b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
+@@ -819,6 +819,12 @@ GRefPtr<GSubprocess> bubblewrapSpawn(GSubprocessLauncher* launcher, const Proces
+         sandboxArgs.append("--unshare-ipc");
+     }
+ 
++    // Nix Directories
++    sandboxArgs.appendVector(Vector<CString>({ "--ro-bind", "@storeDir@", "@storeDir@" }));
++    sandboxArgs.appendVector(Vector<CString>({ "--ro-bind-try", "/run/current-system", "/run/current-system" }));
++    sandboxArgs.appendVector(Vector<CString>({ "--ro-bind-try", "@driverLink@/lib", "@driverLink@/lib" }));
++    sandboxArgs.appendVector(Vector<CString>({ "--ro-bind-try", "@driverLink@/share", "@driverLink@/share" }));
++
+ #if ENABLE(DEVELOPER_MODE)
+     const char* execDirectory = g_getenv("WEBKIT_EXEC_PATH");
+     if (execDirectory) {
diff --git a/nixpkgs/pkgs/development/libraries/webp-pixbuf-loader/default.nix b/nixpkgs/pkgs/development/libraries/webp-pixbuf-loader/default.nix
new file mode 100644
index 000000000000..b3f4e4d48390
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/webp-pixbuf-loader/default.nix
@@ -0,0 +1,69 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, meson
+, ninja
+, pkg-config
+, makeWrapper
+, gdk-pixbuf
+, libwebp
+}:
+
+let
+  inherit (gdk-pixbuf) moduleDir;
+  loadersPath = "${gdk-pixbuf.binaryDir}/webp-loaders.cache";
+in
+stdenv.mkDerivation rec {
+  pname = "webp-pixbuf-loader";
+  version = "0.2.6";
+
+  src = fetchFromGitHub {
+    owner = "aruiz";
+    repo = "webp-pixbuf-loader";
+    rev = version;
+    sha256 = "sha256-2GDH5+YCwb2mPdMfEscmWDOzdGnWRcppE+4rcDCZog4=";
+  };
+
+  nativeBuildInputs = [
+    gdk-pixbuf.dev
+    meson
+    ninja
+    pkg-config
+    makeWrapper
+  ];
+
+  buildInputs = [
+    gdk-pixbuf
+    libwebp
+  ];
+
+  mesonFlags = [
+    "-Dgdk_pixbuf_moduledir=${placeholder "out"}/${moduleDir}"
+  ];
+
+  postPatch = ''
+    # It looks for gdk-pixbuf-thumbnailer in this package's bin rather than the gdk-pixbuf bin. We need to patch that.
+    substituteInPlace webp-pixbuf.thumbnailer.in \
+      --replace "@bindir@/gdk-pixbuf-thumbnailer" "$out/libexec/gdk-pixbuf-thumbnailer-webp"
+  '';
+
+  postInstall = ''
+    GDK_PIXBUF_MODULE_FILE="$out/${loadersPath}" \
+    GDK_PIXBUF_MODULEDIR="$out/${moduleDir}" \
+    gdk-pixbuf-query-loaders --update-cache
+
+    # It assumes gdk-pixbuf-thumbnailer can find the webp loader in the loaders.cache referenced by environment variable, breaking containment.
+    # So we replace it with a wrapped executable.
+    mkdir -p "$out/bin"
+    makeWrapper "${gdk-pixbuf}/bin/gdk-pixbuf-thumbnailer" "$out/libexec/gdk-pixbuf-thumbnailer-webp" \
+      --set GDK_PIXBUF_MODULE_FILE "$out/${loadersPath}"
+  '';
+
+  meta = with lib; {
+    description = "WebP GDK Pixbuf Loader library";
+    homepage = "https://github.com/aruiz/webp-pixbuf-loader";
+    license = licenses.lgpl2Plus;
+    platforms = platforms.unix;
+    maintainers = teams.gnome.members ++ [ maintainers.cwyc ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/webrtc-audio-processing/0.3.nix b/nixpkgs/pkgs/development/libraries/webrtc-audio-processing/0.3.nix
new file mode 100644
index 000000000000..30e2a343e2d0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/webrtc-audio-processing/0.3.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchurl, darwin }:
+
+stdenv.mkDerivation rec {
+  pname = "webrtc-audio-processing";
+  version = "0.3.1";
+
+  src = fetchurl {
+    url = "https://freedesktop.org/software/pulseaudio/webrtc-audio-processing/webrtc-audio-processing-${version}.tar.xz";
+    sha256 = "1gsx7k77blfy171b6g3m0k0s0072v6jcawhmx1kjs9w5zlwdkzd0";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    ./enable-riscv.patch
+    ./enable-powerpc.patch
+  ];
+
+  buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ ApplicationServices ]);
+
+  patchPhase = lib.optionalString stdenv.hostPlatform.isMusl ''
+    substituteInPlace webrtc/base/checks.cc --replace 'defined(__UCLIBC__)' 1
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.freedesktop.org/software/pulseaudio/webrtc-audio-processing";
+    description = "A more Linux packaging friendly copy of the AudioProcessing module from the WebRTC project";
+    license = licenses.bsd3;
+    # https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/blob/v0.3.1/webrtc/rtc_base/system/arch.h
+    # + our patches
+    platforms = intersectLists platforms.unix (platforms.arm ++ platforms.aarch64 ++ platforms.mips ++ platforms.power ++ platforms.riscv ++ platforms.x86);
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/webrtc-audio-processing/default.nix b/nixpkgs/pkgs/development/libraries/webrtc-audio-processing/default.nix
new file mode 100644
index 000000000000..1b847528550e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/webrtc-audio-processing/default.nix
@@ -0,0 +1,55 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, fetchurl
+, darwin
+, abseil-cpp
+, meson
+, ninja
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "webrtc-audio-processing";
+  version = "1.3";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "pulseaudio";
+    repo = "webrtc-audio-processing";
+    rev = "v${version}";
+    hash = "sha256-8CDt4kMt2Owzyv22dqWIcFuHeg4Y3FxB405cLw3FZ+g=";
+  };
+
+  patches = [
+    # Fix an include oppsie that happens to not happen on glibc
+    # https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/merge_requests/38
+    (fetchurl {
+      url = "https://git.alpinelinux.org/aports/plain/community/webrtc-audio-processing-1/0001-rtc_base-Include-stdint.h-to-fix-build-failures.patch?id=625e19c19972e69e034c0870a31b375833d1ab5d";
+      hash = "sha256-9nI22SJoU0H3CzsPSAObtCFTadtvkzdnqIh6mxmUuds=";
+    })
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+  ];
+
+  propagatedBuildInputs = [
+    abseil-cpp
+  ];
+
+  buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ ApplicationServices Foundation ]);
+
+  meta = with lib; {
+    homepage = "https://www.freedesktop.org/software/pulseaudio/webrtc-audio-processing";
+    description = "A more Linux packaging friendly copy of the AudioProcessing module from the WebRTC project";
+    license = licenses.bsd3;
+    # https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/blob/master/webrtc/rtc_base/system/arch.h
+    # x86-32 disabled due to https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/issues/5
+    platforms = intersectLists platforms.unix (platforms.aarch64 ++ platforms.mips ++ platforms.riscv ++ platforms.x86_64);
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/webrtc-audio-processing/enable-powerpc.patch b/nixpkgs/pkgs/development/libraries/webrtc-audio-processing/enable-powerpc.patch
new file mode 100644
index 000000000000..636cae4df854
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/webrtc-audio-processing/enable-powerpc.patch
@@ -0,0 +1,37 @@
+This patch was extracted from the Gentoo powerpc64le-qtwebengine
+patchset, referenced here:
+
+  https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-qt/qtwebengine/qtwebengine-5.15.3_p20220406.ebuild
+
+and downloaded from here:
+
+  https://dev.gentoo.org/~asturm/distfiles/${PN}-5.15.3_p20220406-patchset.tar.xz
+
+From 4bbb4482e14ad27cf0bd5032b1b5d4abba29dc99 Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev <gyakovlev@gentoo.org>
+Date: Fri, 27 Nov 2020 13:05:45 -0800
+Subject: [PATCH] 5.15.2 ppc64le patchet
+
+diff --git a/webrtc/typedefs.h b/webrtc/typedefs.h
+index ce1f3e8..fd39a16 100644
+--- a/webrtc/typedefs.h
++++ b/webrtc/typedefs.h
+@@ -38,6 +38,18 @@
+ #define WEBRTC_ARCH_X86
+ #define WEBRTC_ARCH_32_BITS
+ #define WEBRTC_ARCH_LITTLE_ENDIAN
++#elif defined(__PPC__)
++#define WEBRTC_ARCH_PPC_FAMILY
++#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
++#define WEBRTC_ARCH_LITTLE_ENDIAN
++#else
++#define WEBRTC_ARCH_BIG_ENDIAN
++#endif
++#if defined(__LP64__)
++#define WEBRTC_ARCH_64_BITS
++#else
++#define WEBRTC_ARCH_32_BITS
++#endif
+ #elif defined(__ARMEL__)
+ // TODO(ajm): We'd prefer to control platform defines here, but this is
+ // currently provided by the Android makefiles. Commented to avoid duplicate
diff --git a/nixpkgs/pkgs/development/libraries/webrtc-audio-processing/enable-riscv.patch b/nixpkgs/pkgs/development/libraries/webrtc-audio-processing/enable-riscv.patch
new file mode 100644
index 000000000000..d61c33548a73
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/webrtc-audio-processing/enable-riscv.patch
@@ -0,0 +1,18 @@
+diff --git a/webrtc/typedefs.h b/webrtc/typedefs.h
+index d875490..ce1f3e8 100644
+--- a/webrtc/typedefs.h
++++ b/webrtc/typedefs.h
+@@ -26,6 +26,13 @@
+ #elif defined(__aarch64__)
+ #define WEBRTC_ARCH_64_BITS
+ #define WEBRTC_ARCH_LITTLE_ENDIAN
++#elif defined(__riscv) || defined(__riscv__)
++#define WEBRTC_ARCH_LITTLE_ENDIAN
++#if __riscv_xlen == 64
++#define WEBRTC_ARCH_64_BITS
++#else
++#define WEBRTC_ARCH_32_BITS
++#endif
+ #elif defined(_M_IX86) || defined(__i386__)
+ #define WEBRTC_ARCH_X86_FAMILY
+ #define WEBRTC_ARCH_X86
diff --git a/nixpkgs/pkgs/development/libraries/websocket++/default.nix b/nixpkgs/pkgs/development/libraries/websocket++/default.nix
new file mode 100644
index 000000000000..c325ade26e5c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/websocket++/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "websocket++";
+  version = "0.8.2";
+
+  src = fetchFromGitHub {
+    owner = "zaphoyd";
+    repo = "websocketpp";
+    rev = version;
+    sha256 = "sha256-9fIwouthv2GcmBe/UPvV7Xn9P2o0Kmn2hCI4jCh0hPM=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    homepage = "https://www.zaphoyd.com/websocketpp/";
+    description = "C++/Boost Asio based websocket client/server library";
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ revol-xut ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/wfa2-lib/default.nix b/nixpkgs/pkgs/development/libraries/wfa2-lib/default.nix
new file mode 100644
index 000000000000..1543484868bf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/wfa2-lib/default.nix
@@ -0,0 +1,37 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, llvmPackages
+, enableOpenMP ? true
+}:
+
+stdenv.mkDerivation rec {
+  pname = "wfa2-lib";
+  version = "2.3.4";
+
+  src = fetchFromGitHub {
+    owner = "smarco";
+    repo = "WFA2-lib";
+    rev = "v${version}";
+    hash = "sha256-h4e+f+JkQr3qqaBUDly24ZvKxaEGzeJtMXejh8aD5D0=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = lib.optionals enableOpenMP [ llvmPackages.openmp ];
+
+  cmakeFlags = [ "-DOPENMP=${if enableOpenMP then "ON" else "OFF"}" ];
+
+  meta = with lib; {
+    description = "Wavefront alignment algorithm library v2";
+    homepage = "https://github.com/smarco/WFA2-lib";
+    license = licenses.mit;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/whereami/default.nix b/nixpkgs/pkgs/development/libraries/whereami/default.nix
new file mode 100644
index 000000000000..f68895ca17d0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/whereami/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fixDarwinDylibNames
+}:
+let
+  libExt = stdenv.hostPlatform.extensions.sharedLibrary;
+in
+stdenv.mkDerivation rec {
+  pname = "whereami";
+  version = "unstable-2022-02-18";
+
+  src = fetchFromGitHub {
+    owner = "gpakosz";
+    repo = pname;
+    rev = "ba364cd54fd431c76c045393b6522b4bff547f50";
+    sha256 = "XhRqW0wdXzlmyBf1cjqtQvztuyV4buxVl19Q0uyEOhk=";
+  };
+
+  nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=strict-prototypes";
+
+  makeFlags = [
+    "-C_gnu-make"
+    "build-library"
+    "binsubdir=platform"
+  ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/lib $out/include
+    cp bin/platform/library${libExt} $out/lib/libwhereami${libExt}
+    cp src/whereami.h $out/include/whereami.h
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Locate the current executable and running module/library";
+    homepage = "https://github.com/gpakosz/whereami";
+    license = with licenses; [ mit wtfpl ];
+    maintainers = with maintainers; [ emilytrau ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/wiiuse/default.nix b/nixpkgs/pkgs/development/libraries/wiiuse/default.nix
new file mode 100644
index 000000000000..d5d34fb618d6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/wiiuse/default.nix
@@ -0,0 +1,38 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, bluez
+, libobjc
+, Foundation
+, IOBluetooth
+}:
+stdenv.mkDerivation rec {
+
+  pname = "WiiUse";
+  version = "0.15.5";
+
+  src = fetchFromGitHub {
+    owner = "wiiuse";
+    repo = "wiiuse";
+    rev = version;
+    sha256 = "05gc3s0wxx7ga4g32yyibyxdh46rm9bbslblrc72ynrjxq98sg13";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ bluez ]
+    ++ lib.optionals stdenv.hostPlatform.isDarwin [ libobjc Foundation IOBluetooth ];
+
+  propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ bluez ];
+
+  cmakeFlags = [ "-DBUILD_EXAMPLE_SDL=OFF" ];
+
+  meta = with lib; {
+    description = "Feature complete cross-platform Wii Remote access library";
+    license = licenses.gpl3Plus;
+    homepage = "https://github.com/wiiuse/wiiuse";
+    maintainers = with maintainers; [ shamilton ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/wildmidi/default.nix b/nixpkgs/pkgs/development/libraries/wildmidi/default.nix
new file mode 100644
index 000000000000..23dc8dc3b053
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/wildmidi/default.nix
@@ -0,0 +1,61 @@
+{ lib, stdenv, fetchFromGitHub, writeTextFile, cmake, alsa-lib, OpenAL, freepats }:
+
+let
+  defaultCfgPath = "${placeholder "out"}/etc/wildmidi/wildmidi.cfg";
+in
+stdenv.mkDerivation rec {
+  pname = "wildmidi";
+  version = "0.4.5";
+
+  src = fetchFromGitHub {
+    owner = "Mindwerks";
+    repo = "wildmidi";
+    rev = "${pname}-${version}";
+    sha256 = "sha256-5El8aDpAgjrW0/4lphZEF+Hfv9Xr7J4DMk1b/Tb+0TU=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = lib.optionals stdenv.buildPlatform.isLinux [
+    alsa-lib stdenv.cc.libc/*couldn't find libm*/
+  ] ++ lib.optionals stdenv.buildPlatform.isDarwin [
+    OpenAL
+  ];
+
+  preConfigure = ''
+    # https://github.com/Mindwerks/wildmidi/issues/236
+    substituteInPlace src/wildmidi.pc.in \
+      --replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
+      --replace '$'{exec_prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
+  '';
+
+  cmakeFlags = [
+    "-DWILDMIDI_CFG=${defaultCfgPath}"
+  ];
+
+  postInstall = let
+    defaultCfg = writeTextFile {
+      name = "wildmidi.cfg";
+      text = ''
+        dir ${freepats}
+        source ${freepats}/freepats.cfg
+      '';
+    };
+  in ''
+    mkdir -p "$(dirname ${defaultCfgPath})"
+    ln -s ${defaultCfg} ${defaultCfgPath}
+  '';
+
+  meta = with lib; {
+    description = "Software MIDI player and library";
+    longDescription = ''
+      WildMIDI is a simple software midi player which has a core softsynth
+      library that can be use with other applications.
+    '';
+    homepage = "https://wildmidi.sourceforge.net/";
+    # The library is LGPLv3, the wildmidi executable is GPLv3
+    license = licenses.lgpl3;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.bjornfor ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/wiredtiger/default.nix b/nixpkgs/pkgs/development/libraries/wiredtiger/default.nix
new file mode 100644
index 000000000000..28f66b8d31cf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/wiredtiger/default.nix
@@ -0,0 +1,59 @@
+{ lib, stdenv, fetchFromGitHub, automake, autoconf, libtool
+
+# Optional Dependencies
+, lz4 ? null, snappy ? null, zlib ? null, bzip2 ? null, db ? null
+, gperftools ? null, leveldb ? null
+}:
+
+let
+  shouldUsePkg = pkg: if pkg != null && lib.meta.availableOn stdenv.hostPlatform pkg then pkg else null;
+
+  optLz4 = shouldUsePkg lz4;
+  optSnappy = shouldUsePkg snappy;
+  optZlib = shouldUsePkg zlib;
+  optBzip2 = shouldUsePkg bzip2;
+  optDb = shouldUsePkg db;
+  optGperftools = shouldUsePkg gperftools;
+  optLeveldb = shouldUsePkg leveldb;
+in
+stdenv.mkDerivation rec {
+  pname = "wiredtiger";
+  version = "3.2.1";
+
+  src = fetchFromGitHub {
+    repo = "wiredtiger";
+    owner = "wiredtiger";
+    rev = version;
+    sha256 = "04j2zw8b9jym43r682rh4kpdippxx7iw3ry16nxlbybzar9kgk83";
+  };
+
+  nativeBuildInputs = [ automake autoconf libtool ];
+  buildInputs = [ optLz4 optSnappy optZlib optBzip2 optDb optGperftools optLeveldb ];
+
+  configureFlags = [
+    (lib.withFeature   false                   "attach")
+    (lib.withFeatureAs true                    "builtins" "")
+    (lib.enableFeature (optBzip2 != null)      "bzip2")
+    (lib.enableFeature false                   "diagnostic")
+    (lib.enableFeature false                   "java")
+    (lib.enableFeature (optLeveldb != null)    "leveldb")
+    (lib.enableFeature false                   "python")
+    (lib.enableFeature (optSnappy != null)     "snappy")
+    (lib.enableFeature (optLz4 != null)        "lz4")
+    (lib.enableFeature (optGperftools != null) "tcmalloc")
+    (lib.enableFeature (optZlib != null)       "zlib")
+    (lib.withFeatureAs (optDb != null)         "berkeleydb" optDb)
+    (lib.withFeature   false                   "helium")
+  ];
+
+  preConfigure = ''
+    ./autogen.sh
+  '';
+
+  meta = with lib; {
+    homepage = "http://wiredtiger.com/";
+    description = "";
+    license = licenses.gpl2;
+    platforms = intersectLists platforms.unix platforms.x86_64;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/wlroots/default.nix b/nixpkgs/pkgs/development/libraries/wlroots/default.nix
new file mode 100644
index 000000000000..e9265de54c61
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/wlroots/default.nix
@@ -0,0 +1,148 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, fetchpatch
+, meson
+, ninja
+, pkg-config
+, wayland-scanner
+, libGL
+, wayland
+, wayland-protocols
+, libinput
+, libxkbcommon
+, pixman
+, libcap
+, mesa
+, xorg
+, libpng
+, ffmpeg_4
+, ffmpeg
+, hwdata
+, seatd
+, vulkan-loader
+, glslang
+, libliftoff
+, libdisplay-info
+, nixosTests
+
+, enableXWayland ? true
+, xwayland ? null
+}:
+
+let
+  generic = { version, hash, extraBuildInputs ? [ ], extraNativeBuildInputs ? [ ], patches ? [ ], postPatch ? "" }:
+    stdenv.mkDerivation (finalAttrs: {
+      pname = "wlroots";
+      inherit version;
+
+      inherit enableXWayland;
+
+      src = fetchFromGitLab {
+        domain = "gitlab.freedesktop.org";
+        owner = "wlroots";
+        repo = "wlroots";
+        rev = finalAttrs.version;
+        inherit hash;
+      };
+
+      inherit patches postPatch;
+
+      # $out for the library and $examples for the example programs (in examples):
+      outputs = [ "out" "examples" ];
+
+      strictDeps = true;
+      depsBuildBuild = [ pkg-config ];
+
+      nativeBuildInputs = [ meson ninja pkg-config wayland-scanner glslang ]
+        ++ extraNativeBuildInputs;
+
+      buildInputs = [
+        libGL
+        libcap
+        libinput
+        libpng
+        libxkbcommon
+        mesa
+        pixman
+        seatd
+        vulkan-loader
+        wayland
+        wayland-protocols
+        xorg.libX11
+        xorg.xcbutilerrors
+        xorg.xcbutilimage
+        xorg.xcbutilrenderutil
+        xorg.xcbutilwm
+      ]
+      ++ lib.optional finalAttrs.enableXWayland xwayland
+      ++ extraBuildInputs;
+
+      mesonFlags =
+        lib.optional (!finalAttrs.enableXWayland) "-Dxwayland=disabled"
+      ;
+
+      postFixup = ''
+        # Install ALL example programs to $examples:
+        # screencopy dmabuf-capture input-inhibitor layer-shell idle-inhibit idle
+        # screenshot output-layout multi-pointer rotation tablet touch pointer
+        # simple
+        mkdir -p $examples/bin
+        cd ./examples
+        for binary in $(find . -executable -type f -printf '%P\n' | grep -vE '\.so'); do
+          cp "$binary" "$examples/bin/wlroots-$binary"
+        done
+      '';
+
+      # Test via TinyWL (the "minimum viable product" Wayland compositor based on wlroots):
+      passthru.tests.tinywl = nixosTests.tinywl;
+
+      meta = {
+        description = "A modular Wayland compositor library";
+        longDescription = ''
+          Pluggable, composable, unopinionated modules for building a Wayland
+          compositor; or about 50,000 lines of code you were going to write anyway.
+        '';
+        inherit (finalAttrs.src.meta) homepage;
+        changelog = "https://gitlab.freedesktop.org/wlroots/wlroots/-/tags/${version}";
+        license = lib.licenses.mit;
+        platforms = lib.platforms.linux;
+        maintainers = with lib.maintainers; [ primeos synthetica rewine ];
+      };
+    });
+
+in
+rec {
+  wlroots_0_15 = generic {
+    version = "0.15.1";
+    hash = "sha256-MFR38UuB/wW7J9ODDUOfgTzKLse0SSMIRYTpEaEdRwM=";
+    extraBuildInputs = [
+      ffmpeg_4
+    ];
+  };
+
+  wlroots_0_16 = generic {
+    version = "0.16.2";
+    hash = "sha256-JeDDYinio14BOl6CbzAPnJDOnrk4vgGNMN++rcy2ItQ=";
+    postPatch = ''
+      substituteInPlace backend/drm/meson.build \
+        --replace /usr/share/hwdata/ ${hwdata}/share/hwdata/
+    '';
+    extraBuildInputs = [
+      ffmpeg_4
+    ];
+  };
+
+  wlroots_0_17 = generic {
+    version = "0.17.1";
+    hash = "sha256-Z0gWM7AQqJOSr2maUtjdgk/MF6pyeyFMMTaivgt+RMI=";
+    extraBuildInputs = [
+      ffmpeg
+      hwdata
+      libliftoff
+      libdisplay-info
+    ];
+  };
+
+  wlroots = wlroots_0_17;
+}
diff --git a/nixpkgs/pkgs/development/libraries/wlroots/protocols.nix b/nixpkgs/pkgs/development/libraries/wlroots/protocols.nix
new file mode 100644
index 000000000000..0a747c1e86a4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/wlroots/protocols.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchFromGitLab, wayland-scanner }:
+
+stdenv.mkDerivation rec {
+  pname = "wlr-protocols";
+  version = "unstable-2022-09-05";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "wlroots";
+    repo = "wlr-protocols";
+    rev = "4264185db3b7e961e7f157e1cc4fd0ab75137568";
+    sha256 = "Ztc07RLg+BZPondP/r6Jo3Fw1QY/z1QsFvdEuOqQshA=";
+  };
+
+  strictDeps = true;
+  nativeBuildInputs = [ wayland-scanner ];
+
+  patchPhase = ''
+    substituteInPlace wlr-protocols.pc.in \
+      --replace '=''${pc_sysrootdir}' "=" \
+      --replace '=@prefix@' "=$out"
+  '';
+
+  doCheck = true;
+  checkTarget = "check";
+
+  installFlags = [ "DESTDIR=$(out)" "PREFIX=" ];
+
+  meta = with lib; {
+    description = "Wayland roots protocol extensions";
+    longDescription = ''
+      wlr-protocols contains Wayland protocols that add functionality not
+      available in the Wayland core protocol, and specific to wlroots-based
+      compositors. Such protocols either add completely new functionality, or
+      extend the functionality of some other protocol either in Wayland core,
+      or some other protocol in wayland-protocols.
+    '';
+    homepage    = "https://gitlab.freedesktop.org/wlroots/wlr-protocols";
+    license     = licenses.mit; # See file headers
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ twitchyliquid64 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/wolfssl/default.nix b/nixpkgs/pkgs/development/libraries/wolfssl/default.nix
new file mode 100644
index 000000000000..60a6e10c8334
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/wolfssl/default.nix
@@ -0,0 +1,106 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, Security
+, autoreconfHook
+, util-linux
+, openssl
+, cacert
+# The primary --enable-XXX variant. 'all' enables most features, but causes build-errors for some software,
+# requiring to build a special variant for that software. Example: 'haproxy'
+, variant ? "all"
+, extraConfigureFlags ? []
+, enableLto ? !(stdenv.isDarwin || stdenv.hostPlatform.isStatic || stdenv.cc.isClang)
+}:
+stdenv.mkDerivation (finalAttrs: {
+  pname = "wolfssl-${variant}";
+  version = "5.6.6";
+
+  src = fetchFromGitHub {
+    owner = "wolfSSL";
+    repo = "wolfssl";
+    rev = "refs/tags/v${finalAttrs.version}-stable";
+    hash = "sha256-HXl8GgngC1J8Dlt7fXBrVRa+IV7thVr+MIpeuf3Khcg=";
+  };
+
+  postPatch = ''
+    patchShebangs ./scripts
+    # ocsp stapling tests require network access, so skip them
+    sed -i -e'2s/.*/exit 77/' scripts/ocsp-stapling.test
+    # ensure test detects musl-based systems too
+    substituteInPlace scripts/ocsp-stapling2.test \
+      --replace '"linux-gnu"' '"linux-"'
+  '';
+
+  configureFlags = [
+    "--enable-${variant}"
+    "--enable-reproducible-build"
+  ] ++ lib.optionals (variant == "all") [
+    # Extra feature flags to add while building the 'all' variant.
+    # Since they conflict while building other variants, only specify them for this one.
+    "--enable-pkcs11"
+    "--enable-writedup"
+    "--enable-base64encode"
+  ] ++ [
+    # We're not on tiny embedded machines.
+    # Increase TLS session cache from 33 sessions to 20k.
+    "--enable-bigcache"
+
+    # Use WolfSSL's Single Precision Math with timing-resistant cryptography.
+    "--enable-sp=yes${lib.optionalString (stdenv.hostPlatform.isx86_64 || stdenv.hostPlatform.isAarch) ",asm"}"
+    "--enable-sp-math-all"
+    "--enable-harden"
+  ] ++ lib.optionals (stdenv.hostPlatform.isx86_64) [
+    # Enable AVX/AVX2/AES-NI instructions, gated by runtime detection via CPUID.
+    "--enable-intelasm"
+    "--enable-aesni"
+  ] ++ lib.optionals (stdenv.isAarch64 && stdenv.isDarwin) [
+    # No runtime detection under ARM and no platform function checks like for X86.
+    # However, all ARM macOS systems have the supported extensions autodetected in the configure script.
+    "--enable-armasm=inline"
+  ] ++ extraConfigureFlags;
+
+  # LTO should help with the C implementations.
+  env.NIX_CFLAGS_COMPILE = lib.optionalString enableLto "-flto";
+  env.NIX_LDFLAGS_COMPILE = lib.optionalString enableLto "-flto";
+
+  outputs = [
+    "dev"
+    "doc"
+    "lib"
+    "out"
+  ];
+
+  propagatedBuildInputs = lib.optionals stdenv.isDarwin [
+    Security
+  ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+    util-linux
+  ];
+
+  doCheck = true;
+
+  nativeCheckInputs = [
+    openssl
+    cacert
+  ];
+
+  postInstall = ''
+    # fix recursive cycle:
+    # wolfssl-config points to dev, dev propagates bin
+    moveToOutput bin/wolfssl-config "$dev"
+    # moveToOutput also removes "$out" so recreate it
+    mkdir -p "$out"
+  '';
+
+  meta = with lib; {
+    description = "A small, fast, portable implementation of TLS/SSL for embedded devices";
+    homepage = "https://www.wolfssl.com/";
+    changelog = "https://github.com/wolfSSL/wolfssl/releases/tag/v${finalAttrs.version}-stable";
+    platforms = platforms.all;
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ fab vifino ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/wt/default.nix b/nixpkgs/pkgs/development/libraries/wt/default.nix
new file mode 100644
index 000000000000..f9dd1d06ee33
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/wt/default.nix
@@ -0,0 +1,52 @@
+{ lib, stdenv, fetchFromGitHub, cmake, boost, pkg-config, doxygen, qtbase, libharu
+, pango, fcgi, firebird, libmysqlclient, postgresql, graphicsmagick, glew, openssl
+, pcre, harfbuzz, icu
+}:
+
+let
+  generic =
+    { version, sha256 }:
+    stdenv.mkDerivation {
+      pname = "wt";
+      inherit version;
+
+      src = fetchFromGitHub {
+        owner = "emweb";
+        repo = "wt";
+        rev = version;
+        inherit sha256;
+      };
+
+      nativeBuildInputs = [ cmake pkg-config ];
+      buildInputs = [
+        boost doxygen qtbase libharu
+        pango fcgi firebird libmysqlclient postgresql graphicsmagick glew
+        openssl pcre harfbuzz icu
+      ];
+
+      dontWrapQtApps = true;
+      cmakeFlags = [
+        "-DWT_CPP_11_MODE=-std=c++11"
+        "--no-warn-unused-cli"
+      ]
+      ++ lib.optionals (graphicsmagick != null) [
+        "-DWT_WRASTERIMAGE_IMPLEMENTATION=GraphicsMagick"
+        "-DGM_PREFIX=${graphicsmagick}"
+      ]
+      ++ lib.optional (libmysqlclient != null)
+        "-DMYSQL_PREFIX=${libmysqlclient}";
+
+      meta = with lib; {
+        homepage = "https://www.webtoolkit.eu/wt";
+        description = "C++ library for developing web applications";
+        platforms = platforms.linux;
+        license = licenses.gpl2;
+        maintainers = with maintainers; [ juliendehos ];
+      };
+    };
+in {
+  wt4 = generic {
+    version = "4.10.0";
+    sha256 = "sha256-05WZnyUIwXwJA24mQi5ATCqRZ6PE/tiw2/MO1qYHRsY=";
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/wtk/builder.sh b/nixpkgs/pkgs/development/libraries/wtk/builder.sh
new file mode 100644
index 000000000000..ca5157c6d71a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/wtk/builder.sh
@@ -0,0 +1,28 @@
+if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
+source $stdenv/setup
+
+mkdir unzipped
+pushd unzipped
+unzip $src || true
+popd
+
+mkdir -p $out
+mv unzipped/* $out/
+
+# Remove crap in the root directory.
+for file in $out/*
+do
+  if test -f $file ; then
+    rm $file
+  fi
+done
+
+# Set the dynamic linker.
+rpath=
+for i in $libraries; do
+    rpath=$rpath${rpath:+:}$i/lib
+done
+find $out -type f -perm -0100 \
+    -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" {} \;
+find $out -type f -perm -0100 \
+    -exec patchelf --set-rpath "$rpath" {} \;
diff --git a/nixpkgs/pkgs/development/libraries/wtk/default.nix b/nixpkgs/pkgs/development/libraries/wtk/default.nix
new file mode 100644
index 000000000000..1360895942a4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/wtk/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, requireFile, unzip, xorg }:
+
+stdenv.mkDerivation rec {
+  pname = "sun-java-wtk";
+  version = "2.5.2_01";
+
+  src = requireFile {
+    url = "http://java.sun.com/products/sjwtoolkit/download.html";
+    name = "sun_java_wireless_toolkit-${version}-linuxi486.bin.sh";
+    sha256 = "1cjb9c27847wv0hq3j645ckn4di4vsfvp29fr4zmdqsnvk4ahvj1";
+  };
+
+  builder = ./builder.sh;
+
+  nativeBuildInputs = [ unzip ];
+
+  libraries = [ xorg.libXpm xorg.libXt xorg.libX11 xorg.libICE xorg.libSM stdenv.cc.cc ];
+
+  meta = {
+    homepage = "http://java.sun.com/products/sjwtoolkit/download.html";
+    description = "Sun Java Wireless Toolkit 2.5.2_01 for CLDC";
+    sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
+    license = lib.licenses.unfree;
+    platforms = [ "i686-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/wxSVG/default.nix b/nixpkgs/pkgs/development/libraries/wxSVG/default.nix
new file mode 100644
index 000000000000..0119a2c03776
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/wxSVG/default.nix
@@ -0,0 +1,58 @@
+{ lib
+, stdenv
+, fetchurl
+, cairo
+, expat
+, ffmpeg
+, libexif
+, pango
+, pkg-config
+, wxGTK
+, darwin
+}:
+
+let
+  inherit (darwin.apple_sdk.frameworks) Cocoa;
+in
+stdenv.mkDerivation rec {
+  pname = "wxSVG";
+  version = "1.5.24";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/wxsvg/wxsvg/${version}/wxsvg-${version}.tar.bz2";
+    hash = "sha256-rkcykfjQpf6voGzScMgmxr6tS86yud1vzs8tt8JeJII=";
+  };
+
+  postPatch = ''
+    # Apply upstream patch for gcc-13 support:
+    #   https://sourceforge.net/p/wxsvg/git/ci/7b17fe365fb522618fb3520d7c5c1109b138358f/
+    sed -i src/cairo/SVGCanvasCairo.cpp -e '1i #include <cstdint>'
+  '';
+
+  nativeBuildInputs = [
+    pkg-config
+  ];
+
+  buildInputs = [
+    cairo
+    expat
+    ffmpeg
+    libexif
+    pango
+    wxGTK
+  ] ++ lib.optional stdenv.isDarwin Cocoa;
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://wxsvg.sourceforge.net/";
+    description = "A SVG manipulation library built with wxWidgets";
+    longDescription = ''
+      wxSVG is C++ library to create, manipulate and render Scalable Vector
+      Graphics (SVG) files with the wxWidgets toolkit.
+    '';
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.AndersonTorres ];
+    inherit (wxGTK.meta) platforms;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/wxsqlite3/default.nix b/nixpkgs/pkgs/development/libraries/wxsqlite3/default.nix
new file mode 100644
index 000000000000..d84c3ec1956d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/wxsqlite3/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, wxGTK
+, sqlite
+, Cocoa
+, setfile
+, rez
+, derez
+}:
+
+stdenv.mkDerivation rec {
+  pname = "wxsqlite3";
+  version = "4.9.9";
+
+  src = fetchFromGitHub {
+    owner = "utelle";
+    repo = "wxsqlite3";
+    rev = "v${version}";
+    hash = "sha256-YvQEAqiXwooCxUIZbIYhccbpVjYeFIp6d3dLeUP1RpE=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  buildInputs = [ sqlite wxGTK ]
+    ++ lib.optionals (stdenv.isDarwin) [ Cocoa setfile rez derez ];
+
+  meta = with lib; {
+    homepage = "https://utelle.github.io/wxsqlite3/";
+    description = "A C++ wrapper around the public domain SQLite 3.x for wxWidgets";
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ vrthra ];
+    license = with licenses; [ lgpl3Plus gpl3Plus ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/wxsqliteplus/default.nix b/nixpkgs/pkgs/development/libraries/wxsqliteplus/default.nix
new file mode 100644
index 000000000000..7ae728d90552
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/wxsqliteplus/default.nix
@@ -0,0 +1,46 @@
+{ lib, stdenv, fetchFromGitHub, wxGTK, wxsqlite3, sqlite, Cocoa, setfile }:
+
+stdenv.mkDerivation rec {
+  pname = "wxsqliteplus";
+  version = "0.3.6";
+
+  src = fetchFromGitHub {
+    owner = "guanlisheng";
+    repo = "wxsqliteplus";
+    rev = "v${version}";
+    sha256 = "0mgfq813pli56mar7pdxlhwjf5k10j196rs3jd0nc8b6dkzkzlnf";
+  };
+
+  postPatch = ''
+    sed -i '/WX_CLEAR_ARRAY/s/$/;/' src/{createtable,sqlite3table}.cpp
+  '';
+
+  buildInputs = [ wxGTK wxsqlite3 sqlite ] ++ lib.optional stdenv.isDarwin Cocoa;
+
+  makeFlags = [
+    "LDFLAGS=-L${wxsqlite3}/lib"
+  ] ++ lib.optionals stdenv.isDarwin [
+    "SETFILE=${setfile}/bin/SetFile"
+  ];
+
+  preBuild = ''
+    sed -ie 's|all: $(LIBPREFIX)wxsqlite$(LIBEXT)|all: |g' Makefile
+    sed -ie 's|wxsqliteplus$(EXEEXT): $(WXSQLITEPLUS_OBJECTS) $(LIBPREFIX)wxsqlite$(LIBEXT)|wxsqliteplus$(EXEEXT):  $(WXSQLITEPLUS_OBJECTS) |g' Makefile
+    sed -ie 's|-lwxsqlite |-lwxcode_${if stdenv.isDarwin then "osx_cocoau_wxsqlite3-3.2.0" else "gtk3u_wxsqlite3-3.2"} |g' Makefile
+  '';
+
+  installPhase = ''
+    install -D ${lib.optionalString stdenv.isDarwin "wxsqliteplus.app/Contents/MacOS/"}wxsqliteplus $out/bin/wxsqliteplus
+  '' + lib.optionalString stdenv.isDarwin ''
+    mkdir -p $out/Applications
+    mv wxsqliteplus.app $out/Applications/
+  '';
+
+  meta = with lib; {
+    description = "A simple SQLite database browser built with wxWidgets";
+    homepage = "https://github.com/guanlisheng/wxsqliteplus";
+    license = licenses.gpl3Plus;
+    maintainers = [ maintainers.vrthra ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/wxwidgets/patches/0001-fix-assertion-using-hide-in-destroy.patch b/nixpkgs/pkgs/development/libraries/wxwidgets/patches/0001-fix-assertion-using-hide-in-destroy.patch
new file mode 100644
index 000000000000..ca9eb8bf612a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/wxwidgets/patches/0001-fix-assertion-using-hide-in-destroy.patch
@@ -0,0 +1,43 @@
+commit 56a60ee50122613d3a356ce74b4bd77b5e7be235
+Author: Tim Kosse <tim.kosse@filezilla-project.org>
+Date:   Sat Aug 26 15:37:30 2017 +0200
+
+    If a wxTopLevelWindow has been instanced, but Create has not been called, calling Destroy on the window results in an assertion in Show(false), at least under wxGTK. Fix this by only hiding a top level window during destruction if it is actually shown.
+
+diff --git a/src/common/toplvcmn.cpp b/src/common/toplvcmn.cpp
+index ef693690c5..8d07812031 100644
+--- a/src/common/toplvcmn.cpp
++++ b/src/common/toplvcmn.cpp
+@@ -122,19 +122,21 @@ bool wxTopLevelWindowBase::Destroy()
+     // any more as no events will be sent to the hidden window and without idle
+     // events we won't prune wxPendingDelete list and the application won't
+     // terminate
+-    for ( wxWindowList::const_iterator i = wxTopLevelWindows.begin(),
+-                                     end = wxTopLevelWindows.end();
+-          i != end;
+-          ++i )
+-    {
+-        wxTopLevelWindow * const win = static_cast<wxTopLevelWindow *>(*i);
+-        if ( win != this && win->IsShown() )
++    if ( IsShown() ) {
++        for ( wxWindowList::const_iterator i = wxTopLevelWindows.begin(),
++                                         end = wxTopLevelWindows.end();
++              i != end;
++              ++i )
+         {
+-            // there remains at least one other visible TLW, we can hide this
+-            // one
+-            Hide();
++            wxTopLevelWindow * const win = static_cast<wxTopLevelWindow *>(*i);
++            if ( win != this && win->IsShown() )
++            {
++                // there remains at least one other visible TLW, we can hide this
++                // one
++                Hide();
+ 
+-            break;
++                break;
++            }
+         }
+     }
+ 
diff --git a/nixpkgs/pkgs/development/libraries/wxwidgets/wxGTK31.nix b/nixpkgs/pkgs/development/libraries/wxwidgets/wxGTK31.nix
new file mode 100644
index 000000000000..13052747eb5e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/wxwidgets/wxGTK31.nix
@@ -0,0 +1,149 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, curl
+, gst_all_1
+, gtk3
+, libGL
+, libGLU
+, libSM
+, libXinerama
+, libXtst
+, libXxf86vm
+, pkg-config
+, xorgproto
+, compat28 ? false
+, compat30 ? true
+, unicode ? true
+, withCurl ? false
+, withPrivateFonts ? false
+, withEGL ? true
+, withMesa ? !stdenv.isDarwin
+, withWebKit ? stdenv.isDarwin
+, webkitgtk
+, setfile
+, AGL
+, Carbon
+, Cocoa
+, Kernel
+, QTKit
+, AVFoundation
+, AVKit
+, WebKit
+}:
+
+stdenv.mkDerivation rec {
+  pname = "wxwidgets";
+  version = "3.1.7";
+
+  src = fetchFromGitHub {
+    owner = "wxWidgets";
+    repo = "wxWidgets";
+    rev = "v${version}";
+    hash = "sha256-9qYPatpTT28H+fz77o7/Y3YVmiK0OCsiQT5QAYe93M0=";
+    fetchSubmodules = true;
+  };
+
+  patches = [
+    # https://github.com/wxWidgets/wxWidgets/issues/17942
+    ./patches/0001-fix-assertion-using-hide-in-destroy.patch
+  ];
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [
+    gst_all_1.gst-plugins-base
+    gst_all_1.gstreamer
+  ] ++ lib.optionals (!stdenv.isDarwin) [
+    gtk3
+    libSM
+    libXinerama
+    libXtst
+    libXxf86vm
+    xorgproto
+  ]
+  ++ lib.optional withCurl curl
+  ++ lib.optional withMesa libGLU
+  ++ lib.optional (withWebKit && !stdenv.isDarwin) webkitgtk
+  ++ lib.optional (withWebKit && stdenv.isDarwin) WebKit
+  ++ lib.optionals stdenv.isDarwin [
+    setfile
+    Carbon
+    Cocoa
+    Kernel
+    QTKit
+    AVFoundation
+    AVKit
+    WebKit
+  ];
+
+  propagatedBuildInputs = lib.optional stdenv.isDarwin AGL;
+
+  configureFlags = [
+    "--disable-precomp-headers"
+    # This is the default option, but be explicit
+    "--disable-monolithic"
+    "--enable-mediactrl"
+    (if compat28 then "--enable-compat28" else "--disable-compat28")
+    (if compat30 then "--enable-compat30" else "--disable-compat30")
+  ]
+  ++ lib.optional (!withEGL) "--disable-glcanvasegl"
+  ++ lib.optional unicode "--enable-unicode"
+  ++ lib.optional withCurl "--enable-webrequest"
+  ++ lib.optional withPrivateFonts "--enable-privatefonts"
+  ++ lib.optional withMesa "--with-opengl"
+  ++ lib.optionals stdenv.isDarwin [
+    "--with-osx_cocoa"
+    "--with-libiconv"
+  ] ++ lib.optionals withWebKit [
+    "--enable-webview"
+    "--enable-webviewwebkit"
+  ];
+
+  SEARCH_LIB = lib.optionalString (!stdenv.isDarwin) "${libGLU.out}/lib ${libGL.out}/lib ";
+
+  preConfigure = ''
+    substituteInPlace configure --replace \
+      'SEARCH_INCLUDE=' 'DUMMY_SEARCH_INCLUDE='
+    substituteInPlace configure --replace \
+      'SEARCH_LIB=' 'DUMMY_SEARCH_LIB='
+    substituteInPlace configure --replace \
+      /usr /no-such-path
+  '' + lib.optionalString stdenv.isDarwin ''
+    substituteInPlace configure --replace \
+      'ac_cv_prog_SETFILE="/Developer/Tools/SetFile"' \
+      'ac_cv_prog_SETFILE="${setfile}/bin/SetFile"'
+    substituteInPlace configure --replace \
+      "-framework System" "-lSystem"
+  '';
+
+  postInstall = "
+    pushd $out/include
+    ln -s wx-*/* .
+    popd
+  ";
+
+  enableParallelBuilding = true;
+
+  passthru = {
+    inherit compat28 compat30 unicode;
+  };
+
+  meta = with lib; {
+    homepage = "https://www.wxwidgets.org/";
+    description = "A Cross-Platform C++ GUI Library";
+    longDescription = ''
+      wxWidgets gives you a single, easy-to-use API for writing GUI applications
+      on multiple platforms that still utilize the native platform's controls
+      and utilities. Link with the appropriate library for your platform and
+      compiler, and your application will adopt the look and feel appropriate to
+      that platform. On top of great GUI functionality, wxWidgets gives you:
+      online help, network programming, streams, clipboard and drag and drop,
+      multithreading, image loading and saving in a variety of popular formats,
+      database support, HTML viewing and printing, and much more.
+    '';
+    license = licenses.wxWindows;
+    maintainers = with maintainers; [ tfmoraes ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/wxwidgets/wxGTK32.nix b/nixpkgs/pkgs/development/libraries/wxwidgets/wxGTK32.nix
new file mode 100644
index 000000000000..5bba7315f5cc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/wxwidgets/wxGTK32.nix
@@ -0,0 +1,165 @@
+{ lib
+, stdenv
+, expat
+, fetchFromGitHub
+, gst_all_1
+, gtk3
+, libGL
+, libGLU
+, libSM
+, libXinerama
+, libXtst
+, libXxf86vm
+, libpng
+, libtiff
+, libjpeg_turbo
+, zlib
+, pcre2
+, pkg-config
+, xorgproto
+, compat28 ? false
+, compat30 ? true
+, unicode ? true
+, withMesa ? !stdenv.isDarwin
+, withWebKit ? true
+, webkitgtk
+, setfile
+, AGL
+, Carbon
+, Cocoa
+, Kernel
+, QTKit
+, AVFoundation
+, AVKit
+, WebKit
+, fetchpatch
+}:
+let
+  catch = fetchFromGitHub {
+    owner = "wxWidgets";
+    repo = "Catch";
+    rev = "5f5e4cecd1cafc85e109471356dec29e778d2160";
+    hash = "sha256-fB/E17tiAicAkq88Je/YFYohJ6EHJOO54oQaqiR/OzY=";
+  };
+
+  nanosvg = fetchFromGitHub {
+    owner = "wxWidgets";
+    repo = "nanosvg";
+    rev = "ccdb1995134d340a93fb20e3a3d323ccb3838dd0";
+    hash = "sha256-ymziU0NgGqxPOKHwGm0QyEdK/8jL/QYk5UdIQ3Tn8jw=";
+  };
+in
+stdenv.mkDerivation rec {
+  pname = "wxwidgets";
+  version = "3.2.4";
+
+  src = fetchFromGitHub {
+    owner = "wxWidgets";
+    repo = "wxWidgets";
+    rev = "v${version}";
+    hash = "sha256-YkV150sDsfBEHvHne0GF6i8Y5881NrByPkLtPAmb24E=";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "avoid_gtk3_crash.patch";
+      url = "https://github.com/wxWidgets/wxWidgets/commit/8ea22b5e92bf46add0b20059f6e39a938858ff97.patch";
+      hash = "sha256-zAyqVTdej4F3R7vVMLiKkXqJTAHDtGYJnyjaRyDmMOM=";
+    })
+  ];
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [
+    gst_all_1.gst-plugins-base
+    gst_all_1.gstreamer
+    libpng
+    libtiff
+    libjpeg_turbo
+    zlib
+    pcre2
+  ] ++ lib.optionals stdenv.isLinux [
+    gtk3
+    libSM
+    libXinerama
+    libXtst
+    libXxf86vm
+    xorgproto
+  ]
+  ++ lib.optional withMesa libGLU
+  ++ lib.optional (withWebKit && stdenv.isLinux) webkitgtk
+  ++ lib.optional (withWebKit && stdenv.isDarwin) WebKit
+  ++ lib.optionals stdenv.isDarwin [
+    expat
+    setfile
+    Carbon
+    Cocoa
+    Kernel
+    QTKit
+    AVFoundation
+    AVKit
+    WebKit
+  ];
+
+  propagatedBuildInputs = lib.optional stdenv.isDarwin AGL;
+
+  configureFlags = [
+    "--disable-precomp-headers"
+    # This is the default option, but be explicit
+    "--disable-monolithic"
+    "--enable-mediactrl"
+    "--with-nanosvg"
+    (if compat28 then "--enable-compat28" else "--disable-compat28")
+    (if compat30 then "--enable-compat30" else "--disable-compat30")
+  ] ++ lib.optional unicode "--enable-unicode"
+  ++ lib.optional withMesa "--with-opengl"
+  ++ lib.optionals stdenv.isDarwin [
+    "--with-osx_cocoa"
+    "--with-libiconv"
+  ] ++ lib.optionals withWebKit [
+    "--enable-webview"
+    "--enable-webviewwebkit"
+  ];
+
+  SEARCH_LIB = lib.optionalString (!stdenv.isDarwin) "${libGLU.out}/lib ${libGL.out}/lib";
+
+  preConfigure = ''
+    cp -r ${catch}/* 3rdparty/catch/
+    cp -r ${nanosvg}/* 3rdparty/nanosvg/
+  '' + lib.optionalString stdenv.isDarwin ''
+    substituteInPlace configure \
+      --replace 'ac_cv_prog_SETFILE="/Developer/Tools/SetFile"' 'ac_cv_prog_SETFILE="${setfile}/bin/SetFile"'
+    substituteInPlace configure \
+      --replace "-framework System" "-lSystem"
+  '';
+
+  postInstall = "
+    pushd $out/include
+    ln -s wx-*/* .
+    popd
+  ";
+
+  enableParallelBuilding = true;
+
+  passthru = {
+    inherit compat28 compat30 unicode;
+  };
+
+  meta = with lib; {
+    homepage = "https://www.wxwidgets.org/";
+    description = "A Cross-Platform C++ GUI Library";
+    longDescription = ''
+      wxWidgets gives you a single, easy-to-use API for writing GUI applications
+      on multiple platforms that still utilize the native platform's controls
+      and utilities. Link with the appropriate library for your platform and
+      compiler, and your application will adopt the look and feel appropriate to
+      that platform. On top of great GUI functionality, wxWidgets gives you:
+      online help, network programming, streams, clipboard and drag and drop,
+      multithreading, image loading and saving in a variety of popular formats,
+      database support, HTML viewing and printing, and much more.
+    '';
+    license = licenses.wxWindows;
+    maintainers = with maintainers; [ tfmoraes ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/x264/default.nix b/nixpkgs/pkgs/development/libraries/x264/default.nix
new file mode 100644
index 000000000000..a011cf9c2000
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/x264/default.nix
@@ -0,0 +1,65 @@
+{ stdenv
+, lib
+, fetchFromGitLab
+, fetchpatch
+, nasm
+, enableShared ? !stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+  pname = "x264";
+  version = "unstable-2021-06-13";
+
+  src = fetchFromGitLab {
+    domain = "code.videolan.org";
+    owner = "videolan";
+    repo = pname;
+    rev = "5db6aa6cab1b146e07b60cc1736a01f21da01154";
+    sha256 = "0swyrkz6nvajivxvrr08py0jrfcsjvpxw78xm1k5gd9xbdrxvknh";
+  };
+
+  # Upstream ./configure greps for (-mcpu|-march|-mfpu) in CFLAGS, which in nix
+  # is put in the cc wrapper anyway.
+  patches = [
+    ./disable-arm-neon-default.patch
+    (fetchpatch {
+      # https://code.videolan.org/videolan/x264/-/merge_requests/114
+      name = "fix-parallelism.patch";
+      url = "https://code.videolan.org/videolan/x264/-/commit/e067ab0b530395f90b578f6d05ab0a225e2efdf9.patch";
+      hash = "sha256-16h2IUCRjYlKI2RXYq8QyXukAdfoQxyBKsK/nI6vhRI=";
+    })
+  ];
+
+  postPatch = ''
+    patchShebangs .
+  ''
+  # Darwin uses `llvm-strip`, which results in a crash at runtime in assembly-based routines when `-x` is specified.
+  + lib.optionalString stdenv.isDarwin ''
+    substituteInPlace Makefile --replace '$(if $(STRIP), $(STRIP) -x $@)' '$(if $(STRIP), $(STRIP) -S $@)'
+  '';
+
+  enableParallelBuilding = true;
+
+  outputs = [ "out" "lib" "dev" ];
+
+  preConfigure = lib.optionalString stdenv.hostPlatform.isx86 ''
+    # `AS' is set to the binutils assembler, but we need nasm
+    unset AS
+  '' + lib.optionalString stdenv.hostPlatform.isAarch ''
+    export AS=$CC
+  '';
+
+  configureFlags = lib.optional enableShared "--enable-shared"
+    ++ lib.optional (!stdenv.isi686) "--enable-pic"
+    ++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "--cross-prefix=${stdenv.cc.targetPrefix}";
+
+  nativeBuildInputs = lib.optional stdenv.hostPlatform.isx86 nasm;
+
+  meta = with lib; {
+    description = "Library for encoding H264/AVC video streams";
+    homepage = "http://www.videolan.org/developers/x264.html";
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix ++ platforms.windows;
+    maintainers = with maintainers; [ tadeokondrak ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/x264/disable-arm-neon-default.patch b/nixpkgs/pkgs/development/libraries/x264/disable-arm-neon-default.patch
new file mode 100644
index 000000000000..6971944abb4f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/x264/disable-arm-neon-default.patch
@@ -0,0 +1,13 @@
+diff -Naur x264-snapshot-20190517-2245-stable-orig/configure x264-snapshot-20190517-2245-stable/configure
+--- x264-snapshot-20190517-2245-stable-orig/configure	2020-01-03 19:51:03.041037657 -0500
++++ x264-snapshot-20190517-2245-stable/configure	2020-01-03 19:52:15.075034609 -0500
+@@ -930,9 +930,6 @@
+ fi
+ 
+ if [ $asm = auto -a $ARCH = ARM ] ; then
+-    # set flags so neon is built by default
+-    [ $compiler == CL ] || echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu)' || CFLAGS="$CFLAGS -mcpu=cortex-a8 -mfpu=neon"
+-
+     cc_check '' '' '__asm__("add r0, r1, r2");' && define HAVE_ARM_INLINE_ASM
+     if [ $compiler = CL ] && cpp_check '' '' 'defined(_M_ARM) && _M_ARM >= 7' ; then
+         define HAVE_ARMV6
diff --git a/nixpkgs/pkgs/development/libraries/x265/default.nix b/nixpkgs/pkgs/development/libraries/x265/default.nix
new file mode 100644
index 000000000000..1fc5f3129c0e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/x265/default.nix
@@ -0,0 +1,156 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, cmake
+, nasm
+
+  # NUMA support enabled by default on NUMA platforms:
+, numaSupport ? (stdenv.hostPlatform.isLinux && (stdenv.hostPlatform.isx86 || stdenv.hostPlatform.isAarch64))
+, numactl
+
+  # Multi bit-depth support (8bit+10bit+12bit):
+, multibitdepthSupport ? (stdenv.is64bit && !(stdenv.isAarch64 && stdenv.isLinux))
+
+  # Other options:
+, cliSupport ? true # Build standalone CLI application
+, custatsSupport ? false # Internal profiling of encoder work
+, debugSupport ? false # Run-time sanity checks (debugging)
+, ppaSupport ? false # PPA profiling instrumentation
+, unittestsSupport ? stdenv.isx86_64 # Unit tests - only testing x64 assembly
+, vtuneSupport ? false # Vtune profiling instrumentation
+, werrorSupport ? false # Warnings as errors
+}:
+
+let
+  mkFlag = optSet: flag: if optSet then "-D${flag}=ON" else "-D${flag}=OFF";
+
+  isCross = stdenv.buildPlatform != stdenv.hostPlatform;
+in
+
+stdenv.mkDerivation rec {
+  pname = "x265";
+  version = "3.5";
+
+  outputs = [ "out" "dev" ];
+
+  # Check that x265Version.txt contains the expected version number
+  # whether we fetch a source tarball or a tag from the git repo
+  src = fetchurl {
+    url = "https://bitbucket.org/multicoreware/x265_git/downloads/x265_${version}.tar.gz";
+    hash = "sha256-5wozNcrKy7oLOiDsb+zWeDkyKI68gWOtdLzJYGR3yug=";
+  };
+
+  sourceRoot = "x265_${version}/source";
+
+  patches = [
+    # More aliases for ARM platforms + do not force CLFAGS for ARM :
+    (fetchpatch {
+      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/x265/files/arm-r1.patch?id=1d1de341e1404a46b15ae3e84bc400d474cf1a2c";
+      sha256 = "1hgzq5vxkwh0nyikxjfz8gz3jvx2nq3yy12mz3fn13qvzdlb5ilp";
+    })
+    # use proper check to avoid undefined symbols when enabling assembly on ARM :
+    (fetchpatch {
+      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/x265/files/neon.patch?id=1d1de341e1404a46b15ae3e84bc400d474cf1a2c";
+      sha256 = "1mmshpbyldrfqxfmdajqal4l647zvlrwdai8pxw99qg4v8gajfii";
+    })
+    # More complete PPC64 matches :
+    (fetchpatch {
+      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/x265/files/x265-3.3-ppc64.patch?id=1d1de341e1404a46b15ae3e84bc400d474cf1a2c";
+      sha256 = "1mvw678xfm0vr59n5jilq56qzcgk1gmcip2afyafkqiv21nbms8c";
+    })
+    # Namespace functions for multi-bitdepth builds so that libraries are self-contained (and tests succeeds) :
+    (fetchpatch {
+      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/x265/files/test-ns.patch?id=1d1de341e1404a46b15ae3e84bc400d474cf1a2c";
+      sha256 = "0zg3g53l07yh7ar5c241x50y5zp7g8nh8rh63ad4bdpchpc2f52d";
+    })
+    # Fix detection of NEON (and armv6 build) :
+    ./fix-neon-detection.patch
+  ];
+
+  postPatch = ''
+    substituteInPlace cmake/Version.cmake \
+      --replace "unknown" "${version}" \
+      --replace "0.0" "${version}"
+  ''
+  # There is broken and complicated logic when setting X265_LATEST_TAG for
+  # mingwW64 builds. This bypasses the logic by setting it at the end of the
+  # file
+  + lib.optionalString stdenv.hostPlatform.isMinGW ''
+    echo 'set(X265_LATEST_TAG "${version}")' >> ./cmake/Version.cmake
+  '';
+
+  nativeBuildInputs = [ cmake nasm ] ++ lib.optionals (numaSupport) [ numactl ];
+
+  cmakeFlags = [
+    "-Wno-dev"
+    (mkFlag custatsSupport "DETAILED_CU_STATS")
+    (mkFlag debugSupport "CHECKED_BUILD")
+    (mkFlag ppaSupport "ENABLE_PPA")
+    (mkFlag vtuneSupport "ENABLE_VTUNE")
+    (mkFlag werrorSupport "WARNINGS_AS_ERRORS")
+  ];
+
+  cmakeStaticLibFlags = [
+    "-DHIGH_BIT_DEPTH=ON"
+    "-DENABLE_CLI=OFF"
+    "-DENABLE_SHARED=OFF"
+    "-DEXPORT_C_API=OFF"
+  ] ++ lib.optionals stdenv.hostPlatform.isPower [
+    "-DENABLE_ALTIVEC=OFF" # https://bitbucket.org/multicoreware/x265_git/issues/320/fail-to-build-on-power8-le
+  ];
+
+  preConfigure = lib.optionalString multibitdepthSupport ''
+    cmake -B build-10bits $cmakeFlags "''${cmakeFlagsArray[@]}" $cmakeStaticLibFlags
+    cmake -B build-12bits $cmakeFlags "''${cmakeFlagsArray[@]}" $cmakeStaticLibFlags -DMAIN12=ON
+    cmakeFlagsArray+=(
+      -DEXTRA_LIB="x265-10.a;x265-12.a"
+      -DEXTRA_LINK_FLAGS=-L.
+      -DLINKED_10BIT=ON
+      -DLINKED_12BIT=ON
+    )
+  '' + ''
+    cmakeFlagsArray+=(
+      -DGIT_ARCHETYPE=1 # https://bugs.gentoo.org/814116
+      ${mkFlag (!stdenv.hostPlatform.isStatic) "ENABLE_SHARED"}
+      -DHIGH_BIT_DEPTH=OFF
+      -DENABLE_HDR10_PLUS=ON
+      ${mkFlag (isCross && stdenv.hostPlatform.isAarch) "CROSS_COMPILE_ARM"}
+      ${mkFlag cliSupport "ENABLE_CLI"}
+      ${mkFlag unittestsSupport "ENABLE_TESTS"}
+    )
+  '';
+
+  # Builds 10bits and 12bits static libs on the side if multi bit-depth is wanted
+  # (we are in x265_<version>/source/build)
+  preBuild = lib.optionalString multibitdepthSupport ''
+    make -C ../build-10bits -j $NIX_BUILD_CORES
+    make -C ../build-12bits -j $NIX_BUILD_CORES
+    ln -s ../build-10bits/libx265.a ./libx265-10.a
+    ln -s ../build-12bits/libx265.a ./libx265-12.a
+  '';
+
+  doCheck = unittestsSupport;
+  checkPhase = ''
+    runHook preCheck
+    ./test/TestBench
+    runHook postCheck
+  '';
+
+  postInstall = ''
+    rm -f ${placeholder "out"}/lib/*.a
+  ''
+  # For mingw, libs are located in $out/bin not $out/lib
+  + lib.optionalString stdenv.hostPlatform.isMinGW ''
+    ln -s $out/bin/*.dll $out/lib
+  '';
+
+  meta = with lib; {
+    description = "Library for encoding H.265/HEVC video streams";
+    homepage = "https://www.x265.org/";
+    changelog = "https://x265.readthedocs.io/en/master/releasenotes.html#version-${lib.strings.replaceStrings ["."] ["-"] version}";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ codyopel ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/x265/fix-neon-detection.patch b/nixpkgs/pkgs/development/libraries/x265/fix-neon-detection.patch
new file mode 100644
index 000000000000..dbb826e54668
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/x265/fix-neon-detection.patch
@@ -0,0 +1,28 @@
+commit 72489cd0a1c229258abe4f20e4fdfd414dfa88da
+Author: rnhmjoj <rnhmjoj@inventati.org>
+Date:   Sun Oct 2 00:15:24 2022 +0200
+
+    Fix NEON detection
+
+diff --git a/cmake/FindNeon.cmake b/cmake/FindNeon.cmake
+index 0062449..9c436d9 100644
+--- a/cmake/FindNeon.cmake
++++ b/cmake/FindNeon.cmake
+@@ -1,10 +1,11 @@
+ include(FindPackageHandleStandardArgs)
+ 
+ # Check the version of neon supported by the ARM CPU
+-execute_process(COMMAND cat /proc/cpuinfo | grep Features | grep neon
+-                OUTPUT_VARIABLE neon_version
+-                ERROR_QUIET
+-                OUTPUT_STRIP_TRAILING_WHITESPACE)
+-if(neon_version)
+-    set(CPU_HAS_NEON 1)
++message(STATUS "Detecting NEON support")
++execute_process(COMMAND sed -n "/Features.* neon/q 1" /proc/cpuinfo
++                RESULT_VARIABLE CPU_HAS_NEON)
++if(CPU_HAS_NEON)
++    message(STATUS "Detecting NEON support - supported")
++else()
++    message(STATUS "Detecting NEON support - not supported" )
+ endif()
diff --git a/nixpkgs/pkgs/development/libraries/xalanc/default.nix b/nixpkgs/pkgs/development/libraries/xalanc/default.nix
new file mode 100644
index 000000000000..2b5f2379fde7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xalanc/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchFromGitHub, xercesc, getopt, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "xalan-c";
+  version = "1.12.0";
+
+  src = fetchFromGitHub {
+    owner = "apache";
+    repo = "xalan-c";
+    rev = "Xalan-C_1_12_0";
+    sha256 = "sha256:0q1204qk97i9h14vxxq7phcfpyiin0i1zzk74ixvg4wqy87b62s8";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ xercesc getopt ];
+
+  meta = {
+    homepage = "https://xalan.apache.org/";
+    description = "A XSLT processor for transforming XML documents";
+    license = lib.licenses.asl20;
+    platforms = lib.platforms.linux ++ lib.platforms.darwin;
+    maintainers = [ lib.maintainers.jagajaga ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/xapian/default.nix b/nixpkgs/pkgs/development/libraries/xapian/default.nix
new file mode 100644
index 000000000000..f9fe5bac07fe
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xapian/default.nix
@@ -0,0 +1,63 @@
+{ lib
+, stdenv
+, fetchurl
+, autoreconfHook
+, libuuid
+, zlib
+
+# tests
+, mu
+}:
+
+let
+  generic = version: hash: stdenv.mkDerivation {
+    pname = "xapian";
+    inherit version;
+    passthru = { inherit version; };
+
+    src = fetchurl {
+      url = "https://oligarchy.co.uk/xapian/${version}/xapian-core-${version}.tar.xz";
+      inherit hash;
+    };
+
+    outputs = [ "out" "man" "doc" ];
+
+    buildInputs = [ libuuid zlib ];
+    nativeBuildInputs = [ autoreconfHook ];
+
+    enableParallelBuilding = true;
+
+    doCheck = true;
+
+    env = {
+      AUTOMATED_TESTING = true; # https://trac.xapian.org/changeset/8be35f5e1/git
+    } // lib.optionalAttrs stdenv.is32bit {
+      NIX_CFLAGS_COMPILE = "-fpermissive";
+    };
+
+    # the configure script thinks that Darwin has ___exp10
+    # but it’s not available on my systems (or hydra apparently)
+    postConfigure = lib.optionalString stdenv.isDarwin ''
+      substituteInPlace config.h \
+        --replace "#define HAVE___EXP10 1" "#undef HAVE___EXP10"
+    '';
+
+    passthru.tests = {
+      inherit mu;
+    };
+
+    meta = with lib; {
+      description = "Search engine library";
+      homepage = "https://xapian.org/";
+      changelog = "https://xapian.org/docs/xapian-core-${version}/NEWS";
+      license = licenses.gpl2Plus;
+      maintainers = with maintainers; [ matthiasbeyer ];
+      platforms = platforms.unix;
+    };
+  };
+in {
+  # Don't forget to change the hashes in xapian-omega and
+  # python3Packages.xapian. They inherit the version from this package, and
+  # should always be built with the equivalent xapian version.
+  xapian_1_4 = generic "1.4.24" "sha256-7aWubc9rBVOoZ2r2Sx/TBOmYzSD3eQMcyq96uaNzUxo=";
+}
diff --git a/nixpkgs/pkgs/development/libraries/xapian/tools/omega/default.nix b/nixpkgs/pkgs/development/libraries/xapian/tools/omega/default.nix
new file mode 100644
index 000000000000..cba74b977de7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xapian/tools/omega/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchurl, pkg-config, xapian, perl, pcre2, zlib, libmagic }:
+
+stdenv.mkDerivation rec {
+  pname = "xapian-omega";
+  inherit (xapian) version;
+
+  src = fetchurl {
+    url = "https://oligarchy.co.uk/xapian/${version}/xapian-omega-${version}.tar.xz";
+    hash = "sha256-0IdW5PM7GJFsyKJJPTEfHL647UNXvUD6XBdErcCA6/8=";
+  };
+
+  buildInputs = [ xapian perl pcre2 zlib libmagic ];
+  nativeBuildInputs = [ pkg-config ];
+
+  meta = with lib; {
+    description = "Indexer and CGI search front-end built on Xapian library";
+    homepage = "https://xapian.org/";
+    changelog = "https://xapian.org/docs/xapian-omega-${version}/NEWS";
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/xavs/default.nix b/nixpkgs/pkgs/development/libraries/xavs/default.nix
new file mode 100644
index 000000000000..25dd7fdad7ef
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xavs/default.nix
@@ -0,0 +1,48 @@
+{ lib, stdenv, fetchsvn }:
+
+stdenv.mkDerivation rec {
+  pname = "xavs";
+  version = "55";
+
+  src = fetchsvn {
+    url = "https://svn.code.sf.net/p/xavs/code/trunk";
+    rev = version;
+    sha256 = "0drw16wm95dqszpl7j33y4gckz0w0107lnz6wkzb66f0dlbv48cf";
+  };
+
+  enableParallelBuilding = true;
+
+  patchPhase = ''
+    patchShebangs configure
+    patchShebangs config.sub
+    patchShebangs version.sh
+    patchShebangs tools/countquant_xavs.pl
+    patchShebangs tools/patcheck
+    patchShebangs tools/regression-test.pl
+    patchShebangs tools/xavs-format
+    '' + lib.optionalString stdenv.isDarwin ''
+    substituteInPlace config.guess --replace 'uname -p' 'uname -m'
+    substituteInPlace configure \
+      --replace '-O4' '-O3' \
+      --replace ' -s ' ' ' \
+      --replace 'LDFLAGS -s' 'LDFLAGS' \
+      --replace '-dynamiclib' ' ' \
+      --replace '-falign-loops=16' ' '
+    substituteInPlace Makefile --replace '-Wl,-soname,' ' '
+    '';
+
+  configureFlags = [
+    "--enable-pic"
+    "--enable-shared"
+    # Bug preventing compilation with assembly enabled
+    "--disable-asm"
+  ];
+
+  meta = with lib; {
+    description = "AVS encoder and decoder";
+    homepage    = "https://xavs.sourceforge.net/";
+    license     = licenses.lgpl2;
+    platforms   = platforms.linux ++ platforms.darwin;
+    maintainers = with maintainers; [ codyopel ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/xbase/default.nix b/nixpkgs/pkgs/development/libraries/xbase/default.nix
new file mode 100644
index 000000000000..d87bcac9829f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xbase/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "xbase";
+  version = "3.1.2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/xdb/xbase64-${version}.tar.gz";
+    sha256 = "17287kz1nmmm64y7zp9nhhl7slzlba09h6cc83w4mvsqwd9w882r";
+  };
+
+  prePatch = "find . -type f -not -name configure -print0 | xargs -0 chmod -x";
+  patches = [
+    ./xbase-fixes.patch
+    (fetchurl {
+      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-db/xbase/files/xbase-3.1.2-gcc47.patch?id=0b9005ad4b5b743707922877e5157ba6ecdf224f";
+      sha256 = "1kpcrkkcqdwl609yd0qxlvp743icz3vni13993sz6fkgn5lah8yl";
+    })
+    (fetchurl {
+      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-db/xbase/files/xbase-3.1.2-gcc6.patch?id=0b9005ad4b5b743707922877e5157ba6ecdf224f";
+      sha256 = "1994pqiip5njkcmm5czb1bg6zdldkx1mpandgmvzqrja0iacf953";
+    })
+    (fetchurl {
+      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-db/xbase/files/xbase-3.1.2-gcc7.patch?id=0b9005ad4b5b743707922877e5157ba6ecdf224f";
+      sha256 = "1304gn9dbdv8xf61crkg0fc8cal0h4qkyhlbqa8y618w134cxh1q";
+    })
+  ];
+
+  meta = with lib; {
+    homepage = "http://linux.techass.com/projects/xdb/";
+    description = "C++ class library formerly known as XDB";
+    platforms = platforms.linux;
+    license = licenses.lgpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/xbase/xbase-fixes.patch b/nixpkgs/pkgs/development/libraries/xbase/xbase-fixes.patch
new file mode 100644
index 000000000000..a23658049b98
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xbase/xbase-fixes.patch
@@ -0,0 +1,34 @@
+diff --git a/xbase64/xbase64.cpp b/xbase64/xbase64.cpp
+index fc5613d..2449535 100644
+--- a/xbase64/xbase64.cpp
++++ b/xbase64/xbase64.cpp
+@@ -51,6 +51,7 @@
+ #include <xbase64/xbase64.h>
+ #include <ctype.h>
+ #include <string.h>
++#include <cerrno>
+ 
+ //#include <xbase64/xbexcept.h>
+ 
+diff --git a/xbase64/xblock.cpp b/xbase64/xblock.cpp
+index c44cbb9..3554fc1 100644
+--- a/xbase64/xblock.cpp
++++ b/xbase64/xblock.cpp
+@@ -53,6 +53,7 @@
+ #endif
+ 
+ #include <xbase64/xbase64.h>
++#include <cerrno>
+ 
+ #ifdef HAVE_IO_H     // windows locking
+ #include <io.h>
+diff --git a/xbase64/xbnode.cpp b/xbase64/xbnode.cpp
+index 5e688c1..3c652b3 100644
+--- a/xbase64/xbnode.cpp
++++ b/xbase64/xbnode.cpp
+@@ -1,4 +1,4 @@
+-#include "xbNode.h"

++#include "xbnode.h"

+ 

+ void xbNodeLink::AddNode(xbNodeLink* node)

+ {

diff --git a/nixpkgs/pkgs/development/libraries/xcb-imdkit/default.nix b/nixpkgs/pkgs/development/libraries/xcb-imdkit/default.nix
new file mode 100644
index 000000000000..a0fd70e10d3b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xcb-imdkit/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+, extra-cmake-modules
+, uthash
+, xcbutil
+, xcbutilkeysyms
+, xorgproto
+}:
+
+stdenv.mkDerivation rec {
+  pname = "xcb-imdkit";
+  version = "1.0.6";
+
+  src = fetchFromGitHub {
+    owner = "fcitx";
+    repo = "xcb-imdkit";
+    rev = version;
+    sha256 = "sha256-1+x4KE2xh6KWbdCBlPxDvHvcKUEj4hiW4fEPCeYfTwc=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    extra-cmake-modules
+    xorgproto
+    uthash
+  ];
+
+  buildInputs = [
+    xcbutil
+    xcbutilkeysyms
+  ];
+
+  meta = with lib; {
+    description = "input method development support for xcb";
+    homepage = "https://github.com/fcitx/xcb-imdkit";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ poscat ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/xcb-util-cursor/HEAD.nix b/nixpkgs/pkgs/development/libraries/xcb-util-cursor/HEAD.nix
new file mode 100644
index 000000000000..4ac58c3f3d0a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xcb-util-cursor/HEAD.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchgit, autoconf, automake, libtool, pkg-config
+, xorg, gnum4, libxcb, gperf }:
+
+stdenv.mkDerivation {
+  pname = "xcb-util-cursor-0.1.1-3-unstable";
+  version = "2017-04-05";
+
+  src = fetchgit {
+    url    = "http://anongit.freedesktop.org/git/xcb/util-cursor.git";
+    rev    = "f03cc278c6cce0cf721adf9c3764d3c5fba63392";
+    sha256 = "127zfmihd8nqlj8jjaja06xb84xdgl263w0av1xnprx05mkbkcyc";
+  };
+
+  meta = with lib; {
+    description = "XCB cursor library (libxcursor port)";
+    homepage    = "https://cgit.freedesktop.org/xcb/util-cursor";
+    license     = licenses.mit;
+    maintainers = with maintainers; [ lovek323 ];
+    platforms   = platforms.linux ++ platforms.darwin;
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ autoconf automake pkg-config ];
+  buildInputs = [
+    gnum4
+    gperf
+    libtool
+    libxcb
+    xorg.utilmacros
+    xorg.xcbutilimage
+    xorg.xcbutilrenderutil
+  ];
+
+  configurePhase = ''
+    sed -i '15 i\
+      LT_INIT' configure.ac
+    ${stdenv.shell} autogen.sh --prefix="$out"
+  '';
+}
diff --git a/nixpkgs/pkgs/development/libraries/xcb-util-cursor/m4/ax_compare_version.m4 b/nixpkgs/pkgs/development/libraries/xcb-util-cursor/m4/ax_compare_version.m4
new file mode 100644
index 000000000000..e22b50fd9fdc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xcb-util-cursor/m4/ax_compare_version.m4
@@ -0,0 +1,174 @@
+# ===========================================================================
+#           http://autoconf-archive.cryp.to/ax_compare_version.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_COMPARE_VERSION(VERSION_A, OP, VERSION_B, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
+#
+# DESCRIPTION
+#
+#   This macro compares two version strings. Due to the various number of
+#   minor-version numbers that can exist, and the fact that string
+#   comparisons are not compatible with numeric comparisons, this is not
+#   necessarily trivial to do in a autoconf script. This macro makes doing
+#   these comparisons easy.
+#
+#   The six basic comparisons are available, as well as checking equality
+#   limited to a certain number of minor-version levels.
+#
+#   The operator OP determines what type of comparison to do, and can be one
+#   of:
+#
+#    eq  - equal (test A == B)
+#    ne  - not equal (test A != B)
+#    le  - less than or equal (test A <= B)
+#    ge  - greater than or equal (test A >= B)
+#    lt  - less than (test A < B)
+#    gt  - greater than (test A > B)
+#
+#   Additionally, the eq and ne operator can have a number after it to limit
+#   the test to that number of minor versions.
+#
+#    eq0 - equal up to the length of the shorter version
+#    ne0 - not equal up to the length of the shorter version
+#    eqN - equal up to N sub-version levels
+#    neN - not equal up to N sub-version levels
+#
+#   When the condition is true, shell commands ACTION-IF-TRUE are run,
+#   otherwise shell commands ACTION-IF-FALSE are run. The environment
+#   variable 'ax_compare_version' is always set to either 'true' or 'false'
+#   as well.
+#
+#   Examples:
+#
+#     AX_COMPARE_VERSION([3.15.7],[lt],[3.15.8])
+#     AX_COMPARE_VERSION([3.15],[lt],[3.15.8])
+#
+#   would both be true.
+#
+#     AX_COMPARE_VERSION([3.15.7],[eq],[3.15.8])
+#     AX_COMPARE_VERSION([3.15],[gt],[3.15.8])
+#
+#   would both be false.
+#
+#     AX_COMPARE_VERSION([3.15.7],[eq2],[3.15.8])
+#
+#   would be true because it is only comparing two minor versions.
+#
+#     AX_COMPARE_VERSION([3.15.7],[eq0],[3.15])
+#
+#   would be true because it is only comparing the lesser number of minor
+#   versions of the two values.
+#
+#   Note: The characters that separate the version numbers do not matter. An
+#   empty string is the same as version 0. OP is evaluated by autoconf, not
+#   configure, so must be a string, not a variable.
+#
+#   The author would like to acknowledge Guido Draheim whose advice about
+#   the m4_case and m4_ifvaln functions make this macro only include the
+#   portions necessary to perform the specific comparison specified by the
+#   OP argument in the final configure script.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Tim Toolan <toolan@ele.uri.edu>
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved.
+
+dnl #########################################################################
+AC_DEFUN([AX_COMPARE_VERSION], [
+  AC_PROG_AWK
+
+  # Used to indicate true or false condition
+  ax_compare_version=false
+
+  # Convert the two version strings to be compared into a format that
+  # allows a simple string comparison.  The end result is that a version
+  # string of the form 1.12.5-r617 will be converted to the form
+  # 0001001200050617.  In other words, each number is zero padded to four
+  # digits, and non digits are removed.
+  AS_VAR_PUSHDEF([A],[ax_compare_version_A])
+  A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
+                     -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+                     -e 's/[[^0-9]]//g'`
+
+  AS_VAR_PUSHDEF([B],[ax_compare_version_B])
+  B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
+                     -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+                     -e 's/[[^0-9]]//g'`
+
+  dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary
+  dnl # then the first line is used to determine if the condition is true.
+  dnl # The sed right after the echo is to remove any indented white space.
+  m4_case(m4_tolower($2),
+  [lt],[
+    ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"`
+  ],
+  [gt],[
+    ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"`
+  ],
+  [le],[
+    ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"`
+  ],
+  [ge],[
+    ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"`
+  ],[
+    dnl Split the operator from the subversion count if present.
+    m4_bmatch(m4_substr($2,2),
+    [0],[
+      # A count of zero means use the length of the shorter version.
+      # Determine the number of characters in A and B.
+      ax_compare_version_len_A=`echo "$A" | $AWK '{print(length)}'`
+      ax_compare_version_len_B=`echo "$B" | $AWK '{print(length)}'`
+
+      # Set A to no more than B's length and B to no more than A's length.
+      A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"`
+      B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"`
+    ],
+    [[0-9]+],[
+      # A count greater than zero means use only that many subversions
+      A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
+      B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
+    ],
+    [.+],[
+      AC_WARNING(
+        [illegal OP numeric parameter: $2])
+    ],[])
+
+    # Pad zeros at end of numbers to make same length.
+    ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`"
+    B="$B`echo $A | sed 's/./0/g'`"
+    A="$ax_compare_version_tmp_A"
+
+    # Check for equality or inequality as necessary.
+    m4_case(m4_tolower(m4_substr($2,0,2)),
+    [eq],[
+      test "x$A" = "x$B" && ax_compare_version=true
+    ],
+    [ne],[
+      test "x$A" != "x$B" && ax_compare_version=true
+    ],[
+      AC_WARNING([illegal OP parameter: $2])
+    ])
+  ])
+
+  AS_VAR_POPDEF([A])dnl
+  AS_VAR_POPDEF([B])dnl
+
+  dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE.
+  if test "$ax_compare_version" = "true" ; then
+    m4_ifvaln([$4],[$4],[:])dnl
+    m4_ifvaln([$5],[else $5])dnl
+  fi
+]) dnl AX_COMPARE_VERSION
diff --git a/nixpkgs/pkgs/development/libraries/xcb-util-cursor/m4/xcb_util_common.m4 b/nixpkgs/pkgs/development/libraries/xcb-util-cursor/m4/xcb_util_common.m4
new file mode 100644
index 000000000000..f9463d37fcaa
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xcb-util-cursor/m4/xcb_util_common.m4
@@ -0,0 +1,44 @@
+# XCB_UTIL_COMMON(xcb-required-version, xcb-proto-required-version)
+# -----------------------------------------------------------------
+#
+# Defines default options for xcb-util libraries.  xorg/util/macros >=
+# 1.6.0 is  required for  cross-platform compiler  flags and  to build
+# library documentation.
+#
+AC_DEFUN([XCB_UTIL_COMMON], [
+m4_ifndef([AX_COMPARE_VERSION],
+          [m4_fatal([could not find AX_COMPARE_VERSION in macros search path])])
+
+AC_REQUIRE([AC_PROG_LIBTOOL])
+
+# Define header files and pkgconfig paths
+xcbincludedir='${includedir}/xcb'
+AC_SUBST(xcbincludedir)
+pkgconfigdir='${libdir}/pkgconfig'
+AC_SUBST(pkgconfigdir)
+
+# Check xcb version
+PKG_CHECK_MODULES(XCB, xcb >= [$1])
+
+# Check version of xcb-proto that xcb was compiled against
+xcbproto_required=[$2]
+
+AC_MSG_CHECKING([whether libxcb was compiled against xcb-proto >= $xcbproto_required])
+xcbproto_version=`$PKG_CONFIG --variable=xcbproto_version xcb`
+AX_COMPARE_VERSION([$xcbproto_version],[ge],[$xcbproto_required], xcbproto_ok="yes",
+                   xcbproto_ok="no")
+AC_MSG_RESULT([$xcbproto_ok])
+
+if test $xcbproto_ok = no; then
+   AC_MSG_ERROR([libxcb was compiled against xcb-proto $xcbproto_version; it needs to be compiled against version $xcbproto_required or higher])
+fi
+
+# Call macros from Xorg util-macros
+m4_ifndef([XORG_MACROS_VERSION],
+          [m4_fatal([must install xorg-macros 1.6.0 or later before running autoconf/autogen])])
+
+XORG_MACROS_VERSION([1.6.0])
+XORG_DEFAULT_OPTIONS
+XORG_ENABLE_DEVEL_DOCS
+XORG_WITH_DOXYGEN
+]) # XCB_UTIL_COMMON
diff --git a/nixpkgs/pkgs/development/libraries/xcb-util-cursor/m4/xcb_util_m4_with_include_path.m4 b/nixpkgs/pkgs/development/libraries/xcb-util-cursor/m4/xcb_util_m4_with_include_path.m4
new file mode 100644
index 000000000000..a3ddce4a706f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xcb-util-cursor/m4/xcb_util_m4_with_include_path.m4
@@ -0,0 +1,24 @@
+# XCB_UTIL_M4_WITH_INCLUDE_PATH
+# ------------------------------
+#
+# This macro attempts to locate an m4 macro processor which supports
+# -I option and is only useful for modules relying on M4 in order to
+# expand macros in source code files.
+#
+# M4: variable holding the path to an usable m4 program.
+#
+# This macro  requires Autoconf 2.62  or later  as it is  relying upon
+# AC_PATH_PROGS_FEATURE_CHECK  macro. NOTE:  As  soon  as the  minimum
+# required version of Autoconf for Xorg  is bumped to 2.62, this macro
+# is supposed to be shipped with xorg/util/macros.
+#
+AC_DEFUN([XCB_UTIL_M4_WITH_INCLUDE_PATH], [
+AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4],
+   [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4],
+       [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \
+         ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]],
+   [AC_MSG_ERROR([could not find m4 that supports -I option])],
+   [$PATH:/usr/gnu/bin])])
+
+AC_SUBST([M4], [$ac_cv_path_M4])
+]) # XCB_UTIL_M4_WITH_INCLUDE_PATH
diff --git a/nixpkgs/pkgs/development/libraries/xdg-dbus-proxy/default.nix b/nixpkgs/pkgs/development/libraries/xdg-dbus-proxy/default.nix
new file mode 100644
index 000000000000..845a8fcfdc49
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xdg-dbus-proxy/default.nix
@@ -0,0 +1,51 @@
+{ dbus
+, docbook-xsl-nons
+, docbook_xml_dtd_43
+, fetchurl
+, glib
+, lib
+, libxslt
+, meson
+, ninja
+, pkg-config
+, stdenv
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "xdg-dbus-proxy";
+  version = "0.1.5";
+
+  src = fetchurl {
+    url = "https://github.com/flatpak/xdg-dbus-proxy/releases/download/${finalAttrs.version}/xdg-dbus-proxy-${finalAttrs.version}.tar.xz";
+    hash = "sha256-Bh3Pr4oGUOX9nVQy3+iL2nSeoNB53BNjBL/s+84GYfs=";
+  };
+
+  nativeBuildInputs = [
+    docbook-xsl-nons
+    docbook_xml_dtd_43
+    libxslt
+    meson
+    ninja
+    pkg-config
+  ];
+
+  buildInputs = [
+    glib
+  ];
+
+  nativeCheckInputs = [
+    dbus
+  ];
+
+  # dbus[2345]: Failed to start message bus: Failed to open "/etc/dbus-1/session.conf": No such file or directory
+  doCheck = false;
+
+  meta = {
+    description = "DBus proxy for Flatpak and others";
+    homepage = "https://github.com/flatpak/xdg-dbus-proxy";
+    license = lib.licenses.lgpl21Plus;
+    mainProgram = "xdg-dbus-proxy";
+    maintainers = with lib.maintainers; [ jtojnar ];
+    platforms = lib.platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/xdg-desktop-portal-gnome/default.nix b/nixpkgs/pkgs/development/libraries/xdg-desktop-portal-gnome/default.nix
new file mode 100644
index 000000000000..11f598b6544b
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xdg-desktop-portal-gnome/default.nix
@@ -0,0 +1,76 @@
+{ stdenv
+, lib
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, wrapGAppsHook4
+, fontconfig
+, glib
+, gsettings-desktop-schemas
+, gtk4
+, libadwaita
+, gnome-desktop
+, xdg-desktop-portal
+, wayland
+, gnome
+, librsvg
+, webp-pixbuf-loader
+}:
+
+stdenv.mkDerivation rec {
+  pname = "xdg-desktop-portal-gnome";
+  version = "45.1";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.major version}/${pname}-${version}.tar.xz";
+    sha256 = "PpyoIQRABfs3vWjr5K0Zb8PQcoNVgUZ6IqSHnax7X90=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    wrapGAppsHook4
+  ];
+
+  buildInputs = [
+    fontconfig
+    glib
+    gsettings-desktop-schemas # settings exposed by settings portal
+    gtk4
+    libadwaita
+    gnome-desktop
+    xdg-desktop-portal
+    wayland # required by GTK 4
+  ];
+
+  mesonFlags = [
+    "-Dsystemduserunitdir=${placeholder "out"}/lib/systemd/user"
+  ];
+
+  postInstall = ''
+    # Pull in WebP support for gnome-backgrounds.
+    # In postInstall to run before gappsWrapperArgsHook.
+    export GDK_PIXBUF_MODULE_FILE="${gnome._gdkPixbufCacheBuilder_DO_NOT_USE {
+      extraLoaders = [
+        librsvg
+        webp-pixbuf-loader
+      ];
+    }}"
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+    };
+  };
+
+  meta = with lib; {
+    description = "Backend implementation for xdg-desktop-portal for the GNOME desktop environment";
+    homepage = "https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome";
+    maintainers = teams.gnome.members;
+    platforms = platforms.linux;
+    license = licenses.lgpl21Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/xdg-desktop-portal-gtk/default.nix b/nixpkgs/pkgs/development/libraries/xdg-desktop-portal-gtk/default.nix
new file mode 100644
index 000000000000..e44ffe1ec1d2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xdg-desktop-portal-gtk/default.nix
@@ -0,0 +1,58 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, meson
+, ninja
+, pkg-config
+, xdg-desktop-portal
+, gtk3
+, gnome
+, gnome-desktop
+, glib
+, wrapGAppsHook
+, gsettings-desktop-schemas
+, buildPortalsInGnome ? true
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "xdg-desktop-portal-gtk";
+  version = "1.15.1";
+
+  src = fetchFromGitHub {
+    owner = "flatpak";
+    repo = "xdg-desktop-portal-gtk";
+    rev = finalAttrs.version;
+    sha256 = "sha256-uXVjKsqoIjqJilJq8ERRzEqGKbkzc+Zl6y+37CAcYro=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    glib
+    gtk3
+    xdg-desktop-portal
+  ] ++ lib.optionals buildPortalsInGnome [
+    gsettings-desktop-schemas # settings exposed by settings portal
+    gnome-desktop
+    gnome.gnome-settings-daemon # schemas needed for settings api (mostly useless now that fonts were moved to g-d-s, just mouse and xsettings)
+  ];
+
+  mesonFlags = lib.optionals (!buildPortalsInGnome) [
+    "-Dwallpaper=disabled"
+    "-Dsettings=disabled"
+    "-Dappchooser=disabled"
+    "-Dlockdown=disabled"
+  ];
+
+  meta = with lib; {
+    description = "Desktop integration portals for sandboxed apps";
+    maintainers = with maintainers; [ jtojnar ];
+    platforms = platforms.linux;
+    license = licenses.lgpl21Plus;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/xdg-desktop-portal-wlr/default.nix b/nixpkgs/pkgs/development/libraries/xdg-desktop-portal-wlr/default.nix
new file mode 100644
index 000000000000..e215028d7352
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xdg-desktop-portal-wlr/default.nix
@@ -0,0 +1,53 @@
+{ lib
+, stdenv
+, bash
+, fetchFromGitHub
+, makeWrapper
+, meson
+, ninja
+, pkg-config
+, wayland-protocols
+, wayland-scanner
+, grim
+, inih
+, libdrm
+, mesa
+, pipewire
+, scdoc
+, slurp
+, systemd
+, wayland
+}:
+
+stdenv.mkDerivation rec {
+  pname = "xdg-desktop-portal-wlr";
+  version = "0.7.1";
+
+  src = fetchFromGitHub {
+    owner = "emersion";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-GIIDeZMIGUiZV0IUhcclRVThE5LKaqVc5VwnNT8beNU=";
+  };
+
+  strictDeps = true;
+  depsBuildBuild = [ pkg-config ];
+  nativeBuildInputs = [ meson ninja pkg-config scdoc wayland-scanner makeWrapper ];
+  buildInputs = [ inih libdrm mesa pipewire systemd wayland wayland-protocols ];
+
+  mesonFlags = [
+    "-Dsd-bus-provider=libsystemd"
+  ];
+
+  postInstall = ''
+    wrapProgram $out/libexec/xdg-desktop-portal-wlr --prefix PATH ":" ${lib.makeBinPath [ bash grim slurp ]}
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/emersion/xdg-desktop-portal-wlr";
+    description = "xdg-desktop-portal backend for wlroots";
+    maintainers = with maintainers; [ minijackson ];
+    platforms = platforms.linux;
+    license = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/xdg-desktop-portal-xapp/default.nix b/nixpkgs/pkgs/development/libraries/xdg-desktop-portal-xapp/default.nix
new file mode 100644
index 000000000000..e2d12c250171
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xdg-desktop-portal-xapp/default.nix
@@ -0,0 +1,52 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, meson
+, ninja
+, pkg-config
+, wrapGAppsHook
+, cinnamon
+, glib
+, gsettings-desktop-schemas
+, mate
+, xdg-desktop-portal
+}:
+
+stdenv.mkDerivation rec {
+  pname = "xdg-desktop-portal-xapp";
+  version = "1.0.4";
+
+  src = fetchFromGitHub {
+    owner = "linuxmint";
+    repo = "xdg-desktop-portal-xapp";
+    rev = version;
+    hash = "sha256-Zz44PCociYhUuHTS3HJNxJPCkiIl01FFe4//7jtgDsk=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    cinnamon.cinnamon-desktop # org.cinnamon.desktop.background
+    glib
+    gsettings-desktop-schemas # org.gnome.system.location
+    mate.mate-desktop # org.mate.background
+    xdg-desktop-portal
+  ];
+
+  mesonFlags = [
+    "-Dsystemduserunitdir=${placeholder "out"}/lib/systemd/user"
+  ];
+
+  meta = with lib; {
+    description = "Backend implementation for xdg-desktop-portal for Cinnamon, MATE, Xfce";
+    homepage = "https://github.com/linuxmint/xdg-desktop-portal-xapp";
+    maintainers = teams.cinnamon.members;
+    platforms = platforms.linux;
+    license = licenses.lgpl21Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/xdg-desktop-portal/default.nix b/nixpkgs/pkgs/development/libraries/xdg-desktop-portal/default.nix
new file mode 100644
index 000000000000..325fc7305ad6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xdg-desktop-portal/default.nix
@@ -0,0 +1,145 @@
+{ lib
+, fetchFromGitHub
+, flatpak
+, fuse3
+, bubblewrap
+, docbook_xml_dtd_412
+, docbook_xml_dtd_43
+, docbook_xsl
+, docutils
+, systemdMinimal
+, geoclue2
+, glib
+, gsettings-desktop-schemas
+, json-glib
+, libportal
+, libxml2
+, meson
+, ninja
+, nixosTests
+, pipewire
+, gdk-pixbuf
+, librsvg
+, python3
+, pkg-config
+, stdenv
+, runCommand
+, wrapGAppsHook
+, xmlto
+, enableGeoLocation ? true
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "xdg-desktop-portal";
+  version = "1.18.2";
+
+  outputs = [ "out" "installedTests" ];
+
+  src = fetchFromGitHub {
+    owner = "flatpak";
+    repo = "xdg-desktop-portal";
+    rev = finalAttrs.version;
+    hash = "sha256-Pd5IKrVp/OOE10Ozy4R3XbubVc6iz0znG+YB0Uu+68E=";
+  };
+
+  patches = [
+    # The icon validator copied from Flatpak needs to access the gdk-pixbuf loaders
+    # in the Nix store and cannot bind FHS paths since those are not available on NixOS.
+    (runCommand "icon-validator.patch" { } ''
+      # Flatpak uses a different path
+      substitute "${flatpak.icon-validator-patch}" "$out" \
+        --replace "/icon-validator/validate-icon.c" "/src/validate-icon.c"
+    '')
+
+    # Allow installing installed tests to a separate output.
+    ./installed-tests-path.patch
+
+    # Look for portal definitions under path from `NIX_XDG_DESKTOP_PORTAL_DIR` environment variable.
+    # While upstream has `XDG_DESKTOP_PORTAL_DIR`, it is meant for tests and actually blocks
+    # any configs from being loaded from anywhere else.
+    ./nix-pkgdatadir-env.patch
+  ];
+
+  nativeBuildInputs = [
+    docbook_xml_dtd_412
+    docbook_xml_dtd_43
+    docbook_xsl
+    docutils # for rst2man
+    libxml2
+    meson
+    ninja
+    pkg-config
+    wrapGAppsHook
+    xmlto
+  ];
+
+  buildInputs = [
+    flatpak
+    fuse3
+    bubblewrap
+    systemdMinimal # libsystemd
+    glib
+    gsettings-desktop-schemas
+    json-glib
+    libportal
+    pipewire
+
+    # For icon validator
+    gdk-pixbuf
+    librsvg
+
+    # For document-fuse installed test.
+    (python3.withPackages (pp: with pp; [
+      pygobject3
+    ]))
+  ] ++ lib.optionals enableGeoLocation [
+    geoclue2
+  ];
+
+  nativeCheckInputs = [
+    python3.pkgs.pytest
+    python3.pkgs.python-dbusmock
+    python3.pkgs.pygobject3
+    python3.pkgs.dbus-python
+  ];
+
+  mesonFlags = [
+    "--sysconfdir=/etc"
+    "-Dinstalled-tests=true"
+    "-Dinstalled_test_prefix=${placeholder "installedTests"}"
+  ] ++ lib.optionals (!enableGeoLocation) [
+    "-Dgeoclue=disabled"
+  ];
+
+  doCheck = true;
+
+  preCheck = ''
+    # For test_trash_file
+    export HOME=$(mktemp -d)
+
+    # Upstream disables a few tests in CI upstream as they are known to
+    # be flaky. Let's disable those downstream as hydra exhibits similar
+    # flakes:
+    #   https://github.com/NixOS/nixpkgs/pull/270085#issuecomment-1840053951
+    export TEST_IN_CI=1
+  '';
+
+  passthru = {
+    tests = {
+      installedTests = nixosTests.installed-tests.xdg-desktop-portal;
+
+      validate-icon = runCommand "test-icon-validation" { } ''
+        ${finalAttrs.finalPackage}/libexec/xdg-desktop-portal-validate-icon --sandbox 512 512 ${../../../applications/audio/zynaddsubfx/ZynLogo.svg} > "$out"
+        grep format=svg "$out"
+      '';
+    };
+  };
+
+  meta = with lib; {
+    description = "Desktop integration portals for sandboxed apps";
+    homepage = "https://flatpak.github.io/xdg-desktop-portal/";
+    license = licenses.lgpl2Plus;
+    maintainers = with maintainers; [ jtojnar ];
+    platforms = platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/xdg-desktop-portal/installed-tests-path.patch b/nixpkgs/pkgs/development/libraries/xdg-desktop-portal/installed-tests-path.patch
new file mode 100644
index 000000000000..0a9547ba3628
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xdg-desktop-portal/installed-tests-path.patch
@@ -0,0 +1,30 @@
+diff --git a/meson.build b/meson.build
+index b25f9ef..7975f85 100644
+--- a/meson.build
++++ b/meson.build
+@@ -40,8 +40,8 @@ if dataroot_dir == ''
+     dataroot_dir = datadir
+ endif
+ 
+-installed_tests_dir = prefix / libexecdir / 'installed-tests' / meson.project_name()
+-installed_tests_data_dir = prefix / datadir / 'installed-tests' / meson.project_name()
++installed_tests_dir = get_option('installed_test_prefix') / 'libexec' / 'installed-tests' / meson.project_name()
++installed_tests_data_dir = get_option('installed_test_prefix') / 'share' / 'installed-tests' / meson.project_name()
+ docs_dir = datadir / 'doc' / meson.project_name()
+ 
+ summary({
+diff --git a/meson_options.txt b/meson_options.txt
+index fccada3..ca87600 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -38,6 +38,10 @@ option('installed-tests',
+         type: 'boolean',
+         value: false,
+         description: 'Enable installation of some test cases')
++option('installed_test_prefix',
++        type: 'string',
++        value: '',
++        description: 'Prefix for installed tests')
+ option('pytest',
+         type: 'feature',
+         value: 'auto',
diff --git a/nixpkgs/pkgs/development/libraries/xdg-desktop-portal/nix-pkgdatadir-env.patch b/nixpkgs/pkgs/development/libraries/xdg-desktop-portal/nix-pkgdatadir-env.patch
new file mode 100644
index 000000000000..b099c4ad56f5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xdg-desktop-portal/nix-pkgdatadir-env.patch
@@ -0,0 +1,13 @@
+diff --git a/src/portal-impl.c b/src/portal-impl.c
+index 85b3a23..6d43636 100644
+--- a/src/portal-impl.c
++++ b/src/portal-impl.c
+@@ -275,6 +275,8 @@ load_installed_portals (gboolean opt_verbose)
+ 
+   /* We need to override this in the tests */
+   portal_dir = g_getenv ("XDG_DESKTOP_PORTAL_DIR");
++  if (portal_dir == NULL)
++    portal_dir = g_getenv ("NIX_XDG_DESKTOP_PORTAL_DIR");
+   if (portal_dir == NULL)
+     portal_dir = DATADIR "/xdg-desktop-portal/portals";
+ 
diff --git a/nixpkgs/pkgs/development/libraries/xed/default.nix b/nixpkgs/pkgs/development/libraries/xed/default.nix
new file mode 100644
index 000000000000..dc6495d0cf38
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xed/default.nix
@@ -0,0 +1,47 @@
+{ lib, stdenv, fetchFromGitHub, python3Packages }:
+
+let
+  # mbuild is a custom build system used only to build xed
+  mbuild = python3Packages.buildPythonPackage rec {
+    pname = "mbuild";
+    version = "2022.07.28";
+
+    src = fetchFromGitHub {
+      owner = "intelxed";
+      repo = "mbuild";
+      rev = "v${version}";
+      sha256 = "sha256-eOAqmoPotdXGcBmrD9prXph4XOL6noJU6GYT/ud/VXk=";
+    };
+  };
+
+in stdenv.mkDerivation rec {
+  pname = "xed";
+  version = "2022.08.11";
+
+  src = fetchFromGitHub {
+    owner = "intelxed";
+    repo = "xed";
+    rev = "v${version}";
+    sha256 = "sha256-Iil+dfjuWYPbzmSjgwKTKScSE/IsWuHEKQ5HsBJDqWM=";
+  };
+
+  nativeBuildInputs = [ mbuild ];
+
+  buildPhase = ''
+    patchShebangs mfile.py
+
+    # this will build, test and install
+    ./mfile.py test --prefix $out
+  '';
+
+  dontInstall = true; # already installed during buildPhase
+
+  meta = with lib; {
+    broken = (stdenv.isLinux && stdenv.isAarch64);
+    description = "Intel X86 Encoder Decoder (Intel XED)";
+    homepage    = "https://intelxed.github.io/";
+    license     = licenses.asl20;
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ arturcygan ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/xercesc/default.nix b/nixpkgs/pkgs/development/libraries/xercesc/default.nix
new file mode 100644
index 000000000000..e386851da02c
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xercesc/default.nix
@@ -0,0 +1,34 @@
+{ stdenv
+, lib
+, fetchurl
+, curl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "xerces-c";
+  version = "3.2.5";
+
+  src = fetchurl {
+    url = "mirror://apache/xerces/c/3/sources/${pname}-${version}.tar.gz";
+    sha256 = "sha256-VFz8zmxOdVIHvR8n4xkkHlDjfAwnJQ8RzaEWAY8e8PU=";
+  };
+
+  buildInputs = [
+    curl
+  ];
+
+  configureFlags = [
+    # Disable SSE2 extensions on platforms for which they are not enabled by default
+    "--disable-sse2"
+    "--enable-netaccessor-curl"
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = {
+    homepage = "https://xerces.apache.org/xerces-c/";
+    description = "Validating XML parser written in a portable subset of C++";
+    license = lib.licenses.asl20;
+    platforms = lib.platforms.linux ++ lib.platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/xeus-zmq/default.nix b/nixpkgs/pkgs/development/libraries/xeus-zmq/default.nix
new file mode 100644
index 000000000000..0e27aa511de2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xeus-zmq/default.nix
@@ -0,0 +1,45 @@
+{ lib
+, clangStdenv
+, fetchFromGitHub
+, cmake
+, cppzmq
+, libuuid
+, nlohmann_json
+, openssl
+, xeus
+, xtl
+, zeromq
+}:
+
+clangStdenv.mkDerivation rec {
+  pname = "xeus-zmq";
+  version = "1.3.0";
+
+  src = fetchFromGitHub {
+    owner = "jupyter-xeus";
+    repo = "xeus-zmq";
+    rev = "${version}";
+    hash = "sha256-CrFb0LDb6akCfFnwMSa4H3D3A8KJx9Kiejw6VeV3IDs=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [
+    cppzmq
+    libuuid
+    openssl
+    xeus
+    xtl
+    zeromq
+  ];
+
+  propagatedBuildInputs = [ nlohmann_json ];
+
+  meta = {
+    description = "ZeroMQ-based middleware for xeus";
+    homepage = "https://github.com/jupyter-xeus/xeus-zmq";
+    license = lib.licenses.bsd3;
+    maintainers = with lib.maintainers; [ thomasjm ];
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/xeus/default.nix b/nixpkgs/pkgs/development/libraries/xeus/default.nix
new file mode 100644
index 000000000000..9283f20c335f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xeus/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, doctest
+, nlohmann_json
+, libuuid
+, xtl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "xeus";
+  version = "3.2.0";
+
+  src = fetchFromGitHub {
+    owner = "jupyter-xeus";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-D/dJ0SHxTHJw63gHD6FRZS7O2TVZ0voIv2mQASEjLA8=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    doctest
+  ];
+
+  buildInputs = [
+    nlohmann_json
+    libuuid
+    xtl
+  ];
+
+  cmakeFlags = [
+    "-DXEUS_BUILD_TESTS=ON"
+  ];
+
+  doCheck = true;
+  preCheck = ''export LD_LIBRARY_PATH=$PWD'';
+
+  meta = with lib; {
+    homepage = "https://xeus.readthedocs.io";
+    description = "C++ implementation of the Jupyter Kernel protocol";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ serge_sans_paille ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/xgboost/default.nix b/nixpkgs/pkgs/development/libraries/xgboost/default.nix
new file mode 100644
index 000000000000..0af51a40dfb1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xgboost/default.nix
@@ -0,0 +1,149 @@
+{ config
+, stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, gtest
+, doCheck ? true
+, cudaSupport ? config.cudaSupport
+, ncclSupport ? false
+, rLibrary ? false
+, cudaPackages
+, llvmPackages
+, R
+, rPackages
+}@inputs:
+
+assert ncclSupport -> (cudaSupport && !cudaPackages.nccl.meta.unsupported);
+# Disable regular tests when building the R package
+# because 1) the R package runs its own tests and
+# 2) the R package creates a different binary shared
+# object that isn't compatible with the regular CLI
+# tests.
+assert rLibrary -> doCheck != true;
+
+let
+  # This ensures xgboost gets the correct libstdc++ when
+  # built with cuda support. This may be removed once
+  # #226165 rewrites cudaStdenv
+  inherit (cudaPackages) backendStdenv;
+  stdenv = if cudaSupport then backendStdenv else inputs.stdenv;
+in
+
+stdenv.mkDerivation rec {
+  pnameBase = "xgboost";
+  # prefix with r when building the R library
+  # The R package build results in a special xgboost.so file
+  # that contains a subset of the .so file use for the CLI
+  # and python version. In general, the CRAN version from
+  # nixpkgs's r-modules should be used, but this non-standard
+  # build allows for enabling CUDA and NCCL support which aren't
+  # included in the CRAN release. Build with:
+  # nix-build -E "with (import $NIXPKGS{}); \
+  #   let \
+  #     xgb = xgboost.override{rLibrary = true; doCheck = false;}; \
+  #   in \
+  #   rWrapper.override{ packages = [ xgb ]; }"
+  pname = lib.optionalString rLibrary "r-" + pnameBase;
+  version = "2.0.1";
+
+  src = fetchFromGitHub {
+    owner = "dmlc";
+    repo = pnameBase;
+    rev = "v${version}";
+    fetchSubmodules = true;
+    hash = "sha256-tRx6kJwIoVSN701ppuyZpIFUQIFy4LBMFyirLtwApjA=";
+  };
+
+  nativeBuildInputs = [ cmake ]
+    ++ lib.optionals stdenv.isDarwin [ llvmPackages.openmp ]
+    ++ lib.optionals cudaSupport [ cudaPackages.autoAddOpenGLRunpathHook ]
+    ++ lib.optionals rLibrary [ R ];
+
+  buildInputs = [ gtest ] ++ lib.optional cudaSupport cudaPackages.cudatoolkit
+    ++ lib.optional ncclSupport cudaPackages.nccl;
+
+  propagatedBuildInputs = lib.optionals rLibrary [
+    rPackages.data_table
+    rPackages.jsonlite
+    rPackages.Matrix
+  ];
+
+  cmakeFlags = lib.optionals doCheck [ "-DGOOGLE_TEST=ON" ]
+    ++ lib.optionals cudaSupport [
+    "-DUSE_CUDA=ON"
+    # Their CMakeLists.txt does not respect CUDA_HOST_COMPILER, instead using the CXX compiler.
+    # https://github.com/dmlc/xgboost/blob/ccf43d4ba0a94e2f0a3cc5a526197539ae46f410/CMakeLists.txt#L145
+    "-DCMAKE_C_COMPILER=${cudaPackages.cudatoolkit.cc}/bin/gcc"
+    "-DCMAKE_CXX_COMPILER=${cudaPackages.cudatoolkit.cc}/bin/g++"
+  ] ++ lib.optionals
+    (cudaSupport
+      && lib.versionAtLeast cudaPackages.cudatoolkit.version "11.4.0")
+    [ "-DBUILD_WITH_CUDA_CUB=ON" ]
+    ++ lib.optionals ncclSupport [ "-DUSE_NCCL=ON" ]
+    ++ lib.optionals rLibrary [ "-DR_LIB=ON" ];
+
+  preConfigure = lib.optionals rLibrary ''
+    substituteInPlace cmake/RPackageInstall.cmake.in --replace "CMD INSTALL" "CMD INSTALL -l $out/library"
+    export R_LIBS_SITE="$R_LIBS_SITE''${R_LIBS_SITE:+:}$out/library"
+  '';
+
+  inherit doCheck;
+
+  # By default, cmake build will run ctests with all checks enabled
+  # If we're building with cuda, we run ctest manually so that we can skip the GPU tests
+  checkPhase = lib.optionalString cudaSupport ''
+    ctest --force-new-ctest-process ${
+      lib.optionalString cudaSupport "-E TestXGBoostLib"
+    }
+  '';
+
+  # Disable finicky tests from dmlc core that fail in Hydra. XGboost team
+  # confirmed xgboost itself does not use this part of the dmlc code.
+  GTEST_FILTER =
+    let
+      # Upstream Issue: https://github.com/xtensor-stack/xsimd/issues/456
+      filteredTests = lib.optionals stdenv.hostPlatform.isDarwin [
+        "ThreadGroup.TimerThread"
+        "ThreadGroup.TimerThreadSimple"
+      ];
+    in
+    "-${builtins.concatStringsSep ":" filteredTests}";
+
+  installPhase =
+    let libname = "libxgboost${stdenv.hostPlatform.extensions.sharedLibrary}";
+    in ''
+      runHook preInstall
+      mkdir -p $out
+      cp -r ../include $out
+      cp -r ../dmlc-core/include/dmlc $out/include
+      cp -r ../rabit/include/rabit $out/include
+    '' + lib.optionalString (!rLibrary) ''
+      install -Dm755 ../lib/${libname} $out/lib/${libname}
+      install -Dm755 ../xgboost $out/bin/xgboost
+    ''
+    # the R library option builds a completely different binary xgboost.so instead of
+    # libxgboost.so, which isn't full featured for python and CLI
+    + lib.optionalString rLibrary ''
+      mkdir $out/library
+      export R_LIBS_SITE="$out/library:$R_LIBS_SITE''${R_LIBS_SITE:+:}"
+      make install -l $out/library
+    '' + ''
+      runHook postInstall
+    '';
+
+  postFixup = lib.optionalString rLibrary ''
+    if test -e $out/nix-support/propagated-build-inputs; then
+        ln -s $out/nix-support/propagated-build-inputs $out/nix-support/propagated-user-env-packages
+    fi
+  '';
+
+  meta = with lib; {
+    description =
+      "Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library";
+    homepage = "https://github.com/dmlc/xgboost";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ abbradar nviets ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/xlslib/default.nix b/nixpkgs/pkgs/development/libraries/xlslib/default.nix
new file mode 100644
index 000000000000..77a11b531100
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xlslib/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchurl, autoreconfHook, unzip }:
+
+stdenv.mkDerivation rec {
+  pname = "xlslib";
+  version = "2.5.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/xlslib/xlslib-package-${version}.zip";
+    sha256 = "1wx3jbpkz2rvgs45x6mwawamd1b2llb0vn29b5sr0rfxzx9d1985";
+  };
+
+  nativeBuildInputs = [ unzip autoreconfHook ];
+
+  setSourceRoot = "export sourceRoot=xlslib/xlslib";
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "C++/C library to construct Excel .xls files in code";
+    homepage = "https://sourceforge.net/projects/xlslib/";
+    license = licenses.bsd2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ abbradar ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/xmake-core-sv/default.nix b/nixpkgs/pkgs/development/libraries/xmake-core-sv/default.nix
new file mode 100644
index 000000000000..83442a8d48a9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xmake-core-sv/default.nix
@@ -0,0 +1,30 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "xmake-core-sv";
+  version = "1.1";
+
+  src = fetchFromGitHub {
+    owner = "xmake-io";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-icvGQi6FNSZXNGs2oLiUKu6rrVsWcXh1r91kycGjnwY=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  meta = with lib; {
+    description = "Public domain cross-platform semantic versioning in c99";
+    homepage = "https://github.com/xmake-io/xmake-core-sv";
+    license = licenses.unlicense;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ rewine ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/xml-security-c/default.nix b/nixpkgs/pkgs/development/libraries/xml-security-c/default.nix
new file mode 100644
index 000000000000..6be958d7d24d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xml-security-c/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl, xalanc, xercesc, openssl, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "xml-security-c";
+  version = "2.0.4";
+
+  src = fetchurl {
+    url = "mirror://apache/santuario/c-library/${pname}-${version}.tar.gz";
+    sha256 = "sha256-p42mcg9sK6FBANJCYTHg0z6sWi26XMEb3QSXS364kAM=";
+  };
+
+  configureFlags = [
+    "--with-openssl"
+    "--with-xerces"
+    "--with-xalan"
+  ];
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ xalanc xercesc openssl ];
+
+  meta = {
+    homepage = "https://santuario.apache.org/";
+    description = "C++ Implementation of W3C security standards for XML";
+    license = lib.licenses.gpl2;
+    platforms = lib.platforms.unix;
+    maintainers = [ lib.maintainers.jagajaga ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/xml-tooling-c/default.nix b/nixpkgs/pkgs/development/libraries/xml-tooling-c/default.nix
new file mode 100644
index 000000000000..f58f50b4a72f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xml-tooling-c/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchgit, autoreconfHook, pkg-config
+, boost, curl, openssl, log4shib, xercesc, xml-security-c
+}:
+
+stdenv.mkDerivation rec {
+  pname = "xml-tooling-c";
+  version = "3.2.4";
+
+  src = fetchgit {
+    url = "https://git.shibboleth.net/git/cpp-xmltooling.git";
+    rev = version;
+    sha256 = "sha256-FQ109ahOSWj3hvaxu1r/0FTpCuWaLgSEKM8NBio+wqU=";
+  };
+
+  buildInputs = [ boost curl openssl log4shib xercesc xml-security-c ];
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  env.NIX_CFLAGS_COMPILE = lib.optionalString (!stdenv.isDarwin) "-std=c++14";
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "A low-level library that provides a high level interface to XML processing for OpenSAML 2";
+    platforms   = platforms.unix;
+    license     = licenses.asl20;
+    maintainers = [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/xmlrpc-c/default.nix b/nixpkgs/pkgs/development/libraries/xmlrpc-c/default.nix
new file mode 100644
index 000000000000..6e002a28543f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xmlrpc-c/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchurl, curl, libxml2 }:
+
+stdenv.mkDerivation rec {
+  pname = "xmlrpc-c";
+  version = "1.51.07";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/xmlrpc-c/${pname}-${version}.tgz";
+    sha256 = "sha256-hNIK4z+SdYL4IdYcC5GUrvvx15JFkKE/qdpa4WmK3tk=";
+  };
+
+  buildInputs = [ curl libxml2 ];
+
+  configureFlags = [
+    "--enable-libxml2-backend"
+  ];
+
+  # Build and install the "xmlrpc" tool (like the Debian package)
+  postInstall = ''
+    (cd tools/xmlrpc && make && make install)
+  '';
+
+  hardeningDisable = [ "format" ];
+
+  meta = with lib; {
+    description = "A lightweight RPC library based on XML and HTTP";
+    homepage = "https://xmlrpc-c.sourceforge.net/";
+    # <xmlrpc-c>/doc/COPYING also lists "Expat license",
+    # "ABYSS Web Server License" and "Python 1.5.2 License"
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.bjornfor ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/xmlsec/default.nix b/nixpkgs/pkgs/development/libraries/xmlsec/default.nix
new file mode 100644
index 000000000000..2cf0cc3ef8df
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xmlsec/default.nix
@@ -0,0 +1,91 @@
+{ stdenv, fetchurl, fetchpatch, libxml2, gnutls, libxslt, pkg-config, libgcrypt, libtool
+, openssl, nss, lib, runCommandCC, writeText }:
+
+lib.fix (self:
+stdenv.mkDerivation rec {
+  pname = "xmlsec";
+  version = "1.2.34";
+
+  src = fetchurl {
+    url = "https://www.aleksey.com/xmlsec/download/xmlsec1-${version}.tar.gz";
+    sha256 = "sha256-Us7UlD81vX0IGKOCmMFSjKSsilRED9cRNKB9LRNwomI=";
+  };
+
+  patches = [
+    ./lt_dladdsearchdir.patch
+
+    # Fix build with libxml2 2.12
+    (fetchpatch {
+      url = "https://github.com/lsh123/xmlsec/commit/ffb327376f5bb69e8dfe7f805529e45a40118c2b.patch";
+      hash = "sha256-o8CLemOiGIHJsYfVQtNzJNVyk03fdmCbvgA8c3OYxo4=";
+    })
+  ] ++ lib.optionals stdenv.isDarwin [ ./remove_bsd_base64_decode_flag.patch ];
+  postPatch = ''
+    substituteAllInPlace src/dl.c
+  '';
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ libxml2 gnutls libgcrypt libtool openssl nss ];
+
+  propagatedBuildInputs = [
+    # required by xmlsec/transforms.h
+    libxslt
+  ];
+
+  enableParallelBuilding = true;
+  doCheck = true;
+  nativeCheckInputs = [ nss.tools ];
+  preCheck = ''
+    substituteInPlace tests/testrun.sh \
+      --replace 'timestamp=`date +%Y%m%d_%H%M%S`' 'timestamp=19700101_000000' \
+      --replace 'TMPFOLDER=/tmp' '$(mktemp -d)'
+  '';
+
+  # enable deprecated soap headers required by lasso
+  # https://dev.entrouvert.org/issues/18771
+  configureFlags = [ "--enable-soap" ];
+
+  # otherwise libxmlsec1-gnutls.so won't find libgcrypt.so, after #909
+  NIX_LDFLAGS = "-lgcrypt";
+
+  postInstall = ''
+    moveToOutput "bin/xmlsec1-config" "$dev"
+    moveToOutput "lib/xmlsec1Conf.sh" "$dev"
+  '';
+
+  passthru.tests.libxmlsec1-crypto = runCommandCC "libxmlsec1-crypto-test"
+    {
+      nativeBuildInputs = [ pkg-config ];
+      buildInputs = [ self libxml2 libxslt libtool ];
+    } ''
+    $CC $(pkg-config --cflags --libs xmlsec1) -o crypto-test ${writeText "crypto-test.c" ''
+      #include <xmlsec/xmlsec.h>
+      #include <xmlsec/crypto.h>
+
+      int main(int argc, char **argv) {
+        return xmlSecInit() ||
+          xmlSecCryptoDLLoadLibrary(argc > 1 ? argv[1] : 0) ||
+          xmlSecCryptoInit();
+      }
+    ''}
+
+    for crypto in "" gcrypt gnutls nss openssl; do
+      ./crypto-test $crypto
+    done
+    touch $out
+  '';
+
+  meta = with lib; {
+    description = "XML Security Library in C based on libxml2";
+    homepage = "https://www.aleksey.com/xmlsec/";
+    downloadPage = "https://www.aleksey.com/xmlsec/download.html";
+    license = licenses.mit;
+    mainProgram = "xmlsec1";
+    maintainers = with maintainers; [ ];
+    platforms = with platforms; linux ++ darwin;
+  };
+}
+)
diff --git a/nixpkgs/pkgs/development/libraries/xmlsec/lt_dladdsearchdir.patch b/nixpkgs/pkgs/development/libraries/xmlsec/lt_dladdsearchdir.patch
new file mode 100644
index 000000000000..17dedb0d6c81
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xmlsec/lt_dladdsearchdir.patch
@@ -0,0 +1,16 @@
+diff --git a/src/dl.c b/src/dl.c
+index b13f9d46..d761855b 100644
+--- a/src/dl.c
++++ b/src/dl.c
+@@ -346,6 +346,11 @@ xmlSecCryptoDLInit(void) {
+         xmlSecIOError("lt_dlinit", NULL, NULL);
+         return(-1);
+     }
++    ret = lt_dladdsearchdir("@out@/lib");
++    if(ret != 0) {
++      xmlSecIOError("lt_dladdsearchdir", NULL, NULL);
++      return(-1);
++    }
+ #endif /* XMLSEC_DL_LIBLTDL */
+ 
+     return(0);
diff --git a/nixpkgs/pkgs/development/libraries/xmlsec/remove_bsd_base64_decode_flag.patch b/nixpkgs/pkgs/development/libraries/xmlsec/remove_bsd_base64_decode_flag.patch
new file mode 100644
index 000000000000..700fad7e3dd4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xmlsec/remove_bsd_base64_decode_flag.patch
@@ -0,0 +1,12 @@
+--- a/tests/testEnc.sh	2020-04-20 14:30:32.000000000 -0400
++++ b/tests/testEnc.sh	2020-10-21 22:09:25.000000000 -0400
+@@ -405,9 +405,6 @@
+             else
+                 # generate binary file out of base64
+                 DECODE="-d"
+-                if [ "`uname`" = "Darwin" ]; then
+-		    DECODE="-D"
+-                fi
+                 cat "$topfolder/$base_test_name.data" | base64 $DECODE > $tmpfile.3
+                 execEncTest "$res_success" \
+                     "" \
diff --git a/nixpkgs/pkgs/development/libraries/xsd/default.nix b/nixpkgs/pkgs/development/libraries/xsd/default.nix
new file mode 100644
index 000000000000..2d614ee0e731
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xsd/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchurl, xercesc }:
+
+let
+in
+stdenv.mkDerivation rec {
+  pname = "xsd";
+  version = "4.0.0";
+
+  src = fetchurl {
+    url = "https://codesynthesis.com/download/xsd/4.0/xsd-4.0.0+dep.tar.bz2";
+    sha256 = "05wqhmd5cd4pdky8i8qysnh96d2h16ly8r73whmbxkajiyf2m9gc";
+  };
+
+  patches = [ ./xsdcxx.patch ];
+
+  postPatch = ''
+    patchShebangs .
+  '';
+
+  enableParallelBuilding = true;
+
+  buildFlags = [
+    "LDFLAGS=-L${xercesc}/lib"
+    "CPPFLAGS=-I${xercesc}/include"
+  ];
+  installFlags = buildFlags ++ [
+    "install_prefix=${placeholder "out"}"
+  ];
+
+  buildInputs = [ xercesc ];
+
+  meta = {
+    homepage = "http://www.codesynthesis.com/products/xsd";
+    description = "An open-source, cross-platform W3C XML Schema to C++ data binding compiler";
+    license = lib.licenses.gpl2;
+    platforms = lib.platforms.linux;
+    maintainers = [ lib.maintainers.jagajaga ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/xsd/xsdcxx.patch b/nixpkgs/pkgs/development/libraries/xsd/xsdcxx.patch
new file mode 100644
index 000000000000..88a893c6e602
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xsd/xsdcxx.patch
@@ -0,0 +1,126 @@
+--- xsd-4.0.0+dep/xsd/doc/xsd.1~	2014-09-14 12:25:36.862267587 +0000
++++ xsd-4.0.0+dep/xsd/doc/xsd.1	2014-09-14 12:28:25.728229892 +0000
+@@ -1,16 +1,16 @@
+ .\" Process this file with
+-.\" groff -man -Tascii xsd.1
++.\" groff -man -Tascii xsdcxx.1
+ .\"
+ .TH XSD 1 "July 2014" "XSD 4.0.0"
+ .SH NAME
+-xsd \- W3C XML Schema to C++ Compiler
++xsdcxx \- W3C XML Schema to C++ Compiler
+ .\"
+ .\"
+ .\"
+ .\"--------------------------------------------------------------------
+ .SH SYNOPSIS
+ .\"--------------------------------------------------------------------
+-.B xsd
++.B xsdcxx
+ .I command
+ .B [
+ .I options
+@@ -20,19 +20,19 @@
+ .I file
+ .B ...]
+ .in
+-.B xsd help
++.B xsdcxx help
+ .B [
+ .I command
+ .B ]
+ .in
+-.B xsd version
++.B xsdcxx version
+ .\"
+ .\"
+ .\"
+ .\"--------------------------------------------------------------------
+ .SH DESCRIPTION
+ .\"--------------------------------------------------------------------
+-.B xsd
++.B xsdcxx
+ generates vocabulary-specific, statically-typed C++ mapping from W3C XML
+ Schema definitions. Particular mapping to produce is selected by a
+ .IR command .
+@@ -96,7 +96,7 @@
+ .PP
+ .RS
+ .RS 3
+-.B xsd help
++.B xsdcxx help
+ .I command
+ .RE
+ .PP
+@@ -206,7 +206,7 @@
+ \fIfilename\fP \fInamespace\fP
+ 
+ For example, if you have file \fBhello\.xsd\fP with namespace
+-\fBhttp://example\.com/hello\fP and you run \fBxsd\fP on this file, then the
++\fBhttp://example\.com/hello\fP and you run \fBxsdcxx\fP on this file, then the
+ string in question will be:
+ 
+ \fBhello\.xsd\. http://example\.com/hello\fP
+@@ -1632,7 +1632,7 @@
+ .\"
+ .SH DIAGNOSTICS
+ If the input file is not a valid W3C XML Schema definition,
+-.B xsd
++.B xsdcxx
+ will issue diagnostic messages to
+ .B STDERR
+ and exit with non-zero exit code.
+--- xsd-4.0.0+dep/xsd/doc/xsd.xhtml~	2014-09-14 12:28:37.731513138 +0000
++++ xsd-4.0.0+dep/xsd/doc/xsd.xhtml	2014-09-14 12:30:11.277789610 +0000
+@@ -50,19 +50,19 @@
+ 
+   <h1>NAME</h1>
+ 
+-  <p>xsd - W3C XML Schema to C++ Compiler</p>
++  <p>xsdcxx - W3C XML Schema to C++ Compiler</p>
+ 
+   <h1>SYNOPSIS</h1>
+ 
+   <dl id="synopsis">
+-    <dt><code><b>xsd</b> <i>command</i> [<i>options</i>] <i>file</i> [<i>file</i> ...]</code></dt>
+-    <dt><code><b>xsd help</b> [<i>command</i>]</code></dt>
+-    <dt><code><b>xsd version</b></code></dt>
++    <dt><code><b>xsdcxx</b> <i>command</i> [<i>options</i>] <i>file</i> [<i>file</i> ...]</code></dt>
++    <dt><code><b>xsdcxx help</b> [<i>command</i>]</code></dt>
++    <dt><code><b>xsdcxx version</b></code></dt>
+   </dl>
+ 
+   <h1>DESCRIPTION</h1>
+ 
+-  <p><code><b>xsd</b></code> generates vocabulary-specific, statically-typed
++  <p><code><b>xsdcxx</b></code> generates vocabulary-specific, statically-typed
+   C++ mapping from W3C XML Schema definitions. Particular mapping to
+   produce is selected by a <code><i>command</i></code>. Each mapping has
+   a number of mapping-specific <code><i>options</i></code> that should
+@@ -104,7 +104,7 @@
+ 
+     <dt><code><b>help</b></code></dt>
+     <dd>Print usage information and exit. Use
+-      <p><code><b>xsd help</b> <i>command</i></code></p>
++      <p><code><b>xsdcxx help</b> <i>command</i></code></p>
+       for command-specific help.
+     </dd>
+ 
+@@ -219,7 +219,7 @@
+ 
+   <p>For example, if you have file <code><b>hello.xsd</b></code> with
+   namespace <code><b>http://example.com/hello</b></code> and you run
+-  <code><b>xsd</b></code> on this file, then the string in question will
++  <code><b>xsdcxx</b></code> on this file, then the string in question will
+   be:</p>
+ 
+   <p><code><b>hello.xsd. http://example.com/hello</b></code></p>
+@@ -1530,7 +1530,7 @@
+   <h1>DIAGNOSTICS</h1>
+ 
+   <p>If the input file is not a valid W3C XML Schema definition,
+-    <code><b>xsd</b></code> will issue diagnostic messages to STDERR
++    <code><b>xsdcxx</b></code> will issue diagnostic messages to STDERR
+     and exit with non-zero exit code.</p>
+ 
+   <h1>BUGS</h1>
diff --git a/nixpkgs/pkgs/development/libraries/xsimd/default.nix b/nixpkgs/pkgs/development/libraries/xsimd/default.nix
new file mode 100644
index 000000000000..d775cef4d673
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xsimd/default.nix
@@ -0,0 +1,60 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, doctest
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "xsimd";
+  version = "12.1.1";
+  src = fetchFromGitHub {
+    owner = "xtensor-stack";
+    repo = "xsimd";
+    rev = finalAttrs.version;
+    hash = "sha256-ofUFieeRtpnzNv3Ad5oYwKWb2XcqQHoj601TIhydJyI=";
+  };
+  patches = [
+    # Ideally, Accelerate/Accelerate.h should be used for this implementation,
+    # but it doesn't work... Needs a Darwin user to debug this. We apply this
+    # patch unconditionally, because the #if macros make sure it doesn't
+    # interfer with the Linux implementations.
+    ./fix-darwin-exp10-implementation.patch
+  ] ++ lib.optionals stdenv.isDarwin [
+    # https://github.com/xtensor-stack/xsimd/issues/807
+    ./disable-test_error_gamma-test.patch
+  ] ++ lib.optionals (stdenv.isDarwin || stdenv.hostPlatform.isMusl) [
+    # - Darwin report: https://github.com/xtensor-stack/xsimd/issues/917
+    # - Musl   report: https://github.com/xtensor-stack/xsimd/issues/798
+    ./disable-exp10-test.patch
+  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
+    # https://github.com/xtensor-stack/xsimd/issues/798
+    ./disable-polar-test.patch
+  ] ++ lib.optionals stdenv.hostPlatform.isMusl [
+    # Fix suggested here: https://github.com/xtensor-stack/xsimd/issues/798#issuecomment-1356884601
+    # Upstream didn't merge that from some reason.
+    ./fix-atan-test.patch
+  ];
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_TESTS=${if (finalAttrs.finalPackage.doCheck && stdenv.hostPlatform == stdenv.buildPlatform) then "ON" else "OFF"}"
+  ];
+
+  doCheck = true;
+  nativeCheckInputs = [
+    doctest
+  ];
+  checkTarget = "xtest";
+
+  meta = with lib; {
+    description = "C++ wrappers for SIMD intrinsics";
+    homepage = "https://github.com/xtensor-stack/xsimd";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ tobim doronbehar ];
+    platforms = platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/xsimd/disable-exp10-test.patch b/nixpkgs/pkgs/development/libraries/xsimd/disable-exp10-test.patch
new file mode 100644
index 000000000000..8d2940c3b080
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xsimd/disable-exp10-test.patch
@@ -0,0 +1,36 @@
+commit 87433035c70578507e08565723c99158290f2488
+Author: Doron Behar <doron.behar@gmail.com>
+Date:   Tue Aug 1 13:26:04 2023 +0300
+
+    Darwin & Musl: Disable failing exp10 test
+
+--- a/test/test_xsimd_api.cpp
++++ b/test/test_xsimd_api.cpp
+@@ -515,15 +515,6 @@ struct xsimd_api_float_types_functions
+         value_type val(2);
+         CHECK_EQ(extract(xsimd::exp(T(val))), std::exp(val));
+     }
+-    void test_exp10()
+-    {
+-        value_type val(2);
+-#ifdef EMSCRIPTEN
+-        CHECK_EQ(extract(xsimd::exp10(T(val))), doctest::Approx(std::pow(value_type(10), val)));
+-#else
+-        CHECK_EQ(extract(xsimd::exp10(T(val))), std::pow(value_type(10), val));
+-#endif
+-    }
+     void test_exp2()
+     {
+         value_type val(2);
+@@ -813,11 +804,6 @@ TEST_CASE_TEMPLATE("[xsimd api | float types functions]", B, FLOAT_TYPES)
+         Test.test_exp();
+     }
+ 
+-    SUBCASE("exp10")
+-    {
+-        Test.test_exp10();
+-    }
+-
+     SUBCASE("exp2")
+     {
+         Test.test_exp2();
diff --git a/nixpkgs/pkgs/development/libraries/xsimd/disable-polar-test.patch b/nixpkgs/pkgs/development/libraries/xsimd/disable-polar-test.patch
new file mode 100644
index 000000000000..91128f43c2d5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xsimd/disable-polar-test.patch
@@ -0,0 +1,38 @@
+commit 9374b88b97911d9c6e19d5e764e25183cd45d534
+Author: Doron Behar <doron.behar@gmail.com>
+Date:   Tue Aug 1 13:29:16 2023 +0300
+
+    aarch64-Darwin: Disable failing polar test
+
+--- a/test/test_xsimd_api.cpp
++++ b/test/test_xsimd_api.cpp
+@@ -661,17 +661,6 @@ struct xsimd_api_float_types_functions
+         value_type val1(4);
+         CHECK_EQ(extract(xsimd::nextafter(T(val0), T(val1))), std::nextafter(val0, val1));
+     }
+-    void test_polar()
+-    {
+-        value_type val0(3);
+-        value_type val1(4);
+-#ifndef EMSCRIPTEN
+-        CHECK_EQ(extract(xsimd::polar(T(val0), T(val1))), std::polar(val0, val1));
+-#else
+-        CHECK_EQ(std::real(extract(xsimd::polar(T(val0), T(val1)))), doctest::Approx(std::real(std::polar(val0, val1))));
+-        CHECK_EQ(std::imag(extract(xsimd::polar(T(val0), T(val1)))), doctest::Approx(std::imag(std::polar(val0, val1))));
+-#endif
+-    }
+     void test_pow()
+     {
+         value_type val0(2);
+@@ -931,11 +920,6 @@ TEST_CASE_TEMPLATE("[xsimd api | float types functions]", B, FLOAT_TYPES)
+         Test.test_nextafter();
+     }
+ 
+-    SUBCASE("polar")
+-    {
+-        Test.test_polar();
+-    }
+-
+     SUBCASE("pow")
+     {
+         Test.test_pow();
diff --git a/nixpkgs/pkgs/development/libraries/xsimd/disable-test_error_gamma-test.patch b/nixpkgs/pkgs/development/libraries/xsimd/disable-test_error_gamma-test.patch
new file mode 100644
index 000000000000..a7344d231b8d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xsimd/disable-test_error_gamma-test.patch
@@ -0,0 +1,36 @@
+commit 3f751cef6b27ec13418a92c5b5f36b22bb5ffd55
+Author: Doron Behar <doron.behar@gmail.com>
+Date:   Tue Aug 1 13:24:34 2023 +0300
+
+    Darwin: Disable failing test from test_error_gamma.cpp
+
+diff --git a/test/test_error_gamma.cpp b/test/test_error_gamma.cpp
+index 214cbb5..299e5b8 100644
+--- a/test/test_error_gamma.cpp
++++ b/test/test_error_gamma.cpp
+@@ -131,25 +131,6 @@ struct error_gamma_test
+             INFO("lgamma");
+             CHECK_EQ(diff, 0);
+         }
+-#if !(XSIMD_WITH_AVX && !XSIMD_WITH_AVX2)
+-
+-        // tgamma (negative input)
+-        {
+-            std::transform(gamma_neg_input.cbegin(), gamma_neg_input.cend(), expected.begin(),
+-                           [](const value_type& v)
+-                           { return std::lgamma(v); });
+-            batch_type in, out;
+-            for (size_t i = 0; i < nb_input; i += size)
+-            {
+-                detail::load_batch(in, gamma_neg_input, i);
+-                out = lgamma(in);
+-                detail::store_batch(out, res, i);
+-            }
+-            size_t diff = detail::get_nb_diff(res, expected);
+-            INFO("lgamma (negative input)");
+-            CHECK_EQ(diff, 0);
+-        }
+-#endif
+     }
+ };
+ 
diff --git a/nixpkgs/pkgs/development/libraries/xsimd/fix-atan-test.patch b/nixpkgs/pkgs/development/libraries/xsimd/fix-atan-test.patch
new file mode 100644
index 000000000000..3d1517610aae
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xsimd/fix-atan-test.patch
@@ -0,0 +1,19 @@
+commit f60dad2c1d8ad47fbff761ce1cb027fc7c3a40e8
+Author: Doron Behar <doron.behar@gmail.com>
+Date:   Tue Aug 1 13:47:37 2023 +0300
+
+    Musl: Fix atan test from test_complex_trigonometric.cpp
+
+diff --git a/test/test_complex_trigonometric.cpp b/test/test_complex_trigonometric.cpp
+index a486110..691db77 100644
+--- a/test/test_complex_trigonometric.cpp
++++ b/test/test_complex_trigonometric.cpp
+@@ -155,7 +155,7 @@ struct complex_trigonometric_test
+             out = atan(in);
+             detail::store_batch(out, res, i);
+         }
+-        size_t diff = detail::get_nb_diff(res, expected);
++        size_t diff = detail::get_nb_diff_near(res, expected, 1e-12);
+         CHECK_EQ(diff, 0);
+     }
+ 
diff --git a/nixpkgs/pkgs/development/libraries/xsimd/fix-darwin-exp10-implementation.patch b/nixpkgs/pkgs/development/libraries/xsimd/fix-darwin-exp10-implementation.patch
new file mode 100644
index 000000000000..caa7db0bcc13
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xsimd/fix-darwin-exp10-implementation.patch
@@ -0,0 +1,22 @@
+diff --git i/include/xsimd/arch/xsimd_scalar.hpp w/include/xsimd/arch/xsimd_scalar.hpp
+index 9066da6..7aa3b6b 100644
+--- i/include/xsimd/arch/xsimd_scalar.hpp
++++ w/include/xsimd/arch/xsimd_scalar.hpp
+@@ -502,16 +502,7 @@ namespace xsimd
+         return !(x0 == x1);
+     }
+ 
+-#if defined(__APPLE__)
+-    inline float exp10(const float& x) noexcept
+-    {
+-        return __exp10f(x);
+-    }
+-    inline double exp10(const double& x) noexcept
+-    {
+-        return __exp10(x);
+-    }
+-#elif defined(__GLIBC__)
++#if defined(__GLIBC__)
+     inline float exp10(const float& x) noexcept
+     {
+         return ::exp10f(x);
diff --git a/nixpkgs/pkgs/development/libraries/xtensor/default.nix b/nixpkgs/pkgs/development/libraries/xtensor/default.nix
new file mode 100644
index 000000000000..678f87af74cf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xtensor/default.nix
@@ -0,0 +1,68 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, doctest
+, enableAssertions ? false
+, enableBoundChecks ? false # Broadcasts don't pass bound checks
+, nlohmann_json
+, xtl
+, xsimd
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "xtensor";
+  version = "0.24.7";
+
+  src = fetchFromGitHub {
+    owner = "xtensor-stack";
+    repo = "xtensor";
+    rev = finalAttrs.version;
+    hash = "sha256-dVbpcBW+jK9nIl5efk5LdKdBm8CkaJWEZ0ZY7ZuApwk=";
+  };
+  patches = [
+    # Support for xsimd 11
+    (fetchpatch {
+      url = "https://github.com/xtensor-stack/xtensor/commit/77a650a8018e0be6fcc76bf66685ff352ae23ef1.patch";
+      hash = "sha256-vOdUzzsSK+lYcA7fZXWOTVV202GZC0DhkMMjzggnmWE=";
+    })
+    # A single test fails on Darwin, see:
+    # https://github.com/xtensor-stack/xtensor/issues/2718
+    ./remove-failing-test_xinfo.patch
+  ];
+
+  nativeBuildInputs = [
+    cmake
+  ];
+  propagatedBuildInputs = [
+    nlohmann_json
+    xtl
+  ] ++ lib.optionals (!(stdenv.isAarch64 && stdenv.isLinux)) [
+    # xsimd support is broken on aarch64-linux, see:
+    # https://github.com/xtensor-stack/xsimd/issues/945
+    xsimd
+  ];
+
+  cmakeFlags = let
+    cmakeBool = x: if x then "ON" else "OFF";
+  in [
+    "-DBUILD_TESTS=${cmakeBool finalAttrs.finalPackage.doCheck}"
+    "-DXTENSOR_ENABLE_ASSERT=${cmakeBool enableAssertions}"
+    "-DXTENSOR_CHECK_DIMENSION=${cmakeBool enableBoundChecks}"
+  ];
+
+  doCheck = true;
+  nativeCheckInputs = [
+    doctest
+  ];
+  checkTarget = "xtest";
+
+  meta = with lib; {
+    description = "Multi-dimensional arrays with broadcasting and lazy computing.";
+    homepage = "https://github.com/xtensor-stack/xtensor";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ cpcloud ];
+    platforms = platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/xtensor/remove-failing-test_xinfo.patch b/nixpkgs/pkgs/development/libraries/xtensor/remove-failing-test_xinfo.patch
new file mode 100644
index 000000000000..c3352c453c59
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xtensor/remove-failing-test_xinfo.patch
@@ -0,0 +1,12 @@
+diff --git i/test/CMakeLists.txt w/test/CMakeLists.txt
+index 46127597..727b66bd 100644
+--- i/test/CMakeLists.txt
++++ w/test/CMakeLists.txt
+@@ -189,7 +189,6 @@ set(XTENSOR_TESTS
+     test_xhistogram.cpp
+     test_xpad.cpp
+     test_xindex_view.cpp
+-    test_xinfo.cpp
+     test_xio.cpp
+     test_xlayout.cpp
+     test_xmanipulation.cpp
diff --git a/nixpkgs/pkgs/development/libraries/xtl/default.nix b/nixpkgs/pkgs/development/libraries/xtl/default.nix
new file mode 100644
index 000000000000..87f480ea29fe
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xtl/default.nix
@@ -0,0 +1,34 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, doctest
+, gtest
+}:
+stdenv.mkDerivation rec {
+  pname = "xtl";
+  version = "0.7.7";
+
+  src = fetchFromGitHub {
+    owner = "xtensor-stack";
+    repo = "xtl";
+    rev = version;
+    hash = "sha256-f8qYh8ibC/ToHsUv3OF1ujzt3fUe7kW9cNpGyLqsgqw=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [ "-DBUILD_TESTS=ON" ];
+
+  doCheck = true;
+  nativeCheckInputs = [ doctest ];
+  checkTarget = "xtest";
+
+  meta = with lib; {
+    description = "Basic tools (containers, algorithms) used by other quantstack packages";
+    homepage = "https://github.com/xtensor-stack/xtl";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ cpcloud ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/xvidcore/default.nix b/nixpkgs/pkgs/development/libraries/xvidcore/default.nix
new file mode 100644
index 000000000000..82520572c376
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xvidcore/default.nix
@@ -0,0 +1,46 @@
+{ lib, stdenv, fetchurl, yasm, autoconf, automake, libtool }:
+
+stdenv.mkDerivation rec {
+  pname = "xvidcore";
+  version = "1.3.7";
+
+  src = fetchurl {
+    url = "https://downloads.xvid.com/downloads/${pname}-${version}.tar.bz2";
+    sha256 = "1xyg3amgg27zf7188kss7y248s0xhh1vv8rrk0j9bcsd5nasxsmf";
+  };
+
+  preConfigure = ''
+    # Configure script is not in the root of the source directory
+    cd build/generic
+  '' + lib.optionalString stdenv.isDarwin ''
+    # Undocumented darwin hack
+    substituteInPlace configure --replace "-no-cpp-precomp" ""
+  '';
+
+  configureFlags = [ ]
+    # Undocumented darwin hack (assembly is probably disabled due to an
+    # issue with nasm, however yasm is now used)
+    ++ lib.optional stdenv.isDarwin "--enable-macosx_module --disable-assembly";
+
+  nativeBuildInputs = [ ]
+    ++ lib.optional (!stdenv.isDarwin) yasm;
+
+  buildInputs = [ ]
+    # Undocumented darwin hack
+    ++ lib.optionals stdenv.isDarwin [ autoconf automake libtool ];
+
+  # Don't remove static libraries (e.g. 'libs/*.a') on darwin.  They're needed to
+  # compile ffmpeg (and perhaps other things).
+  postInstall = lib.optionalString (!stdenv.isDarwin) ''
+    rm $out/lib/*.a
+  '';
+
+  meta = with lib; {
+    description = "MPEG-4 video codec for PC";
+    homepage    = "https://www.xvid.com/";
+    license     = licenses.gpl2;
+    maintainers = with maintainers; [ codyopel lovek323 ];
+    platforms   = platforms.all;
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/xxHash/default.nix b/nixpkgs/pkgs/development/libraries/xxHash/default.nix
new file mode 100644
index 000000000000..c78fc302afe4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xxHash/default.nix
@@ -0,0 +1,44 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "xxHash";
+  version = "0.8.2";
+
+  src = fetchFromGitHub {
+    owner = "Cyan4973";
+    repo = "xxHash";
+    rev = "v${version}";
+    hash = "sha256-kofPs01jb189LUjYHHt+KxDifZQWl0Hm779711mvWtI=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  # Using unofficial CMake build script to install CMake module files.
+  cmakeDir = "../cmake_unofficial";
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
+  ];
+
+  meta = with lib; {
+    description = "Extremely fast hash algorithm";
+    longDescription = ''
+      xxHash is an Extremely fast Hash algorithm, running at RAM speed limits.
+      It successfully completes the SMHasher test suite which evaluates
+      collision, dispersion and randomness qualities of hash functions. Code is
+      highly portable, and hashes are identical on all platforms (little / big
+      endian).
+    '';
+    homepage = "https://github.com/Cyan4973/xxHash";
+    license = with licenses; [ bsd2 gpl2 ];
+    mainProgram = "xxhsum";
+    maintainers = with maintainers; [ orivej ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/xylib/default.nix b/nixpkgs/pkgs/development/libraries/xylib/default.nix
new file mode 100644
index 000000000000..ab2e3792eeab
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/xylib/default.nix
@@ -0,0 +1,33 @@
+{ lib
+, stdenv
+, fetchurl
+, boost
+, zlib
+, bzip2
+, wxGTK32
+}:
+
+stdenv.mkDerivation rec {
+  pname = "xylib";
+  version = "1.6";
+
+  src = fetchurl {
+    url = "https://github.com/wojdyr/xylib/releases/download/v${version}/${pname}-${version}.tar.bz2";
+    sha256 = "1iqfrfrk78mki5csxysw86zm35ag71w0jvim0f12nwq1z8rwnhdn";
+  };
+
+  buildInputs = [
+    boost
+    zlib
+    bzip2
+    wxGTK32
+  ];
+
+  meta = with lib; {
+    description = "Portable library for reading files that contain x-y data from powder diffraction, spectroscopy and other experimental methods";
+    license = licenses.lgpl21;
+    homepage = "https://xylib.sourceforge.net/";
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ pSub ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/yajl/cmake-shared-static-fix.patch b/nixpkgs/pkgs/development/libraries/yajl/cmake-shared-static-fix.patch
new file mode 100644
index 000000000000..05c8f19dacbc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/yajl/cmake-shared-static-fix.patch
@@ -0,0 +1,89 @@
+From 768be8b9f98e30a8bd2d51576be9dfcf2cb838ea Mon Sep 17 00:00:00 2001
+From: Kiskae <Kiskae@users.noreply.github.com>
+Date: Tue, 26 Sep 2023 20:53:00 +0200
+Subject: [PATCH] simplify compilation of static/shared with cmake
+
+Signed-off-by: Kiskae <Kiskae@users.noreply.github.com>
+---
+ CMakeLists.txt              | 2 ++
+ example/CMakeLists.txt      | 2 +-
+ perf/CMakeLists.txt         | 2 +-
+ src/CMakeLists.txt          | 7 ++-----
+ test/parsing/CMakeLists.txt | 2 +-
+ 5 files changed, 7 insertions(+), 8 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 471eee13..9af25203 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -16,6 +16,8 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+ 
+ PROJECT(YetAnotherJSONParser C)
+ 
++option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
++
+ SET (YAJL_MAJOR 2)
+ SET (YAJL_MINOR 1)
+ SET (YAJL_MICRO 1)
+diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt
+index 0a7f6220..62ddf14c 100644
+--- a/example/CMakeLists.txt
++++ b/example/CMakeLists.txt
+@@ -20,4 +20,4 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib)
+ 
+ ADD_EXECUTABLE(parse_config ${SRCS})
+ 
+-TARGET_LINK_LIBRARIES(parse_config yajl_s)
++TARGET_LINK_LIBRARIES(parse_config yajl)
+diff --git a/perf/CMakeLists.txt b/perf/CMakeLists.txt
+index b438d7a1..924a2681 100644
+--- a/perf/CMakeLists.txt
++++ b/perf/CMakeLists.txt
+@@ -20,4 +20,4 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib)
+ 
+ ADD_EXECUTABLE(perftest ${SRCS})
+ 
+-TARGET_LINK_LIBRARIES(perftest yajl_s)
++TARGET_LINK_LIBRARIES(perftest yajl)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 789ddf99..78875032 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -35,9 +35,7 @@ SET (pkgconfigDir ${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib/pkgconfig
+ # set the output path for libraries
+ SET(LIBRARY_OUTPUT_PATH ${libDir})
+ 
+-ADD_LIBRARY(yajl_s STATIC ${SRCS} ${HDRS} ${PUB_HDRS})
+-
+-ADD_LIBRARY(yajl SHARED ${SRCS} ${HDRS} ${PUB_HDRS})
++ADD_LIBRARY(yajl ${SRCS} ${HDRS} ${PUB_HDRS})
+ 
+ #### setup shared library version number
+ SET_TARGET_PROPERTIES(yajl PROPERTIES
+@@ -69,7 +67,7 @@ FOREACH (header ${PUB_HDRS})
+ 
+   EXEC_PROGRAM(${CMAKE_COMMAND} ARGS -E copy_if_different ${header} ${incDir})
+ 
+-  ADD_CUSTOM_COMMAND(TARGET yajl_s POST_BUILD
++  ADD_CUSTOM_COMMAND(TARGET yajl POST_BUILD
+       COMMAND ${CMAKE_COMMAND} -E copy_if_different ${header} ${incDir})
+ ENDFOREACH (header ${PUB_HDRS})
+ 
+@@ -81,7 +79,6 @@ INSTALL(TARGETS yajl
+         RUNTIME DESTINATION lib${LIB_SUFFIX}
+         LIBRARY DESTINATION lib${LIB_SUFFIX}
+         ARCHIVE DESTINATION lib${LIB_SUFFIX})
+-INSTALL(TARGETS yajl_s ARCHIVE DESTINATION lib${LIB_SUFFIX})
+ INSTALL(FILES ${PUB_HDRS} DESTINATION include/yajl)
+ INSTALL(FILES ${incDir}/yajl_version.h DESTINATION include/yajl)
+ INSTALL(FILES ${pkgconfigDir}/yajl.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig)
+diff --git a/test/parsing/CMakeLists.txt b/test/parsing/CMakeLists.txt
+index c22a3887..f445920d 100644
+--- a/test/parsing/CMakeLists.txt
++++ b/test/parsing/CMakeLists.txt
+@@ -20,4 +20,4 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../../${YAJL_DIST_NAME}/lib)
+ 
+ ADD_EXECUTABLE(yajl_test ${SRCS})
+ 
+-TARGET_LINK_LIBRARIES(yajl_test yajl_s)
++TARGET_LINK_LIBRARIES(yajl_test yajl)
diff --git a/nixpkgs/pkgs/development/libraries/yajl/default.nix b/nixpkgs/pkgs/development/libraries/yajl/default.nix
new file mode 100644
index 000000000000..dad884c24842
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/yajl/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchFromGitHub, cmake, which, testers }:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "yajl";
+  version = "unstable-2022-04-20";
+
+  src = fetchFromGitHub {
+    owner = "containers";
+    repo = "yajl";
+    rev = "49923ccb2143e36850bcdeb781e2bcdf5ce22f15";
+    hash = "sha256-9bMPA5FpyBp8fvG/kkT/MnhYtdqg3QzOnmDFXKwJVW0=";
+  };
+
+  patches = [
+    # https://github.com/containers/yajl/pull/1
+    ./cmake-shared-static-fix.patch
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  doCheck = true;
+  nativeCheckInputs = [ which ];
+
+  passthru = {
+    tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+  };
+
+  meta = {
+    description = "Yet Another JSON Library";
+    longDescription = ''
+      YAJL is a small event-driven (SAX-style) JSON parser written in ANSI
+      C, and a small validating JSON generator.
+    '';
+    homepage = "http://lloyd.github.com/yajl/";
+    license = lib.licenses.isc;
+    pkgConfigModules = [ "yajl" ];
+    platforms = with lib.platforms; linux ++ darwin;
+    maintainers = with lib.maintainers; [ maggesi ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/yaml-cpp/0.3.0.nix b/nixpkgs/pkgs/development/libraries/yaml-cpp/0.3.0.nix
new file mode 100644
index 000000000000..fad3397b74b6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/yaml-cpp/0.3.0.nix
@@ -0,0 +1,38 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "yaml-cpp";
+  version = "0.3.0";
+
+  src = fetchFromGitHub {
+    owner = "jbeder";
+    repo = "yaml-cpp";
+    rev = "release-${version}";
+    hash = "sha256-pmgcULTXhl83+Wc8ZsGebnJ1t0XybHhUEJxDnEZE5x8=";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  cmakeFlags = [
+    "-DYAML_CPP_BUILD_TOOLS=${lib.boolToString doCheck}"
+    "-DBUILD_SHARED_LIBS=${lib.boolToString (!stdenv.hostPlatform.isStatic)}"
+  ];
+
+  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
+
+  meta = with lib; {
+    description = "A YAML parser and emitter for C++";
+    homepage = "https://github.com/jbeder/yaml-cpp";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ OPNA2608 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/yaml-cpp/default.nix b/nixpkgs/pkgs/development/libraries/yaml-cpp/default.nix
new file mode 100644
index 000000000000..20d546e346b8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/yaml-cpp/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, gitUpdater
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "yaml-cpp";
+  version = "0.8.0";
+
+  src = fetchFromGitHub {
+    owner = "jbeder";
+    repo = "yaml-cpp";
+    rev = version;
+    hash = "sha256-J87oS6Az1/vNdyXu3L7KmUGWzU0IAkGrGMUUha+xDXI=";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  cmakeFlags = [
+    "-DYAML_CPP_BUILD_TOOLS=false"
+    "-DYAML_BUILD_SHARED_LIBS=${lib.boolToString (!stdenv.hostPlatform.isStatic)}"
+    "-DINSTALL_GTEST=false"
+  ];
+
+  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
+
+  passthru.updateScript = gitUpdater { };
+
+  meta = with lib; {
+    description = "A YAML parser and emitter for C++";
+    homepage = "https://github.com/jbeder/yaml-cpp";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ OPNA2608 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/yas/default.nix b/nixpkgs/pkgs/development/libraries/yas/default.nix
new file mode 100644
index 000000000000..b06d995007fa
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/yas/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenvNoCC, fetchFromGitHub }:
+
+stdenvNoCC.mkDerivation rec {
+  pname = "yas";
+  version = "7.1.0";
+
+  src = fetchFromGitHub {
+    owner = "niXman";
+    repo = "yas";
+    rev = version;
+    hash = "sha256-2+CpftWOEnntYBCc1IoR5eySbmhrMVunpUTZRdQ5I+A=";
+  };
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/include/yas
+    cp -r include/yas/* $out/include/yas
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/niXman/yas";
+    description = "Yet Another Serialization";
+    license = licenses.boost;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/yascreen/default.nix b/nixpkgs/pkgs/development/libraries/yascreen/default.nix
new file mode 100644
index 000000000000..d1b96ac3ebe3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/yascreen/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, go-md2man, fetchFromGitHub, fetchpatch }:
+
+stdenv.mkDerivation rec {
+  pname = "yascreen";
+  version = "1.86";
+
+  src = fetchFromGitHub {
+    owner = "bbonev";
+    repo = "yascreen";
+    rev = "v${version}";
+    sha256 = "sha256-z7j2yceiUyJNdyoVXAPiINln2/MUMqVJh+VwQnmzO2A=";
+  };
+
+  nativeBuildInputs = [ go-md2man ];
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/bbonev/yascreen/commit/a30b8fce66a3db9f1194fede30a48424ed3d696b.patch";
+      sha256 = "sha256-Bnaf3OVMlqyYMdGsJ6fF3oYsWT01FcjuRzxi6xfbnZg=";
+    })
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/bbonev/yascreen";
+    description = "Yet Another Screen Library (curses replacement for daemons and embedded apps)";
+    license = licenses.lgpl3;
+    maintainers = [ maintainers.arezvov ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/yder/default.nix b/nixpkgs/pkgs/development/libraries/yder/default.nix
new file mode 100644
index 000000000000..70105872ba77
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/yder/default.nix
@@ -0,0 +1,49 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, orcania
+, systemd
+, check
+, subunit
+, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
+}:
+
+stdenv.mkDerivation rec {
+  pname = "yder";
+  version = "1.4.20";
+
+  src = fetchFromGitHub {
+    owner = "babelouest";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-BaCF1r5mOYxj0zKc11uoKI9gVKuxWd8GaneGcV+qIFg=";
+  };
+
+  patches = [
+    # We set CMAKE_INSTALL_LIBDIR to the absolute path in $out, so
+    # prefix and exec_prefix cannot be $out, too
+    ./fix-pkgconfig.patch
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ orcania ]
+    ++ lib.optional withSystemd systemd;
+
+  nativeCheckInputs = [ check subunit ];
+
+  cmakeFlags = [
+    "-DBUILD_YDER_TESTING=on"
+  ] ++ lib.optional (!withSystemd) "-DWITH_JOURNALD=off";
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Logging library for C applications";
+    homepage = "https://github.com/babelouest/yder";
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ johnazoidberg ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/yder/fix-pkgconfig.patch b/nixpkgs/pkgs/development/libraries/yder/fix-pkgconfig.patch
new file mode 100644
index 000000000000..f68ce2a0213e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/yder/fix-pkgconfig.patch
@@ -0,0 +1,13 @@
+--- a/libyder.pc.in
++++ b/libyder.pc.in
+@@ -1,7 +1,5 @@
+-prefix=@CMAKE_INSTALL_PREFIX@
+-exec_prefix=@CMAKE_INSTALL_PREFIX@
+-libdir=@PKGCONFIG_TARGET_LIBDIR@
+-includedir=@PKGCONFIG_TARGET_INCLUDES@
++libdir=@CMAKE_INSTALL_LIBDIR@
++includedir=@CMAKE_INSTALL_LIBDIR@
+
+ Name: @PROJECT_NAME@
+ Description: @PROJECT_DESCRIPTION@
+
diff --git a/nixpkgs/pkgs/development/libraries/yojimbo/default.nix b/nixpkgs/pkgs/development/libraries/yojimbo/default.nix
new file mode 100644
index 000000000000..d8c29e56aaab
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/yojimbo/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchFromGitHub, premake5, doxygen, libsodium, mbedtls_2 }:
+
+stdenv.mkDerivation {
+  pname = "yojimbo";
+  version = "1.1";
+
+  src = fetchFromGitHub {
+    owner = "networkprotocol";
+    repo = "yojimbo";
+    rev = "e02219c102d9b440290539036992d77608eab3b0";
+    sha256 = "0jn25ddv73hwjals883a910m66kwj6glxxhnmn96bpzsvsaimnkr";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ premake5 doxygen ];
+  propagatedBuildInputs = [ libsodium mbedtls_2 ];
+
+  postBuild = ''
+    premake5 docs
+  '';
+
+  installPhase = ''
+    install -Dm555 -t $out/lib bin/libyojimbo.a
+    install -Dm444 -t $out/include yojimbo.h
+    mkdir -p $out/share/doc/yojimbo
+    cp -r docs/html $out/share/doc/yojimbo
+  '';
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "A network library for client/server games with dedicated servers";
+    longDescription = ''
+      yojimbo is a network library for client/server games with dedicated servers.
+      It's designed around the networking requirements of competitive multiplayer games like first person shooters.
+      As such it provides a time critical networking layer on top of UDP, with a client/server architecture supporting up to 64 players per-dedicated server instance.
+    '';
+    homepage = "https://github.com/networkprotocol/yojimbo";
+    license = licenses.bsd3;
+    platforms = platforms.x86_64;
+    maintainers = with maintainers; [ paddygord ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/yubico-pam/default.nix b/nixpkgs/pkgs/development/libraries/yubico-pam/default.nix
new file mode 100644
index 000000000000..e417de5e1ff0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/yubico-pam/default.nix
@@ -0,0 +1,34 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+, asciidoc
+, libxslt
+, docbook_xsl
+, pam
+, yubikey-personalization
+, libyubikey
+, libykclient
+}:
+
+stdenv.mkDerivation rec {
+  pname = "yubico-pam";
+  version = "2.27";
+  src = fetchFromGitHub {
+    owner = "Yubico";
+    repo = pname;
+    rev = version;
+    sha256 = "0hb773zlf11xz4bwmsqv2mq5d4aq2g0crdr5cp9xwc4ivi5gd4kg";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config asciidoc libxslt docbook_xsl ];
+  buildInputs = [ pam yubikey-personalization libyubikey libykclient ];
+
+  meta = with lib; {
+    description = "Yubico PAM module";
+    homepage = "https://developers.yubico.com/yubico-pam";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ dtzWill ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/yyjson/default.nix b/nixpkgs/pkgs/development/libraries/yyjson/default.nix
new file mode 100644
index 000000000000..7fe163362864
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/yyjson/default.nix
@@ -0,0 +1,29 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "yyjson";
+  version = "0.8.0";
+
+  src = fetchFromGitHub {
+    owner = "ibireme";
+    repo = "yyjson";
+    rev = finalAttrs.version;
+    hash = "sha256-uAh/AUUDudQr+1+3YLkg9KxARgvKWxfDZlqo8388nFY=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  meta = with lib; {
+    description = "The fastest JSON library in C";
+    homepage = "https://github.com/ibireme/yyjson";
+    changelog = "https://github.com/ibireme/yyjson/blob/${finalAttrs.src.rev}/CHANGELOG.md";
+    license = licenses.mit;
+    maintainers = with maintainers; [ federicoschonborn ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/zchunk/default.nix b/nixpkgs/pkgs/development/libraries/zchunk/default.nix
new file mode 100644
index 000000000000..dd35961d085f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/zchunk/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, argp-standalone
+, curl
+, meson
+, ninja
+, pkg-config
+, zstd
+}:
+
+stdenv.mkDerivation rec {
+  pname = "zchunk";
+  version = "1.4.0";
+
+  src = fetchFromGitHub {
+    owner = "zchunk";
+    repo = pname;
+    rev = version;
+    hash = "sha256-GiZM8Jh+v0US8xr90rySY0Ud3eAAl8UqLi162zDR3qw=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+  ];
+
+  buildInputs = [
+    curl
+    zstd
+  ] ++ lib.optional stdenv.isDarwin argp-standalone;
+
+  outputs = [ "out" "lib" "dev" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/zchunk/zchunk";
+    description = "File format designed for highly efficient deltas while maintaining good compression";
+    longDescription = ''
+      zchunk is a compressed file format that splits the file into independent
+      chunks. This allows you to only download changed chunks when downloading a
+      new version of the file, and also makes zchunk files efficient over rsync.
+
+      zchunk files are protected with strong checksums to verify that the file
+      you downloaded is, in fact, the file you wanted.
+    '';
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/zeitgeist/default.nix b/nixpkgs/pkgs/development/libraries/zeitgeist/default.nix
new file mode 100644
index 000000000000..d5e058ef726e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/zeitgeist/default.nix
@@ -0,0 +1,81 @@
+{ stdenv
+, lib
+, fetchFromGitLab
+, pkg-config
+, glib
+, sqlite
+, gobject-introspection
+, vala
+, autoconf
+, automake
+, libtool
+, gettext
+, dbus
+, gtk3
+, json-glib
+, librdf_raptor2
+, pythonSupport ? true
+, python3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "zeitgeist";
+  version = "1.0.4";
+
+  outputs = [ "out" "lib" "dev" "man" ] ++ lib.optional pythonSupport "py";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = pname;
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "kG1N8DXgjYAJ8fbrGHsp7eTqB20H5smzRnW0PSRUYR0=";
+  };
+
+  nativeBuildInputs = [
+    autoconf
+    automake
+    libtool
+    pkg-config
+    gettext
+    gobject-introspection
+    vala
+    python3
+  ];
+
+  buildInputs = [
+    glib
+    sqlite
+    dbus
+    gtk3
+    json-glib
+    librdf_raptor2
+    python3.pkgs.rdflib
+  ];
+
+  configureFlags = [
+    "--disable-telepathy"
+  ];
+
+  enableParallelBuilding = true;
+
+  postPatch = ''
+    patchShebangs data/ontology2code
+  '';
+
+  preConfigure = ''
+    NOCONFIGURE=1 ./autogen.sh
+  '';
+
+  postFixup = lib.optionalString pythonSupport ''
+    moveToOutput lib/${python3.libPrefix} "$py"
+  '';
+
+  meta = with lib; {
+    description = "A service which logs the users’s activities and events";
+    homepage = "https://zeitgeist.freedesktop.org/";
+    maintainers = teams.freedesktop.members ++ (with maintainers; [ ]);
+    license = licenses.lgpl21Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/zeroc-ice/default.nix b/nixpkgs/pkgs/development/libraries/zeroc-ice/default.nix
new file mode 100644
index 000000000000..f62dec911d81
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/zeroc-ice/default.nix
@@ -0,0 +1,83 @@
+{ stdenv, lib, fetchFromGitHub
+, bzip2, expat, libedit, lmdb, openssl, libxcrypt
+, python3 # for tests only
+, cpp11 ? false
+}:
+
+let
+  zeroc_mcpp = stdenv.mkDerivation rec {
+    pname = "zeroc-mcpp";
+    version = "2.7.2.14";
+
+    src = fetchFromGitHub {
+      owner = "zeroc-ice";
+      repo = "mcpp";
+      rev = "v${version}";
+      sha256 = "1psryc2ql1cp91xd3f8jz84mdaqvwzkdq2pr96nwn03ds4cd88wh";
+    };
+
+    configureFlags = [ "--enable-mcpplib" ];
+    installFlags = [ "PREFIX=$(out)" ];
+  };
+
+in stdenv.mkDerivation rec {
+  pname = "zeroc-ice";
+  version = "3.7.7";
+
+  src = fetchFromGitHub {
+    owner = "zeroc-ice";
+    repo = "ice";
+    rev = "v${version}";
+    sha256 = "sha256-h455isEmnRyoasXhh1UaA5PICcEEM8/C3IJf5yHRl5g=";
+  };
+
+  buildInputs = [ zeroc_mcpp bzip2 expat libedit lmdb openssl libxcrypt ];
+
+  preBuild = ''
+    makeFlagsArray+=(
+      "prefix=$out"
+      "OPTIMIZE=yes"
+      "USR_DIR_INSTALL=yes"
+      "LANGUAGES=cpp"
+      "CONFIGS=${if cpp11 then "cpp11-shared" else "shared"}"
+      "SKIP=slice2py" # provided by a separate package
+    )
+  '';
+
+  enableParallelBuilding = true;
+
+  outputs = [ "out" "bin" "dev" ];
+
+  doCheck = true;
+  nativeCheckInputs = with python3.pkgs; [ passlib ];
+  checkPhase = with lib; let
+    # these tests require network access so we need to skip them.
+    brokenTests = map escapeRegex [
+      "Ice/udp" "Glacier2" "IceGrid/simple" "IceStorm" "IceDiscovery/simple"
+
+      # FIXME: certificate expired, remove for next release?
+      "IceSSL/configuration"
+    ];
+    # matches CONFIGS flag in makeFlagsArray
+    configFlag = optionalString cpp11 "--config=cpp11-shared";
+  in ''
+    runHook preCheck
+    ${python3.interpreter} ./cpp/allTests.py ${configFlag} --rfilter='${concatStringsSep "|" brokenTests}'
+    runHook postCheck
+  '';
+
+  postInstall = ''
+    mkdir -p $bin $dev/share
+    mv $out/bin $bin
+    mv $out/share/ice $dev/share
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.zeroc.com/ice.html";
+    description = "The internet communications engine";
+    license = licenses.gpl2Only;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ abbradar ];
+    broken = stdenv.isDarwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/zeromq/4.x.nix b/nixpkgs/pkgs/development/libraries/zeromq/4.x.nix
new file mode 100644
index 000000000000..2a4119e0fe22
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/zeromq/4.x.nix
@@ -0,0 +1,43 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, asciidoc
+, pkg-config
+, libsodium
+, enableDrafts ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "zeromq";
+  version = "4.3.5";
+
+  src = fetchFromGitHub {
+    owner = "zeromq";
+    repo = "libzmq";
+    rev = "v${version}";
+    sha256 = "sha256-q2h5y0Asad+fGB9haO4Vg7a1ffO2JSb7czzlhmT3VmI=";
+  };
+
+  nativeBuildInputs = [ cmake asciidoc pkg-config ];
+  buildInputs = [ libsodium ];
+
+  doCheck = false; # fails all the tests (ctest)
+
+  cmakeFlags = lib.optional enableDrafts "-DENABLE_DRAFTS=ON";
+
+  postPatch = ''
+    substituteInPlace CMakeLists.txt \
+      --replace '$'{prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
+      --replace '$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
+  '';
+
+  meta = with lib; {
+    branch = "4";
+    homepage = "http://www.zeromq.org";
+    description = "The Intelligent Transport Layer";
+    license = licenses.mpl20;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ fpletz ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/zimg/default.nix b/nixpkgs/pkgs/development/libraries/zimg/default.nix
new file mode 100644
index 000000000000..dbd6c9582dd7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/zimg/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "zimg";
+  version = "3.0.5";
+
+  src = fetchFromGitHub {
+    owner  = "sekrit-twc";
+    repo   = "zimg";
+    rev    = "release-${version}";
+    sha256 = "sha256-DCSqHCnOyIvKtIAfprb8tgtzLn67Ix6BWyeIliu0HO4=";
+  };
+
+  outputs = [ "out" "dev" "doc" ];
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Scaling, colorspace conversion and dithering library";
+    homepage    = "https://github.com/sekrit-twc/zimg";
+    license     = licenses.wtfpl;
+    platforms   = with platforms; unix ++ windows;
+    maintainers = with maintainers; [ rnhmjoj ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/zimlib/default.nix b/nixpkgs/pkgs/development/libraries/zimlib/default.nix
new file mode 100644
index 000000000000..40f8e670b526
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/zimlib/default.nix
@@ -0,0 +1,63 @@
+{ lib, stdenv, fetchFromGitHub, fetchzip
+, meson, ninja, pkg-config
+, python3
+, icu
+, libuuid
+, xapian
+, xz
+, zstd
+, gtest
+}:
+
+stdenv.mkDerivation rec {
+  pname = "zimlib";
+  version = "8.2.0";
+
+  src = fetchFromGitHub {
+    owner = "openzim";
+    repo = "libzim";
+    rev = version;
+    sha256 = "sha256-ab7UUF+I0/xaGChvdjylEQRHLOjmtg/wk+/JEGehGLE=";
+  };
+
+  testData = fetchzip rec {
+    passthru.version = "0.4";
+    url = "https://github.com/openzim/zim-testing-suite/releases/download/v${passthru.version}/zim-testing-suite-${passthru.version}.tar.gz";
+    sha256 = "sha256-2eJqmvs/GrvOD/pq8dTubaiO9ZpW2WqTNQByv354Z0w=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    pkg-config
+    ninja
+    python3
+  ];
+
+  propagatedBuildInputs = [
+    icu
+    libuuid
+    xapian
+    xz
+    zstd
+  ];
+
+  postPatch = ''
+    patchShebangs scripts
+  '';
+
+  mesonFlags = [  "-Dtest_data_dir=${testData}" ];
+
+  nativeCheckInputs = [
+    gtest
+  ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Library for reading and writing ZIM files";
+    homepage =  "https://www.openzim.org/wiki/Zimlib";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ greg ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/zint/default.nix b/nixpkgs/pkgs/development/libraries/zint/default.nix
new file mode 100644
index 000000000000..8ba4a68e4b82
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/zint/default.nix
@@ -0,0 +1,58 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, wrapQtAppsHook
+, cmake
+, qtbase
+, qtsvg
+, qttools
+, testers
+, zint
+}:
+
+stdenv.mkDerivation rec {
+  pname = "zint";
+  version = "2.13.0";
+
+  src = fetchFromGitHub {
+    owner = "zint";
+    repo = "zint";
+    rev = version;
+    hash = "sha256-/ILq/7A8Lffe2NuiABiV3KeYXapuL1SO55Qk3wXfC/8=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake wrapQtAppsHook ];
+
+  buildInputs = [ qtbase qtsvg qttools ];
+
+  cmakeFlags = [ "-DZINT_QT6:BOOL=ON" ];
+
+  postInstall = ''
+    install -Dm644 -t $out/share/applications $src/zint-qt.desktop
+    install -Dm644 -t $out/share/pixmaps $src/zint-qt.png
+    install -Dm644 -t $out/share/icons/hicolor/scalable/apps $src/frontend_qt/images/scalable/zint-qt.svg
+  '';
+
+  passthru.tests.version = testers.testVersion {
+    package = zint;
+    command = "zint --version";
+    inherit version;
+  };
+
+  meta = with lib; {
+    description = "A barcode generating tool and library";
+    longDescription = ''
+      The Zint project aims to provide a complete cross-platform open source
+      barcode generating solution. The package currently consists of a Qt based
+      GUI, a CLI command line executable and a library with an API to allow
+      developers access to the capabilities of Zint.
+    '';
+    homepage = "https://www.zint.org.uk";
+    changelog = "https://github.com/zint/zint/blob/${version}/ChangeLog";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ azahi ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/zlib-ng/default.nix b/nixpkgs/pkgs/development/libraries/zlib-ng/default.nix
new file mode 100644
index 000000000000..c4d2aa2c5334
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/zlib-ng/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchFromGitHub
+, cmake, pkg-config, gtest
+, withZlibCompat ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "zlib-ng";
+  version = "2.1.6";
+
+  src = fetchFromGitHub {
+    owner = "zlib-ng";
+    repo = "zlib-ng";
+    rev = version;
+    hash = "sha256-Auu7DS4qNm9/8t/nCjEJBaXfPPxA18oZr2qqybVY4Es=";
+  };
+
+  outputs = [ "out" "dev" "bin" ];
+
+  strictDeps = true;
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [ gtest ];
+
+  cmakeFlags = [
+    "-DCMAKE_INSTALL_PREFIX=/"
+    "-DBUILD_SHARED_LIBS=ON"
+    "-DINSTALL_UTILS=ON"
+  ] ++ lib.optionals withZlibCompat [ "-DZLIB_COMPAT=ON" ];
+
+  meta = with lib; {
+    description = "zlib data compression library for the next generation systems";
+    homepage    = "https://github.com/zlib-ng/zlib-ng";
+    license     = licenses.zlib;
+    platforms   = platforms.all;
+    maintainers = with maintainers; [ izorkin ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/zlib/default.nix b/nixpkgs/pkgs/development/libraries/zlib/default.nix
new file mode 100644
index 000000000000..687fb3598444
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/zlib/default.nix
@@ -0,0 +1,145 @@
+{ lib, stdenv
+, fetchurl
+, shared ? !stdenv.hostPlatform.isStatic
+, static ? true
+# If true, a separate .static ouput is created and the .a is moved there.
+# In this case `pkg-config` auto detection does not currently work if the
+# .static output is given as `buildInputs` to another package (#66461), because
+# the `.pc` file lists only the main output's lib dir.
+# If false, and if `{ static = true; }`, the .a stays in the main output.
+, splitStaticOutput ? shared && static
+, testers
+, minizip
+}:
+
+# Without either the build will actually still succeed because the build
+# system makes an arbitrary choice, but we shouldn't be so indecisive.
+assert shared || static;
+
+# 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.
+
+assert splitStaticOutput -> static;
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "zlib";
+  version = "1.3.1";
+
+  src = let
+    inherit (finalAttrs) version;
+  in fetchurl {
+    urls = [
+      # This URL works for 1.2.13 only; hopefully also for future releases.
+      "https://github.com/madler/zlib/releases/download/v${version}/zlib-${version}.tar.gz"
+      # Stable archive path, but captcha can be encountered, causing hash mismatch.
+      "https://www.zlib.net/fossils/zlib-${version}.tar.gz"
+    ];
+    hash = "sha256-mpOyt9/ax3zrpaVYpYDnRmfdb+3kWFuR7vtg8Dty3yM=";
+  };
+
+  postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
+    substituteInPlace configure \
+      --replace '/usr/bin/libtool' '${stdenv.cc.targetPrefix}ar' \
+      --replace 'AR="libtool"' 'AR="${stdenv.cc.targetPrefix}ar"' \
+      --replace 'ARFLAGS="-o"' 'ARFLAGS="-r"'
+  '';
+
+  strictDeps = true;
+  outputs = [ "out" "dev" ]
+    ++ lib.optional splitStaticOutput "static";
+  setOutputFlags = false;
+  outputDoc = "dev"; # single tiny man3 page
+
+  dontConfigure = stdenv.hostPlatform.isMinGW;
+
+  preConfigure = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
+    export CHOST=${stdenv.hostPlatform.config}
+  '';
+
+  # For zlib's ./configure (as of version 1.2.11), the order
+  # of --static/--shared flags matters!
+  # `--shared --static` builds only static libs, while
+  # `--static --shared` builds both.
+  # So we use the latter order to be able to build both.
+  # Also, giving just `--shared` builds both,
+  # giving just `--static` builds only static,
+  # and giving nothing builds both.
+  # So we have 3 possible ways to build both:
+  # `--static --shared`, `--shared` and giving nothing.
+  # Of these, we choose `--static --shared`, for clarity and simpler
+  # conditions.
+  configureFlags = lib.optional static "--static"
+                   ++ lib.optional shared "--shared";
+  # We do the right thing manually, above, so don't need these.
+  dontDisableStatic = true;
+  dontAddStaticConfigureFlags = true;
+
+  # Note we don't need to set `dontDisableStatic`, because static-disabling
+  # works by grepping for `enable-static` in the `./configure` script
+  # (see `pkgs/stdenv/generic/setup.sh`), and zlib's handwritten one does
+  # not have such.
+  # It wouldn't hurt setting `dontDisableStatic = static && !splitStaticOutput`
+  # here (in case zlib ever switches to autoconf in the future),
+  # but we don't do it simply to avoid mass rebuilds.
+
+  postInstall = lib.optionalString splitStaticOutput ''
+    moveToOutput lib/libz.a "$static"
+  ''
+    # jww (2015-01-06): Sometimes this library install as a .so, even on
+    # Darwin; others time it installs as a .dylib.  I haven't yet figured out
+    # what causes this difference.
+  + lib.optionalString stdenv.hostPlatform.isDarwin ''
+    for file in $out/lib/*.so* $out/lib/*.dylib* ; do
+      ${stdenv.cc.bintools.targetPrefix}install_name_tool -id "$file" $file
+    done
+  ''
+    # Non-typical naming confuses libtool which then refuses to use zlib's DLL
+    # in some cases, e.g. when compiling libpng.
+  + lib.optionalString (stdenv.hostPlatform.isMinGW && shared) ''
+    ln -s zlib1.dll $out/bin/libz.dll
+  '';
+
+  # As zlib takes part in the stdenv building, we don't want references
+  # to the bootstrap-tools libgcc (as uses to happen on arm/mips)
+  env.NIX_CFLAGS_COMPILE = lib.optionalString (!stdenv.hostPlatform.isDarwin) "-static-libgcc";
+
+  # We don't strip on static cross-compilation because of reports that native
+  # stripping corrupted the target library; see commit 12e960f5 for the report.
+  dontStrip = stdenv.hostPlatform != stdenv.buildPlatform && static;
+  configurePlatforms = [];
+
+  installFlags = lib.optionals stdenv.hostPlatform.isMinGW [
+    "BINARY_PATH=$(out)/bin"
+    "INCLUDE_PATH=$(dev)/include"
+    "LIBRARY_PATH=$(out)/lib"
+  ];
+
+  enableParallelBuilding = true;
+  doCheck = true;
+
+  makeFlags = [
+    "PREFIX=${stdenv.cc.targetPrefix}"
+  ] ++ lib.optionals stdenv.hostPlatform.isMinGW [
+    "-f" "win32/Makefile.gcc"
+  ] ++ lib.optionals shared [
+    # Note that as of writing (zlib 1.2.11), this flag only has an effect
+    # for Windows as it is specific to `win32/Makefile.gcc`.
+    "SHARED_MODE=1"
+  ];
+
+  passthru.tests = {
+    pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+    # uses `zlib` derivation:
+    inherit minizip;
+  };
+
+  meta = with lib; {
+    homepage = "https://zlib.net";
+    description = "Lossless data-compression library";
+    license = licenses.zlib;
+    platforms = platforms.all;
+    pkgConfigModules = [ "zlib" ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/zlog/default.nix b/nixpkgs/pkgs/development/libraries/zlog/default.nix
new file mode 100644
index 000000000000..4baa18b9d46f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/zlog/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  version = "1.2.17";
+  pname = "zlog";
+
+  src = fetchFromGitHub {
+    owner = "HardySimpson";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-ckpDMRLxObpl8N539DC5u2bPpmD7jM+KugurUfta6tg=";
+  };
+
+  makeFlags = [ "PREFIX=${placeholder "out"}" ];
+
+  meta = with lib; {
+    description= "Reliable, high-performance, thread safe, flexible, clear-model, pure C logging library";
+    homepage = "https://hardysimpson.github.io/zlog/";
+    license = licenses.lgpl21;
+    maintainers = [ maintainers.matthiasbeyer ];
+    mainProgram = "zlog-chk-conf";
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/zmqpp/default.nix b/nixpkgs/pkgs/development/libraries/zmqpp/default.nix
new file mode 100644
index 000000000000..733573b3e237
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/zmqpp/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, zeromq }:
+
+stdenv.mkDerivation rec {
+  pname = "zmqpp";
+  version = "4.2.0";
+
+  src = fetchFromGitHub {
+    owner = "zeromq";
+    repo = "zmqpp";
+    rev = version;
+    sha256 = "08v34q3sd8g1b95k73n7jwryb0xzwca8ib9dz8ngczqf26j8k72i";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  propagatedBuildInputs = [ zeromq ];
+
+  meta = with lib; {
+    inherit (src.meta) homepage;
+    description = "C++ wrapper for czmq. Aims to be minimal, simple and consistent";
+    license = licenses.lgpl3;
+    platforms = platforms.linux ++ platforms.darwin;
+    maintainers = with maintainers; [ chris-martin ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/zmusic/default.nix b/nixpkgs/pkgs/development/libraries/zmusic/default.nix
new file mode 100644
index 000000000000..e950c6ed3d7f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/zmusic/default.nix
@@ -0,0 +1,69 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, alsa-lib
+, cmake
+, fluidsynth
+, libsndfile
+, mpg123
+, ninja
+, pkg-config
+, soundfont-fluid
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "zmusic";
+  version = "1.1.12";
+
+  src = fetchFromGitHub {
+    owner = "ZDoom";
+    repo = "ZMusic";
+    rev = version;
+    hash = "sha256-waxgn4Dg8One2Hv7J2efMoYo5mmaMSMiPQSNq57kbvE=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    (fetchpatch {
+      name = "system-fluidsynth.patch";
+      url = "https://git.alpinelinux.org/aports/plain/testing/zmusic/system-fluidsynth.patch?id=59bac94da374cb01bc2a0e49d9e9287812fa1ac0";
+      hash = "sha256-xKaqiNk1Kt9yNLB22IVmSEtGeOtxrCi7YtFCmhNr0MI=";
+    })
+  ];
+
+  postPatch = ''
+    substituteInPlace source/mididevices/music_fluidsynth_mididevice.cpp \
+      --replace "/usr/share/sounds/sf2" "${soundfont-fluid}/share/soundfonts" \
+      --replace "FluidR3_GM.sf2" "FluidR3_GM2-2.sf2"
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    ninja
+    pkg-config
+  ];
+
+  buildInputs = [
+    alsa-lib
+    fluidsynth
+    libsndfile
+    mpg123
+    zlib
+  ];
+
+  meta = with lib; {
+    description = "GZDoom's music system as a standalone library";
+    homepage = "https://github.com/ZDoom/ZMusic";
+    license = with licenses; [
+      free
+      gpl3Plus
+      lgpl21Plus
+      lgpl3Plus
+    ];
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ azahi lassulus ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/zookeeper_mt/default.nix b/nixpkgs/pkgs/development/libraries/zookeeper_mt/default.nix
new file mode 100644
index 000000000000..ce539d9eb1c0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/zookeeper_mt/default.nix
@@ -0,0 +1,56 @@
+{ lib, stdenv
+, fetchurl
+, autoreconfHook
+, jre
+, openssl
+, pkg-config
+# We depend on ZooKeeper for the Jute compiler.
+, zookeeper
+}:
+
+stdenv.mkDerivation rec {
+  pname = "zookeeper_mt";
+  version = lib.getVersion zookeeper;
+
+  src = fetchurl {
+    url = "mirror://apache/zookeeper/${zookeeper.pname}-${version}/apache-${zookeeper.pname}-${version}.tar.gz";
+    hash = "sha512-V1SFPtSytFZMyiR/cgwLA9zPUK5xuarP3leQCQiSfelUHnYMB+R6ZQfSHMHD9t+URvLc+KRFSriLTzethspkpA==";
+  };
+
+  sourceRoot = "apache-${zookeeper.pname}-${version}/zookeeper-client/zookeeper-client-c";
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+    jre
+  ];
+
+  buildInputs = [
+    openssl
+    zookeeper
+  ];
+
+  # Generate the C marshallers/unmarshallers for the Jute-encoded
+  # definitions.
+  preConfigure = ''
+    mkdir generated
+    cd generated
+    java -cp ${zookeeper}/lib/${zookeeper.pname}-jute-${version}.jar \
+        org.apache.jute.compiler.generated.Rcc -l c \
+        ../../../zookeeper-jute/src/main/resources/zookeeper.jute
+    cd ..
+  '';
+
+  configureFlags = [
+    # We're not going to start test servers in the sandbox anyway.
+    "--without-cppunit"
+  ];
+
+  meta = with lib; {
+    homepage = "https://zookeeper.apache.org";
+    description = "Apache Zookeeper";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ commandodev ztzg ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/zxcvbn-c/default.nix b/nixpkgs/pkgs/development/libraries/zxcvbn-c/default.nix
new file mode 100644
index 000000000000..528d545c37c6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/zxcvbn-c/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchFromGitHub }:
+stdenv.mkDerivation rec {
+  pname = "zxcvbn-c";
+  version = "2.5";
+
+  src = fetchFromGitHub {
+    owner = "tsyrogit";
+    repo = "zxcvbn-c";
+    rev = "v${version}";
+    sha256 = "sha256-RKqbv0iGkjS7Y7KikqglZ+AK1oiw4G1mB2Zg87tOlbI=";
+  };
+
+  installPhase = ''
+    install -D -t $out/lib libzxcvbn.so*
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/tsyrogit/zxcvbn-c";
+    description = "A C/C++ implementation of the zxcvbn password strength estimation";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ xurei ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/zxing-cpp/default.nix b/nixpkgs/pkgs/development/libraries/zxing-cpp/default.nix
new file mode 100644
index 000000000000..cd5d10551192
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/zxing-cpp/default.nix
@@ -0,0 +1,56 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, python3
+, gitUpdater
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "zxing-cpp";
+  version = "2.2.1";
+
+  src = fetchFromGitHub {
+    owner = "zxing-cpp";
+    repo = "zxing-cpp";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-teFspdATn9M7Z1vSr/7PdJx/xAv+TVai8rIekxqpBZk=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_EXAMPLES=OFF"
+    "-DBUILD_BLACKBOX_TESTS=OFF"
+  ];
+
+  passthru = {
+    tests = {
+      inherit (python3.pkgs) zxing-cpp;
+    };
+    updateScript = gitUpdater {
+      rev-prefix = "v";
+    };
+  };
+
+  meta = {
+    homepage = "https://github.com/zxing-cpp/zxing-cpp";
+    description = "C++ port of zxing (a Java barcode image processing library)";
+    longDescription = ''
+      ZXing-C++ ("zebra crossing") is an open-source, multi-format 1D/2D barcode
+      image processing library implemented in C++.
+
+      It was originally ported from the Java ZXing Library but has been
+      developed further and now includes many improvements in terms of quality
+      and performance. It can both read and write barcodes in a number of
+      formats.
+    '';
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ AndersonTorres lukegb ];
+    platforms = lib.platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/zydis/default.nix b/nixpkgs/pkgs/development/libraries/zydis/default.nix
new file mode 100644
index 000000000000..16379f63c9b2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/zydis/default.nix
@@ -0,0 +1,43 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, callPackage
+, cmake
+, python3
+}:
+
+let
+  zycore = callPackage ./zycore.nix {
+    inherit stdenv fetchFromGitHub cmake;
+  };
+in
+stdenv.mkDerivation rec {
+  pname = "zydis";
+  version = "4.1.0";
+
+  src = fetchFromGitHub {
+    owner = "zyantific";
+    repo = "zydis";
+    rev = "v${version}";
+    hash = "sha256-akusu0T7q5RX4KGtjRqqOFpW5i9Bd1L4RVZt8Rg3PJY=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ zycore ];
+  cmakeFlags = [
+    "-DCMAKE_INSTALL_LIBDIR=lib"
+    "-DCMAKE_INSTALL_INCLUDEDIR=include"
+  ];
+
+  doCheck = true;
+  nativeCheckInputs = [ python3 ];
+  passthru = { inherit zycore; };
+
+  meta = with lib; {
+    homepage = "https://zydis.re/";
+    description = "Fast and lightweight x86/x86-64 disassembler library";
+    license = licenses.mit;
+    maintainers = with maintainers; [ jbcrail AndersonTorres athre0z ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/zydis/zycore.nix b/nixpkgs/pkgs/development/libraries/zydis/zycore.nix
new file mode 100644
index 000000000000..a070f761677d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/zydis/zycore.nix
@@ -0,0 +1,25 @@
+{ stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "zycore";
+  version = "1.5.0";
+
+  src = fetchFromGitHub {
+    owner = "zyantific";
+    repo = "zycore-c";
+    rev = "v${version}";
+    hash = "sha256-Kz51EIaw4RwrOKXhuDXAFieGF1mS+HL06gEuj+cVJmk=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  # The absolute paths set by the Nix CMake build manager confuse
+  # Zycore's config generation (which appends them to the package path).
+  cmakeFlags = [
+    "-DCMAKE_INSTALL_LIBDIR=lib"
+    "-DCMAKE_INSTALL_INCLUDEDIR=include"
+  ];
+}
diff --git a/nixpkgs/pkgs/development/libraries/zziplib/default.nix b/nixpkgs/pkgs/development/libraries/zziplib/default.nix
new file mode 100644
index 000000000000..e90df0888a0d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/zziplib/default.nix
@@ -0,0 +1,86 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, perl
+, pkg-config
+, python3
+, xmlto
+, zip
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "zziplib";
+  version = "0.13.72";
+
+  src = fetchFromGitHub {
+    owner = "gdraheim";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-Ht3fBgdrTm4mCi5uhgQPNtpGzADoRVOpSuGPsIS6y0Q=";
+  };
+
+  patches = [
+    # apply https://github.com/gdraheim/zziplib/pull/113
+    (fetchpatch {
+      url = "https://github.com/gdraheim/zziplib/commit/82a7773cd17828a3b0a4f5f552ae80c1cc8777c7.diff";
+      sha256 = "0ifqdzxwb5d19mziy9j6lhl8wj95jpxzm0d2c6y3bgwa931avd3y";
+    })
+    (fetchpatch {
+      url = "https://github.com/gdraheim/zziplib/commit/1cd611514c5f9559eb9dfc191d678dfc991f66db.diff";
+      sha256 = "11w9qa46xq49l113k266dnv8izzdk1fq4y54yy5w8zps8zd3xfny";
+    })
+    (fetchpatch {
+      url = "https://github.com/gdraheim/zziplib/commit/e47b1e1da952a92f917db6fb19485b8a0b1a42f3.diff";
+      sha256 = "0d032hkmi3s3db12z2zbppl2swa3gdpbj0c6w13ylv2g2ixglrwg";
+    })
+    # Fixes invalid pointer conversions that cause compilation to fail with clang 15+
+    (fetchpatch {
+      url = "https://github.com/gdraheim/zziplib/commit/38e4d5f561318fa825e6544c2ef55ac5899c81b0.diff";
+      sha256 = "sha256-VJuFyiPhuAZlDxmNHBty+JbYwG85ea5u2sv7HZRHMwo=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    perl
+    pkg-config
+    python3
+    xmlto
+    zip
+  ];
+  buildInputs = [
+    zlib
+  ];
+
+  # test/zziptests.py requires network access
+  # (https://github.com/gdraheim/zziplib/issues/24)
+  cmakeFlags = [
+    "-DZZIP_TESTCVE=OFF"
+    "-DBUILD_SHARED_LIBS=True"
+    "-DBUILD_STATIC_LIBS=False"
+    "-DBUILD_TESTS=OFF"
+    "-DMSVC_STATIC_RUNTIME=OFF"
+    "-DZZIPSDL=OFF"
+    "-DZZIPTEST=OFF"
+    "-DZZIPWRAP=OFF"
+    "-DBUILDTESTS=OFF"
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/gdraheim/zziplib";
+    description = "Library to extract data from files archived in a zip file";
+    longDescription = ''
+      The zziplib library is intentionally lightweight, it offers the ability to
+      easily extract data from files archived in a single zip file.
+      Applications can bundle files into a single zip archive and access them.
+      The implementation is based only on the (free) subset of compression with
+      the zlib algorithm which is actually used by the zip/unzip tools.
+    '';
+    license = with licenses; [ lgpl2Plus mpl11 ];
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.unix;
+  };
+}