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