From 4d32ee26c53cca65de6991e93e6de654d75f1eeb Mon Sep 17 00:00:00 2001 From: squalus Date: Thu, 12 May 2022 21:34:57 -0700 Subject: [PATCH] boringssl: support cross compile set GOARCH to allow codegen programs to run on the buildPlatform --- pkgs/development/libraries/boringssl/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/boringssl/default.nix b/pkgs/development/libraries/boringssl/default.nix index b9b2e568ce6..efcb64a7fd5 100644 --- a/pkgs/development/libraries/boringssl/default.nix +++ b/pkgs/development/libraries/boringssl/default.nix @@ -26,6 +26,8 @@ buildGoModule { # (if we use postConfigure then cmake will loop runHook postConfigure) preBuild = '' cmakeConfigurePhase + '' + lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' + export GOARCH=$(go env GOHOSTARCH) ''; buildPhase = ''