···
12
+
if lib.versionAtLeast ocaml.version "4.08" then
14
+
else if lib.versionAtLeast ocaml.version "4.03" then
17
+
throw "uutf is not available with OCaml ${ocaml.version}",
16
-
lib.throwIfNot (lib.versionAtLeast ocaml.version "4.03")
17
-
"${pname} is not available with OCaml ${ocaml.version}"
20
+
stdenv.mkDerivation {
21
+
name = "ocaml${ocaml.version}-uutf-${version}";
21
-
name = "ocaml${ocaml.version}-${pname}-${version}";
25
+
url = "https://erratique.ch/software/uutf/releases/uutf-${version}.tbz";
28
+
"1.0.3" = "sha256-h3KlYT0ecCmM4U3zMkGjaF8h5O9r20zwP+mF+x7KBWg=";
29
+
"1.0.4" = "sha256-p6V45q+RSaiJThjjtHWchWWTemnGyaznowu/BIRhnKg=";
25
-
url = "https://erratique.ch/software/${pname}/releases/${pname}-${version}.tbz";
26
-
sha256 = "sha256-h3KlYT0ecCmM4U3zMkGjaF8h5O9r20zwP+mF+x7KBWg=";
29
-
nativeBuildInputs = [
39
-
propagatedBuildInputs = [ uchar ];
34
+
nativeBuildInputs = [
44
+
propagatedBuildInputs = [ uchar ];
43
-
inherit (topkg) buildPhase installPhase;
48
+
inherit (topkg) buildPhase installPhase;
46
-
description = "Non-blocking streaming Unicode codec for OCaml";
47
-
homepage = "https://erratique.ch/software/uutf";
48
-
license = licenses.bsd3;
49
-
maintainers = [ maintainers.vbgl ];
50
-
mainProgram = "utftrip";
51
-
inherit (ocaml.meta) platforms;
51
+
description = "Non-blocking streaming Unicode codec for OCaml";
52
+
homepage = "https://erratique.ch/software/uutf";
53
+
changelog = "https://raw.githubusercontent.com/dbuenzli/uutf/refs/tags/v${version}/CHANGES.md";
54
+
license = licenses.isc;
55
+
maintainers = [ maintainers.vbgl ];
56
+
mainProgram = "utftrip";
57
+
inherit (ocaml.meta) platforms;