forked from mirrors/nixpkgs
Merge pull request #107122 from nh2/thunderbird-gpgme
thunderbird: Add gpg/gpgme dependencies to fix smartcard usage
This commit is contained in:
commit
db9a28338f
|
@ -1,22 +1,31 @@
|
|||
{ stdenv, fetchurl, config, makeWrapper
|
||||
{ stdenv, lib, fetchurl, config, makeWrapper
|
||||
, alsaLib
|
||||
, at-spi2-atk
|
||||
, atk
|
||||
, cairo
|
||||
, coreutils
|
||||
, cups
|
||||
, curl
|
||||
, dbus-glib
|
||||
, dbus
|
||||
, dbus-glib
|
||||
, fontconfig
|
||||
, freetype
|
||||
, gdk-pixbuf
|
||||
, glib
|
||||
, glibc
|
||||
, gnome3
|
||||
, gnugrep
|
||||
, gnupg
|
||||
, gnused
|
||||
, gpgme
|
||||
, gtk2
|
||||
, gtk3
|
||||
, kerberos
|
||||
, libcanberra
|
||||
, libGL
|
||||
, libGLU
|
||||
, libX11
|
||||
, libXScrnSaver
|
||||
, libxcb
|
||||
, libXcomposite
|
||||
, libXcursor
|
||||
, libXdamage
|
||||
|
@ -25,21 +34,14 @@
|
|||
, libXi
|
||||
, libXinerama
|
||||
, libXrender
|
||||
, libXScrnSaver
|
||||
, libXt
|
||||
, libxcb
|
||||
, libcanberra
|
||||
, gnome3
|
||||
, libGLU, libGL
|
||||
, nspr
|
||||
, nss
|
||||
, pango
|
||||
, runtimeShell
|
||||
, writeScript
|
||||
, xidel
|
||||
, coreutils
|
||||
, gnused
|
||||
, gnugrep
|
||||
, gnupg
|
||||
, runtimeShell
|
||||
}:
|
||||
|
||||
# imports `version` and `sources`
|
||||
|
@ -58,9 +60,9 @@ let
|
|||
|
||||
systemLocale = config.i18n.defaultLocale or "en-US";
|
||||
|
||||
defaultSource = stdenv.lib.findFirst (sourceMatches "en-US") {} sources;
|
||||
defaultSource = lib.findFirst (sourceMatches "en-US") {} sources;
|
||||
|
||||
source = stdenv.lib.findFirst (sourceMatches systemLocale) defaultSource sources;
|
||||
source = lib.findFirst (sourceMatches systemLocale) defaultSource sources;
|
||||
|
||||
name = "thunderbird-bin-${version}";
|
||||
in
|
||||
|
@ -75,7 +77,7 @@ stdenv.mkDerivation {
|
|||
|
||||
phases = "unpackPhase installPhase";
|
||||
|
||||
libPath = stdenv.lib.makeLibraryPath
|
||||
libPath = lib.makeLibraryPath
|
||||
[ stdenv.cc.cc
|
||||
alsaLib
|
||||
at-spi2-atk
|
||||
|
@ -110,7 +112,7 @@ stdenv.mkDerivation {
|
|||
nspr
|
||||
nss
|
||||
pango
|
||||
] + ":" + stdenv.lib.makeSearchPathOutput "lib" "lib64" [
|
||||
] + ":" + lib.makeSearchPathOutput "lib" "lib64" [
|
||||
stdenv.cc.cc
|
||||
];
|
||||
|
||||
|
@ -118,6 +120,9 @@ stdenv.mkDerivation {
|
|||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
# See "Note on GPG support" in `../thunderbird/default.nix` for explanations
|
||||
# on adding `gnupg` and `gpgme` into PATH/LD_LIBRARY_PATH.
|
||||
|
||||
installPhase =
|
||||
''
|
||||
mkdir -p "$prefix/usr/lib/thunderbird-bin-${version}"
|
||||
|
@ -158,7 +163,9 @@ stdenv.mkDerivation {
|
|||
--suffix XDG_DATA_DIRS : "$XDG_ICON_DIRS" \
|
||||
--set SNAP_NAME "thunderbird" \
|
||||
--set MOZ_LEGACY_PROFILES 1 \
|
||||
--set MOZ_ALLOW_DOWNGRADE 1
|
||||
--set MOZ_ALLOW_DOWNGRADE 1 \
|
||||
--prefix PATH : "${lib.getBin gnupg}/bin" \
|
||||
--prefix LD_LIBRARY_PATH : "${lib.getLib gpgme}/lib"
|
||||
'';
|
||||
|
||||
passthru.updateScript = import ./../../browsers/firefox-bin/update.nix {
|
||||
|
@ -168,14 +175,14 @@ stdenv.mkDerivation {
|
|||
basePath = "pkgs/applications/networking/mailreaders/thunderbird-bin";
|
||||
baseUrl = "http://archive.mozilla.org/pub/thunderbird/releases/";
|
||||
};
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Mozilla Thunderbird, a full-featured email client (binary package)";
|
||||
homepage = "http://www.mozilla.org/thunderbird/";
|
||||
license = {
|
||||
free = false;
|
||||
url = "http://www.mozilla.org/en-US/foundation/trademarks/policy/";
|
||||
};
|
||||
maintainers = with stdenv.lib.maintainers; [ ];
|
||||
maintainers = with lib.maintainers; [ ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -14,13 +14,15 @@
|
|||
, freetype
|
||||
, glib
|
||||
, gnugrep
|
||||
, gnupg
|
||||
, gnused
|
||||
, gpgme
|
||||
, icu
|
||||
, jemalloc
|
||||
, lib
|
||||
, libevent
|
||||
, libGL
|
||||
, libGLU
|
||||
, libevent
|
||||
, libjpeg
|
||||
, libnotify
|
||||
, libpng
|
||||
|
@ -288,6 +290,15 @@ stdenv.mkDerivation rec {
|
|||
rm -rf $out/include $out/lib/thunderbird-devel-* $out/share/idl
|
||||
'';
|
||||
|
||||
# Note on GPG support:
|
||||
# Thunderbird's native GPG support does not yet support smartcards.
|
||||
# The official upstream recommendation is to configure fall back to gnupg
|
||||
# using the Thunderbird config `mail.openpgp.allow_external_gnupg`
|
||||
# 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.
|
||||
|
||||
preFixup = ''
|
||||
# Needed to find Mozilla runtime
|
||||
gappsWrapperArgs+=(
|
||||
|
@ -297,6 +308,8 @@ stdenv.mkDerivation rec {
|
|||
--set SNAP_NAME "thunderbird"
|
||||
--set MOZ_LEGACY_PROFILES 1
|
||||
--set MOZ_ALLOW_DOWNGRADE 1
|
||||
--prefix PATH : "${lib.getBin gnupg}/bin"
|
||||
--prefix LD_LIBRARY_PATH : "${lib.getLib gpgme}/lib"
|
||||
)
|
||||
'';
|
||||
|
||||
|
@ -325,7 +338,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
requiredSystemFeatures = [ "big-parallel" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A full-featured e-mail client";
|
||||
homepage = "https://www.thunderbird.net";
|
||||
maintainers = with maintainers; [
|
||||
|
|
Loading…
Reference in a new issue