all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: pukkamustard <pukkamustard@posteo.net>
To: 60120@debbugs.gnu.org
Cc: pukkamustard <pukkamustard@posteo.net>
Subject: [bug#60120] [PATCH 04/28] guix: ocaml: Add package-with-ocaml5.0.
Date: Fri, 16 Dec 2022 13:25:03 +0000	[thread overview]
Message-ID: <20221216132527.2539-4-pukkamustard@posteo.net> (raw)
In-Reply-To: <20221216132527.2539-1-pukkamustard@posteo.net>

* guix/build-system/ocaml.scm (package-with-ocaml5.0)
(strip-ocaml5.0-variant): New variables.
* gnu/packages/ocaml.scm (ocaml5.0-dune-bootstrap)
(ocaml5.0-dune, ocaml5.0-dune-configurator)
(ocaml5.0-csexp, ocaml5.0-result): New variables.
---
 gnu/packages/ocaml.scm      | 51 ++++++++++++++++++++++++++++++++++---
 guix/build-system/ocaml.scm | 27 ++++++++++++++++++++
 2 files changed, 75 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index e8f64915d9..605baa801d 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1819,6 +1819,9 @@ (define dune-bootstrap
 (define ocaml4.09-dune-bootstrap
   (package-with-ocaml4.09 dune-bootstrap))
 
+(define ocaml5.0-dune-bootstrap
+  (package-with-ocaml5.0 dune-bootstrap))
+
 (define-public dune-configurator
   (package
     (inherit dune-bootstrap)
@@ -1839,7 +1842,8 @@ (define-public dune-configurator
              (delete-file-recursively "vendor/pp"))))))
     (propagated-inputs
      (list ocaml-csexp))
