nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 wrapFirefox,
4 gpgme,
5 gnupg,
6}:
7
8browser: args:
9
10(wrapFirefox browser (
11 {
12 libName = "thunderbird";
13 }
14 // args
15))
16
17.overrideAttrs
18 (old: {
19 # Thunderbird's native GPG support does not yet support smartcards.
20 # The official upstream recommendation is to configure fall back to gnupg
21 # using the Thunderbird config `mail.openpgp.allow_external_gnupg`
22 # and GPG keys set up; instructions with pictures at:
23 # https://anweshadas.in/how-to-use-yubikey-or-any-gpg-smartcard-in-thunderbird-78/
24 # For that to work out of the box, it requires `gnupg` on PATH and
25 # `gpgme` in `LD_LIBRARY_PATH`; we do this below.
26 buildCommand = old.buildCommand + ''
27 wrapProgram "$executablePath" \
28 --prefix LD_LIBRARY_PATH ':' "${lib.makeLibraryPath [ gpgme ]}" \
29 --prefix PATH ':' "${lib.makeBinPath [ gnupg ]}"
30 '';
31 })