Change:
Steps to reproduce the behavior: <!-- Please @ people who are in the list of the offending package or module. If in doubt, check for whoever last touched something. -- I will submit a PR shortly once I am back on my laptop.
I'm sorry this took your time. It should be fixed by

Discussion:
<del> { lib , buildPythonPackage , fetchPypi , fetchpatch , capstone , cmsis-pack-manager , colorama , intelhex , intervaltree , natsort , prettytable , pyelftools , pylink-square , pyusb , pyyaml , typing-extensions , stdenv , hidapi , pytestCheckHook }: buildPythonPackage rec { pname = "pyocd"; version = "0.34.1"; src = fetchPypi { inherit pname version; sha256 = "sha256-Fpa2IEsLOQ8ylGI/5D6h+22j1pvrvE9IMIyhCtyM6qU="; }; patches = [ # https://github.com/pyocd/pyOCD/pull/1332 (fetchpatch { name = "libusb-package-optional.patch"; url = "https://github.com/pyocd/pyOCD/commit/0b980cf253e3714dd2eaf0bddeb7172d14089649.patch"; sha256 = "sha256-B2+50VntcQELeakJbCeJdgI1iBU+h2NkXqba+LRYa/0="; }) ]; propagatedBuildInputs = [ capstone cmsis-pack-manager colorama intelhex intervaltree natsort prettytable pyelftools pylink-square pyusb pyyaml typing-extensions ] ++ lib.optionals (!stdenv.isLinux) [ hidapi ]; checkInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "pyocd" ]; postPatch = '' substituteInPlace setup.cfg  --replace "libusb-package>=1.0,<2.0" "" ''; meta = with lib; { description = "Python library for programming and debugging Arm Cortex-M microcontrollers"; homepage = "https://pyocd.io/"; license = licenses.asl20; maintainers = with maintainers; [ frogamic sbruder ]; }; } </del>

<ins> { lib , buildPythonPackage , fetchPypi , fetchpatch , capstone , cmsis-pack-manager , colorama , intelhex , intervaltree , natsort , prettytable , pyelftools , pylink-square , pyusb , pyyaml , typing-extensions , stdenv , hidapi , pytestCheckHook }: buildPythonPackage rec { pname = "pyocd"; version = "0.34.1"; src = fetchPypi { inherit pname version; sha256 = "sha256-Fpa2IEsLOQ8ylGI/5D6h+22j1pvrvE9IMIyhCtyM6qU="; }; patches = [ # https://github.com/pyocd/pyOCD/pull/1332 (fetchpatch { name = "libusb-package-optional.patch"; url = "https://github.com/pyocd/pyOCD/commit/0b980cf253e3714dd2eaf0bddeb7172d14089649.patch"; sha256 = "sha256-B2+50VntcQELeakJbCeJdgI1iBU+h2NkXqba+LRYa/0="; }) ]; propagatedBuildInputs = [ capstone cmsis-pack-manager colorama intelhex intervaltree natsort prettytable pyelftools pylink-square pyusb pyyaml typing-extensions ] ++ lib.optionals (!stdenv.isLinux) [ hidapi ]; checkInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "pyocd" ]; postPatch = '' substituteInPlace setup.cfg  --replace "libusb-package>=1.0,<2.0" "" ''; meta = with lib; { description = "Python library for programming and debugging Arm Cortex-M microcontrollers"; homepage = "https://pyocd.io/"; license = licenses.asl20; maintainers = with maintainers; [ frogamic sbruder ]; }; } </ins>

nativeBuildInputs = [ pythonRelaxDepsHook ]; pythonRelaxDeps = [ <ins> "bincopy" "bitstring" </ins> "cmsis-pack-manager" "cryptography" "deepmerge"

pympress = callPackage ../applications/office/pympress { }; <del> pyocd = python3Packages.callPackage ../development/embedded/pyocd { }; </del> <ins> pyocd = with python3Packages; toPythonApplication pyocd; </ins> pypass = with python3Packages; toPythonApplication pypass;

pyobihai = callPackage ../development/python-modules/pyobihai { }; <ins> pyocd = callPackage ../development/python-modules/pyocd { }; </ins> pyocr = callPackage ../development/python-modules/pyocr { tesseract = pkgs.tesseract4; };