gnupg: Variable path to pinentry

This is needed for pinentry-mac which has the pinentry binary
at an OS X-ish path.
This commit is contained in:
Kirill Elagin 2016-06-17 12:27:59 +03:00
parent 62d9edb9b9
commit 213dc21443
3 changed files with 8 additions and 2 deletions

View File

@ -35,7 +35,8 @@ stdenv.mkDerivation rec {
patch gl/stdint_.h < ${./clang.patch} 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"; postConfigure = "substituteAllInPlace tools/gpgkey2ssh.c";

View File

@ -32,7 +32,8 @@ stdenv.mkDerivation rec {
sed -i 's,"libpcsclite\.so[^"]*","${pcsclite}/lib/libpcsclite.so",g' scd/scdaemon.c sed -i 's,"libpcsclite\.so[^"]*","${pcsclite}/lib/libpcsclite.so",g' scd/scdaemon.c
''; #" fix Emacs syntax highlighting :-( ''; #" 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; { meta = with stdenv.lib; {
homepage = http://gnupg.org; homepage = http://gnupg.org;

View File

@ -17,6 +17,10 @@ stdenv.mkDerivation rec {
mv build/Release/pinentry-mac.app $out/Applications mv build/Release/pinentry-mac.app $out/Applications
''; '';
passthru = {
binaryPath = "Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac";
};
meta = { meta = {
description = "Pinentry for GPG on Mac"; description = "Pinentry for GPG on Mac";
license = stdenv.lib.licenses.gpl2Plus; license = stdenv.lib.licenses.gpl2Plus;