Merge pull request #189819 from amjoseph-nixpkgs/pr/unbreak/gnupg/tpm

This commit is contained in:
Sandro 2022-10-03 21:36:44 +02:00 committed by GitHub
commit 9db45eb11c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,8 +2,9 @@
, libgpg-error, libiconv, npth, gettext, texinfo, buildPackages , libgpg-error, libiconv, npth, gettext, texinfo, buildPackages
, guiSupport ? stdenv.isDarwin, enableMinimal ? false , guiSupport ? stdenv.isDarwin, enableMinimal ? false
, adns, bzip2, gnutls, libusb1, openldap , adns, bzip2, gnutls, libusb1, openldap
, tpm2-tss, pinentry, readline, sqlite, zlib , pinentry, readline, sqlite, zlib
, withPcsc ? !enableMinimal, pcsclite , withPcsc ? !enableMinimal, pcsclite
, withTpm2Tss ? !stdenv.isDarwin && !enableMinimal, tpm2-tss
}: }:
assert guiSupport -> enableMinimal == false; assert guiSupport -> enableMinimal == false;
@ -23,7 +24,7 @@ stdenv.mkDerivation rec {
libgcrypt libassuan libksba libiconv npth gettext libgcrypt libassuan libksba libiconv npth gettext
] ++ lib.optionals (!enableMinimal) ([ ] ++ lib.optionals (!enableMinimal) ([
readline libusb1 gnutls adns openldap zlib bzip2 sqlite readline libusb1 gnutls adns openldap zlib bzip2 sqlite
] ++ lib.optional (!stdenv.isDarwin) tpm2-tss); ] ++ lib.optional withTpm2Tss tpm2-tss);
patches = [ patches = [
./fix-libusb-include-path.patch ./fix-libusb-include-path.patch
@ -56,7 +57,7 @@ stdenv.mkDerivation rec {
"--with-ksba-prefix=${libksba.dev}" "--with-ksba-prefix=${libksba.dev}"
"--with-npth-prefix=${npth}" "--with-npth-prefix=${npth}"
] ++ lib.optional guiSupport "--with-pinentry-pgm=${pinentry}/${pinentryBinaryPath}" ] ++ lib.optional guiSupport "--with-pinentry-pgm=${pinentry}/${pinentryBinaryPath}"
++ lib.optional ((!stdenv.isDarwin) && (!enableMinimal)) "--with-tss=intel"; ++ lib.optional withTpm2Tss "--with-tss=intel";
postInstall = if enableMinimal postInstall = if enableMinimal
then '' then ''
rm -r $out/{libexec,sbin,share} rm -r $out/{libexec,sbin,share}