summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2010-09-17 19:10:21 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2010-09-17 19:10:21 +0000
commit2c5de6132761328a58a89e6813eef856f0c606a9 (patch)
treeb07fabdf24d8ea31fa839f7c8f913164751849eb /pkgs/development
parent28841f686c8c93d1974c39fcf39a2bc0be784dc4 (diff)
parent83bfd425349459898b1cf16330518c9a330b32ec (diff)
downloadnixlib-2c5de6132761328a58a89e6813eef856f0c606a9.tar
nixlib-2c5de6132761328a58a89e6813eef856f0c606a9.tar.gz
nixlib-2c5de6132761328a58a89e6813eef856f0c606a9.tar.bz2
nixlib-2c5de6132761328a58a89e6813eef856f0c606a9.tar.lz
nixlib-2c5de6132761328a58a89e6813eef856f0c606a9.tar.xz
nixlib-2c5de6132761328a58a89e6813eef856f0c606a9.tar.zst
nixlib-2c5de6132761328a58a89e6813eef856f0c606a9.zip
Updating from trunk.
svn path=/nixpkgs/branches/stdenv-updates/; revision=23840
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/compilers/jdk/dlj-bundle-builder.sh3
-rw-r--r--pkgs/development/compilers/jdk/jdk6-linux.nix48
-rw-r--r--pkgs/development/compilers/ocaml/3.10.0.nix4
-rw-r--r--pkgs/development/compilers/ocaml/3.11.1.nix4
-rwxr-xr-xpkgs/development/compilers/ocaml/configure-3.09.11431
-rw-r--r--pkgs/development/guile-modules/guile-cairo/default.nix4
-rw-r--r--pkgs/development/guile-modules/guile-gnome/default.nix4
-rw-r--r--pkgs/development/guile-modules/guile-lib/default.nix26
-rw-r--r--pkgs/development/interpreters/guile/1.9.nix4
-rw-r--r--pkgs/development/interpreters/lua-5/default.nix18
-rw-r--r--pkgs/development/interpreters/ruby/default.nix30
-rw-r--r--pkgs/development/interpreters/ruby/gem_nix_command.patch23
-rw-r--r--pkgs/development/interpreters/ruby/gems.nix6
-rw-r--r--pkgs/development/interpreters/ruby/libs.nix863
-rw-r--r--pkgs/development/libraries/boost/default.nix21
-rw-r--r--pkgs/development/libraries/eventlog/default.nix7
-rw-r--r--pkgs/development/libraries/grantlee/default.nix33
-rw-r--r--pkgs/development/libraries/haskell/AspectAG/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/HList/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/HStringTemplate/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/HsSyck/default.nix10
-rw-r--r--pkgs/development/libraries/haskell/SMTPClient/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/benchpress/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/blaze-builder/default.nix13
-rw-r--r--pkgs/development/libraries/haskell/failure/default.nix12
-rw-r--r--pkgs/development/libraries/haskell/gitit/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/hakyll/default.nix13
-rw-r--r--pkgs/development/libraries/haskell/hamlet/default.nix10
-rw-r--r--pkgs/development/libraries/haskell/happstack/happstack-data.nix12
-rw-r--r--pkgs/development/libraries/haskell/happstack/happstack-server.nix4
-rw-r--r--pkgs/development/libraries/haskell/happstack/happstack-util.nix4
-rw-r--r--pkgs/development/libraries/haskell/highlighting-kate/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/neither/default.nix15
-rw-r--r--pkgs/development/libraries/haskell/pandoc/default.nix11
-rw-r--r--pkgs/development/libraries/haskell/polyparse/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/random/default.nix13
-rw-r--r--pkgs/development/libraries/haskell/regex-tdfa/default.nix13
-rw-r--r--pkgs/development/libraries/haskell/sendfile/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/strictConcurrency/default.nix8
-rw-r--r--pkgs/development/libraries/haskell/syb/syb-with-class-instances-text.nix11
-rw-r--r--pkgs/development/libraries/haskell/syb/syb-with-class.nix4
-rw-r--r--pkgs/development/libraries/haskell/texmath/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/text/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/time/1.2.0.3.nix11
-rw-r--r--pkgs/development/libraries/haskell/uu-parsinglib/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/yst/default.nix14
-rw-r--r--pkgs/development/libraries/id3lib/default.nix2
-rw-r--r--pkgs/development/libraries/id3lib/id3lib-3.8.3-gcc43-1.patch104
-rw-r--r--pkgs/development/libraries/libdiscid/default.nix18
-rw-r--r--pkgs/development/libraries/libexif/default.nix11
-rw-r--r--pkgs/development/libraries/libgphoto2/default.nix6
-rw-r--r--pkgs/development/libraries/libktorrent/default.nix14
-rw-r--r--pkgs/development/libraries/libmusicbrainz/2.x.nix27
-rw-r--r--pkgs/development/libraries/libmusicbrainz/default.nix25
-rw-r--r--pkgs/development/libraries/libmusicbrainz/find-neon.patch52
-rw-r--r--pkgs/development/libraries/libmusicbrainz/gcc-4.x.patch60
-rw-r--r--pkgs/development/libraries/libmusicbrainz/missing-include.patch12
-rw-r--r--pkgs/development/libraries/libnice/default.nix8
-rw-r--r--pkgs/development/libraries/libofa/default.nix22
-rw-r--r--pkgs/development/libraries/libofa/gcc-4.x.patch12
-rw-r--r--pkgs/development/libraries/libofa/libofa-0.9.3-gcc-4.3.patch36
-rw-r--r--pkgs/development/libraries/libofa/libofa-0.9.3-gcc-4.patch39
-rw-r--r--pkgs/development/libraries/libpcap/default.nix5
-rw-r--r--pkgs/development/libraries/libtunepimp/default.nix16
-rw-r--r--pkgs/development/libraries/libtunepimp/gcc-4.x.patch177
-rw-r--r--pkgs/development/libraries/mp4v2/default.nix17
-rw-r--r--pkgs/development/libraries/muparser/default.nix12
-rw-r--r--pkgs/development/libraries/opal/default.nix56
-rw-r--r--pkgs/development/libraries/ortp/default.nix4
-rw-r--r--pkgs/development/libraries/osip/default.nix20
-rw-r--r--pkgs/development/libraries/podofo/default.nix16
-rw-r--r--pkgs/development/libraries/ptlib/default.nix50
-rw-r--r--pkgs/development/libraries/qt-4.x/4.7/default.nix7
-rw-r--r--pkgs/development/libraries/srtp/default.nix47
-rw-r--r--pkgs/development/libraries/t1lib/default.nix8
-rw-r--r--pkgs/development/python-modules/pygobject/default.nix12
-rw-r--r--pkgs/development/python-modules/pygtk/default.nix6
-rw-r--r--pkgs/development/python-modules/pyqt/default.nix29
-rw-r--r--pkgs/development/tools/build-managers/cmake/default.nix34
-rwxr-xr-xpkgs/development/tools/build-managers/cmake/setup-hook.sh6
-rw-r--r--pkgs/development/tools/guile/g-wrap/default.nix4
-rw-r--r--pkgs/development/tools/haskell/HaRe/default.nix14
-rw-r--r--pkgs/development/tools/misc/gdb/default.nix12
-rw-r--r--pkgs/development/tools/misc/lsof/default.nix6
84 files changed, 1964 insertions, 1797 deletions
diff --git a/pkgs/development/compilers/jdk/dlj-bundle-builder.sh b/pkgs/development/compilers/jdk/dlj-bundle-builder.sh
index c08a5237f515..ee58ce9127ca 100644
--- a/pkgs/development/compilers/jdk/dlj-bundle-builder.sh
+++ b/pkgs/development/compilers/jdk/dlj-bundle-builder.sh
@@ -50,5 +50,8 @@ if test -z "$pluginSupport"; then
     rm -f $out/bin/javaws
 fi
 
