python3Packages.hidapi: Remove libusb dependency
Since version v0.14.0.post2, hidapi defaults to the hidraw backend so libusb is no longer required. See also: https://github.com/NixOS/nixpkgs/pull/329704
This commit is contained in:
parent
63f568345a
commit
43b7e27aaa
@ -5,7 +5,6 @@
|
||||
fetchPypi,
|
||||
xcbuild,
|
||||
cython_0,
|
||||
libusb1,
|
||||
udev,
|
||||
darwin,
|
||||
}:
|
||||
@ -23,10 +22,7 @@ buildPythonPackage rec {
|
||||
nativeBuildInputs = [ cython_0 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild ];
|
||||
|
||||
propagatedBuildInputs =
|
||||
lib.optionals stdenv.hostPlatform.isLinux [
|
||||
libusb1
|
||||
udev
|
||||
]
|
||||
lib.optionals stdenv.hostPlatform.isLinux [ udev ]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin (
|
||||
with darwin.apple_sdk.frameworks;
|
||||
[
|
||||
@ -36,13 +32,6 @@ buildPythonPackage rec {
|
||||
]
|
||||
);
|
||||
|
||||
# Fix the USB backend library lookup
|
||||
postPatch = lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
libusb=${libusb1.dev}/include/libusb-1.0
|
||||
test -d $libusb || { echo "ERROR: $libusb doesn't exist, please update/fix this build expression."; exit 1; }
|
||||
sed -i -e "s|/usr/include/libusb-1.0|$libusb|" setup.py
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "hid" ];
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -5756,7 +5756,7 @@ self: super: with self; {
|
||||
};
|
||||
|
||||
hidapi = callPackage ../development/python-modules/hidapi {
|
||||
inherit (pkgs) udev libusb1;
|
||||
inherit (pkgs) udev;
|
||||
};
|
||||
|
||||
hid-parser = callPackage ../development/python-modules/hid-parser { };
|
||||
|
Loading…
Reference in New Issue
Block a user