summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorpukkamustard <pukkamustard@posteo.net>2022-12-16 13:25:03 +0000
committerJulien Lepiller <julien@lepiller.eu>2022-12-21 21:58:56 +0100
commit052ec8bcc73d1c37e20a8eba85b4431bcff5447c (patch)
treead397f3fcda76a82850fe1558bf6ad4969a6e215 /guix
parent616e81894692cc9364df3a1cd9e59260a0480c5b (diff)
guix: ocaml: Add package-with-ocaml5.0.
* 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. Signed-off-by: Julien Lepiller <julien@lepiller.eu>
Diffstat (limited to 'guix')
-rw-r--r--guix/build-system/ocaml.scm27
1 files changed, 27 insertions, 0 deletions
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 @@
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 @@
(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 @@ pre-defined variants."
(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))