diff options
author | Marius Bakke <mbakke@fastmail.com> | 2018-11-20 01:14:12 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2018-11-20 01:14:12 +0100 |
commit | 4f70db97a040b35f125484ce8885766ca5807dd4 (patch) | |
tree | 30274f4a57e4a149127125fb6df626dd1d9f9cf0 /guix/build-system/ocaml.scm | |
parent | 2d546858b139e5fcf2cbdf9958a17fd98803ac4c (diff) | |
parent | 9acfe275adf1bc27483ba58c6d86a84ba20aa08f (diff) | |
download | guix-patches-4f70db97a040b35f125484ce8885766ca5807dd4.tar guix-patches-4f70db97a040b35f125484ce8885766ca5807dd4.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/build-system/ocaml.scm')
-rw-r--r-- | guix/build-system/ocaml.scm | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/guix/build-system/ocaml.scm b/guix/build-system/ocaml.scm index 34a22ecffa..e5b715f55d 100644 --- a/guix/build-system/ocaml.scm +++ b/guix/build-system/ocaml.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu> +;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu> ;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com> ;;; ;;; This file is part of GNU Guix. @@ -28,7 +28,9 @@ #:use-module (srfi srfi-1) #:export (%ocaml-build-system-modules package-with-ocaml4.01 + package-with-ocaml4.02 strip-ocaml4.01-variant + strip-ocaml4.02-variant ocaml-build ocaml-build-system)) @@ -82,6 +84,14 @@ (let ((module (resolve-interface '(gnu packages ocaml)))) (module-ref module 'ocaml4.01-findlib))) +(define (default-ocaml4.02) + (let ((ocaml (resolve-interface '(gnu packages ocaml)))) + (module-ref ocaml 'ocaml-4.02))) + +(define (default-ocaml4.02-findlib) + (let ((module (resolve-interface '(gnu packages ocaml)))) + (module-ref module 'ocaml4.02-findlib))) + (define* (package-with-explicit-ocaml ocaml findlib old-prefix new-prefix #:key variant-property) "Return a procedure of one argument, P. The procedure creates a package @@ -139,12 +149,24 @@ pre-defined variants." "ocaml-" "ocaml4.01-" #:variant-property 'ocaml4.01-variant)) +(define package-with-ocaml4.02 + (package-with-explicit-ocaml (delay (default-ocaml4.02)) + (delay (default-ocaml4.02-findlib)) + "ocaml-" "ocaml4.02-" + #:variant-property 'ocaml4.02-variant)) + (define (strip-ocaml4.01-variant p) "Remove the 'ocaml4.01-variant' property from P." (package (inherit p) (properties (alist-delete 'ocaml4.01-variant (package-properties p))))) +(define (strip-ocaml4.02-variant p) + "Remove the 'ocaml4.02-variant' property from P." + (package + (inherit p) + (properties (alist-delete 'ocaml4.02-variant (package-properties p))))) + (define* (lower name #:key source inputs native-inputs outputs system target (ocaml (default-ocaml)) |