-    (properties `((ocaml4.09-variant . ,(delay ocaml4.09-dune-configurator))))
+    (properties `((ocaml4.09-variant . ,(delay ocaml4.09-dune-configurator))
+                  (ocaml5.0-variant . ,(delay ocaml5.0-dune-configurator))))
     (synopsis "Dune helper library for gathering system configuration")
     (description "Dune-configurator is a small library that helps writing
 OCaml scripts that test features available on the system, in order to generate
@@ -1864,13 +1868,25 @@ (define-public ocaml4.09-dune-configurator
     (propagated-inputs
      `(("ocaml-csexp" ,ocaml4.09-csexp)))))
 
+(define-public ocaml5.0-dune-configurator
+  (package
+    (inherit dune-configurator)
+    (name "ocaml5.0-dune-configurator")
+    (arguments
+     `(,@(package-arguments dune-configurator)
+       #:dune ,ocaml5.0-dune-bootstrap
+       #:ocaml ,ocaml-5.0
+       #:findlib ,ocaml5.0-findlib))
+    (propagated-inputs (list ocaml5.0-csexp))))
+
 (define-public dune
   (package
     (inherit dune-bootstrap)
     (propagated-inputs
      (list dune-configurator))
     (properties `((ocaml4.07-variant . ,(delay ocaml4.07-dune))
-                  (ocaml4.09-variant . ,(delay ocaml4.09-dune))))))
+                  (ocaml4.09-variant . ,(delay ocaml4.09-dune))
+                  (ocaml5.0-variant . ,(delay ocaml5.0-dune))))))
 
 (define-public ocaml4.09-dune
   (package
@@ -1892,6 +1908,12 @@ (define-public ocaml4.07-dune
                (base32
                 "0l4x0x2fz135pljv88zj8y6w1ninsqw0gn1mdxzprd6wbxbyn8wr"))))))
 
+(define-public ocaml5.0-dune
+  (package
+    (inherit ocaml5.0-dune-bootstrap)
+    (propagated-inputs
+     (list ocaml5.0-dune-configurator))))
+
 (define-public ocaml-csexp
   (package
     (name "ocaml-csexp")
@@ -1946,6 +1968,18 @@ (define-public ocaml4.09-csexp
     (propagated-inputs
      `(("ocaml-result" ,ocaml4.09-result)))))
 
+(define-public ocaml5.0-csexp
+  (package
+    (inherit ocaml-csexp)
+    (name "ocaml5.0-csexp")
+    (arguments
+     `(#:ocaml ,ocaml-5.0
+       #:findlib ,ocaml5.0-findlib
+       ,@(substitute-keyword-arguments (package-arguments ocaml-csexp)
+           ((#:dune _) ocaml5.0-dune-bootstrap))))
+    (propagated-inputs
+     `(("ocaml-result" ,ocaml5.0-result)))))
+
 (define-public ocaml-migrate-parsetree
   (package
     (name "ocaml-migrate-parsetree")
@@ -2131,7 +2165,8 @@ (define-public ocaml-result
     (arguments
      `(#:test-target "."
        #:dune ,dune-bootstrap))
-    (properties `((ocaml4.09-variant . ,(delay ocaml4.09-result))))
+    (properties `((ocaml4.09-variant . ,(delay ocaml4.09-result))
+                  (ocaml5.0-variant . ,(delay ocaml5.0-result))))
     (home-page "https://github.com/janestreet/result")
     (synopsis "Compatibility Result module")
     (description "Uses the new result type defined in OCaml >= 4.03 while
@@ -2148,6 +2183,16 @@ (define-public ocaml4.09-result
        #:dune ,ocaml4.09-dune-bootstrap
        #:ocaml ,ocaml-4.09
        #:findlib ,ocaml4.09-findlib))))
+
+(define-public ocaml5.0-result
+  (package
+    (inherit ocaml-result)
+    (name "ocaml5.0-result")
+    (arguments
+     `(#:test-target "."
+       #:dune ,ocaml5.0-dune-bootstrap
+       #:ocaml ,ocaml-5.0
+       #:findlib ,ocaml5.0-findlib))))
  
 (define-public ocaml-topkg
   (package
diff --git a/guix/build-system/ocaml.scm b/guix/build-system/ocaml.scm
index 5ced9d243b..b08985cd4d 100644
--- a/guix/build-system/ocaml.scm
+++ b/guix/build-system/ocaml.scm
@@ -32,6 +32,8 @@ (define-module (guix build-system ocaml)
             strip-ocaml4.07-variant
             package-with-ocaml4.09
             strip-ocaml4.09-variant
+            package-with-ocaml5.0
+            strip-ocaml5.0-variant
             default-findlib
             default-ocaml
             lower
@@ -111,6 +113,18 @@ (define (default-ocaml4.09-dune)
   (let ((module (resolve-interface '(gnu packages ocaml))))
     (module-ref module 'ocaml4.09-dune)))
 
+(define (default-ocaml5.0)
+  (let ((ocaml (resolve-interface '(gnu packages ocaml))))
+    (module-ref ocaml 'ocaml-5.0)))
+
+(define (default-ocaml5.0-findlib)
+  (let ((module (resolve-interface '(gnu packages ocaml))))
+    (module-ref module 'ocaml5.0-findlib)))
+
+(define (default-ocaml5.0-dune)
+  (let ((module (resolve-interface '(gnu packages ocaml))))
+    (module-ref module 'ocaml5.0-dune)))
+
 (define* (package-with-explicit-ocaml ocaml findlib dune old-prefix new-prefix
                                        #:key variant-property)
   "Return a procedure of one argument, P.  The procedure creates a package
@@ -199,6 +213,19 @@ (define (strip-ocaml4.09-variant p)
     (inherit p)
     (properties (alist-delete 'ocaml4.09-variant (package-properties p)))))
 
+(define package-with-ocaml5.0
+  (package-with-explicit-ocaml (delay (default-ocaml5.0))
+                               (delay (default-ocaml5.0-findlib))
+                               (delay (default-ocaml5.0-dune))
+                               "ocaml-" "ocaml5.0-"
+                               #:variant-property 'ocaml5.0-variant))
+
+(define (strip-ocaml5.0-variant p)
+  "Remove the 'ocaml5.0-variant' property from P."
+  (package
+    (inherit p)
+    (properties (alist-delete 'ocaml5.0-variant (package-properties p)))))
+
 (define* (lower name
                 #:key source inputs native-inputs outputs system target
                 (ocaml (default-ocaml))
-- 
2.38.1





  parent reply	other threads:[~2022-12-16 13:27 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-16 13:22 [bug#60120] [PATCH 00/28] gnu: Add ocaml-5.0 pukkamustard
2022-12-16 13:25 ` [bug#60120] [PATCH 01/28] " pukkamustard
2022-12-16 13:25   ` [bug#60120] [PATCH 02/28] gnu: ocaml-findlib: Update to 1.9.5 pukkamustard
2022-12-16 13:25   ` [bug#60120] [PATCH 03/28] gnu: Add ocaml5.0-findlib pukkamustard
2022-12-16 13:25   ` pukkamustard [this message]
2022-12-16 13:25   ` [bug#60120] [PATCH 05/28] gnu: opam: Use OCaml 4.14 compiled version when building OCaml 5.0 packages pukkamustard
2022-12-16 13:25   ` [bug#60120] [PATCH 06/28] gnu: Add ocaml-psq pukkamustard
2022-12-16 13:25   ` [bug#60120] [PATCH 07/28] gnu: Add ocaml-monolith pukkamustard
2022-12-16 13:25   ` [bug#60120] [PATCH 08/28] gnu: Add ocaml-optint pukkamustard
2022-12-16 13:25   ` [bug#60120] [PATCH 09/28] gnu: Add ocaml-hmap pukkamustard
2022-12-16 13:25   ` [bug#60120] [PATCH 10/28] gnu: Add ocaml5.0-base pukkamustard
2022-12-16 13:25   ` [bug#60120] [PATCH 11/28] gnu: Update ocaml-ppxlib to 0.25.1 pukkamustard
2022-12-16 13:25   ` [bug#60120] [PATCH 12/28] gnu: Update ocaml-qcheck to 0.20 pukkamustard
2022-12-16 13:25   ` [bug#60120] [PATCH 13/28] gnu: Add ocaml5.0-ppx-expect pukkamustard
2022-12-16 13:25   ` [bug#60120] [PATCH 14/28] gnu: Update ocaml-odoc to 2.2.0 pukkamustard
2022-12-16 13:25   ` [bug#60120] [PATCH 15/28] gnu: Add ocaml5.0-crowbar pukkamustard
2022-12-16 13:25   ` [bug#60120] [PATCH 16/28] gnu: Add ocaml-lwt-dllist pukkamustard
2022-12-16 13:25   ` [bug#60120] [PATCH 17/28] gnu: Add ocaml5.0-ctypes pukkamustard
2022-12-16 13:25   ` [bug#60120] [PATCH 18/28] gnu: Add ocaml-bechamel pukkamustard
2022-12-16 13:25   ` [bug#60120] [PATCH 19/28] gnu: ocaml-mdx: Move inputs to propagated-inputs pukkamustard
2022-12-16 13:25   ` [bug#60120] [PATCH 20/28] gnu: Add ocaml5.0-eio pukkamustard
2022-12-16 13:25   ` [bug#60120] [PATCH 21/28] gnu: Add ocaml5.0-eio-luv pukkamustard
2022-12-16 13:25   ` [bug#60120] [PATCH 22/28] gnu: Add ocaml-uring pukkamustard
2022-12-16 13:25   ` [bug#60120] [PATCH 23/28] gnu: Add ocaml5.0-eio-linux pukkamustard
2022-12-16 13:25   ` [bug#60120] [PATCH 24/28] gnu: Add ocaml5.0-eio-main pukkamustard
2022-12-16 13:25   ` [bug#60120] [PATCH 25/28] gnu: Update ocaml-merlin-lib to 4.7-414 pukkamustard
2022-12-16 13:25   ` [bug#60120] [PATCH 26/28] gnu: Add ocaml5.0-merlin-lib pukkamustard
2022-12-16 13:25   ` [bug#60120] [PATCH 27/28] gnu: Add ocaml5.0-dot-merlin-reader pukkamustard
2022-12-16 13:25   ` [bug#60120] [PATCH 28/28] gnu: Add ocaml5.0-merlin pukkamustard
2022-12-21 21:11   ` bug#60120: [PATCH 01/28] gnu: Add ocaml-5.0 Julien Lepiller
2022-12-22  7:08     ` [bug#60120] " pukkamustard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221216132527.2539-4-pukkamustard@posteo.net \
    --to=pukkamustard@posteo.net \
    --cc=60120@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.