2016-10-08 08:44:25 +02:00
|
|
|
{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, ounit }:
|
2015-01-07 13:56:38 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-10-17 14:52:22 +02:00
|
|
|
name = "ocaml-re-${version}";
|
|
|
|
version = "1.7.1";
|
2015-01-07 13:56:38 +01:00
|
|
|
|
2015-03-19 19:13:39 +01:00
|
|
|
src = fetchzip {
|
2017-10-17 14:52:22 +02:00
|
|
|
url = "https://github.com/ocaml/ocaml-re/archive/${version}.tar.gz";
|
|
|
|
sha256 = "1z2z4fjrpdbl0q50fdxvy3746w1vx6ybxcb0k81hqm1342nylbmw";
|
2015-01-07 13:56:38 +01:00
|
|
|
};
|
|
|
|
|
2016-10-08 08:44:25 +02:00
|
|
|
buildInputs = [ ocaml findlib ocamlbuild ounit ];
|
2015-01-07 13:56:38 +01:00
|
|
|
|
2017-11-29 20:03:09 +01:00
|
|
|
configurePhase = "ocaml setup.ml -configure --prefix $out"
|
|
|
|
+ stdenv.lib.optionalString doCheck " --enable-tests";
|
2015-01-07 13:56:38 +01:00
|
|
|
buildPhase = "ocaml setup.ml -build";
|
2017-11-29 20:03:09 +01:00
|
|
|
doCheck = !stdenv.lib.versionAtLeast ocaml.version "4.06";
|
2015-07-01 20:16:50 +02:00
|
|
|
checkPhase = "ocaml setup.ml -test";
|
2015-01-07 13:56:38 +01:00
|
|
|
installPhase = "ocaml setup.ml -install";
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = https://github.com/ocaml/ocaml-re;
|
2015-12-24 18:49:07 +01:00
|
|
|
platforms = ocaml.meta.platforms or [];
|
2015-01-07 13:56:38 +01:00
|
|
|
description = "Pure OCaml regular expressions, with support for Perl and POSIX-style strings";
|
|
|
|
license = stdenv.lib.licenses.lgpl2;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ vbgl ];
|
|
|
|
};
|
|
|
|
}
|