thunderbird: fix gnupg integration on darwin

This commit is contained in:
Gavin John
2026-12-02 09:23:15 -05:00
parent 85333db1a7
commit af4e2689ab

View File

@@ -1,6 +1,7 @@
# nixpkgs-update: no auto update
{
lib,
stdenv,
wrapFirefox,
gpgme,
gnupg,
@@ -26,10 +27,12 @@ browser: args:
# and GPG keys set up; instructions with pictures at:
# https://anweshadas.in/how-to-use-yubikey-or-any-gpg-smartcard-in-thunderbird-78/
# For that to work out of the box, it requires `gnupg` on PATH and
# `gpgme` in `LD_LIBRARY_PATH`; we do this below.
# `gpgme` in the platform dynamic library search path.
buildCommand = old.buildCommand + ''
wrapProgram "$executablePath" \
--prefix LD_LIBRARY_PATH ':' "${lib.makeLibraryPath [ gpgme ]}" \
--prefix ${
if stdenv.hostPlatform.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH"
} ':' "${lib.makeLibraryPath [ gpgme ]}" \
--prefix PATH ':' "${lib.makeBinPath [ gnupg ]}"
'';
})