Merge pull request #86602 from matthuszagh/pylibftdi

pylibftdi: point to correct libusb library
This commit is contained in:
Dmitry Kalinkin 2020-05-02 16:07:44 -04:00 committed by GitHub
commit 434cf0fe6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,6 @@
{ lib
, buildPythonPackage
, fetchPypi
, httpserver
, libftdi1
, libusb1
}:
@ -16,14 +15,13 @@ buildPythonPackage rec {
};
propagatedBuildInputs = [
httpserver
libftdi1
libusb1
];
postPatch = ''
substituteInPlace pylibftdi/driver.py \
--replace "self._load_library('libusb')" "cdll.LoadLibrary('${libusb1.out}/lib/libusb1.so')" \
--replace "self._load_library('libusb')" "cdll.LoadLibrary('${libusb1.out}/lib/libusb-1.0.so')" \
--replace "self._load_library('libftdi')" "cdll.LoadLibrary('${libftdi1.out}/lib/libftdi1.so')"
'';