diff --git a/pkgs/development/python-modules/zigpy-xbee/default.nix b/pkgs/development/python-modules/zigpy-xbee/default.nix index d07eebad4d50..d40e2b17b6cc 100644 --- a/pkgs/development/python-modules/zigpy-xbee/default.nix +++ b/pkgs/development/python-modules/zigpy-xbee/default.nix @@ -6,26 +6,35 @@ , pytest-asyncio , pytestCheckHook , pythonOlder +, setuptools , zigpy }: buildPythonPackage rec { pname = "zigpy-xbee"; - version = "0.19.0"; - format = "setuptools"; - # https://github.com/Martiusweb/asynctest/issues/152 - # broken by upstream python bug with asynctest and - # is used exclusively by home-assistant with python 3.8 + version = "0.20.0"; + pyproject = true; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "zigpy"; repo = "zigpy-xbee"; rev = "refs/tags/${version}"; - hash = "sha256-KUXXOySuPFNKcW3O08FBYIfm4WwVjOuIF+GefmKnwl0="; + hash = "sha256-Ja9U/X9YblS6uUD7MX3t2tItG9AMiNF7OFgvIotdvQs="; }; - buildInputs = [ + postPatch = '' + substituteInPlace pyproject.toml \ + --replace ', "setuptools-git-versioning<2"' "" \ + --replace 'dynamic = ["version"]' 'version = "${version}"' + ''; + + nativeBuildInputs = [ + setuptools + ]; + + propagatedBuildInputs = [ pyserial pyserial-asyncio zigpy