2020-10-11 12:50:04 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-04-13 19:44:15 +00:00
|
|
|
, fetchFromGitLab
|
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";
|
2022-04-15 01:41:22 +00:00
|
|
|
version = "0.7.10";
|
2022-02-20 05:27:41 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
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";
|
|
|
|
rev = "v${version}";
|
2022-04-15 01:41:22 +00:00
|
|
|
sha256 = "sha256-vUsL1CvhYRtv75gkmiPe/UkAtBDZPy1iK2BPUupMXz8=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
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
|
|
|
|
2020-10-11 12:50:04 +00:00
|
|
|
checkInputs = [
|
|
|
|
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/";
|
2021-05-04 21:07:42 +00:00
|
|
|
license = licenses.bsd2;
|
2020-09-25 04:45:31 +00:00
|
|
|
maintainers = with maintainers; [ nyanloutre ];
|
|
|
|
};
|
|
|
|
}
|