5e9e1146e1
GitOrigin-RevId: 18036c0be90f4e308ae3ebcab0e14aae0336fe42
54 lines
1.1 KiB
Nix
54 lines
1.1 KiB
Nix
{ lib
|
|
, async-timeout
|
|
, buildPythonPackage
|
|
, fetchFromGitLab
|
|
, flit-core
|
|
, future
|
|
, ifaddr
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "yeelight";
|
|
version = "0.7.12";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitLab {
|
|
owner = "stavros";
|
|
repo = "python-yeelight";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-oTlfrx3YN6mPxu7+xzTmYG2L7KulFDlB3+oOhVOFSA8=";
|
|
};
|
|
|
|
nativeBuildInputs = [ flit-core ];
|
|
|
|
propagatedBuildInputs = [
|
|
future
|
|
ifaddr
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
|
async-timeout
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
pytestFlagsArray = [
|
|
"yeelight/tests.py"
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"yeelight"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Python library for controlling YeeLight RGB bulbs";
|
|
homepage = "https://gitlab.com/stavros/python-yeelight/";
|
|
changelog = "https://gitlab.com/stavros/python-yeelight/-/blob/v${version}/CHANGELOG.md";
|
|
license = licenses.bsd2;
|
|
maintainers = with maintainers; [ nyanloutre ];
|
|
};
|
|
}
|