summaryrefslogtreecommitdiff
path: root/guix/import/opam.scm
diff options
context:
space:
mode:
authorJulien Lepiller <julien@lepiller.eu>2019-11-27 23:38:36 +0100
committerJulien Lepiller <julien@lepiller.eu>2019-11-30 15:50:51 +0100
commitba3ff730caab25ffb5b1f2b90a7eccd2fffa2691 (patch)
treefe554d2d833491736b5b922fa34244a687c674fd /guix/import/opam.scm
parentc60d98d42d650f9b3d06a44efa8249cf598ac187 (diff)
guix: import: Fix importing dune project.
* guix/import/opam.scm: Detect dune projects from dependencies, then filter dune from dependencies.
Diffstat (limited to 'guix/import/opam.scm')
-rw-r--r--guix/import/opam.scm14
1 files changed, 7 insertions, 7 deletions
diff --git a/guix/import/opam.scm b/guix/import/opam.scm
index 7f5303f3e2..e258c4197f 100644
--- a/guix/import/opam.scm
+++ b/guix/import/opam.scm
@@ -249,10 +249,7 @@ path to the repository."
(url-dict (metadata-ref opam-content "url"))
(source-url (metadata-ref url-dict "src"))
(requirements (metadata-ref opam-content "depends"))
- (dependencies (filter
- (lambda (name)
- (not (member name '("dune" "jbuilder"))))
- (dependency-list->names requirements)))
+ (dependencies (dependency-list->names requirements))
(native-dependencies (depends->native-inputs requirements))
(inputs (dependency-list->inputs (depends->inputs requirements)))
(native-inputs (dependency-list->inputs
@@ -264,8 +261,8 @@ path to the repository."
native-dependencies))))
;; If one of these are required at build time, it means we
;; can use the much nicer dune-build-system.
- (let ((use-dune? (or (member "dune" native-dependencies)
- (member "jbuilder" native-dependencies))))
+ (let ((use-dune? (or (member "dune" (append dependencies native-dependencies))
+ (member "jbuilder" (append dependencies native-dependencies)))))
(call-with-temporary-output-file
(lambda (temp port)
(and (url-fetch source-url temp)
@@ -297,7 +294,10 @@ path to the repository."
(synopsis ,(metadata-ref opam-content "synopsis"))
(description ,(metadata-ref opam-content "description"))
(license #f))
- dependencies)))))))
+ (filter
+ (lambda (name)
+ (not (member name '("dune" "jbuilder"))))
+ dependencies))))))))
(define (opam-recursive-import package-name)
(recursive-import package-name #f