diff mbox series

[bug#67019,v2,07/16] gnu: Add ocaml-dtoa.

Message ID 4ccdb4652b68ad0cb1ed898b8ab5ecfc34125cb7.1700161584.git.philip@philipmcgrath.com
State New
Headers show
Series gnu: Add KaTeX, lessc, and flow-remove-types. | expand

Commit Message

Philip McGrath Nov. 16, 2023, 7:15 p.m. UTC
* gnu/packages/ocaml.scm (ocaml-dtoa): New variable.
---
 gnu/packages/ocaml.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
diff mbox series

Patch

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")