From f93470d7a318d91740120e45f8cc6455bc7c56ef Mon Sep 17 00:00:00 2001 From: Michael Eden Date: Tue, 12 Mar 2019 09:07:36 -0400 Subject: rust: set PKG_CONFIG_ALLOW_CROSS conditionally in buildRustPackage --- pkgs/build-support/rust/default.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkgs/build-support/rust') diff --git a/pkgs/build-support/rust/default.nix b/pkgs/build-support/rust/default.nix index 028390640d1..2579c97b99e 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" -- cgit 1.4.1