summaryrefslogtreecommitdiff
path: root/guix/gexp.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-03-21 23:21:53 +0100
committerLudovic Courtès <ludo@gnu.org>2015-03-22 23:18:30 +0100
commitaccb682c5027cb91104cce7786f9dc4403adf51c (patch)
tree0277201fce300fd518ff6fe6e6d8612fa6e203df /guix/gexp.scm
parent2924f0d6ce180a9d09eab994efb6a60c61fab3fd (diff)
downloadguix-patches-accb682c5027cb91104cce7786f9dc4403adf51c.tar
guix-patches-accb682c5027cb91104cce7786f9dc4403adf51c.tar.gz
gexp: Allow <gexp-input> objects in #:allowed-references.
* guix/gexp.scm (lower-references): Add <gexp-input> case. * tests/gexp.scm ("gexp->derivation #:allowed-references, specific output"): New test.
Diffstat (limited to 'guix/gexp.scm')
-rw-r--r--guix/gexp.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/guix/gexp.scm b/guix/gexp.scm
index 4a2a924a03..218914c4b4 100644
--- a/guix/gexp.scm
+++ b/guix/gexp.scm
@@ -201,6 +201,11 @@ names and file names suitable for the #:allowed-references argument to
(match-lambda
((? string? output)
(return output))
+ (($ <gexp-input> thing output native?)
+ (mlet* %store-monad ((lower -> (lookup-compiler thing))
+ (drv (lower thing system
+ (if native? #f target))))
+ (return (derivation->output-path drv output))))
(thing
(mlet* %store-monad ((lower -> (lookup-compiler thing))
(drv (lower thing system target)))