diff mbox series

[bug#53882,05/24] gnu: Add ocaml-ppx-typerep-conv.

Message ID 811562283fa707e56679de1da9e6d8c7e941f76b.1644350657.git.julien@lepiller.eu
State Accepted
Headers show
Series [bug#53882,01/24] import: opam: Accept tabulations. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Julien Lepiller Feb. 8, 2022, 8:14 p.m. UTC
* gnu/packages/ocaml.scm (ocaml-ppx-typerep-conv): New variable.
(ocaml4.07-ppx-typerep-conv): Inherit from it.
---
 gnu/packages/ocaml.scm | 57 ++++++++++++++++++++++++------------------
 1 file changed, 33 insertions(+), 24 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index d88fea9804..43b26b32da 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -6205,37 +6205,46 @@  (define-public ocaml4.07-ppx-js-style
                          "0z3fc55jdjhhsblla6z4fqc13kljpcz29q79rvs5h2vsraqrldr2"))
      (properties `((upstream-name . "ppx_js_style"))))))
 
-(define-public ocaml4.07-ppx-typerep-conv
+(define-public ocaml-ppx-typerep-conv
   (package
-    (name "ocaml4.07-ppx-typerep-conv")
-    (version "0.11.1")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                     (url "https://github.com/janestreet/ppx_typerep_conv")
-                     (commit (string-append "v" version))))
-              (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "0a13dpfrrg0rsm8qni1bh7pqcda30l70z8r6yzi5a64bmwk7g5ah"))))
+    (name "ocaml-ppx-typerep-conv")
+    (version "0.14.2")
+    (source
+      (origin
+        (method url-fetch)
+        (uri "https://github.com/janestreet/ppx_typerep_conv/archive/v0.14.2.tar.gz")
+        (sha256
+          (base32 "1g1sb3prscpa7jwnk08f50idcgyiiv0b9amkl0kymj5cghkdqw0n"))))
     (build-system dune-build-system)
     (arguments
-     `(#:test-target "."
-       #:ocaml ,ocaml-4.07
-       #:findlib ,ocaml4.07-findlib
-       #:dune ,ocaml4.07-dune))
-    (propagated-inputs
-      `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
-        ("ocaml-typerep" ,ocaml4.07-typerep)
-        ("ocaml-migrate-parsetree"
-         ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
-        ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
-    (properties `((upstream-name . "ppx_typerep_conv")))
+     `(#:test-target "."))
+    (propagated-inputs (list ocaml-base ocaml-typerep ocaml-ppxlib))
+    (properties `((upstream-name . "ppx_typerep_conv")
+                  (ocaml4.07-variant . ,(delay ocaml4.07-ppx-typerep-conv))))
     (home-page "https://github.com/janestreet/ppx_typerep_conv")
     (synopsis "Generation of runtime types from type declarations")
     (description "This package can automatically generate runtime types
 from type definitions.")
-    (license license:asl2.0)))
+    (license license:expat)))
+
+(define-public ocaml4.07-ppx-typerep-conv
+  (package-with-ocaml4.07
+    (package
+      (inherit ocaml-ppx-typerep-conv)
+      (version "0.11.1")
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                       (url "https://github.com/janestreet/ppx_typerep_conv")
+                       (commit (string-append "v" version))))
+                (file-name (git-file-name "ocaml4.07-ppx-typerep-conv" version))
+                (sha256
+                 (base32
+                  "0a13dpfrrg0rsm8qni1bh7pqcda30l70z8r6yzi5a64bmwk7g5ah"))))
+      (properties '())
+      (propagated-inputs
+        (list ocaml-base ocaml-typerep ocaml-migrate-parsetree ocaml-ppxlib))
+      (license license:asl2.0))))
 
 (define-public ocaml-ppx-base
   (package