diff options
author | Arun Isaac | 2025-08-28 11:52:01 +0100 |
---|---|---|
committer | Arun Isaac | 2025-08-28 11:52:01 +0100 |
commit | 60aff8702e506c967c11012fed2603c739b12200 (patch) | |
tree | 49a555527f68aee7a24b7c778a7832b9a054b4ea | |
parent | 641f875054aca082ecbe83c99f08793d6a52c845 (diff) | |
download | ravanan-60aff8702e506c967c11012fed2603c739b12200.tar.gz ravanan-60aff8702e506c967c11012fed2603c739b12200.tar.lz ravanan-60aff8702e506c967c11012fed2603c739b12200.zip |
The generate-badges code should never have been deleted in 5e6596ac7decbe88c03314e543efe1922edce13f.
-rw-r--r-- | .guix/cwl-conformance.scm | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/.guix/cwl-conformance.scm b/.guix/cwl-conformance.scm index b0eb985..3e25c71 100644 --- a/.guix/cwl-conformance.scm +++ b/.guix/cwl-conformance.scm @@ -24,6 +24,8 @@ #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix packages) + #:use-module (guix profiles) + #:use-module (guix utils) #:use-module (ice-9 match) #:export (cwltest-suite-gexp)) @@ -78,4 +80,35 @@ "env_home_tmpdir_docker" "env_home_tmpdir_docker_no_return_code")))) +(define generate-badges-gexp + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils) + (ice-9 match)) + + (match (command-line) + ((_ cwltest-badgedir output-directory) + (set-path-environment-variable + "GUIX_PYTHONPATH" + '(#$(string-append "lib/python" + (version-major+minor (package-version python)) + "/site-packages")) + (list #$(profile + (content (packages->manifest + (list python python-pybadges)))))) + (invoke #$(file-append python "/bin/python3") + #$(local-file "../cwl-conformance/badgegen.py") + cwltest-badgedir + #$(local-file "../cwl-conformance/commonwl.svg") + output-directory)) + ((program _ ...) + (format (current-error-port) + "Usage: ~a CWLTEST_BADGEDIR OUTPUT-DIRECTORY~%" + program) + (exit #f)))))) + +(define-public generate-badges + (program-file "generate-badges" + generate-badges-gexp)) + cwl-v1.2-conformance |