about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/compilers/jdk/builder.sh19
-rw-r--r--pkgs/development/compilers/jdk/default-5.nix4
-rw-r--r--pkgs/development/compilers/jdk/jdk5-oracle-linux.nix28
-rw-r--r--pkgs/development/compilers/ocaml/3.11.1.nix5
-rw-r--r--pkgs/development/compilers/ocaml/3.12.0.nix57
-rw-r--r--pkgs/development/compilers/swi-prolog/default.nix9
-rw-r--r--pkgs/development/interpreters/r-lang/default.nix33
-rw-r--r--pkgs/development/libraries/allegro/default.nix59
-rw-r--r--pkgs/development/libraries/apr-util/default.nix4
-rw-r--r--pkgs/development/libraries/cgui/default.nix57
-rw-r--r--pkgs/development/libraries/qt-4.x/4.5/default.nix86
-rw-r--r--pkgs/development/libraries/qt-4.x/4.5/setup-hook.sh9
-rw-r--r--pkgs/development/libraries/rlog/default.nix15
-rw-r--r--pkgs/development/libraries/sqlite/default.nix6
-rw-r--r--pkgs/development/ocaml-modules/batteries/default.nix34
-rw-r--r--pkgs/development/ocaml-modules/camlzip/META23
-rw-r--r--pkgs/development/ocaml-modules/camlzip/default.nix47
-rw-r--r--pkgs/development/ocaml-modules/camlzip/makefile.patch32
-rw-r--r--pkgs/development/ocaml-modules/camomile/0.7.3.nix25
-rw-r--r--pkgs/development/ocaml-modules/camomile/0.8.1.nix25
-rw-r--r--pkgs/development/ocaml-modules/cryptgps/default.nix31
-rw-r--r--pkgs/development/ocaml-modules/cryptokit/META8
-rw-r--r--pkgs/development/ocaml-modules/cryptokit/default.nix43
-rw-r--r--pkgs/development/ocaml-modules/cryptokit/makefile.patch21
-rw-r--r--pkgs/development/ocaml-modules/lwt/default.nix25
-rw-r--r--pkgs/development/ocaml-modules/menhir/default.nix47
-rw-r--r--pkgs/development/ocaml-modules/ounit/default.nix31
-rw-r--r--pkgs/development/ocaml-modules/pcre/default.nix26
-rw-r--r--pkgs/development/ocaml-modules/react/default.nix33
-rw-r--r--pkgs/development/ocaml-modules/ssl/default.nix27
-rw-r--r--pkgs/development/perl-modules/gd-options-passthrough-and-fontconfig.patch49
-rw-r--r--pkgs/development/tools/build-managers/scons/default.nix11
-rw-r--r--pkgs/development/tools/documentation/doxygen/default.nix2
-rw-r--r--pkgs/development/tools/misc/distcc/default.nix1
-rw-r--r--pkgs/development/tools/ocaml/findlib/default.nix54
-rw-r--r--pkgs/development/tools/ocaml/findlib/ldconf.patch8
36 files changed, 841 insertions, 153 deletions
diff --git a/pkgs/development/compilers/jdk/builder.sh b/pkgs/development/compilers/jdk/builder.sh
index 71dd6c433f67..7f402dab1588 100644
--- a/pkgs/development/compilers/jdk/builder.sh
+++ b/pkgs/development/compilers/jdk/builder.sh
@@ -1,24 +1,7 @@
 buildInputs="$unzip"
 source $stdenv/setup
 
-src=$filename.bin
-
-if ! test -e "$pathname"; then
-    echo ""
-    echo "SORRY!"
-    echo "You should download \`$(basename $pathname)' from Sun and place it in $(dirname $pathname)."
-    echo "Blame Sun, not us."
-    echo ""
-    exit 1
-fi
-
-actual=$(md5sum -b $pathname | cut -c1-32)
-if test "$actual" != "$md5"; then
-    echo "hash is $actual, expected $md5"
-    exit 1
-fi
-
-unzip $pathname || true
+unzip $src || true
 
 ensureDir $out
 mv $dirname/* $out/
diff --git a/pkgs/development/compilers/jdk/default-5.nix b/pkgs/development/compilers/jdk/default-5.nix
index fb25cd704c44..dfd4e31f4b37 100644
--- a/pkgs/development/compilers/jdk/default-5.nix
+++ b/pkgs/development/compilers/jdk/default-5.nix
@@ -1,9 +1,9 @@
-{stdenv, fetchurl, unzip}: 
+{stdenv, fetchurl, unzip, requireFile}: 
 
 if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux"
   then
     (import ./jdk5-oracle-linux.nix) {
-      inherit stdenv fetchurl unzip;
+      inherit stdenv fetchurl unzip requireFile;
     }
   else
     abort "the Java 5 SDK is not supported on this platform"
diff --git a/pkgs/development/compilers/jdk/jdk5-oracle-linux.nix b/pkgs/development/compilers/jdk/jdk5-oracle-linux.nix
index 06471c482a19..8884585d154d 100644
--- a/pkgs/development/compilers/jdk/jdk5-oracle-linux.nix
+++ b/pkgs/development/compilers/jdk/jdk5-oracle-linux.nix
@@ -8,19 +8,29 @@
  * Note that this is not necessary if someone has already pushed a
  * binary.
  */
-{stdenv, fetchurl, unzip}: 
+{stdenv, fetchurl, unzip, requireFile}: 
 
 assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
 
-let name = "jdk-1_5_0_22"; in
-stdenv.mkDerivation {
-  inherit name;
-  filename = "jdk-1_5_0_22";
+stdenv.mkDerivation rec {
+  name =  "jdk-1_5_0_22";
   dirname = "jdk1.5.0_22";
   builder = ./builder.sh;
-  pathname = if stdenv.system == "x86_64-linux" then "/tmp/${name}-linux-amd64.bin" else "/tmp/${name}-linux-i586.bin";
-  md5 = if stdenv.system == "x86_64-linux" then "b62abcaf9ea8617c50fa213bbc88824a" else "df5dae6d50d2abeafb472dde6d9a17f3";
+  src = requireFile {
+    message = ''
+      SORRY!
+      We may not download the needed binary distribution automatically.
+      You should download ${distfilename} from Sun and add it to store.
+      For example, "nix-prefetch-url file:///\$PWD/${distfilename}" in the 
+      directory where you saved it is OK.
+      Blame Sun, not us.
+    '';
+    name = distfilename;
+    sha256 = if stdenv.system == "x86_64-linux" then 
+      "1h63gigvg8id95igcj8xw7qvxs4p2y9hvx4xbvkwg8bji3ifb0sk" 
+    else "0655n2q1y023zzwbk6gs9vwsnb29jc0m3bg3x3xdw623qgb4k6px";
+  };
+  distfilename = if stdenv.system == "x86_64-linux" then "${name}-linux-amd64.bin" else "${name}-linux-i586.bin";
   
-  stdenv = stdenv;
-  inherit unzip;
+  inherit unzip stdenv;
 }
diff --git a/pkgs/development/compilers/ocaml/3.11.1.nix b/pkgs/development/compilers/ocaml/3.11.1.nix
index 8acb2bede6bd..a1d03b7cdf87 100644
--- a/pkgs/development/compilers/ocaml/3.11.1.nix
+++ b/pkgs/development/compilers/ocaml/3.11.1.nix
@@ -56,6 +56,11 @@ stdenv.mkDerivation rec {
          generators, a pre-processor pretty-printer (camlp4) and a
          documentation generator (ocamldoc).
        '';
+
+    platforms = stdenv.lib.platforms.all;
+    maintainers = [
+      stdenv.lib.maintainers.z77z
+    ];
   };
 
 }
