summary refs log tree commit diff
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2009-11-26 21:46:08 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2009-11-26 21:46:08 +0000
commita3403e6828ee7cac9955b7ad7e420e087b62c700 (patch)
tree5fd4a5b069d5af2ac7d93f4c8994cbd57c952725
parent3cda62f6e1b9fe934798ab27daaa0d5da7e9130c (diff)
parentfe10a3aed5911f4858d667d611c94bb77a375b75 (diff)
downloadnixlib-a3403e6828ee7cac9955b7ad7e420e087b62c700.tar
nixlib-a3403e6828ee7cac9955b7ad7e420e087b62c700.tar.gz
nixlib-a3403e6828ee7cac9955b7ad7e420e087b62c700.tar.bz2
nixlib-a3403e6828ee7cac9955b7ad7e420e087b62c700.tar.lz
nixlib-a3403e6828ee7cac9955b7ad7e420e087b62c700.tar.xz
nixlib-a3403e6828ee7cac9955b7ad7e420e087b62c700.tar.zst
nixlib-a3403e6828ee7cac9955b7ad7e420e087b62c700.zip
Finishing the update from trunk, having resolved the eclipse related directory
renaming.
I think directory renaming breaks the usual merges... because it leaves the
'to be removed' directory in the working directory still. A manual 'rm' of the
'to be removed' directory fixed the commit.

svn merge  ^/nixpkgs/trunk


