From d1790983906b8434c29800dddd4f2aa4b9d03c58 Mon Sep 17 00:00:00 2001 From: Gaelan Steele Date: Thu, 14 May 2020 14:12:06 -0700 Subject: [PATCH] libgcrypt: always pass build and host to configure When building for aarch32 on aarch64 with extraPlatforms, libgcrypt fails to build because it tries to guess the host platform from uname, which returns the wrong result in this case. We fix this by always telling libgcrpyt what platform to build for. --- pkgs/development/libraries/libgcrypt/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/libgcrypt/default.nix b/pkgs/development/libraries/libgcrypt/default.nix index a3d515c5047..49aaec66c29 100644 --- a/pkgs/development/libraries/libgcrypt/default.nix +++ b/pkgs/development/libraries/libgcrypt/default.nix @@ -30,6 +30,10 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-libgpg-error-prefix=${libgpgerror.dev}" ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "--disable-asm"; + # Necessary to generate correct assembly when compiling for aarch32 on + # aarch64 + configurePlatforms = [ "host" "build" ]; + # Make sure libraries are correct for .pc and .la files # Also make sure includes are fixed for callers who don't use libgpgcrypt-config postFixup = ''