Subject: [bug#60673] [PATCH 35/39] gnu: Add ocaml-io-page.

From: Csepp <[email-masked]>
Date: Mon, 9 Jan 2023 01:35:25 +0100

From: raingloom <[email-masked]>

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

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index b2867ac366..f63aa138d2 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -3088,6 +3088,27 @@ (define-public ocaml-xenstore
     ;; Has a linking exception, see LICENSE.md.
     (license license:lgpl2.1)))
 
+(define-public ocaml-io-page
+  (package
+    (name "ocaml-io-page")
+    (version "3.0.0")
+    (source (origin
+              (method url-fetch)
+              (uri
+               "https://github.com/mirage/io-page/releases/download/v3.0.0/io-page-3.0.0.tbz")
+              (sha256
+               (base32
+                "1vl6ywzp48180bmdnk1zprwz0amz5sxrijwhh08acsq5v5scldhf"))))
+    (build-system dune-build-system)
+    (propagated-inputs (list ocaml-cstruct))
+    (native-inputs (list pkg-config ocaml-ounit))
+    (home-page "https://github.com/mirage/io-page")
+    (synopsis "Support for efficient handling of I/O memory pages")
+    (description
+     "IO pages are page-aligned, and wrapped in the @code{Cstruct} library to
+avoid copying the data contained within the page.")
+    (license license:isc)))
+
 (define-public ocaml-luv
   (package
     (name "ocaml-luv")
-- 
2.38.1