1{ 2 lib, 3 async-timeout, 4 buildPythonPackage, 5 click, 6 cryptography, 7 fetchFromGitHub, 8 hatchling, 9 orjson, 10 pytest-asyncio, 11 pytest-timeout, 12 pytestCheckHook, 13 pythonOlder, 14 xdg, 15 zeroconf, 16}: 17 18buildPythonPackage rec { 19 pname = "pylutron-caseta"; 20 version = "0.25.0"; 21 pyproject = true; 22 23 disabled = pythonOlder "3.8"; 24 25 src = fetchFromGitHub { 26 owner = "gurumitts"; 27 repo = "pylutron-caseta"; 28 tag = "v${version}"; 29 hash = "sha256-VK53y4m86xVVGibAiWtxNge+kBYxQnltmc3mYpoGedw="; 30 }; 31 32 build-system = [ hatchling ]; 33 34 dependencies = [ 35 cryptography 36 orjson 37 ] 38 ++ lib.optionals (pythonOlder "3.11") [ async-timeout ]; 39 40 optional-dependencies = { 41 cli = [ 42 click 43 xdg 44 zeroconf 45 ]; 46 }; 47 48 nativeCheckInputs = [ 49 pytest-asyncio 50 pytest-timeout 51 pytestCheckHook 52 ] 53 ++ lib.optionals (pythonOlder "3.11") [ async-timeout ]; 54 55 pytestFlags = [ "--asyncio-mode=auto" ]; 56 57 pythonImportsCheck = [ "pylutron_caseta" ]; 58 59 meta = with lib; { 60 description = "Python module to control Lutron Caseta devices"; 61 homepage = "https://github.com/gurumitts/pylutron-caseta"; 62 changelog = "https://github.com/gurumitts/pylutron-caseta/blob/v${version}/CHANGELOG.md"; 63 license = licenses.asl20; 64 maintainers = with maintainers; [ fab ]; 65 }; 66}