about summary refs log tree commit diff
path: root/pkgs/tools/security
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2019-03-26 13:57:43 +0100
committerGitHub <noreply@github.com>2019-03-26 13:57:43 +0100
commit98dcfed615f1b822edafffc6c128f7322f26f8f6 (patch)
tree79707ae542a69646cfe292ccc97d4050c526cde3 /pkgs/tools/security
parentef48aaff73b5e01fa4e3878ca2540ea877d2aa67 (diff)
parent268f15915bf10d77a955227d4007a200f8ebf657 (diff)
downloadnixlib-98dcfed615f1b822edafffc6c128f7322f26f8f6.tar
nixlib-98dcfed615f1b822edafffc6c128f7322f26f8f6.tar.gz
nixlib-98dcfed615f1b822edafffc6c128f7322f26f8f6.tar.bz2
nixlib-98dcfed615f1b822edafffc6c128f7322f26f8f6.tar.lz
nixlib-98dcfed615f1b822edafffc6c128f7322f26f8f6.tar.xz
nixlib-98dcfed615f1b822edafffc6c128f7322f26f8f6.tar.zst
nixlib-98dcfed615f1b822edafffc6c128f7322f26f8f6.zip
Merge pull request #57818 from illegalprime/fix/gnupg-cross
gnupg: use config flags to find lib prefix instead of their binary tools
Diffstat (limited to 'pkgs/tools/security')
-rw-r--r--pkgs/tools/security/gnupg/22.nix12
1 files changed, 10 insertions, 2 deletions
diff --git a/pkgs/tools/security/gnupg/22.nix b/pkgs/tools/security/gnupg/22.nix
index 9fb5e45a8edb..7346884f314a 100644
--- a/pkgs/tools/security/gnupg/22.nix
+++ b/pkgs/tools/security/gnupg/22.nix
@@ -1,5 +1,6 @@
-{ fetchurl, stdenv, pkgconfig, libgcrypt, libassuan, libksba
+{ fetchurl, stdenv, pkgconfig, libgcrypt, libassuan, libksba, libgpgerror
 , libiconv, npth, gettext, texinfo, pcsclite, sqlite
+, buildPackages
 
 # Each of the dependencies below are optional.
 # Gnupg can be built without them at the cost of reduced functionality.
@@ -22,6 +23,7 @@ stdenv.mkDerivation rec {
     sha256 = "0yzqrg24j9fc4f8ss5pclyvg70a9z53sv89vl77xii8yvi3fvy8v";
   };
 
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [
     libgcrypt libassuan libksba libiconv npth gettext texinfo
@@ -36,7 +38,13 @@ stdenv.mkDerivation rec {
   ''; #" fix Emacs syntax highlighting :-(
 
   pinentryBinaryPath = pinentry.binaryPath or "bin/pinentry";
-  configureFlags = optional guiSupport "--with-pinentry-pgm=${pinentry}/${pinentryBinaryPath}";
+  configureFlags = [
+    "--with-libgpg-error-prefix=${libgpgerror.dev}"
+    "--with-libgcrypt-prefix=${libgcrypt.dev}"
+    "--with-libassuan-prefix=${libassuan.dev}"
+    "--with-ksba-prefix=${libksba.dev}"
+    "--with-npth-prefix=${npth}"
+  ] ++ optional guiSupport "--with-pinentry-pgm=${pinentry}/${pinentryBinaryPath}";
 
   postInstall = ''
     mkdir -p $out/lib/systemd/user