summaryrefslogtreecommitdiff
path: root/guix/build-system/ocaml.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2023-01-30 11:33:18 +0200
committerEfraim Flashner <efraim@flashner.co.il>2023-01-30 12:39:40 +0200
commit4cf1acc7f3033b50b0bf19e02c9f522d522d338c (patch)
tree9fd64956ee60304c15387eb394cd649e49f01467 /guix/build-system/ocaml.scm
parentedb8c09addd186d9538d43b12af74d6c7aeea082 (diff)
parent595b53b74e3ef57a1c0c96108ba86d38a170a241 (diff)
Merge remote-tracking branch 'origin/master' into core-updates
Conflicts: doc/guix.texi gnu/local.mk gnu/packages/admin.scm gnu/packages/base.scm gnu/packages/chromium.scm gnu/packages/compression.scm gnu/packages/databases.scm gnu/packages/diffoscope.scm gnu/packages/freedesktop.scm gnu/packages/gnome.scm gnu/packages/gnupg.scm gnu/packages/guile.scm gnu/packages/inkscape.scm gnu/packages/llvm.scm gnu/packages/openldap.scm gnu/packages/pciutils.scm gnu/packages/ruby.scm gnu/packages/samba.scm gnu/packages/sqlite.scm gnu/packages/statistics.scm gnu/packages/syndication.scm gnu/packages/tex.scm gnu/packages/tls.scm gnu/packages/version-control.scm gnu/packages/xml.scm guix/build-system/copy.scm guix/scripts/home.scm
Diffstat (limited to 'guix/build-system/ocaml.scm')
-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 67bb718e12..5f4308a46e 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))