[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/28: guix: ocaml: Add package-with-ocaml5.0.
From: |
guix-commits |
Subject: |
04/28: guix: ocaml: Add package-with-ocaml5.0. |
Date: |
Wed, 21 Dec 2022 16:11:41 -0500 (EST) |
roptat pushed a commit to branch master
in repository guix.
commit 052ec8bcc73d1c37e20a8eba85b4431bcff5447c
Author: pukkamustard <pukkamustard@posteo.net>
AuthorDate: Fri Dec 16 13:25:03 2022 +0000
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>
---
gnu/packages/ocaml.scm | 54 +++++++++++++++++++++++++++++++++++++++++----
guix/build-system/ocaml.scm | 27 +++++++++++++++++++++++
2 files changed, 77 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 1ce4872674..adbb76711e 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1820,6 +1820,9 @@ following a very simple s-expression syntax.")
(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)
@@ -1840,7 +1843,8 @@ following a very simple s-expression syntax.")
(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
@@ -1865,13 +1869,25 @@ config.h files for instance. Among other things,
dune-configurator allows one t
(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
@@ -1893,6 +1909,12 @@ config.h files for instance. Among other things,
dune-configurator allows one t
(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")
@@ -1918,7 +1940,8 @@ config.h files for instance. Among other things,
dune-configurator allows one t
#t)))))
(propagated-inputs
(list ocaml-result))
- (properties `((ocaml4.09-variant . ,(delay ocaml4.09-csexp))))
+ (properties `((ocaml4.09-variant . ,(delay ocaml4.09-csexp))
+ (ocaml5.0-variant . ,(delay ocaml5.0-csexp))))
(home-page "https://github.com/ocaml-dune/csexp")
(synopsis "Parsing and printing of S-expressions in Canonical form")
(description "This library provides minimal support for Canonical
@@ -1947,6 +1970,18 @@ module of this library is parameterised by the type of
S-expressions.")
(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")
@@ -2132,7 +2167,8 @@ bitsrings in Erlang style as primitives to the
language.")))
(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
@@ -2149,6 +2185,16 @@ defined in this library.")
#: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 @@
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))
- branch master updated (30465558bd -> fe5836feaf), guix-commits, 2022/12/21
- 13/28: gnu: Add ocaml5.0-ppx-expect., guix-commits, 2022/12/21
- 03/28: gnu: Add ocaml5.0-findlib, guix-commits, 2022/12/21
- 01/28: gnu: Add ocaml-5.0., guix-commits, 2022/12/21
- 04/28: guix: ocaml: Add package-with-ocaml5.0.,
guix-commits <=
- 15/28: gnu: Add ocaml5.0-crowbar., guix-commits, 2022/12/21
- 17/28: gnu: Add ocaml5.0-ctypes, guix-commits, 2022/12/21
- 27/28: gnu: Add ocaml5.0-dot-merlin-reader., guix-commits, 2022/12/21
- 25/28: gnu: Update ocaml-merlin-lib to 4.7-414., guix-commits, 2022/12/21
- 21/28: gnu: Add ocaml5.0-eio-luv., guix-commits, 2022/12/21
- 02/28: gnu: ocaml-findlib: Update to 1.9.5., guix-commits, 2022/12/21
- 07/28: gnu: Add ocaml-monolith., guix-commits, 2022/12/21
- 08/28: gnu: Add ocaml-optint., guix-commits, 2022/12/21
- 10/28: gnu: Add ocaml5.0-base., guix-commits, 2022/12/21
- 12/28: gnu: Update ocaml-qcheck to 0.20., guix-commits, 2022/12/21