From f93470d7a318d91740120e45f8cc6455bc7c56ef Mon Sep 17 00:00:00 2001 From: Michael Eden Date: Tue, 12 Mar 2019 09:07:36 -0400 Subject: [PATCH] rust: set PKG_CONFIG_ALLOW_CROSS conditionally in buildRustPackage --- pkgs/build-support/rust/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/build-support/rust/default.nix b/pkgs/build-support/rust/default.nix index 028390640d10..2579c97b99e8 100644 --- a/pkgs/build-support/rust/default.nix +++ b/pkgs/build-support/rust/default.nix @@ -56,6 +56,9 @@ in stdenv.mkDerivation (args // { patches = cargoPatches ++ patches; + PKG_CONFIG_ALLOW_CROSS = + if stdenv.buildPlatform != stdenv.hostPlatform then 1 else 0; + postUnpack = '' eval "$cargoDepsHook"