summary refs log tree commit diff
path: root/pkgs/applications/networking
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking')
-rw-r--r--pkgs/applications/networking/browsers/chromium/default.nix63
-rw-r--r--pkgs/applications/networking/browsers/conkeror/default.nix8
-rw-r--r--pkgs/applications/networking/browsers/elinks/default.nix4
-rw-r--r--pkgs/applications/networking/browsers/elinks/gc-init.patch17
-rw-r--r--pkgs/applications/networking/browsers/firefox/3.6.nix12
-rw-r--r--pkgs/applications/networking/browsers/firefox/5.0.nix (renamed from pkgs/applications/networking/browsers/firefox/4.0.nix)89
-rw-r--r--pkgs/applications/networking/browsers/firefox/6.0.nix (renamed from pkgs/applications/networking/browsers/firefox/3.5.nix)75
-rw-r--r--pkgs/applications/networking/browsers/firefox/7.0.nix184
-rw-r--r--pkgs/applications/networking/browsers/firefox/binary.nix55
-rw-r--r--pkgs/applications/networking/browsers/firefox/writable-copies.patch23
-rw-r--r--pkgs/applications/networking/browsers/firefox/xlibs.patch10
-rw-r--r--pkgs/applications/networking/browsers/icecat-3/default.nix4
-rw-r--r--pkgs/applications/networking/browsers/icecat-4/default.nix118
-rw-r--r--pkgs/applications/networking/browsers/icecat-4/rpath-link.patch14
-rw-r--r--pkgs/applications/networking/browsers/icecat-4/skip-gre-registration.patch12
-rw-r--r--pkgs/applications/networking/browsers/konq-plugins/default.nix4
-rw-r--r--pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-10/builder.sh3
-rw-r--r--pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-10/default.nix15
-rw-r--r--pkgs/applications/networking/browsers/mozilla-plugins/gecko-mediaplayer/default.nix4
-rw-r--r--pkgs/applications/networking/browsers/mozilla-plugins/google-talk-plugin/default.nix92
-rw-r--r--pkgs/applications/networking/browsers/rekonq/default.nix4
-rw-r--r--pkgs/applications/networking/browsers/uzbl/default.nix3
-rw-r--r--pkgs/applications/networking/browsers/w3m/default.nix8
-rw-r--r--pkgs/applications/networking/ekiga/default.nix2
-rw-r--r--pkgs/applications/networking/esniper/default.nix28
-rw-r--r--pkgs/applications/networking/instant-messengers/bitlbee-otr/default.nix38
-rw-r--r--pkgs/applications/networking/instant-messengers/bitlbee/default.nix11
-rw-r--r--pkgs/applications/networking/instant-messengers/freetalk/01_callbacks_const_fix.diff25
-rw-r--r--pkgs/applications/networking/instant-messengers/freetalk/default.nix51
-rw-r--r--pkgs/applications/networking/instant-messengers/kadu/config.patch15
-rw-r--r--pkgs/applications/networking/instant-messengers/kadu/default.nix26
-rw-r--r--pkgs/applications/networking/instant-messengers/kadu/more-icons.patch12
-rw-r--r--pkgs/applications/networking/instant-messengers/oneteam/default.nix90
-rw-r--r--pkgs/applications/networking/instant-messengers/pidgin/default.nix11
-rw-r--r--pkgs/applications/networking/instant-messengers/vacuum/default.nix10
-rw-r--r--pkgs/applications/networking/irc/chatzilla/default.nix6
-rw-r--r--pkgs/applications/networking/irc/quassel/default.nix4
-rw-r--r--pkgs/applications/networking/linphone/default.nix20
-rw-r--r--pkgs/applications/networking/mailreaders/mutt/default.nix16
-rw-r--r--pkgs/applications/networking/mailreaders/mutt/openssl.patch15
-rw-r--r--pkgs/applications/networking/mailreaders/notmuch/default.nix84
-rw-r--r--pkgs/applications/networking/mailreaders/thunderbird/3.x.nix6
-rw-r--r--pkgs/applications/networking/mailreaders/thunderbird/5.x.nix83
-rw-r--r--pkgs/applications/networking/mailreaders/thunderbird/thunderbird-build-deps.patch21
-rw-r--r--pkgs/applications/networking/mumble/default.nix45
-rw-r--r--pkgs/applications/networking/mumble/mumble-jack-support.patch457
-rw-r--r--pkgs/applications/networking/newsreaders/pan/default.nix22
-rw-r--r--pkgs/applications/networking/offrss/default.nix29
-rw-r--r--pkgs/applications/networking/p2p/ktorrent/default.nix (renamed from pkgs/applications/networking/ktorrent/default.nix)16
-rw-r--r--pkgs/applications/networking/p2p/ktorrent/find-workspace.diff (renamed from pkgs/applications/networking/ktorrent/find-workspace.diff)0
-rw-r--r--pkgs/applications/networking/p2p/mldonkey/default.nix4
-rw-r--r--pkgs/applications/networking/p2p/retroshare/default.nix28
-rw-r--r--pkgs/applications/networking/p2p/transmission/default.nix15
-rw-r--r--pkgs/applications/networking/p2p/tribler/default.nix43
-rw-r--r--pkgs/applications/networking/pjsip/default.nix30
-rw-r--r--pkgs/applications/networking/remote/rdesktop/default.nix4
-rw-r--r--pkgs/applications/networking/siproxd/default.nix19
-rw-r--r--pkgs/applications/networking/skype/default.nix12
-rw-r--r--pkgs/applications/networking/sync/akunambol/default.nix16
-rw-r--r--pkgs/applications/networking/sync/akunambol/non-latin.diff17
-rw-r--r--pkgs/applications/networking/sync/unison/default.nix30
61 files changed, 1817 insertions, 365 deletions
diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix
index db8adeeb45fc..74f80ccdab95 100644
--- a/pkgs/applications/networking/browsers/chromium/default.nix
+++ b/pkgs/applications/networking/browsers/chromium/default.nix
@@ -1,57 +1,60 @@
-{ GConf, alsaLib, atk, bzip2, cairo, cups, dbus, dbus_glib,
-  expat, fetchurl, ffmpeg, fontconfig, freetype, glib, gtk,
-  libX11, libXScrnSaver, libXdamage, libXext, libXrender, libXt,
-  libgcrypt, libjpeg, libpng, makeWrapper, nspr, nss, pango,
-  patchelf, stdenv, unzip, zlib }:
+{ GConf, alsaLib, bzip2, cairo, cups, dbus, dbus_glib, expat
+, fetchurl, ffmpeg, fontconfig, freetype, gtkLibs, libX11
+, libXScrnSaver, libXdamage, libXext, libXrender, libXt, libXtst
+, libgcrypt, libjpeg, libpng, makeWrapper, nspr, nss, patchelf
+, stdenv, unzip, zlib, pam }:
 
 assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" ;
 
 stdenv.mkDerivation rec {
   name = "chrome-${version}";
-  version = "65039";
+  version = "88807";
   src =
     if stdenv.system == "x86_64-linux" then
       fetchurl {
-        url = "http://build.chromium.org/buildbot/snapshots/chromium-rel-linux-64/${version}/chrome-linux.zip";
-        sha256 = "1ad7kwd1w1958mb3pwzhshawrf2nlxdsf0gy7d2q4qnx5d809vws";
+        url = "http://commondatastorage.googleapis.com/chromium-browser-continuous/Linux_x64/${version}/chrome-linux.zip";
+        sha256 = "c158f58fa8220782ec8dec4170f90c564b978d1c6ead298cc2f67e84613f17b1";
       }
     else if stdenv.system == "i686-linux" then
       fetchurl {
-        url = "http://build.chromium.org/buildbot/snapshots/chromium-rel-linux/${version}/chrome-linux.zip";
-        sha256 = "06hz3gvv3623ldrj141w3mnzw049yylvv9b9q5r6my8icm722phf";
+        url = "http://commondatastorage.googleapis.com/chromium-browser-continuous/Linux/${version}/chrome-linux.zip";
+        sha256 = "01sr882c7hr53001p8bnk5vyj8zfjm6r3i4a6wxzxd17xjh1bcxb";
       }
     else throw "Chromium is not supported on this platform.";
 
   phases = "unpackPhase installPhase";
 
-  buildInputs = [makeWrapper unzip];
+  buildInputs = [ makeWrapper unzip ];
 
   libPath =
     stdenv.lib.makeLibraryPath
-       [ GConf alsaLib atk bzip2 cairo cups dbus dbus_glib expat
-         ffmpeg fontconfig freetype glib gtk libX11 libXScrnSaver
-         libXdamage libXext libXrender libXt libgcrypt libjpeg libpng
-         nspr nss pango stdenv.gcc.gcc zlib stdenv.gcc.libc ];
+       [ GConf alsaLib bzip2 cairo cups dbus dbus_glib expat
+         ffmpeg fontconfig freetype libX11 libXScrnSaver
+         libXdamage libXext libXrender libXt libXtst libgcrypt libjpeg
+         libpng nspr nss stdenv.gcc.gcc zlib stdenv.gcc.libc
+         gtkLibs.glib gtkLibs.gtk gtkLibs.gdk_pixbuf gtkLibs.pango
+         pam
+       ];
 
   installPhase = ''
     ensureDir $out/bin
-    ensureDir $out/chrome
-    ensureDir $out/lib
-
-    cp -R * $out/chrome
-    ln -s $out/chrome/chrome $out/bin/chrome
-    ${patchelf}/bin/patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" --set-rpath ${libPath}:$out/lib:${stdenv.gcc.gcc}/lib64:${stdenv.gcc.gcc}/lib $out/chrome/chrome
-
-    ln -s ${nss}/lib/libsmime3.so $out/lib/libsmime3.so.1d
-    ln -s ${nss}/lib/libnssutil3.so $out/lib/libnssutil3.so.1d
-    ln -s ${nss}/lib/libssl3.so $out/lib/libssl3.so.1d
-    ln -s ${nss}/lib/libnss3.so $out/lib/libnss3.so.1d
-    ln -s ${nspr}/lib/libnspr4.so $out/lib/libnspr4.so.0d
-    ln -s ${nspr}/lib/libplds4.so $out/lib/libplds4.so.0d
-    ln -s ${nspr}/lib/libplc4.so $out/lib/libplc4.so.0d
+    ensureDir $out/libexec/chrome
+
+    cp -R * $out/libexec/chrome
+    
+    ${patchelf}/bin/patchelf \
+      --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
+      --set-rpath ${libPath}:$out/lib:${stdenv.gcc.gcc}/lib64:${stdenv.gcc.gcc}/lib \
+      $out/libexec/chrome/chrome
+
+    makeWrapper $out/libexec/chrome/chrome $out/bin/chrome \
+      --prefix LD_LIBRARY_PATH : "${nss}/lib"
   '';
 
-  meta = {
+  meta =  with stdenv.lib; {
     description = "Chromium, an open source web browser";
+    homepage = http://www.chromium.org/;
+    maintainers = [ maintainers.goibhniu ];
+    license = licenses.bsd3;
   };
 }
diff --git a/pkgs/applications/networking/browsers/conkeror/default.nix b/pkgs/applications/networking/browsers/conkeror/default.nix
index d7e87e4015b5..2bf25ccd546c 100644
--- a/pkgs/applications/networking/browsers/conkeror/default.nix
+++ b/pkgs/applications/networking/browsers/conkeror/default.nix
@@ -1,13 +1,13 @@
 { stdenv, fetchurl, unzip }:
 stdenv.mkDerivation {
-  name = "conkeror-0.9.2";
+  name = "conkeror-0.9.3-20110606";
   src = fetchurl {
-    url = http://repo.or.cz/w/conkeror.git/snapshot/efacc207b0d6c7b3899fc584c9f48547b18da076.zip;
-    sha256 = "1bkrrskrmhpx2xp90zgi5jrz4akynkxv2nzk5hzg0a17ikdi5ql8";
+    url = http://repo.or.cz/w/conkeror.git/snapshot/0d883dfd5e61e7d0b8a96a079d69b46af064fdca.zip;
+    sha256 = "0h21fw78iq4hljy5p98mpy0wgd5wpx9a0jdwv7l5wrds5vp23dhh";
   };
   buildInputs = [ unzip ];
   installPhase = ''
-    cp -r . $out
+    cp -v -r . $out
   '';
   meta = {
     description = "A keyboard-oriented, customizable, extensible web browser";
diff --git a/pkgs/applications/networking/browsers/elinks/default.nix b/pkgs/applications/networking/browsers/elinks/default.nix
index e06bfe538c00..1587a2e34953 100644
--- a/pkgs/applications/networking/browsers/elinks/default.nix
+++ b/pkgs/applications/networking/browsers/elinks/default.nix
@@ -9,8 +9,10 @@ stdenv.mkDerivation rec {
     sha256 = "1li4vlbq8wvnigxlkzb15490y90jg6y9yzzrqpqcz2h965w5869d";
   };
 
+  patches = [ ./gc-init.patch ];
+
   buildInputs = [ python perl ncurses x11 bzip2 zlib openssl spidermonkey guile gpm ];
-  
+
   configureFlags =
     ''
       --enable-finger --enable-html-highlight --with-guile
diff --git a/pkgs/applications/networking/browsers/elinks/gc-init.patch b/pkgs/applications/networking/browsers/elinks/gc-init.patch
new file mode 100644
index 000000000000..de06f563d6e6
--- /dev/null
+++ b/pkgs/applications/networking/browsers/elinks/gc-init.patch
@@ -0,0 +1,17 @@
+Fix libgc initialization in the presence of Guile 2.0.
+
+--- elinks-0.12pre5/src/main/main.c	2009-07-07 14:23:17.000000000 +0200
++++ elinks-0.12pre5/src/main/main.c	2011-04-28 23:20:15.000000000 +0200
+@@ -339,6 +339,11 @@ int
+ main(int argc, char *argv[])
+ {
+ #ifdef CONFIG_GC
++	/* Guile 2.x uses libgc too and it initializes it this way, so we
++	 * must make sure to initialize it the same way, or it will just
++	 * segfault.  */
++	GC_all_interior_pointers = 0;
++
+ 	GC_INIT();
+ 	GC_set_warn_proc(gc_warning);
+ #endif
+
diff --git a/pkgs/applications/networking/browsers/firefox/3.6.nix b/pkgs/applications/networking/browsers/firefox/3.6.nix
index f119f301dbb7..e26b59732152 100644
--- a/pkgs/applications/networking/browsers/firefox/3.6.nix
+++ b/pkgs/applications/networking/browsers/firefox/3.6.nix
@@ -12,14 +12,14 @@
 
 rec {
 
-  firefoxVersion = "3.6.13";
+  firefoxVersion = "3.6.16";
   
-  xulVersion = "1.9.2.13"; # this attribute is used by other packages
+  xulVersion = "1.9.2.16"; # this attribute is used by other packages
 
   
   src = fetchurl {
     url = "http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${firefoxVersion}/source/firefox-${firefoxVersion}.source.tar.bz2";
-    sha1 = "1d1bc70d651bce4006687f5762638563c0494267";
+    sha1 = "38124597440b7d60aa568adeef23659575841e92";
   };
 
 
@@ -97,9 +97,11 @@ rec {
       rm -f $out/bin/run-mozilla.sh
     ''; # */
 
+    enableParallelBuilding = true;
+
     meta = {
       description = "Mozilla Firefox XUL runner";
-      homepage = http://www.mozilla.com/en-US/firefox/;
+      homepage = http://www.mozilla.org/en-US/firefox/;
     };
 
     passthru = { inherit gtk; version = xulVersion; };
@@ -139,7 +141,7 @@ rec {
 
     meta = {
       description = "Mozilla Firefox - the browser, reloaded";
-      homepage = http://www.mozilla.com/en-US/firefox/;
+      homepage = http://www.mozilla.org/en-US/firefox/;
     };
 
     passthru = {
diff --git a/pkgs/applications/networking/browsers/firefox/4.0.nix b/pkgs/applications/networking/browsers/firefox/5.0.nix
index 49802f9a0ee0..1cc625edf7cb 100644
--- a/pkgs/applications/networking/browsers/firefox/4.0.nix
+++ b/pkgs/applications/networking/browsers/firefox/5.0.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchurl, pkgconfig, gtk, pango, perl, python, zip, libIDL
 , libjpeg, libpng, zlib, cairo, dbus, dbus_glib, bzip2, xlibs
 , freetype, fontconfig, file, alsaLib, nspr, nss, libnotify
-, libvpx, yasm, mesa, wirelesstools
+, yasm, mesa, sqlite
 
 , # If you want the resulting program to call itself "Firefox" instead
   # of "Shiretoko" or whatever, enable this option.  However, those
@@ -11,18 +11,21 @@
   enableOfficialBranding ? false
 }:
 
+assert stdenv.gcc ? libc && stdenv.gcc.libc != null;
+
 rec {
 
-  firefoxVersion = "4.0b7";
+  firefoxVersion = "5.0.1";
   
-  xulVersion = "2.0b7"; # this attribute is used by other packages
+  xulVersion = "5.0.1"; # this attribute is used by other packages
 
   
   src = fetchurl {
     url = "http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${firefoxVersion}/source/firefox-${firefoxVersion}.source.tar.bz2";
-    sha256 = "02cc466a92af828ff3bc563d4515bd98064cf5f136b5871e072b9408fb4db128";
+    sha1 = "c93b3513e160d87535a9d61c5e06a6a701e9cd3e";
   };
 
+  
   commonConfigureFlags =
     [ "--enable-optimize"
       "--disable-debug"
@@ -31,13 +34,15 @@ rec {
       "--with-system-zlib"
       "--with-system-bz2"
       "--with-system-nspr"
-      #"--with-system-nss"
+      # "--with-system-nss"
       # "--with-system-png" # <-- "--with-system-png won't work because the system's libpng doesn't have APNG support"
       "--enable-system-cairo"
-      #"--enable-system-sqlite" # <-- this seems to be discouraged
+      "--enable-system-sqlite"
       "--disable-crashreporter"
       "--disable-tests"
       "--disable-necko-wifi" # maybe we want to enable this at some point
+      "--disable-installer" 
+      "--disable-updater"
     ];
 
 
@@ -47,12 +52,12 @@ rec {
     inherit src;
 
     buildInputs =
-    [ pkgconfig gtk perl zip libIDL libjpeg libpng zlib cairo bzip2
+      [ pkgconfig gtk perl zip libIDL libjpeg libpng zlib cairo 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 libvpx yasm mesa
-	wirelesstools xlibs.libXScrnSaver xlibs.scrnsaverproto
-	xlibs.libXext xlibs.xextproto
+        alsaLib nspr /* nss */ libnotify xlibs.pixman yasm mesa
+	xlibs.libXScrnSaver xlibs.scrnsaverproto
+	xlibs.libXext xlibs.xextproto sqlite
       ];
 
     configureFlags =
@@ -60,18 +65,22 @@ rec {
         "--disable-javaxpcom"
       ] ++ commonConfigureFlags;
 
-    # !!! Temporary hack.
-    preBuild = ''
-     export NIX_ENFORCE_PURITY=
-    '';
-
+    enableParallelBuilding = true;
+      
     # Hack to work around make's idea of -lbz2 dependency
-    preConfigure = ''
-     find . -name Makefile.in -execdir sed -i '{}' -e '1ivpath %.so ${
-       stdenv.lib.concatStringsSep ":" 
-         (map (s : s + "/lib") (buildInputs ++ [stdenv.gcc.libc]))
-     }' ';'
-    '';
+    preConfigure =
+      ''
+        find . -name Makefile.in -execdir sed -i '{}' -e '1ivpath %.so ${
+          stdenv.lib.concatStringsSep ":" 
+            (map (s : s + "/lib") (buildInputs ++ [stdenv.gcc.libc]))
+        }' ';'
+      '';
+
+    # !!! Temporary hack.
+    preBuild =
+      ''
+        export NIX_ENFORCE_PURITY=
+      '';
 
     installFlags = "SKIP_GRE_REGISTRATION=1";
 
@@ -99,7 +108,7 @@ rec {
 
     meta = {
       description = "Mozilla Firefox XUL runner";
-      homepage = http://www.mozilla.com/en-US/firefox/;
+      homepage = http://www.mozilla.org/en-US/firefox/;
     };
 
     passthru = { inherit gtk; version = xulVersion; };
@@ -111,10 +120,12 @@ rec {
 
     inherit src;
 
+    enableParallelBuilding = true;
+      
     buildInputs =
       [ pkgconfig gtk perl zip libIDL libjpeg zlib cairo bzip2 python
         dbus dbus_glib pango freetype fontconfig alsaLib nspr libnotify
-        xlibs.pixman libvpx yasm mesa wirelesstools
+        xlibs.pixman yasm mesa sqlite
       ];
 
     propagatedBuildInputs = [xulrunner];
@@ -122,32 +133,28 @@ rec {
     configureFlags =
       [ "--enable-application=browser"
         "--with-libxul-sdk=${xulrunner}/lib/xulrunner-devel-${xulrunner.version}"
+        "--enable-chrome-format=jar"
       ]
       ++ commonConfigureFlags
       ++ stdenv.lib.optional enableOfficialBranding "--enable-official-branding";
 
-    postInstall = ''
-      libDir=$(cd $out/lib && ls -d firefox-[0-9]*)
-      test -n "$libDir"
-
-      ln -s ${xulrunner}/lib/xulrunner-${xulrunner.version} $out/lib/$libDir/xulrunner
-
-      # Register extensions etc. !!! is this needed anymore?
-      echo "running firefox -register..."
-      $out/bin/firefox -register
-    ''; # */
-
     # Hack to work around make's idea of -lbz2 dependency
-    preConfigure = ''
-     find . -name Makefile.in -execdir sed -i '{}' -e '1ivpath %.so ${
-       stdenv.lib.concatStringsSep ":" 
-         (map (s : s + "/lib") (buildInputs ++ [stdenv.gcc.libc]))
-     }' ';'
-    '';
+    preConfigure =
+      ''
+        find . -name Makefile.in -execdir sed -i '{}' -e '1ivpath %.so ${
+          stdenv.lib.concatStringsSep ":" 
+            (map (s : s + "/lib") (buildInputs ++ [stdenv.gcc.libc]))
+        }' ';'
+      '';
+
+    postInstall =
+      ''
+        ln -s ${xulrunner}/lib/xulrunner-${xulrunner.version} $(echo $out/lib/firefox-*)/xulrunner
+      ''; # */
 
     meta = {
       description = "Mozilla Firefox - the browser, reloaded";
-      homepage = http://www.mozilla.com/en-US/firefox/;
+      homepage = http://www.mozilla.org/en-US/firefox/;
     };
 
     passthru = {
diff --git a/pkgs/applications/networking/browsers/firefox/3.5.nix b/pkgs/applications/networking/browsers/firefox/6.0.nix
index a5a35578b134..7535cfb201ef 100644
--- a/pkgs/applications/networking/browsers/firefox/3.5.nix
+++ b/pkgs/applications/networking/browsers/firefox/6.0.nix
@@ -1,6 +1,7 @@
 { stdenv, fetchurl, pkgconfig, gtk, pango, perl, python, zip, libIDL
 , libjpeg, libpng, zlib, cairo, dbus, dbus_glib, bzip2, xlibs
-, freetype, fontconfig, file, alsaLib, nspr, nss
+, freetype, fontconfig, file, alsaLib, nspr, nss, libnotify
+, yasm, mesa, sqlite
 
 , # If you want the resulting program to call itself "Firefox" instead
   # of "Shiretoko" or whatever, enable this option.  However, those
@@ -10,19 +11,21 @@
   enableOfficialBranding ? false
 }:
 
+assert stdenv.gcc ? libc && stdenv.gcc.libc != null;
+
 rec {
 
-  firefoxVersion = "3.5.10";
+  firefoxVersion = "6.0";
   
-  xulVersion = "1.9.1.10"; # this attribute is used by other packages
+  xulVersion = "6.0"; # this attribute is used by other packages
 
   
   src = fetchurl {
     url = "http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${firefoxVersion}/source/firefox-${firefoxVersion}.source.tar.bz2";
-    sha1 = "9e84dee03f003eaf79df12de9d13ac8f6c4cd9b1";
+    sha256 = "0ws96gc1mkmilgsikirhmqc6s7m0bcyh58820l08wd82r9abagyc";
   };
 
-
+  
   commonConfigureFlags =
     [ "--enable-optimize"
       "--disable-debug"
@@ -31,16 +34,19 @@ rec {
       "--with-system-zlib"
       "--with-system-bz2"
       "--with-system-nspr"
-      #"--with-system-nss"
+      # "--with-system-nss"
       # "--with-system-png" # <-- "--with-system-png won't work because the system's libpng doesn't have APNG support"
       "--enable-system-cairo"
-      #"--enable-system-sqlite" # <-- this seems to be discouraged
+      "--enable-system-sqlite"
       "--disable-crashreporter"
       "--disable-tests"
+      "--disable-necko-wifi" # maybe we want to enable this at some point
+      "--disable-installer" 
+      "--disable-updater"
     ];
 
 
-  xulrunner = stdenv.mkDerivation {
+  xulrunner = stdenv.mkDerivation rec {
     name = "xulrunner-${xulVersion}";
     
     inherit src;
@@ -49,7 +55,9 @@ rec {
       [ pkgconfig gtk perl zip libIDL libjpeg libpng zlib cairo bzip2
         python dbus dbus_glib pango freetype fontconfig xlibs.libXi
         xlibs.libX11 xlibs.libXrender xlibs.libXft xlibs.libXt file
-        alsaLib nspr /* nss */
+        alsaLib nspr /* nss */ libnotify xlibs.pixman yasm mesa
+	xlibs.libXScrnSaver xlibs.scrnsaverproto
+	xlibs.libXext xlibs.xextproto sqlite
       ];
 
     configureFlags =
@@ -57,10 +65,22 @@ rec {
         "--disable-javaxpcom"
       ] ++ commonConfigureFlags;
 
+    enableParallelBuilding = true;
+      
+    # Hack to work around make's idea of -lbz2 dependency
+    preConfigure =
+      ''
+        find . -name Makefile.in -execdir sed -i '{}' -e '1ivpath %.so ${
+          stdenv.lib.concatStringsSep ":" 
+            (map (s : s + "/lib") (buildInputs ++ [stdenv.gcc.libc]))
+        }' ';'
+      '';
+
     # !!! Temporary hack.
-    preBuild = ''
-     export NIX_ENFORCE_PURITY=
-    '';
+    preBuild =
+      ''
+        export NIX_ENFORCE_PURITY=
+      '';
 
     installFlags = "SKIP_GRE_REGISTRATION=1";
 
@@ -88,7 +108,7 @@ rec {
 
     meta = {
       description = "Mozilla Firefox XUL runner";
-      homepage = http://www.mozilla.com/en-US/firefox/;
+      homepage = http://www.mozilla.org/en-US/firefox/;
     };
 
     passthru = { inherit gtk; version = xulVersion; };
@@ -100,9 +120,12 @@ rec {
 
     inherit src;
 
+    enableParallelBuilding = true;
+      
     buildInputs =
       [ pkgconfig gtk perl zip libIDL libjpeg zlib cairo bzip2 python
-        dbus dbus_glib pango freetype fontconfig alsaLib nspr
+        dbus dbus_glib pango freetype fontconfig alsaLib nspr libnotify
+        xlibs.pixman yasm mesa sqlite
       ];
 
     propagatedBuildInputs = [xulrunner];
@@ -110,24 +133,28 @@ rec {
     configureFlags =
       [ "--enable-application=browser"
         "--with-libxul-sdk=${xulrunner}/lib/xulrunner-devel-${xulrunner.version}"
+        "--enable-chrome-format=jar"
       ]
       ++ commonConfigureFlags
       ++ stdenv.lib.optional enableOfficialBranding "--enable-official-branding";
 
-    postInstall = ''
-      libDir=$(cd $out/lib && ls -d firefox-[0-9]*)
-      test -n "$libDir"
+    # Hack to work around make's idea of -lbz2 dependency
+    preConfigure =
+      ''
+        find . -name Makefile.in -execdir sed -i '{}' -e '1ivpath %.so ${
+          stdenv.lib.concatStringsSep ":" 
+            (map (s : s + "/lib") (buildInputs ++ [stdenv.gcc.libc]))
+        }' ';'
+      '';
 
-      ln -s ${xulrunner}/lib/xulrunner-${xulrunner.version} $out/lib/$libDir/xulrunner
-
-      # Register extensions etc. !!! is this needed anymore?
-      echo "running firefox -register..."
-      $out/bin/firefox -register
-    ''; # */
+    postInstall =
+      ''
+        ln -s ${xulrunner}/lib/xulrunner-${xulrunner.version} $(echo $out/lib/firefox-*)/xulrunner
+      ''; # */
 
     meta = {
       description = "Mozilla Firefox - the browser, reloaded";
-      homepage = http://www.mozilla.com/en-US/firefox/;
+      homepage = http://www.mozilla.org/en-US/firefox/;
     };
 
     passthru = {
diff --git a/pkgs/applications/networking/browsers/firefox/7.0.nix b/pkgs/applications/networking/browsers/firefox/7.0.nix
new file mode 100644
index 000000000000..d9e94ead33a4
--- /dev/null
+++ b/pkgs/applications/networking/browsers/firefox/7.0.nix
@@ -0,0 +1,184 @@
+{ stdenv, fetchurl, pkgconfig, gtk, pango, perl, python, zip, libIDL
+, libjpeg, libpng, zlib, cairo, dbus, dbus_glib, bzip2, xlibs
+, freetype, fontconfig, file, alsaLib, nspr, nss, libnotify
+, yasm, mesa, sqlite
+
+, # If you want the resulting program to call itself "Firefox" instead
+  # of "Shiretoko" or whatever, 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
+}:
+
+assert stdenv.gcc ? libc && stdenv.gcc.libc != null;
+
+rec {
+
+  firefoxVersion = "7.0b1";
+  
+  xulVersion = "7.0"; # this attribute is used by other packages
+
+  
+  src = fetchurl {
+    url = "http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/${firefoxVersion}-candidates/build1/source/firefox-${firefoxVersion}.source.tar.bz2";
+    sha256 = "0s8lv07nggdf8ad2yx7sgq1mfy1dvzir0f6x4km911yc9qyhwmwk";
+  };
+  
+  commonConfigureFlags =
+    [ "--enable-optimize"
+      "--disable-debug"
+      "--enable-strip"
+      "--with-system-jpeg"
+      "--with-system-zlib"
+      "--with-system-bz2"
+      "--with-system-nspr"
+      # "--with-system-nss"
+      # "--with-system-png" # <-- "--with-system-png won't work because the system's libpng doesn't have APNG support"
+      "--enable-system-cairo"
+      "--enable-system-sqlite"
+      "--disable-crashreporter"
+      "--disable-tests"
+      "--disable-necko-wifi" # maybe we want to enable this at some point
+      "--disable-installer" 
+      "--disable-updater"
+    ];
+
+
+  xulrunner = stdenv.mkDerivation rec {
+    name = "xulrunner-${xulVersion}";
+    
+    inherit src;
+
+    buildInputs =
+      [ pkgconfig gtk perl zip libIDL libjpeg libpng zlib cairo 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
+        xlibs.libXext xlibs.xextproto sqlite
+      ];
+
+    configureFlags =
+      [ "--enable-application=xulrunner"
+        "--disable-javaxpcom"
+      ] ++ commonConfigureFlags;
+
+    enableParallelBuilding = true;
+      
+    # Hack to work around make's idea of -lbz2 dependency
+    preConfigure =
+      ''
+        find . -name Makefile.in -execdir sed -i '{}' -e '1ivpath %.so ${
+          stdenv.lib.concatStringsSep ":" 
+            (map (s : s + "/lib") (buildInputs ++ [stdenv.gcc.libc]))
+        }' ';'
+        cp -i security/coreconf/Linux{2.6,3.0}.mk
+        cp -i security/coreconf/Linux{2.6,3.1}.mk
+        cp -i security/coreconf/Linux{2.6,3.2}.mk
+        cp -i security/coreconf/Linux{2.6,3.3}.mk
+
+        export NIX_LDFLAGS="$NIX_LDFLAGS -L$out/lib/xulrunner-${xulVersion}"
+      '';
+
+    # !!! Temporary hack.
+    preBuild =
+      ''
+        export NIX_ENFORCE_PURITY=
+      '';
+
+    installFlags = "SKIP_GRE_REGISTRATION=1";
+
+    postInstall = ''
+      # Fix some references to /bin paths in the Xulrunner shell script.
+      substituteInPlace $out/bin/xulrunner \
+          --replace /bin/pwd "$(type -tP pwd)" \
+          --replace /bin/ls "$(type -tP ls)"
+
+      # Fix run-mozilla.sh search
+      libDir=$(cd $out/lib && ls -d xulrunner-[0-9]*)
+      echo libDir: $libDir
+      test -n "$libDir"
+      cd $out/bin
+      mv xulrunner ../lib/$libDir/
+
+      for i in $out/lib/$libDir/*; do 
+          file $i;
+          if file $i | grep executable &>/dev/null; then 
+              echo -e '#! /bin/sh\n"'"$i"'" "$@"' > "$out/bin/$(basename "$i")";
+              chmod a+x "$out/bin/$(basename "$i")";
+          fi;
+      done;
+      for i in $out/lib/$libDir/{xpcshell,plugin-container,*.so}; do
+              patchelf --set-rpath "$(patchelf --print-rpath "$i"):$out/lib/$libDir" $i || true
+      done;
+      rm -f $out/bin/run-mozilla.sh
+    ''; # */
+
+    meta = {
+      description = "Mozilla Firefox XUL runner";
+      homepage = http://www.mozilla.com/en-US/firefox/;
+    };
+
+    passthru = { inherit gtk; version = xulVersion; };
+  };
+
+
+  firefox = stdenv.mkDerivation rec {
+    name = "firefox-${firefoxVersion}";
+
+    inherit src;
+
+    enableParallelBuilding = true;
+      
+    buildInputs =
+      [ pkgconfig gtk perl zip libIDL libjpeg zlib cairo bzip2 python
+        dbus dbus_glib pango freetype fontconfig alsaLib nspr libnotify
+        xlibs.pixman yasm mesa sqlite file
+      ];
+
+    propagatedBuildInputs = [xulrunner];
+
+    configureFlags =
+      [ "--enable-application=browser"
+        "--with-libxul-sdk=${xulrunner}/lib/xulrunner-devel-${xulrunner.version}"
+        "--enable-chrome-format=jar"
+	"--disable-elf-hack"
+      ]
+      ++ commonConfigureFlags
+      ++ stdenv.lib.optional enableOfficialBranding "--enable-official-branding";
+
+    # Hack to work around make's idea of -lbz2 dependency
+    preConfigure =
+      ''
+        find . -name Makefile.in -execdir sed -i '{}' -e '1ivpath %.so ${
+          stdenv.lib.concatStringsSep ":" 
+            (map (s : s + "/lib") (buildInputs ++ [stdenv.gcc.libc]))
+        }' ';'
+      '';
+
+    postInstall =
+      ''
+        ln -s ${xulrunner}/lib/xulrunner-${xulrunner.version} $(echo $out/lib/firefox-*)/xulrunner
+        for j in $out/bin/*; do 
+	    i="$(readlink "$j")";
+            file $i;
+            if file $i | grep executable &>/dev/null; then 
+	        rm "$out/bin/$(basename "$i")"
+                echo -e '#! /bin/sh\n"'"$i"'" "$@"' > "$out/bin/$(basename "$i")"
+                chmod a+x "$out/bin/$(basename "$i")"
+            fi;
+        done;
+      ''; # */
+
+    meta = {
+      description = "Mozilla Firefox - the browser, reloaded";
+      homepage = http://www.mozilla.com/en-US/firefox/;
+    };
+
+    passthru = {
+      inherit gtk xulrunner nspr;
+      isFirefox3Like = true;
+    };
+  };
+}
diff --git a/pkgs/applications/networking/browsers/firefox/binary.nix b/pkgs/applications/networking/browsers/firefox/binary.nix
deleted file mode 100644
index 73e002435b88..000000000000
--- a/pkgs/applications/networking/browsers/firefox/binary.nix
+++ /dev/null
@@ -1,55 +0,0 @@
-args: with args;
-
-assert stdenv.system == "i686-linux";
-
-stdenv.mkDerivation {
-  name = "firefox-3b1";
-
-  src = 
-	fetchurl {
-		url = ftp://ftp.mozilla.org/pub/firefox/releases/3.0b1/linux-i686/en-US/firefox-3.0b1.tar.bz2;
-		sha256 = "1cpcc5b07zdqyd5kiwhb4dqhy2mzbf97plsglcp6bc9054cmsylk";
-	};
-  buildInputs = [
-    pkgconfig gtk perl zip libIDL libXi libjpeg libpng zlib cairo
-    python curl coreutils atk pango glib libX11 libXrender 
-    freetype fontconfig libXft libXt
-  ];
-
-  buildPhase = "
-    additionalRpath='';
-    for i in \$buildInputs ${stdenv.glibc} ${stdenv.gcc.gcc}; do 
-      additionalRpath=\$additionalRpath:\$i/lib;  
-    done
-    for i in firefox-bin ; do
-      oldrpath=$(patchelf --print-rpath \$i)
-      patchelf --set-rpath \$oldrpath\$additionalRpath \$i
-      patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2 \$i
-    done
-  ";
-
-  installPhase = "
-    export dontPatchELF=1;
-    mkdir -p \$out
-    cp -r . \$out/firefox
-    mkdir -p \$out/bin
-    ln -s \$out/firefox/firefox \$out/bin/firefox
-
-    sed -e 's@moz_libdir=.*@moz_libdir='\$out'/firefox/@' -i \$out/bin/firefox 
-    sed -e 's@moz_libdir=.*@&\\nexport PATH=\$PATH:${coreutils}/bin@' -i \$out/bin/firefox 
-    sed -e 's@`/bin/pwd@`${coreutils}/bin/pwd@' -i \$out/bin/firefox 
-    sed -e 's@`/bin/ls@`${coreutils}/bin/ls@' -i \$out/bin/firefox 
-
-    strip -S \$out/firefox/*.so || true
-
-    echo \"running firefox -register...\"
-    \$out/firefox/firefox-bin -register || false
-  ";
-
-  meta = {
-    description = "Mozilla Firefox - the browser, reloaded";
-  };
-
-  passthru = {inherit gtk;};
-}
-
diff --git a/pkgs/applications/networking/browsers/firefox/writable-copies.patch b/pkgs/applications/networking/browsers/firefox/writable-copies.patch
deleted file mode 100644
index e3c7752c0310..000000000000
--- a/pkgs/applications/networking/browsers/firefox/writable-copies.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff -rc mozilla-orig/xpcom/io/nsLocalFileUnix.cpp mozilla/xpcom/io/nsLocalFileUnix.cpp
-*** mozilla-orig/xpcom/io/nsLocalFileUnix.cpp	2004-04-03 01:48:18.000000000 +0200
---- mozilla/xpcom/io/nsLocalFileUnix.cpp	2004-10-05 19:48:04.000000000 +0200
-***************
-*** 634,639 ****
---- 634,640 ----
-          // get the dirs old permissions
-          if (NS_FAILED(rv = GetPermissions(&oldPerms)))
-              return rv;
-+         oldPerms |= 0200;
-          if (NS_FAILED(rv = newParent->Create(DIRECTORY_TYPE, oldPerms)))
-              return rv;
-      } else {    // dir exists lets try to use leaf
-***************
-*** 758,763 ****
---- 759,765 ----
-          // get the old permissions
-          PRUint32 myPerms;
-          GetPermissions(&myPerms);
-+         myPerms |= 0200;
-  
-          // Create the new file with the old file's permissions, even if write
-          // permission is missing.  We can't create with write permission and
diff --git a/pkgs/applications/networking/browsers/firefox/xlibs.patch b/pkgs/applications/networking/browsers/firefox/xlibs.patch
deleted file mode 100644
index a656fbf9beb4..000000000000
--- a/pkgs/applications/networking/browsers/firefox/xlibs.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- mozilla/layout/build/Makefile.in.orig	2007-01-13 14:23:19.000000000 -0200
-+++ mozilla/layout/build/Makefile.in	2007-01-13 14:24:55.000000000 -0200
-@@ -282,5 +282,6 @@ LDFLAGS += -Wl,-LD_LAYOUT:lgot_buffer=50
- endif
- endif
- 
-+LDFLAGS += -lX11 -lXrender
- 
- export:: $(BUILD_DATE)
- 
\ No newline at end of file
diff --git a/pkgs/applications/networking/browsers/icecat-3/default.nix b/pkgs/applications/networking/browsers/icecat-3/default.nix
index 6be0ce4b4f30..a63584fda289 100644
--- a/pkgs/applications/networking/browsers/icecat-3/default.nix
+++ b/pkgs/applications/networking/browsers/icecat-3/default.nix
@@ -9,13 +9,13 @@
 # http://thread.gmane.org/gmane.comp.gnu.gnuzilla/1376 .
 #assert stdenv.isLinux -> (wirelesstools != null);
 
-let version = "3.6.9"; in
+let version = "3.6.15"; in
 stdenv.mkDerivation {
   name = "icecat-${version}";
 
   src = fetchurl {
     url = "mirror://gnu/gnuzilla/${version}/icecat-${version}.tar.xz";
-    sha256 = "041rdhhcaak0w0lg0wd1fdl9vlk9a466sh6y17dfz389nswyy8wr";
+    sha256 = "1px018bd81c81a4hbz0qgf89pkshkbhg4abwq1d26dwy8128cxwg";
   };
 
   buildInputs =
diff --git a/pkgs/applications/networking/browsers/icecat-4/default.nix b/pkgs/applications/networking/browsers/icecat-4/default.nix
new file mode 100644
index 000000000000..5d6f5c3acb0d
--- /dev/null
+++ b/pkgs/applications/networking/browsers/icecat-4/default.nix
@@ -0,0 +1,118 @@
+{ fetchurl, stdenv, xz, pkgconfig, gtk, pango, perl, python, ply, zip, libIDL
+, libjpeg, libpng, zlib, cairo, dbus, dbus_glib, bzip2, xlibs, alsaLib
+, libnotify, gnomevfs, libgnomeui
+, freetype, fontconfig, wirelesstools ? null, pixman
+, application ? "browser" }:
+
+# Build the WiFi stuff on Linux-based systems.
+# FIXME: Disable for now until it can actually be built:
+# http://thread.gmane.org/gmane.comp.gnu.gnuzilla/1376 .
+#assert stdenv.isLinux -> (wirelesstools != null);
+
+let version = "4.0.1.1"; in
+stdenv.mkDerivation {
+  name = "icecat-${version}";
+
+  src = fetchurl {
+    url = "mirror://gnu/gnuzilla/${version}/icecat-${version}.tar.xz";
+    sha256 = "1f1y1834pv8f5fmfb5d4d5gj2v7bxsk3k9b9g832bwq0h5203yvg";
+  };
+
+  buildInputs =
+    [ xz libgnomeui libnotify gnomevfs alsaLib
+      pkgconfig gtk perl zip libIDL libjpeg libpng zlib cairo bzip2 pixman
+      python ply dbus dbus_glib pango freetype fontconfig
+      xlibs.libXi xlibs.libX11 xlibs.libXrender xlibs.libXft xlibs.libXt
+    ]
+    ++ (stdenv.lib.optional false /* stdenv.isLinux */ wirelesstools);
+
+  patches = [
+    ./skip-gre-registration.patch ./rpath-link.patch
+  ];
+
+  configureFlags =
+    [ "--enable-application=${application}"
+      "--enable-libxul"
+      "--disable-javaxpcom"
+
+      "--enable-optimize"
+      "--disable-debug"
+      "--enable-strip"
+      "--with-system-jpeg"
+      "--with-system-zlib"
+      "--with-system-bz2"
+      # "--with-system-png" # <-- "--with-system-png won't work because the system's libpng doesn't have APNG support"
+      "--enable-system-cairo"
+      #"--enable-system-sqlite" # <-- this seems to be discouraged
+      "--disable-crashreporter"
+    ]
+    ++ (stdenv.lib.optional true /* (!stdenv.isLinux) */ "--disable-necko-wifi");
+
+  postInstall = ''
+    export dontPatchELF=1;
+
+    # Strip some more stuff
+    strip -S "$out/lib/"*"/"* || true
+
+    # This fixes starting IceCat when there already is a running
+    # instance.  The `icecat' wrapper script actually expects to be
+    # in the same directory as `run-mozilla.sh', apparently.
+    libDir=$(cd $out/lib && ls -d icecat-[0-9]*)
+    test -n "$libDir"
+
+    if [ -f "$out/bin/icecat" ]
+    then
+        # Fix references to /bin paths in the IceCat shell script.
+        substituteInPlace $out/bin/icecat		\
+            --replace /bin/pwd "$(type -tP pwd)"	\
+            --replace /bin/ls "$(type -tP ls)"
+
+        cd $out/bin
+        mv icecat ../lib/$libDir/
+        ln -s ../lib/$libDir/icecat .
+
+        # Register extensions etc.
+        echo "running \`icecat -register'..."
+        (cd $out/lib/$libDir && LD_LIBRARY_PATH=. ./icecat-bin -register) || false
+    fi
+
+    if [ -f "$out/lib/$libDir/xpidl" ]
+    then
+        # XulRunner's IDL compiler.
+        echo "linking \`xpidl'..."
+        ln -s "$out/lib/$libDir/xpidl" "$out/bin"
+    fi
+
+    # Put the GNU IceCat icon in the right place.
+    ensureDir "$out/lib/$libDir/chrome/icons/default"
+    ln -s ../../../icons/default.xpm  "$out/lib/$libDir/chrome/icons/default/"
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "GNU IceCat, a free web browser based on Mozilla Firefox";
+
+    longDescription = ''
+      Gnuzilla is the GNU version of the Mozilla suite, and GNU IceCat
+      is the GNU version of the Firefox browser.  Its main advantage
+      is an ethical one: it is entirely free software.  While the
+      source code from the Mozilla project is free software, the
+      binaries that they release include additional non-free software.
+      Also, they distribute and recommend non-free software as
+      plug-ins.  In addition, GNU IceCat includes some privacy
+      protection features.
+    '';
+
+    homepage = http://www.gnu.org/software/gnuzilla/;
+    licenses = [ "GPLv2+" "LGPLv2+" "MPLv1+" ];
+
+    maintainers = [ stdenv.lib.maintainers.ludo ];
+    platforms = stdenv.lib.platforms.gnu;
+  };
+
+  passthru = {
+    inherit gtk version;
+    isFirefox3Like = true;
+  };
+}
diff --git a/pkgs/applications/networking/browsers/icecat-4/rpath-link.patch b/pkgs/applications/networking/browsers/icecat-4/rpath-link.patch
new file mode 100644
index 000000000000..d50784f13eea
--- /dev/null
+++ b/pkgs/applications/networking/browsers/icecat-4/rpath-link.patch
@@ -0,0 +1,14 @@
+Without this patch, IceCat ends up linking with
+`-Wl,-rpath-link=/bin -Wl-,-rpath-link=/lib'.
+
+--- icecat-3.5/js/src/configure	2009-07-04 18:03:01.000000000 +0200
++++ icecat-3.5/js/src/configure	2009-07-13 18:34:30.000000000 +0200
+@@ -4775,7 +4775,6 @@ HOST_AR='$(AR)'
+ HOST_AR_FLAGS='$(AR_FLAGS)'
+ 
+ MOZ_JS_LIBS='-L$(libdir) -lmozjs'
+-MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(PREFIX)/lib'
+ 
+ MOZ_COMPONENT_NSPR_LIBS='-L$(LIBXUL_DIST)/bin $(NSPR_LIBS)'
+ MOZ_XPCOM_OBSOLETE_LIBS='-L$(LIBXUL_DIST)/lib -lxpcom_compat'
+
diff --git a/pkgs/applications/networking/browsers/icecat-4/skip-gre-registration.patch b/pkgs/applications/networking/browsers/icecat-4/skip-gre-registration.patch
new file mode 100644
index 000000000000..d1fb4e3f30ab
--- /dev/null
+++ b/pkgs/applications/networking/browsers/icecat-4/skip-gre-registration.patch
@@ -0,0 +1,12 @@
+Skip "GRE" registration since that assumes write access to `/etc'.
+
+--- icecat-3.0.1-g1/xulrunner/installer/Makefile.in	2008-07-27 12:52:16.000000000 +0200
++++ icecat-3.0.1-g1/xulrunner/installer/Makefile.in	2008-09-08 17:19:17.000000000 +0200
+@@ -71,6 +71,7 @@ $(MOZILLA_VERSION).system.conf: $(topsrc
+ 	printf "[%s]\nGRE_PATH=%s\nxulrunner=true\nabi=%s" \
+ 	  $(MOZILLA_VERSION) $(installdir) $(TARGET_XPCOM_ABI)> $@
+ 
++SKIP_GRE_REGISTRATION = yes
+ ifndef SKIP_GRE_REGISTRATION
+ # to register xulrunner per-user, override this with $HOME/.gre.d
+ regdir = /etc/gre.d
diff --git a/pkgs/applications/networking/browsers/konq-plugins/default.nix b/pkgs/applications/networking/browsers/konq-plugins/default.nix
index 815e1a16964c..656e24be0718 100644
--- a/pkgs/applications/networking/browsers/konq-plugins/default.nix
+++ b/pkgs/applications/networking/browsers/konq-plugins/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, kdelibs, cmake, qt4, automoc4, phonon, kdebase, gettext  }:
+{ stdenv, fetchurl, kdelibs, cmake, qt4, automoc4, phonon, kde_baseapps, gettext  }:
 
 stdenv.mkDerivation rec {
   name = "konq-plugins-${version}";
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
     sha256 = "1hn722rcdcwmhfnn89rnvp2b4d8gds4nm483ps3jkk83d7f2xmbi";
   };
 
-  buildInputs = [ cmake kdelibs qt4 automoc4 phonon kdebase gettext ];
+  buildInputs = [ cmake kdelibs qt4 automoc4 phonon kde_baseapps gettext ];
 
   patches = [ ./qt47.patch ];
 
diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-10/builder.sh b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-10/builder.sh
index 2574ecb73eec..4db487f5c51c 100644
--- a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-10/builder.sh
+++ b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-10/builder.sh
@@ -2,6 +2,7 @@ source $stdenv/setup
 
 dontStrip=1
 dontPatchELF=1
+sourceRoot=$TMPDIR
 
 unpackPhase() {
     tar xvzf $src;
@@ -15,7 +16,7 @@ unpackPhase() {
 
 installPhase() {
     ensureDir $out/lib/mozilla/plugins
-    cp -p libflashplayer.so $out/lib/mozilla/plugins
+    cp -pv libflashplayer.so $out/lib/mozilla/plugins
     patchelf --set-rpath "$rpath" $out/lib/mozilla/plugins/libflashplayer.so
 }
 
diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-10/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-10/default.nix
index c20848eb2dac..462099ea8f2a 100644
--- a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-10/default.nix
+++ b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-10/default.nix
@@ -17,6 +17,7 @@
 , pango
 , cairo
 , atk
+, gdk_pixbuf
 , debug ? false
 
 /* you have to add ~/mm.cfg :
@@ -41,9 +42,9 @@ let
         throw "no x86_64 debugging version available"
       else {
         # -> http://labs.adobe.com/downloads/flashplayer10.html
-        version = "10.1_p2-r092710";
-        url = http://download.macromedia.com/pub/labs/flashplayer10/flashplayer_square_p2_64bit_linux_092710.tar.gz;
-        sha256 = "188dn08n3rb6w3hzq4snqvip5njxdyc8k8arp8xnlqw331lfvapx";
+        version = "10.3.181.34";
+        url = http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_2_p3_64bit_linux_111710.tar.gz;
+        sha256 = "1w2zs2f0q1vpx4ia9pj1k4p830dwz7ypyn302mi48wcpz1wzc1gg";
       }
     else if stdenv.system == "i686-linux" then
       if debug then {
@@ -52,11 +53,11 @@ let
         url = http://download.macromedia.com/pub/labs/flashplayer10/flashplayer_square_p2_32bit_debug_linux_092710.tar.gz;
         sha256 = "11w3mxa39l4mnlsqzlwbdh1sald549afyqbx2kbid7in5qzamlcc";
       } else {
-        version = "10.1.102.64";
+        version = "10.3.183.5";
         url = http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_10_linux.tar.gz;
-        sha256 = "1jfk9va3id0m6q6csg6gfycmryvi7kylbb7dswpsh6zh1zv00s62";
+        sha256 = "1kv7szpadgv0wwmi46vc05723qzsgclz68rij6x49l61sngzmw0x";
       }
-    else throw "flashplayer is not supported on this platform";
+    else throw "Flash Player is not supported on this platform";
 
 in
 
@@ -75,7 +76,7 @@ stdenv.mkDerivation {
 
   rpath = stdenv.lib.makeLibraryPath
     [ zlib alsaLib curl nss nspr fontconfig freetype expat libX11
-      libXext libXrender libXt gtk glib pango atk cairo
+      libXext libXrender libXt gtk glib pango atk cairo gdk_pixbuf
     ];
 
   buildPhase = ":";
diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/gecko-mediaplayer/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/gecko-mediaplayer/default.nix
index d50486cd742a..ddb70e6d633e 100644
--- a/pkgs/applications/networking/browsers/mozilla-plugins/gecko-mediaplayer/default.nix
+++ b/pkgs/applications/networking/browsers/mozilla-plugins/gecko-mediaplayer/default.nix
@@ -3,11 +3,11 @@
 }:
 
 stdenv.mkDerivation rec {
-  name = "gecko-mediaplayer-0.9.99.rc1";
+  name = "gecko-mediaplayer-1.0.4";
 
   src = fetchurl {
     url = "http://gecko-mediaplayer.googlecode.com/files/${name}.tar.gz";
-    sha256 = "1ddp8z2a40wxdj7v20wqph9l4z4a47bjqzac7wlmmzjq7a9pbij2";
+    sha256 = "18asxxsqng303cxcww75k4r6syqjs7lylibv997kq0869kz4spsp";
   };
 
   buildInputs = [pkgconfig glib dbus dbus_glib browser x11 GConf browser.xulrunner];
diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/google-talk-plugin/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/google-talk-plugin/default.nix
new file mode 100644
index 000000000000..3ae24bdddf98
--- /dev/null
+++ b/pkgs/applications/networking/browsers/mozilla-plugins/google-talk-plugin/default.nix
@@ -0,0 +1,92 @@
+{ stdenv, fetchurl, rpm, cpio, pkgsi686Linux, mesa, xorg, cairo
+, libpng, gtk, glib, fontconfig, freetype, curl
+}:
+
+with stdenv.lib;
+
+let
+
+  rpathNative = makeLibraryPath
+    [ stdenv.gcc.gcc
+      mesa
+      xorg.libXt
+      xorg.libX11
+      cairo
+      libpng
+      gtk
+      glib
+      fontconfig
+      freetype
+      curl
+    ];
+
+  rpath32 = makeLibraryPath
+    [ pkgsi686Linux.gtkLibs.gdk_pixbuf
+      pkgsi686Linux.gtkLibs.glib
+      pkgsi686Linux.gtkLibs.gtk
+      pkgsi686Linux.xorg.libX11
+      pkgsi686Linux.xorg.libXcomposite
+      pkgsi686Linux.xorg.libXfixes
+      pkgsi686Linux.xorg.libXrender
+      pkgsi686Linux.xorg.libXrandr
+      pkgsi686Linux.gcc.gcc
+      pkgsi686Linux.alsaLib
+      pkgsi686Linux.pulseaudio
+      pkgsi686Linux.dbus_glib
+      pkgsi686Linux.udev
+    ];
+
+in
+
+stdenv.mkDerivation {
+  name = "google-talk-plugin-2.107.0";
+
+  src =
+    if stdenv.system == "x86_64-linux" then
+      fetchurl {
+        url = "http://dl.google.com/linux/direct/google-talkplugin_current_x86_64.rpm";
+        sha256 = "01c8w221azvmqvxf5lgb8l151086d72ll5wnjndwn50dvi6rphvx";
+      }
+    else
+      throw "Google Talk does not support your platform.";
+
+  buildInputs = [ rpm cpio ];
+      
+  unpackPhase =
+    ''
+      rpm2cpio $src | cpio -i --make-directories -v
+    '';
+
+  installPhase =
+    ''
+      mkdir -p $out/lib/mozilla/plugins
+      cp opt/google/talkplugin/libnp*.so $out/lib/mozilla/plugins/
+
+      patchelf --set-rpath "${makeLibraryPath [ stdenv.gcc.gcc ]}:${stdenv.gcc.gcc}/lib64" \
+        $out/lib/mozilla/plugins/libnpgoogletalk64.so
+
+      patchelf --set-rpath "$out/libexec/google/talkplugin/lib:${rpathNative}:${stdenv.gcc.gcc}/lib64" \
+        $out/lib/mozilla/plugins/libnpgtpo3dautoplugin.so
+
+      mkdir -p $out/libexec/google/talkplugin
+      cp opt/google/talkplugin/GoogleTalkPlugin $out/libexec/google/talkplugin/
+      
+      mkdir -p $out/libexec/google/talkplugin/lib
+      cp opt/google/talkplugin/lib/libCg* $out/libexec/google/talkplugin/lib/
+
+      patchelf \
+        --set-interpreter ${pkgsi686Linux.glibc}/lib/ld-linux*.so.2 \
+        --set-rpath ${rpath32} \
+        $out/libexec/google/talkplugin/GoogleTalkPlugin
+    '';
+
+  dontStrip = true;
+  dontPatchELF = true;
+  
+  passthru.mozillaPlugin = "/lib/mozilla/plugins";
+
+  meta = {
+    homepage = http://www.google.com/chat/video/;
+    license = "unfree";
+  };
+}
\ No newline at end of file
diff --git a/pkgs/applications/networking/browsers/rekonq/default.nix b/pkgs/applications/networking/browsers/rekonq/default.nix
index f9b8061d5ebd..ee37c2450a64 100644
--- a/pkgs/applications/networking/browsers/rekonq/default.nix
+++ b/pkgs/applications/networking/browsers/rekonq/default.nix
@@ -2,12 +2,12 @@
 , gettext}:
 
 stdenv.mkDerivation rec {
-  name = "rekonq-0.6.1";
+  name = "rekonq-0.7.0";
   passthru = { inherit stdenv; };
 
   src = fetchurl {
     url = "mirror://sf/rekonq/${name}.tar.bz2";
-    sha256 = "1hgy8ph4k4ngdy1kr4w3qwkfdylapsj7rjpk8wxn97yc4qnk57by";
+    sha256 = "14gi8ic53jkam2v52zp4p965dw6pqhjm3xhqssm5vimx7hp0kc1w";
   };
 
   buildInputs = [ cmake qt4 kdelibs automoc4 phonon perl gettext ];
diff --git a/pkgs/applications/networking/browsers/uzbl/default.nix b/pkgs/applications/networking/browsers/uzbl/default.nix
index 05dfaa3e67ee..145e5de90b72 100644
--- a/pkgs/applications/networking/browsers/uzbl/default.nix
+++ b/pkgs/applications/networking/browsers/uzbl/default.nix
@@ -28,7 +28,8 @@ rec {
       --prefix GST_PLUGIN_PATH : ${a.webkit.gstreamer}/lib/gstreamer-* \
       --prefix GST_PLUGIN_PATH : ${a.webkit.gstPluginsBase}/lib/gstreamer-* \
       --prefix GST_PLUGIN_PATH : ${a.webkit.gstPluginsGood}/lib/gstreamer-* \
-      --prefix GST_PLUGIN_PATH : ${a.webkit.gstFfmpeg}/lib/gstreamer-* 
+      --prefix GST_PLUGIN_PATH : ${a.webkit.gstFfmpeg}/lib/gstreamer-* \
+      --prefix GIO_EXTRA_MODULES : ${a.glib_networking}/lib/gio/modules
     '';
 
   installFlags = "PREFIX=$out";
diff --git a/pkgs/applications/networking/browsers/w3m/default.nix b/pkgs/applications/networking/browsers/w3m/default.nix
index 6844e582026c..d5294c961e64 100644
--- a/pkgs/applications/networking/browsers/w3m/default.nix
+++ b/pkgs/applications/networking/browsers/w3m/default.nix
@@ -8,12 +8,12 @@
 assert sslSupport -> openssl != null;
 assert graphicsSupport -> x11 != null;
 
-stdenv.mkDerivation {
-  name = "w3m-0.5.2";
+stdenv.mkDerivation rec {
+  name = "w3m-0.5.3";
 
   src = fetchurl {
-    url = mirror://sourceforge/w3m/w3m-0.5.2.tar.gz;
-    md5 = "ba06992d3207666ed1bf2dcf7c72bf58";
+    url = "mirror://sourceforge/w3m/${name}.tar.gz";
+    sha256 = "1qx9f0kprf92r1wxl3sacykla0g04qsi0idypzz24b7xy9ix5579";
   };
 
   # Patch for the newer unstable boehm-gc 7.2alpha. Not all platforms use that
diff --git a/pkgs/applications/networking/ekiga/default.nix b/pkgs/applications/networking/ekiga/default.nix
index d411c3b0f57c..276df1ae7a15 100644
--- a/pkgs/applications/networking/ekiga/default.nix
+++ b/pkgs/applications/networking/ekiga/default.nix
@@ -3,7 +3,7 @@ x@{builderDefsPackage
   , perl, perlXMLParser, evolution_data_server, gnome_doc_utils, avahi
   , libsigcxx, gtk, dbus_glib, libnotify, libXext, xextproto, automake
   , autoconf, pkgconfig, libxml2, videoproto, unixODBC, db4, nspr, nss, zlib
-  , libXrandr, randrproto, which, libxslt, libtasn1
+  , libXrandr, randrproto, which, libxslt, libtasn1, gmp, nettle
   , ...}:
 builderDefsPackage
 (a :  
diff --git a/pkgs/applications/networking/esniper/default.nix b/pkgs/applications/networking/esniper/default.nix
new file mode 100644
index 000000000000..5aaf419d3897
--- /dev/null
+++ b/pkgs/applications/networking/esniper/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl, openssl, curl }:
+
+stdenv.mkDerivation {
+  name = "esniper-2.26.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/esniper/esniper-2-26-0.tgz";
+    sha256 = "5fd9a0f4b27b98deca303cd3d16c1ed060e05a165a40b2f4a9f8546db5e3877d";
+  };
+
+  buildInputs = [openssl curl];
+
+  postInstall = ''
+    sed -e  "2i export PATH=\"$out/bin:\$PATH\"" <"frontends/snipe" >"$out/bin/snipe"
+    chmod 555 "$out/bin/snipe"
+  '';
+
+  meta = {
+    description = "Simple, lightweight tool for sniping eBay auctions";
+    homepage = "http://esnipe.rsourceforge.net";
+    license = "GPLv2";
+
+    platforms = stdenv.lib.platforms.all;
+    maintainers = [ stdenv.lib.maintainers.simons ];
+  };
+}
+
+
diff --git a/pkgs/applications/networking/instant-messengers/bitlbee-otr/default.nix b/pkgs/applications/networking/instant-messengers/bitlbee-otr/default.nix
deleted file mode 100644
index 972c812b2566..000000000000
--- a/pkgs/applications/networking/instant-messengers/bitlbee-otr/default.nix
+++ /dev/null
@@ -1,38 +0,0 @@
-{ stdenv, fetchbzr, gnutls, glib, pkgconfig, libotr, libgcrypt
-, libxslt, xmlto, docbook_xsl, docbook_xml_dtd_42, perl }:
-
-let revision = "369"; in
-stdenv.mkDerivation rec {
-  name = "bitlbee-otr-r${revision}";
-  src = fetchbzr {
-    url = "http://khjk.org/~pesco/bitlbee-otr";
-    sha256 = "0fb7987ec4a321e07f22690ed6617db9f377fdf4e65a531d8da28a950817074f";
-    inherit revision;
-  };
-
-  patchPhase = ''
-    # Both OTR and GnuTLS depend on libgcrypt, but for some reason, `bitlbee'
-    # must be explicitly linked against it.
-    sed -i "configure" -e "s|-f \$""{i}/lib/libotr.a|0 -eq 0|g ;
-                           s|otrprefix=\$""{i}|otrprefix=\"${libotr}\"|g ;
-                           s|-lotr|-lotr -L${libgcrypt} -lgcrypt|g";
-  '';
-
-  buildInputs = [ gnutls glib pkgconfig libotr libgcrypt
-    libxslt xmlto docbook_xsl docbook_xml_dtd_42 perl
-  ];
-
-  meta = {
-    description = ''BitlBee, an IRC to other chat networks gateway.'';
-
-    longDescription = ''
-      This unofficial version adds support for communication encryption
-      and authentication via the OTR (off-the-record) library.
-    '';
-
-    # See also http://bugs.bitlbee.org/bitlbee/ticket/115 .
-    homepage = http://khjk.org/bitlbee-otr/;
-
-    license = "GPL";
-  };
-}
diff --git a/pkgs/applications/networking/instant-messengers/bitlbee/default.nix b/pkgs/applications/networking/instant-messengers/bitlbee/default.nix
index f207eaed7037..1d49e0d1ff78 100644
--- a/pkgs/applications/networking/instant-messengers/bitlbee/default.nix
+++ b/pkgs/applications/networking/instant-messengers/bitlbee/default.nix
@@ -1,16 +1,19 @@
-{ fetchurl, stdenv, gnutls, glib, pkgconfig, check }:
+{ fetchurl, stdenv, gnutls, glib, pkgconfig, check, libotr }:
 
 stdenv.mkDerivation rec {
-  name = "bitlbee-1.2.8";
+  name = "bitlbee-3.0.3";
 
   src = fetchurl {
     url = "mirror://bitlbee/src/${name}.tar.gz";
-    sha256 = "11lfxvra46mwcnlxvhnywv6xbp7zl3h27hsbfwdh16b6fy41n1is";
+    sha256 = "09dgwfqznd2cnqraksivmh132nnl99gwgplynjmfsyyf6y4pbjl2";
   };
 
-  buildInputs = [ gnutls glib pkgconfig ]
+  buildInputs = [ gnutls glib pkgconfig libotr ]
     ++ stdenv.lib.optional doCheck check;
 
+  configureFlags = [ "--otr=1" ];
+
+  preCheck = "mkdir tests/.depend";
   doCheck = true;
 
   meta = {
diff --git a/pkgs/applications/networking/instant-messengers/freetalk/01_callbacks_const_fix.diff b/pkgs/applications/networking/instant-messengers/freetalk/01_callbacks_const_fix.diff
new file mode 100644
index 000000000000..5fe871601229
--- /dev/null
+++ b/pkgs/applications/networking/instant-messengers/freetalk/01_callbacks_const_fix.diff
@@ -0,0 +1,25 @@
+Description: Patch to fix FTBFS due to a modified const in src/callbacks.cc
+Forwarded: yes
+Origin: Ubuntu,
+https://bugs.launchpad.net/ubuntu/+source/freetalk/+bug/443241
+Bug-Debian: http://bugs.debian.org/560535
+Author: Jon Bernard <bernardj@gmail.com>
+--- 3.2-1.orig/src/callbacks.cc	2008-11-15 10:41:22.000000000 +0000
++++ 3.2-1/src/callbacks.cc	2009-10-21 15:50:49.000000000 +0100
+@@ -116,13 +116,13 @@ ft_msg_msg_handler (LmMessageHandler *ha
+ 		    LmMessage *msg, gpointer user_data)
+ {
+   LmMessageNode *root, *body, *x;
+-  const char *from, *msg_str, *type;
+-  char *ts = NULL;
++  const char *msg_str, *type;
++  char *from, *ts = NULL;
+ 
+   root = lm_message_get_node (msg);
+   body = lm_message_node_get_child (root, "body");
+ 
+-  from = lm_message_node_get_attribute (msg->node, "from");
++  from = (char *) lm_message_node_get_attribute (msg->node, "from");
+ 
+   /* since the file-transfer happens in-band with messages, we can no longer
+    * ignore messages with no 'body' */
diff --git a/pkgs/applications/networking/instant-messengers/freetalk/default.nix b/pkgs/applications/networking/instant-messengers/freetalk/default.nix
new file mode 100644
index 000000000000..cdbc4233cf48
--- /dev/null
+++ b/pkgs/applications/networking/instant-messengers/freetalk/default.nix
@@ -0,0 +1,51 @@
+x@{builderDefsPackage
+  , guile, pkgconfig, glib, loudmouth, gmp, libidn, readline, libtool
+  , libunwind, ncurses
+  , ...}:
+builderDefsPackage
+(a :  
+let 
+  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 
+    [];
+
+  buildInputs = map (n: builtins.getAttr n x)
+    (builtins.attrNames (builtins.removeAttrs x helperArgNames));
+  sourceInfo = rec {
+    baseName="freetalk";
+    version="3.2";
+    name="${baseName}-${version}";
+    url="mirror://savannah/${baseName}/${name}.tar.gz";
+    hash="12dn7yj9k5xsrrjlnma77wzpvsdxjccwla1q0wy3lacl5l2p0jms";
+  };
+in
+rec {
+  src = a.fetchurl {
+    url = sourceInfo.url;
+    sha256 = sourceInfo.hash;
+  };
+
+  inherit (sourceInfo) name version;
+  inherit buildInputs;
+
+  patches = [./01_callbacks_const_fix.diff];
+
+  /* doConfigure should be removed if not needed */
+  phaseNames = ["doPatch" "doConfigure" "doMakeInstall"];
+      
+  meta = {
+    description = "Console XMPP client";
+    maintainers = with a.lib.maintainers;
+    [
+      raskin
+    ];
+    platforms = with a.lib.platforms;
+      linux;
+    license = a.lib.licenses.gpl3Plus;
+  };
+  passthru = {
+    updateInfo = {
+      downloadPage = "http://www.gnu.org/software/freetalk/";
+    };
+  };
+}) x
+
diff --git a/pkgs/applications/networking/instant-messengers/kadu/config.patch b/pkgs/applications/networking/instant-messengers/kadu/config.patch
new file mode 100644
index 000000000000..263898ba0db1
--- /dev/null
+++ b/pkgs/applications/networking/instant-messengers/kadu/config.patch
@@ -0,0 +1,15 @@
+diff --git a/.config b/.config
+index e0068bf..808ebf4 100644
+--- a/.config
++++ b/.config
+@@ -187,8 +187,8 @@ module_history_migration=m
+ # PL: Obsługa szyfrowania wiadomości przy pomocy OpenSSLa
+ # Platform: Linux, Mac OS X, Windows
+ # Needs: libcrypto, libssl
+-module_encryption_ng=m
+-module_encryption_ng_simlite=m
++module_encryption_ng=n
++module_encryption_ng_simlite=n
+ 
+ # Description: Auto away module
+ # PL: Obsługa automatycznej zmiany statusu po określonym czasie bezczynności
diff --git a/pkgs/applications/networking/instant-messengers/kadu/default.nix b/pkgs/applications/networking/instant-messengers/kadu/default.nix
index c35d71fbca0a..70c7d7234e0c 100644
--- a/pkgs/applications/networking/instant-messengers/kadu/default.nix
+++ b/pkgs/applications/networking/instant-messengers/kadu/default.nix
@@ -1,27 +1,33 @@
-{ stdenv, fetchurl, cmake, qt4, libgadu, libXScrnSaver, libsndfile, qca2
-, libX11, alsaLib }:
+{ stdenv, fetchurl, cmake, qt4, libgadu, libXScrnSaver, libsndfile, libX11,
+  alsaLib, aspell, libidn, qca2, phonon }:
 
 stdenv.mkDerivation {
 
-  name = "kadu-0.6.5.4";
+  name = "kadu-0.9.2";
 
   src = fetchurl {
-    url = http://www.kadu.net/download/stable/kadu-0.6.5.4.tar.bz2;
-    sha256 = "09bdcyx75lca1pl6x3vfpawmdjn5pfxvwivb9xdhk4bdvswxgv4x";
+    url = http://www.kadu.net/download/stable/kadu-0.9.2.tar.bz2;
+    sha256 = "05lpx7m2adx8vv4h62rsiwlgay24m6cxdbibg7vzl4xkq9ybv30b";
   };
-  
+
   buildInputs = [
-    cmake qt4 libgadu libXScrnSaver libsndfile qca2 libX11 alsaLib
+    cmake qt4 libgadu libXScrnSaver libsndfile libX11 alsaLib aspell libidn qca2 phonon
   ];
 
-  cmakeFlags = "-DENABLE_AUTODOWNLOAD=OFF";
+  configureFlags = "CPPFLAGS=-DQT_NO_DEBUG";
+
+  cmakeFlags = "-DENABLE_AUTODOWNLOAD=OFF -DBUILD_DESCRIPTION='NixOS' -DCMAKE_BUILD_TYPE=Release";
 
   prePatch = ''
     patchShebangs .
   '';
 
-  meta = { 
-    description = "An instance messanger client for the gadu-gadu network (most popular polish IM network)";
+  patches = [ ./config.patch ];
+
+  NIX_LDFLAGS="-lX11";
+
+  meta = {
+    description = "An instant-messenger client for the gadu-gadu network (most popular polish IM network)";
     homepage = http://www.kadu.net/w/English:Main_Page;
     license = "GPLv2";
     platforms = stdenv.lib.platforms.linux;
diff --git a/pkgs/applications/networking/instant-messengers/kadu/more-icons.patch b/pkgs/applications/networking/instant-messengers/kadu/more-icons.patch
deleted file mode 100644
index 60234d361f7c..000000000000
--- a/pkgs/applications/networking/instant-messengers/kadu/more-icons.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- kadu/.config	2010-01-18 17:13:31.000000000 +0100
-+++ kadu/.config	2010-09-28 21:21:48.000000000 +0200
-@@ -559,10 +559,10 @@ icons_glass16=y
- icons_glass22=y
- 
- # Desctiption: Tango 16x16 icons made by BlotoPosniegowe
--icons_tango16=n
-+icons_tango16=y
- 
- # Description: Oxygen 16x16 icons maintained by Piotr Pelzowski
--icons_oxygen16=n
-+icons_oxygen16=y
diff --git a/pkgs/applications/networking/instant-messengers/oneteam/default.nix b/pkgs/applications/networking/instant-messengers/oneteam/default.nix
new file mode 100644
index 000000000000..37f56a638068
--- /dev/null
+++ b/pkgs/applications/networking/instant-messengers/oneteam/default.nix
@@ -0,0 +1,90 @@
+x@{builderDefsPackage
+  , fetchgit, perl, xulrunner, cmake, perlPackages, zip, unzip, pkgconfig
+  , pulseaudio, gtkLibs, pixman, nspr, nss, libXScrnSaver, scrnsaverproto
+  , ...}:
+builderDefsPackage
+(a :  
+let 
+  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 
+    ["fetchgit" "perlPackages" "gtkLibs"];
+
+  buildInputs = map (n: builtins.getAttr n x)
+    (builtins.attrNames (builtins.removeAttrs x helperArgNames)) ++ [
+      a.perlPackages.SubName a.gtkLibs.gtk a.gtkLibs.glib
+    ];
+  sourceInfo = rec {
+    baseName="oneteam";
+    version="git-head";
+    name="${baseName}-${version}";
+    url="git://git.process-one.net/oneteam/oneteam.git";
+    rev="066cd861ea4436bbe363f032c58a746a1cac7498";
+    hash="972310d6ef20db7dc749d7d935aa50889afe2004db2a07409830e09ef639f30a";
+    method="fetchgit";
+  };
+in
+rec {
+  srcDrv = a.fetchgit {
+    url = sourceInfo.url;
+    sha256 = sourceInfo.hash;
+    rev = sourceInfo.rev;
+  };
+
+  src=srcDrv + "/";
+
+  inherit (sourceInfo) name version;
+  inherit buildInputs;
+
+  /* doConfigure should be removed if not needed */
+  phaseNames = ["goComponents" "setVars" "fixComponents" "doCmake" 
+    "doMakeInstall" "goBack" "buildApp" "doDeploy"];
+
+  fixComponents = a.fullDepEntry ''
+    sed -e '1i#include <netinet/in.h>' -i src/rtp/otRTPDecoder.cpp src/rtp/otRTPEncoder.cpp
+  '' ["minInit" "doUnpack"];
+
+  setVars=a.noDepEntry ''
+    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${nspr}/include/nspr"
+  '';
+
+  cmakeBuildDir="cmake-build";
+  cmakeFlags=["-D XPCOM_GECKO_SDK=${xulrunner}/lib/xulrunner-devel-${xulrunner.version}"];
+
+  goComponents=a.fullDepEntry "cd src/components" ["doUnpack"];
+  goBack=a.noDepEntry "cd ../../..";
+
+  buildApp=a.fullDepEntry ''
+    perl build.pl XULAPP 1
+  '' ["addInputs"];
+
+  doDeploy = a.fullDepEntry ''
+    TARGET_DIR="$out/share/oneteam/app"
+    BUILD_DIR="$PWD"
+    ensureDir "$TARGET_DIR"
+    cd "$TARGET_DIR"
+    unzip "$BUILD_DIR/oneteam.xulapp"
+    ensureDir "$out/bin"
+    echo "#! ${a.stdenv.shell}" > "$out/bin/oneteam"
+    echo "\"${xulrunner}/bin/xulrunner\" \"$TARGET_DIR/application.ini\"" > "$out/bin/oneteam"
+    chmod a+x "$out/bin/oneteam"
+    ensureDir "$out/share/doc"
+    cp -r "$BUILD_DIR/docs" "$out/share/doc/oneteam"
+  '' ["defEnsureDir"];
+
+  meta = {
+    description = "An XMPP client";
+    maintainers = with a.lib.maintainers;
+    [
+      raskin
+    ];
+    platforms = with a.lib.platforms;
+      linux;
+    license = a.lib.licenses.gpl2;
+    homepage="http://oneteam.im";
+  };
+  passthru = {
+    updateInfo = {
+      downloadPage = "git://git.process-one.net/oneteam/oneteam.git";
+    };
+  };
+}) x
+
diff --git a/pkgs/applications/networking/instant-messengers/pidgin/default.nix b/pkgs/applications/networking/instant-messengers/pidgin/default.nix
index fac93102ea58..89c3a10a45e8 100644
--- a/pkgs/applications/networking/instant-messengers/pidgin/default.nix
+++ b/pkgs/applications/networking/instant-messengers/pidgin/default.nix
@@ -17,14 +17,14 @@
   , lib, python
   , openssl ? null
   , gnutls ? null
-  , voice ? null
+  , libgcrypt ? null
 } :
 
 stdenv.mkDerivation {
-  name = "pidgin-2.7.8";
+  name = "pidgin-2.9.0";
   src = fetchurl {
-    url = mirror://sourceforge/pidgin/pidgin-2.7.8.tar.bz2;
-    sha256 = "1ci173g1xshfi4pl9wqv9g3fwxyqvdz5v61bgqpfij0hl1ss9k4c";
+    url = mirror://sourceforge/pidgin/pidgin-2.9.0.tar.bz2;
+    sha256 = "1mygaap7cbak9n9zm4wshxnvb27a68w633d712vy2knr8z78xvi8";
   };
 
   inherit nss ncurses;
@@ -34,6 +34,7 @@ stdenv.mkDerivation {
     libxml2] 
   ++ (lib.optional (openssl != null) openssl)
   ++ (lib.optional (gnutls != null) gnutls)
+  ++ (lib.optional (libgcrypt != null) libgcrypt)
   ++
   [nss nspr farsight2
     libXScrnSaver ncurses python
@@ -45,7 +46,7 @@ stdenv.mkDerivation {
     pkgconfig gtk perl perlXMLParser gettext
   ];
 
-  patches = [./pidgin-makefile.patch];
+  patches = [./pidgin-makefile.patch ];
 
   configureFlags="--with-nspr-includes=${nspr}/include/nspr --with-nspr-libs=${nspr}/lib --with-nss-includes=${nss}/include/nss --with-nss-libs=${nss}/lib --with-ncurses-headers=${ncurses}/include --disable-meanwhile --disable-nm --disable-tcl"
   + (lib.optionalString (gnutls != null) " --enable-gnutls=yes --enable-nss=no")
diff --git a/pkgs/applications/networking/instant-messengers/vacuum/default.nix b/pkgs/applications/networking/instant-messengers/vacuum/default.nix
index a08cc2795bbb..41658be08a9d 100644
--- a/pkgs/applications/networking/instant-messengers/vacuum/default.nix
+++ b/pkgs/applications/networking/instant-messengers/vacuum/default.nix
@@ -1,6 +1,6 @@
 x@{builderDefsPackage
   , qt4, openssl
-  , xproto, libX11
+  , xproto, libX11, libXScrnSaver, scrnsaverproto
   , ...}:
 builderDefsPackage
 (a :  
@@ -11,11 +11,11 @@ let
   buildInputs = map (n: builtins.getAttr n x)
     (builtins.attrNames (builtins.removeAttrs x helperArgNames));
   sourceInfo = rec {
-    version="1.0.2";
+    version="1.1.0";
     baseName="vacuum";
     name="${baseName}-${version}";
-    url="http://vacuum-im.googlecode.com/files/${name}-source.tar.gz";
-    hash="01ndwxpgr8911f2nfyb6i7avmmlwfikn031q1s60js4lgbqdq3b7";
+    url="http://vacuum-im.googlecode.com/files/${name}.tar.gz";
+    hash="c956b0cf5cc0a1acee47a96f0b0e7ab5d716e48cac4a7fcbca496f901a219dcc";
   };
 in
 rec {
@@ -35,8 +35,6 @@ rec {
     sed -re 's/qHash[(][a-z ]*QUrl/vacuum_obsolete_&/' -i src/plugins/dataforms/dataforms.cpp
   '') ["minInit" "doUnpack"];
 
-  goSrcDir = ''cd vacuum-*/'';
-
   doQMake = a.fullDepEntry (''
     qmake INSTALL_PREFIX=$out -recursive vacuum.pro
   '') ["doUnpack" "addInputs"];
diff --git a/pkgs/applications/networking/irc/chatzilla/default.nix b/pkgs/applications/networking/irc/chatzilla/default.nix
index b981c105a0c9..a0197a99a509 100644
--- a/pkgs/applications/networking/irc/chatzilla/default.nix
+++ b/pkgs/applications/networking/irc/chatzilla/default.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchurl, unzip }:
 
 stdenv.mkDerivation rec {
-  name = "chatzilla-0.9.86";
+  name = "chatzilla-0.9.86.1";
   
   src = fetchurl {
     # Obtained from http://chatzilla.rdmsoft.com/xulrunner/.
-    url = http://chatzilla.rdmsoft.com/xulrunner/download/chatzilla-0.9.86-xr.zip;
-    sha256 = "1z8767arx2ncch0pzkdzhisjgmd45qianahz3xr8isvahv2klj5x";
+    url = http://chatzilla.rdmsoft.com/xulrunner/download/chatzilla-0.9.86.1-xr.zip;
+    sha256 = "06s4g0x7hsckd7wr904j8rzksvqhvcrhl9zwga2458rgafcbbghd";
   };
 
   buildInputs = [ unzip ];
diff --git a/pkgs/applications/networking/irc/quassel/default.nix b/pkgs/applications/networking/irc/quassel/default.nix
index 2be964db3312..8dcde90e538e 100644
--- a/pkgs/applications/networking/irc/quassel/default.nix
+++ b/pkgs/applications/networking/irc/quassel/default.nix
@@ -11,11 +11,11 @@ let
 
 in with stdenv; mkDerivation rec {
 
-  name = "quassel-0.6.1";
+  name = "quassel-0.7.1";
 
   src = fetchurl {
     url = "http://quassel-irc.org/pub/${name}.tar.bz2";
-    sha256 = "1v5mxligfygn7r7hm3b9by38qxigncfkp6w4n8ypp8ww6n8ml6z0";
+    sha256 = "1kby1yikiv5bpzkdri5dq39pxnsj9gjrcv1gigvy2jzy3g99qjli";
   };
 
   buildInputs = [ cmake qt4 ]
diff --git a/pkgs/applications/networking/linphone/default.nix b/pkgs/applications/networking/linphone/default.nix
new file mode 100644
index 000000000000..07ca19b63cc5
--- /dev/null
+++ b/pkgs/applications/networking/linphone/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, fetchurl, intltool, pkgconfig, gtk, libglade, libosip, libexosip, speex,
+  readline, ffmpeg, alsaLib, SDL, libv4l, libtheora, libXv }:
+        
+stdenv.mkDerivation rec {
+  name = "linphone-3.4.3";
+
+  src = fetchurl {
+    url = "mirror://savannah/linphone/3.4.x/sources/${name}.tar.gz";
+    sha256 = "14k655z0kfmnm42nxhsl25rjim9swrr4kpnplkx3pd9b3yha1rwj";
+  };
+
+  buildInputs = [ intltool pkgconfig gtk libglade libosip libexosip speex readline
+    ffmpeg alsaLib SDL libv4l libtheora libXv ];
+
+  meta = {
+    homepage = http://www.linphone.org/;
+    description = "Open Source video SIP softphone";
+    license = "GPLv2+";
+  };
+}
diff --git a/pkgs/applications/networking/mailreaders/mutt/default.nix b/pkgs/applications/networking/mailreaders/mutt/default.nix
index ffe4ca327126..02870c70f646 100644
--- a/pkgs/applications/networking/mailreaders/mutt/default.nix
+++ b/pkgs/applications/networking/mailreaders/mutt/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ncurses, which, perl
+{ stdenv, fetchurl, ncurses, which, perl, gpgme
 , sslSupport ? true
 , imapSupport ? true
 , headerCache ? true
@@ -12,18 +12,16 @@ assert headerCache -> gdbm != null;
 assert sslSupport -> openssl != null;
 assert saslSupport -> cyrus_sasl != null;
 
-stdenv.mkDerivation {
-  name = "mutt-1.5.20";
+stdenv.mkDerivation rec {
+  name = "mutt-1.5.21";
   
   src = fetchurl {
-    url = ftp://ftp.mutt.org/mutt/devel/mutt-1.5.20.tar.gz;
-    sha256 = "15m7m419r82awx4mr4nam25m0kpg0bs9vw1z4a4mrzvlkl3zqycm";
+    url = "ftp://ftp.mutt.org/mutt/devel/${name}.tar.gz";
+    sha256 = "1864cwz240gh0zy56fb47qqzwyf6ghg01037rb4p2kqgimpg6h91";
   };
 
-  patches = [ ./openssl.patch ];
-  
   buildInputs = [
-    ncurses which perl
+    ncurses which perl gpgme
     (if headerCache then gdbm else null)
     (if sslSupport then openssl else null)
     (if saslSupport then cyrus_sasl else null)
@@ -33,7 +31,7 @@ stdenv.mkDerivation {
     "--with-mailpath=" "--enable-smtp"
 
     # This allows calls with "-d N", that output debug info into ~/.muttdebug*
-    "--enable-debug"
+    "--enable-debug" "--enable-pop" "--enable-imap" "--enable-gpgme"
 
     # The next allows building mutt without having anything setgid
     # set by the installer, and removing the need for the group 'mail'
diff --git a/pkgs/applications/networking/mailreaders/mutt/openssl.patch b/pkgs/applications/networking/mailreaders/mutt/openssl.patch
deleted file mode 100644
index 6476075d67de..000000000000
--- a/pkgs/applications/networking/mailreaders/mutt/openssl.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Fixes a compilation problem with OpenSSL 1.0.0.
-From http://www.freebsd.org/cgi/query-pr.cgi?pr=146261
-
-diff -ru -x '*~' mutt-1.5.20-orig/mutt_ssl.c mutt-1.5.20/mutt_ssl.c
---- mutt-1.5.20-orig/mutt_ssl.c	2009-06-10 07:08:29.000000000 +0200
-+++ mutt-1.5.20/mutt_ssl.c	2010-07-24 10:46:08.000000000 +0200
-@@ -652,7 +652,7 @@
-   char *buf = NULL;
-   int bufsize;
-   /* needed to get the DNS subjectAltNames: */
--  STACK *subj_alt_names;
-+  STACK_OF(GENERAL_NAME) *subj_alt_names;
-   int subj_alt_names_count;
-   GENERAL_NAME *subj_alt_name;
-   /* did we find a name matching hostname? */
diff --git a/pkgs/applications/networking/mailreaders/notmuch/default.nix b/pkgs/applications/networking/mailreaders/notmuch/default.nix
new file mode 100644
index 000000000000..830ef82cf7a8
--- /dev/null
+++ b/pkgs/applications/networking/mailreaders/notmuch/default.nix
@@ -0,0 +1,84 @@
+{ fetchgit, stdenv, bash, emacs, gdb, git, glib, gmime, gnupg1, pkgconfig, talloc, xapian }:
+
+stdenv.mkDerivation rec {
+  name = "notmuch-0.6-rc4";
+
+  src = fetchgit {
+    url = "git://github.com/chaoflow/notmuch";
+    rev = "9f8ef78e0c6b28918f3edda06b59a9e8f9bef8e3";
+    sha256 = "c7c425c10a695ca22dfbdf5fe8e0dcb6a888edc0b3388023e7ff35f69acc0085";
+  };
+
+  buildInputs = [ bash emacs gdb git glib gmime gnupg1 pkgconfig talloc xapian ];
+
+  # XXX: Make me a loop
+  patchPhase = ''
+    substituteInPlace "test/atomicity" \
+      --replace "#!/bin/bash" "#!${bash}/bin/bash"
+    substituteInPlace "test/author-order" \
+      --replace "#!/bin/bash" "#!${bash}/bin/bash"
+    substituteInPlace "test/basic" \
+      --replace "#!/bin/bash" "#!${bash}/bin/bash"
+    substituteInPlace "test/crypto" \
+      --replace "#!/bin/bash" "#!${bash}/bin/bash"
+    substituteInPlace "test/dump-restore" \
+      --replace "#!/bin/bash" "#!${bash}/bin/bash"
+    substituteInPlace "test/emacs" \
+      --replace "#!/bin/bash" "#!${bash}/bin/bash"
+    substituteInPlace "test/emacs-large-search-buffer" \
+      --replace "#!/bin/bash" "#!${bash}/bin/bash"
+    substituteInPlace "test/encoding" \
+      --replace "#!/bin/bash" "#!${bash}/bin/bash"
+    substituteInPlace "test/from-guessing" \
+      --replace "#!/bin/bash" "#!${bash}/bin/bash"
+    substituteInPlace "test/json" \
+      --replace "#!/bin/bash" "#!${bash}/bin/bash"
+    substituteInPlace "test/long-id" \
+      --replace "#!/bin/bash" "#!${bash}/bin/bash"
+    substituteInPlace "test/maildir-sync" \
+      --replace "#!/bin/bash" "#!${bash}/bin/bash"
+    substituteInPlace "test/new" \
+      --replace "#!/bin/bash" "#!${bash}/bin/bash"
+    substituteInPlace "test/notmuch-test" \
+      --replace "#!/bin/bash" "#!${bash}/bin/bash"
+    substituteInPlace "test/raw" \
+      --replace "#!/bin/bash" "#!${bash}/bin/bash"
+    substituteInPlace "test/reply" \
+      --replace "#!/bin/bash" "#!${bash}/bin/bash"
+    substituteInPlace "test/search" \
+      --replace "#!/bin/bash" "#!${bash}/bin/bash"
+    substituteInPlace "test/search-by-folder" \
+      --replace "#!/bin/bash" "#!${bash}/bin/bash"
+    substituteInPlace "test/search-insufficient-from-quoting" \
+      --replace "#!/bin/bash" "#!${bash}/bin/bash"
+    substituteInPlace "test/search-output" \
+      --replace "#!/bin/bash" "#!${bash}/bin/bash"
+    substituteInPlace "test/search-position-overlap-bug" \
+      --replace "#!/bin/bash" "#!${bash}/bin/bash"
+    substituteInPlace "test/test-lib.sh" \
+      --replace "#!/bin/bash" "#!${bash}/bin/bash"
+    substituteInPlace "test/test-verbose" \
+      --replace "#!/bin/bash" "#!${bash}/bin/bash"
+    substituteInPlace "test/thread-naming" \
+      --replace "#!/bin/bash" "#!${bash}/bin/bash"
+    substituteInPlace "test/thread-order" \
+      --replace "#!/bin/bash" "#!${bash}/bin/bash"
+    substituteInPlace "test/uuencode" \
+      --replace "#!/bin/bash" "#!${bash}/bin/bash"
+  '';
+
+  postBuild = ''
+    make test
+  '';
+
+  meta = {
+    description = "Notmuch -- The mail indexer";
+
+    longDescription = "";
+
+    license = "GPLv3";
+
+    maintainers = [ stdenv.lib.maintainers.chaoflow ];
+    platforms = stdenv.lib.platforms.gnu;  # arbitrary choice
+  };
+}
diff --git a/pkgs/applications/networking/mailreaders/thunderbird/3.x.nix b/pkgs/applications/networking/mailreaders/thunderbird/3.x.nix
index 0242f22f396b..b644837b377f 100644
--- a/pkgs/applications/networking/mailreaders/thunderbird/3.x.nix
+++ b/pkgs/applications/networking/mailreaders/thunderbird/3.x.nix
@@ -11,14 +11,14 @@
     
 }:
 
-let version = "3.1.6"; in
+let version = "3.1.9"; 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";
-    sha1 = "d9c089c64cc7a784e128d9c594ef649a35babe30";
+    sha1 = "22b153102939430180ae1873ce15ef52286ff08d";
   };
 
   buildInputs =
@@ -66,6 +66,6 @@ stdenv.mkDerivation {
 
   meta = {
     description = "Mozilla Thunderbird, a full-featured email client";
-    homepage = http://www.mozilla.com/en-US/thunderbird/;
+    homepage = http://www.mozilla.org/en-US/thunderbird/;
   };
 }
diff --git a/pkgs/applications/networking/mailreaders/thunderbird/5.x.nix b/pkgs/applications/networking/mailreaders/thunderbird/5.x.nix
new file mode 100644
index 000000000000..f80fde276542
--- /dev/null
+++ b/pkgs/applications/networking/mailreaders/thunderbird/5.x.nix
@@ -0,0 +1,83 @@
+{ stdenv, fetchurl, pkgconfig, gtk, perl, python, zip, libIDL
+, dbus_glib, bzip2, alsaLib, nspr, yasm, mesa, nss
+, libnotify, cairo, pixman, fontconfig
+
+, # 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 = "5.0"; in
+
+# from wikipedia: This Release no longer supports versions of Mac OS X
+# before Mac OS X 10.5 Leopard or Mac computers with PowerPC processors.
+stdenv.mkDerivation {
+  name = "thunderbird-${version}";
+
+  src = fetchurl {
+    url = "http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/${version}/source/thunderbird-${version}.source.tar.bz2";
+    sha1 = "392c3e0ef70b62c29a543f88b2b8d5a51bfe69a7";
+  };
+
+  buildInputs =
+    [ pkgconfig perl python zip bzip2 gtk dbus_glib alsaLib libIDL nspr libnotify
+      libnotify cairo pixman fontconfig yasm mesa nss
+    ];
+
+  patches = [
+    # Fix weird dependencies such as a so file which depends on "-lpthread".
+    ./thunderbird-build-deps.patch
+  ];
+
+  NIX_LDFLAGS = "-lpixman-1";
+
+  configureFlags =
+    [ "--enable-application=mail"
+      "--enable-optimize"
+      "--disable-debug"
+      "--enable-strip"
+      "--with-system-jpeg"
+      "--with-system-zlib"
+      # "--with-system-bz2"
+      "--with-system-nspr"
+      "--enable-system-cairo"
+      "--disable-crashreporter"
+      "--disable-necko-wifi"
+      "--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)"
+    '';
+
+  meta = with stdenv.lib; {
+    description = "Mozilla Thunderbird, a full-featured email client";
+    homepage = http://www.mozilla.org/en-US/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 ];
+  };
+}
diff --git a/pkgs/applications/networking/mailreaders/thunderbird/thunderbird-build-deps.patch b/pkgs/applications/networking/mailreaders/thunderbird/thunderbird-build-deps.patch
new file mode 100644
index 000000000000..ac074e8c8812
--- /dev/null
+++ b/pkgs/applications/networking/mailreaders/thunderbird/thunderbird-build-deps.patch
@@ -0,0 +1,21 @@
+diff -x _inst -x _build -x .svn -ur comm-miramar/config/rules.mk comm-miramar.after/config/rules.mk
+--- comm-miramar/config/rules.mk	2011-06-24 22:13:31.000000000 +0200
++++ comm-miramar/config/rules.mk	2011-08-15 12:27:07.305556040 +0200
+@@ -851,9 +851,13 @@
+ 
+ ifndef _LIBNAME_RELATIVE_PATHS
+ 
+-LIBS_DEPS += $(filter -l%, $(LIBS))
+-HOST_LIBS_DEPS += $(filter -l%, $(HOST_LIBS))
+-DSO_LDOPTS_DEPS += $(filter -l%, $(EXTRA_DSO_LDOPTS))
++LIBS_DEPS += $(patsubst -l%,$(LIB_PREFIX)%$(DLL_SUFFIX),$(filter-out -lpthread -ldl -lrt -ljemalloc -lmozmalloc,$(filter -l%, $(LIBS))))
++HOST_LIBS_DEPS += $(patsubst -l%,$(LIB_PREFIX)%$(DLL_SUFFIX),$(filter-out -lpthread -ldl -lrt -ljemalloc -lmozmalloc,$(filter -l%, $(HOST_LIBS))))
++DSO_LDOPTS_DEPS += $(patsubst -l%,$(LIB_PREFIX)%$(DLL_SUFFIX),$(filter-out -lpthread -ldl -lrt -ljemalloc -lmozmalloc,$(filter -l%, $(EXTRA_DSO_LDOPTS))))
++
++LIBS_DEPS += $(patsubst -l%,$(LIB_PREFIX)%.$(LIB_SUFFIX),$(filter -ljemalloc -lmozmalloc, $(LIBS)))
++HOST_LIBS_DEPS += $(patsubst -l%,$(LIB_PREFIX)%.$(LIB_SUFFIX),$(filter -ljemalloc -lmozmalloc, $(HOST_LIBS)))
++DSO_LDOPTS_DEPS += $(patsubst -l%,$(LIB_PREFIX)%.$(LIB_SUFFIX),$(filter -ljemalloc -lmozmalloc, $(EXTRA_DSO_LDOPTS)))
+ 
+ _LIBDIRS = $(patsubst -L%,%,$(filter -L%, $(LIBS) $(HOST_LIBS) $(EXTRA_DSO_LDOPTS)))
+ ifneq (,$(_LIBDIRS))
+Seulement dans comm-miramar.after/config: rules.mk~
diff --git a/pkgs/applications/networking/mumble/default.nix b/pkgs/applications/networking/mumble/default.nix
new file mode 100644
index 000000000000..5c9e215f8764
--- /dev/null
+++ b/pkgs/applications/networking/mumble/default.nix
@@ -0,0 +1,45 @@
+{ stdenv, fetchurl, qt4, libvorbis, boost, speechd, protobuf, libsndfile,
+ avahi, dbus, libcap,
+jackSupport ? false, 
+jackaudio ? null }:
+
+
+stdenv.mkDerivation rec {
+  name = "mumble-" + version;
+  version = "1.2.2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/mumble/${name}.tar.gz";
+    sha256 = "1s4vlkdfmyzx7h3i4060q0sf2xywl9sm6dpjhaa150blbcylwmic";
+  };
+
+  patchPhase = ''
+    sed -e s/qt_ja_JP.qm// -i src/mumble/mumble.pro src/mumble11x/mumble11x.pro
+    sed -e /qt_ja_JP.qm/d -i src/mumble/mumble_qt.qrc src/mumble11x/mumble_qt.qrc
+    patch -p1 < ${ ./mumble-jack-support.patch }
+  '';
+
+  configurePhase = ''
+    qmake CONFIG+=no-g15 CONFIG+=no-update \
+      CONFIG+=no-embed-qt-translations CONFIG+=no-ice \
+  '' 
+  + stdenv.lib.optionalString jackSupport ''
+    CONFIG+=no-oss CONFIG+=no-alsa CONFIG+=jackaudio
+  '';
+
+
+  buildInputs = [ qt4 libvorbis boost speechd protobuf libsndfile avahi dbus
+    libcap ]
+    ++ (stdenv.lib.optional jackSupport jackaudio);
+
+  installPhase = ''
+    ensureDir $out
+    cp -r ./release $out/bin
+  '';
+
+  meta = { 
+    homepage = http://mumble.sourceforge.net/;
+    description = "Low-latency, high quality voice chat software";
+    license = "BSD";
+  };
+}
diff --git a/pkgs/applications/networking/mumble/mumble-jack-support.patch b/pkgs/applications/networking/mumble/mumble-jack-support.patch
new file mode 100644
index 000000000000..7c18a33193df
--- /dev/null
+++ b/pkgs/applications/networking/mumble/mumble-jack-support.patch
@@ -0,0 +1,457 @@
+The patch was created by Filipe Coelho (falkTX) of the KXStudio
+project. http://kxstudio.sourceforge.net
+
+diff -U 3 -H -d -r -N -- mumble-1.2.2.orig/src/mumble/JackAudio.cpp mumble-1.2.2/src/mumble/JackAudio.cpp
+--- mumble-1.2.2.orig/src/mumble/JackAudio.cpp	1970-01-01 01:00:00.000000000 +0100
++++ mumble-1.2.2/src/mumble/JackAudio.cpp	2011-01-26 06:02:00.000000000 +0000
+@@ -0,0 +1,314 @@
++/* Copyright (C) 2011, Benjamin Jemlich <pcgod@users.sourceforge.net>
++   Copyright (C) 2011, Filipe Coelho <falktx@gmail.com>
++
++   All rights reserved.
++
++   Redistribution and use in source and binary forms, with or without
++   modification, are permitted provided that the following conditions
++   are met:
++
++   - Redistributions of source code must retain the above copyright notice,
++     this list of conditions and the following disclaimer.
++   - Redistributions in binary form must reproduce the above copyright notice,
++     this list of conditions and the following disclaimer in the documentation
++     and/or other materials provided with the distribution.
++   - Neither the name of the Mumble Developers nor the names of its
++     contributors may be used to endorse or promote products derived from this
++     software without specific prior written permission.
++
++   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
++   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
++   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
++   A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR
++   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
++   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
++   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
++   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
++   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
++   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
++   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++*/
++
++#include "JackAudio.h"
++#include "User.h"
++#include "Global.h"
++#include "MainWindow.h"
++#include "Timer.h"
++
++#include <cstring>
++
++static JackAudioSystem *jasys = NULL;
++
++class JackAudioInputRegistrar : public AudioInputRegistrar {
++        public:
++                JackAudioInputRegistrar();
++                virtual AudioInput *create();
++                virtual const QList<audioDevice> getDeviceChoices();
++                virtual void setDeviceChoice(const QVariant &, Settings &);
++                virtual bool canEcho(const QString &) const;
++};
++
++class JackAudioOutputRegistrar : public AudioOutputRegistrar {
++        public:
++                JackAudioOutputRegistrar();
++                virtual AudioOutput *create();
++                virtual const QList<audioDevice> getDeviceChoices();
++                virtual void setDeviceChoice(const QVariant &, Settings &);
++};
++
++class JackAudioInit : public DeferInit {
++        public:
++                JackAudioInputRegistrar *airJackAudio;
++                JackAudioOutputRegistrar *aorJackAudio;
++                void initialize() {
++                        jasys = new JackAudioSystem();
++                        jasys->init_jack();
++                        jasys->qmWait.lock();
++                        jasys->qwcWait.wait(&jasys->qmWait, 1000);
++                        jasys->qmWait.unlock();
++                        if (jasys->bJackIsGood) {
++                                airJackAudio = new JackAudioInputRegistrar();
++                                aorJackAudio = new JackAudioOutputRegistrar();
++                        } else {
++                                airJackAudio = NULL;
++                                aorJackAudio = NULL;
++                                delete jasys;
++                                jasys = NULL;
++                        }
++                };
++                void destroy() {
++                        if (airJackAudio)
++                                delete airJackAudio;
++                        if (aorJackAudio)
++                                delete aorJackAudio;
++                        if (jasys) {
++                                jasys->close_jack();
++                                delete jasys;
++                                jasys = NULL;
++                        }
++                };
++};
++
++static JackAudioInit jackinit; //unused
++
++JackAudioSystem::JackAudioSystem() {
++        bJackIsGood = false;
++        iSampleRate = 0;
++}
++
++JackAudioSystem::~JackAudioSystem() {
++}
++
++void JackAudioSystem::init_jack()
++{
++        client = jack_client_open("mumble", JackNullOption, 0);
++
++        if (client) {
++                in_port = jack_port_register(client, "input", JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0);
++                out_port = jack_port_register(client, "output", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0);
++                jack_set_process_callback(client, process_callback, this);
++                jack_set_sample_rate_callback(client, srate_callback, this);
++                jack_on_shutdown(client, shutdown_callback, this);
++
++                iSampleRate = jack_get_sample_rate(client);
++
++                if (jack_activate(client) || in_port == NULL || out_port == NULL) {
++                    client = NULL;
++                    return;
++                }
++
++                int port_flags;
++                unsigned i = -1;
++                const char** ports = jack_get_ports(client, 0, 0, JackPortIsPhysical);
++
++                if (ports) {
++                    while (ports[++i])
++                    {
++                        jack_port_t* port = jack_port_by_name(client, ports[i]);
++                        port_flags = jack_port_flags(port);
++
++                        if (port_flags & (JackPortIsPhysical|JackPortIsOutput) && strstr(jack_port_type(port), "audio")) {
++                            jack_connect(client, ports[i], jack_port_name(in_port));
++                        }
++                        if (port_flags & (JackPortIsPhysical|JackPortIsInput) && strstr(jack_port_type(port), "audio")) {
++                            jack_connect(client, jack_port_name(out_port), ports[i]);
++                        }
++                    }
++                }
++
++                jack_free(ports);
++
++                // If we made it this far, then everything is okay
++                qhInput.insert(QString(), tr("Hardware Ports"));
++                qhOutput.insert(QString(), tr("Hardware Ports"));
++                bJackIsGood = true;
++
++            } else {
++                bJackIsGood = false;
++                client = NULL;
++            }
++}
++
++void JackAudioSystem::close_jack()
++{
++        if (client) {
++                jack_deactivate(client);
++                jack_client_close(client);
++                client = NULL;
++        }
++}
++
++int JackAudioSystem::process_callback(jack_nframes_t nframes, void *arg)
++{
++        JackAudioSystem *jas = (JackAudioSystem*)arg;
++
++        if (jas && jas->bJackIsGood) {
++                AudioInputPtr ai = g.ai;
++                AudioOutputPtr ao = g.ao;
++                JackAudioInput *jai = (JackAudioInput*)(ai.get());
++                JackAudioOutput *jao = (JackAudioOutput*)(ao.get());
++
++                if (jai && jai->bRunning && jai->iMicChannels > 0 && !jai->isFinished()) {
++                        void* input = jack_port_get_buffer(jas->in_port, nframes);
++                        if ((float*)input != 0)
++                            jai->addMic(input, nframes);
++                }
++
++                if (jao && jao->bRunning && jao->iChannels > 0 && !jao->isFinished()) {
++                        jack_default_audio_sample_t* output = (jack_default_audio_sample_t*)jack_port_get_buffer(jas->out_port, nframes);
++                        memset(output, 0, sizeof(jack_default_audio_sample_t)*nframes); //TEST
++                        jao->mix(output, nframes);
++                }
++        }
++
++        return 0;
++}
++
++int JackAudioSystem::srate_callback(jack_nframes_t frames, void *arg)
++{
++        JackAudioSystem *jas = (JackAudioSystem*)arg;
++        jas->iSampleRate = frames;
++        return 0;
++}
++
++void JackAudioSystem::shutdown_callback(void *arg)
++{
++        JackAudioSystem *jas = (JackAudioSystem*)arg;
++        jas->bJackIsGood = false;
++}
++
++JackAudioInputRegistrar::JackAudioInputRegistrar() : AudioInputRegistrar(QLatin1String("JACK"), 10) {
++}
++
++AudioInput *JackAudioInputRegistrar::create() {
++        return new JackAudioInput();
++}
++
++const QList<audioDevice> JackAudioInputRegistrar::getDeviceChoices() {
++        QList<audioDevice> qlReturn;
++
++        QStringList qlInputDevs = jasys->qhInput.keys();
++        qSort(qlInputDevs);
++
++        foreach(const QString &dev, qlInputDevs) {
++                qlReturn << audioDevice(jasys->qhInput.value(dev), dev);
++        }
++
++        return qlReturn;
++}
++
++void JackAudioInputRegistrar::setDeviceChoice(const QVariant &choice, Settings &s) {
++        Q_UNUSED(choice);
++        Q_UNUSED(s);
++}
++
++bool JackAudioInputRegistrar::canEcho(const QString &osys) const {
++        Q_UNUSED(osys);
++        return false;
++}
++
++JackAudioOutputRegistrar::JackAudioOutputRegistrar() : AudioOutputRegistrar(QLatin1String("JACK"), 10) {
++}
++
++AudioOutput *JackAudioOutputRegistrar::create() {
++        return new JackAudioOutput();
++}
++
++const QList<audioDevice> JackAudioOutputRegistrar::getDeviceChoices() {
++        QList<audioDevice> qlReturn;
++
++        QStringList qlOutputDevs = jasys->qhOutput.keys();
++        qSort(qlOutputDevs);
++
++        foreach(const QString &dev, qlOutputDevs) {
++                qlReturn << audioDevice(jasys->qhOutput.value(dev), dev);
++        }
++
++        return qlReturn;
++}
++
++void JackAudioOutputRegistrar::setDeviceChoice(const QVariant &choice, Settings &s) {
++        Q_UNUSED(choice);
++        Q_UNUSED(s);
++}
++
++JackAudioInput::JackAudioInput() {
++        bRunning = true;
++        iMicChannels = 0;
++};
++
++JackAudioInput::~JackAudioInput() {
++        bRunning = false;
++        iMicChannels = 0;
++        qmMutex.lock();
++        qwcWait.wakeAll();
++        qmMutex.unlock();
++        wait();
++}
++
++void JackAudioInput::run() {
++        if (jasys && jasys->bJackIsGood) {
++            iMicFreq = jasys->iSampleRate;
++            iMicChannels = 1;
++            eMicFormat = SampleFloat;
++            initializeMixer();
++        }
++
++        qmMutex.lock();
++        while (bRunning)
++                qwcWait.wait(&qmMutex);
++        qmMutex.unlock();
++}
++
++JackAudioOutput::JackAudioOutput() {
++        bRunning = true;
++        iChannels = 0;
++}
++
++JackAudioOutput::~JackAudioOutput() {
++        bRunning = false;
++        iChannels = 0;
++        qmMutex.lock();
++        qwcWait.wakeAll();
++        qmMutex.unlock();
++        wait();
++}
++
++void JackAudioOutput::run() {
++        if (jasys && jasys->bJackIsGood) {
++            unsigned int chanmasks[32];
++
++            chanmasks[0] = SPEAKER_FRONT_LEFT;
++            chanmasks[1] = SPEAKER_FRONT_RIGHT;
++
++            eSampleFormat = SampleFloat;
++            iMixerFreq = jasys->iSampleRate;
++            iChannels = 1;
++            initializeMixer(chanmasks);
++        }
++
++        qmMutex.lock();
++        while (bRunning)
++                qwcWait.wait(&qmMutex);
++        qmMutex.unlock();
++}
+diff -U 3 -H -d -r -N -- mumble-1.2.2.orig/src/mumble/JackAudio.h mumble-1.2.2/src/mumble/JackAudio.h
+--- mumble-1.2.2.orig/src/mumble/JackAudio.h	1970-01-01 01:00:00.000000000 +0100
++++ mumble-1.2.2/src/mumble/JackAudio.h	2011-01-26 06:03:58.000000000 +0000
+@@ -0,0 +1,97 @@
++/* Copyright (C) 2011, Benjamin Jemlich <pcgod@users.sourceforge.net>
++   Copyright (C) 2011, Filipe Coelho <falktx@gmail.com>
++
++   All rights reserved.
++
++   Redistribution and use in source and binary forms, with or without
++   modification, are permitted provided that the following conditions
++   are met:
++
++   - Redistributions of source code must retain the above copyright notice,
++     this list of conditions and the following disclaimer.
++   - Redistributions in binary form must reproduce the above copyright notice,
++     this list of conditions and the following disclaimer in the documentation
++     and/or other materials provided with the distribution.
++   - Neither the name of the Mumble Developers nor the names of its
++     contributors may be used to endorse or promote products derived from this
++     software without specific prior written permission.
++
++   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
++   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
++   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
++   A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR
++   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
++   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
++   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
++   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
++   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
++   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
++   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++*/
++
++#ifndef _JACKAUDIO_H
++#define _JACKAUDIO_H
++
++#include "AudioInput.h"
++#include "AudioOutput.h"
++#include <jack/jack.h>
++
++class JackAudioOutput;
++class JackAudioInput;
++
++class JackAudioSystem : public QObject {
++        private:
++                Q_OBJECT
++                Q_DISABLE_COPY(JackAudioSystem)
++        protected:
++                jack_client_t* client;
++                jack_port_t* in_port;
++                jack_port_t* out_port;
++
++                static int process_callback(jack_nframes_t nframes, void *arg);
++                static int srate_callback(jack_nframes_t frames, void *arg);
++                static void shutdown_callback(void *arg);
++        public:
++                QHash<QString, QString> qhInput;
++                QHash<QString, QString> qhOutput;
++                bool bJackIsGood;
++                int iSampleRate;
++                QMutex qmWait;
++                QWaitCondition qwcWait;
++
++                void init_jack();
++                void close_jack();
++
++                JackAudioSystem();
++                ~JackAudioSystem();
++};
++
++class JackAudioInput : public AudioInput {
++                friend class JackAudioSystem;
++        private:
++                Q_OBJECT
++                Q_DISABLE_COPY(JackAudioInput)
++        protected:
++                QMutex qmMutex;
++                QWaitCondition qwcWait;
++        public:
++                JackAudioInput();
++                ~JackAudioInput();
++                void run();
++};
++
++class JackAudioOutput : public AudioOutput {
++                friend class JackAudioSystem;
++        private:
++                Q_OBJECT
++                Q_DISABLE_COPY(JackAudioOutput)
++        protected:
++                QMutex qmMutex;
++                QWaitCondition qwcWait;
++        public:
++                JackAudioOutput();
++                ~JackAudioOutput();
++                void run();
++};
++
++#endif
+diff -U 3 -H -d -r -N -- mumble-1.2.2.orig/src/mumble/mumble.pro mumble-1.2.2/src/mumble/mumble.pro
+--- mumble-1.2.2.orig/src/mumble/mumble.pro	2010-02-09 16:34:51.000000000 +0000
++++ mumble-1.2.2/src/mumble/mumble.pro	2011-01-26 01:45:55.000000000 +0000
+@@ -93,11 +93,17 @@
+ unix {
+   HAVE_PULSEAUDIO=$$system(pkg-config --modversion --silence-errors libpulse)
+   HAVE_PORTAUDIO=$$system(pkg-config --modversion --silence-errors portaudio-2.0)
++  HAVE_JACKAUDIO=$$system(pkg-config --modversion --silence-errors jack)
+ 
+   !isEmpty(HAVE_PORTAUDIO):!CONFIG(no-portaudio) {
+     CONFIG *= portaudio
+   }
+ 
++  !isEmpty(HAVE_JACKAUDIO):!CONFIG(no-jackaudio) {
++    CONFIG -= portaudio
++    CONFIG *= jackaudio
++  }
++
+   !isEmpty(HAVE_PULSEAUDIO):!CONFIG(no-pulseaudio) {
+     CONFIG -= portaudio
+     CONFIG *= pulseaudio
+@@ -110,6 +116,13 @@
+     QMAKE_CXXFLAGS_DEBUG *= -I../../speex/include -I../../speexbuild
+   }
+ 
++  jackaudio {
++        DEFINES *= USE_JACKAUDIO
++        PKGCONFIG *= jack
++        HEADERS *= JackAudio.h
++        SOURCES *= JackAudio.cpp
++  }
++
+   CONFIG *= link_pkgconfig
+ 
+   PKGCONFIG *= openssl sndfile
diff --git a/pkgs/applications/networking/newsreaders/pan/default.nix b/pkgs/applications/networking/newsreaders/pan/default.nix
index 299accef4e5d..7c7449dd5025 100644
--- a/pkgs/applications/networking/newsreaders/pan/default.nix
+++ b/pkgs/applications/networking/newsreaders/pan/default.nix
@@ -1,29 +1,25 @@
 { spellChecking ? true
 , stdenv, fetchurl, pkgconfig, gtk, gtkspell ? null
-, perl, pcre, gmime, gettext
+, perl, pcre, gmime, gettext, intltool
 }:
 
 assert spellChecking -> gtkspell != null;
 
+let version = "0.135"; in
+
 stdenv.mkDerivation {
-  name = "pan-0.133";
+  name = "pan-${version}";
 
   src = fetchurl {
-    url = http://pan.rebelbase.com/download/releases/0.133/source/pan-0.133.tar.bz2;
-    sha1 = "a0bd98ea1ba174800896611e3305a6b6d8dbde2f";
+    url = "http://pan.rebelbase.com/download/releases/${version}/source/pan-${version}.tar.bz2";
+    sha1 = "6cd93facf86615761279113badd7462e59399ae4";
   };
 
-  patches =
-    [ # Build on GCC 4.4.
-      (fetchurl {
-        url = "http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/net-nntp/pan/files/pan-0.133-gcc44.patch?rev=1.1";
-        sha256 = "05xmgvcpl1gjcfab8xsdy400p55j59hp52fwa4qbwlqy3c35qv1v";
-      })
-    ];
-
-  buildInputs = [pkgconfig gtk perl pcre gmime gettext]
+  buildInputs = [ pkgconfig gtk perl gmime gettext intltool ]
     ++ stdenv.lib.optional spellChecking gtkspell;
 
+  enableParallelBuilding = true;
+
   meta = {
     description = "A GTK+-based Usenet newsreader good at both text and binaries";
     homepage = http://pan.rebelbase.com/;
diff --git a/pkgs/applications/networking/offrss/default.nix b/pkgs/applications/networking/offrss/default.nix
new file mode 100644
index 000000000000..9784d3692710
--- /dev/null
+++ b/pkgs/applications/networking/offrss/default.nix
@@ -0,0 +1,29 @@
+{stdenv, fetchurl, curl, libmrss}:
+
+stdenv.mkDerivation {
+  name = "offrss-1.1";
+
+  installPhase = ''
+    ensureDir $out/bin
+    cp offrss $out/bin
+  '';
+
+  crossAttrs = {
+    makeFlags = "CC=${stdenv.cross.config}-gcc";
+  };
+
+  buildInputs = [ curl libmrss ];
+
+  src = fetchurl {
+    url = http://vicerveza.homeunix.net/~viric/soft/offrss/offrss-1.1.tar.gz;
+    sha256 = "1l8c5sw368zbrcfq4wf963fbh29q9lqgsn0lbsiwz3vpybc8plp2";
+  };
+
+  meta = {
+    homepage = "http://vicerveza.homeunix.net/~viric/cgi-bin/offrss";
+    description = "Offline RSS/Atom reader";
+    license="AGPLv3+";
+    maintainers = with stdenv.lib.maintainers; [viric];
+    platforms = with stdenv.lib.platforms; all;
+  };
+}
diff --git a/pkgs/applications/networking/ktorrent/default.nix b/pkgs/applications/networking/p2p/ktorrent/default.nix
index c4917c2b8fb0..dfd65f8d0cc8 100644
--- a/pkgs/applications/networking/ktorrent/default.nix
+++ b/pkgs/applications/networking/p2p/ktorrent/default.nix
@@ -1,23 +1,27 @@
-{ stdenv, fetchurl, cmake, automoc4, libktorrent, taglib, kdepimlibs, boost,
-  gettext, kdebase_workspace }:
+{ stdenv, fetchurl, cmake, automoc4, libktorrent, taglib, kdepimlibs, boost
+, gettext, kdebase_workspace, qt4, kdelibs, phonon }:
 
 stdenv.mkDerivation rec {
   name = pname + "-" + version;
 
   pname = "ktorrent";
-  version = "4.0.3";
+  version = "4.1.1";
 
   src = fetchurl {
     url = "${meta.homepage}/downloads/${version}/${name}.tar.bz2";
-    sha256 = "02hp52333w75mdywgsln28samf9ybr9yldg1jsw0b93lj44pfxli";
+    sha256 = "1h0fqh344sfwfbvnwhn00k8czb14568flapjf4754zss6bxpw4g4";
   };
 
   patches = [ ./find-workspace.diff ];
 
   KDEDIRS = libktorrent;
 
-  buildInputs = [ automoc4 cmake libktorrent taglib kdepimlibs boost gettext
-    kdebase_workspace ];
+  buildInputs =
+    [ cmake qt4 kdelibs automoc4 phonon libktorrent boost taglib kdepimlibs
+      gettext kdebase_workspace
+    ];
+
+  enableParallelBuilding = true;
 
   meta = {
     description = "KDE integrated BtTorrent client";
diff --git a/pkgs/applications/networking/ktorrent/find-workspace.diff b/pkgs/applications/networking/p2p/ktorrent/find-workspace.diff
index 472ceff490e1..472ceff490e1 100644
--- a/pkgs/applications/networking/ktorrent/find-workspace.diff
+++ b/pkgs/applications/networking/p2p/ktorrent/find-workspace.diff
diff --git a/pkgs/applications/networking/p2p/mldonkey/default.nix b/pkgs/applications/networking/p2p/mldonkey/default.nix
index ecc2e5f77941..541c0e105931 100644
--- a/pkgs/applications/networking/p2p/mldonkey/default.nix
+++ b/pkgs/applications/networking/p2p/mldonkey/default.nix
@@ -1,11 +1,11 @@
 {stdenv, fetchurl, ocaml, zlib, bzip2, ncurses, file, gd, libpng }:
 
 stdenv.mkDerivation (rec {
-  name = "mldonkey-3.0.4";
+  name = "mldonkey-3.0.7";
   
   src = fetchurl {
     url = "mirror://sourceforge/mldonkey/${name}.tar.bz2";
-    sha256 = "0wnyi2m7126dq6r5zbqplgknnypzcx0p3q2mxcdfhp94ln7vn3f6";
+    sha256 = "1m5cfx79jiym93bx789lqc1bmwrkz1b1jilhga7d994jsjcw6c2n";
   };
   
   meta = {
diff --git a/pkgs/applications/networking/p2p/retroshare/default.nix b/pkgs/applications/networking/p2p/retroshare/default.nix
new file mode 100644
index 000000000000..be9847bc51cb
--- /dev/null
+++ b/pkgs/applications/networking/p2p/retroshare/default.nix
@@ -0,0 +1,28 @@
+{stdenv, fetchurl, qt, libupnp, gpgme, gnome_keyring, glib}:
+
+throw "still fails to build"
+
+stdenv.mkDerivation {
+  name = "retroshare-0.5.1d";
+
+  src = fetchurl {
+    url = mirror://sourceforge/retroshare/RetroShare-v0.5.1d.tar.gz;
+    sha256 = "15971wxx8djwcxn170jyn0mlh7cfzqsf031aa849wr9z234gwrcn";
+  };
+
+  buildInputs = [ qt libupnp gpgme gnome_keyring glib ];
+
+  buildPhase = ''
+    cd libbitdht/src
+    qmake libbitdht.pro PREFIX=$out
+    make
+    cd ../..
+    cd libretroshare/src
+    qmake libretroshare.pro PREFIX=$out
+    make
+    cd ../../src
+    qmake libretroshare.pro PREFIX=$out
+    make
+  '';
+
+}
diff --git a/pkgs/applications/networking/p2p/transmission/default.nix b/pkgs/applications/networking/p2p/transmission/default.nix
index 6d3d501887e6..a1269b09e377 100644
--- a/pkgs/applications/networking/p2p/transmission/default.nix
+++ b/pkgs/applications/networking/p2p/transmission/default.nix
@@ -1,16 +1,21 @@
-{ stdenv, fetchurl, pkgconfig, openssl, curl, intltool, gtkClient ? true, gtk }:
+{ stdenv, fetchurl, pkgconfig, openssl, curl, intltool, libevent, gtkClient ? true, gtk }:
 
 stdenv.mkDerivation rec {
-  name = "transmission-1.93";
+  name = "transmission-2.31";
   
   src = fetchurl {
-    url = "http://mirrors.m0k.org/transmission/files/${name}.tar.bz2";
-    sha256 = "0w0nsyw10h4lm57qc09ja4iqqwvzcjldnqxi4zp0ha5dkbxv3dz9";
+    url = "http://download.transmissionbt.com/files/${name}.tar.bz2";
+    sha256 = "0z0npasbrbii5qnjyk31v0kfr04kwm57dmnl2542bpx615q212zk";
   };
   
-  buildInputs = [ pkgconfig openssl curl intltool ] ++ stdenv.lib.optional gtkClient gtk;
+  buildInputs = [ pkgconfig openssl curl intltool libevent ] ++
+                stdenv.lib.optional gtkClient gtk;
   
   configureFlags = if gtkClient then "--enable-gtk" else "--disable-gtk";
+
+  postInstall = ''
+    rm $out/share/icons/hicolor/icon-theme.cache
+  '';
   
   meta = {
     description = "A fast, easy and free BitTorrent client";
diff --git a/pkgs/applications/networking/p2p/tribler/default.nix b/pkgs/applications/networking/p2p/tribler/default.nix
new file mode 100644
index 000000000000..89c28ae3512f
--- /dev/null
+++ b/pkgs/applications/networking/p2p/tribler/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchsvn, pythonPackages, makeWrapper, nettools }:
+
+stdenv.mkDerivation {
+  name = "tribler-5.3.9-pre21071";
+
+  src = fetchsvn {
+    url = http://svn.tribler.org/abc/branches/release-5.3.x;
+    rev = 21071;
+    sha256 = "0plzw5m9rligz66rbq8qr9sj0fiqx8gwmchdw3p4mwlwfx72gixm";
+  };
+
+  buildInputs = [ pythonPackages.python pythonPackages.wrapPython makeWrapper ];
+
+  pythonPath =
+    [ pythonPackages.wxPython pythonPackages.ssl pythonPackages.curses pythonPackages.apsw
+      pythonPackages.setuptools pythonPackages.m2crypto pythonPackages.sqlite3
+    ];
+
+  installPhase =
+    ''
+      substituteInPlace Tribler/Core/NATFirewall/guessip.py \
+          --replace /bin/netstat ${nettools}/bin/netstat \
+          --replace /sbin/ifconfig ${nettools}/sbin/ifconfig
+    
+      # Nasty hack; call wrapPythonPrograms to set program_PYTHONPATH.
+      wrapPythonPrograms
+      
+      mkdir -p $out/share/tribler
+      cp -prvd Tribler $out/share/tribler/
+
+      makeWrapper ${pythonPackages.python}/bin/python $out/bin/tribler \
+          --set _TRIBLERPATH $out/share/tribler \
+          --set PYTHONPATH $out/share/tribler:$program_PYTHONPATH \
+          --run 'cd $_TRIBLERPATH' \
+          --add-flags $out/share/tribler/Tribler/Main/tribler.py
+    '';
+
+  meta = {
+    homepage = http://www.tribler.org/;
+    description = "A completely decentralised P2P filesharing client based on the Bittorrent protocol";
+    license = "LGPLv2.1";
+  };
+}
diff --git a/pkgs/applications/networking/pjsip/default.nix b/pkgs/applications/networking/pjsip/default.nix
new file mode 100644
index 000000000000..14bc1ead49b2
--- /dev/null
+++ b/pkgs/applications/networking/pjsip/default.nix
@@ -0,0 +1,30 @@
+{stdenv, fetchurl, openssl, libsamplerate}:
+
+stdenv.mkDerivation rec {
+  name = "pjsip-1.8.10";
+
+  src = fetchurl {
+    url = http://www.pjsip.org/release/1.8.10/pjproject-1.8.10.tar.bz2;
+    sha256 = "1v2mgbgzn7d3msb406jmg69ms97a0rqg58asykx71dmjipbaiqc0";
+  };
+
+  buildInputs = [ openssl libsamplerate ];
+
+  postInstall = ''
+    ensureDir $out/bin
+    cp pjsip-apps/bin/pjsua-* $out/bin/pjsua
+    ensureDir $out/share/${name}/samples
+    cp pjsip-apps/bin/samples/*/* $out/share/${name}/samples
+  '';
+
+  # We need the libgcc_s.so.1 loadable (for pthread_cancel to work)
+  dontPatchELF = true;
+
+  meta = {
+    description = "SIP stack and media stack for presence, im, and multimedia communication";
+    homepage = http://pjsip.org/;
+    license = "GPLv2+";
+    maintainers = with stdenv.lib.maintainers; [viric];
+    platforms = with stdenv.lib.platforms; linux;
+  };
+}
diff --git a/pkgs/applications/networking/remote/rdesktop/default.nix b/pkgs/applications/networking/remote/rdesktop/default.nix
index 24e18a75cc97..cceb70b74fbf 100644
--- a/pkgs/applications/networking/remote/rdesktop/default.nix
+++ b/pkgs/applications/networking/remote/rdesktop/default.nix
@@ -2,12 +2,12 @@
 
 stdenv.mkDerivation (rec {
   pname = "rdesktop";
-  version = "1.6.0";
+  version = "1.7.0";
   name = "${pname}-${version}";
 
   src = fetchurl {
     url = "mirror://sourceforge/${pname}/${name}.tar.gz";
-    sha256 = "0y890s5rv47ipcijcrmcy9988br22ipr4c1ppb88pjhlism6w0im";
+    sha256 = "0x2hnzvm0smnanin28n4mvzx9chpj2qnjfrxy307x21mgw6l5q1v";
   };
 
   buildInputs = [openssl libX11];
diff --git a/pkgs/applications/networking/siproxd/default.nix b/pkgs/applications/networking/siproxd/default.nix
new file mode 100644
index 000000000000..3395ba6947aa
--- /dev/null
+++ b/pkgs/applications/networking/siproxd/default.nix
@@ -0,0 +1,19 @@
+{ stdenv, fetchurl, libosip }:
+
+stdenv.mkDerivation {
+  name = "siproxd-0.8.0";
+  
+  src = fetchurl {
+    url = mirror://sourceforge/siproxd/siproxd-0.8.0.tar.gz;
+    sha256 = "0hl51z33cf68ki707jkrrjjc3a5vpaf49gbrsz3g4rfxypdhc0qs";
+  };
+
+  buildInputs = [ libosip ];
+
+  meta = {
+    homepage = http://siproxd.sourceforge.net/;
+    description = "A masquerading SIP Proxy Server";
+    maintainers = with stdenv.lib.maintainers; [viric];
+    platforms = with stdenv.lib.platforms; linux;
+  };
+}
diff --git a/pkgs/applications/networking/skype/default.nix b/pkgs/applications/networking/skype/default.nix
index 7e066b5e380c..98cbfdb7c57d 100644
--- a/pkgs/applications/networking/skype/default.nix
+++ b/pkgs/applications/networking/skype/default.nix
@@ -1,18 +1,20 @@
-{stdenv, fetchurl, alsaLib, libXv, libXi, libXrender, libXrandr, zlib, glib
-, libXext, libX11, libXScrnSaver, libSM, qt4, libICE, freetype, fontconfig}:
+{ stdenv, fetchurl, alsaLib, libXv, libXi, libXrender, libXrandr, zlib, glib
+, libXext, libX11, libXScrnSaver, libSM, qt4, libICE, freetype, fontconfig
+, pulseaudio }:
 
 assert stdenv.system == "i686-linux";
 
 stdenv.mkDerivation rec {
-  name = "skype-2.1.0.81";
+  name = "skype-2.2.0.35";
 
   src = fetchurl {
     url = "http://download.skype.com/linux/${name}.tar.bz2";
-    sha256 = "1x18m4900c0ssaq95wv8mhhgwvw9fh66dszx7zq24zgvb2v1h4jz";
+    sha256 = "157ba3ci12bq0nv2m8wlsab45ib5sccqagyna8nixnhqw9q72sxm";
   };
 
   buildInputs = [
-    alsaLib 
+    alsaLib
+    pulseaudio
     stdenv.glibc 
     stdenv.gcc.gcc
     libXv
diff --git a/pkgs/applications/networking/sync/akunambol/default.nix b/pkgs/applications/networking/sync/akunambol/default.nix
new file mode 100644
index 000000000000..c27d8787bee6
--- /dev/null
+++ b/pkgs/applications/networking/sync/akunambol/default.nix
@@ -0,0 +1,16 @@
+{ stdenv, fetchgit, cmake, kdelibs, kdepimlibs, automoc4, funambol,liblikeback }:
+
+stdenv.mkDerivation rec {
+  name = "akunambol-20110304";
+
+  src = fetchgit {
+    url = git://anongit.kde.org/akunambol.git;
+    rev = "1d832bbbce84f474e3f1e5d2f9fa8a4079b0c8e5";
+    sha256 = "1d2x42lbw32qyawri7z0mrbafz36r035w5bxjpq51awyqjwkbb2d";
+  };
+
+  buildInputs = [ cmake automoc4 kdelibs kdepimlibs funambol liblikeback ];
+  KDEDIRS = liblikeback;
+
+  patches = [ ./non-latin.diff ];
+}
diff --git a/pkgs/applications/networking/sync/akunambol/non-latin.diff b/pkgs/applications/networking/sync/akunambol/non-latin.diff
new file mode 100644
index 000000000000..905a6a894bdf
--- /dev/null
+++ b/pkgs/applications/networking/sync/akunambol/non-latin.diff
@@ -0,0 +1,17 @@
+diff --git a/qtgui/standardsourcesettings.cpp b/qtgui/standardsourcesettings.cpp
+index a14a737..5d4712e 100644
+--- a/qtgui/standardsourcesettings.cpp
++++ b/qtgui/standardsourcesettings.cpp
+@@ -83,9 +83,9 @@ void StandardSourceSettings::populateCollections()
+     foreach( const Collection &collection, colls ) {
+         if (collection.contentMimeTypes().contains(source->getAkonadiMimeType())) {
+             i++;
+-            const char* dn = collection.name().toUtf8();
+-            LOG.debug("Adding collection id %lld named %s", collection.id(), dn);
+-            collections->addItem(dn);
++            LOG.debug("Adding collection id %lld named %s", collection.id(),
++                      collection.name().toLocal8Bit().data());
++            collections->addItem(collection.name());
+             idList.append(collection.id());
+         }
+     }
diff --git a/pkgs/applications/networking/sync/unison/default.nix b/pkgs/applications/networking/sync/unison/default.nix
index 7738ce43f99c..06bab807ebdd 100644
--- a/pkgs/applications/networking/sync/unison/default.nix
+++ b/pkgs/applications/networking/sync/unison/default.nix
@@ -1,26 +1,36 @@
-{stdenv, fetchurl, ocaml, lablgtk, fontschumachermisc, xset, makeWrapper}:
+{stdenv, fetchurl, ocaml, lablgtk, fontschumachermisc, xset, makeWrapper, ncurses
+, enableX11 ? true}:
 
+let
+  nativeCode = if stdenv.system == "armv5tel-linux" then false else true;
+in
 stdenv.mkDerivation (rec {
 
-  name = "unison-2.32.52";
+  name = "unison-2.40.63";
   src = fetchurl {
     url = "http://www.seas.upenn.edu/~bcpierce/unison/download/releases/${name}/${name}.tar.gz";
-    sha256 = "11844yh1gpjjapn8pvc14hla7g70spwqy6h61qk2is83mpafahhm";
+    sha256 = "17fd2bg5jxwbib87j6j2bjpwdm66whqm1fq46v70hfby79j00vkf";
   };
 
-  buildInputs = [ocaml makeWrapper];
+  buildInputs = [ ocaml makeWrapper ncurses ];
+
+  preBuild = if enableX11 then ''
+    sed -i "s|\(OCAMLOPT=.*\)$|\1 -I $(echo "${lablgtk}"/lib/ocaml/*/site-lib/lablgtk2)|" Makefile.OCaml
+  '' else "";
+
+  makeFlags = "INSTALLDIR=$(out)/bin/" + (if enableX11 then " UISTYLE=gtk2" else "")
+    + (if ! nativeCode then " NATIVE=false" else "");
 
-  preBuild = ''
-    sed -i "s|\(OCAMLOPT=.*\)$|\1 -I ${lablgtk}/lib/ocaml/lablgtk2|" Makefile.OCaml
-  '';
-  makeFlags = "UISTYLE=gtk2 INSTALLDIR=$(out)/bin/";
   preInstall = "ensureDir $out/bin";
-  postInstall = ''
+
+  postInstall = if enableX11 then ''
     for i in $(cd $out/bin && ls); do
       wrapProgram $out/bin/$i \
         --run "[ -n \"\$DISPLAY\" ] && (${xset}/bin/xset q | grep -q \"${fontschumachermisc}\" || ${xset}/bin/xset +fp \"${fontschumachermisc}/lib/X11/fonts/misc\")"
     done
-  '';
+  '' else "";
+
+  dontStrip = if ! nativeCode then true else false;
 
   meta = {
     homepage = http://www.cis.upenn.edu/~bcpierce/unison/;