1{ stdenv, fetchzip, ocaml, findlib, ounit }:
2
3stdenv.mkDerivation rec {
4 name = "ocaml-re-1.4.1";
5
6 src = fetchzip {
7 url = "https://github.com/ocaml/ocaml-re/archive/${name}.tar.gz";
8 sha256 = "1wmfgazydd20hc796zisqpmsw0sb5lv9g3x77ckmf50v3z8hyhvk";
9 };
10
11 buildInputs = [ ocaml findlib ounit ];
12
13 configurePhase = "ocaml setup.ml -configure --prefix $out --enable-tests";
14 buildPhase = "ocaml setup.ml -build";
15 doCheck = true;
16 checkPhase = "ocaml setup.ml -test";
17 installPhase = "ocaml setup.ml -install";
18
19 createFindlibDestdir = true;
20
21 meta = {
22 homepage = https://github.com/ocaml/ocaml-re;
23 platforms = ocaml.meta.platforms;
24 description = "Pure OCaml regular expressions, with support for Perl and POSIX-style strings";
25 license = stdenv.lib.licenses.lgpl2;
26 maintainers = with stdenv.lib.maintainers; [ vbgl ];
27 };
28}