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/SDL2/default.nix4
-rw-r--r--pkgs/development/libraries/SDL_compat/default.nix3
-rw-r--r--pkgs/development/libraries/assimp/default.nix4
-rw-r--r--pkgs/development/libraries/aubio/default.nix4
-rw-r--r--pkgs/development/libraries/audio/libopenmpt/default.nix4
-rw-r--r--pkgs/development/libraries/audio/suil/default.nix68
-rw-r--r--pkgs/development/libraries/box2d/default.nix4
-rw-r--r--pkgs/development/libraries/bullet/default.nix4
-rw-r--r--pkgs/development/libraries/bullet/roboschool-fork.nix4
-rw-r--r--pkgs/development/libraries/chipmunk/default.nix4
-rw-r--r--pkgs/development/libraries/ctypes_sh/default.nix2
-rw-r--r--pkgs/development/libraries/discord-rpc/default.nix2
-rw-r--r--pkgs/development/libraries/enchant/2.x.nix26
-rw-r--r--pkgs/development/libraries/fcgi/default.nix25
-rw-r--r--pkgs/development/libraries/fcgi/gcc-4.4.diff12
-rw-r--r--pkgs/development/libraries/ffmpeg/5.1.4-CVE-2023-49502.patch26
-rw-r--r--pkgs/development/libraries/ffmpeg/default.nix1
-rw-r--r--pkgs/development/libraries/ffmpeg/generic.nix116
-rw-r--r--pkgs/development/libraries/ffms/default.nix2
-rw-r--r--pkgs/development/libraries/flite/default.nix51
-rw-r--r--pkgs/development/libraries/fox/default.nix7
-rw-r--r--pkgs/development/libraries/freeglut/default.nix8
-rw-r--r--pkgs/development/libraries/freenect/default.nix4
-rw-r--r--pkgs/development/libraries/freetds/default.nix4
-rw-r--r--pkgs/development/libraries/fribidi/default.nix4
-rw-r--r--pkgs/development/libraries/ftgl/default.nix4
-rw-r--r--pkgs/development/libraries/gdal/default.nix13
-rw-r--r--pkgs/development/libraries/gexiv2/default.nix4
-rw-r--r--pkgs/development/libraries/gl2ps/default.nix4
-rw-r--r--pkgs/development/libraries/gle/default.nix4
-rw-r--r--pkgs/development/libraries/glfw/3.x.nix6
-rw-r--r--pkgs/development/libraries/glib/default.nix28
-rw-r--r--pkgs/development/libraries/glib/gdb_script.patch23
-rw-r--r--pkgs/development/libraries/glib/gmodule-rtld_local.patch13
-rw-r--r--pkgs/development/libraries/glm/default.nix47
-rw-r--r--pkgs/development/libraries/glui/default.nix4
-rw-r--r--pkgs/development/libraries/gnome-online-accounts/default.nix4
-rw-r--r--pkgs/development/libraries/gobject-introspection/default.nix1
-rw-r--r--pkgs/development/libraries/gstreamer/good/default.nix2
-rw-r--r--pkgs/development/libraries/gstreamer/good/souploader-darwin.diff128
-rw-r--r--pkgs/development/libraries/gstreamer/good/souploader.diff13
-rw-r--r--pkgs/development/libraries/hamlib/4.nix6
-rw-r--r--pkgs/development/libraries/hamlib/default.nix6
-rw-r--r--pkgs/development/libraries/hwloc/default.nix4
-rw-r--r--pkgs/development/libraries/icu/default.nix4
-rw-r--r--pkgs/development/libraries/icu/make-icu.nix10
-rw-r--r--pkgs/development/libraries/intel-gmmlib/default.nix4
-rw-r--r--pkgs/development/libraries/irrlichtmt/default.nix9
-rw-r--r--pkgs/development/libraries/java/hsqldb/default.nix4
-rw-r--r--pkgs/development/libraries/java/lombok/default.nix4
-rw-r--r--pkgs/development/libraries/l-smash/default.nix2
-rw-r--r--pkgs/development/libraries/libass/default.nix4
-rw-r--r--pkgs/development/libraries/libdc1394/default.nix5
-rw-r--r--pkgs/development/libraries/libdrm/default.nix4
-rw-r--r--pkgs/development/libraries/libeatmydata/LFS64.patch70
-rw-r--r--pkgs/development/libraries/libeatmydata/default.nix5
-rw-r--r--pkgs/development/libraries/libevent/default.nix4
-rw-r--r--pkgs/development/libraries/libftdi/1.x.nix6
-rw-r--r--pkgs/development/libraries/libhwy/default.nix6
-rw-r--r--pkgs/development/libraries/libimobiledevice-glue/default.nix17
-rw-r--r--pkgs/development/libraries/libimobiledevice/default.nix34
-rw-r--r--pkgs/development/libraries/libinput/default.nix4
-rw-r--r--pkgs/development/libraries/liblouis/default.nix7
-rw-r--r--pkgs/development/libraries/libpeas/2.x.nix4
-rw-r--r--pkgs/development/libraries/libplacebo/default.nix2
-rw-r--r--pkgs/development/libraries/libsurvive/default.nix4
-rw-r--r--pkgs/development/libraries/libtiff/default.nix10
-rw-r--r--pkgs/development/libraries/libtorrent-rasterbar/default.nix7
-rw-r--r--pkgs/development/libraries/libtorrent-rasterbar/distutils.patch20
-rw-r--r--pkgs/development/libraries/libunistring/default.nix3
-rw-r--r--pkgs/development/libraries/liburing/default.nix60
-rw-r--r--pkgs/development/libraries/libva/1.nix2
-rw-r--r--pkgs/development/libraries/libva/default.nix4
-rw-r--r--pkgs/development/libraries/libvdpau/default.nix3
-rw-r--r--pkgs/development/libraries/libvpx/default.nix13
-rw-r--r--pkgs/development/libraries/libwacom/default.nix9
-rw-r--r--pkgs/development/libraries/libwacom/surface.nix4
-rw-r--r--pkgs/development/libraries/libwebp/default.nix4
-rw-r--r--pkgs/development/libraries/libxkbcommon/default.nix4
-rw-r--r--pkgs/development/libraries/libxslt/default.nix12
-rw-r--r--pkgs/development/libraries/mesa-glu/default.nix7
-rw-r--r--pkgs/development/libraries/mesa/common.nix31
-rw-r--r--pkgs/development/libraries/mesa/darwin.nix53
-rw-r--r--pkgs/development/libraries/mesa/darwin.patch17
-rw-r--r--pkgs/development/libraries/mesa/default.nix337
-rw-r--r--pkgs/development/libraries/mesa/llvmpipe-hook.sh14
-rw-r--r--pkgs/development/libraries/mesa/stubs.nix88
-rw-r--r--pkgs/development/libraries/meshoptimizer/default.nix4
-rw-r--r--pkgs/development/libraries/mlt/default.nix5
-rw-r--r--pkgs/development/libraries/nettle/default.nix4
-rw-r--r--pkgs/development/libraries/nuspell/default.nix4
-rw-r--r--pkgs/development/libraries/nv-codec-headers/default.nix32
-rw-r--r--pkgs/development/libraries/nv-codec-headers/make-nv-codec-headers.nix32
-rw-r--r--pkgs/development/libraries/ogre/default.nix4
-rw-r--r--pkgs/development/libraries/opencolorio/default.nix17
-rw-r--r--pkgs/development/libraries/opencsg/default.nix4
-rw-r--r--pkgs/development/libraries/openssl/default.nix12
-rw-r--r--pkgs/development/libraries/partio/default.nix4
-rw-r--r--pkgs/development/libraries/pcre2/default.nix16
-rw-r--r--pkgs/development/libraries/physics/geant4/default.nix8
-rw-r--r--pkgs/development/libraries/pipewire/default.nix5
-rw-r--r--pkgs/development/libraries/plib/default.nix4
-rw-r--r--pkgs/development/libraries/py3c/default.nix4
-rw-r--r--pkgs/development/libraries/qpdf/default.nix4
-rw-r--r--pkgs/development/libraries/qt-5/5.15/default.nix8
-rw-r--r--pkgs/development/libraries/qt-5/5.15/srcs-generated.json4
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtbase.nix4
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtwebengine.nix16
-rw-r--r--pkgs/development/libraries/re2/default.nix89
-rw-r--r--pkgs/development/libraries/rocksdb/default.nix10
-rw-r--r--pkgs/development/libraries/rocksdb/fix-findliburing.patch29
-rw-r--r--pkgs/development/libraries/science/astronomy/stellarsolver/default.nix4
-rw-r--r--pkgs/development/libraries/science/biology/bicgl/default.nix6
-rw-r--r--pkgs/development/libraries/science/biology/mirtk/default.nix2
-rw-r--r--pkgs/development/libraries/science/math/clblast/default.nix4
-rw-r--r--pkgs/development/libraries/science/math/openblas/default.nix4
-rw-r--r--pkgs/development/libraries/simdjson/default.nix4
-rw-r--r--pkgs/development/libraries/simgear/default.nix4
-rw-r--r--pkgs/development/libraries/snappy/default.nix4
-rw-r--r--pkgs/development/libraries/spdlog/default.nix4
-rw-r--r--pkgs/development/libraries/thrift/default.nix7
-rw-r--r--pkgs/development/libraries/vapoursynth/default.nix2
-rw-r--r--pkgs/development/libraries/vapoursynth/editor.nix2
-rw-r--r--pkgs/development/libraries/wolfssl/default.nix3
-rw-r--r--pkgs/development/libraries/x264/default.nix2
-rw-r--r--pkgs/development/libraries/xsimd/default.nix54
-rw-r--r--pkgs/development/libraries/xsimd/disable-test_error_gamma.patch30
-rw-r--r--pkgs/development/libraries/zlib-ng/default.nix4
128 files changed, 1093 insertions, 992 deletions
diff --git a/pkgs/development/libraries/SDL2/default.nix b/pkgs/development/libraries/SDL2/default.nix
index 91903c9f68516..816afa176754d 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.3";
+  version = "2.30.4";
 
   src = fetchFromGitHub {
     owner = "libsdl-org";
     repo = "SDL";
     rev = "release-${finalAttrs.version}";
-    hash = "sha256-ycY/AkWulV3vAu/+vKw+j/b6jTZWjqKjIgjRwqNHFl8=";
+    hash = "sha256-RhqbmS+mPVlXlo4/jrqPqtyGzvfaPTozlUEeAjHUBoA=";
   };
   dontDisableStatic = if withStatic then 1 else 0;
   outputs = [ "out" "dev" ];
diff --git a/pkgs/development/libraries/SDL_compat/default.nix b/pkgs/development/libraries/SDL_compat/default.nix
index 3c3df10f91672..8b0cd67f79c40 100644
--- a/pkgs/development/libraries/SDL_compat/default.nix
+++ b/pkgs/development/libraries/SDL_compat/default.nix
@@ -9,7 +9,6 @@
 , autoSignDarwinBinariesHook
 , libGLSupported ? lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms
 , openglSupport ? libGLSupported
-, libGL
 , libGLU
 }:
 
@@ -33,7 +32,7 @@ stdenv.mkDerivation rec {
 
   propagatedBuildInputs = [ SDL2 ]
     ++ optionals stdenv.hostPlatform.isDarwin [ libiconv Cocoa ]
-    ++ optionals openglSupport [ libGL libGLU ];
+    ++ optionals openglSupport [ libGLU ];
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/development/libraries/assimp/default.nix b/pkgs/development/libraries/assimp/default.nix
index 87df1e7f6aec1..53051eb2a3100 100644
--- a/pkgs/development/libraries/assimp/default.nix
+++ b/pkgs/development/libraries/assimp/default.nix
@@ -8,14 +8,14 @@
 
 stdenv.mkDerivation rec {
   pname = "assimp";
-  version = "5.4.1";
+  version = "5.4.2";
   outputs = [ "out" "lib" "dev" ];
 
   src = fetchFromGitHub {
     owner = "assimp";
     repo = "assimp";
     rev = "v${version}";
-    hash = "sha256-F3aaEaHZyOLES6zOYqHRG0BtaKk9d/bAHCtal6FsIWc=";
+    hash = "sha256-4KpqH3rSNSTAXMFPWAvGTZA4jzKIChHFdtW97sK2EyY=";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/pkgs/development/libraries/aubio/default.nix b/pkgs/development/libraries/aubio/default.nix
index 6702eb91c9b17..a3e4a120e9ad7 100644
--- a/pkgs/development/libraries/aubio/default.nix
+++ b/pkgs/development/libraries/aubio/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchurl, alsa-lib, fftw, libjack2, libsamplerate
-, libsndfile, pkg-config, python3, wafHook
+, libsndfile, pkg-config, python311, wafHook
 }:
 
 stdenv.mkDerivation rec {
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
     sha256 = "1npks71ljc48w6858l9bq30kaf5nph8z0v61jkfb70xb9np850nl";
   };
 
-  nativeBuildInputs = [ pkg-config python3 wafHook ];
+  nativeBuildInputs = [ pkg-config python311 wafHook ];
   buildInputs = [ alsa-lib fftw libjack2 libsamplerate libsndfile ];
 
   strictDeps = true;
diff --git a/pkgs/development/libraries/audio/libopenmpt/default.nix b/pkgs/development/libraries/audio/libopenmpt/default.nix
index 0f4c3509244d8..8e32ae89502b8 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.7";
+  version = "0.7.8";
 
   outputs = [ "out" "dev" "bin" ];
 
   src = fetchurl {
     url = "https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-${version}+release.autotools.tar.gz";
-    hash = "sha256-WMaiiXISaCim9ljghK7nqo+L/bdaC9DjRcf/Km2e8Iw=";
+    hash = "sha256-h3eMgEaiJsbL+xFPTI4+J8Eht7PczOXLfeRYmSUCdMw=";
   };
 
   enableParallelBuilding = true;
diff --git a/pkgs/development/libraries/audio/suil/default.nix b/pkgs/development/libraries/audio/suil/default.nix
index 6214b65189d37..df63737474ebd 100644
--- a/pkgs/development/libraries/audio/suil/default.nix
+++ b/pkgs/development/libraries/audio/suil/default.nix
@@ -1,20 +1,68 @@
-{ stdenv, lib, fetchurl, gtk2, lv2, pkg-config, python3, serd, sord, sratom
-, wafHook
-, withQt5 ? true, qt5 ? null
+{
+  stdenv,
+  lib,
+  fetchFromGitLab,
+
+  # build time
+  pkg-config,
+  meson,
+  ninja,
+
+  # runtime
+  lv2,
+
+  # options
+  withGtk2 ? false,
+  gtk2,
+  withGtk3 ? true,
+  gtk3,
+  withQt5 ? true,
+  qt5,
+  withX11 ? !stdenv.isDarwin,
 }:
 
+let
+  inherit (lib) mesonEnable;
+in
+
 stdenv.mkDerivation rec {
   pname = "suil";
-  version = "0.10.6";
+  version = "0.10.20";
 
-  src = fetchurl {
-    url = "https://download.drobilla.net/${pname}-${version}.tar.bz2";
-    sha256 = "0z4v01pjw4wh65x38w6icn28wdwxz13ayl8hvn4p1g9kmamp1z06";
+  src = fetchFromGitLab {
+    owner = "lv2";
+    repo = "suil";
+    rev = "v${version}";
+    hash = "sha256-rP8tq+zmHrAZeuNttakPPfraFXNvnwqbhtt+LtTNV/k=";
   };
 
-  nativeBuildInputs = [ pkg-config wafHook python3 ];
-  buildInputs = [ gtk2 lv2 serd sord sratom ]
-    ++ lib.optionals withQt5 (with qt5; [ qtbase qttools ]);
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+  ];
+
+  mesonFlags = [
+    # docs require sphinxygen
+    (mesonEnable "docs" false)
+    (mesonEnable "gtk2" withGtk2)
+    (mesonEnable "gtk3" withGtk3)
+    (mesonEnable "qt5" withQt5)
+    (mesonEnable "x11" withX11)
+  ];
+
+  buildInputs =
+    [ lv2 ]
+    ++ lib.optionals withGtk2 [ gtk2 ]
+    ++ lib.optionals withGtk3 [ gtk3 ]
+    ++ lib.optionals withQt5 (
+      with qt5;
+      [
+        qtbase
+        qttools
+      ]
+      ++ lib.optionals withX11 [ qtx11extras ]
+    );
 
   dontWrapQtApps = true;
 
diff --git a/pkgs/development/libraries/box2d/default.nix b/pkgs/development/libraries/box2d/default.nix
index c2611a8b8dffb..2008cab52ac36 100644
--- a/pkgs/development/libraries/box2d/default.nix
+++ b/pkgs/development/libraries/box2d/default.nix
@@ -4,7 +4,7 @@
 , cmake
 , libGLU
 , libGL
-, freeglut
+, libglut
 , libX11
 , libXcursor
 , libXinerama
@@ -39,7 +39,7 @@ stdenv.mkDerivation (finalAttrs: {
   buildInputs = [
     libGLU
     libGL
-    freeglut
+    libglut
     libX11
     libXcursor
     libXinerama
diff --git a/pkgs/development/libraries/bullet/default.nix b/pkgs/development/libraries/bullet/default.nix
index dc0e1d304eea4..5ba9186dcac9f 100644
--- a/pkgs/development/libraries/bullet/default.nix
+++ b/pkgs/development/libraries/bullet/default.nix
@@ -4,7 +4,7 @@
 , cmake
 , libGLU
 , libGL
-, freeglut
+, libglut
 , Cocoa
 , OpenGL
 }:
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ cmake ];
-  buildInputs = lib.optionals stdenv.isLinux [ libGLU libGL freeglut ]
+  buildInputs = lib.optionals stdenv.isLinux [ libGLU libGL libglut ]
     ++ lib.optionals stdenv.isDarwin [ Cocoa OpenGL ];
 
   postPatch = ''
diff --git a/pkgs/development/libraries/bullet/roboschool-fork.nix b/pkgs/development/libraries/bullet/roboschool-fork.nix
index 7d601e8570014..c5f6f3a436d24 100644
--- a/pkgs/development/libraries/bullet/roboschool-fork.nix
+++ b/pkgs/development/libraries/bullet/roboschool-fork.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, cmake, libGLU, libGL, freeglut
+{ lib, stdenv, fetchFromGitHub, cmake, libGLU, libGL, libglut
 , Cocoa,  OpenGL
 }:
 
@@ -18,7 +18,7 @@ stdenv.mkDerivation {
   };
 
   nativeBuildInputs = [ cmake ];
-  buildInputs = lib.optionals stdenv.isLinux [ libGLU libGL freeglut ]
+  buildInputs = lib.optionals stdenv.isLinux [ libGLU libGL libglut ]
     ++ lib.optionals stdenv.isDarwin [ Cocoa OpenGL ];
 
   patches = [ ./gwen-narrowing.patch ];
diff --git a/pkgs/development/libraries/chipmunk/default.nix b/pkgs/development/libraries/chipmunk/default.nix
index 1cb32dc8ee4b6..a0b34f0aa30f8 100644
--- a/pkgs/development/libraries/chipmunk/default.nix
+++ b/pkgs/development/libraries/chipmunk/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, cmake, freeglut, libGLU, libGL, glfw2, glew, libX11, xorgproto
+{ lib, stdenv, fetchurl, cmake, libglut, libGLU, libGL, glfw2, glew, libX11, xorgproto
 , libXi, libXmu, fetchpatch, libXrandr
 }:
 
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ cmake ];
   buildInputs =
-    [ freeglut libGLU libGL glfw2 glew libX11 xorgproto libXi libXmu libXrandr ];
+    [ libglut libGLU libGL glfw2 glew libX11 xorgproto libXi libXmu libXrandr ];
 
   postInstall = ''
     mkdir -p $out/bin
diff --git a/pkgs/development/libraries/ctypes_sh/default.nix b/pkgs/development/libraries/ctypes_sh/default.nix
index 56b463087f3d3..f3c78567efc16 100644
--- a/pkgs/development/libraries/ctypes_sh/default.nix
+++ b/pkgs/development/libraries/ctypes_sh/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
     mainProgram = "ctypes.sh";
     homepage = "https://github.com/taviso/ctypes.sh";
     license = licenses.mit;
-    maintainers = with maintainers; [ tadeokondrak ];
+    maintainers = with maintainers; [ ];
     platforms = platforms.unix;
   };
 }
diff --git a/pkgs/development/libraries/discord-rpc/default.nix b/pkgs/development/libraries/discord-rpc/default.nix
index 213096f5abf12..4fa74b57404c2 100644
--- a/pkgs/development/libraries/discord-rpc/default.nix
+++ b/pkgs/development/libraries/discord-rpc/default.nix
@@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
     description = "Official library to interface with the Discord client";
     homepage = "https://github.com/discordapp/discord-rpc";
     license = licenses.mit;
-    maintainers = with maintainers; [ tadeokondrak ];
+    maintainers = with maintainers; [ ];
     platforms = platforms.all;
   };
 }
diff --git a/pkgs/development/libraries/enchant/2.x.nix b/pkgs/development/libraries/enchant/2.x.nix
index 2fa7aec062f36..69cab2ca5b61c 100644
--- a/pkgs/development/libraries/enchant/2.x.nix
+++ b/pkgs/development/libraries/enchant/2.x.nix
@@ -9,8 +9,18 @@
 , hspell
 , nuspell
 , unittest-cpp
+
+, withHspell ? true
+, withAspell ? true
+, withHunspell ? true
+, withNuspell ? true
+, withAppleSpell ? stdenv.isDarwin
+
+, Cocoa
 }:
 
