2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, cmdliner , topkg, uchar }:
|
2014-07-09 09:42:26 +02:00
|
|
|
let
|
|
|
|
pname = "uutf";
|
|
|
|
in
|
2014-09-21 12:02:55 +02:00
|
|
|
|
2022-03-28 18:25:07 +02:00
|
|
|
lib.throwIfNot (lib.versionAtLeast ocaml.version "4.03")
|
|
|
|
"${pname} is not available with OCaml ${ocaml.version}"
|
|
|
|
|
2016-12-04 11:13:37 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "ocaml${ocaml.version}-${pname}-${version}";
|
2022-03-21 15:58:22 +01:00
|
|
|
version = "1.0.3";
|
2014-07-09 09:42:26 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-03-27 17:52:41 +02:00
|
|
|
url = "https://erratique.ch/software/${pname}/releases/${pname}-${version}.tbz";
|
2022-03-21 15:58:22 +01:00
|
|
|
sha256 = "sha256-h3KlYT0ecCmM4U3zMkGjaF8h5O9r20zwP+mF+x7KBWg=";
|
2014-07-09 09:42:26 +02:00
|
|
|
};
|
|
|
|
|
2022-02-22 10:59:04 +01:00
|
|
|
nativeBuildInputs = [ ocaml ocamlbuild findlib topkg ];
|
|
|
|
buildInputs = [ topkg cmdliner ];
|
2016-12-04 11:13:37 +01:00
|
|
|
propagatedBuildInputs = [ uchar ];
|
2014-07-09 09:42:26 +02:00
|
|
|
|
2022-02-22 10:59:04 +01:00
|
|
|
strictDeps = true;
|
|
|
|
|
2016-12-04 11:13:37 +01:00
|
|
|
inherit (topkg) buildPhase installPhase;
|
2014-07-09 09:42:26 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2014-07-09 09:42:26 +02:00
|
|
|
description = "Non-blocking streaming Unicode codec for OCaml";
|
2022-03-21 15:58:22 +01:00
|
|
|
homepage = "https://erratique.ch/software/uutf";
|
2022-03-28 18:25:07 +02:00
|
|
|
inherit (ocaml.meta) platforms;
|
2014-09-21 12:02:55 +02:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.vbgl ];
|
2014-07-09 09:42:26 +02:00
|
|
|
};
|
|
|
|
}
|