+mkdir $jrePath/lib/$architecture/plugins
+ln -s $jrePath/lib/$architecture/libnpjp2.so $jrePath/lib/$architecture/plugins
+
 # Workaround for assertions in xlib, see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6532373.
 substituteInPlace $jrePath/lib/*/xawt/libmawt.so --replace XINERAMA FAKEEXTN
diff --git a/pkgs/development/compilers/jdk/jdk6-linux.nix b/pkgs/development/compilers/jdk/jdk6-linux.nix
index ddada14008ba..8a11e85ed98d 100644
--- a/pkgs/development/compilers/jdk/jdk6-linux.nix
+++ b/pkgs/development/compilers/jdk/jdk6-linux.nix
@@ -11,7 +11,22 @@
 assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
 assert swingSupport -> xlibs != null;
 
-stdenv.mkDerivation ({
+let
+
+  /**
+   * The JRE libraries are in directories that depend on the CPU.
+   */
+  architecture =
+    if stdenv.system == "i686-linux" then
+      "i386"
+    else if stdenv.system == "x86_64-linux" then
+      "amd64"
+    else
+      abort "jdk requires i686-linux or x86_64 linux";
+
+in
+
+stdenv.mkDerivation {
   name =
     if installjdk then "jdk-1.6.0_20" else "jre-1.6.0_20";
 
@@ -39,17 +54,6 @@ stdenv.mkDerivation ({
   construct = ./jdk6-construct.sh;
   inherit installjdk;
 
-  /**
-   * The JRE libraries are in directories that depend on the CPU.
-   */
-  architecture =
-    if stdenv.system == "i686-linux" then
-      "i386"
-    else if stdenv.system == "x86_64-linux" then
-      "amd64"
-    else
-      abort "jdk requires i686-linux or x86_64 linux";
-
   buildInputs = [unzip makeWrapper];
   
   /**
@@ -59,22 +63,8 @@ stdenv.mkDerivation ({
     [stdenv.gcc.libc] ++
     (if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi xlibs.libXp xlibs.libXt] else []);
 
-  inherit swingSupport pluginSupport;
+  inherit swingSupport pluginSupport architecture;
   inherit (xlibs) libX11;
 
-} // 
-  /**
-   * comment: there is a plugin for amd64 since 0_13. However it's located in 
-   * JRE_STORE_PATH/lib/amd64/libnpjp2.so. I don't know yet how to add it to
-   * MOZ_PLUGIN_PATH so that it's found. Put a symlink into ~/.mozilla/plugins
-   * instead.
-   */
-  ( if stdenv.system == "i686-linux" then
-      {
-        mozillaPlugin =
-         if installjdk then "/jre/plugin/i386/ns7" else "/plugin/i386/ns7";
-      }
-    else
-      {}
-  )
-)
+  mozillaPlugin = if installjdk then "/jre/lib/${architecture}/plugins" else "/lib/${architecture}/plugins";
+}
diff --git a/pkgs/development/compilers/ocaml/3.10.0.nix b/pkgs/development/compilers/ocaml/3.10.0.nix
index a77e5fdd0ac9..fdd95db54406 100644
--- a/pkgs/development/compilers/ocaml/3.10.0.nix
+++ b/pkgs/development/compilers/ocaml/3.10.0.nix
@@ -18,6 +18,10 @@ stdenv.mkDerivation (rec {
     CAT=$(type -tp cat)
     sed -e "s@/bin/cat@$CAT@" -i config/auto-aux/sharpbang
   '';
+  postBuild = ''
+    ensureDir $out/include
+    ln -sv $out/lib/ocaml/caml $out/include/caml
+  '';
 
   meta = {
     homepage = http://caml.inria.fr/ocaml;
diff --git a/pkgs/development/compilers/ocaml/3.11.1.nix b/pkgs/development/compilers/ocaml/3.11.1.nix
index e22db680577d..66c8319600ff 100644
--- a/pkgs/development/compilers/ocaml/3.11.1.nix
+++ b/pkgs/development/compilers/ocaml/3.11.1.nix
@@ -24,6 +24,10 @@ stdenv.mkDerivation rec {
     CAT=$(type -tp cat)
     sed -e "s@/bin/cat@$CAT@" -i config/auto-aux/sharpbang
   '';
+  postBuild = ''
+    ensureDir $out/include
+    ln -sv $out/lib/ocaml/caml $out/include/caml
+  '';
 
   meta = {
     homepage = http://caml.inria.fr/ocaml;
diff --git a/pkgs/development/compilers/ocaml/configure-3.09.1 b/pkgs/development/compilers/ocaml/configure-3.09.1
deleted file mode 100755
index ecfdc90e672c..000000000000
--- a/pkgs/development/compilers/ocaml/configure-3.09.1
+++ /dev/null
@@ -1,1431 +0,0 @@
-#! /bin/sh
-
-#########################################################################
-#                                                                       #
-#                            Objective Caml                             #
-#                                                                       #
-#            Xavier Leroy, projet Cristal, INRIA Rocquencourt           #
-#                                                                       #
-#   Copyright 1999 Institut National de Recherche en Informatique et    #
-#   en Automatique.  All rights reserved.  This file is distributed     #
-#   under the terms of the GNU Library General Public License, with     #
-#   the special exception on linking described in file LICENSE.         #
-#                                                                       #
-#########################################################################
-
-# $Id: configure,v 1.228.2.3 2006/01/04 09:26:42 xleroy Exp $
-
-configure_options="$*"
-prefix=/usr/local
-bindir=''
-libdir=''
-mandir=''
-manext=1
-host_type=unknown
-ccoption=''
-cclibs=''
-curseslibs=''
-mathlib='-lm'
-dllib=''
-x11_include_dir=''
-x11_lib_dir=''
-tk_wanted=yes
-pthread_wanted=yes
-tk_defs=''
-tk_libs=''
-tk_x11=yes
-dl_defs=''
-verbose=no
-withcurses=yes
-withsharedlibs=yes
-gcc_warnings="-Wall"
-
-# Try to turn internationalization off, can cause config.guess to malfunction!
-unset LANG
-unset LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME 
-
-# Turn off some MacOS X debugging stuff, same reason
-unset RC_TRACE_ARCHIVES RC_TRACE_DYLIBS RC_TRACE_PREBINDING_DISABLED
-
-# Parse command-line arguments
-
-while : ; do
-  case "$1" in
-    "") break;;
-    -prefix|--prefix)
-        prefix=$2; shift;;
-    -bindir|--bindir)
-        bindir=$2; shift;;
-    -libdir|--libdir)
-        libdir=$2; shift;;
-    -mandir|--mandir)
-        case "$2" in
-          */man[1-9ln])
-            mandir=`echo $2 | sed -e 's|^\(.*\)/man.$|\1|'`
-            manext=`echo $2 | sed -e 's/^.*\(.\)$/\1/'`;;
-          *)
-            mandir=$2
-            manext=1;;
-        esac
-        shift;;
-    -host*|--host*)
-        host_type=$2; shift;;
-    -cc*)
-        ccoption="$2"; shift;;
-    -lib*)
-        cclibs="$2 $cclibs"; shift;;
-    -no-curses)
-        withcurses=no;;
-    -no-shared-libs)
-        withsharedlibs=no;;
-    -x11include*|--x11include*)
-        x11_include_dir=$2; shift;;
-    -x11lib*|--x11lib*)
-        x11_lib_dir=$2; shift;;
-    -with-pthread*|--with-pthread*)
-        ;; # Ignored for backward compatibility
-    -no-pthread*|--no-pthread*)
-        pthread_wanted=no;;
-    -no-tk|--no-tk)
-        tk_wanted=no;;
-    -tkdefs*|--tkdefs*)
-        tk_defs=$2; shift;;
-    -tklibs*|--tklibs*)
-        tk_libs=$2; shift;;
-    -tk-no-x11|--tk-no-x11)
-        tk_x11=no;;
-    -dldefs*|--dldefs*)
-        dl_defs="$2"; shift;;
-    -dllibs*|--dllibs*)
-        dllib="$2"; shift;;
-    -verbose|--verbose)
-        verbose=yes;;
-    *) echo "Unknown option \"$1\"." 1>&2; exit 2;;
-  esac
-  shift
-done
-
-# Sanity checks
-
-case "$prefix" in
-  /*) ;;
-   *) echo "The -prefix directory must be absolute." 1>&2; exit 2;;
-esac
-case "$bindir" in
-  /*) ;;
-  "") ;;
-   *) echo "The -bindir directory must be absolute." 1>&2; exit 2;;
-esac
-case "$libdir" in
-  /*) ;;
-  "") ;;
-   *) echo "The -libdir directory must be absolute." 1>&2; exit 2;;
-esac
-case "$mandir" in
-  /*) ;;
-  "") ;;
-   *) echo "The -mandir directory must be absolute." 1>&2; exit 2;;
-esac
-
-# Generate the files
-
-cd config/auto-aux
-rm -f s.h m.h Makefile
-touch s.h m.h Makefile
-
-# Write options to Makefile
-
-echo "# generated by ./configure $configure_options" >> Makefile
-
-# Where to install
-
-echo "PREFIX=$prefix" >> Makefile
-case "$bindir" in
-  "") echo 'BINDIR=$(PREFIX)/bin' >> Makefile
-      bindir="$prefix/bin";;
-   *) echo "BINDIR=$bindir" >> Makefile;;
-esac
-case "$libdir" in
-  "") echo 'LIBDIR=$(PREFIX)/lib/ocaml' >> Makefile
-      libdir="$prefix/lib/ocaml";;
-   *) echo "LIBDIR=$libdir" >> Makefile;;
-esac
-echo 'STUBLIBDIR=$(LIBDIR)/stublibs' >> Makefile
-case "$mandir" in
-  "") echo 'MANDIR=$(PREFIX)/man' >> Makefile
-      mandir="$prefix/man";;
-   *) echo "MANDIR=$mandir" >> Makefile;;
-esac
-echo "MANEXT=$manext" >> Makefile
-
-# Determine the system type
-
-if test "$host_type" = "unknown"; then
-  if host_type=`../gnu/config.guess`; then :; else
-    echo "Cannot guess host type"
-    echo "You must specify one with the -host option"
-    exit 2
-  fi
-fi
-if host=`../gnu/config.sub $host_type`; then :; else
-  echo "Please specify the correct host type with the -host option"
-  exit 2
-fi
-echo "Configuring for a $host ..."
-
-# Do we have gcc?
-
-if test -z "$ccoption"; then
-  if sh ./searchpath gcc; then
-    echo "gcc found"
-    cc=gcc
-  else
-    cc=cc
-  fi
-else
-  cc="$ccoption"
-fi
-
-# Check for buggy versions of GCC
-
-buggycc="no"
-
-case "$host,$cc" in
-  i[3456]86-*-*,gcc*)
-    case `$cc --version` in
-      2.7.2.1) cat <<'EOF'
-
-WARNING: you are using gcc version 2.7.2.1 on an Intel x86 processor.
-This version of gcc is known to generate incorrect code for the
-Objective Caml runtime system on some Intel x86 machines. (The symptom
-is a crash of boot/ocamlc when compiling stdlib/pervasives.mli.)
-In particular, the version of gcc 2.7.2.1 that comes with
-Linux RedHat 4.x / Intel is affected by this problem.
-Other Linux distributions might also be affected.
-If you are using one of these configurations, you are strongly advised
-to use another version of gcc, such as 2.95, which are
-known to work well with Objective Caml.
-
-Press <enter> to proceed or <interrupt> to stop.
-EOF
-        read reply;;
-      2.96*) cat <<'EOF'
-
-WARNING: you are using gcc version 2.96 on an Intel x86 processor.
-Certain patched versions of gcc 2.96 are known to generate incorrect
-code for the Objective Caml runtime system.  (The symptom is a segmentation
-violation on boot/ocamlc.)  Those incorrectly patched versions can be found
-in RedHat 7.2 and Mandrake 8.0 and 8.1; other Linux distributions
-might also be affected.  (See bug #57760 on bugzilla.redhat.com)
-
-Auto-configuration will now select gcc compiler flags that work around
-the problem.  Still, if you observe segmentation faults while running
-ocamlc or ocamlopt, you are advised to try another version of gcc,
-such as 2.95.3 or 3.2.
-
-EOF
-        buggycc="gcc.2.96";;
-
-            esac;;
-esac
-
-# Configure the bytecode compiler
-
-bytecc="$cc"
-bytecccompopts=""
-bytecclinkopts=""
-ostype="Unix"
-exe=""
-
-case "$bytecc,$host" in
-  cc,*-*-nextstep*)
-    # GNU C extensions disabled, but __GNUC__ still defined!
-    bytecccompopts="-fno-defer-pop $gcc_warnings -U__GNUC__ -posix"
-    bytecclinkopts="-posix";;
-  *,*-*-rhapsody*)
-    # Almost the same as NeXTStep
-    bytecccompopts="-fno-defer-pop $gcc_warnings -DSHRINKED_GNUC"
-    mathlib="";;
-  *,*-*-darwin*)
-    # Almost the same as rhapsody
-    bytecccompopts="-fno-defer-pop -no-cpp-precomp $gcc_warnings"
-    mathlib="";;
-  *,*-*-beos*)
-    bytecccompopts="-fno-defer-pop $gcc_warnings"
-    # No -lm library
-    mathlib="";;
-  gcc,alpha*-*-osf*)
-    bytecccompopts="-fno-defer-pop $gcc_warnings"
-    if cc="$bytecc" sh ./hasgot -mieee; then
-      bytecccompopts="-mieee $bytecccompopts";
-    fi
-    # Put code and static data in lower 4GB
-    bytecclinkopts="-Wl,-T,12000000 -Wl,-D,14000000"
-    # Tell gcc that we can use 32-bit code addresses for threaded code
-    echo "#define ARCH_CODE32" >> m.h;;
-  cc,alpha*-*-osf*)
-    bytecccompopts="-std1 -ieee";;
-  gcc,alpha*-*-linux*)
-    if cc="$bytecc" sh ./hasgot -mieee; then
-      bytecccompopts="-mieee $bytecccompopts";
-    fi;;
-  cc,mips-*-irix6*)
-    # Add -n32 flag to ensure compatibility with native-code compiler
-    bytecccompopts="-n32"
-    # Turn off warning "unused library"
-    bytecclinkopts="-n32 -Wl,-woff,84";;
-  cc*,mips-*-irix6*)
-    # (For those who want to force "cc -64")
-    # Turn off warning "unused library"
-    bytecclinkopts="-Wl,-woff,84";;
-  *,alpha*-*-unicos*)
-    # For the Cray T3E
-    bytecccompopts="-DUMK";;
-  gcc*,powerpc-*-aix*)
-    # Avoid name-space pollution by requiring Unix98-conformant includes
-    bytecccompopts="-fno-defer-pop $gcc_warnings -D_XOPEN_SOURCE=500";;
-  *,powerpc-*-aix*)
-    bytecccompopts="-D_XOPEN_SOURCE=500";;
-  gcc*,*-*-cygwin*)
-    bytecccompopts="-fno-defer-pop $gcc_warnings -U_WIN32"
-    exe=".exe"
-    ostype="Cygwin";;
-  gcc*,x86_64-*-linux*)
-    bytecccompopts="-fno-defer-pop $gcc_warnings"
-    # Tell gcc that we can use 32-bit code addresses for threaded code
-    # unless we are compiled for a shared library (-fPIC option)
-    echo "#ifndef __PIC__" >> m.h
-    echo "#  define ARCH_CODE32" >> m.h
-    echo "#endif" >> m.h;;
-  gcc*)
-    bytecccompopts="-fno-defer-pop $gcc_warnings";;
-esac
-
-# Configure compiler to use in further tests
-
-cc="$bytecc -O $bytecclinkopts"
-export cc cclibs verbose
-
-# Check C compiler
-
-sh ./runtest ansi.c
-case $? in
-  0) echo "The C compiler is ANSI-compliant.";;
-  1) echo "The C compiler $cc is not ANSI-compliant."
-     echo "You need an ANSI C compiler to build Objective Caml."
-     exit 2;;
-  *) echo "Unable to compile the test program."
-     echo "Make sure the C compiler $cc is properly installed."
-     exit 2;;
-esac
-
-# Check the sizes of data types
-
-echo "Checking the sizes of integers and pointers..."
-set `sh ./runtest sizes.c`
-case "$2,$3" in
-  4,4) echo "OK, this is a regular 32 bit architecture."
-       echo "#undef ARCH_SIXTYFOUR" >> m.h;;
-  *,8) echo "Wow! A 64 bit architecture!"
-       echo "#define ARCH_SIXTYFOUR" >> m.h;;
-  *,*) echo "This architecture seems to be neither 32 bits nor 64 bits."
-       echo "Objective Caml won't run on this architecture."
-       exit 2;;
-    *) echo "Unable to compile the test program."
-       echo "Make sure the C compiler $cc is properly installed."
-       exit 2;;
-esac
-if test $1 != 4 && test $2 != 4 && test $4 != 4; then
-  echo "Sorry, we can't find a 32-bit integer type"
-  echo "(sizeof(short) = $4, sizeof(int) = $1, sizeof(long) = $2)"
-  echo "Objective Caml won't run on this architecture."
-  exit 2
-fi
-
-echo "#define SIZEOF_INT $1" >> m.h
-echo "#define SIZEOF_LONG $2" >> m.h
-echo "#define SIZEOF_PTR $3" >> m.h
-echo "#define SIZEOF_SHORT $4" >> m.h
-
-if test $2 = 8; then
-     echo "#define ARCH_INT64_TYPE long" >> m.h
-     echo "#define ARCH_UINT64_TYPE unsigned long" >> m.h
-     echo '#define ARCH_INT64_PRINTF_FORMAT "l"' >> m.h
-     int64_native=true
-else
-  sh ./runtest longlong.c
-  case $? in
-  0) echo "64-bit \"long long\" integer type found (printf with \"%ll\")."
-     echo "#define ARCH_INT64_TYPE long long" >> m.h
-     echo "#define ARCH_UINT64_TYPE unsigned long long" >> m.h
-     echo '#define ARCH_INT64_PRINTF_FORMAT "ll"' >> m.h
-     int64_native=true;;
-  1) echo "64-bit \"long long\" integer type found (printf with \"%q\")."
-     echo "#define ARCH_INT64_TYPE long long" >> m.h
-     echo "#define ARCH_UINT64_TYPE unsigned long long" >> m.h
-     echo '#define ARCH_INT64_PRINTF_FORMAT "q"' >> m.h
-     int64_native=true;;
-  2) echo "64-bit \"long long\" integer type found (but no printf)."
-     echo "#define ARCH_INT64_TYPE long long" >> m.h
-     echo "#define ARCH_UINT64_TYPE unsigned long long" >> m.h
-     echo '#undef ARCH_INT64_PRINTF_FORMAT' >> m.h
-     int64_native=true;;
-  *) echo "No suitable 64-bit integer type found, will use software emulation."
-     echo "#undef ARCH_INT64_TYPE" >> m.h
-     echo "#undef ARCH_UINT64_TYPE" >> m.h
-     echo '#undef ARCH_INT64_PRINTF_FORMAT' >> m.h
-     int64_native=false;;
-  esac
-fi
-
-if test $3 = 8 && test $int64_native = false; then
-  echo "This architecture has 64-bit pointers but no 64-bit integer type."
-  echo "Objective Caml won't run on this architecture."
-  exit 2
-fi
-
-# Determine endianness
-
-sh ./runtest endian.c
-case $? in
-  0) echo "This is a big-endian architecture."
-     echo "#define ARCH_BIG_ENDIAN" >> m.h;;
-  1) echo "This is a little-endian architecture."
-     echo "#undef ARCH_BIG_ENDIAN" >> m.h;;
-  2) echo "This architecture seems to be neither big endian nor little endian."
-     echo "Objective Caml won't run on this architecture."
-     exit 2;;
-  *) echo "Something went wrong during endianness determination."
-     echo "You'll have to figure out endianness yourself"
-     echo "(option ARCH_BIG_ENDIAN in m.h).";;
-esac
-
-# Determine alignment constraints
-
-case "$host" in
-  sparc*-*-*|hppa*-*-*)
-    # On Sparc V9 with certain versions of gcc, determination of double
-    # alignment is not reliable (PR#1521), hence force it.
-    # Same goes for hppa.
-    # But there's a knack (PR#2572):
-    # if we're in 64-bit mode (sizeof(long) == 8), 
-    # we must not doubleword-align floats...
-    if test $2 = 8; then
-      echo "Doubles can be word-aligned."
-      echo "#undef ARCH_ALIGN_DOUBLE" >> m.h
-    else
-      echo "Doubles must be doubleword-aligned."
-      echo "#define ARCH_ALIGN_DOUBLE" >> m.h
-    fi;;
-  *)
-    sh ./runtest dblalign.c
-    case $? in
-      0) echo "Doubles can be word-aligned."
-         echo "#undef ARCH_ALIGN_DOUBLE" >> m.h;;
-      1) echo "Doubles must be doubleword-aligned."
-         echo "#define ARCH_ALIGN_DOUBLE" >> m.h;;
-      *) echo "Something went wrong during alignment determination for doubles."
-         echo "I'm going to assume this architecture has alignment constraints over doubles."
-         echo "That's a safe bet: Objective Caml will work even if"
-         echo "this architecture has actually no alignment constraints."
-         echo "#define ARCH_ALIGN_DOUBLE" >> m.h;;
-    esac;;
-esac
-
-if $int64_native; then
-  case "$host" in
-    sparc*-*-*|hppa*-*-*)
-      if test $2 = 8; then
-        echo "64-bit integers can be word-aligned."
-        echo "#undef ARCH_ALIGN_INT64" >> m.h
-      else
-        echo "64-bit integers must be doubleword-aligned."
-        echo "#define ARCH_ALIGN_INT64" >> m.h
-      fi;;
-    *)
-      sh ./runtest int64align.c
-      case $? in
-        0) echo "64-bit integers can be word-aligned."
-           echo "#undef ARCH_ALIGN_INT64" >> m.h;;
-        1) echo "64-bit integers must be doubleword-aligned."
-           echo "#define ARCH_ALIGN_INT64" >> m.h;;
-        *) echo "Something went wrong during alignment determination for 64-bit integers."
-           echo "I'm going to assume this architecture has alignment constraints."
-           echo "That's a safe bet: Objective Caml will work even if"
-           echo "this architecture has actually no alignment constraints."
-           echo "#define ARCH_ALIGN_INT64" >> m.h;;
-      esac
-  esac
-else
-  echo "#undef ARCH_ALIGN_INT64" >> m.h
-fi
-
-# Check semantics of division and modulus
-
-sh ./runtest divmod.c
-case $? in
-  0) echo "Native division and modulus have round-towards-zero semantics, will use them."
-     echo "#undef NONSTANDARD_DIV_MOD" >> m.h;;
-  1) echo "Native division and modulus do not have round-towards-zero semantics, will use software emulation."
-     echo "#define NONSTANDARD_DIV_MOD" >> m.h;;
-  *) echo "Something went wrong while checking native division and modulus, please report it."
-     echo "#define NONSTANDARD_DIV_MOD" >> m.h;;
-esac
-
-# Shared library support
-
-shared_libraries_supported=false
-dl_needs_underscore=false
-sharedcccompopts=''
-mksharedlib=''
-byteccrpath=''
-mksharedlibrpath=''
-
-if test $withsharedlibs = "yes"; then
-  case "$host" in
-    *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*)
-      sharedcccompopts="-fPIC"
-      mksharedlib="$bytecc -shared -o"
-      bytecclinkopts="$bytecclinkopts -Wl,-E"
-      byteccrpath="-Wl,-rpath,"
-      mksharedlibrpath="-Wl,-rpath,"
-      shared_libraries_supported=true;;
-    alpha*-*-osf*)
-      case "$bytecc" in
-        gcc*)
-          sharedcccompopts="-fPIC"
-          mksharedlib="$bytecc -shared -o"
-          byteccrpath="-Wl,-rpath,"
-          mksharedlibrpath="-Wl,-rpath,"
-          shared_libraries_supported=true;;
-        cc*)
-          sharedcccompopts=""
-          mksharedlib="ld -shared -expect_unresolved '*' -o"
-          byteccrpath="-Wl,-rpath,"
-          mksharedlibrpath="-rpath "
-          shared_libraries_supported=true;;
-      esac;;
-    *-*-solaris2*)
-      case "$bytecc" in
-        gcc*)
-          sharedcccompopts="-fPIC"
-          if sh ./solaris-ld; then
-            mksharedlib="$bytecc -shared -o"
-            byteccrpath="-R"
-            mksharedlibrpath="-R"
-          else
-            mksharedlib="$bytecc -shared -o"
-            bytecclinkopts="$bytecclinkopts -Wl,-E"
-            byteccrpath="-Wl,-rpath,"
-            mksharedlibrpath="-Wl,-rpath,"
-          fi
-          shared_libraries_supported=true;;
-        *)
-          sharedcccompopts="-KPIC"
-          byteccrpath="-R"
-          mksharedlibrpath="-R"
-          mksharedlib="/usr/ccs/bin/ld -G -o"
-          shared_libraries_supported=true;;
-      esac;;
-    mips*-*-irix[56]*)
-      case "$bytecc" in
-        cc*) sharedcccompopts="";;
-        gcc*) sharedcccompopts="-fPIC";;
-      esac
-      mksharedlib="ld -shared -rdata_shared -o"
-      byteccrpath="-Wl,-rpath,"
-      mksharedlibrpath="-rpath "
-      shared_libraries_supported=true;;
-    powerpc-apple-darwin*)
-      mksharedlib="cc -bundle -flat_namespace -undefined suppress -o"
-      bytecccompopts="$dl_defs $bytecccompopts"
-      #sharedcccompopts="-fnocommon"
-      dl_needs_underscore=true
-      shared_libraries_supported=true;;
-  esac
-fi
-
-# Further machine-specific hacks
-
-case "$host" in
-  ia64-*-linux*|alpha*-*-linux*|x86_64-*-linux*)
-    echo "Will use mmap() instead of malloc() for allocation of major heap chunks."
-    echo "#define USE_MMAP_INSTEAD_OF_MALLOC" >> s.h;;
-esac
-
-# Configure the native-code compiler
-
-arch=none
-model=default
-system=unknown
-
-case "$host" in
-  alpha*-*-osf*)                arch=alpha; system=digital;;
-  alpha*-*-linux*)              arch=alpha; system=linux;;
-  alpha*-*-freebsd*)            arch=alpha; system=freebsd;;
-  alpha*-*-netbsd*)             arch=alpha; system=netbsd;;
-  alpha*-*-openbsd*)            arch=alpha; system=openbsd;;
-  sparc*-*-sunos4.*)            arch=sparc; system=sunos;;
-  sparc*-*-solaris2.*)          arch=sparc; system=solaris;;
-  sparc*-*-*bsd*)               arch=sparc; system=bsd;;
-  sparc*-*-linux*)              arch=sparc; system=linux;;
-  i[3456]86-*-linux*)           arch=i386; system=linux_`sh ./runtest elf.c`;;
-  i[3456]86-*-*bsd*)            arch=i386; system=bsd_`sh ./runtest elf.c`;;
-  i[3456]86-*-nextstep*)        arch=i386; system=nextstep;;
-  i[3456]86-*-solaris*)         arch=i386; system=solaris;;
-  i[3456]86-*-beos*)            arch=i386; system=beos;;
-  i[3456]86-*-cygwin*)          arch=i386; system=cygwin;;
-  mips-*-irix6*)                arch=mips; system=irix;;
-  hppa1.1-*-hpux*)              arch=hppa; system=hpux;;
-  hppa2.0*-*-hpux*)             arch=hppa; system=hpux;;
-  hppa*-*-linux*)		arch=hppa; system=linux;;
-  powerpc-*-linux*)             arch=power; model=ppc; system=elf;;
-  powerpc-*-netbsd*)            arch=power; model=ppc; system=bsd;;
-  powerpc-*-rhapsody*)          arch=power; model=ppc; system=rhapsody;;
-  powerpc-*-darwin*)            arch=power; model=ppc; system=rhapsody;;
-  arm*-*-linux*)                arch=arm; system=linux;;
-  ia64-*-linux*)                arch=ia64; system=linux;;
-  ia64-*-freebsd*)              arch=ia64; system=freebsd;;
-  x86_64-*-linux*)              arch=amd64; system=linux;;
-  x86_64-*-freebsd*)            arch=amd64; system=freebsd;;
-  x86_64-*-openbsd*)            arch=amd64; system=openbsd;;
-esac
-
-if test -z "$ccoption"; then
-  case "$arch,$system,$cc" in
-    alpha,digital,gcc*) nativecc=cc;;
-    mips,*,gcc*) nativecc=cc;;
-    *) nativecc="$bytecc";;
-  esac
-else
-  nativecc="$ccoption"
-fi
-
-nativecccompopts=''
-nativecclinkopts=''
-nativeccrpath="$byteccrpath"
-
-case "$arch,$nativecc,$system,$host_type" in
-  alpha,cc*,digital,*) nativecccompopts=-std1;;
-  mips,cc*,irix,*)     nativecccompopts=-n32
-                       nativecclinkopts="-n32 -Wl,-woff,84";;
-  *,*,nextstep,*)      nativecccompopts="$gcc_warnings -U__GNUC__ -posix"
-                       nativecclinkopts="-posix";;
-  *,*,rhapsody,*darwin[1-5].*)
-                       nativecccompopts="$gcc_warnings -DSHRINKED_GNUC";;
-  *,*,rhapsody,*)
-                 nativecccompopts="$gcc_warnings -DDARWIN_VERSION_6 $dl_defs";;
-  *,gcc*,cygwin,*)     nativecccompopts="$gcc_warnings -U_WIN32";;
-  *,gcc*,*,*)          nativecccompopts="$gcc_warnings";;
-esac
-
-asflags=''
-aspp='$(AS)'
-asppflags=''
-asppprofflags='-DPROFILING'
-
-case "$arch,$model,$system" in
-  alpha,*,digital)  asflags='-O2'; asppflags='-O2 -DSYS_$(SYSTEM)';
-                    asppprofflags='-pg -DPROFILING';;
-  alpha,*,linux)    aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
-  alpha,*,freebsd)  aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
-  alpha,*,netbsd)   aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
-  alpha,*,openbsd)  aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
-  mips,*,irix)      asflags='-n32 -O2'; asppflags="$asflags";;
-  sparc,*,bsd)      aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
-  sparc,*,linux)    aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
-  sparc,*,*)        case "$cc" in
-                      gcc*) aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
-                         *) asppflags='-P -DSYS_$(SYSTEM)';;
-                    esac;;
-  i386,*,solaris)   aspp='/usr/ccs/bin/as'; asppflags='-P -DSYS_$(SYSTEM)';;
-  i386,*,*)         aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
-  hppa,*,*)         aspp="$cc"; asppflags='-traditional -c -DSYS_$(SYSTEM)';;
-  power,*,elf)      aspp='gcc'; asppflags='-c';;
-  power,*,bsd)      aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
-  power,*,rhapsody) ;;
-  arm,*,linux)      aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
-  ia64,*,*)         asflags=-xexplicit
-                    aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM) -Wa,-xexplicit';;
-  amd64,*,*)        aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
-esac
-
-cc_profile='-pg'
-case "$arch,$model,$system" in
-  alpha,*,digital) profiling='prof';;
-  i386,*,linux_elf) profiling='prof';;
-  i386,*,bsd_elf) profiling='prof';;
-  sparc,*,solaris)
-    profiling='prof'
-    case "$nativecc" in gcc*) ;; *) cc_profile='-xpg';; esac;;
-  amd64,*,linux) profiling='prof';;
-  *) profiling='noprof';;
-esac
-
-# Where is ranlib?
-
-if sh ./searchpath ranlib; then
-  echo "ranlib found"
-  echo "RANLIB=ranlib" >> Makefile
-  echo "RANLIBCMD=ranlib" >> Makefile
-else
-  echo "ranlib not used"
-  echo "RANLIB=ar rs" >> Makefile
-  echo "RANLIBCMD=" >> Makefile
-fi
-
-# Do #! scripts work?
-
-# BRAVO: check disabled for NixOS
-# if (SHELL=/bin/sh; export SHELL; (./sharpbang || ./sharpbang2) >/dev/null); then
-#   echo "#! appears to work in shell scripts"
-  case "$host" in
-    *-*-sunos*|*-*-unicos*)
-      echo "We won't use it, though, because under SunOS and Unicos it breaks"
-      echo "on pathnames longer than 30 characters"
-      echo "SHARPBANGSCRIPTS=false" >> Makefile;;
-    *-*-cygwin*)
-      echo "We won't use it, though, because of conflicts with .exe extension"
-      echo "under Cygwin"
-      echo "SHARPBANGSCRIPTS=false" >> Makefile;;
-    *)
-      echo "SHARPBANGSCRIPTS=true" >> Makefile;;
-  esac
-# else
-#   echo "No support for #! in shell scripts"
-#   echo "SHARPBANGSCRIPTS=false" >> Makefile
-# fi
-
-# Write the OS type (Unix or Cygwin)
-
-echo "#define OCAML_OS_TYPE \"$ostype\"" >> s.h
-echo "#define OCAML_STDLIB_DIR \"$libdir\"" >> s.h
-
-# Use 64-bit file offset if possible
-
-bytecccompopts="$bytecccompopts -D_FILE_OFFSET_BITS=64"
-nativecccompopts="$nativecccompopts -D_FILE_OFFSET_BITS=64"
-
-# Check the semantics of signal handlers
-
-if sh ./hasgot sigaction sigprocmask; then
-  echo "POSIX signal handling found."
-  echo "#define POSIX_SIGNALS" >> s.h
-else
-  if sh ./runtest signals.c; then
-    echo "Signals have the BSD semantics."
-    echo "#define BSD_SIGNALS" >> s.h
-  else
-    echo "Signals have the System V semantics."
-  fi
-  if sh ./hasgot sigsetmask; then
-    echo "sigsetmask() found"
-    echo "#define HAS_SIGSETMASK" >> s.h
-  fi
-fi
-
-# For the sys module
-
-if sh ./hasgot getrusage; then
-  echo "getrusage() found."
-  echo "#define HAS_GETRUSAGE" >> s.h
-fi
-
-if sh ./hasgot times; then
-  echo "times() found."
-  echo "#define HAS_TIMES" >> s.h
-fi
-
-# For the terminfo module
-
-if test "$withcurses" = "yes"; then
-  for libs in "" "-lcurses" "-ltermcap" "-lcurses -ltermcap" "-lncurses"; do
-    if sh ./hasgot $libs tgetent tgetstr tgetnum tputs; then
-      echo "termcap functions found (with libraries '$libs')"
-      echo "#define HAS_TERMCAP" >> s.h
-      curseslibs="${libs}"
-      break
-    fi
-  done
-fi
-
-# Configuration for the libraries
-
-otherlibraries="unix str num dynlink bigarray"
-
-# For the Unix library
-
-has_sockets=no
-if sh ./hasgot socket socketpair bind listen accept connect; then
-  echo "You have BSD sockets."
-  echo "#define HAS_SOCKETS" >> s.h
-  has_sockets=yes
-elif sh ./hasgot -lnsl -lsocket socket socketpair bind listen accept connect; then
-  echo "You have BSD sockets (with libraries '-lnsl -lsocket')"
-  cclibs="$cclibs -lnsl -lsocket"
-  echo "#define HAS_SOCKETS" >> s.h
-  has_sockets=yes
-fi
-
-if sh ./hasgot -i sys/socket.h -t socklen_t; then
-  echo "socklen_t is defined in <sys/socket.h>"
-  echo "#define HAS_SOCKLEN_T" >> s.h
-fi
-
-if sh ./hasgot inet_aton; then
-  echo "inet_aton() found."
-  echo "#define HAS_INET_ATON" >> s.h
-fi
-
-if sh ./hasgot -i sys/types.h -i sys/socket.h -i netinet/in.h \
-               -t 'struct sockaddr_in6' \
-&& sh ./hasgot getaddrinfo getnameinfo inet_pton inet_ntop; then
-  echo "IPv6 is supported."
-  echo "#define HAS_IPV6" >> s.h
-fi
-
-if sh ./hasgot -i unistd.h; then
-  echo "unistd.h found."
-  echo "#define HAS_UNISTD" >> s.h
-fi
-
-if sh ./hasgot -i sys/types.h -t off_t; then
-  echo "off_t is defined in <sys/types.h>"
-  echo "#define HAS_OFF_T" >> s.h
-fi
-
-if sh ./hasgot -i sys/types.h -i dirent.h; then
-  echo "dirent.h found."
-  echo "#define HAS_DIRENT" >> s.h
-fi
-
-if sh ./hasgot rewinddir; then
-  echo "rewinddir() found."
-  echo "#define HAS_REWINDDIR" >> s.h
-fi
-
-if sh ./hasgot lockf; then
-  echo "lockf() found."
-  echo "#define HAS_LOCKF" >> s.h
-fi
-
-if sh ./hasgot mkfifo; then
-  echo "mkfifo() found."
-  echo "#define HAS_MKFIFO" >> s.h
-fi
-
-if sh ./hasgot getcwd; then
-  echo "getcwd() found."
-  echo "#define HAS_GETCWD" >> s.h
-fi
-
-if sh ./hasgot getwd; then
-  echo "getwd() found."
-  echo "#define HAS_GETWD" >> s.h
-fi
-
-if sh ./hasgot getpriority setpriority; then
-  echo "getpriority() found."
-  echo "#define HAS_GETPRIORITY" >> s.h
-fi
-
-if sh ./hasgot -i sys/types.h -i utime.h && sh ./hasgot utime; then
-  echo "utime() found."
-  echo "#define HAS_UTIME" >> s.h
-fi
-
-if sh ./hasgot utimes; then
-  echo "utimes() found."
-  echo "#define HAS_UTIMES" >> s.h
-fi
-
-if sh ./hasgot dup2; then
-  echo "dup2() found."
-  echo "#define HAS_DUP2" >> s.h
-fi
-
-if sh ./hasgot fchmod fchown; then
-  echo "fchmod() found."
-  echo "#define HAS_FCHMOD" >> s.h
-fi
-
-if sh ./hasgot truncate ftruncate; then
-  echo "truncate() found."
-  echo "#define HAS_TRUNCATE" >> s.h
-fi
-
-select_include=''
-if sh ./hasgot -i sys/types.h -i sys/select.h; then
-  echo "sys/select.h found."
-  echo "#define HAS_SYS_SELECT_H" >> s.h
-  select_include='-i sys/select.h'
-fi
-
-has_select=no
-if sh ./hasgot select && \
-   sh ./hasgot -i sys/types.h $select_include -t fd_set ; then
-  echo "select() found."
-  echo "#define HAS_SELECT" >> s.h
-  has_select=yes
-fi
-
-if sh ./hasgot symlink readlink lstat;  then
-  echo "symlink() found."
-  echo "#define HAS_SYMLINK" >> s.h
-fi
-
-has_wait=no
-if sh ./hasgot waitpid;  then
-  echo "waitpid() found."
-  echo "#define HAS_WAITPID" >> s.h
-  has_wait=yes
-fi
-
-if sh ./hasgot wait4;  then
-  echo "wait4() found."
-  echo "#define HAS_WAIT4" >> s.h
-  has_wait=yes
-fi
-
-if sh ./hasgot -i limits.h && sh ./runtest getgroups.c; then
-  echo "getgroups() found."
-  echo "#define HAS_GETGROUPS" >> s.h
-fi
-
-if sh ./hasgot -i termios.h &&
-   sh ./hasgot tcgetattr tcsetattr tcsendbreak tcflush tcflow; then
-  echo "POSIX termios found."
-  echo "#define HAS_TERMIOS" >> s.h
-fi
-
-# Async I/O under OSF1 3.x are so buggy that the test program hangs...
-testasyncio=true
-if test -f /usr/bin/uname; then
-  case "`/usr/bin/uname -s -r`" in
-    "OSF1 V3."*) testasyncio=false;;
-  esac
-fi
-if $testasyncio && sh ./runtest async_io.c; then
-  echo "Asynchronous I/O are supported."
-  echo "#define HAS_ASYNC_IO" >> s.h
-fi
-
-has_setitimer=no
-if sh ./hasgot setitimer; then
-  echo "setitimer() found."
-  echo "#define HAS_SETITIMER" >> s.h
-  has_setitimer="yes"
-fi
-
-if sh ./hasgot gethostname; then
-  echo "gethostname() found."
-  echo "#define HAS_GETHOSTNAME" >> s.h
-fi
-
-if sh ./hasgot -i sys/utsname.h && sh ./hasgot uname; then
-  echo "uname() found."
-  echo "#define HAS_UNAME" >> s.h
-fi
-
-has_gettimeofday=no
-if sh ./hasgot gettimeofday; then
-  echo "gettimeofday() found."
-  echo "#define HAS_GETTIMEOFDAY" >> s.h
-  has_gettimeofday="yes"
-fi
-
-if sh ./hasgot mktime; then
-  echo "mktime() found."
-  echo "#define HAS_MKTIME" >> s.h
-fi
-
-case "$host" in
-  *-*-cygwin*) ;;  # setsid emulation under Cygwin breaks the debugger
-  *) if sh ./hasgot setsid; then
-       echo "setsid() found."
-       echo "#define HAS_SETSID" >> s.h
-     fi;;
-esac
-
-if sh ./hasgot putenv; then
-  echo "putenv() found."
-  echo "#define HAS_PUTENV" >> s.h
-fi
-
-if sh ./hasgot -i locale.h && sh ./hasgot setlocale; then
-  echo "setlocale() and <locale.h> found."
-  echo "#define HAS_LOCALE" >> s.h
-fi
-
-if sh ./hasgot -i mach-o/dyld.h && sh ./hasgot NSLinkModule; then
-  echo "NSLinkModule() found. Using darwin dynamic loading."
-  echo "#define HAS_NSLINKMODULE" >> s.h
-elif sh ./hasgot $dllib dlopen; then
-  echo "dlopen() found."
-elif sh ./hasgot $dllib -ldl dlopen; then
-  echo "dlopen() found in -ldl."
-  dllib="$dllib -ldl"
-else
-  shared_libraries_supported=no
-fi
-
-if $shared_libraries_supported; then
-  echo "Dynamic loading of shared libraries is supported."
-  echo "#define SUPPORT_DYNAMIC_LINKING" >> s.h
-  if $dl_needs_underscore; then
-    echo '#define DL_NEEDS_UNDERSCORE' >>s.h
-  fi
-fi
-
-if sh ./hasgot -i sys/types.h -i sys/mman.h && sh ./hasgot mmap munmap; then
-  echo "mmap() found."
-  echo "#define HAS_MMAP" >> s.h
-fi
-
-nargs=none
-for i in 5 6; do
-  if sh ./trycompile -DNUM_ARGS=${i} gethostbyname.c; then nargs=$i; break; fi
-done
-if test $nargs != "none"; then
-  echo "gethostbyname_r() found (with ${nargs} arguments)."
-  echo "#define HAS_GETHOSTBYNAME_R $nargs" >> s.h
-fi
-
-nargs=none
-for i in 7 8; do
-  if sh ./trycompile -DNUM_ARGS=${i} gethostbyaddr.c; then nargs=$i; break; fi
-done
-if test $nargs != "none"; then
-  echo "gethostbyaddr_r() found (with ${nargs} arguments)."
-  echo "#define HAS_GETHOSTBYADDR_R $nargs" >> s.h
-fi
-
-# Determine if the debugger is supported
-
-if test "$has_sockets" = "yes"; then
-  echo "Replay debugger supported."
-  debugger="ocamldebugger"
-else
-  echo "No replay debugger (missing system calls)"
-  debugger=""
-fi
-
-
-# Determine if system stack overflows can be detected
-
-case "$arch,$system" in
-  i386,linux_elf|amd64,linux)
-    echo "System stack overflow can be detected."
-    echo "#define HAS_STACK_OVERFLOW_DETECTION" >> s.h;;
-  *)
-    echo "Cannot detect system stack overflow.";;
-esac
-
-# Determine the target architecture for the "num" library
-
-case "$host" in
-  alpha*-*-*)    bng_arch=alpha; bng_asm_level=1;;
-  i[3456]86-*-*) bng_arch=ia32
-                 if sh ./trycompile ia32sse2.c
-                 then bng_asm_level=2
-                 else bng_asm_level=1
-                 fi;;
-  mips-*-*)      bng_arch=mips; bng_asm_level=1;;
-  powerpc-*-*)   bng_arch=ppc; bng_asm_level=1;;
-  sparc*-*-*)    bng_arch=sparc; bng_asm_level=1;;
-  x86_64-*-*)    bng_arch=amd64; bng_asm_level=1;;
-  *)             bng_arch=generic; bng_asm_level=0;;
-esac
-
-echo "BNG_ARCH=$bng_arch" >> Makefile
-echo "BNG_ASM_LEVEL=$bng_asm_level" >> Makefile
-
-# Determine if the POSIX threads library is supported
-
-systhread_support=false
-
-if test "$pthread_wanted" = "yes"; then
-  case "$host" in
-    *-*-solaris*)  pthread_link="-lpthread -lposix4";;
-    *-*-freebsd*)  pthread_link="-pthread";;
-    *-*-openbsd*)  pthread_link="-pthread";;
-    *)             pthread_link="-lpthread";;
-  esac
-  if ./hasgot -i pthread.h $pthread_link pthread_self; then
-    echo "POSIX threads library supported."
-    systhread_support=true
-    otherlibraries="$otherlibraries systhreads"
-    bytecccompopts="$bytecccompopts -D_REENTRANT"
-    nativecccompopts="$nativecccompopts -D_REENTRANT"
-    case "$host" in
-      *-*-freebsd*)
-          bytecccompopts="$bytecccompopts -D_THREAD_SAFE"
-          nativecccompopts="$nativecccompopts -D_THREAD_SAFE";;
-      *-*-openbsd*)
-          bytecccompopts="$bytecccompopts -pthread"
-          asppflags="$asppflags -pthread"
-          nativecccompopts="$nativecccompopts -pthread";;
-    esac
-    echo "Options for linking with POSIX threads: $pthread_link"
-    echo "PTHREAD_LINK=$pthread_link" >> Makefile
-    if sh ./hasgot $pthread_link sigwait; then
-      echo "sigwait() found"
-      echo "#define HAS_SIGWAIT" >> s.h
-    fi
-  else
-    echo "POSIX threads not found."
-    pthread_link=""
-  fi
-fi
-
-# Determine if the bytecode thread library is supported
-
-if test "$has_select" = "yes" \
-&& test "$has_setitimer" = "yes" \
-&& test "$has_gettimeofday" = "yes" \
-&& test "$has_wait" = "yes"; then
-  echo "Bytecode threads library supported."
-  otherlibraries="$otherlibraries threads"
-else
-  echo "Bytecode threads library not supported (missing system calls)"
-fi
-
-# Determine the location of X include files and libraries
-
-x11_include="not found"
-x11_link="not found"
-
-for dir in \
-    $x11_include_dir          \
-    ; \
-do
-  if test -f $dir/X11/X.h; then
-    x11_include=$dir
-    break
-  fi
-done
-
-if test "$x11_include" = "not found"; then
-  x11_try_lib_dir=''
-else
-  x11_try_lib_dir=`echo $x11_include | sed -e 's|include|lib|'`
-fi
-
-for dir in \
-    $x11_lib_dir          \
-    $x11_try_lib_dir      \
-    ; \
-do
-  if test -f $dir/libX11.a || \
-     test -f $dir/libX11.so || \
-     test -f $dir/libX11.dll.a || \
-     test -f $dir/libX11.sa; then
-    if test $dir = /usr/lib; then
-      x11_link="-lX11"
-    else
-      x11_link="-L$dir -lX11"
-      x11_libs="-L$dir"
-    fi
-    break
-  fi
-done
-
-
-if test "$x11_include" = "not found" || test "$x11_link" = "not found"
-then
-  echo "X11 not found, the \"graph\" library will not be supported."
-  x11_include=""
-else
-  echo "Location of X11 include files: $x11_include/X11"
-  echo "Options for linking with X11: $x11_link"
-  otherlibraries="$otherlibraries graph"
-  if test "$x11_include" = "/usr/include"; then
-    x11_include=""
-  else
-    x11_include="-I$x11_include"
-  fi
-  echo "X11_INCLUDES=$x11_include" >> Makefile
-  echo "X11_LINK=$x11_link" >> Makefile
-fi
-
-# See if we can compile the dbm library
-
-dbm_include="not found"
-dbm_link="not found"
-use_gdbm_ndbm=no
-
-for dir in /usr/include /usr/include/db1 /usr/include/gdbm; do
-  if test -f $dir/ndbm.h; then
-    dbm_include=$dir
-    if sh ./hasgot dbm_open; then
-      dbm_link=""
-    elif sh ./hasgot -lndbm dbm_open; then
-      dbm_link="-lndbm"
-    elif sh ./hasgot -ldb1 dbm_open; then
-      dbm_link="-ldb1"
-    elif sh ./hasgot -lgdbm dbm_open; then
-      dbm_link="-lgdbm"
-    elif sh ./hasgot -lgdbm_compat -lgdbm dbm_open; then
-      dbm_link="-lgdbm_compat -lgdbm" 
-    fi
-    break
-  fi
-  if test -f $dir/gdbm-ndbm.h; then
-    dbm_include=$dir
-    use_gdbm_ndbm=yes
-    if sh ./hasgot -lgdbm_compat -lgdbm dbm_open; then
-      dbm_link="-lgdbm_compat -lgdbm"
-    fi
-    break   
-  fi
-done
-if test "$dbm_include" = "not found" || test "$dbm_link" = "not found"; then
-  echo "NDBM not found, the \"dbm\" library will not be supported."
-else
-  echo "NDBM found (in $dbm_include)"
-  if test "$dbm_include" = "/usr/include"; then
-    dbm_include=""
-  else
-    dbm_include="-I$dbm_include"
-  fi
-  echo "DBM_INCLUDES=$dbm_include" >> Makefile
-  echo "DBM_LINK=$dbm_link" >> Makefile
-  if test "$use_gdbm_ndbm" = "yes"; then
-    echo "#define DBM_USES_GDBM_NDBM" >> s.h
-  fi
-  otherlibraries="$otherlibraries dbm"
-fi
-
-# Look for tcl/tk
-
-echo "Configuring LablTk..."
-
-if test $tk_wanted = no; then
-  has_tk=false
-elif test $tk_x11 = no; then
-  has_tk=true
-elif test "$x11_include" = "not found" || test "$x11_link" = "not found"; then
-  echo "X11 not found."
-  has_tk=false
-else
-  tk_x11_include="$x11_include"
-  tk_x11_libs="$x11_libs -lX11"
-  has_tk=true
-fi
-
-if test $has_tk = true; then
-  tcl_version=''
-  tcl_version=`sh ./runtest $tk_defs $tk_x11_include tclversion.c`
-  for tk_incs in \
-    ;
-  do if test -z "$tcl_version"; then
-    tk_defs="$tk_incs"
-    tcl_version=`sh ./runtest $tk_defs $tk_x11_include tclversion.c`
-  fi; done
-  if test -n "$tcl_version" && test "x$tcl_version" != "xnone"; then
-    echo "tcl.h and tk.h version $tcl_version found with \"$tk_defs\"."
-    case $tcl_version in
-    7.5) tclmaj=7 tclmin=5 tkmaj=4 tkmin=1 ;;
-    7.6) tclmaj=7 tclmin=6 tkmaj=4 tkmin=2 ;;
-    8.0) tclmaj=8 tclmin=0 tkmaj=8 tkmin=0 ;;
-    8.1) tclmaj=8 tclmin=1 tkmaj=8 tkmin=1 ;;
-    8.2) tclmaj=8 tclmin=2 tkmaj=8 tkmin=2 ;;
-    8.3) tclmaj=8 tclmin=3 tkmaj=8 tkmin=3 ;;
-    8.4) tclmaj=8 tclmin=4 tkmaj=8 tkmin=4 ;;
-    *) echo "This version is not known."; has_tk=false ;;
-    esac
-  else
-    echo "tcl.h and/or tk.h not found."
-    has_tk=false
-  fi
-fi
-
-tkauxlibs="$mathlib $dllib"
-tcllib=''
-tklib=''
-if test $has_tk = true; then
-  if test -n "$tk_libs" && \
-     sh ./hasgot $tk_libs $tk_x11_libs $tkauxlibs Tcl_DoOneEvent
-  then tk_libs="$tk_libs $dllib"
-  elif sh ./hasgot $tk_libs -ltcl$tclmaj.$tclmin $tkauxlibs Tcl_DoOneEvent
-  then
-    tk_libs="$tk_libs -ltk$tkmaj.$tkmin -ltcl$tclmaj.$tclmin $dllib"
-  elif sh ./hasgot $tk_libs -ltcl$tclmaj$tclmin $tkauxlibs Tcl_DoOneEvent
-  then
-    tk_libs="$tk_libs -ltk$tkmaj$tkmin -ltcl$tclmaj$tclmin $dllib"
-  elif test -z "$tk_libs" && tk_libs=-L/usr/local/lib && \
-    sh ./hasgot $tk_libs -ltcl$tclmaj.$tclmin $tkauxlibs Tcl_DoOneEvent
-  then
-    tk_libs="$tk_libs -ltk$tkmaj.$tkmin -ltcl$tclmaj.$tclmin $dllib"
-  elif sh ./hasgot $tk_libs -ltcl$tclmaj$tclmin $tkauxlibs Tcl_DoOneEvent
-  then
-    tk_libs="$tk_libs -ltk$tkmaj$tkmin -ltcl$tclmaj$tclmin $dllib"
-  elif sh ./hasgot -L/sw/lib $tk_libs -ltcl$tclmaj.$tclmin $tkauxlibs \
-                   Tcl_DoOneEvent
-  then tk_libs="-L/sw/lib -ltk$tkmaj.$tkmin -ltcl$tclmaj.$tclmin $dllib"
-  else
-    echo "Tcl library not found."
-    has_tk=false
-  fi
-fi
-if test $has_tk = true; then
-  if sh ./hasgot $tk_libs $tk_x11_libs $tkauxlibs Tk_SetGrid; then
-    echo "Tcl/Tk libraries found."
-  elif sh ./hasgot -L/sw/lib $tk_libs $tk_x11_libs $tkauxlibs Tk_SetGrid; then
-    tk_libs="-L/sw/lib $tk_libs"
-    echo "Tcl/Tk libraries found."
-  else
-    echo "Tcl library found."
-    echo "Tk library not found."
-    has_tk=false
-  fi
-fi
-
-if test $has_tk = true; then
-  if test $tk_x11 = yes; then
-    echo "TK_DEFS=$tk_defs "'$(X11_INCLUDES)' >> Makefile
-    echo "TK_LINK=$tk_libs "'$(X11_LINK)' >> Makefile
-  else
-    echo "TK_DEFS=$tk_defs" >> Makefile
-    echo "TK_LINK=$tk_libs" >> Makefile
-  fi
-  otherlibraries="$otherlibraries labltk"
-else
-  echo "Configuration failed, LablTk will not be built."
-fi
-
-# Begin Camlp4
-(
-cd ../../camlp4/config
-EXE=$exe ./configure_batch -prefix "$prefix" -bindir "$bindir" -libdir "$libdir" -mandir "$mandir" -ocaml-top ../.. > /dev/null
-)
-
-case $? in
-    0) echo "Camlp4 correctly configured.";;
-    *) echo "Warning: Camlp4 configuration terminated with error code $?";;
-esac
-# End Camlp4
-
-# Final twiddling of compiler options to work around known bugs
-
-nativeccprofopts="$nativecccompopts"
-case "$buggycc" in
-  gcc.2.96)
-    bytecccompopts="$bytecccompopts -fomit-frame-pointer"
-    nativecccompopts="$nativecccompopts -fomit-frame-pointer";;
-esac
-
-# Finish generated files
-
-cclibs="$cclibs $mathlib"
-
-echo "BYTECC=$bytecc" >> Makefile
-echo "BYTECCCOMPOPTS=$bytecccompopts" >> Makefile
-echo "BYTECCLINKOPTS=$bytecclinkopts" >> Makefile
-echo "BYTECCLIBS=$cclibs $dllib $curseslibs $pthread_link" >> Makefile
-echo "BYTECCRPATH=$byteccrpath" >> Makefile
-echo "EXE=$exe" >> Makefile
-echo "SUPPORTS_SHARED_LIBRARIES=$shared_libraries_supported" >> Makefile
-echo "SHAREDCCCOMPOPTS=$sharedcccompopts" >> Makefile
-echo "MKSHAREDLIB=$mksharedlib" >> Makefile
-echo "MKSHAREDLIBRPATH=$mksharedlibrpath" >> Makefile
-echo "ARCH=$arch" >> Makefile
-echo "MODEL=$model" >> Makefile
-echo "SYSTEM=$system" >> Makefile
-echo "NATIVECC=$nativecc" >> Makefile
-echo "NATIVECCCOMPOPTS=$nativecccompopts" >> Makefile
-echo "NATIVECCPROFOPTS=$nativeccprofopts" >> Makefile
-echo "NATIVECCLINKOPTS=$nativecclinkopts" >> Makefile
-echo "NATIVECCRPATH=$nativeccrpath" >> Makefile
-echo "NATIVECCLIBS=$cclibs $dllib" >> Makefile
-echo "ASFLAGS=$asflags" >> Makefile
-echo "ASPP=$aspp" >> Makefile
-echo "ASPPFLAGS=$asppflags" >> Makefile
-echo "ASPPPROFFLAGS=$asppprofflags" >> Makefile
-echo "PROFILING=$profiling" >> Makefile
-echo "DYNLINKOPTS=$dllib" >> Makefile
-echo "OTHERLIBRARIES=$otherlibraries" >> Makefile
-echo "DEBUGGER=$debugger" >> Makefile
-echo "CC_PROFILE=$cc_profile" >> Makefile
-echo "SYSTHREAD_SUPPORT=$systhread_support" >>Makefile
-
-rm -f tst hasgot.c
-rm -f ../m.h ../s.h ../Makefile
-mv m.h s.h Makefile ..
-
-# Print a summary
-
-echo
-echo "** Configuration summary **"
-echo
-echo "Directories where Objective Caml will be installed:"
-echo "        binaries.................. $bindir"
-echo "        standard library.......... $libdir"
-echo "        manual pages.............. $mandir (with extension .$manext)"
-
-echo "Configuration for the bytecode compiler:"
-echo "        C compiler used........... $bytecc"
-echo "        options for compiling..... $bytecccompopts"
-echo "        options for linking....... $bytecclinkopts $cclibs $dllib $curseslibs $pthread_link"
-if $shared_libraries_supported; then
-echo "        shared libraries are supported"
-echo "        options for compiling..... $sharedcccompopts $bytecccompopts"
-echo "        command for building...... $mksharedlib lib.so $mksharedlibrpath/a/path objs"
-else
-echo "        shared libraries not supported"
-fi
-
-echo "Configuration for the native-code compiler:"
-if test "$arch" = "none"; then
-  echo "        (not supported on this platform)"
-else
-  if test "$model" = "default"; then
-    echo "        hardware architecture..... $arch"
-  else
-    echo "        hardware architecture..... $arch ($model)"
-  fi
-  if test "$system" = "unknown"; then : ; else
-  echo "        OS variant................ $system"
-  fi
-  echo "        C compiler used........... $nativecc"
-  echo "        options for compiling..... $nativecccompopts"
-  echo "        options for linking....... $nativecclinkopts $cclibs"
-  echo "        assembler ................ \$(AS) $asflags"
-  echo "        preprocessed assembler ... $aspp $asppflags"
-  if test "$profiling" = "prof"; then
-  echo "        profiling with gprof ..... supported"
-  else
-  echo "        profiling with gprof ..... not supported"
-  fi
-fi
-
-if test "$debugger" = "ocamldebugger"; then
-  echo "Source-level replay debugger: supported"
-else
-  echo "Source-level replay debugger: not supported"
-fi
-
-echo "Additional libraries supported:"
-echo "        $otherlibraries"
-
-echo "Configuration for the \"num\" library:"
-echo "        target architecture ...... $bng_arch (asm level $bng_asm_level)"
-
-if test "$x11_include" != "not found" && test "$x11_lib" != "not found"; then
-echo "Configuration for the \"graph\" library:"
-echo "        options for compiling .... $x11_include"
-echo "        options for linking ...... $x11_link"
-fi
-
-if test $has_tk = true; then
-echo "Configuration for the \"labltk\" library:"
-echo "        use tcl/tk version ....... $tcl_version"
-echo "        options for compiling .... $tk_defs"
-echo "        options for linking ...... $tk_libs"
-else
-echo "The \"labltk\" library: not supported"
-fi
-
-echo
-echo "** Objective Caml configuration completed successfully **"
-echo
diff --git a/pkgs/development/guile-modules/guile-cairo/default.nix b/pkgs/development/guile-modules/guile-cairo/default.nix
index d4deea047ef4..f8ff52e5ab8e 100644
--- a/pkgs/development/guile-modules/guile-cairo/default.nix
+++ b/pkgs/development/guile-modules/guile-cairo/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, stdenv, guile, pkgconfig, cairo, guileLib }:
+{ fetchurl, stdenv, guile, pkgconfig, cairo, guile_lib }:
 
 stdenv.mkDerivation rec {
   name = "guile-cairo-1.4.0";
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [ guile pkgconfig cairo ]
-    ++ stdenv.lib.optional doCheck guileLib;
+    ++ stdenv.lib.optional doCheck guile_lib;
 
   doCheck = true;
 
diff --git a/pkgs/development/guile-modules/guile-gnome/default.nix b/pkgs/development/guile-modules/guile-gnome/default.nix
index 40074e743b16..b6a7a43297c7 100644
--- a/pkgs/development/guile-modules/guile-gnome/default.nix
+++ b/pkgs/development/guile-modules/guile-gnome/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, stdenv, guile, guileLib, gwrap
+{ fetchurl, stdenv, guile, guile_lib, gwrap
 , pkgconfig, gconf, glib, gnomevfs, gtk
 , libglade, libgnome, libgnomecanvas, libgnomeui, pango, guileCairo }:
 
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
       pkgconfig gconf glib gnomevfs gtk libglade libgnome libgnomecanvas
       libgnomeui pango guileCairo
     ]
-    ++ stdenv.lib.optional doCheck guileLib;
+    ++ stdenv.lib.optional doCheck guile_lib;
 
   # The test suite tries to open an X display, which fails.
   doCheck = false;
diff --git a/pkgs/development/guile-modules/guile-lib/default.nix b/pkgs/development/guile-modules/guile-lib/default.nix
index f94bc747811c..eb69acdef648 100644
--- a/pkgs/development/guile-modules/guile-lib/default.nix
+++ b/pkgs/development/guile-modules/guile-lib/default.nix
@@ -1,31 +1,23 @@
 {stdenv, fetchurl, guile, texinfo}:
 
 stdenv.mkDerivation rec {
-  name = "guile-lib-0.1.6";
+  name = "guile-lib-0.1.9";
+
   src = fetchurl {
-    url = "http://download.gna.org/guile-lib/" + name + ".tar.gz";
-    sha256 = "827744c7954078f1f37e0bf70252ec70b4d60c1482a3542a49bd09723cf65d12";
+    url = "mirror://savannah/guile-lib/${name}.tar.gz";
+    sha256 = "13sc2x9x0rmfgfa69wabyhajc70yiywih9ibszjmkhxcm2zx0gan";
   };
 
   buildInputs = [guile texinfo];
 
-  postInstall = ''
-    # Remove modules already provided by Guile.
-    if "${guile}/bin/guile" -c '(use-modules (srfi srfi-34))'
-    then
-	rm -f "$out/share/guile/site/srfi/srfi-34.scm"
-    fi
-    if "${guile}/bin/guile" -c '(use-modules (srfi srfi-35))'
-    then
-	rm -f "$out/share/guile/site/srfi/srfi-35.scm"
-    fi
-  '';
-
   doCheck = true;
 
   meta = {
     description = "Guile-Library, a collection of useful Guile Scheme modules";
-    homepage = http://home.gna.org/guile-lib/;
-    license = "GPL";
+    homepage = http://www.nongnu.org/guile-lib/;
+    license = "GPLv3+";
+
+    maintainers = [ stdenv.lib.maintainers.ludo ];
+    platforms = stdenv.lib.platforms.gnu;  # arbitrary choice
   };
 }
diff --git a/pkgs/development/interpreters/guile/1.9.nix b/pkgs/development/interpreters/guile/1.9.nix
index 1e029c28dc44..97650c554ce9 100644
--- a/pkgs/development/interpreters/guile/1.9.nix
+++ b/pkgs/development/interpreters/guile/1.9.nix
@@ -7,11 +7,11 @@
  else stdenv.mkDerivation)
 
 rec {
-  name = "guile-1.9.11";  # This is a beta release!
+  name = "guile-1.9.12";  # This is a beta release!
 
   src = fetchurl {
     url = "ftp://alpha.gnu.org/gnu/guile/${name}.tar.gz";
-    sha256 = "13wff9944brzhi2afs4pzwndqcwhi4gg61qwahycr1d72v0wzmjp";
+    sha256 = "098p940fs6jmjpdp4jb2wjqrr0l2cgf8yhy3nf9s444pxwlyvn2g";
   };
 
   buildInputs =
diff --git a/pkgs/development/interpreters/lua-5/default.nix b/pkgs/development/interpreters/lua-5/default.nix
index c1651e806b2c..19a5599347ff 100644
--- a/pkgs/development/interpreters/lua-5/default.nix
+++ b/pkgs/development/interpreters/lua-5/default.nix
@@ -8,14 +8,7 @@ stdenv.mkDerivation {
     sha256 = "0fmgk100ficm1jbm4ga9xy484v4cm89wsdfckdybb9gjx8jy4f5h";
   };
 
-  # Disabled: -fPIC cannot be passed this way, because setting CFLAGS
-  #           breaks lua's internal mechanism for passing flags from the
-  #           top-level Makefile to src/Makefile. The desired effect
-  #           could probably be achieved by modifying the Makefile with
-  #           sed(1), etc. I didn't add that, though, because it's not
-  #           clear to me why -fPIC is required in the first place.
-  #
-  # makeFlags = "CFLAGS=-fPIC";
+  NIX_CFLAGS_COMPILE = "-fPIC";
   buildFlags = if stdenv.isLinux then "linux" else
 	       if stdenv.isDarwin then "macosx" else
 	       if stdenv.isFreeBSD then "freebsd" else
@@ -30,6 +23,15 @@ stdenv.mkDerivation {
   '';
   buildInputs = [ ncurses readline ];
 
+  crossAttrs = {
+    preBuild = ''
+      sed -i -e "s/ gcc/$crossConfig-gcc/" \
+        -e "s/ ar/$crossConfig-ar/" \
+        -e "s/ ranlib/$crossConfig-ranlib/" \
+        src/Makefile
+    '';
+  };
+
   meta = {
     homepage = "http://www.lua.org";
     description = "Lua is a powerful, fast, lightweight, embeddable scripting language.";
diff --git a/pkgs/development/interpreters/ruby/default.nix b/pkgs/development/interpreters/ruby/default.nix
index 43d0915c1f02..12f4759f85d8 100644
--- a/pkgs/development/interpreters/ruby/default.nix
+++ b/pkgs/development/interpreters/ruby/default.nix
@@ -1,27 +1,35 @@
-{ stdenv, fetchurl, ncurses, readline
-, zlib ? null
-, openssl ? null
-, gdbm ? null
+{ stdenv, fetchurl
+, zlib, zlibSupport ? true
+, openssl, opensslSupport ? true
+, gdbm, gdbmSupport ? true
+, ncurses, readline, cursesSupport ? false
+, groff, docSupport ? false
 }:
 
+let
+  op = stdenv.lib.optional;
+  ops = stdenv.lib.optionals;
+in
+
 stdenv.mkDerivation rec {
-  version = "1.8.7-p299";
+  version = "1.8.7-p302";
   
   name = "ruby-${version}";
   
   src = fetchurl {
     url = "ftp://ftp.ruby-lang.org/pub/ruby/1.8/${name}.tar.gz";
-    sha256 = "0ys2lpri2w3174axhi96vq17lrvk2ngj7f2m42a9008a7n79rj9j";
+    sha256 = "18a4w0n1n0sij7gkb3196dnqav5zr0c5p26f08k7cw6y0i9dz0sq";
   };
 
-  buildInputs = [ncurses readline]
-    ++ (stdenv.lib.optional (zlib != null) zlib)
-    ++ (stdenv.lib.optional (openssl != null) openssl)
-    ++ (stdenv.lib.optional (gdbm != null) gdbm);
+  buildInputs = (ops cursesSupport [ ncurses readline ] )
+    ++ (op docSupport groff )
+    ++ (op zlibSupport zlib)
+    ++ (op opensslSupport openssl)
+    ++ (op gdbmSupport gdbm);
     
   configureFlags = ["--enable-shared" "--enable-pthread"];
 
-  # NIX_LDFLAGS = "-lpthread -lutil";
+  installFlags = stdenv.lib.optionalString docSupport "install-doc";
 
   meta = {
     license = "Ruby";
diff --git a/pkgs/development/interpreters/ruby/gem_nix_command.patch b/pkgs/development/interpreters/ruby/gem_nix_command.patch
index 4a751ab9828a..988949608401 100644
--- a/pkgs/development/interpreters/ruby/gem_nix_command.patch
+++ b/pkgs/development/interpreters/ruby/gem_nix_command.patch
@@ -16,7 +16,7 @@ new file mode 100644
 index 0000000..24f3479
 --- /dev/null
 +++ b/lib/rubygems/commands/nix_command.rb
-@@ -0,0 +1,229 @@
+@@ -0,0 +1,228 @@
 +require 'net/http'
 +require 'rubygems/command'
 +require 'rubygems/doc_manager'
@@ -39,9 +39,9 @@ index 0000000..24f3479
 +  desc_from_spec = spec.description
 +  desc = desc_from_spec.sub(/[.].*/,'') # only keep first sentence
 +  desc = desc.length > 120 \
