1 { lib, stdenv, fetchPypi, buildPythonPackage, libusb1, setuptools-scm }:
3 buildPythonPackage rec {
9 sha256 = "a4cc7404a203144754164b8b40994e2849fde1cfff06b08492f12fff9d9de7b9";
16 # Fix the USB backend library lookup
19 libusb=${libusb1.out}/lib/libusb-1.0${stdenv.hostPlatform.extensions.sharedLibrary}
20 test -f $libusb || { echo "ERROR: $libusb doesn't exist, please update/fix this build expression."; exit 1; }
21 sed -i -e "s|find_library=None|find_library=lambda _:\"$libusb\"|" usb/backend/libusb1.py
27 pythonImportsCheck = [ "usb" ];
30 description = "Python USB access module (wraps libusb 1.0)"; # can use other backends
31 homepage = "https://pyusb.github.io/pyusb/";
32 license = licenses.bsd3;
33 maintainers = with maintainers; [ bjornfor ];