diff mbox series

[bug#47768,v2,14/43] gnu: Add ocaml-uunf.

Message ID 20210510051628.15359-15-pukkamustard@posteo.net
State Accepted
Headers show
Series Assorted OCaml patches (V2) | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

pukkamustard May 10, 2021, 5:15 a.m. UTC
* gnu/packages/ocaml.scm (ocaml-uunf): New variable.
---
 gnu/packages/ocaml.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

Comments

Xinglu Chen May 25, 2021, 7:21 p.m. UTC | #1
On Mon, May 10 2021, pukkamustard wrote:

> +(define-public ocaml-uunf
> +  (package
> +    (name "ocaml-uunf")
> +    (version "13.0.0")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri "https://erratique.ch/software/uunf/releases/uunf-13.0.0.tbz")
> +       (sha256
> +        (base32
> +         "1qci04nkp24kdls1z4s8kz5dzgky4nwd5r8345nwdrgwmxhw7ksm"))))
> +    (build-system ocaml-build-system)
> +    (arguments
> +     `(#:tests? #f

What’s the reason for disabling test?  Does the package lack tests?
pukkamustard June 1, 2021, 7:54 p.m. UTC | #2
> What’s the reason for disabling test?  Does the package lack 
> tests?

Good catch! I was sloppy and ignored the tests. ocaml-uunf has 
tests, but required an external file that is not distributed with 
the package.

I have added the tests (inspired by the utf8proc package in 
gnu/textutils.scm).
diff mbox series

Patch

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 605567b996..a320f94097 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2708,6 +2708,38 @@  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 ocaml-uunf
+  (package
+    (name "ocaml-uunf")
+    (version "13.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri "https://erratique.ch/software/uunf/releases/uunf-13.0.0.tbz")
+       (sha256
+        (base32
+         "1qci04nkp24kdls1z4s8kz5dzgky4nwd5r8345nwdrgwmxhw7ksm"))))
+    (build-system ocaml-build-system)
+    (arguments
+     `(#:tests? #f
+       #:build-flags (list "build")
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure))))
+    (native-inputs
+     `(("ocamlbuild" ,ocamlbuild)
+       ("opam" ,opam)
+       ("topkg" ,ocaml-topkg)))
+    (propagated-inputs `(("ocaml-uutf" ,ocaml-uutf)))
+    (home-page "https://erratique.ch/software/uunf")
+    (synopsis "Unicode text normalization for OCaml")
+    (description
+     "Uunf is an OCaml library for normalizing Unicode text.  It supports all
+Unicode normalization forms.  The library is independent from any
+IO mechanism or Unicode text data structure and it can process text
+without a complete in-memory representation.")
+    (license license:isc)))
+
 (define-public ocaml-jsonm
   (package
     (name "ocaml-jsonm")