summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/re/default.nix
blob: 1ea2310bf9fa867c8df059644f97d66f83325468 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, ounit }:

stdenv.mkDerivation rec {
  name = "ocaml-re-1.5.0";

  src = fetchzip {
    url = "https://github.com/ocaml/ocaml-re/archive/${name}.tar.gz";
    sha256 = "17avk7kwmgdjkri1sj5q4a59ykc9rj0bxj6ixxpl6i0n49br3f92";
  };

  buildInputs = [ ocaml findlib ocamlbuild ounit ];

  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;

  meta = {
    homepage = https://github.com/ocaml/ocaml-re;
    platforms = ocaml.meta.platforms or [];
    description = "Pure OCaml regular expressions, with support for Perl and POSIX-style strings";
    license = stdenv.lib.licenses.lgpl2;
    maintainers = with stdenv.lib.maintainers; [ vbgl ];
  };
}