2022-05-18 14:49:53 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, parameterized
|
|
|
|
, pycryptodome
|
|
|
|
, 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";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "0.6.3";
|
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 {
|
|
|
|
owner = "jbarrancos";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-12-17 10:02:37 +00:00
|
|
|
hash = "sha256-yGUBCs1IxbGKBo21gExFIqDawM2EHlO+jiRqonEUnPk=";
|
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
|
|
|
|
pyyaml
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
parameterized
|
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";
|
|
|
|
homepage = "https://github.com/jbarrancos/pyrainbird/";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|