1{ 2 lib, 3 async-timeout, 4 buildPythonPackage, 5 fetchFromGitLab, 6 flit-core, 7 future, 8 ifaddr, 9 pytestCheckHook, 10 pythonOlder, 11}: 12 13buildPythonPackage rec { 14 pname = "yeelight"; 15 version = "0.7.14"; 16 format = "pyproject"; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchFromGitLab { 21 owner = "stavros"; 22 repo = "python-yeelight"; 23 rev = "refs/tags/v${version}"; 24 hash = "sha256-BnMvRs95rsmoBa/5bp0zShgU1BBHtZzyADjbH0y1d/o="; 25 }; 26 27 nativeBuildInputs = [ flit-core ]; 28 29 propagatedBuildInputs = [ 30 future 31 ifaddr 32 ] ++ lib.optionals (pythonOlder "3.11") [ async-timeout ]; 33 34 nativeCheckInputs = [ pytestCheckHook ]; 35 36 pytestFlagsArray = [ "yeelight/tests.py" ]; 37 38 pythonImportsCheck = [ "yeelight" ]; 39 40 meta = with lib; { 41 description = "Python library for controlling YeeLight RGB bulbs"; 42 homepage = "https://gitlab.com/stavros/python-yeelight/"; 43 changelog = "https://gitlab.com/stavros/python-yeelight/-/blob/v${version}/CHANGELOG.md"; 44 license = licenses.bsd2; 45 maintainers = with maintainers; [ nyanloutre ]; 46 }; 47}