depot/third_party/nixpkgs/pkgs/development/python-modules/geniushub-client/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

43 lines
1 KiB
Nix

{
lib,
aiohttp,
buildPythonPackage,
fetchFromGitHub,
pytestCheckHook,
pythonOlder,
}:
buildPythonPackage rec {
pname = "geniushub-client";
version = "0.7.1";
format = "setuptools";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "manzanotti";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-Gq2scYos7E8me1a4x7NanHRq2eYWuU2uSUwM+O1TPb8=";
};
postPatch = ''
substituteInPlace setup.py \
--replace 'VERSION = os.environ["GITHUB_REF_NAME"]' "" \
--replace "version=VERSION," 'version="${version}",'
'';
propagatedBuildInputs = [ aiohttp ];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "geniushubclient" ];
meta = with lib; {
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 ];
};
}