summary refs log tree commit diff
diff options
context:
space:
mode:
authorraingloom <raingloom@riseup.net>2023-02-15 23:00:00 +0100
committerChristopher Baines <mail@cbaines.net>2023-02-17 15:44:54 +0000
commit7d15ed9c825d82ab4841de281d7854f386ee98dd (patch)
treefa8eefaf3a60ab7f7d2198826406796f0a29dbe3
parentc71552a5626597fd2978564b79aa27f3f5abdcaf (diff)
downloadguix-7d15ed9c825d82ab4841de281d7854f386ee98dd.tar.gz
gnu: Add ocaml-duration.
* gnu/packages/ocaml.scm (ocaml-duration): New variable.

Signed-off-by: Christopher Baines <mail@cbaines.net>
-rw-r--r--gnu/packages/ocaml.scm24
1 files changed, 24 insertions, 0 deletions
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 892a247883..0093ef0032 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -3776,6 +3776,30 @@ mobile platforms.  Code can be developed on a normal OS and then compiled into
 a fully-standalone, specialised unikernel.")
     (license license:isc)))
 
+(define-public ocaml-duration
+  (package
+    (name "ocaml-duration")
+    (version "0.2.1")
+    (source (origin
+              (method git-fetch)
+              (uri
+               (git-reference
+                (url "https://github.com/hannesm/duration/")
+                (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0vvxi0ipxmdz1k4h501brvccniwf3wpc32djbccyyrzraiz7qkff"))))
+    (build-system dune-build-system)
+    (native-inputs (list ocaml-alcotest))
+    (home-page "https://github.com/hannesm/duration")
+    (synopsis "Conversions to various time units")
+    (description
+     "This package provides a duration is represented in nanoseconds as an
+unsigned 64 bit integer.  This has a range of up to 584 years.  Functions
+provided check the input and raise on negative or out of bound input.")
+    (license license:isc)))
+
 (define-public ocaml-ocurl
   (package
     (name "ocaml-ocurl")