mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-19 05:57:04 +01:00
guix: ocaml: Add package-with-ocaml4.09.
* guix/build-system/ocaml.scm (package-with-ocaml4.09) (strip-ocaml4.09-variant): New variables. * gnu/packages/ocaml.scm (ocaml4.09-result, ocaml4.09-csexp) (ocaml4.09-dune-configurator, ocaml4.09-dune): New variables.
This commit is contained in:
parent
35c02c559e
commit
6ed2741a35
2 changed files with 76 additions and 1 deletions
|
@ -1315,6 +1315,9 @@ (define dune-bootstrap
|
|||
following a very simple s-expression syntax.")
|
||||
(license license:expat)))
|
||||
|
||||
(define ocaml4.09-dune-bootstrap
|
||||
(package-with-ocaml4.09 dune-bootstrap))
|
||||
|
||||
(define-public dune-configurator
|
||||
(package
|
||||
(inherit dune-bootstrap)
|
||||
|
@ -1327,6 +1330,7 @@ (define-public dune-configurator
|
|||
#:tests? #f))
|
||||
(propagated-inputs
|
||||
`(("ocaml-csexp" ,ocaml-csexp)))
|
||||
(properties `((ocaml4.09-variant . ,(delay ocaml4.09-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
|
||||
|
@ -1339,12 +1343,32 @@ (define-public dune-configurator
|
|||
@item generate config.h file
|
||||
@end itemize")))
|
||||
|
||||
(define-public ocaml4.09-dune-configurator
|
||||
(package
|
||||
(inherit dune-configurator)
|
||||
(name "ocaml4.09-dune-configurator")
|
||||
(arguments
|
||||
`(#:package "dune-configurator"
|
||||
#:tests? #f
|
||||
#:dune ,ocaml4.09-dune-bootstrap
|
||||
#:ocaml ,ocaml-4.09
|
||||
#:findlib ,ocaml4.09-findlib))
|
||||
(propagated-inputs
|
||||
`(("ocaml-csexp" ,ocaml4.09-csexp)))))
|
||||
|
||||
(define-public dune
|
||||
(package
|
||||
(inherit dune-bootstrap)
|
||||
(propagated-inputs
|
||||
`(("dune-configurator" ,dune-configurator)))
|
||||
(properties `((ocaml4.07-variant . ,(delay ocaml4.07-dune))))))
|
||||
(properties `((ocaml4.07-variant . ,(delay ocaml4.07-dune))
|
||||
(ocaml4.09-variant . ,(delay ocaml4.09-dune))))))
|
||||
|
||||
(define-public ocaml4.09-dune
|
||||
(package
|
||||
(inherit ocaml4.09-dune-bootstrap)
|
||||
(propagated-inputs
|
||||
`(("dune-configurator" ,dune-configurator)))))
|
||||
|
||||
(define-public ocaml4.07-dune
|
||||
(package
|
||||
|
@ -1385,6 +1409,7 @@ (define-public ocaml-csexp
|
|||
#t)))))
|
||||
(propagated-inputs
|
||||
`(("ocaml-result" ,ocaml-result)))
|
||||
(properties `((ocaml4.09-variant . ,(delay ocaml4.09-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
|
||||
|
@ -1401,6 +1426,18 @@ (define-public ocaml-csexp
|
|||
module of this library is parameterised by the type of S-expressions.")
|
||||
(license license:expat)))
|
||||
|
||||
(define-public ocaml4.09-csexp
|
||||
(package
|
||||
(inherit ocaml-csexp)
|
||||
(name "ocaml4.09-csexp")
|
||||
(arguments
|
||||
`(#:ocaml ,ocaml-4.09
|
||||
#:findlib ,ocaml4.09-findlib
|
||||
,@(substitute-keyword-arguments (package-arguments ocaml-csexp)
|
||||
((#:dune _) ocaml4.09-dune-bootstrap))))
|
||||
(propagated-inputs
|
||||
`(("ocaml-result" ,ocaml4.09-result)))))
|
||||
|
||||
(define-public ocaml-migrate-parsetree
|
||||
(package
|
||||
(name "ocaml-migrate-parsetree")
|
||||
|
@ -1509,12 +1546,23 @@ (define-public ocaml-result
|
|||
(arguments
|
||||
`(#:test-target "."
|
||||
#:dune ,dune-bootstrap))
|
||||
(properties `((ocaml4.09-variant . ,(delay ocaml4.09-result))))
|
||||
(home-page "https://github.com/janestreet/result")
|
||||
(synopsis "Compatibility Result module")
|
||||
(description "Uses the new result type defined in OCaml >= 4.03 while
|
||||
staying compatible with older version of OCaml should use the Result module
|
||||
defined in this library.")
|
||||
(license license:bsd-3)))
|
||||
|
||||
(define-public ocaml4.09-result
|
||||
(package
|
||||
(inherit ocaml-result)
|
||||
(name "ocaml4.09-result")
|
||||
(arguments
|
||||
`(#:test-target "."
|
||||
#:dune ,ocaml4.09-dune-bootstrap
|
||||
#:ocaml ,ocaml-4.09
|
||||
#:findlib ,ocaml4.09-findlib))))
|
||||
|
||||
(define-public ocaml-topkg
|
||||
(package
|
||||
|
|
|
@ -29,6 +29,8 @@ (define-module (guix build-system ocaml)
|
|||
#:export (%ocaml-build-system-modules
|
||||
package-with-ocaml4.07
|
||||
strip-ocaml4.07-variant
|
||||
package-with-ocaml4.09
|
||||
strip-ocaml4.09-variant
|
||||
default-findlib
|
||||
default-ocaml
|
||||
lower
|
||||
|
@ -96,6 +98,18 @@ (define (default-ocaml4.07-dune)
|
|||
(let ((module (resolve-interface '(gnu packages ocaml))))
|
||||
(module-ref module 'ocaml4.07-dune)))
|
||||
|
||||
(define (default-ocaml4.09)
|
||||
(let ((ocaml (resolve-interface '(gnu packages ocaml))))
|
||||
(module-ref ocaml 'ocaml-4.09)))
|
||||
|
||||
(define (default-ocaml4.09-findlib)
|
||||
(let ((module (resolve-interface '(gnu packages ocaml))))
|
||||
(module-ref module 'ocaml4.09-findlib)))
|
||||
|
||||
(define (default-ocaml4.09-dune)
|
||||
(let ((module (resolve-interface '(gnu packages ocaml))))
|
||||
(module-ref module 'ocaml4.09-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
|
||||
|
@ -171,6 +185,19 @@ (define (strip-ocaml4.07-variant p)
|
|||
(inherit p)
|
||||
(properties (alist-delete 'ocaml4.07-variant (package-properties p)))))
|
||||
|
||||
(define package-with-ocaml4.09
|
||||
(package-with-explicit-ocaml (delay (default-ocaml4.09))
|
||||
(delay (default-ocaml4.09-findlib))
|
||||
(delay (default-ocaml4.09-dune))
|
||||
"ocaml-" "ocaml4.09-"
|
||||
#:variant-property 'ocaml4.09-variant))
|
||||
|
||||
(define (strip-ocaml4.09-variant p)
|
||||
"Remove the 'ocaml4.09-variant' property from P."
|
||||
(package
|
||||
(inherit p)
|
||||
(properties (alist-delete 'ocaml4.09-variant (package-properties p)))))
|
||||
|
||||
(define* (lower name
|
||||
#:key source inputs native-inputs outputs system target
|
||||
(ocaml (default-ocaml))
|
||||
|
|
Loading…
Reference in a new issue