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-01-11 07:51:40 +00:00
|
|
|
version = "0.7.0";
|
|
|
|
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}";
|
|
|
|
hash = "sha256-amsMZjCsPI8CUfSct4uumn8nVZDESlQFh19LXu3yb7o=";
|
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-01-11 07:51:40 +00:00
|
|
|
checkInputs = [
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|