diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-06-15 10:38:46 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-06-15 15:26:30 +0200 |
commit | da675305ddf2ba574e309e515d18ae1f778297be (patch) | |
tree | 3ba9f81530c70b315a9235861e27e19ddb0ad97e /guix/packages.scm | |
parent | 789510640d8ac30298c45d0edc80ec9078aa3afd (diff) | |
download | gnu-guix-da675305ddf2ba574e309e515d18ae1f778297be.tar gnu-guix-da675305ddf2ba574e309e515d18ae1f778297be.tar.gz |
packages: The 'source' can be any lowerable object.
* guix/packages.scm (expand-input): Use 'struct?' instead of 'origin?'
when matching SOURCE.
(package-source-derivation): Use 'lower-object' instead of
'origin->derivation'.
* tests/packages.scm ("package-source-derivation, local-file"): New
test.
* doc/guix.texi (package Reference): Update 'source' documentation
accordingly.
Diffstat (limited to 'guix/packages.scm')
-rw-r--r-- | guix/packages.scm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/guix/packages.scm b/guix/packages.scm index 1e816179a6..05a632cf05 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -792,7 +792,7 @@ information in exceptions." ;; store path, it needs to be added anyway, so it can be used as a ;; source. (list name (intern file))) - (((? string? name) (? origin? source)) + (((? string? name) (? struct? source)) (list name (package-source-derivation store source system))) (x (raise (condition (&package-input-error @@ -1161,12 +1161,12 @@ cross-compilation target triplet." (origin->derivation origin system)) (define package-source-derivation ;somewhat deprecated - (let ((lower (store-lower origin->derivation))) + (let ((lower (store-lower lower-object))) (lambda* (store source #:optional (system (%current-system))) "Return the derivation or file corresponding to SOURCE, which can be an -<origin> or a file name. When SOURCE is a file name, return either the -interned file name (if SOURCE is outside of the store) or SOURCE itself (if -SOURCE is already a store item.)" +a file name or any object handled by 'lower-object', such as an <origin>. +When SOURCE is a file name, return either the interned file name (if SOURCE is +outside of the store) or SOURCE itself (if SOURCE is already a store item.)" (match source ((and (? string?) (? direct-store-path?) file) file) |