@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, pkgconfig, m4, gtk, pango, perl, python, zip, libIDL
1+{ stdenv, fetchurl, pkgconfig, which, m4, gtk, pango, perl, python, zip, libIDL
22, libjpeg, libpng, zlib, dbus, dbus_glib, bzip2, xlibs
33, freetype, fontconfig, file, alsaLib, nspr, nss, libnotify
44, yasm, mesa, sqlite, unzip, makeWrapper, pysqlite
@@ -13,7 +13,7 @@
1313 enableOfficialBranding ? false
1414}:
1515
16−let version = "31.2.0"; in
16+let version = "31.4.0"; in
1717let verName = "${version}"; in
1818
1919stdenv.mkDerivation rec {
@@ -21,11 +21,11 @@ stdenv.mkDerivation rec {
2121
2222 src = fetchurl {
2323 url = "ftp://ftp.mozilla.org/pub/thunderbird/releases/${verName}/source/thunderbird-${verName}.source.tar.bz2";
24− sha1 = "87dff89388bd7ec51876e1bdbd82bc3fe60006b6";
24+ sha1 = "00b55e28f55b84e3cd257407d797e07a363aeef8";
2525 };
2626
2727 buildInputs = # from firefox30Pkgs.xulrunner, but without gstreamer and libvpx
28− [ pkgconfig libpng gtk perl zip libIDL libjpeg zlib bzip2
28+ [ pkgconfig which libpng gtk perl zip libIDL libjpeg zlib bzip2
2929 python dbus dbus_glib pango freetype fontconfig xlibs.libXi
3030 xlibs.libX11 xlibs.libXrender xlibs.libXft xlibs.libXt file
3131 alsaLib nspr nss libnotify xlibs.pixman yasm mesa
@@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
3434 hunspell libevent libstartup_notification cairo icu
3535 ] ++ [ m4 ];
3636
37− configureFlags = [ "--enable-application=mail" ]
37+ configurePhase = let configureFlags = [ "--enable-application=mail" ]
3838 # from firefox30Pkgs.commonConfigureFlags, but without gstreamer and libvpx
3939 ++ [
4040 "--with-system-jpeg"
@@ -63,28 +63,33 @@ stdenv.mkDerivation rec {
6363 "--disable-pulseaudio"
6464 ] ++ (if debugBuild then [ "--enable-debug" "--enable-profiling"]
6565 else [ "--disable-debug" "--enable-release"
66+ "--disable-debug-symbols"
6667 "--enable-optimize" "--enable-strip" ])
6768 ++ [
6869 "--disable-javaxpcom"
6970 "--enable-stdcxx-compat" # Avoid dependency on libstdc++ 4.7
7071 ]
7172 ++ stdenv.lib.optional enableOfficialBranding "--enable-official-branding";
72−
73− configurePhase = ''
74− patchShebangs .
75−
73+ in ''
74+ mkdir -p objdir/mozilla
75+ cd objdir
7676 echo '${stdenv.lib.concatMapStrings (s : "ac_add_options ${s}\n") configureFlags}' > .mozconfig
77− echo "ac_add_options --prefix='$out'" >> .mozconfig
78− echo "mk_add_options MOZ_MAKE_FLAGS='-j$NIX_BUILD_CORES'" >> .mozconfig
77+ echo 'ac_add_options --prefix="'"$out"'"' >> .mozconfig
78+ echo 'mk_add_options MOZ_MAKE_FLAGS="-j'"$NIX_BUILD_CORES"'"' >> .mozconfig
79+ echo 'mk_add_options MOZ_OBJDIR="'`pwd`'"' >> .mozconfig
7980
80− make ${makeFlags} configure
81+ export MOZCONFIG=`realpath ./.mozconfig`
82+
83+ patchShebangs ../mozilla/mach
84+ ../mozilla/mach configure
8185 '';
8286
83− makeFlags = "-f client.mk";
84− buildFlags = "build";
87+ buildPhase = "../mozilla/mach build";
8588
86− postInstall =
89+ installPhase =
8790 ''
91+ ../mozilla/mach install
92+
8893 rm -rf $out/include $out/lib/thunderbird-devel-* $out/share/idl
8994
9095 # Create a desktop item.