2011-08-20 16:30:09 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig, gtk, perl, python, zip, libIDL
|
|
|
|
, dbus_glib, bzip2, alsaLib, nspr, yasm, mesa, nss
|
|
|
|
, libnotify, cairo, pixman, fontconfig
|
|
|
|
|
|
|
|
, # 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
|
|
|
|
|
|
|
|
}:
|
|
|
|
|
2011-10-06 15:21:05 +02:00
|
|
|
let version = "7.0.1"; in
|
2011-08-20 16:30:09 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "thunderbird-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/${version}/source/thunderbird-${version}.source.tar.bz2";
|
2011-10-06 15:21:05 +02:00
|
|
|
sha1 = "ccfc6fe3fe4ad07b214e20bc440d20e14d3ffbe5";
|
2011-08-20 16:30:09 +02:00
|
|
|
};
|
|
|
|
|
2011-10-06 15:21:05 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2011-08-20 16:30:09 +02:00
|
|
|
buildInputs =
|
|
|
|
[ pkgconfig perl python zip bzip2 gtk dbus_glib alsaLib libIDL nspr libnotify
|
2011-10-06 16:10:56 +02:00
|
|
|
libnotify cairo pixman fontconfig yasm mesa /* nss */
|
2011-08-20 16:30:09 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# Fix weird dependencies such as a so file which depends on "-lpthread".
|
|
|
|
./thunderbird-build-deps.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
NIX_LDFLAGS = "-lpixman-1";
|
|
|
|
|
|
|
|
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-necko-wifi"
|
|
|
|
"--disable-tests"
|
|
|
|
"--enable-calendar"
|
|
|
|
]
|
|
|
|
++ stdenv.lib.optional enableOfficialBranding "--enable-official-branding";
|
|
|
|
|
|
|
|
# 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";
|
|
|
|
|
|
|
|
# This doesn't work:
|
|
|
|
#makeFlags = "LIBXUL_DIST=$(out) prefix=$(out) PREFIX=$(out)";
|
|
|
|
|
|
|
|
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)"
|
2011-10-06 16:10:56 +02: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
|
2011-08-20 16:30:09 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Mozilla Thunderbird, a full-featured email client";
|
2011-08-27 17:29:13 +02:00
|
|
|
homepage = http://www.mozilla.org/thunderbird/;
|
2011-08-20 16:30:09 +02:00
|
|
|
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;
|
|
|
|
maintainers = with maintainers; [ pierron ];
|
2011-09-05 10:33:07 +02:00
|
|
|
platforms = with platforms; linux;
|
2011-08-20 16:30:09 +02:00
|
|
|
};
|
|
|
|
}
|