gnu: Add julia-reexport.
[jackhill/guix/guix.git] / gnu / packages / julia-xyz.scm
CommitLineData
a1315b7f 1;;; GNU Guix --- Functional package management for GNU
f7a98af0 2;;; Copyright © 2020, 2021 Nicolò Balzarotti <nicolo@nixo.xyz>
35044d3e 3;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
a1315b7f 4;;;
5;;; This file is part of GNU Guix.
6;;;
7;;; GNU Guix is free software; you can redistribute it and/or modify it
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
12;;; GNU Guix is distributed in the hope that it will be useful, but
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20(define-module (gnu packages julia-xyz)
21 #:use-module ((guix licenses) #:prefix license:)
22 #:use-module (guix packages)
23 #:use-module (guix git-download)
3291e4ba 24 #:use-module (guix build-system julia)
25 #:use-module (gnu packages tls))
a1315b7f 26
20767b9b 27(define-public julia-adapt
28 (package
29 (name "julia-adapt")
30 (version "3.1.1")
31 (source
32 (origin
33 (method git-fetch)
34 (uri (git-reference
35 (url "https://github.com/JuliaGPU/Adapt.jl")
36 (commit (string-append "v" version))))
81d45a66 37 (file-name (git-file-name name version))
20767b9b 38 (sha256
39 (base32 "1lks6k3a1gvwlplld47nh6xfy3nnlpc0vhkzg6zg0qn33qdmavrg"))))
40 (build-system julia-build-system)
41 (home-page "https://github.com/JuliaGPU/Adapt.jl")
42 (synopsis "Package providing the @code{adapt} function, similar to @code{convert}")
43 (description "This Julia package provides the @code{adapt(T, x)} function
44acts like @code{convert(T, x)}, but without the restriction of returning a
45@code{T}. This allows you to \"convert\" wrapper types like @code{Adjoint} to
46be GPU compatible without throwing away the wrapper.")
47 (license license:expat)))
48
03010d5d 49(define-public julia-benchmarktools
50 (package
51 (name "julia-benchmarktools")
52 (version "0.5.0")
53 (source
54 (origin
55 (method git-fetch)
56 (uri (git-reference
57 (url "https://github.com/JuliaCI/BenchmarkTools.jl")
58 (commit (string-append "v" version))))
59 (file-name (git-file-name name version))
60 (sha256
61 (base32 "0nsx21m3i5h22lkgyrmfj6r085va6ag40khwssqs8y7l0wz98lvp"))))
62 (build-system julia-build-system)
63 (propagated-inputs `(("julia-json" ,julia-json)))
64 (home-page "https://github.com/JuliaCI/BenchmarkTools.jl")
65 (synopsis "Benchmarking framework for the Julia language")
66 (description "@code{BenchmarkTools.jl} makes performance tracking of Julia
67code easy by supplying a framework for writing and running groups of
68benchmarks as well as comparing benchmark results.")
69 (license license:expat)))
70
52d09b1f 71(define-public julia-bufferedstreams
72 (package
73 (name "julia-bufferedstreams")
74 (version "1.0.0")
75 (source
76 (origin
77 (method git-fetch)
78 (uri (git-reference
79 (url "https://github.com/BioJulia/BufferedStreams.jl")
80 (commit (string-append "v" version))))
81 (file-name (git-file-name name version))
82 (sha256
83 (base32 "0sf4sxbq55mg2pwxyxf0c839z1lk0yxg8nmb7617bfbvw31cp88z"))))
84 (build-system julia-build-system)
85 ;; The package is old and tests are using undefined functions. They also
86 ;; freeze, see
87 ;; https://travis-ci.org/BioJulia/BufferedStreams.jl/jobs/491050182
88 (arguments
89 '(#:tests? #f
90 #:julia-package-name "BufferedStreams"))
91 (propagated-inputs `(("julia-compat" ,julia-compat)))
92 (home-page "https://github.com/BioJulia/BufferedStreams.jl")
93 (synopsis "Fast composable IO streams")
94 (description "@code{BufferedStreams.jl} provides buffering for IO
95operations. It can wrap any @code{IO} type automatically making incremental
96reading and writing faster.")
97 (license license:expat)))
98
a1315b7f 99(define-public julia-compat
100 (package
101 (name "julia-compat")
f7a98af0 102 (version "3.25.0")
a1315b7f 103 (source
104 (origin
105 (method git-fetch)
106 (uri (git-reference
107 (url "https://github.com/JuliaLang/Compat.jl")
108 (commit (string-append "v" version))))
54721e7e 109 (file-name (git-file-name name version))
a1315b7f 110 (sha256
f7a98af0 111 (base32 "1m4r5i8mq29xjp3mllh6047n5a78sdyld57m15anrnsjgaapcgby"))))
a1315b7f 112 (build-system julia-build-system)
113 (home-page "https://github.com/JuliaLang/Compat.jl")
114 (synopsis "Compatibility across Julia versions")
115 (description "The Compat package is designed to ease interoperability
116between older and newer versions of the Julia language. The Compat package
117provides a macro that lets you use the latest syntax in a backwards-compatible
118way.")
119 (license license:expat)))
eccd448c 120
35044d3e 121(define-public julia-constructionbase
122 (let ((commit "de77e2865b554f9b078fd8c35b593cce0554ae02"))
123 (package
124 (name "julia-constructionbase")
125 (version "1.1.0") ;tag not created upstream
126 (source
127 (origin
128 (method git-fetch)
129 (uri (git-reference
130 (url "https://github.com/JuliaObjects/ConstructionBase.jl")
131 (commit commit)))
132 (file-name (git-file-name name version))
133 (sha256
134 (base32 "1y79sfj0rds1skl9j16p9161hwa9khm0xc2m4hgjcbh5zzvyr57v"))))
135 (build-system julia-build-system)
136 (home-page "https://juliaobjects.github.io/ConstructionBase.jl/dev/")
137 (synopsis "Primitive functions for construction of objects")
138 (description "This very lightweight package provides primitive functions
139for construction of objects.")
140 (license license:expat))))
141
6545cef5 142(define-public julia-datastructures
143 (package
144 (name "julia-datastructures")
145 (version "0.18.9")
146 (source
147 (origin
148 (method git-fetch)
149 (uri (git-reference
150 (url "https://github.com/JuliaCollections/DataStructures.jl")
151 (commit (string-append "v" version))))
152 (file-name (git-file-name name version))
153 (sha256
154 (base32 "0hdqp8ipsqdw5bqqkdvz4j6n67x80sj5azr9vzyxwjfsgkfbnk2l"))))
155 (propagated-inputs
156 `(("julia-compat" ,julia-compat)
157 ("julia-orderedcollections" ,julia-orderedcollections)))
158 (build-system julia-build-system)
159 (home-page "https://github.com/JuliaCollections/DataStructures.jl")
160 (synopsis "Julia module providing different data structures")
161 (description "This package implements a variety of data structures,
162including, @code{CircularBuffer}, @code{Queue}, @code{Stack},
163@code{Accumulators}, @code{LinkedLists}, @code{SortedDicts} and many others.")
164 (license license:expat)))
165
50f99cc5 166(define-public julia-fixedpointnumbers
167 (package
168 (name "julia-fixedpointnumbers")
169 (version "0.8.4")
170 (source
171 (origin
172 (method git-fetch)
173 (uri (git-reference
174 (url "https://github.com/JuliaMath/FixedPointNumbers.jl")
175 (commit (string-append "v" version))))
176 (file-name (git-file-name name version))
177 (sha256
178 (base32 "0j0n40n04q9sk68wh9jq90m6c67k4ws02k41djjzkrqmpzv4rcdi"))))
179 (build-system julia-build-system)
180 (arguments
181 `(#:phases
182 (modify-phases %standard-phases
183 (add-after 'unpack 'disable-failing-test
184 (lambda* (#:key outputs #:allow-other-keys)
185 (substitute* "test/fixed.jl"
186 ;; A deprecation warning is not thrown
187 (("@test_logs.*:warn" all) (string-append "# " all)))
188 #t)))))
189 (propagated-inputs `(("julia-compat" ,julia-compat)))
190 (home-page "https://github.com/JuliaMath/FixedPointNumbers.jl")
191 (synopsis "Fixed point types for Julia")
192 (description "@code{FixedPointNumbers.jl} implements fixed-point number
193types for Julia. A fixed-point number represents a fractional, or
194non-integral, number. In contrast with the more widely known floating-point
195numbers, with fixed-point numbers the decimal point doesn't \"float\":
196fixed-point numbers are effectively integers that are interpreted as being
197scaled by a constant factor. Consequently, they have a fixed number of
198digits (bits) after the decimal (radix) point.")
199 (license license:expat)))
d4987a50 200
201(define-public julia-http
202 (package
203 (name "julia-http")
204 (version "0.9.2")
205 (source
206 (origin
207 (method git-fetch)
208 (uri (git-reference
209 (url "https://github.com/JuliaWeb/HTTP.jl")
210 (commit (string-append "v" version))))
211 (file-name (git-file-name name version))
212 (sha256
213 (base32 "0ij0yci13c46p92m4zywvcs02nn8pm0abyfffiyhxvva6hq48lyl"))))
214 (build-system julia-build-system)
215 (arguments
216 `(#:phases
217 (modify-phases %standard-phases
218 (add-before 'install 'disable-network-tests
219 (lambda _
220 (substitute* "test/runtests.jl"
221 (("\"async.jl") "# \"async.jl")
222 (("\"client.jl") "# \"client.jl"))
223 (substitute* "test/aws4.jl"
224 (("@testset.*HTTP.request with AWS authentication.*" all)
225 (string-append all "return\n")))
226 (substitute* "test/insert_layers.jl"
227 (("@testset.*Inserted final layer runs handler.*" all)
228 (string-append all "return\n")))
229 (substitute* "test/multipart.jl"
230 (("@testset \"Setting of Content-Type.*" all)
231 (string-append all "return\n"))
232 (("@testset \"Deprecation of .*" all)
233 (string-append all "return\n")))
234 (substitute* "test/websockets.jl"
235 (("@testset.*External Host.*" all)
236 (string-append all "return\n")))
237 (substitute* "test/messages.jl"
238 (("@testset.*Read methods.*" all)
239 (string-append all "return\n"))
240 (("@testset.*Body - .*" all)
241 (string-append all "return\n"))
242 (("@testset.*Write to file.*" all)
243 (string-append all "return\n")))
244 #t)))))
245 (propagated-inputs
246 `(("julia-inifile" ,julia-inifile)
247 ("julia-mbedtls" ,julia-mbedtls)
248 ("julia-uris" ,julia-uris)))
249 ;; required for tests
250 (inputs
251 `(("julia-json" ,julia-json)
252 ("julia-bufferedstreams" ,julia-bufferedstreams)))
253 (home-page "https://juliaweb.github.io/HTTP.jl/")
254 (synopsis "HTTP support for Julia")
255 (description "@code{HTTP.jl} is a Julia library for HTTP Messages,
256implementing both a client and a server.")
257 (license license:expat)))
50f99cc5 258
fc781578 259(define-public julia-inifile
260 (package
261 (name "julia-inifile")
262 (version "0.5.0")
263 (source
264 (origin
265 (method git-fetch)
266 (uri (git-reference
267 (url "https://github.com/JuliaIO/IniFile.jl")
268 (commit "8ba59958495fa276d6489d2c3903e765d75e0bc0")))
269 (file-name (git-file-name name version))
270 (sha256
271 (base32 "11h6f99jpbg729lplw841m68jprka7q3n8yw390bndlmcdsjabpd"))))
272 (build-system julia-build-system)
273 (home-page "https://github.com/JuliaIO/IniFile.jl")
274 (synopsis "Reading Windows-style INI files")
275 (description "This is a Julia package that defines an IniFile type that
276allows to interface with @file{.ini} files.")
277 (license license:expat)))
278
a06db9c1 279(define-public julia-jllwrappers
280 (package
281 (name "julia-jllwrappers")
282 (version "1.2.0")
283 (source
284 (origin
285 (method git-fetch)
286 (uri (git-reference
287 (url "https://github.com/JuliaPackaging/JLLWrappers.jl")
288 (commit (string-append "v" version))))
289 (file-name (git-file-name name version))
290 (sha256
291 (base32 "1sj3mi2dcc13apqfpy401wic5n0pgbck1p98b2g3zw0mln9s83m4"))))
292 (arguments
293 ;; Wants to download stuff
294 '(#:tests? #f
295 #:phases
296 (modify-phases %standard-phases
297 (add-after 'unpack 'custom-override-path
298 (lambda* (#:key inputs #:allow-other-keys)
299 ;; Make @generate_wrapper_header take an optional argument that
300 ;; guix packagers can pass to override the default "override"
301 ;; binary path. This won't be needed when something like
302 ;; https://github.com/JuliaPackaging/JLLWrappers.jl/pull/27
303 ;; will be merged.
304 (substitute* "src/wrapper_generators.jl"
305 (("generate_wrapper_header.*")
306 "generate_wrapper_header(src_name, override_path = nothing)\n")
307 (("pkg_dir = .*" all)
308 (string-append
309 all "\n" "override = something(override_path,"
310 "joinpath(dirname(pkg_dir), \"override\"))\n"))
311 (("@static if isdir.*") "@static if isdir($override)\n")
312 (("return joinpath.*") "return $override\n"))
313 #t)))))
314 (build-system julia-build-system)
315 (home-page "https://github.com/JuliaPackaging/JLLWrappers.jl")
316 (synopsis "Julia macros used by JLL packages")
317 (description "This package contains Julia macros that enable JLL packages
318to generate themselves. It is not intended to be used by users, but rather is
319used in autogenerated packages via @code{BinaryBuilder.jl}.")
320 (license license:expat)))
321
dae521a0 322(define-public julia-json
323 (package
324 (name "julia-json")
325 (version "0.21.1")
326 (source
327 (origin
328 (method git-fetch)
329 (uri (git-reference
330 (url "https://github.com/JuliaIO/JSON.jl")
331 (commit (string-append "v" version))))
332 (file-name (git-file-name name version))
333 (sha256
334 (base32 "1f9k613kbknmp4fgjxvjaw4d5sfbx8a5hmcszmp1w9rqfqngjx9m"))))
335 (build-system julia-build-system)
336 (propagated-inputs
337 `(("julia-datastructures" ,julia-datastructures)
338 ("julia-fixedpointnumbers" ,julia-fixedpointnumbers)
339 ("julia-parsers" ,julia-parsers)
340 ("julia-offsetarrays" ,julia-offsetarrays)))
341 (home-page "https://github.com/JuliaIO/JSON.jl")
342 (synopsis "JSON parsing and printing library for Julia")
343 (description "@code{JSON.jl} is a pure Julia module which supports parsing
344and printing JSON documents.")
345 (license license:expat)))
346
45debc7b 347(define-public julia-macrotools
348 (package
349 (name "julia-macrotools")
350 (version "0.5.6")
351 (source
352 (origin
353 (method git-fetch)
354 (uri (git-reference
355 (url "https://github.com/FluxML/MacroTools.jl")
356 (commit (string-append "v" version))))
357 (file-name (git-file-name name version))
358 (sha256
359 (base32 "0k4z2hyasd9cwxf4l61zk3w4ajs44k69wx6z1ghdn8f5p8xy217f"))))
360 (build-system julia-build-system)
361 (home-page "https://fluxml.ai/MacroTools.jl")
362 (synopsis "Tools for working with Julia code and expressions")
363 (description "This library provides tools for working with Julia code and
364expressions. This includes a template-matching system and code-walking tools
365that let you do deep transformations of code.")
366 (license license:expat)))
367
a72d3ca8 368(define-public julia-mbedtls
369 (package
370 (name "julia-mbedtls")
371 (version "1.0.3")
372 (source
373 (origin
374 (method git-fetch)
375 (uri (git-reference
376 (url "https://github.com/JuliaLang/MbedTLS.jl")
377 (commit (string-append "v" version))))
378 (file-name (git-file-name name version))
379 (sha256
380 (base32 "0zjzf2r57l24n3k0gcqkvx3izwn5827iv9ak0lqix0aa5967wvfb"))))
381 (build-system julia-build-system)
382 (arguments
383 `(#:phases
384 (modify-phases %standard-phases
385 (add-before 'install 'disable-network-tests
386 ;; Tries to connect to httpbin.org
387 (lambda _
388 (substitute* "test/runtests.jl"
389 (("testhost =") "return #"))
390 #t)))))
391 (propagated-inputs `(("julia-mbedtls-jll" ,julia-mbedtls-jll)))
392 (home-page "https://github.com/JuliaLang/MbedTLS.jl")
393 (synopsis "Apache's mbed TLS library wrapper")
394 (description "@code{MbedTLS.jl} provides a wrapper around the @code{mbed
395TLS} and cryptography C libary for Julia.")
396 (license license:expat)))
397
3291e4ba 398(define-public julia-mbedtls-jll
399 (package
400 (name "julia-mbedtls-jll")
401 ;; version 2.25.0+0 is not compatible with current mbedtls 2.23.0,
402 ;; upgrade this when mbedtls is updated in guix
403 (version "2.24.0+1")
404 (source
405 (origin
406 (method git-fetch)
407 (uri (git-reference
408 (url "https://github.com/JuliaBinaryWrappers/MbedTLS_jll.jl")
409 (commit (string-append "MbedTLS-v" version))))
410 (file-name (git-file-name name version))
411 (sha256
412 (base32 "0kk9dlxdh7yms21npgrdfmjbj8q8ng6kdhrzw3jr2d7rp696kp99"))))
413 (build-system julia-build-system)
414 (arguments
415 '(#:tests? #f ; No runtests.jl
416 #:phases
417 (modify-phases %standard-phases
418 (add-after 'unpack 'override-binary-path
419 (lambda* (#:key inputs #:allow-other-keys)
420 (map
421 (lambda (wrapper)
422 (substitute* wrapper
423 (("generate_wrapper_header.*")
424 (string-append
425 "generate_wrapper_header(\"MbedTLS\", \""
426 (assoc-ref inputs "mbedtls-apache") "\")\n"))))
427 ;; There's a Julia file for each platform, override them all
428 (find-files "src/wrappers/" "\\.jl$"))
429 #t)))))
430 (inputs `(("mbedtls-apache" ,mbedtls-apache)))
431 (propagated-inputs `(("julia-jllwrappers" ,julia-jllwrappers)))
432 (home-page "https://github.com/JuliaBinaryWrappers/MbedTLS_jll.jl")
433 (synopsis "Apache's mbed TLS binary wrappers")
434 (description "This Julia module provides @code{mbed TLS} libraries and
435wrappers.")
436 (license license:expat)))
437
a5edd83d 438(define-public julia-nanmath
439 (package
440 (name "julia-nanmath")
441 (version "0.3.5")
442 (source
443 (origin
444 (method git-fetch)
445 (uri (git-reference
446 (url "https://github.com/mlubin/NaNMath.jl")
447 (commit (string-append "v" version))))
448 (file-name (git-file-name name version))
449 (sha256
450 (base32 "1hczhz00qj99w63vp627kwk02l2sr2qmzc2rkwwkdwvzy670p25q"))))
451 (build-system julia-build-system)
452 (home-page "https://github.com/mlubin/NaNMath.jl")
453 (synopsis "Implementations of basic math functions")
454 (description "Implementations of basic math functions which return
455@code{NaN} instead of throwing a @code{DomainError}.")
456 (license license:expat)))
457
eccd448c 458(define-public julia-orderedcollections
459 (package
460 (name "julia-orderedcollections")
461 (version "1.3.2")
462 (source
463 (origin
464 (method git-fetch)
465 (uri (git-reference
466 (url "https://github.com/JuliaCollections/OrderedCollections.jl")
467 (commit (string-append "v" version))))
468 (file-name (git-file-name name version))
469 (sha256
470 (base32 "0sfip1ixghsz91q2s7d62rgzw3gppg42fg6bccxlplqa3hfmbycf"))))
471 (build-system julia-build-system)
472 (home-page "https://github.com/JuliaCollections/OrderedCollections.jl")
473 (synopsis "Associative containers that preserve insertion order")
474 (description "This package implements @code{OrderedDicts} and
475@code{OrderedSets}, which are similar to containers in base Julia. However,
476during iteration the @code{Ordered*} containers return items in the order in
477which they were added to the collection.")
478 (license license:expat)))
c0c21d77 479
fb634a0e 480(define-public julia-offsetarrays
481 (package
482 (name "julia-offsetarrays")
483 (version "1.5.2")
484 (source
485 (origin
486 (method git-fetch)
487 (uri (git-reference
488 (url "https://github.com/JuliaArrays/OffsetArrays.jl")
489 (commit (string-append "v" version))))
490 (file-name (git-file-name name version))
491 (sha256
492 (base32 "1y3fnssw2hzyghrk6jfcxslab0f8sjkjszh482snfq4k6mkrhy77"))))
493 (build-system julia-build-system)
494 (propagated-inputs
495 `(("julia-adapt" ,julia-adapt)))
496 ;; CatIndices depends on OffsetArrays, introducing a recursive dependency
497 (arguments '(#:tests? #f))
498 (home-page "https://juliaarrays.github.io/OffsetArrays.jl/stable/")
499 (synopsis "Fortran-like arrays with arbitrary, zero or negative indices")
500 (description "@code{OffsetArrays.jl} provides Julia users with arrays that
501have arbitrary indices, similar to those found in some other programming
502languages like Fortran.")
503 (license license:expat)))
504
c0c21d77 505(define-public julia-parsers
506 (package
507 (name "julia-parsers")
508 (version "1.0.15")
509 (source
510 (origin
511 (method git-fetch)
512 (uri (git-reference
513 (url "https://github.com/JuliaData/Parsers.jl")
514 (commit (string-append "v" version))))
515 (file-name (git-file-name name version))
516 (sha256
517 (base32 "16iffl6l28kspgqch48mhi1s8qhspr3cpqcwsph3rqi72lbfqygx"))))
518 (build-system julia-build-system)
519 (home-page "https://github.com/JuliaData/Parsers.jl")
520 (synopsis "Fast parsing machinery for basic types in Julia")
521 (description "@code{Parsers.jl} is a collection of type parsers and
522utilities for Julia.")
523 (license license:expat)))
8f59a9fb 524
02543b52 525(define-public julia-reexport
526 (package
527 (name "julia-reexport")
528 (version "1.0.0")
529 (source
530 (origin
531 (method git-fetch)
532 (uri (git-reference
533 (url "https://github.com/simonster/Reexport.jl")
534 (commit version)))
535 (file-name (git-file-name name version))
536 (sha256
537 (base32 "1yhhja1zz6dy5f4fd19bdwd6jwgj7q4w3avzgyg1hjhmdl8jrh0s"))))
538 (build-system julia-build-system)
539 (home-page "https://github.com/simonster/Reexport.jl")
540 (synopsis "Re-export modules and symbols")
541 (description "This package provides tools to re-export modules and symbols.")
542 (license license:expat)))
543
8f59a9fb 544(define-public julia-uris
545 (package
546 (name "julia-uris")
547 (version "1.2.0")
548 (source
549 (origin
550 (method git-fetch)
551 (uri (git-reference
552 (url "https://github.com/JuliaWeb/URIs.jl")
553 (commit (string-append "v" version))))
554 (file-name (git-file-name name version))
555 (sha256
556 (base32 "0fqyagsqks5za7m0czafr34m2xh5501f689k9cn5x3npajdnh2r3"))))
557 (build-system julia-build-system)
558 (arguments
559 '(#:julia-package-name "URIs" ;required to run tests
560 #:phases
561 (modify-phases %standard-phases
562 (add-before 'check 'change-dir
563 ;; Tests must be run from the testdir
564 (lambda* (#:key source outputs #:allow-other-keys)
565 (let ((out (assoc-ref outputs "out")))
566 (chdir
567 (string-append out "/share/julia/packages/URIs/test")))
568 #t)))))
569 ;; required for tests
570 (inputs `(("julia-json" ,julia-json)))
571 (home-page "https://github.com/JuliaWeb/URIs.jl")
572 (synopsis "URI parsing in Julia")
573 (description "@code{URIs.jl} is a Julia package that allows parsing and
574working with @acronym{URIs,Uniform Resource Identifiers}, as defined in RFC
5753986.")
576 (license license:expat)))