2022-05-18 14:49:53 +00:00
|
|
|
{ lib
|
2023-07-15 17:15:38 +00:00
|
|
|
, aiohttp-retry
|
2022-05-18 14:49:53 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-02-09 11:40:11 +00:00
|
|
|
, freezegun
|
|
|
|
, ical
|
2022-05-18 14:49:53 +00:00
|
|
|
, parameterized
|
|
|
|
, pycryptodome
|
2023-02-02 18:25:31 +00:00
|
|
|
, pydantic
|
2022-12-28 21:21:41 +00:00
|
|
|
, pytest-aiohttp
|
2023-02-09 11:40:11 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-golden
|
|
|
|
, pytest-mock
|
2022-05-18 14:49:53 +00:00
|
|
|
, pytestCheckHook
|
2023-02-09 11:40:11 +00:00
|
|
|
, python-dateutil
|
2022-05-18 14:49:53 +00:00
|
|
|
, pythonOlder
|
|
|
|
, pyyaml
|
|
|
|
, requests
|
2022-11-21 17:40:18 +00:00
|
|
|
, requests-mock
|
2022-05-18 14:49:53 +00:00
|
|
|
, responses
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyrainbird";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "3.0.1";
|
2022-05-18 14:49:53 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
disabled = pythonOlder "3.10";
|
2022-05-18 14:49:53 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-02-02 18:25:31 +00:00
|
|
|
owner = "allenporter";
|
2022-05-18 14:49:53 +00:00
|
|
|
repo = pname;
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-08-04 22:07:22 +00:00
|
|
|
hash = "sha256-Qi0NfLayypi/wKJZB9IOzoeaZsb3oq2JahXWdkwSjeo=";
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pytest.ini \
|
|
|
|
--replace "--cov=pyrainbird --cov-report=term-missing" ""
|
2022-12-17 10:02:37 +00:00
|
|
|
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "pycryptodome>=3.16.0" "pycryptodome"
|
2022-11-21 17:40:18 +00:00
|
|
|
'';
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-07-15 17:15:38 +00:00
|
|
|
aiohttp-retry
|
2023-02-09 11:40:11 +00:00
|
|
|
ical
|
2022-05-18 14:49:53 +00:00
|
|
|
pycryptodome
|
2023-02-02 18:25:31 +00:00
|
|
|
pydantic
|
2023-02-09 11:40:11 +00:00
|
|
|
python-dateutil
|
2022-05-18 14:49:53 +00:00
|
|
|
pyyaml
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-02-09 11:40:11 +00:00
|
|
|
freezegun
|
2022-05-18 14:49:53 +00:00
|
|
|
parameterized
|
2022-12-28 21:21:41 +00:00
|
|
|
pytest-aiohttp
|
2023-02-09 11:40:11 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-golden
|
|
|
|
pytest-mock
|
2022-11-21 17:40:18 +00:00
|
|
|
pytestCheckHook
|
|
|
|
requests-mock
|
2022-05-18 14:49:53 +00:00
|
|
|
responses
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"pyrainbird"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Module to interact with Rainbird controllers";
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://github.com/allenporter/pyrainbird";
|
|
|
|
changelog = "https://github.com/allenporter/pyrainbird/releases/tag/${version}";
|
2022-05-18 14:49:53 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|