From d64bfa4c3aa32f33c8b0fa6bd9daf5a47e643c02 Mon Sep 17 00:00:00 2001 From: Jason Conroy Date: Sat, 10 Jan 2026 17:10:29 -0500 Subject: [PATCH] gnu: ocaml5: Add ocaml-uutf. * gnu/packages/ocaml5.scm (ocaml-uutf): New variable. Change-Id: I24b1573bf8755c48c03ea1f7b68c3a4d10b1fd7a Signed-off-by: Julien Lepiller --- gnu/packages/ocaml5.scm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/gnu/packages/ocaml5.scm b/gnu/packages/ocaml5.scm index eb612f60fd8..f8ade59e9a5 100644 --- a/gnu/packages/ocaml5.scm +++ b/gnu/packages/ocaml5.scm @@ -513,6 +513,37 @@ unique identifiers (UUIDs) version 3, 5 (named based with MD5, SHA-1 hashing) and 4 (random based) according to RFC 4122.") (license license:isc))) +(define-public ocaml-uutf + (package + (name "ocaml5-uutf") + (version "1.0.3") + (source + (origin + (method url-fetch) + (uri (string-append "http://erratique.ch/software/uutf/releases/" + "uutf-" version ".tbz")) + (sha256 + (base32 "0s05r8ggp1g97zq4rnvbxzj22pv8ld0k5wsdw662jw0y7mhsawl7")))) + (build-system ocaml-build-system) + (arguments + `(#:tests? #f + #:build-flags (list "build") + #:phases ,#~(modify-phases %standard-phases + (delete 'configure)))) + (native-inputs (list ocamlbuild ocaml-topkg opaline)) + (propagated-inputs (list ocaml-cmdliner)) + (home-page "https://erratique.ch/software/uutf") + (synopsis "Non-blocking streaming Unicode codec for OCaml") + (description + "Uutf is a non-blocking streaming codec to decode and encode +the UTF-8, UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently +work character by character without blocking on IO. Decoders perform character +position tracking and support newline normalization. + +Functions are also provided to fold over the characters of UTF encoded OCaml +string values and to directly encode characters in OCaml Buffer.t values.") + (license license:isc))) + (define-public ocaml5.3-dune-bootstrap (package (name "ocaml5.3-dune")