Remove use* options and let the user set optional dependies to null if

they don't want to use them.
This commit is contained in:
Russell O'Connor 2014-09-16 18:24:33 -04:00
parent ae8629a0d4
commit 1274724c62

View File

@ -1,15 +1,8 @@
{ fetchurl, stdenv, readline, zlib, libgpgerror, pth, libgcrypt, libassuan { fetchurl, stdenv, readline, zlib, libgpgerror, pth, libgcrypt, libassuan
, libksba, coreutils, libiconvOrEmpty , libksba, coreutils, libiconvOrEmpty
, pinentry , pinentry ? null, openldap ? null, bzip2 ? null, libusb ? null, curl ? null
, useLdap ? true, openldap ? null, useBzip2 ? true, bzip2 ? null
, useUsb ? true, libusb ? null, useCurl ? true, curl ? null
}: }:
assert useLdap -> (openldap != null);
assert useBzip2 -> (bzip2 != null);
assert useUsb -> (libusb != null);
assert useCurl -> (curl != null);
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "gnupg-2.0.26"; name = "gnupg-2.0.26";
@ -19,12 +12,9 @@ stdenv.mkDerivation rec {
}; };
buildInputs buildInputs
= [ readline zlib libgpgerror libgcrypt libassuan libksba pth ] = [ readline zlib libgpgerror libgcrypt libassuan libksba pth
++ libiconvOrEmpty openldap bzip2 libusb curl ]
++ stdenv.lib.optional useLdap openldap ++ libiconvOrEmpty;
++ stdenv.lib.optional useBzip2 bzip2
++ stdenv.lib.optional useUsb libusb
++ stdenv.lib.optional useCurl curl;
patchPhase = '' patchPhase = ''
find tests -type f | xargs sed -e 's@/bin/pwd@${coreutils}&@g' -i find tests -type f | xargs sed -e 's@/bin/pwd@${coreutils}&@g' -i