summary refs log tree commit diff
path: root/pkgs/tools/security
diff options
context:
space:
mode:
authorRussell O'Connor <roconnor@celes.l5.ca>2014-09-16 17:32:39 -0400
committerRussell O'Connor <roconnor@celes.l5.ca>2014-09-16 17:32:39 -0400
commit5302ae078997e6fca1ac3d4bdc99e64abbcbd7fb (patch)
tree01b76002ffa3da70c2796703d8a237c05daa37f6 /pkgs/tools/security
parente2331b52cde23a3754067636a76ebeb7bdccec6f (diff)
downloadnixlib-5302ae078997e6fca1ac3d4bdc99e64abbcbd7fb.tar
nixlib-5302ae078997e6fca1ac3d4bdc99e64abbcbd7fb.tar.gz
nixlib-5302ae078997e6fca1ac3d4bdc99e64abbcbd7fb.tar.bz2
nixlib-5302ae078997e6fca1ac3d4bdc99e64abbcbd7fb.tar.lz
nixlib-5302ae078997e6fca1ac3d4bdc99e64abbcbd7fb.tar.xz
nixlib-5302ae078997e6fca1ac3d4bdc99e64abbcbd7fb.tar.zst
nixlib-5302ae078997e6fca1ac3d4bdc99e64abbcbd7fb.zip
Configure gnupg to use pinentry by default.
This makes gnupg much more usable out of the box.
Diffstat (limited to 'pkgs/tools/security')
-rw-r--r--pkgs/tools/security/gnupg/default.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/tools/security/gnupg/default.nix b/pkgs/tools/security/gnupg/default.nix
index 64e2be90d30d..10fb11d32b9b 100644
--- a/pkgs/tools/security/gnupg/default.nix
+++ b/pkgs/tools/security/gnupg/default.nix
@@ -1,8 +1,6 @@
-# Remember to install Pinentry and
-# 'echo "pinentry-program `which pinentry-gtk-2`" >> ~/.gnupg/gpg-agent.conf'.
-
 { fetchurl, stdenv, readline, zlib, libgpgerror, pth, libgcrypt, libassuan
 , libksba, coreutils, libiconvOrEmpty
+, pinentry
 , useLdap ? true, openldap ? null, useBzip2 ? true, bzip2 ? null
 , useUsb ? true, libusb ? null, useCurl ? true, curl ? null
 }:
@@ -33,6 +31,10 @@ stdenv.mkDerivation rec {
     find . -name pcsc-wrapper.c | xargs sed -i 's/typedef unsinged int pcsc_dword_t/typedef unsigned int pcsc_dword_t/'
   '';
 
+  configureFlags =
+    if pinentry != null then "--with-pinentry-pgm=${pinentry}/bin/pinentry"
+                        else "";
+
   checkPhase="GNUPGHOME=`pwd` ./agent/gpg-agent --daemon make check";
 
   doCheck = true;