-+    ? "description = \"#{ desc[0..120] }\"; # cut to 120 chars" \
-+    : "description = \"#{ desc }\";"
-+  desc = desc.sub(/";$/,"[...]\";") if desc != desc_from_spec
++    ? "description = ''#{ desc[0..120] }''; # cut to 120 chars" \
++    : "description = ''#{ desc }'';"
++  desc = desc.sub(/'';$/,"[...]'';") if desc != desc_from_spec
 +  desc.gsub("\n"," ") # no \ns in description
 +end
 +
@@ -103,12 +103,12 @@ index 0000000..24f3479
 +          raise Gem::CommandLineError, "could'nt parse arg. expected: name or name-version"
 +        end
 +
-+        puts "adding #{gem_name}\n"
++        warn "adding #{gem_name}\n"
 +
 +        adddep(Gem::Dependency.new gem_name, version)
 +      }
 +
-+      print " total: #{@gems_with_deps.length}\n"
++      warn " total: #{@gems_with_deps.length}"
 +
 +
 +      out = "
@@ -139,8 +139,7 @@ index 0000000..24f3479
 +
 +         #raise Gem::DependencyError("src_url is nil, 302 redirection failed?") if src_url.nil?
 +
-+         out = "
-+         #{out}
++         out += "
 +  #{nixname spec} = rubyDerivation {
 +     name = \"ruby-#{spec.full_name}\"; # full_name
 +     nameNoVersion = \"#{nixname spec.name}\";
@@ -153,14 +152,14 @@ index 0000000..24f3479
 +       homepage = \"#{spec.homepage}\";
 +       license = [#{spec.licenses.map{|l| "\"#{l}\""}.join(" ") }]; # one of ?
 +       #{nixdescription spec}
-+       longDescription = \"#{ spec.description }\";
++       longDescription = ''#{ spec.description }'';
 +     };
 +  };\n"
 +      }
 +
-+      out = "#{out}\n# aliases\n"
++      out += "\n# aliases\n"
 +      aliases.each { |key, spec |
-+        out = "#{out}#{nixname key}=#{nixname spec};\n"
++        out += "#{nixname key}=#{nixname spec};\n"
 +      }
 +
 +      print out
@@ -187,7 +186,7 @@ index 0000000..24f3479
 +    # development deps can't be found. Some are old. Thus only add rutime dependencies
 +    deps = gem[0].dependencies.find_all { |d| d.type == :runtime }
 +
-+    print " total deps of #{full_name}: #{deps.length}\n"
++    warn " total deps of #{full_name}: #{deps.length}"
 +
 +    dep_specs = []
 +    # recurse while collecting deps
diff --git a/pkgs/development/interpreters/ruby/gems.nix b/pkgs/development/interpreters/ruby/gems.nix
index cf8232d5ffe2..d979fbe2d196 100644
--- a/pkgs/development/interpreters/ruby/gems.nix
+++ b/pkgs/development/interpreters/ruby/gems.nix
@@ -4,10 +4,10 @@ rec {
   # some packages (eg ruby-debug) still require 1.8. So let's stick to that for
   # now if nobody has different requirements
 
-  version = "1.3.5";
+  version = "1.3.7";
   src = fetchurl {
-    url = "http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz";
-    sha256 = "1b26fn9kmyd6394m1gqppi10xyf1hac85lvsynsxzpjlmv0qr4n0";
+    url = "http://production.cf.rubygems.org/rubygems/${name}.tgz";
+    sha256 = "17bwlqxqrjrial111rn395yjx9wyxrmvmj0hgd85bxkkcap912rq";
   };
 
 
diff --git a/pkgs/development/interpreters/ruby/libs.nix b/pkgs/development/interpreters/ruby/libs.nix
index 7f128c4322cf..9bd5bbaf0960 100644
--- a/pkgs/development/interpreters/ruby/libs.nix
+++ b/pkgs/development/interpreters/ruby/libs.nix
@@ -35,6 +35,11 @@ let libs =
       sup = {
         buildInputs = [ pkgs.ncurses pkgs.xapianBindings libs.ncursesw ];
       };
+      sqlite3_ruby = { propagatedBuildInputs = [ pkgs.sqlite ]; };
+      rails = {
+        gemFlags = "--no-ri --no-rdoc";
+        propagatedBuildInputs = [ libs.mime_types libs.rake ];
+      };
       ncurses = { buildInputs = [ pkgs.ncurses ]; };
       ncursesw = { buildInputs = [ pkgs.ncurses ]; };
       nokogiri = {
@@ -42,38 +47,20 @@ let libs =
                     "--with-xslt-dir=${pkgs.libxslt}" ];
       };
 
-      gemcutter = {
-        propagatedBuildInputs = [ libs.rubygems_update ];
-      };
-
       ffi = {
         postUnpack = "onetuh";
-        propagatedBuildInputs = [ libs.rake  libs.rubygems_update ];
+        propagatedBuildInputs = [ libs.rake ];
         buildFlags=["--with-ffi-dir=${pkgs.libffi}"];
         NIX_POST_EXTRACT_FILES_HOOK = patchUsrBinEnv;
       };
 
-      rake = {
-        propagatedBuildInputs = [ libs.rubygems_update ];
-      };
- 
-      rubygems_update = {
-        # gems is using --env-shebang by default
-        # replace env lines by $out/../bin/env
-        postInstall = ''
-          cd $out/gems/*;
-          patch -p 1 < ${./gem_nix_command.patch}; echo
-          find $out -type f -name "*.rb" | xargs sed -i "s@/usr/bin/env@$(type -p env)@g"
-        '';
-      };
-
       xrefresh_server =
       let patch = fetchurl {
           url = "http://mawercer.de/~nix/xrefresh.diff.gz";
           sha256 = "1f7bnmn1pgkmkml0ms15m5lx880hq2sxy7vsddb3sbzm7n1yyicq";
         };
       in {
-        propagatedBuildInputs = [ libs.rb_inotify libs.rubygems_update ];
+        propagatedBuildInputs = [ libs.rb_inotify ];
 
         # monitor implementation for Linux
         postInstall = ''
@@ -100,7 +87,7 @@ let libs =
               ensureDir "$out/nix-support"
               export HOME=$TMP/home; mkdir "$HOME"
 
-              gem install --ignore-dependencies --env-shebang -E -i "$out" "$src" -- $buildFlags
+              gem install -V --ignore-dependencies -E -i "$out" "$src" $gemFlags -- $buildFlags
               rm -fr $out/cache # don't keep the .gem file here
 
               THIS_RUBY_LIB=$(echo $out/gems/*/lib)
@@ -110,7 +97,9 @@ let libs =
                 declare -A RUBYLIB_HASH # using bash4 hashs
                 declare -A GEM_PATH_HASH # using bash4 hashs
 
-                RUBYLIB_HASH["$THIS_RUBY_LIB"]=
+                if [ -n "$THIS_RUBY_LIB" ]; then
+                  RUBYLIB_HASH["$THIS_RUBY_LIB"]=
+                fi
                 for path in \''${!RUBYLIB_HASH[@]}; do
                   export RUBYLIB=\''${RUBYLIB}\''${RUBYLIB:+:}\$path
                 done
@@ -141,7 +130,6 @@ let libs =
                 chmod +x "$t"
               done
 
-
               runHook postInstall
             '';
 
