1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 cython, 8 setuptools, 9 10 # dependencies 11 aiohappyeyeballs, 12 async-interrupt, 13 chacha20poly1305-reuseable, 14 cryptography, 15 noiseprotocol, 16 protobuf, 17 tzlocal, 18 zeroconf, 19 20 # tests 21 mock, 22 pytest-asyncio, 23 pytestCheckHook, 24}: 25 26buildPythonPackage rec { 27 pname = "aioesphomeapi"; 28 version = "41.11.0"; 29 pyproject = true; 30 31 src = fetchFromGitHub { 32 owner = "esphome"; 33 repo = "aioesphomeapi"; 34 tag = "v${version}"; 35 hash = "sha256-xJUQyCa4ETroi5ncbPajdfJV4Ekzz23rXRBX08J8Q54="; 36 }; 37 38 build-system = [ 39 setuptools 40 cython 41 ]; 42 43 pythonRelaxDeps = [ "cryptography" ]; 44 45 dependencies = [ 46 aiohappyeyeballs 47 async-interrupt 48 chacha20poly1305-reuseable 49 cryptography 50 noiseprotocol 51 protobuf 52 tzlocal 53 zeroconf 54 ]; 55 56 nativeCheckInputs = [ 57 mock 58 pytest-asyncio 59 pytestCheckHook 60 ]; 61 62 disabledTestPaths = [ 63 # benchmarking requires pytest-codespeed 64 "tests/benchmarks" 65 ]; 66 67 __darwinAllowLocalNetworking = true; 68 69 pythonImportsCheck = [ "aioesphomeapi" ]; 70 71 meta = with lib; { 72 description = "Python Client for ESPHome native API"; 73 homepage = "https://github.com/esphome/aioesphomeapi"; 74 changelog = "https://github.com/esphome/aioesphomeapi/releases/tag/${src.tag}"; 75 license = licenses.mit; 76 maintainers = with maintainers; [ 77 fab 78 hexa 79 ]; 80 }; 81}