svn path=/nixpkgs/branches/stdenv-updates/; revision=18661
-rwxr-xr-xmaintainers/scripts/dep-licenses.sh57
-rw-r--r--pkgs/applications/editors/emacs-22/builder.sh27
-rw-r--r--pkgs/applications/editors/emacs-22/default.nix48
-rw-r--r--pkgs/applications/graphics/geeqie/default.nix34
-rw-r--r--pkgs/applications/graphics/inkscape/default.nix28
-rw-r--r--pkgs/applications/graphics/inkscape/gtk-clist.patch11
-rw-r--r--pkgs/applications/graphics/inkscape/libpng-setjmp.patch62
-rw-r--r--pkgs/applications/graphics/ufraw/default.nix7
-rw-r--r--pkgs/applications/graphics/ufraw/mkinstalldirs.patch167
-rw-r--r--pkgs/applications/networking/browsers/chromium/default.nix6
-rw-r--r--pkgs/applications/networking/browsers/firefox/3.5.nix6
-rw-r--r--pkgs/applications/video/avidemux/default.nix45
-rw-r--r--pkgs/build-support/release/nix-build.nix1
-rw-r--r--pkgs/build-support/trivial-builders.nix5
-rw-r--r--pkgs/desktops/kde-4.3/default.nix6
-rw-r--r--pkgs/desktops/kde-4.3/extragear/filelight/default.nix19
-rw-r--r--pkgs/development/libraries/haskell/CS173Tourney/default.nix2
-rw-r--r--pkgs/development/libraries/haskell/CS173Tourney/sendmail.patch20
-rw-r--r--pkgs/development/libraries/webkit/src-for-default.nix10
-rw-r--r--pkgs/development/python-modules/flup/default.nix4
-rw-r--r--pkgs/development/tools/misc/autoconf/default.nix6
-rw-r--r--pkgs/development/tools/misc/autoconf/test-suite-fix.patch17
-rw-r--r--pkgs/games/super-tux-kart/default.nix6
-rw-r--r--pkgs/lib/attrsets.nix1
-rw-r--r--pkgs/lib/debug.nix61
-rw-r--r--pkgs/lib/misc.nix25
-rw-r--r--pkgs/lib/platforms.nix2
-rw-r--r--pkgs/lib/tests.nix22
-rw-r--r--pkgs/misc/drivers/gutenprint/default.nix15
-rw-r--r--pkgs/misc/maven/builder.sh8
-rw-r--r--pkgs/misc/maven/default.nix11
-rw-r--r--pkgs/misc/maven/maven-2.nix23
-rw-r--r--pkgs/os-specific/linux/kqemu/1.4.0pre1.nix12
-rw-r--r--pkgs/os-specific/linux/nvidia-x11/legacy.nix6
-rw-r--r--pkgs/servers/x11/xorg/overrides.nix2
-rw-r--r--pkgs/stdenv/adapters.nix65
-rw-r--r--pkgs/stdenv/default.nix1
-rw-r--r--pkgs/stdenv/generic/default.nix5
-rw-r--r--pkgs/stdenv/native/default.nix2
-rw-r--r--pkgs/tools/X11/xlaunch/default.nix2
-rw-r--r--pkgs/tools/misc/gnokii/default.nix2
-rw-r--r--pkgs/tools/misc/myhasktags/default.nix2
-rw-r--r--pkgs/tools/networking/socat/2.0.0-b3.nix4
-rw-r--r--pkgs/tools/package-management/nix/unstable.nix14
-rw-r--r--pkgs/tools/security/bmrsa/11.nix2
-rw-r--r--pkgs/tools/system/filelight/default.nix2
-rw-r--r--pkgs/top-level/all-packages.nix59
-rw-r--r--pkgs/top-level/release.nix6
48 files changed, 536 insertions, 412 deletions
diff --git a/maintainers/scripts/dep-licenses.sh b/maintainers/scripts/dep-licenses.sh
new file mode 100755
index 000000000000..48c1efdeebc5
--- /dev/null
+++ b/maintainers/scripts/dep-licenses.sh
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+attr=$1
+
+: ${NIXPKGS=/etc/nixos/nixpkgs}
+
+tmp=$(mktemp --tmpdir -d nixpkgs-dep-license.XXXXXX)
+
+exitHandler() {
+    exitCode=$?
+    rm -rf "$tmp"
+    exit $exitCode
+}
+
+trap "exitHandler" EXIT
+
+# fetch the trace and the drvPath of the attribute.
+nix-instantiate $NIXPKGS -A $attr --show-trace > "$tmp/drvPath" 2> "$tmp/trace" || {
+  cat 1>&2 - "$tmp/trace" <<EOF
+An error occured while evaluating $attr.
+EOF
+  exit 1
+}
+
+# generate a sed script based on the trace output.
+sed '
+  \,@:.*:@, {
+    # \1  *.drv file
+    # \2  License terms
+    s,.*@:drv:\(.*\):\(.*\):@.*,s!\1!\1: \2!; t;,
+    s!Str(\\\"\([^,]*\)\\\",\[\])!\1!g
+    b
+  }
+  d
+' "$tmp/trace" > "$tmp/filter.sed"
+
+if test $(wc -l "$tmp/filter.sed" | sed 's/ .*//') == 0; then
+  echo 1>&2 "
+No derivation mentionned in the stack trace.  Either your derivation does
+not use stdenv.mkDerivation or you forgot to use the stdenv adapter named
+traceDrvLicenses.
+
+-  defaultStdenv = allStdenvs.stdenv;
++  defaultStdenv = traceDrvLicenses allStdenvs.stdenv;
+"
+  exit 1
+fi
+
+
+# remove all dependencies which are using stdenv.mkDerivation
+echo '
+d
+' >> "$tmp/filter.sed"
+
+nix-store -q --tree $(cat "$tmp/drvPath") | sed -f "$tmp/filter.sed"
+
+exit 0;
diff --git a/pkgs/applications/editors/emacs-22/builder.sh b/pkgs/applications/editors/emacs-22/builder.sh
new file mode 100644
index 000000000000..7a82f6552efc
--- /dev/null
+++ b/pkgs/applications/editors/emacs-22/builder.sh
@@ -0,0 +1,27 @@
+source $stdenv/setup
+
+preConfigure() {
+    libc=$(cat ${NIX_GCC}/nix-support/orig-libc)
+    echo "libc: $libc"
+
+    case "${system}" in
+	x86_64-*)	glibclibdir=lib64 ;;
+	*)		glibclibdir=lib ;;
+    esac
+
+    for i in src/s/*.h src/m/*.h; do
+        substituteInPlace $i \
+            --replace /usr/${glibclibdir}/crt1.o $libc/${glibclibdir}/crt1.o \
+            --replace /usr/${glibclibdir}/crti.o $libc/${glibclibdir}/crti.o \
+            --replace /usr/${glibclibdir}/crtn.o $libc/${glibclibdir}/crtn.o \
+            --replace /usr/lib/crt1.o $libc/${glibclibdir}/crt1.o \
+            --replace /usr/lib/crti.o $libc/${glibclibdir}/crti.o \
+            --replace /usr/lib/crtn.o $libc/${glibclibdir}/crtn.o
+    done
+
+    for i in Makefile.in ./src/Makefile.in ./lib-src/Makefile.in ./leim/Makefile.in; do
+        substituteInPlace $i --replace /bin/pwd pwd
+    done
+}
+
+genericBuild
diff --git a/pkgs/applications/editors/emacs-22/default.nix b/pkgs/applications/editors/emacs-22/default.nix
new file mode 100644
index 000000000000..da3c4babbf6b
--- /dev/null
+++ b/pkgs/applications/editors/emacs-22/default.nix
@@ -0,0 +1,48 @@
+{ xawSupport ? true
+, xpmSupport ? true
+, xaw3dSupport ? false
+, gtkGUI ? false
+, stdenv, fetchurl, x11, libXaw ? null, libXpm ? null, Xaw3d ? null
+, pkgconfig ? null, gtk ? null
+, ncurses
+}:
+
+assert xawSupport && !xaw3dSupport -> libXaw != null;
+assert xawSupport && xaw3dSupport -> Xaw3d != null;
+assert xpmSupport -> libXpm != null;
+assert gtkGUI -> pkgconfig != null && gtk != null;
+
+stdenv.mkDerivation rec {
+  name = "emacs-22.3";
+
+  builder = ./builder.sh;
+  
+  src = fetchurl {
+    url = "mirror://gnu/emacs/${name}.tar.gz";
+    sha256 = "05hd89bchcpwzcx5la0alcp0wb7xywvnf98dxrshrqlfvccvgnbv";
+  };
+  
+  buildInputs = [ncurses x11]
+    ++ stdenv.lib.optional xawSupport (if xaw3dSupport then Xaw3d else libXaw)
+    ++ stdenv.lib.optional xpmSupport libXpm
+    ++ stdenv.lib.optionals gtkGUI [pkgconfig gtk];
+  
+  configureFlags =
+    stdenv.lib.optional gtkGUI "--with-x-toolkit=gtk";
+
+  meta = {
+    description = "GNU Emacs, *the* text editor";
+
+    longDescription = ''
+      GNU Emacs is an extensible, customizable text editor—and more.
+      At its core is an interpreter for Emacs Lisp, a dialect of the
+      Lisp programming language with extensions to support text
+      editing.
+    '';
+
+    homepage = http://www.gnu.org/software/emacs/;
+    license = "GPLv3+";
+
+    platforms = stdenv.lib.platforms.linux;  # GTK & co. are needed.
+  };
+}
diff --git a/pkgs/applications/graphics/geeqie/default.nix b/pkgs/applications/graphics/geeqie/default.nix
new file mode 100644
index 000000000000..a4c272ac98a0
--- /dev/null
+++ b/pkgs/applications/graphics/geeqie/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchurl, pkgconfig, gtk, libpng, exiv2, lcms
+, intltool, gettext }:
+
+stdenv.mkDerivation rec {
+  name = "geeqie-1.0beta2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/geeqie/${name}.tar.gz";
+    sha256 = "13h924iykmxwgpx562lrsh2j78fnzyyfmg4w7qgj9vbjq18nq7fd";
+  };
+
+  buildInputs = [ pkgconfig gtk libpng exiv2 lcms intltool gettext ];
+
+  meta = {
+    description = "Geeqie, a lightweight GTK+ based image viewer";
+
+    longDescription =
+      '' Geeqie is a lightweight GTK+ based image viewer for Unix like
+         operating systems.  It features: EXIF, IPTC and XMP metadata
+         browsing and editing interoperability; easy integration with other
+         software; geeqie works on files and directories, there is no need to
+         import images; fast preview for many raw image formats; tools for
+         image comparison, sorting and managing photo collection.  Geeqie was
+         initially based on GQview.
+      '';
+
+    license = "GPLv2+";
+
+    homepage = http://geeqie.sourceforge.net;
+
+    maintainers = [ stdenv.lib.maintainers.ludo ];
+    platforms = stdenv.lib.platforms.gnu;
+  };
+}
diff --git a/pkgs/applications/graphics/inkscape/default.nix b/pkgs/applications/graphics/inkscape/default.nix
index 117b20d4770a..8cd98aef1368 100644
--- a/pkgs/applications/graphics/inkscape/default.nix
+++ b/pkgs/applications/graphics/inkscape/default.nix
@@ -1,14 +1,14 @@
 args: with args;
 
 stdenv.mkDerivation rec {
-  name = "inkscape-0.46";
+  name = "inkscape-0.47";
 
   src = fetchurl {
-    url = "mirror://sf/inkscape/${name}.tar.gz";
-    sha256 = "0flrjqa68vnnn8lrhj86xpa6h2cyzrvjy6873v9id092f86ix1li";
+    url = "mirror://sourceforge/inkscape/${name}.tar.gz";
+    sha256 = "15wvcllq0nj69hkyanzvxbjhlq06cwabqabaa54n5n4307hrp2g5";
   };
 
-  patches = [ ./configure-python-libs.patch ./libpng-setjmp.patch ./gtk-clist.patch ]; 
+  patches = [ ./configure-python-libs.patch ]; 
 
   propagatedBuildInputs = [
     # Python is used at run-time to execute scripts, e.g., those from
@@ -17,25 +17,13 @@ stdenv.mkDerivation rec {
   ];
 
   buildInputs = [
-    pkgconfig perl perlXMLParser gtk libXft fontconfig libpng zlib popt boehmgc
+    pkgconfig perl perlXMLParser gtk libXft libpng zlib popt boehmgc
     libxml2 libxslt glib gtkmm glibmm libsigcxx lcms boost gettext
-    makeWrapper
+    makeWrapper intltool gsl
   ];
 
   configureFlags = "--with-python";
 
-  # Fix compilation on glibc 2.9 by adding missing string header
-  preConfigure = ''
-    echo "#include <string.h>" > tmp.cpp
-    cat tmp.cpp src/dom/io/uristream.cpp > src/dom/io/uristream.cpp.new
-    rm tmp.cpp
-    mv src/dom/io/uristream.cpp.new src/dom/io/uristream.cpp
-  '';
-
-  preBuild = ''
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I./extension/script"
-  '';
-
   postInstall = ''
     # Make sure PyXML modules can be found at run-time.
     for i in "$out/bin/"*
@@ -46,6 +34,8 @@ stdenv.mkDerivation rec {
     done
   '';
 
+  NIX_LDFLAGS = "-lX11";
+
   meta = {
     license = "GPL";
     homepage = http://www.inkscape.org;
@@ -53,7 +43,7 @@ stdenv.mkDerivation rec {
       Inkscape is a feature-rich vector graphics editor that edits
       files in the W3C SVG (Scalable Vector Graphics) file format.
 
-      If you want to import .eps files install ps2edit
+      If you want to import .eps files install ps2edit.
     '';
 
   };
diff --git a/pkgs/applications/graphics/inkscape/gtk-clist.patch b/pkgs/applications/graphics/inkscape/gtk-clist.patch
deleted file mode 100644
index 6518538fcc15..000000000000
--- a/pkgs/applications/graphics/inkscape/gtk-clist.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- inkscape-0.46/src/widgets/sp-xmlview-attr-list.h  2008/06/07 22:06:52 1.1
-+++ inkscape-0.46/src/widgets/sp-xmlview-attr-list.h  2008/06/07 22:09:22
-@@ -13,7 +13,7 @@
-  */
- 
- #include <stdio.h>
--#include <gtk/gtkclist.h>
-+#include <gtk/gtk.h>
- #include "../xml/repr.h"
- 
- #include <glib.h>
diff --git a/pkgs/applications/graphics/inkscape/libpng-setjmp.patch b/pkgs/applications/graphics/inkscape/libpng-setjmp.patch
deleted file mode 100644
index 623e891b24ba..000000000000
--- a/pkgs/applications/graphics/inkscape/libpng-setjmp.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Include <png.h> as early as possible to make sure <setjmp.h> is not
-included before it.
-
-See http://thread.gmane.org/gmane.linux.distributions.nixos/1501 .
-
---- inkscape-0.46/src/sp-image.cpp	2008-03-11 05:19:56.000000000 +0100
-+++ inkscape-0.46/src/sp-image.cpp	2009-01-26 15:34:33.000000000 +0100
-@@ -17,6 +17,8 @@
- # include "config.h"
- #endif
- 
-+#include <png.h>
-+
- #include <cstring>
- #include <string>
- #include <libnr/nr-matrix-fns.h>
-@@ -41,7 +43,6 @@
- #include "libnr/nr-matrix-fns.h"
- 
- #include "io/sys.h"
--#include <png.h>
- #if ENABLE_LCMS
- #include "color-profile-fns.h"
- #include "color-profile.h"
-
---- inkscape-0.46/src/dialogs/export.cpp	2008-03-11 05:19:54.000000000 +0100
-+++ inkscape-0.46/src/dialogs/export.cpp	2009-01-26 17:01:13.000000000 +0100
-@@ -20,6 +20,7 @@
- # include "config.h"
- #endif
- 
-+#include <png.h>
- #include <gtk/gtk.h>
- #include <gtkmm/box.h>
- #include <gtkmm/buttonbox.h>
-@@ -60,7 +61,6 @@
- #include "io/sys.h"
- 
- #include "helper/png-write.h"
--#include <png.h>
- 
- 
- #define SP_EXPORT_MIN_SIZE 1.0
-
---- inkscape-0.46/src/main.cpp	2008-03-11 05:20:50.000000000 +0100
-+++ inkscape-0.46/src/main.cpp	2009-01-26 17:57:12.000000000 +0100
-@@ -26,6 +26,7 @@
- #ifdef HAVE_CONFIG_H
- # include "config.h"
- #endif
-+#include <png.h>
- #include "path-prefix.h"
- 
- #include <gtk/gtkmessagedialog.h>
-@@ -111,7 +112,6 @@ using Inkscape::Extension::Internal::Pri
- 
- #include "main-cmdlineact.h"
- 
--#include <png.h>
- #include <errno.h>
- 
- enum {
diff --git a/pkgs/applications/graphics/ufraw/default.nix b/pkgs/applications/graphics/ufraw/default.nix
index 3787d36007f5..21d5c3ada864 100644
--- a/pkgs/applications/graphics/ufraw/default.nix
+++ b/pkgs/applications/graphics/ufraw/default.nix
@@ -5,13 +5,11 @@ stdenv.mkDerivation rec {
   name = "ufraw-0.16";
 
   src = fetchurl {
+    # XXX: These guys appear to mutate uploaded tarballs!
     url = "mirror://sourceforge/ufraw/${name}.tar.gz";
-    sha256 = "0d3hd04msdk6l0nv1n8zs3ybipy3jikli57d9q41pb7v0hnl6hzd";
+    sha256 = "06fzyd7wyv5ixbmhbsz80pphhbic18d1w8ji0gz38aq1vdmgxw9n";
   };
 
-  patches = [ ./mkinstalldirs.patch ];
-  preConfigure = "chmod +x mkinstalldirs";
-
   buildInputs =
     [ pkgconfig gtk gtkimageview gettext bzip2 zlib
       libjpeg libtiff cfitsio exiv2 lcms
@@ -35,5 +33,6 @@ stdenv.mkDerivation rec {
     license = "GPLv2+";
 
     maintainers = [ stdenv.lib.maintainers.ludo ];
+    platforms = stdenv.lib.platforms.gnu;  # needs GTK+
   };
 }
diff --git a/pkgs/applications/graphics/ufraw/mkinstalldirs.patch b/pkgs/applications/graphics/ufraw/mkinstalldirs.patch
deleted file mode 100644
index 339d4c110419..000000000000
--- a/pkgs/applications/graphics/ufraw/mkinstalldirs.patch
+++ /dev/null
@@ -1,167 +0,0 @@
-Add the missing GNU `mkinstalldirs' script, taken from Gnulib.
-
---- /dev/null	2009-10-19 13:42:41.176006468 +0200
-+++ ufraw/mkinstalldirs	2009-06-26 22:10:56.000000000 +0200
-@@ -0,0 +1,162 @@
-+#! /bin/sh
-+# mkinstalldirs --- make directory hierarchy
-+
-+scriptversion=2009-04-28.21; # UTC
-+
-+# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
-+# Created: 1993-05-16
-+# Public domain.
-+#
-+# This file is maintained in Automake, please report
-+# bugs to <bug-automake@gnu.org> or send patches to
-+# <automake-patches@gnu.org>.
-+
-+nl='
-+'
-+IFS=" ""	$nl"
-+errstatus=0
-+dirmode=
-+
-+usage="\
-+Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
-+
-+Create each directory DIR (with mode MODE, if specified), including all
-+leading file name components.
-+
-+Report bugs to <bug-automake@gnu.org>."
-+
-+# process command line arguments
-+while test $# -gt 0 ; do
-+  case $1 in
-+    -h | --help | --h*)         # -h for help
-+      echo "$usage"
-+      exit $?
-+      ;;
-+    -m)                         # -m PERM arg
-+      shift
-+      test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
-+      dirmode=$1
-+      shift
-+      ;;
-+    --version)
-+      echo "$0 $scriptversion"
-+      exit $?
-+      ;;
-+    --)                         # stop option processing
-+      shift
-+      break
-+      ;;
-+    -*)                         # unknown option
-+      echo "$usage" 1>&2
-+      exit 1
-+      ;;
-+    *)                          # first non-opt arg
-+      break
-+      ;;
-+  esac
-+done
-+
-+for file
-+do
-+  if test -d "$file"; then
-+    shift
-+  else
-+    break
-+  fi
-+done
-+
-+case $# in
-+  0) exit 0 ;;
-+esac
-+
-+# Solaris 8's mkdir -p isn't thread-safe.  If you mkdir -p a/b and
-+# mkdir -p a/c at the same time, both will detect that a is missing,
-+# one will create a, then the other will try to create a and die with
-+# a "File exists" error.  This is a problem when calling mkinstalldirs
-+# from a parallel make.  We use --version in the probe to restrict
-+# ourselves to GNU mkdir, which is thread-safe.
-+case $dirmode in
-+  '')
-+    if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-+      echo "mkdir -p -- $*"
-+      exec mkdir -p -- "$@"
-+    else
-+      # On NextStep and OpenStep, the `mkdir' command does not
-+      # recognize any option.  It will interpret all options as
-+      # directories to create, and then abort because `.' already
-+      # exists.
-+      test -d ./-p && rmdir ./-p
-+      test -d ./--version && rmdir ./--version
-+    fi
-+    ;;
-+  *)
-+    if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
-+       test ! -d ./--version; then
-+      echo "mkdir -m $dirmode -p -- $*"
-+      exec mkdir -m "$dirmode" -p -- "$@"
-+    else
-+      # Clean up after NextStep and OpenStep mkdir.
-+      for d in ./-m ./-p ./--version "./$dirmode";
-+      do
-+        test -d $d && rmdir $d
-+      done
-+    fi
-+    ;;
-+esac
-+
-+for file
-+do
-+  case $file in
-+    /*) pathcomp=/ ;;
-+    *)  pathcomp= ;;
-+  esac
-+  oIFS=$IFS
-+  IFS=/
-+  set fnord $file
-+  shift
-+  IFS=$oIFS
-+
-+  for d
-+  do
-+    test "x$d" = x && continue
-+
-+    pathcomp=$pathcomp$d
-+    case $pathcomp in
-+      -*) pathcomp=./$pathcomp ;;
-+    esac
-+
-+    if test ! -d "$pathcomp"; then
-+      echo "mkdir $pathcomp"
-+
-+      mkdir "$pathcomp" || lasterr=$?
-+
-+      if test ! -d "$pathcomp"; then
-+	errstatus=$lasterr
-+      else
-+	if test ! -z "$dirmode"; then
-+	  echo "chmod $dirmode $pathcomp"
-+	  lasterr=
-+	  chmod "$dirmode" "$pathcomp" || lasterr=$?
-+
-+	  if test ! -z "$lasterr"; then
-+	    errstatus=$lasterr
-+	  fi
-+	fi
-+      fi
-+    fi
-+
-+    pathcomp=$pathcomp/
-+  done
-+done
-+
-+exit $errstatus
-+
-+# Local Variables:
-+# mode: shell-script
-+# sh-indentation: 2
-+# eval: (add-hook 'write-file-hooks 'time-stamp)
-+# time-stamp-start: "scriptversion="
-+# time-stamp-format: "%:y-%02m-%02d.%02H"
-+# time-stamp-time-zone: "UTC"
-+# time-stamp-end: "; # UTC"
-+# End:
diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix
index 64157f66f2f8..9a57b8869aca 100644
--- a/pkgs/applications/networking/browsers/chromium/default.nix
+++ b/pkgs/applications/networking/browsers/chromium/default.nix
@@ -26,17 +26,17 @@ assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" ;
 
 stdenv.mkDerivation rec {
   name = "chrome-${version}";
-  version = "31663";
+  version = "32599";
   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 = "0dl3kvfwlg7clq8v67wx8xydsj181qmmpg877s75ys9h1gb01gr6";
+        sha256 = "1wz24hrnnjggsjxsaa4spqg73p1f7bv4a8l2ys3kbkdp709fl6v8";
       } 
     else if stdenv.system == "i686-linux" then 
       fetchurl {
         url = "http://build.chromium.org/buildbot/snapshots/chromium-rel-linux/${version}/chrome-linux.zip";
-        sha256 = "1d8fmw0rar44nabqw9sfv84vfw4a2hb9mi1j7a60nwb23wzl80s8";
+        sha256 = "16w6d7kp34jr1c4ym6y2h6llkq3d65rybj5hs46w1b8qri60q6aa";
       } 
     else null;
 
diff --git a/pkgs/applications/networking/browsers/firefox/3.5.nix b/pkgs/applications/networking/browsers/firefox/3.5.nix
index 6fc46f53c727..1ed4339124c1 100644
--- a/pkgs/applications/networking/browsers/firefox/3.5.nix
+++ b/pkgs/applications/networking/browsers/firefox/3.5.nix
@@ -12,14 +12,14 @@
 
 rec {
 
-  firefoxVersion = "3.5.4";
+  firefoxVersion = "3.5.5";
   
-  xulVersion = "1.9.1.4"; # this attribute is used by other packages
+  xulVersion = "1.9.1.5"; # 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 = "ce250208371326d03e72a02d223bc136cd376e5d";
+    sha1 = "a2146fb6dc8e879a78fa13849f187c14d41442ca";
   };
 
 
diff --git a/pkgs/applications/video/avidemux/default.nix b/pkgs/applications/video/avidemux/default.nix
new file mode 100644
index 000000000000..c3e39aca8881
--- /dev/null
+++ b/pkgs/applications/video/avidemux/default.nix
@@ -0,0 +1,45 @@
+{stdenv, fetchurl, cmake, pkgconfig, libxml2, qt4, gtk, gettext, SDL,
+libXv, pixman, libpthreadstubs, libXau, libXdmcp, libxslt, x264,
+alsaLib, lame, faac, faad2, libvorbis }:
+
+assert stdenv ? glibc;
+
+stdenv.mkDerivation {
+  name = "avidemux-2.5.1";
+  
+  src = fetchurl {
+    url = mirror://sourceforge/avidemux/avidemux_2.5.1.tar.gz;
+    sha256 = "14jwrblbli7bswx4i7b85l0s1msx8rxrqb908df3z8jxm6w4cm9g";
+  };
+  
+  buildInputs = [ cmake pkgconfig libxml2 qt4 gtk gettext SDL libXv
+    pixman libpthreadstubs libXau libXdmcp libxslt x264 alsaLib 
+    lame faac faad2 libvorbis ];
+
+  cmakeFlags = "-DPTHREAD_INCLUDE_DIR=${stdenv.glibc}/include" +
+    " -DGETTEXT_INCLUDE_DIR=${gettext}/include" +
+    " -DSDL_INCLUDE_DIR=${SDL}/include/SDL" +
+    " -DCMAKE_SKIP_BUILD_RPATH=ON" +
+    " -DCMAKE_BUILD_TYPE=Release";
+
+  NIX_LDFLAGS="-lxml2 -lXv -lSDL -lQtGui -lQtCore -lpthread";
+
+  postInstall = ''
+    cd $NIX_BUILD_TOP/$sourceRoot
+    mkdir build_plugins
+    cd build_plugins
+    cmake $cmakeFlags -DAVIDEMUX_INSTALL_PREFIX=$out \
+      -DAVIDEMUX_SOURCE_DIR=$NIX_BUILD_TOP/$sourceRoot \
+      -DAVIDEMUX_CORECONFIG_DIR=$NIX_BUILD_TOP/$sourceRoot/build/config ../plugins
+
+    make
+    make install
+  '';
+
+  meta = { 
+    homepage = http://fixounet.free.fr/avidemux/;
+    description = "Free video editor designed for simple video editing tasks";
+    maintainers = with stdenv.lib.maintainers; [viric];
+    platforms = with stdenv.lib.platforms; linux;
+  };
+}
diff --git a/pkgs/build-support/release/nix-build.nix b/pkgs/build-support/release/nix-build.nix
index 21fe1c812185..005719552f1b 100644
--- a/pkgs/build-support/release/nix-build.nix
+++ b/pkgs/build-support/release/nix-build.nix
@@ -22,7 +22,6 @@ stdenv.mkDerivation (
 
     showBuildStats = true;
 
-    # Hack - swap checkPhase and installPhase (otherwise Stratego barfs).
     phases = "unpackPhase patchPhase configurePhase buildPhase installPhase checkPhase fixupPhase distPhase ${if doCoverageAnalysis then "coverageReportPhase" else ""} finalPhase";
 
     finalPhase =
diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix
index 1c9e7fc49f28..cbbc5ae0628d 100644
--- a/pkgs/build-support/trivial-builders.nix
+++ b/pkgs/build-support/trivial-builders.nix
@@ -68,4 +68,9 @@ rec {
       done < graph
     '';
 
+  # Quickly create a set of symlinks to derivations.
+  # entries is a list of attribute sets like { name = "name" ; path = "/nix/store/..."; }
+  linkFarm = name: entries: runCommand name {} ("mkdir -p $out; cd $out; \n" +
+    (stdenv.lib.concatMapStrings (x: "ln -s '${x.path}' '${x.name}';\n") entries));
+
 }
diff --git a/pkgs/desktops/kde-4.3/default.nix b/pkgs/desktops/kde-4.3/default.nix
index eab77cec6e56..0781d3ae3f22 100644
--- a/pkgs/desktops/kde-4.3/default.nix
+++ b/pkgs/desktops/kde-4.3/default.nix
@@ -218,6 +218,12 @@ pkgs.recurseIntoAttrs (rec {
     inherit automoc4 phonon strigi soprano;
   };
 
+  filelight = import ./extragear/filelight {
+    inherit (pkgs) stdenv fetchurl lib cmake qt4 perl;
+    inherit kdelibs kdebase_workspace;
+    inherit automoc4 phonon qimageblitz;
+  };
+
   kdesvn = import ./extragear/kdesvn {
     inherit (pkgs) stdenv fetchurl lib cmake qt4 perl gettext apr aprutil subversion db4;
     inherit kdelibs;
diff --git a/pkgs/desktops/kde-4.3/extragear/filelight/default.nix b/pkgs/desktops/kde-4.3/extragear/filelight/default.nix
new file mode 100644
index 000000000000..f6cdfd4fcc8b
--- /dev/null
+++ b/pkgs/desktops/kde-4.3/extragear/filelight/default.nix
@@ -0,0 +1,19 @@
+{stdenv, fetchurl, lib, cmake, qt4, perl, qimageblitz, kdelibs, kdebase_workspace,
+automoc4, phonon}:
+
+stdenv.mkDerivation {
+  name = "filelight-1.9rc3";
+  src = fetchurl {
+    url = http://www.kde-apps.org/CONTENT/content-files/99561-filelight-1.9rc3.tgz;
+    sha256 = "0ljyx23j4cvrsi1dvmxila82q2cd26barmcvc8qmr74kz6pj78sq";
+  };
+  includeAllQtDirs=true;
+  buildInputs = [ cmake qt4 perl kdelibs kdebase_workspace automoc4 phonon 
+    qimageblitz ];
+  meta = {
+    description = "Shows disk usage as an interactive map of concentric rings";
+    license = "GPL";
+    homepage = http://www.methylblue.com/filelight/;
+    maintainers = [ lib.maintainers.viric ];
+  };
+}
diff --git a/pkgs/development/libraries/haskell/CS173Tourney/default.nix b/pkgs/development/libraries/haskell/CS173Tourney/default.nix
index b1ee27bb42cb..42df8754a341 100644
--- a/pkgs/development/libraries/haskell/CS173Tourney/default.nix
+++ b/pkgs/development/libraries/haskell/CS173Tourney/default.nix
@@ -9,7 +9,7 @@ cabal.mkDerivation (self : {
     rev = "dce044761b008cb685a675a1f35be6aff66fed21" ;
     md5 = "21e5e5c2e184b4b70696d4d6c60e51d3";
   };
-
+  patches = [./sendmail.patch]; 
   propagatedBuildInputs = [json time hslogger Crypto base64string CouchDB WebServer WebServerExtras];
   meta = {
     description = "";
diff --git a/pkgs/development/libraries/haskell/CS173Tourney/sendmail.patch b/pkgs/development/libraries/haskell/CS173Tourney/sendmail.patch
new file mode 100644
index 000000000000..7fb72c0f0ac7
--- /dev/null
+++ b/pkgs/development/libraries/haskell/CS173Tourney/sendmail.patch
@@ -0,0 +1,20 @@
+diff -rc 173tourney/server-src/Mail.hs 173tourney2/server-src/Mail.hs
+*** 173tourney/server-src/Mail.hs	2009-11-05 13:00:58.971443217 +0100
+--- 173tourney2/server-src/Mail.hs	2009-11-24 10:38:38.325669644 +0100
+***************
+*** 17,23 ****
+           -> IO Bool
+  mailFrom fromAddr toAddrs subject body = do
+    (stdin,stdout,stderr,process) <- 
+!     runInteractiveCommand "/usr/sbin/sendmail -t"
+    let sendMail = do
+          hSetBinaryMode stdin False
+          hPutStrLn stdin $ "To: " ++ (concat $ intersperse ", " toAddrs)
+--- 17,23 ----
+           -> IO Bool
+  mailFrom fromAddr toAddrs subject body = do
+    (stdin,stdout,stderr,process) <- 
+!     runInteractiveCommand "sendmail -t"
+    let sendMail = do
+          hSetBinaryMode stdin False
+          hPutStrLn stdin $ "To: " ++ (concat $ intersperse ", " toAddrs)
diff --git a/pkgs/development/libraries/webkit/src-for-default.nix b/pkgs/development/libraries/webkit/src-for-default.nix
index 26c5303fea17..632c6fbbee29 100644
--- a/pkgs/development/libraries/webkit/src-for-default.nix
+++ b/pkgs/development/libraries/webkit/src-for-default.nix
@@ -1,9 +1,9 @@
 rec {
-   version="r50540";
-   name="webkit-r50540";
-   hash="07gjazgkjnvigkl7pa9r8hzw74dkx9m7m7q2xfnayp9lv79r2wp4";
-   url="http://builds.nightly.webkit.org/files/trunk/src/WebKit-r50540.tar.bz2";
-   advertisedUrl="http://builds.nightly.webkit.org/files/trunk/src/WebKit-r50540.tar.bz2";
+   version="r51303";
+   name="webkit-r51303";
+   hash="0khlc38gzb65xr0fsap60cz65rd6d7f7v31hhj4x1bxjrm3pj48w";
+   url="http://builds.nightly.webkit.org/files/trunk/src/WebKit-r51303.tar.bz2";
+   advertisedUrl="http://builds.nightly.webkit.org/files/trunk/src/WebKit-r51303.tar.bz2";
   
   
 }
diff --git a/pkgs/development/python-modules/flup/default.nix b/pkgs/development/python-modules/flup/default.nix
index be9fd84d1fd9..25954dfa9da5 100644
--- a/pkgs/development/python-modules/flup/default.nix
+++ b/pkgs/development/python-modules/flup/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, python, setuptools }:
+{ stdenv, fetchurl, python, setuptools, ... }:
 
 stdenv.mkDerivation rec {
   name = "flup-r2311";
@@ -10,6 +10,8 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ python setuptools ];
 
+  phaseNames = ["addInputs" "createPythonInstallationTarget" "installPythonPackage"];
+
   meta = {
     description = "FastCGI Python module set";
   };
diff --git a/pkgs/development/tools/misc/autoconf/default.nix b/pkgs/development/tools/misc/autoconf/default.nix
index b7850565d5cb..b6d48a8c681b 100644
--- a/pkgs/development/tools/misc/autoconf/default.nix
+++ b/pkgs/development/tools/misc/autoconf/default.nix
@@ -1,15 +1,13 @@
 { stdenv, fetchurl, m4, perl }:
 
 stdenv.mkDerivation rec {
-  name = "autoconf-2.64";
+  name = "autoconf-2.65";
 
   src = fetchurl {
     url = "mirror://gnu/autoconf/${name}.tar.bz2";
-    sha256 = "11damk9x09616cjdfxx9y73igd96zzylgq0l4j57qzify6nlqbw7";
+    sha256 = "0sqkh2xirg3yq7774aqmbi2nbx8rv3yf6v2xzwlz5ypkax0984fv";
   };
 
-  patches = [ ./test-suite-fix.patch ];
-
   buildInputs = [ m4 perl ];
 
   # Work around a known issue in Cygwin.  See
diff --git a/pkgs/development/tools/misc/autoconf/test-suite-fix.patch b/pkgs/development/tools/misc/autoconf/test-suite-fix.patch
deleted file mode 100644
index 3d5d20b85625..000000000000
--- a/pkgs/development/tools/misc/autoconf/test-suite-fix.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-This patch by Ralf Wildenhues <Ralf.Wildenhues@gmx.de> fixes
-the "Hard fail" test case.
-
-See http://thread.gmane.org/gmane.comp.sysutils.autoconf.bugs/6814
-for details.
-
---- a/tests/autotest.at
-+++ b/tests/autotest.at
-@@ -271,7 +271,7 @@ AT_CHECK_AT_TEST([Hard fail],
-    AT_CHECK([exit 99])],
-   [], [1], [], [ignore], [],
-   [AT_CHECK([grep '2 failed unexpectedly' micro-suite.log], [], [ignore])
--   AT_CHECK([grep ok micro-suite.log], [1])])
-+   AT_CHECK([grep '^[[12]].*ok' micro-suite.log], [1])])
- 
- AT_CHECK_AT_TEST([AT@&t@_FAIL_IF],
-   [AT_FAIL_IF([:])
diff --git a/pkgs/games/super-tux-kart/default.nix b/pkgs/games/super-tux-kart/default.nix
index a70fdb0bc40d..722441121533 100644
--- a/pkgs/games/super-tux-kart/default.nix
+++ b/pkgs/games/super-tux-kart/default.nix
@@ -2,11 +2,11 @@
 , libvorbis, libogg, gettext }:
 
 stdenv.mkDerivation rec {
-  name = "supertuxkart-0.6.1a";
+  name = "supertuxkart-0.6.2a";
 
   src = fetchurl {
-    url = "mirror://sourceforge/supertuxkart/${name}.tar.bz2";
-    sha256 = "1p4jl4v74f7ff7qkw10k48fvyg247wqzc097ds07y3pvn9a696w4";
+    url = "mirror://sourceforge/supertuxkart/${name}-src.tar.bz2";
+    sha256 = "0bdn12kg85bgcgj9shfc40k56228hysiixfaxkycgb688nhldngr";
   };
 
   buildInputs = [
diff --git a/pkgs/lib/attrsets.nix b/pkgs/lib/attrsets.nix
index 4be944d8494f..c19033682919 100644
--- a/pkgs/lib/attrsets.nix
+++ b/pkgs/lib/attrsets.nix
@@ -24,6 +24,7 @@ rec {
       then attrByPath (tail attrPath) default (getAttr attr e)
       else default;
 
+      
   /* Return nested attribute set in which an attribute is set.  For instance
      ["x" "y"] applied with some value v returns `x.y = v;' */
   setAttrByPath = attrPath: value:
diff --git a/pkgs/lib/debug.nix b/pkgs/lib/debug.nix
index 5d411b864ece..d4d2702a2843 100644
--- a/pkgs/lib/debug.nix
+++ b/pkgs/lib/debug.nix
@@ -1,6 +1,9 @@
 let lib = import ./default.nix;
 
-inherit (builtins) trace attrNamesToStr isAttrs isFunction isList isInt isString head substring attrNames;
+inherit (builtins) trace attrNamesToStr isAttrs isFunction isList isInt
+        isString isBool head substring attrNames;
+
+inherit (lib) all id mapAttrsFlatten elem;
 
 in
 
@@ -21,7 +24,7 @@ rec {
   
   traceVal = if builtins ? trace then x: (builtins.trace x x) else x: x;
   traceXMLVal = if builtins ? trace then x: (builtins.trace (builtins.toXML x) x) else x: x;
-
+  traceXMLValMarked = str: if builtins ? trace then x: (builtins.trace ( str + builtins.toXML x) x) else x: x;
   
   # this can help debug your code as well - designed to not produce thousands of lines
   traceShowVal = x : trace (showVal x) x;
@@ -42,6 +45,7 @@ rec {
       else "x is probably a path `${substring 0 50 (toString x)}'";
 
   # trace the arguments passed to function and its result 
+  # maybe rewrite these functions in a traceCallXml like style. Then one function is enough
   traceCall  = n : f : a : let t = n2 : x : traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a));
   traceCall2 = n : f : a : b : let t = n2 : x : traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a) (t "arg 2" b));
   traceCall3 = n : f : a : b : c : let t = n2 : x : traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a) (t "arg 2" b) (t "arg 3" c));
