diff --git a/pkgs/applications/networking/mailreaders/thunderbird/wrapper.nix b/pkgs/applications/networking/mailreaders/thunderbird/wrapper.nix index 44f43d6ecca3..79fa939872f8 100644 --- a/pkgs/applications/networking/mailreaders/thunderbird/wrapper.nix +++ b/pkgs/applications/networking/mailreaders/thunderbird/wrapper.nix @@ -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 ]}" ''; })