guix_mirror_bot pushed a commit to branch ocaml-team
in repository guix.

commit 819ab67d95916f0b5105de26b4a75a9203b11ee3
Author: Jason Conroy <[email protected]>
AuthorDate: Thu Feb 12 10:28:42 2026 -0500

    gnu: ocaml5: Add ocaml-cstruct.
    
    * gnu/packages/ocaml5.scm (ocaml-cstruct): New variable.
    
    Change-Id: I9511b8d2ea641bd10a8e8bf6466df1ab4b0457dc
    Signed-off-by: Julien Lepiller <[email protected]>
---
 gnu/packages/ocaml5.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/ocaml5.scm b/gnu/packages/ocaml5.scm
index 30ce55a332..e44a8673be 100644
--- a/gnu/packages/ocaml5.scm
+++ b/gnu/packages/ocaml5.scm
@@ -2924,6 +2924,32 @@ between Bigstrings and other string-like types.  
@code{bigstringaf} provides
 these missing pieces.")
     (license license:bsd-3)))
 
+(define-public ocaml-cstruct
+  (package
+    (name "ocaml5-cstruct")
+    (version "6.1.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/mirage/ocaml-cstruct";)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0dpbirs6lzp0bclr3wcw407jjspll7iy66z18zks3mjccvlxd21w"))))
+    (build-system dune-build-system)
+    (arguments
+     `(#:package "cstruct"))
+    (propagated-inputs (list ocaml-bigarray-compat))
+    (native-inputs (list ocaml-alcotest))
+    (home-page "https://github.com/mirage/ocaml-cstruct";)
+    (synopsis "Accesses C structures via a camlp4 extension")
+    (description
+     "Cstruct is a library and syntax extension to make it easier
+to access C-like structures directly from OCaml.  It supports both reading and
+writing to these structures, and they are accessed via the Bigarray module.")
+    (license license:isc)))
+
 ;;;
 ;;; Avoid adding new packages to the end of this file. To reduce the chances
 ;;; of a merge conflict, place them above by existing packages with similar

Reply via email to