hidapi: fix cross build

This commit is contained in:
Frederik Rietdijk 2020-12-31 09:30:44 +01:00
parent 7115040e19
commit f6514239ee
1 changed files with 10 additions and 2 deletions

View File

@ -1,5 +1,7 @@
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, udev, libusb1
, darwin }:
, darwin
, gnum4
}:
stdenv.mkDerivation rec {
pname = "hidapi";
@ -12,7 +14,13 @@ stdenv.mkDerivation rec {
sha256 = "1nr4z4b10vpbh3ss525r7spz4i43zim2ba5qzfl15dgdxshxxivb";
};
nativeBuildInputs = [ autoreconfHook pkgconfig ];
nativeBuildInputs = [
autoreconfHook
pkgconfig
] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
# Could be added always, but added conditionally here to avoid large rebuild
gnum4
];
buildInputs = [ ]
++ stdenv.lib.optionals stdenv.isLinux [ libusb1 udev ];