summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2012-03-21 01:26:21 +0000
committerShea Levy <shea@shealevy.com>2012-03-21 01:26:21 +0000
commitf67b9d8f2dfe61319a0f5279394837116667990a (patch)
treebc337464a3bd2cc40ff08c38d0c3d3bb167ac394 /pkgs
parentb4497055879c02459925512c9a04d93ec8ecdfa3 (diff)
Thunderbird: Blind update
svn path=/nixpkgs/trunk/; revision=33320
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/networking/mailreaders/thunderbird/11.x.nix115
-rw-r--r--pkgs/top-level/all-packages.nix4
2 files changed, 119 insertions, 0 deletions
diff --git a/pkgs/applications/networking/mailreaders/thunderbird/11.x.nix b/pkgs/applications/networking/mailreaders/thunderbird/11.x.nix
new file mode 100644
index 0000000000000..c0de194ba9974
--- /dev/null
+++ b/pkgs/applications/networking/mailreaders/thunderbird/11.x.nix
@@ -0,0 +1,115 @@
+{ stdenv, fetchurl, pkgconfig, gtk, perl, python, zip, unzip
+, libIDL, dbus_glib, bzip2, alsaLib, nspr, yasm, mesa, nss
+, libnotify, cairo, pixman, fontconfig
+, libjpeg
+
+, # 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
+
+}:
+
+let version = "11.0";
+
+    # This patch may become necessary when we use a more recent version of libpng
+    # for now, it's actually not needed
+    # pngPatch = fetchurl {
+    #   url = http://www.linuxfromscratch.org/patches/blfs/svn/thunderbird-9.0.1-libpng-1.5-1.patch;
+    #   sha256 = "8454bdde3be8dc37c9f5e6f597914f0a585ff4b357d3fc86c6c9f80208b6068d";
+    # };
+in
+
+stdenv.mkDerivation {
+  name = "thunderbird-${version}";
+
+  src = fetchurl {
+    url = "http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/${version}/source/thunderbird-${version}.source.tar.bz2";
+    sha256 = "0lrp7ngi3ni70m9v11f0l8xvp3s8sc50isxbgy8vj677fzb1qn2s";
+  };
+
+  enableParallelBuilding = true;
+
+  buildInputs =
+    [ pkgconfig perl python zip unzip bzip2 gtk dbus_glib alsaLib libIDL nspr
+      libnotify cairo pixman fontconfig yasm mesa /* nss */
+      libjpeg
+    ];
+
+  # fix some paths in pngPatch
+  # prePatch = ''
+  #   substitute ${pngPatch} png.patch --replace "mozilla-release/modules/" "comm-release/mozilla/modules/"
+  #   '';
+
+  patches = [
+    # "png.patch" # produced by postUnpack
+
+    # Fix weird dependencies such as a so file which depends on "-lpthread".
+    # ./thunderbird-build-deps.patch
+  ];
+
+  configureFlags =
+    [ "--enable-application=mail"
+      "--enable-optimize"
+      "--with-pthreads"
+      "--disable-debug"
+      "--enable-strip"
+      "--with-pthreads"
+      "--with-system-jpeg"
+      # "--with-system-png"  # png 1.5.x not merged in nixpkgs yet
+      "--with-system-zlib"
+      "--with-system-bz2"
+      "--with-system-nspr"
+      "--enable-system-cairo"
+      "--disable-crashreporter"
+      "--disable-necko-wifi"
+      "--disable-webm"
+      "--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)"
+
+      # 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
+    '';
+
+  meta = with stdenv.lib; {
+    description = "Mozilla Thunderbird, a full-featured email client";
+    homepage = http://www.mozilla.org/thunderbird/;
+    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 ];
+    platforms = with platforms; linux;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 4b038ad6f5a69..a6fe5be428ffd 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -7381,6 +7381,10 @@ let
     inherit (gnome) libIDL;
   };
 
+  thunderbird11 = callPackage ../applications/networking/mailreaders/thunderbird/11.x.nix {
+    inherit (gnome) libIDL;
+  };
+
   timidity = callPackage ../tools/misc/timidity { };
 
   tkcvs = callPackage ../applications/version-management/tkcvs { };