guix: ocaml: Reuse package-with-ocaml4.01 with ocaml-4.07.
* guix/build-system/guix.scm (package-with-ocaml4.01) (strip-ocaml4.01-variant): Rename to... (package-with-ocaml4.07, strip-ocaml4.07-variant): ... this and rename internal implementation.master
parent
6c89e06626
commit
092f815799
|
@ -27,8 +27,8 @@
|
||||||
#:use-module (ice-9 match)
|
#:use-module (ice-9 match)
|
||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
#:export (%ocaml-build-system-modules
|
#:export (%ocaml-build-system-modules
|
||||||
package-with-ocaml4.01
|
package-with-ocaml4.07
|
||||||
strip-ocaml4.01-variant
|
strip-ocaml4.07-variant
|
||||||
default-findlib
|
default-findlib
|
||||||
default-ocaml
|
default-ocaml
|
||||||
lower
|
lower
|
||||||
|
@ -84,13 +84,13 @@
|
||||||
(let ((module (resolve-interface '(guix build-system dune))))
|
(let ((module (resolve-interface '(guix build-system dune))))
|
||||||
(module-ref module 'dune-build-system)))
|
(module-ref module 'dune-build-system)))
|
||||||
|
|
||||||
(define (default-ocaml4.01)
|
(define (default-ocaml4.07)
|
||||||
(let ((ocaml (resolve-interface '(gnu packages ocaml))))
|
(let ((ocaml (resolve-interface '(gnu packages ocaml))))
|
||||||
(module-ref ocaml 'ocaml-4.01)))
|
(module-ref ocaml 'ocaml-4.07)))
|
||||||
|
|
||||||
(define (default-ocaml4.01-findlib)
|
(define (default-ocaml4.07-findlib)
|
||||||
(let ((module (resolve-interface '(gnu packages ocaml))))
|
(let ((module (resolve-interface '(gnu packages ocaml))))
|
||||||
(module-ref module 'ocaml4.01-findlib)))
|
(module-ref module 'ocaml4.07-findlib)))
|
||||||
|
|
||||||
(define* (package-with-explicit-ocaml ocaml findlib old-prefix new-prefix
|
(define* (package-with-explicit-ocaml ocaml findlib old-prefix new-prefix
|
||||||
#:key variant-property)
|
#:key variant-property)
|
||||||
|
@ -145,17 +145,17 @@ pre-defined variants."
|
||||||
|
|
||||||
(package-mapping transform cut?))
|
(package-mapping transform cut?))
|
||||||
|
|
||||||
(define package-with-ocaml4.01
|
(define package-with-ocaml4.07
|
||||||
(package-with-explicit-ocaml (delay (default-ocaml4.01))
|
(package-with-explicit-ocaml (delay (default-ocaml4.07))
|
||||||
(delay (default-ocaml4.01-findlib))
|
(delay (default-ocaml4.07-findlib))
|
||||||
"ocaml-" "ocaml4.01-"
|
"ocaml-" "ocaml4.07-"
|
||||||
#:variant-property 'ocaml4.01-variant))
|
#:variant-property 'ocaml4.07-variant))
|
||||||
|
|
||||||
(define (strip-ocaml4.01-variant p)
|
(define (strip-ocaml4.07-variant p)
|
||||||
"Remove the 'ocaml4.01-variant' property from P."
|
"Remove the 'ocaml4.07-variant' property from P."
|
||||||
(package
|
(package
|
||||||
(inherit p)
|
(inherit p)
|
||||||
(properties (alist-delete 'ocaml4.01-variant (package-properties p)))))
|
(properties (alist-delete 'ocaml4.07-variant (package-properties p)))))
|
||||||
|
|
||||||
(define* (lower name
|
(define* (lower name
|
||||||
#:key source inputs native-inputs outputs system target
|
#:key source inputs native-inputs outputs system target
|
||||||
|
|
Reference in New Issue