gnupg: fix smartcards (yubikeys) on Darwin

Since version 2.3, GnuPG no longer falls back to other access methods if
its built-in CCID driver fails to access smartcards, including yubikeys.

The built-in CCID driver fails on macOS.

The upstream developers recommend disabling CCID support in this case:

    If it works and the distribution doesn't offer appropriate USB
    configuration, I think that it's good for the distribution to use
    --disable-ccid-driver for building GnuPG.

Cite: https://dev.gnupg.org/T5415
See also: https://dev.gnupg.org/T5409

Fixes #155629
This commit is contained in:
Dan Callahan 2022-11-15 12:35:20 +00:00
parent 8c8f38c136
commit 973c7b12ca
No known key found for this signature in database
GPG Key ID: 8D6DD713E9EBA7FD

View File

@ -57,7 +57,8 @@ stdenv.mkDerivation rec {
"--with-ksba-prefix=${libksba.dev}"
"--with-npth-prefix=${npth}"
] ++ lib.optional guiSupport "--with-pinentry-pgm=${pinentry}/${pinentryBinaryPath}"
++ lib.optional withTpm2Tss "--with-tss=intel";
++ lib.optional withTpm2Tss "--with-tss=intel"
++ lib.optional stdenv.isDarwin "--disable-ccid-driver";
postInstall = if enableMinimal
then ''
rm -r $out/{libexec,sbin,share}