projects/guix·blob wip-postfix · refs

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