diff mbox series

[bug#60673,15/39] gnu: Add ocaml-ppx-cstruct.

Message ID 20230109003529.23375-15-raingloom@riseup.net
State New
Headers show
Series [bug#60673,01/39] gnu: Add ocaml-domain-name. | expand

Commit Message

Csepp Jan. 9, 2023, 12:35 a.m. UTC
From: raingloom <raingloom@riseup.net>

* gnu/packages/ocaml.scm (ocaml-ppx-cstruct): New variable.
---
 gnu/packages/ocaml.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index ee4c1cf91a..72cb000fd9 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -4469,6 +4469,28 @@  (define-public ocaml4.07-cstruct
 (define ocaml-cstruct-unix ocaml-cstruct)
 (define ocaml-cstruct-sexp ocaml-cstruct)
 
+(define-public ocaml-ppx-cstruct
+  (package
+    (inherit ocaml-cstruct)
+    (name "ocaml-ppx-cstruct")
+    (properties `((upstream-name . "ppx_cstruct")))
+    (arguments '(#:package "ppx_cstruct"
+                 ;; TODO doesn't find test deps for some reason?
+                 ;; I have no clue why.
+                 #:tests? #f))
+    (propagated-inputs
+     (modify-inputs
+         (package-propagated-inputs ocaml-cstruct)
+       (append ocaml-cstruct
+               ocaml-ppxlib
+               ocaml-sexplib)))
+    (native-inputs
+     (modify-inputs
+         (package-propagated-inputs ocaml-cstruct)
+       (append ocaml-cstruct-sexp
+               ocaml-findlib
+               ocaml-ppx-sexp-conv)))))
+
 (define-public ocaml-hex
   (package
     (name "ocaml-hex")