gnu: `expression->derivation-in-linux-vm' accepts files as inputs.

* gnu/system/vm.scm (expression->derivation-in-linux-vm): Accept items
  in INPUTS that refer to a file instead of a package.
master
Ludovic Courtès 2013-08-31 22:56:16 +02:00
parent ca85d7bcc6
commit 4c0f0673b2
1 changed files with 10 additions and 5 deletions

View File

@ -70,10 +70,12 @@ pairs, as for `derivation'. The files containing the reference graphs are
made available under the /xchg CIFS share."
(define input-alist
(map (match-lambda
((input package)
((input (? package? package))
`(,input . ,(package-output store package "out" system)))
((input package sub-drv)
`(,input . ,(package-output store package sub-drv system))))
((input (? package? package) sub-drv)
`(,input . ,(package-output store package sub-drv system)))
((input (and (? string?) (? store-path?) file))
`(,input . ,file)))
inputs))
(define exp*
@ -153,9 +155,12 @@ made available under the /xchg CIFS share."
("coreutils" ,(->drv coreutils))
("builder" ,user-builder)
,@(map (match-lambda
((name package sub-drv ...)
((name (? package? package)
sub-drv ...)
`(,name ,(->drv package)
,@sub-drv)))
,@sub-drv))
((name (? string? file))
`(,name ,file)))
inputs))
#:env-vars env-vars
#:modules (delete-duplicates