2022-02-20 05:27:41 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
2023-01-11 07:51:40 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2022-02-20 05:27:41 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "geniushub-client";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.7.1";
|
2023-01-11 07:51:40 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
2022-02-20 05:27:41 +00:00
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "manzanotti";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-Gq2scYos7E8me1a4x7NanHRq2eYWuU2uSUwM+O1TPb8=";
|
2022-02-20 05:27:41 +00:00
|
|
|
};
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace 'VERSION = os.environ["GITHUB_REF_NAME"]' "" \
|
|
|
|
--replace "version=VERSION," 'version="${version}",'
|
|
|
|
'';
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-01-11 07:51:40 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
2022-02-20 05:27:41 +00:00
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"geniushubclient"
|
|
|
|
];
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2023-01-11 07:51:40 +00:00
|
|
|
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}";
|
2022-02-20 05:27:41 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|