nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at haskell-updates 81 lines 1.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 6 # build-system 7 setuptools, 8 9 # dependencies 10 hidapi, 11 pyusb, 12 13 # tests 14 click, 15 pytestCheckHook, 16 spsdk, 17 writableTmpDirAsHomeHook, 18 19 # passthru 20 spsdk-mcu-link, 21}: 22 23buildPythonPackage rec { 24 pname = "spsdk-mcu-link"; 25 version = "0.6.6"; 26 pyproject = true; 27 28 # Latest tag missing on GitHub 29 src = fetchPypi { 30 pname = "spsdk_mcu_link"; 31 inherit version; 32 hash = "sha256-KISqhJJFtHFCDOFs+Zx0ghX0lGK5tazVqEIOT9gyAQs="; 33 }; 34 35 build-system = [ 36 setuptools 37 ]; 38 39 pythonRemoveDeps = [ 40 # unpackaged 41 "libusb_package" 42 "wasmtime" 43 ]; 44 45 pythonRelaxDeps = [ 46 "hidapi" 47 "pyusb" 48 ]; 49 50 dependencies = [ 51 hidapi 52 pyusb 53 ]; 54 55 nativeCheckInputs = [ 56 click 57 pytestCheckHook 58 spsdk 59 writableTmpDirAsHomeHook 60 ]; 61 62 # Cyclic dependency with spsdk 63 doCheck = false; 64 65 passthru.tests = { 66 pytest = spsdk-mcu-link.overridePythonAttrs { 67 pythonImportsCheck = [ 68 "spsdk_mcu_link" 69 ]; 70 71 doCheck = true; 72 }; 73 }; 74 75 meta = { 76 description = "Debugger probe plugin for SPSDK supporting LPC-Link/MCU-Link from NXP"; 77 homepage = "https://pypi.org/project/spsdk-mcu-link"; 78 license = lib.licenses.bsd3; 79 maintainers = with lib.maintainers; [ GaetanLepage ]; 80 }; 81}