git.iko.soy/typeable/nixpkgs
on master help sign in
gpgme: Use fixed path for GnuPG binaries

By default, GPGME tries to search in $PATH for the gpg and gpgconf binaries. This has the downside, that the library won't work by its own and needs to have GnuPG in systemPackages or the user environment. I've stumbled on this while working on one of the dependencies of nixos-assimilate and nixpart (volume_key), where the testing environment didn't come with GnuPG in $PATH and thus the tests have failed. After testing this with a few programs using GPGME, I haven't found any weird behavior in conjunction with the GnuPG agent. However one possible implication could be that if the GnuPG used in $PATH (and the config files in the user's home directory) should be vastly incompatible, it could lead to failures. In practice however, the GnuPG1/2 versions pretty much seem to stay compatible within their major releases so it shouldn't pose a problem. Signed-off-by: aszlig <aszlig@redmoonstudios.org>

commit39a07cabe870fb64e972981d961a5a4b9ddbdaca authoraszlig <aszlig@redmoonstudios.org> dateThu 21 Jan 2016, 01:26 (11 years ago) parent313faf0
1 file changed+6−5
pkgs/development/libraries/gpgme/default.nix+6−5
pkgs/development/libraries/gpgme/default.nix+6−5
@@ -5,10 +5,8 @@ assert useGnupg1 -> gnupg1 != null;
55assert !useGnupg1 -> gnupg != null;
66
77let
8− gpgPath = if useGnupg1 then
9− "${gnupg1}/bin/gpg"
10− else
11− "${gnupg}/bin/gpg2";
8+ gpgStorePath = if useGnupg1 then gnupg1 else gnupg;
9+ gpgProgram = if useGnupg1 then "gpg" else "gpg2";
1210in
1311stdenv.mkDerivation rec {
1412 name = "gpgme-1.6.0";
@@ -22,7 +20,10 @@ stdenv.mkDerivation rec {
2220
2321 nativeBuildInputs = [ pkgconfig gnupg ];
2422
25− configureFlags = "--with-gpg=${gpgPath}";
23+ configureFlags = [
24+ "--with-gpg=${gpgStorePath}/bin/${gpgProgram}"
25+ "--enable-fixed-path=${gpgStorePath}/bin"
26+ ];
2627
2728 meta = {
2829 homepage = "http://www.gnupg.org/related_software/gpgme";