@@ -1,22 +1,31 @@
1−{ stdenv, fetchurl, config, makeWrapper
1+{ stdenv, lib, fetchurl, config, makeWrapper
22, alsaLib
33, at-spi2-atk
44, atk
55, cairo
6+, coreutils
67, cups
78, curl
8−, dbus-glib
99, dbus
10+, dbus-glib
1011, fontconfig
1112, freetype
1213, gdk-pixbuf
1314, glib
1415, glibc
16+, gnome3
17+, gnugrep
18+, gnupg
19+, gnused
20+, gpgme
1521, gtk2
1622, gtk3
1723, kerberos
24+, libcanberra
25+, libGL
26+, libGLU
1827, libX11
19−, libXScrnSaver
28+, libxcb
2029, libXcomposite
2130, libXcursor
2231, libXdamage
@@ -25,21 +34,14 @@
2534, libXi
2635, libXinerama
2736, libXrender
37+, libXScrnSaver
2838, libXt
29−, libxcb
30−, libcanberra
31−, gnome3
32−, libGLU, libGL
3339, nspr
3440, nss
3541, pango
42+, runtimeShell
3643, writeScript
3744, xidel
38−, coreutils
39−, gnused
40−, gnugrep
41−, gnupg
42−, runtimeShell
4345}:
4446
4547# imports `version` and `sources`
@@ -58,9 +60,9 @@ let
5860
5961 systemLocale = config.i18n.defaultLocale or "en-US";
6062
61− defaultSource = stdenv.lib.findFirst (sourceMatches "en-US") {} sources;
63+ defaultSource = lib.findFirst (sourceMatches "en-US") {} sources;
6264
63− source = stdenv.lib.findFirst (sourceMatches systemLocale) defaultSource sources;
65+ source = lib.findFirst (sourceMatches systemLocale) defaultSource sources;
6466
6567 name = "thunderbird-bin-${version}";
6668in
@@ -75,7 +77,7 @@ stdenv.mkDerivation {
7577
7678 phases = "unpackPhase installPhase";
7779
78− libPath = stdenv.lib.makeLibraryPath
80+ libPath = lib.makeLibraryPath
7981 [ stdenv.cc.cc
8082 alsaLib
8183 at-spi2-atk
@@ -110,7 +112,7 @@ stdenv.mkDerivation {
110112 nspr
111113 nss
112114 pango
113− ] + ":" + stdenv.lib.makeSearchPathOutput "lib" "lib64" [
115+ ] + ":" + lib.makeSearchPathOutput "lib" "lib64" [
114116 stdenv.cc.cc
115117 ];
116118
@@ -118,6 +120,9 @@ stdenv.mkDerivation {
118120
119121 nativeBuildInputs = [ makeWrapper ];
120122
123+ # See "Note on GPG support" in `../thunderbird/default.nix` for explanations
124+ # on adding `gnupg` and `gpgme` into PATH/LD_LIBRARY_PATH.
125+
121126 installPhase =
122127 ''
123128 mkdir -p "$prefix/usr/lib/thunderbird-bin-${version}"
@@ -158,7 +163,9 @@ stdenv.mkDerivation {
158163 --suffix XDG_DATA_DIRS : "$XDG_ICON_DIRS" \
159164 --set SNAP_NAME "thunderbird" \
160165 --set MOZ_LEGACY_PROFILES 1 \
161− --set MOZ_ALLOW_DOWNGRADE 1
166+ --set MOZ_ALLOW_DOWNGRADE 1 \
167+ --prefix PATH : "${lib.getBin gnupg}/bin" \
168+ --prefix LD_LIBRARY_PATH : "${lib.getLib gpgme}/lib"
162169 '';
163170
164171 passthru.updateScript = import ./../../browsers/firefox-bin/update.nix {
@@ -168,14 +175,14 @@ stdenv.mkDerivation {
168175 basePath = "pkgs/applications/networking/mailreaders/thunderbird-bin";
169176 baseUrl = "http://archive.mozilla.org/pub/thunderbird/releases/";
170177 };
171− meta = with stdenv.lib; {
178+ meta = with lib; {
172179 description = "Mozilla Thunderbird, a full-featured email client (binary package)";
173180 homepage = "http://www.mozilla.org/thunderbird/";
174181 license = {
175182 free = false;
176183 url = "http://www.mozilla.org/en-US/foundation/trademarks/policy/";
177184 };
178− maintainers = with stdenv.lib.maintainers; [ ];
185+ maintainers = with lib.maintainers; [ ];
179186 platforms = platforms.linux;
180187 };
181188}