projects/guix·blob mpd-fix-groups · refs

1025 lines · 42.0 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2018 Alex Vong <[email protected]>
3;;; Copyright © 2018 Pierre Neidhardt <[email protected]>
4;;; Copyright © 2019 Tobias Geerinckx-Rice <[email protected]>
5;;; Copyright © 2019 Jesse Gibbons <[email protected]>
6;;; Copyright © 2020 Ludovic Courtès <[email protected]>
7;;; Copyright © 2024 Roman Scherer <[email protected]>
8;;;
9;;; This file is part of GNU Guix.
10;;;
11;;; GNU Guix is free software; you can redistribute it and/or modify it
12;;; under the terms of the GNU General Public License as published by
13;;; the Free Software Foundation; either version 3 of the License, or (at
14;;; your option) any later version.
15;;;
16;;; GNU Guix is distributed in the hope that it will be useful, but
17;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19;;; GNU General Public License for more details.
20;;;
21;;; You should have received a copy of the GNU General Public License
22;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24(define-module (gnu packages clojure)
25 #:use-module (gnu packages)
26 #:use-module (gnu packages java)
27 #:use-module (gnu packages maven)
28 #:use-module (gnu packages readline)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix packages)
31 #:use-module (guix download)
32 #:use-module (guix git-download)
33 #:use-module (guix build-system ant)
34 #:use-module (guix build-system copy)
35 #:use-module (guix build-system clojure)
36 #:use-module (ice-9 match))
37
38(define-public clojure
39 (let* ((lib (lambda (prefix version hash)
40 (origin (method url-fetch)
41 (uri (string-append "https://github.com/clojure/"
42 prefix version ".tar.gz"))
43 (sha256 (base32 hash)))))
44 ;; The libraries below are needed to run the tests.
45 (libraries
46 `(("core-specs-alpha-src"
47 ,(lib "core.specs.alpha/archive/v"
48 "0.4.74"
49 "1hgl3222381349s4w5bnz02gghxfc8jjsqxhrvgadvn8ybh3dcsp"))
50 ("data-generators-src"
51 ,(lib "data.generators/archive/data.generators-"
52 "1.0.0"
53 "0s3hf1njvs68b8igasikvzagzqxl0gbri7w2qhzsypkhfh60v2cp"))
54 ("java-classpath-src"
55 ,(lib "java.classpath/archive/java.classpath-"
56 "1.0.0"
57 "178zajjsc9phk5l61r8w9hcpk0wgc9a811pl7kjgvn7rg4l7fh7j"))
58 ("spec-alpha-src"
59 ,(lib "spec.alpha/archive/v"
60 "0.5.238"
61 "0h15q9cmxaa7l2pqwwcykfyql8vbw6ns2a4lqfchik1mpfpr9jrb"))
62 ("test-check-src"
63 ,(lib "test.check/archive/v"
64 "1.1.1"
65 "0kx8l79mhpnn94rpsgc7nac7gb222g7a47mzrycj8crfc54wf0c1"))
66 ("test-generative-src"
67 ,(lib "test.generative/archive/v"
68 "1.1.0"
69 "0sm3q4jkcn06b3r0m0p29z159zqc8jk3k02yz92xwvdbnywaqnfz"))
70 ("tools-namespace-src"
71 ,(lib "tools.namespace/archive/tools.namespace-"
72 "1.0.0"
73 "1ifpk93m33rj2xm1qnnninlsdvm1liqmsp9igr63pjjwwwjw1cnn"))
74 ("tools-reader-src"
75 ,(lib "tools.reader/archive/tools.reader-"
76 "1.3.2"
77 "1n4dhg61iyypnjbxmihhqjb7lfpc0lzfvlk4jd8w0yr6za414f3a"))))
78 (library-names (match libraries
79 (((library-name _) ...)
80 library-name))))
81
82 (package
83 (name "clojure")
84 (version "1.12.0")
85 (source (let ((name+version (string-append name "-" version)))
86 (origin
87 (method git-fetch)
88 (uri (git-reference
89 (url "https://github.com/clojure/clojure")
90 (commit name+version)))
91 (file-name (string-append name+version "-checkout"))
92 (sha256
93 (base32 "17f62x9qq71yhcfpg2npv19xi9wcpgqj255nmvpfy1z2md64gawz")))))
94 (build-system ant-build-system)
95 (inputs
96 `(("jre" ,icedtea)))
97 (arguments
98 `(#:imported-modules ((guix build clojure-utils)
99 (guix build clojure-build-system)
100 (guix build guile-build-system)
101 ,@%ant-build-system-modules)
102 #:modules ((guix build ant-build-system)
103 ((guix build clojure-build-system) #:prefix clj:)
104 (guix build clojure-utils)
105 (guix build java-utils)
106 (guix build utils)
107 (ice-9 match)
108 (ice-9 regex)
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)
122 "--strip-components=1")))
123 (for-each extract-library ',library-names)
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/")
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))
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))
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
174 (install-javadoc "target/javadoc/"))
175 (add-after 'reset-gzip-timestamps 'reset-class-timestamps clj:reset-class-timestamps))))
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,
180combining the approachability and interactive development of a scripting
181language with an efficient and robust infrastructure for multithreaded
182programming. Clojure is a compiled language, yet remains completely dynamic
183– every feature supported by Clojure is supported at runtime. Clojure
184provides easy access to the Java frameworks, with optional type hints and type
185inference, to ensure that calls to Java can avoid reflection.
186
187Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy
188and a powerful macro system. Clojure is predominantly a functional programming
189language, and features a rich set of immutable, persistent data structures.
190When mutable state is needed, Clojure offers a software transactional memory
191system and reactive Agent system that ensure clean, correct, multithreaded
192designs.")
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
204(define-public clojure-tools
205 (package
206 (name "clojure-tools")
207 (version "1.11.1.1413")
208 (source
209 (origin
210 (method url-fetch)
211 (uri (string-append "https://download.clojure.org/install/clojure-tools-"
212 version
213 ".tar.gz"))
214 (sha256 (base32 "1q0z71ifdxwvyy9gvq8mx8jbygf8cszrlhb3h22walfamnisbhwk"))
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/")
224 ("tools.edn" "lib/clojure/")
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
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
258Clojure repl, use Clojure and Java libraries, and start Clojure programs.")
259 (license license:epl1.0)))
260
261(define-public clojure-algo-generic
262 (package
263 (name "clojure-algo-generic")
264 (version "0.1.3")
265 (source
266 (origin
267 (method git-fetch)
268 (uri (git-reference
269 (url "https://github.com/clojure/algo.generic")
270 (commit (string-append "algo.generic-" version))))
271 (file-name (git-file-name name version))
272 (sha256
273 (base32 "1s6q10qp276dcpzv06bq1q3bvkvlw03qhmncqcs9cc6p9lc0w4p4"))))
274 (build-system clojure-build-system)
275 (arguments
276 '(#:source-dirs '("src/main/clojure/")
277 #:test-dirs '("src/test/clojure/")
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])")))))))
287 (synopsis "Generic versions of common functions")
288 (description
289 "Generic versions of commonly used functions, implemented as multimethods
290that 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
300 (method git-fetch)
301 (uri (git-reference
302 (url "https://github.com/clojure/algo.monads")
303 (commit (string-append "algo.monads-" version))))
304 (file-name (git-file-name name version))
305 (sha256
306 (base32 "0mv3ba72hyhgasg2k3zy83ij61gak6cs4d6qgh8123z3j02mbh8p"))))
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
313 (list clojure-tools-macro))
314 (synopsis
315 "Monad Macros and Definitions")
316 (description
317 "This library contains the most commonly used monads as well as macros for
318defining 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-async
323 (package
324 (name "clojure-core-async")
325 (version "1.6.681")
326 (home-page "https://github.com/clojure/core.async")
327 (source (origin
328 (method git-fetch)
329 (uri (git-reference
330 (url home-page)
331 (commit (string-append "v" version))))
332 (file-name (git-file-name name version))
333 (sha256
334 (base32
335 "1j9yz14hy2qs8g3flsqkn1sx9c0qlr5mmpy6ab1zml9yhbw5arzg"))))
336 (build-system clojure-build-system)
337 (arguments
338 '(#:source-dirs '("src/main/clojure")
339 #:test-dirs '("src/test/clojure")
340 #:doc-dirs '()
341 #:phases
342 (modify-phases %standard-phases
343 ;; Remove ClojureScript code, we are only supporting Clojure for now.
344 (add-after 'unpack 'delete-cljs
345 (lambda _
346 (delete-file-recursively "src/main/clojure/cljs")
347 (delete-file-recursively "src/test/cljs"))))))
348 (propagated-inputs (list clojure-tools-analyzer-jvm))
349 (synopsis "Facilities for async programming and communication in Clojure")
350 (description "The core.async library adds support for asynchronous
351programming using channels to Clojure. It provides facilities for independent
352threads of activity, communicating via queue-like channels inspired by Hoare’s
353work on Communicating Sequential Processes (CSP).")
354 (license license:epl1.0)))
355
356(define-public clojure-core-cache
357 (package
358 (name "clojure-core-cache")
359 (version "1.1.234")
360 (source (origin
361 (method git-fetch)
362 (uri (git-reference
363 (url "https://github.com/clojure/core.cache")
364 (commit (string-append "v" version))))
365 (file-name (git-file-name name version))
366 (sha256
367 (base32
368 "0jiq022kd5jdpmxz884rvg5317xmx7g3gnidkpcfsamchyfh5qxq"))))
369 (build-system clojure-build-system)
370 (arguments
371 '(#:source-dirs '("src/main/clojure")
372 #:test-dirs '("src/test/clojure")
373 #:doc-dirs '("docs")))
374 (propagated-inputs (list clojure-data-priority-map))
375 (synopsis "Clojure caching library")
376 (description
377 "Caching library for Clojure implementing various cache strategies such
378as First-in-first-out, Least-recently-used, Least-used, Time-to-live, Naive
379cache and Naive cache backed with soft references.")
380 (home-page "https://github.com/clojure/core.cache")
381 (license license:epl1.0)))
382
383(define-public clojure-core-match
384 (package
385 (name "clojure-core-match")
386 (version "1.0.0")
387 (source (origin
388 (method git-fetch)
389 (uri (git-reference
390 (url "https://github.com/clojure/core.match")
391 (commit (string-append "core.match-" version))))
392 (file-name (git-file-name name version))
393 (sha256
394 (base32
395 "0ajpxjv4yc282cm0jw8819fay2j6jqp9nfy69k7vll09q7vqsd22"))))
396 (build-system clojure-build-system)
397 (arguments
398 '(#:source-dirs '("src/main/clojure")
399 #:test-dirs '("src/test/clojure")
400 #:doc-dirs '()))
401 (synopsis "Optimized pattern matching for Clojure")
402 (description
403 "An optimized pattern matching library for Clojure.
404It supports Clojure 1.5.1 and later as well as ClojureScript.")
405 (home-page "https://github.com/clojure/core.match")
406 (license license:epl1.0)))
407
408(define-public clojure-core-memoize
409 (package
410 (name "clojure-core-memoize")
411 (version "1.1.266")
412 (source (origin
413 (method git-fetch)
414 (uri (git-reference
415 (url "https://github.com/clojure/core.memoize")
416 (commit (string-append "v" version))))
417 (file-name (git-file-name name version))
418 (sha256
419 (base32
420 "0nys79zrvcnwgyxb91zlyl3nb4p6r6y4n5rbdvzqkvsxxazi9ji0"))))
421 (build-system clojure-build-system)
422 (arguments
423 '(#:source-dirs '("src/main/clojure")
424 #:test-dirs '("src/test/clojure")
425 #:doc-dirs '("docs")))
426 (propagated-inputs (list clojure-core-cache))
427 (synopsis "Memoization framework for Clojure")
428 (description
429 "A manipulable, pluggable, memoization framework for Clojure implementing
430some common memoization caching strategies, such as First-in-first-out,
431Least-recently-used, Least-used and Time-to-live.")
432 (home-page "https://github.com/clojure/core.memoize")
433 (license license:epl1.0)))
434
435(define-public clojure-data-codec
436 (package
437 (name "clojure-data-codec")
438 (version "0.1.1")
439 (home-page "https://github.com/clojure/data.codec")
440 (source (origin
441 (method git-fetch)
442 (uri (git-reference
443 (url home-page)
444 (commit (string-append "data.codec-" version))))
445 (file-name (git-file-name name version))
446 (sha256
447 (base32
448 "192df1dmbwvf1x837mi731n9x94bdypaz18va45plzgdsh4xx6dr"))))
449 (build-system clojure-build-system)
450 (arguments
451 '(#:source-dirs '("src/main/clojure")
452 #:test-dirs '("src/test/clojure")
453 #:doc-dirs '()))
454 (native-inputs (list java-commons-codec
455 clojure-test-check))
456 (synopsis "Native codec implementations for Clojure")
457 (description "Native codec implementations for Clojure. Currently only
458base64 has been implemented. Implements the standard base64 encoding
459character set, but does not yet support automatic fixed line-length encoding.
460All operations work on either byte arrays or Input/OutputStreams. Performance
461is on par with Java implementations, e.g., Apache commons-codec.")
462 (license license:epl1.0)))
463
464(define-public clojure-data-csv
465 (package
466 (name "clojure-data-csv")
467 (version "1.0.1")
468 (home-page "https://github.com/clojure/data.csv")
469 (source (origin
470 (method git-fetch)
471 (uri (git-reference
472 (url home-page)
473 (commit (string-append "v" version))))
474 (file-name (git-file-name name version))
475 (sha256
476 (base32
477 "1mh1qli6xrw4s3yj9cxxh50z4m7z08indj3ya30znkhi4xsphii2"))))
478 (build-system clojure-build-system)
479 (arguments
480 '(#:source-dirs '("src/main/clojure")
481 #:test-dirs '("src/test/clojure")
482 #:doc-dirs '()))
483 (synopsis "Clojure library for reading and writing CSV data")
484 (description "@code{data.csv} is a Clojure library for reading and writing
485CSV data. @code{data.csv} follows the RFC4180 specification but is more
486relaxed.")
487 (license license:epl1.0)))
488
489(define-public clojure-data-json
490 (package
491 (name "clojure-data-json")
492 (version "2.5.0")
493 (home-page "https://github.com/clojure/data.json")
494 (source (origin
495 (method git-fetch)
496 (uri (git-reference
497 (url home-page)
498 (commit (string-append "v" version))))
499 (file-name (git-file-name name version))
500 (sha256
501 (base32
502 "04k3fr9y1gp337h0d2zxam3aa3hl046r2g2qiizn7aq0rq6311p9"))))
503 (build-system clojure-build-system)
504 (arguments
505 '(#:source-dirs '("src/main/clojure")
506 #:test-dirs '("src/test/clojure")
507 #:doc-dirs '()))
508 (native-inputs (list clojure-test-check))
509 (synopsis "Clojure library for reading and writing JSON data")
510 (description "@code{data.json} is a Clojure library for reading and
511writing JSON data. @code{data.xml} is compliant with the JSON spec and has no
512external dependencies")
513 (license license:epl1.0)))
514
515(define-public clojure-data-priority-map
516 (package
517 (name "clojure-data-priority-map")
518 (version "1.2.0")
519 (source (origin
520 (method git-fetch)
521 (uri (git-reference
522 (url "https://github.com/clojure/data.priority-map")
523 (commit (string-append "v" version))))
524 (file-name (git-file-name name version))
525 (sha256
526 (base32
527 "0aynzrdl0w08q89nd069lcx8s6msqmwrpqnya63jv1l2pn3w6ij4"))))
528 (build-system clojure-build-system)
529 (arguments
530 '(#:source-dirs '("src/main/clojure")
531 #:test-dirs '("src/test/clojure")
532 #:doc-dirs '()))
533 (synopsis "Priority map implementation in Clojure")
534 (description
535 "A priority map is very similar to a sorted map, but whereas a sorted map
536produces a sequence of the entries sorted by key, a priority map produces the
537entries sorted by value. In addition to supporting all the functions a sorted
538map supports, a priority map can also be thought of as a queue of [item
539priority] pairs. To support usage as a versatile priority queue, priority
540maps also support conj/peek/pop operations.")
541 (home-page "https://github.com/clojure/data.priority-map")
542 (license license:epl1.0)))
543
544(define-public clojure-data-xml
545 (package
546 (name "clojure-data-xml")
547 (version "0.2.0-alpha6")
548 (home-page "https://github.com/clojure/data.xml")
549 (source (origin
550 (method git-fetch)
551 (uri (git-reference
552 (url home-page)
553 (commit (string-append "data.xml-" version))))
554 (file-name (git-file-name name version))
555 (sha256
556 (base32
557 "08vglcapq7sd9zhw8dw1y7dcdks7f21w1pw9p05i475i3bw4cf94"))))
558 (build-system clojure-build-system)
559 (arguments
560 '(#:source-dirs '("src/main/clojure")
561 #:test-dirs '("src/test/clojure" "src/test/resources")
562 #:doc-dirs '()
563 #:phases
564 (modify-phases %standard-phases
565 (add-before 'build 'delete-cljs-tests
566 (lambda _
567 (delete-file "src/test/resources/clojure/data/xml/cljs_testsuite.clj")
568 (delete-file "src/test/clojure/clojure/data/xml/test_cljs.clj"))))))
569 (propagated-inputs (list clojure-data-codec))
570 (synopsis "Clojure library for reading and writing XML data")
571 (description "@code{data.xml} is a Clojure library for reading and writing
572XML data. @code{data.xml} has the following features:
573
574Parses XML documents into Clojure data structures
575Emits XML from Clojure data structures
576No additional dependencies if using JDK >= 1.6
577Uses StAX internally
578lazy - should allow parsing and emitting of large XML documents")
579 (license license:epl1.0)))
580
581(define-public clojure-instaparse
582 (let ((version "1.4.12"))
583 (package
584 (name "clojure-instaparse")
585 (version version)
586 (source (origin
587 (method git-fetch)
588 (uri (git-reference
589 (url "https://github.com/Engelberg/instaparse")
590 (commit (string-append "v" version))))
591 (file-name (git-file-name name version))
592 (sha256
593 (base32
594 "1xdiwsv1dc8mvrmvgs4xdqk3z6ddsammc6brhcb771yhimx8jjcr"))))
595 (build-system clojure-build-system)
596 (arguments
597 '(;; Disabled AOT, because of failing test: No implementation of
598 ;; method: :conj-flat of protocol:
599 ;; #'instaparse.auto-flatten-seq/ConjFlat found for class:
600 ;; instaparse.auto_flatten_seq.AutoFlattenSeq
601 #:aot-exclude '(#:all)
602 #:doc-dirs '("docs/")
603 #:phases
604 (modify-phases %standard-phases
605 (add-after 'unpack 'fix-import
606 (lambda _
607 (substitute*
608 "test/instaparse/defparser_test.cljc"
609 (("AssertionError")
610 "Exception")))))))
611 (synopsis "No grammar left behind")
612 (description
613 "Instaparse aims to be the simplest way to build parsers in Clojure.
614
615@itemize
616@item Turns @emph{standard EBNF or ABNF notation} for context-free grammars
617into an executable parser that takes a string as an input and produces a parse
618tree for that string.
619
620@item @dfn{No Grammar Left Behind}: Works for @emph{any} context-free grammar,
621including @emph{left-recursive}, @emph{right-recursive}, and @emph{ambiguous}
622grammars.
623
624@item Extends the power of context-free grammars with PEG-like syntax for
625lookahead and negative lookahead.
626
627@item Supports both of Clojure's most popular tree formats (hiccup and enlive)
628as output targets
629
630@item Detailed reporting of parse errors.
631
632@item Optionally produces lazy sequence of all parses (especially useful for
633diagnosing and debugging ambiguous grammars).
634
635@item ``Total parsing'' mode where leftover string is embedded in the parse
636tree.
637
638@item Optional combinator library for building grammars programmatically.
639
640@item Performant.
641@end itemize")
642 (home-page "https://github.com/Engelberg/instaparse")
643 (license license:epl1.0))))
644
645(define-public clojure-test-check
646 (package
647 (name "clojure-test-check")
648 (version "1.1.1")
649 (home-page "https://github.com/clojure/test.check")
650 (source (origin
651 (method git-fetch)
652 (uri (git-reference
653 (url home-page)
654 (commit (string-append "v" version))))
655 (file-name (git-file-name name version))
656 (sha256
657 (base32
658 "09jvlibnxhjv0l57y0sa7yy5in67gq4sssag77hv2d980mwdnls6"))))
659 (build-system clojure-build-system)
660 (arguments
661 '(#:source-dirs '("src/main/clojure")
662 #:test-dirs '("src/test/clojure")
663 #:doc-dirs '()))
664 (synopsis "QuickCheck for Clojure")
665 (description "@code{test.check} is a Clojure property-based testing tool
666inspired by QuickCheck. The core idea of @code{test.check} is that instead of
667enumerating expected input and output for unit tests, you write properties
668about your function that should hold true for all inputs. This lets you write
669concise, powerful tests.")
670 (license license:epl1.0)))
671
672(define-public clojure-tools-analyzer
673 (package
674 (name "clojure-tools-analyzer")
675 (version "1.2.0")
676 (home-page "https://github.com/clojure/tools.analyzer")
677 (source (origin
678 (method git-fetch)
679 (uri (git-reference
680 (url home-page)
681 (commit (string-append "v" version))))
682 (file-name (git-file-name name version))
683 (sha256
684 (base32
685 "05v4i8qs5d51lh113phib0brkysphxa2d71khm840586432knyaa"))))
686 (build-system clojure-build-system)
687 (arguments
688 '(#:source-dirs '("src/main/clojure")
689 #:test-dirs '("src/test/clojure")
690 #:doc-dirs '()))
691 (synopsis "Analyzer for Clojure code")
692 (description "Analyzer for Clojure code, written in Clojure, which
693produces an abstract syntax tree in the EDN ( Extensible Data Notation)
694format.")
695 (license license:epl1.0)))
696
697(define-public clojure-tools-analyzer-jvm
698 (package
699 (name "clojure-tools-analyzer-jvm")
700 (version "1.3.0")
701 (home-page "https://github.com/clojure/tools.analyzer.jvm")
702 (source (origin
703 (method git-fetch)
704 (uri (git-reference
705 (url home-page)
706 (commit (string-append "v" version))))
707 (file-name (git-file-name name version))
708 (sha256
709 (base32
710 "13nxzdp15772hzl3jmi5014jkwldkm1qccfycwkk2pn64hycmnxl"))))
711 (build-system clojure-build-system)
712 (arguments
713 '(#:source-dirs '("src/main/clojure")
714 #:test-dirs '("src/test/clojure")
715 #:doc-dirs '("docs")))
716 (propagated-inputs (list clojure-tools-analyzer
717 clojure-tools-reader
718 clojure-core-memoize
719 java-asm))
720 (synopsis "Analyzer for Clojure code targeting the JVM")
721 (description "Analyzer for Clojure code, written on top of
722tools.analyzer, providing additional JVM-specific passes.")
723 (license license:epl1.0)))
724
725(define-public clojure-tools-macro
726 (package
727 (name "clojure-tools-macro")
728 (version "0.1.5")
729 (source
730 (origin
731 (method git-fetch)
732 (uri (git-reference
733 (url "https://github.com/clojure/tools.macro")
734 (commit (string-append "tools.macro-" version))))
735 (file-name (git-file-name name version))
736 (sha256
737 (base32 "14mdxqkwja0cffmyfav5pbcli2qvw1mjdgz0n619a2z2036andx8"))))
738 (build-system clojure-build-system)
739 (arguments
740 '(#:source-dirs '("src/main/clojure/")
741 #:test-dirs '("src/test/clojure/")
742 #:doc-dirs '()))
743 (synopsis "Utilities for macro writers")
744 (description "Tools for writing macros.")
745 (home-page "https://github.com/clojure/tools.macro")
746 (license license:epl1.0)))
747
748(define-public clojure-tools-cli
749 (package
750 (name "clojure-tools-cli")
751 (version "1.0.206")
752 (home-page "https://github.com/clojure/tools.cli")
753 (source (origin
754 (method git-fetch)
755 (uri (git-reference
756 (url home-page)
757 (commit (string-append "tools.cli-" version))))
758 (file-name (git-file-name name version))
759 (sha256
760 (base32 "1hvk5zacl3fr8lfcbfgckaicqjx697j0kzw2x5hwj8j5xlr8ri2r"))))
761 (build-system clojure-build-system)
762 (arguments
763 '(#:source-dirs '("src/main/clojure/")
764 #:test-dirs '("src/test/clojure/")
765 #:doc-dirs '()))
766 (synopsis "Clojure library for working with command-line arguments")
767 (description
768 "The @code{tools.cli} library provides Clojure programmers with tools to
769work with command-line arguments.")
770 (license license:epl1.0)))
771
772(define-public clojure-tools-deps
773 (package
774 (name "clojure-tools-deps")
775 (version "0.18.1354")
776 (home-page "https://github.com/clojure/tools.deps")
777 (source (origin
778 (method git-fetch)
779 (uri (git-reference
780 (url home-page)
781 (commit (string-append "v" version))))
782 (file-name (git-file-name name version))
783 (sha256
784 (base32
785 "0ls5nixhsjjhf3qz8kbyhmks5lw7a25zxl46yrizbw7vba3mzrpl"))))
786 (build-system clojure-build-system)
787 (arguments
788 `(#:source-dirs '("src/main/clojure" "src/main/resources")
789 #:test-dirs '("src/test/clojure")
790 #:doc-dirs '()
791 ;; FIXME: Could not initialize class org.eclipse.aether.transport.http.SslSocketFactory
792 #:tests? #f
793 #:phases
794 (modify-phases %standard-phases
795 ;; FIXME: Currently, the S3 transporter depends on ClojureScript,
796 ;; which is very difficult to package due to dependencies on Java
797 ;; libraries with non-standard build systems. Instead of actually
798 ;; packaging these libraries, we just remove the S3 transporter that
799 ;; depends on them.
800 (add-after 'unpack 'remove-s3-transporter
801 (lambda _
802 (for-each delete-file
803 (list
804 (string-append
805 "src/main/clojure/clojure/"
806 "tools/deps/util/s3_aws_client.clj")
807 (string-append
808 "src/main/clojure/clojure/"
809 "tools/deps/util/s3_transporter.clj")
810 (string-append
811 "src/test/clojure/clojure/"
812 "tools/deps/util/test_s3_transporter.clj")))
813 (substitute*
814 "src/main/clojure/clojure/tools/deps/util/maven.clj"
815 (("clojure.tools.deps.util.s3-transporter")
816 "")))))))
817 (propagated-inputs (list maven-resolver-api
818 maven-resolver-spi
819 maven-resolver-impl
820 maven-resolver-util
821 maven-resolver-connector-basic
822 maven-resolver-provider
823 maven-core
824 maven-resolver-transport-http
825 maven-resolver-transport-file
826 clojure-tools-gitlibs
827 clojure-tools-cli
828 clojure-data-xml))
829 (synopsis "Clojure library supporting clojure-tools")
830 (description "This package provides a functional API for transitive
831dependency graph expansion and the creation of classpaths.")
832 (license license:epl1.0)))
833
834(define-public clojure-tools-deps-alpha
835 ;; this was superseded by clojure-tools-deps
836 ;; https://github.com/clojure/tools.deps.alpha
837 ;; Keeping it to give downstream packages a chance to upgrade
838 (package
839 (name "clojure-tools-deps-alpha")
840 (version "0.14.1212")
841 (home-page "https://github.com/clojure/tools.deps.alpha")
842 (source (origin
843 (method git-fetch)
844 (uri (git-reference
845 (url home-page)
846 (commit (string-append "v" version))))
847 (file-name (git-file-name name version))
848 (sha256
849 (base32
850 "0r8qfihii6cf95kl86x6zfldnm7wlkgda2qmq3340j1x03v244dd"))))
851 (build-system clojure-build-system)
852 (arguments
853 `(#:source-dirs '("src/main/clojure" "src/main/resources")
854 #:test-dirs '("src/test/clojure")
855 #:doc-dirs '()
856 ;; FIXME: Could not initialize class org.eclipse.aether.transport.http.SslSocketFactory
857 #:tests? #f
858 #:phases
859 (modify-phases %standard-phases
860 ;; FIXME: Currently, the S3 transporter depends on ClojureScript,
861 ;; which is very difficult to package due to dependencies on Java
862 ;; libraries with non-standard build systems. Instead of actually
863 ;; packaging these libraries, we just remove the S3 transporter that
864 ;; depends on them.
865 (add-after 'unpack 'remove-s3-transporter
866 (lambda _
867 (for-each delete-file
868 (list
869 (string-append
870 "src/main/clojure/clojure/"
871 "tools/deps/alpha/util/s3_aws_client.clj")
872 (string-append
873 "src/main/clojure/clojure/"
874 "tools/deps/alpha/util/s3_transporter.clj")
875 (string-append
876 "src/test/clojure/clojure/"
877 "tools/deps/alpha/util/test_s3_transporter.clj")))
878 (substitute*
879 "src/main/clojure/clojure/tools/deps/alpha/util/maven.clj"
880 (("clojure.tools.deps.alpha.util.s3-transporter")
881 "")))))))
882 (propagated-inputs (list maven-resolver-api
883 maven-resolver-spi
884 maven-resolver-impl
885 maven-resolver-util
886 maven-resolver-connector-basic
887 maven-resolver-provider
888 maven-core
889 maven-resolver-transport-http
890 maven-resolver-transport-file
891 clojure-tools-gitlibs
892 clojure-tools-cli
893 clojure-data-xml))
894 (synopsis "Clojure library supporting clojure-tools")
895 (description "This package provides a functional API for transitive
896dependency graph expansion and the creation of classpaths.")
897 (license license:epl1.0)))
898
899(define-public clojure-tools-gitlibs
900 (package
901 (name "clojure-tools-gitlibs")
902 (version "2.4.181")
903 (home-page "https://github.com/clojure/tools.gitlibs")
904 (source (origin
905 (method git-fetch)
906 (uri (git-reference
907 (url home-page)
908 (commit (string-append "v" version))))
909 (file-name (git-file-name name version))
910 (sha256
911 (base32
912 "1d8c79f33axghadwqa955yjfsxa6fgl8jq4nfll2zrp6sjw0597k"))))
913 (build-system clojure-build-system)
914 (arguments
915 '(#:source-dirs '("src/main/clojure")
916 #:test-dirs '("src/test/clojure")
917 #:doc-dirs '()
918 ;; Tests attempt to clone git repositories from the internet.
919 #:tests? #f))
920 (synopsis "Retrieve, cache, and programmatically access git libraries")
921 (description "To access git dependencies (for example, via
922@code{tools.deps}), one must download git directories and working trees as
923indicated by git SHAs. This library provides this functionality and also
924keeps a cache of git directories and working trees that can be reused.")
925 (license license:epl1.0)))
926
927(define-public clojure-tools-logging
928 (package
929 (name "clojure-tools-logging")
930 (version "1.3.0")
931 (home-page "https://github.com/clojure/tools.logging")
932 (source (origin
933 (method git-fetch)
934 (uri (git-reference
935 (url home-page)
936 (commit (string-append "v" version))))
937 (file-name (git-file-name name version))
938 (sha256
939 (base32
940 "106n4cxsxzs0hvpsfi1h14b09xm6klrvj1g5fbd5nw8fj3mpkdac"))))
941 (build-system clojure-build-system)
942 (arguments
943 '(#:doc-dirs '()
944 #:source-dirs '("src/main/clojure")
945 #:test-dirs '("src/test/clojure")
946 #:phases
947 (modify-phases %standard-phases
948 ;; These tests should throw a ClassCastException, but they don't
949 ;; under AOT. Adjust them :/
950 (add-after 'unpack 'disable-failing-tests
951 (lambda _
952 (substitute* (string-append "src/test/clojure/clojure/tools"
953 "/logging/test_readable.clj")
954 (((string-append "\\(thrown\\? ClassCastException \\(logf "
955 ":debug \\(Exception\\.\\)\\)\\)"))
956 "(nil? (logf :debug (Exception.)))"))
957 (substitute* "src/test/clojure/clojure/tools/test_logging.clj"
958 (((string-append "\\(thrown\\? ClassCastException \\(logf "
959 ":debug \\(Exception\\.\\)\\)\\)"))
960 "(nil? (logf :debug (Exception.)))")))))))
961 (native-inputs
962 (list java-commons-logging-minimal
963 java-log4j-1.2-api
964 java-log4j-api
965 java-log4j-core
966 java-slf4j-api
967 java-slf4j-simple))
968 (synopsis "Clojure logging library")
969 (description "Logging macros which delegate to a specific logging
970implementation, selected at runtime when the clojure.tools.logging namespace
971is first loaded.")
972 (license license:epl1.0)))
973
974(define-public clojure-tools-reader
975 (package
976 (name "clojure-tools-reader")
977 (version "1.5.0")
978 (home-page "https://github.com/clojure/tools.reader")
979 (source (origin
980 (method git-fetch)
981 (uri (git-reference
982 (url home-page)
983 (commit (string-append "v" version))))
984 (file-name (git-file-name name version))
985 (sha256
986 (base32
987 "1jf05q4ym8z16qaxidx47g2gjv04qcf1wvkca3wqyiaszpvym4zz"))))
988 (build-system clojure-build-system)
989 (arguments
990 '(#:doc-dirs '()
991 #:source-dirs '("src/main/clojure")
992 #:test-dirs '("src/test/clojure")
993 #:test-exclude '(clojure.tools.common-tests))) ; Loaded by other tests.
994 (synopsis "Clojure reader written in Clojure")
995 (description "The clojure.tools.reader library offers all functionality
996provided by the Clojure Core reader and more. It adds metadata such as column
997and line numbers not only to lists, but also to symbols, vectors and maps.")
998 (license license:epl1.0)))
999
1000(define-public http-kit
1001 (package
1002 (name "http-kit")
1003 (version "2.8.0")
1004 (source (origin
1005 (method git-fetch)
1006 (uri (git-reference
1007 (url "https://github.com/http-kit/http-kit")
1008 (commit (string-append "v" version))))
1009 (file-name (git-file-name name version))
1010 (sha256
1011 (base32
1012 "1361bpb4sn3dbp215s7gf1bcrb45lgx3lk6lix7bndw9lahr5ank"))))
1013 (build-system clojure-build-system)
1014 (arguments
1015 '(#:java-source-dirs '("src/java")
1016 #:source-dirs '("src")
1017 #:doc-dirs '()
1018 #:tests? #f)) ;XXX: too many unpackaged dependencies
1019 (synopsis
1020 "High-performance, event-driven HTTP client and server for Clojure")
1021 (description "This package provides a minimalist, event-driven,
1022high-performance Clojure HTTP client and server library with WebSocket and
1023asynchronous support.")
1024 (home-page "https://github.com/http-kit/http-kit")
1025 (license license:asl2.0)))