@@ -154,23 +142,40 @@ let libs =
   rec {
 
   # ================ START automatically generated code ================
+
          # WARNING: automatically generated CODE
-         # This section has been generated by gem nix sup chronic rubygems-update xrefresh-server rb-inotify jeweler ncursesw
+         # This section has been generated by gem nix sup chronic rubygems-update xrefresh-server rb-inotify jeweler ncursesw sqlite3-ruby rails haml bundler rake rails3-generators enumerated_attribute haml-rails jquery-rails
          # the gem nix command has been added by a nix patch to ruby gems
       
-  json_pure_1_2_4 = rubyDerivation {
-     name = "ruby-json_pure-1.2.4"; # full_name
-     nameNoVersion = "json_pure";
+  rails3_generators_0_13_0 = rubyDerivation {
+     name = "ruby-rails3-generators-0.13.0"; # full_name
+     nameNoVersion = "rails3_generators";
      propagatedBuildInputs = [  ];
      src = fetchurl {
-       url = "http://gems.rubyforge.org/gems/json_pure-1.2.4.gem";
-       sha256 = "1j3lwa20659qb5rvsnzxd6qlr0m56fyppgdhxc7v4phdsw3im4bp";
+       url = "http://gems.rubyforge.org/gems/rails3-generators-0.13.0.gem";
+       sha256 = "0g7qylily8dkllyy201kgyczm303dmg5r64zy49isccq63iq6k3c";
      };
      meta = {
-       homepage = "http://flori.github.com/json";
+       homepage = "http://github.com/indirect/rails3-generators";
+       license = []; # one of ?
+       description = ''Rails 3 compatible generators for DataMapper, Factory-girl, Authlogic, Mongomapper, Mongoid, Shoulda, Formtastic and Simp''; # cut to 120 chars
+       longDescription = ''Rails 3 compatible generators for DataMapper, Factory-girl, Authlogic, Mongomapper, Mongoid, Shoulda, Formtastic and SimpleForm'';
+     };
+  };
+
+  builder_2_1_2 = rubyDerivation {
+     name = "ruby-builder-2.1.2"; # full_name
+     nameNoVersion = "builder";
+     propagatedBuildInputs = [  ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/builder-2.1.2.gem";
+       sha256 = "0hp5gsvp63mqqvi7dl95zwci916vj6l1slgz4crip1rijk3v2806";
+     };
+     meta = {
+       homepage = "http://onestepback.org";
        license = []; # one of ?
-       description = "This is a JSON implementation in pure Ruby[...]";
-       longDescription = "This is a JSON implementation in pure Ruby.";
+       description = ''Builder provides a number of builder objects that make creating structured data simple to do[...]'';
+       longDescription = ''Builder provides a number of builder objects that make creating structured data simple to do.  Currently the following builder objects are supported:  * XML Markup * XML Events'';
      };
   };
 
@@ -185,86 +190,202 @@ let libs =
      meta = {
        homepage = "http://rake.rubyforge.org";
        license = []; # one of ?
-       description = "Rake is a Make-like program implemented in Ruby[...]";
-       longDescription = "Rake is a Make-like program implemented in Ruby. Tasks and dependencies are specified in standard Ruby syntax.";
+       description = ''Rake is a Make-like program implemented in Ruby[...]'';
+       longDescription = ''Rake is a Make-like program implemented in Ruby. Tasks and dependencies are specified in standard Ruby syntax.'';
      };
   };
 
-  git_1_2_5 = rubyDerivation {
-     name = "ruby-git-1.2.5"; # full_name
-     nameNoVersion = "git";
-     propagatedBuildInputs = [  ];
+  haml_rails_0_2 = rubyDerivation {
+     name = "ruby-haml-rails-0.2"; # full_name
+     nameNoVersion = "haml_rails";
+     propagatedBuildInputs = [   ];
      src = fetchurl {
-       url = "http://gems.rubyforge.org/gems/git-1.2.5.gem";
-       sha256 = "19dy8sakv4x7pnvjddqjyd4j74cji14wikhz95iaqqrc9n4z43hk";
+       url = "http://gems.rubyforge.org/gems/haml-rails-0.2.gem";
+       sha256 = "132lfx6vqiphbbhxfzss5qny92yzfbpyj0qk7dn3q5y7irvp5wha";
      };
      meta = {
-       homepage = "http://github.com/schacon/ruby-git";
+       homepage = "http://github.com/indirect/haml-rails";
        license = []; # one of ?
-       description = "[...]";
-       longDescription = "";
+       description = ''Haml-rails provides Haml generators for Rails 3[...]'';
+       longDescription = ''Haml-rails provides Haml generators for Rails 3. It also enables Haml as the templating engine for you, so you don't have to screw around in your own application.rb when your Gemfile already clearly indicated what templating engine you have installed. Hurrah.'';
      };
   };
 
-  json_1_2_4 = rubyDerivation {
-     name = "ruby-json-1.2.4"; # full_name
-     nameNoVersion = "json";
+  meta_programming_0_2_2 = rubyDerivation {
+     name = "ruby-meta_programming-0.2.2"; # full_name
+     nameNoVersion = "meta_programming";
      propagatedBuildInputs = [  ];
      src = fetchurl {
-       url = "http://gems.rubyforge.org/gems/json-1.2.4.gem";
-       sha256 = "1wdj91bl7xabgkwpz285b8086v5898x72h4lxl11n750652mrrax";
+       url = "http://gems.rubyforge.org/gems/meta_programming-0.2.2.gem";
+       sha256 = "0k32z7ndfpravrz3hihg96x3wcdfrzsdj2pg48zkcb3gb428f2av";
      };
      meta = {
-       homepage = "http://flori.github.com/json";
+       homepage = "http://github.com/jeffp/meta_programming/tree/master";
        license = []; # one of ?
-       description = "This is a JSON implementation as a Ruby extension in C[...]";
-       longDescription = "This is a JSON implementation as a Ruby extension in C.";
+       description = ''Collection of meta-programming methods for Ruby[...]'';
+       longDescription = ''Collection of meta-programming methods for Ruby'';
      };
   };
 
-  rubygems_update_1_3_6 = rubyDerivation {
-     name = "ruby-rubygems-update-1.3.6"; # full_name
-     nameNoVersion = "rubygems_update";
+  haml_3_0_18 = rubyDerivation {
+     name = "ruby-haml-3.0.18"; # full_name
+     nameNoVersion = "haml";
      propagatedBuildInputs = [  ];
      src = fetchurl {
-       url = "http://gems.rubyforge.org/gems/rubygems-update-1.3.6.gem";
-       sha256 = "1fqbm9hmy3skj9s98v8k0qghdmli7kv84wlm0m4grsrdn26xw14l";
+       url = "http://gems.rubyforge.org/gems/haml-3.0.18.gem";
+       sha256 = "1bi951vk6fkxcc4dakwmcgbqf72zhr5bna9p8a4q4ajn3arvnq7y";
      };
      meta = {
-       homepage = "http://rubygems.org/";
+       homepage = "http://haml-lang.com/";
        license = []; # one of ?
-       description = "RubyGems is a package management framework for Ruby  This gem is an update for the RubyGems software. You must have an in"; # cut to 120 chars
-       longDescription = "RubyGems is a package management framework for Ruby.
-
-This gem is an update for the RubyGems software. You must have an
-installation of RubyGems before this update can be applied.
-
-See Gem for information on RubyGems (or `ri Gem`)
+       description = ''      Haml (HTML Abstraction Markup Language) is a layer on top of XHTML or XML       that's designed to express the stru''; # cut to 120 chars
+       longDescription = ''      Haml (HTML Abstraction Markup Language) is a layer on top of XHTML or XML
+      that's designed to express the structure of XHTML or XML documents
+      in a non-repetitive, elegant, easy way,
+      using indentation rather than closing tags
+      and allowing Ruby to be embedded with ease.
+      It was originally envisioned as a plugin for Ruby on Rails,
+      but it can function as a stand-alone templating engine.
+'';
+     };
+  };
 
-To upgrade to the latest RubyGems, run:
+  polyglot_0_3_1 = rubyDerivation {
+     name = "ruby-polyglot-0.3.1"; # full_name
+     nameNoVersion = "polyglot";
+     propagatedBuildInputs = [  ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/polyglot-0.3.1.gem";
+       sha256 = "1shk5hqnz7hg14y2ms16mcwd2p546wq57pci5m26qg64m28gz4xg";
+     };
+     meta = {
+       homepage = "http://polyglot.rubyforge.org";
+       license = []; # one of ?
+       description = ''Allows custom language loaders for specified file extensions to be hooked into require[...]'';
+       longDescription = ''Allows custom language loaders for specified file extensions to be hooked into require'';
+     };
+  };
 
-  $ gem update --system  # you might need to be an administrator or root
+  arel_1_0_1 = rubyDerivation {
+     name = "ruby-arel-1.0.1"; # full_name
+     nameNoVersion = "arel";
+     propagatedBuildInputs = [  ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/arel-1.0.1.gem";
+       sha256 = "117j8z0clq8001jqk4aajq3whxzn5fan4ivdsbjvcdba2wfhd7z0";
+     };
+     meta = {
+       homepage = "http://github.com/brynary/arel";
+       license = []; # one of ?
+       description = ''Arel is a Relational Algebra for Ruby of SQL queries and it 2) adapts to various RDBMS systems. It is intended to be a fr''; # cut to 120 chars
+       longDescription = ''Arel is a Relational Algebra for Ruby. It 1) simplifies the generation complex
+of SQL queries and it 2) adapts to various RDBMS systems. It is intended to be
+a framework framework; that is, you can build your own ORM with it, focusing on
+innovative object and collection modeling as opposed to database compatibility
+and query generation.'';
+     };
+  };
 
-NOTE:  RubyGems 1.1 and 1.2 have problems upgrading when there is no
-rubygems-update installed.  You will need to use the following instructions
-if you see \"Nothing to update\".
+  abstract_1_0_0 = rubyDerivation {
+     name = "ruby-abstract-1.0.0"; # full_name
+     nameNoVersion = "abstract";
+     propagatedBuildInputs = [  ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/abstract-1.0.0.gem";
+       sha256 = "1gizb9kzwf3c6xip7fwa818b98c72x4jlhbm808s5pwdjbqw3h9k";
+     };
+     meta = {
+       homepage = "http://rubyforge.org/projects/abstract";
+       license = []; # one of ?
+       description = '''abstract[...]'';
+       longDescription = '''abstract.rb' is a library which enable you to define abstract method in Ruby.'';
+     };
+  };
 
-If you have an older version of RubyGems installed, then you can still
-do it in two steps:
+  sqlite3_ruby_1_3_1 = rubyDerivation {
+     name = "ruby-sqlite3-ruby-1.3.1"; # full_name
+     nameNoVersion = "sqlite3_ruby";
+     propagatedBuildInputs = [  ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/sqlite3-ruby-1.3.1.gem";
+       sha256 = "17ci8jgnzda091my53x0qnapy673fx55fd1agf5xdkylzwb00v9q";
+     };
+     meta = {
+       homepage = "http://github.com/luislavena/sqlite3-ruby";
+       license = []; # one of ?
+       description = ''This module allows Ruby programs to interface with the SQLite3 database engine (http://www SQLite engine installed in ord''; # cut to 120 chars
+       longDescription = ''This module allows Ruby programs to interface with the SQLite3
+database engine (http://www.sqlite.org).  You must have the
+SQLite engine installed in order to build this module.
 
-  $ gem install rubygems-update  # again, might need to be admin/root
-  $ update_rubygems              # ... here too
+Note that this module is NOT compatible with SQLite 2.x.'';
+     };
+  };
 
-If you don't have any RubyGems install, there is still the pre-gem approach to
-getting software, doing it manually:
+  git_1_2_5 = rubyDerivation {
+     name = "ruby-git-1.2.5"; # full_name
+     nameNoVersion = "git";
+     propagatedBuildInputs = [  ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/git-1.2.5.gem";
+       sha256 = "19dy8sakv4x7pnvjddqjyd4j74cji14wikhz95iaqqrc9n4z43hk";
+     };
+     meta = {
+       homepage = "http://github.com/schacon/ruby-git";
+       license = []; # one of ?
+       description = ''[...]'';
+       longDescription = '''';
+     };
+  };
 
-1. Download from: http://rubyforge.org/frs/?group_id=126
-2. Unpack into a directory and cd there
-3. Install with: ruby setup.rb  # you may need admin/root privilege
+  rails_3_0_0 = rubyDerivation {
+     name = "ruby-rails-3.0.0"; # full_name
+     nameNoVersion = "rails";
+     propagatedBuildInputs = [ activesupport_3_0_0 actionpack_3_0_0 activerecord_3_0_0 activeresource_3_0_0 actionmailer_3_0_0 railties_3_0_0 bundler_1_0_0 ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/rails-3.0.0.gem";
+       sha256 = "1zjyijz5814vv1l5j4si66fcvf17jkfh6336mr4xh9vx0wa2r6js";
+     };
+     meta = {
+       homepage = "http://www.rubyonrails.org";
+       license = []; # one of ?
+       description = ''Ruby on Rails is a full-stack web framework optimized for programmer happiness and sustainable productivity[...]'';
+       longDescription = ''Ruby on Rails is a full-stack web framework optimized for programmer happiness and sustainable productivity. It encourages beautiful code by favoring convention over configuration.'';
+     };
+  };
 
-For more details and other options, see:
+  treetop_1_4_8 = rubyDerivation {
+     name = "ruby-treetop-1.4.8"; # full_name
+     nameNoVersion = "treetop";
+     propagatedBuildInputs = [ polyglot_0_3_1 ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/treetop-1.4.8.gem";
+       sha256 = "10cg8dp4ljm6gfsdx9x20kk5c2vrmw5y25dfsy7s0pxn60f3s6qg";
+     };
+     meta = {
+       homepage = "http://functionalform.blogspot.com";
+       license = []; # one of ?
+       description = ''[...]'';
+       longDescription = '''';
+     };
+  };
 
-  ruby setup.rb --help";
+  rack_test_0_5_4 = rubyDerivation {
+     name = "ruby-rack-test-0.5.4"; # full_name
+     nameNoVersion = "rack_test";
+     propagatedBuildInputs = [  ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/rack-test-0.5.4.gem";
+       sha256 = "0afkvjq45v61j2y3k9dfi4r6fnj26b4ky1ggn7sdk5asq7v6dmzx";
+     };
+     meta = {
+       homepage = "http://github.com/brynary/rack-test";
+       license = []; # one of ?
+       description = ''Rack::Test is a small, simple testing API for Rack apps own or as a reusable starting point for Web frameworks and testin''; # cut to 120 chars
+       longDescription = ''Rack::Test is a small, simple testing API for Rack apps. It can be used on its
+own or as a reusable starting point for Web frameworks and testing libraries
+to build on. Most of its initial functionality is an extraction of Merb 1.0's
+request helpers feature.'';
      };
   };
 
@@ -279,8 +400,8 @@ For more details and other options, see:
      meta = {
        homepage = "	http://chronic.rubyforge.org/";
        license = []; # one of ?
-       description = "Chronic is a natural language date/time parser written in pure Ruby[...]";
-       longDescription = "Chronic is a natural language date/time parser written in pure Ruby. See below for the wide variety of formats Chronic will parse.";
+       description = ''Chronic is a natural language date/time parser written in pure Ruby[...]'';
+       longDescription = ''Chronic is a natural language date/time parser written in pure Ruby. See below for the wide variety of formats Chronic will parse.'';
      };
   };
 
@@ -295,8 +416,8 @@ For more details and other options, see:
      meta = {
        homepage = "http://ncurses-ruby.berlios.de/";
        license = []; # one of ?
-       description = "[...]";
-       longDescription = "";
+       description = ''[...]'';
+       longDescription = '''';
      };
   };
 
@@ -311,8 +432,40 @@ For more details and other options, see:
      meta = {
        homepage = "";
        license = []; # one of ?
-       description = "Xapian bindings for Ruby without dependency on system Xapian library[...]";
-       longDescription = "Xapian bindings for Ruby without dependency on system Xapian library";
+       description = ''Xapian bindings for Ruby without dependency on system Xapian library[...]'';
+       longDescription = ''Xapian bindings for Ruby without dependency on system Xapian library'';
+     };
+  };
+
+  i18n_0_4_1 = rubyDerivation {
+     name = "ruby-i18n-0.4.1"; # full_name
+     nameNoVersion = "i18n";
+     propagatedBuildInputs = [  ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/i18n-0.4.1.gem";
+       sha256 = "0haw8102610j2vydr52y64w2dqav6amda0ddwy6vp09rr6prazkq";
+     };
+     meta = {
+       homepage = "http://github.com/svenfuchs/i18n";
+       license = []; # one of ?
+       description = ''New wave Internationalization support for Ruby[...]'';
+       longDescription = ''New wave Internationalization support for Ruby.'';
+     };
+  };
+
+  ncursesw_1_2_4_1 = rubyDerivation {
+     name = "ruby-ncursesw-1.2.4.1"; # full_name
+     nameNoVersion = "ncursesw";
+     propagatedBuildInputs = [  ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/ncursesw-1.2.4.1.gem";
+       sha256 = "0cn13h14pk8yds8aklpdcpzl0z6rqifpmaz4lw29g10lgwvfv409";
+     };
+     meta = {
+       homepage = "http://ncurses-ruby.berlios.de/";
+       license = []; # one of ?
+       description = ''Hacked up version of ncurses gem that supports wide characters and ruby1[...]'';
+       longDescription = ''Hacked up version of ncurses gem that supports wide characters and ruby1.9.1. Original ncurses gem by t-peters@users.berlios.de.'';
      };
   };
 
@@ -327,12 +480,12 @@ For more details and other options, see:
      meta = {
        homepage = "http://wiki.github.com/ffi/ffi";
        license = []; # one of ?
-       description = "Ruby-FFI is a ruby extension for programmatically loading dynamic libraries, binding functions within them, and calling t"; # cut to 120 chars
-       longDescription = "Ruby-FFI is a ruby extension for programmatically loading dynamic
+       description = ''Ruby-FFI is a ruby extension for programmatically loading dynamic libraries, binding functions within them, and calling t''; # cut to 120 chars
+       longDescription = ''Ruby-FFI is a ruby extension for programmatically loading dynamic
 libraries, binding functions within them, and calling those functions
 from Ruby code. Moreover, a Ruby-FFI extension works without changes
 on Ruby and JRuby. Discover why should you write your next extension
-using Ruby-FFI here[http://wiki.github.com/ffi/ffi/why-use-ffi].";
+using Ruby-FFI here[http://wiki.github.com/ffi/ffi/why-use-ffi].'';
      };
   };
 
@@ -347,8 +500,54 @@ using Ruby-FFI here[http://wiki.github.com/ffi/ffi/why-use-ffi].";
      meta = {
        homepage = "http://flori.github.com/term-ansicolor";
        license = []; # one of ?
-       description = "[...]";
-       longDescription = "";
+       description = ''[...]'';
+       longDescription = '''';
+     };
+  };
+
+  rubygems_update_1_3_7 = rubyDerivation {
+     name = "ruby-rubygems-update-1.3.7"; # full_name
+     nameNoVersion = "rubygems_update";
+     propagatedBuildInputs = [  ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/rubygems-update-1.3.7.gem";
+       sha256 = "0378s1nvxmmwrl8l7yx9xglm5ks1lsdjr0ms3wx127q5hm07szdg";
+     };
+     meta = {
+       homepage = "http://rubygems.org/";
+       license = []; # one of ?
+       description = ''RubyGems is a package management framework for Ruby  This gem is an update for the RubyGems software. You must have an in''; # cut to 120 chars
+       longDescription = ''RubyGems is a package management framework for Ruby.
+
+This gem is an update for the RubyGems software. You must have an
+installation of RubyGems before this update can be applied.
+
+See Gem for information on RubyGems (or `ri Gem`)
+
+To upgrade to the latest RubyGems, run:
+
+  $ gem update --system  # you might need to be an administrator or root
+
+NOTE:  RubyGems 1.1 and 1.2 have problems upgrading when there is no
+rubygems-update installed.  You will need to use the following instructions
+if you see "Nothing to update".
+
+If you have an older version of RubyGems installed, then you can still
+do it in two steps:
+
+  $ gem install rubygems-update  # again, might need to be admin/root
+  $ update_rubygems              # ... here too
+
+If you don't have any RubyGems install, there is still the pre-gem approach to
+getting software, doing it manually:
+
+1. Download from: http://rubyforge.org/frs/?group_id=126
+2. Unpack into a directory and cd there
+3. Install with: ruby setup.rb  # you may need admin/root privilege
+
+For more details and other options, see:
+
+  ruby setup.rb --help'';
      };
   };
 
@@ -363,12 +562,76 @@ using Ruby-FFI here[http://wiki.github.com/ffi/ffi/why-use-ffi].";
      meta = {
        homepage = "http://trollop.rubyforge.org";
        license = []; # one of ?
-       description = "Trollop is a commandline option parser for Ruby that just gets out of your way For that, you get a nice automatically-gen"; # cut to 120 chars
-       longDescription = "Trollop is a commandline option parser for Ruby that just
+       description = ''Trollop is a commandline option parser for Ruby that just gets out of your way For that, you get a nice automatically-gen''; # cut to 120 chars
+       longDescription = ''Trollop is a commandline option parser for Ruby that just
 gets out of your way. One line of code per option is all you need to write.
 For that, you get a nice automatically-generated help page, robust option
 parsing, command subcompletion, and sensible defaults for everything you don't
-specify.";
+specify.'';
+     };
+  };
+
+  enumerated_attribute_0_2_16 = rubyDerivation {
+     name = "ruby-enumerated_attribute-0.2.16"; # full_name
+     nameNoVersion = "enumerated_attribute";
+     propagatedBuildInputs = [ meta_programming_0_2_2 ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/enumerated_attribute-0.2.16.gem";
+       sha256 = "01m9jmim5dcyayv3pznrm1y152dd4jrp2jj89m18inbn5446dzqi";
+     };
+     meta = {
+       homepage = "http://github.com/jeffp/enumerated_attribute/tree/master";
+       license = []; # one of ?
+       description = ''Enumerated model attributes and view helpers[...]'';
+       longDescription = ''Enumerated model attributes and view helpers'';
+     };
+  };
+
+  railties_3_0_0 = rubyDerivation {
+     name = "ruby-railties-3.0.0"; # full_name
+     nameNoVersion = "railties";
+     propagatedBuildInputs = [  thor_0_14_0   ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/railties-3.0.0.gem";
+       sha256 = "0zj216hvs7yjlhjk0066d5rlm1csf2rarxx6c9bpxrmabnw1rb93";
+     };
+     meta = {
+       homepage = "http://www.rubyonrails.org";
+       license = []; # one of ?
+       description = ''Rails internals: application bootup, plugins, generators, and rake tasks[...]'';
+       longDescription = ''Rails internals: application bootup, plugins, generators, and rake tasks.'';
+     };
+  };
+
+  rack_mount_0_6_13 = rubyDerivation {
+     name = "ruby-rack-mount-0.6.13"; # full_name
+     nameNoVersion = "rack_mount";
+     propagatedBuildInputs = [  ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/rack-mount-0.6.13.gem";
+       sha256 = "133dwla6hq6a75m0la7cm26d5hvlsi02vm4lvph73d6kqazry0y6";
+     };
+     meta = {
+       homepage = "http://github.com/josh/rack-mount";
+       license = []; # one of ?
+       description = ''Stackable dynamic tree based Rack router[...]'';
+       longDescription = ''Stackable dynamic tree based Rack router'';
+     };
+  };
+
+  activemodel_3_0_0 = rubyDerivation {
+     name = "ruby-activemodel-3.0.0"; # full_name
+     nameNoVersion = "activemodel";
+     propagatedBuildInputs = [  builder_2_1_2 i18n_0_4_1 ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/activemodel-3.0.0.gem";
+       sha256 = "1dp18ifh658pgdkq8fd32yw3hi99wk5in2c7pb3mjyabg4zg5mv6";
+     };
+     meta = {
+       homepage = "http://www.rubyonrails.org";
+       license = []; # one of ?
+       description = ''A toolkit for building modeling frameworks like Active Record and Active Resource[...]'';
+       longDescription = ''A toolkit for building modeling frameworks like Active Record and Active Resource. Rich support for attributes, callbacks, validations, observers, serialization, internationalization, and testing.'';
      };
   };
 
@@ -383,11 +646,11 @@ specify.";
      meta = {
        homepage = "http://gettext.rubyforge.org/";
        license = []; # one of ?
-       description = "        Ruby-GetText-Package is a GNU GetText-like program for Ruby         The catalog file(po-file) is same format with"; # cut to 120 chars
-       longDescription = "        Ruby-GetText-Package is a GNU GetText-like program for Ruby.
+       description = ''        Ruby-GetText-Package is a GNU GetText-like program for Ruby         The catalog file(po-file) is same format with''; # cut to 120 chars
+       longDescription = ''        Ruby-GetText-Package is a GNU GetText-like program for Ruby.
         The catalog file(po-file) is same format with GNU GetText.
         So you can use GNU GetText tools for maintaining.
-";
+'';
      };
   };
 
