libgcrypt: pass --with-libgpg-error-prefix

Avoids having to put the gpg-error-config binary directly in PATH.

/cc @shlevy
This commit is contained in:
Matthew Bauer 2018-11-18 18:32:32 -06:00
parent 85bd2a7acb
commit e6f4f0ef8d

View File

@ -27,12 +27,7 @@ stdenv.mkDerivation rec {
++ stdenv.lib.optional stdenv.isDarwin gettext
++ stdenv.lib.optional enableCapabilities libcap;
preConfigure = stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
# This is intentional: gpg-error-config is a shell script that will work during the build
mkdir -p "$NIX_BUILD_TOP"/bin
ln -s ${libgpgerror.dev}/bin/gpg-error-config "$NIX_BUILD_TOP/bin"
export PATH="$NIX_BUILD_TOP/bin:$PATH"
'';
configureFlags = [ "--with-libgpg-error-prefix=${libgpgerror.dev}" ];
# Make sure libraries are correct for .pc and .la files
# Also make sure includes are fixed for callers who don't use libgpgcrypt-config