From 1530a2b5545d7f0994919eb31a8f76b4fb4c6524 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Fri, 7 Nov 2025 23:54:56 -0500 Subject: [PATCH 1/4] python3Packages.aiolimiter: fix build --- pkgs/development/python-modules/aiolimiter/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/python-modules/aiolimiter/default.nix b/pkgs/development/python-modules/aiolimiter/default.nix index a76d3a3ec8d8..ecd905a39e6b 100644 --- a/pkgs/development/python-modules/aiolimiter/default.nix +++ b/pkgs/development/python-modules/aiolimiter/default.nix @@ -25,6 +25,14 @@ buildPythonPackage rec { hash = "sha256-wgHR0GzaPXlhL4ErklFqmWNFO49dvd5X5MgyYHVH4Eo="; }; + # ERROR: '"session"' is not a valid asyncio_default_fixture_loop_scope. Valid scopes are: function, class, module, package, session. + # Post 1.2.1, the project switched from tox and is no longer affected, hence fixed in nixpkgs only. + postPatch = '' + substituteInPlace tox.ini --replace-fail \ + 'asyncio_default_fixture_loop_scope = "session"' \ + 'asyncio_default_fixture_loop_scope = session' + ''; + nativeBuildInputs = [ poetry-core ]; propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; From adf68b1ff7914f032cb89641ed420065c5642439 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Fri, 7 Nov 2025 23:56:22 -0500 Subject: [PATCH 2/4] python3Packages.aiolimiter: modernize --- .../python-modules/aiolimiter/default.nix | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/aiolimiter/default.nix b/pkgs/development/python-modules/aiolimiter/default.nix index ecd905a39e6b..9569cfb0d133 100644 --- a/pkgs/development/python-modules/aiolimiter/default.nix +++ b/pkgs/development/python-modules/aiolimiter/default.nix @@ -3,20 +3,16 @@ buildPythonPackage, fetchFromGitHub, poetry-core, - importlib-metadata, pytest-asyncio, pytest-cov-stub, pytestCheckHook, - pythonOlder, toml, }: buildPythonPackage rec { pname = "aiolimiter"; version = "1.2.1"; - format = "pyproject"; - - disabled = pythonOlder "3.7"; + pyproject = true; src = fetchFromGitHub { owner = "mjpieters"; @@ -33,9 +29,7 @@ buildPythonPackage rec { 'asyncio_default_fixture_loop_scope = session' ''; - nativeBuildInputs = [ poetry-core ]; - - propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; + build-system = [ poetry-core ]; nativeCheckInputs = [ pytest-asyncio @@ -46,11 +40,11 @@ buildPythonPackage rec { pythonImportsCheck = [ "aiolimiter" ]; - meta = with lib; { + meta = { description = "Implementation of a rate limiter for asyncio"; homepage = "https://github.com/mjpieters/aiolimiter"; changelog = "https://github.com/mjpieters/aiolimiter/blob/v${version}/CHANGELOG.md"; - license = with licenses; [ mit ]; - maintainers = with maintainers; [ fab ]; + license = with lib.licenses; [ mit ]; + maintainers = with lib.maintainers; [ fab ]; }; } From bf5600993b10ab4e1d2ad4f0b3b2d65df502ae38 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Fri, 7 Nov 2025 23:38:15 -0500 Subject: [PATCH 3/4] python3Packages.protobuf: 6.32.1 -> 6.33.0 --- pkgs/development/python-modules/protobuf/6.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/protobuf/6.nix b/pkgs/development/python-modules/protobuf/6.nix index 88b571b65a3b..d3aa019da237 100644 --- a/pkgs/development/python-modules/protobuf/6.nix +++ b/pkgs/development/python-modules/protobuf/6.nix @@ -9,12 +9,12 @@ buildPythonPackage rec { pname = "protobuf"; - version = "6.32.1"; + version = "6.33.0"; pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-7iRp5KAhR0q5uq/qbNBw5b8nx9KUM1BN3qGk7lhQ9o0="; + hash = "sha256-FAMD1cjSA3cwxUj4x7k7ILsdwwG+KAw3i4K4iUWJyVQ="; }; build-system = [ setuptools ]; From 09ad6013c68ecfb655bfe613b4ecb10acb32cca3 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 6 Nov 2025 12:22:24 +0100 Subject: [PATCH 4/4] spandsp: backport additional memory safety fix This one caused a test failure on x86_64-unknown-linux-musl. Closes: https://github.com/NixOS/nixpkgs/issues/458398 See PR #459116 --- .../development/libraries/spandsp/default.nix | 32 ++++++++++++++++--- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/spandsp/default.nix b/pkgs/development/libraries/spandsp/default.nix index 9720e110f7cf..87996abdeeb0 100644 --- a/pkgs/development/libraries/spandsp/default.nix +++ b/pkgs/development/libraries/spandsp/default.nix @@ -2,6 +2,8 @@ fetchurl, fetchpatch, callPackage, + lib, + stdenv, }: (callPackage ./common.nix { }) rec { @@ -11,11 +13,31 @@ sha256 = "0rclrkyspzk575v8fslzjpgp4y2s4x7xk3r55ycvpi4agv33l1fc"; }; patches = [ - (fetchpatch { - url = "https://github.com/freeswitch/spandsp/commit/f7b96b08db148763039cf3459d0e00da9636eb92.patch"; - includes = [ "spandsp-sim/g1050.c" ]; - hash = "sha256-TwMhWJXQG/UaWddWgice0klp1uATyHMiE6DcsCebXYQ="; - }) + # FIXME: clean up rebuild avoidance on staging. + ( + if + lib.elem stdenv.hostPlatform.config [ + "arm64-apple-darwin" + "aarch64-unknown-linux-gnu" + "x86_64-apple-darwin" + "x86_64-unknown-linux-gnu" + ] + then + fetchpatch { + url = "https://github.com/freeswitch/spandsp/commit/f7b96b08db148763039cf3459d0e00da9636eb92.patch"; + includes = [ "spandsp-sim/g1050.c" ]; + hash = "sha256-TwMhWJXQG/UaWddWgice0klp1uATyHMiE6DcsCebXYQ="; + } + else + fetchpatch { + url = "https://github.com/freeswitch/spandsp/commit/f7b96b08db148763039cf3459d0e00da9636eb92.patch"; + includes = [ + "spandsp-sim/g1050.c" + "spandsp-sim/test_utils.c" + ]; + hash = "sha256-2MmVgyMUK0Zn+mL7IX57Y7brYpgmt4GVlis5/NstuNM="; + } + ) (fetchpatch { url = "https://github.com/freeswitch/spandsp/commit/f47bcdc301fbddad44e918939eed1b361882f740.patch"; hash = "sha256-O+lIC3V92GVFoiHsUQOXkoTN2hJ7v5+LQP7RrAhvwlY=";