1 { lib, stdenv, buildPythonPackage, fetchPypi, libusb1, pytest }:
3 buildPythonPackage rec {
9 sha256 = "17hqck808m59jv6m2g4hasnay44pycy3y0im01fq9jpr3ymcdbi7";
13 substituteInPlace usb1/libusb1.py --replace \
14 "ctypes.util.find_library(base_name)" \
15 "'${libusb1}/lib/libusb-1.0${stdenv.hostPlatform.extensions.sharedLibrary}'"
18 buildInputs = [ libusb1 ];
20 checkInputs = [ pytest ];
23 # USBPollerThread is unreliable. Let's not test it.
24 # See: https://github.com/vpelletier/python-libusb1/issues/16
25 py.test -k 'not testUSBPollerThreadExit' usb1/testUSB1.py
29 homepage = "https://github.com/vpelletier/python-libusb1";
30 description = "Python ctype-based wrapper around libusb1";
31 license = licenses.lgpl2Plus;
32 maintainers = with maintainers; [ prusnak rnhmjoj ];