GNU bug report logs - #47768
[PATCH 00/37] Assorted OCaml patches

Previous Next

Package: guix-patches;

Reported by: pukkamustard <pukkamustard <at> posteo.net>

Date: Wed, 14 Apr 2021 09:10:02 UTC

Severity: normal

Tags: patch

Done: Julien Lepiller <julien <at> lepiller.eu>

Bug is archived. No further changes may be made.

Full log


Message #248 received at 47768 <at> debbugs.gnu.org (full text, mbox):

From: pukkamustard <pukkamustard <at> posteo.net>
To: 47768 <at> debbugs.gnu.org
Cc: pukkamustard <pukkamustard <at> posteo.net>, divoplade <d <at> divoplade.fr>,
 Maxime Devos <maximedevos <at> telenet.be>
Subject: [PATCH v2 29/43] gnu: Add ocaml-ppx-fields-conv.
Date: Mon, 10 May 2021 05:16:14 +0000
* gnu/packages/ocaml.scm (ocaml-ppx-fields-conv): New variable.
  (ocaml4.07-ppx-fields-conv): Inherit from ocaml-ppx-fields-conv.
---
 gnu/packages/ocaml.scm | 58 ++++++++++++++++++++++++------------------
 1 file changed, 33 insertions(+), 25 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index aa8437985e..d3fe5b51e9 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -5050,31 +5050,29 @@ of a record and create new record values.")
 standard library.")
     (license license:asl2.0)))
 
-(define-public ocaml4.07-ppx-fields-conv
+(define-public ocaml-ppx-fields-conv
   (package
-    (name "ocaml4.07-ppx-fields-conv")
-    (version "0.11.0")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
-                                  (version-major+minor version)
-                                  "/files/ppx_fields_conv-v" version ".tar.gz"))
-              (sha256
-               (base32
-                "07zrd3qky2ppbfl55gpm90rvqa5860xgwcsvihrjmkrw6d0jirkc"))))
+    (name "ocaml-ppx-fields-conv")
+    (version "0.14.2")
+    (home-page "https://github.com/janestreet/ppx_fields_conv")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url home-page)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1zwirwqry24b48bg7d4yc845hvcirxyymzbw95aaxdcck84d30n8"))))
     (build-system dune-build-system)
     (propagated-inputs
-      `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
-        ("ocaml-fieldslib" ,(package-with-ocaml4.07 ocaml-fieldslib))
-        ("ocaml-migrate-parsetree"
-         ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
-        ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib))))
-    (arguments
-     `(#:ocaml ,ocaml-4.07
-       #:findlib ,ocaml4.07-findlib
-       #:dune ,ocaml4.07-dune))
-    (properties `((upstream-name . "ppx_fields_conv")))
-    (home-page "https://github.com/janestreet/ppx_fields_conv")
+     `(("ocaml-base" ,ocaml-base)
+       ("ocaml-fieldslib" ,ocaml-fieldslib)
+       ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
+       ("ocaml-ppxlib" ,ocaml-ppxlib)))
+    (properties `((upstream-name . "ppx_fields_conv")
+                  (ocaml4.07-variant . ,(delay ocaml4.07-ppx-fields-conv))))
     (synopsis "Generation of accessor and iteration functions for ocaml records")
     (description "Ppx_fields_conv is a ppx rewriter that can be used to define
 first class values representing record fields, and additional routines, to get
@@ -5082,6 +5080,16 @@ and set record fields, iterate and fold over all fields of a record and create
 new record values.")
     (license license:asl2.0)))
 
+(define-public ocaml4.07-ppx-fields-conv
+  (package-with-ocaml4.07
+   (package
+     (inherit ocaml-ppx-fields-conv)
+    (version "0.11.0")
+    (source (janestreet-origin
+             "ppx_fields_conv" version
+             "07zrd3qky2ppbfl55gpm90rvqa5860xgwcsvihrjmkrw6d0jirkc"))
+    (properties `((upstream-name . "ppx_fields_conv"))))))
+
 (define-public ocaml-ppx-sexp-conv
   (package
     (name "ocaml-ppx-sexp-conv")
@@ -5216,7 +5224,7 @@ string conversion.")
       `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
         ("ocaml-ppx-compare" ,(package-with-ocaml4.07 ocaml-ppx-compare))
         ("ocaml-ppx-custom-printf" ,(package-with-ocaml4.07 ocaml-ppx-custom-printf))
-        ("ocaml-ppx-fields-conv" ,ocaml4.07-ppx-fields-conv)
+        ("ocaml-ppx-fields-conv" ,(package-with-ocaml4.07 ocaml-ppx-fields-conv))
         ("ocaml-ppx-sexp-conv" ,(package-with-ocaml4.07 ocaml-ppx-sexp-conv))
         ("ocaml-ppx-variants-conv" ,ocaml4.07-ppx-variants-conv)
         ("ocaml-migrate-parsetree"
@@ -5738,7 +5746,7 @@ useful errors on failure.")
         ("ocaml-ppx-assert" ,(package-with-ocaml4.07 ocaml4.07-ppx-assert))
         ("ocaml-ppx-compare" ,(package-with-ocaml4.07 ocaml-ppx-compare))
         ("ocaml-ppx-custom-printf" ,(package-with-ocaml4.07 ocaml-ppx-custom-printf))
-        ("ocaml-ppx-fields-conv" ,ocaml4.07-ppx-fields-conv)
+        ("ocaml-ppx-fields-conv" ,(package-with-ocaml4.07 ocaml-ppx-fields-conv))
         ("ocaml-ppx-here" ,(package-with-ocaml4.07 ocaml-ppx-here))
         ("ocaml-ppx-inline-test" ,ocaml4.07-ppx-inline-test)
         ("ocaml-ppx-sexp-conv" ,(package-with-ocaml4.07 ocaml-ppx-sexp-conv))
@@ -5932,7 +5940,7 @@ functions from type definitions.")
         ("ocaml-ppx-custom-printf" ,(package-with-ocaml4.07 ocaml-ppx-custom-printf))
         ("ocaml-ppx-expect" ,ocaml4.07-ppx-expect)
         ("ocaml-ppx-fail" ,ocaml4.07-ppx-fail)
-        ("ocaml-ppx-fields-conv" ,ocaml4.07-ppx-fields-conv)
+        ("ocaml-ppx-fields-conv" ,(package-with-ocaml4.07 ocaml-ppx-fields-conv))
         ("ocaml-ppx-here" ,(package-with-ocaml4.07 ocaml-ppx-here))
         ("ocaml-ppx-inline-test" ,ocaml4.07-ppx-inline-test)
         ("ocaml-ppx-let" ,(package-with-ocaml4.07 ocaml-ppx-let))
-- 
2.31.1





This bug report was last modified 3 years and 344 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.