From 0a8fb89fca5bb1fee4e015e52f003746fd4ec682 Mon Sep 17 00:00:00 2001 From: hyperfekt Date: Sun, 7 Jun 2020 19:51:13 +0200 Subject: [PATCH] rustPlatform: fix cross-compiling by using native diff --- pkgs/build-support/rust/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/rust/default.nix b/pkgs/build-support/rust/default.nix index 795ce841ffb6..770a6d1042e7 100644 --- a/pkgs/build-support/rust/default.nix +++ b/pkgs/build-support/rust/default.nix @@ -70,7 +70,8 @@ let # Specify the stdenv's `diff` by abspath to ensure that the user's build # inputs do not cause us to find the wrong `diff`. - diff = "${diffutils}/bin/diff"; + # The `.nativeDrv` stanza works like nativeBuildInputs and ensures cross-compiling has the right version available. + diff = "${diffutils.nativeDrv or diffutils}/bin/diff"; in