diff options
Diffstat (limited to 'pkgs/development/python-modules/glances-api/default.nix')
-rw-r--r-- | pkgs/development/python-modules/glances-api/default.nix | 39 |
1 files changed, 30 insertions, 9 deletions
diff --git a/pkgs/development/python-modules/glances-api/default.nix b/pkgs/development/python-modules/glances-api/default.nix index 1ec6ce33420..e9d68685a3f 100644 --- a/pkgs/development/python-modules/glances-api/default.nix +++ b/pkgs/development/python-modules/glances-api/default.nix @@ -1,29 +1,50 @@ { lib , buildPythonPackage , fetchFromGitHub -, aiohttp -, async-timeout +, httpx +, poetry-core +, pytest-asyncio +, pytest-httpx +, pytestCheckHook +, pythonOlder }: buildPythonPackage rec { pname = "glances-api"; - version = "0.2.1"; + version = "0.3.2"; + format = "pyproject"; + + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "home-assistant-ecosystem"; repo = "python-glances-api"; rev = version; - sha256 = "sha256-mbkZZg2fmus4kOXFxHE/UV/nxemFAsoEZu8IUa7SPsg="; + sha256 = "sha256-zVK63SI8ZeVrY2iEEkgp8pq6RDheKeApb9/RWgZCKGI="; }; + nativeBuildInputs = [ + poetry-core + ]; + propagatedBuildInputs = [ - aiohttp - async-timeout + httpx ]; - # no tests are present - doCheck = false; - pythonImportsCheck = [ "glances_api" ]; + checkInputs = [ + pytest-asyncio + pytest-httpx + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace 'httpx = ">=0.20,<1"' 'httpx = ">=0.19,<1"' + ''; + + pythonImportsCheck = [ + "glances_api" + ]; meta = with lib; { description = "Python API for interacting with Glances"; |