(define-module (gnu packages julia-additions) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages) #:use-module (guix gexp) #:use-module (guix utils) #:use-module (guix packages) #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system julia) #:use-module (gnu packages gcc) #:use-module (gnu packages julia-jll) #:use-module (gnu packages julia-xyz) #:use-module (gnu packages maths) #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) #:use-module (gnu packages version-control)) (define-public julia-densityinterface (package (name "julia-densityinterface") (version "0.4.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/JuliaMath/DensityInterface.jl") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "10yr69lndh4jdyhjnpm421zvbw8v48bimxjawz05lqkd7k4w4lw6")))) (build-system julia-build-system) (native-inputs (list julia-documenter)) ;; required for tests (propagated-inputs (list julia-inversefunctions)) (home-page "https://github.com/JuliaMath/DensityInterface.jl") (synopsis "Interface for mathematical/statistical densities in Julia") (description "This package defines an interface for mathematical/statistical densities and objects associated with a density in Julia. See the documentation for details.") (license license:expat))) (define-public julia-hypergeometricfunctions (package (name "julia-hypergeomtericfunctions") (version "0.3.10") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/JuliaMath/HypergeometricFunctions.jl") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "191ma6jdizba4263924hs3vm9g0mhpnj63jsjnr5qb86sy0viwxx")))) (build-system julia-build-system) (propagated-inputs (list julia-dualnumbers julia-specialfunctions)) (home-page "https://github.com/JuliaMath/HypergeometricFunctions.jl") (synopsis "A Julia package for calculating hypergeometric functions") (description "This package implements the generalized hypergeometric function pFq([a1,…,am], [b1,…,bn], z). In particular, the Gauss hypergeometric function is available as _₂F₁(a, b, c, z), confluent hypergeometric function is available as _₁F₁(a, b, z) ≡ HypergeometricFunctions.M(a, b, z) and HypergeometricFunctions.U(a, b, z), as well as _₃F₂([a1, a2, a3], [b1, b2], z).") (license license:expat))) (define-public rmath-julia (package (name "rmath-julia") (version "0.4.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/JuliaStats/Rmath-julia") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0fkdc59ajpsbpk0p4h2q617r1nx71x0cc091rybx5glcrz9c3iy6")))) (build-system gnu-build-system) (arguments `(#:phases (modify-phases %standard-phases ;; no configure script (delete 'configure) ;; no install target (replace 'install (lambda _ (let ((lib (string-append %output "/lib")) (inc (string-append %output "/include"))) (mkdir-p lib) (mkdir-p inc) (copy-file "src/libRmath-julia.so" (string-append lib "/libRmath-julia.so")) (copy-file "include/Rmath.h" (string-append inc "/Rmath.h"))) #t)) (add-after 'install 'create-pkg-config-file (lambda* (#:key outputs #:allow-other-keys) (let ((pkgconfig (string-append %output "/lib/pkgconfig"))) (mkdir-p pkgconfig) (with-output-to-file (string-append pkgconfig "/libRmath-julia.pc") (lambda _ (format #t "includedir=~a/include~@ libdir=~a/lib~@ ~@ Name: libRmath-julia~@ Version: ~a~@ Description: The Rmath function library for julia~@ Libs: -L${libdir} -lRmath-julia -lm~@ Cflags: -I${includedir}~%" %output %output ,version))) #t)))) #:tests? #f)) ;no tests (home-page "https://github.com/JuliaStats/Rmath-julia") (synopsis "The Rmath library from R") (description "This is a slightly modified version of the standalone Rmath library from R, built to be used with the Rmath.jl Julia package. The main difference is that it is built to allow defining custom random number generating functions via C function pointers (see include/callback.h). When using the library, these should be defined before calling any of the random functions.") (license license:gpl2))) (define-public julia-rmath-jll (package (name "julia-rmath-jll") (version "0.4.0+0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/JuliaBinaryWrappers/Rmath_jll.jl") (commit (string-append "Rmath-v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "034qxhvxnb2hjl8zk2qjwz8wsl2jxcm0lzi1424gkc25xd5issia")))) (build-system julia-build-system) (arguments '(#:tests? #f ; no runtests #:phases (modify-phases %standard-phases (add-after 'link-depot 'override-binary-path (lambda* (#:key inputs #:allow-other-keys) (map (lambda (wrapper) (substitute* wrapper (("generate_wrapper_header.*") (string-append "generate_wrapper_header(\"Rmath\", \"" (assoc-ref inputs "rmath-julia") "\")\n")))) ;; There's a Julia file for each platform, override them all (find-files "src/wrappers/" "\\.jl$"))))))) (inputs (list rmath-julia)) (propagated-inputs (list julia-jllwrappers)) (home-page "https://github.com/JuliaBinaryWrappers/Rmath_jll.jl") (synopsis "Rmath-julia library wrappers") (description "This package provides a wrapper for the rmath-julia library.") (license license:expat))) (define-public julia-rmath (package (name "julia-rmath") (version "0.7.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/JuliaStats/Rmath.jl") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0sg768a98lkrzrnj2qbbgch6f5xhgd8q4c7jkvixy07xrp84wfdb")))) (build-system julia-build-system) (propagated-inputs (list julia-rmath-jll)) (home-page "https://github.com/JuliaStats/Rmath.jl") (synopsis "Archive of functions that emulate R's d-p-q-r functions for probability distributions") (description "Archive of functions that emulate R's d-p-q-r functions for probability distributions.") (license license:expat))) (define-public julia-statsfuns (package (name "julia-statsfuns") (version "1.3.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/JuliaStats/StatsFuns.jl") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1vx5vjr97in9qbss9bdaw109mc6h82wavkmyv0hf95mijprvvlav")))) (build-system julia-build-system) (native-inputs (list julia-forwarddiff julia-chainrulestestutils)) (propagated-inputs (list julia-chainrulescore julia-hypergeometricfunctions julia-inversefunctions julia-irrationalconstants julia-logexpfunctions julia-reexport julia-rmath julia-specialfunctions)) (home-page "https://github.com/JuliaStats/StatsFuns.jl") (synopsis "Mathematical functions related to statistics.") (description "This package provides a collection of mathematical constants and numerical functions for statistical computing.") (license license:expat))) (define-public julia-distributions (package (name "julia-distributions") (version "0.25.86") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/JuliaStats/Distributions.jl") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0icmxka445kqfc6p073fc9l0s4l56frxshhd95f31k0plrfla56s")))) (build-system julia-build-system) (arguments (list #:tests? #f)) ;; some tests failing (native-inputs (list julia-json julia-forwarddiff julia-finitedifferences julia-chainrulestestutils julia-stablerngs julia-calculus julia-densityinterface julia-staticarrays julia-offsetarrays)) (propagated-inputs (list julia-chainrulescore julia-densityinterface julia-fillarrays julia-pdmats julia-quadgk julia-specialfunctions julia-statsbase julia-statsfuns)) (home-page "https://github.com/JuliaStats/Distributions.jl") (synopsis "A Julia package for probability distributions and associated functions.") (description "A Julia package for probability distributions and associated functions. Particularly, Distributions implements: Moments (e.g mean, variance, skewness, and kurtosis), entropy, and other properties Probability density/mass functions (pdf) and their logarithm (logpdf) Moment generating functions and characteristic functions Sampling from a population or from a distribution Maximum likelihood estimation") (license license:expat))) (define-public julia-compositetypes (package (name "julia-compositetypes") (version "0.1.3") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/JuliaApproximation/CompositeTypes.jl") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0m4gsxk2b1v6r4i89f95s5hmn8zijwk4dmzw74wwnlqs25g17vcc")))) (build-system julia-build-system) (home-page "https://github.com/JuliaApproximation/CompositeTypes.jl") (synopsis "A common interface for composite types, which may consist of several components") (description "CompositeTypes.jl defines an interface for types that consist of multiple components.") (license license:expat))) (define-public julia-domainsets (package (name "julia-domainsets") (version "0.6.6") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/JuliaApproximation/DomainSets.jl") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0dpp3awhr67bhr0n7iwxir1jd8r6wvw8nwnmr9vhd1za8y6rpid2")))) (build-system julia-build-system) (arguments (list #:tests? #f)) ;; some tests failing (native-inputs (list julia-stablerngs)) (propagated-inputs (list julia-compositetypes julia-intervalsets julia-staticarrays)) (home-page "https://github.com/JuliaApproximation/DomainSets.jl") (synopsis "A Julia package for describing domains in Euclidean space") (description "DomainSets.jl is a package designed to represent simple infinite sets. The package makes it easy to represent sets, verify membership of the set, compare sets and construct new sets from existing ones. Domains are considered equivalent if they describe the same set, regardless of their type.") (license license:expat))) (define-public julia-functionwrapperswrappers (package (name "julia-functionwrapperswrappers") (version "0.1.2") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/chriselrod/FunctionWrappersWrappers.jl") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1jmx0dywwvjsz2474yk8b2d1n0dlbs2zjqvb3avhc4avzymm1y65")))) (build-system julia-build-system) (propagated-inputs (list julia-functionwrappers)) (home-page "https://github.com/chriselrod/FunctionWrappersWrappers.jl") (synopsis "If wrapping your functions once makes them better, why not try wrapping them twice?") (description "If wrapping your functions once makes them better, why not try wrapping them twice?") (license license:expat))) (define-public julia-snoopprecompile (package (name "julia-snoopprecompile") (version "2.10.3") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/timholy/SnoopCompile.jl") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1dxxiv4jd91mj2xrjldd76r7xvibxa6mj2ff61ynpvqamkl0phai")))) (build-system julia-build-system) (propagated-inputs (list julia-preferences)) (home-page "https://timholy.github.io/SnoopCompile.jl/dev/") (synopsis "Making packages work faster with more extensive precompilation") (description "SnoopPrecompile is a small dependency used to effectively precompile code needed by your package, particularly on Julia 1.8 and higher.") (license license:expat))) (define-public julia-formatter (package (name "julia-formatter") (version "1.0.25") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/domluna/JuliaFormatter.jl") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1jmx0dywwvjsz2474yk8b2d1n0dlbs2zjqvb3avhc4avzymm1y65")))) (build-system julia-build-system) (propagated-inputs (list julia-functionwrappers)) (home-page "https://domluna.github.io/JuliaFormatter.jl/dev/") (synopsis "An opinionated code formatter for Julia. Plot twist - the opinion is your own.") (description "Width-sensitive formatter for Julia code. Inspired by gofmt, refmt, and black.") (license license:expat))) (define-public julia-graphs (package (name "julia-graphs") (version "1.8.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/JuliaGraphs/Graphs.jl") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "010h4llvlqmcrdv9yp6ynjfzi9fym2b4igcq7mjbkrrc8nk710zx")))) (build-system julia-build-system) (native-inputs (list julia-aqua julia-documenter julia-formatter)) (propagated-inputs (list julia-arnoldimethod julia-compat julia-datastructures julia-inflate julia-simpletraits)) (home-page "https://juliagraphs.org/Graphs.jl/dev/") (synopsis "An optimized graphs package for the Julia programming language") (description "The goal of Graphs.jl is to offer a performant platform for network and graph analysis in Julia, following the example of libraries such as NetworkX in Python. To this end, Graphs.jl offers: a set of simple, concrete graph implementations -- SimpleGraph (for undirected graphs) and SimpleDiGraph (for directed graphs) an API for the development of more sophisticated graph implementations under the AbstractGraph type a large collection of graph algorithms with the same requirements as this API.") (license license:expat))) (define-public julia-performancetesttools (package (name "julia-performancetesttools") (version "0.1.3") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/JuliaTesting/PerformanceTestTools.jl") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0v5b8vnnhavra18h0136gahiyl7nc6r3rm3hm359ic3da8yzrnhn")))) (build-system julia-build-system) (home-page "https://juliatesting.github.io/PerformanceTestTools.jl/stable/") (synopsis "Test generated IRs inside CI with efficient code generation.") (description "Testing generated IRs inside CI is useful for avoiding performance regression. However, test suites are normally run under flags like --check-bounds=yes and --code-coverage=user which block julia compiler to generate efficient code. PerformanceTestTools.@include(script) automatically detects such flags and run the script in a separate julia process started without these flags.") (license license:expat))) (define-public julia-staticarrayscore (package (name "julia-staticarrayscore") (version "1.4.2") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/JuliaArrays/StaticArraysCore.jl") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0m573mxvf0y9h7y8rxrk35haphhqisplx159r77g30qvw7zwpgar")))) (build-system julia-build-system) (home-page "https://github.com/JuliaArrays/StaticArraysCore.jl") (synopsis "Interface package for StaticArrays.jl") (description "Interface package for StaticArrays.jl") (license license:expat))) (define-public julia-staticnumbers (package (name "julia-staticnumbers") (version "0.4.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/perrutquist/StaticNumbers.jl") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1m6drdyxgizc6d5qak9l6c2dv8nb6x5kj7sgfxkgwnfxf6ran257")))) (build-system julia-build-system) (native-inputs (list julia-staticarrays julia-simd)) (home-page "https://github.com/perrutquist/StaticNumbers.jl") (synopsis "Static numbers in Julia") (description "Static numbers in Julia") (license license:expat))) (define-public julia-quicktypes (package (name "julia-quicktypes") (version "1.8.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/cstjean/QuickTypes.jl") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1ndx6bnv4lic6m2iss9s18ip3dg1a8dkgx0qj0vjgij5n1999r33")))) (build-system julia-build-system) (native-inputs (list julia-macrotools julia-constructionbase)) (home-page "https://github.com/cstjean/QuickTypes.jl") (synopsis "Concise type definitions") (description "Concise type definitions") (license license:expat))) (define-public julia-setfield (package (name "julia-setfield") (version "1.1.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/jw3126/Setfield.jl") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0vdn9s639f120560599m4lhqkk0nsx7qa87fv2mixs1faaihsf6l")))) (build-system julia-build-system) (arguments (list #:phases #~(modify-phases %standard-phases (add-after 'unpack 'fix-test-examples-path (lambda _ (substitute* "test/test_examples.jl" (("\"..\"") "\".\"") (("joinpath\\(dir, filename\\)") "joinpath(\"..\", \"examples\", filename)")))) (add-after 'unpack 'disable-failing-tests (lambda _ (substitute* "test/test_setmacro.jl" (("\\@test m2 === \\@SMatrix \\[0 1; 0 0\\]" all) (string-append "#" all)) (("\\@test m3 === \\@SMatrix\\[1 0; 0 0\\]" all) (string-append "#" all))) (substitute* "test/test_staticarrays.jl" (("\\@test \\(\\@set v\\[1\\] = 10\\) === \\@SVector \\[10,2,3\\]" all) (string-append "#" all)) (("\\@test set\\(obj, l1, 3000\\) === set\\(obj, l2, 3000\\) === \\(a=m_mod, b=4\\)" all) (string-append "#" all))) (substitute* "test/perf.jl" (("\\@test te_lens\\.memory == te_hand\\.memory" all) (string-append "#" all)) (("@test te_lens.allocs == te_hand.allocs" all) (string-append "#" all)) (("\\@test uniquecounts\\(heads_lens\\) == uniquecounts\\(heads_hand\\)" all) (string-append "#" all)) (("\\@test Set\\(heads_lens\\) == Set\\(heads_hand\\)" all) (string-append "#" all)))))))) (native-inputs (list julia-performancetesttools julia-documenter julia-staticarrays julia-staticnumbers julia-quicktypes julia-benchmarktools)) (propagated-inputs (list julia-macrotools julia-staticarrayscore julia-constructionbase)) (home-page "https://jw3126.github.io/Setfield.jl/latest/intro/") (synopsis "Update deeply nested immutable structs.") (description "Update deeply nested immutable structs.") (license license:expat))) (define-public julia-argcheck (package (name "julia-arcgheck") (version "2.1.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/jw3126/ArgCheck.jl") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "13mkcq4ln1vm9hxk3rxs6gcrddbs01bapvp3wb39xqvpb6q3fv6h")))) (build-system julia-build-system) (native-inputs (list julia-benchmarktools)) (home-page "https://github.com/jw3126/ArgCheck.jl") (synopsis "Package for checking function arguments") (description "Package for checking function arguments") (license license:expat))) (define-public julia-initialvalues (package (name "julia-initialvalues") (version "0.3.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/JuliaFolds/InitialValues.jl") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "13gihn824c3vxrpm6vg06vr6zmmy43j1qyya48jig8rdkjp820n6")) (modules '((guix build utils))) (snippet '(begin ;; delete tests to break cyclic dependency (delete-file "test/test_aqua.jl") (delete-file "test/interop/test_bangbang.jl"))))) (build-system julia-build-system) (native-inputs (list julia-setfield)) (home-page "https://github.com/JuliaFolds/InitialValues.jl") (synopsis "Canonical default initial values and identity elements for Julia") (description "Canonical default initial values and identity elements for Julia") (license license:expat))) (define-public julia-bangbang (package (name "julia-bangbang") (version "0.3.37") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/JuliaFolds/BangBang.jl") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0zclsibwmxk47mjlflp6zrnzqnazi04qclpcgvabwga8x351qscw")) (modules '((guix build utils))) (snippet '(begin ;; delete failing tests (delete-file "test/test_staticarrays.jl"))))) (build-system julia-build-system) (arguments (list #:phases #~(modify-phases %standard-phases (add-after 'unpack 'disable-failing-tests (lambda _ (substitute* "test/__test_ir.jl" (("\\@test nmatches\\(r\"fmul <\\[0\\-9\\]\\+ x double>\", ir_noinbounds\\) == 0" all) (string-append "#" all)))))))) (native-inputs (list julia-compat julia-constructionbase julia-initialvalues julia-requires julia-tables julia-zygoterules julia-setfield julia-staticarrays julia-structarrays julia-adapt julia-aqua julia-categoricalarrays julia-dataframes julia-performancetesttools julia-typedtables)) (home-page "https://github.com/JuliaFolds/BangBang.jl") (synopsis "Immutables as mutables, mutables as immutables.") (description "BangBang.jl implements functions whose name ends with !!. Those functions provide a uniform interface for mutable and immutable data structures. Furthermore, those functions implement the \"widening\" fallback for the case when the usual mutating function does not work (e.g., push!!(Int[], 1.5) creates a new array Float64[1.5]).") (license license:expat))) (define-public julia-transducers (package (name "julia-transducers") (version "0.4.76") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/JuliaFolds/Transducers.jl") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1rgpp8pba2wa8abb6cgi45axs3ppfxv7sxlhx463k4mpa98s5rxq")))) (build-system julia-build-system) (arguments (list #:phases #~(modify-phases %standard-phases (add-after 'unpack 'remove-imports (lambda _ (substitute* "test/runtests.jl" (("import LoadAllPackages") ""))))))) (native-inputs (list julia-performancetesttools julia-adapt julia-setfield julia-tables julia-argcheck julia-bangbang)) ;;(propagated-inputs ;; (list julia-arnoldimethod ;; julia-compat ;; julia-datastructures ;; julia-inflate ;; julia-simpletraits)) (home-page "https://juliafolds.github.io/Transducers.jl/dev/") (synopsis "Efficient transducers for Julia") (description "Transducers are transformations of \"sequence\" of input that can be composed very efficiently. The interface used by transducers naturally describes a wide range of processes that is expressible as a succession of steps. Furthermore, transducers can be defined without specifying the details of the input and output (collections, streams, channels, etc.) and therefore achieves a full reusabilIty. Transducers are introduced by Rich Hickey, the creator of the Clojure language. His Strange Loop talk is a great introduction to the idea of transducers.") (license license:expat))) julia-transducers