From 80b535e26c7b38a9966bacb0fee4973ca7991499 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 5 Feb 2025 22:14:23 -0800 Subject: [PATCH] python313Packages.nextcord: fix build --- .../python-modules/nextcord/default.nix | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/nextcord/default.nix b/pkgs/development/python-modules/nextcord/default.nix index 9cddf216b6be..10aff1066fbc 100644 --- a/pkgs/development/python-modules/nextcord/default.nix +++ b/pkgs/development/python-modules/nextcord/default.nix @@ -12,10 +12,11 @@ aiodns, audioop-lts, brotli, - faust-cchardet, orjson, + poetry-core, + poetry-dynamic-versioning, pynacl, - setuptools, + typing-extensions, }: buildPythonPackage rec { @@ -23,7 +24,7 @@ buildPythonPackage rec { version = "3.0.1"; pyproject = true; - disabled = pythonOlder "3.8"; + disabled = pythonOlder "3.12"; src = fetchFromGitHub { owner = "nextcord"; @@ -40,8 +41,16 @@ buildPythonPackage rec { }) ]; + postPatch = '' + # disable dynamic versioning + substituteInPlace pyproject.toml \ + --replace-fail 'version = "0.0.0"' 'version = "${version}"' \ + --replace-fail 'enable = true' 'enable = false' + ''; + build-system = [ - setuptools + poetry-core + poetry-dynamic-versioning ]; dependencies = @@ -49,10 +58,9 @@ buildPythonPackage rec { aiodns aiohttp brotli - faust-cchardet orjson pynacl - setuptools # for pkg_resources, remove with next release + typing-extensions ] ++ lib.optionals (pythonAtLeast "3.13") [ audioop-lts