2017-04-04 14:02:14 +01:00
|
|
|
{ stdenv, fetchurl, config, makeWrapper
|
2014-04-12 16:29:14 +01:00
|
|
|
, gconf
|
|
|
|
, alsaLib
|
2018-02-25 02:23:58 +00:00
|
|
|
, at-spi2-atk
|
2014-04-12 16:29:14 +01:00
|
|
|
, atk
|
|
|
|
, cairo
|
|
|
|
, cups
|
|
|
|
, curl
|
2018-02-25 02:23:58 +00:00
|
|
|
, dbus-glib
|
2018-07-17 21:11:16 +01:00
|
|
|
, dbus
|
2014-04-12 16:29:14 +01:00
|
|
|
, fontconfig
|
|
|
|
, freetype
|
|
|
|
, gdk_pixbuf
|
|
|
|
, glib
|
|
|
|
, glibc
|
2017-02-26 20:25:29 +00:00
|
|
|
, gst-plugins-base
|
2014-04-12 16:29:14 +01:00
|
|
|
, gstreamer
|
2016-09-11 22:24:51 +01:00
|
|
|
, gtk2
|
2017-04-04 14:02:14 +01:00
|
|
|
, gtk3
|
2014-04-12 16:29:14 +01:00
|
|
|
, kerberos
|
|
|
|
, libX11
|
|
|
|
, libXScrnSaver
|
2015-06-16 14:20:25 +01:00
|
|
|
, libXcomposite
|
|
|
|
, libXdamage
|
2014-04-12 16:29:14 +01:00
|
|
|
, libXext
|
2015-06-16 14:20:25 +01:00
|
|
|
, libXfixes
|
2014-04-12 16:29:14 +01:00
|
|
|
, libXinerama
|
|
|
|
, libXrender
|
|
|
|
, libXt
|
2018-02-25 02:23:58 +00:00
|
|
|
, libcanberra-gtk2
|
2014-04-12 16:29:14 +01:00
|
|
|
, libgnome
|
|
|
|
, libgnomeui
|
2017-04-04 14:02:14 +01:00
|
|
|
, defaultIconTheme
|
2018-02-24 13:12:44 +00:00
|
|
|
, libGLU_combined
|
2014-04-12 16:29:14 +01: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
|
2014-04-12 16:29:14 +01:00
|
|
|
}:
|
|
|
|
|
2014-10-15 14:46:42 +01:00
|
|
|
# imports `version` and `sources`
|
2017-06-15 19:28:02 +01:00
|
|
|
with (import ./release_sources.nix);
|
2014-04-12 16:29:14 +01:00
|
|
|
|
2014-10-15 14:46:42 +01:00
|
|
|
let
|
2018-08-20 20:11:29 +01:00
|
|
|
arch = if stdenv.hostPlatform.system == "i686-linux"
|
2014-04-12 16:29:14 +01: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 16:29:14 +01:00
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2016-12-16 15:34:25 +00:00
|
|
|
inherit name;
|
2014-04-12 16:29:14 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-06-28 19:43:35 +01:00
|
|
|
url = "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/${version}/${source.arch}/${source.locale}/thunderbird-${version}.tar.bz2";
|
2016-05-11 19:39:03 +01:00
|
|
|
inherit (source) sha512;
|
2014-04-12 16:29:14 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
phases = "unpackPhase installPhase";
|
|
|
|
|
|
|
|
libPath = stdenv.lib.makeLibraryPath
|
2015-01-15 04:25:26 +00:00
|
|
|
[ stdenv.cc.cc
|
2014-04-12 16:29:14 +01:00
|
|
|
gconf
|
|
|
|
alsaLib
|
2018-02-25 02:23:58 +00:00
|
|
|
at-spi2-atk
|
2014-04-12 16:29:14 +01:00
|
|
|
atk
|
|
|
|
cairo
|
|
|
|
cups
|
|
|
|
curl
|
2018-02-25 02:23:58 +00:00
|
|
|
dbus-glib
|
2018-07-17 21:11:16 +01:00
|
|
|
dbus
|
2014-04-12 16:29:14 +01:00
|
|
|
fontconfig
|
|
|
|
freetype
|
|
|
|
gdk_pixbuf
|
|
|
|
glib
|
|
|
|
glibc
|
2017-02-26 20:25:29 +00:00
|
|
|
gst-plugins-base
|
2014-04-12 16:29:14 +01:00
|
|
|
gstreamer
|
2016-09-11 22:24:51 +01:00
|
|
|
gtk2
|
2017-04-04 14:02:14 +01:00
|
|
|
gtk3
|
2014-04-12 16:29:14 +01:00
|
|
|
kerberos
|
|
|
|
libX11
|
|
|
|
libXScrnSaver
|
2015-06-16 14:20:25 +01:00
|
|
|
libXcomposite
|
|
|
|
libXdamage
|
2014-04-12 16:29:14 +01:00
|
|
|
libXext
|
2015-06-16 14:20:25 +01:00
|
|
|
libXfixes
|
2014-04-12 16:29:14 +01:00
|
|
|
libXinerama
|
|
|
|
libXrender
|
|
|
|
libXt
|
2018-02-25 02:23:58 +00:00
|
|
|
libcanberra-gtk2
|
2014-04-12 16:29:14 +01:00
|
|
|
libgnome
|
|
|
|
libgnomeui
|
2018-02-24 13:12:44 +00:00
|
|
|
libGLU_combined
|
2014-04-12 16:29:14 +01:00
|
|
|
nspr
|
|
|
|
nss
|
|
|
|
pango
|
2016-04-14 16:14:28 +01:00
|
|
|
] + ":" + stdenv.lib.makeSearchPathOutput "lib" "lib64" [
|
2015-01-15 04:25:26 +00:00
|
|
|
stdenv.cc.cc
|
2014-04-12 16:29:14 +01:00
|
|
|
];
|
|
|
|
|
2017-04-04 14:02:14 +01:00
|
|
|
buildInputs = [ gtk3 defaultIconTheme ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2014-04-12 16:29:14 +01: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 14:20:25 +01:00
|
|
|
thunderbird crashreporter thunderbird-bin plugin-container updater
|
2014-04-12 16:29:14 +01:00
|
|
|
do
|
2014-12-17 18:11:30 +00:00
|
|
|
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
2014-04-12 16:29:14 +01:00
|
|
|
"$out/usr/lib/thunderbird-bin-${version}/$executable"
|
|
|
|
done
|
|
|
|
|
2015-06-16 14:20:25 +01:00
|
|
|
find . -executable -type f -exec \
|
2014-04-12 16:29:14 +01:00
|
|
|
patchelf --set-rpath "$libPath" \
|
2015-06-16 14:20:25 +01:00
|
|
|
"$out/usr/lib/thunderbird-bin-${version}/{}" \;
|
2014-04-12 16:29:14 +01: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 18:46:11 +01:00
|
|
|
Icon=$out/usr/lib/thunderbird-bin-${version}/chrome/icons/default/default256.png
|
2014-04-12 16:29:14 +01:00
|
|
|
Name=Thunderbird
|
|
|
|
GenericName=Mail Reader
|
|
|
|
Categories=Application;Network;
|
|
|
|
EOF
|
2017-04-04 14:02:14 +01: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 16:29:14 +01:00
|
|
|
'';
|
|
|
|
|
2016-12-16 15:34:25 +00:00
|
|
|
passthru.updateScript = import ./../../browsers/firefox-bin/update.nix {
|
2018-12-13 11:12:52 +00:00
|
|
|
inherit name stdenv writeScript xidel coreutils gnused gnugrep curl gnupg;
|
2016-12-16 15:34:25 +00:00
|
|
|
baseName = "thunderbird";
|
2017-06-15 19:28:02 +01: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 16:29:14 +01: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 16:29:14 +01:00
|
|
|
homepage = http://www.mozilla.org/thunderbird/;
|
|
|
|
license = {
|
2014-11-25 15:28:55 +00:00
|
|
|
free = false;
|
2014-04-12 16:29:14 +01:00
|
|
|
url = http://www.mozilla.org/en-US/foundation/trademarks/policy/;
|
|
|
|
};
|
2014-09-21 19:13:12 +01:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ fuuzetsu ];
|
2014-04-12 16:29:14 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|