2020-10-11 12:50:04 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-04-13 19:44:15 +00:00
|
|
|
, fetchFromGitLab
|
2023-07-15 17:15:38 +00:00
|
|
|
, flit-core
|
2020-10-11 12:50:04 +00:00
|
|
|
, future
|
|
|
|
, ifaddr
|
|
|
|
, pytestCheckHook
|
2021-04-13 19:44:15 +00:00
|
|
|
, pythonOlder
|
2020-10-11 12:50:04 +00:00
|
|
|
}:
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "yeelight";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "0.7.11";
|
|
|
|
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}";
|
|
|
|
hash = "sha256-NKW8f0Xi8kACot+qunJp+tz3ioSa5UGoeLmbPfjBaXg=";
|
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
|
2021-04-13 19:44:15 +00:00
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-10-11 12:50:04 +00:00
|
|
|
pytestCheckHook
|
2021-04-13 19:44:15 +00:00
|
|
|
];
|
2020-10-11 12:50:04 +00:00
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"yeelight/tests.py"
|
|
|
|
];
|
2020-10-11 12:50:04 +00:00
|
|
|
|
2022-02-20 05:27:41 +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 ];
|
|
|
|
};
|
|
|
|
}
|