diff mbox series

[bug#67019,v2,06/16] gnu: Add ocaml-ppx-gen-rec.

Message ID c52577a55bb53bda385797dfe2faab477b94ffbc.1700161584.git.philip@philipmcgrath.com
State New
Headers show
Series gnu: Add KaTeX, lessc, and flow-remove-types. | expand

Commit Message

Philip McGrath Nov. 16, 2023, 7:15 p.m. UTC
* gnu/packages/ocaml.scm (ocaml-ppx-gen-rec): New variable.
---
 gnu/packages/ocaml.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
diff mbox series

Patch

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")