From 11a454f9dae84cc00b977d164dae764454ecb11d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 13 Nov 2023 17:43:29 +0100 Subject: gexp: #:references-graphs accepts and honors records. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 Change-Id: I595cb75da0867ab8ab44552887dc06ed1d23315e --- guix/gexp.scm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'guix/gexp.scm') 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 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 -- cgit v1.2.3