2022-05-18 14:49:53 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, parameterized
|
|
|
|
, pycryptodome
|
2023-02-02 18:25:31 +00:00
|
|
|
, pydantic
|
2022-12-28 21:21:41 +00:00
|
|
|
, pytest-aiohttp
|
2022-05-18 14:49:53 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, 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-02-02 18:25:31 +00:00
|
|
|
version = "1.1.1";
|
2022-05-18 14:49:53 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
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}";
|
|
|
|
hash = "sha256-e+neyzH+sGTzGwdy/N7n6GUvctHlHQgwDkRQsnzL7Jw=";
|
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 = [
|
|
|
|
pycryptodome
|
2023-02-02 18:25:31 +00:00
|
|
|
pydantic
|
2022-05-18 14:49:53 +00:00
|
|
|
pyyaml
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-05-18 14:49:53 +00:00
|
|
|
parameterized
|
2022-12-28 21:21:41 +00:00
|
|
|
pytest-aiohttp
|
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 ];
|
|
|
|
};
|
|
|
|
}
|