summary refs log tree commit diff
diff options
context:
space:
mode:
authorArun Isaac2024-09-03 13:57:04 +0100
committerArun Isaac2024-09-03 13:57:04 +0100
commitafa7b4a4ab3e32bed17fcbf780cccd309d3cb05f (patch)
tree1a06f65e8358c0307ac55bc6eb67df5a403b9ffc
parentf74268f9de112a5f6c82c8f2a00aeb17670890ee (diff)
downloadravanan-afa7b4a4ab3e32bed17fcbf780cccd309d3cb05f.tar.gz
ravanan-afa7b4a4ab3e32bed17fcbf780cccd309d3cb05f.tar.lz
ravanan-afa7b4a4ab3e32bed17fcbf780cccd309d3cb05f.zip
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.
-rw-r--r--ravanan/command-line-tool.scm10
1 files 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