Subject: [PATCH v2 07/16] gnu: Add ocaml-dtoa.

From: Philip McGrath <[email-masked]>
Date: Thu, 16 Nov 2023 14:15:45 -0500

* gnu/packages/ocaml.scm (ocaml-dtoa): New variable.
---
 gnu/packages/ocaml.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index b12c12fad5..36f349df73 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2513,6 +2513,30 @@ (define-public ocaml4.07-fmt
                   "0gkkkj4x678vxdda4xaw2dd44qjacavsvn5nx8gydfwah6pjbkxk"))))
       (properties '()))))
 
+(define-public ocaml-dtoa
+  (package
+    (name "ocaml-dtoa")
+    (version "0.3.3")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append "https://github.com/flow/ocaml-dtoa/releases/"
+                              "download/v" version "/dtoa-" version ".tbz"))
+              (sha256
+               (base32
+                "0gpfr6iyiihmkpas542916cnhfdbrigvzwrix8jrxcljks661x6q"))))
+    (build-system dune-build-system)
+    (native-inputs (list ocaml-ounit2))
+    (home-page "https://github.com/flow/ocaml-dtoa")
+    (synopsis
+     "Efficent float to string conversion for OCaml")
+    (description
+     "This package provides functions that convert OCaml floats into strings
+quickly, accurately, and (almost always) optimally using the Grisu3 algorithm.
+The implementation was adapted from a C++ library originally developed as part
+of the V8 JavaScript engine.")
+    (license license:expat)))
+
 (define-public ocaml-astring
   (package
     (name "ocaml-astring")
-- 
2.41.0