From 3cef8df29527334e752e06c9c38ac3b5e68c72aa Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Tue, 11 Feb 2025 00:03:10 +0100 Subject: [PATCH] python312Packages.miniupnpc: fix build --- .../python-modules/miniupnpc/default.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/miniupnpc/default.nix b/pkgs/development/python-modules/miniupnpc/default.nix index 1169a7a0c946..eb3d302411d3 100644 --- a/pkgs/development/python-modules/miniupnpc/default.nix +++ b/pkgs/development/python-modules/miniupnpc/default.nix @@ -3,6 +3,8 @@ lib, buildPythonPackage, fetchPypi, + fetchpatch, + setuptools, cctools, which, }: @@ -10,13 +12,26 @@ buildPythonPackage rec { pname = "miniupnpc"; version = "2.3.0"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; hash = "sha256-AvnUqth2igy4xGvDC+C6jOwUi2005NDvmfrbec+JrzE="; }; + patches = [ + # TODO: remove this patch when updating to the next release + (fetchpatch { + url = "https://github.com/miniupnp/miniupnp/commit/f79ae6738d10af633844dcf3ecd9c587e8f9508d.patch"; + stripLen = 1; + hash = "sha256-g+D9Cw5knTy5a7M0wAQkw8MZ6iZR8RQUT6A0WAc6Q5U="; + }) + ]; + + build-system = [ + setuptools + ]; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ cctools which