diff options
author | Arun Isaac | 2024-09-11 18:11:11 +0100 |
---|---|---|
committer | Arun Isaac | 2024-09-11 18:26:29 +0100 |
commit | 81199d4eba1de4b9b39fcf929d06f310b6561920 (patch) | |
tree | 71f8e7ded29ad3e3be2d38f1847359bb7ea03896 | |
parent | 010336a80acfe2766acea1076ea29ebf8e42966b (diff) | |
download | ravanan-81199d4eba1de4b9b39fcf929d06f310b6561920.tar.gz ravanan-81199d4eba1de4b9b39fcf929d06f310b6561920.tar.lz ravanan-81199d4eba1de4b9b39fcf929d06f310b6561920.zip |
command-line-tool: Use coerce-expression with staging files.
*
ravanan/command-line-tool.scm (build-command-line-tool-script)[files-to-stage]:
Use coerce-expression.
Adapt calling expression.
-rw-r--r-- | ravanan/command-line-tool.scm | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/ravanan/command-line-tool.scm b/ravanan/command-line-tool.scm index 0021bcf..d55eb7d 100644 --- a/ravanan/command-line-tool.scm +++ b/ravanan/command-line-tool.scm @@ -663,15 +663,8 @@ named @var{name} with @var{inputs} using tools from Guix manifest (define (files-to-stage initial-work-dir-requirement) (vector-map->list (lambda (dirent) - (let ((entry-name (assoc-ref dirent "entryname"))) - (let stage ((entry (assoc-ref dirent "entry"))) - (cond - ((javascript-expression? entry) - (stage - (evaluate-javascript %node - (strip-javascript-expression entry)))) - ((string? entry) - (list entry-name entry)))))) + #~(list #$(coerce-expression (assoc-ref dirent "entryname")) + #$(coerce-expression (assoc-ref dirent "entry")))) (assoc-ref initial-work-dir-requirement "listing"))) @@ -908,12 +901,12 @@ named @var{name} with @var{inputs} using tools from Guix manifest ((entry-name entry) (call-with-input-file entry-name (cut put-string <> entry)))) - '#$(from-maybe - (maybe-bind - (find-requirement requirements - "InitialWorkDirRequirement") - (compose just files-to-stage)) - (list))) + (list #$@(from-maybe + (maybe-bind + (find-requirement requirements + "InitialWorkDirRequirement") + (compose just files-to-stage)) + (list)))) ;; Actually run the command. #$run-command-gexp ;; Capture outputs. |