diff options
author | Jan Malakhovski <oxij@oxij.org> | 2015-03-21 13:01:52 +0000 |
---|---|---|
committer | Jan Malakhovski <oxij@oxij.org> | 2015-03-29 23:26:13 +0000 |
commit | 6b9bb7231958340d21ed15c3b5e730710a3b9d14 (patch) | |
tree | b293aaa7da27e46594c9686a8d3cedcff0cf695f /pkgs/tools/security/gnupg/20.nix | |
parent | eb22e54243cbd7e63f17a56a6bb73526d8112ed2 (diff) |
gnupg: add x11Support option
Diffstat (limited to 'pkgs/tools/security/gnupg/20.nix')
-rw-r--r-- | pkgs/tools/security/gnupg/20.nix | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/pkgs/tools/security/gnupg/20.nix b/pkgs/tools/security/gnupg/20.nix index cf11ecb823283..a5fdc2e26924b 100644 --- a/pkgs/tools/security/gnupg/20.nix +++ b/pkgs/tools/security/gnupg/20.nix @@ -1,10 +1,16 @@ { fetchurl, stdenv, readline, zlib, libgpgerror, pth, libgcrypt, libassuan , libksba, coreutils, libiconv, pcsclite + # Each of the dependencies below are optional. # Gnupg can be built without them at the cost of reduced functionality. -, pinentry ? null, openldap ? null, bzip2 ? null, libusb ? null, curl ? null +, pinentry ? null, x11Support ? true +, openldap ? null, bzip2 ? null, libusb ? null, curl ? null }: +with stdenv.lib; + +assert x11Support -> pinentry != null; + stdenv.mkDerivation rec { name = "gnupg-2.0.27"; @@ -27,9 +33,7 @@ stdenv.mkDerivation rec { patch gl/stdint_.h < ${./clang.patch} ''; - configureFlags = - if pinentry != null then "--with-pinentry-pgm=${pinentry}/bin/pinentry" - else ""; + configureFlags = optional x11Support "--with-pinentry-pgm=${pinentry}/bin/pinentry"; checkPhase="GNUPGHOME=`pwd` ./agent/gpg-agent --daemon make check"; |