summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--doc/hooks/meson.section.md83
-rw-r--r--pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh2
-rw-r--r--pkgs/by-name/cm/cmake/001-search-path.diff (renamed from pkgs/development/tools/build-managers/cmake/001-search-path.diff)0
-rw-r--r--pkgs/by-name/cm/cmake/002-application-services.diff (renamed from pkgs/development/tools/build-managers/cmake/002-application-services.diff)0
-rw-r--r--pkgs/by-name/cm/cmake/003-libuv-application-services.diff (renamed from pkgs/development/tools/build-managers/cmake/003-libuv-application-services.diff)0
-rw-r--r--pkgs/by-name/cm/cmake/004-cygwin.diff (renamed from pkgs/development/tools/build-managers/cmake/004-cygwin.diff)0
-rw-r--r--pkgs/by-name/cm/cmake/005-remove-systemconfiguration-dep.diff (renamed from pkgs/development/tools/build-managers/cmake/005-remove-systemconfiguration-dep.diff)29
-rw-r--r--pkgs/by-name/cm/cmake/006-darwin-always-set-runtime-c-flag.diff (renamed from pkgs/development/tools/build-managers/cmake/006-darwin-always-set-runtime-c-flag.diff)0
-rw-r--r--pkgs/by-name/cm/cmake/check-pc-files-hook.sh (renamed from pkgs/development/tools/build-managers/cmake/check-pc-files-hook.sh)0
-rw-r--r--pkgs/by-name/cm/cmake/package.nix (renamed from pkgs/development/tools/build-managers/cmake/default.nix)65
-rwxr-xr-xpkgs/by-name/cm/cmake/setup-hook.sh (renamed from pkgs/development/tools/build-managers/cmake/setup-hook.sh)0
-rw-r--r--pkgs/by-name/me/meson/001-fix-rpath.patch (renamed from pkgs/development/tools/build-managers/meson/fix-rpath.patch)0
-rw-r--r--pkgs/by-name/me/meson/002-clear-old-rpath.patch (renamed from pkgs/development/tools/build-managers/meson/clear-old-rpath.patch)0
-rw-r--r--pkgs/by-name/me/meson/003-more-env-vars.patch (renamed from pkgs/development/tools/build-managers/meson/more-env-vars.patch)0
-rw-r--r--pkgs/by-name/me/meson/004-gir-fallback-path.patch (renamed from pkgs/development/tools/build-managers/meson/gir-fallback-path.patch)0
-rw-r--r--pkgs/by-name/me/meson/005-boost-Do-not-add-system-paths-on-nix.patch (renamed from pkgs/development/tools/build-managers/meson/boost-Do-not-add-system-paths-on-nix.patch)0
-rw-r--r--pkgs/by-name/me/meson/006-disable-bitcode.patch (renamed from pkgs/development/tools/build-managers/meson/disable-bitcode.patch)0
-rw-r--r--pkgs/by-name/me/meson/emulator-hook.sh (renamed from pkgs/development/tools/build-managers/meson/emulator-hook.sh)0
-rw-r--r--pkgs/by-name/me/meson/package.nix (renamed from pkgs/development/tools/build-managers/meson/default.nix)126
-rw-r--r--pkgs/by-name/me/meson/setup-hook.sh87
-rw-r--r--pkgs/development/compilers/gcc/default.nix4
-rw-r--r--pkgs/development/interpreters/python/catch_conflicts/catch_conflicts.py30
-rw-r--r--pkgs/development/interpreters/python/hooks/default.nix2
-rw-r--r--pkgs/development/libraries/gpgme/default.nix4
-rw-r--r--pkgs/development/libraries/grpc/default.nix27
-rw-r--r--pkgs/development/libraries/libaom/default.nix13
-rw-r--r--pkgs/development/libraries/libnsl/default.nix4
-rw-r--r--pkgs/development/libraries/oniguruma/default.nix4
-rw-r--r--pkgs/development/libraries/pipewire/default.nix4
-rw-r--r--pkgs/development/python-modules/deal/default.nix8
-rw-r--r--pkgs/development/python-modules/grpcio-health-checking/default.nix4
-rw-r--r--pkgs/development/python-modules/grpcio-status/default.nix4
-rw-r--r--pkgs/development/python-modules/grpcio-testing/default.nix4
-rw-r--r--pkgs/development/python-modules/grpcio-tools/default.nix4
-rw-r--r--pkgs/development/python-modules/icontract/default.nix7
-rw-r--r--pkgs/development/python-modules/mocket/default.nix86
-rw-r--r--pkgs/development/python-modules/typeguard/default.nix8
-rw-r--r--pkgs/development/tools/build-managers/meson/setup-hook.sh71
-rw-r--r--pkgs/os-specific/linux/procps-ng/default.nix4
-rw-r--r--pkgs/os-specific/linux/procps-ng/v3-CVE-2023-4016.patch63
-rw-r--r--pkgs/top-level/all-packages.nix14
-rw-r--r--pkgs/top-level/python-packages.nix4
42 files changed, 476 insertions, 289 deletions
diff --git a/doc/hooks/meson.section.md b/doc/hooks/meson.section.md
index a4b8da1d46c..3a7fb503208 100644
--- a/doc/hooks/meson.section.md
+++ b/doc/hooks/meson.section.md
@@ -1,50 +1,83 @@
 # Meson {#meson}
 
