1 { lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uchar, uutf, cmdliner
2 , cmdlinerSupport ? lib.versionAtLeast cmdliner.version "1.1"
7 webpage = "https://erratique.ch/software/${pname}";
11 if lib.versionOlder ocaml.version "4.03"
12 then throw "${pname} is not available for OCaml ${ocaml.version}"
16 name = "ocaml${ocaml.version}-${pname}-${version}";
20 url = "${webpage}/releases/${pname}-${version}.tbz";
21 sha256 = "sha256-B/prPAwfqS8ZPS3fyDDIzXWRbKofwOCyCfwvh9veuug=";
24 nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ];
25 buildInputs = [ topkg uutf ]
26 ++ lib.optional cmdlinerSupport cmdliner;
28 propagatedBuildInputs = [ uchar ];
32 prePatch = lib.optionalString stdenv.isAarch64 "ulimit -s 16384";
38 --with-cmdliner ${lib.boolToString cmdlinerSupport}
42 inherit (topkg) installPhase;
45 description = "An OCaml module for normalizing Unicode text";
47 license = licenses.bsd3;
48 maintainers = [ maintainers.vbgl ];
49 mainProgram = "unftrip";
50 inherit (ocaml.meta) platforms;