@@ -55,10 +59,61 @@ rec {
      expected, actual}, denoting the attribute name of the failing
      test and its expected and actual results.  Used for regression
      testing of the functions in lib; see tests.nix for an example.
+     Only tests having names starting with "test" are run.
+     Add attr { tests = ["testName"]; } to run these test only
   */
   runTests = tests: lib.concatLists (lib.attrValues (lib.mapAttrs (name: test:
-    if ! lib.eqStrict test.expr test.expected
+    let testsToRun = if tests ? tests then tests.tests else [];
+    in if (substring 0 4 name == "test" ||  elem name testsToRun)
+       && ((testsToRun == []) || elem name tests.tests)
+       && (!lib.eqStrict test.expr test.expected)
+
       then [ { inherit name; expected = test.expected; result = test.expr; } ]
       else [] ) tests));
   
+  # create a test assuming that list elements are true
+  # usage: { testX = allTrue [ true ]; }
+  testAllTrue = expr : { inherit expr; expected = map (x: true) expr; };
+
+  # evaluate everything once so that errors will occur earlier
+  # hacky: traverse attrs by adding a dummy
+  # ignores functions (should this behavior change?) See strictf
+  #
+  # Note: This should be a primop! Something like seq of haskell would be nice to
+  # have as well. It's used fore debugging only anyway
+  strict = x :
+    let
+        traverse = x :
+          if isString x then true
+          else if isAttrs x then
+            if x ? outPath then true
+            else all id (mapAttrsFlatten (n: traverse) x)
+          else if isList x then
+            all id (map traverse x)
+          else if isBool x then true
+          else if isFunction x then true
+          else if isInt x then true
+          else if x == null then true
+          else true; # a (store) path?
+    in if (traverse x) then x else throw "else never reached";
+
+  # example: (traceCallXml "myfun" id 3) will output something like
+  # calling myfun arg 1: 3 result: 3
+  # this forces deep evaluation of all arguments and the result!
+  # note: if result doesn't evaluate you'll get no trace at all (FIXME)
+  #       args should be printed in any case
+  traceCallXml = a:
+    if !isInt a then
+      traceCallXml 1 "calling ${a}\n"
+    else
+      let nr = a;
+      in (str: expr:
+          if isFunction expr then
+            (arg: 
+              traceCallXml (builtins.add 1 nr) "${str}\n arg ${builtins.toString nr} is \n ${builtins.toXML (strict arg)}" (expr arg)
+            )
+          else 
+            let r = strict expr;
+            in builtins.trace "${str}\n result:\n${builtins.toXML r}" r
+      );
 }
