Commit | Line | Data |
---|---|---|
96cfa168 PN |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com> | |
3 | ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz> | |
85e0827d | 4 | ;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
d38903fa | 5 | ;;; Copyright © 2019 Jesse Gibbons <jgibbons2357+guix@gmail.com> |
639e641c | 6 | ;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org> |
96cfa168 PN |
7 | ;;; |
8 | ;;; This file is part of GNU Guix. | |
9 | ;;; | |
10 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
11 | ;;; under the terms of the GNU General Public License as published by | |
12 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
13 | ;;; your option) any later version. | |
14 | ;;; | |
15 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
16 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | ;;; GNU General Public License for more details. | |
19 | ;;; | |
20 | ;;; You should have received a copy of the GNU General Public License | |
21 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
22 | ||
23 | (define-module (gnu packages clojure) | |
24 | #:use-module (gnu packages) | |
d38903fa | 25 | #:use-module (gnu packages java) |
d948e58e | 26 | #:use-module (gnu packages maven) |
8cf2817d | 27 | #:use-module (gnu packages readline) |
96cfa168 PN |
28 | #:use-module ((guix licenses) #:prefix license:) |
29 | #:use-module (guix packages) | |
30 | #:use-module (guix download) | |
31 | #:use-module (guix git-download) | |
32 | #:use-module (guix build-system ant) | |
8cf2817d | 33 | #:use-module (guix build-system copy) |
96cfa168 PN |
34 | #:use-module (guix build-system clojure) |
35 | #:use-module (ice-9 match)) | |
36 | ||
37 | (define-public clojure | |
38 | (let* ((lib (lambda (prefix version hash) | |
39 | (origin (method url-fetch) | |
40 | (uri (string-append "https://github.com/clojure/" | |
41 | prefix version ".tar.gz")) | |
42 | (sha256 (base32 hash))))) | |
43 | ;; The libraries below are needed to run the tests. | |
44 | (libraries | |
45 | `(("core-specs-alpha-src" | |
af7dd521 | 46 | ,(lib "core.specs.alpha/archive/v" |
47 | "0.2.62" | |
48 | "0v6nhghsigpzm8y7dykfm318q5dvk5l8sykmn1hr0qgs1jsjqh9j")) | |
96cfa168 PN |
49 | ("data-generators-src" |
50 | ,(lib "data.generators/archive/data.generators-" | |
af7dd521 | 51 | "1.0.0" |
52 | "0s3hf1njvs68b8igasikvzagzqxl0gbri7w2qhzsypkhfh60v2cp")) | |
53 | ("java-classpath-src" | |
54 | ,(lib "java.classpath/archive/java.classpath-" | |
55 | "1.0.0" | |
56 | "178zajjsc9phk5l61r8w9hcpk0wgc9a811pl7kjgvn7rg4l7fh7j")) | |
96cfa168 | 57 | ("spec-alpha-src" |
af7dd521 | 58 | ,(lib "spec.alpha/archive/v" |
59 | "0.3.218" | |
60 | "0h5nd9xlind1a2vmllr2yfhnirgj2pm5dndgqzrly78l5iwcc3wa")) | |
96cfa168 | 61 | ("test-check-src" |
af7dd521 | 62 | ,(lib "test.check/archive/v" |
63 | "1.1.1" | |
64 | "0kx8l79mhpnn94rpsgc7nac7gb222g7a47mzrycj8crfc54wf0c1")) | |
96cfa168 PN |
65 | ("test-generative-src" |
66 | ,(lib "test.generative/archive/test.generative-" | |
af7dd521 | 67 | "1.0.0" |
68 | "0yy2vc38s4j5n94jdcjx1v7l2gdq0lywam31id1jh07sx37lv5il")) | |
96cfa168 PN |
69 | ("tools-namespace-src" |
70 | ,(lib "tools.namespace/archive/tools.namespace-" | |
af7dd521 | 71 | "1.0.0" |
72 | "1ifpk93m33rj2xm1qnnninlsdvm1liqmsp9igr63pjjwwwjw1cnn")) | |
73 | ("tools-reader-src" | |
74 | ,(lib "tools.reader/archive/tools.reader-" | |
75 | "1.3.2" | |
76 | "1n4dhg61iyypnjbxmihhqjb7lfpc0lzfvlk4jd8w0yr6za414f3a")))) | |
96cfa168 PN |
77 | (library-names (match libraries |
78 | (((library-name _) ...) | |
79 | library-name)))) | |
80 | ||
81 | (package | |
82 | (name "clojure") | |
af7dd521 | 83 | (version "1.11.1") |
9e532ae2 ML |
84 | (source (let ((name+version (string-append name "-" version))) |
85 | (origin | |
86 | (method git-fetch) | |
87 | (uri (git-reference | |
88 | (url "https://github.com/clojure/clojure") | |
89 | (commit name+version))) | |
90 | (file-name (string-append name+version "-checkout")) | |
91 | (sha256 | |
af7dd521 | 92 | (base32 "1xbab21rm9zvhmw1i2h5lqm7612vrdkxprq0rgb2i3sbgsxcdsn4"))))) |
96cfa168 | 93 | (build-system ant-build-system) |
d38903fa JG |
94 | (inputs |
95 | `(("jre" ,icedtea))) | |
96cfa168 PN |
96 | (arguments |
97 | `(#:imported-modules ((guix build clojure-utils) | |
af7dd521 | 98 | (guix build clojure-build-system) |
96cfa168 PN |
99 | (guix build guile-build-system) |
100 | ,@%ant-build-system-modules) | |
101 | #:modules ((guix build ant-build-system) | |
af7dd521 | 102 | ((guix build clojure-build-system) #:prefix clj:) |
96cfa168 PN |
103 | (guix build clojure-utils) |
104 | (guix build java-utils) | |
105 | (guix build utils) | |
af7dd521 | 106 | (guix build syscalls) |
107 | (ice-9 match) | |
108 | (ice-9 regex) | |
96cfa168 PN |
109 | (srfi srfi-26)) |
110 | #:test-target "test" | |
111 | #:phases | |
112 | (modify-phases %standard-phases | |
113 | (add-after 'unpack 'unpack-library-sources | |
114 | (lambda* (#:key inputs #:allow-other-keys) | |
115 | (define (extract-library name) | |
116 | (mkdir-p name) | |
117 | (with-directory-excursion name | |
118 | (invoke "tar" | |
119 | "--extract" | |
120 | "--verbose" | |
121 | "--file" (assoc-ref inputs name) | |
af7dd521 | 122 | "--strip-components=1"))) |
96cfa168 | 123 | (for-each extract-library ',library-names) |
af7dd521 | 124 | (copy-recursively "core-specs-alpha-src/src/main/clojure" |
125 | "src/clj/") | |
126 | (copy-recursively "spec-alpha-src/src/main/clojure" | |
127 | "src/clj/") | |
96cfa168 PN |
128 | #t)) |
129 | (add-after 'unpack-library-sources 'fix-manifest-classpath | |
130 | (lambda _ | |
131 | (substitute* "build.xml" | |
132 | (("<attribute name=\"Class-Path\" value=\".\"/>") "")) | |
133 | #t)) | |
af7dd521 | 134 | (add-after 'unpack-library-sources 'clojure-spec-skip-macros |
135 | ;; Disable spec macro instrumentation when compiling clojure.spec | |
136 | ;; See: https://clojure.atlassian.net/browse/CLJ-2254 | |
137 | (lambda _ | |
138 | (substitute* "build.xml" | |
139 | (("<sysproperty key=\"java.awt.headless\" value=\"true\"/>") | |
140 | ,(string-join | |
141 | '("<sysproperty key=\"java.awt.headless\" value=\"true\"/>" | |
142 | "<sysproperty key=\"clojure.spec.skip-macros\" value=\"true\"/>\n") | |
143 | "\n"))) | |
144 | #t)) | |
145 | (add-after 'unpack-library-sources 'clojure-spec-compile | |
146 | ;; Compile and include clojure.spec.alpha & clojure.core.specs.alpha | |
147 | (lambda _ | |
148 | (substitute* "build.xml" | |
149 | (("<arg value=\"clojure.math\"/>") | |
150 | ,(string-join | |
151 | '("<arg value=\"clojure.math\"/>" | |
152 | "<arg value=\"clojure.spec.alpha\"/>" | |
153 | "<arg value=\"clojure.spec.gen.alpha\"/>" | |
154 | "<arg value=\"clojure.spec.test.alpha\"/>" | |
155 | "<arg value=\"clojure.core.specs.alpha\"/>")))) | |
156 | #t)) | |
157 | (add-before 'build 'maven-classpath-properties | |
158 | (lambda _ | |
159 | (define (make-classpath libraries) | |
160 | (string-join (map (lambda (library) | |
161 | (string-append library "/src/main/clojure")) | |
162 | libraries) ":")) | |
163 | (with-output-to-file "maven-classpath.properties" | |
164 | (lambda () | |
165 | (let ((classpath (make-classpath ',library-names))) | |
166 | (display (string-append "maven.compile.classpath=" classpath "\n")) | |
167 | (display (string-append "maven.test.classpath=" classpath "\n"))))) | |
168 | #t)) | |
96cfa168 PN |
169 | (add-after 'build 'build-javadoc ant-build-javadoc) |
170 | (replace 'install (install-jars "./")) | |
171 | (add-after 'install-license-files 'install-doc | |
172 | (cut install-doc #:doc-dirs '("doc/clojure/") <...>)) | |
173 | (add-after 'install-doc 'install-javadoc | |
af7dd521 | 174 | (install-javadoc "target/javadoc/")) |
175 | (add-after 'reset-gzip-timestamps 'reset-class-timestamps clj:reset-class-timestamps)))) | |
96cfa168 PN |
176 | (native-inputs libraries) |
177 | (home-page "https://clojure.org/") | |
178 | (synopsis "Lisp dialect running on the JVM") | |
179 | (description "Clojure is a dynamic, general-purpose programming language, | |
180 | combining the approachability and interactive development of a scripting | |
181 | language with an efficient and robust infrastructure for multithreaded | |
182 | programming. Clojure is a compiled language, yet remains completely dynamic | |
183 | – every feature supported by Clojure is supported at runtime. Clojure | |
184 | provides easy access to the Java frameworks, with optional type hints and type | |
185 | inference, to ensure that calls to Java can avoid reflection. | |
186 | ||
187 | Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy | |
188 | and a powerful macro system. Clojure is predominantly a functional programming | |
189 | language, and features a rich set of immutable, persistent data structures. | |
190 | When mutable state is needed, Clojure offers a software transactional memory | |
191 | system and reactive Agent system that ensure clean, correct, multithreaded | |
192 | designs.") | |
193 | ;; Clojure is licensed under EPL1.0 | |
194 | ;; ASM bytecode manipulation library is licensed under BSD-3 | |
195 | ;; Guava Murmur3 hash implementation is licensed under APL2.0 | |
196 | ;; src/clj/repl.clj is licensed under CPL1.0 | |
197 | ||
198 | ;; See readme.html or readme.txt for details. | |
199 | (license (list license:epl1.0 | |
200 | license:bsd-3 | |
201 | license:asl2.0 | |
202 | license:cpl1.0))))) | |
203 | ||
8cf2817d RS |
204 | (define-public clojure-tools |
205 | (package | |
206 | (name "clojure-tools") | |
9599122c | 207 | (version "1.11.1.1149") |
8cf2817d RS |
208 | (source |
209 | (origin | |
210 | (method url-fetch) | |
211 | (uri (string-append "https://download.clojure.org/install/clojure-tools-" | |
212 | version | |
213 | ".tar.gz")) | |
9599122c | 214 | (sha256 (base32 "196wl87br8zg3npfwpr5c1q0knxd1810vzgb0b6h195hyjf6i210")) |
8cf2817d RS |
215 | ;; Remove AOT compiled JAR. The other JAR only contains uncompiled |
216 | ;; Clojure source code. | |
217 | (snippet | |
218 | `(delete-file ,(string-append "clojure-tools-" version ".jar"))))) | |
219 | (build-system copy-build-system) | |
220 | (arguments | |
221 | `(#:install-plan | |
222 | '(("deps.edn" "lib/clojure/") | |
223 | ("example-deps.edn" "lib/clojure/") | |
25354b58 | 224 | ("tools.edn" "lib/clojure/") |
8cf2817d RS |
225 | ("exec.jar" "lib/clojure/libexec/") |
226 | ("clojure" "bin/") | |
227 | ("clj" "bin/")) | |
228 | #:modules ((guix build copy-build-system) | |
229 | (guix build utils) | |
230 | (srfi srfi-1) | |
231 | (ice-9 match)) | |
232 | #:phases | |
233 | (modify-phases %standard-phases | |
234 | (add-after 'unpack 'fix-paths | |
235 | (lambda* (#:key outputs #:allow-other-keys) | |
236 | (substitute* "clojure" | |
237 | (("PREFIX") (string-append (assoc-ref outputs "out") "/lib/clojure"))) | |
238 | (substitute* "clj" | |
239 | (("BINDIR") (string-append (assoc-ref outputs "out") "/bin")) | |
240 | (("rlwrap") (which "rlwrap"))))) | |
241 | (add-after 'fix-paths 'copy-tools-deps-alpha-jar | |
242 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
243 | (substitute* "clojure" | |
244 | (("\\$install_dir/libexec/clojure-tools-\\$version\\.jar") | |
245 | (string-join | |
246 | (append-map (match-lambda | |
247 | ((label . dir) | |
248 | (find-files dir "\\.jar$"))) | |
249 | inputs) | |
250 | ":")))))))) | |
251 | (inputs (list rlwrap | |
252 | clojure | |
253 | clojure-tools-deps-alpha | |
254 | java-commons-logging-minimal)) | |
255 | (home-page "https://clojure.org/releases/tools") | |
256 | (synopsis "CLI tools for the Clojure programming language") | |
257 | (description "The Clojure command line tools can be used to start a | |
258 | Clojure repl, use Clojure and Java libraries, and start Clojure programs.") | |
259 | (license license:epl1.0))) | |
260 | ||
96cfa168 PN |
261 | (define-public clojure-algo-generic |
262 | (package | |
263 | (name "clojure-algo-generic") | |
264 | (version "0.1.3") | |
265 | (source | |
266 | (origin | |
85e0827d TGR |
267 | (method git-fetch) |
268 | (uri (git-reference | |
b0e7b699 | 269 | (url "https://github.com/clojure/algo.generic") |
85e0827d TGR |
270 | (commit (string-append "algo.generic-" version)))) |
271 | (file-name (git-file-name name version)) | |
96cfa168 | 272 | (sha256 |
85e0827d | 273 | (base32 "1s6q10qp276dcpzv06bq1q3bvkvlw03qhmncqcs9cc6p9lc0w4p4")))) |
96cfa168 PN |
274 | (build-system clojure-build-system) |
275 | (arguments | |
276 | '(#:source-dirs '("src/main/clojure/") | |
277 | #:test-dirs '("src/test/clojure/") | |
884c87a1 | 278 | #:doc-dirs '() |
279 | #:phases | |
280 | (modify-phases %standard-phases | |
281 | (add-after 'unpack 'fix-import | |
282 | (lambda _ | |
283 | (substitute* | |
284 | "src/main/clojure/clojure/algo/generic/math_functions.clj" | |
285 | (("clojure.algo.generic.math-functions") | |
286 | "clojure.algo.generic.math-functions\n(:refer-clojure :exclude [abs])"))))))) | |
96cfa168 PN |
287 | (synopsis "Generic versions of common functions") |
288 | (description | |
289 | "Generic versions of commonly used functions, implemented as multimethods | |
290 | that can be implemented for any data type.") | |
291 | (home-page "https://github.com/clojure/algo.generic") | |
292 | (license license:epl1.0))) | |
293 | ||
294 | (define-public clojure-algo-monads | |
295 | (package | |
296 | (name "clojure-algo-monads") | |
297 | (version "0.1.6") | |
298 | (source | |
299 | (origin | |
62dbf78b TGR |
300 | (method git-fetch) |
301 | (uri (git-reference | |
b0e7b699 | 302 | (url "https://github.com/clojure/algo.monads") |
62dbf78b TGR |
303 | (commit (string-append "algo.monads-" version)))) |
304 | (file-name (git-file-name name version)) | |
96cfa168 | 305 | (sha256 |
62dbf78b | 306 | (base32 "0mv3ba72hyhgasg2k3zy83ij61gak6cs4d6qgh8123z3j02mbh8p")))) |
96cfa168 PN |
307 | (build-system clojure-build-system) |
308 | (arguments | |
309 | '(#:source-dirs '("src/main/clojure/") | |
310 | #:test-dirs '("src/test/clojure/") | |
311 | #:doc-dirs '())) | |
312 | (native-inputs | |
8394619b | 313 | (list clojure-tools-macro)) |
96cfa168 PN |
314 | (synopsis |
315 | "Monad Macros and Definitions") | |
316 | (description | |
317 | "This library contains the most commonly used monads as well as macros for | |
318 | defining and using monads and useful monadic functions.") | |
319 | (home-page "https://github.com/clojure/algo.monads") | |
320 | (license license:epl1.0))) | |
321 | ||
322 | (define-public clojure-core-match | |
f65270c7 | 323 | (package |
324 | (name "clojure-core-match") | |
325 | (version "1.0.0") | |
326 | (source (origin | |
327 | (method git-fetch) | |
328 | (uri (git-reference | |
329 | (url "https://github.com/clojure/core.match") | |
330 | (commit (string-append "core.match-" version)))) | |
331 | (file-name (git-file-name name version)) | |
332 | (sha256 | |
333 | (base32 | |
334 | "0ajpxjv4yc282cm0jw8819fay2j6jqp9nfy69k7vll09q7vqsd22")))) | |
335 | (build-system clojure-build-system) | |
336 | (arguments | |
337 | '(#:source-dirs '("src/main/clojure") | |
338 | #:test-dirs '("src/test/clojure") | |
339 | #:doc-dirs '())) | |
340 | (synopsis "Optimized pattern matching for Clojure") | |
341 | (description | |
342 | "An optimized pattern matching library for Clojure. | |
96cfa168 | 343 | It supports Clojure 1.5.1 and later as well as ClojureScript.") |
f65270c7 | 344 | (home-page "https://github.com/clojure/core.match") |
345 | (license license:epl1.0))) | |
96cfa168 | 346 | |
68434269 RS |
347 | (define-public clojure-data-codec |
348 | (package | |
349 | (name "clojure-data-codec") | |
350 | (version "0.1.1") | |
351 | (home-page "https://github.com/clojure/data.codec") | |
352 | (source (origin | |
353 | (method git-fetch) | |
354 | (uri (git-reference | |
355 | (url home-page) | |
356 | (commit (string-append "data.codec-" version)))) | |
357 | (file-name (git-file-name name version)) | |
358 | (sha256 | |
359 | (base32 | |
360 | "192df1dmbwvf1x837mi731n9x94bdypaz18va45plzgdsh4xx6dr")))) | |
361 | (build-system clojure-build-system) | |
362 | (arguments | |
363 | '(#:source-dirs '("src/main/clojure") | |
364 | #:test-dirs '("src/test/clojure") | |
365 | #:doc-dirs '())) | |
366 | (native-inputs (list java-commons-codec | |
367 | clojure-test-check)) | |
368 | (synopsis "Native codec implementations for Clojure") | |
369 | (description "Native codec implementations for Clojure. Currently only | |
370 | base64 has been implemented. Implements the standard base64 encoding | |
371 | character set, but does not yet support automatic fixed line-length encoding. | |
372 | All operations work on either byte arrays or Input/OutputStreams. Performance | |
373 | is on par with Java implementations, e.g., Apache commons-codec.") | |
374 | (license license:epl1.0))) | |
375 | ||
b39bd8bb RS |
376 | (define-public clojure-data-xml |
377 | (package | |
378 | (name "clojure-data-xml") | |
379 | (version "0.2.0-alpha6") | |
380 | (home-page "https://github.com/clojure/data.xml") | |
381 | (source (origin | |
382 | (method git-fetch) | |
383 | (uri (git-reference | |
384 | (url home-page) | |
385 | (commit (string-append "data.xml-" version)))) | |
386 | (file-name (git-file-name name version)) | |
387 | (sha256 | |
388 | (base32 | |
389 | "08vglcapq7sd9zhw8dw1y7dcdks7f21w1pw9p05i475i3bw4cf94")))) | |
390 | (build-system clojure-build-system) | |
391 | (arguments | |
392 | '(#:source-dirs '("src/main/clojure") | |
6d357541 RSG |
393 | #:test-dirs '("src/test/clojure" "src/test/resources") |
394 | #:doc-dirs '() | |
395 | #:phases | |
396 | (modify-phases %standard-phases | |
397 | (add-before 'build 'delete-cljs-tests | |
398 | (lambda _ | |
399 | (delete-file "src/test/resources/clojure/data/xml/cljs_testsuite.clj") | |
400 | (delete-file "src/test/clojure/clojure/data/xml/test_cljs.clj")))))) | |
b39bd8bb RS |
401 | (propagated-inputs (list clojure-data-codec)) |
402 | (synopsis "Clojure library for reading and writing XML data") | |
403 | (description "@code{data.xml} is a Clojure library for reading and writing | |
404 | XML data. @code{data.xml} has the following features: | |
405 | ||
406 | Parses XML documents into Clojure data structures | |
407 | Emits XML from Clojure data structures | |
408 | No additional dependencies if using JDK >= 1.6 | |
409 | Uses StAX internally | |
410 | lazy - should allow parsing and emitting of large XML documents") | |
411 | (license license:epl1.0))) | |
412 | ||
96cfa168 | 413 | (define-public clojure-instaparse |
666f12f1 | 414 | (let ((version "1.4.12")) |
96cfa168 PN |
415 | (package |
416 | (name "clojure-instaparse") | |
417 | (version version) | |
418 | (source (origin | |
419 | (method git-fetch) | |
420 | (uri (git-reference | |
b0e7b699 | 421 | (url "https://github.com/Engelberg/instaparse") |
666f12f1 | 422 | (commit (string-append "v" version)))) |
96cfa168 PN |
423 | (file-name (git-file-name name version)) |
424 | (sha256 | |
425 | (base32 | |
666f12f1 | 426 | "1xdiwsv1dc8mvrmvgs4xdqk3z6ddsammc6brhcb771yhimx8jjcr")))) |
96cfa168 PN |
427 | (build-system clojure-build-system) |
428 | (arguments | |
666f12f1 | 429 | '(;; Disabled AOT, because of failing test: No implementation of |
430 | ;; method: :conj-flat of protocol: | |
431 | ;; #'instaparse.auto-flatten-seq/ConjFlat found for class: | |
432 | ;; instaparse.auto_flatten_seq.AutoFlattenSeq | |
433 | #:aot-exclude '(#:all) | |
434 | #:doc-dirs '("docs/") | |
435 | #:phases | |
436 | (modify-phases %standard-phases | |
437 | (add-after 'unpack 'fix-import | |
438 | (lambda _ | |
439 | (substitute* | |
440 | "test/instaparse/defparser_test.cljc" | |
441 | (("AssertionError") | |
442 | "Exception"))))))) | |
96cfa168 PN |
443 | (synopsis "No grammar left behind") |
444 | (description | |
445 | "Instaparse aims to be the simplest way to build parsers in Clojure. | |
446 | ||
447 | @itemize | |
448 | @item Turns @emph{standard EBNF or ABNF notation} for context-free grammars | |
449 | into an executable parser that takes a string as an input and produces a parse | |
450 | tree for that string. | |
451 | ||
452 | @item @dfn{No Grammar Left Behind}: Works for @emph{any} context-free grammar, | |
453 | including @emph{left-recursive}, @emph{right-recursive}, and @emph{ambiguous} | |
454 | grammars. | |
455 | ||
456 | @item Extends the power of context-free grammars with PEG-like syntax for | |
457 | lookahead and negative lookahead. | |
458 | ||
459 | @item Supports both of Clojure's most popular tree formats (hiccup and enlive) | |
460 | as output targets | |
461 | ||
462 | @item Detailed reporting of parse errors. | |
463 | ||
464 | @item Optionally produces lazy sequence of all parses (especially useful for | |
465 | diagnosing and debugging ambiguous grammars). | |
466 | ||
467 | @item ``Total parsing'' mode where leftover string is embedded in the parse | |
468 | tree. | |
469 | ||
470 | @item Optional combinator library for building grammars programmatically. | |
471 | ||
472 | @item Performant. | |
473 | @end itemize") | |
474 | (home-page "https://github.com/Engelberg/instaparse") | |
475 | (license license:epl1.0)))) | |
476 | ||
f1c63bd8 RS |
477 | (define-public clojure-test-check |
478 | (package | |
479 | (name "clojure-test-check") | |
480 | (version "1.1.1") | |
481 | (home-page "https://github.com/clojure/test.check") | |
482 | (source (origin | |
483 | (method git-fetch) | |
484 | (uri (git-reference | |
485 | (url home-page) | |
486 | (commit (string-append "v" version)))) | |
487 | (file-name (git-file-name name version)) | |
488 | (sha256 | |
489 | (base32 | |
490 | "09jvlibnxhjv0l57y0sa7yy5in67gq4sssag77hv2d980mwdnls6")))) | |
491 | (build-system clojure-build-system) | |
492 | (arguments | |
493 | '(#:source-dirs '("src/main/clojure") | |
494 | #:test-dirs '("src/test/clojure") | |
495 | #:doc-dirs '())) | |
496 | (synopsis "QuickCheck for Clojure") | |
497 | (description "@code{test.check} is a Clojure property-based testing tool | |
498 | inspired by QuickCheck. The core idea of @code{test.check} is that instead of | |
499 | enumerating expected input and output for unit tests, you write properties | |
500 | about your function that should hold true for all inputs. This lets you write | |
501 | concise, powerful tests.") | |
502 | (license license:epl1.0))) | |
503 | ||
96cfa168 PN |
504 | (define-public clojure-tools-macro |
505 | (package | |
506 | (name "clojure-tools-macro") | |
507 | (version "0.1.5") | |
508 | (source | |
509 | (origin | |
99631313 TGR |
510 | (method git-fetch) |
511 | (uri (git-reference | |
b0e7b699 | 512 | (url "https://github.com/clojure/tools.macro") |
99631313 TGR |
513 | (commit (string-append "tools.macro-" version)))) |
514 | (file-name (git-file-name name version)) | |
96cfa168 | 515 | (sha256 |
99631313 | 516 | (base32 "14mdxqkwja0cffmyfav5pbcli2qvw1mjdgz0n619a2z2036andx8")))) |
96cfa168 PN |
517 | (build-system clojure-build-system) |
518 | (arguments | |
519 | '(#:source-dirs '("src/main/clojure/") | |
520 | #:test-dirs '("src/test/clojure/") | |
521 | #:doc-dirs '())) | |
522 | (synopsis "Utilities for macro writers") | |
523 | (description "Tools for writing macros.") | |
524 | (home-page "https://github.com/clojure/tools.macro") | |
525 | (license license:epl1.0))) | |
639e641c LC |
526 | |
527 | (define-public clojure-tools-cli | |
528 | (package | |
529 | (name "clojure-tools-cli") | |
b11fc326 | 530 | (version "1.0.206") |
639e641c LC |
531 | (home-page "https://github.com/clojure/tools.cli") |
532 | (source (origin | |
533 | (method git-fetch) | |
534 | (uri (git-reference | |
535 | (url home-page) | |
536 | (commit (string-append "tools.cli-" version)))) | |
537 | (file-name (git-file-name name version)) | |
538 | (sha256 | |
b11fc326 | 539 | (base32 "1hvk5zacl3fr8lfcbfgckaicqjx697j0kzw2x5hwj8j5xlr8ri2r")))) |
639e641c LC |
540 | (build-system clojure-build-system) |
541 | (arguments | |
542 | '(#:source-dirs '("src/main/clojure/") | |
543 | #:test-dirs '("src/test/clojure/") | |
544 | #:doc-dirs '())) | |
545 | (synopsis "Clojure library for working with command-line arguments") | |
546 | (description | |
547 | "The @code{tools.cli} library provides Clojure programmers with tools to | |
548 | work with command-line arguments.") | |
549 | (license license:epl1.0))) | |
a72006cf | 550 | |
d948e58e RS |
551 | (define-public clojure-tools-deps-alpha |
552 | (package | |
553 | (name "clojure-tools-deps-alpha") | |
1eb357fd | 554 | (version "0.14.1212") |
d948e58e RS |
555 | (home-page "https://github.com/clojure/tools.deps.alpha") |
556 | (source (origin | |
557 | (method git-fetch) | |
558 | (uri (git-reference | |
559 | (url home-page) | |
560 | (commit (string-append "v" version)))) | |
561 | (file-name (git-file-name name version)) | |
562 | (sha256 | |
563 | (base32 | |
1eb357fd | 564 | "0r8qfihii6cf95kl86x6zfldnm7wlkgda2qmq3340j1x03v244dd")))) |
d948e58e RS |
565 | (build-system clojure-build-system) |
566 | (arguments | |
567 | `(#:source-dirs '("src/main/clojure" "src/main/resources") | |
568 | #:test-dirs '("src/test/clojure") | |
569 | #:doc-dirs '() | |
570 | ;; FIXME: Could not initialize class org.eclipse.aether.transport.http.SslSocketFactory | |
571 | #:tests? #f | |
572 | #:phases | |
573 | (modify-phases %standard-phases | |
574 | ;; FIXME: Currently, the S3 transporter depends on ClojureScript, | |
575 | ;; which is very difficult to package due to dependencies on Java | |
576 | ;; libraries with non-standard build systems. Instead of actually | |
577 | ;; packaging these libraries, we just remove the S3 transporter that | |
578 | ;; depends on them. | |
579 | (add-after 'unpack 'remove-s3-transporter | |
580 | (lambda _ | |
581 | (for-each delete-file | |
582 | (list | |
583 | (string-append | |
584 | "src/main/clojure/clojure/" | |
585 | "tools/deps/alpha/util/s3_aws_client.clj") | |
586 | (string-append | |
587 | "src/main/clojure/clojure/" | |
588 | "tools/deps/alpha/util/s3_transporter.clj") | |
589 | (string-append | |
590 | "src/test/clojure/clojure/" | |
591 | "tools/deps/alpha/util/test_s3_transporter.clj"))) | |
592 | (substitute* | |
593 | "src/main/clojure/clojure/tools/deps/alpha/util/maven.clj" | |
594 | (("clojure.tools.deps.alpha.util.s3-transporter") | |
595 | ""))))))) | |
596 | (propagated-inputs (list maven-resolver-api | |
597 | maven-resolver-spi | |
598 | maven-resolver-impl | |
599 | maven-resolver-util | |
600 | maven-resolver-connector-basic | |
601 | maven-resolver-provider | |
602 | maven-core | |
603 | maven-resolver-transport-http | |
604 | maven-resolver-transport-file | |
605 | clojure-tools-gitlibs | |
606 | clojure-tools-cli | |
607 | clojure-data-xml)) | |
608 | (synopsis "Clojure library supporting clojure-tools") | |
609 | (description "This package provides a functional API for transitive | |
610 | dependency graph expansion and the creation of classpaths.") | |
611 | (license license:epl1.0))) | |
612 | ||
a72006cf RS |
613 | (define-public clojure-tools-gitlibs |
614 | (package | |
615 | (name "clojure-tools-gitlibs") | |
b20af3b5 | 616 | (version "2.4.181") |
a72006cf RS |
617 | (home-page "https://github.com/clojure/tools.gitlibs") |
618 | (source (origin | |
619 | (method git-fetch) | |
620 | (uri (git-reference | |
621 | (url home-page) | |
622 | (commit (string-append "v" version)))) | |
623 | (file-name (git-file-name name version)) | |
624 | (sha256 | |
625 | (base32 | |
b20af3b5 | 626 | "1d8c79f33axghadwqa955yjfsxa6fgl8jq4nfll2zrp6sjw0597k")))) |
a72006cf RS |
627 | (build-system clojure-build-system) |
628 | (arguments | |
629 | '(#:source-dirs '("src/main/clojure") | |
630 | #:test-dirs '("src/test/clojure") | |
631 | #:doc-dirs '() | |
632 | ;; Tests attempt to clone git repositories from the internet. | |
633 | #:tests? #f)) | |
b4882ff7 | 634 | (synopsis "Retrieve, cache, and programmatically access git libraries") |
a72006cf RS |
635 | (description "To access git dependencies (for example, via |
636 | @code{tools.deps}), one must download git directories and working trees as | |
637 | indicated by git SHAs. This library provides this functionality and also | |
638 | keeps a cache of git directories and working trees that can be reused.") | |
639 | (license license:epl1.0))) |