diff --git a/pkgs/development/compilers/ocaml/3.12.0.nix b/pkgs/development/compilers/ocaml/3.12.0.nix
new file mode 100644
index 000000000000..bf767af5c9a7
--- /dev/null
+++ b/pkgs/development/compilers/ocaml/3.12.0.nix
@@ -0,0 +1,57 @@
+{ stdenv, fetchurl, ncurses, x11 }:
+
+let
+   useX11 = stdenv.system != "armv5tel-linux";
+   useNativeCompilers = stdenv.system != "armv5tel-linux";
+   inherit (stdenv.lib) optionals optionalString;
+in
+
+stdenv.mkDerivation rec {
+  
+  name = "ocaml-3.12.0";
+  
+  src = fetchurl {
+    url = "http://caml.inria.fr/pub/distrib/ocaml-3.12/${name}.tar.bz2";
+    sha256 = "0fzczy1s38ihlvghngn4l4n7gnyywnwd7c172276bjcy41b1g08p";
+  };
+
+  prefixKey = "-prefix ";
+  configureFlags = ["-no-tk"] ++ optionals useX11 [ "-x11lib" x11 ];
+  buildFlags = "world" + optionalString useNativeCompilers " bootstrap world.opt";
+  buildInputs = [ncurses] ++ optionals useX11 [ x11 ];
+  installTargets = "install" + optionalString useNativeCompilers " installopt";
+  patchPhase = ''
+    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;
+    licenses = [ "QPL" /* compiler */ "LGPLv2" /* library */ ];
+    description = "Objective Caml, the most popular variant of the Caml language";
+
+    longDescription =
+      '' Objective Caml is the most popular variant of the Caml language.
+         From a language standpoint, it extends the core Caml language with a
+         fully-fledged object-oriented layer, as well as a powerful module
+         system, all connected by a sound, polymorphic type system featuring
+         type inference.
+
+         The Objective Caml system is an industrial-strength implementation
+         of this language, featuring a high-performance native-code compiler
+         (ocamlopt) for 9 processor architectures (IA32, PowerPC, AMD64,
+         Alpha, Sparc, Mips, IA64, HPPA, StrongArm), as well as a bytecode
+         compiler (ocamlc) and an interactive read-eval-print loop (ocaml)
+         for quick development and portability.  The Objective Caml
+         distribution includes a comprehensive standard library, a replay
+         debugger (ocamldebug), lexer (ocamllex) and parser (ocamlyacc)
+         generators, a pre-processor pretty-printer (camlp4) and a
+         documentation generator (ocamldoc).
+       '';
+  };
+
+}
diff --git a/pkgs/development/compilers/swi-prolog/default.nix b/pkgs/development/compilers/swi-prolog/default.nix
index 7690c980f5d9..255ea1495d63 100644
--- a/pkgs/development/compilers/swi-prolog/default.nix
+++ b/pkgs/development/compilers/swi-prolog/default.nix
@@ -1,11 +1,12 @@
 { stdenv, fetchurl, gmp, readline, openssl, libjpeg, unixODBC, zlib, libXinerama, libXft, libXpm, libSM, libXt }:
 
