Subject: [PATCH v2 06/16] gnu: Add ocaml-ppx-gen-rec.

From: Philip McGrath <[email-masked]>
Date: Thu, 16 Nov 2023 14:15:44 -0500

* gnu/packages/ocaml.scm (ocaml-ppx-gen-rec): New variable.
---
 gnu/packages/ocaml.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index f9a3932d18..b12c12fad5 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -6722,6 +6722,34 @@ (define-public ocaml-ppx-deriving
 on type definitions, and a set of useful plugins for common tasks.")
     (license license:expat)))
 
+(define-public ocaml-ppx-gen-rec
+  (package
+    (name "ocaml-ppx-gen-rec")
+    (version "2.0.0")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append "https://github.com/flow/ocaml-ppx_gen_rec/"
+                              "releases/download/v"
+                              version
+                              "/ppx_gen_rec-v" version ".tbz"))
+              (sha256
+               (base32
+                "0ncy7ps0w3cnb3nk6y1j4v4g60rs500qwv1daw3a9n7n8kjj6qzy"))))
+    (build-system dune-build-system)
+    (propagated-inputs (list ocaml-ppxlib))
+    (native-inputs (list ocaml-ppx-deriving))
+    (properties `((upstream-name . "ppx_gen_rec")))
+    (home-page "https://github.com/flow/ocaml-ppx_gen_rec")
+    (synopsis "Ppx rewriter for recursive module expressions")
+    (description
+     "This package provides a ppx rewriter that transforms a recursive module
+expression into a struct.  In a recursive module expression, the struct can be
+derived from the signature automatically by the compiler.  This package does
+the same thing, but doing it this way allows @code{ppx_deriving} to transform
+the signature and the struct separately.")
+    (license license:expat)))
+
 (define-public ocaml-ppx-derivers
   (package
     (name "ocaml-ppx-derivers")
-- 
2.41.0