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