Skip to content
Snippets Groups Projects
Commit a482cfdc authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

gexp: Remove special meaning of forms (PACKAGE OUTPUT) in ungexp.

* guix/gexp.scm (gexp-inputs)[add-reference-inputs]: Remove clause for
  inputs of the form (PACKAGE OUTPUT).
  (gexp->sexp)[reference->sexp]: Likewise.
* tests/gexp.scm ("input list splicing"): Change 'list' to 'gexp-input'
  for glibc:debug.
  ("text-file*"): Likewise for %bootstrap-guile:out.
  ("input list splicing + gexp-input + ungexp-native-splicing"): Remove,
  now redundant.
parent b4a4bec0
No related branches found
No related tags found
No related merge requests found
...@@ -312,10 +312,6 @@ (define (add-reference-inputs ref result) ...@@ -312,10 +312,6 @@ (define (add-reference-inputs ref result)
(if (direct-store-path? str) (if (direct-store-path? str)
(cons `(,str) result) (cons `(,str) result)
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?) (($ <gexp-input> (lst ...) output native?)
(fold-right add-reference-inputs result (fold-right add-reference-inputs result
;; XXX: For now, automatically convert LST to a list of ;; XXX: For now, automatically convert LST to a list of
...@@ -373,13 +369,6 @@ (define* (reference->sexp ref #:optional native?) ...@@ -373,13 +369,6 @@ (define* (reference->sexp ref #:optional native?)
#:output output #:output output
#:system system #:system system
#:target (if (or n? native?) #f target))) #: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) (($ <gexp-input> (? origin? o) output)
(mlet %store-monad ((drv (origin->derivation o))) (mlet %store-monad ((drv (origin->derivation o)))
(return (derivation->output-path drv output)))) (return (derivation->output-path drv output))))
......
...@@ -196,7 +196,7 @@ (define (match-input thing) ...@@ -196,7 +196,7 @@ (define (match-input thing)
(gexp->sexp* exp target))))) (gexp->sexp* exp target)))))
(test-assert "input list splicing" (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 (outputs (list (derivation->output-path
(package-derivation %store glibc) (package-derivation %store glibc)
"debug") "debug")
...@@ -210,16 +210,6 @@ (define (match-input thing) ...@@ -210,16 +210,6 @@ (define (match-input thing)
`(list ,@(cons 5 outputs)))))) `(list ,@(cons 5 outputs))))))
(test-assert "input list splicing + ungexp-native-splicing" (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)) (let* ((inputs (list (gexp-input glibc "debug") %bootstrap-guile))
(exp (gexp (list (ungexp-native-splicing (cons (+ 2 3) inputs)))))) (exp (gexp (list (ungexp-native-splicing (cons (+ 2 3) inputs))))))
(and (lset= equal? (and (lset= equal?
...@@ -553,7 +543,7 @@ (define shebang ...@@ -553,7 +543,7 @@ (define shebang
(file (text-file "bar" "This is bar.")) (file (text-file "bar" "This is bar."))
(text (text-file* "foo" (text (text-file* "foo"
%bootstrap-guile "/bin/guile " %bootstrap-guile "/bin/guile "
`(,%bootstrap-guile "out") "/bin/guile " (gexp-input %bootstrap-guile "out") "/bin/guile "
drv "/bin/guile " drv "/bin/guile "
file)) file))
(done (built-derivations (list text))) (done (built-derivations (list text)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment