about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/compilers/strategoxt/0.18.nix6
-rw-r--r--pkgs/development/compilers/tinycc/default.nix68
-rw-r--r--pkgs/development/interpreters/guile/1.9.nix12
-rw-r--r--pkgs/development/libraries/dbus-glib/default.nix3
-rw-r--r--pkgs/development/libraries/ftgl/default.nix13
-rw-r--r--pkgs/development/libraries/glib/2.22.x.nix5
-rw-r--r--pkgs/development/libraries/glib/2.24.x.nix5
-rw-r--r--pkgs/development/libraries/grantlee/default.nix4
-rw-r--r--pkgs/development/libraries/gstreamer/default.nix31
-rw-r--r--pkgs/development/libraries/gstreamer/gnonlin/default.nix2
-rw-r--r--pkgs/development/libraries/gstreamer/gst-ffmpeg/default.nix4
-rw-r--r--pkgs/development/libraries/gstreamer/gst-plugins-base/default.nix24
-rw-r--r--pkgs/development/libraries/gstreamer/gst-plugins-good/default.nix8
-rw-r--r--pkgs/development/libraries/gstreamer/gstreamer/default.nix13
-rw-r--r--pkgs/development/libraries/haskell/Boolean/default.nix13
-rw-r--r--pkgs/development/libraries/haskell/Graphalyze/default.nix13
-rw-r--r--pkgs/development/libraries/haskell/MemoTrie/default.nix13
-rw-r--r--pkgs/development/libraries/haskell/bktrees/default.nix12
-rw-r--r--pkgs/development/libraries/haskell/cabal/cabal.nix9
-rw-r--r--pkgs/development/libraries/haskell/colour/default.nix12
-rw-r--r--pkgs/development/libraries/haskell/graphviz/default.nix13
-rw-r--r--pkgs/development/libraries/haskell/vector-space/default.nix14
-rw-r--r--pkgs/development/libraries/haskell/vty/default.nix9
-rw-r--r--pkgs/development/libraries/hspell/default.nix28
-rw-r--r--pkgs/development/libraries/hspell/dicts.nix43
-rw-r--r--pkgs/development/libraries/incrtcl/default.nix29
-rw-r--r--pkgs/development/libraries/jama/default.nix28
-rw-r--r--pkgs/development/libraries/java/icedtea/default.nix112
-rw-r--r--pkgs/development/libraries/java/icedtea/nixos-slash-bin.patch20
-rw-r--r--pkgs/development/libraries/libcv/default.nix33
-rw-r--r--pkgs/development/libraries/libdrm/default.nix4
-rw-r--r--pkgs/development/libraries/libjpeg-turbo/default.nix6
-rw-r--r--pkgs/development/libraries/libsamplerate/default.nix2
-rw-r--r--pkgs/development/libraries/libspectre/default.nix4
-rw-r--r--pkgs/development/libraries/tnt/default.nix23
-rw-r--r--pkgs/development/libraries/unicap/default.nix55
-rw-r--r--pkgs/development/libraries/urt/default.nix61
-rw-r--r--pkgs/development/libraries/urt/gentoo-config52
-rw-r--r--pkgs/development/libraries/urt/urt-3.1b-build-fixes.patch151
-rw-r--r--pkgs/development/libraries/urt/urt-3.1b-compile-updates.patch141
-rw-r--r--pkgs/development/libraries/urt/urt-3.1b-make.patch75
-rw-r--r--pkgs/development/libraries/urt/urt-3.1b-rle-fixes.patch203
-rw-r--r--pkgs/development/libraries/urt/urt-3.1b-tempfile.patch19
-rw-r--r--pkgs/development/libraries/webkit/default.nix2
-rw-r--r--pkgs/development/libraries/webkit/src-for-default.nix10
-rw-r--r--pkgs/development/python-modules/pygobject/default.nix20
-rw-r--r--pkgs/development/python-modules/pygtk/default.nix23
-rw-r--r--pkgs/development/tools/build-managers/scons/default.nix7
48 files changed, 1324 insertions, 133 deletions
diff --git a/pkgs/development/compilers/strategoxt/0.18.nix b/pkgs/development/compilers/strategoxt/0.18.nix
index 54c7ebcefaf1..dd2620cfc4c1 100644
--- a/pkgs/development/compilers/strategoxt/0.18.nix
+++ b/pkgs/development/compilers/strategoxt/0.18.nix
@@ -41,11 +41,11 @@ rec {
 
   
   strategoxt = stdenv.mkDerivation rec {
-    name = "strategoxt-0.18pre20635";
+    name = "strategoxt-0.18pre21134";
 
     src = fetchurl {
-      url = http://hydra.nixos.org/build/301917/download/1/strategoxt-0.18pre20635.tar.gz;
-      sha256 = "963bf8e6ab2c46e98ee81311de723e7ee7573568d1c78d7b66e047d8d8d283b9";
+      url = http://hydra.nixos.org/build/665485/download/1/strategoxt-1.8pre21134.tar.gz;
+      sha256 = "105ce9a424551cf007e354eac181aafb352713e79cf1735a73564984c3635e53";
     };
 
     buildInputs = [pkgconfig aterm sdf getopt];
diff --git a/pkgs/development/compilers/tinycc/default.nix b/pkgs/development/compilers/tinycc/default.nix
index 435747e12486..1b24b7008f61 100644
--- a/pkgs/development/compilers/tinycc/default.nix
+++ b/pkgs/development/compilers/tinycc/default.nix
@@ -2,41 +2,95 @@
 
 assert stdenv ? glibc;
 
-let version = "0.9.24"; in
+let version = "0.9.25"; in
   stdenv.mkDerivation {
     name = "tinycc-${version}";
 
     src = fetchurl {
       url = "mirror://savannah/tinycc/tcc-${version}.tar.bz2";
-      sha256 = "0yafz627ky0lhppa6g1mfmisnis745m39l15aixmmv5n383x9bi7";
+      sha256 = "0dfycf80x73dz67c97j1ry29wrv35393ai5ry46i1x1fzfq6rv8v";
     };
 
     buildInputs = [ perl texinfo ];
 
-    patchPhase = ''
+    patches =
+      [ (fetchurl {
+           # Add support for `alloca' on x86-64.
+           url = "http://repo.or.cz/w/tinycc.git/patch/8ea8305199496ba29b6d0da2de07aea4441844aa";
+           sha256 = "0dz1cm9zihk533hszqql4gxpzbp8c4g9dnvkkh9vs4js6fnz1fl2";
+           name = "x86-64-alloca.patch";
+         })
+
+        (fetchurl {
+           # Fix alignment of the return value of `alloca'.
+           url = "http://repo.or.cz/w/tinycc.git/patch/dca2b15df42c1341794dd412917708416da25594";
+           sha256 = "0617a69gnfdmv8pr6dj3szv97v3zh57439dsbklxrnipx2jv6pq7";
+           name = "x86-64-alloca-align.patch";
+         })
+      ];
+
+    postPatch = ''
       substituteInPlace "texi2pod.pl" \
         --replace "/usr/bin/perl" "${perl}/bin/perl"
 
       # To produce executables, `tcc' needs to know where `crt*.o' are.
-      sed -i "tcc.c" \
-        -e's|define CONFIG_TCC_CRT_PREFIX.*$|define CONFIG_TCC_CRT_PREFIX "${stdenv.glibc}/lib"|g ;
-           s|tcc_add_library_path(s, "/usr/lib");|tcc_add_library_path(s, "${stdenv.glibc}/lib");|g'
+      sed -i "tcc.h" \
+        -e's|define CONFIG_TCC_CRT_PREFIX.*$|define CONFIG_TCC_CRT_PREFIX "${stdenv.glibc}/lib"|g'
+
+      sed -i "libtcc.c" \
+        -e's|tcc_add_library_path(s, CONFIG_SYSROOT "/lib");|tcc_add_library_path(s, "${stdenv.glibc}/lib");|g;
+           s|tcc_add_sysinclude_path(s, CONFIG_SYSROOT "/usr/include");|tcc_add_library_path(s, "${stdenv.glibc}/include");|g ;
+           s|tcc_add_sysinclude_path(s, buf);|tcc_add_sysinclude_path(s, buf); tcc_add_sysinclude_path(s, "${stdenv.glibc}/include");|g'
 
       # Tell it about the loader's location.
       sed -i "tccelf.c" \
         -e's|".*/ld-linux\([^"]\+\)"|"${stdenv.glibc}/lib/ld-linux\1"|g'
-    '';
+    ''; # "
 
     postInstall = ''
       makeinfo --force tcc-doc.texi || true
 
       ensureDir "$out/share/info"
       mv tcc-doc.info* "$out/share/info"
+
+      echo 'int main () { printf ("it works!\n"); exit(0); }' | \
+         "$out/bin/tcc" -run -
     '';
 
+    doCheck = true;
+    checkTarget = "test";
+
     meta = {
       description = "TinyCC, a small, fast, and embeddable C compiler and interpreter";
+
+      longDescription =
+        '' TinyCC (aka TCC) is a small but hyper fast C compiler.  Unlike
+           other C compilers, it is meant to be self-sufficient: you do not
+           need an external assembler or linker because TCC does that for
+           you.
+
+           TCC compiles so fast that even for big projects Makefiles may not
+           be necessary.
+
+           TCC not only supports ANSI C, but also most of the new ISO C99
+           standard and many GNU C extensions.
+
+           TCC can also be used to make C scripts, i.e. pieces of C source
+           that you run as a Perl or Python script.  Compilation is so fast
+           that your script will be as fast as if it was an executable.
+
+           TCC can also automatically generate memory and bound checks while
+           allowing all C pointers operations.  TCC can do these checks even
+           if non patched libraries are used.
+
+           With libtcc, you can use TCC as a backend for dynamic code
+           generation.
+        '';
+
       homepage = http://www.tinycc.org/;
       license = "LGPLv2+";
+
+      platforms = stdenv.lib.platforms.unix;
+      maintainers = [ stdenv.lib.maintainers.ludo ];
     };
   }
diff --git a/pkgs/development/interpreters/guile/1.9.nix b/pkgs/development/interpreters/guile/1.9.nix
index 97650c554ce9..70c2e44c6283 100644
--- a/pkgs/development/interpreters/guile/1.9.nix
+++ b/pkgs/development/interpreters/guile/1.9.nix
@@ -7,18 +7,24 @@
  else stdenv.mkDerivation)
 
 rec {
-  name = "guile-1.9.12";  # This is a beta release!
+  name = "guile-1.9.13";  # This is a beta release!
 
   src = fetchurl {
     url = "ftp://alpha.gnu.org/gnu/guile/${name}.tar.gz";
-    sha256 = "098p940fs6jmjpdp4jb2wjqrr0l2cgf8yhy3nf9s444pxwlyvn2g";
+    sha256 = "1idrp39lnqyiw68k1mmbfrd46zqdn19crwqbg3b064p6hljypdl4";
   };
 
   buildInputs =
     [ makeWrapper gawk readline libtool libunistring
       libffi pkgconfig
     ];
-  propagatedBuildInputs = [ gmp boehmgc ];
+  propagatedBuildInputs = [ gmp boehmgc ]
+
+    # XXX: These ones aren't normally needed here, but since
+    # `libguile-2.0.la' reads `-lltdl -lunistring', adding them here will add
+    # the needed `-L' flags.  As for why the `.la' file lacks the `-L' flags,
+    # see below.
+    ++ [ libtool libunistring ];
 
   patches =
     stdenv.lib.optionals (coverageAnalysis != null)
diff --git a/pkgs/development/libraries/dbus-glib/default.nix b/pkgs/development/libraries/dbus-glib/default.nix
index e21a5d66a0e2..4a2cd6f4cf95 100644
--- a/pkgs/development/libraries/dbus-glib/default.nix
+++ b/pkgs/development/libraries/dbus-glib/default.nix
@@ -8,7 +8,8 @@ stdenv.mkDerivation rec {
     sha256 = "1p0bm5p8g8h0mimhj0d58dqdrhfipvcwv95l6hf69z4gygksclak";
   };
   
-  buildInputs = [ pkgconfig expat gettext libiconv ];
+  buildInputs = [ pkgconfig expat gettext ]
+                ++ stdenv.lib.optional (!stdenv.isLinux) libiconv;
   
   propagatedBuildInputs = [ dbus.libs glib ];
   
diff --git a/pkgs/development/libraries/ftgl/default.nix b/pkgs/development/libraries/ftgl/default.nix
new file mode 100644
index 000000000000..7d10298ad3ee
--- /dev/null
+++ b/pkgs/development/libraries/ftgl/default.nix
@@ -0,0 +1,13 @@
+{stdenv, fetchurl, freetype, mesa}:
+ 
+stdenv.mkDerivation {
+  name = "ftgl-2.1.3-rc5";
+  
+  src = fetchurl {
+    url = mirror://sourceforge/ftgl/files/FTGL%20Source/2.1.3%7Erc5/ftgl-2.1.3-rc5.tar.gz ;
+    sha256 = "0nsn4s6vnv5xcgxcw6q031amvh2zfj2smy1r5mbnjj2548hxcn2l";
+  };
+  
+  buildInputs = [freetype mesa];
+
+}
diff --git a/pkgs/development/libraries/glib/2.22.x.nix b/pkgs/development/libraries/glib/2.22.x.nix
index 9148639c2d0e..f9129f7ae4a5 100644
--- a/pkgs/development/libraries/glib/2.22.x.nix
+++ b/pkgs/development/libraries/glib/2.22.x.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, gettext, perl, libiconv ? null}:
+{ stdenv, fetchurl, pkgconfig, gettext, perl, libiconv}:
 
 stdenv.mkDerivation rec {
   name = "glib-2.22.5";
@@ -8,7 +8,8 @@ stdenv.mkDerivation rec {
     sha256 = "802be9c9ffeb631725ffd6ed35af0af309776729a7fab4fcb48f2b0b8fe7245b";
   };
 
-  buildInputs = [pkgconfig gettext perl libiconv];
+  buildInputs = [pkgconfig gettext perl]
+                ++ stdenv.lib.optional (!stdenv.isLinux) libiconv;
 
   # The nbd package depends on a static version of this library; hence
   # the default configure flag --disable-static is switched off.
diff --git a/pkgs/development/libraries/glib/2.24.x.nix b/pkgs/development/libraries/glib/2.24.x.nix
index 0cdff4254b0f..941697875b0c 100644
--- a/pkgs/development/libraries/glib/2.24.x.nix
+++ b/pkgs/development/libraries/glib/2.24.x.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, gettext, perl, libiconv ? null, zlib }:
+{ stdenv, fetchurl, pkgconfig, gettext, perl, libiconv, zlib }:
 
 stdenv.mkDerivation rec {
   name = "glib-2.24.1";
@@ -8,7 +8,8 @@ stdenv.mkDerivation rec {
     sha256 = "014c3da960bf17117371075c16495f05f36501db990851ceea658f15d2ea6d04";
   };
 
-  buildInputs = [ pkgconfig gettext libiconv ];
+  buildInputs = [ pkgconfig gettext ]
+                ++ stdenv.lib.optional (!stdenv.isLinux) libiconv;
   buildNativeInputs = [ perl ];
 
   propagatedBuildInputs = [ zlib ];
diff --git a/pkgs/development/libraries/grantlee/default.nix b/pkgs/development/libraries/grantlee/default.nix
index dea6a7e6f3cd..85697aba87fc 100644
--- a/pkgs/development/libraries/grantlee/default.nix
+++ b/pkgs/development/libraries/grantlee/default.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchurl, qt4, cmake }:
 
 stdenv.mkDerivation rec {
-  name = "grantlee-0.1.5";
+  name = "grantlee-0.1.7";
 
 # Upstream download server has country code firewall, so I made a mirror. The
 # URL of the mirror may change in the future, so don't publish it yet.
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
       "http://downloads.grantlee.org/${name}.tar.gz"
       "http://www.loegria.net/grantlee/${name}.tar.gz"
     ];
-    sha256 = "040slr4kpi62vwkwnsxhvnq2m15wqn40knh69ci6kskmb3i8iv1a";
+    sha256 = "0gv6filg5a10kqs286bv79fpjff9qjq6czvysgci7mrk4lknra72";
   };
 
   buildInputs = [ cmake qt4 ];
