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 84ce11e..2f85f5a 100644 --- a/nongnu/packages/clojure.scm +++ b/nongnu/packages/clojure.scm | |||
| @@ -198,7 +198,17 @@ perform refactors and more.") | |||
| 198 | (let ((clojure-tools #$(this-package-input "clojure-tools"))) | 198 | (let ((clojure-tools #$(this-package-input "clojure-tools"))) |
| 199 | (wrap-program (string-append #$output "/bin/bb") | 199 | (wrap-program (string-append #$output "/bin/bb") |
| 200 | `("BABASHKA_CLASSPATH" ":" suffix | 200 | `("BABASHKA_CLASSPATH" ":" suffix |
| 201 | ,(find-files clojure-tools "\\.jar$"))))))))) | 201 | ,(find-files clojure-tools "\\.jar$")))))) |
| 202 | (add-after 'validate-runpath 'validate-classpath | ||
| 203 | (lambda _ | ||
| 204 | (call-with-temporary-output-file | ||
| 205 | (lambda (name port) | ||
| 206 | (display "{:deps {org.clojure/data.xml {:mvn/version \"1.1.0\"}}}" port) | ||
| 207 | (close port) | ||
| 208 | (unless (invoke (string-append #$output "/bin/bb") | ||
| 209 | "--config" name | ||
| 210 | "-e" "(System/exit 0)") | ||
| 211 | (error "Classpath error. See output."))))))))) | ||
| 202 | (inputs (list clojure-tools zlib)) | 212 | (inputs (list clojure-tools zlib)) |
| 203 | (supported-systems '("x86_64-linux")) | 213 | (supported-systems '("x86_64-linux")) |
| 204 | (home-page "https://github.com/babashka/babashka") | 214 | (home-page "https://github.com/babashka/babashka") |
