1 { lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uucp, uutf, cmdliner
2 , cmdlinerSupport ? lib.versionAtLeast cmdliner.version "1.1"
7 webpage = "https://erratique.ch/software/${pname}";
10 stdenv.mkDerivation rec {
12 name = "ocaml${ocaml.version}-${pname}-${version}";
16 url = "${webpage}/releases/${pname}-${version}.tbz";
17 sha256 = "sha256-q8x3bia1QaKpzrWFxUmLWIraKqby7TuPNGvbSjkY4eM=";
20 nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ];
21 buildInputs = [ topkg uutf ]
22 ++ lib.optional cmdlinerSupport cmdliner;
23 propagatedBuildInputs = [ uucp ];
31 --with-cmdliner ${lib.boolToString cmdlinerSupport}
35 inherit (topkg) installPhase;
38 description = "An OCaml library for segmenting Unicode text";
40 license = licenses.bsd3;
41 maintainers = [ maintainers.vbgl ];
42 mainProgram = "usegtrip";
43 inherit (ocaml.meta) platforms;