diff --git a/pkgs/development/libraries/gstreamer/default.nix b/pkgs/development/libraries/gstreamer/default.nix
index a41e69488921..37c88580a8ac 100644
--- a/pkgs/development/libraries/gstreamer/default.nix
+++ b/pkgs/development/libraries/gstreamer/default.nix
@@ -1,32 +1,17 @@
-args: with args;
+{ callPackage, pkgs }:
+
 rec {
-  gstreamer = makeOverridable (import ./gstreamer) {
-    inherit (args) fetchurl stdenv perl bison flex
-       pkgconfig python which glib libxml2;
+  gstreamer = callPackage ./gstreamer {
+    flex = pkgs.flex2535;
   };
 
-  gstPluginsBase = makeOverridable (import ./gst-plugins-base) {
-    inherit gstreamer;
-    inherit (args) fetchurl stdenv pkgconfig python
-      libX11 libXv libXext alsaLib cdparanoia libogg libtheora
-      libvorbis freetype pango liboil gtk which gtkdoc;
-  };
+  gstPluginsBase = callPackage ./gst-plugins-base { };
 
-  gstPluginsGood = makeOverridable (import ./gst-plugins-good) {
-    inherit gstPluginsBase;
-    inherit (args) fetchurl stdenv pkgconfig aalib cairo flac hal
-      libjpeg zlib speex libpng libdv libcaca dbus libiec61883
-      libavc1394 ladspaH taglib gdbm pulseaudio libsoup libcap 
-      libtasn1;
-  };
+  gstPluginsGood = callPackage ./gst-plugins-good { };
 
-  gstFfmpeg = makeOverridable (import ./gst-ffmpeg) {
-    inherit fetchurl stdenv pkgconfig gstPluginsBase bzip2;
-  };
+  gstFfmpeg = callPackage ./gst-ffmpeg { };
 
-  gnonlin = makeOverridable (import ./gnonlin) {
-    inherit fetchurl stdenv pkgconfig gstreamer gstPluginsBase;
-  };
+  gnonlin = callPackage ./gnonlin { };
 
   # Header files are in include/${prefix}/
   prefix = "gstreamer-0.10";
diff --git a/pkgs/development/libraries/gstreamer/gnonlin/default.nix b/pkgs/development/libraries/gstreamer/gnonlin/default.nix
index aac3889ecd71..1ba33f07b1ea 100644
--- a/pkgs/development/libraries/gstreamer/gnonlin/default.nix
+++ b/pkgs/development/libraries/gstreamer/gnonlin/default.nix
@@ -1,4 +1,4 @@
-args: with args;
+{ stdenv, fetchurl, pkgconfig, gstPluginsBase, gstreamer }:
 
 stdenv.mkDerivation rec {
   name = "gnonlin-0.10.15";
diff --git a/pkgs/development/libraries/gstreamer/gst-ffmpeg/default.nix b/pkgs/development/libraries/gstreamer/gst-ffmpeg/default.nix
index 65eb2bb034f7..9132e6b0a8f3 100644
--- a/pkgs/development/libraries/gstreamer/gst-ffmpeg/default.nix
+++ b/pkgs/development/libraries/gstreamer/gst-ffmpeg/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, stdenv, pkgconfig, gstPluginsBase, bzip2 }:
+{ fetchurl, stdenv, pkgconfig, gstPluginsBase, bzip2, liboil }:
 
 stdenv.mkDerivation rec {
   name = "gst-ffmpeg-0.10.11";
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
 
   propagatedBuildInputs = [ gstPluginsBase ];
   
-  buildInputs = [ pkgconfig bzip2 ];
+  buildInputs = [ pkgconfig bzip2 liboil ];
 
   configureFlags = "--enable-ladspa";
 
diff --git a/pkgs/development/libraries/gstreamer/gst-plugins-base/default.nix b/pkgs/development/libraries/gstreamer/gst-plugins-base/default.nix
index db817918e021..4a1a2de4dace 100644
--- a/pkgs/development/libraries/gstreamer/gst-plugins-base/default.nix
+++ b/pkgs/development/libraries/gstreamer/gst-plugins-base/default.nix
@@ -1,7 +1,11 @@
 { fetchurl, stdenv, pkgconfig, python, gstreamer
-, libX11, libXv, libXext, alsaLib, cdparanoia , libogg
+, xlibs, alsaLib, cdparanoia, libogg
 , libtheora, libvorbis, freetype, pango
-, liboil, gtk, which, gtkdoc }:
+, liboil, glib
+, # Whether to build no plugins that have external dependencies
+  # (except the ALSA plugin).
+  minimalDeps ? false
+}:
 
 stdenv.mkDerivation rec {
   name = "gst-plugins-base-0.10.30";
@@ -19,12 +23,18 @@ stdenv.mkDerivation rec {
     sed -i -e 's/^   /\t/' docs/{libs,plugins}/Makefile.in
   '';
 
-# TODO : v4l, libvisual
-  propagatedBuildInputs = [gstreamer libX11 libXv libXext alsaLib cdparanoia
-    libogg libtheora libvorbis freetype pango liboil gtk which gtkdoc];
-
-  buildInputs = [pkgconfig python];
+  # TODO : v4l, libvisual
+  buildInputs =
+    [ pkgconfig glib alsaLib ]
+    ++ stdenv.lib.optionals (!minimalDeps)
+      [ xlibs.xlibs xlibs.libXv cdparanoia libogg libtheora libvorbis
+        freetype pango liboil
+      ];
 
+  propagatedBuildInputs = [ gstreamer ];
+ 
+  postInstall = "rm -rf $out/share/gtk-doc";
+  
   meta = {
     homepage = http://gstreamer.freedesktop.org;
 
diff --git a/pkgs/development/libraries/gstreamer/gst-plugins-good/default.nix b/pkgs/development/libraries/gstreamer/gst-plugins-good/default.nix
index 8256a0afd45a..65f32e44cc2a 100644
--- a/pkgs/development/libraries/gstreamer/gst-plugins-good/default.nix
+++ b/pkgs/development/libraries/gstreamer/gst-plugins-good/default.nix
@@ -1,23 +1,23 @@
 { fetchurl, stdenv, pkgconfig, gstPluginsBase, aalib, cairo
 , flac , hal, libjpeg, zlib, speex, libpng, libdv, libcaca, dbus
 , libiec61883, libavc1394, ladspaH, taglib, gdbm, pulseaudio
-, libsoup, libcap, libtasn1
+, gnome, libcap, libtasn1, liboil
 }:
 
 stdenv.mkDerivation rec {
-  name = "gst-plugins-good-0.10.24";
+  name = "gst-plugins-good-0.10.25";
 
   src = fetchurl {
     urls = [
       "${meta.homepage}/src/gst-plugins-good/${name}.tar.bz2"
       "mirror://gentoo/distfiles/${name}.tar.bz2"
       ];
-    sha256 = "1gnhw86yx0362hvmnihiq5d7i710ag9zlg636dlcdvxqqp4slx7j";
+    sha256 = "1xlr8rzb6pxi91g6jxhqa7cwl0kg5y21qfd9bgc4fb212867bmdm";
   };
 
   propagatedBuildInputs = [gstPluginsBase aalib cairo flac hal libjpeg
     zlib speex libpng libdv libcaca dbus.libs libiec61883 libavc1394 ladspaH
-    taglib gdbm pulseaudio libsoup libcap libtasn1];
+    taglib gdbm pulseaudio gnome.libsoup libcap libtasn1 liboil];
   buildInputs = [pkgconfig];
 
   configureFlags = "--enable-ladspa";
diff --git a/pkgs/development/libraries/gstreamer/gstreamer/default.nix b/pkgs/development/libraries/gstreamer/gstreamer/default.nix
index abb445b57a38..7edf0325b2ad 100644
--- a/pkgs/development/libraries/gstreamer/gstreamer/default.nix
+++ b/pkgs/development/libraries/gstreamer/gstreamer/default.nix
@@ -1,9 +1,7 @@
-{ fetchurl, stdenv, perl, bison, flex, pkgconfig, python
-, which, glib, libxml2 }:
+{ fetchurl, stdenv, perl, bison, flex, pkgconfig, glib, libxml2 }:
 
 stdenv.mkDerivation rec {
   name = "gstreamer-0.10.30";
-  # TODO: Remove gtkdoc dependency on next upgrade
 
   src = fetchurl {
     urls = [
@@ -13,17 +11,20 @@ stdenv.mkDerivation rec {
     sha256 = "0ajkfkchwpk5zlcis19laqbv84mi61cn3cqbdbrpyy93whdk1vz8";
   };
 
-  buildInputs = [perl bison flex pkgconfig python which ];
-  propagatedBuildInputs = [glib libxml2];
+  buildInputs = [ perl bison flex pkgconfig ];
+  propagatedBuildInputs = [ glib libxml2 ];
 
   patchPhase = ''
     sed -i -e 's/^   /\t/' docs/gst/Makefile.in docs/libs/Makefile.in docs/plugins/Makefile.in
   '';
 
   configureFlags = ''
-    --enable-failing-tests --localstatedir=/var --disable-gtk-doc --disable-docbook
+    --disable-examples --enable-failing-tests --localstatedir=/var --disable-gtk-doc --disable-docbook
   '';
 
+  # Hm, apparently --disable-gtk-doc is ignored...
+  postInstall = "rm -rf $out/share/gtk-doc";
+
   meta = {
     homepage = http://gstreamer.freedesktop.org;
 
diff --git a/pkgs/development/libraries/haskell/Boolean/default.nix b/pkgs/development/libraries/haskell/Boolean/default.nix
new file mode 100644
index 000000000000..664ea6039951
--- /dev/null
+++ b/pkgs/development/libraries/haskell/Boolean/default.nix
@@ -0,0 +1,13 @@
+{cabal}:
+
+cabal.mkDerivation (self : {
+  pname = "Boolean";
+  version = "0.0.1";
+  sha256 = "dafcfb2e9d7f7aa24a3d3ceb385424176297cdf6f6044028d42d0fea1cae7765";
+  meta = {
+    description = "Generalized booleans";
+    license = "BSD";
+    maintainers = [self.stdenv.lib.maintainers.andres];
+  };
+})  
+
diff --git a/pkgs/development/libraries/haskell/Graphalyze/default.nix b/pkgs/development/libraries/haskell/Graphalyze/default.nix
new file mode 100644
index 000000000000..0eca1c7edfc1
--- /dev/null
+++ b/pkgs/development/libraries/haskell/Graphalyze/default.nix
@@ -0,0 +1,13 @@
+{cabal, bktrees, fgl, graphviz, pandoc}:
+
+cabal.mkDerivation (self : {
+  pname = "Graphalyze";
+  version = "0.10.0.1";
+  sha256 = "8f273de41c7c340d2c7c8b4797d30535e4038616055099cc52bc5d21c10d9f22";
+  propagatedBuildInputs = [bktrees fgl graphviz pandoc ];
+  meta = {
+    description = "A library to use graph theory analysis";
+    license = "OtherLicene";
+  };
+})  
+
diff --git a/pkgs/development/libraries/haskell/MemoTrie/default.nix b/pkgs/development/libraries/haskell/MemoTrie/default.nix
new file mode 100644
index 000000000000..f826d0b13e08
--- /dev/null
+++ b/pkgs/development/libraries/haskell/MemoTrie/default.nix
@@ -0,0 +1,13 @@
+{cabal}:
+
+cabal.mkDerivation (self : {
+  pname = "MemoTrie";
+  version = "0.4.9";
+  sha256 = "f17dd0b73c1a11a6edb38fb6f457b9687f2e93aa4677e90f7ec482a528ac02e7";
+  meta = {
+    description = "Trie-based memo functions";
+    license = "BSD";
+    maintainers = [self.stdenv.lib.maintainers.andres];
+  };
+})  
+
diff --git a/pkgs/development/libraries/haskell/bktrees/default.nix b/pkgs/development/libraries/haskell/bktrees/default.nix
new file mode 100644
index 000000000000..03452a99f2bb
--- /dev/null
+++ b/pkgs/development/libraries/haskell/bktrees/default.nix
@@ -0,0 +1,12 @@
+{cabal}:
+
+cabal.mkDerivation (self : {
+  pname = "bktrees";
+  version = "0.3";
+  sha256 = "ddef9fbf5114175cefe2908cd4360a4b94cbc91daac6d5194a8911bacaa1a5da";
+  meta = {
+    description = "Burkhard-Keller trees sets implementation";
+    license = "BSD3";
+  };
+})  
+
diff --git a/pkgs/development/libraries/haskell/cabal/cabal.nix b/pkgs/development/libraries/haskell/cabal/cabal.nix
index 87e2563bc7b4..d46b2580918f 100644
--- a/pkgs/development/libraries/haskell/cabal/cabal.nix
+++ b/pkgs/development/libraries/haskell/cabal/cabal.nix
@@ -102,12 +102,15 @@
                 GHC_PACKAGE_PATH=$installedPkgConf ghc-pkg --global register $pkgConf --force
               fi
 
-              ensureDir $out/nix-support
-              ln -s $out/nix-support/propagated-build-native-inputs $out/nix-support/propagated-user-env-packages
-
               eval "$postInstall"
             '';
 
+            postFixup = ''
+              if test -f $out/nix-support/propagated-build-native-inputs; then
+                ln -s $out/nix-support/propagated-build-native-inputs $out/nix-support/propagated-user-env-packages
+              fi
+            '';
+
             # We inherit stdenv and ghc so that they can be used
             # in Cabal derivations.
             inherit stdenv ghc;
diff --git a/pkgs/development/libraries/haskell/colour/default.nix b/pkgs/development/libraries/haskell/colour/default.nix
new file mode 100644
index 000000000000..661f1507ab18
--- /dev/null
+++ b/pkgs/development/libraries/haskell/colour/default.nix
@@ -0,0 +1,12 @@
+{cabal}:
+
+cabal.mkDerivation (self : {
+  pname = "colour";
+  version = "2.3.1";
+  sha256 = "58cf12b8abf7d01a752b1b778b64cc406903874702e3475d65c2aa35689fa49b";
+  meta = {
+    description = "Data type, conversion and composition of colours";
+    license = "OtherLicense";
+  };
+})  
+
diff --git a/pkgs/development/libraries/haskell/graphviz/default.nix b/pkgs/development/libraries/haskell/graphviz/default.nix
new file mode 100644
index 000000000000..f747d81e6c6d
--- /dev/null
+++ b/pkgs/development/libraries/haskell/graphviz/default.nix
@@ -0,0 +1,13 @@
+{cabal, colour, fgl, polyparse, transformers, QuickCheck}:
+
+cabal.mkDerivation (self : {
+  pname = "graphviz";
+  version = "2999.10.0.1";
+  sha256 = "5a3aebd3874303dcf554aef3bf511dd22e72053a9672c823d1d820d2b90ca076";
+  propagatedBuildInputs = [colour fgl polyparse transformers QuickCheck];
+  meta = {
+    description = "Bindings for the Dot language (Graphviz)";
+    license = "BSD3";
+  };
+})  
+
diff --git a/pkgs/development/libraries/haskell/vector-space/default.nix b/pkgs/development/libraries/haskell/vector-space/default.nix
new file mode 100644
index 000000000000..d502bfcbf8a7
--- /dev/null
+++ b/pkgs/development/libraries/haskell/vector-space/default.nix
@@ -0,0 +1,14 @@
+{cabal, Boolean, MemoTrie}:
+
+cabal.mkDerivation (self : {
+  pname = "vector-space";
+  version = "0.5.9";
+  sha256 = "39045384ee1f37f92fc8a84b75eb63091d083298f7be5f51f81112dd42a553b0";
+  propagatedBuildInputs = [Boolean MemoTrie];
+  meta = {
+    description = "Vector & affine spaces, linear maps, and derivatives";
+    license = "BSD";
+    maintainers = [self.stdenv.lib.maintainers.andres];
+  };
+})  
+
diff --git a/pkgs/development/libraries/haskell/vty/default.nix b/pkgs/development/libraries/haskell/vty/default.nix
index a38ee70ce34b..46f39d1e0a69 100644
--- a/pkgs/development/libraries/haskell/vty/default.nix
+++ b/pkgs/development/libraries/haskell/vty/default.nix
@@ -1,10 +1,11 @@
-{cabal, utf8String, terminfo}:
+{cabal, utf8String, terminfo, deepseq, mtl, parallel, parsec, vectorSpace}:
 
 cabal.mkDerivation (self : {
   pname = "vty";
-  version = "3.1.8.4";
-  sha256 = "9a006e77bb4f032613e059eea7bc4d92cbc7943449fb9c7269a061ddd9b3d82b";
-  propagatedBuildInputs = [utf8String terminfo];
+  version = "4.4.0.0";
+  sha256 = "bf032022a72831e263d2d48d0a7a3191fb1174554cd714902a60cb0f39afe312";
+  propagatedBuildInputs =
+    [utf8String terminfo deepseq mtl parallel parsec vectorSpace];
   meta = {
     description = "A simple terminal access library";
   };
diff --git a/pkgs/development/libraries/hspell/default.nix b/pkgs/development/libraries/hspell/default.nix
new file mode 100644
index 000000000000..9b44d12c2934
--- /dev/null
+++ b/pkgs/development/libraries/hspell/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl, perl, zlib }:
+
+stdenv.mkDerivation rec {
+  name = "${passthru.pname}-${passthru.version}";
+
+  passthru = {
+    pname = "hspell";
+    version = "1.1";
+  };
+
+  src = fetchurl {
+    url = "${meta.homepage}${name}.tar.gz";
+    sha256 = "08x7rigq5pa1pfpl30qp353hbdkpadr1zc49slpczhsn0sg36pd6";
+  };
+
+  patchPhase = ''patchShebangs .'';
+  buildInputs = [ perl zlib ];
+
+  makeFlags = "CFLAGS=-fPIC";
+
+  meta = {
+    description = "Hebrew spell checker";
+    homepage = http://hspell.ivrix.org.il/;
+    platforms = stdenv.lib.platforms.all;
+    maintainers = [ stdenv.lib.maintainers.urkud ];
+# Note that I don't speak hebrew, so I can only fix compile problems
+  };
+}
diff --git a/pkgs/development/libraries/hspell/dicts.nix b/pkgs/development/libraries/hspell/dicts.nix
new file mode 100644
index 000000000000..a7f0d19865cf
--- /dev/null
+++ b/pkgs/development/libraries/hspell/dicts.nix
@@ -0,0 +1,43 @@
+{ stdenv, hspell }:
+
+let
+  dict = a: stdenv.mkDerivation ({
+    inherit (hspell) src patchPhase buildNativeInputs;
+    meta = hspell.meta // {
+      description = "${a.buildFlags} Hebrew dictionary";
+    } // (if a ? meta then a.meta else {});
+  } // (removeAttrs a ["meta"]));
+in
+{
+  recurseForDerivations = true;
+
+  aspell = dict {
+    name = "aspell-dict-he-${hspell.version}";
+
+    buildFlags = "aspell";
+
+    installPhase = ''
+      mkdir -p $out/lib/aspell
+      cp -v he_affix.dat he.wl $out/lib/aspell'';
+  };
+
+  myspell = dict {
+    name = "myspell-dict-he-${hspell.version}";
+
+    buildFlags = "myspell";
+
+    installPhase = ''
+      mkdir -p $out/lib/myspell
+      cp -v he.dic he.aff $out/lib/myspell'';
+  };
+
+  hunspell = dict {
+    name = "hunspell-dict-he-${hspell.version}";
+
+    buildFlags = "hunspell";
+
+    installPhase = ''
+      mkdir -p $out/lib
+      cp -rv hunspell $out/lib'';
+  };
+}
diff --git a/pkgs/development/libraries/incrtcl/default.nix b/pkgs/development/libraries/incrtcl/default.nix
new file mode 100644
index 000000000000..0263e98f587c
--- /dev/null
+++ b/pkgs/development/libraries/incrtcl/default.nix
@@ -0,0 +1,29 @@
+{stdenv, fetchurl, tcl}:
+
+stdenv.mkDerivation rec {
+  name = "incrtcl-${version}";
+  version = "3.4b1";
+  
+  src = fetchurl {
+    url = mirror://sourceforge/incrtcl/%5BIncr%20Tcl_Tk%5D-source/3.4/itcl3.4b1.tar.gz;
+    sha256 = "0226vf7vmb7qmk9bcic635d33rm3gr1wqk5rpx6pf00bq3vgr6fw";
+  };
+
+  buildInputs = [ tcl ];
+  configureFlags = [ "--with-tcl=${tcl}/lib" ];
+  patchPhase = ''
+      substituteInPlace configure --replace "\''${TCL_SRC_DIR}/generic" "${tcl}/include"
+  '';
+  preConfigure = ''
+      configureFlags="--exec_prefix=$prefix $configureFlags"
+  '';
+
+  passthru = {
+    libPrefix = "itcl3.4";
+  };
+
+  meta = {
+    homepage = http://incrtcl.sourceforge.net/;
+    description = "Object Oriented Enhancements for Tcl/Tk";
+  };
+}
diff --git a/pkgs/development/libraries/jama/default.nix b/pkgs/development/libraries/jama/default.nix
new file mode 100644
index 000000000000..6e775d5cef2f
--- /dev/null
+++ b/pkgs/development/libraries/jama/default.nix
@@ -0,0 +1,28 @@
+{stdenv, fetchurl, unzip, tnt}:
+
+stdenv.mkDerivation rec {
+  name = "jama-${version}";
+  version = "1.2.5";
+  
+  src = fetchurl {
+    url = http://math.nist.gov/tnt/jama125.zip;
+    sha256 = "031ns526fvi2nv7jzzv02i7i5sjcyr0gj884i3an67qhsx8vyckl";
+  };
+
+  buildInputs = [ unzip ];
+  propagatedBuildInputs = [ tnt ];
+
+  unpackPhase = ''
+      mkdir "${name}"
+      unzip "$src"
+  '';
+  installPhase = ''
+      mkdir -p $out/include
+      cp *.h $out/include
+  '';
+
+  meta = {
+    homepage = http://math.nist.gov/tnt/;
+    description = "JAMA/C++ Linear Algebra Package: Java-like matrix C++ templates";
+  };
+}
\ No newline at end of file
diff --git a/pkgs/development/libraries/java/icedtea/default.nix b/pkgs/development/libraries/java/icedtea/default.nix
new file mode 100644
index 000000000000..bdaa32a78d2c
--- /dev/null
+++ b/pkgs/development/libraries/java/icedtea/default.nix
@@ -0,0 +1,112 @@
+/* XXX: This is work in progress and it needs your help!  */
+
+/* See http://icedtea.classpath.org/wiki/BuildRequirements for a
+   list of dependencies.  */
+
+{ fetchurl, stdenv, which
+, wget, cpio, file, ecj, gcj, ant, gawk, procps, inetutils, zip, unzip, zlib
+, alsaLib, cups, lesstif, freetype, classpath, libjpeg, libpng, giflib
+, xalanj, xerces, rhino
+, libX11, libXp, libXtst, libXinerama, libXt, libXrender, xproto
+, pkgconfig, xulrunner, pulseaudio }:
+
+let
+  # These variables must match those in the top-level `Makefile.am'.
+  openjdkVersion   = "b16";
+  openjdkDate      = "24_apr_2009";
+  openjdkURL       =
+    "http://download.java.net/openjdk/jdk6/promoted/${openjdkVersion}/";
+  openjdkSourceZip = "openjdk-6-src-${openjdkVersion}-${openjdkDate}.tar.gz";
+
+  openjdk          = fetchurl {
+    url = "${openjdkURL}${openjdkSourceZip}";
+    sha256 = "084lkhsnj29finb6pmvrh83nqbliwv32gdi5q5sv43dpv24r85cn";
+  };
+
+  hotspot          = fetchurl {
+    url = "http://hg.openjdk.java.net/hsx/hsx14/master/archive/09f7962b8b44.tar.gz";
+    sha256 = "1jbd9ki5ip96293mv1qil20yqcgvkmcrhs302j0n8i8f3v1j70bf";
+  };
+
+in
+
+stdenv.mkDerivation rec {
+  name = "icedtea6-1.6.1";
+
+  src = fetchurl {
+    url = "http://icedtea.classpath.org/download/source/${name}.tar.gz";
+    sha256 = "11vaanfmz842x576wrw5qldpkksi8wqjmh9wikn5gxyjk87qq3k5";
+  };
+
+  buildInputs = [
+    wget  # Not actually used, thanks to `--with-openjdk-src-zip' et al.
+    which cpio file ecj gcj ant gawk procps inetutils zip unzip zlib
+    alsaLib cups lesstif freetype classpath libjpeg libpng giflib
+    xalanj xerces
+    libX11 libXp libXtst libXinerama libXt libXrender xproto
+    pkgconfig /* xulrunner */ pulseaudio
+  ];
+
+  preConfigure =
+    '' # Use the Sun-compatible tools (`jar', etc.).
+       export PATH="${gcj.gcc}/lib/jvm/bin:$PATH"
+
+       # Copy patches.
+       cp -v "${./nixos-slash-bin.patch}" patches/nixos-slash-bin.patch
+    '';
+
+  configureFlags =
+    stdenv.lib.concatStringsSep " "
+      [ "--with-gcj-home=${gcj}"
+        "--with-ecj" "--with-ecj-jar=${ecj}/lib/java/ecj.jar"
+        "--with-openjdk-src-zip=${openjdk}"
+        "--with-hotspot-src-zip=${hotspot}"
+        "--with-ant-home=${ant}/lib/java"
+        "--with-xalan2-jar=${xalanj}/lib/java/xalan.jar"
+        "--with-xalan2-serializer-jar=${xalanj}/lib/java/xalan.jar"
+        "--with-xerces2-jar=${xerces}/lib/java/xercesImpl.jar"
+        "--with-rhino=${rhino}/lib/java/js.jar"
+        "--disable-plugin" # FIXME: Enable it someday.
+
+        "--with-parallel-job"
+      ];
+
+  makeFlags =
+    [ # Have OpenCDK use tools from $PATH.
+      "ALT_UNIXCCS_PATH=" "ALT_UNIXCOMMAND_PATH=" "ALT_USRBIN_PATH="
+      "ALT_COMPILER_PATH=" "ALT_DEVTOOLS_PATH="
+
+      # Libraries.
+      "ALT_MOTIF_DIR="
+      "ALT_FREETYPE_HEADERS_PATH=${freetype}/include"
+      "ALT_FREETYPE_LIB_PATH=${freetype}/lib"
+      "ALT_CUPS_HEADERS_PATH=${cups}/include"
+      "ALT_CUPS_LIB_PATH=${cups}/lib"
+
+      # Tell IcedTea about our patches.
+      "DISTRIBUTION_PATCHES=patches/nixos-slash-bin.patch"
+    ];
+
+  meta = {
+    description = "IcedTea, a libre Java development kit based on OpenJDK";
+
+    longDescription =
+      '' The IcedTea project provides a harness to build the source code from
+         http://openjdk.java.net using Free Software build tools and adds a
+         number of key features to the upstream OpenJDK codebase: a Free
+         64-bit plugin with LiveConnect and Java Web Start support, support
+         for additional platforms via a pure interpreted mode in HotSpot
+         (Zero) or the alternative CACAO virtual machine.  Experimental JIT
+         support for Zero is also available via Shark.
+      '';
+
+    license = "GPLv2"; /* and multiple-licensing, e.g., for the plug-ins */
+
+    homepage = http://icedtea.classpath.org/;
+
+    maintainers = [ stdenv.lib.maintainers.ludo ];
+
+    # Restrict to GNU systems for now.
+    platforms = stdenv.lib.platforms.gnu;
+  };
+}
diff --git a/pkgs/development/libraries/java/icedtea/nixos-slash-bin.patch b/pkgs/development/libraries/java/icedtea/nixos-slash-bin.patch
new file mode 100644
index 000000000000..df4d1f4d03f9
--- /dev/null
+++ b/pkgs/development/libraries/java/icedtea/nixos-slash-bin.patch
@@ -0,0 +1,20 @@
+Remove references to /bin/echo to allow NixOS builds.
+
+--- openjdk/jdk/make/common/shared/Defs-utils.gmk	2009-04-24 09:33:55.000000000 +0200
++++ openjdk/jdk/make/common/shared/Defs-utils.gmk	2010-01-19 15:39:29.000000000 +0100
+@@ -177,7 +177,7 @@ ifeq ($(PLATFORM),linux)
+ 
+   NAWK           = $(USRBIN_PATH)gawk
+   # Intrinsic unix command, with backslash-escaped character interpretation
+-  ECHO           = /bin/echo -e
++  ECHO           = echo -e
+   # These are really in UTILS_USR_BIN_PATH on Linux (only sccs is not)
+   AR             = $(UTILS_USR_BIN_PATH)ar
+   AS             = $(UTILS_USR_BIN_PATH)as
+@@ -195,6 +195,6 @@ ifeq ($(PLATFORM),solaris)
+   # Intrinsic unix command, with backslash-escaped character interpretation
+   #   (not using -e  will cause build failure when using /bin/bash)
+   #   (using -e breaks something else)
+-  ECHO           = /usr/bin/echo
++  ECHO           = echo
+ endif
diff --git a/pkgs/development/libraries/libcv/default.nix b/pkgs/development/libraries/libcv/default.nix
deleted file mode 100644
index a2035b4cb406..000000000000
--- a/pkgs/development/libraries/libcv/default.nix
+++ /dev/null
@@ -1,33 +0,0 @@
-args :  
-let 
-  lib = args.lib;
-  fetchurl = args.fetchurl;
-  fullDepEntry = args.fullDepEntry;
-
-  version = lib.attrByPath ["version"] "" args; 
-  buildInputs = with args; [
-    libtiff libpng libjpeg pkgconfig 
-    gtk glib
-  ];
-in
-rec {
-  src = fetchurl {
-    url = ftp://ftp.debian.org/debian/pool/main/o/opencv/opencv_0.9.7.orig.tar.gz;
-    sha256 = "14qnm59gn518gjxwjb9hm3ij0b1awlxa76qdvnn5ygxsx713lf2j";
-  };
-
-  inherit buildInputs;
-  configureFlags = [];
-
-  /* doConfigure should be specified separately */
-  phaseNames = ["doConfigure" "doMakeInstall" "postInstall"];
-
-  postInstall = fullDepEntry (''
-    ln -s $out/include/opencv/* $out/include
-  '') ["doMakeInstall" "minInit"];
-      
-  name = "libcv-0.9.7";
-  meta = {
-    description = "libcv - computer vision library";
-  };
-}
diff --git a/pkgs/development/libraries/libdrm/default.nix b/pkgs/development/libraries/libdrm/default.nix
index 94fb7f96986e..aff6372d6113 100644
--- a/pkgs/development/libraries/libdrm/default.nix
+++ b/pkgs/development/libraries/libdrm/default.nix
@@ -1,11 +1,11 @@
 {stdenv, fetchurl, pkgconfig, libpthreadstubs}:
 
 stdenv.mkDerivation rec {
-  name = "libdrm-2.4.21";
+  name = "libdrm-2.4.22";
   
   src = fetchurl {
     url = "http://dri.freedesktop.org/libdrm/${name}.tar.bz2";
-    sha256 = "0jx1idd2ycglx81b0nlawh07lgi8k5h9854c9apdxcdnlcmn26sf";
+    sha256 = "0gbb7i282i6gf2wzbzkcz5j662v4ixpfjf0gv0090k89wjafbc0b";
   };
 
   buildInputs = [ pkgconfig libpthreadstubs ];
diff --git a/pkgs/development/libraries/libjpeg-turbo/default.nix b/pkgs/development/libraries/libjpeg-turbo/default.nix
index e2904560e37e..63a8c53afb78 100644
--- a/pkgs/development/libraries/libjpeg-turbo/default.nix
+++ b/pkgs/development/libraries/libjpeg-turbo/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, nasm }: 
 
 stdenv.mkDerivation {
-  name = "libjpeg-turbo-1.0.0";
+  name = "libjpeg-turbo-1.0.1";
   
   src = fetchurl {
-    url = mirror://sourceforge/libjpeg-turbo/libjpeg-turbo-1.0.0.tar.gz;
-    sha256 = "17zvyckjbscrr9b8i43g6g0960q5ammf4r93hkkx7s4hzjxvmkfj";
+    url = mirror://sourceforge/libjpeg-turbo/libjpeg-turbo-1.0.1.tar.gz;
+    sha256 = "094jvqzibqbzmhh7mz3xi76lzlilxzb4j1x8rpdcdkzyig9dizqf";
   };
 
   buildInputs = [ nasm ];
diff --git a/pkgs/development/libraries/libsamplerate/default.nix b/pkgs/development/libraries/libsamplerate/default.nix
index 8c132407d06c..17f06e46711c 100644
--- a/pkgs/development/libraries/libsamplerate/default.nix
+++ b/pkgs/development/libraries/libsamplerate/default.nix
@@ -5,7 +5,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "http://www.mega-nerd.com/SRC/${name}.tar.gz";
-    sha256 = "1m1iwzpcny42kcqv5as2nyb0ggrb56wzckpximqpp2y74dipdf4q";
+    sha256 = "1k3z09b13c0z10mqfn6w48pxsdx569s3wslg0x52q5mzy6gmvvbq";
   };
 
   buildInputs = [ pkgconfig ];
diff --git a/pkgs/development/libraries/libspectre/default.nix b/pkgs/development/libraries/libspectre/default.nix
index 6b69540d2b96..0be6ac5f4efe 100644
--- a/pkgs/development/libraries/libspectre/default.nix
+++ b/pkgs/development/libraries/libspectre/default.nix
@@ -1,11 +1,11 @@
 { fetchurl, stdenv, ghostscript }:
 
 stdenv.mkDerivation rec {
-  name = "libspectre-0.2.0";
+  name = "libspectre-0.2.6";
 
   src = fetchurl {
     url = "http://libspectre.freedesktop.org/releases/${name}.tar.gz";
-    sha256 = "0j75c84gqmfr6hbhiydri4msrxns8293lfxi7hkcnfa15v8qa0i0";
+    sha256 = "1lqdmi7vx497pbigpp77064a4463lmihzh44898l101c69i7qqrg";
   };
 
   buildInputs = [
diff --git a/pkgs/development/libraries/tnt/default.nix b/pkgs/development/libraries/tnt/default.nix
new file mode 100644
index 000000000000..51e3ac452674
--- /dev/null
+++ b/pkgs/development/libraries/tnt/default.nix
@@ -0,0 +1,23 @@
+{stdenv, fetchurl, unzip}:
+
+stdenv.mkDerivation rec {
+  name = "tnt-${version}";
+  version = "3.0.12";
+  
+  src = fetchurl {
+    url = http://math.nist.gov/tnt/tnt_3_0_12.zip;
+    sha256 = "1bzkfdb598584qlc058n8wqq9vbz714gr5r57401rsa9qaxhk5j7";
+  };
+
+  buildInputs = [ unzip ];
+
+  installPhase = ''
+      mkdir -p $out/include
+      cp *.h $out/include
+  '';
+
+  meta = {
+    homepage = http://math.nist.gov/tnt/;
+    description = "Template Numerical Toolkit: C++ headers for array and matrices";
+  };
+}
\ No newline at end of file
diff --git a/pkgs/development/libraries/unicap/default.nix b/pkgs/development/libraries/unicap/default.nix
new file mode 100644
index 000000000000..7a64017ca8ba
--- /dev/null
+++ b/pkgs/development/libraries/unicap/default.nix
@@ -0,0 +1,55 @@
+x@{builderDefsPackage
+  , libusb, libraw1394, dcraw, intltool, perl
+  , ...}:
+builderDefsPackage
+(a :  
+let 
+  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 
+    [];
+
+  buildInputs = map (n: builtins.getAttr n x)
+    (builtins.attrNames (builtins.removeAttrs x helperArgNames));
+  sourceInfo = rec {
+    baseName="libunicap";
+    version="0.9.12";
+    name="${baseName}-${version}";
+    url="http://www.unicap-imaging.org/downloads/${name}.tar.gz";
+    hash="05zcnnm4dfc6idihfi0fq5xka6x86zi89wip2ca19yz768sd33s9";
+  };
+in
+rec {
+  src = a.fetchurl {
+    url = sourceInfo.url;
+    sha256 = sourceInfo.hash;
+  };
+
+  inherit (sourceInfo) name version;
+  inherit buildInputs;
+
+  /* doConfigure should be removed if not needed */
+  phaseNames = ["fixIncludes" "fixMakefiles" "doConfigure" "doMakeInstall"];
+
+  fixIncludes = a.fullDepEntry (''
+    find . -type f -exec sed -e '/linux\/types\.h/d' -i '{}' ';'
+  '') ["minInit" "doUnpack"];
+
+  fixMakefiles = a.fullDepEntry (''
+    sed -e 's@/etc/udev@'"$out"'/&@' -i data/Makefile.*
+  '') ["minInit" "doUnpack"];
+
+  meta = {
+    description = "Universal video capture API";
+    maintainers = with a.lib.maintainers;
+    [
+      raskin
+    ];
+    platforms = with a.lib.platforms;
+      linux;
+  };
+  passthru = {
+    updateInfo = {
+      downloadPage = "http://unicap-imaging.org/download.htm";
+    };
+  };
+}) x
+
diff --git a/pkgs/development/libraries/urt/default.nix b/pkgs/development/libraries/urt/default.nix
new file mode 100644
index 000000000000..8570af2b2834
--- /dev/null
+++ b/pkgs/development/libraries/urt/default.nix
@@ -0,0 +1,61 @@
+{stdenv, fetchurl, ncompress}:
+
+stdenv.mkDerivation rec {
+  name = "urt-${version}";
+  version = "3.1b";
+  
+  src = fetchurl {
+    url = ftp://ftp.iastate.edu/pub/utah-raster/urt-3.1b.tar.Z;
+    sha256 = "0hbb3avgvkfb2cksqn6cmmgcr0278nb2qd1srayqx0876pq6g2vd";
+  };
+
+  buildInputs = [ ncompress ];
+
+  unpackPhase = ''
+      mkdir urt
+      tar xvf "$src" -C urt
+  '';
+  patchFlags = "-p0 -d urt";
+  patches = [ ./urt-3.1b-build-fixes.patch ./urt-3.1b-compile-updates.patch
+              ./urt-3.1b-make.patch ./urt-3.1b-rle-fixes.patch ./urt-3.1b-tempfile.patch ];
+  postPatch = ''
+      cd urt
+
+      rm bin/README
+      rm man/man1/template.1
+
+      # stupid OS X declares a stack_t type already 
+      sed -i -e 's:stack_t:_urt_stack:g' tools/clock/rleClock.c
+
+      sed -i -e '/^CFLAGS/s: -O : :' makefile.hdr
+
+      cp "${./gentoo-config}" config/gentoo
+  '';
+  configurePhase = ''
+      ./Configure config/gentoo
+  '';
+  postInstall = ''
+      mkdir -p $out/bin
+      cp bin/* $out/bin
+
+      mkdir -p $out/lib
+      cp lib/librle.a $out/lib
+
+      mkdir -p $out/include
+      cp include/rle*.h $out/include
+
+      mkdir -p $out/share/man/man1
+      cp man/man1/*.1 $out/share/man/man1
+
+      mkdir -p $out/share/man/man3
+      cp man/man3/*.3 $out/share/man/man3
+
+      mkdir -p $out/share/man/man5
+      cp man/man5/*.5 $out/share/man/man5
+  '';
+
+  meta = {
+    homepage = http://www.cs.utah.edu/gdc/projects/urt/;
+    description = "The Utah Raster Toolkit is a library for dealing with raster images";
+  };
+}
\ No newline at end of file
diff --git a/pkgs/development/libraries/urt/gentoo-config b/pkgs/development/libraries/urt/gentoo-config
new file mode 100644
index 000000000000..a2d9ec3faf2f
--- /dev/null
+++ b/pkgs/development/libraries/urt/gentoo-config
@@ -0,0 +1,52 @@
+#define ABEKASA60
+#define ABEKASA62
+#define ALIAS
+##define CGM
+#define CUBICOMP
+##define DVIRLE
+#define GRAYFILES
+#define MACPAINT
+##define PBMPLUS
+##define SUNRASTER
+#define TARGA
+#define VICAR
+#define WASATCH
+#define WAVEFRONT
+
+#define GCC
+
+#define CONST_DECL
+#define NO_MAKE_MAKEFILE
+#define USE_TIME_H
+#define SYS_V_SETPGRP
+#define USE_PROTOTYPES
+#define USE_RANDOM
+#define USE_STDARG
+#define USE_STDLIB_H
+#define USE_UNISTD_H
+#define USE_STRING_H
+#define VOID_STAR
+#define USE_XLIBINT_H
+#define X_SHARED_MEMORY
+
+#defpath DEST bin
+#defpath RI include
+#defpath RL lib
+
+ROFF = nroff
+ROFFOPT = -man
+ROFFPIPE = | lpr
+
+INCTIFF = 
+LIBTIFF = -ltiff
+INCX11 =
+LIBX11 = -lX11
+
+# Most people have migrated X11 to /usr/lib, but just in case ...
+check_x11=$(shell \
+	echo 'int main(){}' > test.c ; \
+	if ! $(CC) test.c -lX11 -o .urt-x11-test 2>/dev/null ; then \
+		echo "-L/usr/X11R6/lib" ; \
+	fi ; \
+	rm -f .urt-x11-test test.c)
+LIBX11 += $(call check_x11)
diff --git a/pkgs/development/libraries/urt/urt-3.1b-build-fixes.patch b/pkgs/development/libraries/urt/urt-3.1b-build-fixes.patch
new file mode 100644
index 000000000000..fc2bacddb30c
--- /dev/null
+++ b/pkgs/development/libraries/urt/urt-3.1b-build-fixes.patch
@@ -0,0 +1,151 @@
+some hosts are more anal about ar usage than others
+http://bugs.gentoo.org/107428
+
+respect user LDFLAGS
+http://bugs.gentoo.org/126872
+
+--- lib/makefile.src
++++ lib/makefile.src
+@@ -181,8 +181,7 @@
+ # Rebuild the library from all the .o files.
+ buildlib: $(OBJS)
+ 	-rm -f $(LIBNAME)
+-	ar rc $(LIBNAME)
+-	ar q $(LIBNAME) $(OBJS)
++	ar rc $(LIBNAME) $(OBJS)
+ #ifndef NO_RANLIB
+ 	ranlib $(LIBNAME)
+ #endif
+--- tools/clock/makefile.src
++++ tools/clock/makefile.src
+@@ -6,7 +6,7 @@ install: rleClock
+ 	mv rleClock ../rleClock.out
+ 
+ rleClock:rleClock.o font.o
+-	${CC} ${CFLAGS} rleClock.o font.o -lm ${LIBS} -o rleClock
++	${CC} ${CFLAGS} ${LDFLAGS} rleClock.o font.o ${LIBS} -o rleClock -lm
+ 
+ font.c:font.src makeFont
+ 	chmod +x makeFont
+--- tools/makefile.src
++++ tools/makefile.src
+@@ -62,21 +62,21 @@ applymap.out rlebg.out: $(RI)/rle_raw.h
+ pyrlib.o: pyrlib.c $(RI)/pyramid.h $(RI)/rle.h $(RI)/rle_config.h
+ 	$(CC) $(CFLAGS) pyrlib.c -c
+ pyrmask.out: pyrlib.o pyrmask.c $(RI)/pyramid.h
+-	$(CC) $(CFLAGS) -I$(RI) pyrmask.c pyrlib.o $(LIBS) -lm -o pyrmask.new
++	$(CC) $(LDFLAGS) $(CFLAGS) -I$(RI) pyrmask.c pyrlib.o $(LIBS) -lm -o pyrmask.new
+ 	mv pyrmask.new pyrmask.out
+ 
+ fant.out: fant.o mallocNd.o
+-	$(CC) $(CFLAGS) -I$(RI) fant.o mallocNd.o $(LIBS) -lm -o fant.new
++	$(CC) $(LDFLAGS) $(CFLAGS) -I$(RI) fant.o mallocNd.o $(LIBS) -lm -o fant.new
+ 	mv fant.new fant.out
+ 	
+ # rlebox and crop use some common code.
+ rle_box.o: $(RI)/rle.h $(RI)/rle_config.h $(RI)/rle_raw.h
+ 
+ crop.out: crop.c rle_box.o
+-	${CC} ${CFLAGS} crop.c rle_box.o ${LIBS} -o crop.new
++	${CC} ${LDFLAGS} ${CFLAGS} crop.c rle_box.o ${LIBS} -o crop.new
+ 	mv crop.new crop.out
+ rlebox.out: rlebox.c rle_box.o
+-	${CC} ${CFLAGS} rlebox.c rle_box.o ${LIBS} -o rlebox.new
++	${CC} ${LDFLAGS} ${CFLAGS} rlebox.c rle_box.o ${LIBS} -o rlebox.new
+ 	mv rlebox.new rlebox.out
+ 
+ # rleClock has it's own directory, must be built special
+@@ -100,7 +100,7 @@ clean:	clean-pgm
+ .SUFFIXES:
+ .SUFFIXES: .out .c .o
+ .c.out:
+-	$(CC) $(CFLAGS) $< $(LIBS) -lm -o $*.new
++	$(CC) $(LDFLAGS) $(CFLAGS) $< $(LIBS) -lm -o $*.new
+ 	mv $*.new $@
+ 
+ .c.o:
+--- cnv/makefile.src
++++ cnv/makefile.src
+@@ -76,13 +76,13 @@ PBMDIR = 
+ # ppmtorle - ppm format to RLE
+ # rletoppm - RLE to ppm format
+ pgmtorle.out: pgmtorle.c
+-	$(CC) $(CFLAGS) $(INCPBMPLUS) $*.c $(LIBS) $(LIBPBMPLUS) -o $*.new
++	$(CC) $(CFLAGS) $(LDFLAGS) $(INCPBMPLUS) $*.c $(LIBS) $(LIBPBMPLUS) -o $*.new
+ 	mv $*.new $@
+ ppmtorle.out: ppmtorle.c
+-	$(CC) $(CFLAGS) $(INCPBMPLUS) $*.c $(LIBS) $(LIBPBMPLUS) -o $*.new
++	$(CC) $(CFLAGS) $(LDFLAGS) $(INCPBMPLUS) $*.c $(LIBS) $(LIBPBMPLUS) -o $*.new
+ 	mv $*.new $@
+ rletoppm.out: rletoppm.c
+-	$(CC) $(CFLAGS) $(INCPBMPLUS) $*.c $(LIBS) $(LIBPBMPLUS) -o $*.new
++	$(CC) $(CFLAGS) $(LDFLAGS) $(INCPBMPLUS) $*.c $(LIBS) $(LIBPBMPLUS) -o $*.new
+ 	mv $*.new $@
+ #endif
+ 
+@@ -95,10 +95,10 @@ rletoppm.out: rletoppm.c
+ # iristorle/rletoiris - Convert between RLE and SGI image format.
+ #
+ iristorle.out: iristorle.c
+-	$(CC) $(CFLAGS) -I/usr/include/gl $*.c $(LIBS) -limage -o $*.new
++	$(CC) $(CFLAGS) $(LDFLAGS) -I/usr/include/gl $*.c $(LIBS) -limage -o $*.new
+ 	mv $*.new $@
+ rletoiris.out: rletoiris.c
+-	$(CC) $(CFLAGS) -I/usr/include/gl $*.c $(LIBS) -limage -o $*.new
++	$(CC) $(CFLAGS) $(LDFLAGS) -I/usr/include/gl $*.c $(LIBS) -limage -o $*.new
+ 	mv $*.new $@
+ #endif
+ 
+@@ -108,10 +108,10 @@ TIFFDIR =
+ # tifftorle - Convert TIFF images to RLE
+ # rletotiff - Convert RLE images to TIFF
+ rletotiff.out: rletotiff.c
+-	$(CC) $(CFLAGS) $(INCTIFF) $*.c $(LIBS) $(LIBTIFF) -lm -o $*.new
++	$(CC) $(CFLAGS) $(LDFLAGS) $(INCTIFF) $*.c $(LIBS) $(LIBTIFF) -lm -o $*.new
+ 	mv $*.new $@
+ tifftorle.out: tifftorle.c
+-	$(CC) $(CFLAGS) $(INCTIFF) $*.c $(LIBS) $(LIBTIFF) -lm -o $*.new
++	$(CC) $(CFLAGS) $(LDFLAGS) $(INCTIFF) $*.c $(LIBS) $(LIBTIFF) -lm -o $*.new
+ 	mv $*.new $@
+ #endif
+ 
+@@ -125,7 +125,7 @@ tifftorle.out: tifftorle.c
+ # Will build with the default rule.
+ # rletorla - RLE to Wavefront RLA
+ rletorla.out: rletorla.c
+-	$(CC) $(CFLAGS) $*.c $(LIBS) $(LIBWAVEFRONT) -lm -o $*.new
++	$(CC) $(CFLAGS) $(LDFLAGS) $*.c $(LIBS) $(LIBWAVEFRONT) -lm -o $*.new
+ 	mv $*.new $@
+ #endif WAVEFRONT
+ 
+@@ -144,7 +144,7 @@ pristine: pristine-pgm
+ .SUFFIXES:
+ .SUFFIXES: .out .c
+ .c.out:
+-	$(CC) $(CFLAGS) $*.c $(LIBS) -lm -o $*.new
++	$(CC) $(CFLAGS) $(LDFLAGS) $*.c $(LIBS) -lm -o $*.new
+ 	mv $*.new $@
+ 
+ # Dependency lines.  Make sure to #ifdef them.
+--- cnv/rletoabA62/makefile.src
++++ cnv/rletoabA62/makefile.src
+@@ -15,7 +15,7 @@ all		:	$(PGMS)
+ # Executables.  The .out will be stripped off in the install action.
+ 
+ rletoabA62.out	:	rletoabA62.o rle.o
+-			$(CC) $(CFLAGS) -o rletoabA62.new \
++			$(CC) $(CFLAGS) $(LDFLAGS) -o rletoabA62.new \
+ 			  rletoabA62.o rle.o $(LIBS)
+ 			mv rletoabA62.new rletoabA62.out
+ 
+--- cnv/rletogif/makefile.src
++++ cnv/rletogif/makefile.src
+@@ -15,7 +15,7 @@ all:	$(PGMS)
+ # The executable.  The ".out" will be stripped off in the install action.
+ 
+ rletogif.out: ${OBJ}
+-	${CC} ${CFLAGS} ${OBJ} ${LIBS} -o rletogif.new
++	${CC} ${CFLAGS} ${LDFLAGS} ${OBJ} ${LIBS} -o rletogif.new
+ 	mv rletogif.new rletogif.out
+ 
+ # Incremental install, copies executable to DEST dir.
diff --git a/pkgs/development/libraries/urt/urt-3.1b-compile-updates.patch b/pkgs/development/libraries/urt/urt-3.1b-compile-updates.patch
new file mode 100644
index 000000000000..105f7c41f6a7
--- /dev/null
+++ b/pkgs/development/libraries/urt/urt-3.1b-compile-updates.patch
@@ -0,0 +1,141 @@
+--- get/getx11/XGetHClrs.c
++++ get/getx11/XGetHClrs.c
+@@ -1,5 +1,4 @@
+ #ifndef XLIBINT_H_NOT_AVAILABLE
+-#include <X11/copyright.h>
+ 
+ /* $XConsortium: XGetHClrs.c,v 11.10 88/09/06 16:07:50 martin Exp $ */
+ /* Copyright    Massachusetts Institute of Technology    1986	*/
+--- tools/mallocNd.c
++++ tools/mallocNd.c
+@@ -67,7 +67,7 @@
+ 
+ /* Imports */
+ #include <stdio.h>
+-extern char *malloc();
++#include <string.h>
+ 
+ /* Forward declarations */
+ char *BuildIndirectionTable();
+--- tools/into.c
++++ tools/into.c
+@@ -40,8 +40,8 @@
+ static char buf[MAXPATHLEN+1];
+ short forceflg;				/* overwrite an unwritable file? */
+ 
+-extern int errno;
+-extern char *sys_errlist[];
++#include <errno.h>
++#include <string.h>
+ 
+ void
+ main(argc, argv)
+@@ -103,7 +103,7 @@
+     if (ferror(outf))
+     {
+ 	fprintf(stderr, "into: %s, \"%s\" not modified\n",
+-	    sys_errlist[errno], argv[1]);
++	    strerror(errno), argv[1]);
+ 	unlink(buf);
+ 	exit(1);
+     }
+--- cnv/tex/dvirle2.c
++++ cnv/tex/dvirle2.c
+@@ -55,7 +55,6 @@
+ void DumpTopOfBand(), MoveDown(), WriteBuf(), WriteBlanks();
+ 
+ char	*ProgName;
+-extern int errno;
+ extern char *optarg;
+ extern int optind;
+ 
+--- cnv/wasatchrle.c
++++ cnv/wasatchrle.c
+@@ -32,7 +32,6 @@
+ #include <errno.h>
+ #include "rle.h"
+ 
+-extern int errno;
+ 
+ /* "short" in our world is 16 bits.  Beware of swyte-bopping. */
+ 
+--- get/getx11/x11_stuff.c
++++ get/getx11/x11_stuff.c
+@@ -155,7 +155,6 @@
+ 			IPC_CREAT|0777 );
+ 	    if ( img->shm_img.shmid < 0 )
+ 	    {
+-		extern int errno;
+ 		if ( errno == ENOSPC )
+ 		{
+ 		    if ( !no_shared_space )
+@@ -361,7 +360,6 @@ Boolean reallocate;
+ 	    XDestroyImage( image );
+ 	    if ( img->shm_pix.shmid < 0 )
+ 	    {
+-		extern int errno;
+ 		if ( errno == ENOSPC )
+ 		{
+ 		    if ( !no_shared_space )
+--- get/qcr/qcr.h
++++ get/qcr/qcr.h
+@@ -6,8 +6,6 @@
+ #define GREEN 1
+ #define BLUE 2
+ 
+-extern int errno;
+-
+ /* Command defs for QCR-Z Film Recorder */
+ 
+ /* These are for 8 bit Look Up Tables */
+--- get/gettaac.c
++++ get/gettaac.c
+@@ -24,6 +24,7 @@
+  * Send bug fixes and improvements to:  ksp@maxwell.nde.swri.edu
+  */
+ 
++#include <errno.h>
+ #include <stdio.h>
+ #include <strings.h>
+ #include <signal.h>
+@@ -459,7 +460,6 @@ char    *template;
+      char    nonUnique;
+      char    twiddleUserCompletion;
+ 
+-     extern  int         errno;
+      struct  direct     *nameEntry;
+      DIR                *dirChan;
+      struct  passwd     *pwdEntry;
+--- tools/clock/rleClock.c
++++ tools/clock/rleClock.c
+@@ -598,7 +598,7 @@
+     { TRUE,  "-tf", STRING, "Text area format string", 	          (char *)&FormatString }, 
+     { FALSE, "-Xm", BOOL,   "Output the alpha channel on RGB",    (char *)&DebugAlpha },
+     { FALSE, "-D",  BOOL,   "Turn on debugging",	          (char *)&Debug },
+-    NULL
++    { FALSE, NULL }
+ };
+ 
+ void
+--- tools/to8.c
++++ tools/to8.c
+@@ -175,7 +175,7 @@
+ 	 * Give it a background color of black, since the real background
+ 	 * will be dithered anyway.
+ 	 */
+-	if ( in_hdr.background != NULL )
++	if ( in_hdr.background != 0 )
+ 	{
+ 	    out_hdr.bg_color = (int *)malloc( sizeof( int ) );
+ 	    RLE_CHECK_ALLOC( cmd_name( argv ), out_hdr.bg_color, 0 );
+--- cnv/rletoabA62/rletoabA62.c
++++ cnv/rletoabA62/rletoabA62.c
+@@ -157,7 +157,7 @@
+ 	exit(1);
+     }
+     if (optind < argc) {
+-	if ((file = open(argv[optind], 0)) == NULL) {
++	if ((file = open(argv[optind], 0)) == -1) {
+ 	    perror(argv[optind]);
+ 	    exit(1);
+ 	}
diff --git a/pkgs/development/libraries/urt/urt-3.1b-make.patch b/pkgs/development/libraries/urt/urt-3.1b-make.patch
new file mode 100644
index 000000000000..310675dd395d
--- /dev/null
+++ b/pkgs/development/libraries/urt/urt-3.1b-make.patch
@@ -0,0 +1,75 @@
+Index: makefile.src
+===================================================================
+--- makefile.src
++++ makefile.src
+@@ -17,7 +17,7 @@ all: default
+ # clean deletes all but source, pristine (below) deletes installed stuff, too
+ default clean: doit
+ 	@for d in $(DIRS) ; do \
+-		( cd $$d ; echo make $@ on $$d ; make $(MFLAGS) $@ ) ; \
++		( cd $$d ; echo $(MAKE) $@ on $$d ; $(MAKE) $(MFLAGS) $@ ) ; \
+ 	done
+ 
+ # install puts library, binaries and documentation into global location
+@@ -29,7 +29,7 @@ MAKE_TARGET =
+ 
+ install $(MAKE_TARGET) pristine depend:: doit
+ 	@for d in $(ALLDIRS) ; do \
+-		( cd $$d ; echo make $@ on $$d ; make $(MFLAGS) $@ ) ; \
++		( cd $$d ; echo $(MAKE) $@ on $$d ; $(MAKE) $(MFLAGS) $@ ) ; \
+ 	done
+ 
+ 
+Index: tools/makefile.src
+===================================================================
+--- tools/makefile.src
++++ tools/makefile.src
+@@ -82,7 +82,7 @@ rlebox.out: rlebox.c rle_box.o
+ # rleClock has it's own directory, must be built special
+ 
+ rleClock.out: clock/font.c clock/font.h clock/font.src clock/rleClock.c
+-	(cd clock ; make)
++	(cd clock ; $(MAKE))
+ 
+ # Incremental install, copies everything ("$?") since last install to DEST dir.
+ install: $(PGMS) install-pgm
+Index: makefile.tlr
+===================================================================
+--- makefile.tlr
++++ makefile.tlr
+@@ -7,7 +7,7 @@ subdirs:
+ 	@sh -c "if test 'x$(DIRS)' != x ; then eval \
+ 		'set -e ; for dir in $(DIRS) ; do \
+ 			(cd \$$dir ; echo Make ${HERE}\$$dir ; \
+-			 	make $(MFLAGS) $(DIRMFLAGS) ) ; \
++			 	$(MAKE) $(MFLAGS) $(DIRMFLAGS) ) ; \
+ 		done' ; \
+ 	  else \
+ 		true ; \
+@@ -46,7 +46,7 @@ install-subdirs: subdirs
+ 	@sh -c "if test 'x$(DIRS)' != x  ; then eval \
+ 		'for dir in $(DIRS) ; do \
+ 			(cd \$$dir ; echo Install ${HERE}\$$dir ; \
+-			 make $(MFLAGS) $(DIRMFLAGS) install) ; \
++			 $(MAKE) $(MFLAGS) $(DIRMFLAGS) install) ; \
+ 		done' ; \
+ 	  else \
+ 		true ; \
+@@ -105,7 +105,7 @@ pristine-pgm: clean-pgm
+ 	    'for dir in $(ALLDIRS); do \
+ 		if test -d $$dir ; then \
+ 			(cd $$dir; echo Make ${HERE}$$dir pristine ; \
+-			 make $(MFLAGS) pristine); \
++			 $(MAKE) $(MFLAGS) pristine); \
+ 		else \
+ 			true; \
+ 		fi; \
+@@ -124,7 +124,7 @@ clean-pgm:
+ 	    'for dir in $(ALLDIRS); do \
+ 		if test -d $$dir ; then \
+ 			(cd $$dir; echo Clean ${HERE}$$dir ; \
+-			 make $(MFLAGS) clean); \
++			 $(MAKE) $(MFLAGS) clean); \
+ 		else \
+ 			true; \
+ 		fi; \
diff --git a/pkgs/development/libraries/urt/urt-3.1b-rle-fixes.patch b/pkgs/development/libraries/urt/urt-3.1b-rle-fixes.patch
new file mode 100644
index 000000000000..3720806960fe
--- /dev/null
+++ b/pkgs/development/libraries/urt/urt-3.1b-rle-fixes.patch
@@ -0,0 +1,203 @@
+Fixes taken from netpbm
+
+--- lib/rle_global.c
++++ lib/rle_global.c
+@@ -76,7 +76,7 @@ rle_hdr rle_dflt_hdr = {
+     8,				/* cmaplen (log2 of length of color map) */
+     NULL,			/* pointer to color map */
+     NULL,			/* pointer to comment strings */
+-    stdout,			/* output file */
++    NULL,			/* output file -- must be set dynamically */
+     { 7 },			/* RGB channels only */
+     0L,				/* Can't free name and file fields. */
+     "Urt",			/* Default "program name". */
+--- lib/rle_hdr.c
++++ lib/rle_hdr.c
+@@ -269,6 +273,9 @@
+ {
+     rle_hdr *ret_hdr;
+ 
++    rle_dflt_hdr.rle_file = stdout;
++    /* The rest of rle_dflt_hdr is set by the loader's data initialization */
++
+     if ( the_hdr == &rle_dflt_hdr )
+ 	return the_hdr;
+ 
+--- lib/dither.c
++++ lib/dither.c
+@@ -38,10 +38,10 @@ void	make_square();
+ #endif
+ 
+ static int magic4x4[4][4] =  {
+- 	 0, 14,  3, 13,
+-	11,  5,  8,  6,
+-	12,  2, 15,  1,
+-	 7,  9,  4, 10
++{	 0, 14,  3, 13},
++{	11,  5,  8,  6},
++{	12,  2, 15,  1},
++{	 7,  9,  4, 10}
+ };
+ 
+ /* basic dithering macro */
+--- lib/rle_open_f.c
++++ lib/rle_open_f.c
+@@ -9,7 +9,11 @@
+  */
+ 
+ #include "rle_config.h"
++#define _XOPEN_SOURCE  /* Make sure fdopen() is in stdio.h */
++
+ #include <stdio.h>
++#include <unistd.h>
++#include <fcntl.h>
+ 
+ #ifndef NO_OPEN_PIPES
+ /* Need to have a SIGCLD signal catcher. */
+@@ -260,7 +260,6 @@
+     int pipefd[2];
+     int i;
+     char *argv[4];
+-    extern int errno;
+ 
+     /* Check args. */
+     if ( *mode != 'r' && *mode != 'w' )
+--- lib/rle_getcom.c
++++ lib/rle_getcom.c
+@@ -53,11 +53,12 @@
+ {
+     for ( ; *n != '\0' && *n != '=' && *n == *v; n++, v++ )
+ 	;
+-    if (*n == '\0' || *n == '=')
++    if (*n == '\0' || *n == '=') {
+ 	if ( *v == '\0' )
+ 	    return v;
+ 	else if ( *v == '=' )
+ 	    return ++v;
++    }
+ 
+     return NULL;
+ }
+--- lib/scanargs.c
++++ lib/scanargs.c
+@@ -128,10 +130,10 @@
+ va_list argl;
+ {
+ 
+-    register    check;			/* check counter to be sure all argvs
++    int    check;			/* check counter to be sure all argvs
+ 					   are processed */
+     register CONST_DECL char  *cp;
+-    register    cnt;
++    int    cnt;
+     int	    optarg = 0;			/* where optional args start */
+     int	    nopt = 0;
+     char    tmpflg,			/* temp flag */
+@@ -375,11 +377,12 @@
+ 				if ( optarg > 0 ) /* end optional args? */
+ 				{
+ 				    /* Eat the arg, too, if necessary */
+-				    if ( list_cnt == 0 )
++				    if ( list_cnt == 0 ) {
+ 					if ( typchr == 's' )
+ 					    (void)va_arg( argl, char * );
+ 					else
+ 					    (void)va_arg( argl, ptr );
++                    }
+ 				    break;
+ 				}
+ 				else
+@@ -567,7 +570,7 @@
+ 				     * Do conversion for n and N types
+ 				     */
+ 				    tmpflg = typchr;
+-				    if (typchr == 'n' || typchr == 'N' )
++				    if (typchr == 'n' || typchr == 'N' ) {
+ 					if (*argp != '0')
+ 					    tmpflg = 'd';
+ 					else if (*(argp+1) == 'x' ||
+@@ -578,6 +581,7 @@
+ 					}
+ 					else
+ 					    tmpflg = 'o';
++                    }
+ 				    if (typchr == 'N')
+ 					tmpflg = toupper( tmpflg );
+ 
+--- lib/inv_cmap.c
++++ lib/inv_cmap.c
+@@ -42,7 +42,7 @@
+ static long cbinc, cginc, crinc;
+ static unsigned long *gdp, *rdp, *cdp;
+ static unsigned char *grgbp, *rrgbp, *crgbp;
+-static gstride, rstride;
++static long gstride, rstride;
+ static long x, xsqr, colormax;
+ static int cindex;
+ #ifdef INSTRUMENT_IT
+--- lib/rle_getrow.c
++++ lib/rle_getrow.c
+@@ -351,7 +351,7 @@
+ 	    bzero( (char *)scanline[-1] + the_hdr->xmin,
+ 		   the_hdr->xmax - the_hdr->xmin + 1 );
+ 	for ( nc = 0; nc < the_hdr->ncolors; nc++ )
+-	    if ( RLE_BIT( *the_hdr, nc ) )
++	    if ( RLE_BIT( *the_hdr, nc ) ) {
+ 		/* Unless bg color given explicitly, use 0. */
+ 		if ( the_hdr->background != 2 || the_hdr->bg_color[nc] == 0 )
+ 		    bzero( (char *)scanline[nc] + the_hdr->xmin,
+@@ -360,6 +360,7 @@
+ 		    bfill( (char *)scanline[nc] + the_hdr->xmin,
+ 			   the_hdr->xmax - the_hdr->xmin + 1,
+ 			   the_hdr->bg_color[nc] );
++	    }
+     }
+ 
+     /* If skipping, then just return */
+@@ -367,7 +368,7 @@
+     {
+ 	the_hdr->priv.get.vert_skip--;
+ 	the_hdr->priv.get.scan_y++;
+-	if ( the_hdr->priv.get.vert_skip > 0 )
++	if ( the_hdr->priv.get.vert_skip > 0 ) {
+ 	    if ( the_hdr->priv.get.scan_y >= the_hdr->ymax )
+ 	    {
+ 		int y = the_hdr->priv.get.scan_y;
+@@ -377,6 +378,7 @@
+ 	    }
+ 	    else
+ 		return the_hdr->priv.get.scan_y;
++	}
+     }
+ 
+     /* If EOF has been encountered, return also */
+@@ -457,11 +459,12 @@
+ 	    else
+ 		nc = DATUM(inst);
+ 	    nc++;
+-	    if ( debug_f )
++	    if ( debug_f ) {
+ 		if ( RLE_BIT( *the_hdr, channel ) )
+ 		    fprintf( stderr, "Pixel data %d (to %d):", nc, scan_x+nc );
+ 		else
+ 		    fprintf( stderr, "Pixel data %d (to %d)\n", nc, scan_x+nc);
++	    }
+ 	    if ( RLE_BIT( *the_hdr, channel ) )
+ 	    {
+ 		/* Don't fill past end of scanline! */
+--- lib/rle_putcom.c
++++ lib/rle_putcom.c
+@@ -53,11 +53,12 @@
+ {
+     for ( ; *n != '\0' && *n != '=' && *n == *v; n++, v++ )
+ 	;
+-    if (*n == '\0' || *n == '=')
++    if (*n == '\0' || *n == '=') {
+ 	if ( *v == '\0' )
+ 	    return v;
+ 	else if ( *v == '=' )
+ 	    return ++v;
++    }
+ 
+     return NULL;
+ }
diff --git a/pkgs/development/libraries/urt/urt-3.1b-tempfile.patch b/pkgs/development/libraries/urt/urt-3.1b-tempfile.patch
new file mode 100644
index 000000000000..12acce151b5d
--- /dev/null
+++ b/pkgs/development/libraries/urt/urt-3.1b-tempfile.patch
@@ -0,0 +1,19 @@
+--- tools/rlecat.c
++++ tools/rlecat.c
+@@ -110,8 +110,14 @@
+ 	    nflag = 0;		/* Not really repeating! */
+ 	else
+ 	{
+-	    mktemp( temp );	/* Make a temporary file name */
+-	    tmpfile = rle_open_f( cmd_name( argv ), temp, "w+" );
++	    /* we dont have to use rle_open_f() because all it does in
++	     * this case is run fopen() ... we're creating a file so all
++	     * the checks for opening an existing file aren't needed */
++	    int fd = mkstemp(temp);
++	    if (fd == -1 || (tmpfile = fdopen(fd, "w+")) == NULL) {
++		perror("Unable to open tempfile");
++		exit(-1);
++	    }
+ 	}
+     }
+ 
diff --git a/pkgs/development/libraries/webkit/default.nix b/pkgs/development/libraries/webkit/default.nix
index 31e96bd535a3..262b0c2e9ced 100644
--- a/pkgs/development/libraries/webkit/default.nix
+++ b/pkgs/development/libraries/webkit/default.nix
@@ -13,7 +13,7 @@ rec {
     gettext libjpeg libpng libtiff libxml2 libxslt pango
     sqlite icu gperf bison flex autoconf automake libtool 
     perl intltool pkgconfig libsoup gtkdoc libXt libproxy
-    enchant python ruby
+    enchant python ruby which renderproto libXrender
     ];
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/libraries/webkit/src-for-default.nix b/pkgs/development/libraries/webkit/src-for-default.nix
index 8e7a37299d88..727bc993b365 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="r67838";
-   name="webkit-r67838";
-   hash="0njncks7n9a1zmdpsbv9dm2iszdkgnd8an0dbg4fvy05ykmvfcms";
-   url="http://builds.nightly.webkit.org/files/trunk/src/WebKit-r67838.tar.bz2";
-   advertisedUrl="http://builds.nightly.webkit.org/files/trunk/src/WebKit-r67838.tar.bz2";
+   version="r69611";
+   name="webkit-r69611";
+   hash="1429hz86w4c2lzl32mpfxcim25d3xvqgx2as1c5ghdhiv0q9d76p";
+   url="http://builds.nightly.webkit.org/files/trunk/src/WebKit-r69611.tar.bz2";
+   advertisedUrl="http://builds.nightly.webkit.org/files/trunk/src/WebKit-r69611.tar.bz2";
   
   
 }
diff --git a/pkgs/development/python-modules/pygobject/default.nix b/pkgs/development/python-modules/pygobject/default.nix
index bb60ec66291c..303bb36a3a87 100644
--- a/pkgs/development/python-modules/pygobject/default.nix
+++ b/pkgs/development/python-modules/pygobject/default.nix
@@ -1,13 +1,16 @@
-{stdenv, fetchurl, python, pkgconfig, glib}:
+{ stdenv, fetchurl, python, pkgconfig, glib }:
 
-stdenv.mkDerivation {
-  name = "pygobject-2.20.0";
+stdenv.mkDerivation rec {
+  name = "pygobject-2.26.0";
+  
   src = fetchurl {
-    url = http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.20/pygobject-2.20.0.tar.bz2;
-    sha256 = "10gsf3i2q9y659hayxyaxyfz7inswcjc8m6iyqckwsj2yjij7sa1";
+    url = "http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.26/${name}.tar.bz2";
+    sha256 = "5554acff9c27b647144143b0459359864e4a6f2ff62c7ba21cf310ad755cf7c7";
   };
 
-  buildInputs = [python pkgconfig glib];
+  configureFlags = "--disable-introspection";
+
+  buildInputs = [ python pkgconfig glib ];
 
   postInstall = ''
     # All python code is installed into a "gtk-2.0" sub-directory. That
@@ -20,4 +23,9 @@ stdenv.mkDerivation {
       ln -s "gtk-2.0/$n" "../$n"
     done
   '';
+
+  meta = {
+    homepage = http://live.gnome.org/PyGObject;
+    description = "Python bindings for Glib";
+  };
 }
diff --git a/pkgs/development/python-modules/pygtk/default.nix b/pkgs/development/python-modules/pygtk/default.nix
index 48c8ebfa87a4..81147fff17dc 100644
--- a/pkgs/development/python-modules/pygtk/default.nix
+++ b/pkgs/development/python-modules/pygtk/default.nix
@@ -1,19 +1,19 @@
-{stdenv, fetchurl, python, pkgconfig, glib, gtk, pygobject, pycairo
-  , libglade ? null}:
+{ stdenv, fetchurl, makeWrapper, python, pkgconfig, glib, gtk, pygobject, pycairo
+, libglade ? null }:
 
-stdenv.mkDerivation {
-  name = "pygtk-2.17.0";
+stdenv.mkDerivation rec {
+  name = "pygtk-2.22.0";
 
   src = fetchurl {
-    url = http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.17/pygtk-2.17.0.tar.bz2;
-    sha256 = "000l3wrcj0ghid045n6ipqg4q4zci51z9k9fqw4n4p3n5rx82qba";
+    url = "http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.22/${name}.tar.bz2";
+    sha256 = "4acf0ef2bde8574913c40ee4a43d9c4f43bb77b577b67147271b534501a54cc8";
   };
 
-  buildInputs = [python pkgconfig glib gtk]
-    ++ (if libglade != null then [libglade] else [])
-  ;
+  buildInputs =
+    [ makeWrapper python pkgconfig glib gtk ]
+    ++ stdenv.lib.optional (libglade != null) libglade;
 
-  propagatedBuildInputs = [pygobject pycairo];
+  propagatedBuildInputs = [ pygobject pycairo ];
 
   postInstall = ''
     rm $out/bin/pygtk-codegen-2.0
@@ -28,5 +28,8 @@ stdenv.mkDerivation {
     for n in *; do
       ln -s "gtk-2.0/$n" "../$n"
     done
+
+    wrapProgram $out/bin/pygtk-demo --prefix PYTHONPATH ":" \
+        $(toPythonPath "${pygobject} ${pycairo} $out")
   '';
 }
diff --git a/pkgs/development/tools/build-managers/scons/default.nix b/pkgs/development/tools/build-managers/scons/default.nix
index fc9e4e2497d8..d23940dda945 100644
--- a/pkgs/development/tools/build-managers/scons/default.nix
+++ b/pkgs/development/tools/build-managers/scons/default.nix
@@ -13,6 +13,13 @@ stdenv.mkDerivation {
     sha256 = "0qk74nrnm9qlijrq6gmy8cyhjgp0gis4zx44divnr8n487d5308a";
   };
 
+  preConfigure = ''
+    for i in script/* 
+    do 
+     substituteInPlace $i --replace "/usr/bin/env python" "${python}/bin/python"
+    done
+  '';
+
   propagatedBuildInputs = [python makeWrapper];
   buildPhase = "python setup.py install --prefix=$out --install-lib=$(toPythonPath $out) --hardlink-scons -O1";
   installPhase = "for n in $out/bin/*; do wrapProgram $n --suffix PYTHONPATH ':' \"$(toPythonPath $out)\"; done";