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