diff options
author | Sergey Trofimov <sarg@sarg.org.ru> | 2025-05-24 13:56:42 +0200 |
---|---|---|
committer | Hilton Chain <hako@ultrarare.space> | 2025-06-13 01:29:08 +0800 |
commit | 5516beb575f3cff3cba249b720b9294b13b64227 (patch) | |
tree | 44371bffd4bb6607d84f1d59530e354dfd24d99d | |
parent | 7be4267bd9037c8d8790bd840d35c539bdf192b7 (diff) |
nongnu: babashka: Add validate-classpath phase.
* nongnu/packages/clojure.scm (babashka): Validate babashka runs after
build.
Signed-off-by: Hilton Chain <hako@ultrarare.space>
-rw-r--r-- | nongnu/packages/clojure.scm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/nongnu/packages/clojure.scm b/nongnu/packages/clojure.scm index 84ce11ed..2f85f5a1 100644 --- a/nongnu/packages/clojure.scm +++ b/nongnu/packages/clojure.scm @@ -198,7 +198,17 @@ perform refactors and more.") (let ((clojure-tools #$(this-package-input "clojure-tools"))) (wrap-program (string-append #$output "/bin/bb") `("BABASHKA_CLASSPATH" ":" suffix - ,(find-files clojure-tools "\\.jar$"))))))))) + ,(find-files clojure-tools "\\.jar$")))))) + (add-after 'validate-runpath 'validate-classpath + (lambda _ + (call-with-temporary-output-file + (lambda (name port) + (display "{:deps {org.clojure/data.xml {:mvn/version \"1.1.0\"}}}" port) + (close port) + (unless (invoke (string-append #$output "/bin/bb") + "--config" name + "-e" "(System/exit 0)") + (error "Classpath error. See output."))))))))) (inputs (list clojure-tools zlib)) (supported-systems '("x86_64-linux")) (home-page "https://github.com/babashka/babashka") |