anchor.diff:    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
  
positive.code:     "--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";
    postInstall = if enableMinimal
    then ''
      rm -r $out/{libexec,sbin,share}
  
negative.code:   ];
    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 && (!enableMinimal)) ''
      sed -i 's,"libpcsclite\.so[^"]*","${lib.getLib pcsclite}/lib/libpcsclite.so",g' scd/scdaemon.c
    '';
  
  