Skip to content

Commit

Permalink
gnupg: Variable path to pinentry
Browse files Browse the repository at this point in the history
This is needed for pinentry-mac which has the pinentry binary
at an OS X-ish path.
  • Loading branch information
kirelagin committed Oct 28, 2016
1 parent 62d9edb commit 213dc21
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pkgs/tools/security/gnupg/20.nix
Expand Up @@ -35,7 +35,8 @@ stdenv.mkDerivation rec {
patch gl/stdint_.h < ${./clang.patch}
'';

configureFlags = optional guiSupport "--with-pinentry-pgm=${pinentry}/bin/pinentry";
pinentryBinaryPath = pinentry.binaryPath or "bin/pinentry";
configureFlags = optional guiSupport "--with-pinentry-pgm=${pinentry}/${pinentryBinaryPath}";

postConfigure = "substituteAllInPlace tools/gpgkey2ssh.c";

Expand Down
3 changes: 2 additions & 1 deletion pkgs/tools/security/gnupg/21.nix
Expand Up @@ -32,7 +32,8 @@ stdenv.mkDerivation rec {
sed -i 's,"libpcsclite\.so[^"]*","${pcsclite}/lib/libpcsclite.so",g' scd/scdaemon.c
''; #" fix Emacs syntax highlighting :-(

configureFlags = optional guiSupport "--with-pinentry-pgm=${pinentry}/bin/pinentry";
pinentryBinaryPath = pinentry.binaryPath or "bin/pinentry";
configureFlags = optional guiSupport "--with-pinentry-pgm=${pinentry}/${pinentryBinaryPath}";

meta = with stdenv.lib; {
homepage = http://gnupg.org;
Expand Down
4 changes: 4 additions & 0 deletions pkgs/tools/security/pinentry-mac/default.nix
Expand Up @@ -17,6 +17,10 @@ stdenv.mkDerivation rec {
mv build/Release/pinentry-mac.app $out/Applications
'';

passthru = {
binaryPath = "Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac";
};

meta = {
description = "Pinentry for GPG on Mac";
license = stdenv.lib.licenses.gpl2Plus;
Expand Down

0 comments on commit 213dc21

Please sign in to comment.