2014-07-22 20:18:24 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig, m4, gtk, pango, perl, python, zip, libIDL
|
|
|
|
, libjpeg, libpng, zlib, dbus, dbus_glib, bzip2, xlibs
|
|
|
|
, freetype, fontconfig, file, alsaLib, nspr, nss, libnotify
|
|
|
|
, yasm, mesa, sqlite, unzip, makeWrapper, pysqlite
|
|
|
|
, hunspell, libevent, libstartup_notification, libvpx
|
|
|
|
, cairo, gstreamer, gst_plugins_base, icu
|
|
|
|
, debugBuild ? false
|
2012-03-21 01:26:21 +00:00
|
|
|
, # If you want the resulting program to call itself "Thunderbird"
|
|
|
|
# instead of "Shredder", enable this option. However, those
|
|
|
|
# binaries may not be distributed without permission from the
|
|
|
|
# Mozilla Foundation, see
|
|
|
|
# http://www.mozilla.org/foundation/trademarks/.
|
|
|
|
enableOfficialBranding ? false
|
|
|
|
}:
|
|
|
|
|
2014-11-04 14:18:24 +00:00
|
|
|
let version = "31.2.0"; in
|
2014-07-22 20:18:24 +00:00
|
|
|
let verName = "${version}"; in
|
2012-03-21 01:26:21 +00:00
|
|
|
|
2014-07-22 20:18:24 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2014-06-16 03:24:24 +00:00
|
|
|
name = "thunderbird-${verName}";
|
2012-03-21 01:26:21 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2014-06-16 03:24:24 +00:00
|
|
|
url = "ftp://ftp.mozilla.org/pub/thunderbird/releases/${verName}/source/thunderbird-${verName}.source.tar.bz2";
|
2014-11-04 14:18:24 +00:00
|
|
|
sha1 = "87dff89388bd7ec51876e1bdbd82bc3fe60006b6";
|
2012-03-21 01:26:21 +00:00
|
|
|
};
|
|
|
|
|
2014-07-22 20:18:24 +00:00
|
|
|
buildInputs = # from firefox30Pkgs.xulrunner, but without gstreamer and libvpx
|
|
|
|
[ pkgconfig libpng gtk perl zip libIDL libjpeg zlib bzip2
|
|
|
|
python dbus dbus_glib pango freetype fontconfig xlibs.libXi
|
|
|
|
xlibs.libX11 xlibs.libXrender xlibs.libXft xlibs.libXt file
|
|
|
|
alsaLib nspr nss libnotify xlibs.pixman yasm mesa
|
|
|
|
xlibs.libXScrnSaver xlibs.scrnsaverproto pysqlite
|
|
|
|
xlibs.libXext xlibs.xextproto sqlite unzip makeWrapper
|
|
|
|
hunspell libevent libstartup_notification cairo icu
|
|
|
|
] ++ [ m4 ];
|
2012-03-21 01:26:21 +00:00
|
|
|
|
2014-07-22 20:18:24 +00:00
|
|
|
configureFlags = [ "--enable-application=mail" ]
|
|
|
|
# from firefox30Pkgs.commonConfigureFlags, but without gstreamer and libvpx
|
|
|
|
++ [
|
2012-03-21 01:26:21 +00:00
|
|
|
"--with-system-jpeg"
|
|
|
|
"--with-system-zlib"
|
|
|
|
"--with-system-bz2"
|
|
|
|
"--with-system-nspr"
|
2012-10-05 20:15:56 +00:00
|
|
|
"--with-system-nss"
|
2014-07-22 20:18:24 +00:00
|
|
|
"--with-system-libevent"
|
|
|
|
#"--with-system-libvpx"
|
|
|
|
"--with-system-png"
|
|
|
|
"--with-system-icu"
|
|
|
|
"--enable-system-ffi"
|
|
|
|
"--enable-system-hunspell"
|
|
|
|
"--enable-system-pixman"
|
|
|
|
"--enable-system-sqlite"
|
|
|
|
"--enable-system-cairo"
|
|
|
|
"--disable-gstreamer"
|
|
|
|
"--enable-startup-notification"
|
|
|
|
# "--enable-content-sandbox" # available since 26.0, but not much info available
|
|
|
|
# "--enable-content-sandbox-reporter" # keeping disabled for now
|
2012-03-21 01:26:21 +00:00
|
|
|
"--disable-crashreporter"
|
|
|
|
"--disable-tests"
|
2014-07-22 20:18:24 +00:00
|
|
|
"--disable-necko-wifi" # maybe we want to enable this at some point
|
|
|
|
"--disable-installer"
|
|
|
|
"--disable-updater"
|
|
|
|
"--disable-pulseaudio"
|
|
|
|
] ++ (if debugBuild then [ "--enable-debug" "--enable-profiling"]
|
|
|
|
else [ "--disable-debug" "--enable-release"
|
|
|
|
"--enable-optimize" "--enable-strip" ])
|
|
|
|
++ [
|
|
|
|
"--disable-javaxpcom"
|
|
|
|
"--enable-stdcxx-compat" # Avoid dependency on libstdc++ 4.7
|
2012-03-21 01:26:21 +00:00
|
|
|
]
|
|
|
|
++ stdenv.lib.optional enableOfficialBranding "--enable-official-branding";
|
|
|
|
|
2014-07-22 20:18:24 +00:00
|
|
|
configurePhase = ''
|
|
|
|
patchShebangs .
|
|
|
|
|
|
|
|
echo '${stdenv.lib.concatMapStrings (s : "ac_add_options ${s}\n") configureFlags}' > .mozconfig
|
|
|
|
echo "ac_add_options --prefix='$out'" >> .mozconfig
|
|
|
|
echo "mk_add_options MOZ_MAKE_FLAGS='-j$NIX_BUILD_CORES'" >> .mozconfig
|
|
|
|
|
|
|
|
make ${makeFlags} configure
|
|
|
|
'';
|
2012-03-21 01:26:21 +00:00
|
|
|
|
2014-07-22 20:18:24 +00:00
|
|
|
makeFlags = "-f client.mk";
|
|
|
|
buildFlags = "build";
|
2012-03-21 01:26:21 +00:00
|
|
|
|
|
|
|
postInstall =
|
|
|
|
''
|
2012-10-05 20:15:56 +00:00
|
|
|
rm -rf $out/include $out/lib/thunderbird-devel-* $out/share/idl
|
2012-03-21 01:26:21 +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
|
|
|
|
Icon=$out/lib/thunderbird-${version}/chrome/icons/default/default256.png
|
|
|
|
Name=Thunderbird
|
|
|
|
GenericName=Mail Reader
|
|
|
|
Categories=Application;Network;
|
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2014-07-22 20:18:24 +00:00
|
|
|
description = "A full-featured e-mail client";
|
2012-03-21 01:26:21 +00:00
|
|
|
homepage = http://www.mozilla.org/thunderbird/;
|
|
|
|
license =
|
|
|
|
# Official branding implies thunderbird name and logo cannot be reuse,
|
|
|
|
# see http://www.mozilla.org/foundation/licensing.html
|
|
|
|
if enableOfficialBranding then licenses.proprietary else licenses.mpl11;
|
2013-05-17 12:55:06 +00:00
|
|
|
maintainers = [ maintainers.pierron maintainers.eelco ];
|
2012-10-05 20:15:56 +00:00
|
|
|
platforms = platforms.linux;
|
2012-03-21 01:26:21 +00:00
|
|
|
};
|
|
|
|
}
|