From 99893c8aeceb2caa22adb2d717e0b0b2e1817663 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Mon, 27 Oct 2008 10:26:07 +0000 Subject: [PATCH] Improved granularity of the GnuPG 2.x expression. Use ${NIXPKGS_CONFIG} to enable or disable optional support for various libraries: gnupg = { ldap = true; // needs openldap bzip2 = true; // needs libbzip2 usb = true; // needs libusb curl = true; // needs curl }; Per default, all options are enabled (which is what the expression used to do prior to this patch). Furthermore, there is the legacy option gnupg = { idea = false; }; for GnuPG version 1.x, which is disabled by default. GnuPG 2 ignores this option. svn path=/nixpkgs/trunk/; revision=13126 --- pkgs/top-level/all-packages.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 06904ff2e4c3..475d81e80df1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -757,8 +757,11 @@ let }; gnupg2 = import ../tools/security/gnupg2 { - inherit fetchurl stdenv readline openldap bzip2 zlib libgpgerror pth - libgcrypt libassuan libksba libusb curl; + inherit fetchurl stdenv readline libgpgerror libgcrypt libassuan pth libksba zlib; + openldap = if getPkgConfig "gnupg" "ldap" true then openldap else null; + bzip2 = if getPkgConfig "gnupg" "bzip2" true then bzip2 else null; + libusb = if getPkgConfig "gnupg" "usb" true then libusb else null; + curl = if getPkgConfig "gnupg" "curl" true then curl else null; }; gnuplot = import ../tools/graphics/gnuplot {