diff --git a/pkgs/development/python-modules/pyipp/default.nix b/pkgs/development/python-modules/pyipp/default.nix index dfef79a4dcae..b9ab9b695bd2 100644 --- a/pkgs/development/python-modules/pyipp/default.nix +++ b/pkgs/development/python-modules/pyipp/default.nix @@ -1,28 +1,40 @@ { lib , aiohttp , aresponses +, awesomeversion +, backoff , buildPythonPackage , deepmerge , fetchFromGitHub +, poetry-core , pytest-asyncio , pytestCheckHook -, pytest-cov +, pythonOlder , yarl }: buildPythonPackage rec { pname = "pyipp"; - version = "0.11.0"; + version = "0.12.0"; + format = "pyproject"; + + disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "ctalkington"; repo = "python-ipp"; rev = version; - sha256 = "0ar3mkyfa9qi3av3885bvacpwlxh420if9ymdj8i4x06ymzc213d"; + hash = "sha256-umlFGI0Y9cWF3N46yFztv0OlhLIzqhQF8e4quCmqn78="; }; + nativeBuildInputs = [ + poetry-core + ]; + propagatedBuildInputs = [ aiohttp + awesomeversion + backoff deepmerge yarl ]; @@ -30,11 +42,18 @@ buildPythonPackage rec { checkInputs = [ aresponses pytest-asyncio - pytest-cov pytestCheckHook ]; - pythonImportsCheck = [ "pyipp" ]; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace 'version = "0.0.0"' 'version = "${version}"' \ + --replace " --cov" "" + ''; + + pythonImportsCheck = [ + "pyipp" + ]; meta = with lib; { description = "Asynchronous Python client for Internet Printing Protocol (IPP)";