summaryrefslogtreecommitdiff
path: root/guix/gexp.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2023-11-13 17:43:29 +0100
committerLudovic Courtès <ludo@gnu.org>2023-12-22 00:31:40 +0100
commit11a454f9dae84cc00b977d164dae764454ecb11d (patch)
treee08670e170f6fa5042791bc1a4eacfc24bd11c60 /guix/gexp.scm
parentd9190abbd20f15ea5b55abdd51e1376f05055850 (diff)
gexp: #:references-graphs accepts and honors <gexp-input> records.
* guix/gexp.scm (lower-reference-graphs)[tuple->gexp-input]: Add ‘gexp-input?’ case. (gexp->derivation): Update docstring. * doc/guix.texi (G-Expressions): Adjust accordingly. * tests/gexp.scm ("references-file, non-default output"): New test. Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Change-Id: I595cb75da0867ab8ab44552887dc06ed1d23315e
Diffstat (limited to 'guix/gexp.scm')
-rw-r--r--guix/gexp.scm12
1 files changed, 8 insertions, 4 deletions
diff --git a/guix/gexp.scm b/guix/gexp.scm
index a7f4256d24..29819878fa 100644
--- a/guix/gexp.scm
+++ b/guix/gexp.scm
@@ -934,6 +934,11 @@ When TARGET is true, use it as the cross-compilation target triplet."
corresponding <derivation-input> or store item."
(define tuple->gexp-input
(match-lambda
+ (((? gexp-input? input))
+ ;; This case lets users specify the output of interest more
+ ;; conveniently, for instance by passing (gexp-input hwloc "lib") to
+ ;; the 'references-file' procedure.
+ input)
((thing)
(%gexp-input thing "out" (not target)))
((thing output)
@@ -1152,10 +1157,9 @@ applicable.
When REFERENCES-GRAPHS is true, it must be a list of tuples of one of the
following forms:
- (FILE-NAME PACKAGE)
- (FILE-NAME PACKAGE OUTPUT)
- (FILE-NAME DERIVATION)
- (FILE-NAME DERIVATION OUTPUT)
+ (FILE-NAME OBJ)
+ (FILE-NAME OBJ OUTPUT)
+ (FILE-NAME GEXP-INPUT)
(FILE-NAME STORE-ITEM)
The right-hand-side of each element of REFERENCES-GRAPHS is automatically made