(if (direct-store-path? str)
(cons `(,str) result)
result))
- (($ <gexp-input> ((? package? p) (? string? output)) _ native?)
- ;; XXX: For now, for backward-compatibility, automatically convert a
- ;; pair like this to an gexp-input for OUTPUT of P.
- (add-reference-inputs (gexp-input p output native?) result))
(($ <gexp-input> (lst ...) output native?)
(fold-right add-reference-inputs result
;; XXX: For now, automatically convert LST to a list of
#:output output
#:system system
#:target (if (or n? native?) #f target)))
- (($ <gexp-input> ((? package? p) (? string? output)) _ n?)
- ;; XXX: For backward compatibility, automatically interpret such a
- ;; pair.
- (package-file p
- #:output output
- #:system system
- #:target (if (or n? native?) #f target)))
(($ <gexp-input> (? origin? o) output)
(mlet %store-monad ((drv (origin->derivation o)))
(return (derivation->output-path drv output))))
(gexp->sexp* exp target)))))
(test-assert "input list splicing"
- (let* ((inputs (list (list glibc "debug") %bootstrap-guile))
+ (let* ((inputs (list (gexp-input glibc "debug") %bootstrap-guile))
(outputs (list (derivation->output-path
(package-derivation %store glibc)
"debug")
`(list ,@(cons 5 outputs))))))
(test-assert "input list splicing + ungexp-native-splicing"
- (let* ((inputs (list (list glibc "debug") %bootstrap-guile))
- (exp (gexp (list (ungexp-native-splicing (cons (+ 2 3) inputs))))))
- (and (lset= equal?
- `((,glibc "debug") (,%bootstrap-guile "out"))
- (gexp-native-inputs exp))
- (null? (gexp-inputs exp))
- (equal? (gexp->sexp* exp) ;native
- (gexp->sexp* exp "mips64el-linux")))))
-
-(test-assert "input list splicing + gexp-input + ungexp-native-splicing"
(let* ((inputs (list (gexp-input glibc "debug") %bootstrap-guile))
(exp (gexp (list (ungexp-native-splicing (cons (+ 2 3) inputs))))))
(and (lset= equal?
(file (text-file "bar" "This is bar."))
(text (text-file* "foo"
%bootstrap-guile "/bin/guile "
- `(,%bootstrap-guile "out") "/bin/guile "
+ (gexp-input %bootstrap-guile "out") "/bin/guile "
drv "/bin/guile "
file))
(done (built-derivations (list text)))