diff --git a/pkgs/development/libraries/gpgme/default.nix b/pkgs/development/libraries/gpgme/default.nix index 9dba035d15f2..2f1411a0bdaa 100644 --- a/pkgs/development/libraries/gpgme/default.nix +++ b/pkgs/development/libraries/gpgme/default.nix @@ -1,5 +1,15 @@ -{ stdenv, fetchurl, libgpgerror, gnupg, pkgconfig, glib, pth, libassuan }: +{ stdenv, fetchurl, libgpgerror, gnupg, pkgconfig, glib, pth, libassuan +, useGnupg1 ? false, gnupg1 ? null }: +assert useGnupg1 -> gnupg1 != null; +assert !useGnupg1 -> gnupg != null; + +let + gpgPath = if useGnupg1 then + "${gnupg1}/bin/gpg" + else + "${gnupg}/bin/gpg2"; +in stdenv.mkDerivation rec { name = "gpgme-1.3.1"; @@ -8,10 +18,9 @@ stdenv.mkDerivation rec { sha256 = "1m7l7nicn6gd952cgspv9xr8whqivbg33nbg8kbpj3dffnl2gvqm"; }; - propagatedBuildInputs = [ libgpgerror glib libassuan ] - ++ stdenv.lib.optional pth.supported pth; + propagatedBuildInputs = [ libgpgerror glib libassuan pth ]; buildNativeInputs = [ pkgconfig ]; - configureFlags = "--with-gpg=${gnupg}/bin/gpg2"; + configureFlags = "--with-gpg=${gpgPath}"; } diff --git a/pkgs/development/libraries/libassuan/default.nix b/pkgs/development/libraries/libassuan/default.nix index 619ef4d97fb4..f93a44c2e1d1 100644 --- a/pkgs/development/libraries/libassuan/default.nix +++ b/pkgs/development/libraries/libassuan/default.nix @@ -8,8 +8,7 @@ stdenv.mkDerivation rec { sha256 = "06xckkvxxlx7cj77803m8x58gxksap4k8yhspc5cqsy7fhinimds"; }; - propagatedBuildInputs = [ libgpgerror ] - ++ stdenv.lib.optional pth.supported pth; + propagatedBuildInputs = [ libgpgerror pth ]; doCheck = true; diff --git a/pkgs/development/libraries/pth/default.nix b/pkgs/development/libraries/pth/default.nix index cd20af5bb07b..b7b09caed9b3 100644 --- a/pkgs/development/libraries/pth/default.nix +++ b/pkgs/development/libraries/pth/default.nix @@ -8,9 +8,9 @@ stdenv.mkDerivation rec { sha256 = "0ckjqw5kz5m30srqi87idj7xhpw6bpki43mj07bazjm2qmh3cdbj"; }; - passthru = { - supported = ! stdenv.isArm; - }; + preConfigure = stdenv.lib.optionalString stdenv.isArm '' + configureFlagsArray=("CFLAGS=-DJB_SP=8 -DJB_PC=9") + ''; meta = { description = "The GNU Portable Threads library"; diff --git a/pkgs/tools/security/gnupg/default.nix b/pkgs/tools/security/gnupg/default.nix index 8b528e15c059..ba680cb8ba43 100644 --- a/pkgs/tools/security/gnupg/default.nix +++ b/pkgs/tools/security/gnupg/default.nix @@ -20,8 +20,7 @@ stdenv.mkDerivation rec { sha256 = "08n636sfffs5qvg9ppiprvsh00q0dmdw425psg3m3nssja53m8pg"; }; - buildInputs = [ readline zlib libgpgerror libgcrypt libassuan libksba ] - ++ stdenv.lib.optional pth.supported pth + buildInputs = [ readline zlib libgpgerror libgcrypt libassuan libksba pth ] ++ stdenv.lib.optional useLdap openldap ++ stdenv.lib.optional useBzip2 bzip2 ++ stdenv.lib.optional useUsb libusb diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bc1841805575..abe8cdf67bd9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3839,7 +3839,9 @@ let gnutls_without_guile = gnutls.override { guileBindings = false; }; gnutls2_without_guile = gnutls2.override { guileBindings = false; }; - gpgme = callPackage ../development/libraries/gpgme { }; + gpgme = callPackage ../development/libraries/gpgme { + gnupg1 = gnupg1orig; + }; grantlee = callPackage ../development/libraries/grantlee { };