@@ -402,15 +665,107 @@ specify.";
      meta = {
        homepage = "http://codeforpeople.com/lib/ruby/lockfile/";
        license = []; # one of ?
-       description = "[...]";
-       longDescription = "";
+       description = ''[...]'';
+       longDescription = '''';
+     };
+  };
+
+  thor_0_14_0 = rubyDerivation {
+     name = "ruby-thor-0.14.0"; # full_name
+     nameNoVersion = "thor";
+     propagatedBuildInputs = [  ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/thor-0.14.0.gem";
+       sha256 = "115zxz418hmmsjk1sc2f19xzd74ap066qb7p1lh539q6zkalzrj1";
+     };
+     meta = {
+       homepage = "http://yehudakatz.com";
+       license = []; # one of ?
+       description = ''A scripting framework that replaces rake, sake and rubigen[...]'';
+       longDescription = ''A scripting framework that replaces rake, sake and rubigen'';
+     };
+  };
+
+  activerecord_3_0_0 = rubyDerivation {
+     name = "ruby-activerecord-3.0.0"; # full_name
+     nameNoVersion = "activerecord";
+     propagatedBuildInputs = [   arel_1_0_1  ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/activerecord-3.0.0.gem";
+       sha256 = "1l2662myqbay37xpssna149rgqjq0fq670f1hpagmh1nr0fziwlr";
+     };
+     meta = {
+       homepage = "http://www.rubyonrails.org";
+       license = []; # one of ?
+       description = ''Databases on Rails[...]'';
+       longDescription = ''Databases on Rails. Build a persistent domain model by mapping database tables to Ruby classes. Strong conventions for associations, validations, aggregations, migrations, and testing come baked-in.'';
+     };
+  };
+
+  actionpack_3_0_0 = rubyDerivation {
+     name = "ruby-actionpack-3.0.0"; # full_name
+     nameNoVersion = "actionpack";
+     propagatedBuildInputs = [  activemodel_3_0_0   rack_1_2_1 rack_test_0_5_4 rack_mount_0_6_13 tzinfo_0_3_23 erubis_2_6_6 ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/actionpack-3.0.0.gem";
+       sha256 = "1qjmx3alkinnfi9mdvzz3cfsfj20kf6iqvhwia167l45wqd14s7z";
+     };
+     meta = {
+       homepage = "http://www.rubyonrails.org";
+       license = []; # one of ?
+       description = ''Web apps on Rails[...]'';
+       longDescription = ''Web apps on Rails. Simple, battle-tested conventions for building and testing MVC web applications. Works with any Rack-compatible server.'';
+     };
+  };
+
+  erubis_2_6_6 = rubyDerivation {
+     name = "ruby-erubis-2.6.6"; # full_name
+     nameNoVersion = "erubis";
+     propagatedBuildInputs = [ abstract_1_0_0 ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/erubis-2.6.6.gem";
+       sha256 = "19yd2a4zb371b8vi11hv4p4s4s9yzp6924frc0ar9hv5kbw3nxvm";
+     };
+     meta = {
+       homepage = "http://www.kuwata-lab.com/erubis/";
+       license = []; # one of ?
+       description = ''  Erubis is an implementation of eRuby and has the following features:    * Very fast, almost three times faster than ERB''; # cut to 120 chars
+       longDescription = ''  Erubis is an implementation of eRuby and has the following features:
+
+  * Very fast, almost three times faster than ERB and about 10% faster than eruby.
+  * Multi-language support (Ruby/PHP/C/Java/Scheme/Perl/Javascript)
+  * Auto escaping support
+  * Auto trimming spaces around '&lt;% %&gt;'
+  * Embedded pattern changeable (default '&lt;% %&gt;')
+  * Enable to handle Processing Instructions (PI) as embedded pattern (ex. '&lt;?rb ... ?&gt;')
+  * Context object available and easy to combine eRuby template with YAML datafile
+  * Print statement available
+  * Easy to extend and customize in subclass
+  * Ruby on Rails support
+'';
+     };
+  };
+
+  json_pure_1_4_6 = rubyDerivation {
+     name = "ruby-json_pure-1.4.6"; # full_name
+     nameNoVersion = "json_pure";
+     propagatedBuildInputs = [  ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/json_pure-1.4.6.gem";
+       sha256 = "0cd6a97nk8m7yqm0lxbgs63yxlnk4mhbmpgjjfzdw01n1gm95kfv";
+     };
+     meta = {
+       homepage = "http://flori.github.com/json";
+       license = []; # one of ?
+       description = ''This is a JSON implementation in pure Ruby[...]'';
+       longDescription = ''This is a JSON implementation in pure Ruby.'';
      };
   };
 
   xrefresh_server_0_3_0 = rubyDerivation {
      name = "ruby-xrefresh-server-0.3.0"; # full_name
      nameNoVersion = "xrefresh_server";
-     propagatedBuildInputs = [ json_1_2_4 term_ansicolor_1_0_5 ];
+     propagatedBuildInputs = [ json_1_4_6 term_ansicolor_1_0_5 ];
      src = fetchurl {
        url = "http://gems.rubyforge.org/gems/xrefresh-server-0.3.0.gem";
        sha256 = "1k80hadnmaxi8q8fw879xaj0ragy4bmqjqm7zjkv9bq8njb3i0c5";
@@ -418,47 +773,70 @@ specify.";
      meta = {
        homepage = "http://github.com/darwin/xrefresh-server";
        license = []; # one of ?
-       description = "XRefresh is browser refresh automation for web developers[...]";
-       longDescription = "XRefresh is browser refresh automation for web developers";
+       description = ''XRefresh is browser refresh automation for web developers[...]'';
+       longDescription = ''XRefresh is browser refresh automation for web developers'';
      };
   };
 
-  net_ssh_2_0_21 = rubyDerivation {
-     name = "ruby-net-ssh-2.0.21"; # full_name
-     nameNoVersion = "net_ssh";
+  bundler_1_0_0 = rubyDerivation {
+     name = "ruby-bundler-1.0.0"; # full_name
+     nameNoVersion = "bundler";
      propagatedBuildInputs = [  ];
      src = fetchurl {
-       url = "http://gems.rubyforge.org/gems/net-ssh-2.0.21.gem";
-       sha256 = "0wjfv68gn297vhb0r9qhlij9p7qnkn4afav0nylr6avrsd8mgdc4";
+       url = "http://gems.rubyforge.org/gems/bundler-1.0.0.gem";
+       sha256 = "0x1gsm8gqfa3czndm3v0b8v5sh08wjz1cr7xi383ipmnziimaq30";
      };
      meta = {
-       homepage = "http://github.com/net-ssh/net-ssh";
+       homepage = "http://gembundler.com";
        license = []; # one of ?
-       description = "Net::SSH: a pure-Ruby implementation of the SSH2 client protocol[...]";
-       longDescription = "Net::SSH: a pure-Ruby implementation of the SSH2 client protocol.";
+       description = ''Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatabl''; # cut to 120 chars
+       longDescription = ''Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably'';
      };
   };
 
-  gemcutter_0_5_0 = rubyDerivation {
-     name = "ruby-gemcutter-0.5.0"; # full_name
-     nameNoVersion = "gemcutter";
+  actionmailer_3_0_0 = rubyDerivation {
+     name = "ruby-actionmailer-3.0.0"; # full_name
+     nameNoVersion = "actionmailer";
+     propagatedBuildInputs = [  mail_2_2_5 ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/actionmailer-3.0.0.gem";
+       sha256 = "15a7ikp7b76mlnrd78cprm6p7qj2vf1zj6x8an0zwnpxy95fqn3q";
+     };
+     meta = {
+       homepage = "http://www.rubyonrails.org";
+       license = []; # one of ?
+       description = ''Email on Rails[...]'';
+       longDescription = ''Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.'';
+     };
+  };
+
+  rack_1_2_1 = rubyDerivation {
+     name = "ruby-rack-1.2.1"; # full_name
+     nameNoVersion = "rack";
      propagatedBuildInputs = [  ];
      src = fetchurl {
-       url = "http://gems.rubyforge.org/gems/gemcutter-0.5.0.gem";
-       sha256 = "16pf64d0mj320llars6x1zl0vhv2x8vh7pwgqj0k48pyh5426iim";
+       url = "http://gems.rubyforge.org/gems/rack-1.2.1.gem";
+       sha256 = "0bwsfiprvnwxgwwbr2cwv3aca5d707bfcm2zff4d0nsnbfgll0bj";
      };
      meta = {
-       homepage = "http://rubygems.org";
+       homepage = "http://rack.rubyforge.org";
        license = []; # one of ?
-       description = "Adds several commands to RubyGems for managing gems and more on RubyGems[...]";
-       longDescription = "Adds several commands to RubyGems for managing gems and more on RubyGems.org.";
+       description = ''Rack provides minimal, modular and adaptable interface for developing web applications in Ruby the simplest way possible,''; # cut to 120 chars
+       longDescription = ''Rack provides minimal, modular and adaptable interface for developing
+web applications in Ruby.  By wrapping HTTP requests and responses in
+the simplest way possible, it unifies and distills the API for web
+servers, web frameworks, and software in between (the so-called
+middleware) into a single method call.
+
+Also see http://rack.rubyforge.org.
+'';
      };
   };
 
   rubyforge_2_0_4 = rubyDerivation {
      name = "ruby-rubyforge-2.0.4"; # full_name
      nameNoVersion = "rubyforge";
-     propagatedBuildInputs = [ json_pure_1_2_4 ];
+     propagatedBuildInputs = [ json_pure_1_4_6 ];
      src = fetchurl {
        url = "http://gems.rubyforge.org/gems/rubyforge-2.0.4.gem";
        sha256 = "1wdaa4nzy39yzy848fa1rybi72qlyf9vhi1ra9wpx9rpi810fwh1";
@@ -466,31 +844,31 @@ specify.";
      meta = {
        homepage = "http://codeforpeople.rubyforge.org/rubyforge/";
        license = []; # one of ?
-       description = "A script which automates a limited set of rubyforge operations  * Run 'rubyforge help' for complete usage. * Setup: For f"; # cut to 120 chars
-       longDescription = "A script which automates a limited set of rubyforge operations.
+       description = ''A script which automates a limited set of rubyforge operations  * Run 'rubyforge help' for complete usage. * Setup: For f''; # cut to 120 chars
+       longDescription = ''A script which automates a limited set of rubyforge operations.
 
 * Run 'rubyforge help' for complete usage.
 * Setup: For first time users AND upgrades to 0.4.0:
   * rubyforge setup (deletes your username and password, so run sparingly!)
   * edit ~/.rubyforge/user-config.yml
   * rubyforge config
-* For all rubyforge upgrades, run 'rubyforge config' to ensure you have latest.";
+* For all rubyforge upgrades, run 'rubyforge config' to ensure you have latest.'';
      };
   };
 
-  rb_inotify_0_7_1 = rubyDerivation {
-     name = "ruby-rb-inotify-0.7.1"; # full_name
-     nameNoVersion = "rb_inotify";
-     propagatedBuildInputs = [ ffi_0_6_3 ];
+  json_1_4_6 = rubyDerivation {
+     name = "ruby-json-1.4.6"; # full_name
+     nameNoVersion = "json";
+     propagatedBuildInputs = [  ];
      src = fetchurl {
-       url = "http://gems.rubyforge.org/gems/rb-inotify-0.7.1.gem";
-       sha256 = "00q2zl9361ji5z7blgipphsjvnysyw016vbb0vh6f5i5v6fz5bzh";
+       url = "http://gems.rubyforge.org/gems/json-1.4.6.gem";
+       sha256 = "1ibyw6hiclircn2f9f4kcznff4rdhcfsjxdzb4z9d9bd3ha1l96k";
      };
      meta = {
-       homepage = "http://github.com/nex3/rb-notify";
+       homepage = "http://flori.github.com/json";
        license = []; # one of ?
-       description = "A Ruby wrapper for Linux's inotify, using FFI[...]";
-       longDescription = "A Ruby wrapper for Linux's inotify, using FFI";
+       description = ''This is a JSON implementation as a Ruby extension in C[...]'';
+       longDescription = ''This is a JSON implementation as a Ruby extension in C.'';
      };
   };
 
@@ -505,9 +883,9 @@ specify.";
      meta = {
        homepage = "http://locale.rubyforge.org/";
        license = []; # one of ?
-       description = "    Ruby-Locale is the pure ruby library which provides basic APIs for localization [...]";
-       longDescription = "    Ruby-Locale is the pure ruby library which provides basic APIs for localization.
-";
+       description = ''    Ruby-Locale is the pure ruby library which provides basic APIs for localization [...]'';
+       longDescription = ''    Ruby-Locale is the pure ruby library which provides basic APIs for localization.
+'';
      };
   };
 
@@ -522,35 +900,83 @@ specify.";
      meta = {
        homepage = "http://mime-types.rubyforge.org/";
        license = []; # one of ?
-       description = "MIME::Types for Ruby originally based on and synchronized with MIME::Types for Perl by Mark Overmeer, copyright 2001 - 20"; # cut to 120 chars
-       longDescription = "MIME::Types for Ruby originally based on and synchronized with MIME::Types for Perl by Mark Overmeer, copyright 2001 - 2009. As of version 1.15, the data format for the MIME::Type list has changed and the synchronization will no longer happen.";
+       description = ''MIME::Types for Ruby originally based on and synchronized with MIME::Types for Perl by Mark Overmeer, copyright 2001 - 20''; # cut to 120 chars
+       longDescription = ''MIME::Types for Ruby originally based on and synchronized with MIME::Types for Perl by Mark Overmeer, copyright 2001 - 2009. As of version 1.15, the data format for the MIME::Type list has changed and the synchronization will no longer happen.'';
+     };
+  };
+
+  rb_inotify_0_8_1 = rubyDerivation {
+     name = "ruby-rb-inotify-0.8.1"; # full_name
+     nameNoVersion = "rb_inotify";
+     propagatedBuildInputs = [ ffi_0_6_3 ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/rb-inotify-0.8.1.gem";
+       sha256 = "1z67kvhb8g8cgvlcfsh2gqhzqjijg8x02nafmifz9n9md5nvscar";
+     };
+     meta = {
+       homepage = "http://github.com/nex3/rb-notify";
+       license = []; # one of ?
+       description = ''A Ruby wrapper for Linux's inotify, using FFI[...]'';
+       longDescription = ''A Ruby wrapper for Linux's inotify, using FFI'';
+     };
+  };
+
+  net_ssh_2_0_23 = rubyDerivation {
+     name = "ruby-net-ssh-2.0.23"; # full_name
+     nameNoVersion = "net_ssh";
+     propagatedBuildInputs = [  ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/net-ssh-2.0.23.gem";
+       sha256 = "1fllf6mgwc213m5mn266qwhl65zc84wl8rq9m3lvbggw9mh5ynrr";
+     };
+     meta = {
+       homepage = "http://github.com/net-ssh/net-ssh";
+       license = []; # one of ?
+       description = ''Net::SSH: a pure-Ruby implementation of the SSH2 client protocol[...]'';
+       longDescription = ''Net::SSH: a pure-Ruby implementation of the SSH2 client protocol.'';
      };
   };
 
-  highline_1_5_2 = rubyDerivation {
-     name = "ruby-highline-1.5.2"; # full_name
+  highline_1_6_1 = rubyDerivation {
+     name = "ruby-highline-1.6.1"; # full_name
      nameNoVersion = "highline";
      propagatedBuildInputs = [  ];
      src = fetchurl {
-       url = "http://gems.rubyforge.org/gems/highline-1.5.2.gem";
-       sha256 = "0l25zris20drrwkhxx9hplq7g353xh960y5i19fdb7g84jl4bp19";
+       url = "http://gems.rubyforge.org/gems/highline-1.6.1.gem";
+       sha256 = "1dxlw2jcr4k1vv3sdaqi37kkh9v6cn3dq32ksz6k4yalcv6fhk7d";
      };
      meta = {
        homepage = "http://highline.rubyforge.org";
        license = []; # one of ?
-       description = "A high-level IO library that provides validation, type conversion, and more for command-line interfaces crank out anythin"; # cut to 120 chars
-       longDescription = "A high-level IO library that provides validation, type conversion, and more for
+       description = ''A high-level IO library that provides validation, type conversion, and more for command-line interfaces crank out anythin''; # cut to 120 chars
+       longDescription = ''A high-level IO library that provides validation, type conversion, and more for
 command-line interfaces. HighLine also includes a complete menu system that can
 crank out anything from simple list selection to complete shells with just
 minutes of work.
-";
+'';
+     };
+  };
+
+  activeresource_3_0_0 = rubyDerivation {
+     name = "ruby-activeresource-3.0.0"; # full_name
+     nameNoVersion = "activeresource";
+     propagatedBuildInputs = [   ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/activeresource-3.0.0.gem";
+       sha256 = "0c5dflwbhl397kifz9i0g63p72xc3jyhk7q8sswp95ijg5smyx2y";
+     };
+     meta = {
+       homepage = "http://www.rubyonrails.org";
+       license = []; # one of ?
+       description = ''REST on Rails[...]'';
+       longDescription = ''REST on Rails. Wrap your RESTful web app with Ruby classes and work with them like Active Record models.'';
      };
   };
 
   jeweler_1_4_0 = rubyDerivation {
      name = "ruby-jeweler-1.4.0"; # full_name
      nameNoVersion = "jeweler";
-     propagatedBuildInputs = [ git_1_2_5 rubyforge_2_0_4 gemcutter_0_5_0 ];
+     propagatedBuildInputs = [ git_1_2_5 rubyforge_2_0_4 gemcutter_0_6_1 ];
      src = fetchurl {
        url = "http://gems.rubyforge.org/gems/jeweler-1.4.0.gem";
        sha256 = "0hsz38wc37k1zzmy1jjvsqj6am14n410bbxk1dhq55cgapnwm3kb";
@@ -558,15 +984,47 @@ minutes of work.
      meta = {
        homepage = "http://github.com/technicalpickles/jeweler";
        license = []; # one of ?
-       description = "Simple and opinionated helper for creating Rubygem projects on GitHub[...]";
-       longDescription = "Simple and opinionated helper for creating Rubygem projects on GitHub";
+       description = ''Simple and opinionated helper for creating Rubygem projects on GitHub[...]'';
+       longDescription = ''Simple and opinionated helper for creating Rubygem projects on GitHub'';
+     };
+  };
+
+  gemcutter_0_6_1 = rubyDerivation {
+     name = "ruby-gemcutter-0.6.1"; # full_name
+     nameNoVersion = "gemcutter";
+     propagatedBuildInputs = [  ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/gemcutter-0.6.1.gem";
+       sha256 = "01ydbsz4ys6rkaghiibf7y7sbicnc5bppb2ay3agq1rqjvgprcr0";
+     };
+     meta = {
+       homepage = "http://rubygems.org";
+       license = []; # one of ?
+       description = ''Adds several commands to RubyGems for managing gems and more on RubyGems[...]'';
+       longDescription = ''Adds several commands to RubyGems for managing gems and more on RubyGems.org.'';
+     };
+  };
+
+  mail_2_2_5 = rubyDerivation {
+     name = "ruby-mail-2.2.5"; # full_name
+     nameNoVersion = "mail";
+     propagatedBuildInputs = [   treetop_1_4_8 ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/mail-2.2.5.gem";
+       sha256 = "0f6qwhwkc9hdqq5qkwzwjsqlwpvy7rcbra7pbl87l6q0mfaqiciv";
+     };
+     meta = {
+       homepage = "http://github.com/mikel/mail";
+       license = []; # one of ?
+       description = ''A really Ruby Mail handler[...]'';
+       longDescription = ''A really Ruby Mail handler.'';
      };
   };
 
   sup_0_11 = rubyDerivation {
      name = "ruby-sup-0.11"; # full_name
      nameNoVersion = "sup";
-     propagatedBuildInputs = [ xapian_full_1_1_3_4 ncurses_0_9_1 rmail_1_0_0 highline_1_5_2 net_ssh_2_0_21 trollop_1_16_2 lockfile_1_4_3 mime_types_1_16 gettext_2_1_0 ];
+     propagatedBuildInputs = [ xapian_full_1_1_3_4 ncurses_0_9_1 rmail_1_0_0 highline_1_6_1 net_ssh_2_0_23 trollop_1_16_2 lockfile_1_4_3 mime_types_1_16 gettext_2_1_0 ];
      src = fetchurl {
        url = "http://gems.rubyforge.org/gems/sup-0.11.gem";
        sha256 = "0dijz1vl1kk4axfnry71bnl2585y1hw0n6sizg9aag7r9m13194q";
@@ -574,68 +1032,129 @@ minutes of work.
      meta = {
        homepage = "http://sup.rubyforge.org/";
        license = []; # one of ?
-       description = "Sup is a console-based email client for people with a lot of email[...]";
-       longDescription = "Sup is a console-based email client for people with a lot of email. It supports tagging, very fast full-text search, automatic contact-list management, and more. If you're the type of person who treats email as an extension of your long-term memory, Sup is for you.  Sup makes it easy to: - Handle massive amounts of email.  - Mix email from different sources: mbox files (even across different machines), Maildir directories, IMAP folders, POP accounts, and GMail accounts.  - Instantaneously search over your entire email collection. Search over body text, or use a query language to combine search predicates in any way.  - Handle multiple accounts. Replying to email sent to a particular account will use the correct SMTP server, signature, and from address.  - Add custom code to handle certain types of messages or to handle certain types of text within messages.  - Organize email with user-defined labels, automatically track recent contacts, and much more!  The goal of Sup is to become the email client of choice for nerds everywhere.";
+       description = ''Sup is a console-based email client for people with a lot of email[...]'';
+       longDescription = ''Sup is a console-based email client for people with a lot of email. It supports tagging, very fast full-text search, automatic contact-list management, and more. If you're the type of person who treats email as an extension of your long-term memory, Sup is for you.  Sup makes it easy to: - Handle massive amounts of email.  - Mix email from different sources: mbox files (even across different machines), Maildir directories, IMAP folders, POP accounts, and GMail accounts.  - Instantaneously search over your entire email collection. Search over body text, or use a query language to combine search predicates in any way.  - Handle multiple accounts. Replying to email sent to a particular account will use the correct SMTP server, signature, and from address.  - Add custom code to handle certain types of messages or to handle certain types of text within messages.  - Organize email with user-defined labels, automatically track recent contacts, and much more!  The goal of Sup is to become the email client of choice for nerds everywhere.'';
      };
   };
 
-  rmail_1_0_0 = rubyDerivation {
-     name = "ruby-rmail-1.0.0"; # full_name
-     nameNoVersion = "rmail";
+  jquery_rails_0_1_2 = rubyDerivation {
+     name = "ruby-jquery-rails-0.1.2"; # full_name
+     nameNoVersion = "jquery_rails";
      propagatedBuildInputs = [  ];
      src = fetchurl {
-       url = "http://gems.rubyforge.org/gems/rmail-1.0.0.gem";
-       sha256 = "0nsg7yda1gdwa96j4hlrp2s0m06vrhcc4zy5mbq7gxmlmwf9yixp";
+       url = "http://gems.rubyforge.org/gems/jquery-rails-0.1.2.gem";
+       sha256 = "1z2qw5nmvjpgx5b79kxvi4gl102aq8brp32fpbysmzv2ghsqgvqn";
      };
      meta = {
-       homepage = "http://www.rfc20.org/rubymail";
+       homepage = "http://rubygems.org/gems/jquery-rails";
        license = []; # one of ?
-       description = "RMail is a lightweight mail library containing various utility classes and modules that allow ruby scripts to parse, modi"; # cut to 120 chars
-       longDescription = "RMail is a lightweight mail library containing various utility classes and modules that allow ruby scripts to parse, modify, and generate MIME mail messages.";
+       description = ''This gem provides a Rails generator to install jQuery and the jQuery-ujs driver into your Rails 3 application, and then h''; # cut to 120 chars
+       longDescription = ''This gem provides a Rails generator to install jQuery and the jQuery-ujs driver into your Rails 3 application, and then have them included automatically instead of Prototype.'';
      };
   };
 
-  ncursesw_1_2_4_1 = rubyDerivation {
-     name = "ruby-ncursesw-1.2.4.1"; # full_name
-     nameNoVersion = "ncursesw";
+  tzinfo_0_3_23 = rubyDerivation {
+     name = "ruby-tzinfo-0.3.23"; # full_name
+     nameNoVersion = "tzinfo";
      propagatedBuildInputs = [  ];
      src = fetchurl {
-       url = "http://gems.rubyforge.org/gems/ncursesw-1.2.4.1.gem";
-       sha256 = "0cn13h14pk8yds8aklpdcpzl0z6rqifpmaz4lw29g10lgwvfv409";
+       url = "http://gems.rubyforge.org/gems/tzinfo-0.3.23.gem";
+       sha256 = "020qk9yfc4s5mi624isn9r7hbncgk3l3ri783y7mn4ac6y4jkpgd";
      };
      meta = {
-       homepage = "http://ncurses-ruby.berlios.de/";
+       homepage = "http://tzinfo.rubyforge.org/";
+       license = []; # one of ?
+       description = ''TZInfo is a Ruby library that uses the standard tz (Olson) database to provide daylight savings aware transformations bet''; # cut to 120 chars
+       longDescription = ''TZInfo is a Ruby library that uses the standard tz (Olson) database to provide daylight savings aware transformations between times in different time zones.'';
+     };
+  };
+
+  activesupport_3_0_0 = rubyDerivation {
+     name = "ruby-activesupport-3.0.0"; # full_name
+     nameNoVersion = "activesupport";
+     propagatedBuildInputs = [  ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/activesupport-3.0.0.gem";
+       sha256 = "0bad6iqqajlzy61ky4his0d4cfzq4f77qihyn6yygq9pn1ma6mvx";
+     };
+     meta = {
+       homepage = "http://www.rubyonrails.org";
+       license = []; # one of ?
+       description = ''A toolkit of support libraries and Ruby core extensions extracted from the Rails framework[...]'';
+       longDescription = ''A toolkit of support libraries and Ruby core extensions extracted from the Rails framework. Rich support for multibyte strings, internationalization, time zones, and testing.'';
+     };
+  };
+
+  rmail_1_0_0 = rubyDerivation {
+     name = "ruby-rmail-1.0.0"; # full_name
+     nameNoVersion = "rmail";
+     propagatedBuildInputs = [  ];
+     src = fetchurl {
+       url = "http://gems.rubyforge.org/gems/rmail-1.0.0.gem";
+       sha256 = "0nsg7yda1gdwa96j4hlrp2s0m06vrhcc4zy5mbq7gxmlmwf9yixp";
+     };
+     meta = {
+       homepage = "http://www.rfc20.org/rubymail";
        license = []; # one of ?
-       description = "Hacked up version of ncurses gem that supports wide characters and ruby1[...]";
-       longDescription = "Hacked up version of ncurses gem that supports wide characters and ruby1.9.1. Original ncurses gem by t-peters@users.berlios.de.";
+       description = ''RMail is a lightweight mail library containing various utility classes and modules that allow ruby scripts to parse, modi''; # cut to 120 chars
+       longDescription = ''RMail is a lightweight mail library containing various utility classes and modules that allow ruby scripts to parse, modify, and generate MIME mail messages.'';
      };
   };
 
 # aliases
 rmail=rmail_1_0_0;
+tzinfo=tzinfo_0_3_23;
+jquery_rails=jquery_rails_0_1_2;
+activeresource=activeresource_3_0_0;
 term_ansicolor=term_ansicolor_1_0_5;
-rb_inotify=rb_inotify_0_7_1;
-highline=highline_1_5_2;
-rubygems_update=rubygems_update_1_3_6;
+rb_inotify=rb_inotify_0_8_1;
+activerecord=activerecord_3_0_0;
+rails=rails_3_0_0;
+highline=highline_1_6_1;
+rubygems_update=rubygems_update_1_3_7;
+sqlite3_ruby=sqlite3_ruby_1_3_1;
+polyglot=polyglot_0_3_1;
+haml=haml_3_0_18;
 rake=rake_0_8_7;
 sup=sup_0_11;
+thor=thor_0_14_0;
+railties=railties_3_0_0;
+treetop=treetop_1_4_8;
 mime_types=mime_types_1_16;
 rubyforge=rubyforge_2_0_4;
-gemcutter=gemcutter_0_5_0;
-net_ssh=net_ssh_2_0_21;
+abstract=abstract_1_0_0;
+mail=mail_2_2_5;
+gemcutter=gemcutter_0_6_1;
+rack=rack_1_2_1;
+activemodel=activemodel_3_0_0;
+rack_mount=rack_mount_0_6_13;
+haml_rails=haml_rails_0_2;
+rails3_generators=rails3_generators_0_13_0;
+net_ssh=net_ssh_2_0_23;
+json=json_1_4_6;
 xrefresh_server=xrefresh_server_0_3_0;
+erubis=erubis_2_6_6;
 xapian_full=xapian_full_1_1_3_4;
 ncurses=ncurses_0_9_1;
-json=json_1_2_4;
+arel=arel_1_0_1;
 jeweler=jeweler_1_4_0;
+bundler=bundler_1_0_0;
 gettext=gettext_2_1_0;
 trollop=trollop_1_16_2;
 git=git_1_2_5;
 locale=locale_2_0_5;
+actionmailer=actionmailer_3_0_0;
+json_pure=json_pure_1_4_6;
+actionpack=actionpack_3_0_0;
+i18n=i18n_0_4_1;
 chronic=chronic_0_2_3;
-json_pure=json_pure_1_2_4;
+rack_test=rack_test_0_5_4;
+activesupport=activesupport_3_0_0;
 lockfile=lockfile_1_4_3;
+enumerated_attribute=enumerated_attribute_0_2_16;
 ffi=ffi_0_6_3;
+meta_programming=meta_programming_0_2_2;
+builder=builder_2_1_2;
 ncursesw=ncursesw_1_2_4_1;
   # ================ END automatically generated code ================
   }; in libs
diff --git a/pkgs/development/libraries/boost/default.nix b/pkgs/development/libraries/boost/default.nix
index fdccb83dd97d..c4b9f23bb230 100644
--- a/pkgs/development/libraries/boost/default.nix
+++ b/pkgs/development/libraries/boost/default.nix
@@ -48,6 +48,8 @@ stdenv.mkDerivation {
     sha256 = "1nvq36mvzr1fr85q0jh86rk3bk65s1y55jgqgzfg3lcpkl12ihs5";
   };
 
+  enableParallelBuilding = true;
+
   buildInputs = [icu expat zlib bzip2 python];
 
   configureScript = "./bootstrap.sh";
@@ -56,4 +58,23 @@ stdenv.mkDerivation {
   buildPhase = "./bjam -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat}/include -sEXPAT_LIBPATH=${expat}/lib --layout=${finalLayout} variant=${variant} threading=${threading} link=${link} ${cflags} install";
 
   installPhase = ":";
+
+  crossAttrs = rec {
+    buildInputs = [ expat.hostDrv zlib.hostDrv bzip2.hostDrv ];
+    # all buildInputs set previously fell into propagatedBuildInputs, as usual, so we have to
+    # override them.
+    propagatedBuildInputs = buildInputs;
+    # We want to substitute the contents of configureFlags, removing thus the
+    # usual --build and --host added on cross building.
+    preConfigure = ''
+      export configureFlags="--prefix=$out --without-icu"
+    '';
+    buildPhase = ''
+      set -x
+      cat << EOF > user-config.jam
+      using gcc : cross : $crossConfig-g++ ;
+      EOF
+      ./bjam -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat.hostDrv}/include -sEXPAT_LIBPATH=${expat.hostDrv}/lib --layout=${finalLayout} --user-config=user-config.jam toolset=gcc-cross variant=${variant} threading=${threading} link=${link} ${cflags} --without-python install
+    '';
+  };
 }
diff --git a/pkgs/development/libraries/eventlog/default.nix b/pkgs/development/libraries/eventlog/default.nix
index bed565a04379..b1239d6f4cf4 100644
--- a/pkgs/development/libraries/eventlog/default.nix
+++ b/pkgs/development/libraries/eventlog/default.nix
@@ -1,10 +1,11 @@
 { stdenv, fetchurl }:
 
 stdenv.mkDerivation {
-  name = "eventlog-0.2.9";
+  name = "eventlog-0.2.12";
+
   src = fetchurl {
-    url = "http://www.balabit.com/downloads/files/eventlog/0.2/eventlog_0.2.9.tar.gz";
-    sha256 = "1cairmv47b66blrxwrgf4qwabfflak9b1dwkiyxnc9rj5svnq50m";
+    url = "http://www.balabit.com/downloads/files/eventlog/0.2/eventlog_0.2.12.tar.gz";
+    sha256 = "494dac8e01dc5ce323df2ad554d94874938dab51aa025987677b2bc6906a9c66";
   };
 
   meta = {
diff --git a/pkgs/development/libraries/grantlee/default.nix b/pkgs/development/libraries/grantlee/default.nix
new file mode 100644
index 000000000000..dea6a7e6f3cd
--- /dev/null
+++ b/pkgs/development/libraries/grantlee/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchurl, qt4, cmake }:
+
+stdenv.mkDerivation rec {
+  name = "grantlee-0.1.5";
+
+# 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.
+  src = fetchurl {
+    urls = [
+      "http://downloads.grantlee.org/${name}.tar.gz"
+      "http://www.loegria.net/grantlee/${name}.tar.gz"
+    ];
+    sha256 = "040slr4kpi62vwkwnsxhvnq2m15wqn40knh69ci6kskmb3i8iv1a";
+  };
+
+  buildInputs = [ cmake qt4 ];
+
+  meta = {
+    description = "Qt4 port of Django template system";
+    longDescription = ''
+      Grantlee is a plugin based String Template system written using the Qt
+      framework. The goals of the project are to make it easier for application
+      developers to separate the structure of documents from the data they
+      contain, opening the door for theming.
+
+      The syntax is intended to follow the syntax of the Django template system,
+      and the design of Django is reused in Grantlee.'';
+
+    homepage = http://gitorious.org/grantlee;
+    maintainers = [ stdenv.lib.maintainers.urkud ];
+    inherit (qt4.meta) platforms;
+  };
+}
diff --git a/pkgs/development/libraries/haskell/AspectAG/default.nix b/pkgs/development/libraries/haskell/AspectAG/default.nix
index c9ede897ca03..1f9737664a50 100644
--- a/pkgs/development/libraries/haskell/AspectAG/default.nix
+++ b/pkgs/development/libraries/haskell/AspectAG/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self : {
   pname = "AspectAG";
-  version = "0.1.5";
-  sha256 = "4cefc7e3404a723f0a75b29797bd9fe685c2a1b3150826b3ba09ade94565f6ff";
+  version = "0.2";
+  sha256 = "5184ba55bc89d4afd12d1fe5f20e5d62b3b7306e771a7418db805afb70638ce7";
   propagatedBuildInputs = [HList mtl];
   meta = {
     description = "Attribute Grammars in the form of an EDSL";
diff --git a/pkgs/development/libraries/haskell/HList/default.nix b/pkgs/development/libraries/haskell/HList/default.nix
index 69ff44ee6b53..0e95d1771e5d 100644
--- a/pkgs/development/libraries/haskell/HList/default.nix
+++ b/pkgs/development/libraries/haskell/HList/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self : {
   pname = "HList";
-  version = "0.2";
-  sha256 = "410a77f8815cb873aff03896622e00918aaf99813bb55822942af4cc8c1a01b5";
+  version = "0.2.3";
+  sha256 = "1efbe0c2cb361ab0a9d864a09f9c58075132cb50094207260cb1363fe73c2908";
   meta = {
     description = "Heterogeneous lists";
   };
diff --git a/pkgs/development/libraries/haskell/HStringTemplate/default.nix b/pkgs/development/libraries/haskell/HStringTemplate/default.nix
index ddf5740d95a8..0d9c34b890e6 100644
--- a/pkgs/development/libraries/haskell/HStringTemplate/default.nix
+++ b/pkgs/development/libraries/haskell/HStringTemplate/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self : {
   pname = "HStringTemplate";
-  version = "0.6.2";
-  sha256 = "1d8ae847cb2b92f6d083ee1ed5db00c719e51fe43017d4289dea61335a116103";
+  version = "0.6.5";
+  sha256 = "e40b69e22900f381ca7fb080ea6e70d623e52e909bd7b896bc24e15c8e43252c";
   propagatedBuildInputs = [parsec time text utf8String parallel];
   meta = {
     description = "StringTemplate implementation in Haskell";
diff --git a/pkgs/development/libraries/haskell/HsSyck/default.nix b/pkgs/development/libraries/haskell/HsSyck/default.nix
new file mode 100644
index 000000000000..6b1681c6b372
--- /dev/null
+++ b/pkgs/development/libraries/haskell/HsSyck/default.nix
@@ -0,0 +1,10 @@
+{cabal}:
+
+cabal.mkDerivation (self : {
+  pname = "HsSyck";
+  version = "0.45";
+  sha256 = "67d02a892cd4535a02cc3ebf7b6e9f898a64428ec6783488875ac694d7fafb79";
+  meta = {
+    description = "Fast, lightweight YAML loader and dumper";
+  };
+})
diff --git a/pkgs/development/libraries/haskell/SMTPClient/default.nix b/pkgs/development/libraries/haskell/SMTPClient/default.nix
index 2da9beea5258..45c8d4aeaeed 100644
--- a/pkgs/development/libraries/haskell/SMTPClient/default.nix
+++ b/pkgs/development/libraries/haskell/SMTPClient/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self : {
   pname = "SMTPClient";
-  version = "1.0.2";
-  sha256 = "b835cebf22e9281778deeec3ceffeb95aa8ae9c0e1f97e8e9734cf5d87ecba5f";
+  version = "1.0.3";
+  sha256 = "c9907834565b5b712d50c50823513675b982c8b51e7b95680a3495eccb73ce66";
   propagatedBuildInputs = [hsemail network];
   meta = {
     description = "A simple SMTP client library";
diff --git a/pkgs/development/libraries/haskell/benchpress/default.nix b/pkgs/development/libraries/haskell/benchpress/default.nix
index ce41f4d5ee80..6ccc033f02e9 100644
--- a/pkgs/development/libraries/haskell/benchpress/default.nix
+++ b/pkgs/development/libraries/haskell/benchpress/default.nix
@@ -1,12 +1,12 @@
-{cabal}:
+{cabal, mtl}:
 
 cabal.mkDerivation (self : {
   pname = "benchpress";
   version = "0.2.2";
   sha256 = "185j2viimr1vbbgh9havdj2nskim8apih1fyvwln76jfrwypy194";
+  propagatedBuildInputs = [mtl];
   meta = {
     description = "Benchmarks actions and produces statistics such as min, mean, and median execution time.";
   };
-  propagatedBuildInputs = [];
 })
 
diff --git a/pkgs/development/libraries/haskell/blaze-builder/default.nix b/pkgs/development/libraries/haskell/blaze-builder/default.nix
new file mode 100644
index 000000000000..3a9e8b8e4cb7
--- /dev/null
+++ b/pkgs/development/libraries/haskell/blaze-builder/default.nix
@@ -0,0 +1,13 @@
+{cabal, text}:
+
+cabal.mkDerivation (self : {
+  pname = "blaze-builder";
+  version = "0.1";
+  sha256 = "dc4c542a39cf9e82b6a7ca99d6f460d6fa8dc4c8f648224368eac3fe054127c5";
+  propagatedBuildInputs = [text];
+  meta = {
+    description = "Builder to efficiently append text";
+    license = "BSD";
+    maintainers = [self.stdenv.lib.maintainers.andres];
+  };
+})
diff --git a/pkgs/development/libraries/haskell/failure/default.nix b/pkgs/development/libraries/haskell/failure/default.nix
new file mode 100644
index 000000000000..74f9f0c4626f
--- /dev/null
+++ b/pkgs/development/libraries/haskell/failure/default.nix
@@ -0,0 +1,12 @@
+{cabal}:
+
+cabal.mkDerivation (self : {
+  pname = "failure";
+  version = "0.1.0";
+  sha256 = "08c4e51dbbc0852836ff5bf791e9c62dca748aed8554bb6271618ab3d6a04b2c";
+  meta = {
+    description = "A simple type class for success/failure computations";
+    license = "Public Domain";
+    maintainers = [self.stdenv.lib.maintainers.andres];
+  };
+})
diff --git a/pkgs/development/libraries/haskell/gitit/default.nix b/pkgs/development/libraries/haskell/gitit/default.nix
index 5bebdf7de358..4859a2ca0ee1 100644
--- a/pkgs/development/libraries/haskell/gitit/default.nix
+++ b/pkgs/development/libraries/haskell/gitit/default.nix
@@ -6,8 +6,8 @@
 
 cabal.mkDerivation (self : {
   pname = "gitit";
-  version = "0.7.3.5";
-  sha256 = "50cf6b853d439904e54884660eba6ffdc31b938e077fd0d9457fba972d4bde9f";
+  version = "0.7.3.8";
+  sha256 = "356c82604dcfe2eec4faeb36ee46546ea3e26738780723f457366b2e35f6211a";
   propagatedBuildInputs = [
     HStringTemplate happstackServer happstackUtil HTTP SHA cgi datetime
     filestore highlightingKate safe
diff --git a/pkgs/development/libraries/haskell/hakyll/default.nix b/pkgs/development/libraries/haskell/hakyll/default.nix
new file mode 100644
index 000000000000..c5b0339fae72
--- /dev/null
+++ b/pkgs/development/libraries/haskell/hakyll/default.nix
@@ -0,0 +1,13 @@
+{cabal, binary, hamlet, mtl, network, pandoc, regexBase, regexTDFA, time}:
+
+cabal.mkDerivation (self : {
+  pname = "hakyll";
+  version = "2.3";
+  sha256 = "40e57c5cf5be3c6fdc270d00ff765a2b3e11ba7e302f40146d83048aa4436116";
+  propagatedBuildInputs = [hamlet mtl network pandoc regexBase regexTDFA time];
+  meta = {
+    description = "A simple static site generator library";
+    license = "BSD";
+    maintainers = [self.stdenv.lib.maintainers.andres];
+  };
+})
diff --git a/pkgs/development/libraries/haskell/hamlet/default.nix b/pkgs/development/libraries/haskell/hamlet/default.nix
index 08f7fd7b6a28..90bbb999d18f 100644
--- a/pkgs/development/libraries/haskell/hamlet/default.nix
+++ b/pkgs/development/libraries/haskell/hamlet/default.nix
@@ -1,10 +1,12 @@
-{cabal, blazeHtml, parsec, utf8String}:
+{cabal, blazeHtml, blazeBuilder, parsec, utf8String, failure, neither}:
 
 cabal.mkDerivation (self : {
   pname = "hamlet";
-  version = "0.4.0";
-  sha256 = "5e05879e734fc193acc48eda48dadbf53659e937543068bcc77dc7c394f6adcd";
-  propagatedBuildInputs = [blazeHtml parsec utf8String];
+  version = "0.5.0";
+  sha256 = "92d8e099fa63fe218e2c8c4da56ac86b0b0bb49139467b8f12595c4436d1ad0b";
+  propagatedBuildInputs = [
+    blazeHtml blazeBuilder parsec utf8String failure neither
+  ];
   meta = {
     description = "Haml-like template files that are compile-time checked";
     license = "BSD";
diff --git a/pkgs/development/libraries/haskell/happstack/happstack-data.nix b/pkgs/development/libraries/haskell/happstack/happstack-data.nix
index 9b18652642f9..de54b3ccac3e 100644
--- a/pkgs/development/libraries/haskell/happstack/happstack-data.nix
+++ b/pkgs/development/libraries/haskell/happstack/happstack-data.nix
@@ -1,10 +1,14 @@
-{cabal, mtl, sybWithClass, HaXml, happstackUtil, binary}:
+{cabal, mtl, sybWithClass, sybWithClassInstancesText, HaXml,
+ happstackUtil, binary, text}:
 
 cabal.mkDerivation (self : {
     pname = "happstack-data";
-    version = "0.4.1";
-    sha256 = "0d1f96472a4e13b9a5218bce8bf819a50d1773b7e110141ab235d1d7701e39f6";
-    propagatedBuildInputs = [mtl sybWithClass HaXml happstackUtil binary];
+    version = "0.5.0.2";
+    sha256 = "03795c24acc2268f39d38f18dd6cbfb92893f7de88b0443219d582a1eabdacd5";
+    propagatedBuildInputs = [
+        mtl sybWithClass sybWithClassInstancesText HaXml
+        happstackUtil binary text
+    ];
     meta = {
         description = "Happstack data manipulation libraries";
         license = "BSD";
diff --git a/pkgs/development/libraries/haskell/happstack/happstack-server.nix b/pkgs/development/libraries/haskell/happstack/happstack-server.nix
index c1d66c0fabcd..461137c933dc 100644
--- a/pkgs/development/libraries/haskell/happstack/happstack-server.nix
+++ b/pkgs/development/libraries/haskell/happstack/happstack-server.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self : {
     pname = "happstack-server";
-    version = "0.4.1";
-    sha256 = "2a5d32b4e635160ffab8a90891d9c5ca0433969944ae4013ec8cebe25ba63658";
+    version = "0.5.0.2";
+    sha256 = "0184c835958bf9f29009a5aedd2c913bb1ad6ab60b80d9750849381c172dd6b6";
     propagatedBuildInputs = [
       HUnit HaXml MaybeT happstackData happstackUtil hslogger html
       mtl network parsec sendfile utf8String xhtml zlib
diff --git a/pkgs/development/libraries/haskell/happstack/happstack-util.nix b/pkgs/development/libraries/haskell/happstack/happstack-util.nix
index 4ba0854d37a3..cab41882514d 100644
--- a/pkgs/development/libraries/haskell/happstack/happstack-util.nix
+++ b/pkgs/development/libraries/haskell/happstack/happstack-util.nix
@@ -3,8 +3,8 @@
 
 cabal.mkDerivation (self : {
     pname = "happstack-util";
-    version = "0.4.1";
-    sha256 = "bb254140c30c39c420bc5a649da645f59df950f0a712c2dac4de1cc6572f05f9";
+    version = "0.5.0.2";
+    sha256 = "b6a84a55d6f7aec51095121a240bd6096b0df3c61c6fd25963d91190fcca4657";
     propagatedBuildInputs = [
       mtl hslogger HUnit QuickCheck strictConcurrency unixCompat
       SMTPClient
diff --git a/pkgs/development/libraries/haskell/highlighting-kate/default.nix b/pkgs/development/libraries/haskell/highlighting-kate/default.nix
index d6d69f398ba5..48de03486092 100644
--- a/pkgs/development/libraries/haskell/highlighting-kate/default.nix
+++ b/pkgs/development/libraries/haskell/highlighting-kate/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self : {
   pname = "highlighting-kate";
-  version = "0.2.6.2";
-  sha256 = "3ed163888d45d5bf5ee5c2931e894f6ca2eb167a79ac8274d7f57341c4c5dca7";
+  version = "0.2.7.1";
+  sha256 = "330c5fdc6b5dae62c12ee2455892319df12723346aa75401aea05ea0b24cf5ed";
   propagatedBuildInputs = [parsec pcreLight xhtml];
   meta = {
     description = "Syntax highlighting";
diff --git a/pkgs/development/libraries/haskell/neither/default.nix b/pkgs/development/libraries/haskell/neither/default.nix
new file mode 100644
index 000000000000..1dfd1ca533d3
--- /dev/null
+++ b/pkgs/development/libraries/haskell/neither/default.nix
@@ -0,0 +1,15 @@
+{cabal, failure, mtl, transformers, MonadCatchIOMtl, MonadCatchIOTransformers}:
+
+cabal.mkDerivation (self : {
+  pname = "neither";
+  version = "0.0.2";
+  sha256 = "1e1b934d9d1918bd762bb8d6cde35c56883543c2d0c165a661f096c2ce5ab139";
+  propagatedBuildInputs = [
+    failure mtl transformers MonadCatchIOMtl MonadCatchIOTransformers
+  ];
+  meta = {
+    description = "A simple type class for success/failure computations";
+    license = "BSD";
+    maintainers = [self.stdenv.lib.maintainers.andres];
+  };
+})
diff --git a/pkgs/development/libraries/haskell/pandoc/default.nix b/pkgs/development/libraries/haskell/pandoc/default.nix
index de77d27c8b03..7bc1d0fc7fd8 100644
--- a/pkgs/development/libraries/haskell/pandoc/default.nix
+++ b/pkgs/development/libraries/haskell/pandoc/default.nix
@@ -1,15 +1,14 @@
 {cabal, mtl, network, parsec, utf8String, xhtml, zipArchive, HTTP, xml,
- texmath}:
+ texmath, random ? null}:
 
 cabal.mkDerivation (self : {
   pname = "pandoc";
-  version = "1.5.1.1";
-  sha256 = "6d2283cb618fcaea5ee5cb885ef6532bc34628b351f14a6bd85b098d7a4128d9";
+  version = "1.6";
+  sha256 = "9b825233293edf1ea414b0e7ea821d6a914711dc2c60546566ab5a97512b079b";
   propagatedBuildInputs = [
     mtl network parsec utf8String xhtml zipArchive HTTP xml texmath
-  ];
+  ] ++ (if random != null then [random] else []);
   meta = {
     description = "Conversion between markup formats";
   };
-})  
-
+})
diff --git a/pkgs/development/libraries/haskell/polyparse/default.nix b/pkgs/development/libraries/haskell/polyparse/default.nix
index f5664152c65d..3c9055f16809 100644
--- a/pkgs/development/libraries/haskell/polyparse/default.nix
+++ b/pkgs/development/libraries/haskell/polyparse/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self : {
   pname = "polyparse";
-  version = "1.3";
-  sha256 = "6d82f08634f0856c7919c9413199f4d5f91e753a6d796a0b61e46d7cd1ce4a24";
+  version = "1.4";
+  sha256 = "6e599fb0771e8ce2e1d3a3bbe5eddc2d77b2b4bbb54602f01005dc55dc039d44";
   meta = {
     description = "A variety of alternative parser combinator libraries";
   };
diff --git a/pkgs/development/libraries/haskell/random/default.nix b/pkgs/development/libraries/haskell/random/default.nix
new file mode 100644
index 000000000000..370f054dc1e3
--- /dev/null
+++ b/pkgs/development/libraries/haskell/random/default.nix
@@ -0,0 +1,13 @@
+{cabal, time}:
+
+cabal.mkDerivation (self : {
+  pname = "random";
+  version = "1.0.0.2";
+  sha256 = "5433aebb4bbfb999f1d02410c8ca3769c63cd8b02109d2771a37c12918f92dd5";
+  propagatedBuildInputs = [time];
+  meta = {
+    description = "random number library";
+    license = "BSD";
+    maintainers = [self.stdenv.lib.maintainers.andres];
+  };
+})
diff --git a/pkgs/development/libraries/haskell/regex-tdfa/default.nix b/pkgs/development/libraries/haskell/regex-tdfa/default.nix
new file mode 100644
index 000000000000..76b304044957
--- /dev/null
+++ b/pkgs/development/libraries/haskell/regex-tdfa/default.nix
@@ -0,0 +1,13 @@
+{cabal, mtl, parsec, regexBase}:
+
+cabal.mkDerivation (self : {
+  pname = "regex-tdfa";
+  version = "1.1.4";
+  sha256 = "382c7ed1ee75448574b42e9ecb9228b25f55143f3008ecd6f5d3a30471337b39";
+  propagatedBuildInputs = [mtl parsec regexBase];
+  meta = {
+    description = "Replaces/Enhances Text.Regex";
+    license = "BSD";
+    maintainers = [self.stdenv.lib.maintainers.andres];
+  };
+})
diff --git a/pkgs/development/libraries/haskell/sendfile/default.nix b/pkgs/development/libraries/haskell/sendfile/default.nix
index f35719d75f47..801257cc4e56 100644
--- a/pkgs/development/libraries/haskell/sendfile/default.nix
+++ b/pkgs/development/libraries/haskell/sendfile/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self : {
   pname = "sendfile";
-  version = "0.6.1";
-  sha256 = "c21b7f0f9a03a5e6d9b0691f5f0be9969d175f0514becdc199f0fd49097e51a2";
+  version = "0.6.2";
+  sha256 = "2d7bf7fdcae7e2ffa24bf70bc1bdc7ea4e6b1726f6cee63cd14c2eeb5545749a";
   propagatedBuildInputs = [network];
   meta = {
     description = "A portable sendfile library";
diff --git a/pkgs/development/libraries/haskell/strictConcurrency/default.nix b/pkgs/development/libraries/haskell/strictConcurrency/default.nix
index 5e90fd74e1a8..91ba2d948867 100644
--- a/pkgs/development/libraries/haskell/strictConcurrency/default.nix
+++ b/pkgs/development/libraries/haskell/strictConcurrency/default.nix
@@ -1,10 +1,10 @@
-{cabal, parallel}:
+{cabal, parallel, deepseq}:
 
 cabal.mkDerivation (self : {
   pname = "strict-concurrency";
-  version = "0.2.3";
-  sha256 = "21641b983b226e47727ff565184a5f2b312c7979ff487a5e478f5cfc82f78f18";
-  propagatedBuildInputs = [parallel];
+  version = "0.2.4.1";
+  sha256 = "0939212dd0cc3b9bd228dfbb233d9eccad22ca626752d9bad8026ceb0a5c1a89";
+  propagatedBuildInputs = [parallel deepseq];
   meta = {
     description = "Strict concurrency abstractions";
   };
diff --git a/pkgs/development/libraries/haskell/syb/syb-with-class-instances-text.nix b/pkgs/development/libraries/haskell/syb/syb-with-class-instances-text.nix
new file mode 100644
index 000000000000..f295e489402f
--- /dev/null
+++ b/pkgs/development/libraries/haskell/syb/syb-with-class-instances-text.nix
@@ -0,0 +1,11 @@
+{cabal, sybWithClass, text}:
+
+cabal.mkDerivation (self : {
+  pname = "syb-with-class-instances-text";
+  version = "0.0.1";
+  sha256 = "0e0aa90c02cbe76380274830be51e04cb3cc13d5ea5761ba5540779bd0c4d76e";
+  propagatedBuildInputs = [sybWithClass text];
+  meta = {
+    description = "Scrap Your Boilerplate With Class";
+  };
+})
diff --git a/pkgs/development/libraries/haskell/syb/syb-with-class.nix b/pkgs/development/libraries/haskell/syb/syb-with-class.nix
index e6ea92a169e3..dfd7d1946351 100644
--- a/pkgs/development/libraries/haskell/syb/syb-with-class.nix
+++ b/pkgs/development/libraries/haskell/syb/syb-with-class.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self : {
   pname = "syb-with-class";
-  version = "0.6";
-  sha256 = "8ee836b491b0f64ab0920d1a7314323439665a7b1afa78810cbbc95dc658bfdc";
+  version = "0.6.1";
+  sha256 = "72cf0a98862181fea81b77c11f35efd22eafa29107f3acd624fd08be68ed850b";
   meta = {
     description = "Scrap Your Boilerplate With Class";
   };
diff --git a/pkgs/development/libraries/haskell/texmath/default.nix b/pkgs/development/libraries/haskell/texmath/default.nix
index 66369cb60ba0..623f86ee3fd3 100644
--- a/pkgs/development/libraries/haskell/texmath/default.nix
+++ b/pkgs/development/libraries/haskell/texmath/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self : {
   pname = "texmath";
-  version = "0.2.0.3";
-  sha256 = "d355a298d28b9f5356926c2d2942f28ed07afa9d944cadfa47d8cdec73725b55";
+  version = "0.3.0.2";
+  sha256 = "8d2bb26fc5aab09ae92d2c194ec39acb4e04c054ad2caf1a1db0dc9b53b4b1d4";
   propagatedBuildInputs = [cgi json parsec xml];
   meta = {
     description = "Conversion of LaTeX math formulas to MathML";
diff --git a/pkgs/development/libraries/haskell/text/default.nix b/pkgs/development/libraries/haskell/text/default.nix
index e2c4b2f13d6e..c146af8bb620 100644
--- a/pkgs/development/libraries/haskell/text/default.nix
+++ b/pkgs/development/libraries/haskell/text/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self : {
   pname = "text";
-  version = "0.7.1.0";
-  sha256 = "a6daa0ee43ddede620363ab26614fef69361bd5b8f77aa6918b5a4ecb083f425";
+  version = "0.7.2.1";
+  sha256 = "13b00db1363219e263a4af5b1318d2a296d67c975883cd7e17265fcd8fb1381c";
   propagatedBuildInputs = [deepseq];
   meta = {
     description = "An efficient package Unicode text type";
diff --git a/pkgs/development/libraries/haskell/time/1.2.0.3.nix b/pkgs/development/libraries/haskell/time/1.2.0.3.nix
new file mode 100644
index 000000000000..7ddbdcc2fa98
--- /dev/null
+++ b/pkgs/development/libraries/haskell/time/1.2.0.3.nix
@@ -0,0 +1,11 @@
+{cabal}:
+
+cabal.mkDerivation (self : {
+  pname = "time";
+  version = "1.2.0.3";
+  sha256 = "acb1e3cf2b98a73632d35b0665808b05df6c03fcefd62796fe291f5b2ef4348e";
+  meta = {
+    description = "A time library";
+  };
+})  
+
diff --git a/pkgs/development/libraries/haskell/uu-parsinglib/default.nix b/pkgs/development/libraries/haskell/uu-parsinglib/default.nix
index 1967bec9e071..26b6176fc6d1 100644
--- a/pkgs/development/libraries/haskell/uu-parsinglib/default.nix
+++ b/pkgs/development/libraries/haskell/uu-parsinglib/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self : {
   pname = "uu-parsinglib";
-  version = "2.5.4.2";
-  sha256 = "94f8f3f7e64dd87a4930190f922a07014e21e3cc320ba1ffefdae7db4401bfcd";
+  version = "2.5.5";
+  sha256 = "132f73b11f87a41aad7331b27d0aa5caa7b931381a88d114c91b700096d6c3f4";
   meta = {
     description = "New version of the Utrecht University parser combinator library";
   };
diff --git a/pkgs/development/libraries/haskell/yst/default.nix b/pkgs/development/libraries/haskell/yst/default.nix
new file mode 100644
index 000000000000..ac65ef9d917a
--- /dev/null
+++ b/pkgs/development/libraries/haskell/yst/default.nix
@@ -0,0 +1,14 @@
+{cabal, HStringTemplate, csv, pandoc, parsec, split, utf8String, xhtml, HsSyck, time}:
+
+cabal.mkDerivation (self : {
+  pname = "yst";
+  version = "0.2.3.2";
+  sha256 = "b857e70db67d708e2edb61a1d6bc4eaff3abd2bc252b3605f66bf1760da4da4b";
+  propagatedBuildInputs = [
+    HStringTemplate csv pandoc parsec split utf8String xhtml HsSyck time
+  ];
+  meta = {
+    description =
+      "Builds a static website from templates and data in YAML or CSV files";
+  };
+})
diff --git a/pkgs/development/libraries/id3lib/default.nix b/pkgs/development/libraries/id3lib/default.nix
index edbf23d516e0..df8add774a19 100644
--- a/pkgs/development/libraries/id3lib/default.nix
+++ b/pkgs/development/libraries/id3lib/default.nix
@@ -2,6 +2,8 @@
 
 stdenv.mkDerivation {
   name = "id3lib-3.8.3";
+
+  patches = [ ./id3lib-3.8.3-gcc43-1.patch ];
   
   src = fetchurl {
     url = mirror://sourceforge/id3lib/id3lib-3.8.3.tar.gz;
diff --git a/pkgs/development/libraries/id3lib/id3lib-3.8.3-gcc43-1.patch b/pkgs/development/libraries/id3lib/id3lib-3.8.3-gcc43-1.patch
new file mode 100644
index 000000000000..2b7457d54c79
--- /dev/null
+++ b/pkgs/development/libraries/id3lib/id3lib-3.8.3-gcc43-1.patch
@@ -0,0 +1,104 @@
+http://www.linuxfromscratch.org/patches/downloads/id3lib/id3lib-3.8.3-gcc43-1.patch 
+
+Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
+Date: 2008-11-21
+Initial Package Version: 3.8.3
+Upstream Status: unknown
+Origin: fedora
+Description: Allows it to compile with gcc-4.3.
+
+diff -up id3lib-3.8.3/include/id3/id3lib_strings.h~ id3lib-3.8.3/include/id3/id3lib_strings.h
+--- id3lib-3.8.3/include/id3/id3lib_strings.h~	2003-03-02 02:23:00.000000000 +0200
++++ id3lib-3.8.3/include/id3/id3lib_strings.h	2008-01-04 01:30:52.000000000 +0200
+@@ -29,6 +29,7 @@
+ #ifndef _ID3LIB_STRINGS_H_
+ #define _ID3LIB_STRINGS_H_
+ 
++#include <cstring>
+ #include <string>
+ 
+ #if (defined(__GNUC__) && (__GNUC__ >= 3) || (defined(_MSC_VER) && _MSC_VER > 1000))
+diff -up id3lib-3.8.3/configure.in~ id3lib-3.8.3/configure.in
+--- id3lib-3.8.3/configure.in~	2008-01-04 11:39:01.000000000 +0100
++++ id3lib-3.8.3/configure.in	2008-01-04 11:39:01.000000000 +0100
+@@ -227,7 +227,6 @@ AC_CHECK_HEADERS(fstream iostream iomani
+ )
+ AC_CHECK_HEADERS(               \
+   string                        \
+-  iomanip.h                     \
+   ,,AC_MSG_ERROR([Missing a vital header file for id3lib])
+ )
+ 
+diff -up id3lib-3.8.3/configure~ id3lib-3.8.3/configure
+--- id3lib-3.8.3/configure~	2008-01-04 11:39:10.000000000 +0100
++++ id3lib-3.8.3/configure	2008-01-04 11:39:10.000000000 +0100
+@@ -22976,7 +22976,6 @@ done
+ 
+ for ac_header in \
+   string                        \
+-  iomanip.h                     \
+ 
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+diff -up id3lib-3.8.3/include/id3/writers.h~ id3lib-3.8.3/include/id3/writers.h
+--- id3lib-3.8.3/include/id3/writers.h~	2008-01-04 11:59:39.000000000 +0100
++++ id3lib-3.8.3/include/id3/writers.h	2008-01-04 11:59:39.000000000 +0100
+@@ -28,9 +28,9 @@
+ #ifndef _ID3LIB_WRITERS_H_
+ #define _ID3LIB_WRITERS_H_
+ 
++#include <cstring>
+ #include "id3/writer.h"
+ #include "id3/id3lib_streams.h"
+-//#include <string.h>
+ 
+ class ID3_CPP_EXPORT ID3_OStreamWriter : public ID3_Writer
+ {
+diff -up id3lib-3.8.3/examples/demo_info.cpp~ id3lib-3.8.3/examples/demo_info.cpp
+--- id3lib-3.8.3/examples/demo_info.cpp~	2008-01-04 12:00:56.000000000 +0100
++++ id3lib-3.8.3/examples/demo_info.cpp	2008-01-04 12:00:56.000000000 +0100
+@@ -309,7 +309,7 @@ void PrintInformation(const ID3_Tag &myT
+ 
+ #define DEBUG
+ 
+-int main( unsigned int argc, char * const argv[])
++int main(int argc, char * const argv[])
+ {
+   ID3D_INIT_DOUT();
+ 
+diff -up id3lib-3.8.3/examples/demo_copy.cpp~ id3lib-3.8.3/examples/demo_copy.cpp
+--- id3lib-3.8.3/examples/demo_copy.cpp~	2008-01-04 12:01:26.000000000 +0100
++++ id3lib-3.8.3/examples/demo_copy.cpp	2008-01-04 12:01:26.000000000 +0100
+@@ -81,7 +81,7 @@ void DisplayTags(ostream &os, luint nTag
+   }
+ }
+ 
+-int main( unsigned int argc, char * const argv[])
++int main(int argc, char * const argv[])
+ {
+   int ulFlag = ID3TT_ID3;
+   ID3D_INIT_DOUT();
+diff -up id3lib-3.8.3/examples/demo_convert.cpp~ id3lib-3.8.3/examples/demo_convert.cpp
+--- id3lib-3.8.3/examples/demo_convert.cpp~	2008-01-04 12:01:20.000000000 +0100
++++ id3lib-3.8.3/examples/demo_convert.cpp	2008-01-04 12:01:20.000000000 +0100
+@@ -84,7 +84,7 @@ void DisplayTags(ostream &os, luint nTag
+   }
+ }
+ 
+-int main( unsigned int argc, char * const argv[])
++int main(int argc, char * const argv[])
+ {
+   flags_t ulFlag = ID3TT_ALL;
+   gengetopt_args_info args;
+diff -up id3lib-3.8.3/examples/demo_tag.cpp~ id3lib-3.8.3/examples/demo_tag.cpp
+--- id3lib-3.8.3/examples/demo_tag.cpp~	2008-01-04 12:01:41.000000000 +0100
++++ id3lib-3.8.3/examples/demo_tag.cpp	2008-01-04 12:01:41.000000000 +0100
+@@ -46,7 +46,7 @@ void DisplayTags(ostream &os, luint nTag
+     os << "v2";
+ }
+ 
+-int main( unsigned int argc, char * const argv[])
++int main(int argc, char * const argv[])
+ {
+   int ulFlag = ID3TT_ID3;
+   ID3D_INIT_DOUT();
diff --git a/pkgs/development/libraries/libdiscid/default.nix b/pkgs/development/libraries/libdiscid/default.nix
new file mode 100644
index 000000000000..bd39ea9464cd
--- /dev/null
+++ b/pkgs/development/libraries/libdiscid/default.nix
@@ -0,0 +1,18 @@
+{ stdenv, fetchurl, cmake }:
+
+stdenv.mkDerivation rec {
+  name = "libdiscid-0.2.2";
+
+  buildInputs = [ cmake ];
+
+  src = fetchurl {
+    url = "http://users.musicbrainz.org/~matt/${name}.tar.gz";
+    sha256 = "00l4ln9rk0vqf67iccwqrgc9qx1al92i05zylh85kd1zn9d5sjwp";
+  };
+
+  meta = {
+    description = "A C library for creating MusicBrainz DiscIDs from audio CDs";
+    homepage = http://musicbrainz.org/doc/libdiscid;
+    license = "LGPL-2.1";
+  };
+}
diff --git a/pkgs/development/libraries/libexif/default.nix b/pkgs/development/libraries/libexif/default.nix
index 7c2c9129c266..ca7e611e57b9 100644
--- a/pkgs/development/libraries/libexif/default.nix
+++ b/pkgs/development/libraries/libexif/default.nix
@@ -1,12 +1,19 @@
 { stdenv, fetchurl, gettext }:
 
 stdenv.mkDerivation rec {
-  name = "libexif-0.6.16";
+  name = "libexif-0.6.19";
 
   src = fetchurl {
     url = "mirror://sourceforge/libexif/${name}.tar.bz2";
-    sha256 = "0hxc3aik3sn8xq4mbmxxb8ycx2lwffmhi5xvz0zjffhfwkaqas6v";
+    sha256 = "1gfa07bzs2lk0n887f1lvz5b9a7abyc3f5zaf39w4sf23hk9axpr";
   };
 
   buildInputs = [ gettext ];
+
+  meta = {
+    homepage = http://libexif.sourceforge.net/;
+    description = "A library to read and manipulate EXIF data in digital photographs";
+    license = "LGPL 2.1";
+  };
+
 }
diff --git a/pkgs/development/libraries/libgphoto2/default.nix b/pkgs/development/libraries/libgphoto2/default.nix
index d91aa3987466..7ea9eb4db874 100644
--- a/pkgs/development/libraries/libgphoto2/default.nix
+++ b/pkgs/development/libraries/libgphoto2/default.nix
@@ -1,11 +1,11 @@
 {stdenv, fetchurl, pkgconfig, libusb, libtool, libexif, libjpeg, gettext}:
 
 stdenv.mkDerivation rec {
-  name = "libgphoto2-2.4.5";
+  name = "libgphoto2-2.4.10.1";
 
   src = fetchurl {
     url = "mirror://sourceforge/gphoto/${name}.tar.bz2";
-    sha256 = "1pipdwjxbjg7y9n5ldz6qlpiiiqyba6jx315277ams5d8jxg2bfk";
+    sha256 = "12m99hcak59ppq1ijnfsrcm09mdj102f1xjmz4myggwjdymwc3lq";
   };
   
   buildInputs = [pkgconfig libtool libjpeg gettext];
@@ -16,6 +16,6 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = http://www.gphoto.org/proj/libgphoto2/;
     description = "A library for accessing digital cameras";
-    license = "LGPL-2";
+    license = "LGPL 2.1";
   };
 }
diff --git a/pkgs/development/libraries/libktorrent/default.nix b/pkgs/development/libraries/libktorrent/default.nix
index f048e5043dee..2ccfbf499b88 100644
--- a/pkgs/development/libraries/libktorrent/default.nix
+++ b/pkgs/development/libraries/libktorrent/default.nix
@@ -1,16 +1,20 @@
 { stdenv, fetchurl, kdelibs, cmake, gmp, qca2, boost, gettext, qt4, automoc4,
-  perl }:
+  perl, phonon }:
 
 stdenv.mkDerivation rec {
-  name = "libktorrent-1.0.2";
+  name = pname + "-" + version;
+  pname = "libktorrent";
+  version = "1.0.3";
 
   src = fetchurl {
-    url = "${meta.homepage}/downloads/4.0.2/${name}.tar.bz2";
-    sha256 = "11kh1mcijwzr2kf7hpxadggh346kdb5jy8rnmawhi9nc0i7wyjlw";
+    url = "${meta.homepage}/downloads/4${builtins.substring 1
+      (builtins.stringLength version) version}/${name}.tar.bz2";
+    sha256 = "1yfayzbmi7im0pf4g7awn8lqianpr55xwbsldz7lyj9lc1a3xcgs";
   };
 
 # TODO: xfs.h
-  buildInputs = [ cmake kdelibs gmp qca2 boost gettext qt4 automoc4 perl ];
+  propagatedBuildInputs = [ kdelibs gmp boost qt4 phonon ];
+  buildInputs = [ cmake automoc4 qca2 gettext perl ];
 
   meta = {
     description = "A bittorrent library used in ktorrent";
diff --git a/pkgs/development/libraries/libmusicbrainz/2.x.nix b/pkgs/development/libraries/libmusicbrainz/2.x.nix
new file mode 100644
index 000000000000..bff49dcf76f2
--- /dev/null
+++ b/pkgs/development/libraries/libmusicbrainz/2.x.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, expat }:
+
+stdenv.mkDerivation rec {
+  name = "libmusicbrainz-2.1.5";
+
+  configureFlags = "--enable-cpp-headers";
+
+  buildInputs = [ expat ];
+
+  patches = [ ./gcc-4.x.patch ];
+
+  src = fetchurl {
+    url = "ftp://ftp.musicbrainz.org/pub/musicbrainz/${name}.tar.gz";
+    sha256 = "183i4c109r5qx3mk4r986sx5xw4n5mdhdz4yz3rrv3s2xm5rqqn6";
+  };
+
+  meta = {
+    homepage = http://musicbrainz.org/doc/libmusicbrainz;
+    description = "MusicBrainz Client Library (deprecated 2.x version)";
+    longDescription = ''
+      The libmusicbrainz (also known as mb_client or MusicBrainz Client
+      Library) is a development library geared towards developers who wish to
+      add MusicBrainz lookup capabilities to their applications.'';
+    maintainers = [ stdenv.lib.maintainers.urkud ];
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/pkgs/development/libraries/libmusicbrainz/default.nix b/pkgs/development/libraries/libmusicbrainz/default.nix
new file mode 100644
index 000000000000..08bcd2ff4b17
--- /dev/null
+++ b/pkgs/development/libraries/libmusicbrainz/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl, cmake, neon, libdiscid }:
+
+stdenv.mkDerivation rec {
+  name = "libmusicbrainz-3.0.2";
+
+  buildInputs = [ cmake neon libdiscid ];
+
+  patches = [ ./find-neon.patch ./missing-include.patch ];
+
+  src = fetchurl {
+    url = "ftp://ftp.musicbrainz.org/pub/musicbrainz/${name}.tar.gz";
+    sha256 = "1nhyl9kalvcn0r86y3kps6id84y3rc43226g67bssfb2h9b5x8xr";
+  };
+
+  meta = {
+    homepage = http://musicbrainz.org/doc/libmusicbrainz;
+    description = "MusicBrainz Client Library (3.x version)";
+    longDescription = ''
+      The libmusicbrainz (also known as mb_client or MusicBrainz Client
+      Library) is a development library geared towards developers who wish to
+      add MusicBrainz lookup capabilities to their applications.'';
+    maintainers = [ stdenv.lib.maintainers.urkud ];
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/pkgs/development/libraries/libmusicbrainz/find-neon.patch b/pkgs/development/libraries/libmusicbrainz/find-neon.patch
new file mode 100644
index 000000000000..2230c46018e5
--- /dev/null
+++ b/pkgs/development/libraries/libmusicbrainz/find-neon.patch
@@ -0,0 +1,52 @@
+diff --git a/cmake/modules/FindNeon.cmake b/cmake/modules/FindNeon.cmake
+index 0a6b300..dbd6194 100644
+--- a/cmake/modules/FindNeon.cmake
++++ b/cmake/modules/FindNeon.cmake
+@@ -1,10 +1,10 @@
+ INCLUDE(UsePkgConfig)
+ PKGCONFIG(neon _NeonIncDir _NeonLinkDir _NeonLinkFlags _NeonCflags)
+ 
+-FIND_PATH(NEON_INCLUDE_DIR ne_request.h
++FIND_PATH(NEON_INCLUDE_DIR neon/ne_request.h
+     ${_NeonIncDir}
+-    /usr/include/neon
+-    /usr/local/include/neon
++    /usr/include
++    /usr/local/include
+ )
+ 
+ FIND_LIBRARY(NEON_LIBRARIES neon
+diff --git a/src/utils_private.cpp b/src/utils_private.cpp
+index 751b4a7..5a06eca 100644
+--- a/src/utils_private.cpp
++++ b/src/utils_private.cpp
+@@ -26,7 +26,7 @@
+ #include <cstdarg>
+ #include <iostream>
+ #include <map>
+-#include <ne_uri.h> 
++#include <neon/ne_uri.h> 
+ #include "utils_private.h"
+ 
+ using namespace std;
+diff --git a/src/webservice.cpp b/src/webservice.cpp
+index cd483f9..483f486 100644
+--- a/src/webservice.cpp
++++ b/src/webservice.cpp
+@@ -26,11 +26,11 @@
+ #include <iostream>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <ne_session.h>
+-#include <ne_request.h>
+-#include <ne_utils.h>
+-#include <ne_auth.h>
+-#include <ne_uri.h> 
++#include <neon/ne_session.h>
++#include <neon/ne_request.h>
++#include <neon/ne_utils.h>
++#include <neon/ne_auth.h>
++#include <neon/ne_uri.h> 
+ #include <musicbrainz3/webservice.h>
+ #include <musicbrainz3/artist.h>
+ #include "utils_private.h"
diff --git a/pkgs/development/libraries/libmusicbrainz/gcc-4.x.patch b/pkgs/development/libraries/libmusicbrainz/gcc-4.x.patch
new file mode 100644
index 000000000000..f55c4f2cd41b
--- /dev/null
+++ b/pkgs/development/libraries/libmusicbrainz/gcc-4.x.patch
@@ -0,0 +1,60 @@
+diff --git a/lib/c_wrapper.cpp b/lib/c_wrapper.cpp
+index deae11d..ebc7854 100644
+--- a/lib/c_wrapper.cpp
++++ b/lib/c_wrapper.cpp
+@@ -24,6 +24,7 @@
+ #include "musicbrainz.h"
+ #include "trm.h"
+ #include "mb_c.h"
++#include <string.h>
+ 
+ extern "C"
+ {
+diff --git a/lib/comhttpsocket.cpp b/lib/comhttpsocket.cpp
+index 067313b..4371772 100644
+--- a/lib/comhttpsocket.cpp
++++ b/lib/comhttpsocket.cpp
+@@ -20,6 +20,7 @@
+ #endif
+ #include <stdlib.h>
+ #include <assert.h>
++#include <string.h>
+ 
+ const char* g_strCOMVer = "libmusicbrainz/"VERSION;
+ 
+diff --git a/lib/comsocket.cpp b/lib/comsocket.cpp
+index 01a94be..7bfc4dd 100644
+--- a/lib/comsocket.cpp
++++ b/lib/comsocket.cpp
+@@ -44,6 +44,7 @@ ____________________________________________________________________________*/
+ #include <net/if.h>
+ #include <sys/ioctl.h>
+ #endif
++#include <string.h>
+ 
+ #define mb_socklen_t ACCEPT_ARG3
+ 
+diff --git a/lib/http.cpp b/lib/http.cpp
+index 85390a3..e63713c 100644
+--- a/lib/http.cpp
++++ b/lib/http.cpp
+@@ -67,6 +67,7 @@
+ #ifdef __QNX__
+ #include <strings.h>
+ #endif
++#include <string.h>
+ 
+ using namespace std;
+ 
+diff --git a/lib/sigclient.cpp b/lib/sigclient.cpp
+index 9f76008..4bbbaae 100644
+--- a/lib/sigclient.cpp
++++ b/lib/sigclient.cpp
+@@ -32,6 +32,7 @@ email                : ijr@relatable.com
+ #ifdef WIN32
+ #pragma warning(disable:4786)
+ #endif
++#include <string.h>
+ 
+ #include "sigclient.h"
+ #include "comhttpsocket.h"
diff --git a/pkgs/development/libraries/libmusicbrainz/missing-include.patch b/pkgs/development/libraries/libmusicbrainz/missing-include.patch
new file mode 100644
index 000000000000..2a1d2b38cae7
--- /dev/null
+++ b/pkgs/development/libraries/libmusicbrainz/missing-include.patch
@@ -0,0 +1,12 @@
+diff --git a/src/utils_private.cpp b/src/utils_private.cpp
+index 2abe857..751b4a7 100644
+--- a/src/utils_private.cpp
++++ b/src/utils_private.cpp
+@@ -21,6 +21,7 @@
+  */
+  
+ #include <cstdlib>
++#include <cstdio>
+ #include <cstring>
+ #include <cstdarg>
+ #include <iostream>
diff --git a/pkgs/development/libraries/libnice/default.nix b/pkgs/development/libraries/libnice/default.nix
index 58e59e7621fb..1f3134b3cfb2 100644
--- a/pkgs/development/libraries/libnice/default.nix
+++ b/pkgs/development/libraries/libnice/default.nix
@@ -12,5 +12,13 @@ stdenv.mkDerivation {
 
   meta = {
     homepage = http://nice.freedesktop.org/wiki/;
+    description = "The GLib ICE implementation";
+    longDescription = ''
+      Libnice is an implementation of the IETF's Interactice Connectivity
+      Establishment (ICE) standard (RFC 5245) and the Session Traversal
+      Utilities for NAT (STUN) standard (RFC 5389).
+
+      It provides a GLib-based library, libnice and a Glib-free library,
+      libstun as well as GStreamer elements.'';
   };
 }
diff --git a/pkgs/development/libraries/libofa/default.nix b/pkgs/development/libraries/libofa/default.nix
new file mode 100644
index 000000000000..437726d6976f
--- /dev/null
+++ b/pkgs/development/libraries/libofa/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, fetchurl, expat, curl, fftw }:
+
+stdenv.mkDerivation rec {
+  name = "libofa-0.9.3";
+
+  propagatedBuildInputs = [ expat curl fftw ];
+
+  patches = [ ./libofa-0.9.3-gcc-4.patch ./libofa-0.9.3-gcc-4.3.patch ./gcc-4.x.patch ];
+
+  src = fetchurl {
+    url = "http://musicip-libofa.googlecode.com/files/${name}.tar.gz";
+    sha256 = "184ham039l7lwhfgg0xr2vch2xnw1lwh7sid432mh879adhlc5h2";
+  };
+
+  meta = {
+    homepage = http://code.google.com/musicip-libofa/;
+    description = "LibOFA - Library Open Fingerprint Architecture";
+    longDescription = ''
+      LibOFA (Library Open Fingerprint Architecture) is an open-source audio
+      fingerprint created and provided by MusicIP'';
+  };
+}
diff --git a/pkgs/development/libraries/libofa/gcc-4.x.patch b/pkgs/development/libraries/libofa/gcc-4.x.patch
new file mode 100644
index 000000000000..50f72bb428c6
--- /dev/null
+++ b/pkgs/development/libraries/libofa/gcc-4.x.patch
@@ -0,0 +1,12 @@
+diff --git a/examples/example.cpp b/examples/example.cpp
+index ef978d5..7d58a0f 100644
+--- a/examples/example.cpp
++++ b/examples/example.cpp
+@@ -10,6 +10,7 @@
+ #include "protocol.h"
+ 
+ #include <string.h>
++#include <stdio.h>
+  
+ AudioData* loadWaveFile(char *file);
+ AudioData* loadDataUsingLAME(char *file);
diff --git a/pkgs/development/libraries/libofa/libofa-0.9.3-gcc-4.3.patch b/pkgs/development/libraries/libofa/libofa-0.9.3-gcc-4.3.patch
new file mode 100644
index 000000000000..7682e3710514
--- /dev/null
+++ b/pkgs/development/libraries/libofa/libofa-0.9.3-gcc-4.3.patch
@@ -0,0 +1,36 @@
+Fix build with gcc >=4.3
+diff -ur libofa-0.9.3.orig/examples/example.cpp libofa-0.9.3/examples/example.cpp
+--- libofa-0.9.3.orig/examples/example.cpp	2006-05-10 21:05:37.000000000 +0300
++++ libofa-0.9.3/examples/example.cpp	2008-04-16 15:51:49.000000000 +0300
+@@ -9,6 +9,8 @@
+ 
+ #include "protocol.h"
+ 
++#include <string.h>
++ 
+ AudioData* loadWaveFile(char *file);
+ AudioData* loadDataUsingLAME(char *file);
+ 
+Vain hakemistossa libofa-0.9.3/examples: example.cpp.orig
+diff -ur libofa-0.9.3.orig/examples/protocol.cpp libofa-0.9.3/examples/protocol.cpp
+--- libofa-0.9.3.orig/examples/protocol.cpp	2006-05-10 21:05:42.000000000 +0300
++++ libofa-0.9.3/examples/protocol.cpp	2008-04-16 15:51:49.000000000 +0300
+@@ -8,6 +8,7 @@
+ -------------------------------------------------------------------*/
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <cstring>
+ #include <string>
+ #include <map>
+ #include <expat.h>
+diff -ur libofa-0.9.3.orig/lib/signal_op.cpp libofa-0.9.3/lib/signal_op.cpp
+--- libofa-0.9.3.orig/lib/signal_op.cpp	2006-05-10 21:01:12.000000000 +0300
++++ libofa-0.9.3/lib/signal_op.cpp	2008-04-16 15:51:49.000000000 +0300
+@@ -12,6 +12,7 @@
+ // DATE CREATED: 1/12/06
+ 
+ 
++#include <cstdlib>
+ #include <math.h>
+ #include "signal_op.h"
+ #include "AFLIB/aflibConverter.h"
diff --git a/pkgs/development/libraries/libofa/libofa-0.9.3-gcc-4.patch b/pkgs/development/libraries/libofa/libofa-0.9.3-gcc-4.patch
new file mode 100644
index 000000000000..920c383c657b
--- /dev/null
+++ b/pkgs/development/libraries/libofa/libofa-0.9.3-gcc-4.patch
@@ -0,0 +1,39 @@
+--- a/lib/JAMA/tnt_math_utils.h	2006-06-17 01:46:22.000000000 +0300
++++ b/lib/JAMA/tnt_math_utils.h	2006-06-17 01:47:02.000000000 +0300
+@@ -20,11 +20,20 @@
+ namespace TNT

+ {

+ /**

++	@returns the absolute value of a real (no-complex) scalar.

++*/

++template <class Real>

++Real abs(const Real &a)

++{

++	return  (a > 0 ? a : -a);

++}

++/**

+ 	@returns hypotenuse of real (non-complex) scalars a and b by 

+ 	avoiding underflow/overflow

+ 	using (a * sqrt( 1 + (b/a) * (b/a))), rather than

+ 	sqrt(a*a + b*b).

+ */

++

+ template <class Real>

+ Real hypot(const Real &a, const Real &b)

+ {

+@@ -56,15 +65,6 @@
+ }

+ */

+ 

+-/**

+-	@returns the absolute value of a real (no-complex) scalar.

+-*/

+-template <class Real>

+-Real abs(const Real &a)

+-{

+-	return  (a > 0 ? a : -a);

+-}

+-

+ }

+ #endif

+ /* MATH_UTILS_H */

diff --git a/pkgs/development/libraries/libpcap/default.nix b/pkgs/development/libraries/libpcap/default.nix
index cb01c2b47dbf..7ec95f03eff7 100644
--- a/pkgs/development/libraries/libpcap/default.nix
+++ b/pkgs/development/libraries/libpcap/default.nix
@@ -21,4 +21,9 @@ stdenv.mkDerivation rec {
     dontStrip = true;
     configureFlags = [ "--with-pcap=linux" "ac_cv_linux_vers=2" ];
   };
+
+  meta = {
+    homepage = http://www.tcpdump.org;
+    description = "Packet Capture Library";
+  };
 }
diff --git a/pkgs/development/libraries/libtunepimp/default.nix b/pkgs/development/libraries/libtunepimp/default.nix
new file mode 100644
index 000000000000..e1279a566675
--- /dev/null
+++ b/pkgs/development/libraries/libtunepimp/default.nix
@@ -0,0 +1,16 @@
+{ stdenv, fetchurl, zlib, expat, curl, libmusicbrainz2, taglib, libmpcdec,
+  libmad, libogg, libvorbis, flac, mp4v2, libofa, libtool }:
+
+stdenv.mkDerivation rec {
+  name = "libtunepimp-0.5.3";
+
+  propagatedBuildInputs = [ zlib expat curl libmusicbrainz2 taglib libmpcdec
+    libmad libogg libvorbis flac libofa libtool ];
+
+  patches = [ ./gcc-4.x.patch ];
+
+  src = fetchurl {
+    url = "ftp://ftp.musicbrainz.org/pub/musicbrainz/${name}.tar.gz";
+    sha256 = "0s141zmsxv8xlivcgcmy6xhk9cyjjxmr1fy45xiqfqrqpsh485rl";
+  };
+}
diff --git a/pkgs/development/libraries/libtunepimp/gcc-4.x.patch b/pkgs/development/libraries/libtunepimp/gcc-4.x.patch
new file mode 100644
index 000000000000..92219ea6f9ba
--- /dev/null
+++ b/pkgs/development/libraries/libtunepimp/gcc-4.x.patch
@@ -0,0 +1,177 @@
+diff --git a/include/tunepimp-0.5/metadata.h b/include/tunepimp-0.5/metadata.h
+index f9bab5d..ea08cf5 100644
+--- a/include/tunepimp-0.5/metadata.h
++++ b/include/tunepimp-0.5/metadata.h
+@@ -29,6 +29,7 @@
+ 
+ #include <string>
+ #include <cstdio>
++#include <cstring>
+ 
+ #include "defs.h"
+ #include "tp_c.h"
+diff --git a/lib/c_wrapper.cpp b/lib/c_wrapper.cpp
+index 760cc08..66c6111 100644
+--- a/lib/c_wrapper.cpp
++++ b/lib/c_wrapper.cpp
+@@ -43,6 +43,7 @@
+                          if (obj == NULL) return;
+ 
+ #include <deque>
++#include <cstdlib>
+ 
+ class NotifyData
+ {
+diff --git a/lib/fileio.cpp b/lib/fileio.cpp
+index a1602da..abe2b24 100644
+--- a/lib/fileio.cpp
++++ b/lib/fileio.cpp
+@@ -27,6 +27,8 @@
+ 
+ #include <assert.h>
+ #include <errno.h>
++#include <string.h>
++#include <stdlib.h>
+ #include <string>
+ #ifndef WIN32
+ #include <unistd.h>
+@@ -122,7 +124,8 @@ int taccess(const char *pathname, int mode, const char *encoding)
+ 
+ void tmktempname(const char *path, char *newPath, int newPathLen)
+ {
+-    char *ptr, *temp;
++    char *temp;
++	const char *ptr;
+ 
+     temp = (char *)malloc(strlen(path) + 32);
+     ptr = strrchr(path, dirSepChar);
+diff --git a/lib/metadata.cpp b/lib/metadata.cpp
+index 0a1a70a..dcd0aa1 100644
+--- a/lib/metadata.cpp
++++ b/lib/metadata.cpp
+@@ -24,8 +24,9 @@
+    $Id: metadata.cpp 8359 2006-08-07 20:34:50Z luks $
+ 
+ ----------------------------------------------------------------------------*/
+-#include <math.h>
+-#include <stdio.h>
++#include <cmath>
++#include <cstdio>
++#include <cstdlib>
+ #include "metadata.h"
+ #include "../config.h"
+ using namespace std;
+diff --git a/lib/protocol.cpp b/lib/protocol.cpp
+index 83e8b33..3436f80 100644
+--- a/lib/protocol.cpp
++++ b/lib/protocol.cpp
+@@ -8,6 +8,7 @@
+ -------------------------------------------------------------------*/
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <string>
+ #include <map>
+ #include <expat.h>
+diff --git a/lib/readmeta.cpp b/lib/readmeta.cpp
+index 7f325de..5e5513a 100644
+--- a/lib/readmeta.cpp
++++ b/lib/readmeta.cpp
+@@ -30,7 +30,8 @@
+ #endif
+ #endif
+ 
+-#include <stdio.h>
++#include <cstdio>
++#include <cstdlib>
+ #ifndef WIN32
+ #include <unistd.h>
+ #endif
+diff --git a/lib/tunepimp.cpp b/lib/tunepimp.cpp
+index bf09383..f1b9b56 100644
+--- a/lib/tunepimp.cpp
++++ b/lib/tunepimp.cpp
+@@ -30,7 +30,8 @@
+ #endif
+ #endif
+ 
+-#include <stdio.h>
++#include <cstdio>
++#include <cstdlib>
+ #include <map>
+ using namespace std;
+ 
+diff --git a/lib/utf8/utf8util.cpp b/lib/utf8/utf8util.cpp
+index a066956..6ea86e4 100644
+--- a/lib/utf8/utf8util.cpp
++++ b/lib/utf8/utf8util.cpp
+@@ -26,6 +26,7 @@
+ ----------------------------------------------------------------------------*/
+ 
+ #include <stdio.h>
++#include <stdlib.h>
+ #include "utf8util.h"
+ #include "utf8.h"
+ #ifdef WIN32
+diff --git a/plugins/mp3/id3_2_3_meta.cpp b/plugins/mp3/id3_2_3_meta.cpp
+index fa9a7e0..efac1c9 100644
+--- a/plugins/mp3/id3_2_3_meta.cpp
++++ b/plugins/mp3/id3_2_3_meta.cpp
+@@ -26,6 +26,7 @@
+ ----------------------------------------------------------------------------*/
+ 
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <assert.h>
+ #include <ctype.h>
+ #include <musicbrainz/mb_c.h>
+diff --git a/plugins/mp3/id3_meta.cpp b/plugins/mp3/id3_meta.cpp
+index d860bf6..804ca5c 100644
+--- a/plugins/mp3/id3_meta.cpp
++++ b/plugins/mp3/id3_meta.cpp
+@@ -26,6 +26,7 @@
+ ----------------------------------------------------------------------------*/
+ 
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <time.h>
+ #include <ctype.h>
+ #include <musicbrainz/mb_c.h>
+diff --git a/plugins/mp4/mp4.cpp b/plugins/mp4/mp4.cpp
+index 9f741e3..dcc7ec9 100644
+--- a/plugins/mp4/mp4.cpp
++++ b/plugins/mp4/mp4.cpp
+@@ -27,7 +27,8 @@
+ 
+ #include <string.h>
+ #include <stdio.h>
+-#include <mp4.h>
++#include <stdlib.h>
++#include <mp4v2/mp4v2.h>
+ #include "metadata.h"
+ #include "plugin.h"
+ #ifndef WIN32
+diff --git a/plugins/wma/wma.cpp b/plugins/wma/wma.cpp
+index 3d7a50a..a28901c 100644
+--- a/plugins/wma/wma.cpp
++++ b/plugins/wma/wma.cpp
+@@ -27,6 +27,7 @@
+ 
+ #include <string.h>
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <wmafile.h>
+ #include "metadata.h"
+ #include "plugin.h"
+diff --git a/plugins/wma/wmafile.cpp b/plugins/wma/wmafile.cpp
+index 1b38af8..31fa150 100644
+--- a/plugins/wma/wmafile.cpp
++++ b/plugins/wma/wmafile.cpp
+@@ -19,6 +19,7 @@
+  *   USA                                                                   *
+  ***************************************************************************/
+ 
++#include <string.h>
+ #include <tstring.h>
+ #include <wmafile.h>
+ #include <wmatag.h>
diff --git a/pkgs/development/libraries/mp4v2/default.nix b/pkgs/development/libraries/mp4v2/default.nix
new file mode 100644
index 000000000000..d681713f516a
--- /dev/null
+++ b/pkgs/development/libraries/mp4v2/default.nix
@@ -0,0 +1,17 @@
+{ stdenv, fetchurl, help2man }:
+
+stdenv.mkDerivation rec {
+  name = "mp4v2-1.9.1";
+
+  buildInputs = [ help2man ];
+  src = fetchurl {
+    url = "http://mp4v2.googlecode.com/files/${name}.tar.bz2";
+    sha256 = "1d73qbi0faqad3bpmjfr4kk0mfmqpl1f43ysrx4gq9i3mfp1qf2w";
+  };
+
+  meta = {
+    homepage = http://code.google.com/p/mp4v2;
+    maintainers = [ stdenv.lib.maintainers.urkud ];
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/pkgs/development/libraries/muparser/default.nix b/pkgs/development/libraries/muparser/default.nix
index 5ba196542d0f..009b6c9ddfe4 100644
--- a/pkgs/development/libraries/muparser/default.nix
+++ b/pkgs/development/libraries/muparser/default.nix
@@ -1,9 +1,15 @@
 {stdenv, fetchurl}:
 
 stdenv.mkDerivation {
-	name = "muparser-1.30";
+	name = "muparser-1.34";
 	src = fetchurl {
-		url = mirror://sourceforge/muparser/muparser_v130.tar.gz;
-		sha256 = "164wak2sva6z9vq3anrciz1npyk2x3wqkz6xwp9ld3gmdqbdn8s4";
+		url = mirror://sourceforge/muparser/muparser_v134.tar.gz;
+		sha256 = "0xi27xjj7bwwf5nw3n2lynpr76al3vp204zwh71wkfnhwbzksg8f";
 	};
+
+  meta = {
+    homepage = http://muparser.sourceforge.net;
+    description = "An extensible high performance math expression parser library written in C++";
+    license = "MIT";
+  };
 }
diff --git a/pkgs/development/libraries/opal/default.nix b/pkgs/development/libraries/opal/default.nix
new file mode 100644
index 000000000000..23615d6646d2
--- /dev/null
+++ b/pkgs/development/libraries/opal/default.nix
@@ -0,0 +1,56 @@
+x@{builderDefsPackage
+  , doxygen, pkgconfig, ptlib, srtp, libtheora, speex
+  , ffmpeg, x264, cyrus_sasl, openldap, openssl, expat, unixODBC
+  , ...}:
+builderDefsPackage
+(a :  
+let 
+  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 
+    [];
+
+  buildInputs = map (n: builtins.getAttr n x)
+    (builtins.attrNames (builtins.removeAttrs x helperArgNames));
+  sourceInfo = rec {
+    baseName="opal";
+    baseVersion="3.6";
+    patchlevel="8";
+    version="${baseVersion}.${patchlevel}";
+    name="${baseName}-${version}";
+    url="mirror://gnome/sources/${baseName}/${baseVersion}/${name}.tar.bz2";
+    hash="0359wqmrxqajd94sw3q2dn6n6y3caggavwdcmzyn6maw7srspgwc";
+  };
+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 = ["setVars" "doConfigure" "doMakeInstall"];
+  configureFlags = [
+    "--enable-h323"
+  ];
+  setVars = a.noDepEntry (''
+    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -D__STDC_CONSTANT_MACROS=1"
+  '');
+      
+  meta = {
+    description = "OPAL VoIP library";
+    maintainers = with a.lib.maintainers;
+    [
+      raskin
+    ];
+    platforms = with a.lib.platforms;
+      linux;
+  };
+  passthru = {
+    updateInfo = {
+      downloadPage = "http://ftp.gnome.org/pub/GNOME/sources/opal";
+    };
+  };
+}) x
+
diff --git a/pkgs/development/libraries/ortp/default.nix b/pkgs/development/libraries/ortp/default.nix
index 67d93152c2b9..a561018e1575 100644
--- a/pkgs/development/libraries/ortp/default.nix
+++ b/pkgs/development/libraries/ortp/default.nix
@@ -1,11 +1,11 @@
 {stdenv, fetchurl}:
 
 stdenv.mkDerivation rec {
-  name = "ortp-0.13.1";
+  name = "ortp-0.16.3";
 
   src = fetchurl {
     url = "mirror://savannah/linphone/ortp/sources/${name}.tar.gz";
-    sha256 = "0k2963v4b15xnf4cpkpgjhsb8ckxpf6vdr8dnw7z3mzilji7391b";
+    sha256 = "13805ec34ee818408aa1b4571915ef8f9e544c838a0fca9dff8d2308de6574eb";
   };
 
   meta = {
diff --git a/pkgs/development/libraries/osip/default.nix b/pkgs/development/libraries/osip/default.nix
new file mode 100644
index 000000000000..e63bbbb151df
--- /dev/null
+++ b/pkgs/development/libraries/osip/default.nix
@@ -0,0 +1,20 @@
+{stdenv, fetchurl}:
+stdenv.mkDerivation rec {
+  version = "3.3.0";
+  src = fetchurl {
+    url = "mirror://gnu/osip/libosip2-${version}.tar.gz";
+    sha256 = "08gqll8c7y9hzzs80cal7paxn6knnhbfkvzdaxs2sssrmbg2hpnl";
+  };
+  name = "libosip2-${version}";
+      
+  meta = {
+    license = "LGPLv2.1+";
+    description = "GNU oSIP library ";
+    maintainers = with stdenv.lib.maintainers;
+    [
+      raskin
+    ];
+    platforms = with stdenv.lib.platforms;
+      linux;
+  };
+}
diff --git a/pkgs/development/libraries/podofo/default.nix b/pkgs/development/libraries/podofo/default.nix
index 270d4da23deb..0d18c37987ee 100644
--- a/pkgs/development/libraries/podofo/default.nix
+++ b/pkgs/development/libraries/podofo/default.nix
@@ -1,12 +1,20 @@
 {stdenv, fetchurl, cmake, zlib, freetype, libjpeg, libtiff, fontconfig,
-openssl}:
+openssl, libpng, lua5}:
 
 stdenv.mkDerivation rec {
-  name = "podofo-0.7.0";
+  name = "podofo-0.8.2";
   src = fetchurl {
     url = "mirror://sourceforge/podofo/${name}.tar.gz";
-    sha256 = "1hpd5ldjv013041rmcfrkbk8v6wdpxcg60i3aklik583q2rf0mqy";
+    sha256 = "064cgrvjvy57n5i25d4j7yx5wd3wgkdks448bzc3a8nsmyl08skq";
   };
-  buildInputs = [ cmake zlib freetype libjpeg libtiff fontconfig openssl ];
+  propagatedBuildInputs = [ zlib freetype libjpeg libtiff fontconfig openssl libpng ];
+  buildInputs = [ cmake lua5 stdenv.gcc.libc ];
   cmakeFlags = "-DPODOFO_BUILD_SHARED=ON -DPODOFO_BUILD_STATIC=OFF";
+
+  meta = {
+    homepage = http://podofo.sourceforge.net;
+    description = "A library to work with the PDF file format";
+    platforms = stdenv.lib.platforms.all;
+    maintainers = [ stdenv.lib.maintainers.urkud ];
+  };
 }
diff --git a/pkgs/development/libraries/ptlib/default.nix b/pkgs/development/libraries/ptlib/default.nix
new file mode 100644
index 000000000000..be1e6fdb4a58
--- /dev/null
+++ b/pkgs/development/libraries/ptlib/default.nix
@@ -0,0 +1,50 @@
+x@{builderDefsPackage
+  , autoconf, automake, libtool, doxygen, pkgconfig, bison, flex, unixODBC
+  , openssl, openldap, cyrus_sasl, krb5, expat, SDL, libdv, libv4l, alsaLib
+  , ...}:
+builderDefsPackage
+(a :  
+let 
+  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 
+    [];
+
+  buildInputs = map (n: builtins.getAttr n x)
+    (builtins.attrNames (builtins.removeAttrs x helperArgNames));
+  sourceInfo = rec {
+    baseName="ptlib";
+    baseVersion="2.6";
+    patchlevel="7";
+    version="${baseVersion}.${patchlevel}";
+    name="${baseName}-${version}";
+    url="mirror://gnome/sources/${baseName}/${baseVersion}/${name}.tar.bz2";
+    hash="0zxrygl2ivbciqf97yd9n67ch9vd9gp236w96i6ia8fxzqjq5lkx";
+  };
+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 = ["doConfigure" "doMakeInstall"];
+      
+  meta = {
+    description = "Portable Tools from OPAL VoIP";
+    maintainers = with a.lib.maintainers;
+    [
+      raskin
+    ];
+    platforms = with a.lib.platforms;
+      linux;
+  };
+  passthru = {
+    updateInfo = {
+      downloadPage = "http://ftp.gnome.org/sources/ptlib/";
+    };
+  };
+}) x
+
diff --git a/pkgs/development/libraries/qt-4.x/4.7/default.nix b/pkgs/development/libraries/qt-4.x/4.7/default.nix
index b0fb326f002e..5de15d2f71c3 100644
--- a/pkgs/development/libraries/qt-4.x/4.7/default.nix
+++ b/pkgs/development/libraries/qt-4.x/4.7/default.nix
@@ -8,7 +8,7 @@
 , buildDemos ? false, buildExamples ? false, useDocs ? true}:
 
 let
-  v = "4.7.0-beta2";
+  v = "4.7.0-rc1";
 in
 
 stdenv.mkDerivation rec {
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "ftp://ftp.qt.nokia.com/qt/source/qt-everywhere-opensource-src-${v}.tar.gz";
-    sha256 = "1gxckb5pxybnj5413dxk7dm8hm945ymm4ppqwg14wfk83zhnw6g0";
+    sha256 = "1bfvd42sdabb86m823yzbzgcy1sibd4ypz2wqaazd77ji768dn2r";
   };
 
   preConfigure = ''
@@ -27,7 +27,8 @@ stdenv.mkDerivation rec {
       -importdir $out/lib/qt4/imports
       -examplesdir $out/share/doc/${name}/examples
       -demosdir $out/share/doc/${name}/demos
-      -datadir $out/share/qt4
+      -datadir $out/share/${name}
+      -translationdir $out/share/${name}/translations
     "
   '';
 
diff --git a/pkgs/development/libraries/srtp/default.nix b/pkgs/development/libraries/srtp/default.nix
new file mode 100644
index 000000000000..887c0c7c1a3c
--- /dev/null
+++ b/pkgs/development/libraries/srtp/default.nix
@@ -0,0 +1,47 @@
+x@{builderDefsPackage
+  , autoconf, automake, libtool, doxygen, procps
+  , ...}:
+builderDefsPackage
+(a :  
+let 
+  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 
+    [];
+
+  buildInputs = map (n: builtins.getAttr n x)
+    (builtins.attrNames (builtins.removeAttrs x helperArgNames));
+  sourceInfo = rec {
+    baseName="srtp";
+    version="1.4.2";
+    name="${baseName}-${version}";
+    url="http://srtp.sourceforge.net/${name}.tgz";
+    hash="1497mcxharnhiccjhny30g4wlv28ckdxhj14jrwvdnnvhl80jf43";
+  };
+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 = ["doConfigure" "doMakeInstall"];
+      
+  meta = {
+    description = "Secure RTP";
+    maintainers = with a.lib.maintainers;
+    [
+      raskin
+    ];
+    platforms = with a.lib.platforms;
+      linux;
+  };
+  passthru = {
+    updateInfo = {
+      downloadPage = "http://srtp.sourceforge.net/download.html";
+    };
+  };
+}) x
+
diff --git a/pkgs/development/libraries/t1lib/default.nix b/pkgs/development/libraries/t1lib/default.nix
index a3ebe5e27ca1..9a4ba00e1d33 100644
--- a/pkgs/development/libraries/t1lib/default.nix
+++ b/pkgs/development/libraries/t1lib/default.nix
@@ -1,11 +1,13 @@
 {stdenv, fetchurl, x11, libXaw, libXpm}:
 
 stdenv.mkDerivation {
-  name = "t1lib-5.1.0";
+  name = "t1lib-5.1.2";
+
   src = fetchurl {
-    url = ftp://ftp.nluug.nl/pub/metalab/libs/graphics/t1lib-5.1.1.tar.gz;
-    sha256 = "0r1wb94kjd8jwym9na2k2snikizrnyc4cf4mf92v89r4yy0apph8";
+    url = "ftp://ftp.nluug.nl/pub/metalab/libs/graphics/t1lib-5.1.2.tar.gz";
+    sha256 = "0nbvjpnmcznib1nlgg8xckrmsw3haa154byds2h90y2g0nsjh4w2";
   };
+
   buildInputs = [x11 libXaw libXpm];
   buildFlags = "without_doc";
 }
diff --git a/pkgs/development/python-modules/pygobject/default.nix b/pkgs/development/python-modules/pygobject/default.nix
index 4007b7210117..bb60ec66291c 100644
--- a/pkgs/development/python-modules/pygobject/default.nix
+++ b/pkgs/development/python-modules/pygobject/default.nix
@@ -8,4 +8,16 @@ stdenv.mkDerivation {
   };
 
   buildInputs = [python pkgconfig glib];
+
+  postInstall = ''
+    # All python code is installed into a "gtk-2.0" sub-directory. That
+    # sub-directory may be useful on systems which share several library
+    # versions in the same prefix, i.e. /usr/local, but on Nix that directory
+    # is useless. Furthermore, its existence makes it very hard to guess a
+    # proper $PYTHONPATH that allows "import gtk" to succeed.
+    cd $(toPythonPath $out)/gtk-2.0
+    for n in *; do
+      ln -s "gtk-2.0/$n" "../$n"
+    done
+  '';
 }
diff --git a/pkgs/development/python-modules/pygtk/default.nix b/pkgs/development/python-modules/pygtk/default.nix
index d4dd12370941..48c8ebfa87a4 100644
--- a/pkgs/development/python-modules/pygtk/default.nix
+++ b/pkgs/development/python-modules/pygtk/default.nix
@@ -2,11 +2,11 @@
   , libglade ? null}:
 
 stdenv.mkDerivation {
-  name = "pygtk-2.16.0";
+  name = "pygtk-2.17.0";
 
   src = fetchurl {
-    url = http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.16/pygtk-2.16.0.tar.bz2;
-    sha256 = "1a24fkxslir8zb800hs4ix9iyvgqsy5c6hdfirrh2yi1mw0mxbkz";
+    url = http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.17/pygtk-2.17.0.tar.bz2;
+    sha256 = "000l3wrcj0ghid045n6ipqg4q4zci51z9k9fqw4n4p3n5rx82qba";
   };
 
   buildInputs = [python pkgconfig glib gtk]
diff --git a/pkgs/development/python-modules/pyqt/default.nix b/pkgs/development/python-modules/pyqt/default.nix
index e9d9ee760643..94c5b99e4dbb 100644
--- a/pkgs/development/python-modules/pyqt/default.nix
+++ b/pkgs/development/python-modules/pyqt/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, python, sip, qt4}:
+{stdenv, fetchurl, python, sip, qt4, pythonDBus, pkgconfig, lndir, makeWrapper }:
 
 stdenv.mkDerivation {
   name = "pyqt-x11-gpl-4.7.4";
@@ -8,9 +8,32 @@ stdenv.mkDerivation {
     sha256 = "0a7iqzp75hd29rvwhyqfmaj5ymd49wq8scysjkivhc5qkx5rh00r";
   };
   
-  configurePhase = "python ./configure.py --confirm-license -b $out/bin -d $out/lib/${python.libPrefix}/site-packages -v $out/share/sip -p $out/plugins";
+  preConfigure = ''
+    ensureDir $out
+    lndir ${pythonDBus} $out
+    export PYTHONPATH=$PYTHONPATH:$out/lib/${python.libPrefix}/site-packages
+    configureFlagsArray=( \
+      --confirm-license --bindir $out/bin \
+      --destdir $out/lib/${python.libPrefix}/site-packages \
+      --plugin-destdir $out/lib/qt4/plugins --sipdir $out/share/sip \
+      --dbus=$out/include/dbus-1.0 --verbose)
+    '';
+
+  configureScript="./configure.py";
+
+  configurePhase = ''
+    runHook preConfigure
+    python configure.py $configureFlags "''${configureFlagsArray[@]}"
+    runHook postConfigure'';
   
-  buildInputs = [ python sip qt4 ];
+  propagatedBuildInputs = [ python sip qt4 ]
+    ++ pythonDBus.propagatedBuildNativeInputs;
+  buildInputs = [ pkgconfig makeWrapper lndir ];
+
+  postInstall = ''
+    for i in $out/bin/*; do
+      wrapProgram $i --prefix PYTHONPATH : "$PYTHONPATH"
+    done'';
   
   meta = {
     description = "Python bindings for Qt";
diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix
index d6cbcccc517c..cc5fce60e72f 100644
--- a/pkgs/development/tools/build-managers/cmake/default.nix
+++ b/pkgs/development/tools/build-managers/cmake/default.nix
@@ -1,31 +1,37 @@
-{fetchurl, stdenv, replace, ncurses}:
+{fetchurl, stdenv, replace, curl, expat, zlib
+, useNcurses ? false, ncurses, useQt4 ? false, qt4}:
 
 stdenv.mkDerivation rec {
-  name = "cmake-2.8.1";
+  name = "cmake-${majorVersion}.1";
 
-  # We look for cmake modules in .../share/cmake-${majorVersion}/Modules.
   majorVersion = "2.8";
 
-  setupHook = ./setup-hook.sh;
-
-  meta = {
-    homepage = http://www.cmake.org/;
-    description = "Cross-Platform Makefile Generator";
-  };
-
   src = fetchurl {
     url = "http://www.cmake.org/files/v${majorVersion}/${name}.tar.gz";
     sha256 = "0hi28blqxvir0dkhln90sgr0m3ri9n2i3hlmwdl4m5vkfsmp9bky";
   };
 
+  buildInputs = [ curl expat zlib ]
+    ++ stdenv.lib.optional useNcurses ncurses
+    ++ stdenv.lib.optional useQt4 qt4;
+
+  CMAKE_PREFIX_PATH = stdenv.lib.concatStringsSep ":" buildInputs;
+  configureFlags =
+    "--docdir=/share/doc/${name} --mandir=/share/man --system-libs"
+    + stdenv.lib.optionalString useQt4 " --qt-gui";
+
+  setupHook = ./setup-hook.sh;
+
   postUnpack = ''
     dontUseCmakeConfigure=1
     source $setupHook
     fixCmakeFiles $sourceRoot
-    echo 'SET (CMAKE_SYSTEM_PREFIX_PATH "'${ncurses}'" CACHE FILEPATH "Root for libs for cmake" FORCE)' > $sourceRoot/cmakeInit.txt
   '';
 
-  configureFlags= [ " --init=cmakeInit.txt " ];
-
-  postInstall = "fixCmakeFiles $out/share";
+  meta = {
+    homepage = http://www.cmake.org/;
+    description = "Cross-Platform Makefile Generator";
+    platforms = if useQt4 then qt4.meta.platforms else stdenv.lib.platforms.all;
+    maintainers = [ stdenv.lib.maintainers.urkud ];
+  };
 }
diff --git a/pkgs/development/tools/build-managers/cmake/setup-hook.sh b/pkgs/development/tools/build-managers/cmake/setup-hook.sh
index 71afcefe3cb6..21d71628c077 100755
--- a/pkgs/development/tools/build-managers/cmake/setup-hook.sh
+++ b/pkgs/development/tools/build-managers/cmake/setup-hook.sh
@@ -1,15 +1,15 @@
 addCMakeParams()
 {
     addToSearchPath CMAKE_PREFIX_PATH $1
-    addToSearchPath CMAKE_MODULE_PATH $1/share/cmake-@majorVersion@/Modules
 }
 
 fixCmakeFiles()
 {
     local replaceArgs
     echo "fixing cmake files"
-    replaceArgs="-e -f -L -T /usr /FOO"
-    find $1 -type f -name "*.cmake" -print0 | xargs -0 replace-literal ${replaceArgs}
+    replaceArgs="-e -f -L -T /usr /var/empty -a /opt /var/empty"
+    find $1 -type f -name "*.cmake" -o -name "*.cmake.in" -o -name CMakeLists.txt -print0 |
+        xargs -0 replace-literal ${replaceArgs}
 }
 
 cmakeConfigurePhase()
diff --git a/pkgs/development/tools/guile/g-wrap/default.nix b/pkgs/development/tools/guile/g-wrap/default.nix
index fe926e8ace5c..8698dc27b401 100644
--- a/pkgs/development/tools/guile/g-wrap/default.nix
+++ b/pkgs/development/tools/guile/g-wrap/default.nix
@@ -1,5 +1,5 @@
 { fetchurl, stdenv, guile, libffi, pkgconfig, glib
-, guileLib }:
+, guile_lib }:
 
 stdenv.mkDerivation rec {
   name = "g-wrap-1.9.13";
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
   # Note: Glib support is optional, but it's quite useful (e.g., it's
   # used by Guile-GNOME).
   buildInputs = [ guile pkgconfig glib ]
-    ++ stdenv.lib.optional doCheck guileLib;
+    ++ stdenv.lib.optional doCheck guile_lib;
 
   propagatedBuildInputs = [ libffi ];
 
diff --git a/pkgs/development/tools/haskell/HaRe/default.nix b/pkgs/development/tools/haskell/HaRe/default.nix
new file mode 100644
index 000000000000..ac04831fef97
--- /dev/null
+++ b/pkgs/development/tools/haskell/HaRe/default.nix
@@ -0,0 +1,14 @@
+{cabal, hint, mtl, network}:
+
+cabal.mkDerivation (self : {
+  pname = "HaRe";
+  version = "0.6.0.1";
+  sha256 = "cd3fa312c7fa6a5f761bbc3ebdbc6300e83ba9e285047acded6269d2164d67f8";
+  propagatedBuildInputs = [hint mtl network];
+  meta = {
+    description = "The Haskell Refactorer";
+    license = "BSD";
+    maintainers = [self.stdenv.lib.maintainers.andres];
+  };
+})  
+
diff --git a/pkgs/development/tools/misc/gdb/default.nix b/pkgs/development/tools/misc/gdb/default.nix
index f44411e77d7b..e14baf79153c 100644
--- a/pkgs/development/tools/misc/gdb/default.nix
+++ b/pkgs/development/tools/misc/gdb/default.nix
@@ -1,8 +1,8 @@
 { fetchurl, stdenv, ncurses, readline, gmp, mpfr, expat, texinfo
-, target ? null }:
+, dejagnu, target ? null }:
 
 let
-    basename = "gdb-7.1";
+    basename = "gdb-7.2";
 in
 stdenv.mkDerivation rec {
   name = basename + stdenv.lib.optionalString (target != null)
@@ -10,11 +10,12 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "mirror://gnu/gdb/${basename}.tar.bz2";
-    sha256 = "0ljkv3xkpqg4x38mrmzx4b7h1bkpfy41vmi5q8nnakhajzbjfb0l";
+    sha256 = "1w0h6hya0bl46xddd57mdzwmffplwglhnh9x9hv46ll4mf44ni5z";
   };
 
   # TODO: Add optional support for Python scripting.
-  buildInputs = [ ncurses readline gmp mpfr expat texinfo ];
+  buildInputs = [ ncurses readline gmp mpfr expat texinfo ]
+    ++ stdenv.lib.optional doCheck dejagnu;
 
   configureFlags =
     '' --with-gmp=${gmp} --with-mpfr=${mpfr} --with-system-readline
@@ -27,6 +28,9 @@ stdenv.mkDerivation rec {
        rm -v $out/share/info/{standards,configure,bfd}.info
     '';
 
+  # TODO: Investigate & fix the test failures.
+  doCheck = false;
+
   meta = {
     description = "GDB, the GNU Project debugger";
 
diff --git a/pkgs/development/tools/misc/lsof/default.nix b/pkgs/development/tools/misc/lsof/default.nix
index 08539d2aa945..628546e47a7e 100644
--- a/pkgs/development/tools/misc/lsof/default.nix
+++ b/pkgs/development/tools/misc/lsof/default.nix
@@ -1,11 +1,11 @@
 {stdenv, fetchurl}:
 
 stdenv.mkDerivation {
-  name = "lsof-4.83";
+  name = "lsof-4.84";
 
   src = fetchurl {
-    url = ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_4.83.tar.bz2;
-    sha256 = "0i7mn4ygmrf0rvxz5vgzhmr8q7bhxrh9h2q7rpip1f9npq5r77xq";
+    url = ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_4.84.tar.bz2;
+    sha256 = "09f71lrwav31nay3c4nwyslm887psn95dw02jr8vlgs4kcnkm290";
   };
 
   unpackPhase = "tar xvjf $src; cd lsof_*; tar xvf lsof_*.tar; sourceRoot=$( echo lsof_*/); ";