From 5516beb575f3cff3cba249b720b9294b13b64227 Mon Sep 17 00:00:00 2001 From: Sergey Trofimov Date: Sat, 24 May 2025 13:56:42 +0200 Subject: nongnu: babashka: Add validate-classpath phase. * nongnu/packages/clojure.scm (babashka): Validate babashka runs after build. Signed-off-by: Hilton Chain --- nongnu/packages/clojure.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/nongnu/packages/clojure.scm b/nongnu/packages/clojure.scm index 84ce11e..2f85f5a 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") -- cgit v1.2.3