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