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
|
2024-02-29 20:09:43 +00:00
|
|
|
, setuptools
|
2022-05-18 14:49:53 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyrainbird";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "4.0.2";
|
|
|
|
pyproject = true;
|
2022-05-18 14:49:53 +00:00
|
|
|
|
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";
|
2024-02-29 20:09:43 +00:00
|
|
|
repo = "pyrainbird";
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-4AoxLZv0u8wCG3ihw0JqsqsO5zG5UyP4ebSX99ve8sg=";
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pytest.ini \
|
2024-02-29 20:09:43 +00:00
|
|
|
--replace-fail "--cov=pyrainbird --cov-report=term-missing" ""
|
2022-11-21 17:40:18 +00:00
|
|
|
'';
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|