Merge pull request #8586 from vbgl/ocaml-updates

Ocaml package updates
This commit is contained in:
Arseniy Seroka 2015-07-02 12:06:29 +03:00
commit afa1f5ba22
7 changed files with 79 additions and 27 deletions

View file

@ -1,29 +1,30 @@
{stdenv, fetchurl, ocaml, findlib}:
assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.11";
{ stdenv, fetchzip, ocaml, findlib }:
stdenv.mkDerivation {
name = "ocaml-csv-1.3.3";
name = "ocaml-csv-1.4";
src = fetchurl {
url = "https://forge.ocamlcore.org/frs/download.php/1376/csv-1.3.3.tar.gz";
sha256 = "19qsvw3n7k4xpy0sw7n5s29kzj91myihjljhr5js6xcxwj4cydh2";
src = fetchzip {
url = https://github.com/Chris00/ocaml-csv/releases/download/1.4/csv-1.4.tar.gz;
sha256 = "0si0v79rxzyzmgyhd6lidpzxdlcpprlhg0pgrsf688g83xsclkwa";
};
buildInputs = [ ocaml findlib ];
createFindlibDestdir = true;
configurePhase = "ocaml setup.ml -configure --prefix $out";
configurePhase = "ocaml setup.ml -configure --prefix $out --enable-tests";
buildPhase = "ocaml setup.ml -build";
doCheck = true;
checkPhase = "ocaml setup.ml -test";
installPhase = "ocaml setup.ml -install";
meta = with stdenv.lib; {
description = "A pure OCaml library to read and write CSV files";
homepage = "https://forge.ocamlcore.org/projects/csv/";
homepage = https://github.com/Chris00/ocaml-csv;
license = licenses.lgpl21;
maintainers = [ maintainers.vbgl ];
platforms = ocaml.meta.platforms;

View file

@ -0,0 +1,29 @@
{ stdenv, fetchzip, ocaml, findlib, oasis, ounit }:
assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4";
stdenv.mkDerivation {
name = "ocaml-qcheck-0.4.0.1";
src = fetchzip {
url = https://github.com/c-cube/qcheck/archive/0.4.0.1.tar.gz;
sha256 = "0j2jdrfz8rrslgjihnfgg8yy12860z2vvf7hqzjbmfmf03hz4pgv";
};
buildInputs = [ ocaml findlib oasis ounit ];
configureFlags = "--enable-tests --enable-ounit";
doCheck = true;
checkPhase = "ocaml setup.ml -test";
createFindlibDestdir = true;
meta = {
description = "QuickCheck inspired property-based testing for OCaml";
homepage = https://github.com/c-cube/qcheck/;
license = stdenv.lib.licenses.bsd2;
maintainers = with stdenv.lib.maintainers; [ vbgl ];
platforms = ocaml.meta.platforms;
};
}

View file

@ -1,17 +1,19 @@
{ stdenv, fetchzip, ocaml, findlib }:
{ stdenv, fetchzip, ocaml, findlib, ounit }:
stdenv.mkDerivation rec {
name = "ocaml-re-1.4.0";
name = "ocaml-re-1.4.1";
src = fetchzip {
url = "https://github.com/ocaml/ocaml-re/archive/${name}.tar.gz";
sha256 = "1xcfmhjgd7prqx2g1addlrk84xpfafmqnpjkqrvg7mw0hn1p7v2m";
sha256 = "1wmfgazydd20hc796zisqpmsw0sb5lv9g3x77ckmf50v3z8hyhvk";
};
buildInputs = [ ocaml findlib ];
buildInputs = [ ocaml findlib ounit ];
configurePhase = "ocaml setup.ml -configure --prefix $out";
configurePhase = "ocaml setup.ml -configure --prefix $out --enable-tests";
buildPhase = "ocaml setup.ml -build";
doCheck = true;
checkPhase = "ocaml setup.ml -test";
installPhase = "ocaml setup.ml -install";
createFindlibDestdir = true;

View file

@ -1,19 +1,25 @@
{ stdenv, fetchzip, ocaml, findlib }:
{ stdenv, fetchzip, ocaml, findlib, ounit, qcheck
# Optionally enable tests; test script use OCaml-4.01+ features
, doCheck ? stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.01"
}:
let version = "1.3.0"; in
let version = "1.4.0"; in
stdenv.mkDerivation {
name = "ocaml-stringext-${version}";
src = fetchzip {
url = "https://github.com/rgrinberg/stringext/archive/v${version}.tar.gz";
sha256 = "0sd1chyxclmip0nxqhasp1ri91bwxr8nszkkr5kpja45f6bav6k9";
sha256 = "1jp0x9rkss8a48z9wbnc4v5zvmnysin30345psl3xnxb2aqzwlii";
};
buildInputs = [ ocaml findlib ];
buildInputs = [ ocaml findlib ounit qcheck ];
configurePhase = "ocaml setup.ml -configure --prefix $out";
configurePhase = "ocaml setup.ml -configure --prefix $out"
+ stdenv.lib.optionalString doCheck " --enable-tests";
buildPhase = "ocaml setup.ml -build";
inherit doCheck;
checkPhase = "ocaml setup.ml -test";
installPhase = "ocaml setup.ml -install";
createFindlibDestdir = true;

View file

@ -1,25 +1,27 @@
{ stdenv, fetchzip, ocaml, findlib, re, sexplib, stringext }:
{ stdenv, fetchzip, ocaml, findlib, re, sexplib, stringext, ounit }:
assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4";
let version = "1.9.0"; in
let version = "1.9.1"; in
stdenv.mkDerivation {
name = "ocaml-uri-${version}";
src = fetchzip {
url = "https://github.com/mirage/ocaml-uri/archive/v${version}.tar.gz";
sha256 = "13vbv6q7npl2bvvqfw03mav90jcrrvjbdpdp4y8mcjz0iax5ww9b";
sha256 = "0v3jxqgyi4kj92r3x83rszfpnvvzy9lyb913basch4q64yka3w85";
};
buildInputs = [ ocaml findlib ];
buildInputs = [ ocaml findlib ounit ];
propagatedBuildInputs = [ re sexplib stringext ];
configurePhase = "ocaml setup.ml -configure --prefix $out";
configurePhase = "ocaml setup.ml -configure --prefix $out --enable-tests";
buildPhase = ''
ocaml setup.ml -build
ocaml setup.ml -doc
'';
doCheck = true;
checkPhase = "ocaml setup.ml -test";
installPhase = "ocaml setup.ml -install";
createFindlibDestdir = true;

View file

@ -1,4 +1,4 @@
{ stdenv, fetchzip, ocaml, findlib, ocpBuild, ocpIndent, opam, cmdliner, ncurses, re, lambdaTerm, libev }:
{ stdenv, fetchurl, fetchzip, ocaml, findlib, ocpBuild, ocpIndent, opam, cmdliner, ncurses, re, lambdaTerm, libev }:
let inherit (stdenv.lib) getVersion versionAtLeast optional; in
@ -6,7 +6,13 @@ assert versionAtLeast (getVersion ocaml) "3.12.1";
assert versionAtLeast (getVersion ocpBuild) "1.99.6-beta";
assert versionAtLeast (getVersion ocpIndent) "1.4.2";
let version = "1.1.1"; in
let
version = "1.1.2";
patch402 = fetchurl {
url = https://raw.githubusercontent.com/ocaml/opam-repository/master/packages/ocp-index/ocp-index.1.1.2/files/ocaml.4.02.patch;
sha256 = "1wcpn2pv7h8ia3ybmzdlm8v5hfvq1rgmlj02wwj0yh3vqjvxqvsm";
};
in
stdenv.mkDerivation {
@ -14,9 +20,11 @@ stdenv.mkDerivation {
src = fetchzip {
url = "http://github.com/OCamlPro/ocp-index/archive/${version}.tar.gz";
sha256 = "173lqbyivwv1zf9ifpxa9f8m2y3kybzs3idrwyzy824ixdqv2fww";
sha256 = "0cz0bz5nisc5r23b1w07q2bl489gd09mg8rp9kyq9m6rj669b18l";
};
patches = optional (versionAtLeast (getVersion ocaml) "4.02") patch402;
buildInputs = [ ocaml findlib ocpBuild opam cmdliner ncurses re libev ]
++ optional (versionAtLeast (getVersion lambdaTerm) "1.7") lambdaTerm;
propagatedBuildInputs = [ ocpIndent ];

View file

@ -4545,6 +4545,10 @@ let
pycaml = callPackage ../development/ocaml-modules/pycaml { };
qcheck = callPackage ../development/ocaml-modules/qcheck {
oasis = ocaml_oasis;
};
qtest = callPackage ../development/ocaml-modules/qtest {
oasis = ocaml_oasis;
};