From 0b359cf2c32cde81b4311d55273c8f6c14ca6b93 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 2 Nov 2021 01:17:41 +0530 Subject: ccwl: Support external CWL workflows. * ccwl/ccwl.scm: Import (yaml). Export cwl-workflow?, cwl-workflow, cwl-workflow-file, cwl-workflow-inputs and cwl-workflow-outputs. (): New type. (cwl-workflow, function-input-keys, function-outputs, function-object): New functions. (command-input-keys, command-object): Delete functions. (collect-steps): Replace command-object with function-object, command-input-keys with function-input-keys and command-outputs with function-outputs. * ccwl/cwl.scm (workflow->cwl-scm): Handle objects. * tests/ccwl.scm ("read all forms of inputs and outputs from a CWL workflow"): New test. * guix.scm: Import (gnu packages guile-xyz) and (guix utils). (guile-libyaml): New variable. (ccwl)[inputs]: Add guile-libyaml. --- guix.scm | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'guix.scm') diff --git a/guix.scm b/guix.scm index 9339da0..78d7c41 100644 --- a/guix.scm +++ b/guix.scm @@ -31,6 +31,7 @@ (gnu packages bioinformatics) (gnu packages graphviz) (gnu packages guile) + ((gnu packages guile-xyz) #:prefix guix:) (gnu packages pkg-config) (gnu packages skribilo) (gnu packages texinfo) @@ -38,10 +39,32 @@ (guix gexp) (guix git-download) (guix packages) - ((guix licenses) #:prefix license:)) + ((guix licenses) #:prefix license:) + (guix utils)) (define %source-dir (dirname (current-filename))) +;; The upstream Guix guile-libyaml package is broken. Fix it +;; temporarily here. +(define guile-libyaml + (package + (inherit guix:guile-libyaml) + (arguments + (substitute-keyword-arguments (package-arguments guix:guile-libyaml) + ((#:phases phases) + `(modify-phases ,phases + (replace 'remove-unused-files + (lambda _ + (for-each delete-file + (list "guix.scm" "demo1.scm" "demo1.yml")))) + (replace 'build-ffi + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "yaml/libyaml.scm" + (("dynamic-link \"libyaml\"") + (string-append "dynamic-link \"" + (assoc-ref inputs "libyaml") + "/lib/libyaml\""))))))))))) + (define ccwl (package (name "ccwl") @@ -53,7 +76,8 @@ (arguments '(#:make-flags '("GUILE_AUTO_COMPILE=0"))) ; to prevent guild warnings (inputs - `(("guile" ,guile-3.0))) + `(("guile" ,guile-3.0) + ("guile-libyaml" ,guile-libyaml))) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) -- cgit v1.2.3