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