| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 |
|
| 27 | (define-module (gnu packages julia)
|
| 28 | #:use-module ((guix licenses) #:prefix license:)
|
| 29 | #:use-module (guix packages)
|
| 30 | #:use-module (guix download)
|
| 31 | #:use-module (guix utils)
|
| 32 | #:use-module (guix git-download)
|
| 33 | #:use-module (guix build-system gnu)
|
| 34 | #:use-module ((guix search-paths) #:select ($SSL_CERT_FILE))
|
| 35 | #:use-module (gnu packages)
|
| 36 | #:use-module (gnu packages algebra)
|
| 37 | #:use-module (gnu packages base)
|
| 38 | #:use-module (gnu packages bash)
|
| 39 | #:use-module (gnu packages compression)
|
| 40 | #:use-module (gnu packages curl)
|
| 41 | #:use-module (gnu packages elf)
|
| 42 | #:use-module (gnu packages gcc)
|
| 43 | #:use-module (gnu packages llvm)
|
| 44 | #:use-module (gnu packages libevent)
|
| 45 | #:use-module (gnu packages libunwind)
|
| 46 | #:use-module (gnu packages maths)
|
| 47 | #:use-module (gnu packages multiprecision) |
| 48 | #:use-module (gnu packages pcre)
|
| 49 | #:use-module (gnu packages perl)
|
| 50 | #:use-module (gnu packages pkg-config)
|
| 51 | #:use-module (gnu packages python)
|
| 52 | #:use-module (gnu packages python-xyz)
|
| 53 | #:use-module (gnu packages textutils)
|
| 54 | #:use-module (gnu packages ssh)
|
| 55 | #:use-module (gnu packages tls)
|
| 56 | #:use-module (gnu packages version-control)
|
| 57 | #:use-module (gnu packages web)
|
| 58 | #:use-module (gnu packages wget)
|
| 59 | #:use-module (ice-9 match))
|
| 60 |
|
| 61 | (define libunwind-julia
|
| 62 | |
| 63 | |
| 64 | (package
|
| 65 | (inherit libunwind)
|
| 66 | (name "libunwind-julia")
|
| 67 | (version "1.5.0")
|
| 68 | (source
|
| 69 | (origin
|
| 70 | (method url-fetch)
|
| 71 | (uri (string-append "mirror://savannah/libunwind/libunwind-"
|
| 72 | version ".tar.gz"))
|
| 73 | (sha256
|
| 74 | (base32
|
| 75 | "05qhzcg1xag3l5m3c805np6k342gc0f3g087b7g16jidv59pccwh"))
|
| 76 | (patches
|
| 77 | (list
|
| 78 | (julia-patch "libunwind-prefer-extbl"
|
| 79 | "0pf3lsq6zxlmqn86lk4fcj1xwdan9gbxyabrwgxcb59p8jjwsl8r")
|
| 80 | (julia-patch "libunwind-static-arm"
|
| 81 | "1jk3bmiw61ypcchqkk1fyg5wh8wpggk574wxyfyaic870zh3lhgq")
|
| 82 | (julia-patch "libunwind-cfa-rsp"
|
| 83 | "0qs5b1h5lsr5qakkv6sddgy5ghlxpjrn2jiqcvg7bkczy24klr6j")))))
|
| 84 | (arguments
|
| 85 | (substitute-keyword-arguments arguments
|
| 86 | |
| 87 | ((#:tests? _ #t) #f)))
|
| 88 | (home-page "https://github.com/JuliaLang/julia/tree/master/deps/")))
|
| 89 |
|
| 90 | (define (julia-patch-url version name)
|
| 91 | (string-append "https://raw.githubusercontent.com/JuliaLang/julia/v" version
|
| 92 | "/deps/patches/" name ".patch"))
|
| 93 |
|
| 94 | (define-public (julia-patch name sha)
|
| 95 | (let ((version "1.8.2"))
|
| 96 | (origin (method url-fetch)
|
| 97 | (uri (julia-patch-url version name))
|
| 98 | (sha256 (base32 sha))
|
| 99 | (file-name name))))
|
| 100 |
|
| 101 | (define-public libwhich
|
| 102 | (package
|
| 103 | (name "libwhich")
|
| 104 | (version "1.1.0")
|
| 105 | (source
|
| 106 | (origin
|
| 107 | (method git-fetch)
|
| 108 | (uri (git-reference
|
| 109 | (url "https://github.com/vtjnash/libwhich")
|
| 110 | |
| 111 | (commit "87cffe10080c98e7b5786c5166e420bf1ada1d41")))
|
| 112 | (file-name (string-append name "-" version "-checkout"))
|
| 113 | (sha256
|
| 114 | (base32
|
| 115 | "1bpa0fcqpa3ai3hm8mz0p13bf76fsq53wsfcx5qw302zh22108xr"))))
|
| 116 | (arguments
|
| 117 | `(#:make-flags
|
| 118 | (list (string-append "CC=" ,(cc-for-target)))
|
| 119 | #:phases
|
| 120 | (modify-phases %standard-phases
|
| 121 | (delete 'configure)
|
| 122 | (add-before 'check 'set-ld-library-path
|
| 123 | (lambda* (#:key native-inputs inputs #:allow-other-keys)
|
| 124 | (setenv "LD_LIBRARY_PATH"
|
| 125 | (string-append (assoc-ref (or native-inputs inputs) "zlib")
|
| 126 | "/lib"))))
|
| 127 | (replace 'install
|
| 128 | (lambda* (#:key outputs #:allow-other-keys)
|
| 129 | (let ((out (assoc-ref outputs "out")))
|
| 130 | (install-file "libwhich" (string-append out "/bin")))
|
| 131 | #t)))))
|
| 132 | (native-inputs
|
| 133 | |
| 134 | (list zlib))
|
| 135 | (build-system gnu-build-system)
|
| 136 | (home-page "https://github.com/vtjnash/libwhich")
|
| 137 | (synopsis "Like @code{which}, for dynamic libraries")
|
| 138 | (description "@code{libwhich} is like @code{which}, but for dynamic
|
| 139 | libraries. It is also a bit like @code{ldd} and @code{otool -L}.")
|
| 140 | (license license:expat)))
|
| 141 |
|
| 142 | (define-public julia
|
| 143 | (package
|
| 144 | (name "julia")
|
| 145 | (version "1.8.5")
|
| 146 | (source (origin
|
| 147 | (method url-fetch)
|
| 148 | (uri (string-append
|
| 149 | "https://github.com/JuliaLang/julia/releases/download/v"
|
| 150 | version "/julia-" version ".tar.gz"))
|
| 151 | (sha256
|
| 152 | (base32
|
| 153 | "0c9hfksqlillwj8l5plbrv9cjajmnkarzz96rsmi8p97dg62c46k"))
|
| 154 | (patches (search-patches "julia-SOURCE_DATE_EPOCH-mtime.patch"
|
| 155 | "julia-Use-MPFR-4.2.patch"))))
|
| 156 | (build-system gnu-build-system)
|
| 157 | (arguments
|
| 158 | `(#:test-target "test"
|
| 159 | #:modules ((ice-9 match)
|
| 160 | (guix build gnu-build-system)
|
| 161 | (guix build utils))
|
| 162 |
|
| 163 | |
| 164 | |
| 165 | #:tests? ,(not (or (%current-target-system)
|
| 166 | (target-aarch64?)))
|
| 167 |
|
| 168 | |
| 169 | |
| 170 | #:strip-binaries? #f
|
| 171 |
|
| 172 | |
| 173 | |
| 174 | #:validate-runpath? #f
|
| 175 |
|
| 176 | #:phases
|
| 177 | (modify-phases %standard-phases
|
| 178 | (delete 'configure)
|
| 179 | (add-after 'unpack 'prepare-deps
|
| 180 | (lambda* (#:key inputs #:allow-other-keys)
|
| 181 | |
| 182 | (setenv "LD_LIBRARY_PATH"
|
| 183 | (string-join (map (lambda (pkg)
|
| 184 | (string-append (assoc-ref inputs pkg)
|
| 185 | "/lib"))
|
| 186 | '("curl" "dsfmt"
|
| 187 | "gmp" "lapack"
|
| 188 | "libssh2" "libnghttp2" "libgit2"
|
| 189 | "libblastrampoline"
|
| 190 | "mbedtls" "mpfr"
|
| 191 | "openblas" "openlibm" "pcre2"
|
| 192 | "suitesparse" "gfortran:lib"))
|
| 193 | ":"))))
|
| 194 | |
| 195 | |
| 196 | |
| 197 | (add-after 'unpack 'disable-documentation
|
| 198 | (lambda _
|
| 199 | (substitute* "Makefile"
|
| 200 | (("(install: .*) \\$\\(BUILDROOT\\)/doc/_build/html/en/index.html" _ line)
|
| 201 | (string-append line "\n"))
|
| 202 | (("src ui doc deps")
|
| 203 | "src ui deps"))))
|
| 204 | (add-after 'unpack 'activate-gnu-source-for-loader
|
| 205 | (lambda _
|
| 206 | (substitute* "cli/Makefile"
|
| 207 | (("LOADER_CFLAGS =") "LOADER_CFLAGS = -D_GNU_SOURCE"))))
|
| 208 | |
| 209 | |
| 210 | (add-after 'unpack 'make-libquadmath-optional
|
| 211 | (lambda _
|
| 212 | (substitute* "base/Makefile"
|
| 213 | (("libquadmath,0") "libquadmath,0,ALLOW_FAILURE"))))
|
| 214 | (add-before 'check 'set-home
|
| 215 | |
| 216 | (lambda _ (setenv "HOME" "/tmp")))
|
| 217 | (add-before 'build 'fix-include-and-link-paths
|
| 218 | (lambda* (#:key inputs #:allow-other-keys)
|
| 219 | |
| 220 | (substitute* "cli/Makefile"
|
| 221 | (("JLDFLAGS \\+= ")
|
| 222 | (string-append "JLDFLAGS += "
|
| 223 | (assoc-ref inputs "libuv")
|
| 224 | "/lib/libuv.so ")))))
|
| 225 | (add-before 'build 'replace-default-shell
|
| 226 | (lambda* (#:key inputs #:allow-other-keys)
|
| 227 | (substitute* "base/client.jl"
|
| 228 | (("/bin/sh") (search-input-file inputs "/bin/sh")))))
|
| 229 | (add-before 'build 'shared-objects-paths
|
| 230 | (lambda* (#:key inputs #:allow-other-keys)
|
| 231 | (let ((jlpath
|
| 232 | (lambda (pkgname)
|
| 233 | (string-append
|
| 234 | "stdlib/" pkgname "_jll/src/" pkgname "_jll.jl")))
|
| 235 | (from
|
| 236 | (lambda (libname)
|
| 237 | (string-append "const " libname " = .*\\.so")))
|
| 238 | (to
|
| 239 | (lambda* (pkg libname #:optional libname_jl)
|
| 240 | (string-append
|
| 241 | "const " (or libname_jl libname) " = \""
|
| 242 | (assoc-ref inputs pkg) "/lib/" libname ".so"))))
|
| 243 | (substitute* (jlpath "CompilerSupportLibraries")
|
| 244 | (((from "libgfortran"))
|
| 245 | (string-append "const libgfortran = string(\""
|
| 246 | (search-input-file inputs "/lib/libgfortran.so"))))
|
| 247 | (substitute* (jlpath "dSFMT")
|
| 248 | (((from "libdSFMT")) (to "dsfmt" "libdSFMT")))
|
| 249 | (substitute* (jlpath "GMP")
|
| 250 | (((from "libgmp")) (to "gmp" "libgmp"))
|
| 251 | (((from "libgmpxx")) (to "gmp" "libgmpxx")))
|
| 252 | (substitute* (jlpath "libLLVM")
|
| 253 | (((from "libLLVM")) (to "llvm" "libLLVM")))
|
| 254 | (substitute* (jlpath "LibCURL")
|
| 255 | (((from "libcurl")) (to "curl" "libcurl")))
|
| 256 | (substitute* (jlpath "LibGit2")
|
| 257 | (((from "libgit2")) (to "libgit2" "libgit2")))
|
| 258 | (substitute* (jlpath "LibSSH2")
|
| 259 | (((from "libssh2")) (to "libssh2" "libssh2")))
|
| 260 | (substitute* (jlpath "LibUV")
|
| 261 | (((from "libuv")) (to "libuv" "libuv")))
|
| 262 | (substitute* (jlpath "LibUnwind")
|
| 263 | (((from "libunwind")) (to "libunwind" "libunwind")))
|
| 264 | (substitute* (jlpath "MPFR")
|
| 265 | (((from "libmpfr")) (to "mpfr" "libmpfr")))
|
| 266 | (substitute* (jlpath "MbedTLS")
|
| 267 | (((from "libmbedcrypto")) (to "mbedtls" "libmbedcrypto"))
|
| 268 | (((from "libmbedtls")) (to "mbedtls" "libmbedtls"))
|
| 269 | (((from "libmbedx509")) (to "mbedtls" "libmbedx509")))
|
| 270 | (substitute* (jlpath "nghttp2")
|
| 271 | (((from "libnghttp2")) (to "libnghttp2" "libnghttp2")))
|
| 272 | (substitute* (jlpath "OpenBLAS")
|
| 273 | (((from "libopenblas"))
|
| 274 | ,@(if (target-x86-64?)
|
| 275 | `((to "openblas" "libopenblas64_" "libopenblas"))
|
| 276 | `((to "openblas" "libopenblas")))))
|
| 277 | (substitute* (jlpath "OpenLibm")
|
| 278 | (((from "libopenlibm")) (to "openlibm" "libopenlibm")))
|
| 279 | (substitute* (jlpath "PCRE2")
|
| 280 | (((from "libpcre2_8")) (to "pcre2" "libpcre2-8" "libpcre2_8")))
|
| 281 | (substitute* (jlpath "SuiteSparse")
|
| 282 | (((from "libamd")) (to "suitesparse" "libamd"))
|
| 283 | (((from "libbtf")) (to "suitesparse" "libbtf"))
|
| 284 | (((from "libcamd")) (to "suitesparse" "libcamd"))
|
| 285 | (((from "libccolamd")) (to "suitesparse" "libccolamd"))
|
| 286 | (((from "libcholmod")) (to "suitesparse" "libcholmod"))
|
| 287 | (((from "libcolamd")) (to "suitesparse" "libcolamd"))
|
| 288 | (((from "libklu")) (to "suitesparse" "libklu"))
|
| 289 | (((from "libldl")) (to "suitesparse" "libldl"))
|
| 290 | (((from "librbio")) (to "suitesparse" "librbio"))
|
| 291 | (((from "libspqr")) (to "suitesparse" "libspqr"))
|
| 292 | (((from "libsuitesparse")) (to "suitesparse" "libsuitesparse"))
|
| 293 | (((from "libsuitesparseconfig"))
|
| 294 | (to "suitesparse" "libsuitesparseconfig"))
|
| 295 | (((from "libumfpack")) (to "suitesparse" "libumfpack")))
|
| 296 | (substitute* (jlpath "Zlib")
|
| 297 | (((from "libz")) (to "zlib" "libz")))
|
| 298 | (substitute* (jlpath "libblastrampoline")
|
| 299 | (("libblastrampoline\\.so")
|
| 300 | (search-input-file inputs "/lib/libblastrampoline.so"))))))
|
| 301 | (add-before 'build 'use-ssl-cert-file
|
| 302 | (lambda _
|
| 303 | |
| 304 | (substitute* "stdlib/MozillaCACerts_jll/src/MozillaCACerts_jll.jl"
|
| 305 | (("global cacert = .*")
|
| 306 | (string-append
|
| 307 | "global cacert = get(ENV, \"SSL_CERT_FILE\","
|
| 308 | |
| 309 | "\"/etc/ssl/certs/ca-certificates.crt\")\n")))))
|
| 310 | (add-after 'unpack 'enable-parallel-tests
|
| 311 | (lambda* (#:key parallel-tests? #:allow-other-keys)
|
| 312 | (when parallel-tests?
|
| 313 | (setenv "JULIA_TEST_USE_MULTIPLE_WORKERS" "true"))))
|
| 314 | (add-after 'unpack 'adjust-test-suite
|
| 315 | (lambda* (#:key inputs #:allow-other-keys)
|
| 316 | (substitute* "test/spawn.jl"
|
| 317 | (("shcmd = `sh`") (string-append "shcmd = `" (which "sh") "`")))
|
| 318 | |
| 319 | (substitute* "stdlib/PCRE2_jll/test/runtests.jl"
|
| 320 | (("10.40.0") ,(package-version (this-package-input "pcre2"))))
|
| 321 | (substitute* "stdlib/MbedTLS_jll/test/runtests.jl"
|
| 322 | (("2.28.0") ,(package-version (this-package-input "mbedtls"))))
|
| 323 | (substitute* "stdlib/MPFR_jll/test/runtests.jl"
|
| 324 | (("4.1.0") ,(package-version (this-package-input "mpfr"))))
|
| 325 | (substitute* "stdlib/GMP_jll/test/runtests.jl"
|
| 326 | (("6.2.1") ,(package-version (this-package-input "gmp"))))
|
| 327 | (substitute* "stdlib/LibGit2_jll/test/runtests.jl"
|
| 328 | (("1.3.0") ,(package-version (this-package-input "libgit2"))))
|
| 329 | (substitute* "stdlib/nghttp2_jll/test/runtests.jl"
|
| 330 | (("1.48.0") ,(package-version (this-package-input "libnghttp2"))))
|
| 331 | (substitute* "stdlib/Zlib_jll/test/runtests.jl"
|
| 332 | (("1.2.12") ,(package-version (this-package-input "zlib"))))
|
| 333 | (substitute* "stdlib/SuiteSparse_jll/test/runtests.jl"
|
| 334 | (("5010") ,(string-replace-substring
|
| 335 | (version-major+minor
|
| 336 | (package-version
|
| 337 | (this-package-input "suitesparse"))) "." "0")))))
|
| 338 | (add-before 'check 'disable-broken-tests
|
| 339 | (lambda _
|
| 340 | |
| 341 | |
| 342 | |
| 343 | |
| 344 | (substitute* "test/choosetests.jl"
|
| 345 | (("\"cmdlineargs\",") "")
|
| 346 | (("\"precompile\",") ""))
|
| 347 | |
| 348 | |
| 349 | (substitute* "stdlib/Dates/test/io.jl"
|
| 350 | (("using Dates") "import Dates
|
| 351 | using Dates: @dateformat_str, Date, DateTime, DateFormat, Time"))
|
| 352 | |
| 353 | (substitute* "stdlib/MozillaCACerts_jll/test/runtests.jl"
|
| 354 | (("@test isfile\\(MozillaCACerts_jll.cacert\\)")
|
| 355 | "@test_broken isfile(MozillaCACerts_jll.cacert)"))
|
| 356 | |
| 357 | (substitute* "usr/share/julia/stdlib/v1.8/NetworkOptions/test/runtests.jl"
|
| 358 | (("@test isfile\\(bundled_ca_roots\\(\\)\\)")
|
| 359 | "@test_broken isfile(bundled_ca_roots())")
|
| 360 | (("@test ispath\\(ca_roots_path\\(\\)\\)")
|
| 361 | "@test_broken ispath(ca_roots_path())")
|
| 362 | (("@test ca_roots_path\\(\\) \\!= bundled_ca_roots\\(\\)")
|
| 363 | "@test_broken ca_roots_path() != bundled_ca_roots()"))
|
| 364 | |
| 365 | |
| 366 | |
| 367 | |
| 368 | (substitute* "test/cmdlineargs.jl"
|
| 369 | (("test v\\[3") "test_broken v[3")
|
| 370 | (("test isempty\\(v\\[3") "test_broken isempty(v[3"))
|
| 371 | |
| 372 | (substitute* "test/math.jl"
|
| 373 | |
| 374 | |
| 375 | (("@test isinf\\(log1p\\(-one\\(T\\)\\)\\)")
|
| 376 | " "))
|
| 377 |
|
| 378 | |
| 379 | |
| 380 | (substitute* "stdlib/LinearAlgebra/test/lu.jl"
|
| 381 | (("@test String") "@test_skip String"))
|
| 382 |
|
| 383 | (substitute* "stdlib/InteractiveUtils/test/runtests.jl"
|
| 384 | (("@test !occursin\\(\"Environment")
|
| 385 | "@test_broken !occursin(\"Environment")
|
| 386 | (("@test occursin\\(\"Environment")
|
| 387 | "@test_broken occursin(\"Environment"))
|
| 388 | (substitute* "usr/share/julia/stdlib/v1.8/Statistics/test/runtests.jl"
|
| 389 | (("@test cov\\(A") "@test_skip cov(A")
|
| 390 | (("@test isfinite") "@test_skip isfinite"))
|
| 391 | |
| 392 | (substitute* "usr/share/julia/stdlib/v1.8/SuiteSparse/test/runtests.jl"
|
| 393 | (("Base\\.USE_GPL_LIBS") "false"))
|
| 394 | |
| 395 | |
| 396 | |
| 397 | (substitute* "stdlib/LinearAlgebra/test/schur.jl"
|
| 398 | (("f = schur\\(A, B\\)") "f = schur(A, A)")
|
| 399 | (("@test f\\.Q\\*f\\.S\\*f\\.Z'.*") "\n")
|
| 400 | (("@test f\\.Q\\*f\\.T\\*f\\.Z'.*") "\n"))
|
| 401 | (substitute* "test/threads.jl"
|
| 402 | (("@test success") "@test_broken success"))))
|
| 403 | |
| 404 | (add-after 'install 'symlink-missing-libraries
|
| 405 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 406 | (let* ((out (assoc-ref outputs "out"))
|
| 407 | (link
|
| 408 | (lambda (pkgname pred)
|
| 409 | (map (lambda (file)
|
| 410 | (unless (file-exists?
|
| 411 | (string-append out "/lib/julia/"
|
| 412 | (basename file)))
|
| 413 | (symlink file (string-append out "/lib/julia/"
|
| 414 | (basename file)))))
|
| 415 | (find-files (string-append (assoc-ref inputs pkgname)
|
| 416 | "/lib") pred)))))
|
| 417 | (link "libunwind" "libunwind\\.so")
|
| 418 | (link "llvm" "libLLVM-13jl\\.so")
|
| 419 | (link "utf8proc" "libutf8proc\\.so")
|
| 420 | (link "zlib" "libz\\.so"))))
|
| 421 | (add-after 'install 'make-wrapper
|
| 422 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 423 | (let* ((out (assoc-ref outputs "out"))
|
| 424 | (bin (string-append out "/bin"))
|
| 425 | (program "julia"))
|
| 426 | (with-directory-excursion bin
|
| 427 | (wrap-program program
|
| 428 | `("JULIA_LOAD_PATH" ":" prefix
|
| 429 | ("" "$JULIA_LOAD_PATH"))
|
| 430 | `("JULIA_DEPOT_PATH" ":" prefix
|
| 431 | ("" "$JULIA_DEPOT_PATH"))))))))
|
| 432 | #:make-flags
|
| 433 | (list
|
| 434 | "VERBOSE=1" |
| 435 | (string-append "prefix=" (assoc-ref %outputs "out"))
|
| 436 |
|
| 437 | |
| 438 | |
| 439 | |
| 440 | ,(match (or (%current-target-system)
|
| 441 | (%current-system))
|
| 442 | ("x86_64-linux"
|
| 443 | |
| 444 | "JULIA_CPU_TARGET=generic;generic,-cx16,clone_all;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)")
|
| 445 | ("i686-linux" "MARCH=pentium4")
|
| 446 | ("armhf-linux" "JULIA_CPU_TARGET=armv7-a,neon")
|
| 447 | ("powerpc64le-linux" "JULIA_CPU_TARGET=pwr8")
|
| 448 | |
| 449 | |
| 450 | |
| 451 | (_ "JULIA_CPU_TARGET=generic"))
|
| 452 |
|
| 453 | "CONFIG_SHELL=bash -x" |
| 454 | "USE_BINARYBUILDER=0"
|
| 455 | |
| 456 | |
| 457 | "USE_SYSTEM_CSL=1"
|
| 458 | "USE_SYSTEM_LLVM=1"
|
| 459 | "USE_SYSTEM_LIBUNWIND=1"
|
| 460 | "USE_SYSTEM_PCRE=1"
|
| 461 | "USE_SYSTEM_OPENLIBM=1"
|
| 462 | "USE_SYSTEM_DSFMT=1"
|
| 463 | "USE_SYSTEM_LIBBLASTRAMPOLINE=1"
|
| 464 | "USE_SYSTEM_BLAS=1"
|
| 465 | "USE_SYSTEM_LAPACK=1"
|
| 466 | "USE_SYSTEM_GMP=1"
|
| 467 | "USE_SYSTEM_MPFR=1"
|
| 468 | "USE_SYSTEM_LIBSUITESPARSE=1"
|
| 469 | "USE_SYSTEM_LIBUV=1"
|
| 470 | "USE_SYSTEM_UTF8PROC=1"
|
| 471 | "USE_SYSTEM_MBEDTLS=1"
|
| 472 | "USE_SYSTEM_LIBSSH2=1"
|
| 473 | "USE_SYSTEM_NGHTTP2=1"
|
| 474 | "USE_SYSTEM_CURL=1"
|
| 475 | "USE_SYSTEM_LIBGIT2=1"
|
| 476 | "USE_SYSTEM_PATCHELF=1"
|
| 477 | "USE_SYSTEM_LIBWHICH=1"
|
| 478 | "USE_SYSTEM_ZLIB=1"
|
| 479 | "USE_SYSTEM_P7ZIP=1"
|
| 480 |
|
| 481 | "USE_LLVM_SHLIB=1"
|
| 482 |
|
| 483 | "NO_GIT=1" |
| 484 | "USE_GPL_LIBS=1" |
| 485 |
|
| 486 | ,@(if (target-x86-64?)
|
| 487 | `("USE_BLAS64=1"
|
| 488 | "LIBBLAS=-lopenblas64_"
|
| 489 | "LIBBLASNAME=libopenblas64_")
|
| 490 | `("USE_BLAS64=0"
|
| 491 | "LIBBLAS=-lopenblas"
|
| 492 | "LIBBLASNAME=libopenblas"))
|
| 493 |
|
| 494 | (string-append "UTF8PROC_INC="
|
| 495 | (assoc-ref %build-inputs "utf8proc")
|
| 496 | "/include")
|
| 497 | |
| 498 | (string-append "LIBUV="
|
| 499 | (assoc-ref %build-inputs "libuv")
|
| 500 | "/lib/libuv.a")
|
| 501 | (string-append "LIBUV_INC="
|
| 502 | (assoc-ref %build-inputs "libuv")
|
| 503 | "/include"))))
|
| 504 | (inputs
|
| 505 | `(("bash-minimal" ,bash-minimal)
|
| 506 | ("coreutils" ,coreutils) |
| 507 | ("curl" ,curl-ssh)
|
| 508 | ("gfortran" ,gfortran)
|
| 509 | |
| 510 | ("gfortran:lib" ,gfortran "lib")
|
| 511 | ("gmp" ,gmp)
|
| 512 | ("lapack" ,lapack)
|
| 513 | ("libblastrampoline" ,libblastrampoline)
|
| 514 | ("libgit2" ,libgit2-1.3)
|
| 515 | ("libnghttp2" ,nghttp2 "lib")
|
| 516 | ("libssh2" ,libssh2)
|
| 517 | ("libunwind" ,libunwind-julia)
|
| 518 | ("libuv" ,libuv-julia)
|
| 519 | ("llvm" ,llvm-julia)
|
| 520 | ("mbedtls" ,mbedtls-lts)
|
| 521 | ("mpfr" ,mpfr)
|
| 522 | ,@(if (target-x86-64?)
|
| 523 | `(("openblas" ,openblas-ilp64))
|
| 524 | `(("openblas" ,openblas)))
|
| 525 | ("openlibm" ,openlibm)
|
| 526 | ("p7zip" ,p7zip)
|
| 527 | ("pcre2" ,pcre2)
|
| 528 | ("suitesparse" ,suitesparse)
|
| 529 | ("utf8proc" ,utf8proc)
|
| 530 | ("wget" ,wget)
|
| 531 | ("which" ,which)
|
| 532 | ("zlib" ,zlib)
|
| 533 | |
| 534 | |
| 535 | ("dsfmt" ,dsfmt)
|
| 536 | ("libwhich" ,libwhich)))
|
| 537 | (native-inputs
|
| 538 | `(("openssl" ,openssl)
|
| 539 | ("perl" ,perl)
|
| 540 | ("patchelf" ,patchelf)
|
| 541 | ("pkg-config" ,pkg-config)
|
| 542 | ("python" ,python)))
|
| 543 | (native-search-paths
|
| 544 | (list (search-path-specification
|
| 545 | (variable "JULIA_LOAD_PATH")
|
| 546 | (files (list "share/julia/loadpath/")))
|
| 547 | (search-path-specification
|
| 548 | (variable "JULIA_DEPOT_PATH")
|
| 549 | (files (list "share/julia/")))
|
| 550 | $SSL_CERT_FILE))
|
| 551 | |
| 552 | |
| 553 | (supported-systems '("i686-linux" "x86_64-linux" "aarch64-linux"))
|
| 554 | (home-page "https://julialang.org/")
|
| 555 | (synopsis "High-performance dynamic language for technical computing")
|
| 556 | (description
|
| 557 | "Julia is a high-level, high-performance dynamic programming language for
|
| 558 | technical computing, with syntax that is familiar to users of other technical
|
| 559 | computing environments. It provides a sophisticated compiler, distributed
|
| 560 | parallel execution, numerical accuracy, and an extensive mathematical function
|
| 561 | library.")
|
| 562 | (license license:expat)))
|