diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2022-07-30 18:14:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-30 18:14:02 +0200 |
commit | 056ddc3d3e021f2fbe9fa2411a9be1033f1daeb3 (patch) | |
tree | 5b0ea562136eddac861e168839d6fc3f37ba355c /pkgs/tools/security/gnupg | |
parent | db8ac53f48fa099d38518b2d875176dd3d443969 (diff) | |
parent | ddeaf73584feae32e1643fcaaff98fb60860ee82 (diff) |
Merge pull request #183753 from SuperSandro2000/systemd-gnupg-null
Diffstat (limited to 'pkgs/tools/security/gnupg')
-rw-r--r-- | pkgs/tools/security/gnupg/23.nix | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/pkgs/tools/security/gnupg/23.nix b/pkgs/tools/security/gnupg/23.nix index b25cf9e28c168..b93e533e6fd82 100644 --- a/pkgs/tools/security/gnupg/23.nix +++ b/pkgs/tools/security/gnupg/23.nix @@ -1,17 +1,11 @@ { fetchurl, fetchpatch, lib, stdenv, pkg-config, libgcrypt, libassuan, libksba , libgpg-error, libiconv, npth, gettext, texinfo, buildPackages - -# Each of the dependencies below are optional. -# Gnupg can be built without them at the cost of reduced functionality. , guiSupport ? stdenv.isDarwin, enableMinimal ? false -, adns ? null, bzip2 ? null , gnutls ? null , libusb1 ? null , openldap ? null -, tpm2-tss ? null -, pcsclite ? null , pinentry ? null , readline ? null , sqlite ? null , zlib ? null +, adns, bzip2, gnutls, libusb1, openldap +, tpm2-tss, pcsclite, pinentry, readline, sqlite, zlib }: -with lib; - -assert guiSupport -> pinentry != null && enableMinimal == false; +assert guiSupport -> enableMinimal == false; stdenv.mkDerivation rec { pname = "gnupg"; @@ -26,8 +20,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config texinfo ]; buildInputs = [ libgcrypt libassuan libksba libiconv npth gettext + ] ++ lib.optionals (!enableMinimal) ([ readline libusb1 gnutls adns openldap zlib bzip2 sqlite - ] ++ optional (!stdenv.isDarwin) tpm2-tss ; + ] ++ lib.optional (!stdenv.isDarwin) tpm2-tss); patches = [ ./fix-libusb-include-path.patch @@ -40,7 +35,7 @@ stdenv.mkDerivation rec { ]; postPatch = '' sed -i 's,\(hkps\|https\)://keyserver.ubuntu.com,hkps://keys.openpgp.org,g' configure configure.ac doc/dirmngr.texi doc/gnupg.info-1 - '' + lib.optionalString (stdenv.isLinux && pcsclite != null) '' + '' + lib.optionalString (stdenv.isLinux && (!enableMinimal)) '' sed -i 's,"libpcsclite\.so[^"]*","${lib.getLib pcsclite}/lib/libpcsclite.so",g' scd/scdaemon.c ''; @@ -51,8 +46,8 @@ stdenv.mkDerivation rec { "--with-libassuan-prefix=${libassuan.dev}" "--with-ksba-prefix=${libksba.dev}" "--with-npth-prefix=${npth}" - ] ++ optional guiSupport "--with-pinentry-pgm=${pinentry}/${pinentryBinaryPath}" - ++ optional ( (!stdenv.isDarwin) && (tpm2-tss != null) ) "--with-tss=intel"; + ] ++ lib.optional guiSupport "--with-pinentry-pgm=${pinentry}/${pinentryBinaryPath}" + ++ lib.optional ((!stdenv.isDarwin) && (!enableMinimal)) "--with-tss=intel"; postInstall = if enableMinimal then '' rm -r $out/{libexec,sbin,share} |