summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules
diff options
context:
space:
mode:
authorMarco Maggesi <maggesi@math.unifi.it>2010-12-09 15:40:04 +0000
committerMarco Maggesi <maggesi@math.unifi.it>2010-12-09 15:40:04 +0000
commitac457478e35e56e7370e3e40167e5df75de98363 (patch)
treefcbfe2bb58b8e32bbb60c0c4e25e069139e73ceb /pkgs/development/ocaml-modules
parent114fa21c481f0c9b52f4e7a2915bffbdfb61467e (diff)
* Add ocaml packages findlib, camlzip, ocaml-ssl, ocaml-batteries, menhir, camomile, ocaml-lwt, cryptokit, ocaml-cryptgps, ounit, ocaml-react
svn path=/nixpkgs/trunk/; revision=25041
Diffstat (limited to 'pkgs/development/ocaml-modules')
-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
16 files changed, 478 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/batteries/default.nix b/pkgs/development/ocaml-modules/batteries/default.nix
new file mode 100644
index 0000000000000..9aef1f446fe95
--- /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 0000000000000..85456166101e6
--- /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 0000000000000..4e5df2cd75d96
--- /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 0000000000000..10adcd6687b02
--- /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 0000000000000..4cc2140425873
--- /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 0000000000000..1c32bca58b136
--- /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 0000000000000..a9116c09ee76c
--- /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 0000000000000..661170835fdf0
--- /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 0000000000000..1c7e361f3fc30
--- /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 0000000000000..b4a82c7d677f1
--- /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 0000000000000..766419aada7c3
--- /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 0000000000000..7c1a2bfe829ae
--- /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 0000000000000..af208dc5651ca
--- /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 0000000000000..d1287425625c5
--- /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 0000000000000..b1757d84b7b6a
--- /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 0000000000000..6d57bd3bbf51a
--- /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";
+  };
+}