Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchPypi, 6 pythonOlder, 7 8 # build 9 autoPatchelfHook, 10 11 # runtime 12 glib, 13 libnl, 14 15 # propagates 16 aenum, 17 coloredlogs, 18 construct, 19 cryptography, 20 dacite, 21 ecdsa, 22 rich, 23 pyyaml, 24 ipdb, 25 deprecation, 26 mobly, 27 pygobject3, 28}: 29 30buildPythonPackage rec { 31 pname = "home-assistant-chip-core"; 32 version = "2024.7.0"; 33 format = "wheel"; 34 35 disabled = pythonOlder "3.7"; 36 37 src = 38 let 39 system = 40 { 41 "aarch64-linux" = { 42 name = "aarch64"; 43 hash = "sha256-omEYZXAqkB5+trALBTqJ8SBGasTHD2mT2km6FizBvS8="; 44 }; 45 "x86_64-linux" = { 46 name = "x86_64"; 47 hash = "sha256-mTMXCpYRon8SqZB+0+P4IM+NUUOKBfxjf/NmLTElB+A="; 48 }; 49 } 50 .${stdenv.system} or (throw "Unsupported system: ${stdenv.system}"); 51 in 52 fetchPypi { 53 pname = "home_assistant_chip_core"; 54 inherit version format; 55 dist = "cp37"; 56 python = "cp37"; 57 abi = "abi3"; 58 platform = "manylinux_2_31_${system.name}"; 59 hash = system.hash; 60 }; 61 62 nativeBuildInputs = [ autoPatchelfHook ]; 63 64 buildInputs = [ 65 glib 66 libnl 67 ]; 68 69 propagatedBuildInputs = [ 70 aenum 71 coloredlogs 72 construct 73 cryptography 74 dacite 75 ecdsa 76 rich 77 pyyaml 78 ipdb 79 deprecation 80 mobly 81 pygobject3 82 ]; 83 84 pythonNamespaces = [ 85 "chip" 86 "chip.clusters" 87 ]; 88 89 pythonImportsCheck = [ 90 "chip" 91 "chip.ble" 92 "chip.configuration" 93 "chip.discovery" 94 "chip.exceptions" 95 "chip.native" 96 "chip.storage" 97 ]; 98 99 doCheck = false; # no tests 100 101 meta = with lib; { 102 description = "Python-base APIs and tools for CHIP"; 103 homepage = "https://github.com/home-assistant-libs/chip-wheels"; 104 changelog = "https://github.com/home-assistant-libs/chip-wheels/releases/tag/${version}"; 105 license = licenses.asl20; 106 maintainers = teams.home-assistant.members; 107 platforms = [ 108 "aarch64-linux" 109 "x86_64-linux" 110 ]; 111 sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 112 }; 113}