summary refs log tree commit diff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2022-12-31 14:26:17 +0100
committerRicardo Wurmus <rekado@elephly.net>2022-12-31 14:48:46 +0100
commit4d139260643106e0160cd5ecc224ce3942f7914c (patch)
tree4b6455d1ab4e857816e1c1bd3c88916938e0e880
parent973496100db29a6b23cf47fdabb28dd1b99da102 (diff)
downloadguix-4d139260643106e0160cd5ecc224ce3942f7914c.tar.gz
import/utils: recursive-import: Pass on lookup-node's version argument.
* guix/import/utils.scm (recursive-import)<lookup-node>: Replace the #:VERSION
keyword from RECURSIVE-IMPORT's arguments with the value of VERSION passed to
LOOKUP-NODE.
-rw-r--r--guix/import/utils.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 45e55f1df6..41311cb86e 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -599,7 +599,12 @@ to obtain the Guix package name corresponding to the upstream name."
     (not (null? (find-packages-by-name (guix-name name) version))))
 
   (define (lookup-node name version)
-    (let* ((package dependencies (apply repo->guix-package (cons name rest)))
+    (let* ((pre post (break (cut eq? #:version <>) rest))
+           (post* (match post
+                    ((#:version v . more) more)
+                    (_ post)))
+           (args (append pre (list #:version version) post*))
+           (package dependencies (apply repo->guix-package (cons* name args)))
            (normalized-deps (map (match-lambda
                                    ((name version) (list name version))
                                    (name (list name #f))) dependencies)))