1 { lib, fetchurl, buildDunePackage, ocaml, ounit, seq }:
3 let version_sha = if lib.versionAtLeast ocaml.version "4.08"
7 sha256 = "sha256-g+s+QwCqmx3HggdJAQ9DYuqDUkdCEwUk14wgzpnKdHw=";
12 sha256 = "1gas4ky49zgxph3870nffzkr6y41kkpqp4nj38pz1gh49zcf12aj";
16 buildDunePackage rec {
18 version = version_sha.version;
20 minimalOCamlVersion = "4.02";
22 useDune2 = lib.versionAtLeast ocaml.version "4.08";
25 url = "https://github.com/ocaml/ocaml-re/releases/download/${version}/re-${version}.tbz";
26 sha256 = version_sha.sha256;
29 buildInputs = lib.optional doCheck ounit;
30 propagatedBuildInputs = [ seq ];
31 doCheck = lib.versionAtLeast ocaml.version "4.04";
34 homepage = "https://github.com/ocaml/ocaml-re";
35 description = "Pure OCaml regular expressions, with support for Perl and POSIX-style strings";
36 license = lib.licenses.lgpl2;
37 maintainers = with lib.maintainers; [ vbgl ];