diff --git a/pkgs/build-support/rust/default-crate-overrides.nix b/pkgs/build-support/rust/default-crate-overrides.nix index 441c6dfaf9c3..ce8217b403e6 100644 --- a/pkgs/build-support/rust/default-crate-overrides.nix +++ b/pkgs/build-support/rust/default-crate-overrides.nix @@ -36,6 +36,9 @@ , alsa-lib , graphene , protobuf +, autoconf +, automake +, libtool , ... }: @@ -85,8 +88,17 @@ in }; evdev-sys = attrs: { - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ + pkg-config + ] ++ lib.optionals (stdenv.buildPlatform.config != stdenv.hostPlatform.config) [ + python3 autoconf automake libtool + ]; buildInputs = [ libevdev ]; + + # This prevents libevdev's build.rs from trying to `git fetch` when HOST!=TARGET + prePatch = '' + touch libevdev/.git + ''; }; expat-sys = attrs: {