+assert withAppleSpell -> stdenv.isDarwin;
+
 stdenv.mkDerivation rec {
   pname = "enchant";
   version = "2.6.9";
@@ -31,8 +41,12 @@ stdenv.mkDerivation rec {
 
   buildInputs = [
     glib
+  ] ++ lib.optionals withHunspell [
     hunspell
+  ] ++ lib.optionals withNuspell [
     nuspell
+  ] ++ lib.optionals withAppleSpell [
+    Cocoa
   ];
 
   checkInputs = [
@@ -40,8 +54,9 @@ stdenv.mkDerivation rec {
   ];
 
   # libtool puts these to .la files
-  propagatedBuildInputs = [
+  propagatedBuildInputs = lib.optionals withHspell [
     hspell
+  ] ++ lib.optionals withAspell [
     aspell
   ];
 
@@ -51,10 +66,11 @@ stdenv.mkDerivation rec {
 
   configureFlags = [
     "--enable-relocatable" # needed for tests
-    "--with-aspell"
-    "--with-hspell"
-    "--with-hunspell"
-    "--with-nuspell"
+    (lib.withFeature withAspell "aspell")
+    (lib.withFeature withHspell "hspell")
+    (lib.withFeature withHunspell "hunspell")
+    (lib.withFeature withNuspell "nuspell")
+    (lib.withFeature withAppleSpell "applespell")
   ];
 
   meta = with lib; {
diff --git a/pkgs/development/libraries/fcgi/default.nix b/pkgs/development/libraries/fcgi/default.nix
deleted file mode 100644
index d59fac5ff4dc9..0000000000000
--- a/pkgs/development/libraries/fcgi/default.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
-
-stdenv.mkDerivation rec {
-  pname = "fcgi";
-  version = "2.4.2";
-
-  src = fetchFromGitHub {
-    owner = "FastCGI-Archives";
-    repo = "fcgi2";
-    rev = version;
-    sha256 = "1jhz6jfwv5kawa8kajvg18nfwc1b30f38zc0lggszd1vcmrwqkz1";
-  };
-
-  nativeBuildInputs = [ autoreconfHook ];
-
-  postInstall = "ln -s . $out/include/fastcgi";
-
-  meta = with lib; {
-    description = "Language independent, scalable, open extension to CG";
-    homepage = "https://fastcgi-archives.github.io/"; # Formerly http://www.fastcgi.com/
-    license = "FastCGI see LICENSE.TERMS";
-    mainProgram = "cgi-fcgi";
-    platforms = platforms.all;
-  };
-}
diff --git a/pkgs/development/libraries/fcgi/gcc-4.4.diff b/pkgs/development/libraries/fcgi/gcc-4.4.diff
deleted file mode 100644
index c6806c12c0676..0000000000000
--- a/pkgs/development/libraries/fcgi/gcc-4.4.diff
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/libfcgi/fcgio.cpp b/libfcgi/fcgio.cpp
-index 95e28ca..a7eda0e 100644
---- a/libfcgi/fcgio.cpp
-+++ b/libfcgi/fcgio.cpp
-@@ -23,6 +23,7 @@
- #endif
- 
- #include <limits.h>
-+#include <cstdio>
- #include "fcgio.h"
- 
- using std::streambuf;
diff --git a/pkgs/development/libraries/ffmpeg/5.1.4-CVE-2023-49502.patch b/pkgs/development/libraries/ffmpeg/5.1.4-CVE-2023-49502.patch
new file mode 100644
index 0000000000000..ca8b8b4d15bdb
--- /dev/null
+++ b/pkgs/development/libraries/ffmpeg/5.1.4-CVE-2023-49502.patch
@@ -0,0 +1,26 @@
+Based on upstream 737ede405b11a37fdd61d19cf25df296a0cb0b75, with cuda and
+vulkan implementations removed, bwdif adjusted to apply to 5.1.4
+
+diff --git a/libavfilter/vf_bwdif.c b/libavfilter/vf_bwdif.c
+index 65c617ebb3..35c864f71e 100644
+--- a/libavfilter/vf_bwdif.c
++++ b/libavfilter/vf_bwdif.c
+@@ -333,13 +333,14 @@ static int config_props(AVFilterLink *link)
+     if(yadif->mode&1)
+         link->frame_rate = av_mul_q(link->src->inputs[0]->frame_rate, (AVRational){2,1});
+ 
+-    if (link->w < 3 || link->h < 4) {
+-        av_log(ctx, AV_LOG_ERROR, "Video of less than 3 columns or 4 lines is not supported\n");
++    yadif->csp = av_pix_fmt_desc_get(link->format);
++    yadif->filter = filter;
++
++    if (AV_CEIL_RSHIFT(link->w, yadif->csp->log2_chroma_w) < 3 || AV_CEIL_RSHIFT(link->h, yadif->csp->log2_chroma_h) < 4) {
++        av_log(ctx, AV_LOG_ERROR, "Video with planes less than 3 columns or 4 lines is not supported\n");
+         return AVERROR(EINVAL);
+     }
+ 
+-    yadif->csp = av_pix_fmt_desc_get(link->format);
+-    yadif->filter = filter;
+     if (yadif->csp->comp[0].depth > 8) {
+         s->filter_intra = filter_intra_16bit;
+         s->filter_line  = filter_line_c_16bit;
diff --git a/pkgs/development/libraries/ffmpeg/default.nix b/pkgs/development/libraries/ffmpeg/default.nix
index 5bd9171275bee..88b5564ecba41 100644
--- a/pkgs/development/libraries/ffmpeg/default.nix
+++ b/pkgs/development/libraries/ffmpeg/default.nix
@@ -12,6 +12,7 @@ let
           CoreImage
           VideoToolbox
           ;
+        inherit (darwin) xcode;
       }
       // (initArgs // { inherit ffmpegVariant; })
     );
diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix
index 7496cb4de0e76..6d54d63c6ca8d 100644
--- a/pkgs/development/libraries/ffmpeg/generic.nix
+++ b/pkgs/development/libraries/ffmpeg/generic.nix
@@ -73,6 +73,7 @@
 , withJxl ? withFullDeps && lib.versionAtLeast version "5" # JPEG XL de/encoding
 , withLadspa ? withFullDeps # LADSPA audio filtering
 , withLzma ? withHeadlessDeps # xz-utils
+, withMetal ? false # Unfree and requires manual downloading of files
 , withMfx ? withFullDeps && (with stdenv.hostPlatform; isLinux && !isAarch) # Hardware acceleration via intel-media-sdk/libmfx
 , withModplug ? withFullDeps && !stdenv.isDarwin # ModPlug support
 , withMp3lame ? withHeadlessDeps # LAME MP3 encoder
@@ -106,6 +107,7 @@
 , withSvtav1 ? withHeadlessDeps && !stdenv.isAarch64 && !stdenv.hostPlatform.isMinGW # AV1 encoder/decoder (focused on speed and correctness)
 , withTensorflow ? false # Tensorflow dnn backend support (Increases closure size by ~390 MiB)
 , withTheora ? withHeadlessDeps # Theora encoder
+, withTwolame ? withFullDeps # MP2 encoding
 , withV4l2 ? withHeadlessDeps && stdenv.isLinux  # Video 4 Linux support
 , withV4l2M2m ? withV4l2
 , withVaapi ? withHeadlessDeps && (with stdenv; isLinux || isFreeBSD) # Vaapi hardware acceleration
@@ -288,6 +290,7 @@
 , quirc
 , rav1e
 , rtmpdump
+, twolame
 , samba
 , SDL2
 , shaderc
@@ -317,6 +320,7 @@
 , AVFoundation
 , CoreImage
 , VideoToolbox
+, xcode # unfree contains metalcc and metallib
 /*
  *  Testing
  */
@@ -395,22 +399,22 @@ stdenv.mkDerivation (finalAttrs: {
       --replace /usr/local/lib/frei0r-1 ${frei0r}/lib/frei0r-1
   '';
 
-  patches = map (patch: fetchpatch2 patch) ([ ]
+  patches = []
     ++ optionals (versionOlder version "5") [
-      {
+      (fetchpatch2 {
         name = "libsvtav1-1.5.0-compat-compressed_ten_bit_format.patch";
         url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/031f1561cd286596cdb374da32f8aa816ce3b135";
         hash = "sha256-agJgzIzrBTQBAypuCmGXXFo7vw6Iodw5Ny5O5QCKCn8=";
-      }
-      {
+      })
+      (fetchpatch2 {
         # Backport fix for binutils-2.41.
         name = "binutils-2.41.patch";
         url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/effadce6c756247ea8bae32dc13bb3e6f464f0eb";
         hash = "sha256-vLSltvZVMcQ0CnkU0A29x6fJSywE8/aU+Mp9os8DZYY=";
-      }
+      })
       # 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.
-      {
+      (fetchpatch2 {
         name = "utils-fix_crash_in_ff_seek_frame_binary.patch";
         url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/ab792634197e364ca1bb194f9abe36836e42f12d";
         hash = "sha256-vqqVACjbCcGL9Qvmg1QArSKqVmOqr8BEr+OxTBDt6mA=";
@@ -419,60 +423,96 @@ stdenv.mkDerivation (finalAttrs: {
             --replace libavformat/seek.c libavformat/utils.c \
             --replace 'const AVInputFormat *const ' 'const AVInputFormat *'
         '';
-      }
+      })
     ]
-    ++ (lib.optionals (lib.versionAtLeast version "5" && lib.versionOlder version "6") [
-      {
+    ++ optionals (lib.versionAtLeast version "5" && lib.versionOlder version "6") [
+      (fetchpatch2 {
         name = "fix_build_failure_due_to_libjxl_version_to_new";
         url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/75b1a555a70c178a9166629e43ec2f6250219eb2";
         hash = "sha256-+2kzfPJf5piim+DqEgDuVEEX5HLwRsxq0dWONJ4ACrU=";
-      }
-      {
+      })
+      (fetchpatch2 {
         name = "5.x-CVE-2024-31585.patch";
         url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/8711cea3841fc385cccb1e7255176479e865cd4d";
         hash = "sha256-WT+ly/l04yM/tRVbhkESA3sDDjwvtd/Cg2y8tQo4ApI=";
-      }
-      {
+      })
+      (fetchpatch2 {
         name = "CVE-2024-31582.patch";
         url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/99debe5f823f45a482e1dc08de35879aa9c74bd2";
         hash = "sha256-+CQ9FXR6Vr/AmsbXFiCUXZcxKj1s8nInEdke/Oc/kUA=";
-      }
-      {
+      })
+      (fetchpatch2 {
         name = "CVE-2024-31578.patch";
         url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/3bb00c0a420c3ce83c6fafee30270d69622ccad7";
         hash = "sha256-oZMZysBA+/gwaGEM1yvI+8wCadXWE7qLRL6Emap3b8Q=";
-      }
-    ])
-    ++ (lib.optionals (lib.versionAtLeast version "6.1" && lib.versionOlder version "6.2") [
-      { # this can be removed post 6.1
+      })
+      ./5.1.4-CVE-2023-49502.patch
+      (fetchpatch2 {
+        name = "CVE-2023-50008.patch";
+        url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/5f87a68cf70dafeab2fb89b42e41a4c29053b89b";
+        hash = "sha256-sqUUSOPTPLwu2h8GbAw4SfEf+0oWioz52BcpW1n4v3Y=";
+      })
+      (fetchpatch2 {
+        name = "CVE-2023-51793.patch";
+        url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/8b8b4bdef311f88c0075a06a25320187aff00bf2";
+        hash = "sha256-e7oGyOfUXuA8XK3vfygNtFlHpHl92O2KSLAo50sNJ5o=";
+      })
+      (fetchpatch2 {
+        name = "CVE-2023-51796.patch";
+        url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/e01a55c5283b82667dad347331816a5e20869ce9";
+        hash = "sha256-m4rq+UFG3nXdgOJ3S6XcruMZ+CPw+twmy2HFv3cnvJc=";
+      })
+    ]
+    ++ optionals (lib.versionAtLeast version "6.1" && lib.versionOlder version "6.2") [
+      (fetchpatch2 { # this can be removed post 6.1
         name = "fix_build_failure_due_to_PropertyKey_EncoderID";
         url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/cb049d377f54f6b747667a93e4b719380c3e9475";
         hash = "sha256-sxRXKKgUak5vsQTiV7ge8vp+N22CdTIvuczNgVRP72c=";
-      }
-      {
+      })
+      (fetchpatch2 {
         name = "fix_vulkan_av1";
         url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/e06ce6d2b45edac4a2df04f304e18d4727417d24";
         hash = "sha256-73mlX1rdJrguw7OXaSItfHtI7gflDrFj+7SepVvvUIg=";
-      }
-      {
+      })
+      (fetchpatch2 {
         name = "CVE-2024-31582.patch";
         url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/99debe5f823f45a482e1dc08de35879aa9c74bd2";
         hash = "sha256-+CQ9FXR6Vr/AmsbXFiCUXZcxKj1s8nInEdke/Oc/kUA=";
-      }
-      {
+      })
+      (fetchpatch2 {
         name = "CVE-2024-31578.patch";
         url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/3bb00c0a420c3ce83c6fafee30270d69622ccad7";
         hash = "sha256-oZMZysBA+/gwaGEM1yvI+8wCadXWE7qLRL6Emap3b8Q=";
-      }
-    ])
-    ++ (lib.optionals (lib.versionAtLeast version "7.0" && lib.versionOlder version "7.0.1") [
-      {
+      })
+      (fetchpatch2 {
+        name = "CVE-2023-49501.patch";
+        url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/4adb93dff05dd947878c67784d98c9a4e13b57a7";
+        hash = "sha256-7cwktto3fPMDGvCZCVtB01X8Q9S/4V4bDLUICSNfGgw=";
+      })
+      (fetchpatch2 {
+        name = "CVE-2023-49502.patch";
+        url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/737ede405b11a37fdd61d19cf25df296a0cb0b75";
+        hash = "sha256-mpSJwR9TX5ENjjCKvzuM/9e1Aj/AOiQW0+72oOMl9v8=";
+      })
+      (fetchpatch2 {
+        name = "CVE-2023-50007.patch";
+        url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/b1942734c7cbcdc9034034373abcc9ecb9644c47";
+        hash = "sha256-v0hNcqBtm8GCGAU9UbRUCE0slodOjZCHrkS8e4TrVcQ=";
+      })
+      (fetchpatch2 {
+        name = "CVE-2023-50008.patch";
+        url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/5f87a68cf70dafeab2fb89b42e41a4c29053b89b";
+        hash = "sha256-sqUUSOPTPLwu2h8GbAw4SfEf+0oWioz52BcpW1n4v3Y=";
+      })
+    ]
+    ++ optionals (lib.versionAtLeast version "7.0" && lib.versionOlder version "7.0.1") [
+      (fetchpatch2 {
         # Will likely be obsolete in >7.0
         name = "fate_avoid_dependency_on_samples";
         url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/7b7b7819bd21cc92ac07f6696b0e7f26fa8f9834";
         hash = "sha256-TKI289XqtG86Sj9s7mVYvmkjAuRXeK+2cYYEDkg6u6I=";
-      }
-    ]));
+      })
+    ];
 
   configurePlatforms = [];
   setOutputFlags = false; # Only accepts some of them
@@ -605,6 +645,9 @@ stdenv.mkDerivation (finalAttrs: {
   ] ++ [
     (enableFeature withLadspa "ladspa")
     (enableFeature withLzma "lzma")
+  ] ++ optionals (versionAtLeast version "5.0") [
+    (enableFeature withMetal "metal")
+  ] ++ [
     (enableFeature withMfx "libmfx")
     (enableFeature withModplug "libmodplug")
     (enableFeature withMp3lame "libmp3lame")
@@ -643,6 +686,7 @@ stdenv.mkDerivation (finalAttrs: {
     (enableFeature withSvtav1 "libsvtav1")
     (enableFeature withTensorflow "libtensorflow")
     (enableFeature withTheora "libtheora")
+    (enableFeature withTwolame "libtwolame")
     (enableFeature withV4l2 "libv4l2")
     (enableFeature withV4l2M2m "v4l2-m2m")
     (enableFeature withVaapi "vaapi")
@@ -689,6 +733,9 @@ stdenv.mkDerivation (finalAttrs: {
   ] ++ optionals stdenv.cc.isClang [
     "--cc=clang"
     "--cxx=clang++"
+  ] ++ optionals withMetal [
+    "--metalcc=${xcode}/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/metal"
+    "--metallib=${xcode}/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/metallib"
   ];
 
   # ffmpeg embeds the configureFlags verbatim in its binaries and because we
@@ -697,7 +744,8 @@ stdenv.mkDerivation (finalAttrs: {
   # such references except for data.
   postConfigure = let
     toStrip = map placeholder (lib.remove "data" finalAttrs.outputs) # We want to keep references to the data dir.
-      ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) buildPackages.stdenv.cc;
+      ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) buildPackages.stdenv.cc
+      ++ lib.optional withMetal xcode;
   in
     "remove-references-to ${lib.concatStringsSep " " (map (o: "-t ${o}") toStrip)} config.h";
 
@@ -774,6 +822,7 @@ stdenv.mkDerivation (finalAttrs: {
   ++ optionals withSvtav1 [ svt-av1 ]
   ++ optionals withTensorflow [ libtensorflow ]
   ++ optionals withTheora [ libtheora ]
+  ++ optionals withTwolame [ twolame ]
   ++ optionals withV4l2 [ libv4l ]
   ++ optionals withVaapi [ (if withSmallDeps then libva else libva-minimal) ]
   ++ optionals withVdpau [ libvdpau ]
@@ -882,4 +931,7 @@ stdenv.mkDerivation (finalAttrs: {
     maintainers = with maintainers; [ atemu arthsmn jopejoe1 ];
     mainProgram = "ffmpeg";
   };
+} // lib.optionalAttrs withCudaLLVM {
+  # remove once https://github.com/NixOS/nixpkgs/issues/318674 is addressed properly
+  hardeningDisable = [ "zerocallusedregs" ];
 })
diff --git a/pkgs/development/libraries/ffms/default.nix b/pkgs/development/libraries/ffms/default.nix
index 1afdd23923ddf..54ffad6fc3955 100644
--- a/pkgs/development/libraries/ffms/default.nix
+++ b/pkgs/development/libraries/ffms/default.nix
@@ -46,7 +46,7 @@ stdenv.mkDerivation rec {
     description = "FFmpeg based source library for easy frame accurate access";
     mainProgram = "ffmsindex";
     license = licenses.mit;
-    maintainers = with maintainers; [ tadeokondrak ];
+    maintainers = with maintainers; [ ];
     platforms = platforms.unix;
   };
 }
diff --git a/pkgs/development/libraries/flite/default.nix b/pkgs/development/libraries/flite/default.nix
deleted file mode 100644
index 8573c862726e6..0000000000000
--- a/pkgs/development/libraries/flite/default.nix
+++ /dev/null
@@ -1,51 +0,0 @@
-{ lib
-, stdenv
-, fetchFromGitHub
-, alsa-lib
-, fetchpatch
-, libpulseaudio
-, audioBackend ? "pulseaudio"
-}:
-
-assert lib.assertOneOf "audioBackend" audioBackend [ "alsa" "pulseaudio" ];
-
-stdenv.mkDerivation rec {
-  pname = "flite";
-  version = "2.2";
-
-  src = fetchFromGitHub {
-    owner = "festvox";
-    repo = "flite";
-    rev = "v${version}";
-    sha256 = "1n0p81jzndzc1rzgm66kw9ls189ricy5v1ps11y0p2fk1p56kbjf";
-  };
-
-  buildInputs = lib.optional (stdenv.isLinux && audioBackend == "alsa") alsa-lib
-    ++ lib.optional (stdenv.isLinux && audioBackend == "pulseaudio") libpulseaudio;
-
-  # https://github.com/festvox/flite/pull/60.
-  # Replaces `ar` with `$(AR)` in config/common_make_rules.
-  # Improves cross-compilation compatibility.
-  patches = [
-    (fetchpatch {
-      url = "https://github.com/festvox/flite/commit/54c65164840777326bbb83517568e38a128122ef.patch";
-      sha256 = "sha256-hvKzdX7adiqd9D+9DbnfNdqEULg1Hhqe1xElYxNM1B8=";
-    })
-  ];
-
-  configureFlags = [
-    "--enable-shared"
-  ] ++ lib.optionals stdenv.isLinux [ "--with-audio=${audioBackend}" ];
-
-  # main/Makefile creates and removes 'flite_voice_list.c' from multiple targets:
-  # make[1]: *** No rule to make target 'flite_voice_list.c', needed by 'all'.  Stop
-  enableParallelBuilding = false;
-
-  meta = with lib; {
-    description = "Small, fast run-time speech synthesis engine";
-    homepage = "http://www.festvox.org/flite/";
-    license = licenses.bsdOriginal;
-    maintainers = with maintainers; [ getchoo ];
-    platforms = platforms.all;
-  };
-}
diff --git a/pkgs/development/libraries/fox/default.nix b/pkgs/development/libraries/fox/default.nix
index 2715e2c80ca43..6286155d8efb0 100644
--- a/pkgs/development/libraries/fox/default.nix
+++ b/pkgs/development/libraries/fox/default.nix
@@ -6,13 +6,11 @@
 , libtiff
 , zlib
 , bzip2
-, libGL
-, libGLU
+, mesa_glu
 , libXcursor
 , libXext
 , libXrandr
 , libXft
-, CoreServices
 }:
 
 stdenv.mkDerivation rec {
@@ -24,8 +22,7 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-bu+IEqNkv9OAf96dPYre3CP759pjalVIbYyc3QSQW2w=";
   };
 
-  buildInputs = [ libpng libjpeg libtiff zlib bzip2 libGL libGLU libXcursor libXext libXrandr libXft ]
-    ++ lib.optional stdenv.isDarwin CoreServices;
+  buildInputs = [ libpng libjpeg libtiff zlib bzip2 mesa_glu libXcursor libXext libXrandr libXft ];
 
   doCheck = true;
 
diff --git a/pkgs/development/libraries/freeglut/default.nix b/pkgs/development/libraries/freeglut/default.nix
index 69c3b65e4a51c..8e79b3e57dea1 100644
--- a/pkgs/development/libraries/freeglut/default.nix
+++ b/pkgs/development/libraries/freeglut/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, libICE, libXext, libXi, libXrandr, libXxf86vm, libGL, libGLU, cmake
+{ lib, stdenv, fetchurl, libICE, libXext, libXi, libXrandr, libXxf86vm, libGLX, libGLU, cmake
 , testers
 }:
 
@@ -14,11 +14,11 @@ stdenv.mkDerivation (finalAttrs: {
   outputs = [ "out" "dev" ];
 
   nativeBuildInputs = [ cmake ];
-  buildInputs = [ libICE libXext libXi libXrandr libXxf86vm libGL libGLU ];
+  buildInputs = [ libICE libXext libXi libXrandr libXxf86vm libGLU ];
 
   cmakeFlags = lib.optionals stdenv.isDarwin [
-                 "-DOPENGL_INCLUDE_DIR=${libGL}/include"
-                 "-DOPENGL_gl_LIBRARY:FILEPATH=${libGL}/lib/libGL.dylib"
+                 "-DOPENGL_INCLUDE_DIR=${libGLX.dev}/include"
+                 "-DOPENGL_gl_LIBRARY:FILEPATH=${libGLX}/lib/libGL.dylib"
                  "-DOPENGL_glu_LIBRARY:FILEPATH=${libGLU}/lib/libGLU.dylib"
                  "-DFREEGLUT_BUILD_DEMOS:BOOL=OFF"
                  "-DFREEGLUT_BUILD_STATIC:BOOL=OFF"
diff --git a/pkgs/development/libraries/freenect/default.nix b/pkgs/development/libraries/freenect/default.nix
index 387fac6d84ada..b537bea33777c 100644
--- a/pkgs/development/libraries/freenect/default.nix
+++ b/pkgs/development/libraries/freenect/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchFromGitHub, cmake, libusb1, pkg-config, freeglut, libGLU, libGL, libXi, libXmu
+{ stdenv, lib, fetchFromGitHub, cmake, libusb1, pkg-config, libglut, libGLU, libGL, libXi, libXmu
 , GLUT, Cocoa
  }:
 
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-Lb5mrl9jiI1Z9UOAlP+bBPNoKNxm5VSrFZRvifEfhoU=";
   };
 
-  buildInputs = [ libusb1 freeglut libGLU libGL libXi libXmu ]
+  buildInputs = [ libusb1 libglut libGLU libGL libXi libXmu ]
     ++ lib.optionals stdenv.isDarwin [ GLUT Cocoa ];
 
   nativeBuildInputs = [ cmake pkg-config ];
diff --git a/pkgs/development/libraries/freetds/default.nix b/pkgs/development/libraries/freetds/default.nix
index d6c38b555dd6e..bcc5e8dacfe95 100644
--- a/pkgs/development/libraries/freetds/default.nix
+++ b/pkgs/development/libraries/freetds/default.nix
@@ -8,11 +8,11 @@ assert odbcSupport -> unixODBC != null;
 
 stdenv.mkDerivation rec {
   pname = "freetds";
-  version = "1.4.17";
+  version = "1.4.19";
 
   src = fetchurl {
     url    = "https://www.freetds.org/files/stable/${pname}-${version}.tar.bz2";
-    hash   = "sha256-P3CoRV6zopAtQDmtkbk0o0jKHu4jpKkqPeCCSQWn0aI=";
+    hash   = "sha256-kK65g8NLMT+dxJTaAFviJNToS9EZ/rKlsey3OpQon5U=";
   };
 
   buildInputs = [
diff --git a/pkgs/development/libraries/fribidi/default.nix b/pkgs/development/libraries/fribidi/default.nix
index d23cd352360bc..768c2185a1581 100644
--- a/pkgs/development/libraries/fribidi/default.nix
+++ b/pkgs/development/libraries/fribidi/default.nix
@@ -11,14 +11,14 @@
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "fribidi";
-  version = "1.0.13";
+  version = "1.0.14";
 
   outputs = [ "out" "dev" "devdoc" ];
 
   # NOTE: Only URL tarball has "Have pre-generated man pages: true", which works-around upstream usage of some rare ancient `c2man` fossil application.
   src = fetchurl {
     url = with finalAttrs; "https://github.com/fribidi/fribidi/releases/download/v${version}/${pname}-${version}.tar.xz";
-    sha256 = "sha256-f6FsgMgb1iL3sZjTE1baE5zDGKY/x3YSF69BMJA/VKI=";
+    sha256 = "sha256-dq4gSnAnZSrDmBufpYF8CDuiMRQ0AoTFjnVrJZzSJZo=";
   };
 
   postPatch = ''
diff --git a/pkgs/development/libraries/ftgl/default.nix b/pkgs/development/libraries/ftgl/default.nix
index b6554979c7ee4..d1fb07167e133 100644
--- a/pkgs/development/libraries/ftgl/default.nix
+++ b/pkgs/development/libraries/ftgl/default.nix
@@ -3,7 +3,7 @@
 , fetchFromGitHub
 , autoreconfHook
 , doxygen
-, freeglut
+, libglut
 , freetype
 , libGL
 , libGLU
@@ -46,7 +46,7 @@ stdenv.mkDerivation rec {
   ] else [
     libGL
     libGLU
-    freeglut
+    libglut
   ]);
 
   configureFlags = [
diff --git a/pkgs/development/libraries/gdal/default.nix b/pkgs/development/libraries/gdal/default.nix
index f8bf3f7c075aa..611b547b101ab 100644
--- a/pkgs/development/libraries/gdal/default.nix
+++ b/pkgs/development/libraries/gdal/default.nix
@@ -2,7 +2,6 @@
 , stdenv
 , callPackage
 , fetchFromGitHub
-, fetchpatch
 
 , useMinimalFeatures ? false
 , useTiledb ? (!useMinimalFeatures) && !(stdenv.isDarwin && stdenv.isx86_64)
@@ -80,23 +79,15 @@
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "gdal" + lib.optionalString useMinimalFeatures "-minimal";
-  version = "3.9.0";
+  version = "3.9.1";
 
   src = fetchFromGitHub {
     owner = "OSGeo";
     repo = "gdal";
     rev = "v${finalAttrs.version}";
-    hash = "sha256-xEekgF9GzsPYkwk7Nny9b1DMLTxBqTSdudYxaz4jl/c=";
+    hash = "sha256-WCTQHUU2WYYiliwCJ4PsbvJIOar9LmvXn/i5jJzTCtM=";
   };
 
-  patches = [
-    # HDF5: add support for libhdf5 >= 1.14.4.2 when built with Float16
-    (fetchpatch {
-      url = "https://github.com/OSGeo/gdal/commit/16ade8253f26200246abb5ab24d17e18216e7a11.patch";
-      sha256 = "sha256-N6YqfcOUWeaJXVE9RUo1dzulxqIY5Q/UygPnZHau3Lc=";
-    })
-  ];
-
   nativeBuildInputs = [
     bison
     cmake
diff --git a/pkgs/development/libraries/gexiv2/default.nix b/pkgs/development/libraries/gexiv2/default.nix
index 9753f78ec83ed..c560a3fc10e93 100644
--- a/pkgs/development/libraries/gexiv2/default.nix
+++ b/pkgs/development/libraries/gexiv2/default.nix
@@ -18,13 +18,13 @@
 
 stdenv.mkDerivation rec {
   pname = "gexiv2";
-  version = "0.14.2";
+  version = "0.14.3";
 
   outputs = [ "out" "dev" "devdoc" ];
 
   src = fetchurl {
     url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
-    sha256 = "Kgyc9I++izQ1AIhm/9QLjt2wZn0iErQjlv32iOk84L4=";
+    sha256 = "IeZNLFbpszPUT+8/KkslZT2SLEGazZcvqW+raVIX4sg=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/libraries/gl2ps/default.nix b/pkgs/development/libraries/gl2ps/default.nix
index dfc9e36488f86..f1d67c8c88552 100644
--- a/pkgs/development/libraries/gl2ps/default.nix
+++ b/pkgs/development/libraries/gl2ps/default.nix
@@ -6,7 +6,7 @@
 , libpng
 , libGL
 , libGLU
-, freeglut
+, libglut
 , darwin
 }:
 
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
   ] ++ lib.optionals (!stdenv.isDarwin) [
     libGL
     libGLU
-    freeglut
+    libglut
   ] ++ lib.optionals stdenv.isDarwin [
     darwin.apple_sdk.frameworks.OpenGL
   ];
diff --git a/pkgs/development/libraries/gle/default.nix b/pkgs/development/libraries/gle/default.nix
index 79be821faaecb..f9ef65197bd5e 100644
--- a/pkgs/development/libraries/gle/default.nix
+++ b/pkgs/development/libraries/gle/default.nix
@@ -1,8 +1,8 @@
-{lib, stdenv, fetchurl, freeglut, libX11, libXt, libXmu, libXi, libXext, libGL, libGLU}:
+{lib, stdenv, fetchurl, libglut, libX11, libXt, libXmu, libXi, libXext, libGL, libGLU}:
 stdenv.mkDerivation rec {
   pname = "gle";
   version = "3.1.0";
-  buildInputs = [libGLU libGL freeglut libX11 libXt libXmu libXi libXext];
+  buildInputs = [libGLU libGL libglut libX11 libXt libXmu libXi libXext];
   src = fetchurl {
     urls = [
       "mirror://sourceforge/project/gle/gle/gle-${version}/gle-${version}.tar.gz"
diff --git a/pkgs/development/libraries/glfw/3.x.nix b/pkgs/development/libraries/glfw/3.x.nix
index 67d5a0095148b..7ca694827301b 100644
--- a/pkgs/development/libraries/glfw/3.x.nix
+++ b/pkgs/development/libraries/glfw/3.x.nix
@@ -1,6 +1,6 @@
 { stdenv, lib, fetchFromGitHub, cmake
 , libGL, libXrandr, libXinerama, libXcursor, libX11, libXi, libXext
-, Carbon, Cocoa, Kernel, OpenGL, fixDarwinDylibNames
+, Carbon, Cocoa, Kernel, fixDarwinDylibNames
 , extra-cmake-modules, wayland
 , wayland-scanner, wayland-protocols, libxkbcommon
 }:
@@ -19,9 +19,7 @@ stdenv.mkDerivation rec {
   # Fix linkage issues on X11 (https://github.com/NixOS/nixpkgs/issues/142583)
   patches = ./x11.patch;
 
-  propagatedBuildInputs =
-    lib.optionals stdenv.isDarwin [ OpenGL ]
-    ++ lib.optionals stdenv.isLinux [ libGL ];
+  propagatedBuildInputs = [ libGL ];
 
   nativeBuildInputs = [ cmake extra-cmake-modules ]
     ++ lib.optional stdenv.isDarwin fixDarwinDylibNames
diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix
index a60ba9fae6bfd..47ca3f35b218f 100644
--- a/pkgs/development/libraries/glib/default.nix
+++ b/pkgs/development/libraries/glib/default.nix
@@ -61,28 +61,24 @@ in
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "glib";
-  version = "2.80.2";
+  version = "2.80.3";
 
   src = fetchurl {
     url = "mirror://gnome/sources/glib/${lib.versions.majorMinor finalAttrs.version}/glib-${finalAttrs.version}.tar.xz";
-    hash = "sha256-uc+296W9WzEjj9XVbfImst2l6jdhFHW/ifag+UAP6L0=";
+    hash = "sha256-OUeg6t3Q82E9AjC7JG0MaeRhQsGQIvXEsbLjy6I21Bc=";
   };
 
   patches = lib.optionals stdenv.isDarwin [
     ./darwin-compilation.patch
+    # FIXME: remove when https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4088 is merged and is in the tagged release
+    (fetchpatch {
+      url = "https://gitlab.gnome.org/GNOME/glib/-/commit/9d0988ca62ee96e09aa76abbd65ff192cfce6858.patch";
+      hash = "sha256-JrR3Ba6L+3M0Nt8DgHmPG8uKtx7hOgUp7np08ATIzjA=";
+    })
   ] ++ lib.optionals stdenv.hostPlatform.isMusl [
     ./quark_init_on_demand.patch
     ./gobject_init_on_demand.patch
   ] ++ [
-    # Fix double-free & segfault issues on menu and dbus connection action group export failures
-    # https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4073
-    # Remove when version > 2.80.2
-    (fetchpatch {
-      name = "GLib-Fix-memory-problems-on-gmenuexporter-and-gactiongroupexporter-error-paths.patch";
-      url = "https://gitlab.gnome.org/GNOME/glib/-/commit/b9490a499a004618c883f180b1081a166ff1a86b.patch";
-      hash = "sha256-c6uZ9NEhg26/2RdgjQ4s5ErCDm5HH6T/tfJXTwh/H6o=";
-    })
-
     # This patch lets GLib's GDesktopAppInfo API watch and notice changes
     # to the Nix user and system profiles.  That way, the list of available
     # applications shown by the desktop environment is immediately updated
@@ -124,6 +120,15 @@ stdenv.mkDerivation (finalAttrs: {
     # 3. Tools for desktop environment that cannot go to $bin due to $out depending on them ($out)
     #    * gio-launch-desktop
     ./split-dev-programs.patch
+
+    # Tell Meson to install gdb scripts next to the lib
+    # GDB only looks there and in ${gdb}/share/gdb/auto-load,
+    # and by default meson installs in to $out/share/gdb/auto-load
+    # which does not help
+    ./gdb_script.patch
+
+    # glib assumes that `RTLD_LOCAL` is defined to `0`, which is true on Linux and FreeBSD but not on Darwin.
+    ./gmodule-rtld_local.patch
   ];
 
   outputs = [ "bin" "out" "dev" "devdoc" ];
@@ -221,6 +226,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   postInstall = ''
     moveToOutput "share/glib-2.0" "$dev"
+    moveToOutput "share/glib-2.0/gdb" "$out"
     substituteInPlace "$dev/bin/gdbus-codegen" --replace "$out" "$dev"
     sed -i "$dev/bin/glib-gettextize" -e "s|^gettext_dir=.*|gettext_dir=$dev/share/glib-2.0/gettext|"
 
diff --git a/pkgs/development/libraries/glib/gdb_script.patch b/pkgs/development/libraries/glib/gdb_script.patch
new file mode 100644
index 0000000000000..c1e5d22e085b1
--- /dev/null
+++ b/pkgs/development/libraries/glib/gdb_script.patch
@@ -0,0 +1,23 @@
+diff --git a/glib/meson.build b/glib/meson.build
+index b2dd569e1..b013991a1 100644
+--- a/glib/meson.build
++++ b/glib/meson.build
+@@ -541,7 +540,7 @@ configure_file(
+   input: 'libglib-gdb.py.in',
+   output: 'libglib-2.0.so.@0@-gdb.py'.format(library_version),
+   configuration: gdb_conf,
+-  install_dir: gdb_install_dir,
++  install_dir: glib_libdir,
+   install_tag: 'devel',
+   install: gdb_install,
+ )
+diff --git a/gobject/meson.build b/gobject/meson.build
+@@ -185,7 +184,7 @@ configure_file(
+   input: 'libgobject-gdb.py.in',
+   output: 'libgobject-2.0.so.@0@-gdb.py'.format(library_version),
+   configuration: gdb_conf,
+-  install_dir: gdb_install_dir,
++  install_dir: glib_libdir,
+   install_tag: 'devel',
+   install: gdb_install,
+ )
diff --git a/pkgs/development/libraries/glib/gmodule-rtld_local.patch b/pkgs/development/libraries/glib/gmodule-rtld_local.patch
new file mode 100644
index 0000000000000..abbf19d70b207
--- /dev/null
+++ b/pkgs/development/libraries/glib/gmodule-rtld_local.patch
@@ -0,0 +1,13 @@
+diff --git a/gmodule/gmodule-dl.c b/gmodule/gmodule-dl.c
+index 6d1c5fab7..b21773bca 100644
+--- a/gmodule/gmodule-dl.c
++++ b/gmodule/gmodule-dl.c
+@@ -136,7 +136,7 @@ _g_module_open (const gchar *file_name,
+   
+   lock_dlerror ();
+   handle = dlopen (file_name,
+-		   (bind_local ? 0 : RTLD_GLOBAL) | (bind_lazy ? RTLD_LAZY : RTLD_NOW));
++		   (bind_local ? RTLD_LOCAL : RTLD_GLOBAL) | (bind_lazy ? RTLD_LAZY : RTLD_NOW));
+   if (!handle)
+     {
+       const gchar *message = fetch_dlerror (TRUE);
diff --git a/pkgs/development/libraries/glm/default.nix b/pkgs/development/libraries/glm/default.nix
index 417d70d621b69..3894db5ab9c81 100644
--- a/pkgs/development/libraries/glm/default.nix
+++ b/pkgs/development/libraries/glm/default.nix
@@ -1,61 +1,40 @@
 { lib
 , stdenv
 , fetchFromGitHub
-, fetchpatch
 , cmake
 }:
 
 stdenv.mkDerivation rec {
-  version = "0.9.9.8";
+  version = "1.0.1";
   pname = "glm";
 
   src = fetchFromGitHub {
     owner = "g-truc";
     repo = pname;
     rev = version;
-    sha256 = "sha256-F//+3L5Ozrw6s7t4LrcUmO7sN30ZSESdrPAYX57zgr8=";
+    sha256 = "sha256-GnGyzNRpzuguc3yYbEFtYLvG+KiCtRAktiN+NvbOICE=";
   };
 
-  # (https://github.com/g-truc/glm/pull/986 wasn't enough, and -Werror is used)
-  # (https://github.com/g-truc/glm/pull/1055 neither)
-  patches = [
-    (fetchpatch {
-      name = "glm-0.9.9.8-clang.patch";
-      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/glm/files/glm-0.9.9.8-clang.patch?id=79476d4b145a4a6b0cbc0e73a6cefb5d584bf8fa";
-      hash = "sha256-D8O+qofnGUEaH5nQGdNddwHyr5FhPQa/lOup4z4SFgY=";
-    })
-  ];
-
   outputs = [ "out" "doc" ];
 
   nativeBuildInputs = [ cmake ];
 
-  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102823
-  env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "11") "-fno-ipa-modref";
+  env.NIX_CFLAGS_COMPILE =
+    # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102823
+    if (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "11") then "-fno-ipa-modref"
+    # Fix compilation errors on darwin
+    else if (stdenv.cc.isClang) then "-Wno-error"
+    else "";
 
   cmakeFlags = [
-    "-DBUILD_SHARED_LIBS=OFF"
-    "-DBUILD_STATIC_LIBS=OFF"
-    "-DGLM_TEST_ENABLE=${if doCheck then "ON" else "OFF"}"
+    (lib.cmakeBool "BUILD_SHARED_LIBS" false)
+    (lib.cmakeBool "BUILD_STATIC_LIBS" false)
+    (lib.cmakeBool "GLM_TEST_ENABLE" doCheck)
   ];
 
   doCheck = true;
 
-  installPhase = ''
-    runHook preInstall
-
-    # Install header-only library
-    mkdir -p $out/include
-    cp -rv ../glm $out/include
-    rm $out/include/glm/CMakeLists.txt
-    rm $out/include/glm/detail/*.cpp
-
-    # Install CMake files
-    mkdir -p $out/lib
-    cp -rv ../cmake $out/lib
-    substituteInPlace $out/lib/cmake/glm/glmConfig.cmake \
-        --replace 'GLM_INCLUDE_DIRS ''${_IMPORT_PREFIX}' "GLM_INCLUDE_DIRS $out/include"
-
+  postInstall = ''
     # Install pkg-config file
     mkdir -p $out/lib/pkgconfig
     substituteAll ${./glm.pc.in} $out/lib/pkgconfig/glm.pc
@@ -64,8 +43,6 @@ stdenv.mkDerivation rec {
     mkdir -p $doc/share/doc/glm
     cp -rv ../doc/api $doc/share/doc/glm/html
     cp -v ../doc/manual.pdf $doc/share/doc/glm
-
-    runHook postInstall
   '';
 
   meta = with lib; {
diff --git a/pkgs/development/libraries/glui/default.nix b/pkgs/development/libraries/glui/default.nix
index 716c998b9c990..f3999bfb439b7 100644
--- a/pkgs/development/libraries/glui/default.nix
+++ b/pkgs/development/libraries/glui/default.nix
@@ -1,6 +1,6 @@
 { lib, stdenv
 , fetchFromGitHub
-, freeglut
+, libglut
 , libGL
 , libGLU
 , libX11
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
     sha256 = "0qg2y8w95s03zay1qsqs8pqxxlg6l9kwm7rrs1qmx0h22sxb360i";
   };
 
-  buildInputs = [ freeglut libGLU libGL libXmu libXext libX11 libXi ];
+  buildInputs = [ libglut libGLU libGL libXmu libXext libX11 libXi ];
 
   installPhase = ''
     mkdir -p "$out"/{bin,lib,share/glui/doc,include}
diff --git a/pkgs/development/libraries/gnome-online-accounts/default.nix b/pkgs/development/libraries/gnome-online-accounts/default.nix
index 43ce34ec2ed4f..4b5df003dcf73 100644
--- a/pkgs/development/libraries/gnome-online-accounts/default.nix
+++ b/pkgs/development/libraries/gnome-online-accounts/default.nix
@@ -31,13 +31,13 @@
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "gnome-online-accounts";
-  version = "3.50.2";
+  version = "3.50.3";
 
   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-3xatl10TnGv8TrsuyLuDJyl6eR7yvwuXfHgHavX6qY4=";
+    hash = "sha256-5xSmfRccVxRDYet07oKhexXQqCIo/xiM+ScE9WJsopQ=";
   };
 
   mesonFlags = [
diff --git a/pkgs/development/libraries/gobject-introspection/default.nix b/pkgs/development/libraries/gobject-introspection/default.nix
index 9aba5156bef28..1a205a6c04cb7 100644
--- a/pkgs/development/libraries/gobject-introspection/default.nix
+++ b/pkgs/development/libraries/gobject-introspection/default.nix
@@ -33,6 +33,7 @@ let
   pythonModules = pp: [
     pp.mako
     pp.markdown
+    pp.setuptools
   ];
 
   # https://discourse.gnome.org/t/dealing-with-glib-and-gobject-introspection-circular-dependency/18701
diff --git a/pkgs/development/libraries/gstreamer/good/default.nix b/pkgs/development/libraries/gstreamer/good/default.nix
index ac1a192f37ad1..40c9cbc769c08 100644
--- a/pkgs/development/libraries/gstreamer/good/default.nix
+++ b/pkgs/development/libraries/gstreamer/good/default.nix
@@ -68,6 +68,8 @@ stdenv.mkDerivation rec {
   };
 
   patches = [
+    # Reenable dynamic loading of libsoup on Darwin and use a different approach to do it.
+    ./souploader-darwin.diff
     # dlopen libsoup_3 with an absolute path
     (substituteAll {
       src = ./souploader.diff;
diff --git a/pkgs/development/libraries/gstreamer/good/souploader-darwin.diff b/pkgs/development/libraries/gstreamer/good/souploader-darwin.diff
new file mode 100644
index 0000000000000..40dea3a764ac7
--- /dev/null
+++ b/pkgs/development/libraries/gstreamer/good/souploader-darwin.diff
@@ -0,0 +1,128 @@
+diff --git a/ext/adaptivedemux2/meson.build b/ext/adaptivedemux2/meson.build
+index 711b38a2a9..67a789f664 100644
+--- a/ext/adaptivedemux2/meson.build
++++ b/ext/adaptivedemux2/meson.build
+@@ -82,7 +82,7 @@ soup_link_args = []
+ soup_link_deps = []
+ 
+ default_library = get_option('default_library')
+-if host_system != 'linux' or default_library in ['static', 'both']
++if default_library in ['static', 'both']
+   if soup_ver_opt in ['auto', '3']
+     libsoup3_dep = dependency('libsoup-3.0', allow_fallback: true,
+                               required: soup_ver_opt == '3' and soup_opt.enabled())
+@@ -120,7 +120,7 @@ adaptive_deps = [gmodule_dep, gst_dep, gsttag_dep, gstnet_dep, gstbase_dep, gstp
+ adaptive_args = [gst_plugins_good_args, soup_loader_args, hls_cargs,
+     '-DGST_ISOFF_API=G_GNUC_INTERNAL']
+ 
+-if host_system != 'linux'
++if false
+     adaptivedemux2 = library('gstadaptivedemux2',
+       c_args: [adaptive_args, soup_link_args],
+       dependencies: [adaptive_deps, soup_link_deps],
+diff --git a/ext/soup/gstsouploader.c b/ext/soup/gstsouploader.c
+index 9192e4dac5..8082b2614d 100644
+--- a/ext/soup/gstsouploader.c
++++ b/ext/soup/gstsouploader.c
+@@ -34,12 +34,18 @@ GST_DEBUG_CATEGORY (gst_soup_debug);
+ 
+ #ifndef LINK_SOUP
+ 
+-#if defined(__APPLE__) || defined(G_OS_WIN32)
+-#error "dlopen of libsoup is only supported on Linux"
++#if defined(G_OS_WIN32)
++#error "dlopen of libsoup is only supported on Darwin and Linux"
+ #endif
+ 
++#if defined(__APPLE__)
++#define LIBSOUP_3_SONAME "libsoup-3.0.0.dylib"
++#define LIBSOUP_2_SONAME "libsoup-2.4.1.dylib"
++#define LIBSOUP_COMMON_SYMBOL "soup_get_major_version"
++#else
+ #define LIBSOUP_3_SONAME "libsoup-3.0.so.0"
+ #define LIBSOUP_2_SONAME "libsoup-2.4.so.1"
++#endif
+ 
+ #define LOAD_SYMBOL(name) G_STMT_START {                                \
+     if (!g_module_symbol (module, G_STRINGIFY (name), (gpointer *) &G_PASTE (vtable->_, name))) { \
+@@ -156,7 +162,46 @@ gst_soup_load_library (void)
+   GST_DEBUG_CATEGORY_INIT (gst_soup_debug, "soup", 0, "soup");
+ #endif
+ 
+-#ifdef HAVE_RTLD_NOLOAD
++#if defined(__APPLE__)
++  g_autofree gchar* libsoup_path = NULL;
++  {
++    /* In order to avoid causing conflicts we detect if libsoup 2 or 3 is loaded already.
++     * Darwin has to probe by checking for symbols because `dlopen` called with a dylib
++     * basename will try to locate it via the process’s rpath stack (and not find it). */
++
++    gpointer func = NULL;
++    Dl_info info = { 0 };
++
++    GModule* module = g_module_open (NULL, 0);
++    if (g_module_symbol (module, LIBSOUP_COMMON_SYMBOL, &func)
++        && dladdr (func, &info) && info.dli_sname) {
++      libsoup_path = g_strndup(info.dli_fname, PATH_MAX - 1);
++      g_autofree gchar* image_name = g_path_get_basename (libsoup_path);
++
++      /* Make sure `libsoup_path` points to a dylib that actually exists and
++       * contains the libsoup symbol that was queried. */
++      gpointer handle = dlopen (libsoup_path, RTLD_NOW | RTLD_NOLOAD);
++      gboolean has_symbol = dlsym (handle, LIBSOUP_COMMON_SYMBOL) != NULL;
++      if (handle && has_symbol && g_str_equal (image_name, LIBSOUP_3_SONAME)) {
++        libsoup_sonames[0] = libsoup_path;
++        GST_DEBUG ("LibSoup 3 found");
++      } else if (handle && has_symbol && g_str_equal (image_name, LIBSOUP_2_SONAME)) {
++        libsoup_sonames[0] = libsoup_path;
++        GST_DEBUG ("LibSoup 2 found");
++      } else {
++        g_clear_pointer (&libsoup_path, g_free);
++      }
++      g_clear_pointer (&handle, dlclose);
++    }
++    g_module_close (module);
++
++    if (!libsoup_sonames[0]) {
++      GST_DEBUG ("Trying all libsoups");
++      libsoup_sonames[0] = LIBSOUP_3_SONAME;
++      libsoup_sonames[1] = LIBSOUP_2_SONAME;
++    }
++  }
++#elif defined(HAVE_RTLD_NOLOAD)
+   {
+     gpointer handle = NULL;
+ 
+diff --git a/ext/soup/meson.build b/ext/soup/meson.build
+index aaa01dbcf6..83b7cf3fbf 100644
+--- a/ext/soup/meson.build
++++ b/ext/soup/meson.build
+@@ -20,8 +20,8 @@ soup_link_deps = []
+ libsoup2_dep = disabler()
+ libsoup3_dep = disabler()
+ default_library = get_option('default_library')
+-soup_lookup_dep = get_option('soup-lookup-dep') and host_system == 'linux'
+-if host_system != 'linux' or default_library in ['static', 'both'] or soup_lookup_dep
++soup_lookup_dep = get_option('soup-lookup-dep')
++if default_library in ['static', 'both'] or soup_lookup_dep
+   if soup_ver_opt in ['auto', '3']
+     libsoup3_dep = dependency('libsoup-3.0', allow_fallback: true,
+                               required: soup_ver_opt == '3' and soup_opt.enabled())
+@@ -33,7 +33,7 @@ if host_system != 'linux' or default_library in ['static', 'both'] or soup_looku
+   endif
+ endif
+ 
+-if host_system != 'linux' or default_library in ['static', 'both']
++if default_library in ['static', 'both']
+   if libsoup3_dep.found()
+     soup_link_deps += libsoup3_dep
+     soup_link_args += '-DLINK_SOUP=3'
+@@ -60,7 +60,7 @@ soup_library_kwargs = {
+ soup_library_deps = [gst_dep, gstbase_dep, gsttag_dep, gmodule_dep, gio_dep, libdl_dep]
+ soup_library_c_args = gst_plugins_good_args
+ 
+-if host_system != 'linux'
++if false
+   gstsouphttpsrc = library('gstsoup',
+     c_args : soup_library_c_args + soup_link_args,
+     dependencies : soup_library_deps + soup_link_deps,
diff --git a/pkgs/development/libraries/gstreamer/good/souploader.diff b/pkgs/development/libraries/gstreamer/good/souploader.diff
index 8662207de8f2f..49917cad91dec 100644
--- a/pkgs/development/libraries/gstreamer/good/souploader.diff
+++ b/pkgs/development/libraries/gstreamer/good/souploader.diff
@@ -1,8 +1,17 @@
 diff --git a/ext/soup/gstsouploader.c b/ext/soup/gstsouploader.c
-index 85048ce303..d7d818cf95 100644
+index 85a033668e..8082b2614d 100644
 --- a/ext/soup/gstsouploader.c
 +++ b/ext/soup/gstsouploader.c
-@@ -181,7 +181,7 @@ gst_soup_load_library (void)
+@@ -197,7 +197,7 @@ gst_soup_load_library (void)
+ 
+     if (!libsoup_sonames[0]) {
+       GST_DEBUG ("Trying all libsoups");
+-      libsoup_sonames[0] = LIBSOUP_3_SONAME;
++      libsoup_sonames[0] = "@nixLibSoup3Path@/" LIBSOUP_3_SONAME;
+       libsoup_sonames[1] = LIBSOUP_2_SONAME;
+     }
+   }
+@@ -216,7 +216,7 @@ gst_soup_load_library (void)
        GST_DEBUG ("LibSoup 2 found");
      } else {
        GST_DEBUG ("Trying all libsoups");
diff --git a/pkgs/development/libraries/hamlib/4.nix b/pkgs/development/libraries/hamlib/4.nix
index 8fde56729e837..168a0477b2f84 100644
--- a/pkgs/development/libraries/hamlib/4.nix
+++ b/pkgs/development/libraries/hamlib/4.nix
@@ -5,7 +5,7 @@
 , swig
 , gd
 , ncurses
-, python3
+, python311
 , libxml2
 , tcl
 , libusb-compat-0_1
@@ -17,7 +17,9 @@
 , tclBindings ? true
 , perlBindings ? true
 }:
-
+let
+  python3 = python311; # needs distutils and imp
+in
 stdenv.mkDerivation rec {
   pname = "hamlib";
   version = "4.5.5";
diff --git a/pkgs/development/libraries/hamlib/default.nix b/pkgs/development/libraries/hamlib/default.nix
index 9250a66c219e2..2b7f05bcdef0a 100644
--- a/pkgs/development/libraries/hamlib/default.nix
+++ b/pkgs/development/libraries/hamlib/default.nix
@@ -5,7 +5,7 @@
 , swig
 , gd
 , ncurses
-, python3
+, python311
 , libxml2
 , tcl
 , libusb-compat-0_1
@@ -18,7 +18,9 @@
 , perlBindings ? stdenv.buildPlatform == stdenv.hostPlatform
 , buildPackages
 }:
-
+let
+  python3 = python311; # needs distutils and imp
+in
 stdenv.mkDerivation rec {
   pname = "hamlib";
   version = "3.3";
diff --git a/pkgs/development/libraries/hwloc/default.nix b/pkgs/development/libraries/hwloc/default.nix
index 38550115bfb01..f2316ab657a1b 100644
--- a/pkgs/development/libraries/hwloc/default.nix
+++ b/pkgs/development/libraries/hwloc/default.nix
@@ -9,11 +9,11 @@
 
 stdenv.mkDerivation rec {
   pname = "hwloc";
-  version = "2.11.0";
+  version = "2.11.1";
 
   src = fetchurl {
     url = "https://www.open-mpi.org/software/hwloc/v${lib.versions.majorMinor version}/downloads/hwloc-${version}.tar.bz2";
-    sha256 = "sha256-A5A7h8rV23K9APeSbWpTdEsQxcaiOMa2hRDn3BVg5Pk=";
+    sha256 = "sha256-BM37/60iXOFfZhhPD0FBMn2r8ojRCouE0T9Rest4cMY=";
   };
 
   configureFlags = [
diff --git a/pkgs/development/libraries/icu/default.nix b/pkgs/development/libraries/icu/default.nix
index 0e77aebd14865..4f1e0e4172bbb 100644
--- a/pkgs/development/libraries/icu/default.nix
+++ b/pkgs/development/libraries/icu/default.nix
@@ -1,8 +1,8 @@
-{ stdenv, lib, fetchurl, fetchpatch, fixDarwinDylibNames, testers, buildPackages }:
+{ stdenv, lib, fetchurl, fetchpatch, fixDarwinDylibNames, testers, buildPackages, updateAutotoolsGnuConfigScriptsHook }:
 
 let
   make-icu = (import ./make-icu.nix) {
-    inherit stdenv lib buildPackages fetchurl fixDarwinDylibNames testers;
+    inherit stdenv lib buildPackages fetchurl fixDarwinDylibNames testers updateAutotoolsGnuConfigScriptsHook;
   };
 in
 {
diff --git a/pkgs/development/libraries/icu/make-icu.nix b/pkgs/development/libraries/icu/make-icu.nix
index 3e65e80ef7c4d..575f184c163fb 100644
--- a/pkgs/development/libraries/icu/make-icu.nix
+++ b/pkgs/development/libraries/icu/make-icu.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, buildPackages, fetchurl, fixDarwinDylibNames, testers }:
+{ stdenv, lib, buildPackages, fetchurl, fixDarwinDylibNames, testers, updateAutotoolsGnuConfigScriptsHook }:
 
 { version, hash, patches ? [], patchFlags ? [], withStatic ? stdenv.hostPlatform.isStatic }:
 
@@ -64,9 +64,11 @@ let
     outputs = [ "out" "dev" ] ++ lib.optional withStatic "static";
     outputBin = "dev";
 
-    # FIXME: This fixes dylib references in the dylibs themselves, but
-    # not in the programs in $out/bin.
-    nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
+    nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ] ++
+      # FIXME: This fixes dylib references in the dylibs themselves, but
+      # not in the programs in $out/bin.
+      lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
+
 
     # remove dependency on bootstrap-tools in early stdenv build
     postInstall = lib.optionalString withStatic ''
diff --git a/pkgs/development/libraries/intel-gmmlib/default.nix b/pkgs/development/libraries/intel-gmmlib/default.nix
index 155fca30b00b8..f685a571de0cb 100644
--- a/pkgs/development/libraries/intel-gmmlib/default.nix
+++ b/pkgs/development/libraries/intel-gmmlib/default.nix
@@ -9,13 +9,13 @@
 
 stdenv.mkDerivation rec {
   pname = "intel-gmmlib";
-  version = "22.4.0";
+  version = "22.4.1";
 
   src = fetchFromGitHub {
     owner = "intel";
     repo = "gmmlib";
     rev = "intel-gmmlib-${version}";
-    sha256 = "sha256-8Tjc7rm38pgRE/8ZXRLOqazZHmj5jQJFooSe31Chpww=";
+    sha256 = "sha256-z8FPSqWlSubtt+gurntWnkeKsdO2B+KZXTv2Y+TL7t4=";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/pkgs/development/libraries/irrlichtmt/default.nix b/pkgs/development/libraries/irrlichtmt/default.nix
index 8787fd390efd1..5388589042910 100644
--- a/pkgs/development/libraries/irrlichtmt/default.nix
+++ b/pkgs/development/libraries/irrlichtmt/default.nix
@@ -32,13 +32,14 @@ stdenv.mkDerivation (finalAttrs: {
     libpng
     libjpeg
     libGL
+  ] ++ (if stdenv.hostPlatform.isDarwin then [
+    Cocoa
+    Kernel
+  ] else [
     libX11
     libXi
     libXext
-  ] ++ lib.optionals stdenv.isDarwin [
-    Cocoa
-    Kernel
-  ];
+  ]);
 
   outputs = [ "out" "dev" ];
 
diff --git a/pkgs/development/libraries/java/hsqldb/default.nix b/pkgs/development/libraries/java/hsqldb/default.nix
index c4f9bf9773020..b4aaed0078957 100644
--- a/pkgs/development/libraries/java/hsqldb/default.nix
+++ b/pkgs/development/libraries/java/hsqldb/default.nix
@@ -2,12 +2,12 @@
 
 stdenv.mkDerivation rec {
   pname = "hsqldb";
-  version = "2.7.2";
+  version = "2.7.3";
   underscoreMajMin = lib.replaceStrings ["."] ["_"] (lib.versions.majorMinor version);
 
   src = fetchurl {
     url = "mirror://sourceforge/project/hsqldb/hsqldb/hsqldb_${underscoreMajMin}/hsqldb-${version}.zip";
-    sha256 = "sha256-/7NZy+ZroxeTF7av22LNJ0dlMzvTAWfOMypLLYWXWBI=";
+    sha256 = "sha256-0+3uhZ9/xYI34QiGSnFzPv9WE9ktxlUI36M1vAxbHpQ=";
   };
 
   nativeBuildInputs = [ unzip makeWrapper ];
diff --git a/pkgs/development/libraries/java/lombok/default.nix b/pkgs/development/libraries/java/lombok/default.nix
index de197b7966ef0..87d5f02230e82 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.32";
+  version = "1.18.34";
 
   src = fetchurl {
     url = "https://projectlombok.org/downloads/lombok-${version}.jar";
-    sha256 = "sha256-l1dGdOKiX1Z6MTc2rOAN+Hh9RD3jFkB9V/yHfZ8Zpl0=";
+    sha256 = "sha256-wn1rKv9WJB0bB/y8xrGDcJ5rQyyA9zdO6x2CPobUuBo=";
   };
 
   nativeBuildInputs = [ makeWrapper ];
diff --git a/pkgs/development/libraries/l-smash/default.nix b/pkgs/development/libraries/l-smash/default.nix
index 40eb4bd10d36e..fe3a88dc711c2 100644
--- a/pkgs/development/libraries/l-smash/default.nix
+++ b/pkgs/development/libraries/l-smash/default.nix
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
     homepage = "http://l-smash.github.io/l-smash/";
     description = "MP4 container utilities";
     license = licenses.isc;
-    maintainers = with maintainers; [ tadeokondrak ];
+    maintainers = with maintainers; [ ];
     platforms = platforms.all;
   };
 }
diff --git a/pkgs/development/libraries/libass/default.nix b/pkgs/development/libraries/libass/default.nix
index ad94f55ccb6df..cf8f4c85e0c61 100644
--- a/pkgs/development/libraries/libass/default.nix
+++ b/pkgs/development/libraries/libass/default.nix
@@ -11,11 +11,11 @@ assert fontconfigSupport -> fontconfig != null;
 
 stdenv.mkDerivation rec {
   pname = "libass";
-  version = "0.17.1";
+  version = "0.17.2";
 
   src = fetchurl {
     url = "https://github.com/libass/libass/releases/download/${version}/${pname}-${version}.tar.xz";
-    sha256 = "sha256-8NoLv7pHbBauPhz9hiJW0wkVkR96uqGxbOYu5lMZJ4Q=";
+    sha256 = "sha256-6CYbUdZrqTP+mSSMb92HZ+2WxaflNjyDmSxzWiwvv3Q=";
   };
 
   outputs = [ "out" "dev" ];
diff --git a/pkgs/development/libraries/libdc1394/default.nix b/pkgs/development/libraries/libdc1394/default.nix
index 9ca5581b3bffb..afd53588a336a 100644
--- a/pkgs/development/libraries/libdc1394/default.nix
+++ b/pkgs/development/libraries/libdc1394/default.nix
@@ -10,6 +10,11 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-U3zreN087ycaGD9KF2GR0c7PhfAlUg5r03WLDhnmYJ8=";
   };
 
+  hardeningDisable = [
+    # "sorry, unimplemented: __builtin_clear_padding not supported for variable length aggregates"
+    "trivialautovarinit"
+  ];
+
   buildInputs = [ libusb1 ]
     ++ lib.optional stdenv.isLinux libraw1394
     ++ lib.optional stdenv.isDarwin CoreServices;
diff --git a/pkgs/development/libraries/libdrm/default.nix b/pkgs/development/libraries/libdrm/default.nix
index 8791203881468..31e36be121b5c 100644
--- a/pkgs/development/libraries/libdrm/default.nix
+++ b/pkgs/development/libraries/libdrm/default.nix
@@ -7,11 +7,11 @@
 
 stdenv.mkDerivation rec {
   pname = "libdrm";
-  version = "2.4.120";
+  version = "2.4.121";
 
   src = fetchurl {
     url = "https://dri.freedesktop.org/${pname}/${pname}-${version}.tar.xz";
-    hash = "sha256-O/VTY/dsclCUZEGrUdOmzArlGAVcD/AXMkq3bN77Mno=";
+    hash = "sha256-kJCEpQXXY4iH9ZC3B5Gzu9kGnHEMlI9dHxzm0IDN/Ks=";
   };
 
   outputs = [ "out" "dev" "bin" ];
diff --git a/pkgs/development/libraries/libeatmydata/LFS64.patch b/pkgs/development/libraries/libeatmydata/LFS64.patch
new file mode 100644
index 0000000000000..2a8ab5e088933
--- /dev/null
+++ b/pkgs/development/libraries/libeatmydata/LFS64.patch
@@ -0,0 +1,70 @@
+From 59f04ad8730034a205a1a792662d4b5dc2006b7c Mon Sep 17 00:00:00 2001
+From: Alyssa Ross <hi@alyssa.is>
+Date: Mon, 13 May 2024 09:53:23 +0200
+Subject: [PATCH] Fix sync_file_range() with musl 1.2.4
+
+musl 1.2.4 has removed the transitional LFS off64_t type.
+sync_file_range is declared with off_t in musl, which is always 64
+bits.
+
+This assumes that the same is true of any other libc which doesn't
+provide off64_t.  If it's not, gcc will produce an error due to the
+conflicting types of sync_file_range(), so it will be caught and can
+be fixed.
+---
+ configure.ac                |  2 ++
+ libeatmydata/libeatmydata.c | 11 +++++++++--
+ 2 files changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4d101ba..f3c4a69 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -37,6 +37,8 @@ AC_CHECK_HEADERS_ONCE(pthread.h)
+ AC_CHECK_SIZEOF(mode_t)
+ AC_CHECK_SIZEOF(int)
+ 
++AC_CHECK_TYPES([off64_t])
++
+ AC_CHECK_TYPE(pthread_barrier_t,,,[
+   #ifdef HAVE_PTHREAD_H
+   #include <pthread.h>
+diff --git a/libeatmydata/libeatmydata.c b/libeatmydata/libeatmydata.c
+index 134afcd..0015f1f 100644
+--- a/libeatmydata/libeatmydata.c
++++ b/libeatmydata/libeatmydata.c
+@@ -35,6 +35,12 @@
+ #define CHECK_FILE "/tmp/eatmydata"
+ */
+ 
++#ifdef HAVE_OFF64_T
++typedef off64_t sync_file_range_off;
++#else
++typedef off_t sync_file_range_off;
++#endif
++
+ typedef int (*libc_open_t)(const char*, int, ...);
+ #ifdef HAVE_OPEN64
+ typedef int (*libc_open64_t)(const char*, int, ...);
+@@ -44,7 +50,7 @@ typedef int (*libc_sync_t)(void);
+ typedef int (*libc_fdatasync_t)(int);
+ typedef int (*libc_msync_t)(void*, size_t, int);
+ #ifdef HAVE_SYNC_FILE_RANGE
+-typedef int (*libc_sync_file_range_t)(int, off64_t, off64_t, unsigned int);
++typedef int (*libc_sync_file_range_t)(int, sync_file_range_off, sync_file_range_off, unsigned int);
+ #endif
+ #ifdef HAVE_SYNCFS
+ typedef int (*libc_syncfs_t)(int);
+@@ -259,7 +265,8 @@ int LIBEATMYDATA_API msync(void *addr, size_t length, int flags)
+ }
+ 
+ #ifdef HAVE_SYNC_FILE_RANGE
+-int LIBEATMYDATA_API sync_file_range(int fd, off64_t offset, off64_t nbytes,
++int LIBEATMYDATA_API sync_file_range(int fd, sync_file_range_off offset,
++				     sync_file_range_off nbytes,
+ 				     unsigned int flags)
+ {
+ 	if (eatmydata_is_hungry()) {
+-- 
+2.45.1
+
diff --git a/pkgs/development/libraries/libeatmydata/default.nix b/pkgs/development/libraries/libeatmydata/default.nix
index 2a76731829a7f..f315e32f02d93 100644
--- a/pkgs/development/libraries/libeatmydata/default.nix
+++ b/pkgs/development/libraries/libeatmydata/default.nix
@@ -17,6 +17,11 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-0lrYDW51/KSr809whGwg9FYhzcLRfmoxipIgrK1zFCc=";
   };
 
+  patches = [
+    # https://github.com/stewartsmith/libeatmydata/pull/36
+    ./LFS64.patch
+  ];
+
   postPatch = ''
     patchShebangs .
   '';
diff --git a/pkgs/development/libraries/libevent/default.nix b/pkgs/development/libraries/libevent/default.nix
index ff9784064432e..983395f33b4b6 100644
--- a/pkgs/development/libraries/libevent/default.nix
+++ b/pkgs/development/libraries/libevent/default.nix
@@ -1,4 +1,5 @@
 { lib, stdenv, fetchurl, findutils, fixDarwinDylibNames
+, updateAutotoolsGnuConfigScriptsHook
 , sslSupport ? true, openssl
 , fetchpatch
 }:
@@ -36,7 +37,8 @@ stdenv.mkDerivation rec {
     ++ lib.optional sslSupport "openssl"
     ;
 
-  nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
+  nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ]
+    ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
 
   buildInputs = lib.optional sslSupport openssl
     ++ lib.optional stdenv.isCygwin findutils;
diff --git a/pkgs/development/libraries/libftdi/1.x.nix b/pkgs/development/libraries/libftdi/1.x.nix
index 116f1dca1bbbb..5d579cf8cb333 100644
--- a/pkgs/development/libraries/libftdi/1.x.nix
+++ b/pkgs/development/libraries/libftdi/1.x.nix
@@ -21,12 +21,12 @@ let
 in
 stdenv.mkDerivation rec {
   pname = "libftdi";
-  version = "1.5";
+  version = "1.5-unstable-2023-12-21";
 
   src = fetchgit {
     url = "git://developer.intra2net.com/libftdi";
-    rev = "v${version}";
-    sha256 = "0vipg3y0kbbzjhxky6hfyxy42mpqhvwn1r010zr5givcfp8ghq26";
+    rev = "de9f01ece34d2fe6e842e0250a38f4b16eda2429";
+    hash = "sha256-U37M5P7itTF1262oW+txbKxcw2lhYHAwy1ML51SDVMs=";
   };
 
   strictDeps = true;
diff --git a/pkgs/development/libraries/libhwy/default.nix b/pkgs/development/libraries/libhwy/default.nix
index 664378d42b6d5..7bf78ec875e21 100644
--- a/pkgs/development/libraries/libhwy/default.nix
+++ b/pkgs/development/libraries/libhwy/default.nix
@@ -27,6 +27,12 @@ stdenv.mkDerivation rec {
       hash = "sha256-ileSNYddOt1F5rooRB0fXT20WkVlnG+gP5w7qJdBuww=";
     });
 
+  hardeningDisable = lib.optionals stdenv.hostPlatform.isAarch64 [
+    # aarch64-specific code gets:
+    # __builtin_clear_padding not supported for variable length aggregates
+    "trivialautovarinit"
+  ];
+
   nativeBuildInputs = [ cmake ninja ];
 
   # Required for case-insensitive filesystems ("BUILD" exists)
diff --git a/pkgs/development/libraries/libimobiledevice-glue/default.nix b/pkgs/development/libraries/libimobiledevice-glue/default.nix
index f85c559593d16..13a2e83d04735 100644
--- a/pkgs/development/libraries/libimobiledevice-glue/default.nix
+++ b/pkgs/development/libraries/libimobiledevice-glue/default.nix
@@ -4,21 +4,24 @@
 , autoreconfHook
 , pkg-config
 , libplist
+, nix-update-script
 }:
 
 stdenv.mkDerivation rec {
   pname = "libimobiledevice-glue";
-  version = "1.2.0";
-
-  outputs = [ "out" "dev" ];
+  version = "1.3.0";
 
   src = fetchFromGitHub {
     owner = "libimobiledevice";
     repo = pname;
     rev = version;
-    hash = "sha256-Rfs1i1Tt8uf3WfR+cDlF4L75nFHg9VypjMhHt0TgkyQ=";
+    hash = "sha256-+poCrn2YHeH8RQCfWDdnlmJB4Nf+unWUVwn7YwILHIs=";
   };
 
+  preAutoreconf = ''
+    export RELEASE_VERSION=${version}
+  '';
+
   nativeBuildInputs = [
     autoreconfHook
     pkg-config
@@ -28,9 +31,9 @@ stdenv.mkDerivation rec {
     libplist
   ];
 
-  preAutoreconf = ''
-    export RELEASE_VERSION=${version}
-  '';
+  outputs = [ "out" "dev" ];
+
+  passthru.updateScript = nix-update-script { };
 
   meta = with lib; {
     homepage = "https://github.com/libimobiledevice/libimobiledevice-glue";
diff --git a/pkgs/development/libraries/libimobiledevice/default.nix b/pkgs/development/libraries/libimobiledevice/default.nix
index 59ee89c95422a..0e81f32bebf8f 100644
--- a/pkgs/development/libraries/libimobiledevice/default.nix
+++ b/pkgs/development/libraries/libimobiledevice/default.nix
@@ -12,31 +12,36 @@
 , libimobiledevice-glue
 , SystemConfiguration
 , CoreFoundation
+, unstableGitUpdater
 }:
 
 stdenv.mkDerivation rec {
   pname = "libimobiledevice";
-  version = "1.3.0+date=2023-04-30";
-
-  outputs = [ "out" "dev" ];
+  version = "1.3.0-unstable-2024-05-20";
 
   src = fetchFromGitHub {
     owner = "libimobiledevice";
     repo = pname;
-    rev = "860ffb707af3af94467d2ece4ad258dda957c6cd";
-    hash = "sha256-mIsB+EaGJlGMOpz3OLrs0nAmhOY1BwMs83saFBaejwc=";
+    rev = "9ccc52222c287b35e41625cc282fb882544676c6";
+    hash = "sha256-pNvtDGUlifp10V59Kah4q87TvLrcptrCJURHo+Y+hs4=";
   };
 
   patches = [
-    # Pull upstream fix for clang-16 and upcoming gcc-14 support:
-    #   https://github.com/libimobiledevice/libimobiledevice/pull/1444
+    # Fix gcc-14 and clang-16 build:
+    #   https://github.com/libimobiledevice/libimobiledevice/pull/1569
     (fetchpatch {
-      name = "usleep-decl.patch";
-      url = "https://github.com/libimobiledevice/libimobiledevice/commit/db623184c0aa09c27697f5a2e81025db223075d5.patch";
-      hash = "sha256-TgdgBkEDXzQDSgJxcZc+pZncfmBVXarhHOByGFs6p0Q=";
+      name = "fime.h.patch";
+      url = "https://github.com/libimobiledevice/libimobiledevice/commit/92256c2ae2422dac45d8648a63517598bdd89883.patch";
+      hash = "sha256-sB+wEFuXFoQnuf7ntWfvYuCgWfYbmlPL7EjW0L0F74o=";
     })
   ];
 
+  preAutoreconf = ''
+    export RELEASE_VERSION=${version}
+  '';
+
+  configureFlags = [ "--without-cython" ];
+
   nativeBuildInputs = [
     autoreconfHook
     pkg-config
@@ -54,11 +59,12 @@ stdenv.mkDerivation rec {
     CoreFoundation
   ];
 
-  preAutoreconf = ''
-    export RELEASE_VERSION=${version}
-  '';
 
-  configureFlags = [ "--without-cython" ];
+  outputs = [ "out" "dev" ];
+
+  enableParallelBuilding = true;
+
+  passthru.updateScript = unstableGitUpdater { };
 
   meta = with lib; {
     homepage = "https://github.com/libimobiledevice/libimobiledevice";
diff --git a/pkgs/development/libraries/libinput/default.nix b/pkgs/development/libraries/libinput/default.nix
index f0005969bbcfc..4f7e652e9bb8d 100644
--- a/pkgs/development/libraries/libinput/default.nix
+++ b/pkgs/development/libraries/libinput/default.nix
@@ -45,7 +45,7 @@ in
 
 stdenv.mkDerivation rec {
   pname = "libinput";
-  version = "1.25.0";
+  version = "1.26.0";
 
   outputs = [ "bin" "out" "dev" ];
 
@@ -54,7 +54,7 @@ stdenv.mkDerivation rec {
     owner = "libinput";
     repo = "libinput";
     rev = version;
-    hash = "sha256-c2FU5OW+CIgtYTQy+bwIbaw3SP1pVxaLokhO+ag5/1s=";
+    hash = "sha256-mlxw4OUjaAdgRLFfPKMZDMOWosW9yKAkzDccwuLGCwQ=";
   };
 
   patches = [
diff --git a/pkgs/development/libraries/liblouis/default.nix b/pkgs/development/libraries/liblouis/default.nix
index 8d2a4044458e5..693e1874bdf06 100644
--- a/pkgs/development/libraries/liblouis/default.nix
+++ b/pkgs/development/libraries/liblouis/default.nix
@@ -32,6 +32,10 @@ stdenv.mkDerivation (finalAttrs: {
     pkg-config
     gettext
     python3
+    python3.pkgs.build
+    python3.pkgs.installer
+    python3.pkgs.setuptools
+    python3.pkgs.wheel
     # Docs, man, info
     texinfo
     help2man
@@ -58,7 +62,8 @@ stdenv.mkDerivation (finalAttrs: {
 
   postInstall = ''
     pushd python
-    python setup.py install --prefix="$out" --optimize=1
+    python -m build --no-isolation --outdir dist/ --wheel
+    python -m installer --prefix $out dist/*.whl
     popd
   '';
 
diff --git a/pkgs/development/libraries/libpeas/2.x.nix b/pkgs/development/libraries/libpeas/2.x.nix
index e2d1bf0f82311..f223231eaf0b9 100644
--- a/pkgs/development/libraries/libpeas/2.x.nix
+++ b/pkgs/development/libraries/libpeas/2.x.nix
@@ -17,13 +17,13 @@
 
 stdenv.mkDerivation rec {
   pname = "libpeas";
-  version = "2.0.2";
+  version = "2.0.3";
 
   outputs = [ "out" "dev" "devdoc" ];
 
   src = fetchurl {
     url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
-    hash = "sha256-8w3/7WPKL0BHe0DhccCjH4DZFCW6Hh5HMg7mQlSA7MM=";
+    hash = "sha256-OeO1B8KdLQHfE0XpszgP16nQrrWy5lfTjmwr6lAj5fA=";
   };
 
   patches = [
diff --git a/pkgs/development/libraries/libplacebo/default.nix b/pkgs/development/libraries/libplacebo/default.nix
index 5759d9bed505b..c8f678ccbb9f3 100644
--- a/pkgs/development/libraries/libplacebo/default.nix
+++ b/pkgs/development/libraries/libplacebo/default.nix
@@ -79,7 +79,7 @@ stdenv.mkDerivation rec {
     homepage = "https://code.videolan.org/videolan/libplacebo";
     changelog = "https://code.videolan.org/videolan/libplacebo/-/tags/v${version}";
     license = licenses.lgpl21Plus;
-    maintainers = with maintainers; [ primeos tadeokondrak ];
+    maintainers = with maintainers; [ primeos ];
     platforms = platforms.all;
   };
 }
diff --git a/pkgs/development/libraries/libsurvive/default.nix b/pkgs/development/libraries/libsurvive/default.nix
index dc282886b9637..fae57569067ac 100644
--- a/pkgs/development/libraries/libsurvive/default.nix
+++ b/pkgs/development/libraries/libsurvive/default.nix
@@ -2,7 +2,7 @@
 , fetchFromGitHub
 , cmake
 , pkg-config
-, freeglut
+, libglut
 , lapack
 , libusb1
 , blas
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake pkg-config ];
 
   buildInputs = [
-    freeglut
+    libglut
     lapack
     libusb1
     blas
diff --git a/pkgs/development/libraries/libtiff/default.nix b/pkgs/development/libraries/libtiff/default.nix
index f1e5c7da1803d..b66c8c288bc8b 100644
--- a/pkgs/development/libraries/libtiff/default.nix
+++ b/pkgs/development/libraries/libtiff/default.nix
@@ -1,6 +1,7 @@
 { lib
 , stdenv
 , fetchFromGitLab
+, fetchpatch
 , nix-update-script
 
 , autoreconfHook
@@ -43,6 +44,15 @@ stdenv.mkDerivation (finalAttrs: {
     # libc++abi 11 has an `#include <version>`, this picks up files name
     # `version` in the project's include paths
     ./rename-version.patch
+    # Fix static linking of `libtiff` via `pkg-config` not working
+    # because `libtiff` does not declare `Lerc` dependency.
+    # nixpkgs has `lerc` >= 4 which provides a `.pc` file.
+    # TODO: Close when https://gitlab.com/libtiff/libtiff/-/merge_requests/633 is merged and available
+    (fetchpatch {
+      name = "libtiff-4.pc-Fix-Requires.private-missing-Lerc.patch";
+      url = "https://gitlab.com/libtiff/libtiff/-/commit/ea882c3c240c14a897b9be38d815cc1893aafa59.patch";
+      hash = "sha256-C0xA3k1sgKmGJjEnyG9UxhXqYBYShKUDQsyjhbEDJbQ=";
+    })
   ];
 
   postPatch = ''
diff --git a/pkgs/development/libraries/libtorrent-rasterbar/default.nix b/pkgs/development/libraries/libtorrent-rasterbar/default.nix
index 118d143e2cd5e..55c284987a9b5 100644
--- a/pkgs/development/libraries/libtorrent-rasterbar/default.nix
+++ b/pkgs/development/libraries/libtorrent-rasterbar/default.nix
@@ -25,10 +25,13 @@ in stdenv.mkDerivation {
   buildInputs = [ boostPython openssl zlib python ncurses ]
     ++ lib.optionals stdenv.isDarwin [ SystemConfiguration ];
 
+  patches = [
+    # provide distutils alternative for python 3.12
+    ./distutils.patch
+  ];
+
   # https://github.com/arvidn/libtorrent/issues/6865
   postPatch = ''
-    substituteInPlace cmake/Modules/GeneratePkgConfig.cmake \
-      --replace @CMAKE_INSTALL_PREFIX@/'$<'1: '$<'1:
     substituteInPlace cmake/Modules/GeneratePkgConfig/target-compile-settings.cmake.in \
       --replace 'set(_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@")' \
                 'set(_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@")
diff --git a/pkgs/development/libraries/libtorrent-rasterbar/distutils.patch b/pkgs/development/libraries/libtorrent-rasterbar/distutils.patch
new file mode 100644
index 0000000000000..57c90b69808c0
--- /dev/null
+++ b/pkgs/development/libraries/libtorrent-rasterbar/distutils.patch
@@ -0,0 +1,20 @@
+diff --git a/bindings/python/CMakeLists.txt b/bindings/python/CMakeLists.txt
+index 2f4de4854..a68d547e6 100644
+--- a/bindings/python/CMakeLists.txt
++++ b/bindings/python/CMakeLists.txt
+@@ -95,8 +95,13 @@ if (python-install-system-dir)
+ else()
+ 	execute_process(
+ 		COMMAND "${Python3_EXECUTABLE}" -c [=[
+-import distutils.sysconfig
+-print(distutils.sysconfig.get_python_lib(prefix='', plat_specific=True))
++try:
++	import distutils.sysconfig
++	print(distutils.sysconfig.get_python_lib(prefix='', plat_specific=True))
++except ModuleNotFoundError:
++	import os, sys
++	version = f"{sys.version_info.major}.{sys.version_info.minor}"
++	print(os.sep.join(["lib", f"python{version}", "site-packages"]))
+ ]=]
+ 		OUTPUT_VARIABLE _PYTHON3_SITE_ARCH
+ 		OUTPUT_STRIP_TRAILING_WHITESPACE
diff --git a/pkgs/development/libraries/libunistring/default.nix b/pkgs/development/libraries/libunistring/default.nix
index 51eb5558d626b..e865873c2851b 100644
--- a/pkgs/development/libraries/libunistring/default.nix
+++ b/pkgs/development/libraries/libunistring/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, lib, stdenv, libiconv }:
+{ fetchurl, lib, stdenv, libiconv, updateAutotoolsGnuConfigScriptsHook }:
 
 # Note: this package is used for bootstrapping fetchurl, and thus
 # cannot use fetchpatch! All mutable patches (generated by GitHub or
@@ -18,6 +18,7 @@ stdenv.mkDerivation rec {
 
   strictDeps = true;
   propagatedBuildInputs = lib.optional (!stdenv.isLinux) libiconv;
+  nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ];
 
   configureFlags = [
     "--with-libiconv-prefix=${libiconv}"
diff --git a/pkgs/development/libraries/liburing/default.nix b/pkgs/development/libraries/liburing/default.nix
index a42aab3d59e8c..95df981d02e7d 100644
--- a/pkgs/development/libraries/liburing/default.nix
+++ b/pkgs/development/libraries/liburing/default.nix
@@ -1,44 +1,66 @@
-{ lib, stdenv, fetchgit }:
+{
+  lib,
+  stdenv,
+  fetchFromGitHub,
+}:
 
 stdenv.mkDerivation rec {
   pname = "liburing";
-  version = "2.5";
+  version = "2.6";
 
-  src = fetchgit {
-    url    = "http://git.kernel.dk/${pname}";
-    rev    = "liburing-${version}";
-    sha256 = "sha256-hPyEZ0P1rfos53OCNd2OYFiqmv6TgpWaj5/xPLccCvM=";
+  src = fetchFromGitHub {
+    owner = "axboe";
+    repo = "liburing";
+    rev = "refs/tags/liburing-${version}";
+    hash = "sha256-UOhnFT4UKZmPchKxew3vYeKH2oETDVylE1RmJ2hnLq0=";
   };
 
   separateDebugInfo = true;
   enableParallelBuilding = true;
   # Upstream's configure script is not autoconf generated, but a hand written one.
   setOutputFlags = false;
+  dontDisableStatic = true;
+  dontAddStaticConfigureFlags = true;
   configureFlags = [
     "--includedir=${placeholder "dev"}/include"
     "--mandir=${placeholder "man"}/share/man"
   ];
 
+  # mysterious link failure
+  hardeningDisable = [ "trivialautovarinit" ];
+
   # Doesn't recognize platform flags
-  configurePlatforms = [];
+  configurePlatforms = [ ];
 
-  outputs = [ "out" "bin" "dev" "man" ];
+  outputs = [
+    "out"
+    "bin"
+    "dev"
+    "man"
+  ];
 
   postInstall = ''
-    # Copy the examples into $bin. Most reverse dependency of this package should
-    # reference only the $out output
-    mkdir -p $bin/bin
-    cp ./examples/io_uring-cp examples/io_uring-test $bin/bin
-    cp ./examples/link-cp $bin/bin/io_uring-link-cp
-  '' + lib.optionalString stdenv.hostPlatform.isGnu ''
-    cp ./examples/ucontext-cp $bin/bin/io_uring-ucontext-cp
+    # Always builds both static and dynamic libraries, so we need to remove the
+    # libraries that don't match stdenv type.
+    rm $out/lib/liburing*${
+      if stdenv.hostPlatform.isStatic then ".so*" else ".a"
+    }
+
+    # Copy the examples into $bin. Most reverse dependency of
+    # this package should reference only the $out output
+    for file in $(find ./examples -executable -type f); do
+      install -Dm555 -t "$bin/bin" "$file"
+    done
   '';
 
   meta = with lib; {
     description = "Userspace library for the Linux io_uring API";
-    homepage    = "https://git.kernel.dk/cgit/liburing/";
-    license     = licenses.lgpl21;
-    platforms   = platforms.linux;
-    maintainers = with maintainers; [ thoughtpolice nickcao ];
+    homepage = "https://github.com/axboe/liburing";
+    license = licenses.lgpl21;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [
+      thoughtpolice
+      nickcao
+    ];
   };
 }
diff --git a/pkgs/development/libraries/libva/1.nix b/pkgs/development/libraries/libva/1.nix
index 63be647f015a7..1a9c7309e5424 100644
--- a/pkgs/development/libraries/libva/1.nix
+++ b/pkgs/development/libraries/libva/1.nix
@@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
   # TODO: share libs between minimal and !minimal - perhaps just symlink them
 
   # Add FHS paths for non-NixOS applications.
-  configureFlags = [ "--with-drivers-path=${mesa.drivers.driverLink}/lib/dri:/usr/lib/dri:/usr/lib32/dri" ]
+  configureFlags = lib.optionals stdenv.isLinux [ "--with-drivers-path=${mesa.driverLink}/lib/dri:/usr/lib/dri:/usr/lib32/dri" ]
     ++ lib.optionals (!minimal) [ "--enable-glx" ];
 
   installFlags = [ "dummy_drv_video_ladir=$(out)/lib/dri" ];
diff --git a/pkgs/development/libraries/libva/default.nix b/pkgs/development/libraries/libva/default.nix
index eceba4ac8ebf0..aad42d7e51f80 100644
--- a/pkgs/development/libraries/libva/default.nix
+++ b/pkgs/development/libraries/libva/default.nix
@@ -33,9 +33,9 @@ stdenv.mkDerivation (finalAttrs: {
   buildInputs = [ libdrm ]
     ++ lib.optionals (!minimal) [ libX11 libXext libXfixes wayland libffi libGL ];
 
-  mesonFlags = [
+  mesonFlags = lib.optionals stdenv.isLinux [
     # Add FHS and Debian paths for non-NixOS applications
-    "-Ddriverdir=${mesa.drivers.driverLink}/lib/dri:/usr/lib/dri:/usr/lib32/dri:/usr/lib/x86_64-linux-gnu/dri:/usr/lib/i386-linux-gnu/dri"
+    "-Ddriverdir=${mesa.driverLink}/lib/dri:/usr/lib/dri:/usr/lib32/dri:/usr/lib/x86_64-linux-gnu/dri:/usr/lib/i386-linux-gnu/dri"
   ];
 
   passthru.tests = {
diff --git a/pkgs/development/libraries/libvdpau/default.nix b/pkgs/development/libraries/libvdpau/default.nix
index 906a3c59234a3..8c1c3b7c5e9cd 100644
--- a/pkgs/development/libraries/libvdpau/default.nix
+++ b/pkgs/development/libraries/libvdpau/default.nix
@@ -17,8 +17,7 @@ stdenv.mkDerivation rec {
 
   propagatedBuildInputs = [ xorg.libX11 ];
 
-  mesonFlags = lib.optionals stdenv.isLinux
-    [ "-Dmoduledir=${mesa.drivers.driverLink}/lib/vdpau" ];
+  mesonFlags = lib.optionals stdenv.isLinux [ "-Dmoduledir=${mesa.driverLink}/lib/vdpau" ];
 
   NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-lX11";
 
diff --git a/pkgs/development/libraries/libvpx/default.nix b/pkgs/development/libraries/libvpx/default.nix
index 5f5fc710d14dc..f028a1ca73339 100644
--- a/pkgs/development/libraries/libvpx/default.nix
+++ b/pkgs/development/libraries/libvpx/default.nix
@@ -36,6 +36,10 @@
 , experimentalSpatialSvcSupport ? false # Spatial scalable video coding
 , experimentalFpMbStatsSupport ? false
 , experimentalEmulateHardwareSupport ? false
+
+# for passthru.tests
+, ffmpeg
+, gst_all_1
 }:
 
 let
@@ -89,13 +93,13 @@ assert isCygwin -> unitTestsSupport && webmIOSupport && libyuvSupport;
 
 stdenv.mkDerivation rec {
   pname = "libvpx";
-  version = "1.14.0";
+  version = "1.14.1";
 
   src = fetchFromGitHub {
     owner = "webmproject";
     repo = pname;
     rev = "v${version}";
-    hash = "sha256-duU1exUg7JiKCtZfNxyb/y40hxsXeTIMShf9YounTWA=";
+    hash = "sha256-Pfg7g4y/dqn2VKDQU1LnTJQSj1Tont9/8Je6ShDb2GQ=";
   };
 
   postPatch = ''
@@ -198,6 +202,11 @@ stdenv.mkDerivation rec {
 
   postInstall = ''moveToOutput bin "$bin" '';
 
+  passthru.tests = {
+    inherit (gst_all_1) gst-plugins-good;
+    ffmpeg = ffmpeg.override { withVpx = true; };
+  };
+
   meta = with lib; {
     description = "WebM VP8/VP9 codec SDK";
     homepage    = "https://www.webmproject.org/";
diff --git a/pkgs/development/libraries/libwacom/default.nix b/pkgs/development/libraries/libwacom/default.nix
index 58c9b7c7f6669..22aab5c669447 100644
--- a/pkgs/development/libraries/libwacom/default.nix
+++ b/pkgs/development/libraries/libwacom/default.nix
@@ -8,14 +8,13 @@
 , udev
 , libevdev
 , libgudev
-, libxml2
 , python3
 , valgrind
 }:
 
 stdenv.mkDerivation rec {
   pname = "libwacom";
-  version = "2.11.0";
+  version = "2.12.2";
 
   outputs = [ "out" "dev" ];
 
@@ -23,7 +22,7 @@ stdenv.mkDerivation rec {
     owner = "linuxwacom";
     repo = "libwacom";
     rev = "libwacom-${version}";
-    hash = "sha256-TQOe954Zos3VpAG5M/O5je9dr8d4gOXIwy4xl3o+e1g=";
+    hash = "sha256-dxnXh+O/8q8ShsPbpqvaBPNQR6lJBphBolYTmcJEF/0=";
   };
 
   postPatch = ''
@@ -53,10 +52,6 @@ stdenv.mkDerivation rec {
     "-Dtests=${if doCheck then "enabled" else "disabled"}"
   ];
 
-  checkInputs = [
-    libxml2
-  ];
-
   nativeCheckInputs = [
     valgrind
     (python3.withPackages (ps: with ps; [
diff --git a/pkgs/development/libraries/libwacom/surface.nix b/pkgs/development/libraries/libwacom/surface.nix
index 54f5c424fda31..0d6ec49a6a5b5 100644
--- a/pkgs/development/libraries/libwacom/surface.nix
+++ b/pkgs/development/libraries/libwacom/surface.nix
@@ -7,8 +7,8 @@ let
   libwacom-surface = fetchFromGitHub {
     owner = "linux-surface";
     repo = "libwacom-surface";
-    rev = "v2.10.0-1";
-    hash = "sha256-5/9X20veXazXEdSDGY5aMGQixulqMlC5Av0NGOF9m98=";
+    rev = "v2.12.0-1";
+    hash = "sha256-z/qNXbe89/0GIDj0BDQY6xdjHKA9chAPpviHPtBLjFM=";
   };
 in libwacom.overrideAttrs (old: {
   pname = "libwacom-surface";
diff --git a/pkgs/development/libraries/libwebp/default.nix b/pkgs/development/libraries/libwebp/default.nix
index 2662d4e940081..184a48adf0ddd 100644
--- a/pkgs/development/libraries/libwebp/default.nix
+++ b/pkgs/development/libraries/libwebp/default.nix
@@ -1,6 +1,6 @@
 { lib, stdenv, fetchFromGitHub, autoreconfHook, libtool
 , threadingSupport ? true # multi-threading
-, openglSupport ? false, freeglut, libGL, libGLU # OpenGL (required for vwebp)
+, openglSupport ? false, libglut, libGL, libGLU # OpenGL (required for vwebp)
 , pngSupport ? true, libpng # PNG image format
 , jpegSupport ? true, libjpeg # JPEG image format
 , tiffSupport ? true, libtiff # TIFF image format
@@ -53,7 +53,7 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ autoreconfHook libtool ];
   buildInputs = [ ]
-    ++ lib.optionals openglSupport [ freeglut libGL libGLU ]
+    ++ lib.optionals openglSupport [ libglut libGL libGLU ]
     ++ lib.optionals pngSupport [ libpng ]
     ++ lib.optionals jpegSupport [ libjpeg ]
     ++ lib.optionals tiffSupport [ libtiff ]
diff --git a/pkgs/development/libraries/libxkbcommon/default.nix b/pkgs/development/libraries/libxkbcommon/default.nix
index 7c635eb98b694..6994398eaa90d 100644
--- a/pkgs/development/libraries/libxkbcommon/default.nix
+++ b/pkgs/development/libraries/libxkbcommon/default.nix
@@ -13,7 +13,7 @@
 , libX11
   # To enable the "interactive-wayland" subcommand of xkbcli. This is the
   # wayland equivalent of `xev` on X11.
-, xorgserver # for Xvfb in tests
+, xorg
 , withWaylandTools ? stdenv.isLinux
 , wayland
 , wayland-protocols
@@ -38,7 +38,7 @@ stdenv.mkDerivation (finalAttrs: {
   outputs = [ "out" "dev" "doc" ];
 
   depsBuildBuild = [ pkg-config ];
-  nativeBuildInputs = [ meson ninja pkg-config bison doxygen xorgserver ]
+  nativeBuildInputs = [ meson ninja pkg-config bison doxygen xorg.xvfb ]
     ++ lib.optional withWaylandTools wayland-scanner;
   buildInputs = [ xkeyboard_config libxcb libxml2 ]
     ++ lib.optionals withWaylandTools [ wayland wayland-protocols ];
diff --git a/pkgs/development/libraries/libxslt/default.nix b/pkgs/development/libraries/libxslt/default.nix
index 1938c523006b2..df04c749d07e8 100644
--- a/pkgs/development/libraries/libxslt/default.nix
+++ b/pkgs/development/libraries/libxslt/default.nix
@@ -15,16 +15,16 @@
 , gnome
 }:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
   pname = "libxslt";
-  version = "1.1.39";
+  version = "1.1.41";
 
   outputs = [ "bin" "dev" "out" "doc" "devdoc" ] ++ lib.optional pythonSupport "py";
   outputMan = "bin";
 
   src = fetchurl {
-    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
-    hash = "sha256-KiCtYhFIM5sHWcTU6WcZNi3uZMmgltu6YlugU4RjSfA=";
+    url = "mirror://gnome/sources/libxslt/${lib.versions.majorMinor finalAttrs.version}/libxslt-${finalAttrs.version}.tar.xz";
+    hash = "sha256-OtOSr5ERW3dA97UNIozBxfwTr8HafxbLAhORejf3G9o=";
   };
 
   strictDeps = true;
@@ -75,7 +75,7 @@ stdenv.mkDerivation rec {
     inherit pythonSupport;
 
     updateScript = gnome.updateScript {
-      packageName = pname;
+      packageName = "libxslt";
       versionPolicy = "none";
     };
   };
@@ -88,4 +88,4 @@ stdenv.mkDerivation rec {
     maintainers = with maintainers; [ eelco jtojnar ];
     broken = pythonSupport && !libxml2.pythonSupport; # see #73102 for why this is not an assert
   };
-}
+})
diff --git a/pkgs/development/libraries/mesa-glu/default.nix b/pkgs/development/libraries/mesa-glu/default.nix
index bcff20f1847cd..138e7f247c13e 100644
--- a/pkgs/development/libraries/mesa-glu/default.nix
+++ b/pkgs/development/libraries/mesa-glu/default.nix
@@ -1,6 +1,6 @@
 { lib, stdenv, fetchurl
 , meson, ninja
-, pkg-config, libGL, ApplicationServices
+, pkg-config, libGLX
 , testers
 , gitUpdater
 }:
@@ -17,8 +17,7 @@ stdenv.mkDerivation (finalAttrs: {
   };
 
   nativeBuildInputs = [ meson ninja pkg-config ];
-  propagatedBuildInputs = [ libGL ]
-    ++ lib.optional stdenv.isDarwin ApplicationServices;
+  propagatedBuildInputs = [ libGLX ];
 
   outputs = [ "out" "dev" ];
 
@@ -35,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: {
     updateScript = gitUpdater {
       # No nicer place to find latest release.
       url = "https://gitlab.freedesktop.org/mesa/glu";
-    rev-prefix = "glu-";
+      rev-prefix = "glu-";
     };
   };
 
diff --git a/pkgs/development/libraries/mesa/common.nix b/pkgs/development/libraries/mesa/common.nix
new file mode 100644
index 0000000000000..b42403d10aee3
--- /dev/null
+++ b/pkgs/development/libraries/mesa/common.nix
@@ -0,0 +1,31 @@
+{ lib, fetchurl }:
+rec {
+  pname = "mesa";
+  version = "24.1.2";
+
+  src = fetchurl {
+    urls = [
+      "https://archive.mesa3d.org/mesa-${version}.tar.xz"
+      "https://mesa.freedesktop.org/archive/mesa-${version}.tar.xz"
+    ];
+    hash = "sha256-osWEyNV9O9i6EXkKbprjcT+IId+WwFm3ivsp3Zdcn0U=";
+  };
+
+  meta = {
+    description = "Open source 3D graphics library";
+    longDescription = ''
+      The Mesa project began as an open-source implementation of the OpenGL
+      specification - a system for rendering interactive 3D graphics. Over the
+      years the project has grown to implement more graphics APIs, including
+      OpenGL ES (versions 1, 2, 3), OpenCL, OpenMAX, VDPAU, VA API, XvMC, and
+      Vulkan.  A variety of device drivers allows the Mesa libraries to be used
+      in many different environments ranging from software emulation to
+      complete hardware acceleration for modern GPUs.
+    '';
+    homepage = "https://www.mesa3d.org/";
+    changelog = "https://www.mesa3d.org/relnotes/${version}.html";
+    license = with lib.licenses; [ mit ]; # X11 variant, in most files
+    platforms = lib.platforms.mesaPlatforms;
+    maintainers = with lib.maintainers; [ primeos vcunat ]; # Help is welcome :)
+  };
+}
diff --git a/pkgs/development/libraries/mesa/darwin.nix b/pkgs/development/libraries/mesa/darwin.nix
new file mode 100644
index 0000000000000..aeeb8ab7648b3
--- /dev/null
+++ b/pkgs/development/libraries/mesa/darwin.nix
@@ -0,0 +1,53 @@
+# The Darwin build of Mesa is different enough that we just give it an entire separate expression.
+{
+  lib,
+  stdenv,
+  fetchurl,
+  bison,
+  flex,
+  meson,
+  ninja,
+  pkg-config,
+  python3Packages,
+  Xplugin,
+  xorg,
+  zlib,
+}:
+let
+  common = import ./common.nix { inherit lib fetchurl; };
+in stdenv.mkDerivation {
+  inherit (common) pname version src meta;
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [
+    bison
+    flex
+    meson
+    ninja
+    pkg-config
+    python3Packages.packaging
+    python3Packages.python
+    python3Packages.mako
+  ];
+
+  buildInputs = [
+    Xplugin
+    xorg.libX11
+    xorg.libXext
+    xorg.libXfixes
+    zlib
+  ];
+
+  mesonAutoFeatures = "disabled";
+
+  mesonFlags = [
+    "--sysconfdir=/etc"
+    "--datadir=${placeholder "out"}/share"
+    (lib.mesonEnable "glvnd" false)
+    (lib.mesonEnable "shared-glapi" true)
+  ];
+
+  # Don't need this on Darwin.
+  passthru.llvmpipeHook = null;
+}
diff --git a/pkgs/development/libraries/mesa/darwin.patch b/pkgs/development/libraries/mesa/darwin.patch
deleted file mode 100644
index 4649e09afb5ff..0000000000000
--- a/pkgs/development/libraries/mesa/darwin.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff --git a/src/glx/glxext.c b/src/glx/glxext.c
-index 8770863eb7c..537f0af112c 100644
---- a/src/glx/glxext.c
-+++ b/src/glx/glxext.c
-@@ -886,10 +886,11 @@ __glXInitialize(Display * dpy)
-    Bool zink = False;
-    Bool try_zink = False;
- 
-+   const char *env = getenv("MESA_LOADER_DRIVER_OVERRIDE");
-+
- #if defined(GLX_DIRECT_RENDERING) && (!defined(GLX_USE_APPLEGL) || defined(GLX_USE_APPLE))
-    Bool glx_direct = !debug_get_bool_option("LIBGL_ALWAYS_INDIRECT", false);
-    Bool glx_accel = !debug_get_bool_option("LIBGL_ALWAYS_SOFTWARE", false);
--   const char *env = getenv("MESA_LOADER_DRIVER_OVERRIDE");
- 
-    zink = env && !strcmp(env, "zink");
-    try_zink = False;
diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix
index af5baf1bc3a5f..43aa88034168e 100644
--- a/pkgs/development/libraries/mesa/default.nix
+++ b/pkgs/development/libraries/mesa/default.nix
@@ -1,6 +1,4 @@
 { lib
-, OpenGL
-, Xplugin
 , bison
 , buildPackages
 , directx-headers
@@ -14,7 +12,6 @@
 , intltool
 , jdupes
 , libdrm
-, libffi
 , libglvnd
 , libomxil-bellagio
 , libunwind
@@ -24,7 +21,6 @@
 , lm_sensors
 , meson
 , ninja
-, openssl
 , pkg-config
 , python3Packages
 , rust-bindgen
@@ -42,19 +38,9 @@
 , xcbutilkeysyms
 , xorg
 , zstd
-, withValgrind ?
-  lib.meta.availableOn stdenv.hostPlatform valgrind-light
-  && !valgrind-light.meta.broken
-, withLibunwind ? lib.meta.availableOn stdenv.hostPlatform libunwind
-, enableGalliumNine ? stdenv.isLinux
-, enableOSMesa ? stdenv.isLinux
-, enableOpenCL ? stdenv.isLinux && stdenv.isx86_64
-, enableTeflon ? stdenv.isLinux && stdenv.isAarch64  # currently only supports aarch64 SoCs, may change in the future
 , enablePatentEncumberedCodecs ? true
 
-, galliumDrivers ?
-  if stdenv.isLinux
-  then [
+, galliumDrivers ? [
     "d3d12" # WSL emulated GPU (aka Dozen)
     "iris" # new Intel (Broadwell+)
     "kmsro" # special "render only" driver for GPUs without a display controller
@@ -79,10 +65,7 @@
     "crocus" # Intel legacy, x86 only
     "i915" # Intel extra legacy, x86 only
   ]
-  else [ "auto" ]
-, vulkanDrivers ?
-  if stdenv.isLinux
-  then [
+, vulkanDrivers ? [
     "amd" # AMD (aka RADV)
     "intel" # new Intel (aka ANV)
     "microsoft-experimental" # WSL virtualized GPU (aka DZN/Dozen)
@@ -100,32 +83,20 @@
   ] ++ lib.optionals stdenv.hostPlatform.isx86 [
     "intel_hasvk" # Intel Haswell/Broadwell, "legacy" Vulkan driver (https://www.phoronix.com/news/Intel-HasVK-Drop-Dead-Code)
   ]
-  else [ "auto" ]
-, eglPlatforms ? [ "x11" ] ++ lib.optionals stdenv.isLinux [ "wayland" ]
-, vulkanLayers ? lib.optionals (!stdenv.isDarwin) [ # No Vulkan support on Darwin
-  "device-select"
-  "overlay"
-  "intel-nullhw"
-]
+, eglPlatforms ? [ "x11" "wayland" ]
+, vulkanLayers ? [
+    "device-select"
+    "overlay"
+    "intel-nullhw"
+  ]
+, mesa
+, makeSetupHook
 }:
 
 # When updating this package, please verify at least these build (assuming x86_64-linux):
 # nix build .#mesa .#pkgsi686Linux.mesa .#pkgsCross.aarch64-multiplatform.mesa .#pkgsMusl.mesa
 
 let
-  version = "24.1.1";
-  hash = "sha256-ADiCbG9+iNkLTOb3GRkvpYyn3t9O3KoRdM972SDvieo=";
-
-  # Release calendar: https://www.mesa3d.org/release-calendar.html
-  # Release frequency: https://www.mesa3d.org/releasing.html#schedule
-  branch = lib.versions.major version;
-
-  withLibdrm = lib.meta.availableOn stdenv.hostPlatform libdrm;
-
-  haveWayland = lib.elem "wayland" eglPlatforms;
-  haveZink = lib.elem "zink" galliumDrivers;
-  haveDozen = (lib.elem "d3d12" galliumDrivers) || (lib.elem "microsoft-experimental" vulkanDrivers);
-
   rustDeps = [
     {
       pname = "paste";
@@ -162,28 +133,13 @@ let
   copyRustDeps = lib.concatStringsSep "\n" (builtins.map copyRustDep rustDeps);
 
   needNativeCLC = !stdenv.buildPlatform.canExecute stdenv.hostPlatform;
-self = stdenv.mkDerivation {
-  pname = "mesa";
-  inherit version;
-
-  src = fetchurl {
-    urls = [
-      "https://archive.mesa3d.org/mesa-${version}.tar.xz"
-      "https://mesa.freedesktop.org/archive/mesa-${version}.tar.xz"
-      "ftp://ftp.freedesktop.org/pub/mesa/mesa-${version}.tar.xz"
-      "ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz"
-      "ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz"
-    ];
-    inherit hash;
-  };
+
+  common = import ./common.nix { inherit lib fetchurl; };
+in stdenv.mkDerivation {
+  inherit (common) pname version src meta;
 
   patches = [
     ./opencl.patch
-  ] ++ lib.optionals stdenv.isDarwin [
-    # Reorder things to make it build on Darwin again
-    # Submitted upstream: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29592
-    # FIXME: remove when merged or otherwise addressed
-    ./darwin.patch
   ];
 
   postPatch = ''
@@ -201,16 +157,7 @@ self = stdenv.mkDerivation {
   '';
 
   outputs = [
-    "out" "dev" "drivers"
-  ] ++ lib.optionals enableOSMesa [
-    "osmesa"
-  ] ++ lib.optionals stdenv.isLinux [
-    "driversdev"
-  ] ++ lib.optionals enableTeflon [
-    "teflon"
-  ] ++ lib.optionals enableOpenCL [
-    "opencl"
-  ] ++ lib.optionals haveDozen [
+    "out" "dev" "drivers" "driversdev" "opencl" "teflon" "osmesa"
     # the Dozen drivers depend on libspirv2dxil, but link it statically, and
     # libspirv2dxil itself is pretty chonky, so relocate it to its own output in
     # case anything wants to use it at some point
@@ -228,69 +175,49 @@ self = stdenv.mkDerivation {
 
   mesonFlags = [
     "--sysconfdir=/etc"
-    "--datadir=${placeholder "drivers"}/share" # Vendor files
-
-    # Don't build in debug mode
-    # https://gitlab.freedesktop.org/mesa/mesa/blob/master/docs/meson.html#L327
-    (lib.mesonBool "b_ndebug" true)
-
-    (lib.mesonOption "dri-search-path" "${libglvnd.driverLink}/lib/dri")
+    "--datadir=${placeholder "drivers"}/share"
 
+    # What to build
     (lib.mesonOption "platforms" (lib.concatStringsSep "," eglPlatforms))
     (lib.mesonOption "gallium-drivers" (lib.concatStringsSep "," galliumDrivers))
     (lib.mesonOption "vulkan-drivers" (lib.concatStringsSep "," vulkanDrivers))
+    (lib.mesonOption "vulkan-layers" (builtins.concatStringsSep "," vulkanLayers))
 
+    # Make sure we know where to find all the drivers
     (lib.mesonOption "dri-drivers-path" "${placeholder "drivers"}/lib/dri")
     (lib.mesonOption "vdpau-libs-path" "${placeholder "drivers"}/lib/vdpau")
     (lib.mesonOption "omx-libs-path" "${placeholder "drivers"}/lib/bellagio")
     (lib.mesonOption "va-libs-path" "${placeholder "drivers"}/lib/dri")
     (lib.mesonOption "d3d-drivers-path" "${placeholder "drivers"}/lib/d3d")
 
-    (lib.mesonBool "gallium-nine" enableGalliumNine) # Direct3D in Wine
-    (lib.mesonBool "osmesa" enableOSMesa) # used by wine
-    (lib.mesonBool "teflon" enableTeflon) # TensorFlow frontend
-    (lib.mesonEnable "microsoft-clc" false) # Only relevant on Windows (OpenCL 1.2 API on top of D3D12)
-
-    # To enable non-mesa gbm backends to be found (e.g. Nvidia)
+    # Set search paths for non-Mesa drivers (e.g. Nvidia)
+    (lib.mesonOption "dri-search-path" "${libglvnd.driverLink}/lib/dri")
     (lib.mesonOption "gbm-backends-path" "${libglvnd.driverLink}/lib/gbm:${placeholder "out"}/lib/gbm")
 
-    # meson auto_features enables these features, but we do not want them
-    (lib.mesonEnable "android-libbacktrace" false)
-  ] ++ lib.optionals stdenv.isLinux [
+    # Enable glvnd for dynamic libGL dispatch
     (lib.mesonEnable "glvnd" true)
+
+    (lib.mesonBool "gallium-nine" true) # Direct3D in Wine
+    (lib.mesonBool "osmesa" true) # used by wine
+    (lib.mesonBool "teflon" true) # TensorFlow frontend
+
+    # Enable Intel RT stuff when available
     (lib.mesonBool "install-intel-clc" true)
     (lib.mesonEnable "intel-rt" stdenv.isx86_64)
     (lib.mesonOption "clang-libdir" "${llvmPackages.clang-unwrapped.lib}/lib")
-  ] ++ lib.optionals stdenv.isDarwin [
-    # Disable features that are explicitly unsupported on the platform
-    (lib.mesonEnable "gbm" false)
-    (lib.mesonEnable "xlib-lease" false)
-    (lib.mesonEnable "egl" false)
-    (lib.mesonEnable "gallium-vdpau" false)
-    (lib.mesonEnable "gallium-va" false)
-    (lib.mesonEnable "gallium-xa" false)
-    (lib.mesonEnable "lmsensors" false)
-    # Don’t build with glvnd support to make sure Mesa builds libGL on Darwin
-    (lib.mesonEnable "glvnd" false)
-    # This gets enabled by mesonAutoFeatures and fails on aarch64-darwin,
-    # which makes no sense because Darwin has neither Intel nor RT, but OK
-    (lib.mesonEnable "intel-rt" false)
-  ] ++ lib.optionals enableOpenCL [
+
     # Clover, old OpenCL frontend
     (lib.mesonOption "gallium-opencl" "icd")
     (lib.mesonBool "opencl-spirv" true)
 
     # Rusticl, new OpenCL frontend
     (lib.mesonBool "gallium-rusticl" true)
-  ] ++ lib.optionals (!withValgrind) [
-    (lib.mesonEnable "valgrind" false)
-  ] ++ lib.optionals (!withLibunwind) [
-    (lib.mesonEnable "libunwind" false)
-  ]
-  ++ lib.optionals enablePatentEncumberedCodecs [
+
+    # meson auto_features enables this, but we do not want it
+    (lib.mesonEnable "android-libbacktrace" false)
+    (lib.mesonEnable "microsoft-clc" false) # Only relevant on Windows (OpenCL 1.2 API on top of D3D12)
+  ] ++ lib.optionals enablePatentEncumberedCodecs [
     (lib.mesonOption "video-codecs" "all")
-  ] ++ lib.optionals (vulkanLayers != []) [
-    (lib.mesonOption "vulkan-layers" (builtins.concatStringsSep "," vulkanLayers))
   ] ++ lib.optionals needNativeCLC [
     (lib.mesonOption "intel-clc" "system")
   ];
@@ -298,61 +225,41 @@ self = stdenv.mkDerivation {
   strictDeps = true;
 
   buildInputs = with xorg; [
+    directx-headers
+    elfutils
     expat
     glslang
-    libffi
     libglvnd
+    libomxil-bellagio
+    libunwind
+    libva-minimal
     libvdpau
-    llvmPackages.libllvm
-    openssl
-    zstd
-  ] ++ (with xorg; [
     libX11
+    libxcb
     libXext
     libXfixes
     libXrandr
-    libXt
-    libXvMC
-    libpthreadstubs
-    libxcb
     libxshmfence
-    xcbutilkeysyms
-    xorgproto
-  ]) ++ lib.optionals withLibunwind [
-    libunwind
-  ] ++ [
-    python3Packages.python # for shebang
-  ] ++ lib.optionals haveWayland [
-    wayland
-    wayland-protocols
-  ] ++ lib.optionals stdenv.isLinux [
-    libomxil-bellagio
-    libva-minimal
+    libXxf86vm
+    llvmPackages.clang
     llvmPackages.clang-unwrapped
     llvmPackages.libclc
+    llvmPackages.libllvm
     lm_sensors
+    python3Packages.python # for shebang
     spirv-llvm-translator
     udev
-  ] ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform elfutils) [
-    elfutils
-  ] ++ lib.optionals enableOpenCL [
-    llvmPackages.clang
-  ] ++ lib.optionals withValgrind [
     valgrind-light
-  ] ++ lib.optionals haveZink [
     vulkan-loader
-  ] ++ lib.optionals haveDozen [
-    directx-headers
+    wayland
+    wayland-protocols
+    xcbutilkeysyms
+    xorgproto
+    zstd
   ];
 
   depsBuildBuild = [
     pkg-config
-  ] ++ lib.optionals (!stdenv.isDarwin) [
-    # Adding this unconditionally makes x86_64-darwin pick up an older
-    # toolchain, as we explicitly call Mesa with 11.0 stdenv, but buildPackages
-    # is still 10.something, and Mesa can't build with that.
-    # FIXME: figure this out, or figure out how to get rid of Mesa on Darwin,
-    # whichever is easier.
     buildPackages.stdenv.cc
   ];
 
@@ -365,6 +272,7 @@ self = stdenv.mkDerivation {
     flex
     file
     python3Packages.python
+    python3Packages.packaging
     python3Packages.pycparser
     python3Packages.mako
     python3Packages.ply
@@ -374,7 +282,6 @@ self = stdenv.mkDerivation {
     rust-bindgen
     rust-cbindgen
     rustPlatform.bindgenHook
-  ] ++ lib.optionals haveWayland [
     wayland-scanner
   ] ++ lib.optionals needNativeCLC [
     buildPackages.mesa.driversdev
@@ -384,74 +291,48 @@ self = stdenv.mkDerivation {
     buildPackages.mesa.driversdev
   ];
 
-  propagatedBuildInputs = (with xorg; [
-    libXdamage
-    libXxf86vm
-  ]) ++ lib.optionals withLibdrm [
-    libdrm
-  ] ++ lib.optionals stdenv.isDarwin [
-    OpenGL
-    Xplugin
-  ];
+  propagatedBuildInputs = [ libdrm ];
 
   doCheck = false;
 
   postInstall = ''
-    # Some installs don't have any drivers so this directory is never created.
-    mkdir -p $drivers $osmesa
-  '' + lib.optionalString stdenv.isLinux ''
-    mkdir -p $drivers/lib
-
-    if [ -n "$(shopt -s nullglob; echo "$out/lib/libxatracker"*)" -o -n "$(shopt -s nullglob; echo "$out/lib/libvulkan_"*)" ]; then
-      # move gallium-related stuff to $drivers, so $out doesn't depend on LLVM
-      mv -t $drivers/lib       \
-        $out/lib/libpowervr_rogue* \
-        $out/lib/libxatracker* \
-        $out/lib/libvulkan_*
-    fi
-
-    if [ -n "$(shopt -s nullglob; echo "$out"/lib/lib*_mesa*)" ]; then
-      # Move other drivers to a separate output
-      mv -t $drivers/lib $out/lib/lib*_mesa*
-    fi
-
-    # Update search path used by glvnd
+    # Move driver-related bits to $drivers
+    moveToOutput "lib/lib*_mesa*" $drivers
+    moveToOutput "lib/libpowervr_rogue*" $drivers
+    moveToOutput "lib/libxatracker*" $drivers
+    moveToOutput "lib/libvulkan_*" $drivers
+
+    # Update search path used by glvnd (it's pointing to $out but drivers are in $drivers)
     for js in $drivers/share/glvnd/egl_vendor.d/*.json; do
-      substituteInPlace "$js" --replace '"libEGL_' '"'"$drivers/lib/libEGL_"
+      substituteInPlace "$js" --replace-fail '"libEGL_' '"'"$drivers/lib/libEGL_"
     done
 
-    # Update search path used by Vulkan (it's pointing to $out but
-    # drivers are in $drivers)
+    # And same for Vulkan
     for js in $drivers/share/vulkan/icd.d/*.json; do
-      substituteInPlace "$js" --replace "$out" "$drivers"
+      substituteInPlace "$js" --replace-fail "$out" "$drivers"
     done
-  '' + lib.optionalString enableOpenCL ''
-    # Move OpenCL stuff
-    mkdir -p $opencl/lib
-    mv -t "$opencl/lib/"     \
-      $out/lib/gallium-pipe   \
-      $out/lib/lib*OpenCL*
-
-    # We construct our own .icd files that contain absolute paths.
-    mkdir -p $opencl/etc/OpenCL/vendors/
-    echo $opencl/lib/libMesaOpenCL.so > $opencl/etc/OpenCL/vendors/mesa.icd
-    echo $opencl/lib/libRusticlOpenCL.so > $opencl/etc/OpenCL/vendors/rusticl.icd
-  '' + lib.optionalString enableOSMesa ''
-    # move libOSMesa to $osmesa, as it's relatively big
-    mkdir -p $osmesa/lib
-    mv -t $osmesa/lib/ $out/lib/libOSMesa*
-  '' + lib.optionalString (vulkanLayers != []) ''
-    mv -t $drivers/lib $out/lib/libVkLayer*
+
+    # Move Vulkan layers to $drivers and update manifests
+    moveToOutput "lib/libVkLayer*" $drivers
     for js in $drivers/share/vulkan/{im,ex}plicit_layer.d/*.json; do
       substituteInPlace "$js" --replace '"libVkLayer_' '"'"$drivers/lib/libVkLayer_"
     done
-  '' + lib.optionalString haveDozen ''
-    mkdir -p $spirv2dxil/{bin,lib}
-    mv -t $spirv2dxil/lib $out/lib/libspirv_to_dxil*
-    mv -t $spirv2dxil/bin $out/bin/spirv2dxil
+
+    # Construct our own .icd files that contain absolute paths.
+    mkdir -p $opencl/etc/OpenCL/vendors/
+    echo $opencl/lib/libMesaOpenCL.so > $opencl/etc/OpenCL/vendors/mesa.icd
+    echo $opencl/lib/libRusticlOpenCL.so > $opencl/etc/OpenCL/vendors/rusticl.icd
+
+    moveToOutput bin/intel_clc $driversdev
+    moveToOutput lib/gallium-pipe $opencl
+    moveToOutput "lib/lib*OpenCL*" $opencl
+    moveToOutput "lib/libOSMesa*" $osmesa
+    moveToOutput bin/spirv2dxil $spirv2dxil
+    moveToOutput "lib/libspirv_to_dxil*" $spirv2dxil
+    moveToOutput lib/libteflon.so $teflon
   '';
 
-  postFixup = lib.optionalString stdenv.isLinux ''
+  postFixup = ''
     # set the default search path for DRI drivers; used e.g. by X server
     for pc in lib/pkgconfig/{dri,d3d}.pc; do
       [ -f "$dev/$pc" ] && substituteInPlace "$dev/$pc" --replace "$drivers" "${libglvnd.driverLink}"
@@ -471,8 +352,6 @@ self = stdenv.mkDerivation {
       fi
     done
 
-    moveToOutput bin/intel_clc $driversdev
-
     # Don't depend on build python
     patchShebangs --host --update $out/bin/*
 
@@ -486,59 +365,31 @@ self = stdenv.mkDerivation {
         patchelf --set-rpath "$(patchelf --print-rpath $lib):$drivers/lib" "$lib"
       fi
     done
-    # add RPATH here so Zink can find libvulkan.so
-    ${lib.optionalString haveZink ''
-      patchelf --add-rpath ${vulkan-loader}/lib $drivers/lib/dri/zink_dri.so
-    ''}
 
-    ${lib.optionalString enableTeflon ''
-      moveToOutput lib/libteflon.so $teflon
-    ''}
+    # add RPATH here so Zink can find libvulkan.so
+    patchelf --add-rpath ${vulkan-loader}/lib $drivers/lib/dri/zink_dri.so
   '';
 
-  env.NIX_CFLAGS_COMPILE = toString (
-    lib.optionals stdenv.isDarwin [
-      "-fno-common"
-    ] ++ lib.optionals enableOpenCL [
-      "-UPIPE_SEARCH_DIR"
-      "-DPIPE_SEARCH_DIR=\"${placeholder "opencl"}/lib/gallium-pipe\""
+  env.NIX_CFLAGS_COMPILE = toString ([
+    "-UPIPE_SEARCH_DIR"
+    "-DPIPE_SEARCH_DIR=\"${placeholder "opencl"}/lib/gallium-pipe\""
   ]);
 
   passthru = {
     inherit (libglvnd) driverLink;
     inherit llvmPackages;
 
-    libdrm = if withLibdrm then libdrm else null;
-
-    tests = lib.optionalAttrs stdenv.isLinux {
-      devDoesNotDependOnLLVM = stdenv.mkDerivation {
-        name = "mesa-dev-does-not-depend-on-llvm";
-        buildCommand = ''
-          echo ${self.dev} >>$out
-        '';
-        disallowedRequisites = [ llvmPackages.llvm self.drivers ];
-      };
+    tests.devDoesNotDependOnLLVM = stdenv.mkDerivation {
+      name = "mesa-dev-does-not-depend-on-llvm";
+      buildCommand = ''
+        echo ${mesa.dev} >>$out
+      '';
+      disallowedRequisites = [ llvmPackages.llvm mesa.drivers ];
     };
-  };
 
-  meta = {
-    description = "Open source 3D graphics library";
-    longDescription = ''
-      The Mesa project began as an open-source implementation of the OpenGL
-      specification - a system for rendering interactive 3D graphics. Over the
-      years the project has grown to implement more graphics APIs, including
-      OpenGL ES (versions 1, 2, 3), OpenCL, OpenMAX, VDPAU, VA API, XvMC, and
-      Vulkan.  A variety of device drivers allows the Mesa libraries to be used
-      in many different environments ranging from software emulation to
-      complete hardware acceleration for modern GPUs.
-    '';
-    homepage = "https://www.mesa3d.org/";
-    changelog = "https://www.mesa3d.org/relnotes/${version}.html";
-    license = with lib.licenses; [ mit ]; # X11 variant, in most files
-    platforms = lib.platforms.mesaPlatforms;
-    badPlatforms = []; # Load bearing for libGL meta on Darwin.
-    maintainers = with lib.maintainers; [ primeos vcunat ]; # Help is welcome :)
+    llvmpipeHook = makeSetupHook {
+      name = "llvmpipe-hook";
+      substitutions.drivers = mesa.drivers;
+    } ./llvmpipe-hook.sh;
   };
-};
-
-in self
+}
diff --git a/pkgs/development/libraries/mesa/llvmpipe-hook.sh b/pkgs/development/libraries/mesa/llvmpipe-hook.sh
new file mode 100644
index 0000000000000..6217182b15e89
--- /dev/null
+++ b/pkgs/development/libraries/mesa/llvmpipe-hook.sh
@@ -0,0 +1,14 @@
+# shellcheck shell=bash
+
+# https://docs.mesa3d.org/envvars.html
+export LIBGL_ALWAYS_SOFTWARE=true
+export LIBGL_DRIVERS_PATH=@drivers@/lib/dri
+
+# https://github.com/NVIDIA/libglvnd/blob/master/src/EGL/icd_enumeration.md
+export __EGL_VENDOR_LIBRARY_FILENAMES=@drivers@/share/glvnd/egl_vendor.d/50_mesa.json
+
+# https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderInterfaceArchitecture.md
+# glob because the filenames contain an architecture suffix
+# echo is needed to force-expand the glob
+VK_DRIVER_FILES="$(echo @drivers@/share/vulkan/icd.d/lvp_icd.*.json)"
+export VK_DRIVER_FILES
diff --git a/pkgs/development/libraries/mesa/stubs.nix b/pkgs/development/libraries/mesa/stubs.nix
deleted file mode 100644
index f9c462e9b3267..0000000000000
--- a/pkgs/development/libraries/mesa/stubs.nix
+++ /dev/null
@@ -1,88 +0,0 @@
-{ stdenv
-, libglvnd
-, mesa
-, OpenGL
-, testers
-}:
-
-stdenv.mkDerivation (finalAttrs: {
-  pname = "libGL";
-  inherit (if stdenv.hostPlatform.isDarwin then mesa else libglvnd) version;
-  outputs = [ "out" "dev" ];
-
-  # On macOS, libglvnd is not supported, so we just use what mesa
-  # build. We need to also include OpenGL.framework, and some
-  # extra tricks to go along with. We add mesa’s libGLX to support
-  # the X extensions to OpenGL.
-  buildCommand = if stdenv.hostPlatform.isDarwin then ''
-    mkdir -p $out/nix-support $dev
-    echo ${OpenGL} >> $out/nix-support/propagated-build-inputs
-    ln -s ${mesa.out}/lib $out/lib
-
-    mkdir -p $dev/lib/pkgconfig $dev/nix-support
-    echo "$out" > $dev/nix-support/propagated-build-inputs
-    ln -s ${mesa.dev}/include $dev/include
-
-    cat <<EOF >$dev/lib/pkgconfig/gl.pc
-  Name: gl
-  Description: gl library
-  Version: ${mesa.version}
-  Libs: -L${mesa.out}/lib -lGL
-  Cflags: -I${mesa.dev}/include
-  EOF
-
-    cat <<EOF >$dev/lib/pkgconfig/glesv1_cm.pc
-  Name: glesv1_cm
-  Description: glesv1_cm library
-  Version: ${mesa.version}
-  Libs: -L${mesa.out}/lib -lGLESv1_CM
-  Cflags: -I${mesa.dev}/include
-  EOF
-
-    cat <<EOF >$dev/lib/pkgconfig/glesv2.pc
-  Name: glesv2
-  Description: glesv2 library
-  Version: ${mesa.version}
-  Libs: -L${mesa.out}/lib -lGLESv2
-  Cflags: -I${mesa.dev}/include
-  EOF
-  ''
-
-  # Otherwise, setup gl stubs to use libglvnd.
-  else ''
-    mkdir -p $out/nix-support
-    ln -s ${libglvnd.out}/lib $out/lib
-
-    mkdir -p $dev/{,lib/pkgconfig,nix-support}
-    echo "$out ${libglvnd} ${libglvnd.dev}" > $dev/nix-support/propagated-build-inputs
-    ln -s ${libglvnd.dev}/include $dev/include
-
-    genPkgConfig() {
-      local name="$1"
-      local lib="$2"
-
-      cat <<EOF >$dev/lib/pkgconfig/$name.pc
-    Name: $name
-    Description: $lib library
-    Version: ${libglvnd.version}
-    Libs: -L${libglvnd.out}/lib -l$lib
-    Cflags: -I${libglvnd.dev}/include
-    EOF
-    }
-
-    genPkgConfig gl GL
-    genPkgConfig egl EGL
-    genPkgConfig glesv1_cm GLESv1_CM
-    genPkgConfig glesv2 GLESv2
-  '';
-
-  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
-
-  meta = {
-    description = "Stub bindings using " + (if stdenv.hostPlatform.isDarwin then "mesa" else "libglvnd");
-    pkgConfigModules = [ "gl" "egl" "glesv1_cm" "glesv2" ];
-  } // {
-    inherit (if stdenv.hostPlatform.isDarwin then mesa.meta else libglvnd.meta)
-      homepage license platforms badPlatforms;
-  };
-})
diff --git a/pkgs/development/libraries/meshoptimizer/default.nix b/pkgs/development/libraries/meshoptimizer/default.nix
index 2c4617d15fc63..c632932e5a53e 100644
--- a/pkgs/development/libraries/meshoptimizer/default.nix
+++ b/pkgs/development/libraries/meshoptimizer/default.nix
@@ -9,12 +9,12 @@ let
   };
 in stdenv.mkDerivation rec {
   pname = "meshoptimizer";
-  version = "0.20";
+  version = "0.21";
   src = fetchFromGitHub {
     owner = "zeux";
     repo = "meshoptimizer";
     rev = "v${version}";
-    hash = "sha256-QCxpM2g8WtYSZHkBzLTJNQ/oHb5j/n9rjaVmZJcCZIA=";
+    hash = "sha256-G8rR4Ff3mVxTPD1etI82fYwFawsjrLvwWuEuib+dUBU=";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/pkgs/development/libraries/mlt/default.nix b/pkgs/development/libraries/mlt/default.nix
index b1e6b93395bcd..e70269bc8d28e 100644
--- a/pkgs/development/libraries/mlt/default.nix
+++ b/pkgs/development/libraries/mlt/default.nix
@@ -36,7 +36,6 @@
 , enableSDL2 ? true
 , SDL2
 , gitUpdater
-, enableGlaxnimate ? true
 , libarchive
 }:
 
@@ -96,12 +95,11 @@ stdenv.mkDerivation rec {
     qt.qtbase
     qt.qtsvg
     (qt.qt5compat or null)
+    libarchive
   ] ++ lib.optionals enableSDL1 [
     SDL
   ] ++ lib.optionals enableSDL2 [
     SDL2
-  ] ++ lib.optionals enableGlaxnimate [
-    libarchive
   ];
 
   outputs = [ "out" "dev" ];
@@ -114,7 +112,6 @@ stdenv.mkDerivation rec {
     "-DSWIG_PYTHON=ON"
   ] ++ lib.optionals (qt != null) [
     "-DMOD_QT${lib.versions.major qt.qtbase.version}=ON"
-  ] ++ lib.optionals (qt != null && enableGlaxnimate) [
     "-DMOD_GLAXNIMATE${if lib.versions.major qt.qtbase.version == "5" then "" else "_QT6"}=ON"
   ];
 
diff --git a/pkgs/development/libraries/nettle/default.nix b/pkgs/development/libraries/nettle/default.nix
index 3a1297f897636..0791a05e338e2 100644
--- a/pkgs/development/libraries/nettle/default.nix
+++ b/pkgs/development/libraries/nettle/default.nix
@@ -1,10 +1,10 @@
 { callPackage, fetchurl }:
 
 callPackage ./generic.nix rec {
-  version = "3.9.1";
+  version = "3.10";
 
   src = fetchurl {
     url = "mirror://gnu/nettle/nettle-${version}.tar.gz";
-    hash = "sha256-zP7/mBsMpxu9b7ywVPQHxg/7ZEOJpb6A1nFtW1UMbOM=";
+    hash = "sha256-tMUYrbF05ITLSs6lQRjwI4DHEzdx5+m+uYoHhxlO5Hw=";
   };
 }
diff --git a/pkgs/development/libraries/nuspell/default.nix b/pkgs/development/libraries/nuspell/default.nix
index 867843df80683..efa44385901ec 100644
--- a/pkgs/development/libraries/nuspell/default.nix
+++ b/pkgs/development/libraries/nuspell/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "nuspell";
-  version = "5.1.4";
+  version = "5.1.5";
 
   src = fetchFromGitHub {
     owner = "nuspell";
     repo = "nuspell";
     rev = "v${version}";
-    hash = "sha256-KteLH031QP8MunQXsodzsPhD/YN9n3O7b2kb/1mFQRY=";
+    hash = "sha256-uE5OkjXawYf9O/SUA/SUaIhDydwGcD460+xO5Yoqa0w=";
   };
 
   nativeBuildInputs = [ cmake pkg-config ];
diff --git a/pkgs/development/libraries/nv-codec-headers/default.nix b/pkgs/development/libraries/nv-codec-headers/default.nix
deleted file mode 100644
index b582548d79f5c..0000000000000
--- a/pkgs/development/libraries/nv-codec-headers/default.nix
+++ /dev/null
@@ -1,32 +0,0 @@
-{ lib
-, fetchgit
-, stdenvNoCC
-}:
-
-let
-  make-nv-codec-headers = (import ./make-nv-codec-headers.nix) {
-    inherit lib fetchgit stdenvNoCC;
-  };
-in
-{
-  nv-codec-headers-8 = make-nv-codec-headers {
-    version = "8.2.15.2";
-    hash = "sha256-TKYT8vXqnUpq+M0grDeOR37n/ffqSWDYTrXIbl++BG4=";
-  };
-  nv-codec-headers-9 = make-nv-codec-headers {
-    version = "9.1.23.1";
-    hash = "sha256-kF5tv8Nh6I9x3hvSAdKLakeBVEcIiXFY6o6bD+tY2/U=";
-  };
-  nv-codec-headers-10 = make-nv-codec-headers {
-    version = "10.0.26.2";
-    hash = "sha256-BfW+fmPp8U22+HK0ZZY6fKUjqigWvOBi6DmW7SSnslg=";
-  };
-  nv-codec-headers-11 = make-nv-codec-headers {
-    version = "11.1.5.2";
-    hash = "sha256-KzaqwpzISHB7tSTruynEOJmSlJnAFK2h7/cRI/zkNPk=";
-  };
-  nv-codec-headers-12 = make-nv-codec-headers {
-    version = "12.1.14.0";
-    hash = "sha256-WJYuFmMGSW+B32LwE7oXv/IeTln6TNEeXSkquHh85Go=";
-  };
-}
diff --git a/pkgs/development/libraries/nv-codec-headers/make-nv-codec-headers.nix b/pkgs/development/libraries/nv-codec-headers/make-nv-codec-headers.nix
deleted file mode 100644
index b6bdc6dd58d7a..0000000000000
--- a/pkgs/development/libraries/nv-codec-headers/make-nv-codec-headers.nix
+++ /dev/null
@@ -1,32 +0,0 @@
-{ lib
-, stdenvNoCC
-, fetchgit
-}:
-
-{ pname ? "nv-codec-headers"
-, version
-, hash
-}:
-
-stdenvNoCC.mkDerivation {
-  inherit pname version;
-
-  src = fetchgit {
-    url = "https://git.videolan.org/git/ffmpeg/nv-codec-headers.git";
-    rev = "n${version}";
-    inherit hash;
-  };
-
-  makeFlags = [
-    "PREFIX=$(out)"
-  ];
-
-  meta = {
-    description = "FFmpeg version of headers for NVENC";
-    homepage = "https://ffmpeg.org/";
-    downloadPage = "https://git.videolan.org/?p=ffmpeg/nv-codec-headers.git";
-    license = with lib.licenses; [ mit ];
-    maintainers = with lib.maintainers; [ AndersonTorres ];
-    platforms = lib.platforms.all;
-  };
-}
diff --git a/pkgs/development/libraries/ogre/default.nix b/pkgs/development/libraries/ogre/default.nix
index 93db5470b0f73..a77529a427048 100644
--- a/pkgs/development/libraries/ogre/default.nix
+++ b/pkgs/development/libraries/ogre/default.nix
@@ -12,7 +12,7 @@
 , pugixml
 , zziplib
   # linux
-, freeglut
+, libglut
 , libGL
 , libGLU
 , libICE
@@ -75,7 +75,7 @@ let
       pugixml
       zziplib
     ] ++ lib.optionals stdenv.isLinux [
-      freeglut
+      libglut
       libGL
       libGLU
       libICE
diff --git a/pkgs/development/libraries/opencolorio/default.nix b/pkgs/development/libraries/opencolorio/default.nix
index d5270b655ca1e..3e9302e025f2b 100644
--- a/pkgs/development/libraries/opencolorio/default.nix
+++ b/pkgs/development/libraries/opencolorio/default.nix
@@ -1,7 +1,6 @@
 { stdenv
 , lib
 , fetchFromGitHub
-, fetchpatch
 , cmake
 , expat
 , yaml-cpp
@@ -10,7 +9,7 @@
 , minizip-ng
 # Only required on Linux
 , glew
-, freeglut
+, libglut
 # Only required on Darwin
 , Carbon
 , GLUT
@@ -26,22 +25,16 @@
 
 stdenv.mkDerivation rec {
   pname = "opencolorio";
-  version = "2.3.0";
+  version = "2.3.2";
 
   src = fetchFromGitHub {
     owner = "AcademySoftwareFoundation";
     repo = "OpenColorIO";
     rev = "v${version}";
-    sha256 = "sha256-E4TmMEFzI3nKqiDFaAkNx44uo84sacvZqjbfWe3A8fE=";
+    hash = "sha256-CSD3AZ36tmC/cYSdPsdDYx894+jd9GkGkhYJ767QY8A=";
   };
 
   patches = [
-    (fetchpatch {
-      # Taken from https://github.com/AcademySoftwareFoundation/OpenColorIO/pull/1891.
-      name = "opencolorio-yaml-cpp-8.0-compat.patch";
-      url = "https://github.com/AcademySoftwareFoundation/OpenColorIO/commit/e99b4afcf0408d8ec56fdf2b9380327c9284db00.patch";
-      sha256 = "sha256-7eIvVWKcpE0lmuYdNqFQFHkW/sSSzQ//LNIMOC28KZg=";
-    })
     # Workaround for https://gitlab.kitware.com/cmake/cmake/-/issues/25200.
     # Needed for zlib >= 1.3 && cmake < 3.27.4.
     ./broken-cmake-zlib-version.patch
@@ -64,7 +57,7 @@ stdenv.mkDerivation rec {
     pystring
     imath
     minizip-ng
-  ] ++ lib.optionals stdenv.hostPlatform.isLinux [ glew freeglut ]
+  ] ++ lib.optionals stdenv.hostPlatform.isLinux [ glew libglut ]
     ++ lib.optionals stdenv.hostPlatform.isDarwin [ Carbon GLUT Cocoa ]
     ++ lib.optionals pythonBindings [ python3Packages.python python3Packages.pybind11 ]
     ++ lib.optionals buildApps [
@@ -75,7 +68,7 @@ stdenv.mkDerivation rec {
   cmakeFlags = [
     "-DOCIO_INSTALL_EXT_PACKAGES=NONE"
     "-DOCIO_USE_SSE2NEON=OFF"
-    # GPU test fails with: freeglut (GPU tests): failed to open display ''
+    # GPU test fails with: libglut (GPU tests): failed to open display ''
     "-DOCIO_BUILD_GPU_TESTS=OFF"
     "-Dminizip-ng_INCLUDE_DIR=${minizip-ng}/include/minizip-ng"
   ] ++ lib.optional (!pythonBindings) "-DOCIO_BUILD_PYTHON=OFF"
diff --git a/pkgs/development/libraries/opencsg/default.nix b/pkgs/development/libraries/opencsg/default.nix
index a2675b2d79dc6..6ac83dfa7d927 100644
--- a/pkgs/development/libraries/opencsg/default.nix
+++ b/pkgs/development/libraries/opencsg/default.nix
@@ -1,4 +1,4 @@
-{lib, stdenv, fetchurl, libGLU, libGL, freeglut, glew, libXmu, libXext, libX11
+{lib, stdenv, fetchurl, libGLU, libGL, libglut, glew, libXmu, libXext, libX11
 , qmake, GLUT, fixDarwinDylibNames }:
 
 stdenv.mkDerivation rec {
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
     ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
 
   buildInputs = [ glew ]
-    ++ lib.optionals stdenv.isLinux [ libGLU libGL freeglut libXmu libXext libX11 ]
+    ++ lib.optionals stdenv.isLinux [ libGLU libGL libglut libXmu libXext libX11 ]
     ++ lib.optional stdenv.isDarwin GLUT;
 
   doCheck = false;
diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix
index 981ab14ddcaaf..6c87feaab8825 100644
--- a/pkgs/development/libraries/openssl/default.nix
+++ b/pkgs/development/libraries/openssl/default.nix
@@ -276,8 +276,8 @@ in {
   };
 
   openssl_3 = common {
-    version = "3.0.13";
-    hash = "sha256-iFJXU/edO+wn0vp8ZqoLkrOqlJja/ZPXz6SzeAza4xM=";
+    version = "3.0.14";
+    hash = "sha256-7soDXU3U6E/CWEbZUtpil0hK+gZQpvhMaC453zpBI8o=";
 
     patches = [
       ./3.0/nix-ssl-cert-file.patch
@@ -299,8 +299,8 @@ in {
   };
 
   openssl_3_2 = common {
-    version = "3.2.1";
-    hash = "sha256-g8cyn+UshQZ3115dCwyiRTCbl+jsvP3B39xKufrDWzk=";
+    version = "3.2.2";
+    hash = "sha256-GXFJwY2enyksQ/BACsq6EuX1LKz+BQ89GZJ36nOOwuc=";
 
     patches = [
       ./3.0/nix-ssl-cert-file.patch
@@ -322,8 +322,8 @@ in {
   };
 
   openssl_3_3 = common {
-    version = "3.3.0";
-    hash = "sha256-U+ZrBDMipgar8Ah+dpmg4DOjf6E/65dC3zXDozsY+wI=";
+    version = "3.3.1";
+    hash = "sha256-d3zVlihMiDN1oqehG/XSeG/FQTJV76sgxQ1v/m0CC34=";
 
     patches = [
       ./3.0/nix-ssl-cert-file.patch
diff --git a/pkgs/development/libraries/partio/default.nix b/pkgs/development/libraries/partio/default.nix
index 75817ff568f72..a567612fae4fb 100644
--- a/pkgs/development/libraries/partio/default.nix
+++ b/pkgs/development/libraries/partio/default.nix
@@ -3,7 +3,7 @@
 , fetchFromGitHub
 , unzip
 , cmake
-, freeglut
+, libglut
 , libGLU
 , libGL
 , zlib
@@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
     darwin.apple_sdk.frameworks.Cocoa
     darwin.apple_sdk.frameworks.GLUT
   ] ++ lib.optionals (!stdenv.isDarwin) [
-    freeglut
+    libglut
     libGLU
     libGL
   ];
diff --git a/pkgs/development/libraries/pcre2/default.nix b/pkgs/development/libraries/pcre2/default.nix
index 3450f910effef..a61a13590d165 100644
--- a/pkgs/development/libraries/pcre2/default.nix
+++ b/pkgs/development/libraries/pcre2/default.nix
@@ -7,30 +7,20 @@
 
 stdenv.mkDerivation rec {
   pname = "pcre2";
-  version = "10.43";
+  version = "10.44";
 
   src = fetchurl {
     url = "https://github.com/PhilipHazel/pcre2/releases/download/pcre2-${version}/pcre2-${version}.tar.bz2";
-    hash = "sha256-4qU5hP8LB9/bWuRIa7ubIcyo598kNAlsyb8bcow1C8s=";
+    hash = "sha256-008C4RPPcZOh6/J3DTrFJwiNSF1OBH7RDl0hfG713pY=";
   };
 
   nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ];
 
-  postPatch = ''
-    # Fix jit autodetection:
-    #   https://github.com/PCRE2Project/pcre2/pull/396
-    # Applying manually to avoid fetchpatch and autoreconfHook.
-    # TODO: remove once 10.44 is released
-    substituteInPlace configure --replace-fail \
-      '#include "src/sljit/sljitConfigInternal.h"' \
-      '#include "src/sljit/sljitConfigCPU.h"'
-  '';
-
   configureFlags = [
     "--enable-pcre2-16"
     "--enable-pcre2-32"
     # only enable jit on supported platforms which excludes Apple Silicon, see https://github.com/zherczeg/sljit/issues/51
-    "--enable-jit=${if stdenv.hostPlatform.isS390x || stdenv.hostPlatform.isLoongArch64 then "no" else "auto"}"
+    "--enable-jit=${if stdenv.hostPlatform.isS390x then "no" else "auto"}"
   ]
   # fix pcre jit in systemd units that set MemoryDenyWriteExecute=true like gitea
   ++ lib.optional withJitSealloc "--enable-jit-sealloc";
diff --git a/pkgs/development/libraries/physics/geant4/default.nix b/pkgs/development/libraries/physics/geant4/default.nix
index 569a0b3e6923f..7349c708e3d91 100644
--- a/pkgs/development/libraries/physics/geant4/default.nix
+++ b/pkgs/development/libraries/physics/geant4/default.nix
@@ -3,8 +3,8 @@
 , enableQT             ? false # deprecated name
 , enableQt             ? enableQT
 , enableXM             ? false
-, mesa
-, enableOpenGLX11      ? !mesa.meta.broken
+, libGLX
+, enableOpenGLX11      ? !libGLX.meta.broken
 , enablePython         ? false
 , enableRaytracerX11   ? false
 
@@ -77,8 +77,8 @@ stdenv.mkDerivation rec {
     "-DGEANT4_USE_SYSTEM_ZLIB=ON"
     "-DGEANT4_BUILD_MULTITHREADED=${if enableMultiThreading then "ON" else "OFF"}"
   ] ++ lib.optionals (enableOpenGLX11 && stdenv.isDarwin) [
-    "-DXQuartzGL_INCLUDE_DIR=${libGL.dev}/include"
-    "-DXQuartzGL_gl_LIBRARY=${libGL}/lib/libGL.dylib"
+    "-DXQuartzGL_INCLUDE_DIR=${libGLX.dev}/include"
+    "-DXQuartzGL_gl_LIBRARY=${libGLX}/lib/libGL.dylib"
   ] ++ lib.optionals (enableMultiThreading && enablePython) [
     "-DGEANT4_BUILD_TLS_MODEL=global-dynamic"
   ] ++ lib.optionals enableInventor [
diff --git a/pkgs/development/libraries/pipewire/default.nix b/pkgs/development/libraries/pipewire/default.nix
index c3532d93683d9..49dc2f4dd5d2c 100644
--- a/pkgs/development/libraries/pipewire/default.nix
+++ b/pkgs/development/libraries/pipewire/default.nix
@@ -75,7 +75,7 @@ assert ldacbtSupport -> bluezSupport;
 
 stdenv.mkDerivation(finalAttrs: {
   pname = "pipewire";
-  version = "1.0.7";
+  version = "1.2.0";
 
   outputs = [
     "out"
@@ -91,7 +91,7 @@ stdenv.mkDerivation(finalAttrs: {
     owner = "pipewire";
     repo = "pipewire";
     rev = finalAttrs.version;
-    sha256 = "sha256-YzI+hkX1ZdeTfxuKaw5P9OYPtkWtUg9cNo32wLCgjNU=";
+    sha256 = "sha256-hjjiH7+JoyRTcdbPDvkUEpO72b5p8CbTD6Un/vZrHL8=";
   };
 
   patches = [
@@ -185,6 +185,7 @@ stdenv.mkDerivation(finalAttrs: {
     (lib.mesonBool "rlimits-install" false) # installs to /etc, we won't use this anyway
     (lib.mesonEnable "compress-offload" true)
     (lib.mesonEnable "man" true)
+    (lib.mesonEnable "snap" false) # we don't currently have a working snapd
   ];
 
   # Fontconfig error: Cannot load default config file
diff --git a/pkgs/development/libraries/plib/default.nix b/pkgs/development/libraries/plib/default.nix
index c7349c3693051..de93d6944c939 100644
--- a/pkgs/development/libraries/plib/default.nix
+++ b/pkgs/development/libraries/plib/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, fetchpatch, lib, stdenv, libGLU, libGL, freeglut, SDL
+{ fetchurl, fetchpatch, lib, stdenv, libGLU, libGL, libglut, SDL
 , libXi, libSM, libXmu, libXext, libX11 }:
 
 stdenv.mkDerivation rec {
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
   ];
 
   propagatedBuildInputs = [
-    libGLU libGL freeglut SDL
+    libGLU libGL libglut SDL
 
     # The following libs ought to be propagated build inputs of Mesa.
     libXi libSM libXmu libXext libX11
diff --git a/pkgs/development/libraries/py3c/default.nix b/pkgs/development/libraries/py3c/default.nix
index 11ccba4c9ee36..32e7d12491187 100644
--- a/pkgs/development/libraries/py3c/default.nix
+++ b/pkgs/development/libraries/py3c/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, python3 }:
+{ lib, stdenv, fetchFromGitHub, python311 }:
 
 stdenv.mkDerivation rec {
   pname = "py3c";
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
   doCheck = true;
 
   nativeCheckInputs = [
-    python3
+    python311
   ];
 
   checkTarget = "test-python";
diff --git a/pkgs/development/libraries/qpdf/default.nix b/pkgs/development/libraries/qpdf/default.nix
index e3772dbb27870..b2858944ef7c6 100644
--- a/pkgs/development/libraries/qpdf/default.nix
+++ b/pkgs/development/libraries/qpdf/default.nix
@@ -15,13 +15,13 @@
 
 stdenv.mkDerivation rec {
   pname = "qpdf";
-  version = "11.9.0";
+  version = "11.9.1";
 
   src = fetchFromGitHub {
     owner = "qpdf";
     repo = "qpdf";
     rev = "v${version}";
-    hash = "sha256-HD7+2TBDLBIt+VaPO5WgnDjNZOj8naltFmYdYzOIn+4=";
+    hash = "sha256-DhrOKjUPgNo61db8av0OTfM8mCNebQocQWtTWdt002s=";
   };
 
   nativeBuildInputs = [ cmake perl ];
diff --git a/pkgs/development/libraries/qt-5/5.15/default.nix b/pkgs/development/libraries/qt-5/5.15/default.nix
index dabb77ea0c85d..9073bcb6f9e58 100644
--- a/pkgs/development/libraries/qt-5/5.15/default.nix
+++ b/pkgs/development/libraries/qt-5/5.15/default.nix
@@ -36,14 +36,6 @@ let
       ./qtbase.patch.d/0012-qtbase-tbd-frameworks.patch
 
       ./qtbase.patch.d/0014-aarch64-darwin.patch
-
-      # Fix typo that breaks build on Darwin
-      # FIXME: remove this once merged upstream
-      # See: https://invent.kde.org/qt/qt/qtbase/-/merge_requests/325
-      (fetchpatch {
-        url = "https://invent.kde.org/qt/qt/qtbase/-/commit/e84c0df50f51c61aa49b47823582b0f8de406e3d.patch";
-        hash = "sha256-d1RIY03E71aMzOOVtcIaMeariki/72QRekUne6P2D3M=";
-      })
     ] ++ [
       ./qtbase.patch.d/0003-qtbase-mkspecs.patch
       ./qtbase.patch.d/0004-qtbase-replace-libdir.patch
diff --git a/pkgs/development/libraries/qt-5/5.15/srcs-generated.json b/pkgs/development/libraries/qt-5/5.15/srcs-generated.json
index f3281a17170ee..96c3621307c6a 100644
--- a/pkgs/development/libraries/qt-5/5.15/srcs-generated.json
+++ b/pkgs/development/libraries/qt-5/5.15/srcs-generated.json
@@ -16,8 +16,8 @@
   },
   "qtbase": {
     "url": "https://invent.kde.org/qt/qt/qtbase.git",
-    "rev": "0e1ff2f06ddac7c32c5a5e0b65e402c9332e56f8",
-    "sha256": "1pfby0ilkikq8802diaslnkxw8qzbp4r0f80v696wfynn973mhdd"
+    "rev": "2b9835f5c9bcfe3105b60a8dd33c1db7d8611378",
+    "sha256": "1yms1r42yps06bg8gjbzb5y7x03ks11vg97s2j7r1aplp7kjf7wm"
   },
   "qtcharts": {
     "url": "https://invent.kde.org/qt/qt/qtcharts.git",
diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix
index d92287feb1511..7f3079d5add5b 100644
--- a/pkgs/development/libraries/qt-5/modules/qtbase.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix
@@ -152,8 +152,8 @@ stdenv.mkDerivation (finalAttrs: ({
                 --replace "/System/Library/Frameworks/AGL.framework/" "${AGL}/Library/Frameworks/AGL.framework/"
     '' else lib.optionalString libGLSupported ''
       sed -i mkspecs/common/linux.conf \
-          -e "/^QMAKE_INCDIR_OPENGL/ s|$|${libGL.dev or libGL}/include|" \
-          -e "/^QMAKE_LIBDIR_OPENGL/ s|$|${libGL.out}/lib|"
+          -e "/^QMAKE_INCDIR_OPENGL/ s|$|${lib.getDev libGL}/include|" \
+          -e "/^QMAKE_LIBDIR_OPENGL/ s|$|${lib.getLib libGL}/lib|"
     '' + lib.optionalString (stdenv.hostPlatform.isx86_32 && stdenv.cc.isGNU) ''
       sed -i mkspecs/common/gcc-base-unix.conf \
           -e "/^QMAKE_LFLAGS_SHLIB/ s/-shared/-shared -static-libgcc/"
diff --git a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix
index b2715fbe7502c..73920c1646b9b 100644
--- a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix
@@ -1,5 +1,6 @@
 { qtModule
 , qtdeclarative, qtquickcontrols, qtlocation, qtwebchannel
+, fetchpatch
 
 , bison, flex, git, gperf, ninja, pkg-config, python, which
 , nodejs, perl
@@ -81,6 +82,21 @@ qtModule ({
     (
       cd src/3rdparty/chromium;
 
+      patch -p2 < ${
+        (fetchpatch { # support for building with python 3.12
+          name = "python312-imp.patch";
+          url = "https://codereview.qt-project.org/gitweb?p=qt/qtwebengine-chromium.git;a=patch;h=3664134f749f4851a14ab1953a9ee460a1fe0b68";
+          hash = "sha256-XY0dEdeuOTRMR7onmuNg1Axld8+pquKAzOfDAGSIzI4=";
+        })
+      }
+      patch -p1 < ${
+        (fetchpatch { # support for building with python 3.12
+          name = "python312-six.patch";
+          url = "https://gitlab.archlinux.org/archlinux/packaging/packages/qt5-webengine/-/raw/6b0c0e76e0934db2f84be40cb5978cee47266e78/python3.12-six.patch";
+          hash = "sha256-YgP9Sq5+zTC+U7+0hQjZokwb+fytk0UEIJztUXFhTkI=";
+        })
+      }
+
       # Manually fix unsupported shebangs
       substituteInPlace third_party/harfbuzz-ng/src/src/update-unicode-tables.make \
         --replace "/usr/bin/env -S make -f" "/usr/bin/make -f" || true
diff --git a/pkgs/development/libraries/re2/default.nix b/pkgs/development/libraries/re2/default.nix
index 2310ce33ea4f3..09d2f7539f15a 100644
--- a/pkgs/development/libraries/re2/default.nix
+++ b/pkgs/development/libraries/re2/default.nix
@@ -1,61 +1,61 @@
-{ lib
-, stdenv
-, fetchFromGitHub
-, cmake
-, ninja
-, chromium
-, grpc
-, haskellPackages
-, mercurial
-, python3Packages
-, abseil-cpp
+{
+  abseil-cpp,
+  chromium,
+  cmake,
+  fetchFromGitHub,
+  gbenchmark,
+  grpc,
+  gtest,
+  haskellPackages,
+  icu,
+  lib,
+  mercurial,
+  ninja,
+  python3Packages,
+  stdenv,
 }:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
   pname = "re2";
-  version = "2024-05-01";
+  version = "2024-06-01";
 
   src = fetchFromGitHub {
     owner = "google";
     repo = "re2";
-    rev = version;
-    hash = "sha256-p4MdHjTk0SQsBPVkEy+EceAN/QTyzBDe7Pd1hJwOs3A=";
+    rev = finalAttrs.version;
+    hash = "sha256-iQETsjdIFcYM5I/W8ytvV3z/4va6TaZ/+KkSjb8CtF0=";
   };
 
-  outputs = [ "out" "dev" ];
+  outputs = [
+    "out"
+    "dev"
+  ];
 
-  nativeBuildInputs = [ cmake ninja ];
+  nativeBuildInputs = [
+    cmake
+    ninja
+  ];
 
-  propagatedBuildInputs = [ abseil-cpp ];
+  buildInputs = lib.optionals finalAttrs.doCheck [
+    gbenchmark
+    gtest
+  ];
 
-  postPatch = ''
-    substituteInPlace re2Config.cmake.in \
-      --replace "\''${PACKAGE_PREFIX_DIR}/" ""
-  '';
+  propagatedBuildInputs = [
+    abseil-cpp
+    icu
+  ];
 
-  # Needed for case-insensitive filesystems (i.e. MacOS) because a file named
-  # BUILD already exists.
-  cmakeBuildDir = "build_dir";
-
-  cmakeFlags = lib.optional (!stdenv.hostPlatform.isStatic) "-DBUILD_SHARED_LIBS:BOOL=ON";
-
-  # This installs a pkg-config definition.
-  postInstall = ''
-    pushd "$src"
-    make common-install prefix="$dev" SED_INPLACE="sed -i"
-    popd
-  '';
+  cmakeFlags = [
+    (lib.cmakeBool "RE2_BUILD_TESTING" finalAttrs.doCheck)
+    (lib.cmakeBool "RE2_USE_ICU" true)
+  ] ++ lib.optional (!stdenv.hostPlatform.isStatic) (lib.cmakeBool "BUILD_SHARED_LIBS" true);
 
   doCheck = true;
 
   passthru.tests = {
-    inherit
-      chromium
-      grpc
-      mercurial;
-    inherit (python3Packages)
-      fb-re2
-      google-re2;
+    inherit chromium grpc mercurial;
+    inherit (python3Packages) fb-re2 google-re2;
     haskell-re2 = haskellPackages.re2;
   };
 
@@ -68,7 +68,10 @@ stdenv.mkDerivation rec {
     '';
     license = licenses.bsd3;
     homepage = "https://github.com/google/re2";
-    maintainers = with maintainers; [ azahi networkexception ];
+    maintainers = with maintainers; [
+      azahi
+      networkexception
+    ];
     platforms = platforms.all;
   };
-}
+})
diff --git a/pkgs/development/libraries/rocksdb/default.nix b/pkgs/development/libraries/rocksdb/default.nix
index af52b6a9fa7c7..2c70046108dab 100644
--- a/pkgs/development/libraries/rocksdb/default.nix
+++ b/pkgs/development/libraries/rocksdb/default.nix
@@ -11,26 +11,31 @@
 , windows
 , enableJemalloc ? false
 , jemalloc
+, enableLiburing ? true
+, liburing
 , enableShared ? !stdenv.hostPlatform.isStatic
 , sse42Support ? stdenv.hostPlatform.sse4_2Support
 }:
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "rocksdb";
-  version = "9.2.1";
+  version = "9.3.1";
 
   src = fetchFromGitHub {
     owner = "facebook";
     repo = finalAttrs.pname;
     rev = "v${finalAttrs.version}";
-    hash = "sha256-Zifn5Gu/4h6TaEqSaWQ2mFdryeAarqbHWW3fKUGGFac=";
+    hash = "sha256-bTUzh7ch14TDcm6GkfhA5I/qUVmUm+RE5d2HMZ3zaNc=";
   };
 
+  patches = [ ./fix-findliburing.patch ];
+
   nativeBuildInputs = [ cmake ninja ];
 
   propagatedBuildInputs = [ bzip2 lz4 snappy zlib zstd ];
 
   buildInputs = lib.optional enableJemalloc jemalloc
+    ++ lib.optional enableLiburing liburing
     ++ lib.optional stdenv.hostPlatform.isMinGW windows.mingw_w64_pthreads;
 
   outputs = [
@@ -45,6 +50,7 @@ stdenv.mkDerivation (finalAttrs: {
   cmakeFlags = [
     "-DPORTABLE=1"
     "-DWITH_JEMALLOC=${if enableJemalloc then "1" else "0"}"
+    "-DWITH_LIBURING=${if enableLiburing then "1" else "0"}"
     "-DWITH_JNI=0"
     "-DWITH_BENCHMARK_TOOLS=0"
     "-DWITH_TESTS=1"
diff --git a/pkgs/development/libraries/rocksdb/fix-findliburing.patch b/pkgs/development/libraries/rocksdb/fix-findliburing.patch
new file mode 100644
index 0000000000000..c546577813ceb
--- /dev/null
+++ b/pkgs/development/libraries/rocksdb/fix-findliburing.patch
@@ -0,0 +1,29 @@
+From 23432b7958ecea64b49ba680767ea5dc696768c9 Mon Sep 17 00:00:00 2001
+From: Benjamin Lee <benjamin@computer.surgery>
+Date: Sun, 26 May 2024 17:17:01 -0700
+Subject: [PATCH] fix findliburing
+
+`find_package(... NAMES lib*)` is basically always wrong. The previous
+code was just hardcoding the static library path to work around the fact
+that this doesn't work. This breaks the build when only dynamic liburing
+builds are available.
+---
+ cmake/modules/Finduring.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/modules/Finduring.cmake b/cmake/modules/Finduring.cmake
+index 8cb14cb27..87f2df474 100644
+--- a/cmake/modules/Finduring.cmake
++++ b/cmake/modules/Finduring.cmake
+@@ -7,7 +7,7 @@
+ find_path(uring_INCLUDE_DIR
+   NAMES liburing.h)
+ find_library(uring_LIBRARIES
+-  NAMES liburing.a liburing)
++  NAMES uring)
+ 
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(uring
+-- 
+2.44.0
+
diff --git a/pkgs/development/libraries/science/astronomy/stellarsolver/default.nix b/pkgs/development/libraries/science/astronomy/stellarsolver/default.nix
index 8c6eb60d1d2b0..3591a86dbb701 100644
--- a/pkgs/development/libraries/science/astronomy/stellarsolver/default.nix
+++ b/pkgs/development/libraries/science/astronomy/stellarsolver/default.nix
@@ -3,13 +3,13 @@
 
 mkDerivation rec {
   pname = "stellarsolver";
-  version = "2.5";
+  version = "2.6";
 
   src = fetchFromGitHub {
     owner = "rlancaste";
     repo = pname;
     rev = version;
-    sha256 = "sha256-0bFGHlkZnAZlnxlj8tY3s9yTWgkNtSsPFfudB3uvyOA=";
+    sha256 = "sha256-6WDiHaBhi9POtXynGU/eTeuqZSK81JJeuZv4SxOeVoE=";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/pkgs/development/libraries/science/biology/bicgl/default.nix b/pkgs/development/libraries/science/biology/bicgl/default.nix
index 07d64fbd97ed2..89f4220f92f41 100644
--- a/pkgs/development/libraries/science/biology/bicgl/default.nix
+++ b/pkgs/development/libraries/science/biology/bicgl/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, cmake, libminc, bicpl, freeglut, mesa_glu, GLUT }:
+{ lib, stdenv, fetchFromGitHub, cmake, libminc, bicpl, libGLU, libglut }:
 
 stdenv.mkDerivation rec {
   pname = "bicgl";
@@ -14,9 +14,7 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ cmake ];
-  buildInputs = [ libminc bicpl mesa_glu ]
-    ++ lib.optionals stdenv.isDarwin [ GLUT ]
-    ++ lib.optionals stdenv.isLinux [ freeglut ];
+  buildInputs = [ libminc bicpl libGLU libglut ];
 
   cmakeFlags = [
     "-DLIBMINC_DIR=${libminc}/lib/cmake"
diff --git a/pkgs/development/libraries/science/biology/mirtk/default.nix b/pkgs/development/libraries/science/biology/mirtk/default.nix
index ce02474eeb1e2..979f3589b3302 100644
--- a/pkgs/development/libraries/science/biology/mirtk/default.nix
+++ b/pkgs/development/libraries/science/biology/mirtk/default.nix
@@ -55,7 +55,7 @@ stdenv.mkDerivation rec {
     eigen
     fltk
     itk
-    libGLU.dev
+    libGLU
     python3
     tbb
     vtk
diff --git a/pkgs/development/libraries/science/math/clblast/default.nix b/pkgs/development/libraries/science/math/clblast/default.nix
index a7c8d8faee4c0..3bf38086ca2fa 100644
--- a/pkgs/development/libraries/science/math/clblast/default.nix
+++ b/pkgs/development/libraries/science/math/clblast/default.nix
@@ -9,13 +9,13 @@
 
 stdenv.mkDerivation rec {
   pname = "clblast";
-  version = "1.6.2";
+  version = "1.6.3";
 
   src = fetchFromGitHub {
     owner = "CNugteren";
     repo = "CLBlast";
     rev = version;
-    hash = "sha256-S25g25Il6rzkpU9IqOFDDeEr3uYyt/uewZZAl09YSts=";
+    hash = "sha256-fzenYFCAQ0B2NQgh5OaErv/yNEzjznB6ogRapqfL6P4=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/development/libraries/science/math/openblas/default.nix b/pkgs/development/libraries/science/math/openblas/default.nix
index 842bc3af9834a..e36c92d60b67b 100644
--- a/pkgs/development/libraries/science/math/openblas/default.nix
+++ b/pkgs/development/libraries/science/math/openblas/default.nix
@@ -181,6 +181,10 @@ stdenv.mkDerivation rec {
     "strictoverflow"
     # don't interfere with dynamic target detection
     "relro" "bindnow"
+  ] ++ lib.optionals stdenv.hostPlatform.isAarch64 [
+    # "__builtin_clear_padding not supported for variable length aggregates"
+    # in aarch64-specific code
+    "trivialautovarinit"
   ];
 
   nativeBuildInputs = [
diff --git a/pkgs/development/libraries/simdjson/default.nix b/pkgs/development/libraries/simdjson/default.nix
index 4d15113f3c9af..8ef7308764b37 100644
--- a/pkgs/development/libraries/simdjson/default.nix
+++ b/pkgs/development/libraries/simdjson/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "simdjson";
-  version = "3.9.4";
+  version = "3.9.5";
 
   src = fetchFromGitHub {
     owner = "simdjson";
     repo = "simdjson";
     rev = "v${version}";
-    sha256 = "sha256-iTlIdLNOr1rRBnCwnI34e2RLL18Fmc/kRSMdZcOLp98=";
+    sha256 = "sha256-OCEHfjyWLxjThe1nrXIexMa4rI7RWt+3qnQErxHc7CU=";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/pkgs/development/libraries/simgear/default.nix b/pkgs/development/libraries/simgear/default.nix
index c66dfb3fdcc89..416274e1c5452 100644
--- a/pkgs/development/libraries/simgear/default.nix
+++ b/pkgs/development/libraries/simgear/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, plib, freeglut, xorgproto, libX11, libXext, libXi
+{ lib, stdenv, fetchurl, plib, libglut, xorgproto, libX11, libXext, libXi
 , libICE, libSM, libXt, libXmu, libGLU, libGL, boost179, zlib, libjpeg, freealut
 , openscenegraph, openal, expat, cmake, apr, xz
 , curl
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ cmake ];
-  buildInputs = [ plib freeglut xorgproto libX11 libXext libXi
+  buildInputs = [ plib libglut xorgproto libX11 libXext libXi
                   libICE libSM libXt libXmu libGLU libGL boost179 zlib libjpeg freealut
                   openscenegraph openal expat apr curl xz ];
 
diff --git a/pkgs/development/libraries/snappy/default.nix b/pkgs/development/libraries/snappy/default.nix
index 869c56ed73007..21785e251841e 100644
--- a/pkgs/development/libraries/snappy/default.nix
+++ b/pkgs/development/libraries/snappy/default.nix
@@ -5,13 +5,13 @@
 
 stdenv.mkDerivation rec {
   pname = "snappy";
-  version = "1.2.0";
+  version = "1.2.1";
 
   src = fetchFromGitHub {
     owner = "google";
     repo = "snappy";
     rev = version;
-    hash = "sha256-mpEeUoJs+lGlqh1m6Mmr8UnbtQDn/8kfkeQdFwo2rQ0=";
+    hash = "sha256-IzKzrMDjh+Weor+OrKdX62cAKYTdDXgldxCgNE2/8vk=";
   };
 
   patches = [
diff --git a/pkgs/development/libraries/spdlog/default.nix b/pkgs/development/libraries/spdlog/default.nix
index f9255e3df5950..6aa91db83549a 100644
--- a/pkgs/development/libraries/spdlog/default.nix
+++ b/pkgs/development/libraries/spdlog/default.nix
@@ -13,13 +13,13 @@
 
 stdenv.mkDerivation rec {
   pname = "spdlog";
-  version = "1.13.0";
+  version = "1.14.1";
 
   src = fetchFromGitHub {
     owner = "gabime";
     repo  = "spdlog";
     rev   = "v${version}";
-    hash  = "sha256-3n8BnjZ7uMH8quoiT60yTU7poyOtoEmzNMOLa1+r7X0=";
+    hash  = "sha256-F7khXbMilbh5b+eKnzcB0fPPWQqUHqAYPWJb83OnUKQ=";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/pkgs/development/libraries/thrift/default.nix b/pkgs/development/libraries/thrift/default.nix
index 3d0a9d8a78744..7995a3fe1699f 100644
--- a/pkgs/development/libraries/thrift/default.nix
+++ b/pkgs/development/libraries/thrift/default.nix
@@ -32,6 +32,8 @@ stdenv.mkDerivation rec {
     cmake
     flex
     pkg-config
+    python3
+    python3.pkgs.setuptools
   ];
 
   buildInputs = [
@@ -54,6 +56,11 @@ stdenv.mkDerivation rec {
       --replace "'FastbinaryTest.py'," "" \
       --replace "'TestEof.py'," "" \
       --replace "'TestFrozen.py'," ""
+
+    # these functions are removed in Python3.12
+    substituteInPlace test/py/SerializationTest.py \
+      --replace-fail "assertEquals" "assertEqual" \
+      --replace-fail "assertNotEquals" "assertNotEqual"
   '';
 
   preConfigure = ''
diff --git a/pkgs/development/libraries/vapoursynth/default.nix b/pkgs/development/libraries/vapoursynth/default.nix
index bf21723875bf8..79d3feca52455 100644
--- a/pkgs/development/libraries/vapoursynth/default.nix
+++ b/pkgs/development/libraries/vapoursynth/default.nix
@@ -61,7 +61,7 @@ stdenv.mkDerivation rec {
     homepage    = "http://www.vapoursynth.com/";
     license     = licenses.lgpl21;
     platforms   = platforms.x86_64;
-    maintainers = with maintainers; [ rnhmjoj sbruder tadeokondrak ];
+    maintainers = with maintainers; [ rnhmjoj sbruder ];
     mainProgram = "vspipe";
   };
 }
diff --git a/pkgs/development/libraries/vapoursynth/editor.nix b/pkgs/development/libraries/vapoursynth/editor.nix
index 2b4b1d5767b12..88fa1d763f01f 100644
--- a/pkgs/development/libraries/vapoursynth/editor.nix
+++ b/pkgs/development/libraries/vapoursynth/editor.nix
@@ -37,7 +37,7 @@ let
       description = "Cross-platform editor for VapourSynth scripts";
       homepage = "https://github.com/YomikoR/VapourSynth-Editor";
       license = licenses.mit;
-      maintainers = with maintainers; [ tadeokondrak ];
+      maintainers = with maintainers; [ ];
       platforms = platforms.all;
     };
   };
diff --git a/pkgs/development/libraries/wolfssl/default.nix b/pkgs/development/libraries/wolfssl/default.nix
index cfd6b99412a14..23970be58d086 100644
--- a/pkgs/development/libraries/wolfssl/default.nix
+++ b/pkgs/development/libraries/wolfssl/default.nix
@@ -60,6 +60,9 @@ stdenv.mkDerivation (finalAttrs: {
     "--enable-armasm=inline"
   ] ++ extraConfigureFlags;
 
+  # Breaks tls13 tests on aarch64-darwin.
+  hardeningDisable = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ "zerocallusedregs" ];
+
   # LTO should help with the C implementations.
   env.NIX_CFLAGS_COMPILE = lib.optionalString enableLto "-flto";
   env.NIX_LDFLAGS_COMPILE = lib.optionalString enableLto "-flto";
diff --git a/pkgs/development/libraries/x264/default.nix b/pkgs/development/libraries/x264/default.nix
index 91e8a435db804..e46599634d174 100644
--- a/pkgs/development/libraries/x264/default.nix
+++ b/pkgs/development/libraries/x264/default.nix
@@ -56,6 +56,6 @@ stdenv.mkDerivation rec {
     homepage = "http://www.videolan.org/developers/x264.html";
     license = licenses.gpl2Plus;
     platforms = platforms.unix ++ platforms.windows;
-    maintainers = with maintainers; [ tadeokondrak ];
+    maintainers = with maintainers; [ ];
   };
 }
diff --git a/pkgs/development/libraries/xsimd/default.nix b/pkgs/development/libraries/xsimd/default.nix
deleted file mode 100644
index 019b3afbefc84..0000000000000
--- a/pkgs/development/libraries/xsimd/default.nix
+++ /dev/null
@@ -1,54 +0,0 @@
-{ lib
-, stdenv
-, fetchFromGitHub
-, fetchpatch
-, cmake
-, doctest
-}:
-
-stdenv.mkDerivation (finalAttrs: {
-  pname = "xsimd";
-  version = "13.0.0";
-  src = fetchFromGitHub {
-    owner = "xtensor-stack";
-    repo = "xsimd";
-    rev = finalAttrs.version;
-    hash = "sha256-qElJYW5QDj3s59L3NgZj5zkhnUMzIP2mBa1sPks3/CE=";
-  };
-  patches = [
-    # Fix of https://github.com/xtensor-stack/xsimd/pull/1024 for
-    # https://github.com/xtensor-stack/xsimd/issues/456 and
-    # https://github.com/xtensor-stack/xsimd/issues/807,
-    (fetchpatch {
-      url = "https://github.com/xtensor-stack/xsimd/commit/c8a87ed6e04b6782f48f94713adfb0cad6c11ddf.patch";
-      hash = "sha256-2/FvBGdqTPcayD7rdHPSzL+F8IYKAfMW0WBJ0cW9EZ0=";
-    })
-  ] ++ lib.optionals stdenv.isDarwin [
-    # https://github.com/xtensor-stack/xsimd/issues/1030
-    ./disable-test_error_gamma.patch
-  ];
-
-  nativeBuildInputs = [
-    cmake
-  ];
-
-  cmakeFlags = [
-    # Always build the tests, even if not running them, because testing whether
-    # they can be built is a test in itself.
-    "-DBUILD_TESTS=ON"
-  ];
-
-  doCheck = true;
-  nativeCheckInputs = [
-    doctest
-  ];
-  checkTarget = "xtest";
-
-  meta = with lib; {
-    description = "C++ wrappers for SIMD intrinsics";
-    homepage = "https://github.com/xtensor-stack/xsimd";
-    license = licenses.bsd3;
-    maintainers = with maintainers; [ tobim doronbehar ];
-    platforms = platforms.all;
-  };
-})
diff --git a/pkgs/development/libraries/xsimd/disable-test_error_gamma.patch b/pkgs/development/libraries/xsimd/disable-test_error_gamma.patch
deleted file mode 100644
index 49957ea62ed74..0000000000000
--- a/pkgs/development/libraries/xsimd/disable-test_error_gamma.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff --git i/test/test_error_gamma.cpp w/test/test_error_gamma.cpp
-index 214cbb5..299e5b8 100644
---- i/test/test_error_gamma.cpp
-+++ w/test/test_error_gamma.cpp
-@@ -131,25 +131,6 @@ struct error_gamma_test
-             INFO("lgamma");
-             CHECK_EQ(diff, 0);
-         }
--#if !(XSIMD_WITH_AVX && !XSIMD_WITH_AVX2)
--
--        // tgamma (negative input)
--        {
--            std::transform(gamma_neg_input.cbegin(), gamma_neg_input.cend(), expected.begin(),
--                           [](const value_type& v)
--                           { return std::lgamma(v); });
--            batch_type in, out;
--            for (size_t i = 0; i < nb_input; i += size)
--            {
--                detail::load_batch(in, gamma_neg_input, i);
--                out = lgamma(in);
--                detail::store_batch(out, res, i);
--            }
--            size_t diff = detail::get_nb_diff(res, expected);
--            INFO("lgamma (negative input)");
--            CHECK_EQ(diff, 0);
--        }
--#endif
-     }
- };
- 
diff --git a/pkgs/development/libraries/zlib-ng/default.nix b/pkgs/development/libraries/zlib-ng/default.nix
index c4d2aa2c53344..c6fa9cb2a2ac2 100644
--- a/pkgs/development/libraries/zlib-ng/default.nix
+++ b/pkgs/development/libraries/zlib-ng/default.nix
@@ -5,13 +5,13 @@
 
 stdenv.mkDerivation rec {
   pname = "zlib-ng";
-  version = "2.1.6";
+  version = "2.1.7";
 
   src = fetchFromGitHub {
     owner = "zlib-ng";
     repo = "zlib-ng";
     rev = version;
-    hash = "sha256-Auu7DS4qNm9/8t/nCjEJBaXfPPxA18oZr2qqybVY4Es=";
+    hash = "sha256-fNebnLeME0HXUx8M7YfTT0aMJQggEmMs9EbJFWL1zC4=";
   };
 
   outputs = [ "out" "dev" "bin" ];