4bac34ead1
GitOrigin-RevId: 724bfc0892363087709bd3a5a1666296759154b1
76 lines
1.4 KiB
Nix
76 lines
1.4 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, freezegun
|
|
, ical
|
|
, parameterized
|
|
, pycryptodome
|
|
, pydantic
|
|
, pytest-aiohttp
|
|
, pytest-asyncio
|
|
, pytest-golden
|
|
, pytest-mock
|
|
, pytestCheckHook
|
|
, python-dateutil
|
|
, pythonOlder
|
|
, pyyaml
|
|
, requests
|
|
, requests-mock
|
|
, responses
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pyrainbird";
|
|
version = "2.0.0";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "allenporter";
|
|
repo = pname;
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-fQHWamtGA1Cz/9Hbxbns5lDd08Q01nIvaMXp9PWrelM=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace pytest.ini \
|
|
--replace "--cov=pyrainbird --cov-report=term-missing" ""
|
|
|
|
substituteInPlace setup.cfg \
|
|
--replace "pycryptodome>=3.16.0" "pycryptodome"
|
|
'';
|
|
|
|
propagatedBuildInputs = [
|
|
ical
|
|
pycryptodome
|
|
pydantic
|
|
python-dateutil
|
|
pyyaml
|
|
requests
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
freezegun
|
|
parameterized
|
|
pytest-aiohttp
|
|
pytest-asyncio
|
|
pytest-golden
|
|
pytest-mock
|
|
pytestCheckHook
|
|
requests-mock
|
|
responses
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"pyrainbird"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Module to interact with Rainbird controllers";
|
|
homepage = "https://github.com/allenporter/pyrainbird";
|
|
changelog = "https://github.com/allenporter/pyrainbird/releases/tag/${version}";
|
|
license = with licenses; [ mit ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|