git.iko.soy/typeable/nixpkgs
on master help sign in
thunderbird: Add gpg/gpgme dependencies. Fixes #98765.

This enables to configure Thunderbird to use gnupg directly, which is the official upstream recommendation when using GPG with smartcards, which are not yet supported by Thunderbird's native GPG support.

commit2767936180704f4fa7aab886594703985698c2cc authorNiklas Hambüchen <mail@nh2.me> dateThu 17 Dec 2020, 23:29 (6 years ago) parentfe8f558
1 file changed+13
pkgs/applications/networking/mailreaders/thunderbird/default.nix+13
pkgs/applications/networking/mailreaders/thunderbird/default.nix+13
@@ -15,6 +15,8 @@
1515, glib
1616, gnugrep
1717, gnused
18+, gnupg
19+, gpgme
1820, icu
1921, jemalloc
2022, lib
@@ -288,6 +290,15 @@ stdenv.mkDerivation rec {
288290 rm -rf $out/include $out/lib/thunderbird-devel-* $out/share/idl
289291 '';
290292
293+ # Note on GPG support:
294+ # Thunderbird's native GPG support does not yet support smartcards.
295+ # The official upstream recommendation is to configure fall back to gnupg
296+ # using the Thunderbird config `mail.openpgp.allow_external_gnupg`
297+ # and GPG keys set up; instructions with pictures at:
298+ # https://anweshadas.in/how-to-use-yubikey-or-any-gpg-smartcard-in-thunderbird-78/
299+ # For that to work out of the box, it requires `gnupg` on PATH and
300+ # `gpgme` in `LD_LIBRARY_PATH`; we do this below.
301+
291302 preFixup = ''
292303 # Needed to find Mozilla runtime
293304 gappsWrapperArgs+=(
@@ -297,6 +308,8 @@ stdenv.mkDerivation rec {
297308 --set SNAP_NAME "thunderbird"
298309 --set MOZ_LEGACY_PROFILES 1
299310 --set MOZ_ALLOW_DOWNGRADE 1
311+ --prefix PATH : "${lib.getBin gnupg}/bin"
312+ --prefix LD_LIBRARY_PATH : "${lib.getLib gpgme}/lib"
300313 )
301314 '';
302315