python3Packages.hidapi: Remove libusb dependency (#354527)

This commit is contained in:
Pavol Rusnak
2024-11-08 19:24:02 +01:00
committed by GitHub
2 changed files with 2 additions and 13 deletions
@@ -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; {
+1 -1
View File
@@ -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 { };