2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
async-timeout,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitLab,
|
|
|
|
flit-core,
|
|
|
|
future,
|
|
|
|
ifaddr,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2020-10-11 12:50:04 +00:00
|
|
|
}:
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "yeelight";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "0.7.14";
|
2023-07-15 17:15:38 +00:00
|
|
|
format = "pyproject";
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-04-13 19:44:15 +00:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "stavros";
|
|
|
|
repo = "python-yeelight";
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-BnMvRs95rsmoBa/5bp0zShgU1BBHtZzyADjbH0y1d/o=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeBuildInputs = [ flit-core ];
|
|
|
|
|
2020-10-11 12:50:04 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
future
|
|
|
|
ifaddr
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [ async-timeout ];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2020-10-11 12:50:04 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "yeelight/tests.py" ];
|
2020-10-11 12:50:04 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "yeelight" ];
|
2020-10-11 12:50:04 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-04-13 19:44:15 +00:00
|
|
|
description = "Python library for controlling YeeLight RGB bulbs";
|
2020-09-25 04:45:31 +00:00
|
|
|
homepage = "https://gitlab.com/stavros/python-yeelight/";
|
2023-07-15 17:15:38 +00:00
|
|
|
changelog = "https://gitlab.com/stavros/python-yeelight/-/blob/v${version}/CHANGELOG.md";
|
2021-05-04 21:07:42 +00:00
|
|
|
license = licenses.bsd2;
|
2020-09-25 04:45:31 +00:00
|
|
|
maintainers = with maintainers; [ nyanloutre ];
|
|
|
|
};
|
|
|
|
}
|