diff --git a/pkgs/development/python-modules/wled/default.nix b/pkgs/development/python-modules/wled/default.nix index 92dbc210c6d..973393a8932 100644 --- a/pkgs/development/python-modules/wled/default.nix +++ b/pkgs/development/python-modules/wled/default.nix @@ -4,6 +4,7 @@ , fetchFromGitHub , aiohttp , backoff +, poetry-core , packaging , yarl , aresponses @@ -13,16 +14,21 @@ buildPythonPackage rec { pname = "wled"; - version = "0.4.4"; - disabled = pythonOlder "3.7"; + version = "0.5.0"; + disabled = pythonOlder "3.8"; + format = "pyproject"; src = fetchFromGitHub { owner = "frenck"; repo = "python-wled"; rev = "v${version}"; - sha256 = "1adh23v4c9kia3ddqdq0brksd5rhgh4ff7l5hil8klx4dmkrjfz3"; + sha256 = "123806fmdihdf9y8dqp5rli5c4i9a74j9rmhay8m68igm1326d5f"; }; + nativeBuildInputs = [ + poetry-core + ]; + propagatedBuildInputs = [ aiohttp backoff @@ -36,6 +42,13 @@ buildPythonPackage rec { pytestCheckHook ]; + postPatch = '' + # Upstream doesn't set a version for the pyproject.toml + substituteInPlace pyproject.toml \ + --replace "0.0.0" "${version}" \ + --replace "--cov" "" + ''; + pythonImportsCheck = [ "wled" ]; meta = with lib; {