-Overrides the configure, check, and install phases to run `meson setup`, `meson test`, and `meson install`.
+[Meson](https://mesonbuild.com/) is an open source meta build system meant to be
+fast and user-friendly.
 
-Meson is a meta-build system so you will need a secondary build system to run the generated build files in build phase. In Nixpkgs context, you will want to accompany Meson with ninja, which provides a [setup hook](#ninja) registering a ninja-based build phase.
+In Nixpkgs, meson comes with a setup hook that overrides the configure, check,
+and install phases.
 
-By default, `enableParallelBuilding` is enabled as Meson supports parallel building almost everywhere.
+Being a meta build system, meson needs an accompanying backend. In the context
+of Nixpkgs, the typical companion backend is [Ninja](#ninja), that provides a
+setup hook registering ninja-based build and install phases.
 
-## Variables controlling Meson {#variables-controlling-meson}
+## Variables controlling Meson {#meson-variables-controlling}
 
-### `mesonFlags` {#mesonflags}
+### Meson Exclusive Variables {#meson-exclusive-variables}
 
-Controls the flags passed to `meson setup`.
+#### `mesonFlags` {#meson-flags}
 
-### `mesonCheckFlags` {#mesoncheckflags}
+Controls the flags passed to `meson setup` during configure phase.
 
-Controls the flags passed to `meson test`.
+#### `mesonWrapMode` {#meson-wrap-mode}
 
-### `mesonInstallFlags` {#mesoninstallflags}
+Which value is passed as
+[`-Dwrap_mode=`](https://mesonbuild.com/Builtin-options.html#core-options)
+to. In Nixpkgs the default value is `nodownload`, so that no subproject will be
+downloaded (since network access is already disabled during deployment in
+Nixpkgs).
 
-Controls the flags passed to `meson install`.
+Note: Meson allows pre-population of subprojects that would otherwise be
+downloaded.
 
-### `mesonInstallTags` {#mesoninstalltags}
+#### `mesonBuildType` {#meson-build-type}
 
-Tags specified here will be passed to Meson as via `--tags` during
-installation and controls which components will be installed.
+Which value is passed as
+[`--buildtype`](https://mesonbuild.com/Builtin-options.html#core-options) to
+`meson setup` during configure phase. In Nixpkgs the default value is `plain`.
 
-### `mesonBuildType` {#mesonbuildtype}
+#### `mesonAutoFeatures` {#meson-auto-features}
 
-Which [`--buildtype`](https://mesonbuild.com/Builtin-options.html#core-options) to pass to `meson setup`. We default to `plain`.
+Which value is passed as
+[`-Dauto_features=`](https://mesonbuild.com/Builtin-options.html#core-options)
+to `meson setup` during configure phase. In Nixpkgs the default value is
+`enabled`, meaning that every feature declared as "auto" by the meson scripts
+will be enabled.
 
-### `mesonAutoFeatures` {#mesonautofeatures}
+#### `mesonCheckFlags` {#meson-check-flags}
 
-What value to set [`-Dauto_features=`](https://mesonbuild.com/Builtin-options.html#core-options) to. We default to `enabled`.
+Controls the flags passed to `meson test` during check phase.
 
-### `mesonWrapMode` {#mesonwrapmode}
+#### `mesonInstallFlags` {#meson-install-flags}
 
-What value to set [`-Dwrap_mode=`](https://mesonbuild.com/Builtin-options.html#core-options) to. We default to `nodownload` as we disallow network access.
+Controls the flags passed to `meson install` during install phase.
 
-### `dontUseMesonConfigure` {#dontusemesonconfigure}
+#### `mesonInstallTags` {#meson-install-tags}
 
-Disables using Meson’s `configurePhase`.
+A list of installation tags passed to Meson's commandline option
+[`--tags`](https://mesonbuild.com/Installing.html#installation-tags) during
+install phase.
 
-### `dontUseMesonCheck` {#dontusemesoncheck}
+Note: `mesonInstallTags` should be a list of strings, that will be converted to
+a comma-separated string that is recognized to `--tags`.
+Example: `mesonInstallTags = [ "emulator" "assembler" ];` will be converted to
+`--tags emulator,assembler`.
 
-Disables using Meson’s `checkPhase`.
+#### `dontUseMesonConfigure` {#dont-use-meson-configure}
 
-### `dontUseMesonInstall` {#dontusemesoninstall}
+When set to true, don't use the predefined `mesonConfigurePhase`.
 
-Disables using Meson’s `installPhase`.
+#### `dontUseMesonCheck` {#dont-use-meson-check}
+
+When set to true, don't use the predefined `mesonCheckPhase`.
+
+#### `dontUseMesonInstall` {#dont-use-meson-install}
+
+When set to true, don't use the predefined `mesonInstallPhase`.
+
+### Honored variables {#meson-honored-variables}
+
+The following variables commonly used by `stdenv.mkDerivation` are honored by
+Meson setup hook.
+
+- `prefixKey`
+- `enableParallelBuilding`
diff --git a/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh b/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh
index 55e196e654d..e103fe77d9b 100644
--- a/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh
+++ b/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh
@@ -36,5 +36,5 @@ fixDarwinDylibNames() {
 
 fixDarwinDylibNamesIn() {
     local dir="$1"
-    fixDarwinDylibNames $(find "$dir" -name "*.dylib")
+    fixDarwinDylibNames $(find "$dir" -name "*.dylib" -o -name "*.so" -o -name "*.so.*")
 }
diff --git a/pkgs/development/tools/build-managers/cmake/001-search-path.diff b/pkgs/by-name/cm/cmake/001-search-path.diff
index 04ab0847a70..04ab0847a70 100644
--- a/pkgs/development/tools/build-managers/cmake/001-search-path.diff
+++ b/pkgs/by-name/cm/cmake/001-search-path.diff
diff --git a/pkgs/development/tools/build-managers/cmake/002-application-services.diff b/pkgs/by-name/cm/cmake/002-application-services.diff
index 56f7cd266b7..56f7cd266b7 100644
--- a/pkgs/development/tools/build-managers/cmake/002-application-services.diff
+++ b/pkgs/by-name/cm/cmake/002-application-services.diff
diff --git a/pkgs/development/tools/build-managers/cmake/003-libuv-application-services.diff b/pkgs/by-name/cm/cmake/003-libuv-application-services.diff
index 6607a9c6ed1..6607a9c6ed1 100644
--- a/pkgs/development/tools/build-managers/cmake/003-libuv-application-services.diff
+++ b/pkgs/by-name/cm/cmake/003-libuv-application-services.diff
diff --git a/pkgs/development/tools/build-managers/cmake/004-cygwin.diff b/pkgs/by-name/cm/cmake/004-cygwin.diff
index 982aba17e87..982aba17e87 100644
--- a/pkgs/development/tools/build-managers/cmake/004-cygwin.diff
+++ b/pkgs/by-name/cm/cmake/004-cygwin.diff
diff --git a/pkgs/development/tools/build-managers/cmake/005-remove-systemconfiguration-dep.diff b/pkgs/by-name/cm/cmake/005-remove-systemconfiguration-dep.diff
index 76aa91cff92..ffd3077d301 100644
--- a/pkgs/development/tools/build-managers/cmake/005-remove-systemconfiguration-dep.diff
+++ b/pkgs/by-name/cm/cmake/005-remove-systemconfiguration-dep.diff
@@ -1,6 +1,7 @@
---- a/Utilities/cmcurl/CMakeLists.txt
-+++ b/Utilities/cmcurl/CMakeLists.txt
-@@ -391,13 +391,6 @@ if(ENABLE_IPV6 AND NOT WIN32)
+diff -Naur cmake-3.27.7/Utilities/cmcurl/CMakeLists.txt cmake-3.27.7-new/Utilities/cmcurl/CMakeLists.txt
+--- cmake-3.27.7/Utilities/cmcurl/CMakeLists.txt	2023-10-06 10:08:35.000000000 -0300
++++ cmake-3.27.7-new/Utilities/cmcurl/CMakeLists.txt	2023-10-22 21:51:09.231609901 -0300
+@@ -414,13 +414,6 @@
  
    if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT ENABLE_ARES)
      set(use_core_foundation ON)
@@ -14,9 +15,10 @@
    endif()
  endif()
  
---- a/Utilities/cmcurl/lib/curl_setup.h
-+++ b/Utilities/cmcurl/lib/curl_setup.h
-@@ -257,11 +257,7 @@
+diff -Naur cmake-3.27.7/Utilities/cmcurl/lib/curl_setup.h cmake-3.27.7-new/Utilities/cmcurl/lib/curl_setup.h
+--- cmake-3.27.7/Utilities/cmcurl/lib/curl_setup.h	2023-10-06 10:08:35.000000000 -0300
++++ cmake-3.27.7-new/Utilities/cmcurl/lib/curl_setup.h	2023-10-22 21:52:00.214748294 -0300
+@@ -260,11 +260,7 @@
   * performing this task will result in a synthesized IPv6 address.
   */
  #if defined(__APPLE__) && !defined(USE_ARES)
@@ -28,9 +30,10 @@
  #endif
  
  #ifdef USE_LWIPSOCK
---- a/Utilities/cmcurl/lib/hostip.c
-+++ b/Utilities/cmcurl/lib/hostip.c
-@@ -68,10 +68,6 @@
+diff -Naur cmake-3.27.7/Utilities/cmcurl/lib/hostip.c cmake-3.27.7-new/Utilities/cmcurl/lib/hostip.c
+--- cmake-3.27.7/Utilities/cmcurl/lib/hostip.c	2023-10-06 10:08:35.000000000 -0300
++++ cmake-3.27.7-new/Utilities/cmcurl/lib/hostip.c	2023-10-22 21:53:29.249989934 -0300
+@@ -67,10 +67,6 @@
  #include "curl_memory.h"
  #include "memdebug.h"
  
@@ -38,10 +41,10 @@
 -#include <SystemConfiguration/SCDynamicStoreCopySpecific.h>
 -#endif
 -
- #if defined(CURLRES_SYNCH) && \
-     defined(HAVE_ALARM) && defined(SIGALRM) && defined(HAVE_SIGSETJMP)
- /* alarm-based timeouts can only be used with all the dependencies satisfied */
-@@ -661,23 +657,6 @@ enum resolve_t Curl_resolv(struct Curl_easy *data,
+ #if defined(CURLRES_SYNCH) &&                   \
+   defined(HAVE_ALARM) &&                        \
+   defined(SIGALRM) &&                           \
+@@ -743,23 +739,6 @@
          return CURLRESOLV_ERROR;
      }
  
diff --git a/pkgs/development/tools/build-managers/cmake/006-darwin-always-set-runtime-c-flag.diff b/pkgs/by-name/cm/cmake/006-darwin-always-set-runtime-c-flag.diff
index dc10e6b3423..dc10e6b3423 100644
--- a/pkgs/development/tools/build-managers/cmake/006-darwin-always-set-runtime-c-flag.diff
+++ b/pkgs/by-name/cm/cmake/006-darwin-always-set-runtime-c-flag.diff
diff --git a/pkgs/development/tools/build-managers/cmake/check-pc-files-hook.sh b/pkgs/by-name/cm/cmake/check-pc-files-hook.sh
index 94d1b7b5355..94d1b7b5355 100644
--- a/pkgs/development/tools/build-managers/cmake/check-pc-files-hook.sh
+++ b/pkgs/by-name/cm/cmake/check-pc-files-hook.sh
diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/by-name/cm/cmake/package.nix
index 00715130a00..a5731479150 100644
--- a/pkgs/development/tools/build-managers/cmake/default.nix
+++ b/pkgs/by-name/cm/cmake/package.nix
@@ -16,11 +16,17 @@
 , texinfo
 , xz
 , zlib
-, isBootstrap ? false
-, useOpenSSL ? !isBootstrap
-, useSharedLibraries ? (!isBootstrap && !stdenv.isCygwin)
+, isBootstrap ? null
+, isMinimalBuild ? (
+  if isBootstrap != null
+  then lib.warn
+    "isBootstrap argument is deprecated and will be removed; use isMinimalBuild instead"
+    isBootstrap
+  else false)
+, useOpenSSL ? !isMinimalBuild
+, useSharedLibraries ? (!isMinimalBuild && !stdenv.isCygwin)
 , uiToolkits ? [] # can contain "ncurses" and/or "qt5"
-, buildDocs ? !(isBootstrap || (uiToolkits == []))
+, buildDocs ? !(isMinimalBuild || (uiToolkits == []))
 , darwin
 , libsForQt5
 }:
@@ -34,17 +40,17 @@ in
 # Accepts only "ncurses" and "qt5" as possible uiToolkits
 assert lib.subtractLists [ "ncurses" "qt5" ] uiToolkits == [];
 # Minimal, bootstrap cmake does not have toolkits
-assert isBootstrap -> (uiToolkits == []);
+assert isMinimalBuild -> (uiToolkits == []);
 stdenv.mkDerivation (finalAttrs: {
   pname = "cmake"
-    + lib.optionalString isBootstrap "-boot"
+    + lib.optionalString isMinimalBuild "-minimal"
     + lib.optionalString cursesUI "-cursesUI"
     + lib.optionalString qt5UI "-qt5UI";
-  version = "3.26.4";
+  version = "3.27.7";
 
   src = fetchurl {
     url = "https://cmake.org/files/v${lib.versions.majorMinor finalAttrs.version}/cmake-${finalAttrs.version}.tar.gz";
-    hash = "sha256-MTtogMKRvU/jHAqlHW5iZZKCpSHmlfMNXMDSWrvVwgg=";
+    hash = "sha256-CPcaEGA2vwUfaSdg75VYwFd8Qqw56Wugl+dmK9QVjY4=";
   };
 
   patches = [
@@ -57,7 +63,7 @@ stdenv.mkDerivation (finalAttrs: {
   ]
   ++ lib.optional stdenv.isCygwin ./004-cygwin.diff
   # Derived from https://github.com/curl/curl/commit/31f631a142d855f069242f3e0c643beec25d1b51
-  ++ lib.optional (stdenv.isDarwin && isBootstrap) ./005-remove-systemconfiguration-dep.diff
+  ++ lib.optional (stdenv.isDarwin && isMinimalBuild) ./005-remove-systemconfiguration-dep.diff
   # On Darwin, always set CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG.
   ++ lib.optional stdenv.isDarwin ./006-darwin-always-set-runtime-c-flag.diff;
 
@@ -90,7 +96,7 @@ stdenv.mkDerivation (finalAttrs: {
   ++ lib.optional useOpenSSL openssl
   ++ lib.optional cursesUI ncurses
   ++ lib.optional qt5UI qtbase
-  ++ lib.optional (stdenv.isDarwin && !isBootstrap) SystemConfiguration;
+  ++ lib.optional (stdenv.isDarwin && !isMinimalBuild) SystemConfiguration;
 
   propagatedBuildInputs = lib.optional stdenv.isDarwin ps;
 
@@ -104,12 +110,23 @@ stdenv.mkDerivation (finalAttrs: {
     configureFlags="--parallel=''${NIX_BUILD_CORES:-1} CC=$CC_FOR_BUILD CXX=$CXX_FOR_BUILD $configureFlags"
   '';
 
+  # The configuration script is not autoconf-based, although being similar;
+  # triples and other interesting info are passed via CMAKE_* environment
+  # variables and commandline switches
+  configurePlatforms = [ ];
+
   configureFlags = [
     "CXXFLAGS=-Wno-elaborated-enum-base"
     "--docdir=share/doc/${finalAttrs.pname}-${finalAttrs.version}"
   ] ++ (if useSharedLibraries
-        then [ "--no-system-jsoncpp" "--system-libs" ]
-        else [ "--no-system-libs" ]) # FIXME: cleanup
+        then [
+          "--no-system-cppdap"
+          "--no-system-jsoncpp"
+          "--system-libs"
+        ]
+        else [
+          "--no-system-libs"
+        ]) # FIXME: cleanup
   ++ lib.optional qt5UI "--qt-gui"
   ++ lib.optionals buildDocs [
     "--sphinx-build=${sphinx}/bin/sphinx-build"
@@ -129,15 +146,17 @@ stdenv.mkDerivation (finalAttrs: {
     # Unfortunately cmake seems to expect absolute paths for ar, ranlib, and
     # strip. Otherwise they are taken to be relative to the source root of the
     # package being built.
-    "-DCMAKE_CXX_COMPILER=${stdenv.cc.targetPrefix}c++"
-    "-DCMAKE_C_COMPILER=${stdenv.cc.targetPrefix}cc"
-    "-DCMAKE_AR=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar"
-    "-DCMAKE_RANLIB=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ranlib"
-    "-DCMAKE_STRIP=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}strip"
-
-    "-DCMAKE_USE_OPENSSL=${if useOpenSSL then "ON" else "OFF"}"
-    # Avoid depending on frameworks.
-    "-DBUILD_CursesDialog=${if cursesUI then "ON" else "OFF"}"
+    (lib.cmakeFeature "CMAKE_CXX_COMPILER" "${stdenv.cc.targetPrefix}c++")
+    (lib.cmakeFeature "CMAKE_C_COMPILER" "${stdenv.cc.targetPrefix}cc")
+    (lib.cmakeFeature "CMAKE_AR"
+      "${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar")
+    (lib.cmakeFeature "CMAKE_RANLIB"
+      "${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ranlib")
+    (lib.cmakeFeature "CMAKE_STRIP"
+      "${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}strip")
+
+    (lib.cmakeBool "CMAKE_USE_OPENSSL" useOpenSSL)
+    (lib.cmakeBool "BUILD_CursesDialog" cursesUI)
   ];
 
   # make install attempts to use the just-built cmake
@@ -148,10 +167,6 @@ stdenv.mkDerivation (finalAttrs: {
   dontUseCmakeConfigure = true;
   enableParallelBuilding = true;
 
-  # This isn't an autoconf configure script; triples are passed via
-  # CMAKE_SYSTEM_NAME, etc.
-  configurePlatforms = [ ];
-
   doCheck = false; # fails
 
   meta = {
diff --git a/pkgs/development/tools/build-managers/cmake/setup-hook.sh b/pkgs/by-name/cm/cmake/setup-hook.sh
index b28ed42b689..b28ed42b689 100755
--- a/pkgs/development/tools/build-managers/cmake/setup-hook.sh
+++ b/pkgs/by-name/cm/cmake/setup-hook.sh
diff --git a/pkgs/development/tools/build-managers/meson/fix-rpath.patch b/pkgs/by-name/me/meson/001-fix-rpath.patch
index 29bec7903ca..29bec7903ca 100644
--- a/pkgs/development/tools/build-managers/meson/fix-rpath.patch
+++ b/pkgs/by-name/me/meson/001-fix-rpath.patch
diff --git a/pkgs/development/tools/build-managers/meson/clear-old-rpath.patch b/pkgs/by-name/me/meson/002-clear-old-rpath.patch
index f1e3c76e8b5..f1e3c76e8b5 100644
--- a/pkgs/development/tools/build-managers/meson/clear-old-rpath.patch
+++ b/pkgs/by-name/me/meson/002-clear-old-rpath.patch
diff --git a/pkgs/development/tools/build-managers/meson/more-env-vars.patch b/pkgs/by-name/me/meson/003-more-env-vars.patch
index e4ad4355042..e4ad4355042 100644
--- a/pkgs/development/tools/build-managers/meson/more-env-vars.patch
+++ b/pkgs/by-name/me/meson/003-more-env-vars.patch
diff --git a/pkgs/development/tools/build-managers/meson/gir-fallback-path.patch b/pkgs/by-name/me/meson/004-gir-fallback-path.patch
index e6d74026527..e6d74026527 100644
--- a/pkgs/development/tools/build-managers/meson/gir-fallback-path.patch
+++ b/pkgs/by-name/me/meson/004-gir-fallback-path.patch
diff --git a/pkgs/development/tools/build-managers/meson/boost-Do-not-add-system-paths-on-nix.patch b/pkgs/by-name/me/meson/005-boost-Do-not-add-system-paths-on-nix.patch
index 0a2eda9de9a..0a2eda9de9a 100644
--- a/pkgs/development/tools/build-managers/meson/boost-Do-not-add-system-paths-on-nix.patch
+++ b/pkgs/by-name/me/meson/005-boost-Do-not-add-system-paths-on-nix.patch
diff --git a/pkgs/development/tools/build-managers/meson/disable-bitcode.patch b/pkgs/by-name/me/meson/006-disable-bitcode.patch
index a72997c1043..a72997c1043 100644
--- a/pkgs/development/tools/build-managers/meson/disable-bitcode.patch
+++ b/pkgs/by-name/me/meson/006-disable-bitcode.patch
diff --git a/pkgs/development/tools/build-managers/meson/emulator-hook.sh b/pkgs/by-name/me/meson/emulator-hook.sh
index 4f08087cf5f..4f08087cf5f 100644
--- a/pkgs/development/tools/build-managers/meson/emulator-hook.sh
+++ b/pkgs/by-name/me/meson/emulator-hook.sh
diff --git a/pkgs/development/tools/build-managers/meson/default.nix b/pkgs/by-name/me/meson/package.nix
index 6674fbe7819..6239927848a 100644
--- a/pkgs/development/tools/build-managers/meson/default.nix
+++ b/pkgs/by-name/me/meson/package.nix
@@ -3,19 +3,19 @@
 , fetchFromGitHub
 , fetchpatch
 , installShellFiles
+, coreutils
+, darwin
+, libxcrypt
 , ninja
 , pkg-config
 , python3
-, zlib
-, coreutils
 , substituteAll
-, Foundation
-, OpenGL
-, AppKit
-, Cocoa
-, libxcrypt
+, zlib
 }:
 
+let
+  inherit (darwin.apple_sdk.frameworks) AppKit Cocoa Foundation OpenGL;
+in
 python3.pkgs.buildPythonApplication rec {
   pname = "meson";
   version = "1.2.3";
@@ -28,25 +28,13 @@ python3.pkgs.buildPythonApplication rec {
   };
 
   patches = [
-    # Meson is currently inspecting fewer variables than autoconf does, which
-    # makes it harder for us to use setup hooks, etc.  Taken from
-    # https://github.com/mesonbuild/meson/pull/6827
-    ./more-env-vars.patch
-
-    # Unlike libtool, vanilla Meson does not pass any information
-    # about the path library will be installed to to g-ir-scanner,
-    # breaking the GIR when path other than ${!outputLib}/lib is used.
-    # We patch Meson to add a --fallback-library-path argument with
-    # library install_dir to g-ir-scanner.
-    ./gir-fallback-path.patch
-
-    # In common distributions, RPATH is only needed for internal libraries so
+    # In typical distributions, RPATH is only needed for internal libraries so
     # meson removes everything else. With Nix, the locations of libraries
     # are not as predictable, therefore we need to keep them in the RPATH.
     # At the moment we are keeping the paths starting with /nix/store.
     # https://github.com/NixOS/nixpkgs/issues/31222#issuecomment-365811634
     (substituteAll {
-      src = ./fix-rpath.patch;
+      src = ./001-fix-rpath.patch;
       inherit (builtins) storeDir;
     })
 
@@ -56,50 +44,89 @@ python3.pkgs.buildPythonApplication rec {
     # But this can cause much bigger problem for Nix as it can produce
     # cut-in-half-by-\0 store path references.
     # Let’s just clear the whole rpath and hope for the best.
-    ./clear-old-rpath.patch
+    ./002-clear-old-rpath.patch
+
+    # Meson is currently inspecting fewer variables than autoconf does, which
+    # makes it harder for us to use setup hooks, etc.
+    # https://github.com/mesonbuild/meson/pull/6827
+    ./003-more-env-vars.patch
+
+    # Unlike libtool, vanilla Meson does not pass any information about the path
+    # library will be installed to to g-ir-scanner, breaking the GIR when path
+    # other than ${!outputLib}/lib is used.
+    # We patch Meson to add a --fallback-library-path argument with library
+    # install_dir to g-ir-scanner.
+    ./004-gir-fallback-path.patch
 
     # Patch out default boost search paths to avoid impure builds on
     # unsandboxed non-NixOS builds, see:
     # https://github.com/NixOS/nixpkgs/issues/86131#issuecomment-711051774
-    ./boost-Do-not-add-system-paths-on-nix.patch
+    ./005-boost-Do-not-add-system-paths-on-nix.patch
 
     # Nixpkgs cctools does not have bitcode support.
-    ./disable-bitcode.patch
+    ./006-disable-bitcode.patch
 
     # Fix passing multiple --define-variable arguments to pkg-config.
     # https://github.com/mesonbuild/meson/pull/10670
     (fetchpatch {
       url = "https://github.com/mesonbuild/meson/commit/d5252c5d4cf1c1931fef0c1c98dd66c000891d21.patch";
-      sha256 = "GiUNVul1N5Fl8mfqM7vA/r1FdKqImiDYLXMVDt77gvw=";
+      hash = "sha256-GiUNVul1N5Fl8mfqM7vA/r1FdKqImiDYLXMVDt77gvw=";
       excludes = [
         "docs/yaml/objects/dep.yaml"
       ];
     })
   ];
 
-  setupHook = ./setup-hook.sh;
+  buildInputs = lib.optionals (python3.pythonOlder "3.9") [
+    libxcrypt
+  ];
 
-  nativeCheckInputs = [ ninja pkg-config ];
-  checkInputs = [ zlib ]
-    ++ lib.optionals stdenv.isDarwin [ Foundation OpenGL AppKit Cocoa ];
-  checkPhase = ''
-    runHook preCheck
+  nativeBuildInputs = [ installShellFiles ];
 
-    patchShebangs 'test cases'
-    substituteInPlace 'test cases/native/8 external program shebang parsing/script.int.in' \
-      --replace /usr/bin/env ${coreutils}/bin/env
+  nativeCheckInputs = [
+    ninja
+    pkg-config
+  ];
+
+  checkInputs = [
+    zlib
+  ]
+  ++ lib.optionals stdenv.isDarwin [
+    AppKit
+    Cocoa
+    Foundation
+    OpenGL
+  ];
+
+  checkPhase = lib.concatStringsSep "\n" ([
+    "runHook preCheck"
+    ''
+      patchShebangs 'test cases'
+      substituteInPlace \
+        'test cases/native/8 external program shebang parsing/script.int.in' \
+          --replace /usr/bin/env ${coreutils}/bin/env
+    ''
+  ]
+  # Remove problematic tests
+  ++ (builtins.map (f: ''rm -vr "${f}";'') [
     # requires git, creating cyclic dependency
-    rm -r 'test cases/common/66 vcstag'
+    ''test cases/common/66 vcstag''
     # requires glib, creating cyclic dependency
-    rm -r 'test cases/linuxlike/6 subdir include order'
-    rm -r 'test cases/linuxlike/9 compiler checks with dependencies'
+    ''test cases/linuxlike/6 subdir include order''
+    ''test cases/linuxlike/9 compiler checks with dependencies''
     # requires static zlib, see #66461
-    rm -r 'test cases/linuxlike/14 static dynamic linkage'
+    ''test cases/linuxlike/14 static dynamic linkage''
     # Nixpkgs cctools does not have bitcode support.
-    rm -r 'test cases/osx/7 bitcode'
-    HOME="$TMPDIR" python ./run_project_tests.py
+    ''test cases/osx/7 bitcode''
+  ])
+  ++ [
+    ''HOME="$TMPDIR" python ./run_project_tests.py''
+    "runHook postCheck"
+  ]);
 
-    runHook postCheck
+  postInstall = ''
+    installShellCompletion --zsh data/shell-completions/zsh/_meson
+    installShellCompletion --bash data/shell-completions/bash/meson
   '';
 
   postFixup = ''
@@ -117,18 +144,9 @@ python3.pkgs.buildPythonApplication rec {
       --replace "python3 -c " "${python3.interpreter} -c "
   '';
 
-  buildInputs = lib.optionals (python3.pythonOlder "3.9") [
-    libxcrypt
-  ];
-
-  nativeBuildInputs = [ installShellFiles ];
-
-  postInstall = ''
-    installShellCompletion --zsh data/shell-completions/zsh/_meson
-    installShellCompletion --bash data/shell-completions/bash/meson
-  '';
+  setupHook = ./setup-hook.sh;
 
-  meta = with lib; {
+  meta = {
     homepage = "https://mesonbuild.com";
     description = "An open source, fast and friendly build system made in Python";
     longDescription = ''
@@ -140,8 +158,8 @@ python3.pkgs.buildPythonApplication rec {
       second spent waiting for the build system to actually start compiling
       code.
     '';
-    license = licenses.asl20;
-    maintainers = with maintainers; [ mbe AndersonTorres ];
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ AndersonTorres ];
     inherit (python3.meta) platforms;
   };
 }
diff --git a/pkgs/by-name/me/meson/setup-hook.sh b/pkgs/by-name/me/meson/setup-hook.sh
new file mode 100644
index 00000000000..85849fbec73
--- /dev/null
+++ b/pkgs/by-name/me/meson/setup-hook.sh
@@ -0,0 +1,87 @@
+# shellcheck shell=bash disable=SC2206
+
+mesonConfigurePhase() {
+    runHook preConfigure
+
+    local flagsArray=()
+
+    if [ -z "${dontAddPrefix-}" ]; then
+        flagsArray+=("--prefix=$prefix")
+    fi
+
+    # See multiple-outputs.sh and meson’s coredata.py
+    flagsArray+=(
+        "--libdir=${!outputLib}/lib"
+        "--libexecdir=${!outputLib}/libexec"
+        "--bindir=${!outputBin}/bin"
+        "--sbindir=${!outputBin}/sbin"
+        "--includedir=${!outputInclude}/include"
+        "--mandir=${!outputMan}/share/man"
+        "--infodir=${!outputInfo}/share/info"
+        "--localedir=${!outputLib}/share/locale"
+        "-Dauto_features=${mesonAutoFeatures:-enabled}"
+        "-Dwrap_mode=${mesonWrapMode:-nodownload}"
+        ${crossMesonFlags}
+        "--buildtype=${mesonBuildType:-plain}"
+    )
+
+    flagsArray+=(
+        $mesonFlags
+        "${mesonFlagsArray[@]}"
+    )
+
+    echoCmd 'mesonConfigurePhase flags' "${flagsArray[@]}"
+
+    meson setup build "${flagsArray[@]}"
+    cd build || { echoCmd 'mesonConfigurePhase' "could not cd to build"; exit 1; }
+
+    if ! [[ -v enableParallelBuilding ]]; then
+        enableParallelBuilding=1
+        echoCmd 'mesonConfigurePhase' "enabled parallel building"
+    fi
+
+    if [[ ${checkPhase-ninjaCheckPhase} = ninjaCheckPhase && -z $dontUseMesonCheck ]]; then
+        checkPhase=mesonCheckPhase
+    fi
+    if [[ ${installPhase-ninjaInstallPhase} = ninjaInstallPhase && -z $dontUseMesonInstall ]]; then
+        installPhase=mesonInstallPhase
+    fi
+
+    runHook postConfigure
+}
+
+mesonCheckPhase() {
+    runHook preCheck
+
+    local flagsArray=($mesonCheckFlags "${mesonCheckFlagsArray[@]}")
+
+    echoCmd 'mesonCheckPhase flags' "${flagsArray[@]}"
+    meson test --no-rebuild "${flagsArray[@]}"
+
+    runHook postCheck
+}
+
+mesonInstallPhase() {
+    runHook preInstall
+
+    local flagsArray=()
+
+    if [[ -n "$mesonInstallTags" ]]; then
+        flagsArray+=("--tags" "${mesonInstallTags// /,}")
+    fi
+    flagsArray+=(
+        $mesonInstallFlags
+        "${mesonInstallFlagsArray[@]}"
+    )
+
+    echoCmd 'mesonInstallPhase flags' "${flagsArray[@]}"
+    meson install --no-rebuild "${flagsArray[@]}"
+
+    runHook postInstall
+}
+
+if [ -z "${dontUseMesonConfigure-}" ] && [ -z "${configurePhase-}" ]; then
+    # shellcheck disable=SC2034
+    setOutputFlags=
+    configurePhase=mesonConfigurePhase
+fi
diff --git a/pkgs/development/compilers/gcc/default.nix b/pkgs/development/compilers/gcc/default.nix
index 4544f3862fe..6b8d22a681b 100644
--- a/pkgs/development/compilers/gcc/default.nix
+++ b/pkgs/development/compilers/gcc/default.nix
@@ -117,8 +117,8 @@ let inherit version;
 
     /* Cross-gcc settings (build == host != target) */
     crossMingw = targetPlatform != hostPlatform && targetPlatform.isMinGW;
-    stageNameAddon = if withoutTargetLibc then "stage-static" else "stage-final";
-    crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-";
+    stageNameAddon = optionalString withoutTargetLibc "-nolibc";
+    crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}${stageNameAddon}-";
 
     javaAwtGtk = langJava && x11Support;
     xlibs = [
diff --git a/pkgs/development/interpreters/python/catch_conflicts/catch_conflicts.py b/pkgs/development/interpreters/python/catch_conflicts/catch_conflicts.py
index bb82900c65a..d5c99e64751 100644
--- a/pkgs/development/interpreters/python/catch_conflicts/catch_conflicts.py
+++ b/pkgs/development/interpreters/python/catch_conflicts/catch_conflicts.py
@@ -1,30 +1,34 @@
-import pkg_resources
+from importlib.metadata import PathDistribution
+from pathlib import Path
 import collections
 import sys
 
+
 do_abort = False
 packages = collections.defaultdict(list)
 
-for f in sys.path:
-    for req in pkg_resources.find_distributions(f):
-        if req not in packages[req.project_name]:
-            # some exceptions inside buildPythonPackage
-            if req.project_name in ['setuptools', 'pip', 'wheel']:
-                continue
-            packages[req.project_name].append(req)
+
+for path in sys.path:
+    for dist_info in Path(path).glob("*.dist-info"):
+        dist = PathDistribution(dist_info)
+
+        packages[dist._normalized_name].append(
+            f"{dist._normalized_name} {dist.version} ({dist._path})"
+        )
 
 
 for name, duplicates in packages.items():
     if len(duplicates) > 1:
         do_abort = True
         print("Found duplicated packages in closure for dependency '{}': ".format(name))
-        for dup in duplicates:
-            print("  " + repr(dup))
+        for duplicate in duplicates:
+            print(f"\t{duplicate}")
 
 if do_abort:
     print("")
     print(
-        'Package duplicates found in closure, see above. Usually this '
-        'happens if two packages depend on different version '
-        'of the same dependency.')
+        "Package duplicates found in closure, see above. Usually this "
+        "happens if two packages depend on different version "
+        "of the same dependency."
+    )
     sys.exit(1)
diff --git a/pkgs/development/interpreters/python/hooks/default.nix b/pkgs/development/interpreters/python/hooks/default.nix
index 6a05a7fa6ee..16324b30b3f 100644
--- a/pkgs/development/interpreters/python/hooks/default.nix
+++ b/pkgs/development/interpreters/python/hooks/default.nix
@@ -107,7 +107,7 @@ in {
     makePythonHook {
       name = "python-catch-conflicts-hook";
       substitutions = {
-        inherit pythonInterpreter pythonSitePackages setuptools;
+        inherit pythonInterpreter pythonSitePackages;
         catchConflicts=../catch_conflicts/catch_conflicts.py;
       };
     } ./python-catch-conflicts-hook.sh) {};
diff --git a/pkgs/development/libraries/gpgme/default.nix b/pkgs/development/libraries/gpgme/default.nix
index b223f249f83..0a473c95bed 100644
--- a/pkgs/development/libraries/gpgme/default.nix
+++ b/pkgs/development/libraries/gpgme/default.nix
@@ -26,11 +26,11 @@ let
 in
 stdenv.mkDerivation rec {
   pname = "gpgme";
-  version = "1.22.0";
+  version = "1.23.0";
 
   src = fetchurl {
     url = "mirror://gnupg/gpgme/${pname}-${version}.tar.bz2";
-    hash = "sha256-lVHjcIGtO96BAYoNJPJFw/ggaZBUlZj7Mal6aDgKe3E=";
+    hash = "sha256-BD4u/hi0rSK5bUNN3nY/vtMs+NbCINxp3w0P+53Gb8Y=";
   };
 
   patches = [
diff --git a/pkgs/development/libraries/grpc/default.nix b/pkgs/development/libraries/grpc/default.nix
index 0532907ac15..5569f99adbe 100644
--- a/pkgs/development/libraries/grpc/default.nix
+++ b/pkgs/development/libraries/grpc/default.nix
@@ -21,7 +21,7 @@
 
 stdenv.mkDerivation rec {
   pname = "grpc";
-  version = "1.57.0"; # N.B: if you change this, please update:
+  version = "1.59.1"; # N.B: if you change this, please update:
     # pythonPackages.grpcio-tools
     # pythonPackages.grpcio-status
 
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
     owner = "grpc";
     repo = "grpc";
     rev = "v${version}";
-    hash = "sha256-ZPhPi4ODAAohCySVKeypaDID4ZUXvnfidOGK5EMXvh4=";
+    hash = "sha256-4bou7oFQOgyxjFqJdmiFT8xEMCsOap9v34W6SPrT4WQ=";
     fetchSubmodules = true;
   };
 
@@ -37,14 +37,8 @@ stdenv.mkDerivation rec {
     (fetchpatch {
       # armv6l support, https://github.com/grpc/grpc/pull/21341
       name = "grpc-link-libatomic.patch";
-      url = "https://github.com/lopsided98/grpc/commit/164f55260262c816e19cd2c41b564486097d62fe.patch";
-      hash = "sha256-d6kMyjL5ZnEnEz4XZfRgXJBH53gp1r7q1tlwh+HM6+Y=";
-    })
-    # Fix generated CMake config file
-    # FIXME: remove when merged
-    (fetchpatch {
-      url = "https://github.com/grpc/grpc/pull/33361/commits/117dc80eb43021dd5619023ef6d02d0d6ec7ae7a.patch";
-      hash = "sha256-VBk3ZD5h9uOQVN0st+quUQK/wXqvfFNk8G8AN4f2MQo=";
+      url = "https://github.com/lopsided98/grpc/commit/a9b917666234f5665c347123d699055d8c2537b2.patch";
+      hash = "sha256-Lm0GQsz/UjBbXXEE14lT0dcRzVmCKycrlrdBJj+KLu8=";
     })
   ];
 
@@ -94,13 +88,12 @@ stdenv.mkDerivation rec {
     export LD_LIBRARY_PATH=$(pwd)''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH
   '';
 
-  env.NIX_CFLAGS_COMPILE = lib.concatStringsSep " " (
-    lib.optionals stdenv.cc.isClang [
-      "-Wno-error=unknown-warning-option"
-    ] ++ lib.optionals stdenv.isAarch64 [
-      "-Wno-error=format-security"
-    ]
-  );
+  env.NIX_CFLAGS_COMPILE = toString ([
+    "-Wno-error"
+  ] ++ lib.optionals stdenv.isDarwin [
+    # Workaround for https://github.com/llvm/llvm-project/issues/48757
+    "-Wno-elaborated-enum-base"
+  ]);
 
   enableParallelBuilds = true;
 
diff --git a/pkgs/development/libraries/libaom/default.nix b/pkgs/development/libraries/libaom/default.nix
index 6be0370a177..c5e40babfd6 100644
--- a/pkgs/development/libraries/libaom/default.nix
+++ b/pkgs/development/libraries/libaom/default.nix
@@ -1,6 +1,7 @@
 { lib, stdenv, fetchzip, yasm, perl, cmake, pkg-config, python3
 , enableButteraugli ? true, libjxl
 , enableVmaf ? true, libvmaf
+, gitUpdater
 }:
 
 let
@@ -8,11 +9,11 @@ let
 in
 stdenv.mkDerivation rec {
   pname = "libaom";
-  version = "3.6.1";
+  version = "3.7.0";
 
   src = fetchzip {
     url = "https://aomedia.googlesource.com/aom/+archive/v${version}.tar.gz";
-    sha256 = "sha256-U7hmKdpjTtqStM4UIjCvgJ2swpZ1x0Px1Q9+gSHbaeQ=";
+    hash = "sha256-Zf0g/CMI73O9Dkn9o7aIvwZ/8wh3lCmVY8nZaPwBp68=";
     stripRoot = false;
   };
 
@@ -64,6 +65,14 @@ stdenv.mkDerivation rec {
 
   outputs = [ "out" "bin" "dev" "static" ];
 
+  passthru = {
+    updateScript = gitUpdater {
+      url = "https://aomedia.googlesource.com/aom";
+      rev-prefix = "v";
+      ignoredVersions = "(alpha|beta|rc).*";
+    };
+  };
+
   meta = with lib; {
     description = "Alliance for Open Media AV1 codec library";
     longDescription = ''
diff --git a/pkgs/development/libraries/libnsl/default.nix b/pkgs/development/libraries/libnsl/default.nix
index 4f9d7d09caa..59e16071ce7 100644
--- a/pkgs/development/libraries/libnsl/default.nix
+++ b/pkgs/development/libraries/libnsl/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "libnsl";
-  version = "2.0.0";
+  version = "2.0.1";
 
   src = fetchFromGitHub {
     owner = "thkukuk";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-f9kNzzR8baf5mLgrh+bKO/rBRZA5ZYc1tJdyLE7Bi1w=";
+    sha256 = "sha256-bCToqXVE4RZcoZ2eTNZcVHyzKlWyIpSAssQCOZcfmEA=";
   };
 
   nativeBuildInputs = [ autoreconfHook pkg-config ];
diff --git a/pkgs/development/libraries/oniguruma/default.nix b/pkgs/development/libraries/oniguruma/default.nix
index 3062c3cb4e1..a1a9dc87573 100644
--- a/pkgs/development/libraries/oniguruma/default.nix
+++ b/pkgs/development/libraries/oniguruma/default.nix
@@ -2,12 +2,12 @@
 
 stdenv.mkDerivation rec {
   pname = "oniguruma";
-  version = "6.9.8";
+  version = "6.9.9";
 
   # Note: do not use fetchpatch or fetchFromGitHub to keep this package available in __bootPackages
   src = fetchurl {
     url = "https://github.com/kkos/oniguruma/releases/download/v${version}/onig-${version}.tar.gz";
-    sha256 = "sha256-KM1iwUZGI8eRBWX7HMqqAQSy/osSvNZG6B9ztHU1IT4=";
+    sha256 = "sha256-YBYr07n8b0iG1MegeSX/03QWdzL1Xc6MSRv9nNgYps8=";
   };
 
   outputs = [ "dev" "lib" "out" ];
diff --git a/pkgs/development/libraries/pipewire/default.nix b/pkgs/development/libraries/pipewire/default.nix
index 05741652f46..3876a5c892a 100644
--- a/pkgs/development/libraries/pipewire/default.nix
+++ b/pkgs/development/libraries/pipewire/default.nix
@@ -81,7 +81,7 @@ let
 
   self = stdenv.mkDerivation rec {
     pname = "pipewire";
-    version = "0.3.83";
+    version = "0.3.84";
 
     outputs = [
       "out"
@@ -97,7 +97,7 @@ let
       owner = "pipewire";
       repo = "pipewire";
       rev = version;
-      sha256 = "sha256-12g8/zLTCQkBtgwE6zt3yEDwcHCr2LQXJCjB1nqbmB0=";
+      sha256 = "sha256-9W9y+wtS/CYUaPRrCRmRDeyvuS1XllMBNQLy6GAMqBM=";
     };
 
     patches = [
diff --git a/pkgs/development/python-modules/deal/default.nix b/pkgs/development/python-modules/deal/default.nix
index 0333bb37ce3..13704b20939 100644
--- a/pkgs/development/python-modules/deal/default.nix
+++ b/pkgs/development/python-modules/deal/default.nix
@@ -77,13 +77,17 @@ buildPythonPackage rec {
     "test_scheme_contract_is_satisfied_when_setting_arg"
     "test_scheme_contract_is_satisfied_within_chain"
     "test_scheme_errors_rewrite_message"
-    # broken since pytest > 7.1.3
-    "test_exception_hook"
+    # assert errors
+    "test_doctest"
+    "test_no_violations"
   ];
 
   disabledTestPaths = [
     # needs internet access
     "tests/test_runtime/test_offline.py"
+    # depends on typeguard <4.0.0 for tests, but >=4.0.0 seems fine for runtime
+    # https://github.com/life4/deal/blob/9be70fa1c5a0635880619b2cea83a9f6631eb236/pyproject.toml#L40
+    "tests/test_testing.py"
   ];
 
   pythonImportsCheck = [ "deal" ];
diff --git a/pkgs/development/python-modules/grpcio-health-checking/default.nix b/pkgs/development/python-modules/grpcio-health-checking/default.nix
index ce1a78f02cf..4c028e4ec71 100644
--- a/pkgs/development/python-modules/grpcio-health-checking/default.nix
+++ b/pkgs/development/python-modules/grpcio-health-checking/default.nix
@@ -8,12 +8,12 @@
 
 buildPythonPackage rec {
   pname = "grpcio-health-checking";
-  version = "1.58.0";
+  version = "1.59.0";
   format = "setuptools";
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-B9WGI/J77PGGyGLLrn39elS9Y/SzdZTHfIuPyTPxHC8=";
+    hash = "sha256-4CIcpupsITlhQXmAi4+LMjA30LG977D8TN2agUmZVx4=";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/grpcio-status/default.nix b/pkgs/development/python-modules/grpcio-status/default.nix
index c03c1faa9d4..e7d6fd55095 100644
--- a/pkgs/development/python-modules/grpcio-status/default.nix
+++ b/pkgs/development/python-modules/grpcio-status/default.nix
@@ -9,14 +9,14 @@
 
 buildPythonPackage rec {
   pname = "grpcio-status";
-  version = "1.58.0";
+  version = "1.59.0";
   format = "setuptools";
 
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-C0LnDAQFpmqC2emGf6JV/lnmGJZKYJmyBWjDHdkJl2Y=";
+    hash = "sha256-+TucM+CiYWLvhDG/z/zD4fshfM2Ne1swYbbp+BPmmLU=";
   };
 
   postPatch = ''
diff --git a/pkgs/development/python-modules/grpcio-testing/default.nix b/pkgs/development/python-modules/grpcio-testing/default.nix
index 904c0b24a0a..bb3024d4407 100644
--- a/pkgs/development/python-modules/grpcio-testing/default.nix
+++ b/pkgs/development/python-modules/grpcio-testing/default.nix
@@ -9,14 +9,14 @@
 
 buildPythonPackage rec {
   pname = "grpcio-testing";
-  version = "1.58.0";
+  version = "1.59.0";
   format = "setuptools";
 
   disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-ABZMp+VTsyf2HE50cnHf9wdCOeGlAqpbuMWlbsWE/qY=";
+    hash = "sha256-YiqbhlOsyoAT/uYNPbLQK5c2T8cYGEDXVkAPIzCaOQ4=";
   };
 
   postPatch = ''
diff --git a/pkgs/development/python-modules/grpcio-tools/default.nix b/pkgs/development/python-modules/grpcio-tools/default.nix
index 285f3477dea..cd0b0abcb12 100644
--- a/pkgs/development/python-modules/grpcio-tools/default.nix
+++ b/pkgs/development/python-modules/grpcio-tools/default.nix
@@ -2,12 +2,12 @@
 
 buildPythonPackage rec {
   pname = "grpcio-tools";
-  version = "1.58.0";
+  version = "1.59.0";
   format = "setuptools";
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-b02AzrWR4xyk3O7HR9vlYTLhOSoKm7HI/gAdG1ysiYo=";
+    hash = "sha256-qkAY8thmKsTZgwRF09JToRs+CW6K/iCGVUcTeqEWDpM=";
   };
 
   postPatch = ''
diff --git a/pkgs/development/python-modules/icontract/default.nix b/pkgs/development/python-modules/icontract/default.nix
index 77565311efb..76e1814dddd 100644
--- a/pkgs/development/python-modules/icontract/default.nix
+++ b/pkgs/development/python-modules/icontract/default.nix
@@ -50,6 +50,13 @@ buildPythonPackage rec {
     # mypy decorator checks don't pass. For some reason mypy
     # doesn't check the python file provided in the test.
     "tests/test_mypy_decorators.py"
+    # those tests seems to simply re-run some typeguard tests
+    "tests/test_typeguard.py"
+  ];
+
+  pytestFlagsArray = [
+    # RuntimeWarning: coroutine '*' was never awaited
+    "-W" "ignore::RuntimeWarning"
   ];
 
   pythonImportsCheck = [ "icontract" ];
diff --git a/pkgs/development/python-modules/mocket/default.nix b/pkgs/development/python-modules/mocket/default.nix
index 49125a286e9..41789a796dd 100644
--- a/pkgs/development/python-modules/mocket/default.nix
+++ b/pkgs/development/python-modules/mocket/default.nix
@@ -1,37 +1,51 @@
 { lib
-, aiohttp
-, asgiref
 , buildPythonPackage
+, fetchPypi
+, pythonOlder
+, stdenv
+
+# build-system
+, hatchling
+
+# dependencies
 , decorator
+, httptools
+, python-magic
+, urllib3
+
+# optional-dependencies
+, xxhash
+, pook
+
+# tests
+, aiohttp
+, asgiref
 , fastapi
-, fetchPypi
 , gevent
-, httptools
 , httpx
-, isPy3k
-, pook
-, pytest-mock
+, pytest-asyncio
 , pytestCheckHook
-, python-magic
-, pythonOlder
 , redis
+, redis-server
 , requests
 , sure
-, urllib3
+
 }:
 
 buildPythonPackage rec {
   pname = "mocket";
-  version = "3.11.1";
-  format = "setuptools";
-
-  disabled = pythonOlder "3.7";
+  version = "3.12.0";
+  pyproject = true;
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-sEPLUN9nod4AKYcoCNQZ4FBblUCLCPV1dFOrNC6xDWo=";
+    hash = "sha256-brvBWwTWT2F/usVBRr7wz9L0kct4X1Fddl4mu5LUENA=";
   };
 
+  nativeBuildInputs = [
+    hatchling
+  ];
+
   propagatedBuildInputs = [
     decorator
     httptools
@@ -43,52 +57,58 @@ buildPythonPackage rec {
     pook = [
       pook
     ];
+    speedups = [
+      xxhash
+    ];
   };
 
   nativeCheckInputs = [
-    aiohttp
     asgiref
     fastapi
     gevent
     httpx
-    pytest-mock
+    pytest-asyncio
     pytestCheckHook
     redis
     requests
     sure
-  ] ++ passthru.optional-dependencies.pook;
+  ] ++ lib.optionals (pythonOlder "3.12") [
+    aiohttp
+  ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
 
-  # Skip http tests
-  SKIP_TRUE_HTTP = true;
+  preCheck = lib.optionalString stdenv.isLinux ''
+    ${redis-server}/bin/redis-server &
+    REDIS_PID=$!
+  '';
 
-  disabledTestPaths = [
-    # Requires a live Redis instance
-    "tests/main/test_redis.py"
-  ];
+  postCheck = lib.optionalString stdenv.isLinux ''
+    kill $REDIS_PID
+  '';
+
+  # Skip http tests, they require network access
+  env.SKIP_TRUE_HTTP = true;
+
+  _darwinAllowLocalNetworking = true;
 
   disabledTests = [
     # tests that require network access (like DNS lookups)
-    "test_truesendall"
-    "test_truesendall_with_chunk_recording"
-    "test_truesendall_with_gzip_recording"
-    "test_truesendall_with_recording"
-    "test_wrongpath_truesendall"
     "test_truesendall_with_dump_from_recording"
-    "test_truesendall_with_recording_https"
-    "test_truesendall_after_mocket_session"
-    "test_real_request_session"
     "test_asyncio_record_replay"
     "test_gethostbyname"
   ];
 
+  disabledTestPaths = lib.optionals stdenv.isDarwin [
+    "tests/main/test_redis.py"
+  ];
+
   pythonImportsCheck = [
     "mocket"
   ];
 
   meta = with lib; {
+    changelog = "https://github.com/mindflayer/python-mocket/releases/tag/${version}";
     description = "A socket mock framework for all kinds of sockets including web-clients";
     homepage = "https://github.com/mindflayer/python-mocket";
-    changelog = "https://github.com/mindflayer/python-mocket/releases/tag/${version}";
     license = licenses.bsd3;
     maintainers = with maintainers; [ hexa ];
   };
diff --git a/pkgs/development/python-modules/typeguard/default.nix b/pkgs/development/python-modules/typeguard/default.nix
index 7fd258e9123..23e3bdc5b54 100644
--- a/pkgs/development/python-modules/typeguard/default.nix
+++ b/pkgs/development/python-modules/typeguard/default.nix
@@ -54,8 +54,12 @@ buildPythonPackage rec {
   ];
 
   disabledTests = [
-    # not compatible with python3.10
-    "test_typed_dict"
+    # AssertionError: 'type of argument "x" must be ' != 'None'
+    "TestPrecondition::test_precondition_ok_and_typeguard_fails"
+    # AttributeError: 'C' object has no attribute 'x'
+    "TestInvariant::test_invariant_ok_and_typeguard_fails"
+    # AttributeError: 'D' object has no attribute 'x'
+    "TestInheritance::test_invariant_ok_and_typeguard_fails"
   ];
 
   meta = with lib; {
diff --git a/pkgs/development/tools/build-managers/meson/setup-hook.sh b/pkgs/development/tools/build-managers/meson/setup-hook.sh
deleted file mode 100644
index dc7780b2fd3..00000000000
--- a/pkgs/development/tools/build-managers/meson/setup-hook.sh
+++ /dev/null
@@ -1,71 +0,0 @@
-mesonConfigurePhase() {
-    runHook preConfigure
-
-    if [ -z "${dontAddPrefix-}" ]; then
-        mesonFlags="--prefix=$prefix $mesonFlags"
-    fi
-
-    # See multiple-outputs.sh and meson’s coredata.py
-    mesonFlags="\
-        --libdir=${!outputLib}/lib --libexecdir=${!outputLib}/libexec \
-        --bindir=${!outputBin}/bin --sbindir=${!outputBin}/sbin \
-        --includedir=${!outputInclude}/include \
-        --mandir=${!outputMan}/share/man --infodir=${!outputInfo}/share/info \
-        --localedir=${!outputLib}/share/locale \
-        -Dauto_features=${mesonAutoFeatures:-enabled} \
-        -Dwrap_mode=${mesonWrapMode:-nodownload} \
-        $mesonFlags"
-
-    mesonFlags="${crossMesonFlags+$crossMesonFlags }--buildtype=${mesonBuildType:-plain} $mesonFlags"
-
-    echo "meson flags: $mesonFlags ${mesonFlagsArray[@]}"
-
-    meson setup build $mesonFlags "${mesonFlagsArray[@]}"
-    cd build
-
-    if ! [[ -v enableParallelBuilding ]]; then
-        enableParallelBuilding=1
-        echo "meson: enabled parallel building"
-    fi
-
-    if [[ ${checkPhase-ninjaCheckPhase} = ninjaCheckPhase && -z $dontUseMesonCheck ]]; then
-        checkPhase=mesonCheckPhase
-    fi
-    if [[ ${installPhase-ninjaInstallPhase} = ninjaInstallPhase && -z $dontUseMesonInstall ]]; then
-        installPhase=mesonInstallPhase
-    fi
-
-    runHook postConfigure
-}
-
-mesonCheckPhase() {
-    runHook preCheck
-
-    local flagsArray=($mesonCheckFlags "${mesonCheckFlagsArray[@]}")
-
-    echoCmd 'check flags' "${flagsArray[@]}"
-    meson test --no-rebuild "${flagsArray[@]}"
-
-    runHook postCheck
-}
-
-mesonInstallPhase() {
-    runHook preInstall
-
-    # shellcheck disable=SC2086
-    local flagsArray=($mesonInstallFlags "${mesonInstallFlagsArray[@]}")
-
-    if [[ -n "$mesonInstallTags" ]]; then
-        flagsArray+=("--tags" "${mesonInstallTags// /,}")
-    fi
-
-    echoCmd 'install flags' "${flagsArray[@]}"
-    meson install --no-rebuild "${flagsArray[@]}"
-
-    runHook postInstall
-}
-
-if [ -z "${dontUseMesonConfigure-}" -a -z "${configurePhase-}" ]; then
-    setOutputFlags=
-    configurePhase=mesonConfigurePhase
-fi
diff --git a/pkgs/os-specific/linux/procps-ng/default.nix b/pkgs/os-specific/linux/procps-ng/default.nix
index 67b839a1bd3..56a92ffa44e 100644
--- a/pkgs/os-specific/linux/procps-ng/default.nix
+++ b/pkgs/os-specific/linux/procps-ng/default.nix
@@ -27,7 +27,9 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-RRiz56r9NOwH0AY9JQ/UdJmbILIAIYw65W9dIRPxQbQ=";
   };
 
-  patches = lib.optionals stdenv.hostPlatform.isMusl [
+  patches = [
+    ./v3-CVE-2023-4016.patch
+  ] ++ lib.optionals stdenv.hostPlatform.isMusl [
     # NOTE: Starting from 4.x we will not need a patch anymore, but need to add
     # "--disable-w" to configureFlags instead to prevent the utmp errors
     (fetchpatch {
diff --git a/pkgs/os-specific/linux/procps-ng/v3-CVE-2023-4016.patch b/pkgs/os-specific/linux/procps-ng/v3-CVE-2023-4016.patch
new file mode 100644
index 00000000000..2e260eaf738
--- /dev/null
+++ b/pkgs/os-specific/linux/procps-ng/v3-CVE-2023-4016.patch
@@ -0,0 +1,63 @@
+This is https://gitlab.com/procps-ng/procps/-/commit/2c933ecba3bb1d3041a5a7a53a7b4078a6003413.diff
+back-ported to procps 3.3.17.  That commit changes xmalloc to xcalloc.  This patch differs in two ways:
+
+* We modify it to change malloc (no x-) to xcalloc instead
+* We pull in procps-4's definition of xcalloc
+
+Alternative considered: Also pull in commits that changed malloc to xmalloc and defined xcalloc.
+This alternative is rejected because those commits contain many other unrelated changes.
+
+diff --git a/ps/parser.c b/ps/parser.c
+index 4263a1fb..ee9a57d9 100644
+--- a/ps/parser.c
++++ b/ps/parser.c
+@@ -36,6 +36,14 @@
+ #include "common.h"
+ #include "c.h"
+ 
++static void *xxcalloc(const size_t nelems, const size_t size)
++{
++  void *ret = calloc(nelems, size);
++  if (!ret && size && nelems)
++    xerrx(EXIT_FAILURE, "cannot allocate %zu bytes", nelems*size);
++  return ret;
++}
++
+ #define ARG_GNU  0
+ #define ARG_END  1
+ #define ARG_PGRP 2
+@@ -184,7 +192,6 @@ static const char *parse_list(const char *arg, const char *(*parse_fn)(char *, s
+   const char *err;       /* error code that could or did happen */
+   /*** prepare to operate ***/
+   node = malloc(sizeof(selection_node));
+-  node->u = malloc(strlen(arg)*sizeof(sel_union)); /* waste is insignificant */
+   node->n = 0;
+   buf = strdup(arg);
+   /*** sanity check and count items ***/
+@@ -205,6 +212,7 @@ static const char *parse_list(const char *arg, const char *(*parse_fn)(char *, s
+   } while (*++walk);
+   if(need_item) goto parse_error;
+   node->n = items;
++  node->u = xxcalloc(items, sizeof(sel_union));
+   /*** actually parse the list ***/
+   walk = buf;
+   while(items--){
+@@ -1031,15 +1039,15 @@ static const char *parse_trailing_pids(void){
+   thisarg = ps_argc - 1;   /* we must be at the end now */
+ 
+   pidnode = malloc(sizeof(selection_node));
+-  pidnode->u = malloc(i*sizeof(sel_union)); /* waste is insignificant */
++  pidnode->u = xxcalloc(i, sizeof(sel_union)); /* waste is insignificant */
+   pidnode->n = 0;
+ 
+   grpnode = malloc(sizeof(selection_node));
+-  grpnode->u = malloc(i*sizeof(sel_union)); /* waste is insignificant */
++  grpnode->u = xxcalloc(i, sizeof(sel_union)); /* waste is insignificant */
+   grpnode->n = 0;
+ 
+   sidnode = malloc(sizeof(selection_node));
+-  sidnode->u = malloc(i*sizeof(sel_union)); /* waste is insignificant */
++  sidnode->u = xxcalloc(i, sizeof(sel_union)); /* waste is insignificant */
+   sidnode->n = 0;
+ 
+   while(i--){
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index edac4fc3491..81a8a005003 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -5969,10 +5969,6 @@ with pkgs;
 
   merriweather-sans = callPackage ../data/fonts/merriweather-sans { };
 
-  meson = callPackage ../development/tools/build-managers/meson {
-    inherit (darwin.apple_sdk.frameworks) Foundation OpenGL AppKit Cocoa;
-  };
-
   # while building documentation meson may want to run binaries for host
   # which needs an emulator
   # example of an error which this fixes
@@ -18932,11 +18928,9 @@ with pkgs;
 
   ctmg = callPackage ../tools/security/ctmg { };
 
-  cmake = callPackage ../development/tools/build-managers/cmake { };
-
   # can't use override - it triggers infinite recursion
-  cmakeMinimal = callPackage ../development/tools/build-managers/cmake {
-    isBootstrap = true;
+  cmakeMinimal = callPackage ../by-name/cm/cmake/package.nix {
+    isMinimalBuild = true;
   };
 
   cmakeCurses = cmake.override {
@@ -21792,10 +21786,10 @@ with pkgs;
 
   grilo-plugins = callPackage ../development/libraries/grilo-plugins { };
 
-  grpc = callPackage ../development/libraries/grpc {
+  grpc = darwin.apple_sdk_11_0.callPackage ../development/libraries/grpc {
     stdenv = if (stdenv.isDarwin && stdenv.isx86_64) then
       # Work around Clang check for 10.13 when using aligned allocations with C++17.
-      stdenv.override (old: {
+      darwin.apple_sdk_11_0.stdenv.override (old: {
         hostPlatform = old.hostPlatform // { darwinMinVersion = "10.13"; };
         buildPlatform = old.buildPlatform // { darwinMinVersion = "10.13"; };
         targetPlatform = old.targetPlatform // { darwinMinVersion = "10.13"; };
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 12ff64507d1..d1b79a3e6e7 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -6934,7 +6934,9 @@ self: super: with self; {
 
   mobly = callPackage ../development/python-modules/mobly { };
 
-  mocket = callPackage ../development/python-modules/mocket { };
+  mocket = callPackage ../development/python-modules/mocket {
+    redis-server = pkgs.redis;
+  };
 
   mock = callPackage ../development/python-modules/mock { };