From afa7b4a4ab3e32bed17fcbf780cccd309d3cb05f Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 3 Sep 2024 13:57:04 +0100 Subject: command-line-tool: Pass workflow-output-directory to path->value. * ravanan/command-line-tool.scm (build-command-line-tool-script)[other-output->value]: Accept workflow-output-directory argument; pass it to path->value. [capture-outputs-gexp]: Pass workflow-output-directory to other-output->value. --- ravanan/command-line-tool.scm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ravanan/command-line-tool.scm b/ravanan/command-line-tool.scm index 4237600..078d148 100644 --- a/ravanan/command-line-tool.scm +++ b/ravanan/command-line-tool.scm @@ -750,7 +750,9 @@ named @var{name} with @var{inputs} using tools from Guix manifest stdout-directory <>) '#$stdout-outputs) - (map other-output->value + (map (cut other-output->value + workflow-output-directory + <...>) '#$(map (cut assoc-ref <> "id") other-outputs) '#$(map (cut assoc-ref <> "type") @@ -838,7 +840,8 @@ named @var{name} with @var{inputs} using tools from Guix manifest #$stdout-filename) workflow-output-directory))) - (define (other-output->value output-id output-type-tree glob-pattern) + (define (other-output->value workflow-output-directory + output-id output-type-tree glob-pattern) (cons output-id ;; TODO: Support all types. (let* ((output-type (formal-parameter-type output-type-tree)) @@ -849,7 +852,8 @@ named @var{name} with @var{inputs} using tools from Guix manifest output-type paths)) ;; Coerce output value into matched type. - (let ((output-values (map path->value paths))) + (let ((output-values (map (cut path->value <> workflow-output-directory) + paths))) (cond ((memq matched-type (list 'File 'Directory)) (match output-values -- cgit v1.2.3