-stdenv.mkDerivation {
-  name = "swi-prolog-5.6.64";
+stdenv.mkDerivation rec {
+  version = "5.10.2";
+  name = "swi-prolog-${version}";
 
   src = fetchurl {
-    url = "http://gollem.science.uva.nl/cgi-bin/nph-download/SWI-Prolog/pl-5.6.64.tar.gz";
-    sha256 = "b0e70c3c02b7753ed440359746e7729d21c93e42689c1f0f32b148167b1b2c66";
+    url = "http://www.swi-prolog.org/download/stable/src/pl-${version}.tar.gz";
+    sha256 = "1a3ebbcd649f429a41b64561d38423692e00524c29227432d0eb5a0e24e2a4c9";
   };
 
   buildInputs = [gmp readline openssl libjpeg unixODBC libXinerama libXft libXpm libSM libXt zlib];
diff --git a/pkgs/development/interpreters/r-lang/default.nix b/pkgs/development/interpreters/r-lang/default.nix
index 63971dece1f2..432198993808 100644
--- a/pkgs/development/interpreters/r-lang/default.nix
+++ b/pkgs/development/interpreters/r-lang/default.nix
@@ -1,30 +1,37 @@
-{stdenv, fetchurl, readline, perl, gfortran, libX11, libpng, libXt, zlib, 
-withBioconductor ? false
+{ stdenv, fetchurl, readline, perl, gfortran, libX11, libpng, libXt, zlib
+, withBioconductor ? false
 }:
 
 stdenv.mkDerivation {
   name = "r-lang";
-  version = "2.7.0";
+  version = "2.12.0";
   src = fetchurl {
-    url = http://cran.r-project.org/src/base/R-2/R-2.7.0.tar.gz;
-    sha256 = "17ql1j5d9rfpxs04j9v9qyxiysc9nh6yr43lgfdamayzjpia5jqm";
+    url = http://cran.r-project.org/src/base/R-2/R-2.12.0.tar.gz;
+    sha256 = "93d72d845b01c6cd00e58f04b5e78fd6c83de96a8620505ad2a016772af02179";
   };
 
   bioconductor = if withBioconductor then import ../development/libraries/science/biology/bioconductor { inherit fetchurl stdenv readline; } else null;
-  
+
+  postUnpack = ''
+    gunzip R-2.12.0/src/library/Recommended/Matrix_0.999375-44.tar.gz
+    tar --file=R-2.12.0/src/library/Recommended/Matrix_0.999375-44.tar --delete Matrix/src/dummy.cpp
+    gzip R-2.12.0/src/library/Recommended/Matrix_0.999375-44.tar
+  '';
+
   buildInputs = [readline perl gfortran libpng libX11 libXt zlib];
   configureFlags = ["--enable-R-shlib"] ;
 
   meta = {
     description = "R is a language and environment for statistical computing and graphics";
-    longDescription = ''R is a language and environment for statistical computin
-g and graphics. It is a GNU project which is similar to the S language. R provid
-es a wide variety of statistical (linear and nonlinear modelling, classical stat
-istical tests, time-series analysis, classification, clustering, ...) and graphi
-cal techniques, and is highly extensible.'';
     license     = "GPL2";
     homepage    = http://www.r-project.org/;
+    longDescription = ''
+      R is a language and environment for statistical computing and
+      graphics. It is a GNU project which is similar to the S language.
+      R provides a wide variety of statistical (linear and nonlinear
+      modelling, classical statistical tests, time-series analysis,
+      classification, clustering, ...) and graphical techniques, and is
+      highly extensible.
+    '';
   };
 }
-
-
diff --git a/pkgs/development/libraries/allegro/default.nix b/pkgs/development/libraries/allegro/default.nix
new file mode 100644
index 000000000000..1669d083f226
--- /dev/null
+++ b/pkgs/development/libraries/allegro/default.nix
@@ -0,0 +1,59 @@
+x@{builderDefsPackage
+  , texinfo, libXext, xextproto, libX11, xproto, libXpm, libXt, libXcursor
+  , alsaLib, cmake, zlib, libpng, libvorbis, libXxf86dga, libXxf86misc
+  , xf86dgaproto, xf86miscproto, xf86vidmodeproto, libXxf86vm, openal
+  , ...}:
+builderDefsPackage
+(a :  
+let 
+  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 
+    [];
+
+  buildInputs = map (n: builtins.getAttr n x)
+    (builtins.attrNames (builtins.removeAttrs x helperArgNames));
+  sourceInfo = rec {
+    baseName="allegro";
+    version="4.4.0.1";
+    name="${baseName}-${version}";
+    project="alleg";
+    url="mirror://sourceforge/project/${project}/${baseName}/${version}/${name}.tar.gz";
+    hash="0qgkmazr07lmnbj6h6yk10vmcm15gafcwy5jn7xpwy7bahzraiz0";
+  };
+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 = ["doCmake" "doMakeInstall"];
+
+  doCmake = a.fullDepEntry (''
+    export NIX_LDFLAGS="$NIX_LDFLAGS -lXext -lX11 -lXpm -lXcursor -lXxf86vm"
+    cmake -D CMAKE_INSTALL_PREFIX=$out -D CMAKE_SKIP_RPATH=ON .
+  '') ["minInit" "doUnpack" "addInputs"];
+      
+  makeFlags = [
+  ];
+
+  meta = {
+    description = "A game programming library";
+    license = "free-noncopyleft"; # giftware
+    maintainers = with a.lib.maintainers;
+    [
+      raskin
+    ];
+    platforms = with a.lib.platforms;
+      linux;
+  };
+  passthru = {
+    updateInfo = {
+      downloadPage = "http://sourceforge.net/projects/alleg/files/";
+    };
+  };
+}) x
+
diff --git a/pkgs/development/libraries/apr-util/default.nix b/pkgs/development/libraries/apr-util/default.nix
index 1c58aacfdf26..c59184007e53 100644
--- a/pkgs/development/libraries/apr-util/default.nix
+++ b/pkgs/development/libraries/apr-util/default.nix
@@ -5,11 +5,11 @@
 assert bdbSupport -> db4 != null;
 
 stdenv.mkDerivation rec {
-  name = "apr-util-1.3.9";
+  name = "apr-util-1.3.10";
   
   src = fetchurl {
     url = "mirror://apache/apr/${name}.tar.bz2";
-    sha256 = "10zcy1an5xkjx8nflirvm2a8rnp9psckws6r7xr5wq6ffxnafhc7";
+    sha256 = "1vhps080b0f9z6ibq7xqbhdrclb89min7xwvc2zzc5wf0x4w1h0s";
   };
   
   configureFlags = ''
diff --git a/pkgs/development/libraries/cgui/default.nix b/pkgs/development/libraries/cgui/default.nix
new file mode 100644
index 000000000000..6bd3dd41de74
--- /dev/null
+++ b/pkgs/development/libraries/cgui/default.nix
@@ -0,0 +1,57 @@
+x@{builderDefsPackage
+  , texinfo, allegro, perl
+  , ...}:
+builderDefsPackage
+(a :  
+let 
+  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 
+    [];
+
+  buildInputs = map (n: builtins.getAttr n x)
+    (builtins.attrNames (builtins.removeAttrs x helperArgNames));
+  sourceInfo = rec {
+    baseName="cgui";
+    version="2.0.3";
+    name="${baseName}-${version}";
+    project="${baseName}";
+    url="mirror://sourceforge/project/${project}/${version}/${name}.tar.gz";
+    hash="00kk4xaw68m44awy8zq4g5plx372swwccvzshn68a0a8f3f2wi4x";
+  };
+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 = ["genMakefile" "doMakeInstall"];
+
+  genMakefile = a.fullDepEntry (''
+    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -fPIC"
+    sh fix.sh unix
+  '') ["minInit" "doUnpack" "addInputs"];
+      
+  makeFlags = [
+    "SYSTEM_DIR=$out"
+  ];
+
+  meta = {
+    description = "A multiplatform basic GUI library";
+    maintainers = with a.lib.maintainers;
+    [
+      raskin
+    ];
+    platforms = with a.lib.platforms;
+      linux;
+  };
+  passthru = {
+    updateInfo = {
+      downloadPage = "http://sourceforge.net/projects/cgui/files/";
+    };
+  };
+}) x
+
diff --git a/pkgs/development/libraries/qt-4.x/4.5/default.nix b/pkgs/development/libraries/qt-4.x/4.5/default.nix
deleted file mode 100644
index 3b29043aeeb4..000000000000
--- a/pkgs/development/libraries/qt-4.x/4.5/default.nix
+++ /dev/null
@@ -1,86 +0,0 @@
-{ stdenv, fetchurl
-, libXft, libXrender, randrproto, xextproto, libXinerama, xineramaproto, libXcursor, libXmu
-, libXext, libXfixes, inputproto, fixesproto, libXrandr, freetype, fontconfig
-, zlib, libjpeg, mysql, libpng, which, mesa, openssl, dbus, cups, pkgconfig, libtiff, glib
-, buildDemos ? false, buildExamples ? false, keepDocumentation ? false}:
-
-stdenv.mkDerivation {
-  name = "qt-4.5.3";
-  
-  src = fetchurl {
-    url = ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-4.5.3.tar.gz;
-    sha256 = "19ls11m5skcjfgrfcidwqdm72kl7qrbj4hdl1nbmcdaxh91gr1qc";
-  };
-  
-  setupHook = ./setup-hook.sh;
-  
-  propagatedBuildInputs = [
-    libXft 
-    libXrender 
-    libXrandr 
-    randrproto 
-    xextproto
-    libXinerama 
-    xineramaproto 
-    libXcursor 
-    zlib 
-    libjpeg 
-    mysql 
-    libpng 
-    which 
-    mesa
-    libXmu 
-    openssl 
-    dbus.libs 
-    cups 
-    pkgconfig 
-    libXext 
-    freetype 
-    fontconfig 
-    inputproto
-    fixesproto 
-    libXfixes 
-    glib 
-    libtiff
-  ];
-  
-  # libQtNetwork will call libQtCore for it to dlopen openssl.
-  NIX_LDFLAGS = "-rpath ${openssl}/lib";
-  # Don't shrink the rpath, to keep ${openssl} in it.
-  dontPatchELF = 1;
-
-  prefixKey = "-prefix ";
-
-  configureFlags = ''
-    -v -no-separate-debug-info -release
-    -system-zlib -system-libpng -system-libjpeg -fast
-    -qt-gif -confirm-license -opensource
-    -opengl -xrender -xrandr -xinerama -xcursor -qt-sql-mysql
-    -qdbus -cups -glib -xfixes -dbus-linked
-    -fontconfig -I${freetype}/include/freetype2
-    ${if buildDemos == true then "" else "-nomake demos"}
-    ${if buildExamples == true then "" else "-nomake examples"}
-  '';
-    
-  patchPhase = ''
-    substituteInPlace configure --replace /bin/pwd pwd
-    sed -e 's@/usr@/FOO@' -i config.tests/*/*.test -i mkspecs/*/*.conf
-  '';
-
-  # Remove the documentation: it takes up >= 130 MB, which is more
-  # than half of the installed size.  Ideally we should put this in a
-  # separate package (as well as the Qt Designer).
-  postInstall = ''
-    ${if keepDocumentation == false then "rm -rf $out/doc" else ""}
-  '';
-
-  enableParallelBuilding = true;
-
-  meta = {
-    homepage = http://www.qtsoftware.com/downloads/opensource/appdev/linux-x11-cpp;
-    description = "A cross-platform application framework for C++";
-    license = "GPL/LGPL";
-    maintainers = [ stdenv.lib.maintainers.sander ];
-    platforms = stdenv.lib.platforms.mesaPlatforms;
-  };
-}
diff --git a/pkgs/development/libraries/qt-4.x/4.5/setup-hook.sh b/pkgs/development/libraries/qt-4.x/4.5/setup-hook.sh
deleted file mode 100644
index f9ecacbbb7df..000000000000
--- a/pkgs/development/libraries/qt-4.x/4.5/setup-hook.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-export QTDIR=@out@
-
-if [ -n "$includeAllQtDirs" ]; then
-  # This helps for g++, but not for moc. And no qt4 package should expect
-  # having all qt4 header files dirs into -I.
-  for d in @out@/include/*; do
-      export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$d"
-  done
-fi
diff --git a/pkgs/development/libraries/rlog/default.nix b/pkgs/development/libraries/rlog/default.nix
new file mode 100644
index 000000000000..aae678688848
--- /dev/null
+++ b/pkgs/development/libraries/rlog/default.nix
@@ -0,0 +1,15 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation {
+  name = "rlog-1.4";
+
+  src = fetchurl {
+    url = "http://rlog.googlecode.com/files/rlog-1.4.tar.gz";
+    sha256 = "0y9zg0pd7vmnskwac1qdyzl282z7kb01nmn57lsg2mjdxgnywf59";
+  };
+
+  meta = {
+    homepage = http://www.arg0.net/rlog;
+    description = "A C++ logging library used in encfs";
+  };
+}
diff --git a/pkgs/development/libraries/sqlite/default.nix b/pkgs/development/libraries/sqlite/default.nix
index 015c449cd037..2a53f4b09bd2 100644
--- a/pkgs/development/libraries/sqlite/default.nix
+++ b/pkgs/development/libraries/sqlite/default.nix
@@ -3,11 +3,11 @@
 assert readline != null -> ncurses != null;
 
 stdenv.mkDerivation {
-  name = "sqlite-3.7.2";
+  name = "sqlite-3.7.4";
 
   src = fetchurl {
-    url = "http://www.sqlite.org/sqlite-amalgamation-3.7.2.tar.gz";
-    sha256 = "12i50bypcq7havphrilzi0hnwgv01drxsc36kyby76hpk417zsvl";
+    url = http://www.sqlite.org/sqlite-autoconf-3070400.tar.gz;
+    sha256 = "131lwjqh1nfyrx4vjya2wdl6bnc0gzvcrg0wf06sz2iisj0h9vsl";
   };
 
   buildInputs = [ readline ncurses ];
diff --git a/pkgs/development/ocaml-modules/batteries/default.nix b/pkgs/development/ocaml-modules/batteries/default.nix
new file mode 100644
index 000000000000..9aef1f446fe9
--- /dev/null
+++ b/pkgs/development/ocaml-modules/batteries/default.nix
@@ -0,0 +1,34 @@
+{stdenv, fetchurl, ocaml, findlib, camomile, ounit}:
+
+let
+  ocaml_version = (builtins.parseDrvName ocaml.name).version;
+  version = "1.2.0";
+in
+
+stdenv.mkDerivation {
+  name = "ocaml-batteries-${version}";
+
+  src = fetchurl {
+    url = "http://forge.ocamlcore.org/frs/download.php/423/batteries-${version}.tar.gz";
+    sha256 = "0lkkbfj51zkhhr56nx167448pvg02nrzjjkl57ycic2ikzgq6lmx";
+  };
+
+  buildInputs = [ocaml findlib camomile ounit];
+
+  configurePhase = "true"; 	# Skip configure
+
+  doCheck = true;
+
+  checkTarget = "test";
+
+  meta = {
+    homepage = http://batteries.forge.ocamlcore.org/;
+    description = "OCaml Batteries Included";
+    longDescription = ''
+      A community-driven effort to standardize on an consistent, documented,
+      and comprehensive development platform for the OCaml programming
+      language.
+    '';
+    license = "LGPL";
+  };
+}
diff --git a/pkgs/development/ocaml-modules/camlzip/META b/pkgs/development/ocaml-modules/camlzip/META
new file mode 100644
index 000000000000..85456166101e
--- /dev/null
+++ b/pkgs/development/ocaml-modules/camlzip/META
@@ -0,0 +1,23 @@
+# Specifications for the "camlzip" library:
+
+name="zip"
+version="1.04"
+description="A library for handling ZIP and GZIP files in OCaml"
+directory="@INSTALLDIR@"
+
+requires="unix"
+requires(byte)="unix"
+requires(native)="unix"
+requires(toploop)="unix"
+
+requires(byte,mt)="unix"
+requires(native,mt)="unix"
+requires(toploop,mt)="unix"
+
+archive(byte)="zip.cma"
+archive(native)="zip.cmxa"
+archive(toploop)="zip.cma"
+
+archive(byte,mt)="zip.cma"
+archive(native,mt)="zip.cmxa"
+archive(toploop,mt)="zip.cma"
diff --git a/pkgs/development/ocaml-modules/camlzip/default.nix b/pkgs/development/ocaml-modules/camlzip/default.nix
new file mode 100644
index 000000000000..4e5df2cd75d9
--- /dev/null
+++ b/pkgs/development/ocaml-modules/camlzip/default.nix
@@ -0,0 +1,47 @@
+{stdenv, fetchurl, zlib, ocaml}:
+
+let
+  ocaml_version = (builtins.parseDrvName ocaml.name).version;
+  version = "1.04";
+in
+
+stdenv.mkDerivation {
+  name = "camlzip-${version}";
+
+  src = fetchurl {
+    url = "http://forge.ocamlcore.org/frs/download.php/328/" +
+          "camlzip-${version}.tar.gz";
+    sha256 = "1zpchmp199x7f4mzmapvfywgy7f6wy9yynd9nd8yh8l78s5gixbn";
+  };
+
+  buildInputs = [zlib ocaml];
+
+  patches = [ ./makefile.patch ];
+
+  configurePhase = ''
+    export INSTALLDIR="$out/lib/ocaml/${ocaml_version}/site-lib/zip"
+    substituteInPlace Makefile \
+      --subst-var-by ZLIB_LIBDIR "${zlib}/lib" \
+      --subst-var-by ZLIB_INCLUDE "${zlib}/include" \
+      --subst-var INSTALLDIR
+  '';
+
+  buildFlags = "all allopt";
+
+  installTargets = "install installopt";
+
+  postInstall = ''
+    substitute ${./META} $INSTALLDIR/META --subst-var INSTALLDIR
+  '';
+
+  meta = {
+    homepage = "http://cristal.inria.fr/~xleroy/software.html#camlzip";
+    description = "A library for handling ZIP and GZIP files in OCaml";
+    longDescription = ''
+      This Objective Caml library provides easy access to compressed files in
+      ZIP and GZIP format, as well as to Java JAR files.  It provides functions
+      for reading from and writing to compressed files in these formats.
+    '';
+    license = "LGPL+linking exceptions";
+  };
+}
diff --git a/pkgs/development/ocaml-modules/camlzip/makefile.patch b/pkgs/development/ocaml-modules/camlzip/makefile.patch
new file mode 100644
index 000000000000..10adcd6687b0
--- /dev/null
+++ b/pkgs/development/ocaml-modules/camlzip/makefile.patch
@@ -0,0 +1,32 @@
+diff -Naur camlzip-1.04/Makefile camlzip-1.04.nixos/Makefile
+--- camlzip-1.04/Makefile	2002-04-22 17:28:57.000000000 +0200
++++ camlzip-1.04.nixos/Makefile	2010-08-17 14:40:07.000000000 +0200
+@@ -4,14 +4,14 @@
+ ZLIB_LIB=-lz
+ 
+ # The directory containing the Zlib library (libz.a or libz.so)
+-ZLIB_LIBDIR=/usr/local/lib
++ZLIB_LIBDIR=@ZLIB_LIBDIR@
+ 
+ # The directory containing the Zlib header file (zlib.h)
+-ZLIB_INCLUDE=/usr/local/include
++ZLIB_INCLUDE=@ZLIB_INCLUDE@
+ 
+ # Where to install the library.  By default: sub-directory 'zip' of
+ # OCaml's standard library directory.
+-INSTALLDIR=`$(OCAMLC) -where`/zip
++INSTALLDIR=@INSTALLDIR@
+ 
+ ### End of configuration section
+ 
+@@ -59,10 +59,6 @@
+ 	cp zip.cma zip.cmi gzip.cmi zip.mli gzip.mli libcamlzip.a $(INSTALLDIR)
+ 	if test -f dllcamlzip.so; then \
+ 	  cp dllcamlzip.so $(INSTALLDIR); \
+-          ldconf=`$(OCAMLC) -where`/ld.conf; \
+-          installdir=$(INSTALLDIR); \
+-          if test `grep -s -c $$installdir'$$' $$ldconf || :` = 0; \
+-          then echo $$installdir >> $$ldconf; fi \
+         fi
+ 
+ installopt:
diff --git a/pkgs/development/ocaml-modules/camomile/0.7.3.nix b/pkgs/development/ocaml-modules/camomile/0.7.3.nix
new file mode 100644
index 000000000000..4cc214042587
--- /dev/null
+++ b/pkgs/development/ocaml-modules/camomile/0.7.3.nix
@@ -0,0 +1,25 @@
+{stdenv, fetchurl, ocaml, findlib}:
+
+let
+  ocaml_version = (builtins.parseDrvName ocaml.name).version;
+  version = "0.7.3";
+in
+
+stdenv.mkDerivation {
+  name = "camomile-${version}";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/camomile/camomile-${version}.tar.bz2";
+    sha256 = "0cm3j3ppl15fp597ih3qiagxyg8kpql9apapkqaib2xccc44zb5l";
+  };
+
+  buildInputs = [ocaml findlib];
+
+  #dontAddPrefix = true;
+
+  meta = {
+    homepage = http://camomile.sourceforge.net/;
+    description = "A comprehensive Unicode library for OCaml";
+    license = "LGPL";
+  };
+}
diff --git a/pkgs/development/ocaml-modules/camomile/0.8.1.nix b/pkgs/development/ocaml-modules/camomile/0.8.1.nix
new file mode 100644
index 000000000000..1c32bca58b13
--- /dev/null
+++ b/pkgs/development/ocaml-modules/camomile/0.8.1.nix
@@ -0,0 +1,25 @@
+{stdenv, fetchurl, ocaml, findlib}:
+
+let
+  ocaml_version = (builtins.parseDrvName ocaml.name).version;
+  version = "0.8.1";
+in
+
+stdenv.mkDerivation {
+  name = "camomile-${version}";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/camomile/camomile-${version}.tar.bz2";
+    sha256 = "1r84y7wl10zkjmp8qqq2bcmll23qmfczlnykm74hxkig8ksm0g6a";
+  };
+
+  buildInputs = [ocaml findlib];
+
+  #dontAddPrefix = true;
+
+  meta = {
+    homepage = http://camomile.sourceforge.net/;
+    description = "A comprehensive Unicode library for OCaml";
+    license = "LGPL";
+  };
+}
diff --git a/pkgs/development/ocaml-modules/cryptgps/default.nix b/pkgs/development/ocaml-modules/cryptgps/default.nix
new file mode 100644
index 000000000000..a9116c09ee76
--- /dev/null
+++ b/pkgs/development/ocaml-modules/cryptgps/default.nix
@@ -0,0 +1,31 @@
+{stdenv, fetchurl, ocaml, findlib}:
+
+let
+  ocaml_version = (builtins.parseDrvName ocaml.name).version;
+  version = "0.2.1";
+in
+
+stdenv.mkDerivation {
+  name = "ocaml-cryptgps-${version}";
+
+  src = fetchurl {
+    url = "http://download.camlcity.org/download/cryptgps-0.2.1.tar.gz";
+    sha256 = "1mp7i42cm9w9grmcsa69m3h1ycpn6a48p43y4xj8rsc12x9nav3s";
+  };
+
+  buildInputs = [ocaml findlib];
+
+  configurePhase = "true";	# Skip configure phase
+
+  meta = {
+    homepage = http://projects.camlcity.org/projects/cryptgps.html;
+    description = "Cryptographic functions for OCaml";
+    longDescription = ''
+      This library implements the symmetric cryptographic algorithms
+      Blowfish, DES, and 3DES. The algorithms are written in O'Caml,
+      i.e. this is not a binding to some C library, but the implementation
+      itself.
+    '';
+    license = "MIT/X11";
+  };
+}
diff --git a/pkgs/development/ocaml-modules/cryptokit/META b/pkgs/development/ocaml-modules/cryptokit/META
new file mode 100644
index 000000000000..661170835fdf
--- /dev/null
+++ b/pkgs/development/ocaml-modules/cryptokit/META
@@ -0,0 +1,8 @@
+# Specifications for the "cryptokit" library:
+requires = ""
+description = "A library of cryptographic primitives for OCaml"
+version = "1.3"
+directory = "^"
+
+archive(byte) = "cryptokit.cma"
+archive(native) = "cryptokit.cmxa"
diff --git a/pkgs/development/ocaml-modules/cryptokit/default.nix b/pkgs/development/ocaml-modules/cryptokit/default.nix
new file mode 100644
index 000000000000..1c7e361f3fc3
--- /dev/null
+++ b/pkgs/development/ocaml-modules/cryptokit/default.nix
@@ -0,0 +1,43 @@
+{stdenv, fetchurl, zlib, ocaml}:
+
+let
+  ocaml_version = (builtins.parseDrvName ocaml.name).version;
+  version = "1.3";
+in
+
+stdenv.mkDerivation {
+  name = "cryptokit-${version}";
+
+  src = fetchurl {
+    url = "http://forge.ocamlcore.org/frs/download.php/326/" +
+          "cryptokit-${version}.tar.gz";
+    sha256 = "0kqrlxkpzrj2qpniy6mhn7gx3n29s86vk4q0im2hqpxi9knkkwwy";
+  };
+
+  buildInputs = [zlib ocaml];
+
+  patches = [ ./makefile.patch ];
+
+  configurePhase = ''
+    export INSTALLDIR="$out/lib/ocaml/${ocaml_version}/site-lib/cryptokit"
+    substituteInPlace Makefile \
+      --subst-var-by ZLIB_LIBDIR "${zlib}/lib" \
+      --subst-var-by ZLIB_INCLUDE "${zlib}/include" \
+      --subst-var INSTALLDIR 
+  '';
+
+  buildFlags = "all allopt";
+
+  doCheck = true;
+  
+  checkTarget = "test";
+
+  preInstall = "ensureDir $INSTALLDIR";
+
+  postInstall = "cp -a ${./META} $INSTALLDIR/META";
+
+  meta = {
+    homepage = "http://pauillac.inria.fr/~xleroy/software.html";
+    description = "A library of cryptographic primitives for OCaml";
+  };
+}
diff --git a/pkgs/development/ocaml-modules/cryptokit/makefile.patch b/pkgs/development/ocaml-modules/cryptokit/makefile.patch
new file mode 100644
index 000000000000..b4a82c7d677f
--- /dev/null
+++ b/pkgs/development/ocaml-modules/cryptokit/makefile.patch
@@ -0,0 +1,21 @@
+diff -Nuar cryptokit-1.3/Makefile cryptokit-1.3.nixos/Makefile
+--- cryptokit-1.3/Makefile	2005-04-20 15:19:54.000000000 +0200
++++ cryptokit-1.3.nixos/Makefile	2010-08-17 15:22:07.000000000 +0200
+@@ -9,14 +9,13 @@
+ 
+ # The directory containing the Zlib library (libz.a or libz.so)
+ # Leave blank if you don't have Zlib.
+-ZLIB_LIBDIR=/usr/lib
+-#ZLIB_LIBDIR=/usr/lib64    # for x86-64 Linux
++ZLIB_LIBDIR=@ZLIB_LIBDIR@
+ 
+ # The directory containing the Zlib header file (zlib.h)
+-ZLIB_INCLUDE=/usr/include
++ZLIB_INCLUDE=@ZLIB_INCLUDE@
+ 
+ # Where to install the library. By default: OCaml's standard library directory.
+-INSTALLDIR=`$(OCAMLC) -where`
++INSTALLDIR=@INSTALLDIR@
+ 
+ # Flags for the C compiler.
+ CFLAGS=-O -I$(ZLIB_INCLUDE) $(ZLIB)
diff --git a/pkgs/development/ocaml-modules/lwt/default.nix b/pkgs/development/ocaml-modules/lwt/default.nix
new file mode 100644
index 000000000000..766419aada7c
--- /dev/null
+++ b/pkgs/development/ocaml-modules/lwt/default.nix
@@ -0,0 +1,25 @@
+{stdenv, fetchurl, which, cryptopp, ocaml, findlib, ocaml_react, ocaml_ssl}:
+
+let
+  ocaml_version = (builtins.parseDrvName ocaml.name).version;
+  version = "2.1.1";
+in
+
+stdenv.mkDerivation {
+  name = "ocaml-lwt-${version}";
+
+  src = fetchurl {
+    url = "http://ocsigen.org/download/lwt-${version}.tar.gz";
+    sha256 = "1zjn0sgihryshancn4kna1xslhc8gifliny1qd3a85f72xxxnw0w";
+  };
+
+  buildInputs = [which cryptopp ocaml findlib ocaml_react ocaml_ssl];
+
+  configurePhase = "true";
+
+  meta = {
+    homepage = http://ocsigen.org/lwt;
+    description = "Lightweight thread library for Objective Caml";
+    license = "LGPL";
+  };
+}
diff --git a/pkgs/development/ocaml-modules/menhir/default.nix b/pkgs/development/ocaml-modules/menhir/default.nix
new file mode 100644
index 000000000000..7c1a2bfe829a
--- /dev/null
+++ b/pkgs/development/ocaml-modules/menhir/default.nix
@@ -0,0 +1,47 @@
+{stdenv, fetchurl, ocaml, findlib}:
+
+let
+  ocaml_version = (builtins.parseDrvName ocaml.name).version;
+  version = "20090505";
+in
+
+stdenv.mkDerivation {
+  name = "menhir-${version}";
+
+  src = fetchurl {
+    url = "http://pauillac.inria.fr/~fpottier/menhir/menhir-${version}.tar.gz";
+    sha256 = "1dsy80wp7k9wbxc89pjzy2izdkk4b72104m9ik747xzy23mssbyx";
+  };
+
+  buildInputs = [ocaml findlib];
+
+  configurePhase = "true";	# Skip configure
+
+  preBuild = ''
+    #Fix makefiles.
+    RM=$(type -p rm)
+    CHMOD=$(type -p chmod)
+    ENV=$(type -p env)
+    for f in src/Makefile demos/OMakefile* demos/Makefile* demos/ocamldep.wrapper
+    do
+      substituteInPlace $f \
+        --replace /bin/rm $RM \
+	--replace /bin/chmod $CHMOD \
+	--replace /usr/bin/env $ENV
+    done
+
+    export PREFIX=$out
+  '';
+
+  meta = {
+    homepage = http://pauillac.inria.fr/~fpottier/menhir/;
+    description = "A LR(1) parser generator for OCaml";
+    longDescription = ''
+      Menhir is a LR(1) parser generator for the Objective Caml programming
+      language.  That is, Menhir compiles LR(1) grammar specifications down
+      to OCaml code.  Menhir was designed and implemented by François Pottier
+      and Yann Régis-Gianas.
+    '';
+    license = "QPL,LGPL+linking exceptions";
+  };
+}
diff --git a/pkgs/development/ocaml-modules/ounit/default.nix b/pkgs/development/ocaml-modules/ounit/default.nix
new file mode 100644
index 000000000000..af208dc5651c
--- /dev/null
+++ b/pkgs/development/ocaml-modules/ounit/default.nix
@@ -0,0 +1,31 @@
+{stdenv, fetchurl, ocaml, findlib}:
+
+let
+  ocaml_version = (builtins.parseDrvName ocaml.name).version;
+  version = "1.0.3";
+in
+
+stdenv.mkDerivation {
+  name = "ounit-${version}";
+
+  src = fetchurl {
+    url = "http://www.xs4all.nl/~mmzeeman/ocaml/ounit-${version}.tar.gz";
+    sha256 = "1n7ylrbi2m00gn0kjg5zxnyzxki8v1dy31fcz3vh1xnwcx6hii97";
+  };
+
+  buildInputs = [ocaml findlib];
+
+  configurePhase = "true";  	# Skip configure
+
+  buildFlags = "all allopt";
+
+  doCheck = true;
+
+  checkTarget = "test";
+
+  meta = {
+    homepage = http://www.xs4all.nl/~mmzeeman/ocaml/;
+    description = "Unit test framework for OCaml";
+    license = "MIT/X11";
+  };
+}
diff --git a/pkgs/development/ocaml-modules/pcre/default.nix b/pkgs/development/ocaml-modules/pcre/default.nix
new file mode 100644
index 000000000000..d1287425625c
--- /dev/null
+++ b/pkgs/development/ocaml-modules/pcre/default.nix
@@ -0,0 +1,26 @@
+{stdenv, fetchurl, pcre, ocaml, findlib}:
+
+let
+  ocaml_version = (builtins.parseDrvName ocaml.name).version;
+  version = "6.1.0";
+in
+
+stdenv.mkDerivation {
+  name = "ocaml-pcre-${version}";
+
+  src = fetchurl {
+    url = "http://hg.ocaml.info/release/pcre-ocaml/archive/" +
+          "release-${version}.tar.bz2";
+    sha256 = "1lj9mzabi1crxwvb2ly1l10h4hlx0fw20nbnq76bbzzkzabjs4ll";
+  };
+
+  buildInputs = [pcre ocaml findlib];
+
+  configurePhase = "true";	# Skip configure phase
+
+  meta = {
+    homepage = "http://www.ocaml.info/home/ocaml_sources.html#pcre-ocaml";
+    description = "An efficient C-library for pattern matching with Perl-style regular expressions in OCaml";
+    license = "LGPL";
+  };
+}
diff --git a/pkgs/development/ocaml-modules/react/default.nix b/pkgs/development/ocaml-modules/react/default.nix
new file mode 100644
index 000000000000..b1757d84b7b6
--- /dev/null
+++ b/pkgs/development/ocaml-modules/react/default.nix
@@ -0,0 +1,33 @@
+{stdenv, fetchurl, ocaml}:
+
+let
+  ocaml_version = (builtins.parseDrvName ocaml.name).version;
+  version = "0.9.2";
+in
+
+stdenv.mkDerivation {
+  name = "ocaml-react-${version}";
+
+  src = fetchurl {
+    url = "http://erratique.ch/software/react/releases/react-${version}.tbz";
+    sha256 = "0fiaxzfxv8pc82d31jz85zryz06k84is0l3sn5g0di5mpc5falxr";
+  };
+
+  buildInputs = [ocaml];
+
+  buildCommand = ''
+    export INSTALLDIR=$out/lib/ocaml/${ocaml_version}/site-lib/react
+    tar xjf $src
+    cd react-*
+    substituteInPlace src/META --replace '+react' $INSTALLDIR
+    chmod +x build
+    ./build 
+    ./build install
+  '';
+
+  meta = {
+    homepage = http://erratique.ch/software/react;
+    description = "Applicative events and signals for OCaml";
+    license = "BSD";
+  };
+}
diff --git a/pkgs/development/ocaml-modules/ssl/default.nix b/pkgs/development/ocaml-modules/ssl/default.nix
new file mode 100644
index 000000000000..6d57bd3bbf51
--- /dev/null
+++ b/pkgs/development/ocaml-modules/ssl/default.nix
@@ -0,0 +1,27 @@
+{stdenv, fetchurl, which, openssl, ocaml, findlib}:
+
+let
+  ocaml_version = (builtins.parseDrvName ocaml.name).version;
+  version = "0.4.4";
+in
+
+stdenv.mkDerivation {
+  name = "ocaml-ssl-${version}";
+
+  src = fetchurl {
+    url = "mirror://debian/pool/main/o/ocaml-ssl/ocaml-ssl_${version}.orig.tar.gz";
+    sha256 = "1m45d0bd4ndxswaa1symp6c1npzjmm9pz0nf7w0q15gflqhba5ch";
+  };
+
+  buildInputs = [which openssl ocaml findlib];
+
+  dontAddPrefix = true;
+
+  configureFlags = "--disable-ldconf";
+
+  meta = {
+    homepage = http://savonet.rastageeks.org/;
+    description = "OCaml bindings for libssl ";
+    license = "LGPL+link exception";
+  };
+}
diff --git a/pkgs/development/perl-modules/gd-options-passthrough-and-fontconfig.patch b/pkgs/development/perl-modules/gd-options-passthrough-and-fontconfig.patch
new file mode 100644
index 000000000000..24eab55f6eb5
--- /dev/null
+++ b/pkgs/development/perl-modules/gd-options-passthrough-and-fontconfig.patch
@@ -0,0 +1,49 @@
+This patch configures Getopt::Long to pass options
+so they will be available at the second GetOptions call.
+
+Also an option to specify the search path for libfontconfig
+is added.
+diff -Naur GD-2.45/Makefile.PL GD-2.45-patched/Makefile.PL
+--- GD-2.45/Makefile.PL	2009-07-10 13:40:07.000000000 -0430
++++ GD-2.45-patched/Makefile.PL	2010-11-26 22:48:52.372992578 -0430
+@@ -16,9 +16,9 @@
+ my (@INC,@LIBPATH,@LIBS);
+ my $AUTOCONFIG = 0;      # global set by try_to_autoconfigure() below
+ 
+-my ($options,$lib_gd_path,$lib_ft_path,$lib_png_path,$lib_jpeg_path,$lib_xpm_path,$lib_zlib_path,$force);
++my ($options,$lib_gd_path,$lib_ft_path,$lib_png_path,$lib_jpeg_path,$lib_xpm_path,$lib_zlib_path,$lib_fontconfig_path,$force);
+ 
+-use Getopt::Long;
++use Getopt::Long qw(:config pass_through);
+ GetOptions("ignore_missing_gd" => \$force);
+ 
+ unless (try_to_autoconfigure(\$options,\$lib_gd_path,\@INC,\@LIBPATH,\@LIBS) || $force) {
+@@ -49,6 +49,7 @@
+ 			"lib_jpeg_path=s" => \$lib_jpeg_path,
+ 			"lib_xpm_path=s"  => \$lib_xpm_path,
+ 			"lib_zlib_path=s" => \$lib_zlib_path,
++                        "lib_fontconfig_path=s" => \$lib_fontconfig_path,
+ 		       );
+ unless ($result) {
+   print STDERR <<END;
+@@ -64,6 +65,7 @@
+      -lib_jpeg_path path            path to libjpeg
+      -lib_xpm_path  path            path to libxpm
+      -lib_zlib_path path            path to libpng
++     -lib_fontconfig_path path      path to libfontconfig
+      -ignore_missing_gd             Ignore missing or old libgd installations and try to compile anyway
+ 
+ If no options are passed on the command line.  The program will
+@@ -111,6 +113,12 @@
+     @INC     = ("-I$lib_zlib_path/include", @INC);
+     @LIBPATH = ("-L$lib_zlib_path/lib", @LIBPATH); 
+ }
++if( defined($lib_fontconfig_path) ) 
++{
++    print "Fontconfig library used from:     $lib_fontconfig_path\n";
++    @INC     = ("-I$lib_fontconfig_path/include", @INC);
++    @LIBPATH = ("-L$lib_fontconfig_path/lib", @LIBPATH); 
++}
+ #############################################################################################
+ 
+ if ($^O eq 'VMS'){
diff --git a/pkgs/development/tools/build-managers/scons/default.nix b/pkgs/development/tools/build-managers/scons/default.nix
index d23940dda945..9d6ab6ba8159 100644
--- a/pkgs/development/tools/build-managers/scons/default.nix
+++ b/pkgs/development/tools/build-managers/scons/default.nix
@@ -13,16 +13,15 @@ stdenv.mkDerivation {
     sha256 = "0qk74nrnm9qlijrq6gmy8cyhjgp0gis4zx44divnr8n487d5308a";
   };
 
+  buildInputs = [python makeWrapper];
+
   preConfigure = ''
-    for i in script/* 
-    do 
+    for i in "script/"*; do
      substituteInPlace $i --replace "/usr/bin/env python" "${python}/bin/python"
     done
   '';
-
-  propagatedBuildInputs = [python makeWrapper];
-  buildPhase = "python setup.py install --prefix=$out --install-lib=$(toPythonPath $out) --hardlink-scons -O1";
-  installPhase = "for n in $out/bin/*; do wrapProgram $n --suffix PYTHONPATH ':' \"$(toPythonPath $out)\"; done";
+  buildPhase = "python setup.py install --prefix=$out --install-data=$out/share --install-lib=$(toPythonPath $out) --symlink-scons -O1";
+  installPhase = "for n in $out/bin/*-${version}; do wrapProgram $n --suffix PYTHONPATH ':' \"$(toPythonPath $out)\"; done";
 
   meta = {
     homepage = "http://scons.org/";
diff --git a/pkgs/development/tools/documentation/doxygen/default.nix b/pkgs/development/tools/documentation/doxygen/default.nix
index 899343d12ff8..9d15dc29772d 100644
--- a/pkgs/development/tools/documentation/doxygen/default.nix
+++ b/pkgs/development/tools/documentation/doxygen/default.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
   configureFlags = "--release"
 		 + (if qt == null then "" else " --with-doxywizard")
 		 ;
-
+  makeFlags = "MAN1DIR=share/man/man1";
   preConfigure =
    (if (qt == null)
     then ""
diff --git a/pkgs/development/tools/misc/distcc/default.nix b/pkgs/development/tools/misc/distcc/default.nix
index e372350e3846..b81cb9223bc3 100644
--- a/pkgs/development/tools/misc/distcc/default.nix
+++ b/pkgs/development/tools/misc/distcc/default.nix
@@ -19,6 +19,7 @@ stdenv.mkDerivation {
   ''
     configureFlagsArray=( CFLAGS="-O2 -fno-strict-aliasing"
                           CXXFLAGS="-O2 -fno-strict-aliasing"
+			  --mandir=$out/share/man
                           ${if sysconfDir == "" then "" else "--sysconfdir=${sysconfDir}"}
                           ${if static then "LDFLAGS=-static" else ""}
                           --with${if static == true || popt == null then "" else "out"}-included-popt
diff --git a/pkgs/development/tools/ocaml/findlib/default.nix b/pkgs/development/tools/ocaml/findlib/default.nix
new file mode 100644
index 000000000000..e1f85f745759
--- /dev/null
+++ b/pkgs/development/tools/ocaml/findlib/default.nix
@@ -0,0 +1,54 @@
+{stdenv, fetchurl, m4, ncurses, ocaml, writeText}:
+
+let
+  ocaml_version = (builtins.parseDrvName ocaml.name).version;
+  version = "1.2.6";
+in
+
+stdenv.mkDerivation {
+  name = "ocaml-findlib-${version}";
+
+  src = fetchurl {
+    url = "http://download.camlcity.org/download/findlib-${version}.tar.gz";
+    sha256 = "1b6z5lylsjxxaifw2yc21cs0dc84zqi4q57sgwg4j8k3m60ivpxs";
+  };
+
+  buildInputs = [m4 ncurses ocaml];
+
+  patches = [ ./ldconf.patch ];
+
+  dontAddPrefix=true;
+
+  preConfigure=''
+    configureFlagsArray=(
+      -bindir $out/bin
+      -mandir $out/share/man
+      -sitelib $out/lib/ocaml/${ocaml_version}/site-lib
+      -config $out/etc/findlib.conf
+      -no-topfind
+    )
+  '';
+
+  buildPhase = ''
+    make all
+    make opt
+  '';
+
+  setupHook = writeText "setupHook.sh" ''
+    addOCamlPath () {
+        if test -d "''$1/lib/ocaml/${ocaml_version}/site-lib"; then
+            export OCAMLPATH="''${OCAMLPATH}''${OCAMLPATH:+:}''$1/lib/ocaml/${ocaml_version}/site-lib/"
+        fi
+        export OCAMLFIND_DESTDIR="''$out/lib/ocaml/${ocaml_version}/site-lib/"
+        ensureDir ''$OCAMLFIND_DESTDIR
+    }
+    
+    envHooks=(''${envHooks[@]} addOCamlPath)
+  '';
+
+  meta = {
+    homepage = http://projects.camlcity.org/projects/findlib.html;
+    description = "O'Caml library manager";
+    license = "MIT/X11";
+  };
+}
diff --git a/pkgs/development/tools/ocaml/findlib/ldconf.patch b/pkgs/development/tools/ocaml/findlib/ldconf.patch
new file mode 100644
index 000000000000..7718cb673925
--- /dev/null
+++ b/pkgs/development/tools/ocaml/findlib/ldconf.patch
@@ -0,0 +1,8 @@
+Setting paths to search for dnynmic libraries isn't very useful in Nix.
+
+--- findlib-1.2.6/findlib.conf.in	2010-08-17 14:50:28.000000000 -0400
++++ findlib-1.2.6/findlib.conf.in	2010-11-24 09:46:55.179648354 -0500
+@@ -1,2 +1,3 @@
+ destdir="@SITELIB@"
+ path="@SITELIB@"
++ldconf="ignore"