mirror of
https://codeberg.org/guix/guix.git
synced 2026-04-28 06:34:05 +00:00
guix: ocaml: Add package-with-ocaml5.3.
* guix/build-system/ocaml.scm (package-with-ocaml5.3) (strip-ocaml5.3-variant): New variables. * gnu/packages/ocaml.scm (ocaml5.3-dune-bootstrap) (ocaml5.3-dune, ocaml5.3-dune-configurator) (ocaml5.3-csexp, ocaml5.3-result): New variables. Change-Id: Ic605701593b70f293ec05f7cad073203dc71aa5f Signed-off-by: Julien Lepiller <julien@lepiller.eu>
This commit is contained in:
committed by
Julien Lepiller
parent
594ff01bc3
commit
00dd1ddacf
@@ -2028,6 +2028,9 @@ Descriptions of projects, libraries and executables are provided in
|
||||
(define-public ocaml5.0-dune-bootstrap
|
||||
(package-with-ocaml5.0 dune-bootstrap))
|
||||
|
||||
(define-public ocaml5.3-dune-bootstrap
|
||||
(package-with-ocaml5.3 dune-bootstrap))
|
||||
|
||||
(define-public dune-configurator
|
||||
(package
|
||||
(inherit dune-bootstrap)
|
||||
@@ -2049,7 +2052,8 @@ Descriptions of projects, libraries and executables are provided in
|
||||
(propagated-inputs
|
||||
(list ocaml-csexp))
|
||||
(properties `((ocaml4.09-variant . ,(delay ocaml4.09-dune-configurator))
|
||||
(ocaml5.0-variant . ,(delay ocaml5.0-dune-configurator))))
|
||||
(ocaml5.0-variant . ,(delay ocaml5.0-dune-configurator))
|
||||
(ocaml5.3-variant . ,(delay ocaml5.3-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
|
||||
@@ -2085,6 +2089,17 @@ config.h files for instance. Among other things, dune-configurator allows one t
|
||||
#:findlib ,ocaml5.0-findlib))
|
||||
(propagated-inputs (list ocaml5.0-csexp))))
|
||||
|
||||
(define-public ocaml5.3-dune-configurator
|
||||
(package
|
||||
(inherit dune-configurator)
|
||||
(name "ocaml5.3-dune-configurator")
|
||||
(arguments
|
||||
`(,@(package-arguments dune-configurator)
|
||||
#:dune ,ocaml5.3-dune-bootstrap
|
||||
#:ocaml ,ocaml-5.3
|
||||
#:findlib ,ocaml5.3-findlib))
|
||||
(propagated-inputs (list ocaml5.3-csexp))))
|
||||
|
||||
(define-public dune
|
||||
(package
|
||||
(inherit dune-bootstrap)
|
||||
@@ -2092,7 +2107,8 @@ config.h files for instance. Among other things, dune-configurator allows one t
|
||||
(list dune-configurator))
|
||||
(properties `((ocaml4.07-variant . ,(delay ocaml4.07-dune))
|
||||
(ocaml4.09-variant . ,(delay ocaml4.09-dune))
|
||||
(ocaml5.0-variant . ,(delay ocaml5.0-dune))))))
|
||||
(ocaml5.0-variant . ,(delay ocaml5.0-dune))
|
||||
(ocaml5.3-variant . ,(delay ocaml5.3-dune))))))
|
||||
|
||||
(define-public ocaml4.09-dune
|
||||
(package
|
||||
@@ -2120,6 +2136,12 @@ config.h files for instance. Among other things, dune-configurator allows one t
|
||||
(propagated-inputs
|
||||
(list ocaml5.0-dune-configurator))))
|
||||
|
||||
(define-public ocaml5.3-dune
|
||||
(package
|
||||
(inherit ocaml5.3-dune-bootstrap)
|
||||
(propagated-inputs
|
||||
(list ocaml5.3-dune-configurator))))
|
||||
|
||||
(define-public ocaml-pp
|
||||
(package
|
||||
(name "ocaml-pp")
|
||||
@@ -2245,7 +2267,8 @@ executables and libraries")))
|
||||
(propagated-inputs
|
||||
(list ocaml-result))
|
||||
(properties `((ocaml4.09-variant . ,(delay ocaml4.09-csexp))
|
||||
(ocaml5.0-variant . ,(delay ocaml5.0-csexp))))
|
||||
(ocaml5.0-variant . ,(delay ocaml5.0-csexp))
|
||||
(ocaml5.3-variant . ,(delay ocaml5.3-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
|
||||
@@ -2286,6 +2309,18 @@ module of this library is parameterised by the type of S-expressions.")
|
||||
(propagated-inputs
|
||||
`(("ocaml-result" ,ocaml5.0-result)))))
|
||||
|
||||
(define-public ocaml5.3-csexp
|
||||
(package
|
||||
(inherit ocaml-csexp)
|
||||
(name "ocaml5.3-csexp")
|
||||
(arguments
|
||||
`(#:ocaml ,ocaml-5.3
|
||||
#:findlib ,ocaml5.3-findlib
|
||||
,@(substitute-keyword-arguments (package-arguments ocaml-csexp)
|
||||
((#:dune _) ocaml5.3-dune-bootstrap))))
|
||||
(propagated-inputs
|
||||
`(("ocaml-result" ,ocaml5.3-result)))))
|
||||
|
||||
(define-public ocaml-migrate-parsetree
|
||||
(package
|
||||
(name "ocaml-migrate-parsetree")
|
||||
@@ -2405,7 +2440,8 @@ bitsrings in Erlang style as primitives to the language.")))
|
||||
(arguments
|
||||
`(#:dune ,dune-bootstrap))
|
||||
(properties `((ocaml4.09-variant . ,(delay ocaml4.09-result))
|
||||
(ocaml5.0-variant . ,(delay ocaml5.0-result))))
|
||||
(ocaml5.0-variant . ,(delay ocaml5.0-result))
|
||||
(ocaml5.3-variant . ,(delay ocaml5.3-result))))
|
||||
(home-page "https://github.com/janestreet/result")
|
||||
(synopsis "Compatibility Result module")
|
||||
(description "Uses the new result type defined in OCaml >= 4.03 while
|
||||
@@ -2431,6 +2467,15 @@ defined in this library.")
|
||||
#:ocaml ,ocaml-5.0
|
||||
#:findlib ,ocaml5.0-findlib))))
|
||||
|
||||
(define-public ocaml5.3-result
|
||||
(package
|
||||
(inherit ocaml-result)
|
||||
(name "ocaml5.3-result")
|
||||
(arguments
|
||||
`(#:dune ,ocaml5.3-dune-bootstrap
|
||||
#:ocaml ,ocaml-5.3
|
||||
#:findlib ,ocaml5.3-findlib))))
|
||||
|
||||
(define-public ocaml-iso8601
|
||||
(package
|
||||
(name "ocaml-iso8601")
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
|
||||
;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
|
||||
;;; Copyright © 2021-2022 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2025 Jason Conroy <jconroy@tscripta.net>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
@@ -33,6 +34,8 @@
|
||||
strip-ocaml4.09-variant
|
||||
package-with-ocaml5.0
|
||||
strip-ocaml5.0-variant
|
||||
package-with-ocaml5.3
|
||||
strip-ocaml5.3-variant
|
||||
default-findlib
|
||||
default-ocaml
|
||||
lower
|
||||
@@ -106,6 +109,15 @@
|
||||
(define (default-ocaml5.0-dune)
|
||||
(@* (gnu packages ocaml) ocaml5.0-dune))
|
||||
|
||||
(define (default-ocaml5.3)
|
||||
(@* (gnu packages ocaml) ocaml-5.3))
|
||||
|
||||
(define (default-ocaml5.3-findlib)
|
||||
(@* (gnu packages ocaml) ocaml5.3-findlib))
|
||||
|
||||
(define (default-ocaml5.3-dune)
|
||||
(@* (gnu packages ocaml) ocaml5.3-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
|
||||
@@ -207,6 +219,19 @@ pre-defined variants."
|
||||
(inherit p)
|
||||
(properties (alist-delete 'ocaml5.0-variant (package-properties p)))))
|
||||
|
||||
(define package-with-ocaml5.3
|
||||
(package-with-explicit-ocaml (delay (default-ocaml5.3))
|
||||
(delay (default-ocaml5.3-findlib))
|
||||
(delay (default-ocaml5.3-dune))
|
||||
"ocaml-" "ocaml5.3-"
|
||||
#:variant-property 'ocaml5.3-variant))
|
||||
|
||||
(define (strip-ocaml5.3-variant p)
|
||||
"Remove the 'ocaml5.3-variant' property from P."
|
||||
(package
|
||||
(inherit p)
|
||||
(properties (alist-delete 'ocaml5.3-variant (package-properties p)))))
|
||||
|
||||
(define* (lower name
|
||||
#:key source inputs native-inputs outputs system target
|
||||
(ocaml (default-ocaml))
|
||||
|
||||
Reference in New Issue
Block a user