2017-04-04 13:02:14 +00:00
|
|
|
{ stdenv, fetchurl, config, makeWrapper
|
2014-04-12 15:29:14 +00:00
|
|
|
, gconf
|
|
|
|
, alsaLib
|
2018-02-25 02:23:58 +00:00
|
|
|
, at-spi2-atk
|
2014-04-12 15:29:14 +00:00
|
|
|
, atk
|
|
|
|
, cairo
|
|
|
|
, cups
|
|
|
|
, curl
|
2018-02-25 02:23:58 +00:00
|
|
|
, dbus-glib
|
2018-07-17 20:11:16 +00:00
|
|
|
, dbus
|
2014-04-12 15:29:14 +00:00
|
|
|
, fontconfig
|
|
|
|
, freetype
|
|
|
|
, gdk_pixbuf
|
|
|
|
, glib
|
|
|
|
, glibc
|
2017-02-26 20:25:29 +00:00
|
|
|
, gst-plugins-base
|
2014-04-12 15:29:14 +00:00
|
|
|
, gstreamer
|
2016-09-11 21:24:51 +00:00
|
|
|
, gtk2
|
2017-04-04 13:02:14 +00:00
|
|
|
, gtk3
|
2014-04-12 15:29:14 +00:00
|
|
|
, kerberos
|
|
|
|
, libX11
|
|
|
|
, libXScrnSaver
|
2015-06-16 13:20:25 +00:00
|
|
|
, libXcomposite
|
|
|
|
, libXdamage
|
2014-04-12 15:29:14 +00:00
|
|
|
, libXext
|
2015-06-16 13:20:25 +00:00
|
|
|
, libXfixes
|
2014-04-12 15:29:14 +00:00
|
|
|
, libXinerama
|
|
|
|
, libXrender
|
|
|
|
, libXt
|
2018-02-25 02:23:58 +00:00
|
|
|
, libcanberra-gtk2
|
2014-04-12 15:29:14 +00:00
|
|
|
, libgnome
|
|
|
|
, libgnomeui
|
2019-02-13 21:47:50 +00:00
|
|
|
, gnome3
|
2018-02-24 13:12:44 +00:00
|
|
|
, libGLU_combined
|
2014-04-12 15:29:14 +00:00
|
|
|
, nspr
|
|
|
|
, nss
|
|
|
|
, pango
|
2016-12-16 15:34:25 +00:00
|
|
|
, writeScript
|
|
|
|
, xidel
|
|
|
|
, coreutils
|
|
|
|
, gnused
|
|
|
|
, gnugrep
|
2017-03-09 12:40:53 +00:00
|
|
|
, gnupg
|
2019-02-28 06:59:38 +00:00
|
|
|
, runtimeShell
|
2014-04-12 15:29:14 +00:00
|
|
|
}:
|
|
|
|
|
2014-10-15 13:46:42 +00:00
|
|
|
# imports `version` and `sources`
|
2017-06-15 18:28:02 +00:00
|
|
|
with (import ./release_sources.nix);
|
2014-04-12 15:29:14 +00:00
|
|
|
|
2014-10-15 13:46:42 +00:00
|
|
|
let
|
2018-08-20 19:11:29 +00:00
|
|
|
arch = if stdenv.hostPlatform.system == "i686-linux"
|
2014-04-12 15:29:14 +00:00
|
|
|
then "linux-i686"
|
|
|
|
else "linux-x86_64";
|
|
|
|
|
|
|
|
isPrefixOf = prefix: string:
|
|
|
|
builtins.substring 0 (builtins.stringLength prefix) string == prefix;
|
|
|
|
|
|
|
|
sourceMatches = locale: source:
|
|
|
|
(isPrefixOf source.locale locale) && source.arch == arch;
|
|
|
|
|
|
|
|
systemLocale = config.i18n.defaultLocale or "en-US";
|
|
|
|
|
|
|
|
defaultSource = stdenv.lib.findFirst (sourceMatches "en-US") {} sources;
|
|
|
|
|
|
|
|
source = stdenv.lib.findFirst (sourceMatches systemLocale) defaultSource sources;
|
|
|
|
|
2016-12-16 15:34:25 +00:00
|
|
|
name = "thunderbird-bin-${version}";
|
2014-04-12 15:29:14 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2016-12-16 15:34:25 +00:00
|
|
|
inherit name;
|
2014-04-12 15:29:14 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-06-28 18:43:35 +00:00
|
|
|
url = "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/${version}/${source.arch}/${source.locale}/thunderbird-${version}.tar.bz2";
|
2016-05-11 18:39:03 +00:00
|
|
|
inherit (source) sha512;
|
2014-04-12 15:29:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
phases = "unpackPhase installPhase";
|
|
|
|
|
|
|
|
libPath = stdenv.lib.makeLibraryPath
|
2015-01-15 04:25:26 +00:00
|
|
|
[ stdenv.cc.cc
|
2014-04-12 15:29:14 +00:00
|
|
|
gconf
|
|
|
|
alsaLib
|
2018-02-25 02:23:58 +00:00
|
|
|
at-spi2-atk
|
2014-04-12 15:29:14 +00:00
|
|
|
atk
|
|
|
|
cairo
|
|
|
|
cups
|
|
|
|
curl
|
2018-02-25 02:23:58 +00:00
|
|
|
dbus-glib
|
2018-07-17 20:11:16 +00:00
|
|
|
dbus
|
2014-04-12 15:29:14 +00:00
|
|
|
fontconfig
|
|
|
|
freetype
|
|
|
|
gdk_pixbuf
|
|
|
|
glib
|
|
|
|
glibc
|
2017-02-26 20:25:29 +00:00
|
|
|
gst-plugins-base
|
2014-04-12 15:29:14 +00:00
|
|
|
gstreamer
|
2016-09-11 21:24:51 +00:00
|
|
|
gtk2
|
2017-04-04 13:02:14 +00:00
|
|
|
gtk3
|
2014-04-12 15:29:14 +00:00
|
|
|
kerberos
|
|
|
|
libX11
|
|
|
|
libXScrnSaver
|
2015-06-16 13:20:25 +00:00
|
|
|
libXcomposite
|
|
|
|
libXdamage
|
2014-04-12 15:29:14 +00:00
|
|
|
libXext
|
2015-06-16 13:20:25 +00:00
|
|
|
libXfixes
|
2014-04-12 15:29:14 +00:00
|
|
|
libXinerama
|
|
|
|
libXrender
|
|
|
|
libXt
|
2018-02-25 02:23:58 +00:00
|
|
|
libcanberra-gtk2
|
2014-04-12 15:29:14 +00:00
|
|
|
libgnome
|
|
|
|
libgnomeui
|
2018-02-24 13:12:44 +00:00
|
|
|
libGLU_combined
|
2014-04-12 15:29:14 +00:00
|
|
|
nspr
|
|
|
|
nss
|
|
|
|
pango
|
2016-04-14 15:14:28 +00:00
|
|
|
] + ":" + stdenv.lib.makeSearchPathOutput "lib" "lib64" [
|
2015-01-15 04:25:26 +00:00
|
|
|
stdenv.cc.cc
|
2014-04-12 15:29:14 +00:00
|
|
|
];
|
|
|
|
|
2019-02-13 21:47:50 +00:00
|
|
|
buildInputs = [ gtk3 gnome3.adwaita-icon-theme ];
|
2017-04-04 13:02:14 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2014-04-12 15:29:14 +00:00
|
|
|
installPhase =
|
|
|
|
''
|
|
|
|
mkdir -p "$prefix/usr/lib/thunderbird-bin-${version}"
|
|
|
|
cp -r * "$prefix/usr/lib/thunderbird-bin-${version}"
|
|
|
|
|
|
|
|
mkdir -p "$out/bin"
|
|
|
|
ln -s "$prefix/usr/lib/thunderbird-bin-${version}/thunderbird" "$out/bin/"
|
|
|
|
|
|
|
|
for executable in \
|
2015-06-16 13:20:25 +00:00
|
|
|
thunderbird crashreporter thunderbird-bin plugin-container updater
|
2014-04-12 15:29:14 +00:00
|
|
|
do
|
2014-12-17 18:11:30 +00:00
|
|
|
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
2014-04-12 15:29:14 +00:00
|
|
|
"$out/usr/lib/thunderbird-bin-${version}/$executable"
|
|
|
|
done
|
|
|
|
|
2015-06-16 13:20:25 +00:00
|
|
|
find . -executable -type f -exec \
|
2014-04-12 15:29:14 +00:00
|
|
|
patchelf --set-rpath "$libPath" \
|
2015-06-16 13:20:25 +00:00
|
|
|
"$out/usr/lib/thunderbird-bin-${version}/{}" \;
|
2014-04-12 15:29:14 +00:00
|
|
|
|
|
|
|
# Create a desktop item.
|
|
|
|
mkdir -p $out/share/applications
|
|
|
|
cat > $out/share/applications/thunderbird.desktop <<EOF
|
|
|
|
[Desktop Entry]
|
|
|
|
Type=Application
|
|
|
|
Exec=$out/bin/thunderbird
|
2015-08-03 17:46:11 +00:00
|
|
|
Icon=$out/usr/lib/thunderbird-bin-${version}/chrome/icons/default/default256.png
|
2014-04-12 15:29:14 +00:00
|
|
|
Name=Thunderbird
|
|
|
|
GenericName=Mail Reader
|
|
|
|
Categories=Application;Network;
|
|
|
|
EOF
|
2017-04-04 13:02:14 +00:00
|
|
|
|
|
|
|
wrapProgram "$out/bin/thunderbird" \
|
|
|
|
--argv0 "$out/bin/.thunderbird-wrapped" \
|
|
|
|
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:" \
|
|
|
|
--suffix XDG_DATA_DIRS : "$XDG_ICON_DIRS"
|
2014-04-12 15:29:14 +00:00
|
|
|
'';
|
|
|
|
|
2016-12-16 15:34:25 +00:00
|
|
|
passthru.updateScript = import ./../../browsers/firefox-bin/update.nix {
|
2019-02-28 06:59:38 +00:00
|
|
|
inherit name stdenv writeScript xidel coreutils gnused gnugrep curl gnupg runtimeShell;
|
2016-12-16 15:34:25 +00:00
|
|
|
baseName = "thunderbird";
|
2017-06-15 18:28:02 +00:00
|
|
|
channel = "release";
|
2016-12-16 15:34:25 +00:00
|
|
|
basePath = "pkgs/applications/networking/mailreaders/thunderbird-bin";
|
|
|
|
baseUrl = "http://archive.mozilla.org/pub/thunderbird/releases/";
|
|
|
|
};
|
2014-04-12 15:29:14 +00:00
|
|
|
meta = with stdenv.lib; {
|
2014-11-25 15:28:55 +00:00
|
|
|
description = "Mozilla Thunderbird, a full-featured email client (binary package)";
|
2014-04-12 15:29:14 +00:00
|
|
|
homepage = http://www.mozilla.org/thunderbird/;
|
|
|
|
license = {
|
2014-11-25 15:28:55 +00:00
|
|
|
free = false;
|
2014-04-12 15:29:14 +00:00
|
|
|
url = http://www.mozilla.org/en-US/foundation/trademarks/policy/;
|
|
|
|
};
|
2014-09-21 18:13:12 +00:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ fuuzetsu ];
|
2014-04-12 15:29:14 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|