Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at flake-libs 64 lines 1.3 kB view raw
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.24.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-67y/YaXWHklSppUxsJ44CDMsvBXLzKBGl00LXBWi4+g="; 30 }; 31 32 build-system = [ hatchling ]; 33 34 dependencies = [ 35 cryptography 36 orjson 37 ] ++ lib.optionals (pythonOlder "3.11") [ async-timeout ]; 38 39 optional-dependencies = { 40 cli = [ 41 click 42 xdg 43 zeroconf 44 ]; 45 }; 46 47 nativeCheckInputs = [ 48 pytest-asyncio 49 pytest-timeout 50 pytestCheckHook 51 ] ++ lib.optionals (pythonOlder "3.11") [ async-timeout ]; 52 53 pytestFlagsArray = [ "--asyncio-mode=auto" ]; 54 55 pythonImportsCheck = [ "pylutron_caseta" ]; 56 57 meta = with lib; { 58 description = "Python module to control Lutron Caseta devices"; 59 homepage = "https://github.com/gurumitts/pylutron-caseta"; 60 changelog = "https://github.com/gurumitts/pylutron-caseta/blob/v${version}/CHANGELOG.md"; 61 license = licenses.asl20; 62 maintainers = with maintainers; [ fab ]; 63 }; 64}