aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix/packages.scm12
-rw-r--r--tests/packages.scm2
2 files changed, 3 insertions, 11 deletions
diff --git a/guix/packages.scm b/guix/packages.scm
index 3d5c7fd64a..2b6a1fabb6 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -1213,13 +1213,10 @@ Return the cached result when available."
(define* (expand-input package input #:key native?)
"Expand INPUT, an input tuple, to a name/<gexp-input> tuple. PACKAGE is
only used to provide contextual information in exceptions."
- (define (valid? x)
- (or (package? x) (origin? x) (derivation? x)))
-
(match input
- (((? string? name) (? valid? thing))
+ (((? string? name) (? file-like? thing))
(list name (gexp-input thing #:native? native?)))
- (((? string? name) (? valid? thing) (? string? output))
+ (((? string? name) (? file-like? thing) (? string? output))
(list name (gexp-input thing output #:native? native?)))
(((? string? name)
(and (? string?) (? file-exists? file)))
@@ -1228,11 +1225,6 @@ only used to provide contextual information in exceptions."
;; source.
(list name (gexp-input (local-file file #:recursive? #t)
#:native? native?)))
- (((? string? name) (? struct? source))
- ;; 'package-source-derivation' calls 'lower-object', which can throw
- ;; '&gexp-input-error'. However '&gexp-input-error' lacks source
- ;; location info, so we used to catch and rethrow here (FIXME!).
- (list name (gexp-input source)))
(x
(raise (condition (&package-input-error
(package package)
diff --git a/tests/packages.scm b/tests/packages.scm
index f68b078b55..97c4c17e6e 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -744,7 +744,7 @@
(let ((dummy (dummy-package "foo" (inputs `(("x" ,(current-module)))))))
(test-equal "&package-input-error"
- (list dummy (current-module))
+ (list dummy `("x" ,(current-module)))
(guard (c ((package-input-error? c)
(list (package-error-package c)
(package-error-invalid-input c))))