From 07966befeeabbe21426acc9c4fb0ccf74e470b1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 13 Jan 2015 21:45:47 +0100 Subject: [PATCH] thunderbird: update, and refactor the expression - use mach for building (the way Mozilla devs use), - use --disable-debug-symbols to reduce build-time resource consumption --- .../mailreaders/thunderbird/default.nix | 35 +++++++++++-------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/pkgs/applications/networking/mailreaders/thunderbird/default.nix b/pkgs/applications/networking/mailreaders/thunderbird/default.nix index e6ba7e21dc8..5124b78d071 100644 --- a/pkgs/applications/networking/mailreaders/thunderbird/default.nix +++ b/pkgs/applications/networking/mailreaders/thunderbird/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, m4, gtk, pango, perl, python, zip, libIDL +{ stdenv, fetchurl, pkgconfig, which, 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 @@ -13,7 +13,7 @@ enableOfficialBranding ? false }: -let version = "31.2.0"; in +let version = "31.4.0"; in let verName = "${version}"; in stdenv.mkDerivation rec { @@ -21,11 +21,11 @@ stdenv.mkDerivation rec { src = fetchurl { url = "ftp://ftp.mozilla.org/pub/thunderbird/releases/${verName}/source/thunderbird-${verName}.source.tar.bz2"; - sha1 = "87dff89388bd7ec51876e1bdbd82bc3fe60006b6"; + sha1 = "00b55e28f55b84e3cd257407d797e07a363aeef8"; }; buildInputs = # from firefox30Pkgs.xulrunner, but without gstreamer and libvpx - [ pkgconfig libpng gtk perl zip libIDL libjpeg zlib bzip2 + [ pkgconfig which 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 @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { hunspell libevent libstartup_notification cairo icu ] ++ [ m4 ]; - configureFlags = [ "--enable-application=mail" ] + configurePhase = let configureFlags = [ "--enable-application=mail" ] # from firefox30Pkgs.commonConfigureFlags, but without gstreamer and libvpx ++ [ "--with-system-jpeg" @@ -63,28 +63,33 @@ stdenv.mkDerivation rec { "--disable-pulseaudio" ] ++ (if debugBuild then [ "--enable-debug" "--enable-profiling"] else [ "--disable-debug" "--enable-release" + "--disable-debug-symbols" "--enable-optimize" "--enable-strip" ]) ++ [ "--disable-javaxpcom" "--enable-stdcxx-compat" # Avoid dependency on libstdc++ 4.7 ] ++ stdenv.lib.optional enableOfficialBranding "--enable-official-branding"; - - configurePhase = '' - patchShebangs . - + in '' + mkdir -p objdir/mozilla + cd objdir 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 + echo 'ac_add_options --prefix="'"$out"'"' >> .mozconfig + echo 'mk_add_options MOZ_MAKE_FLAGS="-j'"$NIX_BUILD_CORES"'"' >> .mozconfig + echo 'mk_add_options MOZ_OBJDIR="'`pwd`'"' >> .mozconfig - make ${makeFlags} configure + export MOZCONFIG=`realpath ./.mozconfig` + + patchShebangs ../mozilla/mach + ../mozilla/mach configure ''; - makeFlags = "-f client.mk"; - buildFlags = "build"; + buildPhase = "../mozilla/mach build"; - postInstall = + installPhase = '' + ../mozilla/mach install + rm -rf $out/include $out/lib/thunderbird-devel-* $out/share/idl # Create a desktop item.