aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix/gexp.scm20
-rw-r--r--tests/gexp.scm8
2 files changed, 19 insertions, 9 deletions
diff --git a/guix/gexp.scm b/guix/gexp.scm
index d9c4cb461e..2094c495d6 100644
--- a/guix/gexp.scm
+++ b/guix/gexp.scm
@@ -706,15 +706,17 @@ references; otherwise, return only non-native references."
(cons `(,thing ,output) result)
result))
(($ <gexp-input> (lst ...) output n?)
- (if (eqv? native? n?)
- (fold-right add-reference-inputs result
- ;; XXX: For now, automatically convert LST to a list of
- ;; gexp-inputs.
- (map (match-lambda
- ((? gexp-input? x) x)
- (x (%gexp-input x "out" (or n? native?))))
- lst))
- result))
+ (fold-right add-reference-inputs result
+ ;; XXX: For now, automatically convert LST to a list of
+ ;; gexp-inputs. Inherit N?.
+ (map (match-lambda
+ ((? gexp-input? x)
+ (%gexp-input (gexp-input-thing x)
+ (gexp-input-output x)
+ n?))
+ (x
+ (%gexp-input x "out" n?)))
+ lst)))
(_
;; Ignore references to other kinds of objects.
result)))
diff --git a/tests/gexp.scm b/tests/gexp.scm
index cf88a9db80..5873abdd41 100644
--- a/tests/gexp.scm
+++ b/tests/gexp.scm
@@ -355,6 +355,14 @@
(equal? (gexp->sexp* exp) ;native
(gexp->sexp* exp "mips64el-linux")))))
+(test-assert "gexp list splicing + ungexp-splicing"
+ (let* ((inner (gexp (ungexp-native glibc)))
+ (exp (gexp (list (ungexp-splicing (list inner))))))
+ (and (equal? `((,glibc "out")) (gexp-native-inputs exp))
+ (null? (gexp-inputs exp))
+ (equal? (gexp->sexp* exp) ;native
+ (gexp->sexp* exp "mips64el-linux")))))
+
(test-equal "output list"
2
(let ((exp (gexp (begin (mkdir (ungexp output))