From ae0b5d6813362492e744b1ac10e21309bb4e238b Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 3 Mar 2014 22:22:12 +0100 Subject: [PATCH] libgcrypt/cross: Fix build for mingw-w64. Especially for the 64bit mingw target, because libgcrypt contains protected mode assembly. Also, this adds gettext to the crossAttrs of libgpg-error, because it tries to regenerate the MO files. Signed-off-by: aszlig --- pkgs/development/libraries/libgcrypt/1.6.nix | 6 ++++++ pkgs/development/libraries/libgpg-error/default.nix | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libgcrypt/1.6.nix b/pkgs/development/libraries/libgcrypt/1.6.nix index ea981f7ed127..9dc8b8a23179 100644 --- a/pkgs/development/libraries/libgcrypt/1.6.nix +++ b/pkgs/development/libraries/libgcrypt/1.6.nix @@ -24,6 +24,12 @@ stdenv.mkDerivation rec { make check ''; + crossAttrs = let + isCross64 = stdenv.cross.config == "x86_64-w64-mingw32"; + in stdenv.lib.optionalAttrs isCross64 { + configureFlags = [ "--disable-asm" "--disable-padlock-support" ]; + }; + meta = { description = "GNU Libgcrypt, a general-pupose cryptographic library"; diff --git a/pkgs/development/libraries/libgpg-error/default.nix b/pkgs/development/libraries/libgpg-error/default.nix index da142a957ad7..8ce9a10701ec 100644 --- a/pkgs/development/libraries/libgpg-error/default.nix +++ b/pkgs/development/libraries/libgpg-error/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, bash }: +{ stdenv, fetchurl, bash, gettext }: stdenv.mkDerivation (rec { name = "libgpg-error-1.12"; @@ -8,6 +8,10 @@ stdenv.mkDerivation (rec { sha256 = "0pz58vr12qihq2f0bypjxsb6cf6ajq5258fmfm8s6lvwm3b9xz6a"; }; + # If architecture-dependant MO files aren't available, they're generated + # during build, so we need gettext for cross-builds. + crossAttrs.buildInputs = [ gettext ]; + doCheck = true; meta = {