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/mono/default.nix17
-rw-r--r--pkgs/development/interpreters/ruby/generated.nix11
-rw-r--r--pkgs/development/interpreters/ruby/patches.nix4
-rw-r--r--pkgs/development/libraries/atk/default.nix4
-rw-r--r--pkgs/development/libraries/cairo/default.nix12
-rw-r--r--pkgs/development/libraries/gdk-pixbuf/default.nix4
-rw-r--r--pkgs/development/libraries/gtk+/2.x.nix5
-rw-r--r--pkgs/development/libraries/haskell/Agda/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/ListLike/default.nix10
-rw-r--r--pkgs/development/libraries/haskell/acid-state/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/concurrent-extra/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/hakyll/default.nix29
-rw-r--r--pkgs/development/libraries/haskell/hflags/default.nix14
-rw-r--r--pkgs/development/libraries/haskell/iteratee/default.nix1
-rw-r--r--pkgs/development/libraries/haskell/persistent/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/snap/core.nix16
-rw-r--r--pkgs/development/libraries/libgcrypt/default.nix8
-rw-r--r--pkgs/development/libraries/pango/default.nix2
-rw-r--r--pkgs/development/libraries/ruby_gpgme/default.nix64
-rw-r--r--pkgs/development/libraries/ruby_ncursesw_sup/default.nix47
-rw-r--r--pkgs/development/mobile/titaniumenv/titaniumsdk.nix10
-rw-r--r--pkgs/development/ocaml-modules/camlimages/default.nix43
-rw-r--r--pkgs/development/ocaml-modules/camlzip/default.nix6
-rw-r--r--pkgs/development/ocaml-modules/cryptokit/default.nix6
-rw-r--r--pkgs/development/ocaml-modules/dypgen/default.nix33
-rw-r--r--pkgs/development/ocaml-modules/lablgl/Makefile.config.patch117
-rw-r--r--pkgs/development/ocaml-modules/lablgl/default.nix45
-rw-r--r--pkgs/development/ocaml-modules/lablgtk/default.nix13
-rw-r--r--pkgs/development/ocaml-modules/ocaml-cairo/META.patch16
-rw-r--r--pkgs/development/ocaml-modules/ocaml-cairo/default.nix44
-rw-r--r--pkgs/development/ocaml-modules/ocamlnet/configure.patch63
-rw-r--r--pkgs/development/ocaml-modules/ocamlnet/default.nix18
-rw-r--r--pkgs/development/ocaml-modules/sqlite3/default.nix13
-rw-r--r--pkgs/development/tools/documentation/haddock/2.13.2.1.nix20
-rw-r--r--pkgs/development/tools/ocaml/omake/0.9.8.6-rc1.nix37
-rw-r--r--pkgs/development/tools/ocaml/omake/warn.patch10
36 files changed, 683 insertions, 75 deletions
diff --git a/pkgs/development/compilers/mono/default.nix b/pkgs/development/compilers/mono/default.nix
index 47b13700b8ac..88bef618f743 100644
--- a/pkgs/development/compilers/mono/default.nix
+++ b/pkgs/development/compilers/mono/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, bison, pkgconfig, glib, gettext, perl, libgdiplus}:
+{stdenv, fetchurl, bison, pkgconfig, glib, gettext, perl, libgdiplus, libX11}:
 
 stdenv.mkDerivation rec {
   name = "mono-2.11.4";
@@ -7,7 +7,7 @@ stdenv.mkDerivation rec {
     sha256 = "0wv8pnj02mq012sihx2scx0avyw51b5wb976wn7x86zda0vfcsnr";
   };
 
-  buildInputs = [bison pkgconfig glib gettext perl libgdiplus];
+  buildInputs = [bison pkgconfig glib gettext perl libgdiplus libX11];
   propagatedBuildInputs = [glib];
 
   NIX_LDFLAGS = "-lgcc_s" ;
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
 
   # In fact I think this line does not help at all to what I
   # wanted to achieve: have mono to find libgdiplus automatically
-  configureFlags = "--with-libgdiplus=${libgdiplus}/lib/libgdiplus.so";
+  configureFlags = "--x-includes=${libX11}/include --x-libraries=${libX11}/lib --with-libgdiplus=${libgdiplus}/lib/libgdiplus.so";
 
   # Attempt to fix this error when running "mcs --version":
   # The file /nix/store/xxx-mono-2.4.2.1/lib/mscorlib.dll is an invalid CIL image
@@ -31,6 +31,17 @@ stdenv.mkDerivation rec {
     patchShebangs ./
   ";
 
+  #Fix mono DLLMap so it can find libX11 and gdiplus to run winforms apps
+  #Other items in the DLLMap may need to be pointed to their store locations, I don't think this is exhaustive
+  #http://www.mono-project.com/Config_DllMap
+  postBuild = ''
+    find . -name 'config' -type f | while read i; do
+        sed -i "s@libMonoPosixHelper.so@$out/lib/libMonoPosixHelper.so@g" $i
+        sed -i "s@libX11.so.6@${libX11}/lib/libX11.so.6@g" $i
+        sed -i '2 i\<dllmap dll="gdiplus.dll" target="${libgdiplus}/lib/libgdiplus.so" os="!windows"/>' $i
+    done
+  '';
+
   meta = {
     homepage = http://mono-project.com/;
     description = "Cross platform, open source .NET development framework";
diff --git a/pkgs/development/interpreters/ruby/generated.nix b/pkgs/development/interpreters/ruby/generated.nix
index d4bb7fa4f2d1..3e9a3f198e83 100644
--- a/pkgs/development/interpreters/ruby/generated.nix
+++ b/pkgs/development/interpreters/ruby/generated.nix
@@ -97,6 +97,7 @@ g: # Get dependencies from patched gems
     uuid = g.uuid_2_3_7;
     uuidtools = g.uuidtools_2_1_3;
     websocket = g.websocket_1_0_7;
+    xapian_full_alaveteli = g.xapian_full_alaveteli_1_2_9_5;
     xml_simple = g.xml_simple_1_1_1;
     yajl_ruby = g.yajl_ruby_1_1_0;
   };
@@ -1467,6 +1468,16 @@ interpreters.'';
       requiredGems = [  ];
       sha256 = ''1jrfz4295qbnjaxv37fw9jzxyxz61izp7c0683mnscacpx262zw0'';
     };
+    xapian_full_alaveteli_1_2_9_5 = {
+      basename = ''xapian_full_alaveteli'';
+      meta = {
+        description = ''xapian-core + Ruby xapian-bindings'';
+        longDescription = ''Xapian bindings for Ruby without dependency on system Xapian library'';
+      };
+      name = ''xapian-full-alaveteli-1.2.9.5'';
+      requiredGems = [  ];
+      sha256 = ''0qg1jkx5lr4a5v7l3f9gq7f07al6qaxxzma230zrzs48bz3qnhxm'';
+    };
     xml_simple_1_1_1 = {
       basename = ''xml_simple'';
       meta = {
diff --git a/pkgs/development/interpreters/ruby/patches.nix b/pkgs/development/interpreters/ruby/patches.nix
index c4da956b57c8..47b8864a635e 100644
--- a/pkgs/development/interpreters/ruby/patches.nix
+++ b/pkgs/development/interpreters/ruby/patches.nix
@@ -91,6 +91,10 @@ in
     gemFlags = "--no-rdoc --no-ri";
   };
 
+  xapian_full_alaveteli = {
+    buildInputs = [ zlib libuuid ];
+  };
+
   rjb = {
     buildInputs = [ jdk ];
     JAVA_HOME = jdk;
diff --git a/pkgs/development/libraries/atk/default.nix b/pkgs/development/libraries/atk/default.nix
index d8e69fbf603e..cea207f27bc5 100644
--- a/pkgs/development/libraries/atk/default.nix
+++ b/pkgs/development/libraries/atk/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, perl, glib }:
+{ stdenv, fetchurl, pkgconfig, perl, glib, libintlOrEmpty }:
 
 stdenv.mkDerivation rec {
   name = "atk-2.8.0";
@@ -8,6 +8,8 @@ stdenv.mkDerivation rec {
     sha256 = "1x3dd3hg9l1j9dq70xwph13vxdp6a9wbfcnryryf1wr6c8bij9dj";
   };
 
+  buildInputs = libintlOrEmpty;
+
   nativeBuildInputs = [ pkgconfig perl ];
 
   propagatedBuildInputs = [ glib ];
diff --git a/pkgs/development/libraries/cairo/default.nix b/pkgs/development/libraries/cairo/default.nix
index a957a84c6a70..55a746890262 100644
--- a/pkgs/development/libraries/cairo/default.nix
+++ b/pkgs/development/libraries/cairo/default.nix
@@ -30,8 +30,11 @@ stdenv.mkDerivation rec {
   configureFlags = [ "--enable-tee" ]
     ++ optional xcbSupport "--enable-xcb"
     ++ optional glSupport "--enable-gl"
+    ++ optional pdfSupport "--enable-pdf"
     ;
 
+  NIX_CFLAGS_COMPILE = "-I${pixman}/include/pixman-1";
+
   preConfigure =
   # On FreeBSD, `-ldl' doesn't exist.
     (stdenv.lib.optionalString stdenv.isFreeBSD
@@ -40,7 +43,14 @@ stdenv.mkDerivation rec {
             cat "$i" | sed -es/-ldl//g > t
             mv t "$i"
           done
-       '');
+       '') 
+       +
+    ''
+    # Work around broken `Requires.private' that prevents Freetype
+    # `-I' flags to be propagated.
+    sed -i "src/cairo.pc.in" \
+        -es'|^Cflags:\(.*\)$|Cflags: \1 -I${freetype}/include/freetype2 -I${freetype}/include|g'
+    '';
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix
index c466905e4917..3a22bb4c3c1a 100644
--- a/pkgs/development/libraries/gdk-pixbuf/default.nix
+++ b/pkgs/development/libraries/gdk-pixbuf/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, pkgconfig, glib, libtiff, libjpeg, libpng, libX11, xz
-, jasper }:
+, jasper, libintlOrEmpty }:
 
 stdenv.mkDerivation rec {
   name = "gdk-pixbuf-2.28.1";
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
   };
 
   # !!! We might want to factor out the gdk-pixbuf-xlib subpackage.
-  buildInputs = [ libX11 ];
+  buildInputs = [ libX11 libintlOrEmpty ];
 
   nativeBuildInputs = [ pkgconfig ];
 
diff --git a/pkgs/development/libraries/gtk+/2.x.nix b/pkgs/development/libraries/gtk+/2.x.nix
index 2135c4ae52b5..b7c7841bf58c 100644
--- a/pkgs/development/libraries/gtk+/2.x.nix
+++ b/pkgs/development/libraries/gtk+/2.x.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, pkgconfig, gettext, glib, atk, pango, cairo, perl, xlibs
-, gdk_pixbuf
+, gdk_pixbuf, xz, libintlOrEmpty
 , xineramaSupport ? true
 , cupsSupport ? true, cups ? null
 }:
@@ -17,12 +17,15 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
+  NIX_CFLAGS_COMPILE = "-I${cairo}/include/cairo";
+
   nativeBuildInputs = [ perl pkgconfig gettext ];
 
   propagatedBuildInputs = with xlibs;
     [ glib cairo pango gdk_pixbuf atk
       libXrandr libXrender libXcomposite libXi libXcursor
     ]
+    ++ libintlOrEmpty
     ++ stdenv.lib.optional xineramaSupport libXinerama
     ++ stdenv.lib.optionals cupsSupport [ cups ];
 
diff --git a/pkgs/development/libraries/haskell/Agda/default.nix b/pkgs/development/libraries/haskell/Agda/default.nix
index f6589dc53be2..64c9d9d51e58 100644
--- a/pkgs/development/libraries/haskell/Agda/default.nix
+++ b/pkgs/development/libraries/haskell/Agda/default.nix
@@ -5,8 +5,8 @@
 
 cabal.mkDerivation (self: {
   pname = "Agda";
-  version = "2.3.2";
-  sha256 = "1xp0qvag6wx6zjwhmb7nm13hp63vlh8h4a2rkc85rsh610m0nynl";
+  version = "2.3.2.1";
+  sha256 = "1dlf0cs913ma8wjvra8x6p0lwi1pk7ynbdq4lxgbdfgqkbnh43kr";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
diff --git a/pkgs/development/libraries/haskell/ListLike/default.nix b/pkgs/development/libraries/haskell/ListLike/default.nix
index 2fa427b1f57e..b24e81300b62 100644
--- a/pkgs/development/libraries/haskell/ListLike/default.nix
+++ b/pkgs/development/libraries/haskell/ListLike/default.nix
@@ -1,11 +1,11 @@
-{ cabal }:
+{ cabal, HUnit, QuickCheck, random, text, vector }:
 
 cabal.mkDerivation (self: {
   pname = "ListLike";
-  version = "3.1.7.1";
-  sha256 = "1g3i8iz71x3j41ji9xsbh84v5hj3mxls0zqnx27sb31mx6bic4w1";
-  isLibrary = true;
-  isExecutable = true;
+  version = "4.0.0";
+  sha256 = "13dw8pkj8dwxb81gbcm7gn221zyr3ck9s9s1iv7v1b69chv0zyxk";
+  buildDepends = [ text vector ];
+  testDepends = [ HUnit QuickCheck random text vector ];
   meta = {
     homepage = "http://software.complete.org/listlike";
     description = "Generic support for list-like structures";
diff --git a/pkgs/development/libraries/haskell/acid-state/default.nix b/pkgs/development/libraries/haskell/acid-state/default.nix
index 10f222cfe105..dcd6698a5a25 100644
--- a/pkgs/development/libraries/haskell/acid-state/default.nix
+++ b/pkgs/development/libraries/haskell/acid-state/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "acid-state";
-  version = "0.8.3";
-  sha256 = "1n7vafw3jz7kmlp5jqn1wv0ip2rcbyfx0cdi2m1a2lvpi6dh97gc";
+  version = "0.10.0";
+  sha256 = "0jjjh8l6ka8kawgp1gm75is4ajavl7nd6b2l717wjs8sy93qnzsc";
   buildDepends = [
     cereal extensibleExceptions filepath mtl network safecopy stm
   ];
diff --git a/pkgs/development/libraries/haskell/concurrent-extra/default.nix b/pkgs/development/libraries/haskell/concurrent-extra/default.nix
index db380f03b5bd..9f97f7304724 100644
--- a/pkgs/development/libraries/haskell/concurrent-extra/default.nix
+++ b/pkgs/development/libraries/haskell/concurrent-extra/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "concurrent-extra";
-  version = "0.7.0.5";
-  sha256 = "0g1ckrwgdyrlp1m352ivplajqzqhw5ymlkb4miiv7c5i9xyyyqnc";
+  version = "0.7.0.6";
+  sha256 = "12wq86hkgy22qydkj4fw6vb7crzv3010c2mkhsph4rdynr0v588i";
   buildDepends = [ baseUnicodeSymbols stm unboundedDelays ];
   testDepends = [
     baseUnicodeSymbols HUnit stm testFramework testFrameworkHunit
diff --git a/pkgs/development/libraries/haskell/hakyll/default.nix b/pkgs/development/libraries/haskell/hakyll/default.nix
index 4f50ab449508..9575bc7b4bba 100644
--- a/pkgs/development/libraries/haskell/hakyll/default.nix
+++ b/pkgs/development/libraries/haskell/hakyll/default.nix
@@ -1,34 +1,31 @@
 { cabal, binary, blazeHtml, blazeMarkup, citeprocHs, cmdargs
-, cryptohash, dataDefault, deepseq, filepath, httpConduit
+, cryptohash, dataDefault, deepseq, filepath, fsnotify, httpConduit
 , httpTypes, HUnit, lrucache, mtl, pandoc, parsec, QuickCheck
-, random, regexBase, regexTdfa, snapCore, snapServer, tagsoup
-, testFramework, testFrameworkHunit, testFrameworkQuickcheck2, text
-, time
+, random, regexBase, regexTdfa, snapCore, snapServer
+, systemFilepath, tagsoup, testFramework, testFrameworkHunit
+, testFrameworkQuickcheck2, text, time
 }:
 
 cabal.mkDerivation (self: {
   pname = "hakyll";
-  version = "4.2.2.0";
-  sha256 = "0kz8v2ip0hmvqnrxgv44g2863z1dql88razl7aa3fw01q56ihz0y";
+  version = "4.3.0.0";
+  sha256 = "188j3spdi2mivx5a10whpb09fm8yhg54ddfwc6x0k040c7q3aq0q";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
     binary blazeHtml blazeMarkup citeprocHs cmdargs cryptohash
-    dataDefault deepseq filepath httpConduit httpTypes lrucache mtl
-    pandoc parsec random regexBase regexTdfa snapCore snapServer
-    tagsoup text time
+    dataDefault deepseq filepath fsnotify httpConduit httpTypes
+    lrucache mtl pandoc parsec random regexBase regexTdfa snapCore
+    snapServer systemFilepath tagsoup text time
   ];
   testDepends = [
     binary blazeHtml blazeMarkup citeprocHs cmdargs cryptohash
-    dataDefault deepseq filepath httpConduit httpTypes HUnit lrucache
-    mtl pandoc parsec QuickCheck random regexBase regexTdfa snapCore
-    snapServer tagsoup testFramework testFrameworkHunit
-    testFrameworkQuickcheck2 text time
+    dataDefault deepseq filepath fsnotify httpConduit httpTypes HUnit
+    lrucache mtl pandoc parsec QuickCheck random regexBase regexTdfa
+    snapCore snapServer systemFilepath tagsoup testFramework
+    testFrameworkHunit testFrameworkQuickcheck2 text time
   ];
   doCheck = false;
-  patchPhase = ''
-    sed -i -e 's|cryptohash .*,|cryptohash,|' hakyll.cabal
-  '';
   meta = {
     homepage = "http://jaspervdj.be/hakyll";
     description = "A static website compiler library";
diff --git a/pkgs/development/libraries/haskell/hflags/default.nix b/pkgs/development/libraries/haskell/hflags/default.nix
new file mode 100644
index 000000000000..17c01f9a6599
--- /dev/null
+++ b/pkgs/development/libraries/haskell/hflags/default.nix
@@ -0,0 +1,14 @@
+{ cabal, text }:
+
+cabal.mkDerivation (self: {
+  pname = "hflags";
+  version = "0.1.3";
+  sha256 = "0nn08xqn0hvdlblnaad3nsdfkc0ssab6kvhi4qbrcq9jmjmspld3";
+  buildDepends = [ text ];
+  meta = {
+    homepage = "http://github.com/errge/hflags";
+    description = "Command line flag parser, very similar to Google's gflags";
+    license = "Apache-2.0";
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/iteratee/default.nix b/pkgs/development/libraries/haskell/iteratee/default.nix
index ee9026bae493..c4438d973644 100644
--- a/pkgs/development/libraries/haskell/iteratee/default.nix
+++ b/pkgs/development/libraries/haskell/iteratee/default.nix
@@ -10,6 +10,7 @@ cabal.mkDerivation (self: {
     ListLike MonadCatchIOTransformers monadControl parallel
     transformers transformersBase
   ];
+  jailbreak = true;
   meta = {
     homepage = "http://www.tiresiaspress.us/haskell/iteratee";
     description = "Iteratee-based I/O";
diff --git a/pkgs/development/libraries/haskell/persistent/default.nix b/pkgs/development/libraries/haskell/persistent/default.nix
index 79fd1f6f781a..57bb615800b4 100644
--- a/pkgs/development/libraries/haskell/persistent/default.nix
+++ b/pkgs/development/libraries/haskell/persistent/default.nix
@@ -7,8 +7,8 @@
 
 cabal.mkDerivation (self: {
   pname = "persistent";
-  version = "1.2.0.1";
-  sha256 = "1bs74g1fkwq4wvz18lp0ial6z58vpslgv0rqdn91ka6gw8k4fvlb";
+  version = "1.2.0.2";
+  sha256 = "026zdfccy57dbsacg8227jzcdyq50nb1bkcr56ryxi91ymlyf50k";
   buildDepends = [
     aeson attoparsec base64Bytestring blazeHtml blazeMarkup conduit
     liftedBase monadControl monadLogger pathPieces poolConduit
diff --git a/pkgs/development/libraries/haskell/snap/core.nix b/pkgs/development/libraries/haskell/snap/core.nix
index a20ec8e7ca5a..f2440ef250f9 100644
--- a/pkgs/development/libraries/haskell/snap/core.nix
+++ b/pkgs/development/libraries/haskell/snap/core.nix
@@ -1,19 +1,19 @@
 { cabal, attoparsec, attoparsecEnumerator, blazeBuilder
 , blazeBuilderEnumerator, bytestringMmap, caseInsensitive, deepseq
-, enumerator, filepath, HUnit, MonadCatchIOTransformers, mtl
-, random, regexPosix, text, time, unixCompat, unorderedContainers
-, vector, zlibEnum
+, enumerator, filepath, hashable, HUnit, MonadCatchIOTransformers
+, mtl, random, regexPosix, text, time, unixCompat
+, unorderedContainers, vector, zlibEnum
 }:
 
 cabal.mkDerivation (self: {
   pname = "snap-core";
-  version = "0.9.3.1";
-  sha256 = "1q2lk70l0hk4l6ksjnal1bfkby0i08gdzvj9cscvxs4njxmgdapq";
+  version = "0.9.4.0";
+  sha256 = "08afaj4ln4nl7ymdixijzjx8hc7nnr70gz7avpzaanq5nrw0k054";
   buildDepends = [
     attoparsec attoparsecEnumerator blazeBuilder blazeBuilderEnumerator
-    bytestringMmap caseInsensitive deepseq enumerator filepath HUnit
-    MonadCatchIOTransformers mtl random regexPosix text time unixCompat
-    unorderedContainers vector zlibEnum
+    bytestringMmap caseInsensitive deepseq enumerator filepath hashable
+    HUnit MonadCatchIOTransformers mtl random regexPosix text time
+    unixCompat unorderedContainers vector zlibEnum
   ];
   meta = {
     homepage = "http://snapframework.com/";
diff --git a/pkgs/development/libraries/libgcrypt/default.nix b/pkgs/development/libraries/libgcrypt/default.nix
index c262535a1f7d..cb60355ef558 100644
--- a/pkgs/development/libraries/libgcrypt/default.nix
+++ b/pkgs/development/libraries/libgcrypt/default.nix
@@ -1,6 +1,6 @@
 { fetchurl, stdenv, libgpgerror }:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (rec {
   name = "libgcrypt-1.5.2";
 
   src = fetchurl {
@@ -34,4 +34,8 @@ stdenv.mkDerivation rec {
     homepage = http://gnupg.org/;
     platforms = stdenv.lib.platforms.all;
   };
-}
+} # old "as" problem, see #616 and http://gnupg.10057.n7.nabble.com/Fail-to-build-on-freebsd-7-3-td30245.html
+  // stdenv.lib.optionalAttrs (stdenv.isFreeBSD && stdenv.isi686)
+    { configureFlags = [ "--disable-aesni-support" ]; }
+)
+
diff --git a/pkgs/development/libraries/pango/default.nix b/pkgs/development/libraries/pango/default.nix
index 418a2acb0b77..8d3efe490251 100644
--- a/pkgs/development/libraries/pango/default.nix
+++ b/pkgs/development/libraries/pango/default.nix
@@ -8,6 +8,8 @@ stdenv.mkDerivation rec {
     sha256 = "08aqis6j8nd1lb4f2h4h9d9kjvp54iwf8zvqzss0qn4v7nfcjyvx";
   };
 
+  NIX_CFLAGS_COMPILE = "-I${cairo}/include/cairo";
+
   buildInputs = stdenv.lib.optionals stdenv.isDarwin [ gettext fontconfig ];
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/development/libraries/ruby_gpgme/default.nix b/pkgs/development/libraries/ruby_gpgme/default.nix
new file mode 100644
index 000000000000..c5f2366bfa1c
--- /dev/null
+++ b/pkgs/development/libraries/ruby_gpgme/default.nix
@@ -0,0 +1,64 @@
+{ stdenv, fetchurl, gpgme, ruby, rubygems, hoe }:
+
+stdenv.mkDerivation {
+  name = "ruby-gpgme-1.0.8";
+
+  src = fetchurl {
+    url = "https://github.com/ueno/ruby-gpgme/archive/1.0.8.tar.gz";
+    sha256 = "1j7jkl9s8iqcmxf3x6c9kljm19hw1jg6yvwbndmkw43qacdr9nxb";
+  };
+
+  meta = {
+    description = ''
+      Ruby-GPGME is a Ruby language binding of GPGME (GnuPG Made
+      Easy)
+    '';
+    homepage = "http://rubyforge.org/projects/ruby-gpgme/";
+    longDescription = ''
+      Ruby-GPGME is a Ruby language binding of GPGME (GnuPG Made Easy).
+
+      GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
+      easier for applications. It provides a High-Level Crypto API for
+      encryption, decryption, signing, signature verification and key
+      management.
+    '';
+  };
+
+  buildInputs = [ gpgme rubygems hoe ruby ];
+
+  buildPhase = ''
+    ${ruby}/bin/ruby extconf.rb
+    rake gem
+  '';
+
+  installPhase = ''
+    export HOME=$TMP/home; mkdir -pv "$HOME"
+
+    # For some reason, the installation phase doesn't work with the default
+    # make install command run by gem (we'll fix it and do it ourselves later)
+    gem install --no-verbose --install-dir "$out/${ruby.gemPath}" \
+        --bindir "$out/bin" --no-rdoc --no-ri pkg/gpgme-1.0.8.gem || true
+
+    # Create a bare-bones gemspec file so that ruby will recognise the gem
+    cat <<EOF >"$out/${ruby.gemPath}/specifications/gpgme.gemspec"
+    Gem::Specification.new do |s|
+      s.name              = 'gpgme'
+      s.version           = '1.0.8'
+      s.files             = Dir['{lib,examples}/**/*']
+      s.rubyforge_project = 'ruby-gpgme'
+      s.require_paths     = ['lib']
+    end
+    EOF
+
+    cd "$out/${ruby.gemPath}/gems/gpgme-1.0.8"
+    mkdir src
+    mv lib src
+    sed -i "s/srcdir = ./srcdir = src/" Makefile
+    make install
+
+    mv lib lib.bak
+    mv src/lib lib
+    rmdir src
+  '';
+}
+
diff --git a/pkgs/development/libraries/ruby_ncursesw_sup/default.nix b/pkgs/development/libraries/ruby_ncursesw_sup/default.nix
new file mode 100644
index 000000000000..67041ad06078
--- /dev/null
+++ b/pkgs/development/libraries/ruby_ncursesw_sup/default.nix
@@ -0,0 +1,47 @@
+{ stdenv, fetchurl, ncurses, ruby, rubygems }:
+
+stdenv.mkDerivation rec {
+  name = ''ncursesw-sup-afd962b9c06108ff0643e98593c5605314d76917'';
+
+  src = fetchurl {
+    url = "https://github.com/sup-heliotrope/ncursesw-ruby/archive/afd962b9c06108ff0643e98593c5605314d76917.tar.gz";
+    sha256 = "13i286p4bm8zqg9xh96a1dg7wkywj9m6975gbh3w43d3rmfc1h6a";
+  };
+
+  meta = {
+    description = ''
+      Hacked up version of ncurses gem that supports wide characters for
+      supmua.org
+    '';
+    homepage = ''http://github.com/sup-heliotrope/ncursesw-ruby'';
+    longDescription = ''
+      This wrapper provides access to the functions, macros, global variables
+      and constants of the ncurses library.  These are mapped to a Ruby Module
+      named "Ncurses":  Functions and external variables are implemented as
+      singleton functions of the Module Ncurses.
+    '';
+  };
+
+  buildInputs = [ ncurses rubygems ];
+
+  buildPhase = "gem build ncursesw.gemspec";
+
+  installPhase = ''
+    export HOME=$TMP/home; mkdir -pv "$HOME"
+
+    # For some reason, the installation phase doesn't work with the default
+    # make install command run by gem (we'll fix it and do it ourselves later)
+    gem install --no-verbose --install-dir "$out/${ruby.gemPath}" \
+        --bindir "$out/bin" --no-rdoc --no-ri ncursesw-sup-1.3.1.2.gem || true
+
+    # Needed for ruby to recognise the gem
+    cp ncursesw.gemspec "$out/${ruby.gemPath}/specifications"
+
+    cd "$out/${ruby.gemPath}/gems/ncursesw-sup-1.3.1.2"
+    mkdir src
+    mv lib src
+    sed -i "s/srcdir = ./srcdir = src/" Makefile
+    make install
+  '';
+}
+
diff --git a/pkgs/development/mobile/titaniumenv/titaniumsdk.nix b/pkgs/development/mobile/titaniumenv/titaniumsdk.nix
index edae828bd08c..46227e5f14d5 100644
--- a/pkgs/development/mobile/titaniumenv/titaniumsdk.nix
+++ b/pkgs/development/mobile/titaniumenv/titaniumsdk.nix
@@ -1,14 +1,14 @@
 {stdenv, fetchurl, unzip, makeWrapper, python, jdk}:
 
 stdenv.mkDerivation {
-  name = "titanium-mobilesdk-3.1.0.v20130415184552";
+  name = "titanium-mobilesdk-3.1.1.v20130612114553";
   src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") then fetchurl {
-    url = http://builds.appcelerator.com.s3.amazonaws.com/mobile/3_1_X/mobilesdk-3.1.0.v20130415184552-linux.zip;
-    sha1 = "7a8b34b92f6c3eff33eefb9a1b6b0d2e3670001d";
+    url = http://builds.appcelerator.com.s3.amazonaws.com/mobile/3_1_X/mobilesdk-3.1.1.v20130612114553-linux.zip;
+    sha1 = "410ba7e8171a887b6a4b3173116430657c3d84aa";
   }
   else if stdenv.system == "x86_64-darwin" then fetchurl {
-    url = http://builds.appcelerator.com.s3.amazonaws.com/mobile/3_1_X/mobilesdk-3.1.0.v20130415184552-osx.zip;
-    sha1 = "e0ed7e399a104e0838e245550197bf787a66bf98";
+    url = http://builds.appcelerator.com.s3.amazonaws.com/mobile/3_1_X/mobilesdk-3.1.1.v20130612114553-osx.zip;
+    sha1 = "0893a1560ac6fb63369fc9f6ea9550b6649438fa";
   }
   else throw "Platform: ${stdenv.system} not supported!";
   
diff --git a/pkgs/development/ocaml-modules/camlimages/default.nix b/pkgs/development/ocaml-modules/camlimages/default.nix
new file mode 100644
index 000000000000..00168d46c3f1
--- /dev/null
+++ b/pkgs/development/ocaml-modules/camlimages/default.nix
@@ -0,0 +1,43 @@
+{stdenv, fetchurl, omake, ocaml, omake_rc1, libtiff, libjpeg, libpng_apng, giflib, findlib, libXpm, freetype, graphicsmagick, ghostscript }:
+
+let
+  ocaml_version = (builtins.parseDrvName ocaml.name).version;
+  pname = "camlimages";
+  version = "4.0.1";
+in
+
+stdenv.mkDerivation {
+  name = "${pname}-${version}";
+
+  src = fetchurl { 
+    url = "https://bitbucket.org/camlspotter/camlimages/get/v4.0.1.tar.gz";
+    sha256 = "b40237c1505487049799a7af296eb3996b3fa08eab94415546f46d61355747c4";
+  };
+
+  buildInputs = [ocaml omake_rc1 findlib graphicsmagick ghostscript ];
+
+  propagatedbuildInputs = [libtiff libjpeg libpng_apng giflib freetype libXpm ];
+
+  createFindlibDestdir = true;
+
+  preConfigure = ''
+    rm ./configure
+  '';
+
+  buildPhase = ''
+    omake
+  '';
+
+  installPhase = ''
+    omake install
+  '';
+
+  #makeFlags = "BINDIR=$(out)/bin  MANDIR=$(out)/usr/share/man/man1 DYPGENLIBDIR=$(out)/lib/ocaml/${ocaml_version}/site-lib";
+
+  meta = {
+    homepage = http://cristal.inria.fr/camlimages;
+    description = "Image manipulation library";
+    license = "GnuGPLV2";
+#    maintainers = [ stdenv.lib.maintainers.roconnor ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/camlzip/default.nix b/pkgs/development/ocaml-modules/camlzip/default.nix
index 03a6dbef23ee..2024f5a5ab8f 100644
--- a/pkgs/development/ocaml-modules/camlzip/default.nix
+++ b/pkgs/development/ocaml-modules/camlzip/default.nix
@@ -2,16 +2,16 @@
 
 let
   ocaml_version = (builtins.parseDrvName ocaml.name).version;
-  version = "1.04";
+  version = "1.05";
 in
 
 stdenv.mkDerivation {
   name = "camlzip-${version}";
 
   src = fetchurl {
-    url = "http://forge.ocamlcore.org/frs/download.php/328/" +
+    url = "http://forge.ocamlcore.org/frs/download.php/1037/" +
           "camlzip-${version}.tar.gz";
-    sha256 = "1zpchmp199x7f4mzmapvfywgy7f6wy9yynd9nd8yh8l78s5gixbn";
+    sha256 = "930b70c736ab5a7ed1b05220102310a0a2241564786657abe418e834a538d06b";
   };
 
   buildInputs = [zlib ocaml findlib];
diff --git a/pkgs/development/ocaml-modules/cryptokit/default.nix b/pkgs/development/ocaml-modules/cryptokit/default.nix
index 48e86ed9a68f..94b36fb66513 100644
--- a/pkgs/development/ocaml-modules/cryptokit/default.nix
+++ b/pkgs/development/ocaml-modules/cryptokit/default.nix
@@ -2,16 +2,16 @@
 
 let
   ocaml_version = (builtins.parseDrvName ocaml.name).version;
-  version = "1.5";
+  version = "1.7";
 in
 
 stdenv.mkDerivation {
   name = "cryptokit-${version}";
 
   src = fetchurl {
-    url = "http://forge.ocamlcore.org/frs/download.php/639/" +
+    url = "http://forge.ocamlcore.org/frs/download.php/1166/" +
           "cryptokit-${version}.tar.gz";
-    sha256 = "1r5kbsbsicrbpdrdim7h8xg2b1a8qg8sxig9q6cywzm57r33lj72";
+    sha256 = "56a8c0339c47ca3cf43c8881d5b519d3bff68bc8a53267e9c5c9cbc9239600ca";
   };
 
   buildInputs = [zlib ocaml findlib ncurses];
diff --git a/pkgs/development/ocaml-modules/dypgen/default.nix b/pkgs/development/ocaml-modules/dypgen/default.nix
new file mode 100644
index 000000000000..73f543f5b626
--- /dev/null
+++ b/pkgs/development/ocaml-modules/dypgen/default.nix
@@ -0,0 +1,33 @@
+{stdenv, fetchurl, ocaml, findlib}:
+
+let
+  ocaml_version = (builtins.parseDrvName ocaml.name).version;
+  pname = "dypgen";
+  version = "20120619-1";
+in
+
+stdenv.mkDerivation {
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "http://dypgen.free.fr/dypgen-20120619-1.tar.bz2";
+    sha256 = "ecb53d6e469e9ec4d57ee6323ff498d45b78883ae13618492488e7c5151fdd97";
+  };
+
+  buildInputs = [ocaml findlib];
+
+  createFindlibDestdir = true;
+
+  buildPhase = ''
+    make
+  '';
+
+  makeFlags = "BINDIR=$(out)/bin  MANDIR=$(out)/usr/share/man/man1 DYPGENLIBDIR=$(out)/lib/ocaml/${ocaml_version}/site-lib";
+
+  meta = {
+    homepage = http://dypgen.free.fr;
+    description = "Dypgen GLR self extensible parser generator";
+    license = "CeCILL-B_V1";
+#    maintainers = [ stdenv.lib.maintainers.roconnor ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/lablgl/Makefile.config.patch b/pkgs/development/ocaml-modules/lablgl/Makefile.config.patch
new file mode 100644
index 000000000000..c896978f57ea
--- /dev/null
+++ b/pkgs/development/ocaml-modules/lablgl/Makefile.config.patch
@@ -0,0 +1,117 @@
+diff -Naur lablGL.ori/Makefile.config lablGL/Makefile.config
+--- lablGL.ori/Makefile.config	1970-01-01 01:00:00.000000000 +0100
++++ lablGL/Makefile.config	2013-06-02 08:13:10.000000000 +0200
+@@ -0,0 +1,63 @@
++#	LablGL and Togl configuration file
++#
++# Please have a look at the config/Makefile in the Objective Caml distribution,
++# or at the labltklink script to get the information needed here
++#
++
++##### Adjust these always
++
++# Uncomment if you have the fast ".opt" compilers
++#CAMLC = ocamlc.opt
++#CAMLOPT = ocamlopt.opt
++
++# Where to put the lablgl script
++BINDIR = @BINDIR@
++
++# Where to find X headers
++XINCLUDES = @XINCLUDES@
++# X libs (for broken RTLD_GLOBAL: e.g. FreeBSD 4.0)
++#XLIBS = -L/usr/X11R6/lib -lXext -lXmu -lX11 -lXi
++
++# Where to find Tcl/Tk headers
++# This must the same version as for LablTk
++TKINCLUDES = @TKINCLUDES@
++# Tcl/Tk libs (for broken RTLD_GLOBAL: e.g. FreeBSD 4.0)
++#TKLIBS = -L/usr/local/lib -ltk84 -ltcl84
++
++# Where to find OpenGL/Mesa/Glut headers and libraries
++GLINCLUDES =
++GLLIBS = -lGL -lGLU
++GLUTLIBS = -lglut
++# The following libraries may be required (try to add them one at a time)
++#GLLIBS = -lGL -lGLU -lXmu -lXext -lXi -lcipher -lpthread
++
++# How to index a library after installing (ranlib required on MacOSX)
++RANLIB = :
++#RANLIB = ranlib
++
++##### Uncomment these for windows
++#TKLIBS = tk83.lib tcl83.lib gdi32.lib user32.lib
++#GLLIBS = opengl32.lib glu32.lib 
++#TOOLCHAIN = msvc
++#XA = .lib
++#XB = .bat
++#XE = .exe
++#XO = .obj
++#XS = .dll
++
++##### Adjust these if non standard
++
++# The Objective Caml library directory
++#LIBDIR = `ocamlc -where`
++
++# Where to put dlls (if dynamic loading available)
++DLLDIR = @DLLDIR@
++
++# Where to put LablGL (standard)
++INSTALLDIR = @INSTALLDIR@
++
++# Where is Togl (default)
++#TOGLDIR = Togl
++
++# C Compiler options
++#COPTS = -c -O
+diff -Naur lablGL.ori/META lablGL/META
+--- lablGL.ori/META	1970-01-01 01:00:00.000000000 +0100
++++ lablGL/META	2013-06-02 22:00:59.000000000 +0200
+@@ -0,0 +1,21 @@
++description = "Bindings for OpenGL graphics engines"
++version = "1.04-1"
++archive(byte) = "lablgl.cma"
++archive(native) = "lablgl.cmxa"
++
++#package "togl" (
++#	description = "OpenGL widget for labltk"
++#	version = "1.01"
++#	requires = "lablgl, labltk"
++#	archive(byte) = "togl.cma"
++#	archive(native) = "togl.cmxa"
++#)
++
++package "glut" (
++	description = "Platform-independent OpenGL window"
++	version = "1.01"
++	requires = "lablgl"
++	archive(byte) = "lablglut.cma"
++	archive(native) = "lablglut.cmxa"
++)
++
+diff -Naur lablGL.ori/META~ lablGL/META~
+--- lablGL.ori/META~	1970-01-01 01:00:00.000000000 +0100
++++ lablGL/META~	2013-06-02 21:59:17.000000000 +0200
+@@ -0,0 +1,21 @@
++description = "Bindings for OpenGL graphics engines"
++version = "1.04-1"
++archive(byte) = "lablgl.cma"
++archive(native) = "lablgl.cmxa"
++
++#package "togl" (
++#	description = "OpenGL widget for labltk"
++#	version = "1.01"
++#	requires = "lablGL, labltk"
++#	archive(byte) = "togl.cma"
++#	archive(native) = "togl.cmxa"
++#)
++
++package "glut" (
++	description = "Platform-independent OpenGL window"
++	version = "1.01"
++	requires = "lablGL"
++	archive(byte) = "lablglut.cma"
++	archive(native) = "lablglut.cmxa"
++)
++
diff --git a/pkgs/development/ocaml-modules/lablgl/default.nix b/pkgs/development/ocaml-modules/lablgl/default.nix
new file mode 100644
index 000000000000..a739e4a7146b
--- /dev/null
+++ b/pkgs/development/ocaml-modules/lablgl/default.nix
@@ -0,0 +1,45 @@
+{stdenv, fetchurl, ocaml, lablgtk, findlib, mesa, freeglut } :
+
+let
+  ocaml_version = (builtins.parseDrvName ocaml.name).version;
+  pname = "lablgl";
+  version = "1.04-1";
+in
+
+stdenv.mkDerivation {
+  name = "${pname}-${version}";
+
+  src = fetchurl { 
+    url = "http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/dist/lablgl-20120306.tar.gz";
+    sha256 = "1w5di2n38h7fkrf668zphnramygwl7ybjhrmww3pi9jcf9apa09r";
+  };
+
+  buildInputs = [ocaml findlib lablgtk mesa freeglut ];
+
+  patches = [ ./Makefile.config.patch ];
+
+  preConfigure = ''
+    substituteInPlace Makefile.config \
+      --subst-var-by BINDIR $out/bin \
+      --subst-var-by INSTALLDIR $out/lib/ocaml/${ocaml_version}/site-lib/lablgl \
+      --subst-var-by DLLDIR $out/lib/ocaml/${ocaml_version}/site-lib/lablgl/stublibs \
+      --subst-var-by TKINCLUDES "" \
+      --subst-var-by XINCLUDES ""
+  '';
+
+  createFindlibDestdir = true;
+
+  #makeFlags = "BINDIR=$(out)/bin  MANDIR=$(out)/usr/share/man/man1 DYPGENLIBDIR=$(out)/lib/ocaml/${ocaml_version}/site-lib";
+  buildFlags = "lib libopt glut glutopt";
+
+  postInstall = ''
+    cp ./META $out/lib/ocaml/${ocaml_version}/site-lib/lablgl
+  '';
+
+  meta = {
+    homepage = http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgl.html;
+    description = "OpenGL bindings for ocaml";
+    license = "GnuGPLV2";
+#    maintainers = [ stdenv.lib.maintainers.roconnor ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/lablgtk/default.nix b/pkgs/development/ocaml-modules/lablgtk/default.nix
index 8a51c216ab40..a62f4ab9ae96 100644
--- a/pkgs/development/ocaml-modules/lablgtk/default.nix
+++ b/pkgs/development/ocaml-modules/lablgtk/default.nix
@@ -3,25 +3,26 @@
 let
   ocaml_version = (builtins.parseDrvName ocaml.name).version;
   pname = "lablgtk";
-  version = "2.14.2";
+  version = "2.16.0";
 in
 
 stdenv.mkDerivation (rec {
   name = "${pname}-${version}";
   src = fetchurl {
-    url = "http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/${name}.tar.gz";
-    sha256 = "1fnh0amm7lwgyjdhmlqgsp62gwlar1140425yc1j6inwmgnsp0a9";
+    url = "https://forge.ocamlcore.org/frs/download.php/979/${name}.tar.gz";
+    sha256 = "a0ea9752eb257dadcfc2914408fff339d4c34357802f02c63329dd41b777de2f";
   };
 
   buildInputs = [ocaml findlib pkgconfig gtk libgnomecanvas libglade gtksourceview];
 
-  patches = [ ./META.patch ];
+  # patches = [ ./META.patch ];
 
   configureFlags = "--with-libdir=$(out)/lib/ocaml/${ocaml_version}/site-lib";
   buildFlags = "world";
 
-  postInstall = ''
-    ocamlfind install lablgtk2 META
+  preInstall = ''
+    mkdir -p $out/lib/ocaml/${ocaml_version}/site-lib
+    export OCAMLPATH=$out/lib/ocaml/${ocaml_version}/site-lib/:$OCAMLPATH
   '';
 
   meta = {
diff --git a/pkgs/development/ocaml-modules/ocaml-cairo/META.patch b/pkgs/development/ocaml-modules/ocaml-cairo/META.patch
new file mode 100644
index 000000000000..ba6e5927b00a
--- /dev/null
+++ b/pkgs/development/ocaml-modules/ocaml-cairo/META.patch
@@ -0,0 +1,16 @@
+diff -Naur cairo-ocaml-1.2.0.ori/META cairo-ocaml-1.2.0/META
+--- cairo-ocaml-1.2.0.ori/META	1970-01-01 01:00:00.000000000 +0100
++++ cairo-ocaml-1.2.0/META	2013-06-04 03:31:32.000000000 +0200
+@@ -0,0 +1,12 @@
++name = "cairo-ocaml"
++description = "Bindings to the cairo library."
++version = "@VERSION@"
++archive(byte) = "cairo.cma"
++archive(native) = "cairo.cmxa"
++requires = "bigarray"
++
++package "lablgtk2" (
++        requires = "cairo lablgtk2"
++        archive(byte) = "cairo_lablgtk.cma"
++        archive(native) = "cairo_lablgtk.cmxa"
++)
diff --git a/pkgs/development/ocaml-modules/ocaml-cairo/default.nix b/pkgs/development/ocaml-modules/ocaml-cairo/default.nix
new file mode 100644
index 000000000000..8f19847680b6
--- /dev/null
+++ b/pkgs/development/ocaml-modules/ocaml-cairo/default.nix
@@ -0,0 +1,44 @@
+{stdenv, fetchurl, automake, ocaml, autoconf, gnum4, pkgconfig, freetype, lablgtk, unzip, cairo, findlib, gdk_pixbuf, glib, gtk, pango }: 
+
+let
+  ocaml_version = (builtins.parseDrvName ocaml.name).version;
+  pname = "ocaml-cairo";
+  version = "1.2.0";
+in
+
+stdenv.mkDerivation {
+  name = "${pname}-${version}";
+
+  src = fetchurl { 
+    url = "http://cgit.freedesktop.org/cairo-ocaml/snapshot/cairo-ocaml-${version}.zip";
+    sha256 = "2d59678e322c331e3f4bc02a77240fce4a0917acb0d3ae75953a6ac62d70a125";
+  };
+
+  patches = [ ./META.patch ];
+
+  buildInputs = [ocaml automake gnum4 autoconf unzip pkgconfig findlib freetype lablgtk cairo gdk_pixbuf gtk pango ];
+
+  createFindlibDestdir = true;
+
+ preConfigure = ''
+   aclocal -I support
+   autoconf
+   export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE `pkg-config --cflags cairo gdk-pixbuf glib  gtk+ pango`" 
+   export LABLGTKDIR=${lablgtk}/lib/ocaml/${ocaml_version}/site-lib/lablgtk2
+   cp ${lablgtk}/lib/ocaml/${ocaml_version}/site-lib/lablgtk2/pango.ml ./src
+   cp ${lablgtk}/lib/ocaml/${ocaml_version}/site-lib/lablgtk2/gaux.ml ./src
+  '';
+
+  postInstall = ''
+    cp META $out/lib/ocaml/${ocaml_version}/site-lib/cairo/
+  '';
+
+  makeFlags = "INSTALLDIR=$(out)/lib/ocaml/${ocaml_version}/site-lib/cairo";
+
+  meta = {
+    homepage = http://cairographics.org/cairo-ocaml;
+    description = "ocaml bindings for cairo library";
+    license = "GnuGPLV2";
+#    maintainers = [ stdenv.lib.maintainers.roconnor ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/ocamlnet/configure.patch b/pkgs/development/ocaml-modules/ocamlnet/configure.patch
new file mode 100644
index 000000000000..38b240f3c2c4
--- /dev/null
+++ b/pkgs/development/ocaml-modules/ocamlnet/configure.patch
@@ -0,0 +1,63 @@
+diff -Naur ocamlnet-3.6.3.ori/configure ocamlnet-3.6.3/configure
+--- ocamlnet-3.6.3.ori/configure	2013-01-14 00:04:59.000000000 +0000
++++ ocamlnet-3.6.3/configure	2013-06-02 21:33:08.000000000 +0000
+@@ -642,59 +642,6 @@
+ 	exit 1
+     fi
+ 
+-    printf "%s" "Checking whether lablgtk2 has GMain.Io.remove... "
+-    mkdir -p tmp
+-    cat <<EOF >tmp/gtk.ml
+-let _ = GMain.Io.remove;;
+-EOF
+-
+-    if ocamlfind ocamlc -package lablgtk2 -c tmp/gtk.ml >/dev/null 2>/dev/null;
+-    then
+-        echo "yes"
+-    else
+-        echo "no"
+-        echo "Your version of lablgtk2 is too old!"
+-	exit 1
+-    fi
+-    
+-    printf "%s" "Checking whether lablgtk2 has GMain.Io.add_watch with list support... "
+-    mkdir -p tmp
+-    cat <<'EOF' >tmp/gtk.ml
+-open GMain.Io
+-let _ = (add_watch : cond:condition list -> callback:(condition list -> bool) -> ?prio:int -> channel -> id);;
+-exit 0
+-EOF
+-    # Note: this newer API is never broken in the sense checked below, i.e.
+-    # such lablgtk2 versions do not exist.
+-    if ocamlfind ocamlc -package unix,lablgtk2 -linkpkg -o tmp/gtk tmp/gtk.ml >/dev/null 2>/dev/null && tmp/gtk; then
+-        echo "yes"
+-        gtk2_io_add_watch_supports_lists="-ppopt -DGTK2_IO_ADD_WATCH_SUPPORTS_LISTS"
+-    else
+-        echo "no"
+-        printf "%s" "Checking whether lablgtk2's GMain.Io.add_watch is broken... "
+-        mkdir -p tmp
+-        cat <<'EOF' >tmp/gtk.ml
+-GMain.Main.init();;
+-let ch = GMain.Io.channel_of_descr (Unix.stdout) in
+-let w = GMain.Io.add_watch
+-          ~cond:`OUT ~callback:(fun () -> true) ch in
+-(* add_watch is broken when it just returns Val_unit, and ok when it
+- * returns a positive int
+- *)
+-if (Obj.magic w : int) > 0 then
+-  exit 0
+-else
+-  exit 1
+-EOF
+-	if ocamlfind ocamlc -package unix,lablgtk2 -linkpkg -o tmp/gtk tmp/gtk.ml >/dev/null 2>/dev/null && tmp/gtk; then
+-            echo "no"
+-        else
+-            echo "yes"
+-            echo "You should apply the patch-ab-ml_glib.c to lablgtk2 to fix this!"
+-	    exit 1
+-        fi
+-    fi
+-
+     for f in Makefile uq_gtk.ml uq_gtk.mli uq_gtk_helper.ml; do
+ 	rm -f src/equeue-gtk2/$f
+ 	ln -s ../equeue-gtk1/$f src/equeue-gtk2
diff --git a/pkgs/development/ocaml-modules/ocamlnet/default.nix b/pkgs/development/ocaml-modules/ocamlnet/default.nix
index 4d9e934b6283..c1960d4706e4 100644
--- a/pkgs/development/ocaml-modules/ocamlnet/default.nix
+++ b/pkgs/development/ocaml-modules/ocamlnet/default.nix
@@ -1,18 +1,22 @@
-{stdenv, fetchurl, ncurses, ocaml, findlib, ocaml_pcre, camlzip, openssl, ocaml_ssl}:
+{stdenv, fetchurl, ncurses, ocaml, findlib, ocaml_pcre, camlzip, openssl, ocaml_ssl, lablgtk, cryptokit }:
 
 let
   ocaml_version = (builtins.parseDrvName ocaml.name).version;
 in
 
 stdenv.mkDerivation {
-  name = "ocamlnet-3.6";
+  name = "ocamlnet-3.6.3";
 
   src = fetchurl {
-    url = http://download.camlcity.org/download/ocamlnet-3.6.tar.gz;
-    sha256 = "306c20aee6512be3564c0f39872b70f929c06e1e893cfcf528ac47ae35cf7a69";
+    url = http://download.camlcity.org/download/ocamlnet-3.6.3.tar.gz;
+    sha256 = "c62fe0a4db6c63c04e24c8d76bcb504054f0b59a7a41c1abcbb8dd504afc9f29";
   };
 
-  buildInputs = [ncurses ocaml findlib ocaml_pcre camlzip openssl ocaml_ssl];
+  buildInputs = [ncurses ocaml findlib ocaml_pcre camlzip openssl ocaml_ssl lablgtk cryptokit];
+
+  propagatedbuildInputs = [ncurses ocaml_pcre camlzip openssl ocaml_ssl lablgtk cryptokit];
+
+  patches = [ ./configure.patch ];
 
   createFindlibDestdir = true;
 
@@ -23,6 +27,10 @@ stdenv.mkDerivation {
       -bindir $out/bin
       -enable-ssl
       -enable-zip
+      -enable-pcre
+      -enable-crypto
+      -disable-gtk2
+      -with-nethttpd
       -datadir $out/lib/ocaml/${ocaml_version}/ocamlnet
     )
   '';
diff --git a/pkgs/development/ocaml-modules/sqlite3/default.nix b/pkgs/development/ocaml-modules/sqlite3/default.nix
index a01660216bb0..63dc06634d71 100644
--- a/pkgs/development/ocaml-modules/sqlite3/default.nix
+++ b/pkgs/development/ocaml-modules/sqlite3/default.nix
@@ -1,18 +1,19 @@
-{stdenv, fetchurl, sqlite, ocaml, findlib}:
+{stdenv, fetchurl, sqlite, ocaml, findlib, pkgconfig}:
 
 stdenv.mkDerivation {
-  name = "ocaml-sqlite3-1.6.3";
+  name = "ocaml-sqlite3-2.0.4";
 
   src = fetchurl {
-    url = https://bitbucket.org/mmottl/sqlite3-ocaml/downloads/sqlite3-ocaml-1.6.3.tar.gz;
-    sha256 = "004wysf80bmb8r4yaa648v0bqrh2ry3kzy763gdksw4n15blghv5";
+    url = https://bitbucket.org/mmottl/sqlite3-ocaml/downloads/sqlite3-ocaml-2.0.4.tar.gz;
+    sha256 = "51ccb4c7a240eb40652c59e1770cfe1827dfa1eb926c969d19ff414aef4e80a1";
   };
 
-  buildInputs = [ocaml findlib];
+  buildInputs = [ocaml findlib pkgconfig ];
 
-  configureFlags = "--with-sqlite3=${sqlite}";
+  #configureFlags = "--with-sqlite3=${sqlite}";
 
   preConfigure = ''
+    export PKG_CONFIG_PATH=${sqlite}/lib/pkgconfig/
     export OCAMLPATH=$OCAMLPATH:$OCAMLFIND_DESTDIR
     mkdir -p $out/bin
   '';
diff --git a/pkgs/development/tools/documentation/haddock/2.13.2.1.nix b/pkgs/development/tools/documentation/haddock/2.13.2.1.nix
new file mode 100644
index 000000000000..3cac6e133236
--- /dev/null
+++ b/pkgs/development/tools/documentation/haddock/2.13.2.1.nix
@@ -0,0 +1,20 @@
+{ cabal, alex, Cabal, deepseq, filepath, ghcPaths, happy, xhtml }:
+
+cabal.mkDerivation (self: {
+  pname = "haddock";
+  version = "2.13.2.1";
+  sha256 = "0kpk3bmlyd7cb6s39ix8s0ak65xhrln9mg481y3h24lf5syy5ky9";
+  isLibrary = true;
+  isExecutable = true;
+  buildDepends = [ Cabal deepseq filepath ghcPaths xhtml ];
+  testDepends = [ Cabal deepseq filepath ];
+  buildTools = [ alex happy ];
+  doCheck = false;
+  meta = {
+    homepage = "http://www.haskell.org/haddock/";
+    description = "A documentation-generation tool for Haskell libraries";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+    maintainers = [ self.stdenv.lib.maintainers.andres ];
+  };
+})
diff --git a/pkgs/development/tools/ocaml/omake/0.9.8.6-rc1.nix b/pkgs/development/tools/ocaml/omake/0.9.8.6-rc1.nix
new file mode 100644
index 000000000000..48a6b3c1f64d
--- /dev/null
+++ b/pkgs/development/tools/ocaml/omake/0.9.8.6-rc1.nix
@@ -0,0 +1,37 @@
+{stdenv, fetchurl, makeWrapper, ocaml, ncurses}:
+let
+  pname = "omake";
+  version = "0.9.8.6-0.rc1";
+  webpage = "http://omake.metaprl.org";
+in
+stdenv.mkDerivation {
+
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "${webpage}/downloads/${pname}-${version}.tar.gz";
+    sha256 = "1sas02pbj56m7wi5vf3vqrrpr4ynxymw2a8ybvfj2dkjf7q9ii13";
+  };
+  patchFlags = "-p0";
+  patches = [ ./warn.patch ];
+
+  buildInputs = [ ocaml makeWrapper ncurses ];
+
+  phases = "unpackPhase patchPhase buildPhase";
+  buildPhase = ''
+    make bootstrap
+    make PREFIX=$out all
+    make PREFIX=$out install
+  '';
+#  prefixKey = "-prefix ";
+#
+#  configureFlags = if transitional then "--transitional" else "--strict";
+#
+#  buildFlags = "world.opt";		
+
+  meta = {
+    description = "Omake build system";
+    homepage = "${webpage}";
+    license = "GPL";
+  };
+}
diff --git a/pkgs/development/tools/ocaml/omake/warn.patch b/pkgs/development/tools/ocaml/omake/warn.patch
new file mode 100644
index 000000000000..4459e89d7f9c
--- /dev/null
+++ b/pkgs/development/tools/ocaml/omake/warn.patch
@@ -0,0 +1,10 @@
+diff -p1 -aur ../omake-0.9.8.6.ori/lib/build/OCaml.om ./lib/build/OCaml.om
+--- ../omake-0.9.8.6.ori/lib/build/OCaml.om	2008-03-05 01:07:25.000000000 +0000
++++ ./lib/build/OCaml.om	2013-06-01 15:52:37.000000000 +0000
+@@ -178,3 +178,3 @@ declare OCAMLDEPFLAGS
+ public.OCAMLPPFLAGS  =
+-public.OCAMLFLAGS    = -warn-error A
++public.OCAMLFLAGS    =
+ public.OCAMLCFLAGS   = -g
+Seulement dans ./lib/build: OCaml.om~
+Seulement dans .: warn.patch