27 buildPythonPackage rec {
33 inherit pname version;
34 hash = "sha256-k3eCrMna/wVNUPt8b3iM2UqE+A8LhfJarKuZ3Jgihkg=";
38 # https://github.com/pyocd/pyOCD/pull/1332
40 name = "libusb-package-optional.patch";
41 url = "https://github.com/pyocd/pyOCD/commit/0b980cf253e3714dd2eaf0bddeb7172d14089649.patch";
42 hash = "sha256-B2+50VntcQELeakJbCeJdgI1iBU+h2NkXqba+LRYa/0=";
46 pythonRemoveDeps = [ "libusb-package" ];
48 build-system = [ setuptools-scm ];
66 ] ++ lib.optionals (!stdenv.hostPlatform.isLinux) [ hidapi ];
68 pythonImportsCheck = [ "pyocd" ];
71 # AttributeError: 'not_called' is not a valid assertion
72 # Upstream fix at https://github.com/pyocd/pyOCD/pull/1710
73 "test_transfer_err_not_flushed"
76 nativeCheckInputs = [ pytestCheckHook ];
79 changelog = "https://github.com/pyocd/pyOCD/releases/tag/v${version}";
80 description = "Python library for programming and debugging Arm Cortex-M microcontrollers";
81 downloadPage = "https://github.com/pyocd/pyOCD";
82 homepage = "https://pyocd.io";
83 license = licenses.asl20;
84 maintainers = with maintainers; [