Skip to content

Commit

Permalink
Merge pull request #1334 from PicoGeyer/hidapi_fix
Browse files Browse the repository at this point in the history
Add overrides for hidapi
  • Loading branch information
cpcloud authored Oct 21, 2023
2 parents edc69ea + a7e04dd commit 8ffbc64
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions overrides/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,19 @@ lib.composeManyExtensions [
}
);

hidapi = super.hidapi.overridePythonAttrs (
old: {
propagatedBuildInputs = old.propagatedBuildInputs or [ ] ++ [
pkgs.libusb1
];
postPatch = lib.optionalString stdenv.isLinux ''
libusb=${pkgs.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
'';
}
);

hikari = super.hikari.overrideAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ self.setuptools ];
Expand Down

0 comments on commit 8ffbc64

Please sign in to comment.