2021-02-13 14:23:35 +00:00
|
|
|
{ lib
|
|
|
|
, bleak
|
|
|
|
, click
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-mock
|
2023-07-15 17:15:38 +00:00
|
|
|
, pythonAtLeast
|
2021-02-13 14:23:35 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyzerproc";
|
2023-04-12 12:48:02 +00:00
|
|
|
version = "0.4.12";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "emlove";
|
|
|
|
repo = pname;
|
2023-03-27 19:17:25 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-04-12 12:48:02 +00:00
|
|
|
hash = "sha256-vS0sk/KjDhWispZvCuGlmVLLfeFymHqxwNzNqNRhg6k=";
|
2021-02-13 14:23:35 +00:00
|
|
|
};
|
|
|
|
|
2021-02-16 17:04:54 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i "/--cov/d" setup.cfg
|
2021-02-13 14:23:35 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
bleak
|
|
|
|
click
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-02-13 14:23:35 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
disabledTestPaths = lib.optionals (pythonAtLeast "3.11") [
|
|
|
|
# unittest.mock.InvalidSpecError: Cannot spec a Mock object.
|
|
|
|
"tests/test_light.py"
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pyzerproc"
|
|
|
|
];
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library to control Zerproc Bluetooth LED smart string lights";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "pyzerproc";
|
2021-02-13 14:23:35 +00:00
|
|
|
homepage = "https://github.com/emlove/pyzerproc";
|
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|