diff options
Diffstat (limited to 'pkgs/development/python-modules/geniushub-client/default.nix')
-rw-r--r-- | pkgs/development/python-modules/geniushub-client/default.nix | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/pkgs/development/python-modules/geniushub-client/default.nix b/pkgs/development/python-modules/geniushub-client/default.nix index 019c1e1a21bce..da0e7e2c33588 100644 --- a/pkgs/development/python-modules/geniushub-client/default.nix +++ b/pkgs/development/python-modules/geniushub-client/default.nix @@ -1,30 +1,47 @@ { lib -, buildPythonPackage -, fetchPypi , aiohttp +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder }: buildPythonPackage rec { pname = "geniushub-client"; - version = "0.6.30"; + version = "0.7.0"; + format = "setuptools"; + + disabled = pythonOlder "3.9"; - src = fetchPypi { - inherit pname version; - sha256 = "390932b6e5051e221d104b2683d9deb6e352172c4ec4eeede0954bf2f9680211"; + src = fetchFromGitHub { + owner = "manzanotti"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-amsMZjCsPI8CUfSct4uumn8nVZDESlQFh19LXu3yb7o="; }; + postPatch = '' + substituteInPlace setup.py \ + --replace 'VERSION = os.environ["GITHUB_REF_NAME"]' "" \ + --replace "version=VERSION," 'version="${version}",' + ''; + propagatedBuildInputs = [ aiohttp ]; - # tests only implemented after 0.6.30 - doCheck = false; + checkInputs = [ + pytestCheckHook + ]; - pythonImportsCheck = [ "geniushubclient" ]; + pythonImportsCheck = [ + "geniushubclient" + ]; meta = with lib; { - description = "Aiohttp-based client for Genius Hub systems"; - homepage = "https://github.com/zxdavb/geniushub-client"; + description = "Module to interact with Genius Hub systems"; + homepage = "https://github.com/manzanotti/geniushub-client"; + changelog = "https://github.com/manzanotti/geniushub-client/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ dotlambda ]; }; |