summaryrefslogtreecommitdiff
path: root/guix/build-system/ocaml.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-12-20 18:39:04 +0100
committerLudovic Courtès <ludo@gnu.org>2018-12-20 18:39:04 +0100
commit86974d8a9247cbeb938b5202f23ccca8d9ed627d (patch)
tree7bd498ccf672aced617aa24a830ec4164268c03f /guix/build-system/ocaml.scm
parent03a45a40227d97ccafeb49c4eb0fc7539f4d2127 (diff)
parent9012d226fa46229a84e49a42c9b6d287105dfddf (diff)
downloadguix-patches-86974d8a9247cbeb938b5202f23ccca8d9ed627d.tar
guix-patches-86974d8a9247cbeb938b5202f23ccca8d9ed627d.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/build-system/ocaml.scm')
-rw-r--r--guix/build-system/ocaml.scm16
1 files changed, 14 insertions, 2 deletions
diff --git a/guix/build-system/ocaml.scm b/guix/build-system/ocaml.scm
index e5b715f55d..07c69fac76 100644
--- a/guix/build-system/ocaml.scm
+++ b/guix/build-system/ocaml.scm
@@ -31,6 +31,9 @@
package-with-ocaml4.02
strip-ocaml4.01-variant
strip-ocaml4.02-variant
+ default-findlib
+ default-ocaml
+ lower
ocaml-build
ocaml-build-system))
@@ -76,6 +79,13 @@
(let ((module (resolve-interface '(gnu packages ocaml))))
(module-ref module 'ocaml-findlib)))
+(define (default-dune-build-system)
+ "Return the dune-build-system."
+
+ ;; Do not use `@' to avoid introducing circular dependencies.
+ (let ((module (resolve-interface '(guix build-system dune))))
+ (module-ref module 'dune-build-system)))
+
(define (default-ocaml4.01)
(let ((ocaml (resolve-interface '(gnu packages ocaml))))
(module-ref ocaml 'ocaml-4.01)))
@@ -119,7 +129,8 @@ pre-defined variants."
=> force)
;; Otherwise build the new package object graph.
- ((eq? (package-build-system p) ocaml-build-system)
+ ((or (eq? (package-build-system p) ocaml-build-system)
+ (eq? (package-build-system p) (default-dune-build-system)))
(package
(inherit p)
(location (package-location p))
@@ -138,7 +149,8 @@ pre-defined variants."
(else p)))
(define (cut? p)
- (or (not (eq? (package-build-system p) ocaml-build-system))
+ (or (not (or (eq? (package-build-system p) ocaml-build-system)
+ (eq? (package-build-system p) (default-dune-build-system))))
(package-variant p)))
(package-mapping transform cut?))