diff --git a/pkgs/lib/misc.nix b/pkgs/lib/misc.nix
index c1fee190268c..e3215d9ec56c 100644
--- a/pkgs/lib/misc.nix
+++ b/pkgs/lib/misc.nix
@@ -1,5 +1,5 @@
 let lib = import ./default.nix;
-    inherit (builtins) isFunction hasAttr getAttr head tail isList isAttrs attrNames;
+    inherit (builtins) isFunction hasAttr getAttr head tail isList isAttrs isInt attrNames;
 
 in
 
@@ -348,6 +348,18 @@ rec {
       ["flags" "cfg" "mergeAttrBy" ];
 
 
+  nixType = x:
+      if isAttrs x then
+          if x ? outPath then "derivation"
+          else "aattrs"
+      else if isFunction x then "function"
+      else if isList x then "list"
+      else if x == true then "bool"
+      else if x == false then "bool"
+      else if x == null then "null"
+      else if isInt x then "int"
+      else "string";
+
   # deep, strict equality testing. This should be implemented as primop
   eqStrict = a : b :
     let eqListStrict = a : b :
@@ -355,9 +367,10 @@ rec {
       else if a == [] then true
       else eqStrict (head a) (head b) && eqListStrict (tail a) (tail b);
     in
-    if isList a && isList b then eqListStrict a b
-    else if isAttrs a && isAttrs b then
-      (eqListStrict (attrNames a) (attrNames b))
-      && (eqListStrict (lib.attrValues a) (lib.attrValues b))
-    else a == b; # FIXME !
+    if nixType a != nixType b then false
+      else if isList a then eqListStrict a b
+        else if isAttrs a then
+          (eqListStrict (attrNames a) (attrNames b))
+          && (eqListStrict (lib.attrValues a) (lib.attrValues b))
+        else a == b; # FIXME !
 }
diff --git a/pkgs/lib/platforms.nix b/pkgs/lib/platforms.nix
index a34b8eb297d1..d8f9692ae094 100644
--- a/pkgs/lib/platforms.nix
+++ b/pkgs/lib/platforms.nix
@@ -3,7 +3,7 @@ let lists = import ./lists.nix; in
 rec {
   gnu = linux; /* ++ hurd ++ kfreebsd ++ ... */
   linux = ["i686-linux" "x86_64-linux" "powerpc-linux"];
-  darwin = ["i686-darwin" "powerpc-darwin"];
+  darwin = ["i686-darwin" "powerpc-darwin" "x86_64-darwin"];
   freebsd = ["i686-freebsd" "x86_64-freebsd" "powerpc-freebsd"];
   openbsd = ["i686-openbsd" "x86_64-openbsd"];
   netbsd = ["i686-netbsd" "x86_64-netbsd"];
diff --git a/pkgs/lib/tests.nix b/pkgs/lib/tests.nix
index 95933cbe4b7b..c5476cbc18c6 100644
--- a/pkgs/lib/tests.nix
+++ b/pkgs/lib/tests.nix
@@ -3,52 +3,52 @@ with import ./default.nix;
 
 runTests {
 
-  id = {
+  testId = {
     expr = id 1;
     expected = 1;
   };
   
-  const = {
+  testConst = {
     expr = const 2 3;
     expected = 2;
   };
   
-  or = {
+  testOr = {
     expr = or true false;
     expected = true;
   };
   
-  and = {
+  testAnd = {
     expr = and true false;
     expected = false;
   };
   
-  fix = {
+  testFix = {
     expr = fix (x: {a = if x ? a then "a" else "b";});
     expected = {a = "a";};
   };
 
-  concatMapStrings = {
+  testConcatMapStrings = {
     expr = concatMapStrings (x: x + ";") ["a" "b" "c"];
     expected = "a;b;c;";
   };
 
-  concatStringsSep = {
+  testConcatStringsSep = {
     expr = concatStringsSep "," ["a" "b" "c"];
     expected = "a,b,c";
   };
 
-  filter = {
+  testFilter = {
     expr = filter (x: x != "a") ["a" "b" "c" "a"];
     expected = ["b" "c"];
   };
 
-  fold = {
+  testFold = {
     expr = fold (builtins.add) 0 (range 0 100);
     expected = 5050;
   };
 
-  eqStrict = {
+  testEqStrict = {
     expr = all id [
       (eqStrict 2 2)
       (!eqStrict 3 2)
@@ -61,7 +61,7 @@ runTests {
     expected = true;
   };
 
-  overridableDelayableArgsTest = {
+  testOverridableDelayableArgsTest = {
     expr = 
       let res1 = defaultOverridableDelayableArgs id {};
           res2 = defaultOverridableDelayableArgs id { a = 7; };
diff --git a/pkgs/misc/drivers/gutenprint/default.nix b/pkgs/misc/drivers/gutenprint/default.nix
index 54a61749f9aa..832aeb9793c0 100644
--- a/pkgs/misc/drivers/gutenprint/default.nix
+++ b/pkgs/misc/drivers/gutenprint/default.nix
@@ -1,13 +1,16 @@
 # this package was called gimp-print in the past
-args: with args;
-let inherit (args.composableDerivation) composableDerivation edf wwf; in
-composableDerivation {} {
-
+{ fetchurl, stdenv, lib, pkgconfig, composableDerivation, cups
+, libtiff, libpng, openssl, git, gimp }@args :
 
-  name = "gutenprint-drivers";
+let
+   version = "5.2.4";
+   inherit (args.composableDerivation) composableDerivation edf wwf;
+in
+composableDerivation {} {
+  name = "gutenprint-${version}";
 
   src = fetchurl {
-    url = mirror://sourceforge/gimp-print/files/gutenprint-5.2/5.2.4/gutenprint-5.2.4.tar.bz2;
+    url = "mirror://sourceforge/gimp-print/files/gutenprint-5.2/${version}/gutenprint-${version}.tar.bz2";
     sha256 = "09lnmf92h51sm0hmzd1hn2kl1sh6dxlnc0zjd9lrifzg0miyh45n";
   };
 
diff --git a/pkgs/misc/maven/builder.sh b/pkgs/misc/maven/builder.sh
index 70bb54bbebe8..03e4a0414026 100644
--- a/pkgs/misc/maven/builder.sh
+++ b/pkgs/misc/maven/builder.sh
@@ -1,17 +1,11 @@
 source $stdenv/setup
-source $makeWrapper
 
 unpackPhase
 
 mkdir -p $out
 cp -r $name/* $out
 
-# Make a backup of the original directory
-cp -r $out/bin $out/bin-orig
-# Remove the original mvn from the bin directory
-rm $out/bin/$mavenBinary
-# Set the JAVA_HOME variable when using Maven
-makeWrapper "$out/bin-orig/$mavenBinary" "$out/bin/$mavenBinary" --set JAVA_HOME "$jdk"
+wrapProgram $out/bin/mvn --set JAVA_HOME "$jdk"
 
 # Add the maven-axis and JIRA plugin by default when using maven 1.x
 if [ -e $out/bin/maven ]
diff --git a/pkgs/misc/maven/default.nix b/pkgs/misc/maven/default.nix
index cbc0309671e7..857949016504 100644
--- a/pkgs/misc/maven/default.nix
+++ b/pkgs/misc/maven/default.nix
@@ -1,16 +1,15 @@
-{stdenv, fetchurl, jdk}:
+{stdenv, fetchurl, jdk, makeWrapper}:
 
 assert jdk != null;
 
 stdenv.mkDerivation {
-	name = "maven-2.0.3";
-	mavenBinary = "mvn";
+	name = "apache-maven-2.2.1";
 	builder = ./builder.sh;
 	src = fetchurl {
-		url = http://apache.cs.uu.nl/dist/maven/binaries/maven-2.0.3-bin.tar.bz2;
-		md5 = "14b3a62c45f5c7b3a7f72f87ffadb8e0";
+		url = mirror://apache/maven/binaries/apache-maven-2.2.1-bin.tar.gz;
+		sha256 = "0xnk08ndf1jx458sr5dfr8rh7wi92kyn887vqyzjm1ka91cnb8xr";
 	};
-	makeWrapper = ../../build-support/make-wrapper/make-wrapper.sh;
 	
+        buildInputs = [makeWrapper]; 
 	inherit jdk;
 }
diff --git a/pkgs/misc/maven/maven-2.nix b/pkgs/misc/maven/maven-2.nix
deleted file mode 100644
index 5dc46cf5de8f..000000000000
--- a/pkgs/misc/maven/maven-2.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-args: with args;
-stdenv.mkDerivation {
-  name = "maven-2.1.0-bin";
-
-  src = fetchurl {
-    # TODO mirrors 
-    url = http://apache.mirroring.de/maven/binaries/apache-maven-2.1.0-bin.zip;
-    sha256 = "13xda2l05pqs7x8ig85i9dqbdbv970zfgqif4wgjz8nn36jbxpvd";
-  };
-
-  buildInputs = [ unzip ];
-
-  phases = "unpackPhase installPhase";
-
-  installPhase = "
-    ensureDir \$out; mv * \$out
-  ";
-
-  meta = { 
-      description = "Java build tool";
-      homepage = "apache.org";
-    };
-}
diff --git a/pkgs/os-specific/linux/kqemu/1.4.0pre1.nix b/pkgs/os-specific/linux/kqemu/1.4.0pre1.nix
index ba5cf2e1d0f0..a24e65b378f3 100644
--- a/pkgs/os-specific/linux/kqemu/1.4.0pre1.nix
+++ b/pkgs/os-specific/linux/kqemu/1.4.0pre1.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, kernel, perl }:
+{ stdenv, fetchurl, kernel, perl, fullDepEntry, ... }:
 
 stdenv.mkDerivation rec {
   name = "kqemu-1.4.0pre1";
@@ -10,17 +10,19 @@ stdenv.mkDerivation rec {
 
   buildInputs = [perl];
   
-  configureFlags = [''--PREFIx=$out'' ''--kernel-path=$(ls -d ${kernel}/lib/modules/*/build)''];
+  configureFlags = [''--PREFIX=$out'' ''--kernel-path=$(ls -d ${kernel}/lib/modules/*/build)''];
   
-  preConfigure = '' 
+  preConfigure = fullDepEntry ('' 
     sed -e '/#include/i#include <linux/sched.h>' -i kqemu-linux.c
 
-    sed -e 's/memset/mymemset/g; s/memcpy/mymemcpy/g; s/void [*]my/static void *my/g' -i common/kern        
+    sed -e 's/memset/mymemset/g; s/memcpy/mymemcpy/g; s/void [*]my/static void *my/g' -i common/kernel.c
     sed -e 's/`uname -r`/'"$(basename ${kernel}/lib/modules/*)"'/' -i install.sh
     sed -e '/kernel_path=/akernel_path=$out$kernel_path' -i install.sh
     sed -e '/depmod/d' -i install.sh
     cat install.sh
-  ''; # */
+  '') ["minInit" "doUnpack"]; 
+
+  phaseNames = ["preConfigure" "doConfigure" "doMakeInstall"];
   
   meta = {
     description = "Kernel module for Qemu acceleration";
diff --git a/pkgs/os-specific/linux/nvidia-x11/legacy.nix b/pkgs/os-specific/linux/nvidia-x11/legacy.nix
index 3bf5669adc42..f3a2c49811b1 100644
--- a/pkgs/os-specific/linux/nvidia-x11/legacy.nix
+++ b/pkgs/os-specific/linux/nvidia-x11/legacy.nix
@@ -2,7 +2,7 @@
 
 let 
 
-  versionNumber = "96.43.13";
+  versionNumber = "96.43.14";
 
 in
 
@@ -15,12 +15,12 @@ stdenv.mkDerivation {
     if stdenv.system == "i686-linux" then
       fetchurl {
         url = "http://us.download.nvidia.com/XFree86/Linux-x86/${versionNumber}/NVIDIA-Linux-x86-${versionNumber}-pkg0.run";
-        sha256 = "1l0z1qik3vy2agjq86jwcpdn8qz16j1xpzvjzaiyc9ccdskbvm87";
+        sha256 = "0v93ijdpgh3vpbhrikzync6pws5i471ykqbpp7gahv7hf51z61kr";
       }
     else if stdenv.system == "x86_64-linux" then
       fetchurl {
         url = "http://us.download.nvidia.com/XFree86/Linux-x86_64/${versionNumber}/NVIDIA-Linux-x86_64-${versionNumber}-pkg0.run";
-        sha256 = "0xi90qc32a9im8v6j28k2kj8y4wgc3aqkjxfd3ii5jn629ba18l0";
+        sha256 = "0m5gj8wb1w5rwh2qi5bvkxlwy9igwfjifjyyqkd17x0v0rw6iyhr";
       }
     else throw "nvidia-x11 does not support platform ${stdenv.system}";
 
diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix
index fb360e433bb0..523f49eb637c 100644
--- a/pkgs/servers/x11/xorg/overrides.nix
+++ b/pkgs/servers/x11/xorg/overrides.nix
@@ -123,7 +123,7 @@ in
   };
 
   xf86videoopenchrome = attrs: attrs // {
-    name = "xf86-video-openchrome-svn-798";
+    name = "xf86-video-openchrome-svn-816";
     src = args.fetchsvn {
       url = http://svn.openchrome.org/svn/trunk;
       sha256 = "1mhfh1n1x7fnxdbbkbz13lzd57m6xi3n9cblzgm43mz5bamacr02";
diff --git a/pkgs/stdenv/adapters.nix b/pkgs/stdenv/adapters.nix
index c4f8b6db8f24..5718d06c45d2 100644
--- a/pkgs/stdenv/adapters.nix
+++ b/pkgs/stdenv/adapters.nix
@@ -258,4 +258,69 @@ rec {
           (stdenv.mkDerivation args)
           { meta.maintainers = maintainers; };
     };
+
+
+  /* Use the trace output to report all processed derivations with their
+     license name.
+ 
+  */
+  traceDrvLicenses = stdenv: stdenv //
+    { mkDerivation = args:
+        let
+          pkg = stdenv.mkDerivation args;
+          printDrvPath = val: let
+            drvPath = builtins.unsafeDiscardStringContext pkg.drvPath;
+            license =
+              if pkg ? meta && pkg.meta ? license then
+                pkg.meta.license
+              else
+                null;
+          in
+            builtins.trace "@:drv:${toString drvPath}:${builtins.exprToString license}:@"
+              val;
+        in pkg // {
+          outPath = printDrvPath pkg.outPath;
+          drvPath = printDrvPath pkg.drvPath;
+        };
+    };
+
+  /* Abort if the license predicate is not verified for a derivation
+     declared with mkDerivation.
+
+     One possible predicate to avoid all non-free packages can be achieved
+     with the following function:
+
+     isFree = license: with builtins;
+       if isNull license then true
+       else if isList license then lib.all isFree license
+       else license != "non-free" && license != "unfree";
+
+     This adapter can be defined on the defaultStdenv definition.  You can
+     use it by patching the all-packages.nix file or by using the override
+     feature of ~/.nixpkgs/config.nix .
+  */
+  validateLicenses = licensePred: stdenv: stdenv //
+    { mkDerivation = args:
+        let
+          pkg = stdenv.mkDerivation args;
+          license =
+            if pkg ? meta && pkg.meta ? license then
+              pkg.meta.license
+            else
+              null;
+
+          validate = arg:
+            if licensePred license then arg
+            else abort "
+              Error while building ${builtins.unsafeDiscardStringContext pkg.drvPath}:
+              The license predicate is not verified.
+
+              bad license: ${builtins.exprToString license}
+            ";
+
+        in pkg // {
+          outPath = validate pkg.outPath;
+          drvPath = validate pkg.drvPath;
+        };
+    };
 }
diff --git a/pkgs/stdenv/default.nix b/pkgs/stdenv/default.nix
index ed8f0e39f5f8..40acb8cfece4 100644
--- a/pkgs/stdenv/default.nix
+++ b/pkgs/stdenv/default.nix
@@ -58,5 +58,6 @@ rec {
     if stdenvType == "powerpc-linux" then /* stdenvLinux */ stdenvNative else
     if stdenvType == "i686-mingw" then stdenvMinGW else
     if stdenvType == "i686-darwin" then stdenvNix else
+    if stdenvType == "x86_64-darwin" then stdenvNix else
     stdenvNative;
 }
diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix
index 0ae71d183dec..191dd54c6aea 100644
--- a/pkgs/stdenv/generic/default.nix
+++ b/pkgs/stdenv/generic/default.nix
@@ -90,7 +90,7 @@ let
           (if attrs ? passthru then attrs.passthru else {});
 
         # Utility flags to test the type of platform.
-        isDarwin = result.system == "i686-darwin" || result.system == "powerpc-darwin";
+        isDarwin = result.system == "i686-darwin" || result.system == "powerpc-darwin" || result.system == "x86_64-darwin";
         isLinux = result.system == "i686-linux"
                || result.system == "x86_64-linux"
                || result.system == "powerpc-linux"
@@ -100,7 +100,8 @@ let
                || result.system == "i686-freebsd"
                || result.system == "i686-openbsd"
                || result.system == "i386-sunos";
-        is64bit = result.system == "x86_64-linux";
+        is64bit = result.system == "x86_64-linux"
+                || result.system == "x86_64-darwin";
 
         # Utility function: allow stdenv to be easily regenerated with
         # a different setup script.  (See all-packages.nix for an
diff --git a/pkgs/stdenv/native/default.nix b/pkgs/stdenv/native/default.nix
index 880fabf64b07..1f2117ebba0f 100644
--- a/pkgs/stdenv/native/default.nix
+++ b/pkgs/stdenv/native/default.nix
@@ -86,7 +86,7 @@ rec {
       name = "stdenv-native";
 
       preHook =
-        if system == "i686-darwin" || system == "powerpc-darwin" then prehookDarwin else
+        if system == "i686-darwin" || system == "powerpc-darwin" || system == "x86_64-darwin" then prehookDarwin else
         if system == "i686-freebsd" then prehookFreeBSD else
         if system == "i686-openbsd" then prehookOpenBSD else
 	if system == "i686-netbsd" then prehookNetBSD else
diff --git a/pkgs/tools/X11/xlaunch/default.nix b/pkgs/tools/X11/xlaunch/default.nix
index 1063cdd8ee67..2c28e986afba 100644
--- a/pkgs/tools/X11/xlaunch/default.nix
+++ b/pkgs/tools/X11/xlaunch/default.nix
@@ -45,7 +45,7 @@ EOF
 			else
 			  RESET_OPTION=\"-noreset\"
 			fi;
-			XCMD=\"\$(egrep \"^env\" /etc/event.d/xserver | sed -e \"s/env/ export /\" | sed -e '\\''s/#.*//'\\'' ; echo export _XARGS_=\\\$\\( grep xserver_arguments \\\$SLIM_CFGFILE \\| sed -e s/xserver_arguments// \\| sed -e s/:0/:\${_display}/ \\| sed -e s/vt7/vt\$((7+_display))/ \\) ; echo ${xorgserver}/bin/X \\\$_XARGS_ \$RESET_OPTION )\" 
+			XCMD=\"\$(egrep \"^env\" /etc/init/xserver.conf | sed -e \"s/env/ export /\" | sed -e '\\''s/#.*//'\\'' ; echo export _XARGS_=\\\$\\( grep xserver_arguments \\\$SLIM_CFGFILE \\| sed -e s/xserver_arguments// \\| sed -e s/:0/:\${_display}/ \\| sed -e s/vt7/vt\$((7+_display))/ \\) ; echo ${xorgserver}/bin/X \\\$_XARGS_ \$RESET_OPTION )\" 
 			echo \"\$XCMD\" 
 			echo \"\$XCMD\" | bash &
 			while ! test -e /tmp/.X11-unix/X\$_display &>/dev/null ; do sleep 0.5; done
diff --git a/pkgs/tools/misc/gnokii/default.nix b/pkgs/tools/misc/gnokii/default.nix
index 953be6468510..5687195505a4 100644
--- a/pkgs/tools/misc/gnokii/default.nix
+++ b/pkgs/tools/misc/gnokii/default.nix
@@ -4,7 +4,7 @@ let
 
   s = import ./src-for-default.nix; 
   buildInputs = with a; [
-    perl intltool gettext
+    perl intltool gettext libusb
   ];
 in
 rec {
diff --git a/pkgs/tools/misc/myhasktags/default.nix b/pkgs/tools/misc/myhasktags/default.nix
index 9538144c45cd..686aa804cf02 100644
--- a/pkgs/tools/misc/myhasktags/default.nix
+++ b/pkgs/tools/misc/myhasktags/default.nix
@@ -22,7 +22,7 @@ stdenv.mkDerivation {
   version = "0.0"; # Haskell Platform 2009.0.0
   src = fetchurl {
     url = http://mawercer.de/~nix/hasktags.hs;
-    sha256 = "119c4d8f1c33f5aa04b01022a089e3ea2e2b213641b25920c7732ca27fd47c83";
+    sha256 = "e5ce4c4e1f5916baf9395174978faee67a86ff5350936c82e115939812a4d579";
   };
   phases="buildPhase";
   buildPhase = ''
diff --git a/pkgs/tools/networking/socat/2.0.0-b3.nix b/pkgs/tools/networking/socat/2.0.0-b3.nix
index 098a2d241df0..6567e5dfcc40 100644
--- a/pkgs/tools/networking/socat/2.0.0-b3.nix
+++ b/pkgs/tools/networking/socat/2.0.0-b3.nix
@@ -1,4 +1,8 @@
 args : with args; 
+let 
+  version = "2.0.0-b3"; 
+  patches = [];
+in
 rec {
   src = /* Here a fetchurl expression goes */
         fetchurl {
diff --git a/pkgs/tools/package-management/nix/unstable.nix b/pkgs/tools/package-management/nix/unstable.nix
index dd72b340d1aa..f7bb8c6413d6 100644
--- a/pkgs/tools/package-management/nix/unstable.nix
+++ b/pkgs/tools/package-management/nix/unstable.nix
@@ -1,17 +1,14 @@
-{ stdenv, fetchurl, aterm, db4, perl, curl, bzip2, openssl ? null
+{ stdenv, fetchurl, aterm, perl, curl, bzip2, openssl ? null
 , storeDir ? "/nix/store"
 , stateDir ? "/nix/var"
-, supportOldDBs ? true
-, nameSuffix ? ""
-, patches ? []
 }:
 
 stdenv.mkDerivation rec {
-  name = "nix-0.13pre17922${nameSuffix}";
+  name = "nix-0.14pre18592";
   
   src = fetchurl {
-    url = "http://hydra.nixos.org/build/105957/download/4/${name}.tar.bz2";
-    sha256 = "11735f2d01ed1c4a7dd345690cd6bbfec175626a6bf2c0d76a27da3c5f51c187";
+    url = "http://hydra.nixos.org/build/156376/download/4/${name}.tar.bz2";
+    sha256 = "5f0d9612a5d06176a3f0a45b16155c43cbf94a2b22849030864de276cee7f9a8";
   };
 
   buildInputs = [perl curl openssl];
@@ -19,7 +16,6 @@ stdenv.mkDerivation rec {
   configureFlags = ''
     --with-store-dir=${storeDir} --localstatedir=${stateDir}
     --with-aterm=${aterm} --with-bzip2=${bzip2}
-    ${if supportOldDBs then "--with-bdb=${db4}" else "--disable-old-db-compat"}
     --disable-init-state
   '';
 
@@ -32,6 +28,4 @@ stdenv.mkDerivation rec {
     homepage = http://nixos.org/;
     license = "LGPL";
   };
-
-  inherit patches;
 }
diff --git a/pkgs/tools/security/bmrsa/11.nix b/pkgs/tools/security/bmrsa/11.nix
index 216cf1c17d8f..0a830e75d804 100644
--- a/pkgs/tools/security/bmrsa/11.nix
+++ b/pkgs/tools/security/bmrsa/11.nix
@@ -4,7 +4,7 @@ let
   fetchurl = args.fetchurl;
   fullDepEntry = args.fullDepEntry;
 
-  version = lib.attrByPath ["version"] "" args; 
+  version = "11"; 
   buildInputs = with args; [
     unzip
   ];
diff --git a/pkgs/tools/system/filelight/default.nix b/pkgs/tools/system/filelight/default.nix
index 872c56f700ea..632001984893 100644
--- a/pkgs/tools/system/filelight/default.nix
+++ b/pkgs/tools/system/filelight/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation {
   configureFlags = "--without-debug --without-arts";
   
   preConfigure = ''
-    sed -e '/sys_lib_\(dl\)\{0,1\}search_path_spec=/d' -i configure
+    sed -e 's/.*sys_lib_\(dl\)\{0,1\}search_path_spec=.*/:/' -i configure
     sed -e '/X_LDFLAGS=/d' -i configure
   '';
 
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 78e8b7a1063f..73c61797cf3e 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -739,7 +739,7 @@ let
   };
 
   gnokii = builderDefsPackage (import ../tools/misc/gnokii) {
-    inherit intltool perl gettext;
+    inherit intltool perl gettext libusb;
   };
 
   gnugrep = useFromStdenv "gnugrep"
@@ -1407,6 +1407,10 @@ let
     inherit fetchurl stdenv openssl;
   };
 
+  socat2pre = builderDefsPackage ../tools/networking/socat/2.0.0-b3.nix {
+    inherit fetchurl stdenv openssl;
+  };
+
   sudo = import ../tools/security/sudo {
     inherit fetchurl stdenv coreutils pam groff;
   };
@@ -2742,9 +2746,11 @@ let
     inherit fetchurl stdenv yacc m4;
   };
 
-  flex254a = import ../development/tools/parsing/flex/flex-2.5.4a.nix {
+  # Note: 2.5.4a is much older than 2.5.35 but happens first when sorting
+  # alphabetically, hence the low priority.
+  flex254a = lowPrio (import ../development/tools/parsing/flex/flex-2.5.4a.nix {
     inherit fetchurl stdenv yacc;
-  };
+  });
 
   m4 = gnum4;
 
@@ -3546,7 +3552,6 @@ let
     inherit fetchurl stdenv libgpgerror pkgconfig pth gnupg gnupg2 glib;
   };
 
-  # gnu scientific library
   gsl = import ../development/libraries/gsl {
     inherit fetchurl stdenv;
   };
@@ -4820,7 +4825,7 @@ let
     inherit fetchurl stdenv python db4;
   };
 
-  flup = import ../development/python-modules/flup {
+  flup = builderDefsPackage ../development/python-modules/flup {
     inherit fetchurl stdenv;
     python = python25;
     setuptools = setuptools.passthru.function {python = python25;};
@@ -5633,8 +5638,8 @@ let
       inherit fetchurl stdenv kernel ncurses fxload;
     };
 
-    kqemu = import ../os-specific/linux/kqemu/1.4.0pre1.nix {
-      inherit fetchurl stdenv kernel perl;
+    kqemu = builderDefsPackage ../os-specific/linux/kqemu/1.4.0pre1.nix {
+      inherit kernel perl;
     };
 
     splashutils =
@@ -6322,6 +6327,13 @@ let
     inherit fetchurl stdenv cmake libpng libtiff libjpeg panotools libxml2;
   };
 
+  avidemux = import ../applications/video/avidemux {
+    inherit fetchurl stdenv cmake pkgconfig libxml2 qt4 gettext SDL libxslt x264
+      alsaLib lame faac faad2 libvorbis;
+    inherit (gtkLibs) gtk;
+    inherit (xlibs) libXv pixman libpthreadstubs libXau libXdmcp;
+  };
+
   batik = import ../applications/graphics/batik {
     inherit fetchurl stdenv unzip;
   };
@@ -6612,6 +6624,14 @@ let
 
   emacs = emacs23;
 
+  emacs22 = import ../applications/editors/emacs-22 {
+    inherit fetchurl stdenv ncurses pkgconfig x11 Xaw3d;
+    inherit (xlibs) libXaw libXpm;
+    inherit (gtkLibs) gtk;
+    xaw3dSupport = getPkgConfig "emacs" "xaw3dSupport" false;
+    gtkGUI = getPkgConfig "emacs" "gtkSupport" true;
+  };
+
   emacs23 = import ../applications/editors/emacs-23 {
     inherit fetchurl stdenv ncurses pkgconfig x11 Xaw3d
       libpng libjpeg libungif libtiff texinfo dbus;
@@ -6705,6 +6725,7 @@ let
     };
   });
 
+  emacs22Packages = emacsPackages emacs22;
   emacs23Packages = emacsPackages emacs23;
 
   evince = makeOverridable (import ../applications/misc/evince) {
@@ -6937,6 +6958,12 @@ let
     browser = firefox35;
   };
 
+  geeqie = import ../applications/graphics/geeqie {
+    inherit fetchurl stdenv pkgconfig libpng lcms exiv2
+      intltool gettext;
+    inherit (gtkLibs) gtk;
+  };
+
   gqview = import ../applications/graphics/gqview {
     inherit fetchurl stdenv pkgconfig libpng;
     inherit (gtkLibs) gtk;
@@ -7044,10 +7071,9 @@ let
   };
 
   inkscape = import ../applications/graphics/inkscape {
-    inherit fetchurl stdenv perl perlXMLParser pkgconfig zlib
-      popt libxml2 libxslt libpng boehmgc fontconfig
-      libsigcxx lcms boost gettext cairomm
-      python pyxml makeWrapper;
+    inherit fetchurl stdenv perl perlXMLParser pkgconfig zlib popt
+      libxml2 libxslt libpng boehmgc libsigcxx lcms boost gettext
+      cairomm python pyxml makeWrapper intltool gsl;
     inherit (pythonPackages) lxml;
     inherit (gtkLibs) gtk glib glibmm gtkmm;
     inherit (xlibs) libXft;
@@ -8397,10 +8423,8 @@ let
     inherit stdenv fetchurl jdk;
   };
 
-  # don't have time for the source build right now
-  # maven2
-  mvn_bin = import ../misc/maven/maven-2.nix {
-    inherit fetchurl stdenv unzip;
+  maven2 = import ../misc/maven {
+    inherit stdenv fetchurl jdk makeWrapper;
   };
 
   nix = makeOverridable (import ../tools/package-management/nix) {
@@ -8413,17 +8437,12 @@ let
   };
 
   # The bleeding edge.
-  nixUnstable = nix;
-  /*
   nixUnstable = makeOverridable (import ../tools/package-management/nix/unstable.nix) {
     inherit fetchurl stdenv perl curl bzip2 openssl;
     aterm = aterm242fixes;
-    db4 = db45;
-    supportOldDBs = getPkgConfig "nix" "OldDBSupport" true;
     storeDir = getPkgConfig "nix" "storeDir" "/nix/store";
     stateDir = getPkgConfig "nix" "stateDir" "/nix/var";
   };
-  */
 
   nixCustomFun = src: preConfigure: enableScripts: configureFlags:
     import ../tools/package-management/nix/custom.nix {
diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix
index 83891984096d..060f389e9e04 100644
--- a/pkgs/top-level/release.nix
+++ b/pkgs/top-level/release.nix
@@ -146,6 +146,7 @@ in {
   e2fsprogs = linux;
   ejabberd = linux;
   elinks = linux;
+  emacs22 = gtkSupported;
   emacs23 = gtkSupported;
   enscript = all;
   eprover = linux;
@@ -435,13 +436,16 @@ in {
     tools = linux;
   };
 
-  emacs23Packages = {
+  emacs22Packages = {
     bbdb = linux;
     cedet = linux;
     ecb = linux;
     emacsw3m = linux;
     emms = linux;
     nxml = all;
+  };
+
+  emacs23Packages = emacs22Packages // {
     jdee = linux;
   };