2010-01-02 14:21:50 +01:00
|
|
|
{ stdenv, fetchurl, pkgconfig, gtk, perl, python, zip, libIDL
|
|
|
|
, dbus_glib, bzip2, alsaLib, nspr
|
2009-03-07 18:18:48 +01:00
|
|
|
|
|
|
|
, # If you want the resulting program to call itself "Thunderbird"
|
2010-01-02 14:21:50 +01:00
|
|
|
# instead of "Shredder", enable this option. However, those
|
2009-03-07 18:18:48 +01:00
|
|
|
# binaries may not be distributed without permission from the
|
|
|
|
# Mozilla Foundation, see
|
|
|
|
# http://www.mozilla.org/foundation/trademarks/.
|
|
|
|
enableOfficialBranding ? false
|
|
|
|
|
|
|
|
}:
|
|
|
|
|
2010-01-02 14:21:50 +01:00
|
|
|
let version = "3.0"; in
|
|
|
|
|
2009-03-07 18:18:48 +01:00
|
|
|
stdenv.mkDerivation {
|
2010-01-02 14:21:50 +01:00
|
|
|
name = "thunderbird-${version}";
|
2009-03-07 18:18:48 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2010-01-02 14:21:50 +01:00
|
|
|
url = "http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/${version}/source/thunderbird-${version}.source.tar.bz2";
|
|
|
|
sha1 = "7a8a08f011901b4c0b737de2d7a226242935543d";
|
2009-03-07 18:18:48 +01:00
|
|
|
};
|
|
|
|
|
2010-01-02 14:21:50 +01:00
|
|
|
buildInputs =
|
|
|
|
[ pkgconfig perl python zip bzip2 gtk dbus_glib alsaLib libIDL nspr ];
|
2009-03-07 18:18:48 +01:00
|
|
|
|
2010-01-02 14:21:50 +01:00
|
|
|
configureFlags =
|
|
|
|
[ "--enable-application=mail"
|
|
|
|
"--enable-optimize"
|
|
|
|
"--disable-debug"
|
|
|
|
"--enable-strip"
|
|
|
|
"--with-system-jpeg"
|
|
|
|
"--with-system-zlib"
|
|
|
|
"--with-system-bz2"
|
|
|
|
"--with-system-nspr"
|
|
|
|
"--enable-system-cairo"
|
|
|
|
"--disable-crashreporter"
|
|
|
|
"--disable-tests"
|
|
|
|
"--enable-static" # required by `make install'
|
|
|
|
]
|
|
|
|
++ stdenv.lib.optional enableOfficialBranding "--enable-official-branding";
|
2009-03-07 18:18:48 +01:00
|
|
|
|
2010-01-02 14:21:50 +01:00
|
|
|
# The Thunderbird Makefiles refer to the variables LIBXUL_DIST,
|
|
|
|
# prefix, and PREFIX in some places where they are not set. In
|
|
|
|
# particular, there are some linker flags like
|
|
|
|
# `-rpath-link=$(LIBXUL_DIST)/bin'. Since this expands to
|
|
|
|
# `-rpath-link=/bin', the build fails due to the purity checks in
|
|
|
|
# the ld wrapper. So disable the purity check for now.
|
|
|
|
preBuild = "NIX_ENFORCE_PURITY=0";
|
2009-03-07 18:18:48 +01:00
|
|
|
|
2010-01-02 14:21:50 +01:00
|
|
|
# This doesn't work:
|
|
|
|
#makeFlags = "LIBXUL_DIST=$(out) prefix=$(out) PREFIX=$(out)";
|
2009-03-07 18:18:48 +01:00
|
|
|
|
2010-01-02 14:21:50 +01:00
|
|
|
postInstall =
|
|
|
|
''
|
|
|
|
# Fix some references to /bin paths in the Xulrunner shell script.
|
|
|
|
substituteInPlace $out/lib/thunderbird-*/thunderbird \
|
|
|
|
--replace /bin/pwd "$(type -tP pwd)" \
|
|
|
|
--replace /bin/ls "$(type -tP ls)"
|
|
|
|
'';
|
2009-03-07 18:18:48 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Mozilla Thunderbird, a full-featured email client";
|
|
|
|
homepage = http://www.mozilla.com/en-US/thunderbird/;
|
|
|
|
};
|
|
|
|
}
|