lol
at 23.05-pre 39 lines 1.1 kB view raw
1{ lib, fetchurl, buildDunePackage, ocaml, ounit, seq }: 2 3let version_sha = if lib.versionAtLeast ocaml.version "4.08" 4 then 5 { 6 version = "1.10.4"; 7 sha256 = "sha256-g+s+QwCqmx3HggdJAQ9DYuqDUkdCEwUk14wgzpnKdHw="; 8 } 9 else 10 { 11 version = "1.9.0"; 12 sha256 = "1gas4ky49zgxph3870nffzkr6y41kkpqp4nj38pz1gh49zcf12aj"; 13 }; 14in 15 16buildDunePackage rec { 17 pname = "re"; 18 version = version_sha.version; 19 20 minimalOCamlVersion = "4.02"; 21 22 useDune2 = lib.versionAtLeast ocaml.version "4.08"; 23 24 src = fetchurl { 25 url = "https://github.com/ocaml/ocaml-re/releases/download/${version}/re-${version}.tbz"; 26 sha256 = version_sha.sha256; 27 }; 28 29 buildInputs = lib.optional doCheck ounit; 30 propagatedBuildInputs = [ seq ]; 31 doCheck = lib.versionAtLeast ocaml.version "4.04"; 32 33 meta = { 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 ]; 38 }; 39}