diff --git a/pkgs/applications/networking/mailreaders/thunderbird/default.nix b/pkgs/applications/networking/mailreaders/thunderbird/default.nix index 85dab3777ba9..c0c11ff1f1c3 100644 --- a/pkgs/applications/networking/mailreaders/thunderbird/default.nix +++ b/pkgs/applications/networking/mailreaders/thunderbird/default.nix @@ -1,9 +1,10 @@ -{ stdenv, fetchurl, pkgconfig, gtk, perl, python, zip, unzip -, libIDL, dbus_glib, bzip2, alsaLib, nspr, yasm, mesa, nss -, libnotify, cairo, pixman, fontconfig -, libjpeg -, pythonPackages - +{ 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 , # 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 @@ -12,59 +13,75 @@ enableOfficialBranding ? false }: -let version = "17.0.11"; in -let verName = "${version}esr"; in +let version = "31.0"; in +let verName = "${version}"; in -stdenv.mkDerivation { +stdenv.mkDerivation rec { name = "thunderbird-${verName}"; src = fetchurl { url = "ftp://ftp.mozilla.org/pub/thunderbird/releases/${verName}/source/thunderbird-${verName}.source.tar.bz2"; - sha256 = "1m2lph8x82kgxqzlyaxr1l1x7s4qnqfzfnqck4b777914mrv1mdp"; + sha1 = "0fe6666fddd4db82ec2e389f30c5ea11d4f72be5"; }; - #enableParallelBuilding = true; + 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 ]; - buildInputs = - [ pkgconfig perl python zip unzip bzip2 gtk dbus_glib alsaLib libIDL nspr - libnotify cairo pixman fontconfig yasm mesa nss - libjpeg pythonPackages.sqlite3 - ]; - - configureFlags = - [ "--enable-application=mail" - "--enable-optimize" - "--with-pthreads" - "--disable-debug" - "--enable-strip" - "--with-pthreads" + configureFlags = [ "--enable-application=mail" ] + # from firefox30Pkgs.commonConfigureFlags, but without gstreamer and libvpx + ++ [ "--with-system-jpeg" - #"--with-system-png" "--with-system-zlib" "--with-system-bz2" "--with-system-nspr" "--with-system-nss" - # Broken: https://bugzilla.mozilla.org/show_bug.cgi?id=722975 - #"--enable-system-cairo" + "--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 "--disable-crashreporter" - "--disable-necko-wifi" - "--disable-webm" "--disable-tests" - "--enable-calendar" - "--disable-ogg" + "--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 ] ++ 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"; + configurePhase = '' + patchShebangs . - # This doesn't work: - #makeFlags = "LIBXUL_DIST=$(out) prefix=$(out) PREFIX=$(out)"; + 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 + ''; + + makeFlags = "-f client.mk"; + buildFlags = "build"; postInstall = '' @@ -84,7 +101,7 @@ stdenv.mkDerivation { ''; meta = with stdenv.lib; { - description = "Mozilla Thunderbird, a full-featured email client"; + description = "A full-featured e-mail client"; homepage = http://www.mozilla.org/thunderbird/; license = # Official branding implies thunderbird name and logo cannot be reuse, diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9bf6ec9670d4..5d7c2173e21b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9732,6 +9732,8 @@ let thunderbird = callPackage ../applications/networking/mailreaders/thunderbird { inherit (gnome) libIDL; + inherit (pythonPackages) pysqlite; + libpng = libpng_apng; }; thunderbird-bin = callPackage ../applications/networking/mailreaders/thunderbird-bin {