02cf88bb76
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
57 lines
1 KiB
Nix
57 lines
1 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, pythonOlder
|
|
, fetchFromGitHub
|
|
, poetry-core
|
|
, aiohttp
|
|
, yarl
|
|
, aresponses
|
|
, pytest-asyncio
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "gridnet";
|
|
version = "4.1.0";
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
format = "pyproject";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "klaasnicolaas";
|
|
repo = "python-gridnet";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-/UBZVbDRZMYHDrgifpYSTygAQTBiqgZ0tRGncE3GeT4=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace "0.0.0" "${version}" \
|
|
--replace "--cov" ""
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
poetry-core
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
aiohttp
|
|
yarl
|
|
];
|
|
|
|
checkInputs = [
|
|
aresponses
|
|
pytest-asyncio
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [ "gridnet" ];
|
|
|
|
meta = with lib; {
|
|
description = "Asynchronous Python client for NET2GRID devices";
|
|
homepage = "https://github.com/klaasnicolaas/python-gridnet";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
};
|
|
}
|