summaryrefslogtreecommitdiff
path: root/guix/derivations.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-07-10 18:39:25 +0200
committerLudovic Courtès <ludo@gnu.org>2019-07-15 10:01:05 +0200
commitb9373e262730578ba6c3805ffe44900f10bc655c (patch)
treec232d2f55b3afe50f415e386dd13ea44a65b4348 /guix/derivations.scm
parent93c2a0073945e8c3967cdb0e250d3341f7dcac71 (diff)
gexp: 'lowered-gexp-guile' now returns a <derivation-input>.
* guix/derivations.scm (derivation-input-output-path): New procedure. * guix/gexp.scm (lower-gexp): Wrap GUILE in a <derivation-input>. (gexp->derivation): Adjust accordingly. * guix/remote.scm (remote-pipe-for-gexp, remote-eval): Adjust accordingly. * tests/gexp.scm ("lower-gexp"): Adjust accordingly.
Diffstat (limited to 'guix/derivations.scm')
-rw-r--r--guix/derivations.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/guix/derivations.scm b/guix/derivations.scm
index 23d058e832..92d50503ce 100644
--- a/guix/derivations.scm
+++ b/guix/derivations.scm
@@ -71,6 +71,7 @@
derivation-input-derivation
derivation-input-sub-derivations
derivation-input-output-paths
+ derivation-input-output-path
valid-derivation-input?
&derivation-error
@@ -221,6 +222,13 @@ download with a fixed hash (aka. `fetchurl')."
(map (cut derivation->output-path drv <>)
sub-drvs))))
+(define (derivation-input-output-path input)
+ "Return the output file name of INPUT. If INPUT has more than one outputs,
+an error is raised."
+ (match input
+ (($ <derivation-input> drv (output))
+ (derivation->output-path drv output))))
+
(define (valid-derivation-input? store input)
"Return true if INPUT is valid--i.e., if all the outputs it requests are in
the store."