git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #8586 from vbgl/ocaml-updates

Ocaml package updates

commitafa1f5ba2220203166a1f67113370327d285b63d authorArseniy Seroka <jagajaga@users.noreply.github.com> dateThu 2 Jul 2015, 12:06 (11 years ago) parentb21fd5d2663f24
7 files changed+79−27
pkgs/development/ocaml-modules/csv/default.nix+10−9 pkgs/development/ocaml-modules/qcheck/default.nix+29 pkgs/development/ocaml-modules/re/default.nix+7−5 pkgs/development/ocaml-modules/stringext/default.nix+11−5 pkgs/development/ocaml-modules/uri/default.nix+7−5 pkgs/development/tools/ocaml/ocp-index/default.nix+11−3 pkgs/top-level/all-packages.nix+4
pkgs/development/ocaml-modules/csv/default.nix+10−9
@@ -1,29 +1,30 @@
1−{stdenv, fetchurl, ocaml, findlib}:
2−
3−assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.11";
1+{ stdenv, fetchzip, ocaml, findlib }:
42
53stdenv.mkDerivation {
64
7− name = "ocaml-csv-1.3.3";
5+ name = "ocaml-csv-1.4";
86
9− src = fetchurl {
10− url = "https://forge.ocamlcore.org/frs/download.php/1376/csv-1.3.3.tar.gz";
11− sha256 = "19qsvw3n7k4xpy0sw7n5s29kzj91myihjljhr5js6xcxwj4cydh2";
7+ src = fetchzip {
8+ url = https://github.com/Chris00/ocaml-csv/releases/download/1.4/csv-1.4.tar.gz;
9+ sha256 = "0si0v79rxzyzmgyhd6lidpzxdlcpprlhg0pgrsf688g83xsclkwa";
1210 };
1311
1412 buildInputs = [ ocaml findlib ];
1513
1614 createFindlibDestdir = true;
1715
18− configurePhase = "ocaml setup.ml -configure --prefix $out";
16+ configurePhase = "ocaml setup.ml -configure --prefix $out --enable-tests";
1917
2018 buildPhase = "ocaml setup.ml -build";
2119
20+ doCheck = true;
21+ checkPhase = "ocaml setup.ml -test";
22+
2223 installPhase = "ocaml setup.ml -install";
2324
2425 meta = with stdenv.lib; {
2526 description = "A pure OCaml library to read and write CSV files";
26− homepage = "https://forge.ocamlcore.org/projects/csv/";
27+ homepage = https://github.com/Chris00/ocaml-csv;
2728 license = licenses.lgpl21;
2829 maintainers = [ maintainers.vbgl ];
2930 platforms = ocaml.meta.platforms;
pkgs/development/ocaml-modules/qcheck/default.nixnew file+29
@@ -0,0 +1,29 @@
1+{ stdenv, fetchzip, ocaml, findlib, oasis, ounit }:
2+
3+assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4";
4+
5+stdenv.mkDerivation {
6+
7+ name = "ocaml-qcheck-0.4.0.1";
8+ src = fetchzip {
9+ url = https://github.com/c-cube/qcheck/archive/0.4.0.1.tar.gz;
10+ sha256 = "0j2jdrfz8rrslgjihnfgg8yy12860z2vvf7hqzjbmfmf03hz4pgv";
11+ };
12+
13+ buildInputs = [ ocaml findlib oasis ounit ];
14+
15+ configureFlags = "--enable-tests --enable-ounit";
16+
17+ doCheck = true;
18+ checkPhase = "ocaml setup.ml -test";
19+
20+ createFindlibDestdir = true;
21+
22+ meta = {
23+ description = "QuickCheck inspired property-based testing for OCaml";
24+ homepage = https://github.com/c-cube/qcheck/;
25+ license = stdenv.lib.licenses.bsd2;
26+ maintainers = with stdenv.lib.maintainers; [ vbgl ];
27+ platforms = ocaml.meta.platforms;
28+ };
29+}
pkgs/development/ocaml-modules/re/default.nix+7−5
@@ -1,17 +1,19 @@
1−{ stdenv, fetchzip, ocaml, findlib }:
1+{ stdenv, fetchzip, ocaml, findlib, ounit }:
22
33stdenv.mkDerivation rec {
4− name = "ocaml-re-1.4.0";
4+ name = "ocaml-re-1.4.1";
55
66 src = fetchzip {
77 url = "https://github.com/ocaml/ocaml-re/archive/${name}.tar.gz";
8− sha256 = "1xcfmhjgd7prqx2g1addlrk84xpfafmqnpjkqrvg7mw0hn1p7v2m";
8+ sha256 = "1wmfgazydd20hc796zisqpmsw0sb5lv9g3x77ckmf50v3z8hyhvk";
99 };
1010
11− buildInputs = [ ocaml findlib ];
11+ buildInputs = [ ocaml findlib ounit ];
1212
13− configurePhase = "ocaml setup.ml -configure --prefix $out";
13+ configurePhase = "ocaml setup.ml -configure --prefix $out --enable-tests";
1414 buildPhase = "ocaml setup.ml -build";
15+ doCheck = true;
16+ checkPhase = "ocaml setup.ml -test";
1517 installPhase = "ocaml setup.ml -install";
1618
1719 createFindlibDestdir = true;
pkgs/development/ocaml-modules/stringext/default.nix+11−5
@@ -1,19 +1,25 @@
1−{ stdenv, fetchzip, ocaml, findlib }:
1+{ stdenv, fetchzip, ocaml, findlib, ounit, qcheck
2+# Optionally enable tests; test script use OCaml-4.01+ features
3+, doCheck ? stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.01"
4+}:
25
3−let version = "1.3.0"; in
6+let version = "1.4.0"; in
47
58stdenv.mkDerivation {
69 name = "ocaml-stringext-${version}";
710
811 src = fetchzip {
912 url = "https://github.com/rgrinberg/stringext/archive/v${version}.tar.gz";
10− sha256 = "0sd1chyxclmip0nxqhasp1ri91bwxr8nszkkr5kpja45f6bav6k9";
13+ sha256 = "1jp0x9rkss8a48z9wbnc4v5zvmnysin30345psl3xnxb2aqzwlii";
1114 };
1215
13− buildInputs = [ ocaml findlib ];
16+ buildInputs = [ ocaml findlib ounit qcheck ];
1417
15− configurePhase = "ocaml setup.ml -configure --prefix $out";
18+ configurePhase = "ocaml setup.ml -configure --prefix $out"
19+ + stdenv.lib.optionalString doCheck " --enable-tests";
1620 buildPhase = "ocaml setup.ml -build";
21+ inherit doCheck;
22+ checkPhase = "ocaml setup.ml -test";
1723 installPhase = "ocaml setup.ml -install";
1824
1925 createFindlibDestdir = true;
pkgs/development/ocaml-modules/uri/default.nix+7−5
@@ -1,25 +1,27 @@
1−{ stdenv, fetchzip, ocaml, findlib, re, sexplib, stringext }:
1+{ stdenv, fetchzip, ocaml, findlib, re, sexplib, stringext, ounit }:
22
33assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4";
44
5−let version = "1.9.0"; in
5+let version = "1.9.1"; in
66
77stdenv.mkDerivation {
88 name = "ocaml-uri-${version}";
99
1010 src = fetchzip {
1111 url = "https://github.com/mirage/ocaml-uri/archive/v${version}.tar.gz";
12− sha256 = "13vbv6q7npl2bvvqfw03mav90jcrrvjbdpdp4y8mcjz0iax5ww9b";
12+ sha256 = "0v3jxqgyi4kj92r3x83rszfpnvvzy9lyb913basch4q64yka3w85";
1313 };
1414
15− buildInputs = [ ocaml findlib ];
15+ buildInputs = [ ocaml findlib ounit ];
1616 propagatedBuildInputs = [ re sexplib stringext ];
1717
18− configurePhase = "ocaml setup.ml -configure --prefix $out";
18+ configurePhase = "ocaml setup.ml -configure --prefix $out --enable-tests";
1919 buildPhase = ''
2020 ocaml setup.ml -build
2121 ocaml setup.ml -doc
2222 '';
23+ doCheck = true;
24+ checkPhase = "ocaml setup.ml -test";
2325 installPhase = "ocaml setup.ml -install";
2426
2527 createFindlibDestdir = true;
pkgs/development/tools/ocaml/ocp-index/default.nix+11−3
@@ -1,4 +1,4 @@
1−{ stdenv, fetchzip, ocaml, findlib, ocpBuild, ocpIndent, opam, cmdliner, ncurses, re, lambdaTerm, libev }:
1+{ stdenv, fetchurl, fetchzip, ocaml, findlib, ocpBuild, ocpIndent, opam, cmdliner, ncurses, re, lambdaTerm, libev }:
22
33let inherit (stdenv.lib) getVersion versionAtLeast optional; in
44
@@ -6,7 +6,13 @@ assert versionAtLeast (getVersion ocaml) "3.12.1";
66assert versionAtLeast (getVersion ocpBuild) "1.99.6-beta";
77assert versionAtLeast (getVersion ocpIndent) "1.4.2";
88
9−let version = "1.1.1"; in
9+let
10+ version = "1.1.2";
11+ patch402 = fetchurl {
12+ url = https://raw.githubusercontent.com/ocaml/opam-repository/master/packages/ocp-index/ocp-index.1.1.2/files/ocaml.4.02.patch;
13+ sha256 = "1wcpn2pv7h8ia3ybmzdlm8v5hfvq1rgmlj02wwj0yh3vqjvxqvsm";
14+ };
15+in
1016
1117stdenv.mkDerivation {
1218
@@ -14,9 +20,11 @@ stdenv.mkDerivation {
1420
1521 src = fetchzip {
1622 url = "http://github.com/OCamlPro/ocp-index/archive/${version}.tar.gz";
17− sha256 = "173lqbyivwv1zf9ifpxa9f8m2y3kybzs3idrwyzy824ixdqv2fww";
23+ sha256 = "0cz0bz5nisc5r23b1w07q2bl489gd09mg8rp9kyq9m6rj669b18l";
1824 };
1925
26+ patches = optional (versionAtLeast (getVersion ocaml) "4.02") patch402;
27+
2028 buildInputs = [ ocaml findlib ocpBuild opam cmdliner ncurses re libev ]
2129 ++ optional (versionAtLeast (getVersion lambdaTerm) "1.7") lambdaTerm;
2230 propagatedBuildInputs = [ ocpIndent ];
pkgs/top-level/all-packages.nix+4
@@ -4545,6 +4545,10 @@ let
45454545
45464546 pycaml = callPackage ../development/ocaml-modules/pycaml { };
45474547
4548+ qcheck = callPackage ../development/ocaml-modules/qcheck {
4549+ oasis = ocaml_oasis;
4550+ };
4551+
45484552 qtest = callPackage ../development/ocaml-modules/qtest {
45494553 oasis = ocaml_oasis;
45504554 };