about summary refs log tree commit diff
path: root/pkgs/applications/networking/mailreaders
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2014-07-22 22:18:24 +0200
committerVladimír Čunát <vcunat@gmail.com>2014-07-31 16:30:04 +0200
commitdac1791fb5661eaf06355982135c4674d0e6e4e3 (patch)
tree0aa73c351fc156da2713d4b0b0a196de492976c4 /pkgs/applications/networking/mailreaders
parentddcc1637116329e7a3bad3ec293fddaf2ed3420f (diff)
downloadnixlib-dac1791fb5661eaf06355982135c4674d0e6e4e3.tar
nixlib-dac1791fb5661eaf06355982135c4674d0e6e4e3.tar.gz
nixlib-dac1791fb5661eaf06355982135c4674d0e6e4e3.tar.bz2
nixlib-dac1791fb5661eaf06355982135c4674d0e6e4e3.tar.lz
nixlib-dac1791fb5661eaf06355982135c4674d0e6e4e3.tar.xz
nixlib-dac1791fb5661eaf06355982135c4674d0e6e4e3.tar.zst
nixlib-dac1791fb5661eaf06355982135c4674d0e6e4e3.zip
thunderbird: major update 17.* -> 31.0
- To fix build problems, I refactored the build process
  according to Mozilla recommendations.
- 31.0 should become the next ESR branch (31 released today).

CC @nbp @edolstra

(cherry picked from commit adc2edd5cf524239690b5cf49779a11fd2eb061b)
Diffstat (limited to 'pkgs/applications/networking/mailreaders')
-rw-r--r--pkgs/applications/networking/mailreaders/thunderbird/default.nix99
1 files changed, 58 insertions, 41 deletions
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 =
-    [ pkgconfig perl python zip unzip bzip2 gtk dbus_glib alsaLib libIDL nspr
-      libnotify cairo pixman fontconfig yasm mesa nss
-      libjpeg pythonPackages.sqlite3
-    ];
+  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 ];
 
-  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 .
+
+    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
+  '';
 
-  # This doesn't work:
-  #makeFlags = "LIBXUL_DIST=$(out) prefix=$(out) PREFIX=$(out)";
+  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,