1{ lib
2, aiohttp
3, buildPythonPackage
4, fetchFromGitHub
5, pytestCheckHook
6, pythonOlder
7}:
8
9buildPythonPackage rec {
10 pname = "geniushub-client";
11 version = "0.7.1";
12 format = "setuptools";
13
14 disabled = pythonOlder "3.9";
15
16 src = fetchFromGitHub {
17 owner = "manzanotti";
18 repo = pname;
19 rev = "refs/tags/v${version}";
20 hash = "sha256-Gq2scYos7E8me1a4x7NanHRq2eYWuU2uSUwM+O1TPb8=";
21 };
22
23 postPatch = ''
24 substituteInPlace setup.py \
25 --replace 'VERSION = os.environ["GITHUB_REF_NAME"]' "" \
26 --replace "version=VERSION," 'version="${version}",'
27 '';
28
29 propagatedBuildInputs = [
30 aiohttp
31 ];
32
33 nativeCheckInputs = [
34 pytestCheckHook
35 ];
36
37 pythonImportsCheck = [
38 "geniushubclient"
39 ];
40
41 meta = with lib; {
42 description = "Module to interact with Genius Hub systems";
43 homepage = "https://github.com/manzanotti/geniushub-client";
44 changelog = "https://github.com/manzanotti/geniushub-client/releases/tag/v${version}";
45 license = licenses.mit;
46 maintainers = with maintainers; [ dotlambda ];
47 };
48}