10 buildPythonPackage rec {
13 format = "setuptools";
16 inherit pname version;
17 sha256 = "a4cc7404a203144754164b8b40994e2849fde1cfff06b08492f12fff9d9de7b9";
20 nativeBuildInputs = [ setuptools-scm ];
22 # Fix the USB backend library lookup
24 libusb=${libusb1.out}/lib/libusb-1.0${stdenv.hostPlatform.extensions.sharedLibrary}
25 test -f $libusb || { echo "ERROR: $libusb doesn't exist, please update/fix this build expression."; exit 1; }
26 sed -i -e "s|find_library=None|find_library=lambda _:\"$libusb\"|" usb/backend/libusb1.py
32 pythonImportsCheck = [ "usb" ];
35 description = "Python USB access module (wraps libusb 1.0)"; # can use other backends
36 homepage = "https://pyusb.github.io/pyusb/";
37 license = licenses.bsd3;
38 maintainers = with maintainers; [ bjornfor ];