about summary refs log tree commit diff
path: root/pkgs/development/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r--pkgs/development/libraries/SDL/default.nix1
-rw-r--r--pkgs/development/libraries/SDL2/default.nix5
-rw-r--r--pkgs/development/libraries/SDL2_mixer/default.nix4
-rw-r--r--pkgs/development/libraries/SDL2_sound/default.nix1
-rw-r--r--pkgs/development/libraries/SDL2_ttf/default.nix4
-rw-r--r--pkgs/development/libraries/SDL_compat/default.nix1
-rw-r--r--pkgs/development/libraries/SDL_sixel/default.nix1
-rw-r--r--pkgs/development/libraries/a52dec/default.nix34
-rw-r--r--pkgs/development/libraries/accounts-qt/default.nix1
-rw-r--r--pkgs/development/libraries/ace/default.nix1
-rw-r--r--pkgs/development/libraries/agda/1lab/default.nix2
-rw-r--r--pkgs/development/libraries/alkimia/default.nix1
-rw-r--r--pkgs/development/libraries/allegro/default.nix2
-rw-r--r--pkgs/development/libraries/appstream/default.nix15
-rw-r--r--pkgs/development/libraries/appstream/qt.nix5
-rw-r--r--pkgs/development/libraries/apr-util/default.nix1
-rw-r--r--pkgs/development/libraries/apr/default.nix1
-rw-r--r--pkgs/development/libraries/aptdec/default.nix1
-rw-r--r--pkgs/development/libraries/aravis/default.nix4
-rw-r--r--pkgs/development/libraries/arguments/default.nix2
-rw-r--r--pkgs/development/libraries/assimp/default.nix1
-rw-r--r--pkgs/development/libraries/at-spi2-core/default.nix4
-rw-r--r--pkgs/development/libraries/audiality2/default.nix1
-rw-r--r--pkgs/development/libraries/audio/cubeb/default.nix1
-rw-r--r--pkgs/development/libraries/audio/libopenmpt/default.nix5
-rw-r--r--pkgs/development/libraries/audio/lv2/default.nix1
-rw-r--r--pkgs/development/libraries/audio/lvtk/default.nix1
-rw-r--r--pkgs/development/libraries/avro-c++/default.nix1
-rw-r--r--pkgs/development/libraries/aws-c-cal/aws-c-cal-musl-compat.patch33
-rw-r--r--pkgs/development/libraries/aws-c-cal/default.nix15
-rw-r--r--pkgs/development/libraries/babl/default.nix1
-rw-r--r--pkgs/development/libraries/bashup-events/generic.nix1
-rw-r--r--pkgs/development/libraries/basu/default.nix1
-rw-r--r--pkgs/development/libraries/bctoolbox/default.nix1
-rw-r--r--pkgs/development/libraries/belle-sip/default.nix1
-rw-r--r--pkgs/development/libraries/boringssl/default.nix1
-rw-r--r--pkgs/development/libraries/botan/generic.nix1
-rw-r--r--pkgs/development/libraries/cairo/default.nix1
-rw-r--r--pkgs/development/libraries/cdo/default.nix1
-rw-r--r--pkgs/development/libraries/cegui/default.nix1
-rw-r--r--pkgs/development/libraries/cgreen/default.nix1
-rw-r--r--pkgs/development/libraries/chipmunk/default.nix1
-rw-r--r--pkgs/development/libraries/chromaprint/default.nix1
-rw-r--r--pkgs/development/libraries/civetweb/default.nix1
-rw-r--r--pkgs/development/libraries/cln/default.nix1
-rw-r--r--pkgs/development/libraries/cloog-ppl/default.nix1
-rw-r--r--pkgs/development/libraries/cloog/0.18.0.nix1
-rw-r--r--pkgs/development/libraries/cloog/default.nix1
-rw-r--r--pkgs/development/libraries/cmark-gfm/default.nix1
-rw-r--r--pkgs/development/libraries/cmark/default.nix1
-rw-r--r--pkgs/development/libraries/codec2/default.nix1
-rw-r--r--pkgs/development/libraries/coin3d/default.nix1
-rw-r--r--pkgs/development/libraries/cppunit/default.nix1
-rw-r--r--pkgs/development/libraries/ctpl/default.nix1
-rw-r--r--pkgs/development/libraries/ctranslate2/default.nix1
-rw-r--r--pkgs/development/libraries/ctypes_sh/default.nix1
-rw-r--r--pkgs/development/libraries/curlpp/default.nix1
-rw-r--r--pkgs/development/libraries/cutee/default.nix1
-rw-r--r--pkgs/development/libraries/cxx-rs/default.nix1
-rw-r--r--pkgs/development/libraries/cxxtest/default.nix1
-rw-r--r--pkgs/development/libraries/czmq/default.nix1
-rw-r--r--pkgs/development/libraries/db/db-6.0.nix2
-rw-r--r--pkgs/development/libraries/db/db-6.2.nix2
-rw-r--r--pkgs/development/libraries/dbus-glib/default.nix1
-rw-r--r--pkgs/development/libraries/dbxml/default.nix2
-rw-r--r--pkgs/development/libraries/dee/default.nix1
-rw-r--r--pkgs/development/libraries/duckdb/default.nix63
-rwxr-xr-xpkgs/development/libraries/duckdb/update.sh45
-rw-r--r--pkgs/development/libraries/duckdb/version.patch58
-rw-r--r--pkgs/development/libraries/duckdb/versions.json5
-rw-r--r--pkgs/development/libraries/exempi/default.nix1
-rw-r--r--pkgs/development/libraries/exiv2/default.nix1
-rw-r--r--pkgs/development/libraries/expat/default.nix1
-rw-r--r--pkgs/development/libraries/fbthrift/default.nix1
-rw-r--r--pkgs/development/libraries/fflas-ffpack/default.nix2
-rw-r--r--pkgs/development/libraries/ffmpeg/4.nix23
-rw-r--r--pkgs/development/libraries/ffmpeg/5.nix21
-rw-r--r--pkgs/development/libraries/ffmpeg/6.nix11
-rw-r--r--pkgs/development/libraries/ffmpeg/default.nix58
-rw-r--r--pkgs/development/libraries/ffmpeg/generic.nix64
-rw-r--r--pkgs/development/libraries/ffmpegthumbnailer/default.nix1
-rw-r--r--pkgs/development/libraries/ffms/default.nix1
-rw-r--r--pkgs/development/libraries/flatcc/default.nix1
-rw-r--r--pkgs/development/libraries/flint/3.nix7
-rw-r--r--pkgs/development/libraries/frame/default.nix1
-rw-r--r--pkgs/development/libraries/freealut/default.nix1
-rw-r--r--pkgs/development/libraries/freetts/default.nix8
-rw-r--r--pkgs/development/libraries/freetype/default.nix1
-rw-r--r--pkgs/development/libraries/fribidi/default.nix1
-rw-r--r--pkgs/development/libraries/fstrcmp/default.nix1
-rw-r--r--pkgs/development/libraries/funambol/default.nix2
-rw-r--r--pkgs/development/libraries/fuzzylite/default.nix1
-rw-r--r--pkgs/development/libraries/ganv/default.nix1
-rw-r--r--pkgs/development/libraries/gcab/default.nix1
-rw-r--r--pkgs/development/libraries/gcr/4.nix1
-rw-r--r--pkgs/development/libraries/gcr/default.nix1
-rw-r--r--pkgs/development/libraries/gdal/default.nix7
-rw-r--r--pkgs/development/libraries/gdome2/default.nix1
-rw-r--r--pkgs/development/libraries/geos/3.9.nix1
-rw-r--r--pkgs/development/libraries/getdns/default.nix1
-rw-r--r--pkgs/development/libraries/gflags/default.nix1
-rw-r--r--pkgs/development/libraries/ggz_base_libs/default.nix1
-rw-r--r--pkgs/development/libraries/giflib/4.1.nix21
-rw-r--r--pkgs/development/libraries/giflib/CVE-2021-40633.patch26
-rw-r--r--pkgs/development/libraries/giflib/default.nix34
-rw-r--r--pkgs/development/libraries/givaro/default.nix3
-rw-r--r--pkgs/development/libraries/glib/default.nix7
-rw-r--r--pkgs/development/libraries/glibc/mtrace.nix1
-rw-r--r--pkgs/development/libraries/gloox/default.nix1
-rw-r--r--pkgs/development/libraries/gnome-online-accounts/default.nix13
-rw-r--r--pkgs/development/libraries/graphene-hardened-malloc/default.nix1
-rw-r--r--pkgs/development/libraries/grpc/default.nix4
-rw-r--r--pkgs/development/libraries/gsasl/default.nix1
-rw-r--r--pkgs/development/libraries/gsignond/default.nix1
-rw-r--r--pkgs/development/libraries/gsound/default.nix1
-rw-r--r--pkgs/development/libraries/gspell/default.nix1
-rw-r--r--pkgs/development/libraries/gss/default.nix1
-rw-r--r--pkgs/development/libraries/gssdp/tools.nix1
-rw-r--r--pkgs/development/libraries/gstreamer/bad/default.nix1
-rw-r--r--pkgs/development/libraries/gstreamer/ges/default.nix1
-rw-r--r--pkgs/development/libraries/gstreamer/rs/default.nix1
-rw-r--r--pkgs/development/libraries/gtdialog/default.nix1
-rw-r--r--pkgs/development/libraries/gtk-layer-shell/default.nix1
-rw-r--r--pkgs/development/libraries/gtk4-layer-shell/default.nix1
-rw-r--r--pkgs/development/libraries/gupnp/1.6.nix1
-rw-r--r--pkgs/development/libraries/gupnp/default.nix1
-rw-r--r--pkgs/development/libraries/gusb/default.nix1
-rw-r--r--pkgs/development/libraries/hotpatch/default.nix1
-rw-r--r--pkgs/development/libraries/htmlcxx/default.nix1
-rw-r--r--pkgs/development/libraries/hyphen/default.nix1
-rw-r--r--pkgs/development/libraries/intel-media-sdk/default.nix1
-rw-r--r--pkgs/development/libraries/ip2location-c/default.nix1
-rw-r--r--pkgs/development/libraries/isa-l/default.nix1
-rw-r--r--pkgs/development/libraries/itk/generic.nix1
-rw-r--r--pkgs/development/libraries/java/commons/compress/default.nix4
-rw-r--r--pkgs/development/libraries/java/commons/logging/default.nix4
-rw-r--r--pkgs/development/libraries/java/cup/default.nix4
-rw-r--r--pkgs/development/libraries/java/hydra-ant-logger/default.nix4
-rw-r--r--pkgs/development/libraries/java/jflex/default.nix1
-rw-r--r--pkgs/development/libraries/java/lombok/default.nix5
-rw-r--r--pkgs/development/libraries/java/swt/default.nix4
-rw-r--r--pkgs/development/libraries/jbig2dec/default.nix3
-rw-r--r--pkgs/development/libraries/jellyfin-ffmpeg/default.nix10
-rw-r--r--pkgs/development/libraries/jemalloc/default.nix1
-rw-r--r--pkgs/development/libraries/jose/default.nix1
-rw-r--r--pkgs/development/libraries/json-fortran/default.nix4
-rw-r--r--pkgs/development/libraries/kdb/default.nix1
-rw-r--r--pkgs/development/libraries/khronos-ocl-icd-loader/default.nix1
-rw-r--r--pkgs/development/libraries/languagemachines/libfolia.nix1
-rw-r--r--pkgs/development/libraries/languagemachines/timbl.nix1
-rw-r--r--pkgs/development/libraries/languagemachines/ucto.nix1
-rw-r--r--pkgs/development/libraries/lasem/default.nix1
-rw-r--r--pkgs/development/libraries/libaacs/default.nix1
-rw-r--r--pkgs/development/libraries/libadwaita/default.nix2
-rw-r--r--pkgs/development/libraries/libagar/libagar_test.nix1
-rw-r--r--pkgs/development/libraries/libajantv2/default.nix5
-rw-r--r--pkgs/development/libraries/libarchive-qt/default.nix1
-rw-r--r--pkgs/development/libraries/libassuan/default.nix16
-rw-r--r--pkgs/development/libraries/libast/default.nix1
-rw-r--r--pkgs/development/libraries/libbson/default.nix23
-rw-r--r--pkgs/development/libraries/libbytesize/default.nix1
-rw-r--r--pkgs/development/libraries/libcanberra/default.nix1
-rw-r--r--pkgs/development/libraries/libcdada/default.nix4
-rw-r--r--pkgs/development/libraries/libcdaudio/default.nix1
-rw-r--r--pkgs/development/libraries/libchardet/default.nix1
-rw-r--r--pkgs/development/libraries/libcork/default.nix1
-rw-r--r--pkgs/development/libraries/libcredis/default.nix1
-rw-r--r--pkgs/development/libraries/libcryptui/default.nix1
-rw-r--r--pkgs/development/libraries/libctl/default.nix1
-rw-r--r--pkgs/development/libraries/libdatachannel/default.nix6
-rw-r--r--pkgs/development/libraries/libdazzle/default.nix1
-rw-r--r--pkgs/development/libraries/libdbi-drivers/default.nix10
-rw-r--r--pkgs/development/libraries/libdbi-drivers/libdbi-drivers-0.9.0-buffer_overflow.patch11
-rw-r--r--pkgs/development/libraries/libde265/default.nix1
-rw-r--r--pkgs/development/libraries/libdeflate/default.nix2
-rw-r--r--pkgs/development/libraries/libdevil/default.nix1
-rw-r--r--pkgs/development/libraries/libdicom/default.nix10
-rw-r--r--pkgs/development/libraries/libdigidocpp/default.nix1
-rw-r--r--pkgs/development/libraries/libdisplay-info/default.nix1
-rw-r--r--pkgs/development/libraries/libdivecomputer/default.nix1
-rw-r--r--pkgs/development/libraries/libdvdnav/4.2.1.nix1
-rw-r--r--pkgs/development/libraries/libei/default.nix6
-rw-r--r--pkgs/development/libraries/libemf2svg/default.nix1
-rw-r--r--pkgs/development/libraries/libevent/default.nix1
-rw-r--r--pkgs/development/libraries/libextractor/default.nix1
-rw-r--r--pkgs/development/libraries/libgit2/default.nix1
-rw-r--r--pkgs/development/libraries/libgnomekbd/default.nix1
-rw-r--r--pkgs/development/libraries/libgpg-error/default.nix5
-rw-r--r--pkgs/development/libraries/libgpod/default.nix1
-rw-r--r--pkgs/development/libraries/libhandy/0.x.nix1
-rw-r--r--pkgs/development/libraries/libhandy/default.nix1
-rw-r--r--pkgs/development/libraries/libhangul/default.nix1
-rw-r--r--pkgs/development/libraries/libhdhomerun/default.nix1
-rw-r--r--pkgs/development/libraries/libhsts/default.nix1
-rw-r--r--pkgs/development/libraries/libieee1284/default.nix1
-rw-r--r--pkgs/development/libraries/libinfinity/default.nix1
-rw-r--r--pkgs/development/libraries/libinput/default.nix1
-rw-r--r--pkgs/development/libraries/libipfix/default.nix1
-rw-r--r--pkgs/development/libraries/libipt/default.nix4
-rw-r--r--pkgs/development/libraries/libiptcdata/default.nix1
-rw-r--r--pkgs/development/libraries/libixp/default.nix1
-rw-r--r--pkgs/development/libraries/libjcat/default.nix1
-rw-r--r--pkgs/development/libraries/libjson-rpc-cpp/default.nix1
-rw-r--r--pkgs/development/libraries/libjxl/default.nix4
-rw-r--r--pkgs/development/libraries/libksba/default.nix5
-rw-r--r--pkgs/development/libraries/liblockfile/default.nix1
-rw-r--r--pkgs/development/libraries/liblogging/default.nix1
-rw-r--r--pkgs/development/libraries/liblouis/default.nix4
-rw-r--r--pkgs/development/libraries/libmanette/default.nix1
-rw-r--r--pkgs/development/libraries/libmcrypt/default.nix1
-rw-r--r--pkgs/development/libraries/libmikmod/default.nix1
-rw-r--r--pkgs/development/libraries/libmng/default.nix2
-rw-r--r--pkgs/development/libraries/libmodulemd/default.nix1
-rw-r--r--pkgs/development/libraries/libmx/default.nix1
-rw-r--r--pkgs/development/libraries/libnatspec/default.nix1
-rw-r--r--pkgs/development/libraries/libndp/default.nix1
-rw-r--r--pkgs/development/libraries/libnet/default.nix1
-rw-r--r--pkgs/development/libraries/libngspice/default.nix1
-rw-r--r--pkgs/development/libraries/liboil/default.nix1
-rw-r--r--pkgs/development/libraries/libomxil-bellagio/default.nix1
-rw-r--r--pkgs/development/libraries/libopenshot-audio/default.nix1
-rw-r--r--pkgs/development/libraries/libopus/default.nix36
-rw-r--r--pkgs/development/libraries/libopus/test-timeout.patch15
-rw-r--r--pkgs/development/libraries/libpanel/default.nix1
-rw-r--r--pkgs/development/libraries/libpcap/default.nix1
-rw-r--r--pkgs/development/libraries/libpeas/default.nix1
-rw-r--r--pkgs/development/libraries/libpng/default.nix10
-rw-r--r--pkgs/development/libraries/libproxy/default.nix1
-rw-r--r--pkgs/development/libraries/libpsl/default.nix3
-rw-r--r--pkgs/development/libraries/librdf/raptor2.nix1
-rw-r--r--pkgs/development/libraries/libredwg/default.nix19
-rw-r--r--pkgs/development/libraries/libs3/default.nix1
-rw-r--r--pkgs/development/libraries/libsamplerate/default.nix1
-rw-r--r--pkgs/development/libraries/libsearpc/default.nix1
-rw-r--r--pkgs/development/libraries/libseccomp/default.nix1
-rw-r--r--pkgs/development/libraries/libserdes/default.nix5
-rw-r--r--pkgs/development/libraries/libshumate/default.nix1
-rw-r--r--pkgs/development/libraries/libskk/default.nix1
-rw-r--r--pkgs/development/libraries/libsmartcols/default.nix4
-rw-r--r--pkgs/development/libraries/libspelling/default.nix4
-rw-r--r--pkgs/development/libraries/libsrs2/default.nix1
-rw-r--r--pkgs/development/libraries/libtar/default.nix1
-rw-r--r--pkgs/development/libraries/libtiff/default.nix2
-rw-r--r--pkgs/development/libraries/libtins/0001-force-cpp-14.patch26
-rw-r--r--pkgs/development/libraries/libtins/default.nix17
-rw-r--r--pkgs/development/libraries/libu2f-server/default.nix1
-rw-r--r--pkgs/development/libraries/libuchardet/default.nix1
-rw-r--r--pkgs/development/libraries/libunicode/default.nix1
-rw-r--r--pkgs/development/libraries/libunwind/default.nix16
-rw-r--r--pkgs/development/libraries/libusb-compat/0.1.nix1
-rw-r--r--pkgs/development/libraries/libvarlink/default.nix1
-rw-r--r--pkgs/development/libraries/libwtk-sdl2/default.nix1
-rw-r--r--pkgs/development/libraries/libxc/default.nix1
-rw-r--r--pkgs/development/libraries/libxmlb/default.nix1
-rw-r--r--pkgs/development/libraries/libxsmm/default.nix1
-rw-r--r--pkgs/development/libraries/libykclient/default.nix1
-rw-r--r--pkgs/development/libraries/libyuv/default.nix1
-rw-r--r--pkgs/development/libraries/lightgbm/default.nix1
-rw-r--r--pkgs/development/libraries/linbox/default.nix3
-rw-r--r--pkgs/development/libraries/log4cpp/default.nix1
-rw-r--r--pkgs/development/libraries/log4shib/default.nix1
-rw-r--r--pkgs/development/libraries/luksmeta/default.nix1
-rw-r--r--pkgs/development/libraries/malcontent/default.nix1
-rw-r--r--pkgs/development/libraries/malcontent/ui.nix1
-rw-r--r--pkgs/development/libraries/mesa/default.nix4
-rw-r--r--pkgs/development/libraries/mono-addins/default.nix1
-rw-r--r--pkgs/development/libraries/mtdev/default.nix1
-rw-r--r--pkgs/development/libraries/mythes/default.nix1
-rw-r--r--pkgs/development/libraries/neatvnc/default.nix4
-rw-r--r--pkgs/development/libraries/neon/default.nix1
-rw-r--r--pkgs/development/libraries/netcdf-cxx4/default.nix1
-rw-r--r--pkgs/development/libraries/netcdf-fortran/default.nix1
-rw-r--r--pkgs/development/libraries/newt/default.nix1
-rw-r--r--pkgs/development/libraries/nghttp2/default.nix4
-rw-r--r--pkgs/development/libraries/ngtcp2/gnutls.nix4
-rw-r--r--pkgs/development/libraries/npth/default.nix5
-rw-r--r--pkgs/development/libraries/nss/latest.nix4
-rw-r--r--pkgs/development/libraries/nss_wrapper/default.nix1
-rw-r--r--pkgs/development/libraries/ntbtls/default.nix1
-rw-r--r--pkgs/development/libraries/nuspell/default.nix1
-rw-r--r--pkgs/development/libraries/ocl-icd/default.nix1
-rw-r--r--pkgs/development/libraries/ode/default.nix1
-rw-r--r--pkgs/development/libraries/oniguruma/default.nix1
-rw-r--r--pkgs/development/libraries/opencomposite/default.nix65
-rw-r--r--pkgs/development/libraries/opencomposite/helper.nix18
-rw-r--r--pkgs/development/libraries/opencsg/default.nix1
-rw-r--r--pkgs/development/libraries/opendbx/default.nix1
-rw-r--r--pkgs/development/libraries/opensaml-cpp/default.nix1
-rw-r--r--pkgs/development/libraries/openvdb/default.nix1
-rw-r--r--pkgs/development/libraries/orcania/default.nix1
-rw-r--r--pkgs/development/libraries/ortp/default.nix1
-rw-r--r--pkgs/development/libraries/paho-mqtt-c/default.nix1
-rw-r--r--pkgs/development/libraries/pcmsolver/default.nix1
-rw-r--r--pkgs/development/libraries/pdal/default.nix14
-rw-r--r--pkgs/development/libraries/phonon/default.nix1
-rw-r--r--pkgs/development/libraries/physfs/default.nix1
-rw-r--r--pkgs/development/libraries/physics/apfelgrid/default.nix1
-rw-r--r--pkgs/development/libraries/physics/fastjet/default.nix1
-rw-r--r--pkgs/development/libraries/physics/hepmc3/default.nix1
-rw-r--r--pkgs/development/libraries/physics/hoppet/default.nix1
-rw-r--r--pkgs/development/libraries/physics/mela/default.nix1
-rw-r--r--pkgs/development/libraries/physics/pythia/default.nix1
-rw-r--r--pkgs/development/libraries/physics/qcdnum/default.nix1
-rw-r--r--pkgs/development/libraries/pipewire/default.nix14
-rw-r--r--pkgs/development/libraries/pipewire/wireplumber.nix4
-rw-r--r--pkgs/development/libraries/pixman/default.nix6
-rw-r--r--pkgs/development/libraries/pkger/default.nix1
-rw-r--r--pkgs/development/libraries/plplot/default.nix1
-rw-r--r--pkgs/development/libraries/poly2tri-c/default.nix1
-rw-r--r--pkgs/development/libraries/pplite/default.nix1
-rw-r--r--pkgs/development/libraries/protolock/default.nix1
-rw-r--r--pkgs/development/libraries/ptex/default.nix1
-rw-r--r--pkgs/development/libraries/pth/default.nix1
-rw-r--r--pkgs/development/libraries/qoi/default.nix1
-rw-r--r--pkgs/development/libraries/qpdf/default.nix4
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtwebengine.nix1
-rw-r--r--pkgs/development/libraries/qt-6/modules/qtquick3dphysics.nix1
-rw-r--r--pkgs/development/libraries/qt-6/modules/qtquickeffectmaker.nix1
-rw-r--r--pkgs/development/libraries/qt-6/modules/qtserialbus.nix1
-rw-r--r--pkgs/development/libraries/qt-6/modules/qtshadertools.nix7
-rw-r--r--pkgs/development/libraries/qt-6/modules/qtsvg.nix11
-rw-r--r--pkgs/development/libraries/quarto/default.nix1
-rw-r--r--pkgs/development/libraries/re2/default.nix4
-rw-r--r--pkgs/development/libraries/recastnavigation/default.nix1
-rw-r--r--pkgs/development/libraries/retro-gtk/default.nix1
-rw-r--r--pkgs/development/libraries/rocksdb/default.nix32
-rw-r--r--pkgs/development/libraries/rote/default.nix1
-rw-r--r--pkgs/development/libraries/rtlcss/default.nix1
-rw-r--r--pkgs/development/libraries/s2n-tls/default.nix4
-rw-r--r--pkgs/development/libraries/science/astronomy/libnova/default.nix1
-rw-r--r--pkgs/development/libraries/science/biology/bicgl/default.nix2
-rw-r--r--pkgs/development/libraries/science/biology/bicpl/default.nix2
-rw-r--r--pkgs/development/libraries/science/biology/mirtk/default.nix1
-rw-r--r--pkgs/development/libraries/science/chemistry/dftd4/default.nix1
-rw-r--r--pkgs/development/libraries/science/chemistry/harminv/default.nix1
-rw-r--r--pkgs/development/libraries/science/chemistry/libGDSII/default.nix1
-rw-r--r--pkgs/development/libraries/science/chemistry/mctc-lib/default.nix1
-rw-r--r--pkgs/development/libraries/science/chemistry/molequeue/default.nix1
-rw-r--r--pkgs/development/libraries/science/chemistry/multicharge/default.nix1
-rw-r--r--pkgs/development/libraries/science/chemistry/openmm/default.nix1
-rw-r--r--pkgs/development/libraries/science/chemistry/simple-dftd3/default.nix1
-rw-r--r--pkgs/development/libraries/science/chemistry/tblite/default.nix1
-rw-r--r--pkgs/development/libraries/science/math/bonmin/default.nix1
-rw-r--r--pkgs/development/libraries/science/math/faiss/default.nix1
-rw-r--r--pkgs/development/libraries/science/math/itpp/default.nix1
-rw-r--r--pkgs/development/libraries/science/math/lcalc/default.nix1
-rw-r--r--pkgs/development/libraries/science/math/magma/generic.nix117
-rw-r--r--pkgs/development/libraries/science/math/mongoose/default.nix1
-rw-r--r--pkgs/development/libraries/science/math/or-tools/default.nix1
-rw-r--r--pkgs/development/libraries/science/math/planarity/default.nix1
-rw-r--r--pkgs/development/libraries/science/math/sympow/default.nix1
-rw-r--r--pkgs/development/libraries/science/math/trilinos/default.nix1
-rw-r--r--pkgs/development/libraries/science/robotics/edgetpu-compiler/default.nix1
-rw-r--r--pkgs/development/libraries/serialdv/default.nix1
-rw-r--r--pkgs/development/libraries/sexpp/default.nix1
-rw-r--r--pkgs/development/libraries/shine/default.nix1
-rw-r--r--pkgs/development/libraries/slib/default.nix1
-rw-r--r--pkgs/development/libraries/smooth/default.nix1
-rw-r--r--pkgs/development/libraries/sonic/default.nix1
-rw-r--r--pkgs/development/libraries/sqlcipher/default.nix1
-rw-r--r--pkgs/development/libraries/sregex/default.nix1
-rw-r--r--pkgs/development/libraries/srtp/default.nix4
-rw-r--r--pkgs/development/libraries/subunit/default.nix1
-rw-r--r--pkgs/development/libraries/swiften/default.nix1
-rw-r--r--pkgs/development/libraries/sycl-info/default.nix1
-rw-r--r--pkgs/development/libraries/ta-lib/default.nix1
-rw-r--r--pkgs/development/libraries/tachyon/default.nix1
-rw-r--r--pkgs/development/libraries/taco/default.nix1
-rw-r--r--pkgs/development/libraries/taglib-extras/default.nix1
-rw-r--r--pkgs/development/libraries/taglib/default.nix1
-rw-r--r--pkgs/development/libraries/termbench-pro/default.nix1
-rw-r--r--pkgs/development/libraries/text-engine/default.nix1
-rw-r--r--pkgs/development/libraries/thrift/0.10.nix46
-rw-r--r--pkgs/development/libraries/thrift/default.nix1
-rw-r--r--pkgs/development/libraries/tidyp/default.nix1
-rw-r--r--pkgs/development/libraries/tinycbor/default.nix1
-rw-r--r--pkgs/development/libraries/tinycdb/default.nix1
-rw-r--r--pkgs/development/libraries/tracker/default.nix1
-rw-r--r--pkgs/development/libraries/tsocks/default.nix1
-rw-r--r--pkgs/development/libraries/twolame/default.nix1
-rw-r--r--pkgs/development/libraries/ucc/default.nix1
-rw-r--r--pkgs/development/libraries/uci/default.nix1
-rw-r--r--pkgs/development/libraries/ucx/default.nix2
-rw-r--r--pkgs/development/libraries/udns/default.nix6
-rw-r--r--pkgs/development/libraries/unixODBCDrivers/default.nix8
-rw-r--r--pkgs/development/libraries/usbredir/default.nix1
-rw-r--r--pkgs/development/libraries/ustr/default.nix1
-rw-r--r--pkgs/development/libraries/v8/default.nix1
-rw-r--r--pkgs/development/libraries/vigra/default.nix1
-rw-r--r--pkgs/development/libraries/virglrenderer/default.nix1
-rw-r--r--pkgs/development/libraries/volume-key/default.nix1
-rw-r--r--pkgs/development/libraries/vrb/default.nix1
-rw-r--r--pkgs/development/libraries/waffle/default.nix1
-rw-r--r--pkgs/development/libraries/wavpack/default.nix4
-rw-r--r--pkgs/development/libraries/wayland/default.nix1
-rw-r--r--pkgs/development/libraries/waylandpp/default.nix1
-rw-r--r--pkgs/development/libraries/webkitgtk/default.nix1
-rw-r--r--pkgs/development/libraries/webrtc-audio-processing/default.nix12
-rw-r--r--pkgs/development/libraries/wiiuse/default.nix1
-rw-r--r--pkgs/development/libraries/wildmidi/default.nix1
-rw-r--r--pkgs/development/libraries/wiredtiger/default.nix1
-rw-r--r--pkgs/development/libraries/wolfssl/default.nix5
-rw-r--r--pkgs/development/libraries/wxSVG/default.nix1
-rw-r--r--pkgs/development/libraries/wxsqliteplus/default.nix1
-rw-r--r--pkgs/development/libraries/x264/default.nix1
-rw-r--r--pkgs/development/libraries/x265/default.nix1
-rw-r--r--pkgs/development/libraries/xalanc/default.nix1
-rw-r--r--pkgs/development/libraries/xapian/default.nix2
-rw-r--r--pkgs/development/libraries/xapian/tools/omega/default.nix2
-rw-r--r--pkgs/development/libraries/xavs/default.nix1
-rw-r--r--pkgs/development/libraries/xgboost/default.nix2
-rw-r--r--pkgs/development/libraries/xsd/default.nix1
-rw-r--r--pkgs/development/libraries/yubico-pam/default.nix6
-rw-r--r--pkgs/development/libraries/yyjson/default.nix6
-rw-r--r--pkgs/development/libraries/zookeeper_mt/default.nix2
415 files changed, 997 insertions, 685 deletions
diff --git a/pkgs/development/libraries/SDL/default.nix b/pkgs/development/libraries/SDL/default.nix
index fa816c0add0f..a791d94a2c03 100644
--- a/pkgs/development/libraries/SDL/default.nix
+++ b/pkgs/development/libraries/SDL/default.nix
@@ -127,6 +127,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A cross-platform multimedia library";
+    mainProgram = "sdl-config";
     homepage    = "http://www.libsdl.org/";
     maintainers = with maintainers; [ lovek323 ];
     platforms   = platforms.unix;
diff --git a/pkgs/development/libraries/SDL2/default.nix b/pkgs/development/libraries/SDL2/default.nix
index 1aac55d6ef9e..838bb9ecdbe5 100644
--- a/pkgs/development/libraries/SDL2/default.nix
+++ b/pkgs/development/libraries/SDL2/default.nix
@@ -58,13 +58,13 @@
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "SDL2";
-  version = "2.30.0";
+  version = "2.30.1";
 
   src = fetchFromGitHub {
     owner = "libsdl-org";
     repo = "SDL";
     rev = "release-${finalAttrs.version}";
-    hash = "sha256-uKL9/T6vCEqMqmD3Q3rCMtKPRJZ4fRYVUr+4628/Ajg=";
+    hash = "sha256-nwmmyJK1/5Mu7l1YCk4PsasJIrx3jdiM5f/Cu3n0paA=";
   };
   dontDisableStatic = if withStatic then 1 else 0;
   outputs = [ "out" "dev" ];
@@ -180,6 +180,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   meta = with lib; {
     description = "A cross-platform multimedia library";
+    mainProgram = "sdl2-config";
     homepage = "http://www.libsdl.org/";
     changelog = "https://github.com/libsdl-org/SDL/releases/tag/release-${version}";
     license = licenses.zlib;
diff --git a/pkgs/development/libraries/SDL2_mixer/default.nix b/pkgs/development/libraries/SDL2_mixer/default.nix
index b412e22b8f0c..70d080e57ab8 100644
--- a/pkgs/development/libraries/SDL2_mixer/default.nix
+++ b/pkgs/development/libraries/SDL2_mixer/default.nix
@@ -18,11 +18,11 @@
 
 stdenv.mkDerivation rec {
   pname = "SDL2_mixer";
-  version = "2.6.3";
+  version = "2.8.0";
 
   src = fetchurl {
     url = "https://www.libsdl.org/projects/SDL_mixer/release/${pname}-${version}.tar.gz";
-    sha256 = "sha256-emuoakeGSM5hfjpekncYG8Z/fOmHZgXupq/9Sg1u6o8=";
+    sha256 = "sha256-HPs0yHsm29vHr9aMT1RcARarX5C7/sxa6+Kpy0uzFUk=";
   };
 
   configureFlags = [
diff --git a/pkgs/development/libraries/SDL2_sound/default.nix b/pkgs/development/libraries/SDL2_sound/default.nix
index 3a2d05c31a10..056991c9aca4 100644
--- a/pkgs/development/libraries/SDL2_sound/default.nix
+++ b/pkgs/development/libraries/SDL2_sound/default.nix
@@ -41,6 +41,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "SDL2 sound library";
+    mainProgram = "playsound";
     platforms = platforms.unix;
     license = licenses.zlib;
     homepage = "https://www.icculus.org/SDL_sound/";
diff --git a/pkgs/development/libraries/SDL2_ttf/default.nix b/pkgs/development/libraries/SDL2_ttf/default.nix
index e46b9d9c537a..3407478b39b1 100644
--- a/pkgs/development/libraries/SDL2_ttf/default.nix
+++ b/pkgs/development/libraries/SDL2_ttf/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "SDL2_ttf";
-  version = "2.20.2";
+  version = "2.22.0";
 
   src = fetchurl {
     url = "https://www.libsdl.org/projects/SDL_ttf/release/${finalAttrs.pname}-${finalAttrs.version}.tar.gz";
-    sha256 = "sha256-ncce2TSHUhsQeixKnKa/Q/ti9r3dXCawVea5FBiiIFM=";
+    sha256 = "sha256-1Iy9HOR1ueF4IGvzty1Wtm2E1E9krAWAMyg5YjTWdyM=";
   };
 
   configureFlags = [ "--disable-harfbuzz-builtin" ]
diff --git a/pkgs/development/libraries/SDL_compat/default.nix b/pkgs/development/libraries/SDL_compat/default.nix
index 3f3521de60a1..f7d997cd52e5 100644
--- a/pkgs/development/libraries/SDL_compat/default.nix
+++ b/pkgs/development/libraries/SDL_compat/default.nix
@@ -53,6 +53,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A cross-platform multimedia library - build SDL 1.2 applications against 2.0";
+    mainProgram = "sdl-config";
     homepage = "https://www.libsdl.org/";
     license = licenses.zlib;
     maintainers = with maintainers; [ peterhoeg ];
diff --git a/pkgs/development/libraries/SDL_sixel/default.nix b/pkgs/development/libraries/SDL_sixel/default.nix
index 1bc4c8ba35c0..189fdee05b26 100644
--- a/pkgs/development/libraries/SDL_sixel/default.nix
+++ b/pkgs/development/libraries/SDL_sixel/default.nix
@@ -18,6 +18,7 @@ stdenv.mkDerivation {
 
   meta = with lib; {
     description = "A cross-platform multimedia library, that supports sixel graphics on consoles";
+    mainProgram = "sdl-config";
     homepage    = "https://github.com/saitoha/SDL1.2-SIXEL";
     maintainers = with maintainers; [ vrthra ];
     platforms   = platforms.linux;
diff --git a/pkgs/development/libraries/a52dec/default.nix b/pkgs/development/libraries/a52dec/default.nix
deleted file mode 100644
index fdb309c634da..000000000000
--- a/pkgs/development/libraries/a52dec/default.nix
+++ /dev/null
@@ -1,34 +0,0 @@
-{ 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/pkgs/development/libraries/accounts-qt/default.nix b/pkgs/development/libraries/accounts-qt/default.nix
index 7d2617a6ee60..8a11d3375491 100644
--- a/pkgs/development/libraries/accounts-qt/default.nix
+++ b/pkgs/development/libraries/accounts-qt/default.nix
@@ -23,6 +23,7 @@ stdenv.mkDerivation {
 
   meta = with lib; {
     description = "Qt library for accessing the online accounts database";
+    mainProgram = "accountstest";
     homepage = "https://gitlab.com/accounts-sso";
     license = licenses.lgpl21;
     platforms = platforms.linux;
diff --git a/pkgs/development/libraries/ace/default.nix b/pkgs/development/libraries/ace/default.nix
index bae0401a781a..01041c858623 100644
--- a/pkgs/development/libraries/ace/default.nix
+++ b/pkgs/development/libraries/ace/default.nix
@@ -34,6 +34,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://www.dre.vanderbilt.edu/~schmidt/ACE.html";
     description = "ADAPTIVE Communication Environment";
+    mainProgram = "ace_gperf";
     license = licenses.doc;
     maintainers = with maintainers; [ nico202 ];
     platforms = platforms.linux;
diff --git a/pkgs/development/libraries/agda/1lab/default.nix b/pkgs/development/libraries/agda/1lab/default.nix
index 89b0fb60c365..4d39fa0325f2 100644
--- a/pkgs/development/libraries/agda/1lab/default.nix
+++ b/pkgs/development/libraries/agda/1lab/default.nix
@@ -28,7 +28,7 @@ mkDerivation rec {
     description =
       "A formalised, cross-linked reference resource for mathematics done in Homotopy Type Theory ";
     homepage = src.meta.homepage;
-    license = licenses.agpl3;
+    license = licenses.agpl3Only;
     platforms = platforms.unix;
     maintainers = with maintainers; [ ncfavier ];
   };
diff --git a/pkgs/development/libraries/alkimia/default.nix b/pkgs/development/libraries/alkimia/default.nix
index b6fb92ae62dd..d5c89209ce5d 100644
--- a/pkgs/development/libraries/alkimia/default.nix
+++ b/pkgs/development/libraries/alkimia/default.nix
@@ -22,6 +22,7 @@ mkDerivation rec {
 
   meta = {
     description = "Library used by KDE finance applications";
+    mainProgram = "onlinequoteseditor5";
     longDescription = ''
       Alkimia is the infrastructure for common storage and business
       logic that will be used by all financial applications in KDE.
diff --git a/pkgs/development/libraries/allegro/default.nix b/pkgs/development/libraries/allegro/default.nix
index d9c862443653..0318c3133d63 100644
--- a/pkgs/development/libraries/allegro/default.nix
+++ b/pkgs/development/libraries/allegro/default.nix
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     description = "A game programming library";
     homepage = "https://liballeg.org/";
-    license = licenses.free; # giftware
+    license = licenses.giftware;
     maintainers = [ maintainers.raskin ];
     platforms = platforms.linux;
   };
diff --git a/pkgs/development/libraries/appstream/default.nix b/pkgs/development/libraries/appstream/default.nix
index ff953b621635..b2b1e40576ea 100644
--- a/pkgs/development/libraries/appstream/default.nix
+++ b/pkgs/development/libraries/appstream/default.nix
@@ -6,6 +6,7 @@
 , mesonEmulatorHook
 , ninja
 , pkg-config
+, cmake
 , gettext
 , xmlto
 , docbook-xsl-nons
@@ -23,6 +24,10 @@
 , gperf
 , vala
 , curl
+, cairo
+, gdk-pixbuf
+, pango
+, librsvg
 , systemd
 , nixosTests
 , testers
@@ -31,7 +36,7 @@
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "appstream";
-  version = "1.0.1";
+  version = "1.0.2";
 
   outputs = [ "out" "dev" "installedTests" ];
 
@@ -39,7 +44,7 @@ stdenv.mkDerivation (finalAttrs: {
     owner = "ximion";
     repo = "appstream";
     rev = "v${finalAttrs.version}";
-    sha256 = "sha256-ULqRHepWVuAluXsXJUoqxqJfrN168MGlwdVkoLLwSN0=";
+    sha256 = "sha256-0NzZku6TQyyaTOAMWZD459RayhsH8cotlOaSKkVY/EQ=";
   };
 
   patches = [
@@ -63,6 +68,7 @@ stdenv.mkDerivation (finalAttrs: {
     meson
     ninja
     pkg-config
+    cmake
     gettext
     libxslt
     xmlto
@@ -85,6 +91,10 @@ stdenv.mkDerivation (finalAttrs: {
     libxmlb
     libyaml
     curl
+    cairo
+    gdk-pixbuf
+    pango
+    librsvg
   ] ++ lib.optionals withSystemd [
     systemd
   ];
@@ -94,6 +104,7 @@ stdenv.mkDerivation (finalAttrs: {
     "-Ddocs=false"
     "-Dvapi=true"
     "-Dinstalled_test_prefix=${placeholder "installedTests"}"
+    "-Dcompose=true"
   ] ++ lib.optionals (!withSystemd) [
     "-Dsystemd=false"
   ];
diff --git a/pkgs/development/libraries/appstream/qt.nix b/pkgs/development/libraries/appstream/qt.nix
index 492037d721ed..1916774b8cfc 100644
--- a/pkgs/development/libraries/appstream/qt.nix
+++ b/pkgs/development/libraries/appstream/qt.nix
@@ -15,7 +15,10 @@ stdenv.mkDerivation {
 
   nativeBuildInputs = appstream.nativeBuildInputs ++ [ qttools ];
 
-  mesonFlags = appstream.mesonFlags ++ [ "-Dqt${qtSuffix}=true" ];
+  mesonFlags = appstream.mesonFlags ++ [
+    (lib.mesonBool "qt" true)
+    (lib.mesonOption "qt-versions" (lib.versions.major qtbase.version))
+  ];
 
   patches = appstream.patches;
 
diff --git a/pkgs/development/libraries/apr-util/default.nix b/pkgs/development/libraries/apr-util/default.nix
index a1cbbc5e6642..bd32ad45c47b 100644
--- a/pkgs/development/libraries/apr-util/default.nix
+++ b/pkgs/development/libraries/apr-util/default.nix
@@ -82,6 +82,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://apr.apache.org/";
     description = "A companion library to APR, the Apache Portable Runtime";
+    mainProgram = "apu-1-config";
     maintainers = [ maintainers.eelco ];
     platforms = platforms.unix;
     license = licenses.asl20;
diff --git a/pkgs/development/libraries/apr/default.nix b/pkgs/development/libraries/apr/default.nix
index b0809829c541..6428489173da 100644
--- a/pkgs/development/libraries/apr/default.nix
+++ b/pkgs/development/libraries/apr/default.nix
@@ -66,6 +66,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://apr.apache.org/";
     description = "The Apache Portable Runtime library";
+    mainProgram = "apr-1-config";
     platforms = platforms.all;
     license = licenses.asl20;
     maintainers = [ maintainers.eelco ];
diff --git a/pkgs/development/libraries/aptdec/default.nix b/pkgs/development/libraries/aptdec/default.nix
index f969f0d66ada..2c3c9b3bdfd7 100644
--- a/pkgs/development/libraries/aptdec/default.nix
+++ b/pkgs/development/libraries/aptdec/default.nix
@@ -24,6 +24,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "NOAA APT satellite imagery decoding library";
+    mainProgram = "aptdec";
     homepage = "https://github.com/Xerbo/aptdec";
     license = licenses.gpl2;
     maintainers = with maintainers; [ alexwinter ];
diff --git a/pkgs/development/libraries/aravis/default.nix b/pkgs/development/libraries/aravis/default.nix
index 8baf539b26ef..ccdc06e906fe 100644
--- a/pkgs/development/libraries/aravis/default.nix
+++ b/pkgs/development/libraries/aravis/default.nix
@@ -29,13 +29,13 @@ assert enableViewer -> wrapGAppsHook != null;
 
 stdenv.mkDerivation rec {
   pname = "aravis";
-  version = "0.8.30";
+  version = "0.8.31";
 
   src = fetchFromGitHub {
     owner = "AravisProject";
     repo = pname;
     rev = version;
-    sha256 = "sha256-1OxvLpzEKxIXiLJIUr+hCx+sxnH9Z5dBM5Lug1acCok=";
+    sha256 = "sha256-CsXnwrZqBCS7JVAB/7JlAAvks5HnYxgrdc4Bmg68QdE=";
   };
 
   outputs = [ "bin" "dev" "out" "lib" ];
diff --git a/pkgs/development/libraries/arguments/default.nix b/pkgs/development/libraries/arguments/default.nix
index bacb7662386e..524e00dc5a76 100644
--- a/pkgs/development/libraries/arguments/default.nix
+++ b/pkgs/development/libraries/arguments/default.nix
@@ -26,6 +26,6 @@ stdenv.mkDerivation rec {
     description = "Library for argument handling for MINC programs";
     maintainers = with maintainers; [ bcdarwin ];
     platforms = platforms.unix;
-    license   = licenses.free;
+    license   = licenses.gpl2Plus;
   };
 }
diff --git a/pkgs/development/libraries/assimp/default.nix b/pkgs/development/libraries/assimp/default.nix
index ec2d5561570e..654935391602 100644
--- a/pkgs/development/libraries/assimp/default.nix
+++ b/pkgs/development/libraries/assimp/default.nix
@@ -32,6 +32,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A library to import various 3D model formats";
+    mainProgram = "assimp";
     homepage = "https://www.assimp.org/";
     license = licenses.bsd3;
     maintainers = with maintainers; [ ehmry ];
diff --git a/pkgs/development/libraries/at-spi2-core/default.nix b/pkgs/development/libraries/at-spi2-core/default.nix
index 271c54ea97fa..6ebab7eb4760 100644
--- a/pkgs/development/libraries/at-spi2-core/default.nix
+++ b/pkgs/development/libraries/at-spi2-core/default.nix
@@ -23,14 +23,14 @@
 
 stdenv.mkDerivation rec {
   pname = "at-spi2-core";
-  version = "2.50.0";
+  version = "2.50.1";
 
   outputs = [ "out" "dev" ];
   separateDebugInfo = true;
 
   src = fetchurl {
     url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
-    sha256 = "6fWoyCNcndljshcd6RIDARKcZ33ekzlV4d9hi5ScStw=";
+    sha256 = "Vye1wGh6xXuoBA55vWcxtxSja4/PMhkPI2uPs2mHiec=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/libraries/audiality2/default.nix b/pkgs/development/libraries/audiality2/default.nix
index 11625bc64f79..c189cd7e1ea4 100644
--- a/pkgs/development/libraries/audiality2/default.nix
+++ b/pkgs/development/libraries/audiality2/default.nix
@@ -30,6 +30,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   meta = with lib; {
     description = "A realtime scripted modular audio engine for video games and musical applications";
+    mainProgram = "a2play";
     homepage = "http://audiality.org";
     license = licenses.zlib;
     platforms = platforms.all;
diff --git a/pkgs/development/libraries/audio/cubeb/default.nix b/pkgs/development/libraries/audio/cubeb/default.nix
index baad8a1efd64..dd7033b1910e 100644
--- a/pkgs/development/libraries/audio/cubeb/default.nix
+++ b/pkgs/development/libraries/audio/cubeb/default.nix
@@ -60,6 +60,7 @@ in stdenv.mkDerivation {
 
   meta = with lib; {
     description = "Cross platform audio library";
+    mainProgram = "cubeb-test";
     homepage = "https://github.com/mozilla/cubeb";
     license = licenses.isc;
     platforms = platforms.linux ++ platforms.darwin;
diff --git a/pkgs/development/libraries/audio/libopenmpt/default.nix b/pkgs/development/libraries/audio/libopenmpt/default.nix
index b8b89abc8ea7..cb515ebde884 100644
--- a/pkgs/development/libraries/audio/libopenmpt/default.nix
+++ b/pkgs/development/libraries/audio/libopenmpt/default.nix
@@ -16,13 +16,13 @@
 
 stdenv.mkDerivation rec {
   pname = "libopenmpt";
-  version = "0.7.3";
+  version = "0.7.4";
 
   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=";
+    hash = "sha256-FgD5M16uOQQImmKG9SWBKWHFTONqBd/m7qpXbdkyjz8=";
   };
 
   enableParallelBuilding = true;
@@ -57,6 +57,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Cross-platform C++ and C library to decode tracked music files into a raw PCM audio stream";
+    mainProgram = "openmpt123";
     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.
diff --git a/pkgs/development/libraries/audio/lv2/default.nix b/pkgs/development/libraries/audio/lv2/default.nix
index d0f85c95a077..473b246f3f9d 100644
--- a/pkgs/development/libraries/audio/lv2/default.nix
+++ b/pkgs/development/libraries/audio/lv2/default.nix
@@ -59,6 +59,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://lv2plug.in";
     description = "A plugin standard for audio systems";
+    mainProgram = "lv2_validate";
     license = licenses.mit;
     maintainers = with maintainers; [ goibhniu ];
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/audio/lvtk/default.nix b/pkgs/development/libraries/audio/lvtk/default.nix
index 9822640f8d67..b1a6adaaeca2 100644
--- a/pkgs/development/libraries/audio/lvtk/default.nix
+++ b/pkgs/development/libraries/audio/lvtk/default.nix
@@ -34,6 +34,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A set C++ wrappers around the LV2 C API";
+    mainProgram = "ttl2c";
     homepage = "https://lvtk.org/";
     license = licenses.gpl3;
     maintainers = [ maintainers.goibhniu ];
diff --git a/pkgs/development/libraries/avro-c++/default.nix b/pkgs/development/libraries/avro-c++/default.nix
index 57070c8f442e..d0d899fe9935 100644
--- a/pkgs/development/libraries/avro-c++/default.nix
+++ b/pkgs/development/libraries/avro-c++/default.nix
@@ -36,6 +36,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "A C++ library which implements parts of the Avro Specification";
+    mainProgram = "avrogencpp";
     homepage = "https://avro.apache.org/";
     license = lib.licenses.asl20;
     maintainers = with lib.maintainers; [ rasendubi ];
diff --git a/pkgs/development/libraries/aws-c-cal/aws-c-cal-musl-compat.patch b/pkgs/development/libraries/aws-c-cal/aws-c-cal-musl-compat.patch
new file mode 100644
index 000000000000..2cf1d4e81e0b
--- /dev/null
+++ b/pkgs/development/libraries/aws-c-cal/aws-c-cal-musl-compat.patch
@@ -0,0 +1,33 @@
+From: Emil Lerch <emil@lerch.org>
+Date: Wed, 28 Apr 2021 17:46:24 -0700
+Subject: [PATCH] Allow dlopen to fail on musl systems
+
+Now that references are forced when linking statically, the assertion is
+no longer necessary. See https://github.com/awslabs/aws-c-cal/pull/54
+---
+ source/unix/openssl_platform_init.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/source/unix/openssl_platform_init.c b/source/unix/openssl_platform_init.c
+index 5266ecc1..99f210bd 100644
+--- a/source/unix/openssl_platform_init.c
++++ b/source/unix/openssl_platform_init.c
+@@ -496,7 +502,6 @@ static enum aws_libcrypto_version s_resolve_libcrypto(void) {
+     /* Try to auto-resolve against what's linked in/process space */
+     FLOGF("searching process and loaded modules");
+     void *process = dlopen(NULL, RTLD_NOW);
+-    AWS_FATAL_ASSERT(process && "Unable to load symbols from process space");
+     enum aws_libcrypto_version result = s_resolve_libcrypto_symbols(AWS_LIBCRYPTO_LC, process);
+     if (result == AWS_LIBCRYPTO_NONE) {
+         result = s_resolve_libcrypto_symbols(AWS_LIBCRYPTO_1_0_2, process);
+@@ -504,7 +509,9 @@ static enum aws_libcrypto_version s_resolve_libcrypto(void) {
+     if (result == AWS_LIBCRYPTO_NONE) {
+         result = s_resolve_libcrypto_symbols(AWS_LIBCRYPTO_1_1_1, process);
+     }
+-    dlclose(process);
++    if (process) {
++        dlclose(process);
++    }
+ 
+     if (result == AWS_LIBCRYPTO_NONE) {
+         FLOGF("libcrypto symbols were not statically linked, searching for shared libraries");
diff --git a/pkgs/development/libraries/aws-c-cal/default.nix b/pkgs/development/libraries/aws-c-cal/default.nix
index 68c575312d49..0188c8937c90 100644
--- a/pkgs/development/libraries/aws-c-cal/default.nix
+++ b/pkgs/development/libraries/aws-c-cal/default.nix
@@ -1,16 +1,21 @@
 { lib, stdenv, fetchFromGitHub, cmake, aws-c-common, nix, openssl, Security }:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
   pname = "aws-c-cal";
   version = "0.6.10";
 
   src = fetchFromGitHub {
     owner = "awslabs";
-    repo = pname;
-    rev = "v${version}";
-    sha256 = "sha256-rzJypIf0DrKI/2Wt5vFop34dL+KYTeCfWC0RflZpiMo=";
+    repo = finalAttrs.pname;
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-rzJypIf0DrKI/2Wt5vFop34dL+KYTeCfWC0RflZpiMo=";
   };
 
+  patches = [
+    # Fix openssl adaptor code for musl based static binaries.
+    ./aws-c-cal-musl-compat.patch
+  ];
+
   nativeBuildInputs = [ cmake ];
 
   buildInputs = [ aws-c-common openssl ];
@@ -32,4 +37,4 @@ stdenv.mkDerivation rec {
     platforms = platforms.unix;
     maintainers = with maintainers; [ orivej ];
   };
-}
+})
diff --git a/pkgs/development/libraries/babl/default.nix b/pkgs/development/libraries/babl/default.nix
index 12dcbd12b9dd..b3ec8194c92a 100644
--- a/pkgs/development/libraries/babl/default.nix
+++ b/pkgs/development/libraries/babl/default.nix
@@ -35,6 +35,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Image pixel format conversion library";
+    mainProgram = "babl";
     homepage = "https://gegl.org/babl/";
     changelog = "https://gitlab.gnome.org/GNOME/babl/-/blob/BABL_${lib.replaceStrings [ "." ] [ "_" ] version}/NEWS";
     license = licenses.lgpl3Plus;
diff --git a/pkgs/development/libraries/bashup-events/generic.nix b/pkgs/development/libraries/bashup-events/generic.nix
index f8a17f3bb11e..c3e2269a8a12 100644
--- a/pkgs/development/libraries/bashup-events/generic.nix
+++ b/pkgs/development/libraries/bashup-events/generic.nix
@@ -78,6 +78,7 @@ resholve.mkDerivation rec {
   meta = with lib; {
     inherit branch;
     description = "An event listener/callback API for creating extensible bash programs";
+    mainProgram = "bashup.events";
     homepage = "https://github.com/bashup/events";
     license = licenses.cc0;
     maintainers = with maintainers; [ abathur ];
diff --git a/pkgs/development/libraries/basu/default.nix b/pkgs/development/libraries/basu/default.nix
index 25e5adf65771..4665c4c2d158 100644
--- a/pkgs/development/libraries/basu/default.nix
+++ b/pkgs/development/libraries/basu/default.nix
@@ -48,6 +48,7 @@ stdenv.mkDerivation (finalAttrs: {
   meta = {
     homepage = "https://sr.ht/~emersion/basu";
     description = "The sd-bus library, extracted from systemd";
+    mainProgram = "basuctl";
     license = lib.licenses.lgpl21Only;
     maintainers = with lib.maintainers; [ AndersonTorres ];
     platforms = lib.platforms.linux;
diff --git a/pkgs/development/libraries/bctoolbox/default.nix b/pkgs/development/libraries/bctoolbox/default.nix
index e473fa97a0ea..1da254093b1b 100644
--- a/pkgs/development/libraries/bctoolbox/default.nix
+++ b/pkgs/development/libraries/bctoolbox/default.nix
@@ -40,6 +40,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Utilities library for Linphone";
+    mainProgram = "bctoolbox_tester";
     homepage = "https://gitlab.linphone.org/BC/public/bctoolbox";
     license = licenses.gpl3Plus;
     maintainers = with maintainers; [ raskin jluttine ];
diff --git a/pkgs/development/libraries/belle-sip/default.nix b/pkgs/development/libraries/belle-sip/default.nix
index 338b0082be5e..b4b5629cdafb 100644
--- a/pkgs/development/libraries/belle-sip/default.nix
+++ b/pkgs/development/libraries/belle-sip/default.nix
@@ -44,6 +44,7 @@ stdenv.mkDerivation rec {
   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.";
+    mainProgram = "belle_sip_tester";
     license = licenses.gpl3Plus;
     platforms = platforms.all;
     maintainers = with maintainers; [ jluttine ];
diff --git a/pkgs/development/libraries/boringssl/default.nix b/pkgs/development/libraries/boringssl/default.nix
index 3e8908416185..fadf478e037f 100644
--- a/pkgs/development/libraries/boringssl/default.nix
+++ b/pkgs/development/libraries/boringssl/default.nix
@@ -59,6 +59,7 @@ buildGoModule {
 
   meta = with lib; {
     description = "Free TLS/SSL implementation";
+    mainProgram = "bssl";
     homepage    = "https://boringssl.googlesource.com";
     maintainers = [ maintainers.thoughtpolice ];
     license = with licenses; [ openssl isc mit bsd3 ];
diff --git a/pkgs/development/libraries/botan/generic.nix b/pkgs/development/libraries/botan/generic.nix
index 8e053581e88b..a2acb8183283 100644
--- a/pkgs/development/libraries/botan/generic.nix
+++ b/pkgs/development/libraries/botan/generic.nix
@@ -56,6 +56,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Cryptographic algorithms library";
+    mainProgram = "botan";
     maintainers = with maintainers; [ raskin thillux ];
     platforms = platforms.unix;
     license = licenses.bsd2;
diff --git a/pkgs/development/libraries/cairo/default.nix b/pkgs/development/libraries/cairo/default.nix
index 8ac9da237d19..7408a43272e9 100644
--- a/pkgs/development/libraries/cairo/default.nix
+++ b/pkgs/development/libraries/cairo/default.nix
@@ -93,6 +93,7 @@ in {
 
   meta = with lib; {
     description = "A 2D graphics library with support for multiple output devices";
+    mainProgram = "cairo-trace";
     longDescription = ''
       Cairo is a 2D graphics library with support for multiple output
       devices.  Currently supported output targets include the X
diff --git a/pkgs/development/libraries/cdo/default.nix b/pkgs/development/libraries/cdo/default.nix
index b016aa4d4d68..18a6dc57434a 100644
--- a/pkgs/development/libraries/cdo/default.nix
+++ b/pkgs/development/libraries/cdo/default.nix
@@ -30,6 +30,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Collection of command line Operators to manipulate and analyse Climate and NWP model Data";
+    mainProgram = "cdo";
     longDescription = ''
       Supported data formats are GRIB 1/2, netCDF 3/4, SERVICE, EXTRA and IEG.
       There are more than 600 operators available.
diff --git a/pkgs/development/libraries/cegui/default.nix b/pkgs/development/libraries/cegui/default.nix
index c56c59d02ad1..1e884b3d8a81 100644
--- a/pkgs/development/libraries/cegui/default.nix
+++ b/pkgs/development/libraries/cegui/default.nix
@@ -52,6 +52,7 @@ stdenv.mkDerivation {
   meta = with lib; {
     homepage = "http://cegui.org.uk/";
     description = "C++ Library for creating GUIs";
+    mainProgram = "CEGUISampleFramework-0.9999";
     license = licenses.mit;
     platforms = platforms.unix;
   };
diff --git a/pkgs/development/libraries/cgreen/default.nix b/pkgs/development/libraries/cgreen/default.nix
index 60d5bc1289ac..921eb6c79724 100644
--- a/pkgs/development/libraries/cgreen/default.nix
+++ b/pkgs/development/libraries/cgreen/default.nix
@@ -26,6 +26,7 @@ stdenv.mkDerivation (finalAttrs: {
   meta = {
     homepage = "https://github.com/cgreen-devs/cgreen";
     description = "The Modern Unit Test and Mocking Framework for C and C++";
+    mainProgram = "cgreen-runner";
     license = lib.licenses.isc;
     maintainers = [ lib.maintainers.AndersonTorres ];
     platforms = lib.platforms.unix;
diff --git a/pkgs/development/libraries/chipmunk/default.nix b/pkgs/development/libraries/chipmunk/default.nix
index 8290e60a4850..599cf9cfcee2 100644
--- a/pkgs/development/libraries/chipmunk/default.nix
+++ b/pkgs/development/libraries/chipmunk/default.nix
@@ -30,6 +30,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A fast and lightweight 2D game physics library";
+    mainProgram = "chipmunk_demos";
     homepage = "http://chipmunk2d.net/";
     license = licenses.mit;
     platforms = platforms.unix; # supports Windows and MacOS as well, but those require more work
diff --git a/pkgs/development/libraries/chromaprint/default.nix b/pkgs/development/libraries/chromaprint/default.nix
index 189154da8c4e..bc53e2257f12 100644
--- a/pkgs/development/libraries/chromaprint/default.nix
+++ b/pkgs/development/libraries/chromaprint/default.nix
@@ -43,6 +43,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://acoustid.org/chromaprint";
     description = "AcoustID audio fingerprinting library";
+    mainProgram = "fpcalc";
     license = licenses.lgpl21Plus;
     platforms = platforms.unix;
   };
diff --git a/pkgs/development/libraries/civetweb/default.nix b/pkgs/development/libraries/civetweb/default.nix
index 3222702f5a1a..f6fe616957d6 100644
--- a/pkgs/development/libraries/civetweb/default.nix
+++ b/pkgs/development/libraries/civetweb/default.nix
@@ -40,6 +40,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "Embedded C/C++ web server";
+    mainProgram = "civetweb";
     homepage = "https://github.com/civetweb/civetweb";
     license = [ lib.licenses.mit ];
   };
diff --git a/pkgs/development/libraries/cln/default.nix b/pkgs/development/libraries/cln/default.nix
index a7094d18e6ea..ae3ed853a026 100644
--- a/pkgs/development/libraries/cln/default.nix
+++ b/pkgs/development/libraries/cln/default.nix
@@ -13,6 +13,7 @@ gccStdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "C/C++ library for numbers, a part of GiNaC";
+    mainProgram = "pi";
     homepage = "https://www.ginac.de/CLN/";
     license = licenses.gpl2;
     platforms = platforms.unix; # Once had cygwin problems
diff --git a/pkgs/development/libraries/cloog-ppl/default.nix b/pkgs/development/libraries/cloog-ppl/default.nix
index 65d6a392ffdb..3a6f926b3f32 100644
--- a/pkgs/development/libraries/cloog-ppl/default.nix
+++ b/pkgs/development/libraries/cloog-ppl/default.nix
@@ -25,6 +25,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "CLooG-PPL, the Chunky Loop Generator";
+    mainProgram = "cloog";
 
     longDescription = ''
       CLooG is a free software library to generate code for scanning
diff --git a/pkgs/development/libraries/cloog/0.18.0.nix b/pkgs/development/libraries/cloog/0.18.0.nix
index 12e279797e76..a1ba3aaf93f3 100644
--- a/pkgs/development/libraries/cloog/0.18.0.nix
+++ b/pkgs/development/libraries/cloog/0.18.0.nix
@@ -21,6 +21,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "Library that generates loops for scanning polyhedra";
+    mainProgram = "cloog";
 
     longDescription = ''
       CLooG is a free software library to generate code for scanning
diff --git a/pkgs/development/libraries/cloog/default.nix b/pkgs/development/libraries/cloog/default.nix
index bfca886e03d5..3ae266c61cdd 100644
--- a/pkgs/development/libraries/cloog/default.nix
+++ b/pkgs/development/libraries/cloog/default.nix
@@ -23,6 +23,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "Library that generates loops for scanning polyhedra";
+    mainProgram = "cloog";
 
     longDescription = ''
       CLooG is a free software library to generate code for scanning
diff --git a/pkgs/development/libraries/cmark-gfm/default.nix b/pkgs/development/libraries/cmark-gfm/default.nix
index 650913fc3888..75ff3acdb947 100644
--- a/pkgs/development/libraries/cmark-gfm/default.nix
+++ b/pkgs/development/libraries/cmark-gfm/default.nix
@@ -16,6 +16,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "GitHub's fork of cmark, a CommonMark parsing and rendering library and program in C";
+    mainProgram = "cmark-gfm";
     homepage = "https://github.com/github/cmark-gfm";
     changelog = "https://github.com/github/cmark-gfm/raw/${version}/changelog.txt";
     maintainers = with maintainers; [ cyplo ];
diff --git a/pkgs/development/libraries/cmark/default.nix b/pkgs/development/libraries/cmark/default.nix
index 23d00769ee1b..5720f87c5bc4 100644
--- a/pkgs/development/libraries/cmark/default.nix
+++ b/pkgs/development/libraries/cmark/default.nix
@@ -29,6 +29,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "CommonMark parsing and rendering library and program in C";
+    mainProgram = "cmark";
     homepage = "https://github.com/commonmark/cmark";
     changelog = "https://github.com/commonmark/cmark/raw/${version}/changelog.txt";
     maintainers = [ maintainers.michelk ];
diff --git a/pkgs/development/libraries/codec2/default.nix b/pkgs/development/libraries/codec2/default.nix
index 7b1a226de812..8637f5b7ab2d 100644
--- a/pkgs/development/libraries/codec2/default.nix
+++ b/pkgs/development/libraries/codec2/default.nix
@@ -43,6 +43,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Speech codec designed for communications quality speech at low data rates";
+    mainProgram = "freedv_rx";
     homepage = "https://www.rowetel.com/codec2.html";
     license = licenses.lgpl21Only;
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/coin3d/default.nix b/pkgs/development/libraries/coin3d/default.nix
index 7675ddae378e..8c331a28dcb1 100644
--- a/pkgs/development/libraries/coin3d/default.nix
+++ b/pkgs/development/libraries/coin3d/default.nix
@@ -33,6 +33,7 @@ stdenv.mkDerivation (finalAttrs: {
   meta = with lib; {
     homepage = "https://github.com/coin3d/coin";
     description = "High-level, retained-mode toolkit for effective 3D graphics development";
+    mainProgram = "coin-config";
     license = licenses.bsd3;
     maintainers = with maintainers; [ gebner viric ];
     platforms = platforms.linux;
diff --git a/pkgs/development/libraries/cppunit/default.nix b/pkgs/development/libraries/cppunit/default.nix
index fba624a861d7..73c96de4ff24 100644
--- a/pkgs/development/libraries/cppunit/default.nix
+++ b/pkgs/development/libraries/cppunit/default.nix
@@ -16,6 +16,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://freedesktop.org/wiki/Software/cppunit/";
     description = "C++ unit testing framework";
+    mainProgram = "DllPlugInTester";
     license = licenses.lgpl21;
     platforms = platforms.linux ++ platforms.darwin;
   };
diff --git a/pkgs/development/libraries/ctpl/default.nix b/pkgs/development/libraries/ctpl/default.nix
index 634c2cf44cf4..c9925d162f99 100644
--- a/pkgs/development/libraries/ctpl/default.nix
+++ b/pkgs/development/libraries/ctpl/default.nix
@@ -15,6 +15,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "http://ctpl.tuxfamily.org/";
     description = "Template engine library written in C";
+    mainProgram = "ctpl";
     platforms = platforms.linux;
     maintainers = [ ];
     license = licenses.gpl3Plus;
diff --git a/pkgs/development/libraries/ctranslate2/default.nix b/pkgs/development/libraries/ctranslate2/default.nix
index 943b9f28584c..c7876a98bd54 100644
--- a/pkgs/development/libraries/ctranslate2/default.nix
+++ b/pkgs/development/libraries/ctranslate2/default.nix
@@ -84,6 +84,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Fast inference engine for Transformer models";
+    mainProgram = "ct2-translator";
     homepage = "https://github.com/OpenNMT/CTranslate2";
     changelog = "https://github.com/OpenNMT/CTranslate2/blob/${src.rev}/CHANGELOG.md";
     license = licenses.mit;
diff --git a/pkgs/development/libraries/ctypes_sh/default.nix b/pkgs/development/libraries/ctypes_sh/default.nix
index 644c68e85d86..c06eff11aad0 100644
--- a/pkgs/development/libraries/ctypes_sh/default.nix
+++ b/pkgs/development/libraries/ctypes_sh/default.nix
@@ -20,6 +20,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A foreign function interface for bash";
+    mainProgram = "ctypes.sh";
     homepage = "https://github.com/taviso/ctypes.sh";
     license = licenses.mit;
     maintainers = with maintainers; [ tadeokondrak ];
diff --git a/pkgs/development/libraries/curlpp/default.nix b/pkgs/development/libraries/curlpp/default.nix
index 0aee75751d9e..c8fe78d0462f 100644
--- a/pkgs/development/libraries/curlpp/default.nix
+++ b/pkgs/development/libraries/curlpp/default.nix
@@ -16,6 +16,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://www.curlpp.org/";
     description = "C++ wrapper around libcURL";
+    mainProgram = "curlpp-config";
     license = licenses.mit;
     maintainers = with maintainers; [ CrazedProgrammer ];
   };
diff --git a/pkgs/development/libraries/cutee/default.nix b/pkgs/development/libraries/cutee/default.nix
index 07e2b7cbcee2..eb5f51cbcfeb 100644
--- a/pkgs/development/libraries/cutee/default.nix
+++ b/pkgs/development/libraries/cutee/default.nix
@@ -18,6 +18,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "C++ Unit Testing Easy Environment";
+    mainProgram = "cutee";
     homepage    = "https://www.codesink.org/cutee_unit_testing.html";
     license     = licenses.gpl2Plus;
     maintainers = with maintainers; [ leenaars];
diff --git a/pkgs/development/libraries/cxx-rs/default.nix b/pkgs/development/libraries/cxx-rs/default.nix
index c06171e72ce5..a2864fbb89df 100644
--- a/pkgs/development/libraries/cxx-rs/default.nix
+++ b/pkgs/development/libraries/cxx-rs/default.nix
@@ -47,6 +47,7 @@ rustPlatform.buildRustPackage rec {
 
   meta = with lib; {
     description = "Safe FFI between Rust and C++";
+    mainProgram = "cxxbridge";
     homepage = "https://github.com/dtolnay/cxx";
     license = licenses.mit;
     maintainers = with maintainers; [ centromere ];
diff --git a/pkgs/development/libraries/cxxtest/default.nix b/pkgs/development/libraries/cxxtest/default.nix
index 4228a3cb5876..545aa4bc0e0c 100644
--- a/pkgs/development/libraries/cxxtest/default.nix
+++ b/pkgs/development/libraries/cxxtest/default.nix
@@ -40,6 +40,7 @@ python3Packages.buildPythonApplication rec {
   meta = with lib; {
     homepage = "http://cxxtest.com";
     description = "Unit testing framework for C++";
+    mainProgram = "cxxtestgen";
     license = licenses.lgpl3;
     platforms = platforms.unix;
     maintainers = with maintainers; [ juliendehos ];
diff --git a/pkgs/development/libraries/czmq/default.nix b/pkgs/development/libraries/czmq/default.nix
index bb8ecafbb347..db2b99c96650 100644
--- a/pkgs/development/libraries/czmq/default.nix
+++ b/pkgs/development/libraries/czmq/default.nix
@@ -15,6 +15,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "http://czmq.zeromq.org/";
     description = "High-level C Binding for ZeroMQ";
+    mainProgram = "zmakecert";
     license = licenses.mpl20;
     platforms = platforms.all;
   };
diff --git a/pkgs/development/libraries/db/db-6.0.nix b/pkgs/development/libraries/db/db-6.0.nix
index 0d8504c9234c..d92d28d094e6 100644
--- a/pkgs/development/libraries/db/db-6.0.nix
+++ b/pkgs/development/libraries/db/db-6.0.nix
@@ -3,7 +3,7 @@
 import ./generic.nix (args // {
   version = "6.0.30";
   sha256 = "1lhglbvg65j5slrlv7qv4vi3cvd7kjywa07gq1abzschycf4p3k0";
-  license = lib.licenses.agpl3;
+  license = lib.licenses.agpl3Only;
   extraPatches = [
     ./clang-6.0.patch
     ./CVE-2017-10140-cwd-db_config.patch
diff --git a/pkgs/development/libraries/db/db-6.2.nix b/pkgs/development/libraries/db/db-6.2.nix
index 2c1cb455feae..fd5a53253522 100644
--- a/pkgs/development/libraries/db/db-6.2.nix
+++ b/pkgs/development/libraries/db/db-6.2.nix
@@ -3,7 +3,7 @@
 import ./generic.nix (args // {
   version = "6.2.32";
   sha256 = "1yx8wzhch5wwh016nh0kfxvknjkafv6ybkqh6nh7lxx50jqf5id9";
-  license = lib.licenses.agpl3;
+  license = lib.licenses.agpl3Only;
   extraPatches = [
     ./clang-6.0.patch
     ./CVE-2017-10140-cwd-db_config.patch
diff --git a/pkgs/development/libraries/dbus-glib/default.nix b/pkgs/development/libraries/dbus-glib/default.nix
index c6be0dd419db..b2946872fbbd 100644
--- a/pkgs/development/libraries/dbus-glib/default.nix
+++ b/pkgs/development/libraries/dbus-glib/default.nix
@@ -32,6 +32,7 @@ stdenv.mkDerivation rec {
     homepage = "https://dbus.freedesktop.org";
     license = with lib.licenses; [ afl21 gpl2Plus ];
     description = "Obsolete glib bindings for D-Bus lightweight IPC mechanism";
+    mainProgram = "dbus-binding-tool";
     maintainers = [ ];
     platforms = lib.platforms.unix;
   };
diff --git a/pkgs/development/libraries/dbxml/default.nix b/pkgs/development/libraries/dbxml/default.nix
index c65e7ad93eca..b6dcf908c4f9 100644
--- a/pkgs/development/libraries/dbxml/default.nix
+++ b/pkgs/development/libraries/dbxml/default.nix
@@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://www.oracle.com/database/berkeley-db/xml.html";
     description = "Embeddable XML database based on Berkeley DB";
-    license = licenses.agpl3;
+    license = licenses.agpl3Only;
     maintainers = with maintainers; [ ];
     platforms = platforms.unix;
   };
diff --git a/pkgs/development/libraries/dee/default.nix b/pkgs/development/libraries/dee/default.nix
index 4a2199f450e6..4bece9069466 100644
--- a/pkgs/development/libraries/dee/default.nix
+++ b/pkgs/development/libraries/dee/default.nix
@@ -64,6 +64,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A library that uses DBus to provide objects allowing you to create Model-View-Controller type programs across DBus";
+    mainProgram = "dee-tool";
     homepage = "https://launchpad.net/dee";
     license = licenses.lgpl3;
     platforms = platforms.linux;
diff --git a/pkgs/development/libraries/duckdb/default.nix b/pkgs/development/libraries/duckdb/default.nix
index e6645480d2b2..be1a20987881 100644
--- a/pkgs/development/libraries/duckdb/default.nix
+++ b/pkgs/development/libraries/duckdb/default.nix
@@ -15,32 +15,22 @@
 
 let
   enableFeature = yes: if yes then "ON" else "OFF";
+  versions = lib.importJSON ./versions.json;
 in
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
   pname = "duckdb";
-  version = "0.10.0";
+  inherit (versions) rev version;
 
   src = fetchFromGitHub {
-    owner = pname;
-    repo = pname;
-    rev = "refs/tags/v${version}";
-    hash = "sha256-qGUq0iYTaLNHKqbXNLRmvqHMqunvIlP991IKb4qdSt4=";
+    # to update run:
+    # nix-shell maintainers/scripts/update.nix --argstr path duckdb
+    inherit (versions) hash;
+    owner = "duckdb";
+    repo = "duckdb";
+    rev = "refs/tags/v${finalAttrs.version}";
   };
 
-  patches = [
-    # remove calls to git and set DUCKDB_VERSION to version
-    (substituteAll {
-      src = ./version.patch;
-      version = "v${version}";
-    })
-    # add missing file needed for httpfs compile
-    # remove on next update
-    (fetchpatch {
-      name = "missing-httpfs-file.patch";
-      url = "https://github.com/duckdb/duckdb/commit/3d7aa3ed46ecf5f18122559e385b75f1f5e9aba8.patch";
-      hash = "sha256-Q4IHCpMpxn86OquUZdEF7P0nHEPOcWS0TQijTkvBYbQ=";
-    })
-  ];
+  outputs = [ "out" "lib" "dev" ];
 
   nativeBuildInputs = [ cmake ninja python3 ];
   buildInputs = [ openssl ]
@@ -48,22 +38,22 @@ stdenv.mkDerivation rec {
     ++ lib.optionals withOdbc [ unixODBC ];
 
   cmakeFlags = [
-    "-DDUCKDB_EXTENSION_CONFIGS=${src}/.github/config/in_tree_extensions.cmake"
+    "-DDUCKDB_EXTENSION_CONFIGS=${finalAttrs.src}/.github/config/in_tree_extensions.cmake"
     "-DBUILD_ODBC_DRIVER=${enableFeature withOdbc}"
     "-DJDBC_DRIVER=${enableFeature withJdbc}"
-  ] ++ lib.optionals doInstallCheck [
+    "-DOVERRIDE_GIT_DESCRIBE=v${finalAttrs.version}-0-g${finalAttrs.rev}"
+  ] ++ lib.optionals finalAttrs.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}"
+  postInstall = ''
+    mkdir -p $lib
+    mv $out/lib $lib
   '';
 
+  doInstallCheck = true;
+
   installCheckPhase =
     let
       excludes = map (pattern: "exclude:'${pattern}'") ([
@@ -105,26 +95,29 @@ stdenv.mkDerivation rec {
         "test/sql/copy/csv/auto/test_csv_auto.test"
         # test expects installed file timestamp to be > 2024
         "test/sql/table_function/read_text_and_blob.test"
-        # can re-enable next update (broken for 0.10.0)
-        "test/sql/secrets/create_secret_non_writable_persistent_dir.test"
-        # https://github.com/duckdb/duckdb/issues/10722
-        "test/sql/types/nested/list/list_aggregate_dict.test"
+        # fails with Out of Memory Error
+        "test/sql/copy/parquet/batched_write/batch_memory_usage.test"
+        # wants http connection
+        "test/sql/copy/csv/test_mixed_lines.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"
       ]);
+      LD_LIBRARY_PATH = lib.optionalString stdenv.isDarwin "DY" + "LD_LIBRARY_PATH";
     in
     ''
       runHook preInstallCheck
 
-      ./test/unittest ${toString excludes}
+      HOME="$(mktemp -d)" ${LD_LIBRARY_PATH}="$lib/lib" ./test/unittest ${toString excludes}
 
       runHook postInstallCheck
     '';
 
+  passthru.updateScript = ./update.sh;
+
   meta = with lib; {
-    changelog = "https://github.com/duckdb/duckdb/releases/tag/v${version}";
+    changelog = "https://github.com/duckdb/duckdb/releases/tag/v${finalAttrs.version}";
     description = "Embeddable SQL OLAP Database Management System";
     homepage = "https://duckdb.org/";
     license = licenses.mit;
@@ -132,4 +125,4 @@ stdenv.mkDerivation rec {
     maintainers = with maintainers; [ costrouc cpcloud ];
     platforms = platforms.all;
   };
-}
+})
diff --git a/pkgs/development/libraries/duckdb/update.sh b/pkgs/development/libraries/duckdb/update.sh
new file mode 100755
index 000000000000..f3acd176ee86
--- /dev/null
+++ b/pkgs/development/libraries/duckdb/update.sh
@@ -0,0 +1,45 @@
+#!/usr/bin/env nix-shell
+#!nix-shell --pure -i bash -p cacert curl jq moreutils nix-prefetch
+# shellcheck shell=bash
+
+set -euo pipefail
+cd "$(dirname "${BASH_SOURCE[0]}")"
+
+nixpkgs=$(while [[ ! -e .git ]]; do [[ ${PWD} != / ]] || exit 1; cd ..; done; echo "${PWD}")
+
+repo=duckdb
+owner=duckdb
+
+msg() {
+    echo "$*" >&2
+}
+
+json_get() {
+    jq -r "$1" < 'versions.json'
+}
+
+json_set() {
+    jq --arg x "$2" "$1 = \$x" < 'versions.json' | sponge 'versions.json'
+}
+
+get_latest() {
+    curl ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} -s \
+        "https://api.github.com/repos/${owner}/${repo}/releases/latest" | jq -r .tag_name
+}
+
+get_sha() {
+    curl ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} -s \
+        "https://api.github.com/repos/${owner}/${repo}/git/ref/tags/$1" | jq -r .object.sha
+}
+
+tag=$(get_latest)
+version=${tag/v/}
+
+[[ ${version} = $(json_get .version) ]] && { msg "${version} is up to date"; exit 0; }
+
+sha=$(get_sha "${tag}")
+sri=$(nix-prefetch -I nixpkgs="${nixpkgs}" -E "duckdb.overrideAttrs { version = \"${version}\"; }")
+
+json_set ".version" "${version}"
+json_set ".rev" "${sha}"
+json_set ".hash" "${sri}"
diff --git a/pkgs/development/libraries/duckdb/version.patch b/pkgs/development/libraries/duckdb/version.patch
deleted file mode 100644
index 122ad4295d41..000000000000
--- a/pkgs/development/libraries/duckdb/version.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-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 "@version@")
- 
- message(STATUS "git hash ${GIT_COMMIT_HASH}, version ${DUCKDB_VERSION}")
- 
diff --git a/pkgs/development/libraries/duckdb/versions.json b/pkgs/development/libraries/duckdb/versions.json
new file mode 100644
index 000000000000..efb151413e3d
--- /dev/null
+++ b/pkgs/development/libraries/duckdb/versions.json
@@ -0,0 +1,5 @@
+{
+  "version": "0.10.1",
+  "rev": "4a89d97db8a5a23a15f3025c8d2d2885337c2637",
+  "hash": "sha256-/j/DaUzsfACI5Izr4lblkYmIEmKsOXr760UTwC0l/qg="
+}
diff --git a/pkgs/development/libraries/exempi/default.nix b/pkgs/development/libraries/exempi/default.nix
index 2ebf1ce7cc91..e79bc6169802 100644
--- a/pkgs/development/libraries/exempi/default.nix
+++ b/pkgs/development/libraries/exempi/default.nix
@@ -25,6 +25,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "An implementation of XMP (Adobe's Extensible Metadata Platform)";
+    mainProgram = "exempi";
     homepage = "https://libopenraw.freedesktop.org/exempi/";
     platforms = platforms.linux ++ platforms.darwin;
     license = licenses.bsd3;
diff --git a/pkgs/development/libraries/exiv2/default.nix b/pkgs/development/libraries/exiv2/default.nix
index f080bd804b48..0ef833b8aa23 100644
--- a/pkgs/development/libraries/exiv2/default.nix
+++ b/pkgs/development/libraries/exiv2/default.nix
@@ -98,6 +98,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://exiv2.org";
     description = "A library and command-line utility to manage image metadata";
+    mainProgram = "exiv2";
     platforms = platforms.all;
     license = licenses.gpl2Plus;
     maintainers = with maintainers; [ wegank ];
diff --git a/pkgs/development/libraries/expat/default.nix b/pkgs/development/libraries/expat/default.nix
index 27cbd38c0286..d2f4aa392cb1 100644
--- a/pkgs/development/libraries/expat/default.nix
+++ b/pkgs/development/libraries/expat/default.nix
@@ -73,6 +73,7 @@ stdenv.mkDerivation (finalAttrs: {
     changelog = "https://github.com/libexpat/libexpat/blob/${tag}/expat/Changes";
     homepage = "https://libexpat.github.io/";
     description = "A stream-oriented XML parser library written in C";
+    mainProgram = "xmlwf";
     platforms = platforms.all;
     license = licenses.mit; # expat version
     pkgConfigModules = [ "expat" ];
diff --git a/pkgs/development/libraries/fbthrift/default.nix b/pkgs/development/libraries/fbthrift/default.nix
index a483fb1644a2..373d01892203 100644
--- a/pkgs/development/libraries/fbthrift/default.nix
+++ b/pkgs/development/libraries/fbthrift/default.nix
@@ -62,6 +62,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Facebook's branch of Apache Thrift";
+    mainProgram = "thrift1";
     homepage = "https://github.com/facebook/fbthrift";
     license = licenses.asl20;
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/fflas-ffpack/default.nix b/pkgs/development/libraries/fflas-ffpack/default.nix
index 7dadbcb39502..25bab6645e07 100644
--- a/pkgs/development/libraries/fflas-ffpack/default.nix
+++ b/pkgs/development/libraries/fflas-ffpack/default.nix
@@ -31,6 +31,7 @@ stdenv.mkDerivation rec {
   configureFlags = [
     "--with-blas-libs=-lcblas"
     "--with-lapack-libs=-llapacke"
+    "--without-archnative"
   ] ++ 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)
@@ -51,6 +52,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     broken = stdenv.isDarwin;
     description = "Finite Field Linear Algebra Subroutines";
+    mainProgram = "fflas-ffpack-config";
     license = licenses.lgpl21Plus;
     maintainers = teams.sage.members;
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/ffmpeg/4.nix b/pkgs/development/libraries/ffmpeg/4.nix
deleted file mode 100644
index e57c0fcff5bc..000000000000
--- a/pkgs/development/libraries/ffmpeg/4.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-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/pkgs/development/libraries/ffmpeg/5.nix b/pkgs/development/libraries/ffmpeg/5.nix
deleted file mode 100644
index 68edb0fd37e4..000000000000
--- a/pkgs/development/libraries/ffmpeg/5.nix
+++ /dev/null
@@ -1,21 +0,0 @@
-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/pkgs/development/libraries/ffmpeg/6.nix b/pkgs/development/libraries/ffmpeg/6.nix
deleted file mode 100644
index cebf17e071e9..000000000000
--- a/pkgs/development/libraries/ffmpeg/6.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-import ./generic.nix {
-  version = "6.1";
-  hash = "sha256-NzhD2D16bCVCyCXo0TRwZYp3Ta5eFSfoQPa+iRkeNZg=";
-  extraPatches = [
-    {
-      name = "avcodec-decode-validate-hw-frames-ctx.patch";
-      url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/e9c93009fc34ca9dfcf0c6f2ed90ef1df298abf7";
-      hash = "sha256-aE9WN7a2INbss7oRys+AC9d9+yBzlJdeBRcwSDpG0Qw=";
-    }
-  ];
-}
diff --git a/pkgs/development/libraries/ffmpeg/default.nix b/pkgs/development/libraries/ffmpeg/default.nix
new file mode 100644
index 000000000000..5c15239541d8
--- /dev/null
+++ b/pkgs/development/libraries/ffmpeg/default.nix
@@ -0,0 +1,58 @@
+{ callPackage, darwin }:
+
+let
+  mkFFmpeg =
+    initArgs: ffmpegVariant:
+    callPackage ./generic.nix (
+      {
+        inherit (darwin.apple_sdk.frameworks)
+          Cocoa
+          CoreServices
+          CoreAudio
+          CoreMedia
+          AVFoundation
+          MediaToolbox
+          VideoDecodeAcceleration
+          VideoToolbox
+          ;
+      }
+      // (initArgs // { inherit ffmpegVariant; })
+    );
+
+  v4 = {
+    version = "4.4.4";
+    hash = "sha256-Q8bkuF/1uJfqttJJoObnnLX3BEduv+qxsvOrVhMvRjA=";
+  };
+
+  v5 = {
+    version = "5.1.4";
+    hash = "sha256-2jUL1/xGUf7aMooST2DW41KE7bC+BtgChXmj0sAJZ90=";
+  };
+
+  v6 = {
+    version = "6.1.1";
+    hash = "sha256-Q0c95hbCVUHQWPoh5uC8uzMylmB4BnWg+VhXEgSouzo=";
+  };
+in
+
+rec {
+  ffmpeg_4 = mkFFmpeg v4 "small";
+  ffmpeg_4-headless = mkFFmpeg v4 "headless";
+  ffmpeg_4-full = mkFFmpeg v4 "full";
+
+  ffmpeg_5 = mkFFmpeg v5 "small";
+  ffmpeg_5-headless = mkFFmpeg v5 "headless";
+  ffmpeg_5-full = mkFFmpeg v5 "full";
+
+  ffmpeg_6 = mkFFmpeg v6 "small";
+  ffmpeg_6-headless = mkFFmpeg v6 "headless";
+  ffmpeg_6-full = mkFFmpeg v6 "full";
+
+  # Please make sure this is updated to the latest version on the next major
+  # update to ffmpeg
+  # Packages which use ffmpeg as a library, should pin to the relevant major
+  # version number which the upstream support.
+  ffmpeg = ffmpeg_6;
+  ffmpeg-headless = ffmpeg_6-headless;
+  ffmpeg-full = ffmpeg_6-full;
+}
diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix
index 8034980c8b18..6dba78cad219 100644
--- a/pkgs/development/libraries/ffmpeg/generic.nix
+++ b/pkgs/development/libraries/ffmpeg/generic.nix
@@ -1,7 +1,15 @@
-{ version, hash, extraPatches ? [] }:
-
 { lib, stdenv, buildPackages, removeReferencesTo, addOpenGLRunpath, pkg-config, perl, texinfo, yasm
 
+  # You can fetch any upstream version using this derivation by specifying version and hash
+  # NOTICE: Always use this argument to override the version. Do not use overrideAttrs.
+, version # ffmpeg ABI version. Also declare this if you're overriding the source.
+, hash ? "" # hash of the upstream source for the given ABI version
+, source ? fetchgit {
+    url = "https://git.ffmpeg.org/ffmpeg.git";
+    rev = "n${version}";
+    inherit hash;
+  }
+
 , ffmpegVariant ? "small" # Decides which dependencies are enabled by default
 
   # Build with headless deps; excludes dependencies that are only necessary for
@@ -305,7 +313,7 @@
  */
 
 let
-  inherit (lib) optional optionals optionalString enableFeature versionAtLeast;
+  inherit (lib) optional optionals optionalString enableFeature versionOlder versionAtLeast;
 in
 
 
@@ -346,12 +354,7 @@ 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;
-  };
+  src = source;
 
   postPatch = ''
     patchShebangs .
@@ -362,23 +365,40 @@ stdenv.mkDerivation (finalAttrs: {
       --replace /usr/local/lib/frei0r-1 ${frei0r}/lib/frei0r-1
   '';
 
-  patches = map (patch: fetchpatch patch) (extraPatches
-    ++ (lib.optional (lib.versionOlder version "6.1")
+  patches = map (patch: fetchpatch patch) ([ ]
+    ++ optionals (versionOlder version "5") [
+      {
+        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=";
+      }
       {
         # Backport fix for binutils-2.41.
         name = "binutils-2.41.patch";
         url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/effadce6c756247ea8bae32dc13bb3e6f464f0eb";
         hash = "sha256-vlBUMJ1bORQHRNpuzc5iXsTWwS/CN5BmGIA8g7H7mJE=";
       }
-    )
-    ++ (lib.optional (lib.versionAtLeast finalAttrs.version "6" && lib.versionOlder finalAttrs.version "6.1")
+      # 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 *'
+        '';
+      }
+    ]
+    ++ (lib.optional (lib.versionAtLeast version "6" && lib.versionOlder 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")
+    ++ (lib.optional (lib.versionAtLeast version "6.1" && lib.versionOlder 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";
@@ -439,7 +459,7 @@ stdenv.mkDerivation (finalAttrs: {
     (enableFeature buildAvdevice "avdevice")
     (enableFeature buildAvfilter "avfilter")
     (enableFeature buildAvformat "avformat")
-  ] ++ optionals (lib.versionOlder finalAttrs.version "5") [
+  ] ++ optionals (lib.versionOlder version "5") [
     # Ffmpeg > 4 doesn't know about the flag anymore
     (enableFeature buildAvresample "avresample")
   ] ++ [
@@ -470,7 +490,7 @@ stdenv.mkDerivation (finalAttrs: {
      */
     (enableFeature withAlsa "alsa")
     (enableFeature withAom "libaom")
-  ] ++ optionals (versionAtLeast finalAttrs.version "6.1") [
+  ] ++ optionals (versionAtLeast version "6.1") [
     (enableFeature withAribcaption "libaribcaption")
   ] ++ [
     (enableFeature withAss "libass")
@@ -495,7 +515,7 @@ stdenv.mkDerivation (finalAttrs: {
     (enableFeature withGme "libgme")
     (enableFeature withGnutls "gnutls")
     (enableFeature withGsm "libgsm")
-  ] ++ optionals (versionAtLeast finalAttrs.version "6.1") [
+  ] ++ optionals (versionAtLeast version "6.1") [
     (enableFeature withHarfbuzz "libharfbuzz")
   ] ++ [
     (enableFeature withIconv "iconv")
@@ -518,7 +538,7 @@ stdenv.mkDerivation (finalAttrs: {
     (enableFeature withOpenjpeg "libopenjpeg")
     (enableFeature withOpenmpt "libopenmpt")
     (enableFeature withOpus "libopus")
-  ] ++ optionals (versionAtLeast finalAttrs.version "5.0") [
+  ] ++ optionals (versionAtLeast version "5.0") [
     (enableFeature withPlacebo "libplacebo")
   ] ++ [
     (enableFeature withPulse "libpulse")
@@ -526,7 +546,7 @@ stdenv.mkDerivation (finalAttrs: {
     (enableFeature withRtmp "librtmp")
     (enableFeature withSamba "libsmbclient")
     (enableFeature withSdl2 "sdl2")
-  ] ++ optionals (versionAtLeast finalAttrs.version "5.0") [
+  ] ++ optionals (versionAtLeast version "5.0") [
     (enableFeature withShaderc "libshaderc")
   ] ++ [
     (enableFeature withSoxr "libsoxr")
@@ -624,7 +644,7 @@ stdenv.mkDerivation (finalAttrs: {
   ++ optionals withModplug [ libmodplug ]
   ++ optionals withMp3lame [ lame ]
   ++ optionals withMysofa [ libmysofa ]
-  ++ optionals (withNvdec || withNvenc) [ (if (lib.versionAtLeast finalAttrs.version "6") then nv-codec-headers-12 else nv-codec-headers) ]
+  ++ optionals (withNvdec || withNvenc) [ (if (lib.versionAtLeast version "6") then nv-codec-headers-12 else nv-codec-headers) ]
   ++ optionals withOgg [ libogg ]
   ++ optionals withOpenal [ openal ]
   ++ optionals withOpencl [ ocl-icd opencl-headers ]
@@ -634,7 +654,7 @@ stdenv.mkDerivation (finalAttrs: {
   ++ 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 withPlacebo [ (if (lib.versionAtLeast version "6.1") then libplacebo else libplacebo_5) vulkan-headers ]
   ++ optionals withPulse [ libpulseaudio ]
   ++ optionals withRav1e [ rav1e ]
   ++ optionals withRtmp [ rtmpdump ]
@@ -733,7 +753,7 @@ stdenv.mkDerivation (finalAttrs: {
   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";
+    changelog = "https://github.com/FFmpeg/FFmpeg/blob/n${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
diff --git a/pkgs/development/libraries/ffmpegthumbnailer/default.nix b/pkgs/development/libraries/ffmpegthumbnailer/default.nix
index 381bb7b2984c..47e3c3ed42c7 100644
--- a/pkgs/development/libraries/ffmpegthumbnailer/default.nix
+++ b/pkgs/development/libraries/ffmpegthumbnailer/default.nix
@@ -25,6 +25,7 @@ stdenv.mkDerivation rec {
   meta = with lib;  {
     homepage = "https://github.com/dirkvdb/ffmpegthumbnailer";
     description = "A lightweight video thumbnailer";
+    mainProgram = "ffmpegthumbnailer";
     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
diff --git a/pkgs/development/libraries/ffms/default.nix b/pkgs/development/libraries/ffms/default.nix
index 06fce3891e27..370b4267bdb4 100644
--- a/pkgs/development/libraries/ffms/default.nix
+++ b/pkgs/development/libraries/ffms/default.nix
@@ -44,6 +44,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://github.com/FFMS/ffms2/";
     description = "FFmpeg based source library for easy frame accurate access";
+    mainProgram = "ffmsindex";
     license = licenses.mit;
     maintainers = with maintainers; [ tadeokondrak ];
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/flatcc/default.nix b/pkgs/development/libraries/flatcc/default.nix
index 1f487955b3f3..4d74627ee3c9 100644
--- a/pkgs/development/libraries/flatcc/default.nix
+++ b/pkgs/development/libraries/flatcc/default.nix
@@ -27,6 +27,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "FlatBuffers Compiler and Library in C for C ";
+    mainProgram = "flatcc";
     homepage = "https://github.com/dvidelabs/flatcc";
     license = [ licenses.asl20 ];
     maintainers = with maintainers; [ onny ];
diff --git a/pkgs/development/libraries/flint/3.nix b/pkgs/development/libraries/flint/3.nix
index 3be7fdc63904..b8b8c2d8ec7d 100644
--- a/pkgs/development/libraries/flint/3.nix
+++ b/pkgs/development/libraries/flint/3.nix
@@ -24,16 +24,19 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-ezEaAFA6hjiB64F32+uEMi8pOZ89fXLzsaTJuh1XlLQ=";
   };
 
-  propagatedBuildInputs = [
+  nativeBuildInputs = [
     autoconf
     automake
     gettext
     libtool
   ];
 
+  propagatedBuildInputs = [
+    mpfr
+  ];
+
   buildInputs = [
     gmp
-    mpfr
   ] ++ lib.optionals withBlas [
     openblas
   ] ++ lib.optionals withNtl [
diff --git a/pkgs/development/libraries/frame/default.nix b/pkgs/development/libraries/frame/default.nix
index f0b37b7e633c..e56ce1e68416 100644
--- a/pkgs/development/libraries/frame/default.nix
+++ b/pkgs/development/libraries/frame/default.nix
@@ -19,6 +19,7 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "https://launchpad.net/frame";
     description = "Handles the buildup and synchronization of a set of simultaneous touches";
+    mainProgram = "frame-test-x11";
     license = lib.licenses.gpl3;
     platforms = lib.platforms.linux;
   };
diff --git a/pkgs/development/libraries/freealut/default.nix b/pkgs/development/libraries/freealut/default.nix
index c29899922979..dbae2b20b61c 100644
--- a/pkgs/development/libraries/freealut/default.nix
+++ b/pkgs/development/libraries/freealut/default.nix
@@ -21,6 +21,7 @@ stdenv.mkDerivation (finalAttrs: {
   meta = {
     homepage = "http://openal.org/";
     description = "Free implementation of OpenAL's ALUT standard";
+    mainProgram = "freealut-config";
     license = lib.licenses.lgpl2;
     pkgConfigModules = [ "freealut" ];
     platforms = lib.platforms.unix;
diff --git a/pkgs/development/libraries/freetts/default.nix b/pkgs/development/libraries/freetts/default.nix
index 698a7f6a28ac..ec948f1fdccc 100644
--- a/pkgs/development/libraries/freetts/default.nix
+++ b/pkgs/development/libraries/freetts/default.nix
@@ -4,6 +4,7 @@
 , ant
 , jdk8
 , sharutils
+, stripJavaArchivesHook
 }:
 
 stdenv.mkDerivation (finalAttrs: {
@@ -20,16 +21,11 @@ stdenv.mkDerivation (finalAttrs: {
     ant
     jdk8
     sharutils
+    stripJavaArchivesHook
   ];
 
   sourceRoot = "${finalAttrs.src.name}/freetts-${finalAttrs.version}";
 
-  postPatch = ''
-    # Fix jar timestamps for reproducibility
-    substituteInPlace build.xml demo.xml \
-        --replace-fail '<jar ' '<jar modificationtime="0" '
-  '';
-
   buildPhase = ''
     runHook preBuild
 
diff --git a/pkgs/development/libraries/freetype/default.nix b/pkgs/development/libraries/freetype/default.nix
index 68e08a1a8b5f..1a8009f04ce7 100644
--- a/pkgs/development/libraries/freetype/default.nix
+++ b/pkgs/development/libraries/freetype/default.nix
@@ -104,6 +104,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   meta = with lib; {
     description = "A font rendering engine";
+    mainProgram = "freetype-config";
     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
diff --git a/pkgs/development/libraries/fribidi/default.nix b/pkgs/development/libraries/fribidi/default.nix
index 5672ff5375bb..d23cd352360b 100644
--- a/pkgs/development/libraries/fribidi/default.nix
+++ b/pkgs/development/libraries/fribidi/default.nix
@@ -42,6 +42,7 @@ stdenv.mkDerivation (finalAttrs: {
   meta = with lib; {
     homepage = "https://github.com/fribidi/fribidi";
     description = "GNU implementation of the Unicode Bidirectional Algorithm (bidi)";
+    mainProgram = "fribidi";
     license = licenses.lgpl21;
     platforms = platforms.unix;
     pkgConfigModules = [ "fribidi" ];
diff --git a/pkgs/development/libraries/fstrcmp/default.nix b/pkgs/development/libraries/fstrcmp/default.nix
index 2dfa02e71059..ab7f410eddf2 100644
--- a/pkgs/development/libraries/fstrcmp/default.nix
+++ b/pkgs/development/libraries/fstrcmp/default.nix
@@ -19,6 +19,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Make fuzzy comparisons of strings and byte arrays";
+    mainProgram = "fstrcmp";
     longDescription = ''
       The fstrcmp project provides a library that is used to make fuzzy
       comparisons of strings and byte arrays, including multi-byte character
diff --git a/pkgs/development/libraries/funambol/default.nix b/pkgs/development/libraries/funambol/default.nix
index 3e7bf0d21a2b..1ee66e008fef 100644
--- a/pkgs/development/libraries/funambol/default.nix
+++ b/pkgs/development/libraries/funambol/default.nix
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     description = "SyncML client sdk by Funambol project";
     homepage = "https://www.funambol.com";
-    license = licenses.agpl3;
+    license = licenses.agpl3Only;
     platforms = platforms.unix;
   };
 }
diff --git a/pkgs/development/libraries/fuzzylite/default.nix b/pkgs/development/libraries/fuzzylite/default.nix
index a3f70c062e86..1fd6d6506c28 100644
--- a/pkgs/development/libraries/fuzzylite/default.nix
+++ b/pkgs/development/libraries/fuzzylite/default.nix
@@ -38,6 +38,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A fuzzy logic control library in C++";
+    mainProgram = "fuzzylite";
     homepage = "https://fuzzylite.com";
     changelog = "https://github.com/fuzzylite/fuzzylite/${src.rev}/release/CHANGELOG";
     license = licenses.gpl3Only;
diff --git a/pkgs/development/libraries/ganv/default.nix b/pkgs/development/libraries/ganv/default.nix
index d53206ca667b..32318e1fc0fc 100644
--- a/pkgs/development/libraries/ganv/default.nix
+++ b/pkgs/development/libraries/ganv/default.nix
@@ -18,6 +18,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "An interactive Gtk canvas widget for graph-based interfaces";
+    mainProgram = "ganv_bench";
     homepage = "http://drobilla.net";
     license = licenses.gpl3;
     maintainers = [ maintainers.goibhniu ];
diff --git a/pkgs/development/libraries/gcab/default.nix b/pkgs/development/libraries/gcab/default.nix
index b31e93553766..6136564e5412 100644
--- a/pkgs/development/libraries/gcab/default.nix
+++ b/pkgs/development/libraries/gcab/default.nix
@@ -73,6 +73,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "GObject library to create cabinet files";
+    mainProgram = "gcab";
     homepage = "https://gitlab.gnome.org/GNOME/gcab";
     license = licenses.lgpl21Plus;
     maintainers = teams.gnome.members;
diff --git a/pkgs/development/libraries/gcr/4.nix b/pkgs/development/libraries/gcr/4.nix
index 650d87958c5e..243663e430d5 100644
--- a/pkgs/development/libraries/gcr/4.nix
+++ b/pkgs/development/libraries/gcr/4.nix
@@ -98,6 +98,7 @@ stdenv.mkDerivation rec {
     platforms = platforms.unix;
     maintainers = teams.gnome.members;
     description = "GNOME crypto services (daemon and tools)";
+    mainProgram = "gcr-viewer-gtk4";
     homepage = "https://gitlab.gnome.org/GNOME/gcr";
     license = licenses.lgpl2Plus;
 
diff --git a/pkgs/development/libraries/gcr/default.nix b/pkgs/development/libraries/gcr/default.nix
index 1fec6100bf2b..5a388246c154 100644
--- a/pkgs/development/libraries/gcr/default.nix
+++ b/pkgs/development/libraries/gcr/default.nix
@@ -106,6 +106,7 @@ stdenv.mkDerivation rec {
     platforms = platforms.unix;
     maintainers = teams.gnome.members;
     description = "GNOME crypto services (daemon and tools)";
+    mainProgram = "gcr-viewer";
     homepage = "https://gitlab.gnome.org/GNOME/gcr";
     license = licenses.lgpl2Plus;
 
diff --git a/pkgs/development/libraries/gdal/default.nix b/pkgs/development/libraries/gdal/default.nix
index 38a4342dfa1d..6c298ac0e1d9 100644
--- a/pkgs/development/libraries/gdal/default.nix
+++ b/pkgs/development/libraries/gdal/default.nix
@@ -234,18 +234,19 @@ stdenv.mkDerivation (finalAttrs: {
   '';
   nativeInstallCheckInputs = with python3.pkgs; [
     pytestCheckHook
+    pytest-benchmark
     pytest-env
     filelock
     lxml
   ];
+  pytestFlagsArray = [
+    "--benchmark-disable"
+  ];
   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
diff --git a/pkgs/development/libraries/gdome2/default.nix b/pkgs/development/libraries/gdome2/default.nix
index 5aa1c487b4f9..f71753b479d7 100644
--- a/pkgs/development/libraries/gdome2/default.nix
+++ b/pkgs/development/libraries/gdome2/default.nix
@@ -26,6 +26,7 @@ stdenv.mkDerivation {
   meta = with lib; {
     homepage = "http://gdome2.cs.unibo.it/";
     description = "DOM C library developed for the Gnome project";
+    mainProgram = "gdome-config";
     license = licenses.lgpl21Plus;
     maintainers = with maintainers; [ prikhi roconnor ];
     platforms = platforms.linux;
diff --git a/pkgs/development/libraries/geos/3.9.nix b/pkgs/development/libraries/geos/3.9.nix
index cc3025928c80..4ca53e36971b 100644
--- a/pkgs/development/libraries/geos/3.9.nix
+++ b/pkgs/development/libraries/geos/3.9.nix
@@ -22,6 +22,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   meta = with lib; {
     description = "C++ port of the Java Topology Suite (JTS)";
+    mainProgram = "geos-config";
     homepage = "https://trac.osgeo.org/geos";
     license = licenses.lgpl21Only;
     pkgConfigModules = [ "geos" ];
diff --git a/pkgs/development/libraries/getdns/default.nix b/pkgs/development/libraries/getdns/default.nix
index 0a6f34eab6cc..95844e36f3a0 100644
--- a/pkgs/development/libraries/getdns/default.nix
+++ b/pkgs/development/libraries/getdns/default.nix
@@ -78,6 +78,7 @@ in rec {
     meta = with lib;
       metaCommon // {
         description = "A local DNS Privacy stub resolver (using DNS-over-TLS)";
+        mainProgram = "stubby";
         longDescription = ''
           Stubby is an application that acts as a local DNS Privacy stub
           resolver (using RFC 7858, aka DNS-over-TLS). Stubby encrypts DNS
diff --git a/pkgs/development/libraries/gflags/default.nix b/pkgs/development/libraries/gflags/default.nix
index a690d8f2e154..3f07a67cbdae 100644
--- a/pkgs/development/libraries/gflags/default.nix
+++ b/pkgs/development/libraries/gflags/default.nix
@@ -27,6 +27,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A C++ library that implements commandline flags processing";
+    mainProgram = "gflags_completions.sh";
     longDescription = ''
       The gflags package contains a C++ library that implements commandline flags processing.
       As such it's a replacement for getopt().
diff --git a/pkgs/development/libraries/ggz_base_libs/default.nix b/pkgs/development/libraries/ggz_base_libs/default.nix
index 162a64eeb5da..878f6bf97cff 100644
--- a/pkgs/development/libraries/ggz_base_libs/default.nix
+++ b/pkgs/development/libraries/ggz_base_libs/default.nix
@@ -24,6 +24,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "GGZ Gaming zone libraries";
+    mainProgram = "ggz-config";
     maintainers = with maintainers;
     [
       raskin
diff --git a/pkgs/development/libraries/giflib/4.1.nix b/pkgs/development/libraries/giflib/4.1.nix
deleted file mode 100644
index 8f3ebcf7d3be..000000000000
--- a/pkgs/development/libraries/giflib/4.1.nix
+++ /dev/null
@@ -1,21 +0,0 @@
-{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/pkgs/development/libraries/giflib/CVE-2021-40633.patch b/pkgs/development/libraries/giflib/CVE-2021-40633.patch
new file mode 100644
index 000000000000..8a665bb1638b
--- /dev/null
+++ b/pkgs/development/libraries/giflib/CVE-2021-40633.patch
@@ -0,0 +1,26 @@
+From ccbc956432650734c91acb3fc88837f7b81267ff Mon Sep 17 00:00:00 2001
+From: "Eric S. Raymond" <esr@thyrsus.com>
+Date: Wed, 21 Feb 2024 18:55:00 -0500
+Subject: [PATCH] Clean up memory better at end of run (CVE-2021-40633)
+
+---
+ gif2rgb.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/gif2rgb.c b/gif2rgb.c
+index d51226d..fc2e683 100644
+--- a/gif2rgb.c
++++ b/gif2rgb.c
+@@ -517,6 +517,9 @@ static void GIF2RGB(int NumFiles, char *FileName, bool OneFileFlag,
+ 	DumpScreen2RGB(OutFileName, OneFileFlag, ColorMap, ScreenBuffer,
+ 	               GifFile->SWidth, GifFile->SHeight);
+ 
++	for (i = 0; i < GifFile->SHeight; i++) {
++        	(void)free(ScreenBuffer[i]);
++	}
+ 	(void)free(ScreenBuffer);
+ 
+ 	{
+-- 
+2.44.0
+
diff --git a/pkgs/development/libraries/giflib/default.nix b/pkgs/development/libraries/giflib/default.nix
index 8c8a587ed548..a73d12061250 100644
--- a/pkgs/development/libraries/giflib/default.nix
+++ b/pkgs/development/libraries/giflib/default.nix
@@ -4,31 +4,20 @@
 , fetchpatch
 , fixDarwinDylibNames
 , pkgsStatic
+, imagemagick_light
 }:
 
 stdenv.mkDerivation rec {
   pname = "giflib";
-  version = "5.2.1";
+  version = "5.2.2";
 
   src = fetchurl {
     url = "mirror://sourceforge/giflib/giflib-${version}.tar.gz";
-    sha256 = "1gbrg03z1b6rlrvjyc6d41bc8j1bsr7rm8206gb1apscyii5bnii";
+    hash = "sha256-vn/70FfK3r4qoURUL9kMaDjGoIO16KkEi47jtmsp1fs=";
   };
 
   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 = "./";
-    })
+    ./CVE-2021-40633.patch
   ] ++ lib.optionals stdenv.hostPlatform.isMinGW [
     # Build dll libraries.
     (fetchurl {
@@ -40,7 +29,9 @@ stdenv.mkDerivation rec {
     ./mingw-install-exes.patch
   ];
 
-  nativeBuildInputs = lib.optionals stdenv.isDarwin [
+  nativeBuildInputs = [
+    imagemagick_light
+  ] ++ lib.optionals stdenv.isDarwin [
     fixDarwinDylibNames
   ];
 
@@ -50,10 +41,11 @@ stdenv.mkDerivation rec {
 
   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
+    sed -i '/all:/ s/$(LIBGIFSO)//' Makefile
+    sed -i '/all:/ s/$(LIBUTILSO)//' Makefile
+    sed -i '/-m 755 $(LIBGIFSO)/ d' Makefile
+    sed -i '/ln -sf $(LIBGIFSOVER)/ d' Makefile
+    sed -i '/ln -sf $(LIBGIFSOMAJOR)/ d' Makefile
   '';
 
   passthru.tests = {
@@ -63,7 +55,7 @@ stdenv.mkDerivation rec {
   meta = {
     description = "A library for reading and writing gif images";
     homepage = "https://giflib.sourceforge.net/";
-    platforms = lib.platforms.unix;
+    platforms = lib.platforms.unix ++ lib.platforms.windows;
     license = lib.licenses.mit;
     maintainers = with lib.maintainers; [ ];
     branch = "5.2";
diff --git a/pkgs/development/libraries/givaro/default.nix b/pkgs/development/libraries/givaro/default.nix
index c38419bed52b..a7b1eaa43831 100644
--- a/pkgs/development/libraries/givaro/default.nix
+++ b/pkgs/development/libraries/givaro/default.nix
@@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
   propagatedBuildInputs = [ gmpxx ];
 
   configureFlags = [
-    "--disable-optimization"
+    "--without-archnative"
   ] ++ lib.optionals stdenv.isx86_64 [
     # disable SIMD instructions (which are enabled *when available* by default)
     "--${if stdenv.hostPlatform.sse3Support   then "enable" else "disable"}-sse3"
@@ -55,6 +55,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "A C++ library for arithmetic and algebraic computations";
+    mainProgram = "givaro-config";
     license = lib.licenses.cecill-b;
     maintainers = [lib.maintainers.raskin];
     platforms = lib.platforms.unix;
diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix
index 9a5569cd1543..7c14141554fb 100644
--- a/pkgs/development/libraries/glib/default.nix
+++ b/pkgs/development/libraries/glib/default.nix
@@ -9,7 +9,7 @@
 , pkg-config
 , perl
 , python3
-, libiconv, zlib, libffi, pcre2, libelf, gnome, libselinux, bash, gnum4, gtk-doc, docbook_xsl, docbook_xml_dtd_45, libxslt
+, libiconv, zlib, libffi, pcre2, elfutils, 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
@@ -110,11 +110,12 @@ stdenv.mkDerivation (finalAttrs: {
   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 (lib.meta.availableOn stdenv.hostPlatform elfutils) [
+    elfutils
   ] ++ lib.optionals stdenv.isLinux [
     libselinux
     util-linuxMinimal # for libmount
@@ -158,6 +159,8 @@ stdenv.mkDerivation (finalAttrs: {
     "-Dgtk_doc=${lib.boolToString buildDocs}"
     "-Dnls=enabled"
     "-Ddevbindir=${placeholder "dev"}/bin"
+  ] ++ lib.optionals (!lib.meta.availableOn stdenv.hostPlatform elfutils) [
+    "-Dlibelf=disabled"
   ] ++ lib.optionals (!stdenv.isDarwin) [
     "-Dman=true"                # broken on Darwin
   ] ++ lib.optionals stdenv.isFreeBSD [
diff --git a/pkgs/development/libraries/glibc/mtrace.nix b/pkgs/development/libraries/glibc/mtrace.nix
index 4dbcb19af2a4..926c0d91cdf0 100644
--- a/pkgs/development/libraries/glibc/mtrace.nix
+++ b/pkgs/development/libraries/glibc/mtrace.nix
@@ -36,5 +36,6 @@ glibc.overrideAttrs (oldAttrs: {
 
   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).";
+    mainProgram = "mtrace";
   };
 })
diff --git a/pkgs/development/libraries/gloox/default.nix b/pkgs/development/libraries/gloox/default.nix
index b4cd3ca75ee1..7bf1bfb4bd16 100644
--- a/pkgs/development/libraries/gloox/default.nix
+++ b/pkgs/development/libraries/gloox/default.nix
@@ -28,6 +28,7 @@ stdenv.mkDerivation rec{
 
   meta = with lib; {
     description = "A portable high-level Jabber/XMPP library for C++";
+    mainProgram = "gloox-config";
     homepage = "http://camaya.net/gloox";
     license = licenses.gpl3;
     maintainers = with maintainers; [ ];
diff --git a/pkgs/development/libraries/gnome-online-accounts/default.nix b/pkgs/development/libraries/gnome-online-accounts/default.nix
index 9b13a780250f..aee2056a8563 100644
--- a/pkgs/development/libraries/gnome-online-accounts/default.nix
+++ b/pkgs/development/libraries/gnome-online-accounts/default.nix
@@ -1,7 +1,6 @@
 { stdenv
 , lib
 , fetchurl
-, fetchpatch
 , pkg-config
 , vala
 , glib
@@ -33,23 +32,15 @@
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "gnome-online-accounts";
-  version = "3.48.0";
+  version = "3.48.1";
 
   outputs = [ "out" "dev" ] ++ lib.optionals enableBackend [ "man" "devdoc" ];
 
   src = fetchurl {
     url = "mirror://gnome/sources/gnome-online-accounts/${lib.versions.majorMinor finalAttrs.version}/gnome-online-accounts-${finalAttrs.version}.tar.xz";
-    hash = "sha256-QYu5/P/b1yqYIFrTZRN2F/weNVGlTedPapjUXSZhdb8=";
+    hash = "sha256-PqDHEIS/WVzOXKo3zv8uhT0OyWRLsB/UZDMArblRf4o=";
   };
 
-  patches = [
-    # Fix crash with EWS and libxml2.12.
-    (fetchpatch {
-      url = "https://gitlab.gnome.org/GNOME/gnome-online-accounts/-/commit/b9638e2418408be4906752297e700506766dcf20.patch";
-      hash = "sha256-l9+qS9WF3RuG9NtQQzSjpFSLNJV4FkXxOsLKYbINqrQ=";
-    })
-  ];
-
   mesonFlags = [
     "-Dfedora=false" # not useful in NixOS or for NixOS users.
     "-Dgoabackend=${lib.boolToString enableBackend}"
diff --git a/pkgs/development/libraries/graphene-hardened-malloc/default.nix b/pkgs/development/libraries/graphene-hardened-malloc/default.nix
index 85ec3352f705..48df439a1efb 100644
--- a/pkgs/development/libraries/graphene-hardened-malloc/default.nix
+++ b/pkgs/development/libraries/graphene-hardened-malloc/default.nix
@@ -83,6 +83,7 @@ stdenv.mkDerivation (finalAttrs: {
   meta = with lib; {
     homepage = "https://github.com/GrapheneOS/hardened_malloc";
     description = "Hardened allocator designed for modern systems";
+    mainProgram = "preload-hardened-malloc";
     longDescription = ''
       This is a security-focused general purpose memory allocator providing the malloc API
       along with various extensions. It provides substantial hardening against heap
diff --git a/pkgs/development/libraries/grpc/default.nix b/pkgs/development/libraries/grpc/default.nix
index ba1a4a8c123e..1e8804237b99 100644
--- a/pkgs/development/libraries/grpc/default.nix
+++ b/pkgs/development/libraries/grpc/default.nix
@@ -21,7 +21,7 @@
 
 stdenv.mkDerivation rec {
   pname = "grpc";
-  version = "1.62.0"; # N.B: if you change this, please update:
+  version = "1.62.1"; # N.B: if you change this, please update:
     # pythonPackages.grpcio-tools
     # pythonPackages.grpcio-status
 
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
     owner = "grpc";
     repo = "grpc";
     rev = "v${version}";
-    hash = "sha256-iqoxgo/oocO9gBq0o5bmZvre/EwRguMrWnmwvyLGLr8=";
+    hash = "sha256-L0bn6Bg36UKIRxznH9o4T7WXUqMwFjr8ybeQfbUi8xM=";
     fetchSubmodules = true;
   };
 
diff --git a/pkgs/development/libraries/gsasl/default.nix b/pkgs/development/libraries/gsasl/default.nix
index 3dc5c128fc37..787c096fea4f 100644
--- a/pkgs/development/libraries/gsasl/default.nix
+++ b/pkgs/development/libraries/gsasl/default.nix
@@ -30,6 +30,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   meta = {
     description = "GNU SASL, Simple Authentication and Security Layer library";
+    mainProgram = "gsasl";
 
     longDescription =
       '' GNU SASL is a library that implements the IETF Simple
diff --git a/pkgs/development/libraries/gsignond/default.nix b/pkgs/development/libraries/gsignond/default.nix
index 912054eb85c3..863ac7ba4bb2 100644
--- a/pkgs/development/libraries/gsignond/default.nix
+++ b/pkgs/development/libraries/gsignond/default.nix
@@ -52,6 +52,7 @@ unwrapped = stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "D-Bus service which performs user authentication on behalf of its clients";
+    mainProgram = "gsignond";
     homepage = "https://gitlab.com/accounts-sso/gsignond";
     license = licenses.lgpl21Plus;
     maintainers = with maintainers; [ ];
diff --git a/pkgs/development/libraries/gsound/default.nix b/pkgs/development/libraries/gsound/default.nix
index 6c5c98b77d7f..3c7049e92efe 100644
--- a/pkgs/development/libraries/gsound/default.nix
+++ b/pkgs/development/libraries/gsound/default.nix
@@ -24,6 +24,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://wiki.gnome.org/Projects/GSound";
     description = "Small library for playing system sounds";
+    mainProgram = "gsound-play";
     maintainers = teams.gnome.members;
     license = licenses.gpl2;
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/gspell/default.nix b/pkgs/development/libraries/gspell/default.nix
index c4d15352020a..f1b8733cf84b 100644
--- a/pkgs/development/libraries/gspell/default.nix
+++ b/pkgs/development/libraries/gspell/default.nix
@@ -71,6 +71,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A spell-checking library for GTK applications";
+    mainProgram = "gspell-app1";
     homepage = "https://wiki.gnome.org/Projects/gspell";
     license = licenses.lgpl21Plus;
     maintainers = teams.gnome.members;
diff --git a/pkgs/development/libraries/gss/default.nix b/pkgs/development/libraries/gss/default.nix
index 3eacad32f813..883d68d42c6a 100644
--- a/pkgs/development/libraries/gss/default.nix
+++ b/pkgs/development/libraries/gss/default.nix
@@ -35,6 +35,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://www.gnu.org/software/gss/";
     description = "Generic Security Service";
+    mainProgram = "gss";
     license = licenses.gpl3Plus;
     maintainers = with maintainers; [ ];
     platforms = platforms.all;
diff --git a/pkgs/development/libraries/gssdp/tools.nix b/pkgs/development/libraries/gssdp/tools.nix
index 5fcd0219a945..1d5d25e6ef4f 100644
--- a/pkgs/development/libraries/gssdp/tools.nix
+++ b/pkgs/development/libraries/gssdp/tools.nix
@@ -42,6 +42,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Device Sniffer tool based on GSSDP framework";
+    mainProgram = "gssdp-device-sniffer";
     homepage = "http://www.gupnp.org/";
     license = licenses.lgpl2Plus;
     maintainers = gssdp_1_6.meta.maintainers;
diff --git a/pkgs/development/libraries/gstreamer/bad/default.nix b/pkgs/development/libraries/gstreamer/bad/default.nix
index bee80e03289c..bec1cb762ce4 100644
--- a/pkgs/development/libraries/gstreamer/bad/default.nix
+++ b/pkgs/development/libraries/gstreamer/bad/default.nix
@@ -354,6 +354,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "GStreamer Bad Plugins";
+    mainProgram = "gst-transcoder-1.0";
     homepage = "https://gstreamer.freedesktop.org";
     longDescription = ''
       a set of plug-ins that aren't up to par compared to the
diff --git a/pkgs/development/libraries/gstreamer/ges/default.nix b/pkgs/development/libraries/gstreamer/ges/default.nix
index bf5dddf5a732..adb737bb1be7 100644
--- a/pkgs/development/libraries/gstreamer/ges/default.nix
+++ b/pkgs/development/libraries/gstreamer/ges/default.nix
@@ -65,6 +65,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Library for creation of audio/video non-linear editors";
+    mainProgram = "ges-launch-1.0";
     homepage = "https://gstreamer.freedesktop.org";
     license = licenses.lgpl2Plus;
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/gstreamer/rs/default.nix b/pkgs/development/libraries/gstreamer/rs/default.nix
index 708a735939af..eeef11e9a464 100644
--- a/pkgs/development/libraries/gstreamer/rs/default.nix
+++ b/pkgs/development/libraries/gstreamer/rs/default.nix
@@ -248,6 +248,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "GStreamer plugins written in Rust";
+    mainProgram = "gst-webrtc-signalling-server";
     homepage = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs";
     license = with licenses; [ mpl20 asl20 mit lgpl21Plus ];
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/gtdialog/default.nix b/pkgs/development/libraries/gtdialog/default.nix
index d7e60659a5ea..6a09d8cbe9e2 100644
--- a/pkgs/development/libraries/gtdialog/default.nix
+++ b/pkgs/development/libraries/gtdialog/default.nix
@@ -21,6 +21,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Cross-platform helper for creating interactive dialogs";
+    mainProgram = "gtdialog";
     license = licenses.mit;
     maintainers = with maintainers; [ raskin ];
     platforms = platforms.linux;
diff --git a/pkgs/development/libraries/gtk-layer-shell/default.nix b/pkgs/development/libraries/gtk-layer-shell/default.nix
index 5ecfc299edd4..c137eb608132 100644
--- a/pkgs/development/libraries/gtk-layer-shell/default.nix
+++ b/pkgs/development/libraries/gtk-layer-shell/default.nix
@@ -58,6 +58,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   meta = with lib; {
     description = "A library to create panels and other desktop components for Wayland using the Layer Shell protocol";
+    mainProgram = "gtk-layer-demo";
     homepage = "https://github.com/wmww/gtk-layer-shell";
     license = licenses.lgpl3Plus;
     maintainers = with maintainers; [ eonpatapon donovanglover ];
diff --git a/pkgs/development/libraries/gtk4-layer-shell/default.nix b/pkgs/development/libraries/gtk4-layer-shell/default.nix
index d69970193080..e41735fb7129 100644
--- a/pkgs/development/libraries/gtk4-layer-shell/default.nix
+++ b/pkgs/development/libraries/gtk4-layer-shell/default.nix
@@ -58,6 +58,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   meta = with lib; {
     description = "A library to create panels and other desktop components for Wayland using the Layer Shell protocol and GTK4";
+    mainProgram = "gtk4-layer-demo";
     license = licenses.mit;
     maintainers = with maintainers; [ donovanglover ];
     platforms = platforms.linux;
diff --git a/pkgs/development/libraries/gupnp/1.6.nix b/pkgs/development/libraries/gupnp/1.6.nix
index eb33748c4589..44ae478e42f5 100644
--- a/pkgs/development/libraries/gupnp/1.6.nix
+++ b/pkgs/development/libraries/gupnp/1.6.nix
@@ -66,6 +66,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "http://www.gupnp.org/";
     description = "An implementation of the UPnP specification";
+    mainProgram = "gupnp-binding-tool-1.6";
     license = licenses.lgpl2Plus;
     platforms = platforms.linux;
   };
diff --git a/pkgs/development/libraries/gupnp/default.nix b/pkgs/development/libraries/gupnp/default.nix
index 4a8b250d2644..d9e9f483a63b 100644
--- a/pkgs/development/libraries/gupnp/default.nix
+++ b/pkgs/development/libraries/gupnp/default.nix
@@ -96,6 +96,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "http://www.gupnp.org/";
     description = "An implementation of the UPnP specification";
+    mainProgram = "gupnp-binding-tool-1.2";
     license = licenses.lgpl2Plus;
     platforms = platforms.unix;
   };
diff --git a/pkgs/development/libraries/gusb/default.nix b/pkgs/development/libraries/gusb/default.nix
index d6fe70440132..515eeb7de975 100644
--- a/pkgs/development/libraries/gusb/default.nix
+++ b/pkgs/development/libraries/gusb/default.nix
@@ -82,6 +82,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "GLib libusb wrapper";
+    mainProgram = "gusbcmd";
     homepage = "https://github.com/hughsie/libgusb";
     license = licenses.lgpl21;
     maintainers = [ maintainers.marcweber ];
diff --git a/pkgs/development/libraries/hotpatch/default.nix b/pkgs/development/libraries/hotpatch/default.nix
index 66be524a86ca..7dcf09c5c5b2 100644
--- a/pkgs/development/libraries/hotpatch/default.nix
+++ b/pkgs/development/libraries/hotpatch/default.nix
@@ -31,6 +31,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Hot patching executables on Linux using .so file injection";
+    mainProgram = "hotpatcher";
     homepage = src.meta.homepage;
     license = licenses.bsd3;
     maintainers = [ ];
diff --git a/pkgs/development/libraries/htmlcxx/default.nix b/pkgs/development/libraries/htmlcxx/default.nix
index 41e86b275fe4..f42674e902f0 100644
--- a/pkgs/development/libraries/htmlcxx/default.nix
+++ b/pkgs/development/libraries/htmlcxx/default.nix
@@ -19,6 +19,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://htmlcxx.sourceforge.net/";
     description = "A simple non-validating css1 and html parser for C++";
+    mainProgram = "htmlcxx";
     license = licenses.lgpl2;
     platforms = platforms.all;
   };
diff --git a/pkgs/development/libraries/hyphen/default.nix b/pkgs/development/libraries/hyphen/default.nix
index ed3980f7a90d..122834570cfa 100644
--- a/pkgs/development/libraries/hyphen/default.nix
+++ b/pkgs/development/libraries/hyphen/default.nix
@@ -19,6 +19,7 @@ in stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A text hyphenation library";
+    mainProgram = "substrings.pl";
     homepage = "https://sourceforge.net/projects/hunspell/files/Hyphen/";
     platforms = platforms.all;
     license = with licenses; [ gpl2 lgpl21 mpl11 ];
diff --git a/pkgs/development/libraries/intel-media-sdk/default.nix b/pkgs/development/libraries/intel-media-sdk/default.nix
index b20b6782d9b0..506281a7e6e9 100644
--- a/pkgs/development/libraries/intel-media-sdk/default.nix
+++ b/pkgs/development/libraries/intel-media-sdk/default.nix
@@ -37,6 +37,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Intel Media SDK";
+    mainProgram = "mfx-tracer-config";
     license = licenses.mit;
     maintainers = with maintainers; [ midchildan ];
     platforms = [ "x86_64-linux" ];
diff --git a/pkgs/development/libraries/ip2location-c/default.nix b/pkgs/development/libraries/ip2location-c/default.nix
index 43db1ac56b09..0e74478982f3 100644
--- a/pkgs/development/libraries/ip2location-c/default.nix
+++ b/pkgs/development/libraries/ip2location-c/default.nix
@@ -27,6 +27,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Library to look up locations of host names and IP addresses";
+    mainProgram = "ip2location";
     longDescription = ''
       A C library to find the country, region, city,coordinates,
       zip code, time zone, ISP, domain name, connection type, area code,
diff --git a/pkgs/development/libraries/isa-l/default.nix b/pkgs/development/libraries/isa-l/default.nix
index d81f1120742a..88fcbc04d586 100644
--- a/pkgs/development/libraries/isa-l/default.nix
+++ b/pkgs/development/libraries/isa-l/default.nix
@@ -19,6 +19,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A collection of optimised low-level functions targeting storage applications";
+    mainProgram = "igzip";
     license = licenses.bsd3;
     homepage = "https://github.com/intel/isa-l";
     maintainers = with maintainers; [ jbedo ];
diff --git a/pkgs/development/libraries/itk/generic.nix b/pkgs/development/libraries/itk/generic.nix
index 652fce4a6797..be59969aaecb 100644
--- a/pkgs/development/libraries/itk/generic.nix
+++ b/pkgs/development/libraries/itk/generic.nix
@@ -109,6 +109,7 @@ stdenv.mkDerivation {
 
   meta = {
     description = "Insight Segmentation and Registration Toolkit";
+    mainProgram = "itkTestDriver";
     homepage = "https://www.itk.org";
     license = lib.licenses.asl20;
     maintainers = with lib.maintainers; [viric];
diff --git a/pkgs/development/libraries/java/commons/compress/default.nix b/pkgs/development/libraries/java/commons/compress/default.nix
index 7827c1788dca..4a226a22c4de 100644
--- a/pkgs/development/libraries/java/commons/compress/default.nix
+++ b/pkgs/development/libraries/java/commons/compress/default.nix
@@ -1,12 +1,12 @@
 { lib, stdenv, fetchurl }:
 
 stdenv.mkDerivation rec {
-  version = "1.26.0";
+  version = "1.26.1";
   pname = "commons-compress";
 
   src = fetchurl {
     url    = "mirror://apache/commons/compress/binaries/${pname}-${version}-bin.tar.gz";
-    sha256 = "sha256-AXdkqMrzTtURpPXKOmXxo0RnfFtflcDf6mmVmqVFz5k=";
+    sha256 = "sha256-PVZ4hltIprOeT3UEH3+xJ+TcZLekHV7cuw16rMmx/Rk=";
   };
 
   installPhase = ''
diff --git a/pkgs/development/libraries/java/commons/logging/default.nix b/pkgs/development/libraries/java/commons/logging/default.nix
index 71832498c34a..085efc6e52b5 100644
--- a/pkgs/development/libraries/java/commons/logging/default.nix
+++ b/pkgs/development/libraries/java/commons/logging/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "commons-logging";
-  version = "1.2";
+  version = "1.3.0";
 
   src = fetchurl {
     url    = "mirror://apache/commons/logging/binaries/commons-logging-${version}-bin.tar.gz";
-    sha256 = "1gc70pmcv0x6ibl89jglmr22f8zpr63iaifi49nrq399qw2qhx9z";
+    sha256 = "sha256-ij6jOi1Y/iQ/9Ht41nKtmOdZCvf0NmNseFGxBpyq1fg=";
   };
 
   installPhase = ''
diff --git a/pkgs/development/libraries/java/cup/default.nix b/pkgs/development/libraries/java/cup/default.nix
index 2f673a8e5a67..65df9d6cfa22 100644
--- a/pkgs/development/libraries/java/cup/default.nix
+++ b/pkgs/development/libraries/java/cup/default.nix
@@ -4,7 +4,7 @@
 , ant
 , jdk
 , makeWrapper
-, canonicalize-jars-hook
+, stripJavaArchivesHook
 }:
 
 stdenv.mkDerivation (finalAttrs: {
@@ -24,7 +24,7 @@ stdenv.mkDerivation (finalAttrs: {
     ant
     jdk
     makeWrapper
-    canonicalize-jars-hook
+    stripJavaArchivesHook
   ];
 
   buildPhase = ''
diff --git a/pkgs/development/libraries/java/hydra-ant-logger/default.nix b/pkgs/development/libraries/java/hydra-ant-logger/default.nix
index 96b6cd05ed1a..8f7282df0bb2 100644
--- a/pkgs/development/libraries/java/hydra-ant-logger/default.nix
+++ b/pkgs/development/libraries/java/hydra-ant-logger/default.nix
@@ -3,7 +3,7 @@
 , fetchFromGitHub
 , ant
 , jdk
-, canonicalize-jars-hook
+, stripJavaArchivesHook
 }:
 
 stdenv.mkDerivation {
@@ -20,7 +20,7 @@ stdenv.mkDerivation {
   nativeBuildInputs = [
     ant
     jdk
-    canonicalize-jars-hook
+    stripJavaArchivesHook
   ];
 
   buildPhase = ''
diff --git a/pkgs/development/libraries/java/jflex/default.nix b/pkgs/development/libraries/java/jflex/default.nix
index 90e4d4329d5e..3a55febff294 100644
--- a/pkgs/development/libraries/java/jflex/default.nix
+++ b/pkgs/development/libraries/java/jflex/default.nix
@@ -32,6 +32,7 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "https://www.jflex.de/";
     description = "Lexical analyzer generator for Java, written in Java";
+    mainProgram = "jflex";
     license = lib.licenses.bsd3;
     platforms = lib.platforms.unix;
   };
diff --git a/pkgs/development/libraries/java/lombok/default.nix b/pkgs/development/libraries/java/lombok/default.nix
index 017f0581dc93..f08c860f57f6 100644
--- a/pkgs/development/libraries/java/lombok/default.nix
+++ b/pkgs/development/libraries/java/lombok/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "lombok";
-  version = "1.18.30";
+  version = "1.18.32";
 
   src = fetchurl {
     url = "https://projectlombok.org/downloads/lombok-${version}.jar";
-    sha256 = "sha256-1+4SLu4erutFGCqJ/zb8LdCGhY0bL1S2Fcb+97odYBI=";
+    sha256 = "sha256-l1dGdOKiX1Z6MTc2rOAN+Hh9RD3jFkB9V/yHfZ8Zpl0=";
   };
 
   nativeBuildInputs = [ makeWrapper ];
@@ -24,6 +24,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "A library that can write a lot of boilerplate for your Java project";
+    mainProgram = "lombok";
     platforms = lib.platforms.all;
     sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
     license = lib.licenses.mit;
diff --git a/pkgs/development/libraries/java/swt/default.nix b/pkgs/development/libraries/java/swt/default.nix
index 4c900ed21ac6..2d3f4eeb6575 100644
--- a/pkgs/development/libraries/java/swt/default.nix
+++ b/pkgs/development/libraries/java/swt/default.nix
@@ -1,6 +1,6 @@
 { lib
 , stdenv
-, canonicalize-jars-hook
+, stripJavaArchivesHook
 , fetchzip
 , pkg-config
 , atk
@@ -58,7 +58,7 @@ in stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [
-    canonicalize-jars-hook
+    stripJavaArchivesHook
     pkg-config
   ];
   buildInputs = [
diff --git a/pkgs/development/libraries/jbig2dec/default.nix b/pkgs/development/libraries/jbig2dec/default.nix
index af99944dae72..f0938df820bf 100644
--- a/pkgs/development/libraries/jbig2dec/default.nix
+++ b/pkgs/development/libraries/jbig2dec/default.nix
@@ -25,7 +25,8 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "https://www.jbig2dec.com/";
     description = "Decoder implementation of the JBIG2 image compression format";
-    license = lib.licenses.agpl3;
+    mainProgram = "jbig2dec";
+    license = lib.licenses.agpl3Only;
     platforms = lib.platforms.unix;
   };
 }
diff --git a/pkgs/development/libraries/jellyfin-ffmpeg/default.nix b/pkgs/development/libraries/jellyfin-ffmpeg/default.nix
index fdce5118e6b3..750a5aa8d002 100644
--- a/pkgs/development/libraries/jellyfin-ffmpeg/default.nix
+++ b/pkgs/development/libraries/jellyfin-ffmpeg/default.nix
@@ -3,16 +3,20 @@
 , lib
 }:
 
-ffmpeg_6-full.overrideAttrs (old: rec {
-  pname = "jellyfin-ffmpeg";
+let
   version = "6.0.1-3";
+in
 
-  src = fetchFromGitHub {
+(ffmpeg_6-full.override {
+  inherit version; # Important! This sets the ABI.
+  source = fetchFromGitHub {
     owner = "jellyfin";
     repo = "jellyfin-ffmpeg";
     rev = "v${version}";
     hash = "sha256-UINiXO61nB/AL0HJJy7G7emujakk/mQv81aUioyJz0Y=";
   };
+}).overrideAttrs (old: {
+  pname = "jellyfin-ffmpeg";
 
   # Clobber upstream patches as they don't apply to the Jellyfin fork
   patches = [];
diff --git a/pkgs/development/libraries/jemalloc/default.nix b/pkgs/development/libraries/jemalloc/default.nix
index 8a3b8658fbb8..902c0d77739c 100644
--- a/pkgs/development/libraries/jemalloc/default.nix
+++ b/pkgs/development/libraries/jemalloc/default.nix
@@ -48,7 +48,6 @@ stdenv.mkDerivation rec {
   ;
 
   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;
diff --git a/pkgs/development/libraries/jose/default.nix b/pkgs/development/libraries/jose/default.nix
index 795fb8244c85..656b014b733d 100644
--- a/pkgs/development/libraries/jose/default.nix
+++ b/pkgs/development/libraries/jose/default.nix
@@ -21,6 +21,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "C-language implementation of Javascript Object Signing and Encryption";
+    mainProgram = "jose";
     homepage = "https://github.com/latchset/jose";
     maintainers = with lib.maintainers; [ ];
     license = lib.licenses.asl20;
diff --git a/pkgs/development/libraries/json-fortran/default.nix b/pkgs/development/libraries/json-fortran/default.nix
index 422248520fc4..410a767f9991 100644
--- a/pkgs/development/libraries/json-fortran/default.nix
+++ b/pkgs/development/libraries/json-fortran/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "json-fortran";
-  version = "8.3.0";
+  version = "8.4.0";
 
   src = fetchFromGitHub {
     owner = "jacobwilliams";
     repo = pname;
     rev = version;
-    hash = "sha256-96W9bzWEZ3EN4wtnDT3G3pvLdcI4SIhGJWBVPU3rNZ4=";
+    hash = "sha256-qy3CK8Op3YVNpXjq60UYq9V9qWBEXpX/li/lYxXW9Fk=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/libraries/kdb/default.nix b/pkgs/development/libraries/kdb/default.nix
index f9aa5dc369c6..d3688442f898 100644
--- a/pkgs/development/libraries/kdb/default.nix
+++ b/pkgs/development/libraries/kdb/default.nix
@@ -42,6 +42,7 @@ mkDerivation rec {
 
   meta = with lib; {
     description = "A database connectivity and creation framework for various database vendors";
+    mainProgram = "kdb3_sqlite3_dump";
     license = licenses.lgpl2;
     platforms = platforms.linux;
     maintainers = with maintainers; [ zraexy ];
diff --git a/pkgs/development/libraries/khronos-ocl-icd-loader/default.nix b/pkgs/development/libraries/khronos-ocl-icd-loader/default.nix
index 57fe21a27c7b..330657f41fd0 100644
--- a/pkgs/development/libraries/khronos-ocl-icd-loader/default.nix
+++ b/pkgs/development/libraries/khronos-ocl-icd-loader/default.nix
@@ -20,6 +20,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Official Khronos OpenCL ICD Loader";
+    mainProgram = "cllayerinfo";
     homepage = "https://github.com/KhronosGroup/OpenCL-ICD-Loader";
     license = licenses.asl20;
     maintainers = with maintainers; [ davidtwco ];
diff --git a/pkgs/development/libraries/languagemachines/libfolia.nix b/pkgs/development/libraries/languagemachines/libfolia.nix
index 6cc5bcade205..ec7129396540 100644
--- a/pkgs/development/libraries/languagemachines/libfolia.nix
+++ b/pkgs/development/libraries/languagemachines/libfolia.nix
@@ -21,6 +21,7 @@ stdenv.mkDerivation {
 
   meta = with lib; {
     description = "A C++ API for FoLiA documents; an XML-based linguistic annotation format.";
+    mainProgram = "folialint";
     homepage    = "https://proycon.github.io/folia/";
     license     = licenses.gpl3;
     platforms   = platforms.all;
diff --git a/pkgs/development/libraries/languagemachines/timbl.nix b/pkgs/development/libraries/languagemachines/timbl.nix
index 1585798170b3..e1884e56132d 100644
--- a/pkgs/development/libraries/languagemachines/timbl.nix
+++ b/pkgs/development/libraries/languagemachines/timbl.nix
@@ -22,6 +22,7 @@ stdenv.mkDerivation {
 
   meta = with lib; {
     description = "TiMBL implements several memory-based learning algorithms";
+    mainProgram = "timbl";
     homepage    = "https://github.com/LanguageMachines/timbl/";
     license     = licenses.gpl3;
     platforms   = platforms.all;
diff --git a/pkgs/development/libraries/languagemachines/ucto.nix b/pkgs/development/libraries/languagemachines/ucto.nix
index f707d9fb8b6e..6a3e31bcd553 100644
--- a/pkgs/development/libraries/languagemachines/ucto.nix
+++ b/pkgs/development/libraries/languagemachines/ucto.nix
@@ -34,6 +34,7 @@ stdenv.mkDerivation {
 
   meta = with lib; {
     description = "A rule-based tokenizer for natural language";
+    mainProgram = "ucto";
     homepage    = "https://languagemachines.github.io/ucto/";
     license     = licenses.gpl3;
     platforms   = platforms.all;
diff --git a/pkgs/development/libraries/lasem/default.nix b/pkgs/development/libraries/lasem/default.nix
index 9c49429ece45..80a5fc0e24d0 100644
--- a/pkgs/development/libraries/lasem/default.nix
+++ b/pkgs/development/libraries/lasem/default.nix
@@ -30,6 +30,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "SVG and MathML rendering library";
+    mainProgram = "lasem-render-0.4";
 
     homepage = "https://wiki.gnome.org/Projects/Lasem";
     license = lib.licenses.gpl2Plus;
diff --git a/pkgs/development/libraries/libaacs/default.nix b/pkgs/development/libraries/libaacs/default.nix
index a270051f48ab..c0d3b91885e6 100644
--- a/pkgs/development/libraries/libaacs/default.nix
+++ b/pkgs/development/libraries/libaacs/default.nix
@@ -23,6 +23,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://www.videolan.org/developers/libaacs.html";
     description = "Library to access AACS protected Blu-Ray disks";
+    mainProgram = "aacs_info";
     license = licenses.lgpl21;
     maintainers = with maintainers; [ abbradar ];
     platforms = with platforms; linux;
diff --git a/pkgs/development/libraries/libadwaita/default.nix b/pkgs/development/libraries/libadwaita/default.nix
index ad11285ab348..bb520e7c2274 100644
--- a/pkgs/development/libraries/libadwaita/default.nix
+++ b/pkgs/development/libraries/libadwaita/default.nix
@@ -78,6 +78,7 @@ stdenv.mkDerivation (finalAttrs: {
   # 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;
+  separateDebugInfo = true;
 
   checkPhase = ''
     runHook preCheck
@@ -117,6 +118,7 @@ stdenv.mkDerivation (finalAttrs: {
   meta = with lib; {
     changelog = "https://gitlab.gnome.org/GNOME/libadwaita/-/blob/${finalAttrs.src.rev}/NEWS";
     description = "Library to help with developing UI for mobile devices using GTK/GNOME";
+    mainProgram = "adwaita-1-demo";
     homepage = "https://gitlab.gnome.org/GNOME/libadwaita";
     license = licenses.lgpl21Plus;
     maintainers = teams.gnome.members ++ (with maintainers; [ dotlambda ]);
diff --git a/pkgs/development/libraries/libagar/libagar_test.nix b/pkgs/development/libraries/libagar/libagar_test.nix
index c54a7957f436..e365479f90a5 100644
--- a/pkgs/development/libraries/libagar/libagar_test.nix
+++ b/pkgs/development/libraries/libagar/libagar_test.nix
@@ -25,6 +25,7 @@ stdenv.mkDerivation {
   meta = with lib; {
     broken = (stdenv.isLinux && stdenv.isAarch64);
     description = "Tests for libagar";
+    mainProgram = "agartest";
     homepage = "http://libagar.org/index.html";
     license = with licenses; bsd3;
     maintainers = with maintainers; [ ramkromberg ];
diff --git a/pkgs/development/libraries/libajantv2/default.nix b/pkgs/development/libraries/libajantv2/default.nix
index d0d94c2d125a..89d609b327ab 100644
--- a/pkgs/development/libraries/libajantv2/default.nix
+++ b/pkgs/development/libraries/libajantv2/default.nix
@@ -6,6 +6,9 @@
 , pkg-config
 }:
 
+# Warning: We are aware that the upstream changed and there are new releases,
+# this got initally packaged for obs-studio which appears to fail to build even upstream with the new version.
+# https://github.com/NixOS/nixpkgs/pull/296191 / https://github.com/obsproject/obs-studio/pull/10037
 stdenv.mkDerivation rec {
   pname = "libajantv2";
   version = "16.2-bugfix5";
@@ -29,7 +32,7 @@ stdenv.mkDerivation rec {
     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 ];
+    maintainers = with maintainers; [];
     platforms = platforms.linux;
   };
 }
diff --git a/pkgs/development/libraries/libarchive-qt/default.nix b/pkgs/development/libraries/libarchive-qt/default.nix
index 14608b9f970d..77f498967ecc 100644
--- a/pkgs/development/libraries/libarchive-qt/default.nix
+++ b/pkgs/development/libraries/libarchive-qt/default.nix
@@ -26,6 +26,7 @@ mkDerivation rec {
 
   meta = with lib; {
     description = "A Qt based archiving solution with libarchive backend";
+    mainProgram = "archiver";
     homepage = "https://gitlab.com/marcusbritanicus/libarchive-qt";
     license = licenses.lgpl3Plus;
     maintainers = with maintainers; [ dan4ik605743 ];
diff --git a/pkgs/development/libraries/libassuan/default.nix b/pkgs/development/libraries/libassuan/default.nix
index 60c13040ae5e..9998bfdceb7b 100644
--- a/pkgs/development/libraries/libassuan/default.nix
+++ b/pkgs/development/libraries/libassuan/default.nix
@@ -1,12 +1,12 @@
-{ fetchurl, lib, stdenv, gettext, npth, libgpg-error, buildPackages }:
+{ fetchurl, lib, stdenv, gettext, npth, libgpg-error, buildPackages, gitUpdater }:
 
 stdenv.mkDerivation rec {
   pname = "libassuan";
-  version = "2.5.6";
+  version = "2.5.7";
 
   src = fetchurl {
     url = "mirror://gnupg/${pname}/${pname}-${version}.tar.bz2";
-    sha256 = "sha256-6f0nIY1TlJBOTjl4j5sXQnEcPmtBaJoxqjOAvVqk9CY=";
+    sha256 = "sha256-AQMIH/wng4ouUEeRU8oQXoc9PWXYqVkygunJTH5q+3Y=";
   };
 
   outputs = [ "out" "dev" "info" ];
@@ -27,15 +27,23 @@ stdenv.mkDerivation rec {
     sed -i 's,#include <gpg-error.h>,#include "${libgpg-error.dev}/include/gpg-error.h",g' $dev/include/assuan.h
   '';
 
+  passthru.updateScript = gitUpdater {
+    url = "https://dev.gnupg.org/source/libassuan.git";
+    rev-prefix = "libassuan-";
+    ignoredVersions = ".*-base";
+  };
+
   meta = with lib; {
     description = "IPC library used by GnuPG and related software";
+    mainProgram = "libassuan-config";
     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";
+    homepage = "https://gnupg.org/software/libassuan/";
+    changelog = "https://dev.gnupg.org/source/libassuan/browse/master/NEWS;libassuan-${version}";
     license = licenses.lgpl2Plus;
     platforms = platforms.all;
     maintainers = [ ];
diff --git a/pkgs/development/libraries/libast/default.nix b/pkgs/development/libraries/libast/default.nix
index f4dae188f31c..49db79aaf978 100644
--- a/pkgs/development/libraries/libast/default.nix
+++ b/pkgs/development/libraries/libast/default.nix
@@ -24,6 +24,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     inherit (src.meta) homepage;
     description = "Library of Assorted Spiffy Things";
+    mainProgram = "libast-config";
     license = licenses.bsd2;
     maintainers = [ maintainers.AndersonTorres ];
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/libbson/default.nix b/pkgs/development/libraries/libbson/default.nix
deleted file mode 100644
index e03d7c194847..000000000000
--- a/pkgs/development/libraries/libbson/default.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-{ 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/pkgs/development/libraries/libbytesize/default.nix b/pkgs/development/libraries/libbytesize/default.nix
index 6604bb322294..08fc56931250 100644
--- a/pkgs/development/libraries/libbytesize/default.nix
+++ b/pkgs/development/libraries/libbytesize/default.nix
@@ -49,6 +49,7 @@ stdenv.mkDerivation (finalAttrs: {
   meta = {
     homepage = "https://github.com/storaged-project/libbytesize";
     description = "A tiny library providing a C 'class' for working with arbitrary big sizes in bytes";
+    mainProgram = "bscalc";
     license = lib.licenses.lgpl2Plus;
     maintainers = with lib.maintainers; [ AndersonTorres ];
     platforms = lib.platforms.linux;
diff --git a/pkgs/development/libraries/libcanberra/default.nix b/pkgs/development/libraries/libcanberra/default.nix
index cda60e4d215f..684c6d9d242e 100644
--- a/pkgs/development/libraries/libcanberra/default.nix
+++ b/pkgs/development/libraries/libcanberra/default.nix
@@ -60,6 +60,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "An implementation of the XDG Sound Theme and Name Specifications";
+    mainProgram = "canberra-gtk-play";
     longDescription = ''
       libcanberra is an implementation of the XDG Sound Theme and Name
       Specifications, for generating event sounds on free desktops
diff --git a/pkgs/development/libraries/libcdada/default.nix b/pkgs/development/libraries/libcdada/default.nix
index e78d845cf5be..5d1d295f74a8 100644
--- a/pkgs/development/libraries/libcdada/default.nix
+++ b/pkgs/development/libraries/libcdada/default.nix
@@ -6,13 +6,13 @@
 
 stdenv.mkDerivation rec {
   pname = "libcdada";
-  version = "0.4.0";
+  version = "0.5.2";
 
   src = fetchFromGitHub {
     owner = "msune";
     repo = "libcdada";
     rev = "v${version}";
-    hash = "sha256-vUasCukDRZYB67eu87ckEZG9i6rsNf0aKY2kZsVezRE=";
+    hash = "sha256-rrBmsXBatvaf/u/UVHpTm9YUo+gsQv1rtuprpRF/3kU=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/libraries/libcdaudio/default.nix b/pkgs/development/libraries/libcdaudio/default.nix
index 134f9d7f8f33..fa873672dbcf 100644
--- a/pkgs/development/libraries/libcdaudio/default.nix
+++ b/pkgs/development/libraries/libcdaudio/default.nix
@@ -11,6 +11,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "A portable library for controlling audio CDs";
+    mainProgram = "libcdaudio-config";
     homepage = "https://libcdaudio.sourceforge.net";
     platforms = lib.platforms.linux;
     license = lib.licenses.lgpl2;
diff --git a/pkgs/development/libraries/libchardet/default.nix b/pkgs/development/libraries/libchardet/default.nix
index 47ce911a6951..a362e8ab2bb7 100644
--- a/pkgs/development/libraries/libchardet/default.nix
+++ b/pkgs/development/libraries/libchardet/default.nix
@@ -17,6 +17,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Mozilla's Universal Charset Detector C/C++ API";
+    mainProgram = "chardet-config";
     homepage = "ftp://ftp.oops.org/pub/oops/libchardet/index.html";
     license = licenses.mpl11;
     maintainers = [ maintainers.abbradar ];
diff --git a/pkgs/development/libraries/libcork/default.nix b/pkgs/development/libraries/libcork/default.nix
index 305ba24e280e..87a068c24d1a 100644
--- a/pkgs/development/libraries/libcork/default.nix
+++ b/pkgs/development/libraries/libcork/default.nix
@@ -44,6 +44,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://github.com/dcreager/libcork";
     description = "A simple, easily embeddable cross-platform C library";
+    mainProgram = "cork-hash";
     license = licenses.bsd3;
     platforms = platforms.unix;
     maintainers = with maintainers; [ lovesegfault ];
diff --git a/pkgs/development/libraries/libcredis/default.nix b/pkgs/development/libraries/libcredis/default.nix
index e0224d865d55..3515bce2da20 100644
--- a/pkgs/development/libraries/libcredis/default.nix
+++ b/pkgs/development/libraries/libcredis/default.nix
@@ -22,6 +22,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "C client library for Redis (key-value database)";
+    mainProgram = "credis-test";
     homepage = "https://code.google.com/archive/p/credis/";
     license = licenses.bsd3; # from homepage
     platforms = platforms.all;
diff --git a/pkgs/development/libraries/libcryptui/default.nix b/pkgs/development/libraries/libcryptui/default.nix
index 89b7dfa66444..c0537e7e367b 100644
--- a/pkgs/development/libraries/libcryptui/default.nix
+++ b/pkgs/development/libraries/libcryptui/default.nix
@@ -30,6 +30,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Interface components for OpenPGP";
+    mainProgram = "seahorse-daemon";
     homepage = "https://gitlab.gnome.org/GNOME/libcryptui";
     license = licenses.lgpl21Plus;
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/libctl/default.nix b/pkgs/development/libraries/libctl/default.nix
index d7fed2415df0..6969f6166beb 100644
--- a/pkgs/development/libraries/libctl/default.nix
+++ b/pkgs/development/libraries/libctl/default.nix
@@ -24,6 +24,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Guile-based library for supporting flexible control files in scientific simulations";
+    mainProgram = "gen-ctl-io";
     homepage = "https://github.com/NanoComp/libctl";
     license = licenses.gpl2Only;
     maintainers = with maintainers; [ carpinchomug ];
diff --git a/pkgs/development/libraries/libdatachannel/default.nix b/pkgs/development/libraries/libdatachannel/default.nix
index 64351a85a9ae..9c090399dbc5 100644
--- a/pkgs/development/libraries/libdatachannel/default.nix
+++ b/pkgs/development/libraries/libdatachannel/default.nix
@@ -14,13 +14,13 @@
 
 stdenv.mkDerivation rec {
   pname = "libdatachannel";
-  version = "0.19.5";
+  version = "0.20.2";
 
   src = fetchFromGitHub {
     owner = "paullouisageneau";
-    repo = pname;
+    repo = "libdatachannel";
     rev = "v${version}";
-    hash = "sha256-XTfe0NqDQWx4ISgEiUbzACH9csaG+IrUvwss07dnz80=";
+    hash = "sha256-bBSsD845iwCMA7TdMBxzezjNbMaGwvRq6rvY/8NLYRU=";
   };
 
   outputs = [ "out" "dev" ];
diff --git a/pkgs/development/libraries/libdazzle/default.nix b/pkgs/development/libraries/libdazzle/default.nix
index ec616b4a5fab..38ba2e3b3615 100644
--- a/pkgs/development/libraries/libdazzle/default.nix
+++ b/pkgs/development/libraries/libdazzle/default.nix
@@ -73,6 +73,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A library to delight your users with fancy features";
+    mainProgram = "dazzle-list-counters";
     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
diff --git a/pkgs/development/libraries/libdbi-drivers/default.nix b/pkgs/development/libraries/libdbi-drivers/default.nix
index 461a3c0b7bbd..f1352cd47b92 100644
--- a/pkgs/development/libraries/libdbi-drivers/default.nix
+++ b/pkgs/development/libraries/libdbi-drivers/default.nix
@@ -16,6 +16,11 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ libdbi sqlite postgresql ] ++ lib.optional (libmysqlclient != null) libmysqlclient;
 
+  patches = [
+    # https://sourceforge.net/p/libdbi-drivers/libdbi-drivers/ci/24f48b86c8988ee3aaebc5f303d71e9d789f77b6
+    ./libdbi-drivers-0.9.0-buffer_overflow.patch
+  ];
+
   postPatch = ''
     sed -i '/SQLITE3_LIBS/ s/-lsqlite/-lsqlite3/' configure;
   '';
@@ -41,6 +46,11 @@ stdenv.mkDerivation rec {
     "--with-pgsql_libdir=${postgresql.lib}/lib"
   ];
 
+  env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [
+    "-Wno-error=incompatible-function-pointer-types"
+    "-Wno-error=int-conversion"
+  ]);
+
   installFlags = [ "DESTDIR=\${out}" ];
 
   postInstall = ''
diff --git a/pkgs/development/libraries/libdbi-drivers/libdbi-drivers-0.9.0-buffer_overflow.patch b/pkgs/development/libraries/libdbi-drivers/libdbi-drivers-0.9.0-buffer_overflow.patch
new file mode 100644
index 000000000000..1891c1a143ba
--- /dev/null
+++ b/pkgs/development/libraries/libdbi-drivers/libdbi-drivers-0.9.0-buffer_overflow.patch
@@ -0,0 +1,11 @@
+--- a/drivers/sqlite3/dbd_sqlite3.c
++++ b/drivers/sqlite3/dbd_sqlite3.c
+@@ -1451,7 +1451,7 @@ static int getTables(char** tables, int
+ 		    break;
+ 		  }
+ 
+-		  word_lower[item-start+1];
++		  char word_lower[item-start+1];
+ 		  strncpy(word_lower,start,item-start);
+ 		  word_lower[item-start] = '\0';
+ 		  int i = 0;
diff --git a/pkgs/development/libraries/libde265/default.nix b/pkgs/development/libraries/libde265/default.nix
index 6259fa5b4839..e4dfba60fe99 100644
--- a/pkgs/development/libraries/libde265/default.nix
+++ b/pkgs/development/libraries/libde265/default.nix
@@ -40,6 +40,7 @@ stdenv.mkDerivation (finalAttrs: rec {
   meta = {
     homepage = "https://github.com/strukturag/libde265";
     description = "Open h.265 video codec implementation";
+    mainProgram = "dec265";
     license = lib.licenses.lgpl3;
     platforms = lib.platforms.unix;
     maintainers = with lib.maintainers; [ gebner ];
diff --git a/pkgs/development/libraries/libdeflate/default.nix b/pkgs/development/libraries/libdeflate/default.nix
index 7aa0cef5a81d..52bf3a272bab 100644
--- a/pkgs/development/libraries/libdeflate/default.nix
+++ b/pkgs/development/libraries/libdeflate/default.nix
@@ -35,7 +35,7 @@ stdenv.mkDerivation (finalAttrs: {
     license = licenses.mit;
     homepage = "https://github.com/ebiggers/libdeflate";
     changelog = "https://github.com/ebiggers/libdeflate/blob/v${finalAttrs.version}/NEWS.md";
-    platforms = platforms.unix;
+    platforms = platforms.unix ++ platforms.windows;
     maintainers = with maintainers; [ orivej kaction ];
     pkgConfigModules = [ "libdeflate" ];
   };
diff --git a/pkgs/development/libraries/libdevil/default.nix b/pkgs/development/libraries/libdevil/default.nix
index 0cba50c3a924..36bd2f9ef12f 100644
--- a/pkgs/development/libraries/libdevil/default.nix
+++ b/pkgs/development/libraries/libdevil/default.nix
@@ -69,6 +69,7 @@ stdenv.mkDerivation (finalAttrs: {
   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";
+    mainProgram = "ilur";
     license = licenses.lgpl2;
     pkgConfigModules = [ "IL" ];
     platforms = platforms.mesaPlatforms;
diff --git a/pkgs/development/libraries/libdicom/default.nix b/pkgs/development/libraries/libdicom/default.nix
index cb4d68121ef5..94dfaf81298d 100644
--- a/pkgs/development/libraries/libdicom/default.nix
+++ b/pkgs/development/libraries/libdicom/default.nix
@@ -1,6 +1,7 @@
 { lib
 , stdenv
 , fetchFromGitHub
+, fetchpatch
 , uthash
 , meson
 , ninja
@@ -19,6 +20,15 @@ stdenv.mkDerivation (finalAttrs: {
     sha256 = "sha256-9n0Gp9+fmTM/shgWC8zpwt1pic9BrvDubOt7f+ZDMeE=";
   };
 
+  patches = [
+    (fetchpatch {
+      name = "CVE-2024-24793.CVE-2024-24794.patch";
+      url = "https://github.com/ImagingDataCommons/libdicom/commit/3661aa4cdbe9c39f67d38ae87520f9e3ed50ab16.patch";
+      excludes = [ "CHANGELOG.md" ];
+      hash = "sha256-/KTp0nKYk6jX4phNHY+nzjEptUBHKM2JkOftS5vHsEw=";
+    })
+  ];
+
   buildInputs = [ uthash ];
 
   nativeBuildInputs = [ meson ninja pkg-config ]
diff --git a/pkgs/development/libraries/libdigidocpp/default.nix b/pkgs/development/libraries/libdigidocpp/default.nix
index 49c3713bbe0e..90a169df7734 100644
--- a/pkgs/development/libraries/libdigidocpp/default.nix
+++ b/pkgs/development/libraries/libdigidocpp/default.nix
@@ -28,6 +28,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Library for creating DigiDoc signature files";
+    mainProgram = "digidoc-tool";
     homepage = "https://www.id.ee/";
     license = licenses.lgpl21Plus;
     platforms = platforms.linux;
diff --git a/pkgs/development/libraries/libdisplay-info/default.nix b/pkgs/development/libraries/libdisplay-info/default.nix
index 783ee4ad483d..20376ba6a4b3 100644
--- a/pkgs/development/libraries/libdisplay-info/default.nix
+++ b/pkgs/development/libraries/libdisplay-info/default.nix
@@ -30,6 +30,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "EDID and DisplayID library";
+    mainProgram = "di-edid-decode";
     homepage = "https://gitlab.freedesktop.org/emersion/libdisplay-info";
     license = licenses.mit;
     platforms = platforms.linux;
diff --git a/pkgs/development/libraries/libdivecomputer/default.nix b/pkgs/development/libraries/libdivecomputer/default.nix
index 8e37bd773cb3..f79e3dc717a5 100644
--- a/pkgs/development/libraries/libdivecomputer/default.nix
+++ b/pkgs/development/libraries/libdivecomputer/default.nix
@@ -14,6 +14,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "http://www.libdivecomputer.org";
     description = "A cross-platform and open source library for communication with dive computers from various manufacturers";
+    mainProgram = "dctool";
     maintainers = [ maintainers.mguentner ];
     license = licenses.lgpl21;
     platforms = platforms.all;
diff --git a/pkgs/development/libraries/libdvdnav/4.2.1.nix b/pkgs/development/libraries/libdvdnav/4.2.1.nix
index 0285ff22fe2f..5567d7c39c28 100644
--- a/pkgs/development/libraries/libdvdnav/4.2.1.nix
+++ b/pkgs/development/libraries/libdvdnav/4.2.1.nix
@@ -21,6 +21,7 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "http://dvdnav.mplayerhq.hu/";
     description = "A library that implements DVD navigation features such as DVD menus";
+    mainProgram = "dvdnav-config";
     license = lib.licenses.gpl2;
     maintainers = [ lib.maintainers.wmertens ];
     platforms = lib.platforms.linux;
diff --git a/pkgs/development/libraries/libei/default.nix b/pkgs/development/libraries/libei/default.nix
index 688d0448861c..5ce873879064 100644
--- a/pkgs/development/libraries/libei/default.nix
+++ b/pkgs/development/libraries/libei/default.nix
@@ -2,7 +2,6 @@
 , stdenv
 , fetchFromGitHub
 , fetchFromGitLab
-, attr
 , libevdev
 , libxkbcommon
 , meson
@@ -10,8 +9,8 @@
 , pkg-config
 , protobuf
 , protobufc
-, python3
 , systemd
+, buildPackages
 }:
 let
   munit = fetchFromGitHub {
@@ -44,7 +43,7 @@ stdenv.mkDerivation rec {
     meson
     ninja
     pkg-config
-    (python3.withPackages(ps: with ps; [
+    (buildPackages.python3.withPackages (ps: with ps; [
       attrs
       jinja2
       pytest
@@ -61,6 +60,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Library for Emulated Input";
+    mainProgram = "ei-debug-events";
     homepage = "https://gitlab.freedesktop.org/libinput/libei";
     license = licenses.mit;
     maintainers = [ maintainers.pedrohlc ];
diff --git a/pkgs/development/libraries/libemf2svg/default.nix b/pkgs/development/libraries/libemf2svg/default.nix
index 4bb7caa02615..351d9345f3f7 100644
--- a/pkgs/development/libraries/libemf2svg/default.nix
+++ b/pkgs/development/libraries/libemf2svg/default.nix
@@ -23,6 +23,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Microsoft EMF to SVG conversion library";
+    mainProgram = "emf2svg-conv";
     homepage = "https://github.com/kakwa/libemf2svg";
     maintainers = with maintainers; [ erdnaxe ];
     license = licenses.gpl2Only;
diff --git a/pkgs/development/libraries/libevent/default.nix b/pkgs/development/libraries/libevent/default.nix
index 782d86f1f581..ff9784064432 100644
--- a/pkgs/development/libraries/libevent/default.nix
+++ b/pkgs/development/libraries/libevent/default.nix
@@ -54,6 +54,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Event notification library";
+    mainProgram = "event_rpcgen.py";
     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
diff --git a/pkgs/development/libraries/libextractor/default.nix b/pkgs/development/libraries/libextractor/default.nix
index 272cd3d9aa3e..d8e8d6101c13 100644
--- a/pkgs/development/libraries/libextractor/default.nix
+++ b/pkgs/development/libraries/libextractor/default.nix
@@ -75,6 +75,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Simple library for keyword extraction";
+    mainProgram = "extract";
 
     longDescription =
       '' GNU libextractor is a library used to extract meta-data from files
diff --git a/pkgs/development/libraries/libgit2/default.nix b/pkgs/development/libraries/libgit2/default.nix
index a554f0dd45b7..7e70b65423a9 100644
--- a/pkgs/development/libraries/libgit2/default.nix
+++ b/pkgs/development/libraries/libgit2/default.nix
@@ -74,6 +74,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Linkable library implementation of Git that you can use in your application";
+    mainProgram = "git2";
     homepage = "https://libgit2.org/";
     license = licenses.gpl2Plus;
     platforms = platforms.all;
diff --git a/pkgs/development/libraries/libgnomekbd/default.nix b/pkgs/development/libraries/libgnomekbd/default.nix
index 251f86b05789..fc9924b50834 100644
--- a/pkgs/development/libraries/libgnomekbd/default.nix
+++ b/pkgs/development/libraries/libgnomekbd/default.nix
@@ -53,6 +53,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Keyboard management library";
+    mainProgram = "gkbd-keyboard-display";
     maintainers = teams.gnome.members;
     license = licenses.gpl2;
     platforms = platforms.linux;
diff --git a/pkgs/development/libraries/libgpg-error/default.nix b/pkgs/development/libraries/libgpg-error/default.nix
index fa3dc1b95b09..1d262a0a4402 100644
--- a/pkgs/development/libraries/libgpg-error/default.nix
+++ b/pkgs/development/libraries/libgpg-error/default.nix
@@ -17,11 +17,11 @@
   };
 in stdenv.mkDerivation (rec {
   pname = "libgpg-error";
-  version = "1.47";
+  version = "1.48";
 
   src = fetchurl {
     url = "mirror://gnupg/${pname}/${pname}-${version}.tar.bz2";
-    sha256 = "sha256-njxnCWa5bsx0bCjCxBlUHjvLeH0ac5MPXl9eG8u7m9s=";
+    sha256 = "sha256-ic4a6JPhIpJLhY3oTcT2eq4p/6YQ6/Zo1apTkEVmPW8=";
   };
 
   postPatch = ''
@@ -64,6 +64,7 @@ in stdenv.mkDerivation (rec {
     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";
+    mainProgram = "gen-posix-lock-obj";
 
     longDescription = ''
       Libgpg-error is a small library that defines common error values
diff --git a/pkgs/development/libraries/libgpod/default.nix b/pkgs/development/libraries/libgpod/default.nix
index a34b108a0a5a..2de6d8dd4d2c 100644
--- a/pkgs/development/libraries/libgpod/default.nix
+++ b/pkgs/development/libraries/libgpod/default.nix
@@ -71,6 +71,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://sourceforge.net/projects/gtkpod/";
     description = "Library used by gtkpod to access the contents of an ipod";
+    mainProgram = "ipod-read-sysinfo-extended";
     license = licenses.lgpl21Plus;
     platforms = platforms.linux;
     maintainers = [ ];
diff --git a/pkgs/development/libraries/libhandy/0.x.nix b/pkgs/development/libraries/libhandy/0.x.nix
index a6945508e593..1ae6c72afc3e 100644
--- a/pkgs/development/libraries/libhandy/0.x.nix
+++ b/pkgs/development/libraries/libhandy/0.x.nix
@@ -45,6 +45,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A library full of GTK widgets for mobile phones";
+    mainProgram = "handy-0.0-demo";
     homepage = "https://source.puri.sm/Librem5/libhandy";
     license = licenses.lgpl21Plus;
     maintainers = with maintainers; [ ];
diff --git a/pkgs/development/libraries/libhandy/default.nix b/pkgs/development/libraries/libhandy/default.nix
index 7507f40b604f..28e698e2a83f 100644
--- a/pkgs/development/libraries/libhandy/default.nix
+++ b/pkgs/development/libraries/libhandy/default.nix
@@ -132,6 +132,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     changelog = "https://gitlab.gnome.org/GNOME/libhandy/-/tags/${version}";
     description = "Building blocks for modern adaptive GNOME apps";
+    mainProgram = "handy-1-demo";
     homepage = "https://gitlab.gnome.org/GNOME/libhandy";
     license = licenses.lgpl21Plus;
     maintainers = teams.gnome.members;
diff --git a/pkgs/development/libraries/libhangul/default.nix b/pkgs/development/libraries/libhangul/default.nix
index 295ed9bf3054..2ff18376a461 100644
--- a/pkgs/development/libraries/libhangul/default.nix
+++ b/pkgs/development/libraries/libhangul/default.nix
@@ -11,6 +11,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Core algorithm library for Korean input routines";
+    mainProgram = "hangul";
     homepage = "https://github.com/choehwanjin/libhangul";
     license = licenses.lgpl21;
     maintainers = [ maintainers.ianwookim ];
diff --git a/pkgs/development/libraries/libhdhomerun/default.nix b/pkgs/development/libraries/libhdhomerun/default.nix
index 558e6d6fa894..427ad20eca32 100644
--- a/pkgs/development/libraries/libhdhomerun/default.nix
+++ b/pkgs/development/libraries/libhdhomerun/default.nix
@@ -34,6 +34,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Implements the libhdhomerun protocol for use with Silicondust HDHomeRun TV tuners";
+    mainProgram = "hdhomerun_config";
     homepage = "https://www.silicondust.com/support/linux";
     license = licenses.lgpl21Only;
     maintainers = with maintainers; [ sielicki titanous ];
diff --git a/pkgs/development/libraries/libhsts/default.nix b/pkgs/development/libraries/libhsts/default.nix
index 2150bbd24bfb..967ffe563172 100644
--- a/pkgs/development/libraries/libhsts/default.nix
+++ b/pkgs/development/libraries/libhsts/default.nix
@@ -33,6 +33,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Library to easily check a domain against the Chromium HSTS Preload list";
+    mainProgram = "hsts";
     homepage = "https://gitlab.com/rockdaboot/libhsts";
     license = with licenses; [ mit bsd3 ];
     maintainers = with maintainers; [ ];
diff --git a/pkgs/development/libraries/libieee1284/default.nix b/pkgs/development/libraries/libieee1284/default.nix
index a2cbd6e4096f..4b5bef5c32a6 100644
--- a/pkgs/development/libraries/libieee1284/default.nix
+++ b/pkgs/development/libraries/libieee1284/default.nix
@@ -40,6 +40,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Parallel port communication library";
+    mainProgram = "libieee1284_test";
     homepage = "http://cyberelk.net/tim/software/libieee1284/";
     license = licenses.gpl2Plus;
     platforms = platforms.linux;
diff --git a/pkgs/development/libraries/libinfinity/default.nix b/pkgs/development/libraries/libinfinity/default.nix
index f9963ce3e636..c4285220af3d 100644
--- a/pkgs/development/libraries/libinfinity/default.nix
+++ b/pkgs/development/libraries/libinfinity/default.nix
@@ -43,6 +43,7 @@ let
     meta = {
       homepage = "https://gobby.github.io/";
       description = "An implementation of the Infinote protocol written in GObject-based C";
+      mainProgram = "infinoted-0.7";
       license = lib.licenses.lgpl2Plus;
       maintainers = [ ];
       platforms = with lib.platforms; linux ++ darwin;
diff --git a/pkgs/development/libraries/libinput/default.nix b/pkgs/development/libraries/libinput/default.nix
index 2a1c2f8b45a9..f0005969bbcf 100644
--- a/pkgs/development/libraries/libinput/default.nix
+++ b/pkgs/development/libraries/libinput/default.nix
@@ -128,6 +128,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Handles input devices in Wayland compositors and provides a generic X.Org input driver";
+    mainProgram = "libinput";
     homepage = "https://www.freedesktop.org/wiki/Software/libinput/";
     license = licenses.mit;
     platforms = platforms.linux;
diff --git a/pkgs/development/libraries/libipfix/default.nix b/pkgs/development/libraries/libipfix/default.nix
index e62c456dd4ab..96fd190e15bb 100644
--- a/pkgs/development/libraries/libipfix/default.nix
+++ b/pkgs/development/libraries/libipfix/default.nix
@@ -18,6 +18,7 @@ stdenv.mkDerivation {
   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";
+    mainProgram = "ipfix_collector";
     license = licenses.lgpl3;
     platforms = platforms.linux;
     maintainers = with maintainers; [ lewo ];
diff --git a/pkgs/development/libraries/libipt/default.nix b/pkgs/development/libraries/libipt/default.nix
index 6a05aec46854..ed88ed8f2828 100644
--- a/pkgs/development/libraries/libipt/default.nix
+++ b/pkgs/development/libraries/libipt/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "libipt";
-  version = "2.1";
+  version = "2.1.1";
 
   src = fetchFromGitHub {
     owner = "intel";
     repo = "libipt";
     rev = "v${version}";
-    sha256 = "sha256-SLCuNTFRGFh0mTv1xLCIDg7b6DbWCxgHhrCoPu9xpmw=";
+    sha256 = "sha256-tyOheitSlccf/n3mklGL2oAKLBKYT60LSLre9/G/b9Q=";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/pkgs/development/libraries/libiptcdata/default.nix b/pkgs/development/libraries/libiptcdata/default.nix
index 6bf670a40382..f6f918c1d522 100644
--- a/pkgs/development/libraries/libiptcdata/default.nix
+++ b/pkgs/development/libraries/libiptcdata/default.nix
@@ -34,6 +34,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Library for reading and writing the IPTC metadata in images and other files";
+    mainProgram = "iptc";
     homepage = "https://github.com/ianw/libiptcdata";
     license = licenses.gpl2Plus;
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/libixp/default.nix b/pkgs/development/libraries/libixp/default.nix
index f6ad6d01b08f..7d235d7a7649 100644
--- a/pkgs/development/libraries/libixp/default.nix
+++ b/pkgs/development/libraries/libixp/default.nix
@@ -26,6 +26,7 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "https://github.com/0intro/libixp";
     description = "Portable, simple C-language 9P client and server library";
+    mainProgram = "ixpc";
     maintainers = with lib.maintainers; [ kovirobi ];
     license = lib.licenses.mit;
     platforms = with lib.platforms; unix;
diff --git a/pkgs/development/libraries/libjcat/default.nix b/pkgs/development/libraries/libjcat/default.nix
index 6d9481d1da2d..33fb21237e41 100644
--- a/pkgs/development/libraries/libjcat/default.nix
+++ b/pkgs/development/libraries/libjcat/default.nix
@@ -70,6 +70,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Library for reading and writing Jcat files";
+    mainProgram = "jcat-tool";
     homepage = "https://github.com/hughsie/libjcat";
     license = licenses.lgpl21Plus;
     maintainers = with maintainers; [ ];
diff --git a/pkgs/development/libraries/libjson-rpc-cpp/default.nix b/pkgs/development/libraries/libjson-rpc-cpp/default.nix
index 8e80b9bd8405..4e97ff2f4d5d 100644
--- a/pkgs/development/libraries/libjson-rpc-cpp/default.nix
+++ b/pkgs/development/libraries/libjson-rpc-cpp/default.nix
@@ -94,6 +94,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "C++ framework for json-rpc (json remote procedure call)";
+    mainProgram = "jsonrpcstub";
     homepage = "https://github.com/cinemast/libjson-rpc-cpp";
     license = licenses.mit;
     platforms = platforms.linux;
diff --git a/pkgs/development/libraries/libjxl/default.nix b/pkgs/development/libraries/libjxl/default.nix
index 833b58e59428..10dcc29785bd 100644
--- a/pkgs/development/libraries/libjxl/default.nix
+++ b/pkgs/development/libraries/libjxl/default.nix
@@ -32,9 +32,10 @@ stdenv.mkDerivation rec {
     fetchSubmodules = true;
   };
 
+  strictDeps = true;
+
   nativeBuildInputs = [
     cmake
-    gtest
     pkg-config
     asciidoc
     doxygen
@@ -64,6 +65,7 @@ stdenv.mkDerivation rec {
   buildInputs = [
     giflib
     gperftools # provides `libtcmalloc`
+    gtest
     libjpeg
     libpng
     libwebp
diff --git a/pkgs/development/libraries/libksba/default.nix b/pkgs/development/libraries/libksba/default.nix
index 8f22ede81669..d33de73e4091 100644
--- a/pkgs/development/libraries/libksba/default.nix
+++ b/pkgs/development/libraries/libksba/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "libksba";
-  version = "1.6.5";
+  version = "1.6.6";
 
   src = fetchurl {
     url = "mirror://gnupg/libksba/libksba-${version}.tar.bz2";
-    hash = "sha256-pWRijFdMmSh5mHU/mNdQur2RpOnbRR9GrRQEZu8qbRY=";
+    hash = "sha256-XewDPSEVWTOIOMDElXxz39w+6G9zl31ieWQMnNCM5qQ=";
   };
 
   outputs = [ "out" "dev" "info" ];
@@ -26,6 +26,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://www.gnupg.org";
     description = "CMS and X.509 access library";
+    mainProgram = "ksba-config";
     platforms = platforms.all;
     maintainers = with maintainers; [ ];
     license = licenses.lgpl3;
diff --git a/pkgs/development/libraries/liblockfile/default.nix b/pkgs/development/libraries/liblockfile/default.nix
index 003991c80dde..17fc086704ec 100644
--- a/pkgs/development/libraries/liblockfile/default.nix
+++ b/pkgs/development/libraries/liblockfile/default.nix
@@ -20,6 +20,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "Shared library with NFS-safe locking functions";
+    mainProgram = "dotlockfile";
     homepage = "http://packages.debian.org/unstable/libs/liblockfile1";
     license = lib.licenses.gpl2Plus;
 
diff --git a/pkgs/development/libraries/liblogging/default.nix b/pkgs/development/libraries/liblogging/default.nix
index 2623e65f68b0..50b850b886a5 100644
--- a/pkgs/development/libraries/liblogging/default.nix
+++ b/pkgs/development/libraries/liblogging/default.nix
@@ -25,6 +25,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "http://www.liblogging.org/";
     description = "Lightweight signal-safe logging library";
+    mainProgram = "stdlogctl";
     license = licenses.bsd2;
     platforms = platforms.all;
   };
diff --git a/pkgs/development/libraries/liblouis/default.nix b/pkgs/development/libraries/liblouis/default.nix
index 6f22edae4f3d..a5c0bf92751f 100644
--- a/pkgs/development/libraries/liblouis/default.nix
+++ b/pkgs/development/libraries/liblouis/default.nix
@@ -13,7 +13,7 @@
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "liblouis";
-  version = "3.28.0";
+  version = "3.29.0";
 
   outputs = [ "out" "dev" "info" "doc" ]
     # configure: WARNING: cannot generate manual pages while cross compiling
@@ -23,7 +23,7 @@ stdenv.mkDerivation (finalAttrs: {
     owner = "liblouis";
     repo = "liblouis";
     rev = "v${finalAttrs.version}";
-    hash = "sha256-PvGlhsnAxQctcODiK628BDdzYaWUIF/F3dN2g//Gywg=";
+    hash = "sha256-TaMPl53FlUSZIsjhoTYcv3Y+j86fDHuBTjiyr/uP1tM=";
   };
 
   strictDeps = true;
diff --git a/pkgs/development/libraries/libmanette/default.nix b/pkgs/development/libraries/libmanette/default.nix
index e5bbf9a39cb9..ee8891d051f0 100644
--- a/pkgs/development/libraries/libmanette/default.nix
+++ b/pkgs/development/libraries/libmanette/default.nix
@@ -68,6 +68,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A simple GObject game controller library";
+    mainProgram = "manette-test";
     homepage = "https://gnome.pages.gitlab.gnome.org/libmanette/";
     license = licenses.lgpl21Plus;
     maintainers = teams.gnome.members;
diff --git a/pkgs/development/libraries/libmcrypt/default.nix b/pkgs/development/libraries/libmcrypt/default.nix
index 668389091c01..672ba730be12 100644
--- a/pkgs/development/libraries/libmcrypt/default.nix
+++ b/pkgs/development/libraries/libmcrypt/default.nix
@@ -24,6 +24,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "Replacement for the old crypt() package and crypt(1) command, with extensions";
+    mainProgram = "libmcrypt-config";
     homepage = "https://mcrypt.sourceforge.net";
     license = "GPL";
     platforms = lib.platforms.all;
diff --git a/pkgs/development/libraries/libmikmod/default.nix b/pkgs/development/libraries/libmikmod/default.nix
index 29f64116b7a8..90b548bef73a 100644
--- a/pkgs/development/libraries/libmikmod/default.nix
+++ b/pkgs/development/libraries/libmikmod/default.nix
@@ -28,6 +28,7 @@ in stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A library for playing tracker music module files";
+    mainProgram = "libmikmod-config";
     homepage    = "https://mikmod.shlomifish.org/";
     license     = licenses.lgpl2Plus;
     maintainers = with maintainers; [ astsmtl lovek323 ];
diff --git a/pkgs/development/libraries/libmng/default.nix b/pkgs/development/libraries/libmng/default.nix
index 15a68bdce589..19896b13998d 100644
--- a/pkgs/development/libraries/libmng/default.nix
+++ b/pkgs/development/libraries/libmng/default.nix
@@ -19,6 +19,6 @@ stdenv.mkDerivation rec {
     homepage = "http://www.libmng.com";
     license = licenses.zlib;
     maintainers = with maintainers; [ marcweber ];
-    platforms = platforms.unix;
+    platforms = platforms.unix ++ platforms.windows;
   };
 }
diff --git a/pkgs/development/libraries/libmodulemd/default.nix b/pkgs/development/libraries/libmodulemd/default.nix
index 7f21e52a037c..ce16753cf540 100644
--- a/pkgs/development/libraries/libmodulemd/default.nix
+++ b/pkgs/development/libraries/libmodulemd/default.nix
@@ -65,6 +65,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "C Library for manipulating module metadata files";
+    mainProgram = "modulemd-validator";
     homepage = "https://github.com/fedora-modularity/libmodulemd";
     license = licenses.mit;
     maintainers = with maintainers; [ ];
diff --git a/pkgs/development/libraries/libmx/default.nix b/pkgs/development/libraries/libmx/default.nix
index 52d92840a346..c6bbde6940b1 100644
--- a/pkgs/development/libraries/libmx/default.nix
+++ b/pkgs/development/libraries/libmx/default.nix
@@ -49,6 +49,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "http://www.clutter-project.org/";
     description = "A Clutter-based toolkit";
+    mainProgram = "mx-create-image-cache";
     longDescription =
       ''Mx is a widget toolkit using Clutter that provides a set of standard
         interface elements, including buttons, progress bars, scroll bars and
diff --git a/pkgs/development/libraries/libnatspec/default.nix b/pkgs/development/libraries/libnatspec/default.nix
index 360aba08e709..4124422c85bd 100644
--- a/pkgs/development/libraries/libnatspec/default.nix
+++ b/pkgs/development/libraries/libnatspec/default.nix
@@ -18,6 +18,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://natspec.sourceforge.net/";
     description = "A library intended to smooth national specificities in using of programs";
+    mainProgram = "natspec";
     platforms = platforms.unix;
     license = licenses.lgpl21;
   };
diff --git a/pkgs/development/libraries/libndp/default.nix b/pkgs/development/libraries/libndp/default.nix
index 6109c48b036e..b04b22da1236 100644
--- a/pkgs/development/libraries/libndp/default.nix
+++ b/pkgs/development/libraries/libndp/default.nix
@@ -14,6 +14,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "http://libndp.org/";
     description = "Library for Neighbor Discovery Protocol";
+    mainProgram = "ndptool";
     platforms = platforms.linux;
     maintainers = [ ];
     license = licenses.lgpl21;
diff --git a/pkgs/development/libraries/libnet/default.nix b/pkgs/development/libraries/libnet/default.nix
index b835844491fb..c8f38387111f 100644
--- a/pkgs/development/libraries/libnet/default.nix
+++ b/pkgs/development/libraries/libnet/default.nix
@@ -22,6 +22,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://github.com/sam-github/libnet";
     description = "Portable framework for low-level network packet construction";
+    mainProgram = "libnet-config";
     license = licenses.bsd3;
     platforms = platforms.unix;
   };
diff --git a/pkgs/development/libraries/libngspice/default.nix b/pkgs/development/libraries/libngspice/default.nix
index 840ff2177d85..6da456b26ed6 100644
--- a/pkgs/development/libraries/libngspice/default.nix
+++ b/pkgs/development/libraries/libngspice/default.nix
@@ -41,6 +41,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "The Next Generation Spice (Electronic Circuit Simulator)";
+    mainProgram = "ngspice";
     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 ];
diff --git a/pkgs/development/libraries/liboil/default.nix b/pkgs/development/libraries/liboil/default.nix
index 4291b3668039..7a28ac119c34 100644
--- a/pkgs/development/libraries/liboil/default.nix
+++ b/pkgs/development/libraries/liboil/default.nix
@@ -25,6 +25,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A library of simple functions that are optimized for various CPUs";
+    mainProgram = "oil-bugreport";
     homepage    = "https://liboil.freedesktop.org";
     license     = licenses.bsd2;
     maintainers = with maintainers; [ lovek323 ];
diff --git a/pkgs/development/libraries/libomxil-bellagio/default.nix b/pkgs/development/libraries/libomxil-bellagio/default.nix
index 4f129dc13781..027c0b8f499d 100644
--- a/pkgs/development/libraries/libomxil-bellagio/default.nix
+++ b/pkgs/development/libraries/libomxil-bellagio/default.nix
@@ -40,6 +40,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://omxil.sourceforge.net/";
     description = "An opensource implementation of the Khronos OpenMAX Integration Layer API to access multimedia components";
+    mainProgram = "omxregister-bellagio";
     license = licenses.lgpl21Plus;
     platforms = platforms.linux;
   };
diff --git a/pkgs/development/libraries/libopenshot-audio/default.nix b/pkgs/development/libraries/libopenshot-audio/default.nix
index e546dc7a5786..bbec90a4055a 100644
--- a/pkgs/development/libraries/libopenshot-audio/default.nix
+++ b/pkgs/development/libraries/libopenshot-audio/default.nix
@@ -65,6 +65,7 @@ stdenv.mkDerivation (finalAttrs: {
   meta = {
     homepage = "http://openshot.org/";
     description = "High-quality sound editing library";
+    mainProgram = "openshot-audio-demo";
     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
diff --git a/pkgs/development/libraries/libopus/default.nix b/pkgs/development/libraries/libopus/default.nix
index b2b095f5607e..3592c537ac44 100644
--- a/pkgs/development/libraries/libopus/default.nix
+++ b/pkgs/development/libraries/libopus/default.nix
@@ -2,6 +2,7 @@
 , stdenv
 , fetchpatch
 , fetchurl
+, gitUpdater
 , meson
 , python3
 , ninja
@@ -12,27 +13,22 @@
 
 # tests
 , ffmpeg-headless
+, testers
 }:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
   pname = "libopus";
-  version = "1.4";
+  version = "1.5.1";
 
   src = fetchurl {
-    url = "https://downloads.xiph.org/releases/opus/opus-${version}.tar.gz";
-    sha256 = "sha256-ybMrQlO+WuY9H/Fu6ga5S18PKVG3oCrO71jjo85JxR8=";
+    url = "https://downloads.xiph.org/releases/opus/opus-${finalAttrs.version}.tar.gz";
+    hash = "sha256-uEYQlZuNQXthGqEqIlZeCjcyCXxjidGQmNhEVD40D4U=";
   };
 
   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 = ''
@@ -58,16 +54,28 @@ stdenv.mkDerivation rec {
 
   doCheck = !stdenv.isi686 && !stdenv.isAarch32; # test_unit_LPC_inv_pred_gain fails
 
-  passthru.tests = {
-    inherit ffmpeg-headless;
+  passthru = {
+    updateScript = gitUpdater {
+      url = "https://gitlab.xiph.org/xiph/opus.git";
+      rev-prefix = "v";
+    };
+
+    tests = {
+      inherit ffmpeg-headless;
+
+      pkg-config = testers.hasPkgConfigModules {
+        package = finalAttrs.finalPackage;
+        moduleNames = [ "opus" ];
+      };
+    };
   };
 
   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}";
+    changelog = "https://gitlab.xiph.org/xiph/opus/-/releases/v${finalAttrs.version}";
     license = licenses.bsd3;
     platforms = platforms.all;
     maintainers = [ ];
   };
-}
+})
diff --git a/pkgs/development/libraries/libopus/test-timeout.patch b/pkgs/development/libraries/libopus/test-timeout.patch
index e20f12cc1d54..76025e648d8f 100644
--- a/pkgs/development/libraries/libopus/test-timeout.patch
+++ b/pkgs/development/libraries/libopus/test-timeout.patch
@@ -1,16 +1,9 @@
-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 @@
+@@ -1,6 +1,5 @@
  # 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'],
- ]
+   ['test_opus_decode', [], 120],
+   ['test_opus_encode', 'opus_encode_regressions.c', 240],
+   ['test_opus_extensions', [], 120],
diff --git a/pkgs/development/libraries/libpanel/default.nix b/pkgs/development/libraries/libpanel/default.nix
index a4f8e71eba2e..05b863ad2011 100644
--- a/pkgs/development/libraries/libpanel/default.nix
+++ b/pkgs/development/libraries/libpanel/default.nix
@@ -57,6 +57,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Dock/panel library for GTK 4";
+    mainProgram = "libpanel-example";
     homepage = "https://gitlab.gnome.org/GNOME/libpanel";
     license = licenses.lgpl3Plus;
     maintainers = teams.gnome.members;
diff --git a/pkgs/development/libraries/libpcap/default.nix b/pkgs/development/libraries/libpcap/default.nix
index d1ea44b6ac2f..7256e4922605 100644
--- a/pkgs/development/libraries/libpcap/default.nix
+++ b/pkgs/development/libraries/libpcap/default.nix
@@ -63,6 +63,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://www.tcpdump.org";
     description = "Packet Capture Library";
+    mainProgram = "pcap-config";
     platforms = platforms.unix;
     maintainers = with maintainers; [ fpletz ];
     license = licenses.bsd3;
diff --git a/pkgs/development/libraries/libpeas/default.nix b/pkgs/development/libraries/libpeas/default.nix
index f0b6023117d9..f9d8be93c66c 100644
--- a/pkgs/development/libraries/libpeas/default.nix
+++ b/pkgs/development/libraries/libpeas/default.nix
@@ -83,6 +83,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A GObject-based plugins engine";
+    mainProgram = "peas-demo";
     homepage = "https://wiki.gnome.org/Projects/Libpeas";
     license = licenses.gpl2Plus;
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/libpng/default.nix b/pkgs/development/libraries/libpng/default.nix
index e1d412b5006e..34d7a3e580b7 100644
--- a/pkgs/development/libraries/libpng/default.nix
+++ b/pkgs/development/libraries/libpng/default.nix
@@ -5,20 +5,20 @@
 assert zlib != null;
 
 let
-  patchVersion = "1.6.40";
+  patchVersion = "1.6.43";
   patch_src = fetchurl {
     url = "mirror://sourceforge/libpng-apng/libpng-${patchVersion}-apng.patch.gz";
-    hash = "sha256-CjykZIKTjY1sciZivtLH7gxlobViRESzztIa2NNW2y8=";
+    hash = "sha256-0QdXnpDVU4bQDmCG6nUJQvIqBLmrR2u6DGYHcM76/iI=";
   };
   whenPatched = lib.optionalString apngSupport;
 
 in stdenv.mkDerivation (finalAttrs: {
   pname = "libpng" + whenPatched "-apng";
-  version = "1.6.40";
+  version = "1.6.43";
 
   src = fetchurl {
     url = "mirror://sourceforge/libpng/libpng-${finalAttrs.version}.tar.xz";
-    hash = "sha256-U1tHmyRn/yMaPsbZKlJZBvuO8nl4vk9m2+BdPzoBs6E=";
+    hash = "sha256-alygZSOSotfJ2yrltAIQhDwLvAgcvUEIJasAzFnxSmw=";
   };
   postPatch = whenPatched "gunzip < ${patch_src} | patch -Np1";
 
@@ -38,7 +38,7 @@ in stdenv.mkDerivation (finalAttrs: {
   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";
+    changelog = "https://github.com/pnggroup/libpng/blob/v${finalAttrs.version}/CHANGES";
     license = licenses.libpng2;
     pkgConfigModules = [ "libpng" "libpng16" ];
     platforms = platforms.all;
diff --git a/pkgs/development/libraries/libproxy/default.nix b/pkgs/development/libraries/libproxy/default.nix
index 5c7a31625023..076e4c33b964 100644
--- a/pkgs/development/libraries/libproxy/default.nix
+++ b/pkgs/development/libraries/libproxy/default.nix
@@ -78,5 +78,6 @@ stdenv.mkDerivation rec {
     license = licenses.lgpl21;
     homepage = "https://libproxy.github.io/libproxy/";
     description = "A library that provides automatic proxy configuration management";
+    mainProgram = "proxy";
   };
 }
diff --git a/pkgs/development/libraries/libpsl/default.nix b/pkgs/development/libraries/libpsl/default.nix
index f4f6375cb419..a8fcd2581caa 100644
--- a/pkgs/development/libraries/libpsl/default.nix
+++ b/pkgs/development/libraries/libpsl/default.nix
@@ -23,6 +23,9 @@ stdenv.mkDerivation rec {
     hash = "sha256-mp9qjG7bplDPnqVUdc0XLdKEhzFoBOnHMgLZdXLNOi0=";
   };
 
+  # bin/psl-make-dafsa brings a large runtime closure through python3
+  outputs = [ "bin" "out" "dev" ];
+
   nativeBuildInputs = [
     autoreconfHook
     docbook_xsl
diff --git a/pkgs/development/libraries/librdf/raptor2.nix b/pkgs/development/libraries/librdf/raptor2.nix
index 4503a0cc43ed..b9d5252215cc 100644
--- a/pkgs/development/libraries/librdf/raptor2.nix
+++ b/pkgs/development/libraries/librdf/raptor2.nix
@@ -49,6 +49,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "The RDF Parser Toolkit";
+    mainProgram = "rapper";
     homepage = "https://librdf.org/raptor";
     license = with lib.licenses; [ lgpl21 asl20 ];
     maintainers = with lib.maintainers; [ marcweber ];
diff --git a/pkgs/development/libraries/libredwg/default.nix b/pkgs/development/libraries/libredwg/default.nix
index 7759917d9750..6eb06a1ebe67 100644
--- a/pkgs/development/libraries/libredwg/default.nix
+++ b/pkgs/development/libraries/libredwg/default.nix
@@ -1,7 +1,6 @@
 { lib
 , stdenv
 , fetchFromGitHub
-, fetchpatch
 , autoreconfHook
 , writeShellScript
 , pkg-config
@@ -18,24 +17,16 @@ let
 in
 stdenv.mkDerivation rec {
   pname = "libredwg";
-  version = "0.12.5.6313";
+  version = "0.13.3";
 
   src = fetchFromGitHub {
     owner = "LibreDWG";
     repo = pname;
     rev = version;
-    hash = "sha256-TM+cZ7N5PD6UG9cvy0XFa0sNYc3apbAJvEMh3husjRk=";
+    hash = "sha256-FlBHwNsqVSBE8dTDewoKkCbs8Jd/4d69MPpEFzg6Ruc=";
     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}
@@ -43,8 +34,6 @@ stdenv.mkDerivation rec {
   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) ''
@@ -64,8 +53,8 @@ stdenv.mkDerivation rec {
   # 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);
+  # FAIL: alive.test
+  doCheck = !stdenv.isLinux;
 
   # the "xmlsuite" test requires the libxml2 c library as well as the python module
   nativeCheckInputs = lib.optionals enablePython [ libxml2 libxml2.dev ];
diff --git a/pkgs/development/libraries/libs3/default.nix b/pkgs/development/libraries/libs3/default.nix
index b9f9278fad8c..4bea630c1b27 100644
--- a/pkgs/development/libraries/libs3/default.nix
+++ b/pkgs/development/libraries/libs3/default.nix
@@ -25,6 +25,7 @@ stdenv.mkDerivation {
   meta = with lib; {
     homepage = "https://github.com/bji/libs3";
     description = "A library for interfacing with amazon s3";
+    mainProgram = "s3";
     license = licenses.lgpl3Plus;
     platforms = platforms.linux;
   };
diff --git a/pkgs/development/libraries/libsamplerate/default.nix b/pkgs/development/libraries/libsamplerate/default.nix
index 5f0863bc49c8..198bc7362826 100644
--- a/pkgs/development/libraries/libsamplerate/default.nix
+++ b/pkgs/development/libraries/libsamplerate/default.nix
@@ -30,6 +30,7 @@ in stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Sample Rate Converter for audio";
+    mainProgram = "sndfile-resample";
     homepage    = "http://www.mega-nerd.com/SRC/index.html";
     license     = licenses.bsd2;
     maintainers = with maintainers; [ lovek323 ];
diff --git a/pkgs/development/libraries/libsearpc/default.nix b/pkgs/development/libraries/libsearpc/default.nix
index 9ae8d87f8872..6d4675717f0d 100644
--- a/pkgs/development/libraries/libsearpc/default.nix
+++ b/pkgs/development/libraries/libsearpc/default.nix
@@ -34,6 +34,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://github.com/haiwen/libsearpc";
     description = "A simple and easy-to-use C language RPC framework based on GObject System";
+    mainProgram = "searpc-codegen.py";
     license = licenses.lgpl3;
     platforms = platforms.linux;
     maintainers = with maintainers; [ greizgh ];
diff --git a/pkgs/development/libraries/libseccomp/default.nix b/pkgs/development/libraries/libseccomp/default.nix
index e5a8f42940e0..19ba1f2b8911 100644
--- a/pkgs/development/libraries/libseccomp/default.nix
+++ b/pkgs/development/libraries/libseccomp/default.nix
@@ -37,6 +37,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "High level library for the Linux Kernel seccomp filter";
+    mainProgram = "scmp_sys_resolver";
     homepage = "https://github.com/seccomp/libseccomp";
     license = licenses.lgpl21Only;
     platforms = platforms.linux;
diff --git a/pkgs/development/libraries/libserdes/default.nix b/pkgs/development/libraries/libserdes/default.nix
index 2a48c9a89770..ac776c4e4231 100644
--- a/pkgs/development/libraries/libserdes/default.nix
+++ b/pkgs/development/libraries/libserdes/default.nix
@@ -32,11 +32,6 @@ stdenv.mkDerivation rec {
 
   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:
diff --git a/pkgs/development/libraries/libshumate/default.nix b/pkgs/development/libraries/libshumate/default.nix
index 9639ac34a01b..6306fd2a5548 100644
--- a/pkgs/development/libraries/libshumate/default.nix
+++ b/pkgs/development/libraries/libshumate/default.nix
@@ -89,6 +89,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "GTK toolkit providing widgets for embedded maps";
+    mainProgram = "shumate-demo";
     homepage = "https://gitlab.gnome.org/GNOME/libshumate";
     license = licenses.lgpl21Plus;
     maintainers = teams.gnome.members;
diff --git a/pkgs/development/libraries/libskk/default.nix b/pkgs/development/libraries/libskk/default.nix
index c4b36704cb97..2f6e98e7dd0a 100644
--- a/pkgs/development/libraries/libskk/default.nix
+++ b/pkgs/development/libraries/libskk/default.nix
@@ -33,6 +33,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "A library to deal with Japanese kana-to-kanji conversion method";
+    mainProgram = "skk";
     longDescription = ''
       Libskk is a library that implements basic features of SKK including:
       new word registration, completion, numeric conversion, abbrev mode, kuten input,
diff --git a/pkgs/development/libraries/libsmartcols/default.nix b/pkgs/development/libraries/libsmartcols/default.nix
index 077055cbb9a4..5b4fcf875f6f 100644
--- a/pkgs/development/libraries/libsmartcols/default.nix
+++ b/pkgs/development/libraries/libsmartcols/default.nix
@@ -2,7 +2,7 @@
 
 stdenv.mkDerivation rec {
   pname = "libsmartcols";
-  version = "2.36.1";
+  version = "2.39.3";
 
   nativeBuildInputs = [ autoreconfHook pkg-config python3 gtk-doc ];
 
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
     owner = "karelzak";
     repo = "util-linux";
     rev = "v${version}";
-    sha256 = "0z7nv054pqhlihqiw0vk3h40j0cxk1yxf8zzh0ddmvk6834cnyxs";
+    sha256 = "sha256-X39os2iHqSrrYP6HVHPOkuTfc6vNB3pmsOP3VjW50fI=";
   };
 
   configureFlags = [ "--disable-all-programs" "--enable-libsmartcols" ];
diff --git a/pkgs/development/libraries/libspelling/default.nix b/pkgs/development/libraries/libspelling/default.nix
index 812dddcc4a17..874e9eff22c4 100644
--- a/pkgs/development/libraries/libspelling/default.nix
+++ b/pkgs/development/libraries/libspelling/default.nix
@@ -17,7 +17,7 @@
 
 stdenv.mkDerivation rec {
   pname = "libspelling";
-  version = "0.2.0";
+  version = "0.2.1";
 
   outputs = [ "out" "dev" "devdoc" ];
 
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
     owner = "chergert";
     repo = "libspelling";
     rev = version;
-    hash = "sha256-OOSQgdtnEx6/5yKwavCGdY/5L0Mr3XW0Srmd42ZTdUk=";
+    hash = "sha256-0OGcwPGWtYYf0XmvzXEaQgebBOW/6JWcDuF4MlQjCZQ=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/libraries/libsrs2/default.nix b/pkgs/development/libraries/libsrs2/default.nix
index 3da48f772545..5cb0974af9f1 100644
--- a/pkgs/development/libraries/libsrs2/default.nix
+++ b/pkgs/development/libraries/libsrs2/default.nix
@@ -11,6 +11,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "The next generation SRS library from the original designer of SRS";
+    mainProgram = "srs";
     license = with lib.licenses; [ gpl2 bsd3 ];
     homepage = "https://www.libsrs2.org/";
     platforms = lib.platforms.linux;
diff --git a/pkgs/development/libraries/libtar/default.nix b/pkgs/development/libraries/libtar/default.nix
index c6c89ecb4f08..83bb0708110b 100644
--- a/pkgs/development/libraries/libtar/default.nix
+++ b/pkgs/development/libraries/libtar/default.nix
@@ -43,6 +43,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "C library for manipulating POSIX tar files";
+    mainProgram = "libtar";
     homepage = "https://repo.or.cz/libtar";
     license = licenses.bsd3;
     platforms = with platforms; linux ++ darwin;
diff --git a/pkgs/development/libraries/libtiff/default.nix b/pkgs/development/libraries/libtiff/default.nix
index af9e10a6b8f5..80b5f411e663 100644
--- a/pkgs/development/libraries/libtiff/default.nix
+++ b/pkgs/development/libraries/libtiff/default.nix
@@ -90,7 +90,7 @@ stdenv.mkDerivation (finalAttrs: {
     homepage = "https://libtiff.gitlab.io/libtiff";
     changelog = "https://libtiff.gitlab.io/libtiff/v${finalAttrs.version}.html";
     license = licenses.libtiff;
-    platforms = platforms.unix;
+    platforms = platforms.unix ++ platforms.windows;
     pkgConfigModules = [ "libtiff-4" ];
   };
 })
diff --git a/pkgs/development/libraries/libtins/0001-force-cpp-14.patch b/pkgs/development/libraries/libtins/0001-force-cpp-14.patch
new file mode 100644
index 000000000000..3426713a07e3
--- /dev/null
+++ b/pkgs/development/libraries/libtins/0001-force-cpp-14.patch
@@ -0,0 +1,26 @@
+This change bypasses all the code that attempts to see which C++11 features are enabled in your specific C++11 compiler.  C++14 is required for gtest 1.13+.
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 902233e676ee..49ac8a1010a4 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -103,17 +103,9 @@ ENDIF()
+ # C++11 support
+ OPTION(LIBTINS_ENABLE_CXX11 "Compile libtins with c++11 features" ON)
+ IF(LIBTINS_ENABLE_CXX11)
+-    # We only use declval and decltype on gcc/clang as VC fails to build that code,
+-    # at least on VC2013
+-    IF(HAS_CXX11_RVALUE_REFERENCES AND HAS_CXX11_FUNCTIONAL AND HAS_CXX11_CHRONO AND
+-       HAS_CXX11_NOEXCEPT AND ((HAS_CXX11_DECLVAL AND HAS_CXX11_DECLTYPE) OR MSVC))
+-        SET(TINS_HAVE_CXX11 ON)
+-        MESSAGE(STATUS "Enabling C++11 features")
+-        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX11_COMPILER_FLAGS}")
+-    ELSE()
+-        MESSAGE(WARNING "The compiler doesn't support the necessary C++11 features. "
+-                        "Disabling C++11 on this build")
+-    ENDIF()
++    SET(TINS_HAVE_CXX11 ON)
++    MESSAGE(STATUS "Using C++11 features")
++    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
+ ELSE(LIBTINS_ENABLE_CXX11)
+     MESSAGE(
+         WARNING
diff --git a/pkgs/development/libraries/libtins/default.nix b/pkgs/development/libraries/libtins/default.nix
index b27ad6634797..6f195615551f 100644
--- a/pkgs/development/libraries/libtins/default.nix
+++ b/pkgs/development/libraries/libtins/default.nix
@@ -1,25 +1,20 @@
-{ boost, cmake, fetchFromGitHub, fetchpatch, gtest, libpcap, openssl, lib, stdenv }:
+{ boost, cmake, fetchFromGitHub, gtest, libpcap, openssl, lib, stdenv }:
 
 stdenv.mkDerivation rec {
   pname = "libtins";
-  version = "4.4";
+  version = "4.5";
 
   src = fetchFromGitHub {
     owner = "mfontanini";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-mXbinXh/CO0SZZ71+K+FozbHCCoi12+AIa2o+P0QmUw=";
+    sha256 = "sha256-zL4C2Cgs9Y3NebL8MPQBO5j8Bm6xhl8ZggQBPJLRn0o=";
   };
 
   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=";
-    })
+    # Required for gtest 1.13+, see also upstream report at:
+    # https://github.com/mfontanini/libtins/issues/529
+    ./0001-force-cpp-14.patch
   ];
 
   postPatch = ''
diff --git a/pkgs/development/libraries/libu2f-server/default.nix b/pkgs/development/libraries/libu2f-server/default.nix
index aac71bda3698..96506dfb85c9 100644
--- a/pkgs/development/libraries/libu2f-server/default.nix
+++ b/pkgs/development/libraries/libu2f-server/default.nix
@@ -23,6 +23,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://developers.yubico.com/libu2f-server/";
     description = "A C library that implements the server-side of the U2F protocol";
+    mainProgram = "u2f-server";
     license = licenses.bsd2;
     platforms = platforms.linux;
     maintainers = with maintainers; [ philandstuff ];
diff --git a/pkgs/development/libraries/libuchardet/default.nix b/pkgs/development/libraries/libuchardet/default.nix
index 14bf7f7c09c7..642c39e5974a 100644
--- a/pkgs/development/libraries/libuchardet/default.nix
+++ b/pkgs/development/libraries/libuchardet/default.nix
@@ -17,6 +17,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Mozilla's Universal Charset Detector C/C++ API";
+    mainProgram = "uchardet";
     homepage = "https://www.freedesktop.org/wiki/Software/uchardet/";
     license = licenses.mpl11;
     maintainers = with maintainers; [ ];
diff --git a/pkgs/development/libraries/libunicode/default.nix b/pkgs/development/libraries/libunicode/default.nix
index 725dacebcc25..3fd47a9fc699 100644
--- a/pkgs/development/libraries/libunicode/default.nix
+++ b/pkgs/development/libraries/libunicode/default.nix
@@ -29,6 +29,7 @@ in stdenv.mkDerivation (final: {
 
   meta = with lib; {
     description = "Modern C++17 Unicode library";
+    mainProgram = "unicode-query";
     license = licenses.asl20;
     platforms = platforms.unix;
     maintainers = with maintainers; [ moni ];
diff --git a/pkgs/development/libraries/libunwind/default.nix b/pkgs/development/libraries/libunwind/default.nix
index 90054b8ff7b9..66f9f076dab4 100644
--- a/pkgs/development/libraries/libunwind/default.nix
+++ b/pkgs/development/libraries/libunwind/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "libunwind";
-  version = "1.8.0";
+  version = "1.8.1";
 
   src = fetchFromGitHub {
     owner = "libunwind";
     repo = "libunwind";
     rev = "v${version}";
-    hash = "sha256-u33JAgxNy45yhIFL5QDsfa7EtLLKWmCv1kO4BxYYuwM=";
+    hash = "sha256-rCFBHs6rCSnp5FEwbUR5veNNTqSQpFblAv8ebSPX0qE=";
   };
 
   postPatch = if (stdenv.cc.isClang || stdenv.hostPlatform.isStatic) then ''
@@ -21,9 +21,15 @@ stdenv.mkDerivation rec {
 
   outputs = [ "out" "dev" "devman" ];
 
-  # Without latex2man, no man pages are installed despite being
-  # prebuilt in the source tarball.
-  configureFlags = [ "LATEX2MAN=${buildPackages.coreutils}/bin/true" ]
+  configureFlags = [
+    # Starting from 1.8.1 libunwind installs testsuite by default.
+    # As we don't run the tests we disable it (this also fixes circular
+    # reference install failure).
+    "--disable-tests"
+    # Without latex2man, no man pages are installed despite being
+    # prebuilt in the source tarball.
+    "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"
diff --git a/pkgs/development/libraries/libusb-compat/0.1.nix b/pkgs/development/libraries/libusb-compat/0.1.nix
index db80cfd81d06..841e781dfd5f 100644
--- a/pkgs/development/libraries/libusb-compat/0.1.nix
+++ b/pkgs/development/libraries/libusb-compat/0.1.nix
@@ -35,6 +35,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://libusb.info/";
     description = "cross-platform user-mode USB device library";
+    mainProgram = "libusb-config";
     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.
diff --git a/pkgs/development/libraries/libvarlink/default.nix b/pkgs/development/libraries/libvarlink/default.nix
index 941ee900edb2..0efca00a3e10 100644
--- a/pkgs/development/libraries/libvarlink/default.nix
+++ b/pkgs/development/libraries/libvarlink/default.nix
@@ -44,6 +44,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   meta = with lib; {
     description = "C implementation of the Varlink protocol and command line tool";
+    mainProgram = "varlink";
     homepage = "https://github.com/varlink/libvarlink";
     license = licenses.asl20;
     maintainers = with maintainers; [ artturin ];
diff --git a/pkgs/development/libraries/libwtk-sdl2/default.nix b/pkgs/development/libraries/libwtk-sdl2/default.nix
index bdfe404c547c..4da8873ca775 100644
--- a/pkgs/development/libraries/libwtk-sdl2/default.nix
+++ b/pkgs/development/libraries/libwtk-sdl2/default.nix
@@ -37,6 +37,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   meta = with lib; {
     description = "Simplistic SDL2 GUI framework in early developement";
+    mainProgram = "libwtk-sdl2-test";
     homepage = "https://github.com/muesli4/libwtk-sdl2";
     # See: https://github.com/muesli4/mpd-touch-screen-gui/tree/master/LICENSES
     license = licenses.lgpl3Plus;
diff --git a/pkgs/development/libraries/libxc/default.nix b/pkgs/development/libraries/libxc/default.nix
index b3f20d02c533..d5e543a1b5f3 100644
--- a/pkgs/development/libraries/libxc/default.nix
+++ b/pkgs/development/libraries/libxc/default.nix
@@ -41,6 +41,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Library of exchange-correlation functionals for density-functional theory";
+    mainProgram = "xc-info";
     homepage = "https://www.tddft.org/programs/Libxc/";
     license = licenses.mpl20;
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/libxmlb/default.nix b/pkgs/development/libraries/libxmlb/default.nix
index 522d3546b8e0..d3f6f311df94 100644
--- a/pkgs/development/libraries/libxmlb/default.nix
+++ b/pkgs/development/libraries/libxmlb/default.nix
@@ -71,6 +71,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A library to help create and query binary XML blobs";
+    mainProgram = "xb-tool";
     homepage = "https://github.com/hughsie/libxmlb";
     license = licenses.lgpl21Plus;
     maintainers = with maintainers; [ ];
diff --git a/pkgs/development/libraries/libxsmm/default.nix b/pkgs/development/libraries/libxsmm/default.nix
index 6530ee7f67ae..178e524fd1b7 100644
--- a/pkgs/development/libraries/libxsmm/default.nix
+++ b/pkgs/development/libraries/libxsmm/default.nix
@@ -49,6 +49,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     broken = (stdenv.isLinux && stdenv.isAarch64);
     description = "Library targeting Intel Architecture for specialized dense and sparse matrix operations, and deep learning primitives";
+    mainProgram = "libxsmm_gemm_generator";
     license = licenses.bsd3;
     homepage = "https://github.com/hfp/libxsmm";
     platforms = platforms.linux;
diff --git a/pkgs/development/libraries/libykclient/default.nix b/pkgs/development/libraries/libykclient/default.nix
index 6aacfc5ea2fa..240f771e49f1 100644
--- a/pkgs/development/libraries/libykclient/default.nix
+++ b/pkgs/development/libraries/libykclient/default.nix
@@ -15,6 +15,7 @@ stdenv.mkDerivation {
 
   meta = with lib; {
     description = "Yubikey C client library";
+    mainProgram = "ykclient";
     homepage = "https://developers.yubico.com/yubico-c-client";
     license = licenses.bsd2;
     maintainers = with maintainers; [ dtzWill ];
diff --git a/pkgs/development/libraries/libyuv/default.nix b/pkgs/development/libraries/libyuv/default.nix
index cc9f78ccae6f..77e32c09de8f 100644
--- a/pkgs/development/libraries/libyuv/default.nix
+++ b/pkgs/development/libraries/libyuv/default.nix
@@ -40,6 +40,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://chromium.googlesource.com/libyuv/libyuv";
     description = "Open source project that includes YUV scaling and conversion functionality";
+    mainProgram = "yuvconvert";
     platforms = platforms.unix;
     maintainers = with maintainers; [ leixb ];
     license = licenses.bsd3;
diff --git a/pkgs/development/libraries/lightgbm/default.nix b/pkgs/development/libraries/lightgbm/default.nix
index 09ac8b8fa863..5f8e6ceaecd0 100644
--- a/pkgs/development/libraries/lightgbm/default.nix
+++ b/pkgs/development/libraries/lightgbm/default.nix
@@ -146,6 +146,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     description =
       "LightGBM is a gradient boosting framework that uses tree based learning algorithms.";
+    mainProgram = "lightgbm";
     homepage = "https://github.com/microsoft/LightGBM";
     license = licenses.mit;
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/linbox/default.nix b/pkgs/development/libraries/linbox/default.nix
index 6367b93b1a21..0997513f5a51 100644
--- a/pkgs/development/libraries/linbox/default.nix
+++ b/pkgs/development/libraries/linbox/default.nix
@@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
 
   configureFlags = [
     "--with-blas-libs=-lblas"
-    "--disable-optimization"
+    "--without-archnative"
   ] ++ lib.optionals stdenv.isx86_64 [
     # disable SIMD instructions (which are enabled *when available* by default)
     "--${if stdenv.hostPlatform.sse3Support   then "enable" else "disable"}-sse3"
@@ -61,6 +61,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "C++ library for exact, high-performance linear algebra";
+    mainProgram = "linbox-config";
     license = licenses.lgpl21Plus;
     maintainers = teams.sage.members;
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/log4cpp/default.nix b/pkgs/development/libraries/log4cpp/default.nix
index c4255babca56..1a024a80cca0 100644
--- a/pkgs/development/libraries/log4cpp/default.nix
+++ b/pkgs/development/libraries/log4cpp/default.nix
@@ -14,6 +14,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage    = "https://log4cpp.sourceforge.net/";
     description = "A logging framework for C++ patterned after Apache log4j";
+    mainProgram = "log4cpp-config";
     license     = licenses.lgpl21Plus;
     platforms   = platforms.unix;
   };
diff --git a/pkgs/development/libraries/log4shib/default.nix b/pkgs/development/libraries/log4shib/default.nix
index 42a428b35c7e..26313ddae580 100644
--- a/pkgs/development/libraries/log4shib/default.nix
+++ b/pkgs/development/libraries/log4shib/default.nix
@@ -16,6 +16,7 @@ stdenv.mkDerivation {
 
   meta = with lib; {
     description = "A forked version of log4cpp that has been created for the Shibboleth project";
+    mainProgram = "log4shib-config";
     maintainers = [ ];
     license = licenses.lgpl21;
     homepage = "http://log4cpp.sf.net";
diff --git a/pkgs/development/libraries/luksmeta/default.nix b/pkgs/development/libraries/luksmeta/default.nix
index afefcfed82c7..976f6f188269 100644
--- a/pkgs/development/libraries/luksmeta/default.nix
+++ b/pkgs/development/libraries/luksmeta/default.nix
@@ -18,6 +18,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "Simple library for storing metadata in the LUKSv1 header";
+    mainProgram = "luksmeta";
     homepage = "https://github.com/latchset/luksmeta/";
     maintainers = with lib.maintainers; [ fpletz ];
     license = lib.licenses.lgpl21Plus;
diff --git a/pkgs/development/libraries/malcontent/default.nix b/pkgs/development/libraries/malcontent/default.nix
index d897230f8f37..34d1731e8a09 100644
--- a/pkgs/development/libraries/malcontent/default.nix
+++ b/pkgs/development/libraries/malcontent/default.nix
@@ -96,6 +96,7 @@ stdenv.mkDerivation rec {
     outputsToInstall = [ "bin" "out" "man" ];
 
     description = "Parental controls library";
+    mainProgram = "malcontent-client";
     homepage = "https://gitlab.freedesktop.org/pwithnall/malcontent";
     license = licenses.lgpl21Plus;
     maintainers = with maintainers; [ jtojnar ];
diff --git a/pkgs/development/libraries/malcontent/ui.nix b/pkgs/development/libraries/malcontent/ui.nix
index 59950a75c745..cf421bd11c19 100644
--- a/pkgs/development/libraries/malcontent/ui.nix
+++ b/pkgs/development/libraries/malcontent/ui.nix
@@ -68,6 +68,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "UI components for parental controls library";
+    mainProgram = "malcontent-control";
     homepage = "https://gitlab.freedesktop.org/pwithnall/malcontent";
     license = licenses.lgpl21Plus;
     maintainers = with maintainers; [ jtojnar ];
diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix
index a40f5c6b15e4..7920b4405b2e 100644
--- a/pkgs/development/libraries/mesa/default.nix
+++ b/pkgs/development/libraries/mesa/default.nix
@@ -81,8 +81,8 @@
 # nix build .#mesa .#pkgsi686Linux.mesa .#pkgsCross.aarch64-multiplatform.mesa .#pkgsMusl.mesa
 
 let
-  version = "24.0.2";
-  hash = "sha256-lOKKjtrQbY7SuD61PyU7nrWqYsMID5OXAuGzA5tWyeg=";
+  version = "24.0.3";
+  hash = "sha256-d67JoqN7fTWW6hZAs8xT0LXZs7Uqvtid4H43F+kb/b4=";
 
   # Release calendar: https://www.mesa3d.org/release-calendar.html
   # Release frequency: https://www.mesa3d.org/releasing.html#schedule
diff --git a/pkgs/development/libraries/mono-addins/default.nix b/pkgs/development/libraries/mono-addins/default.nix
index 158b39a8186a..9a31fbb69eeb 100644
--- a/pkgs/development/libraries/mono-addins/default.nix
+++ b/pkgs/development/libraries/mono-addins/default.nix
@@ -22,6 +22,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://www.mono-project.com/archived/monoaddins/";
     description = "A generic framework for creating extensible applications";
+    mainProgram = "mautil";
     longDescription = ''
       Mono.Addins is a generic framework for creating extensible applications,
       and for creating libraries which extend those applications.
diff --git a/pkgs/development/libraries/mtdev/default.nix b/pkgs/development/libraries/mtdev/default.nix
index 9e6a45e2975a..e067e0c3d274 100644
--- a/pkgs/development/libraries/mtdev/default.nix
+++ b/pkgs/development/libraries/mtdev/default.nix
@@ -14,6 +14,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://bitmath.org/code/mtdev/";
     description = "Multitouch Protocol Translation Library";
+    mainProgram = "mtdev-test";
     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
diff --git a/pkgs/development/libraries/mythes/default.nix b/pkgs/development/libraries/mythes/default.nix
index 4683940b9cc6..960fefc74ac1 100644
--- a/pkgs/development/libraries/mythes/default.nix
+++ b/pkgs/development/libraries/mythes/default.nix
@@ -15,6 +15,7 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "https://hunspell.sourceforge.net/";
     description = "Thesaurus library from Hunspell project";
+    mainProgram = "th_gen_idx.pl";
     license = lib.licenses.bsd3;
     inherit (hunspell.meta) platforms;
   };
diff --git a/pkgs/development/libraries/neatvnc/default.nix b/pkgs/development/libraries/neatvnc/default.nix
index 281689c60b67..2680dbd1ae92 100644
--- a/pkgs/development/libraries/neatvnc/default.nix
+++ b/pkgs/development/libraries/neatvnc/default.nix
@@ -15,13 +15,13 @@
 
 stdenv.mkDerivation rec {
   pname = "neatvnc";
-  version = "0.7.2";
+  version = "0.8.0";
 
   src = fetchFromGitHub {
     owner = "any1";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-S2LMD15MYd/t/Z8B1OQ0hVrZQLR6Gf4LB45mhmDwblg=";
+    hash = "sha256-BArEaQa+CNGzIoENsZSj9seFx9qdCLWiejh6EvpTch8=";
   };
 
   strictDeps = true;
diff --git a/pkgs/development/libraries/neon/default.nix b/pkgs/development/libraries/neon/default.nix
index f26dbf5ace45..cbc8d3207e01 100644
--- a/pkgs/development/libraries/neon/default.nix
+++ b/pkgs/development/libraries/neon/default.nix
@@ -46,6 +46,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "An HTTP and WebDAV client library";
+    mainProgram = "neon-config";
     homepage = "https://notroj.github.io/neon/";
     changelog = "https://github.com/notroj/${pname}/blob/${version}/NEWS";
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/netcdf-cxx4/default.nix b/pkgs/development/libraries/netcdf-cxx4/default.nix
index 945eb219229f..08f812a272a2 100644
--- a/pkgs/development/libraries/netcdf-cxx4/default.nix
+++ b/pkgs/development/libraries/netcdf-cxx4/default.nix
@@ -30,6 +30,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "C++ API to manipulate netcdf files";
+    mainProgram = "ncxx4-config";
     homepage = "https://www.unidata.ucar.edu/software/netcdf/";
     license = lib.licenses.free;
     platforms = lib.platforms.unix;
diff --git a/pkgs/development/libraries/netcdf-fortran/default.nix b/pkgs/development/libraries/netcdf-fortran/default.nix
index d64d631f94ce..978f906b7adc 100644
--- a/pkgs/development/libraries/netcdf-fortran/default.nix
+++ b/pkgs/development/libraries/netcdf-fortran/default.nix
@@ -20,6 +20,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Fortran API to manipulate netcdf files";
+    mainProgram = "nf-config";
     homepage = "https://www.unidata.ucar.edu/software/netcdf/";
     license = licenses.free;
     maintainers = [ maintainers.bzizou ];
diff --git a/pkgs/development/libraries/newt/default.nix b/pkgs/development/libraries/newt/default.nix
index e5dbb563cfb5..1e6f8de2d589 100644
--- a/pkgs/development/libraries/newt/default.nix
+++ b/pkgs/development/libraries/newt/default.nix
@@ -51,6 +51,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Library for color text mode, widget based user interfaces";
+    mainProgram = "whiptail";
     homepage = "https://pagure.io/newt";
     changelog = "https://pagure.io/newt/blob/master/f/CHANGES";
     license = licenses.lgpl2;
diff --git a/pkgs/development/libraries/nghttp2/default.nix b/pkgs/development/libraries/nghttp2/default.nix
index f4ae615b6e94..805fe6e3bb20 100644
--- a/pkgs/development/libraries/nghttp2/default.nix
+++ b/pkgs/development/libraries/nghttp2/default.nix
@@ -32,11 +32,11 @@ assert enableJemalloc -> enableApp;
 
 stdenv.mkDerivation rec {
   pname = "nghttp2";
-  version = "1.59.0";
+  version = "1.60.0";
 
   src = fetchurl {
     url = "https://github.com/${pname}/${pname}/releases/download/v${version}/${pname}-${version}.tar.bz2";
-    sha256 = "sha256-A1P8u6ENKl9304ouSS5eZ3tjexdxI0WkcyXDw1+0d/g=";
+    sha256 = "sha256-W4wmgdQstLMcs+DaDggb+jAl1cNZKN6PYHAVUgFbAM4=";
   };
 
   outputs = [ "out" "dev" "lib" "doc" "man" ];
diff --git a/pkgs/development/libraries/ngtcp2/gnutls.nix b/pkgs/development/libraries/ngtcp2/gnutls.nix
index 04b220bacee1..b52156977411 100644
--- a/pkgs/development/libraries/ngtcp2/gnutls.nix
+++ b/pkgs/development/libraries/ngtcp2/gnutls.nix
@@ -6,13 +6,13 @@
 
 stdenv.mkDerivation rec {
   pname = "ngtcp2";
-  version = "1.3.0";
+  version = "1.4.0";
 
   src = fetchFromGitHub {
     owner = "ngtcp2";
     repo = "ngtcp2";
     rev = "v${version}";
-    hash = "sha256-KKfr5AjaC56yUNdk928H1PyP79GnQJ2pIZcZQTgLhEQ=";
+    hash = "sha256-C1Rk0KzTvFpwCz8vXvhSqGjYmGyLZxmnzZhPLZiL97M=";
   };
 
   outputs = [ "out" "dev" ];
diff --git a/pkgs/development/libraries/npth/default.nix b/pkgs/development/libraries/npth/default.nix
index 208924bfd7b5..023d9cebb973 100644
--- a/pkgs/development/libraries/npth/default.nix
+++ b/pkgs/development/libraries/npth/default.nix
@@ -2,17 +2,18 @@
 
 stdenv.mkDerivation rec {
   pname = "npth";
-  version = "1.6";
+  version = "1.7";
 
   src = fetchurl {
     url = "mirror://gnupg/npth/npth-${version}.tar.bz2";
-    sha256 = "1lg2lkdd3z1s3rpyf88786l243adrzyk9p4q8z9n41ygmpcsp4qk";
+    sha256 = "sha256-hYn1aTe3XOM7KNMS/MvzArO3HsPzlF/eaqp0AnkUrQU=";
   };
 
   doCheck = true;
 
   meta = with lib; {
     description = "The New GNU Portable Threads Library";
+    mainProgram = "npth-config";
     longDescription = ''
       This is a library to provide the GNU Pth API and thus a non-preemptive
       threads implementation.
diff --git a/pkgs/development/libraries/nss/latest.nix b/pkgs/development/libraries/nss/latest.nix
index dfc8a21e206c..8ac5a3b23a85 100644
--- a/pkgs/development/libraries/nss/latest.nix
+++ b/pkgs/development/libraries/nss/latest.nix
@@ -5,6 +5,6 @@
 #       Example: nix-shell ./maintainers/scripts/update.nix --argstr package cacert
 
 import ./generic.nix {
-  version = "3.98";
-  hash = "sha256-0p1HzspxyzhzX46O7ax8tmYiaFEBeqEqEvman4NIiQc=";
+  version = "3.99";
+  hash = "sha256-6JocWJpA+VjEPZOxmD74toyEBLOTzCxSWUzrxPi52bU=";
 }
diff --git a/pkgs/development/libraries/nss_wrapper/default.nix b/pkgs/development/libraries/nss_wrapper/default.nix
index 324c5269dfbc..8faa50f83b72 100644
--- a/pkgs/development/libraries/nss_wrapper/default.nix
+++ b/pkgs/development/libraries/nss_wrapper/default.nix
@@ -13,6 +13,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A wrapper for the user, group and hosts NSS API";
+    mainProgram = "nss_wrapper.pl";
     homepage = "https://git.samba.org/?p=nss_wrapper.git;a=summary;";
     license = licenses.bsd3;
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/ntbtls/default.nix b/pkgs/development/libraries/ntbtls/default.nix
index 888b1fe4b3df..bdc2a919613c 100644
--- a/pkgs/development/libraries/ntbtls/default.nix
+++ b/pkgs/development/libraries/ntbtls/default.nix
@@ -20,6 +20,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A tiny TLS 1.2 only implementation";
+    mainProgram = "ntbtls-config";
     homepage = "https://www.gnupg.org/software/ntbtls/";
     license = licenses.gpl3Plus;
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/nuspell/default.nix b/pkgs/development/libraries/nuspell/default.nix
index c9e6aeeba363..867843df8068 100644
--- a/pkgs/development/libraries/nuspell/default.nix
+++ b/pkgs/development/libraries/nuspell/default.nix
@@ -22,6 +22,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Free and open source C++ spell checking library";
+    mainProgram = "nuspell";
     homepage = "https://nuspell.github.io/";
     platforms = platforms.all;
     maintainers = with maintainers; [ fpletz ];
diff --git a/pkgs/development/libraries/ocl-icd/default.nix b/pkgs/development/libraries/ocl-icd/default.nix
index 1b7caf2b9c84..0930b8904bdf 100644
--- a/pkgs/development/libraries/ocl-icd/default.nix
+++ b/pkgs/development/libraries/ocl-icd/default.nix
@@ -36,6 +36,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "OpenCL ICD Loader for ${opencl-headers.name}";
+    mainProgram = "cllayerinfo";
     homepage    = "https://github.com/OCL-dev/ocl-icd";
     license     = licenses.bsd2;
     platforms = platforms.unix ++ platforms.windows;
diff --git a/pkgs/development/libraries/ode/default.nix b/pkgs/development/libraries/ode/default.nix
index 6ae60b7b2d3a..be67a95ebfc5 100644
--- a/pkgs/development/libraries/ode/default.nix
+++ b/pkgs/development/libraries/ode/default.nix
@@ -25,6 +25,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   meta = with lib; {
     description = "Open Dynamics Engine";
+    mainProgram = "ode-config";
     homepage = "https://www.ode.org";
     license = with licenses; [ bsd3 lgpl21Only lgpl3Only zlib ];
     maintainers = with maintainers; [ wegank ];
diff --git a/pkgs/development/libraries/oniguruma/default.nix b/pkgs/development/libraries/oniguruma/default.nix
index a1a9dc875735..cf00629e3842 100644
--- a/pkgs/development/libraries/oniguruma/default.nix
+++ b/pkgs/development/libraries/oniguruma/default.nix
@@ -19,6 +19,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://github.com/kkos/oniguruma";
     description = "Regular expressions library";
+    mainProgram = "onig-config";
     license = licenses.bsd2;
     maintainers = with maintainers; [ artturin ];
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/opencomposite/default.nix b/pkgs/development/libraries/opencomposite/default.nix
deleted file mode 100644
index fc1b6e631964..000000000000
--- a/pkgs/development/libraries/opencomposite/default.nix
+++ /dev/null
@@ -1,65 +0,0 @@
-{ 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-16";
-
-  src = fetchFromGitLab {
-    owner = "znixian";
-    repo = "OpenOVR";
-    rev = "737bbedd29343bc2f808804e2b24302390a07655";
-    hash = "sha256-azb7T0d0YMQRc0Slq1tzNj6bOmCzfHW3ciY9lN+RTao=";
-  };
-
-  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/pkgs/development/libraries/opencomposite/helper.nix b/pkgs/development/libraries/opencomposite/helper.nix
deleted file mode 100644
index f19f5e868139..000000000000
--- a/pkgs/development/libraries/opencomposite/helper.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{ 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/pkgs/development/libraries/opencsg/default.nix b/pkgs/development/libraries/opencsg/default.nix
index 7625db9a5953..4adebaf72b16 100644
--- a/pkgs/development/libraries/opencsg/default.nix
+++ b/pkgs/development/libraries/opencsg/default.nix
@@ -45,6 +45,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Constructive Solid Geometry library";
+    mainProgram = "opencsgexample";
     homepage = "http://www.opencsg.org/";
     platforms = platforms.unix;
     maintainers = [ maintainers.raskin ];
diff --git a/pkgs/development/libraries/opendbx/default.nix b/pkgs/development/libraries/opendbx/default.nix
index b7a4a34390d9..04ffde29daa0 100644
--- a/pkgs/development/libraries/opendbx/default.nix
+++ b/pkgs/development/libraries/opendbx/default.nix
@@ -27,6 +27,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     broken = stdenv.isDarwin;
     description = "Extremely lightweight but extensible database access library written in C";
+    mainProgram = "odbx-sql";
     license = licenses.lgpl21;
     platforms = platforms.all;
   };
diff --git a/pkgs/development/libraries/opensaml-cpp/default.nix b/pkgs/development/libraries/opensaml-cpp/default.nix
index 9e8ab07b3aa4..7e44f2a50eeb 100644
--- a/pkgs/development/libraries/opensaml-cpp/default.nix
+++ b/pkgs/development/libraries/opensaml-cpp/default.nix
@@ -26,6 +26,7 @@ stdenv.mkDerivation rec {
   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";
+    mainProgram = "samlsign";
     platforms   = platforms.unix;
     license     = licenses.asl20;
     maintainers = [ ];
diff --git a/pkgs/development/libraries/openvdb/default.nix b/pkgs/development/libraries/openvdb/default.nix
index c5397b259a30..5af5a27f34f5 100644
--- a/pkgs/development/libraries/openvdb/default.nix
+++ b/pkgs/development/libraries/openvdb/default.nix
@@ -33,6 +33,7 @@ stdenv.mkDerivation rec
 
   meta = with lib; {
     description = "An open framework for voxel";
+    mainProgram = "vdb_print";
     homepage = "https://www.openvdb.org";
     maintainers = [ maintainers.guibou ];
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/orcania/default.nix b/pkgs/development/libraries/orcania/default.nix
index f0334ea4de16..14cc99622755 100644
--- a/pkgs/development/libraries/orcania/default.nix
+++ b/pkgs/development/libraries/orcania/default.nix
@@ -20,6 +20,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Potluck with different functions for different purposes that can be shared among C programs";
+    mainProgram = "base64url";
     homepage = "https://github.com/babelouest/orcania";
     license = licenses.lgpl21;
     maintainers = with maintainers; [ johnazoidberg ];
diff --git a/pkgs/development/libraries/ortp/default.nix b/pkgs/development/libraries/ortp/default.nix
index 1c65fa1981f1..3c61e7b5c9d9 100644
--- a/pkgs/development/libraries/ortp/default.nix
+++ b/pkgs/development/libraries/ortp/default.nix
@@ -28,6 +28,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A Real-Time Transport Protocol (RFC3550) stack. Part of the Linphone project.";
+    mainProgram = "ortp_tester";
     homepage = "https://linphone.org/technical-corner/ortp";
     license = licenses.gpl3Plus;
     platforms = platforms.all;
diff --git a/pkgs/development/libraries/paho-mqtt-c/default.nix b/pkgs/development/libraries/paho-mqtt-c/default.nix
index 0f345eb5134f..23f0bc99c88a 100644
--- a/pkgs/development/libraries/paho-mqtt-c/default.nix
+++ b/pkgs/development/libraries/paho-mqtt-c/default.nix
@@ -29,6 +29,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Eclipse Paho MQTT C Client Library";
+    mainProgram = "MQTTVersion";
     homepage = "https://www.eclipse.org/paho/";
     license = licenses.epl20;
     maintainers = with maintainers; [ sikmir ];
diff --git a/pkgs/development/libraries/pcmsolver/default.nix b/pkgs/development/libraries/pcmsolver/default.nix
index a957d517bf7a..d17c806700f4 100644
--- a/pkgs/development/libraries/pcmsolver/default.nix
+++ b/pkgs/development/libraries/pcmsolver/default.nix
@@ -42,6 +42,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "An API for the Polarizable Continuum Model";
+    mainProgram = "run_pcm";
     homepage = "https://pcmsolver.readthedocs.io/en/stable/";
     license = licenses.lgpl3Only;
     platforms = platforms.linux;
diff --git a/pkgs/development/libraries/pdal/default.nix b/pkgs/development/libraries/pdal/default.nix
index 83d451080c20..6f362967a2a2 100644
--- a/pkgs/development/libraries/pdal/default.nix
+++ b/pkgs/development/libraries/pdal/default.nix
@@ -2,7 +2,6 @@
 , stdenv
 , callPackage
 , fetchFromGitHub
-, fetchpatch
 , testers
 
 , enableE57 ? lib.meta.availableOn stdenv.hostPlatform libe57format
@@ -28,24 +27,15 @@
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "pdal";
-  version = "2.6.3";
+  version = "2.7.0";
 
   src = fetchFromGitHub {
     owner = "PDAL";
     repo = "PDAL";
     rev = finalAttrs.version;
-    sha256 = "sha256-wrgEbCYOGW1yrVxyX+UDa5jcUqab3letEGuvWnYvtac=";
+    sha256 = "sha256-knyDVUZH+X563UzKkvDpi08EcXU5s4+Jvya3Xprpt1A=";
   };
 
-  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
diff --git a/pkgs/development/libraries/phonon/default.nix b/pkgs/development/libraries/phonon/default.nix
index dd20b6dcebe6..58cd0245d052 100644
--- a/pkgs/development/libraries/phonon/default.nix
+++ b/pkgs/development/libraries/phonon/default.nix
@@ -24,6 +24,7 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "https://community.kde.org/Phonon";
     description = "Multimedia API for Qt";
+    mainProgram = "phononsettings";
     license = lib.licenses.lgpl2;
     platforms = lib.platforms.unix;
     maintainers = with lib.maintainers; [ ttuegel ];
diff --git a/pkgs/development/libraries/physfs/default.nix b/pkgs/development/libraries/physfs/default.nix
index 28b81867d203..27f7c019ac77 100644
--- a/pkgs/development/libraries/physfs/default.nix
+++ b/pkgs/development/libraries/physfs/default.nix
@@ -27,6 +27,7 @@ let
     meta = with lib; {
       homepage = "https://icculus.org/physfs/";
       description = "Library to provide abstract access to various archives";
+      mainProgram = "test_physfs";
       changelog = "https://github.com/icculus/physfs/releases/tag/release-${version}";
       license = licenses.zlib;
       platforms = platforms.all;
diff --git a/pkgs/development/libraries/physics/apfelgrid/default.nix b/pkgs/development/libraries/physics/apfelgrid/default.nix
index 92b6ae003fca..2c6c9702c249 100644
--- a/pkgs/development/libraries/physics/apfelgrid/default.nix
+++ b/pkgs/development/libraries/physics/apfelgrid/default.nix
@@ -18,6 +18,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Ultra-fast theory predictions for collider observables";
+    mainProgram = "apfelgrid-config";
     license     = licenses.mit;
     homepage    = "https://nhartland.github.io/APFELgrid/";
     platforms   = platforms.unix;
diff --git a/pkgs/development/libraries/physics/fastjet/default.nix b/pkgs/development/libraries/physics/fastjet/default.nix
index d9cd1661af8a..a4c01dd6ecf3 100644
--- a/pkgs/development/libraries/physics/fastjet/default.nix
+++ b/pkgs/development/libraries/physics/fastjet/default.nix
@@ -24,6 +24,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "A software package for jet finding in pp and e+e− collisions";
+    mainProgram = "fastjet-config";
     license     = lib.licenses.gpl2Plus;
     homepage    = "http://fastjet.fr/";
     platforms   = lib.platforms.unix;
diff --git a/pkgs/development/libraries/physics/hepmc3/default.nix b/pkgs/development/libraries/physics/hepmc3/default.nix
index f803bea98f60..9d2eab6e7f15 100644
--- a/pkgs/development/libraries/physics/hepmc3/default.nix
+++ b/pkgs/development/libraries/physics/hepmc3/default.nix
@@ -55,6 +55,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "The HepMC package is an object oriented, C++ event record for High Energy Physics Monte Carlo generators and simulation";
+    mainProgram = "HepMC3-config";
     license = licenses.gpl3;
     homepage = "http://hepmc.web.cern.ch/hepmc/";
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/physics/hoppet/default.nix b/pkgs/development/libraries/physics/hoppet/default.nix
index af90192878d7..af6200b9c578 100644
--- a/pkgs/development/libraries/physics/hoppet/default.nix
+++ b/pkgs/development/libraries/physics/hoppet/default.nix
@@ -19,6 +19,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Higher Order Perturbative Parton Evolution Toolkit";
+    mainProgram = "hoppet-config";
     license     = licenses.gpl2;
     homepage    = "https://hoppet.hepforge.org";
     platforms   = platforms.unix;
diff --git a/pkgs/development/libraries/physics/mela/default.nix b/pkgs/development/libraries/physics/mela/default.nix
index e48a2f4638bc..701fd149e45e 100644
--- a/pkgs/development/libraries/physics/mela/default.nix
+++ b/pkgs/development/libraries/physics/mela/default.nix
@@ -17,6 +17,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "a Mellin Evolution LibrAry";
+    mainProgram = "mela-config";
     license     = licenses.gpl3;
     homepage    = "https://github.com/vbertone/MELA";
     platforms   = platforms.unix;
diff --git a/pkgs/development/libraries/physics/pythia/default.nix b/pkgs/development/libraries/physics/pythia/default.nix
index 917dbf40a37d..a0daa91a1b54 100644
--- a/pkgs/development/libraries/physics/pythia/default.nix
+++ b/pkgs/development/libraries/physics/pythia/default.nix
@@ -26,6 +26,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A program for the generation of high-energy physics events";
+    mainProgram = "pythia8-config";
     license = licenses.gpl2Only;
     homepage = "https://pythia.org";
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/physics/qcdnum/default.nix b/pkgs/development/libraries/physics/qcdnum/default.nix
index e25b98498ddb..fdb79250ed3f 100644
--- a/pkgs/development/libraries/physics/qcdnum/default.nix
+++ b/pkgs/development/libraries/physics/qcdnum/default.nix
@@ -20,6 +20,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "A very fast QCD evolution program written in FORTRAN77";
+    mainProgram = "qcdnum-config";
     license     = lib.licenses.gpl3;
     homepage    = "https://www.nikhef.nl/~h24/qcdnum/index.html";
     platforms   = lib.platforms.unix;
diff --git a/pkgs/development/libraries/pipewire/default.nix b/pkgs/development/libraries/pipewire/default.nix
index 7b470f836756..3459112456fe 100644
--- a/pkgs/development/libraries/pipewire/default.nix
+++ b/pkgs/development/libraries/pipewire/default.nix
@@ -58,6 +58,7 @@
 , avahi
 , raopSupport ? true
 , openssl
+, opusSupport ? true
 , rocSupport ? true
 , roc-toolkit
 , x11Support ? true
@@ -65,7 +66,6 @@
 , xorg
 , mysofaSupport ? true
 , libmysofa
-, tinycompress
 , ffadoSupport ? x11Support && stdenv.buildPlatform.canExecute stdenv.hostPlatform
 , ffado
 , libselinux
@@ -76,7 +76,7 @@ assert ldacbtSupport -> bluezSupport;
 
 stdenv.mkDerivation(finalAttrs: {
   pname = "pipewire";
-  version = "1.0.3";
+  version = "1.0.4";
 
   outputs = [
     "out"
@@ -92,7 +92,7 @@ stdenv.mkDerivation(finalAttrs: {
     owner = "pipewire";
     repo = "pipewire";
     rev = finalAttrs.version;
-    sha256 = "sha256-QVw7Q+RNo8BBy/uxoZeSQQn/vQcIl1bOiA9fYMR0+oI=";
+    sha256 = "sha256-LROI1rGQELlGXkapX3XfDqB7Rc5YAOdCwaMQUG/iU8c=";
   };
 
   patches = [
@@ -126,20 +126,20 @@ stdenv.mkDerivation(finalAttrs: {
     ncurses
     readline
     udev
-    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.optionals libcameraSupport [ libcamera ]
   ++ lib.optional ffmpegSupport ffmpeg
   ++ lib.optionals bluezSupport [ bluez libfreeaptx liblc3 sbc fdk_aac libopus ]
   ++ lib.optional ldacbtSupport ldacbt
   ++ lib.optional nativeModemManagerSupport modemmanager
+  ++ lib.optional opusSupport libopus
   ++ lib.optional pulseTunnelSupport libpulseaudio
   ++ lib.optional zeroconfSupport avahi
   ++ lib.optional raopSupport openssl
   ++ lib.optional rocSupport roc-toolkit
-  ++ lib.optionals vulkanSupport [ vulkan-headers vulkan-loader ]
+  ++ lib.optionals vulkanSupport [ libdrm vulkan-headers vulkan-loader ]
   ++ lib.optionals x11Support [ libcanberra xorg.libX11 xorg.libXfixes ]
   ++ lib.optional mysofaSupport libmysofa
   ++ lib.optional ffadoSupport ffado;
@@ -162,6 +162,7 @@ stdenv.mkDerivation(finalAttrs: {
     (lib.mesonEnable "systemd-system-service" enableSystemd)
     (lib.mesonEnable "udev" (!enableSystemd))
     (lib.mesonEnable "ffmpeg" ffmpegSupport)
+    (lib.mesonEnable "pw-cat-ffmpeg" ffmpegSupport)
     (lib.mesonEnable "bluez5" bluezSupport)
     (lib.mesonEnable "bluez5-backend-hsp-native" nativeHspSupport)
     (lib.mesonEnable "bluez5-backend-hfp-native" nativeHfpSupport)
@@ -172,6 +173,7 @@ stdenv.mkDerivation(finalAttrs: {
     (lib.mesonEnable "bluez5-codec-lc3plus" false)
     (lib.mesonEnable "bluez5-codec-lc3" bluezSupport)
     (lib.mesonEnable "bluez5-codec-ldac" ldacbtSupport)
+    (lib.mesonEnable "opus" opusSupport)
     (lib.mesonOption "sysconfdir" "/etc")
     (lib.mesonEnable "raop" raopSupport)
     (lib.mesonOption "session-managers" "")
diff --git a/pkgs/development/libraries/pipewire/wireplumber.nix b/pkgs/development/libraries/pipewire/wireplumber.nix
index a5bdb729a102..c60ac184978a 100644
--- a/pkgs/development/libraries/pipewire/wireplumber.nix
+++ b/pkgs/development/libraries/pipewire/wireplumber.nix
@@ -24,7 +24,7 @@
 
 stdenv.mkDerivation rec {
   pname = "wireplumber";
-  version = "0.4.17";
+  version = "0.5.0";
 
   outputs = [ "out" "dev" ] ++ lib.optional enableDocs "doc";
 
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
     owner = "pipewire";
     repo = "wireplumber";
     rev = version;
-    hash = "sha256-vhpQT67+849WV1SFthQdUeFnYe/okudTQJoL3y+wXwI=";
+    hash = "sha256-zcYZvyGsGuiwuL9nOD5mW6RFwa9cPB9HvoQqdw2jlmY=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/libraries/pixman/default.nix b/pkgs/development/libraries/pixman/default.nix
index 0a15876db963..e18bc6450206 100644
--- a/pkgs/development/libraries/pixman/default.nix
+++ b/pkgs/development/libraries/pixman/default.nix
@@ -21,14 +21,14 @@
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "pixman";
-  version = "0.43.2";
+  version = "0.43.4";
 
   src = fetchurl {
     urls = with finalAttrs; [
       "mirror://xorg/individual/lib/${pname}-${version}.tar.gz"
       "https://cairographics.org/releases/${pname}-${version}.tar.gz"
     ];
-    hash = "sha256-6nkpflQY+1KNBGbotbkdG+iIV/o3BvSXd7KSWnKumSQ=";
+    hash = "sha256-oGJNuQGAx923n8epFRCT3DfGRtjDjT8jL3Z89kuFoiY=";
   };
 
   separateDebugInfo = !stdenv.hostPlatform.isStatic;
@@ -54,7 +54,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   enableParallelBuilding = true;
 
-  doCheck = true;
+  doCheck = !stdenv.isDarwin;
 
   postInstall = glib.flattenInclude;
 
diff --git a/pkgs/development/libraries/pkger/default.nix b/pkgs/development/libraries/pkger/default.nix
index 073c57c013da..f2047c82f051 100644
--- a/pkgs/development/libraries/pkger/default.nix
+++ b/pkgs/development/libraries/pkger/default.nix
@@ -21,6 +21,7 @@ buildGoModule rec {
 
   meta = with lib; {
     description = "Embed static files in Go binaries (replacement for gobuffalo/packr) ";
+    mainProgram = "pkger";
     homepage = "https://github.com/markbates/pkger";
     changelog = "https://github.com/markbates/pkger/releases/tag/v${version}";
     license = licenses.mit;
diff --git a/pkgs/development/libraries/plplot/default.nix b/pkgs/development/libraries/plplot/default.nix
index 66c498418d98..6e4e47f094ed 100644
--- a/pkgs/development/libraries/plplot/default.nix
+++ b/pkgs/development/libraries/plplot/default.nix
@@ -40,6 +40,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Cross-platform scientific graphics plotting library";
+    mainProgram = "pltek";
     homepage    = "https://plplot.org";
     maintainers = with maintainers; [ bcdarwin ];
     platforms   = platforms.unix;
diff --git a/pkgs/development/libraries/poly2tri-c/default.nix b/pkgs/development/libraries/poly2tri-c/default.nix
index a0f084606906..0c68c2950eb2 100644
--- a/pkgs/development/libraries/poly2tri-c/default.nix
+++ b/pkgs/development/libraries/poly2tri-c/default.nix
@@ -35,6 +35,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Library for generating, refining and rendering 2-Dimensional Constrained Delaunay Triangulations";
+    mainProgram = "p2tc";
     homepage = "https://code.google.com/archive/p/poly2tri-c/";
     license = licenses.bsd3;
     maintainers = with lib.maintainers; [ jtojnar ];
diff --git a/pkgs/development/libraries/pplite/default.nix b/pkgs/development/libraries/pplite/default.nix
index c9c0d1863382..77841a3f5efd 100644
--- a/pkgs/development/libraries/pplite/default.nix
+++ b/pkgs/development/libraries/pplite/default.nix
@@ -14,6 +14,7 @@ stdenv.mkDerivation {
   meta = {
     homepage = "https://github.com/ezaffanella/PPLite";
     description = "Convex polyhedra library for Abstract Interpretation";
+    mainProgram = "pplite_lcdd";
     license = lib.licenses.gpl3Only;
   };
 }
diff --git a/pkgs/development/libraries/protolock/default.nix b/pkgs/development/libraries/protolock/default.nix
index c1b54306dca8..f8483eb5d68b 100644
--- a/pkgs/development/libraries/protolock/default.nix
+++ b/pkgs/development/libraries/protolock/default.nix
@@ -19,6 +19,7 @@ buildGoModule rec {
 
   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";
+    mainProgram = "protolock";
     homepage = "https://github.com/nilslice/protolock";
     license = licenses.bsd3;
     maintainers = with maintainers; [ groodt ];
diff --git a/pkgs/development/libraries/ptex/default.nix b/pkgs/development/libraries/ptex/default.nix
index a5827fe188c5..930217dab39c 100644
--- a/pkgs/development/libraries/ptex/default.nix
+++ b/pkgs/development/libraries/ptex/default.nix
@@ -19,6 +19,7 @@ stdenv.mkDerivation rec
 
   meta = with lib; {
     description = "Per-Face Texture Mapping for Production Rendering";
+    mainProgram = "ptxinfo";
     homepage = "http://ptex.us/";
     license = licenses.bsd3;
     platforms = platforms.all;
diff --git a/pkgs/development/libraries/pth/default.nix b/pkgs/development/libraries/pth/default.nix
index c75b0d1db2d8..7cb9046acf21 100644
--- a/pkgs/development/libraries/pth/default.nix
+++ b/pkgs/development/libraries/pth/default.nix
@@ -24,6 +24,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "The GNU Portable Threads library";
+    mainProgram = "pth-config";
     homepage = "https://www.gnu.org/software/pth";
     license = licenses.lgpl21Plus;
     platforms = platforms.all;
diff --git a/pkgs/development/libraries/qoi/default.nix b/pkgs/development/libraries/qoi/default.nix
index b218fca11d1f..c5d527aa3ec5 100644
--- a/pkgs/development/libraries/qoi/default.nix
+++ b/pkgs/development/libraries/qoi/default.nix
@@ -43,6 +43,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   meta = with lib; {
     description = "'Quite OK Image Format' for fast, lossless image compression";
+    mainProgram = "qoiconv";
     homepage = "https://qoiformat.org/";
     license = licenses.mit;
     maintainers = with maintainers; [ hzeller ];
diff --git a/pkgs/development/libraries/qpdf/default.nix b/pkgs/development/libraries/qpdf/default.nix
index 872faafdd1ff..33967e39ccfa 100644
--- a/pkgs/development/libraries/qpdf/default.nix
+++ b/pkgs/development/libraries/qpdf/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "qpdf";
-  version = "11.8.0";
+  version = "11.9.0";
 
   src = fetchFromGitHub {
     owner = "qpdf";
     repo = "qpdf";
     rev = "v${version}";
-    hash = "sha256-EoFCRAWia8LAaLdoBW0ByndzIAjSvQ7bJFh0SZ/FKtY=";
+    hash = "sha256-HD7+2TBDLBIt+VaPO5WgnDjNZOj8naltFmYdYzOIn+4=";
   };
 
   nativeBuildInputs = [ cmake perl ];
diff --git a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix
index 3503067aca75..44007bec07b8 100644
--- a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix
@@ -293,6 +293,7 @@ qtModule ({
 
   meta = with lib; {
     description = "A web engine based on the Chromium web browser";
+    mainProgram = "qwebengine_convert_dict";
     maintainers = with maintainers; [ matthewbauer ];
 
     # qtwebengine-5.15.8: "QtWebEngine can only be built for x86,
diff --git a/pkgs/development/libraries/qt-6/modules/qtquick3dphysics.nix b/pkgs/development/libraries/qt-6/modules/qtquick3dphysics.nix
index 92d676f7c8e2..e9363f75ebbe 100644
--- a/pkgs/development/libraries/qt-6/modules/qtquick3dphysics.nix
+++ b/pkgs/development/libraries/qt-6/modules/qtquick3dphysics.nix
@@ -10,4 +10,5 @@ qtModule {
   propagatedBuildInputs = [ qtbase qtquick3d ];
   env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64)
     "-faligned-allocation";
+  meta.mainProgram = "cooker";
 }
diff --git a/pkgs/development/libraries/qt-6/modules/qtquickeffectmaker.nix b/pkgs/development/libraries/qt-6/modules/qtquickeffectmaker.nix
index 213814a017e2..085ce493de61 100644
--- a/pkgs/development/libraries/qt-6/modules/qtquickeffectmaker.nix
+++ b/pkgs/development/libraries/qt-6/modules/qtquickeffectmaker.nix
@@ -6,4 +6,5 @@
 qtModule {
   pname = "qtquickeffectmaker";
   propagatedBuildInputs = [ qtbase qtquick3d ];
+  meta.mainProgram = "qqem";
 }
diff --git a/pkgs/development/libraries/qt-6/modules/qtserialbus.nix b/pkgs/development/libraries/qt-6/modules/qtserialbus.nix
index 3a7285d0a8b0..59033f421cc2 100644
--- a/pkgs/development/libraries/qt-6/modules/qtserialbus.nix
+++ b/pkgs/development/libraries/qt-6/modules/qtserialbus.nix
@@ -3,4 +3,5 @@
 qtModule {
   pname = "qtserialbus";
   propagatedBuildInputs = [ qtbase qtserialport ];
+  meta.mainProgram = "canbusutil";
 }
diff --git a/pkgs/development/libraries/qt-6/modules/qtshadertools.nix b/pkgs/development/libraries/qt-6/modules/qtshadertools.nix
index 5a4b894b9abd..ce0f381028c5 100644
--- a/pkgs/development/libraries/qt-6/modules/qtshadertools.nix
+++ b/pkgs/development/libraries/qt-6/modules/qtshadertools.nix
@@ -1,8 +1,15 @@
 { qtModule
 , qtbase
+, stdenv
+, lib
+, pkgsBuildBuild
 }:
 
 qtModule {
   pname = "qtshadertools";
   propagatedBuildInputs = [ qtbase ];
+  cmakeFlags = lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    "-DQt6ShaderToolsTools_DIR=${pkgsBuildBuild.qt6.qtshadertools}/lib/cmake/Qt6ShaderToolsTools"
+  ];
+  meta.mainProgram = "qsb";
 }
diff --git a/pkgs/development/libraries/qt-6/modules/qtsvg.nix b/pkgs/development/libraries/qt-6/modules/qtsvg.nix
index d81634d9ef1b..3d7df288839a 100644
--- a/pkgs/development/libraries/qt-6/modules/qtsvg.nix
+++ b/pkgs/development/libraries/qt-6/modules/qtsvg.nix
@@ -5,11 +5,20 @@
 , libmng
 , zlib
 , pkg-config
+, lib
+, stdenv
 }:
 
 qtModule {
   pname = "qtsvg";
   propagatedBuildInputs = [ qtbase ];
-  buildInputs = [ libwebp jasper libmng zlib ];
+  buildInputs = [
+    libwebp
+  ] ++ lib.optionals (stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    jasper
+  ] ++ [
+    libmng
+    zlib
+  ];
   nativeBuildInputs = [ pkg-config ];
 }
diff --git a/pkgs/development/libraries/quarto/default.nix b/pkgs/development/libraries/quarto/default.nix
index c61bb41e4484..09a44adbe561 100644
--- a/pkgs/development/libraries/quarto/default.nix
+++ b/pkgs/development/libraries/quarto/default.nix
@@ -73,6 +73,7 @@ stdenv.mkDerivation (final: {
 
   meta = with lib; {
     description = "Open-source scientific and technical publishing system built on Pandoc";
+    mainProgram = "quarto";
     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.
diff --git a/pkgs/development/libraries/re2/default.nix b/pkgs/development/libraries/re2/default.nix
index feb565076326..d1223811c686 100644
--- a/pkgs/development/libraries/re2/default.nix
+++ b/pkgs/development/libraries/re2/default.nix
@@ -13,13 +13,13 @@
 
 stdenv.mkDerivation rec {
   pname = "re2";
-  version = "2024-02-01";
+  version = "2024-03-01";
 
   src = fetchFromGitHub {
     owner = "google";
     repo = "re2";
     rev = version;
-    hash = "sha256-a6yo0zLgb193TDL8akselJuZfYqCjPwQ/FJ7+KexuLE=";
+    hash = "sha256-VuI9OsfGTdVywdyVfBrSzXSjbSfevne+YQ2oOz4R3DM=";
   };
 
   outputs = [ "out" "dev" ];
diff --git a/pkgs/development/libraries/recastnavigation/default.nix b/pkgs/development/libraries/recastnavigation/default.nix
index 8e0fe7947f44..b4119f1133f5 100644
--- a/pkgs/development/libraries/recastnavigation/default.nix
+++ b/pkgs/development/libraries/recastnavigation/default.nix
@@ -36,6 +36,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://github.com/recastnavigation/recastnavigation";
     description = "Navigation-mesh Toolset for Games";
+    mainProgram = "RecastDemo";
     license = licenses.zlib;
     maintainers = with maintainers; [ marius851000 ];
     platforms = platforms.all;
diff --git a/pkgs/development/libraries/retro-gtk/default.nix b/pkgs/development/libraries/retro-gtk/default.nix
index 7711dde497f0..1323bd98a43c 100644
--- a/pkgs/development/libraries/retro-gtk/default.nix
+++ b/pkgs/development/libraries/retro-gtk/default.nix
@@ -54,6 +54,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "The GTK Libretro frontend framework";
+    mainProgram = "retro-demo";
     longDescription = ''
       Libretro is a plugin format design to implement video game
       console emulators, video games and similar multimedia
diff --git a/pkgs/development/libraries/rocksdb/default.nix b/pkgs/development/libraries/rocksdb/default.nix
index c25a349ba32d..6c2aaaa8815a 100644
--- a/pkgs/development/libraries/rocksdb/default.nix
+++ b/pkgs/development/libraries/rocksdb/default.nix
@@ -39,20 +39,9 @@ stdenv.mkDerivation (finalAttrs: {
     "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"
-  ]);
+ env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [
+   "-faligned-allocation"
+ ]);
 
   cmakeFlags = [
     "-DPORTABLE=1"
@@ -71,12 +60,25 @@ stdenv.mkDerivation (finalAttrs: {
     "-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"}"
+    "-DFAIL_ON_WARNINGS=NO"
   ] ++ 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";
 
+  postPatch = lib.optionalString (lib.versionOlder finalAttrs.version "8") ''
+    # Fix gcc-13 build failures due to missing <cstdint> and
+    # <system_error> includes, fixed upstyream sice 8.x
+    sed -e '1i #include <cstdint>' -i db/compaction/compaction_iteration_stats.h
+    sed -e '1i #include <cstdint>' -i table/block_based/data_block_hash_index.h
+    sed -e '1i #include <cstdint>' -i util/string_util.h
+    sed -e '1i #include <cstdint>' -i include/rocksdb/utilities/checkpoint.h
+  '' + lib.optionalString (lib.versionOlder finalAttrs.version "7") ''
+    # Fix gcc-13 build failures due to missing <cstdint> and
+    # <system_error> includes, fixed upstyream sice 7.x
+    sed -e '1i #include <system_error>' -i third-party/folly/folly/synchronization/detail/ProxyLockable-inl.h
+  '';
+
   preInstall = ''
     mkdir -p $tools/bin
     cp tools/{ldb,sst_dump}${stdenv.hostPlatform.extensions.executable} $tools/bin/
diff --git a/pkgs/development/libraries/rote/default.nix b/pkgs/development/libraries/rote/default.nix
index 4655d54ab98e..65e2ecd09150 100644
--- a/pkgs/development/libraries/rote/default.nix
+++ b/pkgs/development/libraries/rote/default.nix
@@ -15,6 +15,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Our Own Terminal Emulation Library";
+    mainProgram = "rote-config";
     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
diff --git a/pkgs/development/libraries/rtlcss/default.nix b/pkgs/development/libraries/rtlcss/default.nix
index a553e8d33ddf..327e7b2626da 100644
--- a/pkgs/development/libraries/rtlcss/default.nix
+++ b/pkgs/development/libraries/rtlcss/default.nix
@@ -17,6 +17,7 @@ buildNpmPackage rec {
 
   meta = with lib; {
     description = "Framework for converting Left-To-Right (LTR) Cascading Style Sheets(CSS) to Right-To-Left (RTL)";
+    mainProgram = "rtlcss";
     homepage = "https://rtlcss.com";
     license = licenses.mit;
     maintainers = with maintainers; [ ];
diff --git a/pkgs/development/libraries/s2n-tls/default.nix b/pkgs/development/libraries/s2n-tls/default.nix
index 9f68c243cf50..a8c8a22ff1bb 100644
--- a/pkgs/development/libraries/s2n-tls/default.nix
+++ b/pkgs/development/libraries/s2n-tls/default.nix
@@ -8,13 +8,13 @@
 
 stdenv.mkDerivation rec {
   pname = "s2n-tls";
-  version = "1.4.3";
+  version = "1.4.6";
 
   src = fetchFromGitHub {
     owner = "aws";
     repo = pname;
     rev = "v${version}";
-    hash = "sha256-E3Giiu8xiTCSAPkbxOaVL/LXZWjhAS1M/n//Pe5eOKg=";
+    hash = "sha256-x4/AkmkmuTKxzlk8AxbydA4GctpShsKiFTTJ8m7B4TY=";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/pkgs/development/libraries/science/astronomy/libnova/default.nix b/pkgs/development/libraries/science/astronomy/libnova/default.nix
index f6a8d01ab845..2f5f6851fd8d 100644
--- a/pkgs/development/libraries/science/astronomy/libnova/default.nix
+++ b/pkgs/development/libraries/science/astronomy/libnova/default.nix
@@ -17,6 +17,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Celestial Mechanics, Astrometry and Astrodynamics Library";
+    mainProgram = "libnovaconfig";
     homepage = "http://libnova.sf.net";
     license = licenses.gpl2;
     maintainers = with maintainers; [ hjones2199 ];
diff --git a/pkgs/development/libraries/science/biology/bicgl/default.nix b/pkgs/development/libraries/science/biology/bicgl/default.nix
index 4f98874b2595..07d64fbd97ed 100644
--- a/pkgs/development/libraries/science/biology/bicgl/default.nix
+++ b/pkgs/development/libraries/science/biology/bicgl/default.nix
@@ -28,6 +28,6 @@ stdenv.mkDerivation rec {
     description = "Brain Imaging Centre graphics library";
     maintainers = with maintainers; [ bcdarwin ];
     platforms = platforms.unix;
-    license = licenses.free;
+    license = licenses.hpndUc;
   };
 }
diff --git a/pkgs/development/libraries/science/biology/bicpl/default.nix b/pkgs/development/libraries/science/biology/bicpl/default.nix
index 5cf63e342242..c15689aa606a 100644
--- a/pkgs/development/libraries/science/biology/bicpl/default.nix
+++ b/pkgs/development/libraries/science/biology/bicpl/default.nix
@@ -25,6 +25,6 @@ stdenv.mkDerivation rec {
     description = "Brain Imaging Centre programming library";
     maintainers = with maintainers; [ bcdarwin ];
     platforms = platforms.unix;
-    license   = licenses.free;
+    license   = with licenses; [ hpndUc gpl3Plus ];
   };
 }
diff --git a/pkgs/development/libraries/science/biology/mirtk/default.nix b/pkgs/development/libraries/science/biology/mirtk/default.nix
index 9af6793ef997..ce02474eeb1e 100644
--- a/pkgs/development/libraries/science/biology/mirtk/default.nix
+++ b/pkgs/development/libraries/science/biology/mirtk/default.nix
@@ -65,6 +65,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://github.com/BioMedIA/MIRTK";
     description = "Medical image registration library and tools";
+    mainProgram = "mirtk";
     maintainers = with maintainers; [ bcdarwin ];
     platforms = platforms.linux;
     license = licenses.asl20;
diff --git a/pkgs/development/libraries/science/chemistry/dftd4/default.nix b/pkgs/development/libraries/science/chemistry/dftd4/default.nix
index d791a7d4e3d6..087c6e7d01de 100644
--- a/pkgs/development/libraries/science/chemistry/dftd4/default.nix
+++ b/pkgs/development/libraries/science/chemistry/dftd4/default.nix
@@ -46,6 +46,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Generally Applicable Atomic-Charge Dependent London Dispersion Correction";
+    mainProgram = "dftd4";
     license = with licenses; [ lgpl3Plus gpl3Plus ];
     homepage = "https://github.com/grimme-lab/dftd4";
     platforms = platforms.linux;
diff --git a/pkgs/development/libraries/science/chemistry/harminv/default.nix b/pkgs/development/libraries/science/chemistry/harminv/default.nix
index 54c0d03979ab..dc8289e14ce9 100644
--- a/pkgs/development/libraries/science/chemistry/harminv/default.nix
+++ b/pkgs/development/libraries/science/chemistry/harminv/default.nix
@@ -34,6 +34,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Harmonic inversion algorithm of Mandelshtam: decompose signal into sum of decaying sinusoids";
+    mainProgram = "GDSIIConvert";
     homepage = "https://github.com/NanoComp/harminv";
     license = with licenses; [ gpl2Only ];
     maintainers = with maintainers; [ sheepforce markuskowa ];
diff --git a/pkgs/development/libraries/science/chemistry/libGDSII/default.nix b/pkgs/development/libraries/science/chemistry/libGDSII/default.nix
index c3257bad3e26..095e0ee182a3 100644
--- a/pkgs/development/libraries/science/chemistry/libGDSII/default.nix
+++ b/pkgs/development/libraries/science/chemistry/libGDSII/default.nix
@@ -24,6 +24,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Library and command-line utility for reading GDSII geometry files";
+    mainProgram = "GDSIIConvert";
     homepage = "https://github.com/HomerReid/libGDSII";
     license = [ licenses.gpl2Only ];
     maintainers = with maintainers; [ sheepforce markuskowa ];
diff --git a/pkgs/development/libraries/science/chemistry/mctc-lib/default.nix b/pkgs/development/libraries/science/chemistry/mctc-lib/default.nix
index a3726ea5e5dd..a8c27b3eec56 100644
--- a/pkgs/development/libraries/science/chemistry/mctc-lib/default.nix
+++ b/pkgs/development/libraries/science/chemistry/mctc-lib/default.nix
@@ -38,6 +38,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Modular computation tool chain library";
+    mainProgram = "mctc-convert";
     homepage = "https://github.com/grimme-lab/mctc-lib";
     license = licenses.asl20;
     platforms = platforms.linux;
diff --git a/pkgs/development/libraries/science/chemistry/molequeue/default.nix b/pkgs/development/libraries/science/chemistry/molequeue/default.nix
index b560ac16c698..5cd8669c5597 100644
--- a/pkgs/development/libraries/science/chemistry/molequeue/default.nix
+++ b/pkgs/development/libraries/science/chemistry/molequeue/default.nix
@@ -26,6 +26,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Desktop integration of high performance computing resources";
+    mainProgram = "molequeue";
     maintainers = with maintainers; [ sheepforce ];
     homepage = "https://github.com/OpenChemistry/molequeue";
     platforms = platforms.linux;
diff --git a/pkgs/development/libraries/science/chemistry/multicharge/default.nix b/pkgs/development/libraries/science/chemistry/multicharge/default.nix
index b90f073a4f2e..020390737139 100644
--- a/pkgs/development/libraries/science/chemistry/multicharge/default.nix
+++ b/pkgs/development/libraries/science/chemistry/multicharge/default.nix
@@ -45,6 +45,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Electronegativity equilibration model for atomic partial charges";
+    mainProgram = "multicharge";
     license = licenses.asl20;
     homepage = "https://github.com/grimme-lab/multicharge";
     platforms = platforms.linux;
diff --git a/pkgs/development/libraries/science/chemistry/openmm/default.nix b/pkgs/development/libraries/science/chemistry/openmm/default.nix
index 9b37f14f1403..d146fa073dc3 100644
--- a/pkgs/development/libraries/science/chemistry/openmm/default.nix
+++ b/pkgs/development/libraries/science/chemistry/openmm/default.nix
@@ -100,6 +100,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Toolkit for molecular simulation using high performance GPU code";
+    mainProgram = "TestReferenceHarmonicBondForce";
     homepage = "https://openmm.org/";
     license = with licenses; [ gpl3Plus lgpl3Plus mit ];
     platforms = platforms.linux;
diff --git a/pkgs/development/libraries/science/chemistry/simple-dftd3/default.nix b/pkgs/development/libraries/science/chemistry/simple-dftd3/default.nix
index ae5e30d73608..d4f81e3a24cb 100644
--- a/pkgs/development/libraries/science/chemistry/simple-dftd3/default.nix
+++ b/pkgs/development/libraries/science/chemistry/simple-dftd3/default.nix
@@ -44,6 +44,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Reimplementation of the DFT-D3 program";
+    mainProgram = "s-dftd3";
     license = with licenses; [ lgpl3Only gpl3Only ];
     homepage = "https://github.com/dftd3/simple-dftd3";
     platforms = [ "x86_64-linux" ];
diff --git a/pkgs/development/libraries/science/chemistry/tblite/default.nix b/pkgs/development/libraries/science/chemistry/tblite/default.nix
index bea5793addbf..64374972c295 100644
--- a/pkgs/development/libraries/science/chemistry/tblite/default.nix
+++ b/pkgs/development/libraries/science/chemistry/tblite/default.nix
@@ -67,6 +67,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Light-weight tight-binding framework";
+    mainProgram = "tblite";
     license = with licenses; [ gpl3Plus lgpl3Plus ];
     homepage = "https://github.com/tblite/tblite";
     platforms = platforms.linux;
diff --git a/pkgs/development/libraries/science/math/bonmin/default.nix b/pkgs/development/libraries/science/math/bonmin/default.nix
index 5a736f976957..2bbd698f7fa7 100644
--- a/pkgs/development/libraries/science/math/bonmin/default.nix
+++ b/pkgs/development/libraries/science/math/bonmin/default.nix
@@ -43,6 +43,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "An open-source code for solving general MINLP (Mixed Integer NonLinear Programming) problems";
+    mainProgram = "bonmin";
     homepage = "https://github.com/coin-or/Bonmin";
     license = licenses.epl10;
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/science/math/faiss/default.nix b/pkgs/development/libraries/science/math/faiss/default.nix
index 25ac539e05f2..25d6542f8da1 100644
--- a/pkgs/development/libraries/science/math/faiss/default.nix
+++ b/pkgs/development/libraries/science/math/faiss/default.nix
@@ -145,6 +145,7 @@ stdenv.mkDerivation {
 
   meta = with lib; {
     description = "A library for efficient similarity search and clustering of dense vectors by Facebook Research";
+    mainProgram = "demo_ivfpq_indexing";
     homepage = "https://github.com/facebookresearch/faiss";
     license = licenses.mit;
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/science/math/itpp/default.nix b/pkgs/development/libraries/science/math/itpp/default.nix
index 639497bb1f8c..cb45787e1403 100644
--- a/pkgs/development/libraries/science/math/itpp/default.nix
+++ b/pkgs/development/libraries/science/math/itpp/default.nix
@@ -44,6 +44,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "IT++ is a C++ library of mathematical, signal processing and communication classes and functions";
+    mainProgram = "itpp-config";
     homepage = "https://itpp.sourceforge.net/";
     license = licenses.gpl3;
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/science/math/lcalc/default.nix b/pkgs/development/libraries/science/math/lcalc/default.nix
index b1896917658c..f6603f7d8fb8 100644
--- a/pkgs/development/libraries/science/math/lcalc/default.nix
+++ b/pkgs/development/libraries/science/math/lcalc/default.nix
@@ -34,6 +34,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://gitlab.com/sagemath/lcalc";
     description = "A program for calculating with L-functions";
+    mainProgram = "lcalc";
     license = with licenses; [ gpl2 ];
     maintainers = teams.sage.members;
     platforms = platforms.all;
diff --git a/pkgs/development/libraries/science/math/magma/generic.nix b/pkgs/development/libraries/science/math/magma/generic.nix
index 7ef60e0418ed..757a1b77dafc 100644
--- a/pkgs/development/libraries/science/math/magma/generic.nix
+++ b/pkgs/development/libraries/science/math/magma/generic.nix
@@ -5,35 +5,48 @@
 #  supportedGpuTargets: List String
 # }
 
-{ blas
+{ autoPatchelfHook
+, blas
 , cmake
+, cudaPackages_11 ? null
 , cudaPackages
 , cudaSupport ? config.cudaSupport
 , fetchurl
 , gfortran
-, cudaCapabilities ? cudaPackages.cudaFlags.cudaCapabilities
 , gpuTargets ? [ ] # Non-CUDA targets, that is HIP
-, rocmPackages
+, rocmPackages_5
 , lapack
 , lib
 , libpthreadstubs
 , magmaRelease
 , ninja
+, python3
 , 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;
 
+  # Per https://icl.utk.edu/magma/downloads, support for CUDA 12 wasn't added until 2.7.1.
+  # If we're building a version prior to that, use the latest release of the 11.x series.
+  effectiveCudaPackages =
+    if strings.versionOlder version "2.7.1"
+    then cudaPackages_11
+    else cudaPackages;
+
+  inherit (effectiveCudaPackages) cudaAtLeast cudaFlags cudaOlder;
+  inherit (cudaFlags) cudaCapabilities;
+
+  # move to newer ROCm version once supported
+  rocmPackages = rocmPackages_5;
+
   # 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
@@ -95,19 +108,34 @@ stdenv.mkDerivation {
     inherit hash;
   };
 
+  # Magma doesn't have anything which could be run under doCheck, but it does build test suite executables.
+  # These are moved to $test/bin/ and $test/lib/ in postInstall.
+  outputs = ["out" "test"];
+
+  # Fixup for the python test runners
+  postPatch = ''
+    patchShebangs ./testing/run_{tests,summarize}.py
+    substituteInPlace ./testing/run_tests.py \
+      --replace-fail \
+        "print >>sys.stderr, cmdp, \"doesn't exist (original name: \" + cmd + \", precision: \" + precision + \")\"" \
+        "print(f\"{cmdp} doesn't exist (original name: {cmd}, precision: {precision})\", file=sys.stderr)"
+  '';
+
   nativeBuildInputs = [
+    autoPatchelfHook
     cmake
     ninja
     gfortran
   ] ++ lists.optionals cudaSupport [
-    cudaPackages.cuda_nvcc
+    effectiveCudaPackages.cuda_nvcc
   ];
 
   buildInputs = [
     libpthreadstubs
     lapack
     blas
-  ] ++ lists.optionals cudaSupport (with cudaPackages; [
+    python3
+  ] ++ lists.optionals cudaSupport (with effectiveCudaPackages; [
     cuda_cudart.dev # cuda_runtime.h
     cuda_cudart.lib # cudart
     cuda_cudart.static # cudart_static
@@ -115,11 +143,11 @@ stdenv.mkDerivation {
     libcublas.lib # cublas
     libcusparse.dev # cusparse.h
     libcusparse.lib # cusparse
-  ] ++ lists.optionals (strings.versionOlder cudaVersion "11.8") [
+  ] ++ lists.optionals (cudaOlder "11.8") [
     cuda_nvprof.dev # <cuda_profiler_api.h>
-  ] ++ lists.optionals (strings.versionAtLeast cudaVersion "11.8") [
+  ] ++ lists.optionals (cudaAtLeast "11.8") [
     cuda_profiler_api.dev # <cuda_profiler_api.h>
-  ] ++ lists.optionals (strings.versionAtLeast cudaVersion "12.0") [
+  ] ++ lists.optionals (cudaAtLeast "12.0") [
     cuda_cccl.dev # <nv/target>
   ]) ++ lists.optionals rocmSupport [
     rocmPackages.clr
@@ -129,32 +157,60 @@ stdenv.mkDerivation {
   ];
 
   cmakeFlags = [
-    "-DGPU_TARGET=${gpuTargetString}"
-    (lib.cmakeBool "MAGMA_ENABLE_CUDA" cudaSupport)
-    (lib.cmakeBool "MAGMA_ENABLE_HIP" rocmSupport)
-  ] ++ lists.optionals static [
-    "-DBUILD_SHARED_LIBS=OFF"
+    (strings.cmakeFeature "GPU_TARGET" gpuTargetString)
+    (strings.cmakeBool "MAGMA_ENABLE_CUDA" cudaSupport)
+    (strings.cmakeBool "MAGMA_ENABLE_HIP" rocmSupport)
+    (strings.cmakeBool "BUILD_SHARED_LIBS" (!static))
+    # Set the Fortran name mangling scheme explicitly. We must set FORTRAN_CONVENTION manually because it will
+    # otherwise not be set in NVCC_FLAGS or DEVCCFLAGS (which we cannot modify).
+    # See https://github.com/NixOS/nixpkgs/issues/281656#issuecomment-1902931289
+    (strings.cmakeBool "USE_FORTRAN" true)
+    (strings.cmakeFeature "CMAKE_C_FLAGS" "-DADD_")
+    (strings.cmakeFeature "CMAKE_CXX_FLAGS" "-DADD_")
+    (strings.cmakeFeature "FORTRAN_CONVENTION" "-DADD_")
   ] ++ 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++"
+    (strings.cmakeFeature "CMAKE_CUDA_ARCHITECTURES" cudaArchitecturesString)
+    (strings.cmakeFeature "MIN_ARCH" minArch) # Disarms magma's asserts
   ] ++ 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"
+    (strings.cmakeFeature "CMAKE_C_COMPILER" "${rocmPackages.clr}/bin/hipcc")
+    (strings.cmakeFeature "CMAKE_CXX_COMPILER" "${rocmPackages.clr}/bin/hipcc")
   ];
 
+  # Magma doesn't have a test suite we can easily run, just loose executables, all of which require a GPU.
   doCheck = false;
 
+  # Copy the files to the test output and fix the RPATHs.
+  postInstall =
+    # NOTE: The python scripts aren't copied by CMake into the build directory, so we must copy them from the source.
+    # TODO(@connorbaker): This should be handled by having CMakeLists.txt install them, but such a patch is
+    # out of the scope of the PR which introduces the `test` output: https://github.com/NixOS/nixpkgs/pull/283777.
+    # See https://github.com/NixOS/nixpkgs/pull/283777#discussion_r1482125034 for more information.
+    # Such work is tracked by https://github.com/NixOS/nixpkgs/issues/296286.
+    ''
+      install -Dm755 ../testing/run_{tests,summarize}.py -t "$test/bin/"
+    ''
+    # Copy core test executables and libraries over to the test output.
+    # NOTE: Magma doesn't provide tests for sparse solvers for ROCm, but it does for CUDA -- we put them both in the same
+    # install command to avoid the case where a glob would fail to find any files and cause the install command to fail
+    # because it has no files to install.
+    + ''
+      install -Dm755 ./testing/testing_* ./sparse/testing/testing_* -t "$test/bin/"
+      install -Dm755 ./lib/lib*test*.* -t "$test/lib/"
+    ''
+    # All of the test executables and libraries will have a reference to the build directory in their RPATH, which we
+    # must remove. We do this by shrinking the RPATH to only include the Nix store. The autoPatchelfHook will take care
+    # of supplying the correct RPATH for needed libraries (like `libtester.so`).
+    + ''
+      find "$test" -type f -exec \
+        patchelf \
+          --shrink-rpath \
+          --allowed-rpath-prefixes "$NIX_STORE" \
+          {} \;
+    '';
+
   passthru = {
-    inherit cudaPackages cudaSupport rocmSupport gpuTargets;
+    inherit cudaSupport rocmSupport gpuTargets;
+    cudaPackages = effectiveCudaPackages;
   };
 
   meta = with lib; {
@@ -168,6 +224,7 @@ stdenv.mkDerivation {
     broken =
       !(cudaSupport || rocmSupport) # At least one back-end enabled
       || (cudaSupport && rocmSupport) # Mutually exclusive
-      || (cudaSupport && strings.versionOlder cudaVersion "9");
+      || (cudaSupport && cudaOlder "9.0")
+      || (cudaSupport && strings.versionOlder version "2.7.1" && cudaPackages_11 == null);
   };
 }
diff --git a/pkgs/development/libraries/science/math/mongoose/default.nix b/pkgs/development/libraries/science/math/mongoose/default.nix
index 29b901277f61..c1eed9bf432a 100644
--- a/pkgs/development/libraries/science/math/mongoose/default.nix
+++ b/pkgs/development/libraries/science/math/mongoose/default.nix
@@ -61,6 +61,7 @@ stdenv.mkDerivation {
 
   meta = with lib; {
     description = "Graph Coarsening and Partitioning Library";
+    mainProgram = "suitesparse_mongoose";
     homepage = "https://github.com/DrTimothyAldenDavis/SuiteSparse/tree/dev/Mongoose";
     license = licenses.gpl3Only;
     maintainers = with maintainers; [ wegank ];
diff --git a/pkgs/development/libraries/science/math/or-tools/default.nix b/pkgs/development/libraries/science/math/or-tools/default.nix
index 5cbc23589895..1b17f9576175 100644
--- a/pkgs/development/libraries/science/math/or-tools/default.nix
+++ b/pkgs/development/libraries/science/math/or-tools/default.nix
@@ -120,6 +120,7 @@ stdenv.mkDerivation rec {
     description = ''
       Google's software suite for combinatorial optimization.
     '';
+    mainProgram = "fzn-ortools";
     maintainers = with maintainers; [ andersk ];
     platforms = with platforms; linux ++ darwin;
   };
diff --git a/pkgs/development/libraries/science/math/planarity/default.nix b/pkgs/development/libraries/science/math/planarity/default.nix
index 3b072fecde34..196ee5de576b 100644
--- a/pkgs/development/libraries/science/math/planarity/default.nix
+++ b/pkgs/development/libraries/science/math/planarity/default.nix
@@ -23,6 +23,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://github.com/graph-algorithms/edge-addition-planarity-suite";
     description = "A library for implementing graph algorithms";
+    mainProgram = "planarity";
     license = licenses.bsd3;
     maintainers = teams.sage.members;
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/science/math/sympow/default.nix b/pkgs/development/libraries/science/math/sympow/default.nix
index 09ca356ccdc5..1033f26f4360 100644
--- a/pkgs/development/libraries/science/math/sympow/default.nix
+++ b/pkgs/development/libraries/science/math/sympow/default.nix
@@ -73,6 +73,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Compute special values of symmetric power elliptic curve L-functions";
+    mainProgram = "sympow";
     license = {
       shortName = "sympow";
       fullName = "Custom, BSD-like. See COPYING file.";
diff --git a/pkgs/development/libraries/science/math/trilinos/default.nix b/pkgs/development/libraries/science/math/trilinos/default.nix
index 1939b0a5307b..8e461f1caf24 100644
--- a/pkgs/development/libraries/science/math/trilinos/default.nix
+++ b/pkgs/development/libraries/science/math/trilinos/default.nix
@@ -88,6 +88,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Engineering and scientific problems algorithms";
+    mainProgram = "nvcc_wrapper";
     longDescription = ''
       The Trilinos Project is an effort to develop algorithms and enabling
       technologies within an object-oriented software framework for the
diff --git a/pkgs/development/libraries/science/robotics/edgetpu-compiler/default.nix b/pkgs/development/libraries/science/robotics/edgetpu-compiler/default.nix
index 5e02398d1b4e..07d978641663 100644
--- a/pkgs/development/libraries/science/robotics/edgetpu-compiler/default.nix
+++ b/pkgs/development/libraries/science/robotics/edgetpu-compiler/default.nix
@@ -50,6 +50,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A command line tool that compiles a TensorFlow Lite model into an Edge TPU compatible file.";
+    mainProgram = "edgetpu_compiler";
     homepage = "https://coral.ai/docs/edgetpu/compiler";
     sourceProvenance = with sourceTypes; [ binaryNativeCode ];
     license = licenses.asl20;
diff --git a/pkgs/development/libraries/serialdv/default.nix b/pkgs/development/libraries/serialdv/default.nix
index bff7a107eebe..549d03693375 100644
--- a/pkgs/development/libraries/serialdv/default.nix
+++ b/pkgs/development/libraries/serialdv/default.nix
@@ -15,6 +15,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "C++ Minimal interface to encode and decode audio with AMBE3000 based devices in packet mode over a serial link";
+    mainProgram = "dvtest";
     homepage = "https://github.com/f4exb/serialdv";
     platforms = platforms.unix;
     maintainers = with maintainers; [ alkeryn ];
diff --git a/pkgs/development/libraries/sexpp/default.nix b/pkgs/development/libraries/sexpp/default.nix
index dd41d520d28c..21b661338b64 100644
--- a/pkgs/development/libraries/sexpp/default.nix
+++ b/pkgs/development/libraries/sexpp/default.nix
@@ -41,6 +41,7 @@ stdenv.mkDerivation (finalAttrs: {
   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]";
+    mainProgram = "sexpp";
     license = licenses.mit;
     platforms = platforms.all;
     maintainers = with maintainers; [ ribose-jeffreylau ];
diff --git a/pkgs/development/libraries/shine/default.nix b/pkgs/development/libraries/shine/default.nix
index 8e5d02e632d2..433e4dcc6179 100644
--- a/pkgs/development/libraries/shine/default.nix
+++ b/pkgs/development/libraries/shine/default.nix
@@ -15,6 +15,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Fast fixed-point mp3 encoding library";
+    mainProgram = "shineenc";
     homepage = "https://github.com/toots/shine";
     license = licenses.lgpl2Only;
     maintainers = with maintainers; [ dandellion ];
diff --git a/pkgs/development/libraries/slib/default.nix b/pkgs/development/libraries/slib/default.nix
index 54aa046bd676..c3c5965816f4 100644
--- a/pkgs/development/libraries/slib/default.nix
+++ b/pkgs/development/libraries/slib/default.nix
@@ -39,6 +39,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "The SLIB Portable Scheme Library";
+    mainProgram = "slib";
 
     longDescription = ''
       SLIB is a portable library for the programming language Scheme.  It
diff --git a/pkgs/development/libraries/smooth/default.nix b/pkgs/development/libraries/smooth/default.nix
index bc4a5601dc45..402500dc9528 100644
--- a/pkgs/development/libraries/smooth/default.nix
+++ b/pkgs/development/libraries/smooth/default.nix
@@ -52,6 +52,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "The smooth Class Library";
+    mainProgram = "smooth-translator";
     license = licenses.artistic2;
     homepage = "http://www.smooth-project.org/";
     maintainers = with maintainers; [ shamilton ];
diff --git a/pkgs/development/libraries/sonic/default.nix b/pkgs/development/libraries/sonic/default.nix
index ba3164db11aa..4ab71b36a012 100644
--- a/pkgs/development/libraries/sonic/default.nix
+++ b/pkgs/development/libraries/sonic/default.nix
@@ -25,6 +25,7 @@ stdenv.mkDerivation {
 
   meta = with lib; {
     description = "Simple library to speed up or slow down speech";
+    mainProgram = "sonic";
     homepage = "https://github.com/waywardgeek/sonic";
     license = licenses.asl20;
     maintainers = with maintainers; [ aske ];
diff --git a/pkgs/development/libraries/sqlcipher/default.nix b/pkgs/development/libraries/sqlcipher/default.nix
index d35f654650ee..0a22d4177892 100644
--- a/pkgs/development/libraries/sqlcipher/default.nix
+++ b/pkgs/development/libraries/sqlcipher/default.nix
@@ -60,6 +60,7 @@ stdenv.mkDerivation rec {
   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";
+    mainProgram = "sqlcipher";
     homepage = "https://www.zetetic.net/sqlcipher/";
     license = licenses.bsd3;
     maintainers = with maintainers; [ ];
diff --git a/pkgs/development/libraries/sregex/default.nix b/pkgs/development/libraries/sregex/default.nix
index 48a1b9c3930e..a4d2ef526db9 100644
--- a/pkgs/development/libraries/sregex/default.nix
+++ b/pkgs/development/libraries/sregex/default.nix
@@ -16,6 +16,7 @@ stdenv.mkDerivation rec {
   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";
+    mainProgram = "sregex-cli";
     license = licenses.bsd3;
     maintainers = with maintainers; [];
     platforms = platforms.all;
diff --git a/pkgs/development/libraries/srtp/default.nix b/pkgs/development/libraries/srtp/default.nix
index 8bcd854f3681..a124a3d600ca 100644
--- a/pkgs/development/libraries/srtp/default.nix
+++ b/pkgs/development/libraries/srtp/default.nix
@@ -10,13 +10,13 @@
 
 stdenv.mkDerivation rec {
   pname = "libsrtp";
-  version = "2.5.0";
+  version = "2.6.0";
 
   src = fetchFromGitHub {
     owner = "cisco";
     repo = "libsrtp";
     rev = "v${version}";
-    sha256 = "sha256-OvCw7oF1OuamP3qO2BsimeBSHq1rcXFLfK8KnbbgkMU=";
+    sha256 = "sha256-vWL5bksKT5NUoNkIRiJ2FeGODQthD8SgXjCaA7SeTe4=";
   };
 
   outputs = [ "out" "dev" ];
diff --git a/pkgs/development/libraries/subunit/default.nix b/pkgs/development/libraries/subunit/default.nix
index 61c30ebcf033..ed0c5a2d8720 100644
--- a/pkgs/development/libraries/subunit/default.nix
+++ b/pkgs/development/libraries/subunit/default.nix
@@ -20,6 +20,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A streaming protocol for test results";
+    mainProgram = "subunit-diff";
     homepage = "https://launchpad.net/subunit";
     license = licenses.asl20;
     platforms = platforms.all;
diff --git a/pkgs/development/libraries/swiften/default.nix b/pkgs/development/libraries/swiften/default.nix
index f839021c949e..05b1b996ea3f 100644
--- a/pkgs/development/libraries/swiften/default.nix
+++ b/pkgs/development/libraries/swiften/default.nix
@@ -81,6 +81,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "An XMPP library for C++, used by the Swift client";
+    mainProgram = "swiften-config";
     homepage = "http://swift.im/swiften.html";
     license = licenses.gpl2Plus;
     platforms = platforms.linux;
diff --git a/pkgs/development/libraries/sycl-info/default.nix b/pkgs/development/libraries/sycl-info/default.nix
index 9d86017e084e..5d70bed4dd0f 100644
--- a/pkgs/development/libraries/sycl-info/default.nix
+++ b/pkgs/development/libraries/sycl-info/default.nix
@@ -50,6 +50,7 @@ stdenv.mkDerivation rec {
     {
       homepage = "https://github.com/codeplaysoftware/sycl-info";
       description = "Tool to show information about available SYCL implementations";
+      mainProgram = "sycl-info";
       platforms = platforms.linux;
       license = licenses.asl20;
       maintainers = with maintainers; [ davidtwco ];
diff --git a/pkgs/development/libraries/ta-lib/default.nix b/pkgs/development/libraries/ta-lib/default.nix
index ea5ec66cf169..c3f77a9a247a 100644
--- a/pkgs/development/libraries/ta-lib/default.nix
+++ b/pkgs/development/libraries/ta-lib/default.nix
@@ -16,6 +16,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     description =
       "TA-Lib is a library that provides common functions for the technical analysis of financial market data.";
+    mainProgram = "ta-lib-config";
     homepage = "https://ta-lib.org/";
     license = lib.licenses.bsd3;
 
diff --git a/pkgs/development/libraries/tachyon/default.nix b/pkgs/development/libraries/tachyon/default.nix
index 64746d84572a..02fb1fbc1324 100644
--- a/pkgs/development/libraries/tachyon/default.nix
+++ b/pkgs/development/libraries/tachyon/default.nix
@@ -69,6 +69,7 @@ stdenv.mkDerivation rec {
   '';
   meta = {
     description = "A Parallel / Multiprocessor Ray Tracing System";
+    mainProgram = "tachyon";
     license = lib.licenses.bsd3;
     maintainers = [lib.maintainers.raskin];
     platforms = with lib.platforms; linux ++ cygwin ++ darwin;
diff --git a/pkgs/development/libraries/taco/default.nix b/pkgs/development/libraries/taco/default.nix
index 1bd404806f10..693b5f25f990 100644
--- a/pkgs/development/libraries/taco/default.nix
+++ b/pkgs/development/libraries/taco/default.nix
@@ -47,6 +47,7 @@ in stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Computes sparse tensor expressions on CPUs and GPUs";
+    mainProgram = "taco";
     license = licenses.mit;
     homepage = "https://github.com/tensor-compiler/taco";
     maintainers = [ maintainers.sheepforce ];
diff --git a/pkgs/development/libraries/taglib-extras/default.nix b/pkgs/development/libraries/taglib-extras/default.nix
index acb52cc53dbf..5ba1a5e20182 100644
--- a/pkgs/development/libraries/taglib-extras/default.nix
+++ b/pkgs/development/libraries/taglib-extras/default.nix
@@ -17,6 +17,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Additional taglib plugins";
+    mainProgram = "taglib-extras-config";
     platforms = platforms.unix;
     license = licenses.lgpl2;
   };
diff --git a/pkgs/development/libraries/taglib/default.nix b/pkgs/development/libraries/taglib/default.nix
index aa759ddbbb02..fc3914b26d29 100644
--- a/pkgs/development/libraries/taglib/default.nix
+++ b/pkgs/development/libraries/taglib/default.nix
@@ -34,6 +34,7 @@ stdenv.mkDerivation (finalAttrs: {
   meta = with lib; {
     homepage = "https://taglib.org/";
     description = "A library for reading and editing audio file metadata";
+    mainProgram = "taglib-config";
     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
diff --git a/pkgs/development/libraries/termbench-pro/default.nix b/pkgs/development/libraries/termbench-pro/default.nix
index 11edecf31cc7..5291536f695f 100644
--- a/pkgs/development/libraries/termbench-pro/default.nix
+++ b/pkgs/development/libraries/termbench-pro/default.nix
@@ -27,6 +27,7 @@ stdenv.mkDerivation {
 
   meta = with lib; {
     description = "Terminal Benchmarking as CLI and library";
+    mainProgram = "tbp";
     license = licenses.asl20;
     platforms = platforms.unix;
     maintainers = with maintainers; [ moni ];
diff --git a/pkgs/development/libraries/text-engine/default.nix b/pkgs/development/libraries/text-engine/default.nix
index 0a9004d01a58..120076a7e0d7 100644
--- a/pkgs/development/libraries/text-engine/default.nix
+++ b/pkgs/development/libraries/text-engine/default.nix
@@ -36,6 +36,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Rich text framework for GTK";
+    mainProgram = "text-engine-demo";
     homepage = "https://github.com/mjakeman/text-engine";
     license = with licenses; [ mpl20 lgpl21Plus ];
     maintainers = with maintainers; [ foo-dogsquared ];
diff --git a/pkgs/development/libraries/thrift/0.10.nix b/pkgs/development/libraries/thrift/0.10.nix
deleted file mode 100644
index 3cfe56e3f7a9..000000000000
--- a/pkgs/development/libraries/thrift/0.10.nix
+++ /dev/null
@@ -1,46 +0,0 @@
-{ 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/pkgs/development/libraries/thrift/default.nix b/pkgs/development/libraries/thrift/default.nix
index acb3a2404870..3d0a9d8a7874 100644
--- a/pkgs/development/libraries/thrift/default.nix
+++ b/pkgs/development/libraries/thrift/default.nix
@@ -131,6 +131,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Library for scalable cross-language services";
+    mainProgram = "thrift";
     homepage = "https://thrift.apache.org/";
     license = licenses.asl20;
     platforms = platforms.linux ++ platforms.darwin;
diff --git a/pkgs/development/libraries/tidyp/default.nix b/pkgs/development/libraries/tidyp/default.nix
index c2a8ae0337ac..aa54616cf42a 100644
--- a/pkgs/development/libraries/tidyp/default.nix
+++ b/pkgs/development/libraries/tidyp/default.nix
@@ -15,6 +15,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A program that can validate your HTML, as well as modify it to be more clean and standard";
+    mainProgram = "tidyp";
     homepage = "http://tidyp.com/";
     platforms = platforms.all;
     maintainers = with maintainers; [ pSub ];
diff --git a/pkgs/development/libraries/tinycbor/default.nix b/pkgs/development/libraries/tinycbor/default.nix
index 4826c2b49c1f..9f9a060d74d8 100644
--- a/pkgs/development/libraries/tinycbor/default.nix
+++ b/pkgs/development/libraries/tinycbor/default.nix
@@ -15,6 +15,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Concise Binary Object Representation (CBOR) Library";
+    mainProgram = "cbordump";
     homepage = "https://github.com/intel/tinycbor";
     license = licenses.mit;
     maintainers = with maintainers; [ oxzi ];
diff --git a/pkgs/development/libraries/tinycdb/default.nix b/pkgs/development/libraries/tinycdb/default.nix
index 2d9cb53e7949..c13e97e968bf 100644
--- a/pkgs/development/libraries/tinycdb/default.nix
+++ b/pkgs/development/libraries/tinycdb/default.nix
@@ -41,6 +41,7 @@ in stdenv.mkDerivation rec {
   meta = with lib; {
 
     description = "utility to manipulate constant databases (cdb)";
+    mainProgram = "cdb";
 
     longDescription = ''
       tinycdb is a small, fast and reliable utility and subroutine
diff --git a/pkgs/development/libraries/tracker/default.nix b/pkgs/development/libraries/tracker/default.nix
index db9f7f1cfbf5..45c5eb10152c 100644
--- a/pkgs/development/libraries/tracker/default.nix
+++ b/pkgs/development/libraries/tracker/default.nix
@@ -173,6 +173,7 @@ stdenv.mkDerivation (finalAttrs: {
   meta = with lib; {
     homepage = "https://wiki.gnome.org/Projects/Tracker";
     description = "Desktop-neutral user information store, search tool and indexer";
+    mainProgram = "tracker3";
     maintainers = teams.gnome.members;
     license = licenses.gpl2Plus;
     platforms = platforms.unix;
diff --git a/pkgs/development/libraries/tsocks/default.nix b/pkgs/development/libraries/tsocks/default.nix
index a489f679c6ce..c12f9a44ac6d 100644
--- a/pkgs/development/libraries/tsocks/default.nix
+++ b/pkgs/development/libraries/tsocks/default.nix
@@ -27,6 +27,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Transparent SOCKS v4 proxying library";
+    mainProgram = "tsocks";
     homepage = "https://tsocks.sourceforge.net/";
     license = lib.licenses.gpl2;
     maintainers = with maintainers; [ edwtjo ];
diff --git a/pkgs/development/libraries/twolame/default.nix b/pkgs/development/libraries/twolame/default.nix
index 3537dd3029b6..e81e47e094aa 100644
--- a/pkgs/development/libraries/twolame/default.nix
+++ b/pkgs/development/libraries/twolame/default.nix
@@ -21,6 +21,7 @@ stdenv.mkDerivation {
 
   meta = with lib;{
     description = "A MP2 encoder";
+    mainProgram = "twolame";
     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
diff --git a/pkgs/development/libraries/ucc/default.nix b/pkgs/development/libraries/ucc/default.nix
index 68f358b3d3de..09e10565bb2e 100644
--- a/pkgs/development/libraries/ucc/default.nix
+++ b/pkgs/development/libraries/ucc/default.nix
@@ -58,6 +58,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Collective communication operations API";
+    mainProgram = "ucc_info";
     license = licenses.bsd3;
     maintainers = [ maintainers.markuskowa ];
     platforms = platforms.linux;
diff --git a/pkgs/development/libraries/uci/default.nix b/pkgs/development/libraries/uci/default.nix
index 43e6cb9d697d..55281e78ac74 100644
--- a/pkgs/development/libraries/uci/default.nix
+++ b/pkgs/development/libraries/uci/default.nix
@@ -17,6 +17,7 @@ stdenv.mkDerivation {
 
   meta = with lib; {
     description = "OpenWrt Unified Configuration Interface";
+    mainProgram = "uci";
     homepage = "https://git.openwrt.org/?p=project/uci.git;a=summary";
     license = licenses.lgpl21Only;
     platforms = platforms.all;
diff --git a/pkgs/development/libraries/ucx/default.nix b/pkgs/development/libraries/ucx/default.nix
index 3b923d8efdd2..8e0772479ccb 100644
--- a/pkgs/development/libraries/ucx/default.nix
+++ b/pkgs/development/libraries/ucx/default.nix
@@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
   ]
   ++ lib.optionals enableCuda [
     cudaPackages.cuda_nvcc
-    cudaPackages.autoAddOpenGLRunpathHook
+    cudaPackages.autoAddDriverRunpath
   ];
 
   buildInputs = [
diff --git a/pkgs/development/libraries/udns/default.nix b/pkgs/development/libraries/udns/default.nix
index 518ed432b723..27b60937752c 100644
--- a/pkgs/development/libraries/udns/default.nix
+++ b/pkgs/development/libraries/udns/default.nix
@@ -1,11 +1,11 @@
 { lib, stdenv, fetchurl }:
 
 # this expression is mostly based on debian's packaging
-# https://tracker.debian.org/media/packages/u/udns/rules-0.4-1
+# https://tracker.debian.org/media/packages/u/udns/rules-0.5-1
 
 stdenv.mkDerivation rec {
   pname = "udns";
-  version = "0.4";
+  version = "0.5";
 
   configurePhase = "./configure --enable-ipv6";
 
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "http://www.corpit.ru/mjt/udns/${pname}-${version}.tar.gz";
-    sha256 = "0447fv1hmb44nnchdn6p5pd9b44x8p5jn0ahw6crwbqsg7f0hl8i";
+    sha256 = "sha256-A1v8EuOBnQq6j0DugiCpdLfpspwyWdMQlwzEstHCA8A=";
   };
 
   # udns uses a very custom build and hardcodes a .so name in a few places.
diff --git a/pkgs/development/libraries/unixODBCDrivers/default.nix b/pkgs/development/libraries/unixODBCDrivers/default.nix
index 4d4d837e2e92..7e4a8b4f6cce 100644
--- a/pkgs/development/libraries/unixODBCDrivers/default.nix
+++ b/pkgs/development/libraries/unixODBCDrivers/default.nix
@@ -64,14 +64,6 @@
     buildInputs = [ unixODBC openssl libiconv zlib ]
       ++ lib.optionals stdenv.isDarwin [ libkrb5 ];
 
-    # TODO: remove preConfigure on staging
-    preConfigure = if !stdenv.isDarwin then ''
-      # we don't want to build a .pkg
-      substituteInPlace CMakeLists.txt \
-        --replace "IF(APPLE)" "IF(0)" \
-        --replace "CMAKE_SYSTEM_NAME MATCHES AIX" "APPLE"
-    '' else null;
-
     cmakeFlags = [
       "-DWITH_EXTERNAL_ZLIB=ON"
       "-DODBC_LIB_DIR=${lib.getLib unixODBC}/lib"
diff --git a/pkgs/development/libraries/usbredir/default.nix b/pkgs/development/libraries/usbredir/default.nix
index c7e8a361ee16..e4a8c7628bc8 100644
--- a/pkgs/development/libraries/usbredir/default.nix
+++ b/pkgs/development/libraries/usbredir/default.nix
@@ -45,6 +45,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "USB traffic redirection protocol";
+    mainProgram = "usbredirect";
     homepage = "https://www.spice-space.org/usbredir.html";
     license = licenses.lgpl21Plus;
     maintainers = with maintainers; [ offline ];
diff --git a/pkgs/development/libraries/ustr/default.nix b/pkgs/development/libraries/ustr/default.nix
index b0e4ab6c064e..598e5e7c76a1 100644
--- a/pkgs/development/libraries/ustr/default.nix
+++ b/pkgs/development/libraries/ustr/default.nix
@@ -35,6 +35,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "http://www.and.org/ustr/";
     description = "Micro String API for C language";
+    mainProgram = "ustr-import";
     license = licenses.bsd2;
     maintainers = [ ];
     platforms = platforms.linux;
diff --git a/pkgs/development/libraries/v8/default.nix b/pkgs/development/libraries/v8/default.nix
index 6d9758f75a40..37cc66834462 100644
--- a/pkgs/development/libraries/v8/default.nix
+++ b/pkgs/development/libraries/v8/default.nix
@@ -182,6 +182,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://v8.dev/";
     description = "Google's open source JavaScript engine";
+    mainProgram = "d8";
     maintainers = with maintainers; [ proglodyte matthewbauer ];
     platforms = platforms.unix;
     license = licenses.bsd3;
diff --git a/pkgs/development/libraries/vigra/default.nix b/pkgs/development/libraries/vigra/default.nix
index 677406d275a8..4e3aab9a5532 100644
--- a/pkgs/development/libraries/vigra/default.nix
+++ b/pkgs/development/libraries/vigra/default.nix
@@ -52,6 +52,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Novel computer vision C++ library with customizable algorithms and data structures";
+    mainProgram = "vigra-config";
     homepage = "https://hci.iwr.uni-heidelberg.de/vigra";
     license = licenses.mit;
     maintainers = [ maintainers.viric ];
diff --git a/pkgs/development/libraries/virglrenderer/default.nix b/pkgs/development/libraries/virglrenderer/default.nix
index fa67cbb7edd7..a20f26157ffc 100644
--- a/pkgs/development/libraries/virglrenderer/default.nix
+++ b/pkgs/development/libraries/virglrenderer/default.nix
@@ -26,6 +26,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A virtual 3D GPU library that allows a qemu guest to use the host GPU for accelerated 3D rendering";
+    mainProgram = "virgl_test_server";
     homepage = "https://virgil3d.github.io/";
     license = licenses.mit;
     platforms = platforms.linux;
diff --git a/pkgs/development/libraries/volume-key/default.nix b/pkgs/development/libraries/volume-key/default.nix
index 2c2774521762..e6aa378d01e5 100644
--- a/pkgs/development/libraries/volume-key/default.nix
+++ b/pkgs/development/libraries/volume-key/default.nix
@@ -40,6 +40,7 @@ stdenv.mkDerivation rec {
 
   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";
+    mainProgram = "volume_key";
     homepage = "https://pagure.io/volume_key/";
     license = licenses.gpl2;
     maintainers = with maintainers; [];
diff --git a/pkgs/development/libraries/vrb/default.nix b/pkgs/development/libraries/vrb/default.nix
index 1ebc37cdf2f3..b4a2f9a388f1 100644
--- a/pkgs/development/libraries/vrb/default.nix
+++ b/pkgs/development/libraries/vrb/default.nix
@@ -25,6 +25,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A virtual ring buffer library written in C";
+    mainProgram = "vbuf";
     license     = licenses.lgpl21;
     homepage    = "http://vrb.sourceforge.net/";
     maintainers = [ maintainers.bobvanderlinden ];
diff --git a/pkgs/development/libraries/waffle/default.nix b/pkgs/development/libraries/waffle/default.nix
index b24c8262794f..6867f9da410e 100644
--- a/pkgs/development/libraries/waffle/default.nix
+++ b/pkgs/development/libraries/waffle/default.nix
@@ -63,6 +63,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A cross-platform C library that allows one to defer selection of an OpenGL API and window system until runtime";
+    mainProgram = "wflinfo";
     homepage = "https://www.waffle-gl.org/";
     license = licenses.bsd2;
     platforms = platforms.mesaPlatforms;
diff --git a/pkgs/development/libraries/wavpack/default.nix b/pkgs/development/libraries/wavpack/default.nix
index bb0a43d24c0f..4cd3007043cf 100644
--- a/pkgs/development/libraries/wavpack/default.nix
+++ b/pkgs/development/libraries/wavpack/default.nix
@@ -2,7 +2,7 @@
 
 stdenv.mkDerivation rec {
   pname = "wavpack";
-  version = "5.6.0";
+  version = "5.7.0";
 
   enableParallelBuilding = true;
 
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
     owner = "dbry";
     repo = "WavPack";
     rev = version;
-    hash = "sha256-fWAGE87JTNTnYoxrkMf3I8C53kZrQiiBy3Zyg0cw8Og=";
+    hash = "sha256-vFZxg1mVqE7Kp38vEGA5V8m2tjqhssFsUZURixhlfk0=";
   };
 
   outputs = [ "out" "dev" "doc" "man" ];
diff --git a/pkgs/development/libraries/wayland/default.nix b/pkgs/development/libraries/wayland/default.nix
index b4e203f5ed26..8bc53de162f7 100644
--- a/pkgs/development/libraries/wayland/default.nix
+++ b/pkgs/development/libraries/wayland/default.nix
@@ -116,6 +116,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   meta = with lib; {
     description = "Core Wayland window system code and protocol";
+    mainProgram = "wayland-scanner";
     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.
diff --git a/pkgs/development/libraries/waylandpp/default.nix b/pkgs/development/libraries/waylandpp/default.nix
index 551712f89f5f..7eeeb2467edd 100644
--- a/pkgs/development/libraries/waylandpp/default.nix
+++ b/pkgs/development/libraries/waylandpp/default.nix
@@ -58,6 +58,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Wayland C++ binding";
+    mainProgram = "wayland-scanner++";
     homepage = "https://github.com/NilsBrause/waylandpp/";
     license = with lib.licenses; [ bsd2 hpnd ];
     maintainers = with lib.maintainers; [ minijackson ];
diff --git a/pkgs/development/libraries/webkitgtk/default.nix b/pkgs/development/libraries/webkitgtk/default.nix
index 58f0f190ae27..7ca5ffc19020 100644
--- a/pkgs/development/libraries/webkitgtk/default.nix
+++ b/pkgs/development/libraries/webkitgtk/default.nix
@@ -235,6 +235,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   meta = with lib; {
     description = "Web content rendering engine, GTK port";
+    mainProgram = "WebKitWebDriver";
     homepage = "https://webkitgtk.org/";
     license = licenses.bsd2;
     pkgConfigModules = [
diff --git a/pkgs/development/libraries/webrtc-audio-processing/default.nix b/pkgs/development/libraries/webrtc-audio-processing/default.nix
index 1b847528550e..7e9fe3fa4a39 100644
--- a/pkgs/development/libraries/webrtc-audio-processing/default.nix
+++ b/pkgs/development/libraries/webrtc-audio-processing/default.nix
@@ -44,12 +44,18 @@ stdenv.mkDerivation rec {
 
   buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ ApplicationServices Foundation ]);
 
+  env = lib.optionalAttrs stdenv.isx86_32 {
+    # https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/issues/5
+    NIX_CFLAGS_COMPILE = "-msse2";
+  };
+
   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);
+    platforms = platforms.unix;
+    # BE platforms are unsupported
+    # https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/issues/31
+    badPlatforms = platforms.bigEndian;
   };
 }
diff --git a/pkgs/development/libraries/wiiuse/default.nix b/pkgs/development/libraries/wiiuse/default.nix
index d5d34fb618d6..b3fe94349453 100644
--- a/pkgs/development/libraries/wiiuse/default.nix
+++ b/pkgs/development/libraries/wiiuse/default.nix
@@ -30,6 +30,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Feature complete cross-platform Wii Remote access library";
+    mainProgram = "wiiuseexample";
     license = licenses.gpl3Plus;
     homepage = "https://github.com/wiiuse/wiiuse";
     maintainers = with maintainers; [ shamilton ];
diff --git a/pkgs/development/libraries/wildmidi/default.nix b/pkgs/development/libraries/wildmidi/default.nix
index 23dc8dc3b053..c09ee248d211 100644
--- a/pkgs/development/libraries/wildmidi/default.nix
+++ b/pkgs/development/libraries/wildmidi/default.nix
@@ -48,6 +48,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Software MIDI player and library";
+    mainProgram = "wildmidi";
     longDescription = ''
       WildMIDI is a simple software midi player which has a core softsynth
       library that can be use with other applications.
diff --git a/pkgs/development/libraries/wiredtiger/default.nix b/pkgs/development/libraries/wiredtiger/default.nix
index 28f66b8d31cf..a87afd7ee09f 100644
--- a/pkgs/development/libraries/wiredtiger/default.nix
+++ b/pkgs/development/libraries/wiredtiger/default.nix
@@ -53,6 +53,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "http://wiredtiger.com/";
     description = "";
+    mainProgram = "wt";
     license = licenses.gpl2;
     platforms = intersectLists platforms.unix platforms.x86_64;
   };
diff --git a/pkgs/development/libraries/wolfssl/default.nix b/pkgs/development/libraries/wolfssl/default.nix
index 60a6e10c8334..76a07212c785 100644
--- a/pkgs/development/libraries/wolfssl/default.nix
+++ b/pkgs/development/libraries/wolfssl/default.nix
@@ -14,13 +14,13 @@
 }:
 stdenv.mkDerivation (finalAttrs: {
   pname = "wolfssl-${variant}";
-  version = "5.6.6";
+  version = "5.7.0";
 
   src = fetchFromGitHub {
     owner = "wolfSSL";
     repo = "wolfssl";
     rev = "refs/tags/v${finalAttrs.version}-stable";
-    hash = "sha256-HXl8GgngC1J8Dlt7fXBrVRa+IV7thVr+MIpeuf3Khcg=";
+    hash = "sha256-4j1GqeZJn5UWx56DjGjge05jlzBbIGn4IXxcaIBxON4=";
   };
 
   postPatch = ''
@@ -97,6 +97,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   meta = with lib; {
     description = "A small, fast, portable implementation of TLS/SSL for embedded devices";
+    mainProgram = "wolfssl-config";
     homepage = "https://www.wolfssl.com/";
     changelog = "https://github.com/wolfSSL/wolfssl/releases/tag/v${finalAttrs.version}-stable";
     platforms = platforms.all;
diff --git a/pkgs/development/libraries/wxSVG/default.nix b/pkgs/development/libraries/wxSVG/default.nix
index 0119a2c03776..8519cbaacc24 100644
--- a/pkgs/development/libraries/wxSVG/default.nix
+++ b/pkgs/development/libraries/wxSVG/default.nix
@@ -47,6 +47,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://wxsvg.sourceforge.net/";
     description = "A SVG manipulation library built with wxWidgets";
+    mainProgram = "svgview";
     longDescription = ''
       wxSVG is C++ library to create, manipulate and render Scalable Vector
       Graphics (SVG) files with the wxWidgets toolkit.
diff --git a/pkgs/development/libraries/wxsqliteplus/default.nix b/pkgs/development/libraries/wxsqliteplus/default.nix
index 7ae728d90552..3bb7729f7db0 100644
--- a/pkgs/development/libraries/wxsqliteplus/default.nix
+++ b/pkgs/development/libraries/wxsqliteplus/default.nix
@@ -38,6 +38,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "A simple SQLite database browser built with wxWidgets";
+    mainProgram = "wxsqliteplus";
     homepage = "https://github.com/guanlisheng/wxsqliteplus";
     license = licenses.gpl3Plus;
     maintainers = [ maintainers.vrthra ];
diff --git a/pkgs/development/libraries/x264/default.nix b/pkgs/development/libraries/x264/default.nix
index a011cf9c2000..f857b2a0b89e 100644
--- a/pkgs/development/libraries/x264/default.nix
+++ b/pkgs/development/libraries/x264/default.nix
@@ -57,6 +57,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Library for encoding H264/AVC video streams";
+    mainProgram = "x264";
     homepage = "http://www.videolan.org/developers/x264.html";
     license = licenses.gpl2Plus;
     platforms = platforms.unix ++ platforms.windows;
diff --git a/pkgs/development/libraries/x265/default.nix b/pkgs/development/libraries/x265/default.nix
index 1fc5f3129c0e..7f44834d4867 100644
--- a/pkgs/development/libraries/x265/default.nix
+++ b/pkgs/development/libraries/x265/default.nix
@@ -147,6 +147,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Library for encoding H.265/HEVC video streams";
+    mainProgram = "x265";
     homepage = "https://www.x265.org/";
     changelog = "https://x265.readthedocs.io/en/master/releasenotes.html#version-${lib.strings.replaceStrings ["."] ["-"] version}";
     license = licenses.gpl2Plus;
diff --git a/pkgs/development/libraries/xalanc/default.nix b/pkgs/development/libraries/xalanc/default.nix
index 2b5f2379fde7..707f819f1329 100644
--- a/pkgs/development/libraries/xalanc/default.nix
+++ b/pkgs/development/libraries/xalanc/default.nix
@@ -17,6 +17,7 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "https://xalan.apache.org/";
     description = "A XSLT processor for transforming XML documents";
+    mainProgram = "Xalan";
     license = lib.licenses.asl20;
     platforms = lib.platforms.linux ++ lib.platforms.darwin;
     maintainers = [ lib.maintainers.jagajaga ];
diff --git a/pkgs/development/libraries/xapian/default.nix b/pkgs/development/libraries/xapian/default.nix
index f9fe5bac07fe..7a06951f8422 100644
--- a/pkgs/development/libraries/xapian/default.nix
+++ b/pkgs/development/libraries/xapian/default.nix
@@ -59,5 +59,5 @@ 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=";
+  xapian_1_4 = generic "1.4.25" "sha256-DJnf3YF1cctWibxBKn4CFAeTgxPzjqOnD6O/hkEGCO4=";
 }
diff --git a/pkgs/development/libraries/xapian/tools/omega/default.nix b/pkgs/development/libraries/xapian/tools/omega/default.nix
index cba74b977de7..e8c238a24b11 100644
--- a/pkgs/development/libraries/xapian/tools/omega/default.nix
+++ b/pkgs/development/libraries/xapian/tools/omega/default.nix
@@ -6,7 +6,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "https://oligarchy.co.uk/xapian/${version}/xapian-omega-${version}.tar.xz";
-    hash = "sha256-0IdW5PM7GJFsyKJJPTEfHL647UNXvUD6XBdErcCA6/8=";
+    hash = "sha256-L8C1BeYG1eHc3h8iNitvAjfZ6Ef8m2r1OPmbyavR/Ms=";
   };
 
   buildInputs = [ xapian perl pcre2 zlib libmagic ];
diff --git a/pkgs/development/libraries/xavs/default.nix b/pkgs/development/libraries/xavs/default.nix
index 25dd7fdad7ef..2d0960e3ff52 100644
--- a/pkgs/development/libraries/xavs/default.nix
+++ b/pkgs/development/libraries/xavs/default.nix
@@ -40,6 +40,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "AVS encoder and decoder";
+    mainProgram = "xavs";
     homepage    = "https://xavs.sourceforge.net/";
     license     = licenses.lgpl2;
     platforms   = platforms.linux ++ platforms.darwin;
diff --git a/pkgs/development/libraries/xgboost/default.nix b/pkgs/development/libraries/xgboost/default.nix
index b700dd2581c4..67190d7cac76 100644
--- a/pkgs/development/libraries/xgboost/default.nix
+++ b/pkgs/development/libraries/xgboost/default.nix
@@ -57,7 +57,7 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ cmake ]
     ++ lib.optionals stdenv.isDarwin [ llvmPackages.openmp ]
-    ++ lib.optionals cudaSupport [ cudaPackages.autoAddOpenGLRunpathHook ]
+    ++ lib.optionals cudaSupport [ cudaPackages.autoAddDriverRunpath ]
     ++ lib.optionals rLibrary [ R ];
 
   buildInputs = [ gtest ] ++ lib.optional cudaSupport cudaPackages.cudatoolkit
diff --git a/pkgs/development/libraries/xsd/default.nix b/pkgs/development/libraries/xsd/default.nix
index 2d614ee0e731..8096b2edd295 100644
--- a/pkgs/development/libraries/xsd/default.nix
+++ b/pkgs/development/libraries/xsd/default.nix
@@ -32,6 +32,7 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "http://www.codesynthesis.com/products/xsd";
     description = "An open-source, cross-platform W3C XML Schema to C++ data binding compiler";
+    mainProgram = "xsd";
     license = lib.licenses.gpl2;
     platforms = lib.platforms.linux;
     maintainers = [ lib.maintainers.jagajaga ];
diff --git a/pkgs/development/libraries/yubico-pam/default.nix b/pkgs/development/libraries/yubico-pam/default.nix
index e417de5e1ff0..bcd6a245bb4f 100644
--- a/pkgs/development/libraries/yubico-pam/default.nix
+++ b/pkgs/development/libraries/yubico-pam/default.nix
@@ -10,6 +10,8 @@
 , yubikey-personalization
 , libyubikey
 , libykclient
+, CoreServices
+, SystemConfiguration
 }:
 
 stdenv.mkDerivation rec {
@@ -23,10 +25,12 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ autoreconfHook pkg-config asciidoc libxslt docbook_xsl ];
-  buildInputs = [ pam yubikey-personalization libyubikey libykclient ];
+  buildInputs = [ pam yubikey-personalization libyubikey libykclient ]
+    ++ lib.optionals stdenv.isDarwin [ CoreServices SystemConfiguration ];
 
   meta = with lib; {
     description = "Yubico PAM module";
+    mainProgram = "ykpamcfg";
     homepage = "https://developers.yubico.com/yubico-pam";
     license = licenses.bsd2;
     maintainers = with maintainers; [ dtzWill ];
diff --git a/pkgs/development/libraries/yyjson/default.nix b/pkgs/development/libraries/yyjson/default.nix
index b0e17fffad2a..86a286ef2e2d 100644
--- a/pkgs/development/libraries/yyjson/default.nix
+++ b/pkgs/development/libraries/yyjson/default.nix
@@ -19,11 +19,11 @@ stdenv.mkDerivation (finalAttrs: {
     cmake
   ];
 
-  meta = with lib; {
+  meta = {
     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; [ ];
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ federicoschonborn ];
   };
 })
diff --git a/pkgs/development/libraries/zookeeper_mt/default.nix b/pkgs/development/libraries/zookeeper_mt/default.nix
index ce539d9eb1c0..0d95e8f34b71 100644
--- a/pkgs/development/libraries/zookeeper_mt/default.nix
+++ b/pkgs/development/libraries/zookeeper_mt/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "mirror://apache/zookeeper/${zookeeper.pname}-${version}/apache-${zookeeper.pname}-${version}.tar.gz";
-    hash = "sha512-V1SFPtSytFZMyiR/cgwLA9zPUK5xuarP3leQCQiSfelUHnYMB+R6ZQfSHMHD9t+URvLc+KRFSriLTzethspkpA==";
+    hash = "sha512-G6Yw9HBF43QCw8FTLnJ7boCjUYwaQVQAT4wXqUowSlzox1cUPH5+8ZYMBxToJCbr0ppmz22t0uKsHRUI/IDAPQ==";
   };
 
   sourceRoot = "apache-${zookeeper.pname}-${version}/zookeeper-client/zookeeper-client-c";