gnupg: add x11Support option

This commit is contained in:
Jan Malakhovski 2015-03-21 13:01:52 +00:00
parent eb22e54243
commit 6b9bb72319
2 changed files with 20 additions and 10 deletions

View file

@ -1,10 +1,16 @@
{ fetchurl, stdenv, readline, zlib, libgpgerror, pth, libgcrypt, libassuan { fetchurl, stdenv, readline, zlib, libgpgerror, pth, libgcrypt, libassuan
, libksba, coreutils, libiconv, pcsclite , libksba, coreutils, libiconv, pcsclite
# Each of the dependencies below are optional. # Each of the dependencies below are optional.
# Gnupg can be built without them at the cost of reduced functionality. # 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 { stdenv.mkDerivation rec {
name = "gnupg-2.0.27"; name = "gnupg-2.0.27";
@ -27,9 +33,7 @@ stdenv.mkDerivation rec {
patch gl/stdint_.h < ${./clang.patch} patch gl/stdint_.h < ${./clang.patch}
''; '';
configureFlags = configureFlags = optional x11Support "--with-pinentry-pgm=${pinentry}/bin/pinentry";
if pinentry != null then "--with-pinentry-pgm=${pinentry}/bin/pinentry"
else "";
checkPhase="GNUPGHOME=`pwd` ./agent/gpg-agent --daemon make check"; checkPhase="GNUPGHOME=`pwd` ./agent/gpg-agent --daemon make check";

View file

@ -1,10 +1,17 @@
{ fetchurl, stdenv, pkgconfig, libgcrypt, libassuan, libksba, npth { fetchurl, stdenv, pkgconfig, libgcrypt, libassuan, libksba, npth
, readline ? null, libusb ? null, gnutls ? null, adns ? null, openldap ? null , autoreconfHook, gettext, texinfo, pcsclite
, zlib ? null, bzip2 ? null, pinentry ? null, autoreconfHook, gettext, texinfo
, pcsclite # Each of the dependencies below are optional.
# Gnupg can be built without them at the cost of reduced functionality.
, pinentry ? null, x11Support ? true
, adns ? null, gnutls ? null, libusb ? null, openldap ? null
, readline ? null, zlib ? null, bzip2 ? null
}: }:
with stdenv.lib; with stdenv.lib;
assert x11Support -> pinentry != null;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "gnupg-2.1.2"; name = "gnupg-2.1.2";
@ -21,12 +28,11 @@ stdenv.mkDerivation rec {
buildInputs = [ buildInputs = [
pkgconfig libgcrypt libassuan libksba npth pkgconfig libgcrypt libassuan libksba npth
readline libusb gnutls adns openldap zlib bzip2
autoreconfHook gettext texinfo autoreconfHook gettext texinfo
readline libusb gnutls adns openldap zlib bzip2
]; ];
configureFlags = configureFlags = optional x11Support "--with-pinentry-pgm=${pinentry}/bin/pinentry";
optional (pinentry != null) "--with-pinentry-pgm=${pinentry}/bin/pinentry";
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = http://gnupg.org; homepage = http://gnupg.org;