2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, cmdliner , topkg, uchar }:
|
2020-04-24 23:36:52 +00:00
|
|
|
let
|
|
|
|
pname = "uutf";
|
|
|
|
in
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
lib.throwIfNot (lib.versionAtLeast ocaml.version "4.03")
|
|
|
|
"${pname} is not available with OCaml ${ocaml.version}"
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "ocaml${ocaml.version}-${pname}-${version}";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "1.0.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-03-30 09:31:56 +00:00
|
|
|
url = "https://erratique.ch/software/${pname}/releases/${pname}-${version}.tbz";
|
|
|
|
sha256 = "sha256-h3KlYT0ecCmM4U3zMkGjaF8h5O9r20zwP+mF+x7KBWg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
nativeBuildInputs = [ ocaml ocamlbuild findlib topkg ];
|
|
|
|
buildInputs = [ topkg cmdliner ];
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [ uchar ];
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit (topkg) buildPhase installPhase;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Non-blocking streaming Unicode codec for OCaml";
|
2022-03-30 09:31:56 +00:00
|
|
|
homepage = "https://erratique.ch/software/uutf";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.vbgl ];
|
2022-05-18 14:49:53 +00:00
|
|
|
mainProgram = "utftrip";
|
|
|
|
inherit (ocaml.meta) platforms;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|